import type Layer from "../../../layers/Layer.js"; import type ItemBase from "./ItemBase.js"; import type { SelectableSublayerUnion } from "../../../views/selection/types.js"; import type { ItemBaseProperties } from "./ItemBase.js"; import type { ParentItem, SelectionListParentLayerUnion, SyncOptions } from "./types.js"; /** Properties used to construct a GroupLayerItem instance. */ export interface GroupLayerItemProperties extends ItemBaseProperties, Partial> { /** Layer containing the sublayer that contains the selected features. */ layer?: SelectionListParentLayerUnion; } /** Required properties used to construct a GroupLayerItem instance. */ export type RequiredConstructProperties = Pick; /** * An item representing a group layer in the [selection list](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-selection-list/). * * @since 5.2 */ export default class GroupLayerItem extends ItemBase { constructor(properties: GroupLayerItemProperties); /** * Indicates whether the item is expanded in the [selection list](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-selection-list/). * * @default true */ accessor expanded: boolean; /** Indicates this item contains at least one child item representing a table layer. */ get isTable(): boolean; /** Set of child layer items. Can also be another GroupLayerItem in the case of [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SubtypeGroupLayer/) or [KnowledgeGraphLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/KnowledgeGraphLayer/). */ get items(): ParentItem[]; /** Layer containing the sublayer that contains the selected features. */ get layer(): SelectionListParentLayerUnion; /** * Indicates the layer and at least one of its child layers are visible on the map. * * @since 5.2 */ get layerIsVisible(): boolean; /** Convenience property for all child layers and tables on the parent group layer. */ get layers(): Layer[] | SelectableSublayerUnion[] | SelectionListParentLayerUnion[]; /** * Indicates this group item contains at least one [layer item](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/SelectionList/LayerItem/) that is displaying a * subset of selected features due to an upper maximum limit. */ get maxVisibleFeatureCountExceeded(): boolean; /** * Count representing the number of selected features. This value includes features * hidden by local filters, but are still selected according to the associated * [selection manager](https://developers.arcgis.com/javascript/latest/references/core/views/SelectionManager/). */ get total(): number; /** Indicates this group layer item is visible in the [selection list](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-selection-list/), due to one or more child items being visible. */ get visible(): boolean; /** Total number of visible features accounting for any filters and [LayerItem.maxVisibleFeatureCountPerLayer](https://developers.arcgis.com/javascript/latest/references/core/widgets/support/SelectionList/LayerItem/#maxVisibleFeatureCountPerLayer). */ get visibleTotal(): number; /** * Empties current feature item caches on child layer items. * * @internal */ reset(): void; /** * Method used to load or resync relevant item data. * * @param options - Options used to control the sync operation. * @returns Promise resolving when the sync operation is complete. * @internal */ sync(options: SyncOptions): Promise; }