@arcgis/map-components 4.30.0-next.21 → 4.30.0-next.23

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 (307) hide show
  1. package/dist/arcgis-map-components/arcgis-map-components.esm.js +2 -2
  2. package/dist/arcgis-map-components/index.esm.js +1 -1
  3. package/dist/arcgis-map-components/{p-5dc7f181.entry.js → p-05cfa2f4.entry.js} +2 -2
  4. package/dist/arcgis-map-components/p-09b180b9.entry.js +6 -0
  5. package/dist/arcgis-map-components/{p-13fa022c.entry.js → p-09f4fbcc.entry.js} +2 -2
  6. package/dist/arcgis-map-components/{p-ea190c73.entry.js → p-0e142181.entry.js} +2 -2
  7. package/dist/arcgis-map-components/{p-633c48de.entry.js → p-1012510c.entry.js} +2 -2
  8. package/dist/arcgis-map-components/{p-211d2e5f.entry.js → p-125e20a9.entry.js} +2 -2
  9. package/dist/arcgis-map-components/{p-0d7a746f.entry.js → p-13689cc6.entry.js} +2 -2
  10. package/dist/arcgis-map-components/{p-bafd4ecf.entry.js → p-199aaf3d.entry.js} +2 -2
  11. package/dist/arcgis-map-components/{p-929196cf.entry.js → p-23888710.entry.js} +2 -2
  12. package/dist/arcgis-map-components/p-2809f06e.entry.js +6 -0
  13. package/dist/arcgis-map-components/p-2ae4e4de.js +7 -0
  14. package/dist/arcgis-map-components/{p-ea2d5c4a.entry.js → p-2cee6324.entry.js} +2 -2
  15. package/dist/arcgis-map-components/p-2e3f20ee.entry.js +6 -0
  16. package/dist/arcgis-map-components/{p-f283827d.entry.js → p-3a779522.entry.js} +2 -2
  17. package/dist/arcgis-map-components/p-3c13f0de.entry.js +6 -0
  18. package/dist/arcgis-map-components/{p-631a37e4.entry.js → p-48af7e4d.entry.js} +2 -2
  19. package/dist/arcgis-map-components/p-490809b8.js +6 -0
  20. package/dist/arcgis-map-components/{p-0e3216f6.entry.js → p-4a98651e.entry.js} +2 -2
  21. package/dist/arcgis-map-components/{p-e66e3e69.entry.js → p-4d835ecf.entry.js} +2 -2
  22. package/dist/arcgis-map-components/p-54af84f6.js +6 -0
  23. package/dist/arcgis-map-components/{p-5de52af0.entry.js → p-5600cac0.entry.js} +2 -2
  24. package/dist/arcgis-map-components/{p-b70132ff.entry.js → p-59d5dedf.entry.js} +2 -2
  25. package/dist/arcgis-map-components/{p-ebb42af3.entry.js → p-5c783cce.entry.js} +2 -2
  26. package/dist/arcgis-map-components/{p-ece0167d.entry.js → p-5f316fb4.entry.js} +2 -2
  27. package/dist/arcgis-map-components/{p-ca0231ca.entry.js → p-609df4e3.entry.js} +2 -2
  28. package/dist/arcgis-map-components/{p-92ef707b.entry.js → p-66182981.entry.js} +2 -2
  29. package/dist/arcgis-map-components/p-6bc7f743.entry.js +6 -0
  30. package/dist/arcgis-map-components/p-73130f85.js +6 -0
  31. package/dist/arcgis-map-components/p-74231934.entry.js +6 -0
  32. package/dist/arcgis-map-components/{p-2d2f3c3e.entry.js → p-7b993429.entry.js} +2 -2
  33. package/dist/arcgis-map-components/p-7c41bdd1.entry.js +6 -0
  34. package/dist/arcgis-map-components/{p-35ba629e.entry.js → p-851b21a1.entry.js} +2 -2
  35. package/dist/arcgis-map-components/{p-5acdb798.entry.js → p-8768f131.entry.js} +2 -2
  36. package/dist/arcgis-map-components/{p-b6c12de1.entry.js → p-8b20857d.entry.js} +2 -2
  37. package/dist/arcgis-map-components/p-8eb23360.entry.js +6 -0
  38. package/dist/arcgis-map-components/{p-e40a4839.entry.js → p-90199d2b.entry.js} +2 -2
  39. package/dist/arcgis-map-components/{p-5cfe1adf.entry.js → p-93202786.entry.js} +2 -2
  40. package/dist/arcgis-map-components/{p-57bce1ad.entry.js → p-99f7bfbc.entry.js} +2 -2
  41. package/dist/arcgis-map-components/p-9c373532.js +6 -0
  42. package/dist/arcgis-map-components/p-9eebb597.entry.js +6 -0
  43. package/dist/arcgis-map-components/{p-a4a72fec.entry.js → p-9f0e7931.entry.js} +2 -2
  44. package/dist/arcgis-map-components/{p-7b09951b.entry.js → p-9f18479f.entry.js} +2 -2
  45. package/dist/arcgis-map-components/{p-38b8c927.js → p-9fe2ce6f.js} +1 -1
  46. package/dist/arcgis-map-components/{p-04b1e6ed.entry.js → p-a6445085.entry.js} +2 -2
  47. package/dist/arcgis-map-components/p-a7923d75.entry.js +6 -0
  48. package/dist/arcgis-map-components/{p-31600bc5.entry.js → p-b09c8f40.entry.js} +2 -2
  49. package/dist/arcgis-map-components/{p-a21fd128.entry.js → p-b31c56b0.entry.js} +2 -2
  50. package/dist/arcgis-map-components/{p-b14b3391.entry.js → p-b33cfb3c.entry.js} +2 -2
  51. package/dist/arcgis-map-components/{p-8d2601e0.entry.js → p-b40cbef1.entry.js} +2 -2
  52. package/dist/arcgis-map-components/{p-f761c93e.entry.js → p-bbd09ae0.entry.js} +2 -2
  53. package/dist/arcgis-map-components/{p-e5dbf054.entry.js → p-bd5adaa6.entry.js} +2 -2
  54. package/dist/arcgis-map-components/p-c3ecd26e.entry.js +6 -0
  55. package/dist/arcgis-map-components/{p-7f09b6de.entry.js → p-c47dbd7e.entry.js} +2 -2
  56. package/dist/arcgis-map-components/{p-a5bd94c4.entry.js → p-c7417441.entry.js} +2 -2
  57. package/dist/arcgis-map-components/{p-57bb86e7.entry.js → p-c8a5af5a.entry.js} +2 -2
  58. package/dist/arcgis-map-components/{p-9aa14e81.entry.js → p-c8d8a752.entry.js} +2 -2
  59. package/dist/arcgis-map-components/p-cd677bae.js +6 -0
  60. package/dist/arcgis-map-components/{p-b69f62b2.entry.js → p-cf416dc2.entry.js} +2 -2
  61. package/dist/arcgis-map-components/p-cfe33f3d.entry.js +6 -0
  62. package/dist/arcgis-map-components/{p-d3eb465f.entry.js → p-da764564.entry.js} +2 -2
  63. package/dist/arcgis-map-components/{p-80d25ec9.entry.js → p-e0d1617d.entry.js} +2 -2
  64. package/dist/arcgis-map-components/{p-0fdb64b7.entry.js → p-ed971e5f.entry.js} +2 -2
  65. package/dist/arcgis-map-components/{p-6192df14.entry.js → p-f1104e13.entry.js} +2 -2
  66. package/dist/arcgis-map-components/{p-dd091d80.entry.js → p-fe66e3fe.entry.js} +2 -2
  67. package/dist/cjs/Accessor-YDTURKZ7-8dc3b261.js +1249 -0
  68. package/dist/cjs/arcgis-area-measurement-2d.cjs.entry.js +5 -5
  69. package/dist/cjs/arcgis-area-measurement-3d.cjs.entry.js +5 -5
  70. package/dist/cjs/arcgis-attachments.cjs.entry.js +5 -5
  71. package/dist/cjs/arcgis-basemap-gallery_2.cjs.entry.js +5 -5
  72. package/dist/cjs/arcgis-basemap-layer-list.cjs.entry.js +5 -5
  73. package/dist/cjs/arcgis-basemap-toggle.cjs.entry.js +5 -5
  74. package/dist/cjs/arcgis-bookmarks.cjs.entry.js +5 -5
  75. package/dist/cjs/arcgis-building-explorer.cjs.entry.js +5 -5
  76. package/dist/cjs/arcgis-compass.cjs.entry.js +5 -5
  77. package/dist/cjs/arcgis-coordinate-conversion.cjs.entry.js +5 -5
  78. package/dist/cjs/arcgis-daylight.cjs.entry.js +5 -5
  79. package/dist/cjs/arcgis-directional-pad.cjs.entry.js +5 -5
  80. package/dist/cjs/arcgis-directions.cjs.entry.js +5 -5
  81. package/dist/cjs/arcgis-directline-measurement-3d.cjs.entry.js +5 -5
  82. package/dist/cjs/arcgis-distance-measurement-2d.cjs.entry.js +5 -5
  83. package/dist/cjs/arcgis-editor.cjs.entry.js +5 -5
  84. package/dist/cjs/arcgis-elevation-profile.cjs.entry.js +5 -5
  85. package/dist/cjs/arcgis-expand.cjs.entry.js +5 -5
  86. package/dist/cjs/arcgis-feature-form.cjs.entry.js +5 -5
  87. package/dist/cjs/arcgis-feature-table.cjs.entry.js +5 -5
  88. package/dist/cjs/arcgis-feature-templates.cjs.entry.js +5 -5
  89. package/dist/cjs/arcgis-feature.cjs.entry.js +5 -5
  90. package/dist/cjs/arcgis-features.cjs.entry.js +5 -5
  91. package/dist/cjs/arcgis-floor-filter.cjs.entry.js +5 -5
  92. package/dist/cjs/arcgis-fullscreen.cjs.entry.js +5 -5
  93. package/dist/cjs/arcgis-histogram-range-slider.cjs.entry.js +5 -5
  94. package/dist/cjs/arcgis-histogram.cjs.entry.js +4 -4
  95. package/dist/cjs/arcgis-home.cjs.entry.js +5 -5
  96. package/dist/cjs/arcgis-layer-list.cjs.entry.js +5 -5
  97. package/dist/cjs/arcgis-legend.cjs.entry.js +5 -5
  98. package/dist/cjs/arcgis-line-of-sight.cjs.entry.js +5 -5
  99. package/dist/cjs/arcgis-locate.cjs.entry.js +5 -5
  100. package/dist/cjs/arcgis-map-components.cjs.js +3 -3
  101. package/dist/cjs/arcgis-measurement.cjs.entry.js +5 -5
  102. package/dist/cjs/arcgis-navigation-toggle.cjs.entry.js +5 -5
  103. package/dist/cjs/arcgis-placement.cjs.entry.js +4 -4
  104. package/dist/cjs/arcgis-print.cjs.entry.js +5 -5
  105. package/dist/cjs/arcgis-scale-bar.cjs.entry.js +5 -5
  106. package/dist/cjs/arcgis-scale-range-slider.cjs.entry.js +5 -5
  107. package/dist/cjs/arcgis-scene.cjs.entry.js +4 -4
  108. package/dist/cjs/arcgis-search.cjs.entry.js +5 -5
  109. package/dist/cjs/arcgis-shadow-cast.cjs.entry.js +5 -5
  110. package/dist/cjs/arcgis-sketch.cjs.entry.js +5 -5
  111. package/dist/cjs/arcgis-slice.cjs.entry.js +5 -5
  112. package/dist/cjs/arcgis-slider.cjs.entry.js +5 -5
  113. package/dist/cjs/arcgis-swipe.cjs.entry.js +5 -5
  114. package/dist/cjs/arcgis-table-list.cjs.entry.js +5 -5
  115. package/dist/cjs/arcgis-time-slider.cjs.entry.js +5 -5
  116. package/dist/cjs/arcgis-track.cjs.entry.js +5 -5
  117. package/dist/cjs/arcgis-utility-network-associations.cjs.entry.js +14 -5
  118. package/dist/cjs/arcgis-utility-network-trace.cjs.entry.js +5 -5
  119. package/dist/cjs/arcgis-utility-network-validate-topology.cjs.entry.js +14 -5
  120. package/dist/cjs/arcgis-value-picker.cjs.entry.js +5 -5
  121. package/dist/cjs/arcgis-version-management-service-item_2.cjs.entry.js +3 -3
  122. package/dist/cjs/arcgis-version-management-version-item_2.cjs.entry.js +3 -3
  123. package/dist/cjs/arcgis-version-management.cjs.entry.js +1296 -20
  124. package/dist/cjs/arcgis-weather.cjs.entry.js +5 -5
  125. package/dist/cjs/arcgis-zoom.cjs.entry.js +5 -5
  126. package/dist/cjs/chunk-OMA4PI5N-ceabd589.js +1286 -0
  127. package/dist/cjs/{component-utils-c9c9afae.js → component-utils-4a21f6d4.js} +13 -11
  128. package/dist/cjs/decorators-443AWDOE-daca0999.js +120 -0
  129. package/dist/cjs/{disconnected-fdd4caf6.js → disconnected-27b84f9c.js} +1 -1
  130. package/dist/cjs/{index-f15daae9.js → index-b4a52ed1.js} +40 -5
  131. package/dist/cjs/index-d5cf3897.js +761 -0
  132. package/dist/cjs/index.cjs.js +1 -1
  133. package/dist/cjs/loader.cjs.js +3 -3
  134. package/dist/components/Accessor-YDTURKZ7.js +1247 -0
  135. package/dist/components/arcgis-area-measurement-2d.js +1 -1
  136. package/dist/components/arcgis-area-measurement-3d.js +1 -1
  137. package/dist/components/arcgis-assets.d.ts +1 -1
  138. package/dist/components/arcgis-assets.js +1 -1
  139. package/dist/components/arcgis-attachments.js +1 -1
  140. package/dist/components/arcgis-basemap-gallery.js +1 -1
  141. package/dist/components/arcgis-basemap-layer-list.js +1 -1
  142. package/dist/components/arcgis-basemap-toggle.js +1 -1
  143. package/dist/components/arcgis-bookmarks.js +1 -1
  144. package/dist/components/arcgis-building-explorer.js +1 -1
  145. package/dist/components/arcgis-compass.js +1 -1
  146. package/dist/components/arcgis-coordinate-conversion.js +1 -1
  147. package/dist/components/arcgis-daylight.js +1 -1
  148. package/dist/components/arcgis-directional-pad.js +1 -1
  149. package/dist/components/arcgis-directions.js +1 -1
  150. package/dist/components/arcgis-directline-measurement-3d.js +1 -1
  151. package/dist/components/arcgis-distance-measurement-2d.js +1 -1
  152. package/dist/components/arcgis-editor.js +1 -1
  153. package/dist/components/arcgis-elevation-profile.js +1 -1
  154. package/dist/components/arcgis-expand.js +1 -1
  155. package/dist/components/arcgis-feature-form.js +1 -1
  156. package/dist/components/arcgis-feature-table.js +1 -1
  157. package/dist/components/arcgis-feature-templates.js +1 -1
  158. package/dist/components/arcgis-feature.js +1 -1
  159. package/dist/components/arcgis-features.js +1 -1
  160. package/dist/components/arcgis-floor-filter.js +1 -1
  161. package/dist/components/arcgis-fullscreen.js +1 -1
  162. package/dist/components/arcgis-histogram-range-slider.js +1 -1
  163. package/dist/components/arcgis-histogram.js +1 -1
  164. package/dist/components/arcgis-home.js +1 -1
  165. package/dist/components/arcgis-layer-list.js +1 -1
  166. package/dist/components/arcgis-legend.js +1 -1
  167. package/dist/components/arcgis-line-of-sight.js +1 -1
  168. package/dist/components/arcgis-locate.js +1 -1
  169. package/dist/components/arcgis-map.js +1 -1
  170. package/dist/components/arcgis-measurement.js +1 -1
  171. package/dist/components/arcgis-navigation-toggle.js +1 -1
  172. package/dist/components/arcgis-placement.js +1 -1
  173. package/dist/components/arcgis-print.js +1 -1
  174. package/dist/components/arcgis-scale-bar.js +1 -1
  175. package/dist/components/arcgis-scale-range-slider.js +1 -1
  176. package/dist/components/arcgis-scene.js +1 -1
  177. package/dist/components/arcgis-search.js +1 -1
  178. package/dist/components/arcgis-shadow-cast.js +1 -1
  179. package/dist/components/arcgis-sketch.js +1 -1
  180. package/dist/components/arcgis-slice.js +1 -1
  181. package/dist/components/arcgis-slider.js +1 -1
  182. package/dist/components/arcgis-swipe.js +1 -1
  183. package/dist/components/arcgis-table-list.js +1 -1
  184. package/dist/components/arcgis-time-slider.js +1 -1
  185. package/dist/components/arcgis-track.js +1 -1
  186. package/dist/components/arcgis-utility-network-associations.js +10 -1
  187. package/dist/components/arcgis-utility-network-trace.js +1 -1
  188. package/dist/components/arcgis-utility-network-validate-topology.js +10 -1
  189. package/dist/components/arcgis-value-picker.js +1 -1
  190. package/dist/components/arcgis-version-management-service-item.js +1 -1
  191. package/dist/components/arcgis-version-management-version-item.js +1 -1
  192. package/dist/components/arcgis-version-management-version-list.js +1 -1
  193. package/dist/components/arcgis-version-management-version-properties.js +1 -1
  194. package/dist/components/arcgis-version-management.js +1298 -24
  195. package/dist/components/arcgis-weather.js +1 -1
  196. package/dist/components/arcgis-zoom.js +1 -1
  197. package/dist/components/chunk-OMA4PI5N.js +1257 -0
  198. package/dist/components/component-utils.js +13 -11
  199. package/dist/components/decorators-443AWDOE.js +109 -0
  200. package/dist/components/disconnected.js +1 -1
  201. package/dist/components/expand.js +1 -1
  202. package/dist/components/index.js +1 -1
  203. package/dist/components/index2.js +429 -428
  204. package/dist/components/version-management-service-item.js +1 -1
  205. package/dist/components/version-management-version-item.js +1 -1
  206. package/dist/components/version-management-version-list.js +1 -1
  207. package/dist/components/version-management-version-properties.js +1 -1
  208. package/dist/esm/Accessor-YDTURKZ7-976529f2.js +1247 -0
  209. package/dist/esm/arcgis-area-measurement-2d.entry.js +5 -5
  210. package/dist/esm/arcgis-area-measurement-3d.entry.js +5 -5
  211. package/dist/esm/arcgis-attachments.entry.js +5 -5
  212. package/dist/esm/arcgis-basemap-gallery_2.entry.js +5 -5
  213. package/dist/esm/arcgis-basemap-layer-list.entry.js +5 -5
  214. package/dist/esm/arcgis-basemap-toggle.entry.js +5 -5
  215. package/dist/esm/arcgis-bookmarks.entry.js +5 -5
  216. package/dist/esm/arcgis-building-explorer.entry.js +5 -5
  217. package/dist/esm/arcgis-compass.entry.js +5 -5
  218. package/dist/esm/arcgis-coordinate-conversion.entry.js +5 -5
  219. package/dist/esm/arcgis-daylight.entry.js +5 -5
  220. package/dist/esm/arcgis-directional-pad.entry.js +5 -5
  221. package/dist/esm/arcgis-directions.entry.js +5 -5
  222. package/dist/esm/arcgis-directline-measurement-3d.entry.js +5 -5
  223. package/dist/esm/arcgis-distance-measurement-2d.entry.js +5 -5
  224. package/dist/esm/arcgis-editor.entry.js +5 -5
  225. package/dist/esm/arcgis-elevation-profile.entry.js +5 -5
  226. package/dist/esm/arcgis-expand.entry.js +5 -5
  227. package/dist/esm/arcgis-feature-form.entry.js +5 -5
  228. package/dist/esm/arcgis-feature-table.entry.js +5 -5
  229. package/dist/esm/arcgis-feature-templates.entry.js +5 -5
  230. package/dist/esm/arcgis-feature.entry.js +5 -5
  231. package/dist/esm/arcgis-features.entry.js +5 -5
  232. package/dist/esm/arcgis-floor-filter.entry.js +5 -5
  233. package/dist/esm/arcgis-fullscreen.entry.js +5 -5
  234. package/dist/esm/arcgis-histogram-range-slider.entry.js +5 -5
  235. package/dist/esm/arcgis-histogram.entry.js +4 -4
  236. package/dist/esm/arcgis-home.entry.js +5 -5
  237. package/dist/esm/arcgis-layer-list.entry.js +5 -5
  238. package/dist/esm/arcgis-legend.entry.js +5 -5
  239. package/dist/esm/arcgis-line-of-sight.entry.js +5 -5
  240. package/dist/esm/arcgis-locate.entry.js +5 -5
  241. package/dist/esm/arcgis-map-components.js +4 -4
  242. package/dist/esm/arcgis-measurement.entry.js +5 -5
  243. package/dist/esm/arcgis-navigation-toggle.entry.js +5 -5
  244. package/dist/esm/arcgis-placement.entry.js +4 -4
  245. package/dist/esm/arcgis-print.entry.js +5 -5
  246. package/dist/esm/arcgis-scale-bar.entry.js +5 -5
  247. package/dist/esm/arcgis-scale-range-slider.entry.js +5 -5
  248. package/dist/esm/arcgis-scene.entry.js +4 -4
  249. package/dist/esm/arcgis-search.entry.js +5 -5
  250. package/dist/esm/arcgis-shadow-cast.entry.js +5 -5
  251. package/dist/esm/arcgis-sketch.entry.js +5 -5
  252. package/dist/esm/arcgis-slice.entry.js +5 -5
  253. package/dist/esm/arcgis-slider.entry.js +5 -5
  254. package/dist/esm/arcgis-swipe.entry.js +5 -5
  255. package/dist/esm/arcgis-table-list.entry.js +5 -5
  256. package/dist/esm/arcgis-time-slider.entry.js +5 -5
  257. package/dist/esm/arcgis-track.entry.js +5 -5
  258. package/dist/esm/arcgis-utility-network-associations.entry.js +14 -5
  259. package/dist/esm/arcgis-utility-network-trace.entry.js +5 -5
  260. package/dist/esm/arcgis-utility-network-validate-topology.entry.js +14 -5
  261. package/dist/esm/arcgis-value-picker.entry.js +5 -5
  262. package/dist/esm/arcgis-version-management-service-item_2.entry.js +3 -3
  263. package/dist/esm/arcgis-version-management-version-item_2.entry.js +3 -3
  264. package/dist/esm/arcgis-version-management.entry.js +1298 -22
  265. package/dist/esm/arcgis-weather.entry.js +5 -5
  266. package/dist/esm/arcgis-zoom.entry.js +5 -5
  267. package/dist/esm/chunk-OMA4PI5N-21a62e6a.js +1257 -0
  268. package/dist/esm/{component-utils-680656ca.js → component-utils-41fd0df4.js} +13 -11
  269. package/dist/esm/decorators-443AWDOE-9e6fca69.js +109 -0
  270. package/dist/esm/{disconnected-5fe3e50d.js → disconnected-8526b2b4.js} +1 -1
  271. package/dist/esm/{index-15c07606.js → index-101d113a.js} +40 -6
  272. package/dist/esm/index-d19731a3.js +679 -0
  273. package/dist/esm/index.js +1 -1
  274. package/dist/esm/loader.js +4 -4
  275. package/dist/loader/cdn.js +1 -1
  276. package/dist/loader/index.cjs.js +1 -1
  277. package/dist/loader/index.es2017.js +1 -1
  278. package/dist/loader/index.js +1 -1
  279. package/dist/types/components/utility-network-associations/utility-network-associations.d.ts +1 -0
  280. package/dist/types/components/utility-network-validate-topology/utility-network-validate-topology.d.ts +1 -0
  281. package/dist/types/components/version-management/version-management.d.ts +7 -4
  282. package/dist/types/components.d.ts +2 -0
  283. package/dist/types/controllers/useViewModel.d.ts +68 -0
  284. package/dist/types/controllers/useWidget.d.ts +60 -0
  285. package/dist/types/utils/component-utils.d.ts +14 -4
  286. package/dist/types/utils/expandable.d.ts +2 -2
  287. package/package.json +11 -11
  288. package/dist/arcgis-map-components/p-09f54967.entry.js +0 -6
  289. package/dist/arcgis-map-components/p-0e5cac2d.entry.js +0 -6
  290. package/dist/arcgis-map-components/p-25dfa1c7.js +0 -6
  291. package/dist/arcgis-map-components/p-271ccda7.entry.js +0 -6
  292. package/dist/arcgis-map-components/p-365e98b4.entry.js +0 -6
  293. package/dist/arcgis-map-components/p-57788f39.js +0 -7
  294. package/dist/arcgis-map-components/p-5dddda52.entry.js +0 -6
  295. package/dist/arcgis-map-components/p-76574769.entry.js +0 -6
  296. package/dist/arcgis-map-components/p-774acaff.js +0 -6
  297. package/dist/arcgis-map-components/p-79b7008c.entry.js +0 -6
  298. package/dist/arcgis-map-components/p-9e97ba89.entry.js +0 -6
  299. package/dist/arcgis-map-components/p-bf48a1bf.entry.js +0 -6
  300. package/dist/arcgis-map-components/p-c1ec761d.entry.js +0 -6
  301. package/dist/arcgis-map-components/p-d4a6ab2f.entry.js +0 -6
  302. package/dist/arcgis-map-components/p-e5919747.entry.js +0 -6
  303. package/dist/cjs/index-1cafb9a8.js +0 -760
  304. package/dist/esm/index-158201ab.js +0 -678
  305. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/map-components/.stencil/stencil.config.d.ts +0 -2
  306. package/dist/types/utils/SubWidget.d.ts +0 -22
  307. package/dist/types/utils/Widget.d.ts +0 -38
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.21
4
+ * v4.30.0-next.23
5
5
  */
