@onereach/ui-components 2.68.0-beta.2053.0 → 2.68.0-beta.2056.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (487) hide show
  1. package/dist/bundled/v2/{OrAvatar-bbd9138b.js → OrAvatar-2c49e923.js} +2 -3
  2. package/dist/bundled/v2/{OrAvatar-b24b018a.js → OrAvatar-cd6afe7f.js} +1 -1
  3. package/dist/bundled/v2/{OrButton-cde3d3f5.js → OrButton-35f30fb6.js} +3 -4
  4. package/dist/bundled/v2/{OrButton-63084188.js → OrButton-a036fc0c.js} +1 -1
  5. package/dist/bundled/v2/{OrCardCollection-79db4f39.js → OrCardCollection-1867fd4c.js} +5 -6
  6. package/dist/bundled/v2/{OrCardCollection-d9b39a49.js → OrCardCollection-e0a08528.js} +3 -3
  7. package/dist/bundled/v2/{OrCheckbox-5d08d836.js → OrCheckbox-886d6bec.js} +1 -1
  8. package/dist/bundled/v2/{OrChipsInput-cd6cd95a.js → OrChipsInput-43d611b8.js} +0 -0
  9. package/dist/bundled/v2/{OrCode-3759372f.js → OrCode-3f0505e4.js} +5 -6
  10. package/dist/bundled/v2/{OrColorPicker-a2758b76.js → OrColorPicker-7a7b8173.js} +3 -4
  11. package/dist/bundled/v2/{OrConfirm-2e363a43.js → OrConfirm-e1abcf12.js} +2 -2
  12. package/dist/bundled/v2/{OrConfirm-0e8a1c04.js → OrConfirm-e7ecbf43.js} +6 -7
  13. package/dist/bundled/v2/{OrExpansionPanel-edc9d46a.js → OrExpansionPanel-5ee860d1.js} +2 -2
  14. package/dist/bundled/v2/{OrFab-92e38377.js → OrFab-cda7b999.js} +2 -2
  15. package/dist/bundled/v2/{OrFloating-fa6e950f.js → OrFloating-55665d61.js} +2 -3
  16. package/dist/bundled/v2/{OrIcon-14cdfa12.js → OrIcon-8dcb2a6e.js} +1 -2
  17. package/dist/bundled/v2/{OrIcon-db65d58a.js → OrIcon-b54b605a.js} +2 -2
  18. package/dist/bundled/v2/{OrIconButton-84ac04f9.js → OrIconButton-05c25d9d.js} +2 -2
  19. package/dist/bundled/v2/{OrIconButton-51967efb.js → OrIconButton-cf05263d.js} +4 -4
  20. package/dist/bundled/v2/{OrInlineInput-48fc0fc9.js → OrInlineInput-cea08e41.js} +8 -8
  21. package/dist/bundled/v2/{OrInlineTextEdit-e49e3293.js → OrInlineTextEdit-0764ee64.js} +5 -6
  22. package/dist/bundled/v2/{OrInput-ab9d4fc9.js → OrInput-ad5f47e0.js} +12 -12
  23. package/dist/bundled/v2/{OrLabel-1cb3fc95.js → OrLabel-53f23ecb.js} +1 -2
  24. package/dist/bundled/v2/{OrLoader-58e8d7af.js → OrLoader-7dd59764.js} +1 -2
  25. package/dist/bundled/v2/{OrModal-f7f845dc.js → OrModal-a1b766dd.js} +1 -1
  26. package/dist/bundled/v2/{OrModal-ec1bd712.js → OrModal-cdf88541.js} +4 -5
  27. package/dist/bundled/v2/{OrNotification-bc0cba21.js → OrNotification-2aa63ccc.js} +2 -2
  28. package/dist/bundled/v2/{OrNotification-78aed039.js → OrNotification-411dd28f.js} +4 -5
  29. package/dist/bundled/v2/{OrPopover-08d41a4f.js → OrPopover-f03a8230.js} +0 -0
  30. package/dist/bundled/v2/{OrProgress-4723bc60.js → OrProgress-005c516d.js} +1 -2
  31. package/dist/bundled/v2/{OrSearch-4f79a6b9.js → OrSearch-9718ba70.js} +1 -1
  32. package/dist/bundled/v2/{OrSelect-d6569bb1.js → OrSelect-6fdcd339.js} +1 -1
  33. package/dist/bundled/v2/{OrSidebar-567bf416.js → OrSidebar-fabc7bc9.js} +1 -2
  34. package/dist/bundled/v2/{OrTabs-e327040c.js → OrTabs-9a5a5702.js} +5 -6
  35. package/dist/bundled/v2/{OrTabs-76ac4d1a.js → OrTabs-c495a9ef.js} +2 -2
  36. package/dist/bundled/v2/{OrTag-d5cc36a8.js → OrTag-414c7744.js} +2 -2
  37. package/dist/bundled/v2/{OrTag-4dfc9206.js → OrTag-d15f40a7.js} +2 -3
  38. package/dist/bundled/v2/{OrTextarea-6049ed8e.js → OrTextarea-33486937.js} +3 -3
  39. package/dist/bundled/v2/{OrTextbox-9664f107.js → OrTextbox-ffc9bf3d.js} +5 -6
  40. package/dist/bundled/v2/{OrToastContainer-b05319b5.js → OrToast-64917bd0.js} +13 -216
  41. package/dist/bundled/v2/{OrTooltip-7dc5d239.js → OrTooltip-cf20df81.js} +2 -2
  42. package/dist/bundled/{v3/color-b3d00690.js → v2/color-1f348774.js} +1 -1
  43. package/dist/bundled/v2/components/OrAvatar/OrAvatar.js +4 -13
  44. package/dist/bundled/v2/components/OrAvatar/index.js +14 -0
  45. package/dist/bundled/v2/components/OrAvatarV3/{OrAvatarV3.js → index.js} +2 -2
  46. package/dist/bundled/v2/components/OrBottomSheet/OrBottomSheet.js +2 -2
  47. package/dist/bundled/v2/components/OrBottomSheetV3/{OrBottomSheetV3.js → index.js} +1 -1
  48. package/dist/bundled/v2/components/OrButton/OrButton.js +4 -5
  49. package/dist/bundled/v2/components/OrButton/index.js +6 -0
  50. package/dist/bundled/v2/components/OrButtonV2/{OrButtonV2.js → index.js} +6 -6
  51. package/dist/bundled/v2/components/OrButtonV3/index.js +5 -0
  52. package/dist/bundled/v2/components/OrCard/OrCard.js +68 -4
  53. package/dist/bundled/v2/components/OrCard/index.js +4 -0
  54. package/dist/bundled/v2/components/OrCardCollection/OrCardCollection.js +22 -25
  55. package/dist/bundled/v2/components/OrCardCollection/index.js +27 -0
  56. package/dist/bundled/v2/components/OrCardCollectionV3/{OrCardCollectionV3.js → index.js} +11 -11
  57. package/dist/bundled/v2/components/{OrHintV3/OrHintV3.js → OrCardV3/index.js} +1 -1
  58. package/dist/bundled/v2/components/OrCarousel/OrCarousel.js +2886 -8
  59. package/dist/bundled/v2/components/OrCarousel/index.js +15 -0
  60. package/dist/bundled/v2/components/OrCheckbox/OrCheckbox.js +207 -14
  61. package/dist/bundled/v2/components/OrCheckbox/index.js +14 -0
  62. package/dist/bundled/v2/components/OrCheckboxV3/{OrCheckboxV3.js → index.js} +2 -2
  63. package/dist/bundled/v2/components/OrChip/OrChip.js +3 -3
  64. package/dist/bundled/v2/components/OrChips/OrChips.js +183 -11
  65. package/dist/bundled/v2/components/OrChips/index.js +18 -0
  66. package/dist/bundled/v2/components/OrChipsInput/OrChipsInput.js +4 -4
  67. package/dist/bundled/v2/components/OrCode/OrCode.js +9 -9
  68. package/dist/bundled/v2/components/OrCode/index.js +25 -0
  69. package/dist/bundled/v2/components/OrCollapse/OrCollapse.js +171 -7
  70. package/dist/bundled/v2/components/OrCollapse/index.js +7 -0
  71. package/dist/bundled/v2/components/OrColorPicker/OrColorPicker.js +5 -5
  72. package/dist/bundled/v2/components/OrColorPicker/index.js +12 -0
  73. package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +21 -25
  74. package/dist/bundled/v2/components/OrConfirm/index.js +29 -0
  75. package/dist/bundled/v2/components/OrConfirmV3/{OrConfirmV3.js → index.js} +12 -12
  76. package/dist/bundled/v2/components/OrDateTimePicker/OrDateTimePicker.js +647 -17
  77. package/dist/bundled/v2/components/OrDateTimePicker/index.js +25 -0
  78. package/dist/bundled/v2/components/OrError/OrError.js +93 -4
  79. package/dist/bundled/v2/components/OrError/index.js +4 -0
  80. package/dist/bundled/v2/components/OrErrorTag/OrErrorTag.js +2 -2
  81. package/dist/bundled/v2/components/OrErrorTagV3/{OrErrorTagV3.js → index.js} +1 -1
  82. package/dist/bundled/v2/components/OrErrorV3/{OrErrorV3.js → index.js} +1 -1
  83. package/dist/bundled/v2/components/OrExpansionPanel/OrExpansionPanel.js +2 -2
  84. package/dist/bundled/v2/components/OrExpansionPanelV3/{OrExpansionPanelV3.js → index.js} +2 -2
  85. package/dist/bundled/v2/components/OrFab/OrFab.js +2 -2
  86. package/dist/bundled/v2/components/OrFabV3/{OrFabV3.js → index.js} +2 -2
  87. package/dist/bundled/v2/components/OrFloating/OrFloating.js +4 -4
  88. package/dist/bundled/v2/components/OrFloating/index.js +10 -0
  89. package/dist/bundled/v2/components/OrHint/OrHint.js +93 -5
  90. package/dist/bundled/v2/components/OrHint/index.js +5 -0
  91. package/dist/bundled/v2/components/{OrCardV3/OrCardV3.js → OrHintV3/index.js} +1 -1
  92. package/dist/bundled/v2/components/OrIcon/OrIcon.js +3 -12
  93. package/dist/bundled/v2/components/OrIcon/index.js +13 -0
  94. package/dist/bundled/v2/components/OrIconButton/OrIconButton.js +5 -5
  95. package/dist/bundled/v2/components/OrIconButtonV3/{OrIconButtonV3.js → index.js} +5 -5
  96. package/dist/bundled/v2/components/OrIconV3/{OrIconV3.js → index.js} +1 -1
  97. package/dist/bundled/v2/components/OrInlineInput/OrInlineInput.js +8 -8
  98. package/dist/bundled/v2/components/OrInlineInputBoxV3/{OrInlineInputBoxV3.js → index.js} +0 -0
  99. package/dist/bundled/v2/components/OrInlineInputV3/{OrInlineInputV3.js → index.js} +8 -8
  100. package/dist/bundled/v2/components/OrInlineTextEdit/OrInlineTextEdit.js +9 -9
  101. package/dist/bundled/v2/components/OrInlineTextEdit/index.js +22 -0
  102. package/dist/bundled/v2/components/OrInlineTextarea/OrInlineTextarea.js +12 -12
  103. package/dist/bundled/v2/components/OrInlineTextareaV3/{OrInlineTextareaV3.js → index.js} +7 -7
  104. package/dist/bundled/v2/components/OrInput/OrInput.js +3 -3
  105. package/dist/bundled/v2/components/OrInputBoxV3/{OrInputBoxV3.js → index.js} +0 -0
  106. package/dist/bundled/v2/components/OrInputV3/{OrInputV3.js → index.js} +9 -9
  107. package/dist/bundled/v2/components/OrInputs/{OrInputs.js → index.js} +8 -8
  108. package/dist/bundled/v2/components/OrLabel/OrLabel.js +3 -4
  109. package/dist/bundled/v2/components/OrLabel/index.js +5 -0
  110. package/dist/bundled/v2/components/OrLabelV3/{OrLabelV3.js → index.js} +1 -1
  111. package/dist/bundled/v2/components/OrLinkV3/{OrLinkV3.js → index.js} +0 -0
  112. package/dist/bundled/v2/components/OrList/OrList.js +2882 -17
  113. package/dist/bundled/v2/components/OrList/index.js +23 -0
  114. package/dist/bundled/v2/components/OrListOfInputs/OrListOfInputs.js +230 -17
  115. package/dist/bundled/v2/components/OrListOfInputs/index.js +27 -0
  116. package/dist/bundled/v2/components/OrLoader/OrLoader.js +3 -4
  117. package/dist/bundled/v2/components/OrLoader/index.js +5 -0
  118. package/dist/bundled/v2/components/OrLoaderV3/{OrLoaderV3.js → index.js} +1 -1
  119. package/dist/bundled/v2/components/OrMenu/OrMenu.js +2 -2
  120. package/dist/bundled/v2/components/OrMenuItem/OrMenuItem.js +2 -2
  121. package/dist/bundled/v2/components/OrMenuItemV3/{OrMenuItemV3.js → index.js} +1 -1
  122. package/dist/bundled/v2/components/OrMenuV3/{OrMenuV3.js → index.js} +2 -2
  123. package/dist/bundled/v2/components/OrModal/OrModal.js +13 -18
  124. package/dist/bundled/v2/components/OrModal/index.js +21 -0
  125. package/dist/bundled/v2/components/OrModalV3/index.js +16 -0
  126. package/dist/bundled/v2/components/OrNotification/OrNotification.js +14 -17
  127. package/dist/bundled/v2/components/OrNotification/index.js +19 -0
  128. package/dist/bundled/v2/components/OrNotificationV3/{OrNotificationV3.js → index.js} +6 -6
  129. package/dist/bundled/v2/components/OrNumberInput/OrNumberInput.js +2 -2
  130. package/dist/bundled/v2/components/OrOverflowMenu/OrOverflowMenu.js +162 -14
  131. package/dist/bundled/v2/components/OrOverflowMenu/index.js +22 -0
  132. package/dist/bundled/v2/components/OrOverflowMenuItem/OrOverflowMenuItem.js +4 -4
  133. package/dist/bundled/v2/components/OrOverlay/OrOverlay.js +88 -4
  134. package/dist/bundled/v2/components/OrOverlay/index.js +4 -0
  135. package/dist/bundled/v2/components/OrOverlayV3/{OrOverlayV3.js → index.js} +1 -1
  136. package/dist/bundled/v2/components/OrPassword/OrPassword.js +6 -6
  137. package/dist/bundled/v2/components/OrPopover/OrPopover.js +2 -2
  138. package/dist/bundled/v2/components/OrPopoverV3/{OrPopoverV3.js → index.js} +2 -2
  139. package/dist/bundled/v2/components/OrProgress/OrProgress.js +5 -3
  140. package/dist/bundled/v2/components/OrProgress/index.js +5 -0
  141. package/dist/bundled/v2/components/OrProgressV3/{OrProgressV3.js → index.js} +1 -1
  142. package/dist/bundled/v2/components/OrRadio/OrRadio.js +187 -5
  143. package/dist/bundled/v2/components/OrRadio/index.js +5 -0
  144. package/dist/bundled/v2/components/OrRadioGroup/OrRadioGroup.js +90 -4
  145. package/dist/bundled/v2/components/OrRadioGroup/index.js +4 -0
  146. package/dist/bundled/v2/components/OrRadioV3/{OrRadioV3.js → index.js} +2 -2
  147. package/dist/bundled/v2/components/OrSearch/OrSearch.js +9 -9
  148. package/dist/bundled/v2/components/OrSearchV3/{OrSearchV3.js → index.js} +9 -9
  149. package/dist/bundled/v2/components/OrSegmentedControlV3/{OrSegmentedControlV3.js → index.js} +0 -0
  150. package/dist/bundled/v2/components/OrSelect/OrSelect.js +523 -27
  151. package/dist/bundled/v2/components/OrSelect/index.js +29 -0
  152. package/dist/bundled/v2/components/OrSelectContent/OrSelectContent.js +5 -5
  153. package/dist/bundled/v2/components/OrSelectContentEmpty/OrSelectContentEmpty.js +1 -1
  154. package/dist/bundled/v2/components/OrSelectContentOptions/OrSelectContentOptions.js +5 -5
  155. package/dist/bundled/v2/components/OrSelectInput/OrSelectInput.js +4 -4
  156. package/dist/bundled/v2/components/OrSelectInputValue/OrSelectInputValue.js +4 -4
  157. package/dist/bundled/v2/components/OrSelectMain/OrSelectMain.js +6 -6
  158. package/dist/bundled/v2/components/OrSelectOption/OrSelectOption.js +4 -4
  159. package/dist/bundled/v2/components/OrSelectSearchOptions/OrSelectSearchOptions.js +4 -4
  160. package/dist/bundled/v2/components/OrSelectV3/{OrSelectV3.js → index.js} +13 -13
  161. package/dist/bundled/v2/components/OrSidebar/OrSidebar.js +2 -3
  162. package/dist/bundled/v2/components/OrSidebar/index.js +6 -0
  163. package/dist/bundled/v2/components/OrSidebarV3/{OrSidebarV3.js → index.js} +1 -1
  164. package/dist/bundled/v2/components/OrSkeleton/{OrSkeleton.js → index.js} +0 -0
  165. package/dist/bundled/v2/components/OrSkeletonV3/{OrSkeletonV3.js → index.js} +0 -0
  166. package/dist/bundled/v2/components/OrSlider/OrSlider.js +373 -8
  167. package/dist/bundled/v2/components/OrSlider/index.js +15 -0
  168. package/dist/bundled/v2/components/OrSortHeader/OrSortHeader.js +2 -2
  169. package/dist/bundled/v2/components/OrSortHeaderV3/{OrSortHeaderV3.js → index.js} +1 -1
  170. package/dist/bundled/v2/components/OrStepper/OrStepper.js +182 -10
  171. package/dist/bundled/v2/components/OrStepper/index.js +22 -0
  172. package/dist/bundled/v2/components/OrStepperButtonOptions/OrStepperButtonOptions.js +4 -4
  173. package/dist/bundled/v2/components/OrStepperOptionHorizontal/OrStepperOptionHorizontal.js +4 -4
  174. package/dist/bundled/v2/components/OrStepperOptionVertical/OrStepperOptionVertical.js +4 -4
  175. package/dist/bundled/v2/components/OrSwitch/OrSwitch.js +235 -6
  176. package/dist/bundled/v2/components/OrSwitch/index.js +6 -0
  177. package/dist/bundled/v2/components/OrSwitchV3/{OrSwitchV3.js → index.js} +3 -3
  178. package/dist/bundled/v2/components/OrTab/OrTab.js +96 -6
  179. package/dist/bundled/v2/components/OrTab/index.js +6 -0
  180. package/dist/bundled/v2/components/OrTabHeaderItem/OrTabHeaderItem.js +113 -5
  181. package/dist/bundled/v2/components/OrTabHeaderItem/index.js +5 -0
  182. package/dist/bundled/v2/components/OrTabV3/{OrTabV3.js → index.js} +1 -1
  183. package/dist/bundled/v2/components/OrTabs/OrTabs.js +16 -5
  184. package/dist/bundled/v2/components/OrTabs/index.js +6 -0
  185. package/dist/bundled/v2/components/OrTabsV3/{OrTabsV3.js → index.js} +5 -5
  186. package/dist/bundled/v2/components/OrTag/OrTag.js +14 -13
  187. package/dist/bundled/v2/components/OrTag/index.js +15 -0
  188. package/dist/bundled/v2/components/{OrModalV3/OrModalV3.js → OrTagV3/index.js} +10 -10
  189. package/dist/bundled/v2/components/OrTeleport/{OrTeleport.js → index.js} +0 -0
  190. package/dist/bundled/v2/components/OrTeleportV3/{OrTeleportV3.js → index.js} +0 -0
  191. package/dist/bundled/v2/components/OrTextV3/{OrTextV3.js → index.js} +0 -0
  192. package/dist/bundled/v2/components/OrTextarea/OrTextarea.js +8 -8
  193. package/dist/bundled/v2/components/OrTextareaV3/{OrTextareaV3.js → index.js} +3 -3
  194. package/dist/bundled/v2/components/OrTextbox/OrTextbox.js +9 -9
  195. package/dist/bundled/v2/components/OrTextbox/index.js +24 -0
  196. package/dist/bundled/v2/components/OrToast/OrToast.js +18 -2
  197. package/dist/bundled/v2/components/OrToast/index.js +3 -0
  198. package/dist/bundled/v2/components/OrToastContainer/OrToastContainer.js +217 -14
  199. package/dist/bundled/v2/components/OrToastV3/index.js +5 -0
  200. package/dist/bundled/v2/components/OrTooltip/OrTooltip.js +172 -11
  201. package/dist/bundled/v2/components/OrTooltip/index.js +12 -0
  202. package/dist/bundled/v2/components/OrTooltipV3/{OrTooltipV3.js → index.js} +3 -3
  203. package/dist/bundled/v2/components/OrTooltipWrapper/OrTooltipWrapper.js +3 -3
  204. package/dist/bundled/v2/components/index.js +75 -73
  205. package/dist/bundled/v2/{constants-59507e57.js → constants-0e039de8.js} +1 -1
  206. package/dist/bundled/{v3/dom-28f5f62a.js → v2/dom-ba0fb2e2.js} +1 -1
  207. package/dist/bundled/v2/index.js +72 -70
  208. package/dist/bundled/v2/props-fb3f60a5.js +32 -0
  209. package/dist/bundled/v2/{types-b7118a06.js → types-b6999357.js} +2 -2
  210. package/dist/bundled/{v3/useToast-b522f851.js → v2/useToast-40bff6ec.js} +2 -1
  211. package/dist/bundled/{v3/useQueue-419a3ead.js → v2/useToast-4fbe0e5a.js} +75 -75
  212. package/dist/bundled/{v3/props-32824e11.js → v2/useToastEventBus-422dae05.js} +1 -32
  213. package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-517f9fef.js → OrAvatar.vue_vue_type_script_lang-4fbb7259.js} +1 -1
  214. package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-4d261a20.js → OrAvatar.vue_vue_type_script_lang-d1400693.js} +2 -2
  215. package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-617c4db0.js → OrBottomSheet.vue_vue_type_script_lang-09679ad9.js} +1 -19
  216. package/dist/bundled/v3/{OrButton-16bf9726.js → OrButton-a1b966c0.js} +1 -1
  217. package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-6f318998.js → OrButton.vue_vue_type_script_lang-9355421f.js} +3 -3
  218. package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-38b2c64f.js → OrButton.vue_vue_type_script_lang-e8c1cece.js} +2 -2
  219. package/dist/bundled/v3/OrCard.vue_vue_type_script_lang-81561dd8.js +21 -0
  220. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-18d1b20b.js → OrCardCollection.vue_vue_type_script_lang-141d29ac.js} +5 -16
  221. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-7c3af3d8.js → OrCardCollection.vue_vue_type_script_lang-98a0556f.js} +34 -17
  222. package/dist/bundled/v3/{OrCarousel.vue_vue_type_script_lang-6aab3568.js → OrCarousel.vue_vue_type_script_lang-9a0994ce.js} +2 -2
  223. package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-c6f7e157.js → OrCheckbox.vue_vue_type_script_lang-45641503.js} +1 -1
  224. package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-fe29a08d.js → OrCheckbox.vue_vue_type_script_lang-d11f0d34.js} +2 -2
  225. package/dist/bundled/v3/{OrChips.vue_vue_type_script_lang-04aa1d8f.js → OrChips.vue_vue_type_script_lang-2b237b38.js} +2 -2
  226. package/dist/bundled/v3/{OrChipsInput-1d6d9662.js → OrChipsInput-9a30cf50.js} +0 -0
  227. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-50d9445b.js → OrCode.vue_vue_type_script_lang-e6a90141.js} +5 -5
  228. package/dist/bundled/v3/{OrCollapse.vue_vue_type_script_lang-76f0f586.js → OrCollapse.vue_vue_type_script_lang-0dfd5dea.js} +1 -1
  229. package/dist/bundled/v3/{OrColorPicker.vue_vue_type_script_lang-dac2e6f1.js → OrColorPicker.vue_vue_type_script_lang-e855c8e1.js} +2 -2
  230. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-7bfd1c8c.js → OrConfirm.vue_vue_type_script_lang-41e9c687.js} +8 -39
  231. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-748d7086.js → OrConfirm.vue_vue_type_script_lang-49ae70d3.js} +4 -4
  232. package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-d5956d1f.js → OrDateTimePicker.vue_vue_type_script_lang-6fa60fa4.js} +7 -7
  233. package/dist/bundled/v3/{OrErrorTag.vue_vue_type_script_lang-0ff91197.js → OrErrorTag.vue_vue_type_script_lang-e0023f89.js} +1 -1
  234. package/dist/bundled/v3/{OrExpansionPanel.vue_vue_type_script_lang-27a1e36c.js → OrExpansionPanel.vue_vue_type_script_lang-d1f8ac93.js} +1 -1
  235. package/dist/bundled/v3/{OrFab.vue_vue_type_script_lang-54ee50b8.js → OrFab.vue_vue_type_script_lang-0ddad598.js} +1 -1
  236. package/dist/bundled/v3/{OrFloating.vue_vue_type_script_lang-91fd6681.js → OrFloating.vue_vue_type_script_lang-21499d17.js} +1 -1
  237. package/dist/bundled/v3/{OrIcon-795f3692.js → OrIcon-6f6eb367.js} +1 -1
  238. package/dist/bundled/v3/{OrIcon.vue_vue_type_script_lang-0741508f.js → OrIcon.vue_vue_type_script_lang-3c949339.js} +2 -2
  239. package/dist/bundled/v3/{OrIconButton-6b9a97b8.js → OrIconButton-54994f76.js} +1 -1
  240. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-6e9526c8.js → OrIconButton.vue_vue_type_script_lang-7c25ed7b.js} +6 -33
  241. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-af1d38ab.js → OrIconButton.vue_vue_type_script_lang-ef6a0fbf.js} +3 -3
  242. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-092bf5a3.js → OrInlineInput.vue_vue_type_script_lang-eb63f759.js} +5 -4
  243. package/dist/bundled/v3/{OrInlineTextEdit.vue_vue_type_script_lang-f7f56e09.js → OrInlineTextEdit.vue_vue_type_script_lang-2f7580e9.js} +5 -5
  244. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-40d5b53e.js → OrInlineTextarea.vue_vue_type_script_lang-b18633e1.js} +3 -2
  245. package/dist/bundled/v3/{OrInput-0ecf4e93.js → OrInput-0540584e.js} +1 -1
  246. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-298d2fd7.js → OrInput.vue_vue_type_script_lang-2dfa8684.js} +7 -6
  247. package/dist/bundled/{v2/OrList-81212624.js → v3/OrList.vue_vue_type_script_lang-6068dc91.js} +16 -134
  248. package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-018a7c1a.js → OrListOfInputs.vue_vue_type_script_lang-ac489de9.js} +6 -5
  249. package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-c684c012.js → OrMenu.vue_vue_type_script_lang-46ecf85f.js} +1 -1
  250. package/dist/bundled/v3/{OrMenuItem.vue_vue_type_script_lang-8c3fa960.js → OrMenuItem.vue_vue_type_script_lang-eb21950f.js} +1 -1
  251. package/dist/bundled/v3/{OrModal-fa865c02.js → OrModal-1e176a11.js} +1 -1
  252. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-9b5a1001.js → OrModal.vue_vue_type_script_lang-67de248c.js} +2 -2
  253. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-c3a88659.js → OrModal.vue_vue_type_script_lang-bd9984fa.js} +2 -2
  254. package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-f5614cd5.js → OrNotification.vue_vue_type_script_lang-3ab2d11d.js} +4 -4
  255. package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-8a32908e.js → OrNotification.vue_vue_type_script_lang-a676b8d5.js} +2 -2
  256. package/dist/bundled/v3/{OrNumberInput.vue_vue_type_script_lang-8cf6b4d2.js → OrNumberInput.vue_vue_type_script_lang-10f2b9a6.js} +0 -0
  257. package/dist/bundled/v3/{OrOverflowMenu.vue_vue_type_script_lang-9e134427.js → OrOverflowMenu.vue_vue_type_script_lang-f9f091b5.js} +4 -4
  258. package/dist/bundled/v3/{OrPassword.vue_vue_type_script_lang-1fe1eace.js → OrPassword.vue_vue_type_script_lang-4be4a210.js} +2 -2
  259. package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-cd97e358.js → OrPopover.vue_vue_type_script_lang-ef43169d.js} +1 -1
  260. package/dist/bundled/v3/OrProgress.vue_vue_type_script_lang-6105a07e.js +146 -0
  261. package/dist/bundled/v3/{OrRadio.vue_vue_type_script_lang-51b41c09.js → OrRadio.vue_vue_type_script_lang-0fa15ff0.js} +1 -1
  262. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-1e6881d7.js → OrSearch.vue_vue_type_script_lang-79213131.js} +2 -2
  263. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-eabc313c.js → OrSearch.vue_vue_type_script_lang-cb2c1fd1.js} +2 -2
  264. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-45342312.js → OrSelect.vue_vue_type_script_lang-07d984d8.js} +1 -1
  265. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-abbdb22c.js → OrSelect.vue_vue_type_script_lang-b28438b6.js} +28 -90
  266. package/dist/bundled/v3/{OrSlider.vue_vue_type_script_lang-e4118c3c.js → OrSlider.vue_vue_type_script_lang-29aa72fc.js} +3 -3
  267. package/dist/bundled/v3/{OrSortHeader.vue_vue_type_script_lang-30b9b0d3.js → OrSortHeader.vue_vue_type_script_lang-60cacb5e.js} +1 -1
  268. package/dist/bundled/v3/{OrStepper.vue_vue_type_script_lang-a533d32c.js → OrStepper.vue_vue_type_script_lang-0f15b9f1.js} +0 -0
  269. package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-038412d6.js → OrSwitch.vue_vue_type_script_lang-8324e7aa.js} +2 -2
  270. package/dist/bundled/v3/OrTabHeaderItem.vue_vue_type_script_lang-0a67721f.js +63 -0
  271. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-6d5a4fcc.js → OrTabs.vue_vue_type_script_lang-06a89286.js} +2 -1
  272. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-0e82017b.js → OrTabs.vue_vue_type_script_lang-af79a4fc.js} +10 -27
  273. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-3821aad7.js → OrTag.vue_vue_type_script_lang-24e4ef85.js} +1 -1
  274. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-e6763cdf.js → OrTag.vue_vue_type_script_lang-688bd067.js} +3 -3
  275. package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-f18d87ca.js → OrTextarea.vue_vue_type_script_lang-53696813.js} +3 -2
  276. package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-18dda576.js → OrTextarea.vue_vue_type_script_lang-866fc139.js} +3 -3
  277. package/dist/bundled/v3/{OrTextbox.vue_vue_type_script_lang-93700767.js → OrTextbox.vue_vue_type_script_lang-9836d533.js} +5 -5
  278. package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-4011aa6b.js → OrToast-086db518.js} +12 -151
  279. package/dist/bundled/v3/OrToastContainer.vue_vue_type_script_lang-d5df88b8.js +145 -0
  280. package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-02f42270.js → OrTooltip.vue_vue_type_script_lang-8f654b1b.js} +2 -2
  281. package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-4f233746.js → OrTooltip.vue_vue_type_script_lang-f5885526.js} +1 -1
  282. package/dist/bundled/{v2/color-b3d00690.js → v3/color-1f348774.js} +1 -1
  283. package/dist/bundled/v3/components/OrAvatar/OrAvatar.js +14 -33
  284. package/dist/bundled/v3/components/OrAvatar/index.js +15 -0
  285. package/dist/bundled/v3/components/OrAvatarV3/{OrAvatarV3.js → index.js} +2 -2
  286. package/dist/bundled/v3/components/OrBottomSheet/OrBottomSheet.js +3 -2
  287. package/dist/bundled/v3/components/OrBottomSheetV3/{OrBottomSheetV3.js → index.js} +2 -1
  288. package/dist/bundled/v3/components/OrButton/OrButton.js +27 -36
  289. package/dist/bundled/v3/components/OrButton/index.js +7 -0
  290. package/dist/bundled/v3/components/OrButtonV2/{OrButtonV2.js → index.js} +8 -8
  291. package/dist/bundled/v3/components/OrButtonV3/{OrButtonV3.js → index.js} +2 -2
  292. package/dist/bundled/v3/components/OrCard/OrCard.js +15 -3
  293. package/dist/bundled/v3/components/OrCard/index.js +2 -0
  294. package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.js +93 -108
  295. package/dist/bundled/v3/components/OrCardCollection/index.js +34 -0
  296. package/dist/bundled/v3/components/OrCardCollectionV3/{OrCardCollectionV3.js → index.js} +15 -11
  297. package/dist/bundled/v3/components/OrCardV3/{OrCardV3.js → index.js} +0 -0
  298. package/dist/bundled/v3/components/OrCarousel/OrCarousel.js +7 -9
  299. package/dist/bundled/v3/components/OrCarousel/index.js +18 -0
  300. package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.js +45 -14
  301. package/dist/bundled/v3/components/OrCheckbox/index.js +15 -0
  302. package/dist/bundled/v3/components/OrCheckboxV3/{OrCheckboxV3.js → index.js} +2 -2
  303. package/dist/bundled/v3/components/OrChip/OrChip.js +5 -5
  304. package/dist/bundled/v3/components/OrChips/OrChips.js +13 -13
  305. package/dist/bundled/v3/components/OrChips/index.js +21 -0
  306. package/dist/bundled/v3/components/OrChipsInput/OrChipsInput.js +6 -6
  307. package/dist/bundled/v3/components/OrCode/OrCode.js +12 -12
  308. package/dist/bundled/v3/components/OrCode/index.js +32 -0
  309. package/dist/bundled/v3/components/OrCollapse/OrCollapse.js +37 -2
  310. package/dist/bundled/v3/components/OrCollapse/index.js +5 -0
  311. package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.js +5 -5
  312. package/dist/bundled/v3/components/OrColorPicker/index.js +12 -0
  313. package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +85 -77
  314. package/dist/bundled/v3/components/OrConfirm/index.js +38 -0
  315. package/dist/bundled/v3/components/OrConfirmV3/{OrConfirmV3.js → index.js} +16 -12
  316. package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.js +13 -13
  317. package/dist/bundled/v3/components/OrDateTimePicker/index.js +32 -0
  318. package/dist/bundled/v3/components/OrError/OrError.js +21 -1
  319. package/dist/bundled/v3/components/OrError/index.js +2 -0
  320. package/dist/bundled/v3/components/OrErrorTag/OrErrorTag.js +3 -3
  321. package/dist/bundled/v3/components/OrErrorTagV3/{OrErrorTagV3.js → index.js} +2 -2
  322. package/dist/bundled/v3/components/OrErrorV3/{OrErrorV3.js → index.js} +0 -0
  323. package/dist/bundled/v3/components/OrExpansionPanel/OrExpansionPanel.js +3 -3
  324. package/dist/bundled/v3/components/OrExpansionPanelV3/{OrExpansionPanelV3.js → index.js} +2 -2
  325. package/dist/bundled/v3/components/OrFab/OrFab.js +3 -3
  326. package/dist/bundled/v3/components/OrFabV3/{OrFabV3.js → index.js} +2 -2
  327. package/dist/bundled/v3/components/OrFloating/OrFloating.js +25 -3
  328. package/dist/bundled/v3/components/OrFloating/index.js +8 -0
  329. package/dist/bundled/v3/components/OrHint/OrHint.js +21 -2
  330. package/dist/bundled/v3/components/OrHint/index.js +3 -0
  331. package/dist/bundled/v3/components/OrHintV3/{OrHintV3.js → index.js} +0 -0
  332. package/dist/bundled/v3/components/OrIcon/OrIcon.js +15 -12
  333. package/dist/bundled/v3/components/OrIcon/index.js +13 -0
  334. package/dist/bundled/v3/components/OrIconButton/OrIconButton.js +8 -6
  335. package/dist/bundled/v3/components/OrIconButtonV3/{OrIconButtonV3.js → index.js} +7 -5
  336. package/dist/bundled/v3/components/OrIconV3/{OrIconV3.js → index.js} +0 -0
  337. package/dist/bundled/v3/components/OrInlineInput/OrInlineInput.js +11 -8
  338. package/dist/bundled/v3/components/OrInlineInputBoxV3/{OrInlineInputBoxV3.js → index.js} +0 -0
  339. package/dist/bundled/v3/components/OrInlineInputV3/{OrInlineInputV3.js → index.js} +10 -7
  340. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +12 -12
  341. package/dist/bundled/v3/components/OrInlineTextEdit/index.js +27 -0
  342. package/dist/bundled/v3/components/OrInlineTextarea/OrInlineTextarea.js +11 -8
  343. package/dist/bundled/v3/components/OrInlineTextareaV3/{OrInlineTextareaV3.js → index.js} +10 -7
  344. package/dist/bundled/v3/components/OrInput/OrInput.js +5 -5
  345. package/dist/bundled/v3/components/OrInputBoxV3/{OrInputBoxV3.js → index.js} +0 -0
  346. package/dist/bundled/v3/components/OrInputV3/{OrInputV3.js → index.js} +11 -8
  347. package/dist/bundled/v3/components/OrInputs/{OrInputs.js → index.js} +14 -14
  348. package/dist/bundled/v3/components/OrLabel/OrLabel.js +25 -2
  349. package/dist/bundled/v3/components/OrLabel/index.js +3 -0
  350. package/dist/bundled/v3/components/OrLabelV3/{OrLabelV3.js → index.js} +0 -0
  351. package/dist/bundled/v3/components/OrLinkV3/{OrLinkV3.js → index.js} +0 -0
  352. package/dist/bundled/v3/components/OrList/OrList.js +94 -13
  353. package/dist/bundled/v3/components/OrList/index.js +29 -0
  354. package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.js +16 -15
  355. package/dist/bundled/v3/components/OrListOfInputs/index.js +36 -0
  356. package/dist/bundled/v3/components/OrLoader/OrLoader.js +58 -2
  357. package/dist/bundled/v3/components/OrLoader/index.js +3 -0
  358. package/dist/bundled/v3/components/OrLoaderV3/{OrLoaderV3.js → index.js} +0 -0
  359. package/dist/bundled/v3/components/OrMenu/OrMenu.js +5 -4
  360. package/dist/bundled/v3/components/OrMenuItem/OrMenuItem.js +3 -3
  361. package/dist/bundled/v3/components/OrMenuItemV3/{OrMenuItemV3.js → index.js} +2 -2
  362. package/dist/bundled/v3/components/OrMenuV3/{OrMenuV3.js → index.js} +4 -3
  363. package/dist/bundled/v3/components/OrModal/OrModal.js +56 -21
  364. package/dist/bundled/v3/components/OrModal/index.js +24 -0
  365. package/dist/bundled/v3/components/OrModalV3/{OrModalV3.js → index.js} +9 -7
  366. package/dist/bundled/v3/components/OrNotification/OrNotification.js +40 -46
  367. package/dist/bundled/v3/components/OrNotification/index.js +22 -0
  368. package/dist/bundled/v3/components/OrNotificationV3/{OrNotificationV3.js → index.js} +8 -6
  369. package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.js +5 -5
  370. package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.js +12 -12
  371. package/dist/bundled/v3/components/OrOverflowMenu/index.js +26 -0
  372. package/dist/bundled/v3/components/OrOverflowMenuItem/OrOverflowMenuItem.js +7 -7
  373. package/dist/bundled/v3/components/OrOverlay/OrOverlay.js +26 -1
  374. package/dist/bundled/v3/components/OrOverlay/index.js +2 -0
  375. package/dist/bundled/v3/components/OrOverlayV3/{OrOverlayV3.js → index.js} +0 -0
  376. package/dist/bundled/v3/components/OrPassword/OrPassword.js +12 -12
  377. package/dist/bundled/v3/components/OrPopover/OrPopover.js +4 -3
  378. package/dist/bundled/v3/components/OrPopoverV3/{OrPopoverV3.js → index.js} +3 -2
  379. package/dist/bundled/v3/components/OrProgress/OrProgress.js +81 -3
  380. package/dist/bundled/v3/components/OrProgress/index.js +3 -0
  381. package/dist/bundled/v3/components/OrProgressV3/{OrProgressV3.js → index.js} +0 -0
  382. package/dist/bundled/v3/components/OrRadio/OrRadio.js +35 -24
  383. package/dist/bundled/v3/components/OrRadio/index.js +3 -0
  384. package/dist/bundled/v3/components/OrRadioGroup/OrRadioGroup.js +1 -1
  385. package/dist/bundled/v3/components/OrRadioGroup/index.js +2 -0
  386. package/dist/bundled/v3/components/OrRadioV3/{OrRadioV3.js → index.js} +2 -2
  387. package/dist/bundled/v3/components/OrSearch/OrSearch.js +14 -11
  388. package/dist/bundled/v3/components/OrSearchV3/{OrSearchV3.js → index.js} +13 -10
  389. package/dist/bundled/v3/components/OrSegmentedControlV3/{OrSegmentedControlV3.js → index.js} +0 -0
  390. package/dist/bundled/v3/components/OrSelect/OrSelect.js +235 -73
  391. package/dist/bundled/v3/components/OrSelect/index.js +33 -0
  392. package/dist/bundled/v3/components/OrSelectContent/OrSelectContent.js +7 -7
  393. package/dist/bundled/v3/components/OrSelectContentEmpty/OrSelectContentEmpty.js +1 -1
  394. package/dist/bundled/v3/components/OrSelectContentOptions/OrSelectContentOptions.js +7 -7
  395. package/dist/bundled/v3/components/OrSelectInput/OrSelectInput.js +6 -6
  396. package/dist/bundled/v3/components/OrSelectInputValue/OrSelectInputValue.js +6 -6
  397. package/dist/bundled/v3/components/OrSelectMain/OrSelectMain.js +7 -7
  398. package/dist/bundled/v3/components/OrSelectOption/OrSelectOption.js +6 -6
  399. package/dist/bundled/v3/components/OrSelectSearchOptions/OrSelectSearchOptions.js +6 -6
  400. package/dist/bundled/v3/components/OrSelectV3/{OrSelectV3.js → index.js} +20 -15
  401. package/dist/bundled/v3/components/OrSidebar/OrSidebar.js +18 -28
  402. package/dist/bundled/v3/components/OrSidebar/index.js +4 -0
  403. package/dist/bundled/v3/components/OrSidebarV3/{OrSidebarV3.js → index.js} +0 -0
  404. package/dist/bundled/v3/components/OrSkeleton/{OrSkeleton.js → index.js} +0 -0
  405. package/dist/bundled/v3/components/OrSkeletonV3/{OrSkeletonV3.js → index.js} +0 -0
  406. package/dist/bundled/v3/components/OrSlider/OrSlider.js +7 -7
  407. package/dist/bundled/v3/components/OrSlider/index.js +16 -0
  408. package/dist/bundled/v3/components/OrSortHeader/OrSortHeader.js +3 -3
  409. package/dist/bundled/v3/components/OrSortHeaderV3/{OrSortHeaderV3.js → index.js} +2 -2
  410. package/dist/bundled/v3/components/OrStepper/OrStepper.js +9 -9
  411. package/dist/bundled/v3/components/OrStepper/index.js +25 -0
  412. package/dist/bundled/v3/components/OrStepperButtonOptions/OrStepperButtonOptions.js +7 -7
  413. package/dist/bundled/v3/components/OrStepperOptionHorizontal/OrStepperOptionHorizontal.js +7 -7
  414. package/dist/bundled/v3/components/OrStepperOptionVertical/OrStepperOptionVertical.js +7 -7
  415. package/dist/bundled/v3/components/OrSwitch/OrSwitch.js +48 -40
  416. package/dist/bundled/v3/components/OrSwitch/index.js +7 -0
  417. package/dist/bundled/v3/components/OrSwitchV3/{OrSwitchV3.js → index.js} +3 -3
  418. package/dist/bundled/v3/components/OrTab/OrTab.js +16 -16
  419. package/dist/bundled/v3/components/OrTab/index.js +4 -0
  420. package/dist/bundled/v3/components/OrTabHeaderItem/OrTabHeaderItem.js +25 -3
  421. package/dist/bundled/v3/components/OrTabHeaderItem/index.js +3 -0
  422. package/dist/bundled/v3/components/OrTabV3/{OrTabV3.js → index.js} +0 -0
  423. package/dist/bundled/v3/components/OrTabs/OrTabs.js +74 -40
  424. package/dist/bundled/v3/components/OrTabs/index.js +7 -0
  425. package/dist/bundled/v3/components/OrTabsV3/{OrTabsV3.js → index.js} +8 -6
  426. package/dist/bundled/v3/components/OrTag/OrTag.js +40 -36
  427. package/dist/bundled/v3/components/OrTag/index.js +16 -0
  428. package/dist/bundled/v3/components/OrTagV3/{OrTagV3.js → index.js} +8 -6
  429. package/dist/bundled/v3/components/OrTeleport/{OrTeleport.js → index.js} +0 -0
  430. package/dist/bundled/v3/components/OrTeleportV3/{OrTeleportV3.js → index.js} +0 -0
  431. package/dist/bundled/v3/components/OrTextV3/{OrTextV3.js → index.js} +0 -0
  432. package/dist/bundled/v3/components/OrTextarea/OrTextarea.js +5 -4
  433. package/dist/bundled/v3/components/OrTextareaV3/{OrTextareaV3.js → index.js} +4 -3
  434. package/dist/bundled/v3/components/OrTextbox/OrTextbox.js +12 -12
  435. package/dist/bundled/v3/components/OrTextbox/index.js +31 -0
  436. package/dist/bundled/v3/components/OrToast/OrToast.js +25 -2
  437. package/dist/bundled/v3/components/OrToast/index.js +3 -0
  438. package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.js +13 -9
  439. package/dist/bundled/v3/components/OrToastV3/index.js +5 -0
  440. package/dist/bundled/v3/components/OrTooltip/OrTooltip.js +42 -10
  441. package/dist/bundled/v3/components/OrTooltip/index.js +12 -0
  442. package/dist/bundled/v3/components/OrTooltipV3/{OrTooltipV3.js → index.js} +4 -3
  443. package/dist/bundled/v3/components/OrTooltipWrapper/OrTooltipWrapper.js +4 -4
  444. package/dist/bundled/v3/components/index.js +96 -84
  445. package/dist/bundled/v3/{constants-59507e57.js → constants-0e039de8.js} +1 -1
  446. package/dist/bundled/{v2/dom-28f5f62a.js → v3/dom-ba0fb2e2.js} +1 -1
  447. package/dist/bundled/v3/index.js +582 -748
  448. package/dist/bundled/v3/props-fb3f60a5.js +32 -0
  449. package/dist/bundled/v3/{types-1be1650b.js → types-b803a88a.js} +64 -5
  450. package/dist/bundled/{v2/useToast-b522f851.js → v3/useToast-40bff6ec.js} +2 -1
  451. package/dist/bundled/{v2/useQueue-419a3ead.js → v3/useToast-4fbe0e5a.js} +75 -75
  452. package/dist/bundled/{v2/props-32824e11.js → v3/useToastEventBus-422dae05.js} +1 -32
  453. package/package.json +2 -2
  454. package/dist/bundled/v2/OrCard-5e7e07d1.js +0 -69
  455. package/dist/bundled/v2/OrCarousel-717a0cdb.js +0 -2885
  456. package/dist/bundled/v2/OrCheckbox-a8826ecb.js +0 -208
  457. package/dist/bundled/v2/OrChips-03df425b.js +0 -180
  458. package/dist/bundled/v2/OrCollapse-234ecb13.js +0 -172
  459. package/dist/bundled/v2/OrDateTimePicker-901d249e.js +0 -646
  460. package/dist/bundled/v2/OrError-69657c22.js +0 -94
  461. package/dist/bundled/v2/OrHint-6ef683ff.js +0 -94
  462. package/dist/bundled/v2/OrListOfInputs-b9652d18.js +0 -223
  463. package/dist/bundled/v2/OrOverflowMenu-b79183c2.js +0 -157
  464. package/dist/bundled/v2/OrOverlay-491be882.js +0 -88
  465. package/dist/bundled/v2/OrRadio-442c0d43.js +0 -188
  466. package/dist/bundled/v2/OrRadioGroup-5a9bd679.js +0 -91
  467. package/dist/bundled/v2/OrSelect-adfdec03.js +0 -515
  468. package/dist/bundled/v2/OrSlider-b0afe7f3.js +0 -373
  469. package/dist/bundled/v2/OrStepper-1b86595d.js +0 -179
  470. package/dist/bundled/v2/OrSwitch-9e78f504.js +0 -236
  471. package/dist/bundled/v2/OrTab-584f4aa9.js +0 -97
  472. package/dist/bundled/v2/OrTabHeaderItem-a187e5ce.js +0 -114
  473. package/dist/bundled/v2/OrTooltip-85f35367.js +0 -167
  474. package/dist/bundled/v2/components/OrButtonV3/OrButtonV3.js +0 -5
  475. package/dist/bundled/v2/components/OrTagV3/OrTagV3.js +0 -16
  476. package/dist/bundled/v2/components/OrToastV3/OrToastV3.js +0 -4
  477. package/dist/bundled/v3/OrCard-e3a5aea4.js +0 -40
  478. package/dist/bundled/v3/OrCollapse-ce8c6285.js +0 -35
  479. package/dist/bundled/v3/OrFloating-a556f2f3.js +0 -23
  480. package/dist/bundled/v3/OrHint-fef6ebb1.js +0 -37
  481. package/dist/bundled/v3/OrIcon-81c249f7.js +0 -13
  482. package/dist/bundled/v3/OrLabel-bd9faa53.js +0 -23
  483. package/dist/bundled/v3/OrList-1fba9a02.js +0 -2841
  484. package/dist/bundled/v3/OrLoader-87f8250e.js +0 -56
  485. package/dist/bundled/v3/OrProgress-d0d52c86.js +0 -207
  486. package/dist/bundled/v3/OrTabHeaderItem-d668cc59.js +0 -86
  487. package/dist/bundled/v3/components/OrToastV3/OrToastV3.js +0 -4
