@esri/solutions-components 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (274) hide show
  1. package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -5
  2. package/dist/cjs/calcite-combobox_3.cjs.entry.js +2 -2
  3. package/dist/cjs/calcite-input-message_5.cjs.entry.js +6 -4
  4. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
  5. package/dist/cjs/{csvUtils-83af7ae1.js → csvUtils-34666909.js} +1 -1
  6. package/dist/cjs/{interfaces-772edf61.js → interfaces-17c631bf.js} +1 -1
  7. package/dist/cjs/layer-table.cjs.entry.js +3 -3
  8. package/dist/cjs/map-card.cjs.entry.js +1 -1
  9. package/dist/cjs/{mapViewUtils-55ac76cb.js → mapViewUtils-24d1d859.js} +1 -1
  10. package/dist/cjs/public-notification.cjs.entry.js +16 -10
  11. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  12. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  13. package/dist/cjs/{solution-store-39726b81.js → solution-store-2dbab624.js} +1 -1
  14. package/dist/collection/components/buffer-tools/buffer-tools.js +2 -2
  15. package/dist/collection/components/map-draw-tools/map-draw-tools.js +2 -1
  16. package/dist/collection/components/public-notification/public-notification.js +14 -8
  17. package/dist/collection/components/refine-selection/refine-selection.js +4 -2
  18. package/dist/collection/components/refine-selection-tools/refine-selection-tools.css +1 -0
  19. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +3 -1
  20. package/dist/collection/demos/new-public-notification.html +2 -1
  21. package/dist/collection/utils/interfaces.js +1 -1
  22. package/dist/collection/utils/interfaces.ts +2 -2
  23. package/dist/components/interfaces3.js +1 -1
  24. package/dist/components/map-draw-tools2.js +2 -1
  25. package/dist/components/public-notification.js +14 -8
  26. package/dist/components/refine-selection-tools2.js +4 -2
  27. package/dist/components/refine-selection2.js +4 -2
  28. package/dist/esm/buffer-tools_6.entry.js +8 -5
  29. package/dist/esm/calcite-combobox_3.entry.js +2 -2
  30. package/dist/esm/calcite-input-message_5.entry.js +6 -4
  31. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  32. package/dist/esm/{csvUtils-eb231cfb.js → csvUtils-ae3004b9.js} +1 -1
  33. package/dist/esm/{interfaces-3b23a5f9.js → interfaces-d0d83efa.js} +1 -1
  34. package/dist/esm/layer-table.entry.js +3 -3
  35. package/dist/esm/map-card.entry.js +1 -1
  36. package/dist/esm/{mapViewUtils-e5d8a1e1.js → mapViewUtils-541e7a3c.js} +1 -1
  37. package/dist/esm/public-notification.entry.js +16 -10
  38. package/dist/esm/solution-configuration.entry.js +2 -2
  39. package/dist/esm/solution-contents_3.entry.js +2 -2
  40. package/dist/esm/{solution-store-c0bf9200.js → solution-store-41e15f1c.js} +1 -1
  41. package/dist/solutions-components/demos/new-public-notification.html +2 -1
  42. package/dist/solutions-components/p-05e64bd1.js +498 -2
  43. package/dist/solutions-components/p-08a95b33.entry.js +138 -0
  44. package/dist/solutions-components/p-0da5bbdf.entry.js +91 -0
  45. package/dist/solutions-components/p-0ef91144.entry.js +913 -0
  46. package/dist/solutions-components/p-0f523243.entry.js +1916 -0
  47. package/dist/solutions-components/p-11b9510e.entry.js +173 -0
  48. package/dist/solutions-components/p-1b875d94.entry.js +58 -0
  49. package/dist/solutions-components/p-1c567f3a.js +23 -16
  50. package/dist/solutions-components/p-1c883db9.entry.js +43 -0
  51. package/dist/solutions-components/p-1f225056.js +322 -0
  52. package/dist/solutions-components/p-1f499e67.entry.js +72 -0
  53. package/dist/solutions-components/p-20d3d758.entry.js +881 -0
  54. package/dist/solutions-components/p-2274ac9e.entry.js +160 -0
  55. package/dist/solutions-components/p-23ec5ac5.entry.js +93 -0
  56. package/dist/solutions-components/p-2447798c.entry.js +155 -0
  57. package/dist/solutions-components/p-2525e691.entry.js +432 -0
  58. package/dist/solutions-components/p-2561f5b5.js +4092 -0
  59. package/dist/solutions-components/p-29f887c0.entry.js +234 -0
  60. package/dist/solutions-components/p-2a0d8047.entry.js +345 -0
  61. package/dist/solutions-components/p-2c177e6a.entry.js +101 -0
  62. package/dist/solutions-components/p-2e9ed892.js +46 -1
  63. package/dist/solutions-components/p-316f56db.js +219 -2
  64. package/dist/solutions-components/p-327f3ebf.entry.js +98 -0
  65. package/dist/solutions-components/p-356f8b54.entry.js +138 -0
  66. package/dist/solutions-components/p-359c58de.entry.js +172 -0
  67. package/dist/solutions-components/p-37336c0d.entry.js +116 -0
  68. package/dist/solutions-components/p-374a5031.js +105 -2
  69. package/dist/solutions-components/p-39ea6ef4.entry.js +71 -0
  70. package/dist/solutions-components/p-3b010ce1.js +17 -1
  71. package/dist/solutions-components/p-4307dacd.js +194 -1
  72. package/dist/solutions-components/p-44da2507.js +405 -14
  73. package/dist/solutions-components/p-46bdffe8.entry.js +54 -0
  74. package/dist/solutions-components/p-4894bbeb.js +53 -2
  75. package/dist/solutions-components/p-4cd569f1.entry.js +1298 -0
  76. package/dist/solutions-components/p-4d4160f9.entry.js +121 -0
  77. package/dist/solutions-components/p-4e32bf8c.js +482 -1
  78. package/dist/solutions-components/p-4e9cbd32.entry.js +184 -0
  79. package/dist/solutions-components/p-508317b3.js +13 -2
  80. package/dist/solutions-components/p-54697d58.entry.js +198 -0
  81. package/dist/solutions-components/p-55c79103.entry.js +311 -0
  82. package/dist/solutions-components/p-57fd19c0.entry.js +706 -0
  83. package/dist/solutions-components/p-59b48fde.entry.js +443 -0
  84. package/dist/solutions-components/p-60e0e6a0.entry.js +214 -0
  85. package/dist/solutions-components/p-621d0534.entry.js +123 -0
  86. package/dist/solutions-components/p-63f6e8f1.js +14 -1
  87. package/dist/solutions-components/p-66aeec57.entry.js +61 -0
  88. package/dist/solutions-components/p-69834f46.entry.js +618 -0
  89. package/dist/solutions-components/p-6d9da8e5.entry.js +21530 -0
  90. package/dist/solutions-components/p-6e0da576.js +13 -1
  91. package/dist/solutions-components/p-6ec3f294.entry.js +106 -0
  92. package/dist/solutions-components/p-6fe17794.js +9 -1
  93. package/dist/solutions-components/p-7024cb16.entry.js +72 -0
  94. package/dist/solutions-components/p-70535506.entry.js +226 -0
  95. package/dist/solutions-components/p-708a63a8.js +12 -1
  96. package/dist/solutions-components/p-729708a3.js +14 -1
  97. package/dist/solutions-components/p-73e23995.js +6 -1
  98. package/dist/solutions-components/p-74b29d75.entry.js +231 -0
  99. package/dist/solutions-components/p-74b7ee25.entry.js +711 -0
  100. package/dist/solutions-components/p-77182c3a.js +3015 -1
  101. package/dist/solutions-components/p-78b3ef80.entry.js +456 -0
  102. package/dist/solutions-components/p-79709c19.js +60 -3
  103. package/dist/solutions-components/p-7a46ef97.js +181 -2
  104. package/dist/solutions-components/p-7be159e6.entry.js +175 -0
  105. package/dist/solutions-components/p-7d4451c2.entry.js +71 -0
  106. package/dist/solutions-components/p-7daea1df.js +41 -1
  107. package/dist/solutions-components/p-7e39e5ad.entry.js +102 -0
  108. package/dist/solutions-components/p-7fb45059.entry.js +43 -0
  109. package/dist/solutions-components/p-815533de.js +306 -3
  110. package/dist/solutions-components/p-816622ca.entry.js +248 -0
  111. package/dist/solutions-components/p-83166522.js +205 -2
  112. package/dist/solutions-components/p-83bd1991.entry.js +36 -0
  113. package/dist/solutions-components/p-856464d7.entry.js +572 -0
  114. package/dist/solutions-components/p-8c349bad.entry.js +347 -0
  115. package/dist/solutions-components/p-8dccb390.entry.js +1986 -0
  116. package/dist/solutions-components/p-904c185a.entry.js +228 -0
  117. package/dist/solutions-components/p-9092f8b3.entry.js +156 -0
  118. package/dist/solutions-components/p-9371145a.entry.js +477 -0
  119. package/dist/solutions-components/p-93d3119d.js +1948 -1
  120. package/dist/solutions-components/p-95ec8062.entry.js +173 -0
  121. package/dist/solutions-components/p-991ee695.js +109 -1
  122. package/dist/solutions-components/p-9a57dab7.entry.js +213 -0
  123. package/dist/solutions-components/p-9a9955db.js +41 -1
  124. package/dist/solutions-components/p-9c1ebc90.js +35 -16
  125. package/dist/solutions-components/p-9eba5c66.js +399 -3
  126. package/dist/solutions-components/p-a033a507.entry.js +252 -0
  127. package/dist/solutions-components/p-a3773415.entry.js +1132 -0
  128. package/dist/solutions-components/p-a44fe40f.entry.js +94 -0
  129. package/dist/solutions-components/p-a5b1ab03.js +33 -3
  130. package/dist/solutions-components/p-a5b2c13d.entry.js +723 -0
  131. package/dist/solutions-components/p-a6d729b7.entry.js +85 -0
  132. package/dist/solutions-components/p-a8005026.entry.js +565 -0
  133. package/dist/solutions-components/p-a80b3880.js +14 -1
  134. package/dist/solutions-components/p-a89198a3.entry.js +2620 -0
  135. package/dist/solutions-components/p-aa04bd1f.entry.js +95 -0
  136. package/dist/solutions-components/p-aa0a0922.entry.js +80 -0
  137. package/dist/solutions-components/p-ae1fd76b.js +11 -1
  138. package/dist/solutions-components/p-b2cf435e.entry.js +87 -0
  139. package/dist/solutions-components/p-b359dc78.js +41 -1
  140. package/dist/solutions-components/p-b57bc4eb.entry.js +71 -0
  141. package/dist/solutions-components/p-b75cc407.entry.js +145 -0
  142. package/dist/solutions-components/p-b911cb75.entry.js +71 -0
  143. package/dist/solutions-components/p-b965e177.entry.js +335 -0
  144. package/dist/solutions-components/p-b978636e.js +14 -1
  145. package/dist/solutions-components/p-ba10a5c8.entry.js +42 -0
  146. package/dist/solutions-components/p-bd67334c.js +122 -2
  147. package/dist/solutions-components/p-bde20dba.entry.js +212 -0
  148. package/dist/solutions-components/p-be0b5a94.entry.js +248 -0
  149. package/dist/solutions-components/p-c023e6a1.js +2028 -2
  150. package/dist/solutions-components/p-c27b0c2d.entry.js +150 -0
  151. package/dist/solutions-components/p-c579ed60.entry.js +447 -0
  152. package/dist/solutions-components/p-c92bc231.js +101 -2
  153. package/dist/solutions-components/p-cc815aca.js +839 -16
  154. package/dist/solutions-components/p-cc8beabb.entry.js +695 -0
  155. package/dist/solutions-components/p-cdc46c0c.js +1751 -2
  156. package/dist/solutions-components/p-d12e6992.entry.js +118 -0
  157. package/dist/solutions-components/p-d1dfed6b.entry.js +179 -0
  158. package/dist/solutions-components/p-d48a24e6.js +754 -2
  159. package/dist/solutions-components/p-d96ee3ef.entry.js +579 -0
  160. package/dist/solutions-components/p-dbc9a5a8.js +80 -0
  161. package/dist/solutions-components/p-dcdbe712.entry.js +278 -0
  162. package/dist/solutions-components/p-de39206f.entry.js +113 -0
  163. package/dist/solutions-components/p-de5416e8.js +28 -1
  164. package/dist/solutions-components/p-df420d54.entry.js +213 -0
  165. package/dist/solutions-components/p-e3138cf0.entry.js +20 -0
  166. package/dist/solutions-components/p-e4845fec.entry.js +152 -0
  167. package/dist/solutions-components/p-e611d8c8.js +28 -1
  168. package/dist/solutions-components/p-e947d3b0.js +5 -1
  169. package/dist/solutions-components/p-ea534300.js +41 -2
  170. package/dist/solutions-components/p-ec84ee85.entry.js +55 -0
  171. package/dist/solutions-components/p-ed36c637.entry.js +85 -0
  172. package/dist/solutions-components/p-f0add71c.js +74 -0
  173. package/dist/solutions-components/p-f42e014b.js +171 -2
  174. package/dist/solutions-components/p-fc02e7de.entry.js +308 -0
  175. package/dist/solutions-components/p-fc884dd6.js +28 -16
  176. package/dist/solutions-components/p-fcbfa59c.entry.js +181 -0
  177. package/dist/solutions-components/p-fdc5cf5f.entry.js +138 -0
  178. package/dist/solutions-components/solutions-components.esm.js +20 -1
  179. package/dist/solutions-components/utils/interfaces.ts +2 -2
  180. package/dist/types/components/buffer-tools/buffer-tools.d.ts +2 -2
  181. package/dist/types/components/public-notification/public-notification.d.ts +9 -1
  182. package/dist/types/components.d.ts +2 -2
  183. package/package.json +1 -1
  184. package/dist/solutions-components/p-021432b8.entry.js +0 -12
  185. package/dist/solutions-components/p-03440b1e.entry.js +0 -11
  186. package/dist/solutions-components/p-0512635b.entry.js +0 -6
  187. package/dist/solutions-components/p-086ef115.entry.js +0 -29
  188. package/dist/solutions-components/p-0b4bf57f.entry.js +0 -6
  189. package/dist/solutions-components/p-0c088725.entry.js +0 -6
  190. package/dist/solutions-components/p-0f820c08.entry.js +0 -6
  191. package/dist/solutions-components/p-164780a0.entry.js +0 -6
  192. package/dist/solutions-components/p-179a68a0.entry.js +0 -6
  193. package/dist/solutions-components/p-184b5005.entry.js +0 -11
  194. package/dist/solutions-components/p-1d082fee.entry.js +0 -11
  195. package/dist/solutions-components/p-1e6c02a2.entry.js +0 -11
  196. package/dist/solutions-components/p-20a58e62.entry.js +0 -17
  197. package/dist/solutions-components/p-20b2458c.entry.js +0 -11
  198. package/dist/solutions-components/p-245d47c1.entry.js +0 -6
  199. package/dist/solutions-components/p-2cb057a9.entry.js +0 -11
  200. package/dist/solutions-components/p-2cc72806.entry.js +0 -23
  201. package/dist/solutions-components/p-2de1db9c.entry.js +0 -11
  202. package/dist/solutions-components/p-2e9c7055.entry.js +0 -11
  203. package/dist/solutions-components/p-2ed5e6c8.entry.js +0 -11
  204. package/dist/solutions-components/p-3109d940.entry.js +0 -6
  205. package/dist/solutions-components/p-31a8bcfa.entry.js +0 -6
  206. package/dist/solutions-components/p-3649acb3.entry.js +0 -18
  207. package/dist/solutions-components/p-3f88ba73.entry.js +0 -6
  208. package/dist/solutions-components/p-3fa9b3c8.js +0 -36
  209. package/dist/solutions-components/p-40c41709.entry.js +0 -6
  210. package/dist/solutions-components/p-40e963c7.entry.js +0 -11
  211. package/dist/solutions-components/p-40f480da.entry.js +0 -11
  212. package/dist/solutions-components/p-49d5d2d3.entry.js +0 -11
  213. package/dist/solutions-components/p-4f7049a4.entry.js +0 -11
  214. package/dist/solutions-components/p-506e4d78.entry.js +0 -6
  215. package/dist/solutions-components/p-576fdcab.entry.js +0 -6
  216. package/dist/solutions-components/p-5bd0cf34.entry.js +0 -23
  217. package/dist/solutions-components/p-65e177f1.entry.js +0 -6
  218. package/dist/solutions-components/p-67d710c2.entry.js +0 -6
  219. package/dist/solutions-components/p-7268b445.entry.js +0 -11
  220. package/dist/solutions-components/p-75ea4667.entry.js +0 -6
  221. package/dist/solutions-components/p-778c0a36.entry.js +0 -17
  222. package/dist/solutions-components/p-7a22509b.entry.js +0 -12
  223. package/dist/solutions-components/p-7bff51db.entry.js +0 -6
  224. package/dist/solutions-components/p-7d2d0d5d.entry.js +0 -6
  225. package/dist/solutions-components/p-7f0036f1.entry.js +0 -11
  226. package/dist/solutions-components/p-8060fb94.entry.js +0 -6
  227. package/dist/solutions-components/p-80a1b305.entry.js +0 -6
  228. package/dist/solutions-components/p-81eae877.entry.js +0 -12
  229. package/dist/solutions-components/p-84e86b8b.entry.js +0 -6
  230. package/dist/solutions-components/p-851e04ae.entry.js +0 -6
  231. package/dist/solutions-components/p-9106950a.entry.js +0 -11
  232. package/dist/solutions-components/p-979804a4.entry.js +0 -11
  233. package/dist/solutions-components/p-9862baa8.entry.js +0 -11
  234. package/dist/solutions-components/p-9b5a9117.entry.js +0 -12
  235. package/dist/solutions-components/p-9deff0c2.entry.js +0 -6
  236. package/dist/solutions-components/p-9f400eeb.entry.js +0 -6
  237. package/dist/solutions-components/p-a0639ad1.entry.js +0 -11
  238. package/dist/solutions-components/p-a33c044e.entry.js +0 -6
  239. package/dist/solutions-components/p-a516c658.entry.js +0 -6
  240. package/dist/solutions-components/p-aa0ef36d.entry.js +0 -11
  241. package/dist/solutions-components/p-aaccbdf3.entry.js +0 -18
  242. package/dist/solutions-components/p-ab03a5c9.entry.js +0 -11
  243. package/dist/solutions-components/p-ad469b92.entry.js +0 -11
  244. package/dist/solutions-components/p-adc86ac3.entry.js +0 -6
  245. package/dist/solutions-components/p-addc1156.entry.js +0 -11
  246. package/dist/solutions-components/p-ae846934.entry.js +0 -11
  247. package/dist/solutions-components/p-b0572fc4.entry.js +0 -37
  248. package/dist/solutions-components/p-b4e476b7.js +0 -257
  249. package/dist/solutions-components/p-b668daf8.js +0 -21
  250. package/dist/solutions-components/p-b6e6eae1.entry.js +0 -6
  251. package/dist/solutions-components/p-bc317a7f.entry.js +0 -6
  252. package/dist/solutions-components/p-be41429f.js +0 -21
  253. package/dist/solutions-components/p-bf6b6353.entry.js +0 -11
  254. package/dist/solutions-components/p-c2e3dfbb.entry.js +0 -11
  255. package/dist/solutions-components/p-c4afae53.entry.js +0 -12
  256. package/dist/solutions-components/p-c9da1c26.entry.js +0 -6
  257. package/dist/solutions-components/p-cbf8cd49.entry.js +0 -6
  258. package/dist/solutions-components/p-cc1a064a.entry.js +0 -11
  259. package/dist/solutions-components/p-d09a168c.entry.js +0 -6
  260. package/dist/solutions-components/p-d377f913.entry.js +0 -11
  261. package/dist/solutions-components/p-d4cefead.entry.js +0 -37
  262. package/dist/solutions-components/p-d7bc0baf.entry.js +0 -16
  263. package/dist/solutions-components/p-d8968487.entry.js +0 -11
  264. package/dist/solutions-components/p-e00a0b86.entry.js +0 -11
  265. package/dist/solutions-components/p-e9a7ed49.entry.js +0 -11
  266. package/dist/solutions-components/p-ec27e493.entry.js +0 -11
  267. package/dist/solutions-components/p-ed6404eb.entry.js +0 -6
  268. package/dist/solutions-components/p-ef21e195.entry.js +0 -23
  269. package/dist/solutions-components/p-f6068a2d.entry.js +0 -11
  270. package/dist/solutions-components/p-f6c4cff3.entry.js +0 -11
  271. package/dist/solutions-components/p-f847291f.entry.js +0 -6
  272. package/dist/solutions-components/p-f90fd262.entry.js +0 -11
  273. package/dist/solutions-components/p-fc973005.entry.js +0 -6
  274. package/dist/solutions-components/p-ff9fb6bc.entry.js +0 -11
