Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    The Application responsible for displaying and editing a single JournalEntry Document.

    HandlebarsApplication

    Hierarchy

    • any
      • JournalEntrySheet
    Index

    Constructors

    • Parameters

      • options: any
      • ...args: any[]

      Returns JournalEntrySheet

    Properties

    _pages: Record<string, JournalSheetPageContext>

    The cached list of processed page entries.

    _appId: number = 0

    An incrementing integer Application ID.

    _maxZ: number = ...

    The current maximum z-index of any displayed Application.

    BASE_APPLICATION: typeof ApplicationV2 = ApplicationV2

    Designates which upstream Application class in this class' inheritance chain is the base application. Any DEFAULT_OPTIONS of super-classes further upstream of the BASE_APPLICATION are ignored. Hook events for super-classes further upstream of the BASE_APPLICATION are not dispatched.

    DEFAULT_OPTIONS: {
        actions: {
            configCategories: (this: JournalEntrySheet) => void;
            createPage: () => any;
            editPage: (event: PointerEvent, target: HTMLElement) => any;
            goToHeading: (
                this: JournalEntrySheet,
                event: PointerEvent,
                target: HTMLElement,
            ) => void;
            nextPage: () => any;
            previousPage: () => any;
            showPlayers: () => void;
            toggleLock: (this: JournalEntrySheet) => void;
            toggleMode: (this: JournalEntrySheet) => any;
            toggleSearch: () => any;
            toggleSidebar: () => void;
        };
        classes: string[];
        form: { submitOnChange: boolean };
        position: { height: number; width: number };
        viewPermission: 0;
        window: { resizable: boolean };
    } = ...
    emittedEvents: readonly ["prerender", "render", "close", "position"] = ...
    OWNERSHIP_ICONS: { "0": string; "2": string; "3": string } = ...

    Icons for page ownership.

    PARTS: {
        pages: { scrollable: string[]; template: string };
        sidebar: { scrollable: string[]; template: string; templates: string[] };
    } = ...
    RENDER_STATES: Record<string, number> = ...

    The sequence of rendering states that describe the Application life-cycle.

    TABS: Record<string, ApplicationTabsConfiguration> = {}

    Configuration of application tabs, with an entry per tab group.

    VIEW_MODES: { MULTIPLE: number; SINGLE: number } = ...

    The available view modes for journal entries.

    Accessors

    entry

    • get isMultiple(): boolean

      Whether the sheet is in multi-page mode.

      Returns boolean

    • get locked(): boolean

      Whether the journal is locked and disallows modifications to the table of contents.

      Returns boolean

    • get mode(): { MULTIPLE: number; SINGLE: number }

      Get the JournalEntry's current view mode.

      Returns { MULTIPLE: number; SINGLE: number }

    • get observer(): IntersectionObserver

      The currently active IntersectionObserver.

      Returns IntersectionObserver

    • get pageId(): string

      The ID of the currently-viewed page.

      Returns string

    • get pageIndex(): number

      The index of the currently-viewed page in the list of available pages.

      Returns number

    • get pagesInView(): HTMLElement[]

      The pages that are currently scrolled into view and marked as 'active' in the sidebar.

      Returns HTMLElement[]

    • get searchMode(): string

      Get the JournalEntry's current search mode.

      Returns string

    • get sidebarExpanded(): boolean

      The expanded state of the sidebar.

      Returns boolean

    • get title(): string

      Returns string

    Methods

    • Returns void

    • Parameters

      • options: any

      Returns void

    • Parameters

      • options: any

      Returns any

    • Returns any

    • Parameters

      • options: any

      Returns any

    • Parameters

      • options: any

      Returns void

    • Parameters

      • context: any
      • options: any

      Returns Promise<void>

    • Parameters

      • context: any
      • options: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns void

    • Parameters

      • options: any

      Returns Promise<any>

    • Parameters

      • partId: any
      • context: any
      • options: any

      Returns Promise<any>

    • Parameters

      • partId: any
      • newElement: any
      • priorElement: any
      • state: any

      Returns void

    • Parameters

      • result: any
      • content: any
      • options: any

      Returns void

    • Parameters

      • options: any

      Returns void

    • Parameters

      • options: any

      Returns void

    • Prompt the user with a Dialog for creation of a new JournalEntryPage.

      Returns any

    • Turn to a specific page.

      Parameters

      • pageId: string

        The ID of the page to turn to.

      • Optionaloptions: { anchor?: string } = {}
        • Optionalanchor?: string

          Optionally an anchor slug to focus within that page.

      Returns any

    • Turn to the next page.

      Returns any

    • Turn to the previous page.

      Returns any

    • Toggle the search mode for this journal entry between name and full text search.

      Returns any

    • Toggle the collapsed or expanded state of the sidebar.

      Returns void

    • Iterate over the JournalEntryPage documents which are currently visible in the sheet.

      Returns Generator<any, void, unknown>

    • Protected

      Highlights the currently-viewed page in the sidebar.

      Returns void

    • Protected

      Determine if drop operations are permitted.

      Parameters

      • selector: string

        The candidate HTML selector for dragging

      Returns boolean

      Can the current user drag this selector?

    • Protected

      Determine if drag operations are permitted.

      Parameters

      • selector: string

        The candidate HTML selector for dragging

      Returns boolean

      Can the current user drag this selector?

    • Protected

      Get the set of ContextMenu options which should be used for journal entry pages in the sidebar.

      Returns ContextMenuEntry[]

    • Protected

      Create an intersection observer to maintain a list of headings that are in view. This is much more performant than calling getBoundingClientRect on all headings whenever we want to determine this list.

      Returns void

    • Protected

      Create an intersection observer to maintain a list of pages that are in view.

      Returns void

    • Protected

      Handle clicking an image to pop it out for fullscreen view.

      Parameters

      • event: PointerEvent

        The triggering click event.

      Returns void

    • Protected

      Handle closing the context menu.

      Parameters

      • target: HTMLElement

        The element the context menu has been triggered for.

      Returns void

    • Protected

      Handle opening the context menu.

      Parameters

      • target: HTMLElement

        The element the context menu has been triggered for.

      Returns void

    • Protected

      Handle drag operations.

      Parameters

      • event: DragEvent

      Returns void

    • Protected

      Handle drop operations.

      Parameters

      • event: DragEvent

      Returns Promise<any>

    • Protected

      Handle editing one of the journal entry's pages.

      Parameters

      • event: PointerEvent

        The triggering event.

      • target: HTMLElement

        The action target.

      Returns any

    • Protected

      Handle new pages scrolling into view.

      Parameters

      • entries: IntersectionObserverEntry[]

        An array of element that have scrolled into or out of view.

      • observer: IntersectionObserver

        The IntersectionObserver that invoked this callback.

      Returns void

    • Protected

      Handle journal entry search and filtering.

      Parameters

      • event: KeyboardEvent

        The keyboard input event.

      • query: string

        The input search string.

      • rgx: RegExp

        The regular expression query that should be matched against.

      • html: HTMLElement

        The container to filter items from.

      Returns void

    • Protected

      Handle a request to show the JournalEntry to other Users.

      Returns void

    • Protected

      Add headings to the table of contents for the given node.

      Parameters

      • pageNode: HTMLElement

        The HTML node of the page's rendered contents.

      • toc: Record<string, JournalEntryPageHeading>

        The page's table of contents.

      Returns Promise<void>

    • Protected

      Render the page view for a page sheet.

      Parameters

      • element: HTMLElement

        The existing page element in the journal entry view.

      • sheet: JournalEntryPageSheet

        The page sheet.

      Returns Promise<void>

    • Protected

      Update which page of the journal sheet should be currently rendered. This can be controlled by options passed into the render method, or by subclass override.

      Parameters

      Returns void

    • Protected

      If the set of active pages has changed, various elements in the sidebar will expand and collapse. For particularly long ToCs, this can leave the scroll position of the sidebar in a seemingly random state. We try to do our best to sync the sidebar scroll position with the current journal viewport.

      Returns void

    • Protected

      Update the disabled state of the previous and next page buttons.

      Returns void

    • Iterate over the inheritance chain of this Application. The chain includes this Application itself and all parents until the base application is encountered.

      Returns Generator<typeof ApplicationV2, void, unknown>

    • Iterate over the instances of this Application.

      Returns Generator<typeof ApplicationV2, any, any>

    • Parse a CSS style rule into a number of pixels which apply to that dimension.

      Parameters

      • style: string

        The CSS style rule

      • parentDimension: number

        The relevant dimension of the parent element

      Returns number | void

      The parsed style dimension in pixels

    • Wait for any images in the given element to load.

      Parameters

      • element: HTMLElement

        The element.

      Returns Promise<void>