@onereach/ui-components-vue2 20.1.1 → 20.1.3

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 (548) hide show
  1. package/dist/{esm-deps/OrDateTimePicker-dc2d7a16.js → esm/OrDateTimePicker-0317db9e.js} +4 -4
  2. package/dist/{esm-deps/OrDateTimePickerMonthSelect-99359eb2.js → esm/OrDateTimePickerMonthSelect-c63eb012.js} +2 -2
  3. package/dist/{esm-deps/OrDateTimePickerTimeSelect-41aef86b.js → esm/OrDateTimePickerTimeSelect-c0fd4c32.js} +2 -2
  4. package/dist/{esm-deps/OrSkeletonText-0a949808.js → esm/OrSkeletonText-32afddae.js} +2 -2
  5. package/dist/{esm-deps → esm}/components/index.js +51 -44
  6. package/dist/{esm-deps → esm}/components/or-autocomplete-v3/index.js +9 -9
  7. package/dist/{esm-deps → esm}/components/or-avatar-v3/index.js +2 -2
  8. package/dist/{esm-deps → esm}/components/or-bottom-sheet-v3/index.js +4 -2
  9. package/dist/{esm-deps → esm}/components/or-button-v3/index.js +1 -1
  10. package/dist/{esm-deps → esm}/components/or-card-collection-v3/index.js +7 -7
  11. package/dist/{esm-deps → esm}/components/or-checkbox-group-v3/index.js +6 -4
  12. package/dist/{esm-deps → esm}/components/or-checkbox-tree-v3/index.js +6 -4
  13. package/dist/{esm-deps → esm}/components/or-checkbox-v3/index.js +7 -5
  14. package/dist/esm/components/or-code-v3/index.js +598 -0
  15. package/dist/{esm-deps → esm}/components/or-confirm-v3/index.js +9 -13
  16. package/dist/{esm-deps → esm}/components/or-context-menu-v3/index.js +6 -6
  17. package/dist/{esm-deps → esm}/components/or-data-grid-v3/index.js +16 -14
  18. package/dist/{esm-deps → esm}/components/or-date-format-v3/index.js +5 -3
  19. package/dist/{esm-deps → esm}/components/or-date-picker-v3/index.js +9 -9
  20. package/dist/{esm-deps → esm}/components/or-date-range-picker-v3/index.js +9 -9
  21. package/dist/{esm-deps → esm}/components/or-date-time-format-v3/index.js +6 -4
  22. package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/index.js +11 -11
  23. package/dist/{esm-deps → esm}/components/or-drawer-v3/index.js +4 -2
  24. package/dist/{esm-deps → esm}/components/or-drop-area-v3/index.js +4 -2
  25. package/dist/{esm-deps → esm}/components/or-editor-tabs-v3/index.js +8 -8
  26. package/dist/{esm-deps → esm}/components/or-expansion-panel-v3/index.js +4 -2
  27. package/dist/{esm-deps → esm}/components/or-fab-v3/index.js +1 -1
  28. package/dist/{esm-deps → esm}/components/or-filter-popover-v3/index.js +7 -7
  29. package/dist/{esm-deps → esm}/components/or-filter-trigger-v3/index.js +7 -7
  30. package/dist/{esm-deps → esm}/components/or-filter-v3/index.js +7 -7
  31. package/dist/{esm-deps → esm}/components/or-icon-button-v3/index.js +7 -7
  32. package/dist/{esm-deps → esm}/components/or-inline-input-v3/index.js +9 -9
  33. package/dist/{esm-deps → esm}/components/or-inline-textarea-v3/index.js +9 -9
  34. package/dist/{esm-deps → esm}/components/or-input-v3/index.js +9 -9
  35. package/dist/esm/components/or-list-v3/index.js +357 -0
  36. package/dist/{esm-deps → esm}/components/or-menu-item-v3/index.js +7 -7
  37. package/dist/{esm-deps → esm}/components/or-menu-v3/index.js +8 -7
  38. package/dist/{esm-deps → esm}/components/or-modal-v3/index.js +7 -7
  39. package/dist/{esm-deps → esm}/components/or-notification-v3/index.js +7 -7
  40. package/dist/{esm-deps → esm}/components/or-overlay-v3/index.js +5 -3
  41. package/dist/{esm-deps → esm}/components/or-pagination-v3/index.js +7 -7
  42. package/dist/esm/components/or-popover-v3/index.js +459 -0
  43. package/dist/{esm-deps → esm}/components/or-progress-v3/index.js +4 -2
  44. package/dist/{esm-deps → esm}/components/or-radio-group-v3/index.js +4 -2
  45. package/dist/{esm-deps → esm}/components/or-radio-v3/index.js +6 -4
  46. package/dist/{esm-deps → esm}/components/or-range-slider-v3/index.js +6 -6
  47. package/dist/{esm-deps → esm}/components/or-rating-v3/index.js +4 -2
  48. package/dist/{esm-deps → esm}/components/or-resizeable-panel-v3/index.js +7 -7
  49. package/dist/esm/components/or-rich-text-editor-v3/index.js +1362 -0
  50. package/dist/{esm-deps → esm}/components/or-rich-tooltip-v3/index.js +6 -6
  51. package/dist/{esm-deps → esm}/components/or-search-v3/index.js +9 -9
  52. package/dist/{esm-deps → esm}/components/or-segmented-control-v3/index.js +4 -2
  53. package/dist/{esm-deps → esm}/components/or-select-v3/index.js +8 -8
  54. package/dist/{esm-deps → esm}/components/or-sidebar-v3/index.js +7 -7
  55. package/dist/{esm-deps → esm}/components/or-skeleton-v3/index.js +4 -4
  56. package/dist/{esm-deps → esm}/components/or-slider-v3/index.js +6 -6
  57. package/dist/{esm-deps → esm}/components/or-sorting-v3/index.js +7 -7
  58. package/dist/{esm-deps → esm}/components/or-switch-v3/index.js +7 -5
  59. package/dist/{esm-deps → esm}/components/or-tabs-v3/index.js +7 -7
  60. package/dist/{esm-deps → esm}/components/or-tag-input-v3/index.js +9 -9
  61. package/dist/{esm-deps → esm}/components/or-tag-v3/index.js +7 -7
  62. package/dist/{esm-deps → esm}/components/or-tags-v3/index.js +7 -7
  63. package/dist/{esm-deps → esm}/components/or-textarea-v3/index.js +11 -9
  64. package/dist/{esm-deps → esm}/components/or-time-format-v3/index.js +5 -3
  65. package/dist/{esm-deps → esm}/components/or-time-picker-v3/index.js +9 -9
  66. package/dist/{esm-deps → esm}/components/or-time-range-picker-v3/index.js +9 -9
  67. package/dist/{esm-deps → esm}/components/or-toast-v3/index.js +8 -8
  68. package/dist/{esm-deps → esm}/components/or-tooltip-v3/index.js +8 -7
  69. package/dist/{esm-deps → esm}/components/or-tree-v3/index.js +1 -1
  70. package/dist/{esm-deps/constants-873d04a2.js → esm/constants-2e3ea701.js} +1 -1
  71. package/dist/esm/constants.d.ts +2 -0
  72. package/dist/{esm-deps/dom-CwV-xS38-5babad01.js → esm/dom-DzNS5tBj-6d9cf0ef.js} +15 -14
  73. package/dist/{esm-deps/extractCssVarName-IHa2pGlF-d99daa2a.js → esm/extractCssVarName-FgXy_HI0-52cc18b9.js} +1 -1
  74. package/dist/{esm-deps/formatTime-be5bf6b5.js → esm/formatTime-a528caa3.js} +1 -1
  75. package/dist/{esm-deps → esm}/index.js +51 -44
  76. package/dist/{esm-deps/searchItemsByLabel-BhinsABA-f7946859.js → esm/searchItemsByLabel-CPGAoUEr-0aa65960.js} +2 -2
  77. package/dist/esm/useValidationAttributes-Cilw02AC-255a86e4.js +209 -0
  78. package/package.json +11 -12
  79. package/src/constants.ts +1 -1
  80. package/dist/esm-deps/components/or-code-v3/index.js +0 -1575
  81. package/dist/esm-deps/components/or-list-v3/index.js +0 -3441
  82. package/dist/esm-deps/components/or-popover-v3/index.js +0 -1048
  83. package/dist/esm-deps/components/or-rich-text-editor-v3/index.js +0 -14612
  84. package/dist/esm-deps/constants.d.ts +0 -2
  85. package/dist/esm-deps/index-8a807135.js +0 -400
  86. package/dist/esm-deps/index-a90d6354.js +0 -19754
  87. package/dist/esm-deps/useValidationAttributes-DxhcSj_h-39556969.js +0 -4004
  88. /package/dist/{esm-deps → esm}/OrDateTimePickerPopoverHeader-e2b3f8f2.js +0 -0
  89. /package/dist/{esm-deps → esm}/components/index.d.ts +0 -0
  90. /package/dist/{esm-deps → esm}/components/or-autocomplete-v3/OrAutocomplete.vue.d.ts +0 -0
  91. /package/dist/{esm-deps → esm}/components/or-autocomplete-v3/index.d.ts +0 -0
  92. /package/dist/{esm-deps → esm}/components/or-autocomplete-v3/styles.d.ts +0 -0
  93. /package/dist/{esm-deps → esm}/components/or-autocomplete-v3/types.d.ts +0 -0
  94. /package/dist/{esm-deps → esm}/components/or-avatar-v3/OrAvatar.vue.d.ts +0 -0
  95. /package/dist/{esm-deps → esm}/components/or-avatar-v3/index.d.ts +0 -0
  96. /package/dist/{esm-deps → esm}/components/or-avatar-v3/props.d.ts +0 -0
  97. /package/dist/{esm-deps → esm}/components/or-avatar-v3/styles.d.ts +0 -0
  98. /package/dist/{esm-deps → esm}/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +0 -0
  99. /package/dist/{esm-deps → esm}/components/or-bottom-sheet-v3/hooks/useBottomSheetSwipeState.d.ts +0 -0
  100. /package/dist/{esm-deps → esm}/components/or-bottom-sheet-v3/index.d.ts +0 -0
  101. /package/dist/{esm-deps → esm}/components/or-bottom-sheet-v3/props.d.ts +0 -0
  102. /package/dist/{esm-deps → esm}/components/or-bottom-sheet-v3/styles.d.ts +0 -0
  103. /package/dist/{esm-deps → esm}/components/or-button-group-v3/OrButtonGroup.vue.d.ts +0 -0
  104. /package/dist/{esm-deps → esm}/components/or-button-group-v3/index.d.ts +0 -0
  105. /package/dist/{esm-deps → esm}/components/or-button-group-v3/index.js +0 -0
  106. /package/dist/{esm-deps → esm}/components/or-button-group-v3/styles.d.ts +0 -0
  107. /package/dist/{esm-deps → esm}/components/or-button-v3/OrButton.vue.d.ts +0 -0
  108. /package/dist/{esm-deps → esm}/components/or-button-v3/constants.d.ts +0 -0
  109. /package/dist/{esm-deps → esm}/components/or-button-v3/index.d.ts +0 -0
  110. /package/dist/{esm-deps → esm}/components/or-button-v3/props.d.ts +0 -0
  111. /package/dist/{esm-deps → esm}/components/or-button-v3/styles.d.ts +0 -0
  112. /package/dist/{esm-deps → esm}/components/or-card-collection-v3/OrCardCollection.vue.d.ts +0 -0
  113. /package/dist/{esm-deps → esm}/components/or-card-collection-v3/index.d.ts +0 -0
  114. /package/dist/{esm-deps → esm}/components/or-card-collection-v3/partials/OrCardCollectionView.vue2.vue.d.ts +0 -0
  115. /package/dist/{esm-deps → esm}/components/or-card-collection-v3/props.d.ts +0 -0
  116. /package/dist/{esm-deps → esm}/components/or-card-collection-v3/styles.d.ts +0 -0
  117. /package/dist/{esm-deps → esm}/components/or-card-collection-v3/types.d.ts +0 -0
  118. /package/dist/{esm-deps → esm}/components/or-card-v3/OrCard.vue.d.ts +0 -0
  119. /package/dist/{esm-deps → esm}/components/or-card-v3/index.d.ts +0 -0
  120. /package/dist/{esm-deps → esm}/components/or-card-v3/index.js +0 -0
  121. /package/dist/{esm-deps → esm}/components/or-card-v3/props.d.ts +0 -0
  122. /package/dist/{esm-deps → esm}/components/or-card-v3/styles.d.ts +0 -0
  123. /package/dist/{esm-deps → esm}/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +0 -0
  124. /package/dist/{esm-deps → esm}/components/or-checkbox-group-v3/index.d.ts +0 -0
  125. /package/dist/{esm-deps → esm}/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +0 -0
  126. /package/dist/{esm-deps → esm}/components/or-checkbox-tree-v3/index.d.ts +0 -0
  127. /package/dist/{esm-deps → esm}/components/or-checkbox-tree-v3/styles.d.ts +0 -0
  128. /package/dist/{esm-deps → esm}/components/or-checkbox-tree-v3/types.d.ts +0 -0
  129. /package/dist/{esm-deps → esm}/components/or-checkbox-tree-v3/utils/extractChildrenValues.d.ts +0 -0
  130. /package/dist/{esm-deps → esm}/components/or-checkbox-v3/OrCheckbox.vue.d.ts +0 -0
  131. /package/dist/{esm-deps → esm}/components/or-checkbox-v3/index.d.ts +0 -0
  132. /package/dist/{esm-deps → esm}/components/or-checkbox-v3/styles.d.ts +0 -0
  133. /package/dist/{esm-deps → esm}/components/or-checkbox-v3/types.d.ts +0 -0
  134. /package/dist/{esm-deps → esm}/components/or-code-v3/OrCode.vue.d.ts +0 -0
  135. /package/dist/{esm-deps → esm}/components/or-code-v3/index.d.ts +0 -0
  136. /package/dist/{esm-deps → esm}/components/or-code-v3/libs.d.ts +0 -0
  137. /package/dist/{esm-deps → esm}/components/or-code-v3/partials/OrCodeControl.vue.d.ts +0 -0
  138. /package/dist/{esm-deps → esm}/components/or-code-v3/props.d.ts +0 -0
  139. /package/dist/{esm-deps → esm}/components/or-code-v3/styles.d.ts +0 -0
  140. /package/dist/{esm-deps → esm}/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +0 -0
  141. /package/dist/{esm-deps → esm}/components/or-combined-input-v3/index.d.ts +0 -0
  142. /package/dist/{esm-deps → esm}/components/or-combined-input-v3/index.js +0 -0
  143. /package/dist/{esm-deps → esm}/components/or-combined-input-v3/styles.d.ts +0 -0
  144. /package/dist/{esm-deps → esm}/components/or-confirm-v3/OrConfirm.vue.d.ts +0 -0
  145. /package/dist/{esm-deps → esm}/components/or-confirm-v3/index.d.ts +0 -0
  146. /package/dist/{esm-deps → esm}/components/or-confirm-v3/props.d.ts +0 -0
  147. /package/dist/{esm-deps → esm}/components/or-confirm-v3/styles.d.ts +0 -0
  148. /package/dist/{esm-deps → esm}/components/or-context-menu-v3/OrContextMenu.vue.d.ts +0 -0
  149. /package/dist/{esm-deps → esm}/components/or-context-menu-v3/index.d.ts +0 -0
  150. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/OrDataGrid.vue.d.ts +0 -0
  151. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/index.d.ts +0 -0
  152. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/index.d.ts +0 -0
  153. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-footer/OrDataGridFooter.vue.d.ts +0 -0
  154. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-footer/styles.d.ts +0 -0
  155. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-header/OrDataGridHeader.vue.d.ts +0 -0
  156. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-header/styles.d.ts +0 -0
  157. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table/OrDataGridTable.vue.d.ts +0 -0
  158. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table/styles.d.ts +0 -0
  159. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-content/OrDataGridTableContent.vue.d.ts +0 -0
  160. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-content/styles.d.ts +0 -0
  161. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-content-cell/OrDataGridTableContentCell.vue.d.ts +0 -0
  162. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-content-cell/styles.d.ts +0 -0
  163. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-content-row/OrDataGridTableContentRow.vue.d.ts +0 -0
  164. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-content-row/styles.d.ts +0 -0
  165. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-footer/OrDataGridTableFooter.vue.d.ts +0 -0
  166. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-footer/styles.d.ts +0 -0
  167. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-footer-cell/OrDataGridTableFooterCell.vue.d.ts +0 -0
  168. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-footer-cell/styles.d.ts +0 -0
  169. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-footer-row/OrDataGridTableFooterRow.vue.d.ts +0 -0
  170. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-footer-row/styles.d.ts +0 -0
  171. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-header/OrDataGridTableHeader.vue.d.ts +0 -0
  172. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-header/styles.d.ts +0 -0
  173. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-header-cell/OrDataGridTableHeaderCell.vue.d.ts +0 -0
  174. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-header-cell/styles.d.ts +0 -0
  175. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-header-row/OrDataGridTableHeaderRow.vue.d.ts +0 -0
  176. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-header-row/styles.d.ts +0 -0
  177. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-placeholder/OrDataGridTablePlaceholder.vue.d.ts +0 -0
  178. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-table-placeholder/styles.d.ts +0 -0
  179. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-toolbar/OrDataGridToolbar.vue.d.ts +0 -0
  180. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/partials/or-data-grid-toolbar/styles.d.ts +0 -0
  181. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/styles.d.ts +0 -0
  182. /package/dist/{esm-deps → esm}/components/or-data-grid-v3/types.d.ts +0 -0
  183. /package/dist/{esm-deps → esm}/components/or-date-format-v3/OrDateFormat.vue.d.ts +0 -0
  184. /package/dist/{esm-deps → esm}/components/or-date-format-v3/index.d.ts +0 -0
  185. /package/dist/{esm-deps → esm}/components/or-date-format-v3/styles.d.ts +0 -0
  186. /package/dist/{esm-deps → esm}/components/or-date-picker-v3/OrDatePicker.vue.d.ts +0 -0
  187. /package/dist/{esm-deps → esm}/components/or-date-picker-v3/index.d.ts +0 -0
  188. /package/dist/{esm-deps → esm}/components/or-date-picker-v3/styles.d.ts +0 -0
  189. /package/dist/{esm-deps → esm}/components/or-date-range-picker-v3/OrDateRangePicker.vue.d.ts +0 -0
  190. /package/dist/{esm-deps → esm}/components/or-date-range-picker-v3/index.d.ts +0 -0
  191. /package/dist/{esm-deps → esm}/components/or-date-range-picker-v3/styles.d.ts +0 -0
  192. /package/dist/{esm-deps → esm}/components/or-date-range-picker-v3/types.d.ts +0 -0
  193. /package/dist/{esm-deps → esm}/components/or-date-time-format-v3/OrDateTimeFormat.vue.d.ts +0 -0
  194. /package/dist/{esm-deps → esm}/components/or-date-time-format-v3/index.d.ts +0 -0
  195. /package/dist/{esm-deps → esm}/components/or-date-time-format-v3/styles.d.ts +0 -0
  196. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +0 -0
  197. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/index.d.ts +0 -0
  198. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/index.d.ts +0 -0
  199. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue.d.ts +0 -0
  200. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/styles.d.ts +0 -0
  201. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts +0 -0
  202. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -0
  203. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue.d.ts +0 -0
  204. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/styles.d.ts +0 -0
  205. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +0 -0
  206. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/styles.d.ts +0 -0
  207. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue.d.ts +0 -0
  208. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/styles.d.ts +0 -0
  209. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue.d.ts +0 -0
  210. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/styles.d.ts +0 -0
  211. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue.d.ts +0 -0
  212. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/styles.d.ts +0 -0
  213. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +0 -0
  214. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/styles.d.ts +0 -0
  215. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/styles.d.ts +0 -0
  216. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/types.d.ts +0 -0
  217. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/utils/formatDate.d.ts +0 -0
  218. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/utils/formatMobileDate.d.ts +0 -0
  219. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/utils/formatMobileTime.d.ts +0 -0
  220. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/utils/formatTime.d.ts +0 -0
  221. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/utils/getCurrentDate.d.ts +0 -0
  222. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/utils/getNextMonthDate.d.ts +0 -0
  223. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/utils/index.d.ts +0 -0
  224. /package/dist/{esm-deps → esm}/components/or-date-time-picker-v3/utils/scrollToElementWithinContainer.d.ts +0 -0
  225. /package/dist/{esm-deps → esm}/components/or-drawer-v3/OrDrawer.vue.d.ts +0 -0
  226. /package/dist/{esm-deps → esm}/components/or-drawer-v3/index.d.ts +0 -0
  227. /package/dist/{esm-deps → esm}/components/or-drawer-v3/styles.d.ts +0 -0
  228. /package/dist/{esm-deps → esm}/components/or-drawer-v3/types.d.ts +0 -0
  229. /package/dist/{esm-deps → esm}/components/or-drop-area-v3/OrDropArea.vue.d.ts +0 -0
  230. /package/dist/{esm-deps → esm}/components/or-drop-area-v3/index.d.ts +0 -0
  231. /package/dist/{esm-deps → esm}/components/or-drop-area-v3/props.d.ts +0 -0
  232. /package/dist/{esm-deps → esm}/components/or-drop-area-v3/styles.d.ts +0 -0
  233. /package/dist/{esm-deps → esm}/components/or-drop-area-v3/utils/approximateFileSize.d.ts +0 -0
  234. /package/dist/{esm-deps → esm}/components/or-drop-area-v3/utils/index.d.ts +0 -0
  235. /package/dist/{esm-deps → esm}/components/or-editor-tabs-v3/OrEditorTabs.vue.d.ts +0 -0
  236. /package/dist/{esm-deps → esm}/components/or-editor-tabs-v3/constants.d.ts +0 -0
  237. /package/dist/{esm-deps → esm}/components/or-editor-tabs-v3/index.d.ts +0 -0
  238. /package/dist/{esm-deps → esm}/components/or-editor-tabs-v3/partials/index.d.ts +0 -0
  239. /package/dist/{esm-deps → esm}/components/or-editor-tabs-v3/partials/or-editor-tabs-item/OrEditorTabsItem.vue.d.ts +0 -0
  240. /package/dist/{esm-deps → esm}/components/or-editor-tabs-v3/partials/or-editor-tabs-item/styles.d.ts +0 -0
  241. /package/dist/{esm-deps → esm}/components/or-editor-tabs-v3/props.d.ts +0 -0
  242. /package/dist/{esm-deps → esm}/components/or-editor-tabs-v3/styles.d.ts +0 -0
  243. /package/dist/{esm-deps → esm}/components/or-empty-state-v3/OrEmptyState.vue.d.ts +0 -0
  244. /package/dist/{esm-deps → esm}/components/or-empty-state-v3/index.d.ts +0 -0
  245. /package/dist/{esm-deps → esm}/components/or-empty-state-v3/index.js +0 -0
  246. /package/dist/{esm-deps → esm}/components/or-empty-state-v3/props.d.ts +0 -0
  247. /package/dist/{esm-deps → esm}/components/or-empty-state-v3/styles.d.ts +0 -0
  248. /package/dist/{esm-deps → esm}/components/or-empty-state-v3/types.d.ts +0 -0
  249. /package/dist/{esm-deps → esm}/components/or-error-tag-v3/OrErrorTag.vue.d.ts +0 -0
  250. /package/dist/{esm-deps → esm}/components/or-error-tag-v3/index.d.ts +0 -0
  251. /package/dist/{esm-deps → esm}/components/or-error-tag-v3/index.js +0 -0
  252. /package/dist/{esm-deps → esm}/components/or-error-tag-v3/styles.d.ts +0 -0
  253. /package/dist/{esm-deps → esm}/components/or-error-v3/OrError.vue.d.ts +0 -0
  254. /package/dist/{esm-deps → esm}/components/or-error-v3/index.d.ts +0 -0
  255. /package/dist/{esm-deps → esm}/components/or-error-v3/index.js +0 -0
  256. /package/dist/{esm-deps → esm}/components/or-error-v3/styles.d.ts +0 -0
  257. /package/dist/{esm-deps → esm}/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +0 -0
  258. /package/dist/{esm-deps → esm}/components/or-expansion-panel-v3/index.d.ts +0 -0
  259. /package/dist/{esm-deps → esm}/components/or-expansion-panel-v3/props.d.ts +0 -0
  260. /package/dist/{esm-deps → esm}/components/or-expansion-panel-v3/styles.d.ts +0 -0
  261. /package/dist/{esm-deps → esm}/components/or-fab-v3/OrFab.vue.d.ts +0 -0
  262. /package/dist/{esm-deps → esm}/components/or-fab-v3/constants.d.ts +0 -0
  263. /package/dist/{esm-deps → esm}/components/or-fab-v3/index.d.ts +0 -0
  264. /package/dist/{esm-deps → esm}/components/or-fab-v3/props.d.ts +0 -0
  265. /package/dist/{esm-deps → esm}/components/or-fab-v3/styles.d.ts +0 -0
  266. /package/dist/{esm-deps → esm}/components/or-filter-popover-v3/OrFilterPopover.vue.d.ts +0 -0
  267. /package/dist/{esm-deps → esm}/components/or-filter-popover-v3/index.d.ts +0 -0
  268. /package/dist/{esm-deps → esm}/components/or-filter-popover-v3/styles.d.ts +0 -0
  269. /package/dist/{esm-deps → esm}/components/or-filter-trigger-v3/OrFilterTrigger.vue.d.ts +0 -0
  270. /package/dist/{esm-deps → esm}/components/or-filter-trigger-v3/index.d.ts +0 -0
  271. /package/dist/{esm-deps → esm}/components/or-filter-trigger-v3/styles.d.ts +0 -0
  272. /package/dist/{esm-deps → esm}/components/or-filter-v3/OrFilter.vue.d.ts +0 -0
  273. /package/dist/{esm-deps → esm}/components/or-filter-v3/index.d.ts +0 -0
  274. /package/dist/{esm-deps → esm}/components/or-filter-v3/styles.d.ts +0 -0
  275. /package/dist/{esm-deps → esm}/components/or-form-group-v3/OrFormGroup.vue.d.ts +0 -0
  276. /package/dist/{esm-deps → esm}/components/or-form-group-v3/index.d.ts +0 -0
  277. /package/dist/{esm-deps → esm}/components/or-form-group-v3/index.js +0 -0
  278. /package/dist/{esm-deps → esm}/components/or-form-group-v3/styles.d.ts +0 -0
  279. /package/dist/{esm-deps → esm}/components/or-form-group-v3/types.d.ts +0 -0
  280. /package/dist/{esm-deps → esm}/components/or-hint-v3/OrHint.vue.d.ts +0 -0
  281. /package/dist/{esm-deps → esm}/components/or-hint-v3/index.d.ts +0 -0
  282. /package/dist/{esm-deps → esm}/components/or-hint-v3/index.js +0 -0
  283. /package/dist/{esm-deps → esm}/components/or-hint-v3/styles.d.ts +0 -0
  284. /package/dist/{esm-deps → esm}/components/or-icon-button-v3/OrIconButton.vue.d.ts +0 -0
  285. /package/dist/{esm-deps → esm}/components/or-icon-button-v3/constants.d.ts +0 -0
  286. /package/dist/{esm-deps → esm}/components/or-icon-button-v3/index.d.ts +0 -0
  287. /package/dist/{esm-deps → esm}/components/or-icon-button-v3/props.d.ts +0 -0
  288. /package/dist/{esm-deps → esm}/components/or-icon-button-v3/styles.d.ts +0 -0
  289. /package/dist/{esm-deps → esm}/components/or-icon-v3/OrIcon.vue.d.ts +0 -0
  290. /package/dist/{esm-deps → esm}/components/or-icon-v3/index.d.ts +0 -0
  291. /package/dist/{esm-deps → esm}/components/or-icon-v3/index.js +0 -0
  292. /package/dist/{esm-deps → esm}/components/or-icon-v3/props.d.ts +0 -0
  293. /package/dist/{esm-deps → esm}/components/or-icon-v3/styles.d.ts +0 -0
  294. /package/dist/{esm-deps → esm}/components/or-indicator-v3/OrIndicator.vue.d.ts +0 -0
  295. /package/dist/{esm-deps → esm}/components/or-indicator-v3/index.d.ts +0 -0
  296. /package/dist/{esm-deps → esm}/components/or-indicator-v3/index.js +0 -0
  297. /package/dist/{esm-deps → esm}/components/or-indicator-v3/props.d.ts +0 -0
  298. /package/dist/{esm-deps → esm}/components/or-indicator-v3/styles.d.ts +0 -0
  299. /package/dist/{esm-deps → esm}/components/or-inline-input-box-v3/OrInlineInputBox.vue.d.ts +0 -0
  300. /package/dist/{esm-deps → esm}/components/or-inline-input-box-v3/index.d.ts +0 -0
  301. /package/dist/{esm-deps → esm}/components/or-inline-input-box-v3/index.js +0 -0
  302. /package/dist/{esm-deps → esm}/components/or-inline-input-box-v3/props.d.ts +0 -0
  303. /package/dist/{esm-deps → esm}/components/or-inline-input-box-v3/styles.d.ts +0 -0
  304. /package/dist/{esm-deps → esm}/components/or-inline-input-v3/OrInlineInput.vue.d.ts +0 -0
  305. /package/dist/{esm-deps → esm}/components/or-inline-input-v3/index.d.ts +0 -0
  306. /package/dist/{esm-deps → esm}/components/or-inline-input-v3/styles.d.ts +0 -0
  307. /package/dist/{esm-deps → esm}/components/or-inline-input-v3/types.d.ts +0 -0
  308. /package/dist/{esm-deps → esm}/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +0 -0
  309. /package/dist/{esm-deps → esm}/components/or-inline-textarea-v3/index.d.ts +0 -0
  310. /package/dist/{esm-deps → esm}/components/or-inline-textarea-v3/styles.d.ts +0 -0
  311. /package/dist/{esm-deps → esm}/components/or-inline-textarea-v3/types.d.ts +0 -0
  312. /package/dist/{esm-deps → esm}/components/or-input-box-v3/OrInputBox.vue.d.ts +0 -0
  313. /package/dist/{esm-deps → esm}/components/or-input-box-v3/index.d.ts +0 -0
  314. /package/dist/{esm-deps → esm}/components/or-input-box-v3/index.js +0 -0
  315. /package/dist/{esm-deps → esm}/components/or-input-box-v3/partials/or-input-box-addon/OrInputBoxAddon.vue.d.ts +0 -0
  316. /package/dist/{esm-deps → esm}/components/or-input-box-v3/partials/or-input-box-addon/styles.d.ts +0 -0
  317. /package/dist/{esm-deps → esm}/components/or-input-box-v3/styles.d.ts +0 -0
  318. /package/dist/{esm-deps → esm}/components/or-input-box-v3/types.d.ts +0 -0
  319. /package/dist/{esm-deps → esm}/components/or-input-v3/OrInput.vue.d.ts +0 -0
  320. /package/dist/{esm-deps → esm}/components/or-input-v3/index.d.ts +0 -0
  321. /package/dist/{esm-deps → esm}/components/or-input-v3/styles.d.ts +0 -0
  322. /package/dist/{esm-deps → esm}/components/or-input-v3/types.d.ts +0 -0
  323. /package/dist/{esm-deps → esm}/components/or-label-v3/OrLabel.vue.d.ts +0 -0
  324. /package/dist/{esm-deps → esm}/components/or-label-v3/index.d.ts +0 -0
  325. /package/dist/{esm-deps → esm}/components/or-label-v3/index.js +0 -0
  326. /package/dist/{esm-deps → esm}/components/or-label-v3/styles.d.ts +0 -0
  327. /package/dist/{esm-deps → esm}/components/or-label-v3/types.d.ts +0 -0
  328. /package/dist/{esm-deps → esm}/components/or-link-v3/OrLink.vue.d.ts +0 -0
  329. /package/dist/{esm-deps → esm}/components/or-link-v3/index.d.ts +0 -0
  330. /package/dist/{esm-deps → esm}/components/or-link-v3/index.js +0 -0
  331. /package/dist/{esm-deps → esm}/components/or-link-v3/props.d.ts +0 -0
  332. /package/dist/{esm-deps → esm}/components/or-link-v3/styles.d.ts +0 -0
  333. /package/dist/{esm-deps → esm}/components/or-list-v3/OrList.vue.d.ts +0 -0
  334. /package/dist/{esm-deps → esm}/components/or-list-v3/index.d.ts +0 -0
  335. /package/dist/{esm-deps → esm}/components/or-list-v3/partials/index.d.ts +0 -0
  336. /package/dist/{esm-deps → esm}/components/or-list-v3/partials/or-list-item/OrListItem.vue.d.ts +0 -0
  337. /package/dist/{esm-deps → esm}/components/or-list-v3/partials/or-list-item/styles.d.ts +0 -0
  338. /package/dist/{esm-deps → esm}/components/or-list-v3/styles.d.ts +0 -0
  339. /package/dist/{esm-deps → esm}/components/or-list-v3/types.d.ts +0 -0
  340. /package/dist/{esm-deps → esm}/components/or-loader-v3/OrLoader.vue.d.ts +0 -0
  341. /package/dist/{esm-deps → esm}/components/or-loader-v3/index.d.ts +0 -0
  342. /package/dist/{esm-deps → esm}/components/or-loader-v3/index.js +0 -0
  343. /package/dist/{esm-deps → esm}/components/or-loader-v3/props.d.ts +0 -0
  344. /package/dist/{esm-deps → esm}/components/or-loader-v3/styles.d.ts +0 -0
  345. /package/dist/{esm-deps → esm}/components/or-menu-item-v3/OrMenuItem.vue.d.ts +0 -0
  346. /package/dist/{esm-deps → esm}/components/or-menu-item-v3/index.d.ts +0 -0
  347. /package/dist/{esm-deps → esm}/components/or-menu-item-v3/styles.d.ts +0 -0
  348. /package/dist/{esm-deps → esm}/components/or-menu-v3/OrMenu.vue.d.ts +0 -0
  349. /package/dist/{esm-deps → esm}/components/or-menu-v3/index.d.ts +0 -0
  350. /package/dist/{esm-deps → esm}/components/or-menu-v3/styles.d.ts +0 -0
  351. /package/dist/{esm-deps → esm}/components/or-modal-v3/OrModal.vue.d.ts +0 -0
  352. /package/dist/{esm-deps → esm}/components/or-modal-v3/index.d.ts +0 -0
  353. /package/dist/{esm-deps → esm}/components/or-modal-v3/partials/or-modal-content/OrModalContent.vue.d.ts +0 -0
  354. /package/dist/{esm-deps → esm}/components/or-modal-v3/partials/or-modal-content/styles.d.ts +0 -0
  355. /package/dist/{esm-deps → esm}/components/or-modal-v3/partials/or-modal-footer/OrModalFooter.vue.d.ts +0 -0
  356. /package/dist/{esm-deps → esm}/components/or-modal-v3/partials/or-modal-footer/styles.d.ts +0 -0
  357. /package/dist/{esm-deps → esm}/components/or-modal-v3/partials/or-modal-header/OrModalHeader.vue.d.ts +0 -0
  358. /package/dist/{esm-deps → esm}/components/or-modal-v3/partials/or-modal-header/styles.d.ts +0 -0
  359. /package/dist/{esm-deps → esm}/components/or-modal-v3/props.d.ts +0 -0
  360. /package/dist/{esm-deps → esm}/components/or-modal-v3/styles.d.ts +0 -0
  361. /package/dist/{esm-deps → esm}/components/or-notification-v3/OrNotification.vue.d.ts +0 -0
  362. /package/dist/{esm-deps → esm}/components/or-notification-v3/index.d.ts +0 -0
  363. /package/dist/{esm-deps → esm}/components/or-notification-v3/props.d.ts +0 -0
  364. /package/dist/{esm-deps → esm}/components/or-notification-v3/styles.d.ts +0 -0
  365. /package/dist/{esm-deps → esm}/components/or-overlay-v3/OrOverlay.vue.d.ts +0 -0
  366. /package/dist/{esm-deps → esm}/components/or-overlay-v3/constants.d.ts +0 -0
  367. /package/dist/{esm-deps → esm}/components/or-overlay-v3/index.d.ts +0 -0
  368. /package/dist/{esm-deps → esm}/components/or-overlay-v3/styles.d.ts +0 -0
  369. /package/dist/{esm-deps → esm}/components/or-pagination-v3/OrPagination.vue.d.ts +0 -0
  370. /package/dist/{esm-deps → esm}/components/or-pagination-v3/index.d.ts +0 -0
  371. /package/dist/{esm-deps → esm}/components/or-pagination-v3/styles.d.ts +0 -0
  372. /package/dist/{esm-deps → esm}/components/or-pagination-v3/types.d.ts +0 -0
  373. /package/dist/{esm-deps → esm}/components/or-popover-v3/OrPopover.vue.d.ts +0 -0
  374. /package/dist/{esm-deps → esm}/components/or-popover-v3/hooks/types.d.ts +0 -0
  375. /package/dist/{esm-deps → esm}/components/or-popover-v3/hooks/useFloating.d.ts +0 -0
  376. /package/dist/{esm-deps → esm}/components/or-popover-v3/index.d.ts +0 -0
  377. /package/dist/{esm-deps → esm}/components/or-popover-v3/props.d.ts +0 -0
  378. /package/dist/{esm-deps → esm}/components/or-popover-v3/styles.d.ts +0 -0
  379. /package/dist/{esm-deps → esm}/components/or-popover-v3/utils/index.d.ts +0 -0
  380. /package/dist/{esm-deps → esm}/components/or-popover-v3/utils/isPrevented.d.ts +0 -0
  381. /package/dist/{esm-deps → esm}/components/or-progress-v3/OrProgress.vue.d.ts +0 -0
  382. /package/dist/{esm-deps → esm}/components/or-progress-v3/index.d.ts +0 -0
  383. /package/dist/{esm-deps → esm}/components/or-progress-v3/props.d.ts +0 -0
  384. /package/dist/{esm-deps → esm}/components/or-progress-v3/styles.d.ts +0 -0
  385. /package/dist/{esm-deps → esm}/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +0 -0
  386. /package/dist/{esm-deps → esm}/components/or-radio-group-v3/index.d.ts +0 -0
  387. /package/dist/{esm-deps → esm}/components/or-radio-group-v3/types.d.ts +0 -0
  388. /package/dist/{esm-deps → esm}/components/or-radio-v3/OrRadio.vue.d.ts +0 -0
  389. /package/dist/{esm-deps → esm}/components/or-radio-v3/index.d.ts +0 -0
  390. /package/dist/{esm-deps → esm}/components/or-radio-v3/styles.d.ts +0 -0
  391. /package/dist/{esm-deps → esm}/components/or-radio-v3/types.d.ts +0 -0
  392. /package/dist/{esm-deps → esm}/components/or-range-slider-v3/OrRangeSlider.vue.d.ts +0 -0
  393. /package/dist/{esm-deps → esm}/components/or-range-slider-v3/index.d.ts +0 -0
  394. /package/dist/{esm-deps → esm}/components/or-range-slider-v3/styles.d.ts +0 -0
  395. /package/dist/{esm-deps → esm}/components/or-range-slider-v3/types.d.ts +0 -0
  396. /package/dist/{esm-deps → esm}/components/or-rating-v3/OrRating.vue.d.ts +0 -0
  397. /package/dist/{esm-deps → esm}/components/or-rating-v3/index.d.ts +0 -0
  398. /package/dist/{esm-deps → esm}/components/or-rating-v3/styles.d.ts +0 -0
  399. /package/dist/{esm-deps → esm}/components/or-rating-v3/types.d.ts +0 -0
  400. /package/dist/{esm-deps → esm}/components/or-resizeable-panel-v3/OrResizeablePanel.vue.d.ts +0 -0
  401. /package/dist/{esm-deps → esm}/components/or-resizeable-panel-v3/index.d.ts +0 -0
  402. /package/dist/{esm-deps → esm}/components/or-resizeable-panel-v3/props.d.ts +0 -0
  403. /package/dist/{esm-deps → esm}/components/or-resizeable-panel-v3/styles.d.ts +0 -0
  404. /package/dist/{esm-deps → esm}/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -0
  405. /package/dist/{esm-deps → esm}/components/or-rich-text-editor-v3/index.d.ts +0 -0
  406. /package/dist/{esm-deps → esm}/components/or-rich-text-editor-v3/props.d.ts +0 -0
  407. /package/dist/{esm-deps → esm}/components/or-rich-text-editor-v3/styles.d.ts +0 -0
  408. /package/dist/{esm-deps → esm}/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -0
  409. /package/dist/{esm-deps → esm}/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -0
  410. /package/dist/{esm-deps → esm}/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -0
  411. /package/dist/{esm-deps → esm}/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -0
  412. /package/dist/{esm-deps → esm}/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -0
  413. /package/dist/{esm-deps → esm}/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -0
  414. /package/dist/{esm-deps → esm}/components/or-rich-tooltip-v3/OrRichTooltip.vue.d.ts +0 -0
  415. /package/dist/{esm-deps → esm}/components/or-rich-tooltip-v3/index.d.ts +0 -0
  416. /package/dist/{esm-deps → esm}/components/or-rich-tooltip-v3/styles.d.ts +0 -0
  417. /package/dist/{esm-deps → esm}/components/or-rich-tooltip-v3/types.d.ts +0 -0
  418. /package/dist/{esm-deps → esm}/components/or-search-v3/OrSearch.vue.d.ts +0 -0
  419. /package/dist/{esm-deps → esm}/components/or-search-v3/index.d.ts +0 -0
  420. /package/dist/{esm-deps → esm}/components/or-search-v3/types.d.ts +0 -0
  421. /package/dist/{esm-deps → esm}/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +0 -0
  422. /package/dist/{esm-deps → esm}/components/or-segmented-control-v3/constants.d.ts +0 -0
  423. /package/dist/{esm-deps → esm}/components/or-segmented-control-v3/index.d.ts +0 -0
  424. /package/dist/{esm-deps → esm}/components/or-segmented-control-v3/partials/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +0 -0
  425. /package/dist/{esm-deps → esm}/components/or-segmented-control-v3/partials/or-segmented-control-item/styles.d.ts +0 -0
  426. /package/dist/{esm-deps → esm}/components/or-segmented-control-v3/props.d.ts +0 -0
  427. /package/dist/{esm-deps → esm}/components/or-segmented-control-v3/styles.d.ts +0 -0
  428. /package/dist/{esm-deps → esm}/components/or-segmented-control-v3/types.d.ts +0 -0
  429. /package/dist/{esm-deps → esm}/components/or-select-v3/OrSelect.vue.d.ts +0 -0
  430. /package/dist/{esm-deps → esm}/components/or-select-v3/index.d.ts +0 -0
  431. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/index.d.ts +0 -0
  432. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-control-input/OrSelectControlInput.vue.d.ts +0 -0
  433. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-control-input/index.d.ts +0 -0
  434. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-control-input/styles.d.ts +0 -0
  435. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-multiple-control/OrSelectMultipleControl.vue.d.ts +0 -0
  436. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-multiple-control/index.d.ts +0 -0
  437. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-multiple-control/styles.d.ts +0 -0
  438. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-placeholder/OrSelectPlaceholder.vue.d.ts +0 -0
  439. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-placeholder/index.d.ts +0 -0
  440. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-placeholder/styles.d.ts +0 -0
  441. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-single-control/OrSelectSingleControl.vue.d.ts +0 -0
  442. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-single-control/index.d.ts +0 -0
  443. /package/dist/{esm-deps → esm}/components/or-select-v3/partials/or-select-single-control/styles.d.ts +0 -0
  444. /package/dist/{esm-deps → esm}/components/or-select-v3/styles.d.ts +0 -0
  445. /package/dist/{esm-deps → esm}/components/or-select-v3/types.d.ts +0 -0
  446. /package/dist/{esm-deps → esm}/components/or-sidebar-v3/OrSidebar.vue.d.ts +0 -0
  447. /package/dist/{esm-deps → esm}/components/or-sidebar-v3/index.d.ts +0 -0
  448. /package/dist/{esm-deps → esm}/components/or-sidebar-v3/props.d.ts +0 -0
  449. /package/dist/{esm-deps → esm}/components/or-sidebar-v3/styles.d.ts +0 -0
  450. /package/dist/{esm-deps → esm}/components/or-skeleton-v3/index.d.ts +0 -0
  451. /package/dist/{esm-deps → esm}/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.vue.d.ts +0 -0
  452. /package/dist/{esm-deps → esm}/components/or-skeleton-v3/or-skeleton-circle-v3/index.d.ts +0 -0
  453. /package/dist/{esm-deps → esm}/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.vue.d.ts +0 -0
  454. /package/dist/{esm-deps → esm}/components/or-skeleton-v3/or-skeleton-rect-v3/index.d.ts +0 -0
  455. /package/dist/{esm-deps → esm}/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.vue.d.ts +0 -0
  456. /package/dist/{esm-deps → esm}/components/or-skeleton-v3/or-skeleton-text-v3/index.d.ts +0 -0
  457. /package/dist/{esm-deps → esm}/components/or-skeleton-v3/styles.d.ts +0 -0
  458. /package/dist/{esm-deps → esm}/components/or-slider-v3/OrSlider.vue.d.ts +0 -0
  459. /package/dist/{esm-deps → esm}/components/or-slider-v3/index.d.ts +0 -0
  460. /package/dist/{esm-deps → esm}/components/or-slider-v3/styles.d.ts +0 -0
  461. /package/dist/{esm-deps → esm}/components/or-slider-v3/types.d.ts +0 -0
  462. /package/dist/{esm-deps → esm}/components/or-sorting-v3/OrSorting.vue.d.ts +0 -0
  463. /package/dist/{esm-deps → esm}/components/or-sorting-v3/index.d.ts +0 -0
  464. /package/dist/{esm-deps → esm}/components/or-sorting-v3/styles.d.ts +0 -0
  465. /package/dist/{esm-deps → esm}/components/or-sorting-v3/types.d.ts +0 -0
  466. /package/dist/{esm-deps → esm}/components/or-status-v3/OrStatus.vue.d.ts +0 -0
  467. /package/dist/{esm-deps → esm}/components/or-status-v3/index.d.ts +0 -0
  468. /package/dist/{esm-deps → esm}/components/or-status-v3/index.js +0 -0
  469. /package/dist/{esm-deps → esm}/components/or-status-v3/props.d.ts +0 -0
  470. /package/dist/{esm-deps → esm}/components/or-status-v3/styles.d.ts +0 -0
  471. /package/dist/{esm-deps → esm}/components/or-switch-v3/OrSwitch.vue.d.ts +0 -0
  472. /package/dist/{esm-deps → esm}/components/or-switch-v3/index.d.ts +0 -0
  473. /package/dist/{esm-deps → esm}/components/or-switch-v3/styles.d.ts +0 -0
  474. /package/dist/{esm-deps → esm}/components/or-switch-v3/types.d.ts +0 -0
  475. /package/dist/{esm-deps → esm}/components/or-tab-v3/OrTab.vue.d.ts +0 -0
  476. /package/dist/{esm-deps → esm}/components/or-tab-v3/index.d.ts +0 -0
  477. /package/dist/{esm-deps → esm}/components/or-tab-v3/index.js +0 -0
  478. /package/dist/{esm-deps → esm}/components/or-tab-v3/styles.d.ts +0 -0
  479. /package/dist/{esm-deps → esm}/components/or-tabs-v3/OrTabs.vue.d.ts +0 -0
  480. /package/dist/{esm-deps → esm}/components/or-tabs-v3/index.d.ts +0 -0
  481. /package/dist/{esm-deps → esm}/components/or-tabs-v3/props.d.ts +0 -0
  482. /package/dist/{esm-deps → esm}/components/or-tabs-v3/styles.d.ts +0 -0
  483. /package/dist/{esm-deps → esm}/components/or-tabs-v3/types.d.ts +0 -0
  484. /package/dist/{esm-deps → esm}/components/or-tag-input-v3/OrTagInput.vue.d.ts +0 -0
  485. /package/dist/{esm-deps → esm}/components/or-tag-input-v3/index.d.ts +0 -0
  486. /package/dist/{esm-deps → esm}/components/or-tag-input-v3/styles.d.ts +0 -0
  487. /package/dist/{esm-deps → esm}/components/or-tag-input-v3/types.d.ts +0 -0
  488. /package/dist/{esm-deps → esm}/components/or-tag-v3/OrTag.vue.d.ts +0 -0
  489. /package/dist/{esm-deps → esm}/components/or-tag-v3/index.d.ts +0 -0
  490. /package/dist/{esm-deps → esm}/components/or-tag-v3/props.d.ts +0 -0
  491. /package/dist/{esm-deps → esm}/components/or-tag-v3/styles.d.ts +0 -0
  492. /package/dist/{esm-deps → esm}/components/or-tags-v3/OrTags.vue.d.ts +0 -0
  493. /package/dist/{esm-deps → esm}/components/or-tags-v3/index.d.ts +0 -0
  494. /package/dist/{esm-deps → esm}/components/or-tags-v3/props.d.ts +0 -0
  495. /package/dist/{esm-deps → esm}/components/or-tags-v3/styles.d.ts +0 -0
  496. /package/dist/{esm-deps → esm}/components/or-tags-v3/types.d.ts +0 -0
  497. /package/dist/{esm-deps → esm}/components/or-tags-v3/utils/castToTag.d.ts +0 -0
  498. /package/dist/{esm-deps → esm}/components/or-teleport-v3/OrTeleport.vue2.vue.d.ts +0 -0
  499. /package/dist/{esm-deps → esm}/components/or-teleport-v3/index.d.ts +0 -0
  500. /package/dist/{esm-deps → esm}/components/or-teleport-v3/index.js +0 -0
  501. /package/dist/{esm-deps → esm}/components/or-text-v3/OrText.vue.d.ts +0 -0
  502. /package/dist/{esm-deps → esm}/components/or-text-v3/index.d.ts +0 -0
  503. /package/dist/{esm-deps → esm}/components/or-text-v3/index.js +0 -0
  504. /package/dist/{esm-deps → esm}/components/or-text-v3/styles.d.ts +0 -0
  505. /package/dist/{esm-deps → esm}/components/or-textarea-v3/OrTextarea.vue.d.ts +0 -0
  506. /package/dist/{esm-deps → esm}/components/or-textarea-v3/index.d.ts +0 -0
  507. /package/dist/{esm-deps → esm}/components/or-textarea-v3/styles.d.ts +0 -0
  508. /package/dist/{esm-deps → esm}/components/or-textarea-v3/types.d.ts +0 -0
  509. /package/dist/{esm-deps → esm}/components/or-time-format-v3/OrTimeFormat.vue.d.ts +0 -0
  510. /package/dist/{esm-deps → esm}/components/or-time-format-v3/index.d.ts +0 -0
  511. /package/dist/{esm-deps → esm}/components/or-time-format-v3/styles.d.ts +0 -0
  512. /package/dist/{esm-deps → esm}/components/or-time-picker-v3/OrTimePicker.vue.d.ts +0 -0
  513. /package/dist/{esm-deps → esm}/components/or-time-picker-v3/index.d.ts +0 -0
  514. /package/dist/{esm-deps → esm}/components/or-time-picker-v3/styles.d.ts +0 -0
  515. /package/dist/{esm-deps → esm}/components/or-time-range-picker-v3/OrTimeRangePicker.vue.d.ts +0 -0
  516. /package/dist/{esm-deps → esm}/components/or-time-range-picker-v3/index.d.ts +0 -0
  517. /package/dist/{esm-deps → esm}/components/or-time-range-picker-v3/styles.d.ts +0 -0
  518. /package/dist/{esm-deps → esm}/components/or-time-range-picker-v3/types.d.ts +0 -0
  519. /package/dist/{esm-deps → esm}/components/or-toast-v3/OrToast.vue.d.ts +0 -0
  520. /package/dist/{esm-deps → esm}/components/or-toast-v3/Timer.d.ts +0 -0
  521. /package/dist/{esm-deps → esm}/components/or-toast-v3/composable/index.d.ts +0 -0
  522. /package/dist/{esm-deps → esm}/components/or-toast-v3/composable/useQueue.d.ts +0 -0
  523. /package/dist/{esm-deps → esm}/components/or-toast-v3/composable/useToast.d.ts +0 -0
  524. /package/dist/{esm-deps → esm}/components/or-toast-v3/composable/useToastEventBus.d.ts +0 -0
  525. /package/dist/{esm-deps → esm}/components/or-toast-v3/index.d.ts +0 -0
  526. /package/dist/{esm-deps → esm}/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +0 -0
  527. /package/dist/{esm-deps → esm}/components/or-toast-v3/or-toast-container-v3/index.d.ts +0 -0
  528. /package/dist/{esm-deps → esm}/components/or-toast-v3/props.d.ts +0 -0
  529. /package/dist/{esm-deps → esm}/components/or-toast-v3/styles.d.ts +0 -0
  530. /package/dist/{esm-deps → esm}/components/or-toast-v3/types.d.ts +0 -0
  531. /package/dist/{esm-deps → esm}/components/or-tooltip-v3/OrTooltip.vue.d.ts +0 -0
  532. /package/dist/{esm-deps → esm}/components/or-tooltip-v3/index.d.ts +0 -0
  533. /package/dist/{esm-deps → esm}/components/or-tooltip-v3/styles.d.ts +0 -0
  534. /package/dist/{esm-deps → esm}/components/or-tree-v3/OrTree.vue.d.ts +0 -0
  535. /package/dist/{esm-deps → esm}/components/or-tree-v3/index.d.ts +0 -0
  536. /package/dist/{esm-deps → esm}/components/or-tree-v3/partials/or-tree-node/OrTreeNode.vue.d.ts +0 -0
  537. /package/dist/{esm-deps → esm}/components/or-tree-v3/partials/or-tree-node/styles.d.ts +0 -0
  538. /package/dist/{esm-deps → esm}/components/or-tree-v3/partials/or-tree-node/utils.d.ts +0 -0
  539. /package/dist/{esm-deps → esm}/components/or-tree-v3/types.d.ts +0 -0
  540. /package/dist/{esm-deps → esm}/dropdown-open-k6cFnrqA-5245a281.js +0 -0
  541. /package/dist/{esm-deps → esm}/formatDate-0536a8d5.js +0 -0
  542. /package/dist/{esm-deps → esm}/getNextMonthDate-25fe3c1a.js +0 -0
  543. /package/dist/{esm-deps → esm}/index.d.ts +0 -0
  544. /package/dist/{esm-deps → esm}/normalize-component-cf2db48b.js +0 -0
  545. /package/dist/{esm-deps → esm}/props-bba3dca8.js +0 -0
  546. /package/dist/{esm-deps → esm}/style-inject.es-87955792.js +0 -0
  547. /package/dist/{esm-deps → esm}/types-75a1cc13.js +0 -0
  548. /package/dist/{esm-deps → esm}/types-98e9a758.js +0 -0
