Pathfinder 1e for Foundry VTT
    Preparing search index...

    Class ItemSheetPF_Container

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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _activeEdits: Record<string, string> = {}
    _warnedAppV1: boolean = true
    ACTIONS: {
        __proto__: null;
        adjustQuantity: Object;
        convertCurrency: (
            ...this: any,
            event: PointerEvent,
            target: HTMLElement,
        ) => Promise<void>;
        createItem: Object;
        deleteItem: Object;
        displayItemCard: Object;
        dupeItem: Object;
        editItem: Object;
        takeItem: Object;
        toggleIdentified: Object;
        toggleItemSummary: Object;
        useItem: Object;
    } = ...

    Temporary action mapping until AppV2 conversion.

    Type Declaration

    • __proto__: null
    • adjustQuantity: Object
    • convertCurrency: (...this: any, event: PointerEvent, target: HTMLElement) => Promise<void>
    • createItem: Object
    • deleteItem: Object
    • displayItemCard: Object
    • dupeItem: Object
    • editItem: Object
    • takeItem: Object
    • toggleIdentified: Object
    • toggleItemSummary: Object
    • useItem: Object
    BASE_APPLICATION: typeof ItemSheetPF = ...

    Remove with AppV2 conversion

    EDIT_TRACKING: string[] = ...

    Which fields to track edits for

    WHEEL_UPDATE_SCOPES: string[] = ...

    Accessors

    • get defaultOptions(): InsertKeys<
          {},
          {
              classes: readonly ["pf1", "sheet", "item"];
              dragDrop: readonly [
                  {
                      dragSelector: "li.item[data-item-id]";
                      dropSelector: ".tab[data-tab=\"contents\"]";
                  },
                  { dragSelector: ".tab.changes li.change" },
                  { dragSelector: "label.denomination" },
              ];
              scrollY: readonly [
                  ".tab",
                  ".buff-flags",
                  ".editor-content",
                  ".inventory-body",
              ];
              width: 800;
          },
      >

      Returns InsertKeys<
          {},
          {
              classes: readonly ["pf1", "sheet", "item"];
              dragDrop: readonly [
                  {
                      dragSelector: "li.item[data-item-id]";
                      dropSelector: ".tab[data-tab=\"contents\"]";
                  },
                  { dragSelector: ".tab.changes li.change" },
                  { dragSelector: "label.denomination" },
              ];
              scrollY: readonly [
                  ".tab",
                  ".buff-flags",
                  ".editor-content",
                  ".inventory-body",
              ];
              width: 800;
          },
      >

      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",
      secrets: [{parentSelector: ".editor"}]
      })

    Methods

    • Internal

      Filters item by sheet section config.

      Parameters

      • item: Item<"base" | ModuleSubType>

        Item to filter

      • section: object

        Section to filter by

      Returns boolean

    • Protected

      Non-action button clicks

      Parameters

      • event: PointerEvent

        Triggering event

      • target: HTMLElement

        Click target

      Returns boolean

      • True if this click was handled, false otherwise
    • Protected

      Non-action context clicks

      Parameters

      • event: PointerEvent

        Triggering event

      • target: HTMLElement

        Click target

      Returns boolean

      • True if this click was handled, false otherwise
    • Internal

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

      Parameters

      • event: DragEvent
      • dropData: object

      Returns Promise<undefined | Partial<AnyObject>>

    • Internal

      Parameters

      • item: object

        Item render data

      • section: object

        Section configuration

      • context: object

        Render context

      Returns void

    • Internal

      Toggle Item Summary

      Parameters

      • elem: HTMLElement
      • 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<
          {
              actor: null
              | ActorPF;
              canClassLink: boolean;
              config: ./config.mjs;
              cssClass: string;
              data: any;
              document: ItemPF;
              editable: boolean;
              embedded: boolean;
              inContainer: boolean;
              isGM: boolean;
              item: ItemPF;
              itemType: string;
              labels: Record<string, string>;
              name: string;
              owned: boolean;
              owner: boolean;
              rollData: object;
              system: SystemOfType<"base" | ModuleSubType>;
              tag: any;
          },
      >

    • Internal

      Convert Currency

      Parameters

      • ...this: any
      • event: PointerEvent
      • target: HTMLElement

      Returns Promise<void>