6
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
6
+ import { forceUpdate, proxyCustomElement, HTMLElement, h as h$1, Host } from '@stencil/core/internal/client';
7
7
  import { i as importCoreReactiveUtils, a4 as newWidgetsVersionManagementVersionManagementViewModel } from './index2.js';
8
8
  import { d as defineCustomElement$5 } from './version-management-service-item.js';
9
9
  import { d as defineCustomElement$4 } from './version-management-version-item.js';
@@ -15,7 +15,1286 @@ import "@esri/calcite-components/dist/components/calcite-panel.js";
15
15
  import "@esri/calcite-components/dist/components/calcite-notice.js";
16
16
  import { getArcgisAssetPath as getAssetPath } from "./arcgis-assets.js";
17
17
 
18
- function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function x(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let s of o)S(e,s.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function f(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}var E=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function v(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let i=await o.json();return a.set(r,i),i}if(e==="en"){a.set(r,void 0);return}let s=await v("en",t,n);return a.set(r,s),s}catch{a.set(r,void 0);return}}function _(e){let t=f(e,"lang",navigator.language||"en");if(E.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:E.has(n)?n:"en"}}var p=new WeakMap,m=new WeakMap,C=new WeakMap;async function B(e,t,n){m.set(e,t),p.set(e,x(e._hostElement,["lang"],()=>{b(e,n).catch(console.error);})),await b(e,n);}function q(e){p.get(e)?.disconnect(),p.delete(e),m.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=_(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=C.get(e);if(!o){let s=m.get(e)??"",i=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),l=`${s}/${i}/t9n`,u=`${i}.t9n.`;o=await v(r,l,u);}r!==e._t9nLocale&&(e._t9nLocale=r,e._t9nStrings=o,await t?.call(e));}
18
+ // ../components-utils/dist/index.js
19
+ var h = class {
20
+ constructor() {
21
+ this.resolve = () => {
22
+ }, this.reject = () => {
23
+ }, this.promise = new Promise((t, n) => {
24
+ this.resolve = t, this.reject = n;
25
+ });
26
+ }
27
+ };
28
+ function w(e, t) {
29
+ let n = e;
30
+ for (; n; ) {
31
+ if (n === t)
32
+ return true;
33
+ if (!n.parentNode)
34
+ return false;
35
+ n.parentNode instanceof ShadowRoot ? n = n.parentNode.host : n = n.parentNode;
36
+ }
37
+ return false;
38
+ }
39
+ function b(e, t, n) {
40
+ let { subscribe: r } = $(t);
41
+ return r((o) => {
42
+ o.some((s) => w(e, s.target)) && n();
43
+ });
44
+ }
45
+ var f = {};
46
+ function $(e) {
47
+ let t = e.join(","), n = f[t];
48
+ if (n !== void 0)
49
+ return n;
50
+ let r = /* @__PURE__ */ new Set(), o = new MutationObserver((s) => r.forEach((a) => a(s)));
51
+ o.observe(document.documentElement, { attributes: true, attributeFilter: e, subtree: true });
52
+ let i = { subscribe(s) {
53
+ return r.add(s), { remove: () => {
54
+ r.delete(s), r.size === 0 && (o.disconnect(), f[t] = void 0);
55
+ } };
56
+ } };
57
+ return f[t] = i, i;
58
+ }
59
+ function x(e, t) {
60
+ let n = e;
61
+ for (; n; ) {
62
+ let r = n.closest(t);
63
+ if (r)
64
+ return r;
65
+ let o = n.getRootNode();
66
+ if (o === document)
67
+ return null;
68
+ n = o.host;
69
+ }
70
+ return null;
71
+ }
72
+ function m(e, t, n) {
73
+ return x(e, `[${t}]`)?.getAttribute(t) ?? n;
74
+ }
75
+ var A = (e) => e.charAt(0).toUpperCase() + e.slice(1);
76
+ var T = (e) => A(e.replaceAll(/([a-z])([A-Z])/gu, "$1 $2"));
77
+ var v = /* @__PURE__ */ new Set(["ar", "bg", "bs", "ca", "cs", "da", "de", "el", "en", "es", "et", "fi", "fr", "he", "hr", "hu", "id", "it", "ja", "ko", "lt", "lv", "nl", "nb", "pl", "pt-BR", "pt-PT", "ro", "ru", "sk", "sl", "sr", "sv", "th", "tr", "uk", "vi", "zh-CN", "zh-HK", "zh-TW"]);
78
+ var g = "en";
79
+ async function j(e, t, n = "") {
80
+ let r = `${t}/${n}`, o = `${r}${e}.json`;
81
+ return u[o] ?? (u[o] = S(e, r)), await u[o];
82
+ }
83
+ var u = {};
84
+ async function S(e, t) {
85
+ let n = `${t}${e}.json`;
86
+ try {
87
+ let r = await fetch(n);
88
+ if (r.ok)
89
+ return await r.json();
90
+ } catch (r) {
91
+ return console.error(r), E;
92
+ }
93
+ return e === g ? E : await S(g, t);
94
+ }
95
+ var E = new Proxy({}, { get: (e, t) => T(t.toString()) });
96
+ function M(e) {
97
+ let t = m(e, "lang", navigator.language || g);
98
+ if (v.has(t))
99
+ return { lang: t, t9nLocale: t };
100
+ let n = t.slice(0, 2);
101
+ return { lang: t, t9nLocale: v.has(n) ? n : g };
102
+ }
103
+ function Y(e, t, n, r) {
104
+ let o, i = () => void P(e, t, r).then((s) => {
105
+ (o?.lang !== s.lang || o.t9nLocale !== s.t9nLocale || o.t9nStrings !== s.t9nStrings) && n(s), o = s;
106
+ }).catch(console.error);
107
+ return i(), b(e, ["lang"], i);
108
+ }
109
+ async function P(e, t, n = e.tagName.toLowerCase().replace("arcgis-", "")) {
110
+ let { lang: r, t9nLocale: o } = M(e), i = `${t}/${n}/t9n`, s = `${n}.t9n.`, a = await j(o, i, s);
111
+ return { lang: r, t9nLocale: o, t9nStrings: a };
112
+ }
113
+
114
+ // src/types.ts
115
+ var controllerSymbol = Symbol("controller");
116
+
117
+ // src/utils.ts
118
+ function safeCall(callback) {
119
+ try {
120
+ return callback?.();
121
+ } catch (error) {
122
+ console.error(error, callback);
123
+ }
124
+ return void 0;
125
+ }
126
+ async function safeAsyncCall(callback) {
127
+ try {
128
+ return await callback();
129
+ } catch (error) {
130
+ console.error(error, callback);
131
+ }
132
+ return void 0;
133
+ }
134
+ function extendObject(base, extend) {
135
+ Object.entries(extend).forEach(([key, value]) => {
136
+ if (key in base)
137
+ throw new Error(`Unable to extend object because property "${key}" is already defined`);
138
+ const thisBase = base;
139
+ thisBase[key] = value;
140
+ });
141
+ return base;
142
+ }
143
+ var isController = (value) => typeof value === "object" && value !== null && (controllerSymbol in value || "hostConnected" in value || "hostDisconnected" in value || "hostUpdate" in value || "hostUpdated" in value);
144
+
145
+ // src/ControllerInternals.ts
146
+ var ControllerInternals = class {
147
+ constructor() {
148
+ this._ambientControllers = [];
149
+ /**
150
+ * The type definition has to be duplicated due to the
151
+ * "'use' is referenced directly or indirectly in its own type annotation."
152
+ * error
153
+ */
154
+ this.use = async (value, watchExports) => {
155
+ const controller = this._useRefSync(value);
156
+ if (controller === void 0) {
157
+ if (typeof watchExports === "function") {
158
+ const error = new Error(
159
+ `Unable to resolve a controller from the provided value, so can't watch it's exports. ${unresolvableExports}`
160
+ );
161
+ console.error(error);
162
+ }
163
+ return value;
164
+ }
165
+ await controller.ready;
166
+ if (typeof watchExports === "function") {
167
+ if (controller.watchExports === void 0)
168
+ throw new Error(`The controller must implement watchExports method to support watching exports`);
169
+ const unsubscribe = controller.watchExports(
170
+ (exports) => watchExports(exports, unsubscribe)
171
+ );
172
+ }
173
+ return controller.exports;
174
+ };
175
+ this.useRef = async (value) => {
176
+ const controller = this._useRefSync(value);
177
+ if (controller === void 0)
178
+ throw new Error(`Unable to resolve a controller from the provided value. ${unresolvableExports}`);
179
+ await controller.ready;
180
+ return controller;
181
+ };
182
+ this.shouldBypassSetter = false;
183
+ /**
184
+ * A map from component instance or component element to component instance.
185
+ * To get from component instance or component element to component element,
186
+ * you can just use the .el property
187
+ */
188
+ this.elementToInstance = /* @__PURE__ */ new WeakMap();
189
+ }
190
+ /*
191
+ * Allow controllers to implicitly retrive which component they are in, to
192
+ * improve DX (avoids the need to pass "this" explicitly for each controller)
193
+ */
194
+ setAmbientComponent(component) {
195
+ if (this._ambientComponent === component)
196
+ return;
197
+ this._ambientComponent = component;
198
+ queueMicrotask(() => {
199
+ if (this._ambientComponent === component)
200
+ this._ambientComponent = void 0;
201
+ });
202
+ }
203
+ retriveComponent(name) {
204
+ if (this._ambientComponent === void 0)
205
+ throw new Error(
206
+ [
207
+ `Unable to find out which component ${name || "this"} controller `,
208
+ "belongs to. This might happen if you tried to create a controller ",
209
+ "outside the component. If so, please wrap your controller ",
210
+ "definition in an arrow function, ",
211
+ "`const myController = ()=>makeController(...);` and call that",
212
+ "function inside the component `my = myController();`, or ",
213
+ "define your controller using makeGenericController/GenericController ",
214
+ "instead.\n",
215
+ "If you wish to use a controller inside an async controller, ",
216
+ "make sure you are using controller.use.\n",
217
+ "You might also have multiple instances of Controllers loaded"
218
+ ].join("\n")
219
+ );
220
+ return this._ambientComponent;
221
+ }
222
+ /*
223
+ * Aids proxyExports() in knowing who is it's host
224
+ */
225
+ setParentController(controller) {
226
+ if (controller === void 0) {
227
+ this._ambientControllers = [];
228
+ return;
229
+ }
230
+ const index = this._ambientControllers.indexOf(controller);
231
+ this._ambientControllers = index === -1 ? [...this._ambientControllers, controller] : this._ambientControllers.slice(0, index + 1);
232
+ queueMicrotask(() => {
233
+ this._ambientControllers = [];
234
+ });
235
+ }
236
+ retriveParentControllers() {
237
+ return this._ambientControllers;
238
+ }
239
+ /*
240
+ * Aids controller.use in retrieving controller value when it receives
241
+ * controller exports, rather than the controller itself
242
+ */
243
+ setAmbientChildController(controller) {
244
+ if (this._ambientChildController === controller)
245
+ return;
246
+ this._ambientChildController = controller;
247
+ queueMicrotask(() => {
248
+ if (this._ambientChildController === controller)
249
+ this._ambientChildController = void 0;
250
+ });
251
+ }
252
+ retriveAmbientChildController() {
253
+ const controller = this._ambientChildController;
254
+ this._ambientChildController = void 0;
255
+ return controller;
256
+ }
257
+ /**
258
+ * Try to resolve a controller, without awaiting it's load
259
+ */
260
+ _useRefSync(value) {
261
+ const ambientChildController = this.retriveAmbientChildController();
262
+ if (ambientChildController !== void 0)
263
+ return ambientChildController;
264
+ const component = Controller.internals.retriveComponent();
265
+ const controller = component.manager.internals.resolveExports(value);
266
+ if (controller !== void 0)
267
+ return controller;
268
+ if (isController(value))
269
+ return value;
270
+ return void 0;
271
+ }
272
+ };
273
+ var unresolvableExports = [
274
+ "The value you passed is not a controller and not a controller exports. If ",
275
+ "your controller exports a literal value, try making your controller export ",
276
+ "an object instead"
277
+ ].join("");
278
+
279
+ // src/stencil.ts
280
+ function retrieveComponentMeta(component) {
281
+ const constructor = component.constructor;
282
+ const meta = constructor.__registerControllers?.(component)?.$cmpMeta$ ?? void 0;
283
+ constructor.__registerControllers = void 0;
284
+ if (typeof meta !== "object")
285
+ throw new Error(
286
+ "Failed to retrive internal component meta. Make sure you have the useComponentsControllers() Rollup Plugin for Stencil Controllers configured in your Stencil config."
287
+ );
288
+ component.manager.internals.meta = meta;
289
+ }
290
+ function parsePropertyValue(value, type = 0) {
291
+ if (value == null || typeof type !== "number")
292
+ return value;
293
+ if ((type & 4 /* Boolean */) !== 0)
294
+ return value === "false" ? false : value === "" || !!value;
295
+ else if ((type & 2 /* Number */) !== 0)
296
+ return Number.parseFloat(value.toString());
297
+ else if ((type & 1 /* String */) !== 0)
298
+ return String(value);
299
+ else
300
+ return value;
301
+ }
302
+ var makeMemberFilter = (filter) => (component) => {
303
+ const meta = component.manager.internals.meta;
304
+ return Object.entries(meta.$members$ ?? {}).filter(([_name, [propType]]) => (propType & filter) !== 0).map(([name]) => name);
305
+ };
306
+ var getPropLikeMembers = makeMemberFilter(63 /* PropLike */);
307
+ var getMemberType = (component, name) => component.manager.internals.meta.$members$?.[name]?.[0];
308
+ function getPropType(component, name) {
309
+ const type = getMemberType(component, name);
310
+ if (type === void 0)
311
+ return void 0;
312
+ else if (type & 32 /* State */)
313
+ return "state";
314
+ else
315
+ return "prop";
316
+ }
317
+ function addPropertyWatcher(component, property) {
318
+ const meta = component.manager.internals.meta;
319
+ meta.$watchers$ ?? (meta.$watchers$ = {});
320
+ const watchers = meta.$watchers$;
321
+ if (!(property in watchers))
322
+ watchers[property] = [];
323
+ if (!watchers[property].includes(watcherCallbackName))
324
+ watchers[property].push(watcherCallbackName);
325
+ }
326
+ var watcherCallbackName = "dynamicWatcherCallback";
327
+
328
+ // src/Controller.ts
329
+ var _a;
330
+ var _Controller = class _Controller {
331
+ constructor(component) {
332
+ this._ready = new h();
333
+ this._lifecycleDisconnected = [];
334
+ this.connectedCalled = false;
335
+ this.willLoadCalled = false;
336
+ this.didLoadCalled = false;
337
+ this[_a] = true;
338
+ this.ready = this._ready.promise;
339
+ /*
340
+ * Setting default exports to "this" so that controllers that don't use
341
+ * exports/proxyExports(), could still be used as if they did
342
+ * (i.e with controller.use)
343
+ */
344
+ this._exports = makeProvisionalValue(this);
345
+ this._exportWatchers = /* @__PURE__ */ new Set();
346
+ const resolvedComponent = toControllerHost(
347
+ component ?? _Controller.internals.retriveComponent(new.target.name)
348
+ );
349
+ Object.defineProperty(this, "component", {
350
+ writable: false,
351
+ enumerable: false,
352
+ configurable: true,
353
+ value: resolvedComponent
354
+ });
355
+ this.component.addController(this);
356
+ const manager = this.component.manager;
357
+ this.connected = manager?.connected;
358
+ this.internals = manager?.internals;
359
+ _Controller.internals.setParentController(this);
360
+ if ("hostDestroy" in this)
361
+ this.component.manager.ensureHasDestroy();
362
+ if (manager !== void 0)
363
+ queueMicrotask(() => this.catchUpLifecycle());
364
+ const controller = this;
365
+ this._callbacks = {
366
+ hostConnected: "hostConnected" in this ? [() => controller.hostConnected?.()] : [],
367
+ hostDisconnected: "hostDisconnected" in this ? [() => controller.hostDisconnected?.()] : [],
368
+ hostLoad: "hostLoad" in this ? [() => controller.hostLoad?.()] : [],
369
+ hostLoaded: "hostLoaded" in this ? [() => controller.hostLoaded?.()] : [],
370
+ hostRender: "hostRender" in this ? [() => controller.hostRender?.()] : [],
371
+ hostRendered: "hostRendered" in this ? [() => controller.hostRendered?.()] : [],
372
+ hostUpdate: "hostUpdate" in this ? [() => controller.hostUpdate?.()] : [],
373
+ hostUpdated: "hostUpdated" in this ? [() => controller.hostUpdated?.()] : [],
374
+ hostDestroy: "hostDestroy" in this ? [() => controller.hostDestroy?.()] : [],
375
+ hostLifecycle: "hostLifecycle" in this ? [() => controller.hostLifecycle?.()] : []
376
+ };
377
+ }
378
+ /**
379
+ * If controller is being added dynamically, after the component
380
+ * construction, then trigger connected and load right away
381
+ */
382
+ catchUpLifecycle() {
383
+ if (this.connectedCalled)
384
+ return;
385
+ this.triggerConnected();
386
+ this.triggerLoad().then(() => this.triggerLoaded()).catch(console.error);
387
+ }
388
+ get exports() {
389
+ return this._exports;
390
+ }
391
+ /**
392
+ * Set controller's exports property (for usage with proxyExports()) and mark
393
+ * controller as ready (for usage in other controllers). Also, triggers
394
+ * re-render of the component
395
+ */
396
+ set exports(exports) {
397
+ if (this._exports !== exports) {
398
+ this._exports = exports;
399
+ if (this.connectedCalled)
400
+ this.component.requestUpdate();
401
+ this._exportWatchers.forEach((callback) => callback(exports));
402
+ }
403
+ this._ready.resolve(exports);
404
+ }
405
+ setProvisionalExports(exports) {
406
+ this._exports = makeProvisionalValue(exports);
407
+ this._exportWatchers.forEach((callback) => callback(this._exports));
408
+ }
409
+ watchExports(callback) {
410
+ const safeCallback = (exports) => safeCall(() => callback(exports));
411
+ this._exportWatchers.add(safeCallback);
412
+ return () => void this._exportWatchers.delete(safeCallback);
413
+ }
414
+ /**
415
+ * A flexible utility for making sure a controller is loaded before it's used,
416
+ * regardless of how or where a controller was defined:
417
+ *
418
+ * @example
419
+ * makeGenericController(async (component, controller) => {
420
+ * // Await some controller from the component:
421
+ * await controller.use(component.someController);
422
+ * // Initialize new controllers
423
+ * await controller.use(load(importCoreReactiveUtils));
424
+ * await controller.use(new ViewModelController(component,newWidgetsHomeHomeViewModel));
425
+ * await controller.use(someController(component));
426
+ * });
427
+ *
428
+ * @remarks
429
+ * If your controller is not async, and you are not creating it async, then
430
+ * you are not required to use controller.use - you can use it directly.
431
+ * Similarly, accessing controllers after componentWillLoad callback does not
432
+ * require awaiting them as they are guaranteed to be loaded by then.
433
+ */
434
+ get use() {
435
+ _Controller.internals.setAmbientComponent(this.component);
436
+ return _Controller.internals.use;
437
+ }
438
+ /**
439
+ * Just like controller.use, but returns the controller itself, rather than it's
440
+ * exports
441
+ *
442
+ * Use cases:
443
+ * - You have a controller and you want to make sure it's loaded before you
444
+ * try to use it
445
+ * - Your contoller is not using exports, so you wish to access some props on
446
+ * it directly
447
+ * - You have a controller exports only, and you want to retrieve the
448
+ * controller itself. This is useful if you wish to call .watchExports() or
449
+ * some other method on the controller
450
+ */
451
+ get useRef() {
452
+ _Controller.internals.setAmbientComponent(this.component);
453
+ return _Controller.internals.useRef;
454
+ }
455
+ /**
456
+ * If you need to set a prop/state without triggering the custom setter you
457
+ * defined with getSet()/dynamicGetSet()/readonly(), set the value inside
458
+ * of this function
459
+ *
460
+ * @example
461
+ * @Prop({mutable:true}) readOnly = this.manager.readOnly(true);
462
+ *
463
+ * someAction(): void {
464
+ * this.manager.bypassSetter(()=>{
465
+ * this.readOnly = false;
466
+ * });
467
+ * }
468
+ *
469
+ */
470
+ bypassSetter(callback) {
471
+ _Controller.internals.shouldBypassSetter = true;
472
+ const result = safeCall(callback);
473
+ _Controller.internals.shouldBypassSetter = false;
474
+ return result;
475
+ }
476
+ /**
477
+ * Like this.manager.getSet(), but can be called on any component's
478
+ * state/prop from anywhere, rather than just from the default value
479
+ */
480
+ dynamicGetSet(name, getSet) {
481
+ this.genericGetSet(name, getSet);
482
+ }
483
+ /**
484
+ * Like dynamicGetSet, but less type-safe. Useful in cases when trying to set
485
+ * getters/setters in place where property names & types are not known
486
+ * statically
487
+ */
488
+ genericGetSet(property, getSet) {
489
+ var _a2, _b;
490
+ const classPrototype = Object.getPrototypeOf(this.component);
491
+ this.internals.getSetProxy(classPrototype, property, getSet, "class");
492
+ const htmlPrototype = Object.getPrototypeOf(this.component.el);
493
+ if (classPrototype !== htmlPrototype)
494
+ this.internals.getSetProxy(htmlPrototype, property, getSet, "html");
495
+ const genericGetSet = getSet;
496
+ if (genericGetSet.get !== void 0) {
497
+ (_a2 = this.internals.getters)[property] ?? (_a2[property] = []);
498
+ if (getSet.order === "last")
499
+ this.internals.getters[property].splice(-1, 0, genericGetSet.get);
500
+ else
501
+ this.internals.getters[property].unshift(genericGetSet.get);
502
+ }
503
+ if (genericGetSet.set !== void 0) {
504
+ (_b = this.internals.setters)[property] ?? (_b[property] = []);
505
+ if (getSet.order === "last")
506
+ this.internals.setters[property].splice(-1, 0, genericGetSet.set);
507
+ else
508
+ this.internals.setters[property].unshift(genericGetSet.set);
509
+ }
510
+ }
511
+ // FEATURE: improve typings
512
+ /**
513
+ * Dynamically set a watcher for any @Prop()/@State() property
514
+ */
515
+ watch(property, callback) {
516
+ var _a2;
517
+ const type = getMemberType(this.component, property);
518
+ if (type === void 0)
519
+ throw new Error(
520
+ `Trying to watch a non-@Prop, non-@State property "${property}". Either convert it into a @State() or use manager.getSet/dynamicGetSet`
521
+ );
522
+ addPropertyWatcher(this.component, property);
523
+ (_a2 = this.internals.watchers)[property] ?? (_a2[property] = []);
524
+ const watchers = this.internals.watchers[property];
525
+ const genericCallback = callback;
526
+ const safeCallback = (newValue, oldValue, propertyName) => safeCall(() => genericCallback(newValue, oldValue, propertyName));
527
+ watchers.push(safeCallback);
528
+ return () => {
529
+ const index = watchers.indexOf(safeCallback);
530
+ if (index !== -1)
531
+ watchers.splice(index, 1);
532
+ };
533
+ }
534
+ // Register a lifecycle callback
535
+ onConnected(callback) {
536
+ this._callbacks.hostConnected.push(callback);
537
+ }
538
+ onDisconnected(callback) {
539
+ this._callbacks.hostDisconnected.push(callback);
540
+ }
541
+ onLoad(callback) {
542
+ this._callbacks.hostLoad.push(callback);
543
+ }
544
+ onLoaded(callback) {
545
+ this._callbacks.hostLoaded.push(callback);
546
+ }
547
+ onRender(callback) {
548
+ this._callbacks.hostRender.push(callback);
549
+ }
550
+ onRendered(callback) {
551
+ this._callbacks.hostRendered.push(callback);
552
+ }
553
+ onUpdate(callback) {
554
+ this._callbacks.hostUpdate.push(callback);
555
+ }
556
+ onUpdated(callback) {
557
+ this._callbacks.hostUpdated.push(callback);
558
+ }
559
+ onDestroy(callback) {
560
+ this.component.manager.ensureHasDestroy();
561
+ this._callbacks.hostDestroy.push(callback);
562
+ }
563
+ onLifecycle(callback) {
564
+ this._callbacks.hostLifecycle.push(callback);
565
+ if (this.connectedCalled && this.component.el.isConnected)
566
+ this._callLifecycle(callback);
567
+ }
568
+ // Call each lifecycle hook
569
+ triggerConnected() {
570
+ this._callbacks.hostConnected.forEach(safeCall);
571
+ this.triggerLifecycle();
572
+ this.connectedCalled = true;
573
+ }
574
+ triggerDisconnected() {
575
+ this._callbacks.hostDisconnected.forEach(safeCall);
576
+ this._lifecycleDisconnected.forEach(safeCall);
577
+ this._lifecycleDisconnected = [];
578
+ }
579
+ async triggerLoad() {
580
+ if (this.willLoadCalled)
581
+ return;
582
+ this.willLoadCalled = true;
583
+ if (this._callbacks.hostLoad.length > 0)
584
+ await Promise.allSettled(this._callbacks.hostLoad.map(safeAsyncCall));
585
+ this._ready.resolve(this._exports);
586
+ }
587
+ triggerLoaded() {
588
+ if (this.didLoadCalled)
589
+ return;
590
+ this._callbacks.hostLoaded.forEach(safeCall);
591
+ this.didLoadCalled = true;
592
+ }
593
+ async triggerRender() {
594
+ if (this._callbacks.hostRender.length > 0)
595
+ await Promise.allSettled(this._callbacks.hostRender.map(safeAsyncCall));
596
+ }
597
+ triggerRendered() {
598
+ this._callbacks.hostRendered.forEach(safeCall);
599
+ }
600
+ async triggerUpdate() {
601
+ if (this._callbacks.hostUpdate.length > 0)
602
+ await Promise.allSettled(this._callbacks.hostUpdate.map(safeAsyncCall));
603
+ }
604
+ triggerUpdated() {
605
+ this._callbacks.hostUpdated.forEach(safeCall);
606
+ }
607
+ triggerDestroy() {
608
+ this._callbacks.hostDestroy.forEach(safeCall);
609
+ }
610
+ triggerLifecycle() {
611
+ this._callbacks.hostLifecycle.forEach((callback) => this._callLifecycle(callback));
612
+ }
613
+ _callLifecycle(callback) {
614
+ const cleanupRaw = safeCall(callback);
615
+ const cleanup = Array.isArray(cleanupRaw) ? cleanupRaw : [cleanupRaw];
616
+ cleanup.forEach((cleanup2) => {
617
+ if (typeof cleanup2 === "function")
618
+ this._lifecycleDisconnected.push(cleanup2);
619
+ else if (typeof cleanup2 === "object" && typeof cleanup2.remove === "function")
620
+ this._lifecycleDisconnected.push(cleanup2.remove);
621
+ });
622
+ }
623
+ };
624
+ _a = controllerSymbol;
625
+ _Controller.internals = new ControllerInternals();
626
+ var Controller = _Controller;
627
+ var GenericController = class extends Controller {
628
+ // Redundant constructor needed to improve typing
629
+ constructor(component) {
630
+ super(component);
631
+ }
632
+ // Overriding super's watch only to improve typing
633
+ watch(property, callback) {
634
+ return super.watch(
635
+ property,
636
+ callback
637
+ );
638
+ }
639
+ /**
640
+ * Silence "Property 'dynamicGetSet' in type
641
+ * 'GenericController<Exports, Requires>' is not assignable to the same
642
+ * property in base type 'Controller<Exports>'", as TypeScript is being overly
643
+ * conservative here with what it allows
644
+ */
645
+ dynamicGetSet(property, getSet) {
646
+ super.genericGetSet(property, getSet);
647
+ }
648
+ };
649
+ function makeProvisionalValue(base) {
650
+ if (typeof base !== "object" && typeof base !== "function" || base === null)
651
+ return base;
652
+ const proxy3 = new Proxy(base, {
653
+ get(target, prop, receiver) {
654
+ if (cyclical.has(prop) && prop in target && target[prop] === proxy3)
655
+ return void 0;
656
+ if (prop in target || promiseMethods.has(prop) || typeof prop === "symbol")
657
+ return typeof target === "function" ? target[prop] : Reflect.get(target, prop, receiver);
658
+ console.error(`Trying to access "${prop.toString()}" on the controller before it's loaded. ${accessBeforeLoad}`);
659
+ return void 0;
660
+ },
661
+ set(target, prop, newValue, reciever) {
662
+ console.error(`Trying to set "${prop.toString()}" on the controller before it's loaded. ${accessBeforeLoad}`);
663
+ return Reflect.set(target, prop, newValue, reciever);
664
+ }
665
+ });
666
+ return proxy3;
667
+ }
668
+ var promiseMethods = /* @__PURE__ */ new Set(["then", "catch", "finally"]);
669
+ var cyclical = /* @__PURE__ */ new Set(["exports", "_exports"]);
670
+ var accessBeforeLoad = [
671
+ "This might be the case if you are trying to access an async controller in ",
672
+ "connectedCallback(). Or, if you are using it inside of ",
673
+ "componentWillLoad()/another controller without controller.use. Example correct ",
674
+ "usage:\n",
675
+ "makeController(async (component, controller)=>{ await controller.use(someOtherController); });"
676
+ ].join("");
677
+ function toControllerHost(component) {
678
+ if ("addController" in component)
679
+ return component;
680
+ else
681
+ throw new Error(
682
+ "Component does not implement ControllerHost. This might be because you forgot to add 'manager: Controller<this> = useControllerManager(this);' in your component, or you tried to use some controller before that line"
683
+ );
684
+ }
685
+
686
+ // src/trackPropertyKey.ts
687
+ function trackPropertyKey(object, onResolved, defaultValue) {
688
+ const keys = Object.keys(object);
689
+ const keyCount = keys.length;
690
+ if (keyTrackMap === void 0)
691
+ queueMicrotask(keyTrackResolve);
692
+ keyTrackMap ?? (keyTrackMap = /* @__PURE__ */ new Map());
693
+ let pendingTrackers = keyTrackMap.get(object);
694
+ if (pendingTrackers === void 0) {
695
+ pendingTrackers = { callbacks: [], keyCount };
696
+ keyTrackMap.set(object, pendingTrackers);
697
+ }
698
+ if (pendingTrackers.keyCount !== keyCount) {
699
+ pendingTrackers.callbacks.forEach((resolve) => resolve(keys));
700
+ pendingTrackers.callbacks = [];
701
+ pendingTrackers.keyCount = keyCount;
702
+ }
703
+ pendingTrackers.callbacks.push((keys2) => {
704
+ const key = keys2[keyCount];
705
+ if (key === void 0)
706
+ onResolved(void 0);
707
+ else if (object[key] === defaultValue)
708
+ onResolved(key);
709
+ else
710
+ onResolved(void 0);
711
+ });
712
+ return defaultValue;
713
+ }
714
+ var keyTrackMap = void 0;
715
+ function keyTrackResolve() {
716
+ Array.from(keyTrackMap?.entries() ?? []).forEach(([object, { callbacks }]) => {
717
+ const keys = Object.keys(object);
718
+ callbacks.forEach((commit) => commit(keys));
719
+ });
720
+ keyTrackMap = void 0;
721
+ }
722
+
723
+ // src/ComponentInternals.ts
724
+ var ComponentInternals = class {
725
+ constructor(component) {
726
+ this.trackKey = (hostsCandidates, onResolved, defaultValue) => {
727
+ const candidateHosts = Array.isArray(hostsCandidates) ? hostsCandidates : [hostsCandidates];
728
+ let leftToResolve = candidateHosts.length + 1;
729
+ const resolved = (resolution) => {
730
+ leftToResolve -= 1;
731
+ if (resolution !== void 0)
732
+ leftToResolve = 0;
733
+ if (leftToResolve === 0)
734
+ onResolved(resolution);
735
+ };
736
+ candidateHosts.forEach(
737
+ (host) => this.component.manager.trackPropertyKey(
738
+ host,
739
+ (key) => resolved(
740
+ key === void 0 ? void 0 : {
741
+ key,
742
+ host,
743
+ type: "property",
744
+ domValue: void 0
745
+ }
746
+ ),
747
+ defaultValue
748
+ )
749
+ );
750
+ this.component.manager.trackPropKey((key, domValue) => {
751
+ const propType = key === void 0 ? void 0 : getPropType(this.component, key);
752
+ resolved(
753
+ key === void 0 ? void 0 : {
754
+ key,
755
+ host: this.component,
756
+ type: propType ?? "prop",
757
+ domValue: propType === "prop" ? domValue : void 0
758
+ }
759
+ );
760
+ }, defaultValue);
761
+ return defaultValue;
762
+ };
763
+ this.trackPropKey = (onResolved, defaultValue) => {
764
+ if (this._trackedValue !== nothing && this._trackedValue !== defaultValue)
765
+ this._firePropertyTrackers(void 0, void 0, void 0);
766
+ if (this._keyTrackers.length === 0)
767
+ queueMicrotask(() => this._firePropertyTrackers(void 0, void 0, void 0));
768
+ this._trackedValue = defaultValue;
769
+ this._keyTrackers.push(
770
+ (key, value, previousValue) => onResolved(defaultValue === value ? key : void 0, previousValue)
771
+ );
772
+ return defaultValue;
773
+ };
774
+ this._trackedValue = nothing;
775
+ this._keyTrackers = [];
776
+ this.getters = {};
777
+ this.setters = {};
778
+ this._exports = /* @__PURE__ */ new WeakMap();
779
+ Object.defineProperty(this, "component", {
780
+ writable: false,
781
+ enumerable: false,
782
+ configurable: true,
783
+ value: component
784
+ });
785
+ }
786
+ _firePropertyTrackers(key, value, oldValue) {
787
+ const trackers = this._keyTrackers;
788
+ this._trackedValue = nothing;
789
+ this._keyTrackers = [];
790
+ trackers.forEach((tracker) => tracker(key, value, oldValue));
791
+ }
792
+ /**
793
+ * Configure a getter or setter for a given @Prop/@State. Note, since props
794
+ * are defined on the prototype, they are shared between all instances of a
795
+ * component. Thus instead of passing function reference to
796
+ * Object.defineProperty, we use instance-owned getters and setters array.
797
+ */
798
+ getSetProxy(prototype, name, {
799
+ get,
800
+ set
801
+ }, type) {
802
+ const component = this.component;
803
+ const propType = getMemberType(component, name);
804
+ const descriptor = Object.getOwnPropertyDescriptor(prototype, name);
805
+ const tolerateNotFound = type === "html";
806
+ if (descriptor?.set === void 0 || descriptor.get === void 0)
807
+ if (descriptor !== void 0 && "value" in descriptor)
808
+ throw new Error(
809
+ `getSet() should only be used on Stencil's @Prop and @State properties. For internal component properties, use regular get/set syntax. Tried to use it on "${name}" in ${component.el.tagName}`
810
+ );
811
+ else if (tolerateNotFound)
812
+ return;
813
+ else
814
+ throw new Error(`Unable to find "${name}" property on the ${component.el.tagName} component`);
815
+ const { get: originalGet, set: originalSet } = descriptor;
816
+ const isGetterAlreadyOverwritten = customAccessor in originalGet;
817
+ const isSetterAlreadyOverwritten = customAccessor in originalSet;
818
+ const shouldOverwriteGet = !isGetterAlreadyOverwritten && typeof get === "function";
819
+ const shouldOverwriteSet = !isSetterAlreadyOverwritten && typeof set === "function";
820
+ if (!shouldOverwriteGet && !shouldOverwriteSet)
821
+ return;
822
+ const finalGetter = shouldOverwriteGet ? function getter() {
823
+ let value = originalGet.call(this);
824
+ const component2 = Controller.internals.elementToInstance.get(this);
825
+ const getters = component2?.manager.internals.getters[name] ?? [];
826
+ for (let i = 0; i < getters.length; i++)
827
+ value = getters[i](value, name);
828
+ return value;
829
+ } : originalGet;
830
+ const finalSetter = shouldOverwriteSet ? function setter(rawNewValue) {
831
+ if (Controller.internals.shouldBypassSetter) {
832
+ originalSet.call(this, rawNewValue);
833
+ return;
834
+ }
835
+ const oldValue = originalGet.call(this);
836
+ let newValue = parsePropertyValue(rawNewValue, propType);
837
+ const component2 = Controller.internals.elementToInstance.get(this);
838
+ const internals = component2?.manager.internals;
839
+ if (newValue === oldValue)
840
+ originalSet.call(this, rawNewValue);
841
+ else {
842
+ const setters = internals?.setters[name] ?? [];
843
+ for (let i = 0; i < setters.length; i++)
844
+ newValue = setters[i](newValue, oldValue, name);
845
+ originalSet.call(this, newValue);
846
+ }
847
+ if ((internals?._keyTrackers.length ?? 0) > 0)
848
+ internals?._firePropertyTrackers(name, rawNewValue, oldValue);
849
+ } : originalSet;
850
+ if (shouldOverwriteGet)
851
+ Object.defineProperty(finalGetter, customAccessor, { value: true });
852
+ if (shouldOverwriteSet)
853
+ Object.defineProperty(finalSetter, customAccessor, { value: true });
854
+ Object.defineProperty(prototype, name, {
855
+ ...descriptor,
856
+ get: finalGetter,
857
+ set: finalSetter
858
+ });
859
+ }
860
+ /**
861
+ * Associate an exports object with a controller for reverse lookup in
862
+ * controller.use
863
+ */
864
+ markExports(controller, exports) {
865
+ if (typeof exports === "object" && exports !== null || typeof exports === "function")
866
+ this._exports.set(exports, controller);
867
+ }
868
+ resolveExports(exports) {
869
+ if (typeof exports === "object" && exports !== null || typeof exports === "function")
870
+ return this._exports.get(exports);
871
+ else
872
+ return void 0;
873
+ }
874
+ };
875
+ var customAccessor = Symbol("controllersCustomAccessor");
876
+ var nothing = Symbol("nothing");
877
+
878
+ // ../core-adapter/dist/index.js
879
+ var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
880
+ function isDefaultModule(module) {
881
+ return module.default !== void 0;
882
+ }
883
+ async function importCoreAccessor() {
884
+ if (isAMD) {
885
+ return await window.$arcgis.import("esri/core/Accessor");
886
+ }
887
+ const module = await import('./Accessor-YDTURKZ7.js');
888
+ return isDefaultModule(module) ? module.default : module;
889
+ }
890
+ async function importCoreAccessorSupportDecorators() {
891
+ if (isAMD) {
892
+ return await window.$arcgis.import("esri/core/accessorSupport/decorators");
893
+ }
894
+ const module = await import('./decorators-443AWDOE.js');
895
+ return isDefaultModule(module) ? module.default : module;
896
+ }
897
+
898
+ // src/accessorIntegration.ts
899
+ var accessorPromise = Promise.all([importCoreAccessor(), importCoreAccessorSupportDecorators()]);
900
+ async function accessorIntegration(component) {
901
+ let accessor = void 0;
902
+ const getSet = {
903
+ get: (value, propertyName) => {
904
+ const accessorValue = accessor?.[propertyName];
905
+ return value ?? accessorValue;
906
+ },
907
+ set: (newValue, oldValue, propertyName) => {
908
+ if (accessor !== void 0)
909
+ accessor[propertyName] = newValue;
910
+ return newValue;
911
+ }
912
+ };
913
+ const members = getPropLikeMembers(component);
914
+ members.forEach((member) => component.manager.genericGetSet(member, getSet));
915
+ const [Accessor, { subclass, property }] = await accessorPromise;
916
+ return () => {
917
+ class AccessorSubclass extends Accessor {
918
+ }
919
+ members.forEach(
920
+ (name) => property({
921
+ value: component[name]
922
+ })(AccessorSubclass.prototype, name)
923
+ );
924
+ const Subclass = subclass(component.el.tagName)(AccessorSubclass);
925
+ accessor = new Subclass();
926
+ };
927
+ }
928
+
929
+ // src/ControllerManager.ts
930
+ var useControllerManager = (component) => new ControllerManager(component);
931
+ var ControllerManager = class extends GenericController {
932
+ constructor(component) {
933
+ const controllers = /* @__PURE__ */ new Set();
934
+ const watchers = {};
935
+ const controllerHost = {
936
+ addController: (controller) => {
937
+ controllers.add(controller);
938
+ },
939
+ [watcherCallbackName]: (newValue, oldValue, propertyName) => {
940
+ watchers[propertyName]?.forEach((callback) => callback(newValue, oldValue, propertyName));
941
+ },
942
+ removeController: (controller) => {
943
+ controllers.delete(controller);
944
+ },
945
+ requestUpdate: () => forceUpdate(component)
946
+ };
947
+ extendObject(component, controllerHost);
948
+ super(component);
949
+ this._connected = new h();
950
+ this.internals = new ComponentInternals(this.component);
951
+ this.connected = this._connected.promise;
952
+ this.hasDestroy = false;
953
+ this.destroyed = false;
954
+ this._updatePromise = new h();
955
+ this._originalLifecycles = {};
956
+ /**
957
+ * A magical solution to finding out what property name a given controller
958
+ * on a given object was assigned to. Note, this does not work for properties
959
+ * that have \@Prop() or \@State() decorator - for those, use
960
+ * manager.trackPropKey() instead.
961
+ *
962
+ * @example
963
+ * function trackMe<T>(defaultValue:T, component:BaseComponent):T {
964
+ * component.manager.trackPropertyKey(component, (key)=>console.log(key), defaultValue);
965
+ * return defaultValue;
966
+ * }
967
+ *
968
+ * class MyComponent extends BaseComponent {
969
+ * // Will console log "myProp"
970
+ * myProp = trackMe('a', this);
971
+ * }
972
+ *
973
+ */
974
+ this.trackPropertyKey = trackPropertyKey;
975
+ /**
976
+ * Like manager.trackPropertyKey(), but for props that have \@State() or \@Prop()
977
+ * decorator
978
+ *
979
+ * @example
980
+ * function trackMe(component:BaseComponent) {
981
+ * component.manager.trackPropKey((key)=>console.log(key));
982
+ * }
983
+ *
984
+ * class MyComponent extends BaseComponent {
985
+ * // Will console log "myProp"
986
+ * @Prop() myProp = trackMe(this);
987
+ *
988
+ * // Will console log "myState"
989
+ * @State() myState = trackMe(this);
990
+ * }
991
+ */
992
+ this.trackPropKey = this.internals.trackPropKey;
993
+ /**
994
+ * A combination of trackPropertyKey() and trackPropKey(). For usage when
995
+ * you want to track a property, but don't know if it will be defined with the
996
+ * \@Prop() decorator or not
997
+ */
998
+ this.trackKey = this.internals.trackKey;
999
+ this.component.manager = this;
1000
+ retrieveComponentMeta(component);
1001
+ this._controllers = controllers;
1002
+ this.internals.watchers = watchers;
1003
+ this.exports = void 0;
1004
+ this.hasDestroy = "preserveOnDisconnect" in this.component && typeof this.component.destroy === "function";
1005
+ if (this.hasDestroy)
1006
+ this.watch("preserveOnDisconnect", () => this._preserveOnDisconnectWatcher());
1007
+ this._bindLifecycleMethods();
1008
+ Object.defineProperty(component, "updateComplete", {
1009
+ get: async () => await this._updatePromise.promise
1010
+ });
1011
+ this.component.addController(this);
1012
+ this._accessorIntegrationReady = accessorIntegration(this.component);
1013
+ Controller.internals.setParentController(void 0);
1014
+ Controller.internals.setAmbientComponent(component);
1015
+ Controller.internals.elementToInstance.set(component.el, component);
1016
+ Controller.internals.elementToInstance.set(component, component);
1017
+ }
1018
+ _bindLifecycleMethods() {
1019
+ const component = this.component;
1020
+ this._originalLifecycles = {
1021
+ connectedCallback: component.connectedCallback,
1022
+ disconnectedCallback: component.disconnectedCallback,
1023
+ componentWillLoad: component.componentWillLoad,
1024
+ componentDidLoad: component.componentDidLoad,
1025
+ componentWillRender: component.componentWillRender,
1026
+ componentDidRender: component.componentDidRender,
1027
+ componentWillUpdate: component.componentWillUpdate,
1028
+ componentDidUpdate: component.componentDidUpdate,
1029
+ destroy: component.destroy
1030
+ };
1031
+ component.connectedCallback = this._connectedCallback.bind(this);
1032
+ component.disconnectedCallback = this._disconnectedCallback.bind(this);
1033
+ component.componentWillLoad = this._componentWillLoad.bind(this);
1034
+ component.componentDidLoad = this._componentDidLoad.bind(this);
1035
+ component.componentWillRender = this._componentWillRender.bind(this);
1036
+ component.componentDidRender = this._componentDidRender.bind(this);
1037
+ component.componentWillUpdate = this._componentWillUpdate.bind(this);
1038
+ component.componentDidUpdate = this._componentDidUpdate.bind(this);
1039
+ if (this.hasDestroy)
1040
+ component.destroy = this.destroy.bind(this);
1041
+ }
1042
+ /**
1043
+ * Throws an error if component does not implement destroy() lifecycle, but
1044
+ * tries to use it.
1045
+ */
1046
+ ensureHasDestroy() {
1047
+ if (!this.hasDestroy)
1048
+ throw new Error(destroyErrorMessage);
1049
+ }
1050
+ /**
1051
+ * Private because this is not supposed to be called by Component directly.
1052
+ * Instead, _bindLifecycleMethods will take care of that. Otherwise, you risk
1053
+ * calling lifecycle methods twice.
1054
+ */
1055
+ _connectedCallback() {
1056
+ if (this.destroyed) {
1057
+ const tagName = this.component.el.tagName.toLowerCase();
1058
+ this.component.el.remove();
1059
+ throw new Error(
1060
+ `The ${tagName} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the preserveOnDisconnect prop.`
1061
+ );
1062
+ }
1063
+ keyTrackResolve();
1064
+ this._connected.resolve();
1065
+ this._controllers.forEach(
1066
+ (controller) => "triggerConnected" in controller ? controller.triggerConnected() : safeCall(() => controller.hostConnected?.())
1067
+ );
1068
+ this._originalLifecycles.connectedCallback?.call(this.component);
1069
+ }
1070
+ _disconnectedCallback() {
1071
+ if (this.destroyed)
1072
+ return;
1073
+ this._controllers.forEach(
1074
+ (controller) => "triggerDisconnected" in controller ? controller.triggerDisconnected() : safeCall(() => controller.hostDisconnected?.())
1075
+ );
1076
+ this._originalLifecycles.disconnectedCallback?.call(this.component);
1077
+ if (this.hasDestroy)
1078
+ this._preserveOnDisconnectWatcher();
1079
+ }
1080
+ async _componentWillLoad() {
1081
+ const enableIntegration = await this._accessorIntegrationReady;
1082
+ enableIntegration();
1083
+ await Promise.allSettled(
1084
+ Array.from(
1085
+ this._controllers,
1086
+ async (controller) => "triggerLoad" in controller ? await controller.triggerLoad() : await safeAsyncCall(async () => await controller.hostLoad?.())
1087
+ )
1088
+ );
1089
+ await this._originalLifecycles.componentWillLoad?.call(this.component);
1090
+ }
1091
+ _componentDidLoad() {
1092
+ this._controllers.forEach(
1093
+ (controller) => "triggerLoaded" in controller ? controller.triggerLoaded() : safeCall(() => controller.hostLoaded?.())
1094
+ );
1095
+ this._originalLifecycles.componentDidLoad?.call(this.component);
1096
+ }
1097
+ async _componentWillRender() {
1098
+ await Promise.allSettled(
1099
+ Array.from(
1100
+ this._controllers,
1101
+ async (controller) => "triggerRender" in controller ? await controller.triggerRender() : await safeAsyncCall(async () => await controller.hostRender?.())
1102
+ )
1103
+ );
1104
+ await this._originalLifecycles.componentWillRender?.call(this.component);
1105
+ }
1106
+ _componentDidRender() {
1107
+ this._controllers.forEach(
1108
+ (controller) => "triggerRendered" in controller ? controller.triggerRendered() : safeCall(() => controller.hostRendered?.())
1109
+ );
1110
+ this._originalLifecycles.componentDidRender?.call(this.component);
1111
+ }
1112
+ async _componentWillUpdate() {
1113
+ await Promise.allSettled(
1114
+ Array.from(
1115
+ this._controllers,
1116
+ async (controller) => "triggerUpdate" in controller ? await controller.triggerUpdate() : await safeAsyncCall(async () => await controller.hostUpdate?.())
1117
+ )
1118
+ );
1119
+ await this._originalLifecycles.componentWillUpdate?.call(this.component);
1120
+ }
1121
+ _componentDidUpdate() {
1122
+ this._controllers.forEach(
1123
+ (controller) => "triggerUpdated" in controller ? controller.triggerUpdated() : safeCall(() => controller.hostUpdated?.())
1124
+ );
1125
+ this._originalLifecycles.componentDidUpdate?.call(this.component);
1126
+ const updatePromise = this._updatePromise;
1127
+ this._updatePromise = new h();
1128
+ updatePromise.resolve(true);
1129
+ }
1130
+ async destroy() {
1131
+ this.ensureHasDestroy();
1132
+ if (this.destroyed)
1133
+ return;
1134
+ if (this.component.el.isConnected) {
1135
+ this.hasDestroy = false;
1136
+ this.component.el.remove();
1137
+ this.hasDestroy = true;
1138
+ }
1139
+ this.destroyed = true;
1140
+ this._controllers.forEach(
1141
+ (controller) => "triggerDestroy" in controller ? controller.triggerDestroy() : safeCall(() => controller.hostDestroy?.())
1142
+ );
1143
+ await this._originalLifecycles.destroy?.call(this.component);
1144
+ }
1145
+ _preserveOnDisconnectWatcher() {
1146
+ if (!this.component.el.isConnected && !this.component.preserveOnDisconnect)
1147
+ void this.destroy().catch(console.error);
1148
+ }
1149
+ readonly(value) {
1150
+ return this.getSet(value, {
1151
+ set: (newValue, _oldValue, property) => {
1152
+ throw new Error(
1153
+ `Cannot assign to read-only property "${property}" of ${this.component.el.tagName.toLowerCase()}. Trying to assign "${String(
1154
+ newValue
1155
+ )}"`
1156
+ );
1157
+ }
1158
+ });
1159
+ }
1160
+ /**
1161
+ * Listen for any component's @State()/@Prop() change, and mutate it's
1162
+ * value before it is set.
1163
+ * This is necessary because Stencil's Compiler does not support get/set for
1164
+ * @State()/@Prop().
1165
+ * For private component properties, you should use regular get/set syntax.
1166
+ *
1167
+ * @example
1168
+ * @Prop() exampleProp = this.manager.getSet(defaultValue,{get,set})
1169
+ * @Prop() someProp = this.manager.getSet(
1170
+ * undefined as string | undefined,
1171
+ * {
1172
+ * get: (value)=>value.trim(),
1173
+ * set: (newValue,oldValue) => newValue.trim() ?? oldValue
1174
+ * }
1175
+ * )
1176
+ *
1177
+ * @remarks
1178
+ * Unlike a native get/set, the get function receives the current attribute
1179
+ * value, and can modify it before returning it (or can disregard the current
1180
+ * value and get it from elsewhere instead).
1181
+ * Similarly, setter is called with the new and old value, and is expected to
1182
+ * return the final new value (or return the old value to undo the change)
1183
+ */
1184
+ getSet(defaultValue, getSet) {
1185
+ return this.component.manager.trackPropKey((name) => {
1186
+ if (name === void 0)
1187
+ throw new Error(
1188
+ "Unable to resolve get/set's prop name. Make sure you are using it like @Prop() someProp = this.manager.getSet(defaultValue,{get,set})"
1189
+ );
1190
+ const genericComponent = this.component;
1191
+ const value = genericComponent[name];
1192
+ if (value != null && value !== defaultValue && typeof getSet.set === "function" && getSet.initialSet !== false) {
1193
+ const newValue = getSet.set(value, defaultValue, name);
1194
+ if (newValue !== value)
1195
+ genericComponent[name] = newValue;
1196
+ }
1197
+ this.genericGetSet(name, getSet);
1198
+ }, defaultValue);
1199
+ }
1200
+ };
1201
+ var destroyErrorMessage = `
1202
+ If the component uses a controller that uses destroy() method, then the
1203
+ component must have the following properties:
1204
+ ${// Don't expose internal code in production, and keep bundle smaller:
1205
+ `preserveOnDisconnect and destroy` }
1206
+ `.trim();
1207
+
1208
+ // src/proxyExports.ts
1209
+ var proxyExports = (Class) => (...args) => {
1210
+ const ambientControllers = Controller.internals.retriveParentControllers();
1211
+ const instance = new Class(...args);
1212
+ const initialExports = instance.exports;
1213
+ Controller.internals.setParentController(ambientControllers.at(-1));
1214
+ const internals = instance.component.manager.internals;
1215
+ internals.markExports(instance, initialExports);
1216
+ instance.watchExports((exports) => internals.markExports(instance, exports));
1217
+ Controller.internals.setAmbientChildController(instance);
1218
+ const hostCandidates = [instance.component, ...ambientControllers].reverse();
1219
+ return internals.trackKey(
1220
+ hostCandidates,
1221
+ (resolution) => resolution === void 0 ? void 0 : setProxy(instance, resolution.host, resolution.key, initialExports),
1222
+ initialExports
1223
+ );
1224
+ };
1225
+ function setProxy(controller, host, key, initialExports) {
1226
+ const genericHost = host;
1227
+ const controllerValueChanged = genericHost[key] !== controller.exports;
1228
+ const hostValueChanged = genericHost[key] !== initialExports;
1229
+ const controllerUpdatedExports = initialExports !== controller.exports;
1230
+ if (controllerValueChanged && !hostValueChanged && controllerUpdatedExports)
1231
+ genericHost[key] = controller.exports;
1232
+ controller.watchExports(() => {
1233
+ if (genericHost[key] !== controller.exports)
1234
+ genericHost[key] = controller.exports;
1235
+ });
1236
+ }
1237
+
1238
+ // src/functional.ts
1239
+ var makeController = (constructor) => proxy(void 0, constructor);
1240
+ var FunctionalController = class extends Controller {
1241
+ constructor(component, constructor) {
1242
+ super(component);
1243
+ const originalExports = this.exports;
1244
+ try {
1245
+ Controller.internals.setAmbientComponent(this.component);
1246
+ const value = constructor(this.component, this);
1247
+ const constructorChangedExports = this.exports !== originalExports;
1248
+ if (value instanceof Promise) {
1249
+ if (!constructorChangedExports)
1250
+ this.setProvisionalExports(value);
1251
+ const resolved = value.then((result) => {
1252
+ this.exports = result;
1253
+ super.catchUpLifecycle();
1254
+ }).catch((error) => {
1255
+ this._ready.reject(error);
1256
+ console.error(error);
1257
+ });
1258
+ this.onLoad(async () => await resolved);
1259
+ } else {
1260
+ if (!constructorChangedExports || value !== void 0)
1261
+ this.exports = value;
1262
+ super.catchUpLifecycle();
1263
+ }
1264
+ } catch (error) {
1265
+ this._ready.reject(error);
1266
+ console.error(error);
1267
+ }
1268
+ }
1269
+ /** Noop - will be called in the constructor instead */
1270
+ catchUpLifecycle() {
1271
+ return;
1272
+ }
1273
+ };
1274
+ var proxy = proxyExports(FunctionalController);
1275
+ function useT9n({
1276
+ blocking = false,
1277
+ name
1278
+ } = {}) {
1279
+ return makeController((component, controller) => {
1280
+ controller.onLifecycle(
1281
+ () => Y(
1282
+ component.el,
1283
+ getAssetPath("./assets"),
1284
+ ({ t9nLocale, t9nStrings, lang }) => {
1285
+ controller.exports = { ...t9nStrings, _lang: lang, _t9nLocale: t9nLocale };
1286
+ if (typeof t9nStrings.widgetLabel === "string" && "label" in component)
1287
+ component.label ?? (component.label = t9nStrings.widgetLabel);
1288
+ },
1289
+ name
1290
+ )
1291
+ );
1292
+ if (blocking)
1293
+ return controller.ready;
1294
+ const locale = M(component.el);
1295
+ return { _lang: locale.lang, _t9nLocale: locale.t9nLocale };
1296
+ });
1297
+ }
19
1298
 