@@ -1,3441 +0,0 @@
1
- import { defineComponent, ref, computed, toRef, watch } from 'vue-demi';
2
- import { b as re } from '../../useValidationAttributes-DxhcSj_h-39556969.js';
3
- import { n as normalizeComponent } from '../../normalize-component-cf2db48b.js';
4
- import { OrButtonV3 as OrButton } from '../or-button-v3/index.js';
5
- import { OrIconV3 as OrIcon } from '../or-icon-v3/index.js';
6
- import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3/index.js';
7
- import { OrLabelV3 as OrLabel } from '../or-label-v3/index.js';
8
- import '../../dom-CwV-xS38-5babad01.js';
9
- import 'lodash/get';
10
- import 'lodash/isElement';
11
- import '@vueuse/core';
12
- import '../../constants-873d04a2.js';
13
- import '../../props-bba3dca8.js';
14
- import '../or-loader-v3/index.js';
15
- import '../or-tooltip-v3/index.js';
16
- import '../or-popover-v3/index.js';
17
- import '@floating-ui/core';
18
- import '@floating-ui/utils';
19
- import '@floating-ui/utils/dom';
20
- import '../../extractCssVarName-IHa2pGlF-d99daa2a.js';
21
- import '../or-bottom-sheet-v3/index.js';
22
- import '../or-overlay-v3/index.js';
23
- import '../or-teleport-v3/index.js';
24
- import 'portal-vue';
25
-
26
- /**!
27
- * Sortable 1.14.0
28
- * @author RubaXa <trash@rubaxa.org>
29
- * @author owenm <owen23355@gmail.com>
30
- * @license MIT
31
- */
32
- function ownKeys(object, enumerableOnly) {
33
- var keys = Object.keys(object);
34
-
35
- if (Object.getOwnPropertySymbols) {
36
- var symbols = Object.getOwnPropertySymbols(object);
37
-
38
- if (enumerableOnly) {
39
- symbols = symbols.filter(function (sym) {
40
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
41
- });
42
- }
43
-
44
- keys.push.apply(keys, symbols);
45
- }
46
-
47
- return keys;
48
- }
49
-
50
- function _objectSpread2(target) {
51
- for (var i = 1; i < arguments.length; i++) {
52
- var source = arguments[i] != null ? arguments[i] : {};
53
-
54
- if (i % 2) {
55
- ownKeys(Object(source), true).forEach(function (key) {
56
- _defineProperty(target, key, source[key]);
57
- });
58
- } else if (Object.getOwnPropertyDescriptors) {
59
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
60
- } else {
61
- ownKeys(Object(source)).forEach(function (key) {
62
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
63
- });
64
- }
65
- }
66
-
67
- return target;
68
- }
69
-
70
- function _typeof(obj) {
71
- "@babel/helpers - typeof";
72
-
73
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
74
- _typeof = function (obj) {
75
- return typeof obj;
76
- };
77
- } else {
78
- _typeof = function (obj) {
79
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
80
- };
81
- }
82
-
83
- return _typeof(obj);
84
- }
85
-
86
- function _defineProperty(obj, key, value) {
87
- if (key in obj) {
88
- Object.defineProperty(obj, key, {
89
- value: value,
90
- enumerable: true,
91
- configurable: true,
92
- writable: true
93
- });
94
- } else {
95
- obj[key] = value;
96
- }
97
-
98
- return obj;
99
- }
100
-
101
- function _extends() {
102
- _extends = Object.assign || function (target) {
103
- for (var i = 1; i < arguments.length; i++) {
104
- var source = arguments[i];
105
-
106
- for (var key in source) {
107
- if (Object.prototype.hasOwnProperty.call(source, key)) {
108
- target[key] = source[key];
109
- }
110
- }
111
- }
112
-
113
- return target;
114
- };
115
-
116
- return _extends.apply(this, arguments);
117
- }
118
-
119
- function _objectWithoutPropertiesLoose(source, excluded) {
120
- if (source == null) return {};
121
- var target = {};
122
- var sourceKeys = Object.keys(source);
123
- var key, i;
124
-
125
- for (i = 0; i < sourceKeys.length; i++) {
126
- key = sourceKeys[i];
127
- if (excluded.indexOf(key) >= 0) continue;
128
- target[key] = source[key];
129
- }
130
-
131
- return target;
132
- }
133
-
134
- function _objectWithoutProperties(source, excluded) {
135
- if (source == null) return {};
136
-
137
- var target = _objectWithoutPropertiesLoose(source, excluded);
138
-
139
- var key, i;
140
-
141
- if (Object.getOwnPropertySymbols) {
142
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
143
-
144
- for (i = 0; i < sourceSymbolKeys.length; i++) {
145
- key = sourceSymbolKeys[i];
146
- if (excluded.indexOf(key) >= 0) continue;
147
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
148
- target[key] = source[key];
149
- }
150
- }
151
-
152
- return target;
153
- }
154
-
155
- var version = "1.14.0";
156
-
157
- function userAgent(pattern) {
158
- if (typeof window !== 'undefined' && window.navigator) {
159
- return !! /*@__PURE__*/navigator.userAgent.match(pattern);
160
- }
161
- }
162
-
163
- var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
164
- var Edge = userAgent(/Edge/i);
165
- var FireFox = userAgent(/firefox/i);
166
- var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
167
- var IOS = userAgent(/iP(ad|od|hone)/i);
168
- var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
169
-
170
- var captureMode = {
171
- capture: false,
172
- passive: false
173
- };
174
-
175
- function on(el, event, fn) {
176
- el.addEventListener(event, fn, !IE11OrLess && captureMode);
177
- }
178
-
179
- function off(el, event, fn) {
180
- el.removeEventListener(event, fn, !IE11OrLess && captureMode);
181
- }
182
-
183
- function matches(
184
- /**HTMLElement*/
185
- el,
186
- /**String*/
187
- selector) {
188
- if (!selector) return;
189
- selector[0] === '>' && (selector = selector.substring(1));
190
-
191
- if (el) {
192
- try {
193
- if (el.matches) {
194
- return el.matches(selector);
195
- } else if (el.msMatchesSelector) {
196
- return el.msMatchesSelector(selector);
197
- } else if (el.webkitMatchesSelector) {
198
- return el.webkitMatchesSelector(selector);
199
- }
200
- } catch (_) {
201
- return false;
202
- }
203
- }
204
-
205
- return false;
206
- }
207
-
208
- function getParentOrHost(el) {
209
- return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
210
- }
211
-
212
- function closest(
213
- /**HTMLElement*/
214
- el,
215
- /**String*/
216
- selector,
217
- /**HTMLElement*/
218
- ctx, includeCTX) {
219
- if (el) {
220
- ctx = ctx || document;
221
-
222
- do {
223
- if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
224
- return el;
225
- }
226
-
227
- if (el === ctx) break;
228
- /* jshint boss:true */
229
- } while (el = getParentOrHost(el));
230
- }
231
-
232
- return null;
233
- }
234
-
235
- var R_SPACE = /\s+/g;
236
-
237
- function toggleClass(el, name, state) {
238
- if (el && name) {
239
- if (el.classList) {
240
- el.classList[state ? 'add' : 'remove'](name);
241
- } else {
242
- var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
243
- el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
244
- }
245
- }
246
- }
247
-
248
- function css(el, prop, val) {
249
- var style = el && el.style;
250
-
251
- if (style) {
252
- if (val === void 0) {
253
- if (document.defaultView && document.defaultView.getComputedStyle) {
254
- val = document.defaultView.getComputedStyle(el, '');
255
- } else if (el.currentStyle) {
256
- val = el.currentStyle;
257
- }
258
-
259
- return prop === void 0 ? val : val[prop];
260
- } else {
261
- if (!(prop in style) && prop.indexOf('webkit') === -1) {
262
- prop = '-webkit-' + prop;
263
- }
264
-
265
- style[prop] = val + (typeof val === 'string' ? '' : 'px');
266
- }
267
- }
268
- }
269
-
270
- function matrix(el, selfOnly) {
271
- var appliedTransforms = '';
272
-
273
- if (typeof el === 'string') {
274
- appliedTransforms = el;
275
- } else {
276
- do {
277
- var transform = css(el, 'transform');
278
-
279
- if (transform && transform !== 'none') {
280
- appliedTransforms = transform + ' ' + appliedTransforms;
281
- }
282
- /* jshint boss:true */
283
-
284
- } while (!selfOnly && (el = el.parentNode));
285
- }
286
-
287
- var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
288
- /*jshint -W056 */
289
-
290
- return matrixFn && new matrixFn(appliedTransforms);
291
- }
292
-
293
- function find(ctx, tagName, iterator) {
294
- if (ctx) {
295
- var list = ctx.getElementsByTagName(tagName),
296
- i = 0,
297
- n = list.length;
298
-
299
- if (iterator) {
300
- for (; i < n; i++) {
301
- iterator(list[i], i);
302
- }
303
- }
304
-
305
- return list;
306
- }
307
-
308
- return [];
309
- }
310
-
311
- function getWindowScrollingElement() {
312
- var scrollingElement = document.scrollingElement;
313
-
314
- if (scrollingElement) {
315
- return scrollingElement;
316
- } else {
317
- return document.documentElement;
318
- }
319
- }
320
- /**
321
- * Returns the "bounding client rect" of given element
322
- * @param {HTMLElement} el The element whose boundingClientRect is wanted
323
- * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
324
- * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
325
- * @param {[Boolean]} undoScale Whether the container's scale() should be undone
326
- * @param {[HTMLElement]} container The parent the element will be placed in
327
- * @return {Object} The boundingClientRect of el, with specified adjustments
328
- */
329
-
330
-
331
- function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
332
- if (!el.getBoundingClientRect && el !== window) return;
333
- var elRect, top, left, bottom, right, height, width;
334
-
335
- if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
336
- elRect = el.getBoundingClientRect();
337
- top = elRect.top;
338
- left = elRect.left;
339
- bottom = elRect.bottom;
340
- right = elRect.right;
341
- height = elRect.height;
342
- width = elRect.width;
343
- } else {
344
- top = 0;
345
- left = 0;
346
- bottom = window.innerHeight;
347
- right = window.innerWidth;
348
- height = window.innerHeight;
349
- width = window.innerWidth;
350
- }
351
-
352
- if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
353
- // Adjust for translate()
354
- container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
355
- // Not needed on <= IE11
356
-
357
- if (!IE11OrLess) {
358
- do {
359
- if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
360
- var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
361
-
362
- top -= containerRect.top + parseInt(css(container, 'border-top-width'));
363
- left -= containerRect.left + parseInt(css(container, 'border-left-width'));
364
- bottom = top + elRect.height;
365
- right = left + elRect.width;
366
- break;
367
- }
368
- /* jshint boss:true */
369
-
370
- } while (container = container.parentNode);
371
- }
372
- }
373
-
374
- if (undoScale && el !== window) {
375
- // Adjust for scale()
376
- var elMatrix = matrix(container || el),
377
- scaleX = elMatrix && elMatrix.a,
378
- scaleY = elMatrix && elMatrix.d;
379
-
380
- if (elMatrix) {
381
- top /= scaleY;
382
- left /= scaleX;
383
- width /= scaleX;
384
- height /= scaleY;
385
- bottom = top + height;
386
- right = left + width;
387
- }
388
- }
389
-
390
- return {
391
- top: top,
392
- left: left,
393
- bottom: bottom,
394
- right: right,
395
- width: width,
396
- height: height
397
- };
398
- }
399
- /**
400
- * Checks if a side of an element is scrolled past a side of its parents
401
- * @param {HTMLElement} el The element who's side being scrolled out of view is in question
402
- * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
403
- * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
404
- * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
405
- */
406
-
407
-
408
- function isScrolledPast(el, elSide, parentSide) {
409
- var parent = getParentAutoScrollElement(el, true),
410
- elSideVal = getRect(el)[elSide];
411
- /* jshint boss:true */
412
-
413
- while (parent) {
414
- var parentSideVal = getRect(parent)[parentSide],
415
- visible = void 0;
416
-
417
- if (parentSide === 'top' || parentSide === 'left') {
418
- visible = elSideVal >= parentSideVal;
419
- } else {
420
- visible = elSideVal <= parentSideVal;
421
- }
422
-
423
- if (!visible) return parent;
424
- if (parent === getWindowScrollingElement()) break;
425
- parent = getParentAutoScrollElement(parent, false);
426
- }
427
-
428
- return false;
429
- }
430
- /**
431
- * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
432
- * and non-draggable elements
433
- * @param {HTMLElement} el The parent element
434
- * @param {Number} childNum The index of the child
435
- * @param {Object} options Parent Sortable's options
436
- * @return {HTMLElement} The child at index childNum, or null if not found
437
- */
438
-
439
-
440
- function getChild(el, childNum, options, includeDragEl) {
441
- var currentChild = 0,
442
- i = 0,
443
- children = el.children;
444
-
445
- while (i < children.length) {
446
- if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
447
- if (currentChild === childNum) {
448
- return children[i];
449
- }
450
-
451
- currentChild++;
452
- }
453
-
454
- i++;
455
- }
456
-
457
- return null;
458
- }
459
- /**
460
- * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
461
- * @param {HTMLElement} el Parent element
462
- * @param {selector} selector Any other elements that should be ignored
463
- * @return {HTMLElement} The last child, ignoring ghostEl
464
- */
465
-
466
-
467
- function lastChild(el, selector) {
468
- var last = el.lastElementChild;
469
-
470
- while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
471
- last = last.previousElementSibling;
472
- }
473
-
474
- return last || null;
475
- }
476
- /**
477
- * Returns the index of an element within its parent for a selected set of
478
- * elements
479
- * @param {HTMLElement} el
480
- * @param {selector} selector
481
- * @return {number}
482
- */
483
-
484
-
485
- function index(el, selector) {
486
- var index = 0;
487
-
488
- if (!el || !el.parentNode) {
489
- return -1;
490
- }
491
- /* jshint boss:true */
492
-
493
-
494
- while (el = el.previousElementSibling) {
495
- if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
496
- index++;
497
- }
498
- }
499
-
500
- return index;
501
- }
502
- /**
503
- * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
504
- * The value is returned in real pixels.
505
- * @param {HTMLElement} el
506
- * @return {Array} Offsets in the format of [left, top]
507
- */
508
-
509
-
510
- function getRelativeScrollOffset(el) {
511
- var offsetLeft = 0,
512
- offsetTop = 0,
513
- winScroller = getWindowScrollingElement();
514
-
515
- if (el) {
516
- do {
517
- var elMatrix = matrix(el),
518
- scaleX = elMatrix.a,
519
- scaleY = elMatrix.d;
520
- offsetLeft += el.scrollLeft * scaleX;
521
- offsetTop += el.scrollTop * scaleY;
522
- } while (el !== winScroller && (el = el.parentNode));
523
- }
524
-
525
- return [offsetLeft, offsetTop];
526
- }
527
- /**
528
- * Returns the index of the object within the given array
529
- * @param {Array} arr Array that may or may not hold the object
530
- * @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
531
- * @return {Number} The index of the object in the array, or -1
532
- */
533
-
534
-
535
- function indexOfObject(arr, obj) {
536
- for (var i in arr) {
537
- if (!arr.hasOwnProperty(i)) continue;
538
-
539
- for (var key in obj) {
540
- if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
541
- }
542
- }
543
-
544
- return -1;
545
- }
546
-
547
- function getParentAutoScrollElement(el, includeSelf) {
548
- // skip to window
549
- if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
550
- var elem = el;
551
- var gotSelf = false;
552
-
553
- do {
554
- // we don't need to get elem css if it isn't even overflowing in the first place (performance)
555
- if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
556
- var elemCSS = css(elem);
557
-
558
- if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
559
- if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
560
- if (gotSelf || includeSelf) return elem;
561
- gotSelf = true;
562
- }
563
- }
564
- /* jshint boss:true */
565
-
566
- } while (elem = elem.parentNode);
567
-
568
- return getWindowScrollingElement();
569
- }
570
-
571
- function extend(dst, src) {
572
- if (dst && src) {
573
- for (var key in src) {
574
- if (src.hasOwnProperty(key)) {
575
- dst[key] = src[key];
576
- }
577
- }
578
- }
579
-
580
- return dst;
581
- }
582
-
583
- function isRectEqual(rect1, rect2) {
584
- 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);
585
- }
586
-
587
- var _throttleTimeout;
588
-
589
- function throttle(callback, ms) {
590
- return function () {
591
- if (!_throttleTimeout) {
592
- var args = arguments,
593
- _this = this;
594
-
595
- if (args.length === 1) {
596
- callback.call(_this, args[0]);
597
- } else {
598
- callback.apply(_this, args);
599
- }
600
-
601
- _throttleTimeout = setTimeout(function () {
602
- _throttleTimeout = void 0;
603
- }, ms);
604
- }
605
- };
606
- }
607
-
608
- function cancelThrottle() {
609
- clearTimeout(_throttleTimeout);
610
- _throttleTimeout = void 0;
611
- }
612
-
613
- function scrollBy(el, x, y) {
614
- el.scrollLeft += x;
615
- el.scrollTop += y;
616
- }
617
-
618
- function clone(el) {
619
- var Polymer = window.Polymer;
620
- var $ = window.jQuery || window.Zepto;
621
-
622
- if (Polymer && Polymer.dom) {
623
- return Polymer.dom(el).cloneNode(true);
624
- } else if ($) {
625
- return $(el).clone(true)[0];
626
- } else {
627
- return el.cloneNode(true);
628
- }
629
- }
630
-
631
- var expando = 'Sortable' + new Date().getTime();
632
-
633
- function AnimationStateManager() {
634
- var animationStates = [],
635
- animationCallbackId;
636
- return {
637
- captureAnimationState: function captureAnimationState() {
638
- animationStates = [];
639
- if (!this.options.animation) return;
640
- var children = [].slice.call(this.el.children);
641
- children.forEach(function (child) {
642
- if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
643
- animationStates.push({
644
- target: child,
645
- rect: getRect(child)
646
- });
647
-
648
- var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
649
-
650
-
651
- if (child.thisAnimationDuration) {
652
- var childMatrix = matrix(child, true);
653
-
654
- if (childMatrix) {
655
- fromRect.top -= childMatrix.f;
656
- fromRect.left -= childMatrix.e;
657
- }
658
- }
659
-
660
- child.fromRect = fromRect;
661
- });
662
- },
663
- addAnimationState: function addAnimationState(state) {
664
- animationStates.push(state);
665
- },
666
- removeAnimationState: function removeAnimationState(target) {
667
- animationStates.splice(indexOfObject(animationStates, {
668
- target: target
669
- }), 1);
670
- },
671
- animateAll: function animateAll(callback) {
672
- var _this = this;
673
-
674
- if (!this.options.animation) {
675
- clearTimeout(animationCallbackId);
676
- if (typeof callback === 'function') callback();
677
- return;
678
- }
679
-
680
- var animating = false,
681
- animationTime = 0;
682
- animationStates.forEach(function (state) {
683
- var time = 0,
684
- target = state.target,
685
- fromRect = target.fromRect,
686
- toRect = getRect(target),
687
- prevFromRect = target.prevFromRect,
688
- prevToRect = target.prevToRect,
689
- animatingRect = state.rect,
690
- targetMatrix = matrix(target, true);
691
-
692
- if (targetMatrix) {
693
- // Compensate for current animation
694
- toRect.top -= targetMatrix.f;
695
- toRect.left -= targetMatrix.e;
696
- }
697
-
698
- target.toRect = toRect;
699
-
700
- if (target.thisAnimationDuration) {
701
- // Could also check if animatingRect is between fromRect and toRect
702
- if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
703
- (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
704
- // If returning to same place as started from animation and on same axis
705
- time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
706
- }
707
- } // if fromRect != toRect: animate
708
-
709
-
710
- if (!isRectEqual(toRect, fromRect)) {
711
- target.prevFromRect = fromRect;
712
- target.prevToRect = toRect;
713
-
714
- if (!time) {
715
- time = _this.options.animation;
716
- }
717
-
718
- _this.animate(target, animatingRect, toRect, time);
719
- }
720
-
721
- if (time) {
722
- animating = true;
723
- animationTime = Math.max(animationTime, time);
724
- clearTimeout(target.animationResetTimer);
725
- target.animationResetTimer = setTimeout(function () {
726
- target.animationTime = 0;
727
- target.prevFromRect = null;
728
- target.fromRect = null;
729
- target.prevToRect = null;
730
- target.thisAnimationDuration = null;
731
- }, time);
732
- target.thisAnimationDuration = time;
733
- }
734
- });
735
- clearTimeout(animationCallbackId);
736
-
737
- if (!animating) {
738
- if (typeof callback === 'function') callback();
739
- } else {
740
- animationCallbackId = setTimeout(function () {
741
- if (typeof callback === 'function') callback();
742
- }, animationTime);
743
- }
744
-
745
- animationStates = [];
746
- },
747
- animate: function animate(target, currentRect, toRect, duration) {
748
- if (duration) {
749
- css(target, 'transition', '');
750
- css(target, 'transform', '');
751
- var elMatrix = matrix(this.el),
752
- scaleX = elMatrix && elMatrix.a,
753
- scaleY = elMatrix && elMatrix.d,
754
- translateX = (currentRect.left - toRect.left) / (scaleX || 1),
755
- translateY = (currentRect.top - toRect.top) / (scaleY || 1);
756
- target.animatingX = !!translateX;
757
- target.animatingY = !!translateY;
758
- css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
759
- this.forRepaintDummy = repaint(target); // repaint
760
-
761
- css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
762
- css(target, 'transform', 'translate3d(0,0,0)');
763
- typeof target.animated === 'number' && clearTimeout(target.animated);
764
- target.animated = setTimeout(function () {
765
- css(target, 'transition', '');
766
- css(target, 'transform', '');
767
- target.animated = false;
768
- target.animatingX = false;
769
- target.animatingY = false;
770
- }, duration);
771
- }
772
- }
773
- };
774
- }
775
-
776
- function repaint(target) {
777
- return target.offsetWidth;
778
- }
779
-
780
- function calculateRealTime(animatingRect, fromRect, toRect, options) {
781
- 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;
782
- }
783
-
784
- var plugins = [];
785
- var defaults = {
786
- initializeByDefault: true
787
- };
788
- var PluginManager = {
789
- mount: function mount(plugin) {
790
- // Set default static properties
791
- for (var option in defaults) {
792
- if (defaults.hasOwnProperty(option) && !(option in plugin)) {
793
- plugin[option] = defaults[option];
794
- }
795
- }
796
-
797
- plugins.forEach(function (p) {
798
- if (p.pluginName === plugin.pluginName) {
799
- throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
800
- }
801
- });
802
- plugins.push(plugin);
803
- },
804
- pluginEvent: function pluginEvent(eventName, sortable, evt) {
805
- var _this = this;
806
-
807
- this.eventCanceled = false;
808
-
809
- evt.cancel = function () {
810
- _this.eventCanceled = true;
811
- };
812
-
813
- var eventNameGlobal = eventName + 'Global';
814
- plugins.forEach(function (plugin) {
815
- if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
816
-
817
- if (sortable[plugin.pluginName][eventNameGlobal]) {
818
- sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
819
- sortable: sortable
820
- }, evt));
821
- } // Only fire plugin event if plugin is enabled in this sortable,
822
- // and plugin has event defined
823
-
824
-
825
- if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
826
- sortable[plugin.pluginName][eventName](_objectSpread2({
827
- sortable: sortable
828
- }, evt));
829
- }
830
- });
831
- },
832
- initializePlugins: function initializePlugins(sortable, el, defaults, options) {
833
- plugins.forEach(function (plugin) {
834
- var pluginName = plugin.pluginName;
835
- if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
836
- var initialized = new plugin(sortable, el, sortable.options);
837
- initialized.sortable = sortable;
838
- initialized.options = sortable.options;
839
- sortable[pluginName] = initialized; // Add default options from plugin
840
-
841
- _extends(defaults, initialized.defaults);
842
- });
843
-
844
- for (var option in sortable.options) {
845
- if (!sortable.options.hasOwnProperty(option)) continue;
846
- var modified = this.modifyOption(sortable, option, sortable.options[option]);
847
-
848
- if (typeof modified !== 'undefined') {
849
- sortable.options[option] = modified;
850
- }
851
- }
852
- },
853
- getEventProperties: function getEventProperties(name, sortable) {
854
- var eventProperties = {};
855
- plugins.forEach(function (plugin) {
856
- if (typeof plugin.eventProperties !== 'function') return;
857
-
858
- _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
859
- });
860
- return eventProperties;
861
- },
862
- modifyOption: function modifyOption(sortable, name, value) {
863
- var modifiedValue;
864
- plugins.forEach(function (plugin) {
865
- // Plugin must exist on the Sortable
866
- 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
867
-
868
- if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
869
- modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
870
- }
871
- });
872
- return modifiedValue;
873
- }
874
- };
875
-
876
- function dispatchEvent(_ref) {
877
- var sortable = _ref.sortable,
878
- rootEl = _ref.rootEl,
879
- name = _ref.name,
880
- targetEl = _ref.targetEl,
881
- cloneEl = _ref.cloneEl,
882
- toEl = _ref.toEl,
883
- fromEl = _ref.fromEl,
884
- oldIndex = _ref.oldIndex,
885
- newIndex = _ref.newIndex,
886
- oldDraggableIndex = _ref.oldDraggableIndex,
887
- newDraggableIndex = _ref.newDraggableIndex,
888
- originalEvent = _ref.originalEvent,
889
- putSortable = _ref.putSortable,
890
- extraEventProperties = _ref.extraEventProperties;
891
- sortable = sortable || rootEl && rootEl[expando];
892
- if (!sortable) return;
893
- var evt,
894
- options = sortable.options,
895
- onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
896
-
897
- if (window.CustomEvent && !IE11OrLess && !Edge) {
898
- evt = new CustomEvent(name, {
899
- bubbles: true,
900
- cancelable: true
901
- });
902
- } else {
903
- evt = document.createEvent('Event');
904
- evt.initEvent(name, true, true);
905
- }
906
-
907
- evt.to = toEl || rootEl;
908
- evt.from = fromEl || rootEl;
909
- evt.item = targetEl || rootEl;
910
- evt.clone = cloneEl;
911
- evt.oldIndex = oldIndex;
912
- evt.newIndex = newIndex;
913
- evt.oldDraggableIndex = oldDraggableIndex;
914
- evt.newDraggableIndex = newDraggableIndex;
915
- evt.originalEvent = originalEvent;
916
- evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
917
-
918
- var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
919
-
920
- for (var option in allEventProperties) {
921
- evt[option] = allEventProperties[option];
922
- }
923
-
924
- if (rootEl) {
925
- rootEl.dispatchEvent(evt);
926
- }
927
-
928
- if (options[onName]) {
929
- options[onName].call(sortable, evt);
930
- }
931
- }
932
-
933
- var _excluded = ["evt"];
934
-
935
- var pluginEvent = function pluginEvent(eventName, sortable) {
936
- var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
937
- originalEvent = _ref.evt,
938
- data = _objectWithoutProperties(_ref, _excluded);
939
-
940
- PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
941
- dragEl: dragEl,
942
- parentEl: parentEl,
943
- ghostEl: ghostEl,
944
- rootEl: rootEl,
945
- nextEl: nextEl,
946
- lastDownEl: lastDownEl,
947
- cloneEl: cloneEl,
948
- cloneHidden: cloneHidden,
949
- dragStarted: moved,
950
- putSortable: putSortable,
951
- activeSortable: Sortable.active,
952
- originalEvent: originalEvent,
953
- oldIndex: oldIndex,
954
- oldDraggableIndex: oldDraggableIndex,
955
- newIndex: newIndex,
956
- newDraggableIndex: newDraggableIndex,
957
- hideGhostForTarget: _hideGhostForTarget,
958
- unhideGhostForTarget: _unhideGhostForTarget,
959
- cloneNowHidden: function cloneNowHidden() {
960
- cloneHidden = true;
961
- },
962
- cloneNowShown: function cloneNowShown() {
963
- cloneHidden = false;
964
- },
965
- dispatchSortableEvent: function dispatchSortableEvent(name) {
966
- _dispatchEvent({
967
- sortable: sortable,
968
- name: name,
969
- originalEvent: originalEvent
970
- });
971
- }
972
- }, data));
973
- };
974
-
975
- function _dispatchEvent(info) {
976
- dispatchEvent(_objectSpread2({
977
- putSortable: putSortable,
978
- cloneEl: cloneEl,
979
- targetEl: dragEl,
980
- rootEl: rootEl,
981
- oldIndex: oldIndex,
982
- oldDraggableIndex: oldDraggableIndex,
983
- newIndex: newIndex,
984
- newDraggableIndex: newDraggableIndex
985
- }, info));
986
- }
987
-
988
- var dragEl,
989
- parentEl,
990
- ghostEl,
991
- rootEl,
992
- nextEl,
993
- lastDownEl,
994
- cloneEl,
995
- cloneHidden,
996
- oldIndex,
997
- newIndex,
998
- oldDraggableIndex,
999
- newDraggableIndex,
1000
- activeGroup,
1001
- putSortable,
1002
- awaitingDragStarted = false,
1003
- ignoreNextClick = false,
1004
- sortables = [],
1005
- tapEvt,
1006
- touchEvt,
1007
- lastDx,
1008
- lastDy,
1009
- tapDistanceLeft,
1010
- tapDistanceTop,
1011
- moved,
1012
- lastTarget,
1013
- lastDirection,
1014
- pastFirstInvertThresh = false,
1015
- isCircumstantialInvert = false,
1016
- targetMoveDistance,
1017
- // For positioning ghost absolutely
1018
- ghostRelativeParent,
1019
- ghostRelativeParentInitialScroll = [],
1020
- // (left, top)
1021
- _silent = false,
1022
- savedInputChecked = [];
1023
- /** @const */
1024
-
1025
- var documentExists = typeof document !== 'undefined',
1026
- PositionGhostAbsolutely = IOS,
1027
- CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
1028
- // This will not pass for IE9, because IE9 DnD only works on anchors
1029
- supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
1030
- supportCssPointerEvents = function () {
1031
- if (!documentExists) return; // false when <= IE11
1032
-
1033
- if (IE11OrLess) {
1034
- return false;
1035
- }
1036
-
1037
- var el = document.createElement('x');
1038
- el.style.cssText = 'pointer-events:auto';
1039
- return el.style.pointerEvents === 'auto';
1040
- }(),
1041
- _detectDirection = function _detectDirection(el, options) {
1042
- var elCSS = css(el),
1043
- elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
1044
- child1 = getChild(el, 0, options),
1045
- child2 = getChild(el, 1, options),
1046
- firstChildCSS = child1 && css(child1),
1047
- secondChildCSS = child2 && css(child2),
1048
- firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
1049
- secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
1050
-
1051
- if (elCSS.display === 'flex') {
1052
- return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
1053
- }
1054
-
1055
- if (elCSS.display === 'grid') {
1056
- return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
1057
- }
1058
-
1059
- if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
1060
- var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
1061
- return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
1062
- }
1063
-
1064
- 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';
1065
- },
1066
- _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
1067
- var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
1068
- dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
1069
- dragElOppLength = vertical ? dragRect.width : dragRect.height,
1070
- targetS1Opp = vertical ? targetRect.left : targetRect.top,
1071
- targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
1072
- targetOppLength = vertical ? targetRect.width : targetRect.height;
1073
- return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
1074
- },
1075
-
1076
- /**
1077
- * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
1078
- * @param {Number} x X position
1079
- * @param {Number} y Y position
1080
- * @return {HTMLElement} Element of the first found nearest Sortable
1081
- */
1082
- _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
1083
- var ret;
1084
- sortables.some(function (sortable) {
1085
- var threshold = sortable[expando].options.emptyInsertThreshold;
1086
- if (!threshold || lastChild(sortable)) return;
1087
- var rect = getRect(sortable),
1088
- insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
1089
- insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
1090
-
1091
- if (insideHorizontally && insideVertically) {
1092
- return ret = sortable;
1093
- }
1094
- });
1095
- return ret;
1096
- },
1097
- _prepareGroup = function _prepareGroup(options) {
1098
- function toFn(value, pull) {
1099
- return function (to, from, dragEl, evt) {
1100
- var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
1101
-
1102
- if (value == null && (pull || sameGroup)) {
1103
- // Default pull value
1104
- // Default pull and put value if same group
1105
- return true;
1106
- } else if (value == null || value === false) {
1107
- return false;
1108
- } else if (pull && value === 'clone') {
1109
- return value;
1110
- } else if (typeof value === 'function') {
1111
- return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
1112
- } else {
1113
- var otherGroup = (pull ? to : from).options.group.name;
1114
- return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
1115
- }
1116
- };
1117
- }
1118
-
1119
- var group = {};
1120
- var originalGroup = options.group;
1121
-
1122
- if (!originalGroup || _typeof(originalGroup) != 'object') {
1123
- originalGroup = {
1124
- name: originalGroup
1125
- };
1126
- }
1127
-
1128
- group.name = originalGroup.name;
1129
- group.checkPull = toFn(originalGroup.pull, true);
1130
- group.checkPut = toFn(originalGroup.put);
1131
- group.revertClone = originalGroup.revertClone;
1132
- options.group = group;
1133
- },
1134
- _hideGhostForTarget = function _hideGhostForTarget() {
1135
- if (!supportCssPointerEvents && ghostEl) {
1136
- css(ghostEl, 'display', 'none');
1137
- }
1138
- },
1139
- _unhideGhostForTarget = function _unhideGhostForTarget() {
1140
- if (!supportCssPointerEvents && ghostEl) {
1141
- css(ghostEl, 'display', '');
1142
- }
1143
- }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
1144
-
1145
-
1146
- if (documentExists) {
1147
- document.addEventListener('click', function (evt) {
1148
- if (ignoreNextClick) {
1149
- evt.preventDefault();
1150
- evt.stopPropagation && evt.stopPropagation();
1151
- evt.stopImmediatePropagation && evt.stopImmediatePropagation();
1152
- ignoreNextClick = false;
1153
- return false;
1154
- }
1155
- }, true);
1156
- }
1157
-
1158
- var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1159
- if (dragEl) {
1160
- evt = evt.touches ? evt.touches[0] : evt;
1161
-
1162
- var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1163
-
1164
- if (nearest) {
1165
- // Create imitation event
1166
- var event = {};
1167
-
1168
- for (var i in evt) {
1169
- if (evt.hasOwnProperty(i)) {
1170
- event[i] = evt[i];
1171
- }
1172
- }
1173
-
1174
- event.target = event.rootEl = nearest;
1175
- event.preventDefault = void 0;
1176
- event.stopPropagation = void 0;
1177
-
1178
- nearest[expando]._onDragOver(event);
1179
- }
1180
- }
1181
- };
1182
-
1183
- var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1184
- if (dragEl) {
1185
- dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1186
- }
1187
- };
1188
- /**
1189
- * @class Sortable
1190
- * @param {HTMLElement} el
1191
- * @param {Object} [options]
1192
- */
1193
-
1194
-
1195
- function Sortable(el, options) {
1196
- if (!(el && el.nodeType && el.nodeType === 1)) {
1197
- throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1198
- }
1199
-
1200
- this.el = el; // root element
1201
-
1202
- this.options = options = _extends({}, options); // Export instance
1203
-
1204
- el[expando] = this;
1205
- var defaults = {
1206
- group: null,
1207
- sort: true,
1208
- disabled: false,
1209
- store: null,
1210
- handle: null,
1211
- draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1212
- swapThreshold: 1,
1213
- // percentage; 0 <= x <= 1
1214
- invertSwap: false,
1215
- // invert always
1216
- invertedSwapThreshold: null,
1217
- // will be set to same as swapThreshold if default
1218
- removeCloneOnHide: true,
1219
- direction: function direction() {
1220
- return _detectDirection(el, this.options);
1221
- },
1222
- ghostClass: 'sortable-ghost',
1223
- chosenClass: 'sortable-chosen',
1224
- dragClass: 'sortable-drag',
1225
- ignore: 'a, img',
1226
- filter: null,
1227
- preventOnFilter: true,
1228
- animation: 0,
1229
- easing: null,
1230
- setData: function setData(dataTransfer, dragEl) {
1231
- dataTransfer.setData('Text', dragEl.textContent);
1232
- },
1233
- dropBubble: false,
1234
- dragoverBubble: false,
1235
- dataIdAttr: 'data-id',
1236
- delay: 0,
1237
- delayOnTouchOnly: false,
1238
- touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1239
- forceFallback: false,
1240
- fallbackClass: 'sortable-fallback',
1241
- fallbackOnBody: false,
1242
- fallbackTolerance: 0,
1243
- fallbackOffset: {
1244
- x: 0,
1245
- y: 0
1246
- },
1247
- supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
1248
- emptyInsertThreshold: 5
1249
- };
1250
- PluginManager.initializePlugins(this, el, defaults); // Set default options
1251
-
1252
- for (var name in defaults) {
1253
- !(name in options) && (options[name] = defaults[name]);
1254
- }
1255
-
1256
- _prepareGroup(options); // Bind all private methods
1257
-
1258
-
1259
- for (var fn in this) {
1260
- if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1261
- this[fn] = this[fn].bind(this);
1262
- }
1263
- } // Setup drag mode
1264
-
1265
-
1266
- this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1267
-
1268
- if (this.nativeDraggable) {
1269
- // Touch start threshold cannot be greater than the native dragstart threshold
1270
- this.options.touchStartThreshold = 1;
1271
- } // Bind events
1272
-
1273
-
1274
- if (options.supportPointer) {
1275
- on(el, 'pointerdown', this._onTapStart);
1276
- } else {
1277
- on(el, 'mousedown', this._onTapStart);
1278
- on(el, 'touchstart', this._onTapStart);
1279
- }
1280
-
1281
- if (this.nativeDraggable) {
1282
- on(el, 'dragover', this);
1283
- on(el, 'dragenter', this);
1284
- }
1285
-
1286
- sortables.push(this.el); // Restore sorting
1287
-
1288
- options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
1289
-
1290
- _extends(this, AnimationStateManager());
1291
- }
1292
-
1293
- Sortable.prototype =
1294
- /** @lends Sortable.prototype */
1295
- {
1296
- constructor: Sortable,
1297
- _isOutsideThisEl: function _isOutsideThisEl(target) {
1298
- if (!this.el.contains(target) && target !== this.el) {
1299
- lastTarget = null;
1300
- }
1301
- },
1302
- _getDirection: function _getDirection(evt, target) {
1303
- return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1304
- },
1305
- _onTapStart: function _onTapStart(
1306
- /** Event|TouchEvent */
1307
- evt) {
1308
- if (!evt.cancelable) return;
1309
-
1310
- var _this = this,
1311
- el = this.el,
1312
- options = this.options,
1313
- preventOnFilter = options.preventOnFilter,
1314
- type = evt.type,
1315
- touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
1316
- target = (touch || evt).target,
1317
- originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1318
- filter = options.filter;
1319
-
1320
- _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1321
-
1322
-
1323
- if (dragEl) {
1324
- return;
1325
- }
1326
-
1327
- if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1328
- return; // only left button and enabled
1329
- } // cancel dnd if original target is content editable
1330
-
1331
-
1332
- if (originalTarget.isContentEditable) {
1333
- return;
1334
- } // Safari ignores further event handling after mousedown
1335
-
1336
-
1337
- if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
1338
- return;
1339
- }
1340
-
1341
- target = closest(target, options.draggable, el, false);
1342
-
1343
- if (target && target.animated) {
1344
- return;
1345
- }
1346
-
1347
- if (lastDownEl === target) {
1348
- // Ignoring duplicate `down`
1349
- return;
1350
- } // Get the index of the dragged element within its parent
1351
-
1352
-
1353
- oldIndex = index(target);
1354
- oldDraggableIndex = index(target, options.draggable); // Check filter
1355
-
1356
- if (typeof filter === 'function') {
1357
- if (filter.call(this, evt, target, this)) {
1358
- _dispatchEvent({
1359
- sortable: _this,
1360
- rootEl: originalTarget,
1361
- name: 'filter',
1362
- targetEl: target,
1363
- toEl: el,
1364
- fromEl: el
1365
- });
1366
-
1367
- pluginEvent('filter', _this, {
1368
- evt: evt
1369
- });
1370
- preventOnFilter && evt.cancelable && evt.preventDefault();
1371
- return; // cancel dnd
1372
- }
1373
- } else if (filter) {
1374
- filter = filter.split(',').some(function (criteria) {
1375
- criteria = closest(originalTarget, criteria.trim(), el, false);
1376
-
1377
- if (criteria) {
1378
- _dispatchEvent({
1379
- sortable: _this,
1380
- rootEl: criteria,
1381
- name: 'filter',
1382
- targetEl: target,
1383
- fromEl: el,
1384
- toEl: el
1385
- });
1386
-
1387
- pluginEvent('filter', _this, {
1388
- evt: evt
1389
- });
1390
- return true;
1391
- }
1392
- });
1393
-
1394
- if (filter) {
1395
- preventOnFilter && evt.cancelable && evt.preventDefault();
1396
- return; // cancel dnd
1397
- }
1398
- }
1399
-
1400
- if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1401
- return;
1402
- } // Prepare `dragstart`
1403
-
1404
-
1405
- this._prepareDragStart(evt, touch, target);
1406
- },
1407
- _prepareDragStart: function _prepareDragStart(
1408
- /** Event */
1409
- evt,
1410
- /** Touch */
1411
- touch,
1412
- /** HTMLElement */
1413
- target) {
1414
- var _this = this,
1415
- el = _this.el,
1416
- options = _this.options,
1417
- ownerDocument = el.ownerDocument,
1418
- dragStartFn;
1419
-
1420
- if (target && !dragEl && target.parentNode === el) {
1421
- var dragRect = getRect(target);
1422
- rootEl = el;
1423
- dragEl = target;
1424
- parentEl = dragEl.parentNode;
1425
- nextEl = dragEl.nextSibling;
1426
- lastDownEl = target;
1427
- activeGroup = options.group;
1428
- Sortable.dragged = dragEl;
1429
- tapEvt = {
1430
- target: dragEl,
1431
- clientX: (touch || evt).clientX,
1432
- clientY: (touch || evt).clientY
1433
- };
1434
- tapDistanceLeft = tapEvt.clientX - dragRect.left;
1435
- tapDistanceTop = tapEvt.clientY - dragRect.top;
1436
- this._lastX = (touch || evt).clientX;
1437
- this._lastY = (touch || evt).clientY;
1438
- dragEl.style['will-change'] = 'all';
1439
-
1440
- dragStartFn = function dragStartFn() {
1441
- pluginEvent('delayEnded', _this, {
1442
- evt: evt
1443
- });
1444
-
1445
- if (Sortable.eventCanceled) {
1446
- _this._onDrop();
1447
-
1448
- return;
1449
- } // Delayed drag has been triggered
1450
- // we can re-enable the events: touchmove/mousemove
1451
-
1452
-
1453
- _this._disableDelayedDragEvents();
1454
-
1455
- if (!FireFox && _this.nativeDraggable) {
1456
- dragEl.draggable = true;
1457
- } // Bind the events: dragstart/dragend
1458
-
1459
-
1460
- _this._triggerDragStart(evt, touch); // Drag start event
1461
-
1462
-
1463
- _dispatchEvent({
1464
- sortable: _this,
1465
- name: 'choose',
1466
- originalEvent: evt
1467
- }); // Chosen item
1468
-
1469
-
1470
- toggleClass(dragEl, options.chosenClass, true);
1471
- }; // Disable "draggable"
1472
-
1473
-
1474
- options.ignore.split(',').forEach(function (criteria) {
1475
- find(dragEl, criteria.trim(), _disableDraggable);
1476
- });
1477
- on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1478
- on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1479
- on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1480
- on(ownerDocument, 'mouseup', _this._onDrop);
1481
- on(ownerDocument, 'touchend', _this._onDrop);
1482
- on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
1483
-
1484
- if (FireFox && this.nativeDraggable) {
1485
- this.options.touchStartThreshold = 4;
1486
- dragEl.draggable = true;
1487
- }
1488
-
1489
- pluginEvent('delayStart', this, {
1490
- evt: evt
1491
- }); // Delay is impossible for native DnD in Edge or IE
1492
-
1493
- if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1494
- if (Sortable.eventCanceled) {
1495
- this._onDrop();
1496
-
1497
- return;
1498
- } // If the user moves the pointer or let go the click or touch
1499
- // before the delay has been reached:
1500
- // disable the delayed drag
1501
-
1502
-
1503
- on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1504
- on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1505
- on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1506
- on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1507
- on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1508
- options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1509
- _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1510
- } else {
1511
- dragStartFn();
1512
- }
1513
- }
1514
- },
1515
- _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
1516
- /** TouchEvent|PointerEvent **/
1517
- e) {
1518
- var touch = e.touches ? e.touches[0] : e;
1519
-
1520
- 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))) {
1521
- this._disableDelayedDrag();
1522
- }
1523
- },
1524
- _disableDelayedDrag: function _disableDelayedDrag() {
1525
- dragEl && _disableDraggable(dragEl);
1526
- clearTimeout(this._dragStartTimer);
1527
-
1528
- this._disableDelayedDragEvents();
1529
- },
1530
- _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1531
- var ownerDocument = this.el.ownerDocument;
1532
- off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1533
- off(ownerDocument, 'touchend', this._disableDelayedDrag);
1534
- off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1535
- off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1536
- off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1537
- off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1538
- },
1539
- _triggerDragStart: function _triggerDragStart(
1540
- /** Event */
1541
- evt,
1542
- /** Touch */
1543
- touch) {
1544
- touch = touch || evt.pointerType == 'touch' && evt;
1545
-
1546
- if (!this.nativeDraggable || touch) {
1547
- if (this.options.supportPointer) {
1548
- on(document, 'pointermove', this._onTouchMove);
1549
- } else if (touch) {
1550
- on(document, 'touchmove', this._onTouchMove);
1551
- } else {
1552
- on(document, 'mousemove', this._onTouchMove);
1553
- }
1554
- } else {
1555
- on(dragEl, 'dragend', this);
1556
- on(rootEl, 'dragstart', this._onDragStart);
1557
- }
1558
-
1559
- try {
1560
- if (document.selection) {
1561
- // Timeout neccessary for IE9
1562
- _nextTick(function () {
1563
- document.selection.empty();
1564
- });
1565
- } else {
1566
- window.getSelection().removeAllRanges();
1567
- }
1568
- } catch (err) {}
1569
- },
1570
- _dragStarted: function _dragStarted(fallback, evt) {
1571
-
1572
- awaitingDragStarted = false;
1573
-
1574
- if (rootEl && dragEl) {
1575
- pluginEvent('dragStarted', this, {
1576
- evt: evt
1577
- });
1578
-
1579
- if (this.nativeDraggable) {
1580
- on(document, 'dragover', _checkOutsideTargetEl);
1581
- }
1582
-
1583
- var options = this.options; // Apply effect
1584
-
1585
- !fallback && toggleClass(dragEl, options.dragClass, false);
1586
- toggleClass(dragEl, options.ghostClass, true);
1587
- Sortable.active = this;
1588
- fallback && this._appendGhost(); // Drag start event
1589
-
1590
- _dispatchEvent({
1591
- sortable: this,
1592
- name: 'start',
1593
- originalEvent: evt
1594
- });
1595
- } else {
1596
- this._nulling();
1597
- }
1598
- },
1599
- _emulateDragOver: function _emulateDragOver() {
1600
- if (touchEvt) {
1601
- this._lastX = touchEvt.clientX;
1602
- this._lastY = touchEvt.clientY;
1603
-
1604
- _hideGhostForTarget();
1605
-
1606
- var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1607
- var parent = target;
1608
-
1609
- while (target && target.shadowRoot) {
1610
- target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1611
- if (target === parent) break;
1612
- parent = target;
1613
- }
1614
-
1615
- dragEl.parentNode[expando]._isOutsideThisEl(target);
1616
-
1617
- if (parent) {
1618
- do {
1619
- if (parent[expando]) {
1620
- var inserted = void 0;
1621
- inserted = parent[expando]._onDragOver({
1622
- clientX: touchEvt.clientX,
1623
- clientY: touchEvt.clientY,
1624
- target: target,
1625
- rootEl: parent
1626
- });
1627
-
1628
- if (inserted && !this.options.dragoverBubble) {
1629
- break;
1630
- }
1631
- }
1632
-
1633
- target = parent; // store last element
1634
- }
1635
- /* jshint boss:true */
1636
- while (parent = parent.parentNode);
1637
- }
1638
-
1639
- _unhideGhostForTarget();
1640
- }
1641
- },
1642
- _onTouchMove: function _onTouchMove(
1643
- /**TouchEvent*/
1644
- evt) {
1645
- if (tapEvt) {
1646
- var options = this.options,
1647
- fallbackTolerance = options.fallbackTolerance,
1648
- fallbackOffset = options.fallbackOffset,
1649
- touch = evt.touches ? evt.touches[0] : evt,
1650
- ghostMatrix = ghostEl && matrix(ghostEl, true),
1651
- scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1652
- scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1653
- relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1654
- dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1655
- 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
1656
-
1657
- if (!Sortable.active && !awaitingDragStarted) {
1658
- if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1659
- return;
1660
- }
1661
-
1662
- this._onDragStart(evt, true);
1663
- }
1664
-
1665
- if (ghostEl) {
1666
- if (ghostMatrix) {
1667
- ghostMatrix.e += dx - (lastDx || 0);
1668
- ghostMatrix.f += dy - (lastDy || 0);
1669
- } else {
1670
- ghostMatrix = {
1671
- a: 1,
1672
- b: 0,
1673
- c: 0,
1674
- d: 1,
1675
- e: dx,
1676
- f: dy
1677
- };
1678
- }
1679
-
1680
- var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
1681
- css(ghostEl, 'webkitTransform', cssMatrix);
1682
- css(ghostEl, 'mozTransform', cssMatrix);
1683
- css(ghostEl, 'msTransform', cssMatrix);
1684
- css(ghostEl, 'transform', cssMatrix);
1685
- lastDx = dx;
1686
- lastDy = dy;
1687
- touchEvt = touch;
1688
- }
1689
-
1690
- evt.cancelable && evt.preventDefault();
1691
- }
1692
- },
1693
- _appendGhost: function _appendGhost() {
1694
- // Bug if using scale(): https://stackoverflow.com/questions/2637058
1695
- // Not being adjusted for
1696
- if (!ghostEl) {
1697
- var container = this.options.fallbackOnBody ? document.body : rootEl,
1698
- rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1699
- options = this.options; // Position absolutely
1700
-
1701
- if (PositionGhostAbsolutely) {
1702
- // Get relatively positioned parent
1703
- ghostRelativeParent = container;
1704
-
1705
- while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1706
- ghostRelativeParent = ghostRelativeParent.parentNode;
1707
- }
1708
-
1709
- if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1710
- if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1711
- rect.top += ghostRelativeParent.scrollTop;
1712
- rect.left += ghostRelativeParent.scrollLeft;
1713
- } else {
1714
- ghostRelativeParent = getWindowScrollingElement();
1715
- }
1716
-
1717
- ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1718
- }
1719
-
1720
- ghostEl = dragEl.cloneNode(true);
1721
- toggleClass(ghostEl, options.ghostClass, false);
1722
- toggleClass(ghostEl, options.fallbackClass, true);
1723
- toggleClass(ghostEl, options.dragClass, true);
1724
- css(ghostEl, 'transition', '');
1725
- css(ghostEl, 'transform', '');
1726
- css(ghostEl, 'box-sizing', 'border-box');
1727
- css(ghostEl, 'margin', 0);
1728
- css(ghostEl, 'top', rect.top);
1729
- css(ghostEl, 'left', rect.left);
1730
- css(ghostEl, 'width', rect.width);
1731
- css(ghostEl, 'height', rect.height);
1732
- css(ghostEl, 'opacity', '0.8');
1733
- css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1734
- css(ghostEl, 'zIndex', '100000');
1735
- css(ghostEl, 'pointerEvents', 'none');
1736
- Sortable.ghost = ghostEl;
1737
- container.appendChild(ghostEl); // Set transform-origin
1738
-
1739
- css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
1740
- }
1741
- },
1742
- _onDragStart: function _onDragStart(
1743
- /**Event*/
1744
- evt,
1745
- /**boolean*/
1746
- fallback) {
1747
- var _this = this;
1748
-
1749
- var dataTransfer = evt.dataTransfer;
1750
- var options = _this.options;
1751
- pluginEvent('dragStart', this, {
1752
- evt: evt
1753
- });
1754
-
1755
- if (Sortable.eventCanceled) {
1756
- this._onDrop();
1757
-
1758
- return;
1759
- }
1760
-
1761
- pluginEvent('setupClone', this);
1762
-
1763
- if (!Sortable.eventCanceled) {
1764
- cloneEl = clone(dragEl);
1765
- cloneEl.draggable = false;
1766
- cloneEl.style['will-change'] = '';
1767
-
1768
- this._hideClone();
1769
-
1770
- toggleClass(cloneEl, this.options.chosenClass, false);
1771
- Sortable.clone = cloneEl;
1772
- } // #1143: IFrame support workaround
1773
-
1774
-
1775
- _this.cloneId = _nextTick(function () {
1776
- pluginEvent('clone', _this);
1777
- if (Sortable.eventCanceled) return;
1778
-
1779
- if (!_this.options.removeCloneOnHide) {
1780
- rootEl.insertBefore(cloneEl, dragEl);
1781
- }
1782
-
1783
- _this._hideClone();
1784
-
1785
- _dispatchEvent({
1786
- sortable: _this,
1787
- name: 'clone'
1788
- });
1789
- });
1790
- !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
1791
-
1792
- if (fallback) {
1793
- ignoreNextClick = true;
1794
- _this._loopId = setInterval(_this._emulateDragOver, 50);
1795
- } else {
1796
- // Undo what was set in _prepareDragStart before drag started
1797
- off(document, 'mouseup', _this._onDrop);
1798
- off(document, 'touchend', _this._onDrop);
1799
- off(document, 'touchcancel', _this._onDrop);
1800
-
1801
- if (dataTransfer) {
1802
- dataTransfer.effectAllowed = 'move';
1803
- options.setData && options.setData.call(_this, dataTransfer, dragEl);
1804
- }
1805
-
1806
- on(document, 'drop', _this); // #1276 fix:
1807
-
1808
- css(dragEl, 'transform', 'translateZ(0)');
1809
- }
1810
-
1811
- awaitingDragStarted = true;
1812
- _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1813
- on(document, 'selectstart', _this);
1814
- moved = true;
1815
-
1816
- if (Safari) {
1817
- css(document.body, 'user-select', 'none');
1818
- }
1819
- },
1820
- // Returns true - if no further action is needed (either inserted or another condition)
1821
- _onDragOver: function _onDragOver(
1822
- /**Event*/
1823
- evt) {
1824
- var el = this.el,
1825
- target = evt.target,
1826
- dragRect,
1827
- targetRect,
1828
- revert,
1829
- options = this.options,
1830
- group = options.group,
1831
- activeSortable = Sortable.active,
1832
- isOwner = activeGroup === group,
1833
- canSort = options.sort,
1834
- fromSortable = putSortable || activeSortable,
1835
- vertical,
1836
- _this = this,
1837
- completedFired = false;
1838
-
1839
- if (_silent) return;
1840
-
1841
- function dragOverEvent(name, extra) {
1842
- pluginEvent(name, _this, _objectSpread2({
1843
- evt: evt,
1844
- isOwner: isOwner,
1845
- axis: vertical ? 'vertical' : 'horizontal',
1846
- revert: revert,
1847
- dragRect: dragRect,
1848
- targetRect: targetRect,
1849
- canSort: canSort,
1850
- fromSortable: fromSortable,
1851
- target: target,
1852
- completed: completed,
1853
- onMove: function onMove(target, after) {
1854
- return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1855
- },
1856
- changed: changed
1857
- }, extra));
1858
- } // Capture animation state
1859
-
1860
-
1861
- function capture() {
1862
- dragOverEvent('dragOverAnimationCapture');
1863
-
1864
- _this.captureAnimationState();
1865
-
1866
- if (_this !== fromSortable) {
1867
- fromSortable.captureAnimationState();
1868
- }
1869
- } // Return invocation when dragEl is inserted (or completed)
1870
-
1871
-
1872
- function completed(insertion) {
1873
- dragOverEvent('dragOverCompleted', {
1874
- insertion: insertion
1875
- });
1876
-
1877
- if (insertion) {
1878
- // Clones must be hidden before folding animation to capture dragRectAbsolute properly
1879
- if (isOwner) {
1880
- activeSortable._hideClone();
1881
- } else {
1882
- activeSortable._showClone(_this);
1883
- }
1884
-
1885
- if (_this !== fromSortable) {
1886
- // Set ghost class to new sortable's ghost class
1887
- toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
1888
- toggleClass(dragEl, options.ghostClass, true);
1889
- }
1890
-
1891
- if (putSortable !== _this && _this !== Sortable.active) {
1892
- putSortable = _this;
1893
- } else if (_this === Sortable.active && putSortable) {
1894
- putSortable = null;
1895
- } // Animation
1896
-
1897
-
1898
- if (fromSortable === _this) {
1899
- _this._ignoreWhileAnimating = target;
1900
- }
1901
-
1902
- _this.animateAll(function () {
1903
- dragOverEvent('dragOverAnimationComplete');
1904
- _this._ignoreWhileAnimating = null;
1905
- });
1906
-
1907
- if (_this !== fromSortable) {
1908
- fromSortable.animateAll();
1909
- fromSortable._ignoreWhileAnimating = null;
1910
- }
1911
- } // Null lastTarget if it is not inside a previously swapped element
1912
-
1913
-
1914
- if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
1915
- lastTarget = null;
1916
- } // no bubbling and not fallback
1917
-
1918
-
1919
- if (!options.dragoverBubble && !evt.rootEl && target !== document) {
1920
- dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
1921
-
1922
-
1923
- !insertion && nearestEmptyInsertDetectEvent(evt);
1924
- }
1925
-
1926
- !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
1927
- return completedFired = true;
1928
- } // Call when dragEl has been inserted
1929
-
1930
-
1931
- function changed() {
1932
- newIndex = index(dragEl);
1933
- newDraggableIndex = index(dragEl, options.draggable);
1934
-
1935
- _dispatchEvent({
1936
- sortable: _this,
1937
- name: 'change',
1938
- toEl: el,
1939
- newIndex: newIndex,
1940
- newDraggableIndex: newDraggableIndex,
1941
- originalEvent: evt
1942
- });
1943
- }
1944
-
1945
- if (evt.preventDefault !== void 0) {
1946
- evt.cancelable && evt.preventDefault();
1947
- }
1948
-
1949
- target = closest(target, options.draggable, el, true);
1950
- dragOverEvent('dragOver');
1951
- if (Sortable.eventCanceled) return completedFired;
1952
-
1953
- if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
1954
- return completed(false);
1955
- }
1956
-
1957
- ignoreNextClick = false;
1958
-
1959
- if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
1960
- : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
1961
- vertical = this._getDirection(evt, target) === 'vertical';
1962
- dragRect = getRect(dragEl);
1963
- dragOverEvent('dragOverValid');
1964
- if (Sortable.eventCanceled) return completedFired;
1965
-
1966
- if (revert) {
1967
- parentEl = rootEl; // actualization
1968
-
1969
- capture();
1970
-
1971
- this._hideClone();
1972
-
1973
- dragOverEvent('revert');
1974
-
1975
- if (!Sortable.eventCanceled) {
1976
- if (nextEl) {
1977
- rootEl.insertBefore(dragEl, nextEl);
1978
- } else {
1979
- rootEl.appendChild(dragEl);
1980
- }
1981
- }
1982
-
1983
- return completed(true);
1984
- }
1985
-
1986
- var elLastChild = lastChild(el, options.draggable);
1987
-
1988
- if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
1989
- // Insert to end of list
1990
- // If already at end of list: Do not insert
1991
- if (elLastChild === dragEl) {
1992
- return completed(false);
1993
- } // if there is a last element, it is the target
1994
-
1995
-
1996
- if (elLastChild && el === evt.target) {
1997
- target = elLastChild;
1998
- }
1999
-
2000
- if (target) {
2001
- targetRect = getRect(target);
2002
- }
2003
-
2004
- if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
2005
- capture();
2006
- el.appendChild(dragEl);
2007
- parentEl = el; // actualization
2008
-
2009
- changed();
2010
- return completed(true);
2011
- }
2012
- } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
2013
- // Insert to start of list
2014
- var firstChild = getChild(el, 0, options, true);
2015
-
2016
- if (firstChild === dragEl) {
2017
- return completed(false);
2018
- }
2019
-
2020
- target = firstChild;
2021
- targetRect = getRect(target);
2022
-
2023
- if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
2024
- capture();
2025
- el.insertBefore(dragEl, firstChild);
2026
- parentEl = el; // actualization
2027
-
2028
- changed();
2029
- return completed(true);
2030
- }
2031
- } else if (target.parentNode === el) {
2032
- targetRect = getRect(target);
2033
- var direction = 0,
2034
- targetBeforeFirstSwap,
2035
- differentLevel = dragEl.parentNode !== el,
2036
- differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
2037
- side1 = vertical ? 'top' : 'left',
2038
- scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
2039
- scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
2040
-
2041
- if (lastTarget !== target) {
2042
- targetBeforeFirstSwap = targetRect[side1];
2043
- pastFirstInvertThresh = false;
2044
- isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
2045
- }
2046
-
2047
- direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
2048
- var sibling;
2049
-
2050
- if (direction !== 0) {
2051
- // Check if target is beside dragEl in respective direction (ignoring hidden elements)
2052
- var dragIndex = index(dragEl);
2053
-
2054
- do {
2055
- dragIndex -= direction;
2056
- sibling = parentEl.children[dragIndex];
2057
- } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
2058
- } // If dragEl is already beside target: Do not insert
2059
-
2060
-
2061
- if (direction === 0 || sibling === target) {
2062
- return completed(false);
2063
- }
2064
-
2065
- lastTarget = target;
2066
- lastDirection = direction;
2067
- var nextSibling = target.nextElementSibling,
2068
- after = false;
2069
- after = direction === 1;
2070
-
2071
- var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
2072
-
2073
- if (moveVector !== false) {
2074
- if (moveVector === 1 || moveVector === -1) {
2075
- after = moveVector === 1;
2076
- }
2077
-
2078
- _silent = true;
2079
- setTimeout(_unsilent, 30);
2080
- capture();
2081
-
2082
- if (after && !nextSibling) {
2083
- el.appendChild(dragEl);
2084
- } else {
2085
- target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
2086
- } // Undo chrome's scroll adjustment (has no effect on other browsers)
2087
-
2088
-
2089
- if (scrolledPastTop) {
2090
- scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
2091
- }
2092
-
2093
- parentEl = dragEl.parentNode; // actualization
2094
- // must be done before animation
2095
-
2096
- if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
2097
- targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
2098
- }
2099
-
2100
- changed();
2101
- return completed(true);
2102
- }
2103
- }
2104
-
2105
- if (el.contains(dragEl)) {
2106
- return completed(false);
2107
- }
2108
- }
2109
-
2110
- return false;
2111
- },
2112
- _ignoreWhileAnimating: null,
2113
- _offMoveEvents: function _offMoveEvents() {
2114
- off(document, 'mousemove', this._onTouchMove);
2115
- off(document, 'touchmove', this._onTouchMove);
2116
- off(document, 'pointermove', this._onTouchMove);
2117
- off(document, 'dragover', nearestEmptyInsertDetectEvent);
2118
- off(document, 'mousemove', nearestEmptyInsertDetectEvent);
2119
- off(document, 'touchmove', nearestEmptyInsertDetectEvent);
2120
- },
2121
- _offUpEvents: function _offUpEvents() {
2122
- var ownerDocument = this.el.ownerDocument;
2123
- off(ownerDocument, 'mouseup', this._onDrop);
2124
- off(ownerDocument, 'touchend', this._onDrop);
2125
- off(ownerDocument, 'pointerup', this._onDrop);
2126
- off(ownerDocument, 'touchcancel', this._onDrop);
2127
- off(document, 'selectstart', this);
2128
- },
2129
- _onDrop: function _onDrop(
2130
- /**Event*/
2131
- evt) {
2132
- var el = this.el,
2133
- options = this.options; // Get the index of the dragged element within its parent
2134
-
2135
- newIndex = index(dragEl);
2136
- newDraggableIndex = index(dragEl, options.draggable);
2137
- pluginEvent('drop', this, {
2138
- evt: evt
2139
- });
2140
- parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
2141
-
2142
- newIndex = index(dragEl);
2143
- newDraggableIndex = index(dragEl, options.draggable);
2144
-
2145
- if (Sortable.eventCanceled) {
2146
- this._nulling();
2147
-
2148
- return;
2149
- }
2150
-
2151
- awaitingDragStarted = false;
2152
- isCircumstantialInvert = false;
2153
- pastFirstInvertThresh = false;
2154
- clearInterval(this._loopId);
2155
- clearTimeout(this._dragStartTimer);
2156
-
2157
- _cancelNextTick(this.cloneId);
2158
-
2159
- _cancelNextTick(this._dragStartId); // Unbind events
2160
-
2161
-
2162
- if (this.nativeDraggable) {
2163
- off(document, 'drop', this);
2164
- off(el, 'dragstart', this._onDragStart);
2165
- }
2166
-
2167
- this._offMoveEvents();
2168
-
2169
- this._offUpEvents();
2170
-
2171
- if (Safari) {
2172
- css(document.body, 'user-select', '');
2173
- }
2174
-
2175
- css(dragEl, 'transform', '');
2176
-
2177
- if (evt) {
2178
- if (moved) {
2179
- evt.cancelable && evt.preventDefault();
2180
- !options.dropBubble && evt.stopPropagation();
2181
- }
2182
-
2183
- ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
2184
-
2185
- if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
2186
- // Remove clone(s)
2187
- cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
2188
- }
2189
-
2190
- if (dragEl) {
2191
- if (this.nativeDraggable) {
2192
- off(dragEl, 'dragend', this);
2193
- }
2194
-
2195
- _disableDraggable(dragEl);
2196
-
2197
- dragEl.style['will-change'] = ''; // Remove classes
2198
- // ghostClass is added in dragStarted
2199
-
2200
- if (moved && !awaitingDragStarted) {
2201
- toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
2202
- }
2203
-
2204
- toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
2205
-
2206
- _dispatchEvent({
2207
- sortable: this,
2208
- name: 'unchoose',
2209
- toEl: parentEl,
2210
- newIndex: null,
2211
- newDraggableIndex: null,
2212
- originalEvent: evt
2213
- });
2214
-
2215
- if (rootEl !== parentEl) {
2216
- if (newIndex >= 0) {
2217
- // Add event
2218
- _dispatchEvent({
2219
- rootEl: parentEl,
2220
- name: 'add',
2221
- toEl: parentEl,
2222
- fromEl: rootEl,
2223
- originalEvent: evt
2224
- }); // Remove event
2225
-
2226
-
2227
- _dispatchEvent({
2228
- sortable: this,
2229
- name: 'remove',
2230
- toEl: parentEl,
2231
- originalEvent: evt
2232
- }); // drag from one list and drop into another
2233
-
2234
-
2235
- _dispatchEvent({
2236
- rootEl: parentEl,
2237
- name: 'sort',
2238
- toEl: parentEl,
2239
- fromEl: rootEl,
2240
- originalEvent: evt
2241
- });
2242
-
2243
- _dispatchEvent({
2244
- sortable: this,
2245
- name: 'sort',
2246
- toEl: parentEl,
2247
- originalEvent: evt
2248
- });
2249
- }
2250
-
2251
- putSortable && putSortable.save();
2252
- } else {
2253
- if (newIndex !== oldIndex) {
2254
- if (newIndex >= 0) {
2255
- // drag & drop within the same list
2256
- _dispatchEvent({
2257
- sortable: this,
2258
- name: 'update',
2259
- toEl: parentEl,
2260
- originalEvent: evt
2261
- });
2262
-
2263
- _dispatchEvent({
2264
- sortable: this,
2265
- name: 'sort',
2266
- toEl: parentEl,
2267
- originalEvent: evt
2268
- });
2269
- }
2270
- }
2271
- }
2272
-
2273
- if (Sortable.active) {
2274
- /* jshint eqnull:true */
2275
- if (newIndex == null || newIndex === -1) {
2276
- newIndex = oldIndex;
2277
- newDraggableIndex = oldDraggableIndex;
2278
- }
2279
-
2280
- _dispatchEvent({
2281
- sortable: this,
2282
- name: 'end',
2283
- toEl: parentEl,
2284
- originalEvent: evt
2285
- }); // Save sorting
2286
-
2287
-
2288
- this.save();
2289
- }
2290
- }
2291
- }
2292
-
2293
- this._nulling();
2294
- },
2295
- _nulling: function _nulling() {
2296
- pluginEvent('nulling', this);
2297
- 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;
2298
- savedInputChecked.forEach(function (el) {
2299
- el.checked = true;
2300
- });
2301
- savedInputChecked.length = lastDx = lastDy = 0;
2302
- },
2303
- handleEvent: function handleEvent(
2304
- /**Event*/
2305
- evt) {
2306
- switch (evt.type) {
2307
- case 'drop':
2308
- case 'dragend':
2309
- this._onDrop(evt);
2310
-
2311
- break;
2312
-
2313
- case 'dragenter':
2314
- case 'dragover':
2315
- if (dragEl) {
2316
- this._onDragOver(evt);
2317
-
2318
- _globalDragOver(evt);
2319
- }
2320
-
2321
- break;
2322
-
2323
- case 'selectstart':
2324
- evt.preventDefault();
2325
- break;
2326
- }
2327
- },
2328
-
2329
- /**
2330
- * Serializes the item into an array of string.
2331
- * @returns {String[]}
2332
- */
2333
- toArray: function toArray() {
2334
- var order = [],
2335
- el,
2336
- children = this.el.children,
2337
- i = 0,
2338
- n = children.length,
2339
- options = this.options;
2340
-
2341
- for (; i < n; i++) {
2342
- el = children[i];
2343
-
2344
- if (closest(el, options.draggable, this.el, false)) {
2345
- order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2346
- }
2347
- }
2348
-
2349
- return order;
2350
- },
2351
-
2352
- /**
2353
- * Sorts the elements according to the array.
2354
- * @param {String[]} order order of the items
2355
- */
2356
- sort: function sort(order, useAnimation) {
2357
- var items = {},
2358
- rootEl = this.el;
2359
- this.toArray().forEach(function (id, i) {
2360
- var el = rootEl.children[i];
2361
-
2362
- if (closest(el, this.options.draggable, rootEl, false)) {
2363
- items[id] = el;
2364
- }
2365
- }, this);
2366
- useAnimation && this.captureAnimationState();
2367
- order.forEach(function (id) {
2368
- if (items[id]) {
2369
- rootEl.removeChild(items[id]);
2370
- rootEl.appendChild(items[id]);
2371
- }
2372
- });
2373
- useAnimation && this.animateAll();
2374
- },
2375
-
2376
- /**
2377
- * Save the current sorting
2378
- */
2379
- save: function save() {
2380
- var store = this.options.store;
2381
- store && store.set && store.set(this);
2382
- },
2383
-
2384
- /**
2385
- * 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.
2386
- * @param {HTMLElement} el
2387
- * @param {String} [selector] default: `options.draggable`
2388
- * @returns {HTMLElement|null}
2389
- */
2390
- closest: function closest$1(el, selector) {
2391
- return closest(el, selector || this.options.draggable, this.el, false);
2392
- },
2393
-
2394
- /**
2395
- * Set/get option
2396
- * @param {string} name
2397
- * @param {*} [value]
2398
- * @returns {*}
2399
- */
2400
- option: function option(name, value) {
2401
- var options = this.options;
2402
-
2403
- if (value === void 0) {
2404
- return options[name];
2405
- } else {
2406
- var modifiedValue = PluginManager.modifyOption(this, name, value);
2407
-
2408
- if (typeof modifiedValue !== 'undefined') {
2409
- options[name] = modifiedValue;
2410
- } else {
2411
- options[name] = value;
2412
- }
2413
-
2414
- if (name === 'group') {
2415
- _prepareGroup(options);
2416
- }
2417
- }
2418
- },
2419
-
2420
- /**
2421
- * Destroy
2422
- */
2423
- destroy: function destroy() {
2424
- pluginEvent('destroy', this);
2425
- var el = this.el;
2426
- el[expando] = null;
2427
- off(el, 'mousedown', this._onTapStart);
2428
- off(el, 'touchstart', this._onTapStart);
2429
- off(el, 'pointerdown', this._onTapStart);
2430
-
2431
- if (this.nativeDraggable) {
2432
- off(el, 'dragover', this);
2433
- off(el, 'dragenter', this);
2434
- } // Remove draggable attributes
2435
-
2436
-
2437
- Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2438
- el.removeAttribute('draggable');
2439
- });
2440
-
2441
- this._onDrop();
2442
-
2443
- this._disableDelayedDragEvents();
2444
-
2445
- sortables.splice(sortables.indexOf(this.el), 1);
2446
- this.el = el = null;
2447
- },
2448
- _hideClone: function _hideClone() {
2449
- if (!cloneHidden) {
2450
- pluginEvent('hideClone', this);
2451
- if (Sortable.eventCanceled) return;
2452
- css(cloneEl, 'display', 'none');
2453
-
2454
- if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2455
- cloneEl.parentNode.removeChild(cloneEl);
2456
- }
2457
-
2458
- cloneHidden = true;
2459
- }
2460
- },
2461
- _showClone: function _showClone(putSortable) {
2462
- if (putSortable.lastPutMode !== 'clone') {
2463
- this._hideClone();
2464
-
2465
- return;
2466
- }
2467
-
2468
- if (cloneHidden) {
2469
- pluginEvent('showClone', this);
2470
- if (Sortable.eventCanceled) return; // show clone at dragEl or original position
2471
-
2472
- if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
2473
- rootEl.insertBefore(cloneEl, dragEl);
2474
- } else if (nextEl) {
2475
- rootEl.insertBefore(cloneEl, nextEl);
2476
- } else {
2477
- rootEl.appendChild(cloneEl);
2478
- }
2479
-
2480
- if (this.options.group.revertClone) {
2481
- this.animate(dragEl, cloneEl);
2482
- }
2483
-
2484
- css(cloneEl, 'display', '');
2485
- cloneHidden = false;
2486
- }
2487
- }
2488
- };
2489
-
2490
- function _globalDragOver(
2491
- /**Event*/
2492
- evt) {
2493
- if (evt.dataTransfer) {
2494
- evt.dataTransfer.dropEffect = 'move';
2495
- }
2496
-
2497
- evt.cancelable && evt.preventDefault();
2498
- }
2499
-
2500
- function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2501
- var evt,
2502
- sortable = fromEl[expando],
2503
- onMoveFn = sortable.options.onMove,
2504
- retVal; // Support for new CustomEvent feature
2505
-
2506
- if (window.CustomEvent && !IE11OrLess && !Edge) {
2507
- evt = new CustomEvent('move', {
2508
- bubbles: true,
2509
- cancelable: true
2510
- });
2511
- } else {
2512
- evt = document.createEvent('Event');
2513
- evt.initEvent('move', true, true);
2514
- }
2515
-
2516
- evt.to = toEl;
2517
- evt.from = fromEl;
2518
- evt.dragged = dragEl;
2519
- evt.draggedRect = dragRect;
2520
- evt.related = targetEl || toEl;
2521
- evt.relatedRect = targetRect || getRect(toEl);
2522
- evt.willInsertAfter = willInsertAfter;
2523
- evt.originalEvent = originalEvent;
2524
- fromEl.dispatchEvent(evt);
2525
-
2526
- if (onMoveFn) {
2527
- retVal = onMoveFn.call(sortable, evt, originalEvent);
2528
- }
2529
-
2530
- return retVal;
2531
- }
2532
-
2533
- function _disableDraggable(el) {
2534
- el.draggable = false;
2535
- }
2536
-
2537
- function _unsilent() {
2538
- _silent = false;
2539
- }
2540
-
2541
- function _ghostIsFirst(evt, vertical, sortable) {
2542
- var rect = getRect(getChild(sortable.el, 0, sortable.options, true));
2543
- var spacer = 10;
2544
- 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;
2545
- }
2546
-
2547
- function _ghostIsLast(evt, vertical, sortable) {
2548
- var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
2549
- var spacer = 10;
2550
- 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;
2551
- }
2552
-
2553
- function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2554
- var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2555
- targetLength = vertical ? targetRect.height : targetRect.width,
2556
- targetS1 = vertical ? targetRect.top : targetRect.left,
2557
- targetS2 = vertical ? targetRect.bottom : targetRect.right,
2558
- invert = false;
2559
-
2560
- if (!invertSwap) {
2561
- // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2562
- if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2563
- // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2564
- // check if past first invert threshold on side opposite of lastDirection
2565
- if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2566
- // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2567
- pastFirstInvertThresh = true;
2568
- }
2569
-
2570
- if (!pastFirstInvertThresh) {
2571
- // dragEl shadow (target move distance shadow)
2572
- if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2573
- : mouseOnAxis > targetS2 - targetMoveDistance) {
2574
- return -lastDirection;
2575
- }
2576
- } else {
2577
- invert = true;
2578
- }
2579
- } else {
2580
- // Regular
2581
- if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2582
- return _getInsertDirection(target);
2583
- }
2584
- }
2585
- }
2586
-
2587
- invert = invert || invertSwap;
2588
-
2589
- if (invert) {
2590
- // Invert of regular
2591
- if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2592
- return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2593
- }
2594
- }
2595
-
2596
- return 0;
2597
- }
2598
- /**
2599
- * Gets the direction dragEl must be swapped relative to target in order to make it
2600
- * seem that dragEl has been "inserted" into that element's position
2601
- * @param {HTMLElement} target The target whose position dragEl is being inserted at
2602
- * @return {Number} Direction dragEl must be swapped
2603
- */
2604
-
2605
-
2606
- function _getInsertDirection(target) {
2607
- if (index(dragEl) < index(target)) {
2608
- return 1;
2609
- } else {
2610
- return -1;
2611
- }
2612
- }
2613
- /**
2614
- * Generate id
2615
- * @param {HTMLElement} el
2616
- * @returns {String}
2617
- * @private
2618
- */
2619
-
2620
-
2621
- function _generateId(el) {
2622
- var str = el.tagName + el.className + el.src + el.href + el.textContent,
2623
- i = str.length,
2624
- sum = 0;
2625
-
2626
- while (i--) {
2627
- sum += str.charCodeAt(i);
2628
- }
2629
-
2630
- return sum.toString(36);
2631
- }
2632
-
2633
- function _saveInputCheckedState(root) {
2634
- savedInputChecked.length = 0;
2635
- var inputs = root.getElementsByTagName('input');
2636
- var idx = inputs.length;
2637
-
2638
- while (idx--) {
2639
- var el = inputs[idx];
2640
- el.checked && savedInputChecked.push(el);
2641
- }
2642
- }
2643
-
2644
- function _nextTick(fn) {
2645
- return setTimeout(fn, 0);
2646
- }
2647
-
2648
- function _cancelNextTick(id) {
2649
- return clearTimeout(id);
2650
- } // Fixed #973:
2651
-
2652
-
2653
- if (documentExists) {
2654
- on(document, 'touchmove', function (evt) {
2655
- if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
2656
- evt.preventDefault();
2657
- }
2658
- });
2659
- } // Export utils
2660
-
2661
-
2662
- Sortable.utils = {
2663
- on: on,
2664
- off: off,
2665
- css: css,
2666
- find: find,
2667
- is: function is(el, selector) {
2668
- return !!closest(el, selector, el, false);
2669
- },
2670
- extend: extend,
2671
- throttle: throttle,
2672
- closest: closest,
2673
- toggleClass: toggleClass,
2674
- clone: clone,
2675
- index: index,
2676
- nextTick: _nextTick,
2677
- cancelNextTick: _cancelNextTick,
2678
- detectDirection: _detectDirection,
2679
- getChild: getChild
2680
- };
2681
- /**
2682
- * Get the Sortable instance of an element
2683
- * @param {HTMLElement} element The element
2684
- * @return {Sortable|undefined} The instance of Sortable
2685
- */
2686
-
2687
- Sortable.get = function (element) {
2688
- return element[expando];
2689
- };
2690
- /**
2691
- * Mount a plugin to Sortable
2692
- * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2693
- */
2694
-
2695
-
2696
- Sortable.mount = function () {
2697
- for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2698
- plugins[_key] = arguments[_key];
2699
- }
2700
-
2701
- if (plugins[0].constructor === Array) plugins = plugins[0];
2702
- plugins.forEach(function (plugin) {
2703
- if (!plugin.prototype || !plugin.prototype.constructor) {
2704
- throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
2705
- }
2706
-
2707
- if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
2708
- PluginManager.mount(plugin);
2709
- });
2710
- };
2711
- /**
2712
- * Create sortable instance
2713
- * @param {HTMLElement} el
2714
- * @param {Object} [options]
2715
- */
2716
-
2717
-
2718
- Sortable.create = function (el, options) {
2719
- return new Sortable(el, options);
2720
- }; // Export
2721
-
2722
-
2723
- Sortable.version = version;
2724
-
2725
- var autoScrolls = [],
2726
- scrollEl,
2727
- scrollRootEl,
2728
- scrolling = false,
2729
- lastAutoScrollX,
2730
- lastAutoScrollY,
2731
- touchEvt$1,
2732
- pointerElemChangedInterval;
2733
-
2734
- function AutoScrollPlugin() {
2735
- function AutoScroll() {
2736
- this.defaults = {
2737
- scroll: true,
2738
- forceAutoScrollFallback: false,
2739
- scrollSensitivity: 30,
2740
- scrollSpeed: 10,
2741
- bubbleScroll: true
2742
- }; // Bind all private methods
2743
-
2744
- for (var fn in this) {
2745
- if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2746
- this[fn] = this[fn].bind(this);
2747
- }
2748
- }
2749
- }
2750
-
2751
- AutoScroll.prototype = {
2752
- dragStarted: function dragStarted(_ref) {
2753
- var originalEvent = _ref.originalEvent;
2754
-
2755
- if (this.sortable.nativeDraggable) {
2756
- on(document, 'dragover', this._handleAutoScroll);
2757
- } else {
2758
- if (this.options.supportPointer) {
2759
- on(document, 'pointermove', this._handleFallbackAutoScroll);
2760
- } else if (originalEvent.touches) {
2761
- on(document, 'touchmove', this._handleFallbackAutoScroll);
2762
- } else {
2763
- on(document, 'mousemove', this._handleFallbackAutoScroll);
2764
- }
2765
- }
2766
- },
2767
- dragOverCompleted: function dragOverCompleted(_ref2) {
2768
- var originalEvent = _ref2.originalEvent;
2769
-
2770
- // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2771
- if (!this.options.dragOverBubble && !originalEvent.rootEl) {
2772
- this._handleAutoScroll(originalEvent);
2773
- }
2774
- },
2775
- drop: function drop() {
2776
- if (this.sortable.nativeDraggable) {
2777
- off(document, 'dragover', this._handleAutoScroll);
2778
- } else {
2779
- off(document, 'pointermove', this._handleFallbackAutoScroll);
2780
- off(document, 'touchmove', this._handleFallbackAutoScroll);
2781
- off(document, 'mousemove', this._handleFallbackAutoScroll);
2782
- }
2783
-
2784
- clearPointerElemChangedInterval();
2785
- clearAutoScrolls();
2786
- cancelThrottle();
2787
- },
2788
- nulling: function nulling() {
2789
- touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2790
- autoScrolls.length = 0;
2791
- },
2792
- _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2793
- this._handleAutoScroll(evt, true);
2794
- },
2795
- _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2796
- var _this = this;
2797
-
2798
- var x = (evt.touches ? evt.touches[0] : evt).clientX,
2799
- y = (evt.touches ? evt.touches[0] : evt).clientY,
2800
- elem = document.elementFromPoint(x, y);
2801
- touchEvt$1 = evt; // IE does not seem to have native autoscroll,
2802
- // Edge's autoscroll seems too conditional,
2803
- // MACOS Safari does not have autoscroll,
2804
- // Firefox and Chrome are good
2805
-
2806
- if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
2807
- autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
2808
-
2809
- var ogElemScroller = getParentAutoScrollElement(elem, true);
2810
-
2811
- if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2812
- pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
2813
-
2814
- pointerElemChangedInterval = setInterval(function () {
2815
- var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2816
-
2817
- if (newElem !== ogElemScroller) {
2818
- ogElemScroller = newElem;
2819
- clearAutoScrolls();
2820
- }
2821
-
2822
- autoScroll(evt, _this.options, newElem, fallback);
2823
- }, 10);
2824
- lastAutoScrollX = x;
2825
- lastAutoScrollY = y;
2826
- }
2827
- } else {
2828
- // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2829
- if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2830
- clearAutoScrolls();
2831
- return;
2832
- }
2833
-
2834
- autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2835
- }
2836
- }
2837
- };
2838
- return _extends(AutoScroll, {
2839
- pluginName: 'scroll',
2840
- initializeByDefault: true
2841
- });
2842
- }
2843
-
2844
- function clearAutoScrolls() {
2845
- autoScrolls.forEach(function (autoScroll) {
2846
- clearInterval(autoScroll.pid);
2847
- });
2848
- autoScrolls = [];
2849
- }
2850
-
2851
- function clearPointerElemChangedInterval() {
2852
- clearInterval(pointerElemChangedInterval);
2853
- }
2854
-
2855
- var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2856
- // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2857
- if (!options.scroll) return;
2858
- var x = (evt.touches ? evt.touches[0] : evt).clientX,
2859
- y = (evt.touches ? evt.touches[0] : evt).clientY,
2860
- sens = options.scrollSensitivity,
2861
- speed = options.scrollSpeed,
2862
- winScroller = getWindowScrollingElement();
2863
- var scrollThisInstance = false,
2864
- scrollCustomFn; // New scroll root, set scrollEl
2865
-
2866
- if (scrollRootEl !== rootEl) {
2867
- scrollRootEl = rootEl;
2868
- clearAutoScrolls();
2869
- scrollEl = options.scroll;
2870
- scrollCustomFn = options.scrollFn;
2871
-
2872
- if (scrollEl === true) {
2873
- scrollEl = getParentAutoScrollElement(rootEl, true);
2874
- }
2875
- }
2876
-
2877
- var layersOut = 0;
2878
- var currentParent = scrollEl;
2879
-
2880
- do {
2881
- var el = currentParent,
2882
- rect = getRect(el),
2883
- top = rect.top,
2884
- bottom = rect.bottom,
2885
- left = rect.left,
2886
- right = rect.right,
2887
- width = rect.width,
2888
- height = rect.height,
2889
- canScrollX = void 0,
2890
- canScrollY = void 0,
2891
- scrollWidth = el.scrollWidth,
2892
- scrollHeight = el.scrollHeight,
2893
- elCSS = css(el),
2894
- scrollPosX = el.scrollLeft,
2895
- scrollPosY = el.scrollTop;
2896
-
2897
- if (el === winScroller) {
2898
- canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
2899
- canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
2900
- } else {
2901
- canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
2902
- canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
2903
- }
2904
-
2905
- var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
2906
- var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
2907
-
2908
- if (!autoScrolls[layersOut]) {
2909
- for (var i = 0; i <= layersOut; i++) {
2910
- if (!autoScrolls[i]) {
2911
- autoScrolls[i] = {};
2912
- }
2913
- }
2914
- }
2915
-
2916
- if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
2917
- autoScrolls[layersOut].el = el;
2918
- autoScrolls[layersOut].vx = vx;
2919
- autoScrolls[layersOut].vy = vy;
2920
- clearInterval(autoScrolls[layersOut].pid);
2921
-
2922
- if (vx != 0 || vy != 0) {
2923
- scrollThisInstance = true;
2924
- /* jshint loopfunc:true */
2925
-
2926
- autoScrolls[layersOut].pid = setInterval(function () {
2927
- // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
2928
- if (isFallback && this.layer === 0) {
2929
- Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
2930
-
2931
- }
2932
-
2933
- var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
2934
- var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
2935
-
2936
- if (typeof scrollCustomFn === 'function') {
2937
- if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
2938
- return;
2939
- }
2940
- }
2941
-
2942
- scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
2943
- }.bind({
2944
- layer: layersOut
2945
- }), 24);
2946
- }
2947
- }
2948
-
2949
- layersOut++;
2950
- } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
2951
-
2952
- scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
2953
- }, 30);
2954
-
2955
- var drop = function drop(_ref) {
2956
- var originalEvent = _ref.originalEvent,
2957
- putSortable = _ref.putSortable,
2958
- dragEl = _ref.dragEl,
2959
- activeSortable = _ref.activeSortable,
2960
- dispatchSortableEvent = _ref.dispatchSortableEvent,
2961
- hideGhostForTarget = _ref.hideGhostForTarget,
2962
- unhideGhostForTarget = _ref.unhideGhostForTarget;
2963
- if (!originalEvent) return;
2964
- var toSortable = putSortable || activeSortable;
2965
- hideGhostForTarget();
2966
- var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
2967
- var target = document.elementFromPoint(touch.clientX, touch.clientY);
2968
- unhideGhostForTarget();
2969
-
2970
- if (toSortable && !toSortable.el.contains(target)) {
2971
- dispatchSortableEvent('spill');
2972
- this.onSpill({
2973
- dragEl: dragEl,
2974
- putSortable: putSortable
2975
- });
2976
- }
2977
- };
2978
-
2979
- function Revert() {}
2980
-
2981
- Revert.prototype = {
2982
- startIndex: null,
2983
- dragStart: function dragStart(_ref2) {
2984
- var oldDraggableIndex = _ref2.oldDraggableIndex;
2985
- this.startIndex = oldDraggableIndex;
2986
- },
2987
- onSpill: function onSpill(_ref3) {
2988
- var dragEl = _ref3.dragEl,
2989
- putSortable = _ref3.putSortable;
2990
- this.sortable.captureAnimationState();
2991
-
2992
- if (putSortable) {
2993
- putSortable.captureAnimationState();
2994
- }
2995
-
2996
- var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
2997
-
2998
- if (nextSibling) {
2999
- this.sortable.el.insertBefore(dragEl, nextSibling);
3000
- } else {
3001
- this.sortable.el.appendChild(dragEl);
3002
- }
3003
-
3004
- this.sortable.animateAll();
3005
-
3006
- if (putSortable) {
3007
- putSortable.animateAll();
3008
- }
3009
- },
3010
- drop: drop
3011
- };
3012
-
3013
- _extends(Revert, {
3014
- pluginName: 'revertOnSpill'
3015
- });
3016
-
3017
- function Remove() {}
3018
-
3019
- Remove.prototype = {
3020
- onSpill: function onSpill(_ref4) {
3021
- var dragEl = _ref4.dragEl,
3022
- putSortable = _ref4.putSortable;
3023
- var parentSortable = putSortable || this.sortable;
3024
- parentSortable.captureAnimationState();
3025
- dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
3026
- parentSortable.animateAll();
3027
- },
3028
- drop: drop
3029
- };
3030
-
3031
- _extends(Remove, {
3032
- pluginName: 'removeOnSpill'
3033
- });
3034
-
3035
- Sortable.mount(new AutoScrollPlugin());
3036
- Sortable.mount(Remove, Revert);
3037
-
3038
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
3039
- // require the crypto API and do not support built-in fallback to lower quality random number
3040
- // generators (like Math.random()).
3041
- var getRandomValues;
3042
- var rnds8 = new Uint8Array(16);
3043
- function rng() {
3044
- // lazy load so that environments that need to polyfill have a chance to do so
3045
- if (!getRandomValues) {
3046
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
3047
- // find the complete implementation of crypto (msCrypto) on IE11.
3048
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
3049
-
3050
- if (!getRandomValues) {
3051
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
3052
- }
3053
- }
3054
-
3055
- return getRandomValues(rnds8);
3056
- }
3057
-
3058
- var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
3059
-
3060
- function validate(uuid) {
3061
- return typeof uuid === 'string' && REGEX.test(uuid);
3062
- }
3063
-
3064
- /**
3065
- * Convert array of 16 byte values to UUID string format of the form:
3066
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
3067
- */
3068
-
3069
- var byteToHex = [];
3070
-
3071
- for (var i = 0; i < 256; ++i) {
3072
- byteToHex.push((i + 0x100).toString(16).substr(1));
3073
- }
3074
-
3075
- function stringify(arr) {
3076
- var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
3077
- // Note: Be careful editing this code! It's been tuned for performance
3078
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
3079
- var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
3080
- // of the following:
3081
- // - One or more input array values don't map to a hex octet (leading to
3082
- // "undefined" in the uuid)
3083
- // - Invalid input values for the RFC `version` or `variant` fields
3084
-
3085
- if (!validate(uuid)) {
3086
- throw TypeError('Stringified UUID is invalid');
3087
- }
3088
-
3089
- return uuid;
3090
- }
3091
-
3092
- function v4(options, buf, offset) {
3093
- options = options || {};
3094
- var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
3095
-
3096
- rnds[6] = rnds[6] & 0x0f | 0x40;
3097
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
3098
-
3099
- if (buf) {
3100
- offset = offset || 0;
3101
-
3102
- for (var i = 0; i < 16; ++i) {
3103
- buf[offset + i] = rnds[i];
3104
- }
3105
-
3106
- return buf;
3107
- }
3108
-
3109
- return stringify(rnds);
3110
- }
3111
-
3112
- const ListItem = [
3113
- // Interactivity (draggable)
3114
- 'draggable:interactivity-drag',
3115
- // Shape
3116
- 'rounded-md',
3117
- // Spacing
3118
- 'px-md md:px-sm', 'py-md md:py-sm',
3119
- // Theme (hover)
3120
- 'hover:theme-background-primary-translucent-1', 'dark:hover:theme-background-primary-translucent-1-dark',
3121
- // Theme (focus)
3122
- 'focus-within:theme-outline-primary focus-within:outline-2', 'dark:focus-within:theme-outline-primary-dark',
3123
- // Theme (selected)
3124
- 'selected:theme-background-primary-translucent-3', 'dark:selected:theme-background-primary-translucent-3-dark'];
3125
- const ListItemContent = [
3126
- // Layout
3127
- 'layout-row',
3128
- // Spacing
3129
- 'px-md md:px-sm', 'py-md md:py-sm', 'gap-sm'];
3130
-
3131
- var script$1 = defineComponent({
3132
- name: 'OrListItem',
3133
- props: {
3134
- draggable: {
3135
- type: Boolean,
3136
- default: false
3137
- },
3138
- selected: {
3139
- type: Boolean,
3140
- default: false
3141
- },
3142
- disabled: {
3143
- type: Boolean,
3144
- default: false
3145
- }
3146
- },
3147
- setup() {
3148
- // Refs & Styles
3149
- const root = ref();
3150
- const rootStyles = computed(() => ['or-list-item-v3', ...ListItem]);
3151
- const contentStyles = computed(() => [...ListItemContent]);
3152
- return {
3153
- root,
3154
- rootStyles,
3155
- contentStyles
3156
- };
3157
- }
3158
- });
3159
-
3160
- /* script */
3161
- const __vue_script__$1 = script$1;
3162
-
3163
- /* template */
3164
- var __vue_render__$1 = function () {
3165
- var _vm = this;
3166
- var _h = _vm.$createElement;
3167
- var _c = _vm._self._c || _h;
3168
- return _c('div', {
3169
- ref: 'root',
3170
- class: _vm.rootStyles,
3171
- attrs: {
3172
- "selected": _vm.selected,
3173
- "disabled": _vm.disabled,
3174
- "draggable": _vm.draggable
3175
- }
3176
- }, [_c('div', {
3177
- class: _vm.contentStyles,
3178
- attrs: {
3179
- "disabled": _vm.disabled
3180
- }
3181
- }, [_vm._t("default")], 2)]);
3182
- };
3183
- var __vue_staticRenderFns__$1 = [];
3184
-
3185
- /* style */
3186
- const __vue_inject_styles__$1 = undefined;
3187
- /* scoped */
3188
- const __vue_scope_id__$1 = undefined;
3189
- /* module identifier */
3190
- const __vue_module_identifier__$1 = undefined;
3191
- /* functional template */
3192
- const __vue_is_functional_template__$1 = false;
3193
- /* style inject */
3194
-
3195
- /* style inject SSR */
3196
-
3197
- /* style inject shadow dom */
3198
-
3199
- const __vue_component__$2 = /*#__PURE__*/normalizeComponent({
3200
- render: __vue_render__$1,
3201
- staticRenderFns: __vue_staticRenderFns__$1
3202
- }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
3203
- var OrListItem = __vue_component__$2;
3204
-
3205
- const List = [
3206
- // Layout
3207
- 'layout-column',
3208
- // Spacing
3209
- 'gap-md'];
3210
- const ListHeader = [];
3211
- const ListContent = [];
3212
- const ListFooter = [];
3213
-
3214
- var script = defineComponent({
3215
- name: 'OrList',
3216
- components: {
3217
- OrButton,
3218
- OrIcon,
3219
- OrIconButton,
3220
- OrLabel,
3221
- OrListItem
3222
- },
3223
- model: {
3224
- prop: 'modelValue',
3225
- event: 'update:modelValue'
3226
- },
3227
- props: {
3228
- modelValue: {
3229
- type: Array,
3230
- default: () => []
3231
- },
3232
- selection: {
3233
- type: Array,
3234
- default: () => []
3235
- },
3236
- itemFactory: {
3237
- type: Function,
3238
- default: () => ({})
3239
- },
3240
- label: {
3241
- type: String,
3242
- default: undefined
3243
- },
3244
- addButtonLabel: {
3245
- type: String,
3246
- default: 'Add Item'
3247
- },
3248
- canAdd: {
3249
- type: Boolean,
3250
- default: true
3251
- },
3252
- canDelete: {
3253
- type: Boolean,
3254
- default: true
3255
- },
3256
- canReorder: {
3257
- type: Boolean,
3258
- default: true
3259
- },
3260
- disabled: {
3261
- type: Boolean,
3262
- default: false
3263
- }
3264
- },
3265
- emits: ['update:modelValue', 'before:add', 'before:delete', 'before:reorder', 'add', 'delete', 'reorder'],
3266
- expose: ['root'],
3267
- setup(props, context) {
3268
- // Refs & Styles
3269
- const root = ref();
3270
- const rootStyles = computed(() => ['or-list-v3', ...List]);
3271
- const headerStyles = computed(() => [...ListHeader]);
3272
- const content = ref();
3273
- const contentStyles = computed(() => [...ListContent]);
3274
- const footerStyles = computed(() => [...ListFooter]);
3275
- // State
3276
- const model = re(toRef(props, 'modelValue'), context.emit);
3277
- // Effects
3278
- // #region Sortable
3279
- let sortable;
3280
- watch([content, () => props.canReorder], ([content, canReorder]) => {
3281
- sortable === null || sortable === void 0 ? void 0 : sortable.destroy();
3282
- sortable = undefined;
3283
- if (content && canReorder) {
3284
- sortable = Sortable.create(content, {
3285
- disabled: props.disabled,
3286
- onUpdate: event => {
3287
- context.emit('before:reorder', model.value);
3288
- const nextModelValue = [...model.value];
3289
- const reorderedItem = nextModelValue.splice(event.oldIndex, 1)[0];
3290
- nextModelValue.splice(event.newIndex, 0, reorderedItem);
3291
- context.emit('reorder', reorderedItem, event.newIndex, event.oldIndex, model.value = nextModelValue);
3292
- }
3293
- });
3294
- }
3295
- });
3296
- watch(() => props.disabled, value => {
3297
- sortable === null || sortable === void 0 ? void 0 : sortable.option('disabled', value);
3298
- });
3299
- // #endregion
3300
- // Methods
3301
- function addItem() {
3302
- context.emit('before:add', model.value);
3303
- const addedItem = props.itemFactory();
3304
- const nextModelValue = [...model.value, addedItem];
3305
- context.emit('add', addedItem, nextModelValue.indexOf(addedItem), model.value = nextModelValue);
3306
- }
3307
- function deleteItem(index) {
3308
- context.emit('before:delete', model.value);
3309
- const deletedItem = model.value[index];
3310
- const nextModelValue = model.value.filter(item => item !== deletedItem);
3311
- context.emit('delete', deletedItem, index, model.value = nextModelValue);
3312
- }
3313
- return {
3314
- root,
3315
- rootStyles,
3316
- headerStyles,
3317
- content,
3318
- contentStyles,
3319
- footerStyles,
3320
- model,
3321
- addItem,
3322
- deleteItem,
3323
- uuid: v4
3324
- };
3325
- }
3326
- });
3327
-
3328
- /* script */
3329
- const __vue_script__ = script;
3330
-
3331
- /* template */
3332
- var __vue_render__ = function () {
3333
- var _vm = this;
3334
- var _h = _vm.$createElement;
3335
- var _c = _vm._self._c || _h;
3336
- return _c('div', {
3337
- ref: 'root',
3338
- class: _vm.rootStyles,
3339
- attrs: {
3340
- "disabled": _vm.disabled
3341
- }
3342
- }, [_vm.$slots['header'] || _vm.$slots['label'] || _vm.$slots['label-addon'] || _vm.label ? [_c('div', {
3343
- class: _vm.headerStyles
3344
- }, [_vm._t("header", function () {
3345
- return [_c('OrLabel', {
3346
- attrs: {
3347
- "disabled": _vm.disabled
3348
- },
3349
- scopedSlots: _vm._u([{
3350
- key: "addon",
3351
- fn: function () {
3352
- return [_vm._t("label-addon")];
3353
- },
3354
- proxy: true
3355
- }], null, true)
3356
- }, [_vm._t("label", function () {
3357
- return [_vm._v("\n " + _vm._s(_vm.label) + "\n ")];
3358
- })], 2)];
3359
- }, {
3360
- "addItem": _vm.addItem,
3361
- "deleteItem": _vm.deleteItem
3362
- })], 2)] : _vm._e(), _vm._v(" "), _c('div', {
3363
- ref: 'content',
3364
- class: _vm.contentStyles
3365
- }, _vm._l(_vm.model, function (item, index) {
3366
- return _c('OrListItem', {
3367
- key: item.key || _vm.uuid(),
3368
- attrs: {
3369
- "draggable": _vm.canReorder,
3370
- "selected": _vm.selection.includes(item),
3371
- "disabled": _vm.disabled
3372
- }
3373
- }, [_c('div', {
3374
- class: ['grow']
3375
- }, [_vm._t("default", function () {
3376
- return [_vm._v("\n " + _vm._s(item) + "\n ")];
3377
- }, null, {
3378
- item: item,
3379
- index: index,
3380
- items: _vm.model,
3381
- addItem: _vm.addItem,
3382
- deleteItem: _vm.deleteItem
3383
- })], 2), _vm._v(" "), _vm.canDelete ? [_c('OrIconButton', {
3384
- attrs: {
3385
- "icon": 'delete',
3386
- "disabled": _vm.disabled
3387
- },
3388
- on: {
3389
- "click": function ($event) {
3390
- return _vm.deleteItem(index);
3391
- }
3392
- }
3393
- })] : _vm._e()], 2);
3394
- }), 1), _vm._v(" "), _vm.$slots['footer'] || _vm.canAdd ? [_c('div', {
3395
- class: _vm.footerStyles
3396
- }, [_vm._t("footer", function () {
3397
- return [_vm.canAdd ? [_c('OrButton', {
3398
- attrs: {
3399
- "variant": 'link',
3400
- "disabled": _vm.disabled
3401
- },
3402
- on: {
3403
- "click": function ($event) {
3404
- return _vm.addItem();
3405
- }
3406
- }
3407
- }, [_vm._t("add-button", function () {
3408
- return [_c('OrIcon', {
3409
- attrs: {
3410
- "icon": 'add'
3411
- }
3412
- }), _vm._v(" " + _vm._s(_vm.addButtonLabel) + "\n ")];
3413
- })], 2)] : _vm._e()];
3414
- }, {
3415
- "addItem": _vm.addItem,
3416
- "deleteItem": _vm.deleteItem
3417
- })], 2)] : _vm._e()], 2);
3418
- };
3419
- var __vue_staticRenderFns__ = [];
3420
-
3421
- /* style */
3422
- const __vue_inject_styles__ = undefined;
3423
- /* scoped */
3424
- const __vue_scope_id__ = undefined;
3425
- /* module identifier */
3426
- const __vue_module_identifier__ = undefined;
3427
- /* functional template */
3428
- const __vue_is_functional_template__ = false;
3429
- /* style inject */
3430
-
3431
- /* style inject SSR */
3432
-
3433
- /* style inject shadow dom */
3434
-
3435
- const __vue_component__ = /*#__PURE__*/normalizeComponent({
3436
- render: __vue_render__,
3437
- staticRenderFns: __vue_staticRenderFns__
3438
- }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
3439
- var __vue_component__$1 = __vue_component__;
3440
-
3441
- export { OrListItem, __vue_component__$1 as OrListV3 };