Override and extend the core ItemSheet implementation to handle game system specific item types

Hierarchy (View Summary)

Constructors

Properties

_filters: Set<any>

Track the set of item filters which are applied

_itemUpdates: object[]

Track item updates from the actor sheet.

effectiveSearch: string
searchCompositioning: boolean

Item search

searchDelay: number
searchDelayEvent: null | Timeout
searchRefresh: boolean

Accessors

  • get defaultOptions(): InsertKeys<
        {},
        OmitByValue<
            {
                classes: string[];
                dragDrop: (
                    | { dragSelector: string; dropSelector: string }
                    | { dragSelector: string; dropSelector?: undefined }
                )[];
                scrollY: string[];
                width: number;
            },
            never,
        >,
    >
  • Returns InsertKeys<
        {},
        OmitByValue<
            {
                classes: string[];
                dragDrop: (
                    | { dragSelector: string; dropSelector: string }
                    | { dragSelector: string; dropSelector?: undefined }
                )[];
                scrollY: string[];
                width: number;
            },
            never,
        >,
    >

    foundry.utils.mergeObject(super.defaultOptions, {
    template: "templates/sheets/item-sheet.html",
    width: 500,
    closeOnSubmit: false,
    submitOnClose: true,
    submitOnChange: true,
    resizable: true,
    baseApplication: "ItemSheet",
    id: "item"
    })

Methods

  • Internal

    Handle dropping content-linkable data to <textarea> or text <input>

    Parameters

    • event: DragEvent

    Returns Promise<undefined | Partial<Record<string, unknown>>>

  • Internal

    Parameters

    • elem: Element
    • Optionaloptions: { animation?: boolean; rollData?: object } = {}

      Additional options

    Returns Promise<void>

  • Prepare item sheet data Start with the base item data and extending with additional properties for rendering.

    Returns Promise<
        {
            canClassLink: boolean;
            config: config;
            cssClass: string;
            document: ItemPF;
            editable: boolean;
            inContainer: boolean;
            isGM: boolean;
            item: ItemPF;
            itemType: string;
            labels: Record<string, string>;
            name: null | string;
            owned: boolean;
            owner: boolean;
            rollData: object;
            system: any;
            tag: any;
        },
    >