@@ -1,23 +1,2888 @@
1
- export { O as OrList } from '../../OrList-81212624.js';
2
- import 'vue-demi';
3
- import 'lodash';
4
- import '../../v4-cf8987a3.js';
5
- import '../../OrError-9c32e442.js';
6
- import '../../normalize-component-6e8e3d80.js';
7
- import '../../browser-82dea9ed.js';
8
- import '../../OrLabel-0574b639.js';
9
- import '../../OrButton-63084188.js';
1
+ import { defineComponent } from 'vue-demi';
2
+ import _ from 'lodash';
3
+ import { v as v4 } from '../../v4-cf8987a3.js';
4
+ import { O as OrError } from '../../OrError-9c32e442.js';
5
+ import { O as OrLabel } from '../../OrLabel-0574b639.js';
6
+ import { O as OrButton } from '../../OrButton-a036fc0c.js';
7
+ import { O as OrIconButton } from '../../OrIconButton-05c25d9d.js';
8
+ import { O as OrIcon } from '../../OrIcon-b54b605a.js';
9
+ import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
10
+ import { c as createInjector } from '../../browser-82dea9ed.js';
10
11
  import '../../constants-6678dfb5.js';
11
- import '../../OrIcon-db65d58a.js';
12
- import '../../px-to-rem-0b26b83e.js';
12
+ import '../../OrLoader-16a453c4.js';
13
+ import '../OrTooltipWrapper/OrTooltipWrapper.js';
14
+ import '../../OrTooltip-cf20df81.js';
13
15
  import '../OrTooltipContent/OrTooltipContent.js';