20
1299
  const versionManagementCss = ".div-content{background-color:var(--calcite-ui-foreground-1);padding:0.75rem}.flow-main{width:330px}.notice{width:-webkit-fill-available}.panel-services{max-height:400px}.panel-versions{max-height:400px}";
21
1300
 
@@ -24,18 +1303,17 @@ const ArcgisVersionManagement$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisV
24
1303
  super();
25
1304
  this.__registerHost();
26
1305
  this.__attachShadow();
1306
+ this.manager = useControllerManager(this);
27
1307
  this._watchHandles = [];
28
1308
  this.label = undefined;
29
1309
  this.position = "top-right";
30
1310
  this.view = undefined;
31
- this._lang = "";
32
- this._t9nLocale = "";
33
- this._t9nStrings = undefined;
1311
+ this.messages = this.manager.readonly(useT9n({ blocking: true }));
34
1312
  this.state = undefined;
35
1313
  }
36
1314
  positionWatcher(newValue) {
37
1315
  if (newValue !== undefined && this.viewModel) {
38
- this.view.ui.move(this._hostElement, newValue);
1316
+ this.view.ui.move(this.el, newValue);
39
1317
  }
40
1318
  }
41
1319
  async componentDidLoad() {
@@ -45,26 +1323,24 @@ const ArcgisVersionManagement$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisV
45
1323
  }));
