@arcgis/core 5.2.0-next.79 → 5.2.0-next.80

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 (192) hide show
  1. package/WebScene.js +1 -1
  2. package/arcgisGlobal.d.ts +8 -0
  3. package/assets/components/assets/input-date-picker/t9n/messages.ar.json +1 -1
  4. package/assets/components/assets/input-date-picker/t9n/messages.bg.json +1 -1
  5. package/assets/components/assets/input-date-picker/t9n/messages.bs.json +1 -1
  6. package/assets/components/assets/input-date-picker/t9n/messages.ca.json +1 -1
  7. package/assets/components/assets/input-date-picker/t9n/messages.cs.json +1 -1
  8. package/assets/components/assets/input-date-picker/t9n/messages.da.json +1 -1
  9. package/assets/components/assets/input-date-picker/t9n/messages.de.json +1 -1
  10. package/assets/components/assets/input-date-picker/t9n/messages.el.json +1 -1
  11. package/assets/components/assets/input-date-picker/t9n/messages.es.json +1 -1
  12. package/assets/components/assets/input-date-picker/t9n/messages.et.json +1 -1
  13. package/assets/components/assets/input-date-picker/t9n/messages.fi.json +1 -1
  14. package/assets/components/assets/input-date-picker/t9n/messages.fr.json +1 -1
  15. package/assets/components/assets/input-date-picker/t9n/messages.he.json +1 -1
  16. package/assets/components/assets/input-date-picker/t9n/messages.hr.json +1 -1
  17. package/assets/components/assets/input-date-picker/t9n/messages.hu.json +1 -1
  18. package/assets/components/assets/input-date-picker/t9n/messages.id.json +1 -1
  19. package/assets/components/assets/input-date-picker/t9n/messages.it.json +1 -1
  20. package/assets/components/assets/input-date-picker/t9n/messages.ja.json +1 -1
  21. package/assets/components/assets/input-date-picker/t9n/messages.ko.json +1 -1
  22. package/assets/components/assets/input-date-picker/t9n/messages.lt.json +1 -1
  23. package/assets/components/assets/input-date-picker/t9n/messages.lv.json +1 -1
  24. package/assets/components/assets/input-date-picker/t9n/messages.nl.json +1 -1
  25. package/assets/components/assets/input-date-picker/t9n/messages.no.json +1 -1
  26. package/assets/components/assets/input-date-picker/t9n/messages.pl.json +1 -1
  27. package/assets/components/assets/input-date-picker/t9n/messages.pt-BR.json +1 -1
  28. package/assets/components/assets/input-date-picker/t9n/messages.pt-PT.json +1 -1
  29. package/assets/components/assets/input-date-picker/t9n/messages.ro.json +1 -1
  30. package/assets/components/assets/input-date-picker/t9n/messages.ru.json +1 -1
  31. package/assets/components/assets/input-date-picker/t9n/messages.sk.json +1 -1
  32. package/assets/components/assets/input-date-picker/t9n/messages.sl.json +1 -1
  33. package/assets/components/assets/input-date-picker/t9n/messages.sr.json +1 -1
  34. package/assets/components/assets/input-date-picker/t9n/messages.sv.json +1 -1
  35. package/assets/components/assets/input-date-picker/t9n/messages.th.json +1 -1
  36. package/assets/components/assets/input-date-picker/t9n/messages.tr.json +1 -1
  37. package/assets/components/assets/input-date-picker/t9n/messages.uk.json +1 -1
  38. package/assets/components/assets/input-date-picker/t9n/messages.vi.json +1 -1
  39. package/assets/components/assets/input-date-picker/t9n/messages.zh-CN.json +1 -1
  40. package/assets/components/assets/input-date-picker/t9n/messages.zh-HK.json +1 -1
  41. package/assets/components/assets/input-date-picker/t9n/messages.zh-TW.json +1 -1
  42. package/assets/components/assets/input-time-picker/t9n/messages.ar.json +1 -1
  43. package/assets/components/assets/input-time-picker/t9n/messages.bg.json +1 -1
  44. package/assets/components/assets/input-time-picker/t9n/messages.bs.json +1 -1
  45. package/assets/components/assets/input-time-picker/t9n/messages.ca.json +1 -1
  46. package/assets/components/assets/input-time-picker/t9n/messages.cs.json +1 -1
  47. package/assets/components/assets/input-time-picker/t9n/messages.da.json +1 -1
  48. package/assets/components/assets/input-time-picker/t9n/messages.de.json +1 -1
  49. package/assets/components/assets/input-time-picker/t9n/messages.el.json +1 -1
  50. package/assets/components/assets/input-time-picker/t9n/messages.es.json +1 -1
  51. package/assets/components/assets/input-time-picker/t9n/messages.et.json +1 -1
  52. package/assets/components/assets/input-time-picker/t9n/messages.fi.json +1 -1
  53. package/assets/components/assets/input-time-picker/t9n/messages.fr.json +1 -1
  54. package/assets/components/assets/input-time-picker/t9n/messages.he.json +1 -1
  55. package/assets/components/assets/input-time-picker/t9n/messages.hr.json +1 -1
  56. package/assets/components/assets/input-time-picker/t9n/messages.hu.json +1 -1
  57. package/assets/components/assets/input-time-picker/t9n/messages.id.json +1 -1
  58. package/assets/components/assets/input-time-picker/t9n/messages.it.json +1 -1
  59. package/assets/components/assets/input-time-picker/t9n/messages.ja.json +1 -1
  60. package/assets/components/assets/input-time-picker/t9n/messages.ko.json +1 -1
  61. package/assets/components/assets/input-time-picker/t9n/messages.lt.json +1 -1
  62. package/assets/components/assets/input-time-picker/t9n/messages.lv.json +1 -1
  63. package/assets/components/assets/input-time-picker/t9n/messages.nl.json +1 -1
  64. package/assets/components/assets/input-time-picker/t9n/messages.no.json +1 -1
  65. package/assets/components/assets/input-time-picker/t9n/messages.pl.json +1 -1
  66. package/assets/components/assets/input-time-picker/t9n/messages.pt-BR.json +1 -1
  67. package/assets/components/assets/input-time-picker/t9n/messages.pt-PT.json +1 -1
  68. package/assets/components/assets/input-time-picker/t9n/messages.ro.json +1 -1
  69. package/assets/components/assets/input-time-picker/t9n/messages.ru.json +1 -1
  70. package/assets/components/assets/input-time-picker/t9n/messages.sk.json +1 -1
  71. package/assets/components/assets/input-time-picker/t9n/messages.sl.json +1 -1
  72. package/assets/components/assets/input-time-picker/t9n/messages.sr.json +1 -1
  73. package/assets/components/assets/input-time-picker/t9n/messages.sv.json +1 -1
  74. package/assets/components/assets/input-time-picker/t9n/messages.th.json +1 -1
  75. package/assets/components/assets/input-time-picker/t9n/messages.tr.json +1 -1
  76. package/assets/components/assets/input-time-picker/t9n/messages.uk.json +1 -1
  77. package/assets/components/assets/input-time-picker/t9n/messages.vi.json +1 -1
  78. package/assets/components/assets/input-time-picker/t9n/messages.zh-CN.json +1 -1
  79. package/assets/components/assets/input-time-picker/t9n/messages.zh-HK.json +1 -1
  80. package/assets/components/assets/input-time-picker/t9n/messages.zh-TW.json +1 -1
  81. package/assets/components/assets/input-time-zone/t9n/messages.de.json +1 -1
  82. package/assets/esri/core/workers/RemoteClient.js +1 -1
  83. package/assets/esri/core/workers/chunks/{c69cf08da4e4c2c824ee.js → 0179949495c87466b428.js} +12 -12
  84. package/assets/esri/core/workers/chunks/{ef803fb25741e9f2a0a1.js → 04105d83556409489835.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{040a73b2a23577e1eabd.js → 24729603dcdbd95fd01e.js} +1 -1
  86. package/assets/esri/core/workers/chunks/2b0558c1716425974563.js +2 -0
  87. package/assets/esri/core/workers/chunks/{ac2ba5c3d613d7d5183a.js → 2b3f76e03b7a28fc4453.js} +1 -1
  88. package/assets/esri/core/workers/chunks/345510a95e893fa8040a.js +1 -0
  89. package/assets/esri/core/workers/chunks/{57e26a86d46e02c89c4f.js → 55dda957c79fb285185f.js} +1 -1
  90. package/assets/esri/core/workers/chunks/5d8d2145533a52efb7b9.js +1 -0
  91. package/assets/esri/core/workers/chunks/5f553da48d0ccbbfcd3c.js +2 -0
  92. package/assets/esri/core/workers/chunks/{cd74de12005834244a47.js → 626a715fdec93e188e0c.js} +1 -1
  93. package/assets/esri/core/workers/chunks/6529b5cc3ac6baa29fff.js +2 -0
  94. package/assets/esri/core/workers/chunks/7253a439c98200e3e748.js +1 -0
  95. package/assets/esri/core/workers/chunks/{4115bab15c19b4f5ae08.js → 7529c0fcfb83998e63db.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{b37a20c5c4a4686257d4.js → 8a3289e15e0ce92e3813.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{b82763e9401b16121f8d.js → 995a433936fc90d41634.js} +2 -2
  98. package/assets/esri/core/workers/chunks/9f1211d2267fb7673c4d.js +1 -0
  99. package/assets/esri/core/workers/chunks/{385b23d4bd5275031fb6.js → cada52d719c35d40958a.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{f703bc002c732d1c045d.js → cfdbc48f58433a3d5fc3.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{83556c9f6f85c2a46779.js → d8da31bfe2bc4174e5aa.js} +1 -1
  102. package/assets/esri/core/workers/chunks/{8762da315cf5086167c3.js → e9e4b27ba06a29e6340c.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{05663093b1d2a268b953.js → ebb722118a220c92efc3.js} +1 -1
  104. package/assets/esri/core/workers/chunks/ee63c693f2539f3bfa17.js +2 -0
  105. package/assets/esri/core/workers/chunks/ef9489d1dccb817460bb.js +2 -0
  106. package/assets/esri/core/workers/chunks/f086c6d229fb34a9d7f9.js +1 -0
  107. package/assets/esri/core/workers/chunks/{507b7f4c276b60ffe9d5.js → f4bae61869df1877fd3f.js} +1 -1
  108. package/chunks/Component.glsl.js +4 -4
  109. package/chunks/{FocusAreaColor.glsl.js → FocusArea.glsl.js} +1 -1
  110. package/chunks/HUDMaterial.glsl.js +5 -5
  111. package/chunks/Terrain.glsl.js +4 -4
  112. package/config.js +1 -1
  113. package/kernel.js +1 -1
  114. package/layers/list/BasemapItemCollection.d.ts +81 -0
  115. package/layers/list/BasemapItemCollection.js +2 -0
  116. package/layers/list/CatalogItemCollection.d.ts +76 -0
  117. package/layers/list/CatalogItemCollection.js +2 -0
  118. package/layers/list/Item.d.ts +262 -0
  119. package/layers/list/Item.js +2 -0
  120. package/layers/list/ItemPanel.d.ts +75 -0
  121. package/layers/list/ItemPanel.js +2 -0
  122. package/layers/list/LayerItemCollection.d.ts +106 -0
  123. package/layers/list/LayerItemCollection.js +2 -0
  124. package/layers/list/TableItem.d.ts +136 -0
  125. package/layers/list/TableItem.js +2 -0
  126. package/layers/list/TableItemCollection.d.ts +115 -0
  127. package/layers/list/TableItemCollection.js +2 -0
  128. package/layers/list/TableItemPanel.d.ts +74 -0
  129. package/layers/list/TableItemPanel.js +2 -0
  130. package/layers/list/support/layerListUtils.js +2 -0
  131. package/layers/list/types.d.ts +55 -0
  132. package/package.json +4 -4
  133. package/support/revision.js +1 -1
  134. package/views/3d/FocusAreasView.js +1 -1
  135. package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
  136. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +2 -0
  137. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +2 -0
  138. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +2 -0
  139. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  140. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  141. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +2 -0
  142. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  143. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementVisualization.js +2 -0
  144. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  145. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  146. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  147. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  148. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  149. package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
  150. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
  151. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  152. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  153. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  154. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  155. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +16 -7
  156. package/views/3d/webgl-engine/effects/focusArea/{FocusAreaColor.glsl.js → FocusArea.glsl.js} +1 -1
  157. package/views/3d/webgl-engine/effects/focusArea/FocusArea.js +2 -0
  158. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.js +1 -1
  159. package/views/3d/webgl-engine/effects/focusArea/FocusAreaTechnique.js +2 -0
  160. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  161. package/views/3d/webgl-engine/lib/CutFill.js +2 -0
  162. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  163. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  164. package/views/3d/webgl.js +1 -1
  165. package/webscene/support/schemaValidator.js +1 -1
  166. package/webscene/version.js +2 -0
  167. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  168. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  169. package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
  170. package/assets/esri/core/workers/chunks/06c8547521ce9c97b258.js +0 -2
  171. package/assets/esri/core/workers/chunks/09653bd2a31d293a10d9.js +0 -2
  172. package/assets/esri/core/workers/chunks/17e9324a02b69733307a.js +0 -2
  173. package/assets/esri/core/workers/chunks/20b9bc8d5cbe9a18a644.js +0 -1
  174. package/assets/esri/core/workers/chunks/29a20a37e7837142fa6b.js +0 -2
  175. package/assets/esri/core/workers/chunks/81cd0cb9ae1371765d32.js +0 -1
  176. package/assets/esri/core/workers/chunks/95956d62591d689f1135.js +0 -1
  177. package/assets/esri/core/workers/chunks/b2812279662f1a5f8d06.js +0 -1
  178. package/assets/esri/core/workers/chunks/fdd4f78facec6387cdb0.js +0 -1
  179. package/assets/esri/core/workers/chunks/ffd5285c7b2c83208f87.js +0 -2
  180. package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +0 -2
  181. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +0 -2
  182. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +0 -2
  183. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +0 -2
  184. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +0 -2
  185. package/views/3d/webgl-engine/effects/focusArea/FocusAreaVisualization.js +0 -2
  186. package/views/3d/webgl-engine/lib/CutFillVisualization.js +0 -2
  187. /package/assets/esri/core/workers/chunks/{09653bd2a31d293a10d9.js.LICENSE.txt → 2b0558c1716425974563.js.LICENSE.txt} +0 -0
  188. /package/assets/esri/core/workers/chunks/{17e9324a02b69733307a.js.LICENSE.txt → 5f553da48d0ccbbfcd3c.js.LICENSE.txt} +0 -0
  189. /package/assets/esri/core/workers/chunks/{06c8547521ce9c97b258.js.LICENSE.txt → 6529b5cc3ac6baa29fff.js.LICENSE.txt} +0 -0
  190. /package/assets/esri/core/workers/chunks/{b82763e9401b16121f8d.js.LICENSE.txt → 995a433936fc90d41634.js.LICENSE.txt} +0 -0
  191. /package/assets/esri/core/workers/chunks/{ffd5285c7b2c83208f87.js.LICENSE.txt → ee63c693f2539f3bfa17.js.LICENSE.txt} +0 -0
  192. /package/assets/esri/core/workers/chunks/{29a20a37e7837142fa6b.js.LICENSE.txt → ef9489d1dccb817460bb.js.LICENSE.txt} +0 -0
@@ -0,0 +1,262 @@
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";
6
+ 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, IdentifiableMixinProperties } from "../../core/Identifiable.js";
11
+ import type { Action, State } from "./types.js";
12
+ import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
13
+ import type { StreamLayerViewConnectionStatus } from "../../views/layers/StreamLayerView.js";
14
+ import type { ActionToggleProperties } from "../../support/actions/ActionToggle.js";
15
+ import type { ActionButtonProperties } from "../../support/actions/ActionButton.js";
16
+ import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
17
+ import type { ItemPanelProperties } from "./ItemPanel.js";
18
+
19
+ export interface ItemProperties extends IdentifiableMixinProperties, Partial<Pick<Item, "actionsExpanded" | "actionsOpen" | "checkPublishStatusEnabled" | "childrenSortable" | "expanded" | "hidden" | "layer" | "listModeDisabled" | "open" | "parent" | "sortable" | "view" | "visible">> {
20
+ /** A nested 2-dimensional collection of actions that could be triggered on the item. */
21
+ actionsSections?: ReadonlyArrayOrCollection<ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>>;
22
+ /** When a layer contains sublayers, this property is a Collection of Item objects belonging to the given layer. */
23
+ children?: ReadonlyArrayOrCollection<ItemProperties>;
24
+ /**
25
+ * Additional panel state associated with this list item.
26
+ *
27
+ * @since 5.2
28
+ */
29
+ panel?: ItemPanelProperties;
30
+ /** The title of the layer. */
31
+ title?: string | null;
32
+ }
33
+
34
+ /**
35
+ * Represents a layer view that supports spatial referencing. Used to indicate whether the
36
+ * associated layer view can operate with a spatial reference in the current view context.
37
+ *
38
+ * @since 5.2
39
+ * @see [layerView](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#layerView)
40
+ */
41
+ export interface SpatiallyReferencedLayerView extends LayerView {
42
+ /**
43
+ * Indicates if the layer view supports the current spatial reference.
44
+ *
45
+ * @since 5.2
46
+ */
47
+ spatialReferenceSupported: boolean;
48
+ }
49
+
50
+ /**
51
+ * Represents a layer view for stream layers that provides connection status information.
52
+ * Used to determine the current connection state of a stream layer in the view.
53
+ *
54
+ * @since 5.2
55
+ * @see [connectionStatus](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#connectionStatus)
56
+ */
57
+ export interface ConnectedLayerView extends LayerView {
58
+ /**
59
+ * The current connection status of the stream layer view.
60
+ *
61
+ * @since 5.2
62
+ */
63
+ connectionStatus: StreamLayerViewConnectionStatus;
64
+ }
65
+
66
+ /**
67
+ * Defines how the visibility of child layers is managed within a list item.
68
+ *
69
+ * - `independent`: Each child layer's visibility is controlled separately.
70
+ * - `inherited`: Child layers inherit the visibility from their parent layer.
71
+ * - `exclusive`: Only one child layer can be visible at a time.
72
+ *
73
+ * @see [visibilityMode](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#visibilityMode)
74
+ */
75
+ export type ItemVisibilityMode = "independent" | "inherited" | "exclusive";
76
+
77
+ /**
78
+ * Represents state for a single layer entry in a list-oriented workflow.
79
+ *
80
+ * This class provides access to associated layer properties, supports nested child items,
81
+ * and stores action and panel state that can be consumed by separate UI components.
82
+ *
83
+ * To hide a layer entry based on layer configuration, set [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode)
84
+ * to `hide` on the corresponding layer.
85
+ *
86
+ * @since 5.2
87
+ * @see [ItemPanel](https://developers.arcgis.com/javascript/latest/references/core/layers/list/ItemPanel/)
88
+ */
89
+ export default class Item extends ItemSuperclass {
90
+ constructor(properties?: ItemProperties);
91
+ /**
92
+ * Whether the actions state is expanded.
93
+ *
94
+ * @default false
95
+ */
96
+ accessor actionsExpanded: boolean;
97
+ /** Backward-compatible alias of [actionsExpanded](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#actionsExpanded). */
98
+ accessor actionsOpen: boolean;
99
+ /** A nested 2-dimensional collection of actions that could be triggered on the item. */
100
+ get actionsSections(): Collection<Collection<Action>>;
101
+ set actionsSections(value: ReadonlyArrayOrCollection<ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>>);
102
+ /**
103
+ * Enables publish-status checks used by [publishing](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#publishing).
104
+ *
105
+ * @default false
106
+ * @since 5.2
107
+ */
108
+ accessor checkPublishStatusEnabled: boolean;
109
+ /** When a layer contains sublayers, this property is a Collection of Item objects belonging to the given layer. */
110
+ get children(): Collection<Item>;
111
+ set children(value: ReadonlyArrayOrCollection<ItemProperties>);
112
+ /**
113
+ * Indicates if the children of a list item (or sublayers in a GroupLayer) can be sorted or moved/reordered.
114
+ *
115
+ * @default true
116
+ * @since 5.2
117
+ * @example
118
+ * // disables the children of a parent list item from being sorted
119
+ * listItem.childrenSortable = false;
120
+ */
121
+ accessor childrenSortable: boolean;
122
+ /**
123
+ * Only valid when the list item represents a [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/). Indicates
124
+ * the [StreamLayerView.connectionStatus](https://developers.arcgis.com/javascript/latest/references/core/views/layers/StreamLayerView/#connectionStatus) of the stream layer connection.
125
+ * This overrides [updating](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#updating).
126
+ *
127
+ * @since 5.2
128
+ */
129
+ get connectionStatus(): ConnectedLayerView["connectionStatus"] | null | undefined;
130
+ /** The Error object returned if an error occurred. */
131
+ get error(): EsriError | null | undefined;
132
+ /**
133
+ * Whether this list item's details are expanded.
134
+ *
135
+ * @default false
136
+ */
137
+ accessor expanded: boolean;
138
+ /**
139
+ * When `true`, marks this list item as hidden for consumer UIs.
140
+ *
141
+ * This is an alternative to [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode), which hides a layer
142
+ * based on layer configuration.
143
+ *
144
+ * @default false
145
+ * @since 5.2
146
+ */
147
+ accessor hidden: boolean;
148
+ /**
149
+ * Whether the layer is unsupported by the view.
150
+ *
151
+ * @default false
152
+ * @since 5.2
153
+ */
154
+ get incompatible(): boolean;
155
+ /** The layer associated with the triggered action. */
156
+ accessor layer: Layer | Sublayer | SubtypeSublayer | SubtypeGroupLayer | null;
157
+ /**
158
+ * The [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) displaying data for the
159
+ * associated [layer](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#layer).
160
+ */
161
+ get layerView(): LayerView | SpatiallyReferencedLayerView | ConnectedLayerView | null | undefined;
162
+ /**
163
+ * Specifies whether to ignore the [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode) property of the child layers in the list item.
164
+ * Use this when child inclusion should be controlled externally instead of by each child's
165
+ * `listMode` value.
166
+ *
167
+ * @default false
168
+ * @since 5.2
169
+ * @see [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode)
170
+ */
171
+ accessor listModeDisabled: boolean;
172
+ /** Backward-compatible alias of [expanded](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#expanded). */
173
+ accessor open: boolean;
174
+ /**
175
+ * Additional panel state associated with this list item.
176
+ *
177
+ * @since 5.2
178
+ */
179
+ get panel(): ItemPanel;
180
+ set panel(value: ItemPanelProperties);
181
+ /**
182
+ * The parent of this item
183
+ *
184
+ * @since 5.2
185
+ */
186
+ accessor parent: Item | null | undefined;
187
+ /**
188
+ * Value is `true` when [layer](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#layer) is being published.
189
+ * Value is `false` when the layer is not publishing or
190
+ * [checkPublishStatusEnabled](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#checkPublishStatusEnabled) is `false`.
191
+ *
192
+ * @default false
193
+ * @since 5.2
194
+ */
195
+ get publishing(): boolean;
196
+ /**
197
+ * Indicates if the list item (or layer in the map) can be sorted or moved/reordered.
198
+ *
199
+ * @default true
200
+ * @since 5.2
201
+ * @example
202
+ * // disables the list item from being sorted
203
+ * listItem.sortable = false;
204
+ */
205
+ accessor sortable: boolean;
206
+ /**
207
+ * Overall state of this item for consumer UIs.
208
+ *
209
+ * @since 5.2
210
+ */
211
+ get state(): State;
212
+ /** The title of the layer. */
213
+ get title(): string;
214
+ set title(value: string | null | undefined);
215
+ /**
216
+ * Value is `true` when the layer is updating; for example, if it is in the process of fetching data.
217
+ *
218
+ * @default false
219
+ */
220
+ get updating(): boolean;
221
+ /** The view context for this list item. */
222
+ accessor view: MapViewOrSceneView | null | undefined;
223
+ /** Indicates how to manage the visibility of the children layers. */
224
+ get visibilityMode(): ItemVisibilityMode;
225
+ /**
226
+ * Indicates if the Item is visible.
227
+ *
228
+ * @default true
229
+ */
230
+ accessor visible: boolean;
231
+ /**
232
+ * Whether the layer is visible at the current scale or not.
233
+ *
234
+ * @default true
235
+ */
236
+ get visibleAtCurrentScale(): boolean;
237
+ /**
238
+ * Whether the layer is visible at the current time extent or not.
239
+ *
240
+ * @default true
241
+ * @since 5.2
242
+ */
243
+ get visibleAtCurrentTimeExtent(): boolean;
244
+ /**
245
+ * Creates a deep clone of this object.
246
+ *
247
+ * @returns A clone of the new [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/) instance.
248
+ */
249
+ clone(): Item;
250
+ /**
251
+ * Toggles the visibility state of the associated layer.
252
+ *
253
+ * If `value` is provided, visibility is set to that value.
254
+ * Otherwise, visibility is inverted.
255
+ *
256
+ * @param value - Optional target visibility value.
257
+ * @returns The resulting visibility value.
258
+ * @since 5.2
259
+ */
260
+ toggleVisibility(value?: boolean): boolean;
261
+ }
262
+ declare const ItemSuperclass: typeof Accessor & typeof IdentifiableMixin
@@ -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 i}from"../../core/arrayUtils.js";import s from"../../core/Collection.js";import{IdentifiableMixin as l}from"../../core/Identifiable.js";import{watch as r,initial as n}from"../../core/reactiveUtils.js";import{property as o,cast as a,subclass as d}from"../../core/accessorSupport/decorators.js";import{get as h}from"../../core/accessorSupport/get.js";import p from"./ItemPanel.js";import{isLayerOutsideScaleRange as c,findLayerVisibilityMode as u,findLayerListMode as y,canDisplayLayer as b,getNormalizedChildLayerProperty as m}from"./support/layerListUtils.js";import v from"../../support/actions/ActionBase.js";import g from"../../support/actions/ActionButton.js";import f from"../../support/actions/ActionToggle.js";var C;const w=s.ofType({key:"type",defaultKeyValue:"button",base:v,typeMap:{button:g,toggle:f}}),_=s.ofType(w),S="layer",E="child-list-mode",x="hide";let M=C=class extends(l(t)){constructor(e){super(e),this.actionsSections=new _,this.actionsExpanded=!1,this.checkPublishStatusEnabled=!1,this.children=new(s.ofType(C)),this.childrenSortable=!0,this.hidden=!1,this.layer=null,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.expanded=!1,this.parent=null,this.view=null}initialize(){if(this.addHandles([r(()=>[this.layer,this.layer?.listMode,this.listModeDisabled],()=>this._watchLayerProperties(this.layer),n),r(()=>this.checkPublishStatusEnabled,e=>this._updateChildrenPublishing(e),n),r(()=>this.view,e=>this._updateChildrenView(e),n),r(()=>this.panel,e=>this._setItemOnPanel(e),n)]),"function"==typeof this.listItemCreatedFunction){const 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(){const{layerView:e,publishing:t}=this;if(!t&&e&&"connectionStatus"in e)return e.connectionStatus}get error(){return this.layer?.loadError}get incompatible(){const{layerView:e}=this;return!(!e||!("spatialReferenceSupported"in e))&&!e.spatialReferenceSupported}get layerView(){const{layer:e,view:t}=this;if(!e||!t||"sublayer"===e.type)return null;const i="subtype-sublayer"===e.type?e.parent:e;return t.allLayerViews.find(e=>e.layer===i)??null}get open(){return this.expanded}set open(e){this.expanded=e}set panel(e){const t=this._get("panel");e!==t&&e&&t?.destroy(),this._set("panel",e)}castPanel(e){return this.expanded&&!e.hasOwnProperty("open")&&(e.open=!0),e?new p(e):null}get sortable(){return"knowledge-graph-sublayer"!==this.layer?.type&&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(){const e=h(this,"layer.layer");return(!e||e&&h(this,"layer.layer.loaded"))&&h(this,"layer.title")||h(this,"layer.attributes.title")||""}set title(e){this._override("title",e)}get publishing(){const{layer:e,checkPublishStatusEnabled:t}=this;return!!(t&&e&&"publishingInfo"in e&&"publishing"===e.publishingInfo?.status)}get updating(){const{layerView:e,connectionStatus:t,layer:i,publishing:s}=this;return!s&&!t&&(e?e.updating:"loading"===i?.loadStatus||!1)}get visible(){return!!this.layer?.visible}set visible(e){const t=this.layer;t&&(t.visible=e)}get visibleAtCurrentScale(){return this.layerView?.visibleAtCurrentScale??!c(this.layer,this.view?.scale)}get visibleAtCurrentTimeExtent(){return this.layerView?.visibleAtCurrentTimeExtent??!0}get visibilityMode(){return u(this.layer)}clone(){return new C({actionsExpanded:this.actionsExpanded,actionsSections:this.actionsSections.clone(),checkPublishStatusEnabled:this.checkPublishStatusEnabled,children:this.children.clone(),childrenSortable:this.childrenSortable,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;const t=e??!this.visible;return this.visible=t,this.visible}_setItemOnPanel(e){e&&(e.listItem=this)}_updateChildrenPublishing(e){this.children?.forEach(t=>t.checkPublishStatusEnabled=e)}_updateChildrenView(e){const t=this.children;t&&t.forEach(t=>t.view=e)}_createChildren(e){const{listModeDisabled:t,children:i}=this,s=e.filter(e=>!i.some(t=>t.layer===e));i.addMany(this._createChildItems(s,t).toArray())}_destroyChildren(e){const{children:t}=this,i=t.filter(t=>!!t.layer&&!e.includes(t.layer));t.destroyMany(i.toArray())}_sortChildren(e){this.children.sort((t,i)=>e.indexOf(i.layer)-e.indexOf(t.layer))}_destroyAllChildren(){this.removeHandles(E),this.children.destroyAll()}_watchChildLayerListMode(e){this.removeHandles(E),this.listModeDisabled||this.addHandles(e.toArray().map(t=>r(()=>t.listMode,()=>this._compileChildren(e))),E)}_compileChildren(e){const t=this.listModeDisabled?e:e?.filter(e=>y(e)!==x);e?.length?(this._createChildren(t),this._destroyChildren(t),this._sortChildren(t),this._watchChildLayerListMode(e)):this._destroyAllChildren()}_watchSublayerChanges(e){e&&this.addHandles(e.on("change",()=>this._compileChildren(e)),S)}_initializeChildLayers(e){this._compileChildren(e),this._watchSublayerChanges(e)}_createChildItems(e,t){return e.reverse().map(e=>t||b(e)?new C({layer:e,checkPublishStatusEnabled:this.checkPublishStatusEnabled,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,parent:this,view:this.view}):null).filter(i)}_watchLayerProperties(e){if(this.removeHandles(S),this.removeHandles(E),!e)return;if("hide-children"===(!this.listModeDisabled&&y(e)))return void this.children.destroyAll();const t=m(e);t&&this.addHandles(r(()=>e[t],i=>{const s=i;e.hasOwnProperty(t)&&s&&this._initializeChildLayers(s)},n),S)}};e([o({type:_})],M.prototype,"actionsSections",void 0),e([o()],M.prototype,"actionsExpanded",void 0),e([o()],M.prototype,"actionsOpen",null),e([o()],M.prototype,"checkPublishStatusEnabled",void 0),e([o({type:s.ofType(C)})],M.prototype,"children",void 0),e([o()],M.prototype,"childrenSortable",void 0),e([o({readOnly:!0})],M.prototype,"connectionStatus",null),e([o({readOnly:!0})],M.prototype,"error",null),e([o()],M.prototype,"hidden",void 0),e([o({readOnly:!0})],M.prototype,"incompatible",null),e([o()],M.prototype,"layer",void 0),e([o({readOnly:!0})],M.prototype,"layerView",null),e([o()],M.prototype,"listItemCreatedFunction",void 0),e([o({nonNullable:!0})],M.prototype,"listModeDisabled",void 0),e([o()],M.prototype,"expanded",void 0),e([o()],M.prototype,"open",null),e([o({type:p})],M.prototype,"panel",null),e([a("panel")],M.prototype,"castPanel",null),e([o()],M.prototype,"parent",void 0),e([o({value:!0})],M.prototype,"sortable",null),e([o({readOnly:!0})],M.prototype,"state",null),e([o()],M.prototype,"title",null),e([o({readOnly:!0})],M.prototype,"publishing",null),e([o({readOnly:!0})],M.prototype,"updating",null),e([o()],M.prototype,"view",void 0),e([o()],M.prototype,"visible",null),e([o({readOnly:!0})],M.prototype,"visibleAtCurrentScale",null),e([o({readOnly:!0})],M.prototype,"visibleAtCurrentTimeExtent",null),e([o({readOnly:!0})],M.prototype,"visibilityMode",null),M=C=e([d("esri.layers.list.Item")],M);const P=M;export{P as default};
@@ -0,0 +1,75 @@
1
+ import type Accessor from "../../core/Accessor.js";
2
+ import type Item from "./Item.js";
3
+ import type { IdentifiableMixin, IdentifiableMixinProperties } from "../../core/Identifiable.js";
4
+
5
+ export interface ItemPanelProperties extends IdentifiableMixinProperties, Partial<Pick<ItemPanel, "content" | "disabled" | "flowEnabled" | "icon" | "image" | "listItem" | "open" | "title" | "visible">> {}
6
+
7
+ /**
8
+ * Arbitrary data associated with the panel.
9
+ *
10
+ * @see [content](https://developers.arcgis.com/javascript/latest/references/core/layers/list/ItemPanel/#content)
11
+ */
12
+ export type ItemPanelContent = "legend" | HTMLElement | string;
13
+
14
+ /**
15
+ * Defines one or more panel content values.
16
+ *
17
+ * @see [content](https://developers.arcgis.com/javascript/latest/references/core/layers/list/ItemPanel/#content)
18
+ */
19
+ export type ItemPanelContents = ItemPanelContent | ItemPanelContent[];
20
+
21
+ /**
22
+ * Generic state container for additional list item details.
23
+ *
24
+ * This class does not render UI. It stores panel state that can be consumed by separate view components.
25
+ *
26
+ * @since 5.2
27
+ */
28
+ export default class ItemPanel extends ItemPanelSuperclass {
29
+ constructor(properties?: ItemPanelProperties);
30
+ /** Arbitrary content metadata for the panel. */
31
+ accessor content: ItemPanelContents | null | undefined;
32
+ /**
33
+ * If `true`, panel interactions are disabled.
34
+ *
35
+ * @default false
36
+ * @since 5.2
37
+ */
38
+ accessor disabled: boolean;
39
+ /**
40
+ * Indicates if panel content should be shown in a drill-in flow by a consumer UI.
41
+ *
42
+ * @default false
43
+ * @since 5.2
44
+ */
45
+ accessor flowEnabled: boolean;
46
+ /**
47
+ * Identifier for an icon to represent this panel.
48
+ *
49
+ * @since 5.2
50
+ */
51
+ accessor icon: string | null | undefined;
52
+ /** URL or data URI used by consumer UIs to represent the panel. */
53
+ accessor image: string | null | undefined;
54
+ /** The parent list item associated with this panel. */
55
+ accessor listItem: Item | null | undefined;
56
+ /**
57
+ * Indicates if the panel is open.
58
+ *
59
+ * @default false
60
+ */
61
+ accessor open: boolean;
62
+ /**
63
+ * The title of the panel.
64
+ *
65
+ * @default ""
66
+ */
67
+ accessor title: string;
68
+ /**
69
+ * Indicates whether consumer UIs should show this panel.
70
+ *
71
+ * @default true
72
+ */
73
+ accessor visible: boolean;
74
+ }
75
+ declare const ItemPanelSuperclass: typeof Accessor & typeof IdentifiableMixin
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import o from"../../core/Accessor.js";import{IdentifiableMixin as e}from"../../core/Identifiable.js";import{property as i,subclass as s}from"../../core/accessorSupport/decorators.js";let r=class extends(e(o)){constructor(t){super(t),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}};t([i()],r.prototype,"content",void 0),t([i()],r.prototype,"disabled",void 0),t([i()],r.prototype,"flowEnabled",void 0),t([i()],r.prototype,"icon",void 0),t([i()],r.prototype,"image",void 0),t([i()],r.prototype,"listItem",void 0),t([i()],r.prototype,"open",void 0),t([i()],r.prototype,"title",void 0),t([i()],r.prototype,"visible",void 0),r=t([s("esri.layers.list.ItemPanel")],r);const l=r;export{l as default};
@@ -0,0 +1,106 @@
1
+ import type Collection from "../../core/Collection.js";
2
+ import type Item from "./Item.js";
3
+ import type { EventedAccessor } from "../../core/Evented.js";
4
+ import type { Action, ItemModifier, State } from "./types.js";
5
+ import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
6
+
7
+ export interface LayerItemCollectionProperties extends Partial<Pick<LayerItemCollection, "checkPublishStatusEnabled" | "listItemCreatedFunction" | "listModeDisabled" | "view">> {}
8
+
9
+ export interface LayerItemCollectionEvents {
10
+ /**
11
+ * Emitted when the user clicks an [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or
12
+ * [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/) in a layer list.
13
+ * Use this event to run custom logic when a specific action is triggered.
14
+ *
15
+ * @see [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/layers/list/LayerItemCollection/#event-trigger-action)
16
+ */
17
+ "trigger-action": LayerItemCollectionTriggerActionEvent;
18
+ }
19
+
20
+ /**
21
+ * The event object for the `trigger-action` event in the layer lists.
22
+ *
23
+ * @see [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/layers/list/LayerItemCollection/#event-trigger-action)
24
+ */
25
+ export interface LayerItemCollectionTriggerActionEvent {
26
+ /** The action that was clicked by the user. */
27
+ action: Action;
28
+ /** The list item associated with the action. */
29
+ item: Item;
30
+ }
31
+
32
+ /**
33
+ * Provides list-item orchestration logic for layer-list workflows.
34
+ * To hide layers from the list, set the [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode)
35
+ * property on the layer(s) to `hide`.
36
+ *
37
+ * @since 5.2
38
+ */
39
+ export default class LayerItemCollection extends EventedAccessor {
40
+ /**
41
+ * @deprecated
42
+ * Do not directly reference this property.
43
+ * Use EventNames and EventTypes helpers from \@arcgis/core/Evented
44
+ */
45
+ "@eventTypes": LayerItemCollectionEvents;
46
+ constructor(properties?: LayerItemCollectionProperties);
47
+ /**
48
+ * Whether to provide an indication if a layer is being published.
49
+ * The [Item.publishing](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#publishing) property
50
+ * will be `false` if `checkPublishStatusEnabled` is `false`.
51
+ *
52
+ * @default false
53
+ * @since 5.2
54
+ */
55
+ accessor checkPublishStatusEnabled: boolean;
56
+ /**
57
+ * Specifies a function that accesses each [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/).
58
+ * Each list item can be modified according to its modifiable properties.
59
+ * Actions can be added to list items using the
60
+ * [Item.actionsSections](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/#actionsSections) property.
61
+ *
62
+ * @since 5.2
63
+ */
64
+ accessor listItemCreatedFunction: ItemModifier | null | undefined;
65
+ /**
66
+ * Specifies whether to ignore the [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode) property to display all layers.
67
+ *
68
+ * @default false
69
+ * @since 5.2
70
+ * @see [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode)
71
+ */
72
+ accessor listModeDisabled: boolean;
73
+ /**
74
+ * A collection of [Item](https://developers.arcgis.com/javascript/latest/references/core/layers/list/Item/)s representing operational layers.
75
+ * To hide layers from the list, set [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode) to `hide`.
76
+ *
77
+ * @see [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode)
78
+ */
79
+ get operationalItems(): Collection<Item>;
80
+ /**
81
+ * The view model's state.
82
+ *
83
+ * @default "disabled"
84
+ */
85
+ get state(): State;
86
+ /** The view context for this view model. */
87
+ accessor view: MapViewOrSceneView | null | undefined;
88
+ /**
89
+ * Moves a list item from one position to another.
90
+ *
91
+ * @param targetItem - The list item to move.
92
+ * @param fromParentItem - The current parent list item, if any.
93
+ * @param toParentItem - The target parent list item, if any.
94
+ * @param newIndex - The new index for the target item.
95
+ * @since 5.2
96
+ */
97
+ moveItem(targetItem: Item | null | undefined, fromParentItem: Item | null | undefined, toParentItem: Item | null | undefined, newIndex: number): void;
98
+ /**
99
+ * Triggers the [@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/layers/list/LayerItemCollection/#event-trigger-action) event and executes
100
+ * the given [action](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/).
101
+ *
102
+ * @param action - The action to execute.
103
+ * @param item - An item associated with the action.
104
+ */
105
+ triggerAction(action: Action, item: Item): void;
106
+ }
@@ -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 s}from"../../core/Evented.js";import{watch as i,initial as a}from"../../core/reactiveUtils.js";import{property as r,subclass as l}from"../../core/accessorSupport/decorators.js";import o from"./Item.js";import{getItemLayers as n,findLayerListMode as d}from"./support/layerListUtils.js";import{isLinkChartView as h}from"../../linkChart/guards.js";const m={view:"view",viewLayers:"view-layers",mapLayers:"map-layers",layerViews:"layer-views",layerListMode:"layer-list-mode"},c="hide",p=t.ofType(o);let y=class extends s{constructor(e){super(e),this.checkPublishStatusEnabled=!1,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.operationalItems=new p,this.view=null}initialize(){this.addHandles([i(()=>!0===this.view?.ready,()=>this._viewHandles(),a),i(()=>[this.listItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._recompileList()),i(()=>h(this.view)?this.view.inGeographicLayout:null,()=>this._compileList())],m.view)}destroy(){this._removeAllItems(),this.view=null}get state(){const{view:e}=this;return e?.ready?"ready":e?"loading":"disabled"}get totalItems(){return this.operationalItems.flatten(e=>e.children).length}triggerAction(e,t){e&&!e.disabled&&this.emit("trigger-action",{action:e,item:t})}moveItem(e,t,s,i){const a=e?.layer;if(!a||"subtype-sublayer"===a.type||"sublayer"===a.type)return;const r=this.view?.map?.layers,l=t?n(t):r,o=s?n(s):r;if(!l||!o)return;const{operationalItems:d}=this,h=t?.children||d,m=s?.children||d,c=o.length-i;e.parent=s||null,h.remove(e),l.remove(a),m.includes(e)||m.add(e,c),o.includes(a)||o.add(a,c),this._compileList()}_createLayerViewHandles(e){this.removeHandles(m.layerViews),this._compileList(),e&&this.addHandles(e.on("change",()=>this._compileList()),m.layerViews)}_createMapLayerHandles(e){this.removeHandles(m.mapLayers),this._compileList(),e&&this.addHandles(e.on("change",()=>this._compileList()),m.mapLayers)}_createItem(e){const{view:t,listItemCreatedFunction:s,checkPublishStatusEnabled:i,listModeDisabled:a}=this;return new o({checkPublishStatusEnabled:i,listModeDisabled:a,layer:e,listItemCreatedFunction:s,view:t})}_removeAllItems(){this.operationalItems.destroyAll()}_getViewableLayers(e){return e?this.listModeDisabled?e:e.filter(e=>d(e)!==c):void 0}_watchLayersListMode(e){this.removeHandles(m.layerListMode),e&&!this.listModeDisabled&&this.addHandles(i(()=>e.filter(e=>"listMode"in e).map(e=>e.listMode).toArray(),()=>this._compileList()),m.layerListMode)}_compileList(){const e=this.view?.map?.layers,t=h(this.view)&&!this.view.inGeographicLayout?e?.filter(({type:e})=>"link-chart"===e):e;this._watchLayersListMode(t);const s=this._getViewableLayers(t);s?.length?(this._createNewItems(s),this._removeItems(s),this._sortItems(s)):this._removeAllItems()}_createNewItems(e){const{operationalItems:t}=this;e.forEach(e=>{t.some(t=>t.layer===e)||t.add(this._createItem(e))})}_removeItems(e){const{operationalItems:t}=this,s=[];t.forEach(t=>{t&&e&&e.includes(t.layer)||s.push(t)}),t.destroyMany(s)}_sortItems(e){const{operationalItems:t}=this;t.sort((t,s)=>{const i=e.indexOf(t.layer),a=e.indexOf(s.layer);return i>a?-1:i<a?1:0})}_recompileList(){this._removeAllItems(),this._compileList()}_viewHandles(){const{view:e}=this;this.removeHandles([m.mapLayers,m.layerViews,m.viewLayers]),e?.ready?this.addHandles([i(()=>this.view?.map?.allLayers,e=>this._createMapLayerHandles(e),a),i(()=>this.view?.allLayerViews,e=>this._createLayerViewHandles(e),a)],m.viewLayers):this._removeAllItems()}};e([r()],y.prototype,"checkPublishStatusEnabled",void 0),e([r()],y.prototype,"listItemCreatedFunction",void 0),e([r({nonNullable:!0})],y.prototype,"listModeDisabled",void 0),e([r({type:p})],y.prototype,"operationalItems",void 0),e([r({readOnly:!0})],y.prototype,"state",null),e([r()],y.prototype,"totalItems",null),e([r()],y.prototype,"view",void 0),y=e([l("esri.layers.list.LayerItemCollection")],y);const v=y;export{v as default};
@@ -0,0 +1,136 @@
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";
6
+ import type TableItemPanel from "./TableItemPanel.js";
7
+ import type Sublayer from "../support/Sublayer.js";
8
+ import type SubtypeSublayer from "../support/SubtypeSublayer.js";
9
+ import type { IdentifiableMixin, IdentifiableMixinProperties } from "../../core/Identifiable.js";
10
+ import type { Action } from "./types.js";
11
+ import type { ActionToggleProperties } from "../../support/actions/ActionToggle.js";
12
+ import type { ActionButtonProperties } from "../../support/actions/ActionButton.js";
13
+ import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
14
+ import type { TableItemPanelProperties } from "./TableItemPanel.js";
15
+
16
+ export interface TableItemProperties extends IdentifiableMixinProperties, Partial<Pick<TableItem, "actionsOpen" | "checkPublishStatusEnabled" | "hidden" | "layer" | "listModeDisabled" | "open" | "parent">> {
17
+ /** A nested 2-dimensional collection of actions that can be triggered on the item. */
18
+ actionsSections?: ReadonlyArrayOrCollection<ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>>;
19
+ /**
20
+ * Child items when the associated layer contains sublayers.
21
+ *
22
+ * @since 5.2
23
+ */
24
+ children?: ReadonlyArrayOrCollection<TableItemProperties>;
25
+ /**
26
+ * Additional panel state associated with this item.
27
+ *
28
+ * @since 5.2
29
+ */
30
+ panel?: TableItemPanelProperties;
31
+ /** The title of the associated table. */
32
+ title?: string | null;
33
+ }
34
+
35
+ /** Event object passed to a table list item creation callback. */
36
+ export interface TableItemModifierEvent {
37
+ /** The table list item being created. */
38
+ item: TableItem;
39
+ }
40
+
41
+ /**
42
+ * Function used to customize table list items during creation.
43
+ *
44
+ * @param event - The event containing the table list item being created.
45
+ */
46
+ export type TableItemModifier = (event: TableItemModifierEvent) => void;
47
+
48
+ /**
49
+ * Represents a table-related list item with support for child items, actions, and panel state.
50
+ *
51
+ * @since 5.2
52
+ */
53
+ export default class TableItem extends TableItemSuperclass {
54
+ constructor(properties?: TableItemProperties);
55
+ /**
56
+ * Indicates whether the actions state is open.
57
+ *
58
+ * @default false
59
+ */
60
+ accessor actionsOpen: boolean;
61
+ /** A nested 2-dimensional collection of actions that can be triggered on the item. */
62
+ get actionsSections(): Collection<Collection<Action>>;
63
+ set actionsSections(value: ReadonlyArrayOrCollection<ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>>);
64
+ /**
65
+ * Enables publish-status checks used by [publishing](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/#publishing).
66
+ *
67
+ * @default false
68
+ * @since 5.2
69
+ */
70
+ accessor checkPublishStatusEnabled: boolean;
71
+ /**
72
+ * Child items when the associated layer contains sublayers.
73
+ *
74
+ * @since 5.2
75
+ */
76
+ get children(): Collection<TableItem>;
77
+ set children(value: ReadonlyArrayOrCollection<TableItemProperties>);
78
+ /** The error object returned if an error occurred. */
79
+ get error(): EsriError | null | undefined;
80
+ /**
81
+ * When `true`, marks this item as hidden for consumer UIs.
82
+ *
83
+ * @default false
84
+ * @since 5.2
85
+ */
86
+ accessor hidden: boolean;
87
+ /** The layer associated with the triggered action. */
88
+ accessor layer: Layer | Sublayer | SubtypeSublayer | SubtypeGroupLayer;
89
+ /**
90
+ * Specifies whether to ignore the [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode) property of child layers.
91
+ *
92
+ * @default false
93
+ * @since 5.2
94
+ * @see [Layer.listMode](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/#listMode)
95
+ */
96
+ accessor listModeDisabled: boolean;
97
+ /**
98
+ * Indicates whether the item is open.
99
+ *
100
+ * @default false
101
+ * @since 5.2
102
+ */
103
+ accessor open: boolean;
104
+ /**
105
+ * Additional panel state associated with this item.
106
+ *
107
+ * @since 5.2
108
+ */
109
+ get panel(): TableItemPanel;
110
+ set panel(value: TableItemPanelProperties);
111
+ /**
112
+ * The parent item.
113
+ *
114
+ * @since 5.2
115
+ */
116
+ accessor parent: TableItem | null | undefined;
117
+ /**
118
+ * Value is `true` when the [layer](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/#layer) is being published.
119
+ * Value is `false` when not publishing or when
120
+ * [checkPublishStatusEnabled](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/#checkPublishStatusEnabled) is `false`.
121
+ *
122
+ * @default false
123
+ * @since 5.2
124
+ */
125
+ get publishing(): boolean;
126
+ /** The title of the associated table. */
127
+ get title(): string;
128
+ set title(value: string | null | undefined);
129
+ /**
130
+ * Creates a deep clone of this object.
131
+ *
132
+ * @returns A clone of the new [TableItem](https://developers.arcgis.com/javascript/latest/references/core/layers/list/TableItem/) instance.
133
+ */
134
+ clone(): TableItem;
135
+ }
136
+ declare const TableItemSuperclass: typeof Accessor & typeof IdentifiableMixin
@@ -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 i}from"../../core/arrayUtils.js";import s from"../../core/Collection.js";import{IdentifiableMixin as l}from"../../core/Identifiable.js";import{watch as r,initial as o}from"../../core/reactiveUtils.js";import{property as n,cast as a,subclass as h}from"../../core/accessorSupport/decorators.js";import{ensureType as d}from"../../core/accessorSupport/ensureType.js";import{get as p}from"../../core/accessorSupport/get.js";import c from"./TableItemPanel.js";import{canDisplayLayer as y,findLayerListMode as u,getNormalizedChildLayerProperty as m}from"./support/layerListUtils.js";import b from"../../support/actions/ActionBase.js";import f from"../../support/actions/ActionButton.js";import C from"../../support/actions/ActionToggle.js";var _;const v="layer",g="child-list-mode",P="hide",I=s.ofType({key:"type",defaultKeyValue:"button",base:b,typeMap:{button:f,toggle:C}}),S=s.ofType(I);let M=_=class extends(l(t)){constructor(e){super(e),this.actionsSections=new S,this.actionsOpen=!1,this.checkPublishStatusEnabled=!1,this.children=new(s.ofType(_)),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([r(()=>[this.layer?.listMode,this.listModeDisabled],()=>this._watchLayerProperties(this.layer),o),r(()=>this.checkPublishStatusEnabled,e=>this._updateChildrenPublishing(e),o),r(()=>this.panel,e=>this._setItemOnPanel(e),o)]),"function"==typeof this.listItemCreatedFunction){const e={item:this};this.listItemCreatedFunction.call(null,e)}}destroy(){this.panel?.destroy(),this.children.destroyAll()}get error(){return this.layer?.loadError}set panel(e){const 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),d(c,e)}get publishing(){const{layer:e,checkPublishStatusEnabled:t}=this;return!!(t&&e&&"publishingInfo"in e&&"publishing"===e.publishingInfo?.status)}get title(){const e=p(this,"layer.layer");return(!e||e&&p(this,"layer.layer.loaded")?this.layer?.title:null)??""}set title(e){this._overrideIfSome("title",e)}clone(){return new _({actionsSections:this.actionsSections.clone(),actionsOpen:this.actionsOpen,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})}_updateChildrenPublishing(e){this.children?.forEach(t=>t.checkPublishStatusEnabled=e)}_setItemOnPanel(e){e&&(e.listItem=this)}_createChildItems(e,t){return e.reverse().map(e=>t||y(e)?new _({layer:e,checkPublishStatusEnabled:this.checkPublishStatusEnabled,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,parent:this}):null).filter(i)}_createChildren(e){const{listModeDisabled:t,children:i}=this,s=e.reverse().filter(e=>!i.some(t=>t.layer===e));i.addMany(this._createChildItems(s,t))}_destroyChildren(e){const{children:t}=this,i=t.filter(t=>!!t.layer&&!e.includes(t.layer));t.destroyMany(i)}_sortChildren(e){this.children.sort((t,i)=>e.indexOf(i.layer)-e.indexOf(t.layer))}_destroyAllChildren(){this.removeHandles(g),this.children.destroyAll()}_compileChildren(e){const t=this.listModeDisabled?e:e?.filter(e=>u(e)!==P);e?.length?(this._createChildren(t),this._destroyChildren(t),this._sortChildren(t),this._watchChildLayerListMode(e)):this._destroyAllChildren()}_watchChildLayerListMode(e){this.removeHandles(g),this.listModeDisabled||this.addHandles(e.toArray().map(t=>r(()=>t.listMode,()=>this._compileChildren(e))),g)}_watchSublayerChanges(e){e&&this.addHandles(e.on("change",()=>this._compileChildren(e)),v)}_initializeChildLayers(e){this._compileChildren(e),this._watchSublayerChanges(e)}_watchLayerProperties(e){if(this.removeHandles(v),this.removeHandles(g),!e)return;e.load().catch(()=>{});if("hide-children"===(!this.listModeDisabled&&u(e)))return void this.children.destroyAll();const t=m(e);t&&this.addHandles(r(()=>e[t],i=>{e.hasOwnProperty(t)&&this._initializeChildLayers(i)},o),v)}};e([n({type:S})],M.prototype,"actionsSections",void 0),e([n()],M.prototype,"actionsOpen",void 0),e([n()],M.prototype,"checkPublishStatusEnabled",void 0),e([n({type:s.ofType(_)})],M.prototype,"children",void 0),e([n({readOnly:!0})],M.prototype,"error",null),e([n()],M.prototype,"hidden",void 0),e([n()],M.prototype,"layer",void 0),e([n()],M.prototype,"listItemCreatedFunction",void 0),e([n({nonNullable:!0})],M.prototype,"listModeDisabled",void 0),e([n()],M.prototype,"open",void 0),e([n({type:c})],M.prototype,"panel",null),e([a("panel")],M.prototype,"castPanel",null),e([n()],M.prototype,"parent",void 0),e([n({readOnly:!0})],M.prototype,"publishing",null),e([n()],M.prototype,"sortable",void 0),e([n()],M.prototype,"title",null),M=_=e([h("esri.layers.list.TableItem")],M);const j=M;export{j as default};