/// import type FeatureLayer from "@arcgis/core/layers/FeatureLayer.js"; import type MapView from "@arcgis/core/views/MapView.js"; import type { AppLayout, IDeleteIds, IMapInfo } from "../../utils/interfaces.js"; import type { PublicLitElement as LitElement } from "@arcgis/lumina"; import type { T9nMeta } from "@arcgis/lumina/controllers"; export abstract class LayerTable extends LitElement { /** * Contains the translations for this component. * All UI strings should be defined here. * * @internal */ protected _translations: { clearSelection: string; delete: string; exportCSV: string; filter: string; filters: string; hideField: string; more: string; selectAll: string; share: string; showSelected: string; switchSelected: string; zoom: string; editMultiple: string; fetchingData: string; refresh: string; showAll: string; recordsSelected: string; recordsTotal: string; moreOptions: string; showHideColumns: string; searchPlaceholder: string; photosAndFiles: string; attachments: string; relatedRecords: string; featureEditLimitNotice: string; copy: string; paste: string; } & T9nMeta<{ clearSelection: string; delete: string; exportCSV: string; filter: string; filters: string; hideField: string; more: string; selectAll: string; share: string; showSelected: string; switchSelected: string; zoom: string; editMultiple: string; fetchingData: string; refresh: string; showAll: string; recordsSelected: string; recordsTotal: string; moreOptions: string; showHideColumns: string; searchPlaceholder: string; photosAndFiles: string; attachments: string; relatedRecords: string; featureEditLimitNotice: string; copy: string; paste: string; }>; /** AppLayout: the current app layout */ accessor appLayout: AppLayout | undefined; /** string: Global ID of the feature to select */ accessor defaultGlobalId: string[]; /** * string: when provided this layer ID will be used when the app loads * * @default '' */ accessor defaultLayerId: string; /** number: when provided this will be used to select a feature in the table by default */ accessor defaultOid: number[]; /** * boolean: when true the layer table will auto refresh the data * * @default false */ accessor enableAutoRefresh: boolean; /** * boolean: when true the layer table will support drag/drop of columns to adjust order * * @default true */ accessor enableColumnReorder: boolean; /** * boolean: when true the export to csv button will be available * * @default false */ accessor enableCSV: boolean; /** * boolean: when true edits can be applied directly within the table * * @default false */ accessor enableInlineEdit: boolean; /** * boolean: when true the share widget will be available * * @default false */ accessor enableShare: boolean; /** * boolean: when true the inline editing will be auto saved * * @default true */ accessor enableTableAutosave: boolean; /** * string: Selection mode for the feature selection * * @default 'multiple' */ accessor featureSelectionMode: string; /** * boolean: when true we will honor field order and visibility that may have been defined * in the map viewer if no field order is defined in the mapInfo. * * Field order defined in the mapInfo as would be the case for Instant App configurations * will always override this map level setting. * * @default false */ accessor honorMapFieldSettings: boolean; /** * When true the component will render an optimized view for mobile devices * * @default false */ accessor isMobile: boolean; /** string[]: list of layer ids allowed for adding event listeners when editing applied */ accessor layerIds: string[]; /** * boolean: when true the map is hidden and map specific controls should be hidden * * @default false */ accessor mapHidden: boolean; /** IMapInfo: key configuration details about the current map */ accessor mapInfo: IMapInfo | undefined; /** esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html */ accessor mapView: MapView | undefined; /** * boolean: When true the paste action will be enabled * * @default false */ accessor pasteEnabled: boolean; /** number[]: A list of ids that are currently selected */ accessor selectedIds: (number | string)[]; /** number[]: A list of ids selected ids from related records */ accessor selectedRelatedIds: number[]; /** * boolean: When true the share options will include embed option * * @default false */ accessor shareIncludeEmbed: boolean; /** * boolean: When true the share options will include social media sharing * * @default false */ accessor shareIncludeSocial: boolean; /** * boolean: When true the copy and paste actions will be shown * * @default false */ accessor showCopyPasteActions: boolean; /** * boolean: when true the table will be sorted by objectid in descending order by default * * @default false */ accessor showNewestFirst: boolean; /** * boolean: When true only editable layers that support the update capability will be available * * @default false */ accessor showOnlyUpdatableLayers: boolean; /** * boolean: When true the selected feature will zoomed to in the map and the row will be scrolled to within the table * * @default false */ accessor zoomAndScrollToSelected: boolean; /** number: default scale to zoom to when zooming to a single point feature */ accessor zoomToScale: number | undefined; /** Closes the filter */ closeFilter(): Promise; /** Reset the filter */ filterReset(): Promise; /** * Updates the filter * * @param filterActive * @param keepTableUpdatingOnMapExtentChange */ filterUpdate(filterActive: boolean, keepTableUpdatingOnMapExtentChange?: boolean): Promise; /** Returns true when any table filter is active */ isFilterActive(): boolean; /** refresh the feature table */ refresh(): Promise; /** * Set column templates with an ordered collection * * @param columnTemplates */ setColumnOrder(columnTemplates: any): Promise; /** Validate if the editor has any pending edits */ validateActiveEdits(): Promise; /** * Validate if the table should update * * @param shouldUpdateTableOnExtentChange */ validateTableUpdate(shouldUpdateTableOnExtentChange: boolean): Promise; /** Emitted before the feature selection changes */ readonly beforeFeatureSelectionChange: import("@arcgis/lumina").TargetedEvent; /** Emitted when the user click/drags a column */ readonly columnReorder: import("@arcgis/lumina").TargetedEvent; /** Emitted when the continue editing is clicked when discard message is shown */ readonly continueEditing: import("@arcgis/lumina").TargetedEvent; /** Emitted on demand when copy action is clicked */ readonly copyFeatures: import("@arcgis/lumina").TargetedEvent; /** Emitted on demand when edit multiple action is clicked */ readonly editMultipleFeatures: import("@arcgis/lumina").TargetedEvent; /** Emitted when features are added to the layer */ readonly featuresAdded: import("@arcgis/lumina").TargetedEvent; /** Emitted on demand when a layer is selected */ readonly featureSelectionChange: import("@arcgis/lumina").TargetedEvent; /** Emitted when the create feature component should be shown */ readonly initCreateComponent: import("@arcgis/lumina").TargetedEvent; /** Emitted on demand when paste action is clicked */ readonly pasteFeatures: import("@arcgis/lumina").TargetedEvent; /** Emitted when related record toggled from related table */ readonly relatedRecordToggled: import("@arcgis/lumina").TargetedEvent; /** Emitter when features are pasted to different layer and requested layer selection change */ readonly requestLayerSelectionChange: import("@arcgis/lumina").TargetedEvent; /** Emitted on demand when when the delete dialog should be shown */ readonly showDelete: import("@arcgis/lumina").TargetedEvent; /** Emitted on demand when filter action is clicked */ readonly toggleFilter: import("@arcgis/lumina").TargetedEvent; readonly "@eventTypes": { beforeFeatureSelectionChange: LayerTable["beforeFeatureSelectionChange"]["detail"]; columnReorder: LayerTable["columnReorder"]["detail"]; continueEditing: LayerTable["continueEditing"]["detail"]; copyFeatures: LayerTable["copyFeatures"]["detail"]; editMultipleFeatures: LayerTable["editMultipleFeatures"]["detail"]; featuresAdded: LayerTable["featuresAdded"]["detail"]; featureSelectionChange: LayerTable["featureSelectionChange"]["detail"]; initCreateComponent: LayerTable["initCreateComponent"]["detail"]; pasteFeatures: LayerTable["pasteFeatures"]["detail"]; relatedRecordToggled: LayerTable["relatedRecordToggled"]["detail"]; requestLayerSelectionChange: LayerTable["requestLayerSelectionChange"]["detail"]; showDelete: LayerTable["showDelete"]["detail"]; toggleFilter: LayerTable["toggleFilter"]["detail"]; }; }