46
1324
  }
47
1325
  async componentWillLoad() {
48
- await B(this, getAssetPath("./assets"));
49
1326
  await this._checkForView();
50
1327
  this.viewModel = await newWidgetsVersionManagementVersionManagementViewModel({
51
1328
  view: this.view
52
1329
  });
53
- this.label = this.label ? this.label : this._t9nStrings.label;
1330
+ this.label = this.label ? this.label : this.messages.label;
54
1331
  }
55
1332
  disconnectedCallback() {
56
- q(this);
57
1333
  this._watchHandles.forEach((handle) => {
58
1334
  handle.remove();
59
1335
  });
60
1336
  this._watchHandles = [];
61
1337
  }
62
1338
  render() {
63
- const { _t9nStrings, label, viewModel, viewModel: { state, loadError } } = this;
1339
+ const { messages, label, viewModel, viewModel: { state, loadError } } = this;
64
1340
  const arrayServiceNames = Array.from(this.viewModel.serviceNameLookup, ([url, name]) => ({ url, name }));
65
- return (h(Host, null, h("calcite-flow", { ref: (node) => {
1341
+ return (h$1(Host, null, h$1("calcite-flow", { ref: (node) => {
66
1342
  this.flowElement = node;
67
- }, class: "flow-main" }, h("calcite-flow-item", { heading: label }, h("calcite-panel", { class: "panel-services", loading: state === "loading" }, arrayServiceNames.map((service) => (h("arcgis-version-management-service-item", { flowElement: this.flowElement, heading: label, serviceUrl: service.url, strings: _t9nStrings, viewModel: viewModel, onVersionItemActionClickedEventWithServiceUrl: (e) => {
1343
+ }, class: "flow-main" }, h$1("calcite-flow-item", { heading: label }, h$1("calcite-panel", { class: "panel-services", loading: state === "loading" }, arrayServiceNames.map((service) => (h$1("arcgis-version-management-service-item", { flowElement: this.flowElement, heading: label, serviceUrl: service.url, strings: messages, viewModel: viewModel, onVersionItemActionClickedEventWithServiceUrl: (e) => {
68
1344
  if (this.flowElement) {
69
1345
  this._handleVersionItemActionClick(e, this.flowElement);
70
1346
  }
@@ -72,7 +1348,7 @@ const ArcgisVersionManagement$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisV
72
1348
  if (this.flowElement) {
73
1349
  this._handleVersionListActionClick(e, this.flowElement);
74
1350
  }
75
- } }))), state === "disabled" ? (h("calcite-notice", { class: "notice", closable: false, kind: "warning", open: true, scale: "s", slot: "footer" }, h("div", { slot: "message" }, this._getLoadError(loadError)))) : undefined)))));
1351
+ } }))), state === "disabled" ? (h$1("calcite-notice", { class: "notice", closable: false, kind: "warning", open: true, scale: "s", slot: "footer" }, h$1("div", { slot: "message" }, this._getLoadError(loadError)))) : undefined)))));
76
1352
  }
