A Document instance which should be managed by this form.
Optional
options: any = {}Optional configuration parameters for how the form behaves.
Internal
_dragDragDrop workflow handlers which are active for this Application
Internal
_elementAn internal reference to the HTML element this application renders
Internal
_minimizedTrack whether the Application is currently minimized
Internal
_scrollTrack the most recent scroll positions for any vertically scrolling containers
Internal
_searchSearchFilter handlers which are active for this Application
Internal
_tabsTab navigation handlers which are active for this Application
The application ID is a unique incrementing integer which is used to identify every application window drawn by the VTT
Keep track of any mce editors which may be active as part of this form The values of this object are inner-objects with references to the MCE editor and other metadata
A convenience reference to the form HTMLElement
The object target which we are using this form to modify
The options provided to this application upon initialization
Track the current position and dimensions of the Application UI
Protected
_priorThe prior render state of this Application. This allows for rendering logic to understand if the application is being rendered for the first time.
Protected
_secretsThe list of handlers for secret block functionality.
Protected
_stateThe current render state of the Application
Static
RENDER_The sequence of rendering states that track the Application life-cycle.
Whether the Application is currently closing.
A semantic convenience reference to the Document instance which is the target object for this form.
Return the active application element, if it currently exists in the DOM
Return the CSS application ID which uniquely references this UI element
Is the Form Application currently editable?
Control the rendering style of the application. If popOut is true, the application is rendered in its own wrapper window, otherwise only the inner app content is rendered
Return a flag for whether the Application instance is currently rendered
The path to the HTML template file which should be used to render the inner content of the app
An Application window should define its own title definition logic which may be dynamic depending on its data
If this Actor Sheet represents a synthetic Token actor, reference the active Token
Static
defaultProtected
Static
_customProtected
An array of custom element tag names that should be listened to for changes.
Activate required listeners which must be enabled on every Application. These are internal interactions which should not be overridden by downstream subclasses.
Define whether a user is able to conclude a drag-and-drop workflow for a given drop selector
The candidate HTML selector for the drop target
Can the current user drop on this selector?
Define whether a user is able to begin a dragstart workflow for a given drag selector
The candidate HTML selector for dragging
Can the current user drag this selector?
Internal
Create a foundry.applications.ux.ContextMenu for this Application.
The Application's HTML.
Internal
Create drag-and-drop workflow handlers for this Application
An array of DragDrop handlers
Internal
Create search filter handlers for this Application
An array of SearchFilter handlers
Internal
Create tabbed navigation handlers for this Application
An array of Tabs handlers
Specify the set of config buttons which should appear in the Application header. Buttons should be returned as an Array of objects. The header buttons which are added to the application can be modified by the getApplicationV1HeaderButtons hook.
Get an object of update data used to update the form's target object
Additional data that should be merged with the form data
The prepared update data
Internal
Customize how a new HTML Application is added and first appears in the DOM
The HTML element which is ready to be added to the DOM
Internal
Handle requests to configure the Token for the Actor
The originating click event
Callback actions which occur at the beginning of a drag start workflow.
The originating DragEvent
Callback actions which occur when a dragged element is dropped on a target.
The originating DragEvent
Internal
Handle the final creation of dropped Item data on the Actor. This method is factored out to allow downstream classes the opportunity to override item creation behavior.
The item data requested for creation
The concluding DragEvent which provided the drop data
Internal
Additional actions to take when the application window is resized
Internal
Handle a drop event for an existing embedded Item to sort that Item relative to its siblings
Internal
Handle application minimization behavior - collapsing content and reducing the size of the header
An asynchronous inner function which handles the rendering of the Application
Render and display the application even if it is not currently displayed.
Additional options which update the current values of the Application#options object
A Promise that resolves to the Application once rendering is complete
Internal
Render the inner application content
The data used to render the inner template
A promise resolving to the constructed jQuery object
Render the outer application wrapper
A promise resolving to the constructed jQuery object
Internal
Customize how inner HTML is replaced when the application is refreshed
The original HTML processed as a jQuery object
New updated HTML as a jQuery object
This method is called upon form submission after form data is validated
The initial triggering submission event
The object of validated form data with which to update the object
A Promise which resolves once the update operation has completed
Activate a named TinyMCE text editor
The named data field which the editor modifies.
Editor initialization options passed to foundry.applications.ux.TextEditor.create.
Initial text content for the editor area.
After rendering, activate event listeners which provide interactivity for the Application. This is where user-defined Application subclasses should attach their event-handling logic.
Change the currently active tab
The target tab name to switch to
Options which configure changing the tab
A specific named tab group, useful if multiple sets of tabs are present
Whether to trigger tab-change callback functions
A convenience alias for bringToTop for when operating on an object that is either an Application or an ApplicationV2
Bring the application to the top of the rendering stack
Close the application and un-register references to it within UI mappings This function returns a Promise which resolves once the window closing animation concludes
Options which affect how the Application is closed
A Promise which resolves once the application is closed
An application should define the data object used to render its template. This function may either return an Object directly, or a Promise which resolves to an Object If undefined, the default implementation will return an empty object allowing only for rendering of static HTML
Maximize the pop-out window, expanding it to its original size Take no action for applications which are not of the pop-out variety or are already maximized
A Promise which resolves once the maximization action has completed
Minimize the pop-out window, collapsing it to a small tab Take no action for applications which are not of the pop-out variety or apps which are already minimized
A Promise which resolves once the minimization action has completed
Render the Application by evaluating its HTML template against the object of data provided by the getData method If the Application is rendered as a pop-out window, wrap the contained HTML in an outer frame with window controls
Add the rendered application to the DOM if it is not already present. If false, the Application will only be re-rendered if it is already present.
Additional rendering options which are applied to customize the way that the Application is rendered in the DOM.
Optional
focus?: booleanApply focus to the application, maximizing it and bringing it to the top of the vertical stack.
Optional
height?: numberThe rendered height
Optional
left?: numberThe left positioning attribute
Optional
renderContext?: stringA context-providing string which suggests what event triggered the render
Optional
renderData?: objectThe data change which motivated the render request
Optional
scale?: numberThe rendered transformation scale
Optional
top?: numberThe top positioning attribute
Optional
width?: numberThe rendered width
The rendered Application instance
Handle saving the content of a specific editor by name
The named editor to save
Optional
options: { preventRender?: boolean; remove?: boolean } = {}Optional
preventRender?: booleanPrevent normal re-rendering of the sheet after saving.
Optional
remove?: booleanRemove the editor after saving its content
Set the application position and store its new location. Returns the updated position object for the application containing the new values.
Positional data
The application height in pixels
The left offset position in pixels
The application scale as a numeric factor where 1.0 is default
The top offset position in pixels
The application width in pixels
Submit the contents of a Form Application, processing its content as defined by the Application
Optional
options: object = {}Options passed to the _onSubmit event handler
Return a self-reference for convenient method chaining
Protected
_activateProtected
Activate an editor instance present within the form
The element which contains the editor
Protected
_callProtected
Call all hooks for all applications in the inheritance chain.
The hook being triggered, which formatted with the Application class name
The arguments passed to the hook calls
Protected
_canProtected
Test whether a certain User has permission to view this Document Sheet.
The user requesting to render the sheet
Does the User have permission to view this sheet?
Protected
_configureProtected
Configure ProseMirror plugins for this sheet.
The name of the editor.
Optional
options: { remove?: boolean } = {}Additional options to configure the plugins.
Optional
remove?: booleanWhether the editor should destroy itself on save.
Protected
_createProtected
Create an ID link button in the document sheet header which displays the document ID and copies to clipboard
Protected
_createProtected
Create objects for managing the functionality of secret blocks within this Document's content.
Protected
_disableProtected
If the form is not editable, disable its input fields
The form HTML
Protected
_getProtected
Get the HTML content that a given secret block is embedded in.
The secret block.
Protected
_onProtected
Handle the change of a color picker input which enters it's chosen value into a related input field
The color picker change event
Protected
_onProtected
Handle changes to an input element, submitting the form if options.submitOnChange is true. Do not preventDefault in this handler as other interactions on the form may also be occurring.
The initial change event
Protected
_onProtected
Handle changes to a range type input by propagating those changes to the sibling range-value element
The initial change event
Protected
_onProtected
Handle changes to the active tab in a configured Tabs controller
A left click event
The Tabs controller
The new active tab name
Protected
_onProtected
Handle requests to configure the default sheet used by this Document
Protected
_onProtected
Callback actions which occur when a dragged element is over a drop target.
The originating DragEvent
Protected
_onProtected
Handle the dropping of ActiveEffect data onto an Actor Sheet
The concluding DragEvent which contains drop data
The data transfer extracted from the event
The created ActiveEffect object or false if it couldn't be created.
Protected
_onProtected
Handle dropping of an Actor data onto another Actor sheet
The concluding DragEvent which contains drop data
The data transfer extracted from the event
A data object which describes the result of the drop, or false if the drop was not permitted.
Protected
_onProtected
Handle dropping of a Folder on an Actor Sheet. The core sheet currently supports dropping a Folder of Items to create all items as owned items.
The concluding DragEvent which contains drop data
The data transfer extracted from the event
Protected
_onProtected
Handle dropping of an item reference or item data onto an Actor Sheet
The concluding DragEvent which contains drop data
The data transfer extracted from the event
The created or updated Item instances, or false if the drop was not permitted.
Protected
_onProtected
Handle changing a Document's image.
The click event.
Protected
_onProtected
Handle changes to search filtering controllers which are bound to the Application
The key-up event from keyboard input
The raw string input to the search field
The regular expression to test against
The HTML element which should be filtered
Protected
_onProtected
Handle standard form submission steps
The submit event which triggered this handler
Optional
preventClose?: booleanOverride the standard behavior of whether to close the form on submit
Optional
preventRender?: booleanPrevent the application from re-rendering as a result of form submission
Optional
updateData?: null | objectAdditional specific data keys/values which override or extend the contents of the parsed form. This can be used to update other flags or data fields at the same time as processing a form submission to avoid multiple database operations.
A promise which resolves to the validated update data
Protected
_restoreProtected
Restore the scroll positions of containers within the app after re-rendering the content
The HTML object being traversed
Protected
_saveProtected
Persist the scroll positions of containers within the app before re-rendering the content
The HTML object being traversed
Protected
_updateProtected
Update the HTML content that a given secret block is embedded in.
The secret block.
The new content.
The updated Document.
Protected
_waitProtected
Wait for any images present in the Application to load.
A Promise that resolves when all images have loaded.
Static
_getInternal
Return the inheritance chain for this Application class up to (and including) it's base Application class.
The Application responsible for displaying and editing a single Actor document. This Application is responsible for rendering an actor's attributes and allowing the actor to be edited.
Deprecated
since v13
Param: actor
The Actor instance being displayed within the sheet.
Param: options
Additional application configuration options.