@esri/solutions-components 0.11.17 → 0.11.19

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 (333) hide show
  1. package/dist/cjs/{asyncToGenerator-c7fc3ee4.js → asyncToGenerator-f169429a.js} +1 -1
  2. package/dist/cjs/basemap-gallery_7.cjs.entry.js +50 -259
  3. package/dist/cjs/buffer-tools_2.cjs.entry.js +29 -123
  4. package/dist/cjs/card-manager_3.cjs.entry.js +215 -565
  5. package/dist/cjs/consent-manager.cjs.entry.js +15 -57
  6. package/dist/cjs/create-feature_4.cjs.entry.js +102 -256
  7. package/dist/cjs/create-related-feature_3.cjs.entry.js +38 -172
  8. package/dist/cjs/crowdsource-manager.cjs.entry.js +89 -267
  9. package/dist/cjs/crowdsource-reporter.cjs.entry.js +55 -219
  10. package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
  11. package/dist/cjs/delete-dialog.cjs.entry.js +9 -38
  12. package/dist/cjs/{downloadUtils-88ec0e88.js → downloadUtils-b269c7a1.js} +5 -5
  13. package/dist/cjs/{effects-3607d1ba.js → effects-2f75069e.js} +1 -1
  14. package/dist/cjs/feature-list.cjs.entry.js +30 -110
  15. package/dist/cjs/{helpers-a65cb83a.js → helpers-69e520bd.js} +3 -3
  16. package/dist/cjs/{index-2c21082d.js → index-af14245a.js} +346 -428
  17. package/dist/cjs/{index-90ef3c01.js → index-ffd12cb0.js} +1 -1
  18. package/dist/cjs/{index.es-3c2404c3.js → index.es-644259ff.js} +2 -2
  19. package/dist/cjs/instant-apps-app-guide.cjs.entry.js +5 -5
  20. package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +7 -7
  21. package/dist/cjs/instant-apps-control-panel.cjs.entry.js +3 -3
  22. package/dist/cjs/instant-apps-create.cjs.entry.js +5 -5
  23. package/dist/cjs/instant-apps-export-views.cjs.entry.js +5 -5
  24. package/dist/cjs/instant-apps-export.cjs.entry.js +5 -5
  25. package/dist/cjs/instant-apps-filter-list_2.cjs.entry.js +5 -5
  26. package/dist/cjs/instant-apps-header.cjs.entry.js +3 -3
  27. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +6 -6
  28. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +6 -6
  29. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +6 -6
  30. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +6 -6
  31. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +8 -8
  32. package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +5 -5
  33. package/dist/cjs/instant-apps-landing-page.cjs.entry.js +1 -1
  34. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +8 -8
  35. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +8 -8
  36. package/dist/cjs/instant-apps-measurement-tool.cjs.entry.js +3 -3
  37. package/dist/cjs/instant-apps-measurement.cjs.entry.js +5 -5
  38. package/dist/cjs/instant-apps-popover.cjs.entry.js +5 -5
  39. package/dist/cjs/instant-apps-popovers.cjs.entry.js +1 -1
  40. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +5 -5
  41. package/dist/cjs/instant-apps-sign-in.cjs.entry.js +5 -5
  42. package/dist/cjs/instant-apps-splash.cjs.entry.js +5 -5
  43. package/dist/cjs/instant-apps-time-filter.cjs.entry.js +7 -7
  44. package/dist/cjs/json-editor_7.cjs.entry.js +50 -228
  45. package/dist/cjs/{languageSwitcher-19a22439.js → languageSwitcher-c8e62594.js} +1 -1
  46. package/dist/cjs/{languageUtil-a3e1eafd.js → languageUtil-bd49af69.js} +1 -1
  47. package/dist/cjs/{loadModules-e9d8977c.js → loadModules-3b29fa24.js} +1 -1
  48. package/dist/cjs/loader.cjs.js +2 -2
  49. package/dist/cjs/{locale-c09e93fb.js → locale-905e6063.js} +2 -2
  50. package/dist/cjs/{locale-0a273172.js → locale-c923d7b6.js} +3 -3
  51. package/dist/cjs/map-layer-picker.cjs.entry.js +29 -114
  52. package/dist/cjs/map-select-tools_3.cjs.entry.js +53 -232
  53. package/dist/cjs/{mapViewUtils-319df9ec.js → mapViewUtils-4ea7216c.js} +0 -44
  54. package/dist/cjs/pci-calculator.cjs.entry.js +2 -15
  55. package/dist/cjs/{popupUtils-ca1127aa.js → popupUtils-5378e04a.js} +2 -2
  56. package/dist/cjs/public-notification.cjs.entry.js +47 -197
  57. package/dist/cjs/{publicNotificationStore-ee00411f.js → publicNotificationStore-beb782de.js} +1 -1
  58. package/dist/cjs/solution-configuration.cjs.entry.js +18 -53
  59. package/dist/cjs/solution-contents_3.cjs.entry.js +19 -85
  60. package/dist/cjs/solution-item-accordion.cjs.entry.js +15 -42
  61. package/dist/cjs/solution-item-icon.cjs.entry.js +4 -18
  62. package/dist/cjs/{solution-store-6208ce28.js → solution-store-3cf25b71.js} +1 -1
  63. package/dist/cjs/solutions-components.cjs.js +3 -3
  64. package/dist/cjs/spatial-ref.cjs.entry.js +11 -46
  65. package/dist/cjs/store-manager.cjs.entry.js +6 -21
  66. package/dist/cjs/{utils-30344ce0.js → utils-3739960f.js} +2 -2
  67. package/dist/collection/assets/t9n/crowdsource-manager/resources.json +4 -1
  68. package/dist/collection/assets/t9n/crowdsource-manager/resources_en.json +4 -1
  69. package/dist/collection/assets/t9n/solution-item-accordion/resources.json +1 -1
  70. package/dist/collection/assets/t9n/solution-item-accordion/resources_en.json +1 -1
  71. package/dist/collection/collection-manifest.json +1 -1
  72. package/dist/collection/components/basemap-gallery/basemap-gallery.js +5 -19
  73. package/dist/collection/components/buffer-tools/buffer-tools.js +13 -52
  74. package/dist/collection/components/card-manager/card-manager.js +18 -72
  75. package/dist/collection/components/consent-manager/consent-manager.js +12 -52
  76. package/dist/collection/components/create-feature/create-feature.js +16 -68
  77. package/dist/collection/components/create-related-feature/create-related-feature.js +10 -44
  78. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +23 -0
  79. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +88 -263
  80. package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +53 -215
  81. package/dist/collection/components/delete-button/delete-button.js +13 -55
  82. package/dist/collection/components/delete-dialog/delete-dialog.js +8 -35
  83. package/dist/collection/components/edit-card/edit-card.js +10 -43
  84. package/dist/collection/components/feature-details/feature-details.js +18 -74
  85. package/dist/collection/components/feature-list/feature-list.js +25 -103
  86. package/dist/collection/components/floor-filter/floor-filter.js +5 -19
  87. package/dist/collection/components/info-card/info-card.js +100 -84
  88. package/dist/collection/components/json-editor/json-editor.js +7 -28
  89. package/dist/collection/components/layer-list/layer-list.js +12 -50
  90. package/dist/collection/components/layer-table/layer-table.js +188 -308
  91. package/dist/collection/components/map-card/map-card.js +43 -182
  92. package/dist/collection/components/map-draw-tools/map-draw-tools.js +15 -66
  93. package/dist/collection/components/map-fullscreen/map-fullscreen.js +4 -18
  94. package/dist/collection/components/map-layer-picker/map-layer-picker.js +25 -108
  95. package/dist/collection/components/map-legend/map-legend.js +4 -15
  96. package/dist/collection/components/map-picker/map-picker.js +8 -35
  97. package/dist/collection/components/map-search/map-search.js +8 -35
  98. package/dist/collection/components/map-select-tools/map-select-tools.js +32 -138
  99. package/dist/collection/components/map-tools/map-tools.js +27 -115
  100. package/dist/collection/components/pci-calculator/pci-calculator.js +3 -14
  101. package/dist/collection/components/pdf-download/pdf-download.js +6 -27
  102. package/dist/collection/components/public-notification/public-notification.js +41 -189
  103. package/dist/collection/components/refine-selection/refine-selection.js +13 -59
  104. package/dist/collection/components/solution-configuration/solution-configuration.js +13 -48
  105. package/dist/collection/components/solution-contents/solution-contents.js +4 -13
  106. package/dist/collection/components/solution-item/solution-item.js +9 -36
  107. package/dist/collection/components/solution-item-accordion/solution-item-accordion.js +19 -40
  108. package/dist/collection/components/solution-item-details/solution-item-details.js +16 -35
  109. package/dist/collection/components/solution-item-icon/solution-item-icon.js +5 -17
  110. package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +6 -27
  111. package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +6 -24
  112. package/dist/collection/components/solution-resource-item/solution-resource-item.js +8 -36
  113. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +7 -31
  114. package/dist/collection/components/solution-template-data/solution-template-data.js +8 -49
  115. package/dist/collection/components/solution-variables/solution-variables.js +6 -24
  116. package/dist/collection/components/spatial-ref/spatial-ref.js +8 -43
  117. package/dist/collection/components/store-manager/store-manager.js +5 -18
  118. package/dist/components/basemap-gallery2.js +3 -19
  119. package/dist/components/buffer-tools2.js +11 -52
  120. package/dist/components/card-manager2.js +16 -72
  121. package/dist/components/consent-manager.js +10 -52
  122. package/dist/components/create-feature2.js +14 -68
  123. package/dist/components/create-related-feature2.js +8 -44
  124. package/dist/components/crowdsource-manager.js +87 -264
  125. package/dist/components/crowdsource-reporter.js +51 -215
  126. package/dist/components/delete-button2.js +11 -55
  127. package/dist/components/delete-dialog2.js +6 -35
  128. package/dist/components/edit-card2.js +8 -43
  129. package/dist/components/feature-details2.js +16 -74
  130. package/dist/components/feature-list2.js +23 -103
  131. package/dist/components/floor-filter2.js +3 -19
  132. package/dist/components/info-card2.js +64 -83
  133. package/dist/components/json-editor2.js +5 -28
  134. package/dist/components/layer-list2.js +10 -50
  135. package/dist/components/layer-table2.js +155 -307
  136. package/dist/components/map-card2.js +41 -182
  137. package/dist/components/map-draw-tools2.js +13 -66
  138. package/dist/components/map-fullscreen2.js +2 -18
  139. package/dist/components/map-layer-picker2.js +23 -108
  140. package/dist/components/map-legend2.js +2 -15
  141. package/dist/components/map-picker2.js +6 -35
  142. package/dist/components/map-search2.js +6 -35
  143. package/dist/components/map-select-tools2.js +31 -139
  144. package/dist/components/map-tools2.js +25 -115
  145. package/dist/components/pci-calculator.js +1 -14
  146. package/dist/components/pdf-download2.js +4 -27
  147. package/dist/components/public-notification.js +39 -189
  148. package/dist/components/queryUtils.js +1 -43
  149. package/dist/components/refine-selection2.js +12 -60
  150. package/dist/components/solution-configuration.js +13 -48
  151. package/dist/components/solution-contents2.js +2 -13
  152. package/dist/components/solution-item-accordion.js +12 -39
  153. package/dist/components/solution-item-details2.js +14 -35
  154. package/dist/components/solution-item-icon2.js +3 -17
  155. package/dist/components/solution-item-sharing2.js +4 -27
  156. package/dist/components/solution-item2.js +7 -36
  157. package/dist/components/solution-organization-variables2.js +4 -24
  158. package/dist/components/solution-resource-item2.js +6 -36
  159. package/dist/components/solution-spatial-ref2.js +5 -31
  160. package/dist/components/solution-template-data2.js +8 -49
  161. package/dist/components/solution-variables2.js +4 -24
  162. package/dist/components/spatial-ref.js +8 -43
  163. package/dist/components/store-manager.js +3 -18
  164. package/dist/esm/{asyncToGenerator-96b2368d.js → asyncToGenerator-e51717ed.js} +1 -1
  165. package/dist/esm/basemap-gallery_7.entry.js +50 -259
  166. package/dist/esm/buffer-tools_2.entry.js +29 -123
  167. package/dist/esm/card-manager_3.entry.js +215 -565
  168. package/dist/esm/consent-manager.entry.js +15 -57
  169. package/dist/esm/create-feature_4.entry.js +102 -256
  170. package/dist/esm/create-related-feature_3.entry.js +38 -172
  171. package/dist/esm/crowdsource-manager.entry.js +89 -267
  172. package/dist/esm/crowdsource-reporter.entry.js +55 -219
  173. package/dist/esm/deduct-calculator.entry.js +1 -1
  174. package/dist/esm/delete-dialog.entry.js +9 -38
  175. package/dist/esm/{downloadUtils-22a8f2d8.js → downloadUtils-d04d4095.js} +5 -5
  176. package/dist/esm/{effects-38bc1195.js → effects-602e7b51.js} +1 -1
  177. package/dist/esm/feature-list.entry.js +30 -110
  178. package/dist/esm/{helpers-77bdd30e.js → helpers-520f100c.js} +3 -3
  179. package/dist/esm/{index-6de7c296.js → index-c247b62b.js} +1 -1
  180. package/dist/esm/{index-3702583a.js → index-df5db8e9.js} +346 -428
  181. package/dist/esm/{index.es-87662946.js → index.es-ca80d0c5.js} +2 -2
  182. package/dist/esm/instant-apps-app-guide.entry.js +5 -5
  183. package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +7 -7
  184. package/dist/esm/instant-apps-control-panel.entry.js +3 -3
  185. package/dist/esm/instant-apps-create.entry.js +5 -5
  186. package/dist/esm/instant-apps-export-views.entry.js +5 -5
  187. package/dist/esm/instant-apps-export.entry.js +5 -5
  188. package/dist/esm/instant-apps-filter-list_2.entry.js +5 -5
  189. package/dist/esm/instant-apps-header.entry.js +3 -3
  190. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +6 -6
  191. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +6 -6
  192. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +6 -6
  193. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +6 -6
  194. package/dist/esm/instant-apps-interactive-legend.entry.js +8 -8
  195. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +5 -5
  196. package/dist/esm/instant-apps-landing-page.entry.js +1 -1
  197. package/dist/esm/instant-apps-language-switcher.entry.js +8 -8
  198. package/dist/esm/instant-apps-language-translator.entry.js +8 -8
  199. package/dist/esm/instant-apps-measurement-tool.entry.js +3 -3
  200. package/dist/esm/instant-apps-measurement.entry.js +5 -5
  201. package/dist/esm/instant-apps-popover.entry.js +5 -5
  202. package/dist/esm/instant-apps-popovers.entry.js +1 -1
  203. package/dist/esm/instant-apps-scoreboard.entry.js +5 -5
  204. package/dist/esm/instant-apps-sign-in.entry.js +5 -5
  205. package/dist/esm/instant-apps-splash.entry.js +5 -5
  206. package/dist/esm/instant-apps-time-filter.entry.js +7 -7
  207. package/dist/esm/json-editor_7.entry.js +50 -228
  208. package/dist/esm/{languageSwitcher-49bad3f4.js → languageSwitcher-ccdf79d4.js} +1 -1
  209. package/dist/esm/{languageUtil-2b6e191a.js → languageUtil-2bac3910.js} +1 -1
  210. package/dist/esm/{loadModules-947ccfd4.js → loadModules-1b0b108c.js} +1 -1
  211. package/dist/esm/loader.js +3 -3
  212. package/dist/esm/{locale-aa656a2c.js → locale-15e42305.js} +2 -2
  213. package/dist/esm/{locale-b0016f8e.js → locale-29d08ded.js} +3 -3
  214. package/dist/esm/map-layer-picker.entry.js +29 -114
  215. package/dist/esm/map-select-tools_3.entry.js +53 -232
  216. package/dist/esm/{mapViewUtils-a854e298.js → mapViewUtils-9da9be1c.js} +1 -43
  217. package/dist/esm/pci-calculator.entry.js +2 -15
  218. package/dist/esm/{popupUtils-1314cb13.js → popupUtils-b71abb01.js} +2 -2
  219. package/dist/esm/public-notification.entry.js +47 -197
  220. package/dist/esm/{publicNotificationStore-70219049.js → publicNotificationStore-9ec5e22a.js} +1 -1
  221. package/dist/esm/solution-configuration.entry.js +18 -53
  222. package/dist/esm/solution-contents_3.entry.js +19 -85
  223. package/dist/esm/solution-item-accordion.entry.js +15 -42
  224. package/dist/esm/solution-item-icon.entry.js +4 -18
  225. package/dist/esm/{solution-store-2493275a.js → solution-store-4c39c654.js} +1 -1
  226. package/dist/esm/solutions-components.js +4 -4
  227. package/dist/esm/spatial-ref.entry.js +11 -46
  228. package/dist/esm/store-manager.entry.js +6 -21
  229. package/dist/esm/{utils-68015f9d.js → utils-89be1743.js} +2 -2
  230. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources.json +4 -1
  231. package/dist/solutions-components/assets/t9n/crowdsource-manager/resources_en.json +4 -1
  232. package/dist/solutions-components/assets/t9n/solution-item-accordion/resources.json +1 -1
  233. package/dist/solutions-components/assets/t9n/solution-item-accordion/resources_en.json +1 -1
  234. package/dist/solutions-components/{p-68d49e1a.entry.js → p-0132213f.entry.js} +2 -2
  235. package/dist/solutions-components/{p-dc188d13.js → p-039ab075.js} +1 -1
  236. package/dist/solutions-components/p-04277d48.entry.js +6 -0
  237. package/dist/solutions-components/p-04546ef6.js +6 -0
  238. package/dist/solutions-components/{p-174fa218.js → p-0607044f.js} +1 -1
  239. package/dist/solutions-components/p-099379e6.entry.js +6 -0
  240. package/dist/solutions-components/{p-300ff31e.entry.js → p-0b1c830a.entry.js} +1 -1
  241. package/dist/solutions-components/{p-ff5db601.entry.js → p-0ea99464.entry.js} +1 -1
  242. package/dist/solutions-components/p-1054e10a.entry.js +6 -0
  243. package/dist/solutions-components/p-1adc6874.entry.js +6 -0
  244. package/dist/solutions-components/{p-3c3aecdd.js → p-258aa58e.js} +1 -1
  245. package/dist/solutions-components/p-29baf8a2.entry.js +6 -0
  246. package/dist/solutions-components/{p-eb97b5ad.entry.js → p-2a1ed83a.entry.js} +1 -1
  247. package/dist/solutions-components/{p-8107be38.entry.js → p-2a7f23fc.entry.js} +1 -1
  248. package/dist/solutions-components/{p-6da8fe2d.entry.js → p-2cb8c175.entry.js} +1 -1
  249. package/dist/solutions-components/p-2d3b8412.entry.js +6 -0
  250. package/dist/solutions-components/p-2d8300ba.entry.js +6 -0
  251. package/dist/solutions-components/{p-ac122d9e.js → p-3423b5ef.js} +1 -1
  252. package/dist/solutions-components/{p-fa09caf3.entry.js → p-34338938.entry.js} +1 -1
  253. package/dist/solutions-components/{p-4f514c6d.js → p-36e3b39c.js} +2 -2
  254. package/dist/solutions-components/{p-ea64b72e.entry.js → p-37cc79c6.entry.js} +1 -1
  255. package/dist/solutions-components/p-38814554.entry.js +6 -0
  256. package/dist/solutions-components/{p-ee863ffb.entry.js → p-3f8b1062.entry.js} +1 -1
  257. package/dist/solutions-components/p-436b869c.entry.js +6 -0
  258. package/dist/solutions-components/{p-08ad0b7a.js → p-438fdc33.js} +1 -1
  259. package/dist/solutions-components/{p-335a630e.entry.js → p-4454af38.entry.js} +1 -1
  260. package/dist/solutions-components/p-532ed572.entry.js +6 -0
  261. package/dist/solutions-components/{p-959cb673.entry.js → p-552fb1c0.entry.js} +1 -1
  262. package/dist/solutions-components/{p-b560498c.entry.js → p-59a1c5a9.entry.js} +1 -1
  263. package/dist/solutions-components/p-5e4e0f84.entry.js +6 -0
  264. package/dist/solutions-components/{p-2b556610.entry.js → p-64a6162f.entry.js} +1 -1
  265. package/dist/solutions-components/{p-e85da876.entry.js → p-6ac03d17.entry.js} +1 -1
  266. package/dist/solutions-components/p-6e879de9.entry.js +6 -0
  267. package/dist/solutions-components/{p-8f7957a2.js → p-7bf7d67b.js} +1 -1
  268. package/dist/solutions-components/{p-81ae30bd.entry.js → p-86b6f918.entry.js} +1 -1
  269. package/dist/solutions-components/{p-e23b4193.js → p-8717729a.js} +1 -1
  270. package/dist/solutions-components/{p-e81e2d83.entry.js → p-8db12ee9.entry.js} +2 -2
  271. package/dist/solutions-components/{p-173d5fce.js → p-8f973b3d.js} +1 -1
  272. package/dist/solutions-components/{p-1ddd7128.entry.js → p-97abbf8f.entry.js} +1 -1
  273. package/dist/solutions-components/{p-ee2cbba0.js → p-a397e773.js} +1 -1
  274. package/dist/solutions-components/p-b636a8b4.entry.js +6 -0
  275. package/dist/solutions-components/{p-1890b884.entry.js → p-b6a6fdcf.entry.js} +2 -2
  276. package/dist/solutions-components/p-b8f29a99.entry.js +6 -0
  277. package/dist/solutions-components/p-ba472e45.entry.js +6 -0
  278. package/dist/solutions-components/{p-1dffcc22.entry.js → p-c3aac15b.entry.js} +1 -1
  279. package/dist/solutions-components/{p-3d20e307.js → p-cd38fc53.js} +1 -1
  280. package/dist/solutions-components/p-d45b0400.entry.js +6 -0
  281. package/dist/solutions-components/p-d885880a.entry.js +6 -0
  282. package/dist/solutions-components/{p-8b218ba7.js → p-da1e098c.js} +1 -1
  283. package/dist/solutions-components/{p-b40b5be5.entry.js → p-da1e4ff1.entry.js} +1 -1
  284. package/dist/solutions-components/p-dbf2c455.entry.js +6 -0
  285. package/dist/solutions-components/{p-952da957.js → p-dcd2f00b.js} +2 -2
  286. package/dist/solutions-components/{p-2c8360b4.entry.js → p-dda0aa41.entry.js} +1 -1
  287. package/dist/solutions-components/{p-70e8be5c.entry.js → p-e3e35c14.entry.js} +1 -1
  288. package/dist/solutions-components/{p-48942eb8.js → p-e6859850.js} +2 -2
  289. package/dist/solutions-components/{p-699a9557.entry.js → p-e79b69e6.entry.js} +1 -1
  290. package/dist/solutions-components/p-e996c38f.js +7 -0
  291. package/dist/solutions-components/{p-f07a02e2.entry.js → p-edfcce2c.entry.js} +1 -1
  292. package/dist/solutions-components/{p-2dcf8f00.entry.js → p-f292f56e.entry.js} +1 -1
  293. package/dist/solutions-components/{p-4bdd4009.entry.js → p-f36b4778.entry.js} +1 -1
  294. package/dist/solutions-components/{p-579628d9.entry.js → p-f457e8be.entry.js} +1 -1
  295. package/dist/solutions-components/{p-d65f8b73.js → p-f93a9d92.js} +1 -1
  296. package/dist/solutions-components/p-f99a78f1.entry.js +6 -0
  297. package/dist/solutions-components/{p-7f6cbe61.entry.js → p-fdf0d66f.entry.js} +1 -1
  298. package/dist/solutions-components/solutions-components.esm.js +1 -1
  299. package/dist/solutions-components_commit.txt +7 -7
  300. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +11 -7
  301. package/dist/types/components/info-card/info-card.d.ts +16 -0
  302. package/dist/types/components/layer-table/layer-table.d.ts +32 -21
  303. package/dist/types/components/solution-item-accordion/solution-item-accordion.d.ts +1 -1
  304. package/dist/types/components.d.ts +19 -2
  305. package/dist/types/preact.d.ts +2 -1
  306. package/package.json +2 -2
  307. package/dist/solutions-components/p-032d4411.entry.js +0 -6
  308. package/dist/solutions-components/p-1b0588d2.js +0 -7
  309. package/dist/solutions-components/p-1fe3577a.entry.js +0 -6
  310. package/dist/solutions-components/p-265f5dc4.entry.js +0 -6
  311. package/dist/solutions-components/p-43d9bb7d.entry.js +0 -6
  312. package/dist/solutions-components/p-4426901e.entry.js +0 -6
  313. package/dist/solutions-components/p-4ebc471b.entry.js +0 -6
  314. package/dist/solutions-components/p-5ea1e18b.entry.js +0 -6
  315. package/dist/solutions-components/p-6d62a4fa.entry.js +0 -6
  316. package/dist/solutions-components/p-70036eb6.entry.js +0 -6
  317. package/dist/solutions-components/p-87919d6d.entry.js +0 -6
  318. package/dist/solutions-components/p-89fbc318.js +0 -6
  319. package/dist/solutions-components/p-8ea0a36a.entry.js +0 -6
  320. package/dist/solutions-components/p-9d953313.entry.js +0 -6
  321. package/dist/solutions-components/p-a003600b.entry.js +0 -6
  322. package/dist/solutions-components/p-acd2699e.entry.js +0 -6
  323. package/dist/solutions-components/p-afc3ac6d.entry.js +0 -6
  324. package/dist/solutions-components/p-b37be371.entry.js +0 -6
  325. package/dist/solutions-components/p-bc2548ba.entry.js +0 -6
  326. package/dist/solutions-components/p-bf2598f8.entry.js +0 -6
  327. package/dist/solutions-components/p-ce8377c6.entry.js +0 -6
  328. /package/dist/cjs/{esri-loader-08dc41bd.js → esri-loader-1e8cc247.js} +0 -0
  329. /package/dist/cjs/{typeof-2a7e2dec.js → typeof-eba0a941.js} +0 -0
  330. /package/dist/esm/{esri-loader-c6842c6b.js → esri-loader-d10d860d.js} +0 -0
  331. /package/dist/esm/{typeof-ef2a007d.js → typeof-a3e780e1.js} +0 -0
  332. /package/dist/solutions-components/{p-4fe489cf.js → p-19bce2cc.js} +0 -0
  333. /package/dist/solutions-components/{p-0a24ad5f.js → p-3b3f77bc.js} +0 -0
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,c as i,g as e,h as s}from"./p-1b0588d2.js";import{l as a,g as h}from"./p-ee2cbba0.js";import{P as l}from"./p-3c3aecdd.js";import{g as n,c as o,h as r}from"./p-952da957.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-4f514c6d.js";import"./p-4fe489cf.js";import"./p-2bc98cb0.js";import"./p-4f236b5d.js";import"./p-570b13d9.js";import"./p-0668e30d.js";import"./p-80cb7c73.js";const c=class{constructor(e){t(this,e),this.featureSelect=i(this,"featureSelect",7)}get el(){return e(this)}selectedLayerId;mapView;noFeaturesFoundMsg;pageSize=100;highlightOnMap=!1;highlightOnHover=!1;locale;sortingInfo;whereClause;textSize="large";showInitialLoading=!0;showErrorWhenNoFeatures=!0;showUserImageInList=!1;showFeatureSymbol=!1;applyLayerViewFilter=!1;reportingOptions;showFullTitle=!0;_featureItems=[];_featuresCount=0;_isLoading=!1;_searchPlaceHolder="";_fullTextSearchInfo;_translations;Color;esriConfig;symbolUtils;_popupUtils;_selectedLayer;_highlightHandle;_highlights;_pagination;_calciteList;_validFieldTypes=["small-integer","integer","big-integer","single","long"];_abbreviatedLikeCount;_likeFieldAvailable=!1;_searchExpression;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async selectedLayerWatchHandler(){this._selectedLayer=await n(this.mapView,this.selectedLayerId),await this.initializeFeatureItems()}async sortingInfoWatchHandler(){await this.initializeFeatureItems()}async whereClauseHandler(){await this.initializeFeatureItems()}async refresh(t){if(t&&this._pagination){const t={target:{startItem:this._pagination.startItem}};await this.pageChanged(t)}else this._searchExpression?await this._searchFullText():await this.initializeFeatureItems()}featureSelect;async componentWillLoad(){await this.initModules(),await this._getTranslations(),this._isLoading=this.showInitialLoading,this._popupUtils=new l,this.mapView&&this.selectedLayerId&&(this._selectedLayer=await n(this.mapView,this.selectedLayerId),this._getFullTextSearchInfo())}async componentDidLoad(){await this.initializeFeatureItems()}render(){const t=this._canShowFullTextSearch();return s("calcite-panel",{key:"56599be334eec65be00681d415db28917133b0c1","full-height":!0,"full-width":!0},t&&s("calcite-input",{key:"6de9873f6b7ab961dffe1334d2fc20b4322d8ea8",class:"search",clearable:!0,icon:"search",onCalciteInputChange:this._searchTextChanged.bind(this),placeholder:this._searchPlaceHolder,title:"",type:"search"}),this._isLoading&&s("calcite-loader",{key:"4189b0d6c2a85116d529f5b7844c1f2d41657350",label:"",scale:"m"}),this.showErrorWhenNoFeatures&&0===this._featureItems.length&&!this._isLoading&&s("calcite-notice",{key:"7f2e8276ad5345e21667b2dedc7e23f5c34672f5",class:"error-msg",icon:"feature-details",kind:"info",open:!0},s("div",{key:"63d44ac906c8d5584aac2cfbeec4cf0962d61abe",slot:"message"},this.noFeaturesFoundMsg?this.noFeaturesFoundMsg:this._translations.featureErrorMsg)),s("calcite-list",{key:"5843f8d7ca994cb799a9be0ab2f43a8f1e407e9a",class:"small"!==this.textSize||this.showFullTitle?"":"overflow-hidden",label:"",ref:t=>this._calciteList=t,"selection-appearance":"border","selection-mode":"none"},!this._isLoading&&this._featureItems.length>0&&this._featureItems),this._featuresCount>this.pageSize&&s("div",{key:"288364bc505fe6bce8b1260dce5173163a795330",class:"width-full",slot:"footer"},s("calcite-pagination",{key:"e30e2d46a0005dd3e0d289deb4721b9155d4df29",class:"pagination","full-width":!0,onCalcitePaginationChange:this.pageChanged.bind(this),"page-size":this.pageSize,ref:t=>this._pagination=t,"start-item":"1","total-items":this._featuresCount})))}async initModules(){const[t,i,e]=await a(["esri/Color","esri/config","esri/symbols/support/symbolUtils"]);this.Color=t,this.esriConfig=i,this.symbolUtils=e}async getWhereCondition(){let t="1=1";if(this.whereClause&&(t=this.whereClause),this._selectedLayer?.definitionExpression&&(t=t+" AND "+this._selectedLayer.definitionExpression),this.applyLayerViewFilter){const i=await o(this.mapView,this.selectedLayerId);i?.filter?.where&&(t=t+" AND "+i.filter.where)}return t}async initializeFeatureItems(){if(this._selectedLayer){this._pagination?.goTo("start"),this._isLoading=this.showInitialLoading,this._featureItems=await this.queryPage(0);const t={where:await this.getWhereCondition()};this._featuresCount=await this._selectedLayer.queryFeatureCount(t),this._isLoading=!1}}async pageChanged(t){this._isLoading=!0,this._highlightHandle&&(this._highlightHandle.remove(),this._highlightHandle=null);const i=t.target.startItem-1;this._featureItems=await this.queryPage(i),this._isLoading=!1}_canShowFullTextSearch(){return((this._selectedLayer?.capabilities)?.query)?.supportsFullTextSearch&&this._selectedLayer.indexes.items.filter((t=>"FullText"==t.indexType)).length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],((this._selectedLayer?.capabilities)?.query)?.supportsFullTextSearch){const t=this._selectedLayer.indexes?.filter((t=>"FullText"==t.indexType));if(t?.length){const i=[];t.forEach((t=>{i.push(...t.fields.split(","))}));const e=[];i.forEach((t=>{const i=this._selectedLayer.getField(t.trim());e.push(i.alias)})),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{fields}}",e.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}async _searchTextChanged(t){this._fullTextSearchInfo.forEach((i=>{i.searchTerm=t.target.value})),await this._searchFullText()}async _searchFullText(){this._searchExpression&&this._clearSearchDefinitionExpression();let t=[];if(this._fullTextSearchInfo&&this._fullTextSearchInfo[0].searchTerm){const i=this._selectedLayer.createQuery();i.fullText=this._fullTextSearchInfo,t=await this._selectedLayer.queryObjectIds(i),await this._updateSearchDefinitionExpression(t?.length?t:[-1])}await this.initializeFeatureItems()}async _updateSearchDefinitionExpression(t){const i=this._selectedLayer.definitionExpression;if(t?.length){const e=`objectId in(${t})`;this._selectedLayer.definitionExpression=i?.indexOf(this._searchExpression)>-1?i.replace(this._searchExpression,e):i?`${i} AND (${e})`:e,this._searchExpression=e}else this._clearSearchDefinitionExpression()}_clearSearchDefinitionExpression(){const t=this._selectedLayer.definitionExpression;this._searchExpression&&t?.indexOf(this._searchExpression)>-1&&(this._selectedLayer.definitionExpression=t?.indexOf(" AND ("+this._searchExpression)>-1?t.replace(` AND (${this._searchExpression})`,""):t.replace(this._searchExpression,"")),this._searchExpression=void 0}async featureClicked(t,i){if(this.clearHighlights(),this.highlightOnMap){const i=Number(t.target.value),e=await o(this.mapView,this.selectedLayerId);this._highlightHandle=await r([i],e,this.mapView,!0)}await this.emitSelectedFeature(i)}async emitSelectedFeature(t){const i=t.layer,e=i.createQuery();e.returnGeometry=!0,e.objectIds=[t.getObjectId()];const s=await i.queryFeatures(e);this.featureSelect.emit(s.features[0])}async onFeatureHover(t){if(this.clearHighlights(),this.highlightOnHover){const i=t.getObjectId(),e=await o(this.mapView,this.selectedLayerId);this._highlights&&(e.highlights=JSON.parse(this._highlights)),e.highlightOptions={color:new this.Color("#FFFF00")},this._highlights=JSON.stringify(e.highlights),this._highlightHandle=e.highlight([i])}}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}async queryPage(t){const i=this._selectedLayer,e=this.sortingInfo?.field?this.sortingInfo.field:i.objectIdField,s=this.sortingInfo?.order?this.sortingInfo.order:"desc",a=await this.getWhereCondition(),h={start:t,num:this.pageSize,outFields:["*"],returnGeometry:!0,where:a,outSpatialReference:this.mapView.spatialReference.toJSON()};e&&s&&(h.orderByFields=[e.toString()+" "+s]);const l=await i.queryFeatures(h);return await this.createFeatureItem(l)}async createFeatureItem(t){const i=t?.features,e=this.reportingOptions&&this.reportingOptions[this.selectedLayerId].like,s=i.map((async t=>{const i=await this._popupUtils.getPopupTitle(t,this.mapView.map);let s,a;if(this.showUserImageInList){const i=this._selectedLayer.editFieldsInfo?.creatorField;i&&(s=await this.getUserInformation(t))}return this.showFeatureSymbol&&(a=await this.getFeatureSymbol(t)),e&&this.getAbbreviatedLikeCount(t),this.getFeatureItem(t,i,a,s)}));return Promise.all(s)}getAbbreviatedLikeCount(t){const i=this._selectedLayer,e=this.reportingOptions[i.id].likeField;i.fields.forEach((s=>{if(this._validFieldTypes.indexOf(s.type)>-1&&s.name===e&&this.reportingOptions[i.id].like){this._likeFieldAvailable=!0;let i=t.attributes[e]||0;i>999&&(i=i>999999?this._translations.millionsAbbreviation.replace("{{abbreviated_value}}",Math.floor(i/1e6).toString()):this._translations.thousandsAbbreviation.replace("{{abbreviated_value}}",Math.floor(i/1e3).toString())),this._abbreviatedLikeCount=i}}))}getFeatureItem(t,i,e,a){const h=t.attributes[this._selectedLayer.objectIdField].toString();i=i??h;const l=Number(t.attributes[this.reportingOptions?.[this._selectedLayer.id].likeField]).toLocaleString(),n="small"!==this.textSize||this.showFullTitle?"small"===this.textSize?"feature-list-popup-title-small":"feature-list-popup-title":"feature-list-popup-title-small-ellipsis",o=this._calciteList.offsetWidth-(this.showUserImageInList?115:65);return s("calcite-list-item",{onCalciteListItemSelect:i=>{this.featureClicked(i,t)},onMouseLeave:()=>{this.clearHighlights()},onMouseOver:()=>{this.onFeatureHover(t)},value:h},this.showUserImageInList&&s("calcite-avatar",{class:"profile-img","full-name":a?.fullName,scale:"m",slot:"content-start",thumbnail:a?.userProfileUrl,userId:a?.id,username:a?.fullName?a.username:void 0}),this.showFeatureSymbol&&s("div",{class:"feature-symbol",ref:t=>t&&t.replaceChildren(e),slot:"content-start"}),s("div",{class:`popup-title ${n}`,slot:"content-start",style:{maxWidth:"large"===this.textSize?"none":`${o}px`}},i),this._likeFieldAvailable&&s("div",{class:"like-container",id:h.concat("like"),slot:"content-end"},s("span",null,this._abbreviatedLikeCount),s("calcite-icon",{icon:"thumbs-up",scale:"s"}),s("calcite-tooltip",{overlayPositioning:"fixed",placement:"top","reference-element":h.concat("like")},l)),s("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}async getUserInformation(t){let i=this._selectedLayer.editFieldsInfo?.creatorField;t.attributes.hasOwnProperty(i.toLowerCase())?i=i.toLowerCase():t.attributes.hasOwnProperty(i.toUpperCase())&&(i=i.toUpperCase());let e=`${this.esriConfig.portalUrl}/sharing/rest/community/users/${t.attributes[i]}?f=json&returnUserLicensedItems=true`;const s=this.mapView.map.portalItem.portal?.credential?.token;s&&(e+=`&token=${s}`);const a=await fetch(e),h=await a.json();let l=`${this.esriConfig.portalUrl}/sharing/rest/community/users/${h?.username??t.attributes[i]}/info/blob.png`;return h?.access&&s&&(l+=`?token=${s}`),h.userProfileUrl=l,h}async getFeatureSymbol(t){const i=document.createElement("div");return await this.symbolUtils.getDisplayedSymbol(t).then((async t=>{if(t&&await(this.symbolUtils?.renderPreviewHTML(t,{node:i})),i.children?.length){const t=i.children[0];if(t){const i=Number(t.getAttribute("height")),e=Number(t.getAttribute("width"));e>30?t.setAttribute("width","30"):e<19&&t.setAttribute("width","20"),t.setAttribute("viewBox",`0 0 ${e} ${i}`)}}})),i}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"],selectedLayerId:["selectedLayerWatchHandler"],sortingInfo:["sortingInfoWatchHandler"],whereClause:["whereClauseHandler"]}}};c.style=":host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.error-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500;white-space:pre-line}.feature-list-popup-title-small{font-size:small;white-space:pre-line}.feature-list-popup-title-small-ellipsis{font-size:small;white-space:nowrap !important;text-overflow:ellipsis;overflow:hidden}.popup-title{padding:0 5px;word-break:break-word}.profile-img{padding:0 5px;min-width:32px}.like-container{display:flex;align-items:center;gap:5px;color:gray !important;font-style:italic}.feature-symbol{padding:0 3px;min-width:30px;display:flex;justify-content:center}.search{padding:10px;background-color:var(--calcite-color-foreground-1) !important;border-block-end:1px solid var(--calcite-color-border-3)}";export{c as feature_list}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,c as e,g as s}from"./p-1b0588d2.js";import{s as r}from"./p-8b218ba7.js";import{c as a,d as i}from"./p-f6e81cf8.js";import"./p-e23b4193.js";import"./p-80cb7c73.js";import"./p-4f236b5d.js";import"./p-d4056c1c.js";import"./p-570b13d9.js";import"./p-0668e30d.js";const o=class{constructor(s){t(this,s),this.stateLoaded=e(this,"stateLoaded",7)}get el(){return s(this)}value="";templates=[];authentication;connectedCallback(){this._handleValueChange(this.value),this._initValueObserver()}render(){return null}stateLoaded;async getStoreInfo(t){return Promise.resolve(r.getStoreInfo(t))}_valueObserver;_handleValueChange(t){if(""!==t){const e=JSON.parse(t);r.setStoreInfo("solutionData",e);const s=a(e.templates);r.setStoreInfo("featureServices",s),r.setStoreInfo("spatialReferenceInfo",i(s,e)),this.templates=e.templates,this.stateLoaded.emit(r)}}_initValueObserver(){this._valueObserver=new MutationObserver((t=>{t.some((t=>{const e=t.target[t.attributeName];if("attributes"===t.type&&"value"===t.attributeName&&e!==t.oldValue)return this._handleValueChange(e),!0}))})),this._valueObserver.observe(this.el,{attributes:!0,attributeOldValue:!0})}};export{o as store_manager}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as e,g as a,h as r,a as t}from"./p-1b0588d2.js";const s=class{constructor(a){e(this,a)}get el(){return a(this)}isPortal=!1;type="";typeKeywords=[];render(){return r("div",{key:"cc13e7bfc0a58ca1727651c3c31b0dc4e50f716a",title:this.type},r("img",{key:"76808f6a3ced35a15626d4a4d30e7a2b8185d8d6",class:"item-type-icon item-type-icon-margin",height:"16",src:this._getIconUrl(this.type,this.typeKeywords),width:"16"}))}_getIconUrl(e,a){const r=this._getItemIcon(e,a);return t("group"===r?`./item-icons/${r}16.png`:`./item-icons/${r}16.svg`)}_getItemIcon(e,a){const r=e.toLowerCase(),t=a||[],s=t.includes("Hosted Service");switch(r.trim()){case"360 vr experience":return"360vr";case"3dtiles package":return"3dtileslayerpackage";case"3dtiles service":return t.includes("3DObject")?"3dobjecttileslayer":t.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dobjecttileslayer";case"feature service":case"feature collection":case"kml":case"wfs":if(t.includes("IndoorPositioningDataService"))return"indoorpositioningdataservice";const e=t.includes("Spatiotemporal");return t.includes("Table")?e?"spatiotemporaltable":"table":t.includes("Route Layer")?"routelayer":t.includes("Markup")?"markup":e?"spatiotemporal":t.includes("UtilityNetwork")?"utilitynetwork":s?"featureshosted":"features";case"group":return"group";case"group layer":return t.includes("Map")?"layergroup2d":t.includes("Scene")?"layergroup3d":"layergroup";case"wmts":return"maptiles";case"map service":case"wms":return s||t.includes("Tiled")?"maptiles":"mapimages";case"scene service":return t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer";case"image service":return t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery";case"stream service":return"streamlayer";case"video service":return t.includes("Live Stream")?"livestreamvideolayer":"mediaservice";case"vector tile service":return"vectortile";case"datastore catalog service":return"datastorecollection";case"geocoding service":return"geocodeservice";case"geoprocessing service":return t.includes("Web Tool")?"tool":"layers";case"geodata service":return"geodataservice";case"web map":case"cityengine web scene":return"maps";case"web scene":return t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal";case"application":case"web mapping application":case"mobile application":case"operation view":case"desktop application":return t.includes("configurableApp")?"instantapps":"apps";case"map document":case"map package":case"published map":case"scene document":case"globe document":case"basemap package":case"mobile basemap package":case"mobile map package":case"project package":case"project template":case"pro map":case"layout":return"mapsgray";case"layer":if(t.includes("ArcGIS Pro"))return"mapsgray";case"explorer map":if(t.indexOf("Explorer Document"))return"mapsgray";if(t.includes("Explorer Mapping Application"))return"datafilesgray";case"pro presentation":return"propresentation";case"api key":return"key";case"csv":return"csv";case"shapefile":return"shapefile";case"csv collection":return"csvcollection";case"media layer":return"medialayer";case"microsoft excel":return"excel";case"microsoft powerpoint":return"powerpoint";case"microsoft word":return"word";case"pdf":return"pdf";case"sqlite geodatabase":return"sqlite";case"administrative report":return"report";case"image":return"image";case"cad drawing":return"cad";case"service definition":case"geojson":case"360 vr experience":case"netcdf":return"data";case"explorer add in":case"desktop add in":case"windows viewer add in":case"windows viewer configuration":return"appsgray";case"arcgis pro add in":case"arcgis pro configuration":return"addindesktop";case"rule package":case"file geodatabase":case"kml collection":case"windows mobile package":case"map template":case"desktop application template":case"gml":case"arcpad package":case"code sample":case"document link":case"earth configuration":case"operations dashboard add in":case"rules package":case"workflow manager package":return"datafilesgray";case"form":return t.includes("Survey123")?"survey":"datafilesgray";case"network analysis service":case"geoprocessing service":case"geodata service":case"geometry service":case"geoprocessing package":case"locator package":case"geoprocessing sample":case"workflow manager service":return"toolsgray";case"layer":case"layer package":case"explorer layer":return"layersgray";case"scene package":return"scenepackage";case"mobile scene package":return"mobilescenepackage";case"tile package":case"compact tile package":return"tilepackage";case"task file":return"taskfile";case"report template":return"reporttemplate";case"statistical data collection":return"statisticaldatacollection";case"analysis model":return"geoprocessingmodel";case"insights workbook":return"workbook";case"insights model":return"insightsmodel";case"insights page":return"insightspage";case"insights theme":return"insightstheme";case"hub initiative":return"hubinitiative";case"hub page":return"hubpage";case"hub event":return"hubevent";case"hub site application":return"hubsite";case"hub project":return"hubproject";case"relational database connection":return"relationaldatabaseconnection";case"image":return"image";case"image collection":return"imagecollection";case"style":return t.includes("Dictionary")?"dictionarystyle":"style";case"desktop style":return"desktopstyle";case"dashboard":return"dashboard";case"raster function template":return"rasterprocessingtemplate";case"vector tile package":return"vectortilepackage";case"ortho mapping project":return"orthomappingproject";case"ortho mapping template":return"orthomappingtemplate";case"solution":return"solutions";case"geopackage":return"geopackage";case"deep learning package":return"deeplearningpackage";case"real time analytic":return"realtimeanalytics";case"big data analytic":return"bigdataanalytics";case"feed":return"feed";case"excalibur imagery project":return"excaliburimageryproject";case"notebook":return"notebook";case"reality mapping project":return"realitymappingproject";case"storymap":return t.includes("storymaptemplate")?"storymapstemplate":t.includes("storymapcollection")?"storymapcollection":t.includes("storymapbriefing")?"storymapbriefing":"storymap";case"survey123 add in":return"survey123addin";case"mission":return"mission";case"mission report":return"missionreport";case"quickcapture project":return"quickcaptureproject";case"pro report":return"proreport";case"urban model":return"urbanmodel";case"urban project":return"urbanproject";case"web experience":return"experiencebuilder";case"web experience template":return"webexperiencetemplate";case"experience builder widget":return"experiencebuilderwidget";case"experience builder widget package":return"experiencebuilderwidgetpackage";case"workflow":return"workflow";case"insights script":return"insightsscript";case"kernel gateway connection":return"kernelgatewayconnection";case"hub initiative template":return"hubinitiativetemplate";case"storymap theme":return"storymaptheme";case"knowledge graph":return"knowledgegraph";case"knowledge studio project":return"knowledgestudio";case"knowledge graph layer":return"knowledgegraphlayer";case"native application":return"nativeapp";case"native application installer":return"nativeappinstaller";case"web link chart":return"linkchart";case"knowledge graph web investigation":return"investigation";case"ogcfeatureserver":return"features";case"pro project":return"proproject";case"insights workbook package":return"insightsworkbookpackage";case"apache parquet":return"apacheparquet";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets";case"suitability model":return"suitabilitymodel";case"esri classifier definition":return"classifierdefinition";case"esri classification schema":return"classificationschema";case"insights data engineering workbook":return"dataengineeringworkbook";case"insights data engineering model":return"dataengineeringmodel";case"deep learning studio project":return"deeplearningproject";case"data store":return"datastore";case"data pipeline":return"datapipeline";default:return t.includes("Document")?"datafilesgray":r.includes("service")?"layers":"maps"}}static get assetsDirs(){return["item-icons"]}};s.style=".item-type-icon{pointer-events:none;display:block;height:1rem;margin-top:0.15em !important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{margin-inline-end:0.375rem}";export{s as solution_item_icon}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,c as i,g as e,h as s,H as a}from"./p-1b0588d2.js";import{g as h,l as o}from"./p-ee2cbba0.js";import{g as l,q as n,e as c,f as r,i as d,j as p,c as b}from"./p-952da957.js";import{d as f}from"./p-4f514c6d.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";import"./p-4fe489cf.js";import"./p-2bc98cb0.js";import"./p-4f236b5d.js";import"./p-570b13d9.js";import"./p-0668e30d.js";const u=class{constructor(e){t(this,e),this.createWorkFlowStarted=i(this,"createWorkFlowStarted",7),this.backFromCreateWorkFlow=i(this,"backFromCreateWorkFlow",7),this.featureOrRecordSubmitted=i(this,"featureOrRecordSubmitted",7)}get el(){return e(this)}customInfoText;enableEditGeometry=!1;isMobile;layer;locale;mapView;zoomAndScrollToSelected;selectedFeaturesIds;enableCreateFeatures=!0;selectingFeatureFromMap;_cardLoading=!1;_graphics;_showCreateFeatureComponent=!1;_showSubmitBtn=!1;_translations;_isFeatureCreated=!1;_createFeature;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}createWorkFlowStarted;backFromCreateWorkFlow;featureOrRecordSubmitted;async featureSelectionChange(t){this._showCreateFeatureComponent&&!this._isFeatureCreated&&this._backFromCreateFeature();const i=t.detail;this._graphics=await this._getFeaturesByIds(i)}async layerSelectionChange(t){this._showCreateFeatureComponent&&this._backFromCreateFeature();const i=t.detail[0];this.layer=await l(this.mapView,i)}async componentWillLoad(){await this._getTranslations(),this.selectedFeaturesIds?.length>0&&(this._graphics=await this._getFeaturesByIds(this.selectedFeaturesIds))}render(){const t=this._graphics?.length>0?"":"display-none",i=0===this._graphics?.length&&this._showCreateFeatureComponent?"":"display-none",e=this._graphics?.length>0||this._showCreateFeatureComponent?"display-none":"",h=this.layer?.isTable,o=h?this._translations.createRecord:this._translations.createFeature,l=this.customInfoText?this.customInfoText:this.selectingFeatureFromMap?this._translations.selectFeaturesFromMapToStart:this._translations.selectFeaturesToStart,n=this.enableCreateFeatures&&this.layer?.capabilities?.operations?.supportsAdd;return s(a,{key:"5557aa4d80b859335e38db3f4255f4a61d00560f"},s("div",{key:"6756e3314fc3444a982010a3cfa702d77f05f316",class:"overflow-auto height-full"},s("calcite-shell",{key:"715eb7ed692a1d00347d44f20df370cf9a91ded5",class:"position-relative "+t},s("div",{key:"baf4e97c1884f477e4077a6dc8e59d98c77593a4",class:"position-static z-index-500"},s("info-card",{key:"e2ed262e2ebdf9b79ddd725f073f13d6a17909d2",enableEditGeometry:this.enableEditGeometry,graphics:this._graphics,isLoading:this._cardLoading,isMobile:this.isMobile,locale:this.locale,mapView:this.mapView}))),s("calcite-shell",{key:"536b1dec2a539191f30b648f70a6bdcd447a6d6c",class:"position-relative "+e},s("calcite-panel",{key:"285eb9f07fcaf53c23ccecb44d68ec5bb85c9528"},s("div",{key:"dd180d0c21823d5cb3007c6078c9daa81a487101",class:"padding-1"},s("calcite-notice",{key:"b7d4ffb57b912c0424bef1c828608fd41d12d561",icon:this.selectingFeatureFromMap?"map":"table",iconFlipRtl:!0,open:!0},s("div",{key:"642339477aa8b9e1cba106dcb410ef293363311f",slot:"message"},l))),!this.isMobile&&n&&s("calcite-button",{key:"835562b5a083e7fc6f558d19787d5fa2680c2938",disabled:!this.layer,onClick:()=>this._createFeatureBtnClicked(),slot:"footer",width:"full"},h?this._translations.createRecord:this._translations.createFeature))),s("calcite-shell",{key:"5aeb16a8b0e6e693b7fddd64bf1ec2fe6553f133",class:"position-relative "+i},s("calcite-flow-item",{key:"20487f672aa32832c3b6a576976ad1bb12116814"},s("calcite-panel",{key:"9cc5d827a20afbf3381be0739cc3cc6713af8d66",heading:o},s("calcite-action",{key:"c441e24039efd9ec28471e6b66bfea2a4b5a8454",class:"back-button hydrated",icon:"chevron-left",onClick:this._backFromCreateFeature.bind(this),scale:"s",slot:"header-actions-start",text:""}),this.getEditorComponent(),this._showSubmitBtn&&s("calcite-button",{key:"a858b7a2fb25e257b6c92ca5719fb3a7cc8aedbb",appearance:"solid",class:"footer-top-button footer-button",onClick:()=>{this._createFeature.submit()},slot:"footer",width:"full"},this._translations.create))))))}getEditorComponent(){return s("div",null,this._showCreateFeatureComponent&&s("create-feature",{customizeSubmit:!0,locale:this.locale,mapView:this.mapView,onDrawComplete:()=>{this._showSubmitBtn=!0},onEditingAttachment:t=>{this._showSubmitBtn=!t.detail},onProgressStatus:()=>{setTimeout((()=>{this._isFeatureCreated=!1}),2e3)},onSuccess:this._featureCreated.bind(this),ref:t=>this._createFeature=t,selectedLayerId:this.layer?.id,showGuidingMsgWhileDrawing:!1}))}async _getFeaturesByIds(t){return(t.length>0?await n(t,this.layer,[],!0,this.mapView.spatialReference):[]).sort(((i,e)=>t.indexOf(i.getObjectId())-t.indexOf(e.getObjectId())))}_createFeatureBtnClicked(){this._showCreateFeatureComponent=!0,this.createWorkFlowStarted.emit()}async _backFromCreateFeature(){this._createFeature&&(this._showCreateFeatureComponent=!1,this.backFromCreateWorkFlow.emit()),this._showSubmitBtn=!1}_featureCreated(){this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._isFeatureCreated=!0,this.featureOrRecordSubmitted.emit(),setTimeout((()=>{this._showCreateFeatureComponent=!0}),50)}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"]}}};u.style=":host{display:block !important}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.padding-bottom-1{padding-bottom:1rem}.padding-1{padding:1rem}.position-relative{position:relative}.focus-margin{margin:1px 1px 0px 1px}.overflow-auto{overflow:auto}.height-full{height:100%}.position-static{position:static !important}.z-index-500{z-index:500 !important}card-manager{display:block}";const m=class{constructor(e){t(this,e),this.featureSelectionChange=i(this,"featureSelectionChange",7),this.toggleFilter=i(this,"toggleFilter",7),this.showDelete=i(this,"showDelete",7)}get el(){return e(this)}appLayout;defaultGlobalId;defaultLayerId;defaultOid;enableAutoRefresh;enableColumnReorder=!0;enableCSV;enableInlineEdit;enableShare;honorMapFieldSettings;isMobile;locale;mapHidden;mapInfo;mapView;onlyShowUpdatableLayers;selectedIds=[];shareIncludeEmbed;shareIncludeSocial;showNewestFirst;zoomAndScrollToSelected;zoomToScale;createFilterModal=!0;_allIds=[];_controlsThatFit;_csvExporting=!1;_fetchingData=!1;_filterActive=!1;_filterOpen=!1;_layer;_selectAllActive=!1;_showHideOpen=!1;_showOnlySelected=!1;_toolInfos;_translations;_fullTextSearchInfo;_searchPlaceHolder="";_size=0;_queryingData=!1;FeatureTable;TableTemplate;_columnsInfo;_ctrlIsPressed=!1;_currentId;_editEnabled;_defaultFilterHonored=!1;_defaultGlobalIdHonored=!1;_defaultOidHonored=!1;_defaultVisibleToolSizeInfos;_definitionExpression;_deleteEnabled;_editor;_filterList;_floorExpression;_floorField;_floorFacility;_floorLevel;_floorSite;_layerExpressions;_loaded=!1;_mapClickHandle;_observerSet=!1;_previousCurrentId;reactiveUtils;_refreshHandle;_resizeObserver;_selectAllElement;_selectionFromMap=!1;_shareNode;_shiftIsPressed=!1;_showHideDropdown;_skipOnChange=!1;_moreDropdown;_table;_tableNode;_timeout;_toolbar;_toolbarSizeInfos;_searchExpression;_skipEditCheck=!1;_tempSelectedIds;appLayoutWatchHandler(){this._updateShareUrl()}async defaultOidWatchHandler(){await this._handleDefaults()}async defaultGlobalIdWatchHandler(){await this._handleDefaults()}enableCSVWatchHandler(){this._toolInfos?.length>0&&this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}enableShareWatchHandler(){this._toolbar&&this._updateToolbar()}_controlsThatFitWatchHandler(){const t=this._controlsThatFit?this._controlsThatFit.reduce(((t,i)=>(t.push(i.id),t)),[]):[];this._toolInfos=this._toolInfos?.map((i=>{if(i&&this._controlsThatFit){const e=this._getId(i.icon);return i.isOverflow=t.indexOf(e)<0,i}}))}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}mapHiddenWatchHandler(){this._toolInfos?.length>0&&this._initToolInfos()}isMobileWatchHandler(){this._toolInfos||this.isMobile||this._initToolInfos()}async mapInfoWatchHandler(){this._resetColumnTemplates(),this.createFilterModal&&this._initLayerExpressions(),this._initToolInfos(),this._updateToolbar(),await this._sortTable()}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._floorExpression=void 0,this._searchExpression=void 0,this._updateShareUrl(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",(t=>{this._mapClicked(t)})))}async _layerWatchHandler(){this._fetchingData=!0,await(this._layer?.when((async()=>{this._definitionExpression=this._layer.definitionExpression,this._floorField=this._layer.floorInfo?.floorField,this._updateFloorDefinitionExpression(),await this._resetTable(),this.createFilterModal&&this._initLayerExpressions(),this._updateShareUrl(),this._fetchingData=!1})))}async selectedIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this.selectedIds.length!==this._allIds.length&&(this._selectAllActive=!1),this.selectedIds.length>0&&(this._table.rowHighlightIds.removeAll(),this._table.rowHighlightIds.add(this.selectedIds[0]))}async closeFilter(){await this._closeFilter()}async filterReset(){await this._handleFilterListReset()}async filterUpdate(t){await this._handleFilterUpdate(t)}async validateActiveEdits(){return this._validateActiveEdits([],this.selectedIds)}async refresh(){this._table&&await this._refresh()}featureSelectionChange;toggleFilter;showDelete;async beforeMapInfoChange(t){const i=t.detail.ref,e=t.detail.mapInfo;if(this._hasPendingEdits()){t.preventDefault();const s=await this._validateActiveEdits([],this.selectedIds);await i.setMapByID(s?e.id:t.detail.currentId,!s)}}async editorInitialized(t){this._editor=t.detail}async selectionChanged(t){const i=t.detail.selectedFeature[0],e=i.getObjectId(),s=this._table;if(s.rowHighlightIds.length&&s.rowHighlightIds.removeAll(),s.rowHighlightIds.add(e),this.zoomAndScrollToSelected){const t=this._table.viewModel.getObjectIdIndex(e);this._table.scrollToIndex(t);const s=i.layer;let a;this.mapView.allLayerViews.toArray().some((t=>{if(t.layer.title===s.title&&"feature"===t.layer.type)return a=t,!0})),a&&await c([e],a,this.mapView,!0,void 0,this.zoomToScale)}}async beforeLayerSelectionChange(t){if(this._hasPendingEdits()){t.preventDefault();const i=t.detail.ref,e=await this._validateActiveEdits([],this.selectedIds);return t.detail.selectedIds?await i.setLayerByIds(e?t.detail.newIds:t.detail.currentIds,!0):await i.setLayerById(e?t.detail.newId:t.detail.currentId,!0)}}async layerSelectionChange(t){await this._layerSelectionChanged(t)}async editsComplete(t){const i=t.detail;"delete"!==i&&"add"!==i||(this._allIds=await r(this._layer)),await this._refresh()}async facilityChanged(t){this._floorFacility=t.detail,this._updateFloorDefinitionExpression()}async levelChanged(t){this._floorLevel=t.detail,this._updateFloorDefinitionExpression()}async siteChanged(t){this._floorSite=t.detail,this._updateFloorDefinitionExpression()}async noLayersFound(){this._layer=void 0,this._allIds=[],this._clearSelection()}async clearSelection(){await this._validateActiveEdits([],this.selectedIds)&&this._clearSelection()}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this._onResize())))}render(){const t=this._fetchingData?"display-none":"",i=this._fetchingData?"":"display-none",e=this._queryingData?"":"display-none",h=this._size.toString(),o=this.selectedIds.length.toString(),l=this.isMobile?"height-full":"height-full-adjusted",n=this._canShowFullTextSearch();return this._validateActiveActions(),s(a,{key:"68d6d57fbc9122b15340e0be3426ad00d398c7b2"},s("div",{key:"c4839ef8df0c5d3937b68c444264ce3bbb5c808d"},s("calcite-scrim",{key:"d4fa1a66ddcc5d0e83ee4ee43b2a3230e7f0298f",class:e,loading:this._queryingData}),s("calcite-shell",{key:"2ae1aee8a242902f3fbc9a1a19b62a8b721e5de7"},this._getTableControlRow("header"),s("div",{key:"73d424f4bb07f56245c2c0858544d6cb7d9fcc74",class:`width-full ${l}`},s("calcite-panel",{key:"a2404478e2daf5ebac1ff3ac10378a98c868bcb2",class:"height-full width-full"},n&&s("div",{key:"e18c71ccab7853438c51fe7168b7a98087d215e2",class:"search-container"},s("calcite-input",{key:"39ecb52bacd4560a94310a56faf084941aa44a2a",class:"search",clearable:!0,icon:"search",onCalciteInputChange:t=>{this._searchTextChanged(t)},placeholder:this._searchPlaceHolder,title:this._searchPlaceHolder,type:"search"})),s("calcite-loader",{key:"ce2aeb5e108b1d76da8694a071dcd46098e6bb28",class:i,label:this._translations.fetchingData,scale:"l"}),s("div",{key:"78e596cb45427bb9d21a11368361f67e1ed306a5",class:t,ref:this.onTableNodeCreate}))),this.isMobile?void 0:s("div",{class:"bottom-left text-color height-19"},this._translations.recordsSelected.replace("{{total}}",h).replace("{{selected}}",o))),this.createFilterModal&&this._filterModal()))}_deleteDialog;async componentDidLoad(){this.isMobile||this._observerSet||(this._resizeObserver.observe(this._toolbar),this._observerSet=!0)}componentDidRender(){document.onclick=t=>this._handleDocumentClick(t),document.onkeydown=t=>this._handleKeyDown(t),document.onkeyup=t=>this._handleKeyUp(t),this._updateToolbar()}async _initModules(){const[t,i,e]=await o(["esri/widgets/FeatureTable","esri/core/reactiveUtils","esri/widgets/FeatureTable/support/TableTemplate"]);this.FeatureTable=t,this.reactiveUtils=i,this.TableTemplate=e}async _searchTextChanged(t){this._fullTextSearchInfo.forEach((i=>{i.searchTerm=t.target.value})),this._searchFullText()}async _searchFullText(){let t=[],i=!1;if(this._showOnlySelected)t=this._tempSelectedIds,i=!0;else{if(!await this._validateActiveEdits([],this.selectedIds))return;this._clearSelection(),this._tempSelectedIds=[]}this._searchExpression&&this._clearSearchDefinitionExpression();let e=[];if(this._fullTextSearchInfo.length&&this._fullTextSearchInfo[0].searchTerm){const s=this._layer.createQuery();s.fullText=this._fullTextSearchInfo,e=await this._layer.queryObjectIds(s),i&&t?.length&&(e=e.filter((i=>t.includes(i)))),await this._updateSearchDefinitionExpression(e?.length?e:[-1])}i&&e?.length&&(this._showOnlySelected=!0,this._table.highlightIds.addMany(e.reverse())),await new Promise((t=>setTimeout(t,800))),await this._updateAllIds()}_clearSearchDefinitionExpression(){const t=this._layer.definitionExpression;this._searchExpression&&t?.indexOf(this._searchExpression)>-1&&(this._layer.definitionExpression=t?.indexOf(" AND ("+this._searchExpression)>-1?t.replace(` AND (${this._searchExpression})`,""):t.replace(this._searchExpression,"")),this._searchExpression=void 0}async _updateSearchDefinitionExpression(t){const i=this._layer.definitionExpression;if(t?.length){const e=`objectId in(${t})`;this._layer.definitionExpression=i?.indexOf(this._searchExpression)>-1?i.replace(this._searchExpression,e):i?`${i} AND (${e})`:e,this._searchExpression=e}else this._clearSearchDefinitionExpression()}_canShowFullTextSearch(){return((this._layer?.capabilities)?.query)?.supportsFullTextSearch&&this._layer.indexes.items.filter((t=>"FullText"==t.indexType)).length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],((this._layer?.capabilities)?.query)?.supportsFullTextSearch){const t=this._layer.indexes?.filter((t=>"FullText"==t.indexType));if(t?.length){const i=[];t.forEach((t=>{i.push(...t.fields.split(","))}));const e=[];i.forEach((t=>{const i=this._layer.getField(t.trim());e.push(i.alias)})),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{fields}}",e.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}_onResize(){this._updateToolbar()}_getTableControlRow(t){return s("div",{class:"display-flex height-51-px border-bottom",ref:t=>this._toolbar=t,slot:t},this._getActionBar(),this.isMobile?void 0:this._getDropdown("more-table-options"),this.enableShare&&!this.isMobile?this._getShare("share"):void 0)}_getActionBar(){const t=this.isMobile?"width-full":"",i=this.isMobile?"border-top":"";return s("calcite-action-bar",{class:t,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},s("div",{class:`border-end ${t} ${i}`,id:"solutions-map-layer-picker-container"},s("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,locale:this.locale,mapView:this.mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",scale:"l",selectedIds:this._layer?[this._layer?.id]:[],showSingleLayerAsLabel:!0,showTables:!0,type:"dropdown"})),this.isMobile?void 0:this._getActions())}_getActions(){const t=this._getActionItems();return t?.reduce(((t,i)=>(i&&!i.isOverflow&&t.push(i.isDanger?this._getDangerAction(i.icon,i.label,i.func,i.disabled):i.isSublist&&this._table?.columns?.length>0?s("calcite-dropdown",{closeOnSelectDisabled:!0,id:this._getId(i.icon),onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._showHideDropdown=t},this._getAction(i.active,this._showHideOpen?"chevron-down":i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,"trigger"),this._showHideOpen?this._getFieldlist():void 0):this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading)),t)),[])}_getFieldlist(){return this._columnsInfo?s("calcite-dropdown-group",{"selection-mode":"multiple"},Object.keys(this._columnsInfo).map((t=>{const i=this._columnsInfo[t];return s("calcite-dropdown-item",{id:`layer-table-${t.toLowerCase().replaceAll(" ","")}`,label:t,onClick:t=>{const i=t.target;this._columnsInfo[i.label]=!i.selected,i.selected?this._table.hideColumn(i.label):this._table.showColumn(i.label)},selected:i},t)}))):void 0}_validateEnabledActions(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate,e=["zoom-to-object","pencil","trash","erase","selected-items-filter"];this._toolInfos?.forEach((s=>{s&&e.indexOf(s.icon)>-1&&(s.disabled="pencil"===s.icon?!i:!t)}))}_validateActiveActions(){const t=["filter","list-check-all","selected-items-filter"];this._toolInfos?.forEach((i=>{i&&t.indexOf(i.icon)>-1&&("filter"===i.icon&&(i.indicator=this._filterActive),"list-check-all"===i.icon&&(i.active=this._selectAllActive),"selected-items-filter"===i.icon&&(i.active=this._showOnlySelected))}))}_initToolInfos(){const t=this._featuresSelected(),i=this.selectedIds.length>1&&this._layer?.capabilities?.operations?.supportsUpdate&&!1,e=this._featuresEmpty(),s=this._hasFilterExpressions();this._translations&&(this._toolInfos=[this.mapHidden?void 0:{active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!t,isOverflow:!1},s?{active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this.createFilterModal?this._toggleFilter():this.toggleFilter.emit(),disabled:!1,isOverflow:!1}:void 0,i?{active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>alert(this._translations.editMultiple),disabled:!i,isOverflow:!1}:void 0,this._deleteEnabled?{active:void 0,icon:"trash",indicator:void 0,label:this._translations.delete,func:()=>this._showDelete(),disabled:!t,isDanger:!0,isOverflow:!1}:void 0,{active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>{this.clearSelection()},disabled:!t,isOverflow:!1},{active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!t,isOverflow:!1},{active:!1,icon:"list-check-all",indicator:!1,func:async()=>await this._selectAll(),label:this._translations.selectAll,disabled:e,isOverflow:!1},{active:!1,icon:"compare",indicator:!1,func:async()=>await this._switchSelected(),label:this._translations.switchSelected,disabled:e,isOverflow:!1},{active:!1,icon:"refresh",indicator:!1,func:()=>this._refresh(),label:this._translations.refresh,disabled:!1,isOverflow:!1},this.enableCSV?{active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,loading:this._csvExporting,disabled:e,isOverflow:!1}:void 0,{active:!1,icon:this._showHideOpen?"chevron-down":"chevron-right",indicator:!1,func:()=>this._toggleShowHide(),label:this._translations.showHideColumns,disabled:!1,isOverflow:!1,isSublist:!0}],this._defaultVisibleToolSizeInfos=void 0)}_updateFloorDefinitionExpression(){if(this._floorField&&this._floorLevel){const t=`${this._floorField} = '${this._floorLevel}'`,i=this._layer.definitionExpression;this._layer.definitionExpression=i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):i?`${i} AND (${t})`:t,this._floorExpression=t}}_featuresSelected(){return this.selectedIds.length>0}_featuresEmpty(){return 0===this._allIds.length}_hasFilterExpressions(){let t;return this.mapInfo?.filterConfig?.layerExpressions&&this._layer?.id&&(t=this.mapInfo.filterConfig.layerExpressions.filter((t=>t.id===this._layer.id))),t?.length>0}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),!this.isMobile&&this._toolbar&&this._toolInfos&&(this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const t=this._toolbar.offsetWidth;let i=this._toolbarSizeInfos.reduce(((t,i)=>t+i.width),0);const e=["solutions-more","solutions-map-layer-picker-container","map-picker","solutions-action-share"];if(i>t){if(this._toolbarSizeInfos.length>0){const s=[...this._toolbarSizeInfos].reverse().reduce(((s,a)=>(e.indexOf(a.id)<0&&(i>t?i-=a.width:s.push(a)),s)),[]).reverse();this._setControlsThatFit(s,e)}}else if(this._defaultVisibleToolSizeInfos){const s=this._toolbarSizeInfos.reduce(((t,i)=>(t.push(i.id),t)),[]);let a=!1;const h=[...this._defaultVisibleToolSizeInfos].reduce(((h,o)=>(!a&&e.indexOf(o.id)<0&&(s.indexOf(o.id)>-1||i+o.width<=t)?(s.indexOf(o.id)<0&&(i+=o.width),h.push(o)):e.indexOf(o.id)<0&&i+o.width>t&&(a=!0),h)),[]);this._setControlsThatFit(h,e)}}),250))}_setControlsThatFit(t,i){let e=JSON.stringify(t)!==JSON.stringify(this._controlsThatFit);const s=document.getElementById("solutions-action-bar");s?.childNodes?.forEach((t=>{i.indexOf(t.id)<0&&!e&&(e=this._controlsThatFit.map((t=>t.id)).indexOf(t.id)<0)})),e&&(this._controlsThatFit=[...t])}_setToolbarSizeInfos(){let t=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((i,e)=>{0===e?i.childNodes.forEach((i=>{this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0)})):i.referenceElement||(this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0))})),t&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionItems(){return this._toolInfos?.filter((t=>t&&!t.isOverflow))}_getDropdown(t){const i=this._getDropdownItems();return i.length>0?s("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this._layer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t},s("calcite-action",{appearance:"solid",id:t,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},s("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),s("calcite-dropdown-group",{"selection-mode":"none"},i.map((t=>s("calcite-dropdown-group",{class:`${t.disabled?"disabled":""} ${"trash"===t.icon?"delete-red":""}`,selectionMode:"none"},s("calcite-dropdown-item",{disabled:t.loading,iconStart:t.isSublist&&this._showHideOpen?"chevron-down":t.loading?"":t.icon,id:`layer-table-${t.icon}`,onClick:t.func},t.loading?s("div",{class:"display-flex"},s("calcite-loader",{inline:!0,label:t.label,scale:"m"}),t.label):t.label))))),this._showHideOpen?this._getFieldlist():void 0):void 0}_getDropdownItems(){return this._toolInfos?.filter((t=>t&&t.isOverflow))}_getAction(t,i,e,a,h,o,l,n){const c=void 0===this._layer||o;return s("div",{class:"display-flex",id:this._getId(i),slot:n},s("calcite-action",{active:t,appearance:"solid",disabled:c,icon:i,id:`layer-table-${i}`,indicator:e,label:a,loading:l,onClick:h,text:a,textEnabled:!0}),this._getToolTip("bottom",i,a))}_showDelete(){this.showDelete.emit({ids:this._getIds()})}_getShare(t){return s("div",{class:"share-action",id:this._getId(t)},s("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:t=>this._shareNode=t,scale:"m",shareButtonColor:"neutral",shareButtonType:"action",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",t,this._translations.share))}_updateShareUrl(){const t=this._shareNode?.shareUrl;if(!t)return;const i=new URL(t);this.mapInfo?.id?i.searchParams.set("webmap",this.mapInfo.id):i.searchParams.delete("webmap"),this._layer?.id?i.searchParams.set("layer",this._layer.id):i.searchParams.delete("layer"),this.selectedIds?.length>0?i.searchParams.set("oid",this.selectedIds.join(",")):i.searchParams.delete("oid"),i.searchParams.set("applayout",this.appLayout),this._shareNode.shareUrl=i.href}_getToolTip(t,i,e){return document.getElementById(i)?s("calcite-tooltip",{placement:t,"reference-element":i},s("span",null,e)):void 0}_getId(t){return`solutions-action-${t}`}_getDangerAction(t,i,e,a){const h=void 0===this._layer||a;return s("div",{class:"display-flex",id:this._getId(t)},s("calcite-action",{appearance:"solid",disabled:h,id:t,onClick:e,text:""},s("calcite-button",{appearance:"transparent",iconStart:t,kind:"danger"},i)),this._getToolTip("bottom",t,i))}_getIds(){return this._table?.highlightIds?.map((t=>parseInt(t.toString(),10))).toArray()}onTableNodeCreate=t=>{this._tableNode=t};async _getTable(t,i){this._layer&&(await this._layer.when((()=>{this._table=new this.FeatureTable({autoRefreshEnabled:this.enableAutoRefresh,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,highlightEnabled:!0,multiSortEnabled:!1,visibleElements:{columnDescriptions:!1,header:!1,menu:!1,progress:!1},tableTemplate:{columnTemplates:i},container:t})})),await this._table.when((()=>{const t=this._table.highlightIds.on("change",(t=>{this._handleOnChange(t)}));this._table.viewModel.addHandles(t);const i=this.reactiveUtils.watch((()=>this._table.size),(t=>{this._size=t}));this._table.viewModel.addHandles(i)})))}async _handleOnChange(t){if(!await this._validateActiveEdits([...t.added],[...t.removed]))return;const i=[...this._getIds()];if(this._skipOnChange)this._skipOnChange=!1;else{if(!this._ctrlIsPressed&&!this._shiftIsPressed||this._selectionFromMap&&this._shiftIsPressed)if(this.selectedIds.length>0){this._skipOnChange=!0;const e=this.selectedIds.length>1&&1===t.removed.length?t.removed:i.filter((t=>this.selectedIds.indexOf(t)<0));this._tempSelectedIds=e.length?[...e]:[...this.selectedIds],this._clearSelection(),this.selectedIds=[...e],e.length>0?this._table.highlightIds.add(e[0]):this._skipOnChange=!1}else this.selectedIds=i.reverse(),this._tempSelectedIds=[...this.selectedIds];else if(this._ctrlIsPressed)this.selectedIds=i.reverse(),this._tempSelectedIds=[...this.selectedIds];else if(this._shiftIsPressed&&i?.length>0)if(this._skipOnChange=!0,this._previousCurrentId=this._currentId,this._currentId=[...i].reverse()[0],1===i.length)this._skipOnChange=!1;else if(this._previousCurrentId!==this._currentId){const t=this._table.activeSortOrders.reduce(((t,i)=>(t.push(`${i.fieldName} ${i.direction}`),t)),[]);let e=!1;setTimeout((()=>{e||(this._queryingData=!0)}),500);const s=await d(0,this._layer,[],t);e=!0,this._queryingData=!1;let a=!1;const h=this._table.viewModel.getObjectIdIndex(this._previousCurrentId),o=this._table.viewModel.getObjectIdIndex(this._currentId);this._skipOnChange=(h<o?h:o)+1!==(o>h?o:h);const l=s.reduce(((t,i)=>{const e=i;return e===this._currentId||e===this._previousCurrentId?(a=!a,t.indexOf(e)<0&&t.push(e)):a&&t.indexOf(e)<0&&t.push(e),t}),[]),n=h<o?l.reverse():l;this.selectedIds=[...new Set([...n,...this.selectedIds])],this._tempSelectedIds=[...this.selectedIds],this._table.highlightIds.addMany(this.selectedIds.filter((t=>i.indexOf(t)<0)))}this._finishOnChange()}this._currentId=[...this._getIds()].reverse()[0],this._selectionFromMap=!1}async _validateActiveEdits(t,i){let e=!0;if(this._editor&&!this._skipEditCheck){if(this._hasPendingEdits()){let s=!1;try{await this._editor.cancelWorkflow({force:!1})}catch(t){s="workflow:cancel-denied"===t.name}s&&(e=!1,this._skipEditCheck=!0,t.length>0?this._table.highlightIds.removeMany(t):i.length>0&&this._table.highlightIds.addMany(i))}}else e=!this._skipEditCheck,this._skipEditCheck=!1;return e}_hasPendingEdits(){const t=this._editor?.viewModel?.hasPendingEdits,i=this._editor?.activeWorkflow?.activeWorkflow?.hasPendingEdits;return t||i}_finishOnChange(){this._showOnlySelected&&(this._featuresSelected()?this._table.filterBySelection():this._toggleShowSelected()),this.featureSelectionChange.emit(this.selectedIds)}_resetColumnTemplates(){const t=this._getColumnTemplates(this._layer?.id,this._layer?.fields);0===t?.length?this._tableNode?.classList.add("display-none"):this._tableNode?.classList.remove("display-none");const i=this._table?.tableTemplate?.columnTemplates,e=i&&t&&i.length!==t.length||t?.some(((t,e)=>JSON.stringify(i[e])!==JSON.stringify(t)));if(this._table&&t&&(e||!this._columnsInfo)){this._table.tableTemplate=new this.TableTemplate({columnTemplates:t});const i=t.map((t=>t.fieldName));this._initColumnsInfo(i)}}async _resetTable(){if(this._loaded=!1,this._clearSelection(),this._allIds=await r(this._layer),this._table)this._table.view=this.mapView,this._table.layer=this._layer;else{const t=this._getColumnTemplates(this._layer.id,this._layer?.fields);await this._getTable(this._tableNode,t)}await this._initLayerRefresh(),this._checkEditEnabled(),this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,await this._table.when(),setTimeout((()=>{this._loaded||this.finishLoading()}),1e3),await this.reactiveUtils.once((()=>"loaded"===this._table.state)).then((async()=>{await this.finishLoading()}))}async finishLoading(){try{this._loaded=!0,this._table.highlightIds.removeAll(),this._table.objectIds.removeAll(),this._resetColumnTemplates(),this._showOnlySelected=!1,await this._handleDefaults(),await this._sortTable(),this._initToolInfos(),this._updateToolbar()}catch(t){console.log(t)}}async _initLayerRefresh(){this._refreshHandle&&this._refreshHandle.remove(),this._refreshHandle=this._layer.on("refresh",(t=>{t.dataChanged&&(this._skipOnChange=!0,this._updateAllIds())}))}async _updateAllIds(){this._allIds=await r(this._layer),this.selectedIds=this.selectedIds.filter((t=>this._allIds.indexOf(t)>-1)),await this._refresh()}async _handleDefaults(){if(!this._defaultOidHonored&&this.defaultOid?.length>0&&this.defaultOid[0]>-1&&this._table&&(await this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0,this.defaultOid=void 0,this._showOnlySelected=!1,this._toggleShowSelected()),!this._defaultGlobalIdHonored&&this.defaultGlobalId?.length>0&&this._table){const t=await p(this.defaultGlobalId,this._layer),i=t?.length>0?t.map((t=>t.getObjectId())):void 0;i&&await this._selectDefaultFeature(i),this._defaultGlobalIdHonored=!0,this.defaultGlobalId=void 0,this._showOnlySelected=!1,this._toggleShowSelected()}}_initColumnsInfo(t){const i=this._table?.columns.reduce(((i,e)=>((!t||t?.indexOf(e.name)>-1)&&(i[e.name]=!e.hidden),i)),{}),e=this._table?.columns.map((t=>t.name));(t?t.filter((t=>e.indexOf(t)<0)):[]).forEach((t=>{i[t]=!0})),this._columnsInfo=t?t.reduce(((t,e)=>(t[e]=i[e],t)),{}):i}async _selectDefaultFeature(t){t.length>0&&this._table.highlightIds.addMany(t)}_checkEditEnabled(){this._editEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsUpdate,this._deleteEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsDelete}async _sortTable(){let t,i=this._layer?.objectIdField,e="desc";this.mapInfo?.layerOptions?.layers?.length>0&&this._layer?.id&&(t=this.mapInfo.layerOptions.layers.filter((t=>t.id===this._layer.id)),t&&t.length>0&&(t=t[0],t.sortField&&t.fields?.includes(t.sortField)&&(i=t.sortField),e=t?.sortOrder?t.sortOrder:"desc")),this._table&&this._layer&&(await this._table.when(),await this._layer.when((()=>{this._table.sortColumn(i,e)})))}_forceShowHide(){this._showHideDropdown&&(this._showHideDropdown.open=this._showHideOpen),this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_closeShowHide(){this._showHideOpen=!1}_handleDocumentClick(t){const i=t.target?.id;i.startsWith("layer-table-")?this._moreDropdown.open=!0:this._showHideOpen&&Object.keys(this._columnsInfo).indexOf(i)<0&&"chevron-right"!==i&&(this._closeShowHide(),this._moreDropdown&&(this._moreDropdown.open=!1),this._showHideDropdown&&(this._showHideDropdown.open=!1))}_handleKeyDown(t){this._ctrlIsPressed=t.ctrlKey,this._shiftIsPressed=t.shiftKey}_handleKeyUp(t){this._ctrlIsPressed=t.ctrlKey,this._shiftIsPressed=t.shiftKey}_filterModal(){return alert("_filterModal how does this one get hit??"),s("calcite-dialog",{class:"filter-content-space",heading:this._translations?.filter?.replace("{{title}}",this._layer?.title),id:"solutions-filter-dialog",kind:"brand",modal:!0,onCalciteDialogClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},s("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:()=>{this._closeFilter()},comboboxOverlayPositioning:"fixed",layerExpressions:this._layerExpressions,onFilterListReset:()=>{this._handleFilterListReset()},onFilterUpdate:()=>{this._handleFilterUpdate(this._filterList.filterCount>0)},ref:t=>this._filterList=t,view:this.mapView,zoomBtn:!1}))}async _handleFilterListReset(){this._filterActive=!1,this._updateShareUrl(),await this._searchFullText()}async _handleFilterUpdate(t){const i=this._layer.definitionExpression;if(this._floorExpression){const t=new RegExp(`${this._floorField} = ['].+[']`,"gm");this._layer.definitionExpression=i&&this._floorField&&i.indexOf(`${this._floorField} = '`)>-1?i.replace(t,this._floorExpression):i?`${i} AND (${this._floorExpression})`:this._floorExpression}this._filterActive=t,this._updateShareUrl(),await this._searchFullText()}async _closeFilter(){this._filterOpen&&(this._allIds=await r(this._layer),this._filterOpen=!1)}async _mapClicked(t){const i={include:this._layer},e=await this.mapView.hitTest(t.screenPoint,i);e.results.length>0?(e.results.forEach((t=>{const i=t.graphic.getObjectId();this._table.highlightIds.indexOf(i)<0&&(this._selectionFromMap=!0,this._table.highlightIds.add(i))})),this._showOnlySelected&&this._table.filterBySelection()):await this.clearSelection()}async _selectAll(){const t=this._allIds,i=t.filter((t=>this.selectedIds.indexOf(t)<0));await this._validateActiveEdits(i,this.selectedIds)?(this._table.highlightIds.removeAll(),this._skipOnChange=!0,this._table.highlightIds.addMany(t),this.selectedIds=t,this._finishOnChange(),this._selectAllActive=!0):this._skipEditCheck=!1}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.objectIds.removeAll()}_clearSelection(){this.selectedIds=[],this._table?.highlightIds.removeAll(),this._table?.rowHighlightIds.removeAll(),this._finishOnChange()}_toggleFilter(){this._filterOpen=!this._filterOpen}_initLayerExpressions(){const t=this.mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=t?t.filter((t=>t.id===this._layer?.id)):[],this._filterList.layerExpressions=this._layerExpressions,this._filterActive=this._layerExpressions.filter((t=>t.expressions.filter((t=>t.active)).length>0)).length>0}async _switchSelected(){const t=[...this.selectedIds],i=this._allIds.reduce(((i,e)=>(t.indexOf(e)<0&&i.push(e),i)),[]).sort(((t,i)=>t-i));await this._validateActiveEdits(i,t)?(this._table.highlightIds.removeAll(),this._skipOnChange=!0,this._table.highlightIds.addMany(i),this.selectedIds=i,this._finishOnChange()):this._skipEditCheck=!1}async _exportToCSV(){const t={},i=this._getIds();t[this._layer.id]={selectionSetNames:[this._layer.title],ids:i,layer:this._layer};const e=this._table.columns.toArray().reduce(((t,i)=>(i.hidden||t.push(i.name.toLocaleLowerCase()),t)),[]);this._updateToolInfoLoading("export",!0),this._csvExporting=!0,await f(null,t,!1,!1,!0,e,!0,!0),this._updateToolInfoLoading("export",!1),this._csvExporting=!1}_updateToolInfoLoading(t,i){this._toolInfos.some((e=>{if(e?.icon===t)return e.loading=i,!0}))}async _refresh(){await this._validateActiveEdits([],this.selectedIds)&&(await this._table.refresh(),this._allIds=await r(this._layer),this.featureSelectionChange.emit(this.selectedIds))}async _zoom(){if(this._layer){const t=await b(this.mapView,this._layer.id);await c(this.selectedIds,t,this.mapView,!0,void 0,this.zoomToScale)}}async _layerSelectionChanged(t){const i=t.detail[0];if(i!==this._layer?.id||this._featuresEmpty()){this._fetchingData=!0;const t=await l(this.mapView,i);t&&await t.when((()=>{this._layer=t,this._getFullTextSearchInfo()}))}this._fetchingData=!1}_getColumnTemplates(t,i){let e;this.mapInfo?.layerOptions?.layers.some((i=>{if(i.id===t)return e=i,!0}));const s=this._layer?.attributeTableTemplate?.elements;let a=[];s?.length>0&&this.honorMapFieldSettings&&(a=s.map((t=>t.fieldName)));const h=e?.fields&&e?.fieldOrder?e.fieldOrder.filter((t=>e.fields.indexOf(t)>-1)):a.length>0?a:void 0;let o;return i&&(o=i.reduce(((t,i)=>{const s={type:"field",fieldName:i.name,label:i.alias,menuConfig:this._getMenuConfig(i.name)};return e&&e?.fields?e.fields.indexOf(i.name)>-1&&t.push(s):a.length>0?a.indexOf(i.name)>-1&&t.push(s):t.push(s),t}),[])),h?o?.sort(this._sortFields.bind(this,h)):o}_sortFields(t,i,e){return t?.indexOf(i.fieldName)-t.indexOf(e.fieldName)}_getMenuConfig(t){return{items:[{label:this._translations.hideField,icon:"view-hide",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(t)}}]}}_handleHideClick(t){this._columnsInfo[t]=!1,this._table.hideColumn(t),this._table.tableTemplate.columnTemplates.forEach((i=>{i.fieldName===t&&(i.visible=!1)}))}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{appLayout:["appLayoutWatchHandler"],defaultOid:["defaultOidWatchHandler"],defaultGlobalId:["defaultGlobalIdWatchHandler"],enableCSV:["enableCSVWatchHandler"],enableInlineEdit:["enableInlineEditWatchHandler"],enableShare:["enableShareWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"],locale:["localeWatchHandler"],mapHidden:["mapHiddenWatchHandler"],isMobile:["isMobileWatchHandler"],mapInfo:["mapInfoWatchHandler"],mapView:["mapViewWatchHandler"],_layer:["_layerWatchHandler"],selectedIds:["selectedIdsWatchHandler"]}}};function w(t){return function(t){return-1!==t?.indexOf("http://")}(t)?t.replace(/^http:\/\//,"https://"):t}m.style=':host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir="rtl"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir="rtl"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-foreground-1) !important}.search{--calcite-color-border-input:var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color:var(--calcite-color-status-danger);--calcite-color-text-1:var(--calcite-color-status-danger);--calcite-color-text-3:var(--calcite-color-status-danger)}';const y=class{constructor(e){t(this,e),this.mapChanged=i(this,"mapChanged",7),this.beforeMapChanged=i(this,"beforeMapChanged",7),this.toggleFilter=i(this,"toggleFilter",7),this.clearSelection=i(this,"clearSelection",7)}get el(){return e(this)}appLayout;appProxies;defaultWebmapId="";defaultLayerId;enableHome;enableLegend;enableFloorFilter;enableFullscreen;enableShare=!1;enableSingleExpand=!0;enableSearch;enableBasemap;basemapConfig;hidden;homeZoomIndex=3;homeZoomPosition="top-left";homeZoomToolsSize="m";locale;mapInfos=[];mapWidgetsIndex=0;mapWidgetsPosition="top-right";mapWidgetsSize="m";mapView;stackTools=!0;theme;toolOrder;isMapLayout;shareIncludeEmbed;shareIncludeSocial;selectedFeaturesIds;selectedLayer;zoomToScale;onlyShowUpdatableLayers;isMobile;mapInfo;_translations;_searchConfiguration;_webMapInfo;_showHideOpen=!1;_toolInfos;_controlsThatFit;esriConfig;Home;MapView;WebMap;_defaultWebmapHonored=!1;_homeWidget;_loadedId="";_mapDiv;_mapPicker;_mapTools;_moreDropdown;_mapListExpanded=!1;_filterActive=!1;_definitionExpression;_mapLayerPicker;_resizeObserver;_shareNode;_showHideDropdown;_toolbar;_timeout;_toolbarSizeInfos;_defaultVisibleToolSizeInfos;_observerSet=!1;appLayoutWatchHandler(){this._updateShareUrl()}enableHomeWatchHandler(){this._initHome()}enableShareWatchHandler(){this._toolbar&&this._updateToolbar()}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(){this.mapView&&this._updateShareUrl()}async selectedLayerWatchHandler(){await(this.selectedLayer?.when((async()=>{this._definitionExpression=this.selectedLayer.definitionExpression})))}async selectedFeaturesIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions()}_controlsThatFitWatchHandler(){const t=this._controlsThatFit?this._controlsThatFit.reduce(((t,i)=>(t.push(i.id),t)),[]):[];this._toolInfos=this._toolInfos?.map((i=>{if(i&&this._controlsThatFit){const e=this._getId(i.icon);return i.isOverflow=t.indexOf(e)<0,i}}))}async resetFilter(){this._filterActive=!1,this._updateShareUrl()}async updateFilterState(t){this._filterActive=t,this._updateShareUrl()}async updateLayer(){this._mapLayerPicker.updateLayer()}mapChanged;beforeMapChanged;toggleFilter;clearSelection;async mapInfoChange(t){await this._loadMap(t.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}layerSelectionChange(){setTimeout((()=>{this._initToolInfos()}),50)}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this._updateToolbar())))}render(){const t=this.isMapLayout?"display-flex height-49-px":"",i=this.hidden?"visibility-hidden-1":"",e="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",h=this.mapInfos?.length>1||this.isMapLayout?"map-height":"height-full",o=this.isMapLayout?"":"display-none";return this._validateActiveActions(),s(a,{key:"a47f4ac21db985fb91ff3f5378594f60405f312c"},s("div",{key:"fdf76fd829a8e88725b43f8174a0d95fbf7a3dd1",class:`${t} width-full`,ref:t=>this._toolbar=t},this._getActionBar(),!this.isMobile&&this.isMapLayout&&this._getDropdown("more-table-options"),this.enableShare&&!this.isMobile&&this.isMapLayout?this._getShare("share"):void 0),s("calcite-progress",{key:"b5b672726b4a4c812c386faad2077135a1e1231c",class:o,value:0}),s("div",{key:"f815ef4dba45b53c0ec4a49fe12e741b3331ce51",class:`${h} ${i}`,ref:t=>this._mapDiv=t}),s("map-tools",{key:"8e2ed31f49d349786caa4827a473a8e70e6ae611",basemapConfig:this.basemapConfig,class:`box-shadow ${e}`,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableHome:this.enableHome,enableLegend:this.enableLegend,enableSearch:this.enableSearch,enableSingleExpand:this.enableSingleExpand,homeZoomToolsSize:this.homeZoomToolsSize,locale:this.locale,mapView:this.mapView,mapWidgetsSize:this.mapWidgetsSize,position:this.mapWidgetsPosition,ref:t=>this._mapTools=t,searchConfiguration:this._searchConfiguration,stackTools:this.stackTools,toolOrder:this.toolOrder}))}async componentDidRender(){this.isMapLayout&&this._updateToolbar(),document.onclick=t=>this._handleDocumentClick(t)}async componentDidLoad(){this.isMobile||this._observerSet||(this._resizeObserver.observe(this._toolbar),this._observerSet=!0),this._updateShareUrl()}async _initModules(){const[t,i,e,s]=await o(["esri/WebMap","esri/views/MapView","esri/widgets/Home","esri/config"]);this.WebMap=t,this.MapView=i,this.Home=e,this.esriConfig=s}async _loadMap(t){const i=!this._defaultWebmapHonored&&this.defaultWebmapId,e=this.mapInfos?.filter((t=>t.id===this.defaultWebmapId)),s=JSON.stringify(t)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&e?e[0]:!t?.id&&this.mapInfos.length>0?this.mapInfos[0]:t;const a=this._webMapInfo.id,h=i&&t?.id===this.defaultWebmapId;if(this._loadedId!==a&&!i||h){const t=new this.WebMap({portalItem:{id:a}});this.appProxies&&(await t.load(),await(o=t,l=this.esriConfig,n=this.appProxies,n&&n.forEach((t=>{o.allLayers.forEach((i=>{i&&i.url===t.sourceUrl&&(i.url=w(t.proxyUrl),i.portalItem&&i.portalItem.when((()=>{i.portalItem.url=w(t.proxyUrl)})),l.request?.interceptors?.push({urls:t.sourceUrl,before:i=>{i.url&&i.url===t.sourceUrl&&(i.url=w(t.proxyUrl))}}))}))})),o)),this.mapView=new this.MapView({container:this._mapDiv,map:t,resizeAlign:"center"}),this._loadedId=a,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),await this.mapView.when((()=>{this._initHome(),this.mapView.ui.add(this._mapTools,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=!!h||this._defaultWebmapHonored,this.mapChanged.emit({id:a,mapView:this.mapView})}))}else i?(this._defaultWebmapHonored=!0,this._mapPicker.setMapByID(a)):s&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:a,mapView:this.mapView}));var o,l,n;this._updateShareUrl()}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),!this.isMobile&&this._toolbar&&this._toolInfos&&(this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const t=this._toolbar.offsetWidth;let i=this._toolbarSizeInfos.reduce(((t,i)=>t+i.width),0);const e=["solutions-more","solutions-map-layer-picker-container","map-picker","solutions-action-share"];if(i>t){if(this._toolbarSizeInfos.length>0){const s=[...this._toolbarSizeInfos].reverse().reduce(((s,a)=>(e.indexOf(a.id)<0&&(i>t?i-=a.width:s.push(a)),s)),[]).reverse();this._setControlsThatFit(s,e)}}else if(this._defaultVisibleToolSizeInfos){const s=this._toolbarSizeInfos.reduce(((t,i)=>(t.push(i.id),t)),[]);let a=!1;const h=[...this._defaultVisibleToolSizeInfos].reduce(((h,o)=>(!a&&e.indexOf(o.id)<0&&(s.indexOf(o.id)>-1||i+o.width<=t)?(s.indexOf(o.id)<0&&(i+=o.width),h.push(o)):e.indexOf(o.id)<0&&i+o.width>t&&(a=!0),h)),[]);this._setControlsThatFit(h,e)}}),250))}_setControlsThatFit(t,i){let e=JSON.stringify(t)!==JSON.stringify(this._controlsThatFit);const s=document.getElementById("solutions-action-bar");s?.childNodes?.forEach((t=>{i.indexOf(t.id)<0&&!e&&(e=this._controlsThatFit.map((t=>t.id)).indexOf(t.id)<0)})),e&&(this._controlsThatFit=[...t])}_setToolbarSizeInfos(){let t=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((i,e)=>{0===e?i.childNodes.forEach((i=>{this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0)})):i.referenceElement||(this._toolbarSizeInfos.push({id:i.id,width:i.offsetWidth}),t||(t=i.offsetWidth>0))})),t&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionBar(){const t=this.mapInfos?.length>1?"":"display-none",i=this.isMapLayout?"display-flex":"display-block",e=this.isMobile?"border-top":"",a=this.isMapLayout?"":"display-none";return s("calcite-action-bar",{class:i,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},s("map-picker",{class:t,id:"map-picker",isMapLayout:this.isMapLayout,locale:this.locale,mapInfos:this.mapInfos,ref:t=>this._mapPicker=t}),s("div",{class:`mapView-header display-flex ${a}`,id:"solutions-map-layer-picker-container"},s("div",{class:`border-end ${i} ${e}`},this.mapView&&s("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,locale:this.locale,mapView:this.mapView,onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",ref:t=>this._mapLayerPicker=t,scale:"l",selectedIds:this.selectedLayer?[this.selectedLayer.id]:[],showSingleLayerAsLabel:!0,showTables:!0,showTablesDisabled:!0,type:"dropdown"}))),!this.isMobile&&this.isMapLayout?this._getActions():void 0)}_getDropdown(t){const i=this._getDropdownItems();return i.length>0?s("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this.selectedLayer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:t=>this._moreDropdown=t},s("calcite-action",{appearance:"solid",id:t,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},s("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),s("calcite-dropdown-group",{"selection-mode":"none"},i.map((t=>s("calcite-dropdown-group",{class:t.disabled?"disabled":"",selectionMode:"none"},s("calcite-dropdown-item",{disabled:t.loading,iconStart:t.icon,id:"solutions-subset-list",onClick:t.func},t.loading?s("div",{class:"display-flex"},s("calcite-loader",{inline:!0,label:t.label,scale:"m"}),t.label):t.label)))))):void 0}_getShare(t){return s("div",{class:"share-action",id:this._getId(t)},s("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:t=>{this._shareNode=t,this._updateShareUrl()},scale:"m",shareButtonColor:"neutral",shareButtonType:"action",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",t,this._translations.share))}_updateShareUrl(){const t=this._shareNode?.shareUrl;if(!t)return;const i=new URL(t);this._loadedId?i.searchParams.set("webmap",this._loadedId):i.searchParams.delete("webmap"),this.selectedLayer?.id?i.searchParams.set("layer",this.selectedLayer.id):i.searchParams.delete("layer"),this.selectedFeaturesIds?.length>0?i.searchParams.set("oid",this.selectedFeaturesIds.join(",")):i.searchParams.delete("oid"),i.searchParams.set("applayout",this.appLayout),this._shareNode.shareUrl=i.href}_closeShowHide(){this._showHideOpen=!1}_getDropdownItems(){return this._toolInfos?.filter((t=>t&&t.isOverflow))}_initToolInfos(){const t=this.selectedFeaturesIds?.length>0,i=this._hasFilterExpressions(),e=this.selectedFeaturesIds?.length>1&&!1;this._translations&&(this._toolInfos=[{active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!t,isOverflow:!1},i?{active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this._toggleFilter(),disabled:!1,isOverflow:!1}:void 0,e?{active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>alert(this._translations.editMultiple),disabled:!e,isOverflow:!1}:void 0,{active:!1,icon:"refresh",indicator:!1,label:this._translations.refresh,func:()=>this.selectedLayer.refresh(),disabled:!1,isOverflow:!1},{active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this.clearSelection.emit(),disabled:!t,isOverflow:!1}],this._defaultVisibleToolSizeInfos=void 0)}_validateActiveActions(){const t=["filter"];this._toolInfos?.forEach((i=>{i&&t.indexOf(i.icon)>-1&&"filter"===i.icon&&(i.indicator=this._filterActive)}))}_validateEnabledActions(){const t=this.selectedFeaturesIds?.length>0,i=this.selectedFeaturesIds?.length>1&&this.selectedLayer?.capabilities?.operations?.supportsUpdate,e=["zoom-to-object","pencil","erase"];this._toolInfos?.forEach((s=>{s&&e.indexOf(s.icon)>-1&&(s.disabled="pencil"===s.icon?!i:!t)}))}_initHome(){if(this.enableHome){this._homeWidget=new this.Home({view:this.mapView}),this.mapView.ui.add(this._homeWidget,{position:this.homeZoomPosition,index:this.homeZoomIndex});const t="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";this._homeWidget.domNode.style.height=t,this._homeWidget.domNode.style.width=t}else this._homeWidget&&this.mapView.ui.remove(this._homeWidget)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_forceShowHide(){this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_handleDocumentClick(t){const i=t.target?.id;"solutions-subset-list"===i?this._moreDropdown.open=!0:this._showHideOpen&&"solutions-subset-list"!==i&&"solutions-more"!==i&&"chevron-down"!==i&&this._moreDropdown&&(this._showHideOpen=!1,this._moreDropdown.open=!1),"MAP-PICKER"===t.target.tagName&&(this._mapListExpanded=!this._mapListExpanded,this._mapPicker.toggle(this._mapListExpanded)),"MAP-PICKER"!==t.target.tagName&&(this._mapListExpanded=!1,this._mapPicker.close())}async _zoom(){if(this.selectedLayer){const t=await b(this.mapView,this.selectedLayer.id);await c(this.selectedFeaturesIds,t,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_hasFilterExpressions(){let t;return this.mapInfo?.filterConfig?.layerExpressions&&this.selectedLayer?.id&&(t=this.mapInfo.filterConfig.layerExpressions.filter((t=>t.id===this.selectedLayer.id))),t?.length>0}_getActions(){const t=this._getActionItems();return t?.reduce(((t,i)=>(i&&!i.isOverflow&&t.push(this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading)),t)),[])}_getToolTip(t,i,e){return document.getElementById(i)?s("calcite-tooltip",{placement:t,"reference-element":"map-"+i},s("span",null,e)):void 0}_getActionItems(){return this._toolInfos?.filter((t=>t&&!t.isOverflow))}_getAction(t,i,e,a,h,o,l,n){const c=void 0===this.selectedLayer||o;return s("div",{class:"display-flex",id:this._getId(i),slot:n},s("calcite-action",{active:t,appearance:"solid",disabled:c,icon:i,id:"map-"+i,indicator:e,label:a,loading:l,onClick:h,text:a,textEnabled:!0}),this._getToolTip("bottom",i,a))}_getId(t){return`solutions-action-${t}`}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{appLayout:["appLayoutWatchHandler"],enableHome:["enableHomeWatchHandler"],enableShare:["enableShareWatchHandler"],locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"],selectedLayer:["selectedLayerWatchHandler"],selectedFeaturesIds:["selectedFeaturesIdsWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"]}}};y.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 53px)}.height-full{height:100%}.height-49-px{height:49px}.box-shadow{box-shadow:none !important}.visibility-hidden-1{visibility:hidden;height:1px;}.display-none{display:none}.display-block{display:block}";export{u as card_manager,m as layer_table,y as map_card}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{l}from"./p-08ad0b7a.js";async function n(n,t,e){const[o]=await l(["esri/layers/effects/jsonUtils"]),{toJSON:s,fromJSON:i}=o,c=null==t?void 0:t.layer;if(!n)return(null==c?void 0:c.effect)?c.effect:(null==c?void 0:c.featureEffect)?"includedEffect"===e?c.featureEffect.includedEffect:c.featureEffect.excludedEffect:null;const f=s(n);let r;r=c.featureEffect?"includedEffect"===e?c.featureEffect.includedEffect:c.featureEffect.excludedEffect:c.effect;const u=r?s(r):null;if(!u)return i(f);let a=[...u];return f&&f.forEach((l=>{a.forEach((n=>{const{value:t}=n;if(t)t.forEach(((e,o)=>{e.type===l.type?t[o]=l:!n.value.find((l=>l.type===f[0].type))&&(n.value=[...n.value,...f])}));else{const t=!a.find((l=>l.type===n.type));!a.find((n=>n.type===l.type))&&(a=[...a,l]),t&&(a=[...a,n])}}))})),i(a)}export{n as g}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,c as i,g as e,h as s,F as a,H as n}from"./p-1b0588d2.js";import{l as o,g as h}from"./p-ee2cbba0.js";import{a as c,g as d}from"./p-952da957.js";import{P as l}from"./p-3c3aecdd.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";import"./p-4f514c6d.js";import"./p-4fe489cf.js";import"./p-2bc98cb0.js";import"./p-4f236b5d.js";import"./p-570b13d9.js";import"./p-0668e30d.js";const r=class{constructor(e){t(this,e),this.success=i(this,"success",7),this.fail=i(this,"fail",7),this.drawComplete=i(this,"drawComplete",7),this.editingAttachment=i(this,"editingAttachment",7),this.progressStatus=i(this,"progressStatus",7),this.modeChanged=i(this,"modeChanged",7)}get el(){return e(this)}mapView;selectedLayerId;customizeSubmit=!1;locale;searchConfiguration;isMobile;floorLevel;formElements;enableSearch=!1;showGuidingMsg=!0;showGuidingMsgWhileDrawing=!0;_editorLoading=!1;_currentPage="templatePicker";_translations;Editor;ExpressionInfo;FieldElement;FormTemplate;_editor;FeatureLayer;MapView;_updatedMapView;Search;_search;reactiveUtils;_addingAttachment;_container;_mapViewContainer;_isSubmitBtnClicked=!1;_selectedLayer;_searchDiv;_calciteNotice;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this.init()}))}async isMobileHandler(){this.modeChanged.emit()}async _editorLoadingWatchHandler(t){if(t){if(this._container?.classList.add("display-none"),this._selectedLayer?.isTable){const t={layer:this._selectedLayer,template:this._selectedLayer.templates[0]};await this._editor.startCreateFeaturesWorkflowAtFeatureCreation(t),await this.hideEditorsElements()}else await this.startCreate();this._container?.classList.remove("display-none"),this._editorLoading=!1}}async submit(){this._editor&&(this._isSubmitBtnClicked=!0,this._editor.viewModel.featureFormViewModel.submit())}async refresh(t){this._editor&&this._setFloorLevel(t)}success;fail;drawComplete;editingAttachment;progressStatus;modeChanged;async componentWillLoad(){await this._getTranslations(),await this.initModules()}async componentDidLoad(){await this.init()}componentDidRender(){this.isMobile&&(this._mapViewContainer.style.top=`${this._calciteNotice.offsetHeight+this._searchDiv.offsetHeight+80}px`)}disconnectedCallback(){this._editor&&this._editor.destroy()}render(){const t="drawing"===this._currentPage?"":"display-none",i=this._editorLoading?"":"display-none",e=this._editorLoading?"display-none":"",n=this.isMobile?"show-map":"display-none";let o=this._translations.chooseCategoryMsg;return"drawing"===this._currentPage?o=this._translations.provideLocationMsg:"featureForm"===this._currentPage&&(o=this._translations.provideDetailsMsg),s(a,{key:"829e66e8b4818b2566d514ae85eddc50968075f8"},this.showGuidingMsg&&(this.showGuidingMsgWhileDrawing||"drawing"!==this._currentPage)&&s("calcite-notice",{key:"0347181f26f5d87d38f8be185e0b43ffbbc34208",class:"notice-msg",icon:"lightbulb",kind:"success",open:!0,ref:t=>this._calciteNotice=t},s("div",{key:"e5dd776ead66c26184a5aad747e82d97612d961a",slot:"message"},o)),s("calcite-loader",{key:"7989ecdbb4b635d38a1d63bf879d7e95b3f9a9be",class:i,label:"",scale:"s"}),s("div",{key:"6f6184af21e8a0595e5c51c132e657e7660caa01",class:e,id:"feature-form"}),this.enableSearch&&s("div",{key:"2068ca424a9355a28c9957104a4f6973b11c1b8f",class:`search-widget ${t} ${e}`,id:"search-widget-ref",ref:t=>this._searchDiv=t}),s("div",{key:"a899d52788e6cfa67fe77abbbe0eeb6383b40d0a",class:`${n}`,ref:t=>{this._mapViewContainer=t}}))}async init(){this.mapView&&this.selectedLayerId&&(this._updatedMapView=this.mapView,await(this.isMobile?this.createMobileMapView():this._loadWidgets()))}async initModules(){const[t,i,e,s,a,n,h]=await o(["esri/widgets/Editor","esri/core/reactiveUtils","esri/widgets/Search","esri/form/ExpressionInfo","esri/form/elements/FieldElement","esri/form/FormTemplate","esri/views/MapView"]);this.Editor=t,this.reactiveUtils=i,this.Search=e,this.ExpressionInfo=s,this.FieldElement=a,this.FormTemplate=n,this.MapView=h}async createMobileMapView(){this._mapViewContainer.classList.add("hide-map"),await new this.MapView({map:this.mapView.map,container:this._mapViewContainer,zoom:this.mapView.zoom}).when((t=>{this._updatedMapView=t,this._loadWidgets()}),(t=>{console.log(t)}))}async _loadWidgets(){await this.createEditorWidget(),this.enableSearch&&await this.createSearchWidget()}async createEditorWidget(){this._editor&&this._editor.destroy();const t=[];this._container=document.createElement("div"),this._container?.classList.add("display-none");const i=await c(this._updatedMapView);this._selectedLayer=await d(this.mapView,this.selectedLayerId),this._selectedLayer?.isTable||i.forEach((async i=>{t.push({layer:i,enabled:"feature"===i?.type&&i?.id===this.selectedLayerId,addEnabled:!0,updateEnabled:!1,deleteEnabled:!1})})),this._editor=new this.Editor({view:this._updatedMapView,layerInfos:t,visibleElements:{snappingControls:!1,createFeaturesSection:!0,editFeaturesSection:!1},container:this._container}),this._mapViewContainer?this.el.insertBefore(this._container,this._mapViewContainer):this.el.appendChild(this._container);const e=this.reactiveUtils.watch((()=>this._editor.viewModel.state),(t=>{"adding-attachment"===t||"editing-attachment"===t?(this._addingAttachment=!0,this.editingAttachment.emit(!0)):this._addingAttachment&&(this.editingAttachment.emit(!1),this._addingAttachment=!1)}));this._editor.viewModel.addHandles(e);const s=this.reactiveUtils.watch((()=>this._editor.viewModel.featureTemplatesViewModel.state),(t=>{"ready"===t&&"create-features"!==this._editor.viewModel?.activeWorkflow?.type&&(this.progressStatus.emit(50),this._editorLoading=!0)}));this._editor.viewModel.addHandles(s);const a=this.reactiveUtils.watch((()=>this._editor.viewModel.featureFormViewModel?.state),(t=>{"ready"===t&&(this._mapViewContainer?.classList?.replace("show-map","hide-map"),this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this)),setTimeout((()=>{this._setFloorLevel(this.floorLevel)}),50),this._currentPage="featureForm",this.progressStatus.emit(100),this.drawComplete.emit())}));this._editor.viewModel.addHandles(a);const n=this.reactiveUtils.watch((()=>this._editor.viewModel.state),(t=>{"creating-features"===t&&"disabled"===this._editor.viewModel.featureFormViewModel.state&&(this._mapViewContainer?.classList?.replace("hide-map","show-map"),this._selectedLayer&&!this._selectedLayer.isTable&&(this._currentPage="drawing"))}));this._editor.viewModel.addHandles(n)}async startCreate(){return await this.hideEditorsElements(),new Promise(((t,i)=>{if(this._editor.viewModel.featureTemplatesViewModel.items?.length){const e=this._editor.viewModel.featureTemplatesViewModel.items[0].items;this._editor.viewModel.featureTemplatesViewModel.on("select",(()=>{this.progressStatus.emit(75),setTimeout((()=>{this.hideEditorsElements().then((()=>{t({})}),(t=>i(t)))}),700)})),1===e.length&&this._editor.viewModel.featureTemplatesViewModel.select(e[0]);const s=e.length>1;this.hideEditorsElements().then((()=>{s&&t({})}),(t=>s&&i(t)))}}))}async createSearchWidget(){let t={view:this._updatedMapView};this.searchConfiguration&&(t={...this._getSearchConfig(this.searchConfiguration,this._updatedMapView)}),this._search=new this.Search(t),this._search.container="search-widget-ref",this._search.popupEnabled=!1,this._search.resultGraphicEnabled=!1;let i=null;this._search.on("search-complete",(t=>{this._updatedMapView.goTo(t.results[0].results[0].extent),"point"===this._selectedLayer.geometryType&&(i=t.results[0].results[0]?.feature.geometry)}));const e=this.reactiveUtils.watch((()=>this._search.viewModel.state),(t=>{"ready"===t&&setTimeout((()=>{this._editor.viewModel.sketchViewModel.createGraphic&&i&&(this._editor.viewModel.sketchViewModel.createGraphic.set("geometry",i),this._editor.viewModel.sketchViewModel.complete(),this.hideEditorsElements())}),100)}));this._search.viewModel.addHandles(e)}_getSearchConfig(t,i){const e=t.sources;return e?.length>0?(t.includeDefaultSources=!1,e.forEach((t=>{if(t.hasOwnProperty("layer")){const e=t,s=e.layer?.id,a=s?i.map.findLayerById(s):null,n=e?.layer?.url;a?e.layer=a:n&&(e.layer=new this.FeatureLayer(n))}})),e?.forEach((t=>{if(t.hasOwnProperty("locator")){const i=t;"ArcGIS World Geocoding Service"===i?.name&&(i.outFields=i.outFields||["Addr_type","Match_addr","StAddr","City"],i.singleLineFieldName="SingleLine"),i.url=i.url,delete i.url}}))):t={...t,includeDefaultSources:!0},t}async _setFloorLevel(t){if(!t)return;const i=this._selectedLayer;if(i?.floorInfo?.floorField){const e=i.fields.find((t=>t.name===i.floorInfo.floorField));if(e&&!i?.formTemplate)this._editor.viewModel.featureFormViewModel.setValue(e.name,t),e.editable=!1;else if(i.formTemplate&&this.formElements){const e=new this.ExpressionInfo({expression:`"${t}"`,name:"floor-info-test",title:"Floor Info",returnType:"string"}),s=new this.FieldElement({label:i.floorInfo.floorField,editableExpression:"false",fieldName:i.floorInfo.floorField,input:{type:"text-box",maxLength:50,minLength:0},valueExpression:e.name});this._updatedMapView.map.editableLayers.forEach((t=>{const i=this.formElements.orgExpressionInfos,a=[...this.formElements.orgElements];a.push(s);const n=new this.FormTemplate({title:t.formTemplate.title,description:t.formTemplate.description,elements:a,expressionInfos:[e].concat(i)});t.formTemplate=n}))}}}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector(".esri-editor")?.querySelectorAll("calcite-flow-item")?.forEach((t=>{const i=t.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");i?.querySelector("header")?.setAttribute("style","display: none"),i?.querySelector("footer")?.setAttribute("style","display: none")})))}async submitted(t){if(t.invalid.length)this._isSubmitBtnClicked=!1;else if(this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{await this._editor.activeWorkflow.commit(),this._editor.viewModel.failures?.length&&this._editor.viewModel.failures.some((t=>{if(t.error)throw t.error}))}catch(t){return void this.fail.emit(t)}this.success.emit()}}timeout(t){return new Promise((i=>setTimeout(i,t)))}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"],isMobile:["isMobileHandler"],_editorLoading:["_editorLoadingWatchHandler"]}}};r.style=":host{display:block}.esri-editor__panel-toolbar{display:none !important}.esri-editor__panel-content{padding-block:0px !important}.esri-editor .esri-item-list__group__header{display:none !important}.esri-editor__panel-content__section .esri-widget__heading{display:none !important}.esri-editor .esri-item-list__filter-container--sticky{padding-block:0px !important;padding-inline:10px !important}.search-widget{width:92% !important;margin:5px 14px 20px 14px}.display-none{display:none !important}.hide-map{height:1%;visibility:hidden}.show-map{padding:10px !important;position:absolute !important;bottom:0;height:auto !important;width:calc(100% - 22px)}.notice-msg{padding:10px;width:calc(100% - 20px)}.esri-editor__panel-content{padding-block:10px !important}@media only screen and (max-width: 600px){.esri-editor__panel-content{padding-block:0 !important;min-height:0 !important}}";const p=class{constructor(e){t(this,e),this.editsComplete=i(this,"editsComplete",7)}get el(){return e(this)}deleteDialog;buttonType="button";disabled=!1;icon;ids=[];layer;locale;_confirmDelete=!1;_deleteEndabled=!1;_supportsDelete;_translations;async idsWatchHandler(){this._setDeleteEnabled()}async layerWatchHandler(){this._setDeleteEnabled()}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}editsComplete;async componentWillLoad(){await this._getTranslations()}render(){return s(n,{key:"73d07f24703df76fdacc1b3a1ec80cfdd7bbee30"},"button"===this.buttonType?s("calcite-button",{appearance:"outline",disabled:!this._deleteEndabled,id:"solutions-delete",kind:"danger",onClick:()=>this._delete(),width:"full"},this._translations.deleteCount.replace("{{n}}",this.ids.length.toString())):s("calcite-action",{appearance:"solid",disabled:!this._deleteEndabled,id:this.icon,onClick:()=>this._delete(),scale:"s",text:this._translations.delete},s("calcite-button",{appearance:"transparent",iconStart:this.icon,kind:"danger"},this._translations.delete)),this._deleteMessage(),s("calcite-tooltip",{key:"803898895029bd098264b9144ff5ccee102d4ae8",placement:"bottom","reference-element":"button"===this.buttonType?"solutions-delete":this.icon},s("span",{key:"a920ffea1849667cd58812a2c1813d2e066f0064"},this._translations.delete)))}async componentDidLoad(){this._setDeleteEnabled()}_setDeleteEnabled(){this._supportsDelete=this.layer?.editingEnabled&&this.layer?.capabilities?.operations?.supportsDelete,this._deleteEndabled=!this.disabled||this._supportsDelete&&this.ids.length>0}_delete(){this._confirmDelete=!0}_deleteMessage(){return this.deleteDialog?this.deleteDialog:s("delete-dialog",{id:"solution-delete-dialog",ids:this.ids,layer:this.layer,locale:this.locale,onDeleteDialogClose:()=>this._confirmDelete=!1,open:this._confirmDelete})}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{ids:["idsWatchHandler"],layer:["layerWatchHandler"],locale:["localeWatchHandler"]}}};p.style=":host{display:block}.delete-modal{position:fixed}";const f=class{constructor(e){t(this,e),this.closeEdit=i(this,"closeEdit",7),this.editorInitialized=i(this,"editorInitialized",7),this.editsComplete=i(this,"editsComplete",7),this.refreshGraphics=i(this,"refreshGraphics",7)}get el(){return e(this)}enableEditGeometry=!1;graphics;locale;mapView;open=!1;graphicIndex=0;_editorLoading=!1;_translations;_activeWorkflowHandle;_addRelatedRecordHandle;_attachmentHandle;_editHandle;_layerEditHandle;Editor;_editor;_layer;_editContainer;_editControlElements;_editingDisabled;_shouldClose=!1;reactiveUtils;async graphicsWatchHandler(){0===this.graphics.length&&this.open&&await this._closeEdit(!0)}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async openWatchHandler(t){t&&this.graphics?.length>0&&this.graphicIndex>-1&&(this._editorLoading=!0,await this._initEditorWidget(),this.graphicIndex>-1&&this.graphics.length>0&&this.open&&!this._shouldClose&&await this._startUpdate(),this._editorLoading=!1),t||await this._closeEdit(!0)}closeEdit;editorInitialized;editsComplete;refreshGraphics;async featureSelectionChange(){this.open&&await this._closeEdit(!1)}async componentWillLoad(){await this._initModules(),await this._getTranslations()}async componentWillRender(){this.graphics?.length>0&&this.graphics[0]?.layer&&(this._layer=this.graphics[0].layer,this._layerEditHandle&&this._layerEditHandle.remove(),this._layerEditHandle=("subtype-sublayer"===this._layer.type?this._layer.parent:this._layer).on("edits",(()=>{this.editsComplete.emit()})))}render(){const t=this._editorLoading?"display-none":"position-absolute",i=this._editorLoading?"":"display-none";return s(n,{key:"e181f65e7218ce0350de5dcab9049ff63a5d39c1"},s("div",{key:"44bf2b5cf31c5acc7f65fb7ec50fd84e77c95470",class:"position-absolute"},this.graphics?.length>0&&this.graphics[0]&&this.graphics[0].layer.editingEnabled?void 0:s("calcite-notice",{kind:"warning",open:!0,slot:"content-top",width:"full"},s("div",{slot:"message"},this._translations.enableEditing)),s("div",{key:"97119476aa2a992ccadc1d61119f2640d195e7b1",class:"position-absolute"},s("div",{key:"f429decea684a6a22db89de89da3755bdbff19cc",class:t,id:"feature-form",ref:t=>this._editContainer=t}),s("calcite-loader",{key:"3ea908ef8dadd2f1c85bfac1b344f8b4441b8706",class:i,label:"",scale:"s"}))))}async _initModules(){const[t,i]=await o(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}async _initEditorWidget(){if(this.mapView&&this.graphics&&this.graphics.length>0&&this.graphics[0]){this._editor&&this._editor.destroy();const t=document.createElement("div"),i=(await c(this.mapView)).map((t=>({layer:t,geometryUpdatesEnabled:this.enableEditGeometry})));this._editor=new this.Editor({view:this.mapView,layerInfos:i,visibleElements:{snappingControls:!1},container:t}),this._attachmentHandle&&this._activeWorkflowHandle&&(this._attachmentHandle.remove(),this._activeWorkflowHandle.remove()),this._attachmentHandle=this.reactiveUtils.when((()=>"adding-attachment"===this._editor.viewModel.state||"editing-attachment"===this._editor.viewModel.state||"creating-features"===this._editor.viewModel.state),(()=>{this._shouldClose=!1})),this._activeWorkflowHandle=this.reactiveUtils.watch((()=>this._editor.viewModel.activeWorkflow?.activeWorkflow),(t=>{"update-table-record"!==t?.type&&"create-features"!==t?.type||(this._shouldClose=!1),(t?.type||t?.hasPendingEdits||this._editor.activeWorkflow)&&this._editor?.activeWorkflow?.started||(this.open=!1)})),this._editContainer.appendChild(t),this.editorInitialized.emit(this._editor)}}async _closeEdit(t){this._shouldClose=!0,t&&this._editor?.activeWorkflow?(this._editor.activeWorkflow?.activeWorkflow?.hasPendingEdits&&(await this._editor.activeWorkflow.reset(),await this._editor.cancelWorkflow()),this._editor.destroy()):this.graphicIndex>-1&&this.graphics?.length>0&&this.refreshGraphics.emit(this.graphics),this._shouldClose=!1,this.closeEdit.emit()}async _startUpdate(){await this._editor.startUpdateWorkflowAtFeatureEdit(this.graphics[this.graphicIndex]),this._shouldClose=!0}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{graphics:["graphicsWatchHandler"],locale:["localeWatchHandler"],open:["openWatchHandler"]}}};f.style=":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-color-foreground-1) !important}.esri-feature__content-node{background-color:var(--calcite-color-foreground-1) !important}.esri-editor__panel-toolbar{display:none !important}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-editor__panel-content{padding-block:10px !important}";const b=class{constructor(e){t(this,e),this.popupClosed=i(this,"popupClosed",7),this.selectionChanged=i(this,"selectionChanged",7)}get el(){return e(this)}enableEditGeometry=!1;graphics;isLoading=!1;isMobile;mapView;allowEditing=!0;highlightEnabled=!0;locale;paginationEnabled=!0;position="absolute";_alertOpen=!1;_count="";_editRecordOpen=!1;_mobileTitle="";_showListView=!1;_translations;Features;_editEnabled;_features;_layer;_popupUtils;_featuresNodeId="features-node"+(new Date).getMilliseconds().toString();reactiveUtils;async graphicsWatchHandler(){await this.setGraphics()}async isMobileWatchHandler(){await this._initFeaturesWidget()}async localeWatchHandler(){if(this.el.lang=this.locale,await this._getTranslations(),this._features){const t=[...this.graphics];this.graphics=[],this.graphics=t}}async mapViewWatchHandler(){return await this._initFeaturesWidget()}async getSelectedFeature(){return this._features.selectedFeature}async refresh(){await this.setGraphics()}async back(){this._features.previous(),this._count=this._getCount()}async next(){this._features.next(),this._count=this._getCount()}async toggleListView(){this._showListView=!this._showListView;const t=this._features.selectedFeatureIndex;this._features.open({features:this.graphics,featureMenuOpen:this._showListView}),this._features.selectedFeatureIndex=t}async updateCurrentGraphic(t){this._features.selectedFeatureWidget.graphic=t}popupClosed;selectionChanged;async closeEdit(){this._editRecordOpen=!1}async layerSelectionChange(){this._showListView=!1,this._features?.viewModel&&(this._features.viewModel.featureMenuOpen=!1,this._features.close())}async refreshGraphics(t){this.graphics=[...t.detail]}async componentWillLoad(){await this._initModules(),await this._getTranslations(),this._popupUtils=new l}async componentDidLoad(){this.graphics?.length>0&&await this.setGraphics()}render(){const t=this.isLoading?"":"display-none",i=this.isLoading||this._editRecordOpen?"visibility-hidden":"position-absolute",e=!this.isLoading&&this._editRecordOpen?"position-absolute":"display-none",a=!this.isLoading&&this._editRecordOpen||this._showListView?"display-none":"",o=this._features?.features?.length<2,h=this.isMobile?"display-none":"",c=this._features?.selectedFeature?.getObjectId(),d=parseInt(c?.toString(),10)>-1?[c]:[],l=this._layer?.editingEnabled&&this._layer?.capabilities?.operations?.supportsDelete;return s(n,{key:"66070d48134f89d9cf132572fe1adf790b6d3ec6"},s("calcite-shell",{key:"b77248dce176df940d8b0c347154b73738a5576d",style:{position:this.position}},this._getHeader(),s("calcite-loader",{key:"c1638ca8320a0ae12a9ccd1fd8841efde4236ba5",class:t,label:this._translations.fetchingData}),s("div",{key:"cf5ee3be5c0ea3be36205dcf7c0747461802a5f1",class:"esri-widget feature-node "+i,id:this._featuresNodeId}),s("div",{key:"6fbfa6947fa0fdb1b14a03217da60f07ecff2e1b",class:`${a} width-100`,slot:"footer"},this.allowEditing&&s("div",{key:"fdcb078c3b3f183b06dc3a48d27fee46e3a4fffa",class:"display-flex top-border padding-1-2"},s("calcite-button",{key:"7193bec80a40f353d24e5d327d99d94a2c5ff356",appearance:"solid",id:"solutions-edit",onClick:()=>this._openEditRecord(),width:"full"},this._translations.edit),this.isMobile&&l?s("delete-button",{class:"padding-inline-start-1 width-100",id:"solutions-delete",ids:d,layer:this._layer,locale:this.locale,onEditsComplete:()=>this._closePopup()}):void 0,s("calcite-tooltip",{key:"228a9691edd916a5d644cb19db24898cdf7cab3b",placement:"bottom","reference-element":"solutions-edit"},s("span",{key:"5c696df370bcf230d3fc06523ec3cb9d96f2fe2b"},this._translations.edit)),this.isMobile&&l?s("calcite-tooltip",{placement:"bottom","reference-element":"solutions-delete"},s("span",null,this._translations.delete)):void 0),this.paginationEnabled&&!o&&s("div",{key:"e1b829a888913af6a9d777a2df0d65571ac3bec1",class:`display-flex padding-1-2 button-container top-border ${h}`},s("div",{key:"8746737a103266efe64a8f80c2359f9e170586d5"},s("calcite-button",{key:"ac6fc23dc2831608cc9c86fe384c0a927cd7d7ac",appearance:"transparent",disabled:o,iconFlipRtl:"both",iconStart:"chevron-left",id:"solutions-back",onClick:()=>this._back(),width:"full"}),s("calcite-tooltip",{key:"d4a1e2753c35e97064ca66d5c30deccd532fb158",placement:"top","reference-element":"solutions-back"},s("span",{key:"caae32b5e32a0d89265293beccef157d227a7600"},this._translations.back))),s("calcite-action",{key:"a87f344a06896ad86886815254979793b057e4cd",class:"pagination-action",iconFlipRtl:!0,onClick:()=>this._toggleListView(),scale:"s",text:"",textEnabled:!0},s("span",{key:"6e6f84ebedb2540edb485fa0789fe8ea67e7188f",class:"pagination-count"},this._count)),s("div",{key:"6acf22348a508c921865bb4c7e531f9a826a8eed"},s("calcite-button",{key:"f1d763e1747cff7e0b6bec08ec4fade3d1582379",appearance:"transparent",disabled:o,iconFlipRtl:"both",iconStart:"chevron-right",id:"solutions-next",onClick:()=>this._next(),width:"full"}),s("calcite-tooltip",{key:"def93e3d1f19b4e6eb3e54c5fbd918fed118cc0c",placement:"top","reference-element":"solutions-next"},s("span",{key:"cb9b90a5b3129861b7f58fd0271c6120893dfd53"},this._translations.next))))),s("edit-card",{key:"524819a6dc64775b88b22aaf24445fd5ebdeae24",class:e,enableEditGeometry:this.enableEditGeometry,graphicIndex:this._features?.selectedFeatureIndex,graphics:this.graphics,locale:this.locale,mapView:this.mapView,open:this._editRecordOpen}),s("calcite-alert",{key:"394c3b416a5dc94381c8b93afd3308121fbebd81",icon:"layer-broken",kind:"warning",label:"",onCalciteAlertClose:()=>this._alertClosed(),open:this._alertOpen,placement:"top"},s("div",{key:"f4868bf3b710d91ed7e3f1e34b846bd408febac0",slot:"title"},this._translations.editDisabled),s("div",{key:"457b7d0c76bfac52340bec73f5d1d2abbd10f25a",slot:"message"},this._translations.enableEditing))))}async _initModules(){const[t,i]=await o(["esri/widgets/Features","esri/core/reactiveUtils"]);this.Features=t,this.reactiveUtils=i}async setGraphics(){this._features||await this._initFeaturesWidget(),this.graphics.length>0?(this._layer=this.graphics[0]?.layer,this._editEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsUpdate,this._mobileTitle=await this._popupUtils.getPopupTitle(this.graphics[0],this.mapView.map),this._features.open({features:this.graphics})):(this._features.clear(),this._features.close()),this._count=this._getCount()}async _initFeaturesWidget(){return void 0!==this.isMobile?await(this.mapView?.when((()=>{this._features?(this._features.view=this.mapView,this._features.visibleElements.actionBar=!1,this._features.visibleElements.closeButton=!1,this._features.visibleElements.heading=!this.isMobile):(this._features=new this.Features({view:this.mapView,container:this._featuresNodeId,visibleElements:{actionBar:!1,closeButton:!1,heading:!this.isMobile}}),this._features.viewModel.highlightEnabled=this.highlightEnabled,this.reactiveUtils.watch((()=>this._features.viewModel.featureMenuOpen),(t=>{this._count=this._getCount(),t||(this._showListView=t)})),this.reactiveUtils.watch((()=>this._features.selectedFeatureIndex),(t=>{t>-1&&this.selectionChanged.emit({selectedFeature:[this._features.selectedFeature],selectedFeatureIndex:this._features.selectedFeatureIndex})})))}))):Promise.resolve()}_getHeader(){return this.isMobile&&!this._editRecordOpen?s("calcite-panel",{class:"border-width-0",slot:"header"},s("calcite-action",{class:"end-border",icon:"chevron-left",iconFlipRtl:!0,onClick:()=>this._closePopup(),scale:"s",slot:"header-actions-start",text:""}),s("span",{class:"font-bold",slot:"header-content"},this._mobileTitle)):void 0}_closePopup(){this.popupClosed.emit()}_alertClosed(){this._alertOpen=!1}_openEditRecord(){this._editEnabled?this._editRecordOpen=!0:this._alertOpen=!0}_back(){this._features.previous(),this._count=this._getCount()}_next(){this._features.next(),this._count=this._getCount()}_getCount(){const t=(this._features?.viewModel.selectedFeatureIndex+1).toString(),i=this._features?.features?.length.toString();return this._translations.indexOfTotal.replace("{{index}}",t).replace("{{total}}",i)}_toggleListView(){this._showListView=!this._showListView;const t=this._features.selectedFeatureIndex;this._features.open({features:this.graphics,featureMenuOpen:this._showListView}),this._features.selectedFeatureIndex=t}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{graphics:["graphicsWatchHandler"],isMobile:["isMobileWatchHandler"],locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"]}}};b.style=":host{display:block;--calcite-label-margin-bottom:0}.padding-1-2{padding:0.5rem}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.feature-node{position:relative !important}.feature-node .esri-features__footer{display:none !important}.button-container{justify-content:center;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-color-foreground-1) !important;height:100% !important}.overflow-hidden{overflow:hidden}.height-40{height:40px}.end-border{border-inline-end:1px solid var(--calcite-color-border-1)}.font-bold{font-weight:bold}.visibility-hidden{visibility:hidden;height:0px}.padding-inline-start-1{padding-inline-start:1rem}.border-width-0{border-width:0px}.pagination-action{position:relative;left:3px}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:bold}";export{r as create_feature,p as delete_button,f as edit_card,b as info_card}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as e,c as t,g as s,h as i,H as a}from"./p-1b0588d2.js";import{g as l}from"./p-ee2cbba0.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const o=class{constructor(s){e(this,s),this.editsComplete=t(this,"editsComplete",7),this.deleteDialogClose=t(this,"deleteDialogClose",7)}get el(){return s(this)}ids=[];layer;locale;open=!1;_isDeleting=!1;_translations;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}editsComplete;deleteDialogClose;async componentWillLoad(){await this._getTranslations()}render(){const e=1===this.ids.length?this._translations?.confirmSingle:this._translations?.confirmMultiple;return i(a,{key:"d672a7218bc19c762c89b519b5d12c8d0122f770"},i("calcite-dialog",{key:"c43ba38dd9477869ae9797f98e3daafce09c5eae",heading:this._translations?.deleteFeature,kind:"danger",modal:!0,onCalciteDialogClose:()=>this._close(),open:this.open,widthScale:"s"},i("div",{key:"481710981431c3bb10b8ec221604f0740f3f8772"},e),i("calcite-button",{key:"8f1fc8a1a66fbd25edbb8d7f99f223b5bfea0517",appearance:"outline",kind:"danger",onClick:()=>this._close(),slot:"footer-end",width:"full"},this._translations?.cancel),i("calcite-button",{key:"46830e28586f1d345de2b19a2d8198f36ae74f15",kind:"danger",loading:this._isDeleting,onClick:()=>{this._deleteFeatures()},slot:"footer-end",width:"full"},this._translations?.delete)))}async _deleteFeatures(){this._isDeleting=!0;const e=this.ids.map((e=>({objectId:e})));await this.layer.applyEdits({deleteFeatures:e}),this._isDeleting=!1,this._close(),this.editsComplete.emit("delete")}_close(){this.open=!1,this.deleteDialogClose.emit()}async _getTranslations(){const e=await l(this.el);this._translations=e[0]}static get watchers(){return{locale:["localeWatchHandler"]}}};o.style=":host{display:block}.delete-modal{position:fixed}";export{o as delete_dialog}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,c as e,g as i,h as s,H as a}from"./p-1b0588d2.js";import{g as h}from"./p-ee2cbba0.js";import{g as l,d as n,p as o}from"./p-952da957.js";import{s as r}from"./p-48942eb8.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";import"./p-e23b4193.js";const c=class{constructor(i){t(this,i),this.beforeLayerSelectionChange=e(this,"beforeLayerSelectionChange",7),this.idsFound=e(this,"idsFound",7),this.noLayersFound=e(this,"noLayersFound",7),this.layerSelectionChange=e(this,"layerSelectionChange",7)}get el(){return i(this)}appearance="transparent";defaultLayerId="";display="inline-block";enabledLayerIds=[];enabledTableIds=[];height;isMobile;locale;mapView;onlyShowUpdatableLayers;placeholderIcon="";selectedIds=[];scale="m";showTables;showTablesDisabled;showSingleLayerAsLabel=!1;type="select";_hasMultipleLayers=!0;_hasValidLayers=!0;_isDropdownOpen;ids=[];selectedName="";_translations;defaultLayerHonored=!1;_layerElement;_layerNameHash;_skipEditCheck=!1;_tableNameHash;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(){await this._setLayers(),this.ids.length>0?(this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1,this._setSelectedLayer(this.ids[0])):(this._hasValidLayers=!1,this.noLayersFound.emit())}async setLayerById(t,e=!1){this._skipEditCheck=e,this._setSelectedLayer(t),this._skipEditCheck=!1}async setLayerByIds(t,e=!1){this._skipEditCheck=e,this._layerSelectionChange(t),this._skipEditCheck=!1}async updateLayer(){this._setSelectedLayer(this.ids[0])}beforeLayerSelectionChange;idsFound;noLayersFound;layerSelectionChange;async componentWillLoad(){await this._getTranslations(),await this._setLayers()}async componentWillRender(){if(this.ids.length>0||1===this.selectedIds.length){const t=1===this.selectedIds.length?this.selectedIds[0]:this.ids[0];if(t!==this.selectedIds[0])this._setSelectedLayer(t);else{const t=await l(this.mapView,this.selectedIds[0]);this.selectedName=t?.title}}}render(){const t="map-layer-picker";let e=this.height>0?{height:`${this.height.toString()}px`}:{};return e={...e,display:this.display},s(a,{key:"a4d7a923fcf0b6ec488fafa3af8b3c3a9599d61a"},s("div",{key:"54d5cde231707391537fbd649647a5b9e86a1ab3",class:"map-layer-picker-container",style:e},s("div",{key:"1d1329f393778e561bfed22a1c1542cd75d4b55b",class:"map-layer-picker",style:e},this._hasValidLayers?!this._hasMultipleLayers&&this.showSingleLayerAsLabel?this._getSingleLayerPlaceholder():"combobox"===this.type?this._getCombobox(t):"select"===this.type?this._getSelect(t):this._getDropdown(t):this._getInvalidPlaceholder())))}async componentDidLoad(){if(this.ids.length>0||1===this.selectedIds.length){const t=1===this.selectedIds.length?this.selectedIds[0]:this.ids[0];"select"===this.type?this._layerElement.value=t:"dropdown"===this.type&&(this.selectedName=Object.keys(this._layerNameHash).indexOf(t)>-1?this._layerNameHash[t].name:Object.keys(this._tableNameHash).indexOf(t)>-1?this._tableNameHash[t].name:"")}}_getInvalidPlaceholder(){return s("div",null,s("calcite-notice",{class:"height-100",icon:"exclamation-mark-triangle",id:"no-valid-layers",kind:"danger",open:!0},s("div",{slot:"message"},this._translations.noLayersFound)),s("calcite-tooltip",{label:this._translations.enableEditUpdate,placement:"bottom","reference-element":"no-valid-layers"},s("span",null,this._translations.enableEditUpdate)))}_getSingleLayerPlaceholder(){const t=this._getItemTypeIcon();return s("div",{class:"layer-picker-label-container cursor-default"},s("calcite-icon",{icon:t,scale:"s"}),s("calcite-label",{class:"no-bottom-margin padding-start-1"},this.selectedName))}_getSelect(t){return s("calcite-select",{id:t,label:"",onCalciteSelectChange:()=>this._layerSelectionChange(),ref:t=>{this._layerElement=t},scale:this.scale},this._getMapLayerOptions())}_getCombobox(t){return s("calcite-combobox",{clearDisabled:!0,id:t,label:"",onCalciteComboboxChange:()=>this._layerSelectionChange(),"placeholder-icon":this.placeholderIcon,ref:t=>{this._layerElement=t},scale:this.scale,"selection-mode":"single"},this._getMapLayerOptions())}_getDropdown(t){return s("calcite-dropdown",{class:"layer-picker-dropdown",onCalciteDropdownBeforeClose:()=>this._isDropdownOpen=!1,onCalciteDropdownBeforeOpen:()=>this._isDropdownOpen=!0},this.isMobile?this._getDropdownButton():this._getActionDropdownButton(t),s("calcite-dropdown-group",{"selection-mode":"single"},this._getMapLayerOptions()))}_getActionDropdownButton(t){return s("calcite-action",{id:t,slot:"trigger",text:""},this._getDropdownButton())}_getDropdownButton(){const t=this._getItemTypeIcon();return s("calcite-button",{alignment:"icon-end-space-between",appearance:this.appearance,class:this.isMobile?"":"max-width-350",iconEnd:this._isDropdownOpen?"chevron-up":"chevron-down",iconStart:t,kind:"neutral",slot:this.isMobile?"trigger":"",width:"full"},s("div",null,this.selectedName))}_getItemTypeIcon(){let t="layers";if(this.selectedIds.length>0){const e=this.selectedIds[0];t=Object.keys(this._layerNameHash).indexOf(e)>-1?"layers":"table"}return t}_getMapLayerOptions(){return this.ids.reduce(((t,e)=>(this._validLayer(e)?t.push(this._getItem(e,"layer")):this._validTable(e)&&t.push(this._getItem(e,"table")),t)),[])}_getItem(t,e){const i="layer"===e?this._layerNameHash[t]:this._tableNameHash[t],a=!!this.onlyShowUpdatableLayers&&!i.supportsUpdate,h=i.name,l=this.selectedIds.indexOf(t)>-1;return"combobox"===this.type?s("calcite-combobox-item",{disabled:a,selected:l,textLabel:h,value:t}):"select"===this.type?s("calcite-option",{disabled:a,label:h,selected:l,value:t}):s("calcite-dropdown-group",{class:a?"disabled":"",selectionMode:a?"none":"single"},s("calcite-dropdown-item",{disabled:"table"===e&&this.showTablesDisabled,"icon-start":e,onClick:a?void 0:()=>{this._setSelectedLayer(t)},selected:l},h))}_setSelectedLayer(t){let e;this.defaultLayerId&&!this.defaultLayerHonored&&(e=this._getLayerFromHash(this.defaultLayerId),this.defaultLayerHonored=void 0!==e,t=this.defaultLayerHonored?this.defaultLayerId:t),e=e||this._getLayerFromHash(t),(this._skipEditCheck||!this.beforeLayerSelectionChange.emit({currentId:this.selectedIds[0],newId:t,ref:this.el}).defaultPrevented)&&(this.selectedName=e?.name,this.selectedIds=[t],this.layerSelectionChange.emit(this.selectedIds))}_getLayerFromHash(t){return Object.keys(this._layerNameHash).indexOf(t)>-1?this._layerNameHash[t]:Object.keys(this._tableNameHash).indexOf(t)>-1?this._tableNameHash[t]:void 0}async _setLayers(){if(this.mapView){await this._initLayerTableHash();const t=this.onlyShowUpdatableLayers?this._getEditableIds(this._layerNameHash):Object.keys(this._layerNameHash),e=this.showTables?this.onlyShowUpdatableLayers?this._getEditableIds(this._tableNameHash):Object.keys(this._tableNameHash):[];this.ids=[...t.reverse().filter((t=>!(this.enabledLayerIds?.length>0)||this.enabledLayerIds.reverse().indexOf(t)>-1)),...e.reverse().filter((t=>!(this.enabledTableIds?.length>0)||this.enabledTableIds.reverse().indexOf(t)>-1))],this.idsFound.emit({layerIds:t,tableIds:e})}}_getEditableIds(t){return Object.keys(t).reduce(((e,i)=>(t[i].supportsUpdate&&e.push(i),e)),[])}async _initLayerTableHash(){this._layerNameHash=await n(this.mapView,this.onlyShowUpdatableLayers),this._tableNameHash=this.showTables?await o(this.mapView,this.onlyShowUpdatableLayers):{}}_validLayer(t){const e=this._layerNameHash[t]?.name;return e&&Object.keys(r.managedLayers).indexOf(e)<0&&(!(this.enabledLayerIds.length>0)||this.enabledLayerIds.indexOf(t)>-1)}_validTable(t){const e=this._tableNameHash[t]?.name,i=e&&this.showTables;return i?r.managedTables.indexOf(e)<0&&(!(this.enabledTableIds.length>0)||this.enabledTableIds.indexOf(t)>-1):i}_layerSelectionChange(t){const e=t||(Array.isArray(this._layerElement.value)?this._layerElement.value:[this._layerElement.value]);if(JSON.stringify(e)!==JSON.stringify([""])){if(!this._skipEditCheck&&this.beforeLayerSelectionChange.emit({currentIds:this.selectedIds,newIds:e,ref:this.el}).defaultPrevented)return;this.selectedIds=e,this.layerSelectionChange.emit(this.selectedIds)}}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"]}}};c.style=":host{display:block}.map-layer-picker-container{width:100%;align-items:center}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}.height-100{height:100%}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.no-bottom-margin{--calcite-label-margin-bottom:0px}.layer-picker-label-container{align-items:center;display:inline-flex;height:100%;padding-inline-start:1rem;padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.cursor-default{cursor:default}";export{c as map_layer_picker}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,g as e,h as i,H as s,c as a}from"./p-1b0588d2.js";import{l as h,g as n}from"./p-ee2cbba0.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const o=class{constructor(e){t(this,e)}get el(){return e(this)}mapView;basemapConfig;basemapWidget;BasemapGallery;PortalBasemapsSource;_basemapElement;async basemapConfigWatchHandler(){if(this.basemapWidget?.source){const t=this.basemapWidget?.source;t.query=this.basemapConfig?.basemapGroupId?`id:${this.basemapConfig.basemapGroupId}`:null,await t.refresh()}}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initBaseMapGallery(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return i(s,{key:"cc7e423a47742c0f5c3a5023b77157af09e56433"},i("div",{key:"9b41466e49c93e533f1d2a621707c5189c5092b3",ref:t=>{this._basemapElement=t}}))}async componentDidLoad(){this.mapView&&await this.mapViewWatchHandler()}async _initModules(){const[t,e]=await h(["esri/widgets/BasemapGallery","esri/widgets/BasemapGallery/support/PortalBasemapsSource"]);this.BasemapGallery=t,this.PortalBasemapsSource=e}async _initBaseMapGallery(t){if(this.BasemapGallery){this.basemapWidget&&this.basemapWidget.destroy();const e=new this.PortalBasemapsSource({query:this.basemapConfig?.basemapGroupId?`id:${this.basemapConfig.basemapGroupId}`:null,filterFunction:this.basemapConfig?t=>!this.basemapConfig.basemapIdsToFilter.includes(t.portalItem.id):()=>!0});await e.refresh(),this.basemapWidget=new this.BasemapGallery({container:this._basemapElement,view:t,source:e})}}static get watchers(){return{basemapConfig:["basemapConfigWatchHandler"],mapView:["mapViewWatchHandler"]}}};o.style=":host{display:block}";const r=class{constructor(e){t(this,e),this.facilityChanged=a(this,"facilityChanged",7),this.levelChanged=a(this,"levelChanged",7),this.siteChanged=a(this,"siteChanged",7)}get el(){return e(this)}enabled;floorFilterWidget;mapView;FloorFilter;_floorFilterElement;reactiveUtils;_facilityHandle;_levelHandle;_siteHandle;async mapViewWatchHandler(){await this._initFloorFilter(this.mapView)}async enabledWatchHandler(){this.enabled?await this._initFloorFilter(this.mapView):this.enabled||this._destroyWidget()}facilityChanged;levelChanged;siteChanged;async componentWillLoad(){return this._initModules()}render(){return i(s,{key:"b2ba7504abbc8621f2ad4f561920f2125181350d"},i("div",{key:"1df2a06b4b99ba0ece38ca3d91b622ce9b692c4a",ref:t=>{this._floorFilterElement=t}}))}async componentDidLoad(){this.mapView&&!this.floorFilterWidget&&await this._initFloorFilter(this.mapView)}async _initModules(){const[t,e]=await h(["esri/widgets/FloorFilter","esri/core/reactiveUtils"]);this.FloorFilter=t,this.reactiveUtils=e}_destroyWidget(){this.floorFilterWidget&&(this.floorFilterWidget.destroy(),this.floorFilterWidget=void 0),this._floorFilterElement&&this._floorFilterElement.remove()}_initContainer(){this._destroyWidget(),this._floorFilterElement=document.createElement("div")}async _initFloorFilter(t){const e=t?.map;await e.when((()=>{t&&this.enabled&&this.FloorFilter&&e?.floorInfo&&(this._initContainer(),this.floorFilterWidget=new this.FloorFilter({container:this._floorFilterElement,view:t}),this._facilityHandle?.remove(),this._facilityHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.facility),(t=>{this.facilityChanged.emit(t)})),this._levelHandle?.remove(),this._levelHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.level),(t=>{this.levelChanged.emit(t)})),this._siteHandle?.remove(),this._siteHandle=this.reactiveUtils.watch((()=>this.floorFilterWidget.site),(t=>{this.siteChanged.emit(t)})))}))}static get watchers(){return{mapView:["mapViewWatchHandler"],enabled:["enabledWatchHandler"]}}};r.style=":host{display:block}";const c=class{constructor(e){t(this,e),this.fullscreenStateChange=a(this,"fullscreenStateChange",7)}mapView;fullscreenWidget;Fullscreen;_fullscreenElement;_fullscreenStateChangeHandle;reactiveUtils;async mapViewWatchHandler(){await this.mapView.when((async()=>{await this._initFullscreenWidget()}))}fullscreenStateChange;async componentWillLoad(){await this._initModules()}render(){return i(s,{key:"50488298d31b85071bb8ec898781b8af52a800ae"},i("div",{key:"24b4c28cd69ce487c851412a839f6762ceaf02b1",class:"fullscreen-widget",ref:t=>{this._fullscreenElement=t}}))}async componentDidUpdate(){await this._initFullscreenWidget()}async componentDidLoad(){await this._initFullscreenWidget()}async _initModules(){const[t,e]=await h(["esri/widgets/Fullscreen","esri/core/reactiveUtils"]);this.Fullscreen=t,this.reactiveUtils=e}async _initFullscreenWidget(){this.mapView&&this._fullscreenElement&&!this.fullscreenWidget?(this.fullscreenWidget=new this.Fullscreen({view:this.mapView}),await this.fullscreenWidget.when((()=>{this._fullscreenStateChangeHandle&&this._fullscreenStateChangeHandle.remove(),this._fullscreenStateChangeHandle=this.reactiveUtils.watch((()=>this.fullscreenWidget.viewModel.state),(t=>this.fullscreenStateChange.emit(t)))}))):this.fullscreenWidget&&(this.fullscreenWidget.view=this.mapView)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};c.style=":host{display:block}";const l=class{constructor(e){t(this,e)}get el(){return e(this)}mapView;legendWidget;Legend;_legendElement;async mapViewWatchHandler(){await this.mapView.when((()=>{this._initLegend(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return i(s,{key:"60b355f71d25b3c683f6218941e342899006d839"},i("div",{key:"7686d302e16fd42cd26777d14c682dc0e951c058",ref:t=>{this._legendElement=t}}))}async componentDidLoad(){this.mapView&&await this.mapViewWatchHandler()}async _initModules(){const[t]=await h(["esri/widgets/Legend"]);this.Legend=t}_initLegend(t){t&&this.Legend&&(this.legendWidget?this.legendWidget.view=t:this.legendWidget=new this.Legend({container:this._legendElement,respectLayerDefinitionExpression:!0,view:t}))}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};l.style=":host{display:block}";const d=class{constructor(e){t(this,e),this.beforeMapInfoChange=a(this,"beforeMapInfoChange",7),this.mapInfoChange=a(this,"mapInfoChange",7)}get el(){return e(this)}locale;mapInfos=[];isMapLayout;_mapListExpanded=!1;_translations;_webMapInfo;_list;_loadedId="";_skipEditCheck=!1;_webMapInfoWatchHandler(t,e){t&&JSON.stringify(t)!==JSON.stringify(e)&&(this._loadedId=t?.id,this.mapInfoChange.emit(t))}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapInfosWatchHandler(t,e){t&&JSON.stringify(t)!==JSON.stringify(e)&&this._webMapSelected(t[0])}async setMapByID(t,e=!1){this._skipEditCheck=e;const i=this.mapInfos?.filter((e=>e.id===t));t&&i?.length>0&&this._webMapSelected(i[0]),this._skipEditCheck=!1}async close(){this._mapListExpanded&&(this._mapListExpanded=!1)}async toggle(t){this._mapListExpanded=t}beforeMapInfoChange;mapInfoChange;async componentWillLoad(){await this._getTranslations()}render(){return i(s,{key:"a16cef5d3d16de605f51ce77450365e8c7f5ba08"},this._getToolbar(),this._getMapNameList(this._mapListExpanded))}async componentDidLoad(){const t=this.mapInfos&&this.mapInfos.length>0?this.mapInfos[0]:void 0;t&&this._webMapSelected(t)}_getMapPicker(){const t="map-picker-expand-toggle";return i("div",{class:"width-full"},i("calcite-button",{alignment:"icon-end-space-between",appearance:"transparent",class:"width-full height-full",iconEnd:this._mapListExpanded?"chevron-up":"chevron-down",iconStart:"map",id:t,kind:"neutral",onClick:()=>this._chooseMap(),width:"full"},this._webMapInfo?.name),i("calcite-tooltip",{placement:"bottom","reference-element":t},i("span",null,this._translations.switchMap)))}_getToolbar(){return i("div",{class:"display-flex border-right"},i("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getMapPicker()))}_getMapNameList(t){return i("div",{class:t?"map-list border-bottom-1 adjusted-height "+(this.isMapLayout?"width-26":"width-full"):"display-none"},i("calcite-list",{id:"mapList",label:"",ref:t=>this._list=t,selectionAppearance:"border",selectionMode:"single"},this.mapInfos.map((t=>i("calcite-list-item",{label:t.name,onClick:()=>this._webMapSelected(t),selected:t.id===this._loadedId,value:t.id})))))}_webMapSelected(t){const e=this._loadedId;this._loadedId=t.id,this._skipEditCheck?this._webMapInfo=t:this.beforeMapInfoChange.emit({currentId:e,mapInfo:t,ref:this.el}).defaultPrevented||(this._webMapInfo=t),this._mapListExpanded=!1}_chooseMap(){this._mapListExpanded=!this._mapListExpanded}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}static get watchers(){return{_webMapInfo:["_webMapInfoWatchHandler"],locale:["localeWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};d.style=":host{display:block;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.width-full{width:100%}.width-26{width:26% !important}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}.border-right{border-right:1px solid var(--calcite-color-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-color-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.align-center{align-items:center}.adjusted-height{max-height:calc(100% - 52px);overflow-y:auto}";const p=class{constructor(e){t(this,e)}mapView;popupEnabled=!1;resultGraphicEnabled=!1;searchConfiguration;searchTerm;searchWidget;FeatureLayer;Search;_searchElement;_searchResult;async watchSearchConfigurationHandler(){this._initSearchWidget()}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initSearchWidget()}))}async componentWillLoad(){await this._initModules()}async componentDidLoad(){return this._initSearchWidget()}render(){return i(s,{key:"fec180c41817a6388f5fdb3f14b72355cbbb1467"},i("div",{key:"72b3931995d7157572d54069e73fb6bd95eb6f44",class:"search-widget",ref:t=>{this._searchElement=t}}))}async _initModules(){const[t,e]=await h(["esri/widgets/Search","esri/layers/FeatureLayer"]);this.Search=t,this.FeatureLayer=e}_initSearchWidget(){if(this.mapView&&this._searchElement&&!this.searchWidget){let t={view:this.mapView,container:this._searchElement,searchTerm:this.searchTerm};this.searchConfiguration&&(t={...this._getSearchConfig(this.searchConfiguration,this.mapView)}),this.searchWidget=new this.Search(t),this.searchWidget.popupEnabled=this.popupEnabled,this.searchWidget.resultGraphicEnabled=this.resultGraphicEnabled}else this.searchWidget&&(this.searchWidget.view=this.mapView)}_getSearchConfig(t,e){const i=t.sources;return i?.length>0?(t.includeDefaultSources=!1,i.forEach((t=>{if(t.hasOwnProperty("layer")){const i=t,s=i.layer?.id,a=s?e.map.findLayerById(s):null,h=i?.layer?.url;a?i.layer=a:h&&(i.layer=new this.FeatureLayer(h))}})),i?.forEach((t=>{if(t.hasOwnProperty("locator")){const e=t;"ArcGIS World Geocoding Service"===e?.name&&(e.outFields=e.outFields||["Addr_type","Match_addr","StAddr","City"],e.singleLineFieldName="SingleLine"),e.url=e.url,delete e.url}}))):t={...t,includeDefaultSources:!0},t}static get watchers(){return{searchConfiguration:["watchSearchConfigurationHandler"],mapView:["mapViewWatchHandler"]}}};p.style=":host{display:block}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}";const m=class{constructor(e){t(this,e)}get el(){return e(this)}basemapConfig;enableLegend;enableFloorFilter;enableFullscreen;enableSearch;enableBasemap;enableHome;enableSingleExpand;homeZoomToolsSize="m";layout="vertical";locale;mapView;mapWidgetsSize="m";position="top-right";searchConfiguration;stackTools=!0;toolOrder;_hasFloorInfo=!1;_translations;_showTools=!0;_showBasemapWidget=!1;_showFloorFilter=!1;_showFullscreen=!1;_showLegendWidget=!1;_showSearchWidget=!1;Expand;_basemapElement;_floorFilterElement;_fullscreenElement;_legendElement;_searchElement;_widgets=[];async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(){await this.mapView.when((()=>{this._hasFloorInfo=this.mapView?.map?.floorInfo}))}async _showBasemapWidgetWatchHandler(t){t?this.mapView.ui.add(this._basemapElement.basemapWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._basemapElement.basemapWidget)}async _showFloorFilterWatchHandler(t){const e=this._floorFilterElement.floorFilterWidget;t?this.mapView.ui.add(e,{position:this.position,index:1}):this.mapView.ui.remove(e)}async _showFullscreenWatchHandler(t){const e=this._fullscreenElement.fullscreenWidget;t?"ready"===e.viewModel.state&&e.viewModel.enter():"active"===e.viewModel.state&&e.viewModel.exit()}async _showLegendWidgetWatchHandler(t){t?this.mapView.ui.add(this._legendElement.legendWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._legendElement.legendWidget)}async _showSearchWidgetWatchHandler(t){t?this.mapView.ui.add(this._searchElement.searchWidget,{position:this.position,index:1}):this.mapView.ui.remove(this._searchElement.searchWidget)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){this._setZoomToolsSize();const t=this._showTools?"":"display-none",e=this._showSearchWidget?"":"display-none",a=this._showBasemapWidget?"":"display-none",h=this._showLegendWidget?"":"display-none",n=this._showFloorFilter?"":"display-none",o=this._showFullscreen?"":"display-none",r=this.enableSingleExpand?"margin-top-1-2":"",c=this.toolOrder?this.toolOrder:["legend","search","fullscreen","floorfilter"],l=this.stackTools?"box-shadow":"";return i(s,{key:"4630a876708781097e02cf1aa94a3f77e30c0fee"},i("div",{key:"28be602bad246ef82214f3724aaf5f8480473456",class:this.enableBasemap||this.enableFullscreen||this.enableLegend||this.enableSearch?"":"display-none"},this.enableSingleExpand?i("div",{class:"box-shadow"},this._getActionGroup(this._showTools?"chevrons-up":"chevrons-down",!1,this._showTools?this._translations.collapse:this._translations.expand,(()=>this._toggleTools()))):void 0,i("div",{key:"25694e233efe5b917f0a4b25cc4c707c0584cae4",class:`${r} ${l} ${t}`},this._getMapWidgets(c))),i("basemap-gallery",{key:"db1c9cd3e1851957f9be86d43dc94355f6894a26",basemapConfig:this.basemapConfig,class:a,mapView:this.mapView,ref:t=>{this._basemapElement=t}}),i("map-search",{key:"558c28360b5e295a886becff4a07c5ec3d22c570",class:e,mapView:this.mapView,ref:t=>{this._searchElement=t},resultGraphicEnabled:!0,searchConfiguration:this.searchConfiguration}),i("map-legend",{key:"8e9a8c3e0619773b10ed51543717c2c63d7caa7a",class:h,mapView:this.mapView,ref:t=>{this._legendElement=t}}),i("map-fullscreen",{key:"0fba4904ba25f4122e57dc77f3bc64f2bd59d7c1",class:o,mapView:this.mapView,onFullscreenStateChange:t=>this._fullscreenStateChange(t.detail),ref:t=>{this._fullscreenElement=t}}),i("floor-filter",{key:"696d3bc16a3464770e96a45af8224537550c90a2",class:n,enabled:this.enableFloorFilter,mapView:this.mapView,ref:t=>{this._floorFilterElement=t}}))}async _initModules(){const[t]=await h(["esri/widgets/Expand"]);this.Expand=t}_setZoomToolsSize(){const t=document.getElementsByClassName("esri-zoom")[0]?.children[0],e=document.getElementsByClassName("esri-zoom")[0]?.children[1];if(t&&e){const i="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";t.style.width=i,t.style.height=i,e.style.width=i,e.style.height=i}}_getMapWidgets(t){const e=this._showFullscreen?"full-screen-exit":"full-screen",i=this._showFullscreen?this._translations.exitFullscreen:this._translations.enterFullscreen;return t.map((t=>{switch(t){case"legend":return this.enableLegend&&this.enableSingleExpand?this._getActionGroup("legend",!1,this._translations.legend,(()=>this._showLegend())):this.enableLegend?this._getWidget(t,this._legendElement?.legendWidget,!0):void 0;case"search":return this.enableSearch&&this.enableSingleExpand?this._getActionGroup("magnifying-glass",!1,this._translations.search,(()=>this._search())):this.enableSearch?this._getWidget(t,this._searchElement?.searchWidget,!0):void 0;case"fullscreen":return this.enableFullscreen&&this.enableSingleExpand?this._getActionGroup(e,!1,i,(()=>this._expand())):this.enableFullscreen?this._getWidget(t,this._fullscreenElement?.fullscreenWidget,!1):void 0;case"basemap":return this.enableBasemap&&this.enableSingleExpand?this._getActionGroup("basemap",!1,this._translations.basemap,(()=>this._toggleBasemapPicker())):this.enableBasemap?this._getWidget(t,this._basemapElement?.basemapWidget,!0):void 0;case"floorfilter":return this.enableFloorFilter&&this._hasFloorInfo&&this.enableSingleExpand?this._getActionGroup("urban-model",!1,this._translations.floorFilter,(()=>this._toggleFloorFilter())):this.enableFloorFilter&&this._hasFloorInfo?this._getWidget(t,this._floorFilterElement?.floorFilterWidget,!0):void 0}}))}_fullscreenStateChange(t){"ready"===t&&this._showFullscreen?this._showFullscreen=!1:"active"!==t||this._showFullscreen||(this._showFullscreen=!0)}_getActionGroup(t,e,s,a){return i("div",null,i("calcite-action",{alignment:"center",class:`${"s"===this.mapWidgetsSize?"square-32":"m"===this.mapWidgetsSize?"square-40":"square-48"} ${this.stackTools?"":"margin-bottom-1-2"} border-bottom ${this.stackTools?"":"box-shadow"}`,disabled:e,icon:t,id:t,onClick:a,scale:"s",text:""},i("calcite-icon",{icon:"cheveron-up",scale:"s",slot:"icon"})),i("calcite-tooltip",{label:"",placement:"trailing","reference-element":t},i("span",null,s)))}_getWidget(t,e,i){if(this._widgets.indexOf(t)<0&&this.mapView&&e){const s=this.toolOrder.indexOf(t),a=new this.Expand({view:this.mapView,content:e});this.mapView.ui.add(i?a:e,{position:this.position,index:s>-1?s+(this.enableHome?2:1):1}),this._widgets.push(t)}}_showLegend(){this._showLegendWidget=!this._showLegendWidget,this._showTools=!1}_search(){this._showSearchWidget=!this._showSearchWidget,this._showTools=!1}_toggleBasemapPicker(){this._showBasemapWidget=!this._showBasemapWidget,this._showTools=!1}_toggleFloorFilter(){this._showFloorFilter=!this._showFloorFilter,this._showTools=!1}_expand(){this._showFullscreen=!this._showFullscreen}_toggleTools(){this._showTools||(this._showBasemapWidget=!1,this._showSearchWidget=!1,this._showLegendWidget=!1,this._showFloorFilter=!1),this._showTools=!this._showTools}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"],_showBasemapWidget:["_showBasemapWidgetWatchHandler"],_showFloorFilter:["_showFloorFilterWatchHandler"],_showFullscreen:["_showFullscreenWatchHandler"],_showLegendWidget:["_showLegendWidgetWatchHandler"],_showSearchWidget:["_showSearchWidgetWatchHandler"]}}};m.style=":host{display:block}.display-none{display:none}.margin-top-1-2{margin-top:0.5rem}.square-32{width:32px;height:32px}.square-40{width:40px;height:40px}.square-48{width:48px;height:48px}.width-40{width:40px}.square-40-41{width:40px;height:41px}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.box-shadow{box-shadow:0 1px 2px rgba(0, 0, 0, 0.3)}.margin-bottom-1-2{margin-bottom:0.5rem}";export{o as basemap_gallery,r as floor_filter,c as map_fullscreen,l as map_legend,d as map_picker,p as map_search,m as map_tools}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,h as o,H as s,g as n}from"./p-1b0588d2.js";import{l as e}from"./p-08ad0b7a.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const i="components",a=`[slot="${i}"]`,r=class{constructor(o){t(this,o),this.components=[],this.view=void 0}async componentWillLoad(){const[t]=await e(["esri/widgets/Expand"]);this.Expand=t,this._handleComponents()}componentWillUpdate(){this._handleComponents()}render(){return o(s,{key:"45edbd93de055768fb4b58e9d12a7570d24bdd22"},o("slot",{key:"47d507e456dfc86a068948280b21386bc08e735c",name:i}))}_handleComponents(){const t=this._getComponentsNode();t&&(this._resetUI(t),this._attachComponents(t))}_attachComponents(t){this.components.forEach(this._attachmentComponent(t))}_attachmentComponent(t){return(o,s)=>{let n=o.content;o.isExpand&&(n=this._getExpand(o),o.expandIcon&&(n.expandIcon=o.expandIcon),o.collapseTooltip&&(n.collapseTooltip=o.collapseTooltip),o.expandTooltip&&(n.expandTooltip=o.expandTooltip)),n.container||(n.container=document.createElement("div")),null==t||t.appendChild(n.container),s!==this.components.length-1&&(n.container.style="border-bottom: 1px solid var(--calcite-color-border-3)")}}_getExpand(t){var o;const{view:s}=this,{content:n}=t,e=null!==(o=null==t?void 0:t.expanded)&&void 0!==o&&o;return new this.Expand({content:n,view:s,expanded:e,mode:"floating",group:"instant-apps-control-panel"})}_getComponentsNode(){return this.el.querySelector(a)}_resetUI(t){if(t.children.length>0){const{firstChild:o}=t;for(;o;)t.removeChild(o)}}get el(){return n(this)}};r.style=":host{display:block}";export{r as instant_apps_control_panel}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as e,c as t,g as i,h as s,H as o}from"./p-1b0588d2.js";import{g as a}from"./p-ee2cbba0.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const n=class{constructor(i){e(this,i),this.solutionItemHover=t(this,"solutionItemHover",7),this.solutionItemSelect=t(this,"solutionItemSelect",7),this.solutionTypeHover=t(this,"solutionTypeHover",7)}get el(){return i(this)}locale;listSelectionMode="none";templateInfos=[];_sortedTemplateInfos=[];_translations;_sortOrder=["Hub Site Application","Hub Page","Web Experience","Instant App","Web Mapping Application","Dashboard","StoryMap","Form","QuickCapture Project","Workflow","Big Data Analytic (hosted)","Real Time Analytic (hosted)","Feed (hosted)","Tool","Notebook","Data Pipeline","Project Package","Desktop Application Template","TypeNotFound","Web Map","Web Scene","Feature Layer (hosted, view)","Feature Layer (hosted)","Table (hosted, view)","Table (hosted)","Tile Layer","CSV","Microsoft Excel","Microsoft Word","Report Template","Rule Package","Group"];async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async templateInfosWatchHandler(){this._sortedTemplateInfos=this._sortTemplates()}async deselectAll(){"single"!==this.listSelectionMode&&"single-persist"!==this.listSelectionMode||this.el.shadowRoot.querySelectorAll("calcite-list-item").forEach((e=>{e.selected=!1}))}async selectItem(e){"single"!==this.listSelectionMode&&"single-persist"!==this.listSelectionMode||this.el.shadowRoot.querySelectorAll("calcite-list-item").forEach((t=>{t.id===e&&(t.selected=!0,t.parentElement.parentElement.expanded=!0)}))}solutionItemHover;solutionItemSelect;solutionTypeHover;async componentWillLoad(){this._sortedTemplateInfos=this._sortTemplates(),await this._getTranslations()}render(){return s(o,{key:"7e98d3ed4629f9d0960db3284d389bf7564b6def"},this._getAccordion())}_deselectOthers(e){"single"!==this.listSelectionMode&&"single-persist"!==this.listSelectionMode||this.el.shadowRoot.querySelectorAll("calcite-list-item").forEach((t=>{t.id!==e&&(t.selected=!1)}))}_getAccordion(){const e=[],t=this._sortedTemplateInfos.reduce(((t,i)=>{const s=this._getTypeForDisplay(i.type,i.typeKeywords);return e.indexOf(s)<0&&(e.push(s),t.push(this._getAccordionItem(i))),t}),[]);return s("calcite-accordion",{class:"border-override",selectionMode:"single"},t)}_getAccordionItem(e){const t=this._getTypeForDisplay(e.type,e.typeKeywords),i=this._sortedTemplateInfos.filter((e=>this._getTypeForDisplay(e.type,e.typeKeywords)===t));return s("calcite-accordion-item",{description:`${t} (${i.length})`,onMouseEnter:()=>this.solutionTypeHover.emit({itemType:t,entering:!0}),onMouseLeave:()=>this.solutionTypeHover.emit({itemType:t,entering:!1})},s("solution-item-icon",{class:"padding-start-1 display-flex align-center",slot:"actions-start",type:e.type,typeKeywords:e.typeKeywords}),this._getList(i))}_getList(e){const t=this._sortTemplatesByTitle(e);return s("calcite-list",{label:"",selectionAppearance:"border",selectionMode:this.listSelectionMode},t.map((e=>this._getListItem(e))))}_getListItem(e){return s("calcite-list-item",{description:e.snippet,id:e.id,label:e.title,onCalciteListItemSelect:()=>{this._deselectOthers(e.id),this.solutionItemSelect.emit({itemId:e.id,selected:!0})},onMouseEnter:()=>this.solutionItemHover.emit({itemId:e.id,entering:!0}),onMouseLeave:()=>this.solutionItemHover.emit({itemId:e.id,entering:!1}),value:e.id},e.url?s("calcite-action",{icon:"launch",onClick:()=>window.open(e.url,"_blank"),slot:"actions-end",text:this._translations?.openDetails?.replace("{{solutionTitle}}",e.title)}):null)}_sortTemplatesByTitle(e){return e.sort(((e,t)=>e.title<t.title?-1:e.title>t.title?1:0))}_sortTemplates(){return this.templateInfos.sort(((e,t)=>{const i=this._getTypeForSort(e),s=this._getTypeForSort(t);return this._sortOrder.indexOf(i)-this._sortOrder.indexOf(s)}))}_getTypeForSort(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords);return this._sortOrder.indexOf(t)<0&&(t="TypeNotFound"),t}_getTypeForDisplay(e,t){let i=e;if("Feature Service"===e){const e=t.indexOf("View Service")>-1,s=t.indexOf("Table")>-1;i=e&&s?"Table (hosted, view)":s?"Table (hosted)":e?"Feature Layer (hosted, view)":"Feature Layer (hosted)"}return"Web Mapping Application"===e&&(i=t.indexOf("configurableApp")>-1?"Instant App":i),i="Geoprocessing Service"===e?"Tool":i,i="Feed"===e?"Feed (hosted)":i,i="Real Time Analytic"===e?"Real Time Analytic (hosted)":i,i="Big Data Analytic"===e?"Big Data Analytic (hosted)":i,i="Vector Tile Service"===e?"Tile Layer":i,i}async _getTranslations(){const e=await a(this.el);this._translations=e[0]}static get watchers(){return{locale:["localeWatchHandler"],templateInfos:["templateInfosWatchHandler"]}}};n.style=":host{display:block}.padding-start-1{padding-inline-start:1rem}.border-override{--calcite-accordion-border-color:var(--calcite-color-border-1) !important}.display-flex{display:flex}.align-center{align-items:center}";export{n as solution_item_accordion}
@@ -1,6 +0,0 @@
1
- /*!
2
- * Copyright 2022 Esri
3
- * Licensed under the Apache License, Version 2.0
4
- * http://www.apache.org/licenses/LICENSE-2.0
5
- */
6
- import{r as t,c as i,g as s,h as e,F as a}from"./p-1b0588d2.js";import{l as h,g as c,f as n}from"./p-ee2cbba0.js";import{b as o,d as l,a as r,c as d}from"./p-952da957.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-80cb7c73.js";const p=class{constructor(s){t(this,s),this.success=i(this,"success",7),this.fail=i(this,"fail",7),this.isActionPending=i(this,"isActionPending",7),this.formReady=i(this,"formReady",7)}get el(){return s(this)}locale;mapView;table;selectedFeature;customizeSubmit=!1;showGuidingMsg=!0;_editorLoading=!1;_translations;Editor;_editor;reactiveUtils;_container;_addingAttachment;_isSubmitBtnClicked=!1;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this.init()}))}async _editorLoadingWatchHandler(t){t&&(this._container?.classList.add("display-none"),await this.startCreate(),this._container?.classList.remove("display-none"),this._editorLoading=!1)}async submit(){this._editor&&(this._isSubmitBtnClicked=!0,this._editor.viewModel.featureFormViewModel.submit())}success;fail;isActionPending;formReady;async componentWillLoad(){await this._getTranslations(),await this.initModules()}async init(){this.mapView&&await this.createEditorWidget()}async initModules(){const[t,i]=await h(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}render(){const t=this._editorLoading?"":"display-none";return e(a,{key:"261308f81b5bbed3e136efbb2100db9c1e5994a4"},this.showGuidingMsg&&e("calcite-notice",{key:"3aca1d3f48e46208ce07f2ccdd76ac4af752162d",class:"notice-msg",icon:"lightbulb",kind:"success",open:!0},e("div",{key:"f449d7dcde1cc75bf7470a75ae0ce915ef457459",slot:"message"},this._translations.provideDetailsMsg)),e("calcite-loader",{key:"e94e971b96ddba0ab36f27ffd4e37b820bb2432f",class:t,label:"",scale:"s"}))}async componentDidLoad(){await this.init()}disconnectedCallback(){this._editor&&this._editor.destroy()}async createEditorWidget(){this._editor&&this._editor.destroy(),this._container=document.createElement("div"),this._container?.classList.add("display-none"),this._editor=new this.Editor({view:this.mapView,visibleElements:{snappingControls:!1},container:this._container}),this.el.appendChild(this._container);const t=this.reactiveUtils.watch((()=>this._editor.viewModel.featureTemplatesViewModel.state),(t=>{"ready"===t&&(this._editorLoading=!0)}));this._editor.viewModel.addHandles(t);const i=this.reactiveUtils.watch((()=>this._editor.viewModel.state),(t=>{"adding-attachment"===t||"editing-attachment"===t?(this._addingAttachment=!0,this.isActionPending.emit(!0)):this._addingAttachment&&(this.isActionPending.emit(!1),this._addingAttachment=!1)}));this._editor.viewModel.addHandles(i);const s=this.reactiveUtils.watch((()=>this._editor.viewModel.featureFormViewModel?.state),(t=>{"ready"===t&&this.formReady.emit()}));this._editor.viewModel.addHandles(s)}async startCreate(){const t=this.selectedFeature.layer,i=this.table,s=t.relationships[0],e=i.relationships.find((i=>t.layerId===i.relatedTableId)),a=await t.queryFeatures({objectIds:[this.selectedFeature.getObjectId()],outFields:[t.objectIdField,s.keyField]}),h=i.templates[0],c={attributeOverrides:this.makeAttributesForRelatedFeature(a.features[0],s,e),layer:i,template:h};await this._editor.startCreateFeaturesWorkflowAtFeatureCreation(c),await this.hideEditorsElements(),this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this))}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector(".esri-editor")?.querySelectorAll("calcite-flow-item")?.forEach((t=>{const i=t.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");i?.querySelector("header")?.setAttribute("style","display: none"),i?.querySelector("footer")?.setAttribute("style","display: none")})))}makeAttributesForRelatedFeature(t,i,s){const e=i.keyField;let a;t.attributes.hasOwnProperty(e)?a=t.getAttribute(e):t.attributes.hasOwnProperty(e.toLowerCase())?a=t.getAttribute(e.toLowerCase()):t.attributes.hasOwnProperty(e.toUpperCase())&&(a=t.getAttribute(e.toUpperCase()));let h=s.keyField;const c=this.table.fields.find((t=>t.name.toLocaleLowerCase()===h.toLocaleLowerCase()));return h=c.name,{[h]:a}}async submitted(t){if(t.invalid.length)this._isSubmitBtnClicked=!1;else if(t.valid.length&&this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{await this._editor.activeWorkflow.commit(),this._editor.viewModel.failures?.length&&this._editor.viewModel.failures.some((t=>{if(t.error)throw t.error}))}catch(t){return void this.fail.emit(t)}this.success.emit()}}timeout(t){return new Promise((i=>setTimeout(i,t)))}async _getTranslations(){const t=await c(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"],_editorLoading:["_editorLoadingWatchHandler"]}}};p.style=":host{display:block}.esri-editor__panel-toolbar{display:none !important}.display-none{display:none !important}.esri-editor__panel-content{padding-block:10px !important}.notice-msg{padding:10px;width:calc(100% - 20px)}";const b=class{constructor(s){t(this,s),this.loadingStatus=i(this,"loadingStatus",7),this.commentSelect=i(this,"commentSelect",7),this.addComment=i(this,"addComment",7),this.likeOrDislikeClicked=i(this,"likeOrDislikeClicked",7),this.featureSelectionChange=i(this,"featureSelectionChange",7)}get el(){return s(this)}mapView;graphics;reportingOptions;layerItemsHash;locale;showUserImageInCommentsList=!1;showFullCommentTitle=!0;_likeFieldAvailable=!1;_likeCount=0;_disLikeCount=0;_dislikeFieldAvailable=!1;_commentsAvailable=!1;_isLikeBtnClicked=!1;_isDislikeBtnClicked=!1;_relatedFeaturesOIDs;_updating=!1;_infoCard;_commentsList;_selectedGraphic;_likeField;_dislikeField;Graphic;RelationshipQuery;_validFieldTypes=["small-integer","integer","big-integer","single","long"];relatedTableId;async graphicsWatchHandler(){await this.getCompleteGraphic(this.graphics[0]),this.checkLikeDislikeFields(),await this.processComments()}async refresh(t){await this.getCompleteGraphic(t),await this.processComments(),this.isLikeDislikeConfigured(t.layer)?t&&this.graphics.length>1&&this.checkLikeDislikeFields():(this._likeFieldAvailable=!1,this._dislikeFieldAvailable=!1)}async back(){this._infoCard.back()}async next(){this._infoCard.next()}async toggleListView(){this._infoCard.toggleListView()}loadingStatus;commentSelect;addComment;likeOrDislikeClicked;featureSelectionChange;async componentWillLoad(){await this._initModules(),await this.getCompleteGraphic(this.graphics[0]),this.checkLikeDislikeFields(),await this.processComments()}render(){const t=this._relatedFeaturesOIDs?.length>0?`objectId in(${this._relatedFeaturesOIDs})`:"1=0";return e("calcite-panel",{key:"577f06f7bc41875b38e07a44f3c734ccc839e596","full-height":!0},e("info-card",{key:"e815f75d02bcdfe9cc11796c913be2a6c2bfecd2",allowEditing:!1,graphics:this.graphics,highlightEnabled:!1,isLoading:!1,isMobile:!1,locale:this.locale,mapView:this.mapView,onSelectionChanged:t=>{this.featureSelectionChange.emit(t.detail)},paginationEnabled:!1,position:"relative",ref:t=>this._infoCard=t}),(this._likeFieldAvailable||this._dislikeFieldAvailable||this._commentsAvailable)&&e("div",{key:"16d0af6b0e75b595573bd0816744f03d9d6dec37",class:"buttons-container"},this._commentsAvailable&&e("calcite-button",{key:"550b3af830911a1437fa3e967492666ec8c5a2e4",appearance:"transparent",iconEnd:"speech-bubble",kind:"neutral",onClick:()=>{this.addComment.emit()},scale:"m"},this._relatedFeaturesOIDs.length),this._likeFieldAvailable&&e("calcite-button",{key:"741848445c2083f4c0a3d9464cd810deee4a1218",appearance:"transparent",iconEnd:"thumbs-up",kind:this._isLikeBtnClicked?"brand":"neutral",loading:this._updating,onClick:this.onLikeButtonClick.bind(this),scale:"m"},this._likeCount??this._selectedGraphic.attributes[this._likeField]??0),this._dislikeFieldAvailable&&e("calcite-button",{key:"4d5e8ae279559dbf981b1b91238706adbd6ebeef",appearance:"transparent",iconEnd:"thumbs-down",kind:this._isDislikeBtnClicked?"brand":"neutral",loading:this._updating,onClick:this.onDislikeButtonClick.bind(this),scale:"m"},this._disLikeCount??this._selectedGraphic.attributes[this._dislikeField]??0)),this.relatedTableId&&this._commentsAvailable&&e("feature-list",{key:"0daad9b37b13a05afc4b8a3a6eca70a7356afd8f",class:"height-full",locale:this.locale,mapView:this.mapView,onFeatureSelect:t=>{this.commentSelect.emit(t.detail)},pageSize:5,ref:t=>this._commentsList=t,selectedLayerId:this.relatedTableId,showErrorWhenNoFeatures:!1,showFullTitle:this.showFullCommentTitle,showInitialLoading:!1,showUserImageInList:this.showUserImageInCommentsList,textSize:"small",whereClause:t}))}async _initModules(){const[t,i]=await h(["esri/rest/support/RelationshipQuery","esri/Graphic"]);this.RelationshipQuery=t,this.Graphic=i}async getCompleteGraphic(t){if(t){const i=t.layer,s=i.createQuery();s.objectIds=[t.getObjectId()];const e=await i.queryFeatures(s);this._selectedGraphic=e.features[0]}}async processComments(){const t=this._selectedGraphic.layer;if(this.reportingOptions&&this.reportingOptions[t.id]&&this.reportingOptions[t.id].comment&&t.relationships?.length>0){const i=await o(this.mapView);let s=null,e=null;if(t.relationships.some((a=>{const h=i.filter((i=>t.url===i.url&&i.layerId===a.relatedTableId));if(h&&h.length>0)return s=h[0],e=a.id,!0})),this.relatedTableId=s?.id??"",this.relatedTableId){const i=this._selectedGraphic.attributes[t.objectIdField],a=new this.RelationshipQuery({objectIds:[i],outFields:["*"],relationshipId:e}),h=await t.queryRelatedFeatures(a).catch((t=>{console.error(t)})),c=[];h[i]&&h[i].features.forEach((t=>{c.push(t.attributes[s.objectIdField])})),this._relatedFeaturesOIDs=c,this._commentsAvailable=!0}else this._relatedFeaturesOIDs=[],this._commentsAvailable=!1}else this._relatedFeaturesOIDs=[],this._commentsAvailable=!1,this.relatedTableId=""}isLikeDislikeConfigured(t){let i=!1,s=!1;if(this.reportingOptions&&this.reportingOptions[t.id]){if(!this.reportingOptions[t.id].like&&!this.reportingOptions[t.id].dislike)return!1;const e=this.reportingOptions[t.id].likeField,a=this.reportingOptions[t.id].dislikeField;if(!e&&!a)return!1;t.fields.forEach((h=>{this._validFieldTypes.indexOf(h.type)>-1&&this.layerItemsHash[t.id].supportsUpdate&&(h.name===e&&this.reportingOptions[t.id].like?i=!0:h.name===a&&this.reportingOptions[t.id].dislike&&(s=!0))}))}return i||s}checkLikeDislikeFields(){this._likeFieldAvailable=!1,this._dislikeFieldAvailable=!1,this._isLikeBtnClicked=!1,this._isDislikeBtnClicked=!1,this._likeCount=0,this._disLikeCount=0;const t=this._selectedGraphic.layer;if(this.reportingOptions&&this.reportingOptions[t.id]){if(this._likeField=this.reportingOptions[t.id].likeField,this._dislikeField=this.reportingOptions[t.id].dislikeField,!this._likeField&&!this._dislikeField)return;t.fields.forEach((i=>{this._validFieldTypes.indexOf(i.type)>-1&&this.layerItemsHash[t.id].supportsUpdate&&(i.name===this._likeField&&this.reportingOptions[t.id].like?(this._likeFieldAvailable=!0,this._likeCount=this._selectedGraphic.attributes[i.name]):i.name===this._dislikeField&&this.reportingOptions[t.id].dislike&&(this._dislikeFieldAvailable=!0,this._disLikeCount=this._selectedGraphic.attributes[i.name]))})),this.getFromLocalStorage()}}onLikeButtonClick(){this._isDislikeBtnClicked&&this.reportingOptions[this._selectedGraphic.layer.id].dislike&&this.onDislikeButtonClick(),this._isLikeBtnClicked=!this._isLikeBtnClicked,this._isLikeBtnClicked?this._likeCount++:this._likeCount--,this.updateFeaturesLikeDislikeField(this._likeField,this._isLikeBtnClicked)}onDislikeButtonClick(){this._isLikeBtnClicked&&this.reportingOptions[this._selectedGraphic.layer.id].like&&this.onLikeButtonClick(),this._isDislikeBtnClicked=!this._isDislikeBtnClicked,this._isDislikeBtnClicked?this._disLikeCount++:this._disLikeCount--,this.updateFeaturesLikeDislikeField(this._dislikeField,this._isDislikeBtnClicked)}async updateFeaturesLikeDislikeField(t,i){const s={},e=this._selectedGraphic.layer;this._updating=!0;const a=this._selectedGraphic;a.attributes[t]=Number(a.attributes[t])+(i?1:-1),s[e.objectIdField]=a.attributes[e.objectIdField],s[t]=a.attributes[t];const h=new this.Graphic;h.attributes=s;const c={updateFeatures:[h]};await e.applyEdits(c).then((()=>{this._selectedGraphic=a,this.setInLocalStorage(),this._updating=!1,this.likeOrDislikeClicked.emit()}),(t=>{this._updating=!1,console.log(t)}))}getFromLocalStorage(){const t=localStorage[this._selectedGraphic.layer.id];if(t){const i=JSON.parse(t).filter((t=>t.id===this._selectedGraphic.getObjectId()));i.length>0&&(this._isLikeBtnClicked=i[0].like,this._isDislikeBtnClicked=i[0].dislike)}}setInLocalStorage(){const t=this._selectedGraphic.layer.id,i=localStorage[t];let s=[];if(i){s=JSON.parse(i);const t=s.findIndex((t=>t.id===this._selectedGraphic.getObjectId()));t>=0&&s.splice(t,1)}s.push({id:this._selectedGraphic.getObjectId(),like:this._isLikeBtnClicked&&0!==this._likeCount,dislike:this._isDislikeBtnClicked&&0!==this._disLikeCount}),localStorage.setItem(t,JSON.stringify(s))}static get watchers(){return{graphics:["graphicsWatchHandler"]}}};b.style=":host{display:block}.buttons-container{align-items:center;display:flex;padding:4px;color:var(--calcite-color-text-1) !important;background-color:var(--calcite-color-foreground-1) !important;border-block-start:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3)}";const y=class{constructor(s){t(this,s),this.layerSelect=i(this,"layerSelect",7),this.layersListLoaded=i(this,"layersListLoaded",7)}get el(){return s(this)}mapView;layers;locale;showFeatureCount=!0;showNextIcon=!1;applyLayerViewFilter=!1;_noLayersToDisplay=!1;_mapLayerIds=[];_isLoading=!1;_translations;_layerItemsHash;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async refresh(){await this.setLayers()}layerSelect;layersListLoaded;async componentWillLoad(){await this._getTranslations()}async componentDidLoad(){await this.setLayers()}render(){return e(a,{key:"a151c8fd65c50aacb23dcd0c858e52c0c7cd7e5e"},this._isLoading&&e("calcite-loader",{key:"544a134bccc29048ca80b996844cc944bcd97a24",label:"",scale:"m"}),!this._isLoading&&this.mapView&&this._noLayersToDisplay&&e("calcite-notice",{key:"7557f91c8c3349c120c043ea59458b4c834dce2e",class:"error-msg",icon:"layers-reference",kind:"danger",open:!0},e("div",{key:"ea8b20f8c7da5053641cfad56e3395ae3c6286f5",slot:"title"},this._translations.error),e("div",{key:"38aaed7b456aba0b1dd70183be03e9133834dfb4",slot:"message"},this._translations.noLayerToDisplayErrorMsg)),!this._isLoading&&this.mapView&&e("calcite-list",{key:"547b0681145fd8d8663b786472be9e5161cbd693",label:"","selection-appearance":"border","selection-mode":"none"},this.renderLayerList()))}async setLayers(){this.mapView&&(this._isLoading=!0,await this.initLayerHash(),this._isLoading=!1)}async initLayerHash(){const t=[];this._layerItemsHash=await l(this.mapView,!0);const i=await r(this.mapView);for(const s of i)if("feature"===s?.type&&this.showFeatureCount){const i=s.createQuery();if(s?.definitionExpression&&(i.where=i.where+" AND "+s.definitionExpression),this.applyLayerViewFilter){const t=await d(this.mapView,s.id);t?.filter?.where&&(i.where=i.where?i.where+" AND "+t.filter.where:t.filter.where)}const e=s.queryFeatureCount(i);t.push(e),e.then((async t=>{const i=isNaN(t)?"":await n(t,{places:0,api:4,type:"decimal"});this._layerItemsHash[s.id].formattedFeatureCount=i}))}await Promise.all(t).then((()=>{const t=this.getLayersToBeShownInList(this._layerItemsHash);this._mapLayerIds=t.reverse(),this.handleNoLayersToDisplay()}),(()=>{this._mapLayerIds=[],this.handleNoLayersToDisplay()}))}handleNoLayersToDisplay(){this._noLayersToDisplay=!(this._mapLayerIds.length>0),this.layersListLoaded.emit(this._mapLayerIds)}getLayersToBeShownInList(t){const i=this.layers?.length>0?this.layers:[];return Object.keys(t).reduce(((t,s)=>(i.indexOf(s)>-1&&t.push(s),t)),[])}renderLayerList(){return this._mapLayerIds.length>0&&this._mapLayerIds.reduce(((t,i)=>(this._layerItemsHash[i]&&t.push(this.getLayerListItem(i)),t)),[])}getLayerListItem(t){const i=this._layerItemsHash[t].formattedFeatureCount;return e("calcite-list-item",{onCalciteListItemSelect:()=>{this.onLayerItemSelected(t)}},e("div",{class:"layer-name",slot:"content-start"},this._layerItemsHash[t].name),this.showFeatureCount&&void 0!==i&&""!==i&&e("div",{class:"feature-count",slot:"content-end"},"("+i+")"),this.showNextIcon&&e("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}onLayerItemSelected(t){this.layerSelect.emit({layerId:t,layerName:this._layerItemsHash[t].name})}async _getTranslations(){const t=await c(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"]}}};y.style=":host{display:block}.error-msg{padding:10px}.layer-name{font-weight:500;word-break:break-word}.feature-count{padding:0 10px}";export{p as create_related_feature,b as feature_details,y as layer_list}