@arcgis/core 4.34.0-next.35 → 4.34.0-next.37

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 (720) hide show
  1. package/AttributeBinsGraphic.js +1 -1
  2. package/Basemap.js +1 -1
  3. package/Camera.js +1 -1
  4. package/CameraLayout.js +1 -1
  5. package/Graphic.js +1 -1
  6. package/Ground.js +1 -1
  7. package/Map.js +1 -1
  8. package/PopupTemplate.js +1 -1
  9. package/WebDocument2D.js +1 -1
  10. package/WebScene.js +1 -1
  11. package/analysis/Analysis.js +1 -1
  12. package/analysis/DimensionSimpleStyle.js +1 -1
  13. package/analysis/ElevationProfileAnalysis.d.ts +4 -0
  14. package/analysis/ElevationProfileAnalysis.js +5 -0
  15. package/analysis/ElevationProfileLine.d.ts +4 -0
  16. package/analysis/ElevationProfileLine.js +5 -0
  17. package/analysis/ElevationProfileLineChartOptions.d.ts +4 -0
  18. package/analysis/ElevationProfileLineChartOptions.js +5 -0
  19. package/analysis/ElevationProfileLineGround.d.ts +4 -0
  20. package/analysis/ElevationProfileLineGround.js +5 -0
  21. package/analysis/ElevationProfileLineInput.d.ts +4 -0
  22. package/analysis/ElevationProfileLineInput.js +5 -0
  23. package/analysis/ElevationProfileLineQuery.d.ts +4 -0
  24. package/analysis/ElevationProfileLineQuery.js +5 -0
  25. package/analysis/ElevationProfileLineScene.d.ts +4 -0
  26. package/analysis/ElevationProfileLineScene.js +5 -0
  27. package/analysis/ElevationProfileLineViewOptions.d.ts +4 -0
  28. package/analysis/ElevationProfileLineViewOptions.js +5 -0
  29. package/analysis/ElevationProfileUnits.d.ts +4 -0
  30. package/analysis/ElevationProfileUnits.js +5 -0
  31. package/analysis/LengthDimension.js +1 -1
  32. package/analysis/LineOfSightAnalysisObserver.js +1 -1
  33. package/analysis/LineOfSightAnalysisTarget.js +1 -1
  34. package/analysis/SlicePlane.js +1 -1
  35. package/analysis/Viewshed.js +1 -1
  36. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  37. package/analysis/support/AnalysisOriginWebScene.js +1 -1
  38. package/analysis/support/elevationProfileLineTypes.js +5 -0
  39. package/arcade/arcadeAsyncRuntime.js +1 -1
  40. package/arcade/arcadeCompiler.js +1 -1
  41. package/arcade/arcadeRuntime.js +1 -1
  42. package/arcade/compilerUtils.js +5 -0
  43. package/arcade/containerUtils.js +1 -1
  44. package/arcade/featureSetUtils.js +1 -1
  45. package/arcade/functions/convertdirection.js +1 -1
  46. package/arcade/functions/date.js +1 -1
  47. package/arcade/functions/feature.js +1 -1
  48. package/arcade/functions/featuresetbase.js +1 -1
  49. package/arcade/functions/featuresetgeom.js +1 -1
  50. package/arcade/functions/featuresetstring.js +1 -1
  51. package/arcade/functions/fieldStats.js +1 -1
  52. package/arcade/functions/geomasync.js +1 -1
  53. package/arcade/functions/geometry.js +1 -1
  54. package/arcade/functions/geomsync.js +1 -1
  55. package/arcade/functions/knowledgegraph.js +1 -1
  56. package/arcade/functions/maths.js +1 -1
  57. package/arcade/functions/string.js +1 -1
  58. package/arcade/functions/track.js +1 -1
  59. package/arcade/geometry/functions.js +1 -1
  60. package/arcade/languageUtils.js +1 -1
  61. package/arcade.js +1 -1
  62. package/assets/esri/core/workers/RemoteClient.js +1 -1
  63. package/assets/esri/core/workers/chunks/02435c653064f879f547.js +1 -0
  64. package/assets/esri/core/workers/chunks/040a233ce6fbcc061cdb.js +1 -0
  65. package/assets/esri/core/workers/chunks/{4930bf8f57f481f3a4a3.js → 053086e0a043b00f1cca.js} +1 -1
  66. package/assets/esri/core/workers/chunks/05d6ccca0cf38c012873.js +1 -0
  67. package/assets/esri/core/workers/chunks/06bd2f5358c6b85d5420.js +1 -0
  68. package/assets/esri/core/workers/chunks/0801f9dde41ec5f36cca.js +1 -0
  69. package/assets/esri/core/workers/chunks/08b4a4c9f3d6478df40a.js +1 -0
  70. package/assets/esri/core/workers/chunks/0906f977d50b1c5d6ed5.js +1 -0
  71. package/assets/esri/core/workers/chunks/170fa807b71babedd185.js +1 -0
  72. package/assets/esri/core/workers/chunks/183130521210c855c565.js +1 -0
  73. package/assets/esri/core/workers/chunks/{ce8f0ed9179c0d314df8.js → 1a5ddb6d36249fe09cc8.js} +1 -1
  74. package/assets/esri/core/workers/chunks/1c87ed3a5960f8f06fc8.js +1 -0
  75. package/assets/esri/core/workers/chunks/1c8dbdb833a66f7183fc.js +1 -0
  76. package/assets/esri/core/workers/chunks/2177c0ef06c8e7e3e28e.js +1 -0
  77. package/assets/esri/core/workers/chunks/{a82d7e2eecfe654a65de.js → 21ea48186d01bf459ef6.js} +1 -1
  78. package/assets/esri/core/workers/chunks/23e0fd2d921f74834b12.js +1 -0
  79. package/assets/esri/core/workers/chunks/2b9c403f4b20b8f62804.js +1 -0
  80. package/assets/esri/core/workers/chunks/2d7bbd001b64138db3c1.js +1 -0
  81. package/assets/esri/core/workers/chunks/2f52a57e8c05a3ca1de8.js +1 -0
  82. package/assets/esri/core/workers/chunks/307df66d00ba5f88780d.js +1 -0
  83. package/assets/esri/core/workers/chunks/33aafaabea07b4f80209.js +1 -0
  84. package/assets/esri/core/workers/chunks/{55a763662bad03ae6bae.js → 36d15d1dd19417b37d2f.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{ddaaff5d6036a5eed50f.js → 44116cf0bd4d6a127c96.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{d6b2ab614f308db50c4a.js → 47cdd5a6351e0db3b2e9.js} +10 -10
  87. package/assets/esri/core/workers/chunks/4c54239974a5847b8fdd.js +1 -0
  88. package/assets/esri/core/workers/chunks/4c7162883b228db563c6.js +1 -0
  89. package/assets/esri/core/workers/chunks/4c77102f083198ae2a6a.js +1 -0
  90. package/assets/esri/core/workers/chunks/4d2dcd667b30a98dd341.js +1 -0
  91. package/assets/esri/core/workers/chunks/4ff7c8420c77256f595a.js +1 -0
  92. package/assets/esri/core/workers/chunks/{82c10f2418e2f754388c.js → 50f56b417992eb30243e.js} +1 -1
  93. package/assets/esri/core/workers/chunks/5228f535719f5fc38b28.js +1 -0
  94. package/assets/esri/core/workers/chunks/{bd6c6acf23db2a2e8ef8.js → 53e166944a42af027345.js} +1 -1
  95. package/assets/esri/core/workers/chunks/54a686643e1ec1ea00ac.js +1 -0
  96. package/assets/esri/core/workers/chunks/568f49f9e50c505b2736.js +1 -0
  97. package/assets/esri/core/workers/chunks/56aafa6f8862629070d8.js +1 -0
  98. package/assets/esri/core/workers/chunks/5c5509147bda78ce338a.js +1 -0
  99. package/assets/esri/core/workers/chunks/{9742804f8ee350bf8052.js → 5c5678b15b59f9964bf0.js} +1 -1
  100. package/assets/esri/core/workers/chunks/5cdeb6dc72f452d6d1bc.js +1 -0
  101. package/assets/esri/core/workers/chunks/5d4e74eb4c659e8f42d6.js +1 -0
  102. package/assets/esri/core/workers/chunks/{b89aacec211c66e3a011.js → 5d8c64693830506c8776.js} +1 -1
  103. package/assets/esri/core/workers/chunks/5fac0b2a5aa33e8a3a84.js +1 -0
  104. package/assets/esri/core/workers/chunks/64553b5eae4edc7f46dc.js +1 -0
  105. package/assets/esri/core/workers/chunks/67627b1965b27b2f1857.js +1 -0
  106. package/assets/esri/core/workers/chunks/{0e7e4426daba4a008849.js → 68edbc3b124eb8e28dd6.js} +1 -1
  107. package/assets/esri/core/workers/chunks/69dc5a7abc1fda2474ad.js +1 -0
  108. package/assets/esri/core/workers/chunks/{d6eff6cc30acdca04835.js → 6c167daf115cd6abb3e5.js} +1 -1
  109. package/assets/esri/core/workers/chunks/6f122e4a2a1f913523b4.js +1 -0
  110. package/assets/esri/core/workers/chunks/{1dc410bc070cabb7198d.js → 72e0fda211d980572292.js} +1 -1
  111. package/assets/esri/core/workers/chunks/761dab8780495286ec4e.js +1 -0
  112. package/assets/esri/core/workers/chunks/7641e24ffa0215d51c34.js +1 -0
  113. package/assets/esri/core/workers/chunks/7e9d5beca1991c961ed8.js +1 -0
  114. package/assets/esri/core/workers/chunks/826e4bf6374f324d7f19.js +1 -0
  115. package/assets/esri/core/workers/chunks/{69d44e08861fb8cdd954.js → 82de1b50ae286f1e6c44.js} +1 -1
  116. package/assets/esri/core/workers/chunks/860bd6d6f0c74ca301a4.js +1 -0
  117. package/assets/esri/core/workers/chunks/8e7dced4a8d089185c3a.js +1 -0
  118. package/assets/esri/core/workers/chunks/{7d25f57299c642e727a6.js → 938baf4f99332dfdf29d.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{0ec7b5f1a614a86ad3db.js → 948ecf0bfbc886ec3b52.js} +1 -1
  120. package/assets/esri/core/workers/chunks/9a4d0006c118ae5b45c0.js +1 -0
  121. package/assets/esri/core/workers/chunks/a1591d7f82e06cab5de4.js +1 -0
  122. package/assets/esri/core/workers/chunks/a44f17397d8589433dae.js +1 -0
  123. package/assets/esri/core/workers/chunks/a76792c4edd1d688fba2.js +1 -0
  124. package/assets/esri/core/workers/chunks/ada46055fafb8ae21dbe.js +1 -0
  125. package/assets/esri/core/workers/chunks/ae667084cb6a08b97c37.js +1 -0
  126. package/assets/esri/core/workers/chunks/{7b1d14a921d30c95d68b.js → afb51b8562f8cb29b97e.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{b00ad853fa4826d0ceb3.js → b12c44faa1efa60067b0.js} +1 -1
  128. package/assets/esri/core/workers/chunks/{c9fe9792312f0161ef5a.js → b1b6300451cc4ccefd46.js} +1 -1
  129. package/assets/esri/core/workers/chunks/b2f2c1108fb7cbdd1a68.js +1 -0
  130. package/assets/esri/core/workers/chunks/{37bfc1a771792b6697fd.js → b3466edccd553ae0a5d0.js} +2 -2
  131. package/assets/esri/core/workers/chunks/b45dbbeae54cea2bbc10.js +1 -0
  132. package/assets/esri/core/workers/chunks/b49b73e2d0d643dfa351.js +1 -0
  133. package/assets/esri/core/workers/chunks/b810e2f87c9c59ae04b1.js +1 -0
  134. package/assets/esri/core/workers/chunks/{20a96c17d1a117dfdf77.js → b8c1a08020d44ee03a17.js} +1 -1
  135. package/assets/esri/core/workers/chunks/bb0c5275e51d170ac795.js +1 -0
  136. package/assets/esri/core/workers/chunks/{7a4730c1e6a5355b7a05.js → bb1213adeb05d89fbfdb.js} +1 -1
  137. package/assets/esri/core/workers/chunks/bd1ba44362b967977003.js +1 -0
  138. package/assets/esri/core/workers/chunks/c18ac2018aea6ba97eec.js +1 -0
  139. package/assets/esri/core/workers/chunks/c3d3e55abf01dae271fb.js +1 -0
  140. package/assets/esri/core/workers/chunks/c5c9f0c8da5f7bf41728.js +1 -0
  141. package/assets/esri/core/workers/chunks/{4784af2b04fafacfcc1b.js → c6077a893d5b5c34a46c.js} +1 -1
  142. package/assets/esri/core/workers/chunks/c78d98ab82f31ddda362.js +1 -0
  143. package/assets/esri/core/workers/chunks/ca5f63c0297612059486.js +1 -0
  144. package/assets/esri/core/workers/chunks/cab294fd04f2a5eda81d.js +1 -0
  145. package/assets/esri/core/workers/chunks/cca36750c86352c6d1f9.js +1 -0
  146. package/assets/esri/core/workers/chunks/ccf3f29d0b1bde90c3cf.js +1 -0
  147. package/assets/esri/core/workers/chunks/cd9e6b86ab0103044370.js +1 -0
  148. package/assets/esri/core/workers/chunks/ce211163d078d3d742ce.js +1 -0
  149. package/assets/esri/core/workers/chunks/{0ca8d6516323fc28dd58.js → cf1f8fd1d62be0e02e10.js} +1 -1
  150. package/assets/esri/core/workers/chunks/d16484b389d56a43d204.js +1 -0
  151. package/assets/esri/core/workers/chunks/d54e18e0f30734610f35.js +1 -0
  152. package/assets/esri/core/workers/chunks/d7ec905d87a19a1061e7.js +1 -0
  153. package/assets/esri/core/workers/chunks/{e9a366c225b0687293e3.js → d80e26a1f4a61b1c4cf9.js} +1 -1
  154. package/assets/esri/core/workers/chunks/{eec36628e638e244f452.js → ddeaf688d72b2873c4ac.js} +1 -1
  155. package/assets/esri/core/workers/chunks/debd832b6c2c0b2ea362.js +1 -0
  156. package/assets/esri/core/workers/chunks/dfa3ad5d750d7b143a06.js +1 -0
  157. package/assets/esri/core/workers/chunks/dfc5936fbbd26f27a92a.js +1 -0
  158. package/assets/esri/core/workers/chunks/e01fa6389bd0b1ae51a5.js +1 -0
  159. package/assets/esri/core/workers/chunks/e4d08a85d158c705aa3d.js +1 -0
  160. package/assets/esri/core/workers/chunks/e59fdb8f625e9080f097.js +1 -0
  161. package/assets/esri/core/workers/chunks/ed1cd90e899dc9c15ee3.js +1 -0
  162. package/assets/esri/core/workers/chunks/ee28cd411a93245fb90c.js +1 -0
  163. package/assets/esri/core/workers/chunks/{41071e672dcddec47492.js → f4e9640306f64b1af7a3.js} +1 -1
  164. package/assets/esri/core/workers/chunks/f5bb7c90f48cae594bc3.js +1 -0
  165. package/assets/esri/core/workers/chunks/f79c9b37f2842ed88a9b.js +1 -0
  166. package/assets/esri/core/workers/chunks/f88fe2e8fbc763bdc940.js +1 -0
  167. package/assets/esri/core/workers/chunks/faa0cfee8c1de9b5b78c.js +1 -0
  168. package/assets/esri/core/workers/chunks/fae53d825dd9fef0426c.js +1 -0
  169. package/chunks/TimeInterval.js +1 -1
  170. package/chunks/arcade.js +1 -1
  171. package/chunks/array.js +1 -1
  172. package/chunks/languageUtils.js +1 -1
  173. package/config.js +1 -1
  174. package/copyright.txt +27 -0
  175. package/core/Clonable.d.ts +1 -1
  176. package/core/Clonable.js +1 -1
  177. package/core/Collection.js +1 -1
  178. package/core/Evented.d.ts +1 -1
  179. package/core/Evented.js +1 -1
  180. package/core/Identifiable.d.ts +1 -1
  181. package/core/Identifiable.js +1 -1
  182. package/core/Loadable.d.ts +1 -1
  183. package/core/Loadable.js +1 -1
  184. package/core/accessorSupport/ensureType.js +1 -1
  185. package/core/loadAll.js +1 -1
  186. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  187. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  188. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  189. package/effects/FocusArea.js +1 -1
  190. package/effects/FocusAreaOutline.js +1 -1
  191. package/effects/FocusAreas.js +1 -1
  192. package/form/elements/UtilityNetworkAssociationsElement.js +1 -1
  193. package/form/elements/inputs/attachments/Input.js +1 -1
  194. package/geometry/Mesh.js +1 -1
  195. package/geometry/support/DoubleArray.js +1 -1
  196. package/geometry/support/MeshComponent.js +1 -1
  197. package/geometry/support/MeshGeoreferencedVertexSpace.js +1 -1
  198. package/geometry/support/MeshLocalVertexSpace.js +1 -1
  199. package/geometry/support/MeshMaterial.js +1 -1
  200. package/geometry/support/MeshTexture.js +1 -1
  201. package/geometry/support/MeshTextureTransform.js +1 -1
  202. package/geometry/support/MeshTransform.js +1 -1
  203. package/geometry/support/MeshVertexAttributes.js +1 -1
  204. package/geometry/support/meshUtils/Metadata.js +1 -1
  205. package/graphic/GeoRSSGraphicOrigin.d.ts +4 -0
  206. package/graphic/GeoRSSGraphicOrigin.js +5 -0
  207. package/graphic/GraphicOrigin.js +1 -1
  208. package/graphic/KnowledgeGraphGraphicOrigin.d.ts +4 -0
  209. package/graphic/KnowledgeGraphGraphicOrigin.js +5 -0
  210. package/graphic/MapImageGraphicOrigin.d.ts +4 -0
  211. package/graphic/MapImageGraphicOrigin.js +5 -0
  212. package/graphic/MapNotesGraphicOrigin.d.ts +4 -0
  213. package/graphic/MapNotesGraphicOrigin.js +5 -0
  214. package/graphic/OrientedImageryGraphicOrigin.d.ts +4 -0
  215. package/graphic/OrientedImageryGraphicOrigin.js +5 -0
  216. package/graphic/ParquetGraphicOrigin.d.ts +4 -0
  217. package/graphic/ParquetGraphicOrigin.js +5 -0
  218. package/graphic/SubtypeGroupGraphicOrigin.d.ts +4 -0
  219. package/graphic/SubtypeGroupGraphicOrigin.js +5 -0
  220. package/graphic/TileGraphicOrigin.d.ts +4 -0
  221. package/graphic/TileGraphicOrigin.js +5 -0
  222. package/graphic/graphicOrigins.d.ts +8 -0
  223. package/graphic/graphicOrigins.js +1 -1
  224. package/{views/3d/terrain/RenderOrder.js → graphic/isGeoRSSGraphicOrigin.js} +1 -0
  225. package/graphic/isKnowledgeGraphGraphicOrigin.js +5 -0
  226. package/graphic/isMapImageGraphicOrigin.js +5 -0
  227. package/graphic/isMapNotesGraphicOrigin.js +5 -0
  228. package/graphic/isOrientedImageryGraphicOrigin.js +5 -0
  229. package/graphic/isParquetGraphicOrigin.js +5 -0
  230. package/graphic/isSubtypeGroupGraphicOrigin.js +5 -0
  231. package/graphic/isTileGraphicOrigin.js +5 -0
  232. package/identity/IdentityManagerBase.js +1 -1
  233. package/interfaces.d.ts +899 -50
  234. package/kernel.js +1 -1
  235. package/layers/CSVLayer.js +1 -1
  236. package/layers/FeatureLayer.js +1 -1
  237. package/layers/GeoJSONLayer.js +1 -1
  238. package/layers/ImageryLayer.js +1 -1
  239. package/layers/ImageryTileLayer.js +1 -1
  240. package/layers/Layer.js +1 -1
  241. package/layers/MapNotesLayer.js +1 -1
  242. package/layers/OGCFeatureLayer.js +1 -1
  243. package/layers/OrientedImageryLayer.js +1 -1
  244. package/layers/ParquetLayer.js +1 -1
  245. package/layers/SceneLayer.js +1 -1
  246. package/layers/StreamLayer.js +1 -1
  247. package/layers/SubtypeGroupLayer.js +1 -1
  248. package/layers/WCSLayer.js +1 -1
  249. package/layers/WFSLayer.js +1 -1
  250. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  251. package/layers/buildingSublayers/BuildingSublayer.js +1 -1
  252. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  253. package/layers/graphics/data/FeatureStore.js +1 -1
  254. package/layers/graphics/sources/CSVSource.js +1 -1
  255. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  256. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  257. package/layers/graphics/sources/MemorySource.js +1 -1
  258. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  259. package/layers/graphics/sources/ParquetSource.js +1 -1
  260. package/layers/graphics/sources/WFSSource.js +1 -1
  261. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  262. package/layers/mixins/EditBusLayer.js +1 -1
  263. package/layers/orientedImagery/core/CameraOrientationHPR.js +1 -1
  264. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  265. package/layers/orientedImagery/core/CameraOrientationOPK.js +1 -1
  266. package/layers/orientedImagery/core/CameraOrientationYPR.js +1 -1
  267. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
  268. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  269. package/layers/support/BuildingSummaryStatistics.js +1 -1
  270. package/layers/support/ControlPointsGeoreference.js +1 -1
  271. package/layers/support/DisplayFilter.js +1 -1
  272. package/layers/support/DisplayFilterInfo.js +1 -1
  273. package/layers/support/EditFieldsInfo.js +1 -1
  274. package/layers/support/ExpressionInfo.js +1 -1
  275. package/layers/support/FeatureIndex.js +1 -1
  276. package/layers/support/FeatureTemplate.js +1 -1
  277. package/layers/support/FeatureType.js +1 -1
  278. package/layers/support/GeometryFieldsInfo.js +1 -1
  279. package/layers/support/GeoreferenceBase.js +1 -1
  280. package/layers/support/KMLSublayer.js +1 -1
  281. package/layers/support/LayerContingentValuesCache.js +1 -1
  282. package/layers/support/LocalMediaElementSource.js +1 -1
  283. package/layers/support/MediaElementBase.js +1 -1
  284. package/layers/support/PlaybackInfo.js +1 -1
  285. package/layers/support/PromiseQueue.js +1 -1
  286. package/layers/support/Relationship.js +1 -1
  287. package/layers/support/StreamConnection.js +1 -1
  288. package/layers/support/Sublayer.js +1 -1
  289. package/layers/support/Subtype.js +1 -1
  290. package/layers/support/SubtypeSublayer.js +1 -1
  291. package/layers/support/TelemetryData.js +1 -1
  292. package/layers/support/TelemetryDisplay.js +1 -1
  293. package/layers/support/TimeInfo.js +1 -1
  294. package/layers/support/TrackInfo.js +1 -1
  295. package/layers/support/TrackPartInfo.js +1 -1
  296. package/layers/support/VideoFrame.js +1 -1
  297. package/layers/support/VideoTimeExtent.js +1 -1
  298. package/layers/support/WMSSublayer.js +1 -1
  299. package/layers/voxel/VoxelColorStop.js +1 -1
  300. package/layers/voxel/VoxelDynamicSection.js +1 -1
  301. package/layers/voxel/VoxelIsosurface.js +1 -1
  302. package/layers/voxel/VoxelOpacityStop.js +1 -1
  303. package/layers/voxel/VoxelRangeFilter.js +1 -1
  304. package/layers/voxel/VoxelSection.js +1 -1
  305. package/layers/voxel/VoxelSlice.js +1 -1
  306. package/layers/voxel/VoxelTransferFunctionStyle.js +1 -1
  307. package/layers/voxel/VoxelUniqueValue.js +1 -1
  308. package/linkChart/ChronologicalLayoutSettings.js +1 -1
  309. package/linkChart/LayoutSettings.js +1 -1
  310. package/linkChart/LinkChartProperties.js +1 -1
  311. package/linkChart/NonspatialDataDisplay.js +1 -1
  312. package/linkChart/OrganicLayoutSettings.js +1 -1
  313. package/networks/Network.js +1 -1
  314. package/networks/RulesTable.js +1 -1
  315. package/networks/UtilityNetwork.js +1 -1
  316. package/networks/support/NetworkSystemLayers.js +1 -1
  317. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  318. package/package.json +1 -1
  319. package/popup/content/AttachmentsContent.js +1 -1
  320. package/popup/content/RelationshipContent.js +1 -1
  321. package/popup/content/UtilityNetworkAssociationsContent.js +1 -1
  322. package/popup/support/AttachmentsOrderByInfo.js +1 -1
  323. package/popup/support/FieldInfoFormat.js +1 -1
  324. package/popup/support/UtilityNetworkAssociationType.js +1 -1
  325. package/portal/Portal.js +1 -1
  326. package/portal/PortalItem.js +1 -1
  327. package/renderers/PieChartRenderer.js +1 -1
  328. package/renderers/support/HeatmapLegendOptions.js +1 -1
  329. package/renderers/support/OthersCategory.js +1 -1
  330. package/renderers/support/RasterPresetRenderer.js +1 -1
  331. package/renderers/support/RendererLegendOptions.js +1 -1
  332. package/renderers/support/UniqueValue.js +1 -1
  333. package/renderers/support/UniqueValueClass.js +1 -1
  334. package/renderers/support/UniqueValueGroup.js +1 -1
  335. package/renderers/visualVariables/support/VisualVariableLegendOptions.js +1 -1
  336. package/rest/featureService/FeatureService.js +1 -1
  337. package/rest/support/AttributeBinsFeatureSet.js +1 -1
  338. package/rest/support/AttributeBinsGrouping.js +1 -1
  339. package/rest/support/AttributeBinsQuery.js +1 -1
  340. package/rest/support/BinParametersBase.js +1 -1
  341. package/rest/support/ClosestFacilityParameters.js +1 -1
  342. package/rest/support/DataLayer.js +1 -1
  343. package/rest/support/DateBinTimeInterval.js +1 -1
  344. package/rest/support/DirectionLine.js +1 -1
  345. package/rest/support/DirectionPoint.js +1 -1
  346. package/rest/support/FindImagesParameters.js +1 -1
  347. package/rest/support/FullTextSearch.js +1 -1
  348. package/rest/support/ImageBoundaryParameters.js +1 -1
  349. package/rest/support/ImageGPSInfoParameters.js +1 -1
  350. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  351. package/rest/support/ImageToMapParameters.js +1 -1
  352. package/rest/support/ImageUrlParameters.js +1 -1
  353. package/rest/support/ImageVolumeParameters.js +1 -1
  354. package/rest/support/MapToImageParameters.js +1 -1
  355. package/rest/support/NetworkUrl.js +1 -1
  356. package/rest/support/PointBarrier.js +1 -1
  357. package/rest/support/PolygonBarrier.js +1 -1
  358. package/rest/support/PolylineBarrier.js +1 -1
  359. package/rest/support/RouteInfo.js +1 -1
  360. package/rest/support/RouteParameters.js +1 -1
  361. package/rest/support/ServiceAreaParameters.js +1 -1
  362. package/rest/support/Stop.js +1 -1
  363. package/rest/support/TravelMode.js +1 -1
  364. package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
  365. package/smartMapping/support/adapters/LayerAdapter.js +1 -1
  366. package/support/actions/ActionBase.js +1 -1
  367. package/support/revision.js +1 -1
  368. package/symbols/LineStyleMarker3D.js +1 -1
  369. package/symbols/PathSymbol3DLayer.js +1 -1
  370. package/symbols/support/ElevationInfo.js +1 -1
  371. package/symbols/support/Symbol3DTextBackground.js +1 -1
  372. package/symbols/support/previewSymbol3D.js +1 -1
  373. package/tables/elements/AttributeTableAttachmentElement.js +1 -1
  374. package/tables/elements/AttributeTableFieldElement.js +1 -1
  375. package/tables/elements/AttributeTableGroupElement.js +1 -1
  376. package/tables/elements/AttributeTableRelationshipElement.js +1 -1
  377. package/tables/support/FieldOrder.js +1 -1
  378. package/undoredo/support/Services.js +1 -1
  379. package/versionManagement/VersionManagementService.js +1 -1
  380. package/versionManagement/VersioningState.js +1 -1
  381. package/views/2d/constraints/GeometryConstraint.js +1 -1
  382. package/views/2d/constraints/RotationConstraint.js +1 -1
  383. package/views/2d/constraints/ZoomConstraint.js +1 -1
  384. package/views/2d/engine/DisplayObject.js +1 -1
  385. package/views/2d/engine/ManagedCanvas.js +1 -1
  386. package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
  387. package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
  388. package/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial.js +1 -1
  389. package/views/2d/engine/vectorTiles/shaders/VTLFillMaterial.js +1 -1
  390. package/views/2d/engine/vectorTiles/shaders/VTLLineMaterial.js +1 -1
  391. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  392. package/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial.js +1 -1
  393. package/views/2d/engine/webgl/Profiler.js +1 -1
  394. package/views/2d/engine/webgl/TextureManager.js +1 -1
  395. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  396. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  397. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  398. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  399. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  400. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  401. package/views/2d/layers/StreamLayerView2D.js +1 -1
  402. package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
  403. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  404. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  405. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  406. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  407. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  408. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  409. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  410. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  411. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  412. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  413. package/views/2d/layers/features/schema/processor/LabelMatcherSchema.js +1 -1
  414. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  415. package/views/2d/layers/features/schema/processor/SubtypeProcessorSchema.js +1 -1
  416. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  417. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  418. package/views/2d/layers/features/support/TileStore.js +1 -1
  419. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  420. package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
  421. package/views/3d/FocusAreasView.js +1 -1
  422. package/views/3d/analysis/AnalysisViewManager3D.js +1 -1
  423. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  424. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +4 -0
  425. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +5 -0
  426. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  427. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  428. package/views/3d/analysis/Slice/SliceController.js +1 -1
  429. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  430. package/views/3d/constraints/AltitudeConstraint.js +1 -1
  431. package/views/3d/constraints/ClipDistanceConstraint.js +1 -1
  432. package/views/3d/constraints/Constraints.js +1 -1
  433. package/views/3d/constraints/TiltConstraint.js +1 -1
  434. package/views/3d/environment/Clouds.js +1 -1
  435. package/views/3d/environment/CloudsRenderer.js +1 -1
  436. package/views/3d/environment/EnvironmentManager.js +1 -1
  437. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  438. package/views/3d/environment/SunLighting.js +1 -1
  439. package/views/3d/environment/VirtualLighting.js +1 -1
  440. package/views/3d/interactive/Manipulator3D.js +1 -1
  441. package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
  442. package/views/3d/interactive/editingTools/ManipulatedObject3DMediaElement.js +1 -1
  443. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  444. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  445. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  446. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  447. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  448. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  449. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  450. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  451. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  452. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  453. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  454. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  455. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  456. package/views/3d/layers/FlowSubView3D.js +1 -1
  457. package/views/3d/layers/GraphicsView3D.js +1 -1
  458. package/views/3d/layers/GraphicsView3DDummyLayer.js +5 -0
  459. package/views/3d/layers/I3SMeshView3D.js +1 -1
  460. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  461. package/views/3d/layers/SceneLayerWorker.js +1 -1
  462. package/views/3d/layers/TiledLayerView3D.js +1 -1
  463. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  464. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  465. package/views/3d/layers/graphics/GraphicState.js +1 -1
  466. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  467. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  468. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  469. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  470. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  471. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  472. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  473. package/views/3d/layers/graphics/Labeler.js +1 -1
  474. package/views/3d/layers/graphics/StreamController.js +1 -1
  475. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  476. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  477. package/views/3d/layers/i3s/I3SAsyncElevationUpdater.js +1 -1
  478. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  479. package/views/3d/layers/i3s/I3SFrameTask.js +1 -1
  480. package/views/3d/layers/i3s/I3SGraphicsMap.js +1 -1
  481. package/views/3d/layers/i3s/I3SQueryFeatureStore.js +1 -1
  482. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  483. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  484. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  485. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  486. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  487. package/views/3d/state/ViewState.js +1 -1
  488. package/views/3d/support/CombinedElevationProvider.js +1 -1
  489. package/views/3d/support/EventedSet.js +1 -1
  490. package/views/3d/support/GraphicsMap.js +1 -1
  491. package/views/3d/support/LimitGraphicsMap.js +1 -1
  492. package/views/3d/support/StreamDataLoader.js +1 -1
  493. package/views/3d/support/flow/geometryUtils.js +1 -1
  494. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  495. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  496. package/views/3d/support/pointsOfInterest/ContentGeometryUpdates.js +1 -1
  497. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  498. package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
  499. package/views/3d/terrain/OverlayManager.js +1 -1
  500. package/views/3d/terrain/OverlayRenderer.js +1 -1
  501. package/views/3d/terrain/TerrainRenderer.js +1 -1
  502. package/views/3d/terrain/TerrainSurface.js +1 -1
  503. package/views/3d/terrain/tileUtils.js +1 -1
  504. package/views/3d/webgl-engine/Stage.js +1 -1
  505. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  506. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  507. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  508. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  509. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  510. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  511. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  512. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  513. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  514. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  515. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  516. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  517. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  518. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  519. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  520. package/views/SceneView.js +1 -1
  521. package/views/SelectionManager.js +1 -1
  522. package/views/Theme.js +1 -1
  523. package/views/VideoView.js +1 -1
  524. package/views/View.js +1 -1
  525. package/views/analysis/ElevationProfileResult.d.ts +4 -0
  526. package/views/analysis/ElevationProfileResult.js +5 -0
  527. package/views/draw/DrawAction.js +1 -1
  528. package/views/draw/DrawGraphicTool.js +1 -1
  529. package/views/draw/DrawManipulator.js +1 -1
  530. package/views/draw/DrawOperation.js +1 -1
  531. package/views/draw/support/Box.js +1 -1
  532. package/views/draw/support/GraphicMover.js +1 -1
  533. package/views/draw/support/Reshape.js +1 -1
  534. package/views/interactive/GraphicManipulator.js +1 -1
  535. package/views/interactive/InteractiveToolBase.js +1 -1
  536. package/views/interactive/Tooltip.js +1 -1
  537. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  538. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  539. package/views/interactive/snapping/SnappingManager.js +1 -1
  540. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  541. package/views/layers/LayerView.js +1 -1
  542. package/views/support/GroundViewElevationSampler.js +1 -1
  543. package/views/support/ScheduledQueueProcessor.js +1 -1
  544. package/views/support/Scheduler.js +1 -1
  545. package/views/ui/UI.js +1 -1
  546. package/webdoc/GeotriggersInfo.js +1 -1
  547. package/webdoc/IPSInfo.js +1 -1
  548. package/webdoc/geotriggersInfo/DeviceLocationFeed.js +1 -1
  549. package/webdoc/geotriggersInfo/ExpressionInfo.js +1 -1
  550. package/webdoc/geotriggersInfo/FeatureFenceParameters.js +1 -1
  551. package/webdoc/geotriggersInfo/FeatureFilter.js +1 -1
  552. package/webdoc/geotriggersInfo/FeatureLayerSource.js +1 -1
  553. package/webdoc/geotriggersInfo/Geotrigger.js +1 -1
  554. package/webdoc/geotriggersInfo/GeotriggerNotificationOptions.js +1 -1
  555. package/webdoc/ips/AppleIPSProperties.js +1 -1
  556. package/webdoc/ips/Configuration.js +1 -1
  557. package/webdoc/ips/GNSSProperties.js +1 -1
  558. package/webdoc/ips/PathSnappingProperties.js +1 -1
  559. package/webdoc/ips/PositioningService.js +1 -1
  560. package/webdoc/ips/SmoothingProperties.js +1 -1
  561. package/webmap/Bookmark.js +1 -1
  562. package/webmap/InitialViewProperties.js +1 -1
  563. package/webscene/InitialViewProperties.js +1 -1
  564. package/webscene/Presentation.js +1 -1
  565. package/webscene/Slide.js +1 -1
  566. package/webscene/SlideLegendInfo.js +1 -1
  567. package/webscene/support/Description.js +1 -1
  568. package/webscene/support/FeatureReference.js +1 -1
  569. package/webscene/support/FeatureReferenceId.js +1 -1
  570. package/webscene/support/LayerReference.js +1 -1
  571. package/webscene/support/SlideElements.js +1 -1
  572. package/webscene/support/SlideEnvironment.js +1 -1
  573. package/webscene/support/SlideGround.js +1 -1
  574. package/webscene/support/SlidePopupInfo.js +1 -1
  575. package/webscene/support/SlideVisibleLayer.js +1 -1
  576. package/webscene/support/Title.js +1 -1
  577. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  578. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  579. package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
  580. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  581. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  582. package/widgets/BasemapLayerList.js +1 -1
  583. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  584. package/widgets/BatchAttributeForm/templates/ElementTemplateBase.js +1 -1
  585. package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
  586. package/widgets/Bookmarks.js +1 -1
  587. package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
  588. package/widgets/CatalogLayerList.js +1 -1
  589. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  590. package/widgets/Daylight/DaylightViewModel.js +1 -1
  591. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  592. package/widgets/Directions/DirectionsViewModel.js +1 -1
  593. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  594. package/widgets/Editor/EditorViewModel.js +1 -1
  595. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  596. package/widgets/Editor/Workflow.js +1 -1
  597. package/widgets/Editor/support/SketchController.js +1 -1
  598. package/widgets/ElevationProfile/ElevationProfileInteraction.js +1 -1
  599. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  600. package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
  601. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
  602. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
  603. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
  604. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  605. package/widgets/Feature/FeatureViewModel.js +1 -1
  606. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  607. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  608. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  609. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  610. package/widgets/FeatureTemplates/TemplateItemGroup.js +1 -1
  611. package/widgets/Home/HomeViewModel.js +1 -1
  612. package/widgets/LayerList/LayerListViewModel.js +1 -1
  613. package/widgets/LayerList/ListItem.js +1 -1
  614. package/widgets/LayerList/ListItemPanel.js +1 -1
  615. package/widgets/LayerList.js +1 -1
  616. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +1 -1
  617. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  618. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  619. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  620. package/widgets/OrientedImageryViewer/components/NavigationAction.js +1 -1
  621. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  622. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  623. package/widgets/Print/PrintViewModel.js +1 -1
  624. package/widgets/Search/SearchSource.js +1 -1
  625. package/widgets/Search/SearchViewModel.js +1 -1
  626. package/widgets/Sketch/SketchViewModel.js +1 -1
  627. package/widgets/Sketch/support/OperationHandle.js +1 -1
  628. package/widgets/TableList/ListItem.js +1 -1
  629. package/widgets/TableList/ListItemPanel.js +1 -1
  630. package/widgets/TableList/TableListViewModel.js +1 -1
  631. package/widgets/TableList.js +1 -1
  632. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  633. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  634. package/widgets/ValuePicker/ValuePickerViewModel.js +1 -1
  635. package/widgets/Widget.js +1 -1
  636. package/widgets/support/AnchorElementViewModel.js +1 -1
  637. package/widgets/support/GeolocationPositioning.js +1 -1
  638. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  639. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  640. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  641. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  642. package/assets/esri/core/workers/chunks/00870a35b254295bc408.js +0 -1
  643. package/assets/esri/core/workers/chunks/017adbbb77c9c9b4d49f.js +0 -1
  644. package/assets/esri/core/workers/chunks/038bd2fec9a91b5a949d.js +0 -1
  645. package/assets/esri/core/workers/chunks/086f3bc5938bf9a37274.js +0 -1
  646. package/assets/esri/core/workers/chunks/093de3942e1ead231990.js +0 -1
  647. package/assets/esri/core/workers/chunks/0997e09fe5b0aba1f804.js +0 -1
  648. package/assets/esri/core/workers/chunks/0f6207d84d15484a3181.js +0 -1
  649. package/assets/esri/core/workers/chunks/125fdea50620d4db2678.js +0 -1
  650. package/assets/esri/core/workers/chunks/15a5a89cd228a9364332.js +0 -1
  651. package/assets/esri/core/workers/chunks/173c5b8fa1ac7aa6e072.js +0 -1
  652. package/assets/esri/core/workers/chunks/20aed6e1d9b6bf06a398.js +0 -1
  653. package/assets/esri/core/workers/chunks/21246dfe99a4c5906f71.js +0 -1
  654. package/assets/esri/core/workers/chunks/221748295a5ec633177e.js +0 -1
  655. package/assets/esri/core/workers/chunks/2a695b50a384c45ace9a.js +0 -1
  656. package/assets/esri/core/workers/chunks/2ad63b8d6986ac21c398.js +0 -1
  657. package/assets/esri/core/workers/chunks/2de11a8e5d426c381991.js +0 -1
  658. package/assets/esri/core/workers/chunks/2df9bfddc737d89c94b8.js +0 -1
  659. package/assets/esri/core/workers/chunks/34ddb8da5c5c8533bd71.js +0 -1
  660. package/assets/esri/core/workers/chunks/3a7e43675163f7bed6ac.js +0 -1
  661. package/assets/esri/core/workers/chunks/3cd1ab26396052f17832.js +0 -1
  662. package/assets/esri/core/workers/chunks/40b0c5368b8322498189.js +0 -1
  663. package/assets/esri/core/workers/chunks/427deb82fae9c500b375.js +0 -1
  664. package/assets/esri/core/workers/chunks/4433c195c62a59739c06.js +0 -1
  665. package/assets/esri/core/workers/chunks/4ac6bf9ff1cfbde87c7b.js +0 -1
  666. package/assets/esri/core/workers/chunks/4b9003ddfe61dc3729f4.js +0 -1
  667. package/assets/esri/core/workers/chunks/4bb6148df66e62a5fcf0.js +0 -1
  668. package/assets/esri/core/workers/chunks/50f58b2a933b56effd70.js +0 -1
  669. package/assets/esri/core/workers/chunks/528212fb0474bdb2ec92.js +0 -1
  670. package/assets/esri/core/workers/chunks/5dba8c0c957becedf7f7.js +0 -1
  671. package/assets/esri/core/workers/chunks/6000a302369799ea42a6.js +0 -1
  672. package/assets/esri/core/workers/chunks/61aed9a292c981921869.js +0 -1
  673. package/assets/esri/core/workers/chunks/646227b500b92999f2c8.js +0 -1
  674. package/assets/esri/core/workers/chunks/674970c539d336a93ba1.js +0 -1
  675. package/assets/esri/core/workers/chunks/6aeff5908c41600a5dfc.js +0 -1
  676. package/assets/esri/core/workers/chunks/6c72e2c09ed62cb2fd79.js +0 -1
  677. package/assets/esri/core/workers/chunks/7099ff8dc699fedea931.js +0 -1
  678. package/assets/esri/core/workers/chunks/752eabfbed7b8b65cf3f.js +0 -1
  679. package/assets/esri/core/workers/chunks/773feb0e0fad26df57ef.js +0 -1
  680. package/assets/esri/core/workers/chunks/7848ea5ca13ec350779a.js +0 -1
  681. package/assets/esri/core/workers/chunks/7a4ec66a577f7f7996c5.js +0 -1
  682. package/assets/esri/core/workers/chunks/831d58235b8b9eb4cdc8.js +0 -1
  683. package/assets/esri/core/workers/chunks/90a0c1c5c851cc9b6d6d.js +0 -1
  684. package/assets/esri/core/workers/chunks/91d48c32bf11ad1405c8.js +0 -1
  685. package/assets/esri/core/workers/chunks/9228f760129e48585b54.js +0 -1
  686. package/assets/esri/core/workers/chunks/969a9edba4be8dcbcedd.js +0 -1
  687. package/assets/esri/core/workers/chunks/9a54c96b48e94d816881.js +0 -1
  688. package/assets/esri/core/workers/chunks/aa12ba96fb8c91105473.js +0 -1
  689. package/assets/esri/core/workers/chunks/aaf696a1026de569c82d.js +0 -1
  690. package/assets/esri/core/workers/chunks/acb95ae6203f708d71b4.js +0 -1
  691. package/assets/esri/core/workers/chunks/b28855db6a30d4d4f348.js +0 -1
  692. package/assets/esri/core/workers/chunks/b4bbd38df56e57783cc0.js +0 -1
  693. package/assets/esri/core/workers/chunks/ba29c535128c4e8ae2d3.js +0 -1
  694. package/assets/esri/core/workers/chunks/c038472cb7f60af9426e.js +0 -1
  695. package/assets/esri/core/workers/chunks/c0718a0461839be41a2a.js +0 -1
  696. package/assets/esri/core/workers/chunks/c0aee315b6218d6456cd.js +0 -1
  697. package/assets/esri/core/workers/chunks/c0ec1600a86bb9a848d4.js +0 -1
  698. package/assets/esri/core/workers/chunks/c1e5e2a6e7e2d7a1d63c.js +0 -1
  699. package/assets/esri/core/workers/chunks/c30adbead0ba4722acf9.js +0 -1
  700. package/assets/esri/core/workers/chunks/c9b11c7170c99f9e0e93.js +0 -1
  701. package/assets/esri/core/workers/chunks/ca88859fc69fcb4568c0.js +0 -1
  702. package/assets/esri/core/workers/chunks/cc3ca1729af33688c1e3.js +0 -1
  703. package/assets/esri/core/workers/chunks/cde79c3644166d4798a8.js +0 -1
  704. package/assets/esri/core/workers/chunks/d092a4b8fe3d37a6333d.js +0 -1
  705. package/assets/esri/core/workers/chunks/d6a188a7d55db69ba30b.js +0 -1
  706. package/assets/esri/core/workers/chunks/d7172dc531b4548a8c60.js +0 -1
  707. package/assets/esri/core/workers/chunks/d88935ae5669d14c5b29.js +0 -1
  708. package/assets/esri/core/workers/chunks/d9045b964f536695840b.js +0 -1
  709. package/assets/esri/core/workers/chunks/dde6000aa2f69f6ecad0.js +0 -1
  710. package/assets/esri/core/workers/chunks/e18bb372457cedbf4f8c.js +0 -1
  711. package/assets/esri/core/workers/chunks/e82b1f91465d569012c4.js +0 -1
  712. package/assets/esri/core/workers/chunks/e892ed8b0b990d7eba28.js +0 -1
  713. package/assets/esri/core/workers/chunks/ed05399f9a07fea66685.js +0 -1
  714. package/assets/esri/core/workers/chunks/efec0f496491a0647051.js +0 -1
  715. package/assets/esri/core/workers/chunks/f01a939af200616eb169.js +0 -1
  716. package/assets/esri/core/workers/chunks/f19426eb53d8430ded51.js +0 -1
  717. package/assets/esri/core/workers/chunks/f255b2232f6f049d462d.js +0 -1
  718. package/assets/esri/core/workers/chunks/f3358b19af0f03f16543.js +0 -1
  719. package/assets/esri/core/workers/chunks/f4c38a9c01c29b5a6244.js +0 -1
  720. package/assets/esri/core/workers/chunks/f6c1854f36b029fa6c37.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{neverReached as n}from"../../core/compilerUtils.js";import s from"../../core/Evented.js";import i from"../../core/Logger.js";import{destroyMaybe as o}from"../../core/maybe.js";import r from"../../core/Promise.js";import{debounce as a}from"../../core/promiseUtils.js";import{watch as l,syncAndInitial as u,whenOnce as p,on as c}from"../../core/reactiveUtils.js";import{templateHasKey as h}from"../../core/string.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as m}from"../../core/support/UpdatingHandles.js";import y from"../../form/FormTemplate.js";import{isUtilityNetworkAssociationsElement as g,isGroupElement as _,isFieldElement as v,isRelationshipElement as I,isTextElement as x}from"../../form/support/formUtils.js";import E from"../../layers/support/ContingentValue.js";import{isEditableLayer as C}from"../../layers/support/editableLayers.js";import F from"../../layers/support/LayerContingentValuesCache.js";import{utc as b,unknown as V,system as w}from"../../time/constants.js";import{flattenAssociationInputs as A,flattenFieldInputs as j,isGroupInput as T,flattenRelationshipInputs as M,parseFormTemplateString as N,isRelationshipInput as S,isFieldInput as k,isTextElementInput as L,getNormalizedFeatureTypeInfo as R,valueIsValidContingentValue as U}from"./featureFormUtils.js";import Z from"./FieldInput.js";import{FormExpressionsManager as H}from"./FormExpressionsManager.js";import P from"./GroupInput.js";import O from"./RelationshipInput.js";import G from"./TextElementInput.js";import{createFormExpressionArcadeExecutor as W}from"../support/forms/expressions/FormExpressionArcadeExecutor.js";const $=new t({attributes:{}}),D={field:["editableExpression","requiredExpression","valueExpression","visibilityExpression"],group:["visibilityExpression"],relationship:["editableExpression","visibilityExpression"],text:["visibilityExpression"],utilityNetworkAssociations:["editableExpression","visibilityExpression"]},z="#JSAPI_CONTINGENT_VALUE_EMPTY_HASH",J="#JSAPI_CONTINGENT_VALUE_ANY_HASH",B="#JSAPI_CONTINGENT_VALUE_NULL_HASH";let K=class extends(r.EsriPromiseMixin(s.EventedAccessor)){constructor(e){super(e),this._expressionExecutorsInUse=new Set,this._expressionExecutorLookup=new Map,this._expressionsManager=null,this._contingentValuesCache=null,this._featureClone=$.clone(),this._initialFeature=$.clone(),this._timeZone=null,this._updatingHandles=new m,this.activeAssociation=null,this.editType="NA",this.contingencyConstraintViolations=new Map,this.disabled=!1,this.highlightHelper=null,this.inputs=[],this.map=null,this.callbacks=null,this.strict=!1,this.pendingSubtypeChoice=null,this._updateInputs=a(async()=>{this._stopExpressions();const{_featureClone:e,_initialFeature:t,editType:n,formTemplate:s,inputs:i,layer:o,timeZone:r}=this;if(!o)return;const a={editType:n,feature:e,initialFeature:t,layer:o,timeZone:r},l=i.slice(),u=s?.elements&&s.elements.length>0?await this._updateInputsUsingFormElements(l,s.elements,a):this._updateInputsUsingLayerFields(l,o?.fields,a);this.inputs=u,await this._startExpressions()})}initialize(){const e=l(()=>[this.layer,!!this.layer?.loaded,this.formTemplate,this.feature,this.timeZone,this.editType],([e,t])=>{null!=e&&(t?this._updatingHandles.addPromise(this._updateInputs()):e.load().catch(()=>{}))},u),t=l(()=>this._arcadeContextInfo,e=>{null!=this._expressionsManager&&(this._expressionsManager.arcadeContextInfo=e,this._evaluateExpressions(e=>e.evaluateAll()))}),n=l(()=>this.layer,e=>{const t="subtype-sublayer"===e?.type?e.parent:"feature"===e?.type?e:null;t&&this.addResolvingPromise(F.createLoadedLayerContingentValuesCache(t).then(e=>{this._contingentValuesCache=e,this.notifyChange("fieldsWithContingentValues")}))},{initial:!0});this.addHandles([e,t,n])}destroy(){this.feature=null,this.layer=null,this._contingentValuesCache=o(this._contingentValuesCache),this.highlightHelper?.removeAll(),this._updatingHandles.destroy()}get _expressionInfosLookup(){return new Map(this.formTemplate?.expressionInfos?.map(e=>[e.name,e]))}get activeAssociationInput(){return this.allAssociationInputs.find(e=>e.uid===this.associationId)}get activeRelationshipInput(){return this.allRelationshipInputs.find(e=>e.relationshipId===this.relationshipId||e.activeCategory||e.showAllEnabled)}get _arcadeContextInfo(){const{_initialFeature:e,editType:t,layer:n,map:s,spatialReference:i,timeZone:o}=this;return{layer:C(n)?n:null,originalFeature:e,editType:t,map:s,spatialReference:i,timeZone:o}}get associationId(){return this._get("associationId")}set associationId(e){null==e&&this.activeAssociationInput?.viewModel&&(this.activeAssociationInput.associatedLayer=null,this.activeAssociationInput.viewModel.activeAssociationType=null),this._set("associationId",e)}get associatedLayer(){return this.activeAssociationInput?.associatedLayer}set associatedLayer(e){this.activeAssociationInput&&(this.activeAssociationInput.associatedLayer=e)}get allAssociationInputs(){return A(this.inputs)}get allFieldInputs(){return j(this.inputs)}get allGroupInputs(){return this.inputs.filter(T)}get allRelationshipInputs(){return M(this.inputs)}get _layerFieldsByName(){return new Map(this.layer?.fields.map(e=>[e.name,e]))}get feature(){return this._get("feature")}set feature(e){const t=this._get("feature");this._featureClone=e?e.clone():$.clone(),this._initialFeature=this._featureClone.clone(),this._expressionsManager&&(this._expressionsManager.feature=this._featureClone),e?(this._resetFieldInputValues(this._featureClone),this.allRelationshipInputs.forEach(t=>t.feature=e)):(this.inputs.forEach(e=>e.destroy()),this.inputs.length=0),t!==e&&(this.pendingSubtypeChoice=null),this.contingencyConstraintViolations.clear(),this._set("feature",e)}get fieldsWithContingentValues(){if(null==this._contingentValuesCache)return new Set;const e=this._contingentValuesCache.fieldGroups.flatMap(e=>e.fields);return new Set(e)}get formTemplate(){return this.layer&&"formTemplate"in this.layer?this.layer.formTemplate:null}set formTemplate(e){void 0===e?this._clearOverride("formTemplate"):this._override("formTemplate",e)}get formDescription(){const{formTemplate:e,layer:t}=this;return e?.description&&t?N({label:e.description,attributes:this.getValues(),fieldsIndex:t.fieldsIndex,timeZone:this.timeZone}):null}get formTitle(){const{formTemplate:e,layer:t}=this;return e?.title&&t?N({label:e.title,attributes:this.getValues(),fieldsIndex:t.fieldsIndex,timeZone:this.timeZone}):null}get formHeaderVisible(){const{activeRelationshipInput:e,activeAssociationInput:t,formDescription:n,formTitle:s}=this;return!(e||t||!n&&!s)}get joinedContingentValues(){return this._joinContingentValues()}get layer(){return this.feature?.sourceLayer&&"applyEdits"in this.feature.sourceLayer?this.feature.sourceLayer:null}set layer(e){this._override("layer",e)}get relationshipId(){return this._get("relationshipId")}set relationshipId(e){const t=this.allRelationshipInputs;if(null!=e&&e===this.relationshipId||t.forEach(e=>{e.showAllEnabled=!1,e.activeCategory=null}),null!=e){const n=t.find(t=>t.relationshipId===e);n&&(n.showAllEnabled=!0)}this._set("relationshipId",e)}get spatialReference(){return this.layer?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){return this.layer?.loaded?"ready":"disabled"}get submittable(){return!!this.valid||this.allFieldInputs.filter(e=>!e.valid).every(({submittable:e})=>e)}get timeZone(){const{layer:e}=this;if(e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone)return b;const t=e&&"preferredTimeZone"in e&&e.preferredTimeZone;return this._timeZone===V?t||b:this._timeZone||w}set timeZone(e){this._timeZone=e}get updating(){return this._updatingHandles.updating}get valid(){const e=this.allFieldInputs;return e.length>0&&e.every(({valid:e})=>e)}findField(e){return this.allFieldInputs.find(t=>t.name===e)}findGroup(e){return this.allGroupInputs.find(t=>t.id===e)}getFieldValueOptionsForField(e,t){const n=this.findField(e);if(!n)return[[],[],[]];const s="coded-value"===n.domain?.type?n.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[],i=null==n.value||s.some(e=>e.value===n.value)?[]:[{name:`${n.value}`,value:n.value}],o=this.fieldsWithContingentValues.has(e)?this._getContingentValueOptionsForField(e,t):[];if(o.length>0){const e=new Set(o.map(e=>e.value));return[o,s.filter(t=>!e.has(t.value)),i]}return[s,[],i]}getValue(e){const t=this.layer?.getField(e);if(null!=t)return this._featureClone.getAttribute(t.name)??null}setValue(e,t){const{_featureClone:n,strict:s}=this,i=this.findField(e);t=""===t?null:t,i&&n.getAttribute(e)!==t&&(i.value=t,s&&!i.valid||(this._afterValueChange(i),this._evaluateExpressions(t=>t.evaluateInvalidated([e]))))}getValues(){return{...this._featureClone.attributes}}overrideInitialFeature(e){this._initialFeature=e}submit(){const e=this.allFieldInputs,t=new Set(e.filter(e=>e.valid).map(({name:e})=>e)),n=e.filter(e=>!e.valid).map(({name:e})=>e),s=this.getValues();if(this.validateContingencyConstraints(s,{includeIncompleteViolations:!0}).length>0)for(const[i,o]of this.contingencyConstraintViolations.entries())"error"===o.type&&(t.delete(i),n.push(i));this.notifyChange("submittable"),this.notifyChange("valid"),this.emit("submit",{valid:[...t],invalid:n,values:s})}validateContingencyConstraints(e,t){const{_contingentValuesCache:n}=this,s=new Map;if(this.contingencyConstraintViolations=s,null==n)return[];const{invalid:i,incomplete:o}=n.validateContingencyConstraints(e),r=[...i,...t?.includeIncompleteViolations?o:[]];for(const a of r)for(const e of a.fieldGroup.fields)s.set(e,a);return r}notifyFeatureGeometryChanged(){const{feature:e,_featureClone:t}=this;e&&(t.geometry=e.geometry,this._evaluateExpressions(e=>e.evaluateInvalidatedByGeometry()))}applySubtypeDefaults(e){const{defaultValues:t}=e,{allFieldInputs:n}=this;for(const{name:s}of n){const e=t[s];null!=e&&this.setValue(s,e)}}_emitChangeEvent({name:e,valid:t,value:n}){this.emit("value-change",{layer:this.layer,feature:this.feature,fieldName:e,value:n,valid:t})}async _evaluateExpressions(e){const t=this._expressionsManager;null!=t&&await this._updatingHandles.addPromise(e(t).finally(()=>this._afterExpressionsEvaluated()))}async _updateInputsUsingFormElements(e,t,n){const s=new Map;for(const r of e)if(T(r)){s.set(r.element,r);for(const e of r.inputs)e.element&&s.set(e.element,e)}else r.element&&s.set(r.element,r);const i=new Map,o=await this._updateInputsUsingFormElementsRecursive({existingInputsByElement:s,updatedElements:t.filter(e=>this._isSupportedElement(e)),sharedInitializationProperties:n,group:null,newExpressionExecutorPromises:i});for(const[r,a]of s.entries())s.delete(r),a.destroy();return await Promise.all(Array.from(i.values())),o}async _updateInputsUsingFormElementsRecursive(e){const{existingInputsByElement:t,updatedElements:n,sharedInitializationProperties:s,group:i,newExpressionExecutorPromises:o}=e,r=[];for(const a of n){const e=t.has(a),n=e?t.get(a):g(a)?await this._makeUtilityNetworkAssociationInputFromElement(a,s,i):this._makeInputFromElement(a,s,i);if(n){if(r.push(n),await p(()=>!n.updating),this._assignExpressionExecutors(n,a,o),e)if(t.delete(a),T(n)){const{feature:e,timeZone:t}=s;n.set({feature:e,timeZone:t})}else if(S(n)){const e=this.relationshipId===a.relationshipId;n.set(s),n.set({map:this.map,showAllEnabled:e})}else g(n)?(n.set(s),n.set({map:this.map})):n.set(s);if(_(a)){const e=a.elements.filter(e=>this._isSupportedElement(e));n.inputs=await this._updateInputsUsingFormElementsRecursive({existingInputsByElement:t,updatedElements:e,sharedInitializationProperties:s,group:n,newExpressionExecutorPromises:o})}}}return r}_updateInputsUsingLayerFields(e,t,n){if(!Array.isArray(t))return i.getLogger(this).warn(this.declaredClass,"No attribute fields found."),[];const s=new Map;for(const i of e)if(T(i)){for(const e of i.inputs)e.destroy();i.inputs.length=0,i.destroy()}else S(i)?i.destroy():k(i)&&(null!==i.element?i.destroy():s.set(i.field,i));const o=[];for(const i of t){const e=n.feature?.getAttribute(i.name)??null,t=s.get(i)??new Z({field:i,preservesValueWhenHidden:this.formTemplate?.preserveFieldValuesWhenHidden});o.push(t.set({...n,value:e})),s.delete(i)}for(const[i,r]of s.entries())s.delete(i),r.destroy();return o}_resetFieldInputValues(e){for(const t of this.allFieldInputs)t.value=e.getAttribute(t.name)??null}_makeInputFromElement(e,t,s){return _(e)?Y(e,t):v(e)?this._makeFieldInputFromElement(e,t,s):I(e)?this._makeRelationshipInputFromElement(e,t,s):g(e)?this._makeUtilityNetworkAssociationInputFromElement(e,t,s):x(e)?q(e,t):g(e)?this._makeUtilityNetworkAssociationInputFromElement(e,t,s):n()}_makeFieldInputFromElement(e,t,n){const{editType:s,feature:i,initialFeature:o,layer:r,timeZone:a}=t,{fieldName:l}=e,u=l&&this._layerFieldsByName.get(l);return u?new Z({editType:s,element:e,field:u,value:i?.getAttribute(e.fieldName)??null,feature:i,initialFeature:o,layer:r,group:n,preservesValueWhenHidden:this.formTemplate?.preserveFieldValuesWhenHidden,timeZone:a}):null}_makeRelationshipInputFromElement(e,t,n=null){const{map:s}=this,{feature:i,layer:o,timeZone:r}=t,a=new O({element:e,feature:i,group:n,layer:o,map:s,timeZone:r});return a.addHandles(c(()=>a.relatedLayer,"edits",()=>this._evaluateExpressions(e=>e.evaluateAsyncExpressions()))),a}async _makeUtilityNetworkAssociationInputFromElement(e,t,n=null){const{map:s}=this,{feature:i,layer:o,timeZone:r}=t;return new(0,(await import("./UtilityNetworkAssociationInput.js")).default)({element:e,feature:i,group:n,layer:o,map:s,timeZone:r})}_assignExpressionExecutors(e,t,n){const s=D[t.type],i=[];for(const o of s){const s=`${o}Executor`;if(e[s]){this._useExecutor(e[s]);continue}const r=t[o];if(null!=r&&""!==r){const t=this._expressionInfosLookup.get(r)?.expression??r;i.push(this._getOrCreateExecutorForExpression(t,n).then(t=>{e[s]=this._useExecutor(t)}))}}return L(e)&&i.push(...this._assignTextElementExpressionExecutors(e,n)),i}_assignTextElementExpressionExecutors(e,t){const{_expressionInfosLookup:n}=this,s=[];for(const o of e.expressionsUsed){const r=n.get(o);null!=r?s.push(this._getOrCreateExecutorForExpression(r.expression,t).then(t=>e.setExpressionExecutor(o,this._useExecutor(t)))):i.getLogger(this).error("feature-form:expression-not-found",`Could not find expressionInfo object with name '${o}'`)}for(const i of e.fieldsUsed){const n=`return $feature['${i}'];`;s.push(this._getOrCreateExecutorForExpression(n,t).then(t=>e.setFieldExecutor(i,this._useExecutor(t))))}return s}async _getOrCreateExecutorForExpression(e,t){const{_expressionExecutorLookup:n}=this;if(n.has(e))return n.get(e);if(t.has(e))return t.get(e);const s=W(e,this.layer);t.set(e,s);const i=await s;return n.set(e,i),i}_createExpressionsManager(e){const{_arcadeContextInfo:t,_featureClone:n,allFieldInputs:s,formTemplate:i}=this;this._expressionsManager=new H({executors:e,feature:n,arcadeContextInfo:t,fieldInputs:s,preserveFieldValuesWhenHidden:!0===i?.preserveFieldValuesWhenHidden})}async _startExpressions(){if(0===this._expressionExecutorsInUse.size)return;const e=Array.from(this._expressionExecutorsInUse);this._createExpressionsManager(e),this._evaluateExpressions(e=>e.evaluateAll())}_stopExpressions(){this._expressionsManager=o(this._expressionsManager),this._expressionExecutorsInUse.clear()}_useExecutor(e){return this._expressionExecutorsInUse.add(e),e}_afterValueChange(e){const{name:t,value:n}=e,{_featureClone:s,formTemplate:i,layer:o}=this;if(!o)return;const r=s.getAttribute(t);s.setAttribute(t,n);const{typeFieldName:a,types:l}=R(o);if((e.isSubtypeField||t===a)&&n!==r){if("subtype-sublayer"===o.type){const e=o.parent?.findSublayerForFeature(s);e&&(this.feature&&(this.feature.sourceLayer=e),s.sourceLayer=e)}const e=new Set;for(const t of l)if(t.domains&&"object"==typeof t.domains)for(const n of Object.keys(t.domains))e.add(n);for(const t of e){const e=this.findField(t);e&&e.notifyChange("domain")}this.notifyChange("joinedContingentValues")}if(null!=i){const{description:e,title:n}=i;n&&h(n,t)&&this.notifyChange("formTitle"),e&&h(e,t)&&this.notifyChange("formDescription")}this._emitChangeEvent(e)}_afterExpressionsEvaluated(){const{_featureClone:e}=this;for(const t of this.allFieldInputs)t.value!==e.getAttribute(t.name)&&this._afterValueChange(t)}_joinContingentValues(){const e=this._contingentValuesCache;if(null==e)return[];const{typeFieldName:t}=R(this.layer),n=t?this.getValue(t):null,s=[];for(const r of e.fieldGroups){const{contingencies:e,fields:t,name:i}=r,o=[];for(const s of e)s.isRetired||null!=s.subtype&&s.subtype.code!==n||o.push({values:s.values});o.length>0&&s.push({name:i,fields:t,contingencies:o})}const[i,o]=this._generateJoinPlan(s);return[...i.flatMap(e=>this._joinFieldGroupContingencies(e)),...o.flatMap(e=>e.contingencies)]}_generateJoinPlan(e){const t=new Map,n=[],s=new Set;for(const l of e)for(const e of l.fields)if(t.has(e)){const i=t.get(e),o=l,r=[i.name,o.name].sort().join("|");if(s.has(r))continue;n.push([i,o]),s.add(r),t.set(e,o)}else t.set(e,l);const i=new Set(n.flat()),o=new Set(e);for(const l of i)o.delete(l);const r=new Map,a=new Map;for(const l of new Set(n.flat())){const e=Symbol(l.name);r.set(e,new Set([l])),a.set(l,e)}for(const[l,u]of n){const e=a.get(l),t=a.get(u);if(e===t)continue;const n=r.get(e),s=r.get(t);for(const i of s)n.add(i),a.set(i,e);r.delete(t)}return[[...r.values()].map(e=>[...e]),[...o]]}_joinFieldGroupContingencies(e){const t=e.slice(),n=t.shift();let s=t.shift(),i=this._generateJoinKey(n.fields,s.fields),o=new Set([...n.fields,...s.fields]),r=new Map;for(const l of n.contingencies){const[e]=this._hashContingency(l,i.codedValueFields,!0);r.has(e)?r.get(e)?.push(l):r.set(e,[l])}for(;t.length>0;){const e=new Map,n=t.shift(),a=this._generateJoinKey(o,n.fields);for(const t of s.contingencies){const[n,s]=this._hashContingency(t,i.codedValueFields),o=s?this._findMatchingContingenciesWithAnyHashMask(r,n):r.get(n);if(r.has(J)&&o?.push(...this._findMatchingContingenciesContainingAny(t,r.get(J),i.codedValueFields)),null!=o)for(const r of o){const n=i.rangeFields.length>0?this._joinContingenciesWithRangeDomains(r,t,i.rangeFields):this._joinContingencies(r,t);if(null==n)break;const[s]=this._hashContingency(n,a.codedValueFields,!0);e.has(s)?e.get(s)?.push(n):e.set(s,[n])}}r=e,s=n,i=a,o=new Set([...o,...s.fields])}const a=[];for(const l of s.contingencies){const[e,t]=this._hashContingency(l,i.codedValueFields),n=t?this._findMatchingContingenciesWithAnyHashMask(r,e):r.get(e);if(r.has(J)&&n.push(...this._findMatchingContingenciesContainingAny(l,r.get(J),i.codedValueFields)),null!=n)for(const s of n){const e=i.rangeFields.length>0?this._joinContingenciesWithRangeDomains(s,l,i.rangeFields):this._joinContingencies(s,l);null!=e&&a.push(e)}}return a}_joinContingencies(e,t){const n={values:{...e.values,...t.values}};for(const[s,i]of Object.entries(n.values))"any"===i.objectType&&null!=e.values[s]&&(n.values[s]=e.values[s]);return n}_joinContingenciesWithRangeDomains(e,t,n){const s=this._joinContingencies(e,t);for(const i of n){const n=e.values[i],o=t.values[i],{leftIsNull:r,rightIsNull:a,bothAreNull:l,leftIsAny:u,rightIsAny:p,bothAreAny:c,leftIsRange:h,rightIsRange:d}=this._compareObjectTypes(n.objectType,o.objectType);if(l||c)continue;if(r&&p||a&&u){s.values[i]=new E({objectType:"null"});continue}if(r&&d||a&&h)return null;u?(n.minValue=-1/0,n.maxValue=1/0):p&&(o.minValue=-1/0,o.maxValue=1/0);const f=Math.max(n.minValue,o.minValue),m=Math.min(n.maxValue,o.maxValue);if(f>m)return null;s.values[i]=new E({objectType:"range",minValue:f,maxValue:m})}return s}_findMatchingContingenciesContainingAny(e,t,n){return t.filter(t=>n.every(n=>{const s=t.values[n],i=e.values[n];return"any"===s.objectType||"any"===i.objectType||s.codedValue?.code===i.codedValue?.code}))}_findMatchingContingenciesWithAnyHashMask(e,t){const n=RegExp(`${t}$`),s=[];for(const[i,o]of e){if(i===J)break;n.test(i)&&s.push(...o)}return s}_generateJoinKey(e,t){const n=Array.isArray(e)?new Set(e):e,s=Array.isArray(t)?new Set(t):t,i=n.size<s.size?n:s,o=i===n?s:n,{feature:r}=this,a=new Set,l=new Set;for(const u of i)if(o.has(u)){const e=this.layer?.getFieldDomain(u,{feature:r??void 0,excludeImpliedDomains:!0});if(null==e)continue;switch(e.type){case"coded-value":a.add(u);break;case"range":l.add(u)}}return{codedValueFields:[...a],rangeFields:[...l]}}_contingencyIsValid(e,t){const n={};for(const{name:s,value:i}of this.allFieldInputs)this.fieldsWithContingentValues.has(s)&&null!=i&&s!==e&&(n[s]=i);return Object.entries(n).every(([e,n])=>!t.values.hasOwnProperty(e)||U(n,t.values[e]))}_getContingentValueOptionsForField(e,t){const n=this.joinedContingentValues.slice(),s=new Map,i={code:"",name:t??"No value"};for(const o of n){const t=o.values[e];if("code"===t?.objectType||"null"===t?.objectType){const{code:n,name:r}=t.codedValue&&"null"!==t.objectType?t.codedValue:i;!s.has(n)&&this._contingencyIsValid(e,o)&&s.set(n,{name:r,value:n})}}return[...s.values()]}_hashContingency(e,t,n=!1){if(t.length<1)return[z,!1];const s=[];let i=!1;for(const o of t){const t=e.values[o];if("any"===t.objectType){if(n)return[J,!0];i=!0,s.push(`${o}:.*`)}else"null"===t.objectType?s.push(`${o}:${B}`):s.push(`${o}:${t.codedValue?.code}`)}return[s.sort().join("&"),i]}_compareObjectTypes(e,t){return{leftIsNull:"null"===e,rightIsNull:"null"===t,bothAreNull:"null"===e&&"null"===t,leftIsAny:"any"===e,rightIsAny:"any"===t,bothAreAny:"any"===e&&"any"===t,leftIsRange:"range"===e,rightIsRange:"range"===t}}_isSupportedElement(e){return"field"===e.type||"group"===e.type||"relationship"===e.type||"text"===e.type||"utilityNetworkAssociations"===e.type||(i.getLogger(this).warn("form-info::unsupported-element-type","Only element types 'field', 'group' and 'relationship' are supported",`Element ${e.label} has unsupported type '${e.type}'`),!1)}get test(){return{featureClone:this._featureClone}}};function Y(e,t){const{feature:n,layer:s}=t;return new P({element:e,inputs:[],feature:n,layer:s})}function q(e,t,n=null){const{feature:s,layer:i,timeZone:o}=t;return new G({element:e,feature:s,group:n,layer:i,timeZone:o})}e([d()],K.prototype,"_expressionInfosLookup",null),e([d()],K.prototype,"_featureClone",void 0),e([d()],K.prototype,"_timeZone",void 0),e([d()],K.prototype,"activeAssociation",void 0),e([d()],K.prototype,"activeAssociationInput",null),e([d()],K.prototype,"activeRelationshipInput",null),e([d()],K.prototype,"_arcadeContextInfo",null),e([d()],K.prototype,"associationId",null),e([d()],K.prototype,"associatedLayer",null),e([d()],K.prototype,"allAssociationInputs",null),e([d()],K.prototype,"allFieldInputs",null),e([d()],K.prototype,"allGroupInputs",null),e([d()],K.prototype,"allRelationshipInputs",null),e([d()],K.prototype,"_layerFieldsByName",null),e([d()],K.prototype,"editType",void 0),e([d()],K.prototype,"contingencyConstraintViolations",void 0),e([d()],K.prototype,"disabled",void 0),e([d()],K.prototype,"feature",null),e([d()],K.prototype,"fieldsWithContingentValues",null),e([d({type:y})],K.prototype,"formTemplate",null),e([d()],K.prototype,"formDescription",null),e([d()],K.prototype,"formTitle",null),e([d()],K.prototype,"formHeaderVisible",null),e([d()],K.prototype,"highlightHelper",void 0),e([d()],K.prototype,"inputs",void 0),e([d()],K.prototype,"joinedContingentValues",null),e([d()],K.prototype,"layer",null),e([d()],K.prototype,"map",void 0),e([d()],K.prototype,"callbacks",void 0),e([d()],K.prototype,"relationshipId",null),e([d()],K.prototype,"spatialReference",null),e([d()],K.prototype,"state",null),e([d()],K.prototype,"strict",void 0),e([d()],K.prototype,"submittable",null),e([d()],K.prototype,"timeZone",null),e([d()],K.prototype,"updating",null),e([d()],K.prototype,"valid",null),e([d()],K.prototype,"pendingSubtypeChoice",void 0),e([d()],K.prototype,"getValues",null),e([d()],K.prototype,"submit",null),e([d()],K.prototype,"test",null),K=e([f("esri.widgets.FeatureForm.FeatureFormViewModel")],K);const Q=K;export{Q as default};
5
+ import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{neverReached as n}from"../../core/compilerUtils.js";import{EventedAccessor as s}from"../../core/Evented.js";import i from"../../core/Logger.js";import{destroyMaybe as o}from"../../core/maybe.js";import r from"../../core/Promise.js";import{debounce as a}from"../../core/promiseUtils.js";import{watch as l,syncAndInitial as u,whenOnce as p,on as c}from"../../core/reactiveUtils.js";import{templateHasKey as h}from"../../core/string.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as m}from"../../core/support/UpdatingHandles.js";import y from"../../form/FormTemplate.js";import{isUtilityNetworkAssociationsElement as g,isGroupElement as _,isFieldElement as v,isRelationshipElement as I,isTextElement as x}from"../../form/support/formUtils.js";import E from"../../layers/support/ContingentValue.js";import{isEditableLayer as C}from"../../layers/support/editableLayers.js";import F from"../../layers/support/LayerContingentValuesCache.js";import{utc as b,unknown as V,system as w}from"../../time/constants.js";import{flattenAssociationInputs as A,flattenFieldInputs as j,isGroupInput as T,flattenRelationshipInputs as M,parseFormTemplateString as N,isRelationshipInput as S,isFieldInput as k,isTextElementInput as L,getNormalizedFeatureTypeInfo as R,valueIsValidContingentValue as U}from"./featureFormUtils.js";import Z from"./FieldInput.js";import{FormExpressionsManager as H}from"./FormExpressionsManager.js";import P from"./GroupInput.js";import O from"./RelationshipInput.js";import G from"./TextElementInput.js";import{createFormExpressionArcadeExecutor as W}from"../support/forms/expressions/FormExpressionArcadeExecutor.js";const $=new t({attributes:{}}),D={field:["editableExpression","requiredExpression","valueExpression","visibilityExpression"],group:["visibilityExpression"],relationship:["editableExpression","visibilityExpression"],text:["visibilityExpression"],utilityNetworkAssociations:["editableExpression","visibilityExpression"]},z="#JSAPI_CONTINGENT_VALUE_EMPTY_HASH",J="#JSAPI_CONTINGENT_VALUE_ANY_HASH",B="#JSAPI_CONTINGENT_VALUE_NULL_HASH";let K=class extends(r.EsriPromiseMixin(s)){constructor(e){super(e),this._expressionExecutorsInUse=new Set,this._expressionExecutorLookup=new Map,this._expressionsManager=null,this._contingentValuesCache=null,this._featureClone=$.clone(),this._initialFeature=$.clone(),this._timeZone=null,this._updatingHandles=new m,this.activeAssociation=null,this.editType="NA",this.contingencyConstraintViolations=new Map,this.disabled=!1,this.highlightHelper=null,this.inputs=[],this.map=null,this.callbacks=null,this.strict=!1,this.pendingSubtypeChoice=null,this._updateInputs=a(async()=>{this._stopExpressions();const{_featureClone:e,_initialFeature:t,editType:n,formTemplate:s,inputs:i,layer:o,timeZone:r}=this;if(!o)return;const a={editType:n,feature:e,initialFeature:t,layer:o,timeZone:r},l=i.slice(),u=s?.elements&&s.elements.length>0?await this._updateInputsUsingFormElements(l,s.elements,a):this._updateInputsUsingLayerFields(l,o?.fields,a);this.inputs=u,await this._startExpressions()})}initialize(){const e=l(()=>[this.layer,!!this.layer?.loaded,this.formTemplate,this.feature,this.timeZone,this.editType],([e,t])=>{null!=e&&(t?this._updatingHandles.addPromise(this._updateInputs()):e.load().catch(()=>{}))},u),t=l(()=>this._arcadeContextInfo,e=>{null!=this._expressionsManager&&(this._expressionsManager.arcadeContextInfo=e,this._evaluateExpressions(e=>e.evaluateAll()))}),n=l(()=>this.layer,e=>{const t="subtype-sublayer"===e?.type?e.parent:"feature"===e?.type?e:null;t&&this.addResolvingPromise(F.createLoadedLayerContingentValuesCache(t).then(e=>{this._contingentValuesCache=e,this.notifyChange("fieldsWithContingentValues")}))},{initial:!0});this.addHandles([e,t,n])}destroy(){this.feature=null,this.layer=null,this._contingentValuesCache=o(this._contingentValuesCache),this.highlightHelper?.removeAll(),this._updatingHandles.destroy()}get _expressionInfosLookup(){return new Map(this.formTemplate?.expressionInfos?.map(e=>[e.name,e]))}get activeAssociationInput(){return this.allAssociationInputs.find(e=>e.uid===this.associationId)}get activeRelationshipInput(){return this.allRelationshipInputs.find(e=>e.relationshipId===this.relationshipId||e.activeCategory||e.showAllEnabled)}get _arcadeContextInfo(){const{_initialFeature:e,editType:t,layer:n,map:s,spatialReference:i,timeZone:o}=this;return{layer:C(n)?n:null,originalFeature:e,editType:t,map:s,spatialReference:i,timeZone:o}}get associationId(){return this._get("associationId")}set associationId(e){null==e&&this.activeAssociationInput?.viewModel&&(this.activeAssociationInput.associatedLayer=null,this.activeAssociationInput.viewModel.activeAssociationType=null),this._set("associationId",e)}get associatedLayer(){return this.activeAssociationInput?.associatedLayer}set associatedLayer(e){this.activeAssociationInput&&(this.activeAssociationInput.associatedLayer=e)}get allAssociationInputs(){return A(this.inputs)}get allFieldInputs(){return j(this.inputs)}get allGroupInputs(){return this.inputs.filter(T)}get allRelationshipInputs(){return M(this.inputs)}get _layerFieldsByName(){return new Map(this.layer?.fields.map(e=>[e.name,e]))}get feature(){return this._get("feature")}set feature(e){const t=this._get("feature");this._featureClone=e?e.clone():$.clone(),this._initialFeature=this._featureClone.clone(),this._expressionsManager&&(this._expressionsManager.feature=this._featureClone),e?(this._resetFieldInputValues(this._featureClone),this.allRelationshipInputs.forEach(t=>t.feature=e)):(this.inputs.forEach(e=>e.destroy()),this.inputs.length=0),t!==e&&(this.pendingSubtypeChoice=null),this.contingencyConstraintViolations.clear(),this._set("feature",e)}get fieldsWithContingentValues(){if(null==this._contingentValuesCache)return new Set;const e=this._contingentValuesCache.fieldGroups.flatMap(e=>e.fields);return new Set(e)}get formTemplate(){return this.layer&&"formTemplate"in this.layer?this.layer.formTemplate:null}set formTemplate(e){void 0===e?this._clearOverride("formTemplate"):this._override("formTemplate",e)}get formDescription(){const{formTemplate:e,layer:t}=this;return e?.description&&t?N({label:e.description,attributes:this.getValues(),fieldsIndex:t.fieldsIndex,timeZone:this.timeZone}):null}get formTitle(){const{formTemplate:e,layer:t}=this;return e?.title&&t?N({label:e.title,attributes:this.getValues(),fieldsIndex:t.fieldsIndex,timeZone:this.timeZone}):null}get formHeaderVisible(){const{activeRelationshipInput:e,activeAssociationInput:t,formDescription:n,formTitle:s}=this;return!(e||t||!n&&!s)}get joinedContingentValues(){return this._joinContingentValues()}get layer(){return this.feature?.sourceLayer&&"applyEdits"in this.feature.sourceLayer?this.feature.sourceLayer:null}set layer(e){this._override("layer",e)}get relationshipId(){return this._get("relationshipId")}set relationshipId(e){const t=this.allRelationshipInputs;if(null!=e&&e===this.relationshipId||t.forEach(e=>{e.showAllEnabled=!1,e.activeCategory=null}),null!=e){const n=t.find(t=>t.relationshipId===e);n&&(n.showAllEnabled=!0)}this._set("relationshipId",e)}get spatialReference(){return this.layer?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){return this.layer?.loaded?"ready":"disabled"}get submittable(){return!!this.valid||this.allFieldInputs.filter(e=>!e.valid).every(({submittable:e})=>e)}get timeZone(){const{layer:e}=this;if(e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone)return b;const t=e&&"preferredTimeZone"in e&&e.preferredTimeZone;return this._timeZone===V?t||b:this._timeZone||w}set timeZone(e){this._timeZone=e}get updating(){return this._updatingHandles.updating}get valid(){const e=this.allFieldInputs;return e.length>0&&e.every(({valid:e})=>e)}findField(e){return this.allFieldInputs.find(t=>t.name===e)}findGroup(e){return this.allGroupInputs.find(t=>t.id===e)}getFieldValueOptionsForField(e,t){const n=this.findField(e);if(!n)return[[],[],[]];const s="coded-value"===n.domain?.type?n.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[],i=null==n.value||s.some(e=>e.value===n.value)?[]:[{name:`${n.value}`,value:n.value}],o=this.fieldsWithContingentValues.has(e)?this._getContingentValueOptionsForField(e,t):[];if(o.length>0){const e=new Set(o.map(e=>e.value));return[o,s.filter(t=>!e.has(t.value)),i]}return[s,[],i]}getValue(e){const t=this.layer?.getField(e);if(null!=t)return this._featureClone.getAttribute(t.name)??null}setValue(e,t){const{_featureClone:n,strict:s}=this,i=this.findField(e);t=""===t?null:t,i&&n.getAttribute(e)!==t&&(i.value=t,s&&!i.valid||(this._afterValueChange(i),this._evaluateExpressions(t=>t.evaluateInvalidated([e]))))}getValues(){return{...this._featureClone.attributes}}overrideInitialFeature(e){this._initialFeature=e}submit(){const e=this.allFieldInputs,t=new Set(e.filter(e=>e.valid).map(({name:e})=>e)),n=e.filter(e=>!e.valid).map(({name:e})=>e),s=this.getValues();if(this.validateContingencyConstraints(s,{includeIncompleteViolations:!0}).length>0)for(const[i,o]of this.contingencyConstraintViolations.entries())"error"===o.type&&(t.delete(i),n.push(i));this.notifyChange("submittable"),this.notifyChange("valid"),this.emit("submit",{valid:[...t],invalid:n,values:s})}validateContingencyConstraints(e,t){const{_contingentValuesCache:n}=this,s=new Map;if(this.contingencyConstraintViolations=s,null==n)return[];const{invalid:i,incomplete:o}=n.validateContingencyConstraints(e),r=[...i,...t?.includeIncompleteViolations?o:[]];for(const a of r)for(const e of a.fieldGroup.fields)s.set(e,a);return r}notifyFeatureGeometryChanged(){const{feature:e,_featureClone:t}=this;e&&(t.geometry=e.geometry,this._evaluateExpressions(e=>e.evaluateInvalidatedByGeometry()))}applySubtypeDefaults(e){const{defaultValues:t}=e,{allFieldInputs:n}=this;for(const{name:s}of n){const e=t[s];null!=e&&this.setValue(s,e)}}_emitChangeEvent({name:e,valid:t,value:n}){this.emit("value-change",{layer:this.layer,feature:this.feature,fieldName:e,value:n,valid:t})}async _evaluateExpressions(e){const t=this._expressionsManager;null!=t&&await this._updatingHandles.addPromise(e(t).finally(()=>this._afterExpressionsEvaluated()))}async _updateInputsUsingFormElements(e,t,n){const s=new Map;for(const r of e)if(T(r)){s.set(r.element,r);for(const e of r.inputs)e.element&&s.set(e.element,e)}else r.element&&s.set(r.element,r);const i=new Map,o=await this._updateInputsUsingFormElementsRecursive({existingInputsByElement:s,updatedElements:t.filter(e=>this._isSupportedElement(e)),sharedInitializationProperties:n,group:null,newExpressionExecutorPromises:i});for(const[r,a]of s.entries())s.delete(r),a.destroy();return await Promise.all(Array.from(i.values())),o}async _updateInputsUsingFormElementsRecursive(e){const{existingInputsByElement:t,updatedElements:n,sharedInitializationProperties:s,group:i,newExpressionExecutorPromises:o}=e,r=[];for(const a of n){const e=t.has(a),n=e?t.get(a):g(a)?await this._makeUtilityNetworkAssociationInputFromElement(a,s,i):this._makeInputFromElement(a,s,i);if(n){if(r.push(n),await p(()=>!n.updating),this._assignExpressionExecutors(n,a,o),e)if(t.delete(a),T(n)){const{feature:e,timeZone:t}=s;n.set({feature:e,timeZone:t})}else if(S(n)){const e=this.relationshipId===a.relationshipId;n.set(s),n.set({map:this.map,showAllEnabled:e})}else g(n)?(n.set(s),n.set({map:this.map})):n.set(s);if(_(a)){const e=a.elements.filter(e=>this._isSupportedElement(e));n.inputs=await this._updateInputsUsingFormElementsRecursive({existingInputsByElement:t,updatedElements:e,sharedInitializationProperties:s,group:n,newExpressionExecutorPromises:o})}}}return r}_updateInputsUsingLayerFields(e,t,n){if(!Array.isArray(t))return i.getLogger(this).warn(this.declaredClass,"No attribute fields found."),[];const s=new Map;for(const i of e)if(T(i)){for(const e of i.inputs)e.destroy();i.inputs.length=0,i.destroy()}else S(i)?i.destroy():k(i)&&(null!==i.element?i.destroy():s.set(i.field,i));const o=[];for(const i of t){const e=n.feature?.getAttribute(i.name)??null,t=s.get(i)??new Z({field:i,preservesValueWhenHidden:this.formTemplate?.preserveFieldValuesWhenHidden});o.push(t.set({...n,value:e})),s.delete(i)}for(const[i,r]of s.entries())s.delete(i),r.destroy();return o}_resetFieldInputValues(e){for(const t of this.allFieldInputs)t.value=e.getAttribute(t.name)??null}_makeInputFromElement(e,t,s){return _(e)?Y(e,t):v(e)?this._makeFieldInputFromElement(e,t,s):I(e)?this._makeRelationshipInputFromElement(e,t,s):g(e)?this._makeUtilityNetworkAssociationInputFromElement(e,t,s):x(e)?q(e,t):g(e)?this._makeUtilityNetworkAssociationInputFromElement(e,t,s):n()}_makeFieldInputFromElement(e,t,n){const{editType:s,feature:i,initialFeature:o,layer:r,timeZone:a}=t,{fieldName:l}=e,u=l&&this._layerFieldsByName.get(l);return u?new Z({editType:s,element:e,field:u,value:i?.getAttribute(e.fieldName)??null,feature:i,initialFeature:o,layer:r,group:n,preservesValueWhenHidden:this.formTemplate?.preserveFieldValuesWhenHidden,timeZone:a}):null}_makeRelationshipInputFromElement(e,t,n=null){const{map:s}=this,{feature:i,layer:o,timeZone:r}=t,a=new O({element:e,feature:i,group:n,layer:o,map:s,timeZone:r});return a.addHandles(c(()=>a.relatedLayer,"edits",()=>this._evaluateExpressions(e=>e.evaluateAsyncExpressions()))),a}async _makeUtilityNetworkAssociationInputFromElement(e,t,n=null){const{map:s}=this,{feature:i,layer:o,timeZone:r}=t;return new(0,(await import("./UtilityNetworkAssociationInput.js")).default)({element:e,feature:i,group:n,layer:o,map:s,timeZone:r})}_assignExpressionExecutors(e,t,n){const s=D[t.type],i=[];for(const o of s){const s=`${o}Executor`;if(e[s]){this._useExecutor(e[s]);continue}const r=t[o];if(null!=r&&""!==r){const t=this._expressionInfosLookup.get(r)?.expression??r;i.push(this._getOrCreateExecutorForExpression(t,n).then(t=>{e[s]=this._useExecutor(t)}))}}return L(e)&&i.push(...this._assignTextElementExpressionExecutors(e,n)),i}_assignTextElementExpressionExecutors(e,t){const{_expressionInfosLookup:n}=this,s=[];for(const o of e.expressionsUsed){const r=n.get(o);null!=r?s.push(this._getOrCreateExecutorForExpression(r.expression,t).then(t=>e.setExpressionExecutor(o,this._useExecutor(t)))):i.getLogger(this).error("feature-form:expression-not-found",`Could not find expressionInfo object with name '${o}'`)}for(const i of e.fieldsUsed){const n=`return $feature['${i}'];`;s.push(this._getOrCreateExecutorForExpression(n,t).then(t=>e.setFieldExecutor(i,this._useExecutor(t))))}return s}async _getOrCreateExecutorForExpression(e,t){const{_expressionExecutorLookup:n}=this;if(n.has(e))return n.get(e);if(t.has(e))return t.get(e);const s=W(e,this.layer);t.set(e,s);const i=await s;return n.set(e,i),i}_createExpressionsManager(e){const{_arcadeContextInfo:t,_featureClone:n,allFieldInputs:s,formTemplate:i}=this;this._expressionsManager=new H({executors:e,feature:n,arcadeContextInfo:t,fieldInputs:s,preserveFieldValuesWhenHidden:!0===i?.preserveFieldValuesWhenHidden})}async _startExpressions(){if(0===this._expressionExecutorsInUse.size)return;const e=Array.from(this._expressionExecutorsInUse);this._createExpressionsManager(e),this._evaluateExpressions(e=>e.evaluateAll())}_stopExpressions(){this._expressionsManager=o(this._expressionsManager),this._expressionExecutorsInUse.clear()}_useExecutor(e){return this._expressionExecutorsInUse.add(e),e}_afterValueChange(e){const{name:t,value:n}=e,{_featureClone:s,formTemplate:i,layer:o}=this;if(!o)return;const r=s.getAttribute(t);s.setAttribute(t,n);const{typeFieldName:a,types:l}=R(o);if((e.isSubtypeField||t===a)&&n!==r){if("subtype-sublayer"===o.type){const e=o.parent?.findSublayerForFeature(s);e&&(this.feature&&(this.feature.sourceLayer=e),s.sourceLayer=e)}const e=new Set;for(const t of l)if(t.domains&&"object"==typeof t.domains)for(const n of Object.keys(t.domains))e.add(n);for(const t of e){const e=this.findField(t);e&&e.notifyChange("domain")}this.notifyChange("joinedContingentValues")}if(null!=i){const{description:e,title:n}=i;n&&h(n,t)&&this.notifyChange("formTitle"),e&&h(e,t)&&this.notifyChange("formDescription")}this._emitChangeEvent(e)}_afterExpressionsEvaluated(){const{_featureClone:e}=this;for(const t of this.allFieldInputs)t.value!==e.getAttribute(t.name)&&this._afterValueChange(t)}_joinContingentValues(){const e=this._contingentValuesCache;if(null==e)return[];const{typeFieldName:t}=R(this.layer),n=t?this.getValue(t):null,s=[];for(const r of e.fieldGroups){const{contingencies:e,fields:t,name:i}=r,o=[];for(const s of e)s.isRetired||null!=s.subtype&&s.subtype.code!==n||o.push({values:s.values});o.length>0&&s.push({name:i,fields:t,contingencies:o})}const[i,o]=this._generateJoinPlan(s);return[...i.flatMap(e=>this._joinFieldGroupContingencies(e)),...o.flatMap(e=>e.contingencies)]}_generateJoinPlan(e){const t=new Map,n=[],s=new Set;for(const l of e)for(const e of l.fields)if(t.has(e)){const i=t.get(e),o=l,r=[i.name,o.name].sort().join("|");if(s.has(r))continue;n.push([i,o]),s.add(r),t.set(e,o)}else t.set(e,l);const i=new Set(n.flat()),o=new Set(e);for(const l of i)o.delete(l);const r=new Map,a=new Map;for(const l of new Set(n.flat())){const e=Symbol(l.name);r.set(e,new Set([l])),a.set(l,e)}for(const[l,u]of n){const e=a.get(l),t=a.get(u);if(e===t)continue;const n=r.get(e),s=r.get(t);for(const i of s)n.add(i),a.set(i,e);r.delete(t)}return[[...r.values()].map(e=>[...e]),[...o]]}_joinFieldGroupContingencies(e){const t=e.slice(),n=t.shift();let s=t.shift(),i=this._generateJoinKey(n.fields,s.fields),o=new Set([...n.fields,...s.fields]),r=new Map;for(const l of n.contingencies){const[e]=this._hashContingency(l,i.codedValueFields,!0);r.has(e)?r.get(e)?.push(l):r.set(e,[l])}for(;t.length>0;){const e=new Map,n=t.shift(),a=this._generateJoinKey(o,n.fields);for(const t of s.contingencies){const[n,s]=this._hashContingency(t,i.codedValueFields),o=s?this._findMatchingContingenciesWithAnyHashMask(r,n):r.get(n);if(r.has(J)&&o?.push(...this._findMatchingContingenciesContainingAny(t,r.get(J),i.codedValueFields)),null!=o)for(const r of o){const n=i.rangeFields.length>0?this._joinContingenciesWithRangeDomains(r,t,i.rangeFields):this._joinContingencies(r,t);if(null==n)break;const[s]=this._hashContingency(n,a.codedValueFields,!0);e.has(s)?e.get(s)?.push(n):e.set(s,[n])}}r=e,s=n,i=a,o=new Set([...o,...s.fields])}const a=[];for(const l of s.contingencies){const[e,t]=this._hashContingency(l,i.codedValueFields),n=t?this._findMatchingContingenciesWithAnyHashMask(r,e):r.get(e);if(r.has(J)&&n.push(...this._findMatchingContingenciesContainingAny(l,r.get(J),i.codedValueFields)),null!=n)for(const s of n){const e=i.rangeFields.length>0?this._joinContingenciesWithRangeDomains(s,l,i.rangeFields):this._joinContingencies(s,l);null!=e&&a.push(e)}}return a}_joinContingencies(e,t){const n={values:{...e.values,...t.values}};for(const[s,i]of Object.entries(n.values))"any"===i.objectType&&null!=e.values[s]&&(n.values[s]=e.values[s]);return n}_joinContingenciesWithRangeDomains(e,t,n){const s=this._joinContingencies(e,t);for(const i of n){const n=e.values[i],o=t.values[i],{leftIsNull:r,rightIsNull:a,bothAreNull:l,leftIsAny:u,rightIsAny:p,bothAreAny:c,leftIsRange:h,rightIsRange:d}=this._compareObjectTypes(n.objectType,o.objectType);if(l||c)continue;if(r&&p||a&&u){s.values[i]=new E({objectType:"null"});continue}if(r&&d||a&&h)return null;u?(n.minValue=-1/0,n.maxValue=1/0):p&&(o.minValue=-1/0,o.maxValue=1/0);const f=Math.max(n.minValue,o.minValue),m=Math.min(n.maxValue,o.maxValue);if(f>m)return null;s.values[i]=new E({objectType:"range",minValue:f,maxValue:m})}return s}_findMatchingContingenciesContainingAny(e,t,n){return t.filter(t=>n.every(n=>{const s=t.values[n],i=e.values[n];return"any"===s.objectType||"any"===i.objectType||s.codedValue?.code===i.codedValue?.code}))}_findMatchingContingenciesWithAnyHashMask(e,t){const n=RegExp(`${t}$`),s=[];for(const[i,o]of e){if(i===J)break;n.test(i)&&s.push(...o)}return s}_generateJoinKey(e,t){const n=Array.isArray(e)?new Set(e):e,s=Array.isArray(t)?new Set(t):t,i=n.size<s.size?n:s,o=i===n?s:n,{feature:r}=this,a=new Set,l=new Set;for(const u of i)if(o.has(u)){const e=this.layer?.getFieldDomain(u,{feature:r??void 0,excludeImpliedDomains:!0});if(null==e)continue;switch(e.type){case"coded-value":a.add(u);break;case"range":l.add(u)}}return{codedValueFields:[...a],rangeFields:[...l]}}_contingencyIsValid(e,t){const n={};for(const{name:s,value:i}of this.allFieldInputs)this.fieldsWithContingentValues.has(s)&&null!=i&&s!==e&&(n[s]=i);return Object.entries(n).every(([e,n])=>!t.values.hasOwnProperty(e)||U(n,t.values[e]))}_getContingentValueOptionsForField(e,t){const n=this.joinedContingentValues.slice(),s=new Map,i={code:"",name:t??"No value"};for(const o of n){const t=o.values[e];if("code"===t?.objectType||"null"===t?.objectType){const{code:n,name:r}=t.codedValue&&"null"!==t.objectType?t.codedValue:i;!s.has(n)&&this._contingencyIsValid(e,o)&&s.set(n,{name:r,value:n})}}return[...s.values()]}_hashContingency(e,t,n=!1){if(t.length<1)return[z,!1];const s=[];let i=!1;for(const o of t){const t=e.values[o];if("any"===t.objectType){if(n)return[J,!0];i=!0,s.push(`${o}:.*`)}else"null"===t.objectType?s.push(`${o}:${B}`):s.push(`${o}:${t.codedValue?.code}`)}return[s.sort().join("&"),i]}_compareObjectTypes(e,t){return{leftIsNull:"null"===e,rightIsNull:"null"===t,bothAreNull:"null"===e&&"null"===t,leftIsAny:"any"===e,rightIsAny:"any"===t,bothAreAny:"any"===e&&"any"===t,leftIsRange:"range"===e,rightIsRange:"range"===t}}_isSupportedElement(e){return"field"===e.type||"group"===e.type||"relationship"===e.type||"text"===e.type||"utilityNetworkAssociations"===e.type||(i.getLogger(this).warn("form-info::unsupported-element-type","Only element types 'field', 'group' and 'relationship' are supported",`Element ${e.label} has unsupported type '${e.type}'`),!1)}get test(){return{featureClone:this._featureClone}}};function Y(e,t){const{feature:n,layer:s}=t;return new P({element:e,inputs:[],feature:n,layer:s})}function q(e,t,n=null){const{feature:s,layer:i,timeZone:o}=t;return new G({element:e,feature:s,group:n,layer:i,timeZone:o})}e([d()],K.prototype,"_expressionInfosLookup",null),e([d()],K.prototype,"_featureClone",void 0),e([d()],K.prototype,"_timeZone",void 0),e([d()],K.prototype,"activeAssociation",void 0),e([d()],K.prototype,"activeAssociationInput",null),e([d()],K.prototype,"activeRelationshipInput",null),e([d()],K.prototype,"_arcadeContextInfo",null),e([d()],K.prototype,"associationId",null),e([d()],K.prototype,"associatedLayer",null),e([d()],K.prototype,"allAssociationInputs",null),e([d()],K.prototype,"allFieldInputs",null),e([d()],K.prototype,"allGroupInputs",null),e([d()],K.prototype,"allRelationshipInputs",null),e([d()],K.prototype,"_layerFieldsByName",null),e([d()],K.prototype,"editType",void 0),e([d()],K.prototype,"contingencyConstraintViolations",void 0),e([d()],K.prototype,"disabled",void 0),e([d()],K.prototype,"feature",null),e([d()],K.prototype,"fieldsWithContingentValues",null),e([d({type:y})],K.prototype,"formTemplate",null),e([d()],K.prototype,"formDescription",null),e([d()],K.prototype,"formTitle",null),e([d()],K.prototype,"formHeaderVisible",null),e([d()],K.prototype,"highlightHelper",void 0),e([d()],K.prototype,"inputs",void 0),e([d()],K.prototype,"joinedContingentValues",null),e([d()],K.prototype,"layer",null),e([d()],K.prototype,"map",void 0),e([d()],K.prototype,"callbacks",void 0),e([d()],K.prototype,"relationshipId",null),e([d()],K.prototype,"spatialReference",null),e([d()],K.prototype,"state",null),e([d()],K.prototype,"strict",void 0),e([d()],K.prototype,"submittable",null),e([d()],K.prototype,"timeZone",null),e([d()],K.prototype,"updating",null),e([d()],K.prototype,"valid",null),e([d()],K.prototype,"pendingSubtypeChoice",void 0),e([d()],K.prototype,"getValues",null),e([d()],K.prototype,"submit",null),e([d()],K.prototype,"test",null),K=e([f("esri.widgets.FeatureForm.FeatureFormViewModel")],K);const Q=K;export{Q as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../core/Identifiable.js";import{ignoreAbortErrors as s}from"../../core/promiseUtils.js";import{watch as i,initial as o,on as a}from"../../core/reactiveUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../core/support/UpdatingHandles.js";import{isAssociatedFeatureSupportedLayer as p}from"../Feature/support/featureUtils.js";import u from"./EditableInput.js";import c from"../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";let d=class extends(e.IdentifiableMixin(u)){constructor(t){super(t),this.group=null,this.type="utilityNetworkAssociations",this.featureItem=null,this._updatingHandlesSetUp=new l,this.addHandles([i(()=>({feature:this.feature,element:this.element,layer:this.layer}),t=>this._createAssociationVM(t),o),i(()=>this.feature,()=>this._setFeatureItem()),i(()=>this.associatedLayer,(t,e)=>this._updateLayerEditHandle(t,e),o)])}destroy(){this._associationsVM?.destroy(),this._updatingHandlesSetUp.destroy()}get activeAssociationType(){return this._associationsVM?.activeAssociationType}get associatedFeatures(){const{associatedLayer:t}=this;if(t)return this.associatedFeatureInfos.get(t)}get associatedFeatureInfos(){const{_associationsVM:t}=this;if(!t?.associationFeatures?.size||!t?.utilityNetwork)return new Map;const{associationFeatures:e}=t,s=new Map;return e.forEach((t,e)=>{s.set(e,t)}),s}get associatedLayer(){return this._get("associatedLayer")}set associatedLayer(t){this._associationsVM.showAllEnabled=null!=t,this._set("associatedLayer",t)}get associationsViewModel(){return this._associationsVM}get canAddAssociation(){const{editable:t,utilityNetwork:e}=this;return!(!e||!this.loaded)&&t}get editable(){return this.evaluatedEditableExpression??!0}get featureCount(){return this._associationsVM?.featureCount??0}get viewModel(){return this._associationsVM}get loaded(){return"loading"!==this._associationsVM?.state&&!this._updatingHandlesSetUp.updating}get map(){return this._get("map")}set map(t){t&&this._associationsVM?.set("map",t),this._set("map",t)}get utilityNetwork(){return this._associationsVM?.utilityNetwork}get associationTypes(){return this._associationsVM?.associationTypes??this.element.associationTypes}get visible(){const{utilityNetwork:t}=this;return!!t&&(null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element)}get updating(){return"loading"===this._associationsVM?.state||"querying"===this._associationsVM?.state}async refresh(){await s(this._associationsVM.refresh())}_updateLayerEditHandle(t,e){e&&"layerId"in e&&this.removeHandles(e?.layerId),p(t)&&this.addHandles(a(()=>t,"edits",()=>this.refresh()),t.layerId)}_createAssociationVM(t){const{feature:e,element:s,layer:i}=t;if(this._associationsVM?.destroy(),!e||!s||!i)return;const{map:o,associationTypes:a}=this;p(i)&&(this._associationsVM=new c({graphic:e,layer:i,map:o,associationTypes:a,source:"featureForm",title:this.label,description:this.description}))}_setFeatureItem(){this._updatingHandlesSetUp.addPromise((async()=>{const{feature:t,layer:e}=this;t&&e&&"getFeatureTitle"in e&&(this.featureItem={feature:t,label:await e.getFeatureTitle(t)})})())}};t([r()],d.prototype,"_associationsVM",void 0),t([r()],d.prototype,"activeAssociationType",null),t([r()],d.prototype,"associatedFeatures",null),t([r()],d.prototype,"associatedFeatureInfos",null),t([r()],d.prototype,"associatedLayer",null),t([r()],d.prototype,"associationsViewModel",null),t([r()],d.prototype,"canAddAssociation",null),t([r()],d.prototype,"editable",null),t([r()],d.prototype,"featureCount",null),t([r()],d.prototype,"viewModel",null),t([r()],d.prototype,"group",void 0),t([r()],d.prototype,"loaded",null),t([r()],d.prototype,"map",null),t([r()],d.prototype,"utilityNetwork",null),t([r()],d.prototype,"associationTypes",null),t([r({readOnly:!0})],d.prototype,"type",void 0),t([r()],d.prototype,"visible",null),t([r()],d.prototype,"updating",null),t([r()],d.prototype,"featureItem",void 0),d=t([n("esri.widgets.FeatureForm.UtilityNetworkAssociationInput")],d);const y=d;export{y as default};
5
+ import{__decorate as t}from"tslib";import{IdentifiableMixin as e}from"../../core/Identifiable.js";import{ignoreAbortErrors as s}from"../../core/promiseUtils.js";import{watch as i,initial as o,on as a}from"../../core/reactiveUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../core/support/UpdatingHandles.js";import{isAssociatedFeatureSupportedLayer as p}from"../Feature/support/featureUtils.js";import u from"./EditableInput.js";import c from"../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";let d=class extends(e(u)){constructor(t){super(t),this.group=null,this.type="utilityNetworkAssociations",this.featureItem=null,this._updatingHandlesSetUp=new l,this.addHandles([i(()=>({feature:this.feature,element:this.element,layer:this.layer}),t=>this._createAssociationVM(t),o),i(()=>this.feature,()=>this._setFeatureItem()),i(()=>this.associatedLayer,(t,e)=>this._updateLayerEditHandle(t,e),o)])}destroy(){this._associationsVM?.destroy(),this._updatingHandlesSetUp.destroy()}get activeAssociationType(){return this._associationsVM?.activeAssociationType}get associatedFeatures(){const{associatedLayer:t}=this;if(t)return this.associatedFeatureInfos.get(t)}get associatedFeatureInfos(){const{_associationsVM:t}=this;if(!t?.associationFeatures?.size||!t?.utilityNetwork)return new Map;const{associationFeatures:e}=t,s=new Map;return e.forEach((t,e)=>{s.set(e,t)}),s}get associatedLayer(){return this._get("associatedLayer")}set associatedLayer(t){this._associationsVM.showAllEnabled=null!=t,this._set("associatedLayer",t)}get associationsViewModel(){return this._associationsVM}get canAddAssociation(){const{editable:t,utilityNetwork:e}=this;return!(!e||!this.loaded)&&t}get editable(){return this.evaluatedEditableExpression??!0}get featureCount(){return this._associationsVM?.featureCount??0}get viewModel(){return this._associationsVM}get loaded(){return"loading"!==this._associationsVM?.state&&!this._updatingHandlesSetUp.updating}get map(){return this._get("map")}set map(t){t&&this._associationsVM?.set("map",t),this._set("map",t)}get utilityNetwork(){return this._associationsVM?.utilityNetwork}get associationTypes(){return this._associationsVM?.associationTypes??this.element.associationTypes}get visible(){const{utilityNetwork:t}=this;return!!t&&(null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element)}get updating(){return"loading"===this._associationsVM?.state||"querying"===this._associationsVM?.state}async refresh(){await s(this._associationsVM.refresh())}_updateLayerEditHandle(t,e){e&&"layerId"in e&&this.removeHandles(e?.layerId),p(t)&&this.addHandles(a(()=>t,"edits",()=>this.refresh()),t.layerId)}_createAssociationVM(t){const{feature:e,element:s,layer:i}=t;if(this._associationsVM?.destroy(),!e||!s||!i)return;const{map:o,associationTypes:a}=this;p(i)&&(this._associationsVM=new c({graphic:e,layer:i,map:o,associationTypes:a,source:"featureForm",title:this.label,description:this.description}))}_setFeatureItem(){this._updatingHandlesSetUp.addPromise((async()=>{const{feature:t,layer:e}=this;t&&e&&"getFeatureTitle"in e&&(this.featureItem={feature:t,label:await e.getFeatureTitle(t)})})())}};t([r()],d.prototype,"_associationsVM",void 0),t([r()],d.prototype,"activeAssociationType",null),t([r()],d.prototype,"associatedFeatures",null),t([r()],d.prototype,"associatedFeatureInfos",null),t([r()],d.prototype,"associatedLayer",null),t([r()],d.prototype,"associationsViewModel",null),t([r()],d.prototype,"canAddAssociation",null),t([r()],d.prototype,"editable",null),t([r()],d.prototype,"featureCount",null),t([r()],d.prototype,"viewModel",null),t([r()],d.prototype,"group",void 0),t([r()],d.prototype,"loaded",null),t([r()],d.prototype,"map",null),t([r()],d.prototype,"utilityNetwork",null),t([r()],d.prototype,"associationTypes",null),t([r({readOnly:!0})],d.prototype,"type",void 0),t([r()],d.prototype,"visible",null),t([r()],d.prototype,"updating",null),t([r()],d.prototype,"featureItem",void 0),d=t([n("esri.widgets.FeatureForm.UtilityNetworkAssociationInput")],d);const y=d;export{y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../core/Collection.js";import{referenceSetter as i}from"../../../core/collectionUtils.js";import o from"../../../core/Evented.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{isGroupColumn as r}from"../support/columnUtils.js";import{uniqueColumnNames as s,isPageIndexValid as u}from"../support/tableUtils.js";let d=class extends o.EventedAccessor{constructor(t){super(t),this.actionColumnConfig=null,this.cellPartNameGenerator=(t,e)=>{let i="";e?.item&&this.rowHighlightIds.includes(e.item.objectId)&&(i+=" highlight");const o=this.findColumn(t?.path);return o?(o.invalid&&(i+=" invalid"),o.textWrap&&(i+=" text-wrap"),"editInfo"in o&&o.editInfo&&o.editInfo.rowData?.index===e.index&&(i+=" editing"),i):i},this.columnPerformanceModeEnabled=!0,this.columnReorderingEnabled=!0,this.columns=new e,this.dataProvider=async(t,e)=>{const{store:i}=this;if(!e)return;if(!i)return void(e&&e([]));e(await i.fetchItems(t))},this.editingEnabled=!1,this.maxSize=null,this.multipleSelectionEnabled=!0,this.multiSortEnabled=!1,this.multipleSortPriority="prepend",this.noDataMessage=null,this.paginationEnabled=!1,this.rowDetailsRenderer=null,this.store=null}get actionColumn(){return this.allColumns.find(t=>t.fieldName===s.action)}get allColumns(){return this.columns.toArray().flatMap(t=>[t,...r(t)&&t.columns?.length?t.columns:[]])}get allVisibleColumns(){return this.allColumns.filter(t=>!t.hidden)}get columnMenuIsOpen(){return this.allColumns.some(t=>t.menuIsOpen)}get editableColumns(){return this.allColumns.filter(t=>"editable"in t)}get effectiveSize(){const{filterBySelectionEnabled:t,highlightIds:e,objectIds:i,pageSize:o,size:n}=this;if(this.paginationEnabled){const l=this.pageCount===this.pageIndex+1?n%o:o;return t?Math.min(e.length,l):i.length?Math.min(i.length,l):l}return t?e.length:i.length?i.length:n}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(t){this._set("filterBySelectionEnabled",t)}get groupColumns(){return this.columns.toArray().filter(t=>r(t))}get hasInvalidColumnConfiguration(){return this.visibleColumns.every(t=>t.frozen||t.frozenToEnd)}get highlightIds(){return this._get("highlightIds")||new e}set highlightIds(t){const o=Array.isArray(t)?new e(t):t;this.multipleSelectionEnabled||o.splice(1,o.length-1),this._set("highlightIds",i(o,this._get("highlightIds"),e))}get isEditing(){return this.editableColumns.some(t=>t.editInfo)}get isQuerying(){return this.store?.isQuerying??!1}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing}get isSyncing(){return this.store?.isSyncing??!1}get objectIds(){return this._get("objectIds")??new e}set objectIds(t){this._set("objectIds",i(t,this._get("objectIds"),e))}get pageCount(){const{pageSize:t,size:e}=this;return 0===e||0===t?1:Math.ceil(e/t)}get pageIndex(){return this._get("pageIndex")||0}set pageIndex(t){const{pageCount:e}=this;u(t,e)&&this._set("pageIndex",t)}get pageSize(){return this._get("pageSize")??50}set pageSize(t){this.store?.set("pageSize",t),this._set("pageSize",t)}get rowHighlightIds(){return this._get("rowHighlightIds")||new e}set rowHighlightIds(t){this._set("rowHighlightIds",i(t,this._get("rowHighlightIds"),e))}get size(){const t=this.store?.count??0,{maxSize:e}=this;return null!=t&&null!=e?Math.min(e,t):t}get state(){return this.store?.state??"disabled"}get visibleColumns(){return this.columns.toArray().filter(t=>!t.hidden)}closeColumnMenus(){this.allColumns.forEach(t=>t.closeMenu())}sortColumn(t,e){if(!t)return;const i=this.findColumn(t);i&&(i.direction=e)}hideColumn(t){const e=this.findColumn(t);!1===e?.hidden&&(e.hidden=!0)}showColumn(t){const e=this.findColumn(t);e?.hidden&&(e.hidden=!1)}showAllColumns(){this.allColumns.forEach(t=>{t.hidden&&(t.hidden=!1)})}findColumn(t){return this.allColumns.find(e=>e.fieldName===t)}refresh(){this.store&&(this.store.reset(),this.store.load())}toggleColumnVisibility(t){const e=this.findColumn(t);e&&(e.hidden=!e.hidden)}};t([n()],d.prototype,"actionColumn",null),t([n()],d.prototype,"actionColumnConfig",void 0),t([n()],d.prototype,"allColumns",null),t([n()],d.prototype,"allVisibleColumns",null),t([n()],d.prototype,"cellPartNameGenerator",void 0),t([n()],d.prototype,"columnMenuIsOpen",null),t([n()],d.prototype,"columnPerformanceModeEnabled",void 0),t([n()],d.prototype,"columnReorderingEnabled",void 0),t([n()],d.prototype,"columns",void 0),t([n()],d.prototype,"dataProvider",void 0),t([n()],d.prototype,"editingEnabled",void 0),t([n()],d.prototype,"editableColumns",null),t([n()],d.prototype,"effectiveSize",null),t([n()],d.prototype,"filterBySelectionEnabled",null),t([n()],d.prototype,"groupColumns",null),t([n()],d.prototype,"hasInvalidColumnConfiguration",null),t([n()],d.prototype,"highlightIds",null),t([n()],d.prototype,"isEditing",null),t([n()],d.prototype,"isQuerying",null),t([n()],d.prototype,"isQueryingOrSyncing",null),t([n()],d.prototype,"isSyncing",null),t([n()],d.prototype,"maxSize",void 0),t([n()],d.prototype,"multipleSelectionEnabled",void 0),t([n()],d.prototype,"multiSortEnabled",void 0),t([n()],d.prototype,"multipleSortPriority",void 0),t([n()],d.prototype,"noDataMessage",void 0),t([n()],d.prototype,"objectIds",null),t([n()],d.prototype,"pageCount",null),t([n()],d.prototype,"pageIndex",null),t([n()],d.prototype,"pageSize",null),t([n()],d.prototype,"paginationEnabled",void 0),t([n()],d.prototype,"rowHighlightIds",null),t([n()],d.prototype,"rowDetailsRenderer",void 0),t([n({readOnly:!0})],d.prototype,"size",null),t([n()],d.prototype,"store",void 0),t([n({readOnly:!0})],d.prototype,"state",null),t([n()],d.prototype,"visibleColumns",null),d=t([l("esri.widgets.FeatureTable.Grid.GridViewModel")],d);const a=d;export{a as default};
5
+ import{__decorate as t}from"tslib";import e from"../../../core/Collection.js";import{referenceSetter as i}from"../../../core/collectionUtils.js";import{EventedAccessor as o}from"../../../core/Evented.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{isGroupColumn as r}from"../support/columnUtils.js";import{uniqueColumnNames as s,isPageIndexValid as u}from"../support/tableUtils.js";let d=class extends o{constructor(t){super(t),this.actionColumnConfig=null,this.cellPartNameGenerator=(t,e)=>{let i="";e?.item&&this.rowHighlightIds.includes(e.item.objectId)&&(i+=" highlight");const o=this.findColumn(t?.path);return o?(o.invalid&&(i+=" invalid"),o.textWrap&&(i+=" text-wrap"),"editInfo"in o&&o.editInfo&&o.editInfo.rowData?.index===e.index&&(i+=" editing"),i):i},this.columnPerformanceModeEnabled=!0,this.columnReorderingEnabled=!0,this.columns=new e,this.dataProvider=async(t,e)=>{const{store:i}=this;if(!e)return;if(!i)return void(e&&e([]));e(await i.fetchItems(t))},this.editingEnabled=!1,this.maxSize=null,this.multipleSelectionEnabled=!0,this.multiSortEnabled=!1,this.multipleSortPriority="prepend",this.noDataMessage=null,this.paginationEnabled=!1,this.rowDetailsRenderer=null,this.store=null}get actionColumn(){return this.allColumns.find(t=>t.fieldName===s.action)}get allColumns(){return this.columns.toArray().flatMap(t=>[t,...r(t)&&t.columns?.length?t.columns:[]])}get allVisibleColumns(){return this.allColumns.filter(t=>!t.hidden)}get columnMenuIsOpen(){return this.allColumns.some(t=>t.menuIsOpen)}get editableColumns(){return this.allColumns.filter(t=>"editable"in t)}get effectiveSize(){const{filterBySelectionEnabled:t,highlightIds:e,objectIds:i,pageSize:o,size:n}=this;if(this.paginationEnabled){const l=this.pageCount===this.pageIndex+1?n%o:o;return t?Math.min(e.length,l):i.length?Math.min(i.length,l):l}return t?e.length:i.length?i.length:n}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(t){this._set("filterBySelectionEnabled",t)}get groupColumns(){return this.columns.toArray().filter(t=>r(t))}get hasInvalidColumnConfiguration(){return this.visibleColumns.every(t=>t.frozen||t.frozenToEnd)}get highlightIds(){return this._get("highlightIds")||new e}set highlightIds(t){const o=Array.isArray(t)?new e(t):t;this.multipleSelectionEnabled||o.splice(1,o.length-1),this._set("highlightIds",i(o,this._get("highlightIds"),e))}get isEditing(){return this.editableColumns.some(t=>t.editInfo)}get isQuerying(){return this.store?.isQuerying??!1}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing}get isSyncing(){return this.store?.isSyncing??!1}get objectIds(){return this._get("objectIds")??new e}set objectIds(t){this._set("objectIds",i(t,this._get("objectIds"),e))}get pageCount(){const{pageSize:t,size:e}=this;return 0===e||0===t?1:Math.ceil(e/t)}get pageIndex(){return this._get("pageIndex")||0}set pageIndex(t){const{pageCount:e}=this;u(t,e)&&this._set("pageIndex",t)}get pageSize(){return this._get("pageSize")??50}set pageSize(t){this.store?.set("pageSize",t),this._set("pageSize",t)}get rowHighlightIds(){return this._get("rowHighlightIds")||new e}set rowHighlightIds(t){this._set("rowHighlightIds",i(t,this._get("rowHighlightIds"),e))}get size(){const t=this.store?.count??0,{maxSize:e}=this;return null!=t&&null!=e?Math.min(e,t):t}get state(){return this.store?.state??"disabled"}get visibleColumns(){return this.columns.toArray().filter(t=>!t.hidden)}closeColumnMenus(){this.allColumns.forEach(t=>t.closeMenu())}sortColumn(t,e){if(!t)return;const i=this.findColumn(t);i&&(i.direction=e)}hideColumn(t){const e=this.findColumn(t);!1===e?.hidden&&(e.hidden=!0)}showColumn(t){const e=this.findColumn(t);e?.hidden&&(e.hidden=!1)}showAllColumns(){this.allColumns.forEach(t=>{t.hidden&&(t.hidden=!1)})}findColumn(t){return this.allColumns.find(e=>e.fieldName===t)}refresh(){this.store&&(this.store.reset(),this.store.load())}toggleColumnVisibility(t){const e=this.findColumn(t);e&&(e.hidden=!e.hidden)}};t([n()],d.prototype,"actionColumn",null),t([n()],d.prototype,"actionColumnConfig",void 0),t([n()],d.prototype,"allColumns",null),t([n()],d.prototype,"allVisibleColumns",null),t([n()],d.prototype,"cellPartNameGenerator",void 0),t([n()],d.prototype,"columnMenuIsOpen",null),t([n()],d.prototype,"columnPerformanceModeEnabled",void 0),t([n()],d.prototype,"columnReorderingEnabled",void 0),t([n()],d.prototype,"columns",void 0),t([n()],d.prototype,"dataProvider",void 0),t([n()],d.prototype,"editingEnabled",void 0),t([n()],d.prototype,"editableColumns",null),t([n()],d.prototype,"effectiveSize",null),t([n()],d.prototype,"filterBySelectionEnabled",null),t([n()],d.prototype,"groupColumns",null),t([n()],d.prototype,"hasInvalidColumnConfiguration",null),t([n()],d.prototype,"highlightIds",null),t([n()],d.prototype,"isEditing",null),t([n()],d.prototype,"isQuerying",null),t([n()],d.prototype,"isQueryingOrSyncing",null),t([n()],d.prototype,"isSyncing",null),t([n()],d.prototype,"maxSize",void 0),t([n()],d.prototype,"multipleSelectionEnabled",void 0),t([n()],d.prototype,"multiSortEnabled",void 0),t([n()],d.prototype,"multipleSortPriority",void 0),t([n()],d.prototype,"noDataMessage",void 0),t([n()],d.prototype,"objectIds",null),t([n()],d.prototype,"pageCount",null),t([n()],d.prototype,"pageIndex",null),t([n()],d.prototype,"pageSize",null),t([n()],d.prototype,"paginationEnabled",void 0),t([n()],d.prototype,"rowHighlightIds",null),t([n()],d.prototype,"rowDetailsRenderer",void 0),t([n({readOnly:!0})],d.prototype,"size",null),t([n()],d.prototype,"store",void 0),t([n({readOnly:!0})],d.prototype,"state",null),t([n()],d.prototype,"visibleColumns",null),d=t([l("esri.widgets.FeatureTable.Grid.GridViewModel")],d);const a=d;export{a as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{createTask as e}from"../../core/asyncUtils.js";import s from"../../core/Evented.js";import{abortMaybe as l}from"../../core/maybe.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as i,sync as a,when as n}from"../../core/reactiveUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as u}from"../../core/support/UpdatingHandles.js";import{getTemplatesForLayers as d,isSharedTemplateOrMetadata as c}from"../../editing/templateUtils.js";import{getEffectiveLayerCapabilities as h,isSubtypeGroupLayer as y}from"../../layers/support/layerUtils.js";import{isTemplateItemGroup as f,mapItemsByTemplate as g,isTemplateGroupInfo as _,loadLayerWithTemplates as I,makeTemplateItemInfos as F,makeGroupItemInfos as b,nullGroupBy as v}from"./featureTemplatesUtils.js";import T from"./TemplateItem.js";import j from"./TemplateItemGroup.js";const B=({layer:t})=>({key:t,label:t.title??""}),w=({layer:t})=>({key:t.geometryType,label:t.geometryType??""});let k=class extends s.EventedAccessor{constructor(t){super(t),this._allItems=[],this._updatingHandles=new u,this._updateTask=null,this.disabled=!1,this.disabledItemFunction=null,this.filterFunction=null,this.selectedItem=null,this.templateInfos=null,this.view=null}initialize(){this._get("groupBy")||(this.groupBy="layer"),this.addHandles([r(()=>[this.templateInfos,this.layers],([t],e)=>{t&&t===e?.at(0)||(this._updateTask=l(this._updateTask),t?this._updateAllItems(t):this._getTemplatesAndUpdateAllItems())},i),r(()=>this._groupByFunction,()=>{null==this.templateInfos&&(this._updateTask=l(this._updateTask),this._getTemplatesAndUpdateAllItems())},a),r(()=>this.filterFunction,t=>{for(const e of this._allItems)f(e)&&(e.filterFunction=t)},a)])}set groupBy(t){if(this._set("groupBy",t),"function"!=typeof t)switch(t){case"layer":this._groupByFunction=B;break;case"geometry":this._groupByFunction=w;break;default:this._groupByFunction=null}else this._groupByFunction=e=>this._ensureGroupByObject(t(e))}get layers(){return this._get("layers")}set layers(t){const e="layers";if(this.removeHandles(e),t){const s=()=>this.notifyChange("state");this.addHandles(t.map(t=>n(()=>t.loadStatus,s)),e)}this._set("layers",t)}get state(){return this.updating?"loading":0!==this.layers.length||this.templateInfos?.length?"ready":"disabled"}get numberOfFeatureTemplates(){return this._allItems.reduce((t,e)=>f(e)?t+e.allItems.length:t+1,0)}get items(){const{filterFunction:t}=this;return null==t?this._allItems:this._allItems.filter(e=>f(e)?e.items.length>0:t(e))}get updating(){return this._updatingHandles.updating}refresh(){this.notifyChange("filterFunction");for(const t of this._allItems)f(t)&&t.reapplyFilter()}select(t,{emit:e=!0}={}){const s=this.selectedItem,l=t?.clone()||null;this._set("selectedItem",l),e&&this.emit("select",{item:l,oldItem:s,template:l?.template??null})}_createItem(t,e){return new T({disabledFunction:this.disabledItemFunction,layer:e,template:t})}_ensureGroupByObject(t){return"string"==typeof t?{key:t,label:t}:t}_updateAllItems(t){const e=this._allItems;if(0===t.length)return A(e),void(this._allItems=[]);const[s,l]=g(e),o=t=>{const e=s.get(t.template);return e?(s.delete(t.template),e):this._createItem(t.template,t.layer)},{filterFunction:r}=this,i=t.filter(U).map(t=>_(t)?new j({filterFunction:r,label:t.label,allItems:t.templateInfos.filter(U).map(t=>o(t))}):o(t));for(const a of[...s.values(),...l])a.destroy();this._allItems=i}async _getTemplatesFromLayers(t){const e=[],s={signal:t};await Promise.all(this.layers.map(async l=>{await I(l,s),o(t);const r=h(l)?.operations;r?.supportsEditing&&r?.supportsAdd&&(y(l)?e.push(...l.sublayers):e.push(l))}));const l=await d(e,this.view,t);o(t);const r=F(l),i=this._groupByFunction;if(null==i)return r;const a=b(r,i);return 1===a.length&&a[0].label===v.label?a[0].templateInfos:a}async _getTemplatesAndUpdateAllItems(){if(0===this.layers.length)return;const t=e(async t=>{const e=await this._getTemplatesFromLayers(t);o(t),this._updateAllItems(e)});this._updateTask=t,this._updatingHandles.addPromise(t.promise)}};function A(t){for(const e of t){if(f(e))for(const t of e.items)t.destroy();e.destroy()}}function U(t){return _(t)?t.templateInfos.some(U):!c(t.template)||!1!==t.template.visible}t([p()],k.prototype,"_allItems",void 0),t([p()],k.prototype,"_groupByFunction",void 0),t([p()],k.prototype,"_updatingHandles",void 0),t([p()],k.prototype,"disabled",void 0),t([p()],k.prototype,"disabledItemFunction",void 0),t([p({value:null})],k.prototype,"filterFunction",void 0),t([p()],k.prototype,"groupBy",null),t([p({value:[]})],k.prototype,"layers",null),t([p()],k.prototype,"state",null),t([p({readOnly:!0})],k.prototype,"numberOfFeatureTemplates",null),t([p({readOnly:!0})],k.prototype,"items",null),t([p({readOnly:!0})],k.prototype,"selectedItem",void 0),t([p()],k.prototype,"templateInfos",void 0),t([p()],k.prototype,"updating",null),t([p()],k.prototype,"view",void 0),k=t([m("esri.widgets.FeatureTemplates.FeatureTemplatesViewModel")],k);const H=k;export{H as default};
5
+ import{__decorate as t}from"tslib";import{createTask as e}from"../../core/asyncUtils.js";import{EventedAccessor as s}from"../../core/Evented.js";import{abortMaybe as l}from"../../core/maybe.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{watch as i,syncAndInitial as r,sync as a,when as n}from"../../core/reactiveUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as u}from"../../core/support/UpdatingHandles.js";import{getTemplatesForLayers as d,isSharedTemplateOrMetadata as c}from"../../editing/templateUtils.js";import{getEffectiveLayerCapabilities as h,isSubtypeGroupLayer as y}from"../../layers/support/layerUtils.js";import{isTemplateItemGroup as f,mapItemsByTemplate as g,isTemplateGroupInfo as _,loadLayerWithTemplates as I,makeTemplateItemInfos as F,makeGroupItemInfos as b,nullGroupBy as v}from"./featureTemplatesUtils.js";import T from"./TemplateItem.js";import j from"./TemplateItemGroup.js";const B=({layer:t})=>({key:t,label:t.title??""}),w=({layer:t})=>({key:t.geometryType,label:t.geometryType??""});let k=class extends s{constructor(t){super(t),this._allItems=[],this._updatingHandles=new u,this._updateTask=null,this.disabled=!1,this.disabledItemFunction=null,this.filterFunction=null,this.selectedItem=null,this.templateInfos=null,this.view=null}initialize(){this._get("groupBy")||(this.groupBy="layer"),this.addHandles([i(()=>[this.templateInfos,this.layers],([t],e)=>{t&&t===e?.at(0)||(this._updateTask=l(this._updateTask),t?this._updateAllItems(t):this._getTemplatesAndUpdateAllItems())},r),i(()=>this._groupByFunction,()=>{null==this.templateInfos&&(this._updateTask=l(this._updateTask),this._getTemplatesAndUpdateAllItems())},a),i(()=>this.filterFunction,t=>{for(const e of this._allItems)f(e)&&(e.filterFunction=t)},a)])}set groupBy(t){if(this._set("groupBy",t),"function"!=typeof t)switch(t){case"layer":this._groupByFunction=B;break;case"geometry":this._groupByFunction=w;break;default:this._groupByFunction=null}else this._groupByFunction=e=>this._ensureGroupByObject(t(e))}get layers(){return this._get("layers")}set layers(t){const e="layers";if(this.removeHandles(e),t){const s=()=>this.notifyChange("state");this.addHandles(t.map(t=>n(()=>t.loadStatus,s)),e)}this._set("layers",t)}get state(){return this.updating?"loading":0!==this.layers.length||this.templateInfos?.length?"ready":"disabled"}get numberOfFeatureTemplates(){return this._allItems.reduce((t,e)=>f(e)?t+e.allItems.length:t+1,0)}get items(){const{filterFunction:t}=this;return null==t?this._allItems:this._allItems.filter(e=>f(e)?e.items.length>0:t(e))}get updating(){return this._updatingHandles.updating}refresh(){this.notifyChange("filterFunction");for(const t of this._allItems)f(t)&&t.reapplyFilter()}select(t,{emit:e=!0}={}){const s=this.selectedItem,l=t?.clone()||null;this._set("selectedItem",l),e&&this.emit("select",{item:l,oldItem:s,template:l?.template??null})}_createItem(t,e){return new T({disabledFunction:this.disabledItemFunction,layer:e,template:t})}_ensureGroupByObject(t){return"string"==typeof t?{key:t,label:t}:t}_updateAllItems(t){const e=this._allItems;if(0===t.length)return A(e),void(this._allItems=[]);const[s,l]=g(e),o=t=>{const e=s.get(t.template);return e?(s.delete(t.template),e):this._createItem(t.template,t.layer)},{filterFunction:i}=this,r=t.filter(U).map(t=>_(t)?new j({filterFunction:i,label:t.label,allItems:t.templateInfos.filter(U).map(t=>o(t))}):o(t));for(const a of[...s.values(),...l])a.destroy();this._allItems=r}async _getTemplatesFromLayers(t){const e=[],s={signal:t};await Promise.all(this.layers.map(async l=>{await I(l,s),o(t);const i=h(l)?.operations;i?.supportsEditing&&i?.supportsAdd&&(y(l)?e.push(...l.sublayers):e.push(l))}));const l=await d(e,this.view,t);o(t);const i=F(l),r=this._groupByFunction;if(null==r)return i;const a=b(i,r);return 1===a.length&&a[0].label===v.label?a[0].templateInfos:a}async _getTemplatesAndUpdateAllItems(){if(0===this.layers.length)return;const t=e(async t=>{const e=await this._getTemplatesFromLayers(t);o(t),this._updateAllItems(e)});this._updateTask=t,this._updatingHandles.addPromise(t.promise)}};function A(t){for(const e of t){if(f(e))for(const t of e.items)t.destroy();e.destroy()}}function U(t){return _(t)?t.templateInfos.some(U):!c(t.template)||!1!==t.template.visible}t([p()],k.prototype,"_allItems",void 0),t([p()],k.prototype,"_groupByFunction",void 0),t([p()],k.prototype,"_updatingHandles",void 0),t([p()],k.prototype,"disabled",void 0),t([p()],k.prototype,"disabledItemFunction",void 0),t([p({value:null})],k.prototype,"filterFunction",void 0),t([p()],k.prototype,"groupBy",null),t([p({value:[]})],k.prototype,"layers",null),t([p()],k.prototype,"state",null),t([p({readOnly:!0})],k.prototype,"numberOfFeatureTemplates",null),t([p({readOnly:!0})],k.prototype,"items",null),t([p({readOnly:!0})],k.prototype,"selectedItem",void 0),t([p()],k.prototype,"templateInfos",void 0),t([p()],k.prototype,"updating",null),t([p()],k.prototype,"view",void 0),k=t([m("esri.widgets.FeatureTemplates.FeatureTemplatesViewModel")],k);const H=k;export{H as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import r from"../../core/Identifiable.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";let s=class extends(r.IdentifiableMixin(e)){constructor(t){super(t),this.allItems=[],this.filterFunction=null,this.label=null}get items(){const{filterFunction:t}=this;return null==t||t(this)?this.allItems:this.allItems.filter(t)}get id(){return this.label}reapplyFilter(){this.notifyChange("filterFunction")}findByTemplate(t){return this.items.find(e=>e.template===t)}};t([o()],s.prototype,"allItems",void 0),t([o()],s.prototype,"filterFunction",void 0),t([o()],s.prototype,"items",null),t([o()],s.prototype,"label",void 0),t([o()],s.prototype,"id",null),s=t([i("esri.widgets.FeatureTemplates.TemplateItemGroup")],s);const l=s;export{l as default};
5
+ import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{IdentifiableMixin as r}from"../../core/Identifiable.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let i=class extends(r(e)){constructor(t){super(t),this.allItems=[],this.filterFunction=null,this.label=null}get items(){const{filterFunction:t}=this;return null==t||t(this)?this.allItems:this.allItems.filter(t)}get id(){return this.label}reapplyFilter(){this.notifyChange("filterFunction")}findByTemplate(t){return this.items.find(e=>e.template===t)}};t([o()],i.prototype,"allItems",void 0),t([o()],i.prototype,"filterFunction",void 0),t([o()],i.prototype,"items",null),t([o()],i.prototype,"label",void 0),t([o()],i.prototype,"id",null),i=t([s("esri.widgets.FeatureTemplates.TemplateItemGroup")],i);const l=i;export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import t from"../../Viewpoint.js";import e from"../../core/Error.js";import i from"../../core/Evented.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import s from"../support/GoTo.js";let l=class extends(s(i.EventedAccessor)){constructor(o){super(o),this._initialViewpoint=null,this._goingHomeController=null,this.go=this.go.bind(this)}destroy(){this._cancelGo(),this.view=null}get state(){return this.view?.ready?this._goingHomeController?"going-home":"ready":"disabled"}set view(o){this._initialViewpoint=null,this._set("view",o),o&&o.when().then(()=>{this.view===o&&(this._initialViewpoint=o.viewpoint.clone(),this.notifyChange("viewpoint"))})}get viewpoint(){return this._get("viewpoint")||this._initialViewpoint}set viewpoint(o){this._set("viewpoint",o)}async go(){if(!this.view?.ready)throw new e("home:disabled-state","Cannot go when disabled.");this._cancelGo(),this.emit("go");const o=new AbortController;this._goingHomeController=o;try{await(this.view?.when()),await this.callGoTo({target:this.viewpoint,options:{signal:o.signal}})}catch(t){}this._goingHomeController=null}cancelGo(){this._cancelGo()}_cancelGo(){const{_goingHomeController:o}=this;o&&o.abort(),this._goingHomeController=null}};o([r()],l.prototype,"_goingHomeController",void 0),o([r({readOnly:!0})],l.prototype,"state",null),o([r()],l.prototype,"view",null),o([r({type:t})],l.prototype,"viewpoint",null),o([r()],l.prototype,"go",null),o([r()],l.prototype,"cancelGo",null),l=o([n("esri.widgets.Home.HomeViewModel")],l);const p=l;export{p as default};
5
+ import{__decorate as o}from"tslib";import t from"../../Viewpoint.js";import i from"../../core/Error.js";import{EventedAccessor as e}from"../../core/Evented.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import s from"../support/GoTo.js";let l=class extends(s(e)){constructor(o){super(o),this._initialViewpoint=null,this._goingHomeController=null,this.go=this.go.bind(this)}destroy(){this._cancelGo(),this.view=null}get state(){return this.view?.ready?this._goingHomeController?"going-home":"ready":"disabled"}set view(o){this._initialViewpoint=null,this._set("view",o),o&&o.when().then(()=>{this.view===o&&(this._initialViewpoint=o.viewpoint.clone(),this.notifyChange("viewpoint"))})}get viewpoint(){return this._get("viewpoint")||this._initialViewpoint}set viewpoint(o){this._set("viewpoint",o)}async go(){if(!this.view?.ready)throw new i("home:disabled-state","Cannot go when disabled.");this._cancelGo(),this.emit("go");const o=new AbortController;this._goingHomeController=o;try{await(this.view?.when()),await this.callGoTo({target:this.viewpoint,options:{signal:o.signal}})}catch(t){}this._goingHomeController=null}cancelGo(){this._cancelGo()}_cancelGo(){const{_goingHomeController:o}=this;o&&o.abort(),this._goingHomeController=null}};o([r()],l.prototype,"_goingHomeController",void 0),o([r({readOnly:!0})],l.prototype,"state",null),o([r()],l.prototype,"view",null),o([r({type:t})],l.prototype,"viewpoint",null),o([r()],l.prototype,"go",null),o([r()],l.prototype,"cancelGo",null),l=o([n("esri.widgets.Home.HomeViewModel")],l);const p=l;export{p as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import s from"../../core/Evented.js";import{watch as i,initial as r}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{isLinkChartView as l}from"../../linkChart/utils.js";import n from"./ListItem.js";import{getItemLayers as d,findLayerListMode as h}from"./support/layerListUtils.js";const m={view:"view",viewLayers:"view-layers",mapLayers:"map-layers",layerViews:"layer-views",layerListMode:"layer-list-mode"},c="hide",p=t.ofType(n);let y=class extends s.EventedAccessor{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(),r),i(()=>[this.listItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._recompileList()),i(()=>l(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})}moveListItem(e,t,s,i){const r=e?.layer;if(!r||"subtype-sublayer"===r.type||"sublayer"===r.type)return;const a=this.view?.map?.layers,o=t?d(t):a,l=s?d(s):a;if(!o||!l)return;const{operationalItems:n}=this,h=t?.children||n,m=s?.children||n,c=l.length-i;e.parent=s||null,h.remove(e),o.remove(r),m.includes(e)||m.add(e,c),l.includes(r)||l.add(r,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)}_createListItem(e){const{view:t,listItemCreatedFunction:s,checkPublishStatusEnabled:i,listModeDisabled:r}=this;return new n({checkPublishStatusEnabled:i,listModeDisabled:r,layer:e,listItemCreatedFunction:s,view:t})}_removeAllItems(){this.operationalItems.destroyAll()}_getViewableLayers(e){return e?this.listModeDisabled?e:e.filter(e=>h(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=l(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._createListItem(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),r=e.indexOf(s.layer);return i>r?-1:i<r?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),r),i(()=>this.view?.allLayerViews,e=>this._createLayerViewHandles(e),r)],m.viewLayers):this._removeAllItems()}};e([a()],y.prototype,"checkPublishStatusEnabled",void 0),e([a()],y.prototype,"listItemCreatedFunction",void 0),e([a({nonNullable:!0})],y.prototype,"listModeDisabled",void 0),e([a({type:p})],y.prototype,"operationalItems",void 0),e([a({readOnly:!0})],y.prototype,"state",null),e([a()],y.prototype,"totalItems",null),e([a()],y.prototype,"view",void 0),y=e([o("esri.widgets.LayerList.LayerListViewModel")],y);const v=y;export{v as default};
5
+ 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 r}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{isLinkChartView as l}from"../../linkChart/utils.js";import n from"./ListItem.js";import{getItemLayers as d,findLayerListMode as h}from"./support/layerListUtils.js";const m={view:"view",viewLayers:"view-layers",mapLayers:"map-layers",layerViews:"layer-views",layerListMode:"layer-list-mode"},c="hide",p=t.ofType(n);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(),r),i(()=>[this.listItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._recompileList()),i(()=>l(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})}moveListItem(e,t,s,i){const r=e?.layer;if(!r||"subtype-sublayer"===r.type||"sublayer"===r.type)return;const a=this.view?.map?.layers,o=t?d(t):a,l=s?d(s):a;if(!o||!l)return;const{operationalItems:n}=this,h=t?.children||n,m=s?.children||n,c=l.length-i;e.parent=s||null,h.remove(e),o.remove(r),m.includes(e)||m.add(e,c),l.includes(r)||l.add(r,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)}_createListItem(e){const{view:t,listItemCreatedFunction:s,checkPublishStatusEnabled:i,listModeDisabled:r}=this;return new n({checkPublishStatusEnabled:i,listModeDisabled:r,layer:e,listItemCreatedFunction:s,view:t})}_removeAllItems(){this.operationalItems.destroyAll()}_getViewableLayers(e){return e?this.listModeDisabled?e:e.filter(e=>h(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=l(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._createListItem(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),r=e.indexOf(s.layer);return i>r?-1:i<r?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),r),i(()=>this.view?.allLayerViews,e=>this._createLayerViewHandles(e),r)],m.viewLayers):this._removeAllItems()}};e([a()],y.prototype,"checkPublishStatusEnabled",void 0),e([a()],y.prototype,"listItemCreatedFunction",void 0),e([a({nonNullable:!0})],y.prototype,"listModeDisabled",void 0),e([a({type:p})],y.prototype,"operationalItems",void 0),e([a({readOnly:!0})],y.prototype,"state",null),e([a()],y.prototype,"totalItems",null),e([a()],y.prototype,"view",void 0),y=e([o("esri.widgets.LayerList.LayerListViewModel")],y);const v=y;export{v as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- 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 l from"../../core/Identifiable.js";import{watch as r,initial as o}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import{cast as a}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{get as d}from"../../core/accessorSupport/get.js";import p from"../../support/actions/ActionBase.js";import c from"../../support/actions/ActionButton.js";import u from"../../support/actions/ActionToggle.js";import y from"./ListItemPanel.js";import{isLayerOutsideScaleRange as b,findLayerVisibilityMode as m,findLayerListMode as v,canDisplayLayer as f,getNormalizedChildLayerProperty as g}from"./support/layerListUtils.js";var C;const w=s.ofType({key:"type",defaultKeyValue:"button",base:p,typeMap:{button:c,toggle:u}}),S=s.ofType(w),_="layer",M="child-list-mode",P="hide";let I=C=class extends(l.IdentifiableMixin(t)){constructor(e){super(e),this.actionsSections=new S,this.actionsOpen=!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.open=!1,this.parent=null,this.view=null}initialize(){if(this.addHandles([r(()=>[this.layer,this.layer?.listMode,this.listModeDisabled],()=>this._watchLayerProperties(this.layer),o),r(()=>this.checkPublishStatusEnabled,e=>this._updateChildrenPublishing(e),o),r(()=>this.view,e=>this._updateChildrenView(e),o),r(()=>this.panel,e=>this._setListItemOnPanel(e),o)]),"function"==typeof this.listItemCreatedFunction){const e={item:this};this.listItemCreatedFunction.call(null,e)}}destroy(){this.panel?.destroy(),this.children.destroyAll(),this.view=null}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}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),e?new y(e):null}get sortable(){return"knowledge-graph-sublayer"!==this.layer?.type&&this._get("sortable")}set sortable(e){this._set("sortable",e)}get title(){const 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 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??!b(this.layer,this.view?.scale)}get visibleAtCurrentTimeExtent(){return this.layerView?.visibleAtCurrentTimeExtent??!0}get visibilityMode(){return m(this.layer)}clone(){return new C({actionsSections:this.actionsSections.clone(),actionsOpen:this.actionsOpen,checkPublishStatusEnabled:this.checkPublishStatusEnabled,children:this.children.clone(),childrenSortable:this.childrenSortable,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,view:this.view,visible:this.visible})}_setListItemOnPanel(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))}_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(M),this.children.destroyAll()}_watchChildLayerListMode(e){this.removeHandles(M),this.listModeDisabled||this.addHandles(e.toArray().map(t=>r(()=>t.listMode,()=>this._compileChildren(e))),M)}_compileChildren(e){const t=this.listModeDisabled?e:e?.filter(e=>v(e)!==P);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)),_)}_initializeChildLayers(e){this._compileChildren(e),this._watchSublayerChanges(e)}_createChildItems(e,t){return e.reverse().map(e=>t||f(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(_),this.removeHandles(M),!e)return;if("hide-children"===(!this.listModeDisabled&&v(e)))return void this.children.destroyAll();const t=g(e);t&&this.addHandles(r(()=>e[t],i=>{e.hasOwnProperty(t)&&this._initializeChildLayers(i)},o),_)}};e([n({type:S})],I.prototype,"actionsSections",void 0),e([n()],I.prototype,"actionsOpen",void 0),e([n()],I.prototype,"checkPublishStatusEnabled",void 0),e([n({type:s.ofType(I)})],I.prototype,"children",void 0),e([n()],I.prototype,"childrenSortable",void 0),e([n({readOnly:!0})],I.prototype,"connectionStatus",null),e([n({readOnly:!0})],I.prototype,"error",null),e([n()],I.prototype,"hidden",void 0),e([n({readOnly:!0})],I.prototype,"incompatible",null),e([n()],I.prototype,"layer",void 0),e([n({readOnly:!0})],I.prototype,"layerView",null),e([n()],I.prototype,"listItemCreatedFunction",void 0),e([n({nonNullable:!0})],I.prototype,"listModeDisabled",void 0),e([n()],I.prototype,"open",void 0),e([n({type:y})],I.prototype,"panel",null),e([a("panel")],I.prototype,"castPanel",null),e([n()],I.prototype,"parent",void 0),e([n({value:!0})],I.prototype,"sortable",null),e([n()],I.prototype,"title",null),e([n({readOnly:!0})],I.prototype,"publishing",null),e([n({readOnly:!0})],I.prototype,"updating",null),e([n()],I.prototype,"view",void 0),e([n()],I.prototype,"visible",null),e([n({readOnly:!0})],I.prototype,"visibleAtCurrentScale",null),e([n({readOnly:!0})],I.prototype,"visibleAtCurrentTimeExtent",null),e([n({readOnly:!0})],I.prototype,"visibilityMode",null),I=C=e([h("esri.widgets.LayerList.ListItem")],I);const O=I;export{O as default};
5
+ 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}from"../../core/accessorSupport/decorators/property.js";import{cast as a}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{get as d}from"../../core/accessorSupport/get.js";import p from"../../support/actions/ActionBase.js";import c from"../../support/actions/ActionButton.js";import u from"../../support/actions/ActionToggle.js";import y from"./ListItemPanel.js";import{isLayerOutsideScaleRange as b,findLayerVisibilityMode as m,findLayerListMode as v,canDisplayLayer as f,getNormalizedChildLayerProperty as g}from"./support/layerListUtils.js";var C;const w=s.ofType({key:"type",defaultKeyValue:"button",base:p,typeMap:{button:c,toggle:u}}),S=s.ofType(w),_="layer",M="child-list-mode",P="hide";let O=C=class extends(l(t)){constructor(e){super(e),this.actionsSections=new S,this.actionsOpen=!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.open=!1,this.parent=null,this.view=null}initialize(){if(this.addHandles([r(()=>[this.layer,this.layer?.listMode,this.listModeDisabled],()=>this._watchLayerProperties(this.layer),o),r(()=>this.checkPublishStatusEnabled,e=>this._updateChildrenPublishing(e),o),r(()=>this.view,e=>this._updateChildrenView(e),o),r(()=>this.panel,e=>this._setListItemOnPanel(e),o)]),"function"==typeof this.listItemCreatedFunction){const e={item:this};this.listItemCreatedFunction.call(null,e)}}destroy(){this.panel?.destroy(),this.children.destroyAll(),this.view=null}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}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),e?new y(e):null}get sortable(){return"knowledge-graph-sublayer"!==this.layer?.type&&this._get("sortable")}set sortable(e){this._set("sortable",e)}get title(){const 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 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??!b(this.layer,this.view?.scale)}get visibleAtCurrentTimeExtent(){return this.layerView?.visibleAtCurrentTimeExtent??!0}get visibilityMode(){return m(this.layer)}clone(){return new C({actionsSections:this.actionsSections.clone(),actionsOpen:this.actionsOpen,checkPublishStatusEnabled:this.checkPublishStatusEnabled,children:this.children.clone(),childrenSortable:this.childrenSortable,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,view:this.view,visible:this.visible})}_setListItemOnPanel(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))}_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(M),this.children.destroyAll()}_watchChildLayerListMode(e){this.removeHandles(M),this.listModeDisabled||this.addHandles(e.toArray().map(t=>r(()=>t.listMode,()=>this._compileChildren(e))),M)}_compileChildren(e){const t=this.listModeDisabled?e:e?.filter(e=>v(e)!==P);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)),_)}_initializeChildLayers(e){this._compileChildren(e),this._watchSublayerChanges(e)}_createChildItems(e,t){return e.reverse().map(e=>t||f(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(_),this.removeHandles(M),!e)return;if("hide-children"===(!this.listModeDisabled&&v(e)))return void this.children.destroyAll();const t=g(e);t&&this.addHandles(r(()=>e[t],i=>{e.hasOwnProperty(t)&&this._initializeChildLayers(i)},o),_)}};e([n({type:S})],O.prototype,"actionsSections",void 0),e([n()],O.prototype,"actionsOpen",void 0),e([n()],O.prototype,"checkPublishStatusEnabled",void 0),e([n({type:s.ofType(O)})],O.prototype,"children",void 0),e([n()],O.prototype,"childrenSortable",void 0),e([n({readOnly:!0})],O.prototype,"connectionStatus",null),e([n({readOnly:!0})],O.prototype,"error",null),e([n()],O.prototype,"hidden",void 0),e([n({readOnly:!0})],O.prototype,"incompatible",null),e([n()],O.prototype,"layer",void 0),e([n({readOnly:!0})],O.prototype,"layerView",null),e([n()],O.prototype,"listItemCreatedFunction",void 0),e([n({nonNullable:!0})],O.prototype,"listModeDisabled",void 0),e([n()],O.prototype,"open",void 0),e([n({type:y})],O.prototype,"panel",null),e([a("panel")],O.prototype,"castPanel",null),e([n()],O.prototype,"parent",void 0),e([n({value:!0})],O.prototype,"sortable",null),e([n()],O.prototype,"title",null),e([n({readOnly:!0})],O.prototype,"publishing",null),e([n({readOnly:!0})],O.prototype,"updating",null),e([n()],O.prototype,"view",void 0),e([n()],O.prototype,"visible",null),e([n({readOnly:!0})],O.prototype,"visibleAtCurrentScale",null),e([n({readOnly:!0})],O.prototype,"visibleAtCurrentTimeExtent",null),e([n({readOnly:!0})],O.prototype,"visibilityMode",null),O=C=e([h("esri.widgets.LayerList.ListItem")],O);const I=O;export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../core/Identifiable.js";import{destroyMaybe as i}from"../../core/maybe.js";import{watch as n,initial as r}from"../../core/reactiveUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import l from"../Widget.js";import{isSublayer as d}from"./support/layerListUtils.js";import{isWidget as a}from"../support/widget.js";import{tsx as p}from"../support/jsxFactory.js";let g=class extends(t.IdentifiableMixin(l)){constructor(e,t){super(e,t),this._legend=null,this.content=null,this.flowEnabled=!1,this.image=null,this.listItem=null,this.open=!1,this.visible=!0}initialize(){this.addHandles([n(()=>this._canCreateLegend,()=>this._createLegend(),r),n(()=>[this._legend,this._legendOptions],()=>this._updateLegend(),r)])}destroy(){this._legend=i(this._legend)}get _canCreateLegend(){const{content:e,listItem:t}=this;if(!t)return!1;const i="legend";return e===i||null!=e&&!!Array.isArray(e)&&e.includes(i)}get _legendOptions(){const{listItem:e,_legendLayerInfo:t}=this,i=e?.view;return t&&i?{view:i,layerInfos:[t]}:{}}get _legendLayerInfo(){const e=this.listItem?.layer;if(!e||"subtype-sublayer"===e.type)return null;const t=d(e)?e:null,i=e?.parent,n=null!=i&&"type"in i&&"map-image"===i.type?t?.source:null,r="";return n&&i?{layer:i,title:r,sublayerIds:[n.mapLayerId]}:{layer:e,title:r}}get disabled(){const{listItem:e,_legend:t,content:i}=this;return!e||!(Array.isArray(i)&&i.length>1)&&(!!t&&(!t.activeLayerInfos?.length||!e.visibleAtCurrentScale||!e.visible))}set disabled(e){this._overrideIfSome("disabled",e)}get icon(){const{image:e}=this,t=this._getFirstWidget();return this._get("icon")??(!e&&t?t.icon:null)}set icon(e){this._overrideIfSome("icon",e)}get title(){return this._get("title")||(this._getFirstWidget()?.label??"")}set title(e){this._override("title",e)}render(){return p("div",{class:"esri-list-item-panel"},this._renderContents())}_renderContent(e){const{_legend:t,disabled:i,open:n}=this;return e&&!i&&n?"legend"===e&&t?p("div",{key:"legend-widget"},t.render()):"string"==typeof e?p("div",{innerHTML:e,key:e}):a(e)?p("div",{key:"content-widget"},e.render()):e instanceof HTMLElement?p("div",{afterCreate:this._attachToNode,bind:e,key:"content-element"}):null:null}_renderContents(){const{content:e,open:t}=this;return t?Array.isArray(e)?e.map(e=>this._renderContent(e)):this._renderContent(e):null}async _createLegend(){if(i(this._legend),this._legend=null,!this._canCreateLegend)return;const{default:e}=await import("../Legend.js"),t=new e(this._legendOptions);this._legend=t}_attachToNode(e){e.appendChild(this)}_updateLegend(){const e=this._legend;e&&e.set(this._legendOptions)}_getWidget(e){return"legend"===e?this._legend:a(e)?e:null}_getFirstWidget(){const{content:e}=this;return Array.isArray(e)?e.map(e=>this._getWidget(e)).find(e=>e):this._getWidget(e)}};e([s()],g.prototype,"_legend",void 0),e([s()],g.prototype,"_canCreateLegend",null),e([s()],g.prototype,"_legendOptions",null),e([s()],g.prototype,"_legendLayerInfo",null),e([s()],g.prototype,"content",void 0),e([s()],g.prototype,"disabled",null),e([s()],g.prototype,"flowEnabled",void 0),e([s()],g.prototype,"icon",null),e([s()],g.prototype,"image",void 0),e([s()],g.prototype,"listItem",void 0),e([s()],g.prototype,"open",void 0),e([s()],g.prototype,"title",null),e([s()],g.prototype,"visible",void 0),g=e([o("esri.widgets.LayerList.ListItemPanel")],g);const c=g;export{c as default};
5
+ import{__decorate as e}from"tslib";import{IdentifiableMixin as t}from"../../core/Identifiable.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as i,initial as r}from"../../core/reactiveUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import l from"../Widget.js";import{isSublayer as d}from"./support/layerListUtils.js";import{isWidget as a}from"../support/widget.js";import{tsx as p}from"../support/jsxFactory.js";let g=class extends(t(l)){constructor(e,t){super(e,t),this._legend=null,this.content=null,this.flowEnabled=!1,this.image=null,this.listItem=null,this.open=!1,this.visible=!0}initialize(){this.addHandles([i(()=>this._canCreateLegend,()=>this._createLegend(),r),i(()=>[this._legend,this._legendOptions],()=>this._updateLegend(),r)])}destroy(){this._legend=n(this._legend)}get _canCreateLegend(){const{content:e,listItem:t}=this;if(!t)return!1;const n="legend";return e===n||null!=e&&!!Array.isArray(e)&&e.includes(n)}get _legendOptions(){const{listItem:e,_legendLayerInfo:t}=this,n=e?.view;return t&&n?{view:n,layerInfos:[t]}:{}}get _legendLayerInfo(){const e=this.listItem?.layer;if(!e||"subtype-sublayer"===e.type)return null;const t=d(e)?e:null,n=e?.parent,i=null!=n&&"type"in n&&"map-image"===n.type?t?.source:null,r="";return i&&n?{layer:n,title:r,sublayerIds:[i.mapLayerId]}:{layer:e,title:r}}get disabled(){const{listItem:e,_legend:t,content:n}=this;return!e||!(Array.isArray(n)&&n.length>1)&&(!!t&&(!t.activeLayerInfos?.length||!e.visibleAtCurrentScale||!e.visible))}set disabled(e){this._overrideIfSome("disabled",e)}get icon(){const{image:e}=this,t=this._getFirstWidget();return this._get("icon")??(!e&&t?t.icon:null)}set icon(e){this._overrideIfSome("icon",e)}get title(){return this._get("title")||(this._getFirstWidget()?.label??"")}set title(e){this._override("title",e)}render(){return p("div",{class:"esri-list-item-panel"},this._renderContents())}_renderContent(e){const{_legend:t,disabled:n,open:i}=this;return e&&!n&&i?"legend"===e&&t?p("div",{key:"legend-widget"},t.render()):"string"==typeof e?p("div",{innerHTML:e,key:e}):a(e)?p("div",{key:"content-widget"},e.render()):e instanceof HTMLElement?p("div",{afterCreate:this._attachToNode,bind:e,key:"content-element"}):null:null}_renderContents(){const{content:e,open:t}=this;return t?Array.isArray(e)?e.map(e=>this._renderContent(e)):this._renderContent(e):null}async _createLegend(){if(n(this._legend),this._legend=null,!this._canCreateLegend)return;const{default:e}=await import("../Legend.js"),t=new e(this._legendOptions);this._legend=t}_attachToNode(e){e.appendChild(this)}_updateLegend(){const e=this._legend;e&&e.set(this._legendOptions)}_getWidget(e){return"legend"===e?this._legend:a(e)?e:null}_getFirstWidget(){const{content:e}=this;return Array.isArray(e)?e.map(e=>this._getWidget(e)).find(e=>e):this._getWidget(e)}};e([s()],g.prototype,"_legend",void 0),e([s()],g.prototype,"_canCreateLegend",null),e([s()],g.prototype,"_legendOptions",null),e([s()],g.prototype,"_legendLayerInfo",null),e([s()],g.prototype,"content",void 0),e([s()],g.prototype,"disabled",null),e([s()],g.prototype,"flowEnabled",void 0),e([s()],g.prototype,"icon",null),e([s()],g.prototype,"image",void 0),e([s()],g.prototype,"listItem",void 0),e([s()],g.prototype,"open",void 0),e([s()],g.prototype,"title",null),e([s()],g.prototype,"visible",void 0),g=e([o("esri.widgets.LayerList.ListItemPanel")],g);const c=g;export{c as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../core/Collection.js";import i from"../core/Identifiable.js";import o from"../core/ReactiveMap.js";import{on as s,watch as l,initial as r}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import d from"./Widget.js";import{css as p}from"./LayerList/css.js";import c from"./LayerList/LayerListItem.js";import m from"./LayerList/LayerListViewModel.js";import h from"./LayerList/LayerListVisibleElements.js";import y from"./LayerList/ListItem.js";import{minDragEnabledItems as u,minFilterItems as g,getItem as _,getLayerType as L,removeDestroyedListItems as f,setFilterPredicate as v,sortLayersToIds as I,sortChildLayersToIds as w}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as b}from"./support/componentsUtils.js";import{globalCss as C}from"./support/globalCss.js";import{calciteListFilterProps as E}from"./support/listUtils.js";import{setFocus as F}from"./support/widgetUtils.js";import{messageBundle as M}from"./support/decorators/messageBundle.js";import{vmEvent as O}from"./support/decorators/vmEvent.js";import{tsx as T}from"./support/jsxFactory.js";const P=t.ofType(y),A="nested";let j=class extends(i.IdentifiableMixin(d)){constructor(e,i){super(e,i),this._rootListEl=null,this._activeItem=null,this._tooltipReferenceMap=new o,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._layerListMap=new o,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterPredicate=null,this.filterText="",this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t(["knowledge-graph"]),this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=u,this.minFilterItems=g,this.openedLayers=new t,this.openedLayerLists=new t,this.selectedItems=new P,this.selectionMode="none",this.tableList=null,this.tileOptions=null,this.viewModel=new m,this.visibilityAppearance="default",this.visibleElements=new h,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=_(e);if(!l?.sortable)return!1;const r=_(t),a=L(t),n=_(i),d=L(i),p=!!a&&!!d&&a===d,c={selected:l,from:r,to:n},m=t.group,h=i.group,y=r?.layer?.type??"",u=n?.layer?.type??"",g=new Set(["map-image","catalog","knowledge-graph"]),f="sublayer";return m&&h&&"function"==typeof s?s.call(null,c):p&&!g.has(y)&&!g.has(u)&&l?.layer?.type!==f},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if("default"!==this.visibilityAppearance)return;const t=Array.from(e.composedPath()).find(e=>e.classList?.contains(p.item));this._activeItem=_(t)},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:l}=e;if(o&&i&&!(t?.newIndex===l&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)){if(this._lastDragDetail=e,this._selectedDragItemLayerUid=s.value,o===i){const e=Array.from(o.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);return void this._sortLayers(o,e)}this._moveLayerFromChildList({toEl:i,fromEl:o,dragEl:s,newIndex:l})}}}initialize(){this.addHandles([s(()=>this.openedLayers,"change",()=>this._handleOpenedLayersChange(),r),s(()=>this.viewModel.operationalItems,"change",()=>f(this.selectedItems),r),l(()=>[this.filterPredicate,this._rootListEl],()=>v(this._rootListEl,this.filterPredicate))])}loadDependencies(){return b({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(e=>"catalog-dynamic-group"!==e.layer?.type)).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.visibleElements.filter}get _renderedOpenLayerFlowItems(){const{openedLayers:e}=this;return e.toArray().map((t,i)=>this._renderLayerFlowItem(t,i===e.length-1))}get icon(){return"layers"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get operationalItems(){return this.viewModel.operationalItems}set operationalItems(e){this.viewModel.operationalItems=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[C.hidden]:"loading"===e,[C.disabled]:"disabled"===e};return T("div",{class:this.classes(p.base,C.widget,C.panel,t)},this._renderItemTooltips(),this._renderItems())}async _createFlowList(e,t){const{_layerListMap:i}=this,o=i.get(e);if(o)return o;const s="catalog"===e.type?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,s),s}async _handleOpenedLayersChange(){const{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();const o=new AbortController,{signal:s}=o;this._openedLayersController=o,e.forEach((i,o)=>{t.includes(o)||(i.destroy(),e.delete(o))});const l=await Promise.all(t.map(e=>this._createFlowList(e,s)));if(s.aborted)return;i.removeAll(),i.addMany(l);const r=i.at(-1);r?"catalogLayer"in r?(this._set("catalogLayerList",r),this._set("tableList",null)):(this._set("catalogLayerList",null),this._set("tableList",r)):(this._set("catalogLayerList",null),this._set("tableList",null))}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}_renderItemTooltip(e){const{_tooltipReferenceMap:t,messages:i}=this;return e?T("calcite-tooltip",{key:`tooltip-${e.layer?.uid}`,overlayPositioning:"fixed",referenceElement:t.get(e.layer?.uid)},i.layerIncompatibleTooltip):null}_renderItemTooltipNodes(e){return e.incompatible?this._renderItemTooltip(e):e.children?.filter(e=>!e.hidden).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderItemTooltips(){return this._visibleItems?.toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoItemsMessage(){return T("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return T("div",{class:p.itemMessage,key:"esri-layer-list__no-items"},T("calcite-notice",{icon:"information",kind:"info",open:!0,width:"full"},this._renderNoItemsMessage()))}async _createCatalogLayerList(e){const{default:t}=await import("./CatalogLayerList.js"),{headingLevel:i,catalogOptions:o,view:s,filterPlaceholder:l,listItemCreatedFunction:r,minFilterItems:a,selectionMode:n,visibilityAppearance:d,_onCatalogOpen:p,_onTablesOpen:c,layerTablesEnabled:m}=this;return new t({headingLevel:i,view:s,filterPlaceholder:l,listItemCreatedFunction:r,minFilterItems:a,selectionMode:n,visibilityAppearance:d,...o,catalogLayer:e,layerTablesEnabled:m,onCatalogOpen:p,onTablesOpen:c})}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){const{default:t}=await import("./TableList.js"),{headingLevel:i,selectionMode:o,dragEnabled:s}=this;return new t({headingLevel:i,selectionMode:o,dragEnabled:s,...this._getTableListParams(e)})}_renderLayerFlowItem(e,t){const{messages:i,openedLayers:o}=this,s=e.title||this.messages.untitledLayer;return T("calcite-flow-item",{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:s,heading:i["catalog"===e.type?"catalogLayers":"tables"],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),o.pop();const t=o.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderPanelFlowItems(){const{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map(({title:i,panel:o},s)=>{const l=()=>this._handlePanelFlowItemBack(o);return T("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:i,heading:o.title,headingLevel:this.headingLevel,key:`flow-panel-${o.uid}`,selected:!t.length&&s===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),l()}},o.render(),T("calcite-button",{appearance:"transparent",onclick:l,slot:"footer-actions",width:"full"},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,F(e))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,F(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,F(e))}_renderItems(){const{visible:e,collapsed:t,_visibleItems:i,_openedPanelItems:o,_filterEnabled:s,_rootGroupUid:l,visibleElements:{closeButton:r,collapseButton:a,heading:n,flow:d},_dragEnabled:c,selectionMode:m,filterText:h,openedLayers:y,filterPlaceholder:u,messages:g}=this,_=[T("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:r,closed:!e,collapsed:t,collapsible:a,heading:n?g.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!y.length&&!o.length,onCalciteFlowItemClose:()=>this.visible=!1},i?.length?null:this._renderNoItems(),T("calcite-list",{afterCreate:e=>{this._rootListEl=e,e.addEventListener("focusin",this._setActiveItem),e.addEventListener("focusout",this._clearActiveItem)},afterRemoved:e=>{this._rootListEl=null,e.removeEventListener("focusin",this._setActiveItem),e.removeEventListener("focusout",this._clearActiveItem)},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":l,displayMode:A,dragEnabled:c,filterEnabled:s,filterPlaceholder:u,filterProps:E,filterText:s?h:"",group:l,key:"root-list",label:g.widgetLabel,onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem,selectionAppearance:"border",selectionMode:m,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},i.toArray().map(e=>this._renderItem(e)),s?T("div",{class:p.filterNoResults,slot:"filter-no-results"},T("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return e?d?T("calcite-flow",{key:"root-flow"},_):_:null}_renderItem(e,t,i){return T(c,{activeItem:this._activeItem,canMove:this._canMove,css:p,displayMode:A,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onCatalogOpen:this._onCatalogOpen,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,onTablesOpen:this._onTablesOpen,onTooltipReferenceChange:this._onTooltipReferenceChange})}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:o}){const s=_(i),l=_(e),r=_(t);this.viewModel.moveListItem(s,r,l,o)}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_sortLayers(e,t){if(e)if(e===this._rootListEl)I(this.view?.map?.layers,t);else{const i=_(e);if(!i)return;w(i,t)}}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map(e=>_(e)).filter(Boolean);i.removeAll(),i.addMany(o)}};e([a()],j.prototype,"_rootListEl",void 0),e([a()],j.prototype,"_activeItem",void 0),e([a()],j.prototype,"_tooltipReferenceMap",void 0),e([a()],j.prototype,"_focusRootFlowItem",void 0),e([a()],j.prototype,"_focusPanelFlowItem",void 0),e([a()],j.prototype,"_focusLayerFlowItem",void 0),e([a()],j.prototype,"_layerListMap",void 0),e([a()],j.prototype,"_totalItems",null),e([a()],j.prototype,"_visibleItems",null),e([a()],j.prototype,"_openedPanelItems",null),e([a()],j.prototype,"_dragEnabled",null),e([a()],j.prototype,"_filterEnabled",null),e([a()],j.prototype,"_renderedOpenLayerFlowItems",null),e([a({readOnly:!0})],j.prototype,"catalogLayerList",void 0),e([a()],j.prototype,"catalogOptions",void 0),e([a()],j.prototype,"collapsed",void 0),e([a()],j.prototype,"dragEnabled",void 0),e([a()],j.prototype,"filterPlaceholder",void 0),e([a()],j.prototype,"filterPredicate",void 0),e([a()],j.prototype,"filterText",void 0),e([a()],j.prototype,"headingLevel",void 0),e([a()],j.prototype,"icon",null),e([a()],j.prototype,"knowledgeGraphOptions",void 0),e([a()],j.prototype,"label",null),e([a()],j.prototype,"layerTablesEnabled",void 0),e([a()],j.prototype,"listItemCanGiveFunction",void 0),e([a()],j.prototype,"listItemCanReceiveFunction",void 0),e([a()],j.prototype,"listItemCreatedFunction",null),e([a()],j.prototype,"mapImageOptions",void 0),e([a(),M("esri/widgets/LayerList/t9n/LayerList")],j.prototype,"messages",void 0),e([a(),M("esri/t9n/common")],j.prototype,"messagesCommon",void 0),e([a()],j.prototype,"minDragEnabledItems",void 0),e([a()],j.prototype,"minFilterItems",void 0),e([a({readOnly:!0})],j.prototype,"openedLayers",void 0),e([a({readOnly:!0})],j.prototype,"openedLayerLists",void 0),e([a()],j.prototype,"operationalItems",null),e([a()],j.prototype,"selectedItems",void 0),e([a()],j.prototype,"selectionMode",void 0),e([a({readOnly:!0})],j.prototype,"tableList",void 0),e([a()],j.prototype,"tileOptions",void 0),e([a()],j.prototype,"view",null),e([O("trigger-action"),a({type:m})],j.prototype,"viewModel",void 0),e([a()],j.prototype,"visibilityAppearance",void 0),e([a({type:h,nonNullable:!0})],j.prototype,"visibleElements",void 0),j=e([n("esri.widgets.LayerList")],j);const D=j;export{D as default};
5
+ import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import o from"../core/ReactiveMap.js";import{on as s,watch as l,initial as r}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import d from"./Widget.js";import{css as p}from"./LayerList/css.js";import c from"./LayerList/LayerListItem.js";import m from"./LayerList/LayerListViewModel.js";import h from"./LayerList/LayerListVisibleElements.js";import y from"./LayerList/ListItem.js";import{minDragEnabledItems as u,minFilterItems as g,getItem as _,getLayerType as L,removeDestroyedListItems as f,setFilterPredicate as v,sortLayersToIds as I,sortChildLayersToIds as w}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as b}from"./support/componentsUtils.js";import{globalCss as C}from"./support/globalCss.js";import{calciteListFilterProps as E}from"./support/listUtils.js";import{setFocus as F}from"./support/widgetUtils.js";import{messageBundle as M}from"./support/decorators/messageBundle.js";import{vmEvent as O}from"./support/decorators/vmEvent.js";import{tsx as T}from"./support/jsxFactory.js";const P=t.ofType(y),A="nested";let j=class extends(i(d)){constructor(e,i){super(e,i),this._rootListEl=null,this._activeItem=null,this._tooltipReferenceMap=new o,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._layerListMap=new o,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterPredicate=null,this.filterText="",this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t(["knowledge-graph"]),this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=u,this.minFilterItems=g,this.openedLayers=new t,this.openedLayerLists=new t,this.selectedItems=new P,this.selectionMode="none",this.tableList=null,this.tileOptions=null,this.viewModel=new m,this.visibilityAppearance="default",this.visibleElements=new h,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=_(e);if(!l?.sortable)return!1;const r=_(t),a=L(t),n=_(i),d=L(i),p=!!a&&!!d&&a===d,c={selected:l,from:r,to:n},m=t.group,h=i.group,y=r?.layer?.type??"",u=n?.layer?.type??"",g=new Set(["map-image","catalog","knowledge-graph"]),f="sublayer";return m&&h&&"function"==typeof s?s.call(null,c):p&&!g.has(y)&&!g.has(u)&&l?.layer?.type!==f},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if("default"!==this.visibilityAppearance)return;const t=Array.from(e.composedPath()).find(e=>e.classList?.contains(p.item));this._activeItem=_(t)},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:l}=e;if(o&&i&&!(t?.newIndex===l&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)){if(this._lastDragDetail=e,this._selectedDragItemLayerUid=s.value,o===i){const e=Array.from(o.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);return void this._sortLayers(o,e)}this._moveLayerFromChildList({toEl:i,fromEl:o,dragEl:s,newIndex:l})}}}initialize(){this.addHandles([s(()=>this.openedLayers,"change",()=>this._handleOpenedLayersChange(),r),s(()=>this.viewModel.operationalItems,"change",()=>f(this.selectedItems),r),l(()=>[this.filterPredicate,this._rootListEl],()=>v(this._rootListEl,this.filterPredicate))])}loadDependencies(){return b({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(e=>"catalog-dynamic-group"!==e.layer?.type)).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.visibleElements.filter}get _renderedOpenLayerFlowItems(){const{openedLayers:e}=this;return e.toArray().map((t,i)=>this._renderLayerFlowItem(t,i===e.length-1))}get icon(){return"layers"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get operationalItems(){return this.viewModel.operationalItems}set operationalItems(e){this.viewModel.operationalItems=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[C.hidden]:"loading"===e,[C.disabled]:"disabled"===e};return T("div",{class:this.classes(p.base,C.widget,C.panel,t)},this._renderItemTooltips(),this._renderItems())}async _createFlowList(e,t){const{_layerListMap:i}=this,o=i.get(e);if(o)return o;const s="catalog"===e.type?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,s),s}async _handleOpenedLayersChange(){const{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();const o=new AbortController,{signal:s}=o;this._openedLayersController=o,e.forEach((i,o)=>{t.includes(o)||(i.destroy(),e.delete(o))});const l=await Promise.all(t.map(e=>this._createFlowList(e,s)));if(s.aborted)return;i.removeAll(),i.addMany(l);const r=i.at(-1);r?"catalogLayer"in r?(this._set("catalogLayerList",r),this._set("tableList",null)):(this._set("catalogLayerList",null),this._set("tableList",r)):(this._set("catalogLayerList",null),this._set("tableList",null))}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}_renderItemTooltip(e){const{_tooltipReferenceMap:t,messages:i}=this;return e?T("calcite-tooltip",{key:`tooltip-${e.layer?.uid}`,overlayPositioning:"fixed",referenceElement:t.get(e.layer?.uid)},i.layerIncompatibleTooltip):null}_renderItemTooltipNodes(e){return e.incompatible?this._renderItemTooltip(e):e.children?.filter(e=>!e.hidden).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderItemTooltips(){return this._visibleItems?.toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoItemsMessage(){return T("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return T("div",{class:p.itemMessage,key:"esri-layer-list__no-items"},T("calcite-notice",{icon:"information",kind:"info",open:!0,width:"full"},this._renderNoItemsMessage()))}async _createCatalogLayerList(e){const{default:t}=await import("./CatalogLayerList.js"),{headingLevel:i,catalogOptions:o,view:s,filterPlaceholder:l,listItemCreatedFunction:r,minFilterItems:a,selectionMode:n,visibilityAppearance:d,_onCatalogOpen:p,_onTablesOpen:c,layerTablesEnabled:m}=this;return new t({headingLevel:i,view:s,filterPlaceholder:l,listItemCreatedFunction:r,minFilterItems:a,selectionMode:n,visibilityAppearance:d,...o,catalogLayer:e,layerTablesEnabled:m,onCatalogOpen:p,onTablesOpen:c})}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){const{default:t}=await import("./TableList.js"),{headingLevel:i,selectionMode:o,dragEnabled:s}=this;return new t({headingLevel:i,selectionMode:o,dragEnabled:s,...this._getTableListParams(e)})}_renderLayerFlowItem(e,t){const{messages:i,openedLayers:o}=this,s=e.title||this.messages.untitledLayer;return T("calcite-flow-item",{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:s,heading:i["catalog"===e.type?"catalogLayers":"tables"],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),o.pop();const t=o.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderPanelFlowItems(){const{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map(({title:i,panel:o},s)=>{const l=()=>this._handlePanelFlowItemBack(o);return T("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:i,heading:o.title,headingLevel:this.headingLevel,key:`flow-panel-${o.uid}`,selected:!t.length&&s===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),l()}},o.render(),T("calcite-button",{appearance:"transparent",onclick:l,slot:"footer-actions",width:"full"},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,F(e))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,F(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,F(e))}_renderItems(){const{visible:e,collapsed:t,_visibleItems:i,_openedPanelItems:o,_filterEnabled:s,_rootGroupUid:l,visibleElements:{closeButton:r,collapseButton:a,heading:n,flow:d},_dragEnabled:c,selectionMode:m,filterText:h,openedLayers:y,filterPlaceholder:u,messages:g}=this,_=[T("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:r,closed:!e,collapsed:t,collapsible:a,heading:n?g.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!y.length&&!o.length,onCalciteFlowItemClose:()=>this.visible=!1},i?.length?null:this._renderNoItems(),T("calcite-list",{afterCreate:e=>{this._rootListEl=e,e.addEventListener("focusin",this._setActiveItem),e.addEventListener("focusout",this._clearActiveItem)},afterRemoved:e=>{this._rootListEl=null,e.removeEventListener("focusin",this._setActiveItem),e.removeEventListener("focusout",this._clearActiveItem)},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":l,displayMode:A,dragEnabled:c,filterEnabled:s,filterPlaceholder:u,filterProps:E,filterText:s?h:"",group:l,key:"root-list",label:g.widgetLabel,onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem,selectionAppearance:"border",selectionMode:m,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},i.toArray().map(e=>this._renderItem(e)),s?T("div",{class:p.filterNoResults,slot:"filter-no-results"},T("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return e?d?T("calcite-flow",{key:"root-flow"},_):_:null}_renderItem(e,t,i){return T(c,{activeItem:this._activeItem,canMove:this._canMove,css:p,displayMode:A,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onCatalogOpen:this._onCatalogOpen,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,onTablesOpen:this._onTablesOpen,onTooltipReferenceChange:this._onTooltipReferenceChange})}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:o}){const s=_(i),l=_(e),r=_(t);this.viewModel.moveListItem(s,r,l,o)}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_sortLayers(e,t){if(e)if(e===this._rootListEl)I(this.view?.map?.layers,t);else{const i=_(e);if(!i)return;w(i,t)}}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map(e=>_(e)).filter(Boolean);i.removeAll(),i.addMany(o)}};e([a()],j.prototype,"_rootListEl",void 0),e([a()],j.prototype,"_activeItem",void 0),e([a()],j.prototype,"_tooltipReferenceMap",void 0),e([a()],j.prototype,"_focusRootFlowItem",void 0),e([a()],j.prototype,"_focusPanelFlowItem",void 0),e([a()],j.prototype,"_focusLayerFlowItem",void 0),e([a()],j.prototype,"_layerListMap",void 0),e([a()],j.prototype,"_totalItems",null),e([a()],j.prototype,"_visibleItems",null),e([a()],j.prototype,"_openedPanelItems",null),e([a()],j.prototype,"_dragEnabled",null),e([a()],j.prototype,"_filterEnabled",null),e([a()],j.prototype,"_renderedOpenLayerFlowItems",null),e([a({readOnly:!0})],j.prototype,"catalogLayerList",void 0),e([a()],j.prototype,"catalogOptions",void 0),e([a()],j.prototype,"collapsed",void 0),e([a()],j.prototype,"dragEnabled",void 0),e([a()],j.prototype,"filterPlaceholder",void 0),e([a()],j.prototype,"filterPredicate",void 0),e([a()],j.prototype,"filterText",void 0),e([a()],j.prototype,"headingLevel",void 0),e([a()],j.prototype,"icon",null),e([a()],j.prototype,"knowledgeGraphOptions",void 0),e([a()],j.prototype,"label",null),e([a()],j.prototype,"layerTablesEnabled",void 0),e([a()],j.prototype,"listItemCanGiveFunction",void 0),e([a()],j.prototype,"listItemCanReceiveFunction",void 0),e([a()],j.prototype,"listItemCreatedFunction",null),e([a()],j.prototype,"mapImageOptions",void 0),e([a(),M("esri/widgets/LayerList/t9n/LayerList")],j.prototype,"messages",void 0),e([a(),M("esri/t9n/common")],j.prototype,"messagesCommon",void 0),e([a()],j.prototype,"minDragEnabledItems",void 0),e([a()],j.prototype,"minFilterItems",void 0),e([a({readOnly:!0})],j.prototype,"openedLayers",void 0),e([a({readOnly:!0})],j.prototype,"openedLayerLists",void 0),e([a()],j.prototype,"operationalItems",null),e([a()],j.prototype,"selectedItems",void 0),e([a()],j.prototype,"selectionMode",void 0),e([a({readOnly:!0})],j.prototype,"tableList",void 0),e([a()],j.prototype,"tileOptions",void 0),e([a()],j.prototype,"view",null),e([O("trigger-action"),a({type:m})],j.prototype,"viewModel",void 0),e([a()],j.prototype,"visibilityAppearance",void 0),e([a({type:h,nonNullable:!0})],j.prototype,"visibleElements",void 0),j=e([n("esri.widgets.LayerList")],j);const D=j;export{D as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../core/Error.js";import o from"../../core/Evented.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{convertLayoutTypeToWebSupportedFormat as a}from"../../layers/knowledgeGraph/supportUtils.js";let s=class extends o.EventedAccessor{constructor(t){super(t),this._goToExtentController=null,this._scaleExtent=(t,e)=>{const o=t,r=(t.xmax-t.xmin)/2*(e-1),i=(t.ymax-t.ymin)/2*(e-1);return o.xmin=t.xmin-r,o.ymin=t.ymin-i,o.xmax=t.xmax+r,o.ymax=t.ymax+i,o},this.switchLayout=this.switchLayout.bind(this)}destroy(){this._cancelGoToExtent(),this.view=null}set view(t){this._set("view",t),t&&t.when().then(()=>{if(this.view===t){if(!this.view.map.linkChartProperties)throw new e("linkChartLayoutSwitcher:error","Link chart layouts are only supported on WebLinkCharts.");this.layout=a(this.view.map.linkChartProperties.layoutType)}})}get state(){return this.view?this.view.map.linkChartProperties?"ready":"disabled":"loading"}get layout(){return this._get("layout")||"organic-standard"}set layout(t){this._set("layout",t)}get preventExtentUpdate(){return this._get("preventExtentUpdate")||!1}set preventExtentUpdate(t){this._set("preventExtentUpdate",t)}async switchLayout(t){if(!this.view||!this.view.map)throw new e("linkChartLayoutSwitcher:loading-state","Cannot change layout when link chart has not loaded.");if(this.layout=t,await this.view.map.applyLayout(t),!this.preventExtentUpdate&&this.view.map.diagramNodesExtent){const e="geographic-organic-standard"!==t?this._scaleExtent(this.view.map.diagramNodesExtent,1.4):this.view.map.diagramNodesExtent,r=new AbortController;this._goToExtentController=r;try{await this.view.when(),await this.view.goTo(e,{signal:r.signal})}catch(o){}this._goToExtentController=null}this.emit("switchLayout",{layout:t})}_cancelGoToExtent(){const{_goToExtentController:t}=this;t&&t.abort(),this._goToExtentController=null}};t([r()],s.prototype,"_goToExtentController",void 0),t([r()],s.prototype,"view",null),t([r({readOnly:!0})],s.prototype,"state",null),t([r()],s.prototype,"layout",null),t([r()],s.prototype,"preventExtentUpdate",null),s=t([i("esri.widgets.LinkChartLayoutSwitcher.LinkChartLayoutSwitcherViewModel")],s);const n=s;export{n as default};
5
+ import{__decorate as t}from"tslib";import e from"../../core/Error.js";import{EventedAccessor as o}from"../../core/Evented.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{convertLayoutTypeToWebSupportedFormat as a}from"../../layers/knowledgeGraph/supportUtils.js";let s=class extends o{constructor(t){super(t),this._goToExtentController=null,this._scaleExtent=(t,e)=>{const o=t,r=(t.xmax-t.xmin)/2*(e-1),i=(t.ymax-t.ymin)/2*(e-1);return o.xmin=t.xmin-r,o.ymin=t.ymin-i,o.xmax=t.xmax+r,o.ymax=t.ymax+i,o},this.switchLayout=this.switchLayout.bind(this)}destroy(){this._cancelGoToExtent(),this.view=null}set view(t){this._set("view",t),t&&t.when().then(()=>{if(this.view===t){if(!this.view.map.linkChartProperties)throw new e("linkChartLayoutSwitcher:error","Link chart layouts are only supported on WebLinkCharts.");this.layout=a(this.view.map.linkChartProperties.layoutType)}})}get state(){return this.view?this.view.map.linkChartProperties?"ready":"disabled":"loading"}get layout(){return this._get("layout")||"organic-standard"}set layout(t){this._set("layout",t)}get preventExtentUpdate(){return this._get("preventExtentUpdate")||!1}set preventExtentUpdate(t){this._set("preventExtentUpdate",t)}async switchLayout(t){if(!this.view||!this.view.map)throw new e("linkChartLayoutSwitcher:loading-state","Cannot change layout when link chart has not loaded.");if(this.layout=t,await this.view.map.applyLayout(t),!this.preventExtentUpdate&&this.view.map.diagramNodesExtent){const e="geographic-organic-standard"!==t?this._scaleExtent(this.view.map.diagramNodesExtent,1.4):this.view.map.diagramNodesExtent,r=new AbortController;this._goToExtentController=r;try{await this.view.when(),await this.view.goTo(e,{signal:r.signal})}catch(o){}this._goToExtentController=null}this.emit("switchLayout",{layout:t})}_cancelGoToExtent(){const{_goToExtentController:t}=this;t&&t.abort(),this._goToExtentController=null}};t([r()],s.prototype,"_goToExtentController",void 0),t([r()],s.prototype,"view",null),t([r({readOnly:!0})],s.prototype,"state",null),t([r()],s.prototype,"layout",null),t([r()],s.prototype,"preventExtentUpdate",null),s=t([i("esri.widgets.LinkChartLayoutSwitcher.LinkChartLayoutSwitcherViewModel")],s);const n=s;export{n as default};