77
1353
  //--------------------------------------------------------------------------
78
1354
  //
@@ -80,11 +1356,11 @@ const ArcgisVersionManagement$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisV
80
1356
  //
81
1357
  //--------------------------------------------------------------------------
82
1358
  async _checkForView() {
83
- const viewRef = this._hostElement.closest("arcgis-map");
1359
+ const viewRef = this.el.closest("arcgis-map");
84
1360
  if (viewRef?.view) {
85
1361
  await viewRef.view.map.load();
86
1362
  this.view = viewRef.view;
87
- this.view.ui.add(this._hostElement, this.position);
1363
+ this.view.ui.add(this.el, this.position);
88
1364
  }
89
1365
  }
90
1366
  _createVersionPropertiesFlow(serviceUrl, versionInfo) {
@@ -95,7 +1371,7 @@ const ArcgisVersionManagement$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisV
95
1371
  const versionPropertiesFlow = document.createElement("arcgis-version-management-version-properties");
96
1372
  versionPropertiesFlow.flowElement = flowElement;
97
1373
  versionPropertiesFlow.serviceUrl = serviceUrl;
98
- versionPropertiesFlow.strings = this._t9nStrings;
1374
+ versionPropertiesFlow.strings = this.messages;
99
1375
  versionPropertiesFlow.versionInfo = versionInfo;
100
1376
  versionPropertiesFlow.viewModel = viewModel;
101
1377
  versionPropertiesFlow.addEventListener("versionPropertiesSaveClickedEvent", async (e) => {
@@ -136,12 +1412,12 @@ const ArcgisVersionManagement$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisV
136
1412
  return versionPropertiesFlow;
137
1413
  }
138
1414
  _getLoadError(loadError) {
139
- const { _t9nStrings } = this;
1415
+ const { messages } = this;
140
1416
  switch (loadError) {
141
1417
  case "no-feature-services":
142
- return _t9nStrings.loadErrors.noFeatureServices;
1418
+ return messages.loadErrors.noFeatureServices;
143
1419
  case "no-layers-property":
144
- return _t9nStrings.loadErrors.noLayersProperty;
1420
+ return messages.loadErrors.noLayersProperty;
145
1421
  default:
146
1422
  return loadError;
147
1423
  }
@@ -186,7 +1462,7 @@ const ArcgisVersionManagement$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisV
186
1462
  await this.viewModel.changeVersion(featureServerUrl, toVersionName, toVersionGuid);
187
1463
  }
188
1464
  static get assetsDirs() { return ["assets"]; }
189
- get _hostElement() { return this; }
1465
+ get el() { return this; }
190
1466
  static get watchers() { return {
191
1467
  "position": ["positionWatcher"]
192
1468
  }; }
@@ -195,9 +1471,7 @@ const ArcgisVersionManagement$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisV
195
1471
  "label": [1025],
196
1472
  "position": [1],
197
1473
  "view": [1040],
198
- "_lang": [32],
199
- "_t9nLocale": [32],
200
- "_t9nStrings": [32],
1474
+ "messages": [16],
201
1475
  "state": [32]
202
1476
  }, undefined, {
203
1477
  "position": ["positionWatcher"]