@esri/solutions-components 0.3.5 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (282) hide show
  1. package/dist/cjs/buffer-tools_6.cjs.entry.js +26 -8
  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/loader.cjs.js +1 -1
  9. package/dist/cjs/map-card.cjs.entry.js +1 -1
  10. package/dist/cjs/{mapViewUtils-55ac76cb.js → mapViewUtils-24d1d859.js} +1 -1
  11. package/dist/cjs/public-notification.cjs.entry.js +41 -7
  12. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  13. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  14. package/dist/cjs/{solution-store-39726b81.js → solution-store-2dbab624.js} +1 -1
  15. package/dist/cjs/solutions-components.cjs.js +1 -1
  16. package/dist/collection/components/buffer-tools/buffer-tools.js +48 -0
  17. package/dist/collection/components/map-draw-tools/map-draw-tools.js +10 -4
  18. package/dist/collection/components/public-notification/public-notification.css +12 -12
  19. package/dist/collection/components/public-notification/public-notification.js +50 -4
  20. package/dist/collection/components/refine-selection/refine-selection.js +4 -2
  21. package/dist/collection/components/refine-selection-tools/refine-selection-tools.css +1 -0
  22. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +3 -1
  23. package/dist/collection/demos/new-public-notification.html +7 -6
  24. package/dist/collection/utils/interfaces.js +1 -1
  25. package/dist/collection/utils/interfaces.ts +7 -2
  26. package/dist/components/buffer-tools2.js +10 -0
  27. package/dist/components/interfaces3.js +1 -1
  28. package/dist/components/map-draw-tools2.js +10 -4
  29. package/dist/components/public-notification.js +40 -6
  30. package/dist/components/refine-selection-tools2.js +4 -2
  31. package/dist/components/refine-selection2.js +4 -2
  32. package/dist/esm/buffer-tools_6.entry.js +26 -8
  33. package/dist/esm/calcite-combobox_3.entry.js +2 -2
  34. package/dist/esm/calcite-input-message_5.entry.js +6 -4
  35. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  36. package/dist/esm/{csvUtils-eb231cfb.js → csvUtils-ae3004b9.js} +1 -1
  37. package/dist/esm/{interfaces-3b23a5f9.js → interfaces-d0d83efa.js} +1 -1
  38. package/dist/esm/layer-table.entry.js +3 -3
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/map-card.entry.js +1 -1
  41. package/dist/esm/{mapViewUtils-e5d8a1e1.js → mapViewUtils-541e7a3c.js} +1 -1
  42. package/dist/esm/public-notification.entry.js +41 -7
  43. package/dist/esm/solution-configuration.entry.js +2 -2
  44. package/dist/esm/solution-contents_3.entry.js +2 -2
  45. package/dist/esm/{solution-store-c0bf9200.js → solution-store-41e15f1c.js} +1 -1
  46. package/dist/esm/solutions-components.js +1 -1
  47. package/dist/solutions-components/demos/new-public-notification.html +7 -6
  48. package/dist/solutions-components/p-05e64bd1.js +498 -2
  49. package/dist/solutions-components/p-08a95b33.entry.js +138 -0
  50. package/dist/solutions-components/p-0da5bbdf.entry.js +91 -0
  51. package/dist/solutions-components/p-0ef91144.entry.js +913 -0
  52. package/dist/solutions-components/p-0f523243.entry.js +1916 -0
  53. package/dist/solutions-components/p-11b9510e.entry.js +173 -0
  54. package/dist/solutions-components/p-1b875d94.entry.js +58 -0
  55. package/dist/solutions-components/p-1c567f3a.js +23 -16
  56. package/dist/solutions-components/p-1c883db9.entry.js +43 -0
  57. package/dist/solutions-components/p-1f225056.js +322 -0
  58. package/dist/solutions-components/p-1f499e67.entry.js +72 -0
  59. package/dist/solutions-components/p-20d3d758.entry.js +881 -0
  60. package/dist/solutions-components/p-2274ac9e.entry.js +160 -0
  61. package/dist/solutions-components/p-23ec5ac5.entry.js +93 -0
  62. package/dist/solutions-components/p-2447798c.entry.js +155 -0
  63. package/dist/solutions-components/p-2525e691.entry.js +432 -0
  64. package/dist/solutions-components/p-2561f5b5.js +4092 -0
  65. package/dist/solutions-components/p-29f887c0.entry.js +234 -0
  66. package/dist/solutions-components/p-2a0d8047.entry.js +345 -0
  67. package/dist/solutions-components/p-2c177e6a.entry.js +101 -0
  68. package/dist/solutions-components/p-2e9ed892.js +46 -1
  69. package/dist/solutions-components/p-316f56db.js +219 -2
  70. package/dist/solutions-components/p-327f3ebf.entry.js +98 -0
  71. package/dist/solutions-components/p-356f8b54.entry.js +138 -0
  72. package/dist/solutions-components/p-359c58de.entry.js +172 -0
  73. package/dist/solutions-components/p-37336c0d.entry.js +116 -0
  74. package/dist/solutions-components/p-374a5031.js +105 -2
  75. package/dist/solutions-components/p-39ea6ef4.entry.js +71 -0
  76. package/dist/solutions-components/p-3b010ce1.js +17 -1
  77. package/dist/solutions-components/p-4307dacd.js +194 -1
  78. package/dist/solutions-components/p-44da2507.js +405 -14
  79. package/dist/solutions-components/p-46bdffe8.entry.js +54 -0
  80. package/dist/solutions-components/p-4894bbeb.js +53 -2
  81. package/dist/solutions-components/p-4cd569f1.entry.js +1298 -0
  82. package/dist/solutions-components/p-4d4160f9.entry.js +121 -0
  83. package/dist/solutions-components/p-4e32bf8c.js +482 -1
  84. package/dist/solutions-components/p-4e9cbd32.entry.js +184 -0
  85. package/dist/solutions-components/p-508317b3.js +13 -2
  86. package/dist/solutions-components/p-54697d58.entry.js +198 -0
  87. package/dist/solutions-components/p-55c79103.entry.js +311 -0
  88. package/dist/solutions-components/p-57fd19c0.entry.js +706 -0
  89. package/dist/solutions-components/p-59b48fde.entry.js +443 -0
  90. package/dist/solutions-components/p-60e0e6a0.entry.js +214 -0
  91. package/dist/solutions-components/p-621d0534.entry.js +123 -0
  92. package/dist/solutions-components/p-63f6e8f1.js +14 -1
  93. package/dist/solutions-components/p-66aeec57.entry.js +61 -0
  94. package/dist/solutions-components/p-69834f46.entry.js +618 -0
  95. package/dist/solutions-components/p-6d9da8e5.entry.js +21530 -0
  96. package/dist/solutions-components/p-6e0da576.js +13 -1
  97. package/dist/solutions-components/p-6ec3f294.entry.js +106 -0
  98. package/dist/solutions-components/p-6fe17794.js +9 -1
  99. package/dist/solutions-components/p-7024cb16.entry.js +72 -0
  100. package/dist/solutions-components/p-70535506.entry.js +226 -0
  101. package/dist/solutions-components/p-708a63a8.js +12 -1
  102. package/dist/solutions-components/p-729708a3.js +14 -1
  103. package/dist/solutions-components/p-73e23995.js +6 -1
  104. package/dist/solutions-components/p-74b29d75.entry.js +231 -0
  105. package/dist/solutions-components/p-74b7ee25.entry.js +711 -0
  106. package/dist/solutions-components/p-77182c3a.js +3015 -1
  107. package/dist/solutions-components/p-78b3ef80.entry.js +456 -0
  108. package/dist/solutions-components/p-79709c19.js +60 -3
  109. package/dist/solutions-components/p-7a46ef97.js +181 -2
  110. package/dist/solutions-components/p-7be159e6.entry.js +175 -0
  111. package/dist/solutions-components/p-7d4451c2.entry.js +71 -0
  112. package/dist/solutions-components/p-7daea1df.js +41 -1
  113. package/dist/solutions-components/p-7e39e5ad.entry.js +102 -0
  114. package/dist/solutions-components/p-7fb45059.entry.js +43 -0
  115. package/dist/solutions-components/p-815533de.js +306 -3
  116. package/dist/solutions-components/p-816622ca.entry.js +248 -0
  117. package/dist/solutions-components/p-83166522.js +205 -2
  118. package/dist/solutions-components/p-83bd1991.entry.js +36 -0
  119. package/dist/solutions-components/p-856464d7.entry.js +572 -0
  120. package/dist/solutions-components/p-8c349bad.entry.js +347 -0
  121. package/dist/solutions-components/p-8dccb390.entry.js +1986 -0
  122. package/dist/solutions-components/p-904c185a.entry.js +228 -0
  123. package/dist/solutions-components/p-9092f8b3.entry.js +156 -0
  124. package/dist/solutions-components/p-9371145a.entry.js +477 -0
  125. package/dist/solutions-components/p-93d3119d.js +1948 -1
  126. package/dist/solutions-components/p-95ec8062.entry.js +173 -0
  127. package/dist/solutions-components/p-991ee695.js +109 -1
  128. package/dist/solutions-components/p-9a57dab7.entry.js +213 -0
  129. package/dist/solutions-components/p-9a9955db.js +41 -1
  130. package/dist/solutions-components/p-9c1ebc90.js +35 -16
  131. package/dist/solutions-components/p-9eba5c66.js +399 -3
  132. package/dist/solutions-components/p-a033a507.entry.js +252 -0
  133. package/dist/solutions-components/p-a3773415.entry.js +1132 -0
  134. package/dist/solutions-components/p-a44fe40f.entry.js +94 -0
  135. package/dist/solutions-components/p-a5b1ab03.js +33 -3
  136. package/dist/solutions-components/p-a5b2c13d.entry.js +723 -0
  137. package/dist/solutions-components/p-a6d729b7.entry.js +85 -0
  138. package/dist/solutions-components/p-a8005026.entry.js +565 -0
  139. package/dist/solutions-components/p-a80b3880.js +14 -1
  140. package/dist/solutions-components/p-a89198a3.entry.js +2620 -0
  141. package/dist/solutions-components/p-aa04bd1f.entry.js +95 -0
  142. package/dist/solutions-components/p-aa0a0922.entry.js +80 -0
  143. package/dist/solutions-components/p-ae1fd76b.js +11 -1
  144. package/dist/solutions-components/p-b2cf435e.entry.js +87 -0
  145. package/dist/solutions-components/p-b359dc78.js +41 -1
  146. package/dist/solutions-components/p-b57bc4eb.entry.js +71 -0
  147. package/dist/solutions-components/p-b75cc407.entry.js +145 -0
  148. package/dist/solutions-components/p-b911cb75.entry.js +71 -0
  149. package/dist/solutions-components/p-b965e177.entry.js +335 -0
  150. package/dist/solutions-components/p-b978636e.js +14 -1
  151. package/dist/solutions-components/p-ba10a5c8.entry.js +42 -0
  152. package/dist/solutions-components/p-bd67334c.js +122 -2
  153. package/dist/solutions-components/p-bde20dba.entry.js +212 -0
  154. package/dist/solutions-components/p-be0b5a94.entry.js +248 -0
  155. package/dist/solutions-components/p-c023e6a1.js +2028 -2
  156. package/dist/solutions-components/p-c27b0c2d.entry.js +150 -0
  157. package/dist/solutions-components/p-c579ed60.entry.js +447 -0
  158. package/dist/solutions-components/p-c92bc231.js +101 -2
  159. package/dist/solutions-components/p-cc815aca.js +839 -16
  160. package/dist/solutions-components/p-cc8beabb.entry.js +695 -0
  161. package/dist/solutions-components/p-cdc46c0c.js +1751 -2
  162. package/dist/solutions-components/p-d12e6992.entry.js +118 -0
  163. package/dist/solutions-components/p-d1dfed6b.entry.js +179 -0
  164. package/dist/solutions-components/p-d48a24e6.js +754 -2
  165. package/dist/solutions-components/p-d96ee3ef.entry.js +579 -0
  166. package/dist/solutions-components/p-dbc9a5a8.js +80 -0
  167. package/dist/solutions-components/p-dcdbe712.entry.js +278 -0
  168. package/dist/solutions-components/p-de39206f.entry.js +113 -0
  169. package/dist/solutions-components/p-de5416e8.js +28 -1
  170. package/dist/solutions-components/p-df420d54.entry.js +213 -0
  171. package/dist/solutions-components/p-e3138cf0.entry.js +20 -0
  172. package/dist/solutions-components/p-e4845fec.entry.js +152 -0
  173. package/dist/solutions-components/p-e611d8c8.js +28 -1
  174. package/dist/solutions-components/p-e947d3b0.js +5 -1
  175. package/dist/solutions-components/p-ea534300.js +41 -2
  176. package/dist/solutions-components/p-ec84ee85.entry.js +55 -0
  177. package/dist/solutions-components/p-ed36c637.entry.js +85 -0
  178. package/dist/solutions-components/p-f0add71c.js +74 -0
  179. package/dist/solutions-components/p-f42e014b.js +171 -2
  180. package/dist/solutions-components/p-fc02e7de.entry.js +308 -0
  181. package/dist/solutions-components/p-fc884dd6.js +28 -16
  182. package/dist/solutions-components/p-fcbfa59c.entry.js +181 -0
  183. package/dist/solutions-components/p-fdc5cf5f.entry.js +138 -0
  184. package/dist/solutions-components/solutions-components.esm.js +20 -1
  185. package/dist/solutions-components/utils/interfaces.ts +7 -2
  186. package/dist/types/components/buffer-tools/buffer-tools.d.ts +9 -1
  187. package/dist/types/components/public-notification/public-notification.d.ts +26 -0
  188. package/dist/types/components.d.ts +9 -1
  189. package/dist/types/preact.d.ts +3 -1
  190. package/dist/types/utils/interfaces.d.ts +4 -0
  191. package/package.json +1 -1
  192. package/dist/solutions-components/p-021432b8.entry.js +0 -12
  193. package/dist/solutions-components/p-03440b1e.entry.js +0 -11
  194. package/dist/solutions-components/p-0512635b.entry.js +0 -6
  195. package/dist/solutions-components/p-086ef115.entry.js +0 -29
  196. package/dist/solutions-components/p-0b4bf57f.entry.js +0 -6
  197. package/dist/solutions-components/p-0c088725.entry.js +0 -6
  198. package/dist/solutions-components/p-0f820c08.entry.js +0 -6
  199. package/dist/solutions-components/p-164780a0.entry.js +0 -6
  200. package/dist/solutions-components/p-179a68a0.entry.js +0 -6
  201. package/dist/solutions-components/p-184b5005.entry.js +0 -11
  202. package/dist/solutions-components/p-1d082fee.entry.js +0 -11
  203. package/dist/solutions-components/p-1e6c02a2.entry.js +0 -11
  204. package/dist/solutions-components/p-20a58e62.entry.js +0 -17
  205. package/dist/solutions-components/p-20b2458c.entry.js +0 -11
  206. package/dist/solutions-components/p-245d47c1.entry.js +0 -6
  207. package/dist/solutions-components/p-2cb057a9.entry.js +0 -11
  208. package/dist/solutions-components/p-2cc72806.entry.js +0 -23
  209. package/dist/solutions-components/p-2de1db9c.entry.js +0 -11
  210. package/dist/solutions-components/p-2e9c7055.entry.js +0 -11
  211. package/dist/solutions-components/p-2ed5e6c8.entry.js +0 -11
  212. package/dist/solutions-components/p-3109d940.entry.js +0 -6
  213. package/dist/solutions-components/p-31a8bcfa.entry.js +0 -6
  214. package/dist/solutions-components/p-3f88ba73.entry.js +0 -6
  215. package/dist/solutions-components/p-3fa9b3c8.js +0 -36
  216. package/dist/solutions-components/p-40c41709.entry.js +0 -6
  217. package/dist/solutions-components/p-40e963c7.entry.js +0 -11
  218. package/dist/solutions-components/p-40f480da.entry.js +0 -11
  219. package/dist/solutions-components/p-49d5d2d3.entry.js +0 -11
  220. package/dist/solutions-components/p-4f7049a4.entry.js +0 -11
  221. package/dist/solutions-components/p-506e4d78.entry.js +0 -6
  222. package/dist/solutions-components/p-576fdcab.entry.js +0 -6
  223. package/dist/solutions-components/p-5bd0cf34.entry.js +0 -23
  224. package/dist/solutions-components/p-65e177f1.entry.js +0 -6
  225. package/dist/solutions-components/p-67d710c2.entry.js +0 -6
  226. package/dist/solutions-components/p-7268b445.entry.js +0 -11
  227. package/dist/solutions-components/p-75ea4667.entry.js +0 -6
  228. package/dist/solutions-components/p-778c0a36.entry.js +0 -17
  229. package/dist/solutions-components/p-7a22509b.entry.js +0 -12
  230. package/dist/solutions-components/p-7bff51db.entry.js +0 -6
  231. package/dist/solutions-components/p-7d2d0d5d.entry.js +0 -6
  232. package/dist/solutions-components/p-7f0036f1.entry.js +0 -11
  233. package/dist/solutions-components/p-8060fb94.entry.js +0 -6
  234. package/dist/solutions-components/p-80a1b305.entry.js +0 -6
  235. package/dist/solutions-components/p-81eae877.entry.js +0 -12
  236. package/dist/solutions-components/p-84e86b8b.entry.js +0 -6
  237. package/dist/solutions-components/p-877dd0dc.entry.js +0 -18
  238. package/dist/solutions-components/p-9106950a.entry.js +0 -11
  239. package/dist/solutions-components/p-979804a4.entry.js +0 -11
  240. package/dist/solutions-components/p-9862baa8.entry.js +0 -11
  241. package/dist/solutions-components/p-9b5a9117.entry.js +0 -12
  242. package/dist/solutions-components/p-9deff0c2.entry.js +0 -6
  243. package/dist/solutions-components/p-9f400eeb.entry.js +0 -6
  244. package/dist/solutions-components/p-a0639ad1.entry.js +0 -11
  245. package/dist/solutions-components/p-a33c044e.entry.js +0 -6
  246. package/dist/solutions-components/p-a516c658.entry.js +0 -6
  247. package/dist/solutions-components/p-aa0ef36d.entry.js +0 -11
  248. package/dist/solutions-components/p-aaccbdf3.entry.js +0 -18
  249. package/dist/solutions-components/p-ab03a5c9.entry.js +0 -11
  250. package/dist/solutions-components/p-ad469b92.entry.js +0 -11
  251. package/dist/solutions-components/p-adc86ac3.entry.js +0 -6
  252. package/dist/solutions-components/p-addc1156.entry.js +0 -11
  253. package/dist/solutions-components/p-ae846934.entry.js +0 -11
  254. package/dist/solutions-components/p-b0572fc4.entry.js +0 -37
  255. package/dist/solutions-components/p-b4e476b7.js +0 -257
  256. package/dist/solutions-components/p-b668daf8.js +0 -21
  257. package/dist/solutions-components/p-b6e6eae1.entry.js +0 -6
  258. package/dist/solutions-components/p-bc317a7f.entry.js +0 -6
  259. package/dist/solutions-components/p-bd4d0773.entry.js +0 -6
  260. package/dist/solutions-components/p-be41429f.js +0 -21
  261. package/dist/solutions-components/p-bf6b6353.entry.js +0 -11
  262. package/dist/solutions-components/p-c2e3dfbb.entry.js +0 -11
  263. package/dist/solutions-components/p-c4afae53.entry.js +0 -12
  264. package/dist/solutions-components/p-c9da1c26.entry.js +0 -6
  265. package/dist/solutions-components/p-cbf8cd49.entry.js +0 -6
  266. package/dist/solutions-components/p-cc1a064a.entry.js +0 -11
  267. package/dist/solutions-components/p-d09a168c.entry.js +0 -6
  268. package/dist/solutions-components/p-d377f913.entry.js +0 -11
  269. package/dist/solutions-components/p-d4cefead.entry.js +0 -37
  270. package/dist/solutions-components/p-d7bc0baf.entry.js +0 -16
  271. package/dist/solutions-components/p-d8968487.entry.js +0 -11
  272. package/dist/solutions-components/p-e00a0b86.entry.js +0 -11
  273. package/dist/solutions-components/p-e9a7ed49.entry.js +0 -11
  274. package/dist/solutions-components/p-ec27e493.entry.js +0 -11
  275. package/dist/solutions-components/p-ed6404eb.entry.js +0 -6
  276. package/dist/solutions-components/p-ef21e195.entry.js +0 -23
  277. package/dist/solutions-components/p-f6068a2d.entry.js +0 -11
  278. package/dist/solutions-components/p-f6c4cff3.entry.js +0 -11
  279. package/dist/solutions-components/p-f847291f.entry.js +0 -6
  280. package/dist/solutions-components/p-f90fd262.entry.js +0 -11
  281. package/dist/solutions-components/p-fc973005.entry.js +0 -6
  282. package/dist/solutions-components/p-ff9fb6bc.entry.js +0 -11
