UNPKG

@arcgis/map-components

Version:
623 lines (621 loc) • 28.6 kB
/// <reference types="@arcgis/core/interfaces.d.ts" /> /// <reference types="../../index.d.ts" /> import { Use } from '@arcgis/lumina/controllers'; import { default as FeatureTable } from '@arcgis/core/widgets/FeatureTable.js'; import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina'; import { PropertyValues } from 'lit'; import { ArcgisReferenceElement } from '../../utils/component-utils'; declare const useFeatureTableWidget: (component: LitElement & Pick<FeatureTable, "icon" | "label" | "viewModel" | "timeExtent" | "timeZone" | "description" | "layer" | "pageSize" | "layers" | "attributeTableTemplate" | "actionColumnConfig" | "attachmentsEnabled" | "definitionExpression" | "editingEnabled" | "filterBySelectionEnabled" | "filterGeometry" | "hiddenFields" | "highlightIds" | "initialSize" | "maxSize" | "menuConfig" | "multipleSortPriority" | "navigationScale" | "noDataMessage" | "objectIds" | "outFields" | "pageIndex" | "paginationEnabled" | "relatedRecordsEnabled" | "relatedTable" | "relatedTables" | "returnGeometryEnabled" | "returnMEnabled" | "returnZEnabled" | "rowHighlightIds" | "tableController" | "tableParent" | "tableTemplate"> & { state?: "loaded" | "ready" | "loading" | "disabled" | "error" | undefined; viewModel?: __esri.FeatureTableViewModel | undefined; closed?: boolean; icon: import('@arcgis/components-utils').Nil | string; label: import('@arcgis/components-utils').Nil | string; referenceElement?: ArcgisReferenceElement | string; position: __esri.UIPosition; arcgisReady: import('@arcgis/lumina').EventEmitter; arcgisPropertyChange: import('@arcgis/lumina').EventEmitter<{ name: string; }> | undefined; el: HTMLElement & { childElem?: HTMLElement & { ownedBy?: HTMLElement; }; view?: __esri.LinkChartView | __esri.MapView | __esri.SceneView; }; autoDestroyDisabled: boolean; destroy: () => Promise<void>; }) => FeatureTable; /** * The Feature Table component provides an interactive tabular view of each feature's attributes in a feature layer. * * [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-feature-table/) */ export declare class ArcgisFeatureTable extends LitElement { /** * A flattened array of all [attachment columns](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-AttachmentsColumn.html) within the table, including nested columns. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#attachmentsColumns) */ readonly attachmentsColumns: __esri.AttachmentsColumn[]; /** * Use this property to configure how columns display within the table in regard to visibility, column order, and sorting. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#attributeTableTemplate) */ attributeTableTemplate: nullish | __esri.AttributeTableTemplate; /** * Reference to the current [action column](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-ActionColumn.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#actionColumn) */ readonly actionColumn: nullish | __esri.ActionColumn; /** * Configuration for the [ActionColumn](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-ActionColumn.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#actionColumnConfig) */ actionColumnConfig: nullish | __esri.ActionColumnConfig; /** * A read-only property indicating the type of filter used by the table. * It returns either filters by geometry or selections using a row's object ID. */ readonly activeFilters: __esri.Collection<__esri.GeometryFilter | __esri.SelectionFilter>; /** * Use this read-only property if needing to query features while retaining * a column's sort order. * * @default [] */ readonly activeSortOrders: __esri.ColumnSortOrder[]; /** * A flattened array of all [columns](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-Column.html) within the table, including nested columns. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#allColumns) */ readonly allColumns: __esri.Column[]; /** * Indicates the table is displaying all related tables in "show all" mode. * * @default false */ readonly allRelatedTablesVisible: boolean; /** * A flattened array of all visible [columns](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-Column.html) within the table, including nested columns. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#allVisibleColumns) */ readonly allVisibleColumns: __esri.Column[]; /** * Indicates whether to display the `Attachments` field in the table. * * @default false */ attachmentsEnabled: boolean; /** * This read-only property provides the the configuration options for the attachments view. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#attachmentsViewOptions) */ readonly attachmentsViewOptions: __esri.AttachmentsViewOptions; /** * If true, the component will not be destroyed automatically when it is * disconnected from the document. This is useful when you want to move the * component to a different place on the page, or temporarily hide it. If this * is set, make sure to call the [destroy](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-feature-table/#destroy) method when you are done to * prevent memory leaks. * * @default false */ autoDestroyDisabled: boolean; /** * Indicates whether the table should automatically refresh when the underlying data changes * * @default false */ autoRefreshDisabled: boolean; /** * Indicates whether to enable the table's column performance mode. * This mode is designed to improve the performance of the table when working with a large number of columns. * * @default false */ columnPerformanceModeDisabled: boolean; /** * Indicates whether the table should allow reordering of columns. * * @default false */ columnReorderingDisabled: boolean; /** * A read-only collection of column, field, group, action, attachment, * and relationship columns that are displayed within the table. */ readonly columns: __esri.Collection<__esri.AttachmentsColumn | __esri.ActionColumn | __esri.Column | __esri.FieldColumn | __esri.GroupColumn | __esri.RelationshipColumn>; /** * The SQL where clause used to filter features visible in the table. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#definitionExpression) */ definitionExpression: string | nullish; /** * Text displayed in the table header, under the title. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#description) */ description: string | Function | nullish; /** * Indicates whether [editing](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#editing-in-featuretable) is enabled on the data within the feature table. * * @default false */ editingEnabled: boolean; /** Total number of records displayed in the table's current view. */ readonly effectiveSize: number; /** * A flattened array of all [field columns](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FieldColumn.html) within the table, including nested columns. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#fieldColumns) */ readonly fieldColumns: __esri.FieldColumn[]; /** * Indicates whether the table only displays rows that are considered selected. * * @default false */ filterBySelectionEnabled: boolean; /** * Set this property to filter the features displayed in the table. * * @default null */ filterGeometry: nullish | __esri.GeometryUnion; /** * A flattened array of all [group columns](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-Grid-GroupColumn.html) within the table. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#groupColumns) */ readonly groupColumns: __esri.GroupColumn[]; /** * Indicates whether to display descriptions in the header cells of individual columns. * * @default false */ hideColumnDescriptions: boolean | undefined; /** * A collection of string values which indicate [field.names](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html) that should be hidden within the table. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#hiddenFields) */ hiddenFields: __esri.Collection<string>; /** * Indicates whether to display the Sort Ascending menu item. * * @default false */ hideColumnMenuItemsSortAscending: boolean | undefined; /** * Indicates whether to display the Sort Descending menu item. * * @default false */ hideColumnMenuItemsSortDescending: boolean | undefined; /** * Indicates whether to display the menu items within the individual columns * * @default false */ hideColumnMenus: boolean | undefined; /** * Indicates whether to display the feature table's header information. * * @default false */ hideHeader: boolean | undefined; /** * Indicates whether to display layer-specific icons in the layer drop down menu. * * @default false */ hideLayerDropdownIcons: boolean | undefined; /** * Indicates whether to display the feature table's menu. * * @default false */ hideMenu: boolean | undefined; /** * Indicates whether to display the Clear selection menu item. * * @default false */ hideMenuItemsClearSelection: boolean | undefined; /** * Indicates whether to display the Delete Selection menu item. * * @default false */ hideMenuItemsDeleteSelection: boolean | undefined; /** * Indicates whether to display the Export selection to CSV menu item. * * @default false */ hideMenuItemsExportSelectionToCsv: boolean | undefined; /** * Indicates whether to display the Refresh data menu item. * * @default false */ hideMenuItemsRefreshData: boolean | undefined; /** * Indicates whether to toggle between showing only selected records in the table to showing all of the records. * * @default false */ hideMenuItemsSelectedRecordsShowAllToggle: boolean | undefined; /** * Indicates whether to display the Show selected records menu item. * * @default false */ hideMenuItemsSelectedRecordsShowSelectedToggle: boolean | undefined; /** * Indicates whether to enable toggling column visibility within the menu. * * @default false */ hideMenuItemsToggleColumns: boolean | undefined; /** * Indicates whether to display the Zoom to selected menu item. * * @default false */ hideMenuItemsZoomToSelection: boolean | undefined; /** * Indicates whether to display the progress indicator when the table is querying or syncing data. * * @default false */ hideProgress: boolean | undefined; /** * Indicates whether to display the selection column in the table. * Each row has a checkbox that selects its corresponding feature. * * @default false */ hideSelectionColumn: boolean | undefined; /** * Indicates whether to display the tooltip for the Show/hide columns button. * * @default false */ hideTooltips: boolean | undefined; /** * Indicates whether to highlight the associated feature when a row is selected by checking the corresponding checkbox. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#highlightEnabled) * * @default false */ highlightDisabled: boolean; /** * This property accepts and returns a collection of feature object IDs. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#highlightIds) */ highlightIds: __esri.Collection<string | number>; /** * The user-provided number of total features accessed from the data source. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#initialSize) */ initialSize: number | nullish; /** * Icon which represents the component. * Typically used when the component is controlled by another component (e.g. by the Expand component). * * @see [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/) * @default "table" */ icon: string; /** * A read-only property which indicates if the table is querying or syncing data. * * @default false */ readonly isQueryingOrSyncing: boolean; /** The components label. */ label: string; /** * The associated [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-catalog-CatalogFootprintLayer.html), [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html), [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html), [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html), * [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-knowledgeGraph-KnowledgeGraphSublayer.html), [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html), or [WFSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WFSLayer.html) containing the fields and attributes to display within the widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#layer) */ layer: nullish | __esri.FeatureLayer | __esri.SceneLayer | __esri.GeoJSONLayer | __esri.OrientedImageryLayer | __esri.WFSLayer | __esri.CSVLayer | __esri.ImageryLayer | __esri.Sublayer | __esri.CatalogFootprintLayer | __esri.KnowledgeGraphSublayer; /** * Portal Item Id for a layer to load. You can set, `layer`, `layerUrl`, or `itemId`, * but not more than one. */ layerItemId?: string; /** * Url for a layer to load. You can set, `layer`, `layerUrl`, or `itemId`, * but not more than one. */ layerUrl?: string; /** The layer view associated with the table's layer. */ readonly layerView: nullish | __esri.LayerView; /** * Group of layers displayed in the dropdown component in the table's header, * which allows changing what layer is currently displayed in the table. */ layers: nullish | (__esri.FeatureLayer | __esri.SceneLayer | __esri.GeoJSONLayer | __esri.WFSLayer | __esri.CSVLayer | __esri.ImageryLayer | __esri.CatalogFootprintLayer | __esri.KnowledgeGraphSublayer)[]; /** * This property is applicable when working with layers that contain a large number of features, as it provides the ability to limit the displayed total feature count. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#maxSize) */ maxSize: number | nullish; /** * Set this object to customize the feature table's menu content. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#menuConfig) */ menuConfig: nullish | __esri.TableMenuConfig; /** * Controls whether the table allows multiple selected rows. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#multipleSelectionEnabled) * * @default false */ multipleSelectionDisabled: boolean; /** * Indicates whether sorting multiple columns is supported within the table. * * @default false */ multipleSortEnabled: boolean; /** * This property can be used to determine how newly sorted columns are prioritized. * * @default "prepend" */ multipleSortPriority: "append" | "prepend"; /** * This property controls the scale of all components in the navigation bar displayed when * viewing attachments or related records. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#navigationScale) */ navigationScale: "s" | "m" | "l"; /** * This property can be used to override the text displayed when the table is fully loaded but no rows are available. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#noDataMessage) */ noDataMessage: string | nullish; /** * This property accepts and returns a collection of feature object IDs. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#objectIds) */ objectIds: __esri.Collection<string | number>; /** * An array of field names from the table's data source to include when the table requests data. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#outFields) */ outFields: nullish | string[]; /** * Number of pages of features to be displayed in the table, based on the total [number of features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#size) and configured [pageSize](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#pageSize). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#pageCount) */ readonly pageCount: number; /** * Represents the index of the page of the feature currently being displayed. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#pageIndex) */ pageIndex: number; /** * The default page size used when displaying features within the table. * * @default 50 */ pageSize: number; /** * Controls whether the table should only display a single page of features at any time. * * @default false */ paginationEnabled: boolean; /** @default "manual" */ position: __esri.UIPosition; /** * By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene. * * @see [Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component) */ referenceElement?: ArcgisReferenceElement | string; /** * Indicates whether to display any related records associated with rows within the table. * * @default false */ relatedRecordsEnabled: boolean; /** Reference to a nested table instance representing a relationship with another table. */ relatedTable: nullish | FeatureTable; /** * A collection of nested table instances. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#relatedTables) */ relatedTables: __esri.Collection<FeatureTable>; /** * A flattened array of all [relationship columns](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-RelationshipColumn.html) within the table, including nested columns. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#relationshipColumns) */ readonly relationshipColumns: __esri.RelationshipColumn[]; /** * Indicates whether to fetch geometries for the corresponding features displayed in the table. * * @default false */ returnGeometryEnabled: boolean; /** * Indicates whether geometries fetched for the corresponding features contain M values, if supported. * * @default false */ returnMEnabled: boolean; /** * Indicates whether the fetched features' geometries contain Z values. * * @default false */ returnZEnabled: boolean; /** * This property accepts and returns a collection of feature object IDs. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#rowHighlightIds) */ rowHighlightIds: __esri.Collection<string | number>; /** * Total number of records currently displayed in the table. * * @default 0 */ readonly size: number; /** * Indicates whether to display the feature table's layer switch drop down menu. * * @default false */ showLayerDropdown: boolean | undefined; /** * The current state of the component. * * @default "disabled" */ readonly state: "loaded" | "ready" | "loading" | "disabled" | "error"; /** * Indicates whether the table and associated layer support adding attachments with the current configuration. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#supportsAddAttachments) * * @default false */ readonly supportsAddAttachments: boolean; /** * Indicates whether the table and associated layer support viewing attachments with the current configuration. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#supportsAttachments) * * @default false */ readonly supportsAttachments: boolean; /** * Indicates whether the table and associated layer support deleting attachments with the current configuration. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#supportsDeleteAttachments) * * @default false */ readonly supportsDeleteAttachments: boolean; /** * Defines whether or not the feature supports resizing * attachments. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#supportsResizeAttachments) * * @default false */ readonly supportsResizeAttachments: boolean; /** * Indicates whether the table and associated layer support updating attachments with the current configuration. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#supportsUpdateAttachments) * * @default false */ readonly supportsUpdateAttachments: boolean; /** * Indicates whether the table should synchronize the current attributeTableTemplate * being used based on changes made to the table's UI. * * @default false */ syncTemplateOnChangesDisabled: boolean; /** Reference to top-level controller table, if this table is a related table, nested within and controlled by another table. */ tableController: nullish | FeatureTable; /** * Indicates whether the table is disabled. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#disabled) * * @default false */ tableDisabled: boolean; /** Reference to a table instance that this table is directly related to. */ tableParent: nullish | FeatureTable; /** * The associated [template](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-TableTemplate.html) used for the feature table. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#tableTemplate) */ tableTemplate: nullish | __esri.TableTemplate; /** * The [TimeExtent](https://developers.arcgis.com/javascript/latest/api-reference/esri-time-TimeExtent.html) in which to filter and display data within the FeatureTable widget. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#timeExtent) */ timeExtent: nullish | __esri.TimeExtent; /** * Dates and times displayed in the widget will be in terms of this time zone. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#timeZone) */ timeZone: string | nullish; /** * A flattened array of all top-level visible columns. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#visibleColumns) */ readonly visibleColumns: __esri.Column[]; deleteSelection(showWarningPrompt?: boolean): Promise<void>; /** Permanently destroy the component. */ destroy(): Promise<void>; exportSelectionToCSV(includeGeometry?: boolean): Promise<void>; findColumn(fieldName: string): Promise<__esri.ActionColumn | __esri.AttachmentsColumn | __esri.Column | __esri.GroupColumn | __esri.RelationshipColumn | nullish>; goToPage(index: number): Promise<void>; hideColumn(fieldName: string): Promise<void>; nextPage(): Promise<void>; previousPage(): Promise<void>; refresh(): Promise<void>; scrollToBottom(): Promise<void>; scrollToIndex(index: number): Promise<void>; scrollToLeft(): Promise<void>; scrollToRow(objectId: number): Promise<void>; scrollToTop(): Promise<void>; showAllColumns(): Promise<void>; showColumn(fieldName: string): Promise<void>; sortColumn(path: string, direction: "asc" | "desc"): Promise<void>; zoomToSelection(): Promise<void>; readonly arcgisCellClick: TargetedEvent<this, __esri.FeatureTableCellClickEvent>; readonly arcgisCellKeydown: TargetedEvent<this, __esri.FeatureTableCellKeydownEvent>; readonly arcgisCellPointerout: TargetedEvent<this, __esri.FeatureTableCellPointeroutEvent>; readonly arcgisCellPointerover: TargetedEvent<this, __esri.FeatureTableCellPointeroverEvent>; readonly arcgisColumnReorder: TargetedEvent<this, __esri.FeatureTableColumnReorderEvent>; /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */ readonly arcgisPropertyChange: TargetedEvent<this, { name: "state" | "size" | "effectiveSize" | "isQueryingOrSyncing" | "layerView"; }>; /** Emitted when the component associated with a map or scene view is is ready to be interacted with. */ readonly arcgisReady: TargetedEvent<this, void>; readonly arcgisSelectionChange: TargetedEvent<this, __esri.CollectionChangeEvent<string | number>>; } export {};