@@ -0,0 +1,1298 @@
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 registerInstance, h, H as Host, g as getElement, c as createEvent } from './p-c023e6a1.js';
7
+ import { s as setRequestedIcon, g as getElementProp, a as getSlotted } from './p-83166522.js';
8
+ import { S as StatusIcons } from './p-6fe17794.js';
9
+ import { c as connectConditionalSlotComponent, d as disconnectConditionalSlotComponent } from './p-ea534300.js';
10
+ import { l as loadModules } from './p-1c567f3a.js';
11
+ import { g as goToSelection, h as highlightFeatures, d as queryObjectIds, e as getQueryGeoms } from './p-1f225056.js';
12
+ import { E as EWorkflowType, f as ESelectionMode, g as ERefineMode, c as ESketchType } from './p-dbc9a5a8.js';
13
+ import { s as state } from './p-9c1ebc90.js';
14
+ import { g as getLocaleComponentStrings } from './p-44da2507.js';
15
+ import { e as exportCSV } from './p-f0add71c.js';
16
+ import { a as getSelectionIds, g as getTotal } from './p-fc884dd6.js';
17
+ import './p-729708a3.js';
18
+ import './p-a80b3880.js';
19
+ import './p-9a9955db.js';
20
+ import './p-4307dacd.js';
21
+ import './p-3b010ce1.js';
22
+
23
+ /*!
24
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
25
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
26
+ * v1.0.0-beta.97
27
+ */
28
+ var StatusIconDefaults;
29
+ (function (StatusIconDefaults) {
30
+ StatusIconDefaults["valid"] = "check-circle";
31
+ StatusIconDefaults["invalid"] = "exclamation-mark-triangle";
32
+ StatusIconDefaults["idle"] = "information";
33
+ })(StatusIconDefaults || (StatusIconDefaults = {}));
34
+
35
+ const inputMessageCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([active][scale=m]),:host([active][scale=l]){--calcite-input-message-spacing-value:0.25rem}:host{visibility:hidden;box-sizing:border-box;display:flex;block-size:0px;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([active]){visibility:visible;block-size:auto;opacity:1;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([active][scale=m]),:host([active][scale=l]){-webkit-margin-before:var(--calcite-input-message-spacing-value);margin-block-start:var(--calcite-input-message-spacing-value)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-ui-danger)}:host([status=warning]) .calcite-input-message-icon{color:var(--calcite-ui-warning)}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-ui-success)}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-ui-brand)}:host([status][active]){color:var(--calcite-ui-text-1)}:host([status][scale=s]){font-size:var(--calcite-font-size--3);line-height:0.75rem}:host([status][scale=m]){-webkit-margin-before:0.25rem;margin-block-start:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([status][scale=l]){-webkit-margin-before:0.25rem;margin-block-start:0.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}";
36
+
37
+ const InputMessage = class {
38
+ constructor(hostRef) {
39
+ registerInstance(this, hostRef);
40
+ //--------------------------------------------------------------------------
41
+ //
42
+ // Properties
43
+ //
44
+ //--------------------------------------------------------------------------
45
+ /** When `true`, the component is active. */
46
+ this.active = false;
47
+ /** Specifies the size of the component. */
48
+ this.scale = "m";
49
+ /** Specifies the status of the input field, which determines message and icons. */
50
+ this.status = "idle";
51
+ }
52
+ handleIconEl() {
53
+ this.requestedIcon = setRequestedIcon(StatusIconDefaults, this.icon, this.status);
54
+ }
55
+ //--------------------------------------------------------------------------
56
+ //
57
+ // Lifecycle
58
+ //
59
+ //--------------------------------------------------------------------------
60
+ connectedCallback() {
61
+ this.status = getElementProp(this.el, "status", this.status);
62
+ this.scale = getElementProp(this.el, "scale", this.scale);
63
+ this.requestedIcon = setRequestedIcon(StatusIconDefaults, this.icon, this.status);
64
+ }
65
+ render() {
66
+ const hidden = !this.active;
67
+ return (h(Host, { "calcite-hydrated-hidden": hidden }, this.renderIcon(this.requestedIcon), h("slot", null)));
68
+ }
69
+ //--------------------------------------------------------------------------
70
+ //
71
+ // Private Methods
72
+ //
73
+ //--------------------------------------------------------------------------
74
+ renderIcon(iconName) {
75
+ if (iconName) {
76
+ return h("calcite-icon", { class: "calcite-input-message-icon", icon: iconName, scale: "s" });
77
+ }
78
+ }
79
+ get el() { return getElement(this); }
80
+ static get watchers() { return {
81
+ "status": ["handleIconEl"],
82
+ "icon": ["handleIconEl"]
83
+ }; }
84
+ };
85
+ InputMessage.style = inputMessageCss;
86
+
87
+ /*!
88
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
89
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
90
+ * v1.0.0-beta.97
91
+ */
92
+ const TEXT = {
93
+ close: "Close"
94
+ };
95
+ const SLOTS = {
96
+ title: "title",
97
+ message: "message",
98
+ link: "link",
99
+ actionsEnd: "actions-end"
100
+ };
101
+ const CSS = {
102
+ actionsEnd: "actions-end",
103
+ close: "notice-close",
104
+ container: "container",
105
+ content: "notice-content",
106
+ icon: "notice-icon"
107
+ };
108
+
109
+ const noticeCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([scale=s]){--calcite-notice-spacing-token-small:0.5rem;--calcite-notice-spacing-token-large:0.75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:0.5rem}:host([scale=m]){--calcite-notice-spacing-token-small:0.75rem;--calcite-notice-spacing-token-large:1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small:1rem;--calcite-notice-spacing-token-large:1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width:auto}:host([width=half]){--calcite-notice-width:50%}:host([width=full]){--calcite-notice-width:100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:none;inline-size:100%;background-color:var(--calcite-ui-foreground-1);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;max-block-size:0;text-align:start;-webkit-border-start:0px solid;border-inline-start:0px solid;box-shadow:0 0 0 0 transparent}.notice-close{outline-color:transparent}.notice-close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host{display:flex}:host([open]) .container{pointer-events:auto;display:flex;max-block-size:100%;align-items:center;border-width:2px;opacity:1;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0px;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0px;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);-webkit-margin-end:var(--calcite-notice-spacing-token-small);margin-inline-end:var(--calcite-notice-spacing-token-small)}.notice-content{box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){-webkit-padding-start:var(--calcite-notice-spacing-token-large);padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.notice-close:active{background-color:var(--calcite-ui-foreground-3)}.actions-end{display:flex;align-self:stretch}:host([color=blue]) .container{border-color:var(--calcite-ui-brand)}:host([color=blue]) .container .notice-icon{color:var(--calcite-ui-brand)}:host([color=red]) .container{border-color:var(--calcite-ui-danger)}:host([color=red]) .container .notice-icon{color:var(--calcite-ui-danger)}:host([color=yellow]) .container{border-color:var(--calcite-ui-warning)}:host([color=yellow]) .container .notice-icon{color:var(--calcite-ui-warning)}:host([color=green]) .container{border-color:var(--calcite-ui-success)}:host([color=green]) .container .notice-icon{color:var(--calcite-ui-success)}";
110
+
111
+ const Notice = class {
112
+ constructor(hostRef) {
113
+ registerInstance(this, hostRef);
114
+ this.calciteNoticeClose = createEvent(this, "calciteNoticeClose", 6);
115
+ this.calciteNoticeOpen = createEvent(this, "calciteNoticeOpen", 6);
116
+ //--------------------------------------------------------------------------
117
+ //
118
+ // Properties
119
+ //
120
+ //---------------------------------------------------------------------------
121
+ /**
122
+ * When `true`, the component is active.
123
+ *
124
+ * @deprecated Use `open` instead.
125
+ */
126
+ this.active = false;
127
+ /** When `true`, the component is visible. */
128
+ this.open = false;
129
+ /** The color for the component's top border and icon. */
130
+ this.color = "blue";
131
+ /**
132
+ * When `true`, a close button is added to the component.
133
+ *
134
+ * @deprecated use `closable` instead.
135
+ */
136
+ this.dismissible = false;
137
+ /** When `true`, a close button is added to the component. */
138
+ this.closable = false;
139
+ /**
140
+ * Accessible name for the close button.
141
+ *
142
+ * @default "Close"
143
+ */
144
+ this.intlClose = TEXT.close;
145
+ /** Specifies the size of the component. */
146
+ this.scale = "m";
147
+ /** Specifies the width of the component. */
148
+ this.width = "auto";
149
+ //--------------------------------------------------------------------------
150
+ //
151
+ // Private Methods
152
+ //
153
+ //--------------------------------------------------------------------------
154
+ this.close = () => {
155
+ this.open = false;
156
+ this.calciteNoticeClose.emit();
157
+ };
158
+ }
159
+ activeHandler(value) {
160
+ this.open = value;
161
+ }
162
+ openHandler(value) {
163
+ this.active = value;
164
+ }
165
+ handleDismissible(value) {
166
+ this.closable = value;
167
+ }
168
+ handleClosable(value) {
169
+ this.dismissible = value;
170
+ }
171
+ updateRequestedIcon() {
172
+ this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
173
+ }
174
+ //--------------------------------------------------------------------------
175
+ //
176
+ // Lifecycle
177
+ //
178
+ //--------------------------------------------------------------------------
179
+ connectedCallback() {
180
+ connectConditionalSlotComponent(this);
181
+ const isOpen = this.active || this.open;
182
+ if (isOpen) {
183
+ this.activeHandler(isOpen);
184
+ this.openHandler(isOpen);
185
+ }
186
+ if (this.dismissible) {
187
+ this.handleDismissible(this.dismissible);
188
+ }
189
+ if (this.closable) {
190
+ this.handleClosable(this.closable);
191
+ }
192
+ }
193
+ disconnectedCallback() {
194
+ disconnectConditionalSlotComponent(this);
195
+ }
196
+ componentWillLoad() {
197
+ this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
198
+ }
199
+ render() {
200
+ const { el } = this;
201
+ const closeButton = (h("button", { "aria-label": this.intlClose, class: CSS.close, onClick: this.close, ref: (el) => (this.closeButton = el) }, h("calcite-icon", { icon: "x", scale: this.scale === "l" ? "m" : "s" })));
202
+ const hasActionEnd = getSlotted(el, SLOTS.actionsEnd);
203
+ return (h("div", { class: CSS.container }, this.requestedIcon ? (h("div", { class: CSS.icon }, h("calcite-icon", { icon: this.requestedIcon, scale: this.scale === "l" ? "m" : "s" }))) : null, h("div", { class: CSS.content }, h("slot", { name: SLOTS.title }), h("slot", { name: SLOTS.message }), h("slot", { name: SLOTS.link })), hasActionEnd ? (h("div", { class: CSS.actionsEnd }, h("slot", { name: SLOTS.actionsEnd }))) : null, this.closable ? closeButton : null));
204
+ }
205
+ //--------------------------------------------------------------------------
206
+ //
207
+ // Public Methods
208
+ //
209
+ //--------------------------------------------------------------------------
210
+ /** Sets focus on the component. */
211
+ async setFocus() {
212
+ const noticeLinkEl = this.el.querySelector("calcite-link");
213
+ if (!this.closeButton && !noticeLinkEl) {
214
+ return;
215
+ }
216
+ if (noticeLinkEl) {
217
+ noticeLinkEl.setFocus();
218
+ }
219
+ else if (this.closeButton) {
220
+ this.closeButton.focus();
221
+ }
222
+ }
223
+ get el() { return getElement(this); }
224
+ static get watchers() { return {
225
+ "active": ["activeHandler"],
226
+ "open": ["openHandler"],
227
+ "dismissible": ["handleDismissible"],
228
+ "closable": ["handleClosable"],
229
+ "icon": ["updateRequestedIcon"],
230
+ "color": ["updateRequestedIcon"]
231
+ }; }
232
+ };
233
+ Notice.style = noticeCss;
234
+
235
+ const mapSelectToolsCss = ":host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:\"1rem\" !important}.end-border{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}.search-distance{display:flex;padding-top:1rem}";
236
+
237
+ const MapSelectTools = class {
238
+ constructor(hostRef) {
239
+ registerInstance(this, hostRef);
240
+ this.selectionSetChange = createEvent(this, "selectionSetChange", 7);
241
+ this.sketchTypeChange = createEvent(this, "sketchTypeChange", 7);
242
+ this.workflowTypeChange = createEvent(this, "workflowTypeChange", 7);
243
+ /**
244
+ * number[]: the oids of the selected features
245
+ */
246
+ this._selectedIds = [];
247
+ /**
248
+ * string: A label to help uniquely identify the selection set
249
+ */
250
+ this._selectionLabel = "";
251
+ this.bufferColor = [227, 139, 79, 0.8];
252
+ this.bufferOutlineColor = [255, 255, 255];
253
+ this.enabledLayerIds = [];
254
+ this.defaultBufferDistance = undefined;
255
+ this.defaultBufferUnit = undefined;
256
+ this.geometries = undefined;
257
+ this.isUpdate = false;
258
+ this.mapView = undefined;
259
+ this.searchConfiguration = undefined;
260
+ this.selectionSet = undefined;
261
+ this.selectLayerView = undefined;
262
+ this.showBufferTools = true;
263
+ this._layerSelectChecked = undefined;
264
+ this._searchTerm = undefined;
265
+ this._translations = undefined;
266
+ this._workflowType = undefined;
267
+ }
268
+ //--------------------------------------------------------------------------
269
+ //
270
+ // Watch handlers
271
+ //
272
+ //--------------------------------------------------------------------------
273
+ /**
274
+ * Called each time the geometries prop is changed.
275
+ *
276
+ * @returns Promise when complete
277
+ */
278
+ async watchGeometriesHandler(newValue, oldValue) {
279
+ if (newValue !== oldValue) {
280
+ if (newValue.length > 0) {
281
+ return this._geomQuery(this.geometries);
282
+ }
283
+ else if (newValue.length === 0) {
284
+ return this._clearResults(true, true);
285
+ }
286
+ }
287
+ }
288
+ /**
289
+ * Called each time the workflowType prop is changed and emits the workflowTypeChange event.
290
+ *
291
+ * @returns Promise when complete
292
+ */
293
+ async workflowTypeHandler(newValue, oldValue) {
294
+ if (newValue !== oldValue) {
295
+ this.mapView.popup.autoOpenEnabled = ["SELECT", "SKETCH", "REFINE"].indexOf(newValue) < 0;
296
+ this.workflowTypeChange.emit(newValue);
297
+ }
298
+ }
299
+ //--------------------------------------------------------------------------
300
+ //
301
+ // Methods (public)
302
+ //
303
+ //--------------------------------------------------------------------------
304
+ /**
305
+ * Clear any selection results
306
+ *
307
+ * @returns Promise when the results have been cleared
308
+ */
309
+ async clearSelection() {
310
+ return this._clearResults();
311
+ }
312
+ /**
313
+ * Get the new selection set
314
+ *
315
+ * @returns Promise with the new selection set
316
+ */
317
+ async getSelection() {
318
+ // Allow any non whitespace
319
+ if (!/\S+/gm.test(this._selectionLabel)) {
320
+ this._selectionLabel = this._getSelectionBaseLabel();
321
+ }
322
+ const isBaseLabel = this._selectionLabel === this._getSelectionBaseLabel();
323
+ return {
324
+ id: this.isUpdate ? this.selectionSet.id : Date.now(),
325
+ workflowType: this._workflowType,
326
+ searchResult: this._searchResult,
327
+ buffer: this._bufferGeometry,
328
+ distance: this._bufferTools.distance,
329
+ download: true,
330
+ unit: this._bufferTools.unit,
331
+ label: (this._selectionLabel && !isBaseLabel) ?
332
+ this._selectionLabel : `${this._selectionLabel} ${this._bufferTools.distance} ${this._bufferTools.unit}`,
333
+ selectedIds: this._selectedIds,
334
+ layerView: this.selectLayerView,
335
+ geometries: this.geometries,
336
+ refineSelectLayers: this._refineTools.layerViews
337
+ };
338
+ }
339
+ /**
340
+ * Handle changes to the selection sets
341
+ */
342
+ labelChange(event) {
343
+ this._selectionLabel = event.detail;
344
+ }
345
+ /**
346
+ * Listen to changes in the sketch graphics
347
+ *
348
+ */
349
+ sketchGraphicsChange(event) {
350
+ this._updateSelection(EWorkflowType.SKETCH, event.detail, this._selectionLabel || this._translations.sketch);
351
+ }
352
+ /**
353
+ * Listen to changes in the refine graphics
354
+ *
355
+ */
356
+ refineSelectionGraphicsChange(event) {
357
+ const graphics = event.detail;
358
+ this._updateSelection(EWorkflowType.SELECT, graphics, this._selectionLabel || this._translations.select);
359
+ // Using OIDs to avoid issue with points
360
+ const oids = Array.isArray(graphics) ? graphics.map(g => g.attributes[g.layer.objectIdField]) : [];
361
+ return this._highlightFeatures(oids);
362
+ }
363
+ //--------------------------------------------------------------------------
364
+ //
365
+ // Functions (lifecycle)
366
+ //
367
+ //--------------------------------------------------------------------------
368
+ /**
369
+ * StencilJS: Called once just after the component is first connected to the DOM.
370
+ */
371
+ async componentWillLoad() {
372
+ await this._getTranslations();
373
+ await this._initModules();
374
+ }
375
+ /**
376
+ * StencilJS: Called once just after the component is fully loaded and the first render() occurs.
377
+ */
378
+ async componentDidLoad() {
379
+ return this._init();
380
+ }
381
+ /**
382
+ * Renders the component.
383
+ */
384
+ render() {
385
+ var _a, _b, _c;
386
+ const searchEnabled = this._workflowType === EWorkflowType.SEARCH;
387
+ const showSearchClass = searchEnabled ? " div-visible-search" : " div-not-visible";
388
+ const drawEnabled = this._workflowType === EWorkflowType.SKETCH || this._workflowType === EWorkflowType.SELECT;
389
+ const showBufferToolsClass = this.showBufferTools ? "search-distance" : "div-not-visible";
390
+ const useSelectClass = this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
391
+ const useDrawClass = !this._layerSelectChecked && !searchEnabled ? " div-visible" : " div-not-visible";
392
+ const showLayerChoiceClass = searchEnabled ? "div-not-visible" : "div-visible";
393
+ return (h(Host, null, h("div", { class: "padding-bottom-1" }, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._workflowChange(evt) }, h("calcite-radio-group-item", { checked: searchEnabled, class: "w-50 end-border", value: EWorkflowType.SEARCH }, this._translations.search), h("calcite-radio-group-item", { checked: drawEnabled, class: "w-50", value: EWorkflowType.SKETCH }, this._translations.sketch))), h("div", { class: showSearchClass }, h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } })), h("div", { class: showLayerChoiceClass }, h("calcite-label", { layout: "inline" }, h("calcite-checkbox", { checked: ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.workflowType) === EWorkflowType.SELECT, onCalciteCheckboxChange: () => this._layerSelectChanged(), ref: (el) => this._selectFromLayerElement = el }), "Use layer features")), h("div", { class: useDrawClass }, h("map-draw-tools", { active: true, border: true, mapView: this.mapView, ref: (el) => { this._drawTools = el; } })), h("div", { class: useSelectClass }, h("refine-selection-tools", { active: true, border: true, enabledLayerIds: this.enabledLayerIds, layerViews: this._refineSelectLayers, mapView: this.mapView, mode: ESelectionMode.ADD, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.SUBSET })), h("calcite-label", { class: showBufferToolsClass }, this._translations.searchDistance, h("buffer-tools", { distance: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.distance) || this.defaultBufferDistance, geometries: this.geometries, onBufferComplete: (evt) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.unit) || this.defaultBufferUnit })), h("slot", null)));
394
+ }
395
+ //--------------------------------------------------------------------------
396
+ //
397
+ // Functions (protected)
398
+ //
399
+ //--------------------------------------------------------------------------
400
+ /**
401
+ * Load esri javascript api modules
402
+ *
403
+ * @returns Promise resolving when function is done
404
+ *
405
+ * @protected
406
+ */
407
+ async _initModules() {
408
+ const [GraphicsLayer, Graphic, Search, geometryEngine, FeatureLayer] = await loadModules([
409
+ "esri/layers/GraphicsLayer",
410
+ "esri/Graphic",
411
+ "esri/widgets/Search",
412
+ "esri/geometry/geometryEngine",
413
+ "esri/layers/FeatureLayer"
414
+ ]);
415
+ this.GraphicsLayer = GraphicsLayer;
416
+ this.Graphic = Graphic;
417
+ this.Search = Search;
418
+ this._geometryEngine = geometryEngine;
419
+ this.FeatureLayer = FeatureLayer;
420
+ }
421
+ /**
422
+ * Initialize the graphics layer, selection set, and search widget
423
+ *
424
+ * @returns Promise when the operation has completed
425
+ */
426
+ async _init() {
427
+ this._initGraphicsLayer();
428
+ this._initSelectionSet();
429
+ this._initSearchWidget();
430
+ }
431
+ /**
432
+ * Initialize the state of the component with any stored values in a selection set
433
+ *
434
+ * @protected
435
+ */
436
+ _initSelectionSet() {
437
+ var _a, _b, _c, _d, _e, _f, _g;
438
+ if (this.selectionSet) {
439
+ this._searchTerm = (_b = (_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.searchResult) === null || _b === void 0 ? void 0 : _b.name;
440
+ this._workflowType = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.workflowType;
441
+ this._searchResult = (_d = this.selectionSet) === null || _d === void 0 ? void 0 : _d.searchResult;
442
+ this._refineSelectLayers = (_e = this.selectionSet) === null || _e === void 0 ? void 0 : _e.refineSelectLayers;
443
+ this.geometries = [
444
+ ...(_f = this.selectionSet) === null || _f === void 0 ? void 0 : _f.geometries
445
+ ];
446
+ // reset selection label base
447
+ this._selectionLabel = ((_g = this.selectionSet) === null || _g === void 0 ? void 0 : _g.label) || this._getSelectionBaseLabel();
448
+ void goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
449
+ }
450
+ else {
451
+ this._workflowType = EWorkflowType.SEARCH;
452
+ }
453
+ }
454
+ /**
455
+ * Get the default label base when the user has not provided a value
456
+ *
457
+ * @protected
458
+ */
459
+ _getSelectionBaseLabel() {
460
+ var _a, _b;
461
+ return this._workflowType === EWorkflowType.SKETCH ?
462
+ this._translations.sketch : this._workflowType === EWorkflowType.SELECT ?
463
+ this._translations.select : this._workflowType === EWorkflowType.SEARCH && this._searchResult ?
464
+ (_a = this._searchResult) === null || _a === void 0 ? void 0 : _a.name : (_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.label;
465
+ }
466
+ /**
467
+ * Initialize the search widget
468
+ *
469
+ * @protected
470
+ */
471
+ _initSearchWidget() {
472
+ if (this.mapView && this._searchElement) {
473
+ const searchConfiguration = this._getSearchConfig(this.searchConfiguration, this.mapView);
474
+ const searchOptions = Object.assign({ view: this.mapView, container: this._searchElement, searchTerm: this._searchTerm }, searchConfiguration);
475
+ this._searchWidget = new this.Search(searchOptions);
476
+ this._searchWidget.on("search-clear", () => {
477
+ void this._clearResults(false);
478
+ });
479
+ this._searchWidget.on("select-result", (searchResults) => {
480
+ var _a;
481
+ void this._clearResults(false);
482
+ if (searchResults.result) {
483
+ this._searchResult = searchResults.result;
484
+ this._updateSelection(EWorkflowType.SEARCH, [searchResults.result.feature], (_a = searchResults === null || searchResults === void 0 ? void 0 : searchResults.result) === null || _a === void 0 ? void 0 : _a.name);
485
+ }
486
+ });
487
+ }
488
+ }
489
+ /**
490
+ * Initialize the search widget based on user defined configuration
491
+ *
492
+ * @param searchConfiguration search configuration defined by the user
493
+ * @param view the current map view
494
+ *
495
+ * @protected
496
+ */
497
+ _getSearchConfig(searchConfiguration, view) {
498
+ var _a;
499
+ const sources = searchConfiguration === null || searchConfiguration === void 0 ? void 0 : searchConfiguration.sources;
500
+ if (sources) {
501
+ sources.forEach(source => {
502
+ var _a, _b, _c;
503
+ const isLayerSource = source.hasOwnProperty("layer");
504
+ if (isLayerSource) {
505
+ const layerSource = source;
506
+ const layerFromMap = ((_a = layerSource.layer) === null || _a === void 0 ? void 0 : _a.id)
507
+ ? view.map.findLayerById(layerSource.layer.id)
508
+ : null;
509
+ if (layerFromMap) {
510
+ layerSource.layer = layerFromMap;
511
+ }
512
+ else if ((_b = layerSource === null || layerSource === void 0 ? void 0 : layerSource.layer) === null || _b === void 0 ? void 0 : _b.url) {
513
+ layerSource.layer = new this.FeatureLayer((_c = layerSource === null || layerSource === void 0 ? void 0 : layerSource.layer) === null || _c === void 0 ? void 0 : _c.url);
514
+ }
515
+ }
516
+ });
517
+ }
518
+ (_a = searchConfiguration === null || searchConfiguration === void 0 ? void 0 : searchConfiguration.sources) === null || _a === void 0 ? void 0 : _a.forEach(source => {
519
+ const isLocatorSource = source.hasOwnProperty("locator");
520
+ if (isLocatorSource) {
521
+ const locatorSource = source;
522
+ locatorSource.url = locatorSource.url;
523
+ delete locatorSource.url;
524
+ }
525
+ });
526
+ return searchConfiguration;
527
+ }
528
+ /**
529
+ * Initialize the graphics layer used to store any buffer grapghics
530
+ *
531
+ * @protected
532
+ */
533
+ _initGraphicsLayer() {
534
+ const title = this._translations.bufferLayer;
535
+ const bufferIndex = this.mapView.map.layers.findIndex((l) => l.title === title);
536
+ if (bufferIndex > -1) {
537
+ this._bufferGraphicsLayer = this.mapView.map.layers.getItemAt(bufferIndex);
538
+ }
539
+ else {
540
+ this._bufferGraphicsLayer = new this.GraphicsLayer({ title });
541
+ state.managedLayers.push(title);
542
+ const sketchIndex = this.mapView.map.layers.findIndex((l) => l.title === this._translations.sketchLayer);
543
+ if (sketchIndex > -1) {
544
+ this.mapView.map.layers.add(this._bufferGraphicsLayer, sketchIndex);
545
+ }
546
+ else {
547
+ this.mapView.map.layers.add(this._bufferGraphicsLayer);
548
+ }
549
+ }
550
+ }
551
+ /**
552
+ * Store the layer select checked change
553
+ *
554
+ * @protected
555
+ */
556
+ _layerSelectChanged() {
557
+ this._layerSelectChecked = this._selectFromLayerElement.checked;
558
+ this.sketchTypeChange.emit(this._layerSelectChecked ? ESketchType.LAYER : ESketchType.INTERACTIVE);
559
+ }
560
+ /**
561
+ * Store workflow type change
562
+ *
563
+ * @protected
564
+ */
565
+ _workflowChange(evt) {
566
+ this._workflowType = evt.detail;
567
+ }
568
+ /**
569
+ * Highlight the features in the map
570
+ *
571
+ * @protected
572
+ */
573
+ async _highlightFeatures(ids) {
574
+ var _a;
575
+ (_a = state.highlightHandle) === null || _a === void 0 ? void 0 : _a.remove();
576
+ if (ids.length > 0) {
577
+ state.highlightHandle = await highlightFeatures(ids, this.selectLayerView, this.mapView);
578
+ }
579
+ this.selectionSetChange.emit(ids.length);
580
+ }
581
+ /**
582
+ * Query the selectLayerView based on any user drawn geometries or buffers
583
+ *
584
+ * @param geometries Array of geometries used for the selection of ids from the select layer view
585
+ *
586
+ * @returns Promise when the selection is complete and the graphics have been highlighted
587
+ */
588
+ async _selectFeatures(geometries) {
589
+ this._selectedIds = await queryObjectIds(geometries, this.selectLayerView.layer);
590
+ // Add geometries used for selecting features as graphics
591
+ this._drawTools.graphics = this.geometries.map(geom => {
592
+ var _a, _b, _c;
593
+ const props = {
594
+ "geometry": geom,
595
+ "symbol": geom.type === "point" ?
596
+ (_a = this._drawTools) === null || _a === void 0 ? void 0 : _a.pointSymbol : geom.type === "polyline" ?
597
+ (_b = this._drawTools) === null || _b === void 0 ? void 0 : _b.polylineSymbol : geom.type === "polygon" ?
598
+ (_c = this._drawTools) === null || _c === void 0 ? void 0 : _c.polygonSymbol : undefined
599
+ };
600
+ return new this.Graphic(props);
601
+ });
602
+ void this._highlightFeatures(this._selectedIds);
603
+ }
604
+ /**
605
+ * Query the selectLayerView based on any user drawn geometries or buffers
606
+ *
607
+ * @param evt CustomEvent that contains the result of the buffer
608
+ *
609
+ * @protected
610
+ */
611
+ async _bufferComplete(evt) {
612
+ this._bufferGeometry = Array.isArray(evt.detail) ?
613
+ evt.detail[0] : evt.detail;
614
+ if (this._bufferGeometry) {
615
+ // Create a symbol for rendering the graphic
616
+ const symbol = {
617
+ type: "simple-fill",
618
+ color: this.bufferColor,
619
+ outline: {
620
+ color: this.bufferOutlineColor,
621
+ width: 1
622
+ }
623
+ };
624
+ // Add the geometry and symbol to a new graphic
625
+ const polygonGraphic = new this.Graphic({
626
+ geometry: this._bufferGeometry,
627
+ symbol
628
+ });
629
+ this._bufferGraphicsLayer.removeAll();
630
+ this._bufferGraphicsLayer.add(polygonGraphic);
631
+ void this._selectFeatures([this._bufferGeometry]);
632
+ void this.mapView.goTo(polygonGraphic.geometry.extent);
633
+ }
634
+ else {
635
+ if (this._bufferGraphicsLayer) {
636
+ this._bufferGraphicsLayer.removeAll();
637
+ }
638
+ void this._geomQuery(this.geometries);
639
+ }
640
+ }
641
+ /**
642
+ * Fetch a single geometry for each potential geometry type
643
+ *
644
+ * @param geometries All current selection geometries
645
+ *
646
+ * @protected
647
+ */
648
+ _geomQuery(geometries) {
649
+ const queryGeoms = getQueryGeoms(geometries, this._geometryEngine);
650
+ return this._selectFeatures(queryGeoms);
651
+ }
652
+ /**
653
+ * Clear all stored values and general state for the component
654
+ *
655
+ * @param clearSearchWidget Optional boolean for clearing the search widget (default is true)
656
+ * @param clearLabel Optional boolean for clearing the search label (default is true)
657
+ *
658
+ * @protected
659
+ */
660
+ async _clearResults(clearSearchWidget = true, clearLabel = true) {
661
+ var _a, _b;
662
+ this._selectedIds = [];
663
+ if (clearLabel) {
664
+ this._selectionLabel = "";
665
+ }
666
+ if (this._bufferGraphicsLayer) {
667
+ this._bufferGraphicsLayer.removeAll();
668
+ }
669
+ if (clearSearchWidget && this._searchWidget) {
670
+ this._searchWidget.clear();
671
+ }
672
+ (_a = state.highlightHandle) === null || _a === void 0 ? void 0 : _a.remove();
673
+ // for sketch
674
+ // checking for clear as it would throw off tests
675
+ if ((_b = this._drawTools) === null || _b === void 0 ? void 0 : _b.clear) {
676
+ void this._drawTools.clear();
677
+ }
678
+ this.selectionSetChange.emit(this._selectedIds.length);
679
+ }
680
+ /**
681
+ * Fetch a single geometry for the current geometry type
682
+ *
683
+ * @param type worflow type
684
+ * @param graphics graphics to be used for selection
685
+ * @param label selection label
686
+ *
687
+ * @protected
688
+ */
689
+ _updateSelection(type, graphics, label) {
690
+ this.geometries = Array.isArray(graphics) ? graphics.map(g => g.geometry) : this.geometries;
691
+ this._workflowType = type;
692
+ this._selectionLabel = label;
693
+ }
694
+ /**
695
+ * Fetches the component's translations
696
+ *
697
+ * @protected
698
+ */
699
+ async _getTranslations() {
700
+ const translations = await getLocaleComponentStrings(this.el);
701
+ this._translations = translations[0];
702
+ }
703
+ get el() { return getElement(this); }
704
+ static get watchers() { return {
705
+ "geometries": ["watchGeometriesHandler"],
706
+ "_workflowType": ["workflowTypeHandler"]
707
+ }; }
708
+ };
709
+ MapSelectTools.style = mapSelectToolsCss;
710
+
711
+ const labelFormats = [
712
+ {
713
+ descriptionPDF: {
714
+ labelWidthDisplay: "2-5/8",
715
+ labelHeightDisplay: "1",
716
+ labelsPerPageDisplay: "30",
717
+ averyPartNumber: "*60"
718
+ },
719
+ labelSpec: {
720
+ type: "AVERY",
721
+ pageDimensions: {
722
+ width: 8.5,
723
+ height: 11,
724
+ leftMargin: 0.1875,
725
+ rightMargin: 0.1875,
726
+ topMargin: 0.5,
727
+ bottomMargin: 0.5
728
+ },
729
+ numLabelsAcross: 3,
730
+ numLabelsDown: 10,
731
+ labelWidth: 2.625,
732
+ labelHeight: 1,
733
+ horizGapIn: 0.125,
734
+ vertGapIn: 0,
735
+ labelPadding: 0.1,
736
+ fontSizePx: 11,
737
+ maxNumLabelLines: 4
738
+ }
739
+ },
740
+ {
741
+ descriptionPDF: {
742
+ labelWidthDisplay: "4",
743
+ labelHeightDisplay: "1",
744
+ labelsPerPageDisplay: "20",
745
+ averyPartNumber: "*61"
746
+ },
747
+ labelSpec: {
748
+ type: "AVERY",
749
+ pageDimensions: {
750
+ width: 8.5,
751
+ height: 11,
752
+ leftMargin: 0.15625,
753
+ rightMargin: 0.15625,
754
+ topMargin: 0.47637821,
755
+ bottomMargin: 0.5
756
+ },
757
+ numLabelsAcross: 2,
758
+ numLabelsDown: 10,
759
+ labelWidth: 4,
760
+ labelHeight: 1.0025,
761
+ horizGapIn: 0.1875,
762
+ vertGapIn: 0,
763
+ labelPadding: 0.1,
764
+ fontSizePx: 11,
765
+ maxNumLabelLines: 4
766
+ }
767
+ },
768
+ {
769
+ descriptionPDF: {
770
+ labelWidthDisplay: "4",
771
+ labelHeightDisplay: "1-1/3",
772
+ labelsPerPageDisplay: "14",
773
+ averyPartNumber: "*62"
774
+ },
775
+ labelSpec: {
776
+ type: "AVERY",
777
+ pageDimensions: {
778
+ width: 8.5,
779
+ height: 11,
780
+ leftMargin: 0.15625,
781
+ rightMargin: 0.15625,
782
+ topMargin: 0.81889808,
783
+ bottomMargin: 0.83464612
784
+ },
785
+ numLabelsAcross: 2,
786
+ numLabelsDown: 7,
787
+ labelWidth: 4,
788
+ labelHeight: 1.3352,
789
+ horizGapIn: 0.1875,
790
+ vertGapIn: 0,
791
+ labelPadding: 0.1,
792
+ fontSizePx: 11,
793
+ maxNumLabelLines: 6
794
+ }
795
+ },
796
+ {
797
+ descriptionPDF: {
798
+ labelWidthDisplay: "4",
799
+ labelHeightDisplay: "2",
800
+ labelsPerPageDisplay: "10",
801
+ averyPartNumber: "*63"
802
+ },
803
+ labelSpec: {
804
+ type: "AVERY",
805
+ pageDimensions: {
806
+ width: 8.5,
807
+ height: 11,
808
+ leftMargin: 0.15625,
809
+ rightMargin: 0.15625,
810
+ topMargin: 0.5,
811
+ bottomMargin: 0.5
812
+ },
813
+ numLabelsAcross: 2,
814
+ numLabelsDown: 5,
815
+ labelWidth: 4,
816
+ labelHeight: 2,
817
+ horizGapIn: 0.1875,
818
+ vertGapIn: 0,
819
+ labelPadding: 0.1,
820
+ fontSizePx: 12,
821
+ maxNumLabelLines: 10
822
+ }
823
+ },
824
+ {
825
+ descriptionPDF: {
826
+ labelWidthDisplay: "4",
827
+ labelHeightDisplay: "3-1/3",
828
+ labelsPerPageDisplay: "6",
829
+ averyPartNumber: "*64"
830
+ },
831
+ labelSpec: {
832
+ type: "AVERY",
833
+ pageDimensions: {
834
+ width: 8.5,
835
+ height: 11,
836
+ leftMargin: 0.15625,
837
+ rightMargin: 0.15625,
838
+ topMargin: 0.4724412,
839
+ bottomMargin: 0.50000027
840
+ },
841
+ numLabelsAcross: 2,
842
+ numLabelsDown: 3,
843
+ labelWidth: 4,
844
+ labelHeight: 3.342,
845
+ horizGapIn: 0.1875,
846
+ vertGapIn: 0,
847
+ labelPadding: 0.1,
848
+ fontSizePx: 14,
849
+ maxNumLabelLines: 12
850
+ }
851
+ },
852
+ {
853
+ descriptionPDF: {
854
+ labelWidthDisplay: "1-3/4",
855
+ labelHeightDisplay: "1/2",
856
+ labelsPerPageDisplay: "80",
857
+ averyPartNumber: "*67"
858
+ },
859
+ labelSpec: {
860
+ type: "AVERY",
861
+ pageDimensions: {
862
+ width: 8.5,
863
+ height: 11,
864
+ leftMargin: 0.307086375,
865
+ rightMargin: 0.307086375,
866
+ topMargin: 0.4724412,
867
+ bottomMargin: 0.49606326
868
+ },
869
+ numLabelsAcross: 4,
870
+ numLabelsDown: 20,
871
+ labelWidth: 1.75,
872
+ labelHeight: 0.50155,
873
+ horizGapIn: 0.29527575,
874
+ vertGapIn: 0,
875
+ labelPadding: 0.1,
876
+ fontSizePx: 8,
877
+ maxNumLabelLines: 3
878
+ }
879
+ },
880
+ {
881
+ descriptionPDF: {
882
+ labelWidthDisplay: "1-3/4",
883
+ labelHeightDisplay: "2/3",
884
+ labelsPerPageDisplay: "60",
885
+ averyPartNumber: "*95"
886
+ },
887
+ labelSpec: {
888
+ type: "AVERY",
889
+ pageDimensions: {
890
+ width: 8.5,
891
+ height: 11,
892
+ leftMargin: 0.28936983,
893
+ rightMargin: 0.28936983,
894
+ topMargin: 0.53937037,
895
+ bottomMargin: 0.5511814
896
+ },
897
+ numLabelsAcross: 4,
898
+ numLabelsDown: 15,
899
+ labelWidth: 1.75,
900
+ labelHeight: 0.6605,
901
+ horizGapIn: 0.30708678,
902
+ vertGapIn: 0,
903
+ labelPadding: 0.1,
904
+ fontSizePx: 8,
905
+ maxNumLabelLines: 4
906
+ }
907
+ }
908
+ ];
909
+
910
+ const pdfUtils = /*#__PURE__*/Object.freeze({
911
+ __proto__: null,
912
+ 'default': labelFormats
913
+ });
914
+
915
+ const pdfDownloadCss = ":host{display:block}";
916
+
917
+ const PdfDownload = class {
918
+ constructor(hostRef) {
919
+ registerInstance(this, hostRef);
920
+ this.disabled = true;
921
+ this.enabledSizeValues = [];
922
+ this.layerView = undefined;
923
+ this._translations = undefined;
924
+ }
925
+ //--------------------------------------------------------------------------
926
+ //
927
+ // Watch handlers
928
+ //
929
+ //--------------------------------------------------------------------------
930
+ //--------------------------------------------------------------------------
931
+ //
932
+ // Methods (public)
933
+ //
934
+ //--------------------------------------------------------------------------
935
+ /**
936
+ * Downloads pdf of mailing labels for the provided list of ids
937
+ *
938
+ * @param ids List of ids to download
939
+ * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
940
+ * @returns Promise resolving when function is done
941
+ */
942
+ async downloadPDF(ids, removeDuplicates) {
943
+ return this._downloadPDF(ids, removeDuplicates);
944
+ }
945
+ /**
946
+ * Downloads csv of mailing labels for the provided list of ids
947
+ *
948
+ * @param ids List of ids to download
949
+ * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
950
+ * @returns Promise resolving when function is done
951
+ */
952
+ async downloadCSV(ids, removeDuplicates, addColumnTitle) {
953
+ return this._downloadCSV(ids, removeDuplicates, addColumnTitle);
954
+ }
955
+ //--------------------------------------------------------------------------
956
+ //
957
+ // Events (public)
958
+ //
959
+ //--------------------------------------------------------------------------
960
+ //--------------------------------------------------------------------------
961
+ //
962
+ // Functions (lifecycle)
963
+ //
964
+ //--------------------------------------------------------------------------
965
+ /**
966
+ * StencilJS: Called once just after the component is first connected to the DOM.
967
+ */
968
+ async componentWillLoad() {
969
+ await this._getTranslations();
970
+ }
971
+ /**
972
+ * Renders the component.
973
+ */
974
+ render() {
975
+ return (h(Host, null, h("calcite-select", { disabled: this.disabled, label: "", ref: (el) => { this._labelInfoElement = el; } }, this._renderItems())));
976
+ }
977
+ //--------------------------------------------------------------------------
978
+ //
979
+ // Functions (protected)
980
+ //
981
+ //--------------------------------------------------------------------------
982
+ /**
983
+ * Renders the pdf export size options
984
+ *
985
+ * @returns Node array of size options
986
+ *
987
+ * @protected
988
+ */
989
+ _renderItems() {
990
+ const s = pdfUtils;
991
+ const sortedPdfIndo = (s.default || s).sort((a, b) => {
992
+ const _a = parseInt(a.descriptionPDF.labelsPerPageDisplay, 10);
993
+ const _b = parseInt(b.descriptionPDF.labelsPerPageDisplay, 10);
994
+ return _a < _b ? -1 : _a > _b ? 1 : 0;
995
+ });
996
+ return sortedPdfIndo.reduce((prev, cur) => {
997
+ if (this.enabledSizeValues.length === 0 ||
998
+ this.enabledSizeValues.indexOf(parseInt(cur.descriptionPDF.labelsPerPageDisplay, 10)) > -1) {
999
+ prev.push((h("calcite-option", { value: cur }, this._getLabelSizeText(cur))));
1000
+ }
1001
+ return prev;
1002
+ }, []);
1003
+ }
1004
+ /**
1005
+ * Downloads pdf of mailing labels for the provided list of ids
1006
+ *
1007
+ * @param ids List of ids to download
1008
+ * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
1009
+ *
1010
+ * @returns Promise resolving when function is done
1011
+ * @protected
1012
+ */
1013
+ async _downloadPDF(ids, removeDuplicates) {
1014
+ const l = this._labelInfoElement.selectedOption.value;
1015
+ alert(`PDF download: (${this._getLabelSizeText(l)}) (remove dups: ${removeDuplicates}) ${ids.join(", ")}`);
1016
+ }
1017
+ /**
1018
+ * Downloads csv of mailing labels for the provided list of ids
1019
+ *
1020
+ * @param ids List of ids to download
1021
+ * @param removeDuplicates When true a single label is generated when multiple featues have a shared address value
1022
+ * @returns Promise resolving when function is done
1023
+ *
1024
+ * @returns Promise that will resolve when the download is complete
1025
+ * @protected
1026
+ */
1027
+ async _downloadCSV(ids, removeDuplicates, addColumnTitle) {
1028
+ // TODO this will be leveraged when we do the real implementation of this
1029
+ console.log(removeDuplicates);
1030
+ await exportCSV(this.layerView, ids, addColumnTitle);
1031
+ }
1032
+ /**
1033
+ * Gets the formatted pdf export size text
1034
+ *
1035
+ * @param labelInfo current user selected label info
1036
+ *
1037
+ * @returns the pdf label as a string
1038
+ * @protected
1039
+ */
1040
+ _getLabelSizeText(labelInfo) {
1041
+ const lNum = labelInfo.descriptionPDF.labelsPerPageDisplay;
1042
+ const lSize = `${labelInfo.descriptionPDF.labelWidthDisplay} x ${labelInfo.descriptionPDF.labelHeightDisplay}`;
1043
+ return this._translations.pdfLabel.replace("{{n}}", lNum).replace("{{labelSize}}", lSize);
1044
+ }
1045
+ /**
1046
+ * Fetches the component's translations
1047
+ *
1048
+ * @protected
1049
+ */
1050
+ async _getTranslations() {
1051
+ const translations = await getLocaleComponentStrings(this.el);
1052
+ this._translations = translations[0];
1053
+ }
1054
+ get el() { return getElement(this); }
1055
+ };
1056
+ PdfDownload.style = pdfDownloadCss;
1057
+
1058
+ const refineSelectionCss = ":host{display:block}";
1059
+
1060
+ const RefineSelection = class {
1061
+ constructor(hostRef) {
1062
+ registerInstance(this, hostRef);
1063
+ this.selectionSetsChanged = createEvent(this, "selectionSetsChanged", 7);
1064
+ //--------------------------------------------------------------------------
1065
+ //
1066
+ // Properties (protected)
1067
+ //
1068
+ //--------------------------------------------------------------------------
1069
+ /**
1070
+ * boolean: Indicates if any new graphics should be added or removed
1071
+ */
1072
+ this._addEnabled = true;
1073
+ this.addresseeLayer = undefined;
1074
+ this.enabledLayerIds = [];
1075
+ this.mapView = undefined;
1076
+ this.selectionSets = [];
1077
+ this.GraphicsLayer = undefined;
1078
+ this.SketchViewModel = undefined;
1079
+ this._translations = undefined;
1080
+ }
1081
+ /**
1082
+ * Handles changes to refine selection ids.
1083
+ *
1084
+ */
1085
+ refineSelectionIdsChange(event) {
1086
+ var _a, _b;
1087
+ const addIds = ((_a = event.detail) === null || _a === void 0 ? void 0 : _a.addIds) || [];
1088
+ const removeIds = ((_b = event.detail) === null || _b === void 0 ? void 0 : _b.removeIds) || [];
1089
+ this._updateSelectionSets(removeIds);
1090
+ this._updateRefineSelectionSet(addIds, removeIds);
1091
+ }
1092
+ //--------------------------------------------------------------------------
1093
+ //
1094
+ // Functions (lifecycle)
1095
+ //
1096
+ //--------------------------------------------------------------------------
1097
+ /**
1098
+ * StencilJS: Called once just after the component is first connected to the DOM.
1099
+ */
1100
+ async componentWillLoad() {
1101
+ await this._getTranslations();
1102
+ }
1103
+ /**
1104
+ * Renders the component.
1105
+ */
1106
+ render() {
1107
+ return (h(Host, null, h("div", { class: "padding-1" }, h("div", null, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, refineMode: ERefineMode.ALL, useLayerPicker: false })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
1108
+ }
1109
+ //--------------------------------------------------------------------------
1110
+ //
1111
+ // Functions (protected)
1112
+ //
1113
+ //--------------------------------------------------------------------------
1114
+ /**
1115
+ * Store the Add/Remove mode
1116
+ *
1117
+ * @protected
1118
+ */
1119
+ _modeChanged(evt) {
1120
+ this._addEnabled = evt.detail === ESelectionMode.ADD;
1121
+ }
1122
+ /**
1123
+ * Set the refine tools selection mode
1124
+ *
1125
+ * @protected
1126
+ */
1127
+ _setSelectionMode(mode) {
1128
+ this._refineTools.mode = mode;
1129
+ }
1130
+ /**
1131
+ * Create a list to show the number added/removed/total unique selected
1132
+ *
1133
+ * @returns the list node
1134
+ * @protected
1135
+ */
1136
+ _getRefineSelectionSetList() {
1137
+ console.log("_getRefineSelectionSetList");
1138
+ const total = getTotal(this.selectionSets);
1139
+ const refineSet = this._getRefineSelectionSet(this.selectionSets);
1140
+ const numAdded = (refineSet === null || refineSet === void 0 ? void 0 : refineSet.refineIds.addIds.length) || 0;
1141
+ const numRemoved = (refineSet === null || refineSet === void 0 ? void 0 : refineSet.refineIds.removeIds.length) || 0;
1142
+ return [(h("calcite-list-item", { label: this._translations.featuresAdded.replace("{{n}}", numAdded.toString()) })), (h("calcite-list-item", { label: this._translations.featuresRemoved.replace("{{n}}", numRemoved.toString()) })), (h("calcite-list-item", { label: this._translations.totalSelected.replace("{{n}}", total.toString()) }))];
1143
+ }
1144
+ /**
1145
+ * Fetch the refine selection set
1146
+ *
1147
+ * @returns the refine selection set
1148
+ * @protected
1149
+ */
1150
+ _getRefineSelectionSet(selectionSets) {
1151
+ let refineSelectionSet;
1152
+ selectionSets.some(ss => {
1153
+ if (ss.workflowType === EWorkflowType.REFINE) {
1154
+ refineSelectionSet = ss;
1155
+ return true;
1156
+ }
1157
+ });
1158
+ return refineSelectionSet;
1159
+ }
1160
+ /**
1161
+ * Remove ids from existing selection sets.
1162
+ * Remove any selection sets than have no selected ids
1163
+ * This can update any selection set not just the refine set.
1164
+ * We do not do something similar for adds as we will only ever add from refine tools to the single REFINE selection set.
1165
+ *
1166
+ * @param removeIds the ids to remove
1167
+ *
1168
+ * @protected
1169
+ */
1170
+ _updateSelectionSets(removeIds) {
1171
+ if (removeIds.length > 0) {
1172
+ this.selectionSets = this.selectionSets.reduce((prev, cur) => {
1173
+ cur.selectedIds = cur.selectedIds.filter(id => removeIds.indexOf(id) < 0);
1174
+ if (cur.selectedIds.length > 0) {
1175
+ prev.push(cur);
1176
+ }
1177
+ return prev;
1178
+ }, []);
1179
+ this.selectionSetsChanged.emit(this.selectionSets);
1180
+ }
1181
+ }
1182
+ /**
1183
+ * Update the refine selection set with any adds or removes
1184
+ *
1185
+ * @param addIds any ids to add
1186
+ * @param removeIds any ids to remove
1187
+ *
1188
+ * @returns Promise resolving when function is done
1189
+ * @protected
1190
+ */
1191
+ _updateRefineSelectionSet(addIds, removeIds) {
1192
+ const selectionSet = this._getRefineSelectionSet(this.selectionSets);
1193
+ this.selectionSets = selectionSet ?
1194
+ this._updateRefineIds(selectionSet, addIds, removeIds) :
1195
+ this._addRefineSelectionSet(addIds, removeIds);
1196
+ this.selectionSetsChanged.emit(this.selectionSets);
1197
+ }
1198
+ /**
1199
+ * Update the ids stored for the refine selection set
1200
+ *
1201
+ * @param selectionSet the refine selection set
1202
+ * @param addIds any ids to add
1203
+ * @param removeIds any ids to remove
1204
+ *
1205
+ * @returns updated selection sets
1206
+ * @protected
1207
+ */
1208
+ _updateRefineIds(selectionSet, addIds, removeIds) {
1209
+ console.log("_updateRefineIds");
1210
+ // remove ids if they exist in the current add or remove list
1211
+ selectionSet.refineIds.addIds = selectionSet.refineIds.addIds.filter(id => removeIds.indexOf(id) < 0);
1212
+ selectionSet.refineIds.removeIds = selectionSet.refineIds.removeIds.filter(id => addIds.indexOf(id) < 0);
1213
+ const _addIds = [...new Set(selectionSet.refineIds.addIds.concat(addIds))];
1214
+ const _removeIds = [...new Set(selectionSet.refineIds.removeIds.concat(removeIds))];
1215
+ selectionSet.refineIds = {
1216
+ addIds: _addIds.filter(id => _removeIds.indexOf(id) < 0),
1217
+ removeIds: _removeIds.filter(id => _addIds.indexOf(id) < 0)
1218
+ };
1219
+ selectionSet.selectedIds = selectionSet.refineIds.addIds.length > 0 ?
1220
+ [...new Set(selectionSet.selectedIds.concat(selectionSet.refineIds.addIds))] :
1221
+ selectionSet.selectedIds.filter(id => selectionSet.refineIds.removeIds.indexOf(id) < 0);
1222
+ return this.selectionSets.map(ss => {
1223
+ return ss.workflowType === EWorkflowType.REFINE ? selectionSet : ss;
1224
+ });
1225
+ }
1226
+ /**
1227
+ * Add a new refine selection set
1228
+ *
1229
+ * @param addIds any ids to add
1230
+ * @param removeIds any ids to remove
1231
+ *
1232
+ * @returns updated selection sets
1233
+ * @protected
1234
+ */
1235
+ _addRefineSelectionSet(addIds, removeIds) {
1236
+ return [
1237
+ ...this.selectionSets,
1238
+ ({
1239
+ buffer: undefined,
1240
+ distance: 0,
1241
+ download: true,
1242
+ geometries: [],
1243
+ id: Date.now(),
1244
+ label: "Refine",
1245
+ layerView: this.addresseeLayer,
1246
+ refineSelectLayers: [],
1247
+ searchResult: undefined,
1248
+ selectedIds: addIds,
1249
+ unit: "feet",
1250
+ workflowType: EWorkflowType.REFINE,
1251
+ refineIds: {
1252
+ addIds: addIds,
1253
+ removeIds: removeIds
1254
+ }
1255
+ })
1256
+ ];
1257
+ }
1258
+ /**
1259
+ * Fetches the component's translations
1260
+ *
1261
+ * @protected
1262
+ */
1263
+ async _getTranslations() {
1264
+ const translations = await getLocaleComponentStrings(this.el);
1265
+ this._translations = translations[0];
1266
+ }
1267
+ /** Provides access to protected methods for unit testing.
1268
+ *
1269
+ * @param methodName Name of protected method to run
1270
+ * @param arg1 First argument to forward to method, e.g., for "_modeChanged", `ESelectionMode`
1271
+ * @returns
1272
+ */
1273
+ _testAccess(methodName, arg1) {
1274
+ switch (methodName) {
1275
+ case "_modeChanged":
1276
+ return this._modeChanged(arg1);
1277
+ case "_setSelectionMode":
1278
+ return this._setSelectionMode(arg1);
1279
+ // case "_getRefineSelectionSetList":
1280
+ // return this._getRefineSelectionSetList();
1281
+ // case "_getRefineSelectionSet":
1282
+ // return this._getRefineSelectionSet(arg1);
1283
+ // case "_updateSelectionSets":
1284
+ // return this._updateSelectionSets(arg1);
1285
+ // case "_updateRefineSelectionSet":
1286
+ // return this._updateRefineSelectionSet(arg1, arg2);
1287
+ // case "_updateRefineIds":
1288
+ // return this._updateRefineIds(arg1, arg2, arg3);
1289
+ // case "_addRefineSelectionSet":
1290
+ // return this._addRefineSelectionSet(arg1, arg2);
1291
+ }
1292
+ return null;
1293
+ }
1294
+ get el() { return getElement(this); }
1295
+ };
1296
+ RefineSelection.style = refineSelectionCss;
1297
+
1298
+ export { InputMessage as calcite_input_message, Notice as calcite_notice, MapSelectTools as map_select_tools, PdfDownload as pdf_download, RefineSelection as refine_selection };