@@ -1,18 +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 i,c as t,h as e,H as a,g as s}from"./p-c023e6a1.js";import{l as n}from"./p-1c567f3a.js";import{g as l}from"./p-44da2507.js";import{b as r,g as o,t as h,i as c,h as d}from"./p-83166522.js";import{c as m,d as u}from"./p-bd67334c.js";import{a as b,c as p,d as g,H as f}from"./p-316f56db.js";import{u as v}from"./p-7daea1df.js";import{g as x}from"./p-a80b3880.js";import{d as k,c as y}from"./p-63f6e8f1.js";import{i as _}from"./p-73e23995.js";import{n as w,c as z,d as V}from"./p-9eba5c66.js";import{s as D}from"./p-9c1ebc90.js";import{h as M,g as $,f as C}from"./p-be41429f.js";import{a as S,f as H,h as I}from"./p-3fa9b3c8.js";import"./p-3b010ce1.js";import"./p-729708a3.js";import"./p-9a9955db.js";import"./p-4307dacd.js";const L=class{constructor(e){i(this,e),this.bufferComplete=t(this,"bufferComplete",7),this.appearance="text",this.distance=0,this.geometries=[],this.sliderMax=100,this.sliderMin=0,this.sliderTicks=10,this.unionResults=!0,this.unit="meters",this._translations=void 0}geometriesWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._buffer()}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return e(a,null,"text"===this.appearance?this._getTextBoxDisplay():this._getSliderDisplay())}async _initModules(){const[i]=await n(["esri/geometry/geometryEngine"]);this._geometryEngine=i}_getUnits(){const i={feet:this._translations.feet,meters:this._translations.meters,miles:this._translations.miles,kilometers:this._translations.kilometers};return Object.keys(i).map((t=>e("calcite-option",{label:i[t],selected:this.unit===t,value:t})))}_setDistance(i){this.distance=i.detail.value,this.distance>0?this._buffer():this.bufferComplete.emit(void 0)}_setUnit(i){this.unit=i,this._buffer()}_buffer(){this._bufferTimeout&&clearTimeout(this._bufferTimeout),this._bufferTimeout=setTimeout((()=>{var i;if((null===(i=this.geometries)||void 0===i?void 0:i.length)>0&&this.unit&&this.distance>0){const i=this._geometryEngine.geodesicBuffer(this.geometries,this.distance,this.unit,this.unionResults);this.bufferComplete.emit(i)}}),400)}_getTextBoxDisplay(){return e("div",{class:"c-container"},e("calcite-input",{class:"padding-end-1","number-button-type":"vertical",onCalciteInputInput:i=>this._setDistance(i),placeholder:"0",type:"number",value:this.distance?this.distance.toString():void 0}),e("calcite-select",{class:"flex-1",label:"label",onCalciteSelectChange:()=>this._setUnit(this._unitElement.value),ref:i=>{this._unitElement=i}},this._getUnits()))}_getSliderDisplay(){return e("div",null,e("calcite-slider",{labelHandles:!0,max:this.sliderMax,min:this.sliderMin,ticks:this.sliderTicks}))}async _getTranslations(){const i=await l(this.el);this._translations=i[0]}_testAccess(i,t){switch(i){case"_setUnit":return this._setUnit(t);case"_setDistance":return this._setDistance(t)}return null}get el(){return s(this)}static get watchers(){return{geometries:["geometriesWatchHandler"]}}};L.style=':host{display:block}.c-container{display:inline-flex}.flex-1{flex:"1"}.padding-end-1{-webkit-padding-end:1rem;padding-inline-end:1rem}';const A=class{constructor(e){i(this,e),this.calciteRadioGroupChange=t(this,"calciteRadioGroupChange",6),this.appearance="solid",this.disabled=!1,this.required=!1,this.layout="horizontal",this.scale="m",this.value=null,this.width="auto",this.handleClick=i=>{"calcite-radio-group-item"===i.target.localName&&this.selectItem(i.target,!0)}}valueHandler(i){this.getItems().forEach((t=>t.checked=t.value===i))}handleSelectedItemChange(i,t){if(this.value=null==i?void 0:i.value,i===t)return;const e=this.getItems(),a=Array.from(e).filter((t=>t===i)).pop();a?this.selectItem(a):e[0]&&(e[0].tabIndex=0)}componentWillLoad(){const i=this.getItems(),t=Array.from(i).filter((i=>i.checked)).pop();t?this.selectItem(t):i[0]&&(i[0].tabIndex=0)}componentDidLoad(){b(this,this.value)}connectedCallback(){m(this),p(this)}disconnectedCallback(){u(this),g(this)}componentDidRender(){v(this)}render(){return e(a,{onClick:this.handleClick,role:"radiogroup"},e("slot",null),e(f,{component:this}))}handleSelected(i){i.preventDefault(),this.selectItem(i.target),i.stopPropagation()}handleKeyDown(i){const{key:t}=i,{el:e,selectedItem:a}=this;if(-1===["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(t))return;let s=t;"rtl"===r(e)&&("ArrowRight"===t&&(s="ArrowLeft"),"ArrowLeft"===t&&(s="ArrowRight"));const n=this.getItems();let l=-1;switch(n.forEach(((i,t)=>{i===a&&(l=t)})),s){case"ArrowLeft":case"ArrowUp":i.preventDefault();const t=n.item(l<1?n.length-1:l-1);return void this.selectItem(t,!0);case"ArrowRight":case"ArrowDown":i.preventDefault();const e=-1===l?n.item(1):n.item(l+1)||n.item(0);return void this.selectItem(e,!0);case" ":return i.preventDefault(),void this.selectItem(i.target,!0);default:return}}async setFocus(){var i;null===(i=this.selectedItem||this.getItems()[0])||void 0===i||i.focus()}onLabelClick(){this.setFocus()}getItems(){return this.el.querySelectorAll("calcite-radio-group-item")}selectItem(i,t=!1){if(i===this.selectedItem)return;const e=this.getItems();let a=null;e.forEach((e=>{const s=e.value===i.value;(s&&!e.checked||!s&&e.checked)&&(e.checked=s),e.tabIndex=s?0:-1,s&&(a=e,t&&this.calciteRadioGroupChange.emit(a.value))})),this.selectedItem=a,a&&a.focus()}get el(){return s(this)}static get watchers(){return{value:["valueHandler"],selectedItem:["handleSelectedItemChange"]}}};A.style="@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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;background-color:var(--calcite-ui-foreground-1);inline-size:-moz-fit-content;inline-size:fit-content;outline:1px solid var(--calcite-ui-border-input);outline-offset:-1px}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([layout=vertical]){flex-direction:column;align-items:flex-start;align-self:flex-start}:host([width=full]){inline-size:100%;min-inline-size:-moz-fit-content;min-inline-size:fit-content}:host([width=full]) ::slotted(calcite-radio-group-item){flex:1 1 auto}:host([width=full][layout=vertical]) ::slotted(calcite-radio-group-item){justify-content:flex-start}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */
12
- const j="radio-group-item-icon",T=class{constructor(e){i(this,e),this.calciteInternalRadioGroupItemChange=t(this,"calciteInternalRadioGroupItemChange",6),this.checked=!1,this.iconFlipRtl=!1,this.iconPosition="start"}handleCheckedChange(){this.calciteInternalRadioGroupItemChange.emit()}render(){const{checked:i,value:t}=this,s=o(this.el,"scale","m"),n=o(this.el,"appearance","solid"),l=o(this.el,"layout","horizontal"),r=this.iconStart?e("calcite-icon",{class:j,flipRtl:this.iconFlipRtl,icon:this.iconStart,key:"icon-start",scale:"s"}):null,c=this.iconEnd?e("calcite-icon",{class:j,flipRtl:this.iconFlipRtl,icon:this.iconEnd,key:"icon-end",scale:"s"}):null,d=e("calcite-icon",{class:j,flipRtl:this.iconFlipRtl,icon:this.icon,key:"icon",scale:"s"}),m=this.icon&&"start"===this.iconPosition&&!this.iconStart?d:null,u=this.icon&&"end"===this.iconPosition&&!this.iconEnd?d:null;return e(a,{"aria-checked":h(i),"aria-label":t,role:"radio"},e("label",{class:{"label--scale-s":"s"===s,"label--scale-m":"m"===s,"label--scale-l":"l"===s,"label--horizontal":"horizontal"===l,"label--outline":"outline"===n}},m,this.iconStart?r:null,e("slot",null,t),e("slot",{name:"input"}),u,this.iconEnd?c:null))}get el(){return s(this)}static get watchers(){return{checked:["handleCheckedChange"]}}};T.style="@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{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out, border-color var(--calcite-animation-timing) ease-in-out}:host label{pointer-events:none;margin:0.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-ui-text-3);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out, border-color var(--calcite-internal-animation-timing-fast) ease-in-out, color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host{outline-color:transparent}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:-1px}.label--scale-s{padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem;padding-block:0.125rem}.label--scale-m{padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem;padding-block:0.375rem}.label--scale-l{padding-inline:1rem;padding-block:0.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host(:hover) label{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host(:active) label{background-color:var(--calcite-ui-foreground-3)}:host([checked]) label{cursor:default;border-color:var(--calcite-ui-brand);background-color:var(--calcite-ui-brand);color:var(--calcite-ui-background)}:host([checked]) .label--outline{border-color:var(--calcite-ui-brand);background-color:var(--calcite-ui-foreground-1);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand);color:var(--calcite-ui-brand)}::slotted(input){display:none}@media (forced-colors: active){:host([checked]) label{background-color:highlight}:host([checked]) .label--outline{outline:2px solid transparent;outline-offset:2px}:host([checked]) label:not([class~=label--outline]) .radio-group-item-icon{color:highlightText}}.radio-group-item-icon{position:relative;margin:0px;display:inline-flex;line-height:inherit}:host([icon-position=start]) .label--scale-s .radio-group-item-icon{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host([icon-position=end]) .label--scale-s .radio-group-item-icon{-webkit-margin-end:unset;margin-inline-end:unset;-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}:host([icon-position=start]) .label--scale-m .radio-group-item-icon{-webkit-margin-end:0.75rem;margin-inline-end:0.75rem}:host([icon-position=end]) .label--scale-m .radio-group-item-icon{-webkit-margin-end:unset;margin-inline-end:unset;-webkit-margin-start:0.75rem;margin-inline-start:0.75rem}:host([icon-position=start]) .label--scale-l .radio-group-item-icon{-webkit-margin-end:1rem;margin-inline-end:1rem}:host([icon-position=end]) .label--scale-l .radio-group-item-icon{-webkit-margin-end:unset;margin-inline-end:unset;-webkit-margin-start:1rem;margin-inline-start:1rem}:host([icon-start]) .label--scale-s .radio-group-item-icon{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host([icon-end]) .label--scale-s .radio-group-item-icon{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}:host([icon-start]) .label--scale-m .radio-group-item-icon{-webkit-margin-end:0.75rem;margin-inline-end:0.75rem}:host([icon-end]) .label--scale-m .radio-group-item-icon{-webkit-margin-start:0.75rem;margin-inline-start:0.75rem}:host([icon-start]) .label--scale-l .radio-group-item-icon{-webkit-margin-end:1rem;margin-inline-end:1rem}:host([icon-end]) .label--scale-l .radio-group-item-icon{-webkit-margin-start:1rem;margin-inline-start:1rem}";
13
- /*!
14
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
15
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
16
- * v1.0.0-beta.97
17
- */
18
- const F="handle__label";function O(i){return Array.isArray(i)}const P=class{constructor(e){i(this,e),this.calciteSliderInput=t(this,"calciteSliderInput",6),this.calciteSliderChange=t(this,"calciteSliderChange",6),this.calciteSliderUpdate=t(this,"calciteSliderUpdate",6),this.disabled=!1,this.groupSeparator=!1,this.hasHistogram=!1,this.labelHandles=!1,this.labelTicks=!1,this.max=100,this.min=0,this.mirrored=!1,this.precise=!1,this.required=!1,this.snap=!1,this.step=1,this.value=0,this.scale="m",this.activeProp="value",this.guid=`calcite-slider-${x()}`,this.effectiveLocale="",this.minMaxValueRange=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.tickValues=[],this.dragUpdate=i=>{if(i.preventDefault(),this.dragProp){const t=this.translate(i.clientX||i.pageX);if(O(this.value)&&"minMaxValue"===this.dragProp)if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){const i=t-this.minValueDragRange,e=t+this.maxValueDragRange;e<=this.max&&i>=this.min&&e-i===this.minMaxValueRange&&this.setValue({minValue:this.clamp(i,"minValue"),maxValue:this.clamp(e,"maxValue")})}else this.minValueDragRange=t-this.minValue,this.maxValueDragRange=this.maxValue-t,this.minMaxValueRange=this.maxValue-this.minValue;else this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.pointerUpDragEnd=i=>{c(i)&&this.dragEnd(i)},this.dragEnd=i=>{this.removeDragListeners(),this.focusActiveHandle(i.clientX),this.lastDragPropValue!=this[this.dragProp]&&this.emitChange(),this.dragProp=null,this.lastDragPropValue=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.minMaxValueRange=null},this.storeTrackRef=i=>{this.trackEl=i},this.determineGroupSeparator=i=>{if("number"==typeof i)return w.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},w.localize(i.toString())}}histogramWatcher(i){this.hasHistogram=!!i}valueHandler(){this.setMinMaxFromValue()}minMaxValueHandler(){this.setValueFromMinMax()}connectedCallback(){z(this),this.setMinMaxFromValue(),this.setValueFromMinMax(),m(this),p(this)}disconnectedCallback(){u(this),g(this),V(this),this.removeDragListeners()}componentWillLoad(){this.tickValues=this.generateTickValues(),O(this.value)||(this.value=this.clamp(this.value)),b(this,this.value),this.snap&&!O(this.value)&&(this.value=this.getClosestStep(this.value)),this.histogram&&(this.hasHistogram=!0)}componentDidRender(){this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),O(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels(),v(this)}render(){const i=this.el.id||this.guid,t=O(this.value)?"maxValue":"value",s=O(this.value)?this.maxValue:this.value,n=this.determineGroupSeparator(s),l=this.determineGroupSeparator(this.minValue),r=this.minValue||this.min,o=this.shouldUseMinValue(),h=100*this.getUnitInterval(o?this.minValue:r),c=100*this.getUnitInterval(s),d=this.shouldMirror(),m=`${d?100-h:h}%`,u=`${d?c:100-c}%`,b=O(this.value),p=`${F} handle__label--minValue`,g=`${F} handle__label--value`,v=e("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":s,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===t},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=t,onPointerDown:i=>this.pointerDownDragStart(i,t),ref:i=>this.maxHandle=i,role:"slider",style:{right:u},tabIndex:0},e("div",{class:"handle"})),x=e("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":s,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===t},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=t,onPointerDown:i=>this.pointerDownDragStart(i,t),ref:i=>this.maxHandle=i,role:"slider",style:{right:u},tabIndex:0},e("span",{"aria-hidden":"true",class:g},n),e("span",{"aria-hidden":"true",class:`${g} static`},n),e("span",{"aria-hidden":"true",class:`${g} transformed`},n),e("div",{class:"handle"})),k=e("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":s,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===t},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=t,onPointerDown:i=>this.pointerDownDragStart(i,t),ref:i=>this.maxHandle=i,role:"slider",style:{right:u},tabIndex:0},e("div",{class:"handle"}),e("span",{"aria-hidden":"true",class:g},n),e("span",{"aria-hidden":"true",class:`${g} static`},n),e("span",{"aria-hidden":"true",class:`${g} transformed`},n)),y=e("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":s,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===t,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=t,onPointerDown:i=>this.pointerDownDragStart(i,t),ref:i=>this.maxHandle=i,role:"slider",style:{right:u},tabIndex:0},e("div",{class:"handle"}),e("div",{class:"handle-extension"})),_=e("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":s,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===t,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=t,onPointerDown:i=>this.pointerDownDragStart(i,t),ref:i=>this.maxHandle=i,role:"slider",style:{right:u},tabIndex:0},e("div",{class:"handle-extension"}),e("div",{class:"handle"})),w=e("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":s,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===t,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=t,onPointerDown:i=>this.pointerDownDragStart(i,t),ref:i=>this.maxHandle=i,role:"slider",style:{right:u},tabIndex:0},e("span",{"aria-hidden":"true",class:g},n),e("span",{"aria-hidden":"true",class:`${g} static`},n),e("span",{"aria-hidden":"true",class:`${g} transformed`},n),e("div",{class:"handle"}),e("div",{class:"handle-extension"})),z=e("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":s,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===t,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=t,onPointerDown:i=>this.pointerDownDragStart(i,t),ref:i=>this.maxHandle=i,role:"slider",style:{right:u},tabIndex:0},e("div",{class:"handle-extension"}),e("div",{class:"handle"}),e("span",{"aria-hidden":"true",class:g},n),e("span",{"aria-hidden":"true",class:`${g} static`},n),e("span",{"aria-hidden":"true",class:`${g} transformed`},n)),V=e("div",{"aria-disabled":this.disabled,"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:!0,"thumb--minValue":!0,"thumb--active":"minValue"===this.dragProp},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp="minValue",onPointerDown:i=>this.pointerDownDragStart(i,"minValue"),ref:i=>this.minHandle=i,role:"slider",style:{left:m},tabIndex:0},e("div",{class:"handle"})),D=e("div",{"aria-disabled":this.disabled,"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:!0,"thumb--minValue":!0,"thumb--active":"minValue"===this.dragProp},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp="minValue",onPointerDown:i=>this.pointerDownDragStart(i,"minValue"),ref:i=>this.minHandle=i,role:"slider",style:{left:m},tabIndex:0},e("span",{"aria-hidden":"true",class:p},l),e("span",{"aria-hidden":"true",class:`${p} static`},l),e("span",{"aria-hidden":"true",class:`${p} transformed`},l),e("div",{class:"handle"})),M=e("div",{"aria-disabled":this.disabled,"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:!0,"thumb--minValue":!0,"thumb--active":"minValue"===this.dragProp},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp="minValue",onPointerDown:i=>this.pointerDownDragStart(i,"minValue"),ref:i=>this.minHandle=i,role:"slider",style:{left:m},tabIndex:0},e("div",{class:"handle"}),e("span",{"aria-hidden":"true",class:p},l),e("span",{"aria-hidden":"true",class:`${p} static`},l),e("span",{"aria-hidden":"true",class:`${p} transformed`},l)),$=e("div",{"aria-disabled":this.disabled,"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:!0,"thumb--minValue":!0,"thumb--active":"minValue"===this.dragProp,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp="minValue",onPointerDown:i=>this.pointerDownDragStart(i,"minValue"),ref:i=>this.minHandle=i,role:"slider",style:{left:m},tabIndex:0},e("div",{class:"handle-extension"}),e("div",{class:"handle"})),C=e("div",{"aria-disabled":this.disabled,"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:!0,"thumb--minValue":!0,"thumb--active":"minValue"===this.dragProp,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp="minValue",onPointerDown:i=>this.pointerDownDragStart(i,"minValue"),ref:i=>this.minHandle=i,role:"slider",style:{left:m},tabIndex:0},e("div",{class:"handle-extension"}),e("div",{class:"handle"}),e("span",{"aria-hidden":"true",class:p},l),e("span",{"aria-hidden":"true",class:`${p} static`},l),e("span",{"aria-hidden":"true",class:`${p} transformed`},l));return e(a,{id:i,onTouchStart:this.handleTouchStart},e("div",{class:{container:!0,"container--range":b,[`scale--${this.scale}`]:!0}},this.renderGraph(),e("div",{class:"track",ref:this.storeTrackRef},e("div",{class:"track__range",onPointerDown:i=>this.pointerDownDragStart(i,"minMaxValue"),style:{left:`${d?100-c:h}%`,right:`${d?h:100-c}%`}}),e("div",{class:"ticks"},this.tickValues.map((i=>{const t=100*this.getUnitInterval(i)+"%";let a=i>=r&&i<=s;return o&&(a=i>=this.minValue&&i<=this.maxValue),e("span",{class:{tick:!0,"tick--active":a},style:{left:d?"":t,right:d?t:""}},this.renderTickLabel(i))})))),e("div",{class:"thumb-container"},!this.precise&&!this.labelHandles&&b&&V,!this.hasHistogram&&!this.precise&&this.labelHandles&&b&&D,this.precise&&!this.labelHandles&&b&&$,this.precise&&this.labelHandles&&b&&C,this.hasHistogram&&!this.precise&&this.labelHandles&&b&&M,!this.precise&&!this.labelHandles&&v,!this.hasHistogram&&!this.precise&&this.labelHandles&&x,!this.hasHistogram&&this.precise&&!this.labelHandles&&y,this.hasHistogram&&this.precise&&!this.labelHandles&&_,!this.hasHistogram&&this.precise&&this.labelHandles&&w,this.hasHistogram&&!this.precise&&this.labelHandles&&k,this.hasHistogram&&this.precise&&this.labelHandles&&z,e(f,{component:this}))))}renderGraph(){return this.histogram?e("calcite-graph",{class:"graph",colorStops:this.histogramStops,data:this.histogram,highlightMax:O(this.value)?this.maxValue:this.value,highlightMin:O(this.value)?this.minValue:this.min,max:this.max,min:this.min}):null}renderTickLabel(i){const t=O(this.value),a=i===this.min,s=i===this.max,n=this.determineGroupSeparator(i),l=e("span",{class:{tick__label:!0,"tick__label--min":a,"tick__label--max":s}},n);return this.labelTicks&&!this.hasHistogram&&!t||this.labelTicks&&!this.hasHistogram&&t&&!this.precise&&!this.labelHandles||this.labelTicks&&!this.hasHistogram&&t&&!this.precise&&this.labelHandles||this.labelTicks&&!this.hasHistogram&&t&&this.precise&&(a||s)||this.labelTicks&&this.hasHistogram&&!this.precise&&!this.labelHandles||this.labelTicks&&this.hasHistogram&&this.precise&&!this.labelHandles&&(a||s)||this.labelTicks&&this.hasHistogram&&!this.precise&&this.labelHandles&&(a||s)||this.labelTicks&&this.hasHistogram&&this.precise&&this.labelHandles&&(a||s)?l:null}keyDownHandler(i){const t=this.shouldMirror(),{activeProp:e,max:a,min:s,pageStep:n,step:l}=this,r=this[e],{key:o}=i;if(_(o))return void i.preventDefault();let h;if("ArrowUp"===o||"ArrowRight"===o?h=r+l*(t&&"ArrowRight"===o?-1:1):"ArrowDown"===o||"ArrowLeft"===o?h=r-l*(t&&"ArrowLeft"===o?-1:1):"PageUp"===o?n&&(h=r+n):"PageDown"===o?n&&(h=r-n):"Home"===o?h=s:"End"===o&&(h=a),isNaN(h))return;i.preventDefault();const c=Number(h.toFixed(k(l)));this.setValue({[e]:this.clamp(c,e)})}pointerDownHandler(i){if(!c(i))return;const t=i.clientX||i.pageX,e=this.translate(t);let a="value";O(this.value)&&(a=e>=this.minValue&&e<=this.maxValue&&"minMaxValue"===this.lastDragProp?"minMaxValue":Math.abs(this.maxValue-e)<Math.abs(this.minValue-e)||e>this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this[a],this.dragStart(a),this.el.shadowRoot.querySelector(".thumb:active")||this.setValue({[a]:this.clamp(e,a)}),this.focusActiveHandle(t)}handleTouchStart(i){i.preventDefault()}async setFocus(){const i=this.minHandle?this.minHandle:this.maxHandle;null==i||i.focus()}setValueFromMinMax(){const{minValue:i,maxValue:t}=this;"number"==typeof i&&"number"==typeof t&&(this.value=[i,t])}setMinMaxFromValue(){const{value:i}=this;O(i)&&(this.minValue=i[0],this.maxValue=i[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return!!O(this.value)&&(this.hasHistogram&&0===this.maxValue||!this.hasHistogram&&0===this.minValue)}generateTickValues(){const i=[];let t=this.min;for(;this.ticks&&t<this.max+this.ticks;)i.push(Math.min(t,this.max)),t+=this.ticks;return i}pointerDownDragStart(i,t){c(i)&&this.dragStart(t)}dragStart(i){this.dragProp=i,this.lastDragProp=this.dragProp,this.activeProp=i,document.addEventListener("pointermove",this.dragUpdate),document.addEventListener("pointerup",this.pointerUpDragEnd),document.addEventListener("pointercancel",this.dragEnd)}focusActiveHandle(i){switch(this.dragProp){case"minValue":this.minHandle.focus();break;case"maxValue":case"value":this.maxHandle.focus();break;case"minMaxValue":this.getClosestHandle(i).focus()}}emitInput(){this.calciteSliderInput.emit(),this.calciteSliderUpdate.emit()}emitChange(){this.calciteSliderChange.emit()}removeDragListeners(){document.removeEventListener("pointermove",this.dragUpdate),document.removeEventListener("pointerup",this.pointerUpDragEnd),document.removeEventListener("pointercancel",this.dragEnd)}setValue(i){let t;Object.keys(i).forEach((e=>{const a=i[e];t||(t=this[e]!==a),this[e]=a})),t&&(this.dragProp||this.emitChange(),this.emitInput())}clamp(i,t){return i=y(i,this.min,this.max),"maxValue"===t&&(i=Math.max(i,this.minValue)),"minValue"===t&&(i=Math.min(i,this.maxValue)),i}translate(i){const t=this.max-this.min,{left:e,width:a}=this.trackEl.getBoundingClientRect(),s=(i-e)/a,n=this.shouldMirror(),l=this.clamp(this.min+t*(n?1-s:s));let r=Number(l.toFixed(k(this.step)));return this.snap&&this.step&&(r=this.getClosestStep(r)),r}getClosestStep(i){if(i=Number(this.clamp(i).toFixed(k(this.step))),this.step){const t=Math.round(i/this.step)*this.step;i=Number(this.clamp(t).toFixed(k(this.step)))}return i}getClosestHandle(i){return this.getDistanceX(this.maxHandle,i)>this.getDistanceX(this.minHandle,i)?this.minHandle:this.maxHandle}getDistanceX(i,t){return Math.abs(i.getBoundingClientRect().left-t)}getFontSizeForElement(i){return Number(window.getComputedStyle(i).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(i){return((i=this.clamp(i))-this.min)/(this.max-this.min)}adjustHostObscuredHandleLabel(i){const t=this.el.shadowRoot.querySelector(`.handle__label--${i}`),e=this.el.shadowRoot.querySelector(`.handle__label--${i}.static`),a=this.el.shadowRoot.querySelector(`.handle__label--${i}.transformed`),s=e.getBoundingClientRect(),n=this.getHostOffset(s.left,s.right);t.style.transform=`translateX(${n}px)`,a.style.transform=`translateX(${n}px)`}hyphenateCollidingRangeHandleLabels(){const{shadowRoot:i}=this.el,t=this.shouldMirror(),e=t?"value":"minValue",a=t?"minValue":"value",s=i.querySelector(`.handle__label--${e}`),n=i.querySelector(`.handle__label--${e}.static`),l=i.querySelector(`.handle__label--${e}.transformed`),r=this.getHostOffset(n.getBoundingClientRect().left,n.getBoundingClientRect().right),o=i.querySelector(`.handle__label--${a}`),h=i.querySelector(`.handle__label--${a}.static`),c=i.querySelector(`.handle__label--${a}.transformed`),d=this.getHostOffset(h.getBoundingClientRect().left,h.getBoundingClientRect().right),m=this.getFontSizeForElement(s),u=this.getRangeLabelOverlap(l,c),b=s,p=m/2;if(u>0){if(b.classList.add("hyphen","hyphen--wrap"),0===d&&0===r){let i=u/2-p;i=-1===Math.sign(i)?Math.abs(i):-i;const t=this.getHostOffset(l.getBoundingClientRect().left+i-p,l.getBoundingClientRect().right+i-p);let e=u/2;const a=this.getHostOffset(c.getBoundingClientRect().left+e,c.getBoundingClientRect().right+e);0!==t&&(i+=t,e+=t),0!==a&&(i+=a,e+=a),s.style.transform=`translateX(${i}px)`,l.style.transform=`translateX(${i-p}px)`,o.style.transform=`translateX(${e}px)`,c.style.transform=`translateX(${e}px)`}else if(r>0||d>0)s.style.transform=`translateX(${r+p}px)`,o.style.transform=`translateX(${u+d}px)`,c.style.transform=`translateX(${u+d}px)`;else if(r<0||d<0){let i=Math.abs(r)+u-p;i=-1===Math.sign(i)?Math.abs(i):-i,s.style.transform=`translateX(${i}px)`,l.style.transform=`translateX(${i-p}px)`}}else b.classList.remove("hyphen","hyphen--wrap"),s.style.transform=`translateX(${r}px)`,l.style.transform=`translateX(${r}px)`,o.style.transform=`translateX(${d}px)`,c.style.transform=`translateX(${d}px)`}hideObscuredBoundingTickLabels(){const i=O(this.value);if(!(this.hasHistogram||i||this.labelHandles||this.precise))return;if(!this.hasHistogram&&!i&&this.labelHandles&&!this.precise)return;if(!this.hasHistogram&&!i&&!this.labelHandles&&this.precise)return;if(!this.hasHistogram&&!i&&this.labelHandles&&this.precise)return;if(!this.hasHistogram&&i&&!this.precise)return;if(this.hasHistogram&&!this.precise&&!this.labelHandles)return;const t=this.el.shadowRoot.querySelector(".thumb--minValue"),e=this.el.shadowRoot.querySelector(".thumb--value"),a=this.el.shadowRoot.querySelector(".tick__label--min"),s=this.el.shadowRoot.querySelector(".tick__label--max");!t&&e&&a&&s&&(a.style.opacity=this.isMinTickLabelObscured(a,e)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,e)?"0":"1"),t&&e&&a&&s&&(a.style.opacity=this.isMinTickLabelObscured(a,t)||this.isMinTickLabelObscured(a,e)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,t)||this.isMaxTickLabelObscured(s,e)&&this.hasHistogram?"0":"1")}getHostOffset(i,t){const e=this.el.getBoundingClientRect();return i+7<e.left?e.left-i-7:t-7>e.right?7-(t-e.right):0}getRangeLabelOverlap(i,t){const e=i.getBoundingClientRect(),a=t.getBoundingClientRect(),s=this.getFontSizeForElement(i);return Math.max(e.right+s-a.left,0)}isMinTickLabelObscured(i,t){const e=i.getBoundingClientRect(),a=t.getBoundingClientRect();return d(e,a)}isMaxTickLabelObscured(i,t){const e=i.getBoundingClientRect(),a=t.getBoundingClientRect();return d(e,a)}get el(){return s(this)}static get watchers(){return{histogram:["histogramWatcher"],value:["valueHandler"],minValue:["minMaxValueHandler"],maxValue:["minMaxValueHandler"]}}};P.style='@charset "UTF-8";@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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}.scale--s{--calcite-slider-handle-size:10px;--calcite-slider-handle-extension-height:6.5px;--calcite-slider-container-font-size:var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size:14px;--calcite-slider-handle-extension-height:8px;--calcite-slider-container-font-size:var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size:16px;--calcite-slider-handle-extension-height:10.5px;--calcite-slider-container-font-size:var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2);font-size:var(--calcite-slider-container-font-size)}:host{display:block}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * 0.5);padding-block:calc(var(--calcite-slider-handle-size) * 0.5);margin-block:calc(var(--calcite-slider-handle-size) * 0.5);margin-inline:0;--calcite-slider-full-handle-height:calc(\n var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height)\n )}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-ui-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-6px}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-8px}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-9px}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset:calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset:calc(var(--calcite-slider-handle-size) * 0.5);position:absolute;margin:0px;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0px;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset), var(--calcite-slider-thumb-y-offset))}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen::after{content:"—";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;background-color:var(--calcite-ui-foreground-1);outline-color:transparent;block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease, background-color var(--calcite-internal-animation-timing-medium) ease, box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:0.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-ui-text-3)}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-ui-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-ui-brand)}.thumb:focus .handle{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.thumb:focus .handle-extension{background-color:var(--calcite-ui-brand)}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1), var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset:-2px}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset:50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-23px}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-30px}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-32px}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{-webkit-margin-before:0.5em;margin-block-start:0.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{-webkit-margin-after:0.5em;margin-block-end:0.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset:-33px}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset:-44px}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset:-49px}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-ui-brand);box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16)}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-ui-brand)}.track{position:relative;block-size:0.125rem;border-radius:0px;background-color:var(--calcite-ui-border-2);transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:0.125rem;background-color:var(--calcite-ui-brand)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * 0.5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media (forced-colors: active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:0.25rem;inline-size:0.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-ui-border-input);border-color:var(--calcite-ui-foreground-1);inset-block-start:-2px;pointer-events:none;-webkit-margin-start:calc(-1 * 0.125rem);margin-inline-start:calc(-1 * 0.125rem)}.tick--active{background-color:var(--calcite-ui-brand)}.tick__label{pointer-events:none;-webkit-margin-before:0.875rem;margin-block-start:0.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}.graph{color:var(--calcite-ui-foreground-3);block-size:48px}:host([label-ticks][ticks]) .container{-webkit-padding-after:calc(0.875rem + var(--calcite-slider-container-font-size));padding-block-end:calc(0.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{-webkit-padding-after:calc(var(--calcite-slider-full-handle-height) + 1em);padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{-webkit-padding-after:calc(var(--calcite-slider-handle-size) * 0.5 + 1em);padding-block-end:calc(var(--calcite-slider-handle-size) * 0.5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{-webkit-padding-after:var(--calcite-slider-full-handle-height);padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{-webkit-padding-before:var(--calcite-slider-full-handle-height);padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{-webkit-padding-after:var(--calcite-slider-full-handle-height);padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{-webkit-padding-before:calc(var(--calcite-slider-full-handle-height) + 4px);padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{-webkit-padding-before:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px);padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{-webkit-padding-after:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px);padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}';const R=class{constructor(e){i(this,e),this.sketchGraphicsChange=t(this,"sketchGraphicsChange",7),this.active=!1,this.border=!1,this.mapView=void 0,this.pointSymbol=void 0,this.polylineSymbol=void 0,this.polygonSymbol=void 0,this.graphics=[],this._translations=void 0}graphicsWatchHandler(i,t){i&&i.length>0&&JSON.stringify(i)!==JSON.stringify(t)&&this._sketchGraphicsLayer&&(this._sketchGraphicsLayer.removeAll(),this._sketchGraphicsLayer.addMany(i))}mapViewWatchHandler(i,t){i&&i!==t&&this._init()}async clear(){this._clearSketch()}async componentWillLoad(){await this._getTranslations(),await this._initModules()}componentDidLoad(){this._init()}render(){return e(a,null,e("div",{class:this.border?"border":""},e("div",{ref:i=>{this._sketchElement=i}})))}async _initModules(){const[i,t]=await n(["esri/layers/GraphicsLayer","esri/widgets/Sketch"]);this.GraphicsLayer=i,this.Sketch=t}_init(){this.mapView&&this._sketchElement&&(this._initGraphicsLayer(),this._initDrawTools())}_initGraphicsLayer(){const i=this._translations.sketchLayer,t=this.mapView.map.layers.findIndex((t=>t.title===i));t>-1?this._sketchGraphicsLayer=this.mapView.map.layers.getItemAt(t):(this._sketchGraphicsLayer=new this.GraphicsLayer({title:i}),D.managedLayers.push(i),this.mapView.map.layers.add(this._sketchGraphicsLayer)),this.graphics&&this.graphics.length>0&&this._sketchGraphicsLayer.addMany(this.graphics)}_initDrawTools(){this._sketchWidget=new this.Sketch({layer:this._sketchGraphicsLayer,view:this.mapView,container:this._sketchElement,creationMode:"update",defaultCreateOptions:{mode:"hybrid"}}),this.pointSymbol=this._sketchWidget.viewModel.pointSymbol,this.polylineSymbol=this._sketchWidget.viewModel.polylineSymbol,this.polygonSymbol=this._sketchWidget.viewModel.polygonSymbol,this._sketchWidget.visibleElements={selectionTools:{"lasso-selection":!1,"rectangle-selection":!1},createTools:{circle:!1,point:!1}},this._sketchWidget.on("update",(i=>{"start"===i.state&&(this.graphics=i.graphics,this.sketchGraphicsChange.emit(this.graphics)),"active"===i.state&&(clearTimeout(this._selectionTimer),this._selectionTimer=setTimeout((()=>{this.graphics=i.graphics,this.sketchGraphicsChange.emit(this.graphics)}),500))})),this._sketchWidget.on("delete",(()=>{this.graphics=[],this.sketchGraphicsChange.emit(this.graphics)})),this._sketchWidget.on("undo",(i=>{this.graphics=i.graphics,this.sketchGraphicsChange.emit(this.graphics)})),this._sketchWidget.on("redo",(i=>{this.graphics=i.graphics,this.sketchGraphicsChange.emit(this.graphics)}))}_clearSketch(){this.graphics=[],this._sketchGraphicsLayer.removeAll()}async _getTranslations(){const i=await l(this.el);this._translations=i[0]}get el(){return s(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};R.style=":host{display:block}.border{outline:1px solid var(--calcite-ui-border-input)}";const X=class{constructor(e){i(this,e),this.refineSelectionGraphicsChange=t(this,"refineSelectionGraphicsChange",7),this.refineSelectionIdsChange=t(this,"refineSelectionIdsChange",7),this._featuresCollection={},this._redoStack=[],this._undoStack=[],this.active=!1,this.border=!1,this.enabledLayerIds=[],this.graphics=void 0,this.ids=[],this.layerView=void 0,this.layerViews=[],this.mapView=void 0,this.mode=void 0,this.refineMode=void 0,this.useLayerPicker=!0,this._selectEnabled=!1,this._selectionMode=void 0,this._translations=void 0}idsWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._highlightFeatures(i)}async reset(){this.ids=[]}async clearHighlight(){this._clearHighlight()}async componentWillLoad(){await this._getTranslations(),await this._initModules()}componentDidLoad(){this._init()}disconnectedCallback(){this.active=!1}connectedCallback(){this.active=!0,this.ids.length>0&&(this._selectEnabled=!0,this._highlightFeatures(this.ids))}render(){const i=this.border?" border":"";return e(a,null,e("div",null,e("map-layer-picker",{class:this.useLayerPicker?"div-visible":"div-not-visible",enabledLayerIds:this.enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedLayerIds:this.layerViews.map((i=>i.layer.id)),selectionMode:"single"}),e("div",{class:"margin-top-1"+i},e("div",{class:"esri-sketch esri-widget"},e("div",{class:"esri-sketch__panel"},e("div",{class:"esri-sketch__tool-section esri-sketch__section"},e("calcite-action",{disabled:!this._selectEnabled,icon:"select",onClick:()=>this._setSelectionMode(M.POINT),scale:"s",text:this._translations.select})),e("div",{class:"esri-sketch__tool-section esri-sketch__section"},e("calcite-action",{disabled:!this._selectEnabled,icon:"line",onClick:()=>this._setSelectionMode(M.LINE),scale:"s",text:this._translations.selectLine}),e("calcite-action",{disabled:!this._selectEnabled,icon:"polygon",onClick:()=>this._setSelectionMode(M.POLY),scale:"s",text:this._translations.selectPolygon}),e("calcite-action",{disabled:!this._selectEnabled,icon:"rectangle",onClick:()=>this._setSelectionMode(M.RECT),scale:"s",text:this._translations.selectRectangle})),e("div",{class:"esri-sketch__tool-section esri-sketch__section"},e("calcite-action",{disabled:0===this._undoStack.length,icon:"undo",onClick:()=>this._undo(),scale:"s",text:this._translations.undo}),e("calcite-action",{disabled:0===this._redoStack.length,icon:"redo",onClick:()=>this._redo(),scale:"s",text:this._translations.redo})))))))}_init(){this._initGraphicsLayer(),this._initSketchViewModel()}async _initModules(){const[i,t]=await n(["esri/layers/GraphicsLayer","esri/widgets/Sketch/SketchViewModel"]);this.GraphicsLayer=i,this.SketchViewModel=t}_initSketchViewModel(){this._sketchViewModel=new this.SketchViewModel({layer:this._sketchGraphicsLayer,defaultUpdateOptions:{tool:"reshape",toggleToolOnClick:!1},view:this.mapView}),this._sketchViewModel.on("create",(i=>{"complete"===i.state&&this.active&&(this._featuresCollection={},this._sketchGeometry=i.graphic.geometry,this._selectFeatures(this._sketchGeometry))}))}_clear(){this._sketchGeometry=null,this._sketchViewModel.cancel(),this._sketchGraphicsLayer.removeAll()}_initGraphicsLayer(){const i=this._translations.sketchLayer,t=this.mapView.map.layers.findIndex((t=>t.title===i));t>-1?this._sketchGraphicsLayer=this.mapView.map.layers.getItemAt(t):(this._sketchGraphicsLayer=new this.GraphicsLayer({title:i}),D.managedLayers.push(i),this.mapView.map.layers.add(this._sketchGraphicsLayer)),this.graphics&&this.graphics.length>0&&this._sketchGraphicsLayer.addMany(this.graphics)}_initHitTest(){this._hitTestHandle&&this._hitTestHandle.remove(),this._hitTestHandle=this.mapView.on("click",(i=>{i.stopPropagation();const t={include:this.layerViews.map((i=>i.layer))};this.mapView.hitTest(i,t).then((i=>{let t=[];i.results.length>0&&(t=i.results.reduce(((i,t)=>{const e=null==t?void 0:t.graphic;return e&&i.push(e),i}),[])),this.refineSelectionGraphicsChange.emit(t),this._clear()}))}))}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){this._selectEnabled=!0;const t=i.detail.map((i=>S(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i}))}this._selectEnabled=!1}_setSelectionMode(i){switch(this._selectionMode=i,this._hitTestHandle&&this._hitTestHandle.remove(),this._selectionMode){case M.POINT:this._sketchViewModel.create("point");break;case M.LINE:this._sketchViewModel.create("polyline");break;case M.POLY:this._sketchViewModel.create("polygon");break;case M.RECT:this._sketchViewModel.create("rectangle")}}async _selectFeatures(i){const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],H(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{let t=[];if(i.forEach((i=>{Object.keys(i).forEach((e=>{t=t.concat(i[e])}))})),this.refineMode===$.SUBSET)this.refineSelectionGraphicsChange.emit(t);else{const i=Array.isArray(t)?t.map((i=>{var t;return i.attributes[null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.objectIdField]})):[];await this._updateIds(i,this.mode,this._undoStack,this.mode)}this._clear()}))}async _highlightFeatures(i,t=!1){this._clearHighlight(),i.length>0&&(D.highlightHandle=await I(i,this.layerViews[0],this.mapView,t))}_clearHighlight(){var i;null===(i=D.highlightHandle)||void 0===i||i.remove()}async _updateIds(i,t,e,a){const s={addIds:[],removeIds:[]};t===C.ADD?(s.addIds=i.filter((i=>this.ids.indexOf(i)<0)),this.ids=[...this.ids,...s.addIds],e.push({mode:a,ids:s.addIds})):(s.removeIds=i.filter((i=>this.ids.indexOf(i)>-1)),this.ids=this.ids.filter((i=>s.removeIds.indexOf(i)<0)),e.push({mode:a,ids:s.removeIds})),await this._highlightFeatures(this.ids).then((()=>{this.refineSelectionIdsChange.emit(s)}))}_undo(){const i=this._undoStack.pop();this._updateIds(i.ids,i.mode===C.ADD?C.REMOVE:C.ADD,this._redoStack,i.mode)}_redo(){const i=this._redoStack.pop();this._updateIds(i.ids,i.mode,this._undoStack,i.mode)}async _getTranslations(){const i=await l(this.el);this._translations=i[0]}get el(){return s(this)}static get watchers(){return{ids:["idsWatchHandler"]}}};X.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-ui-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}';export{L as buffer_tools,A as calcite_radio_group,T as calcite_radio_group_item,P as calcite_slider,R as map_draw_tools,X as refine_selection_tools}
@@ -1,11 +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 a,g as i,f as n}from"./p-c023e6a1.js";import{g as e}from"./p-a80b3880.js";import{c as r}from"./p-9a9955db.js";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */function c(t,a,i){const n=a[0]-t[0];return n?(3*(a[1]-t[1])/n-i)/2:i}function o(t,a,i,n,e){const[r,c]=t,[o,l]=a,s=(o-r)/3;return`C ${e([r+s,c+s*i]).join(",")} ${e([o-s,l-s*n]).join(",")} ${e([o,l]).join(",")}`}const l=class{constructor(a){t(this,a),this.data=[],this.graphId=`calcite-graph-${e()}`,this.resizeObserver=r("resize",(()=>n(this)))}connectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.observe(this.el)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}render(){const{data:t,colorStops:i,el:n,highlightMax:e,highlightMin:r,min:l,max:s}=this,h=this.graphId,{clientHeight:m,clientWidth:d}=n;if(!t||0===t.length)return a("svg",{class:"svg",height:m,preserveAspectRatio:"none",viewBox:`0 0 ${d} ${m}`,width:d});const{min:p,max:f}=function(t){const[a,i]=t[0];return t.reduce((({min:t,max:a},[i,n])=>({min:[Math.min(t[0],i),Math.min(t[1],n)],max:[Math.max(a[0],i),Math.max(a[1],n)]})),{min:[a,i],max:[a,i]})}(t);let u=p,$=f;(l<p[0]||l>p[0])&&(u=[l,0]),(s>f[0]||s<f[0])&&($=[s,f[1]]);const g=function({width:t,height:a,min:i,max:n}){const e=n[0]-i[0],r=n[1]-i[1];return n=>[(n[0]-i[0])/e*t,a-n[1]/r*a]}({min:u,max:$,width:d,height:m}),[v]=g([r,$[1]]),[y]=g([e,$[1]]),x=function({data:t,min:a,max:i,t:n}){if(0===t.length)return"";const[e,r]=n(t[0]),[l,s]=n(a),[h]=n(i);let m,d,p;const f=t.reduce(((a,i,e)=>{if(d=t[e-2],p=t[e-1],e>1){const t=function(t,a,i){const n=a[0]-t[0],e=i[0]-a[0],r=(a[1]-t[1])/(n||e<0&&0),c=(i[1]-a[1])/(e||n<0&&0),o=(r*e+c*n)/(n+e);return(Math.sign(r)+Math.sign(c))*Math.min(Math.abs(r),Math.abs(c),.5*Math.abs(o))||0}(d,p,i),e=void 0===m?c(d,p,t):m,r=o(d,p,e,t,n);return m=t,`${a} ${r}`}return a}),`M ${l},${s} L ${l},${r} L ${e},${r}`),u=t[t.length-1];return`${f} ${o(p,u,m,c(p,u,m),n)} L ${h},${s} Z`}({data:t,min:p,max:f,t:g}),k=i?`url(#linear-gradient-${h})`:void 0;return a("svg",{class:"svg",height:m,preserveAspectRatio:"none",viewBox:`0 0 ${d} ${m}`,width:d},i?a("defs",null,a("linearGradient",{id:`linear-gradient-${h}`,x1:"0",x2:"1",y1:"0",y2:"0"},i.map((({offset:t,color:i,opacity:n})=>a("stop",{offset:100*t+"%","stop-color":i,"stop-opacity":n}))))):null,void 0!==r?[a("mask",{height:"100%",id:`${h}1`,width:"100%",x:"0%",y:"0%"},a("path",{d:`\n M 0,0\n L ${v-1},0\n L ${v-1},${m}\n L 0,${m}\n Z\n `,fill:"white"})),a("mask",{height:"100%",id:`${h}2`,width:"100%",x:"0%",y:"0%"},a("path",{d:`\n M ${v+1},0\n L ${y-1},0\n L ${y-1},${m}\n L ${v+1}, ${m}\n Z\n `,fill:"white"})),a("mask",{height:"100%",id:`${h}3`,width:"100%",x:"0%",y:"0%"},a("path",{d:`\n M ${y+1},0\n L ${d},0\n L ${d},${m}\n L ${y+1}, ${m}\n Z\n `,fill:"white"})),a("path",{class:"graph-path",d:x,fill:k,mask:`url(#${h}1)`}),a("path",{class:"graph-path--highlight",d:x,fill:k,mask:`url(#${h}2)`}),a("path",{class:"graph-path",d:x,fill:k,mask:`url(#${h}3)`})]:a("path",{class:"graph-path",d:x,fill:k}))}get el(){return i(this)}};l.style="@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{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0px;display:block;block-size:100%;inline-size:100%;padding:0px}.svg .graph-path--highlight{fill:var(--calcite-ui-brand);opacity:0.5}";export{l as calcite_graph}
@@ -1,11 +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 i,h as a,g as t}from"./p-c023e6a1.js";import{h as e,i as n}from"./p-991ee695.js";import{e as r}from"./p-83166522.js";import"./p-729708a3.js";import"./p-a80b3880.js";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */const c=class{constructor(a){i(this,a),this.scale="m",this.thumbnailFailedToLoad=!1}render(){return this.determineContent()}determineContent(){if(this.thumbnail&&!this.thumbnailFailedToLoad)return a("img",{alt:"",class:"thumbnail",onError:()=>this.thumbnailFailedToLoad=!0,src:this.thumbnail});const i=this.generateInitials(),t=this.generateFillColor();return a("span",{class:"background",style:{backgroundColor:t}},i?a("span",{"aria-hidden":"true",class:"initials"},i):a("calcite-icon",{class:"icon",icon:"user",scale:this.scale}))}generateFillColor(){const{userId:i,username:a,fullName:t,el:c}=this,o=r(c),s=i&&`#${i.substr(i.length-6)}`,l=a||t||"",m=s&&n(s)?s:function(i){let a=0;for(let t=0;t<i.length;t++)a=i.charCodeAt(t)+((a<<5)-a);let t="#";for(let i=0;i<3;i++)t+=("00"+(a>>8*i&255).toString(16)).substr(-2);return t}(l);return(i||l)&&n(m)?`hsl(${function(i){return function(i){let{r:a,g:t,b:e}=i;a/=255,t/=255,e/=255;const n=Math.max(a,t,e),r=Math.min(a,t,e),c=n-r;if(n===r)return 0;let o=(n+r)/2;switch(n){case a:o=(t-e)/c+(t<e?6:0);break;case t:o=(e-a)/c+2;break;case e:o=(a-t)/c+4}return Math.round(60*o)}(e(i))}(m)}, 60%, ${"dark"===o?20:90}%)`:"var(--calcite-ui-foreground-2)"}generateInitials(){const{fullName:i,username:a}=this;return i?i.trim().split(" ").map((i=>i.substring(0,1))).join(""):!!a&&a.substring(0,2)}get el(){return t(this)}};c.style="@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{display:inline-block;overflow:hidden;border-radius:50%}:host([scale=s]){block-size:1.5rem;inline-size:1.5rem;font-size:var(--calcite-font-size--3)}:host([scale=m]){block-size:2rem;inline-size:2rem;font-size:var(--calcite-font-size--2)}:host([scale=l]){block-size:2.75rem;inline-size:2.75rem;font-size:var(--calcite-font-size-0)}.icon{display:flex}.background{display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;border-radius:50%}.initials{font-weight:var(--calcite-font-weight-bold);text-transform:uppercase;color:var(--calcite-ui-text-3)}.thumbnail{block-size:100%;inline-size:100%;border-radius:50%}";export{c as calcite_avatar}
@@ -1,11 +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,h as a,H as e,g as o}from"./p-c023e6a1.js";import{g as s}from"./p-a80b3880.js";import{b as n,f as r,t as c}from"./p-83166522.js";import{c as d,d as l,g as h}from"./p-bd67334c.js";import{c as u,d as m,H as p}from"./p-316f56db.js";import{g as f}from"./p-e947d3b0.js";import{u as b}from"./p-7daea1df.js";import"./p-729708a3.js";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */const v=class{constructor(a){t(this,a),this.calciteInternalRadioButtonBlur=i(this,"calciteInternalRadioButtonBlur",6),this.calciteRadioButtonChange=i(this,"calciteRadioButtonChange",6),this.calciteInternalRadioButtonCheckedChange=i(this,"calciteInternalRadioButtonCheckedChange",6),this.calciteInternalRadioButtonFocus=i(this,"calciteInternalRadioButtonFocus",6),this.checked=!1,this.disabled=!1,this.focused=!1,this.hidden=!1,this.hovered=!1,this.required=!1,this.scale="m",this.selectItem=(t,i)=>{t[i].click()},this.queryButtons=()=>Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter((t=>t.name===this.name)),this.isDefaultSelectable=()=>{const t=this.queryButtons();return!t.some((t=>t.checked))&&t[0]===this.el},this.check=()=>{this.disabled||(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.focused=!0,this.calciteRadioButtonChange.emit(),this.setFocus())},this.clickHandler=()=>{this.check()},this.setContainerEl=t=>{this.containerEl=t},this.handleKeyDown=t=>{const{key:i}=t,{el:a}=this;if(-1===["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(i))return;if(" "===i)return this.check(),void t.preventDefault();let e=i;"rtl"===n(a)&&("ArrowRight"===i&&(e="ArrowLeft"),"ArrowLeft"===i&&(e="ArrowRight"));const o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden]")).filter((t=>t.name===this.name));let s=0;const r=o.length;switch(o.some(((t,i)=>{if(t.checked)return s=i,!0})),e){case"ArrowLeft":case"ArrowUp":return t.preventDefault(),void this.selectItem(o,f(Math.max(s-1,-1),r));case"ArrowRight":case"ArrowDown":return t.preventDefault(),void this.selectItem(o,f(s+1,r));default:return}},this.onContainerBlur=()=>{this.focused=!1,this.calciteInternalRadioButtonBlur.emit()},this.onContainerFocus=()=>{this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}}checkedChanged(t){t&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}nameChanged(){this.checkLastRadioButton()}async setFocus(){this.disabled||r(this.containerEl)}onLabelClick(t){if(!this.disabled&&!this.hidden){this.uncheckOtherRadioButtonsInGroup();const i=t.currentTarget,a=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);a&&(a.checked=!0,a.focused=!0),this.calciteRadioButtonChange.emit(),this.setFocus()}}checkLastRadioButton(){const t=this.queryButtons().filter((t=>t.checked));if((null==t?void 0:t.length)>1){const i=t[t.length-1];t.filter((t=>t!==i)).forEach((t=>{t.checked=!1,t.emitCheckedChange()}))}}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach((t=>{t.checked&&(t.checked=!1,t.focused=!1)}))}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter((t=>t.guid!==this.guid)).forEach((t=>{t.checked&&(t.checked=!1,t.focused=!1)}))}getTabIndex(){if(!this.disabled)return this.checked||this.isDefaultSelectable()?0:-1}mouseenter(){this.hovered=!0}mouseleave(){this.hovered=!1}connectedCallback(){this.rootNode=this.el.getRootNode(),this.guid=this.el.id||`calcite-radio-button-${s()}`,this.name&&this.checkLastRadioButton(),d(this),u(this)}componentDidLoad(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){l(this),m(this)}componentDidRender(){b(this)}render(){const t=this.getTabIndex();return a(e,{onClick:this.clickHandler,onKeyDown:this.handleKeyDown},a("div",{"aria-checked":c(this.checked),"aria-label":h(this),class:"container",onBlur:this.onContainerBlur,onFocus:this.onContainerFocus,ref:this.setContainerEl,role:"radio",tabIndex:t},a("div",{class:"radio"})),a(p,{component:this}))}get el(){return o(this)}static get watchers(){return{checked:["checkedChanged"],name:["nameChanged"]}}};v.style='@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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px}:host .radio{cursor:pointer;border-radius:9999px;background-color:var(--calcite-ui-foreground-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([focused]) .radio{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([scale=s]){--calcite-radio-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-radio-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-radio-size:var(--calcite-font-size-0)}.radio{block-size:var(--calcite-radio-size);max-inline-size:var(--calcite-radio-size);min-inline-size:var(--calcite-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand)}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand)}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand)}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host([checked]) .radio::after,:host([checked][disabled]) .radio::after{content:"";inline-size:var(--calcite-radio-size);block-size:var(--calcite-radio-size);background-color:windowText;display:block}}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}';export{v as calcite_radio_button}
@@ -1,12 +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 i,c as t,h as e,H as s,g as a}from"./p-c023e6a1.js";import{f as n}from"./p-d48a24e6.js";import{d as o,f as c,c as l,u as r,r as h,a as d,F as m}from"./p-cdc46c0c.js";import{g as p}from"./p-a80b3880.js";import{T as u,C as b,b as g,c as f,h as v,d as x,e as y,g as w,a as k}from"./p-a5b1ab03.js";import{c as C,d as z,g as I}from"./p-bd67334c.js";import{s as $,c as H,a as _,d as D,H as j}from"./p-316f56db.js";import{c as L}from"./p-9a9955db.js";import{u as A}from"./p-7daea1df.js";import{i as E,t as S,g as P,a as F}from"./p-83166522.js";import{c as T,d as B}from"./p-2e9ed892.js";import{d as M}from"./p-4e32bf8c.js";import{c as O,d as R}from"./p-ea534300.js";import{i as W,j as U}from"./p-3fa9b3c8.js";import{s as V}from"./p-9c1ebc90.js";import"./p-729708a3.js";import"./p-be41429f.js";import"./p-4307dacd.js";const X="combobox-item-",Y="combobox-chip-",G="combobox-label-",K="combobox-listbox-",N="combobox-input-",q=class{constructor(e){i(this,e),this.calciteLookupChange=t(this,"calciteLookupChange",6),this.calciteComboboxChange=t(this,"calciteComboboxChange",6),this.calciteComboboxFilterChange=t(this,"calciteComboboxFilterChange",6),this.calciteComboboxChipDismiss=t(this,"calciteComboboxChipDismiss",6),this.calciteComboboxBeforeClose=t(this,"calciteComboboxBeforeClose",6),this.calciteComboboxClose=t(this,"calciteComboboxClose",6),this.calciteComboboxBeforeOpen=t(this,"calciteComboboxBeforeOpen",6),this.calciteComboboxOpen=t(this,"calciteComboboxOpen",6),this.active=!1,this.open=!1,this.disabled=!1,this.maxItems=0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multi",this.scale="m",this.value=null,this.intlRemoveTag=u.removeTag,this.placement=o,this.internalValueChangeFlag=!1,this.items=[],this.groupItems=[],this.selectedItems=[],this.visibleItems=[],this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.text="",this.textInput=null,this.mutationObserver=L("mutation",(()=>this.updateItems())),this.resizeObserver=L("resize",(()=>this.setMaxScrollerHeight())),this.guid=p(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:i,flipPlacements:t}=this;this.filteredFlipPlacements=t?c(t,i):null},this.getValue=()=>{const i=this.selectedItems.map((i=>{var t;return null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.toString()}));return(null==i?void 0:i.length)?i.length>1?i:i[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keydownHandler=i=>{const{key:t}=i;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):this.open&&(this.open=!1,i.preventDefault());break;case"ArrowLeft":this.previousChip(),i.preventDefault();break;case"ArrowRight":this.nextChip(),i.preventDefault();break;case"ArrowUp":i.preventDefault(),this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView();break;case"ArrowDown":i.preventDefault(),this.open||(this.open=!0),this.shiftActiveItemIndex(1),this.comboboxInViewport()||this.el.scrollIntoView();break;case" ":this.textInput.value||(i.preventDefault(),this.open=!0,this.shiftActiveItemIndex(1));break;case"Home":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(this.visibleItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":this.open=!1,i.preventDefault();break;case"Enter":this.activeItemIndex>-1?(this.toggleSelection(this.visibleItems[this.activeItemIndex]),i.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),i.preventDefault()):this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):i.defaultPrevented||$(this)&&i.preventDefault();break;case"Delete":case"Backspace":this.activeChipIndex>-1?(i.preventDefault(),this.removeActiveChip()):!this.text&&this.isMulti()&&(i.preventDefault(),this.removeLastChip())}},this.toggleCloseEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxClose",this.toggleCloseEnd)},this.toggleOpenEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxOpen",this.toggleOpenEnd)},this.setMaxScrollerHeight=async()=>{const{listContainerEl:i,open:t,referenceEl:e}=this;if(!i||!t)return;await this.reposition(!0);const s=this.getMaxScrollerHeight();i.style.maxHeight=s>0?`${s}px`:"",i.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipDismissHandler=(i,t)=>{this.open=!1;const e=this.items.find((i=>i===t));e&&this.toggleSelection(e,!1),this.calciteComboboxChipDismiss.emit(i.detail)},this.clickHandler=i=>{i.composedPath().some((i=>"CALCITE-CHIP"===i.tagName))||(this.open=!this.open,this.updateActiveItemIndex(0),this.setFocus())},this.setInactiveIfNotContained=i=>{const t=i.composedPath();!this.open||t.includes(this.el)||t.includes(this.referenceEl)||(this.allowCustomValues&&this.text.trim().length&&this.addCustomChip(this.text),"single"===this.selectionMode&&(this.textInput&&(this.textInput.value=""),this.text="",this.filterItems(""),this.updateActiveItemIndex(-1)),this.open=!1)},this.setFloatingEl=i=>{this.floatingEl=i,l(this,this.referenceEl,this.floatingEl)},this.setContainerEl=i=>{this.resizeObserver.observe(i),this.listContainerEl=i,this.transitionEl=i,T(this)},this.setReferenceEl=i=>{this.referenceEl=i,l(this,this.referenceEl,this.floatingEl)},this.inputHandler=i=>{const t=i.target.value;this.text=t,this.filterItems(t),t&&(this.activeChipIndex=-1)},this.filterItems=(()=>{const i=(i,t)=>i&&t.some((({label:t,value:e})=>i.tagName===y?e===i.label:e===i.textLabel||e===i.value||t===i.textLabel||t===i.value));return M((t=>{const e=n(this.data,t);this.getCombinedItems().forEach((t=>{const s=!i(t,e);t.hidden=s;const[a,n]=t.ancestors;(i(a,e)||i(n,e))&&(t.hidden=!1),s||t.ancestors.forEach((i=>i.hidden=!1))})),this.visibleItems=this.getVisibleItems(),this.calciteComboboxFilterChange.emit({visibleItems:[...this.visibleItems],text:t})}),100)})(),this.internalCalciteLookupChangeEvent=()=>{this.calciteLookupChange.emit(this.selectedItems)},this.emitCalciteLookupChange=M(this.internalCalciteLookupChangeEvent,0),this.internalComboboxChangeEvent=()=>{const{selectedItems:i}=this;this.calciteComboboxChange.emit({selectedItems:i})},this.emitComboboxChange=M(this.internalComboboxChangeEvent,0),this.updateItems=()=>{this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.selectedItems=this.getSelectedItems(),this.visibleItems=this.getVisibleItems(),this.needsIcon=this.getNeedsIcon(),this.allowCustomValues||this.setMaxScrollerHeight()},this.scrollToActiveItem=()=>{const i=this.visibleItems[this.activeItemIndex],t=this.calculateSingleItemHeight(i),{offsetHeight:e,scrollTop:s}=this.listContainerEl;e+s<i.offsetTop+t?this.listContainerEl.scrollTop=i.offsetTop-e+t:i.offsetTop<s&&(this.listContainerEl.scrollTop=i.offsetTop)},this.comboboxFocusHandler=()=>{var i;null===(i=this.textInput)||void 0===i||i.focus()},this.comboboxBlurHandler=i=>{this.setInactiveIfNotContained(i)}}activeHandler(i){if(this.disabled)return this.active=!1,void(this.open=!1);this.open=i}openHandler(i){if(i||r(this.floatingEl),this.disabled)return this.active=!1,void(this.open=!1);this.active=i,this.setMaxScrollerHeight()}handleDisabledChange(i){i||(this.active=!1,this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}valueHandler(i){if(!this.internalValueChangeFlag){const t=this.getItems();Array.isArray(i)?t.forEach((t=>t.selected=i.includes(t.value))):t.forEach(i?t=>t.selected=i===t.value:i=>i.selected=!1),this.updateItems()}}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}documentClickHandler(i){E(i)&&this.setInactiveIfNotContained(i)}calciteComboboxItemChangeHandler(i){if(this.ignoreSelectedEventsFlag)return;const t=i.target,e=this.visibleItems.indexOf(t);this.updateActiveItemIndex(e),this.toggleSelection(t,t.selected)}async reposition(i=!1){const{floatingEl:t,referenceEl:e,placement:s,overlayPositioning:a,filteredFlipPlacements:n}=this;return h(this,{floatingEl:t,referenceEl:e,overlayPositioning:a,placement:s,flipPlacements:n,type:"menu"},i)}async setFocus(){var i;null===(i=this.textInput)||void 0===i||i.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){var i;this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,null===(i=this.mutationObserver)||void 0===i||i.observe(this.el,{childList:!0,subtree:!0}),C(this),H(this),T(this),this.setFilteredPlacements(),this.reposition(!0),this.active&&this.activeHandler(this.active),this.open&&this.openHandler(this.open)}componentWillLoad(){this.updateItems()}componentDidLoad(){_(this,this.getValue()),this.reposition(!0)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),A(this)}disconnectedCallback(){var i,t;null===(i=this.mutationObserver)||void 0===i||i.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),z(this),D(this),d(this,this.referenceEl,this.floatingEl),B(this)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}textHandler(){this.updateActiveItemIndex(-1)}comboboxInViewport(){const i=this.el.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.right<=(window.innerWidth||document.documentElement.clientWidth)&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onBeforeOpen(){this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit()}getMaxScrollerHeight(){const i=this.getCombinedItems().filter((i=>!i.hidden)),{maxItems:t}=this;let e=0,s=0;return i.length>t&&i.forEach((i=>{if(e<t&&t>0){const t=this.calculateSingleItemHeight(i);t>0&&(s+=t,e++)}})),s}calculateSingleItemHeight(i){let t=i.offsetHeight;return Array.from(i.querySelectorAll(b)).map((i=>null==i?void 0:i.offsetHeight)).forEach((i=>{t-=i})),t}getCombinedItems(){return[...this.groupItems,...this.items]}toggleSelection(i,t=!i.selected){i&&(this.isMulti()?(i.selected=t,this.updateAncestors(i),this.selectedItems=this.getSelectedItems(),this.emitCalciteLookupChange(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===i&&t)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=i.textLabel),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(i){if("ancestors"!==this.selectionMode)return;const t=g(i),e=f(i);i.selected?t.forEach((i=>{i.selected=!0})):(e.forEach((i=>i.selected=!1)),[...t].forEach((i=>{v(i)||(i.selected=!1)})))}getVisibleItems(){return this.items.filter((i=>!i.hidden))}getSelectedItems(){if(!this.isMulti()){const i=this.items.find((({selected:i})=>i));return i?[i]:[]}return this.items.filter((i=>i.selected&&("ancestors"!==this.selectionMode||!v(i)))).sort(((i,t)=>{const e=this.selectedItems.indexOf(i),s=this.selectedItems.indexOf(t);return e>-1&&s>-1?e-s:s-e}))}getData(){return this.items.map((i=>({constant:i.constant,filterDisabled:i.filterDisabled,value:i.value,label:i.textLabel})))}getNeedsIcon(){return"single"===this.selectionMode&&this.items.some((i=>i.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.text=""}getItems(){return Array.from(this.el.querySelectorAll(x)).filter((i=>!i.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(y))}addCustomChip(i,t){const e=this.items.find((t=>t.textLabel===i));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement(x);e.value=i,e.textLabel=i,e.selected=!0,this.el.appendChild(e),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.emitCalciteLookupChange(),this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){if(this.text)return;const i=this.activeChipIndex;this.activeChipIndex=-1===i?this.selectedItems.length-1:Math.max(i-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){if(this.text||-1===this.activeChipIndex)return;const i=this.activeChipIndex+1;i>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=i,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){var i;const t=null===(i=this.selectedItems[this.activeChipIndex])||void 0===i?void 0:i.guid,e=t?this.referenceEl.querySelector(`#${Y}${t}`):null;null==e||e.setFocus()}shiftActiveItemIndex(i){const{length:t}=this.visibleItems;this.updateActiveItemIndex((this.activeItemIndex+t+i)%t),this.scrollToActiveItem()}updateActiveItemIndex(i){var t;this.activeItemIndex=i;let e=null;this.visibleItems.forEach(((t,s)=>{s===i?(t.active=!0,e=`${X}${t.guid}`):t.active=!1})),this.activeDescendant=e,this.activeItemIndex>-1&&(this.activeChipIndex=-1,null===(t=this.textInput)||void 0===t||t.focus())}isMulti(){return"single"!==this.selectionMode}renderChips(){const{activeChipIndex:i,scale:t,selectionMode:s,intlRemoveTag:a}=this;return this.selectedItems.map(((n,o)=>{const c={chip:!0,"chip--active":i===o},l=[...[...g(n)].reverse(),n].map((i=>i.textLabel)),r="ancestors"!==s?n.textLabel:l.join(" / ");return e("calcite-chip",{class:c,dismissLabel:a,dismissible:!0,icon:n.icon,id:n.guid?`${Y}${n.guid}`:null,key:n.textLabel,onCalciteChipDismiss:i=>this.calciteChipDismissHandler(i,n),scale:t,title:r,value:n.value},r)}))}renderInput(){const{guid:i,active:t,disabled:s,placeholder:a,selectionMode:n,selectedItems:o,open:c}=this,l="single"===n,r=o[0],h=!(c||t)&&l&&!!r;return e("span",{class:{"input-wrap":!0,"input-wrap--single":l}},h&&e("span",{class:{label:!0,"label--icon":!!(null==r?void 0:r.icon)},key:"label"},r.textLabel),e("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`${K}${i}`,"aria-label":I(this),class:{input:!0,"input--single":!0,"input--transparent":this.activeChipIndex>-1,"input--hidden":h,"input--icon":!!this.placeholderIcon},disabled:s,id:`${N}${i}`,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:a,ref:i=>this.textInput=i,type:"text"}))}renderListBoxOptions(){return this.visibleItems.map((i=>e("li",{"aria-selected":S(i.selected),id:i.guid?`${X}${i.guid}`:null,role:"option",tabindex:"-1"},i.textLabel)))}renderFloatingUIContainer(){const{active:i,setFloatingEl:t,setContainerEl:s,open:a}=this;return e("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":a||i},ref:t},e("div",{class:{"list-container":!0,[m.animation]:!0,[m.animationActive]:a||i},ref:s},e("ul",{class:{list:!0,"list--hide":!(a||i)}},e("slot",null))))}renderIconStart(){const{selectedItems:i,placeholderIcon:t,selectionMode:s}=this,a=i[0],n=null==a?void 0:a.icon,o="single"===s;return(!this.open&&a?!!n&&o:!!this.placeholderIcon&&(!a||o))&&e("span",{class:"icon-start"},e("calcite-icon",{class:"selected-icon",icon:!this.open&&a?n:t,scale:"s"}))}renderIconEnd(){const{active:i,open:t}=this;return e("span",{class:"icon-end"},e("calcite-icon",{icon:i||t?"chevron-up":"chevron-down",scale:"s"}))}render(){const{active:i,guid:t,label:a,open:n}=this,o="single"===this.selectionMode;return e(s,null,e("div",{"aria-autocomplete":"list","aria-controls":`${K}${t}`,"aria-expanded":S(n||i),"aria-haspopup":"listbox","aria-labelledby":`${G}${t}`,"aria-live":"polite","aria-owns":`${K}${t}`,class:{wrapper:!0,"wrapper--single":o||!this.selectedItems.length,"wrapper--active":n||i},onClick:this.clickHandler,onKeyDown:this.keydownHandler,ref:this.setReferenceEl,role:"combobox"},e("div",{class:"grid-input"},this.renderIconStart(),!o&&this.renderChips(),e("label",{class:"screen-readers-only",htmlFor:`${N}${t}`,id:`${G}${t}`},a),this.renderInput()),this.renderIconEnd()),e("ul",{"aria-labelledby":`${G}${t}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`${K}${t}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),e(j,{component:this}))}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],value:["valueHandler"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"]}}};q.style="@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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-inline-size:120px;-webkit-margin-after:var(--calcite-combobox-item-spacing-unit-s);margin-block-end:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-block:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:flex;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;inline-size:1rem;cursor:pointer;align-items:center}.icon-end{flex:none}.floating-ui-container{display:block;position:absolute;z-index:900;visibility:hidden;pointer-events:none;inline-size:0;block-size:0;overflow:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}.floating-ui-container--active{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-inline-size:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.item{display:block}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */
12
- const J="icon",Q=class{constructor(e){i(this,e),this.calciteComboboxItemChange=t(this,"calciteComboboxItemChange",6),this.disabled=!1,this.selected=!1,this.active=!1,this.guid=p(),this.scale="m",this.itemClickHandler=i=>{i.preventDefault(),this.disabled||(this.selected=!this.selected)}}selectedWatchHandler(){this.calciteComboboxItemChange.emit(this.el)}connectedCallback(){this.ancestors=w(this.el),this.scale=P(this.el,"scale",this.scale),O(this)}disconnectedCallback(){R(this)}componentDidRender(){A(this)}async toggleSelected(i){this.disabled||(this.selected="boolean"==typeof i?i:!this.selected)}renderIcon(i){const{icon:t,disabled:s,selected:a}=this,n=`${J}--indent`;return!i||t||s?e("calcite-icon",{class:{[J]:!t,"icon--custom":!!t,"icon--active":t&&a,[n]:!0},icon:t||(s?"circle-disallowed":i?"dot":"check"),scale:"s"}):e("span",{class:{[J]:!0,"icon--dot":!0,[n]:!0}})}renderChildren(){return F(this.el)?e("ul",{key:"default-slot-container"},e("slot",null)):null}render(){const i="single"===P(this.el,"selection-mode","multi"),t={label:!0,"label--selected":this.selected,"label--active":this.active,"label--single":i},a=k(this.el);return e(s,{"aria-hidden":"true"},e("div",{class:`container scale--${this.scale}`,style:{"--calcite-combobox-item-spacing-indent-multiplier":`${a}`}},e("li",{class:t,id:this.guid,onClick:this.itemClickHandler},this.renderIcon(i),e("span",{class:"title"},this.textLabel)),this.renderChildren()))}get el(){return a(this)}static get watchers(){return{selected:["selectedWatchHandler"]}}};Q.style='@charset "UTF-8";@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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host,ul{margin:0px;display:flex;flex-direction:column;padding:0px}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-color:transparent;padding-block:var(--calcite-combobox-item-spacing-unit-s);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.title{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon{display:inline-flex;opacity:0;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{-webkit-padding-start:var(--calcite-combobox-item-indent-value);padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{-webkit-margin-before:-1px;margin-block-start:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:flex;justify-content:flex-end;min-inline-size:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{text-align:start;content:"•"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';const Z=class{constructor(e){i(this,e),this.layerSelectionChange=t(this,"layerSelectionChange",7),this.enabledLayerIds=[],this.mapView=void 0,this.selectedLayerIds=[],this.selectionMode="single",this.layerIds=[]}async watchStateHandler(i,t){i!==t&&(await this._setLayers(),"single"===this.selectionMode&&this.layerSelectionChange.emit([this.layerIds[0]]))}async componentWillLoad(){await this._setLayers(),"single"===this.selectionMode&&(this.layerIds.length>0||1===this.selectedLayerIds.length)&&this.layerSelectionChange.emit(1===this.selectedLayerIds.length?[this.selectedLayerIds[0]]:[this.layerIds[0]])}render(){return e(s,null,e("div",{class:"map-layer-picker-container"},e("div",{class:"map-layer-picker"},"multi"===this.selectionMode?this._getCombobox():this._getSelect())))}_getSelect(){return e("calcite-select",{label:"",onCalciteSelectChange:i=>this._layerSelectionChange(i),ref:i=>{this._layerElement=i}},this._addMapLayersOptions())}_getCombobox(){return e("calcite-combobox",{label:"",onCalciteComboboxChange:i=>this._layerSelectionChange(i),"selection-mode":this.selectionMode},this._addMapLayersOptions())}_addMapLayersOptions(){return this.layerIds.reduce(((i,t)=>(V.managedLayers.indexOf(V.layerNameHash[t])<0&&(!(this.enabledLayerIds.length>0)||this.enabledLayerIds.indexOf(t)>-1)&&i.push("multi"===this.selectionMode&&this.selectedLayerIds.indexOf(t)>-1?e("calcite-combobox-item",{selected:!0,textLabel:V.layerNameHash[t],value:t}):"multi"===this.selectionMode?e("calcite-combobox-item",{textLabel:V.layerNameHash[t],value:t}):this.selectedLayerIds.indexOf(t)>-1?e("calcite-option",{label:V.layerNameHash[t],selected:!0,value:t}):e("calcite-option",{label:V.layerNameHash[t],value:t})),i)),[])}async _setLayers(){if(this.mapView){const i=await W(this.mapView);this.layerIds=i.filter((i=>{var t;return!((null===(t=this.enabledLayerIds)||void 0===t?void 0:t.length)>0)||this.enabledLayerIds.indexOf(i)>-1})),await this._initLayerHashState()}}async _initLayerHashState(){this.mapView&&(V.layerNameHash=await U(this.mapView))}_layerSelectionChange(i){var t;this.selectedLayerIds="single"===this.selectionMode?[this._layerElement.value]:(null===(t=i.detail)||void 0===t?void 0:t.selectedItems.map((i=>i.value)))||[],this.layerSelectionChange.emit(this.selectedLayerIds)}get el(){return a(this)}static get watchers(){return{mapView:["watchStateHandler"]}}};Z.style=":host{display:block}.map-layer-picker-container{width:100%}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}";export{q as calcite_combobox,Q as calcite_combobox_item,Z 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 s,h as t,H as r,g as l}from"./p-c023e6a1.js";const a=class{constructor(t){s(this,t)}render(){return t(r,null,t("slot",null))}async _getTranslations(){}get el(){return l(this)}};a.style=":host{display:block}";export{a as list_item}
@@ -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 s,h as r,H as t,g as a}from"./p-c023e6a1.js";const o=class{constructor(r){s(this,r)}render(){return r(t,null,r("slot",null))}async _getTranslations(){}get el(){return a(this)}};o.style=":host{display:block}";export{o as crowdsource_manager}
@@ -1,11 +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,h as a,g as n}from"./p-c023e6a1.js";import{n as e,i as s,a as r,r as o,b as c}from"./p-991ee695.js";import{c as l}from"./p-93d3119d.js";import{f as m}from"./p-83166522.js";import{T as h}from"./p-374a5031.js";import"./p-3b010ce1.js";import"./p-729708a3.js";import"./p-a80b3880.js";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */const p=l(),u=class{constructor(a){t(this,a),this.calciteColorPickerHexInputChange=i(this,"calciteColorPickerHexInputChange",6),this.allowEmpty=!1,this.intlHex=h.hex,this.intlNoColor=h.noColor,this.scale="m",this.value=e(p.hex()),this.onCalciteInternalInputBlur=()=>{const t=this.inputNode,i=t.value,a=`#${i}`;this.allowEmpty&&!i||s(a)&&r(a)||(t.value=this.allowEmpty&&!this.internalColor?"":this.formatForInternalInput(o(this.internalColor.object())))},this.onInputChange=()=>{this.internalSetValue(this.inputNode.value,this.value)},this.internalColor=p,this.previousNonNullValue=this.value,this.storeInputRef=t=>{this.inputNode=t}}connectedCallback(){const{allowEmpty:t,value:i}=this;if(i){const t=e(i);s(t)&&this.internalSetValue(t,t,!1)}else t&&this.internalSetValue(null,null,!1)}handleValueChange(t,i){this.internalSetValue(t,i,!1)}onInputKeyDown(t){const{altKey:i,ctrlKey:a,metaKey:n,shiftKey:s}=t,{internalColor:r,value:o}=this,{key:l}=t;if("Tab"===l||"Enter"===l)return void this.onInputChange();const m=this.value;if("ArrowDown"===l||"ArrowUp"===l)return o?(this.internalSetValue(e(this.nudgeRGBChannels(r,(s?10:1)*("ArrowUp"===l?1:-1)).hex()),m),void t.preventDefault()):(this.internalSetValue(this.previousNonNullValue,m),void t.preventDefault());const h=i||a||n,p=1===l.length,u=c.test(l);!p||h||u||t.preventDefault()}onPaste(t){const i=t.clipboardData.getData("text");s(i)&&(t.preventDefault(),this.inputNode.value=i.slice(1))}render(){const{intlHex:t,value:i}=this,n=this.formatForInternalInput(i);return a("div",{class:"container"},a("calcite-input",{class:"input",label:t,maxLength:6,numberingSystem:this.numberingSystem,onCalciteInputChange:this.onInputChange,onCalciteInternalInputBlur:this.onCalciteInternalInputBlur,onKeyDown:this.handleKeyDown,onPaste:this.onPaste,prefixText:"#",ref:this.storeInputRef,scale:this.scale,value:n}),n?a("calcite-color-picker-swatch",{active:!0,class:"preview",color:`#${n}`,scale:this.scale}):null)}async setFocus(){m(this.inputNode)}internalSetValue(t,i,a=!0){if(t){const i=e(t);if(s(i)){const{internalColor:t}=this,n=!t||i!==e(t.hex());return this.internalColor=l(i),this.previousNonNullValue=i,this.value=i,void(n&&a&&this.calciteColorPickerHexInputChange.emit())}}else if(this.allowEmpty)return this.internalColor=null,this.value=null,void(a&&this.calciteColorPickerHexInputChange.emit());this.value=i}formatForInternalInput(t){return t?t.replace("#",""):""}nudgeRGBChannels(t,i){return l.rgb(t.array().map((t=>t+i)))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}get el(){return n(this)}static get watchers(){return{value:["handleValueChange"]}}};u.style="@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{display:block}.container{display:inline-grid;inline-size:100%;align-items:center;grid-template-columns:1fr auto}.preview{grid-column:2/3;pointer-events:none;margin-block:0px;margin-inline:0.25rem;display:flex;align-items:center}.preview,.input{grid-row:1}.input{grid-column:1/3;inline-size:100%;text-transform:uppercase}";export{u as calcite_color_picker_hex_input}
@@ -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 a,h as t,F as i,g as n}from"./p-c023e6a1.js";import{S as o,I as e,T as c}from"./p-708a63a8.js";import{a as r}from"./p-83166522.js";import{S as l}from"./p-6e0da576.js";import{c as s,d as m}from"./p-ea534300.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";const p=class{constructor(t){a(this,t),this.expanded=!1,this.layout="vertical",this.menuOpen=!1,this.setMenuOpen=a=>{this.menuOpen=!!a.detail}}expandedHandler(){this.menuOpen=!1}connectedCallback(){s(this)}disconnectedCallback(){m(this)}renderTooltip(){const{el:a}=this;return r(a,o.menuTooltip)?t("slot",{name:o.menuTooltip,slot:l.tooltip}):null}renderMenu(){const{el:a,expanded:i,intlMore:n,menuOpen:s,scale:m,layout:p}=this;return r(a,o.menuActions)?t("calcite-action-menu",{expanded:i,flipPlacements:["left","right"],label:n||c.more,onCalciteActionMenuOpenChange:this.setMenuOpen,open:s,placement:"horizontal"===p?"bottom-leading":"leading-start",scale:m},t("calcite-action",{icon:e.menu,scale:m,slot:l.trigger,text:n||c.more,textEnabled:i}),t("slot",{name:o.menuActions}),this.renderTooltip()):null}render(){return t(i,null,t("slot",null),this.renderMenu())}get el(){return n(this)}static get watchers(){return{expanded:["expandedHandler"]}}};p.style='@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}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:flex;flex-direction:column;padding:0px;--calcite-action-group-columns:3}:host([columns="1"]){--calcite-action-group-columns:1}:host([columns="2"]){--calcite-action-group-columns:2}:host([columns="3"]){--calcite-action-group-columns:3}:host([columns="4"]){--calcite-action-group-columns:4}:host([columns="5"]){--calcite-action-group-columns:5}:host([columns="6"]){--calcite-action-group-columns:6}:host(:first-child){-webkit-padding-before:0px;padding-block-start:0px}:host([layout=horizontal]){flex-direction:row}:host([layout=grid]){display:grid;place-content:stretch;gap:1px;background-color:var(--calcite-ui-background);padding:1px;grid-template-columns:repeat(var(--calcite-action-group-columns), auto)}';export{p as calcite_action_group}
@@ -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 e,H as i,g as a}from"./p-c023e6a1.js";import{g as l}from"./p-44da2507.js";import{g as s,a as r,q as o}from"./p-3fa9b3c8.js";import{e as c}from"./p-b668daf8.js";import"./p-3b010ce1.js";import"./p-be41429f.js";const n=class{constructor(e){t(this,e),this._graphics=[],this._fieldNames=[],this.mapView=void 0,this._translations=void 0,this._selectedIndexes=[]}async componentWillLoad(){await this._getTranslations()}render(){return e(i,null,this._getTableControlRow(),e("div",{class:"data-container"},e("div",{class:"table-container"},e("div",{class:"table"},this._getTableHeader(),this._getTableRows()))),e("edit-record-modal",{ref:t=>this._editMultipleMpdal=t}))}_getTableControlRow(){const t=this._selectedIndexes.length>0,i=this._selectedIndexes.length>1;return e("div",{class:"display-flex table-border"},e("map-layer-picker",{mapView:this.mapView,onLayerSelectionChange:t=>this._layerSelectionChanged(t)}),e("div",null,e("calcite-button",{appearance:"transparent",color:"neutral",disabled:!t,iconStart:"magnifying-glass",onClick:()=>this._zoom()},this._translations.zoom),e("calcite-button",{appearance:"transparent",color:"neutral",disabled:!i,iconStart:"pencil",onClick:()=>this._editMultiple()},this._translations.editMultiple),e("calcite-button",{appearance:"transparent",color:"neutral",disabled:!t,iconStart:"trash",onClick:()=>this._delete()},this._translations.delete),e("calcite-split-button",{appearance:"transparent",color:"neutral","primary-text":this._translations.more},e("calcite-dropdown-group",{"selection-mode":"none"},e("calcite-dropdown-item",{iconStart:"list-check-all",onClick:()=>this._selectAll(!0)},this._translations.selectAll),e("calcite-dropdown-item",{iconStart:"selected-items-filter",onClick:()=>this._showSelected()},this._translations.showSelected),e("calcite-dropdown-item",{iconStart:"erase",onClick:()=>this._clearSelection()},this._translations.clearSelection),e("calcite-dropdown-item",{iconStart:"refresh",onClick:()=>this._switchSelected()},this._translations.switchSelected),e("calcite-dropdown-item",{iconStart:"export",onClick:()=>this._exportToCSV()},this._translations.exportCSV)))))}_getTableHeader(){return e("div",{class:"header"},e("div",{class:"table-header-cell padding-3-4"},e("calcite-checkbox",{class:"display-flex justify-center",onClick:()=>this._selectAll(this._selectAllElement.checked),ref:t=>this._selectAllElement=t})),this._fieldNames.map((t=>this._getTableHeaderCell(t))))}_getTableHeaderCell(t){return e("div",{class:"table-header-cell field-width"},t)}_getTableRows(){return e("div",{class:"table-body"},this._graphics.map(((t,e)=>this._getTableRow(t,e))))}_getTableRow(t,i){const a=this._selectedIndexes.indexOf(i)>-1;return e("div",{class:"row"},e("div",{class:"table-cell table-border padding-3-4"},e("calcite-checkbox",{checked:a,class:"display-flex justify-center",onClick:()=>this._rowSelected(i),value:i})),this._fieldNames.map((e=>{const i=this._layerView.layer.fieldsIndex.get(e);return this._getTableRowCell(t.attributes[e],i,a)})))}_getTableRowCell(t,i,a){const l=i.editable&&a,s=this._getInputType(i.type);let r;const o=i.domain;return o&&(r="coded-value"===o.type?e("calcite-select",{label:""},o.codedValues.map((i=>e("calcite-option",{label:i.name,selected:t===i.code.toString(),value:i.code})))):e("calcite-input",{max:o.maxValue,min:o.minValue,type:"number",value:t})),e("div",{class:"table-cell table-border field-width"},l&&r?r:l?e("calcite-input",{type:s,value:t}):t)}_getInputType(t){const e={string:"text","small-integer":"number",integer:"number",single:"number",double:"number",long:"number",date:"datetime-local",oid:"number",guid:"text","global-id":"text"};return Object.keys(e).indexOf(t)>-1?e[t]:"text"}_selectAll(t){this._selectedIndexes=t?this._graphics.map(((t,e)=>e)):[]}_showSelected(){console.log("_showSelected")}_clearSelection(){this._selectedIndexes=[]}_switchSelected(){const t=[...this._selectedIndexes];this._selectedIndexes=this._graphics.reduce(((e,i,a)=>(t.indexOf(a)<0&&e.push(a),e)),[])}_exportToCSV(){const t=this._getSelectedIds();c(this._layerView,t,!0)}_zoom(){const t=this._getSelectedIds();s(t,this._layerView,this.mapView,!0)}_editMultiple(){this._editMultipleMpdal.open=!0}_delete(){console.log("delete")}_getGraphics(t){return this._graphics.filter(((e,i)=>t.indexOf(i)>-1))}_getSelectedIds(){return this._getGraphics(this._selectedIndexes).map((t=>t.getObjectId()))}_rowSelected(t){const e=this._selectedIndexes.indexOf(t);e>-1?(this._selectedIndexes.splice(e,1),this._selectedIndexes=[...this._selectedIndexes]):this._selectedIndexes=[...this._selectedIndexes,t]}async _layerSelectionChanged(t){const e=t.detail[0];this._layerView=await r(this.mapView,e),this._fieldNames=this._layerView.layer.fields.map((t=>t.alias||t.name)),this._graphics=await o(0,this._layerView.layer,[]),this._selectedIndexes=[]}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return a(this)}};n.style=":host{display:block}.table{display:table;width:100%}.header{display:table-header-group;background-color:#757575;font-weight:500;font-size:var(--calcite-font-size-0);color:var(--calcite-ui-text-inverse);position:sticky;top:0;z-index:1}.table-header-cell{display:table-cell;text-align:justify;border-right:1px solid var(--calcite-ui-border-2);padding:0.5rem}.table-body{display:table-row-group}.row{display:table-row}.table-cell{display:table-cell;padding:0.5rem}.display-table-header{display:table-header-group}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.justify-center{justify-content:center}.table-container{width:100%}.overflow-auto{overflow:auto}.data-container{overflow:auto;height:calc(100% - 35px)}.row:nth-child(odd){background:var(--calcite-ui-foreground-3)}.padding-3-4{padding:0.75rem}.field-width{white-space:nowrap;min-width:300px;max-width:300px;overflow:hidden}";export{n as layer_table}
@@ -1,11 +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 i,c as t,h as a,F as e,g as s}from"./p-c023e6a1.js";import{n,c as o,d as r}from"./p-9eba5c66.js";import"./p-73e23995.js";import"./p-9a9955db.js";import"./p-83166522.js";import"./p-729708a3.js";import"./p-a80b3880.js";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */const c="is-disabled",l="ellipsis",h=class{constructor(a){i(this,a),this.calcitePaginationUpdate=t(this,"calcitePaginationUpdate",6),this.calcitePaginationChange=t(this,"calcitePaginationChange",6),this.groupSeparator=!1,this.num=20,this.start=1,this.total=0,this.textLabelNext="Next",this.textLabelPrevious="Previous",this.scale="m",this.effectiveLocale="",this.previousClicked=()=>{this.previousPage().then(),this.emitUpdate()},this.nextClicked=()=>{this.nextPage(),this.emitUpdate()},this.determineGroupSeparator=i=>(n.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},this.groupSeparator?n.localize(i.toString()):i.toString())}connectedCallback(){o(this)}disconnectedCallback(){r(this)}async nextPage(){this.start=Math.min(this.getLastStart(),this.start+this.num)}async previousPage(){this.start=Math.max(1,this.start-this.num)}getLastStart(){const{total:i,num:t}=this;return 1+(i%t==0?i-t:Math.floor(i/t)*t)}showLeftEllipsis(){return Math.floor(this.start/this.num)>3}showRightEllipsis(){return(this.total-this.start)/this.num>3}emitUpdate(){const i={start:this.start,total:this.total,num:this.num};this.calcitePaginationChange.emit(i),this.calcitePaginationUpdate.emit(i)}renderPages(){const i=this.getLastStart();let t,a;this.total/this.num<=5?(a=1+this.num,t=i-this.num):this.start/this.num<4?(a=1+this.num,t=1+4*this.num):this.start+3*this.num>=this.total?(a=i-4*this.num,t=i-this.num):(a=this.start-this.num,t=this.start+this.num);const e=[];for(;a<=t;)e.push(a),a+=this.num;return e.map((i=>this.renderPage(i)))}renderPage(i){const t=Math.floor(i/this.num)+(1===this.num?0:1),e=this.determineGroupSeparator(t);return a("button",{class:{page:!0,"is-selected":i===this.start},onClick:()=>{this.start=i,this.emitUpdate()}},e)}renderLeftEllipsis(){if(this.total/this.num>5&&this.showLeftEllipsis())return a("span",{class:`${l} ellipsis--start`},"…")}renderRightEllipsis(){if(this.total/this.num>5&&this.showRightEllipsis())return a("span",{class:`${l} ellipsis--end`},"…")}render(){const{total:i,num:t,start:s}=this,n=1===t?s<=t:s<t,o=s+t>i;return a(e,null,a("button",{"aria-label":this.textLabelPrevious,class:{previous:!0,[c]:n},disabled:n,onClick:this.previousClicked},a("calcite-icon",{flipRtl:!0,icon:"chevronLeft",scale:"s"})),i>t?this.renderPage(1):null,this.renderLeftEllipsis(),this.renderPages(),this.renderRightEllipsis(),this.renderPage(this.getLastStart()),a("button",{"aria-label":this.textLabelNext,class:{next:!0,[c]:o},disabled:o,onClick:this.nextClicked},a("calcite-icon",{flipRtl:!0,icon:"chevronRight",scale:"s"})))}get el(){return s(this)}};h.style="@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-pagination-spacing:0.25rem 0.5rem}:host([scale=s]) .previous,:host([scale=s]) .next,:host([scale=s]) .page{block-size:1.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .previous,:host([scale=s]) .next{padding-inline:0.25rem}:host([scale=m]){--calcite-pagination-spacing:0.5rem 0.75rem}:host([scale=m]) .previous,:host([scale=m]) .next,:host([scale=m]) .page{block-size:2rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .previous,:host([scale=m]) .next{padding-inline:0.5rem}:host([scale=l]){--calcite-pagination-spacing:0.75rem 1rem}:host([scale=l]) .previous,:host([scale=l]) .next,:host([scale=l]) .page{block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .previous,:host([scale=l]) .next{padding-inline:1rem}:host{display:flex;writing-mode:horizontal-tb}:host button{outline-color:transparent}:host button:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.previous,.next,.page{box-sizing:border-box;display:flex;cursor:pointer;align-items:center;border-style:none;--tw-border-opacity:0;background-color:transparent;font-family:inherit;font-size:var(--calcite-font-size-0);line-height:1.25rem;color:var(--calcite-ui-text-3);border-block:2px solid transparent}.previous:hover,.next:hover,.page:hover{color:var(--calcite-ui-text-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.page:hover{border-block-end-color:var(--calcite-ui-border-2)}.page.is-selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);border-block-end-color:var(--calcite-ui-brand)}.previous:hover,.next:hover{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-brand)}.previous:active,.next:active{background-color:var(--calcite-ui-foreground-3)}.previous.is-disabled,.next.is-disabled{pointer-events:none;background-color:transparent}.previous.is-disabled>calcite-icon,.next.is-disabled>calcite-icon{opacity:var(--calcite-ui-opacity-disabled)}.next{-webkit-margin-end:0px;margin-inline-end:0px}.page,.ellipsis{padding:var(--calcite-pagination-spacing)}.ellipsis{display:flex;align-items:flex-end;color:var(--calcite-ui-text-3)}";export{h as calcite_pagination}
@@ -1,18 +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,h as i,F as a,g as n,f as s,H as o}from"./p-c023e6a1.js";import{C as r,I as l,S as c}from"./p-6e0da576.js";import{t as h,i as d,f as m,q as p}from"./p-83166522.js";import{g as f}from"./p-e947d3b0.js";import{g as u}from"./p-a80b3880.js";import{i as v}from"./p-73e23995.js";import{b,f as g,c as x,u as w,a as y,r as k,F as E}from"./p-cdc46c0c.js";import{c as H,d as D}from"./p-2e9ed892.js";import{H as P}from"./p-508317b3.js";import"./p-729708a3.js";import"./p-4e32bf8c.js";const _=["ArrowUp","ArrowDown","End","Home"],C=class{constructor(i){t(this,i),this.calciteActionMenuOpenChange=e(this,"calciteActionMenuOpenChange",6),this.expanded=!1,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.actionElements=[],this.guid=`calcite-action-menu-${u()}`,this.menuId=`${this.guid}-menu`,this.menuButtonId=`${this.guid}-menu-button`,this.activeMenuItemIndex=-1,this.connectMenuButtonEl=()=>{const{menuButtonId:t,menuId:e,open:i,label:a}=this,n=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==n&&(this.disconnectMenuButtonEl(),this.menuButtonEl=n,this.setTooltipReferenceElement(),n&&(n.active=i,n.setAttribute("aria-controls",e),n.setAttribute("aria-expanded",h(i)),n.setAttribute("aria-haspopup","true"),n.id||(n.id=t),n.label||(n.label=a),n.text||(n.text=a),n.addEventListener("pointerdown",this.menuButtonClick),n.addEventListener("keydown",this.menuButtonKeyDown)))},this.disconnectMenuButtonEl=()=>{const{menuButtonEl:t}=this;t&&(t.removeEventListener("pointerdown",this.menuButtonClick),t.removeEventListener("keydown",this.menuButtonKeyDown))},this.setMenuButtonEl=t=>{const e=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-action")));this.slottedMenuButtonEl=e[0],this.connectMenuButtonEl()},this.setDefaultMenuButtonEl=t=>{this.defaultMenuButtonEl=t,this.connectMenuButtonEl()},this.handleCalciteActionClick=()=>{this.open=!1,this.setFocus()},this.menuButtonClick=t=>{d(t)&&this.toggleOpen()},this.updateTooltip=t=>{const e=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-tooltip")));this.tooltipEl=e[0],this.setTooltipReferenceElement()},this.setTooltipReferenceElement=()=>{const{tooltipEl:t,expanded:e,menuButtonEl:i,open:a}=this;t&&(t.referenceElement=e||a?null:i)},this.updateAction=(t,e)=>{const{guid:i,activeMenuItemIndex:a}=this,n=`${i}-action-${e}`;t.tabIndex=-1,t.setAttribute("role","menuitem"),t.id||(t.id=n),t.active=e===a},this.updateActions=t=>{null==t||t.forEach(this.updateAction)},this.handleDefaultSlotChange=t=>{const e=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-action")));this.actionElements=e},this.menuButtonKeyDown=t=>{const{key:e}=t,{actionElements:i,activeMenuItemIndex:a,open:n}=this;if(i.length){if(v(e)){if(t.preventDefault(),!n)return void this.toggleOpen();const e=i[a];e?e.click():this.toggleOpen(!1)}if("Tab"!==e)return"Escape"===e?(this.toggleOpen(!1),void t.preventDefault()):void this.handleActionNavigation(t,e,i);this.open=!1}},this.handleActionNavigation=(t,e,i)=>{if(!this.isValidKey(e,_))return;if(t.preventDefault(),!this.open)return this.toggleOpen(),"Home"!==e&&"ArrowDown"!==e||(this.activeMenuItemIndex=0),void("End"!==e&&"ArrowUp"!==e||(this.activeMenuItemIndex=i.length-1));"Home"===e&&(this.activeMenuItemIndex=0),"End"===e&&(this.activeMenuItemIndex=i.length-1);const a=this.activeMenuItemIndex;"ArrowUp"===e&&(this.activeMenuItemIndex=f(Math.max(a-1,-1),i.length)),"ArrowDown"===e&&(this.activeMenuItemIndex=f(a+1,i.length))},this.toggleOpenEnd=()=>{this.setFocus(),this.el.removeEventListener("calcitePopoverOpen",this.toggleOpenEnd)},this.toggleOpen=(t=!this.open)=>{this.el.addEventListener("calcitePopoverOpen",this.toggleOpenEnd),this.open=t}}disconnectedCallback(){this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}openHandler(t){this.activeMenuItemIndex=this.open?0:-1,this.menuButtonEl&&(this.menuButtonEl.active=t),this.calciteActionMenuOpenChange.emit(t),this.setTooltipReferenceElement()}closeCalciteActionMenuOnClick(t){d(t)&&(t.composedPath().includes(this.el)||(this.open=!1))}activeMenuItemIndexHandler(){this.updateActions(this.actionElements)}async setFocus(){m(this.menuButtonEl)}renderMenuButton(){const{label:t,scale:e,expanded:a}=this;return i("slot",{name:c.trigger,onSlotchange:this.setMenuButtonEl},i("calcite-action",{class:r.defaultTrigger,icon:l.menu,ref:this.setDefaultMenuButtonEl,scale:e,text:t,textEnabled:a}))}renderMenuItems(){const{actionElements:t,activeMenuItemIndex:e,open:a,menuId:n,menuButtonEl:s,label:o,placement:l,overlayPositioning:c,flipPlacements:h}=this,d=t[e];return i("calcite-popover",{disablePointer:!0,flipPlacements:h,label:o,offsetDistance:0,open:a,overlayPositioning:c,placement:l,referenceElement:s},i("div",{"aria-activedescendant":(null==d?void 0:d.id)||null,"aria-labelledby":null==s?void 0:s.id,class:r.menu,id:n,onClick:this.handleCalciteActionClick,role:"menu",tabIndex:-1},i("slot",{onSlotchange:this.handleDefaultSlotChange})))}render(){return i(a,null,this.renderMenuButton(),this.renderMenuItems(),i("slot",{name:c.tooltip,onSlotchange:this.updateTooltip}))}isValidKey(t,e){return!!e.find((e=>e===t))}get el(){return n(this)}static get watchers(){return{expanded:["expandedHandler"],open:["openHandler"],activeMenuItemIndex:["activeMenuItemIndexHandler"]}}};C.style="@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{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size-1);color:var(--calcite-ui-text-2)}.menu ::slotted(calcite-action){margin:0.125rem;display:flex;outline-color:transparent}.menu ::slotted(calcite-action[active]){outline:2px solid var(--calcite-ui-brand);outline-offset:0px}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{flex-direction:column;flex-wrap:nowrap;outline:2px solid transparent;outline-offset:2px}";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */
12
- const I="aria-controls",z="aria-expanded",A=new
13
- /*!
14
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
15
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
16
- * v1.0.0-beta.97
17
- */
18
- class{constructor(){this.registeredElements=new Map,this.registeredElementCount=0,this.queryPopover=t=>{const{registeredElements:e}=this,i=t.find((t=>e.has(t)));return e.get(i)},this.togglePopovers=t=>{const e=t.composedPath(),i=this.queryPopover(e);i&&!i.triggerDisabled&&i.toggle(),Array.from(this.registeredElements.values()).filter((t=>t!==i&&t.autoClose&&t.open&&!e.includes(t))).forEach((t=>t.toggle(!1)))},this.keyHandler=t=>{!t.defaultPrevented&&v(t.key)&&this.togglePopovers(t)},this.clickHandler=t=>{d(t)&&this.togglePopovers(t)}}registerElement(t,e){this.registeredElementCount++,this.registeredElements.set(t,e),1===this.registeredElementCount&&this.addListeners()}unregisterElement(t){this.registeredElements.delete(t)&&this.registeredElementCount--,0===this.registeredElementCount&&this.removeListeners()}addListeners(){document.addEventListener("pointerdown",this.clickHandler,{capture:!0}),document.addEventListener("keydown",this.keyHandler,{capture:!0})}removeListeners(){document.removeEventListener("pointerdown",this.clickHandler,{capture:!0}),document.removeEventListener("keydown",this.keyHandler,{capture:!0})}},j=class{constructor(i){t(this,i),this.calcitePopoverBeforeClose=e(this,"calcitePopoverBeforeClose",6),this.calcitePopoverClose=e(this,"calcitePopoverClose",6),this.calcitePopoverBeforeOpen=e(this,"calcitePopoverBeforeOpen",6),this.calcitePopoverOpen=e(this,"calcitePopoverOpen",6),this.autoClose=!1,this.closeButton=!1,this.dismissible=!1,this.closable=!1,this.disableFlip=!1,this.disablePointer=!1,this.offsetDistance=b,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.triggerDisabled=!1,this.intlClose="Close",this.guid=`calcite-popover-${u()}`,this.openTransitionProp="opacity",this.hasLoaded=!1,this.setTransitionEl=t=>{this.transitionEl=t,H(this)},this.setFilteredPlacements=()=>{const{el:t,flipPlacements:e}=this;this.filteredFlipPlacements=e?g(e,t):null},this.setUpReferenceElement=(t=!0)=>{this.removeReferences(),this.effectiveReferenceElement=this.getReferenceElement(),x(this,this.effectiveReferenceElement,this.el);const{el:e,referenceElement:i,effectiveReferenceElement:a}=this;t&&i&&!a&&console.warn(`${e.tagName}: reference-element id "${i}" was not found.`,{el:e}),this.addReferences()},this.getId=()=>this.el.id||this.guid,this.setExpandedAttr=()=>{const{effectiveReferenceElement:t,open:e}=this;t&&"setAttribute"in t&&t.setAttribute(z,h(e))},this.addReferences=()=>{const{effectiveReferenceElement:t}=this;if(!t)return;const e=this.getId();"setAttribute"in t&&t.setAttribute(I,e),A.registerElement(t,this.el),this.setExpandedAttr()},this.removeReferences=()=>{const{effectiveReferenceElement:t}=this;t&&("removeAttribute"in t&&(t.removeAttribute(I),t.removeAttribute(z)),A.unregisterElement(t))},this.hide=()=>{this.open=!1},this.storeArrowEl=t=>{this.arrowEl=t,this.reposition(!0)}}handleDismissible(t){this.closable=t}handleClosable(t){this.dismissible=t}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}offsetDistanceOffsetHandler(){this.reposition(!0)}offsetSkiddingHandler(){this.reposition(!0)}openHandler(t){t?this.reposition(!0):w(this.el),this.setExpandedAttr()}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}referenceElementHandler(){this.setUpReferenceElement(),this.reposition(!0)}connectedCallback(){this.setFilteredPlacements(),H(this);const t=this.closable||this.dismissible;t&&this.handleDismissible(t),t&&this.handleClosable(t),this.setUpReferenceElement(this.hasLoaded)}componentDidLoad(){this.referenceElement&&!this.effectiveReferenceElement&&this.setUpReferenceElement(),this.reposition(),this.hasLoaded=!0}disconnectedCallback(){this.removeReferences(),y(this,this.effectiveReferenceElement,this.el),D(this)}async reposition(t=!1){const{el:e,effectiveReferenceElement:i,placement:a,overlayPositioning:n,disableFlip:s,filteredFlipPlacements:o,offsetDistance:r,offsetSkidding:l,arrowEl:c}=this;return k(this,{floatingEl:e,referenceEl:i,overlayPositioning:n,placement:a,disableFlip:s,flipPlacements:o,offsetDistance:r,offsetSkidding:l,includeArrow:!this.disablePointer,arrowEl:c,type:"popover"},t)}async setFocus(t){var e;const{closeButtonEl:i}=this;if("close-button"===t&&i)return s(i),void i.setFocus();null===(e=this.el)||void 0===e||e.focus()}async toggle(t=!this.open){this.open=t}getReferenceElement(){const{referenceElement:t,el:e}=this;return("string"==typeof t?p(e,{id:t}):t)||null}onBeforeOpen(){this.calcitePopoverBeforeOpen.emit()}onOpen(){this.calcitePopoverOpen.emit()}onBeforeClose(){this.calcitePopoverBeforeClose.emit()}onClose(){this.calcitePopoverClose.emit()}renderCloseButton(){const{closeButton:t,intlClose:e,heading:a,closable:n}=this;return n||t?i("div",{class:"close-button-container"},i("calcite-action",{class:"close-button",onClick:this.hide,ref:t=>this.closeButtonEl=t,scale:a?"s":"m",text:e},i("calcite-icon",{icon:"x",scale:a?"s":"m"}))):null}renderHeader(){const{heading:t,headingLevel:e}=this,a=t?i(P,{class:"heading",level:e||2},t):null;return a?i("div",{class:"header"},a,this.renderCloseButton()):null}render(){const{effectiveReferenceElement:t,heading:e,label:a,open:n,disablePointer:s}=this,r=t&&n,l=!r,c=s?null:i("div",{class:"arrow",ref:this.storeArrowEl});return i(o,{"aria-hidden":h(l),"aria-label":a,"aria-live":"polite","calcite-hydrated-hidden":l,id:this.getId(),role:"dialog"},i("div",{class:{[E.animation]:!0,[E.animationActive]:r},ref:this.setTransitionEl},c,i("div",{class:{"has-header":!!e,container:!0}},this.renderHeader(),i("div",{class:"content"},i("slot",null)),e?null:this.renderCloseButton())))}get el(){return n(this)}static get watchers(){return{dismissible:["handleDismissible"],closable:["handleClosable"],flipPlacements:["flipPlacementsHandler"],offsetDistance:["offsetDistanceOffsetHandler"],offsetSkidding:["offsetSkiddingHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"],referenceElement:["referenceElementHandler"]}}};j.style='@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{display:block;position:absolute;z-index:900}.calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}:host([data-placement^=bottom]) .calcite-floating-ui-anim{transform:translateY(-5px)}:host([data-placement^=top]) .calcite-floating-ui-anim{transform:translateY(5px)}:host([data-placement^=left]) .calcite-floating-ui-anim{transform:translateX(5px)}:host([data-placement^=right]) .calcite-floating-ui-anim{transform:translateX(-5px)}:host([data-placement]) .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.arrow,.arrow::before{position:absolute;inline-size:8px;block-size:8px;z-index:-1}.arrow::before{content:"";--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);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-placement^=top]) .arrow{inset-block-end:-4px}:host([data-placement^=bottom]) .arrow{inset-block-start:-4px}:host([data-placement^=left]) .arrow{direction:ltr;inset-inline-end:-4px}:host([data-placement^=right]) .arrow{direction:ltr;inset-inline-start:-4px}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-floating-ui-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-block-end-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;flex:1 1 auto;align-self:center;white-space:normal;padding-inline:1rem;padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:flex;block-size:100%;flex-direction:row;flex-wrap:nowrap;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1)}.container.has-header{flex-direction:column}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:flex;overflow:hidden;flex:0 0 auto;border-start-end-radius:0.25rem;border-end-end-radius:0.25rem}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%}';export{C as calcite_action_menu,j as calcite_popover}
@@ -1,11 +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,h as a,H as e,g as n}from"./p-c023e6a1.js";import{b as o,t as c}from"./p-83166522.js";import{g as r}from"./p-a80b3880.js";import{i as l}from"./p-73e23995.js";import"./p-729708a3.js";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */const s="toggle",d={menuOpen:"chevron-down",menuClosedLeft:"chevron-left",menuClosedRight:"chevron-right",valid:"check-circle",invalid:"exclamation-mark-triangle"},m=class{constructor(a){t(this,a),this.calciteBlockSectionToggle=i(this,"calciteBlockSectionToggle",6),this.open=!1,this.toggleDisplay="button",this.guid=r(),this.handleHeaderKeyDown=t=>{l(t.key)&&(this.toggleSection(),t.preventDefault(),t.stopPropagation())},this.toggleSection=()=>{this.open=!this.open,this.calciteBlockSectionToggle.emit()}}renderStatusIcon(){var t;const{status:i}=this,e=null!==(t=d[i])&&void 0!==t&&t;return e?a("calcite-icon",{class:{"status-icon":!0,valid:"valid"==i,invalid:"invalid"==i},icon:e,scale:"s"}):null}render(){const{el:t,intlCollapse:i,intlExpand:n,open:r,text:l,toggleDisplay:m}=this,h=o(t),g=r?d.menuOpen:"rtl"===h?d.menuClosedLeft:d.menuClosedRight,u=r?i||"Collapse":n||"Expand",{guid:p}=this,f=`${p}-region`,b=`${p}-button`,v="switch"===m?a("div",{"aria-controls":f,"aria-label":u,class:{[s]:!0,"toggle--switch":!0},id:b,onClick:this.toggleSection,onKeyDown:this.handleHeaderKeyDown,tabIndex:0,title:u},a("div",{class:"toggle--switch__content"},a("span",{class:"toggle--switch__text"},l)),a("calcite-switch",{checked:r,label:u,scale:"s",tabIndex:-1}),this.renderStatusIcon()):a("button",{"aria-controls":f,"aria-label":u,class:{"section-header":!0,[s]:!0},id:b,name:u,onClick:this.toggleSection},a("calcite-icon",{icon:g,scale:"s"}),a("span",{class:"section-header__text"},l),this.renderStatusIcon());return a(e,null,v,a("section",{"aria-expanded":c(r),"aria-labelledby":b,class:"content",hidden:!r,id:f},a("slot",null)))}get el(){return n(this)}};m.style="@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{box-sizing:border-box;display:block;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}:host([open]){border-width:0px;border-block-end-width:1px;border-style:solid;border-block-end-color:var(--calcite-ui-border-3)}:host(:last-child){border-block-end-width:0px}.toggle{inline-size:100%;border-width:0px;background-color:transparent;font-family:var(--calcite-sans-family);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}.toggle--switch,.section-header{margin-inline:0px;margin-block:0.25rem;display:flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;padding-inline:0px;padding-block:0.5rem;font-size:var(--calcite-font-size--1);outline-color:transparent}.toggle--switch:focus,.section-header:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.toggle--switch:hover,.section-header:hover{color:var(--calcite-ui-text-1)}.section-header .status-icon{align-self:flex-end}.section-header__text{margin-inline:0.75rem;margin-block:0px;flex:1 1 auto;text-align:initial;word-wrap:anywhere}.toggle--switch calcite-switch{pointer-events:none;-webkit-margin-start:0.25rem;margin-inline-start:0.25rem}.toggle--switch .status-icon{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.toggle--switch__content{display:flex;flex:1 1 auto;align-items:center}.status-icon.valid{color:var(--calcite-ui-success)}.status-icon.invalid{color:var(--calcite-ui-danger)}";export{m as calcite_block_section}
@@ -1,11 +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 a,h as t,g as i}from"./p-c023e6a1.js";import{c as e}from"./p-9a9955db.js";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */const n=class{constructor(t){a(this,t),this.flowDirection=null,this.itemCount=0,this.items=[],this.itemMutationObserver=e("mutation",(()=>this.updateFlowProps())),this.getFlowDirection=(a,t)=>a&&t>1||a>1?t<a?"retreating":"advancing":null,this.updateFlowProps=()=>{const{el:a,items:t}=this,i=Array.from(a.querySelectorAll("calcite-flow-item, calcite-panel")).filter((a=>!a.matches("calcite-flow-item calcite-flow-item, calcite-panel calcite-panel"))),e=t.length,n=i.length,c=i[n-1],r=i[n-2];if(n&&c&&i.forEach((a=>{a.showBackButton=a===c&&n>1,a.hidden=a!==c})),r&&(r.menuOpen=!1),this.items=i,e!==n){const a=this.getFlowDirection(e,n);this.itemCount=n,this.flowDirection=a}}}async back(){const{items:a}=this,t=a[a.length-1];if(t)return(t.beforeBack?t.beforeBack:()=>Promise.resolve()).call(t).then((()=>(t.remove(),t)))}connectedCallback(){var a;null===(a=this.itemMutationObserver)||void 0===a||a.observe(this.el,{childList:!0,subtree:!0}),this.updateFlowProps()}disconnectedCallback(){var a;null===(a=this.itemMutationObserver)||void 0===a||a.disconnect()}handleItemBackClick(){this.back()}render(){const{flowDirection:a}=this;return t("div",{class:{frame:!0,"frame--advancing":"advancing"===a,"frame--retreating":"retreating"===a}},t("slot",null))}get el(){return i(this)}};n.style="@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}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0px;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0px}:host ::slotted(calcite-flow-item),:host ::slotted(calcite-panel){block-size:100%}:host ::slotted(.calcite-match-height:last-child){display:flex;flex:1 1 auto;overflow:hidden}:host .frame--advancing{animation:calcite-frame-advance var(--calcite-animation-timing)}:host .frame--retreating{animation:calcite-frame-retreat var(--calcite-animation-timing)}@keyframes calcite-frame-advance{0%{--tw-bg-opacity:0.5;transform:translate3d(50px, 0, 0)}100%{--tw-bg-opacity:1;transform:translate3d(0, 0, 0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity:0.5;transform:translate3d(-50px, 0, 0)}100%{--tw-bg-opacity:1;transform:translate3d(0, 0, 0)}}";export{n as calcite_flow}
@@ -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 a,h as t}from"./p-c023e6a1.js";const i=class{constructor(t){a(this,t)}render(){return t("slot",null)}};i.style="@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{box-sizing:border-box;display:block;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}::slotted(calcite-tip){margin:0px;border-style:none}:host-context(calcite-tip-manager){margin-block:0.75rem}:host-context(calcite-tip-manager) ::slotted(calcite-tip){padding:1rem}";export{i as calcite_tip_group}
@@ -1,11 +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 i,F as e,g as n}from"./p-c023e6a1.js";import{a}from"./p-83166522.js";import{c as o,d as c}from"./p-ea534300.js";import{u as r}from"./p-7daea1df.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";
7
- /*!
8
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
10
- * v1.0.0-beta.97
11
- */const s="content-start",l="content-end",d=class{constructor(i){t(this,i),this.active=!1,this.disabled=!1,this.embed=!1,this.focused=!1,this.hidden=!1}connectedCallback(){o(this)}disconnectedCallback(){c(this)}componentDidRender(){r(this)}renderTile(){const{icon:t,el:e,heading:n,description:o}=this,c=n&&t&&!o;return i("div",{class:{container:!0,"large-visual":c}},t&&i("div",{class:"icon"},i("calcite-icon",{icon:t,scale:"l",style:c?{height:"64px",width:"64px"}:void 0})),i("div",{class:"content-container"},a(e,s)?i("div",{class:"content-slot-container"},i("slot",{name:s})):null,i("div",{class:"content"},n&&i("div",{class:"heading"},n),o&&i("div",{class:"description"},o)),a(e,l)?i("div",{class:"content-slot-container"},i("slot",{name:l})):null))}render(){return i(e,null,this.href?i("calcite-link",{disabled:this.disabled,href:this.href},this.renderTile()):this.renderTile())}get el(){return n(this)}};d.style="@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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{box-sizing:border-box;display:inline-block;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .container{pointer-events:none;display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:0.5rem}:host .content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;gap:0.5rem;inline-size:10%}:host .content-container{display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;padding:0px;color:var(--calcite-ui-text-2);outline-color:transparent}:host .content-slot-container{display:flex;align-items:center;background-color:var(--calcite-ui-foreground-1)}:host .content-slot-container:first-child{padding-inline:0 0.75rem}:host .content-slot-container:last-child{padding-inline:0.75rem 0}:host .heading{pointer-events:none;overflow-wrap:break-word;font-size:var(--calcite-font-size--1);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .large-visual{align-items:center;text-align:center;min-block-size:12rem}:host .large-visual .icon{display:flex;justify-content:center;align-self:flex-end}:host .large-visual .content-container{align-self:center}:host .description{pointer-events:none;overflow-wrap:break-word;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host(:not([embed])){padding:0.75rem;box-shadow:0 0 0 1px var(--calcite-ui-border-2)}:host(:not([embed])[href]:hover){cursor:pointer;box-shadow:0 0 0 2px var(--calcite-ui-brand)}:host(:not([embed])[href]:active){box-shadow:0 0 0 3px var(--calcite-ui-brand)}:host([icon][heading]:not([description]):not([embed])){padding:0px}:host([icon][heading]:not([description])) .icon{display:flex;justify-content:center}:host([icon][heading]:not([description])) .large-visual{text-align:center}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host(:hover) .heading,:host([active]) .heading{color:var(--calcite-ui-text-1)}:host(:hover) .description,:host([active]) .description{color:var(--calcite-ui-text-2)}";export{d as calcite_tile}