@esri/solutions-components 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1172) hide show
  1. package/dist/cjs/arcgis-login.cjs.entry.js +1 -1
  2. package/dist/cjs/calcite-accordion-item.cjs.entry.js +5 -5
  3. package/dist/cjs/calcite-accordion.cjs.entry.js +2 -2
  4. package/dist/cjs/calcite-action-bar.cjs.entry.js +12 -12
  5. package/dist/cjs/calcite-action-group.cjs.entry.js +9 -9
  6. package/dist/cjs/calcite-avatar.cjs.entry.js +4 -4
  7. package/dist/cjs/calcite-block-section.cjs.entry.js +8 -8
  8. package/dist/cjs/calcite-button.cjs.entry.js +13 -13
  9. package/dist/cjs/calcite-card.cjs.entry.js +8 -8
  10. package/dist/cjs/calcite-checkbox.cjs.entry.js +9 -9
  11. package/dist/cjs/calcite-chip-group.cjs.entry.js +7 -7
  12. package/dist/cjs/calcite-color-picker.cjs.entry.js +22 -22
  13. package/dist/cjs/calcite-combobox-item-group.cjs.entry.js +4 -4
  14. package/dist/cjs/calcite-fab.cjs.entry.js +6 -6
  15. package/dist/cjs/calcite-icon.cjs.entry.js +5 -5
  16. package/dist/cjs/calcite-inline-editable.cjs.entry.js +11 -11
  17. package/dist/cjs/calcite-input-number.cjs.entry.js +13 -13
  18. package/dist/cjs/calcite-input-text.cjs.entry.js +13 -13
  19. package/dist/cjs/calcite-input-time-picker.cjs.entry.js +17 -17
  20. package/dist/cjs/calcite-input-time-zone.cjs.entry.js +12 -12
  21. package/dist/cjs/calcite-label.cjs.entry.js +4 -4
  22. package/dist/cjs/calcite-link.cjs.entry.js +6 -6
  23. package/dist/cjs/calcite-list-item-group.cjs.entry.js +4 -4
  24. package/dist/cjs/calcite-menu-item.cjs.entry.js +8 -8
  25. package/dist/cjs/calcite-menu.cjs.entry.js +8 -8
  26. package/dist/cjs/calcite-meter.cjs.entry.js +8 -8
  27. package/dist/cjs/calcite-modal.cjs.entry.js +11 -17
  28. package/dist/cjs/calcite-navigation-logo.cjs.entry.js +2 -2
  29. package/dist/cjs/calcite-navigation-user.cjs.entry.js +2 -2
  30. package/dist/cjs/calcite-navigation.cjs.entry.js +4 -4
  31. package/dist/cjs/calcite-notice.cjs.entry.js +10 -10
  32. package/dist/cjs/calcite-option-group.cjs.entry.js +1 -1
  33. package/dist/cjs/calcite-pagination.cjs.entry.js +8 -201
  34. package/dist/cjs/calcite-pick-list-group.cjs.entry.js +6 -6
  35. package/dist/cjs/calcite-pick-list-item.cjs.entry.js +23 -23
  36. package/dist/cjs/calcite-pick-list.cjs.entry.js +10 -10
  37. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +4 -4
  38. package/dist/cjs/calcite-radio-button.cjs.entry.js +8 -8
  39. package/dist/cjs/calcite-rating.cjs.entry.js +12 -14
  40. package/dist/cjs/calcite-scrim.cjs.entry.js +7 -7
  41. package/dist/cjs/calcite-sheet.cjs.entry.js +7 -7
  42. package/dist/cjs/calcite-shell-center-row.cjs.entry.js +5 -5
  43. package/dist/cjs/calcite-sortable-list.cjs.entry.js +7 -7
  44. package/dist/cjs/calcite-split-button.cjs.entry.js +4 -4
  45. package/dist/cjs/calcite-stepper-item.cjs.entry.js +10 -10
  46. package/dist/cjs/calcite-stepper.cjs.entry.js +7 -7
  47. package/dist/cjs/calcite-switch.cjs.entry.js +9 -9
  48. package/dist/cjs/calcite-table-row.cjs.entry.js +6 -6
  49. package/dist/cjs/calcite-table.cjs.entry.js +9 -9
  50. package/dist/cjs/calcite-text-area.cjs.entry.js +16 -15
  51. package/dist/cjs/calcite-tile-select-group.cjs.entry.js +3 -3
  52. package/dist/cjs/calcite-tile-select.cjs.entry.js +4 -4
  53. package/dist/cjs/calcite-tile.cjs.entry.js +7 -7
  54. package/dist/cjs/calcite-time-picker.cjs.entry.js +9 -9
  55. package/dist/cjs/calcite-tip-group.cjs.entry.js +1 -1
  56. package/dist/cjs/calcite-tip-manager.cjs.entry.js +8 -15
  57. package/dist/cjs/calcite-tip.cjs.entry.js +9 -9
  58. package/dist/cjs/calcite-tooltip.cjs.entry.js +7 -7
  59. package/dist/cjs/card-manager_3.cjs.entry.js +1 -1
  60. package/dist/cjs/consent-manager.cjs.entry.js +15 -379
  61. package/dist/cjs/crowdsource-manager.cjs.entry.js +5 -7
  62. package/dist/cjs/crowdsource-reporter.cjs.entry.js +7 -9
  63. package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
  64. package/dist/cjs/{downloadUtils-1f283d95.js → downloadUtils-8b05d7cc.js} +3 -3
  65. package/dist/cjs/feature-comments.cjs.entry.js +1 -1
  66. package/dist/cjs/feature-form-flow-item.cjs.entry.js +1 -1
  67. package/dist/cjs/features-flow-item.cjs.entry.js +1 -1
  68. package/dist/cjs/index.cjs.js +0 -15
  69. package/dist/cjs/{index.es-4af23ecc.js → index.es-e7587227.js} +1 -1
  70. package/dist/cjs/instant-apps-control-panel.cjs.entry.js +4 -4
  71. package/dist/cjs/instant-apps-export.cjs.entry.js +7 -7
  72. package/dist/cjs/instant-apps-header.cjs.entry.js +4 -5
  73. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +21 -25
  74. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +6 -7
  75. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +8 -9
  76. package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +6 -6
  77. package/dist/cjs/instant-apps-landing-page.cjs.entry.js +1 -1
  78. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +9 -9
  79. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +9 -9
  80. package/dist/cjs/instant-apps-measurement.cjs.entry.js +6 -6
  81. package/dist/cjs/instant-apps-popover.cjs.entry.js +6 -6
  82. package/dist/cjs/instant-apps-popovers.cjs.entry.js +1 -1
  83. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +6 -6
  84. package/dist/cjs/instant-apps-splash.cjs.entry.js +6 -6
  85. package/dist/cjs/layout-manager.cjs.entry.js +4 -5
  86. package/dist/cjs/list-flow-item.cjs.entry.js +1 -1
  87. package/dist/cjs/loader.cjs.js +4 -4
  88. package/dist/cjs/location-flow-item.cjs.entry.js +1 -1
  89. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  90. package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
  91. package/dist/cjs/public-notification.cjs.entry.js +11 -12
  92. package/dist/cjs/refine-results-flow-item.cjs.entry.js +1 -1
  93. package/dist/cjs/share-item.cjs.entry.js +1 -1
  94. package/dist/cjs/solution-configuration.cjs.entry.js +1105 -21
  95. package/dist/cjs/solution-item-icon.cjs.entry.js +1 -1
  96. package/dist/cjs/solutions-components.cjs.js +5 -36
  97. package/dist/cjs/spatial-ref.cjs.entry.js +6 -7
  98. package/dist/cjs/store-manager.cjs.entry.js +1 -1
  99. package/dist/collection/utils/downloadUtils.js +2 -2
  100. package/dist/collection/utils/downloadUtils.ts +2 -2
  101. package/dist/components/ExpandToggle.js +8 -8
  102. package/dist/components/_commonjsHelpers.js +2 -10
  103. package/dist/components/action-bar.js +3 -3
  104. package/dist/components/action-group.js +1 -1
  105. package/dist/components/action-menu.js +1 -1
  106. package/dist/components/action-pad.js +1 -1
  107. package/dist/components/action.js +1 -1
  108. package/dist/components/alert.js +2 -2
  109. package/dist/components/arcgis-login.js +1 -1
  110. package/dist/components/avatar.js +1 -1
  111. package/dist/components/basemap-gallery2.js +1 -1
  112. package/dist/components/block.js +1 -1
  113. package/dist/components/buffer-tools2.js +1 -1
  114. package/dist/components/button.js +1 -1
  115. package/dist/components/calcite-accordion-item.js +1 -1
  116. package/dist/components/calcite-accordion.js +1 -1
  117. package/dist/components/calcite-block-section.js +1 -1
  118. package/dist/components/calcite-card.js +1 -1
  119. package/dist/components/calcite-chip-group.js +1 -1
  120. package/dist/components/calcite-color-picker.js +5 -5
  121. package/dist/components/calcite-combobox-item-group.js +1 -1
  122. package/dist/components/calcite-fab.js +1 -1
  123. package/dist/components/calcite-inline-editable.js +1 -1
  124. package/dist/components/calcite-input-time-picker.js +1 -5
  125. package/dist/components/calcite-input-time-zone.js +2 -2
  126. package/dist/components/calcite-list-item-group.js +1 -1
  127. package/dist/components/calcite-menu-item.js +1 -1
  128. package/dist/components/calcite-meter.js +1 -1
  129. package/dist/components/calcite-navigation-logo.js +1 -1
  130. package/dist/components/calcite-navigation-user.js +1 -1
  131. package/dist/components/calcite-navigation.js +1 -1
  132. package/dist/components/calcite-option-group.js +1 -1
  133. package/dist/components/calcite-pick-list-group.js +3 -3
  134. package/dist/components/calcite-pick-list.js +1 -1
  135. package/dist/components/calcite-radio-button-group.js +1 -1
  136. package/dist/components/calcite-rating.js +1 -3
  137. package/dist/components/calcite-sheet.js +1 -1
  138. package/dist/components/calcite-shell-center-row.js +1 -1
  139. package/dist/components/calcite-sortable-list.js +1 -1
  140. package/dist/components/calcite-split-button.js +1 -1
  141. package/dist/components/calcite-stepper-item.js +1 -1
  142. package/dist/components/calcite-stepper.js +1 -1
  143. package/dist/components/calcite-table-row.js +1 -1
  144. package/dist/components/calcite-table.js +1 -1
  145. package/dist/components/calcite-text-area.js +2 -2
  146. package/dist/components/calcite-tile-select-group.js +1 -1
  147. package/dist/components/calcite-tile-select.js +1 -1
  148. package/dist/components/calcite-tile.js +1 -1
  149. package/dist/components/calcite-tip-group.js +1 -1
  150. package/dist/components/calcite-tip-manager.js +1 -8
  151. package/dist/components/calcite-tip.js +2 -2
  152. package/dist/components/card-manager2.js +1 -1
  153. package/dist/components/checkbox.js +1 -1
  154. package/dist/components/chip.js +1 -1
  155. package/dist/components/color-picker-hex-input.js +2 -2
  156. package/dist/components/color-picker-swatch.js +1 -1
  157. package/dist/components/combobox-item.js +1 -1
  158. package/dist/components/combobox.js +3 -314
  159. package/dist/components/consent-manager.js +13 -376
  160. package/dist/components/create-feature2.js +1 -1
  161. package/dist/components/crowdsource-manager.js +1 -1
  162. package/dist/components/crowdsource-reporter.js +1 -1
  163. package/dist/components/date-picker-day.js +1 -1
  164. package/dist/components/date-picker-month-header.js +1 -1
  165. package/dist/components/date-picker-month.js +1 -1
  166. package/dist/components/date-picker.js +1 -1
  167. package/dist/components/deduct-calculator2.js +1 -1
  168. package/dist/components/delete-button2.js +1 -1
  169. package/dist/components/dom.js +1 -28
  170. package/dist/components/downloadUtils.js +99 -1179
  171. package/dist/components/dropdown-group.js +1 -1
  172. package/dist/components/dropdown-item.js +1 -1
  173. package/dist/components/dropdown.js +1 -1
  174. package/dist/components/edit-card2.js +1 -1
  175. package/dist/components/esri-loader.js +3 -8
  176. package/dist/components/feature-comments.js +1 -1
  177. package/dist/components/feature-form-flow-item.js +1 -1
  178. package/dist/components/feature-list2.js +1 -1
  179. package/dist/components/features-flow-item.js +1 -1
  180. package/dist/components/filter.js +718 -1
  181. package/dist/components/filter2.js +2 -2
  182. package/dist/components/floating-ui.js +7 -384
  183. package/dist/components/floor-filter2.js +1 -1
  184. package/dist/components/flow-item.js +1 -1
  185. package/dist/components/flow.js +1 -1
  186. package/dist/components/focusTrapComponent.js +1 -1
  187. package/dist/components/form.js +1 -1
  188. package/dist/components/graph.js +1 -1
  189. package/dist/components/handle.js +1 -1
  190. package/dist/components/helpers.js +2 -6
  191. package/dist/components/html2canvas.js +3 -8
  192. package/dist/components/icon.js +1 -1
  193. package/dist/components/index.es.js +22 -555
  194. package/dist/components/index.js +0 -16
  195. package/dist/components/index2.js +0 -3
  196. package/dist/components/index3.js +1865 -41262
  197. package/dist/components/index5.js +185 -2086
  198. package/dist/components/index6.js +55 -188
  199. package/dist/components/info-card2.js +1 -1
  200. package/dist/components/input-date-picker.js +1 -1
  201. package/dist/components/input-message.js +1 -1
  202. package/dist/components/input-number.js +1 -1
  203. package/dist/components/input-text.js +1 -1
  204. package/dist/components/input.js +1 -1
  205. package/dist/components/instant-apps-ckeditor-wrapper2.js +1 -1
  206. package/dist/components/instant-apps-control-panel.js +1 -1
  207. package/dist/components/instant-apps-export.js +1 -1
  208. package/dist/components/instant-apps-filter-list2.js +1 -2
  209. package/dist/components/instant-apps-header2.js +2 -2
  210. package/dist/components/instant-apps-interactive-legend-classic2.js +7 -10
  211. package/dist/components/instant-apps-interactive-legend-count2.js +2 -2
  212. package/dist/components/instant-apps-interactive-legend-group-legend-element-caption.js +1 -1
  213. package/dist/components/instant-apps-interactive-legend-group-legend-element2.js +1 -1
  214. package/dist/components/instant-apps-interactive-legend-layer-element-caption2.js +1 -1
  215. package/dist/components/instant-apps-interactive-legend-layer-element2.js +1 -1
  216. package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +2 -2
  217. package/dist/components/instant-apps-interactive-legend-legend-element2.js +1 -1
  218. package/dist/components/instant-apps-interactive-legend-relationship2.js +1 -1
  219. package/dist/components/instant-apps-interactive-legend.js +1 -1
  220. package/dist/components/instant-apps-keyboard-shortcuts.js +1 -1
  221. package/dist/components/instant-apps-landing-page.js +1 -1
  222. package/dist/components/instant-apps-language-switcher.js +1 -1
  223. package/dist/components/instant-apps-language-translator-item2.js +1 -1
  224. package/dist/components/instant-apps-language-translator-search2.js +1 -1
  225. package/dist/components/instant-apps-language-translator2.js +1 -1
  226. package/dist/components/instant-apps-measurement-tool2.js +1 -1
  227. package/dist/components/instant-apps-measurement.js +1 -1
  228. package/dist/components/instant-apps-popover.js +1 -1
  229. package/dist/components/instant-apps-popovers.js +1 -1
  230. package/dist/components/instant-apps-scoreboard.js +1 -1
  231. package/dist/components/instant-apps-social-share2.js +1 -1
  232. package/dist/components/instant-apps-splash.js +2 -2
  233. package/dist/components/json-editor2.js +1 -1
  234. package/dist/components/key.js +0 -28
  235. package/dist/components/label.js +1 -1
  236. package/dist/components/label2.js +1 -1
  237. package/dist/components/languageUtil.js +1 -22
  238. package/dist/components/layer-list2.js +1 -1
  239. package/dist/components/layer-table2.js +1 -1
  240. package/dist/components/layout-manager.js +1 -1
  241. package/dist/components/link.js +1 -1
  242. package/dist/components/list-flow-item.js +1 -1
  243. package/dist/components/list-item.js +1 -1
  244. package/dist/components/list.js +2 -2
  245. package/dist/components/loader.js +1 -1
  246. package/dist/components/locale.js +0 -12
  247. package/dist/components/locale2.js +1 -2
  248. package/dist/components/location-flow-item.js +1 -1
  249. package/dist/components/map-card2.js +1 -1
  250. package/dist/components/map-draw-tools2.js +1 -1
  251. package/dist/components/map-fullscreen2.js +1 -1
  252. package/dist/components/map-layer-picker2.js +1 -1
  253. package/dist/components/map-legend2.js +1 -1
  254. package/dist/components/map-picker2.js +1 -1
  255. package/dist/components/map-search2.js +1 -1
  256. package/dist/components/map-select-tools2.js +1 -1
  257. package/dist/components/map-tools2.js +1 -3
  258. package/dist/components/menu.js +1 -1
  259. package/dist/components/modal.js +1 -7
  260. package/dist/components/mode.js +0 -8
  261. package/dist/components/notice.js +1 -1
  262. package/dist/components/openCloseComponent.js +0 -48
  263. package/dist/components/option.js +1 -1
  264. package/dist/components/pagination.js +1 -194
  265. package/dist/components/panel.js +1 -2
  266. package/dist/components/pci-calculator.js +1 -1
  267. package/dist/components/pdf-download2.js +1 -1
  268. package/dist/components/pick-list-item.js +1 -1
  269. package/dist/components/popover.js +1 -1
  270. package/dist/components/progress.js +1 -1
  271. package/dist/components/public-notification.js +1 -1
  272. package/dist/components/purify.js +2 -5
  273. package/dist/components/queryUtils.js +0 -43
  274. package/dist/components/radio-button.js +1 -1
  275. package/dist/components/refine-results-flow-item.js +1 -1
  276. package/dist/components/refine-selection2.js +1 -1
  277. package/dist/components/resources.js +0 -17
  278. package/dist/components/resources4.js +0 -3
  279. package/dist/components/scrim.js +1 -1
  280. package/dist/components/segmented-control-item.js +1 -1
  281. package/dist/components/segmented-control.js +1 -1
  282. package/dist/components/select.js +1 -1
  283. package/dist/components/share-item.js +1 -1
  284. package/dist/components/shared-list-render.js +1 -6
  285. package/dist/components/shell-panel.js +1 -1
  286. package/dist/components/shell.js +1 -1
  287. package/dist/components/slider.js +1 -3
  288. package/dist/components/solution-configuration.js +1088 -2
  289. package/dist/components/solution-contents2.js +1 -1
  290. package/dist/components/solution-item-details2.js +1 -1
  291. package/dist/components/solution-item-icon2.js +1 -1
  292. package/dist/components/solution-item-sharing2.js +1 -1
  293. package/dist/components/solution-item2.js +1 -1
  294. package/dist/components/solution-organization-variables2.js +1 -1
  295. package/dist/components/solution-resource-item2.js +3 -2
  296. package/dist/components/solution-spatial-ref2.js +1 -1
  297. package/dist/components/solution-store.js +756 -1
  298. package/dist/components/solution-template-data2.js +1 -1
  299. package/dist/components/solution-variables2.js +1 -1
  300. package/dist/components/sortableComponent.js +0 -701
  301. package/dist/components/spatial-ref2.js +4 -263
  302. package/dist/components/stack.js +1 -1
  303. package/dist/components/store-manager.js +1 -1
  304. package/dist/components/store.js +0 -1
  305. package/dist/components/switch.js +1 -1
  306. package/dist/components/t9n.js +1 -1
  307. package/dist/components/tab-nav.js +1 -1
  308. package/dist/components/tab-title.js +1 -1
  309. package/dist/components/tab.js +1 -1
  310. package/dist/components/table-cell.js +1 -1
  311. package/dist/components/table-header.js +1 -1
  312. package/dist/components/tabs.js +1 -1
  313. package/dist/components/time-picker.js +2 -2
  314. package/dist/components/tooltip.js +1 -1
  315. package/dist/components/tree-item.js +1 -1
  316. package/dist/components/tree.js +1 -1
  317. package/dist/components/utils.js +1 -6
  318. package/dist/components/utils2.js +1 -1
  319. package/dist/components/utils4.js +0 -12
  320. package/dist/components/value-list-item.js +1 -1
  321. package/dist/components/value-list.js +1 -4
  322. package/dist/esm/arcgis-login.entry.js +1 -1
  323. package/dist/esm/calcite-accordion-item.entry.js +5 -5
  324. package/dist/esm/calcite-accordion.entry.js +2 -2
  325. package/dist/esm/calcite-action-bar.entry.js +11 -11
  326. package/dist/esm/calcite-action-group.entry.js +12 -12
  327. package/dist/esm/calcite-avatar.entry.js +4 -4
  328. package/dist/esm/calcite-block-section.entry.js +8 -8
  329. package/dist/esm/calcite-button.entry.js +13 -13
  330. package/dist/esm/calcite-card.entry.js +8 -8
  331. package/dist/esm/calcite-checkbox.entry.js +9 -9
  332. package/dist/esm/calcite-chip-group.entry.js +7 -7
  333. package/dist/esm/calcite-color-picker.entry.js +16 -16
  334. package/dist/esm/calcite-combobox-item-group.entry.js +4 -4
  335. package/dist/esm/calcite-fab.entry.js +6 -6
  336. package/dist/esm/calcite-icon.entry.js +5 -5
  337. package/dist/esm/calcite-inline-editable.entry.js +11 -11
  338. package/dist/esm/calcite-input-number.entry.js +13 -13
  339. package/dist/esm/calcite-input-text.entry.js +13 -13
  340. package/dist/esm/calcite-input-time-picker.entry.js +17 -17
  341. package/dist/esm/calcite-input-time-zone.entry.js +12 -12
  342. package/dist/esm/calcite-label.entry.js +4 -4
  343. package/dist/esm/calcite-link.entry.js +6 -6
  344. package/dist/esm/calcite-list-item-group.entry.js +4 -4
  345. package/dist/esm/calcite-menu-item.entry.js +8 -8
  346. package/dist/esm/calcite-menu.entry.js +8 -8
  347. package/dist/esm/calcite-meter.entry.js +8 -8
  348. package/dist/esm/calcite-modal.entry.js +11 -17
  349. package/dist/esm/calcite-navigation-logo.entry.js +2 -2
  350. package/dist/esm/calcite-navigation-user.entry.js +2 -2
  351. package/dist/esm/calcite-navigation.entry.js +4 -4
  352. package/dist/esm/calcite-notice.entry.js +10 -10
  353. package/dist/esm/calcite-option-group.entry.js +1 -1
  354. package/dist/esm/calcite-pagination.entry.js +8 -201
  355. package/dist/esm/calcite-pick-list-group.entry.js +6 -6
  356. package/dist/esm/calcite-pick-list-item.entry.js +13 -13
  357. package/dist/esm/calcite-pick-list.entry.js +10 -10
  358. package/dist/esm/calcite-radio-button-group.entry.js +4 -4
  359. package/dist/esm/calcite-radio-button.entry.js +8 -8
  360. package/dist/esm/calcite-rating.entry.js +12 -14
  361. package/dist/esm/calcite-scrim.entry.js +7 -7
  362. package/dist/esm/calcite-sheet.entry.js +7 -7
  363. package/dist/esm/calcite-shell-center-row.entry.js +5 -5
  364. package/dist/esm/calcite-sortable-list.entry.js +7 -7
  365. package/dist/esm/calcite-split-button.entry.js +4 -4
  366. package/dist/esm/calcite-stepper-item.entry.js +10 -10
  367. package/dist/esm/calcite-stepper.entry.js +7 -7
  368. package/dist/esm/calcite-switch.entry.js +9 -9
  369. package/dist/esm/calcite-table-row.entry.js +6 -6
  370. package/dist/esm/calcite-table.entry.js +9 -9
  371. package/dist/esm/calcite-text-area.entry.js +15 -14
  372. package/dist/esm/calcite-tile-select-group.entry.js +3 -3
  373. package/dist/esm/calcite-tile-select.entry.js +4 -4
  374. package/dist/esm/calcite-tile.entry.js +7 -7
  375. package/dist/esm/calcite-time-picker.entry.js +9 -9
  376. package/dist/esm/calcite-tip-group.entry.js +1 -1
  377. package/dist/esm/calcite-tip-manager.entry.js +8 -15
  378. package/dist/esm/calcite-tip.entry.js +9 -9
  379. package/dist/esm/calcite-tooltip.entry.js +7 -7
  380. package/dist/esm/card-manager_3.entry.js +1 -1
  381. package/dist/esm/consent-manager.entry.js +15 -379
  382. package/dist/esm/crowdsource-manager.entry.js +5 -7
  383. package/dist/esm/crowdsource-reporter.entry.js +5 -7
  384. package/dist/esm/deduct-calculator.entry.js +1 -1
  385. package/dist/esm/{downloadUtils-01e2cb56.js → downloadUtils-0c13073b.js} +3 -3
  386. package/dist/esm/feature-comments.entry.js +1 -1
  387. package/dist/esm/feature-form-flow-item.entry.js +1 -1
  388. package/dist/esm/features-flow-item.entry.js +1 -1
  389. package/dist/esm/{index.es-ac6f5e76.js → index.es-ad250bc6.js} +1 -1
  390. package/dist/esm/index.js +0 -15
  391. package/dist/esm/instant-apps-control-panel.entry.js +4 -4
  392. package/dist/esm/instant-apps-export.entry.js +7 -7
  393. package/dist/esm/instant-apps-header.entry.js +4 -5
  394. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +11 -15
  395. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +6 -7
  396. package/dist/esm/instant-apps-interactive-legend.entry.js +8 -9
  397. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +6 -6
  398. package/dist/esm/instant-apps-landing-page.entry.js +1 -1
  399. package/dist/esm/instant-apps-language-switcher.entry.js +9 -9
  400. package/dist/esm/instant-apps-language-translator.entry.js +9 -9
  401. package/dist/esm/instant-apps-measurement.entry.js +6 -6
  402. package/dist/esm/instant-apps-popover.entry.js +6 -6
  403. package/dist/esm/instant-apps-popovers.entry.js +1 -1
  404. package/dist/esm/instant-apps-scoreboard.entry.js +6 -6
  405. package/dist/esm/instant-apps-splash.entry.js +6 -6
  406. package/dist/esm/layout-manager.entry.js +4 -5
  407. package/dist/esm/list-flow-item.entry.js +1 -1
  408. package/dist/esm/loader.js +5 -5
  409. package/dist/esm/location-flow-item.entry.js +1 -1
  410. package/dist/esm/map-select-tools_3.entry.js +1 -1
  411. package/dist/esm/pci-calculator.entry.js +1 -1
  412. package/dist/esm/public-notification.entry.js +10 -11
  413. package/dist/esm/refine-results-flow-item.entry.js +1 -1
  414. package/dist/esm/share-item.entry.js +1 -1
  415. package/dist/esm/solution-configuration.entry.js +1093 -9
  416. package/dist/esm/solution-item-icon.entry.js +1 -1
  417. package/dist/esm/solutions-components.js +6 -37
  418. package/dist/esm/spatial-ref.entry.js +6 -7
  419. package/dist/esm/store-manager.entry.js +1 -1
  420. package/dist/solutions-components/index.esm.js +0 -15
  421. package/dist/solutions-components/{p-8910dc99.js → p-1d3a1794.js} +2 -2
  422. package/dist/solutions-components/{p-b4913a01.js → p-590a2a26.js} +1 -1
  423. package/dist/solutions-components/{p-53ef8adf.entry.js → p-65ad1625.entry.js} +1 -1
  424. package/dist/solutions-components/{p-04dbc667.entry.js → p-989bf0bf.entry.js} +1 -1
  425. package/dist/solutions-components/{p-607773a3.entry.js → p-a0611720.entry.js} +1 -1
  426. package/dist/solutions-components/solutions-components.css +1 -84
  427. package/dist/solutions-components/solutions-components.esm.js +1 -52
  428. package/dist/solutions-components/utils/downloadUtils.ts +2 -2
  429. package/package.json +1 -1
  430. package/dist/cjs/ExpandToggle-3ab7dfd7.js +0 -118
  431. package/dist/cjs/FloatingArrow-89e0e55a.js +0 -50
  432. package/dist/cjs/Heading-9112a4c5.js +0 -25
  433. package/dist/cjs/InitiativeUiSchemaEdit-108652db.js +0 -28
  434. package/dist/cjs/ProjectUiSchemaCreate-81217580.js +0 -126
  435. package/dist/cjs/ProjectUiSchemaEdit-d5f11c17.js +0 -178
  436. package/dist/cjs/Validation-20182093.js +0 -20
  437. package/dist/cjs/_commonjsHelpers-ed90c4ad.js +0 -55
  438. package/dist/cjs/app-globals-379d737f.js +0 -69
  439. package/dist/cjs/ar-a694ca24.js +0 -105
  440. package/dist/cjs/basemap-gallery.cjs.entry.js +0 -121
  441. package/dist/cjs/bg-62b6b3ba.js +0 -83
  442. package/dist/cjs/browser-fe25aefa.js +0 -28
  443. package/dist/cjs/bs-e673542b.js +0 -52
  444. package/dist/cjs/buffer-tools.cjs.entry.js +0 -257
  445. package/dist/cjs/ca-e4d2f562.js +0 -72
  446. package/dist/cjs/calcite-action-menu.cjs.entry.js +0 -295
  447. package/dist/cjs/calcite-action-pad.cjs.entry.js +0 -169
  448. package/dist/cjs/calcite-action.cjs.entry.js +0 -188
  449. package/dist/cjs/calcite-alert.cjs.entry.js +0 -322
  450. package/dist/cjs/calcite-block.cjs.entry.js +0 -214
  451. package/dist/cjs/calcite-chip.cjs.entry.js +0 -262
  452. package/dist/cjs/calcite-color-picker-hex-input.cjs.entry.js +0 -274
  453. package/dist/cjs/calcite-color-picker-swatch.cjs.entry.js +0 -99
  454. package/dist/cjs/calcite-combobox-item.cjs.entry.js +0 -145
  455. package/dist/cjs/calcite-combobox.cjs.entry.js +0 -1431
  456. package/dist/cjs/calcite-date-picker-day.cjs.entry.js +0 -97
  457. package/dist/cjs/calcite-date-picker-month-header.cjs.entry.js +0 -207
  458. package/dist/cjs/calcite-date-picker-month.cjs.entry.js +0 -362
  459. package/dist/cjs/calcite-date-picker.cjs.entry.js +0 -460
  460. package/dist/cjs/calcite-dropdown-group.cjs.entry.js +0 -85
  461. package/dist/cjs/calcite-dropdown-item.cjs.entry.js +0 -188
  462. package/dist/cjs/calcite-dropdown.cjs.entry.js +0 -430
  463. package/dist/cjs/calcite-filter.cjs.entry.js +0 -179
  464. package/dist/cjs/calcite-flow-item.cjs.entry.js +0 -198
  465. package/dist/cjs/calcite-flow.cjs.entry.js +0 -153
  466. package/dist/cjs/calcite-graph.cjs.entry.js +0 -226
  467. package/dist/cjs/calcite-handle.cjs.entry.js +0 -204
  468. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +0 -744
  469. package/dist/cjs/calcite-input-message.cjs.entry.js +0 -70
  470. package/dist/cjs/calcite-input-time-picker-9e93f694.js +0 -1854
  471. package/dist/cjs/calcite-input.cjs.entry.js +0 -695
  472. package/dist/cjs/calcite-list-item.cjs.entry.js +0 -454
  473. package/dist/cjs/calcite-list.cjs.entry.js +0 -567
  474. package/dist/cjs/calcite-loader.cjs.entry.js +0 -80
  475. package/dist/cjs/calcite-option.cjs.entry.js +0 -88
  476. package/dist/cjs/calcite-panel.cjs.entry.js +0 -270
  477. package/dist/cjs/calcite-popover.cjs.entry.js +0 -418
  478. package/dist/cjs/calcite-progress.cjs.entry.js +0 -41
  479. package/dist/cjs/calcite-segmented-control-item.cjs.entry.js +0 -70
  480. package/dist/cjs/calcite-segmented-control.cjs.entry.js +0 -245
  481. package/dist/cjs/calcite-select.cjs.entry.js +0 -235
  482. package/dist/cjs/calcite-shell-panel.cjs.entry.js +0 -414
  483. package/dist/cjs/calcite-shell.cjs.entry.js +0 -174
  484. package/dist/cjs/calcite-slider.cjs.entry.js +0 -844
  485. package/dist/cjs/calcite-stack.cjs.entry.js +0 -74
  486. package/dist/cjs/calcite-tab-nav.cjs.entry.js +0 -263
  487. package/dist/cjs/calcite-tab-title.cjs.entry.js +0 -291
  488. package/dist/cjs/calcite-tab.cjs.entry.js +0 -112
  489. package/dist/cjs/calcite-table-cell.cjs.entry.js +0 -156
  490. package/dist/cjs/calcite-table-header.cjs.entry.js +0 -169
  491. package/dist/cjs/calcite-tabs.cjs.entry.js +0 -178
  492. package/dist/cjs/calcite-tree-item.cjs.entry.js +0 -296
  493. package/dist/cjs/calcite-tree.cjs.entry.js +0 -315
  494. package/dist/cjs/calcite-value-list-item.cjs.entry.js +0 -157
  495. package/dist/cjs/calcite-value-list.cjs.entry.js +0 -326
  496. package/dist/cjs/card-manager.cjs.entry.js +0 -107
  497. package/dist/cjs/common-1b4bd8de.js +0 -297
  498. package/dist/cjs/conditionalSlot-73e71a05.js +0 -63
  499. package/dist/cjs/create-feature.cjs.entry.js +0 -263
  500. package/dist/cjs/cs-1ea34123.js +0 -148
  501. package/dist/cjs/da-199f5488.js +0 -67
  502. package/dist/cjs/date-3d094f58.js +0 -261
  503. package/dist/cjs/de-222afa04.js +0 -92
  504. package/dist/cjs/de-at-a62870ea.js +0 -91
  505. package/dist/cjs/de-ch-b0b46c1b.js +0 -91
  506. package/dist/cjs/delete-button.cjs.entry.js +0 -150
  507. package/dist/cjs/dom-cf1e2e9f.js +0 -1114
  508. package/dist/cjs/downloadUtils-de0c0682.js +0 -4246
  509. package/dist/cjs/edit-card.cjs.entry.js +0 -228
  510. package/dist/cjs/el-934951a0.js +0 -67
  511. package/dist/cjs/en-au-6872d248.js +0 -67
  512. package/dist/cjs/en-ca-7133c4f2.js +0 -66
  513. package/dist/cjs/en-gb-2c66b954.js +0 -70
  514. package/dist/cjs/es-48e65aa5.js +0 -67
  515. package/dist/cjs/es-mx-46d70897.js +0 -66
  516. package/dist/cjs/esri-loader-5b8fbfa4.js +0 -308
  517. package/dist/cjs/et-63c5628d.js +0 -93
  518. package/dist/cjs/feature-list.cjs.entry.js +0 -199
  519. package/dist/cjs/fi-dc20f9ac.js +0 -116
  520. package/dist/cjs/filter-cc2705b7.js +0 -48
  521. package/dist/cjs/floating-ui-90bd00af.js +0 -2350
  522. package/dist/cjs/floor-filter.cjs.entry.js +0 -111
  523. package/dist/cjs/focusTrapComponent-946b0666.js +0 -1028
  524. package/dist/cjs/form-da52e819.js +0 -316
  525. package/dist/cjs/fr-7067996a.js +0 -69
  526. package/dist/cjs/fr-ch-dbd7ba02.js +0 -67
  527. package/dist/cjs/he-4eb6a5a9.js +0 -106
  528. package/dist/cjs/helpers-7415d67a.js +0 -830
  529. package/dist/cjs/hi-5563acd4.js +0 -66
  530. package/dist/cjs/hr-7a0a4191.js +0 -81
  531. package/dist/cjs/html2canvas-57f1616d.js +0 -7847
  532. package/dist/cjs/hu-0b69b8fb.js +0 -89
  533. package/dist/cjs/id-345dd5a9.js +0 -67
  534. package/dist/cjs/index-5799a29c.js +0 -41521
  535. package/dist/cjs/index-8c75d784.js +0 -1958
  536. package/dist/cjs/index-af047760.js +0 -201
  537. package/dist/cjs/index-b53bfd7c.js +0 -4185
  538. package/dist/cjs/index.es-152bb462.js +0 -11342
  539. package/dist/cjs/info-card.cjs.entry.js +0 -320
  540. package/dist/cjs/instant-apps-ckeditor-wrapper.cjs.entry.js +0 -125
  541. package/dist/cjs/instant-apps-filter-list.cjs.entry.js +0 -1059
  542. package/dist/cjs/instant-apps-interactive-legend-count.cjs.entry.js +0 -104
  543. package/dist/cjs/instant-apps-interactive-legend-group-legend-element.cjs.entry.js +0 -56
  544. package/dist/cjs/instant-apps-interactive-legend-layer-element-caption.cjs.entry.js +0 -55
  545. package/dist/cjs/instant-apps-interactive-legend-layer-element.cjs.entry.js +0 -57
  546. package/dist/cjs/instant-apps-interactive-legend-legend-element-caption.cjs.entry.js +0 -104
  547. package/dist/cjs/instant-apps-interactive-legend-legend-element.cjs.entry.js +0 -65
  548. package/dist/cjs/instant-apps-interactive-legend-relationship.cjs.entry.js +0 -552
  549. package/dist/cjs/instant-apps-language-translator-item.cjs.entry.js +0 -384
  550. package/dist/cjs/instant-apps-language-translator-search.cjs.entry.js +0 -105
  551. package/dist/cjs/instant-apps-measurement-tool.cjs.entry.js +0 -139
  552. package/dist/cjs/instant-apps-social-share.cjs.entry.js +0 -515
  553. package/dist/cjs/interactive-08e5bc95.js +0 -144
  554. package/dist/cjs/it-ac7cf3e5.js +0 -67
  555. package/dist/cjs/it-ch-6f7209eb.js +0 -67
  556. package/dist/cjs/ja-29e7b0a2.js +0 -73
  557. package/dist/cjs/json-editor.cjs.entry.js +0 -406
  558. package/dist/cjs/key-86f4a0b0.js +0 -47
  559. package/dist/cjs/ko-aeebde8b.js +0 -73
  560. package/dist/cjs/label-24b05042.js +0 -186
  561. package/dist/cjs/languageSwitcher-aafa5b47.js +0 -58
  562. package/dist/cjs/languageUtil-43c3acdc.js +0 -90
  563. package/dist/cjs/layer-list.cjs.entry.js +0 -207
  564. package/dist/cjs/layer-table.cjs.entry.js +0 -1487
  565. package/dist/cjs/loadModules-a67b6702.js +0 -23
  566. package/dist/cjs/loadModules-b5f244cd.js +0 -30
  567. package/dist/cjs/loadable-41446b78.js +0 -97
  568. package/dist/cjs/locale-28c7c569.js +0 -91
  569. package/dist/cjs/locale-42a9e623.js +0 -152
  570. package/dist/cjs/locale-a615b02f.js +0 -585
  571. package/dist/cjs/lodash-7587da9f.js +0 -18030
  572. package/dist/cjs/lt-6816d14c.js +0 -98
  573. package/dist/cjs/lv-2c998515.js +0 -67
  574. package/dist/cjs/map-card.cjs.entry.js +0 -192
  575. package/dist/cjs/map-draw-tools.cjs.entry.js +0 -358
  576. package/dist/cjs/map-fullscreen.cjs.entry.js +0 -116
  577. package/dist/cjs/map-layer-picker.cjs.entry.js +0 -346
  578. package/dist/cjs/map-legend.cjs.entry.js +0 -109
  579. package/dist/cjs/map-picker.cjs.entry.js +0 -174
  580. package/dist/cjs/map-search.cjs.entry.js +0 -184
  581. package/dist/cjs/map-select-tools.cjs.entry.js +0 -798
  582. package/dist/cjs/map-tools.cjs.entry.js +0 -375
  583. package/dist/cjs/mapViewUtils-6fa5bab1.js +0 -271
  584. package/dist/cjs/mk-147994ea.js +0 -67
  585. package/dist/cjs/mode-a0417ce5.js +0 -27
  586. package/dist/cjs/nb-f3d75f05.js +0 -68
  587. package/dist/cjs/nl-cb0a22c8.js +0 -68
  588. package/dist/cjs/observers-5923a7cc.js +0 -58
  589. package/dist/cjs/openCloseComponent-8d9cb545.js +0 -140
  590. package/dist/cjs/parser-e80279bf.js +0 -1656
  591. package/dist/cjs/pdf-download.cjs.entry.js +0 -359
  592. package/dist/cjs/pl-ade28edd.js +0 -115
  593. package/dist/cjs/popupUtils-4de17e65.js +0 -96
  594. package/dist/cjs/pt-5543b782.js +0 -68
  595. package/dist/cjs/pt-br-bdce1868.js +0 -66
  596. package/dist/cjs/publicNotificationStore-f690e171.js +0 -47
  597. package/dist/cjs/purify-557ad134.js +0 -1715
  598. package/dist/cjs/queryUtils-aba29fcf.js +0 -253
  599. package/dist/cjs/refine-selection.cjs.entry.js +0 -411
  600. package/dist/cjs/resources-2ccf85d3.js +0 -53
  601. package/dist/cjs/resources-37006465.js +0 -29
  602. package/dist/cjs/resources-63b3a6b8.js +0 -116
  603. package/dist/cjs/resources-a2b1b149.js +0 -49
  604. package/dist/cjs/resources-ac626172.js +0 -26
  605. package/dist/cjs/resources-b0cc39b4.js +0 -30
  606. package/dist/cjs/ro-f4bb9704.js +0 -67
  607. package/dist/cjs/ru-ba86b627.js +0 -127
  608. package/dist/cjs/shadow-css-bbaea014.js +0 -483
  609. package/dist/cjs/shared-list-render-c8555864.js +0 -370
  610. package/dist/cjs/sk-ac03aca5.js +0 -149
  611. package/dist/cjs/sl-c68e3fd0.js +0 -169
  612. package/dist/cjs/solution-contents.cjs.entry.js +0 -84
  613. package/dist/cjs/solution-item-details.cjs.entry.js +0 -199
  614. package/dist/cjs/solution-item-sharing.cjs.entry.js +0 -139
  615. package/dist/cjs/solution-item.cjs.entry.js +0 -106
  616. package/dist/cjs/solution-organization-variables.cjs.entry.js +0 -95
  617. package/dist/cjs/solution-resource-item.cjs.entry.js +0 -284
  618. package/dist/cjs/solution-spatial-ref.cjs.entry.js +0 -158
  619. package/dist/cjs/solution-store-6194ba89.js +0 -589
  620. package/dist/cjs/solution-template-data.cjs.entry.js +0 -119
  621. package/dist/cjs/solution-variables.cjs.entry.js +0 -107
  622. package/dist/cjs/sortableComponent-5e3419af.js +0 -3443
  623. package/dist/cjs/sr-80f65cf0.js +0 -102
  624. package/dist/cjs/store-1f422ad4.js +0 -91
  625. package/dist/cjs/sv-eee15401.js +0 -72
  626. package/dist/cjs/t9n-463dcbff.js +0 -103
  627. package/dist/cjs/th-f90768db.js +0 -66
  628. package/dist/cjs/time-4a9bf7e2.js +0 -289
  629. package/dist/cjs/tr-37fec0b5.js +0 -67
  630. package/dist/cjs/uk-3041a292.js +0 -105
  631. package/dist/cjs/utils-3a633152.js +0 -64
  632. package/dist/cjs/utils-7281bf72.js +0 -110
  633. package/dist/cjs/utils-72a66b3c.js +0 -66
  634. package/dist/cjs/utils-934ee777.js +0 -142
  635. package/dist/cjs/utils-b276a49d.js +0 -226
  636. package/dist/cjs/vi-57a02ad1.js +0 -71
  637. package/dist/cjs/zh-cn-165c486d.js +0 -95
  638. package/dist/cjs/zh-hk-0aa560a6.js +0 -72
  639. package/dist/cjs/zh-tw-42d975f0.js +0 -93
  640. package/dist/components/InitiativeUiSchemaEdit.js +0 -26
  641. package/dist/components/ProjectUiSchemaCreate.js +0 -122
  642. package/dist/components/ProjectUiSchemaEdit.js +0 -176
  643. package/dist/components/index7.js +0 -71
  644. package/dist/components/lodash.js +0 -18025
  645. package/dist/components/parser.js +0 -1654
  646. package/dist/esm/ExpandToggle-22fd2faa.js +0 -110
  647. package/dist/esm/FloatingArrow-de6fd1c7.js +0 -48
  648. package/dist/esm/Heading-f003a141.js +0 -22
  649. package/dist/esm/InitiativeUiSchemaEdit-8ddacfe8.js +0 -26
  650. package/dist/esm/ProjectUiSchemaCreate-dd179c0f.js +0 -124
  651. package/dist/esm/ProjectUiSchemaEdit-fbfdf6e4.js +0 -176
  652. package/dist/esm/Validation-59a77488.js +0 -18
  653. package/dist/esm/_commonjsHelpers-3cd6d4ee.js +0 -49
  654. package/dist/esm/app-globals-928553ab.js +0 -67
  655. package/dist/esm/ar-75ffdabb.js +0 -103
  656. package/dist/esm/basemap-gallery.entry.js +0 -117
  657. package/dist/esm/bg-fac0bf10.js +0 -81
  658. package/dist/esm/browser-b8d08bed.js +0 -26
  659. package/dist/esm/bs-c03c8ef2.js +0 -50
  660. package/dist/esm/buffer-tools.entry.js +0 -253
  661. package/dist/esm/ca-29e49f82.js +0 -70
  662. package/dist/esm/calcite-action-menu.entry.js +0 -291
  663. package/dist/esm/calcite-action-pad.entry.js +0 -165
  664. package/dist/esm/calcite-action.entry.js +0 -184
  665. package/dist/esm/calcite-alert.entry.js +0 -318
  666. package/dist/esm/calcite-block.entry.js +0 -210
  667. package/dist/esm/calcite-chip.entry.js +0 -258
  668. package/dist/esm/calcite-color-picker-hex-input.entry.js +0 -270
  669. package/dist/esm/calcite-color-picker-swatch.entry.js +0 -95
  670. package/dist/esm/calcite-combobox-item.entry.js +0 -141
  671. package/dist/esm/calcite-combobox.entry.js +0 -1427
  672. package/dist/esm/calcite-date-picker-day.entry.js +0 -93
  673. package/dist/esm/calcite-date-picker-month-header.entry.js +0 -203
  674. package/dist/esm/calcite-date-picker-month.entry.js +0 -358
  675. package/dist/esm/calcite-date-picker.entry.js +0 -456
  676. package/dist/esm/calcite-dropdown-group.entry.js +0 -81
  677. package/dist/esm/calcite-dropdown-item.entry.js +0 -184
  678. package/dist/esm/calcite-dropdown.entry.js +0 -426
  679. package/dist/esm/calcite-filter.entry.js +0 -175
  680. package/dist/esm/calcite-flow-item.entry.js +0 -194
  681. package/dist/esm/calcite-flow.entry.js +0 -149
  682. package/dist/esm/calcite-graph.entry.js +0 -222
  683. package/dist/esm/calcite-handle.entry.js +0 -200
  684. package/dist/esm/calcite-input-date-picker.entry.js +0 -740
  685. package/dist/esm/calcite-input-message.entry.js +0 -66
  686. package/dist/esm/calcite-input-time-picker-e5cd4d26.js +0 -1851
  687. package/dist/esm/calcite-input.entry.js +0 -691
  688. package/dist/esm/calcite-list-item.entry.js +0 -450
  689. package/dist/esm/calcite-list.entry.js +0 -563
  690. package/dist/esm/calcite-loader.entry.js +0 -76
  691. package/dist/esm/calcite-option.entry.js +0 -84
  692. package/dist/esm/calcite-panel.entry.js +0 -266
  693. package/dist/esm/calcite-popover.entry.js +0 -414
  694. package/dist/esm/calcite-progress.entry.js +0 -37
  695. package/dist/esm/calcite-segmented-control-item.entry.js +0 -66
  696. package/dist/esm/calcite-segmented-control.entry.js +0 -241
  697. package/dist/esm/calcite-select.entry.js +0 -231
  698. package/dist/esm/calcite-shell-panel.entry.js +0 -410
  699. package/dist/esm/calcite-shell.entry.js +0 -170
  700. package/dist/esm/calcite-slider.entry.js +0 -840
  701. package/dist/esm/calcite-stack.entry.js +0 -70
  702. package/dist/esm/calcite-tab-nav.entry.js +0 -259
  703. package/dist/esm/calcite-tab-title.entry.js +0 -287
  704. package/dist/esm/calcite-tab.entry.js +0 -108
  705. package/dist/esm/calcite-table-cell.entry.js +0 -152
  706. package/dist/esm/calcite-table-header.entry.js +0 -165
  707. package/dist/esm/calcite-tabs.entry.js +0 -174
  708. package/dist/esm/calcite-tree-item.entry.js +0 -292
  709. package/dist/esm/calcite-tree.entry.js +0 -311
  710. package/dist/esm/calcite-value-list-item.entry.js +0 -153
  711. package/dist/esm/calcite-value-list.entry.js +0 -322
  712. package/dist/esm/card-manager.entry.js +0 -103
  713. package/dist/esm/common-7e0dcaa2.js +0 -295
  714. package/dist/esm/conditionalSlot-a395417e.js +0 -60
  715. package/dist/esm/create-feature.entry.js +0 -259
  716. package/dist/esm/cs-04f36d01.js +0 -146
  717. package/dist/esm/da-5a3b8600.js +0 -65
  718. package/dist/esm/date-74c7f03b.js +0 -245
  719. package/dist/esm/de-579cda2e.js +0 -90
  720. package/dist/esm/de-at-52bf1c4c.js +0 -89
  721. package/dist/esm/de-ch-12d03480.js +0 -89
  722. package/dist/esm/delete-button.entry.js +0 -146
  723. package/dist/esm/dom-b91aa537.js +0 -1083
  724. package/dist/esm/downloadUtils-b3220f86.js +0 -4240
  725. package/dist/esm/edit-card.entry.js +0 -224
  726. package/dist/esm/el-c18d3ea4.js +0 -65
  727. package/dist/esm/en-au-2599e6da.js +0 -65
  728. package/dist/esm/en-ca-8cfbe6bc.js +0 -64
  729. package/dist/esm/en-gb-5e4e8a1e.js +0 -68
  730. package/dist/esm/es-d86f9957.js +0 -65
  731. package/dist/esm/es-mx-f99d9fd1.js +0 -64
  732. package/dist/esm/esri-loader-af2bbfd5.js +0 -306
  733. package/dist/esm/et-8bf52e57.js +0 -91
  734. package/dist/esm/feature-list.entry.js +0 -195
  735. package/dist/esm/fi-aeb49e52.js +0 -114
  736. package/dist/esm/filter-0d00d2e2.js +0 -46
  737. package/dist/esm/floating-ui-b3256614.js +0 -2342
  738. package/dist/esm/floor-filter.entry.js +0 -107
  739. package/dist/esm/focusTrapComponent-2fe6623b.js +0 -1023
  740. package/dist/esm/form-f2181470.js +0 -307
  741. package/dist/esm/fr-6200cc01.js +0 -67
  742. package/dist/esm/fr-ch-df62bb30.js +0 -65
  743. package/dist/esm/he-07ace6cb.js +0 -104
  744. package/dist/esm/helpers-85ca7251.js +0 -807
  745. package/dist/esm/hi-5aa9519e.js +0 -64
  746. package/dist/esm/hr-e0614bed.js +0 -79
  747. package/dist/esm/html2canvas-d52e7c8d.js +0 -7845
  748. package/dist/esm/hu-732fe37c.js +0 -87
  749. package/dist/esm/id-0832fc24.js +0 -65
  750. package/dist/esm/index-7fc1cba9.js +0 -41502
  751. package/dist/esm/index-91eeaf01.js +0 -199
  752. package/dist/esm/index-b1fb529b.js +0 -1956
  753. package/dist/esm/index-bdfaac50.js +0 -4145
  754. package/dist/esm/index.es-3db60115.js +0 -11256
  755. package/dist/esm/info-card.entry.js +0 -316
  756. package/dist/esm/instant-apps-ckeditor-wrapper.entry.js +0 -121
  757. package/dist/esm/instant-apps-filter-list.entry.js +0 -1055
  758. package/dist/esm/instant-apps-interactive-legend-count.entry.js +0 -100
  759. package/dist/esm/instant-apps-interactive-legend-group-legend-element.entry.js +0 -52
  760. package/dist/esm/instant-apps-interactive-legend-layer-element-caption.entry.js +0 -51
  761. package/dist/esm/instant-apps-interactive-legend-layer-element.entry.js +0 -53
  762. package/dist/esm/instant-apps-interactive-legend-legend-element-caption.entry.js +0 -100
  763. package/dist/esm/instant-apps-interactive-legend-legend-element.entry.js +0 -61
  764. package/dist/esm/instant-apps-interactive-legend-relationship.entry.js +0 -548
  765. package/dist/esm/instant-apps-language-translator-item.entry.js +0 -380
  766. package/dist/esm/instant-apps-language-translator-search.entry.js +0 -101
  767. package/dist/esm/instant-apps-measurement-tool.entry.js +0 -135
  768. package/dist/esm/instant-apps-social-share.entry.js +0 -511
  769. package/dist/esm/interactive-71585ecc.js +0 -139
  770. package/dist/esm/it-142bc820.js +0 -65
  771. package/dist/esm/it-ch-1ad1f0ac.js +0 -65
  772. package/dist/esm/ja-6a33e9d4.js +0 -71
  773. package/dist/esm/json-editor.entry.js +0 -402
  774. package/dist/esm/key-9a10d862.js +0 -44
  775. package/dist/esm/ko-d61df01d.js +0 -71
  776. package/dist/esm/label-16184ce7.js +0 -179
  777. package/dist/esm/languageSwitcher-2a9037e5.js +0 -55
  778. package/dist/esm/languageUtil-71a7a914.js +0 -87
  779. package/dist/esm/layer-list.entry.js +0 -203
  780. package/dist/esm/layer-table.entry.js +0 -1483
  781. package/dist/esm/loadModules-827c5581.js +0 -28
  782. package/dist/esm/loadModules-acccbc1c.js +0 -21
  783. package/dist/esm/loadable-aea90723.js +0 -92
  784. package/dist/esm/locale-4cfbae3e.js +0 -86
  785. package/dist/esm/locale-857f39cf.js +0 -572
  786. package/dist/esm/locale-d9463a95.js +0 -148
  787. package/dist/esm/lodash-98e4b7d0.js +0 -18025
  788. package/dist/esm/lt-652c530a.js +0 -96
  789. package/dist/esm/lv-84e48ed0.js +0 -65
  790. package/dist/esm/map-card.entry.js +0 -188
  791. package/dist/esm/map-draw-tools.entry.js +0 -354
  792. package/dist/esm/map-fullscreen.entry.js +0 -112
  793. package/dist/esm/map-layer-picker.entry.js +0 -342
  794. package/dist/esm/map-legend.entry.js +0 -105
  795. package/dist/esm/map-picker.entry.js +0 -170
  796. package/dist/esm/map-search.entry.js +0 -180
  797. package/dist/esm/map-select-tools.entry.js +0 -794
  798. package/dist/esm/map-tools.entry.js +0 -371
  799. package/dist/esm/mapViewUtils-436a516e.js +0 -261
  800. package/dist/esm/mk-bbf2ee01.js +0 -65
  801. package/dist/esm/mode-f9bfc4e9.js +0 -25
  802. package/dist/esm/nb-ccfaa0f7.js +0 -66
  803. package/dist/esm/nl-4bc56289.js +0 -66
  804. package/dist/esm/observers-5ba39eee.js +0 -56
  805. package/dist/esm/openCloseComponent-b4b3788b.js +0 -138
  806. package/dist/esm/parser-87982ce2.js +0 -1654
  807. package/dist/esm/pdf-download.entry.js +0 -355
  808. package/dist/esm/pl-1f435988.js +0 -113
  809. package/dist/esm/popupUtils-b61d7ffd.js +0 -94
  810. package/dist/esm/pt-4a05a00d.js +0 -66
  811. package/dist/esm/pt-br-9720547b.js +0 -64
  812. package/dist/esm/publicNotificationStore-208e26f0.js +0 -45
  813. package/dist/esm/purify-909c20fa.js +0 -1713
  814. package/dist/esm/queryUtils-2529c537.js +0 -244
  815. package/dist/esm/refine-selection.entry.js +0 -407
  816. package/dist/esm/resources-0f8db821.js +0 -45
  817. package/dist/esm/resources-3c6947d3.js +0 -26
  818. package/dist/esm/resources-47b3ca40.js +0 -106
  819. package/dist/esm/resources-667afb5d.js +0 -27
  820. package/dist/esm/resources-9b2084c6.js +0 -24
  821. package/dist/esm/resources-bb6c11c3.js +0 -49
  822. package/dist/esm/ro-f87076a1.js +0 -65
  823. package/dist/esm/ru-e69ca895.js +0 -125
  824. package/dist/esm/shadow-css-f5236d52.js +0 -481
  825. package/dist/esm/shared-list-render-a572ef93.js +0 -348
  826. package/dist/esm/sk-d632e850.js +0 -147
  827. package/dist/esm/sl-5099fa6f.js +0 -167
  828. package/dist/esm/solution-contents.entry.js +0 -80
  829. package/dist/esm/solution-item-details.entry.js +0 -195
  830. package/dist/esm/solution-item-sharing.entry.js +0 -135
  831. package/dist/esm/solution-item.entry.js +0 -102
  832. package/dist/esm/solution-organization-variables.entry.js +0 -91
  833. package/dist/esm/solution-resource-item.entry.js +0 -280
  834. package/dist/esm/solution-spatial-ref.entry.js +0 -154
  835. package/dist/esm/solution-store-31cccb90.js +0 -587
  836. package/dist/esm/solution-template-data.entry.js +0 -115
  837. package/dist/esm/solution-variables.entry.js +0 -103
  838. package/dist/esm/sortableComponent-e715a3dd.js +0 -3439
  839. package/dist/esm/sr-944b7fd7.js +0 -100
  840. package/dist/esm/store-194c1a01.js +0 -87
  841. package/dist/esm/sv-e481fa6a.js +0 -70
  842. package/dist/esm/t9n-b39c5433.js +0 -98
  843. package/dist/esm/th-60961669.js +0 -64
  844. package/dist/esm/time-4a90614b.js +0 -274
  845. package/dist/esm/tr-eba8dd86.js +0 -65
  846. package/dist/esm/uk-ec375ce0.js +0 -103
  847. package/dist/esm/utils-32df4a1e.js +0 -133
  848. package/dist/esm/utils-57e2ccde.js +0 -61
  849. package/dist/esm/utils-7db4ecdc.js +0 -100
  850. package/dist/esm/utils-95e9dd51.js +0 -55
  851. package/dist/esm/utils-cfbe589a.js +0 -208
  852. package/dist/esm/vi-29345f79.js +0 -69
  853. package/dist/esm/zh-cn-32c7c714.js +0 -93
  854. package/dist/esm/zh-hk-7c770845.js +0 -70
  855. package/dist/esm/zh-tw-c318be5c.js +0 -91
  856. package/dist/solutions-components/ExpandToggle-22fd2faa.js +0 -110
  857. package/dist/solutions-components/FloatingArrow-de6fd1c7.js +0 -48
  858. package/dist/solutions-components/Heading-f003a141.js +0 -22
  859. package/dist/solutions-components/InitiativeUiSchemaEdit-8ddacfe8.js +0 -26
  860. package/dist/solutions-components/ProjectUiSchemaCreate-dd179c0f.js +0 -124
  861. package/dist/solutions-components/ProjectUiSchemaEdit-fbfdf6e4.js +0 -176
  862. package/dist/solutions-components/Validation-59a77488.js +0 -18
  863. package/dist/solutions-components/_commonjsHelpers-3cd6d4ee.js +0 -49
  864. package/dist/solutions-components/app-globals-928553ab.js +0 -67
  865. package/dist/solutions-components/ar-75ffdabb.js +0 -103
  866. package/dist/solutions-components/arcgis-login.entry.js +0 -56
  867. package/dist/solutions-components/array-396bdf3c.js +0 -15
  868. package/dist/solutions-components/basemap-gallery.entry.js +0 -117
  869. package/dist/solutions-components/bg-fac0bf10.js +0 -81
  870. package/dist/solutions-components/breakpoints-f0f1417d.js +0 -15
  871. package/dist/solutions-components/browser-b8d08bed.js +0 -26
  872. package/dist/solutions-components/bs-c03c8ef2.js +0 -50
  873. package/dist/solutions-components/buffer-tools.entry.js +0 -253
  874. package/dist/solutions-components/ca-29e49f82.js +0 -70
  875. package/dist/solutions-components/calcite-accordion-item.entry.js +0 -176
  876. package/dist/solutions-components/calcite-accordion.entry.js +0 -81
  877. package/dist/solutions-components/calcite-action-bar.entry.js +0 -252
  878. package/dist/solutions-components/calcite-action-group.entry.js +0 -112
  879. package/dist/solutions-components/calcite-action-menu.entry.js +0 -291
  880. package/dist/solutions-components/calcite-action-pad.entry.js +0 -165
  881. package/dist/solutions-components/calcite-action.entry.js +0 -184
  882. package/dist/solutions-components/calcite-alert.entry.js +0 -318
  883. package/dist/solutions-components/calcite-avatar.entry.js +0 -146
  884. package/dist/solutions-components/calcite-block-section.entry.js +0 -162
  885. package/dist/solutions-components/calcite-block.entry.js +0 -210
  886. package/dist/solutions-components/calcite-button.entry.js +0 -227
  887. package/dist/solutions-components/calcite-card.entry.js +0 -132
  888. package/dist/solutions-components/calcite-checkbox.entry.js +0 -134
  889. package/dist/solutions-components/calcite-chip-group.entry.js +0 -175
  890. package/dist/solutions-components/calcite-chip.entry.js +0 -258
  891. package/dist/solutions-components/calcite-color-picker-hex-input.entry.js +0 -270
  892. package/dist/solutions-components/calcite-color-picker-swatch.entry.js +0 -95
  893. package/dist/solutions-components/calcite-color-picker.entry.js +0 -906
  894. package/dist/solutions-components/calcite-combobox-item-group.entry.js +0 -56
  895. package/dist/solutions-components/calcite-combobox-item.entry.js +0 -141
  896. package/dist/solutions-components/calcite-combobox.entry.js +0 -1427
  897. package/dist/solutions-components/calcite-date-picker-day.entry.js +0 -93
  898. package/dist/solutions-components/calcite-date-picker-month-header.entry.js +0 -203
  899. package/dist/solutions-components/calcite-date-picker-month.entry.js +0 -358
  900. package/dist/solutions-components/calcite-date-picker.entry.js +0 -456
  901. package/dist/solutions-components/calcite-dropdown-group.entry.js +0 -81
  902. package/dist/solutions-components/calcite-dropdown-item.entry.js +0 -184
  903. package/dist/solutions-components/calcite-dropdown.entry.js +0 -426
  904. package/dist/solutions-components/calcite-fab.entry.js +0 -90
  905. package/dist/solutions-components/calcite-filter.entry.js +0 -175
  906. package/dist/solutions-components/calcite-flow-item.entry.js +0 -194
  907. package/dist/solutions-components/calcite-flow.entry.js +0 -149
  908. package/dist/solutions-components/calcite-graph.entry.js +0 -222
  909. package/dist/solutions-components/calcite-handle.entry.js +0 -200
  910. package/dist/solutions-components/calcite-icon.entry.js +0 -179
  911. package/dist/solutions-components/calcite-inline-editable.entry.js +0 -253
  912. package/dist/solutions-components/calcite-input-date-picker.entry.js +0 -740
  913. package/dist/solutions-components/calcite-input-message.entry.js +0 -66
  914. package/dist/solutions-components/calcite-input-number.entry.js +0 -610
  915. package/dist/solutions-components/calcite-input-text.entry.js +0 -349
  916. package/dist/solutions-components/calcite-input-time-picker-e5cd4d26.js +0 -1851
  917. package/dist/solutions-components/calcite-input-time-picker.entry.js +0 -25
  918. package/dist/solutions-components/calcite-input-time-zone.entry.js +0 -332
  919. package/dist/solutions-components/calcite-input.entry.js +0 -691
  920. package/dist/solutions-components/calcite-label.entry.js +0 -67
  921. package/dist/solutions-components/calcite-link.entry.js +0 -108
  922. package/dist/solutions-components/calcite-list-item-group.entry.js +0 -69
  923. package/dist/solutions-components/calcite-list-item.entry.js +0 -450
  924. package/dist/solutions-components/calcite-list.entry.js +0 -563
  925. package/dist/solutions-components/calcite-loader.entry.js +0 -76
  926. package/dist/solutions-components/calcite-menu-item.entry.js +0 -281
  927. package/dist/solutions-components/calcite-menu.entry.js +0 -180
  928. package/dist/solutions-components/calcite-meter.entry.js +0 -332
  929. package/dist/solutions-components/calcite-modal.entry.js +0 -394
  930. package/dist/solutions-components/calcite-navigation-logo.entry.js +0 -84
  931. package/dist/solutions-components/calcite-navigation-user.entry.js +0 -68
  932. package/dist/solutions-components/calcite-navigation.entry.js +0 -166
  933. package/dist/solutions-components/calcite-notice.entry.js +0 -163
  934. package/dist/solutions-components/calcite-option-group.entry.js +0 -35
  935. package/dist/solutions-components/calcite-option.entry.js +0 -84
  936. package/dist/solutions-components/calcite-pagination.entry.js +0 -554
  937. package/dist/solutions-components/calcite-panel.entry.js +0 -266
  938. package/dist/solutions-components/calcite-pick-list-group.entry.js +0 -57
  939. package/dist/solutions-components/calcite-pick-list-item.entry.js +0 -193
  940. package/dist/solutions-components/calcite-pick-list.entry.js +0 -142
  941. package/dist/solutions-components/calcite-popover.entry.js +0 -414
  942. package/dist/solutions-components/calcite-progress.entry.js +0 -37
  943. package/dist/solutions-components/calcite-radio-button-group.entry.js +0 -141
  944. package/dist/solutions-components/calcite-radio-button.entry.js +0 -318
  945. package/dist/solutions-components/calcite-rating.entry.js +0 -261
  946. package/dist/solutions-components/calcite-scrim.entry.js +0 -121
  947. package/dist/solutions-components/calcite-segmented-control-item.entry.js +0 -66
  948. package/dist/solutions-components/calcite-segmented-control.entry.js +0 -241
  949. package/dist/solutions-components/calcite-select.entry.js +0 -231
  950. package/dist/solutions-components/calcite-sheet.entry.js +0 -223
  951. package/dist/solutions-components/calcite-shell-center-row.entry.js +0 -66
  952. package/dist/solutions-components/calcite-shell-panel.entry.js +0 -410
  953. package/dist/solutions-components/calcite-shell.entry.js +0 -170
  954. package/dist/solutions-components/calcite-slider.entry.js +0 -840
  955. package/dist/solutions-components/calcite-sortable-list.entry.js +0 -166
  956. package/dist/solutions-components/calcite-split-button.entry.js +0 -112
  957. package/dist/solutions-components/calcite-stack.entry.js +0 -70
  958. package/dist/solutions-components/calcite-stepper-item.entry.js +0 -238
  959. package/dist/solutions-components/calcite-stepper.entry.js +0 -377
  960. package/dist/solutions-components/calcite-switch.entry.js +0 -113
  961. package/dist/solutions-components/calcite-tab-nav.entry.js +0 -259
  962. package/dist/solutions-components/calcite-tab-title.entry.js +0 -287
  963. package/dist/solutions-components/calcite-tab.entry.js +0 -108
  964. package/dist/solutions-components/calcite-table-cell.entry.js +0 -152
  965. package/dist/solutions-components/calcite-table-header.entry.js +0 -165
  966. package/dist/solutions-components/calcite-table-row.entry.js +0 -244
  967. package/dist/solutions-components/calcite-table.entry.js +0 -314
  968. package/dist/solutions-components/calcite-tabs.entry.js +0 -174
  969. package/dist/solutions-components/calcite-text-area.entry.js +0 -276
  970. package/dist/solutions-components/calcite-tile-select-group.entry.js +0 -39
  971. package/dist/solutions-components/calcite-tile-select.entry.js +0 -225
  972. package/dist/solutions-components/calcite-tile.entry.js +0 -75
  973. package/dist/solutions-components/calcite-time-picker.entry.js +0 -839
  974. package/dist/solutions-components/calcite-tip-group.entry.js +0 -21
  975. package/dist/solutions-components/calcite-tip-manager.entry.js +0 -227
  976. package/dist/solutions-components/calcite-tip.entry.js +0 -126
  977. package/dist/solutions-components/calcite-tooltip.entry.js +0 -434
  978. package/dist/solutions-components/calcite-tree-item.entry.js +0 -292
  979. package/dist/solutions-components/calcite-tree.entry.js +0 -311
  980. package/dist/solutions-components/calcite-value-list-item.entry.js +0 -153
  981. package/dist/solutions-components/calcite-value-list.entry.js +0 -322
  982. package/dist/solutions-components/card-manager.entry.js +0 -103
  983. package/dist/solutions-components/common-7e0dcaa2.js +0 -295
  984. package/dist/solutions-components/component-edd2c3cd.js +0 -30
  985. package/dist/solutions-components/conditionalSlot-a395417e.js +0 -60
  986. package/dist/solutions-components/consent-manager.entry.js +0 -2139
  987. package/dist/solutions-components/create-feature.entry.js +0 -259
  988. package/dist/solutions-components/crowdsource-manager.entry.js +0 -494
  989. package/dist/solutions-components/crowdsource-reporter.entry.js +0 -557
  990. package/dist/solutions-components/cs-04f36d01.js +0 -146
  991. package/dist/solutions-components/da-5a3b8600.js +0 -65
  992. package/dist/solutions-components/date-74c7f03b.js +0 -245
  993. package/dist/solutions-components/de-579cda2e.js +0 -90
  994. package/dist/solutions-components/de-at-52bf1c4c.js +0 -89
  995. package/dist/solutions-components/de-ch-12d03480.js +0 -89
  996. package/dist/solutions-components/deduct-calculator.entry.js +0 -101
  997. package/dist/solutions-components/delete-button.entry.js +0 -146
  998. package/dist/solutions-components/dom-b91aa537.js +0 -1083
  999. package/dist/solutions-components/downloadUtils-b3220f86.js +0 -4240
  1000. package/dist/solutions-components/edit-card.entry.js +0 -224
  1001. package/dist/solutions-components/el-c18d3ea4.js +0 -65
  1002. package/dist/solutions-components/en-au-2599e6da.js +0 -65
  1003. package/dist/solutions-components/en-ca-8cfbe6bc.js +0 -64
  1004. package/dist/solutions-components/en-gb-5e4e8a1e.js +0 -68
  1005. package/dist/solutions-components/es-d86f9957.js +0 -65
  1006. package/dist/solutions-components/es-mx-f99d9fd1.js +0 -64
  1007. package/dist/solutions-components/esri-loader-af2bbfd5.js +0 -306
  1008. package/dist/solutions-components/et-8bf52e57.js +0 -91
  1009. package/dist/solutions-components/feature-comments.entry.js +0 -56
  1010. package/dist/solutions-components/feature-form-flow-item.entry.js +0 -56
  1011. package/dist/solutions-components/feature-list.entry.js +0 -195
  1012. package/dist/solutions-components/features-flow-item.entry.js +0 -56
  1013. package/dist/solutions-components/fi-aeb49e52.js +0 -114
  1014. package/dist/solutions-components/filter-0d00d2e2.js +0 -46
  1015. package/dist/solutions-components/floating-ui-b3256614.js +0 -2342
  1016. package/dist/solutions-components/floor-filter.entry.js +0 -107
  1017. package/dist/solutions-components/focusTrapComponent-2fe6623b.js +0 -1023
  1018. package/dist/solutions-components/form-f2181470.js +0 -307
  1019. package/dist/solutions-components/fr-6200cc01.js +0 -67
  1020. package/dist/solutions-components/fr-ch-df62bb30.js +0 -65
  1021. package/dist/solutions-components/guid-b75a5f7b.js +0 -24
  1022. package/dist/solutions-components/he-07ace6cb.js +0 -104
  1023. package/dist/solutions-components/helpers-85ca7251.js +0 -807
  1024. package/dist/solutions-components/hi-5aa9519e.js +0 -64
  1025. package/dist/solutions-components/hr-e0614bed.js +0 -79
  1026. package/dist/solutions-components/html2canvas-d52e7c8d.js +0 -7845
  1027. package/dist/solutions-components/hu-732fe37c.js +0 -87
  1028. package/dist/solutions-components/id-0832fc24.js +0 -65
  1029. package/dist/solutions-components/index-5110a27a.js +0 -71
  1030. package/dist/solutions-components/index-7fc1cba9.js +0 -41502
  1031. package/dist/solutions-components/index-91eeaf01.js +0 -199
  1032. package/dist/solutions-components/index-a1e91462.js +0 -2105
  1033. package/dist/solutions-components/index-b1fb529b.js +0 -1956
  1034. package/dist/solutions-components/index-bdfaac50.js +0 -4145
  1035. package/dist/solutions-components/index-d8ff08ed.js +0 -204
  1036. package/dist/solutions-components/index.es-3db60115.js +0 -11256
  1037. package/dist/solutions-components/info-card.entry.js +0 -316
  1038. package/dist/solutions-components/instant-apps-ckeditor-wrapper.entry.js +0 -121
  1039. package/dist/solutions-components/instant-apps-control-panel.entry.js +0 -94
  1040. package/dist/solutions-components/instant-apps-export.entry.js +0 -888
  1041. package/dist/solutions-components/instant-apps-filter-list.entry.js +0 -1055
  1042. package/dist/solutions-components/instant-apps-header.entry.js +0 -124
  1043. package/dist/solutions-components/instant-apps-interactive-legend-classic.entry.js +0 -1604
  1044. package/dist/solutions-components/instant-apps-interactive-legend-count.entry.js +0 -100
  1045. package/dist/solutions-components/instant-apps-interactive-legend-group-legend-element-caption.entry.js +0 -53
  1046. package/dist/solutions-components/instant-apps-interactive-legend-group-legend-element.entry.js +0 -52
  1047. package/dist/solutions-components/instant-apps-interactive-legend-layer-element-caption.entry.js +0 -51
  1048. package/dist/solutions-components/instant-apps-interactive-legend-layer-element.entry.js +0 -53
  1049. package/dist/solutions-components/instant-apps-interactive-legend-legend-element-caption.entry.js +0 -100
  1050. package/dist/solutions-components/instant-apps-interactive-legend-legend-element.entry.js +0 -61
  1051. package/dist/solutions-components/instant-apps-interactive-legend-relationship.entry.js +0 -548
  1052. package/dist/solutions-components/instant-apps-interactive-legend.entry.js +0 -112
  1053. package/dist/solutions-components/instant-apps-keyboard-shortcuts.entry.js +0 -139
  1054. package/dist/solutions-components/instant-apps-landing-page.entry.js +0 -114
  1055. package/dist/solutions-components/instant-apps-language-switcher.entry.js +0 -173
  1056. package/dist/solutions-components/instant-apps-language-translator-item.entry.js +0 -380
  1057. package/dist/solutions-components/instant-apps-language-translator-search.entry.js +0 -101
  1058. package/dist/solutions-components/instant-apps-language-translator.entry.js +0 -286
  1059. package/dist/solutions-components/instant-apps-measurement-tool.entry.js +0 -135
  1060. package/dist/solutions-components/instant-apps-measurement.entry.js +0 -66
  1061. package/dist/solutions-components/instant-apps-popover.entry.js +0 -74
  1062. package/dist/solutions-components/instant-apps-popovers.entry.js +0 -88
  1063. package/dist/solutions-components/instant-apps-scoreboard.entry.js +0 -463
  1064. package/dist/solutions-components/instant-apps-social-share.entry.js +0 -511
  1065. package/dist/solutions-components/instant-apps-splash.entry.js +0 -144
  1066. package/dist/solutions-components/interactive-71585ecc.js +0 -139
  1067. package/dist/solutions-components/interfaces-586e863c.js +0 -80
  1068. package/dist/solutions-components/it-142bc820.js +0 -65
  1069. package/dist/solutions-components/it-ch-1ad1f0ac.js +0 -65
  1070. package/dist/solutions-components/ja-6a33e9d4.js +0 -71
  1071. package/dist/solutions-components/json-editor.entry.js +0 -402
  1072. package/dist/solutions-components/key-9a10d862.js +0 -44
  1073. package/dist/solutions-components/ko-d61df01d.js +0 -71
  1074. package/dist/solutions-components/label-16184ce7.js +0 -179
  1075. package/dist/solutions-components/languageSwitcher-2a9037e5.js +0 -55
  1076. package/dist/solutions-components/languageUtil-71a7a914.js +0 -87
  1077. package/dist/solutions-components/layer-list.entry.js +0 -203
  1078. package/dist/solutions-components/layer-table.entry.js +0 -1483
  1079. package/dist/solutions-components/layout-manager.entry.js +0 -91
  1080. package/dist/solutions-components/list-flow-item.entry.js +0 -56
  1081. package/dist/solutions-components/loadModules-827c5581.js +0 -28
  1082. package/dist/solutions-components/loadModules-acccbc1c.js +0 -21
  1083. package/dist/solutions-components/loadable-aea90723.js +0 -92
  1084. package/dist/solutions-components/locale-4cfbae3e.js +0 -86
  1085. package/dist/solutions-components/locale-857f39cf.js +0 -572
  1086. package/dist/solutions-components/locale-d9463a95.js +0 -148
  1087. package/dist/solutions-components/location-flow-item.entry.js +0 -56
  1088. package/dist/solutions-components/lodash-98e4b7d0.js +0 -18025
  1089. package/dist/solutions-components/lt-652c530a.js +0 -96
  1090. package/dist/solutions-components/lv-84e48ed0.js +0 -65
  1091. package/dist/solutions-components/map-card.entry.js +0 -188
  1092. package/dist/solutions-components/map-draw-tools.entry.js +0 -354
  1093. package/dist/solutions-components/map-fullscreen.entry.js +0 -112
  1094. package/dist/solutions-components/map-layer-picker.entry.js +0 -342
  1095. package/dist/solutions-components/map-legend.entry.js +0 -105
  1096. package/dist/solutions-components/map-picker.entry.js +0 -170
  1097. package/dist/solutions-components/map-search.entry.js +0 -180
  1098. package/dist/solutions-components/map-select-tools.entry.js +0 -794
  1099. package/dist/solutions-components/map-tools.entry.js +0 -371
  1100. package/dist/solutions-components/mapViewUtils-436a516e.js +0 -261
  1101. package/dist/solutions-components/math-efada7a9.js +0 -54
  1102. package/dist/solutions-components/mk-bbf2ee01.js +0 -65
  1103. package/dist/solutions-components/mode-f9bfc4e9.js +0 -25
  1104. package/dist/solutions-components/nb-ccfaa0f7.js +0 -66
  1105. package/dist/solutions-components/nl-4bc56289.js +0 -66
  1106. package/dist/solutions-components/observers-5ba39eee.js +0 -56
  1107. package/dist/solutions-components/openCloseComponent-b4b3788b.js +0 -138
  1108. package/dist/solutions-components/parser-87982ce2.js +0 -1654
  1109. package/dist/solutions-components/pci-calculator.entry.js +0 -113
  1110. package/dist/solutions-components/pciUtils-73d4b6b4.js +0 -844
  1111. package/dist/solutions-components/pdf-download.entry.js +0 -355
  1112. package/dist/solutions-components/pl-1f435988.js +0 -113
  1113. package/dist/solutions-components/popupUtils-b61d7ffd.js +0 -94
  1114. package/dist/solutions-components/pt-4a05a00d.js +0 -66
  1115. package/dist/solutions-components/pt-br-9720547b.js +0 -64
  1116. package/dist/solutions-components/public-notification.entry.js +0 -886
  1117. package/dist/solutions-components/publicNotificationStore-208e26f0.js +0 -45
  1118. package/dist/solutions-components/purify-909c20fa.js +0 -1713
  1119. package/dist/solutions-components/queryUtils-2529c537.js +0 -244
  1120. package/dist/solutions-components/refine-results-flow-item.entry.js +0 -56
  1121. package/dist/solutions-components/refine-selection.entry.js +0 -407
  1122. package/dist/solutions-components/resources-0f8db821.js +0 -45
  1123. package/dist/solutions-components/resources-20074cb1.js +0 -24
  1124. package/dist/solutions-components/resources-3709252d.js +0 -35
  1125. package/dist/solutions-components/resources-3c6947d3.js +0 -26
  1126. package/dist/solutions-components/resources-47b3ca40.js +0 -106
  1127. package/dist/solutions-components/resources-667afb5d.js +0 -27
  1128. package/dist/solutions-components/resources-88a48c5c.js +0 -20
  1129. package/dist/solutions-components/resources-9b2084c6.js +0 -24
  1130. package/dist/solutions-components/resources-9b7e72d5.js +0 -20
  1131. package/dist/solutions-components/resources-b0e2b809.js +0 -22
  1132. package/dist/solutions-components/resources-bb6c11c3.js +0 -49
  1133. package/dist/solutions-components/ro-f87076a1.js +0 -65
  1134. package/dist/solutions-components/ru-e69ca895.js +0 -125
  1135. package/dist/solutions-components/shadow-css-f5236d52.js +0 -481
  1136. package/dist/solutions-components/share-item.entry.js +0 -56
  1137. package/dist/solutions-components/shared-list-render-a572ef93.js +0 -348
  1138. package/dist/solutions-components/sk-d632e850.js +0 -147
  1139. package/dist/solutions-components/sl-5099fa6f.js +0 -167
  1140. package/dist/solutions-components/solution-configuration.entry.js +0 -906
  1141. package/dist/solutions-components/solution-contents.entry.js +0 -80
  1142. package/dist/solutions-components/solution-item-details.entry.js +0 -195
  1143. package/dist/solutions-components/solution-item-icon.entry.js +0 -323
  1144. package/dist/solutions-components/solution-item-sharing.entry.js +0 -135
  1145. package/dist/solutions-components/solution-item.entry.js +0 -102
  1146. package/dist/solutions-components/solution-organization-variables.entry.js +0 -91
  1147. package/dist/solutions-components/solution-resource-item.entry.js +0 -280
  1148. package/dist/solutions-components/solution-spatial-ref.entry.js +0 -154
  1149. package/dist/solutions-components/solution-store-31cccb90.js +0 -587
  1150. package/dist/solutions-components/solution-template-data.entry.js +0 -115
  1151. package/dist/solutions-components/solution-variables.entry.js +0 -103
  1152. package/dist/solutions-components/sortableComponent-e715a3dd.js +0 -3439
  1153. package/dist/solutions-components/spatial-ref.entry.js +0 -21296
  1154. package/dist/solutions-components/sr-944b7fd7.js +0 -100
  1155. package/dist/solutions-components/store-194c1a01.js +0 -87
  1156. package/dist/solutions-components/store-manager.entry.js +0 -61
  1157. package/dist/solutions-components/styles-367380b5.js +0 -11
  1158. package/dist/solutions-components/sv-e481fa6a.js +0 -70
  1159. package/dist/solutions-components/t9n-b39c5433.js +0 -98
  1160. package/dist/solutions-components/th-60961669.js +0 -64
  1161. package/dist/solutions-components/time-4a90614b.js +0 -274
  1162. package/dist/solutions-components/tr-eba8dd86.js +0 -65
  1163. package/dist/solutions-components/uk-ec375ce0.js +0 -103
  1164. package/dist/solutions-components/utils-32df4a1e.js +0 -133
  1165. package/dist/solutions-components/utils-57e2ccde.js +0 -61
  1166. package/dist/solutions-components/utils-7db4ecdc.js +0 -100
  1167. package/dist/solutions-components/utils-95e9dd51.js +0 -55
  1168. package/dist/solutions-components/utils-cfbe589a.js +0 -208
  1169. package/dist/solutions-components/vi-29345f79.js +0 -69
  1170. package/dist/solutions-components/zh-cn-32c7c714.js +0 -93
  1171. package/dist/solutions-components/zh-hk-7c770845.js +0 -70
  1172. package/dist/solutions-components/zh-tw-c318be5c.js +0 -91
