@getflip/swirl-components-react 0.11.0 → 0.12.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/dist/{_commonjsHelpers-44457d8d.ba94af77.js → _commonjsHelpers-10467d11.b7d83301.js} +0 -0
- package/dist/balancetext-31f1ec68.bd1c1b2d.js +189 -0
- package/dist/{file-manager.entry.7f94c2d2.js → file-manager.entry.7a321755.js} +1 -1
- package/dist/{floating-ui.dom.esm-1a4e8b8a.87557233.js → floating-ui.dom.esm-b9f28f6d.15013ef7.js} +0 -0
- package/dist/{index-c3028f7d.557956d2.js → index-47862d62.75c2fcf1.js} +1 -1
- package/dist/index.149af511.js +1394 -0
- package/dist/stencil-generated/index.d.ts +1 -0
- package/dist/{swirl-action-list-item.entry.447b2688.js → swirl-action-list-item.entry.6548a6f0.js} +4 -4
- package/dist/{swirl-action-list-section.entry.e84808c9.js → swirl-action-list-section.entry.e12fe159.js} +1 -1
- package/dist/{swirl-action-list.entry.2fb802dc.js → swirl-action-list.entry.21644ba6.js} +2 -2
- package/dist/{swirl-app-layout_5.entry.875542b9.js → swirl-app-layout_5.entry.9703e919.js} +4 -4
- package/dist/{swirl-autocomplete.entry.7be53f33.js → swirl-autocomplete.entry.4bad6cbf.js} +8 -8
- package/dist/{swirl-avatar-group.entry.38bafbf0.js → swirl-avatar-group.entry.d41bfa97.js} +3 -3
- package/dist/{swirl-avatar.entry.6107d926.js → swirl-avatar.entry.c81909ad.js} +3 -3
- package/dist/{swirl-badge.entry.1f4d89cf.js → swirl-badge.entry.7bd8bbda.js} +3 -3
- package/dist/{swirl-banner.entry.2d29edfc.js → swirl-banner.entry.ef0143b1.js} +4 -4
- package/dist/{swirl-button-group.entry.8ce93c3c.js → swirl-button-group.entry.60578a80.js} +3 -3
- package/dist/{swirl-button.entry.42b57f80.js → swirl-button.entry.167120c6.js} +4 -4
- package/dist/{swirl-card.entry.a09d5cdf.js → swirl-card.entry.47b41ce9.js} +3 -3
- package/dist/{swirl-checkbox.entry.58064458.js → swirl-checkbox.entry.37c16abe.js} +3 -3
- package/dist/{swirl-chip.entry.b6b676d6.js → swirl-chip.entry.89c2c730.js} +4 -4
- package/dist/swirl-components-react.js +102 -101
- package/dist/swirl-components-react.umd.cjs +49 -42
- package/dist/{swirl-console-layout.entry.88cca8db.js → swirl-console-layout.entry.61b9ad81.js} +4 -4
- package/dist/{swirl-date-input.entry.1ff3f34d.js → swirl-date-input.entry.f0f6d6ee.js} +621 -618
- package/dist/swirl-date-picker_2.entry.91531b84.js +37 -0
- package/dist/{swirl-description-list-item.entry.e5e7327a.js → swirl-description-list-item.entry.99c83045.js} +1 -1
- package/dist/{swirl-description-list.entry.b451e1b2.js → swirl-description-list.entry.724f88d9.js} +1 -1
- package/dist/{swirl-dialog.entry.27d08ab3.js → swirl-dialog.entry.b50cfdb2.js} +3 -3
- package/dist/{swirl-file-uploader.entry.6c075751.js → swirl-file-uploader.entry.f8afd2d4.js} +3 -3
- package/dist/{swirl-file-viewer_7.entry.2d664fd5.js → swirl-file-viewer_7.entry.8973a210.js} +3 -3
- package/dist/swirl-form-control.entry.bc87b691.js +70 -0
- package/dist/{swirl-form-group.entry.f58b5fda.js → swirl-form-group.entry.674e8b3f.js} +3 -3
- package/dist/{swirl-heading.entry.1761ccaf.js → swirl-heading.entry.8e9ded19.js} +20 -10
- package/dist/{swirl-icon-add-photo.entry.2be32855.js → swirl-icon-add-photo.entry.5a20015c.js} +3 -3
- package/dist/{swirl-icon-add_4.entry.54bb7e89.js → swirl-icon-add_4.entry.0844d9ca.js} +3 -3
- package/dist/{swirl-icon-admin-panel-settings.entry.a43bcc7d.js → swirl-icon-admin-panel-settings.entry.8f932fe7.js} +3 -3
- package/dist/{swirl-icon-arrow-back.entry.ee4ddf1e.js → swirl-icon-arrow-back.entry.c9c0cd69.js} +3 -3
- package/dist/{swirl-icon-arrow-downward_2.entry.74231d7a.js → swirl-icon-arrow-downward_2.entry.03e4f1bc.js} +3 -3
- package/dist/{swirl-icon-arrow-forward.entry.a895e898.js → swirl-icon-arrow-forward.entry.965aa3ee.js} +3 -3
- package/dist/{swirl-icon-arrow-left_3.entry.6ea8dad5.js → swirl-icon-arrow-left_3.entry.5cddfb42.js} +3 -3
- package/dist/{swirl-icon-arrow-right-small.entry.daf39424.js → swirl-icon-arrow-right-small.entry.53b648b8.js} +3 -3
- package/dist/{swirl-icon-attachment.entry.2cb8c35f.js → swirl-icon-attachment.entry.302569e9.js} +3 -3
- package/dist/{swirl-icon-block.entry.0d7f0e2b.js → swirl-icon-block.entry.79c5f2b2.js} +3 -3
- package/dist/{swirl-icon-cancel_4.entry.2943f0c0.js → swirl-icon-cancel_4.entry.31c7f7d7.js} +3 -3
- package/dist/{swirl-icon-chat-bubble.entry.66624624.js → swirl-icon-chat-bubble.entry.ac1cbfcd.js} +3 -3
- package/dist/{swirl-icon-chats-filled.entry.83e0eeb7.js → swirl-icon-chats-filled.entry.18c0e11a.js} +3 -3
- package/dist/{swirl-icon-chats-outlined.entry.f768aca8.js → swirl-icon-chats-outlined.entry.af240396.js} +3 -3
- package/dist/{swirl-icon-check-circle.entry.03a596c7.js → swirl-icon-check-circle.entry.4c0304e9.js} +3 -3
- package/dist/swirl-icon-check-small_4.entry.c7292189.js +1468 -0
- package/dist/{swirl-icon-check-strong.entry.88cfb7b3.js → swirl-icon-check-strong.entry.0e1ebe49.js} +3 -3
- package/dist/{swirl-icon-check.entry.360c5b8c.js → swirl-icon-check.entry.bb609d4c.js} +3 -3
- package/dist/{swirl-icon-chevron-left.entry.d6f5077d.js → swirl-icon-chevron-left.entry.0faf5ceb.js} +3 -3
- package/dist/{swirl-icon-chevron-right.entry.4cbdaed5.js → swirl-icon-chevron-right.entry.9b9edbac.js} +3 -3
- package/dist/{swirl-icon-close-small.entry.d223e192.js → swirl-icon-close-small.entry.47516cb5.js} +3 -3
- package/dist/{swirl-icon-close.entry.eee59783.js → swirl-icon-close.entry.f20dd2d1.js} +3 -3
- package/dist/{swirl-icon-cloud-upload.entry.b50d30c3.js → swirl-icon-cloud-upload.entry.5307cd46.js} +3 -3
- package/dist/{swirl-icon-column.entry.07e869e3.js → swirl-icon-column.entry.fb461b40.js} +3 -3
- package/dist/{swirl-icon-comment.entry.221fe61a.js → swirl-icon-comment.entry.7bfbd903.js} +3 -3
- package/dist/{swirl-icon-copy.entry.d113e5bb.js → swirl-icon-copy.entry.4c17082a.js} +3 -3
- package/dist/{swirl-icon-date-range.entry.a1eb0554.js → swirl-icon-date-range.entry.c8ce6402.js} +3 -3
- package/dist/{swirl-icon-delete.entry.ebcf7073.js → swirl-icon-delete.entry.6d3a6a54.js} +3 -3
- package/dist/{swirl-icon-description.entry.fb0d88a1.js → swirl-icon-description.entry.060d019c.js} +3 -3
- package/dist/{swirl-icon-edit.entry.c6cf867f.js → swirl-icon-edit.entry.329a25ea.js} +3 -3
- package/dist/{swirl-icon-emoji-mood.entry.bf9ee6c2.js → swirl-icon-emoji-mood.entry.3fbee1e1.js} +3 -3
- package/dist/{swirl-icon-emoji-satisfied.entry.df8c1d60.js → swirl-icon-emoji-satisfied.entry.9fc1863d.js} +3 -3
- package/dist/{swirl-icon-error_3.entry.c21fbb54.js → swirl-icon-error_3.entry.8209c557.js} +4 -4
- package/dist/{swirl-icon-expand-more.entry.bbde4949.js → swirl-icon-expand-more.entry.b2e0a30c.js} +3 -3
- package/dist/{swirl-icon-file.entry.7ab04321.js → swirl-icon-file.entry.c0e82b43.js} +3 -3
- package/dist/{swirl-icon-filter.entry.95211f5f.js → swirl-icon-filter.entry.e26fa57c.js} +3 -3
- package/dist/{swirl-icon-folder-shared.entry.052229e9.js → swirl-icon-folder-shared.entry.0169b375.js} +3 -3
- package/dist/{swirl-icon-group-assign.entry.bb3ba16d.js → swirl-icon-group-assign.entry.70e80a6e.js} +3 -3
- package/dist/{swirl-icon-groups-custom.entry.89cb31bf.js → swirl-icon-groups-custom.entry.d16f5fb9.js} +3 -3
- package/dist/{swirl-icon-groups-filled.entry.8e4dd776.js → swirl-icon-groups-filled.entry.6cccc3d3.js} +3 -3
- package/dist/{swirl-icon-groups-outlined.entry.d257fa35.js → swirl-icon-groups-outlined.entry.2bf03f93.js} +3 -3
- package/dist/{swirl-icon-groups.entry.eb164fa2.js → swirl-icon-groups.entry.cbc420c1.js} +3 -3
- package/dist/{swirl-icon-help.entry.95af80fe.js → swirl-icon-help.entry.bca2c9e9.js} +3 -3
- package/dist/{swirl-icon-image.entry.ac7fce8a.js → swirl-icon-image.entry.67457d50.js} +3 -3
- package/dist/{swirl-icon-info.entry.7bea6932.js → swirl-icon-info.entry.0ee58aeb.js} +3 -3
- package/dist/{swirl-icon-inventory.entry.7bb8c552.js → swirl-icon-inventory.entry.1548c8b5.js} +3 -3
- package/dist/{swirl-icon-like.entry.ec92b9fd.js → swirl-icon-like.entry.e9d549b8.js} +3 -3
- package/dist/{swirl-icon-link.entry.f3d5937c.js → swirl-icon-link.entry.c442143c.js} +3 -3
- package/dist/{swirl-icon-lock.entry.807d8a95.js → swirl-icon-lock.entry.d84f882b.js} +3 -3
- package/dist/{swirl-icon-logout.entry.4f31d257.js → swirl-icon-logout.entry.7a6a96d3.js} +3 -3
- package/dist/{swirl-icon-mail.entry.54c49af9.js → swirl-icon-mail.entry.a7b7df7b.js} +3 -3
- package/dist/{swirl-icon-manage-accounts.entry.8bc3721c.js → swirl-icon-manage-accounts.entry.fe2691fc.js} +3 -3
- package/dist/{swirl-icon-mention.entry.5cf61986.js → swirl-icon-mention.entry.c0368650.js} +3 -3
- package/dist/{swirl-icon-menu-filled.entry.1597fcdc.js → swirl-icon-menu-filled.entry.06cced02.js} +3 -3
- package/dist/{swirl-icon-menu-outlined.entry.05c230c7.js → swirl-icon-menu-outlined.entry.89dca403.js} +3 -3
- package/dist/{swirl-icon-menu.entry.eb38317a.js → swirl-icon-menu.entry.ff253f8f.js} +3 -3
- package/dist/{swirl-icon-message.entry.3f3b0ee6.js → swirl-icon-message.entry.b7d9f581.js} +3 -3
- package/dist/{swirl-icon-more-horizontal.entry.746bde39.js → swirl-icon-more-horizontal.entry.407e51c1.js} +3 -3
- package/dist/{swirl-icon-more-vertikal.entry.bf9342ef.js → swirl-icon-more-vertikal.entry.718f85e0.js} +3 -3
- package/dist/{swirl-icon-news-filled.entry.1c1d78f8.js → swirl-icon-news-filled.entry.5134e640.js} +3 -3
- package/dist/{swirl-icon-news-outlined.entry.76c94ea9.js → swirl-icon-news-outlined.entry.9c0931c4.js} +3 -3
- package/dist/{swirl-icon-notifications-active.entry.d8c49de6.js → swirl-icon-notifications-active.entry.c47bbb94.js} +3 -3
- package/dist/{swirl-icon-notifications-off.entry.2c8866a8.js → swirl-icon-notifications-off.entry.d5933059.js} +3 -3
- package/dist/{swirl-icon-notifications.entry.a5c7b275.js → swirl-icon-notifications.entry.b945b795.js} +3 -3
- package/dist/{swirl-icon-open-in-new.entry.128350f5.js → swirl-icon-open-in-new.entry.98a7ed82.js} +3 -3
- package/dist/{swirl-icon-people-alt.entry.7ac6d23a.js → swirl-icon-people-alt.entry.646cfc3d.js} +3 -3
- package/dist/{swirl-icon-person-off.entry.fda1c4d4.js → swirl-icon-person-off.entry.f5db1b83.js} +3 -3
- package/dist/{swirl-icon-person.entry.19fc5367.js → swirl-icon-person.entry.4b5b54cb.js} +3 -3
- package/dist/{swirl-icon-phone.entry.73cfee35.js → swirl-icon-phone.entry.f6c4012a.js} +3 -3
- package/dist/{swirl-icon-poll.entry.4ab05380.js → swirl-icon-poll.entry.9ee6b1d2.js} +3 -3
- package/dist/{swirl-icon-print.entry.cd89ebc5.js → swirl-icon-print.entry.37f08abb.js} +3 -3
- package/dist/{swirl-icon-recieved.entry.56d93432.js → swirl-icon-recieved.entry.f79a1343.js} +3 -3
- package/dist/{swirl-icon-search-strong.entry.904a6694.js → swirl-icon-search-strong.entry.6752b238.js} +3 -3
- package/dist/{swirl-icon-search.entry.cf65f83f.js → swirl-icon-search.entry.d152e72f.js} +3 -3
- package/dist/{swirl-icon-send.entry.56297757.js → swirl-icon-send.entry.cafcc526.js} +3 -3
- package/dist/{swirl-icon-settings.entry.1c988cf1.js → swirl-icon-settings.entry.cdd23f77.js} +3 -3
- package/dist/{swirl-icon-sync.entry.b88dd7b8.js → swirl-icon-sync.entry.37eed48f.js} +3 -3
- package/dist/{swirl-icon-tasks-filled.entry.b2bf1c6e.js → swirl-icon-tasks-filled.entry.629446b0.js} +3 -3
- package/dist/{swirl-icon-tasks-outlined.entry.09551261.js → swirl-icon-tasks-outlined.entry.21e25bc3.js} +3 -3
- package/dist/{swirl-icon-time-filled.entry.4954d002.js → swirl-icon-time-filled.entry.67ee5a24.js} +3 -3
- package/dist/{swirl-icon-time-outlined.entry.697e9656.js → swirl-icon-time-outlined.entry.d0eb5d19.js} +3 -3
- package/dist/{swirl-icon-user-assign.entry.fe5b582b.js → swirl-icon-user-assign.entry.8a6b68ea.js} +3 -3
- package/dist/{swirl-icon-video-camera.entry.d4707dde.js → swirl-icon-video-camera.entry.85101910.js} +3 -3
- package/dist/{swirl-icon-warning.entry.69762f5b.js → swirl-icon-warning.entry.330bf12a.js} +3 -3
- package/dist/{swirl-lightbox.entry.bae60d38.js → swirl-lightbox.entry.7a2191eb.js} +4 -4
- package/dist/{swirl-link.entry.3d52e8ef.js → swirl-link.entry.81bd6e0f.js} +1 -1
- package/dist/{swirl-list.entry.53688da6.js → swirl-list.entry.ca7b2daf.js} +1 -1
- package/dist/{swirl-modal.entry.4bf5e6c3.js → swirl-modal.entry.97df470f.js} +3 -3
- package/dist/{swirl-option-list-section.entry.898ea907.js → swirl-option-list-section.entry.b3b30b8f.js} +1 -1
- package/dist/{swirl-pagination.entry.b892dbdb.js → swirl-pagination.entry.0bbbf034.js} +3 -3
- package/dist/{swirl-pdf-reader.entry.28aa5b27.js → swirl-pdf-reader.entry.064e66a5.js} +4 -4
- package/dist/{swirl-popover.entry.3e96f1d7.js → swirl-popover.entry.1e51f870.js} +5 -5
- package/dist/{swirl-progress-indicator.entry.30f3d224.js → swirl-progress-indicator.entry.46470fa4.js} +3 -3
- package/dist/{swirl-radio-group.entry.9cbdf732.js → swirl-radio-group.entry.f931de9f.js} +1 -1
- package/dist/{swirl-radio.entry.7a24ed80.js → swirl-radio.entry.5ccbc5fa.js} +3 -3
- package/dist/{swirl-resource-list-file-item.entry.c7c3d567.js → swirl-resource-list-file-item.entry.66329d69.js} +4 -4
- package/dist/{swirl-search.entry.19702179.js → swirl-search.entry.364d373f.js} +4 -4
- package/dist/{swirl-select.entry.3ff36072.js → swirl-select.entry.95b1f5bc.js} +7 -6
- package/dist/{swirl-separator.entry.6dfbb1a4.js → swirl-separator.entry.7c230cd1.js} +1 -1
- package/dist/{swirl-stack.entry.43f00bc0.js → swirl-stack.entry.cb1d54ae.js} +3 -3
- package/dist/{swirl-switch.entry.eaba1cc3.js → swirl-switch.entry.895cfbbd.js} +3 -3
- package/dist/{swirl-tab.entry.982c6bc3.js → swirl-tab.entry.b870a20f.js} +3 -3
- package/dist/{swirl-table-cell.entry.5cacafda.js → swirl-table-cell.entry.0d4a9b8f.js} +1 -1
- package/dist/{swirl-table-column.entry.d66cfcf5.js → swirl-table-column.entry.b1f05cb5.js} +1 -1
- package/dist/{swirl-table-row-group.entry.4273e651.js → swirl-table-row-group.entry.85368b7a.js} +1 -1
- package/dist/{swirl-table-row.entry.1f98e36b.js → swirl-table-row.entry.39f31a4b.js} +3 -3
- package/dist/{swirl-table.entry.5a37f233.js → swirl-table.entry.cd3a7dde.js} +2 -2
- package/dist/{swirl-tabs.entry.a932c6b9.js → swirl-tabs.entry.6dbf6d57.js} +3 -3
- package/dist/{swirl-tag.entry.2fd7c670.js → swirl-tag.entry.b0d8059b.js} +3 -3
- package/dist/{swirl-text-input.entry.c1eb2d9c.js → swirl-text-input.entry.86bbfa05.js} +10 -9
- package/dist/swirl-text.entry.53142b33.js +31 -0
- package/dist/{swirl-theme-provider.entry.5bf11693.js → swirl-theme-provider.entry.9cc36512.js} +1 -1
- package/dist/{swirl-thumbnail.entry.3b230d52.js → swirl-thumbnail.entry.bd0a5c89.js} +3 -3
- package/dist/{swirl-toast-provider.entry.da18eaab.js → swirl-toast-provider.entry.7747ba81.js} +1 -1
- package/dist/{swirl-toast.entry.d0f32449.js → swirl-toast.entry.ea517c98.js} +4 -4
- package/dist/{swirl-tooltip.entry.e444ef8c.js → swirl-tooltip.entry.71acfc7d.js} +2 -2
- package/dist/{swirl-tree-navigation-item.entry.49118257.js → swirl-tree-navigation-item.entry.59540e7e.js} +3 -3
- package/dist/{swirl-video-thumbnail.entry.786a3d11.js → swirl-video-thumbnail.entry.4546c208.js} +1 -1
- package/dist/{swirl-visually-hidden.entry.1da622ab.js → swirl-visually-hidden.entry.bbc8b32d.js} +1 -1
- package/dist/utils-33d31b58.1488fcfe.js +46 -0
- package/dist/wc-datepicker.entry.d105e9ee.js +269 -0
- package/package.json +2 -2
- package/dist/index.9489626d.js +0 -1393
- package/dist/swirl-date-picker_2.entry.e9905308.js +0 -1188
- package/dist/swirl-form-control.entry.89293c5d.js +0 -65
- package/dist/swirl-icon-check-small_3.entry.b2362b00.js +0 -153
- package/dist/swirl-text.entry.ec8c8813.js +0 -18
- package/dist/utils-7efaa1c6.4a9c3721.js +0 -42
|
@@ -0,0 +1,1468 @@
|
|
|
1
|
+
import { r as $t, h as g, F as ht, c as ie, H as xe, g as Ee } from "./index.149af511.js";
|
|
2
|
+
import { c as ae } from "./index-47862d62.75c2fcf1.js";
|
|
3
|
+
import { c as he, q as fe, g as Xe } from "./utils-33d31b58.1488fcfe.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "./_commonjsHelpers-10467d11.b7d83301.js";
|
|
7
|
+
const Ye = ":host{display:inline-flex}", Re = class {
|
|
8
|
+
constructor(e) {
|
|
9
|
+
$t(this, e), this.size = 24;
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
const e = this.size === 20 ? 24 : this.size, t = ae("swirl-icon", `swirl-icon--size-${this.size}`);
|
|
13
|
+
return g("svg", { class: t, fill: "none", height: this.size, part: "icon", viewBox: `0 0 ${e} ${e}`, width: this.size, xmlns: "http://www.w3.org/2000/svg" }, this.size === 16 && g(ht, null, g("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12.4142 4.91924C12.8047 5.30976 12.8047 5.94293 12.4142 6.33345L7.08086 11.6667C6.69033 12.0572 6.05717 12.0572 5.66664 11.6667L3.70711 9.70707C3.31658 9.31655 3.31658 8.68338 3.70711 8.29286C4.09763 7.90233 4.7308 7.90233 5.12132 8.29286L6.37375 9.54539L11 4.91924C11.3905 4.52871 12.0237 4.52871 12.4142 4.91924Z", fill: "currentColor" })), (this.size === 20 || this.size === 24) && g(ht, null, g("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18.6213 7.37879C19.2071 7.96458 19.2071 8.91433 18.6213 9.50011L10.6213 17.5C10.0355 18.0858 9.08577 18.0858 8.49998 17.5L5.56068 14.5605C4.97489 13.9748 4.97489 13.025 5.56068 12.4392C6.14646 11.8534 7.09621 11.8534 7.682 12.4392L9.56064 14.318L16.5 7.37879C17.0858 6.79301 18.0355 6.79301 18.6213 7.37879Z", fill: "currentColor" })), this.size === 28 && g(ht, null, g("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M21.7248 8.60863C22.4083 9.29205 22.4083 10.4001 21.7248 11.0835L12.3915 20.4167C11.7081 21.1001 10.6001 21.1001 9.91663 20.4167L6.48744 16.9873C5.80403 16.3039 5.80403 15.1959 6.48744 14.5125C7.17086 13.8291 8.2789 13.8291 8.96232 14.5125L11.1541 16.7044L19.25 8.60863C19.9334 7.92521 21.0414 7.92521 21.7248 8.60863Z", fill: "currentColor" })));
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
Re.style = Ye;
|
|
17
|
+
const We = ":host{display:inline-flex}", Ge = class {
|
|
18
|
+
constructor(e) {
|
|
19
|
+
$t(this, e), this.size = 24;
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
const e = this.size === 20 ? 24 : this.size, t = ae("swirl-icon", `swirl-icon--size-${this.size}`);
|
|
23
|
+
return g("svg", { class: t, fill: "none", height: this.size, part: "icon", viewBox: `0 0 ${e} ${e}`, width: this.size, xmlns: "http://www.w3.org/2000/svg" }, this.size === 16 && g(ht, null, g("rect", { x: "9", y: "3", width: "2", height: "2", rx: "1", fill: "currentColor" }), g("rect", { x: "9", y: "7", width: "2", height: "2", rx: "1", fill: "currentColor" }), g("rect", { x: "9", y: "11", width: "2", height: "2", rx: "1", fill: "currentColor" }), g("rect", { x: "5", y: "3", width: "2", height: "2", rx: "1", fill: "currentColor" }), g("rect", { x: "5", y: "7", width: "2", height: "2", rx: "1", fill: "currentColor" }), g("rect", { x: "5", y: "11", width: "2", height: "2", rx: "1", fill: "currentColor" })), (this.size === 20 || this.size === 24) && g(ht, null, g("rect", { x: "13.5", y: "4.5", width: "3", height: "3", rx: "1.5", fill: "currentColor" }), g("rect", { x: "13.5", y: "10.5", width: "3", height: "3", rx: "1.5", fill: "currentColor" }), g("rect", { x: "13.5", y: "16.5", width: "3", height: "3", rx: "1.5", fill: "currentColor" }), g("rect", { x: "7.5", y: "4.5", width: "3", height: "3", rx: "1.5", fill: "currentColor" }), g("rect", { x: "7.5", y: "10.5", width: "3", height: "3", rx: "1.5", fill: "currentColor" }), g("rect", { x: "7.5", y: "16.5", width: "3", height: "3", rx: "1.5", fill: "currentColor" })), this.size === 28 && g(ht, null, g("rect", { x: "15.75", y: "5.25", width: "3.5", height: "3.5", rx: "1.75", fill: "currentColor" }), g("rect", { x: "15.75", y: "12.25", width: "3.5", height: "3.5", rx: "1.75", fill: "currentColor" }), g("rect", { x: "15.75", y: "19.25", width: "3.5", height: "3.5", rx: "1.75", fill: "currentColor" }), g("rect", { x: "8.75", y: "5.25", width: "3.5", height: "3.5", rx: "1.75", fill: "currentColor" }), g("rect", { x: "8.75", y: "12.25", width: "3.5", height: "3.5", rx: "1.75", fill: "currentColor" }), g("rect", { x: "8.75", y: "19.25", width: "3.5", height: "3.5", rx: "1.75", fill: "currentColor" })));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
Ge.style = We;
|
|
27
|
+
/**!
|
|
28
|
+
* Sortable 1.15.0
|
|
29
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
30
|
+
* @author owenm <owen23355@gmail.com>
|
|
31
|
+
* @license MIT
|
|
32
|
+
*/
|
|
33
|
+
function pe(e, t) {
|
|
34
|
+
var i = Object.keys(e);
|
|
35
|
+
if (Object.getOwnPropertySymbols) {
|
|
36
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
37
|
+
t && (o = o.filter(function(n) {
|
|
38
|
+
return Object.getOwnPropertyDescriptor(e, n).enumerable;
|
|
39
|
+
})), i.push.apply(i, o);
|
|
40
|
+
}
|
|
41
|
+
return i;
|
|
42
|
+
}
|
|
43
|
+
function $(e) {
|
|
44
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
45
|
+
var i = arguments[t] != null ? arguments[t] : {};
|
|
46
|
+
t % 2 ? pe(Object(i), !0).forEach(function(o) {
|
|
47
|
+
$e(e, o, i[o]);
|
|
48
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(i)) : pe(Object(i)).forEach(function(o) {
|
|
49
|
+
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(i, o));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return e;
|
|
53
|
+
}
|
|
54
|
+
function zt(e) {
|
|
55
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? zt = function(t) {
|
|
56
|
+
return typeof t;
|
|
57
|
+
} : zt = function(t) {
|
|
58
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
59
|
+
}, zt(e);
|
|
60
|
+
}
|
|
61
|
+
function $e(e, t, i) {
|
|
62
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
63
|
+
value: i,
|
|
64
|
+
enumerable: !0,
|
|
65
|
+
configurable: !0,
|
|
66
|
+
writable: !0
|
|
67
|
+
}) : e[t] = i, e;
|
|
68
|
+
}
|
|
69
|
+
function U() {
|
|
70
|
+
return U = Object.assign || function(e) {
|
|
71
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
72
|
+
var i = arguments[t];
|
|
73
|
+
for (var o in i)
|
|
74
|
+
Object.prototype.hasOwnProperty.call(i, o) && (e[o] = i[o]);
|
|
75
|
+
}
|
|
76
|
+
return e;
|
|
77
|
+
}, U.apply(this, arguments);
|
|
78
|
+
}
|
|
79
|
+
function je(e, t) {
|
|
80
|
+
if (e == null)
|
|
81
|
+
return {};
|
|
82
|
+
var i = {}, o = Object.keys(e), n, r;
|
|
83
|
+
for (r = 0; r < o.length; r++)
|
|
84
|
+
n = o[r], !(t.indexOf(n) >= 0) && (i[n] = e[n]);
|
|
85
|
+
return i;
|
|
86
|
+
}
|
|
87
|
+
function Ve(e, t) {
|
|
88
|
+
if (e == null)
|
|
89
|
+
return {};
|
|
90
|
+
var i = je(e, t), o, n;
|
|
91
|
+
if (Object.getOwnPropertySymbols) {
|
|
92
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
93
|
+
for (n = 0; n < r.length; n++)
|
|
94
|
+
o = r[n], !(t.indexOf(o) >= 0) && (!Object.prototype.propertyIsEnumerable.call(e, o) || (i[o] = e[o]));
|
|
95
|
+
}
|
|
96
|
+
return i;
|
|
97
|
+
}
|
|
98
|
+
var Ke = "1.15.0";
|
|
99
|
+
function K(e) {
|
|
100
|
+
if (typeof window < "u" && window.navigator)
|
|
101
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
102
|
+
}
|
|
103
|
+
var Q = K(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Tt = K(/Edge/i), ge = K(/firefox/i), xt = K(/safari/i) && !K(/chrome/i) && !K(/android/i), Se = K(/iP(ad|od|hone)/i), Ie = K(/chrome/i) && K(/android/i), Ce = {
|
|
104
|
+
capture: !1,
|
|
105
|
+
passive: !1
|
|
106
|
+
};
|
|
107
|
+
function y(e, t, i) {
|
|
108
|
+
e.addEventListener(t, i, !Q && Ce);
|
|
109
|
+
}
|
|
110
|
+
function w(e, t, i) {
|
|
111
|
+
e.removeEventListener(t, i, !Q && Ce);
|
|
112
|
+
}
|
|
113
|
+
function Xt(e, t) {
|
|
114
|
+
if (!!t) {
|
|
115
|
+
if (t[0] === ">" && (t = t.substring(1)), e)
|
|
116
|
+
try {
|
|
117
|
+
if (e.matches)
|
|
118
|
+
return e.matches(t);
|
|
119
|
+
if (e.msMatchesSelector)
|
|
120
|
+
return e.msMatchesSelector(t);
|
|
121
|
+
if (e.webkitMatchesSelector)
|
|
122
|
+
return e.webkitMatchesSelector(t);
|
|
123
|
+
} catch {
|
|
124
|
+
return !1;
|
|
125
|
+
}
|
|
126
|
+
return !1;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function Ue(e) {
|
|
130
|
+
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
131
|
+
}
|
|
132
|
+
function W(e, t, i, o) {
|
|
133
|
+
if (e) {
|
|
134
|
+
i = i || document;
|
|
135
|
+
do {
|
|
136
|
+
if (t != null && (t[0] === ">" ? e.parentNode === i && Xt(e, t) : Xt(e, t)) || o && e === i)
|
|
137
|
+
return e;
|
|
138
|
+
if (e === i)
|
|
139
|
+
break;
|
|
140
|
+
} while (e = Ue(e));
|
|
141
|
+
}
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
var me = /\s+/g;
|
|
145
|
+
function z(e, t, i) {
|
|
146
|
+
if (e && t)
|
|
147
|
+
if (e.classList)
|
|
148
|
+
e.classList[i ? "add" : "remove"](t);
|
|
149
|
+
else {
|
|
150
|
+
var o = (" " + e.className + " ").replace(me, " ").replace(" " + t + " ", " ");
|
|
151
|
+
e.className = (o + (i ? " " + t : "")).replace(me, " ");
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function f(e, t, i) {
|
|
155
|
+
var o = e && e.style;
|
|
156
|
+
if (o) {
|
|
157
|
+
if (i === void 0)
|
|
158
|
+
return document.defaultView && document.defaultView.getComputedStyle ? i = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (i = e.currentStyle), t === void 0 ? i : i[t];
|
|
159
|
+
!(t in o) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), o[t] = i + (typeof i == "string" ? "" : "px");
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function ft(e, t) {
|
|
163
|
+
var i = "";
|
|
164
|
+
if (typeof e == "string")
|
|
165
|
+
i = e;
|
|
166
|
+
else
|
|
167
|
+
do {
|
|
168
|
+
var o = f(e, "transform");
|
|
169
|
+
o && o !== "none" && (i = o + " " + i);
|
|
170
|
+
} while (!t && (e = e.parentNode));
|
|
171
|
+
var n = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
172
|
+
return n && new n(i);
|
|
173
|
+
}
|
|
174
|
+
function Te(e, t, i) {
|
|
175
|
+
if (e) {
|
|
176
|
+
var o = e.getElementsByTagName(t), n = 0, r = o.length;
|
|
177
|
+
if (i)
|
|
178
|
+
for (; n < r; n++)
|
|
179
|
+
i(o[n], n);
|
|
180
|
+
return o;
|
|
181
|
+
}
|
|
182
|
+
return [];
|
|
183
|
+
}
|
|
184
|
+
function G() {
|
|
185
|
+
var e = document.scrollingElement;
|
|
186
|
+
return e || document.documentElement;
|
|
187
|
+
}
|
|
188
|
+
function C(e, t, i, o, n) {
|
|
189
|
+
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
190
|
+
var r, s, a, l, c, h, u;
|
|
191
|
+
if (e !== window && e.parentNode && e !== G() ? (r = e.getBoundingClientRect(), s = r.top, a = r.left, l = r.bottom, c = r.right, h = r.height, u = r.width) : (s = 0, a = 0, l = window.innerHeight, c = window.innerWidth, h = window.innerHeight, u = window.innerWidth), (t || i) && e !== window && (n = n || e.parentNode, !Q))
|
|
192
|
+
do
|
|
193
|
+
if (n && n.getBoundingClientRect && (f(n, "transform") !== "none" || i && f(n, "position") !== "static")) {
|
|
194
|
+
var v = n.getBoundingClientRect();
|
|
195
|
+
s -= v.top + parseInt(f(n, "border-top-width")), a -= v.left + parseInt(f(n, "border-left-width")), l = s + r.height, c = a + r.width;
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
while (n = n.parentNode);
|
|
199
|
+
if (o && e !== window) {
|
|
200
|
+
var D = ft(n || e), b = D && D.a, _ = D && D.d;
|
|
201
|
+
D && (s /= _, a /= b, u /= b, h /= _, l = s + h, c = a + u);
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
top: s,
|
|
205
|
+
left: a,
|
|
206
|
+
bottom: l,
|
|
207
|
+
right: c,
|
|
208
|
+
width: u,
|
|
209
|
+
height: h
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function ve(e, t, i) {
|
|
214
|
+
for (var o = et(e, !0), n = C(e)[t]; o; ) {
|
|
215
|
+
var r = C(o)[i], s = void 0;
|
|
216
|
+
if (i === "top" || i === "left" ? s = n >= r : s = n <= r, !s)
|
|
217
|
+
return o;
|
|
218
|
+
if (o === G())
|
|
219
|
+
break;
|
|
220
|
+
o = et(o, !1);
|
|
221
|
+
}
|
|
222
|
+
return !1;
|
|
223
|
+
}
|
|
224
|
+
function pt(e, t, i, o) {
|
|
225
|
+
for (var n = 0, r = 0, s = e.children; r < s.length; ) {
|
|
226
|
+
if (s[r].style.display !== "none" && s[r] !== p.ghost && (o || s[r] !== p.dragged) && W(s[r], i.draggable, e, !1)) {
|
|
227
|
+
if (n === t)
|
|
228
|
+
return s[r];
|
|
229
|
+
n++;
|
|
230
|
+
}
|
|
231
|
+
r++;
|
|
232
|
+
}
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
function le(e, t) {
|
|
236
|
+
for (var i = e.lastElementChild; i && (i === p.ghost || f(i, "display") === "none" || t && !Xt(i, t)); )
|
|
237
|
+
i = i.previousElementSibling;
|
|
238
|
+
return i || null;
|
|
239
|
+
}
|
|
240
|
+
function B(e, t) {
|
|
241
|
+
var i = 0;
|
|
242
|
+
if (!e || !e.parentNode)
|
|
243
|
+
return -1;
|
|
244
|
+
for (; e = e.previousElementSibling; )
|
|
245
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== p.clone && (!t || Xt(e, t)) && i++;
|
|
246
|
+
return i;
|
|
247
|
+
}
|
|
248
|
+
function be(e) {
|
|
249
|
+
var t = 0, i = 0, o = G();
|
|
250
|
+
if (e)
|
|
251
|
+
do {
|
|
252
|
+
var n = ft(e), r = n.a, s = n.d;
|
|
253
|
+
t += e.scrollLeft * r, i += e.scrollTop * s;
|
|
254
|
+
} while (e !== o && (e = e.parentNode));
|
|
255
|
+
return [t, i];
|
|
256
|
+
}
|
|
257
|
+
function Qe(e, t) {
|
|
258
|
+
for (var i in e)
|
|
259
|
+
if (!!e.hasOwnProperty(i)) {
|
|
260
|
+
for (var o in t)
|
|
261
|
+
if (t.hasOwnProperty(o) && t[o] === e[i][o])
|
|
262
|
+
return Number(i);
|
|
263
|
+
}
|
|
264
|
+
return -1;
|
|
265
|
+
}
|
|
266
|
+
function et(e, t) {
|
|
267
|
+
if (!e || !e.getBoundingClientRect)
|
|
268
|
+
return G();
|
|
269
|
+
var i = e, o = !1;
|
|
270
|
+
do
|
|
271
|
+
if (i.clientWidth < i.scrollWidth || i.clientHeight < i.scrollHeight) {
|
|
272
|
+
var n = f(i);
|
|
273
|
+
if (i.clientWidth < i.scrollWidth && (n.overflowX == "auto" || n.overflowX == "scroll") || i.clientHeight < i.scrollHeight && (n.overflowY == "auto" || n.overflowY == "scroll")) {
|
|
274
|
+
if (!i.getBoundingClientRect || i === document.body)
|
|
275
|
+
return G();
|
|
276
|
+
if (o || t)
|
|
277
|
+
return i;
|
|
278
|
+
o = !0;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
while (i = i.parentNode);
|
|
282
|
+
return G();
|
|
283
|
+
}
|
|
284
|
+
function qe(e, t) {
|
|
285
|
+
if (e && t)
|
|
286
|
+
for (var i in t)
|
|
287
|
+
t.hasOwnProperty(i) && (e[i] = t[i]);
|
|
288
|
+
return e;
|
|
289
|
+
}
|
|
290
|
+
function Vt(e, t) {
|
|
291
|
+
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
292
|
+
}
|
|
293
|
+
var Et;
|
|
294
|
+
function Ae(e, t) {
|
|
295
|
+
return function() {
|
|
296
|
+
if (!Et) {
|
|
297
|
+
var i = arguments, o = this;
|
|
298
|
+
i.length === 1 ? e.call(o, i[0]) : e.apply(o, i), Et = setTimeout(function() {
|
|
299
|
+
Et = void 0;
|
|
300
|
+
}, t);
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
function Ze() {
|
|
305
|
+
clearTimeout(Et), Et = void 0;
|
|
306
|
+
}
|
|
307
|
+
function Oe(e, t, i) {
|
|
308
|
+
e.scrollLeft += t, e.scrollTop += i;
|
|
309
|
+
}
|
|
310
|
+
function Pe(e) {
|
|
311
|
+
var t = window.Polymer, i = window.jQuery || window.Zepto;
|
|
312
|
+
return t && t.dom ? t.dom(e).cloneNode(!0) : i ? i(e).clone(!0)[0] : e.cloneNode(!0);
|
|
313
|
+
}
|
|
314
|
+
var L = "Sortable" + new Date().getTime();
|
|
315
|
+
function Je() {
|
|
316
|
+
var e = [], t;
|
|
317
|
+
return {
|
|
318
|
+
captureAnimationState: function() {
|
|
319
|
+
if (e = [], !!this.options.animation) {
|
|
320
|
+
var o = [].slice.call(this.el.children);
|
|
321
|
+
o.forEach(function(n) {
|
|
322
|
+
if (!(f(n, "display") === "none" || n === p.ghost)) {
|
|
323
|
+
e.push({
|
|
324
|
+
target: n,
|
|
325
|
+
rect: C(n)
|
|
326
|
+
});
|
|
327
|
+
var r = $({}, e[e.length - 1].rect);
|
|
328
|
+
if (n.thisAnimationDuration) {
|
|
329
|
+
var s = ft(n, !0);
|
|
330
|
+
s && (r.top -= s.f, r.left -= s.e);
|
|
331
|
+
}
|
|
332
|
+
n.fromRect = r;
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
addAnimationState: function(o) {
|
|
338
|
+
e.push(o);
|
|
339
|
+
},
|
|
340
|
+
removeAnimationState: function(o) {
|
|
341
|
+
e.splice(Qe(e, {
|
|
342
|
+
target: o
|
|
343
|
+
}), 1);
|
|
344
|
+
},
|
|
345
|
+
animateAll: function(o) {
|
|
346
|
+
var n = this;
|
|
347
|
+
if (!this.options.animation) {
|
|
348
|
+
clearTimeout(t), typeof o == "function" && o();
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
var r = !1, s = 0;
|
|
352
|
+
e.forEach(function(a) {
|
|
353
|
+
var l = 0, c = a.target, h = c.fromRect, u = C(c), v = c.prevFromRect, D = c.prevToRect, b = a.rect, _ = ft(c, !0);
|
|
354
|
+
_ && (u.top -= _.f, u.left -= _.e), c.toRect = u, c.thisAnimationDuration && Vt(v, u) && !Vt(h, u) && (b.top - u.top) / (b.left - u.left) === (h.top - u.top) / (h.left - u.left) && (l = ei(b, v, D, n.options)), Vt(u, h) || (c.prevFromRect = h, c.prevToRect = u, l || (l = n.options.animation), n.animate(c, b, u, l)), l && (r = !0, s = Math.max(s, l), clearTimeout(c.animationResetTimer), c.animationResetTimer = setTimeout(function() {
|
|
355
|
+
c.animationTime = 0, c.prevFromRect = null, c.fromRect = null, c.prevToRect = null, c.thisAnimationDuration = null;
|
|
356
|
+
}, l), c.thisAnimationDuration = l);
|
|
357
|
+
}), clearTimeout(t), r ? t = setTimeout(function() {
|
|
358
|
+
typeof o == "function" && o();
|
|
359
|
+
}, s) : typeof o == "function" && o(), e = [];
|
|
360
|
+
},
|
|
361
|
+
animate: function(o, n, r, s) {
|
|
362
|
+
if (s) {
|
|
363
|
+
f(o, "transition", ""), f(o, "transform", "");
|
|
364
|
+
var a = ft(this.el), l = a && a.a, c = a && a.d, h = (n.left - r.left) / (l || 1), u = (n.top - r.top) / (c || 1);
|
|
365
|
+
o.animatingX = !!h, o.animatingY = !!u, f(o, "transform", "translate3d(" + h + "px," + u + "px,0)"), this.forRepaintDummy = ti(o), f(o, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), f(o, "transform", "translate3d(0,0,0)"), typeof o.animated == "number" && clearTimeout(o.animated), o.animated = setTimeout(function() {
|
|
366
|
+
f(o, "transition", ""), f(o, "transform", ""), o.animated = !1, o.animatingX = !1, o.animatingY = !1;
|
|
367
|
+
}, s);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
function ti(e) {
|
|
373
|
+
return e.offsetWidth;
|
|
374
|
+
}
|
|
375
|
+
function ei(e, t, i, o) {
|
|
376
|
+
return Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) / Math.sqrt(Math.pow(t.top - i.top, 2) + Math.pow(t.left - i.left, 2)) * o.animation;
|
|
377
|
+
}
|
|
378
|
+
var lt = [], Kt = {
|
|
379
|
+
initializeByDefault: !0
|
|
380
|
+
}, At = {
|
|
381
|
+
mount: function(t) {
|
|
382
|
+
for (var i in Kt)
|
|
383
|
+
Kt.hasOwnProperty(i) && !(i in t) && (t[i] = Kt[i]);
|
|
384
|
+
lt.forEach(function(o) {
|
|
385
|
+
if (o.pluginName === t.pluginName)
|
|
386
|
+
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
387
|
+
}), lt.push(t);
|
|
388
|
+
},
|
|
389
|
+
pluginEvent: function(t, i, o) {
|
|
390
|
+
var n = this;
|
|
391
|
+
this.eventCanceled = !1, o.cancel = function() {
|
|
392
|
+
n.eventCanceled = !0;
|
|
393
|
+
};
|
|
394
|
+
var r = t + "Global";
|
|
395
|
+
lt.forEach(function(s) {
|
|
396
|
+
!i[s.pluginName] || (i[s.pluginName][r] && i[s.pluginName][r]($({
|
|
397
|
+
sortable: i
|
|
398
|
+
}, o)), i.options[s.pluginName] && i[s.pluginName][t] && i[s.pluginName][t]($({
|
|
399
|
+
sortable: i
|
|
400
|
+
}, o)));
|
|
401
|
+
});
|
|
402
|
+
},
|
|
403
|
+
initializePlugins: function(t, i, o, n) {
|
|
404
|
+
lt.forEach(function(a) {
|
|
405
|
+
var l = a.pluginName;
|
|
406
|
+
if (!(!t.options[l] && !a.initializeByDefault)) {
|
|
407
|
+
var c = new a(t, i, t.options);
|
|
408
|
+
c.sortable = t, c.options = t.options, t[l] = c, U(o, c.defaults);
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
for (var r in t.options)
|
|
412
|
+
if (!!t.options.hasOwnProperty(r)) {
|
|
413
|
+
var s = this.modifyOption(t, r, t.options[r]);
|
|
414
|
+
typeof s < "u" && (t.options[r] = s);
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
getEventProperties: function(t, i) {
|
|
418
|
+
var o = {};
|
|
419
|
+
return lt.forEach(function(n) {
|
|
420
|
+
typeof n.eventProperties == "function" && U(o, n.eventProperties.call(i[n.pluginName], t));
|
|
421
|
+
}), o;
|
|
422
|
+
},
|
|
423
|
+
modifyOption: function(t, i, o) {
|
|
424
|
+
var n;
|
|
425
|
+
return lt.forEach(function(r) {
|
|
426
|
+
!t[r.pluginName] || r.optionListeners && typeof r.optionListeners[i] == "function" && (n = r.optionListeners[i].call(t[r.pluginName], o));
|
|
427
|
+
}), n;
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
function ii(e) {
|
|
431
|
+
var t = e.sortable, i = e.rootEl, o = e.name, n = e.targetEl, r = e.cloneEl, s = e.toEl, a = e.fromEl, l = e.oldIndex, c = e.newIndex, h = e.oldDraggableIndex, u = e.newDraggableIndex, v = e.originalEvent, D = e.putSortable, b = e.extraEventProperties;
|
|
432
|
+
if (t = t || i && i[L], !!t) {
|
|
433
|
+
var _, H = t.options, j = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
434
|
+
window.CustomEvent && !Q && !Tt ? _ = new CustomEvent(o, {
|
|
435
|
+
bubbles: !0,
|
|
436
|
+
cancelable: !0
|
|
437
|
+
}) : (_ = document.createEvent("Event"), _.initEvent(o, !0, !0)), _.to = s || i, _.from = a || i, _.item = n || i, _.clone = r, _.oldIndex = l, _.newIndex = c, _.oldDraggableIndex = h, _.newDraggableIndex = u, _.originalEvent = v, _.pullMode = D ? D.lastPutMode : void 0;
|
|
438
|
+
var O = $($({}, b), At.getEventProperties(o, t));
|
|
439
|
+
for (var X in O)
|
|
440
|
+
_[X] = O[X];
|
|
441
|
+
i && i.dispatchEvent(_), H[j] && H[j].call(t, _);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
var oi = ["evt"], k = function(t, i) {
|
|
445
|
+
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = o.evt, r = Ve(o, oi);
|
|
446
|
+
At.pluginEvent.bind(p)(t, i, $({
|
|
447
|
+
dragEl: d,
|
|
448
|
+
parentEl: S,
|
|
449
|
+
ghostEl: m,
|
|
450
|
+
rootEl: x,
|
|
451
|
+
nextEl: at,
|
|
452
|
+
lastDownEl: Ft,
|
|
453
|
+
cloneEl: E,
|
|
454
|
+
cloneHidden: tt,
|
|
455
|
+
dragStarted: yt,
|
|
456
|
+
putSortable: T,
|
|
457
|
+
activeSortable: p.active,
|
|
458
|
+
originalEvent: n,
|
|
459
|
+
oldIndex: ut,
|
|
460
|
+
oldDraggableIndex: St,
|
|
461
|
+
newIndex: F,
|
|
462
|
+
newDraggableIndex: J,
|
|
463
|
+
hideGhostForTarget: ze,
|
|
464
|
+
unhideGhostForTarget: Fe,
|
|
465
|
+
cloneNowHidden: function() {
|
|
466
|
+
tt = !0;
|
|
467
|
+
},
|
|
468
|
+
cloneNowShown: function() {
|
|
469
|
+
tt = !1;
|
|
470
|
+
},
|
|
471
|
+
dispatchSortableEvent: function(a) {
|
|
472
|
+
P({
|
|
473
|
+
sortable: i,
|
|
474
|
+
name: a,
|
|
475
|
+
originalEvent: n
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
}, r));
|
|
479
|
+
};
|
|
480
|
+
function P(e) {
|
|
481
|
+
ii($({
|
|
482
|
+
putSortable: T,
|
|
483
|
+
cloneEl: E,
|
|
484
|
+
targetEl: d,
|
|
485
|
+
rootEl: x,
|
|
486
|
+
oldIndex: ut,
|
|
487
|
+
oldDraggableIndex: St,
|
|
488
|
+
newIndex: F,
|
|
489
|
+
newDraggableIndex: J
|
|
490
|
+
}, e));
|
|
491
|
+
}
|
|
492
|
+
var d, S, m, x, at, Ft, E, tt, ut, F, St, J, Pt, T, dt = !1, Yt = !1, Rt = [], rt, Y, Ut, Qt, we, ye, yt, ct, It, Ct = !1, kt = !1, Lt, A, qt = [], oe = !1, Wt = [], jt = typeof document < "u", Nt = Se, _e = Tt || Q ? "cssFloat" : "float", ni = jt && !Ie && !Se && "draggable" in document.createElement("div"), ke = function() {
|
|
493
|
+
if (!!jt) {
|
|
494
|
+
if (Q)
|
|
495
|
+
return !1;
|
|
496
|
+
var e = document.createElement("x");
|
|
497
|
+
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
498
|
+
}
|
|
499
|
+
}(), Ne = function(t, i) {
|
|
500
|
+
var o = f(t), n = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o.borderLeftWidth) - parseInt(o.borderRightWidth), r = pt(t, 0, i), s = pt(t, 1, i), a = r && f(r), l = s && f(s), c = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + C(r).width, h = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + C(s).width;
|
|
501
|
+
if (o.display === "flex")
|
|
502
|
+
return o.flexDirection === "column" || o.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
503
|
+
if (o.display === "grid")
|
|
504
|
+
return o.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
505
|
+
if (r && a.float && a.float !== "none") {
|
|
506
|
+
var u = a.float === "left" ? "left" : "right";
|
|
507
|
+
return s && (l.clear === "both" || l.clear === u) ? "vertical" : "horizontal";
|
|
508
|
+
}
|
|
509
|
+
return r && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || c >= n && o[_e] === "none" || s && o[_e] === "none" && c + h > n) ? "vertical" : "horizontal";
|
|
510
|
+
}, ri = function(t, i, o) {
|
|
511
|
+
var n = o ? t.left : t.top, r = o ? t.right : t.bottom, s = o ? t.width : t.height, a = o ? i.left : i.top, l = o ? i.right : i.bottom, c = o ? i.width : i.height;
|
|
512
|
+
return n === a || r === l || n + s / 2 === a + c / 2;
|
|
513
|
+
}, si = function(t, i) {
|
|
514
|
+
var o;
|
|
515
|
+
return Rt.some(function(n) {
|
|
516
|
+
var r = n[L].options.emptyInsertThreshold;
|
|
517
|
+
if (!(!r || le(n))) {
|
|
518
|
+
var s = C(n), a = t >= s.left - r && t <= s.right + r, l = i >= s.top - r && i <= s.bottom + r;
|
|
519
|
+
if (a && l)
|
|
520
|
+
return o = n;
|
|
521
|
+
}
|
|
522
|
+
}), o;
|
|
523
|
+
}, Me = function(t) {
|
|
524
|
+
function i(r, s) {
|
|
525
|
+
return function(a, l, c, h) {
|
|
526
|
+
var u = a.options.group.name && l.options.group.name && a.options.group.name === l.options.group.name;
|
|
527
|
+
if (r == null && (s || u))
|
|
528
|
+
return !0;
|
|
529
|
+
if (r == null || r === !1)
|
|
530
|
+
return !1;
|
|
531
|
+
if (s && r === "clone")
|
|
532
|
+
return r;
|
|
533
|
+
if (typeof r == "function")
|
|
534
|
+
return i(r(a, l, c, h), s)(a, l, c, h);
|
|
535
|
+
var v = (s ? a : l).options.group.name;
|
|
536
|
+
return r === !0 || typeof r == "string" && r === v || r.join && r.indexOf(v) > -1;
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
var o = {}, n = t.group;
|
|
540
|
+
(!n || zt(n) != "object") && (n = {
|
|
541
|
+
name: n
|
|
542
|
+
}), o.name = n.name, o.checkPull = i(n.pull, !0), o.checkPut = i(n.put), o.revertClone = n.revertClone, t.group = o;
|
|
543
|
+
}, ze = function() {
|
|
544
|
+
!ke && m && f(m, "display", "none");
|
|
545
|
+
}, Fe = function() {
|
|
546
|
+
!ke && m && f(m, "display", "");
|
|
547
|
+
};
|
|
548
|
+
jt && !Ie && document.addEventListener("click", function(e) {
|
|
549
|
+
if (Yt)
|
|
550
|
+
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Yt = !1, !1;
|
|
551
|
+
}, !0);
|
|
552
|
+
var st = function(t) {
|
|
553
|
+
if (d) {
|
|
554
|
+
t = t.touches ? t.touches[0] : t;
|
|
555
|
+
var i = si(t.clientX, t.clientY);
|
|
556
|
+
if (i) {
|
|
557
|
+
var o = {};
|
|
558
|
+
for (var n in t)
|
|
559
|
+
t.hasOwnProperty(n) && (o[n] = t[n]);
|
|
560
|
+
o.target = o.rootEl = i, o.preventDefault = void 0, o.stopPropagation = void 0, i[L]._onDragOver(o);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}, ai = function(t) {
|
|
564
|
+
d && d.parentNode[L]._isOutsideThisEl(t.target);
|
|
565
|
+
};
|
|
566
|
+
function p(e, t) {
|
|
567
|
+
if (!(e && e.nodeType && e.nodeType === 1))
|
|
568
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
569
|
+
this.el = e, this.options = t = U({}, t), e[L] = this;
|
|
570
|
+
var i = {
|
|
571
|
+
group: null,
|
|
572
|
+
sort: !0,
|
|
573
|
+
disabled: !1,
|
|
574
|
+
store: null,
|
|
575
|
+
handle: null,
|
|
576
|
+
draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
|
|
577
|
+
swapThreshold: 1,
|
|
578
|
+
invertSwap: !1,
|
|
579
|
+
invertedSwapThreshold: null,
|
|
580
|
+
removeCloneOnHide: !0,
|
|
581
|
+
direction: function() {
|
|
582
|
+
return Ne(e, this.options);
|
|
583
|
+
},
|
|
584
|
+
ghostClass: "sortable-ghost",
|
|
585
|
+
chosenClass: "sortable-chosen",
|
|
586
|
+
dragClass: "sortable-drag",
|
|
587
|
+
ignore: "a, img",
|
|
588
|
+
filter: null,
|
|
589
|
+
preventOnFilter: !0,
|
|
590
|
+
animation: 0,
|
|
591
|
+
easing: null,
|
|
592
|
+
setData: function(s, a) {
|
|
593
|
+
s.setData("Text", a.textContent);
|
|
594
|
+
},
|
|
595
|
+
dropBubble: !1,
|
|
596
|
+
dragoverBubble: !1,
|
|
597
|
+
dataIdAttr: "data-id",
|
|
598
|
+
delay: 0,
|
|
599
|
+
delayOnTouchOnly: !1,
|
|
600
|
+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
601
|
+
forceFallback: !1,
|
|
602
|
+
fallbackClass: "sortable-fallback",
|
|
603
|
+
fallbackOnBody: !1,
|
|
604
|
+
fallbackTolerance: 0,
|
|
605
|
+
fallbackOffset: {
|
|
606
|
+
x: 0,
|
|
607
|
+
y: 0
|
|
608
|
+
},
|
|
609
|
+
supportPointer: p.supportPointer !== !1 && "PointerEvent" in window && !xt,
|
|
610
|
+
emptyInsertThreshold: 5
|
|
611
|
+
};
|
|
612
|
+
At.initializePlugins(this, e, i);
|
|
613
|
+
for (var o in i)
|
|
614
|
+
!(o in t) && (t[o] = i[o]);
|
|
615
|
+
Me(t);
|
|
616
|
+
for (var n in this)
|
|
617
|
+
n.charAt(0) === "_" && typeof this[n] == "function" && (this[n] = this[n].bind(this));
|
|
618
|
+
this.nativeDraggable = t.forceFallback ? !1 : ni, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? y(e, "pointerdown", this._onTapStart) : (y(e, "mousedown", this._onTapStart), y(e, "touchstart", this._onTapStart)), this.nativeDraggable && (y(e, "dragover", this), y(e, "dragenter", this)), Rt.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), U(this, Je());
|
|
619
|
+
}
|
|
620
|
+
p.prototype = {
|
|
621
|
+
constructor: p,
|
|
622
|
+
_isOutsideThisEl: function(t) {
|
|
623
|
+
!this.el.contains(t) && t !== this.el && (ct = null);
|
|
624
|
+
},
|
|
625
|
+
_getDirection: function(t, i) {
|
|
626
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, i, d) : this.options.direction;
|
|
627
|
+
},
|
|
628
|
+
_onTapStart: function(t) {
|
|
629
|
+
if (!!t.cancelable) {
|
|
630
|
+
var i = this, o = this.el, n = this.options, r = n.preventOnFilter, s = t.type, a = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, l = (a || t).target, c = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || l, h = n.filter;
|
|
631
|
+
if (gi(o), !d && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || n.disabled) && !c.isContentEditable && !(!this.nativeDraggable && xt && l && l.tagName.toUpperCase() === "SELECT") && (l = W(l, n.draggable, o, !1), !(l && l.animated) && Ft !== l)) {
|
|
632
|
+
if (ut = B(l), St = B(l, n.draggable), typeof h == "function") {
|
|
633
|
+
if (h.call(this, t, l, this)) {
|
|
634
|
+
P({
|
|
635
|
+
sortable: i,
|
|
636
|
+
rootEl: c,
|
|
637
|
+
name: "filter",
|
|
638
|
+
targetEl: l,
|
|
639
|
+
toEl: o,
|
|
640
|
+
fromEl: o
|
|
641
|
+
}), k("filter", i, {
|
|
642
|
+
evt: t
|
|
643
|
+
}), r && t.cancelable && t.preventDefault();
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
} else if (h && (h = h.split(",").some(function(u) {
|
|
647
|
+
if (u = W(c, u.trim(), o, !1), u)
|
|
648
|
+
return P({
|
|
649
|
+
sortable: i,
|
|
650
|
+
rootEl: u,
|
|
651
|
+
name: "filter",
|
|
652
|
+
targetEl: l,
|
|
653
|
+
fromEl: o,
|
|
654
|
+
toEl: o
|
|
655
|
+
}), k("filter", i, {
|
|
656
|
+
evt: t
|
|
657
|
+
}), !0;
|
|
658
|
+
}), h)) {
|
|
659
|
+
r && t.cancelable && t.preventDefault();
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
n.handle && !W(c, n.handle, o, !1) || this._prepareDragStart(t, a, l);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
_prepareDragStart: function(t, i, o) {
|
|
667
|
+
var n = this, r = n.el, s = n.options, a = r.ownerDocument, l;
|
|
668
|
+
if (o && !d && o.parentNode === r) {
|
|
669
|
+
var c = C(o);
|
|
670
|
+
if (x = r, d = o, S = d.parentNode, at = d.nextSibling, Ft = o, Pt = s.group, p.dragged = d, rt = {
|
|
671
|
+
target: d,
|
|
672
|
+
clientX: (i || t).clientX,
|
|
673
|
+
clientY: (i || t).clientY
|
|
674
|
+
}, we = rt.clientX - c.left, ye = rt.clientY - c.top, this._lastX = (i || t).clientX, this._lastY = (i || t).clientY, d.style["will-change"] = "all", l = function() {
|
|
675
|
+
if (k("delayEnded", n, {
|
|
676
|
+
evt: t
|
|
677
|
+
}), p.eventCanceled) {
|
|
678
|
+
n._onDrop();
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
n._disableDelayedDragEvents(), !ge && n.nativeDraggable && (d.draggable = !0), n._triggerDragStart(t, i), P({
|
|
682
|
+
sortable: n,
|
|
683
|
+
name: "choose",
|
|
684
|
+
originalEvent: t
|
|
685
|
+
}), z(d, s.chosenClass, !0);
|
|
686
|
+
}, s.ignore.split(",").forEach(function(h) {
|
|
687
|
+
Te(d, h.trim(), Zt);
|
|
688
|
+
}), y(a, "dragover", st), y(a, "mousemove", st), y(a, "touchmove", st), y(a, "mouseup", n._onDrop), y(a, "touchend", n._onDrop), y(a, "touchcancel", n._onDrop), ge && this.nativeDraggable && (this.options.touchStartThreshold = 4, d.draggable = !0), k("delayStart", this, {
|
|
689
|
+
evt: t
|
|
690
|
+
}), s.delay && (!s.delayOnTouchOnly || i) && (!this.nativeDraggable || !(Tt || Q))) {
|
|
691
|
+
if (p.eventCanceled) {
|
|
692
|
+
this._onDrop();
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
695
|
+
y(a, "mouseup", n._disableDelayedDrag), y(a, "touchend", n._disableDelayedDrag), y(a, "touchcancel", n._disableDelayedDrag), y(a, "mousemove", n._delayedDragTouchMoveHandler), y(a, "touchmove", n._delayedDragTouchMoveHandler), s.supportPointer && y(a, "pointermove", n._delayedDragTouchMoveHandler), n._dragStartTimer = setTimeout(l, s.delay);
|
|
696
|
+
} else
|
|
697
|
+
l();
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
_delayedDragTouchMoveHandler: function(t) {
|
|
701
|
+
var i = t.touches ? t.touches[0] : t;
|
|
702
|
+
Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
703
|
+
},
|
|
704
|
+
_disableDelayedDrag: function() {
|
|
705
|
+
d && Zt(d), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
706
|
+
},
|
|
707
|
+
_disableDelayedDragEvents: function() {
|
|
708
|
+
var t = this.el.ownerDocument;
|
|
709
|
+
w(t, "mouseup", this._disableDelayedDrag), w(t, "touchend", this._disableDelayedDrag), w(t, "touchcancel", this._disableDelayedDrag), w(t, "mousemove", this._delayedDragTouchMoveHandler), w(t, "touchmove", this._delayedDragTouchMoveHandler), w(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
710
|
+
},
|
|
711
|
+
_triggerDragStart: function(t, i) {
|
|
712
|
+
i = i || t.pointerType == "touch" && t, !this.nativeDraggable || i ? this.options.supportPointer ? y(document, "pointermove", this._onTouchMove) : i ? y(document, "touchmove", this._onTouchMove) : y(document, "mousemove", this._onTouchMove) : (y(d, "dragend", this), y(x, "dragstart", this._onDragStart));
|
|
713
|
+
try {
|
|
714
|
+
document.selection ? Bt(function() {
|
|
715
|
+
document.selection.empty();
|
|
716
|
+
}) : window.getSelection().removeAllRanges();
|
|
717
|
+
} catch {
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
_dragStarted: function(t, i) {
|
|
721
|
+
if (dt = !1, x && d) {
|
|
722
|
+
k("dragStarted", this, {
|
|
723
|
+
evt: i
|
|
724
|
+
}), this.nativeDraggable && y(document, "dragover", ai);
|
|
725
|
+
var o = this.options;
|
|
726
|
+
!t && z(d, o.dragClass, !1), z(d, o.ghostClass, !0), p.active = this, t && this._appendGhost(), P({
|
|
727
|
+
sortable: this,
|
|
728
|
+
name: "start",
|
|
729
|
+
originalEvent: i
|
|
730
|
+
});
|
|
731
|
+
} else
|
|
732
|
+
this._nulling();
|
|
733
|
+
},
|
|
734
|
+
_emulateDragOver: function() {
|
|
735
|
+
if (Y) {
|
|
736
|
+
this._lastX = Y.clientX, this._lastY = Y.clientY, ze();
|
|
737
|
+
for (var t = document.elementFromPoint(Y.clientX, Y.clientY), i = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(Y.clientX, Y.clientY), t !== i); )
|
|
738
|
+
i = t;
|
|
739
|
+
if (d.parentNode[L]._isOutsideThisEl(t), i)
|
|
740
|
+
do {
|
|
741
|
+
if (i[L]) {
|
|
742
|
+
var o = void 0;
|
|
743
|
+
if (o = i[L]._onDragOver({
|
|
744
|
+
clientX: Y.clientX,
|
|
745
|
+
clientY: Y.clientY,
|
|
746
|
+
target: t,
|
|
747
|
+
rootEl: i
|
|
748
|
+
}), o && !this.options.dragoverBubble)
|
|
749
|
+
break;
|
|
750
|
+
}
|
|
751
|
+
t = i;
|
|
752
|
+
} while (i = i.parentNode);
|
|
753
|
+
Fe();
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
_onTouchMove: function(t) {
|
|
757
|
+
if (rt) {
|
|
758
|
+
var i = this.options, o = i.fallbackTolerance, n = i.fallbackOffset, r = t.touches ? t.touches[0] : t, s = m && ft(m, !0), a = m && s && s.a, l = m && s && s.d, c = Nt && A && be(A), h = (r.clientX - rt.clientX + n.x) / (a || 1) + (c ? c[0] - qt[0] : 0) / (a || 1), u = (r.clientY - rt.clientY + n.y) / (l || 1) + (c ? c[1] - qt[1] : 0) / (l || 1);
|
|
759
|
+
if (!p.active && !dt) {
|
|
760
|
+
if (o && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < o)
|
|
761
|
+
return;
|
|
762
|
+
this._onDragStart(t, !0);
|
|
763
|
+
}
|
|
764
|
+
if (m) {
|
|
765
|
+
s ? (s.e += h - (Ut || 0), s.f += u - (Qt || 0)) : s = {
|
|
766
|
+
a: 1,
|
|
767
|
+
b: 0,
|
|
768
|
+
c: 0,
|
|
769
|
+
d: 1,
|
|
770
|
+
e: h,
|
|
771
|
+
f: u
|
|
772
|
+
};
|
|
773
|
+
var v = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
|
|
774
|
+
f(m, "webkitTransform", v), f(m, "mozTransform", v), f(m, "msTransform", v), f(m, "transform", v), Ut = h, Qt = u, Y = r;
|
|
775
|
+
}
|
|
776
|
+
t.cancelable && t.preventDefault();
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
_appendGhost: function() {
|
|
780
|
+
if (!m) {
|
|
781
|
+
var t = this.options.fallbackOnBody ? document.body : x, i = C(d, !0, Nt, !0, t), o = this.options;
|
|
782
|
+
if (Nt) {
|
|
783
|
+
for (A = t; f(A, "position") === "static" && f(A, "transform") === "none" && A !== document; )
|
|
784
|
+
A = A.parentNode;
|
|
785
|
+
A !== document.body && A !== document.documentElement ? (A === document && (A = G()), i.top += A.scrollTop, i.left += A.scrollLeft) : A = G(), qt = be(A);
|
|
786
|
+
}
|
|
787
|
+
m = d.cloneNode(!0), z(m, o.ghostClass, !1), z(m, o.fallbackClass, !0), z(m, o.dragClass, !0), f(m, "transition", ""), f(m, "transform", ""), f(m, "box-sizing", "border-box"), f(m, "margin", 0), f(m, "top", i.top), f(m, "left", i.left), f(m, "width", i.width), f(m, "height", i.height), f(m, "opacity", "0.8"), f(m, "position", Nt ? "absolute" : "fixed"), f(m, "zIndex", "100000"), f(m, "pointerEvents", "none"), p.ghost = m, t.appendChild(m), f(m, "transform-origin", we / parseInt(m.style.width) * 100 + "% " + ye / parseInt(m.style.height) * 100 + "%");
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
_onDragStart: function(t, i) {
|
|
791
|
+
var o = this, n = t.dataTransfer, r = o.options;
|
|
792
|
+
if (k("dragStart", this, {
|
|
793
|
+
evt: t
|
|
794
|
+
}), p.eventCanceled) {
|
|
795
|
+
this._onDrop();
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
k("setupClone", this), p.eventCanceled || (E = Pe(d), E.removeAttribute("id"), E.draggable = !1, E.style["will-change"] = "", this._hideClone(), z(E, this.options.chosenClass, !1), p.clone = E), o.cloneId = Bt(function() {
|
|
799
|
+
k("clone", o), !p.eventCanceled && (o.options.removeCloneOnHide || x.insertBefore(E, d), o._hideClone(), P({
|
|
800
|
+
sortable: o,
|
|
801
|
+
name: "clone"
|
|
802
|
+
}));
|
|
803
|
+
}), !i && z(d, r.dragClass, !0), i ? (Yt = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (w(document, "mouseup", o._onDrop), w(document, "touchend", o._onDrop), w(document, "touchcancel", o._onDrop), n && (n.effectAllowed = "move", r.setData && r.setData.call(o, n, d)), y(document, "drop", o), f(d, "transform", "translateZ(0)")), dt = !0, o._dragStartId = Bt(o._dragStarted.bind(o, i, t)), y(document, "selectstart", o), yt = !0, xt && f(document.body, "user-select", "none");
|
|
804
|
+
},
|
|
805
|
+
_onDragOver: function(t) {
|
|
806
|
+
var i = this.el, o = t.target, n, r, s, a = this.options, l = a.group, c = p.active, h = Pt === l, u = a.sort, v = T || c, D, b = this, _ = !1;
|
|
807
|
+
if (oe)
|
|
808
|
+
return;
|
|
809
|
+
function H(wt, Be) {
|
|
810
|
+
k(wt, b, $({
|
|
811
|
+
evt: t,
|
|
812
|
+
isOwner: h,
|
|
813
|
+
axis: D ? "vertical" : "horizontal",
|
|
814
|
+
revert: s,
|
|
815
|
+
dragRect: n,
|
|
816
|
+
targetRect: r,
|
|
817
|
+
canSort: u,
|
|
818
|
+
fromSortable: v,
|
|
819
|
+
target: o,
|
|
820
|
+
completed: O,
|
|
821
|
+
onMove: function(ue, He) {
|
|
822
|
+
return Mt(x, i, d, n, ue, C(ue), t, He);
|
|
823
|
+
},
|
|
824
|
+
changed: X
|
|
825
|
+
}, Be));
|
|
826
|
+
}
|
|
827
|
+
function j() {
|
|
828
|
+
H("dragOverAnimationCapture"), b.captureAnimationState(), b !== v && v.captureAnimationState();
|
|
829
|
+
}
|
|
830
|
+
function O(wt) {
|
|
831
|
+
return H("dragOverCompleted", {
|
|
832
|
+
insertion: wt
|
|
833
|
+
}), wt && (h ? c._hideClone() : c._showClone(b), b !== v && (z(d, T ? T.options.ghostClass : c.options.ghostClass, !1), z(d, a.ghostClass, !0)), T !== b && b !== p.active ? T = b : b === p.active && T && (T = null), v === b && (b._ignoreWhileAnimating = o), b.animateAll(function() {
|
|
834
|
+
H("dragOverAnimationComplete"), b._ignoreWhileAnimating = null;
|
|
835
|
+
}), b !== v && (v.animateAll(), v._ignoreWhileAnimating = null)), (o === d && !d.animated || o === i && !o.animated) && (ct = null), !a.dragoverBubble && !t.rootEl && o !== document && (d.parentNode[L]._isOutsideThisEl(t.target), !wt && st(t)), !a.dragoverBubble && t.stopPropagation && t.stopPropagation(), _ = !0;
|
|
836
|
+
}
|
|
837
|
+
function X() {
|
|
838
|
+
F = B(d), J = B(d, a.draggable), P({
|
|
839
|
+
sortable: b,
|
|
840
|
+
name: "change",
|
|
841
|
+
toEl: i,
|
|
842
|
+
newIndex: F,
|
|
843
|
+
newDraggableIndex: J,
|
|
844
|
+
originalEvent: t
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), o = W(o, a.draggable, i, !0), H("dragOver"), p.eventCanceled)
|
|
848
|
+
return _;
|
|
849
|
+
if (d.contains(t.target) || o.animated && o.animatingX && o.animatingY || b._ignoreWhileAnimating === o)
|
|
850
|
+
return O(!1);
|
|
851
|
+
if (Yt = !1, c && !a.disabled && (h ? u || (s = S !== x) : T === this || (this.lastPutMode = Pt.checkPull(this, c, d, t)) && l.checkPut(this, c, d, t))) {
|
|
852
|
+
if (D = this._getDirection(t, o) === "vertical", n = C(d), H("dragOverValid"), p.eventCanceled)
|
|
853
|
+
return _;
|
|
854
|
+
if (s)
|
|
855
|
+
return S = x, j(), this._hideClone(), H("revert"), p.eventCanceled || (at ? x.insertBefore(d, at) : x.appendChild(d)), O(!0);
|
|
856
|
+
var N = le(i, a.draggable);
|
|
857
|
+
if (!N || ui(t, D, this) && !N.animated) {
|
|
858
|
+
if (N === d)
|
|
859
|
+
return O(!1);
|
|
860
|
+
if (N && i === t.target && (o = N), o && (r = C(o)), Mt(x, i, d, n, o, r, t, !!o) !== !1)
|
|
861
|
+
return j(), N && N.nextSibling ? i.insertBefore(d, N.nextSibling) : i.appendChild(d), S = i, X(), O(!0);
|
|
862
|
+
} else if (N && di(t, D, this)) {
|
|
863
|
+
var it = pt(i, 0, a, !0);
|
|
864
|
+
if (it === d)
|
|
865
|
+
return O(!1);
|
|
866
|
+
if (o = it, r = C(o), Mt(x, i, d, n, o, r, t, !1) !== !1)
|
|
867
|
+
return j(), i.insertBefore(d, it), S = i, X(), O(!0);
|
|
868
|
+
} else if (o.parentNode === i) {
|
|
869
|
+
r = C(o);
|
|
870
|
+
var R = 0, ot, gt = d.parentNode !== i, M = !ri(d.animated && d.toRect || n, o.animated && o.toRect || r, D), mt = D ? "top" : "left", q = ve(o, "top", "top") || ve(d, "top", "top"), vt = q ? q.scrollTop : void 0;
|
|
871
|
+
ct !== o && (ot = r[mt], Ct = !1, kt = !M && a.invertSwap || gt), R = hi(t, o, r, D, M ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, kt, ct === o);
|
|
872
|
+
var V;
|
|
873
|
+
if (R !== 0) {
|
|
874
|
+
var nt = B(d);
|
|
875
|
+
do
|
|
876
|
+
nt -= R, V = S.children[nt];
|
|
877
|
+
while (V && (f(V, "display") === "none" || V === m));
|
|
878
|
+
}
|
|
879
|
+
if (R === 0 || V === o)
|
|
880
|
+
return O(!1);
|
|
881
|
+
ct = o, It = R;
|
|
882
|
+
var bt = o.nextElementSibling, Z = !1;
|
|
883
|
+
Z = R === 1;
|
|
884
|
+
var Ot = Mt(x, i, d, n, o, r, t, Z);
|
|
885
|
+
if (Ot !== !1)
|
|
886
|
+
return (Ot === 1 || Ot === -1) && (Z = Ot === 1), oe = !0, setTimeout(ci, 30), j(), Z && !bt ? i.appendChild(d) : o.parentNode.insertBefore(d, Z ? bt : o), q && Oe(q, 0, vt - q.scrollTop), S = d.parentNode, ot !== void 0 && !kt && (Lt = Math.abs(ot - C(o)[mt])), X(), O(!0);
|
|
887
|
+
}
|
|
888
|
+
if (i.contains(d))
|
|
889
|
+
return O(!1);
|
|
890
|
+
}
|
|
891
|
+
return !1;
|
|
892
|
+
},
|
|
893
|
+
_ignoreWhileAnimating: null,
|
|
894
|
+
_offMoveEvents: function() {
|
|
895
|
+
w(document, "mousemove", this._onTouchMove), w(document, "touchmove", this._onTouchMove), w(document, "pointermove", this._onTouchMove), w(document, "dragover", st), w(document, "mousemove", st), w(document, "touchmove", st);
|
|
896
|
+
},
|
|
897
|
+
_offUpEvents: function() {
|
|
898
|
+
var t = this.el.ownerDocument;
|
|
899
|
+
w(t, "mouseup", this._onDrop), w(t, "touchend", this._onDrop), w(t, "pointerup", this._onDrop), w(t, "touchcancel", this._onDrop), w(document, "selectstart", this);
|
|
900
|
+
},
|
|
901
|
+
_onDrop: function(t) {
|
|
902
|
+
var i = this.el, o = this.options;
|
|
903
|
+
if (F = B(d), J = B(d, o.draggable), k("drop", this, {
|
|
904
|
+
evt: t
|
|
905
|
+
}), S = d && d.parentNode, F = B(d), J = B(d, o.draggable), p.eventCanceled) {
|
|
906
|
+
this._nulling();
|
|
907
|
+
return;
|
|
908
|
+
}
|
|
909
|
+
dt = !1, kt = !1, Ct = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ne(this.cloneId), ne(this._dragStartId), this.nativeDraggable && (w(document, "drop", this), w(i, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), xt && f(document.body, "user-select", ""), f(d, "transform", ""), t && (yt && (t.cancelable && t.preventDefault(), !o.dropBubble && t.stopPropagation()), m && m.parentNode && m.parentNode.removeChild(m), (x === S || T && T.lastPutMode !== "clone") && E && E.parentNode && E.parentNode.removeChild(E), d && (this.nativeDraggable && w(d, "dragend", this), Zt(d), d.style["will-change"] = "", yt && !dt && z(d, T ? T.options.ghostClass : this.options.ghostClass, !1), z(d, this.options.chosenClass, !1), P({
|
|
910
|
+
sortable: this,
|
|
911
|
+
name: "unchoose",
|
|
912
|
+
toEl: S,
|
|
913
|
+
newIndex: null,
|
|
914
|
+
newDraggableIndex: null,
|
|
915
|
+
originalEvent: t
|
|
916
|
+
}), x !== S ? (F >= 0 && (P({
|
|
917
|
+
rootEl: S,
|
|
918
|
+
name: "add",
|
|
919
|
+
toEl: S,
|
|
920
|
+
fromEl: x,
|
|
921
|
+
originalEvent: t
|
|
922
|
+
}), P({
|
|
923
|
+
sortable: this,
|
|
924
|
+
name: "remove",
|
|
925
|
+
toEl: S,
|
|
926
|
+
originalEvent: t
|
|
927
|
+
}), P({
|
|
928
|
+
rootEl: S,
|
|
929
|
+
name: "sort",
|
|
930
|
+
toEl: S,
|
|
931
|
+
fromEl: x,
|
|
932
|
+
originalEvent: t
|
|
933
|
+
}), P({
|
|
934
|
+
sortable: this,
|
|
935
|
+
name: "sort",
|
|
936
|
+
toEl: S,
|
|
937
|
+
originalEvent: t
|
|
938
|
+
})), T && T.save()) : F !== ut && F >= 0 && (P({
|
|
939
|
+
sortable: this,
|
|
940
|
+
name: "update",
|
|
941
|
+
toEl: S,
|
|
942
|
+
originalEvent: t
|
|
943
|
+
}), P({
|
|
944
|
+
sortable: this,
|
|
945
|
+
name: "sort",
|
|
946
|
+
toEl: S,
|
|
947
|
+
originalEvent: t
|
|
948
|
+
})), p.active && ((F == null || F === -1) && (F = ut, J = St), P({
|
|
949
|
+
sortable: this,
|
|
950
|
+
name: "end",
|
|
951
|
+
toEl: S,
|
|
952
|
+
originalEvent: t
|
|
953
|
+
}), this.save()))), this._nulling();
|
|
954
|
+
},
|
|
955
|
+
_nulling: function() {
|
|
956
|
+
k("nulling", this), x = d = S = m = at = E = Ft = tt = rt = Y = yt = F = J = ut = St = ct = It = T = Pt = p.dragged = p.ghost = p.clone = p.active = null, Wt.forEach(function(t) {
|
|
957
|
+
t.checked = !0;
|
|
958
|
+
}), Wt.length = Ut = Qt = 0;
|
|
959
|
+
},
|
|
960
|
+
handleEvent: function(t) {
|
|
961
|
+
switch (t.type) {
|
|
962
|
+
case "drop":
|
|
963
|
+
case "dragend":
|
|
964
|
+
this._onDrop(t);
|
|
965
|
+
break;
|
|
966
|
+
case "dragenter":
|
|
967
|
+
case "dragover":
|
|
968
|
+
d && (this._onDragOver(t), li(t));
|
|
969
|
+
break;
|
|
970
|
+
case "selectstart":
|
|
971
|
+
t.preventDefault();
|
|
972
|
+
break;
|
|
973
|
+
}
|
|
974
|
+
},
|
|
975
|
+
toArray: function() {
|
|
976
|
+
for (var t = [], i, o = this.el.children, n = 0, r = o.length, s = this.options; n < r; n++)
|
|
977
|
+
i = o[n], W(i, s.draggable, this.el, !1) && t.push(i.getAttribute(s.dataIdAttr) || pi(i));
|
|
978
|
+
return t;
|
|
979
|
+
},
|
|
980
|
+
sort: function(t, i) {
|
|
981
|
+
var o = {}, n = this.el;
|
|
982
|
+
this.toArray().forEach(function(r, s) {
|
|
983
|
+
var a = n.children[s];
|
|
984
|
+
W(a, this.options.draggable, n, !1) && (o[r] = a);
|
|
985
|
+
}, this), i && this.captureAnimationState(), t.forEach(function(r) {
|
|
986
|
+
o[r] && (n.removeChild(o[r]), n.appendChild(o[r]));
|
|
987
|
+
}), i && this.animateAll();
|
|
988
|
+
},
|
|
989
|
+
save: function() {
|
|
990
|
+
var t = this.options.store;
|
|
991
|
+
t && t.set && t.set(this);
|
|
992
|
+
},
|
|
993
|
+
closest: function(t, i) {
|
|
994
|
+
return W(t, i || this.options.draggable, this.el, !1);
|
|
995
|
+
},
|
|
996
|
+
option: function(t, i) {
|
|
997
|
+
var o = this.options;
|
|
998
|
+
if (i === void 0)
|
|
999
|
+
return o[t];
|
|
1000
|
+
var n = At.modifyOption(this, t, i);
|
|
1001
|
+
typeof n < "u" ? o[t] = n : o[t] = i, t === "group" && Me(o);
|
|
1002
|
+
},
|
|
1003
|
+
destroy: function() {
|
|
1004
|
+
k("destroy", this);
|
|
1005
|
+
var t = this.el;
|
|
1006
|
+
t[L] = null, w(t, "mousedown", this._onTapStart), w(t, "touchstart", this._onTapStart), w(t, "pointerdown", this._onTapStart), this.nativeDraggable && (w(t, "dragover", this), w(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(i) {
|
|
1007
|
+
i.removeAttribute("draggable");
|
|
1008
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Rt.splice(Rt.indexOf(this.el), 1), this.el = t = null;
|
|
1009
|
+
},
|
|
1010
|
+
_hideClone: function() {
|
|
1011
|
+
if (!tt) {
|
|
1012
|
+
if (k("hideClone", this), p.eventCanceled)
|
|
1013
|
+
return;
|
|
1014
|
+
f(E, "display", "none"), this.options.removeCloneOnHide && E.parentNode && E.parentNode.removeChild(E), tt = !0;
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
_showClone: function(t) {
|
|
1018
|
+
if (t.lastPutMode !== "clone") {
|
|
1019
|
+
this._hideClone();
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
if (tt) {
|
|
1023
|
+
if (k("showClone", this), p.eventCanceled)
|
|
1024
|
+
return;
|
|
1025
|
+
d.parentNode == x && !this.options.group.revertClone ? x.insertBefore(E, d) : at ? x.insertBefore(E, at) : x.appendChild(E), this.options.group.revertClone && this.animate(d, E), f(E, "display", ""), tt = !1;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
};
|
|
1029
|
+
function li(e) {
|
|
1030
|
+
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1031
|
+
}
|
|
1032
|
+
function Mt(e, t, i, o, n, r, s, a) {
|
|
1033
|
+
var l, c = e[L], h = c.options.onMove, u;
|
|
1034
|
+
return window.CustomEvent && !Q && !Tt ? l = new CustomEvent("move", {
|
|
1035
|
+
bubbles: !0,
|
|
1036
|
+
cancelable: !0
|
|
1037
|
+
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = e, l.dragged = i, l.draggedRect = o, l.related = n || t, l.relatedRect = r || C(t), l.willInsertAfter = a, l.originalEvent = s, e.dispatchEvent(l), h && (u = h.call(c, l, s)), u;
|
|
1038
|
+
}
|
|
1039
|
+
function Zt(e) {
|
|
1040
|
+
e.draggable = !1;
|
|
1041
|
+
}
|
|
1042
|
+
function ci() {
|
|
1043
|
+
oe = !1;
|
|
1044
|
+
}
|
|
1045
|
+
function di(e, t, i) {
|
|
1046
|
+
var o = C(pt(i.el, 0, i.options, !0)), n = 10;
|
|
1047
|
+
return t ? e.clientX < o.left - n || e.clientY < o.top && e.clientX < o.right : e.clientY < o.top - n || e.clientY < o.bottom && e.clientX < o.left;
|
|
1048
|
+
}
|
|
1049
|
+
function ui(e, t, i) {
|
|
1050
|
+
var o = C(le(i.el, i.options.draggable)), n = 10;
|
|
1051
|
+
return t ? e.clientX > o.right + n || e.clientX <= o.right && e.clientY > o.bottom && e.clientX >= o.left : e.clientX > o.right && e.clientY > o.top || e.clientX <= o.right && e.clientY > o.bottom + n;
|
|
1052
|
+
}
|
|
1053
|
+
function hi(e, t, i, o, n, r, s, a) {
|
|
1054
|
+
var l = o ? e.clientY : e.clientX, c = o ? i.height : i.width, h = o ? i.top : i.left, u = o ? i.bottom : i.right, v = !1;
|
|
1055
|
+
if (!s) {
|
|
1056
|
+
if (a && Lt < c * n) {
|
|
1057
|
+
if (!Ct && (It === 1 ? l > h + c * r / 2 : l < u - c * r / 2) && (Ct = !0), Ct)
|
|
1058
|
+
v = !0;
|
|
1059
|
+
else if (It === 1 ? l < h + Lt : l > u - Lt)
|
|
1060
|
+
return -It;
|
|
1061
|
+
} else if (l > h + c * (1 - n) / 2 && l < u - c * (1 - n) / 2)
|
|
1062
|
+
return fi(t);
|
|
1063
|
+
}
|
|
1064
|
+
return v = v || s, v && (l < h + c * r / 2 || l > u - c * r / 2) ? l > h + c / 2 ? 1 : -1 : 0;
|
|
1065
|
+
}
|
|
1066
|
+
function fi(e) {
|
|
1067
|
+
return B(d) < B(e) ? 1 : -1;
|
|
1068
|
+
}
|
|
1069
|
+
function pi(e) {
|
|
1070
|
+
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, i = t.length, o = 0; i--; )
|
|
1071
|
+
o += t.charCodeAt(i);
|
|
1072
|
+
return o.toString(36);
|
|
1073
|
+
}
|
|
1074
|
+
function gi(e) {
|
|
1075
|
+
Wt.length = 0;
|
|
1076
|
+
for (var t = e.getElementsByTagName("input"), i = t.length; i--; ) {
|
|
1077
|
+
var o = t[i];
|
|
1078
|
+
o.checked && Wt.push(o);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
function Bt(e) {
|
|
1082
|
+
return setTimeout(e, 0);
|
|
1083
|
+
}
|
|
1084
|
+
function ne(e) {
|
|
1085
|
+
return clearTimeout(e);
|
|
1086
|
+
}
|
|
1087
|
+
jt && y(document, "touchmove", function(e) {
|
|
1088
|
+
(p.active || dt) && e.cancelable && e.preventDefault();
|
|
1089
|
+
});
|
|
1090
|
+
p.utils = {
|
|
1091
|
+
on: y,
|
|
1092
|
+
off: w,
|
|
1093
|
+
css: f,
|
|
1094
|
+
find: Te,
|
|
1095
|
+
is: function(t, i) {
|
|
1096
|
+
return !!W(t, i, t, !1);
|
|
1097
|
+
},
|
|
1098
|
+
extend: qe,
|
|
1099
|
+
throttle: Ae,
|
|
1100
|
+
closest: W,
|
|
1101
|
+
toggleClass: z,
|
|
1102
|
+
clone: Pe,
|
|
1103
|
+
index: B,
|
|
1104
|
+
nextTick: Bt,
|
|
1105
|
+
cancelNextTick: ne,
|
|
1106
|
+
detectDirection: Ne,
|
|
1107
|
+
getChild: pt
|
|
1108
|
+
};
|
|
1109
|
+
p.get = function(e) {
|
|
1110
|
+
return e[L];
|
|
1111
|
+
};
|
|
1112
|
+
p.mount = function() {
|
|
1113
|
+
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
1114
|
+
t[i] = arguments[i];
|
|
1115
|
+
t[0].constructor === Array && (t = t[0]), t.forEach(function(o) {
|
|
1116
|
+
if (!o.prototype || !o.prototype.constructor)
|
|
1117
|
+
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
|
|
1118
|
+
o.utils && (p.utils = $($({}, p.utils), o.utils)), At.mount(o);
|
|
1119
|
+
});
|
|
1120
|
+
};
|
|
1121
|
+
p.create = function(e, t) {
|
|
1122
|
+
return new p(e, t);
|
|
1123
|
+
};
|
|
1124
|
+
p.version = Ke;
|
|
1125
|
+
var I = [], _t, re, se = !1, Jt, te, Gt, Dt;
|
|
1126
|
+
function mi() {
|
|
1127
|
+
function e() {
|
|
1128
|
+
this.defaults = {
|
|
1129
|
+
scroll: !0,
|
|
1130
|
+
forceAutoScrollFallback: !1,
|
|
1131
|
+
scrollSensitivity: 30,
|
|
1132
|
+
scrollSpeed: 10,
|
|
1133
|
+
bubbleScroll: !0
|
|
1134
|
+
};
|
|
1135
|
+
for (var t in this)
|
|
1136
|
+
t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
1137
|
+
}
|
|
1138
|
+
return e.prototype = {
|
|
1139
|
+
dragStarted: function(i) {
|
|
1140
|
+
var o = i.originalEvent;
|
|
1141
|
+
this.sortable.nativeDraggable ? y(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? y(document, "pointermove", this._handleFallbackAutoScroll) : o.touches ? y(document, "touchmove", this._handleFallbackAutoScroll) : y(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1142
|
+
},
|
|
1143
|
+
dragOverCompleted: function(i) {
|
|
1144
|
+
var o = i.originalEvent;
|
|
1145
|
+
!this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o);
|
|
1146
|
+
},
|
|
1147
|
+
drop: function() {
|
|
1148
|
+
this.sortable.nativeDraggable ? w(document, "dragover", this._handleAutoScroll) : (w(document, "pointermove", this._handleFallbackAutoScroll), w(document, "touchmove", this._handleFallbackAutoScroll), w(document, "mousemove", this._handleFallbackAutoScroll)), De(), Ht(), Ze();
|
|
1149
|
+
},
|
|
1150
|
+
nulling: function() {
|
|
1151
|
+
Gt = re = _t = se = Dt = Jt = te = null, I.length = 0;
|
|
1152
|
+
},
|
|
1153
|
+
_handleFallbackAutoScroll: function(i) {
|
|
1154
|
+
this._handleAutoScroll(i, !0);
|
|
1155
|
+
},
|
|
1156
|
+
_handleAutoScroll: function(i, o) {
|
|
1157
|
+
var n = this, r = (i.touches ? i.touches[0] : i).clientX, s = (i.touches ? i.touches[0] : i).clientY, a = document.elementFromPoint(r, s);
|
|
1158
|
+
if (Gt = i, o || this.options.forceAutoScrollFallback || Tt || Q || xt) {
|
|
1159
|
+
ee(i, this.options, a, o);
|
|
1160
|
+
var l = et(a, !0);
|
|
1161
|
+
se && (!Dt || r !== Jt || s !== te) && (Dt && De(), Dt = setInterval(function() {
|
|
1162
|
+
var c = et(document.elementFromPoint(r, s), !0);
|
|
1163
|
+
c !== l && (l = c, Ht()), ee(i, n.options, c, o);
|
|
1164
|
+
}, 10), Jt = r, te = s);
|
|
1165
|
+
} else {
|
|
1166
|
+
if (!this.options.bubbleScroll || et(a, !0) === G()) {
|
|
1167
|
+
Ht();
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1170
|
+
ee(i, this.options, et(a, !1), !1);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}, U(e, {
|
|
1174
|
+
pluginName: "scroll",
|
|
1175
|
+
initializeByDefault: !0
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
function Ht() {
|
|
1179
|
+
I.forEach(function(e) {
|
|
1180
|
+
clearInterval(e.pid);
|
|
1181
|
+
}), I = [];
|
|
1182
|
+
}
|
|
1183
|
+
function De() {
|
|
1184
|
+
clearInterval(Dt);
|
|
1185
|
+
}
|
|
1186
|
+
var ee = Ae(function(e, t, i, o) {
|
|
1187
|
+
if (!!t.scroll) {
|
|
1188
|
+
var n = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, s = t.scrollSensitivity, a = t.scrollSpeed, l = G(), c = !1, h;
|
|
1189
|
+
re !== i && (re = i, Ht(), _t = t.scroll, h = t.scrollFn, _t === !0 && (_t = et(i, !0)));
|
|
1190
|
+
var u = 0, v = _t;
|
|
1191
|
+
do {
|
|
1192
|
+
var D = v, b = C(D), _ = b.top, H = b.bottom, j = b.left, O = b.right, X = b.width, N = b.height, it = void 0, R = void 0, ot = D.scrollWidth, gt = D.scrollHeight, M = f(D), mt = D.scrollLeft, q = D.scrollTop;
|
|
1193
|
+
D === l ? (it = X < ot && (M.overflowX === "auto" || M.overflowX === "scroll" || M.overflowX === "visible"), R = N < gt && (M.overflowY === "auto" || M.overflowY === "scroll" || M.overflowY === "visible")) : (it = X < ot && (M.overflowX === "auto" || M.overflowX === "scroll"), R = N < gt && (M.overflowY === "auto" || M.overflowY === "scroll"));
|
|
1194
|
+
var vt = it && (Math.abs(O - n) <= s && mt + X < ot) - (Math.abs(j - n) <= s && !!mt), V = R && (Math.abs(H - r) <= s && q + N < gt) - (Math.abs(_ - r) <= s && !!q);
|
|
1195
|
+
if (!I[u])
|
|
1196
|
+
for (var nt = 0; nt <= u; nt++)
|
|
1197
|
+
I[nt] || (I[nt] = {});
|
|
1198
|
+
(I[u].vx != vt || I[u].vy != V || I[u].el !== D) && (I[u].el = D, I[u].vx = vt, I[u].vy = V, clearInterval(I[u].pid), (vt != 0 || V != 0) && (c = !0, I[u].pid = setInterval(function() {
|
|
1199
|
+
o && this.layer === 0 && p.active._onTouchMove(Gt);
|
|
1200
|
+
var bt = I[this.layer].vy ? I[this.layer].vy * a : 0, Z = I[this.layer].vx ? I[this.layer].vx * a : 0;
|
|
1201
|
+
typeof h == "function" && h.call(p.dragged.parentNode[L], Z, bt, e, Gt, I[this.layer].el) !== "continue" || Oe(I[this.layer].el, Z, bt);
|
|
1202
|
+
}.bind({
|
|
1203
|
+
layer: u
|
|
1204
|
+
}), 24))), u++;
|
|
1205
|
+
} while (t.bubbleScroll && v !== l && (v = et(v, !1)));
|
|
1206
|
+
se = c;
|
|
1207
|
+
}
|
|
1208
|
+
}, 30), Le = function(t) {
|
|
1209
|
+
var i = t.originalEvent, o = t.putSortable, n = t.dragEl, r = t.activeSortable, s = t.dispatchSortableEvent, a = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
1210
|
+
if (!!i) {
|
|
1211
|
+
var c = o || r;
|
|
1212
|
+
a();
|
|
1213
|
+
var h = i.changedTouches && i.changedTouches.length ? i.changedTouches[0] : i, u = document.elementFromPoint(h.clientX, h.clientY);
|
|
1214
|
+
l(), c && !c.el.contains(u) && (s("spill"), this.onSpill({
|
|
1215
|
+
dragEl: n,
|
|
1216
|
+
putSortable: o
|
|
1217
|
+
}));
|
|
1218
|
+
}
|
|
1219
|
+
};
|
|
1220
|
+
function ce() {
|
|
1221
|
+
}
|
|
1222
|
+
ce.prototype = {
|
|
1223
|
+
startIndex: null,
|
|
1224
|
+
dragStart: function(t) {
|
|
1225
|
+
var i = t.oldDraggableIndex;
|
|
1226
|
+
this.startIndex = i;
|
|
1227
|
+
},
|
|
1228
|
+
onSpill: function(t) {
|
|
1229
|
+
var i = t.dragEl, o = t.putSortable;
|
|
1230
|
+
this.sortable.captureAnimationState(), o && o.captureAnimationState();
|
|
1231
|
+
var n = pt(this.sortable.el, this.startIndex, this.options);
|
|
1232
|
+
n ? this.sortable.el.insertBefore(i, n) : this.sortable.el.appendChild(i), this.sortable.animateAll(), o && o.animateAll();
|
|
1233
|
+
},
|
|
1234
|
+
drop: Le
|
|
1235
|
+
};
|
|
1236
|
+
U(ce, {
|
|
1237
|
+
pluginName: "revertOnSpill"
|
|
1238
|
+
});
|
|
1239
|
+
function de() {
|
|
1240
|
+
}
|
|
1241
|
+
de.prototype = {
|
|
1242
|
+
onSpill: function(t) {
|
|
1243
|
+
var i = t.dragEl, o = t.putSortable, n = o || this.sortable;
|
|
1244
|
+
n.captureAnimationState(), i.parentNode && i.parentNode.removeChild(i), n.animateAll();
|
|
1245
|
+
},
|
|
1246
|
+
drop: Le
|
|
1247
|
+
};
|
|
1248
|
+
U(de, {
|
|
1249
|
+
pluginName: "removeOnSpill"
|
|
1250
|
+
});
|
|
1251
|
+
p.mount(new mi());
|
|
1252
|
+
p.mount(de, ce);
|
|
1253
|
+
const vi = ".sc-swirl-option-list-h{display:block}.sc-swirl-option-list-h *.sc-swirl-option-list{box-sizing:border-box}", bi = class {
|
|
1254
|
+
constructor(e) {
|
|
1255
|
+
$t(this, e), this.itemDrop = ie(this, "itemDrop", 7), this.valueChange = ie(this, "valueChange", 7), this.assistiveTextItemGrabbed = "Item grabbed. Use arrow keys to move item up or down. Use spacebar to save position.", this.assistiveTextItemMoving = "Current position:", this.assistiveTextItemMoved = "Item moved. New position:", this.value = [], this.onFocus = async () => {
|
|
1256
|
+
await new Promise((t) => setTimeout(t)), Boolean(this.focusedItem) ? this.focusItem(this.getActiveItemIndex()) : this.focusItem(0);
|
|
1257
|
+
}, this.onClick = (t) => {
|
|
1258
|
+
t.preventDefault();
|
|
1259
|
+
const i = t.target, o = i == null ? void 0 : i.closest("swirl-option-list-item"), n = t.composedPath()[0], r = Boolean(he(n, '[role="option"]'));
|
|
1260
|
+
if (!Boolean(o) || !r) {
|
|
1261
|
+
t.preventDefault();
|
|
1262
|
+
return;
|
|
1263
|
+
}
|
|
1264
|
+
this.selectItem(this.items.findIndex((s) => s.value === o.value));
|
|
1265
|
+
}, this.onKeyDown = (t) => {
|
|
1266
|
+
if (t.code === "ArrowDown")
|
|
1267
|
+
t.preventDefault(), Boolean(this.dragging) ? this.moveDraggedItemDown() : this.focusNextItem();
|
|
1268
|
+
else if (t.code === "ArrowUp")
|
|
1269
|
+
t.preventDefault(), Boolean(this.dragging) ? this.moveDraggedItemUp() : this.focusPreviousItem();
|
|
1270
|
+
else if (t.code === "Space" || t.code === "Enter") {
|
|
1271
|
+
const i = t.composedPath()[0];
|
|
1272
|
+
if (!Boolean(he(i, '[role="option"]')))
|
|
1273
|
+
return;
|
|
1274
|
+
t.preventDefault(), Boolean(this.dragging) ? this.stopDrag(this.dragging) : this.selectFocusedItem();
|
|
1275
|
+
} else
|
|
1276
|
+
t.code === "Home" ? (t.preventDefault(), this.focusItem(0)) : t.code === "End" ? (t.preventDefault(), this.focusItem(this.items.length - 1)) : t.code === "KeyA" && (t.metaKey || t.ctrlKey) && this.multiSelect ? (t.preventDefault(), this.selectAllItems()) : t.code === "Tab" && Boolean(this.dragging) && t.preventDefault();
|
|
1277
|
+
}, this.toggleDrag = (t) => {
|
|
1278
|
+
const i = t.detail;
|
|
1279
|
+
Boolean(this.dragging) ? this.stopDrag(i) : this.startDrag(i);
|
|
1280
|
+
}, this.startDrag = (t) => {
|
|
1281
|
+
this.dragging = t, this.draggingStartIndex = this.getItemIndex(this.dragging), t.setAttribute("dragging", "true");
|
|
1282
|
+
const i = this.getItemIndex(this.dragging);
|
|
1283
|
+
this.focusItem(i), this.assistiveText = this.assistiveTextItemGrabbed;
|
|
1284
|
+
}, this.stopDrag = (t) => {
|
|
1285
|
+
this.dragging = void 0, t.removeAttribute("dragging");
|
|
1286
|
+
const i = this.getActiveItemIndex();
|
|
1287
|
+
this.assistiveText = `${this.assistiveTextItemMoved} ${i + 1}`, this.itemDrop.emit({ oldIndex: this.draggingStartIndex, newIndex: i }), this.draggingStartIndex = void 0;
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
componentDidLoad() {
|
|
1291
|
+
this.updateItems(), this.observeSlotChanges(), this.setItemAllowDragState(), this.setItemDisabledState(), this.setItemContext(), this.syncItemsWithValue(), this.setupDragDrop();
|
|
1292
|
+
}
|
|
1293
|
+
disconnectedCallback() {
|
|
1294
|
+
var e, t;
|
|
1295
|
+
(e = this.observer) === null || e === void 0 || e.disconnect(), (t = this.sortable) === null || t === void 0 || t.destroy();
|
|
1296
|
+
}
|
|
1297
|
+
watchAllowDrag() {
|
|
1298
|
+
this.setItemAllowDragState(), this.setupDragDrop();
|
|
1299
|
+
}
|
|
1300
|
+
watchDisabled() {
|
|
1301
|
+
this.setItemDisabledState();
|
|
1302
|
+
}
|
|
1303
|
+
watchMultiSelect() {
|
|
1304
|
+
this.setItemContext();
|
|
1305
|
+
}
|
|
1306
|
+
watchValue() {
|
|
1307
|
+
this.syncItemsWithValue();
|
|
1308
|
+
}
|
|
1309
|
+
observeSlotChanges() {
|
|
1310
|
+
this.observer = new MutationObserver(() => {
|
|
1311
|
+
this.updateItems();
|
|
1312
|
+
}), this.observer.observe(this.listboxEl, { childList: !0 });
|
|
1313
|
+
}
|
|
1314
|
+
updateItems() {
|
|
1315
|
+
this.items = fe(this.el, "swirl-option-list-item");
|
|
1316
|
+
}
|
|
1317
|
+
setItemDisabledState() {
|
|
1318
|
+
this.items.forEach((e) => e.disabled = this.disabled);
|
|
1319
|
+
}
|
|
1320
|
+
setItemContext() {
|
|
1321
|
+
this.multiSelect ? this.items.forEach((e) => e.context = "multi-select") : (this.items.forEach((e) => e.context = "single-select"), this.value.length > 1 && this.updateValue([this.value[0]]));
|
|
1322
|
+
}
|
|
1323
|
+
setupDragDrop() {
|
|
1324
|
+
Boolean(this.sortable) && this.sortable.destroy(), this.allowDrag && (this.sortable = p.create(this.listboxEl, {
|
|
1325
|
+
animation: 150,
|
|
1326
|
+
draggable: "swirl-option-list-item",
|
|
1327
|
+
handle: ".option-list-item__drag-handle",
|
|
1328
|
+
onEnd: (e) => {
|
|
1329
|
+
this.itemDrop.emit({
|
|
1330
|
+
oldIndex: e.oldIndex,
|
|
1331
|
+
newIndex: e.newIndex
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1334
|
+
}));
|
|
1335
|
+
}
|
|
1336
|
+
setItemAllowDragState() {
|
|
1337
|
+
if (this.allowDrag && !this.multiSelect) {
|
|
1338
|
+
console.error("[SwirlOptionList] Drag can only be allowed for multi select lists.");
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
const e = fe(this.el, "swirl-option-list-section");
|
|
1342
|
+
if (this.allowDrag && e.length > 0) {
|
|
1343
|
+
console.error("[SwirlOptionList] Drag can only be allowed for lists without sections.");
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1346
|
+
this.allowDrag ? this.items.forEach((t) => {
|
|
1347
|
+
t.setAttribute("allow-drag", "true"), t.addEventListener("toggleDrag", this.toggleDrag);
|
|
1348
|
+
}) : this.items.forEach((t) => {
|
|
1349
|
+
t.removeAttribute("allow-drag"), t.removeEventListener("toggleDrag", this.toggleDrag);
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
selectItem(e) {
|
|
1353
|
+
if (this.disabled)
|
|
1354
|
+
return;
|
|
1355
|
+
const t = this.items[e];
|
|
1356
|
+
if (t.disabled)
|
|
1357
|
+
return;
|
|
1358
|
+
const i = this.value.includes(t.value);
|
|
1359
|
+
this.multiSelect || (this.value = []), i ? this.updateValue(this.value.filter((o) => o !== t.value)) : this.updateValue([...this.value, t.value]);
|
|
1360
|
+
}
|
|
1361
|
+
updateValue(e) {
|
|
1362
|
+
this.value = e, this.valueChange.emit(this.value);
|
|
1363
|
+
}
|
|
1364
|
+
selectFocusedItem() {
|
|
1365
|
+
this.disabled || this.getActiveItemIndex() === -1 || this.selectItem(this.getActiveItemIndex());
|
|
1366
|
+
}
|
|
1367
|
+
selectAllItems() {
|
|
1368
|
+
if (this.disabled)
|
|
1369
|
+
return;
|
|
1370
|
+
this.items.every((t) => this.value.includes(t.value)) ? this.updateValue([]) : this.updateValue(this.items.map((t) => t.value));
|
|
1371
|
+
}
|
|
1372
|
+
syncItemsWithValue() {
|
|
1373
|
+
this.items.forEach((e) => e.selected = this.value.includes(e.value));
|
|
1374
|
+
}
|
|
1375
|
+
focusItem(e) {
|
|
1376
|
+
var t;
|
|
1377
|
+
if (this.disabled)
|
|
1378
|
+
return;
|
|
1379
|
+
this.items.forEach((o) => o.querySelector('[role="option"]').removeAttribute("tabIndex"));
|
|
1380
|
+
const i = (t = this.items[e]) === null || t === void 0 ? void 0 : t.querySelector('[role="option"]');
|
|
1381
|
+
!Boolean(i) || (i.setAttribute("tabIndex", "0"), i.focus(), this.focusedItem = i);
|
|
1382
|
+
}
|
|
1383
|
+
focusNextItem() {
|
|
1384
|
+
if (this.disabled)
|
|
1385
|
+
return;
|
|
1386
|
+
const e = this.getActiveItemIndex(), t = Math.min(e + 1, this.items.length - 1);
|
|
1387
|
+
this.focusItem(t);
|
|
1388
|
+
}
|
|
1389
|
+
focusPreviousItem() {
|
|
1390
|
+
const e = this.getActiveItemIndex(), t = Math.max(e - 1, 0);
|
|
1391
|
+
this.focusItem(t);
|
|
1392
|
+
}
|
|
1393
|
+
getActiveItemIndex() {
|
|
1394
|
+
return this.items.map((e) => e.querySelector('[role="option"]')).findIndex((e) => e === this.focusedItem);
|
|
1395
|
+
}
|
|
1396
|
+
getItemIndex(e) {
|
|
1397
|
+
return this.items.map((t) => t).findIndex((t) => t === e);
|
|
1398
|
+
}
|
|
1399
|
+
moveDraggedItemDown() {
|
|
1400
|
+
const e = this.dragging.nextElementSibling;
|
|
1401
|
+
!Boolean(e) || (e.after(this.dragging), this.updateItems(), this.listboxEl.focus(), this.assistiveText = `${this.assistiveTextItemMoving} ${this.getActiveItemIndex() + 1}`);
|
|
1402
|
+
}
|
|
1403
|
+
moveDraggedItemUp() {
|
|
1404
|
+
const e = this.dragging.previousElementSibling;
|
|
1405
|
+
!Boolean(e) || (e.before(this.dragging), this.updateItems(), this.listboxEl.focus(), this.assistiveText = `${this.assistiveTextItemMoving} ${this.getItemIndex(this.dragging) + 1}`);
|
|
1406
|
+
}
|
|
1407
|
+
render() {
|
|
1408
|
+
const e = this.multiSelect ? "true" : void 0, t = this.disabled ? -1 : 0;
|
|
1409
|
+
return g(xe, null, g("swirl-visually-hidden", { role: "alert" }, this.assistiveText), g("div", { "aria-label": this.label, "aria-multiselectable": e, class: "option-list", id: this.optionListId, onClick: this.onClick, onFocus: this.onFocus, onKeyDown: this.onKeyDown, ref: (i) => this.listboxEl = i, role: "listbox", tabIndex: t }, g("slot", null)));
|
|
1410
|
+
}
|
|
1411
|
+
get el() {
|
|
1412
|
+
return Ee(this);
|
|
1413
|
+
}
|
|
1414
|
+
static get watchers() {
|
|
1415
|
+
return {
|
|
1416
|
+
allowDrag: ["watchAllowDrag"],
|
|
1417
|
+
disabled: ["watchDisabled"],
|
|
1418
|
+
multiSelect: ["watchMultiSelect"],
|
|
1419
|
+
value: ["watchValue"]
|
|
1420
|
+
};
|
|
1421
|
+
}
|
|
1422
|
+
};
|
|
1423
|
+
bi.style = vi;
|
|
1424
|
+
const wi = `.sc-swirl-option-list-item-h{position:relative;display:inline-flex;width:100%}.sc-swirl-option-list-item-h *.sc-swirl-option-list-item{box-sizing:border-box}.option-list-item.sc-swirl-option-list-item{display:inline-flex;width:100%;min-height:3rem;padding:var(--s-space-12) var(--s-space-16);align-items:center;background-color:var(--s-surface-overlay-default);cursor:pointer;gap:var(--s-space-12)}.option-list-item.sc-swirl-option-list-item:hover:not(.option-list-item--disabled){background-color:var(--s-surface-overlay-hovered)}.option-list-item.sc-swirl-option-list-item:active:not(.option-list-item--disabled){background-color:var(--s-surface-overlay-pressed)}.option-list-item.sc-swirl-option-list-item:focus{outline:none}.option-list-item.sc-swirl-option-list-item:focus-visible{background-color:var(--s-surface-overlay-hovered)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item.sc-swirl-option-list-item{min-height:0;padding:var(--s-space-12);gap:var(--s-space-8)}}.option-list-item--draggable.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item{padding-right:calc(var(--s-space-16) + 1.5rem)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item--draggable.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item{padding-right:calc(var(--s-space-16) + 1rem)}}.option-list-item--dragging.sc-swirl-option-list-item{z-index:1;border-radius:var(--s-border-radius-s);background-color:var(--s-surface-overlay-pressed);box-shadow:0 0.0625rem 0.125rem rgba(25, 26, 28, 0.08),
|
|
1425
|
+
0 0.25rem 2rem rgba(25, 26, 28, 0.16)}.option-list-item--dragging.sc-swirl-option-list-item:hover:not(.option-list-item--disabled){background-color:var(--s-surface-overlay-pressed)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item{color:var(--s-text-highlight)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__icon.sc-swirl-option-list-item{color:var(--s-icon-highlight)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-highlight);color:var(--s-text-on-status);background-color:var(--s-icon-highlight)}.option-list-item--disabled.sc-swirl-option-list-item{cursor:default}.option-list-item--disabled.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{background-color:var(--s-icon-disabled)}.option-list-item--disabled.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-icon.sc-swirl-option-list-item{color:var(--s-text-on-status)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item{color:var(--s-text-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__icon.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__selection-icon.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__checkbox-icon.sc-swirl-option-list-item{color:var(--s-icon-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-disabled);background-color:var(--s-surface-overlay-default)}.option-list-item__label.sc-swirl-option-list-item{flex-grow:1;color:var(--s-text-default);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__label.sc-swirl-option-list-item{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.option-list-item__icon.sc-swirl-option-list-item{display:inline-flex;flex-shrink:0;color:var(--s-icon-default)}.option-list-item__selection-icon.sc-swirl-option-list-item{display:inline-flex;flex-shrink:0;color:var(--s-icon-highlight)}.option-list-item__checkbox.sc-swirl-option-list-item{display:inline-flex;width:1.5rem;height:1.5rem;padding:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__checkbox.sc-swirl-option-list-item{width:1.375rem;height:1.375rem}}.option-list-item__checkbox-box.sc-swirl-option-list-item{display:inline-flex;width:100%;height:100%;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:var(--s-border-radius-s)}.option-list-item__checkbox-icon.sc-swirl-option-list-item{display:inline-flex}.option-list-item__drag-handle.sc-swirl-option-list-item{position:absolute;z-index:1;top:50%;right:var(--s-space-4);display:inline-flex;margin:0;padding:0;padding:var(--s-space-8);flex-shrink:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:-webkit-grab;cursor:grab;transform:translateY(-50%)}.option-list-item__drag-handle.sc-swirl-option-list-item:active{cursor:-webkit-grabbing;cursor:grabbing}.option-list-item__drag-handle.sc-swirl-option-list-item:focus:not(:focus-visible){outline:none}.option-list-item__drag-handle.sc-swirl-option-list-item:focus-visible{outline-color:var(--s-focus-default)}`, yi = class {
|
|
1426
|
+
constructor(e) {
|
|
1427
|
+
$t(this, e), this.toggleDrag = ie(this, "toggleDrag", 7), this.context = "single-select", this.dragHandleDescription = "Press spacebar to toggle grab", this.dragHandleLabel = "Move option", this.selected = !1, this.iconSize = 24, this.desktopMediaQuery = Xe(), this.desktopMediaQueryHandler = (t) => {
|
|
1428
|
+
this.forceIconProps(t.matches), this.updateIconSize(t.matches);
|
|
1429
|
+
}, this.onDragHandleKeyDown = (t) => {
|
|
1430
|
+
(t.code === "Space" || t.code === "Enter") && (t.preventDefault(), this.toggleDrag.emit(this.el));
|
|
1431
|
+
};
|
|
1432
|
+
}
|
|
1433
|
+
componentDidLoad() {
|
|
1434
|
+
var e, t;
|
|
1435
|
+
this.forceIconProps(this.desktopMediaQuery.matches), this.updateIconSize(this.desktopMediaQuery.matches), (t = (e = this.desktopMediaQuery).addEventListener) === null || t === void 0 || t.call(e, "change", this.desktopMediaQueryHandler);
|
|
1436
|
+
}
|
|
1437
|
+
disconnectedCallback() {
|
|
1438
|
+
var e, t;
|
|
1439
|
+
(t = (e = this.desktopMediaQuery).removeEventListener) === null || t === void 0 || t.call(e, "change", this.desktopMediaQueryHandler);
|
|
1440
|
+
}
|
|
1441
|
+
forceIconProps(e) {
|
|
1442
|
+
var t;
|
|
1443
|
+
const i = (t = this.iconEl) === null || t === void 0 ? void 0 : t.children[0];
|
|
1444
|
+
i == null || i.setAttribute("size", e ? "20" : "24");
|
|
1445
|
+
}
|
|
1446
|
+
updateIconSize(e) {
|
|
1447
|
+
this.iconSize = e ? 20 : 24;
|
|
1448
|
+
}
|
|
1449
|
+
render() {
|
|
1450
|
+
const e = this.disabled ? "true" : void 0, t = String(this.selected), i = this.context === "multi-select", o = Boolean(this.icon) && this.context === "single-select", n = this.selected && this.context === "single-select", r = ae("option-list-item", `option-list-item--context-${this.context}`, {
|
|
1451
|
+
"option-list-item--disabled": this.disabled,
|
|
1452
|
+
"option-list-item--draggable": this.allowDrag,
|
|
1453
|
+
"option-list-item--dragging": this.dragging,
|
|
1454
|
+
"option-list-item--selected": this.selected
|
|
1455
|
+
});
|
|
1456
|
+
return g(xe, null, g("div", { "aria-disabled": e, "aria-selected": t, class: r, part: "option-list-item", role: "option" }, o && g("span", { class: "option-list-item__icon", innerHTML: this.icon, ref: (s) => this.iconEl = s }), i && g("span", { class: "option-list-item__checkbox" }, g("span", { class: "option-list-item__checkbox-box" }, this.selected && g("swirl-icon-check-strong", { class: "option-list-item__checkbox-icon", size: 16 }))), g("span", { class: "option-list-item__label", part: "option-list-item__label" }, this.label), n && g("span", { class: "option-list-item__selection-icon" }, g("swirl-icon-check-small", { size: this.iconSize }))), this.allowDrag && g("button", { "aria-describedby": this.dragHandleDescription, "aria-label": `${this.dragHandleLabel} "${this.label}"`, class: "option-list-item__drag-handle", onKeyDown: this.onDragHandleKeyDown, type: "button" }, g("swirl-icon-drag-handle", { size: this.iconSize })));
|
|
1457
|
+
}
|
|
1458
|
+
get el() {
|
|
1459
|
+
return Ee(this);
|
|
1460
|
+
}
|
|
1461
|
+
};
|
|
1462
|
+
yi.style = wi;
|
|
1463
|
+
export {
|
|
1464
|
+
Re as swirl_icon_check_small,
|
|
1465
|
+
Ge as swirl_icon_drag_handle,
|
|
1466
|
+
bi as swirl_option_list,
|
|
1467
|
+
yi as swirl_option_list_item
|
|
1468
|
+
};
|