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

    Accessors

    Methods

    Constructors

    Properties

    _activeEdits: Record<string, string> = {}
    _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
    _warnedAppV1: boolean = true
    EDIT_TRACKING: string[] = ...

    Which fields to track edits for

    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

      Toggle inline display of an item's summary/description by expanding or hiding info div

      Parameters

      • event: ClickEvent<HTMLElement, any, any, any>

        The click event on the item

      Returns Promise<void>

    • Internal

      Parameters

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

        Additional options

      Returns Promise<void>

    • Internal

      Parameters

      • item: object

        Item render data

      • section: object

        Section configuration

      • context: object

        Render context

      Returns void

    • Parameters

      • event: any
      • add: number = 1

      Returns Promise<undefined | Item<"base" | ModuleSubType>>

    • 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;
              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;
          },
      >