@pine-ds/core 4.0.0-mercury.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/attributes.js +1 -0
- package/components/closest.js +1 -11
- package/components/floating-ui.dom.js +1 -0
- package/components/form.js +1 -0
- package/components/i18n-format.js +1 -0
- package/components/index.d.ts +41 -0
- package/components/index.js +1 -33
- package/components/index2.js +1 -14
- package/components/mock-pds-modal.d.ts +11 -0
- package/components/mock-pds-modal.js +1 -0
- package/components/pds-accordion.js +1 -68
- package/components/pds-alert.d.ts +11 -0
- package/components/pds-alert.js +1 -0
- package/components/pds-avatar.js +1 -103
- package/components/pds-box.js +1 -124
- package/components/pds-box2.js +1 -0
- package/components/pds-button.js +1 -8
- package/components/pds-button2.js +1 -84
- package/components/pds-checkbox.js +1 -8
- package/components/pds-checkbox2.js +1 -101
- package/components/pds-chip.js +1 -78
- package/components/pds-chip2.js +1 -0
- package/components/pds-combobox.d.ts +11 -0
- package/components/pds-combobox.js +2 -0
- package/components/pds-container.d.ts +11 -0
- package/components/pds-container.js +1 -0
- package/components/pds-copytext.js +1 -88
- package/components/pds-divider.js +1 -54
- package/components/pds-dropdown-menu-item.d.ts +11 -0
- package/components/pds-dropdown-menu-item.js +1 -0
- package/components/pds-dropdown-menu-separator.d.ts +11 -0
- package/components/pds-dropdown-menu-separator.js +1 -0
- package/components/pds-dropdown-menu.d.ts +11 -0
- package/components/pds-dropdown-menu.js +1 -0
- package/components/pds-filter.d.ts +11 -0
- package/components/pds-filter.js +1 -0
- package/components/pds-filters.d.ts +11 -0
- package/components/pds-filters.js +1 -0
- package/components/pds-icon.js +1 -8
- package/components/pds-icon2.js +1 -370
- package/components/pds-image.js +1 -55
- package/components/pds-input.js +1 -72
- package/components/pds-link.js +1 -65
- package/components/pds-link2.js +1 -0
- package/components/pds-loader.js +1 -68
- package/components/pds-loader2.js +1 -0
- package/components/pds-modal-content.d.ts +11 -0
- package/components/pds-modal-content.js +1 -0
- package/components/pds-modal-footer.d.ts +11 -0
- package/components/pds-modal-footer.js +1 -0
- package/components/pds-modal-header.d.ts +11 -0
- package/components/pds-modal-header.js +1 -0
- package/components/pds-modal.d.ts +11 -0
- package/components/pds-modal.js +1 -0
- package/components/pds-multiselect.d.ts +11 -0
- package/components/pds-multiselect.js +1 -0
- package/components/pds-popover.d.ts +11 -0
- package/components/pds-popover.js +1 -0
- package/components/pds-progress.js +1 -49
- package/components/pds-property.d.ts +11 -0
- package/components/pds-property.js +1 -0
- package/components/pds-radio-group.d.ts +11 -0
- package/components/pds-radio-group.js +1 -0
- package/components/pds-radio.js +1 -78
- package/components/pds-row.js +1 -72
- package/components/pds-select.d.ts +11 -0
- package/components/pds-select.js +1 -0
- package/components/pds-sortable-item.js +1 -58
- package/components/pds-sortable.js +3 -2718
- package/components/pds-switch.js +1 -82
- package/components/pds-tab.js +1 -53
- package/components/pds-table-body.js +1 -36
- package/components/pds-table-cell.js +1 -8
- package/components/pds-table-cell2.js +1 -72
- package/components/pds-table-head-cell.js +1 -8
- package/components/pds-table-head-cell2.js +1 -98
- package/components/pds-table-head.js +1 -90
- package/components/pds-table-row.js +1 -95
- package/components/pds-table.js +1 -124
- package/components/pds-tabpanel.js +1 -45
- package/components/pds-tabs.js +1 -119
- package/components/pds-text.d.ts +11 -0
- package/components/pds-text.js +1 -0
- package/components/pds-text2.js +1 -0
- package/components/pds-textarea.js +1 -82
- package/components/pds-toast.d.ts +11 -0
- package/components/pds-toast.js +1 -0
- package/components/pds-tooltip.js +1 -178
- package/components/reconnected-content.js +1 -0
- package/components/scroll.js +1 -0
- package/components/truncation-tooltip.js +1 -0
- package/components/utils.js +1 -0
- package/dist/cjs/attributes-oNMnBEnP.js +85 -0
- package/dist/cjs/closest-BZXvuB_Y.js +11 -0
- package/dist/cjs/floating-ui.dom-BZk7Blsu.js +1635 -0
- package/dist/cjs/form-MhwfKTuo.js +69 -0
- package/dist/cjs/i18n-format-CrpIhahc.js +64 -0
- package/dist/cjs/index-BMV0nzMk.js +31 -0
- package/dist/cjs/index-CuQil7H0.js +2926 -0
- package/dist/cjs/index.cjs.js +0 -4
- package/dist/cjs/loader.cjs.js +3 -8
- package/dist/cjs/mock-pds-modal.cjs.entry.js +91 -0
- package/dist/cjs/pds-accordion.cjs.entry.js +15 -14
- package/dist/cjs/pds-alert.cjs.entry.js +74 -0
- package/dist/cjs/pds-avatar.cjs.entry.js +92 -25
- package/dist/cjs/pds-box.cjs.entry.js +111 -38
- package/dist/cjs/pds-button.cjs.entry.js +169 -25
- package/dist/cjs/pds-checkbox.cjs.entry.js +66 -26
- package/dist/cjs/pds-chip.cjs.entry.js +157 -23
- package/dist/cjs/pds-combobox.cjs.entry.js +2905 -0
- package/dist/cjs/pds-container.cjs.entry.js +36 -0
- package/dist/cjs/pds-copytext.cjs.entry.js +72 -17
- package/dist/cjs/pds-divider.cjs.entry.js +15 -11
- package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +85 -0
- package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +22 -0
- package/dist/cjs/pds-dropdown-menu.cjs.entry.js +318 -0
- package/dist/cjs/pds-filter.cjs.entry.js +489 -0
- package/dist/cjs/pds-filters.cjs.entry.js +17 -0
- package/dist/cjs/pds-icon.cjs.entry.js +273 -40
- package/dist/cjs/pds-image.cjs.entry.js +15 -16
- package/dist/cjs/pds-input.cjs.entry.js +296 -26
- package/dist/cjs/pds-link.cjs.entry.js +41 -13
- package/dist/cjs/pds-loader.cjs.entry.js +21 -14
- package/dist/cjs/pds-modal-content.cjs.entry.js +196 -0
- package/dist/cjs/pds-modal-footer.cjs.entry.js +23 -0
- package/dist/cjs/pds-modal-header.cjs.entry.js +23 -0
- package/dist/cjs/pds-modal.cjs.entry.js +297 -0
- package/dist/cjs/pds-multiselect.cjs.entry.js +1068 -0
- package/dist/cjs/pds-popover.cjs.entry.js +571 -0
- package/dist/cjs/pds-progress.cjs.entry.js +16 -12
- package/dist/cjs/pds-property.cjs.entry.js +21 -0
- package/dist/cjs/pds-radio-group.cjs.entry.js +193 -0
- package/dist/cjs/pds-radio.cjs.entry.js +79 -23
- package/dist/cjs/pds-row.cjs.entry.js +35 -17
- package/dist/cjs/pds-select.cjs.entry.js +256 -0
- package/dist/cjs/pds-sortable-item.cjs.entry.js +26 -11
- package/dist/cjs/pds-sortable.cjs.entry.js +139 -117
- package/dist/cjs/pds-switch.cjs.entry.js +78 -26
- package/dist/cjs/pds-tab.cjs.entry.js +66 -16
- package/dist/cjs/pds-table-body.cjs.entry.js +4 -9
- package/dist/cjs/pds-table-cell.cjs.entry.js +107 -17
- package/dist/cjs/pds-table-head-cell.cjs.entry.js +169 -26
- package/dist/cjs/pds-table-head.cjs.entry.js +16 -13
- package/dist/cjs/pds-table-row.cjs.entry.js +103 -16
- package/dist/cjs/pds-table.cjs.entry.js +178 -22
- package/dist/cjs/pds-tabpanel.cjs.entry.js +19 -13
- package/dist/cjs/pds-tabs.cjs.entry.js +88 -17
- package/dist/cjs/pds-text.cjs.entry.js +122 -0
- package/dist/cjs/pds-textarea.cjs.entry.js +311 -29
- package/dist/cjs/pds-toast.cjs.entry.js +145 -0
- package/dist/cjs/pds-tooltip.cjs.entry.js +318 -109
- package/dist/cjs/pine-core.cjs.js +7 -10
- package/dist/cjs/reconnected-content-CpnEQcTp.js +29 -0
- package/dist/cjs/scroll-2XcoE_6Q.js +79 -0
- package/dist/cjs/truncation-tooltip-CVzAha5B.js +246 -0
- package/dist/cjs/utils-7jx8T2mW.js +76 -0
- package/dist/collection/collection-manifest.json +23 -2
- package/dist/collection/components/_internal/pds-label/pds-label.js +0 -1
- package/dist/collection/components/pds-accordion/pds-accordion.css +24 -29
- package/dist/collection/components/pds-accordion/pds-accordion.js +35 -8
- package/dist/collection/components/pds-accordion/stories/pds-accordion.stories.js +12 -18
- package/dist/collection/components/pds-alert/pds-alert.css +131 -0
- package/dist/collection/components/pds-alert/pds-alert.js +255 -0
- package/dist/collection/components/pds-alert/pds-alert.tokens.css +85 -0
- package/dist/collection/components/pds-alert/stories/pds-alert.stories.js +110 -0
- package/dist/collection/components/pds-avatar/pds-avatar.css +56 -23
- package/dist/collection/components/pds-avatar/pds-avatar.js +226 -24
- package/dist/collection/components/pds-avatar/stories/pds-avatar.stories.js +38 -2
- package/dist/collection/components/pds-box/pds-box.css +5435 -263
- package/dist/collection/components/pds-box/pds-box.js +2796 -231
- package/dist/collection/components/pds-box/stories/pds-box.stories.js +20 -6
- package/dist/collection/components/pds-button/pds-button.css +256 -93
- package/dist/collection/components/pds-button/pds-button.js +404 -39
- package/dist/collection/components/pds-button/stories/pds-button.stories.js +228 -16
- package/dist/collection/components/pds-checkbox/checkbox-interface.js +0 -1
- package/dist/collection/components/pds-checkbox/pds-checkbox.css +68 -58
- package/dist/collection/components/pds-checkbox/pds-checkbox.js +112 -46
- package/dist/collection/components/pds-checkbox/stories/pds-checkbox.stories.js +8 -16
- package/dist/collection/components/pds-chip/pds-chip.css +185 -114
- package/dist/collection/components/pds-chip/pds-chip.js +330 -60
- package/dist/collection/components/pds-chip/pds-chip.tokens.css +53 -0
- package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +109 -24
- package/dist/collection/components/pds-combobox/combobox-interface.js +1 -0
- package/dist/collection/components/pds-combobox/pds-combobox.css +499 -0
- package/dist/collection/components/pds-combobox/pds-combobox.js +2347 -0
- package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +485 -0
- package/dist/collection/components/pds-container/pds-container.css +26 -0
- package/dist/collection/components/pds-container/pds-container.js +111 -0
- package/dist/collection/components/pds-container/stories/pds-container.stories.js +89 -0
- package/dist/collection/components/pds-copytext/pds-copytext.css +39 -51
- package/dist/collection/components/pds-copytext/pds-copytext.js +90 -21
- package/dist/collection/components/pds-copytext/stories/pds-copytext.stories.js +6 -12
- package/dist/collection/components/pds-divider/pds-divider.css +71 -40
- package/dist/collection/components/pds-divider/pds-divider.js +46 -10
- package/dist/collection/components/pds-divider/stories/pds-divider.stories.js +7 -2
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.css +76 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +291 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.css +7 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +71 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.css +52 -0
- package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +394 -0
- package/dist/collection/components/pds-dropdown-menu/stories/pds-dropdown-menu.stories.js +38 -0
- package/dist/collection/components/pds-filters/pds-filter/filter-interface.js +1 -0
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.css +199 -0
- package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +739 -0
- package/dist/collection/components/pds-filters/pds-filter/stories/pds-filter.stories.js +87 -0
- package/dist/collection/components/pds-filters/pds-filters.css +10 -0
- package/dist/collection/components/pds-filters/pds-filters.js +44 -0
- package/dist/collection/components/pds-filters/stories/pds-filters.stories.js +34 -0
- package/dist/collection/components/pds-icon/stories/pds-icon.stories.js +2 -2
- package/dist/collection/components/pds-image/pds-image.css +3 -2
- package/dist/collection/components/pds-image/pds-image.js +54 -29
- package/dist/collection/components/pds-image/stories/pds-image.stories.js +8 -8
- package/dist/collection/components/pds-input/input-interface.js +1 -0
- package/dist/collection/components/pds-input/pds-input.css +275 -63
- package/dist/collection/components/pds-input/pds-input.js +678 -56
- package/dist/collection/components/pds-input/pds-input.tokens.css +3 -0
- package/dist/collection/components/pds-input/stories/pds-input.stories.js +309 -14
- package/dist/collection/components/pds-link/pds-link.css +45 -30
- package/dist/collection/components/pds-link/pds-link.js +305 -19
- package/dist/collection/components/pds-link/stories/pds-link.stories.js +29 -4
- package/dist/collection/components/pds-loader/pds-loader.css +17 -30
- package/dist/collection/components/pds-loader/pds-loader.js +31 -11
- package/dist/collection/components/pds-loader/stories/pds-loader.stories.js +3 -5
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.css +25 -0
- package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +230 -0
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.css +8 -0
- package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +23 -0
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.css +8 -0
- package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +23 -0
- package/dist/collection/components/pds-modal/pds-modal.css +122 -0
- package/dist/collection/components/pds-modal/pds-modal.js +516 -0
- package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +731 -0
- package/dist/collection/components/pds-modal/test/mock-pds-modal.js +286 -0
- package/dist/collection/components/pds-multiselect/multiselect-interface.js +1 -0
- package/dist/collection/components/pds-multiselect/pds-multiselect.css +324 -0
- package/dist/collection/components/pds-multiselect/pds-multiselect.js +2153 -0
- package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +731 -0
- package/dist/collection/components/pds-popover/pds-popover.css +10 -0
- package/dist/collection/components/pds-popover/pds-popover.js +802 -0
- package/dist/collection/components/pds-popover/popover-interface.js +1 -0
- package/dist/collection/components/pds-popover/stories/pds-popover.stories.js +86 -0
- package/dist/collection/components/pds-progress/pds-progress.css +11 -24
- package/dist/collection/components/pds-progress/pds-progress.js +34 -14
- package/dist/collection/components/pds-progress/stories/pds-progress.stories.js +2 -4
- package/dist/collection/components/pds-property/pds-property.css +4 -0
- package/dist/collection/components/pds-property/pds-property.js +70 -0
- package/dist/collection/components/pds-property/stories/pds-property.stories.js +16 -0
- package/dist/collection/components/pds-radio/pds-radio.css +219 -54
- package/dist/collection/components/pds-radio/pds-radio.js +179 -51
- package/dist/collection/components/pds-radio/stories/pds-radio.stories.js +47 -15
- package/dist/collection/components/pds-radio-group/pds-radio-group.css +45 -0
- package/dist/collection/components/pds-radio-group/pds-radio-group.js +447 -0
- package/dist/collection/components/pds-radio-group/radio-group-interface.js +1 -0
- package/dist/collection/components/pds-radio-group/stories/pds-radio-group.stories.js +134 -0
- package/dist/collection/components/pds-row/pds-row.css +10 -9
- package/dist/collection/components/pds-row/pds-row.js +115 -26
- package/dist/collection/components/pds-row/stories/pds-row.stories.js +16 -14
- package/dist/collection/components/pds-select/pds-select.css +168 -0
- package/dist/collection/components/pds-select/pds-select.js +602 -0
- package/dist/collection/components/pds-select/pds-select.tokens.css +3 -0
- package/dist/collection/components/pds-select/stories/pds-select.stories.js +205 -0
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.css +26 -26
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +32 -7
- package/dist/collection/components/pds-sortable/pds-sortable-item/stories/pds-sortable-item.stories.js +0 -2
- package/dist/collection/components/pds-sortable/pds-sortable.css +2 -4
- package/dist/collection/components/pds-sortable/pds-sortable.js +77 -12
- package/dist/collection/components/pds-sortable/sortable-interface.js +0 -1
- package/dist/collection/components/pds-sortable/stories/pds-sortable.stories.js +22 -13
- package/dist/collection/components/pds-switch/pds-switch.css +56 -58
- package/dist/collection/components/pds-switch/pds-switch.js +142 -70
- package/dist/collection/components/pds-switch/stories/pds-switch.stories.js +11 -28
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -2
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.css +36 -19
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +128 -13
- package/dist/collection/components/pds-table/pds-table-cell/stories/pds-table-cell.stories.js +22 -7
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.css +22 -5
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +71 -11
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.css +46 -25
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +236 -20
- package/dist/collection/components/pds-table/pds-table-head-cell/stories/pds-table-head-cell.stories.js +12 -7
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.css +14 -5
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +114 -13
- package/dist/collection/components/pds-table/pds-table-row/stories/pds-table-row.stories.js +3 -9
- package/dist/collection/components/pds-table/pds-table.css +98 -17
- package/dist/collection/components/pds-table/pds-table.js +285 -41
- package/dist/collection/components/pds-table/stories/pds-table.stories.js +297 -27
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.css +102 -60
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js +226 -18
- package/dist/collection/components/pds-tabs/pds-tab/stories/pds-tab.stories.js +15 -0
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.css +15 -2
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +53 -12
- package/dist/collection/components/pds-tabs/pds-tabpanel/stories/pds-tabpanel.stories.js +15 -0
- package/dist/collection/components/pds-tabs/pds-tabs.css +31 -11
- package/dist/collection/components/pds-tabs/pds-tabs.js +180 -25
- package/dist/collection/components/pds-tabs/stories/pds-tabs.stories.js +69 -26
- package/dist/collection/components/pds-text/pds-text.css +207 -0
- package/dist/collection/components/pds-text/pds-text.js +293 -0
- package/dist/collection/components/pds-text/stories/pds-text.stories.js +125 -0
- package/dist/collection/components/pds-textarea/pds-textarea.css +127 -57
- package/dist/collection/components/pds-textarea/pds-textarea.js +591 -57
- package/dist/collection/components/pds-textarea/stories/pds-textarea.stories.js +112 -25
- package/dist/collection/components/pds-textarea/textarea-interface.js +0 -1
- package/dist/collection/components/pds-toast/pds-toast.css +153 -0
- package/dist/collection/components/pds-toast/pds-toast.js +330 -0
- package/dist/collection/components/pds-toast/stories/pds-toast.stories.js +95 -0
- package/dist/collection/components/pds-tooltip/pds-tooltip.css +63 -81
- package/dist/collection/components/pds-tooltip/pds-tooltip.js +366 -78
- package/dist/collection/components/pds-tooltip/stories/pds-tooltip.stories.js +22 -24
- package/dist/collection/global/pine-ui-global.js +0 -1
- package/dist/collection/global/styles/utils/label.css +17 -0
- package/dist/collection/i18n/i18n-format.js +59 -0
- package/dist/collection/i18n/index.js +1 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/utils/attributes.js +83 -0
- package/dist/collection/utils/closest.js +0 -1
- package/dist/collection/utils/form.js +41 -8
- package/dist/collection/utils/interfaces.js +1 -0
- package/dist/collection/utils/overlay.js +66 -50
- package/dist/collection/utils/reconnected-content.js +25 -0
- package/dist/collection/utils/scroll.js +77 -0
- package/dist/collection/utils/test/axe.js +106 -0
- package/dist/collection/utils/test/reconnect-safety.js +31 -0
- package/dist/collection/utils/truncation-tooltip.js +241 -0
- package/dist/collection/utils/types.js +18 -2
- package/dist/collection/utils/utils.js +66 -4
- package/dist/docs.d.ts +45 -0
- package/dist/docs.json +22531 -3270
- package/dist/esm/attributes-C0M1gTKv.js +82 -0
- package/dist/esm/closest-DnUJodVd.js +9 -0
- package/dist/esm/floating-ui.dom-DDtwbwIl.js +1628 -0
- package/dist/esm/form-BuRbS7Hp.js +63 -0
- package/dist/esm/i18n-format-BKsJZTyn.js +61 -0
- package/dist/esm/index-Bu9gFIxM.js +17 -0
- package/dist/esm/index-CTLu1TM4.js +2915 -0
- package/dist/esm/index.js +0 -2
- package/dist/esm/loader.js +3 -6
- package/dist/esm/mock-pds-modal.entry.js +89 -0
- package/dist/esm/pds-accordion.entry.js +15 -12
- package/dist/esm/pds-alert.entry.js +72 -0
- package/dist/esm/pds-avatar.entry.js +92 -23
- package/dist/esm/pds-box.entry.js +111 -36
- package/dist/esm/pds-button.entry.js +168 -22
- package/dist/esm/pds-checkbox.entry.js +67 -25
- package/dist/esm/pds-chip.entry.js +158 -22
- package/dist/esm/pds-combobox.entry.js +2903 -0
- package/dist/esm/pds-container.entry.js +34 -0
- package/dist/esm/pds-copytext.entry.js +72 -15
- package/dist/esm/pds-divider.entry.js +15 -9
- package/dist/esm/pds-dropdown-menu-item.entry.js +83 -0
- package/dist/esm/pds-dropdown-menu-separator.entry.js +20 -0
- package/dist/esm/pds-dropdown-menu.entry.js +316 -0
- package/dist/esm/pds-filter.entry.js +487 -0
- package/dist/esm/pds-filters.entry.js +15 -0
- package/dist/esm/pds-icon.entry.js +273 -38
- package/dist/esm/pds-image.entry.js +15 -14
- package/dist/esm/pds-input.entry.js +297 -25
- package/dist/esm/pds-link.entry.js +41 -11
- package/dist/esm/pds-loader.entry.js +21 -12
- package/dist/esm/pds-modal-content.entry.js +194 -0
- package/dist/esm/pds-modal-footer.entry.js +21 -0
- package/dist/esm/pds-modal-header.entry.js +21 -0
- package/dist/esm/pds-modal.entry.js +295 -0
- package/dist/esm/pds-multiselect.entry.js +1066 -0
- package/dist/esm/pds-popover.entry.js +569 -0
- package/dist/esm/pds-progress.entry.js +16 -10
- package/dist/esm/pds-property.entry.js +19 -0
- package/dist/esm/pds-radio-group.entry.js +191 -0
- package/dist/esm/pds-radio.entry.js +80 -22
- package/dist/esm/pds-row.entry.js +35 -15
- package/dist/esm/pds-select.entry.js +254 -0
- package/dist/esm/pds-sortable-item.entry.js +26 -9
- package/dist/esm/pds-sortable.entry.js +139 -115
- package/dist/esm/pds-switch.entry.js +79 -25
- package/dist/esm/pds-tab.entry.js +66 -14
- package/dist/esm/pds-table-body.entry.js +4 -7
- package/dist/esm/pds-table-cell.entry.js +107 -15
- package/dist/esm/pds-table-head-cell.entry.js +169 -24
- package/dist/esm/pds-table-head.entry.js +16 -11
- package/dist/esm/pds-table-row.entry.js +103 -14
- package/dist/esm/pds-table.entry.js +178 -20
- package/dist/esm/pds-tabpanel.entry.js +19 -11
- package/dist/esm/pds-tabs.entry.js +88 -15
- package/dist/esm/pds-text.entry.js +120 -0
- package/dist/esm/pds-textarea.entry.js +312 -28
- package/dist/esm/pds-toast.entry.js +143 -0
- package/dist/esm/pds-tooltip.entry.js +318 -107
- package/dist/esm/pine-core.js +5 -7
- package/dist/esm/reconnected-content-RFpTWV6r.js +27 -0
- package/dist/esm/scroll-DtgUQhjl.js +75 -0
- package/dist/esm/truncation-tooltip-Blk4GigP.js +244 -0
- package/dist/esm/utils-tJa4KYNO.js +71 -0
- package/dist/esm-es5/attributes-C0M1gTKv.js +1 -0
- package/dist/esm-es5/closest-DnUJodVd.js +1 -0
- package/dist/esm-es5/floating-ui.dom-DDtwbwIl.js +1 -0
- package/dist/esm-es5/form-BuRbS7Hp.js +1 -0
- package/dist/esm-es5/i18n-format-BKsJZTyn.js +1 -0
- package/dist/esm-es5/index-Bu9gFIxM.js +1 -0
- package/dist/esm-es5/index-CTLu1TM4.js +2 -0
- package/dist/esm-es5/index.js +0 -2
- package/dist/esm-es5/loader.js +1 -2
- package/dist/esm-es5/mock-pds-modal.entry.js +1 -0
- package/dist/esm-es5/pds-accordion.entry.js +1 -2
- package/dist/esm-es5/pds-alert.entry.js +1 -0
- package/dist/esm-es5/pds-avatar.entry.js +1 -2
- package/dist/esm-es5/pds-box.entry.js +1 -2
- package/dist/esm-es5/pds-button.entry.js +1 -2
- package/dist/esm-es5/pds-checkbox.entry.js +1 -2
- package/dist/esm-es5/pds-chip.entry.js +1 -2
- package/dist/esm-es5/pds-combobox.entry.js +2 -0
- package/dist/esm-es5/pds-container.entry.js +1 -0
- package/dist/esm-es5/pds-copytext.entry.js +1 -2
- package/dist/esm-es5/pds-divider.entry.js +1 -2
- package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -0
- package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -0
- package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -0
- package/dist/esm-es5/pds-filter.entry.js +1 -0
- package/dist/esm-es5/pds-filters.entry.js +1 -0
- package/dist/esm-es5/pds-icon.entry.js +1 -2
- package/dist/esm-es5/pds-image.entry.js +1 -2
- package/dist/esm-es5/pds-input.entry.js +1 -2
- package/dist/esm-es5/pds-link.entry.js +1 -2
- package/dist/esm-es5/pds-loader.entry.js +1 -2
- package/dist/esm-es5/pds-modal-content.entry.js +1 -0
- package/dist/esm-es5/pds-modal-footer.entry.js +1 -0
- package/dist/esm-es5/pds-modal-header.entry.js +1 -0
- package/dist/esm-es5/pds-modal.entry.js +1 -0
- package/dist/esm-es5/pds-multiselect.entry.js +1 -0
- package/dist/esm-es5/pds-popover.entry.js +1 -0
- package/dist/esm-es5/pds-progress.entry.js +1 -2
- package/dist/esm-es5/pds-property.entry.js +1 -0
- package/dist/esm-es5/pds-radio-group.entry.js +1 -0
- package/dist/esm-es5/pds-radio.entry.js +1 -2
- package/dist/esm-es5/pds-row.entry.js +1 -2
- package/dist/esm-es5/pds-select.entry.js +1 -0
- package/dist/esm-es5/pds-sortable-item.entry.js +1 -2
- package/dist/esm-es5/pds-sortable.entry.js +3 -4
- package/dist/esm-es5/pds-switch.entry.js +1 -2
- package/dist/esm-es5/pds-tab.entry.js +1 -2
- package/dist/esm-es5/pds-table-body.entry.js +1 -2
- package/dist/esm-es5/pds-table-cell.entry.js +1 -2
- package/dist/esm-es5/pds-table-head-cell.entry.js +1 -2
- package/dist/esm-es5/pds-table-head.entry.js +1 -2
- package/dist/esm-es5/pds-table-row.entry.js +1 -2
- package/dist/esm-es5/pds-table.entry.js +1 -2
- package/dist/esm-es5/pds-tabpanel.entry.js +1 -2
- package/dist/esm-es5/pds-tabs.entry.js +1 -2
- package/dist/esm-es5/pds-text.entry.js +1 -0
- package/dist/esm-es5/pds-textarea.entry.js +1 -2
- package/dist/esm-es5/pds-toast.entry.js +1 -0
- package/dist/esm-es5/pds-tooltip.entry.js +1 -2
- package/dist/esm-es5/pine-core.js +1 -2
- package/dist/esm-es5/reconnected-content-RFpTWV6r.js +1 -0
- package/dist/esm-es5/scroll-DtgUQhjl.js +1 -0
- package/dist/esm-es5/truncation-tooltip-Blk4GigP.js +1 -0
- package/dist/esm-es5/utils-tJa4KYNO.js +1 -0
- package/dist/pine-core/index.esm.js +0 -2
- package/dist/pine-core/p-04a30a2d.system.entry.js +1 -0
- package/dist/pine-core/p-056667f0.entry.js +1 -0
- package/dist/pine-core/p-08151143.system.entry.js +1 -0
- package/dist/pine-core/p-0d73d473.entry.js +1 -0
- package/dist/pine-core/p-0e89a189.entry.js +1 -0
- package/dist/pine-core/p-0fcda1ec.entry.js +1 -0
- package/dist/pine-core/p-12ec8186.system.entry.js +1 -0
- package/dist/pine-core/p-1649dd61.system.entry.js +1 -0
- package/dist/pine-core/p-1ba361cb.entry.js +1 -0
- package/dist/pine-core/p-1e952dbb.entry.js +7 -0
- package/dist/pine-core/p-210f0994.system.entry.js +1 -0
- package/dist/pine-core/p-222ff58e.system.entry.js +1 -0
- package/dist/pine-core/p-226232a7.system.entry.js +1 -0
- package/dist/pine-core/p-228a9068.system.entry.js +1 -0
- package/dist/pine-core/p-2af19aa7.entry.js +1 -0
- package/dist/pine-core/p-2d4b9253.entry.js +1 -0
- package/dist/pine-core/p-2e214db6.entry.js +1 -0
- package/dist/pine-core/p-2fd71a0c.entry.js +1 -0
- package/dist/pine-core/p-3050c66f.entry.js +1 -0
- package/dist/pine-core/p-33de0eb7.system.entry.js +1 -0
- package/dist/pine-core/p-3aec9079.entry.js +1 -0
- package/dist/pine-core/p-3b9e77b3.entry.js +1 -0
- package/dist/pine-core/p-3cdc1a5b.entry.js +1 -0
- package/dist/pine-core/p-460aa66f.system.entry.js +1 -0
- package/dist/pine-core/p-463eb0e6.system.entry.js +1 -0
- package/dist/pine-core/p-46f0dda5.system.entry.js +1 -0
- package/dist/pine-core/p-4923a3fe.entry.js +1 -0
- package/dist/pine-core/p-4d6944aa.entry.js +1 -0
- package/dist/pine-core/p-4dad0878.entry.js +1 -0
- package/dist/pine-core/p-4faff617.entry.js +1 -0
- package/dist/pine-core/p-50e0f726.system.entry.js +1 -0
- package/dist/pine-core/p-520f7a5b.entry.js +1 -0
- package/dist/pine-core/p-53999cd6.system.entry.js +1 -0
- package/dist/pine-core/p-544ccf67.entry.js +1 -0
- package/dist/pine-core/p-5c239f0a.entry.js +1 -0
- package/dist/pine-core/p-5d585aa8.entry.js +1 -0
- package/dist/pine-core/p-6089d811.entry.js +1 -0
- package/dist/pine-core/p-611f68b7.system.entry.js +1 -0
- package/dist/pine-core/p-63f5f66f.system.entry.js +1 -0
- package/dist/pine-core/p-65557500.entry.js +1 -0
- package/dist/pine-core/p-714bfdbd.entry.js +1 -0
- package/dist/pine-core/p-7691a875.system.entry.js +3 -0
- package/dist/pine-core/p-7a1971ec.entry.js +1 -0
- package/dist/pine-core/p-7b1e3e91.entry.js +1 -0
- package/dist/pine-core/p-7c18e9e8.system.entry.js +8 -0
- package/dist/pine-core/p-85434de8.system.entry.js +1 -0
- package/dist/pine-core/p-86bc2a0c.entry.js +1 -0
- package/dist/pine-core/p-8702635d.system.entry.js +1 -0
- package/dist/pine-core/p-897fe88c.entry.js +1 -0
- package/dist/pine-core/p-8e6a8a8e.entry.js +1 -0
- package/dist/pine-core/p-902b3e8b.system.entry.js +1 -0
- package/dist/pine-core/p-9187c26c.system.entry.js +1 -0
- package/dist/pine-core/p-92c79ed4.system.entry.js +1 -0
- package/dist/pine-core/p-92ef1608.system.entry.js +1 -0
- package/dist/pine-core/p-9487ff20.system.entry.js +1 -0
- package/dist/pine-core/p-9507eb49.system.entry.js +1 -0
- package/dist/pine-core/p-97198cb6.system.entry.js +1 -0
- package/dist/pine-core/p-9a7294e7.system.entry.js +1 -0
- package/dist/pine-core/p-9b68669f.entry.js +1 -0
- package/dist/pine-core/p-9fd1e8f4.system.entry.js +1 -0
- package/dist/pine-core/p-BG6uGRQj.system.js +1 -0
- package/dist/pine-core/p-BKsJZTyn.js +1 -0
- package/dist/pine-core/p-BNSGedhN.js +1 -0
- package/dist/pine-core/p-BbXp4qBM.system.js +1 -0
- package/dist/pine-core/p-BhQhw0S3.system.js +1 -0
- package/dist/pine-core/p-Bjc6fc_Y.system.js +1 -0
- package/dist/pine-core/p-BrLs99ML.system.js +1 -0
- package/dist/pine-core/p-Bu9gFIxM.js +1 -0
- package/dist/pine-core/p-BuRbS7Hp.js +1 -0
- package/dist/pine-core/p-BxIzb-Wc.system.js +1 -0
- package/dist/pine-core/p-C0M1gTKv.js +1 -0
- package/dist/pine-core/p-CRCxGYgw.system.js +1 -0
- package/dist/pine-core/p-CTLu1TM4.js +2 -0
- package/dist/pine-core/p-Cr7-rJtJ.system.js +1 -0
- package/dist/pine-core/p-DAIsVNlL.system.js +2 -0
- package/dist/pine-core/p-DDtwbwIl.js +1 -0
- package/dist/pine-core/p-DVra397g.system.js +1 -0
- package/dist/pine-core/p-DnUJodVd.js +1 -0
- package/dist/pine-core/p-Dr-FzkdE.system.js +1 -0
- package/dist/pine-core/p-DtgUQhjl.js +1 -0
- package/dist/pine-core/p-RFpTWV6r.js +1 -0
- package/dist/pine-core/p-YWpyar7R.system.js +1 -0
- package/dist/pine-core/p-a3c4c0ee.entry.js +1 -0
- package/dist/pine-core/p-a53222f7.entry.js +1 -0
- package/dist/pine-core/p-a7eabc0c.system.entry.js +1 -0
- package/dist/pine-core/p-a8ab4d9b.entry.js +1 -0
- package/dist/pine-core/p-a9e54964.entry.js +1 -0
- package/dist/pine-core/p-aa208514.entry.js +1 -0
- package/dist/pine-core/p-ae296598.entry.js +1 -0
- package/dist/pine-core/p-aecaff12.entry.js +1 -0
- package/dist/pine-core/p-af4a24d9.entry.js +1 -0
- package/dist/pine-core/p-afd07d5b.entry.js +1 -0
- package/dist/pine-core/p-b0531455.entry.js +1 -0
- package/dist/pine-core/p-b109de2e.entry.js +1 -0
- package/dist/pine-core/p-b17fa86a.system.entry.js +1 -0
- package/dist/pine-core/p-b255d3b7.entry.js +1 -0
- package/dist/pine-core/p-b52deffb.entry.js +1 -0
- package/dist/pine-core/p-b6c2090f.system.entry.js +1 -0
- package/dist/pine-core/p-ba8bd9dc.system.entry.js +1 -0
- package/dist/pine-core/p-bba759f8.system.entry.js +1 -0
- package/dist/pine-core/p-bf3afa16.system.entry.js +1 -0
- package/dist/pine-core/p-bfa640f4.system.entry.js +1 -0
- package/dist/pine-core/p-c0753d9f.entry.js +1 -0
- package/dist/pine-core/p-c09dab1a.system.entry.js +1 -0
- package/dist/pine-core/p-c713ffc6.system.entry.js +1 -0
- package/dist/pine-core/p-ce63f726.system.entry.js +1 -0
- package/dist/pine-core/p-ce79321b.system.entry.js +1 -0
- package/dist/pine-core/p-cf72e9b1.system.entry.js +1 -0
- package/dist/pine-core/p-d157a33a.entry.js +1 -0
- package/dist/pine-core/p-d27ef352.system.entry.js +1 -0
- package/dist/pine-core/p-d415bb01.entry.js +2 -0
- package/dist/pine-core/p-d54af26c.system.entry.js +1 -0
- package/dist/pine-core/p-d804d37b.system.entry.js +1 -0
- package/dist/pine-core/p-e11795db.system.entry.js +1 -0
- package/dist/pine-core/p-e1653d75.system.entry.js +1 -0
- package/dist/pine-core/p-e16dfb32.system.entry.js +1 -0
- package/dist/pine-core/p-e450eb27.system.entry.js +1 -0
- package/dist/pine-core/p-eb4058ed.system.entry.js +1 -0
- package/dist/pine-core/p-f09ce49e.entry.js +1 -0
- package/dist/pine-core/p-f35596cd.entry.js +1 -0
- package/dist/pine-core/p-f3683be8.entry.js +1 -0
- package/dist/pine-core/p-fcf91f14.system.entry.js +1 -0
- package/dist/pine-core/p-kYMYDfJY.system.js +1 -0
- package/dist/pine-core/p-tJa4KYNO.js +1 -0
- package/dist/pine-core/pine-core.css +1 -1
- package/dist/pine-core/pine-core.esm.js +1 -2
- package/dist/pine-core/pine-core.js +1 -1
- package/dist/scripts/vscode-custom-data-generator.js +406 -0
- package/dist/scripts/vscode-settings-patcher.cjs +89 -0
- package/dist/types/components/pds-accordion/pds-accordion.d.ts +8 -0
- package/dist/types/components/pds-alert/pds-alert.d.ts +51 -0
- package/dist/types/components/pds-avatar/pds-avatar.d.ts +38 -0
- package/dist/types/components/pds-box/pds-box.d.ts +475 -14
- package/dist/types/components/pds-button/pds-button.d.ts +70 -12
- package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +11 -1
- package/dist/types/components/pds-chip/pds-chip.d.ts +62 -13
- package/dist/types/components/pds-combobox/combobox-interface.d.ts +23 -0
- package/dist/types/components/pds-combobox/pds-combobox.d.ts +372 -0
- package/dist/types/components/pds-container/pds-container.d.ts +22 -0
- package/dist/types/components/pds-copytext/pds-copytext.d.ts +14 -4
- package/dist/types/components/pds-divider/pds-divider.d.ts +9 -1
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.d.ts +66 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.d.ts +13 -0
- package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +39 -0
- package/dist/types/components/pds-filters/pds-filter/filter-interface.d.ts +19 -0
- package/dist/types/components/pds-filters/pds-filter/pds-filter.d.ts +133 -0
- package/dist/types/components/pds-filters/pds-filters.d.ts +11 -0
- package/dist/types/components/pds-image/pds-image.d.ts +7 -3
- package/dist/types/components/pds-input/input-interface.d.ts +12 -0
- package/dist/types/components/pds-input/pds-input.d.ts +163 -8
- package/dist/types/components/pds-link/pds-link.d.ts +73 -11
- package/dist/types/components/pds-loader/pds-loader.d.ts +2 -1
- package/dist/types/components/pds-modal/pds-modal-content/pds-modal-content.d.ts +38 -0
- package/dist/types/components/pds-modal/pds-modal-footer/pds-modal-footer.d.ts +5 -0
- package/dist/types/components/pds-modal/pds-modal-header/pds-modal-header.d.ts +5 -0
- package/dist/types/components/pds-modal/pds-modal.d.ts +88 -0
- package/dist/types/components/pds-modal/test/mock-pds-modal.d.ts +68 -0
- package/dist/types/components/pds-multiselect/multiselect-interface.d.ts +42 -0
- package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +326 -0
- package/dist/types/components/pds-popover/pds-popover.d.ts +179 -0
- package/dist/types/components/pds-popover/popover-interface.d.ts +4 -0
- package/dist/types/components/pds-property/pds-property.d.ts +14 -0
- package/dist/types/components/pds-radio/pds-radio.d.ts +30 -9
- package/dist/types/components/pds-radio-group/pds-radio-group.d.ts +73 -0
- package/dist/types/components/pds-radio-group/radio-group-interface.d.ts +5 -0
- package/dist/types/components/pds-row/pds-row.d.ts +10 -2
- package/dist/types/components/pds-select/pds-select.d.ts +146 -0
- package/dist/types/components/pds-sortable/pds-sortable-item/pds-sortable-item.d.ts +1 -0
- package/dist/types/components/pds-sortable/pds-sortable.d.ts +10 -2
- package/dist/types/components/pds-sortable/sortable-interface.d.ts +3 -1
- package/dist/types/components/pds-switch/pds-switch.d.ts +24 -19
- package/dist/types/components/pds-table/pds-table-cell/pds-table-cell.d.ts +26 -1
- package/dist/types/components/pds-table/pds-table-head/pds-table-head.d.ts +15 -2
- package/dist/types/components/pds-table/pds-table-head-cell/pds-table-head-cell.d.ts +52 -2
- package/dist/types/components/pds-table/pds-table-row/pds-table-row.d.ts +23 -4
- package/dist/types/components/pds-table/pds-table.d.ts +62 -10
- package/dist/types/components/pds-tabs/pds-tab/pds-tab.d.ts +49 -0
- package/dist/types/components/pds-tabs/pds-tabpanel/pds-tabpanel.d.ts +6 -0
- package/dist/types/components/pds-tabs/pds-tabs.d.ts +27 -3
- package/dist/types/components/pds-text/pds-text.d.ts +55 -0
- package/dist/types/components/pds-textarea/pds-textarea.d.ts +138 -15
- package/dist/types/components/pds-textarea/textarea-interface.d.ts +5 -1
- package/dist/types/components/pds-toast/pds-toast.d.ts +70 -0
- package/dist/types/components/pds-tooltip/pds-tooltip.d.ts +45 -19
- package/dist/types/components.d.ts +5600 -1197
- package/dist/types/home/runner/work/pine/pine/libs/core/.stencil/scripts/vscode-custom-data-generator.d.ts +6 -0
- package/dist/types/i18n/i18n-format.d.ts +38 -0
- package/dist/types/i18n/index.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +195 -8
- package/dist/types/utils/attributes.d.ts +10 -0
- package/dist/types/utils/form.d.ts +23 -1
- package/dist/types/utils/interfaces.d.ts +6 -0
- package/dist/types/utils/overlay.d.ts +3 -3
- package/dist/types/utils/reconnected-content.d.ts +14 -0
- package/dist/types/utils/scroll.d.ts +21 -0
- package/dist/types/utils/test/axe.d.ts +81 -0
- package/dist/types/utils/test/reconnect-safety.d.ts +11 -0
- package/dist/types/utils/truncation-tooltip.d.ts +21 -0
- package/dist/types/utils/types.d.ts +8 -2
- package/dist/types/utils/utils.d.ts +14 -2
- package/dist/vscode.html-data.json +10944 -0
- package/hydrate/index.d.ts +58 -7
- package/hydrate/index.js +21570 -3575
- package/hydrate/index.mjs +21568 -3575
- package/package.json +47 -25
- package/readme.md +1 -1
- package/components/closest.js.map +0 -1
- package/components/index.js.map +0 -1
- package/components/index2.js.map +0 -1
- package/components/pds-accordion.js.map +0 -1
- package/components/pds-avatar.js.map +0 -1
- package/components/pds-box.js.map +0 -1
- package/components/pds-button.js.map +0 -1
- package/components/pds-button2.js.map +0 -1
- package/components/pds-checkbox.js.map +0 -1
- package/components/pds-checkbox2.js.map +0 -1
- package/components/pds-chip.js.map +0 -1
- package/components/pds-copytext.js.map +0 -1
- package/components/pds-divider.js.map +0 -1
- package/components/pds-icon.js.map +0 -1
- package/components/pds-icon2.js.map +0 -1
- package/components/pds-image.js.map +0 -1
- package/components/pds-input.js.map +0 -1
- package/components/pds-label.js +0 -39
- package/components/pds-label.js.map +0 -1
- package/components/pds-link.js.map +0 -1
- package/components/pds-loader.js.map +0 -1
- package/components/pds-progress.js.map +0 -1
- package/components/pds-radio.js.map +0 -1
- package/components/pds-row.js.map +0 -1
- package/components/pds-sortable-item.js.map +0 -1
- package/components/pds-sortable.js.map +0 -1
- package/components/pds-switch.js.map +0 -1
- package/components/pds-tab.js.map +0 -1
- package/components/pds-table-body.js.map +0 -1
- package/components/pds-table-cell.js.map +0 -1
- package/components/pds-table-cell2.js.map +0 -1
- package/components/pds-table-head-cell.js.map +0 -1
- package/components/pds-table-head-cell2.js.map +0 -1
- package/components/pds-table-head.js.map +0 -1
- package/components/pds-table-row.js.map +0 -1
- package/components/pds-table.js.map +0 -1
- package/components/pds-tabpanel.js.map +0 -1
- package/components/pds-tabs.js.map +0 -1
- package/components/pds-textarea.js.map +0 -1
- package/components/pds-tooltip.js.map +0 -1
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/closest-b45138d3.js +0 -13
- package/dist/cjs/closest-b45138d3.js.map +0 -1
- package/dist/cjs/index-46fb0736.js +0 -1956
- package/dist/cjs/index-46fb0736.js.map +0 -1
- package/dist/cjs/index-de3f0730.js +0 -24
- package/dist/cjs/index-de3f0730.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/pds-accordion.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-avatar.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-box.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-button.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-checkbox.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-chip.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-copytext.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-divider.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-icon.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-image.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-input.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-label-7aabdc4e.js +0 -44
- package/dist/cjs/pds-label-7aabdc4e.js.map +0 -1
- package/dist/cjs/pds-link.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-loader.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-progress.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-radio.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-row.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-sortable-item.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-sortable.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-switch.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-tab.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table-body.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table-cell.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table-head-cell.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table-head.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table-row.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-table.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-tabpanel.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-textarea.cjs.entry.js.map +0 -1
- package/dist/cjs/pds-tooltip.cjs.entry.js.map +0 -1
- package/dist/cjs/pine-core.cjs.js.map +0 -1
- package/dist/collection/components/_internal/pds-label/pds-label.js.map +0 -1
- package/dist/collection/components/pds-accordion/pds-accordion.js.map +0 -1
- package/dist/collection/components/pds-avatar/pds-avatar.js.map +0 -1
- package/dist/collection/components/pds-box/pds-box.js.map +0 -1
- package/dist/collection/components/pds-button/pds-button.js.map +0 -1
- package/dist/collection/components/pds-checkbox/checkbox-interface.js.map +0 -1
- package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +0 -1
- package/dist/collection/components/pds-chip/pds-chip.js.map +0 -1
- package/dist/collection/components/pds-copytext/pds-copytext.js.map +0 -1
- package/dist/collection/components/pds-divider/pds-divider.js.map +0 -1
- package/dist/collection/components/pds-image/pds-image.js.map +0 -1
- package/dist/collection/components/pds-input/pds-input.js.map +0 -1
- package/dist/collection/components/pds-link/pds-link.js.map +0 -1
- package/dist/collection/components/pds-loader/pds-loader.js.map +0 -1
- package/dist/collection/components/pds-progress/pds-progress.js.map +0 -1
- package/dist/collection/components/pds-radio/pds-radio.js.map +0 -1
- package/dist/collection/components/pds-row/pds-row.js.map +0 -1
- package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js.map +0 -1
- package/dist/collection/components/pds-sortable/pds-sortable.js.map +0 -1
- package/dist/collection/components/pds-sortable/sortable-interface.js.map +0 -1
- package/dist/collection/components/pds-switch/pds-switch.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js.map +0 -1
- package/dist/collection/components/pds-table/pds-table.js.map +0 -1
- package/dist/collection/components/pds-tabs/pds-tab/pds-tab.js.map +0 -1
- package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js.map +0 -1
- package/dist/collection/components/pds-tabs/pds-tabs.js.map +0 -1
- package/dist/collection/components/pds-textarea/pds-textarea.js.map +0 -1
- package/dist/collection/components/pds-textarea/textarea-interface.js.map +0 -1
- package/dist/collection/components/pds-tooltip/pds-tooltip.js.map +0 -1
- package/dist/collection/global/pine-ui-global.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/stories/_helpers/index.js +0 -15
- package/dist/collection/stories/_helpers/index.js.map +0 -1
- package/dist/collection/utils/closest.js.map +0 -1
- package/dist/collection/utils/form.js.map +0 -1
- package/dist/collection/utils/overlay.js.map +0 -1
- package/dist/collection/utils/types.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/closest-d2d192be.js +0 -11
- package/dist/esm/closest-d2d192be.js.map +0 -1
- package/dist/esm/index-2a33b470.js +0 -1927
- package/dist/esm/index-2a33b470.js.map +0 -1
- package/dist/esm/index-a1e2f9af.js +0 -14
- package/dist/esm/index-a1e2f9af.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/pds-accordion.entry.js.map +0 -1
- package/dist/esm/pds-avatar.entry.js.map +0 -1
- package/dist/esm/pds-box.entry.js.map +0 -1
- package/dist/esm/pds-button.entry.js.map +0 -1
- package/dist/esm/pds-checkbox.entry.js.map +0 -1
- package/dist/esm/pds-chip.entry.js.map +0 -1
- package/dist/esm/pds-copytext.entry.js.map +0 -1
- package/dist/esm/pds-divider.entry.js.map +0 -1
- package/dist/esm/pds-icon.entry.js.map +0 -1
- package/dist/esm/pds-image.entry.js.map +0 -1
- package/dist/esm/pds-input.entry.js.map +0 -1
- package/dist/esm/pds-label-31a5848b.js +0 -39
- package/dist/esm/pds-label-31a5848b.js.map +0 -1
- package/dist/esm/pds-link.entry.js.map +0 -1
- package/dist/esm/pds-loader.entry.js.map +0 -1
- package/dist/esm/pds-progress.entry.js.map +0 -1
- package/dist/esm/pds-radio.entry.js.map +0 -1
- package/dist/esm/pds-row.entry.js.map +0 -1
- package/dist/esm/pds-sortable-item.entry.js.map +0 -1
- package/dist/esm/pds-sortable.entry.js.map +0 -1
- package/dist/esm/pds-switch.entry.js.map +0 -1
- package/dist/esm/pds-tab.entry.js.map +0 -1
- package/dist/esm/pds-table-body.entry.js.map +0 -1
- package/dist/esm/pds-table-cell.entry.js.map +0 -1
- package/dist/esm/pds-table-head-cell.entry.js.map +0 -1
- package/dist/esm/pds-table-head.entry.js.map +0 -1
- package/dist/esm/pds-table-row.entry.js.map +0 -1
- package/dist/esm/pds-table.entry.js.map +0 -1
- package/dist/esm/pds-tabpanel.entry.js.map +0 -1
- package/dist/esm/pds-tabs.entry.js.map +0 -1
- package/dist/esm/pds-textarea.entry.js.map +0 -1
- package/dist/esm/pds-tooltip.entry.js.map +0 -1
- package/dist/esm/pine-core.js.map +0 -1
- package/dist/esm-es5/app-globals-0f993ce5.js +0 -2
- package/dist/esm-es5/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm-es5/closest-d2d192be.js +0 -2
- package/dist/esm-es5/closest-d2d192be.js.map +0 -1
- package/dist/esm-es5/index-2a33b470.js +0 -3
- package/dist/esm-es5/index-2a33b470.js.map +0 -1
- package/dist/esm-es5/index-a1e2f9af.js +0 -2
- package/dist/esm-es5/index-a1e2f9af.js.map +0 -1
- package/dist/esm-es5/index.js.map +0 -1
- package/dist/esm-es5/loader.js.map +0 -1
- package/dist/esm-es5/pds-accordion.entry.js.map +0 -1
- package/dist/esm-es5/pds-avatar.entry.js.map +0 -1
- package/dist/esm-es5/pds-box.entry.js.map +0 -1
- package/dist/esm-es5/pds-button.entry.js.map +0 -1
- package/dist/esm-es5/pds-checkbox.entry.js.map +0 -1
- package/dist/esm-es5/pds-chip.entry.js.map +0 -1
- package/dist/esm-es5/pds-copytext.entry.js.map +0 -1
- package/dist/esm-es5/pds-divider.entry.js.map +0 -1
- package/dist/esm-es5/pds-icon.entry.js.map +0 -1
- package/dist/esm-es5/pds-image.entry.js.map +0 -1
- package/dist/esm-es5/pds-input.entry.js.map +0 -1
- package/dist/esm-es5/pds-label-31a5848b.js +0 -2
- package/dist/esm-es5/pds-label-31a5848b.js.map +0 -1
- package/dist/esm-es5/pds-link.entry.js.map +0 -1
- package/dist/esm-es5/pds-loader.entry.js.map +0 -1
- package/dist/esm-es5/pds-progress.entry.js.map +0 -1
- package/dist/esm-es5/pds-radio.entry.js.map +0 -1
- package/dist/esm-es5/pds-row.entry.js.map +0 -1
- package/dist/esm-es5/pds-sortable-item.entry.js.map +0 -1
- package/dist/esm-es5/pds-sortable.entry.js.map +0 -1
- package/dist/esm-es5/pds-switch.entry.js.map +0 -1
- package/dist/esm-es5/pds-tab.entry.js.map +0 -1
- package/dist/esm-es5/pds-table-body.entry.js.map +0 -1
- package/dist/esm-es5/pds-table-cell.entry.js.map +0 -1
- package/dist/esm-es5/pds-table-head-cell.entry.js.map +0 -1
- package/dist/esm-es5/pds-table-head.entry.js.map +0 -1
- package/dist/esm-es5/pds-table-row.entry.js.map +0 -1
- package/dist/esm-es5/pds-table.entry.js.map +0 -1
- package/dist/esm-es5/pds-tabpanel.entry.js.map +0 -1
- package/dist/esm-es5/pds-tabs.entry.js.map +0 -1
- package/dist/esm-es5/pds-textarea.entry.js.map +0 -1
- package/dist/esm-es5/pds-tooltip.entry.js.map +0 -1
- package/dist/esm-es5/pine-core.js.map +0 -1
- package/dist/pine-core/index.esm.js.map +0 -1
- package/dist/pine-core/p-06c33261.system.entry.js +0 -2
- package/dist/pine-core/p-06c33261.system.entry.js.map +0 -1
- package/dist/pine-core/p-07f80cb6.entry.js +0 -2
- package/dist/pine-core/p-07f80cb6.entry.js.map +0 -1
- package/dist/pine-core/p-09b1c7f1.system.entry.js +0 -2
- package/dist/pine-core/p-09b1c7f1.system.entry.js.map +0 -1
- package/dist/pine-core/p-0a4b1ce9.system.entry.js +0 -2
- package/dist/pine-core/p-0a4b1ce9.system.entry.js.map +0 -1
- package/dist/pine-core/p-0b541f88.js +0 -3
- package/dist/pine-core/p-0b541f88.js.map +0 -1
- package/dist/pine-core/p-0b77685e.js +0 -2
- package/dist/pine-core/p-0b77685e.js.map +0 -1
- package/dist/pine-core/p-0d6fafef.system.entry.js +0 -2
- package/dist/pine-core/p-0d6fafef.system.entry.js.map +0 -1
- package/dist/pine-core/p-0e1c0d03.entry.js +0 -8
- package/dist/pine-core/p-0e1c0d03.entry.js.map +0 -1
- package/dist/pine-core/p-0e936138.entry.js +0 -2
- package/dist/pine-core/p-0e936138.entry.js.map +0 -1
- package/dist/pine-core/p-143795e5.system.entry.js +0 -2
- package/dist/pine-core/p-143795e5.system.entry.js.map +0 -1
- package/dist/pine-core/p-1f2b0be3.system.entry.js +0 -2
- package/dist/pine-core/p-1f2b0be3.system.entry.js.map +0 -1
- package/dist/pine-core/p-224a435b.system.js +0 -2
- package/dist/pine-core/p-224a435b.system.js.map +0 -1
- package/dist/pine-core/p-31056348.system.entry.js +0 -2
- package/dist/pine-core/p-31056348.system.entry.js.map +0 -1
- package/dist/pine-core/p-32498622.system.entry.js +0 -2
- package/dist/pine-core/p-32498622.system.entry.js.map +0 -1
- package/dist/pine-core/p-3261fdf5.system.entry.js +0 -2
- package/dist/pine-core/p-3261fdf5.system.entry.js.map +0 -1
- package/dist/pine-core/p-32e41e3d.system.entry.js +0 -2
- package/dist/pine-core/p-32e41e3d.system.entry.js.map +0 -1
- package/dist/pine-core/p-34631565.system.js +0 -2
- package/dist/pine-core/p-34631565.system.js.map +0 -1
- package/dist/pine-core/p-3aa152c6.entry.js +0 -2
- package/dist/pine-core/p-3aa152c6.entry.js.map +0 -1
- package/dist/pine-core/p-3ba3d44c.entry.js +0 -2
- package/dist/pine-core/p-3ba3d44c.entry.js.map +0 -1
- package/dist/pine-core/p-46161cec.entry.js +0 -2
- package/dist/pine-core/p-46161cec.entry.js.map +0 -1
- package/dist/pine-core/p-4f69a7b7.entry.js +0 -2
- package/dist/pine-core/p-4f69a7b7.entry.js.map +0 -1
- package/dist/pine-core/p-50a23474.entry.js +0 -2
- package/dist/pine-core/p-50a23474.entry.js.map +0 -1
- package/dist/pine-core/p-511bf308.entry.js +0 -2
- package/dist/pine-core/p-511bf308.entry.js.map +0 -1
- package/dist/pine-core/p-52515d64.system.entry.js +0 -2
- package/dist/pine-core/p-52515d64.system.entry.js.map +0 -1
- package/dist/pine-core/p-56ba5cbf.system.js +0 -2
- package/dist/pine-core/p-56ba5cbf.system.js.map +0 -1
- package/dist/pine-core/p-5a384517.entry.js +0 -2
- package/dist/pine-core/p-5a384517.entry.js.map +0 -1
- package/dist/pine-core/p-5bee6677.system.entry.js +0 -2
- package/dist/pine-core/p-5bee6677.system.entry.js.map +0 -1
- package/dist/pine-core/p-5df76e04.system.js +0 -2
- package/dist/pine-core/p-5df76e04.system.js.map +0 -1
- package/dist/pine-core/p-62ec9a0f.system.entry.js +0 -2
- package/dist/pine-core/p-62ec9a0f.system.entry.js.map +0 -1
- package/dist/pine-core/p-6a7a864f.entry.js +0 -2
- package/dist/pine-core/p-6a7a864f.entry.js.map +0 -1
- package/dist/pine-core/p-6ae2f0f5.entry.js +0 -2
- package/dist/pine-core/p-6ae2f0f5.entry.js.map +0 -1
- package/dist/pine-core/p-6d9edf7d.system.entry.js +0 -2
- package/dist/pine-core/p-6d9edf7d.system.entry.js.map +0 -1
- package/dist/pine-core/p-6e146962.entry.js +0 -2
- package/dist/pine-core/p-6e146962.entry.js.map +0 -1
- package/dist/pine-core/p-6ff9ebfa.entry.js +0 -2
- package/dist/pine-core/p-6ff9ebfa.entry.js.map +0 -1
- package/dist/pine-core/p-701ba882.entry.js +0 -2
- package/dist/pine-core/p-701ba882.entry.js.map +0 -1
- package/dist/pine-core/p-73eb1722.entry.js +0 -2
- package/dist/pine-core/p-73eb1722.entry.js.map +0 -1
- package/dist/pine-core/p-78c6c37a.system.entry.js +0 -2
- package/dist/pine-core/p-78c6c37a.system.entry.js.map +0 -1
- package/dist/pine-core/p-79ca4ab9.system.entry.js +0 -2
- package/dist/pine-core/p-79ca4ab9.system.entry.js.map +0 -1
- package/dist/pine-core/p-7c33a02e.entry.js +0 -2
- package/dist/pine-core/p-7c33a02e.entry.js.map +0 -1
- package/dist/pine-core/p-7dac515e.system.entry.js +0 -2
- package/dist/pine-core/p-7dac515e.system.entry.js.map +0 -1
- package/dist/pine-core/p-7ea6838b.system.entry.js +0 -2
- package/dist/pine-core/p-7ea6838b.system.entry.js.map +0 -1
- package/dist/pine-core/p-7ebfdef4.system.entry.js +0 -2
- package/dist/pine-core/p-7ebfdef4.system.entry.js.map +0 -1
- package/dist/pine-core/p-829777e4.system.entry.js +0 -2
- package/dist/pine-core/p-829777e4.system.entry.js.map +0 -1
- package/dist/pine-core/p-8317c6c2.js +0 -2
- package/dist/pine-core/p-8317c6c2.js.map +0 -1
- package/dist/pine-core/p-8469b65a.entry.js +0 -2
- package/dist/pine-core/p-8469b65a.entry.js.map +0 -1
- package/dist/pine-core/p-8d8de5fd.entry.js +0 -2
- package/dist/pine-core/p-8d8de5fd.entry.js.map +0 -1
- package/dist/pine-core/p-8df8debd.entry.js +0 -2
- package/dist/pine-core/p-8df8debd.entry.js.map +0 -1
- package/dist/pine-core/p-8f73bf14.system.entry.js +0 -2
- package/dist/pine-core/p-8f73bf14.system.entry.js.map +0 -1
- package/dist/pine-core/p-8fbec4fe.system.js +0 -2
- package/dist/pine-core/p-8fbec4fe.system.js.map +0 -1
- package/dist/pine-core/p-909b305c.system.entry.js +0 -2
- package/dist/pine-core/p-909b305c.system.entry.js.map +0 -1
- package/dist/pine-core/p-936d96ec.system.entry.js +0 -9
- package/dist/pine-core/p-936d96ec.system.entry.js.map +0 -1
- package/dist/pine-core/p-9583e6d5.entry.js +0 -2
- package/dist/pine-core/p-9583e6d5.entry.js.map +0 -1
- package/dist/pine-core/p-96c750d1.entry.js +0 -2
- package/dist/pine-core/p-96c750d1.entry.js.map +0 -1
- package/dist/pine-core/p-a03e587c.entry.js +0 -2
- package/dist/pine-core/p-a03e587c.entry.js.map +0 -1
- package/dist/pine-core/p-a79a8159.entry.js +0 -2
- package/dist/pine-core/p-a79a8159.entry.js.map +0 -1
- package/dist/pine-core/p-a962fe8e.entry.js +0 -2
- package/dist/pine-core/p-a962fe8e.entry.js.map +0 -1
- package/dist/pine-core/p-ad4238c9.system.entry.js +0 -2
- package/dist/pine-core/p-ad4238c9.system.entry.js.map +0 -1
- package/dist/pine-core/p-af7df3c2.system.entry.js +0 -2
- package/dist/pine-core/p-af7df3c2.system.entry.js.map +0 -1
- package/dist/pine-core/p-b18b20f4.system.js +0 -2
- package/dist/pine-core/p-b18b20f4.system.js.map +0 -1
- package/dist/pine-core/p-b4518566.entry.js +0 -2
- package/dist/pine-core/p-b4518566.entry.js.map +0 -1
- package/dist/pine-core/p-b5c7e02a.entry.js +0 -2
- package/dist/pine-core/p-b5c7e02a.entry.js.map +0 -1
- package/dist/pine-core/p-bc20946b.system.entry.js +0 -2
- package/dist/pine-core/p-bc20946b.system.entry.js.map +0 -1
- package/dist/pine-core/p-c52d0465.system.entry.js +0 -2
- package/dist/pine-core/p-c52d0465.system.entry.js.map +0 -1
- package/dist/pine-core/p-c84cc2f8.system.entry.js +0 -2
- package/dist/pine-core/p-c84cc2f8.system.entry.js.map +0 -1
- package/dist/pine-core/p-ca239d59.system.entry.js +0 -2
- package/dist/pine-core/p-ca239d59.system.entry.js.map +0 -1
- package/dist/pine-core/p-e1255160.js +0 -2
- package/dist/pine-core/p-e1255160.js.map +0 -1
- package/dist/pine-core/p-e4b3115c.entry.js +0 -2
- package/dist/pine-core/p-e4b3115c.entry.js.map +0 -1
- package/dist/pine-core/p-e60fccc0.js +0 -2
- package/dist/pine-core/p-e60fccc0.js.map +0 -1
- package/dist/pine-core/p-eb56f262.system.entry.js +0 -2
- package/dist/pine-core/p-eb56f262.system.entry.js.map +0 -1
- package/dist/pine-core/p-ec484bf6.entry.js +0 -2
- package/dist/pine-core/p-ec484bf6.entry.js.map +0 -1
- package/dist/pine-core/p-f59d4a46.entry.js +0 -2
- package/dist/pine-core/p-f59d4a46.entry.js.map +0 -1
- package/dist/pine-core/p-f74c489d.system.js +0 -3
- package/dist/pine-core/p-f74c489d.system.js.map +0 -1
- package/dist/pine-core/pine-core.esm.js.map +0 -1
- package/dist/pine-core/svg/access-key.svg +0 -1
- package/dist/pine-core/svg/add-circle.svg +0 -1
- package/dist/pine-core/svg/add-image.svg +0 -1
- package/dist/pine-core/svg/add-small.svg +0 -1
- package/dist/pine-core/svg/add-square.svg +0 -1
- package/dist/pine-core/svg/add.svg +0 -1
- package/dist/pine-core/svg/advanced.svg +0 -1
- package/dist/pine-core/svg/ai-sparkle.svg +0 -1
- package/dist/pine-core/svg/ai-writer-filled.svg +0 -1
- package/dist/pine-core/svg/ai-writer.svg +0 -1
- package/dist/pine-core/svg/align-center.svg +0 -1
- package/dist/pine-core/svg/align-justify.svg +0 -1
- package/dist/pine-core/svg/align-left.svg +0 -1
- package/dist/pine-core/svg/align-right.svg +0 -1
- package/dist/pine-core/svg/app-store.svg +0 -1
- package/dist/pine-core/svg/archive.svg +0 -1
- package/dist/pine-core/svg/arrow-corner.svg +0 -1
- package/dist/pine-core/svg/arrow-down.svg +0 -1
- package/dist/pine-core/svg/arrow-left.svg +0 -1
- package/dist/pine-core/svg/arrow-right.svg +0 -1
- package/dist/pine-core/svg/arrow-up.svg +0 -1
- package/dist/pine-core/svg/assessment.svg +0 -1
- package/dist/pine-core/svg/at-sign.svg +0 -1
- package/dist/pine-core/svg/attach.svg +0 -1
- package/dist/pine-core/svg/automations.svg +0 -1
- package/dist/pine-core/svg/ban.svg +0 -1
- package/dist/pine-core/svg/bank.svg +0 -1
- package/dist/pine-core/svg/bar-chart-10-tone.svg +0 -1
- package/dist/pine-core/svg/bell-01-tone.svg +0 -1
- package/dist/pine-core/svg/bell.svg +0 -1
- package/dist/pine-core/svg/block.svg +0 -1
- package/dist/pine-core/svg/blog-filled.svg +0 -1
- package/dist/pine-core/svg/blog.svg +0 -1
- package/dist/pine-core/svg/bold.svg +0 -1
- package/dist/pine-core/svg/broadcast.svg +0 -1
- package/dist/pine-core/svg/bulb.svg +0 -1
- package/dist/pine-core/svg/button.svg +0 -1
- package/dist/pine-core/svg/calendar-date.svg +0 -1
- package/dist/pine-core/svg/calendar-schedule.svg +0 -1
- package/dist/pine-core/svg/calendar-simple.svg +0 -1
- package/dist/pine-core/svg/card-amex.svg +0 -1
- package/dist/pine-core/svg/card-android.svg +0 -1
- package/dist/pine-core/svg/card-apple.svg +0 -1
- package/dist/pine-core/svg/card-diners-club.svg +0 -1
- package/dist/pine-core/svg/card-discover.svg +0 -1
- package/dist/pine-core/svg/card-generic.svg +0 -1
- package/dist/pine-core/svg/card-gpay.svg +0 -1
- package/dist/pine-core/svg/card-mastercard.svg +0 -1
- package/dist/pine-core/svg/card-paypal.svg +0 -1
- package/dist/pine-core/svg/card-stripe.svg +0 -1
- package/dist/pine-core/svg/card-update.svg +0 -1
- package/dist/pine-core/svg/card-visa.svg +0 -1
- package/dist/pine-core/svg/caret-down.svg +0 -1
- package/dist/pine-core/svg/caret-left.svg +0 -1
- package/dist/pine-core/svg/caret-right.svg +0 -1
- package/dist/pine-core/svg/caret-up.svg +0 -1
- package/dist/pine-core/svg/cart-add.svg +0 -1
- package/dist/pine-core/svg/cart.svg +0 -1
- package/dist/pine-core/svg/certificate.svg +0 -1
- package/dist/pine-core/svg/chart-filled.svg +0 -1
- package/dist/pine-core/svg/chart.svg +0 -1
- package/dist/pine-core/svg/check-circle-filled.svg +0 -1
- package/dist/pine-core/svg/check-circle.svg +0 -1
- package/dist/pine-core/svg/check.svg +0 -1
- package/dist/pine-core/svg/circle-1.svg +0 -1
- package/dist/pine-core/svg/circle-2.svg +0 -1
- package/dist/pine-core/svg/circle-3.svg +0 -1
- package/dist/pine-core/svg/circle-4.svg +0 -1
- package/dist/pine-core/svg/circle-5.svg +0 -1
- package/dist/pine-core/svg/circle-6.svg +0 -1
- package/dist/pine-core/svg/circle-7.svg +0 -1
- package/dist/pine-core/svg/circle-8.svg +0 -1
- package/dist/pine-core/svg/circle-9.svg +0 -1
- package/dist/pine-core/svg/circle-a.svg +0 -1
- package/dist/pine-core/svg/circle-b.svg +0 -1
- package/dist/pine-core/svg/circle-dashed.svg +0 -1
- package/dist/pine-core/svg/clapperboard-tone.svg +0 -1
- package/dist/pine-core/svg/clock.svg +0 -1
- package/dist/pine-core/svg/closed-captions.svg +0 -1
- package/dist/pine-core/svg/cloud-upload.svg +0 -1
- package/dist/pine-core/svg/code-block.svg +0 -1
- package/dist/pine-core/svg/code.svg +0 -1
- package/dist/pine-core/svg/color.svg +0 -1
- package/dist/pine-core/svg/columns.svg +0 -1
- package/dist/pine-core/svg/comment-no.svg +0 -1
- package/dist/pine-core/svg/comment.svg +0 -1
- package/dist/pine-core/svg/connect.svg +0 -1
- package/dist/pine-core/svg/contact.svg +0 -1
- package/dist/pine-core/svg/conversation.svg +0 -1
- package/dist/pine-core/svg/copy.svg +0 -1
- package/dist/pine-core/svg/coupon.svg +0 -1
- package/dist/pine-core/svg/course-filled.svg +0 -1
- package/dist/pine-core/svg/course.svg +0 -1
- package/dist/pine-core/svg/creator-studio-filled.svg +0 -1
- package/dist/pine-core/svg/creator-studio.svg +0 -1
- package/dist/pine-core/svg/credit-card-02-tone.svg +0 -1
- package/dist/pine-core/svg/cube-01-tone.svg +0 -1
- package/dist/pine-core/svg/cursor-pointer.svg +0 -1
- package/dist/pine-core/svg/cursor.svg +0 -1
- package/dist/pine-core/svg/custom-field.svg +0 -1
- package/dist/pine-core/svg/customize.svg +0 -1
- package/dist/pine-core/svg/danger-filled.svg +0 -1
- package/dist/pine-core/svg/danger.svg +0 -1
- package/dist/pine-core/svg/delete-circle.svg +0 -1
- package/dist/pine-core/svg/delete-key.svg +0 -1
- package/dist/pine-core/svg/delete-x.svg +0 -1
- package/dist/pine-core/svg/dollar.svg +0 -1
- package/dist/pine-core/svg/dot-menu-horizontal.svg +0 -1
- package/dist/pine-core/svg/dots-horizontal-tone.svg +0 -1
- package/dist/pine-core/svg/down-small.svg +0 -1
- package/dist/pine-core/svg/download.svg +0 -1
- package/dist/pine-core/svg/downsell.svg +0 -1
- package/dist/pine-core/svg/draft.svg +0 -1
- package/dist/pine-core/svg/drawer-collapse.svg +0 -1
- package/dist/pine-core/svg/drawer-expand.svg +0 -1
- package/dist/pine-core/svg/drop.svg +0 -1
- package/dist/pine-core/svg/duplicate.svg +0 -1
- package/dist/pine-core/svg/editor-filled.svg +0 -1
- package/dist/pine-core/svg/editor.svg +0 -1
- package/dist/pine-core/svg/email-activity.svg +0 -1
- package/dist/pine-core/svg/emoji.svg +0 -1
- package/dist/pine-core/svg/enlarge-vertical.svg +0 -1
- package/dist/pine-core/svg/enlarge.svg +0 -1
- package/dist/pine-core/svg/expand.svg +0 -1
- package/dist/pine-core/svg/favorite.svg +0 -1
- package/dist/pine-core/svg/feedback.svg +0 -1
- package/dist/pine-core/svg/file-02.svg +0 -1
- package/dist/pine-core/svg/file-money.svg +0 -1
- package/dist/pine-core/svg/file.svg +0 -1
- package/dist/pine-core/svg/filter.svg +0 -1
- package/dist/pine-core/svg/flag.svg +0 -1
- package/dist/pine-core/svg/flash-filled.svg +0 -1
- package/dist/pine-core/svg/flash.svg +0 -1
- package/dist/pine-core/svg/floppy-disk.svg +0 -1
- package/dist/pine-core/svg/folder-group.svg +0 -1
- package/dist/pine-core/svg/folder.svg +0 -1
- package/dist/pine-core/svg/form-field.svg +0 -1
- package/dist/pine-core/svg/form-filled.svg +0 -1
- package/dist/pine-core/svg/form.svg +0 -1
- package/dist/pine-core/svg/fullscreen.svg +0 -1
- package/dist/pine-core/svg/funnel.svg +0 -1
- package/dist/pine-core/svg/gear-filled.svg +0 -1
- package/dist/pine-core/svg/gear.svg +0 -1
- package/dist/pine-core/svg/grant-offer.svg +0 -1
- package/dist/pine-core/svg/handle-2-vertical.svg +0 -1
- package/dist/pine-core/svg/handle-2.svg +0 -1
- package/dist/pine-core/svg/handle.svg +0 -1
- package/dist/pine-core/svg/hashtag.svg +0 -1
- package/dist/pine-core/svg/hd-video.svg +0 -1
- package/dist/pine-core/svg/heading-1.svg +0 -1
- package/dist/pine-core/svg/heading-2.svg +0 -1
- package/dist/pine-core/svg/heading-3.svg +0 -1
- package/dist/pine-core/svg/heading-4.svg +0 -1
- package/dist/pine-core/svg/heading-5.svg +0 -1
- package/dist/pine-core/svg/heading-6.svg +0 -1
- package/dist/pine-core/svg/heading-large.svg +0 -1
- package/dist/pine-core/svg/heading-small.svg +0 -1
- package/dist/pine-core/svg/headset-tone.svg +0 -1
- package/dist/pine-core/svg/headset.svg +0 -1
- package/dist/pine-core/svg/help-filled.svg +0 -1
- package/dist/pine-core/svg/help.svg +0 -1
- package/dist/pine-core/svg/home-02-tone.svg +0 -1
- package/dist/pine-core/svg/home-alt.svg +0 -1
- package/dist/pine-core/svg/home-filled.svg +0 -1
- package/dist/pine-core/svg/home.svg +0 -1
- package/dist/pine-core/svg/horizontal-line.svg +0 -1
- package/dist/pine-core/svg/image.svg +0 -1
- package/dist/pine-core/svg/info-circle-filled.svg +0 -1
- package/dist/pine-core/svg/info-circle.svg +0 -1
- package/dist/pine-core/svg/ios-battery.svg +0 -1
- package/dist/pine-core/svg/ios-data.svg +0 -1
- package/dist/pine-core/svg/ios-wifi.svg +0 -1
- package/dist/pine-core/svg/italic.svg +0 -1
- package/dist/pine-core/svg/kajabi-filled.svg +0 -1
- package/dist/pine-core/svg/kajabi.svg +0 -1
- package/dist/pine-core/svg/klarna.svg +0 -1
- package/dist/pine-core/svg/lab.svg +0 -1
- package/dist/pine-core/svg/launch.svg +0 -1
- package/dist/pine-core/svg/layout-grid.svg +0 -1
- package/dist/pine-core/svg/layout-list.svg +0 -1
- package/dist/pine-core/svg/left-small.svg +0 -1
- package/dist/pine-core/svg/list-bullet.svg +0 -1
- package/dist/pine-core/svg/list-details.svg +0 -1
- package/dist/pine-core/svg/list-numbers.svg +0 -1
- package/dist/pine-core/svg/location.svg +0 -1
- package/dist/pine-core/svg/lock-alt.svg +0 -1
- package/dist/pine-core/svg/lock.svg +0 -1
- package/dist/pine-core/svg/logo-afterpay.svg +0 -1
- package/dist/pine-core/svg/logo-facebook-round.svg +0 -1
- package/dist/pine-core/svg/logo-facebook.svg +0 -1
- package/dist/pine-core/svg/logo-instagram.svg +0 -1
- package/dist/pine-core/svg/logo-linkedin.svg +0 -1
- package/dist/pine-core/svg/logo-tiktok.svg +0 -1
- package/dist/pine-core/svg/logo-twitter-x.svg +0 -1
- package/dist/pine-core/svg/logo-twitter.svg +0 -1
- package/dist/pine-core/svg/logo-youtube.svg +0 -1
- package/dist/pine-core/svg/loop.svg +0 -1
- package/dist/pine-core/svg/mail-01-tone.svg +0 -1
- package/dist/pine-core/svg/mail-filled.svg +0 -1
- package/dist/pine-core/svg/mail-open.svg +0 -1
- package/dist/pine-core/svg/mail.svg +0 -1
- package/dist/pine-core/svg/map.svg +0 -1
- package/dist/pine-core/svg/mapped.svg +0 -1
- package/dist/pine-core/svg/margin-left.svg +0 -1
- package/dist/pine-core/svg/margin-right.svg +0 -1
- package/dist/pine-core/svg/marker-filled.svg +0 -1
- package/dist/pine-core/svg/marker.svg +0 -1
- package/dist/pine-core/svg/megaphone-filled.svg +0 -1
- package/dist/pine-core/svg/megaphone.svg +0 -1
- package/dist/pine-core/svg/menu-alt.svg +0 -1
- package/dist/pine-core/svg/menu-bordered.svg +0 -1
- package/dist/pine-core/svg/menu.svg +0 -1
- package/dist/pine-core/svg/merge.svg +0 -1
- package/dist/pine-core/svg/microphone-off.svg +0 -1
- package/dist/pine-core/svg/microphone.svg +0 -1
- package/dist/pine-core/svg/monitor-03-tone.svg +0 -1
- package/dist/pine-core/svg/monitor-filled.svg +0 -1
- package/dist/pine-core/svg/monitor.svg +0 -1
- package/dist/pine-core/svg/more-menu-filled.svg +0 -1
- package/dist/pine-core/svg/more-menu.svg +0 -1
- package/dist/pine-core/svg/move-left.svg +0 -1
- package/dist/pine-core/svg/move-right.svg +0 -1
- package/dist/pine-core/svg/multi-pay.svg +0 -1
- package/dist/pine-core/svg/newsletter-2.svg +0 -1
- package/dist/pine-core/svg/newsletter.svg +0 -1
- package/dist/pine-core/svg/one-off-session.svg +0 -1
- package/dist/pine-core/svg/one-time.svg +0 -1
- package/dist/pine-core/svg/packages.svg +0 -1
- package/dist/pine-core/svg/pause-circle.svg +0 -1
- package/dist/pine-core/svg/pause.svg +0 -1
- package/dist/pine-core/svg/payout.svg +0 -1
- package/dist/pine-core/svg/pen.svg +0 -1
- package/dist/pine-core/svg/phone-02-tone.svg +0 -1
- package/dist/pine-core/svg/phone-portrait.svg +0 -1
- package/dist/pine-core/svg/phone-toolbar-filled.svg +0 -1
- package/dist/pine-core/svg/phone-toolbar.svg +0 -1
- package/dist/pine-core/svg/play-circle.svg +0 -1
- package/dist/pine-core/svg/play-outline.svg +0 -1
- package/dist/pine-core/svg/play-store.svg +0 -1
- package/dist/pine-core/svg/play.svg +0 -1
- package/dist/pine-core/svg/plug.svg +0 -1
- package/dist/pine-core/svg/premium.svg +0 -1
- package/dist/pine-core/svg/present.svg +0 -1
- package/dist/pine-core/svg/preview-off.svg +0 -1
- package/dist/pine-core/svg/preview-on.svg +0 -1
- package/dist/pine-core/svg/product-filled.svg +0 -1
- package/dist/pine-core/svg/product.svg +0 -1
- package/dist/pine-core/svg/question-circle.svg +0 -1
- package/dist/pine-core/svg/quote.svg +0 -1
- package/dist/pine-core/svg/redo.svg +0 -1
- package/dist/pine-core/svg/refresh.svg +0 -1
- package/dist/pine-core/svg/remove-circle.svg +0 -1
- package/dist/pine-core/svg/remove.svg +0 -1
- package/dist/pine-core/svg/rename.svg +0 -1
- package/dist/pine-core/svg/reset-password.svg +0 -1
- package/dist/pine-core/svg/restore.svg +0 -1
- package/dist/pine-core/svg/right-small.svg +0 -1
- package/dist/pine-core/svg/rocket-filled.svg +0 -1
- package/dist/pine-core/svg/rocket.svg +0 -1
- package/dist/pine-core/svg/round-dollar.svg +0 -1
- package/dist/pine-core/svg/rows.svg +0 -1
- package/dist/pine-core/svg/scissor.svg +0 -1
- package/dist/pine-core/svg/screen-share-off.svg +0 -1
- package/dist/pine-core/svg/screen-share-on.svg +0 -1
- package/dist/pine-core/svg/search-md-tone.svg +0 -1
- package/dist/pine-core/svg/search-small.svg +0 -1
- package/dist/pine-core/svg/search.svg +0 -1
- package/dist/pine-core/svg/send-message.svg +0 -1
- package/dist/pine-core/svg/sequences.svg +0 -1
- package/dist/pine-core/svg/settings-01-tone.svg +0 -1
- package/dist/pine-core/svg/share.svg +0 -1
- package/dist/pine-core/svg/skipped.svg +0 -1
- package/dist/pine-core/svg/slash-divider.svg +0 -1
- package/dist/pine-core/svg/speaker.svg +0 -1
- package/dist/pine-core/svg/stack.svg +0 -1
- package/dist/pine-core/svg/star.svg +0 -1
- package/dist/pine-core/svg/stars-01-tone.svg +0 -1
- package/dist/pine-core/svg/stop.svg +0 -1
- package/dist/pine-core/svg/stopwatch.svg +0 -1
- package/dist/pine-core/svg/strikethrough.svg +0 -1
- package/dist/pine-core/svg/subscript.svg +0 -1
- package/dist/pine-core/svg/subscriptions.svg +0 -1
- package/dist/pine-core/svg/super-admin.svg +0 -1
- package/dist/pine-core/svg/superscript.svg +0 -1
- package/dist/pine-core/svg/sync.svg +0 -1
- package/dist/pine-core/svg/tablet-landscape.svg +0 -1
- package/dist/pine-core/svg/tablet-portrait.svg +0 -1
- package/dist/pine-core/svg/tag-filled.svg +0 -1
- package/dist/pine-core/svg/tag.svg +0 -1
- package/dist/pine-core/svg/text-styles.svg +0 -1
- package/dist/pine-core/svg/theme-store-filled.svg +0 -1
- package/dist/pine-core/svg/theme-store.svg +0 -1
- package/dist/pine-core/svg/thumb-down-filled.svg +0 -1
- package/dist/pine-core/svg/thumb-down.svg +0 -1
- package/dist/pine-core/svg/thumb-up-filled.svg +0 -1
- package/dist/pine-core/svg/thumb-up.svg +0 -1
- package/dist/pine-core/svg/trash.svg +0 -1
- package/dist/pine-core/svg/trophy-filled.svg +0 -1
- package/dist/pine-core/svg/trophy.svg +0 -1
- package/dist/pine-core/svg/underline.svg +0 -1
- package/dist/pine-core/svg/undo.svg +0 -1
- package/dist/pine-core/svg/unlock.svg +0 -1
- package/dist/pine-core/svg/unmapped.svg +0 -1
- package/dist/pine-core/svg/up-small.svg +0 -1
- package/dist/pine-core/svg/upload.svg +0 -1
- package/dist/pine-core/svg/url.svg +0 -1
- package/dist/pine-core/svg/user-circle-filled.svg +0 -1
- package/dist/pine-core/svg/user-circle.svg +0 -1
- package/dist/pine-core/svg/user-filled.svg +0 -1
- package/dist/pine-core/svg/user-star-filled.svg +0 -1
- package/dist/pine-core/svg/user-star.svg +0 -1
- package/dist/pine-core/svg/user.svg +0 -1
- package/dist/pine-core/svg/users-02-tone.svg +0 -1
- package/dist/pine-core/svg/users-alt.svg +0 -1
- package/dist/pine-core/svg/users-filled.svg +0 -1
- package/dist/pine-core/svg/users.svg +0 -1
- package/dist/pine-core/svg/video-off.svg +0 -1
- package/dist/pine-core/svg/video-on.svg +0 -1
- package/dist/pine-core/svg/warning-filled.svg +0 -1
- package/dist/pine-core/svg/warning.svg +0 -1
- package/dist/pine-core/svg/window-paragraph.svg +0 -1
- package/dist/pine-core/svg/world.svg +0 -1
- package/dist/pine-core/svg/wrench.svg +0 -1
- package/dist/types/stories/_helpers/index.d.ts +0 -12
- package/loader/package.json +0 -11
|
@@ -1,2722 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as n,createEvent as i,h as e,Host as o,transformTag as r}from"@stencil/core/internal/client";
|
|
3
2
|
/**!
|
|
4
|
-
* Sortable 1.15.
|
|
3
|
+
* Sortable 1.15.7
|
|
5
4
|
* @author RubaXa <trash@rubaxa.org>
|
|
6
5
|
* @author owenm <owen23355@gmail.com>
|
|
7
6
|
* @license MIT
|
|
8
|
-
*/
|
|
9
|
-
function ownKeys(object, enumerableOnly) {
|
|
10
|
-
var keys = Object.keys(object);
|
|
11
|
-
if (Object.getOwnPropertySymbols) {
|
|
12
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
13
|
-
if (enumerableOnly) {
|
|
14
|
-
symbols = symbols.filter(function (sym) {
|
|
15
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
keys.push.apply(keys, symbols);
|
|
19
|
-
}
|
|
20
|
-
return keys;
|
|
21
|
-
}
|
|
22
|
-
function _objectSpread2(target) {
|
|
23
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
24
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
25
|
-
if (i % 2) {
|
|
26
|
-
ownKeys(Object(source), true).forEach(function (key) {
|
|
27
|
-
_defineProperty(target, key, source[key]);
|
|
28
|
-
});
|
|
29
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
30
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
31
|
-
} else {
|
|
32
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
33
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return target;
|
|
38
|
-
}
|
|
39
|
-
function _typeof(obj) {
|
|
40
|
-
"@babel/helpers - typeof";
|
|
41
|
-
|
|
42
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
43
|
-
_typeof = function (obj) {
|
|
44
|
-
return typeof obj;
|
|
45
|
-
};
|
|
46
|
-
} else {
|
|
47
|
-
_typeof = function (obj) {
|
|
48
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
return _typeof(obj);
|
|
52
|
-
}
|
|
53
|
-
function _defineProperty(obj, key, value) {
|
|
54
|
-
if (key in obj) {
|
|
55
|
-
Object.defineProperty(obj, key, {
|
|
56
|
-
value: value,
|
|
57
|
-
enumerable: true,
|
|
58
|
-
configurable: true,
|
|
59
|
-
writable: true
|
|
60
|
-
});
|
|
61
|
-
} else {
|
|
62
|
-
obj[key] = value;
|
|
63
|
-
}
|
|
64
|
-
return obj;
|
|
65
|
-
}
|
|
66
|
-
function _extends() {
|
|
67
|
-
_extends = Object.assign || function (target) {
|
|
68
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
69
|
-
var source = arguments[i];
|
|
70
|
-
for (var key in source) {
|
|
71
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
72
|
-
target[key] = source[key];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return target;
|
|
77
|
-
};
|
|
78
|
-
return _extends.apply(this, arguments);
|
|
79
|
-
}
|
|
80
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
81
|
-
if (source == null) return {};
|
|
82
|
-
var target = {};
|
|
83
|
-
var sourceKeys = Object.keys(source);
|
|
84
|
-
var key, i;
|
|
85
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
86
|
-
key = sourceKeys[i];
|
|
87
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
88
|
-
target[key] = source[key];
|
|
89
|
-
}
|
|
90
|
-
return target;
|
|
91
|
-
}
|
|
92
|
-
function _objectWithoutProperties(source, excluded) {
|
|
93
|
-
if (source == null) return {};
|
|
94
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
95
|
-
var key, i;
|
|
96
|
-
if (Object.getOwnPropertySymbols) {
|
|
97
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
98
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
99
|
-
key = sourceSymbolKeys[i];
|
|
100
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
101
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
102
|
-
target[key] = source[key];
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return target;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
var version = "1.15.2";
|
|
109
|
-
|
|
110
|
-
function userAgent(pattern) {
|
|
111
|
-
if (typeof window !== 'undefined' && window.navigator) {
|
|
112
|
-
return !! /*@__PURE__*/navigator.userAgent.match(pattern);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
|
|
116
|
-
var Edge = userAgent(/Edge/i);
|
|
117
|
-
var FireFox = userAgent(/firefox/i);
|
|
118
|
-
var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
|
|
119
|
-
var IOS = userAgent(/iP(ad|od|hone)/i);
|
|
120
|
-
var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
|
|
121
|
-
|
|
122
|
-
var captureMode = {
|
|
123
|
-
capture: false,
|
|
124
|
-
passive: false
|
|
125
|
-
};
|
|
126
|
-
function on(el, event, fn) {
|
|
127
|
-
el.addEventListener(event, fn, !IE11OrLess && captureMode);
|
|
128
|
-
}
|
|
129
|
-
function off(el, event, fn) {
|
|
130
|
-
el.removeEventListener(event, fn, !IE11OrLess && captureMode);
|
|
131
|
-
}
|
|
132
|
-
function matches( /**HTMLElement*/el, /**String*/selector) {
|
|
133
|
-
if (!selector) return;
|
|
134
|
-
selector[0] === '>' && (selector = selector.substring(1));
|
|
135
|
-
if (el) {
|
|
136
|
-
try {
|
|
137
|
-
if (el.matches) {
|
|
138
|
-
return el.matches(selector);
|
|
139
|
-
} else if (el.msMatchesSelector) {
|
|
140
|
-
return el.msMatchesSelector(selector);
|
|
141
|
-
} else if (el.webkitMatchesSelector) {
|
|
142
|
-
return el.webkitMatchesSelector(selector);
|
|
143
|
-
}
|
|
144
|
-
} catch (_) {
|
|
145
|
-
return false;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return false;
|
|
149
|
-
}
|
|
150
|
-
function getParentOrHost(el) {
|
|
151
|
-
return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
|
|
152
|
-
}
|
|
153
|
-
function closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {
|
|
154
|
-
if (el) {
|
|
155
|
-
ctx = ctx || document;
|
|
156
|
-
do {
|
|
157
|
-
if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
|
|
158
|
-
return el;
|
|
159
|
-
}
|
|
160
|
-
if (el === ctx) break;
|
|
161
|
-
/* jshint boss:true */
|
|
162
|
-
} while (el = getParentOrHost(el));
|
|
163
|
-
}
|
|
164
|
-
return null;
|
|
165
|
-
}
|
|
166
|
-
var R_SPACE = /\s+/g;
|
|
167
|
-
function toggleClass(el, name, state) {
|
|
168
|
-
if (el && name) {
|
|
169
|
-
if (el.classList) {
|
|
170
|
-
el.classList[state ? 'add' : 'remove'](name);
|
|
171
|
-
} else {
|
|
172
|
-
var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
|
|
173
|
-
el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
function css(el, prop, val) {
|
|
178
|
-
var style = el && el.style;
|
|
179
|
-
if (style) {
|
|
180
|
-
if (val === void 0) {
|
|
181
|
-
if (document.defaultView && document.defaultView.getComputedStyle) {
|
|
182
|
-
val = document.defaultView.getComputedStyle(el, '');
|
|
183
|
-
} else if (el.currentStyle) {
|
|
184
|
-
val = el.currentStyle;
|
|
185
|
-
}
|
|
186
|
-
return prop === void 0 ? val : val[prop];
|
|
187
|
-
} else {
|
|
188
|
-
if (!(prop in style) && prop.indexOf('webkit') === -1) {
|
|
189
|
-
prop = '-webkit-' + prop;
|
|
190
|
-
}
|
|
191
|
-
style[prop] = val + (typeof val === 'string' ? '' : 'px');
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
function matrix(el, selfOnly) {
|
|
196
|
-
var appliedTransforms = '';
|
|
197
|
-
if (typeof el === 'string') {
|
|
198
|
-
appliedTransforms = el;
|
|
199
|
-
} else {
|
|
200
|
-
do {
|
|
201
|
-
var transform = css(el, 'transform');
|
|
202
|
-
if (transform && transform !== 'none') {
|
|
203
|
-
appliedTransforms = transform + ' ' + appliedTransforms;
|
|
204
|
-
}
|
|
205
|
-
/* jshint boss:true */
|
|
206
|
-
} while (!selfOnly && (el = el.parentNode));
|
|
207
|
-
}
|
|
208
|
-
var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
209
|
-
/*jshint -W056 */
|
|
210
|
-
return matrixFn && new matrixFn(appliedTransforms);
|
|
211
|
-
}
|
|
212
|
-
function find(ctx, tagName, iterator) {
|
|
213
|
-
if (ctx) {
|
|
214
|
-
var list = ctx.getElementsByTagName(tagName),
|
|
215
|
-
i = 0,
|
|
216
|
-
n = list.length;
|
|
217
|
-
if (iterator) {
|
|
218
|
-
for (; i < n; i++) {
|
|
219
|
-
iterator(list[i], i);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return list;
|
|
223
|
-
}
|
|
224
|
-
return [];
|
|
225
|
-
}
|
|
226
|
-
function getWindowScrollingElement() {
|
|
227
|
-
var scrollingElement = document.scrollingElement;
|
|
228
|
-
if (scrollingElement) {
|
|
229
|
-
return scrollingElement;
|
|
230
|
-
} else {
|
|
231
|
-
return document.documentElement;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Returns the "bounding client rect" of given element
|
|
237
|
-
* @param {HTMLElement} el The element whose boundingClientRect is wanted
|
|
238
|
-
* @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
|
|
239
|
-
* @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
|
|
240
|
-
* @param {[Boolean]} undoScale Whether the container's scale() should be undone
|
|
241
|
-
* @param {[HTMLElement]} container The parent the element will be placed in
|
|
242
|
-
* @return {Object} The boundingClientRect of el, with specified adjustments
|
|
243
|
-
*/
|
|
244
|
-
function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
|
|
245
|
-
if (!el.getBoundingClientRect && el !== window) return;
|
|
246
|
-
var elRect, top, left, bottom, right, height, width;
|
|
247
|
-
if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
|
|
248
|
-
elRect = el.getBoundingClientRect();
|
|
249
|
-
top = elRect.top;
|
|
250
|
-
left = elRect.left;
|
|
251
|
-
bottom = elRect.bottom;
|
|
252
|
-
right = elRect.right;
|
|
253
|
-
height = elRect.height;
|
|
254
|
-
width = elRect.width;
|
|
255
|
-
} else {
|
|
256
|
-
top = 0;
|
|
257
|
-
left = 0;
|
|
258
|
-
bottom = window.innerHeight;
|
|
259
|
-
right = window.innerWidth;
|
|
260
|
-
height = window.innerHeight;
|
|
261
|
-
width = window.innerWidth;
|
|
262
|
-
}
|
|
263
|
-
if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
|
|
264
|
-
// Adjust for translate()
|
|
265
|
-
container = container || el.parentNode;
|
|
266
|
-
|
|
267
|
-
// solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
|
|
268
|
-
// Not needed on <= IE11
|
|
269
|
-
if (!IE11OrLess) {
|
|
270
|
-
do {
|
|
271
|
-
if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
|
|
272
|
-
var containerRect = container.getBoundingClientRect();
|
|
273
|
-
|
|
274
|
-
// Set relative to edges of padding box of container
|
|
275
|
-
top -= containerRect.top + parseInt(css(container, 'border-top-width'));
|
|
276
|
-
left -= containerRect.left + parseInt(css(container, 'border-left-width'));
|
|
277
|
-
bottom = top + elRect.height;
|
|
278
|
-
right = left + elRect.width;
|
|
279
|
-
break;
|
|
280
|
-
}
|
|
281
|
-
/* jshint boss:true */
|
|
282
|
-
} while (container = container.parentNode);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
if (undoScale && el !== window) {
|
|
286
|
-
// Adjust for scale()
|
|
287
|
-
var elMatrix = matrix(container || el),
|
|
288
|
-
scaleX = elMatrix && elMatrix.a,
|
|
289
|
-
scaleY = elMatrix && elMatrix.d;
|
|
290
|
-
if (elMatrix) {
|
|
291
|
-
top /= scaleY;
|
|
292
|
-
left /= scaleX;
|
|
293
|
-
width /= scaleX;
|
|
294
|
-
height /= scaleY;
|
|
295
|
-
bottom = top + height;
|
|
296
|
-
right = left + width;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
return {
|
|
300
|
-
top: top,
|
|
301
|
-
left: left,
|
|
302
|
-
bottom: bottom,
|
|
303
|
-
right: right,
|
|
304
|
-
width: width,
|
|
305
|
-
height: height
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Checks if a side of an element is scrolled past a side of its parents
|
|
311
|
-
* @param {HTMLElement} el The element who's side being scrolled out of view is in question
|
|
312
|
-
* @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
|
|
313
|
-
* @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
|
|
314
|
-
* @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
|
|
315
|
-
*/
|
|
316
|
-
function isScrolledPast(el, elSide, parentSide) {
|
|
317
|
-
var parent = getParentAutoScrollElement(el, true),
|
|
318
|
-
elSideVal = getRect(el)[elSide];
|
|
319
|
-
|
|
320
|
-
/* jshint boss:true */
|
|
321
|
-
while (parent) {
|
|
322
|
-
var parentSideVal = getRect(parent)[parentSide],
|
|
323
|
-
visible = void 0;
|
|
324
|
-
if (parentSide === 'top' || parentSide === 'left') {
|
|
325
|
-
visible = elSideVal >= parentSideVal;
|
|
326
|
-
} else {
|
|
327
|
-
visible = elSideVal <= parentSideVal;
|
|
328
|
-
}
|
|
329
|
-
if (!visible) return parent;
|
|
330
|
-
if (parent === getWindowScrollingElement()) break;
|
|
331
|
-
parent = getParentAutoScrollElement(parent, false);
|
|
332
|
-
}
|
|
333
|
-
return false;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
|
|
338
|
-
* and non-draggable elements
|
|
339
|
-
* @param {HTMLElement} el The parent element
|
|
340
|
-
* @param {Number} childNum The index of the child
|
|
341
|
-
* @param {Object} options Parent Sortable's options
|
|
342
|
-
* @return {HTMLElement} The child at index childNum, or null if not found
|
|
343
|
-
*/
|
|
344
|
-
function getChild(el, childNum, options, includeDragEl) {
|
|
345
|
-
var currentChild = 0,
|
|
346
|
-
i = 0,
|
|
347
|
-
children = el.children;
|
|
348
|
-
while (i < children.length) {
|
|
349
|
-
if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
|
|
350
|
-
if (currentChild === childNum) {
|
|
351
|
-
return children[i];
|
|
352
|
-
}
|
|
353
|
-
currentChild++;
|
|
354
|
-
}
|
|
355
|
-
i++;
|
|
356
|
-
}
|
|
357
|
-
return null;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
|
|
362
|
-
* @param {HTMLElement} el Parent element
|
|
363
|
-
* @param {selector} selector Any other elements that should be ignored
|
|
364
|
-
* @return {HTMLElement} The last child, ignoring ghostEl
|
|
365
|
-
*/
|
|
366
|
-
function lastChild(el, selector) {
|
|
367
|
-
var last = el.lastElementChild;
|
|
368
|
-
while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
|
|
369
|
-
last = last.previousElementSibling;
|
|
370
|
-
}
|
|
371
|
-
return last || null;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Returns the index of an element within its parent for a selected set of
|
|
376
|
-
* elements
|
|
377
|
-
* @param {HTMLElement} el
|
|
378
|
-
* @param {selector} selector
|
|
379
|
-
* @return {number}
|
|
380
|
-
*/
|
|
381
|
-
function index(el, selector) {
|
|
382
|
-
var index = 0;
|
|
383
|
-
if (!el || !el.parentNode) {
|
|
384
|
-
return -1;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
/* jshint boss:true */
|
|
388
|
-
while (el = el.previousElementSibling) {
|
|
389
|
-
if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
|
|
390
|
-
index++;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
return index;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
|
|
398
|
-
* The value is returned in real pixels.
|
|
399
|
-
* @param {HTMLElement} el
|
|
400
|
-
* @return {Array} Offsets in the format of [left, top]
|
|
401
|
-
*/
|
|
402
|
-
function getRelativeScrollOffset(el) {
|
|
403
|
-
var offsetLeft = 0,
|
|
404
|
-
offsetTop = 0,
|
|
405
|
-
winScroller = getWindowScrollingElement();
|
|
406
|
-
if (el) {
|
|
407
|
-
do {
|
|
408
|
-
var elMatrix = matrix(el),
|
|
409
|
-
scaleX = elMatrix.a,
|
|
410
|
-
scaleY = elMatrix.d;
|
|
411
|
-
offsetLeft += el.scrollLeft * scaleX;
|
|
412
|
-
offsetTop += el.scrollTop * scaleY;
|
|
413
|
-
} while (el !== winScroller && (el = el.parentNode));
|
|
414
|
-
}
|
|
415
|
-
return [offsetLeft, offsetTop];
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* Returns the index of the object within the given array
|
|
420
|
-
* @param {Array} arr Array that may or may not hold the object
|
|
421
|
-
* @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
|
|
422
|
-
* @return {Number} The index of the object in the array, or -1
|
|
423
|
-
*/
|
|
424
|
-
function indexOfObject(arr, obj) {
|
|
425
|
-
for (var i in arr) {
|
|
426
|
-
if (!arr.hasOwnProperty(i)) continue;
|
|
427
|
-
for (var key in obj) {
|
|
428
|
-
if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
return -1;
|
|
432
|
-
}
|
|
433
|
-
function getParentAutoScrollElement(el, includeSelf) {
|
|
434
|
-
// skip to window
|
|
435
|
-
if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
|
|
436
|
-
var elem = el;
|
|
437
|
-
var gotSelf = false;
|
|
438
|
-
do {
|
|
439
|
-
// we don't need to get elem css if it isn't even overflowing in the first place (performance)
|
|
440
|
-
if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
|
|
441
|
-
var elemCSS = css(elem);
|
|
442
|
-
if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
|
|
443
|
-
if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
|
|
444
|
-
if (gotSelf || includeSelf) return elem;
|
|
445
|
-
gotSelf = true;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
/* jshint boss:true */
|
|
449
|
-
} while (elem = elem.parentNode);
|
|
450
|
-
return getWindowScrollingElement();
|
|
451
|
-
}
|
|
452
|
-
function extend(dst, src) {
|
|
453
|
-
if (dst && src) {
|
|
454
|
-
for (var key in src) {
|
|
455
|
-
if (src.hasOwnProperty(key)) {
|
|
456
|
-
dst[key] = src[key];
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
return dst;
|
|
461
|
-
}
|
|
462
|
-
function isRectEqual(rect1, rect2) {
|
|
463
|
-
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);
|
|
464
|
-
}
|
|
465
|
-
var _throttleTimeout;
|
|
466
|
-
function throttle(callback, ms) {
|
|
467
|
-
return function () {
|
|
468
|
-
if (!_throttleTimeout) {
|
|
469
|
-
var args = arguments,
|
|
470
|
-
_this = this;
|
|
471
|
-
if (args.length === 1) {
|
|
472
|
-
callback.call(_this, args[0]);
|
|
473
|
-
} else {
|
|
474
|
-
callback.apply(_this, args);
|
|
475
|
-
}
|
|
476
|
-
_throttleTimeout = setTimeout(function () {
|
|
477
|
-
_throttleTimeout = void 0;
|
|
478
|
-
}, ms);
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
function cancelThrottle() {
|
|
483
|
-
clearTimeout(_throttleTimeout);
|
|
484
|
-
_throttleTimeout = void 0;
|
|
485
|
-
}
|
|
486
|
-
function scrollBy(el, x, y) {
|
|
487
|
-
el.scrollLeft += x;
|
|
488
|
-
el.scrollTop += y;
|
|
489
|
-
}
|
|
490
|
-
function clone(el) {
|
|
491
|
-
var Polymer = window.Polymer;
|
|
492
|
-
var $ = window.jQuery || window.Zepto;
|
|
493
|
-
if (Polymer && Polymer.dom) {
|
|
494
|
-
return Polymer.dom(el).cloneNode(true);
|
|
495
|
-
} else if ($) {
|
|
496
|
-
return $(el).clone(true)[0];
|
|
497
|
-
} else {
|
|
498
|
-
return el.cloneNode(true);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
function getChildContainingRectFromElement(container, options, ghostEl) {
|
|
502
|
-
var rect = {};
|
|
503
|
-
Array.from(container.children).forEach(function (child) {
|
|
504
|
-
var _rect$left, _rect$top, _rect$right, _rect$bottom;
|
|
505
|
-
if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;
|
|
506
|
-
var childRect = getRect(child);
|
|
507
|
-
rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);
|
|
508
|
-
rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);
|
|
509
|
-
rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);
|
|
510
|
-
rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);
|
|
511
|
-
});
|
|
512
|
-
rect.width = rect.right - rect.left;
|
|
513
|
-
rect.height = rect.bottom - rect.top;
|
|
514
|
-
rect.x = rect.left;
|
|
515
|
-
rect.y = rect.top;
|
|
516
|
-
return rect;
|
|
517
|
-
}
|
|
518
|
-
var expando = 'Sortable' + new Date().getTime();
|
|
519
|
-
|
|
520
|
-
function AnimationStateManager() {
|
|
521
|
-
var animationStates = [],
|
|
522
|
-
animationCallbackId;
|
|
523
|
-
return {
|
|
524
|
-
captureAnimationState: function captureAnimationState() {
|
|
525
|
-
animationStates = [];
|
|
526
|
-
if (!this.options.animation) return;
|
|
527
|
-
var children = [].slice.call(this.el.children);
|
|
528
|
-
children.forEach(function (child) {
|
|
529
|
-
if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
|
|
530
|
-
animationStates.push({
|
|
531
|
-
target: child,
|
|
532
|
-
rect: getRect(child)
|
|
533
|
-
});
|
|
534
|
-
var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);
|
|
535
|
-
|
|
536
|
-
// If animating: compensate for current animation
|
|
537
|
-
if (child.thisAnimationDuration) {
|
|
538
|
-
var childMatrix = matrix(child, true);
|
|
539
|
-
if (childMatrix) {
|
|
540
|
-
fromRect.top -= childMatrix.f;
|
|
541
|
-
fromRect.left -= childMatrix.e;
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
child.fromRect = fromRect;
|
|
545
|
-
});
|
|
546
|
-
},
|
|
547
|
-
addAnimationState: function addAnimationState(state) {
|
|
548
|
-
animationStates.push(state);
|
|
549
|
-
},
|
|
550
|
-
removeAnimationState: function removeAnimationState(target) {
|
|
551
|
-
animationStates.splice(indexOfObject(animationStates, {
|
|
552
|
-
target: target
|
|
553
|
-
}), 1);
|
|
554
|
-
},
|
|
555
|
-
animateAll: function animateAll(callback) {
|
|
556
|
-
var _this = this;
|
|
557
|
-
if (!this.options.animation) {
|
|
558
|
-
clearTimeout(animationCallbackId);
|
|
559
|
-
if (typeof callback === 'function') callback();
|
|
560
|
-
return;
|
|
561
|
-
}
|
|
562
|
-
var animating = false,
|
|
563
|
-
animationTime = 0;
|
|
564
|
-
animationStates.forEach(function (state) {
|
|
565
|
-
var time = 0,
|
|
566
|
-
target = state.target,
|
|
567
|
-
fromRect = target.fromRect,
|
|
568
|
-
toRect = getRect(target),
|
|
569
|
-
prevFromRect = target.prevFromRect,
|
|
570
|
-
prevToRect = target.prevToRect,
|
|
571
|
-
animatingRect = state.rect,
|
|
572
|
-
targetMatrix = matrix(target, true);
|
|
573
|
-
if (targetMatrix) {
|
|
574
|
-
// Compensate for current animation
|
|
575
|
-
toRect.top -= targetMatrix.f;
|
|
576
|
-
toRect.left -= targetMatrix.e;
|
|
577
|
-
}
|
|
578
|
-
target.toRect = toRect;
|
|
579
|
-
if (target.thisAnimationDuration) {
|
|
580
|
-
// Could also check if animatingRect is between fromRect and toRect
|
|
581
|
-
if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&
|
|
582
|
-
// Make sure animatingRect is on line between toRect & fromRect
|
|
583
|
-
(animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
|
|
584
|
-
// If returning to same place as started from animation and on same axis
|
|
585
|
-
time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
// if fromRect != toRect: animate
|
|
590
|
-
if (!isRectEqual(toRect, fromRect)) {
|
|
591
|
-
target.prevFromRect = fromRect;
|
|
592
|
-
target.prevToRect = toRect;
|
|
593
|
-
if (!time) {
|
|
594
|
-
time = _this.options.animation;
|
|
595
|
-
}
|
|
596
|
-
_this.animate(target, animatingRect, toRect, time);
|
|
597
|
-
}
|
|
598
|
-
if (time) {
|
|
599
|
-
animating = true;
|
|
600
|
-
animationTime = Math.max(animationTime, time);
|
|
601
|
-
clearTimeout(target.animationResetTimer);
|
|
602
|
-
target.animationResetTimer = setTimeout(function () {
|
|
603
|
-
target.animationTime = 0;
|
|
604
|
-
target.prevFromRect = null;
|
|
605
|
-
target.fromRect = null;
|
|
606
|
-
target.prevToRect = null;
|
|
607
|
-
target.thisAnimationDuration = null;
|
|
608
|
-
}, time);
|
|
609
|
-
target.thisAnimationDuration = time;
|
|
610
|
-
}
|
|
611
|
-
});
|
|
612
|
-
clearTimeout(animationCallbackId);
|
|
613
|
-
if (!animating) {
|
|
614
|
-
if (typeof callback === 'function') callback();
|
|
615
|
-
} else {
|
|
616
|
-
animationCallbackId = setTimeout(function () {
|
|
617
|
-
if (typeof callback === 'function') callback();
|
|
618
|
-
}, animationTime);
|
|
619
|
-
}
|
|
620
|
-
animationStates = [];
|
|
621
|
-
},
|
|
622
|
-
animate: function animate(target, currentRect, toRect, duration) {
|
|
623
|
-
if (duration) {
|
|
624
|
-
css(target, 'transition', '');
|
|
625
|
-
css(target, 'transform', '');
|
|
626
|
-
var elMatrix = matrix(this.el),
|
|
627
|
-
scaleX = elMatrix && elMatrix.a,
|
|
628
|
-
scaleY = elMatrix && elMatrix.d,
|
|
629
|
-
translateX = (currentRect.left - toRect.left) / (scaleX || 1),
|
|
630
|
-
translateY = (currentRect.top - toRect.top) / (scaleY || 1);
|
|
631
|
-
target.animatingX = !!translateX;
|
|
632
|
-
target.animatingY = !!translateY;
|
|
633
|
-
css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
|
|
634
|
-
this.forRepaintDummy = repaint(target); // repaint
|
|
635
|
-
|
|
636
|
-
css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
|
|
637
|
-
css(target, 'transform', 'translate3d(0,0,0)');
|
|
638
|
-
typeof target.animated === 'number' && clearTimeout(target.animated);
|
|
639
|
-
target.animated = setTimeout(function () {
|
|
640
|
-
css(target, 'transition', '');
|
|
641
|
-
css(target, 'transform', '');
|
|
642
|
-
target.animated = false;
|
|
643
|
-
target.animatingX = false;
|
|
644
|
-
target.animatingY = false;
|
|
645
|
-
}, duration);
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
};
|
|
649
|
-
}
|
|
650
|
-
function repaint(target) {
|
|
651
|
-
return target.offsetWidth;
|
|
652
|
-
}
|
|
653
|
-
function calculateRealTime(animatingRect, fromRect, toRect, options) {
|
|
654
|
-
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;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
var plugins = [];
|
|
658
|
-
var defaults = {
|
|
659
|
-
initializeByDefault: true
|
|
660
|
-
};
|
|
661
|
-
var PluginManager = {
|
|
662
|
-
mount: function mount(plugin) {
|
|
663
|
-
// Set default static properties
|
|
664
|
-
for (var option in defaults) {
|
|
665
|
-
if (defaults.hasOwnProperty(option) && !(option in plugin)) {
|
|
666
|
-
plugin[option] = defaults[option];
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
plugins.forEach(function (p) {
|
|
670
|
-
if (p.pluginName === plugin.pluginName) {
|
|
671
|
-
throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
|
|
672
|
-
}
|
|
673
|
-
});
|
|
674
|
-
plugins.push(plugin);
|
|
675
|
-
},
|
|
676
|
-
pluginEvent: function pluginEvent(eventName, sortable, evt) {
|
|
677
|
-
var _this = this;
|
|
678
|
-
this.eventCanceled = false;
|
|
679
|
-
evt.cancel = function () {
|
|
680
|
-
_this.eventCanceled = true;
|
|
681
|
-
};
|
|
682
|
-
var eventNameGlobal = eventName + 'Global';
|
|
683
|
-
plugins.forEach(function (plugin) {
|
|
684
|
-
if (!sortable[plugin.pluginName]) return;
|
|
685
|
-
// Fire global events if it exists in this sortable
|
|
686
|
-
if (sortable[plugin.pluginName][eventNameGlobal]) {
|
|
687
|
-
sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
|
|
688
|
-
sortable: sortable
|
|
689
|
-
}, evt));
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
// Only fire plugin event if plugin is enabled in this sortable,
|
|
693
|
-
// and plugin has event defined
|
|
694
|
-
if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
|
|
695
|
-
sortable[plugin.pluginName][eventName](_objectSpread2({
|
|
696
|
-
sortable: sortable
|
|
697
|
-
}, evt));
|
|
698
|
-
}
|
|
699
|
-
});
|
|
700
|
-
},
|
|
701
|
-
initializePlugins: function initializePlugins(sortable, el, defaults, options) {
|
|
702
|
-
plugins.forEach(function (plugin) {
|
|
703
|
-
var pluginName = plugin.pluginName;
|
|
704
|
-
if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
|
|
705
|
-
var initialized = new plugin(sortable, el, sortable.options);
|
|
706
|
-
initialized.sortable = sortable;
|
|
707
|
-
initialized.options = sortable.options;
|
|
708
|
-
sortable[pluginName] = initialized;
|
|
709
|
-
|
|
710
|
-
// Add default options from plugin
|
|
711
|
-
_extends(defaults, initialized.defaults);
|
|
712
|
-
});
|
|
713
|
-
for (var option in sortable.options) {
|
|
714
|
-
if (!sortable.options.hasOwnProperty(option)) continue;
|
|
715
|
-
var modified = this.modifyOption(sortable, option, sortable.options[option]);
|
|
716
|
-
if (typeof modified !== 'undefined') {
|
|
717
|
-
sortable.options[option] = modified;
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
},
|
|
721
|
-
getEventProperties: function getEventProperties(name, sortable) {
|
|
722
|
-
var eventProperties = {};
|
|
723
|
-
plugins.forEach(function (plugin) {
|
|
724
|
-
if (typeof plugin.eventProperties !== 'function') return;
|
|
725
|
-
_extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
|
|
726
|
-
});
|
|
727
|
-
return eventProperties;
|
|
728
|
-
},
|
|
729
|
-
modifyOption: function modifyOption(sortable, name, value) {
|
|
730
|
-
var modifiedValue;
|
|
731
|
-
plugins.forEach(function (plugin) {
|
|
732
|
-
// Plugin must exist on the Sortable
|
|
733
|
-
if (!sortable[plugin.pluginName]) return;
|
|
734
|
-
|
|
735
|
-
// If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
|
|
736
|
-
if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
|
|
737
|
-
modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
|
|
738
|
-
}
|
|
739
|
-
});
|
|
740
|
-
return modifiedValue;
|
|
741
|
-
}
|
|
742
|
-
};
|
|
743
|
-
|
|
744
|
-
function dispatchEvent(_ref) {
|
|
745
|
-
var sortable = _ref.sortable,
|
|
746
|
-
rootEl = _ref.rootEl,
|
|
747
|
-
name = _ref.name,
|
|
748
|
-
targetEl = _ref.targetEl,
|
|
749
|
-
cloneEl = _ref.cloneEl,
|
|
750
|
-
toEl = _ref.toEl,
|
|
751
|
-
fromEl = _ref.fromEl,
|
|
752
|
-
oldIndex = _ref.oldIndex,
|
|
753
|
-
newIndex = _ref.newIndex,
|
|
754
|
-
oldDraggableIndex = _ref.oldDraggableIndex,
|
|
755
|
-
newDraggableIndex = _ref.newDraggableIndex,
|
|
756
|
-
originalEvent = _ref.originalEvent,
|
|
757
|
-
putSortable = _ref.putSortable,
|
|
758
|
-
extraEventProperties = _ref.extraEventProperties;
|
|
759
|
-
sortable = sortable || rootEl && rootEl[expando];
|
|
760
|
-
if (!sortable) return;
|
|
761
|
-
var evt,
|
|
762
|
-
options = sortable.options,
|
|
763
|
-
onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);
|
|
764
|
-
// Support for new CustomEvent feature
|
|
765
|
-
if (window.CustomEvent && !IE11OrLess && !Edge) {
|
|
766
|
-
evt = new CustomEvent(name, {
|
|
767
|
-
bubbles: true,
|
|
768
|
-
cancelable: true
|
|
769
|
-
});
|
|
770
|
-
} else {
|
|
771
|
-
evt = document.createEvent('Event');
|
|
772
|
-
evt.initEvent(name, true, true);
|
|
773
|
-
}
|
|
774
|
-
evt.to = toEl || rootEl;
|
|
775
|
-
evt.from = fromEl || rootEl;
|
|
776
|
-
evt.item = targetEl || rootEl;
|
|
777
|
-
evt.clone = cloneEl;
|
|
778
|
-
evt.oldIndex = oldIndex;
|
|
779
|
-
evt.newIndex = newIndex;
|
|
780
|
-
evt.oldDraggableIndex = oldDraggableIndex;
|
|
781
|
-
evt.newDraggableIndex = newDraggableIndex;
|
|
782
|
-
evt.originalEvent = originalEvent;
|
|
783
|
-
evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
|
|
784
|
-
var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
|
|
785
|
-
for (var option in allEventProperties) {
|
|
786
|
-
evt[option] = allEventProperties[option];
|
|
787
|
-
}
|
|
788
|
-
if (rootEl) {
|
|
789
|
-
rootEl.dispatchEvent(evt);
|
|
790
|
-
}
|
|
791
|
-
if (options[onName]) {
|
|
792
|
-
options[onName].call(sortable, evt);
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
var _excluded = ["evt"];
|
|
797
|
-
var pluginEvent = function pluginEvent(eventName, sortable) {
|
|
798
|
-
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
799
|
-
originalEvent = _ref.evt,
|
|
800
|
-
data = _objectWithoutProperties(_ref, _excluded);
|
|
801
|
-
PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
|
|
802
|
-
dragEl: dragEl,
|
|
803
|
-
parentEl: parentEl,
|
|
804
|
-
ghostEl: ghostEl,
|
|
805
|
-
rootEl: rootEl,
|
|
806
|
-
nextEl: nextEl,
|
|
807
|
-
lastDownEl: lastDownEl,
|
|
808
|
-
cloneEl: cloneEl,
|
|
809
|
-
cloneHidden: cloneHidden,
|
|
810
|
-
dragStarted: moved,
|
|
811
|
-
putSortable: putSortable,
|
|
812
|
-
activeSortable: Sortable.active,
|
|
813
|
-
originalEvent: originalEvent,
|
|
814
|
-
oldIndex: oldIndex,
|
|
815
|
-
oldDraggableIndex: oldDraggableIndex,
|
|
816
|
-
newIndex: newIndex,
|
|
817
|
-
newDraggableIndex: newDraggableIndex,
|
|
818
|
-
hideGhostForTarget: _hideGhostForTarget,
|
|
819
|
-
unhideGhostForTarget: _unhideGhostForTarget,
|
|
820
|
-
cloneNowHidden: function cloneNowHidden() {
|
|
821
|
-
cloneHidden = true;
|
|
822
|
-
},
|
|
823
|
-
cloneNowShown: function cloneNowShown() {
|
|
824
|
-
cloneHidden = false;
|
|
825
|
-
},
|
|
826
|
-
dispatchSortableEvent: function dispatchSortableEvent(name) {
|
|
827
|
-
_dispatchEvent({
|
|
828
|
-
sortable: sortable,
|
|
829
|
-
name: name,
|
|
830
|
-
originalEvent: originalEvent
|
|
831
|
-
});
|
|
832
|
-
}
|
|
833
|
-
}, data));
|
|
834
|
-
};
|
|
835
|
-
function _dispatchEvent(info) {
|
|
836
|
-
dispatchEvent(_objectSpread2({
|
|
837
|
-
putSortable: putSortable,
|
|
838
|
-
cloneEl: cloneEl,
|
|
839
|
-
targetEl: dragEl,
|
|
840
|
-
rootEl: rootEl,
|
|
841
|
-
oldIndex: oldIndex,
|
|
842
|
-
oldDraggableIndex: oldDraggableIndex,
|
|
843
|
-
newIndex: newIndex,
|
|
844
|
-
newDraggableIndex: newDraggableIndex
|
|
845
|
-
}, info));
|
|
846
|
-
}
|
|
847
|
-
var dragEl,
|
|
848
|
-
parentEl,
|
|
849
|
-
ghostEl,
|
|
850
|
-
rootEl,
|
|
851
|
-
nextEl,
|
|
852
|
-
lastDownEl,
|
|
853
|
-
cloneEl,
|
|
854
|
-
cloneHidden,
|
|
855
|
-
oldIndex,
|
|
856
|
-
newIndex,
|
|
857
|
-
oldDraggableIndex,
|
|
858
|
-
newDraggableIndex,
|
|
859
|
-
activeGroup,
|
|
860
|
-
putSortable,
|
|
861
|
-
awaitingDragStarted = false,
|
|
862
|
-
ignoreNextClick = false,
|
|
863
|
-
sortables = [],
|
|
864
|
-
tapEvt,
|
|
865
|
-
touchEvt,
|
|
866
|
-
lastDx,
|
|
867
|
-
lastDy,
|
|
868
|
-
tapDistanceLeft,
|
|
869
|
-
tapDistanceTop,
|
|
870
|
-
moved,
|
|
871
|
-
lastTarget,
|
|
872
|
-
lastDirection,
|
|
873
|
-
pastFirstInvertThresh = false,
|
|
874
|
-
isCircumstantialInvert = false,
|
|
875
|
-
targetMoveDistance,
|
|
876
|
-
// For positioning ghost absolutely
|
|
877
|
-
ghostRelativeParent,
|
|
878
|
-
ghostRelativeParentInitialScroll = [],
|
|
879
|
-
// (left, top)
|
|
880
|
-
|
|
881
|
-
_silent = false,
|
|
882
|
-
savedInputChecked = [];
|
|
883
|
-
|
|
884
|
-
/** @const */
|
|
885
|
-
var documentExists = typeof document !== 'undefined',
|
|
886
|
-
PositionGhostAbsolutely = IOS,
|
|
887
|
-
CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
|
|
888
|
-
// This will not pass for IE9, because IE9 DnD only works on anchors
|
|
889
|
-
supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
|
|
890
|
-
supportCssPointerEvents = function () {
|
|
891
|
-
if (!documentExists) return;
|
|
892
|
-
// false when <= IE11
|
|
893
|
-
if (IE11OrLess) {
|
|
894
|
-
return false;
|
|
895
|
-
}
|
|
896
|
-
var el = document.createElement('x');
|
|
897
|
-
el.style.cssText = 'pointer-events:auto';
|
|
898
|
-
return el.style.pointerEvents === 'auto';
|
|
899
|
-
}(),
|
|
900
|
-
_detectDirection = function _detectDirection(el, options) {
|
|
901
|
-
var elCSS = css(el),
|
|
902
|
-
elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
|
|
903
|
-
child1 = getChild(el, 0, options),
|
|
904
|
-
child2 = getChild(el, 1, options),
|
|
905
|
-
firstChildCSS = child1 && css(child1),
|
|
906
|
-
secondChildCSS = child2 && css(child2),
|
|
907
|
-
firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
|
|
908
|
-
secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
|
|
909
|
-
if (elCSS.display === 'flex') {
|
|
910
|
-
return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
|
|
911
|
-
}
|
|
912
|
-
if (elCSS.display === 'grid') {
|
|
913
|
-
return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
|
|
914
|
-
}
|
|
915
|
-
if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
|
|
916
|
-
var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
|
|
917
|
-
return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
|
|
918
|
-
}
|
|
919
|
-
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';
|
|
920
|
-
},
|
|
921
|
-
_dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
|
|
922
|
-
var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
|
|
923
|
-
dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
|
|
924
|
-
dragElOppLength = vertical ? dragRect.width : dragRect.height,
|
|
925
|
-
targetS1Opp = vertical ? targetRect.left : targetRect.top,
|
|
926
|
-
targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
|
|
927
|
-
targetOppLength = vertical ? targetRect.width : targetRect.height;
|
|
928
|
-
return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
|
|
929
|
-
},
|
|
930
|
-
/**
|
|
931
|
-
* Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
|
|
932
|
-
* @param {Number} x X position
|
|
933
|
-
* @param {Number} y Y position
|
|
934
|
-
* @return {HTMLElement} Element of the first found nearest Sortable
|
|
935
|
-
*/
|
|
936
|
-
_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
|
|
937
|
-
var ret;
|
|
938
|
-
sortables.some(function (sortable) {
|
|
939
|
-
var threshold = sortable[expando].options.emptyInsertThreshold;
|
|
940
|
-
if (!threshold || lastChild(sortable)) return;
|
|
941
|
-
var rect = getRect(sortable),
|
|
942
|
-
insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
|
|
943
|
-
insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
|
|
944
|
-
if (insideHorizontally && insideVertically) {
|
|
945
|
-
return ret = sortable;
|
|
946
|
-
}
|
|
947
|
-
});
|
|
948
|
-
return ret;
|
|
949
|
-
},
|
|
950
|
-
_prepareGroup = function _prepareGroup(options) {
|
|
951
|
-
function toFn(value, pull) {
|
|
952
|
-
return function (to, from, dragEl, evt) {
|
|
953
|
-
var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
|
|
954
|
-
if (value == null && (pull || sameGroup)) {
|
|
955
|
-
// Default pull value
|
|
956
|
-
// Default pull and put value if same group
|
|
957
|
-
return true;
|
|
958
|
-
} else if (value == null || value === false) {
|
|
959
|
-
return false;
|
|
960
|
-
} else if (pull && value === 'clone') {
|
|
961
|
-
return value;
|
|
962
|
-
} else if (typeof value === 'function') {
|
|
963
|
-
return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
|
|
964
|
-
} else {
|
|
965
|
-
var otherGroup = (pull ? to : from).options.group.name;
|
|
966
|
-
return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
|
|
967
|
-
}
|
|
968
|
-
};
|
|
969
|
-
}
|
|
970
|
-
var group = {};
|
|
971
|
-
var originalGroup = options.group;
|
|
972
|
-
if (!originalGroup || _typeof(originalGroup) != 'object') {
|
|
973
|
-
originalGroup = {
|
|
974
|
-
name: originalGroup
|
|
975
|
-
};
|
|
976
|
-
}
|
|
977
|
-
group.name = originalGroup.name;
|
|
978
|
-
group.checkPull = toFn(originalGroup.pull, true);
|
|
979
|
-
group.checkPut = toFn(originalGroup.put);
|
|
980
|
-
group.revertClone = originalGroup.revertClone;
|
|
981
|
-
options.group = group;
|
|
982
|
-
},
|
|
983
|
-
_hideGhostForTarget = function _hideGhostForTarget() {
|
|
984
|
-
if (!supportCssPointerEvents && ghostEl) {
|
|
985
|
-
css(ghostEl, 'display', 'none');
|
|
986
|
-
}
|
|
987
|
-
},
|
|
988
|
-
_unhideGhostForTarget = function _unhideGhostForTarget() {
|
|
989
|
-
if (!supportCssPointerEvents && ghostEl) {
|
|
990
|
-
css(ghostEl, 'display', '');
|
|
991
|
-
}
|
|
992
|
-
};
|
|
993
|
-
|
|
994
|
-
// #1184 fix - Prevent click event on fallback if dragged but item not changed position
|
|
995
|
-
if (documentExists && !ChromeForAndroid) {
|
|
996
|
-
document.addEventListener('click', function (evt) {
|
|
997
|
-
if (ignoreNextClick) {
|
|
998
|
-
evt.preventDefault();
|
|
999
|
-
evt.stopPropagation && evt.stopPropagation();
|
|
1000
|
-
evt.stopImmediatePropagation && evt.stopImmediatePropagation();
|
|
1001
|
-
ignoreNextClick = false;
|
|
1002
|
-
return false;
|
|
1003
|
-
}
|
|
1004
|
-
}, true);
|
|
1005
|
-
}
|
|
1006
|
-
var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
|
|
1007
|
-
if (dragEl) {
|
|
1008
|
-
evt = evt.touches ? evt.touches[0] : evt;
|
|
1009
|
-
var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
|
|
1010
|
-
if (nearest) {
|
|
1011
|
-
// Create imitation event
|
|
1012
|
-
var event = {};
|
|
1013
|
-
for (var i in evt) {
|
|
1014
|
-
if (evt.hasOwnProperty(i)) {
|
|
1015
|
-
event[i] = evt[i];
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
|
-
event.target = event.rootEl = nearest;
|
|
1019
|
-
event.preventDefault = void 0;
|
|
1020
|
-
event.stopPropagation = void 0;
|
|
1021
|
-
nearest[expando]._onDragOver(event);
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
};
|
|
1025
|
-
var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
|
|
1026
|
-
if (dragEl) {
|
|
1027
|
-
dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
|
|
1028
|
-
}
|
|
1029
|
-
};
|
|
1030
|
-
|
|
1031
|
-
/**
|
|
1032
|
-
* @class Sortable
|
|
1033
|
-
* @param {HTMLElement} el
|
|
1034
|
-
* @param {Object} [options]
|
|
1035
|
-
*/
|
|
1036
|
-
function Sortable(el, options) {
|
|
1037
|
-
if (!(el && el.nodeType && el.nodeType === 1)) {
|
|
1038
|
-
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
|
|
1039
|
-
}
|
|
1040
|
-
this.el = el; // root element
|
|
1041
|
-
this.options = options = _extends({}, options);
|
|
1042
|
-
|
|
1043
|
-
// Export instance
|
|
1044
|
-
el[expando] = this;
|
|
1045
|
-
var defaults = {
|
|
1046
|
-
group: null,
|
|
1047
|
-
sort: true,
|
|
1048
|
-
disabled: false,
|
|
1049
|
-
store: null,
|
|
1050
|
-
handle: null,
|
|
1051
|
-
draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
|
|
1052
|
-
swapThreshold: 1,
|
|
1053
|
-
// percentage; 0 <= x <= 1
|
|
1054
|
-
invertSwap: false,
|
|
1055
|
-
// invert always
|
|
1056
|
-
invertedSwapThreshold: null,
|
|
1057
|
-
// will be set to same as swapThreshold if default
|
|
1058
|
-
removeCloneOnHide: true,
|
|
1059
|
-
direction: function direction() {
|
|
1060
|
-
return _detectDirection(el, this.options);
|
|
1061
|
-
},
|
|
1062
|
-
ghostClass: 'sortable-ghost',
|
|
1063
|
-
chosenClass: 'sortable-chosen',
|
|
1064
|
-
dragClass: 'sortable-drag',
|
|
1065
|
-
ignore: 'a, img',
|
|
1066
|
-
filter: null,
|
|
1067
|
-
preventOnFilter: true,
|
|
1068
|
-
animation: 0,
|
|
1069
|
-
easing: null,
|
|
1070
|
-
setData: function setData(dataTransfer, dragEl) {
|
|
1071
|
-
dataTransfer.setData('Text', dragEl.textContent);
|
|
1072
|
-
},
|
|
1073
|
-
dropBubble: false,
|
|
1074
|
-
dragoverBubble: false,
|
|
1075
|
-
dataIdAttr: 'data-id',
|
|
1076
|
-
delay: 0,
|
|
1077
|
-
delayOnTouchOnly: false,
|
|
1078
|
-
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
1079
|
-
forceFallback: false,
|
|
1080
|
-
fallbackClass: 'sortable-fallback',
|
|
1081
|
-
fallbackOnBody: false,
|
|
1082
|
-
fallbackTolerance: 0,
|
|
1083
|
-
fallbackOffset: {
|
|
1084
|
-
x: 0,
|
|
1085
|
-
y: 0
|
|
1086
|
-
},
|
|
1087
|
-
supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
|
|
1088
|
-
emptyInsertThreshold: 5
|
|
1089
|
-
};
|
|
1090
|
-
PluginManager.initializePlugins(this, el, defaults);
|
|
1091
|
-
|
|
1092
|
-
// Set default options
|
|
1093
|
-
for (var name in defaults) {
|
|
1094
|
-
!(name in options) && (options[name] = defaults[name]);
|
|
1095
|
-
}
|
|
1096
|
-
_prepareGroup(options);
|
|
1097
|
-
|
|
1098
|
-
// Bind all private methods
|
|
1099
|
-
for (var fn in this) {
|
|
1100
|
-
if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
|
|
1101
|
-
this[fn] = this[fn].bind(this);
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
// Setup drag mode
|
|
1106
|
-
this.nativeDraggable = options.forceFallback ? false : supportDraggable;
|
|
1107
|
-
if (this.nativeDraggable) {
|
|
1108
|
-
// Touch start threshold cannot be greater than the native dragstart threshold
|
|
1109
|
-
this.options.touchStartThreshold = 1;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
// Bind events
|
|
1113
|
-
if (options.supportPointer) {
|
|
1114
|
-
on(el, 'pointerdown', this._onTapStart);
|
|
1115
|
-
} else {
|
|
1116
|
-
on(el, 'mousedown', this._onTapStart);
|
|
1117
|
-
on(el, 'touchstart', this._onTapStart);
|
|
1118
|
-
}
|
|
1119
|
-
if (this.nativeDraggable) {
|
|
1120
|
-
on(el, 'dragover', this);
|
|
1121
|
-
on(el, 'dragenter', this);
|
|
1122
|
-
}
|
|
1123
|
-
sortables.push(this.el);
|
|
1124
|
-
|
|
1125
|
-
// Restore sorting
|
|
1126
|
-
options.store && options.store.get && this.sort(options.store.get(this) || []);
|
|
1127
|
-
|
|
1128
|
-
// Add animation state manager
|
|
1129
|
-
_extends(this, AnimationStateManager());
|
|
1130
|
-
}
|
|
1131
|
-
Sortable.prototype = /** @lends Sortable.prototype */{
|
|
1132
|
-
constructor: Sortable,
|
|
1133
|
-
_isOutsideThisEl: function _isOutsideThisEl(target) {
|
|
1134
|
-
if (!this.el.contains(target) && target !== this.el) {
|
|
1135
|
-
lastTarget = null;
|
|
1136
|
-
}
|
|
1137
|
-
},
|
|
1138
|
-
_getDirection: function _getDirection(evt, target) {
|
|
1139
|
-
return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
|
|
1140
|
-
},
|
|
1141
|
-
_onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {
|
|
1142
|
-
if (!evt.cancelable) return;
|
|
1143
|
-
var _this = this,
|
|
1144
|
-
el = this.el,
|
|
1145
|
-
options = this.options,
|
|
1146
|
-
preventOnFilter = options.preventOnFilter,
|
|
1147
|
-
type = evt.type,
|
|
1148
|
-
touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
|
|
1149
|
-
target = (touch || evt).target,
|
|
1150
|
-
originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
|
|
1151
|
-
filter = options.filter;
|
|
1152
|
-
_saveInputCheckedState(el);
|
|
1153
|
-
|
|
1154
|
-
// Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
|
|
1155
|
-
if (dragEl) {
|
|
1156
|
-
return;
|
|
1157
|
-
}
|
|
1158
|
-
if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
|
|
1159
|
-
return; // only left button and enabled
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
// cancel dnd if original target is content editable
|
|
1163
|
-
if (originalTarget.isContentEditable) {
|
|
1164
|
-
return;
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
// Safari ignores further event handling after mousedown
|
|
1168
|
-
if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
|
|
1169
|
-
return;
|
|
1170
|
-
}
|
|
1171
|
-
target = closest(target, options.draggable, el, false);
|
|
1172
|
-
if (target && target.animated) {
|
|
1173
|
-
return;
|
|
1174
|
-
}
|
|
1175
|
-
if (lastDownEl === target) {
|
|
1176
|
-
// Ignoring duplicate `down`
|
|
1177
|
-
return;
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
// Get the index of the dragged element within its parent
|
|
1181
|
-
oldIndex = index(target);
|
|
1182
|
-
oldDraggableIndex = index(target, options.draggable);
|
|
1183
|
-
|
|
1184
|
-
// Check filter
|
|
1185
|
-
if (typeof filter === 'function') {
|
|
1186
|
-
if (filter.call(this, evt, target, this)) {
|
|
1187
|
-
_dispatchEvent({
|
|
1188
|
-
sortable: _this,
|
|
1189
|
-
rootEl: originalTarget,
|
|
1190
|
-
name: 'filter',
|
|
1191
|
-
targetEl: target,
|
|
1192
|
-
toEl: el,
|
|
1193
|
-
fromEl: el
|
|
1194
|
-
});
|
|
1195
|
-
pluginEvent('filter', _this, {
|
|
1196
|
-
evt: evt
|
|
1197
|
-
});
|
|
1198
|
-
preventOnFilter && evt.cancelable && evt.preventDefault();
|
|
1199
|
-
return; // cancel dnd
|
|
1200
|
-
}
|
|
1201
|
-
} else if (filter) {
|
|
1202
|
-
filter = filter.split(',').some(function (criteria) {
|
|
1203
|
-
criteria = closest(originalTarget, criteria.trim(), el, false);
|
|
1204
|
-
if (criteria) {
|
|
1205
|
-
_dispatchEvent({
|
|
1206
|
-
sortable: _this,
|
|
1207
|
-
rootEl: criteria,
|
|
1208
|
-
name: 'filter',
|
|
1209
|
-
targetEl: target,
|
|
1210
|
-
fromEl: el,
|
|
1211
|
-
toEl: el
|
|
1212
|
-
});
|
|
1213
|
-
pluginEvent('filter', _this, {
|
|
1214
|
-
evt: evt
|
|
1215
|
-
});
|
|
1216
|
-
return true;
|
|
1217
|
-
}
|
|
1218
|
-
});
|
|
1219
|
-
if (filter) {
|
|
1220
|
-
preventOnFilter && evt.cancelable && evt.preventDefault();
|
|
1221
|
-
return; // cancel dnd
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
if (options.handle && !closest(originalTarget, options.handle, el, false)) {
|
|
1225
|
-
return;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
// Prepare `dragstart`
|
|
1229
|
-
this._prepareDragStart(evt, touch, target);
|
|
1230
|
-
},
|
|
1231
|
-
_prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {
|
|
1232
|
-
var _this = this,
|
|
1233
|
-
el = _this.el,
|
|
1234
|
-
options = _this.options,
|
|
1235
|
-
ownerDocument = el.ownerDocument,
|
|
1236
|
-
dragStartFn;
|
|
1237
|
-
if (target && !dragEl && target.parentNode === el) {
|
|
1238
|
-
var dragRect = getRect(target);
|
|
1239
|
-
rootEl = el;
|
|
1240
|
-
dragEl = target;
|
|
1241
|
-
parentEl = dragEl.parentNode;
|
|
1242
|
-
nextEl = dragEl.nextSibling;
|
|
1243
|
-
lastDownEl = target;
|
|
1244
|
-
activeGroup = options.group;
|
|
1245
|
-
Sortable.dragged = dragEl;
|
|
1246
|
-
tapEvt = {
|
|
1247
|
-
target: dragEl,
|
|
1248
|
-
clientX: (touch || evt).clientX,
|
|
1249
|
-
clientY: (touch || evt).clientY
|
|
1250
|
-
};
|
|
1251
|
-
tapDistanceLeft = tapEvt.clientX - dragRect.left;
|
|
1252
|
-
tapDistanceTop = tapEvt.clientY - dragRect.top;
|
|
1253
|
-
this._lastX = (touch || evt).clientX;
|
|
1254
|
-
this._lastY = (touch || evt).clientY;
|
|
1255
|
-
dragEl.style['will-change'] = 'all';
|
|
1256
|
-
dragStartFn = function dragStartFn() {
|
|
1257
|
-
pluginEvent('delayEnded', _this, {
|
|
1258
|
-
evt: evt
|
|
1259
|
-
});
|
|
1260
|
-
if (Sortable.eventCanceled) {
|
|
1261
|
-
_this._onDrop();
|
|
1262
|
-
return;
|
|
1263
|
-
}
|
|
1264
|
-
// Delayed drag has been triggered
|
|
1265
|
-
// we can re-enable the events: touchmove/mousemove
|
|
1266
|
-
_this._disableDelayedDragEvents();
|
|
1267
|
-
if (!FireFox && _this.nativeDraggable) {
|
|
1268
|
-
dragEl.draggable = true;
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
// Bind the events: dragstart/dragend
|
|
1272
|
-
_this._triggerDragStart(evt, touch);
|
|
1273
|
-
|
|
1274
|
-
// Drag start event
|
|
1275
|
-
_dispatchEvent({
|
|
1276
|
-
sortable: _this,
|
|
1277
|
-
name: 'choose',
|
|
1278
|
-
originalEvent: evt
|
|
1279
|
-
});
|
|
1280
|
-
|
|
1281
|
-
// Chosen item
|
|
1282
|
-
toggleClass(dragEl, options.chosenClass, true);
|
|
1283
|
-
};
|
|
1284
|
-
|
|
1285
|
-
// Disable "draggable"
|
|
1286
|
-
options.ignore.split(',').forEach(function (criteria) {
|
|
1287
|
-
find(dragEl, criteria.trim(), _disableDraggable);
|
|
1288
|
-
});
|
|
1289
|
-
on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
|
|
1290
|
-
on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
|
|
1291
|
-
on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
|
|
1292
|
-
on(ownerDocument, 'mouseup', _this._onDrop);
|
|
1293
|
-
on(ownerDocument, 'touchend', _this._onDrop);
|
|
1294
|
-
on(ownerDocument, 'touchcancel', _this._onDrop);
|
|
1295
|
-
|
|
1296
|
-
// Make dragEl draggable (must be before delay for FireFox)
|
|
1297
|
-
if (FireFox && this.nativeDraggable) {
|
|
1298
|
-
this.options.touchStartThreshold = 4;
|
|
1299
|
-
dragEl.draggable = true;
|
|
1300
|
-
}
|
|
1301
|
-
pluginEvent('delayStart', this, {
|
|
1302
|
-
evt: evt
|
|
1303
|
-
});
|
|
1304
|
-
|
|
1305
|
-
// Delay is impossible for native DnD in Edge or IE
|
|
1306
|
-
if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
|
|
1307
|
-
if (Sortable.eventCanceled) {
|
|
1308
|
-
this._onDrop();
|
|
1309
|
-
return;
|
|
1310
|
-
}
|
|
1311
|
-
// If the user moves the pointer or let go the click or touch
|
|
1312
|
-
// before the delay has been reached:
|
|
1313
|
-
// disable the delayed drag
|
|
1314
|
-
on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
|
|
1315
|
-
on(ownerDocument, 'touchend', _this._disableDelayedDrag);
|
|
1316
|
-
on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
|
|
1317
|
-
on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
|
|
1318
|
-
on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
|
|
1319
|
-
options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
|
|
1320
|
-
_this._dragStartTimer = setTimeout(dragStartFn, options.delay);
|
|
1321
|
-
} else {
|
|
1322
|
-
dragStartFn();
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
},
|
|
1326
|
-
_delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {
|
|
1327
|
-
var touch = e.touches ? e.touches[0] : e;
|
|
1328
|
-
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))) {
|
|
1329
|
-
this._disableDelayedDrag();
|
|
1330
|
-
}
|
|
1331
|
-
},
|
|
1332
|
-
_disableDelayedDrag: function _disableDelayedDrag() {
|
|
1333
|
-
dragEl && _disableDraggable(dragEl);
|
|
1334
|
-
clearTimeout(this._dragStartTimer);
|
|
1335
|
-
this._disableDelayedDragEvents();
|
|
1336
|
-
},
|
|
1337
|
-
_disableDelayedDragEvents: function _disableDelayedDragEvents() {
|
|
1338
|
-
var ownerDocument = this.el.ownerDocument;
|
|
1339
|
-
off(ownerDocument, 'mouseup', this._disableDelayedDrag);
|
|
1340
|
-
off(ownerDocument, 'touchend', this._disableDelayedDrag);
|
|
1341
|
-
off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
|
|
1342
|
-
off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
|
|
1343
|
-
off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
|
|
1344
|
-
off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
|
|
1345
|
-
},
|
|
1346
|
-
_triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {
|
|
1347
|
-
touch = touch || evt.pointerType == 'touch' && evt;
|
|
1348
|
-
if (!this.nativeDraggable || touch) {
|
|
1349
|
-
if (this.options.supportPointer) {
|
|
1350
|
-
on(document, 'pointermove', this._onTouchMove);
|
|
1351
|
-
} else if (touch) {
|
|
1352
|
-
on(document, 'touchmove', this._onTouchMove);
|
|
1353
|
-
} else {
|
|
1354
|
-
on(document, 'mousemove', this._onTouchMove);
|
|
1355
|
-
}
|
|
1356
|
-
} else {
|
|
1357
|
-
on(dragEl, 'dragend', this);
|
|
1358
|
-
on(rootEl, 'dragstart', this._onDragStart);
|
|
1359
|
-
}
|
|
1360
|
-
try {
|
|
1361
|
-
if (document.selection) {
|
|
1362
|
-
// Timeout neccessary for IE9
|
|
1363
|
-
_nextTick(function () {
|
|
1364
|
-
document.selection.empty();
|
|
1365
|
-
});
|
|
1366
|
-
} else {
|
|
1367
|
-
window.getSelection().removeAllRanges();
|
|
1368
|
-
}
|
|
1369
|
-
} catch (err) {}
|
|
1370
|
-
},
|
|
1371
|
-
_dragStarted: function _dragStarted(fallback, evt) {
|
|
1372
|
-
awaitingDragStarted = false;
|
|
1373
|
-
if (rootEl && dragEl) {
|
|
1374
|
-
pluginEvent('dragStarted', this, {
|
|
1375
|
-
evt: evt
|
|
1376
|
-
});
|
|
1377
|
-
if (this.nativeDraggable) {
|
|
1378
|
-
on(document, 'dragover', _checkOutsideTargetEl);
|
|
1379
|
-
}
|
|
1380
|
-
var options = this.options;
|
|
1381
|
-
|
|
1382
|
-
// Apply effect
|
|
1383
|
-
!fallback && toggleClass(dragEl, options.dragClass, false);
|
|
1384
|
-
toggleClass(dragEl, options.ghostClass, true);
|
|
1385
|
-
Sortable.active = this;
|
|
1386
|
-
fallback && this._appendGhost();
|
|
1387
|
-
|
|
1388
|
-
// Drag start event
|
|
1389
|
-
_dispatchEvent({
|
|
1390
|
-
sortable: this,
|
|
1391
|
-
name: 'start',
|
|
1392
|
-
originalEvent: evt
|
|
1393
|
-
});
|
|
1394
|
-
} else {
|
|
1395
|
-
this._nulling();
|
|
1396
|
-
}
|
|
1397
|
-
},
|
|
1398
|
-
_emulateDragOver: function _emulateDragOver() {
|
|
1399
|
-
if (touchEvt) {
|
|
1400
|
-
this._lastX = touchEvt.clientX;
|
|
1401
|
-
this._lastY = touchEvt.clientY;
|
|
1402
|
-
_hideGhostForTarget();
|
|
1403
|
-
var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
|
|
1404
|
-
var parent = target;
|
|
1405
|
-
while (target && target.shadowRoot) {
|
|
1406
|
-
target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
|
|
1407
|
-
if (target === parent) break;
|
|
1408
|
-
parent = target;
|
|
1409
|
-
}
|
|
1410
|
-
dragEl.parentNode[expando]._isOutsideThisEl(target);
|
|
1411
|
-
if (parent) {
|
|
1412
|
-
do {
|
|
1413
|
-
if (parent[expando]) {
|
|
1414
|
-
var inserted = void 0;
|
|
1415
|
-
inserted = parent[expando]._onDragOver({
|
|
1416
|
-
clientX: touchEvt.clientX,
|
|
1417
|
-
clientY: touchEvt.clientY,
|
|
1418
|
-
target: target,
|
|
1419
|
-
rootEl: parent
|
|
1420
|
-
});
|
|
1421
|
-
if (inserted && !this.options.dragoverBubble) {
|
|
1422
|
-
break;
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
target = parent; // store last element
|
|
1426
|
-
}
|
|
1427
|
-
/* jshint boss:true */ while (parent = parent.parentNode);
|
|
1428
|
-
}
|
|
1429
|
-
_unhideGhostForTarget();
|
|
1430
|
-
}
|
|
1431
|
-
},
|
|
1432
|
-
_onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {
|
|
1433
|
-
if (tapEvt) {
|
|
1434
|
-
var options = this.options,
|
|
1435
|
-
fallbackTolerance = options.fallbackTolerance,
|
|
1436
|
-
fallbackOffset = options.fallbackOffset,
|
|
1437
|
-
touch = evt.touches ? evt.touches[0] : evt,
|
|
1438
|
-
ghostMatrix = ghostEl && matrix(ghostEl, true),
|
|
1439
|
-
scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
|
|
1440
|
-
scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
|
|
1441
|
-
relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
|
|
1442
|
-
dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
|
|
1443
|
-
dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);
|
|
1444
|
-
|
|
1445
|
-
// only set the status to dragging, when we are actually dragging
|
|
1446
|
-
if (!Sortable.active && !awaitingDragStarted) {
|
|
1447
|
-
if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
|
|
1448
|
-
return;
|
|
1449
|
-
}
|
|
1450
|
-
this._onDragStart(evt, true);
|
|
1451
|
-
}
|
|
1452
|
-
if (ghostEl) {
|
|
1453
|
-
if (ghostMatrix) {
|
|
1454
|
-
ghostMatrix.e += dx - (lastDx || 0);
|
|
1455
|
-
ghostMatrix.f += dy - (lastDy || 0);
|
|
1456
|
-
} else {
|
|
1457
|
-
ghostMatrix = {
|
|
1458
|
-
a: 1,
|
|
1459
|
-
b: 0,
|
|
1460
|
-
c: 0,
|
|
1461
|
-
d: 1,
|
|
1462
|
-
e: dx,
|
|
1463
|
-
f: dy
|
|
1464
|
-
};
|
|
1465
|
-
}
|
|
1466
|
-
var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
|
|
1467
|
-
css(ghostEl, 'webkitTransform', cssMatrix);
|
|
1468
|
-
css(ghostEl, 'mozTransform', cssMatrix);
|
|
1469
|
-
css(ghostEl, 'msTransform', cssMatrix);
|
|
1470
|
-
css(ghostEl, 'transform', cssMatrix);
|
|
1471
|
-
lastDx = dx;
|
|
1472
|
-
lastDy = dy;
|
|
1473
|
-
touchEvt = touch;
|
|
1474
|
-
}
|
|
1475
|
-
evt.cancelable && evt.preventDefault();
|
|
1476
|
-
}
|
|
1477
|
-
},
|
|
1478
|
-
_appendGhost: function _appendGhost() {
|
|
1479
|
-
// Bug if using scale(): https://stackoverflow.com/questions/2637058
|
|
1480
|
-
// Not being adjusted for
|
|
1481
|
-
if (!ghostEl) {
|
|
1482
|
-
var container = this.options.fallbackOnBody ? document.body : rootEl,
|
|
1483
|
-
rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
|
|
1484
|
-
options = this.options;
|
|
1485
|
-
|
|
1486
|
-
// Position absolutely
|
|
1487
|
-
if (PositionGhostAbsolutely) {
|
|
1488
|
-
// Get relatively positioned parent
|
|
1489
|
-
ghostRelativeParent = container;
|
|
1490
|
-
while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
|
|
1491
|
-
ghostRelativeParent = ghostRelativeParent.parentNode;
|
|
1492
|
-
}
|
|
1493
|
-
if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
|
|
1494
|
-
if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
|
|
1495
|
-
rect.top += ghostRelativeParent.scrollTop;
|
|
1496
|
-
rect.left += ghostRelativeParent.scrollLeft;
|
|
1497
|
-
} else {
|
|
1498
|
-
ghostRelativeParent = getWindowScrollingElement();
|
|
1499
|
-
}
|
|
1500
|
-
ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
|
|
1501
|
-
}
|
|
1502
|
-
ghostEl = dragEl.cloneNode(true);
|
|
1503
|
-
toggleClass(ghostEl, options.ghostClass, false);
|
|
1504
|
-
toggleClass(ghostEl, options.fallbackClass, true);
|
|
1505
|
-
toggleClass(ghostEl, options.dragClass, true);
|
|
1506
|
-
css(ghostEl, 'transition', '');
|
|
1507
|
-
css(ghostEl, 'transform', '');
|
|
1508
|
-
css(ghostEl, 'box-sizing', 'border-box');
|
|
1509
|
-
css(ghostEl, 'margin', 0);
|
|
1510
|
-
css(ghostEl, 'top', rect.top);
|
|
1511
|
-
css(ghostEl, 'left', rect.left);
|
|
1512
|
-
css(ghostEl, 'width', rect.width);
|
|
1513
|
-
css(ghostEl, 'height', rect.height);
|
|
1514
|
-
css(ghostEl, 'opacity', '0.8');
|
|
1515
|
-
css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
|
|
1516
|
-
css(ghostEl, 'zIndex', '100000');
|
|
1517
|
-
css(ghostEl, 'pointerEvents', 'none');
|
|
1518
|
-
Sortable.ghost = ghostEl;
|
|
1519
|
-
container.appendChild(ghostEl);
|
|
1520
|
-
|
|
1521
|
-
// Set transform-origin
|
|
1522
|
-
css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
|
|
1523
|
-
}
|
|
1524
|
-
},
|
|
1525
|
-
_onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {
|
|
1526
|
-
var _this = this;
|
|
1527
|
-
var dataTransfer = evt.dataTransfer;
|
|
1528
|
-
var options = _this.options;
|
|
1529
|
-
pluginEvent('dragStart', this, {
|
|
1530
|
-
evt: evt
|
|
1531
|
-
});
|
|
1532
|
-
if (Sortable.eventCanceled) {
|
|
1533
|
-
this._onDrop();
|
|
1534
|
-
return;
|
|
1535
|
-
}
|
|
1536
|
-
pluginEvent('setupClone', this);
|
|
1537
|
-
if (!Sortable.eventCanceled) {
|
|
1538
|
-
cloneEl = clone(dragEl);
|
|
1539
|
-
cloneEl.removeAttribute("id");
|
|
1540
|
-
cloneEl.draggable = false;
|
|
1541
|
-
cloneEl.style['will-change'] = '';
|
|
1542
|
-
this._hideClone();
|
|
1543
|
-
toggleClass(cloneEl, this.options.chosenClass, false);
|
|
1544
|
-
Sortable.clone = cloneEl;
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
// #1143: IFrame support workaround
|
|
1548
|
-
_this.cloneId = _nextTick(function () {
|
|
1549
|
-
pluginEvent('clone', _this);
|
|
1550
|
-
if (Sortable.eventCanceled) return;
|
|
1551
|
-
if (!_this.options.removeCloneOnHide) {
|
|
1552
|
-
rootEl.insertBefore(cloneEl, dragEl);
|
|
1553
|
-
}
|
|
1554
|
-
_this._hideClone();
|
|
1555
|
-
_dispatchEvent({
|
|
1556
|
-
sortable: _this,
|
|
1557
|
-
name: 'clone'
|
|
1558
|
-
});
|
|
1559
|
-
});
|
|
1560
|
-
!fallback && toggleClass(dragEl, options.dragClass, true);
|
|
1561
|
-
|
|
1562
|
-
// Set proper drop events
|
|
1563
|
-
if (fallback) {
|
|
1564
|
-
ignoreNextClick = true;
|
|
1565
|
-
_this._loopId = setInterval(_this._emulateDragOver, 50);
|
|
1566
|
-
} else {
|
|
1567
|
-
// Undo what was set in _prepareDragStart before drag started
|
|
1568
|
-
off(document, 'mouseup', _this._onDrop);
|
|
1569
|
-
off(document, 'touchend', _this._onDrop);
|
|
1570
|
-
off(document, 'touchcancel', _this._onDrop);
|
|
1571
|
-
if (dataTransfer) {
|
|
1572
|
-
dataTransfer.effectAllowed = 'move';
|
|
1573
|
-
options.setData && options.setData.call(_this, dataTransfer, dragEl);
|
|
1574
|
-
}
|
|
1575
|
-
on(document, 'drop', _this);
|
|
1576
|
-
|
|
1577
|
-
// #1276 fix:
|
|
1578
|
-
css(dragEl, 'transform', 'translateZ(0)');
|
|
1579
|
-
}
|
|
1580
|
-
awaitingDragStarted = true;
|
|
1581
|
-
_this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
|
|
1582
|
-
on(document, 'selectstart', _this);
|
|
1583
|
-
moved = true;
|
|
1584
|
-
if (Safari) {
|
|
1585
|
-
css(document.body, 'user-select', 'none');
|
|
1586
|
-
}
|
|
1587
|
-
},
|
|
1588
|
-
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1589
|
-
_onDragOver: function _onDragOver( /**Event*/evt) {
|
|
1590
|
-
var el = this.el,
|
|
1591
|
-
target = evt.target,
|
|
1592
|
-
dragRect,
|
|
1593
|
-
targetRect,
|
|
1594
|
-
revert,
|
|
1595
|
-
options = this.options,
|
|
1596
|
-
group = options.group,
|
|
1597
|
-
activeSortable = Sortable.active,
|
|
1598
|
-
isOwner = activeGroup === group,
|
|
1599
|
-
canSort = options.sort,
|
|
1600
|
-
fromSortable = putSortable || activeSortable,
|
|
1601
|
-
vertical,
|
|
1602
|
-
_this = this,
|
|
1603
|
-
completedFired = false;
|
|
1604
|
-
if (_silent) return;
|
|
1605
|
-
function dragOverEvent(name, extra) {
|
|
1606
|
-
pluginEvent(name, _this, _objectSpread2({
|
|
1607
|
-
evt: evt,
|
|
1608
|
-
isOwner: isOwner,
|
|
1609
|
-
axis: vertical ? 'vertical' : 'horizontal',
|
|
1610
|
-
revert: revert,
|
|
1611
|
-
dragRect: dragRect,
|
|
1612
|
-
targetRect: targetRect,
|
|
1613
|
-
canSort: canSort,
|
|
1614
|
-
fromSortable: fromSortable,
|
|
1615
|
-
target: target,
|
|
1616
|
-
completed: completed,
|
|
1617
|
-
onMove: function onMove(target, after) {
|
|
1618
|
-
return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
|
|
1619
|
-
},
|
|
1620
|
-
changed: changed
|
|
1621
|
-
}, extra));
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
// Capture animation state
|
|
1625
|
-
function capture() {
|
|
1626
|
-
dragOverEvent('dragOverAnimationCapture');
|
|
1627
|
-
_this.captureAnimationState();
|
|
1628
|
-
if (_this !== fromSortable) {
|
|
1629
|
-
fromSortable.captureAnimationState();
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
// Return invocation when dragEl is inserted (or completed)
|
|
1634
|
-
function completed(insertion) {
|
|
1635
|
-
dragOverEvent('dragOverCompleted', {
|
|
1636
|
-
insertion: insertion
|
|
1637
|
-
});
|
|
1638
|
-
if (insertion) {
|
|
1639
|
-
// Clones must be hidden before folding animation to capture dragRectAbsolute properly
|
|
1640
|
-
if (isOwner) {
|
|
1641
|
-
activeSortable._hideClone();
|
|
1642
|
-
} else {
|
|
1643
|
-
activeSortable._showClone(_this);
|
|
1644
|
-
}
|
|
1645
|
-
if (_this !== fromSortable) {
|
|
1646
|
-
// Set ghost class to new sortable's ghost class
|
|
1647
|
-
toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
|
|
1648
|
-
toggleClass(dragEl, options.ghostClass, true);
|
|
1649
|
-
}
|
|
1650
|
-
if (putSortable !== _this && _this !== Sortable.active) {
|
|
1651
|
-
putSortable = _this;
|
|
1652
|
-
} else if (_this === Sortable.active && putSortable) {
|
|
1653
|
-
putSortable = null;
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
// Animation
|
|
1657
|
-
if (fromSortable === _this) {
|
|
1658
|
-
_this._ignoreWhileAnimating = target;
|
|
1659
|
-
}
|
|
1660
|
-
_this.animateAll(function () {
|
|
1661
|
-
dragOverEvent('dragOverAnimationComplete');
|
|
1662
|
-
_this._ignoreWhileAnimating = null;
|
|
1663
|
-
});
|
|
1664
|
-
if (_this !== fromSortable) {
|
|
1665
|
-
fromSortable.animateAll();
|
|
1666
|
-
fromSortable._ignoreWhileAnimating = null;
|
|
1667
|
-
}
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
// Null lastTarget if it is not inside a previously swapped element
|
|
1671
|
-
if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
|
|
1672
|
-
lastTarget = null;
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
// no bubbling and not fallback
|
|
1676
|
-
if (!options.dragoverBubble && !evt.rootEl && target !== document) {
|
|
1677
|
-
dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
|
|
1678
|
-
|
|
1679
|
-
// Do not detect for empty insert if already inserted
|
|
1680
|
-
!insertion && nearestEmptyInsertDetectEvent(evt);
|
|
1681
|
-
}
|
|
1682
|
-
!options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
|
|
1683
|
-
return completedFired = true;
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
// Call when dragEl has been inserted
|
|
1687
|
-
function changed() {
|
|
1688
|
-
newIndex = index(dragEl);
|
|
1689
|
-
newDraggableIndex = index(dragEl, options.draggable);
|
|
1690
|
-
_dispatchEvent({
|
|
1691
|
-
sortable: _this,
|
|
1692
|
-
name: 'change',
|
|
1693
|
-
toEl: el,
|
|
1694
|
-
newIndex: newIndex,
|
|
1695
|
-
newDraggableIndex: newDraggableIndex,
|
|
1696
|
-
originalEvent: evt
|
|
1697
|
-
});
|
|
1698
|
-
}
|
|
1699
|
-
if (evt.preventDefault !== void 0) {
|
|
1700
|
-
evt.cancelable && evt.preventDefault();
|
|
1701
|
-
}
|
|
1702
|
-
target = closest(target, options.draggable, el, true);
|
|
1703
|
-
dragOverEvent('dragOver');
|
|
1704
|
-
if (Sortable.eventCanceled) return completedFired;
|
|
1705
|
-
if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
|
|
1706
|
-
return completed(false);
|
|
1707
|
-
}
|
|
1708
|
-
ignoreNextClick = false;
|
|
1709
|
-
if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
|
|
1710
|
-
: putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
|
|
1711
|
-
vertical = this._getDirection(evt, target) === 'vertical';
|
|
1712
|
-
dragRect = getRect(dragEl);
|
|
1713
|
-
dragOverEvent('dragOverValid');
|
|
1714
|
-
if (Sortable.eventCanceled) return completedFired;
|
|
1715
|
-
if (revert) {
|
|
1716
|
-
parentEl = rootEl; // actualization
|
|
1717
|
-
capture();
|
|
1718
|
-
this._hideClone();
|
|
1719
|
-
dragOverEvent('revert');
|
|
1720
|
-
if (!Sortable.eventCanceled) {
|
|
1721
|
-
if (nextEl) {
|
|
1722
|
-
rootEl.insertBefore(dragEl, nextEl);
|
|
1723
|
-
} else {
|
|
1724
|
-
rootEl.appendChild(dragEl);
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
return completed(true);
|
|
1728
|
-
}
|
|
1729
|
-
var elLastChild = lastChild(el, options.draggable);
|
|
1730
|
-
if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
|
|
1731
|
-
// Insert to end of list
|
|
1732
|
-
|
|
1733
|
-
// If already at end of list: Do not insert
|
|
1734
|
-
if (elLastChild === dragEl) {
|
|
1735
|
-
return completed(false);
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
|
-
// if there is a last element, it is the target
|
|
1739
|
-
if (elLastChild && el === evt.target) {
|
|
1740
|
-
target = elLastChild;
|
|
1741
|
-
}
|
|
1742
|
-
if (target) {
|
|
1743
|
-
targetRect = getRect(target);
|
|
1744
|
-
}
|
|
1745
|
-
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
|
|
1746
|
-
capture();
|
|
1747
|
-
if (elLastChild && elLastChild.nextSibling) {
|
|
1748
|
-
// the last draggable element is not the last node
|
|
1749
|
-
el.insertBefore(dragEl, elLastChild.nextSibling);
|
|
1750
|
-
} else {
|
|
1751
|
-
el.appendChild(dragEl);
|
|
1752
|
-
}
|
|
1753
|
-
parentEl = el; // actualization
|
|
1754
|
-
|
|
1755
|
-
changed();
|
|
1756
|
-
return completed(true);
|
|
1757
|
-
}
|
|
1758
|
-
} else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
|
|
1759
|
-
// Insert to start of list
|
|
1760
|
-
var firstChild = getChild(el, 0, options, true);
|
|
1761
|
-
if (firstChild === dragEl) {
|
|
1762
|
-
return completed(false);
|
|
1763
|
-
}
|
|
1764
|
-
target = firstChild;
|
|
1765
|
-
targetRect = getRect(target);
|
|
1766
|
-
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
|
|
1767
|
-
capture();
|
|
1768
|
-
el.insertBefore(dragEl, firstChild);
|
|
1769
|
-
parentEl = el; // actualization
|
|
1770
|
-
|
|
1771
|
-
changed();
|
|
1772
|
-
return completed(true);
|
|
1773
|
-
}
|
|
1774
|
-
} else if (target.parentNode === el) {
|
|
1775
|
-
targetRect = getRect(target);
|
|
1776
|
-
var direction = 0,
|
|
1777
|
-
targetBeforeFirstSwap,
|
|
1778
|
-
differentLevel = dragEl.parentNode !== el,
|
|
1779
|
-
differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
|
|
1780
|
-
side1 = vertical ? 'top' : 'left',
|
|
1781
|
-
scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
|
|
1782
|
-
scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
|
|
1783
|
-
if (lastTarget !== target) {
|
|
1784
|
-
targetBeforeFirstSwap = targetRect[side1];
|
|
1785
|
-
pastFirstInvertThresh = false;
|
|
1786
|
-
isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
|
|
1787
|
-
}
|
|
1788
|
-
direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
|
|
1789
|
-
var sibling;
|
|
1790
|
-
if (direction !== 0) {
|
|
1791
|
-
// Check if target is beside dragEl in respective direction (ignoring hidden elements)
|
|
1792
|
-
var dragIndex = index(dragEl);
|
|
1793
|
-
do {
|
|
1794
|
-
dragIndex -= direction;
|
|
1795
|
-
sibling = parentEl.children[dragIndex];
|
|
1796
|
-
} while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
|
|
1797
|
-
}
|
|
1798
|
-
// If dragEl is already beside target: Do not insert
|
|
1799
|
-
if (direction === 0 || sibling === target) {
|
|
1800
|
-
return completed(false);
|
|
1801
|
-
}
|
|
1802
|
-
lastTarget = target;
|
|
1803
|
-
lastDirection = direction;
|
|
1804
|
-
var nextSibling = target.nextElementSibling,
|
|
1805
|
-
after = false;
|
|
1806
|
-
after = direction === 1;
|
|
1807
|
-
var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
|
|
1808
|
-
if (moveVector !== false) {
|
|
1809
|
-
if (moveVector === 1 || moveVector === -1) {
|
|
1810
|
-
after = moveVector === 1;
|
|
1811
|
-
}
|
|
1812
|
-
_silent = true;
|
|
1813
|
-
setTimeout(_unsilent, 30);
|
|
1814
|
-
capture();
|
|
1815
|
-
if (after && !nextSibling) {
|
|
1816
|
-
el.appendChild(dragEl);
|
|
1817
|
-
} else {
|
|
1818
|
-
target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
// Undo chrome's scroll adjustment (has no effect on other browsers)
|
|
1822
|
-
if (scrolledPastTop) {
|
|
1823
|
-
scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
|
|
1824
|
-
}
|
|
1825
|
-
parentEl = dragEl.parentNode; // actualization
|
|
1826
|
-
|
|
1827
|
-
// must be done before animation
|
|
1828
|
-
if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
|
|
1829
|
-
targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
|
|
1830
|
-
}
|
|
1831
|
-
changed();
|
|
1832
|
-
return completed(true);
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
if (el.contains(dragEl)) {
|
|
1836
|
-
return completed(false);
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
return false;
|
|
1840
|
-
},
|
|
1841
|
-
_ignoreWhileAnimating: null,
|
|
1842
|
-
_offMoveEvents: function _offMoveEvents() {
|
|
1843
|
-
off(document, 'mousemove', this._onTouchMove);
|
|
1844
|
-
off(document, 'touchmove', this._onTouchMove);
|
|
1845
|
-
off(document, 'pointermove', this._onTouchMove);
|
|
1846
|
-
off(document, 'dragover', nearestEmptyInsertDetectEvent);
|
|
1847
|
-
off(document, 'mousemove', nearestEmptyInsertDetectEvent);
|
|
1848
|
-
off(document, 'touchmove', nearestEmptyInsertDetectEvent);
|
|
1849
|
-
},
|
|
1850
|
-
_offUpEvents: function _offUpEvents() {
|
|
1851
|
-
var ownerDocument = this.el.ownerDocument;
|
|
1852
|
-
off(ownerDocument, 'mouseup', this._onDrop);
|
|
1853
|
-
off(ownerDocument, 'touchend', this._onDrop);
|
|
1854
|
-
off(ownerDocument, 'pointerup', this._onDrop);
|
|
1855
|
-
off(ownerDocument, 'touchcancel', this._onDrop);
|
|
1856
|
-
off(document, 'selectstart', this);
|
|
1857
|
-
},
|
|
1858
|
-
_onDrop: function _onDrop( /**Event*/evt) {
|
|
1859
|
-
var el = this.el,
|
|
1860
|
-
options = this.options;
|
|
1861
|
-
|
|
1862
|
-
// Get the index of the dragged element within its parent
|
|
1863
|
-
newIndex = index(dragEl);
|
|
1864
|
-
newDraggableIndex = index(dragEl, options.draggable);
|
|
1865
|
-
pluginEvent('drop', this, {
|
|
1866
|
-
evt: evt
|
|
1867
|
-
});
|
|
1868
|
-
parentEl = dragEl && dragEl.parentNode;
|
|
1869
|
-
|
|
1870
|
-
// Get again after plugin event
|
|
1871
|
-
newIndex = index(dragEl);
|
|
1872
|
-
newDraggableIndex = index(dragEl, options.draggable);
|
|
1873
|
-
if (Sortable.eventCanceled) {
|
|
1874
|
-
this._nulling();
|
|
1875
|
-
return;
|
|
1876
|
-
}
|
|
1877
|
-
awaitingDragStarted = false;
|
|
1878
|
-
isCircumstantialInvert = false;
|
|
1879
|
-
pastFirstInvertThresh = false;
|
|
1880
|
-
clearInterval(this._loopId);
|
|
1881
|
-
clearTimeout(this._dragStartTimer);
|
|
1882
|
-
_cancelNextTick(this.cloneId);
|
|
1883
|
-
_cancelNextTick(this._dragStartId);
|
|
1884
|
-
|
|
1885
|
-
// Unbind events
|
|
1886
|
-
if (this.nativeDraggable) {
|
|
1887
|
-
off(document, 'drop', this);
|
|
1888
|
-
off(el, 'dragstart', this._onDragStart);
|
|
1889
|
-
}
|
|
1890
|
-
this._offMoveEvents();
|
|
1891
|
-
this._offUpEvents();
|
|
1892
|
-
if (Safari) {
|
|
1893
|
-
css(document.body, 'user-select', '');
|
|
1894
|
-
}
|
|
1895
|
-
css(dragEl, 'transform', '');
|
|
1896
|
-
if (evt) {
|
|
1897
|
-
if (moved) {
|
|
1898
|
-
evt.cancelable && evt.preventDefault();
|
|
1899
|
-
!options.dropBubble && evt.stopPropagation();
|
|
1900
|
-
}
|
|
1901
|
-
ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
|
|
1902
|
-
if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
|
|
1903
|
-
// Remove clone(s)
|
|
1904
|
-
cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
|
|
1905
|
-
}
|
|
1906
|
-
if (dragEl) {
|
|
1907
|
-
if (this.nativeDraggable) {
|
|
1908
|
-
off(dragEl, 'dragend', this);
|
|
1909
|
-
}
|
|
1910
|
-
_disableDraggable(dragEl);
|
|
1911
|
-
dragEl.style['will-change'] = '';
|
|
1912
|
-
|
|
1913
|
-
// Remove classes
|
|
1914
|
-
// ghostClass is added in dragStarted
|
|
1915
|
-
if (moved && !awaitingDragStarted) {
|
|
1916
|
-
toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
|
|
1917
|
-
}
|
|
1918
|
-
toggleClass(dragEl, this.options.chosenClass, false);
|
|
1919
|
-
|
|
1920
|
-
// Drag stop event
|
|
1921
|
-
_dispatchEvent({
|
|
1922
|
-
sortable: this,
|
|
1923
|
-
name: 'unchoose',
|
|
1924
|
-
toEl: parentEl,
|
|
1925
|
-
newIndex: null,
|
|
1926
|
-
newDraggableIndex: null,
|
|
1927
|
-
originalEvent: evt
|
|
1928
|
-
});
|
|
1929
|
-
if (rootEl !== parentEl) {
|
|
1930
|
-
if (newIndex >= 0) {
|
|
1931
|
-
// Add event
|
|
1932
|
-
_dispatchEvent({
|
|
1933
|
-
rootEl: parentEl,
|
|
1934
|
-
name: 'add',
|
|
1935
|
-
toEl: parentEl,
|
|
1936
|
-
fromEl: rootEl,
|
|
1937
|
-
originalEvent: evt
|
|
1938
|
-
});
|
|
1939
|
-
|
|
1940
|
-
// Remove event
|
|
1941
|
-
_dispatchEvent({
|
|
1942
|
-
sortable: this,
|
|
1943
|
-
name: 'remove',
|
|
1944
|
-
toEl: parentEl,
|
|
1945
|
-
originalEvent: evt
|
|
1946
|
-
});
|
|
1947
|
-
|
|
1948
|
-
// drag from one list and drop into another
|
|
1949
|
-
_dispatchEvent({
|
|
1950
|
-
rootEl: parentEl,
|
|
1951
|
-
name: 'sort',
|
|
1952
|
-
toEl: parentEl,
|
|
1953
|
-
fromEl: rootEl,
|
|
1954
|
-
originalEvent: evt
|
|
1955
|
-
});
|
|
1956
|
-
_dispatchEvent({
|
|
1957
|
-
sortable: this,
|
|
1958
|
-
name: 'sort',
|
|
1959
|
-
toEl: parentEl,
|
|
1960
|
-
originalEvent: evt
|
|
1961
|
-
});
|
|
1962
|
-
}
|
|
1963
|
-
putSortable && putSortable.save();
|
|
1964
|
-
} else {
|
|
1965
|
-
if (newIndex !== oldIndex) {
|
|
1966
|
-
if (newIndex >= 0) {
|
|
1967
|
-
// drag & drop within the same list
|
|
1968
|
-
_dispatchEvent({
|
|
1969
|
-
sortable: this,
|
|
1970
|
-
name: 'update',
|
|
1971
|
-
toEl: parentEl,
|
|
1972
|
-
originalEvent: evt
|
|
1973
|
-
});
|
|
1974
|
-
_dispatchEvent({
|
|
1975
|
-
sortable: this,
|
|
1976
|
-
name: 'sort',
|
|
1977
|
-
toEl: parentEl,
|
|
1978
|
-
originalEvent: evt
|
|
1979
|
-
});
|
|
1980
|
-
}
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
if (Sortable.active) {
|
|
1984
|
-
/* jshint eqnull:true */
|
|
1985
|
-
if (newIndex == null || newIndex === -1) {
|
|
1986
|
-
newIndex = oldIndex;
|
|
1987
|
-
newDraggableIndex = oldDraggableIndex;
|
|
1988
|
-
}
|
|
1989
|
-
_dispatchEvent({
|
|
1990
|
-
sortable: this,
|
|
1991
|
-
name: 'end',
|
|
1992
|
-
toEl: parentEl,
|
|
1993
|
-
originalEvent: evt
|
|
1994
|
-
});
|
|
1995
|
-
|
|
1996
|
-
// Save sorting
|
|
1997
|
-
this.save();
|
|
1998
|
-
}
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
this._nulling();
|
|
2002
|
-
},
|
|
2003
|
-
_nulling: function _nulling() {
|
|
2004
|
-
pluginEvent('nulling', this);
|
|
2005
|
-
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;
|
|
2006
|
-
savedInputChecked.forEach(function (el) {
|
|
2007
|
-
el.checked = true;
|
|
2008
|
-
});
|
|
2009
|
-
savedInputChecked.length = lastDx = lastDy = 0;
|
|
2010
|
-
},
|
|
2011
|
-
handleEvent: function handleEvent( /**Event*/evt) {
|
|
2012
|
-
switch (evt.type) {
|
|
2013
|
-
case 'drop':
|
|
2014
|
-
case 'dragend':
|
|
2015
|
-
this._onDrop(evt);
|
|
2016
|
-
break;
|
|
2017
|
-
case 'dragenter':
|
|
2018
|
-
case 'dragover':
|
|
2019
|
-
if (dragEl) {
|
|
2020
|
-
this._onDragOver(evt);
|
|
2021
|
-
_globalDragOver(evt);
|
|
2022
|
-
}
|
|
2023
|
-
break;
|
|
2024
|
-
case 'selectstart':
|
|
2025
|
-
evt.preventDefault();
|
|
2026
|
-
break;
|
|
2027
|
-
}
|
|
2028
|
-
},
|
|
2029
|
-
/**
|
|
2030
|
-
* Serializes the item into an array of string.
|
|
2031
|
-
* @returns {String[]}
|
|
2032
|
-
*/
|
|
2033
|
-
toArray: function toArray() {
|
|
2034
|
-
var order = [],
|
|
2035
|
-
el,
|
|
2036
|
-
children = this.el.children,
|
|
2037
|
-
i = 0,
|
|
2038
|
-
n = children.length,
|
|
2039
|
-
options = this.options;
|
|
2040
|
-
for (; i < n; i++) {
|
|
2041
|
-
el = children[i];
|
|
2042
|
-
if (closest(el, options.draggable, this.el, false)) {
|
|
2043
|
-
order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
|
|
2044
|
-
}
|
|
2045
|
-
}
|
|
2046
|
-
return order;
|
|
2047
|
-
},
|
|
2048
|
-
/**
|
|
2049
|
-
* Sorts the elements according to the array.
|
|
2050
|
-
* @param {String[]} order order of the items
|
|
2051
|
-
*/
|
|
2052
|
-
sort: function sort(order, useAnimation) {
|
|
2053
|
-
var items = {},
|
|
2054
|
-
rootEl = this.el;
|
|
2055
|
-
this.toArray().forEach(function (id, i) {
|
|
2056
|
-
var el = rootEl.children[i];
|
|
2057
|
-
if (closest(el, this.options.draggable, rootEl, false)) {
|
|
2058
|
-
items[id] = el;
|
|
2059
|
-
}
|
|
2060
|
-
}, this);
|
|
2061
|
-
useAnimation && this.captureAnimationState();
|
|
2062
|
-
order.forEach(function (id) {
|
|
2063
|
-
if (items[id]) {
|
|
2064
|
-
rootEl.removeChild(items[id]);
|
|
2065
|
-
rootEl.appendChild(items[id]);
|
|
2066
|
-
}
|
|
2067
|
-
});
|
|
2068
|
-
useAnimation && this.animateAll();
|
|
2069
|
-
},
|
|
2070
|
-
/**
|
|
2071
|
-
* Save the current sorting
|
|
2072
|
-
*/
|
|
2073
|
-
save: function save() {
|
|
2074
|
-
var store = this.options.store;
|
|
2075
|
-
store && store.set && store.set(this);
|
|
2076
|
-
},
|
|
2077
|
-
/**
|
|
2078
|
-
* 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.
|
|
2079
|
-
* @param {HTMLElement} el
|
|
2080
|
-
* @param {String} [selector] default: `options.draggable`
|
|
2081
|
-
* @returns {HTMLElement|null}
|
|
2082
|
-
*/
|
|
2083
|
-
closest: function closest$1(el, selector) {
|
|
2084
|
-
return closest(el, selector || this.options.draggable, this.el, false);
|
|
2085
|
-
},
|
|
2086
|
-
/**
|
|
2087
|
-
* Set/get option
|
|
2088
|
-
* @param {string} name
|
|
2089
|
-
* @param {*} [value]
|
|
2090
|
-
* @returns {*}
|
|
2091
|
-
*/
|
|
2092
|
-
option: function option(name, value) {
|
|
2093
|
-
var options = this.options;
|
|
2094
|
-
if (value === void 0) {
|
|
2095
|
-
return options[name];
|
|
2096
|
-
} else {
|
|
2097
|
-
var modifiedValue = PluginManager.modifyOption(this, name, value);
|
|
2098
|
-
if (typeof modifiedValue !== 'undefined') {
|
|
2099
|
-
options[name] = modifiedValue;
|
|
2100
|
-
} else {
|
|
2101
|
-
options[name] = value;
|
|
2102
|
-
}
|
|
2103
|
-
if (name === 'group') {
|
|
2104
|
-
_prepareGroup(options);
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
},
|
|
2108
|
-
/**
|
|
2109
|
-
* Destroy
|
|
2110
|
-
*/
|
|
2111
|
-
destroy: function destroy() {
|
|
2112
|
-
pluginEvent('destroy', this);
|
|
2113
|
-
var el = this.el;
|
|
2114
|
-
el[expando] = null;
|
|
2115
|
-
off(el, 'mousedown', this._onTapStart);
|
|
2116
|
-
off(el, 'touchstart', this._onTapStart);
|
|
2117
|
-
off(el, 'pointerdown', this._onTapStart);
|
|
2118
|
-
if (this.nativeDraggable) {
|
|
2119
|
-
off(el, 'dragover', this);
|
|
2120
|
-
off(el, 'dragenter', this);
|
|
2121
|
-
}
|
|
2122
|
-
// Remove draggable attributes
|
|
2123
|
-
Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
|
|
2124
|
-
el.removeAttribute('draggable');
|
|
2125
|
-
});
|
|
2126
|
-
this._onDrop();
|
|
2127
|
-
this._disableDelayedDragEvents();
|
|
2128
|
-
sortables.splice(sortables.indexOf(this.el), 1);
|
|
2129
|
-
this.el = el = null;
|
|
2130
|
-
},
|
|
2131
|
-
_hideClone: function _hideClone() {
|
|
2132
|
-
if (!cloneHidden) {
|
|
2133
|
-
pluginEvent('hideClone', this);
|
|
2134
|
-
if (Sortable.eventCanceled) return;
|
|
2135
|
-
css(cloneEl, 'display', 'none');
|
|
2136
|
-
if (this.options.removeCloneOnHide && cloneEl.parentNode) {
|
|
2137
|
-
cloneEl.parentNode.removeChild(cloneEl);
|
|
2138
|
-
}
|
|
2139
|
-
cloneHidden = true;
|
|
2140
|
-
}
|
|
2141
|
-
},
|
|
2142
|
-
_showClone: function _showClone(putSortable) {
|
|
2143
|
-
if (putSortable.lastPutMode !== 'clone') {
|
|
2144
|
-
this._hideClone();
|
|
2145
|
-
return;
|
|
2146
|
-
}
|
|
2147
|
-
if (cloneHidden) {
|
|
2148
|
-
pluginEvent('showClone', this);
|
|
2149
|
-
if (Sortable.eventCanceled) return;
|
|
2150
|
-
|
|
2151
|
-
// show clone at dragEl or original position
|
|
2152
|
-
if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
|
|
2153
|
-
rootEl.insertBefore(cloneEl, dragEl);
|
|
2154
|
-
} else if (nextEl) {
|
|
2155
|
-
rootEl.insertBefore(cloneEl, nextEl);
|
|
2156
|
-
} else {
|
|
2157
|
-
rootEl.appendChild(cloneEl);
|
|
2158
|
-
}
|
|
2159
|
-
if (this.options.group.revertClone) {
|
|
2160
|
-
this.animate(dragEl, cloneEl);
|
|
2161
|
-
}
|
|
2162
|
-
css(cloneEl, 'display', '');
|
|
2163
|
-
cloneHidden = false;
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
};
|
|
2167
|
-
function _globalDragOver( /**Event*/evt) {
|
|
2168
|
-
if (evt.dataTransfer) {
|
|
2169
|
-
evt.dataTransfer.dropEffect = 'move';
|
|
2170
|
-
}
|
|
2171
|
-
evt.cancelable && evt.preventDefault();
|
|
2172
|
-
}
|
|
2173
|
-
function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
|
|
2174
|
-
var evt,
|
|
2175
|
-
sortable = fromEl[expando],
|
|
2176
|
-
onMoveFn = sortable.options.onMove,
|
|
2177
|
-
retVal;
|
|
2178
|
-
// Support for new CustomEvent feature
|
|
2179
|
-
if (window.CustomEvent && !IE11OrLess && !Edge) {
|
|
2180
|
-
evt = new CustomEvent('move', {
|
|
2181
|
-
bubbles: true,
|
|
2182
|
-
cancelable: true
|
|
2183
|
-
});
|
|
2184
|
-
} else {
|
|
2185
|
-
evt = document.createEvent('Event');
|
|
2186
|
-
evt.initEvent('move', true, true);
|
|
2187
|
-
}
|
|
2188
|
-
evt.to = toEl;
|
|
2189
|
-
evt.from = fromEl;
|
|
2190
|
-
evt.dragged = dragEl;
|
|
2191
|
-
evt.draggedRect = dragRect;
|
|
2192
|
-
evt.related = targetEl || toEl;
|
|
2193
|
-
evt.relatedRect = targetRect || getRect(toEl);
|
|
2194
|
-
evt.willInsertAfter = willInsertAfter;
|
|
2195
|
-
evt.originalEvent = originalEvent;
|
|
2196
|
-
fromEl.dispatchEvent(evt);
|
|
2197
|
-
if (onMoveFn) {
|
|
2198
|
-
retVal = onMoveFn.call(sortable, evt, originalEvent);
|
|
2199
|
-
}
|
|
2200
|
-
return retVal;
|
|
2201
|
-
}
|
|
2202
|
-
function _disableDraggable(el) {
|
|
2203
|
-
el.draggable = false;
|
|
2204
|
-
}
|
|
2205
|
-
function _unsilent() {
|
|
2206
|
-
_silent = false;
|
|
2207
|
-
}
|
|
2208
|
-
function _ghostIsFirst(evt, vertical, sortable) {
|
|
2209
|
-
var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));
|
|
2210
|
-
var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
|
|
2211
|
-
var spacer = 10;
|
|
2212
|
-
return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;
|
|
2213
|
-
}
|
|
2214
|
-
function _ghostIsLast(evt, vertical, sortable) {
|
|
2215
|
-
var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));
|
|
2216
|
-
var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
|
|
2217
|
-
var spacer = 10;
|
|
2218
|
-
return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;
|
|
2219
|
-
}
|
|
2220
|
-
function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
|
|
2221
|
-
var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
|
|
2222
|
-
targetLength = vertical ? targetRect.height : targetRect.width,
|
|
2223
|
-
targetS1 = vertical ? targetRect.top : targetRect.left,
|
|
2224
|
-
targetS2 = vertical ? targetRect.bottom : targetRect.right,
|
|
2225
|
-
invert = false;
|
|
2226
|
-
if (!invertSwap) {
|
|
2227
|
-
// Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
|
|
2228
|
-
if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
|
|
2229
|
-
// multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
|
|
2230
|
-
// check if past first invert threshold on side opposite of lastDirection
|
|
2231
|
-
if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
|
|
2232
|
-
// past first invert threshold, do not restrict inverted threshold to dragEl shadow
|
|
2233
|
-
pastFirstInvertThresh = true;
|
|
2234
|
-
}
|
|
2235
|
-
if (!pastFirstInvertThresh) {
|
|
2236
|
-
// dragEl shadow (target move distance shadow)
|
|
2237
|
-
if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
|
|
2238
|
-
: mouseOnAxis > targetS2 - targetMoveDistance) {
|
|
2239
|
-
return -lastDirection;
|
|
2240
|
-
}
|
|
2241
|
-
} else {
|
|
2242
|
-
invert = true;
|
|
2243
|
-
}
|
|
2244
|
-
} else {
|
|
2245
|
-
// Regular
|
|
2246
|
-
if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
|
|
2247
|
-
return _getInsertDirection(target);
|
|
2248
|
-
}
|
|
2249
|
-
}
|
|
2250
|
-
}
|
|
2251
|
-
invert = invert || invertSwap;
|
|
2252
|
-
if (invert) {
|
|
2253
|
-
// Invert of regular
|
|
2254
|
-
if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
|
|
2255
|
-
return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
|
|
2256
|
-
}
|
|
2257
|
-
}
|
|
2258
|
-
return 0;
|
|
2259
|
-
}
|
|
2260
|
-
|
|
2261
|
-
/**
|
|
2262
|
-
* Gets the direction dragEl must be swapped relative to target in order to make it
|
|
2263
|
-
* seem that dragEl has been "inserted" into that element's position
|
|
2264
|
-
* @param {HTMLElement} target The target whose position dragEl is being inserted at
|
|
2265
|
-
* @return {Number} Direction dragEl must be swapped
|
|
2266
|
-
*/
|
|
2267
|
-
function _getInsertDirection(target) {
|
|
2268
|
-
if (index(dragEl) < index(target)) {
|
|
2269
|
-
return 1;
|
|
2270
|
-
} else {
|
|
2271
|
-
return -1;
|
|
2272
|
-
}
|
|
2273
|
-
}
|
|
2274
|
-
|
|
2275
|
-
/**
|
|
2276
|
-
* Generate id
|
|
2277
|
-
* @param {HTMLElement} el
|
|
2278
|
-
* @returns {String}
|
|
2279
|
-
* @private
|
|
2280
|
-
*/
|
|
2281
|
-
function _generateId(el) {
|
|
2282
|
-
var str = el.tagName + el.className + el.src + el.href + el.textContent,
|
|
2283
|
-
i = str.length,
|
|
2284
|
-
sum = 0;
|
|
2285
|
-
while (i--) {
|
|
2286
|
-
sum += str.charCodeAt(i);
|
|
2287
|
-
}
|
|
2288
|
-
return sum.toString(36);
|
|
2289
|
-
}
|
|
2290
|
-
function _saveInputCheckedState(root) {
|
|
2291
|
-
savedInputChecked.length = 0;
|
|
2292
|
-
var inputs = root.getElementsByTagName('input');
|
|
2293
|
-
var idx = inputs.length;
|
|
2294
|
-
while (idx--) {
|
|
2295
|
-
var el = inputs[idx];
|
|
2296
|
-
el.checked && savedInputChecked.push(el);
|
|
2297
|
-
}
|
|
2298
|
-
}
|
|
2299
|
-
function _nextTick(fn) {
|
|
2300
|
-
return setTimeout(fn, 0);
|
|
2301
|
-
}
|
|
2302
|
-
function _cancelNextTick(id) {
|
|
2303
|
-
return clearTimeout(id);
|
|
2304
|
-
}
|
|
2305
|
-
|
|
2306
|
-
// Fixed #973:
|
|
2307
|
-
if (documentExists) {
|
|
2308
|
-
on(document, 'touchmove', function (evt) {
|
|
2309
|
-
if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
|
|
2310
|
-
evt.preventDefault();
|
|
2311
|
-
}
|
|
2312
|
-
});
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
|
-
// Export utils
|
|
2316
|
-
Sortable.utils = {
|
|
2317
|
-
on: on,
|
|
2318
|
-
off: off,
|
|
2319
|
-
css: css,
|
|
2320
|
-
find: find,
|
|
2321
|
-
is: function is(el, selector) {
|
|
2322
|
-
return !!closest(el, selector, el, false);
|
|
2323
|
-
},
|
|
2324
|
-
extend: extend,
|
|
2325
|
-
throttle: throttle,
|
|
2326
|
-
closest: closest,
|
|
2327
|
-
toggleClass: toggleClass,
|
|
2328
|
-
clone: clone,
|
|
2329
|
-
index: index,
|
|
2330
|
-
nextTick: _nextTick,
|
|
2331
|
-
cancelNextTick: _cancelNextTick,
|
|
2332
|
-
detectDirection: _detectDirection,
|
|
2333
|
-
getChild: getChild
|
|
2334
|
-
};
|
|
2335
|
-
|
|
2336
|
-
/**
|
|
2337
|
-
* Get the Sortable instance of an element
|
|
2338
|
-
* @param {HTMLElement} element The element
|
|
2339
|
-
* @return {Sortable|undefined} The instance of Sortable
|
|
2340
|
-
*/
|
|
2341
|
-
Sortable.get = function (element) {
|
|
2342
|
-
return element[expando];
|
|
2343
|
-
};
|
|
2344
|
-
|
|
2345
|
-
/**
|
|
2346
|
-
* Mount a plugin to Sortable
|
|
2347
|
-
* @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
|
|
2348
|
-
*/
|
|
2349
|
-
Sortable.mount = function () {
|
|
2350
|
-
for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2351
|
-
plugins[_key] = arguments[_key];
|
|
2352
|
-
}
|
|
2353
|
-
if (plugins[0].constructor === Array) plugins = plugins[0];
|
|
2354
|
-
plugins.forEach(function (plugin) {
|
|
2355
|
-
if (!plugin.prototype || !plugin.prototype.constructor) {
|
|
2356
|
-
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
|
|
2357
|
-
}
|
|
2358
|
-
if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
|
|
2359
|
-
PluginManager.mount(plugin);
|
|
2360
|
-
});
|
|
2361
|
-
};
|
|
2362
|
-
|
|
2363
|
-
/**
|
|
2364
|
-
* Create sortable instance
|
|
2365
|
-
* @param {HTMLElement} el
|
|
2366
|
-
* @param {Object} [options]
|
|
2367
|
-
*/
|
|
2368
|
-
Sortable.create = function (el, options) {
|
|
2369
|
-
return new Sortable(el, options);
|
|
2370
|
-
};
|
|
2371
|
-
|
|
2372
|
-
// Export
|
|
2373
|
-
Sortable.version = version;
|
|
2374
|
-
|
|
2375
|
-
var autoScrolls = [],
|
|
2376
|
-
scrollEl,
|
|
2377
|
-
scrollRootEl,
|
|
2378
|
-
scrolling = false,
|
|
2379
|
-
lastAutoScrollX,
|
|
2380
|
-
lastAutoScrollY,
|
|
2381
|
-
touchEvt$1,
|
|
2382
|
-
pointerElemChangedInterval;
|
|
2383
|
-
function AutoScrollPlugin() {
|
|
2384
|
-
function AutoScroll() {
|
|
2385
|
-
this.defaults = {
|
|
2386
|
-
scroll: true,
|
|
2387
|
-
forceAutoScrollFallback: false,
|
|
2388
|
-
scrollSensitivity: 30,
|
|
2389
|
-
scrollSpeed: 10,
|
|
2390
|
-
bubbleScroll: true
|
|
2391
|
-
};
|
|
2392
|
-
|
|
2393
|
-
// Bind all private methods
|
|
2394
|
-
for (var fn in this) {
|
|
2395
|
-
if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
|
|
2396
|
-
this[fn] = this[fn].bind(this);
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
}
|
|
2400
|
-
AutoScroll.prototype = {
|
|
2401
|
-
dragStarted: function dragStarted(_ref) {
|
|
2402
|
-
var originalEvent = _ref.originalEvent;
|
|
2403
|
-
if (this.sortable.nativeDraggable) {
|
|
2404
|
-
on(document, 'dragover', this._handleAutoScroll);
|
|
2405
|
-
} else {
|
|
2406
|
-
if (this.options.supportPointer) {
|
|
2407
|
-
on(document, 'pointermove', this._handleFallbackAutoScroll);
|
|
2408
|
-
} else if (originalEvent.touches) {
|
|
2409
|
-
on(document, 'touchmove', this._handleFallbackAutoScroll);
|
|
2410
|
-
} else {
|
|
2411
|
-
on(document, 'mousemove', this._handleFallbackAutoScroll);
|
|
2412
|
-
}
|
|
2413
|
-
}
|
|
2414
|
-
},
|
|
2415
|
-
dragOverCompleted: function dragOverCompleted(_ref2) {
|
|
2416
|
-
var originalEvent = _ref2.originalEvent;
|
|
2417
|
-
// For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
|
|
2418
|
-
if (!this.options.dragOverBubble && !originalEvent.rootEl) {
|
|
2419
|
-
this._handleAutoScroll(originalEvent);
|
|
2420
|
-
}
|
|
2421
|
-
},
|
|
2422
|
-
drop: function drop() {
|
|
2423
|
-
if (this.sortable.nativeDraggable) {
|
|
2424
|
-
off(document, 'dragover', this._handleAutoScroll);
|
|
2425
|
-
} else {
|
|
2426
|
-
off(document, 'pointermove', this._handleFallbackAutoScroll);
|
|
2427
|
-
off(document, 'touchmove', this._handleFallbackAutoScroll);
|
|
2428
|
-
off(document, 'mousemove', this._handleFallbackAutoScroll);
|
|
2429
|
-
}
|
|
2430
|
-
clearPointerElemChangedInterval();
|
|
2431
|
-
clearAutoScrolls();
|
|
2432
|
-
cancelThrottle();
|
|
2433
|
-
},
|
|
2434
|
-
nulling: function nulling() {
|
|
2435
|
-
touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
|
|
2436
|
-
autoScrolls.length = 0;
|
|
2437
|
-
},
|
|
2438
|
-
_handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
|
|
2439
|
-
this._handleAutoScroll(evt, true);
|
|
2440
|
-
},
|
|
2441
|
-
_handleAutoScroll: function _handleAutoScroll(evt, fallback) {
|
|
2442
|
-
var _this = this;
|
|
2443
|
-
var x = (evt.touches ? evt.touches[0] : evt).clientX,
|
|
2444
|
-
y = (evt.touches ? evt.touches[0] : evt).clientY,
|
|
2445
|
-
elem = document.elementFromPoint(x, y);
|
|
2446
|
-
touchEvt$1 = evt;
|
|
2447
|
-
|
|
2448
|
-
// IE does not seem to have native autoscroll,
|
|
2449
|
-
// Edge's autoscroll seems too conditional,
|
|
2450
|
-
// MACOS Safari does not have autoscroll,
|
|
2451
|
-
// Firefox and Chrome are good
|
|
2452
|
-
if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
|
|
2453
|
-
autoScroll(evt, this.options, elem, fallback);
|
|
2454
|
-
|
|
2455
|
-
// Listener for pointer element change
|
|
2456
|
-
var ogElemScroller = getParentAutoScrollElement(elem, true);
|
|
2457
|
-
if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
|
|
2458
|
-
pointerElemChangedInterval && clearPointerElemChangedInterval();
|
|
2459
|
-
// Detect for pointer elem change, emulating native DnD behaviour
|
|
2460
|
-
pointerElemChangedInterval = setInterval(function () {
|
|
2461
|
-
var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
|
|
2462
|
-
if (newElem !== ogElemScroller) {
|
|
2463
|
-
ogElemScroller = newElem;
|
|
2464
|
-
clearAutoScrolls();
|
|
2465
|
-
}
|
|
2466
|
-
autoScroll(evt, _this.options, newElem, fallback);
|
|
2467
|
-
}, 10);
|
|
2468
|
-
lastAutoScrollX = x;
|
|
2469
|
-
lastAutoScrollY = y;
|
|
2470
|
-
}
|
|
2471
|
-
} else {
|
|
2472
|
-
// if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
|
|
2473
|
-
if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
|
|
2474
|
-
clearAutoScrolls();
|
|
2475
|
-
return;
|
|
2476
|
-
}
|
|
2477
|
-
autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
|
|
2478
|
-
}
|
|
2479
|
-
}
|
|
2480
|
-
};
|
|
2481
|
-
return _extends(AutoScroll, {
|
|
2482
|
-
pluginName: 'scroll',
|
|
2483
|
-
initializeByDefault: true
|
|
2484
|
-
});
|
|
2485
|
-
}
|
|
2486
|
-
function clearAutoScrolls() {
|
|
2487
|
-
autoScrolls.forEach(function (autoScroll) {
|
|
2488
|
-
clearInterval(autoScroll.pid);
|
|
2489
|
-
});
|
|
2490
|
-
autoScrolls = [];
|
|
2491
|
-
}
|
|
2492
|
-
function clearPointerElemChangedInterval() {
|
|
2493
|
-
clearInterval(pointerElemChangedInterval);
|
|
2494
|
-
}
|
|
2495
|
-
var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
|
|
2496
|
-
// Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
|
|
2497
|
-
if (!options.scroll) return;
|
|
2498
|
-
var x = (evt.touches ? evt.touches[0] : evt).clientX,
|
|
2499
|
-
y = (evt.touches ? evt.touches[0] : evt).clientY,
|
|
2500
|
-
sens = options.scrollSensitivity,
|
|
2501
|
-
speed = options.scrollSpeed,
|
|
2502
|
-
winScroller = getWindowScrollingElement();
|
|
2503
|
-
var scrollThisInstance = false,
|
|
2504
|
-
scrollCustomFn;
|
|
2505
|
-
|
|
2506
|
-
// New scroll root, set scrollEl
|
|
2507
|
-
if (scrollRootEl !== rootEl) {
|
|
2508
|
-
scrollRootEl = rootEl;
|
|
2509
|
-
clearAutoScrolls();
|
|
2510
|
-
scrollEl = options.scroll;
|
|
2511
|
-
scrollCustomFn = options.scrollFn;
|
|
2512
|
-
if (scrollEl === true) {
|
|
2513
|
-
scrollEl = getParentAutoScrollElement(rootEl, true);
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
|
-
var layersOut = 0;
|
|
2517
|
-
var currentParent = scrollEl;
|
|
2518
|
-
do {
|
|
2519
|
-
var el = currentParent,
|
|
2520
|
-
rect = getRect(el),
|
|
2521
|
-
top = rect.top,
|
|
2522
|
-
bottom = rect.bottom,
|
|
2523
|
-
left = rect.left,
|
|
2524
|
-
right = rect.right,
|
|
2525
|
-
width = rect.width,
|
|
2526
|
-
height = rect.height,
|
|
2527
|
-
canScrollX = void 0,
|
|
2528
|
-
canScrollY = void 0,
|
|
2529
|
-
scrollWidth = el.scrollWidth,
|
|
2530
|
-
scrollHeight = el.scrollHeight,
|
|
2531
|
-
elCSS = css(el),
|
|
2532
|
-
scrollPosX = el.scrollLeft,
|
|
2533
|
-
scrollPosY = el.scrollTop;
|
|
2534
|
-
if (el === winScroller) {
|
|
2535
|
-
canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
|
|
2536
|
-
canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
|
|
2537
|
-
} else {
|
|
2538
|
-
canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
|
|
2539
|
-
canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
|
|
2540
|
-
}
|
|
2541
|
-
var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
|
|
2542
|
-
var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
|
|
2543
|
-
if (!autoScrolls[layersOut]) {
|
|
2544
|
-
for (var i = 0; i <= layersOut; i++) {
|
|
2545
|
-
if (!autoScrolls[i]) {
|
|
2546
|
-
autoScrolls[i] = {};
|
|
2547
|
-
}
|
|
2548
|
-
}
|
|
2549
|
-
}
|
|
2550
|
-
if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
|
|
2551
|
-
autoScrolls[layersOut].el = el;
|
|
2552
|
-
autoScrolls[layersOut].vx = vx;
|
|
2553
|
-
autoScrolls[layersOut].vy = vy;
|
|
2554
|
-
clearInterval(autoScrolls[layersOut].pid);
|
|
2555
|
-
if (vx != 0 || vy != 0) {
|
|
2556
|
-
scrollThisInstance = true;
|
|
2557
|
-
/* jshint loopfunc:true */
|
|
2558
|
-
autoScrolls[layersOut].pid = setInterval(function () {
|
|
2559
|
-
// emulate drag over during autoscroll (fallback), emulating native DnD behaviour
|
|
2560
|
-
if (isFallback && this.layer === 0) {
|
|
2561
|
-
Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
|
|
2562
|
-
}
|
|
2563
|
-
var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
|
|
2564
|
-
var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
|
|
2565
|
-
if (typeof scrollCustomFn === 'function') {
|
|
2566
|
-
if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
|
|
2567
|
-
return;
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2570
|
-
scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
|
|
2571
|
-
}.bind({
|
|
2572
|
-
layer: layersOut
|
|
2573
|
-
}), 24);
|
|
2574
|
-
}
|
|
2575
|
-
}
|
|
2576
|
-
layersOut++;
|
|
2577
|
-
} while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
|
|
2578
|
-
scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
|
|
2579
|
-
}, 30);
|
|
2580
|
-
|
|
2581
|
-
var drop = function drop(_ref) {
|
|
2582
|
-
var originalEvent = _ref.originalEvent,
|
|
2583
|
-
putSortable = _ref.putSortable,
|
|
2584
|
-
dragEl = _ref.dragEl,
|
|
2585
|
-
activeSortable = _ref.activeSortable,
|
|
2586
|
-
dispatchSortableEvent = _ref.dispatchSortableEvent,
|
|
2587
|
-
hideGhostForTarget = _ref.hideGhostForTarget,
|
|
2588
|
-
unhideGhostForTarget = _ref.unhideGhostForTarget;
|
|
2589
|
-
if (!originalEvent) return;
|
|
2590
|
-
var toSortable = putSortable || activeSortable;
|
|
2591
|
-
hideGhostForTarget();
|
|
2592
|
-
var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
|
|
2593
|
-
var target = document.elementFromPoint(touch.clientX, touch.clientY);
|
|
2594
|
-
unhideGhostForTarget();
|
|
2595
|
-
if (toSortable && !toSortable.el.contains(target)) {
|
|
2596
|
-
dispatchSortableEvent('spill');
|
|
2597
|
-
this.onSpill({
|
|
2598
|
-
dragEl: dragEl,
|
|
2599
|
-
putSortable: putSortable
|
|
2600
|
-
});
|
|
2601
|
-
}
|
|
2602
|
-
};
|
|
2603
|
-
function Revert() {}
|
|
2604
|
-
Revert.prototype = {
|
|
2605
|
-
startIndex: null,
|
|
2606
|
-
dragStart: function dragStart(_ref2) {
|
|
2607
|
-
var oldDraggableIndex = _ref2.oldDraggableIndex;
|
|
2608
|
-
this.startIndex = oldDraggableIndex;
|
|
2609
|
-
},
|
|
2610
|
-
onSpill: function onSpill(_ref3) {
|
|
2611
|
-
var dragEl = _ref3.dragEl,
|
|
2612
|
-
putSortable = _ref3.putSortable;
|
|
2613
|
-
this.sortable.captureAnimationState();
|
|
2614
|
-
if (putSortable) {
|
|
2615
|
-
putSortable.captureAnimationState();
|
|
2616
|
-
}
|
|
2617
|
-
var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
|
|
2618
|
-
if (nextSibling) {
|
|
2619
|
-
this.sortable.el.insertBefore(dragEl, nextSibling);
|
|
2620
|
-
} else {
|
|
2621
|
-
this.sortable.el.appendChild(dragEl);
|
|
2622
|
-
}
|
|
2623
|
-
this.sortable.animateAll();
|
|
2624
|
-
if (putSortable) {
|
|
2625
|
-
putSortable.animateAll();
|
|
2626
|
-
}
|
|
2627
|
-
},
|
|
2628
|
-
drop: drop
|
|
2629
|
-
};
|
|
2630
|
-
_extends(Revert, {
|
|
2631
|
-
pluginName: 'revertOnSpill'
|
|
2632
|
-
});
|
|
2633
|
-
function Remove() {}
|
|
2634
|
-
Remove.prototype = {
|
|
2635
|
-
onSpill: function onSpill(_ref4) {
|
|
2636
|
-
var dragEl = _ref4.dragEl,
|
|
2637
|
-
putSortable = _ref4.putSortable;
|
|
2638
|
-
var parentSortable = putSortable || this.sortable;
|
|
2639
|
-
parentSortable.captureAnimationState();
|
|
2640
|
-
dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
|
|
2641
|
-
parentSortable.animateAll();
|
|
2642
|
-
},
|
|
2643
|
-
drop: drop
|
|
2644
|
-
};
|
|
2645
|
-
_extends(Remove, {
|
|
2646
|
-
pluginName: 'removeOnSpill'
|
|
2647
|
-
});
|
|
2648
|
-
|
|
2649
|
-
Sortable.mount(new AutoScrollPlugin());
|
|
2650
|
-
Sortable.mount(Remove, Revert);
|
|
2651
|
-
|
|
2652
|
-
const pdsSortableCss = ".pds-sortable.sc-pds-sortable-h{--border-radius:var(--pine-border-radius-050);--border-default:var(--pine-border-width-thin) solid var(--pine-color-grey-300);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-sortable.pds-sortable--bordered.sc-pds-sortable-h{border:var(--border-default);border-radius:var(--border-radius)}";
|
|
2653
|
-
const PdsSortableStyle0 = pdsSortableCss;
|
|
2654
|
-
|
|
2655
|
-
const PdsSortable$1 = /*@__PURE__*/ proxyCustomElement(class PdsSortable extends HTMLElement {
|
|
2656
|
-
constructor() {
|
|
2657
|
-
super();
|
|
2658
|
-
this.__registerHost();
|
|
2659
|
-
this.pdsSortableItemMoved = createEvent(this, "pdsSortableItemMoved", 7);
|
|
2660
|
-
this.border = false;
|
|
2661
|
-
this.componentId = undefined;
|
|
2662
|
-
this.dividers = false;
|
|
2663
|
-
this.handleType = 'row';
|
|
2664
|
-
}
|
|
2665
|
-
classNames() {
|
|
2666
|
-
const classNames = ['pds-sortable'];
|
|
2667
|
-
if (this.border) {
|
|
2668
|
-
classNames.push('pds-sortable--bordered');
|
|
2669
|
-
}
|
|
2670
|
-
if (this.dividers) {
|
|
2671
|
-
classNames.push('pds-sortable--divided');
|
|
2672
|
-
}
|
|
2673
|
-
if (this.handleType !== undefined) {
|
|
2674
|
-
classNames.push(`pds-sortable--handle-type-${this.handleType}`);
|
|
2675
|
-
}
|
|
2676
|
-
return classNames.join(' ');
|
|
2677
|
-
}
|
|
2678
|
-
componentDidLoad() {
|
|
2679
|
-
let sortableOptions = {
|
|
2680
|
-
animation: 150,
|
|
2681
|
-
ghostClass: 'pds-sortable-item--ghost',
|
|
2682
|
-
dragClass: 'pds-sortable-item--drag',
|
|
2683
|
-
onEnd: (evt) => {
|
|
2684
|
-
this.pdsSortableItemMoved.emit(evt);
|
|
2685
|
-
},
|
|
2686
|
-
};
|
|
2687
|
-
if (this.handleType === 'handle') {
|
|
2688
|
-
sortableOptions = Object.assign(Object.assign({}, sortableOptions), { handle: '.pds-sortable-item__handle' });
|
|
2689
|
-
}
|
|
2690
|
-
Sortable.create(this.el, sortableOptions);
|
|
2691
|
-
}
|
|
2692
|
-
render() {
|
|
2693
|
-
return (h(Host, { key: '030286aa0de920f4b5ce4470f3d1b5ab14be2792', class: this.classNames(), id: this.componentId }, h("slot", { key: 'c38822d7c82273c2fbc28d09c919e4c179ebb49d' })));
|
|
2694
|
-
}
|
|
2695
|
-
get el() { return this; }
|
|
2696
|
-
static get style() { return PdsSortableStyle0; }
|
|
2697
|
-
}, [6, "pds-sortable", {
|
|
2698
|
-
"border": [516],
|
|
2699
|
-
"componentId": [1, "component-id"],
|
|
2700
|
-
"dividers": [516],
|
|
2701
|
-
"handleType": [1, "handle-type"]
|
|
2702
|
-
}]);
|
|
2703
|
-
function defineCustomElement$1() {
|
|
2704
|
-
if (typeof customElements === "undefined") {
|
|
2705
|
-
return;
|
|
2706
|
-
}
|
|
2707
|
-
const components = ["pds-sortable"];
|
|
2708
|
-
components.forEach(tagName => { switch (tagName) {
|
|
2709
|
-
case "pds-sortable":
|
|
2710
|
-
if (!customElements.get(tagName)) {
|
|
2711
|
-
customElements.define(tagName, PdsSortable$1);
|
|
2712
|
-
}
|
|
2713
|
-
break;
|
|
2714
|
-
} });
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
|
-
const PdsSortable = PdsSortable$1;
|
|
2718
|
-
const defineCustomElement = defineCustomElement$1;
|
|
2719
|
-
|
|
2720
|
-
export { PdsSortable, defineCustomElement };
|
|
2721
|
-
|
|
2722
|
-
//# sourceMappingURL=pds-sortable.js.map
|
|
7
|
+
*/function a(t,n,i){return(n=function(t){var n=function(t,n){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var e=i.call(t,n);if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return t+""}(t,"string");return"symbol"==typeof n?n:n+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function s(){return s=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)({}).hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},s.apply(null,arguments)}function u(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,e)}return i}function l(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?u(Object(i),!0).forEach((function(n){a(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function f(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var h=f(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=f(/Edge/i),v=f(/firefox/i),m=f(/safari/i)&&!f(/chrome/i)&&!f(/android/i),p=f(/iP(ad|od|hone)/i),b=f(/chrome/i)&&f(/android/i),g={capture:!1,passive:!1};function w(t,n,i){t.addEventListener(n,i,!h&&g)}function y(t,n,i){t.removeEventListener(n,i,!h&&g)}function E(t,n){if(n){if(">"===n[0]&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch(t){return!1}return!1}}function S(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function x(t,n,i,e){if(t){i=i||document;do{if(null!=n&&(">"===n[0]?t.parentNode===i&&E(t,n):E(t,n))||e&&t===i)return t;if(t===i)break}while(t=S(t))}return null}var T,M=/\s+/g;function I(t,n,i){if(t&&n)if(t.classList)t.classList[i?"add":"remove"](n);else{var e=(" "+t.className+" ").replace(M," ").replace(" "+n+" "," ");t.className=(e+(i?" "+n:"")).replace(M," ")}}function O(t,n,i){var e=t&&t.style;if(e){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===n?i:i[n];n in e||-1!==n.indexOf("webkit")||(n="-webkit-"+n),e[n]=i+("string"==typeof i?"":"px")}}function D(t,n){var i="";if("string"==typeof t)i=t;else do{var e=O(t,"transform");e&&"none"!==e&&(i=e+" "+i)}while(!n&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function _(t,n,i){if(t){var e=t.getElementsByTagName(n),o=0,r=e.length;if(i)for(;o<r;o++)i(e[o],o);return e}return[]}function C(){return document.scrollingElement||document.documentElement}function k(t,n,i,e,o){if(t.getBoundingClientRect||t===window){var r,a,s,u,l,c,f;if(t!==window&&t.parentNode&&t!==C()?(a=(r=t.getBoundingClientRect()).top,s=r.left,u=r.bottom,l=r.right,c=r.height,f=r.width):(a=0,s=0,u=window.innerHeight,l=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(n||i)&&t!==window&&(o=o||t.parentNode,!h))do{if(o&&o.getBoundingClientRect&&("none"!==O(o,"transform")||i&&"static"!==O(o,"position"))){var d=o.getBoundingClientRect();a-=d.top+parseInt(O(o,"border-top-width")),s-=d.left+parseInt(O(o,"border-left-width")),u=a+r.height,l=s+r.width;break}}while(o=o.parentNode);if(e&&t!==window){var v=D(o||t),m=v&&v.a,p=v&&v.d;v&&(u=(a/=p)+(c/=p),l=(s/=m)+(f/=m))}return{top:a,left:s,bottom:u,right:l,width:f,height:c}}}function j(t,n,i){for(var e=F(t,!0),o=k(t)[n];e;){if(!(o>=k(e)[i]))return e;if(e===C())break;e=F(e,!1)}return!1}function A(t,n,i,e){for(var o=0,r=0,a=t.children;r<a.length;){if("none"!==a[r].style.display&&a[r]!==Gt.ghost&&(e||a[r]!==Gt.dragged)&&x(a[r],i.draggable,t,!1)){if(o===n)return a[r];o++}r++}return null}function z(t,n){for(var i=t.lastElementChild;i&&(i===Gt.ghost||"none"===O(i,"display")||n&&!E(i,n));)i=i.previousElementSibling;return i||null}function N(t,n){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Gt.clone||n&&!E(t,n)||i++;return i}function P(t){var n=0,i=0,e=C();if(t)do{var o=D(t);n+=t.scrollLeft*o.a,i+=t.scrollTop*o.d}while(t!==e&&(t=t.parentNode));return[n,i]}function F(t,n){if(!t||!t.getBoundingClientRect)return C();var i=t,e=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var o=O(i);if(i.clientWidth<i.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!i.getBoundingClientRect||i===document.body)return C();if(e||n)return i;e=!0}}}while(i=i.parentNode);return C()}function B(t,n){return Math.round(t.top)===Math.round(n.top)&&Math.round(t.left)===Math.round(n.left)&&Math.round(t.height)===Math.round(n.height)&&Math.round(t.width)===Math.round(n.width)}function H(t,n){return function(){if(!T){var i=arguments;1===i.length?t.call(this,i[0]):t.apply(this,i),T=setTimeout((function(){T=void 0}),n)}}}function G(t,n,i){t.scrollLeft+=n,t.scrollTop+=i}function L(t){var n=window.Polymer,i=window.jQuery||window.Zepto;return n&&n.dom?n.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}function R(t,n,i){var e={};return Array.from(t.children).forEach((function(o){var r,a,s,u;if(x(o,n.draggable,t,!1)&&!o.animated&&o!==i){var l=k(o);e.left=Math.min(null!==(r=e.left)&&void 0!==r?r:1/0,l.left),e.top=Math.min(null!==(a=e.top)&&void 0!==a?a:1/0,l.top),e.right=Math.max(null!==(s=e.right)&&void 0!==s?s:-1/0,l.right),e.bottom=Math.max(null!==(u=e.bottom)&&void 0!==u?u:-1/0,l.bottom)}})),e.width=e.right-e.left,e.height=e.bottom-e.top,e.x=e.left,e.y=e.top,e}var W="Sortable"+(new Date).getTime();var X=[],Y={initializeByDefault:!0},U={mount:function(t){for(var n in Y)Y.hasOwnProperty(n)&&!(n in t)&&(t[n]=Y[n]);X.forEach((function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),X.push(t)},pluginEvent:function(t,n,i){var e=this;this.eventCanceled=!1,i.cancel=function(){e.eventCanceled=!0};var o=t+"Global";X.forEach((function(e){n[e.pluginName]&&(n[e.pluginName][o]&&n[e.pluginName][o](l({sortable:n},i)),n.options[e.pluginName]&&n[e.pluginName][t]&&n[e.pluginName][t](l({sortable:n},i)))}))},initializePlugins:function(t,n,i){for(var e in X.forEach((function(e){var o=e.pluginName;if(t.options[o]||e.initializeByDefault){var r=new e(t,n,t.options);r.sortable=t,r.options=t.options,t[o]=r,s(i,r.defaults)}})),t.options)if(t.options.hasOwnProperty(e)){var o=this.modifyOption(t,e,t.options[e]);void 0!==o&&(t.options[e]=o)}},getEventProperties:function(t,n){var i={};return X.forEach((function(e){"function"==typeof e.eventProperties&&s(i,e.eventProperties.call(n[e.pluginName],t))})),i},modifyOption:function(t,n,i){var e;return X.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[n]&&(e=o.optionListeners[n].call(t[o.pluginName],i))})),e}},V=["evt"],Z=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},e=i.evt,o=function(t,n){if(null==t)return{};var i,e,o=function(t,n){if(null==t)return{};var i={};for(var e in t)if({}.hasOwnProperty.call(t,e)){if(-1!==n.indexOf(e))continue;i[e]=t[e]}return i}(t,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(e=0;e<r.length;e++)-1===n.indexOf(i=r[e])&&{}.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}(i,V);U.pluginEvent.bind(Gt)(t,n,l({dragEl:q,parentEl:J,ghostEl:K,rootEl:Q,nextEl:tt,lastDownEl:nt,cloneEl:it,cloneHidden:et,dragStarted:pt,putSortable:lt,activeSortable:Gt.active,originalEvent:e,oldIndex:ot,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:st,hideGhostForTarget:Pt,unhideGhostForTarget:Ft,cloneNowHidden:function(){et=!0},cloneNowShown:function(){et=!1},dispatchSortableEvent:function(t){$({sortable:n,name:t,originalEvent:e})}},o))};function $(t){!function(t){var n=t.sortable,i=t.rootEl,e=t.name,o=t.targetEl,r=t.cloneEl,a=t.toEl,s=t.fromEl,u=t.oldIndex,c=t.newIndex,f=t.oldDraggableIndex,v=t.newDraggableIndex,m=t.originalEvent,p=t.putSortable,b=t.extraEventProperties;if(n=n||i&&i[W]){var g,w=n.options,y="on"+e.charAt(0).toUpperCase()+e.substr(1);!window.CustomEvent||h||d?(g=document.createEvent("Event")).initEvent(e,!0,!0):g=new CustomEvent(e,{bubbles:!0,cancelable:!0}),g.to=a||i,g.from=s||i,g.item=o||i,g.clone=r,g.oldIndex=u,g.newIndex=c,g.oldDraggableIndex=f,g.newDraggableIndex=v,g.originalEvent=m,g.pullMode=p?p.lastPutMode:void 0;var E=l(l({},b),U.getEventProperties(e,n));for(var S in E)g[S]=E[S];i&&i.dispatchEvent(g),w[y]&&w[y].call(n,g)}}(l({putSortable:lt,cloneEl:it,targetEl:q,rootEl:Q,oldIndex:ot,oldDraggableIndex:at,newIndex:rt,newDraggableIndex:st},t))}var q,J,K,Q,tt,nt,it,et,ot,rt,at,st,ut,lt,ct,ft,ht,dt,vt,mt,pt,bt,gt,wt,yt,Et=!1,St=!1,xt=[],Tt=!1,Mt=!1,It=[],Ot=!1,Dt=[],_t="undefined"!=typeof document,Ct=p,kt=d||h?"cssFloat":"float",jt=_t&&!b&&!p&&"draggable"in document.createElement("div"),At=function(){if(_t){if(h)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),zt=function(t,n){var i=O(t),e=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=A(t,0,n),r=A(t,1,n),a=o&&O(o),s=r&&O(r),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+k(o).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+k(r).width;return"flex"===i.display?"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal":"grid"===i.display?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":o&&a.float&&"none"!==a.float?!r||"both"!==s.clear&&s.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=e&&"none"===i[kt]||r&&"none"===i[kt]&&u+l>e)?"vertical":"horizontal"},Nt=function(t){function n(t,i){return function(e,o,r,a){if(null==t&&(i||e.options.group.name&&o.options.group.name&&e.options.group.name===o.options.group.name))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return n(t(e,o,r,a),i)(e,o,r,a);var s=(i?e:o).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var i={},e=t.group;e&&"object"==c(e)||(e={name:e}),i.name=e.name,i.checkPull=n(e.pull,!0),i.checkPut=n(e.put),i.revertClone=e.revertClone,t.group=i},Pt=function(){!At&&K&&O(K,"display","none")},Ft=function(){!At&&K&&O(K,"display","")};_t&&!b&&document.addEventListener("click",(function(t){if(St)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),St=!1,!1}),!0);var Bt=function(t){if(q){var n=function(t,n){var i;return xt.some((function(e){var o=e[W].options.emptyInsertThreshold;if(o&&!z(e)){var r=k(e);return t>=r.left-o&&t<=r.right+o&&n>=r.top-o&&n<=r.bottom+o?i=e:void 0}})),i}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(n){var i={};for(var e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[W]._onDragOver(i)}}},Ht=function(t){q&&q.parentNode[W]._isOutsideThisEl(t.target)};function Gt(t,n){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=n=s({},n),t[W]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return zt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,n){t.setData("Text",n.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Gt.supportPointer&&"PointerEvent"in window&&(!m||p),emptyInsertThreshold:5};for(var e in U.initializePlugins(this,t,i),i)!(e in n)&&(n[e]=i[e]);for(var o in Nt(n),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!n.forceFallback&&jt,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?w(t,"pointerdown",this._onTapStart):(w(t,"mousedown",this._onTapStart),w(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(t,"dragover",this),w(t,"dragenter",this)),xt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),s(this,function(){var t,n=[];return{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==O(t,"display")&&t!==Gt.ghost){n.push({target:t,rect:k(t)});var i=l({},n[n.length-1].rect);if(t.thisAnimationDuration){var e=D(t,!0);e&&(i.top-=e.f,i.left-=e.e)}t.fromRect=i}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,n){for(var i in t)if(t.hasOwnProperty(i))for(var e in n)if(n.hasOwnProperty(e)&&n[e]===t[i][e])return Number(i);return-1}(n,{target:t}),1)},animateAll:function(i){var e=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof i&&i());var o=!1,r=0;n.forEach((function(t){var n=0,i=t.target,a=i.fromRect,s=k(i),u=i.prevFromRect,l=i.prevToRect,c=t.rect,f=D(i,!0);f&&(s.top-=f.f,s.left-=f.e),i.toRect=s,i.thisAnimationDuration&&B(u,s)&&!B(a,s)&&(c.top-s.top)/(c.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(n=function(t,n,i,e){return Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))/Math.sqrt(Math.pow(n.top-i.top,2)+Math.pow(n.left-i.left,2))*e.animation}(c,u,l,e.options)),B(s,a)||(i.prevFromRect=a,i.prevToRect=s,n||(n=e.options.animation),e.animate(i,c,s,n)),n&&(o=!0,r=Math.max(r,n),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),n),i.thisAnimationDuration=n)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof i&&i()}),r):"function"==typeof i&&i(),n=[]},animate:function(t,n,i,e){if(e){O(t,"transition",""),O(t,"transform","");var o=D(this.el),r=(n.left-i.left)/(o&&o.a||1),a=(n.top-i.top)/(o&&o.d||1);t.animatingX=!!r,t.animatingY=!!a,O(t,"transform","translate3d("+r+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),O(t,"transition","transform "+e+"ms"+(this.options.easing?" "+this.options.easing:"")),O(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){O(t,"transition",""),O(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),e)}}}}())}function Lt(t,n,i,e,o,r,a,s){var u,l,c=t[W],f=c.options.onMove;return!window.CustomEvent||h||d?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=n,u.from=t,u.dragged=i,u.draggedRect=e,u.related=o||n,u.relatedRect=r||k(n),u.willInsertAfter=s,u.originalEvent=a,t.dispatchEvent(u),f&&(l=f.call(c,u,a)),l}function Rt(t){t.draggable=!1}function Wt(){Ot=!1}function Xt(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,i=n.length,e=0;i--;)e+=n.charCodeAt(i);return e.toString(36)}function Yt(t){return setTimeout(t,0)}function Ut(t){return clearTimeout(t)}Gt.prototype={constructor:Gt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,n){return"function"==typeof this.options.direction?this.options.direction.call(this,t,n,q):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,e=this.options,o=e.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,l=e.filter;if(function(t){Dt.length=0;for(var n=t.getElementsByTagName("input"),i=n.length;i--;){var e=n[i];e.checked&&Dt.push(e)}}(i),!q&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||e.disabled)&&!u.isContentEditable&&(this.nativeDraggable||!m||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=x(s,e.draggable,i,!1))&&s.animated||nt===s)){if(ot=N(s),at=N(s,e.draggable),"function"==typeof l){if(l.call(this,t,s,this))return $({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:i,fromEl:i}),Z("filter",n,{evt:t}),void(o&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(e){if(e=x(u,e.trim(),i,!1))return $({sortable:n,rootEl:e,name:"filter",targetEl:s,fromEl:i,toEl:i}),Z("filter",n,{evt:t}),!0}))))return void(o&&t.preventDefault());e.handle&&!x(u,e.handle,i,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,n,i){var e,o=this,r=o.el,a=o.options,s=r.ownerDocument;if(i&&!q&&i.parentNode===r){var u=k(i);if(Q=r,J=(q=i).parentNode,tt=q.nextSibling,nt=i,ut=a.group,Gt.dragged=q,vt=(ct={target:q,clientX:(n||t).clientX,clientY:(n||t).clientY}).clientX-u.left,mt=ct.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,q.style["will-change"]="all",e=function(){Z("delayEnded",o,{evt:t}),Gt.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!v&&o.nativeDraggable&&(q.draggable=!0),o._triggerDragStart(t,n),$({sortable:o,name:"choose",originalEvent:t}),I(q,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){_(q,t.trim(),Rt)})),w(s,"dragover",Bt),w(s,"mousemove",Bt),w(s,"touchmove",Bt),a.supportPointer?(w(s,"pointerup",o._onDrop),!this.nativeDraggable&&w(s,"pointercancel",o._onDrop)):(w(s,"mouseup",o._onDrop),w(s,"touchend",o._onDrop),w(s,"touchcancel",o._onDrop)),v&&this.nativeDraggable&&(this.options.touchStartThreshold=4,q.draggable=!0),Z("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!n||this.nativeDraggable&&(d||h))e();else{if(Gt.eventCanceled)return void this._onDrop();a.supportPointer?(w(s,"pointerup",o._disableDelayedDrag),w(s,"pointercancel",o._disableDelayedDrag)):(w(s,"mouseup",o._disableDelayedDrag),w(s,"touchend",o._disableDelayedDrag),w(s,"touchcancel",o._disableDelayedDrag)),w(s,"mousemove",o._delayedDragTouchMoveHandler),w(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&w(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(e,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){q&&Rt(q),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._disableDelayedDrag),y(t,"touchend",this._disableDelayedDrag),y(t,"touchcancel",this._disableDelayedDrag),y(t,"pointerup",this._disableDelayedDrag),y(t,"pointercancel",this._disableDelayedDrag),y(t,"mousemove",this._delayedDragTouchMoveHandler),y(t,"touchmove",this._delayedDragTouchMoveHandler),y(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||"touch"==t.pointerType&&t,!this.nativeDraggable||n?w(document,this.options.supportPointer?"pointermove":n?"touchmove":"mousemove",this._onTouchMove):(w(q,"dragend",this),w(Q,"dragstart",this._onDragStart));try{document.selection?Yt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,n){if(Et=!1,Q&&q){Z("dragStarted",this,{evt:n}),this.nativeDraggable&&w(document,"dragover",Ht);var i=this.options;!t&&I(q,i.dragClass,!1),I(q,i.ghostClass,!0),Gt.active=this,t&&this._appendGhost(),$({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ft){this._lastX=ft.clientX,this._lastY=ft.clientY,Pt();for(var t=document.elementFromPoint(ft.clientX,ft.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ft.clientX,ft.clientY))!==n;)n=t;if(q.parentNode[W]._isOutsideThisEl(t),n)do{if(n[W]&&n[W]._onDragOver({clientX:ft.clientX,clientY:ft.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break;t=n}while(n=S(n));Ft()}},_onTouchMove:function(t){if(ct){var n=this.options,i=n.fallbackTolerance,e=n.fallbackOffset,o=t.touches?t.touches[0]:t,r=K&&D(K,!0),a=K&&r&&r.a,s=K&&r&&r.d,u=Ct&&yt&&P(yt),l=(o.clientX-ct.clientX+e.x)/(a||1)+(u?u[0]-It[0]:0)/(a||1),c=(o.clientY-ct.clientY+e.y)/(s||1)+(u?u[1]-It[1]:0)/(s||1);if(!Gt.active&&!Et){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(K){r?(r.e+=l-(ht||0),r.f+=c-(dt||0)):r={a:1,b:0,c:0,d:1,e:l,f:c};var f="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");O(K,"webkitTransform",f),O(K,"mozTransform",f),O(K,"msTransform",f),O(K,"transform",f),ht=l,dt=c,ft=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!K){var t=this.options.fallbackOnBody?document.body:Q,n=k(q,!0,Ct,!0,t),i=this.options;if(Ct){for(yt=t;"static"===O(yt,"position")&&"none"===O(yt,"transform")&&yt!==document;)yt=yt.parentNode;yt!==document.body&&yt!==document.documentElement?(yt===document&&(yt=C()),n.top+=yt.scrollTop,n.left+=yt.scrollLeft):yt=C(),It=P(yt)}I(K=q.cloneNode(!0),i.ghostClass,!1),I(K,i.fallbackClass,!0),I(K,i.dragClass,!0),O(K,"transition",""),O(K,"transform",""),O(K,"box-sizing","border-box"),O(K,"margin",0),O(K,"top",n.top),O(K,"left",n.left),O(K,"width",n.width),O(K,"height",n.height),O(K,"opacity","0.8"),O(K,"position",Ct?"absolute":"fixed"),O(K,"zIndex","100000"),O(K,"pointerEvents","none"),Gt.ghost=K,t.appendChild(K),O(K,"transform-origin",vt/parseInt(K.style.width)*100+"% "+mt/parseInt(K.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,e=t.dataTransfer,o=i.options;Z("dragStart",this,{evt:t}),Gt.eventCanceled?this._onDrop():(Z("setupClone",this),Gt.eventCanceled||((it=L(q)).removeAttribute("id"),it.draggable=!1,it.style["will-change"]="",this._hideClone(),I(it,this.options.chosenClass,!1),Gt.clone=it),i.cloneId=Yt((function(){Z("clone",i),Gt.eventCanceled||(i.options.removeCloneOnHide||Q.insertBefore(it,q),i._hideClone(),$({sortable:i,name:"clone"}))})),!n&&I(q,o.dragClass,!0),n?(St=!0,i._loopId=setInterval(i._emulateDragOver,50)):(y(document,"mouseup",i._onDrop),y(document,"touchend",i._onDrop),y(document,"touchcancel",i._onDrop),e&&(e.effectAllowed="move",o.setData&&o.setData.call(i,e,q)),w(document,"drop",i),O(q,"transform","translateZ(0)")),Et=!0,i._dragStartId=Yt(i._dragStarted.bind(i,n,t)),w(document,"selectstart",i),pt=!0,window.getSelection().removeAllRanges(),m&&O(document.body,"user-select","none"))},_onDragOver:function(t){var n,i,e,o,r=this.el,a=t.target,s=this.options,u=s.group,c=Gt.active,f=ut===u,h=s.sort,d=lt||c,v=this,m=!1;if(!Ot){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=x(a,s.draggable,r,!0),B("dragOver"),Gt.eventCanceled)return m;if(q.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||v._ignoreWhileAnimating===a)return L(!1);if(St=!1,c&&!s.disabled&&(f?h||(e=J!==Q):lt===this||(this.lastPutMode=ut.checkPull(this,c,q,t))&&u.checkPut(this,c,q,t))){if(o="vertical"===this._getDirection(t,a),n=k(q),B("dragOverValid"),Gt.eventCanceled)return m;if(e)return J=Q,H(),this._hideClone(),B("revert"),Gt.eventCanceled||(tt?Q.insertBefore(q,tt):Q.appendChild(q)),L(!0);var p=z(r,s.draggable);if(!p||function(t,n,i){var e=k(z(i.el,i.options.draggable)),o=R(i.el,i.options,K);return n?t.clientX>o.right+10||t.clientY>e.bottom&&t.clientX>e.left:t.clientY>o.bottom+10||t.clientX>e.right&&t.clientY>e.top}(t,o,this)&&!p.animated){if(p===q)return L(!1);if(p&&r===t.target&&(a=p),a&&(i=k(a)),!1!==Lt(Q,r,q,n,a,i,t,!!a))return H(),p&&p.nextSibling?r.insertBefore(q,p.nextSibling):r.appendChild(q),J=r,X(),L(!0)}else if(p&&function(t,n,i){var e=k(A(i.el,0,i.options,!0)),o=R(i.el,i.options,K);return n?t.clientX<o.left-10||t.clientY<e.top&&t.clientX<e.right:t.clientY<o.top-10||t.clientY<e.bottom&&t.clientX<e.left}(t,o,this)){var b=A(r,0,s,!0);if(b===q)return L(!1);if(i=k(a=b),!1!==Lt(Q,r,q,n,a,i,t,!1))return H(),r.insertBefore(q,b),J=r,X(),L(!0)}else if(a.parentNode===r){i=k(a);var g,w,y,E=q.parentNode!==r,S=!function(t,n,i){var e=i?t.left:t.top,o=i?n.left:n.top;return e===o||(i?t.right:t.bottom)===(i?n.right:n.bottom)||e+(i?t.width:t.height)/2===o+(i?n.width:n.height)/2}(q.animated&&q.toRect||n,a.animated&&a.toRect||i,o),T=o?"top":"left",M=j(a,"top","top")||j(q,"top","top"),D=M?M.scrollTop:void 0;if(bt!==a&&(w=i[T],Tt=!1,Mt=!S&&s.invertSwap||E),g=function(t,n,i,e,o,r,a,s){var u=e?t.clientY:t.clientX,l=e?i.height:i.width,c=e?i.top:i.left,f=e?i.bottom:i.right,h=!1;if(!a)if(s&&wt<l*o){if(!Tt&&(1===gt?u>c+l*r/2:u<f-l*r/2)&&(Tt=!0),Tt)h=!0;else if(1===gt?u<c+wt:u>f-wt)return-gt}else if(u>c+l*(1-o)/2&&u<f-l*(1-o)/2)return function(t){return N(q)<N(t)?1:-1}(n);return(h=h||a)&&(u<c+l*r/2||u>f-l*r/2)?u>c+l/2?1:-1:0}(t,a,i,o,S?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Mt,bt===a),0!==g){var _=N(q);do{y=J.children[_-=g]}while(y&&("none"===O(y,"display")||y===K))}if(0===g||y===a)return L(!1);bt=a,gt=g;var C=a.nextElementSibling,P=!1,F=Lt(Q,r,q,n,a,i,t,P=1===g);if(!1!==F)return 1!==F&&-1!==F||(P=1===F),Ot=!0,setTimeout(Wt,30),H(),P&&!C?r.appendChild(q):a.parentNode.insertBefore(q,P?C:a),M&&G(M,0,D-M.scrollTop),J=q.parentNode,void 0===w||Mt||(wt=Math.abs(w-k(a)[T])),X(),L(!0)}if(r.contains(q))return L(!1)}return!1}function B(s,u){Z(s,v,l({evt:t,isOwner:f,axis:o?"vertical":"horizontal",revert:e,dragRect:n,targetRect:i,canSort:h,fromSortable:d,target:a,completed:L,onMove:function(i,e){return Lt(Q,r,q,n,i,k(i),t,e)},changed:X},u))}function H(){B("dragOverAnimationCapture"),v.captureAnimationState(),v!==d&&d.captureAnimationState()}function L(n){return B("dragOverCompleted",{insertion:n}),n&&(f?c._hideClone():c._showClone(v),v!==d&&(I(q,lt?lt.options.ghostClass:c.options.ghostClass,!1),I(q,s.ghostClass,!0)),lt!==v&&v!==Gt.active?lt=v:v===Gt.active&<&&(lt=null),d===v&&(v._ignoreWhileAnimating=a),v.animateAll((function(){B("dragOverAnimationComplete"),v._ignoreWhileAnimating=null})),v!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(a===q&&!q.animated||a===r&&!a.animated)&&(bt=null),s.dragoverBubble||t.rootEl||a===document||(q.parentNode[W]._isOutsideThisEl(t.target),!n&&Bt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function X(){rt=N(q),st=N(q,s.draggable),$({sortable:v,name:"change",toEl:r,newIndex:rt,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",Bt),y(document,"mousemove",Bt),y(document,"touchmove",Bt)},_offUpEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._onDrop),y(t,"touchend",this._onDrop),y(t,"pointerup",this._onDrop),y(t,"pointercancel",this._onDrop),y(t,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;rt=N(q),st=N(q,i.draggable),Z("drop",this,{evt:t}),J=q&&q.parentNode,rt=N(q),st=N(q,i.draggable),Gt.eventCanceled||(Et=!1,Mt=!1,Tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ut(this.cloneId),Ut(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),m&&O(document.body,"user-select",""),O(q,"transform",""),t&&(pt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),K&&K.parentNode&&K.parentNode.removeChild(K),(Q===J||lt&&"clone"!==lt.lastPutMode)&&it&&it.parentNode&&it.parentNode.removeChild(it),q&&(this.nativeDraggable&&y(q,"dragend",this),Rt(q),q.style["will-change"]="",pt&&!Et&&I(q,lt?lt.options.ghostClass:this.options.ghostClass,!1),I(q,this.options.chosenClass,!1),$({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:t}),Q!==J?(rt>=0&&($({rootEl:J,name:"add",toEl:J,fromEl:Q,originalEvent:t}),$({sortable:this,name:"remove",toEl:J,originalEvent:t}),$({rootEl:J,name:"sort",toEl:J,fromEl:Q,originalEvent:t}),$({sortable:this,name:"sort",toEl:J,originalEvent:t})),lt&<.save()):rt!==ot&&rt>=0&&($({sortable:this,name:"update",toEl:J,originalEvent:t}),$({sortable:this,name:"sort",toEl:J,originalEvent:t})),Gt.active&&(null!=rt&&-1!==rt||(rt=ot,st=at),$({sortable:this,name:"end",toEl:J,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Z("nulling",this),Q=q=J=K=tt=it=nt=et=ct=ft=pt=rt=st=ot=at=bt=gt=lt=ut=Gt.dragged=Gt.ghost=Gt.clone=Gt.active=null;var t=this.el;Dt.forEach((function(n){t.contains(n)&&(n.checked=!0)})),Dt.length=ht=dt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":q&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,n=[],i=this.el.children,e=0,o=i.length,r=this.options;e<o;e++)x(t=i[e],r.draggable,this.el,!1)&&n.push(t.getAttribute(r.dataIdAttr)||Xt(t));return n},sort:function(t,n){var i={},e=this.el;this.toArray().forEach((function(t,n){var o=e.children[n];x(o,this.options.draggable,e,!1)&&(i[t]=o)}),this),n&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(e.removeChild(i[t]),e.appendChild(i[t]))})),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return x(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(void 0===n)return i[t];var e=U.modifyOption(this,t,n);i[t]=void 0!==e?e:n,"group"===t&&Nt(i)},destroy:function(){Z("destroy",this);var t=this.el;t[W]=null,y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart),y(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),xt.splice(xt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!et){if(Z("hideClone",this),Gt.eventCanceled)return;O(it,"display","none"),this.options.removeCloneOnHide&&it.parentNode&&it.parentNode.removeChild(it),et=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(et){if(Z("showClone",this),Gt.eventCanceled)return;q.parentNode!=Q||this.options.group.revertClone?tt?Q.insertBefore(it,tt):Q.appendChild(it):Q.insertBefore(it,q),this.options.group.revertClone&&this.animate(q,it),O(it,"display",""),et=!1}}else this._hideClone()}},_t&&w(document,"touchmove",(function(t){(Gt.active||Et)&&t.cancelable&&t.preventDefault()})),Gt.utils={on:w,off:y,css:O,find:_,is:function(t,n){return!!x(t,n,t,!1)},extend:function(t,n){if(t&&n)for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i]);return t},throttle:H,closest:x,toggleClass:I,clone:L,index:N,nextTick:Yt,cancelNextTick:Ut,detectDirection:zt,getChild:A,expando:W},Gt.get=function(t){return t[W]},Gt.mount=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];n[0].constructor===Array&&(n=n[0]),n.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Gt.utils=l(l({},Gt.utils),t.utils)),U.mount(t)}))},Gt.create=function(t,n){return new Gt(t,n)},Gt.version="1.15.7";var Vt,Zt,$t,qt,Jt,Kt,Qt=[],tn=!1;function nn(){Qt.forEach((function(t){clearInterval(t.pid)})),Qt=[]}function en(){clearInterval(Kt)}var on=H((function(t,n,i,e){if(n.scroll){var o,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=n.scrollSensitivity,u=n.scrollSpeed,l=C(),c=!1;Zt!==i&&(Zt=i,nn(),o=n.scrollFn,!0===(Vt=n.scroll)&&(Vt=F(i,!0)));var f=0,h=Vt;do{var d=h,v=k(d),m=v.top,p=v.bottom,b=v.left,g=v.right,w=v.width,y=v.height,E=void 0,S=void 0,x=d.scrollWidth,T=d.scrollHeight,M=O(d),I=d.scrollLeft,D=d.scrollTop;d===l?(E=w<x&&("auto"===M.overflowX||"scroll"===M.overflowX||"visible"===M.overflowX),S=y<T&&("auto"===M.overflowY||"scroll"===M.overflowY||"visible"===M.overflowY)):(E=w<x&&("auto"===M.overflowX||"scroll"===M.overflowX),S=y<T&&("auto"===M.overflowY||"scroll"===M.overflowY));var _=E&&(Math.abs(g-r)<=s&&I+w<x)-(Math.abs(b-r)<=s&&!!I),j=S&&(Math.abs(p-a)<=s&&D+y<T)-(Math.abs(m-a)<=s&&!!D);if(!Qt[f])for(var A=0;A<=f;A++)Qt[A]||(Qt[A]={});Qt[f].vx==_&&Qt[f].vy==j&&Qt[f].el===d||(Qt[f].el=d,Qt[f].vx=_,Qt[f].vy=j,clearInterval(Qt[f].pid),0==_&&0==j||(c=!0,Qt[f].pid=setInterval(function(){e&&0===this.layer&&Gt.active._onTouchMove(Jt);var n=Qt[this.layer].vy?Qt[this.layer].vy*u:0,i=Qt[this.layer].vx?Qt[this.layer].vx*u:0;"function"==typeof o&&"continue"!==o.call(Gt.dragged.parentNode[W],i,n,t,Jt,Qt[this.layer].el)||G(Qt[this.layer].el,i,n)}.bind({layer:f}),24))),f++}while(n.bubbleScroll&&h!==l&&(h=F(h,!1)));tn=c}}),30),rn=function(t){var n=t.originalEvent,i=t.putSortable,e=t.dragEl,o=t.dispatchSortableEvent,r=t.unhideGhostForTarget;if(n){var a=i||t.activeSortable;(0,t.hideGhostForTarget)();var s=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,u=document.elementFromPoint(s.clientX,s.clientY);r(),a&&!a.el.contains(u)&&(o("spill"),this.onSpill({dragEl:e,putSortable:i}))}};function an(){}function sn(){}an.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var e=A(this.sortable.el,this.startIndex,this.options);e?this.sortable.el.insertBefore(n,e):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:rn},s(an,{pluginName:"revertOnSpill"}),sn.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:rn},s(sn,{pluginName:"removeOnSpill"}),Gt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):w(document,this.options.supportPointer?"pointermove":n.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;this.options.dragOverBubble||n.rootEl||this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),en(),nn(),clearTimeout(T),T=void 0},nulling:function(){Jt=Zt=Vt=tn=Kt=$t=qt=null,Qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,e=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(e,o);if(Jt=t,n||this.options.forceAutoScrollFallback||d||h||m){on(t,this.options,r,n);var a=F(r,!0);!tn||Kt&&e===$t&&o===qt||(Kt&&en(),Kt=setInterval((function(){var r=F(document.elementFromPoint(e,o),!0);r!==a&&(a=r,nn()),on(t,i.options,r,n)}),10),$t=e,qt=o)}else{if(!this.options.bubbleScroll||F(r,!0)===C())return void nn();on(t,this.options,F(r,!1),!1)}}},s(t,{pluginName:"scroll",initializeByDefault:!0})}),Gt.mount(sn,an);const un=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.pdsSortableItemMoved=i(this,"pdsSortableItemMoved",7),this.border=!1,this.disabled=!1,this.dividers=!1,this.handleType="row"}handleDisabledChange(){var t;null===(t=this.sortableInstance)||void 0===t||t.option("disabled",this.disabled)}classNames(){const t=["pds-sortable"];return this.border&&t.push("pds-sortable--bordered"),this.disabled&&t.push("pds-sortable--disabled"),this.dividers&&t.push("pds-sortable--divided"),void 0!==this.handleType&&t.push("pds-sortable--handle-type-"+this.handleType),t.join(" ")}componentDidLoad(){let t={animation:150,disabled:this.disabled,ghostClass:"pds-sortable-item--ghost",dragClass:"pds-sortable-item--drag",onEnd:t=>{this.pdsSortableItemMoved.emit(t)}};"handle"===this.handleType&&(t=Object.assign(Object.assign({},t),{handle:".pds-sortable-item__handle"})),this.sortableInstance=Gt.create(this.el,t)}render(){return e(o,{key:"7c5c1c00c00f8e7122c292f83f33b0b5638a4617",class:this.classNames(),id:this.componentId},e("slot",{key:"c418a9e41ff37672d886259c3c8a060507b2a16a"}))}get el(){return this}static get watchers(){return{disabled:[{handleDisabledChange:0}]}}static get style(){return".pds-sortable.sc-pds-sortable-h{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-sortable.pds-sortable--bordered.sc-pds-sortable-h{border:var(--pine-border);border-radius:var(--pine-dimension-2xs)}"}},[262,"pds-sortable",{border:[516],disabled:[516],componentId:[1,"component-id"],dividers:[516],handleType:[1,"handle-type"]},void 0,{disabled:[{handleDisabledChange:0}]}]),ln=un,cn=function(){"undefined"!=typeof customElements&&["pds-sortable"].forEach((t=>{"pds-sortable"===t&&(customElements.get(r(t))||customElements.define(r(t),un))}))};export{ln as PdsSortable,cn as defineCustomElement}
|