@esri/solutions-components 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (531) hide show
  1. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +16 -6
  2. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js.map +1 -1
  3. package/dist/cjs/solution-configuration.cjs.entry.js +1095 -4
  4. package/dist/cjs/solution-configuration.cjs.entry.js.map +1 -1
  5. package/dist/cjs/solution-contents_3.cjs.entry.js +3 -1
  6. package/dist/cjs/solution-contents_3.cjs.entry.js.map +1 -1
  7. package/dist/cjs/{solution-store-f0547fe7.js → solution-store-893499a5.js} +8 -1
  8. package/dist/cjs/solution-store-893499a5.js.map +1 -0
  9. package/dist/collection/components/solution-configuration/solution-configuration.js +14 -11
  10. package/dist/collection/components/solution-configuration/solution-configuration.js.map +1 -1
  11. package/dist/collection/components/solution-item/solution-item.js +2 -0
  12. package/dist/collection/components/solution-item/solution-item.js.map +1 -1
  13. package/dist/collection/components/solution-item-details/solution-item-details.js +15 -5
  14. package/dist/collection/components/solution-item-details/solution-item-details.js.map +1 -1
  15. package/dist/collection/utils/solution-store.js +2 -0
  16. package/dist/collection/utils/solution-store.js.map +1 -1
  17. package/dist/collection/utils/solution-store.ts +2 -0
  18. package/dist/esm/calcite-shell-panel_14.entry.js +16 -6
  19. package/dist/esm/calcite-shell-panel_14.entry.js.map +1 -1
  20. package/dist/esm/solution-configuration.entry.js +1095 -4
  21. package/dist/esm/solution-configuration.entry.js.map +1 -1
  22. package/dist/esm/solution-contents_3.entry.js +3 -1
  23. package/dist/esm/solution-contents_3.entry.js.map +1 -1
  24. package/dist/esm/{solution-store-c1f6173a.js → solution-store-0c58c852.js} +4 -2
  25. package/dist/esm/solution-store-0c58c852.js.map +1 -0
  26. package/dist/solutions-components/{p-065830b8.js → p-659edb14.js} +4 -2
  27. package/dist/solutions-components/p-659edb14.js.map +1 -0
  28. package/dist/solutions-components/{p-ee9be0ef.entry.js → p-77c75f3a.entry.js} +4 -2
  29. package/dist/solutions-components/p-77c75f3a.entry.js.map +1 -0
  30. package/dist/solutions-components/p-90629c1d.entry.js +1986 -0
  31. package/dist/solutions-components/p-90629c1d.entry.js.map +1 -0
  32. package/dist/solutions-components/{p-0e7a0839.entry.js → p-984cb687.entry.js} +17 -7
  33. package/dist/solutions-components/p-984cb687.entry.js.map +1 -0
  34. package/dist/solutions-components/solutions-components.esm.js +1 -1
  35. package/dist/solutions-components/utils/solution-store.ts +2 -0
  36. package/dist/solutions-components_commit.txt +9 -7
  37. package/dist/types/components/solution-item-details/solution-item-details.d.ts +2 -1
  38. package/package.json +1 -1
  39. package/dist/cjs/solution-store-f0547fe7.js.map +0 -1
  40. package/dist/components/ExpandToggle.js +0 -112
  41. package/dist/components/ExpandToggle.js.map +0 -1
  42. package/dist/components/Heading.js +0 -24
  43. package/dist/components/Heading.js.map +0 -1
  44. package/dist/components/_commonjsHelpers.js +0 -24
  45. package/dist/components/_commonjsHelpers.js.map +0 -1
  46. package/dist/components/action-bar.js +0 -278
  47. package/dist/components/action-bar.js.map +0 -1
  48. package/dist/components/action-group.js +0 -151
  49. package/dist/components/action-group.js.map +0 -1
  50. package/dist/components/action-menu.js +0 -358
  51. package/dist/components/action-menu.js.map +0 -1
  52. package/dist/components/action.js +0 -216
  53. package/dist/components/action.js.map +0 -1
  54. package/dist/components/array.js +0 -17
  55. package/dist/components/array.js.map +0 -1
  56. package/dist/components/buffer-tools.d.ts +0 -11
  57. package/dist/components/buffer-tools.js +0 -13
  58. package/dist/components/buffer-tools.js.map +0 -1
  59. package/dist/components/buffer-tools2.js +0 -256
  60. package/dist/components/buffer-tools2.js.map +0 -1
  61. package/dist/components/button.js +0 -265
  62. package/dist/components/button.js.map +0 -1
  63. package/dist/components/calcite-accordion-item.js +0 -246
  64. package/dist/components/calcite-accordion-item.js.map +0 -1
  65. package/dist/components/calcite-accordion.js +0 -182
  66. package/dist/components/calcite-accordion.js.map +0 -1
  67. package/dist/components/calcite-action-bar.js +0 -13
  68. package/dist/components/calcite-action-bar.js.map +0 -1
  69. package/dist/components/calcite-action-group.js +0 -13
  70. package/dist/components/calcite-action-group.js.map +0 -1
  71. package/dist/components/calcite-action-menu.js +0 -13
  72. package/dist/components/calcite-action-menu.js.map +0 -1
  73. package/dist/components/calcite-action-pad.js +0 -199
  74. package/dist/components/calcite-action-pad.js.map +0 -1
  75. package/dist/components/calcite-action.js +0 -13
  76. package/dist/components/calcite-action.js.map +0 -1
  77. package/dist/components/calcite-alert.js +0 -299
  78. package/dist/components/calcite-alert.js.map +0 -1
  79. package/dist/components/calcite-avatar.js +0 -184
  80. package/dist/components/calcite-avatar.js.map +0 -1
  81. package/dist/components/calcite-block-section.js +0 -157
  82. package/dist/components/calcite-block-section.js.map +0 -1
  83. package/dist/components/calcite-block.js +0 -277
  84. package/dist/components/calcite-block.js.map +0 -1
  85. package/dist/components/calcite-button.js +0 -13
  86. package/dist/components/calcite-button.js.map +0 -1
  87. package/dist/components/calcite-card.js +0 -189
  88. package/dist/components/calcite-card.js.map +0 -1
  89. package/dist/components/calcite-checkbox.js +0 -13
  90. package/dist/components/calcite-checkbox.js.map +0 -1
  91. package/dist/components/calcite-chip.js +0 -13
  92. package/dist/components/calcite-chip.js.map +0 -1
  93. package/dist/components/calcite-color-picker-hex-input.js +0 -13
  94. package/dist/components/calcite-color-picker-hex-input.js.map +0 -1
  95. package/dist/components/calcite-color-picker-swatch.js +0 -13
  96. package/dist/components/calcite-color-picker-swatch.js.map +0 -1
  97. package/dist/components/calcite-color-picker.js +0 -1038
  98. package/dist/components/calcite-color-picker.js.map +0 -1
  99. package/dist/components/calcite-combobox-item-group.js +0 -77
  100. package/dist/components/calcite-combobox-item-group.js.map +0 -1
  101. package/dist/components/calcite-combobox-item.js +0 -13
  102. package/dist/components/calcite-combobox-item.js.map +0 -1
  103. package/dist/components/calcite-combobox.js +0 -13
  104. package/dist/components/calcite-combobox.js.map +0 -1
  105. package/dist/components/calcite-date-picker-day.js +0 -13
  106. package/dist/components/calcite-date-picker-day.js.map +0 -1
  107. package/dist/components/calcite-date-picker-month-header.js +0 -13
  108. package/dist/components/calcite-date-picker-month-header.js.map +0 -1
  109. package/dist/components/calcite-date-picker-month.js +0 -13
  110. package/dist/components/calcite-date-picker-month.js.map +0 -1
  111. package/dist/components/calcite-date-picker.js +0 -13
  112. package/dist/components/calcite-date-picker.js.map +0 -1
  113. package/dist/components/calcite-dropdown-group.js +0 -101
  114. package/dist/components/calcite-dropdown-group.js.map +0 -1
  115. package/dist/components/calcite-dropdown-item.js +0 -237
  116. package/dist/components/calcite-dropdown-item.js.map +0 -1
  117. package/dist/components/calcite-dropdown.js +0 -13
  118. package/dist/components/calcite-dropdown.js.map +0 -1
  119. package/dist/components/calcite-fab.js +0 -146
  120. package/dist/components/calcite-fab.js.map +0 -1
  121. package/dist/components/calcite-filter.js +0 -197
  122. package/dist/components/calcite-filter.js.map +0 -1
  123. package/dist/components/calcite-flow-item.js +0 -245
  124. package/dist/components/calcite-flow-item.js.map +0 -1
  125. package/dist/components/calcite-flow.js +0 -149
  126. package/dist/components/calcite-flow.js.map +0 -1
  127. package/dist/components/calcite-graph.js +0 -13
  128. package/dist/components/calcite-graph.js.map +0 -1
  129. package/dist/components/calcite-handle.js +0 -13
  130. package/dist/components/calcite-handle.js.map +0 -1
  131. package/dist/components/calcite-icon.js +0 -13
  132. package/dist/components/calcite-icon.js.map +0 -1
  133. package/dist/components/calcite-inline-editable.js +0 -296
  134. package/dist/components/calcite-inline-editable.js.map +0 -1
  135. package/dist/components/calcite-input-date-picker.js +0 -715
  136. package/dist/components/calcite-input-date-picker.js.map +0 -1
  137. package/dist/components/calcite-input-message.js +0 -13
  138. package/dist/components/calcite-input-message.js.map +0 -1
  139. package/dist/components/calcite-input-number.js +0 -639
  140. package/dist/components/calcite-input-number.js.map +0 -1
  141. package/dist/components/calcite-input-text.js +0 -402
  142. package/dist/components/calcite-input-text.js.map +0 -1
  143. package/dist/components/calcite-input-time-picker.js +0 -436
  144. package/dist/components/calcite-input-time-picker.js.map +0 -1
  145. package/dist/components/calcite-input.js +0 -13
  146. package/dist/components/calcite-input.js.map +0 -1
  147. package/dist/components/calcite-label.js +0 -13
  148. package/dist/components/calcite-label.js.map +0 -1
  149. package/dist/components/calcite-link.js +0 -13
  150. package/dist/components/calcite-link.js.map +0 -1
  151. package/dist/components/calcite-list-item-group.js +0 -67
  152. package/dist/components/calcite-list-item-group.js.map +0 -1
  153. package/dist/components/calcite-list-item.js +0 -13
  154. package/dist/components/calcite-list-item.js.map +0 -1
  155. package/dist/components/calcite-list.js +0 -13
  156. package/dist/components/calcite-list.js.map +0 -1
  157. package/dist/components/calcite-loader.js +0 -13
  158. package/dist/components/calcite-loader.js.map +0 -1
  159. package/dist/components/calcite-modal.js +0 -500
  160. package/dist/components/calcite-modal.js.map +0 -1
  161. package/dist/components/calcite-notice.js +0 -13
  162. package/dist/components/calcite-notice.js.map +0 -1
  163. package/dist/components/calcite-option-group.js +0 -66
  164. package/dist/components/calcite-option-group.js.map +0 -1
  165. package/dist/components/calcite-option.js +0 -13
  166. package/dist/components/calcite-option.js.map +0 -1
  167. package/dist/components/calcite-pagination.js +0 -260
  168. package/dist/components/calcite-pagination.js.map +0 -1
  169. package/dist/components/calcite-panel.js +0 -13
  170. package/dist/components/calcite-panel.js.map +0 -1
  171. package/dist/components/calcite-pick-list-group.js +0 -76
  172. package/dist/components/calcite-pick-list-group.js.map +0 -1
  173. package/dist/components/calcite-pick-list-item.js +0 -13
  174. package/dist/components/calcite-pick-list-item.js.map +0 -1
  175. package/dist/components/calcite-pick-list.js +0 -175
  176. package/dist/components/calcite-pick-list.js.map +0 -1
  177. package/dist/components/calcite-popover-manager.js +0 -96
  178. package/dist/components/calcite-popover-manager.js.map +0 -1
  179. package/dist/components/calcite-popover.js +0 -13
  180. package/dist/components/calcite-popover.js.map +0 -1
  181. package/dist/components/calcite-progress.js +0 -13
  182. package/dist/components/calcite-progress.js.map +0 -1
  183. package/dist/components/calcite-radio-button-group.js +0 -134
  184. package/dist/components/calcite-radio-button-group.js.map +0 -1
  185. package/dist/components/calcite-radio-button.js +0 -312
  186. package/dist/components/calcite-radio-button.js.map +0 -1
  187. package/dist/components/calcite-radio-group-item.js +0 -13
  188. package/dist/components/calcite-radio-group-item.js.map +0 -1
  189. package/dist/components/calcite-radio-group.js +0 -13
  190. package/dist/components/calcite-radio-group.js.map +0 -1
  191. package/dist/components/calcite-rating.js +0 -203
  192. package/dist/components/calcite-rating.js.map +0 -1
  193. package/dist/components/calcite-scrim.js +0 -13
  194. package/dist/components/calcite-scrim.js.map +0 -1
  195. package/dist/components/calcite-select.js +0 -13
  196. package/dist/components/calcite-select.js.map +0 -1
  197. package/dist/components/calcite-shell-center-row.js +0 -102
  198. package/dist/components/calcite-shell-center-row.js.map +0 -1
  199. package/dist/components/calcite-shell-panel.js +0 -13
  200. package/dist/components/calcite-shell-panel.js.map +0 -1
  201. package/dist/components/calcite-shell.js +0 -13
  202. package/dist/components/calcite-shell.js.map +0 -1
  203. package/dist/components/calcite-slider.js +0 -13
  204. package/dist/components/calcite-slider.js.map +0 -1
  205. package/dist/components/calcite-sortable-list.js +0 -204
  206. package/dist/components/calcite-sortable-list.js.map +0 -1
  207. package/dist/components/calcite-split-button.js +0 -170
  208. package/dist/components/calcite-split-button.js.map +0 -1
  209. package/dist/components/calcite-stepper-item.js +0 -273
  210. package/dist/components/calcite-stepper-item.js.map +0 -1
  211. package/dist/components/calcite-stepper.js +0 -258
  212. package/dist/components/calcite-stepper.js.map +0 -1
  213. package/dist/components/calcite-switch.js +0 -13
  214. package/dist/components/calcite-switch.js.map +0 -1
  215. package/dist/components/calcite-tab-nav.js +0 -13
  216. package/dist/components/calcite-tab-nav.js.map +0 -1
  217. package/dist/components/calcite-tab-title.js +0 -13
  218. package/dist/components/calcite-tab-title.js.map +0 -1
  219. package/dist/components/calcite-tab.js +0 -13
  220. package/dist/components/calcite-tab.js.map +0 -1
  221. package/dist/components/calcite-tabs.js +0 -13
  222. package/dist/components/calcite-tabs.js.map +0 -1
  223. package/dist/components/calcite-tile-select-group.js +0 -67
  224. package/dist/components/calcite-tile-select-group.js.map +0 -1
  225. package/dist/components/calcite-tile-select.js +0 -268
  226. package/dist/components/calcite-tile-select.js.map +0 -1
  227. package/dist/components/calcite-tile.js +0 -13
  228. package/dist/components/calcite-tile.js.map +0 -1
  229. package/dist/components/calcite-time-picker.js +0 -13
  230. package/dist/components/calcite-time-picker.js.map +0 -1
  231. package/dist/components/calcite-tip-group.js +0 -43
  232. package/dist/components/calcite-tip-group.js.map +0 -1
  233. package/dist/components/calcite-tip-manager.js +0 -225
  234. package/dist/components/calcite-tip-manager.js.map +0 -1
  235. package/dist/components/calcite-tip.js +0 -164
  236. package/dist/components/calcite-tip.js.map +0 -1
  237. package/dist/components/calcite-tooltip-manager.js +0 -59
  238. package/dist/components/calcite-tooltip-manager.js.map +0 -1
  239. package/dist/components/calcite-tooltip.js +0 -13
  240. package/dist/components/calcite-tooltip.js.map +0 -1
  241. package/dist/components/calcite-tree-item.js +0 -13
  242. package/dist/components/calcite-tree-item.js.map +0 -1
  243. package/dist/components/calcite-tree.js +0 -13
  244. package/dist/components/calcite-tree.js.map +0 -1
  245. package/dist/components/calcite-value-list-item.js +0 -13
  246. package/dist/components/calcite-value-list-item.js.map +0 -1
  247. package/dist/components/calcite-value-list.js +0 -13
  248. package/dist/components/calcite-value-list.js.map +0 -1
  249. package/dist/components/check-list.d.ts +0 -11
  250. package/dist/components/check-list.js +0 -13
  251. package/dist/components/check-list.js.map +0 -1
  252. package/dist/components/check-list2.js +0 -128
  253. package/dist/components/check-list2.js.map +0 -1
  254. package/dist/components/checkbox.js +0 -167
  255. package/dist/components/checkbox.js.map +0 -1
  256. package/dist/components/chip.js +0 -172
  257. package/dist/components/chip.js.map +0 -1
  258. package/dist/components/color-picker-hex-input.js +0 -365
  259. package/dist/components/color-picker-hex-input.js.map +0 -1
  260. package/dist/components/color-picker-swatch.js +0 -2036
  261. package/dist/components/color-picker-swatch.js.map +0 -1
  262. package/dist/components/combobox-item.js +0 -184
  263. package/dist/components/combobox-item.js.map +0 -1
  264. package/dist/components/combobox.js +0 -914
  265. package/dist/components/combobox.js.map +0 -1
  266. package/dist/components/conditionalSlot.js +0 -52
  267. package/dist/components/conditionalSlot.js.map +0 -1
  268. package/dist/components/config-buffer-tools.d.ts +0 -11
  269. package/dist/components/config-buffer-tools.js +0 -185
  270. package/dist/components/config-buffer-tools.js.map +0 -1
  271. package/dist/components/config-draw-tools.d.ts +0 -11
  272. package/dist/components/config-draw-tools.js +0 -124
  273. package/dist/components/config-draw-tools.js.map +0 -1
  274. package/dist/components/config-layer-picker.d.ts +0 -11
  275. package/dist/components/config-layer-picker.js +0 -148
  276. package/dist/components/config-layer-picker.js.map +0 -1
  277. package/dist/components/config-pdf-download.d.ts +0 -11
  278. package/dist/components/config-pdf-download.js +0 -157
  279. package/dist/components/config-pdf-download.js.map +0 -1
  280. package/dist/components/date-picker-day.js +0 -113
  281. package/dist/components/date-picker-day.js.map +0 -1
  282. package/dist/components/date-picker-month-header.js +0 -226
  283. package/dist/components/date-picker-month-header.js.map +0 -1
  284. package/dist/components/date-picker-month.js +0 -346
  285. package/dist/components/date-picker-month.js.map +0 -1
  286. package/dist/components/date-picker.js +0 -577
  287. package/dist/components/date-picker.js.map +0 -1
  288. package/dist/components/date.js +0 -182
  289. package/dist/components/date.js.map +0 -1
  290. package/dist/components/debounce.js +0 -489
  291. package/dist/components/debounce.js.map +0 -1
  292. package/dist/components/dom.js +0 -233
  293. package/dist/components/dom.js.map +0 -1
  294. package/dist/components/dropdown.js +0 -507
  295. package/dist/components/dropdown.js.map +0 -1
  296. package/dist/components/filter.js +0 -765
  297. package/dist/components/filter.js.map +0 -1
  298. package/dist/components/floating-ui.js +0 -1787
  299. package/dist/components/floating-ui.js.map +0 -1
  300. package/dist/components/form.js +0 -230
  301. package/dist/components/form.js.map +0 -1
  302. package/dist/components/graph.js +0 -256
  303. package/dist/components/graph.js.map +0 -1
  304. package/dist/components/guid.js +0 -26
  305. package/dist/components/guid.js.map +0 -1
  306. package/dist/components/handle.js +0 -121
  307. package/dist/components/handle.js.map +0 -1
  308. package/dist/components/icon.js +0 -204
  309. package/dist/components/icon.js.map +0 -1
  310. package/dist/components/index.d.ts +0 -48
  311. package/dist/components/index.js +0 -190
  312. package/dist/components/index.js.map +0 -1
  313. package/dist/components/index2.js +0 -201
  314. package/dist/components/index2.js.map +0 -1
  315. package/dist/components/input-message.js +0 -103
  316. package/dist/components/input-message.js.map +0 -1
  317. package/dist/components/input.js +0 -742
  318. package/dist/components/input.js.map +0 -1
  319. package/dist/components/interactive.js +0 -53
  320. package/dist/components/interactive.js.map +0 -1
  321. package/dist/components/interfaces.js +0 -21
  322. package/dist/components/interfaces.js.map +0 -1
  323. package/dist/components/interfaces2.js +0 -23
  324. package/dist/components/interfaces2.js.map +0 -1
  325. package/dist/components/interfaces3.js +0 -72
  326. package/dist/components/interfaces3.js.map +0 -1
  327. package/dist/components/json-editor.d.ts +0 -11
  328. package/dist/components/json-editor.js +0 -13
  329. package/dist/components/json-editor.js.map +0 -1
  330. package/dist/components/json-editor2.js +0 -443
  331. package/dist/components/json-editor2.js.map +0 -1
  332. package/dist/components/key.js +0 -18
  333. package/dist/components/key.js.map +0 -1
  334. package/dist/components/label.js +0 -108
  335. package/dist/components/label.js.map +0 -1
  336. package/dist/components/label2.js +0 -133
  337. package/dist/components/label2.js.map +0 -1
  338. package/dist/components/labelFormats.js +0 -212
  339. package/dist/components/labelFormats.js.map +0 -1
  340. package/dist/components/link.js +0 -125
  341. package/dist/components/link.js.map +0 -1
  342. package/dist/components/list-item.js +0 -151
  343. package/dist/components/list-item.js.map +0 -1
  344. package/dist/components/list.js +0 -85
  345. package/dist/components/list.js.map +0 -1
  346. package/dist/components/loadModules.js +0 -30
  347. package/dist/components/loadModules.js.map +0 -1
  348. package/dist/components/loader.js +0 -118
  349. package/dist/components/loader.js.map +0 -1
  350. package/dist/components/locale.js +0 -414
  351. package/dist/components/locale.js.map +0 -1
  352. package/dist/components/locale2.js +0 -415
  353. package/dist/components/locale2.js.map +0 -1
  354. package/dist/components/map-draw-tools.d.ts +0 -11
  355. package/dist/components/map-draw-tools.js +0 -13
  356. package/dist/components/map-draw-tools.js.map +0 -1
  357. package/dist/components/map-draw-tools2.js +0 -230
  358. package/dist/components/map-draw-tools2.js.map +0 -1
  359. package/dist/components/map-layer-picker.d.ts +0 -11
  360. package/dist/components/map-layer-picker.js +0 -13
  361. package/dist/components/map-layer-picker.js.map +0 -1
  362. package/dist/components/map-layer-picker2.js +0 -190
  363. package/dist/components/map-layer-picker2.js.map +0 -1
  364. package/dist/components/map-search.d.ts +0 -11
  365. package/dist/components/map-search.js +0 -157
  366. package/dist/components/map-search.js.map +0 -1
  367. package/dist/components/map-select-tools.d.ts +0 -11
  368. package/dist/components/map-select-tools.js +0 -13
  369. package/dist/components/map-select-tools.js.map +0 -1
  370. package/dist/components/map-select-tools2.js +0 -555
  371. package/dist/components/map-select-tools2.js.map +0 -1
  372. package/dist/components/mapViewUtils.js +0 -131
  373. package/dist/components/mapViewUtils.js.map +0 -1
  374. package/dist/components/math.js +0 -26
  375. package/dist/components/math.js.map +0 -1
  376. package/dist/components/nonChromiumPlatformUtils.js +0 -505
  377. package/dist/components/nonChromiumPlatformUtils.js.map +0 -1
  378. package/dist/components/notice.js +0 -194
  379. package/dist/components/notice.js.map +0 -1
  380. package/dist/components/observers.js +0 -58
  381. package/dist/components/observers.js.map +0 -1
  382. package/dist/components/openCloseComponent.js +0 -58
  383. package/dist/components/openCloseComponent.js.map +0 -1
  384. package/dist/components/option.js +0 -111
  385. package/dist/components/option.js.map +0 -1
  386. package/dist/components/panel.js +0 -461
  387. package/dist/components/panel.js.map +0 -1
  388. package/dist/components/pdf-download.d.ts +0 -11
  389. package/dist/components/pdf-download.js +0 -13
  390. package/dist/components/pdf-download.js.map +0 -1
  391. package/dist/components/pdf-download2.js +0 -243
  392. package/dist/components/pdf-download2.js.map +0 -1
  393. package/dist/components/pick-list-item.js +0 -257
  394. package/dist/components/pick-list-item.js.map +0 -1
  395. package/dist/components/popover.js +0 -502
  396. package/dist/components/popover.js.map +0 -1
  397. package/dist/components/progress.js +0 -62
  398. package/dist/components/progress.js.map +0 -1
  399. package/dist/components/public-notification.d.ts +0 -11
  400. package/dist/components/public-notification.js +0 -784
  401. package/dist/components/public-notification.js.map +0 -1
  402. package/dist/components/publicNotificationStore.js +0 -40
  403. package/dist/components/publicNotificationStore.js.map +0 -1
  404. package/dist/components/queryUtils.js +0 -163
  405. package/dist/components/queryUtils.js.map +0 -1
  406. package/dist/components/radio-group-item.js +0 -103
  407. package/dist/components/radio-group-item.js.map +0 -1
  408. package/dist/components/radio-group.js +0 -237
  409. package/dist/components/radio-group.js.map +0 -1
  410. package/dist/components/refine-selection-tools.d.ts +0 -11
  411. package/dist/components/refine-selection-tools.js +0 -13
  412. package/dist/components/refine-selection-tools.js.map +0 -1
  413. package/dist/components/refine-selection-tools2.js +0 -500
  414. package/dist/components/refine-selection-tools2.js.map +0 -1
  415. package/dist/components/refine-selection.d.ts +0 -11
  416. package/dist/components/refine-selection.js +0 -13
  417. package/dist/components/refine-selection.js.map +0 -1
  418. package/dist/components/refine-selection2.js +0 -369
  419. package/dist/components/refine-selection2.js.map +0 -1
  420. package/dist/components/resources.js +0 -26
  421. package/dist/components/resources.js.map +0 -1
  422. package/dist/components/resources2.js +0 -23
  423. package/dist/components/resources2.js.map +0 -1
  424. package/dist/components/resources3.js +0 -40
  425. package/dist/components/resources3.js.map +0 -1
  426. package/dist/components/scrim.js +0 -85
  427. package/dist/components/scrim.js.map +0 -1
  428. package/dist/components/select.js +0 -261
  429. package/dist/components/select.js.map +0 -1
  430. package/dist/components/shared-list-render.js +0 -321
  431. package/dist/components/shared-list-render.js.map +0 -1
  432. package/dist/components/shell-panel.js +0 -283
  433. package/dist/components/shell-panel.js.map +0 -1
  434. package/dist/components/shell.js +0 -123
  435. package/dist/components/shell.js.map +0 -1
  436. package/dist/components/slider.js +0 -898
  437. package/dist/components/slider.js.map +0 -1
  438. package/dist/components/solution-configuration.d.ts +0 -11
  439. package/dist/components/solution-configuration.js +0 -1141
  440. package/dist/components/solution-configuration.js.map +0 -1
  441. package/dist/components/solution-contents.d.ts +0 -11
  442. package/dist/components/solution-contents.js +0 -13
  443. package/dist/components/solution-contents.js.map +0 -1
  444. package/dist/components/solution-contents2.js +0 -130
  445. package/dist/components/solution-contents2.js.map +0 -1
  446. package/dist/components/solution-item-details.d.ts +0 -11
  447. package/dist/components/solution-item-details.js +0 -13
  448. package/dist/components/solution-item-details.js.map +0 -1
  449. package/dist/components/solution-item-details2.js +0 -236
  450. package/dist/components/solution-item-details2.js.map +0 -1
  451. package/dist/components/solution-item-icon.d.ts +0 -11
  452. package/dist/components/solution-item-icon.js +0 -13
  453. package/dist/components/solution-item-icon.js.map +0 -1
  454. package/dist/components/solution-item-icon2.js +0 -344
  455. package/dist/components/solution-item-icon2.js.map +0 -1
  456. package/dist/components/solution-item-sharing.d.ts +0 -11
  457. package/dist/components/solution-item-sharing.js +0 -13
  458. package/dist/components/solution-item-sharing.js.map +0 -1
  459. package/dist/components/solution-item-sharing2.js +0 -169
  460. package/dist/components/solution-item-sharing2.js.map +0 -1
  461. package/dist/components/solution-item.d.ts +0 -11
  462. package/dist/components/solution-item.js +0 -13
  463. package/dist/components/solution-item.js.map +0 -1
  464. package/dist/components/solution-item2.js +0 -317
  465. package/dist/components/solution-item2.js.map +0 -1
  466. package/dist/components/solution-organization-variables.d.ts +0 -11
  467. package/dist/components/solution-organization-variables.js +0 -13
  468. package/dist/components/solution-organization-variables.js.map +0 -1
  469. package/dist/components/solution-organization-variables2.js +0 -134
  470. package/dist/components/solution-organization-variables2.js.map +0 -1
  471. package/dist/components/solution-resource-item.d.ts +0 -11
  472. package/dist/components/solution-resource-item.js +0 -13
  473. package/dist/components/solution-resource-item.js.map +0 -1
  474. package/dist/components/solution-resource-item2.js +0 -358
  475. package/dist/components/solution-resource-item2.js.map +0 -1
  476. package/dist/components/solution-spatial-ref.d.ts +0 -11
  477. package/dist/components/solution-spatial-ref.js +0 -13
  478. package/dist/components/solution-spatial-ref.js.map +0 -1
  479. package/dist/components/solution-spatial-ref2.js +0 -21448
  480. package/dist/components/solution-spatial-ref2.js.map +0 -1
  481. package/dist/components/solution-store.js +0 -4094
  482. package/dist/components/solution-store.js.map +0 -1
  483. package/dist/components/solution-template-data.d.ts +0 -11
  484. package/dist/components/solution-template-data.js +0 -13
  485. package/dist/components/solution-template-data.js.map +0 -1
  486. package/dist/components/solution-template-data2.js +0 -235
  487. package/dist/components/solution-template-data2.js.map +0 -1
  488. package/dist/components/solution-variables.d.ts +0 -11
  489. package/dist/components/solution-variables.js +0 -13
  490. package/dist/components/solution-variables.js.map +0 -1
  491. package/dist/components/solution-variables2.js +0 -152
  492. package/dist/components/solution-variables2.js.map +0 -1
  493. package/dist/components/sortable.esm.js +0 -3028
  494. package/dist/components/sortable.esm.js.map +0 -1
  495. package/dist/components/store-manager.d.ts +0 -11
  496. package/dist/components/store-manager.js +0 -85
  497. package/dist/components/store-manager.js.map +0 -1
  498. package/dist/components/switch.js +0 -141
  499. package/dist/components/switch.js.map +0 -1
  500. package/dist/components/tab-nav.js +0 -243
  501. package/dist/components/tab-nav.js.map +0 -1
  502. package/dist/components/tab-title.js +0 -278
  503. package/dist/components/tab-title.js.map +0 -1
  504. package/dist/components/tab.js +0 -156
  505. package/dist/components/tab.js.map +0 -1
  506. package/dist/components/tabs.js +0 -190
  507. package/dist/components/tabs.js.map +0 -1
  508. package/dist/components/tile.js +0 -131
  509. package/dist/components/tile.js.map +0 -1
  510. package/dist/components/time-picker.js +0 -945
  511. package/dist/components/time-picker.js.map +0 -1
  512. package/dist/components/tooltip.js +0 -401
  513. package/dist/components/tooltip.js.map +0 -1
  514. package/dist/components/tree-item.js +0 -296
  515. package/dist/components/tree-item.js.map +0 -1
  516. package/dist/components/tree.js +0 -329
  517. package/dist/components/tree.js.map +0 -1
  518. package/dist/components/utils.js +0 -121
  519. package/dist/components/utils.js.map +0 -1
  520. package/dist/components/utils2.js +0 -53
  521. package/dist/components/utils2.js.map +0 -1
  522. package/dist/components/value-list-item.js +0 -206
  523. package/dist/components/value-list-item.js.map +0 -1
  524. package/dist/components/value-list.js +0 -335
  525. package/dist/components/value-list.js.map +0 -1
  526. package/dist/esm/solution-store-c1f6173a.js.map +0 -1
  527. package/dist/solutions-components/p-065830b8.js.map +0 -1
  528. package/dist/solutions-components/p-0e7a0839.entry.js.map +0 -1
  529. package/dist/solutions-components/p-401541a5.entry.js +0 -895
  530. package/dist/solutions-components/p-401541a5.entry.js.map +0 -1
  531. package/dist/solutions-components/p-ee9be0ef.entry.js.map +0 -1
