@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,1787 +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 { c as getElementDir, k as closestElementCrossShadowBoundary } from './dom.js';
7
- import { Build } from '@stencil/core/internal/client';
8
- import { d as debounce } from './debounce.js';
9
-
10
- function getSide(placement) {
11
- return placement.split('-')[0];
12
- }
13
-
14
- function getAlignment(placement) {
15
- return placement.split('-')[1];
16
- }
17
-
18
- function getMainAxisFromPlacement(placement) {
19
- return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
20
- }
21
-
22
- function getLengthFromAxis(axis) {
23
- return axis === 'y' ? 'height' : 'width';
24
- }
25
-
26
- function computeCoordsFromPlacement(_ref, placement, rtl) {
27
- let {
28
- reference,
29
- floating
30
- } = _ref;
31
- const commonX = reference.x + reference.width / 2 - floating.width / 2;
32
- const commonY = reference.y + reference.height / 2 - floating.height / 2;
33
- const mainAxis = getMainAxisFromPlacement(placement);
34
- const length = getLengthFromAxis(mainAxis);
35
- const commonAlign = reference[length] / 2 - floating[length] / 2;
36
- const side = getSide(placement);
37
- const isVertical = mainAxis === 'x';
38
- let coords;
39
-
40
- switch (side) {
41
- case 'top':
42
- coords = {
43
- x: commonX,
44
- y: reference.y - floating.height
45
- };
46
- break;
47
-
48
- case 'bottom':
49
- coords = {
50
- x: commonX,
51
- y: reference.y + reference.height
52
- };
53
- break;
54
-
55
- case 'right':
56
- coords = {
57
- x: reference.x + reference.width,
58
- y: commonY
59
- };
60
- break;
61
-
62
- case 'left':
63
- coords = {
64
- x: reference.x - floating.width,
65
- y: commonY
66
- };
67
- break;
68
-
69
- default:
70
- coords = {
71
- x: reference.x,
72
- y: reference.y
73
- };
74
- }
75
-
76
- switch (getAlignment(placement)) {
77
- case 'start':
78
- coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
79
- break;
80
-
81
- case 'end':
82
- coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
83
- break;
84
- }
85
-
86
- return coords;
87
- }
88
-
89
- /**
90
- * Computes the `x` and `y` coordinates that will place the floating element
91
- * next to a reference element when it is given a certain positioning strategy.
92
- *
93
- * This export does not have any `platform` interface logic. You will need to
94
- * write one for the platform you are using Floating UI with.
95
- */
96
-
97
- const computePosition$1 = async (reference, floating, config) => {
98
- const {
99
- placement = 'bottom',
100
- strategy = 'absolute',
101
- middleware = [],
102
- platform
103
- } = config;
104
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
105
-
106
- let rects = await platform.getElementRects({
107
- reference,
108
- floating,
109
- strategy
110
- });
111
- let {
112
- x,
113
- y
114
- } = computeCoordsFromPlacement(rects, placement, rtl);
115
- let statefulPlacement = placement;
116
- let middlewareData = {};
117
- let resetCount = 0;
118
-
119
- for (let i = 0; i < middleware.length; i++) {
120
- const {
121
- name,
122
- fn
123
- } = middleware[i];
124
- const {
125
- x: nextX,
126
- y: nextY,
127
- data,
128
- reset
129
- } = await fn({
130
- x,
131
- y,
132
- initialPlacement: placement,
133
- placement: statefulPlacement,
134
- strategy,
135
- middlewareData,
136
- rects,
137
- platform,
138
- elements: {
139
- reference,
140
- floating
141
- }
142
- });
143
- x = nextX != null ? nextX : x;
144
- y = nextY != null ? nextY : y;
145
- middlewareData = { ...middlewareData,
146
- [name]: { ...middlewareData[name],
147
- ...data
148
- }
149
- };
150
-
151
- if (reset && resetCount <= 50) {
152
- resetCount++;
153
-
154
- if (typeof reset === 'object') {
155
- if (reset.placement) {
156
- statefulPlacement = reset.placement;
157
- }
158
-
159
- if (reset.rects) {
160
- rects = reset.rects === true ? await platform.getElementRects({
161
- reference,
162
- floating,
163
- strategy
164
- }) : reset.rects;
165
- }
166
-
167
- ({
168
- x,
169
- y
170
- } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
171
- }
172
-
173
- i = -1;
174
- continue;
175
- }
176
- }
177
-
178
- return {
179
- x,
180
- y,
181
- placement: statefulPlacement,
182
- strategy,
183
- middlewareData
184
- };
185
- };
186
-
187
- function expandPaddingObject(padding) {
188
- return {
189
- top: 0,
190
- right: 0,
191
- bottom: 0,
192
- left: 0,
193
- ...padding
194
- };
195
- }
196
-
197
- function getSideObjectFromPadding(padding) {
198
- return typeof padding !== 'number' ? expandPaddingObject(padding) : {
199
- top: padding,
200
- right: padding,
201
- bottom: padding,
202
- left: padding
203
- };
204
- }
205
-
206
- function rectToClientRect(rect) {
207
- return { ...rect,
208
- top: rect.y,
209
- left: rect.x,
210
- right: rect.x + rect.width,
211
- bottom: rect.y + rect.height
212
- };
213
- }
214
-
215
- /**
216
- * Resolves with an object of overflow side offsets that determine how much the
217
- * element is overflowing a given clipping boundary.
218
- * - positive = overflowing the boundary by that number of pixels
219
- * - negative = how many pixels left before it will overflow
220
- * - 0 = lies flush with the boundary
221
- * @see https://floating-ui.com/docs/detectOverflow
222
- */
223
- async function detectOverflow(middlewareArguments, options) {
224
- var _await$platform$isEle;
225
-
226
- if (options === void 0) {
227
- options = {};
228
- }
229
-
230
- const {
231
- x,
232
- y,
233
- platform,
234
- rects,
235
- elements,
236
- strategy
237
- } = middlewareArguments;
238
- const {
239
- boundary = 'clippingAncestors',
240
- rootBoundary = 'viewport',
241
- elementContext = 'floating',
242
- altBoundary = false,
243
- padding = 0
244
- } = options;
245
- const paddingObject = getSideObjectFromPadding(padding);
246
- const altContext = elementContext === 'floating' ? 'reference' : 'floating';
247
- const element = elements[altBoundary ? altContext : elementContext];
248
- const clippingClientRect = rectToClientRect(await platform.getClippingRect({
249
- element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
250
- boundary,
251
- rootBoundary,
252
- strategy
253
- }));
254
- const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
255
- rect: elementContext === 'floating' ? { ...rects.floating,
256
- x,
257
- y
258
- } : rects.reference,
259
- offsetParent: await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)),
260
- strategy
261
- }) : rects[elementContext]);
262
- return {
263
- top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
264
- bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
265
- left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
266
- right: elementClientRect.right - clippingClientRect.right + paddingObject.right
267
- };
268
- }
269
-
270
- const min$1 = Math.min;
271
- const max$1 = Math.max;
272
-
273
- function within(min$1$1, value, max$1$1) {
274
- return max$1(min$1$1, min$1(value, max$1$1));
275
- }
276
-
277
- /**
278
- * Positions an inner element of the floating element such that it is centered
279
- * to the reference element.
280
- * @see https://floating-ui.com/docs/arrow
281
- */
282
- const arrow = options => ({
283
- name: 'arrow',
284
- options,
285
-
286
- async fn(middlewareArguments) {
287
- // Since `element` is required, we don't Partial<> the type
288
- const {
289
- element,
290
- padding = 0
291
- } = options != null ? options : {};
292
- const {
293
- x,
294
- y,
295
- placement,
296
- rects,
297
- platform
298
- } = middlewareArguments;
299
-
300
- if (element == null) {
301
-
302
- return {};
303
- }
304
-
305
- const paddingObject = getSideObjectFromPadding(padding);
306
- const coords = {
307
- x,
308
- y
309
- };
310
- const axis = getMainAxisFromPlacement(placement);
311
- const alignment = getAlignment(placement);
312
- const length = getLengthFromAxis(axis);
313
- const arrowDimensions = await platform.getDimensions(element);
314
- const minProp = axis === 'y' ? 'top' : 'left';
315
- const maxProp = axis === 'y' ? 'bottom' : 'right';
316
- const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
317
- const startDiff = coords[axis] - rects.reference[axis];
318
- const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
319
- let clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
320
-
321
- if (clientSize === 0) {
322
- clientSize = rects.floating[length];
323
- }
324
-
325
- const centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the floating element if the center
326
- // point is outside the floating element's bounds
327
-
328
- const min = paddingObject[minProp];
329
- const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];
330
- const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
331
- const offset = within(min, center, max); // Make sure that arrow points at the reference
332
-
333
- const alignmentPadding = alignment === 'start' ? paddingObject[minProp] : paddingObject[maxProp];
334
- const shouldAddOffset = alignmentPadding > 0 && center !== offset && rects.reference[length] <= rects.floating[length];
335
- const alignmentOffset = shouldAddOffset ? center < min ? min - center : max - center : 0;
336
- return {
337
- [axis]: coords[axis] - alignmentOffset,
338
- data: {
339
- [axis]: offset,
340
- centerOffset: center - offset
341
- }
342
- };
343
- }
344
-
345
- });
346
-
347
- const hash$1 = {
348
- left: 'right',
349
- right: 'left',
350
- bottom: 'top',
351
- top: 'bottom'
352
- };
353
- function getOppositePlacement(placement) {
354
- return placement.replace(/left|right|bottom|top/g, matched => hash$1[matched]);
355
- }
356
-
357
- function getAlignmentSides(placement, rects, rtl) {
358
- if (rtl === void 0) {
359
- rtl = false;
360
- }
361
-
362
- const alignment = getAlignment(placement);
363
- const mainAxis = getMainAxisFromPlacement(placement);
364
- const length = getLengthFromAxis(mainAxis);
365
- let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
366
-
367
- if (rects.reference[length] > rects.floating[length]) {
368
- mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
369
- }
370
-
371
- return {
372
- main: mainAlignmentSide,
373
- cross: getOppositePlacement(mainAlignmentSide)
374
- };
375
- }
376
-
377
- const hash = {
378
- start: 'end',
379
- end: 'start'
380
- };
381
- function getOppositeAlignmentPlacement(placement) {
382
- return placement.replace(/start|end/g, matched => hash[matched]);
383
- }
384
-
385
- const sides = ['top', 'right', 'bottom', 'left'];
386
- const allPlacements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-start", side + "-end"), []);
387
-
388
- function getPlacementList(alignment, autoAlignment, allowedPlacements) {
389
- const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
390
- return allowedPlacementsSortedByAlignment.filter(placement => {
391
- if (alignment) {
392
- return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
393
- }
394
-
395
- return true;
396
- });
397
- }
398
-
399
- /**
400
- * Automatically chooses the `placement` which has the most space available.
401
- * @see https://floating-ui.com/docs/autoPlacement
402
- */
403
- const autoPlacement = function (options) {
404
- if (options === void 0) {
405
- options = {};
406
- }
407
-
408
- return {
409
- name: 'autoPlacement',
410
- options,
411
-
412
- async fn(middlewareArguments) {
413
- var _middlewareData$autoP, _middlewareData$autoP2, _middlewareData$autoP3, _middlewareData$autoP4, _placementsSortedByLe;
414
-
415
- const {
416
- x,
417
- y,
418
- rects,
419
- middlewareData,
420
- placement,
421
- platform,
422
- elements
423
- } = middlewareArguments;
424
- const {
425
- alignment = null,
426
- allowedPlacements = allPlacements,
427
- autoAlignment = true,
428
- ...detectOverflowOptions
429
- } = options;
430
- const placements = getPlacementList(alignment, autoAlignment, allowedPlacements);
431
- const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
432
- const currentIndex = (_middlewareData$autoP = (_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.index) != null ? _middlewareData$autoP : 0;
433
- const currentPlacement = placements[currentIndex];
434
-
435
- if (currentPlacement == null) {
436
- return {};
437
- }
438
-
439
- const {
440
- main,
441
- cross
442
- } = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))); // Make `computeCoords` start from the right place
443
-
444
- if (placement !== currentPlacement) {
445
- return {
446
- x,
447
- y,
448
- reset: {
449
- placement: placements[0]
450
- }
451
- };
452
- }
453
-
454
- const currentOverflows = [overflow[getSide(currentPlacement)], overflow[main], overflow[cross]];
455
- const allOverflows = [...((_middlewareData$autoP3 = (_middlewareData$autoP4 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP4.overflows) != null ? _middlewareData$autoP3 : []), {
456
- placement: currentPlacement,
457
- overflows: currentOverflows
458
- }];
459
- const nextPlacement = placements[currentIndex + 1]; // There are more placements to check
460
-
461
- if (nextPlacement) {
462
- return {
463
- data: {
464
- index: currentIndex + 1,
465
- overflows: allOverflows
466
- },
467
- reset: {
468
- placement: nextPlacement
469
- }
470
- };
471
- }
472
-
473
- const placementsSortedByLeastOverflow = allOverflows.slice().sort((a, b) => a.overflows[0] - b.overflows[0]);
474
- const placementThatFitsOnAllSides = (_placementsSortedByLe = placementsSortedByLeastOverflow.find(_ref => {
475
- let {
476
- overflows
477
- } = _ref;
478
- return overflows.every(overflow => overflow <= 0);
479
- })) == null ? void 0 : _placementsSortedByLe.placement;
480
- const resetPlacement = placementThatFitsOnAllSides != null ? placementThatFitsOnAllSides : placementsSortedByLeastOverflow[0].placement;
481
-
482
- if (resetPlacement !== placement) {
483
- return {
484
- data: {
485
- index: currentIndex + 1,
486
- overflows: allOverflows
487
- },
488
- reset: {
489
- placement: resetPlacement
490
- }
491
- };
492
- }
493
-
494
- return {};
495
- }
496
-
497
- };
498
- };
499
-
500
- function getExpandedPlacements(placement) {
501
- const oppositePlacement = getOppositePlacement(placement);
502
- return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
503
- }
504
-
505
- /**
506
- * Changes the placement of the floating element to one that will fit if the
507
- * initially specified `placement` does not.
508
- * @see https://floating-ui.com/docs/flip
509
- */
510
- const flip = function (options) {
511
- if (options === void 0) {
512
- options = {};
513
- }
514
-
515
- return {
516
- name: 'flip',
517
- options,
518
-
519
- async fn(middlewareArguments) {
520
- var _middlewareData$flip;
521
-
522
- const {
523
- placement,
524
- middlewareData,
525
- rects,
526
- initialPlacement,
527
- platform,
528
- elements
529
- } = middlewareArguments;
530
- const {
531
- mainAxis: checkMainAxis = true,
532
- crossAxis: checkCrossAxis = true,
533
- fallbackPlacements: specifiedFallbackPlacements,
534
- fallbackStrategy = 'bestFit',
535
- flipAlignment = true,
536
- ...detectOverflowOptions
537
- } = options;
538
- const side = getSide(placement);
539
- const isBasePlacement = side === initialPlacement;
540
- const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
541
- const placements = [initialPlacement, ...fallbackPlacements];
542
- const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
543
- const overflows = [];
544
- let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
545
-
546
- if (checkMainAxis) {
547
- overflows.push(overflow[side]);
548
- }
549
-
550
- if (checkCrossAxis) {
551
- const {
552
- main,
553
- cross
554
- } = getAlignmentSides(placement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
555
- overflows.push(overflow[main], overflow[cross]);
556
- }
557
-
558
- overflowsData = [...overflowsData, {
559
- placement,
560
- overflows
561
- }]; // One or more sides is overflowing
562
-
563
- if (!overflows.every(side => side <= 0)) {
564
- var _middlewareData$flip$, _middlewareData$flip2;
565
-
566
- const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1;
567
- const nextPlacement = placements[nextIndex];
568
-
569
- if (nextPlacement) {
570
- // Try next placement and re-run the lifecycle
571
- return {
572
- data: {
573
- index: nextIndex,
574
- overflows: overflowsData
575
- },
576
- reset: {
577
- placement: nextPlacement
578
- }
579
- };
580
- }
581
-
582
- let resetPlacement = 'bottom';
583
-
584
- switch (fallbackStrategy) {
585
- case 'bestFit':
586
- {
587
- var _overflowsData$map$so;
588
-
589
- const placement = (_overflowsData$map$so = overflowsData.map(d => [d, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0].placement;
590
-
591
- if (placement) {
592
- resetPlacement = placement;
593
- }
594
-
595
- break;
596
- }
597
-
598
- case 'initialPlacement':
599
- resetPlacement = initialPlacement;
600
- break;
601
- }
602
-
603
- if (placement !== resetPlacement) {
604
- return {
605
- reset: {
606
- placement: resetPlacement
607
- }
608
- };
609
- }
610
- }
611
-
612
- return {};
613
- }
614
-
615
- };
616
- };
617
-
618
- function getSideOffsets(overflow, rect) {
619
- return {
620
- top: overflow.top - rect.height,
621
- right: overflow.right - rect.width,
622
- bottom: overflow.bottom - rect.height,
623
- left: overflow.left - rect.width
624
- };
625
- }
626
-
627
- function isAnySideFullyClipped(overflow) {
628
- return sides.some(side => overflow[side] >= 0);
629
- }
630
-
631
- /**
632
- * Provides data to hide the floating element in applicable situations, such as
633
- * when it is not in the same clipping context as the reference element.
634
- * @see https://floating-ui.com/docs/hide
635
- */
636
- const hide = function (_temp) {
637
- let {
638
- strategy = 'referenceHidden',
639
- ...detectOverflowOptions
640
- } = _temp === void 0 ? {} : _temp;
641
- return {
642
- name: 'hide',
643
-
644
- async fn(middlewareArguments) {
645
- const {
646
- rects
647
- } = middlewareArguments;
648
-
649
- switch (strategy) {
650
- case 'referenceHidden':
651
- {
652
- const overflow = await detectOverflow(middlewareArguments, { ...detectOverflowOptions,
653
- elementContext: 'reference'
654
- });
655
- const offsets = getSideOffsets(overflow, rects.reference);
656
- return {
657
- data: {
658
- referenceHiddenOffsets: offsets,
659
- referenceHidden: isAnySideFullyClipped(offsets)
660
- }
661
- };
662
- }
663
-
664
- case 'escaped':
665
- {
666
- const overflow = await detectOverflow(middlewareArguments, { ...detectOverflowOptions,
667
- altBoundary: true
668
- });
669
- const offsets = getSideOffsets(overflow, rects.floating);
670
- return {
671
- data: {
672
- escapedOffsets: offsets,
673
- escaped: isAnySideFullyClipped(offsets)
674
- }
675
- };
676
- }
677
-
678
- default:
679
- {
680
- return {};
681
- }
682
- }
683
- }
684
-
685
- };
686
- };
687
-
688
- async function convertValueToCoords(middlewareArguments, value) {
689
- const {
690
- placement,
691
- platform,
692
- elements
693
- } = middlewareArguments;
694
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
695
- const side = getSide(placement);
696
- const alignment = getAlignment(placement);
697
- const isVertical = getMainAxisFromPlacement(placement) === 'x';
698
- const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
699
- const crossAxisMulti = rtl && isVertical ? -1 : 1;
700
- const rawValue = typeof value === 'function' ? value(middlewareArguments) : value; // eslint-disable-next-line prefer-const
701
-
702
- let {
703
- mainAxis,
704
- crossAxis,
705
- alignmentAxis
706
- } = typeof rawValue === 'number' ? {
707
- mainAxis: rawValue,
708
- crossAxis: 0,
709
- alignmentAxis: null
710
- } : {
711
- mainAxis: 0,
712
- crossAxis: 0,
713
- alignmentAxis: null,
714
- ...rawValue
715
- };
716
-
717
- if (alignment && typeof alignmentAxis === 'number') {
718
- crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
719
- }
720
-
721
- return isVertical ? {
722
- x: crossAxis * crossAxisMulti,
723
- y: mainAxis * mainAxisMulti
724
- } : {
725
- x: mainAxis * mainAxisMulti,
726
- y: crossAxis * crossAxisMulti
727
- };
728
- }
729
- /**
730
- * Displaces the floating element from its reference element.
731
- * @see https://floating-ui.com/docs/offset
732
- */
733
-
734
- const offset = function (value) {
735
- if (value === void 0) {
736
- value = 0;
737
- }
738
-
739
- return {
740
- name: 'offset',
741
- options: value,
742
-
743
- async fn(middlewareArguments) {
744
- const {
745
- x,
746
- y
747
- } = middlewareArguments;
748
- const diffCoords = await convertValueToCoords(middlewareArguments, value);
749
- return {
750
- x: x + diffCoords.x,
751
- y: y + diffCoords.y,
752
- data: diffCoords
753
- };
754
- }
755
-
756
- };
757
- };
758
-
759
- function getCrossAxis(axis) {
760
- return axis === 'x' ? 'y' : 'x';
761
- }
762
-
763
- /**
764
- * Shifts the floating element in order to keep it in view when it will overflow
765
- * a clipping boundary.
766
- * @see https://floating-ui.com/docs/shift
767
- */
768
- const shift = function (options) {
769
- if (options === void 0) {
770
- options = {};
771
- }
772
-
773
- return {
774
- name: 'shift',
775
- options,
776
-
777
- async fn(middlewareArguments) {
778
- const {
779
- x,
780
- y,
781
- placement
782
- } = middlewareArguments;
783
- const {
784
- mainAxis: checkMainAxis = true,
785
- crossAxis: checkCrossAxis = false,
786
- limiter = {
787
- fn: _ref => {
788
- let {
789
- x,
790
- y
791
- } = _ref;
792
- return {
793
- x,
794
- y
795
- };
796
- }
797
- },
798
- ...detectOverflowOptions
799
- } = options;
800
- const coords = {
801
- x,
802
- y
803
- };
804
- const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
805
- const mainAxis = getMainAxisFromPlacement(getSide(placement));
806
- const crossAxis = getCrossAxis(mainAxis);
807
- let mainAxisCoord = coords[mainAxis];
808
- let crossAxisCoord = coords[crossAxis];
809
-
810
- if (checkMainAxis) {
811
- const minSide = mainAxis === 'y' ? 'top' : 'left';
812
- const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
813
- const min = mainAxisCoord + overflow[minSide];
814
- const max = mainAxisCoord - overflow[maxSide];
815
- mainAxisCoord = within(min, mainAxisCoord, max);
816
- }
817
-
818
- if (checkCrossAxis) {
819
- const minSide = crossAxis === 'y' ? 'top' : 'left';
820
- const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
821
- const min = crossAxisCoord + overflow[minSide];
822
- const max = crossAxisCoord - overflow[maxSide];
823
- crossAxisCoord = within(min, crossAxisCoord, max);
824
- }
825
-
826
- const limitedCoords = limiter.fn({ ...middlewareArguments,
827
- [mainAxis]: mainAxisCoord,
828
- [crossAxis]: crossAxisCoord
829
- });
830
- return { ...limitedCoords,
831
- data: {
832
- x: limitedCoords.x - x,
833
- y: limitedCoords.y - y
834
- }
835
- };
836
- }
837
-
838
- };
839
- };
840
-
841
- function isWindow(value) {
842
- return value && value.document && value.location && value.alert && value.setInterval;
843
- }
844
- function getWindow(node) {
845
- if (node == null) {
846
- return window;
847
- }
848
-
849
- if (!isWindow(node)) {
850
- const ownerDocument = node.ownerDocument;
851
- return ownerDocument ? ownerDocument.defaultView || window : window;
852
- }
853
-
854
- return node;
855
- }
856
-
857
- function getComputedStyle(element) {
858
- return getWindow(element).getComputedStyle(element);
859
- }
860
-
861
- function getNodeName(node) {
862
- return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : '';
863
- }
864
-
865
- function getUAString() {
866
- const uaData = navigator.userAgentData;
867
-
868
- if (uaData != null && uaData.brands) {
869
- return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
870
- }
871
-
872
- return navigator.userAgent;
873
- }
874
-
875
- function isHTMLElement(value) {
876
- return value instanceof getWindow(value).HTMLElement;
877
- }
878
- function isElement(value) {
879
- return value instanceof getWindow(value).Element;
880
- }
881
- function isNode(value) {
882
- return value instanceof getWindow(value).Node;
883
- }
884
- function isShadowRoot(node) {
885
- // Browsers without `ShadowRoot` support
886
- if (typeof ShadowRoot === 'undefined') {
887
- return false;
888
- }
889
-
890
- const OwnElement = getWindow(node).ShadowRoot;
891
- return node instanceof OwnElement || node instanceof ShadowRoot;
892
- }
893
- function isOverflowElement(element) {
894
- // Firefox wants us to check `-x` and `-y` variations as well
895
- const {
896
- overflow,
897
- overflowX,
898
- overflowY,
899
- display
900
- } = getComputedStyle(element);
901
- return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
902
- }
903
- function isTableElement(element) {
904
- return ['table', 'td', 'th'].includes(getNodeName(element));
905
- }
906
- function isContainingBlock(element) {
907
- // TODO: Try and use feature detection here instead
908
- const isFirefox = /firefox/i.test(getUAString());
909
- const css = getComputedStyle(element); // This is non-exhaustive but covers the most common CSS properties that
910
- // create a containing block.
911
- // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
912
-
913
- return css.transform !== 'none' || css.perspective !== 'none' || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective'].some(value => css.willChange.includes(value)) || ['paint', 'layout', 'strict', 'content'].some( // TS 4.1 compat
914
- value => {
915
- const contain = css.contain;
916
- return contain != null ? contain.includes(value) : false;
917
- });
918
- }
919
- function isLayoutViewport() {
920
- // Not Safari
921
- return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways
922
- // • Always-visible scrollbar or not
923
- // • Width of <html>, etc.
924
- // const vV = win.visualViewport;
925
- // return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
926
- }
927
- function isLastTraversableNode(node) {
928
- return ['html', 'body', '#document'].includes(getNodeName(node));
929
- }
930
-
931
- const min = Math.min;
932
- const max = Math.max;
933
- const round = Math.round;
934
-
935
- function getBoundingClientRect(element, includeScale, isFixedStrategy) {
936
- var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
937
-
938
- if (includeScale === void 0) {
939
- includeScale = false;
940
- }
941
-
942
- if (isFixedStrategy === void 0) {
943
- isFixedStrategy = false;
944
- }
945
-
946
- const clientRect = element.getBoundingClientRect();
947
- let scaleX = 1;
948
- let scaleY = 1;
949
-
950
- if (includeScale && isHTMLElement(element)) {
951
- scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
952
- scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
953
- }
954
-
955
- const win = isElement(element) ? getWindow(element) : window;
956
- const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
957
- const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scaleX;
958
- const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scaleY;
959
- const width = clientRect.width / scaleX;
960
- const height = clientRect.height / scaleY;
961
- return {
962
- width,
963
- height,
964
- top: y,
965
- right: x + width,
966
- bottom: y + height,
967
- left: x,
968
- x,
969
- y
970
- };
971
- }
972
-
973
- function getDocumentElement(node) {
974
- return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
975
- }
976
-
977
- function getNodeScroll(element) {
978
- if (isElement(element)) {
979
- return {
980
- scrollLeft: element.scrollLeft,
981
- scrollTop: element.scrollTop
982
- };
983
- }
984
-
985
- return {
986
- scrollLeft: element.pageXOffset,
987
- scrollTop: element.pageYOffset
988
- };
989
- }
990
-
991
- function getWindowScrollBarX(element) {
992
- // If <html> has a CSS width greater than the viewport, then this will be
993
- // incorrect for RTL.
994
- return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
995
- }
996
-
997
- function isScaled(element) {
998
- const rect = getBoundingClientRect(element);
999
- return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
1000
- }
1001
-
1002
- function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1003
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
1004
- const documentElement = getDocumentElement(offsetParent);
1005
- const rect = getBoundingClientRect(element, // @ts-ignore - checked above (TS 4.1 compat)
1006
- isOffsetParentAnElement && isScaled(offsetParent), strategy === 'fixed');
1007
- let scroll = {
1008
- scrollLeft: 0,
1009
- scrollTop: 0
1010
- };
1011
- const offsets = {
1012
- x: 0,
1013
- y: 0
1014
- };
1015
-
1016
- if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
1017
- if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1018
- scroll = getNodeScroll(offsetParent);
1019
- }
1020
-
1021
- if (isHTMLElement(offsetParent)) {
1022
- const offsetRect = getBoundingClientRect(offsetParent, true);
1023
- offsets.x = offsetRect.x + offsetParent.clientLeft;
1024
- offsets.y = offsetRect.y + offsetParent.clientTop;
1025
- } else if (documentElement) {
1026
- offsets.x = getWindowScrollBarX(documentElement);
1027
- }
1028
- }
1029
-
1030
- return {
1031
- x: rect.left + scroll.scrollLeft - offsets.x,
1032
- y: rect.top + scroll.scrollTop - offsets.y,
1033
- width: rect.width,
1034
- height: rect.height
1035
- };
1036
- }
1037
-
1038
- function getParentNode(node) {
1039
- if (getNodeName(node) === 'html') {
1040
- return node;
1041
- }
1042
-
1043
- return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
1044
- // @ts-ignore
1045
- node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
1046
- node.parentNode || ( // DOM Element detected
1047
- isShadowRoot(node) ? node.host : null) || // ShadowRoot detected
1048
- getDocumentElement(node) // fallback
1049
-
1050
- );
1051
- }
1052
-
1053
- function getTrueOffsetParent(element) {
1054
- if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
1055
- return null;
1056
- }
1057
-
1058
- return element.offsetParent;
1059
- }
1060
-
1061
- function getContainingBlock(element) {
1062
- let currentNode = getParentNode(element);
1063
-
1064
- if (isShadowRoot(currentNode)) {
1065
- currentNode = currentNode.host;
1066
- }
1067
-
1068
- while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1069
- if (isContainingBlock(currentNode)) {
1070
- return currentNode;
1071
- } else {
1072
- const parent = currentNode.parentNode;
1073
- currentNode = isShadowRoot(parent) ? parent.host : parent;
1074
- }
1075
- }
1076
-
1077
- return null;
1078
- } // Gets the closest ancestor positioned element. Handles some edge cases,
1079
- // such as table ancestors and cross browser bugs.
1080
-
1081
-
1082
- function getOffsetParent(element) {
1083
- const window = getWindow(element);
1084
- let offsetParent = getTrueOffsetParent(element);
1085
-
1086
- while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
1087
- offsetParent = getTrueOffsetParent(offsetParent);
1088
- }
1089
-
1090
- if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
1091
- return window;
1092
- }
1093
-
1094
- return offsetParent || getContainingBlock(element) || window;
1095
- }
1096
-
1097
- function getDimensions(element) {
1098
- if (isHTMLElement(element)) {
1099
- return {
1100
- width: element.offsetWidth,
1101
- height: element.offsetHeight
1102
- };
1103
- }
1104
-
1105
- const rect = getBoundingClientRect(element);
1106
- return {
1107
- width: rect.width,
1108
- height: rect.height
1109
- };
1110
- }
1111
-
1112
- function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1113
- let {
1114
- rect,
1115
- offsetParent,
1116
- strategy
1117
- } = _ref;
1118
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
1119
- const documentElement = getDocumentElement(offsetParent);
1120
-
1121
- if (offsetParent === documentElement) {
1122
- return rect;
1123
- }
1124
-
1125
- let scroll = {
1126
- scrollLeft: 0,
1127
- scrollTop: 0
1128
- };
1129
- const offsets = {
1130
- x: 0,
1131
- y: 0
1132
- };
1133
-
1134
- if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
1135
- if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1136
- scroll = getNodeScroll(offsetParent);
1137
- }
1138
-
1139
- if (isHTMLElement(offsetParent)) {
1140
- const offsetRect = getBoundingClientRect(offsetParent, true);
1141
- offsets.x = offsetRect.x + offsetParent.clientLeft;
1142
- offsets.y = offsetRect.y + offsetParent.clientTop;
1143
- } // This doesn't appear to be need to be negated.
1144
- // else if (documentElement) {
1145
- // offsets.x = getWindowScrollBarX(documentElement);
1146
- // }
1147
-
1148
- }
1149
-
1150
- return { ...rect,
1151
- x: rect.x - scroll.scrollLeft + offsets.x,
1152
- y: rect.y - scroll.scrollTop + offsets.y
1153
- };
1154
- }
1155
-
1156
- function getViewportRect(element, strategy) {
1157
- const win = getWindow(element);
1158
- const html = getDocumentElement(element);
1159
- const visualViewport = win.visualViewport;
1160
- let width = html.clientWidth;
1161
- let height = html.clientHeight;
1162
- let x = 0;
1163
- let y = 0;
1164
-
1165
- if (visualViewport) {
1166
- width = visualViewport.width;
1167
- height = visualViewport.height;
1168
- const layoutViewport = isLayoutViewport();
1169
-
1170
- if (layoutViewport || !layoutViewport && strategy === 'fixed') {
1171
- x = visualViewport.offsetLeft;
1172
- y = visualViewport.offsetTop;
1173
- }
1174
- }
1175
-
1176
- return {
1177
- width,
1178
- height,
1179
- x,
1180
- y
1181
- };
1182
- }
1183
-
1184
- // of the `<html>` and `<body>` rect bounds if horizontally scrollable
1185
-
1186
- function getDocumentRect(element) {
1187
- var _element$ownerDocumen;
1188
-
1189
- const html = getDocumentElement(element);
1190
- const scroll = getNodeScroll(element);
1191
- const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
1192
- const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
1193
- const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
1194
- let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1195
- const y = -scroll.scrollTop;
1196
-
1197
- if (getComputedStyle(body || html).direction === 'rtl') {
1198
- x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
1199
- }
1200
-
1201
- return {
1202
- width,
1203
- height,
1204
- x,
1205
- y
1206
- };
1207
- }
1208
-
1209
- function getNearestOverflowAncestor(node) {
1210
- const parentNode = getParentNode(node);
1211
-
1212
- if (isLastTraversableNode(parentNode)) {
1213
- // @ts-ignore assume body is always available
1214
- return node.ownerDocument.body;
1215
- }
1216
-
1217
- if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1218
- return parentNode;
1219
- }
1220
-
1221
- return getNearestOverflowAncestor(parentNode);
1222
- }
1223
-
1224
- function getOverflowAncestors(node, list) {
1225
- var _node$ownerDocument;
1226
-
1227
- if (list === void 0) {
1228
- list = [];
1229
- }
1230
-
1231
- const scrollableAncestor = getNearestOverflowAncestor(node);
1232
- const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
1233
- const win = getWindow(scrollableAncestor);
1234
- const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
1235
- const updatedList = list.concat(target);
1236
- return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here
1237
- updatedList.concat(getOverflowAncestors(target));
1238
- }
1239
-
1240
- function contains(parent, child) {
1241
- const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method
1242
-
1243
- if (parent.contains(child)) {
1244
- return true;
1245
- } // then fallback to custom implementation with Shadow DOM support
1246
- else if (rootNode && isShadowRoot(rootNode)) {
1247
- let next = child;
1248
-
1249
- do {
1250
- // use `===` replace node.isSameNode()
1251
- if (next && parent === next) {
1252
- return true;
1253
- } // @ts-ignore: need a better way to handle this...
1254
-
1255
-
1256
- next = next.parentNode || next.host;
1257
- } while (next);
1258
- }
1259
-
1260
- return false;
1261
- }
1262
-
1263
- function getNearestParentCapableOfEscapingClipping(element, clippingAncestors) {
1264
- let currentNode = element;
1265
-
1266
- while (currentNode && !isLastTraversableNode(currentNode) && // @ts-expect-error
1267
- !clippingAncestors.includes(currentNode)) {
1268
- if (isElement(currentNode) && ['absolute', 'fixed'].includes(getComputedStyle(currentNode).position)) {
1269
- break;
1270
- }
1271
-
1272
- const parentNode = getParentNode(currentNode);
1273
- currentNode = isShadowRoot(parentNode) ? parentNode.host : parentNode;
1274
- }
1275
-
1276
- return currentNode;
1277
- }
1278
-
1279
- function getInnerBoundingClientRect(element, strategy) {
1280
- const clientRect = getBoundingClientRect(element, false, strategy === 'fixed');
1281
- const top = clientRect.top + element.clientTop;
1282
- const left = clientRect.left + element.clientLeft;
1283
- return {
1284
- top,
1285
- left,
1286
- x: left,
1287
- y: top,
1288
- right: left + element.clientWidth,
1289
- bottom: top + element.clientHeight,
1290
- width: element.clientWidth,
1291
- height: element.clientHeight
1292
- };
1293
- }
1294
-
1295
- function getClientRectFromClippingAncestor(element, clippingParent, strategy) {
1296
- if (clippingParent === 'viewport') {
1297
- return rectToClientRect(getViewportRect(element, strategy));
1298
- }
1299
-
1300
- if (isElement(clippingParent)) {
1301
- return getInnerBoundingClientRect(clippingParent, strategy);
1302
- }
1303
-
1304
- return rectToClientRect(getDocumentRect(getDocumentElement(element)));
1305
- } // A "clipping ancestor" is an overflowable container with the characteristic of
1306
- // clipping (or hiding) overflowing elements with a position different from
1307
- // `initial`
1308
-
1309
-
1310
- function getClippingAncestors(element) {
1311
- const clippingAncestors = getOverflowAncestors(element);
1312
- const nearestEscapableParent = getNearestParentCapableOfEscapingClipping(element, clippingAncestors);
1313
- let clipperElement = null;
1314
-
1315
- if (nearestEscapableParent && isHTMLElement(nearestEscapableParent)) {
1316
- const offsetParent = getOffsetParent(nearestEscapableParent);
1317
-
1318
- if (isOverflowElement(nearestEscapableParent)) {
1319
- clipperElement = nearestEscapableParent;
1320
- } else if (isHTMLElement(offsetParent)) {
1321
- clipperElement = offsetParent;
1322
- }
1323
- }
1324
-
1325
- if (!isElement(clipperElement)) {
1326
- return [];
1327
- } // @ts-ignore isElement check ensures we return Array<Element>
1328
-
1329
-
1330
- return clippingAncestors.filter(clippingAncestors => clipperElement && isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
1331
- } // Gets the maximum area that the element is visible in due to any number of
1332
- // clipping ancestors
1333
-
1334
-
1335
- function getClippingRect(_ref) {
1336
- let {
1337
- element,
1338
- boundary,
1339
- rootBoundary,
1340
- strategy
1341
- } = _ref;
1342
- const mainClippingAncestors = boundary === 'clippingAncestors' ? getClippingAncestors(element) : [].concat(boundary);
1343
- const clippingAncestors = [...mainClippingAncestors, rootBoundary];
1344
- const firstClippingAncestor = clippingAncestors[0];
1345
- const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1346
- const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1347
- accRect.top = max(rect.top, accRect.top);
1348
- accRect.right = min(rect.right, accRect.right);
1349
- accRect.bottom = min(rect.bottom, accRect.bottom);
1350
- accRect.left = max(rect.left, accRect.left);
1351
- return accRect;
1352
- }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1353
- return {
1354
- width: clippingRect.right - clippingRect.left,
1355
- height: clippingRect.bottom - clippingRect.top,
1356
- x: clippingRect.left,
1357
- y: clippingRect.top
1358
- };
1359
- }
1360
-
1361
- const platform = {
1362
- getClippingRect,
1363
- convertOffsetParentRelativeRectToViewportRelativeRect,
1364
- isElement,
1365
- getDimensions,
1366
- getOffsetParent,
1367
- getDocumentElement,
1368
- getElementRects: _ref => {
1369
- let {
1370
- reference,
1371
- floating,
1372
- strategy
1373
- } = _ref;
1374
- return {
1375
- reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
1376
- floating: { ...getDimensions(floating),
1377
- x: 0,
1378
- y: 0
1379
- }
1380
- };
1381
- },
1382
- getClientRects: element => Array.from(element.getClientRects()),
1383
- isRTL: element => getComputedStyle(element).direction === 'rtl'
1384
- };
1385
-
1386
- /**
1387
- * Automatically updates the position of the floating element when necessary.
1388
- * @see https://floating-ui.com/docs/autoUpdate
1389
- */
1390
- function autoUpdate(reference, floating, update, options) {
1391
- if (options === void 0) {
1392
- options = {};
1393
- }
1394
-
1395
- const {
1396
- ancestorScroll: _ancestorScroll = true,
1397
- ancestorResize = true,
1398
- elementResize = true,
1399
- animationFrame = false
1400
- } = options;
1401
- const ancestorScroll = _ancestorScroll && !animationFrame;
1402
- const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : [];
1403
- ancestors.forEach(ancestor => {
1404
- ancestorScroll && ancestor.addEventListener('scroll', update, {
1405
- passive: true
1406
- });
1407
- ancestorResize && ancestor.addEventListener('resize', update);
1408
- });
1409
- let observer = null;
1410
-
1411
- if (elementResize) {
1412
- let initialUpdate = true;
1413
- observer = new ResizeObserver(() => {
1414
- if (!initialUpdate) {
1415
- update();
1416
- }
1417
-
1418
- initialUpdate = false;
1419
- });
1420
- isElement(reference) && !animationFrame && observer.observe(reference);
1421
- observer.observe(floating);
1422
- }
1423
-
1424
- let frameId;
1425
- let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1426
-
1427
- if (animationFrame) {
1428
- frameLoop();
1429
- }
1430
-
1431
- function frameLoop() {
1432
- const nextRefRect = getBoundingClientRect(reference);
1433
-
1434
- if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
1435
- update();
1436
- }
1437
-
1438
- prevRefRect = nextRefRect;
1439
- frameId = requestAnimationFrame(frameLoop);
1440
- }
1441
-
1442
- update();
1443
- return () => {
1444
- var _observer;
1445
-
1446
- ancestors.forEach(ancestor => {
1447
- ancestorScroll && ancestor.removeEventListener('scroll', update);
1448
- ancestorResize && ancestor.removeEventListener('resize', update);
1449
- });
1450
- (_observer = observer) == null ? void 0 : _observer.disconnect();
1451
- observer = null;
1452
-
1453
- if (animationFrame) {
1454
- cancelAnimationFrame(frameId);
1455
- }
1456
- };
1457
- }
1458
-
1459
- /**
1460
- * Computes the `x` and `y` coordinates that will place the floating element
1461
- * next to a reference element when it is given a certain CSS positioning
1462
- * strategy.
1463
- */
1464
-
1465
- const computePosition = (reference, floating, options) => computePosition$1(reference, floating, {
1466
- platform,
1467
- ...options
1468
- });
1469
-
1470
- /*!
1471
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
1472
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
1473
- * v1.0.0-beta.97
1474
- */
1475
- /**
1476
- * This module helps users provide custom configuration for component internals.
1477
- *
1478
- * @internal
1479
- */
1480
- const configOverrides = globalThis["calciteComponentsConfig"];
1481
- const config = {
1482
- /**
1483
- * We apply a custom fix to improve positioning for non-Chromium browsers.
1484
- * The fix comes at a performance cost, so provides users a way to opt-out if necessary.
1485
- *
1486
- * @internal
1487
- */
1488
- floatingUINonChromiumPositioningFix: true,
1489
- ...configOverrides
1490
- };
1491
-
1492
- /*!
1493
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
1494
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
1495
- * v1.0.0-beta.97
1496
- */
1497
- const floatingUIBrowserCheck = patchFloatingUiForNonChromiumBrowsers();
1498
- async function patchFloatingUiForNonChromiumBrowsers() {
1499
- function getUAString() {
1500
- const uaData = navigator.userAgentData;
1501
- if (uaData === null || uaData === void 0 ? void 0 : uaData.brands) {
1502
- return uaData.brands.map((item) => `${item.brand}/${item.version}`).join(" ");
1503
- }
1504
- return navigator.userAgent;
1505
- }
1506
- if (Build.isBrowser &&
1507
- config.floatingUINonChromiumPositioningFix &&
1508
- // ⚠️ browser-sniffing is not a best practice and should be avoided ⚠️
1509
- /firefox|safari/i.test(getUAString())) {
1510
- const { getClippingRect, getElementRects, getOffsetParent } = await import('./nonChromiumPlatformUtils.js');
1511
- platform.getClippingRect = getClippingRect;
1512
- platform.getOffsetParent = getOffsetParent;
1513
- platform.getElementRects = getElementRects;
1514
- }
1515
- }
1516
- const placementDataAttribute = "data-placement";
1517
- /**
1518
- * Exported for testing purposes only
1519
- */
1520
- const repositionDebounceTimeout = 100;
1521
- const effectivePlacements = [
1522
- "top",
1523
- "bottom",
1524
- "right",
1525
- "left",
1526
- "top-start",
1527
- "top-end",
1528
- "bottom-start",
1529
- "bottom-end",
1530
- "right-start",
1531
- "right-end",
1532
- "left-start",
1533
- "left-end"
1534
- ];
1535
- const defaultMenuPlacement = "bottom-start";
1536
- const FloatingCSS = {
1537
- animation: "calcite-floating-ui-anim",
1538
- animationActive: "calcite-floating-ui-anim--active"
1539
- };
1540
- function getMiddleware({ placement, disableFlip, flipPlacements, offsetDistance, offsetSkidding, arrowEl, type }) {
1541
- const defaultMiddleware = [shift(), hide()];
1542
- if (type === "menu") {
1543
- return [
1544
- ...defaultMiddleware,
1545
- flip({
1546
- fallbackPlacements: flipPlacements || ["top-start", "top", "top-end", "bottom-start", "bottom", "bottom-end"]
1547
- })
1548
- ];
1549
- }
1550
- if (type === "popover" || type === "tooltip") {
1551
- const middleware = [
1552
- ...defaultMiddleware,
1553
- offset({
1554
- mainAxis: typeof offsetDistance === "number" ? offsetDistance : 0,
1555
- crossAxis: typeof offsetSkidding === "number" ? offsetSkidding : 0
1556
- })
1557
- ];
1558
- if (placement === "auto" || placement === "auto-start" || placement === "auto-end") {
1559
- middleware.push(autoPlacement({ alignment: placement === "auto-start" ? "start" : placement === "auto-end" ? "end" : null }));
1560
- }
1561
- else if (!disableFlip) {
1562
- middleware.push(flip(flipPlacements ? { fallbackPlacements: flipPlacements } : {}));
1563
- }
1564
- if (arrowEl) {
1565
- middleware.push(arrow({
1566
- element: arrowEl
1567
- }));
1568
- }
1569
- return middleware;
1570
- }
1571
- return [];
1572
- }
1573
- function filterComputedPlacements(placements, el) {
1574
- const filteredPlacements = placements.filter((placement) => effectivePlacements.includes(placement));
1575
- if (filteredPlacements.length !== placements.length) {
1576
- console.warn(`${el.tagName}: Invalid value found in: flipPlacements. Try any of these: ${effectivePlacements
1577
- .map((placement) => `"${placement}"`)
1578
- .join(", ")
1579
- .trim()}`, { el });
1580
- }
1581
- return filteredPlacements;
1582
- }
1583
- /*
1584
- In floating-ui, "*-start" and "*-end" are already flipped in RTL.
1585
- There is no need for our "*-leading" and "*-trailing" values anymore.
1586
- https://github.com/floating-ui/floating-ui/issues/1530
1587
- https://github.com/floating-ui/floating-ui/issues/1563
1588
- */
1589
- function getEffectivePlacement(floatingEl, placement) {
1590
- const placements = ["left", "right"];
1591
- if (getElementDir(floatingEl) === "rtl") {
1592
- placements.reverse();
1593
- }
1594
- return placement
1595
- .replace(/-leading/gi, "-start")
1596
- .replace(/-trailing/gi, "-end")
1597
- .replace(/leading/gi, placements[0])
1598
- .replace(/trailing/gi, placements[1]);
1599
- }
1600
- /**
1601
- * Convenience function to manage `reposition` calls for FloatingUIComponents that use `positionFloatingUI.
1602
- *
1603
- * Note: this is not needed for components that use `calcite-popover`.
1604
- *
1605
- * @param component
1606
- * @param options
1607
- * @param options.referenceEl
1608
- * @param options.floatingEl
1609
- * @param options.overlayPositioning
1610
- * @param options.placement
1611
- * @param options.disableFlip
1612
- * @param options.flipPlacements
1613
- * @param options.offsetDistance
1614
- * @param options.offsetSkidding
1615
- * @param options.arrowEl
1616
- * @param options.type
1617
- * @param delayed
1618
- */
1619
- async function reposition(component, options, delayed = false) {
1620
- if (!component.open) {
1621
- return;
1622
- }
1623
- return delayed ? debouncedReposition(options) : positionFloatingUI(options);
1624
- }
1625
- const debouncedReposition = debounce(positionFloatingUI, repositionDebounceTimeout, {
1626
- leading: true,
1627
- maxWait: repositionDebounceTimeout
1628
- });
1629
- /**
1630
- * Positions the floating element relative to the reference element.
1631
- *
1632
- * **Note:** exported for testing purposes only
1633
- *
1634
- * @param root0
1635
- * @param root0.referenceEl
1636
- * @param root0.floatingEl
1637
- * @param root0.overlayPositioning
1638
- * @param root0.placement
1639
- * @param root0.disableFlip
1640
- * @param root0.flipPlacements
1641
- * @param root0.offsetDistance
1642
- * @param root0.offsetSkidding
1643
- * @param root0.arrowEl
1644
- * @param root0.type
1645
- * @param root0.includeArrow
1646
- */
1647
- async function positionFloatingUI({ referenceEl, floatingEl, overlayPositioning = "absolute", placement, disableFlip, flipPlacements, offsetDistance, offsetSkidding, includeArrow = false, arrowEl, type }) {
1648
- var _a;
1649
- if (!referenceEl || !floatingEl || (includeArrow && !arrowEl)) {
1650
- return null;
1651
- }
1652
- await floatingUIBrowserCheck;
1653
- const { x, y, placement: effectivePlacement, strategy: position, middlewareData } = await computePosition(referenceEl, floatingEl, {
1654
- strategy: overlayPositioning,
1655
- placement: placement === "auto" || placement === "auto-start" || placement === "auto-end"
1656
- ? undefined
1657
- : getEffectivePlacement(floatingEl, placement),
1658
- middleware: getMiddleware({
1659
- placement,
1660
- disableFlip,
1661
- flipPlacements,
1662
- offsetDistance,
1663
- offsetSkidding,
1664
- arrowEl,
1665
- type
1666
- })
1667
- });
1668
- if (middlewareData === null || middlewareData === void 0 ? void 0 : middlewareData.arrow) {
1669
- const { x: arrowX, y: arrowY } = middlewareData.arrow;
1670
- Object.assign(arrowEl.style, {
1671
- left: arrowX != null ? `${arrowX}px` : "",
1672
- top: arrowY != null ? `${arrowY}px` : ""
1673
- });
1674
- }
1675
- const referenceHidden = (_a = middlewareData === null || middlewareData === void 0 ? void 0 : middlewareData.hide) === null || _a === void 0 ? void 0 : _a.referenceHidden;
1676
- const visibility = referenceHidden ? "hidden" : null;
1677
- const pointerEvents = visibility ? "none" : null;
1678
- floatingEl.setAttribute(placementDataAttribute, effectivePlacement);
1679
- const transform = `translate(${Math.round(x)}px,${Math.round(y)}px)`;
1680
- Object.assign(floatingEl.style, {
1681
- visibility,
1682
- pointerEvents,
1683
- position,
1684
- top: "0",
1685
- left: "0",
1686
- transform
1687
- });
1688
- }
1689
- /**
1690
- * Exported for testing purposes only
1691
- *
1692
- * @internal
1693
- */
1694
- const cleanupMap = new WeakMap();
1695
- /**
1696
- * Helper to set up floating element interactions on connectedCallback.
1697
- *
1698
- * @param component
1699
- * @param referenceEl
1700
- * @param floatingEl
1701
- */
1702
- function connectFloatingUI(component, referenceEl, floatingEl) {
1703
- if (!floatingEl || !referenceEl) {
1704
- return;
1705
- }
1706
- disconnectFloatingUI(component, referenceEl, floatingEl);
1707
- const position = component.overlayPositioning;
1708
- // ensure position matches for initial positioning
1709
- floatingEl.style.position = position;
1710
- if (position === "absolute") {
1711
- moveOffScreen(floatingEl);
1712
- }
1713
- const runAutoUpdate = Build.isBrowser
1714
- ? autoUpdate
1715
- : (_refEl, _floatingEl, updateCallback) => {
1716
- updateCallback();
1717
- return () => {
1718
- /* noop */
1719
- };
1720
- };
1721
- cleanupMap.set(component, runAutoUpdate(referenceEl, floatingEl, () => component.reposition()));
1722
- }
1723
- /**
1724
- * Helper to tear down floating element interactions on disconnectedCallback.
1725
- *
1726
- * @param component
1727
- * @param referenceEl
1728
- * @param floatingEl
1729
- */
1730
- function disconnectFloatingUI(component, referenceEl, floatingEl) {
1731
- if (!floatingEl || !referenceEl) {
1732
- return;
1733
- }
1734
- getTransitionTarget(floatingEl).removeEventListener("transitionend", handleTransitionElTransitionEnd);
1735
- const cleanup = cleanupMap.get(component);
1736
- if (cleanup) {
1737
- cleanup();
1738
- }
1739
- cleanupMap.delete(component);
1740
- }
1741
- const visiblePointerSize = 4;
1742
- /**
1743
- * Default offset the position of the floating element away from the reference element.
1744
- *
1745
- * @default 6
1746
- */
1747
- const defaultOffsetDistance = Math.ceil(Math.hypot(visiblePointerSize, visiblePointerSize));
1748
- /**
1749
- * This utils applies floating element styles to avoid affecting layout when closed.
1750
- *
1751
- * This should be called when the closing transition will start.
1752
- *
1753
- * @param floatingEl
1754
- */
1755
- function updateAfterClose(floatingEl) {
1756
- if (!floatingEl || floatingEl.style.position !== "absolute") {
1757
- return;
1758
- }
1759
- getTransitionTarget(floatingEl).addEventListener("transitionend", handleTransitionElTransitionEnd);
1760
- }
1761
- function getTransitionTarget(floatingEl) {
1762
- // assumes floatingEl w/ shadowRoot is a FloatingUIComponent
1763
- return floatingEl.shadowRoot || floatingEl;
1764
- }
1765
- function handleTransitionElTransitionEnd(event) {
1766
- const floatingTransitionEl = event.target;
1767
- if (
1768
- // using any prop from floating-ui transition
1769
- event.propertyName === "opacity" &&
1770
- floatingTransitionEl.classList.contains(FloatingCSS.animation)) {
1771
- const floatingEl = getFloatingElFromTransitionTarget(floatingTransitionEl);
1772
- moveOffScreen(floatingEl);
1773
- getTransitionTarget(floatingEl).removeEventListener("transitionend", handleTransitionElTransitionEnd);
1774
- }
1775
- }
1776
- function moveOffScreen(floatingEl) {
1777
- floatingEl.style.transform = "";
1778
- floatingEl.style.top = "-99999px";
1779
- floatingEl.style.left = "-99999px";
1780
- }
1781
- function getFloatingElFromTransitionTarget(floatingTransitionEl) {
1782
- return closestElementCrossShadowBoundary(floatingTransitionEl, `[${placementDataAttribute}]`);
1783
- }
1784
-
1785
- export { FloatingCSS as F, disconnectFloatingUI as a, defaultOffsetDistance as b, connectFloatingUI as c, defaultMenuPlacement as d, rectToClientRect as e, filterComputedPlacements as f, reposition as r, updateAfterClose as u };
1786
-
1787
- //# sourceMappingURL=floating-ui.js.map