Application instance configuration options.
The current position of the application with respect to the window.document.body.
If this Application uses tabbed navigation groups, this mapping is updated whenever the changeTab method is called.
Reports the active tab for each group, with a value of null indicating no tab is active.
Subclasses may override this property to define default tabs for each group.
Static Internal_appAn incrementing integer Application ID.
Static Internal_maxZThe current maximum z-index of any displayed Application.
StaticBASE_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.
StaticDEFAULT_StaticemittedStaticPARTSStaticRENDER_The sequence of rendering states that describe the Application life-cycle.
StatictabStaticTABSConfiguration of application tabs, with an entry per tab group.
Protected Static_entryThe path to the template used to render a single entry within the directory.
Protected Static_folderThe path to the template used to render a single folder within the directory.
Whether this tab is currently active in the sidebar.
The CSS class list of this Application instance
The Document collection that this directory represents.
The implementation of the Document type that this directory represents.
The named Document type that this directory represents.
The HTMLElement which renders this Application into the DOM.
Does this Application have a top-level form element?
Does this Application instance render within an outer window frame?
The HTML element ID of this Application instance.
This provides a readonly view into the internal ID used by this application.
This getter should not be overridden by subclasses, which should instead configure the ID in DEFAULT_OPTIONS or
by defining a uniqueId during _initializeApplicationOptions.
Whether this is the popped-out tab or the in-sidebar one.
Is this Application instance currently minimized?
A reference to the popped-out version of this tab, if one exists.
Is this Application instance currently rendered?
The current render state of the Application.
The base name of the sidebar tab.
Convenience references to window header elements.
InternalWait for a CSS transition to complete for an element.
The element which is transitioning
A timeout in milliseconds in case the transitionend event does not occur
InternalPerform an event in the application life-cycle. Await an internal life-cycle method defined by the class. Optionally dispatch an event for any registered listeners.
A handler function to call
Options which configure event handling
Optionalasync?: booleanAwait the result of the handler function?
OptionaldebugText?: stringDebugging text to log for the event
OptionaleventName?: stringAn event name to dispatch for registered listeners
OptionalhandlerArgs?: any[]Arguments passed to the handler function
OptionalhookArgs?: any[]Arguments passed to the requested hook function
OptionalhookName?: stringA hook name to dispatch for this and all parent classes
OptionalhookResponse?: booleanAdd the handler response to hookArgs
OptionalparentClassHooks?: booleanCall hooks for parent classes in the inheritance chain?
A promise which resoles once the handler is complete if async is true
Abstract_renderHTMLRender an HTMLElement for the Application. An Application subclass must implement this method in order for the Application to be renderable.
Context data for the render operation
Options which configure application rendering behavior
The result of HTML rendering may be implementation specific. Whatever value is returned here is passed to _replaceHTML
Activate this tab in the sidebar.
Add a new event listener for a certain type of event.
The type of event being registered for
The listener function called when the event occurs
Optionaloptions: { once?: boolean } = {}Options which configure the event listener
Optionalonce?: booleanShould the event only be responded to once and then removed
Bring this Application window to the front of the rendering stack by increasing its z-index. Once ApplicationV1 is deprecated we should switch from _maxZ to ApplicationV2#maxZ We should also eliminate ui.activeWindow in favor of only ApplicationV2#frontApp
Change the active tab within a tab group in this Application instance.
The name of the tab which should become active
The name of the tab group which defines the set of tabs
Optionaloptions: {Additional options which affect tab navigation
Optionalevent?: EventAn interaction event which caused the tab change, if any
Optionalforce?: booleanForce changing the tab even if the new tab is already active
OptionalnavElement?: HTMLElementAn explicit navigation element being modified
OptionalupdatePosition?: booleanUpdate application position after changing the tab?
Close the Application, removing it from the DOM.
Optionaloptions: Partial<ApplicationClosingOptions> = {}Options which modify how the application is closed.
A Promise which resolves to the closed Application instance
Collapse all open folders in this directory.
Dispatch an event on this target.
The Event to dispatch
Was default behavior for the event prevented?
Restore the Application to its original dimensions.
Minimize the Application, collapsing it to a minimal header.
Remove an event listener for a certain type of event.
The type of event being removed
The listener function being removed
Pop-out this sidebar tab as a new application.
Update the Application element position using provided data which is merged with the prior position.
Optionalposition: Partial<ApplicationPosition>New Application positioning data
The updated application position
Programmatically submit an ApplicationV2 instance which implements a single top-level form.
OptionalsubmitOptions: object = {}Arbitrary options which are supported by and provided to the configured form submission handler.
A promise that resolves to the returned result of the form submission handler, if any.
Toggle display of the Application controls menu. Only applicable to window Applications.
Optionalexpanded: booleanSet the controls visibility to a specific state. Otherwise, the visible state is toggled from its current value
Optionaloptions: { animate?: boolean } = {}Options to configure the toggling behavior.
Optionalanimate?: booleanAnimate the controls toggling.
A Promise which resolves once the control expansion animation is complete
Protected_attachProtectedAttach event listeners to the Application frame.
Protected_canProtectedDetermine if the current user has permission to create directory entries.
Protected_canProtectedDetermine if the current user has permission to create folders in this directory.
Protected_canProtectedDetermine if drop operations are permitted.
The candidate HTML selector for dragging
Can the current user drag this selector?
Protected_canProtectedDetermine if drag operations are permitted.
The candidate HTML selector for dragging
Can the current user drag this selector?
Protected_configureProtectedModify the provided options passed to a render request.
Options which configure application rendering behavior
Protected_createProtectedCreate a ContextMenu instance used in this Application.
A handler function that provides initial context options
A CSS selector to which the ContextMenu will be bound
Optionaloptions: { container?: HTMLElement; hookName?: string; parentClassHooks?: boolean } = {}Additional options which affect ContextMenu construction
Optionalcontainer?: HTMLElementA parent HTMLElement which contains the selector target
OptionalhookName?: stringThe hook name
OptionalparentClassHooks?: booleanWhether to call hooks for the parent classes in the inheritance chain.
A created ContextMenu or null if no menu items were defined
Protected_createProtectedRegister context menu entries and fire hooks.
Protected_createProtected_createProtected_createProtected_entryProtectedTest if the given entry is already present in this directory.
The directory entry.
Protected_entryProtectedDetermine whether a given directory entry belongs to the given folder.
The entry.
The target folder ID.
Protected_getProtected_getProtected_getProtectedGet drag data for an entry in this directory.
The entry's ID.
Protected_getProtected_getProtectedGet drag data for a folder in this directory.
The folder ID.
Protected_getProtectedConfigure the array of header control menu options
Protected_getProtectedGet the configuration for a tabs group.
The ID of a tabs group
Protected_handleProtectedHandle dropping a new entry into this directory.
The drop target element.
The drop data.
Protected_handleProtectedHandle dropping a folder onto the directory.
The drop target element.
The drop data.
Protected_handleProtected_headerProtectedIterate over header control buttons, filtering for controls which are visible for the current client.
Protected_insertProtectedInsert the application HTML element into the DOM. Subclasses may override this method to customize how the application is inserted.
The element to insert
Protected_matchProtectedIdentify entries in the collection which match a provided search query.
The search query.
The set of matched entry IDs.
The set of matched folder IDs.
The set of folder IDs that should be auto-expanded.
Optionaloptions: object = {}Additional options for subclass-specific behavior.
Protected_matchProtectedIdentify folders in the collection which match a provided search query.
The search query.
The set of matched folder IDs.
The set of folder IDs that should be auto-expanded.
Optionaloptions: object = {}Additional options for subclass-specific behavior.
Protected_onProtectedActions performed when this tab is activated in the sidebar.
Protected_onProtectedHandle changes to an input element within the form.
The form configuration for which this handler is bound
An input change event within the form
Protected_onProtectedA generic event handler for action clicks which can be extended by subclasses. Action handlers defined in DEFAULT_OPTIONS are called first. This method is only called for actions which have no defined handler.
The originating click event
The capturing HTML element which defined a [data-action]
Protected_onProtectedHandle activating a directory entry.
The triggering click event.
The action target element.
Optionaloptions: { _skipDeprecation?: boolean } = {}Optional_skipDeprecation?: booleanInternal use only.
Protected_onProtectedHandle click events on a tab within the Application.
Protected_onProtectedHandle creating a new entry in this directory.
The triggering click event.
The action target element.
Protected_onProtectedHandle creating a new folder in this directory.
The triggering click event.
The action target element.
Protected_onProtectedActions performed when this tab is deactivated in the sidebar.
Protected_onProtectedHighlight folders as drop targets when a drag event enters or exits their area.
The in-progress drag event.
Protected_onProtectedHandle drag events over the directory.
Protected_onProtectedHandle matching a given directory entry with the search filter.
The input search string.
The matched directory entry IDs.
The candidate entry element.
Optionaloptions: object = {}Additional options for subclass-specific behavior.
Protected_onProtectedActions performed after the Application is re-positioned.
The requested application position
Protected_onProtectedHandle directory searching and filtering.
The keyboard input event.
The input search string.
The regular expression query that should be matched against.
The container to filter entries from.
Protected_onProtectedHandle submission for an Application which uses the form element.
The form configuration for which this handler is bound
The form submission event
Protected_onProtectedHandle toggling a folder's expanded state.
The triggering click event.
The action target element.
Optionaloptions: { _skipDeprecation?: boolean } = {}Optional_skipDeprecation?: booleanInternal use only.
Protected_organizeProtected_postProtectedPerform post-render finalization actions.
Prepared context data.
Provided render options.
Protected_preProtectedActions performed before closing the Application. Pre-close steps are awaited by the close process.
Provided render options
Protected_preProtectedActions performed before a first render of the Application.
Prepared context data
Provided render options
Protected_prepareProtectedPrepare render context for the directory part.
Protected_prepareProtectedPrepares the data for a duplicated Document.
The Document that is duplicated
The partial data of the duplicate that overrides the original data
Protected_prepareProtectedPrepare render context for the footer part.
Protected_prepareProtectedPrepare render context for the header part.
Protected_prepareProtectedPrepare application tab data for a single tab group.
The ID of the tab group to prepare
Protected_preProtectedActions performed before the Application is re-positioned. Pre-position steps are not awaited because setPosition is synchronous.
The requested application position
Protected_preProtectedActions performed before any render of the Application. Pre-render steps are awaited by the render process.
Prepared context data
Provided render options
Protected_removeProtectedRemove the application HTML element from the DOM. Subclasses may override this method to customize how the application element is removed.
The element to be removed
Protected_renderProtectedRender a header control button.
Protected_replaceHTMLProtectedReplace the HTML of the application with the result provided by the rendering backend. An Application subclass should implement this method in order for the Application to be renderable.
The result returned by the application rendering backend
The content element into which the rendered result must be inserted
Options which configure application rendering behavior
Protected_tearProtectedRemove elements from the DOM and trigger garbage collection as part of application closure.
Protected_updateProtectedWhen the Application is rendered, optionally update aspects of the window frame.
Options provided at render-time
Protected_updateProtectedTranslate a requested application position updated into a resolved allowed position for the Application. Subclasses may override this method to implement more advanced positioning behavior.
Requested Application positioning data
Resolved Application positioning data
Static_getStatic_handleInternalHelper method to handle dropping a folder onto the directory.
StaticinheritanceIterate over the inheritance chain of this Application. The chain includes this Application itself and all parents until the base application is encountered.
StaticparseCSSDimensionParse a CSS style rule into a number of pixels which apply to that dimension.
The CSS style rule
The relevant dimension of the parent element
The parsed style dimension in pixels
StaticwaitWait for any images in the given element to load.
The element.
The World Macro directory listing.