@@ -1,898 +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 { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
7
- import { g as guid } from './guid.js';
8
- import { i as isPrimaryPointerButton, l as intersects } from './dom.js';
9
- import { d as decimalPlaces, c as clamp } from './math.js';
10
- import { c as connectLabel, d as disconnectLabel } from './label2.js';
11
- import { c as connectForm, d as disconnectForm, a as afterConnectDefaultValueSet, H as HiddenFormInputSlot } from './form.js';
12
- import { u as updateHostInteraction } from './interactive.js';
13
- import { i as isActivationKey } from './key.js';
14
- import { n as numberStringFormatter, c as connectLocalized, d as disconnectLocalized } from './locale2.js';
15
- import { d as defineCustomElement$1 } from './graph.js';
16
-
17
- /*!
18
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
19
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
20
- * v1.0.0-beta.97
21
- */
22
- const CSS = {
23
- handleLabel: "handle__label",
24
- handleLabelMinValue: "handle__label--minValue",
25
- handleLabelValue: "handle__label--value",
26
- tickMin: "tick__label--min",
27
- tickMax: "tick__label--max"
28
- };
29
-
30
- const sliderCss = "@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}";
31
-
32
- function isRange(value) {
33
- return Array.isArray(value);
34
- }
35
- const Slider = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
36
- constructor() {
37
- super();
38
- this.__registerHost();
39
- this.__attachShadow();
40
- this.calciteSliderInput = createEvent(this, "calciteSliderInput", 6);
41
- this.calciteSliderChange = createEvent(this, "calciteSliderChange", 6);
42
- this.calciteSliderUpdate = createEvent(this, "calciteSliderUpdate", 6);
43
- //--------------------------------------------------------------------------
44
- //
45
- // Properties
46
- //
47
- //--------------------------------------------------------------------------
48
- /** When `true`, interaction is prevented and the component is displayed with lower opacity. */
49
- this.disabled = false;
50
- /**
51
- * When `true`, number values are displayed with a group separator corresponding to the language and country format.
52
- */
53
- this.groupSeparator = false;
54
- /** When `true`, indicates a histogram is present. */
55
- this.hasHistogram = false;
56
- /** When `true`, displays label handles with their numeric value. */
57
- this.labelHandles = false;
58
- /** When `true` and `ticks` is specified, displays label tick marks with their numeric value. */
59
- this.labelTicks = false;
60
- /** The component's maximum selectable value. */
61
- this.max = 100;
62
- /** The component's minimum selectable value. */
63
- this.min = 0;
64
- /**
65
- * When `true`, the slider will display values from high to low.
66
- *
67
- * Note that this value will be ignored if the slider has an associated histogram.
68
- */
69
- this.mirrored = false;
70
- /** When `true`, sets a finer point for handles. */
71
- this.precise = false;
72
- /**
73
- * When `true`, the component must have a value in order for the form to submit.
74
- */
75
- this.required = false;
76
- /** When `true`, enables snap selection in coordination with `step` via a mouse. */
77
- this.snap = false;
78
- /** Specifies the interval to move with the up, or down keys. */
79
- this.step = 1;
80
- /** The component's value. */
81
- this.value = 0;
82
- /**
83
- * Specifies the size of the component.
84
- */
85
- this.scale = "m";
86
- this.activeProp = "value";
87
- this.guid = `calcite-slider-${guid()}`;
88
- this.effectiveLocale = "";
89
- this.minMaxValueRange = null;
90
- this.minValueDragRange = null;
91
- this.maxValueDragRange = null;
92
- this.tickValues = [];
93
- this.dragUpdate = (event) => {
94
- event.preventDefault();
95
- if (this.dragProp) {
96
- const value = this.translate(event.clientX || event.pageX);
97
- if (isRange(this.value) && this.dragProp === "minMaxValue") {
98
- if (this.minValueDragRange && this.maxValueDragRange && this.minMaxValueRange) {
99
- const newMinValue = value - this.minValueDragRange;
100
- const newMaxValue = value + this.maxValueDragRange;
101
- if (newMaxValue <= this.max &&
102
- newMinValue >= this.min &&
103
- newMaxValue - newMinValue === this.minMaxValueRange) {
104
- this.setValue({
105
- minValue: this.clamp(newMinValue, "minValue"),
106
- maxValue: this.clamp(newMaxValue, "maxValue")
107
- });
108
- }
109
- }
110
- else {
111
- this.minValueDragRange = value - this.minValue;
112
- this.maxValueDragRange = this.maxValue - value;
113
- this.minMaxValueRange = this.maxValue - this.minValue;
114
- }
115
- }
116
- else {
117
- this.setValue({ [this.dragProp]: this.clamp(value, this.dragProp) });
118
- }
119
- }
120
- };
121
- this.pointerUpDragEnd = (event) => {
122
- if (!isPrimaryPointerButton(event)) {
123
- return;
124
- }
125
- this.dragEnd(event);
126
- };
127
- this.dragEnd = (event) => {
128
- this.removeDragListeners();
129
- this.focusActiveHandle(event.clientX);
130
- if (this.lastDragPropValue != this[this.dragProp]) {
131
- this.emitChange();
132
- }
133
- this.dragProp = null;
134
- this.lastDragPropValue = null;
135
- this.minValueDragRange = null;
136
- this.maxValueDragRange = null;
137
- this.minMaxValueRange = null;
138
- };
139
- /**
140
- * Set the reference of the track Element
141
- *
142
- * @internal
143
- * @param node
144
- */
145
- this.storeTrackRef = (node) => {
146
- this.trackEl = node;
147
- };
148
- /**
149
- * Returns a string representing the localized label value based if the groupSeparator prop is parsed.
150
- *
151
- * @param value
152
- */
153
- this.determineGroupSeparator = (value) => {
154
- if (typeof value === "number") {
155
- numberStringFormatter.numberFormatOptions = {
156
- locale: this.effectiveLocale,
157
- numberingSystem: this.numberingSystem,
158
- useGrouping: this.groupSeparator
159
- };
160
- return numberStringFormatter.localize(value.toString());
161
- }
162
- };
163
- }
164
- histogramWatcher(newHistogram) {
165
- this.hasHistogram = !!newHistogram;
166
- }
167
- valueHandler() {
168
- this.setMinMaxFromValue();
169
- }
170
- minMaxValueHandler() {
171
- this.setValueFromMinMax();
172
- }
173
- //--------------------------------------------------------------------------
174
- //
175
- // Lifecycle
176
- //
177
- //--------------------------------------------------------------------------
178
- connectedCallback() {
179
- connectLocalized(this);
180
- this.setMinMaxFromValue();
181
- this.setValueFromMinMax();
182
- connectLabel(this);
183
- connectForm(this);
184
- }
185
- disconnectedCallback() {
186
- disconnectLabel(this);
187
- disconnectForm(this);
188
- disconnectLocalized(this);
189
- this.removeDragListeners();
190
- }
191
- componentWillLoad() {
192
- this.tickValues = this.generateTickValues();
193
- if (!isRange(this.value)) {
194
- this.value = this.clamp(this.value);
195
- }
196
- afterConnectDefaultValueSet(this, this.value);
197
- if (this.snap && !isRange(this.value)) {
198
- this.value = this.getClosestStep(this.value);
199
- }
200
- if (this.histogram) {
201
- this.hasHistogram = true;
202
- }
203
- }
204
- componentDidRender() {
205
- if (this.labelHandles) {
206
- this.adjustHostObscuredHandleLabel("value");
207
- if (isRange(this.value)) {
208
- this.adjustHostObscuredHandleLabel("minValue");
209
- if (!(this.precise && !this.hasHistogram)) {
210
- this.hyphenateCollidingRangeHandleLabels();
211
- }
212
- }
213
- }
214
- this.hideObscuredBoundingTickLabels();
215
- updateHostInteraction(this);
216
- }
217
- render() {
218
- const id = this.el.id || this.guid;
219
- const maxProp = isRange(this.value) ? "maxValue" : "value";
220
- const value = isRange(this.value) ? this.maxValue : this.value;
221
- const displayedValue = this.determineGroupSeparator(value);
222
- const displayedMinValue = this.determineGroupSeparator(this.minValue);
223
- const min = this.minValue || this.min;
224
- const useMinValue = this.shouldUseMinValue();
225
- const minInterval = this.getUnitInterval(useMinValue ? this.minValue : min) * 100;
226
- const maxInterval = this.getUnitInterval(value) * 100;
227
- const mirror = this.shouldMirror();
228
- const leftThumbOffset = `${mirror ? 100 - minInterval : minInterval}%`;
229
- const rightThumbOffset = `${mirror ? maxInterval : 100 - maxInterval}%`;
230
- const valueIsRange = isRange(this.value);
231
- const handleLabelMinValueClasses = `${CSS.handleLabel} ${CSS.handleLabelMinValue}`;
232
- const handleLabelValueClasses = `${CSS.handleLabel} ${CSS.handleLabelValue}`;
233
- const handle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
234
- thumb: true,
235
- "thumb--value": true,
236
- "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
237
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: (event) => this.pointerDownDragStart(event, maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("div", { class: "handle" })));
238
- const labeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
239
- thumb: true,
240
- "thumb--value": true,
241
- "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
242
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: (event) => this.pointerDownDragStart(event, maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("span", { "aria-hidden": "true", class: handleLabelValueClasses }, displayedValue), h("span", { "aria-hidden": "true", class: `${handleLabelValueClasses} static` }, displayedValue), h("span", { "aria-hidden": "true", class: `${handleLabelValueClasses} transformed` }, displayedValue), h("div", { class: "handle" })));
243
- const histogramLabeledHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
244
- thumb: true,
245
- "thumb--value": true,
246
- "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp
247
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: (event) => this.pointerDownDragStart(event, maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("div", { class: "handle" }), h("span", { "aria-hidden": "true", class: handleLabelValueClasses }, displayedValue), h("span", { "aria-hidden": "true", class: `${handleLabelValueClasses} static` }, displayedValue), h("span", { "aria-hidden": "true", class: `${handleLabelValueClasses} transformed` }, displayedValue)));
248
- const preciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
249
- thumb: true,
250
- "thumb--value": true,
251
- "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
252
- "thumb--precise": true
253
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: (event) => this.pointerDownDragStart(event, maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("div", { class: "handle" }), h("div", { class: "handle-extension" })));
254
- const histogramPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
255
- thumb: true,
256
- "thumb--value": true,
257
- "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
258
- "thumb--precise": true
259
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: (event) => this.pointerDownDragStart(event, maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("div", { class: "handle-extension" }), h("div", { class: "handle" })));
260
- const labeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
261
- thumb: true,
262
- "thumb--value": true,
263
- "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
264
- "thumb--precise": true
265
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: (event) => this.pointerDownDragStart(event, maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("span", { "aria-hidden": "true", class: handleLabelValueClasses }, displayedValue), h("span", { "aria-hidden": "true", class: `${handleLabelValueClasses} static` }, displayedValue), h("span", { "aria-hidden": "true", class: `${handleLabelValueClasses} transformed` }, displayedValue), h("div", { class: "handle" }), h("div", { class: "handle-extension" })));
266
- const histogramLabeledPreciseHandle = (h("div", { "aria-disabled": this.disabled, "aria-label": valueIsRange ? this.maxLabel : this.minLabel, "aria-orientation": "horizontal", "aria-valuemax": this.max, "aria-valuemin": this.min, "aria-valuenow": value, class: {
267
- thumb: true,
268
- "thumb--value": true,
269
- "thumb--active": this.lastDragProp !== "minMaxValue" && this.dragProp === maxProp,
270
- "thumb--precise": true
271
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = maxProp), onPointerDown: (event) => this.pointerDownDragStart(event, maxProp), ref: (el) => (this.maxHandle = el), role: "slider", style: { right: rightThumbOffset }, tabIndex: 0 }, h("div", { class: "handle-extension" }), h("div", { class: "handle" }), h("span", { "aria-hidden": "true", class: handleLabelValueClasses }, displayedValue), h("span", { "aria-hidden": "true", class: `${handleLabelValueClasses} static` }, displayedValue), h("span", { "aria-hidden": "true", class: `${handleLabelValueClasses} transformed` }, displayedValue)));
272
- const minHandle = (h("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: {
273
- thumb: true,
274
- "thumb--minValue": true,
275
- "thumb--active": this.dragProp === "minValue"
276
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: (event) => this.pointerDownDragStart(event, "minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 }, h("div", { class: "handle" })));
277
- const minLabeledHandle = (h("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: {
278
- thumb: true,
279
- "thumb--minValue": true,
280
- "thumb--active": this.dragProp === "minValue"
281
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: (event) => this.pointerDownDragStart(event, "minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 }, h("span", { "aria-hidden": "true", class: handleLabelMinValueClasses }, displayedMinValue), h("span", { "aria-hidden": "true", class: `${handleLabelMinValueClasses} static` }, displayedMinValue), h("span", { "aria-hidden": "true", class: `${handleLabelMinValueClasses} transformed` }, displayedMinValue), h("div", { class: "handle" })));
282
- const minHistogramLabeledHandle = (h("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: {
283
- thumb: true,
284
- "thumb--minValue": true,
285
- "thumb--active": this.dragProp === "minValue"
286
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: (event) => this.pointerDownDragStart(event, "minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 }, h("div", { class: "handle" }), h("span", { "aria-hidden": "true", class: handleLabelMinValueClasses }, displayedMinValue), h("span", { "aria-hidden": "true", class: `${handleLabelMinValueClasses} static` }, displayedMinValue), h("span", { "aria-hidden": "true", class: `${handleLabelMinValueClasses} transformed` }, displayedMinValue)));
287
- const minPreciseHandle = (h("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: {
288
- thumb: true,
289
- "thumb--minValue": true,
290
- "thumb--active": this.dragProp === "minValue",
291
- "thumb--precise": true
292
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: (event) => this.pointerDownDragStart(event, "minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 }, h("div", { class: "handle-extension" }), h("div", { class: "handle" })));
293
- const minLabeledPreciseHandle = (h("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: {
294
- thumb: true,
295
- "thumb--minValue": true,
296
- "thumb--active": this.dragProp === "minValue",
297
- "thumb--precise": true
298
- }, onBlur: () => (this.activeProp = null), onFocus: () => (this.activeProp = "minValue"), onPointerDown: (event) => this.pointerDownDragStart(event, "minValue"), ref: (el) => (this.minHandle = el), role: "slider", style: { left: leftThumbOffset }, tabIndex: 0 }, h("div", { class: "handle-extension" }), h("div", { class: "handle" }), h("span", { "aria-hidden": "true", class: handleLabelMinValueClasses }, displayedMinValue), h("span", { "aria-hidden": "true", class: `${handleLabelMinValueClasses} static` }, displayedMinValue), h("span", { "aria-hidden": "true", class: `${handleLabelMinValueClasses} transformed` }, displayedMinValue)));
299
- return (h(Host, { id: id, onTouchStart: this.handleTouchStart }, h("div", { class: {
300
- ["container"]: true,
301
- ["container--range"]: valueIsRange,
302
- [`scale--${this.scale}`]: true
303
- } }, this.renderGraph(), h("div", { class: "track", ref: this.storeTrackRef }, h("div", { class: "track__range", onPointerDown: (event) => this.pointerDownDragStart(event, "minMaxValue"), style: {
304
- left: `${mirror ? 100 - maxInterval : minInterval}%`,
305
- right: `${mirror ? minInterval : 100 - maxInterval}%`
306
- } }), h("div", { class: "ticks" }, this.tickValues.map((tick) => {
307
- const tickOffset = `${this.getUnitInterval(tick) * 100}%`;
308
- let activeTicks = tick >= min && tick <= value;
309
- if (useMinValue) {
310
- activeTicks = tick >= this.minValue && tick <= this.maxValue;
311
- }
312
- return (h("span", { class: {
313
- tick: true,
314
- "tick--active": activeTicks
315
- }, style: {
316
- left: mirror ? "" : tickOffset,
317
- right: mirror ? tickOffset : ""
318
- } }, this.renderTickLabel(tick)));
319
- }))), h("div", { class: "thumb-container" }, !this.precise && !this.labelHandles && valueIsRange && minHandle, !this.hasHistogram &&
320
- !this.precise &&
321
- this.labelHandles &&
322
- valueIsRange &&
323
- minLabeledHandle, this.precise && !this.labelHandles && valueIsRange && minPreciseHandle, this.precise && this.labelHandles && valueIsRange && minLabeledPreciseHandle, this.hasHistogram &&
324
- !this.precise &&
325
- this.labelHandles &&
326
- valueIsRange &&
327
- minHistogramLabeledHandle, !this.precise && !this.labelHandles && handle, !this.hasHistogram && !this.precise && this.labelHandles && labeledHandle, !this.hasHistogram && this.precise && !this.labelHandles && preciseHandle, this.hasHistogram && this.precise && !this.labelHandles && histogramPreciseHandle, !this.hasHistogram && this.precise && this.labelHandles && labeledPreciseHandle, this.hasHistogram && !this.precise && this.labelHandles && histogramLabeledHandle, this.hasHistogram &&
328
- this.precise &&
329
- this.labelHandles &&
330
- histogramLabeledPreciseHandle, h(HiddenFormInputSlot, { component: this })))));
331
- }
332
- renderGraph() {
333
- return this.histogram ? (h("calcite-graph", { class: "graph", colorStops: this.histogramStops, data: this.histogram, highlightMax: isRange(this.value) ? this.maxValue : this.value, highlightMin: isRange(this.value) ? this.minValue : this.min, max: this.max, min: this.min })) : null;
334
- }
335
- renderTickLabel(tick) {
336
- const valueIsRange = isRange(this.value);
337
- const isMinTickLabel = tick === this.min;
338
- const isMaxTickLabel = tick === this.max;
339
- const displayedTickValue = this.determineGroupSeparator(tick);
340
- const tickLabel = (h("span", { class: {
341
- tick__label: true,
342
- [CSS.tickMin]: isMinTickLabel,
343
- [CSS.tickMax]: isMaxTickLabel
344
- } }, displayedTickValue));
345
- if (this.labelTicks && !this.hasHistogram && !valueIsRange) {
346
- return tickLabel;
347
- }
348
- if (this.labelTicks &&
349
- !this.hasHistogram &&
350
- valueIsRange &&
351
- !this.precise &&
352
- !this.labelHandles) {
353
- return tickLabel;
354
- }
355
- if (this.labelTicks &&
356
- !this.hasHistogram &&
357
- valueIsRange &&
358
- !this.precise &&
359
- this.labelHandles) {
360
- return tickLabel;
361
- }
362
- if (this.labelTicks &&
363
- !this.hasHistogram &&
364
- valueIsRange &&
365
- this.precise &&
366
- (isMinTickLabel || isMaxTickLabel)) {
367
- return tickLabel;
368
- }
369
- if (this.labelTicks && this.hasHistogram && !this.precise && !this.labelHandles) {
370
- return tickLabel;
371
- }
372
- if (this.labelTicks &&
373
- this.hasHistogram &&
374
- this.precise &&
375
- !this.labelHandles &&
376
- (isMinTickLabel || isMaxTickLabel)) {
377
- return tickLabel;
378
- }
379
- if (this.labelTicks &&
380
- this.hasHistogram &&
381
- !this.precise &&
382
- this.labelHandles &&
383
- (isMinTickLabel || isMaxTickLabel)) {
384
- return tickLabel;
385
- }
386
- if (this.labelTicks &&
387
- this.hasHistogram &&
388
- this.precise &&
389
- this.labelHandles &&
390
- (isMinTickLabel || isMaxTickLabel)) {
391
- return tickLabel;
392
- }
393
- return null;
394
- }
395
- //--------------------------------------------------------------------------
396
- //
397
- // Event Listeners
398
- //
399
- //--------------------------------------------------------------------------
400
- keyDownHandler(event) {
401
- const mirror = this.shouldMirror();
402
- const { activeProp, max, min, pageStep, step } = this;
403
- const value = this[activeProp];
404
- const { key } = event;
405
- if (isActivationKey(key)) {
406
- event.preventDefault();
407
- return;
408
- }
409
- let adjustment;
410
- if (key === "ArrowUp" || key === "ArrowRight") {
411
- const directionFactor = mirror && key === "ArrowRight" ? -1 : 1;
412
- adjustment = value + step * directionFactor;
413
- }
414
- else if (key === "ArrowDown" || key === "ArrowLeft") {
415
- const directionFactor = mirror && key === "ArrowLeft" ? -1 : 1;
416
- adjustment = value - step * directionFactor;
417
- }
418
- else if (key === "PageUp") {
419
- if (pageStep) {
420
- adjustment = value + pageStep;
421
- }
422
- }
423
- else if (key === "PageDown") {
424
- if (pageStep) {
425
- adjustment = value - pageStep;
426
- }
427
- }
428
- else if (key === "Home") {
429
- adjustment = min;
430
- }
431
- else if (key === "End") {
432
- adjustment = max;
433
- }
434
- if (isNaN(adjustment)) {
435
- return;
436
- }
437
- event.preventDefault();
438
- const fixedDecimalAdjustment = Number(adjustment.toFixed(decimalPlaces(step)));
439
- this.setValue({
440
- [activeProp]: this.clamp(fixedDecimalAdjustment, activeProp)
441
- });
442
- }
443
- pointerDownHandler(event) {
444
- if (!isPrimaryPointerButton(event)) {
445
- return;
446
- }
447
- const x = event.clientX || event.pageX;
448
- const position = this.translate(x);
449
- let prop = "value";
450
- if (isRange(this.value)) {
451
- const inRange = position >= this.minValue && position <= this.maxValue;
452
- if (inRange && this.lastDragProp === "minMaxValue") {
453
- prop = "minMaxValue";
454
- }
455
- else {
456
- const closerToMax = Math.abs(this.maxValue - position) < Math.abs(this.minValue - position);
457
- prop = closerToMax || position > this.maxValue ? "maxValue" : "minValue";
458
- }
459
- }
460
- this.lastDragPropValue = this[prop];
461
- this.dragStart(prop);
462
- const isThumbActive = this.el.shadowRoot.querySelector(".thumb:active");
463
- if (!isThumbActive) {
464
- this.setValue({ [prop]: this.clamp(position, prop) });
465
- }
466
- this.focusActiveHandle(x);
467
- }
468
- handleTouchStart(event) {
469
- // needed to prevent extra click at the end of a handle drag
470
- event.preventDefault();
471
- }
472
- //--------------------------------------------------------------------------
473
- //
474
- // Public Methods
475
- //
476
- //--------------------------------------------------------------------------
477
- /** Sets focus on the component. */
478
- async setFocus() {
479
- const handle = this.minHandle ? this.minHandle : this.maxHandle;
480
- handle === null || handle === void 0 ? void 0 : handle.focus();
481
- }
482
- //--------------------------------------------------------------------------
483
- //
484
- // Private Methods
485
- //
486
- //--------------------------------------------------------------------------
487
- setValueFromMinMax() {
488
- const { minValue, maxValue } = this;
489
- if (typeof minValue === "number" && typeof maxValue === "number") {
490
- this.value = [minValue, maxValue];
491
- }
492
- }
493
- setMinMaxFromValue() {
494
- const { value } = this;
495
- if (isRange(value)) {
496
- this.minValue = value[0];
497
- this.maxValue = value[1];
498
- }
499
- }
500
- onLabelClick() {
501
- this.setFocus();
502
- }
503
- shouldMirror() {
504
- return this.mirrored && !this.hasHistogram;
505
- }
506
- shouldUseMinValue() {
507
- if (!isRange(this.value)) {
508
- return false;
509
- }
510
- return ((this.hasHistogram && this.maxValue === 0) || (!this.hasHistogram && this.minValue === 0));
511
- }
512
- generateTickValues() {
513
- const ticks = [];
514
- let current = this.min;
515
- while (this.ticks && current < this.max + this.ticks) {
516
- ticks.push(Math.min(current, this.max));
517
- current = current + this.ticks;
518
- }
519
- return ticks;
520
- }
521
- pointerDownDragStart(event, prop) {
522
- if (!isPrimaryPointerButton(event)) {
523
- return;
524
- }
525
- this.dragStart(prop);
526
- }
527
- dragStart(prop) {
528
- this.dragProp = prop;
529
- this.lastDragProp = this.dragProp;
530
- this.activeProp = prop;
531
- document.addEventListener("pointermove", this.dragUpdate);
532
- document.addEventListener("pointerup", this.pointerUpDragEnd);
533
- document.addEventListener("pointercancel", this.dragEnd);
534
- }
535
- focusActiveHandle(valueX) {
536
- switch (this.dragProp) {
537
- case "minValue":
538
- this.minHandle.focus();
539
- break;
540
- case "maxValue":
541
- case "value":
542
- this.maxHandle.focus();
543
- break;
544
- case "minMaxValue":
545
- this.getClosestHandle(valueX).focus();
546
- break;
547
- }
548
- }
549
- emitInput() {
550
- this.calciteSliderInput.emit();
551
- this.calciteSliderUpdate.emit();
552
- }
553
- emitChange() {
554
- this.calciteSliderChange.emit();
555
- }
556
- removeDragListeners() {
557
- document.removeEventListener("pointermove", this.dragUpdate);
558
- document.removeEventListener("pointerup", this.pointerUpDragEnd);
559
- document.removeEventListener("pointercancel", this.dragEnd);
560
- }
561
- /**
562
- * Set prop value(s) if changed at the component level
563
- *
564
- * @param {object} values - a set of key/value pairs delineating what properties in the component to update
565
- */
566
- setValue(values) {
567
- let valueChanged;
568
- Object.keys(values).forEach((propName) => {
569
- const newValue = values[propName];
570
- if (!valueChanged) {
571
- const oldValue = this[propName];
572
- valueChanged = oldValue !== newValue;
573
- }
574
- this[propName] = newValue;
575
- });
576
- if (!valueChanged) {
577
- return;
578
- }
579
- const dragging = this.dragProp;
580
- if (!dragging) {
581
- this.emitChange();
582
- }
583
- this.emitInput();
584
- }
585
- /**
586
- * If number is outside range, constrain to min or max
587
- *
588
- * @param value
589
- * @param prop
590
- * @internal
591
- */
592
- clamp(value, prop) {
593
- value = clamp(value, this.min, this.max);
594
- // ensure that maxValue and minValue don't swap positions
595
- if (prop === "maxValue") {
596
- value = Math.max(value, this.minValue);
597
- }
598
- if (prop === "minValue") {
599
- value = Math.min(value, this.maxValue);
600
- }
601
- return value;
602
- }
603
- /**
604
- * Translate a pixel position to value along the range
605
- *
606
- * @param x
607
- * @internal
608
- */
609
- translate(x) {
610
- const range = this.max - this.min;
611
- const { left, width } = this.trackEl.getBoundingClientRect();
612
- const percent = (x - left) / width;
613
- const mirror = this.shouldMirror();
614
- const clampedValue = this.clamp(this.min + range * (mirror ? 1 - percent : percent));
615
- let value = Number(clampedValue.toFixed(decimalPlaces(this.step)));
616
- if (this.snap && this.step) {
617
- value = this.getClosestStep(value);
618
- }
619
- return value;
620
- }
621
- /**
622
- * Get closest allowed value along stepped values
623
- *
624
- * @param num
625
- * @internal
626
- */
627
- getClosestStep(num) {
628
- num = Number(this.clamp(num).toFixed(decimalPlaces(this.step)));
629
- if (this.step) {
630
- const step = Math.round(num / this.step) * this.step;
631
- num = Number(this.clamp(step).toFixed(decimalPlaces(this.step)));
632
- }
633
- return num;
634
- }
635
- getClosestHandle(valueX) {
636
- return this.getDistanceX(this.maxHandle, valueX) > this.getDistanceX(this.minHandle, valueX)
637
- ? this.minHandle
638
- : this.maxHandle;
639
- }
640
- getDistanceX(el, valueX) {
641
- return Math.abs(el.getBoundingClientRect().left - valueX);
642
- }
643
- getFontSizeForElement(element) {
644
- return Number(window.getComputedStyle(element).getPropertyValue("font-size").match(/\d+/)[0]);
645
- }
646
- /**
647
- * Get position of value along range as fractional value
648
- *
649
- * @param num
650
- * @return {number} number in the unit interval [0,1]
651
- * @internal
652
- */
653
- getUnitInterval(num) {
654
- num = this.clamp(num);
655
- const range = this.max - this.min;
656
- return (num - this.min) / range;
657
- }
658
- adjustHostObscuredHandleLabel(name) {
659
- const label = this.el.shadowRoot.querySelector(`.handle__label--${name}`);
660
- const labelStatic = this.el.shadowRoot.querySelector(`.handle__label--${name}.static`);
661
- const labelTransformed = this.el.shadowRoot.querySelector(`.handle__label--${name}.transformed`);
662
- const labelStaticBounds = labelStatic.getBoundingClientRect();
663
- const labelStaticOffset = this.getHostOffset(labelStaticBounds.left, labelStaticBounds.right);
664
- label.style.transform = `translateX(${labelStaticOffset}px)`;
665
- labelTransformed.style.transform = `translateX(${labelStaticOffset}px)`;
666
- }
667
- hyphenateCollidingRangeHandleLabels() {
668
- const { shadowRoot } = this.el;
669
- const mirror = this.shouldMirror();
670
- const leftModifier = mirror ? "value" : "minValue";
671
- const rightModifier = mirror ? "minValue" : "value";
672
- const leftValueLabel = shadowRoot.querySelector(`.handle__label--${leftModifier}`);
673
- const leftValueLabelStatic = shadowRoot.querySelector(`.handle__label--${leftModifier}.static`);
674
- const leftValueLabelTransformed = shadowRoot.querySelector(`.handle__label--${leftModifier}.transformed`);
675
- const leftValueLabelStaticHostOffset = this.getHostOffset(leftValueLabelStatic.getBoundingClientRect().left, leftValueLabelStatic.getBoundingClientRect().right);
676
- const rightValueLabel = shadowRoot.querySelector(`.handle__label--${rightModifier}`);
677
- const rightValueLabelStatic = shadowRoot.querySelector(`.handle__label--${rightModifier}.static`);
678
- const rightValueLabelTransformed = shadowRoot.querySelector(`.handle__label--${rightModifier}.transformed`);
679
- const rightValueLabelStaticHostOffset = this.getHostOffset(rightValueLabelStatic.getBoundingClientRect().left, rightValueLabelStatic.getBoundingClientRect().right);
680
- const labelFontSize = this.getFontSizeForElement(leftValueLabel);
681
- const labelTransformedOverlap = this.getRangeLabelOverlap(leftValueLabelTransformed, rightValueLabelTransformed);
682
- const hyphenLabel = leftValueLabel;
683
- const labelOffset = labelFontSize / 2;
684
- if (labelTransformedOverlap > 0) {
685
- hyphenLabel.classList.add("hyphen", "hyphen--wrap");
686
- if (rightValueLabelStaticHostOffset === 0 && leftValueLabelStaticHostOffset === 0) {
687
- // Neither handle overlaps the host boundary
688
- let leftValueLabelTranslate = labelTransformedOverlap / 2 - labelOffset;
689
- leftValueLabelTranslate =
690
- Math.sign(leftValueLabelTranslate) === -1
691
- ? Math.abs(leftValueLabelTranslate)
692
- : -leftValueLabelTranslate;
693
- const leftValueLabelTransformedHostOffset = this.getHostOffset(leftValueLabelTransformed.getBoundingClientRect().left +
694
- leftValueLabelTranslate -
695
- labelOffset, leftValueLabelTransformed.getBoundingClientRect().right +
696
- leftValueLabelTranslate -
697
- labelOffset);
698
- let rightValueLabelTranslate = labelTransformedOverlap / 2;
699
- const rightValueLabelTransformedHostOffset = this.getHostOffset(rightValueLabelTransformed.getBoundingClientRect().left + rightValueLabelTranslate, rightValueLabelTransformed.getBoundingClientRect().right + rightValueLabelTranslate);
700
- if (leftValueLabelTransformedHostOffset !== 0) {
701
- leftValueLabelTranslate += leftValueLabelTransformedHostOffset;
702
- rightValueLabelTranslate += leftValueLabelTransformedHostOffset;
703
- }
704
- if (rightValueLabelTransformedHostOffset !== 0) {
705
- leftValueLabelTranslate += rightValueLabelTransformedHostOffset;
706
- rightValueLabelTranslate += rightValueLabelTransformedHostOffset;
707
- }
708
- leftValueLabel.style.transform = `translateX(${leftValueLabelTranslate}px)`;
709
- leftValueLabelTransformed.style.transform = `translateX(${leftValueLabelTranslate - labelOffset}px)`;
710
- rightValueLabel.style.transform = `translateX(${rightValueLabelTranslate}px)`;
711
- rightValueLabelTransformed.style.transform = `translateX(${rightValueLabelTranslate}px)`;
712
- }
713
- else if (leftValueLabelStaticHostOffset > 0 || rightValueLabelStaticHostOffset > 0) {
714
- // labels overlap host boundary on the left side
715
- leftValueLabel.style.transform = `translateX(${leftValueLabelStaticHostOffset + labelOffset}px)`;
716
- rightValueLabel.style.transform = `translateX(${labelTransformedOverlap + rightValueLabelStaticHostOffset}px)`;
717
- rightValueLabelTransformed.style.transform = `translateX(${labelTransformedOverlap + rightValueLabelStaticHostOffset}px)`;
718
- }
719
- else if (leftValueLabelStaticHostOffset < 0 || rightValueLabelStaticHostOffset < 0) {
720
- // labels overlap host boundary on the right side
721
- let leftValueLabelTranslate = Math.abs(leftValueLabelStaticHostOffset) + labelTransformedOverlap - labelOffset;
722
- leftValueLabelTranslate =
723
- Math.sign(leftValueLabelTranslate) === -1
724
- ? Math.abs(leftValueLabelTranslate)
725
- : -leftValueLabelTranslate;
726
- leftValueLabel.style.transform = `translateX(${leftValueLabelTranslate}px)`;
727
- leftValueLabelTransformed.style.transform = `translateX(${leftValueLabelTranslate - labelOffset}px)`;
728
- }
729
- }
730
- else {
731
- hyphenLabel.classList.remove("hyphen", "hyphen--wrap");
732
- leftValueLabel.style.transform = `translateX(${leftValueLabelStaticHostOffset}px)`;
733
- leftValueLabelTransformed.style.transform = `translateX(${leftValueLabelStaticHostOffset}px)`;
734
- rightValueLabel.style.transform = `translateX(${rightValueLabelStaticHostOffset}px)`;
735
- rightValueLabelTransformed.style.transform = `translateX(${rightValueLabelStaticHostOffset}px)`;
736
- }
737
- }
738
- /**
739
- * Hides bounding tick labels that are obscured by either handle.
740
- */
741
- hideObscuredBoundingTickLabels() {
742
- const valueIsRange = isRange(this.value);
743
- if (!this.hasHistogram && !valueIsRange && !this.labelHandles && !this.precise) {
744
- return;
745
- }
746
- if (!this.hasHistogram && !valueIsRange && this.labelHandles && !this.precise) {
747
- return;
748
- }
749
- if (!this.hasHistogram && !valueIsRange && !this.labelHandles && this.precise) {
750
- return;
751
- }
752
- if (!this.hasHistogram && !valueIsRange && this.labelHandles && this.precise) {
753
- return;
754
- }
755
- if (!this.hasHistogram && valueIsRange && !this.precise) {
756
- return;
757
- }
758
- if (this.hasHistogram && !this.precise && !this.labelHandles) {
759
- return;
760
- }
761
- const minHandle = this.el.shadowRoot.querySelector(".thumb--minValue");
762
- const maxHandle = this.el.shadowRoot.querySelector(".thumb--value");
763
- const minTickLabel = this.el.shadowRoot.querySelector(".tick__label--min");
764
- const maxTickLabel = this.el.shadowRoot.querySelector(".tick__label--max");
765
- if (!minHandle && maxHandle && minTickLabel && maxTickLabel) {
766
- minTickLabel.style.opacity = this.isMinTickLabelObscured(minTickLabel, maxHandle) ? "0" : "1";
767
- maxTickLabel.style.opacity = this.isMaxTickLabelObscured(maxTickLabel, maxHandle) ? "0" : "1";
768
- }
769
- if (minHandle && maxHandle && minTickLabel && maxTickLabel) {
770
- minTickLabel.style.opacity =
771
- this.isMinTickLabelObscured(minTickLabel, minHandle) ||
772
- this.isMinTickLabelObscured(minTickLabel, maxHandle)
773
- ? "0"
774
- : "1";
775
- maxTickLabel.style.opacity =
776
- this.isMaxTickLabelObscured(maxTickLabel, minHandle) ||
777
- (this.isMaxTickLabelObscured(maxTickLabel, maxHandle) && this.hasHistogram)
778
- ? "0"
779
- : "1";
780
- }
781
- }
782
- /**
783
- * Returns an integer representing the number of pixels to offset on the left or right side based on desired position behavior.
784
- *
785
- * @param leftBounds
786
- * @param rightBounds
787
- * @internal
788
- */
789
- getHostOffset(leftBounds, rightBounds) {
790
- const hostBounds = this.el.getBoundingClientRect();
791
- const buffer = 7;
792
- if (leftBounds + buffer < hostBounds.left) {
793
- return hostBounds.left - leftBounds - buffer;
794
- }
795
- if (rightBounds - buffer > hostBounds.right) {
796
- return -(rightBounds - hostBounds.right) + buffer;
797
- }
798
- return 0;
799
- }
800
- /**
801
- * Returns an integer representing the number of pixels that the two given span elements are overlapping, taking into account
802
- * a space in between the two spans equal to the font-size set on them to account for the space needed to render a hyphen.
803
- *
804
- * @param leftLabel
805
- * @param rightLabel
806
- */
807
- getRangeLabelOverlap(leftLabel, rightLabel) {
808
- const leftLabelBounds = leftLabel.getBoundingClientRect();
809
- const rightLabelBounds = rightLabel.getBoundingClientRect();
810
- const leftLabelFontSize = this.getFontSizeForElement(leftLabel);
811
- const rangeLabelOverlap = leftLabelBounds.right + leftLabelFontSize - rightLabelBounds.left;
812
- return Math.max(rangeLabelOverlap, 0);
813
- }
814
- /**
815
- * Returns a boolean value representing if the minLabel span element is obscured (being overlapped) by the given handle div element.
816
- *
817
- * @param minLabel
818
- * @param handle
819
- */
820
- isMinTickLabelObscured(minLabel, handle) {
821
- const minLabelBounds = minLabel.getBoundingClientRect();
822
- const handleBounds = handle.getBoundingClientRect();
823
- return intersects(minLabelBounds, handleBounds);
824
- }
825
- /**
826
- * Returns a boolean value representing if the maxLabel span element is obscured (being overlapped) by the given handle div element.
827
- *
828
- * @param maxLabel
829
- * @param handle
830
- */
831
- isMaxTickLabelObscured(maxLabel, handle) {
832
- const maxLabelBounds = maxLabel.getBoundingClientRect();
833
- const handleBounds = handle.getBoundingClientRect();
834
- return intersects(maxLabelBounds, handleBounds);
835
- }
836
- get el() { return this; }
837
- static get watchers() { return {
838
- "histogram": ["histogramWatcher"],
839
- "value": ["valueHandler"],
840
- "minValue": ["minMaxValueHandler"],
841
- "maxValue": ["minMaxValueHandler"]
842
- }; }
843
- static get style() { return sliderCss; }
844
- }, [1, "calcite-slider", {
845
- "disabled": [516],
846
- "groupSeparator": [516, "group-separator"],
847
- "hasHistogram": [1540, "has-histogram"],
848
- "histogram": [16],
849
- "histogramStops": [16],
850
- "labelHandles": [516, "label-handles"],
851
- "labelTicks": [516, "label-ticks"],
852
- "max": [514],
853
- "maxLabel": [1, "max-label"],
854
- "maxValue": [1026, "max-value"],
855
- "min": [514],
856
- "minLabel": [1, "min-label"],
857
- "minValue": [1026, "min-value"],
858
- "mirrored": [516],
859
- "name": [513],
860
- "numberingSystem": [1, "numbering-system"],
861
- "pageStep": [514, "page-step"],
862
- "precise": [516],
863
- "required": [516],
864
- "snap": [516],
865
- "step": [514],
866
- "ticks": [514],
867
- "value": [1538],
868
- "scale": [513],
869
- "effectiveLocale": [32],
870
- "minMaxValueRange": [32],
871
- "minValueDragRange": [32],
872
- "maxValueDragRange": [32],
873
- "tickValues": [32],
874
- "setFocus": [64]
875
- }, [[0, "keydown", "keyDownHandler"], [1, "pointerdown", "pointerDownHandler"]]]);
876
- function defineCustomElement() {
877
- if (typeof customElements === "undefined") {
878
- return;
879
- }
880
- const components = ["calcite-slider", "calcite-graph"];
881
- components.forEach(tagName => { switch (tagName) {
882
- case "calcite-slider":
883
- if (!customElements.get(tagName)) {
884
- customElements.define(tagName, Slider);
885
- }
886
- break;
887
- case "calcite-graph":
888
- if (!customElements.get(tagName)) {
889
- defineCustomElement$1();
890
- }
891
- break;
892
- } });
893
- }
894
- defineCustomElement();
895
-
896
- export { Slider as S, defineCustomElement as d };
897
-
898
- //# sourceMappingURL=slider.js.map