@arcgis/core 5.2.0-next.139 → 5.2.0-next.140

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/arcgisGlobal.d.ts +10 -10
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{86d8ccb795611cd6d071.js → 00a600c71ceebe7bfeee.js} +1 -1
  4. package/assets/esri/core/workers/chunks/0193df3f9fb23633da87.js +1 -0
  5. package/assets/esri/core/workers/chunks/{3a0b19275751a3a73cd5.js → 07aa6d36f1006b6ab7ff.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{a054da6cbd8ee4774a57.js → 1f3148cebee1961249a4.js} +1 -1
  7. package/assets/esri/core/workers/chunks/222af8522773c7dc80b1.js +1 -0
  8. package/assets/esri/core/workers/chunks/{a4d0df0177ac28e42219.js → 303fde8f3459dde16555.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{51dd6df99dfe443df218.js → 350540770781b281c39a.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{f5f4521119d2ce2465d7.js → 3b017b718ea2d4ed498f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{1bf5e4b56c32a853f200.js → 3e81dfc9d621ece038fe.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{685cef5d2245450dc695.js → 4097edb2ad522dff50ce.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{2398d1ee310bbbc1e20c.js → 4d82db661365daa513a6.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{544a1326c12e71b33dd8.js → 641d196a554bd07f729e.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{dce78ea26d078d9c4667.js → 798a63653f82c0e842c5.js} +1 -1
  16. package/assets/esri/core/workers/chunks/84fcbf7a1d04f01685d1.js +1 -0
  17. package/assets/esri/core/workers/chunks/{459d5dca9c915b13cfce.js → 8e511079918e2fd9261f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{0a8463fe687d3193dd8b.js → fc5a36e54929e03efa86.js} +1 -1
  19. package/assets/esri/libs/librust-parquet/pkg/parquet_bg.wasm +0 -0
  20. package/config.js +1 -1
  21. package/kernel.js +1 -1
  22. package/{layers/list/BasemapItemCollection.d.ts → layerList/BasemapLayerListModel.d.ts} +14 -14
  23. package/layerList/BasemapLayerListModel.js +2 -0
  24. package/{layers/list/CatalogItemCollection.d.ts → layerList/CatalogLayerListModel.d.ts} +15 -15
  25. package/layerList/CatalogLayerListModel.js +2 -0
  26. package/{layers/list → layerList}/Item.d.ts +22 -22
  27. package/layerList/Item.js +2 -0
  28. package/{layers/list → layerList}/ItemPanel.d.ts +3 -3
  29. package/layerList/ItemPanel.js +2 -0
  30. package/{layers/list/LayerItemCollection.d.ts → layerList/LayerListModel.d.ts} +16 -16
  31. package/layerList/LayerListModel.js +2 -0
  32. package/{layers/list → layerList}/TableItem.d.ts +11 -11
  33. package/layerList/TableItem.js +2 -0
  34. package/{layers/list → layerList}/TableItemPanel.d.ts +2 -2
  35. package/layerList/TableItemPanel.js +2 -0
  36. package/{layers/list/TableItemCollection.d.ts → layerList/TableListModel.d.ts} +15 -15
  37. package/layerList/TableListModel.js +2 -0
  38. package/{layers/list → layerList}/types.d.ts +29 -29
  39. package/layers/support/LabelExpressionInfo.d.ts +7 -1
  40. package/layers/support/LabelExpressionInfo.js +1 -1
  41. package/package.json +2 -2
  42. package/popup/{FeatureContent.d.ts → FeatureModel.d.ts} +11 -11
  43. package/popup/{FeatureContent.js → FeatureModel.js} +1 -1
  44. package/popup/{FeatureContentCollection.d.ts → FeaturesModel.d.ts} +62 -62
  45. package/popup/FeaturesModel.js +2 -0
  46. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +2 -0
  47. package/widgets/DirectionalPad/types.d.ts +5 -1
  48. package/widgets/DirectionalPad.d.ts +1 -0
  49. package/widgets/Feature/FeatureViewModel.d.ts +1 -1
  50. package/widgets/Feature/FeatureViewModel.js +1 -1
  51. package/widgets/Features/FeaturesViewModel.d.ts +2 -2
  52. package/widgets/Features/FeaturesViewModel.js +1 -1
  53. package/widgets/LayerList/LayerListViewModel.d.ts +4 -4
  54. package/widgets/LayerList/LayerListViewModel.js +1 -1
  55. package/widgets/LayerList/ListItem.d.ts +5 -5
  56. package/widgets/LayerList/ListItemPanel.d.ts +4 -4
  57. package/widgets/LayerList/types.d.ts +7 -7
  58. package/widgets/Popup/PopupViewModel.d.ts +1 -1
  59. package/widgets/Popup/PopupViewModel.js +1 -1
  60. package/widgets/support/SelectionList/FeatureItem.d.ts +9 -2
  61. package/assets/esri/core/workers/chunks/069bd90cbb7377e2e4bc.js +0 -1
  62. package/assets/esri/core/workers/chunks/f3214bccb039338acadf.js +0 -1
  63. package/assets/esri/core/workers/chunks/fd2cea0761587adaa6c9.js +0 -1
  64. package/layers/list/BasemapItemCollection.js +0 -2
  65. package/layers/list/CatalogItemCollection.js +0 -2
  66. package/layers/list/Item.js +0 -2
  67. package/layers/list/ItemPanel.js +0 -2
  68. package/layers/list/LayerItemCollection.js +0 -2
  69. package/layers/list/TableItem.js +0 -2
  70. package/layers/list/TableItemCollection.js +0 -2
  71. package/layers/list/TableItemPanel.js +0 -2
  72. package/popup/FeatureContentCollection.js +0 -2
  73. /package/{layers/list → layerList}/support/layerListUtils.js +0 -0
@@ -1,16 +1,16 @@
1
- import type Collection from "../../core/Collection.js";
2
- import type CatalogLayer from "../CatalogLayer.js";
1
+ import type Collection from "../core/Collection.js";
3
2
  import type Item from "./Item.js";
4
- import type { EventedAccessor } from "../../core/Evented.js";
5
- import type { LayerItemCollectionEvents } from "./LayerItemCollection.js";
3
+ import type CatalogLayer from "../layers/CatalogLayer.js";
4
+ import type { EventedAccessor } from "../core/Evented.js";
5
+ import type { LayerListModelEvents } from "./LayerListModel.js";
6
6
  import type { Action, ItemModifier, State, ItemProperties } from "./types.js";
7
- import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
8
- import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
7
+ import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
8
+ import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
9
9
 
10
10
  /** @internal */
11
- export interface CatalogItemCollectionProperties extends Partial<Pick<CatalogItemCollection, "catalogLayer" | "checkPublishStatusEnabled" | "listItemCreatedFunction" | "listModeDisabled" | "view">> {
11
+ export interface CatalogLayerListModelProperties extends Partial<Pick<CatalogLayerListModel, "catalogLayer" | "checkPublishStatusEnabled" | "listItemCreatedFunction" | "listModeDisabled" | "view">> {
12
12
  /**
13
- * The collection of [Items](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/) representing the
13
+ * The collection of [Items](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/) representing the
14
14
  * catalog layer's dynamic-group layers.
15
15
  *
16
16
  * @internal
@@ -19,20 +19,20 @@ export interface CatalogItemCollectionProperties extends Partial<Pick<CatalogIte
19
19
  }
20
20
 
21
21
  /** @internal */
22
- export interface CatalogItemCollectionEvents extends LayerItemCollectionEvents {}
22
+ export interface CatalogLayerListModelEvents extends LayerListModelEvents {}
23
23
 
24
24
  /**
25
25
  * Provides list orchestration logic for catalog-layer list workflows.
26
26
  *
27
27
  * @internal
28
28
  */
29
- export default class CatalogItemCollection extends EventedAccessor {
29
+ export default class CatalogLayerListModel extends EventedAccessor {
30
30
  /** @internal */
31
- "@eventTypes": CatalogItemCollectionEvents;
31
+ "@eventTypes": CatalogLayerListModelEvents;
32
32
  /** @internal */
33
- constructor(properties?: CatalogItemCollectionProperties);
33
+ constructor(properties?: CatalogLayerListModelProperties);
34
34
  /**
35
- * The collection of [Items](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/) representing the
35
+ * The collection of [Items](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/) representing the
36
36
  * catalog layer's dynamic-group layers.
37
37
  *
38
38
  * @internal
@@ -47,7 +47,7 @@ export default class CatalogItemCollection extends EventedAccessor {
47
47
  accessor catalogLayer: CatalogLayer | null | undefined;
48
48
  /**
49
49
  * Whether to provide an indication if a layer is being published.
50
- * The [Item.publishing](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#publishing) property
50
+ * The [Item.publishing](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/#publishing) property
51
51
  * is `false` if `checkPublishStatusEnabled` is `false`.
52
52
  *
53
53
  * @default false
@@ -55,7 +55,7 @@ export default class CatalogItemCollection extends EventedAccessor {
55
55
  */
56
56
  accessor checkPublishStatusEnabled: boolean;
57
57
  /**
58
- * A function that executes each time a [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/) is created.
58
+ * A function that executes each time a [Item](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/) is created.
59
59
  *
60
60
  * @internal
61
61
  */
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{EventedAccessor as n}from"../core/Evented.js";import{watch as r,initial as i,on as a}from"../core/reactiveUtils.js";import{property as o,subclass as s}from"../core/accessorSupport/decorators.js";import c from"./Item.js";import{findLayerListMode as l}from"./support/layerListUtils.js";const u={layerListMode:`layer-list-mode`},d=t.ofType(c);let f=class extends n{constructor(e){super(e),this.catalogItems=new d,this.catalogLayer=null,this.checkPublishStatusEnabled=!1,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.view=null}initialize(){this.addHandles([r(()=>[this.catalogLayer?.loaded,this.view?.ready],()=>this._compileList(),i),a(()=>this.catalogLayer?.dynamicGroupLayer.layers,`change`,()=>this._compileList()),r(()=>[this.listItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._recompileList())])}destroy(){this.view=null,this._removeAllItems()}get state(){let{view:e,catalogLayer:t}=this;return e?.ready&&t?.loaded?`ready`:e&&t?`loading`:`disabled`}get totalItems(){return this.catalogItems.flatten(e=>e.children).length}triggerAction(e,t){e&&!e.disabled&&this.emit(`trigger-action`,{action:e,item:t})}_compileList(){let{catalogLayer:e}=this;if(!e?.loaded)return;let t=e.dynamicGroupLayer.layers;this._watchLayersListMode(t);let n=this._getViewableLayers(t);if(!n?.length){this._removeAllItems();return}this._createNewItems(n),this._removeItems(n),this._sortItems(n)}_createItem(e){let{view:t,listItemCreatedFunction:n,checkPublishStatusEnabled:r,listModeDisabled:i}=this;return new c({checkPublishStatusEnabled:r,layer:e,listItemCreatedFunction:n,listModeDisabled:i,view:t})}_createNewItems(e){let{catalogItems:t}=this;e.forEach(e=>{t.some(t=>t.layer===e)||t.add(this._createItem(e))})}_getViewableLayers(e){return e?this.listModeDisabled?e:e.filter(e=>l(e)!==`hide`):void 0}_recompileList(){this._removeAllItems(),this._compileList()}_removeAllItems(){this.catalogItems.destroyAll()}_removeItems(e){let{catalogItems:t}=this,n=[];t.forEach(t=>{t&&e?.includes(t.layer)||n.push(t)}),t.destroyMany(n)}_sortItems(e){let{catalogItems:t}=this;t.sort((t,n)=>{let r=e.indexOf(t.layer),i=e.indexOf(n.layer);return r>i?-1:+(r<i)})}_watchLayersListMode(e){this.removeHandles(u.layerListMode),e&&!this.listModeDisabled&&this.addHandles(r(()=>e.filter(e=>`listMode`in e).map(e=>e.listMode).toArray(),()=>this._compileList()),u.layerListMode)}};e([o({type:d})],f.prototype,`catalogItems`,void 0),e([o()],f.prototype,`catalogLayer`,void 0),e([o()],f.prototype,`checkPublishStatusEnabled`,void 0),e([o()],f.prototype,`listItemCreatedFunction`,void 0),e([o({nonNullable:!0})],f.prototype,`listModeDisabled`,void 0),e([o({readOnly:!0})],f.prototype,`state`,null),e([o()],f.prototype,`totalItems`,null),e([o()],f.prototype,`view`,void 0),f=e([s(`esri.layerList.CatalogLayerListModel`)],f);const p=f;export{p as default};
@@ -1,18 +1,18 @@
1
- import type Accessor from "../../core/Accessor.js";
2
- import type Collection from "../../core/Collection.js";
3
- import type EsriError from "../../core/Error.js";
4
- import type Layer from "../Layer.js";
5
- import type SubtypeGroupLayer from "../SubtypeGroupLayer.js";
1
+ import type Accessor from "../core/Accessor.js";
2
+ import type Collection from "../core/Collection.js";
3
+ import type EsriError from "../core/Error.js";
6
4
  import type ItemPanel from "./ItemPanel.js";
7
- import type Sublayer from "../support/Sublayer.js";
8
- import type SubtypeSublayer from "../support/SubtypeSublayer.js";
9
- import type LayerView from "../../views/layers/LayerView.js";
10
- import type { IdentifiableMixin } from "../../core/Identifiable.js";
5
+ import type Layer from "../layers/Layer.js";
6
+ import type SubtypeGroupLayer from "../layers/SubtypeGroupLayer.js";
7
+ import type Sublayer from "../layers/support/Sublayer.js";
8
+ import type SubtypeSublayer from "../layers/support/SubtypeSublayer.js";
9
+ import type LayerView from "../views/layers/LayerView.js";
10
+ import type { IdentifiableMixin } from "../core/Identifiable.js";
11
11
  import type { Action, ConnectedLayerView, ItemContent, ItemModifier, ItemProperties, ItemVisibilityMode, SpatiallyReferencedLayerView, State, ItemPanelProperties } from "./types.js";
12
- import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
13
- import type { ActionToggleProperties } from "../../support/actions/ActionToggle.js";
14
- import type { ActionButtonProperties } from "../../support/actions/ActionButton.js";
15
- import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
12
+ import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
13
+ import type { ActionToggleProperties } from "../support/actions/ActionToggle.js";
14
+ import type { ActionButtonProperties } from "../support/actions/ActionButton.js";
15
+ import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
16
16
 
17
17
  /**
18
18
  * Represents the state of one entry in a layer-list workflow.
@@ -26,7 +26,7 @@ import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
26
26
  *
27
27
  * @beta
28
28
  * @since 5.2
29
- * @see [ItemPanel](https://developers.arcgis.com/javascript/latest/references/core/layers/list/ItemPanel/)
29
+ * @see [ItemPanel](https://developers.arcgis.com/javascript/latest/references/core/layerList/ItemPanel/)
30
30
  */
31
31
  export default class Item extends ItemSuperclass {
32
32
  constructor(properties?: ItemProperties);
@@ -36,7 +36,7 @@ export default class Item extends ItemSuperclass {
36
36
  * @default false
37
37
  */
38
38
  accessor actionsExpanded: boolean;
39
- /** Backward-compatible alias of [actionsExpanded](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#actionsExpanded). */
39
+ /** Backward-compatible alias of [actionsExpanded](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/#actionsExpanded). */
40
40
  accessor actionsOpen: boolean;
41
41
  /**
42
42
  * A collection of action sections that can be triggered on the item.
@@ -45,7 +45,7 @@ export default class Item extends ItemSuperclass {
45
45
  get actionsSections(): Collection<Collection<Action>>;
46
46
  set actionsSections(value: ReadonlyArrayOrCollection<ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>>);
47
47
  /**
48
- * Enables publish-status checks used by [publishing](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#publishing).
48
+ * Enables publish-status checks used by [publishing](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/#publishing).
49
49
  * When enabled, the item observes the associated layer's publishing status.
50
50
  *
51
51
  * @default false
@@ -70,7 +70,7 @@ export default class Item extends ItemSuperclass {
70
70
  /**
71
71
  * The connection status of the associated [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/) when its layer view exposes
72
72
  * [StreamLayerView.connectionStatus](https://developers.arcgis.com/javascript/latest/references/core/views/layers/StreamLayerView/#connectionStatus). This status takes precedence over
73
- * [updating](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#updating) for stream layers.
73
+ * [updating](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/#updating) for stream layers.
74
74
  */
75
75
  get connectionStatus(): ConnectedLayerView["connectionStatus"] | null | undefined;
76
76
  /** Identifies the content represented by this item: a layer, a track-info part, or a telemetry-display element. */
@@ -101,7 +101,7 @@ export default class Item extends ItemSuperclass {
101
101
  /** The layer represented by this item. */
102
102
  accessor layer: Layer | Sublayer | SubtypeSublayer | SubtypeGroupLayer | null;
103
103
  /**
104
- * The [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) displaying the associated [layer](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#layer), if available.
104
+ * The [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) displaying the associated [layer](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/#layer), if available.
105
105
  * Subtype and sublayer items resolve to the layer view of their root layer where applicable.
106
106
  */
107
107
  get layerView(): LayerView | SpatiallyReferencedLayerView | ConnectedLayerView | null | undefined;
@@ -120,7 +120,7 @@ export default class Item extends ItemSuperclass {
120
120
  * @see [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode)
121
121
  */
122
122
  accessor listModeDisabled: boolean;
123
- /** Backward-compatible alias of [expanded](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#expanded). */
123
+ /** Backward-compatible alias of [expanded](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/#expanded). */
124
124
  accessor open: boolean;
125
125
  /**
126
126
  * Additional panel state associated with this item.
@@ -131,9 +131,9 @@ export default class Item extends ItemSuperclass {
131
131
  /** The parent item, if this item is nested. */
132
132
  accessor parent: Item | null | undefined;
133
133
  /**
134
- * Indicates whether [layer](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#layer) is being published.
134
+ * Indicates whether [layer](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/#layer) is being published.
135
135
  * The value is `false` when the layer is not publishing or
136
- * [checkPublishStatusEnabled](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#checkPublishStatusEnabled) is `false`.
136
+ * [checkPublishStatusEnabled](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/#checkPublishStatusEnabled) is `false`.
137
137
  *
138
138
  * @default false
139
139
  */
@@ -194,7 +194,7 @@ export default class Item extends ItemSuperclass {
194
194
  /**
195
195
  * Creates a deep clone of this item, including its child items and action sections.
196
196
  *
197
- * @returns A clone of the new [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/) instance.
197
+ * @returns A clone of the new [Item](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/) instance.
198
198
  */
199
199
  clone(): Item;
200
200
  /**
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import t from"../core/Accessor.js";import{isSome as n}from"../core/arrayUtils.js";import r from"../core/Collection.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import{watch as a,initial as o}from"../core/reactiveUtils.js";import{property as s,cast as c,subclass as l}from"../core/accessorSupport/decorators.js";import{ensureType as u}from"../core/accessorSupport/ensureType.js";import{get as d}from"../core/accessorSupport/get.js";import f from"./ItemPanel.js";import{isLayerOutsideScaleRange as p,findLayerVisibilityMode as m,findLayerListMode as h,canDisplayLayer as g,getNormalizedChildLayerProperty as _}from"./support/layerListUtils.js";import{telemetryDisplayPropertyNames as v}from"../layers/support/telemetryDisplayUtils.js";import{trackInfoPartPropertyNames as y}from"../layers/support/trackInfoUtils.js";import b from"../support/actions/ActionBase.js";import x from"../support/actions/ActionButton.js";import S from"../support/actions/ActionToggle.js";var C;const w=r.ofType({key:`type`,defaultKeyValue:`button`,base:b,typeMap:{button:x,toggle:S}}),T=r.ofType(w);function E(e){return e?.type===`csv`||e?.type===`feature`||e?.type===`geojson`||e?.type===`ogc-feature`||e?.type===`stream`}function D(e){return e?.type===`video`}const O=`layer`,k=`child-list-mode`;let A=C=class extends i(t){constructor(e){super(e),this.actionsExpanded=!1,this.actionsSections=new T,this.checkPublishStatusEnabled=!1,this.children=new(r.ofType(C)),this.childrenSortable=!0,this.content={type:`layer`},this.expanded=!1,this.hidden=!1,this.layer=null,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.parent=null,this.view=null}initialize(){if(this.addHandles([a(()=>[this.layer,this.layer?.listMode,this.listModeDisabled],()=>this._watchLayerProperties(this.layer),o),a(()=>this.checkPublishStatusEnabled,e=>this._updateChildrenPublishing(e),o),a(()=>this.view,e=>this._updateChildrenView(e),o),a(()=>this.panel,e=>this._setItemOnPanel(e),o),a(()=>{let e=this.layer,t=E(e)?e.trackInfo:null;return[e,t,t?.enabled]},()=>this._compileTrackInfoChildren(),o),a(()=>{let e=this.layer;return[e,D(e)?e.telemetryDisplay:null]},()=>this._compileTelemetryDisplayChildren(),o)]),typeof this.listItemCreatedFunction==`function`){let e={item:this};this.listItemCreatedFunction.call(null,e)}}destroy(){this.panel?.destroy(),this.children.destroyAll(),this.view=null}get actionsOpen(){return this.actionsExpanded}set actionsOpen(e){this.actionsExpanded=e}get connectionStatus(){let{layerView:e,publishing:t}=this;if(!t&&e&&`connectionStatus`in e)return e.connectionStatus}get error(){return this.layer?.loadError}get incompatible(){let{layerView:e}=this;return e&&`spatialReferenceSupported`in e?!e.spatialReferenceSupported:!1}get layerView(){let{layer:e,view:t}=this;if(!e||!t||e.type===`sublayer`)return null;let n=e.type===`subtype-sublayer`?e.parent:e;return t.allLayerViews.find(e=>e.layer===n)??null}get open(){return this.expanded}set open(e){this.expanded=e}set panel(e){let t=this._get(`panel`);e!==t&&e&&t?.destroy(),this._set(`panel`,e)}castPanel(e){return this.expanded&&!e.hasOwnProperty(`open`)&&(e.open=!0),u(f,e)}get publishing(){let{layer:e,checkPublishStatusEnabled:t}=this;return!!(t&&e&&`publishingInfo`in e&&e.publishingInfo?.status===`publishing`)}get sortable(){return this.content.type!==`layer`||this.layer?.type===`knowledge-graph-sublayer`?!1:this._get(`sortable`)}set sortable(e){this._set(`sortable`,e)}get state(){return!this.layer||this.hidden||this.incompatible?`disabled`:this.updating?`loading`:`ready`}get title(){if(this.content.type!==`layer`)return this._get(`title`)||``;let e=d(this,`layer.layer`);return(!e||e&&d(this,`layer.layer.loaded`))&&d(this,`layer.title`)||d(this,`layer.attributes.title`)||``}set title(e){this._override(`title`,e)}get updating(){let{layerView:e,connectionStatus:t,layer:n,publishing:r}=this;return r||t?!1:e?e.updating:n?.loadStatus===`loading`||!1}get visible(){let{content:e,layer:t}=this;return e.type===`track-info`?this._getTrackPart(e.name)?.visible??!1:e.type===`telemetry-display`?D(t)&&t.telemetryDisplay?t.telemetryDisplay[e.name]:!1:!!t?.visible}set visible(e){let{content:t,layer:n}=this;if(t.type===`track-info`){let n=this._getTrackPart(t.name);n&&(n.visible=e);return}if(t.type===`telemetry-display`){D(n)&&n.telemetryDisplay&&(n.telemetryDisplay[t.name]=e);return}n&&(n.visible=e)}get visibleAtCurrentScale(){return this.layerView?.visibleAtCurrentScale??!p(this.layer,this.view?.scale)}get visibleAtCurrentTimeExtent(){return this.layerView?.visibleAtCurrentTimeExtent??!0}get visibilityMode(){return m(this.layer)}clone(){return new C({actionsExpanded:this.actionsExpanded,actionsSections:this.actionsSections.clone(),checkPublishStatusEnabled:this.checkPublishStatusEnabled,children:this.children.clone(),childrenSortable:this.childrenSortable,content:{...this.content},expanded:this.expanded,hidden:this.hidden,layer:this.layer,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,panel:this.panel,parent:this.parent,sortable:this.sortable,title:this.title,view:this.view,visible:this.visible})}toggleVisibility(e){if(!this.layer)return!1;let t=e??!this.visible;return this.visible=t,this.visible}_compileChildren(e){let t=this.listModeDisabled?e:e?.filter(e=>h(e)!==`hide`);if(!e?.length){this._destroyLayerChildren();return}this._createChildren(t),this._destroyChildren(t),this._sortChildren(t),this._watchChildLayerListMode(e)}_compileTelemetryDisplayChildren(){let e=this.layer,t=this.children.filter(e=>e.content.type===`telemetry-display`);if(this.content.type!==`layer`||!D(e)||!e.telemetryDisplay){this.children.destroyMany(t.toArray());return}t.some(t=>t.layer!==e)&&this.children.destroyMany(t.toArray());for(let t of v)this.children.some(e=>e.content.type===`telemetry-display`&&e.content.name===t)||this.children.add(new C({content:{type:`telemetry-display`,name:t},layer:e,listItemCreatedFunction:this.listItemCreatedFunction,parent:this}))}_compileTrackInfoChildren(){let e=this.layer,t=this.children.filter(e=>e.content.type===`track-info`);if(this.content.type!==`layer`||!E(e)||!e.trackInfo?.enabled){this.children.destroyMany(t.toArray());return}t.some(t=>t.layer!==e)&&this.children.destroyMany(t.toArray());for(let t of y)this.children.some(e=>e.content.type===`track-info`&&e.content.name===t)||this.children.add(new C({content:{type:`track-info`,name:t},layer:e,listItemCreatedFunction:this.listItemCreatedFunction,parent:this}))}_createChildItems(e,t){return e.reverse().map(e=>t||g(e)?new C({checkPublishStatusEnabled:this.checkPublishStatusEnabled,layer:e,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,parent:this,view:this.view}):null).filter(n)}_createChildren(e){let{listModeDisabled:t,children:n}=this,r=e.filter(e=>!n.some(t=>t.content.type===`layer`&&t.layer===e));n.addMany(this._createChildItems(r,t).toArray())}_destroyChildren(e){let{children:t}=this,n=t.filter(t=>t.content.type===`layer`&&!!t.layer&&!e.includes(t.layer));t.destroyMany(n.toArray())}_destroyLayerChildren(){this.removeHandles(k),this.children.destroyMany(this.children.filter(e=>e.content.type===`layer`).toArray())}_getTrackPart(e){let{layer:t}=this;return E(t)?t.trackInfo?.[e]??null:null}_initializeChildLayers(e){this._compileChildren(e),this._watchSublayerChanges(e)}_setItemOnPanel(e){e&&(e.listItem=this)}_sortChildren(e){this.children.sort((t,n)=>{let r=t.content.type!==`layer`,i=n.content.type!==`layer`;return r||i?r?i?t.content.type===`track-info`&&n.content.type===`track-info`?y.indexOf(t.content.name)-y.indexOf(n.content.name):t.content.type===`telemetry-display`&&n.content.type===`telemetry-display`?v.indexOf(t.content.name)-v.indexOf(n.content.name):t.content.type===`track-info`?-1:1:1:-1:e.indexOf(n.layer)-e.indexOf(t.layer)})}_updateChildrenPublishing(e){this.children?.forEach(t=>t.checkPublishStatusEnabled=e)}_updateChildrenView(e){let t=this.children;t&&t.forEach(t=>t.view=e)}_watchChildLayerListMode(e){this.removeHandles(k),this.listModeDisabled||this.addHandles(e.toArray().map(t=>a(()=>t.listMode,()=>this._compileChildren(e))),k)}_watchLayerProperties(e){if(this.removeHandles(O),this.removeHandles(k),!e||this.content.type!==`layer`)return;if((!this.listModeDisabled&&h(e))===`hide-children`){this._destroyLayerChildren();return}let t=_(e);t&&this.addHandles(a(()=>e[t],n=>{let r=n;e.hasOwnProperty(t)&&r&&this._initializeChildLayers(r)},o),O)}_watchSublayerChanges(e){e&&this.addHandles(e.on(`change`,()=>this._compileChildren(e)),O)}};e([s()],A.prototype,`actionsExpanded`,void 0),e([s()],A.prototype,`actionsOpen`,null),e([s({type:T})],A.prototype,`actionsSections`,void 0),e([s()],A.prototype,`checkPublishStatusEnabled`,void 0),e([s({type:r.ofType(C)})],A.prototype,`children`,void 0),e([s()],A.prototype,`childrenSortable`,void 0),e([s({readOnly:!0})],A.prototype,`connectionStatus`,null),e([s({nonNullable:!0})],A.prototype,`content`,void 0),e([s({readOnly:!0})],A.prototype,`error`,null),e([s()],A.prototype,`expanded`,void 0),e([s()],A.prototype,`hidden`,void 0),e([s({readOnly:!0})],A.prototype,`incompatible`,null),e([s()],A.prototype,`layer`,void 0),e([s({readOnly:!0})],A.prototype,`layerView`,null),e([s()],A.prototype,`listItemCreatedFunction`,void 0),e([s({nonNullable:!0})],A.prototype,`listModeDisabled`,void 0),e([s()],A.prototype,`open`,null),e([s({type:f})],A.prototype,`panel`,null),e([c(`panel`)],A.prototype,`castPanel`,null),e([s()],A.prototype,`parent`,void 0),e([s({readOnly:!0})],A.prototype,`publishing`,null),e([s({value:!0})],A.prototype,`sortable`,null),e([s({readOnly:!0})],A.prototype,`state`,null),e([s()],A.prototype,`title`,null),e([s({readOnly:!0})],A.prototype,`updating`,null),e([s()],A.prototype,`view`,void 0),e([s()],A.prototype,`visible`,null),e([s({readOnly:!0})],A.prototype,`visibleAtCurrentScale`,null),e([s({readOnly:!0})],A.prototype,`visibleAtCurrentTimeExtent`,null),e([s({readOnly:!0})],A.prototype,`visibilityMode`,null),A=C=e([l(`esri.layerList.Item`)],A);const j=A;export{j as default};
@@ -1,13 +1,13 @@
1
- import type Accessor from "../../core/Accessor.js";
1
+ import type Accessor from "../core/Accessor.js";
2
2
  import type Item from "./Item.js";
3
- import type { IdentifiableMixin } from "../../core/Identifiable.js";
3
+ import type { IdentifiableMixin } from "../core/Identifiable.js";
4
4
  import type { ItemPanelContents, ItemPanelProperties } from "./types.js";
5
5
 
6
6
  /**
7
7
  * Stores state for additional content associated with a layer-list item.
8
8
  *
9
9
  * This class does not render UI. Consumer components use its content, presentation, and interaction state
10
- * to render a panel associated with an [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/).
10
+ * to render a panel associated with an [Item](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/).
11
11
  *
12
12
  * @beta
13
13
  * @since 5.2
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import t from"../core/Accessor.js";import{IdentifiableMixin as n}from"../core/Identifiable.js";import{property as r,subclass as i}from"../core/accessorSupport/decorators.js";let a=class extends n(t){constructor(e){super(e),this.content=null,this.disabled=!1,this.flowEnabled=!1,this.icon=null,this.image=null,this.listItem=null,this.open=!1,this.title=``,this.visible=!0}};e([r()],a.prototype,`content`,void 0),e([r()],a.prototype,`disabled`,void 0),e([r()],a.prototype,`flowEnabled`,void 0),e([r()],a.prototype,`icon`,void 0),e([r()],a.prototype,`image`,void 0),e([r()],a.prototype,`listItem`,void 0),e([r()],a.prototype,`open`,void 0),e([r()],a.prototype,`title`,void 0),e([r()],a.prototype,`visible`,void 0),a=e([i(`esri.layerList.ItemPanel`)],a);const o=a;export{o as default};
@@ -1,23 +1,23 @@
1
- import type Collection from "../../core/Collection.js";
1
+ import type Collection from "../core/Collection.js";
2
2
  import type Item from "./Item.js";
3
- import type { EventedAccessor } from "../../core/Evented.js";
4
- import type { Action, ItemModifier, LayerItemCollectionProperties, LayerItemCollectionTriggerActionEvent, State } from "./types.js";
5
- import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
3
+ import type { EventedAccessor } from "../core/Evented.js";
4
+ import type { Action, ItemModifier, LayerListModelProperties, LayerListModelTriggerActionEvent, State } from "./types.js";
5
+ import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
6
6
 
7
- export interface LayerItemCollectionEvents {
7
+ export interface LayerListModelEvents {
8
8
  /**
9
9
  * Emitted when the user clicks an [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or
10
10
  * [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) in a layer list.
11
11
  * Use this event to run custom logic when a specific action is triggered.
12
- * The event object is a [LayerItemCollectionTriggerActionEvent](https://developers.arcgis.com/javascript/latest/references/core/layers/list/types/#LayerItemCollectionTriggerActionEvent).
12
+ * The event object is a [LayerListModelTriggerActionEvent](https://developers.arcgis.com/javascript/latest/references/core/layerList/types/#LayerListModelTriggerActionEvent).
13
13
  *
14
- * @see [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/layers/list/LayerItemCollection/#event-trigger-action)
14
+ * @see [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/layerList/LayerListModel/#event-trigger-action)
15
15
  */
16
- "trigger-action": LayerItemCollectionTriggerActionEvent;
16
+ "trigger-action": LayerListModelTriggerActionEvent;
17
17
  }
18
18
 
19
19
  /**
20
- * Manages the [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/) instances displayed for operational layers in a layer-list workflow.
20
+ * Manages the [Item](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/) instances displayed for operational layers in a layer-list workflow.
21
21
  * The collection tracks the view's layers and layer views, creates and updates list items, and supports
22
22
  * custom item configuration, actions, visibility filtering, and reordering.
23
23
  * To exclude a layer from the collection, set its [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode) property to `hide`.
@@ -25,25 +25,25 @@ export interface LayerItemCollectionEvents {
25
25
  * @beta
26
26
  * @since 5.2
27
27
  */
28
- export default class LayerItemCollection extends EventedAccessor {
28
+ export default class LayerListModel extends EventedAccessor {
29
29
  /**
30
30
  * @deprecated
31
31
  * Do not directly reference this property.
32
32
  * Use EventNames and EventTypes helpers from \@arcgis/core/Evented
33
33
  */
34
- "@eventTypes": LayerItemCollectionEvents;
35
- constructor(properties?: LayerItemCollectionProperties);
34
+ "@eventTypes": LayerListModelEvents;
35
+ constructor(properties?: LayerListModelProperties);
36
36
  /**
37
37
  * Indicates whether items should report when their associated layers are being published.
38
- * When `false`, the [Item.publishing](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#publishing) property is always `false`.
38
+ * When `false`, the [Item.publishing](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/#publishing) property is always `false`.
39
39
  *
40
40
  * @default false
41
41
  */
42
42
  accessor checkPublishStatusEnabled: boolean;
43
43
  /**
44
- * A function called when each [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/) is created.
44
+ * A function called when each [Item](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/) is created.
45
45
  * Use the callback to modify supported item properties or add actions through
46
- * the [Item.actionsSections](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#actionsSections) property.
46
+ * the [Item.actionsSections](https://developers.arcgis.com/javascript/latest/references/core/layerList/Item/#actionsSections) property.
47
47
  */
48
48
  accessor listItemCreatedFunction: ItemModifier | null | undefined;
49
49
  /**
@@ -87,7 +87,7 @@ export default class LayerItemCollection extends EventedAccessor {
87
87
  moveItem(targetItem: Item | null | undefined, fromParentItem: Item | null | undefined, toParentItem: Item | null | undefined, newIndex: number): void;
88
88
  /**
89
89
  * Executes an enabled action associated with an item and emits the
90
- * [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/layers/list/LayerItemCollection/#event-trigger-action) event.
90
+ * [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/layerList/LayerListModel/#event-trigger-action) event.
91
91
  * Disabled actions are ignored.
92
92
  *
93
93
  * @param action - The action to execute.
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{EventedAccessor as n}from"../core/Evented.js";import{watch as r,initial as i}from"../core/reactiveUtils.js";import{property as a,subclass as o}from"../core/accessorSupport/decorators.js";import s from"./Item.js";import{getItemLayers as c,findLayerListMode as l}from"./support/layerListUtils.js";import{isLinkChartView as u}from"../linkChart/guards.js";const d={view:`view`,viewLayers:`view-layers`,mapLayers:`map-layers`,layerViews:`layer-views`,layerListMode:`layer-list-mode`},f=t.ofType(s);let p=class extends n{constructor(e){super(e),this.checkPublishStatusEnabled=!1,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.operationalItems=new f,this.view=null}initialize(){this.addHandles([r(()=>this.view?.ready===!0,()=>this._viewHandles(),i),r(()=>[this.listItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._recompileList()),r(()=>u(this.view)?this.view.inGeographicLayout:null,()=>this._compileList())],d.view)}destroy(){this._removeAllItems(),this.view=null}get state(){let{view:e}=this;return e?.ready?`ready`:e?`loading`:`disabled`}get totalItems(){return this.operationalItems.flatten(e=>e.children).length}moveItem(e,t,n,r){let i=e?.layer;if(!i||e.content.type!==`layer`||i.type===`subtype-sublayer`||i.type===`sublayer`)return;let a=this.view?.map?.layers,o=t?c(t):a,s=n?c(n):a;if(!o||!s)return;let{operationalItems:l}=this,u=t?.children||l,d=n?.children||l,f=s.length-r;e.parent=n||null,u.remove(e),o.remove(i),d.includes(e)||d.add(e,f),s.includes(i)||s.add(i,f),this._compileList()}triggerAction(e,t){e&&!e.disabled&&this.emit(`trigger-action`,{action:e,item:t})}_compileList(){let e=this.view?.map?.layers,t=u(this.view)&&!this.view.inGeographicLayout?e?.filter(({type:e})=>e===`link-chart`):e;this._watchLayersListMode(t);let n=this._getViewableLayers(t);if(!n?.length){this._removeAllItems();return}this._createNewItems(n),this._removeItems(n),this._sortItems(n)}_createItem(e){let{view:t,listItemCreatedFunction:n,checkPublishStatusEnabled:r,listModeDisabled:i}=this;return new s({checkPublishStatusEnabled:r,layer:e,listItemCreatedFunction:n,listModeDisabled:i,view:t})}_createLayerViewHandles(e){this.removeHandles(d.layerViews),this._compileList(),e&&this.addHandles(e.on(`change`,()=>this._compileList()),d.layerViews)}_createMapLayerHandles(e){this.removeHandles(d.mapLayers),this._compileList(),e&&this.addHandles(e.on(`change`,()=>this._compileList()),d.mapLayers)}_createNewItems(e){let{operationalItems:t}=this;e.forEach(e=>{t.some(t=>t.layer===e)||t.add(this._createItem(e))})}_getViewableLayers(e){return e?this.listModeDisabled?e:e.filter(e=>l(e)!==`hide`):void 0}_recompileList(){this._removeAllItems(),this._compileList()}_removeAllItems(){this.operationalItems.destroyAll()}_removeItems(e){let{operationalItems:t}=this,n=[];t.forEach(t=>{t&&e&&e.includes(t.layer)||n.push(t)}),t.destroyMany(n)}_sortItems(e){let{operationalItems:t}=this;t.sort((t,n)=>{let r=e.indexOf(t.layer),i=e.indexOf(n.layer);return r>i?-1:+(r<i)})}_viewHandles(){let{view:e}=this;if(this.removeHandles([d.mapLayers,d.layerViews,d.viewLayers]),!e?.ready){this._removeAllItems();return}this.addHandles([r(()=>this.view?.map?.layers,e=>this._createMapLayerHandles(e),i),r(()=>this.view?.allLayerViews,e=>this._createLayerViewHandles(e),i)],d.viewLayers)}_watchLayersListMode(e){this.removeHandles(d.layerListMode),e&&!this.listModeDisabled&&this.addHandles(r(()=>e.filter(e=>`listMode`in e).map(e=>e.listMode).toArray(),()=>this._compileList()),d.layerListMode)}};e([a()],p.prototype,`checkPublishStatusEnabled`,void 0),e([a()],p.prototype,`listItemCreatedFunction`,void 0),e([a({nonNullable:!0})],p.prototype,`listModeDisabled`,void 0),e([a({type:f})],p.prototype,`operationalItems`,void 0),e([a({readOnly:!0})],p.prototype,`state`,null),e([a()],p.prototype,`totalItems`,null),e([a()],p.prototype,`view`,void 0),p=e([o(`esri.layerList.LayerListModel`)],p);const m=p;export{m as default};
@@ -1,12 +1,12 @@
1
- import type Accessor from "../../core/Accessor.js";
2
- import type Collection from "../../core/Collection.js";
3
- import type EsriError from "../../core/Error.js";
1
+ import type Accessor from "../core/Accessor.js";
2
+ import type Collection from "../core/Collection.js";
3
+ import type EsriError from "../core/Error.js";
4
4
  import type TableItemPanel from "./TableItemPanel.js";
5
- import type { IdentifiableMixin } from "../../core/Identifiable.js";
5
+ import type { IdentifiableMixin } from "../core/Identifiable.js";
6
6
  import type { Action, TableItemLayer, TableItemModifier, TableItemProperties, TableItemPanelProperties } from "./types.js";
7
- import type { ActionToggleProperties } from "../../support/actions/ActionToggle.js";
8
- import type { ActionButtonProperties } from "../../support/actions/ActionButton.js";
9
- import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
7
+ import type { ActionToggleProperties } from "../support/actions/ActionToggle.js";
8
+ import type { ActionButtonProperties } from "../support/actions/ActionButton.js";
9
+ import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
10
10
 
11
11
  /**
12
12
  * Represents a table-related list item with support for child items, actions, and panel state.
@@ -31,7 +31,7 @@ export default class TableItem extends TableItemSuperclass {
31
31
  get actionsSections(): Collection<Collection<Action>>;
32
32
  set actionsSections(value: ReadonlyArrayOrCollection<ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>>);
33
33
  /**
34
- * Enables publish-status checks used by [publishing](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/#publishing).
34
+ * Enables publish-status checks used by [publishing](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableItem/#publishing).
35
35
  *
36
36
  * @default false
37
37
  * @internal
@@ -94,9 +94,9 @@ export default class TableItem extends TableItemSuperclass {
94
94
  */
95
95
  accessor parent: TableItem | null | undefined;
96
96
  /**
97
- * Value is `true` when the [layer](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/#layer) is being published.
97
+ * Value is `true` when the [layer](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableItem/#layer) is being published.
98
98
  * Value is `false` when not publishing or when
99
- * [checkPublishStatusEnabled](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/#checkPublishStatusEnabled) is `false`.
99
+ * [checkPublishStatusEnabled](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableItem/#checkPublishStatusEnabled) is `false`.
100
100
  *
101
101
  * @default false
102
102
  * @internal
@@ -117,7 +117,7 @@ export default class TableItem extends TableItemSuperclass {
117
117
  /**
118
118
  * Creates a deep clone of this object.
119
119
  *
120
- * @returns A clone of the new [TableItem](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/) instance.
120
+ * @returns A clone of the new [TableItem](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableItem/) instance.
121
121
  * @internal
122
122
  */
123
123
  clone(): TableItem;
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import t from"../core/Accessor.js";import{isSome as n}from"../core/arrayUtils.js";import r from"../core/Collection.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import{watch as a,initial as o}from"../core/reactiveUtils.js";import{property as s,cast as c,subclass as l}from"../core/accessorSupport/decorators.js";import{ensureType as u}from"../core/accessorSupport/ensureType.js";import{get as d}from"../core/accessorSupport/get.js";import f from"./TableItemPanel.js";import{findLayerListMode as p,canDisplayLayer as m,getNormalizedChildLayerProperty as h}from"./support/layerListUtils.js";import g from"../support/actions/ActionBase.js";import _ from"../support/actions/ActionButton.js";import v from"../support/actions/ActionToggle.js";var y;const b=`layer`,x=`child-list-mode`,S=r.ofType({key:`type`,defaultKeyValue:`button`,base:g,typeMap:{button:_,toggle:v}}),C=r.ofType(S);let w=y=class extends i(t){constructor(e){super(e),this.actionsOpen=!1,this.actionsSections=new C,this.checkPublishStatusEnabled=!1,this.children=new(r.ofType(y)),this.hidden=!1,this.layer=null,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.open=!1,this.parent=null,this.sortable=!0}initialize(){if(this.addHandles([a(()=>[this.layer?.listMode,this.listModeDisabled],()=>this._watchLayerProperties(this.layer),o),a(()=>this.checkPublishStatusEnabled,e=>this._updateChildrenPublishing(e),o),a(()=>this.panel,e=>this._setItemOnPanel(e),o)]),typeof this.listItemCreatedFunction==`function`){let e={item:this};this.listItemCreatedFunction.call(null,e)}}destroy(){this.panel?.destroy(),this.children.destroyAll()}get error(){return this.layer?.loadError}set panel(e){let t=this._get(`panel`);e!==t&&e&&t?.destroy(),this._set(`panel`,e)}castPanel(e){return this.panel?.open&&!e.hasOwnProperty(`open`)&&(e.open=!0),u(f,e)}get publishing(){let{layer:e,checkPublishStatusEnabled:t}=this;return!!(t&&e&&`publishingInfo`in e&&e.publishingInfo?.status===`publishing`)}get title(){let e=d(this,`layer.layer`);return(!e||e&&d(this,`layer.layer.loaded`)?this.layer?.title:null)??``}set title(e){this._overrideIfSome(`title`,e)}clone(){return new y({actionsOpen:this.actionsOpen,actionsSections:this.actionsSections.clone(),checkPublishStatusEnabled:this.checkPublishStatusEnabled,children:this.children.clone(),hidden:this.hidden,layer:this.layer,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,open:this.open,panel:this.panel,parent:this.parent,sortable:this.sortable,title:this.title})}_compileChildren(e){let t=this.listModeDisabled?e:e?.filter(e=>p(e)!==`hide`);if(!e?.length){this._destroyAllChildren();return}this._createChildren(t),this._destroyChildren(t),this._sortChildren(t),this._watchChildLayerListMode(e)}_createChildItems(e,t){return e.reverse().map(e=>t||m(e)?new y({checkPublishStatusEnabled:this.checkPublishStatusEnabled,layer:e,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,parent:this}):null).filter(n)}_createChildren(e){let{listModeDisabled:t,children:n}=this,r=e.reverse().filter(e=>!n.some(t=>t.layer===e));n.addMany(this._createChildItems(r,t))}_destroyAllChildren(){this.removeHandles(x),this.children.destroyAll()}_destroyChildren(e){let{children:t}=this,n=t.filter(t=>!!t.layer&&!e.includes(t.layer));t.destroyMany(n)}_initializeChildLayers(e){this._compileChildren(e),this._watchSublayerChanges(e)}_setItemOnPanel(e){e&&(e.listItem=this)}_sortChildren(e){this.children.sort((t,n)=>e.indexOf(n.layer)-e.indexOf(t.layer))}_updateChildrenPublishing(e){this.children?.forEach(t=>t.checkPublishStatusEnabled=e)}_watchChildLayerListMode(e){this.removeHandles(x),this.listModeDisabled||this.addHandles(e.toArray().map(t=>a(()=>t.listMode,()=>this._compileChildren(e))),x)}_watchLayerProperties(e){if(this.removeHandles(b),this.removeHandles(x),!e)return;if(e.load().catch(()=>{}),(!this.listModeDisabled&&p(e))===`hide-children`){this.children.destroyAll();return}let t=h(e);t&&this.addHandles(a(()=>e[t],n=>{e.hasOwnProperty(t)&&this._initializeChildLayers(n)},o),b)}_watchSublayerChanges(e){e&&this.addHandles(e.on(`change`,()=>this._compileChildren(e)),b)}};e([s()],w.prototype,`actionsOpen`,void 0),e([s({type:C})],w.prototype,`actionsSections`,void 0),e([s()],w.prototype,`checkPublishStatusEnabled`,void 0),e([s({type:r.ofType(y)})],w.prototype,`children`,void 0),e([s({readOnly:!0})],w.prototype,`error`,null),e([s()],w.prototype,`hidden`,void 0),e([s()],w.prototype,`layer`,void 0),e([s()],w.prototype,`listItemCreatedFunction`,void 0),e([s({nonNullable:!0})],w.prototype,`listModeDisabled`,void 0),e([s()],w.prototype,`open`,void 0),e([s({type:f})],w.prototype,`panel`,null),e([c(`panel`)],w.prototype,`castPanel`,null),e([s()],w.prototype,`parent`,void 0),e([s({readOnly:!0})],w.prototype,`publishing`,null),e([s()],w.prototype,`sortable`,void 0),e([s()],w.prototype,`title`,null),w=y=e([l(`esri.layerList.TableItem`)],w);const T=w;export{T as default};
@@ -1,6 +1,6 @@
1
- import type Accessor from "../../core/Accessor.js";
1
+ import type Accessor from "../core/Accessor.js";
2
2
  import type TableItem from "./TableItem.js";
3
- import type { IdentifiableMixin } from "../../core/Identifiable.js";
3
+ import type { IdentifiableMixin } from "../core/Identifiable.js";
4
4
  import type { TableItemPanelContents, TableItemPanelProperties } from "./types.js";
5
5
 
6
6
  /**
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import t from"../core/Accessor.js";import{IdentifiableMixin as n}from"../core/Identifiable.js";import{property as r,subclass as i}from"../core/accessorSupport/decorators.js";let a=class extends n(t){constructor(e){super(e),this.content=null,this.disabled=!1,this.flowEnabled=!1,this.icon=null,this.image=null,this.listItem=null,this.open=!1,this.title=``,this.visible=!0}};e([r()],a.prototype,`content`,void 0),e([r()],a.prototype,`disabled`,void 0),e([r()],a.prototype,`flowEnabled`,void 0),e([r()],a.prototype,`icon`,void 0),e([r()],a.prototype,`image`,void 0),e([r()],a.prototype,`listItem`,void 0),e([r()],a.prototype,`open`,void 0),e([r()],a.prototype,`title`,void 0),e([r()],a.prototype,`visible`,void 0),a=e([i(`esri.layerList.TableItemPanel`)],a);const o=a;export{o as default};
@@ -1,27 +1,27 @@
1
- import type WebMap from "../../WebMap.js";
2
- import type WebScene from "../../WebScene.js";
3
- import type Collection from "../../core/Collection.js";
1
+ import type WebMap from "../WebMap.js";
2
+ import type WebScene from "../WebScene.js";
3
+ import type Collection from "../core/Collection.js";
4
4
  import type TableItem from "./TableItem.js";
5
- import type { ReadonlyCollection } from "../../core/Collection.js";
6
- import type { EventedAccessor } from "../../core/Evented.js";
7
- import type { Action, State, TableItemCollectionLayer, TableItemCollectionProperties, TableItemModifier } from "./types.js";
5
+ import type { ReadonlyCollection } from "../core/Collection.js";
6
+ import type { EventedAccessor } from "../core/Evented.js";
7
+ import type { Action, State, TableListModelLayer, TableListModelProperties, TableItemModifier } from "./types.js";
8
8
 
9
9
  /** @internal */
10
- export interface TableItemCollectionEvents {}
10
+ export interface TableListModelEvents {}
11
11
 
12
12
  /**
13
13
  * Provides list orchestration logic for table-list workflows.
14
14
  *
15
15
  * @internal
16
16
  */
17
- export default class TableItemCollection extends EventedAccessor {
17
+ export default class TableListModel extends EventedAccessor {
18
18
  /** @internal */
19
- "@eventTypes": TableItemCollectionEvents;
19
+ "@eventTypes": TableListModelEvents;
20
20
  /** @internal */
21
- constructor(properties?: TableItemCollectionProperties);
21
+ constructor(properties?: TableListModelProperties);
22
22
  /**
23
23
  * Whether to provide an indication if a layer is being published.
24
- * The [TableItem.publishing](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/#publishing) property
24
+ * The [TableItem.publishing](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableItem/#publishing) property
25
25
  * is `false` when `checkPublishStatusEnabled` is `false`.
26
26
  *
27
27
  * @default false
@@ -29,7 +29,7 @@ export default class TableItemCollection extends EventedAccessor {
29
29
  */
30
30
  accessor checkPublishStatusEnabled: boolean;
31
31
  /**
32
- * Specifies a function that accesses each [TableItem](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/).
32
+ * Specifies a function that accesses each [TableItem](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableItem/).
33
33
  * Each list item can be modified according to its modifiable properties.
34
34
  *
35
35
  * @internal
@@ -57,7 +57,7 @@ export default class TableItemCollection extends EventedAccessor {
57
57
  */
58
58
  get state(): State;
59
59
  /**
60
- * The collection of [TableItem](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/)s in the list.
60
+ * The collection of [TableItem](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableItem/)s in the list.
61
61
  *
62
62
  * @internal
63
63
  */
@@ -67,9 +67,9 @@ export default class TableItemCollection extends EventedAccessor {
67
67
  *
68
68
  * @internal
69
69
  */
70
- accessor tables: ReadonlyCollection<TableItemCollectionLayer> | null | undefined;
70
+ accessor tables: ReadonlyCollection<TableListModelLayer> | null | undefined;
71
71
  /**
72
- * The total number of [tableItems](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItemCollection/#tableItems) in the list.
72
+ * The total number of [tableItems](https://developers.arcgis.com/javascript/latest/references/core/layerList/TableListModel/#tableItems) in the list.
73
73
  *
74
74
  * @internal
75
75
  */
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{EventedAccessor as n}from"../core/Evented.js";import{watch as r,initial as i}from"../core/reactiveUtils.js";import{property as a,subclass as o}from"../core/accessorSupport/decorators.js";import s from"./TableItem.js";import{findLayerListMode as c}from"./support/layerListUtils.js";const l={map:`map`,layerListMode:`layer-list-mode`},u=t.ofType(s);let d=class extends n{constructor(e){super(e),this.checkPublishStatusEnabled=!1,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.map=null,this.tableItems=new u}initialize(){this.addHandles([r(()=>[this.tables?.toArray(),this.map?.allTables.toArray()],()=>this._compileList(),i),r(()=>[this.map?.loaded,this.listItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._recompileList())],l.map)}destroy(){this._removeAllItems(),this.map=null,this.tables=null}get state(){let{map:e,tables:t}=this;if(!e)return t?`ready`:`disabled`;let n=e.loadStatus;return typeof n==`string`?n===`loaded`?`ready`:n===`loading`?`loading`:`disabled`:`ready`}get tables(){return this.map?.allTables}set tables(e){this._overrideIfSome(`tables`,e)}get totalItems(){return this.tableItems.length}triggerAction(e,t){e&&!e.disabled&&this.emit(`trigger-action`,{action:e,item:t})}_compileList(){let{tables:e}=this;this._watchTablesListMode(e);let t=this._getViewableTables(e);if(!t?.length){this._removeAllItems();return}this._createNewItems(t),this._removeItems(t),this._sortItems(t)}_createNewItems(e){let{tableItems:t,listItemCreatedFunction:n,checkPublishStatusEnabled:r}=this;e.forEach(e=>{t.some(t=>t.layer===e)||t.add(new s({checkPublishStatusEnabled:r,layer:e,listItemCreatedFunction:n}))})}_getViewableTables(e){return e?this.listModeDisabled?e:e.filter(e=>c(e)!==`hide`):void 0}_recompileList(){this._removeAllItems(),this._compileList()}_removeAllItems(){this.tableItems.destroyAll()}_removeItems(e){let{tableItems:t}=this;t.forEach(n=>{n&&(e?.find(e=>n.layer===e)||(t.remove(n),n.destroy()))})}_sortItems(e){let{tableItems:t}=this;t.sort((t,n)=>{let r=e.indexOf(t.layer),i=e.indexOf(n.layer);return r>i?-1:+(r<i)})}_watchTablesListMode(e){this.removeHandles(l.layerListMode),e&&!this.listModeDisabled&&this.addHandles(r(()=>e.filter(e=>`listMode`in e).map(e=>e.listMode).toArray(),()=>this._compileList()),l.layerListMode)}};e([a()],d.prototype,`checkPublishStatusEnabled`,void 0),e([a()],d.prototype,`listItemCreatedFunction`,void 0),e([a({nonNullable:!0})],d.prototype,`listModeDisabled`,void 0),e([a()],d.prototype,`map`,void 0),e([a({readOnly:!0})],d.prototype,`state`,null),e([a({type:u,readOnly:!0})],d.prototype,`tableItems`,void 0),e([a()],d.prototype,`tables`,null),e([a()],d.prototype,`totalItems`,null),d=e([o(`esri.layerList.TableListModel`)],d);const f=d;export{f as default};