14
- import '../../OrFloating-fa6e950f.js';
16
+ import '../../OrFloating-55665d61.js';
15
17
  import '../../floating-ui.dom.esm-83eba816.js';
16
18
  import '../OrTeleportVue2/OrTeleportVue2.js';
17
19
  import 'portal-vue/dist/portal-vue.esm.js';
18
20
  import '../../constants-b4c183aa.js';
19
- import '../../dom-28f5f62a.js';
20
- import '../../OrLoader-16a453c4.js';
21
- import '../../OrIconButton-84ac04f9.js';
22
- import '../OrTooltipWrapper/OrTooltipWrapper.js';
23
- import '../../OrTooltip-7dc5d239.js';
21
+ import '../../dom-ba0fb2e2.js';
22
+ import '../../px-to-rem-0b26b83e.js';
23
+
24
+ /**!
25
+ * Sortable 1.14.0
26
+ * @author RubaXa <trash@rubaxa.org>
27
+ * @author owenm <owen23355@gmail.com>
28
+ * @license MIT
29
+ */
30
+ function ownKeys(object, enumerableOnly) {
31
+ var keys = Object.keys(object);
32
+ if (Object.getOwnPropertySymbols) {
33
+ var symbols = Object.getOwnPropertySymbols(object);
34
+ if (enumerableOnly) {
35
+ symbols = symbols.filter(function (sym) {
36
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
37
+ });
38
+ }
39
+ keys.push.apply(keys, symbols);
40
+ }
41
+ return keys;
42
+ }
43
+ function _objectSpread2(target) {
44
+ for (var i = 1; i < arguments.length; i++) {
45
+ var source = arguments[i] != null ? arguments[i] : {};
46
+ if (i % 2) {
47
+ ownKeys(Object(source), true).forEach(function (key) {
48
+ _defineProperty(target, key, source[key]);
49
+ });
50
+ } else if (Object.getOwnPropertyDescriptors) {
51
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
52
+ } else {
53
+ ownKeys(Object(source)).forEach(function (key) {
54
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
55
+ });
56
+ }
57
+ }
58
+ return target;
59
+ }
60
+ function _typeof(obj) {
61
+ "@babel/helpers - typeof";
62
+
63
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
64
+ _typeof = function (obj) {
65
+ return typeof obj;
66
+ };
67
+ } else {
68
+ _typeof = function (obj) {
69
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
70
+ };
71
+ }
72
+ return _typeof(obj);
73
+ }
74
+ function _defineProperty(obj, key, value) {
75
+ if (key in obj) {
76
+ Object.defineProperty(obj, key, {
77
+ value: value,
78
+ enumerable: true,
79
+ configurable: true,
80
+ writable: true
81
+ });
82
+ } else {
83
+ obj[key] = value;
84
+ }
85
+ return obj;
86
+ }
87
+ function _extends() {
88
+ _extends = Object.assign || function (target) {
89
+ for (var i = 1; i < arguments.length; i++) {
90
+ var source = arguments[i];
91
+ for (var key in source) {
92
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
93
+ target[key] = source[key];
94
+ }
95
+ }
96
+ }
97
+ return target;
98
+ };
99
+ return _extends.apply(this, arguments);
100
+ }
101
+ function _objectWithoutPropertiesLoose(source, excluded) {
102
+ if (source == null) return {};
103
+ var target = {};
104
+ var sourceKeys = Object.keys(source);
105
+ var key, i;
106
+ for (i = 0; i < sourceKeys.length; i++) {
107
+ key = sourceKeys[i];
108
+ if (excluded.indexOf(key) >= 0) continue;
109
+ target[key] = source[key];
110
+ }
111
+ return target;
112
+ }
113
+ function _objectWithoutProperties(source, excluded) {
114
+ if (source == null) return {};
115
+ var target = _objectWithoutPropertiesLoose(source, excluded);
116
+ var key, i;
117
+ if (Object.getOwnPropertySymbols) {
118
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
119
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
120
+ key = sourceSymbolKeys[i];
121
+ if (excluded.indexOf(key) >= 0) continue;
122
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
123
+ target[key] = source[key];
124
+ }
125
+ }
126
+ return target;
127
+ }
128
+ var version = "1.14.0";
129
+ function userAgent(pattern) {
130
+ if (typeof window !== 'undefined' && window.navigator) {
131
+ return !! /*@__PURE__*/navigator.userAgent.match(pattern);
132
+ }
133
+ }
134
+ var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
135
+ var Edge = userAgent(/Edge/i);
136
+ var FireFox = userAgent(/firefox/i);
137
+ var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
138
+ var IOS = userAgent(/iP(ad|od|hone)/i);
139
+ var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
140
+ var captureMode = {
141
+ capture: false,
142
+ passive: false
143
+ };
144
+ function on(el, event, fn) {
145
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
146
+ }
147
+ function off(el, event, fn) {
148
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
149
+ }
150
+ function matches( /**HTMLElement*/
151
+ el, /**String*/
152
+ selector) {
153
+ if (!selector) return;
154
+ selector[0] === '>' && (selector = selector.substring(1));
155
+ if (el) {
156
+ try {
157
+ if (el.matches) {
158
+ return el.matches(selector);
159
+ } else if (el.msMatchesSelector) {
160
+ return el.msMatchesSelector(selector);
161
+ } else if (el.webkitMatchesSelector) {
162
+ return el.webkitMatchesSelector(selector);
163
+ }
164
+ } catch (_) {
165
+ return false;
166
+ }
167
+ }
168
+ return false;
169
+ }
170
+ function getParentOrHost(el) {
171
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
172
+ }
173
+ function closest( /**HTMLElement*/
174
+ el, /**String*/
175
+ selector, /**HTMLElement*/
176
+ ctx, includeCTX) {
177
+ if (el) {
178
+ ctx = ctx || document;
179
+ do {
180
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
181
+ return el;
182
+ }
183
+ if (el === ctx) break;
184
+ /* jshint boss:true */
185
+ } while (el = getParentOrHost(el));
186
+ }
187
+ return null;
188
+ }
189
+ var R_SPACE = /\s+/g;
190
+ function toggleClass(el, name, state) {
191
+ if (el && name) {
192
+ if (el.classList) {
193
+ el.classList[state ? 'add' : 'remove'](name);
194
+ } else {
195
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
196
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
197
+ }
198
+ }
199
+ }
200
+ function css(el, prop, val) {
201
+ var style = el && el.style;
202
+ if (style) {
203
+ if (val === void 0) {
204
+ if (document.defaultView && document.defaultView.getComputedStyle) {
205
+ val = document.defaultView.getComputedStyle(el, '');
206
+ } else if (el.currentStyle) {
207
+ val = el.currentStyle;
208
+ }
209
+ return prop === void 0 ? val : val[prop];
210
+ } else {
211
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
212
+ prop = '-webkit-' + prop;
213
+ }
214
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
215
+ }
216
+ }
217
+ }
218
+ function matrix(el, selfOnly) {
219
+ var appliedTransforms = '';
220
+ if (typeof el === 'string') {
221
+ appliedTransforms = el;
222
+ } else {
223
+ do {
224
+ var transform = css(el, 'transform');
225
+ if (transform && transform !== 'none') {
226
+ appliedTransforms = transform + ' ' + appliedTransforms;
227
+ }
228
+ /* jshint boss:true */
229
+ } while (!selfOnly && (el = el.parentNode));
230
+ }
231
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
232
+ /*jshint -W056 */
233
+
234
+ return matrixFn && new matrixFn(appliedTransforms);
235
+ }
236
+ function find(ctx, tagName, iterator) {
237
+ if (ctx) {
238
+ var list = ctx.getElementsByTagName(tagName),
239
+ i = 0,
240
+ n = list.length;
241
+ if (iterator) {
242
+ for (; i < n; i++) {
243
+ iterator(list[i], i);
244
+ }
245
+ }
246
+ return list;
247
+ }
248
+ return [];
249
+ }
250
+ function getWindowScrollingElement() {
251
+ var scrollingElement = document.scrollingElement;
252
+ if (scrollingElement) {
253
+ return scrollingElement;
254
+ } else {
255
+ return document.documentElement;
256
+ }
257
+ }
258
+ /**
259
+ * Returns the "bounding client rect" of given element
260
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
261
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
262
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
263
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
264
+ * @param {[HTMLElement]} container The parent the element will be placed in
265
+ * @return {Object} The boundingClientRect of el, with specified adjustments
266
+ */
267
+
268
+ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
269
+ if (!el.getBoundingClientRect && el !== window) return;
270
+ var elRect, top, left, bottom, right, height, width;
271
+ if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
272
+ elRect = el.getBoundingClientRect();
273
+ top = elRect.top;
274
+ left = elRect.left;
275
+ bottom = elRect.bottom;
276
+ right = elRect.right;
277
+ height = elRect.height;
278
+ width = elRect.width;
279
+ } else {
280
+ top = 0;
281
+ left = 0;
282
+ bottom = window.innerHeight;
283
+ right = window.innerWidth;
284
+ height = window.innerHeight;
285
+ width = window.innerWidth;
286
+ }
287
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
288
+ // Adjust for translate()
289
+ container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
290
+ // Not needed on <= IE11
291
+
292
+ if (!IE11OrLess) {
293
+ do {
294
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
295
+ var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
296
+
297
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
298
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
299
+ bottom = top + elRect.height;
300
+ right = left + elRect.width;
301
+ break;
302
+ }
303
+ /* jshint boss:true */
304
+ } while (container = container.parentNode);
305
+ }
306
+ }
307
+ if (undoScale && el !== window) {
308
+ // Adjust for scale()
309
+ var elMatrix = matrix(container || el),
310
+ scaleX = elMatrix && elMatrix.a,
311
+ scaleY = elMatrix && elMatrix.d;
312
+ if (elMatrix) {
313
+ top /= scaleY;
314
+ left /= scaleX;
315
+ width /= scaleX;
316
+ height /= scaleY;
317
+ bottom = top + height;
318
+ right = left + width;
319
+ }
320
+ }
321
+ return {
322
+ top: top,
323
+ left: left,
324
+ bottom: bottom,
325
+ right: right,
326
+ width: width,
327
+ height: height
328
+ };
329
+ }
330
+ /**
331
+ * Checks if a side of an element is scrolled past a side of its parents
332
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
333
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
334
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
335
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
336
+ */
337
+
338
+ function isScrolledPast(el, elSide, parentSide) {
339
+ var parent = getParentAutoScrollElement(el, true),
340
+ elSideVal = getRect(el)[elSide];
341
+ /* jshint boss:true */
342
+
343
+ while (parent) {
344
+ var parentSideVal = getRect(parent)[parentSide],
345
+ visible = void 0;
346
+ if (parentSide === 'top' || parentSide === 'left') {
347
+ visible = elSideVal >= parentSideVal;
348
+ } else {
349
+ visible = elSideVal <= parentSideVal;
350
+ }
351
+ if (!visible) return parent;
352
+ if (parent === getWindowScrollingElement()) break;
353
+ parent = getParentAutoScrollElement(parent, false);
354
+ }
355
+ return false;
356
+ }
357
+ /**
358
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
359
+ * and non-draggable elements
360
+ * @param {HTMLElement} el The parent element
361
+ * @param {Number} childNum The index of the child
362
+ * @param {Object} options Parent Sortable's options
363
+ * @return {HTMLElement} The child at index childNum, or null if not found
364
+ */
365
+
366
+ function getChild(el, childNum, options, includeDragEl) {
367
+ var currentChild = 0,
368
+ i = 0,
369
+ children = el.children;
370
+ while (i < children.length) {
371
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
372
+ if (currentChild === childNum) {
373
+ return children[i];
374
+ }
375
+ currentChild++;
376
+ }
377
+ i++;
378
+ }
379
+ return null;
380
+ }
381
+ /**
382
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
383
+ * @param {HTMLElement} el Parent element
384
+ * @param {selector} selector Any other elements that should be ignored
385
+ * @return {HTMLElement} The last child, ignoring ghostEl
386
+ */
387
+
388
+ function lastChild(el, selector) {
389
+ var last = el.lastElementChild;
390
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
391
+ last = last.previousElementSibling;
392
+ }
393
+ return last || null;
394
+ }
395
+ /**
396
+ * Returns the index of an element within its parent for a selected set of
397
+ * elements
398
+ * @param {HTMLElement} el
399
+ * @param {selector} selector
400
+ * @return {number}
401
+ */
402
+
403
+ function index(el, selector) {
404
+ var index = 0;
405
+ if (!el || !el.parentNode) {
406
+ return -1;
407
+ }
408
+ /* jshint boss:true */
409
+
410
+ while (el = el.previousElementSibling) {
411
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
412
+ index++;
413
+ }
414
+ }
415
+ return index;
416
+ }
417
+ /**
418
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
419
+ * The value is returned in real pixels.
420
+ * @param {HTMLElement} el
421
+ * @return {Array} Offsets in the format of [left, top]
422
+ */
423
+
424
+ function getRelativeScrollOffset(el) {
425
+ var offsetLeft = 0,
426
+ offsetTop = 0,
427
+ winScroller = getWindowScrollingElement();
428
+ if (el) {
429
+ do {
430
+ var elMatrix = matrix(el),
431
+ scaleX = elMatrix.a,
432
+ scaleY = elMatrix.d;
433
+ offsetLeft += el.scrollLeft * scaleX;
434
+ offsetTop += el.scrollTop * scaleY;
435
+ } while (el !== winScroller && (el = el.parentNode));
436
+ }
437
+ return [offsetLeft, offsetTop];
438
+ }
439
+ /**
440
+ * Returns the index of the object within the given array
441
+ * @param {Array} arr Array that may or may not hold the object
442
+ * @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
443
+ * @return {Number} The index of the object in the array, or -1
444
+ */
445
+
446
+ function indexOfObject(arr, obj) {
447
+ for (var i in arr) {
448
+ if (!arr.hasOwnProperty(i)) continue;
449
+ for (var key in obj) {
450
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
451
+ }
452
+ }
453
+ return -1;
454
+ }
455
+ function getParentAutoScrollElement(el, includeSelf) {
456
+ // skip to window
457
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
458
+ var elem = el;
459
+ var gotSelf = false;
460
+ do {
461
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
462
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
463
+ var elemCSS = css(elem);
464
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
465
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
466
+ if (gotSelf || includeSelf) return elem;
467
+ gotSelf = true;
468
+ }
469
+ }
470
+ /* jshint boss:true */
471
+ } while (elem = elem.parentNode);
472
+ return getWindowScrollingElement();
473
+ }
474
+ function extend(dst, src) {
475
+ if (dst && src) {
476
+ for (var key in src) {
477
+ if (src.hasOwnProperty(key)) {
478
+ dst[key] = src[key];
479
+ }
480
+ }
481
+ }
482
+ return dst;
483
+ }
484
+ function isRectEqual(rect1, rect2) {
485
+ 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);
486
+ }
487
+ var _throttleTimeout;
488
+ function throttle(callback, ms) {
489
+ return function () {
490
+ if (!_throttleTimeout) {
491
+ var args = arguments,
492
+ _this = this;
493
+ if (args.length === 1) {
494
+ callback.call(_this, args[0]);
495
+ } else {
496
+ callback.apply(_this, args);
497
+ }
498
+ _throttleTimeout = setTimeout(function () {
499
+ _throttleTimeout = void 0;
500
+ }, ms);
501
+ }
502
+ };
503
+ }
504
+ function cancelThrottle() {
505
+ clearTimeout(_throttleTimeout);
506
+ _throttleTimeout = void 0;
507
+ }
508
+ function scrollBy(el, x, y) {
509
+ el.scrollLeft += x;
510
+ el.scrollTop += y;
511
+ }
512
+ function clone(el) {
513
+ var Polymer = window.Polymer;
514
+ var $ = window.jQuery || window.Zepto;
515
+ if (Polymer && Polymer.dom) {
516
+ return Polymer.dom(el).cloneNode(true);
517
+ } else if ($) {
518
+ return $(el).clone(true)[0];
519
+ } else {
520
+ return el.cloneNode(true);
521
+ }
522
+ }
523
+ var expando = 'Sortable' + new Date().getTime();
524
+ function AnimationStateManager() {
525
+ var animationStates = [],
526
+ animationCallbackId;
527
+ return {
528
+ captureAnimationState: function captureAnimationState() {
529
+ animationStates = [];
530
+ if (!this.options.animation) return;
531
+ var children = [].slice.call(this.el.children);
532
+ children.forEach(function (child) {
533
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
534
+ animationStates.push({
535
+ target: child,
536
+ rect: getRect(child)
537
+ });
538
+ var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
539
+
540
+ if (child.thisAnimationDuration) {
541
+ var childMatrix = matrix(child, true);
542
+ if (childMatrix) {
543
+ fromRect.top -= childMatrix.f;
544
+ fromRect.left -= childMatrix.e;
545
+ }
546
+ }
547
+ child.fromRect = fromRect;
548
+ });
549
+ },
550
+ addAnimationState: function addAnimationState(state) {
551
+ animationStates.push(state);
552
+ },
553
+ removeAnimationState: function removeAnimationState(target) {
554
+ animationStates.splice(indexOfObject(animationStates, {
555
+ target: target
556
+ }), 1);
557
+ },
558
+ animateAll: function animateAll(callback) {
559
+ var _this = this;
560
+ if (!this.options.animation) {
561
+ clearTimeout(animationCallbackId);
562
+ if (typeof callback === 'function') callback();
563
+ return;
564
+ }
565
+ var animating = false,
566
+ animationTime = 0;
567
+ animationStates.forEach(function (state) {
568
+ var time = 0,
569
+ target = state.target,
570
+ fromRect = target.fromRect,
571
+ toRect = getRect(target),
572
+ prevFromRect = target.prevFromRect,
573
+ prevToRect = target.prevToRect,
574
+ animatingRect = state.rect,
575
+ targetMatrix = matrix(target, true);
576
+ if (targetMatrix) {
577
+ // Compensate for current animation
578
+ toRect.top -= targetMatrix.f;
579
+ toRect.left -= targetMatrix.e;
580
+ }
581
+ target.toRect = toRect;
582
+ if (target.thisAnimationDuration) {
583
+ // Could also check if animatingRect is between fromRect and toRect
584
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&
585
+ // Make sure animatingRect is on line between toRect & fromRect
586
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
587
+ // If returning to same place as started from animation and on same axis
588
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
589
+ }
590
+ } // if fromRect != toRect: animate
591
+
592
+ if (!isRectEqual(toRect, fromRect)) {
593
+ target.prevFromRect = fromRect;
594
+ target.prevToRect = toRect;
595
+ if (!time) {
596
+ time = _this.options.animation;
597
+ }
598
+ _this.animate(target, animatingRect, toRect, time);
599
+ }
600
+ if (time) {
601
+ animating = true;
602
+ animationTime = Math.max(animationTime, time);
603
+ clearTimeout(target.animationResetTimer);
604
+ target.animationResetTimer = setTimeout(function () {
605
+ target.animationTime = 0;
606
+ target.prevFromRect = null;
607
+ target.fromRect = null;
608
+ target.prevToRect = null;
609
+ target.thisAnimationDuration = null;
610
+ }, time);
611
+ target.thisAnimationDuration = time;
612
+ }
613
+ });
614
+ clearTimeout(animationCallbackId);
615
+ if (!animating) {
616
+ if (typeof callback === 'function') callback();
617
+ } else {
618
+ animationCallbackId = setTimeout(function () {
619
+ if (typeof callback === 'function') callback();
620
+ }, animationTime);
621
+ }
622
+ animationStates = [];
623
+ },
624
+ animate: function animate(target, currentRect, toRect, duration) {
625
+ if (duration) {
626
+ css(target, 'transition', '');
627
+ css(target, 'transform', '');
628
+ var elMatrix = matrix(this.el),
629
+ scaleX = elMatrix && elMatrix.a,
630
+ scaleY = elMatrix && elMatrix.d,
631
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
632
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
633
+ target.animatingX = !!translateX;
634
+ target.animatingY = !!translateY;
635
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
636
+ this.forRepaintDummy = repaint(target); // repaint
637
+
638
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
639
+ css(target, 'transform', 'translate3d(0,0,0)');
640
+ typeof target.animated === 'number' && clearTimeout(target.animated);
641
+ target.animated = setTimeout(function () {
642
+ css(target, 'transition', '');
643
+ css(target, 'transform', '');
644
+ target.animated = false;
645
+ target.animatingX = false;
646
+ target.animatingY = false;
647
+ }, duration);
648
+ }
649
+ }
650
+ };
651
+ }
652
+ function repaint(target) {
653
+ return target.offsetWidth;
654
+ }
655
+ function calculateRealTime(animatingRect, fromRect, toRect, options) {
656
+ 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;
657
+ }
658
+ var plugins = [];
659
+ var defaults = {
660
+ initializeByDefault: true
661
+ };
662
+ var PluginManager = {
663
+ mount: function mount(plugin) {
664
+ // Set default static properties
665
+ for (var option in defaults) {
666
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
667
+ plugin[option] = defaults[option];
668
+ }
669
+ }
670
+ plugins.forEach(function (p) {
671
+ if (p.pluginName === plugin.pluginName) {
672
+ throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
673
+ }
674
+ });
675
+ plugins.push(plugin);
676
+ },
677
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
678
+ var _this = this;
679
+ this.eventCanceled = false;
680
+ evt.cancel = function () {
681
+ _this.eventCanceled = true;
682
+ };
683
+ var eventNameGlobal = eventName + 'Global';
684
+ plugins.forEach(function (plugin) {
685
+ if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
686
+
687
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
688
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
689
+ sortable: sortable
690
+ }, evt));
691
+ } // Only fire plugin event if plugin is enabled in this sortable,
692
+ // and plugin has event defined
693
+
694
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
695
+ sortable[plugin.pluginName][eventName](_objectSpread2({
696
+ sortable: sortable
697
+ }, evt));
698
+ }
699
+ });
700
+ },
701
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
702
+ plugins.forEach(function (plugin) {
703
+ var pluginName = plugin.pluginName;
704
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
705
+ var initialized = new plugin(sortable, el, sortable.options);
706
+ initialized.sortable = sortable;
707
+ initialized.options = sortable.options;
708
+ sortable[pluginName] = initialized; // Add default options from plugin
709
+
710
+ _extends(defaults, initialized.defaults);
711
+ });
712
+ for (var option in sortable.options) {
713
+ if (!sortable.options.hasOwnProperty(option)) continue;
714
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
715
+ if (typeof modified !== 'undefined') {
716
+ sortable.options[option] = modified;
717
+ }
718
+ }
719
+ },
720
+ getEventProperties: function getEventProperties(name, sortable) {
721
+ var eventProperties = {};
722
+ plugins.forEach(function (plugin) {
723
+ if (typeof plugin.eventProperties !== 'function') return;
724
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
725
+ });
726
+ return eventProperties;
727
+ },
728
+ modifyOption: function modifyOption(sortable, name, value) {
729
+ var modifiedValue;
730
+ plugins.forEach(function (plugin) {
731
+ // Plugin must exist on the Sortable
732
+ if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
733
+
734
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
735
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
736
+ }
737
+ });
738
+ return modifiedValue;
739
+ }
740
+ };
741
+ function dispatchEvent(_ref) {
742
+ var sortable = _ref.sortable,
743
+ rootEl = _ref.rootEl,
744
+ name = _ref.name,
745
+ targetEl = _ref.targetEl,
746
+ cloneEl = _ref.cloneEl,
747
+ toEl = _ref.toEl,
748
+ fromEl = _ref.fromEl,
749
+ oldIndex = _ref.oldIndex,
750
+ newIndex = _ref.newIndex,
751
+ oldDraggableIndex = _ref.oldDraggableIndex,
752
+ newDraggableIndex = _ref.newDraggableIndex,
753
+ originalEvent = _ref.originalEvent,
754
+ putSortable = _ref.putSortable,
755
+ extraEventProperties = _ref.extraEventProperties;
756
+ sortable = sortable || rootEl && rootEl[expando];
757
+ if (!sortable) return;
758
+ var evt,
759
+ options = sortable.options,
760
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
761
+
762
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
763
+ evt = new CustomEvent(name, {
764
+ bubbles: true,
765
+ cancelable: true
766
+ });
767
+ } else {
768
+ evt = document.createEvent('Event');
769
+ evt.initEvent(name, true, true);
770
+ }
771
+ evt.to = toEl || rootEl;
772
+ evt.from = fromEl || rootEl;
773
+ evt.item = targetEl || rootEl;
774
+ evt.clone = cloneEl;
775
+ evt.oldIndex = oldIndex;
776
+ evt.newIndex = newIndex;
777
+ evt.oldDraggableIndex = oldDraggableIndex;
778
+ evt.newDraggableIndex = newDraggableIndex;
779
+ evt.originalEvent = originalEvent;
780
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
781
+ var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
782
+ for (var option in allEventProperties) {
783
+ evt[option] = allEventProperties[option];
784
+ }
785
+ if (rootEl) {
786
+ rootEl.dispatchEvent(evt);
787
+ }
788
+ if (options[onName]) {
789
+ options[onName].call(sortable, evt);
790
+ }
791
+ }
792
+ var _excluded = ["evt"];
793
+ var pluginEvent = function pluginEvent(eventName, sortable) {
794
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
795
+ originalEvent = _ref.evt,
796
+ data = _objectWithoutProperties(_ref, _excluded);
797
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
798
+ dragEl: dragEl,
799
+ parentEl: parentEl,
800
+ ghostEl: ghostEl,
801
+ rootEl: rootEl,
802
+ nextEl: nextEl,
803
+ lastDownEl: lastDownEl,
804
+ cloneEl: cloneEl,
805
+ cloneHidden: cloneHidden,
806
+ dragStarted: moved,
807
+ putSortable: putSortable,
808
+ activeSortable: Sortable.active,
809
+ originalEvent: originalEvent,
810
+ oldIndex: oldIndex,
811
+ oldDraggableIndex: oldDraggableIndex,
812
+ newIndex: newIndex,
813
+ newDraggableIndex: newDraggableIndex,
814
+ hideGhostForTarget: _hideGhostForTarget,
815
+ unhideGhostForTarget: _unhideGhostForTarget,
816
+ cloneNowHidden: function cloneNowHidden() {
817
+ cloneHidden = true;
818
+ },
819
+ cloneNowShown: function cloneNowShown() {
820
+ cloneHidden = false;
821
+ },
822
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
823
+ _dispatchEvent({
824
+ sortable: sortable,
825
+ name: name,
826
+ originalEvent: originalEvent
827
+ });
828
+ }
829
+ }, data));
830
+ };
831
+ function _dispatchEvent(info) {
832
+ dispatchEvent(_objectSpread2({
833
+ putSortable: putSortable,
834
+ cloneEl: cloneEl,
835
+ targetEl: dragEl,
836
+ rootEl: rootEl,
837
+ oldIndex: oldIndex,
838
+ oldDraggableIndex: oldDraggableIndex,
839
+ newIndex: newIndex,
840
+ newDraggableIndex: newDraggableIndex
841
+ }, info));
842
+ }
843
+ var dragEl,
844
+ parentEl,
845
+ ghostEl,
846
+ rootEl,
847
+ nextEl,
848
+ lastDownEl,
849
+ cloneEl,
850
+ cloneHidden,
851
+ oldIndex,
852
+ newIndex,
853
+ oldDraggableIndex,
854
+ newDraggableIndex,
855
+ activeGroup,
856
+ putSortable,
857
+ awaitingDragStarted = false,
858
+ ignoreNextClick = false,
859
+ sortables = [],
860
+ tapEvt,
861
+ touchEvt,
862
+ lastDx,
863
+ lastDy,
864
+ tapDistanceLeft,
865
+ tapDistanceTop,
866
+ moved,
867
+ lastTarget,
868
+ lastDirection,
869
+ pastFirstInvertThresh = false,
870
+ isCircumstantialInvert = false,
871
+ targetMoveDistance,
872
+ // For positioning ghost absolutely
873
+ ghostRelativeParent,
874
+ ghostRelativeParentInitialScroll = [],
875
+ // (left, top)
876
+ _silent = false,
877
+ savedInputChecked = [];
878
+ /** @const */
879
+
880
+ var documentExists = typeof document !== 'undefined',
881
+ PositionGhostAbsolutely = IOS,
882
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
883
+ // This will not pass for IE9, because IE9 DnD only works on anchors
884
+ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
885
+ supportCssPointerEvents = function () {
886
+ if (!documentExists) return; // false when <= IE11
887
+
888
+ if (IE11OrLess) {
889
+ return false;
890
+ }
891
+ var el = document.createElement('x');
892
+ el.style.cssText = 'pointer-events:auto';
893
+ return el.style.pointerEvents === 'auto';
894
+ }(),
895
+ _detectDirection = function _detectDirection(el, options) {
896
+ var elCSS = css(el),
897
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
898
+ child1 = getChild(el, 0, options),
899
+ child2 = getChild(el, 1, options),
900
+ firstChildCSS = child1 && css(child1),
901
+ secondChildCSS = child2 && css(child2),
902
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
903
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
904
+ if (elCSS.display === 'flex') {
905
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
906
+ }
907
+ if (elCSS.display === 'grid') {
908
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
909
+ }
910
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
911
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
912
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
913
+ }
914
+ 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';
915
+ },
916
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
917
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
918
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
919
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
920
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
921
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
922
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
923
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
924
+ },
925
+ /**
926
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
927
+ * @param {Number} x X position
928
+ * @param {Number} y Y position
929
+ * @return {HTMLElement} Element of the first found nearest Sortable
930
+ */
931
+ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
932
+ var ret;
933
+ sortables.some(function (sortable) {
934
+ var threshold = sortable[expando].options.emptyInsertThreshold;
935
+ if (!threshold || lastChild(sortable)) return;
936
+ var rect = getRect(sortable),
937
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
938
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
939
+ if (insideHorizontally && insideVertically) {
940
+ return ret = sortable;
941
+ }
942
+ });
943
+ return ret;
944
+ },
945
+ _prepareGroup = function _prepareGroup(options) {
946
+ function toFn(value, pull) {
947
+ return function (to, from, dragEl, evt) {
948
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
949
+ if (value == null && (pull || sameGroup)) {
950
+ // Default pull value
951
+ // Default pull and put value if same group
952
+ return true;
953
+ } else if (value == null || value === false) {
954
+ return false;
955
+ } else if (pull && value === 'clone') {
956
+ return value;
957
+ } else if (typeof value === 'function') {
958
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
959
+ } else {
960
+ var otherGroup = (pull ? to : from).options.group.name;
961
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
962
+ }
963
+ };
964
+ }
965
+ var group = {};
966
+ var originalGroup = options.group;
967
+ if (!originalGroup || _typeof(originalGroup) != 'object') {
968
+ originalGroup = {
969
+ name: originalGroup
970
+ };
971
+ }
972
+ group.name = originalGroup.name;
973
+ group.checkPull = toFn(originalGroup.pull, true);
974
+ group.checkPut = toFn(originalGroup.put);
975
+ group.revertClone = originalGroup.revertClone;
976
+ options.group = group;
977
+ },
978
+ _hideGhostForTarget = function _hideGhostForTarget() {
979
+ if (!supportCssPointerEvents && ghostEl) {
980
+ css(ghostEl, 'display', 'none');
981
+ }
982
+ },
983
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
984
+ if (!supportCssPointerEvents && ghostEl) {
985
+ css(ghostEl, 'display', '');
986
+ }
987
+ }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
988
+
989
+ if (documentExists) {
990
+ document.addEventListener('click', function (evt) {
991
+ if (ignoreNextClick) {
992
+ evt.preventDefault();
993
+ evt.stopPropagation && evt.stopPropagation();
994
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
995
+ ignoreNextClick = false;
996
+ return false;
997
+ }
998
+ }, true);
999
+ }
1000
+ var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1001
+ if (dragEl) {
1002
+ evt = evt.touches ? evt.touches[0] : evt;
1003
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1004
+ if (nearest) {
1005
+ // Create imitation event
1006
+ var event = {};
1007
+ for (var i in evt) {
1008
+ if (evt.hasOwnProperty(i)) {
1009
+ event[i] = evt[i];
1010
+ }
1011
+ }
1012
+ event.target = event.rootEl = nearest;
1013
+ event.preventDefault = void 0;
1014
+ event.stopPropagation = void 0;
1015
+ nearest[expando]._onDragOver(event);
1016
+ }
1017
+ }
1018
+ };
1019
+ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1020
+ if (dragEl) {
1021
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1022
+ }
1023
+ };
1024
+ /**
1025
+ * @class Sortable
1026
+ * @param {HTMLElement} el
1027
+ * @param {Object} [options]
1028
+ */
1029
+
1030
+ function Sortable(el, options) {
1031
+ if (!(el && el.nodeType && el.nodeType === 1)) {
1032
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1033
+ }
1034
+ this.el = el; // root element
1035
+
1036
+ this.options = options = _extends({}, options); // Export instance
1037
+
1038
+ el[expando] = this;
1039
+ var defaults = {
1040
+ group: null,
1041
+ sort: true,
1042
+ disabled: false,
1043
+ store: null,
1044
+ handle: null,
1045
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1046
+ swapThreshold: 1,
1047
+ // percentage; 0 <= x <= 1
1048
+ invertSwap: false,
1049
+ // invert always
1050
+ invertedSwapThreshold: null,
1051
+ // will be set to same as swapThreshold if default
1052
+ removeCloneOnHide: true,
1053
+ direction: function direction() {
1054
+ return _detectDirection(el, this.options);
1055
+ },
1056
+ ghostClass: 'sortable-ghost',
1057
+ chosenClass: 'sortable-chosen',
1058
+ dragClass: 'sortable-drag',
1059
+ ignore: 'a, img',
1060
+ filter: null,
1061
+ preventOnFilter: true,
1062
+ animation: 0,
1063
+ easing: null,
1064
+ setData: function setData(dataTransfer, dragEl) {
1065
+ dataTransfer.setData('Text', dragEl.textContent);
1066
+ },
1067
+ dropBubble: false,
1068
+ dragoverBubble: false,
1069
+ dataIdAttr: 'data-id',
1070
+ delay: 0,
1071
+ delayOnTouchOnly: false,
1072
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1073
+ forceFallback: false,
1074
+ fallbackClass: 'sortable-fallback',
1075
+ fallbackOnBody: false,
1076
+ fallbackTolerance: 0,
1077
+ fallbackOffset: {
1078
+ x: 0,
1079
+ y: 0
1080
+ },
1081
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
1082
+ emptyInsertThreshold: 5
1083
+ };
1084
+ PluginManager.initializePlugins(this, el, defaults); // Set default options
1085
+
1086
+ for (var name in defaults) {
1087
+ !(name in options) && (options[name] = defaults[name]);
1088
+ }
1089
+ _prepareGroup(options); // Bind all private methods
1090
+
1091
+ for (var fn in this) {
1092
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1093
+ this[fn] = this[fn].bind(this);
1094
+ }
1095
+ } // Setup drag mode
1096
+
1097
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1098
+ if (this.nativeDraggable) {
1099
+ // Touch start threshold cannot be greater than the native dragstart threshold
1100
+ this.options.touchStartThreshold = 1;
1101
+ } // Bind events
1102
+
1103
+ if (options.supportPointer) {
1104
+ on(el, 'pointerdown', this._onTapStart);
1105
+ } else {
1106
+ on(el, 'mousedown', this._onTapStart);
1107
+ on(el, 'touchstart', this._onTapStart);
1108
+ }
1109
+ if (this.nativeDraggable) {
1110
+ on(el, 'dragover', this);
1111
+ on(el, 'dragenter', this);
1112
+ }
1113
+ sortables.push(this.el); // Restore sorting
1114
+
1115
+ options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
1116
+
1117
+ _extends(this, AnimationStateManager());
1118
+ }
1119
+ Sortable.prototype = /** @lends Sortable.prototype */
1120
+ {
1121
+ constructor: Sortable,
1122
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
1123
+ if (!this.el.contains(target) && target !== this.el) {
1124
+ lastTarget = null;
1125
+ }
1126
+ },
1127
+ _getDirection: function _getDirection(evt, target) {
1128
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1129
+ },
1130
+ _onTapStart: function _onTapStart( /** Event|TouchEvent */
1131
+ evt) {
1132
+ if (!evt.cancelable) return;
1133
+ var _this = this,
1134
+ el = this.el,
1135
+ options = this.options,
1136
+ preventOnFilter = options.preventOnFilter,
1137
+ type = evt.type,
1138
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
1139
+ target = (touch || evt).target,
1140
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1141
+ filter = options.filter;
1142
+ _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1143
+
1144
+ if (dragEl) {
1145
+ return;
1146
+ }
1147
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1148
+ return; // only left button and enabled
1149
+ } // cancel dnd if original target is content editable
1150
+
1151
+ if (originalTarget.isContentEditable) {
1152
+ return;
1153
+ } // Safari ignores further event handling after mousedown
1154
+
1155
+ if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
1156
+ return;
1157
+ }
1158
+ target = closest(target, options.draggable, el, false);
1159
+ if (target && target.animated) {
1160
+ return;
1161
+ }
1162
+ if (lastDownEl === target) {
1163
+ // Ignoring duplicate `down`
1164
+ return;
1165
+ } // Get the index of the dragged element within its parent
1166
+
1167
+ oldIndex = index(target);
1168
+ oldDraggableIndex = index(target, options.draggable); // Check filter
1169
+
1170
+ if (typeof filter === 'function') {
1171
+ if (filter.call(this, evt, target, this)) {
1172
+ _dispatchEvent({
1173
+ sortable: _this,
1174
+ rootEl: originalTarget,
1175
+ name: 'filter',
1176
+ targetEl: target,
1177
+ toEl: el,
1178
+ fromEl: el
1179
+ });
1180
+ pluginEvent('filter', _this, {
1181
+ evt: evt
1182
+ });
1183
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1184
+ return; // cancel dnd
1185
+ }
1186
+ } else if (filter) {
1187
+ filter = filter.split(',').some(function (criteria) {
1188
+ criteria = closest(originalTarget, criteria.trim(), el, false);
1189
+ if (criteria) {
1190
+ _dispatchEvent({
1191
+ sortable: _this,
1192
+ rootEl: criteria,
1193
+ name: 'filter',
1194
+ targetEl: target,
1195
+ fromEl: el,
1196
+ toEl: el
1197
+ });
1198
+ pluginEvent('filter', _this, {
1199
+ evt: evt
1200
+ });
1201
+ return true;
1202
+ }
1203
+ });
1204
+ if (filter) {
1205
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1206
+ return; // cancel dnd
1207
+ }
1208
+ }
1209
+
1210
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1211
+ return;
1212
+ } // Prepare `dragstart`
1213
+
1214
+ this._prepareDragStart(evt, touch, target);
1215
+ },
1216
+ _prepareDragStart: function _prepareDragStart( /** Event */
1217
+ evt, /** Touch */
1218
+ touch, /** HTMLElement */
1219
+ target) {
1220
+ var _this = this,
1221
+ el = _this.el,
1222
+ options = _this.options,
1223
+ ownerDocument = el.ownerDocument,
1224
+ dragStartFn;
1225
+ if (target && !dragEl && target.parentNode === el) {
1226
+ var dragRect = getRect(target);
1227
+ rootEl = el;
1228
+ dragEl = target;
1229
+ parentEl = dragEl.parentNode;
1230
+ nextEl = dragEl.nextSibling;
1231
+ lastDownEl = target;
1232
+ activeGroup = options.group;
1233
+ Sortable.dragged = dragEl;
1234
+ tapEvt = {
1235
+ target: dragEl,
1236
+ clientX: (touch || evt).clientX,
1237
+ clientY: (touch || evt).clientY
1238
+ };
1239
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
1240
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
1241
+ this._lastX = (touch || evt).clientX;
1242
+ this._lastY = (touch || evt).clientY;
1243
+ dragEl.style['will-change'] = 'all';
1244
+ dragStartFn = function dragStartFn() {
1245
+ pluginEvent('delayEnded', _this, {
1246
+ evt: evt
1247
+ });
1248
+ if (Sortable.eventCanceled) {
1249
+ _this._onDrop();
1250
+ return;
1251
+ } // Delayed drag has been triggered
1252
+ // we can re-enable the events: touchmove/mousemove
1253
+
1254
+ _this._disableDelayedDragEvents();
1255
+ if (!FireFox && _this.nativeDraggable) {
1256
+ dragEl.draggable = true;
1257
+ } // Bind the events: dragstart/dragend
1258
+
1259
+ _this._triggerDragStart(evt, touch); // Drag start event
1260
+
1261
+ _dispatchEvent({
1262
+ sortable: _this,
1263
+ name: 'choose',
1264
+ originalEvent: evt
1265
+ }); // Chosen item
1266
+
1267
+ toggleClass(dragEl, options.chosenClass, true);
1268
+ }; // Disable "draggable"
1269
+
1270
+ options.ignore.split(',').forEach(function (criteria) {
1271
+ find(dragEl, criteria.trim(), _disableDraggable);
1272
+ });
1273
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1274
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1275
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1276
+ on(ownerDocument, 'mouseup', _this._onDrop);
1277
+ on(ownerDocument, 'touchend', _this._onDrop);
1278
+ on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
1279
+
1280
+ if (FireFox && this.nativeDraggable) {
1281
+ this.options.touchStartThreshold = 4;
1282
+ dragEl.draggable = true;
1283
+ }
1284
+ pluginEvent('delayStart', this, {
1285
+ evt: evt
1286
+ }); // Delay is impossible for native DnD in Edge or IE
1287
+
1288
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1289
+ if (Sortable.eventCanceled) {
1290
+ this._onDrop();
1291
+ return;
1292
+ } // If the user moves the pointer or let go the click or touch
1293
+ // before the delay has been reached:
1294
+ // disable the delayed drag
1295
+
1296
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1297
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1298
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1299
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1300
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1301
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1302
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1303
+ } else {
1304
+ dragStartFn();
1305
+ }
1306
+ }
1307
+ },
1308
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/
1309
+ e) {
1310
+ var touch = e.touches ? e.touches[0] : e;
1311
+ 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))) {
1312
+ this._disableDelayedDrag();
1313
+ }
1314
+ },
1315
+ _disableDelayedDrag: function _disableDelayedDrag() {
1316
+ dragEl && _disableDraggable(dragEl);
1317
+ clearTimeout(this._dragStartTimer);
1318
+ this._disableDelayedDragEvents();
1319
+ },
1320
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1321
+ var ownerDocument = this.el.ownerDocument;
1322
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1323
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
1324
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1325
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1326
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1327
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1328
+ },
1329
+ _triggerDragStart: function _triggerDragStart( /** Event */
1330
+ evt, /** Touch */
1331
+ touch) {
1332
+ touch = touch || evt.pointerType == 'touch' && evt;
1333
+ if (!this.nativeDraggable || touch) {
1334
+ if (this.options.supportPointer) {
1335
+ on(document, 'pointermove', this._onTouchMove);
1336
+ } else if (touch) {
1337
+ on(document, 'touchmove', this._onTouchMove);
1338
+ } else {
1339
+ on(document, 'mousemove', this._onTouchMove);
1340
+ }
1341
+ } else {
1342
+ on(dragEl, 'dragend', this);
1343
+ on(rootEl, 'dragstart', this._onDragStart);
1344
+ }
1345
+ try {
1346
+ if (document.selection) {
1347
+ // Timeout neccessary for IE9
1348
+ _nextTick(function () {
1349
+ document.selection.empty();
1350
+ });
1351
+ } else {
1352
+ window.getSelection().removeAllRanges();
1353
+ }
1354
+ } catch (err) {}
1355
+ },
1356
+ _dragStarted: function _dragStarted(fallback, evt) {
1357
+ awaitingDragStarted = false;
1358
+ if (rootEl && dragEl) {
1359
+ pluginEvent('dragStarted', this, {
1360
+ evt: evt
1361
+ });
1362
+ if (this.nativeDraggable) {
1363
+ on(document, 'dragover', _checkOutsideTargetEl);
1364
+ }
1365
+ var options = this.options; // Apply effect
1366
+
1367
+ !fallback && toggleClass(dragEl, options.dragClass, false);
1368
+ toggleClass(dragEl, options.ghostClass, true);
1369
+ Sortable.active = this;
1370
+ fallback && this._appendGhost(); // Drag start event
1371
+
1372
+ _dispatchEvent({
1373
+ sortable: this,
1374
+ name: 'start',
1375
+ originalEvent: evt
1376
+ });
1377
+ } else {
1378
+ this._nulling();
1379
+ }
1380
+ },
1381
+ _emulateDragOver: function _emulateDragOver() {
1382
+ if (touchEvt) {
1383
+ this._lastX = touchEvt.clientX;
1384
+ this._lastY = touchEvt.clientY;
1385
+ _hideGhostForTarget();
1386
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1387
+ var parent = target;
1388
+ while (target && target.shadowRoot) {
1389
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1390
+ if (target === parent) break;
1391
+ parent = target;
1392
+ }
1393
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
1394
+ if (parent) {
1395
+ do {
1396
+ if (parent[expando]) {
1397
+ var inserted = void 0;
1398
+ inserted = parent[expando]._onDragOver({
1399
+ clientX: touchEvt.clientX,
1400
+ clientY: touchEvt.clientY,
1401
+ target: target,
1402
+ rootEl: parent
1403
+ });
1404
+ if (inserted && !this.options.dragoverBubble) {
1405
+ break;
1406
+ }
1407
+ }
1408
+ target = parent; // store last element
1409
+ }
1410
+ /* jshint boss:true */ while (parent = parent.parentNode);
1411
+ }
1412
+ _unhideGhostForTarget();
1413
+ }
1414
+ },
1415
+ _onTouchMove: function _onTouchMove( /**TouchEvent*/
1416
+ evt) {
1417
+ if (tapEvt) {
1418
+ var options = this.options,
1419
+ fallbackTolerance = options.fallbackTolerance,
1420
+ fallbackOffset = options.fallbackOffset,
1421
+ touch = evt.touches ? evt.touches[0] : evt,
1422
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
1423
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1424
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1425
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1426
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1427
+ dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging
1428
+
1429
+ if (!Sortable.active && !awaitingDragStarted) {
1430
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1431
+ return;
1432
+ }
1433
+ this._onDragStart(evt, true);
1434
+ }
1435
+ if (ghostEl) {
1436
+ if (ghostMatrix) {
1437
+ ghostMatrix.e += dx - (lastDx || 0);
1438
+ ghostMatrix.f += dy - (lastDy || 0);
1439
+ } else {
1440
+ ghostMatrix = {
1441
+ a: 1,
1442
+ b: 0,
1443
+ c: 0,
1444
+ d: 1,
1445
+ e: dx,
1446
+ f: dy
1447
+ };
1448
+ }
1449
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
1450
+ css(ghostEl, 'webkitTransform', cssMatrix);
1451
+ css(ghostEl, 'mozTransform', cssMatrix);
1452
+ css(ghostEl, 'msTransform', cssMatrix);
1453
+ css(ghostEl, 'transform', cssMatrix);
1454
+ lastDx = dx;
1455
+ lastDy = dy;
1456
+ touchEvt = touch;
1457
+ }
1458
+ evt.cancelable && evt.preventDefault();
1459
+ }
1460
+ },
1461
+ _appendGhost: function _appendGhost() {
1462
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
1463
+ // Not being adjusted for
1464
+ if (!ghostEl) {
1465
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
1466
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1467
+ options = this.options; // Position absolutely
1468
+
1469
+ if (PositionGhostAbsolutely) {
1470
+ // Get relatively positioned parent
1471
+ ghostRelativeParent = container;
1472
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1473
+ ghostRelativeParent = ghostRelativeParent.parentNode;
1474
+ }
1475
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1476
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1477
+ rect.top += ghostRelativeParent.scrollTop;
1478
+ rect.left += ghostRelativeParent.scrollLeft;
1479
+ } else {
1480
+ ghostRelativeParent = getWindowScrollingElement();
1481
+ }
1482
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1483
+ }
1484
+ ghostEl = dragEl.cloneNode(true);
1485
+ toggleClass(ghostEl, options.ghostClass, false);
1486
+ toggleClass(ghostEl, options.fallbackClass, true);
1487
+ toggleClass(ghostEl, options.dragClass, true);
1488
+ css(ghostEl, 'transition', '');
1489
+ css(ghostEl, 'transform', '');
1490
+ css(ghostEl, 'box-sizing', 'border-box');
1491
+ css(ghostEl, 'margin', 0);
1492
+ css(ghostEl, 'top', rect.top);
1493
+ css(ghostEl, 'left', rect.left);
1494
+ css(ghostEl, 'width', rect.width);
1495
+ css(ghostEl, 'height', rect.height);
1496
+ css(ghostEl, 'opacity', '0.8');
1497
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1498
+ css(ghostEl, 'zIndex', '100000');
1499
+ css(ghostEl, 'pointerEvents', 'none');
1500
+ Sortable.ghost = ghostEl;
1501
+ container.appendChild(ghostEl); // Set transform-origin
1502
+
1503
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
1504
+ }
1505
+ },
1506
+ _onDragStart: function _onDragStart( /**Event*/
1507
+ evt, /**boolean*/
1508
+ fallback) {
1509
+ var _this = this;
1510
+ var dataTransfer = evt.dataTransfer;
1511
+ var options = _this.options;
1512
+ pluginEvent('dragStart', this, {
1513
+ evt: evt
1514
+ });
1515
+ if (Sortable.eventCanceled) {
1516
+ this._onDrop();
1517
+ return;
1518
+ }
1519
+ pluginEvent('setupClone', this);
1520
+ if (!Sortable.eventCanceled) {
1521
+ cloneEl = clone(dragEl);
1522
+ cloneEl.draggable = false;
1523
+ cloneEl.style['will-change'] = '';
1524
+ this._hideClone();
1525
+ toggleClass(cloneEl, this.options.chosenClass, false);
1526
+ Sortable.clone = cloneEl;
1527
+ } // #1143: IFrame support workaround
1528
+
1529
+ _this.cloneId = _nextTick(function () {
1530
+ pluginEvent('clone', _this);
1531
+ if (Sortable.eventCanceled) return;
1532
+ if (!_this.options.removeCloneOnHide) {
1533
+ rootEl.insertBefore(cloneEl, dragEl);
1534
+ }
1535
+ _this._hideClone();
1536
+ _dispatchEvent({
1537
+ sortable: _this,
1538
+ name: 'clone'
1539
+ });
1540
+ });
1541
+ !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
1542
+
1543
+ if (fallback) {
1544
+ ignoreNextClick = true;
1545
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
1546
+ } else {
1547
+ // Undo what was set in _prepareDragStart before drag started
1548
+ off(document, 'mouseup', _this._onDrop);
1549
+ off(document, 'touchend', _this._onDrop);
1550
+ off(document, 'touchcancel', _this._onDrop);
1551
+ if (dataTransfer) {
1552
+ dataTransfer.effectAllowed = 'move';
1553
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
1554
+ }
1555
+ on(document, 'drop', _this); // #1276 fix:
1556
+
1557
+ css(dragEl, 'transform', 'translateZ(0)');
1558
+ }
1559
+ awaitingDragStarted = true;
1560
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1561
+ on(document, 'selectstart', _this);
1562
+ moved = true;
1563
+ if (Safari) {
1564
+ css(document.body, 'user-select', 'none');
1565
+ }
1566
+ },
1567
+ // Returns true - if no further action is needed (either inserted or another condition)
1568
+ _onDragOver: function _onDragOver( /**Event*/
1569
+ evt) {
1570
+ var el = this.el,
1571
+ target = evt.target,
1572
+ dragRect,
1573
+ targetRect,
1574
+ revert,
1575
+ options = this.options,
1576
+ group = options.group,
1577
+ activeSortable = Sortable.active,
1578
+ isOwner = activeGroup === group,
1579
+ canSort = options.sort,
1580
+ fromSortable = putSortable || activeSortable,
1581
+ vertical,
1582
+ _this = this,
1583
+ completedFired = false;
1584
+ if (_silent) return;
1585
+ function dragOverEvent(name, extra) {
1586
+ pluginEvent(name, _this, _objectSpread2({
1587
+ evt: evt,
1588
+ isOwner: isOwner,
1589
+ axis: vertical ? 'vertical' : 'horizontal',
1590
+ revert: revert,
1591
+ dragRect: dragRect,
1592
+ targetRect: targetRect,
1593
+ canSort: canSort,
1594
+ fromSortable: fromSortable,
1595
+ target: target,
1596
+ completed: completed,
1597
+ onMove: function onMove(target, after) {
1598
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1599
+ },
1600
+ changed: changed
1601
+ }, extra));
1602
+ } // Capture animation state
1603
+
1604
+ function capture() {
1605
+ dragOverEvent('dragOverAnimationCapture');
1606
+ _this.captureAnimationState();
1607
+ if (_this !== fromSortable) {
1608
+ fromSortable.captureAnimationState();
1609
+ }
1610
+ } // Return invocation when dragEl is inserted (or completed)
1611
+
1612
+ function completed(insertion) {
1613
+ dragOverEvent('dragOverCompleted', {
1614
+ insertion: insertion
1615
+ });
1616
+ if (insertion) {
1617
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
1618
+ if (isOwner) {
1619
+ activeSortable._hideClone();
1620
+ } else {
1621
+ activeSortable._showClone(_this);
1622
+ }
1623
+ if (_this !== fromSortable) {
1624
+ // Set ghost class to new sortable's ghost class
1625
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
1626
+ toggleClass(dragEl, options.ghostClass, true);
1627
+ }
1628
+ if (putSortable !== _this && _this !== Sortable.active) {
1629
+ putSortable = _this;
1630
+ } else if (_this === Sortable.active && putSortable) {
1631
+ putSortable = null;
1632
+ } // Animation
1633
+
1634
+ if (fromSortable === _this) {
1635
+ _this._ignoreWhileAnimating = target;
1636
+ }
1637
+ _this.animateAll(function () {
1638
+ dragOverEvent('dragOverAnimationComplete');
1639
+ _this._ignoreWhileAnimating = null;
1640
+ });
1641
+ if (_this !== fromSortable) {
1642
+ fromSortable.animateAll();
1643
+ fromSortable._ignoreWhileAnimating = null;
1644
+ }
1645
+ } // Null lastTarget if it is not inside a previously swapped element
1646
+
1647
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
1648
+ lastTarget = null;
1649
+ } // no bubbling and not fallback
1650
+
1651
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
1652
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
1653
+
1654
+ !insertion && nearestEmptyInsertDetectEvent(evt);
1655
+ }
1656
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
1657
+ return completedFired = true;
1658
+ } // Call when dragEl has been inserted
1659
+
1660
+ function changed() {
1661
+ newIndex = index(dragEl);
1662
+ newDraggableIndex = index(dragEl, options.draggable);
1663
+ _dispatchEvent({
1664
+ sortable: _this,
1665
+ name: 'change',
1666
+ toEl: el,
1667
+ newIndex: newIndex,
1668
+ newDraggableIndex: newDraggableIndex,
1669
+ originalEvent: evt
1670
+ });
1671
+ }
1672
+ if (evt.preventDefault !== void 0) {
1673
+ evt.cancelable && evt.preventDefault();
1674
+ }
1675
+ target = closest(target, options.draggable, el, true);
1676
+ dragOverEvent('dragOver');
1677
+ if (Sortable.eventCanceled) return completedFired;
1678
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
1679
+ return completed(false);
1680
+ }
1681
+ ignoreNextClick = false;
1682
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
1683
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
1684
+ vertical = this._getDirection(evt, target) === 'vertical';
1685
+ dragRect = getRect(dragEl);
1686
+ dragOverEvent('dragOverValid');
1687
+ if (Sortable.eventCanceled) return completedFired;
1688
+ if (revert) {
1689
+ parentEl = rootEl; // actualization
1690
+
1691
+ capture();
1692
+ this._hideClone();
1693
+ dragOverEvent('revert');
1694
+ if (!Sortable.eventCanceled) {
1695
+ if (nextEl) {
1696
+ rootEl.insertBefore(dragEl, nextEl);
1697
+ } else {
1698
+ rootEl.appendChild(dragEl);
1699
+ }
1700
+ }
1701
+ return completed(true);
1702
+ }
1703
+ var elLastChild = lastChild(el, options.draggable);
1704
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
1705
+ // Insert to end of list
1706
+ // If already at end of list: Do not insert
1707
+ if (elLastChild === dragEl) {
1708
+ return completed(false);
1709
+ } // if there is a last element, it is the target
1710
+
1711
+ if (elLastChild && el === evt.target) {
1712
+ target = elLastChild;
1713
+ }
1714
+ if (target) {
1715
+ targetRect = getRect(target);
1716
+ }
1717
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
1718
+ capture();
1719
+ el.appendChild(dragEl);
1720
+ parentEl = el; // actualization
1721
+
1722
+ changed();
1723
+ return completed(true);
1724
+ }
1725
+ } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
1726
+ // Insert to start of list
1727
+ var firstChild = getChild(el, 0, options, true);
1728
+ if (firstChild === dragEl) {
1729
+ return completed(false);
1730
+ }
1731
+ target = firstChild;
1732
+ targetRect = getRect(target);
1733
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
1734
+ capture();
1735
+ el.insertBefore(dragEl, firstChild);
1736
+ parentEl = el; // actualization
1737
+
1738
+ changed();
1739
+ return completed(true);
1740
+ }
1741
+ } else if (target.parentNode === el) {
1742
+ targetRect = getRect(target);
1743
+ var direction = 0,
1744
+ targetBeforeFirstSwap,
1745
+ differentLevel = dragEl.parentNode !== el,
1746
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
1747
+ side1 = vertical ? 'top' : 'left',
1748
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
1749
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
1750
+ if (lastTarget !== target) {
1751
+ targetBeforeFirstSwap = targetRect[side1];
1752
+ pastFirstInvertThresh = false;
1753
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
1754
+ }
1755
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
1756
+ var sibling;
1757
+ if (direction !== 0) {
1758
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
1759
+ var dragIndex = index(dragEl);
1760
+ do {
1761
+ dragIndex -= direction;
1762
+ sibling = parentEl.children[dragIndex];
1763
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
1764
+ } // If dragEl is already beside target: Do not insert
1765
+
1766
+ if (direction === 0 || sibling === target) {
1767
+ return completed(false);
1768
+ }
1769
+ lastTarget = target;
1770
+ lastDirection = direction;
1771
+ var nextSibling = target.nextElementSibling,
1772
+ after = false;
1773
+ after = direction === 1;
1774
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
1775
+ if (moveVector !== false) {
1776
+ if (moveVector === 1 || moveVector === -1) {
1777
+ after = moveVector === 1;
1778
+ }
1779
+ _silent = true;
1780
+ setTimeout(_unsilent, 30);
1781
+ capture();
1782
+ if (after && !nextSibling) {
1783
+ el.appendChild(dragEl);
1784
+ } else {
1785
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
1786
+ } // Undo chrome's scroll adjustment (has no effect on other browsers)
1787
+
1788
+ if (scrolledPastTop) {
1789
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
1790
+ }
1791
+ parentEl = dragEl.parentNode; // actualization
1792
+ // must be done before animation
1793
+
1794
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
1795
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
1796
+ }
1797
+ changed();
1798
+ return completed(true);
1799
+ }
1800
+ }
1801
+ if (el.contains(dragEl)) {
1802
+ return completed(false);
1803
+ }
1804
+ }
1805
+ return false;
1806
+ },
1807
+ _ignoreWhileAnimating: null,
1808
+ _offMoveEvents: function _offMoveEvents() {
1809
+ off(document, 'mousemove', this._onTouchMove);
1810
+ off(document, 'touchmove', this._onTouchMove);
1811
+ off(document, 'pointermove', this._onTouchMove);
1812
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
1813
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
1814
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
1815
+ },
1816
+ _offUpEvents: function _offUpEvents() {
1817
+ var ownerDocument = this.el.ownerDocument;
1818
+ off(ownerDocument, 'mouseup', this._onDrop);
1819
+ off(ownerDocument, 'touchend', this._onDrop);
1820
+ off(ownerDocument, 'pointerup', this._onDrop);
1821
+ off(ownerDocument, 'touchcancel', this._onDrop);
1822
+ off(document, 'selectstart', this);
1823
+ },
1824
+ _onDrop: function _onDrop( /**Event*/
1825
+ evt) {
1826
+ var el = this.el,
1827
+ options = this.options; // Get the index of the dragged element within its parent
1828
+
1829
+ newIndex = index(dragEl);
1830
+ newDraggableIndex = index(dragEl, options.draggable);
1831
+ pluginEvent('drop', this, {
1832
+ evt: evt
1833
+ });
1834
+ parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
1835
+
1836
+ newIndex = index(dragEl);
1837
+ newDraggableIndex = index(dragEl, options.draggable);
1838
+ if (Sortable.eventCanceled) {
1839
+ this._nulling();
1840
+ return;
1841
+ }
1842
+ awaitingDragStarted = false;
1843
+ isCircumstantialInvert = false;
1844
+ pastFirstInvertThresh = false;
1845
+ clearInterval(this._loopId);
1846
+ clearTimeout(this._dragStartTimer);
1847
+ _cancelNextTick(this.cloneId);
1848
+ _cancelNextTick(this._dragStartId); // Unbind events
1849
+
1850
+ if (this.nativeDraggable) {
1851
+ off(document, 'drop', this);
1852
+ off(el, 'dragstart', this._onDragStart);
1853
+ }
1854
+ this._offMoveEvents();
1855
+ this._offUpEvents();
1856
+ if (Safari) {
1857
+ css(document.body, 'user-select', '');
1858
+ }
1859
+ css(dragEl, 'transform', '');
1860
+ if (evt) {
1861
+ if (moved) {
1862
+ evt.cancelable && evt.preventDefault();
1863
+ !options.dropBubble && evt.stopPropagation();
1864
+ }
1865
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
1866
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
1867
+ // Remove clone(s)
1868
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
1869
+ }
1870
+ if (dragEl) {
1871
+ if (this.nativeDraggable) {
1872
+ off(dragEl, 'dragend', this);
1873
+ }
1874
+ _disableDraggable(dragEl);
1875
+ dragEl.style['will-change'] = ''; // Remove classes
1876
+ // ghostClass is added in dragStarted
1877
+
1878
+ if (moved && !awaitingDragStarted) {
1879
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
1880
+ }
1881
+ toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
1882
+
1883
+ _dispatchEvent({
1884
+ sortable: this,
1885
+ name: 'unchoose',
1886
+ toEl: parentEl,
1887
+ newIndex: null,
1888
+ newDraggableIndex: null,
1889
+ originalEvent: evt
1890
+ });
1891
+ if (rootEl !== parentEl) {
1892
+ if (newIndex >= 0) {
1893
+ // Add event
1894
+ _dispatchEvent({
1895
+ rootEl: parentEl,
1896
+ name: 'add',
1897
+ toEl: parentEl,
1898
+ fromEl: rootEl,
1899
+ originalEvent: evt
1900
+ }); // Remove event
1901
+
1902
+ _dispatchEvent({
1903
+ sortable: this,
1904
+ name: 'remove',
1905
+ toEl: parentEl,
1906
+ originalEvent: evt
1907
+ }); // drag from one list and drop into another
1908
+
1909
+ _dispatchEvent({
1910
+ rootEl: parentEl,
1911
+ name: 'sort',
1912
+ toEl: parentEl,
1913
+ fromEl: rootEl,
1914
+ originalEvent: evt
1915
+ });
1916
+ _dispatchEvent({
1917
+ sortable: this,
1918
+ name: 'sort',
1919
+ toEl: parentEl,
1920
+ originalEvent: evt
1921
+ });
1922
+ }
1923
+ putSortable && putSortable.save();
1924
+ } else {
1925
+ if (newIndex !== oldIndex) {
1926
+ if (newIndex >= 0) {
1927
+ // drag & drop within the same list
1928
+ _dispatchEvent({
1929
+ sortable: this,
1930
+ name: 'update',
1931
+ toEl: parentEl,
1932
+ originalEvent: evt
1933
+ });
1934
+ _dispatchEvent({
1935
+ sortable: this,
1936
+ name: 'sort',
1937
+ toEl: parentEl,
1938
+ originalEvent: evt
1939
+ });
1940
+ }
1941
+ }
1942
+ }
1943
+ if (Sortable.active) {
1944
+ /* jshint eqnull:true */
1945
+ if (newIndex == null || newIndex === -1) {
1946
+ newIndex = oldIndex;
1947
+ newDraggableIndex = oldDraggableIndex;
1948
+ }
1949
+ _dispatchEvent({
1950
+ sortable: this,
1951
+ name: 'end',
1952
+ toEl: parentEl,
1953
+ originalEvent: evt
1954
+ }); // Save sorting
1955
+
1956
+ this.save();
1957
+ }
1958
+ }
1959
+ }
1960
+ this._nulling();
1961
+ },
1962
+ _nulling: function _nulling() {
1963
+ pluginEvent('nulling', this);
1964
+ 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;
1965
+ savedInputChecked.forEach(function (el) {
1966
+ el.checked = true;
1967
+ });
1968
+ savedInputChecked.length = lastDx = lastDy = 0;
1969
+ },
1970
+ handleEvent: function handleEvent( /**Event*/
1971
+ evt) {
1972
+ switch (evt.type) {
1973
+ case 'drop':
1974
+ case 'dragend':
1975
+ this._onDrop(evt);
1976
+ break;
1977
+ case 'dragenter':
1978
+ case 'dragover':
1979
+ if (dragEl) {
1980
+ this._onDragOver(evt);
1981
+ _globalDragOver(evt);
1982
+ }
1983
+ break;
1984
+ case 'selectstart':
1985
+ evt.preventDefault();
1986
+ break;
1987
+ }
1988
+ },
1989
+ /**
1990
+ * Serializes the item into an array of string.
1991
+ * @returns {String[]}
1992
+ */
1993
+ toArray: function toArray() {
1994
+ var order = [],
1995
+ el,
1996
+ children = this.el.children,
1997
+ i = 0,
1998
+ n = children.length,
1999
+ options = this.options;
2000
+ for (; i < n; i++) {
2001
+ el = children[i];
2002
+ if (closest(el, options.draggable, this.el, false)) {
2003
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2004
+ }
2005
+ }
2006
+ return order;
2007
+ },
2008
+ /**
2009
+ * Sorts the elements according to the array.
2010
+ * @param {String[]} order order of the items
2011
+ */
2012
+ sort: function sort(order, useAnimation) {
2013
+ var items = {},
2014
+ rootEl = this.el;
2015
+ this.toArray().forEach(function (id, i) {
2016
+ var el = rootEl.children[i];
2017
+ if (closest(el, this.options.draggable, rootEl, false)) {
2018
+ items[id] = el;
2019
+ }
2020
+ }, this);
2021
+ useAnimation && this.captureAnimationState();
2022
+ order.forEach(function (id) {
2023
+ if (items[id]) {
2024
+ rootEl.removeChild(items[id]);
2025
+ rootEl.appendChild(items[id]);
2026
+ }
2027
+ });
2028
+ useAnimation && this.animateAll();
2029
+ },
2030
+ /**
2031
+ * Save the current sorting
2032
+ */
2033
+ save: function save() {
2034
+ var store = this.options.store;
2035
+ store && store.set && store.set(this);
2036
+ },
2037
+ /**
2038
+ * 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.
2039
+ * @param {HTMLElement} el
2040
+ * @param {String} [selector] default: `options.draggable`
2041
+ * @returns {HTMLElement|null}
2042
+ */
2043
+ closest: function closest$1(el, selector) {
2044
+ return closest(el, selector || this.options.draggable, this.el, false);
2045
+ },
2046
+ /**
2047
+ * Set/get option
2048
+ * @param {string} name
2049
+ * @param {*} [value]
2050
+ * @returns {*}
2051
+ */
2052
+ option: function option(name, value) {
2053
+ var options = this.options;
2054
+ if (value === void 0) {
2055
+ return options[name];
2056
+ } else {
2057
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
2058
+ if (typeof modifiedValue !== 'undefined') {
2059
+ options[name] = modifiedValue;
2060
+ } else {
2061
+ options[name] = value;
2062
+ }
2063
+ if (name === 'group') {
2064
+ _prepareGroup(options);
2065
+ }
2066
+ }
2067
+ },
2068
+ /**
2069
+ * Destroy
2070
+ */
2071
+ destroy: function destroy() {
2072
+ pluginEvent('destroy', this);
2073
+ var el = this.el;
2074
+ el[expando] = null;
2075
+ off(el, 'mousedown', this._onTapStart);
2076
+ off(el, 'touchstart', this._onTapStart);
2077
+ off(el, 'pointerdown', this._onTapStart);
2078
+ if (this.nativeDraggable) {
2079
+ off(el, 'dragover', this);
2080
+ off(el, 'dragenter', this);
2081
+ } // Remove draggable attributes
2082
+
2083
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2084
+ el.removeAttribute('draggable');
2085
+ });
2086
+ this._onDrop();
2087
+ this._disableDelayedDragEvents();
2088
+ sortables.splice(sortables.indexOf(this.el), 1);
2089
+ this.el = el = null;
2090
+ },
2091
+ _hideClone: function _hideClone() {
2092
+ if (!cloneHidden) {
2093
+ pluginEvent('hideClone', this);
2094
+ if (Sortable.eventCanceled) return;
2095
+ css(cloneEl, 'display', 'none');
2096
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2097
+ cloneEl.parentNode.removeChild(cloneEl);
2098
+ }
2099
+ cloneHidden = true;
2100
+ }
2101
+ },
2102
+ _showClone: function _showClone(putSortable) {
2103
+ if (putSortable.lastPutMode !== 'clone') {
2104
+ this._hideClone();
2105
+ return;
2106
+ }
2107
+ if (cloneHidden) {
2108
+ pluginEvent('showClone', this);
2109
+ if (Sortable.eventCanceled) return; // show clone at dragEl or original position
2110
+
2111
+ if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
2112
+ rootEl.insertBefore(cloneEl, dragEl);
2113
+ } else if (nextEl) {
2114
+ rootEl.insertBefore(cloneEl, nextEl);
2115
+ } else {
2116
+ rootEl.appendChild(cloneEl);
2117
+ }
2118
+ if (this.options.group.revertClone) {
2119
+ this.animate(dragEl, cloneEl);
2120
+ }
2121
+ css(cloneEl, 'display', '');
2122
+ cloneHidden = false;
2123
+ }
2124
+ }
2125
+ };
2126
+ function _globalDragOver( /**Event*/
2127
+ evt) {
2128
+ if (evt.dataTransfer) {
2129
+ evt.dataTransfer.dropEffect = 'move';
2130
+ }
2131
+ evt.cancelable && evt.preventDefault();
2132
+ }
2133
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2134
+ var evt,
2135
+ sortable = fromEl[expando],
2136
+ onMoveFn = sortable.options.onMove,
2137
+ retVal; // Support for new CustomEvent feature
2138
+
2139
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
2140
+ evt = new CustomEvent('move', {
2141
+ bubbles: true,
2142
+ cancelable: true
2143
+ });
2144
+ } else {
2145
+ evt = document.createEvent('Event');
2146
+ evt.initEvent('move', true, true);
2147
+ }
2148
+ evt.to = toEl;
2149
+ evt.from = fromEl;
2150
+ evt.dragged = dragEl;
2151
+ evt.draggedRect = dragRect;
2152
+ evt.related = targetEl || toEl;
2153
+ evt.relatedRect = targetRect || getRect(toEl);
2154
+ evt.willInsertAfter = willInsertAfter;
2155
+ evt.originalEvent = originalEvent;
2156
+ fromEl.dispatchEvent(evt);
2157
+ if (onMoveFn) {
2158
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
2159
+ }
2160
+ return retVal;
2161
+ }
2162
+ function _disableDraggable(el) {
2163
+ el.draggable = false;
2164
+ }
2165
+ function _unsilent() {
2166
+ _silent = false;
2167
+ }
2168
+ function _ghostIsFirst(evt, vertical, sortable) {
2169
+ var rect = getRect(getChild(sortable.el, 0, sortable.options, true));
2170
+ var spacer = 10;
2171
+ return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;
2172
+ }
2173
+ function _ghostIsLast(evt, vertical, sortable) {
2174
+ var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
2175
+ var spacer = 10;
2176
+ return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
2177
+ }
2178
+ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2179
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2180
+ targetLength = vertical ? targetRect.height : targetRect.width,
2181
+ targetS1 = vertical ? targetRect.top : targetRect.left,
2182
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
2183
+ invert = false;
2184
+ if (!invertSwap) {
2185
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2186
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2187
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2188
+ // check if past first invert threshold on side opposite of lastDirection
2189
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2190
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2191
+ pastFirstInvertThresh = true;
2192
+ }
2193
+ if (!pastFirstInvertThresh) {
2194
+ // dragEl shadow (target move distance shadow)
2195
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2196
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
2197
+ return -lastDirection;
2198
+ }
2199
+ } else {
2200
+ invert = true;
2201
+ }
2202
+ } else {
2203
+ // Regular
2204
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2205
+ return _getInsertDirection(target);
2206
+ }
2207
+ }
2208
+ }
2209
+ invert = invert || invertSwap;
2210
+ if (invert) {
2211
+ // Invert of regular
2212
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2213
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2214
+ }
2215
+ }
2216
+ return 0;
2217
+ }
2218
+ /**
2219
+ * Gets the direction dragEl must be swapped relative to target in order to make it
2220
+ * seem that dragEl has been "inserted" into that element's position
2221
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
2222
+ * @return {Number} Direction dragEl must be swapped
2223
+ */
2224
+
2225
+ function _getInsertDirection(target) {
2226
+ if (index(dragEl) < index(target)) {
2227
+ return 1;
2228
+ } else {
2229
+ return -1;
2230
+ }
2231
+ }
2232
+ /**
2233
+ * Generate id
2234
+ * @param {HTMLElement} el
2235
+ * @returns {String}
2236
+ * @private
2237
+ */
2238
+
2239
+ function _generateId(el) {
2240
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
2241
+ i = str.length,
2242
+ sum = 0;
2243
+ while (i--) {
2244
+ sum += str.charCodeAt(i);
2245
+ }
2246
+ return sum.toString(36);
2247
+ }
2248
+ function _saveInputCheckedState(root) {
2249
+ savedInputChecked.length = 0;
2250
+ var inputs = root.getElementsByTagName('input');
2251
+ var idx = inputs.length;
2252
+ while (idx--) {
2253
+ var el = inputs[idx];
2254
+ el.checked && savedInputChecked.push(el);
2255
+ }
2256
+ }
2257
+ function _nextTick(fn) {
2258
+ return setTimeout(fn, 0);
2259
+ }
2260
+ function _cancelNextTick(id) {
2261
+ return clearTimeout(id);
2262
+ } // Fixed #973:
2263
+
2264
+ if (documentExists) {
2265
+ on(document, 'touchmove', function (evt) {
2266
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
2267
+ evt.preventDefault();
2268
+ }
2269
+ });
2270
+ } // Export utils
2271
+
2272
+ Sortable.utils = {
2273
+ on: on,
2274
+ off: off,
2275
+ css: css,
2276
+ find: find,
2277
+ is: function is(el, selector) {
2278
+ return !!closest(el, selector, el, false);
2279
+ },
2280
+ extend: extend,
2281
+ throttle: throttle,
2282
+ closest: closest,
2283
+ toggleClass: toggleClass,
2284
+ clone: clone,
2285
+ index: index,
2286
+ nextTick: _nextTick,
2287
+ cancelNextTick: _cancelNextTick,
2288
+ detectDirection: _detectDirection,
2289
+ getChild: getChild
2290
+ };
2291
+ /**
2292
+ * Get the Sortable instance of an element
2293
+ * @param {HTMLElement} element The element
2294
+ * @return {Sortable|undefined} The instance of Sortable
2295
+ */
2296
+
2297
+ Sortable.get = function (element) {
2298
+ return element[expando];
2299
+ };
2300
+ /**
2301
+ * Mount a plugin to Sortable
2302
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2303
+ */
2304
+
2305
+ Sortable.mount = function () {
2306
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2307
+ plugins[_key] = arguments[_key];
2308
+ }
2309
+ if (plugins[0].constructor === Array) plugins = plugins[0];
2310
+ plugins.forEach(function (plugin) {
2311
+ if (!plugin.prototype || !plugin.prototype.constructor) {
2312
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
2313
+ }
2314
+ if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
2315
+ PluginManager.mount(plugin);
2316
+ });
2317
+ };
2318
+ /**
2319
+ * Create sortable instance
2320
+ * @param {HTMLElement} el
2321
+ * @param {Object} [options]
2322
+ */
2323
+
2324
+ Sortable.create = function (el, options) {
2325
+ return new Sortable(el, options);
2326
+ }; // Export
2327
+
2328
+ Sortable.version = version;
2329
+ var autoScrolls = [],
2330
+ scrollEl,
2331
+ scrollRootEl,
2332
+ scrolling = false,
2333
+ lastAutoScrollX,
2334
+ lastAutoScrollY,
2335
+ touchEvt$1,
2336
+ pointerElemChangedInterval;
2337
+ function AutoScrollPlugin() {
2338
+ function AutoScroll() {
2339
+ this.defaults = {
2340
+ scroll: true,
2341
+ forceAutoScrollFallback: false,
2342
+ scrollSensitivity: 30,
2343
+ scrollSpeed: 10,
2344
+ bubbleScroll: true
2345
+ }; // Bind all private methods
2346
+
2347
+ for (var fn in this) {
2348
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2349
+ this[fn] = this[fn].bind(this);
2350
+ }
2351
+ }
2352
+ }
2353
+ AutoScroll.prototype = {
2354
+ dragStarted: function dragStarted(_ref) {
2355
+ var originalEvent = _ref.originalEvent;
2356
+ if (this.sortable.nativeDraggable) {
2357
+ on(document, 'dragover', this._handleAutoScroll);
2358
+ } else {
2359
+ if (this.options.supportPointer) {
2360
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
2361
+ } else if (originalEvent.touches) {
2362
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
2363
+ } else {
2364
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
2365
+ }
2366
+ }
2367
+ },
2368
+ dragOverCompleted: function dragOverCompleted(_ref2) {
2369
+ var originalEvent = _ref2.originalEvent;
2370
+
2371
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2372
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
2373
+ this._handleAutoScroll(originalEvent);
2374
+ }
2375
+ },
2376
+ drop: function drop() {
2377
+ if (this.sortable.nativeDraggable) {
2378
+ off(document, 'dragover', this._handleAutoScroll);
2379
+ } else {
2380
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
2381
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
2382
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
2383
+ }
2384
+ clearPointerElemChangedInterval();
2385
+ clearAutoScrolls();
2386
+ cancelThrottle();
2387
+ },
2388
+ nulling: function nulling() {
2389
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2390
+ autoScrolls.length = 0;
2391
+ },
2392
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2393
+ this._handleAutoScroll(evt, true);
2394
+ },
2395
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2396
+ var _this = this;
2397
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2398
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2399
+ elem = document.elementFromPoint(x, y);
2400
+ touchEvt$1 = evt; // IE does not seem to have native autoscroll,
2401
+ // Edge's autoscroll seems too conditional,
2402
+ // MACOS Safari does not have autoscroll,
2403
+ // Firefox and Chrome are good
2404
+
2405
+ if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
2406
+ autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
2407
+
2408
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
2409
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2410
+ pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
2411
+
2412
+ pointerElemChangedInterval = setInterval(function () {
2413
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2414
+ if (newElem !== ogElemScroller) {
2415
+ ogElemScroller = newElem;
2416
+ clearAutoScrolls();
2417
+ }
2418
+ autoScroll(evt, _this.options, newElem, fallback);
2419
+ }, 10);
2420
+ lastAutoScrollX = x;
2421
+ lastAutoScrollY = y;
2422
+ }
2423
+ } else {
2424
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2425
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2426
+ clearAutoScrolls();
2427
+ return;
2428
+ }
2429
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2430
+ }
2431
+ }
2432
+ };
2433
+ return _extends(AutoScroll, {
2434
+ pluginName: 'scroll',
2435
+ initializeByDefault: true
2436
+ });
2437
+ }
2438
+ function clearAutoScrolls() {
2439
+ autoScrolls.forEach(function (autoScroll) {
2440
+ clearInterval(autoScroll.pid);
2441
+ });
2442
+ autoScrolls = [];
2443
+ }
2444
+ function clearPointerElemChangedInterval() {
2445
+ clearInterval(pointerElemChangedInterval);
2446
+ }
2447
+ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2448
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2449
+ if (!options.scroll) return;
2450
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2451
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2452
+ sens = options.scrollSensitivity,
2453
+ speed = options.scrollSpeed,
2454
+ winScroller = getWindowScrollingElement();
2455
+ var scrollThisInstance = false,
2456
+ scrollCustomFn; // New scroll root, set scrollEl
2457
+
2458
+ if (scrollRootEl !== rootEl) {
2459
+ scrollRootEl = rootEl;
2460
+ clearAutoScrolls();
2461
+ scrollEl = options.scroll;
2462
+ scrollCustomFn = options.scrollFn;
2463
+ if (scrollEl === true) {
2464
+ scrollEl = getParentAutoScrollElement(rootEl, true);
2465
+ }
2466
+ }
2467
+ var layersOut = 0;
2468
+ var currentParent = scrollEl;
2469
+ do {
2470
+ var el = currentParent,
2471
+ rect = getRect(el),
2472
+ top = rect.top,
2473
+ bottom = rect.bottom,
2474
+ left = rect.left,
2475
+ right = rect.right,
2476
+ width = rect.width,
2477
+ height = rect.height,
2478
+ canScrollX = void 0,
2479
+ canScrollY = void 0,
2480
+ scrollWidth = el.scrollWidth,
2481
+ scrollHeight = el.scrollHeight,
2482
+ elCSS = css(el),
2483
+ scrollPosX = el.scrollLeft,
2484
+ scrollPosY = el.scrollTop;
2485
+ if (el === winScroller) {
2486
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
2487
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
2488
+ } else {
2489
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
2490
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
2491
+ }
2492
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
2493
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
2494
+ if (!autoScrolls[layersOut]) {
2495
+ for (var i = 0; i <= layersOut; i++) {
2496
+ if (!autoScrolls[i]) {
2497
+ autoScrolls[i] = {};
2498
+ }
2499
+ }
2500
+ }
2501
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
2502
+ autoScrolls[layersOut].el = el;
2503
+ autoScrolls[layersOut].vx = vx;
2504
+ autoScrolls[layersOut].vy = vy;
2505
+ clearInterval(autoScrolls[layersOut].pid);
2506
+ if (vx != 0 || vy != 0) {
2507
+ scrollThisInstance = true;
2508
+ /* jshint loopfunc:true */
2509
+
2510
+ autoScrolls[layersOut].pid = setInterval(function () {
2511
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
2512
+ if (isFallback && this.layer === 0) {
2513
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
2514
+ }
2515
+
2516
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
2517
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
2518
+ if (typeof scrollCustomFn === 'function') {
2519
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
2520
+ return;
2521
+ }
2522
+ }
2523
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
2524
+ }.bind({
2525
+ layer: layersOut
2526
+ }), 24);
2527
+ }
2528
+ }
2529
+ layersOut++;
2530
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
2531
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
2532
+ }, 30);
2533
+ var drop = function drop(_ref) {
2534
+ var originalEvent = _ref.originalEvent,
2535
+ putSortable = _ref.putSortable,
2536
+ dragEl = _ref.dragEl,
2537
+ activeSortable = _ref.activeSortable,
2538
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
2539
+ hideGhostForTarget = _ref.hideGhostForTarget,
2540
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
2541
+ if (!originalEvent) return;
2542
+ var toSortable = putSortable || activeSortable;
2543
+ hideGhostForTarget();
2544
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
2545
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
2546
+ unhideGhostForTarget();
2547
+ if (toSortable && !toSortable.el.contains(target)) {
2548
+ dispatchSortableEvent('spill');
2549
+ this.onSpill({
2550
+ dragEl: dragEl,
2551
+ putSortable: putSortable
2552
+ });
2553
+ }
2554
+ };
2555
+ function Revert() {}
2556
+ Revert.prototype = {
2557
+ startIndex: null,
2558
+ dragStart: function dragStart(_ref2) {
2559
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
2560
+ this.startIndex = oldDraggableIndex;
2561
+ },
2562
+ onSpill: function onSpill(_ref3) {
2563
+ var dragEl = _ref3.dragEl,
2564
+ putSortable = _ref3.putSortable;
2565
+ this.sortable.captureAnimationState();
2566
+ if (putSortable) {
2567
+ putSortable.captureAnimationState();
2568
+ }
2569
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
2570
+ if (nextSibling) {
2571
+ this.sortable.el.insertBefore(dragEl, nextSibling);
2572
+ } else {
2573
+ this.sortable.el.appendChild(dragEl);
2574
+ }
2575
+ this.sortable.animateAll();
2576
+ if (putSortable) {
2577
+ putSortable.animateAll();
2578
+ }
2579
+ },
2580
+ drop: drop
2581
+ };
2582
+ _extends(Revert, {
2583
+ pluginName: 'revertOnSpill'
2584
+ });
2585
+ function Remove() {}
2586
+ Remove.prototype = {
2587
+ onSpill: function onSpill(_ref4) {
2588
+ var dragEl = _ref4.dragEl,
2589
+ putSortable = _ref4.putSortable;
2590
+ var parentSortable = putSortable || this.sortable;
2591
+ parentSortable.captureAnimationState();
2592
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
2593
+ parentSortable.animateAll();
2594
+ },
2595
+ drop: drop
2596
+ };
2597
+ _extends(Remove, {
2598
+ pluginName: 'removeOnSpill'
2599
+ });
2600
+ Sortable.mount(new AutoScrollPlugin());
2601
+ Sortable.mount(Remove, Revert);
2602
+
2603
+ function getItemWithUUID(data) {
2604
+ return data.vforkey ? data : {
2605
+ vforkey: v4(),
2606
+ ...data
2607
+ };
2608
+ }
2609
+ var script = defineComponent({
2610
+ name: 'OrList',
2611
+ components: {
2612
+ OrError,
2613
+ OrLabel,
2614
+ OrButton,
2615
+ OrIconButton,
2616
+ OrIcon
2617
+ },
2618
+ model: {
2619
+ prop: 'modelValue',
2620
+ event: 'update:modelValue'
2621
+ },
2622
+ props: {
2623
+ modelValue: {
2624
+ type: Array,
2625
+ required: true,
2626
+ validator: _.isArray
2627
+ },
2628
+ label: {
2629
+ type: String,
2630
+ default: '',
2631
+ required: false,
2632
+ validator: _.isString
2633
+ },
2634
+ buttonLabel: {
2635
+ type: String,
2636
+ default: '',
2637
+ required: false,
2638
+ validator: _.isString
2639
+ },
2640
+ itemProps: {
2641
+ type: Object,
2642
+ default: () => ({}),
2643
+ required: false,
2644
+ validator: _.isObject
2645
+ },
2646
+ handle: {
2647
+ type: String,
2648
+ default: '',
2649
+ required: false,
2650
+ validator: _.isString
2651
+ },
2652
+ isDisabled: {
2653
+ type: Boolean,
2654
+ default: false,
2655
+ required: false,
2656
+ validator: _.isBoolean
2657
+ },
2658
+ canAdd: {
2659
+ type: Boolean,
2660
+ default: true,
2661
+ required: false,
2662
+ validator: _.isBoolean
2663
+ },
2664
+ canDelete: {
2665
+ type: Boolean,
2666
+ default: true,
2667
+ required: false,
2668
+ validator: _.isBoolean
2669
+ },
2670
+ canDrag: {
2671
+ type: Boolean,
2672
+ default: true,
2673
+ required: false,
2674
+ validator: _.isBoolean
2675
+ }
2676
+ },
2677
+ emits: ['update:modelValue', 'item-before-add', 'item-added', 'item-before-delete', 'item-deleted', 'item-before-move', 'item-move'],
2678
+ data(props) {
2679
+ return {
2680
+ sortableInstance: null,
2681
+ items: _.cloneDeep(props.modelValue).map(getItemWithUUID)
2682
+ };
2683
+ },
2684
+ computed: {
2685
+ hasMoreThanOneItem() {
2686
+ return this.items.length > 1;
2687
+ },
2688
+ dragOptions() {
2689
+ return {
2690
+ animation: 250,
2691
+ easing: 'cubic-bezier(0.12, 0.39, 0.5, 0.93)',
2692
+ group: 'description',
2693
+ disabled: this.isDisabled,
2694
+ handle: this.handle ? `${this.handle}` : '.or-list--handle',
2695
+ onUpdate: this.onUpdate
2696
+ };
2697
+ }
2698
+ },
2699
+ watch: {
2700
+ modelValue(newModelValue) {
2701
+ if (_.isEqual(newModelValue, this.items)) return;
2702
+ this.items = _.cloneDeep(newModelValue).map(getItemWithUUID);
2703
+ },
2704
+ items: {
2705
+ handler(newItems) {
2706
+ this.$emit('update:modelValue', newItems);
2707
+ },
2708
+ deep: true
2709
+ },
2710
+ isDisabled(nv) {
2711
+ var _a;
2712
+ (_a = this.sortableInstance) === null || _a === void 0 ? void 0 : _a.option('disabled', nv);
2713
+ },
2714
+ handle(nv) {
2715
+ var _a;
2716
+ (_a = this.sortableInstance) === null || _a === void 0 ? void 0 : _a.option('handle', nv);
2717
+ },
2718
+ 'items.length': {
2719
+ handler(nv) {
2720
+ this.$nextTick(() => {
2721
+ if (nv > 0 && !this.sortableInstance) {
2722
+ this.sortableInstance = Sortable.create(this.$refs.listRef, this.dragOptions);
2723
+ }
2724
+ if (nv < 1 && this.sortableInstance) {
2725
+ this.sortableInstance.destroy();
2726
+ this.sortableInstance = null;
2727
+ }
2728
+ });
2729
+ },
2730
+ immediate: true
2731
+ }
2732
+ },
2733
+ beforeDestroy() {
2734
+ if (this.sortableInstance) {
2735
+ this.sortableInstance.destroy();
2736
+ this.sortableInstance = null;
2737
+ }
2738
+ },
2739
+ methods: {
2740
+ addItem() {
2741
+ if (this.isDisabled) return;
2742
+ this.$emit('item-before-add', this.items);
2743
+ const result = [...this.items, getItemWithUUID(this.itemProps)];
2744
+ this.$emit('item-added', result);
2745
+ this.items = result;
2746
+ },
2747
+ deleteItem(index) {
2748
+ if (this.isDisabled) return;
2749
+ this.$emit('item-before-delete', this.items);
2750
+ const result = this.items.filter((_, i) => i !== index);
2751
+ this.$emit('item-deleted', result);
2752
+ this.items = result;
2753
+ },
2754
+ onUpdate({
2755
+ oldIndex,
2756
+ newIndex
2757
+ }) {
2758
+ if (this.isDisabled) return;
2759
+ this.$emit('item-before-move', this.items);
2760
+ const result = _.cloneDeep(this.items);
2761
+ result.splice(newIndex, 0, result.splice(oldIndex, 1)[0]);
2762
+ this.$emit('item-move', result);
2763
+ this.items = result;
2764
+ }
2765
+ }
2766
+ });
2767
+
2768
+ /* script */
2769
+ const __vue_script__ = script;
2770
+
2771
+ /* template */
2772
+ var __vue_render__ = function () {
2773
+ var _vm = this;
2774
+ var _h = _vm.$createElement;
2775
+ var _c = _vm._self._c || _h;
2776
+ return _c('div', {
2777
+ staticClass: "or-list"
2778
+ }, [_vm._t("header", function () {
2779
+ return [_vm.label ? _c('div', {
2780
+ staticClass: "or-list--header"
2781
+ }, [_c('or-label', {
2782
+ attrs: {
2783
+ "label": _vm.label
2784
+ },
2785
+ scopedSlots: _vm._u([{
2786
+ key: "append",
2787
+ fn: function () {
2788
+ return [_vm._t("label-append")];
2789
+ },
2790
+ proxy: true
2791
+ }], null, true)
2792
+ })], 1) : _vm._e()];
2793
+ }, null, {
2794
+ deleteItem: _vm.deleteItem,
2795
+ addItem: _vm.addItem
2796
+ }), _vm._v(" "), _vm.items.length ? _c('div', {
2797
+ ref: "listRef"
2798
+ }, _vm._l(_vm.items, function (props, index) {
2799
+ return _c('div', {
2800
+ key: props.vforkey || index,
2801
+ staticClass: "or-list--item",
2802
+ attrs: {
2803
+ "role": "listitem"
2804
+ }
2805
+ }, [_vm.canDrag && !_vm.handle && _vm.hasMoreThanOneItem ? _c('or-icon', {
2806
+ staticClass: "or-list--handle",
2807
+ attrs: {
2808
+ "is-disabled": _vm.isDisabled,
2809
+ "icon": "drag_handle"
2810
+ }
2811
+ }) : _vm._e(), _vm._v(" "), _c('div', {
2812
+ staticClass: "or-list--slot"
2813
+ }, [_vm._t("default", function () {
2814
+ return [_c('or-error', {
2815
+ attrs: {
2816
+ "error": "Default Slot Content"
2817
+ }
2818
+ })];
2819
+ }, null, {
2820
+ props: props,
2821
+ items: _vm.items,
2822
+ index: index,
2823
+ deleteItem: _vm.deleteItem,
2824
+ addItem: _vm.addItem
2825
+ })], 2), _vm._v(" "), _vm.canDelete ? _c('or-icon-button', {
2826
+ staticClass: "or-list--delete-button",
2827
+ attrs: {
2828
+ "icon": "delete",
2829
+ "size": "small",
2830
+ "icon-color": "neutral-3",
2831
+ "is-disabled": _vm.isDisabled
2832
+ },
2833
+ on: {
2834
+ "click": function ($event) {
2835
+ $event.preventDefault();
2836
+ $event.stopPropagation();
2837
+ return _vm.deleteItem(index);
2838
+ }
2839
+ }
2840
+ }) : _vm._e()], 1);
2841
+ }), 0) : _vm._e(), _vm._v(" "), _vm._t("footer", function () {
2842
+ return [_c('div', {
2843
+ staticClass: "or-list--footer"
2844
+ }, [_vm.canAdd ? _c('or-button', {
2845
+ staticClass: "or-list--add-button",
2846
+ attrs: {
2847
+ "icon": "add",
2848
+ "type": "text",
2849
+ "size": "small",
2850
+ "content": _vm.buttonLabel,
2851
+ "is-disabled": _vm.isDisabled
2852
+ },
2853
+ on: {
2854
+ "click": _vm.addItem
2855
+ }
2856
+ }) : _vm._e()], 1)];
2857
+ }, null, {
2858
+ deleteItem: _vm.deleteItem,
2859
+ addItem: _vm.addItem
2860
+ })], 2);
2861
+ };
2862
+ var __vue_staticRenderFns__ = [];
2863
+
2864
+ /* style */
2865
+ const __vue_inject_styles__ = function (inject) {
2866
+ if (!inject) return;
2867
+ inject("data-v-9b1f750a_0", {
2868
+ source: "@keyframes spinAround-data-v-9b1f750a{from{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes fade-data-v-9b1f750a{from{opacity:1}to{opacity:0}}.or-list[data-v-9b1f750a]{cursor:default}.or-list--header[data-v-9b1f750a]{margin-bottom:var(--s-2)}.or-list--handle[data-v-9b1f750a]{margin-right:var(--s-3);cursor:move}.or-list--add-button[data-v-9b1f750a]{min-width:0!important;height:auto!important;padding:0!important}.or-list--delete-button[data-v-9b1f750a]{margin-left:var(--s-3)}.or-list--delete-button[data-v-9b1f750a] .or-icon{font-size:.875rem!important}.or-list--item[data-v-9b1f750a]{display:flex;align-items:center;justify-content:flex-start;width:100%;margin-bottom:var(--s-4)}.or-list--slot[data-v-9b1f750a]{width:100%}.or-list--slot>*[data-v-9b1f750a]{width:100%}.or-list.is-disabled[data-v-9b1f750a],.or-list[data-v-9b1f750a]:disabled{cursor:not-allowed}",
2869
+ map: undefined,
2870
+ media: undefined
2871
+ });
2872
+ };
2873
+ /* scoped */
2874
+ const __vue_scope_id__ = "data-v-9b1f750a";
2875
+ /* module identifier */
2876
+ const __vue_module_identifier__ = undefined;
2877
+ /* functional template */
2878
+ const __vue_is_functional_template__ = false;
2879
+ /* style inject SSR */
2880
+
2881
+ /* style inject shadow dom */
2882
+
2883
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
2884
+ render: __vue_render__,
2885
+ staticRenderFns: __vue_staticRenderFns__
2886
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, createInjector, undefined, undefined);
2887
+
2888
+ export { __vue_component__ as default };