import type WebMap from "../WebMap.js"; import type WebScene from "../WebScene.js"; import type Collection from "../core/Collection.js"; import type TableItem from "./TableItem.js"; import type { ReadonlyCollection } from "../core/Collection.js"; import type { EventedAccessor } from "../core/Evented.js"; import type { Action, State, TableListModelLayer, TableListModelProperties, TableItemModifier } from "./types.js"; /** @internal */ export interface TableListModelEvents {} /** * Provides list orchestration logic for table-list workflows. * * @internal */ export default class TableListModel extends EventedAccessor { /** @internal */ "@eventTypes": TableListModelEvents; /** @internal */ constructor(properties?: TableListModelProperties); /** * Whether to provide an indication if a layer is being published. * The [TableItem.publishing](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableItem/#publishing) property * is `false` when `checkPublishStatusEnabled` is `false`. * * @default false * @internal */ accessor checkPublishStatusEnabled: boolean; /** * Specifies a function that accesses each [TableItem](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableItem/). * Each list item can be modified according to its modifiable properties. * * @internal */ accessor listItemCreatedFunction: TableItemModifier | null | undefined; /** * Specifies whether to ignore the [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode) property of layers. * * @default false * @internal * @see [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode) */ accessor listModeDisabled: boolean; /** * Reference to the map containing tables. * * @internal */ accessor map: WebMap | WebScene | null | undefined; /** * The view model's state. * * @default "disabled" * @internal */ get state(): State; /** * The collection of [TableItem](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableItem/)s in the list. * * @internal */ get tableItems(): Collection; /** * A collection of [Layer](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/) instances that are tables. * * @internal */ accessor tables: ReadonlyCollection | null | undefined; /** * The total number of [tableItems](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableListModel/#tableItems) in the list. * * @internal */ get totalItems(): number; /** * Triggers an action associated with a table item. * * @param action - The action to execute. * @param item - An item associated with the action. * @internal */ triggerAction(action: Action, item: TableItem): void; }