@@ -1,3439 +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
- /**!
7
- * Sortable 1.15.1
8
- * @author RubaXa <trash@rubaxa.org>
9
- * @author owenm <owen23355@gmail.com>
10
- * @license MIT
11
- */
12
- function ownKeys(object, enumerableOnly) {
13
- var keys = Object.keys(object);
14
- if (Object.getOwnPropertySymbols) {
15
- var symbols = Object.getOwnPropertySymbols(object);
16
- if (enumerableOnly) {
17
- symbols = symbols.filter(function (sym) {
18
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
19
- });
20
- }
21
- keys.push.apply(keys, symbols);
22
- }
23
- return keys;
24
- }
25
- function _objectSpread2(target) {
26
- for (var i = 1; i < arguments.length; i++) {
27
- var source = arguments[i] != null ? arguments[i] : {};
28
- if (i % 2) {
29
- ownKeys(Object(source), true).forEach(function (key) {
30
- _defineProperty(target, key, source[key]);
31
- });
32
- } else if (Object.getOwnPropertyDescriptors) {
33
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
34
- } else {
35
- ownKeys(Object(source)).forEach(function (key) {
36
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
37
- });
38
- }
39
- }
40
- return target;
41
- }
42
- function _typeof(obj) {
43
- "@babel/helpers - typeof";
44
-
45
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
46
- _typeof = function (obj) {
47
- return typeof obj;
48
- };
49
- } else {
50
- _typeof = function (obj) {
51
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
52
- };
53
- }
54
- return _typeof(obj);
55
- }
56
- function _defineProperty(obj, key, value) {
57
- if (key in obj) {
58
- Object.defineProperty(obj, key, {
59
- value: value,
60
- enumerable: true,
61
- configurable: true,
62
- writable: true
63
- });
64
- } else {
65
- obj[key] = value;
66
- }
67
- return obj;
68
- }
69
- function _extends() {
70
- _extends = Object.assign || function (target) {
71
- for (var i = 1; i < arguments.length; i++) {
72
- var source = arguments[i];
73
- for (var key in source) {
74
- if (Object.prototype.hasOwnProperty.call(source, key)) {
75
- target[key] = source[key];
76
- }
77
- }
78
- }
79
- return target;
80
- };
81
- return _extends.apply(this, arguments);
82
- }
83
- function _objectWithoutPropertiesLoose(source, excluded) {
84
- if (source == null) return {};
85
- var target = {};
86
- var sourceKeys = Object.keys(source);
87
- var key, i;
88
- for (i = 0; i < sourceKeys.length; i++) {
89
- key = sourceKeys[i];
90
- if (excluded.indexOf(key) >= 0) continue;
91
- target[key] = source[key];
92
- }
93
- return target;
94
- }
95
- function _objectWithoutProperties(source, excluded) {
96
- if (source == null) return {};
97
- var target = _objectWithoutPropertiesLoose(source, excluded);
98
- var key, i;
99
- if (Object.getOwnPropertySymbols) {
100
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
101
- for (i = 0; i < sourceSymbolKeys.length; i++) {
102
- key = sourceSymbolKeys[i];
103
- if (excluded.indexOf(key) >= 0) continue;
104
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
105
- target[key] = source[key];
106
- }
107
- }
108
- return target;
109
- }
110
- function _toConsumableArray(arr) {
111
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
112
- }
113
- function _arrayWithoutHoles(arr) {
114
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
115
- }
116
- function _iterableToArray(iter) {
117
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
118
- }
119
- function _unsupportedIterableToArray(o, minLen) {
120
- if (!o) return;
121
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
122
- var n = Object.prototype.toString.call(o).slice(8, -1);
123
- if (n === "Object" && o.constructor) n = o.constructor.name;
124
- if (n === "Map" || n === "Set") return Array.from(o);
125
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
126
- }
127
- function _arrayLikeToArray(arr, len) {
128
- if (len == null || len > arr.length) len = arr.length;
129
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
130
- return arr2;
131
- }
132
- function _nonIterableSpread() {
133
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
134
- }
135
-
136
- var version = "1.15.1";
137
-
138
- function userAgent(pattern) {
139
- if (typeof window !== 'undefined' && window.navigator) {
140
- return !! /*@__PURE__*/navigator.userAgent.match(pattern);
141
- }
142
- }
143
- var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
144
- var Edge = userAgent(/Edge/i);
145
- var FireFox = userAgent(/firefox/i);
146
- var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
147
- var IOS = userAgent(/iP(ad|od|hone)/i);
148
- var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
149
-
150
- var captureMode = {
151
- capture: false,
152
- passive: false
153
- };
154
- function on(el, event, fn) {
155
- el.addEventListener(event, fn, !IE11OrLess && captureMode);
156
- }
157
- function off(el, event, fn) {
158
- el.removeEventListener(event, fn, !IE11OrLess && captureMode);
159
- }
160
- function matches( /**HTMLElement*/el, /**String*/selector) {
161
- if (!selector) return;
162
- selector[0] === '>' && (selector = selector.substring(1));
163
- if (el) {
164
- try {
165
- if (el.matches) {
166
- return el.matches(selector);
167
- } else if (el.msMatchesSelector) {
168
- return el.msMatchesSelector(selector);
169
- } else if (el.webkitMatchesSelector) {
170
- return el.webkitMatchesSelector(selector);
171
- }
172
- } catch (_) {
173
- return false;
174
- }
175
- }
176
- return false;
177
- }
178
- function getParentOrHost(el) {
179
- return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
180
- }
181
- function closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {
182
- if (el) {
183
- ctx = ctx || document;
184
- do {
185
- if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
186
- return el;
187
- }
188
- if (el === ctx) break;
189
- /* jshint boss:true */
190
- } while (el = getParentOrHost(el));
191
- }
192
- return null;
193
- }
194
- var R_SPACE = /\s+/g;
195
- function toggleClass(el, name, state) {
196
- if (el && name) {
197
- if (el.classList) {
198
- el.classList[state ? 'add' : 'remove'](name);
199
- } else {
200
- var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
201
- el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
202
- }
203
- }
204
- }
205
- function css(el, prop, val) {
206
- var style = el && el.style;
207
- if (style) {
208
- if (val === void 0) {
209
- if (document.defaultView && document.defaultView.getComputedStyle) {
210
- val = document.defaultView.getComputedStyle(el, '');
211
- } else if (el.currentStyle) {
212
- val = el.currentStyle;
213
- }
214
- return prop === void 0 ? val : val[prop];
215
- } else {
216
- if (!(prop in style) && prop.indexOf('webkit') === -1) {
217
- prop = '-webkit-' + prop;
218
- }
219
- style[prop] = val + (typeof val === 'string' ? '' : 'px');
220
- }
221
- }
222
- }
223
- function matrix(el, selfOnly) {
224
- var appliedTransforms = '';
225
- if (typeof el === 'string') {
226
- appliedTransforms = el;
227
- } else {
228
- do {
229
- var transform = css(el, 'transform');
230
- if (transform && transform !== 'none') {
231
- appliedTransforms = transform + ' ' + appliedTransforms;
232
- }
233
- /* jshint boss:true */
234
- } while (!selfOnly && (el = el.parentNode));
235
- }
236
- var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
237
- /*jshint -W056 */
238
- return matrixFn && new matrixFn(appliedTransforms);
239
- }
240
- function find(ctx, tagName, iterator) {
241
- if (ctx) {
242
- var list = ctx.getElementsByTagName(tagName),
243
- i = 0,
244
- n = list.length;
245
- if (iterator) {
246
- for (; i < n; i++) {
247
- iterator(list[i], i);
248
- }
249
- }
250
- return list;
251
- }
252
- return [];
253
- }
254
- function getWindowScrollingElement() {
255
- var scrollingElement = document.scrollingElement;
256
- if (scrollingElement) {
257
- return scrollingElement;
258
- } else {
259
- return document.documentElement;
260
- }
261
- }
262
-
263
- /**
264
- * Returns the "bounding client rect" of given element
265
- * @param {HTMLElement} el The element whose boundingClientRect is wanted
266
- * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
267
- * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
268
- * @param {[Boolean]} undoScale Whether the container's scale() should be undone
269
- * @param {[HTMLElement]} container The parent the element will be placed in
270
- * @return {Object} The boundingClientRect of el, with specified adjustments
271
- */
272
- function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
273
- if (!el.getBoundingClientRect && el !== window) return;
274
- var elRect, top, left, bottom, right, height, width;
275
- if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
276
- elRect = el.getBoundingClientRect();
277
- top = elRect.top;
278
- left = elRect.left;
279
- bottom = elRect.bottom;
280
- right = elRect.right;
281
- height = elRect.height;
282
- width = elRect.width;
283
- } else {
284
- top = 0;
285
- left = 0;
286
- bottom = window.innerHeight;
287
- right = window.innerWidth;
288
- height = window.innerHeight;
289
- width = window.innerWidth;
290
- }
291
- if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
292
- // Adjust for translate()
293
- container = container || el.parentNode;
294
-
295
- // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
296
- // Not needed on <= IE11
297
- if (!IE11OrLess) {
298
- do {
299
- if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
300
- var containerRect = container.getBoundingClientRect();
301
-
302
- // Set relative to edges of padding box of container
303
- top -= containerRect.top + parseInt(css(container, 'border-top-width'));
304
- left -= containerRect.left + parseInt(css(container, 'border-left-width'));
305
- bottom = top + elRect.height;
306
- right = left + elRect.width;
307
- break;
308
- }
309
- /* jshint boss:true */
310
- } while (container = container.parentNode);
311
- }
312
- }
313
- if (undoScale && el !== window) {
314
- // Adjust for scale()
315
- var elMatrix = matrix(container || el),
316
- scaleX = elMatrix && elMatrix.a,
317
- scaleY = elMatrix && elMatrix.d;
318
- if (elMatrix) {
319
- top /= scaleY;
320
- left /= scaleX;
321
- width /= scaleX;
322
- height /= scaleY;
323
- bottom = top + height;
324
- right = left + width;
325
- }
326
- }
327
- return {
328
- top: top,
329
- left: left,
330
- bottom: bottom,
331
- right: right,
332
- width: width,
333
- height: height
334
- };
335
- }
336
-
337
- /**
338
- * Returns the content rect of the element (bounding rect minus border and padding)
339
- * @param {HTMLElement} el
340
- */
341
- function getContentRect(el) {
342
- var rect = getRect(el);
343
- var paddingLeft = parseInt(css(el, 'padding-left')),
344
- paddingTop = parseInt(css(el, 'padding-top')),
345
- paddingRight = parseInt(css(el, 'padding-right')),
346
- paddingBottom = parseInt(css(el, 'padding-bottom'));
347
- rect.top += paddingTop + parseInt(css(el, 'border-top-width'));
348
- rect.left += paddingLeft + parseInt(css(el, 'border-left-width'));
349
- // Client Width/Height includes padding only
350
- rect.width = el.clientWidth - paddingLeft - paddingRight;
351
- rect.height = el.clientHeight - paddingTop - paddingBottom;
352
- rect.bottom = rect.top + rect.height;
353
- rect.right = rect.left + rect.width;
354
- return rect;
355
- }
356
-
357
- /**
358
- * Checks if a side of an element is scrolled past a side of its parents
359
- * @param {HTMLElement} el The element who's side being scrolled out of view is in question
360
- * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
361
- * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
362
- * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
363
- */
364
- function isScrolledPast(el, elSide, parentSide) {
365
- var parent = getParentAutoScrollElement(el, true),
366
- elSideVal = getRect(el)[elSide];
367
-
368
- /* jshint boss:true */
369
- while (parent) {
370
- var parentSideVal = getRect(parent)[parentSide],
371
- visible = void 0;
372
- if (parentSide === 'top' || parentSide === 'left') {
373
- visible = elSideVal >= parentSideVal;
374
- } else {
375
- visible = elSideVal <= parentSideVal;
376
- }
377
- if (!visible) return parent;
378
- if (parent === getWindowScrollingElement()) break;
379
- parent = getParentAutoScrollElement(parent, false);
380
- }
381
- return false;
382
- }
383
-
384
- /**
385
- * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
386
- * and non-draggable elements
387
- * @param {HTMLElement} el The parent element
388
- * @param {Number} childNum The index of the child
389
- * @param {Object} options Parent Sortable's options
390
- * @return {HTMLElement} The child at index childNum, or null if not found
391
- */
392
- function getChild(el, childNum, options, includeDragEl) {
393
- var currentChild = 0,
394
- i = 0,
395
- children = el.children;
396
- while (i < children.length) {
397
- if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
398
- if (currentChild === childNum) {
399
- return children[i];
400
- }
401
- currentChild++;
402
- }
403
- i++;
404
- }
405
- return null;
406
- }
407
-
408
- /**
409
- * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
410
- * @param {HTMLElement} el Parent element
411
- * @param {selector} selector Any other elements that should be ignored
412
- * @return {HTMLElement} The last child, ignoring ghostEl
413
- */
414
- function lastChild(el, selector) {
415
- var last = el.lastElementChild;
416
- while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
417
- last = last.previousElementSibling;
418
- }
419
- return last || null;
420
- }
421
-
422
- /**
423
- * Returns the index of an element within its parent for a selected set of
424
- * elements
425
- * @param {HTMLElement} el
426
- * @param {selector} selector
427
- * @return {number}
428
- */
429
- function index(el, selector) {
430
- var index = 0;
431
- if (!el || !el.parentNode) {
432
- return -1;
433
- }
434
-
435
- /* jshint boss:true */
436
- while (el = el.previousElementSibling) {
437
- if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
438
- index++;
439
- }
440
- }
441
- return index;
442
- }
443
-
444
- /**
445
- * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
446
- * The value is returned in real pixels.
447
- * @param {HTMLElement} el
448
- * @return {Array} Offsets in the format of [left, top]
449
- */
450
- function getRelativeScrollOffset(el) {
451
- var offsetLeft = 0,
452
- offsetTop = 0,
453
- winScroller = getWindowScrollingElement();
454
- if (el) {
455
- do {
456
- var elMatrix = matrix(el),
457
- scaleX = elMatrix.a,
458
- scaleY = elMatrix.d;
459
- offsetLeft += el.scrollLeft * scaleX;
460
- offsetTop += el.scrollTop * scaleY;
461
- } while (el !== winScroller && (el = el.parentNode));
462
- }
463
- return [offsetLeft, offsetTop];
464
- }
465
-
466
- /**
467
- * Returns the index of the object within the given array
468
- * @param {Array} arr Array that may or may not hold the object
469
- * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
470
- * @return {Number} The index of the object in the array, or -1
471
- */
472
- function indexOfObject(arr, obj) {
473
- for (var i in arr) {
474
- if (!arr.hasOwnProperty(i)) continue;
475
- for (var key in obj) {
476
- if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
477
- }
478
- }
479
- return -1;
480
- }
481
- function getParentAutoScrollElement(el, includeSelf) {
482
- // skip to window
483
- if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
484
- var elem = el;
485
- var gotSelf = false;
486
- do {
487
- // we don't need to get elem css if it isn't even overflowing in the first place (performance)
488
- if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
489
- var elemCSS = css(elem);
490
- if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
491
- if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
492
- if (gotSelf || includeSelf) return elem;
493
- gotSelf = true;
494
- }
495
- }
496
- /* jshint boss:true */
497
- } while (elem = elem.parentNode);
498
- return getWindowScrollingElement();
499
- }
500
- function extend(dst, src) {
501
- if (dst && src) {
502
- for (var key in src) {
503
- if (src.hasOwnProperty(key)) {
504
- dst[key] = src[key];
505
- }
506
- }
507
- }
508
- return dst;
509
- }
510
- function isRectEqual(rect1, rect2) {
511
- return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
512
- }
513
- var _throttleTimeout;
514
- function throttle(callback, ms) {
515
- return function () {
516
- if (!_throttleTimeout) {
517
- var args = arguments,
518
- _this = this;
519
- if (args.length === 1) {
520
- callback.call(_this, args[0]);
521
- } else {
522
- callback.apply(_this, args);
523
- }
524
- _throttleTimeout = setTimeout(function () {
525
- _throttleTimeout = void 0;
526
- }, ms);
527
- }
528
- };
529
- }
530
- function cancelThrottle() {
531
- clearTimeout(_throttleTimeout);
532
- _throttleTimeout = void 0;
533
- }
534
- function scrollBy(el, x, y) {
535
- el.scrollLeft += x;
536
- el.scrollTop += y;
537
- }
538
- function clone(el) {
539
- var Polymer = window.Polymer;
540
- var $ = window.jQuery || window.Zepto;
541
- if (Polymer && Polymer.dom) {
542
- return Polymer.dom(el).cloneNode(true);
543
- } else if ($) {
544
- return $(el).clone(true)[0];
545
- } else {
546
- return el.cloneNode(true);
547
- }
548
- }
549
- function setRect(el, rect) {
550
- css(el, 'position', 'absolute');
551
- css(el, 'top', rect.top);
552
- css(el, 'left', rect.left);
553
- css(el, 'width', rect.width);
554
- css(el, 'height', rect.height);
555
- }
556
- function unsetRect(el) {
557
- css(el, 'position', '');
558
- css(el, 'top', '');
559
- css(el, 'left', '');
560
- css(el, 'width', '');
561
- css(el, 'height', '');
562
- }
563
- var expando = 'Sortable' + new Date().getTime();
564
-
565
- function AnimationStateManager() {
566
- var animationStates = [],
567
- animationCallbackId;
568
- return {
569
- captureAnimationState: function captureAnimationState() {
570
- animationStates = [];
571
- if (!this.options.animation) return;
572
- var children = [].slice.call(this.el.children);
573
- children.forEach(function (child) {
574
- if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
575
- animationStates.push({
576
- target: child,
577
- rect: getRect(child)
578
- });
579
- var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);
580
-
581
- // If animating: compensate for current animation
582
- if (child.thisAnimationDuration) {
583
- var childMatrix = matrix(child, true);
584
- if (childMatrix) {
585
- fromRect.top -= childMatrix.f;
586
- fromRect.left -= childMatrix.e;
587
- }
588
- }
589
- child.fromRect = fromRect;
590
- });
591
- },
592
- addAnimationState: function addAnimationState(state) {
593
- animationStates.push(state);
594
- },
595
- removeAnimationState: function removeAnimationState(target) {
596
- animationStates.splice(indexOfObject(animationStates, {
597
- target: target
598
- }), 1);
599
- },
600
- animateAll: function animateAll(callback) {
601
- var _this = this;
602
- if (!this.options.animation) {
603
- clearTimeout(animationCallbackId);
604
- if (typeof callback === 'function') callback();
605
- return;
606
- }
607
- var animating = false,
608
- animationTime = 0;
609
- animationStates.forEach(function (state) {
610
- var time = 0,
611
- target = state.target,
612
- fromRect = target.fromRect,
613
- toRect = getRect(target),
614
- prevFromRect = target.prevFromRect,
615
- prevToRect = target.prevToRect,
616
- animatingRect = state.rect,
617
- targetMatrix = matrix(target, true);
618
- if (targetMatrix) {
619
- // Compensate for current animation
620
- toRect.top -= targetMatrix.f;
621
- toRect.left -= targetMatrix.e;
622
- }
623
- target.toRect = toRect;
624
- if (target.thisAnimationDuration) {
625
- // Could also check if animatingRect is between fromRect and toRect
626
- if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&
627
- // Make sure animatingRect is on line between toRect & fromRect
628
- (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
629
- // If returning to same place as started from animation and on same axis
630
- time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
631
- }
632
- }
633
-
634
- // if fromRect != toRect: animate
635
- if (!isRectEqual(toRect, fromRect)) {
636
- target.prevFromRect = fromRect;
637
- target.prevToRect = toRect;
638
- if (!time) {
639
- time = _this.options.animation;
640
- }
641
- _this.animate(target, animatingRect, toRect, time);
642
- }
643
- if (time) {
644
- animating = true;
645
- animationTime = Math.max(animationTime, time);
646
- clearTimeout(target.animationResetTimer);
647
- target.animationResetTimer = setTimeout(function () {
648
- target.animationTime = 0;
649
- target.prevFromRect = null;
650
- target.fromRect = null;
651
- target.prevToRect = null;
652
- target.thisAnimationDuration = null;
653
- }, time);
654
- target.thisAnimationDuration = time;
655
- }
656
- });
657
- clearTimeout(animationCallbackId);
658
- if (!animating) {
659
- if (typeof callback === 'function') callback();
660
- } else {
661
- animationCallbackId = setTimeout(function () {
662
- if (typeof callback === 'function') callback();
663
- }, animationTime);
664
- }
665
- animationStates = [];
666
- },
667
- animate: function animate(target, currentRect, toRect, duration) {
668
- if (duration) {
669
- css(target, 'transition', '');
670
- css(target, 'transform', '');
671
- var elMatrix = matrix(this.el),
672
- scaleX = elMatrix && elMatrix.a,
673
- scaleY = elMatrix && elMatrix.d,
674
- translateX = (currentRect.left - toRect.left) / (scaleX || 1),
675
- translateY = (currentRect.top - toRect.top) / (scaleY || 1);
676
- target.animatingX = !!translateX;
677
- target.animatingY = !!translateY;
678
- css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
679
- this.forRepaintDummy = repaint(target); // repaint
680
-
681
- css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
682
- css(target, 'transform', 'translate3d(0,0,0)');
683
- typeof target.animated === 'number' && clearTimeout(target.animated);
684
- target.animated = setTimeout(function () {
685
- css(target, 'transition', '');
686
- css(target, 'transform', '');
687
- target.animated = false;
688
- target.animatingX = false;
689
- target.animatingY = false;
690
- }, duration);
691
- }
692
- }
693
- };
694
- }
695
- function repaint(target) {
696
- return target.offsetWidth;
697
- }
698
- function calculateRealTime(animatingRect, fromRect, toRect, options) {
699
- return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
700
- }
701
-
702
- var plugins = [];
703
- var defaults = {
704
- initializeByDefault: true
705
- };
706
- var PluginManager = {
707
- mount: function mount(plugin) {
708
- // Set default static properties
709
- for (var option in defaults) {
710
- if (defaults.hasOwnProperty(option) && !(option in plugin)) {
711
- plugin[option] = defaults[option];
712
- }
713
- }
714
- plugins.forEach(function (p) {
715
- if (p.pluginName === plugin.pluginName) {
716
- throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
717
- }
718
- });
719
- plugins.push(plugin);
720
- },
721
- pluginEvent: function pluginEvent(eventName, sortable, evt) {
722
- var _this = this;
723
- this.eventCanceled = false;
724
- evt.cancel = function () {
725
- _this.eventCanceled = true;
726
- };
727
- var eventNameGlobal = eventName + 'Global';
728
- plugins.forEach(function (plugin) {
729
- if (!sortable[plugin.pluginName]) return;
730
- // Fire global events if it exists in this sortable
731
- if (sortable[plugin.pluginName][eventNameGlobal]) {
732
- sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
733
- sortable: sortable
734
- }, evt));
735
- }
736
-
737
- // Only fire plugin event if plugin is enabled in this sortable,
738
- // and plugin has event defined
739
- if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
740
- sortable[plugin.pluginName][eventName](_objectSpread2({
741
- sortable: sortable
742
- }, evt));
743
- }
744
- });
745
- },
746
- initializePlugins: function initializePlugins(sortable, el, defaults, options) {
747
- plugins.forEach(function (plugin) {
748
- var pluginName = plugin.pluginName;
749
- if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
750
- var initialized = new plugin(sortable, el, sortable.options);
751
- initialized.sortable = sortable;
752
- initialized.options = sortable.options;
753
- sortable[pluginName] = initialized;
754
-
755
- // Add default options from plugin
756
- _extends(defaults, initialized.defaults);
757
- });
758
- for (var option in sortable.options) {
759
- if (!sortable.options.hasOwnProperty(option)) continue;
760
- var modified = this.modifyOption(sortable, option, sortable.options[option]);
761
- if (typeof modified !== 'undefined') {
762
- sortable.options[option] = modified;
763
- }
764
- }
765
- },
766
- getEventProperties: function getEventProperties(name, sortable) {
767
- var eventProperties = {};
768
- plugins.forEach(function (plugin) {
769
- if (typeof plugin.eventProperties !== 'function') return;
770
- _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
771
- });
772
- return eventProperties;
773
- },
774
- modifyOption: function modifyOption(sortable, name, value) {
775
- var modifiedValue;
776
- plugins.forEach(function (plugin) {
777
- // Plugin must exist on the Sortable
778
- if (!sortable[plugin.pluginName]) return;
779
-
780
- // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
781
- if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
782
- modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
783
- }
784
- });
785
- return modifiedValue;
786
- }
787
- };
788
-
789
- function dispatchEvent(_ref) {
790
- var sortable = _ref.sortable,
791
- rootEl = _ref.rootEl,
792
- name = _ref.name,
793
- targetEl = _ref.targetEl,
794
- cloneEl = _ref.cloneEl,
795
- toEl = _ref.toEl,
796
- fromEl = _ref.fromEl,
797
- oldIndex = _ref.oldIndex,
798
- newIndex = _ref.newIndex,
799
- oldDraggableIndex = _ref.oldDraggableIndex,
800
- newDraggableIndex = _ref.newDraggableIndex,
801
- originalEvent = _ref.originalEvent,
802
- putSortable = _ref.putSortable,
803
- extraEventProperties = _ref.extraEventProperties;
804
- sortable = sortable || rootEl && rootEl[expando];
805
- if (!sortable) return;
806
- var evt,
807
- options = sortable.options,
808
- onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);
809
- // Support for new CustomEvent feature
810
- if (window.CustomEvent && !IE11OrLess && !Edge) {
811
- evt = new CustomEvent(name, {
812
- bubbles: true,
813
- cancelable: true
814
- });
815
- } else {
816
- evt = document.createEvent('Event');
817
- evt.initEvent(name, true, true);
818
- }
819
- evt.to = toEl || rootEl;
820
- evt.from = fromEl || rootEl;
821
- evt.item = targetEl || rootEl;
822
- evt.clone = cloneEl;
823
- evt.oldIndex = oldIndex;
824
- evt.newIndex = newIndex;
825
- evt.oldDraggableIndex = oldDraggableIndex;
826
- evt.newDraggableIndex = newDraggableIndex;
827
- evt.originalEvent = originalEvent;
828
- evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
829
- var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
830
- for (var option in allEventProperties) {
831
- evt[option] = allEventProperties[option];
832
- }
833
- if (rootEl) {
834
- rootEl.dispatchEvent(evt);
835
- }
836
- if (options[onName]) {
837
- options[onName].call(sortable, evt);
838
- }
839
- }
840
-
841
- var _excluded = ["evt"];
842
- var pluginEvent = function pluginEvent(eventName, sortable) {
843
- var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
844
- originalEvent = _ref.evt,
845
- data = _objectWithoutProperties(_ref, _excluded);
846
- PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
847
- dragEl: dragEl,
848
- parentEl: parentEl,
849
- ghostEl: ghostEl,
850
- rootEl: rootEl,
851
- nextEl: nextEl,
852
- lastDownEl: lastDownEl,
853
- cloneEl: cloneEl,
854
- cloneHidden: cloneHidden,
855
- dragStarted: moved,
856
- putSortable: putSortable,
857
- activeSortable: Sortable.active,
858
- originalEvent: originalEvent,
859
- oldIndex: oldIndex,
860
- oldDraggableIndex: oldDraggableIndex,
861
- newIndex: newIndex,
862
- newDraggableIndex: newDraggableIndex,
863
- hideGhostForTarget: _hideGhostForTarget,
864
- unhideGhostForTarget: _unhideGhostForTarget,
865
- cloneNowHidden: function cloneNowHidden() {
866
- cloneHidden = true;
867
- },
868
- cloneNowShown: function cloneNowShown() {
869
- cloneHidden = false;
870
- },
871
- dispatchSortableEvent: function dispatchSortableEvent(name) {
872
- _dispatchEvent({
873
- sortable: sortable,
874
- name: name,
875
- originalEvent: originalEvent
876
- });
877
- }
878
- }, data));
879
- };
880
- function _dispatchEvent(info) {
881
- dispatchEvent(_objectSpread2({
882
- putSortable: putSortable,
883
- cloneEl: cloneEl,
884
- targetEl: dragEl,
885
- rootEl: rootEl,
886
- oldIndex: oldIndex,
887
- oldDraggableIndex: oldDraggableIndex,
888
- newIndex: newIndex,
889
- newDraggableIndex: newDraggableIndex
890
- }, info));
891
- }
892
- var dragEl,
893
- parentEl,
894
- ghostEl,
895
- rootEl,
896
- nextEl,
897
- lastDownEl,
898
- cloneEl,
899
- cloneHidden,
900
- oldIndex,
901
- newIndex,
902
- oldDraggableIndex,
903
- newDraggableIndex,
904
- activeGroup,
905
- putSortable,
906
- awaitingDragStarted = false,
907
- ignoreNextClick = false,
908
- sortables = [],
909
- tapEvt,
910
- touchEvt,
911
- lastDx,
912
- lastDy,
913
- tapDistanceLeft,
914
- tapDistanceTop,
915
- moved,
916
- lastTarget,
917
- lastDirection,
918
- pastFirstInvertThresh = false,
919
- isCircumstantialInvert = false,
920
- targetMoveDistance,
921
- // For positioning ghost absolutely
922
- ghostRelativeParent,
923
- ghostRelativeParentInitialScroll = [],
924
- // (left, top)
925
-
926
- _silent = false,
927
- savedInputChecked = [];
928
-
929
- /** @const */
930
- var documentExists = typeof document !== 'undefined',
931
- PositionGhostAbsolutely = IOS,
932
- CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
933
- // This will not pass for IE9, because IE9 DnD only works on anchors
934
- supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
935
- supportCssPointerEvents = function () {
936
- if (!documentExists) return;
937
- // false when <= IE11
938
- if (IE11OrLess) {
939
- return false;
940
- }
941
- var el = document.createElement('x');
942
- el.style.cssText = 'pointer-events:auto';
943
- return el.style.pointerEvents === 'auto';
944
- }(),
945
- _detectDirection = function _detectDirection(el, options) {
946
- var elCSS = css(el),
947
- elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
948
- child1 = getChild(el, 0, options),
949
- child2 = getChild(el, 1, options),
950
- firstChildCSS = child1 && css(child1),
951
- secondChildCSS = child2 && css(child2),
952
- firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
953
- secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
954
- if (elCSS.display === 'flex') {
955
- return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
956
- }
957
- if (elCSS.display === 'grid') {
958
- return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
959
- }
960
- if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
961
- var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
962
- return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
963
- }
964
- return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
965
- },
966
- _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
967
- var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
968
- dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
969
- dragElOppLength = vertical ? dragRect.width : dragRect.height,
970
- targetS1Opp = vertical ? targetRect.left : targetRect.top,
971
- targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
972
- targetOppLength = vertical ? targetRect.width : targetRect.height;
973
- return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
974
- },
975
- /**
976
- * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
977
- * @param {Number} x X position
978
- * @param {Number} y Y position
979
- * @return {HTMLElement} Element of the first found nearest Sortable
980
- */
981
- _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
982
- var ret;
983
- sortables.some(function (sortable) {
984
- var threshold = sortable[expando].options.emptyInsertThreshold;
985
- if (!threshold || lastChild(sortable)) return;
986
- var rect = getRect(sortable),
987
- insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
988
- insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
989
- if (insideHorizontally && insideVertically) {
990
- return ret = sortable;
991
- }
992
- });
993
- return ret;
994
- },
995
- _prepareGroup = function _prepareGroup(options) {
996
- function toFn(value, pull) {
997
- return function (to, from, dragEl, evt) {
998
- var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
999
- if (value == null && (pull || sameGroup)) {
1000
- // Default pull value
1001
- // Default pull and put value if same group
1002
- return true;
1003
- } else if (value == null || value === false) {
1004
- return false;
1005
- } else if (pull && value === 'clone') {
1006
- return value;
1007
- } else if (typeof value === 'function') {
1008
- return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
1009
- } else {
1010
- var otherGroup = (pull ? to : from).options.group.name;
1011
- return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
1012
- }
1013
- };
1014
- }
1015
- var group = {};
1016
- var originalGroup = options.group;
1017
- if (!originalGroup || _typeof(originalGroup) != 'object') {
1018
- originalGroup = {
1019
- name: originalGroup
1020
- };
1021
- }
1022
- group.name = originalGroup.name;
1023
- group.checkPull = toFn(originalGroup.pull, true);
1024
- group.checkPut = toFn(originalGroup.put);
1025
- group.revertClone = originalGroup.revertClone;
1026
- options.group = group;
1027
- },
1028
- _hideGhostForTarget = function _hideGhostForTarget() {
1029
- if (!supportCssPointerEvents && ghostEl) {
1030
- css(ghostEl, 'display', 'none');
1031
- }
1032
- },
1033
- _unhideGhostForTarget = function _unhideGhostForTarget() {
1034
- if (!supportCssPointerEvents && ghostEl) {
1035
- css(ghostEl, 'display', '');
1036
- }
1037
- };
1038
-
1039
- // #1184 fix - Prevent click event on fallback if dragged but item not changed position
1040
- if (documentExists && !ChromeForAndroid) {
1041
- document.addEventListener('click', function (evt) {
1042
- if (ignoreNextClick) {
1043
- evt.preventDefault();
1044
- evt.stopPropagation && evt.stopPropagation();
1045
- evt.stopImmediatePropagation && evt.stopImmediatePropagation();
1046
- ignoreNextClick = false;
1047
- return false;
1048
- }
1049
- }, true);
1050
- }
1051
- var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1052
- if (dragEl) {
1053
- evt = evt.touches ? evt.touches[0] : evt;
1054
- var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1055
- if (nearest) {
1056
- // Create imitation event
1057
- var event = {};
1058
- for (var i in evt) {
1059
- if (evt.hasOwnProperty(i)) {
1060
- event[i] = evt[i];
1061
- }
1062
- }
1063
- event.target = event.rootEl = nearest;
1064
- event.preventDefault = void 0;
1065
- event.stopPropagation = void 0;
1066
- nearest[expando]._onDragOver(event);
1067
- }
1068
- }
1069
- };
1070
- var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1071
- if (dragEl) {
1072
- dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1073
- }
1074
- };
1075
-
1076
- /**
1077
- * @class Sortable
1078
- * @param {HTMLElement} el
1079
- * @param {Object} [options]
1080
- */
1081
- function Sortable(el, options) {
1082
- if (!(el && el.nodeType && el.nodeType === 1)) {
1083
- throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1084
- }
1085
- this.el = el; // root element
1086
- this.options = options = _extends({}, options);
1087
-
1088
- // Export instance
1089
- el[expando] = this;
1090
- var defaults = {
1091
- group: null,
1092
- sort: true,
1093
- disabled: false,
1094
- store: null,
1095
- handle: null,
1096
- draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1097
- swapThreshold: 1,
1098
- // percentage; 0 <= x <= 1
1099
- invertSwap: false,
1100
- // invert always
1101
- invertedSwapThreshold: null,
1102
- // will be set to same as swapThreshold if default
1103
- removeCloneOnHide: true,
1104
- direction: function direction() {
1105
- return _detectDirection(el, this.options);
1106
- },
1107
- ghostClass: 'sortable-ghost',
1108
- chosenClass: 'sortable-chosen',
1109
- dragClass: 'sortable-drag',
1110
- ignore: 'a, img',
1111
- filter: null,
1112
- preventOnFilter: true,
1113
- animation: 0,
1114
- easing: null,
1115
- setData: function setData(dataTransfer, dragEl) {
1116
- dataTransfer.setData('Text', dragEl.textContent);
1117
- },
1118
- dropBubble: false,
1119
- dragoverBubble: false,
1120
- dataIdAttr: 'data-id',
1121
- delay: 0,
1122
- delayOnTouchOnly: false,
1123
- touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1124
- forceFallback: false,
1125
- fallbackClass: 'sortable-fallback',
1126
- fallbackOnBody: false,
1127
- fallbackTolerance: 0,
1128
- fallbackOffset: {
1129
- x: 0,
1130
- y: 0
1131
- },
1132
- supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
1133
- emptyInsertThreshold: 5
1134
- };
1135
- PluginManager.initializePlugins(this, el, defaults);
1136
-
1137
- // Set default options
1138
- for (var name in defaults) {
1139
- !(name in options) && (options[name] = defaults[name]);
1140
- }
1141
- _prepareGroup(options);
1142
-
1143
- // Bind all private methods
1144
- for (var fn in this) {
1145
- if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1146
- this[fn] = this[fn].bind(this);
1147
- }
1148
- }
1149
-
1150
- // Setup drag mode
1151
- this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1152
- if (this.nativeDraggable) {
1153
- // Touch start threshold cannot be greater than the native dragstart threshold
1154
- this.options.touchStartThreshold = 1;
1155
- }
1156
-
1157
- // Bind events
1158
- if (options.supportPointer) {
1159
- on(el, 'pointerdown', this._onTapStart);
1160
- } else {
1161
- on(el, 'mousedown', this._onTapStart);
1162
- on(el, 'touchstart', this._onTapStart);
1163
- }
1164
- if (this.nativeDraggable) {
1165
- on(el, 'dragover', this);
1166
- on(el, 'dragenter', this);
1167
- }
1168
- sortables.push(this.el);
1169
-
1170
- // Restore sorting
1171
- options.store && options.store.get && this.sort(options.store.get(this) || []);
1172
-
1173
- // Add animation state manager
1174
- _extends(this, AnimationStateManager());
1175
- }
1176
- Sortable.prototype = /** @lends Sortable.prototype */{
1177
- constructor: Sortable,
1178
- _isOutsideThisEl: function _isOutsideThisEl(target) {
1179
- if (!this.el.contains(target) && target !== this.el) {
1180
- lastTarget = null;
1181
- }
1182
- },
1183
- _getDirection: function _getDirection(evt, target) {
1184
- return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1185
- },
1186
- _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {
1187
- if (!evt.cancelable) return;
1188
- var _this = this,
1189
- el = this.el,
1190
- options = this.options,
1191
- preventOnFilter = options.preventOnFilter,
1192
- type = evt.type,
1193
- touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
1194
- target = (touch || evt).target,
1195
- originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1196
- filter = options.filter;
1197
- _saveInputCheckedState(el);
1198
-
1199
- // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1200
- if (dragEl) {
1201
- return;
1202
- }
1203
- if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1204
- return; // only left button and enabled
1205
- }
1206
-
1207
- // cancel dnd if original target is content editable
1208
- if (originalTarget.isContentEditable) {
1209
- return;
1210
- }
1211
-
1212
- // Safari ignores further event handling after mousedown
1213
- if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
1214
- return;
1215
- }
1216
- target = closest(target, options.draggable, el, false);
1217
- if (target && target.animated) {
1218
- return;
1219
- }
1220
- if (lastDownEl === target) {
1221
- // Ignoring duplicate `down`
1222
- return;
1223
- }
1224
-
1225
- // Get the index of the dragged element within its parent
1226
- oldIndex = index(target);
1227
- oldDraggableIndex = index(target, options.draggable);
1228
-
1229
- // Check filter
1230
- if (typeof filter === 'function') {
1231
- if (filter.call(this, evt, target, this)) {
1232
- _dispatchEvent({
1233
- sortable: _this,
1234
- rootEl: originalTarget,
1235
- name: 'filter',
1236
- targetEl: target,
1237
- toEl: el,
1238
- fromEl: el
1239
- });
1240
- pluginEvent('filter', _this, {
1241
- evt: evt
1242
- });
1243
- preventOnFilter && evt.cancelable && evt.preventDefault();
1244
- return; // cancel dnd
1245
- }
1246
- } else if (filter) {
1247
- filter = filter.split(',').some(function (criteria) {
1248
- criteria = closest(originalTarget, criteria.trim(), el, false);
1249
- if (criteria) {
1250
- _dispatchEvent({
1251
- sortable: _this,
1252
- rootEl: criteria,
1253
- name: 'filter',
1254
- targetEl: target,
1255
- fromEl: el,
1256
- toEl: el
1257
- });
1258
- pluginEvent('filter', _this, {
1259
- evt: evt
1260
- });
1261
- return true;
1262
- }
1263
- });
1264
- if (filter) {
1265
- preventOnFilter && evt.cancelable && evt.preventDefault();
1266
- return; // cancel dnd
1267
- }
1268
- }
1269
- if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1270
- return;
1271
- }
1272
-
1273
- // Prepare `dragstart`
1274
- this._prepareDragStart(evt, touch, target);
1275
- },
1276
- _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {
1277
- var _this = this,
1278
- el = _this.el,
1279
- options = _this.options,
1280
- ownerDocument = el.ownerDocument,
1281
- dragStartFn;
1282
- if (target && !dragEl && target.parentNode === el) {
1283
- var dragRect = getRect(target);
1284
- rootEl = el;
1285
- dragEl = target;
1286
- parentEl = dragEl.parentNode;
1287
- nextEl = dragEl.nextSibling;
1288
- lastDownEl = target;
1289
- activeGroup = options.group;
1290
- Sortable.dragged = dragEl;
1291
- tapEvt = {
1292
- target: dragEl,
1293
- clientX: (touch || evt).clientX,
1294
- clientY: (touch || evt).clientY
1295
- };
1296
- tapDistanceLeft = tapEvt.clientX - dragRect.left;
1297
- tapDistanceTop = tapEvt.clientY - dragRect.top;
1298
- this._lastX = (touch || evt).clientX;
1299
- this._lastY = (touch || evt).clientY;
1300
- dragEl.style['will-change'] = 'all';
1301
- dragStartFn = function dragStartFn() {
1302
- pluginEvent('delayEnded', _this, {
1303
- evt: evt
1304
- });
1305
- if (Sortable.eventCanceled) {
1306
- _this._onDrop();
1307
- return;
1308
- }
1309
- // Delayed drag has been triggered
1310
- // we can re-enable the events: touchmove/mousemove
1311
- _this._disableDelayedDragEvents();
1312
- if (!FireFox && _this.nativeDraggable) {
1313
- dragEl.draggable = true;
1314
- }
1315
-
1316
- // Bind the events: dragstart/dragend
1317
- _this._triggerDragStart(evt, touch);
1318
-
1319
- // Drag start event
1320
- _dispatchEvent({
1321
- sortable: _this,
1322
- name: 'choose',
1323
- originalEvent: evt
1324
- });
1325
-
1326
- // Chosen item
1327
- toggleClass(dragEl, options.chosenClass, true);
1328
- };
1329
-
1330
- // Disable "draggable"
1331
- options.ignore.split(',').forEach(function (criteria) {
1332
- find(dragEl, criteria.trim(), _disableDraggable);
1333
- });
1334
- on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1335
- on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1336
- on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1337
- on(ownerDocument, 'mouseup', _this._onDrop);
1338
- on(ownerDocument, 'touchend', _this._onDrop);
1339
- on(ownerDocument, 'touchcancel', _this._onDrop);
1340
-
1341
- // Make dragEl draggable (must be before delay for FireFox)
1342
- if (FireFox && this.nativeDraggable) {
1343
- this.options.touchStartThreshold = 4;
1344
- dragEl.draggable = true;
1345
- }
1346
- pluginEvent('delayStart', this, {
1347
- evt: evt
1348
- });
1349
-
1350
- // Delay is impossible for native DnD in Edge or IE
1351
- if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1352
- if (Sortable.eventCanceled) {
1353
- this._onDrop();
1354
- return;
1355
- }
1356
- // If the user moves the pointer or let go the click or touch
1357
- // before the delay has been reached:
1358
- // disable the delayed drag
1359
- on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1360
- on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1361
- on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1362
- on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1363
- on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1364
- options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1365
- _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1366
- } else {
1367
- dragStartFn();
1368
- }
1369
- }
1370
- },
1371
- _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {
1372
- var touch = e.touches ? e.touches[0] : e;
1373
- if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
1374
- this._disableDelayedDrag();
1375
- }
1376
- },
1377
- _disableDelayedDrag: function _disableDelayedDrag() {
1378
- dragEl && _disableDraggable(dragEl);
1379
- clearTimeout(this._dragStartTimer);
1380
- this._disableDelayedDragEvents();
1381
- },
1382
- _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1383
- var ownerDocument = this.el.ownerDocument;
1384
- off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1385
- off(ownerDocument, 'touchend', this._disableDelayedDrag);
1386
- off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1387
- off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1388
- off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1389
- off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1390
- },
1391
- _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {
1392
- touch = touch || evt.pointerType == 'touch' && evt;
1393
- if (!this.nativeDraggable || touch) {
1394
- if (this.options.supportPointer) {
1395
- on(document, 'pointermove', this._onTouchMove);
1396
- } else if (touch) {
1397
- on(document, 'touchmove', this._onTouchMove);
1398
- } else {
1399
- on(document, 'mousemove', this._onTouchMove);
1400
- }
1401
- } else {
1402
- on(dragEl, 'dragend', this);
1403
- on(rootEl, 'dragstart', this._onDragStart);
1404
- }
1405
- try {
1406
- if (document.selection) {
1407
- // Timeout neccessary for IE9
1408
- _nextTick(function () {
1409
- document.selection.empty();
1410
- });
1411
- } else {
1412
- window.getSelection().removeAllRanges();
1413
- }
1414
- } catch (err) {}
1415
- },
1416
- _dragStarted: function _dragStarted(fallback, evt) {
1417
- awaitingDragStarted = false;
1418
- if (rootEl && dragEl) {
1419
- pluginEvent('dragStarted', this, {
1420
- evt: evt
1421
- });
1422
- if (this.nativeDraggable) {
1423
- on(document, 'dragover', _checkOutsideTargetEl);
1424
- }
1425
- var options = this.options;
1426
-
1427
- // Apply effect
1428
- !fallback && toggleClass(dragEl, options.dragClass, false);
1429
- toggleClass(dragEl, options.ghostClass, true);
1430
- Sortable.active = this;
1431
- fallback && this._appendGhost();
1432
-
1433
- // Drag start event
1434
- _dispatchEvent({
1435
- sortable: this,
1436
- name: 'start',
1437
- originalEvent: evt
1438
- });
1439
- } else {
1440
- this._nulling();
1441
- }
1442
- },
1443
- _emulateDragOver: function _emulateDragOver() {
1444
- if (touchEvt) {
1445
- this._lastX = touchEvt.clientX;
1446
- this._lastY = touchEvt.clientY;
1447
- _hideGhostForTarget();
1448
- var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1449
- var parent = target;
1450
- while (target && target.shadowRoot) {
1451
- target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1452
- if (target === parent) break;
1453
- parent = target;
1454
- }
1455
- dragEl.parentNode[expando]._isOutsideThisEl(target);
1456
- if (parent) {
1457
- do {
1458
- if (parent[expando]) {
1459
- var inserted = void 0;
1460
- inserted = parent[expando]._onDragOver({
1461
- clientX: touchEvt.clientX,
1462
- clientY: touchEvt.clientY,
1463
- target: target,
1464
- rootEl: parent
1465
- });
1466
- if (inserted && !this.options.dragoverBubble) {
1467
- break;
1468
- }
1469
- }
1470
- target = parent; // store last element
1471
- }
1472
- /* jshint boss:true */ while (parent = parent.parentNode);
1473
- }
1474
- _unhideGhostForTarget();
1475
- }
1476
- },
1477
- _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {
1478
- if (tapEvt) {
1479
- var options = this.options,
1480
- fallbackTolerance = options.fallbackTolerance,
1481
- fallbackOffset = options.fallbackOffset,
1482
- touch = evt.touches ? evt.touches[0] : evt,
1483
- ghostMatrix = ghostEl && matrix(ghostEl, true),
1484
- scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1485
- scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1486
- relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1487
- dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1488
- dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);
1489
-
1490
- // only set the status to dragging, when we are actually dragging
1491
- if (!Sortable.active && !awaitingDragStarted) {
1492
- if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1493
- return;
1494
- }
1495
- this._onDragStart(evt, true);
1496
- }
1497
- if (ghostEl) {
1498
- if (ghostMatrix) {
1499
- ghostMatrix.e += dx - (lastDx || 0);
1500
- ghostMatrix.f += dy - (lastDy || 0);
1501
- } else {
1502
- ghostMatrix = {
1503
- a: 1,
1504
- b: 0,
1505
- c: 0,
1506
- d: 1,
1507
- e: dx,
1508
- f: dy
1509
- };
1510
- }
1511
- var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
1512
- css(ghostEl, 'webkitTransform', cssMatrix);
1513
- css(ghostEl, 'mozTransform', cssMatrix);
1514
- css(ghostEl, 'msTransform', cssMatrix);
1515
- css(ghostEl, 'transform', cssMatrix);
1516
- lastDx = dx;
1517
- lastDy = dy;
1518
- touchEvt = touch;
1519
- }
1520
- evt.cancelable && evt.preventDefault();
1521
- }
1522
- },
1523
- _appendGhost: function _appendGhost() {
1524
- // Bug if using scale(): https://stackoverflow.com/questions/2637058
1525
- // Not being adjusted for
1526
- if (!ghostEl) {
1527
- var container = this.options.fallbackOnBody ? document.body : rootEl,
1528
- rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1529
- options = this.options;
1530
-
1531
- // Position absolutely
1532
- if (PositionGhostAbsolutely) {
1533
- // Get relatively positioned parent
1534
- ghostRelativeParent = container;
1535
- while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1536
- ghostRelativeParent = ghostRelativeParent.parentNode;
1537
- }
1538
- if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1539
- if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1540
- rect.top += ghostRelativeParent.scrollTop;
1541
- rect.left += ghostRelativeParent.scrollLeft;
1542
- } else {
1543
- ghostRelativeParent = getWindowScrollingElement();
1544
- }
1545
- ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1546
- }
1547
- ghostEl = dragEl.cloneNode(true);
1548
- toggleClass(ghostEl, options.ghostClass, false);
1549
- toggleClass(ghostEl, options.fallbackClass, true);
1550
- toggleClass(ghostEl, options.dragClass, true);
1551
- css(ghostEl, 'transition', '');
1552
- css(ghostEl, 'transform', '');
1553
- css(ghostEl, 'box-sizing', 'border-box');
1554
- css(ghostEl, 'margin', 0);
1555
- css(ghostEl, 'top', rect.top);
1556
- css(ghostEl, 'left', rect.left);
1557
- css(ghostEl, 'width', rect.width);
1558
- css(ghostEl, 'height', rect.height);
1559
- css(ghostEl, 'opacity', '0.8');
1560
- css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1561
- css(ghostEl, 'zIndex', '100000');
1562
- css(ghostEl, 'pointerEvents', 'none');
1563
- Sortable.ghost = ghostEl;
1564
- container.appendChild(ghostEl);
1565
-
1566
- // Set transform-origin
1567
- css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
1568
- }
1569
- },
1570
- _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {
1571
- var _this = this;
1572
- var dataTransfer = evt.dataTransfer;
1573
- var options = _this.options;
1574
- pluginEvent('dragStart', this, {
1575
- evt: evt
1576
- });
1577
- if (Sortable.eventCanceled) {
1578
- this._onDrop();
1579
- return;
1580
- }
1581
- pluginEvent('setupClone', this);
1582
- if (!Sortable.eventCanceled) {
1583
- cloneEl = clone(dragEl);
1584
- cloneEl.removeAttribute("id");
1585
- cloneEl.draggable = false;
1586
- cloneEl.style['will-change'] = '';
1587
- this._hideClone();
1588
- toggleClass(cloneEl, this.options.chosenClass, false);
1589
- Sortable.clone = cloneEl;
1590
- }
1591
-
1592
- // #1143: IFrame support workaround
1593
- _this.cloneId = _nextTick(function () {
1594
- pluginEvent('clone', _this);
1595
- if (Sortable.eventCanceled) return;
1596
- if (!_this.options.removeCloneOnHide) {
1597
- rootEl.insertBefore(cloneEl, dragEl);
1598
- }
1599
- _this._hideClone();
1600
- _dispatchEvent({
1601
- sortable: _this,
1602
- name: 'clone'
1603
- });
1604
- });
1605
- !fallback && toggleClass(dragEl, options.dragClass, true);
1606
-
1607
- // Set proper drop events
1608
- if (fallback) {
1609
- ignoreNextClick = true;
1610
- _this._loopId = setInterval(_this._emulateDragOver, 50);
1611
- } else {
1612
- // Undo what was set in _prepareDragStart before drag started
1613
- off(document, 'mouseup', _this._onDrop);
1614
- off(document, 'touchend', _this._onDrop);
1615
- off(document, 'touchcancel', _this._onDrop);
1616
- if (dataTransfer) {
1617
- dataTransfer.effectAllowed = 'move';
1618
- options.setData && options.setData.call(_this, dataTransfer, dragEl);
1619
- }
1620
- on(document, 'drop', _this);
1621
-
1622
- // #1276 fix:
1623
- css(dragEl, 'transform', 'translateZ(0)');
1624
- }
1625
- awaitingDragStarted = true;
1626
- _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1627
- on(document, 'selectstart', _this);
1628
- moved = true;
1629
- if (Safari) {
1630
- css(document.body, 'user-select', 'none');
1631
- }
1632
- },
1633
- // Returns true - if no further action is needed (either inserted or another condition)
1634
- _onDragOver: function _onDragOver( /**Event*/evt) {
1635
- var el = this.el,
1636
- target = evt.target,
1637
- dragRect,
1638
- targetRect,
1639
- revert,
1640
- options = this.options,
1641
- group = options.group,
1642
- activeSortable = Sortable.active,
1643
- isOwner = activeGroup === group,
1644
- canSort = options.sort,
1645
- fromSortable = putSortable || activeSortable,
1646
- vertical,
1647
- _this = this,
1648
- completedFired = false;
1649
- if (_silent) return;
1650
- function dragOverEvent(name, extra) {
1651
- pluginEvent(name, _this, _objectSpread2({
1652
- evt: evt,
1653
- isOwner: isOwner,
1654
- axis: vertical ? 'vertical' : 'horizontal',
1655
- revert: revert,
1656
- dragRect: dragRect,
1657
- targetRect: targetRect,
1658
- canSort: canSort,
1659
- fromSortable: fromSortable,
1660
- target: target,
1661
- completed: completed,
1662
- onMove: function onMove(target, after) {
1663
- return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1664
- },
1665
- changed: changed
1666
- }, extra));
1667
- }
1668
-
1669
- // Capture animation state
1670
- function capture() {
1671
- dragOverEvent('dragOverAnimationCapture');
1672
- _this.captureAnimationState();
1673
- if (_this !== fromSortable) {
1674
- fromSortable.captureAnimationState();
1675
- }
1676
- }
1677
-
1678
- // Return invocation when dragEl is inserted (or completed)
1679
- function completed(insertion) {
1680
- dragOverEvent('dragOverCompleted', {
1681
- insertion: insertion
1682
- });
1683
- if (insertion) {
1684
- // Clones must be hidden before folding animation to capture dragRectAbsolute properly
1685
- if (isOwner) {
1686
- activeSortable._hideClone();
1687
- } else {
1688
- activeSortable._showClone(_this);
1689
- }
1690
- if (_this !== fromSortable) {
1691
- // Set ghost class to new sortable's ghost class
1692
- toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
1693
- toggleClass(dragEl, options.ghostClass, true);
1694
- }
1695
- if (putSortable !== _this && _this !== Sortable.active) {
1696
- putSortable = _this;
1697
- } else if (_this === Sortable.active && putSortable) {
1698
- putSortable = null;
1699
- }
1700
-
1701
- // Animation
1702
- if (fromSortable === _this) {
1703
- _this._ignoreWhileAnimating = target;
1704
- }
1705
- _this.animateAll(function () {
1706
- dragOverEvent('dragOverAnimationComplete');
1707
- _this._ignoreWhileAnimating = null;
1708
- });
1709
- if (_this !== fromSortable) {
1710
- fromSortable.animateAll();
1711
- fromSortable._ignoreWhileAnimating = null;
1712
- }
1713
- }
1714
-
1715
- // Null lastTarget if it is not inside a previously swapped element
1716
- if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
1717
- lastTarget = null;
1718
- }
1719
-
1720
- // no bubbling and not fallback
1721
- if (!options.dragoverBubble && !evt.rootEl && target !== document) {
1722
- dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1723
-
1724
- // Do not detect for empty insert if already inserted
1725
- !insertion && nearestEmptyInsertDetectEvent(evt);
1726
- }
1727
- !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
1728
- return completedFired = true;
1729
- }
1730
-
1731
- // Call when dragEl has been inserted
1732
- function changed() {
1733
- newIndex = index(dragEl);
1734
- newDraggableIndex = index(dragEl, options.draggable);
1735
- _dispatchEvent({
1736
- sortable: _this,
1737
- name: 'change',
1738
- toEl: el,
1739
- newIndex: newIndex,
1740
- newDraggableIndex: newDraggableIndex,
1741
- originalEvent: evt
1742
- });
1743
- }
1744
- if (evt.preventDefault !== void 0) {
1745
- evt.cancelable && evt.preventDefault();
1746
- }
1747
- target = closest(target, options.draggable, el, true);
1748
- dragOverEvent('dragOver');
1749
- if (Sortable.eventCanceled) return completedFired;
1750
- if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
1751
- return completed(false);
1752
- }
1753
- ignoreNextClick = false;
1754
- if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
1755
- : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
1756
- vertical = this._getDirection(evt, target) === 'vertical';
1757
- dragRect = getRect(dragEl);
1758
- dragOverEvent('dragOverValid');
1759
- if (Sortable.eventCanceled) return completedFired;
1760
- if (revert) {
1761
- parentEl = rootEl; // actualization
1762
- capture();
1763
- this._hideClone();
1764
- dragOverEvent('revert');
1765
- if (!Sortable.eventCanceled) {
1766
- if (nextEl) {
1767
- rootEl.insertBefore(dragEl, nextEl);
1768
- } else {
1769
- rootEl.appendChild(dragEl);
1770
- }
1771
- }
1772
- return completed(true);
1773
- }
1774
- var elLastChild = lastChild(el, options.draggable);
1775
- if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
1776
- // Insert to end of list
1777
-
1778
- // If already at end of list: Do not insert
1779
- if (elLastChild === dragEl) {
1780
- return completed(false);
1781
- }
1782
-
1783
- // if there is a last element, it is the target
1784
- if (elLastChild && el === evt.target) {
1785
- target = elLastChild;
1786
- }
1787
- if (target) {
1788
- targetRect = getRect(target);
1789
- }
1790
- if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
1791
- capture();
1792
- if (elLastChild && elLastChild.nextSibling) {
1793
- // the last draggable element is not the last node
1794
- el.insertBefore(dragEl, elLastChild.nextSibling);
1795
- } else {
1796
- el.appendChild(dragEl);
1797
- }
1798
- parentEl = el; // actualization
1799
-
1800
- changed();
1801
- return completed(true);
1802
- }
1803
- } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
1804
- // Insert to start of list
1805
- var firstChild = getChild(el, 0, options, true);
1806
- if (firstChild === dragEl) {
1807
- return completed(false);
1808
- }
1809
- target = firstChild;
1810
- targetRect = getRect(target);
1811
- if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
1812
- capture();
1813
- el.insertBefore(dragEl, firstChild);
1814
- parentEl = el; // actualization
1815
-
1816
- changed();
1817
- return completed(true);
1818
- }
1819
- } else if (target.parentNode === el) {
1820
- targetRect = getRect(target);
1821
- var direction = 0,
1822
- targetBeforeFirstSwap,
1823
- differentLevel = dragEl.parentNode !== el,
1824
- differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
1825
- side1 = vertical ? 'top' : 'left',
1826
- scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
1827
- scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
1828
- if (lastTarget !== target) {
1829
- targetBeforeFirstSwap = targetRect[side1];
1830
- pastFirstInvertThresh = false;
1831
- isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
1832
- }
1833
- direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
1834
- var sibling;
1835
- if (direction !== 0) {
1836
- // Check if target is beside dragEl in respective direction (ignoring hidden elements)
1837
- var dragIndex = index(dragEl);
1838
- do {
1839
- dragIndex -= direction;
1840
- sibling = parentEl.children[dragIndex];
1841
- } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
1842
- }
1843
- // If dragEl is already beside target: Do not insert
1844
- if (direction === 0 || sibling === target) {
1845
- return completed(false);
1846
- }
1847
- lastTarget = target;
1848
- lastDirection = direction;
1849
- var nextSibling = target.nextElementSibling,
1850
- after = false;
1851
- after = direction === 1;
1852
- var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
1853
- if (moveVector !== false) {
1854
- if (moveVector === 1 || moveVector === -1) {
1855
- after = moveVector === 1;
1856
- }
1857
- _silent = true;
1858
- setTimeout(_unsilent, 30);
1859
- capture();
1860
- if (after && !nextSibling) {
1861
- el.appendChild(dragEl);
1862
- } else {
1863
- target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
1864
- }
1865
-
1866
- // Undo chrome's scroll adjustment (has no effect on other browsers)
1867
- if (scrolledPastTop) {
1868
- scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
1869
- }
1870
- parentEl = dragEl.parentNode; // actualization
1871
-
1872
- // must be done before animation
1873
- if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
1874
- targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
1875
- }
1876
- changed();
1877
- return completed(true);
1878
- }
1879
- }
1880
- if (el.contains(dragEl)) {
1881
- return completed(false);
1882
- }
1883
- }
1884
- return false;
1885
- },
1886
- _ignoreWhileAnimating: null,
1887
- _offMoveEvents: function _offMoveEvents() {
1888
- off(document, 'mousemove', this._onTouchMove);
1889
- off(document, 'touchmove', this._onTouchMove);
1890
- off(document, 'pointermove', this._onTouchMove);
1891
- off(document, 'dragover', nearestEmptyInsertDetectEvent);
1892
- off(document, 'mousemove', nearestEmptyInsertDetectEvent);
1893
- off(document, 'touchmove', nearestEmptyInsertDetectEvent);
1894
- },
1895
- _offUpEvents: function _offUpEvents() {
1896
- var ownerDocument = this.el.ownerDocument;
1897
- off(ownerDocument, 'mouseup', this._onDrop);
1898
- off(ownerDocument, 'touchend', this._onDrop);
1899
- off(ownerDocument, 'pointerup', this._onDrop);
1900
- off(ownerDocument, 'touchcancel', this._onDrop);
1901
- off(document, 'selectstart', this);
1902
- },
1903
- _onDrop: function _onDrop( /**Event*/evt) {
1904
- var el = this.el,
1905
- options = this.options;
1906
-
1907
- // Get the index of the dragged element within its parent
1908
- newIndex = index(dragEl);
1909
- newDraggableIndex = index(dragEl, options.draggable);
1910
- pluginEvent('drop', this, {
1911
- evt: evt
1912
- });
1913
- parentEl = dragEl && dragEl.parentNode;
1914
-
1915
- // Get again after plugin event
1916
- newIndex = index(dragEl);
1917
- newDraggableIndex = index(dragEl, options.draggable);
1918
- if (Sortable.eventCanceled) {
1919
- this._nulling();
1920
- return;
1921
- }
1922
- awaitingDragStarted = false;
1923
- isCircumstantialInvert = false;
1924
- pastFirstInvertThresh = false;
1925
- clearInterval(this._loopId);
1926
- clearTimeout(this._dragStartTimer);
1927
- _cancelNextTick(this.cloneId);
1928
- _cancelNextTick(this._dragStartId);
1929
-
1930
- // Unbind events
1931
- if (this.nativeDraggable) {
1932
- off(document, 'drop', this);
1933
- off(el, 'dragstart', this._onDragStart);
1934
- }
1935
- this._offMoveEvents();
1936
- this._offUpEvents();
1937
- if (Safari) {
1938
- css(document.body, 'user-select', '');
1939
- }
1940
- css(dragEl, 'transform', '');
1941
- if (evt) {
1942
- if (moved) {
1943
- evt.cancelable && evt.preventDefault();
1944
- !options.dropBubble && evt.stopPropagation();
1945
- }
1946
- ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
1947
- if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
1948
- // Remove clone(s)
1949
- cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
1950
- }
1951
- if (dragEl) {
1952
- if (this.nativeDraggable) {
1953
- off(dragEl, 'dragend', this);
1954
- }
1955
- _disableDraggable(dragEl);
1956
- dragEl.style['will-change'] = '';
1957
-
1958
- // Remove classes
1959
- // ghostClass is added in dragStarted
1960
- if (moved && !awaitingDragStarted) {
1961
- toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
1962
- }
1963
- toggleClass(dragEl, this.options.chosenClass, false);
1964
-
1965
- // Drag stop event
1966
- _dispatchEvent({
1967
- sortable: this,
1968
- name: 'unchoose',
1969
- toEl: parentEl,
1970
- newIndex: null,
1971
- newDraggableIndex: null,
1972
- originalEvent: evt
1973
- });
1974
- if (rootEl !== parentEl) {
1975
- if (newIndex >= 0) {
1976
- // Add event
1977
- _dispatchEvent({
1978
- rootEl: parentEl,
1979
- name: 'add',
1980
- toEl: parentEl,
1981
- fromEl: rootEl,
1982
- originalEvent: evt
1983
- });
1984
-
1985
- // Remove event
1986
- _dispatchEvent({
1987
- sortable: this,
1988
- name: 'remove',
1989
- toEl: parentEl,
1990
- originalEvent: evt
1991
- });
1992
-
1993
- // drag from one list and drop into another
1994
- _dispatchEvent({
1995
- rootEl: parentEl,
1996
- name: 'sort',
1997
- toEl: parentEl,
1998
- fromEl: rootEl,
1999
- originalEvent: evt
2000
- });
2001
- _dispatchEvent({
2002
- sortable: this,
2003
- name: 'sort',
2004
- toEl: parentEl,
2005
- originalEvent: evt
2006
- });
2007
- }
2008
- putSortable && putSortable.save();
2009
- } else {
2010
- if (newIndex !== oldIndex) {
2011
- if (newIndex >= 0) {
2012
- // drag & drop within the same list
2013
- _dispatchEvent({
2014
- sortable: this,
2015
- name: 'update',
2016
- toEl: parentEl,
2017
- originalEvent: evt
2018
- });
2019
- _dispatchEvent({
2020
- sortable: this,
2021
- name: 'sort',
2022
- toEl: parentEl,
2023
- originalEvent: evt
2024
- });
2025
- }
2026
- }
2027
- }
2028
- if (Sortable.active) {
2029
- /* jshint eqnull:true */
2030
- if (newIndex == null || newIndex === -1) {
2031
- newIndex = oldIndex;
2032
- newDraggableIndex = oldDraggableIndex;
2033
- }
2034
- _dispatchEvent({
2035
- sortable: this,
2036
- name: 'end',
2037
- toEl: parentEl,
2038
- originalEvent: evt
2039
- });
2040
-
2041
- // Save sorting
2042
- this.save();
2043
- }
2044
- }
2045
- }
2046
- this._nulling();
2047
- },
2048
- _nulling: function _nulling() {
2049
- pluginEvent('nulling', this);
2050
- rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
2051
- savedInputChecked.forEach(function (el) {
2052
- el.checked = true;
2053
- });
2054
- savedInputChecked.length = lastDx = lastDy = 0;
2055
- },
2056
- handleEvent: function handleEvent( /**Event*/evt) {
2057
- switch (evt.type) {
2058
- case 'drop':
2059
- case 'dragend':
2060
- this._onDrop(evt);
2061
- break;
2062
- case 'dragenter':
2063
- case 'dragover':
2064
- if (dragEl) {
2065
- this._onDragOver(evt);
2066
- _globalDragOver(evt);
2067
- }
2068
- break;
2069
- case 'selectstart':
2070
- evt.preventDefault();
2071
- break;
2072
- }
2073
- },
2074
- /**
2075
- * Serializes the item into an array of string.
2076
- * @returns {String[]}
2077
- */
2078
- toArray: function toArray() {
2079
- var order = [],
2080
- el,
2081
- children = this.el.children,
2082
- i = 0,
2083
- n = children.length,
2084
- options = this.options;
2085
- for (; i < n; i++) {
2086
- el = children[i];
2087
- if (closest(el, options.draggable, this.el, false)) {
2088
- order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2089
- }
2090
- }
2091
- return order;
2092
- },
2093
- /**
2094
- * Sorts the elements according to the array.
2095
- * @param {String[]} order order of the items
2096
- */
2097
- sort: function sort(order, useAnimation) {
2098
- var items = {},
2099
- rootEl = this.el;
2100
- this.toArray().forEach(function (id, i) {
2101
- var el = rootEl.children[i];
2102
- if (closest(el, this.options.draggable, rootEl, false)) {
2103
- items[id] = el;
2104
- }
2105
- }, this);
2106
- useAnimation && this.captureAnimationState();
2107
- order.forEach(function (id) {
2108
- if (items[id]) {
2109
- rootEl.removeChild(items[id]);
2110
- rootEl.appendChild(items[id]);
2111
- }
2112
- });
2113
- useAnimation && this.animateAll();
2114
- },
2115
- /**
2116
- * Save the current sorting
2117
- */
2118
- save: function save() {
2119
- var store = this.options.store;
2120
- store && store.set && store.set(this);
2121
- },
2122
- /**
2123
- * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2124
- * @param {HTMLElement} el
2125
- * @param {String} [selector] default: `options.draggable`
2126
- * @returns {HTMLElement|null}
2127
- */
2128
- closest: function closest$1(el, selector) {
2129
- return closest(el, selector || this.options.draggable, this.el, false);
2130
- },
2131
- /**
2132
- * Set/get option
2133
- * @param {string} name
2134
- * @param {*} [value]
2135
- * @returns {*}
2136
- */
2137
- option: function option(name, value) {
2138
- var options = this.options;
2139
- if (value === void 0) {
2140
- return options[name];
2141
- } else {
2142
- var modifiedValue = PluginManager.modifyOption(this, name, value);
2143
- if (typeof modifiedValue !== 'undefined') {
2144
- options[name] = modifiedValue;
2145
- } else {
2146
- options[name] = value;
2147
- }
2148
- if (name === 'group') {
2149
- _prepareGroup(options);
2150
- }
2151
- }
2152
- },
2153
- /**
2154
- * Destroy
2155
- */
2156
- destroy: function destroy() {
2157
- pluginEvent('destroy', this);
2158
- var el = this.el;
2159
- el[expando] = null;
2160
- off(el, 'mousedown', this._onTapStart);
2161
- off(el, 'touchstart', this._onTapStart);
2162
- off(el, 'pointerdown', this._onTapStart);
2163
- if (this.nativeDraggable) {
2164
- off(el, 'dragover', this);
2165
- off(el, 'dragenter', this);
2166
- }
2167
- // Remove draggable attributes
2168
- Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2169
- el.removeAttribute('draggable');
2170
- });
2171
- this._onDrop();
2172
- this._disableDelayedDragEvents();
2173
- sortables.splice(sortables.indexOf(this.el), 1);
2174
- this.el = el = null;
2175
- },
2176
- _hideClone: function _hideClone() {
2177
- if (!cloneHidden) {
2178
- pluginEvent('hideClone', this);
2179
- if (Sortable.eventCanceled) return;
2180
- css(cloneEl, 'display', 'none');
2181
- if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2182
- cloneEl.parentNode.removeChild(cloneEl);
2183
- }
2184
- cloneHidden = true;
2185
- }
2186
- },
2187
- _showClone: function _showClone(putSortable) {
2188
- if (putSortable.lastPutMode !== 'clone') {
2189
- this._hideClone();
2190
- return;
2191
- }
2192
- if (cloneHidden) {
2193
- pluginEvent('showClone', this);
2194
- if (Sortable.eventCanceled) return;
2195
-
2196
- // show clone at dragEl or original position
2197
- if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
2198
- rootEl.insertBefore(cloneEl, dragEl);
2199
- } else if (nextEl) {
2200
- rootEl.insertBefore(cloneEl, nextEl);
2201
- } else {
2202
- rootEl.appendChild(cloneEl);
2203
- }
2204
- if (this.options.group.revertClone) {
2205
- this.animate(dragEl, cloneEl);
2206
- }
2207
- css(cloneEl, 'display', '');
2208
- cloneHidden = false;
2209
- }
2210
- }
2211
- };
2212
- function _globalDragOver( /**Event*/evt) {
2213
- if (evt.dataTransfer) {
2214
- evt.dataTransfer.dropEffect = 'move';
2215
- }
2216
- evt.cancelable && evt.preventDefault();
2217
- }
2218
- function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2219
- var evt,
2220
- sortable = fromEl[expando],
2221
- onMoveFn = sortable.options.onMove,
2222
- retVal;
2223
- // Support for new CustomEvent feature
2224
- if (window.CustomEvent && !IE11OrLess && !Edge) {
2225
- evt = new CustomEvent('move', {
2226
- bubbles: true,
2227
- cancelable: true
2228
- });
2229
- } else {
2230
- evt = document.createEvent('Event');
2231
- evt.initEvent('move', true, true);
2232
- }
2233
- evt.to = toEl;
2234
- evt.from = fromEl;
2235
- evt.dragged = dragEl;
2236
- evt.draggedRect = dragRect;
2237
- evt.related = targetEl || toEl;
2238
- evt.relatedRect = targetRect || getRect(toEl);
2239
- evt.willInsertAfter = willInsertAfter;
2240
- evt.originalEvent = originalEvent;
2241
- fromEl.dispatchEvent(evt);
2242
- if (onMoveFn) {
2243
- retVal = onMoveFn.call(sortable, evt, originalEvent);
2244
- }
2245
- return retVal;
2246
- }
2247
- function _disableDraggable(el) {
2248
- el.draggable = false;
2249
- }
2250
- function _unsilent() {
2251
- _silent = false;
2252
- }
2253
- function _ghostIsFirst(evt, vertical, sortable) {
2254
- var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));
2255
- var sortableContentRect = getContentRect(sortable.el);
2256
- var spacer = 10;
2257
- return vertical ? evt.clientX < sortableContentRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < sortableContentRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;
2258
- }
2259
- function _ghostIsLast(evt, vertical, sortable) {
2260
- var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));
2261
- var sortableContentRect = getContentRect(sortable.el);
2262
- var spacer = 10;
2263
- return vertical ? evt.clientX > sortableContentRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > sortableContentRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;
2264
- }
2265
- function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2266
- var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2267
- targetLength = vertical ? targetRect.height : targetRect.width,
2268
- targetS1 = vertical ? targetRect.top : targetRect.left,
2269
- targetS2 = vertical ? targetRect.bottom : targetRect.right,
2270
- invert = false;
2271
- if (!invertSwap) {
2272
- // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2273
- if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2274
- // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2275
- // check if past first invert threshold on side opposite of lastDirection
2276
- if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2277
- // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2278
- pastFirstInvertThresh = true;
2279
- }
2280
- if (!pastFirstInvertThresh) {
2281
- // dragEl shadow (target move distance shadow)
2282
- if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2283
- : mouseOnAxis > targetS2 - targetMoveDistance) {
2284
- return -lastDirection;
2285
- }
2286
- } else {
2287
- invert = true;
2288
- }
2289
- } else {
2290
- // Regular
2291
- if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2292
- return _getInsertDirection(target);
2293
- }
2294
- }
2295
- }
2296
- invert = invert || invertSwap;
2297
- if (invert) {
2298
- // Invert of regular
2299
- if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2300
- return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2301
- }
2302
- }
2303
- return 0;
2304
- }
2305
-
2306
- /**
2307
- * Gets the direction dragEl must be swapped relative to target in order to make it
2308
- * seem that dragEl has been "inserted" into that element's position
2309
- * @param {HTMLElement} target The target whose position dragEl is being inserted at
2310
- * @return {Number} Direction dragEl must be swapped
2311
- */
2312
- function _getInsertDirection(target) {
2313
- if (index(dragEl) < index(target)) {
2314
- return 1;
2315
- } else {
2316
- return -1;
2317
- }
2318
- }
2319
-
2320
- /**
2321
- * Generate id
2322
- * @param {HTMLElement} el
2323
- * @returns {String}
2324
- * @private
2325
- */
2326
- function _generateId(el) {
2327
- var str = el.tagName + el.className + el.src + el.href + el.textContent,
2328
- i = str.length,
2329
- sum = 0;
2330
- while (i--) {
2331
- sum += str.charCodeAt(i);
2332
- }
2333
- return sum.toString(36);
2334
- }
2335
- function _saveInputCheckedState(root) {
2336
- savedInputChecked.length = 0;
2337
- var inputs = root.getElementsByTagName('input');
2338
- var idx = inputs.length;
2339
- while (idx--) {
2340
- var el = inputs[idx];
2341
- el.checked && savedInputChecked.push(el);
2342
- }
2343
- }
2344
- function _nextTick(fn) {
2345
- return setTimeout(fn, 0);
2346
- }
2347
- function _cancelNextTick(id) {
2348
- return clearTimeout(id);
2349
- }
2350
-
2351
- // Fixed #973:
2352
- if (documentExists) {
2353
- on(document, 'touchmove', function (evt) {
2354
- if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
2355
- evt.preventDefault();
2356
- }
2357
- });
2358
- }
2359
-
2360
- // Export utils
2361
- Sortable.utils = {
2362
- on: on,
2363
- off: off,
2364
- css: css,
2365
- find: find,
2366
- is: function is(el, selector) {
2367
- return !!closest(el, selector, el, false);
2368
- },
2369
- extend: extend,
2370
- throttle: throttle,
2371
- closest: closest,
2372
- toggleClass: toggleClass,
2373
- clone: clone,
2374
- index: index,
2375
- nextTick: _nextTick,
2376
- cancelNextTick: _cancelNextTick,
2377
- detectDirection: _detectDirection,
2378
- getChild: getChild
2379
- };
2380
-
2381
- /**
2382
- * Get the Sortable instance of an element
2383
- * @param {HTMLElement} element The element
2384
- * @return {Sortable|undefined} The instance of Sortable
2385
- */
2386
- Sortable.get = function (element) {
2387
- return element[expando];
2388
- };
2389
-
2390
- /**
2391
- * Mount a plugin to Sortable
2392
- * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2393
- */
2394
- Sortable.mount = function () {
2395
- for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2396
- plugins[_key] = arguments[_key];
2397
- }
2398
- if (plugins[0].constructor === Array) plugins = plugins[0];
2399
- plugins.forEach(function (plugin) {
2400
- if (!plugin.prototype || !plugin.prototype.constructor) {
2401
- throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
2402
- }
2403
- if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
2404
- PluginManager.mount(plugin);
2405
- });
2406
- };
2407
-
2408
- /**
2409
- * Create sortable instance
2410
- * @param {HTMLElement} el
2411
- * @param {Object} [options]
2412
- */
2413
- Sortable.create = function (el, options) {
2414
- return new Sortable(el, options);
2415
- };
2416
-
2417
- // Export
2418
- Sortable.version = version;
2419
-
2420
- var autoScrolls = [],
2421
- scrollEl,
2422
- scrollRootEl,
2423
- scrolling = false,
2424
- lastAutoScrollX,
2425
- lastAutoScrollY,
2426
- touchEvt$1,
2427
- pointerElemChangedInterval;
2428
- function AutoScrollPlugin() {
2429
- function AutoScroll() {
2430
- this.defaults = {
2431
- scroll: true,
2432
- forceAutoScrollFallback: false,
2433
- scrollSensitivity: 30,
2434
- scrollSpeed: 10,
2435
- bubbleScroll: true
2436
- };
2437
-
2438
- // Bind all private methods
2439
- for (var fn in this) {
2440
- if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2441
- this[fn] = this[fn].bind(this);
2442
- }
2443
- }
2444
- }
2445
- AutoScroll.prototype = {
2446
- dragStarted: function dragStarted(_ref) {
2447
- var originalEvent = _ref.originalEvent;
2448
- if (this.sortable.nativeDraggable) {
2449
- on(document, 'dragover', this._handleAutoScroll);
2450
- } else {
2451
- if (this.options.supportPointer) {
2452
- on(document, 'pointermove', this._handleFallbackAutoScroll);
2453
- } else if (originalEvent.touches) {
2454
- on(document, 'touchmove', this._handleFallbackAutoScroll);
2455
- } else {
2456
- on(document, 'mousemove', this._handleFallbackAutoScroll);
2457
- }
2458
- }
2459
- },
2460
- dragOverCompleted: function dragOverCompleted(_ref2) {
2461
- var originalEvent = _ref2.originalEvent;
2462
- // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2463
- if (!this.options.dragOverBubble && !originalEvent.rootEl) {
2464
- this._handleAutoScroll(originalEvent);
2465
- }
2466
- },
2467
- drop: function drop() {
2468
- if (this.sortable.nativeDraggable) {
2469
- off(document, 'dragover', this._handleAutoScroll);
2470
- } else {
2471
- off(document, 'pointermove', this._handleFallbackAutoScroll);
2472
- off(document, 'touchmove', this._handleFallbackAutoScroll);
2473
- off(document, 'mousemove', this._handleFallbackAutoScroll);
2474
- }
2475
- clearPointerElemChangedInterval();
2476
- clearAutoScrolls();
2477
- cancelThrottle();
2478
- },
2479
- nulling: function nulling() {
2480
- touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2481
- autoScrolls.length = 0;
2482
- },
2483
- _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2484
- this._handleAutoScroll(evt, true);
2485
- },
2486
- _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2487
- var _this = this;
2488
- var x = (evt.touches ? evt.touches[0] : evt).clientX,
2489
- y = (evt.touches ? evt.touches[0] : evt).clientY,
2490
- elem = document.elementFromPoint(x, y);
2491
- touchEvt$1 = evt;
2492
-
2493
- // IE does not seem to have native autoscroll,
2494
- // Edge's autoscroll seems too conditional,
2495
- // MACOS Safari does not have autoscroll,
2496
- // Firefox and Chrome are good
2497
- if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
2498
- autoScroll(evt, this.options, elem, fallback);
2499
-
2500
- // Listener for pointer element change
2501
- var ogElemScroller = getParentAutoScrollElement(elem, true);
2502
- if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2503
- pointerElemChangedInterval && clearPointerElemChangedInterval();
2504
- // Detect for pointer elem change, emulating native DnD behaviour
2505
- pointerElemChangedInterval = setInterval(function () {
2506
- var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2507
- if (newElem !== ogElemScroller) {
2508
- ogElemScroller = newElem;
2509
- clearAutoScrolls();
2510
- }
2511
- autoScroll(evt, _this.options, newElem, fallback);
2512
- }, 10);
2513
- lastAutoScrollX = x;
2514
- lastAutoScrollY = y;
2515
- }
2516
- } else {
2517
- // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2518
- if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2519
- clearAutoScrolls();
2520
- return;
2521
- }
2522
- autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2523
- }
2524
- }
2525
- };
2526
- return _extends(AutoScroll, {
2527
- pluginName: 'scroll',
2528
- initializeByDefault: true
2529
- });
2530
- }
2531
- function clearAutoScrolls() {
2532
- autoScrolls.forEach(function (autoScroll) {
2533
- clearInterval(autoScroll.pid);
2534
- });
2535
- autoScrolls = [];
2536
- }
2537
- function clearPointerElemChangedInterval() {
2538
- clearInterval(pointerElemChangedInterval);
2539
- }
2540
- var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2541
- // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2542
- if (!options.scroll) return;
2543
- var x = (evt.touches ? evt.touches[0] : evt).clientX,
2544
- y = (evt.touches ? evt.touches[0] : evt).clientY,
2545
- sens = options.scrollSensitivity,
2546
- speed = options.scrollSpeed,
2547
- winScroller = getWindowScrollingElement();
2548
- var scrollThisInstance = false,
2549
- scrollCustomFn;
2550
-
2551
- // New scroll root, set scrollEl
2552
- if (scrollRootEl !== rootEl) {
2553
- scrollRootEl = rootEl;
2554
- clearAutoScrolls();
2555
- scrollEl = options.scroll;
2556
- scrollCustomFn = options.scrollFn;
2557
- if (scrollEl === true) {
2558
- scrollEl = getParentAutoScrollElement(rootEl, true);
2559
- }
2560
- }
2561
- var layersOut = 0;
2562
- var currentParent = scrollEl;
2563
- do {
2564
- var el = currentParent,
2565
- rect = getRect(el),
2566
- top = rect.top,
2567
- bottom = rect.bottom,
2568
- left = rect.left,
2569
- right = rect.right,
2570
- width = rect.width,
2571
- height = rect.height,
2572
- canScrollX = void 0,
2573
- canScrollY = void 0,
2574
- scrollWidth = el.scrollWidth,
2575
- scrollHeight = el.scrollHeight,
2576
- elCSS = css(el),
2577
- scrollPosX = el.scrollLeft,
2578
- scrollPosY = el.scrollTop;
2579
- if (el === winScroller) {
2580
- canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
2581
- canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
2582
- } else {
2583
- canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
2584
- canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
2585
- }
2586
- var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
2587
- var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
2588
- if (!autoScrolls[layersOut]) {
2589
- for (var i = 0; i <= layersOut; i++) {
2590
- if (!autoScrolls[i]) {
2591
- autoScrolls[i] = {};
2592
- }
2593
- }
2594
- }
2595
- if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
2596
- autoScrolls[layersOut].el = el;
2597
- autoScrolls[layersOut].vx = vx;
2598
- autoScrolls[layersOut].vy = vy;
2599
- clearInterval(autoScrolls[layersOut].pid);
2600
- if (vx != 0 || vy != 0) {
2601
- scrollThisInstance = true;
2602
- /* jshint loopfunc:true */
2603
- autoScrolls[layersOut].pid = setInterval(function () {
2604
- // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
2605
- if (isFallback && this.layer === 0) {
2606
- Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
2607
- }
2608
- var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
2609
- var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
2610
- if (typeof scrollCustomFn === 'function') {
2611
- if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
2612
- return;
2613
- }
2614
- }
2615
- scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
2616
- }.bind({
2617
- layer: layersOut
2618
- }), 24);
2619
- }
2620
- }
2621
- layersOut++;
2622
- } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
2623
- scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
2624
- }, 30);
2625
-
2626
- var drop = function drop(_ref) {
2627
- var originalEvent = _ref.originalEvent,
2628
- putSortable = _ref.putSortable,
2629
- dragEl = _ref.dragEl,
2630
- activeSortable = _ref.activeSortable,
2631
- dispatchSortableEvent = _ref.dispatchSortableEvent,
2632
- hideGhostForTarget = _ref.hideGhostForTarget,
2633
- unhideGhostForTarget = _ref.unhideGhostForTarget;
2634
- if (!originalEvent) return;
2635
- var toSortable = putSortable || activeSortable;
2636
- hideGhostForTarget();
2637
- var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
2638
- var target = document.elementFromPoint(touch.clientX, touch.clientY);
2639
- unhideGhostForTarget();
2640
- if (toSortable && !toSortable.el.contains(target)) {
2641
- dispatchSortableEvent('spill');
2642
- this.onSpill({
2643
- dragEl: dragEl,
2644
- putSortable: putSortable
2645
- });
2646
- }
2647
- };
2648
- function Revert() {}
2649
- Revert.prototype = {
2650
- startIndex: null,
2651
- dragStart: function dragStart(_ref2) {
2652
- var oldDraggableIndex = _ref2.oldDraggableIndex;
2653
- this.startIndex = oldDraggableIndex;
2654
- },
2655
- onSpill: function onSpill(_ref3) {
2656
- var dragEl = _ref3.dragEl,
2657
- putSortable = _ref3.putSortable;
2658
- this.sortable.captureAnimationState();
2659
- if (putSortable) {
2660
- putSortable.captureAnimationState();
2661
- }
2662
- var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
2663
- if (nextSibling) {
2664
- this.sortable.el.insertBefore(dragEl, nextSibling);
2665
- } else {
2666
- this.sortable.el.appendChild(dragEl);
2667
- }
2668
- this.sortable.animateAll();
2669
- if (putSortable) {
2670
- putSortable.animateAll();
2671
- }
2672
- },
2673
- drop: drop
2674
- };
2675
- _extends(Revert, {
2676
- pluginName: 'revertOnSpill'
2677
- });
2678
- function Remove() {}
2679
- Remove.prototype = {
2680
- onSpill: function onSpill(_ref4) {
2681
- var dragEl = _ref4.dragEl,
2682
- putSortable = _ref4.putSortable;
2683
- var parentSortable = putSortable || this.sortable;
2684
- parentSortable.captureAnimationState();
2685
- dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
2686
- parentSortable.animateAll();
2687
- },
2688
- drop: drop
2689
- };
2690
- _extends(Remove, {
2691
- pluginName: 'removeOnSpill'
2692
- });
2693
-
2694
- var lastSwapEl;
2695
- function SwapPlugin() {
2696
- function Swap() {
2697
- this.defaults = {
2698
- swapClass: 'sortable-swap-highlight'
2699
- };
2700
- }
2701
- Swap.prototype = {
2702
- dragStart: function dragStart(_ref) {
2703
- var dragEl = _ref.dragEl;
2704
- lastSwapEl = dragEl;
2705
- },
2706
- dragOverValid: function dragOverValid(_ref2) {
2707
- var completed = _ref2.completed,
2708
- target = _ref2.target,
2709
- onMove = _ref2.onMove,
2710
- activeSortable = _ref2.activeSortable,
2711
- changed = _ref2.changed,
2712
- cancel = _ref2.cancel;
2713
- if (!activeSortable.options.swap) return;
2714
- var el = this.sortable.el,
2715
- options = this.options;
2716
- if (target && target !== el) {
2717
- var prevSwapEl = lastSwapEl;
2718
- if (onMove(target) !== false) {
2719
- toggleClass(target, options.swapClass, true);
2720
- lastSwapEl = target;
2721
- } else {
2722
- lastSwapEl = null;
2723
- }
2724
- if (prevSwapEl && prevSwapEl !== lastSwapEl) {
2725
- toggleClass(prevSwapEl, options.swapClass, false);
2726
- }
2727
- }
2728
- changed();
2729
- completed(true);
2730
- cancel();
2731
- },
2732
- drop: function drop(_ref3) {
2733
- var activeSortable = _ref3.activeSortable,
2734
- putSortable = _ref3.putSortable,
2735
- dragEl = _ref3.dragEl;
2736
- var toSortable = putSortable || this.sortable;
2737
- var options = this.options;
2738
- lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
2739
- if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
2740
- if (dragEl !== lastSwapEl) {
2741
- toSortable.captureAnimationState();
2742
- if (toSortable !== activeSortable) activeSortable.captureAnimationState();
2743
- swapNodes(dragEl, lastSwapEl);
2744
- toSortable.animateAll();
2745
- if (toSortable !== activeSortable) activeSortable.animateAll();
2746
- }
2747
- }
2748
- },
2749
- nulling: function nulling() {
2750
- lastSwapEl = null;
2751
- }
2752
- };
2753
- return _extends(Swap, {
2754
- pluginName: 'swap',
2755
- eventProperties: function eventProperties() {
2756
- return {
2757
- swapItem: lastSwapEl
2758
- };
2759
- }
2760
- });
2761
- }
2762
- function swapNodes(n1, n2) {
2763
- var p1 = n1.parentNode,
2764
- p2 = n2.parentNode,
2765
- i1,
2766
- i2;
2767
- if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;
2768
- i1 = index(n1);
2769
- i2 = index(n2);
2770
- if (p1.isEqualNode(p2) && i1 < i2) {
2771
- i2++;
2772
- }
2773
- p1.insertBefore(n2, p1.children[i1]);
2774
- p2.insertBefore(n1, p2.children[i2]);
2775
- }
2776
-
2777
- var multiDragElements = [],
2778
- multiDragClones = [],
2779
- lastMultiDragSelect,
2780
- // for selection with modifier key down (SHIFT)
2781
- multiDragSortable,
2782
- initialFolding = false,
2783
- // Initial multi-drag fold when drag started
2784
- folding = false,
2785
- // Folding any other time
2786
- dragStarted = false,
2787
- dragEl$1,
2788
- clonesFromRect,
2789
- clonesHidden;
2790
- function MultiDragPlugin() {
2791
- function MultiDrag(sortable) {
2792
- // Bind all private methods
2793
- for (var fn in this) {
2794
- if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2795
- this[fn] = this[fn].bind(this);
2796
- }
2797
- }
2798
- if (!sortable.options.avoidImplicitDeselect) {
2799
- if (sortable.options.supportPointer) {
2800
- on(document, 'pointerup', this._deselectMultiDrag);
2801
- } else {
2802
- on(document, 'mouseup', this._deselectMultiDrag);
2803
- on(document, 'touchend', this._deselectMultiDrag);
2804
- }
2805
- }
2806
- on(document, 'keydown', this._checkKeyDown);
2807
- on(document, 'keyup', this._checkKeyUp);
2808
- this.defaults = {
2809
- selectedClass: 'sortable-selected',
2810
- multiDragKey: null,
2811
- avoidImplicitDeselect: false,
2812
- setData: function setData(dataTransfer, dragEl) {
2813
- var data = '';
2814
- if (multiDragElements.length && multiDragSortable === sortable) {
2815
- multiDragElements.forEach(function (multiDragElement, i) {
2816
- data += (!i ? '' : ', ') + multiDragElement.textContent;
2817
- });
2818
- } else {
2819
- data = dragEl.textContent;
2820
- }
2821
- dataTransfer.setData('Text', data);
2822
- }
2823
- };
2824
- }
2825
- MultiDrag.prototype = {
2826
- multiDragKeyDown: false,
2827
- isMultiDrag: false,
2828
- delayStartGlobal: function delayStartGlobal(_ref) {
2829
- var dragged = _ref.dragEl;
2830
- dragEl$1 = dragged;
2831
- },
2832
- delayEnded: function delayEnded() {
2833
- this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
2834
- },
2835
- setupClone: function setupClone(_ref2) {
2836
- var sortable = _ref2.sortable,
2837
- cancel = _ref2.cancel;
2838
- if (!this.isMultiDrag) return;
2839
- for (var i = 0; i < multiDragElements.length; i++) {
2840
- multiDragClones.push(clone(multiDragElements[i]));
2841
- multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
2842
- multiDragClones[i].draggable = false;
2843
- multiDragClones[i].style['will-change'] = '';
2844
- toggleClass(multiDragClones[i], this.options.selectedClass, false);
2845
- multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);
2846
- }
2847
- sortable._hideClone();
2848
- cancel();
2849
- },
2850
- clone: function clone(_ref3) {
2851
- var sortable = _ref3.sortable,
2852
- rootEl = _ref3.rootEl,
2853
- dispatchSortableEvent = _ref3.dispatchSortableEvent,
2854
- cancel = _ref3.cancel;
2855
- if (!this.isMultiDrag) return;
2856
- if (!this.options.removeCloneOnHide) {
2857
- if (multiDragElements.length && multiDragSortable === sortable) {
2858
- insertMultiDragClones(true, rootEl);
2859
- dispatchSortableEvent('clone');
2860
- cancel();
2861
- }
2862
- }
2863
- },
2864
- showClone: function showClone(_ref4) {
2865
- var cloneNowShown = _ref4.cloneNowShown,
2866
- rootEl = _ref4.rootEl,
2867
- cancel = _ref4.cancel;
2868
- if (!this.isMultiDrag) return;
2869
- insertMultiDragClones(false, rootEl);
2870
- multiDragClones.forEach(function (clone) {
2871
- css(clone, 'display', '');
2872
- });
2873
- cloneNowShown();
2874
- clonesHidden = false;
2875
- cancel();
2876
- },
2877
- hideClone: function hideClone(_ref5) {
2878
- var _this = this;
2879
- var sortable = _ref5.sortable,
2880
- cloneNowHidden = _ref5.cloneNowHidden,
2881
- cancel = _ref5.cancel;
2882
- if (!this.isMultiDrag) return;
2883
- multiDragClones.forEach(function (clone) {
2884
- css(clone, 'display', 'none');
2885
- if (_this.options.removeCloneOnHide && clone.parentNode) {
2886
- clone.parentNode.removeChild(clone);
2887
- }
2888
- });
2889
- cloneNowHidden();
2890
- clonesHidden = true;
2891
- cancel();
2892
- },
2893
- dragStartGlobal: function dragStartGlobal(_ref6) {
2894
- var sortable = _ref6.sortable;
2895
- if (!this.isMultiDrag && multiDragSortable) {
2896
- multiDragSortable.multiDrag._deselectMultiDrag();
2897
- }
2898
- multiDragElements.forEach(function (multiDragElement) {
2899
- multiDragElement.sortableIndex = index(multiDragElement);
2900
- });
2901
-
2902
- // Sort multi-drag elements
2903
- multiDragElements = multiDragElements.sort(function (a, b) {
2904
- return a.sortableIndex - b.sortableIndex;
2905
- });
2906
- dragStarted = true;
2907
- },
2908
- dragStarted: function dragStarted(_ref7) {
2909
- var _this2 = this;
2910
- var sortable = _ref7.sortable;
2911
- if (!this.isMultiDrag) return;
2912
- if (this.options.sort) {
2913
- // Capture rects,
2914
- // hide multi drag elements (by positioning them absolute),
2915
- // set multi drag elements rects to dragRect,
2916
- // show multi drag elements,
2917
- // animate to rects,
2918
- // unset rects & remove from DOM
2919
-
2920
- sortable.captureAnimationState();
2921
- if (this.options.animation) {
2922
- multiDragElements.forEach(function (multiDragElement) {
2923
- if (multiDragElement === dragEl$1) return;
2924
- css(multiDragElement, 'position', 'absolute');
2925
- });
2926
- var dragRect = getRect(dragEl$1, false, true, true);
2927
- multiDragElements.forEach(function (multiDragElement) {
2928
- if (multiDragElement === dragEl$1) return;
2929
- setRect(multiDragElement, dragRect);
2930
- });
2931
- folding = true;
2932
- initialFolding = true;
2933
- }
2934
- }
2935
- sortable.animateAll(function () {
2936
- folding = false;
2937
- initialFolding = false;
2938
- if (_this2.options.animation) {
2939
- multiDragElements.forEach(function (multiDragElement) {
2940
- unsetRect(multiDragElement);
2941
- });
2942
- }
2943
-
2944
- // Remove all auxiliary multidrag items from el, if sorting enabled
2945
- if (_this2.options.sort) {
2946
- removeMultiDragElements();
2947
- }
2948
- });
2949
- },
2950
- dragOver: function dragOver(_ref8) {
2951
- var target = _ref8.target,
2952
- completed = _ref8.completed,
2953
- cancel = _ref8.cancel;
2954
- if (folding && ~multiDragElements.indexOf(target)) {
2955
- completed(false);
2956
- cancel();
2957
- }
2958
- },
2959
- revert: function revert(_ref9) {
2960
- var fromSortable = _ref9.fromSortable,
2961
- rootEl = _ref9.rootEl,
2962
- sortable = _ref9.sortable,
2963
- dragRect = _ref9.dragRect;
2964
- if (multiDragElements.length > 1) {
2965
- // Setup unfold animation
2966
- multiDragElements.forEach(function (multiDragElement) {
2967
- sortable.addAnimationState({
2968
- target: multiDragElement,
2969
- rect: folding ? getRect(multiDragElement) : dragRect
2970
- });
2971
- unsetRect(multiDragElement);
2972
- multiDragElement.fromRect = dragRect;
2973
- fromSortable.removeAnimationState(multiDragElement);
2974
- });
2975
- folding = false;
2976
- insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);
2977
- }
2978
- },
2979
- dragOverCompleted: function dragOverCompleted(_ref10) {
2980
- var sortable = _ref10.sortable,
2981
- isOwner = _ref10.isOwner,
2982
- insertion = _ref10.insertion,
2983
- activeSortable = _ref10.activeSortable,
2984
- parentEl = _ref10.parentEl,
2985
- putSortable = _ref10.putSortable;
2986
- var options = this.options;
2987
- if (insertion) {
2988
- // Clones must be hidden before folding animation to capture dragRectAbsolute properly
2989
- if (isOwner) {
2990
- activeSortable._hideClone();
2991
- }
2992
- initialFolding = false;
2993
- // If leaving sort:false root, or already folding - Fold to new location
2994
- if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
2995
- // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
2996
- var dragRectAbsolute = getRect(dragEl$1, false, true, true);
2997
- multiDragElements.forEach(function (multiDragElement) {
2998
- if (multiDragElement === dragEl$1) return;
2999
- setRect(multiDragElement, dragRectAbsolute);
3000
-
3001
- // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
3002
- // while folding, and so that we can capture them again because old sortable will no longer be fromSortable
3003
- parentEl.appendChild(multiDragElement);
3004
- });
3005
- folding = true;
3006
- }
3007
-
3008
- // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
3009
- if (!isOwner) {
3010
- // Only remove if not folding (folding will remove them anyways)
3011
- if (!folding) {
3012
- removeMultiDragElements();
3013
- }
3014
- if (multiDragElements.length > 1) {
3015
- var clonesHiddenBefore = clonesHidden;
3016
- activeSortable._showClone(sortable);
3017
-
3018
- // Unfold animation for clones if showing from hidden
3019
- if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
3020
- multiDragClones.forEach(function (clone) {
3021
- activeSortable.addAnimationState({
3022
- target: clone,
3023
- rect: clonesFromRect
3024
- });
3025
- clone.fromRect = clonesFromRect;
3026
- clone.thisAnimationDuration = null;
3027
- });
3028
- }
3029
- } else {
3030
- activeSortable._showClone(sortable);
3031
- }
3032
- }
3033
- }
3034
- },
3035
- dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
3036
- var dragRect = _ref11.dragRect,
3037
- isOwner = _ref11.isOwner,
3038
- activeSortable = _ref11.activeSortable;
3039
- multiDragElements.forEach(function (multiDragElement) {
3040
- multiDragElement.thisAnimationDuration = null;
3041
- });
3042
- if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
3043
- clonesFromRect = _extends({}, dragRect);
3044
- var dragMatrix = matrix(dragEl$1, true);
3045
- clonesFromRect.top -= dragMatrix.f;
3046
- clonesFromRect.left -= dragMatrix.e;
3047
- }
3048
- },
3049
- dragOverAnimationComplete: function dragOverAnimationComplete() {
3050
- if (folding) {
3051
- folding = false;
3052
- removeMultiDragElements();
3053
- }
3054
- },
3055
- drop: function drop(_ref12) {
3056
- var evt = _ref12.originalEvent,
3057
- rootEl = _ref12.rootEl,
3058
- parentEl = _ref12.parentEl,
3059
- sortable = _ref12.sortable,
3060
- dispatchSortableEvent = _ref12.dispatchSortableEvent,
3061
- oldIndex = _ref12.oldIndex,
3062
- putSortable = _ref12.putSortable;
3063
- var toSortable = putSortable || this.sortable;
3064
- if (!evt) return;
3065
- var options = this.options,
3066
- children = parentEl.children;
3067
-
3068
- // Multi-drag selection
3069
- if (!dragStarted) {
3070
- if (options.multiDragKey && !this.multiDragKeyDown) {
3071
- this._deselectMultiDrag();
3072
- }
3073
- toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
3074
- if (!~multiDragElements.indexOf(dragEl$1)) {
3075
- multiDragElements.push(dragEl$1);
3076
- dispatchEvent({
3077
- sortable: sortable,
3078
- rootEl: rootEl,
3079
- name: 'select',
3080
- targetEl: dragEl$1,
3081
- originalEvent: evt
3082
- });
3083
-
3084
- // Modifier activated, select from last to dragEl
3085
- if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
3086
- var lastIndex = index(lastMultiDragSelect),
3087
- currentIndex = index(dragEl$1);
3088
- if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
3089
- // Must include lastMultiDragSelect (select it), in case modified selection from no selection
3090
- // (but previous selection existed)
3091
- var n, i;
3092
- if (currentIndex > lastIndex) {
3093
- i = lastIndex;
3094
- n = currentIndex;
3095
- } else {
3096
- i = currentIndex;
3097
- n = lastIndex + 1;
3098
- }
3099
- for (; i < n; i++) {
3100
- if (~multiDragElements.indexOf(children[i])) continue;
3101
- toggleClass(children[i], options.selectedClass, true);
3102
- multiDragElements.push(children[i]);
3103
- dispatchEvent({
3104
- sortable: sortable,
3105
- rootEl: rootEl,
3106
- name: 'select',
3107
- targetEl: children[i],
3108
- originalEvent: evt
3109
- });
3110
- }
3111
- }
3112
- } else {
3113
- lastMultiDragSelect = dragEl$1;
3114
- }
3115
- multiDragSortable = toSortable;
3116
- } else {
3117
- multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
3118
- lastMultiDragSelect = null;
3119
- dispatchEvent({
3120
- sortable: sortable,
3121
- rootEl: rootEl,
3122
- name: 'deselect',
3123
- targetEl: dragEl$1,
3124
- originalEvent: evt
3125
- });
3126
- }
3127
- }
3128
-
3129
- // Multi-drag drop
3130
- if (dragStarted && this.isMultiDrag) {
3131
- folding = false;
3132
- // Do not "unfold" after around dragEl if reverted
3133
- if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
3134
- var dragRect = getRect(dragEl$1),
3135
- multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
3136
- if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
3137
- toSortable.captureAnimationState();
3138
- if (!initialFolding) {
3139
- if (options.animation) {
3140
- dragEl$1.fromRect = dragRect;
3141
- multiDragElements.forEach(function (multiDragElement) {
3142
- multiDragElement.thisAnimationDuration = null;
3143
- if (multiDragElement !== dragEl$1) {
3144
- var rect = folding ? getRect(multiDragElement) : dragRect;
3145
- multiDragElement.fromRect = rect;
3146
-
3147
- // Prepare unfold animation
3148
- toSortable.addAnimationState({
3149
- target: multiDragElement,
3150
- rect: rect
3151
- });
3152
- }
3153
- });
3154
- }
3155
-
3156
- // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
3157
- // properly they must all be removed
3158
- removeMultiDragElements();
3159
- multiDragElements.forEach(function (multiDragElement) {
3160
- if (children[multiDragIndex]) {
3161
- parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
3162
- } else {
3163
- parentEl.appendChild(multiDragElement);
3164
- }
3165
- multiDragIndex++;
3166
- });
3167
-
3168
- // If initial folding is done, the elements may have changed position because they are now
3169
- // unfolding around dragEl, even though dragEl may not have his index changed, so update event
3170
- // must be fired here as Sortable will not.
3171
- if (oldIndex === index(dragEl$1)) {
3172
- var update = false;
3173
- multiDragElements.forEach(function (multiDragElement) {
3174
- if (multiDragElement.sortableIndex !== index(multiDragElement)) {
3175
- update = true;
3176
- return;
3177
- }
3178
- });
3179
- if (update) {
3180
- dispatchSortableEvent('update');
3181
- dispatchSortableEvent('sort');
3182
- }
3183
- }
3184
- }
3185
-
3186
- // Must be done after capturing individual rects (scroll bar)
3187
- multiDragElements.forEach(function (multiDragElement) {
3188
- unsetRect(multiDragElement);
3189
- });
3190
- toSortable.animateAll();
3191
- }
3192
- multiDragSortable = toSortable;
3193
- }
3194
-
3195
- // Remove clones if necessary
3196
- if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
3197
- multiDragClones.forEach(function (clone) {
3198
- clone.parentNode && clone.parentNode.removeChild(clone);
3199
- });
3200
- }
3201
- },
3202
- nullingGlobal: function nullingGlobal() {
3203
- this.isMultiDrag = dragStarted = false;
3204
- multiDragClones.length = 0;
3205
- },
3206
- destroyGlobal: function destroyGlobal() {
3207
- this._deselectMultiDrag();
3208
- off(document, 'pointerup', this._deselectMultiDrag);
3209
- off(document, 'mouseup', this._deselectMultiDrag);
3210
- off(document, 'touchend', this._deselectMultiDrag);
3211
- off(document, 'keydown', this._checkKeyDown);
3212
- off(document, 'keyup', this._checkKeyUp);
3213
- },
3214
- _deselectMultiDrag: function _deselectMultiDrag(evt) {
3215
- if (typeof dragStarted !== "undefined" && dragStarted) return;
3216
-
3217
- // Only deselect if selection is in this sortable
3218
- if (multiDragSortable !== this.sortable) return;
3219
-
3220
- // Only deselect if target is not item in this sortable
3221
- if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;
3222
-
3223
- // Only deselect if left click
3224
- if (evt && evt.button !== 0) return;
3225
- while (multiDragElements.length) {
3226
- var el = multiDragElements[0];
3227
- toggleClass(el, this.options.selectedClass, false);
3228
- multiDragElements.shift();
3229
- dispatchEvent({
3230
- sortable: this.sortable,
3231
- rootEl: this.sortable.el,
3232
- name: 'deselect',
3233
- targetEl: el,
3234
- originalEvent: evt
3235
- });
3236
- }
3237
- },
3238
- _checkKeyDown: function _checkKeyDown(evt) {
3239
- if (evt.key === this.options.multiDragKey) {
3240
- this.multiDragKeyDown = true;
3241
- }
3242
- },
3243
- _checkKeyUp: function _checkKeyUp(evt) {
3244
- if (evt.key === this.options.multiDragKey) {
3245
- this.multiDragKeyDown = false;
3246
- }
3247
- }
3248
- };
3249
- return _extends(MultiDrag, {
3250
- // Static methods & properties
3251
- pluginName: 'multiDrag',
3252
- utils: {
3253
- /**
3254
- * Selects the provided multi-drag item
3255
- * @param {HTMLElement} el The element to be selected
3256
- */
3257
- select: function select(el) {
3258
- var sortable = el.parentNode[expando];
3259
- if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
3260
- if (multiDragSortable && multiDragSortable !== sortable) {
3261
- multiDragSortable.multiDrag._deselectMultiDrag();
3262
- multiDragSortable = sortable;
3263
- }
3264
- toggleClass(el, sortable.options.selectedClass, true);
3265
- multiDragElements.push(el);
3266
- },
3267
- /**
3268
- * Deselects the provided multi-drag item
3269
- * @param {HTMLElement} el The element to be deselected
3270
- */
3271
- deselect: function deselect(el) {
3272
- var sortable = el.parentNode[expando],
3273
- index = multiDragElements.indexOf(el);
3274
- if (!sortable || !sortable.options.multiDrag || !~index) return;
3275
- toggleClass(el, sortable.options.selectedClass, false);
3276
- multiDragElements.splice(index, 1);
3277
- }
3278
- },
3279
- eventProperties: function eventProperties() {
3280
- var _this3 = this;
3281
- var oldIndicies = [],
3282
- newIndicies = [];
3283
- multiDragElements.forEach(function (multiDragElement) {
3284
- oldIndicies.push({
3285
- multiDragElement: multiDragElement,
3286
- index: multiDragElement.sortableIndex
3287
- });
3288
-
3289
- // multiDragElements will already be sorted if folding
3290
- var newIndex;
3291
- if (folding && multiDragElement !== dragEl$1) {
3292
- newIndex = -1;
3293
- } else if (folding) {
3294
- newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');
3295
- } else {
3296
- newIndex = index(multiDragElement);
3297
- }
3298
- newIndicies.push({
3299
- multiDragElement: multiDragElement,
3300
- index: newIndex
3301
- });
3302
- });
3303
- return {
3304
- items: _toConsumableArray(multiDragElements),
3305
- clones: [].concat(multiDragClones),
3306
- oldIndicies: oldIndicies,
3307
- newIndicies: newIndicies
3308
- };
3309
- },
3310
- optionListeners: {
3311
- multiDragKey: function multiDragKey(key) {
3312
- key = key.toLowerCase();
3313
- if (key === 'ctrl') {
3314
- key = 'Control';
3315
- } else if (key.length > 1) {
3316
- key = key.charAt(0).toUpperCase() + key.substr(1);
3317
- }
3318
- return key;
3319
- }
3320
- }
3321
- });
3322
- }
3323
- function insertMultiDragElements(clonesInserted, rootEl) {
3324
- multiDragElements.forEach(function (multiDragElement, i) {
3325
- var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
3326
- if (target) {
3327
- rootEl.insertBefore(multiDragElement, target);
3328
- } else {
3329
- rootEl.appendChild(multiDragElement);
3330
- }
3331
- });
3332
- }
3333
-
3334
- /**
3335
- * Insert multi-drag clones
3336
- * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
3337
- * @param {HTMLElement} rootEl
3338
- */
3339
- function insertMultiDragClones(elementsInserted, rootEl) {
3340
- multiDragClones.forEach(function (clone, i) {
3341
- var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
3342
- if (target) {
3343
- rootEl.insertBefore(clone, target);
3344
- } else {
3345
- rootEl.appendChild(clone);
3346
- }
3347
- });
3348
- }
3349
- function removeMultiDragElements() {
3350
- multiDragElements.forEach(function (multiDragElement) {
3351
- if (multiDragElement === dragEl$1) return;
3352
- multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);
3353
- });
3354
- }
3355
-
3356
- Sortable.mount(new AutoScrollPlugin());
3357
- Sortable.mount(Remove, Revert);
3358
-
3359
- /*!
3360
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3361
- * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
3362
- * v2.4.0
3363
- */
3364
- const sortableComponentSet = new Set();
3365
- const CSS = {
3366
- ghostClass: "calcite-sortable--ghost",
3367
- chosenClass: "calcite-sortable--chosen",
3368
- dragClass: "calcite-sortable--drag",
3369
- };
3370
- /**
3371
- * Helper to keep track of a SortableComponent. This should be called in the `connectedCallback` lifecycle method as well as any other method necessary to rebuild the sortable instance.
3372
- *
3373
- * @param {SortableComponent} component - The sortable component.
3374
- */
3375
- function connectSortableComponent(component) {
3376
- disconnectSortableComponent(component);
3377
- sortableComponentSet.add(component);
3378
- const dataIdAttr = "id";
3379
- const { group, handleSelector: handle, dragSelector: draggable } = component;
3380
- component.sortable = Sortable.create(component.el, {
3381
- dataIdAttr,
3382
- ...CSS,
3383
- ...(!!draggable && { draggable }),
3384
- ...(!!group && {
3385
- group: {
3386
- name: group,
3387
- ...(!!component.canPull && {
3388
- pull: (to, from, dragEl, { newIndex, oldIndex }) => component.canPull({ toEl: to.el, fromEl: from.el, dragEl, newIndex, oldIndex }),
3389
- }),
3390
- ...(!!component.canPut && {
3391
- put: (to, from, dragEl, { newIndex, oldIndex }) => component.canPut({ toEl: to.el, fromEl: from.el, dragEl, newIndex, oldIndex }),
3392
- }),
3393
- },
3394
- }),
3395
- handle,
3396
- filter: "[drag-disabled]",
3397
- onStart: ({ from: fromEl, item: dragEl, to: toEl, newIndex, oldIndex }) => {
3398
- dragState.active = true;
3399
- onGlobalDragStart();
3400
- component.onDragStart({ fromEl, dragEl, toEl, newIndex, oldIndex });
3401
- },
3402
- onEnd: ({ from: fromEl, item: dragEl, to: toEl, newIndex, oldIndex }) => {
3403
- dragState.active = false;
3404
- onGlobalDragEnd();
3405
- component.onDragEnd({ fromEl, dragEl, toEl, newIndex, oldIndex });
3406
- },
3407
- onSort: ({ from: fromEl, item: dragEl, to: toEl, newIndex, oldIndex }) => {
3408
- component.onDragSort({ fromEl, dragEl, toEl, newIndex, oldIndex });
3409
- },
3410
- });
3411
- }
3412
- /**
3413
- * Helper to remove track of a SortableComponent. This should be called in the `disconnectedCallback` lifecycle method.
3414
- *
3415
- * @param {SortableComponent} component - The sortable component.
3416
- */
3417
- function disconnectSortableComponent(component) {
3418
- sortableComponentSet.delete(component);
3419
- component.sortable?.destroy();
3420
- component.sortable = null;
3421
- }
3422
- const dragState = { active: false };
3423
- /**
3424
- * Helper to determine if dragging is currently active.
3425
- *
3426
- * @param component The sortable component.
3427
- * @returns {boolean} a boolean value.
3428
- */
3429
- function dragActive(component) {
3430
- return component.dragEnabled && dragState.active;
3431
- }
3432
- function onGlobalDragStart() {
3433
- Array.from(sortableComponentSet).forEach((component) => component.onGlobalDragStart());
3434
- }
3435
- function onGlobalDragEnd() {
3436
- Array.from(sortableComponentSet).forEach((component) => component.onGlobalDragEnd());
3437
- }
3438
-
3439
- export { disconnectSortableComponent as a, connectSortableComponent as c, dragActive as d };