@das-fed/upf-ui 6.4.0-dev.124 → 6.4.0-dev.126
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/package.json +5 -5
- package/packages/components/select-list/index.js +562 -546
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/select-list/src/Index.vue.d.ts +3 -1
- package/packages/components/select-list/src/hooks/use-select-list.d.ts +2 -0
- package/packages/components/select-list/src/type.d.ts +2 -0
- package/packages/components/select-list/style.css +1 -1
- package/packages/components/select-list/style.css.gz +0 -0
|
@@ -5,11 +5,11 @@ import { getVar as ut, setThemeRule as _i } from "@das-fed/upf-web/packages/them
|
|
|
5
5
|
import { ElInfiniteScroll as Ei } from "element-plus/es";
|
|
6
6
|
import "element-plus/es/components/base/style/css";
|
|
7
7
|
import "element-plus/es/components/infinite-scroll/style/css";
|
|
8
|
-
import { pushScopeId as Di, popScopeId as Ii, nextTick as et, withScopeId as Ti, createBlock as
|
|
9
|
-
import { vDasTooltip as
|
|
8
|
+
import { pushScopeId as Di, popScopeId as Ii, nextTick as et, withScopeId as Ti, createBlock as le, openBlock as k, markRaw as Ci, shallowReactive as Oi, resolveComponent as Ai, resolveDirective as zi, withDirectives as Se, createElementBlock as W, normalizeClass as oe, createCommentVNode as G, createVNode as ki, renderSlot as he, resolveDynamicComponent as Rt, normalizeStyle as Jt, withCtx as tt, Fragment as _t, renderList as Et, mergeProps as Pi, toHandlers as Ni, ref as Pe, computed as Ne, onMounted as Zt, onBeforeUnmount as $i, watch as Ft, defineComponent as Mi, useCssVars as xi, createElementVNode as Ce, toDisplayString as Oe, unref as w, createTextVNode as Le } from "vue";
|
|
9
|
+
import { vDasTooltip as dt } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
|
|
10
10
|
import { DasButton as Vi } from "@das-fed/upf-ui/packages/components/button/index";
|
|
11
11
|
import { vOverlay as Ri } from "@das-fed/upf-ui/packages/components/overlay/index";
|
|
12
|
-
import { DasIconClose2 as
|
|
12
|
+
import { DasIconClose2 as ct } from "@das-fed/upf-ui/packages/icons/close-2/index";
|
|
13
13
|
import { DasIconDrag as Fi } from "@das-fed/upf-ui/packages/icons/drag/index";
|
|
14
14
|
import { useModelValue as Qt } from "@das-fed/upf-utils/vue";
|
|
15
15
|
import { SizeWatcher as Hi } from "@das-fed/upf-utils/size-watcher";
|
|
@@ -85,7 +85,7 @@ const Yi = {
|
|
|
85
85
|
tabindex: "-1"
|
|
86
86
|
};
|
|
87
87
|
Ii();
|
|
88
|
-
const Xi = /* @__PURE__ */ Bi((t, e, i, n, r, o) => (k(),
|
|
88
|
+
const Xi = /* @__PURE__ */ Bi((t, e, i, n, r, o) => (k(), le("div", Yi)));
|
|
89
89
|
at.render = Xi;
|
|
90
90
|
at.__scopeId = "data-v-b329ee4c";
|
|
91
91
|
at.__file = "src/components/ResizeObserver.vue";
|
|
@@ -143,13 +143,13 @@ function Zi(t) {
|
|
|
143
143
|
} : e = t, e;
|
|
144
144
|
}
|
|
145
145
|
function Qi(t, e) {
|
|
146
|
-
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n, r, o, l = function(
|
|
147
|
-
for (var u = arguments.length, c = new Array(u > 1 ? u - 1 : 0),
|
|
148
|
-
c[
|
|
149
|
-
if (o = c, !(n &&
|
|
150
|
-
var
|
|
151
|
-
typeof
|
|
152
|
-
t.apply(void 0, [
|
|
146
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n, r, o, l = function(s) {
|
|
147
|
+
for (var u = arguments.length, c = new Array(u > 1 ? u - 1 : 0), f = 1; f < u; f++)
|
|
148
|
+
c[f - 1] = arguments[f];
|
|
149
|
+
if (o = c, !(n && s === r)) {
|
|
150
|
+
var m = i.leading;
|
|
151
|
+
typeof m == "function" && (m = m(s, r)), (!n || s !== r) && m && t.apply(void 0, [s].concat(Ht(o))), r = s, clearTimeout(n), n = setTimeout(function() {
|
|
152
|
+
t.apply(void 0, [s].concat(Ht(o))), n = 0;
|
|
153
153
|
}, e);
|
|
154
154
|
}
|
|
155
155
|
};
|
|
@@ -176,28 +176,28 @@ var en = /* @__PURE__ */ function() {
|
|
|
176
176
|
value: function(i, n) {
|
|
177
177
|
var r = this;
|
|
178
178
|
if (this.observer && this.destroyObserver(), !this.frozen) {
|
|
179
|
-
if (this.options = Zi(i), this.callback = function(
|
|
180
|
-
r.options.callback(
|
|
179
|
+
if (this.options = Zi(i), this.callback = function(a, s) {
|
|
180
|
+
r.options.callback(a, s), a && r.options.once && (r.frozen = !0, r.destroyObserver());
|
|
181
181
|
}, this.callback && this.options.throttle) {
|
|
182
182
|
var o = this.options.throttleOptions || {}, l = o.leading;
|
|
183
183
|
this.callback = Qi(this.callback, this.options.throttle, {
|
|
184
|
-
leading: function(
|
|
185
|
-
return l === "both" || l === "visible" &&
|
|
184
|
+
leading: function(s) {
|
|
185
|
+
return l === "both" || l === "visible" && s || l === "hidden" && !s;
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
this.oldResult = void 0, this.observer = new IntersectionObserver(function(
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
192
|
-
var u =
|
|
193
|
-
return
|
|
189
|
+
this.oldResult = void 0, this.observer = new IntersectionObserver(function(a) {
|
|
190
|
+
var s = a[0];
|
|
191
|
+
if (a.length > 1) {
|
|
192
|
+
var u = a.find(function(f) {
|
|
193
|
+
return f.isIntersecting;
|
|
194
194
|
});
|
|
195
|
-
u && (
|
|
195
|
+
u && (s = u);
|
|
196
196
|
}
|
|
197
197
|
if (r.callback) {
|
|
198
|
-
var c =
|
|
198
|
+
var c = s.isIntersecting && s.intersectionRatio >= r.threshold;
|
|
199
199
|
if (c === r.oldResult) return;
|
|
200
|
-
r.oldResult = c, r.callback(c,
|
|
200
|
+
r.oldResult = c, r.callback(c, s);
|
|
201
201
|
}
|
|
202
202
|
}, this.options.intersection), et(function() {
|
|
203
203
|
r.observer && r.observer.observe(r.el);
|
|
@@ -305,16 +305,16 @@ var Ct = !1;
|
|
|
305
305
|
if (typeof window < "u") {
|
|
306
306
|
Ct = !1;
|
|
307
307
|
try {
|
|
308
|
-
var
|
|
308
|
+
var dn = Object.defineProperty({}, "passive", {
|
|
309
309
|
get: function() {
|
|
310
310
|
Ct = !0;
|
|
311
311
|
}
|
|
312
312
|
});
|
|
313
|
-
window.addEventListener("test", null,
|
|
313
|
+
window.addEventListener("test", null, dn);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
let
|
|
317
|
+
let cn = 0;
|
|
318
318
|
var Pt = {
|
|
319
319
|
name: "RecycleScroller",
|
|
320
320
|
components: {
|
|
@@ -413,8 +413,8 @@ var Pt = {
|
|
|
413
413
|
"-1": { accumulator: 0 }
|
|
414
414
|
}, e = this.items, i = this.sizeField, n = this.minItemSize;
|
|
415
415
|
let r = 1e4, o = 0, l;
|
|
416
|
-
for (let
|
|
417
|
-
l = e[
|
|
416
|
+
for (let a = 0, s = e.length; a < s; a++)
|
|
417
|
+
l = e[a][i] || n, l < r && (r = l), o += l, t[a] = { accumulator: o, size: l };
|
|
418
418
|
return this.$_computedMinItemSize = r, t;
|
|
419
419
|
}
|
|
420
420
|
return [];
|
|
@@ -467,7 +467,7 @@ var Pt = {
|
|
|
467
467
|
methods: {
|
|
468
468
|
addView(t, e, i, n, r) {
|
|
469
469
|
const o = Ci({
|
|
470
|
-
id:
|
|
470
|
+
id: cn++,
|
|
471
471
|
index: e,
|
|
472
472
|
used: !0,
|
|
473
473
|
key: n,
|
|
@@ -506,72 +506,72 @@ var Pt = {
|
|
|
506
506
|
})) : this.$emit("hidden"));
|
|
507
507
|
},
|
|
508
508
|
updateVisibleItems(t, e = !1) {
|
|
509
|
-
const i = this.itemSize, n = this.gridItems || 1, r = this.itemSecondarySize || i, o = this.$_computedMinItemSize, l = this.typeField,
|
|
510
|
-
let
|
|
509
|
+
const i = this.itemSize, n = this.gridItems || 1, r = this.itemSecondarySize || i, o = this.$_computedMinItemSize, l = this.typeField, a = this.simpleArray ? null : this.keyField, s = this.items, u = s.length, c = this.sizes, f = this.$_views, m = this.$_unusedViews, E = this.pool, _ = this.itemIndexByKey;
|
|
510
|
+
let g, D, V, O, p;
|
|
511
511
|
if (!u)
|
|
512
|
-
|
|
512
|
+
g = D = O = p = V = 0;
|
|
513
513
|
else if (this.$_prerender)
|
|
514
|
-
|
|
514
|
+
g = O = 0, D = p = Math.min(this.prerender, s.length), V = null;
|
|
515
515
|
else {
|
|
516
|
-
const
|
|
516
|
+
const I = this.getScroll();
|
|
517
517
|
if (e) {
|
|
518
|
-
let z =
|
|
518
|
+
let z = I.start - this.$_lastUpdateScrollPosition;
|
|
519
519
|
if (z < 0 && (z = -z), i === null && z < o || z < i)
|
|
520
520
|
return {
|
|
521
521
|
continuous: !0
|
|
522
522
|
};
|
|
523
523
|
}
|
|
524
|
-
this.$_lastUpdateScrollPosition =
|
|
525
|
-
const
|
|
526
|
-
|
|
524
|
+
this.$_lastUpdateScrollPosition = I.start;
|
|
525
|
+
const R = this.buffer;
|
|
526
|
+
I.start -= R, I.end += R;
|
|
527
527
|
let N = 0;
|
|
528
|
-
if (this.$refs.before && (N = this.$refs.before.scrollHeight,
|
|
528
|
+
if (this.$refs.before && (N = this.$refs.before.scrollHeight, I.start -= N), this.$refs.after) {
|
|
529
529
|
const z = this.$refs.after.scrollHeight;
|
|
530
|
-
|
|
530
|
+
I.end += z;
|
|
531
531
|
}
|
|
532
532
|
if (i === null) {
|
|
533
|
-
let z, J = 0,
|
|
533
|
+
let z, J = 0, de = u - 1, F = ~~(u / 2), me;
|
|
534
534
|
do
|
|
535
|
-
me =
|
|
536
|
-
while (
|
|
537
|
-
for (
|
|
538
|
-
for (
|
|
539
|
-
for (
|
|
535
|
+
me = F, z = c[F].accumulator, z < I.start ? J = F : F < u - 1 && c[F + 1].accumulator > I.start && (de = F), F = ~~((J + de) / 2);
|
|
536
|
+
while (F !== me);
|
|
537
|
+
for (F < 0 && (F = 0), g = F, V = c[u - 1].accumulator, D = F; D < u && c[D].accumulator < I.end; D++) ;
|
|
538
|
+
for (D === -1 ? D = s.length - 1 : (D++, D > u && (D = u)), O = g; O < u && N + c[O].accumulator < I.start; O++) ;
|
|
539
|
+
for (p = O; p < u && N + c[p].accumulator < I.end; p++) ;
|
|
540
540
|
} else {
|
|
541
|
-
|
|
542
|
-
const z =
|
|
543
|
-
|
|
541
|
+
g = ~~(I.start / i * n);
|
|
542
|
+
const z = g % n;
|
|
543
|
+
g -= z, D = Math.ceil(I.end / i * n), O = Math.max(0, Math.floor((I.start - N) / i * n)), p = Math.floor((I.end - N) / i * n), g < 0 && (g = 0), D > u && (D = u), O < 0 && (O = 0), p > u && (p = u), V = Math.ceil(u / n) * i;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
|
|
547
|
-
let
|
|
548
|
-
const
|
|
549
|
-
if (
|
|
550
|
-
for (let
|
|
551
|
-
|
|
552
|
-
const
|
|
553
|
-
let
|
|
554
|
-
for (let
|
|
555
|
-
|
|
556
|
-
const
|
|
557
|
-
if (
|
|
558
|
-
throw new Error(`Key is ${
|
|
559
|
-
if (
|
|
560
|
-
|
|
546
|
+
D - g > rn.itemsLimit && this.itemsLimitError(), this.totalSize = V;
|
|
547
|
+
let d;
|
|
548
|
+
const A = g <= this.$_endIndex && D >= this.$_startIndex;
|
|
549
|
+
if (A)
|
|
550
|
+
for (let I = 0, R = E.length; I < R; I++)
|
|
551
|
+
d = E[I], d.nr.used && (t && (d.nr.index = _[d.item[a]]), (d.nr.index == null || d.nr.index < g || d.nr.index >= D) && this.unuseView(d));
|
|
552
|
+
const Y = A ? null : /* @__PURE__ */ new Map();
|
|
553
|
+
let v, B, M;
|
|
554
|
+
for (let I = g; I < D; I++) {
|
|
555
|
+
v = s[I];
|
|
556
|
+
const R = a ? v[a] : v;
|
|
557
|
+
if (R == null)
|
|
558
|
+
throw new Error(`Key is ${R} on item (keyField is '${a}')`);
|
|
559
|
+
if (d = f.get(R), !i && !c[I].size) {
|
|
560
|
+
d && this.unuseView(d);
|
|
561
561
|
continue;
|
|
562
562
|
}
|
|
563
|
-
|
|
564
|
-
let N =
|
|
565
|
-
if (!
|
|
566
|
-
|
|
567
|
-
else if (!
|
|
568
|
-
const J = N.indexOf(
|
|
563
|
+
B = v[l];
|
|
564
|
+
let N = m.get(B), z = !1;
|
|
565
|
+
if (!d)
|
|
566
|
+
A ? N && N.length ? d = N.pop() : d = this.addView(E, I, v, R, B) : (M = Y.get(B) || 0, (!N || M >= N.length) && (d = this.addView(E, I, v, R, B), this.unuseView(d, !0), N = m.get(B)), d = N[M], Y.set(B, M + 1)), f.delete(d.nr.key), d.nr.used = !0, d.nr.index = I, d.nr.key = R, d.nr.type = B, f.set(R, d), z = !0;
|
|
567
|
+
else if (!d.nr.used && (d.nr.used = !0, z = !0, N)) {
|
|
568
|
+
const J = N.indexOf(d);
|
|
569
569
|
J !== -1 && N.splice(J, 1);
|
|
570
570
|
}
|
|
571
|
-
|
|
571
|
+
d.item = v, z && (I === s.length - 1 && this.$emit("scroll-end"), I === 0 && this.$emit("scroll-start")), i === null ? (d.position = c[I - 1].accumulator, d.offset = 0) : (d.position = Math.floor(I / n) * i, d.offset = I % n * r);
|
|
572
572
|
}
|
|
573
|
-
return this.$_startIndex =
|
|
574
|
-
continuous:
|
|
573
|
+
return this.$_startIndex = g, this.$_endIndex = D, this.emitUpdate && this.$emit("update", g, D, O, p), clearTimeout(this.$_sortTimer), this.$_sortTimer = setTimeout(this.sortViews, this.updateInterval + 300), {
|
|
574
|
+
continuous: A
|
|
575
575
|
};
|
|
576
576
|
},
|
|
577
577
|
getListenerTarget() {
|
|
@@ -583,10 +583,10 @@ var Pt = {
|
|
|
583
583
|
let n;
|
|
584
584
|
if (this.pageMode) {
|
|
585
585
|
const r = t.getBoundingClientRect(), o = i ? r.height : r.width;
|
|
586
|
-
let l = -(i ? r.top : r.left),
|
|
587
|
-
l < 0 && (
|
|
586
|
+
let l = -(i ? r.top : r.left), a = i ? window.innerHeight : window.innerWidth;
|
|
587
|
+
l < 0 && (a += l, l = 0), l + a > o && (a = o - l), n = {
|
|
588
588
|
start: l,
|
|
589
|
-
end: l +
|
|
589
|
+
end: l + a
|
|
590
590
|
};
|
|
591
591
|
} else i ? n = {
|
|
592
592
|
start: t.scrollTop,
|
|
@@ -617,7 +617,7 @@ var Pt = {
|
|
|
617
617
|
const e = this.direction === "vertical" ? { scroll: "scrollTop", start: "top" } : { scroll: "scrollLeft", start: "left" };
|
|
618
618
|
let i, n, r;
|
|
619
619
|
if (this.pageMode) {
|
|
620
|
-
const o = Lt(this.$el), l = o.tagName === "HTML" ? 0 : o[e.scroll],
|
|
620
|
+
const o = Lt(this.$el), l = o.tagName === "HTML" ? 0 : o[e.scroll], a = o.getBoundingClientRect(), u = this.$el.getBoundingClientRect()[e.start] - a[e.start];
|
|
621
621
|
i = o, n = e.scroll, r = t + l + u;
|
|
622
622
|
} else
|
|
623
623
|
i = this.$el, n = e.scroll, r = t;
|
|
@@ -642,19 +642,19 @@ const fn = {
|
|
|
642
642
|
class: "vue-recycle-scroller__slot"
|
|
643
643
|
};
|
|
644
644
|
function pn(t, e, i, n, r, o) {
|
|
645
|
-
const l = Ai("ResizeObserver"),
|
|
646
|
-
return Se((k(),
|
|
645
|
+
const l = Ai("ResizeObserver"), a = zi("observe-visibility");
|
|
646
|
+
return Se((k(), W(
|
|
647
647
|
"div",
|
|
648
648
|
{
|
|
649
|
-
class:
|
|
649
|
+
class: oe(["vue-recycle-scroller", {
|
|
650
650
|
ready: r.ready,
|
|
651
651
|
"page-mode": i.pageMode,
|
|
652
652
|
[`direction-${t.direction}`]: !0
|
|
653
653
|
}]),
|
|
654
|
-
onScrollPassive: e[0] || (e[0] = (...
|
|
654
|
+
onScrollPassive: e[0] || (e[0] = (...s) => o.handleScroll && o.handleScroll(...s))
|
|
655
655
|
},
|
|
656
656
|
[
|
|
657
|
-
t.$slots.before ? (k(),
|
|
657
|
+
t.$slots.before ? (k(), W(
|
|
658
658
|
"div",
|
|
659
659
|
fn,
|
|
660
660
|
[
|
|
@@ -662,32 +662,32 @@ function pn(t, e, i, n, r, o) {
|
|
|
662
662
|
],
|
|
663
663
|
512
|
|
664
664
|
/* NEED_PATCH */
|
|
665
|
-
)) :
|
|
666
|
-
(k(),
|
|
665
|
+
)) : G("v-if", !0),
|
|
666
|
+
(k(), le(Rt(i.listTag), {
|
|
667
667
|
ref: "wrapper",
|
|
668
668
|
style: Jt({ [t.direction === "vertical" ? "minHeight" : "minWidth"]: r.totalSize + "px" }),
|
|
669
|
-
class:
|
|
669
|
+
class: oe(["vue-recycle-scroller__item-wrapper", i.listClass])
|
|
670
670
|
}, {
|
|
671
671
|
default: tt(() => [
|
|
672
|
-
(k(!0),
|
|
672
|
+
(k(!0), W(
|
|
673
673
|
_t,
|
|
674
674
|
null,
|
|
675
|
-
Et(r.pool, (
|
|
676
|
-
key:
|
|
675
|
+
Et(r.pool, (s) => (k(), le(Rt(i.itemTag), Pi({
|
|
676
|
+
key: s.nr.id,
|
|
677
677
|
style: r.ready ? {
|
|
678
|
-
transform: `translate${t.direction === "vertical" ? "Y" : "X"}(${
|
|
678
|
+
transform: `translate${t.direction === "vertical" ? "Y" : "X"}(${s.position}px) translate${t.direction === "vertical" ? "X" : "Y"}(${s.offset}px)`,
|
|
679
679
|
width: i.gridItems ? `${t.direction === "vertical" && i.itemSecondarySize || i.itemSize}px` : void 0,
|
|
680
680
|
height: i.gridItems ? `${t.direction === "horizontal" && i.itemSecondarySize || i.itemSize}px` : void 0
|
|
681
681
|
} : null,
|
|
682
682
|
class: ["vue-recycle-scroller__item-view", [
|
|
683
683
|
i.itemClass,
|
|
684
684
|
{
|
|
685
|
-
hover: !i.skipHover && r.hoverKey ===
|
|
685
|
+
hover: !i.skipHover && r.hoverKey === s.nr.key
|
|
686
686
|
}
|
|
687
687
|
]]
|
|
688
688
|
}, Ni(i.skipHover ? {} : {
|
|
689
689
|
mouseenter: () => {
|
|
690
|
-
r.hoverKey =
|
|
690
|
+
r.hoverKey = s.nr.key;
|
|
691
691
|
},
|
|
692
692
|
mouseleave: () => {
|
|
693
693
|
r.hoverKey = null;
|
|
@@ -695,9 +695,9 @@ function pn(t, e, i, n, r, o) {
|
|
|
695
695
|
})), {
|
|
696
696
|
default: tt(() => [
|
|
697
697
|
he(t.$slots, "default", {
|
|
698
|
-
item:
|
|
699
|
-
index:
|
|
700
|
-
active:
|
|
698
|
+
item: s.item,
|
|
699
|
+
index: s.nr.index,
|
|
700
|
+
active: s.nr.used
|
|
701
701
|
})
|
|
702
702
|
]),
|
|
703
703
|
_: 2
|
|
@@ -711,7 +711,7 @@ function pn(t, e, i, n, r, o) {
|
|
|
711
711
|
_: 3
|
|
712
712
|
/* FORWARDED */
|
|
713
713
|
}, 8, ["style", "class"])),
|
|
714
|
-
t.$slots.after ? (k(),
|
|
714
|
+
t.$slots.after ? (k(), W(
|
|
715
715
|
"div",
|
|
716
716
|
hn,
|
|
717
717
|
[
|
|
@@ -719,73 +719,81 @@ function pn(t, e, i, n, r, o) {
|
|
|
719
719
|
],
|
|
720
720
|
512
|
|
721
721
|
/* NEED_PATCH */
|
|
722
|
-
)) :
|
|
722
|
+
)) : G("v-if", !0),
|
|
723
723
|
ki(l, { onNotify: o.handleResize }, null, 8, ["onNotify"])
|
|
724
724
|
],
|
|
725
725
|
34
|
|
726
726
|
/* CLASS, HYDRATE_EVENTS */
|
|
727
727
|
)), [
|
|
728
|
-
[
|
|
728
|
+
[a, o.handleVisibilityChange]
|
|
729
729
|
]);
|
|
730
730
|
}
|
|
731
731
|
Pt.render = pn;
|
|
732
732
|
Pt.__file = "src/components/RecycleScroller.vue";
|
|
733
733
|
const mn = (t, e) => {
|
|
734
|
-
const i = Pe(), n = Pe(), r = Qt(t, "modelValue"), o = t.valueKey, l = Ne(() => t.selectedNum ? t.selectedNum : `${t.customTitle || je("das-select-list-selected").value}${je("das-select-list-parentheses-left").value}${r.value.length}${je("das-select-list-parentheses-right").value}`),
|
|
734
|
+
const i = Pe(), n = Pe(), r = Qt(t, "modelValue"), o = t.valueKey, l = Ne(() => t.selectedNum ? t.selectedNum : `${t.customTitle || je("das-select-list-selected").value}${je("das-select-list-parentheses-left").value}${r.value.length}${je("das-select-list-parentheses-right").value}`), a = Ne(() => ({ disabled: "disabled", ...t.props })), s = (p) => {
|
|
735
735
|
let d = !1;
|
|
736
|
-
return typeof
|
|
737
|
-
}, u =
|
|
736
|
+
return typeof a.value.disabled == "string" ? d = p[a.value.disabled] : d = a.value.disabled(p) ?? !1, d;
|
|
737
|
+
}, u = (p) => {
|
|
738
|
+
let d = !1;
|
|
739
|
+
return typeof a.value.disableDrag == "string" ? d = p[a.value.disableDrag] : d = a.value.disableDrag(p) ?? !1, d;
|
|
740
|
+
}, c = (p) => {
|
|
741
|
+
let d = !1;
|
|
742
|
+
return typeof a.value.disableDelete == "string" ? d = p[a.value.disableDelete] : d = a.value.disableDelete(p) ?? !1, d;
|
|
743
|
+
}, f = Ne({
|
|
738
744
|
get: () => t.selectdValue,
|
|
739
|
-
set: (
|
|
740
|
-
e("update:selectdValue",
|
|
745
|
+
set: (p) => {
|
|
746
|
+
e("update:selectdValue", p);
|
|
741
747
|
}
|
|
742
|
-
}),
|
|
743
|
-
t.isView ||
|
|
744
|
-
},
|
|
745
|
-
const d = r.value.filter((
|
|
746
|
-
e("item-remove",
|
|
747
|
-
}, p = () => {
|
|
748
|
-
const y = r.value.filter((C) => !a(C)), d = r.value.filter((C) => a(C));
|
|
749
|
-
e("remove-all", y), e("update:modelValue", d);
|
|
748
|
+
}), m = (p) => {
|
|
749
|
+
t.isView || s(p) || (f.value = p[o], e("select-item", p));
|
|
750
|
+
}, E = (p) => {
|
|
751
|
+
const d = r.value.filter((A) => A[o] !== p[o]);
|
|
752
|
+
e("item-remove", p), e("update:modelValue", d);
|
|
750
753
|
}, _ = () => {
|
|
751
|
-
|
|
752
|
-
|
|
754
|
+
const p = r.value.filter((A) => !s(A)), d = r.value.filter((A) => s(A));
|
|
755
|
+
e("remove-all", p), e("update:modelValue", d);
|
|
756
|
+
}, g = () => {
|
|
757
|
+
t.infiniteScroll && t.infiniteScroll().then((p) => {
|
|
758
|
+
if (p && p.length) {
|
|
753
759
|
let d = [];
|
|
754
|
-
d =
|
|
755
|
-
(
|
|
760
|
+
d = p, d = d.filter(
|
|
761
|
+
(Y) => !r.value.map((v) => v[t.valueKey]).includes(Y[t.valueKey])
|
|
756
762
|
);
|
|
757
|
-
const
|
|
758
|
-
e("update:modelValue",
|
|
763
|
+
const A = r.value.concat(d);
|
|
764
|
+
e("update:modelValue", A);
|
|
759
765
|
}
|
|
760
766
|
});
|
|
761
767
|
};
|
|
762
|
-
let
|
|
763
|
-
const
|
|
764
|
-
var
|
|
765
|
-
const d = ((
|
|
766
|
-
|
|
767
|
-
},
|
|
768
|
+
let D = 0;
|
|
769
|
+
const V = (p) => {
|
|
770
|
+
var A;
|
|
771
|
+
const d = ((A = n.value) == null ? void 0 : A.offsetHeight) || 0;
|
|
772
|
+
D !== 0 && p === 0 && g(), D = p, p !== 0 && p - d < 10 && g();
|
|
773
|
+
}, O = Pe();
|
|
768
774
|
return Zt(() => {
|
|
769
775
|
var d;
|
|
770
776
|
if (t.infiniteDisabled) return;
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
},
|
|
777
|
+
const p = (d = n.value) == null ? void 0 : d.querySelector(".selected-group");
|
|
778
|
+
O.value = Hi((A) => {
|
|
779
|
+
V(A.height);
|
|
780
|
+
}, p);
|
|
775
781
|
}), $i(() => {
|
|
776
|
-
var
|
|
777
|
-
(
|
|
782
|
+
var p;
|
|
783
|
+
(p = O.value) == null || p.disconnect();
|
|
778
784
|
}), {
|
|
779
785
|
selectListRef: i,
|
|
780
786
|
$list: n,
|
|
781
|
-
disabledFlag:
|
|
787
|
+
disabledFlag: s,
|
|
788
|
+
disabledDrag: u,
|
|
789
|
+
disableDelete: c,
|
|
782
790
|
itemGroups: r,
|
|
783
791
|
selectedLabel: l,
|
|
784
|
-
itemRemove:
|
|
785
|
-
removeAll:
|
|
786
|
-
innerSelectdValue:
|
|
787
|
-
selectItem:
|
|
788
|
-
infiniteLoad:
|
|
792
|
+
itemRemove: E,
|
|
793
|
+
removeAll: _,
|
|
794
|
+
innerSelectdValue: f,
|
|
795
|
+
selectItem: m,
|
|
796
|
+
infiniteLoad: g
|
|
789
797
|
};
|
|
790
798
|
};
|
|
791
799
|
/**!
|
|
@@ -831,15 +839,15 @@ function gn(t, e, i) {
|
|
|
831
839
|
writable: !0
|
|
832
840
|
}) : t[e] = i, t;
|
|
833
841
|
}
|
|
834
|
-
function
|
|
835
|
-
return
|
|
842
|
+
function se() {
|
|
843
|
+
return se = Object.assign || function(t) {
|
|
836
844
|
for (var e = 1; e < arguments.length; e++) {
|
|
837
845
|
var i = arguments[e];
|
|
838
846
|
for (var n in i)
|
|
839
847
|
Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]);
|
|
840
848
|
}
|
|
841
849
|
return t;
|
|
842
|
-
},
|
|
850
|
+
}, se.apply(this, arguments);
|
|
843
851
|
}
|
|
844
852
|
function vn(t, e) {
|
|
845
853
|
if (t == null) return {};
|
|
@@ -859,19 +867,19 @@ function bn(t, e) {
|
|
|
859
867
|
return i;
|
|
860
868
|
}
|
|
861
869
|
var yn = "1.15.6";
|
|
862
|
-
function
|
|
870
|
+
function ae(t) {
|
|
863
871
|
if (typeof window < "u" && window.navigator)
|
|
864
872
|
return !!/* @__PURE__ */ navigator.userAgent.match(t);
|
|
865
873
|
}
|
|
866
|
-
var
|
|
874
|
+
var ue = ae(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Fe = ae(/Edge/i), Yt = ae(/firefox/i), $e = ae(/safari/i) && !ae(/chrome/i) && !ae(/android/i), Nt = ae(/iP(ad|od|hone)/i), ri = ae(/chrome/i) && ae(/android/i), oi = {
|
|
867
875
|
capture: !1,
|
|
868
876
|
passive: !1
|
|
869
877
|
};
|
|
870
|
-
function
|
|
871
|
-
t.addEventListener(e, i, !
|
|
878
|
+
function C(t, e, i) {
|
|
879
|
+
t.addEventListener(e, i, !ue && oi);
|
|
872
880
|
}
|
|
873
|
-
function
|
|
874
|
-
t.removeEventListener(e, i, !
|
|
881
|
+
function T(t, e, i) {
|
|
882
|
+
t.removeEventListener(e, i, !ue && oi);
|
|
875
883
|
}
|
|
876
884
|
function it(t, e) {
|
|
877
885
|
if (e) {
|
|
@@ -913,7 +921,7 @@ function Z(t, e, i) {
|
|
|
913
921
|
t.className = (n + (i ? " " + e : "")).replace(Xt, " ");
|
|
914
922
|
}
|
|
915
923
|
}
|
|
916
|
-
function
|
|
924
|
+
function b(t, e, i) {
|
|
917
925
|
var n = t && t.style;
|
|
918
926
|
if (n) {
|
|
919
927
|
if (i === void 0)
|
|
@@ -927,7 +935,7 @@ function De(t, e) {
|
|
|
927
935
|
i = t;
|
|
928
936
|
else
|
|
929
937
|
do {
|
|
930
|
-
var n =
|
|
938
|
+
var n = b(t, "transform");
|
|
931
939
|
n && n !== "none" && (i = n + " " + i);
|
|
932
940
|
} while (!e && (t = t.parentNode));
|
|
933
941
|
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
@@ -947,34 +955,34 @@ function ne() {
|
|
|
947
955
|
var t = document.scrollingElement;
|
|
948
956
|
return t || document.documentElement;
|
|
949
957
|
}
|
|
950
|
-
function
|
|
958
|
+
function L(t, e, i, n, r) {
|
|
951
959
|
if (!(!t.getBoundingClientRect && t !== window)) {
|
|
952
|
-
var o, l,
|
|
953
|
-
if (t !== window && t.parentNode && t !== ne() ? (o = t.getBoundingClientRect(), l = o.top,
|
|
960
|
+
var o, l, a, s, u, c, f;
|
|
961
|
+
if (t !== window && t.parentNode && t !== ne() ? (o = t.getBoundingClientRect(), l = o.top, a = o.left, s = o.bottom, u = o.right, c = o.height, f = o.width) : (l = 0, a = 0, s = window.innerHeight, u = window.innerWidth, c = window.innerHeight, f = window.innerWidth), (e || i) && t !== window && (r = r || t.parentNode, !ue))
|
|
954
962
|
do
|
|
955
|
-
if (r && r.getBoundingClientRect && (
|
|
956
|
-
var
|
|
957
|
-
l -=
|
|
963
|
+
if (r && r.getBoundingClientRect && (b(r, "transform") !== "none" || i && b(r, "position") !== "static")) {
|
|
964
|
+
var m = r.getBoundingClientRect();
|
|
965
|
+
l -= m.top + parseInt(b(r, "border-top-width")), a -= m.left + parseInt(b(r, "border-left-width")), s = l + o.height, u = a + o.width;
|
|
958
966
|
break;
|
|
959
967
|
}
|
|
960
968
|
while (r = r.parentNode);
|
|
961
969
|
if (n && t !== window) {
|
|
962
|
-
var
|
|
963
|
-
|
|
970
|
+
var E = De(r || t), _ = E && E.a, g = E && E.d;
|
|
971
|
+
E && (l /= g, a /= _, f /= _, c /= g, s = l + c, u = a + f);
|
|
964
972
|
}
|
|
965
973
|
return {
|
|
966
974
|
top: l,
|
|
967
|
-
left:
|
|
968
|
-
bottom:
|
|
975
|
+
left: a,
|
|
976
|
+
bottom: s,
|
|
969
977
|
right: u,
|
|
970
|
-
width:
|
|
978
|
+
width: f,
|
|
971
979
|
height: c
|
|
972
980
|
};
|
|
973
981
|
}
|
|
974
982
|
}
|
|
975
983
|
function Wt(t, e, i) {
|
|
976
|
-
for (var n = pe(t, !0), r =
|
|
977
|
-
var o =
|
|
984
|
+
for (var n = pe(t, !0), r = L(t)[e]; n; ) {
|
|
985
|
+
var o = L(n)[i], l = void 0;
|
|
978
986
|
if (l = r >= o, !l) return n;
|
|
979
987
|
if (n === ne()) break;
|
|
980
988
|
n = pe(n, !1);
|
|
@@ -983,7 +991,7 @@ function Wt(t, e, i) {
|
|
|
983
991
|
}
|
|
984
992
|
function Ie(t, e, i, n) {
|
|
985
993
|
for (var r = 0, o = 0, l = t.children; o < l.length; ) {
|
|
986
|
-
if (l[o].style.display !== "none" && l[o] !==
|
|
994
|
+
if (l[o].style.display !== "none" && l[o] !== y.ghost && (n || l[o] !== y.dragged) && ie(l[o], i.draggable, t, !1)) {
|
|
987
995
|
if (r === e)
|
|
988
996
|
return l[o];
|
|
989
997
|
r++;
|
|
@@ -993,7 +1001,7 @@ function Ie(t, e, i, n) {
|
|
|
993
1001
|
return null;
|
|
994
1002
|
}
|
|
995
1003
|
function $t(t, e) {
|
|
996
|
-
for (var i = t.lastElementChild; i && (i ===
|
|
1004
|
+
for (var i = t.lastElementChild; i && (i === y.ghost || b(i, "display") === "none" || e && !it(i, e)); )
|
|
997
1005
|
i = i.previousElementSibling;
|
|
998
1006
|
return i || null;
|
|
999
1007
|
}
|
|
@@ -1002,7 +1010,7 @@ function ee(t, e) {
|
|
|
1002
1010
|
if (!t || !t.parentNode)
|
|
1003
1011
|
return -1;
|
|
1004
1012
|
for (; t = t.previousElementSibling; )
|
|
1005
|
-
t.nodeName.toUpperCase() !== "TEMPLATE" && t !==
|
|
1013
|
+
t.nodeName.toUpperCase() !== "TEMPLATE" && t !== y.clone && (!e || it(t, e)) && i++;
|
|
1006
1014
|
return i;
|
|
1007
1015
|
}
|
|
1008
1016
|
function jt(t) {
|
|
@@ -1027,7 +1035,7 @@ function pe(t, e) {
|
|
|
1027
1035
|
var i = t, n = !1;
|
|
1028
1036
|
do
|
|
1029
1037
|
if (i.clientWidth < i.scrollWidth || i.clientHeight < i.scrollHeight) {
|
|
1030
|
-
var r =
|
|
1038
|
+
var r = b(i);
|
|
1031
1039
|
if (i.clientWidth < i.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || i.clientHeight < i.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
1032
1040
|
if (!i.getBoundingClientRect || i === document.body) return ne();
|
|
1033
1041
|
if (n || e) return i;
|
|
@@ -1063,17 +1071,17 @@ function _n() {
|
|
|
1063
1071
|
function ui(t, e, i) {
|
|
1064
1072
|
t.scrollLeft += e, t.scrollTop += i;
|
|
1065
1073
|
}
|
|
1066
|
-
function
|
|
1074
|
+
function di(t) {
|
|
1067
1075
|
var e = window.Polymer, i = window.jQuery || window.Zepto;
|
|
1068
1076
|
return e && e.dom ? e.dom(t).cloneNode(!0) : i ? i(t).clone(!0)[0] : t.cloneNode(!0);
|
|
1069
1077
|
}
|
|
1070
|
-
function
|
|
1078
|
+
function ci(t, e, i) {
|
|
1071
1079
|
var n = {};
|
|
1072
1080
|
return Array.from(t.children).forEach(function(r) {
|
|
1073
|
-
var o, l,
|
|
1081
|
+
var o, l, a, s;
|
|
1074
1082
|
if (!(!ie(r, e.draggable, t, !1) || r.animated || r === i)) {
|
|
1075
|
-
var u =
|
|
1076
|
-
n.left = Math.min((o = n.left) !== null && o !== void 0 ? o : 1 / 0, u.left), n.top = Math.min((l = n.top) !== null && l !== void 0 ? l : 1 / 0, u.top), n.right = Math.max((
|
|
1083
|
+
var u = L(r);
|
|
1084
|
+
n.left = Math.min((o = n.left) !== null && o !== void 0 ? o : 1 / 0, u.left), n.top = Math.min((l = n.top) !== null && l !== void 0 ? l : 1 / 0, u.top), n.right = Math.max((a = n.right) !== null && a !== void 0 ? a : -1 / 0, u.right), n.bottom = Math.max((s = n.bottom) !== null && s !== void 0 ? s : -1 / 0, u.bottom);
|
|
1077
1085
|
}
|
|
1078
1086
|
}), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n;
|
|
1079
1087
|
}
|
|
@@ -1085,10 +1093,10 @@ function En() {
|
|
|
1085
1093
|
if (t = [], !!this.options.animation) {
|
|
1086
1094
|
var n = [].slice.call(this.el.children);
|
|
1087
1095
|
n.forEach(function(r) {
|
|
1088
|
-
if (!(
|
|
1096
|
+
if (!(b(r, "display") === "none" || r === y.ghost)) {
|
|
1089
1097
|
t.push({
|
|
1090
1098
|
target: r,
|
|
1091
|
-
rect:
|
|
1099
|
+
rect: L(r)
|
|
1092
1100
|
});
|
|
1093
1101
|
var o = re({}, t[t.length - 1].rect);
|
|
1094
1102
|
if (r.thisAnimationDuration) {
|
|
@@ -1115,22 +1123,22 @@ function En() {
|
|
|
1115
1123
|
return;
|
|
1116
1124
|
}
|
|
1117
1125
|
var o = !1, l = 0;
|
|
1118
|
-
t.forEach(function(
|
|
1119
|
-
var
|
|
1120
|
-
|
|
1121
|
-
(
|
|
1126
|
+
t.forEach(function(a) {
|
|
1127
|
+
var s = 0, u = a.target, c = u.fromRect, f = L(u), m = u.prevFromRect, E = u.prevToRect, _ = a.rect, g = De(u, !0);
|
|
1128
|
+
g && (f.top -= g.f, f.left -= g.e), u.toRect = f, u.thisAnimationDuration && ht(m, f) && !ht(c, f) && // Make sure animatingRect is on line between toRect & fromRect
|
|
1129
|
+
(_.top - f.top) / (_.left - f.left) === (c.top - f.top) / (c.left - f.left) && (s = In(_, m, E, r.options)), ht(f, c) || (u.prevFromRect = c, u.prevToRect = f, s || (s = r.options.animation), r.animate(u, _, f, s)), s && (o = !0, l = Math.max(l, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
1122
1130
|
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
1123
|
-
},
|
|
1131
|
+
}, s), u.thisAnimationDuration = s);
|
|
1124
1132
|
}), clearTimeout(e), o ? e = setTimeout(function() {
|
|
1125
1133
|
typeof n == "function" && n();
|
|
1126
1134
|
}, l) : typeof n == "function" && n(), t = [];
|
|
1127
1135
|
},
|
|
1128
1136
|
animate: function(n, r, o, l) {
|
|
1129
1137
|
if (l) {
|
|
1130
|
-
|
|
1131
|
-
var
|
|
1132
|
-
n.animatingX = !!c, n.animatingY = !!
|
|
1133
|
-
|
|
1138
|
+
b(n, "transition", ""), b(n, "transform", "");
|
|
1139
|
+
var a = De(this.el), s = a && a.a, u = a && a.d, c = (r.left - o.left) / (s || 1), f = (r.top - o.top) / (u || 1);
|
|
1140
|
+
n.animatingX = !!c, n.animatingY = !!f, b(n, "transform", "translate3d(" + c + "px," + f + "px,0)"), this.forRepaintDummy = Dn(n), b(n, "transition", "transform " + l + "ms" + (this.options.easing ? " " + this.options.easing : "")), b(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
|
|
1141
|
+
b(n, "transition", ""), b(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
1134
1142
|
}, l);
|
|
1135
1143
|
}
|
|
1136
1144
|
}
|
|
@@ -1168,11 +1176,11 @@ var ye = [], pt = {
|
|
|
1168
1176
|
});
|
|
1169
1177
|
},
|
|
1170
1178
|
initializePlugins: function(e, i, n, r) {
|
|
1171
|
-
ye.forEach(function(
|
|
1172
|
-
var
|
|
1173
|
-
if (!(!e.options[
|
|
1174
|
-
var u = new
|
|
1175
|
-
u.sortable = e, u.options = e.options, e[
|
|
1179
|
+
ye.forEach(function(a) {
|
|
1180
|
+
var s = a.pluginName;
|
|
1181
|
+
if (!(!e.options[s] && !a.initializeByDefault)) {
|
|
1182
|
+
var u = new a(e, i, e.options);
|
|
1183
|
+
u.sortable = e, u.options = e.options, e[s] = u, se(n, u.defaults);
|
|
1176
1184
|
}
|
|
1177
1185
|
});
|
|
1178
1186
|
for (var o in e.options)
|
|
@@ -1184,7 +1192,7 @@ var ye = [], pt = {
|
|
|
1184
1192
|
getEventProperties: function(e, i) {
|
|
1185
1193
|
var n = {};
|
|
1186
1194
|
return ye.forEach(function(r) {
|
|
1187
|
-
typeof r.eventProperties == "function" &&
|
|
1195
|
+
typeof r.eventProperties == "function" && se(n, r.eventProperties.call(i[r.pluginName], e));
|
|
1188
1196
|
}), n;
|
|
1189
1197
|
},
|
|
1190
1198
|
modifyOption: function(e, i, n) {
|
|
@@ -1195,38 +1203,38 @@ var ye = [], pt = {
|
|
|
1195
1203
|
}
|
|
1196
1204
|
};
|
|
1197
1205
|
function Tn(t) {
|
|
1198
|
-
var e = t.sortable, i = t.rootEl, n = t.name, r = t.targetEl, o = t.cloneEl, l = t.toEl,
|
|
1206
|
+
var e = t.sortable, i = t.rootEl, n = t.name, r = t.targetEl, o = t.cloneEl, l = t.toEl, a = t.fromEl, s = t.oldIndex, u = t.newIndex, c = t.oldDraggableIndex, f = t.newDraggableIndex, m = t.originalEvent, E = t.putSortable, _ = t.extraEventProperties;
|
|
1199
1207
|
if (e = e || i && i[q], !!e) {
|
|
1200
|
-
var
|
|
1201
|
-
window.CustomEvent && !
|
|
1208
|
+
var g, D = e.options, V = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
1209
|
+
window.CustomEvent && !ue && !Fe ? g = new CustomEvent(n, {
|
|
1202
1210
|
bubbles: !0,
|
|
1203
1211
|
cancelable: !0
|
|
1204
|
-
}) : (
|
|
1205
|
-
var
|
|
1206
|
-
for (var
|
|
1207
|
-
|
|
1208
|
-
i && i.dispatchEvent(
|
|
1212
|
+
}) : (g = document.createEvent("Event"), g.initEvent(n, !0, !0)), g.to = l || i, g.from = a || i, g.item = r || i, g.clone = o, g.oldIndex = s, g.newIndex = u, g.oldDraggableIndex = c, g.newDraggableIndex = f, g.originalEvent = m, g.pullMode = E ? E.lastPutMode : void 0;
|
|
1213
|
+
var O = re(re({}, _), He.getEventProperties(n, e));
|
|
1214
|
+
for (var p in O)
|
|
1215
|
+
g[p] = O[p];
|
|
1216
|
+
i && i.dispatchEvent(g), D[V] && D[V].call(e, g);
|
|
1209
1217
|
}
|
|
1210
1218
|
}
|
|
1211
1219
|
var Cn = ["evt"], U = function(e, i) {
|
|
1212
1220
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o = bn(n, Cn);
|
|
1213
|
-
He.pluginEvent.bind(
|
|
1214
|
-
dragEl:
|
|
1215
|
-
parentEl:
|
|
1216
|
-
ghostEl:
|
|
1221
|
+
He.pluginEvent.bind(y)(e, i, re({
|
|
1222
|
+
dragEl: h,
|
|
1223
|
+
parentEl: x,
|
|
1224
|
+
ghostEl: S,
|
|
1217
1225
|
rootEl: P,
|
|
1218
1226
|
nextEl: be,
|
|
1219
1227
|
lastDownEl: qe,
|
|
1220
1228
|
cloneEl: $,
|
|
1221
1229
|
cloneHidden: fe,
|
|
1222
1230
|
dragStarted: Ae,
|
|
1223
|
-
putSortable:
|
|
1224
|
-
activeSortable:
|
|
1231
|
+
putSortable: X,
|
|
1232
|
+
activeSortable: y.active,
|
|
1225
1233
|
originalEvent: r,
|
|
1226
1234
|
oldIndex: Ee,
|
|
1227
1235
|
oldDraggableIndex: xe,
|
|
1228
1236
|
newIndex: Q,
|
|
1229
|
-
newDraggableIndex:
|
|
1237
|
+
newDraggableIndex: ce,
|
|
1230
1238
|
hideGhostForTarget: mi,
|
|
1231
1239
|
unhideGhostForTarget: gi,
|
|
1232
1240
|
cloneNowHidden: function() {
|
|
@@ -1235,72 +1243,72 @@ var Cn = ["evt"], U = function(e, i) {
|
|
|
1235
1243
|
cloneNowShown: function() {
|
|
1236
1244
|
fe = !1;
|
|
1237
1245
|
},
|
|
1238
|
-
dispatchSortableEvent: function(
|
|
1239
|
-
|
|
1246
|
+
dispatchSortableEvent: function(a) {
|
|
1247
|
+
K({
|
|
1240
1248
|
sortable: i,
|
|
1241
|
-
name:
|
|
1249
|
+
name: a,
|
|
1242
1250
|
originalEvent: r
|
|
1243
1251
|
});
|
|
1244
1252
|
}
|
|
1245
1253
|
}, o));
|
|
1246
1254
|
};
|
|
1247
|
-
function
|
|
1255
|
+
function K(t) {
|
|
1248
1256
|
Tn(re({
|
|
1249
|
-
putSortable:
|
|
1257
|
+
putSortable: X,
|
|
1250
1258
|
cloneEl: $,
|
|
1251
|
-
targetEl:
|
|
1259
|
+
targetEl: h,
|
|
1252
1260
|
rootEl: P,
|
|
1253
1261
|
oldIndex: Ee,
|
|
1254
1262
|
oldDraggableIndex: xe,
|
|
1255
1263
|
newIndex: Q,
|
|
1256
|
-
newDraggableIndex:
|
|
1264
|
+
newDraggableIndex: ce
|
|
1257
1265
|
}, t));
|
|
1258
1266
|
}
|
|
1259
|
-
var
|
|
1267
|
+
var h, x, S, P, be, qe, $, fe, Ee, Q, xe, ce, Be, X, _e = !1, nt = !1, rt = [], ge, te, mt, gt, Kt, Gt, Ae, we, Ve, Re = !1, Ye = !1, Je, j, vt = [], Ot = !1, ot = [], st = typeof document < "u", Xe = Nt, Ut = Fe || ue ? "cssFloat" : "float", On = st && !ri && !Nt && "draggable" in document.createElement("div"), fi = function() {
|
|
1260
1268
|
if (st) {
|
|
1261
|
-
if (
|
|
1269
|
+
if (ue)
|
|
1262
1270
|
return !1;
|
|
1263
1271
|
var t = document.createElement("x");
|
|
1264
1272
|
return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
|
|
1265
1273
|
}
|
|
1266
1274
|
}(), hi = function(e, i) {
|
|
1267
|
-
var n =
|
|
1275
|
+
var n = b(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o = Ie(e, 0, i), l = Ie(e, 1, i), a = o && b(o), s = l && b(l), u = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + L(o).width, c = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + L(l).width;
|
|
1268
1276
|
if (n.display === "flex")
|
|
1269
1277
|
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1270
1278
|
if (n.display === "grid")
|
|
1271
1279
|
return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1272
|
-
if (o &&
|
|
1273
|
-
var
|
|
1274
|
-
return l && (
|
|
1280
|
+
if (o && a.float && a.float !== "none") {
|
|
1281
|
+
var f = a.float === "left" ? "left" : "right";
|
|
1282
|
+
return l && (s.clear === "both" || s.clear === f) ? "vertical" : "horizontal";
|
|
1275
1283
|
}
|
|
1276
|
-
return o && (
|
|
1284
|
+
return o && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || u >= r && n[Ut] === "none" || l && n[Ut] === "none" && u + c > r) ? "vertical" : "horizontal";
|
|
1277
1285
|
}, An = function(e, i, n) {
|
|
1278
|
-
var r = n ? e.left : e.top, o = n ? e.right : e.bottom, l = n ? e.width : e.height,
|
|
1279
|
-
return r ===
|
|
1286
|
+
var r = n ? e.left : e.top, o = n ? e.right : e.bottom, l = n ? e.width : e.height, a = n ? i.left : i.top, s = n ? i.right : i.bottom, u = n ? i.width : i.height;
|
|
1287
|
+
return r === a || o === s || r + l / 2 === a + u / 2;
|
|
1280
1288
|
}, zn = function(e, i) {
|
|
1281
1289
|
var n;
|
|
1282
1290
|
return rt.some(function(r) {
|
|
1283
1291
|
var o = r[q].options.emptyInsertThreshold;
|
|
1284
1292
|
if (!(!o || $t(r))) {
|
|
1285
|
-
var l =
|
|
1286
|
-
if (
|
|
1293
|
+
var l = L(r), a = e >= l.left - o && e <= l.right + o, s = i >= l.top - o && i <= l.bottom + o;
|
|
1294
|
+
if (a && s)
|
|
1287
1295
|
return n = r;
|
|
1288
1296
|
}
|
|
1289
1297
|
}), n;
|
|
1290
1298
|
}, pi = function(e) {
|
|
1291
1299
|
function i(o, l) {
|
|
1292
|
-
return function(
|
|
1293
|
-
var
|
|
1294
|
-
if (o == null && (l ||
|
|
1300
|
+
return function(a, s, u, c) {
|
|
1301
|
+
var f = a.options.group.name && s.options.group.name && a.options.group.name === s.options.group.name;
|
|
1302
|
+
if (o == null && (l || f))
|
|
1295
1303
|
return !0;
|
|
1296
1304
|
if (o == null || o === !1)
|
|
1297
1305
|
return !1;
|
|
1298
1306
|
if (l && o === "clone")
|
|
1299
1307
|
return o;
|
|
1300
1308
|
if (typeof o == "function")
|
|
1301
|
-
return i(o(
|
|
1302
|
-
var
|
|
1303
|
-
return o === !0 || typeof o == "string" && o ===
|
|
1309
|
+
return i(o(a, s, u, c), l)(a, s, u, c);
|
|
1310
|
+
var m = (l ? a : s).options.group.name;
|
|
1311
|
+
return o === !0 || typeof o == "string" && o === m || o.join && o.indexOf(m) > -1;
|
|
1304
1312
|
};
|
|
1305
1313
|
}
|
|
1306
1314
|
var n = {}, r = e.group;
|
|
@@ -1308,16 +1316,16 @@ var f, M, w, P, be, qe, $, fe, Ee, Q, xe, de, Be, Y, _e = !1, nt = !1, rt = [],
|
|
|
1308
1316
|
name: r
|
|
1309
1317
|
}), n.name = r.name, n.checkPull = i(r.pull, !0), n.checkPut = i(r.put), n.revertClone = r.revertClone, e.group = n;
|
|
1310
1318
|
}, mi = function() {
|
|
1311
|
-
!fi &&
|
|
1319
|
+
!fi && S && b(S, "display", "none");
|
|
1312
1320
|
}, gi = function() {
|
|
1313
|
-
!fi &&
|
|
1321
|
+
!fi && S && b(S, "display", "");
|
|
1314
1322
|
};
|
|
1315
1323
|
st && !ri && document.addEventListener("click", function(t) {
|
|
1316
1324
|
if (nt)
|
|
1317
1325
|
return t.preventDefault(), t.stopPropagation && t.stopPropagation(), t.stopImmediatePropagation && t.stopImmediatePropagation(), nt = !1, !1;
|
|
1318
1326
|
}, !0);
|
|
1319
1327
|
var ve = function(e) {
|
|
1320
|
-
if (
|
|
1328
|
+
if (h) {
|
|
1321
1329
|
e = e.touches ? e.touches[0] : e;
|
|
1322
1330
|
var i = zn(e.clientX, e.clientY);
|
|
1323
1331
|
if (i) {
|
|
@@ -1328,12 +1336,12 @@ var ve = function(e) {
|
|
|
1328
1336
|
}
|
|
1329
1337
|
}
|
|
1330
1338
|
}, kn = function(e) {
|
|
1331
|
-
|
|
1339
|
+
h && h.parentNode[q]._isOutsideThisEl(e.target);
|
|
1332
1340
|
};
|
|
1333
|
-
function
|
|
1341
|
+
function y(t, e) {
|
|
1334
1342
|
if (!(t && t.nodeType && t.nodeType === 1))
|
|
1335
1343
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));
|
|
1336
|
-
this.el = t, this.options = e =
|
|
1344
|
+
this.el = t, this.options = e = se({}, e), t[q] = this;
|
|
1337
1345
|
var i = {
|
|
1338
1346
|
group: null,
|
|
1339
1347
|
sort: !0,
|
|
@@ -1359,8 +1367,8 @@ function b(t, e) {
|
|
|
1359
1367
|
preventOnFilter: !0,
|
|
1360
1368
|
animation: 0,
|
|
1361
1369
|
easing: null,
|
|
1362
|
-
setData: function(l,
|
|
1363
|
-
l.setData("Text",
|
|
1370
|
+
setData: function(l, a) {
|
|
1371
|
+
l.setData("Text", a.textContent);
|
|
1364
1372
|
},
|
|
1365
1373
|
dropBubble: !1,
|
|
1366
1374
|
dragoverBubble: !1,
|
|
@@ -1377,7 +1385,7 @@ function b(t, e) {
|
|
|
1377
1385
|
y: 0
|
|
1378
1386
|
},
|
|
1379
1387
|
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
1380
|
-
supportPointer:
|
|
1388
|
+
supportPointer: y.supportPointer !== !1 && "PointerEvent" in window && (!$e || Nt),
|
|
1381
1389
|
emptyInsertThreshold: 5
|
|
1382
1390
|
};
|
|
1383
1391
|
He.initializePlugins(this, t, i);
|
|
@@ -1386,28 +1394,28 @@ function b(t, e) {
|
|
|
1386
1394
|
pi(e);
|
|
1387
1395
|
for (var r in this)
|
|
1388
1396
|
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
1389
|
-
this.nativeDraggable = e.forceFallback ? !1 : On, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ?
|
|
1397
|
+
this.nativeDraggable = e.forceFallback ? !1 : On, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? C(t, "pointerdown", this._onTapStart) : (C(t, "mousedown", this._onTapStart), C(t, "touchstart", this._onTapStart)), this.nativeDraggable && (C(t, "dragover", this), C(t, "dragenter", this)), rt.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), se(this, En());
|
|
1390
1398
|
}
|
|
1391
|
-
|
|
1399
|
+
y.prototype = /** @lends Sortable.prototype */
|
|
1392
1400
|
{
|
|
1393
|
-
constructor:
|
|
1401
|
+
constructor: y,
|
|
1394
1402
|
_isOutsideThisEl: function(e) {
|
|
1395
1403
|
!this.el.contains(e) && e !== this.el && (we = null);
|
|
1396
1404
|
},
|
|
1397
1405
|
_getDirection: function(e, i) {
|
|
1398
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, i,
|
|
1406
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, i, h) : this.options.direction;
|
|
1399
1407
|
},
|
|
1400
1408
|
_onTapStart: function(e) {
|
|
1401
1409
|
if (e.cancelable) {
|
|
1402
|
-
var i = this, n = this.el, r = this.options, o = r.preventOnFilter, l = e.type,
|
|
1403
|
-
if (Fn(n), !
|
|
1404
|
-
if (Ee = ee(
|
|
1405
|
-
if (c.call(this, e,
|
|
1406
|
-
|
|
1410
|
+
var i = this, n = this.el, r = this.options, o = r.preventOnFilter, l = e.type, a = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (a || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, c = r.filter;
|
|
1411
|
+
if (Fn(n), !h && !(/mousedown|pointerdown/.test(l) && e.button !== 0 || r.disabled) && !u.isContentEditable && !(!this.nativeDraggable && $e && s && s.tagName.toUpperCase() === "SELECT") && (s = ie(s, r.draggable, n, !1), !(s && s.animated) && qe !== s)) {
|
|
1412
|
+
if (Ee = ee(s), xe = ee(s, r.draggable), typeof c == "function") {
|
|
1413
|
+
if (c.call(this, e, s, this)) {
|
|
1414
|
+
K({
|
|
1407
1415
|
sortable: i,
|
|
1408
1416
|
rootEl: u,
|
|
1409
1417
|
name: "filter",
|
|
1410
|
-
targetEl:
|
|
1418
|
+
targetEl: s,
|
|
1411
1419
|
toEl: n,
|
|
1412
1420
|
fromEl: n
|
|
1413
1421
|
}), U("filter", i, {
|
|
@@ -1415,13 +1423,13 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1415
1423
|
}), o && e.preventDefault();
|
|
1416
1424
|
return;
|
|
1417
1425
|
}
|
|
1418
|
-
} else if (c && (c = c.split(",").some(function(
|
|
1419
|
-
if (
|
|
1420
|
-
return
|
|
1426
|
+
} else if (c && (c = c.split(",").some(function(f) {
|
|
1427
|
+
if (f = ie(u, f.trim(), n, !1), f)
|
|
1428
|
+
return K({
|
|
1421
1429
|
sortable: i,
|
|
1422
|
-
rootEl:
|
|
1430
|
+
rootEl: f,
|
|
1423
1431
|
name: "filter",
|
|
1424
|
-
targetEl:
|
|
1432
|
+
targetEl: s,
|
|
1425
1433
|
fromEl: n,
|
|
1426
1434
|
toEl: n
|
|
1427
1435
|
}), U("filter", i, {
|
|
@@ -1431,42 +1439,42 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1431
1439
|
o && e.preventDefault();
|
|
1432
1440
|
return;
|
|
1433
1441
|
}
|
|
1434
|
-
r.handle && !ie(u, r.handle, n, !1) || this._prepareDragStart(e,
|
|
1442
|
+
r.handle && !ie(u, r.handle, n, !1) || this._prepareDragStart(e, a, s);
|
|
1435
1443
|
}
|
|
1436
1444
|
}
|
|
1437
1445
|
},
|
|
1438
1446
|
_prepareDragStart: function(e, i, n) {
|
|
1439
|
-
var r = this, o = r.el, l = r.options,
|
|
1440
|
-
if (n && !
|
|
1441
|
-
var u =
|
|
1442
|
-
if (P = o,
|
|
1443
|
-
target:
|
|
1447
|
+
var r = this, o = r.el, l = r.options, a = o.ownerDocument, s;
|
|
1448
|
+
if (n && !h && n.parentNode === o) {
|
|
1449
|
+
var u = L(n);
|
|
1450
|
+
if (P = o, h = n, x = h.parentNode, be = h.nextSibling, qe = n, Be = l.group, y.dragged = h, ge = {
|
|
1451
|
+
target: h,
|
|
1444
1452
|
clientX: (i || e).clientX,
|
|
1445
1453
|
clientY: (i || e).clientY
|
|
1446
|
-
}, Kt = ge.clientX - u.left, Gt = ge.clientY - u.top, this._lastX = (i || e).clientX, this._lastY = (i || e).clientY,
|
|
1454
|
+
}, Kt = ge.clientX - u.left, Gt = ge.clientY - u.top, this._lastX = (i || e).clientX, this._lastY = (i || e).clientY, h.style["will-change"] = "all", s = function() {
|
|
1447
1455
|
if (U("delayEnded", r, {
|
|
1448
1456
|
evt: e
|
|
1449
|
-
}),
|
|
1457
|
+
}), y.eventCanceled) {
|
|
1450
1458
|
r._onDrop();
|
|
1451
1459
|
return;
|
|
1452
1460
|
}
|
|
1453
|
-
r._disableDelayedDragEvents(), !Yt && r.nativeDraggable && (
|
|
1461
|
+
r._disableDelayedDragEvents(), !Yt && r.nativeDraggable && (h.draggable = !0), r._triggerDragStart(e, i), K({
|
|
1454
1462
|
sortable: r,
|
|
1455
1463
|
name: "choose",
|
|
1456
1464
|
originalEvent: e
|
|
1457
|
-
}), Z(
|
|
1465
|
+
}), Z(h, l.chosenClass, !0);
|
|
1458
1466
|
}, l.ignore.split(",").forEach(function(c) {
|
|
1459
|
-
ai(
|
|
1460
|
-
}),
|
|
1467
|
+
ai(h, c.trim(), bt);
|
|
1468
|
+
}), C(a, "dragover", ve), C(a, "mousemove", ve), C(a, "touchmove", ve), l.supportPointer ? (C(a, "pointerup", r._onDrop), !this.nativeDraggable && C(a, "pointercancel", r._onDrop)) : (C(a, "mouseup", r._onDrop), C(a, "touchend", r._onDrop), C(a, "touchcancel", r._onDrop)), Yt && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), U("delayStart", this, {
|
|
1461
1469
|
evt: e
|
|
1462
|
-
}), l.delay && (!l.delayOnTouchOnly || i) && (!this.nativeDraggable || !(Fe ||
|
|
1463
|
-
if (
|
|
1470
|
+
}), l.delay && (!l.delayOnTouchOnly || i) && (!this.nativeDraggable || !(Fe || ue))) {
|
|
1471
|
+
if (y.eventCanceled) {
|
|
1464
1472
|
this._onDrop();
|
|
1465
1473
|
return;
|
|
1466
1474
|
}
|
|
1467
|
-
l.supportPointer ? (
|
|
1475
|
+
l.supportPointer ? (C(a, "pointerup", r._disableDelayedDrag), C(a, "pointercancel", r._disableDelayedDrag)) : (C(a, "mouseup", r._disableDelayedDrag), C(a, "touchend", r._disableDelayedDrag), C(a, "touchcancel", r._disableDelayedDrag)), C(a, "mousemove", r._delayedDragTouchMoveHandler), C(a, "touchmove", r._delayedDragTouchMoveHandler), l.supportPointer && C(a, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, l.delay);
|
|
1468
1476
|
} else
|
|
1469
|
-
|
|
1477
|
+
s();
|
|
1470
1478
|
}
|
|
1471
1479
|
},
|
|
1472
1480
|
_delayedDragTouchMoveHandler: function(e) {
|
|
@@ -1474,14 +1482,14 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1474
1482
|
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();
|
|
1475
1483
|
},
|
|
1476
1484
|
_disableDelayedDrag: function() {
|
|
1477
|
-
|
|
1485
|
+
h && bt(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
1478
1486
|
},
|
|
1479
1487
|
_disableDelayedDragEvents: function() {
|
|
1480
1488
|
var e = this.el.ownerDocument;
|
|
1481
|
-
|
|
1489
|
+
T(e, "mouseup", this._disableDelayedDrag), T(e, "touchend", this._disableDelayedDrag), T(e, "touchcancel", this._disableDelayedDrag), T(e, "pointerup", this._disableDelayedDrag), T(e, "pointercancel", this._disableDelayedDrag), T(e, "mousemove", this._delayedDragTouchMoveHandler), T(e, "touchmove", this._delayedDragTouchMoveHandler), T(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1482
1490
|
},
|
|
1483
1491
|
_triggerDragStart: function(e, i) {
|
|
1484
|
-
i = i || e.pointerType == "touch" && e, !this.nativeDraggable || i ? this.options.supportPointer ?
|
|
1492
|
+
i = i || e.pointerType == "touch" && e, !this.nativeDraggable || i ? this.options.supportPointer ? C(document, "pointermove", this._onTouchMove) : i ? C(document, "touchmove", this._onTouchMove) : C(document, "mousemove", this._onTouchMove) : (C(h, "dragend", this), C(P, "dragstart", this._onDragStart));
|
|
1485
1493
|
try {
|
|
1486
1494
|
document.selection ? Ze(function() {
|
|
1487
1495
|
document.selection.empty();
|
|
@@ -1490,12 +1498,12 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1490
1498
|
}
|
|
1491
1499
|
},
|
|
1492
1500
|
_dragStarted: function(e, i) {
|
|
1493
|
-
if (_e = !1, P &&
|
|
1501
|
+
if (_e = !1, P && h) {
|
|
1494
1502
|
U("dragStarted", this, {
|
|
1495
1503
|
evt: i
|
|
1496
|
-
}), this.nativeDraggable &&
|
|
1504
|
+
}), this.nativeDraggable && C(document, "dragover", kn);
|
|
1497
1505
|
var n = this.options;
|
|
1498
|
-
!e && Z(
|
|
1506
|
+
!e && Z(h, n.dragClass, !1), Z(h, n.ghostClass, !0), y.active = this, e && this._appendGhost(), K({
|
|
1499
1507
|
sortable: this,
|
|
1500
1508
|
name: "start",
|
|
1501
1509
|
originalEvent: i
|
|
@@ -1508,7 +1516,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1508
1516
|
this._lastX = te.clientX, this._lastY = te.clientY, mi();
|
|
1509
1517
|
for (var e = document.elementFromPoint(te.clientX, te.clientY), i = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(te.clientX, te.clientY), e !== i); )
|
|
1510
1518
|
i = e;
|
|
1511
|
-
if (
|
|
1519
|
+
if (h.parentNode[q]._isOutsideThisEl(e), i)
|
|
1512
1520
|
do {
|
|
1513
1521
|
if (i[q]) {
|
|
1514
1522
|
var n = void 0;
|
|
@@ -1527,203 +1535,203 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1527
1535
|
},
|
|
1528
1536
|
_onTouchMove: function(e) {
|
|
1529
1537
|
if (ge) {
|
|
1530
|
-
var i = this.options, n = i.fallbackTolerance, r = i.fallbackOffset, o = e.touches ? e.touches[0] : e, l =
|
|
1531
|
-
if (!
|
|
1538
|
+
var i = this.options, n = i.fallbackTolerance, r = i.fallbackOffset, o = e.touches ? e.touches[0] : e, l = S && De(S, !0), a = S && l && l.a, s = S && l && l.d, u = Xe && j && jt(j), c = (o.clientX - ge.clientX + r.x) / (a || 1) + (u ? u[0] - vt[0] : 0) / (a || 1), f = (o.clientY - ge.clientY + r.y) / (s || 1) + (u ? u[1] - vt[1] : 0) / (s || 1);
|
|
1539
|
+
if (!y.active && !_e) {
|
|
1532
1540
|
if (n && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < n)
|
|
1533
1541
|
return;
|
|
1534
1542
|
this._onDragStart(e, !0);
|
|
1535
1543
|
}
|
|
1536
|
-
if (
|
|
1537
|
-
l ? (l.e += c - (mt || 0), l.f +=
|
|
1544
|
+
if (S) {
|
|
1545
|
+
l ? (l.e += c - (mt || 0), l.f += f - (gt || 0)) : l = {
|
|
1538
1546
|
a: 1,
|
|
1539
1547
|
b: 0,
|
|
1540
1548
|
c: 0,
|
|
1541
1549
|
d: 1,
|
|
1542
1550
|
e: c,
|
|
1543
|
-
f
|
|
1551
|
+
f
|
|
1544
1552
|
};
|
|
1545
|
-
var
|
|
1546
|
-
|
|
1553
|
+
var m = "matrix(".concat(l.a, ",").concat(l.b, ",").concat(l.c, ",").concat(l.d, ",").concat(l.e, ",").concat(l.f, ")");
|
|
1554
|
+
b(S, "webkitTransform", m), b(S, "mozTransform", m), b(S, "msTransform", m), b(S, "transform", m), mt = c, gt = f, te = o;
|
|
1547
1555
|
}
|
|
1548
1556
|
e.cancelable && e.preventDefault();
|
|
1549
1557
|
}
|
|
1550
1558
|
},
|
|
1551
1559
|
_appendGhost: function() {
|
|
1552
|
-
if (!
|
|
1553
|
-
var e = this.options.fallbackOnBody ? document.body : P, i =
|
|
1560
|
+
if (!S) {
|
|
1561
|
+
var e = this.options.fallbackOnBody ? document.body : P, i = L(h, !0, Xe, !0, e), n = this.options;
|
|
1554
1562
|
if (Xe) {
|
|
1555
|
-
for (
|
|
1556
|
-
|
|
1557
|
-
|
|
1563
|
+
for (j = e; b(j, "position") === "static" && b(j, "transform") === "none" && j !== document; )
|
|
1564
|
+
j = j.parentNode;
|
|
1565
|
+
j !== document.body && j !== document.documentElement ? (j === document && (j = ne()), i.top += j.scrollTop, i.left += j.scrollLeft) : j = ne(), vt = jt(j);
|
|
1558
1566
|
}
|
|
1559
|
-
|
|
1567
|
+
S = h.cloneNode(!0), Z(S, n.ghostClass, !1), Z(S, n.fallbackClass, !0), Z(S, n.dragClass, !0), b(S, "transition", ""), b(S, "transform", ""), b(S, "box-sizing", "border-box"), b(S, "margin", 0), b(S, "top", i.top), b(S, "left", i.left), b(S, "width", i.width), b(S, "height", i.height), b(S, "opacity", "0.8"), b(S, "position", Xe ? "absolute" : "fixed"), b(S, "zIndex", "100000"), b(S, "pointerEvents", "none"), y.ghost = S, e.appendChild(S), b(S, "transform-origin", Kt / parseInt(S.style.width) * 100 + "% " + Gt / parseInt(S.style.height) * 100 + "%");
|
|
1560
1568
|
}
|
|
1561
1569
|
},
|
|
1562
1570
|
_onDragStart: function(e, i) {
|
|
1563
1571
|
var n = this, r = e.dataTransfer, o = n.options;
|
|
1564
1572
|
if (U("dragStart", this, {
|
|
1565
1573
|
evt: e
|
|
1566
|
-
}),
|
|
1574
|
+
}), y.eventCanceled) {
|
|
1567
1575
|
this._onDrop();
|
|
1568
1576
|
return;
|
|
1569
1577
|
}
|
|
1570
|
-
U("setupClone", this),
|
|
1571
|
-
U("clone", n), !
|
|
1578
|
+
U("setupClone", this), y.eventCanceled || ($ = di(h), $.removeAttribute("id"), $.draggable = !1, $.style["will-change"] = "", this._hideClone(), Z($, this.options.chosenClass, !1), y.clone = $), n.cloneId = Ze(function() {
|
|
1579
|
+
U("clone", n), !y.eventCanceled && (n.options.removeCloneOnHide || P.insertBefore($, h), n._hideClone(), K({
|
|
1572
1580
|
sortable: n,
|
|
1573
1581
|
name: "clone"
|
|
1574
1582
|
}));
|
|
1575
|
-
}), !i && Z(
|
|
1583
|
+
}), !i && Z(h, o.dragClass, !0), i ? (nt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (T(document, "mouseup", n._onDrop), T(document, "touchend", n._onDrop), T(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", o.setData && o.setData.call(n, r, h)), C(document, "drop", n), b(h, "transform", "translateZ(0)")), _e = !0, n._dragStartId = Ze(n._dragStarted.bind(n, i, e)), C(document, "selectstart", n), Ae = !0, window.getSelection().removeAllRanges(), $e && b(document.body, "user-select", "none");
|
|
1576
1584
|
},
|
|
1577
1585
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1578
1586
|
_onDragOver: function(e) {
|
|
1579
|
-
var i = this.el, n = e.target, r, o, l,
|
|
1587
|
+
var i = this.el, n = e.target, r, o, l, a = this.options, s = a.group, u = y.active, c = Be === s, f = a.sort, m = X || u, E, _ = this, g = !1;
|
|
1580
1588
|
if (Ot) return;
|
|
1581
|
-
function
|
|
1582
|
-
U(Te,
|
|
1589
|
+
function D(Te, bi) {
|
|
1590
|
+
U(Te, _, re({
|
|
1583
1591
|
evt: e,
|
|
1584
1592
|
isOwner: c,
|
|
1585
|
-
axis:
|
|
1593
|
+
axis: E ? "vertical" : "horizontal",
|
|
1586
1594
|
revert: l,
|
|
1587
1595
|
dragRect: r,
|
|
1588
1596
|
targetRect: o,
|
|
1589
|
-
canSort:
|
|
1590
|
-
fromSortable:
|
|
1597
|
+
canSort: f,
|
|
1598
|
+
fromSortable: m,
|
|
1591
1599
|
target: n,
|
|
1592
|
-
completed:
|
|
1600
|
+
completed: O,
|
|
1593
1601
|
onMove: function(Vt, yi) {
|
|
1594
|
-
return We(P, i,
|
|
1602
|
+
return We(P, i, h, r, Vt, L(Vt), e, yi);
|
|
1595
1603
|
},
|
|
1596
|
-
changed:
|
|
1604
|
+
changed: p
|
|
1597
1605
|
}, bi));
|
|
1598
1606
|
}
|
|
1599
|
-
function
|
|
1600
|
-
|
|
1607
|
+
function V() {
|
|
1608
|
+
D("dragOverAnimationCapture"), _.captureAnimationState(), _ !== m && m.captureAnimationState();
|
|
1601
1609
|
}
|
|
1602
|
-
function
|
|
1603
|
-
return
|
|
1610
|
+
function O(Te) {
|
|
1611
|
+
return D("dragOverCompleted", {
|
|
1604
1612
|
insertion: Te
|
|
1605
|
-
}), Te && (c ? u._hideClone() : u._showClone(
|
|
1606
|
-
|
|
1607
|
-
}),
|
|
1613
|
+
}), Te && (c ? u._hideClone() : u._showClone(_), _ !== m && (Z(h, X ? X.options.ghostClass : u.options.ghostClass, !1), Z(h, a.ghostClass, !0)), X !== _ && _ !== y.active ? X = _ : _ === y.active && X && (X = null), m === _ && (_._ignoreWhileAnimating = n), _.animateAll(function() {
|
|
1614
|
+
D("dragOverAnimationComplete"), _._ignoreWhileAnimating = null;
|
|
1615
|
+
}), _ !== m && (m.animateAll(), m._ignoreWhileAnimating = null)), (n === h && !h.animated || n === i && !n.animated) && (we = null), !a.dragoverBubble && !e.rootEl && n !== document && (h.parentNode[q]._isOutsideThisEl(e.target), !Te && ve(e)), !a.dragoverBubble && e.stopPropagation && e.stopPropagation(), g = !0;
|
|
1608
1616
|
}
|
|
1609
|
-
function
|
|
1610
|
-
Q = ee(
|
|
1611
|
-
sortable:
|
|
1617
|
+
function p() {
|
|
1618
|
+
Q = ee(h), ce = ee(h, a.draggable), K({
|
|
1619
|
+
sortable: _,
|
|
1612
1620
|
name: "change",
|
|
1613
1621
|
toEl: i,
|
|
1614
1622
|
newIndex: Q,
|
|
1615
|
-
newDraggableIndex:
|
|
1623
|
+
newDraggableIndex: ce,
|
|
1616
1624
|
originalEvent: e
|
|
1617
1625
|
});
|
|
1618
1626
|
}
|
|
1619
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ie(n,
|
|
1620
|
-
if (
|
|
1621
|
-
return
|
|
1622
|
-
if (nt = !1, u && !
|
|
1623
|
-
if (
|
|
1627
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ie(n, a.draggable, i, !0), D("dragOver"), y.eventCanceled) return g;
|
|
1628
|
+
if (h.contains(e.target) || n.animated && n.animatingX && n.animatingY || _._ignoreWhileAnimating === n)
|
|
1629
|
+
return O(!1);
|
|
1630
|
+
if (nt = !1, u && !a.disabled && (c ? f || (l = x !== P) : X === this || (this.lastPutMode = Be.checkPull(this, u, h, e)) && s.checkPut(this, u, h, e))) {
|
|
1631
|
+
if (E = this._getDirection(e, n) === "vertical", r = L(h), D("dragOverValid"), y.eventCanceled) return g;
|
|
1624
1632
|
if (l)
|
|
1625
|
-
return
|
|
1626
|
-
var
|
|
1627
|
-
if (!
|
|
1628
|
-
if (
|
|
1629
|
-
return
|
|
1630
|
-
if (
|
|
1631
|
-
return
|
|
1632
|
-
} else if (
|
|
1633
|
-
var
|
|
1634
|
-
if (
|
|
1635
|
-
return
|
|
1636
|
-
if (n =
|
|
1637
|
-
return
|
|
1633
|
+
return x = P, V(), this._hideClone(), D("revert"), y.eventCanceled || (be ? P.insertBefore(h, be) : P.appendChild(h)), O(!0);
|
|
1634
|
+
var d = $t(i, a.draggable);
|
|
1635
|
+
if (!d || Mn(e, E, this) && !d.animated) {
|
|
1636
|
+
if (d === h)
|
|
1637
|
+
return O(!1);
|
|
1638
|
+
if (d && i === e.target && (n = d), n && (o = L(n)), We(P, i, h, r, n, o, e, !!n) !== !1)
|
|
1639
|
+
return V(), d && d.nextSibling ? i.insertBefore(h, d.nextSibling) : i.appendChild(h), x = i, p(), O(!0);
|
|
1640
|
+
} else if (d && $n(e, E, this)) {
|
|
1641
|
+
var A = Ie(i, 0, a, !0);
|
|
1642
|
+
if (A === h)
|
|
1643
|
+
return O(!1);
|
|
1644
|
+
if (n = A, o = L(n), We(P, i, h, r, n, o, e, !1) !== !1)
|
|
1645
|
+
return V(), i.insertBefore(h, A), x = i, p(), O(!0);
|
|
1638
1646
|
} else if (n.parentNode === i) {
|
|
1639
|
-
o =
|
|
1640
|
-
var
|
|
1641
|
-
we !== n && (
|
|
1647
|
+
o = L(n);
|
|
1648
|
+
var Y = 0, v, B = h.parentNode !== i, M = !An(h.animated && h.toRect || r, n.animated && n.toRect || o, E), I = E ? "top" : "left", R = Wt(n, "top", "top") || Wt(h, "top", "top"), N = R ? R.scrollTop : void 0;
|
|
1649
|
+
we !== n && (v = o[I], Re = !1, Ye = !M && a.invertSwap || B), Y = xn(e, n, o, E, M ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, Ye, we === n);
|
|
1642
1650
|
var z;
|
|
1643
|
-
if (
|
|
1644
|
-
var J = ee(
|
|
1651
|
+
if (Y !== 0) {
|
|
1652
|
+
var J = ee(h);
|
|
1645
1653
|
do
|
|
1646
|
-
J -=
|
|
1647
|
-
while (z && (
|
|
1654
|
+
J -= Y, z = x.children[J];
|
|
1655
|
+
while (z && (b(z, "display") === "none" || z === S));
|
|
1648
1656
|
}
|
|
1649
|
-
if (
|
|
1650
|
-
return
|
|
1651
|
-
we = n, Ve =
|
|
1652
|
-
var
|
|
1653
|
-
|
|
1654
|
-
var me = We(P, i,
|
|
1657
|
+
if (Y === 0 || z === n)
|
|
1658
|
+
return O(!1);
|
|
1659
|
+
we = n, Ve = Y;
|
|
1660
|
+
var de = n.nextElementSibling, F = !1;
|
|
1661
|
+
F = Y === 1;
|
|
1662
|
+
var me = We(P, i, h, r, n, o, e, F);
|
|
1655
1663
|
if (me !== !1)
|
|
1656
|
-
return (me === 1 || me === -1) && (
|
|
1664
|
+
return (me === 1 || me === -1) && (F = me === 1), Ot = !0, setTimeout(Nn, 30), V(), F && !de ? i.appendChild(h) : n.parentNode.insertBefore(h, F ? de : n), R && ui(R, 0, N - R.scrollTop), x = h.parentNode, v !== void 0 && !Ye && (Je = Math.abs(v - L(n)[I])), p(), O(!0);
|
|
1657
1665
|
}
|
|
1658
|
-
if (i.contains(
|
|
1659
|
-
return
|
|
1666
|
+
if (i.contains(h))
|
|
1667
|
+
return O(!1);
|
|
1660
1668
|
}
|
|
1661
1669
|
return !1;
|
|
1662
1670
|
},
|
|
1663
1671
|
_ignoreWhileAnimating: null,
|
|
1664
1672
|
_offMoveEvents: function() {
|
|
1665
|
-
|
|
1673
|
+
T(document, "mousemove", this._onTouchMove), T(document, "touchmove", this._onTouchMove), T(document, "pointermove", this._onTouchMove), T(document, "dragover", ve), T(document, "mousemove", ve), T(document, "touchmove", ve);
|
|
1666
1674
|
},
|
|
1667
1675
|
_offUpEvents: function() {
|
|
1668
1676
|
var e = this.el.ownerDocument;
|
|
1669
|
-
|
|
1677
|
+
T(e, "mouseup", this._onDrop), T(e, "touchend", this._onDrop), T(e, "pointerup", this._onDrop), T(e, "pointercancel", this._onDrop), T(e, "touchcancel", this._onDrop), T(document, "selectstart", this);
|
|
1670
1678
|
},
|
|
1671
1679
|
_onDrop: function(e) {
|
|
1672
1680
|
var i = this.el, n = this.options;
|
|
1673
|
-
if (Q = ee(
|
|
1681
|
+
if (Q = ee(h), ce = ee(h, n.draggable), U("drop", this, {
|
|
1674
1682
|
evt: e
|
|
1675
|
-
}),
|
|
1683
|
+
}), x = h && h.parentNode, Q = ee(h), ce = ee(h, n.draggable), y.eventCanceled) {
|
|
1676
1684
|
this._nulling();
|
|
1677
1685
|
return;
|
|
1678
1686
|
}
|
|
1679
|
-
_e = !1, Ye = !1, Re = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), At(this.cloneId), At(this._dragStartId), this.nativeDraggable && (
|
|
1687
|
+
_e = !1, Ye = !1, Re = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), At(this.cloneId), At(this._dragStartId), this.nativeDraggable && (T(document, "drop", this), T(i, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), $e && b(document.body, "user-select", ""), b(h, "transform", ""), e && (Ae && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), S && S.parentNode && S.parentNode.removeChild(S), (P === x || X && X.lastPutMode !== "clone") && $ && $.parentNode && $.parentNode.removeChild($), h && (this.nativeDraggable && T(h, "dragend", this), bt(h), h.style["will-change"] = "", Ae && !_e && Z(h, X ? X.options.ghostClass : this.options.ghostClass, !1), Z(h, this.options.chosenClass, !1), K({
|
|
1680
1688
|
sortable: this,
|
|
1681
1689
|
name: "unchoose",
|
|
1682
|
-
toEl:
|
|
1690
|
+
toEl: x,
|
|
1683
1691
|
newIndex: null,
|
|
1684
1692
|
newDraggableIndex: null,
|
|
1685
1693
|
originalEvent: e
|
|
1686
|
-
}), P !==
|
|
1687
|
-
rootEl:
|
|
1694
|
+
}), P !== x ? (Q >= 0 && (K({
|
|
1695
|
+
rootEl: x,
|
|
1688
1696
|
name: "add",
|
|
1689
|
-
toEl:
|
|
1697
|
+
toEl: x,
|
|
1690
1698
|
fromEl: P,
|
|
1691
1699
|
originalEvent: e
|
|
1692
|
-
}),
|
|
1700
|
+
}), K({
|
|
1693
1701
|
sortable: this,
|
|
1694
1702
|
name: "remove",
|
|
1695
|
-
toEl:
|
|
1703
|
+
toEl: x,
|
|
1696
1704
|
originalEvent: e
|
|
1697
|
-
}),
|
|
1698
|
-
rootEl:
|
|
1705
|
+
}), K({
|
|
1706
|
+
rootEl: x,
|
|
1699
1707
|
name: "sort",
|
|
1700
|
-
toEl:
|
|
1708
|
+
toEl: x,
|
|
1701
1709
|
fromEl: P,
|
|
1702
1710
|
originalEvent: e
|
|
1703
|
-
}),
|
|
1711
|
+
}), K({
|
|
1704
1712
|
sortable: this,
|
|
1705
1713
|
name: "sort",
|
|
1706
|
-
toEl:
|
|
1714
|
+
toEl: x,
|
|
1707
1715
|
originalEvent: e
|
|
1708
|
-
})),
|
|
1716
|
+
})), X && X.save()) : Q !== Ee && Q >= 0 && (K({
|
|
1709
1717
|
sortable: this,
|
|
1710
1718
|
name: "update",
|
|
1711
|
-
toEl:
|
|
1719
|
+
toEl: x,
|
|
1712
1720
|
originalEvent: e
|
|
1713
|
-
}),
|
|
1721
|
+
}), K({
|
|
1714
1722
|
sortable: this,
|
|
1715
1723
|
name: "sort",
|
|
1716
|
-
toEl:
|
|
1724
|
+
toEl: x,
|
|
1717
1725
|
originalEvent: e
|
|
1718
|
-
})),
|
|
1726
|
+
})), y.active && ((Q == null || Q === -1) && (Q = Ee, ce = xe), K({
|
|
1719
1727
|
sortable: this,
|
|
1720
1728
|
name: "end",
|
|
1721
|
-
toEl:
|
|
1729
|
+
toEl: x,
|
|
1722
1730
|
originalEvent: e
|
|
1723
1731
|
}), this.save()))), this._nulling();
|
|
1724
1732
|
},
|
|
1725
1733
|
_nulling: function() {
|
|
1726
|
-
U("nulling", this), P =
|
|
1734
|
+
U("nulling", this), P = h = x = S = be = $ = qe = fe = ge = te = Ae = Q = ce = Ee = xe = we = Ve = X = Be = y.dragged = y.ghost = y.clone = y.active = null, ot.forEach(function(e) {
|
|
1727
1735
|
e.checked = !0;
|
|
1728
1736
|
}), ot.length = mt = gt = 0;
|
|
1729
1737
|
},
|
|
@@ -1735,7 +1743,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1735
1743
|
break;
|
|
1736
1744
|
case "dragenter":
|
|
1737
1745
|
case "dragover":
|
|
1738
|
-
|
|
1746
|
+
h && (this._onDragOver(e), Pn(e));
|
|
1739
1747
|
break;
|
|
1740
1748
|
case "selectstart":
|
|
1741
1749
|
e.preventDefault();
|
|
@@ -1758,8 +1766,8 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1758
1766
|
sort: function(e, i) {
|
|
1759
1767
|
var n = {}, r = this.el;
|
|
1760
1768
|
this.toArray().forEach(function(o, l) {
|
|
1761
|
-
var
|
|
1762
|
-
ie(
|
|
1769
|
+
var a = r.children[l];
|
|
1770
|
+
ie(a, this.options.draggable, r, !1) && (n[o] = a);
|
|
1763
1771
|
}, this), i && this.captureAnimationState(), e.forEach(function(o) {
|
|
1764
1772
|
n[o] && (r.removeChild(n[o]), r.appendChild(n[o]));
|
|
1765
1773
|
}), i && this.animateAll();
|
|
@@ -1799,14 +1807,14 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1799
1807
|
destroy: function() {
|
|
1800
1808
|
U("destroy", this);
|
|
1801
1809
|
var e = this.el;
|
|
1802
|
-
e[q] = null,
|
|
1810
|
+
e[q] = null, T(e, "mousedown", this._onTapStart), T(e, "touchstart", this._onTapStart), T(e, "pointerdown", this._onTapStart), this.nativeDraggable && (T(e, "dragover", this), T(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(i) {
|
|
1803
1811
|
i.removeAttribute("draggable");
|
|
1804
1812
|
}), this._onDrop(), this._disableDelayedDragEvents(), rt.splice(rt.indexOf(this.el), 1), this.el = e = null;
|
|
1805
1813
|
},
|
|
1806
1814
|
_hideClone: function() {
|
|
1807
1815
|
if (!fe) {
|
|
1808
|
-
if (U("hideClone", this),
|
|
1809
|
-
|
|
1816
|
+
if (U("hideClone", this), y.eventCanceled) return;
|
|
1817
|
+
b($, "display", "none"), this.options.removeCloneOnHide && $.parentNode && $.parentNode.removeChild($), fe = !0;
|
|
1810
1818
|
}
|
|
1811
1819
|
},
|
|
1812
1820
|
_showClone: function(e) {
|
|
@@ -1815,20 +1823,20 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1815
1823
|
return;
|
|
1816
1824
|
}
|
|
1817
1825
|
if (fe) {
|
|
1818
|
-
if (U("showClone", this),
|
|
1819
|
-
|
|
1826
|
+
if (U("showClone", this), y.eventCanceled) return;
|
|
1827
|
+
h.parentNode == P && !this.options.group.revertClone ? P.insertBefore($, h) : be ? P.insertBefore($, be) : P.appendChild($), this.options.group.revertClone && this.animate(h, $), b($, "display", ""), fe = !1;
|
|
1820
1828
|
}
|
|
1821
1829
|
}
|
|
1822
1830
|
};
|
|
1823
1831
|
function Pn(t) {
|
|
1824
1832
|
t.dataTransfer && (t.dataTransfer.dropEffect = "move"), t.cancelable && t.preventDefault();
|
|
1825
1833
|
}
|
|
1826
|
-
function We(t, e, i, n, r, o, l,
|
|
1827
|
-
var
|
|
1828
|
-
return window.CustomEvent && !
|
|
1834
|
+
function We(t, e, i, n, r, o, l, a) {
|
|
1835
|
+
var s, u = t[q], c = u.options.onMove, f;
|
|
1836
|
+
return window.CustomEvent && !ue && !Fe ? s = new CustomEvent("move", {
|
|
1829
1837
|
bubbles: !0,
|
|
1830
1838
|
cancelable: !0
|
|
1831
|
-
}) : (
|
|
1839
|
+
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = e, s.from = t, s.dragged = i, s.draggedRect = n, s.related = r || e, s.relatedRect = o || L(e), s.willInsertAfter = a, s.originalEvent = l, t.dispatchEvent(s), c && (f = c.call(u, s, l)), f;
|
|
1832
1840
|
}
|
|
1833
1841
|
function bt(t) {
|
|
1834
1842
|
t.draggable = !1;
|
|
@@ -1837,28 +1845,28 @@ function Nn() {
|
|
|
1837
1845
|
Ot = !1;
|
|
1838
1846
|
}
|
|
1839
1847
|
function $n(t, e, i) {
|
|
1840
|
-
var n =
|
|
1848
|
+
var n = L(Ie(i.el, 0, i.options, !0)), r = ci(i.el, i.options, S), o = 10;
|
|
1841
1849
|
return e ? t.clientX < r.left - o || t.clientY < n.top && t.clientX < n.right : t.clientY < r.top - o || t.clientY < n.bottom && t.clientX < n.left;
|
|
1842
1850
|
}
|
|
1843
1851
|
function Mn(t, e, i) {
|
|
1844
|
-
var n =
|
|
1852
|
+
var n = L($t(i.el, i.options.draggable)), r = ci(i.el, i.options, S), o = 10;
|
|
1845
1853
|
return e ? t.clientX > r.right + o || t.clientY > n.bottom && t.clientX > n.left : t.clientY > r.bottom + o || t.clientX > n.right && t.clientY > n.top;
|
|
1846
1854
|
}
|
|
1847
|
-
function xn(t, e, i, n, r, o, l,
|
|
1848
|
-
var
|
|
1855
|
+
function xn(t, e, i, n, r, o, l, a) {
|
|
1856
|
+
var s = n ? t.clientY : t.clientX, u = n ? i.height : i.width, c = n ? i.top : i.left, f = n ? i.bottom : i.right, m = !1;
|
|
1849
1857
|
if (!l) {
|
|
1850
|
-
if (
|
|
1851
|
-
if (!Re && (Ve === 1 ?
|
|
1852
|
-
|
|
1853
|
-
else if (Ve === 1 ?
|
|
1858
|
+
if (a && Je < u * r) {
|
|
1859
|
+
if (!Re && (Ve === 1 ? s > c + u * o / 2 : s < f - u * o / 2) && (Re = !0), Re)
|
|
1860
|
+
m = !0;
|
|
1861
|
+
else if (Ve === 1 ? s < c + Je : s > f - Je)
|
|
1854
1862
|
return -Ve;
|
|
1855
|
-
} else if (
|
|
1863
|
+
} else if (s > c + u * (1 - r) / 2 && s < f - u * (1 - r) / 2)
|
|
1856
1864
|
return Vn(e);
|
|
1857
1865
|
}
|
|
1858
|
-
return
|
|
1866
|
+
return m = m || l, m && (s < c + u * o / 2 || s > f - u * o / 2) ? s > c + u / 2 ? 1 : -1 : 0;
|
|
1859
1867
|
}
|
|
1860
1868
|
function Vn(t) {
|
|
1861
|
-
return ee(
|
|
1869
|
+
return ee(h) < ee(t) ? 1 : -1;
|
|
1862
1870
|
}
|
|
1863
1871
|
function Rn(t) {
|
|
1864
1872
|
for (var e = t.tagName + t.className + t.src + t.href + t.textContent, i = e.length, n = 0; i--; )
|
|
@@ -1878,13 +1886,13 @@ function Ze(t) {
|
|
|
1878
1886
|
function At(t) {
|
|
1879
1887
|
return clearTimeout(t);
|
|
1880
1888
|
}
|
|
1881
|
-
st &&
|
|
1882
|
-
(
|
|
1889
|
+
st && C(document, "touchmove", function(t) {
|
|
1890
|
+
(y.active || _e) && t.cancelable && t.preventDefault();
|
|
1883
1891
|
});
|
|
1884
|
-
|
|
1885
|
-
on:
|
|
1886
|
-
off:
|
|
1887
|
-
css:
|
|
1892
|
+
y.utils = {
|
|
1893
|
+
on: C,
|
|
1894
|
+
off: T,
|
|
1895
|
+
css: b,
|
|
1888
1896
|
find: ai,
|
|
1889
1897
|
is: function(e, i) {
|
|
1890
1898
|
return !!ie(e, i, e, !1);
|
|
@@ -1893,7 +1901,7 @@ b.utils = {
|
|
|
1893
1901
|
throttle: si,
|
|
1894
1902
|
closest: ie,
|
|
1895
1903
|
toggleClass: Z,
|
|
1896
|
-
clone:
|
|
1904
|
+
clone: di,
|
|
1897
1905
|
index: ee,
|
|
1898
1906
|
nextTick: Ze,
|
|
1899
1907
|
cancelNextTick: At,
|
|
@@ -1901,23 +1909,23 @@ b.utils = {
|
|
|
1901
1909
|
getChild: Ie,
|
|
1902
1910
|
expando: q
|
|
1903
1911
|
};
|
|
1904
|
-
|
|
1912
|
+
y.get = function(t) {
|
|
1905
1913
|
return t[q];
|
|
1906
1914
|
};
|
|
1907
|
-
|
|
1915
|
+
y.mount = function() {
|
|
1908
1916
|
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++)
|
|
1909
1917
|
e[i] = arguments[i];
|
|
1910
1918
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(n) {
|
|
1911
1919
|
if (!n.prototype || !n.prototype.constructor)
|
|
1912
1920
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
1913
|
-
n.utils && (
|
|
1921
|
+
n.utils && (y.utils = re(re({}, y.utils), n.utils)), He.mount(n);
|
|
1914
1922
|
});
|
|
1915
1923
|
};
|
|
1916
|
-
|
|
1917
|
-
return new
|
|
1924
|
+
y.create = function(t, e) {
|
|
1925
|
+
return new y(t, e);
|
|
1918
1926
|
};
|
|
1919
|
-
|
|
1920
|
-
var
|
|
1927
|
+
y.version = yn;
|
|
1928
|
+
var H = [], ze, zt, kt = !1, yt, wt, lt, ke;
|
|
1921
1929
|
function Hn() {
|
|
1922
1930
|
function t() {
|
|
1923
1931
|
this.defaults = {
|
|
@@ -1933,80 +1941,80 @@ function Hn() {
|
|
|
1933
1941
|
return t.prototype = {
|
|
1934
1942
|
dragStarted: function(i) {
|
|
1935
1943
|
var n = i.originalEvent;
|
|
1936
|
-
this.sortable.nativeDraggable ?
|
|
1944
|
+
this.sortable.nativeDraggable ? C(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? C(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? C(document, "touchmove", this._handleFallbackAutoScroll) : C(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1937
1945
|
},
|
|
1938
1946
|
dragOverCompleted: function(i) {
|
|
1939
1947
|
var n = i.originalEvent;
|
|
1940
1948
|
!this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
|
|
1941
1949
|
},
|
|
1942
1950
|
drop: function() {
|
|
1943
|
-
this.sortable.nativeDraggable ?
|
|
1951
|
+
this.sortable.nativeDraggable ? T(document, "dragover", this._handleAutoScroll) : (T(document, "pointermove", this._handleFallbackAutoScroll), T(document, "touchmove", this._handleFallbackAutoScroll), T(document, "mousemove", this._handleFallbackAutoScroll)), qt(), Qe(), _n();
|
|
1944
1952
|
},
|
|
1945
1953
|
nulling: function() {
|
|
1946
|
-
lt = zt = ze = kt = ke = yt = wt = null,
|
|
1954
|
+
lt = zt = ze = kt = ke = yt = wt = null, H.length = 0;
|
|
1947
1955
|
},
|
|
1948
1956
|
_handleFallbackAutoScroll: function(i) {
|
|
1949
1957
|
this._handleAutoScroll(i, !0);
|
|
1950
1958
|
},
|
|
1951
1959
|
_handleAutoScroll: function(i, n) {
|
|
1952
|
-
var r = this, o = (i.touches ? i.touches[0] : i).clientX, l = (i.touches ? i.touches[0] : i).clientY,
|
|
1953
|
-
if (lt = i, n || this.options.forceAutoScrollFallback || Fe ||
|
|
1954
|
-
St(i, this.options,
|
|
1955
|
-
var
|
|
1960
|
+
var r = this, o = (i.touches ? i.touches[0] : i).clientX, l = (i.touches ? i.touches[0] : i).clientY, a = document.elementFromPoint(o, l);
|
|
1961
|
+
if (lt = i, n || this.options.forceAutoScrollFallback || Fe || ue || $e) {
|
|
1962
|
+
St(i, this.options, a, n);
|
|
1963
|
+
var s = pe(a, !0);
|
|
1956
1964
|
kt && (!ke || o !== yt || l !== wt) && (ke && qt(), ke = setInterval(function() {
|
|
1957
1965
|
var u = pe(document.elementFromPoint(o, l), !0);
|
|
1958
|
-
u !==
|
|
1966
|
+
u !== s && (s = u, Qe()), St(i, r.options, u, n);
|
|
1959
1967
|
}, 10), yt = o, wt = l);
|
|
1960
1968
|
} else {
|
|
1961
|
-
if (!this.options.bubbleScroll || pe(
|
|
1969
|
+
if (!this.options.bubbleScroll || pe(a, !0) === ne()) {
|
|
1962
1970
|
Qe();
|
|
1963
1971
|
return;
|
|
1964
1972
|
}
|
|
1965
|
-
St(i, this.options, pe(
|
|
1973
|
+
St(i, this.options, pe(a, !1), !1);
|
|
1966
1974
|
}
|
|
1967
1975
|
}
|
|
1968
|
-
},
|
|
1976
|
+
}, se(t, {
|
|
1969
1977
|
pluginName: "scroll",
|
|
1970
1978
|
initializeByDefault: !0
|
|
1971
1979
|
});
|
|
1972
1980
|
}
|
|
1973
1981
|
function Qe() {
|
|
1974
|
-
|
|
1982
|
+
H.forEach(function(t) {
|
|
1975
1983
|
clearInterval(t.pid);
|
|
1976
|
-
}),
|
|
1984
|
+
}), H = [];
|
|
1977
1985
|
}
|
|
1978
1986
|
function qt() {
|
|
1979
1987
|
clearInterval(ke);
|
|
1980
1988
|
}
|
|
1981
1989
|
var St = si(function(t, e, i, n) {
|
|
1982
1990
|
if (e.scroll) {
|
|
1983
|
-
var r = (t.touches ? t.touches[0] : t).clientX, o = (t.touches ? t.touches[0] : t).clientY, l = e.scrollSensitivity,
|
|
1991
|
+
var r = (t.touches ? t.touches[0] : t).clientX, o = (t.touches ? t.touches[0] : t).clientY, l = e.scrollSensitivity, a = e.scrollSpeed, s = ne(), u = !1, c;
|
|
1984
1992
|
zt !== i && (zt = i, Qe(), ze = e.scroll, c = e.scrollFn, ze === !0 && (ze = pe(i, !0)));
|
|
1985
|
-
var
|
|
1993
|
+
var f = 0, m = ze;
|
|
1986
1994
|
do {
|
|
1987
|
-
var
|
|
1988
|
-
|
|
1989
|
-
var N =
|
|
1990
|
-
if (!
|
|
1991
|
-
for (var J = 0; J <=
|
|
1992
|
-
|
|
1993
|
-
(
|
|
1994
|
-
n && this.layer === 0 &&
|
|
1995
|
-
var
|
|
1996
|
-
typeof c == "function" && c.call(
|
|
1995
|
+
var E = m, _ = L(E), g = _.top, D = _.bottom, V = _.left, O = _.right, p = _.width, d = _.height, A = void 0, Y = void 0, v = E.scrollWidth, B = E.scrollHeight, M = b(E), I = E.scrollLeft, R = E.scrollTop;
|
|
1996
|
+
E === s ? (A = p < v && (M.overflowX === "auto" || M.overflowX === "scroll" || M.overflowX === "visible"), Y = d < B && (M.overflowY === "auto" || M.overflowY === "scroll" || M.overflowY === "visible")) : (A = p < v && (M.overflowX === "auto" || M.overflowX === "scroll"), Y = d < B && (M.overflowY === "auto" || M.overflowY === "scroll"));
|
|
1997
|
+
var N = A && (Math.abs(O - r) <= l && I + p < v) - (Math.abs(V - r) <= l && !!I), z = Y && (Math.abs(D - o) <= l && R + d < B) - (Math.abs(g - o) <= l && !!R);
|
|
1998
|
+
if (!H[f])
|
|
1999
|
+
for (var J = 0; J <= f; J++)
|
|
2000
|
+
H[J] || (H[J] = {});
|
|
2001
|
+
(H[f].vx != N || H[f].vy != z || H[f].el !== E) && (H[f].el = E, H[f].vx = N, H[f].vy = z, clearInterval(H[f].pid), (N != 0 || z != 0) && (u = !0, H[f].pid = setInterval((function() {
|
|
2002
|
+
n && this.layer === 0 && y.active._onTouchMove(lt);
|
|
2003
|
+
var de = H[this.layer].vy ? H[this.layer].vy * a : 0, F = H[this.layer].vx ? H[this.layer].vx * a : 0;
|
|
2004
|
+
typeof c == "function" && c.call(y.dragged.parentNode[q], F, de, t, lt, H[this.layer].el) !== "continue" || ui(H[this.layer].el, F, de);
|
|
1997
2005
|
}).bind({
|
|
1998
|
-
layer:
|
|
1999
|
-
}), 24))),
|
|
2000
|
-
} while (e.bubbleScroll &&
|
|
2006
|
+
layer: f
|
|
2007
|
+
}), 24))), f++;
|
|
2008
|
+
} while (e.bubbleScroll && m !== s && (m = pe(m, !1)));
|
|
2001
2009
|
kt = u;
|
|
2002
2010
|
}
|
|
2003
2011
|
}, 30), vi = function(e) {
|
|
2004
|
-
var i = e.originalEvent, n = e.putSortable, r = e.dragEl, o = e.activeSortable, l = e.dispatchSortableEvent,
|
|
2012
|
+
var i = e.originalEvent, n = e.putSortable, r = e.dragEl, o = e.activeSortable, l = e.dispatchSortableEvent, a = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
2005
2013
|
if (i) {
|
|
2006
2014
|
var u = n || o;
|
|
2007
|
-
|
|
2008
|
-
var c = i.changedTouches && i.changedTouches.length ? i.changedTouches[0] : i,
|
|
2009
|
-
|
|
2015
|
+
a();
|
|
2016
|
+
var c = i.changedTouches && i.changedTouches.length ? i.changedTouches[0] : i, f = document.elementFromPoint(c.clientX, c.clientY);
|
|
2017
|
+
s(), u && !u.el.contains(f) && (l("spill"), this.onSpill({
|
|
2010
2018
|
dragEl: r,
|
|
2011
2019
|
putSortable: n
|
|
2012
2020
|
}));
|
|
@@ -2028,7 +2036,7 @@ Mt.prototype = {
|
|
|
2028
2036
|
},
|
|
2029
2037
|
drop: vi
|
|
2030
2038
|
};
|
|
2031
|
-
|
|
2039
|
+
se(Mt, {
|
|
2032
2040
|
pluginName: "revertOnSpill"
|
|
2033
2041
|
});
|
|
2034
2042
|
function xt() {
|
|
@@ -2040,11 +2048,11 @@ xt.prototype = {
|
|
|
2040
2048
|
},
|
|
2041
2049
|
drop: vi
|
|
2042
2050
|
};
|
|
2043
|
-
|
|
2051
|
+
se(xt, {
|
|
2044
2052
|
pluginName: "removeOnSpill"
|
|
2045
2053
|
});
|
|
2046
|
-
|
|
2047
|
-
|
|
2054
|
+
y.mount(new Hn());
|
|
2055
|
+
y.mount(xt, Mt);
|
|
2048
2056
|
const Ln = (t, e, i, n) => {
|
|
2049
2057
|
const r = Qt(t, "dragSort");
|
|
2050
2058
|
let o = null, l = Pe(0);
|
|
@@ -2052,7 +2060,7 @@ const Ln = (t, e, i, n) => {
|
|
|
2052
2060
|
r,
|
|
2053
2061
|
(u) => {
|
|
2054
2062
|
et(() => {
|
|
2055
|
-
u ?
|
|
2063
|
+
u ? a() : s();
|
|
2056
2064
|
});
|
|
2057
2065
|
},
|
|
2058
2066
|
{
|
|
@@ -2060,25 +2068,26 @@ const Ln = (t, e, i, n) => {
|
|
|
2060
2068
|
}
|
|
2061
2069
|
), Ft(n, (u, c) => {
|
|
2062
2070
|
et(() => {
|
|
2063
|
-
r.value ?
|
|
2071
|
+
r.value ? a() : s();
|
|
2064
2072
|
});
|
|
2065
2073
|
});
|
|
2066
|
-
const
|
|
2074
|
+
const a = () => {
|
|
2067
2075
|
const u = i.value;
|
|
2068
|
-
u.style.cursor = "move", o =
|
|
2076
|
+
u.style.cursor = "move", o = y.create(u, {
|
|
2069
2077
|
draggable: ".selected-item.enable",
|
|
2070
2078
|
//指定样式类的元素才允许拖动
|
|
2079
|
+
filter: ".selected-item.disableDrag",
|
|
2071
2080
|
animation: 300,
|
|
2072
2081
|
//过渡动画时间
|
|
2073
2082
|
//拖拽结束时事件
|
|
2074
2083
|
onEnd: (c) => {
|
|
2075
|
-
const
|
|
2076
|
-
|
|
2077
|
-
const
|
|
2078
|
-
|
|
2084
|
+
const f = JSON.parse(JSON.stringify(n.value)), m = JSON.parse(JSON.stringify(n.value));
|
|
2085
|
+
m.splice(c.oldIndex, 1)[0];
|
|
2086
|
+
const E = f[c.oldIndex];
|
|
2087
|
+
m.splice(c.newIndex, 0, E), e("update:modelValue", m), l.value = Date.now(), e("sortEnd", f, m, c.oldIndex, c.newIndex);
|
|
2079
2088
|
}
|
|
2080
2089
|
});
|
|
2081
|
-
},
|
|
2090
|
+
}, s = () => {
|
|
2082
2091
|
const u = i.value;
|
|
2083
2092
|
u.style.cursor = "default", o == null || o.option("disabled", !0);
|
|
2084
2093
|
};
|
|
@@ -2102,7 +2111,11 @@ const Ln = (t, e, i, n) => {
|
|
|
2102
2111
|
clearable: { type: Boolean, default: !0 },
|
|
2103
2112
|
customTitle: { default: "" },
|
|
2104
2113
|
selectedNum: {},
|
|
2105
|
-
props: { default: {
|
|
2114
|
+
props: { default: {
|
|
2115
|
+
disabled: "disabled",
|
|
2116
|
+
disableDrag: "disableDrag",
|
|
2117
|
+
disableDelete: "disableDelete"
|
|
2118
|
+
} },
|
|
2106
2119
|
virtual: { type: Boolean, default: !0 },
|
|
2107
2120
|
itemHeight: { default: 32 },
|
|
2108
2121
|
infiniteScroll: {},
|
|
@@ -2112,116 +2125,119 @@ const Ln = (t, e, i, n) => {
|
|
|
2112
2125
|
emits: ["update:modelValue", "update:selectdValue", "select-item", "item-remove", "remove-all", "sortEnd", "update:infiniteDisabled"],
|
|
2113
2126
|
setup(t, { expose: e, emit: i }) {
|
|
2114
2127
|
xi((d) => ({
|
|
2115
|
-
|
|
2128
|
+
f8f17bb8: o.value
|
|
2116
2129
|
}));
|
|
2117
2130
|
const n = t, r = i, o = Ne(() => n.itemHeight + "px"), l = Ne(() => n.dragSort || n.infiniteScroll ? !1 : n.virtual), {
|
|
2118
|
-
selectListRef:
|
|
2119
|
-
$list:
|
|
2131
|
+
selectListRef: a,
|
|
2132
|
+
$list: s,
|
|
2120
2133
|
disabledFlag: u,
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2134
|
+
disabledDrag: c,
|
|
2135
|
+
disableDelete: f,
|
|
2136
|
+
itemGroups: m,
|
|
2137
|
+
selectedLabel: E,
|
|
2138
|
+
itemRemove: _,
|
|
2139
|
+
removeAll: g,
|
|
2140
|
+
innerSelectdValue: D,
|
|
2141
|
+
selectItem: V,
|
|
2142
|
+
infiniteLoad: O
|
|
2128
2143
|
} = mn(n, r);
|
|
2129
|
-
Ln(n, r,
|
|
2130
|
-
const
|
|
2144
|
+
Ln(n, r, s, m);
|
|
2145
|
+
const p = Pe(!0);
|
|
2131
2146
|
return Zt(() => {
|
|
2132
|
-
|
|
2133
|
-
|
|
2147
|
+
p.value = !1, setTimeout(() => {
|
|
2148
|
+
p.value = !0;
|
|
2134
2149
|
}, 300);
|
|
2135
2150
|
}), e({
|
|
2136
|
-
infiniteLoad:
|
|
2137
|
-
}), (d,
|
|
2138
|
-
const
|
|
2139
|
-
return k(),
|
|
2151
|
+
infiniteLoad: O
|
|
2152
|
+
}), (d, A) => {
|
|
2153
|
+
const Y = Ei;
|
|
2154
|
+
return k(), W(
|
|
2140
2155
|
"div",
|
|
2141
2156
|
{
|
|
2142
2157
|
ref_key: "selectListRef",
|
|
2143
|
-
ref:
|
|
2158
|
+
ref: a,
|
|
2144
2159
|
class: "das-ui-select-list",
|
|
2145
2160
|
style: Jt({ width: d.width, height: d.height, ...d.customStyle })
|
|
2146
2161
|
},
|
|
2147
2162
|
[
|
|
2148
2163
|
he(d.$slots, "header", {}, () => [
|
|
2149
|
-
d.hideHeader ?
|
|
2164
|
+
d.hideHeader ? G("v-if", !0) : (k(), W("div", Bn, [
|
|
2150
2165
|
Ce(
|
|
2151
2166
|
"div",
|
|
2152
2167
|
Yn,
|
|
2153
|
-
Oe(
|
|
2168
|
+
Oe(w(E)),
|
|
2154
2169
|
1
|
|
2155
2170
|
/* TEXT */
|
|
2156
2171
|
),
|
|
2157
|
-
!d.isView && d.clearable ? (k(),
|
|
2172
|
+
!d.isView && d.clearable ? (k(), le(w(Vi), {
|
|
2158
2173
|
key: 0,
|
|
2159
2174
|
"btn-type": "primary-text",
|
|
2160
2175
|
block: "",
|
|
2161
|
-
onClick:
|
|
2162
|
-
disabled: !
|
|
2176
|
+
onClick: w(g),
|
|
2177
|
+
disabled: !w(m) || !w(m).length
|
|
2163
2178
|
}, {
|
|
2164
2179
|
default: tt(() => [
|
|
2165
2180
|
Le(
|
|
2166
|
-
Oe(
|
|
2181
|
+
Oe(w(je)("das-select-list-removeAll").value),
|
|
2167
2182
|
1
|
|
2168
2183
|
/* TEXT */
|
|
2169
2184
|
)
|
|
2170
2185
|
]),
|
|
2171
2186
|
_: 1
|
|
2172
2187
|
/* STABLE */
|
|
2173
|
-
}, 8, ["onClick", "disabled"])) :
|
|
2188
|
+
}, 8, ["onClick", "disabled"])) : G("v-if", !0)
|
|
2174
2189
|
]))
|
|
2175
2190
|
], !0),
|
|
2176
|
-
|
|
2177
|
-
!d.infiniteScroll && !l.value ? Se((k(),
|
|
2191
|
+
G(" 普通 "),
|
|
2192
|
+
!d.infiniteScroll && !l.value ? Se((k(), W(
|
|
2178
2193
|
"div",
|
|
2179
2194
|
{
|
|
2180
2195
|
key: 0,
|
|
2181
2196
|
ref_key: "$list",
|
|
2182
|
-
ref:
|
|
2183
|
-
class:
|
|
2197
|
+
ref: s,
|
|
2198
|
+
class: oe(["selected-container", { "hide-header": d.hideHeader }])
|
|
2184
2199
|
},
|
|
2185
2200
|
[
|
|
2186
|
-
(k(!0),
|
|
2201
|
+
(k(!0), W(
|
|
2187
2202
|
_t,
|
|
2188
2203
|
null,
|
|
2189
|
-
Et(
|
|
2190
|
-
class:
|
|
2204
|
+
Et(w(m), (v, B) => (k(), W("div", {
|
|
2205
|
+
class: oe({
|
|
2191
2206
|
"selected-item": !0,
|
|
2192
|
-
disabled: !d.isView &&
|
|
2193
|
-
enable: !d.isView && !
|
|
2194
|
-
|
|
2207
|
+
disabled: !d.isView && w(u)(v),
|
|
2208
|
+
enable: !d.isView && !w(u)(v),
|
|
2209
|
+
disableDrag: !d.isView && w(c)(v),
|
|
2210
|
+
active: w(D) === v[d.valueKey]
|
|
2195
2211
|
}),
|
|
2196
|
-
key:
|
|
2197
|
-
onClick: (
|
|
2212
|
+
key: v[d.valueKey] + B,
|
|
2213
|
+
onClick: (M) => w(V)(v)
|
|
2198
2214
|
}, [
|
|
2199
|
-
d.dragSort ? (k(),
|
|
2215
|
+
d.dragSort ? (k(), le(w(Fi), {
|
|
2200
2216
|
key: 0,
|
|
2201
|
-
class: "drag-icon",
|
|
2217
|
+
class: oe({ "drag-icon": !0, "hide-drag-icon": w(c)(v) }),
|
|
2202
2218
|
size: "medium",
|
|
2203
2219
|
style: { "margin-right": "8px" }
|
|
2204
|
-
})) :
|
|
2220
|
+
}, null, 8, ["class"])) : G("v-if", !0),
|
|
2205
2221
|
Ce("div", Wn, [
|
|
2206
|
-
he(d.$slots, "default", { item:
|
|
2207
|
-
Se((k(),
|
|
2222
|
+
he(d.$slots, "default", { item: v }, () => [
|
|
2223
|
+
Se((k(), W("div", null, [
|
|
2208
2224
|
Le(
|
|
2209
|
-
Oe(
|
|
2225
|
+
Oe(v[d.labelKey]),
|
|
2210
2226
|
1
|
|
2211
2227
|
/* TEXT */
|
|
2212
2228
|
)
|
|
2213
2229
|
])), [
|
|
2214
|
-
[
|
|
2230
|
+
[w(dt)]
|
|
2215
2231
|
])
|
|
2216
2232
|
], !0)
|
|
2217
2233
|
]),
|
|
2218
|
-
!d.isView && d.closeable ? (k(),
|
|
2234
|
+
!d.isView && d.closeable && !w(f)(v) ? (k(), le(w(ct), {
|
|
2219
2235
|
key: 1,
|
|
2220
2236
|
size: "small",
|
|
2221
2237
|
class: "close-icon",
|
|
2222
|
-
"icon-color":
|
|
2223
|
-
onClick: (
|
|
2224
|
-
}, null, 8, ["icon-color", "onClick"])) :
|
|
2238
|
+
"icon-color": w(ut)("--das-ui-color-secondary"),
|
|
2239
|
+
onClick: (M) => w(_)(v)
|
|
2240
|
+
}, null, 8, ["icon-color", "onClick"])) : G("v-if", !0)
|
|
2225
2241
|
], 10, Xn))),
|
|
2226
2242
|
128
|
|
2227
2243
|
/* KEYED_FRAGMENT */
|
|
@@ -2230,116 +2246,116 @@ const Ln = (t, e, i, n) => {
|
|
|
2230
2246
|
2
|
|
2231
2247
|
/* CLASS */
|
|
2232
2248
|
)), [
|
|
2233
|
-
[
|
|
2234
|
-
]) :
|
|
2235
|
-
|
|
2236
|
-
!d.dragSort && l.value ? (k(),
|
|
2249
|
+
[w(Ri), { usePrevOverlay: !0 }]
|
|
2250
|
+
]) : G("v-if", !0),
|
|
2251
|
+
G(" 虚拟滚动 "),
|
|
2252
|
+
!d.dragSort && l.value ? (k(), W(
|
|
2237
2253
|
"div",
|
|
2238
2254
|
{
|
|
2239
2255
|
key: 1,
|
|
2240
2256
|
ref_key: "$list",
|
|
2241
|
-
ref:
|
|
2242
|
-
class:
|
|
2257
|
+
ref: s,
|
|
2258
|
+
class: oe(["selected-container", { "hide-header": d.hideHeader }])
|
|
2243
2259
|
},
|
|
2244
2260
|
[
|
|
2245
|
-
|
|
2246
|
-
key:
|
|
2247
|
-
items:
|
|
2261
|
+
p.value && w(m).length > 0 ? (k(), le(w(Pt), {
|
|
2262
|
+
key: w(m).length,
|
|
2263
|
+
items: w(m),
|
|
2248
2264
|
"item-size": d.itemHeight,
|
|
2249
2265
|
"key-field": d.valueKey,
|
|
2250
2266
|
class: "virtual-list"
|
|
2251
2267
|
}, {
|
|
2252
|
-
default: tt(({ item:
|
|
2253
|
-
(k(),
|
|
2254
|
-
class:
|
|
2268
|
+
default: tt(({ item: v, index: B }) => [
|
|
2269
|
+
(k(), W("div", {
|
|
2270
|
+
class: oe({
|
|
2255
2271
|
"selected-item": !0,
|
|
2256
|
-
disabled: !d.isView &&
|
|
2257
|
-
enable: !d.isView && !
|
|
2258
|
-
active: D
|
|
2272
|
+
disabled: !d.isView && w(u)(v),
|
|
2273
|
+
enable: !d.isView && !w(u)(v),
|
|
2274
|
+
active: w(D) === v[d.valueKey]
|
|
2259
2275
|
}),
|
|
2260
|
-
key:
|
|
2261
|
-
onClick: (
|
|
2276
|
+
key: v[d.valueKey],
|
|
2277
|
+
onClick: (M) => w(V)(v)
|
|
2262
2278
|
}, [
|
|
2263
2279
|
Ce("div", Kn, [
|
|
2264
|
-
he(d.$slots, "default", { item:
|
|
2265
|
-
Se((k(),
|
|
2280
|
+
he(d.$slots, "default", { item: v }, () => [
|
|
2281
|
+
Se((k(), W("div", null, [
|
|
2266
2282
|
Le(
|
|
2267
|
-
Oe(
|
|
2283
|
+
Oe(v[d.labelKey]),
|
|
2268
2284
|
1
|
|
2269
2285
|
/* TEXT */
|
|
2270
2286
|
)
|
|
2271
2287
|
])), [
|
|
2272
|
-
[
|
|
2288
|
+
[w(dt)]
|
|
2273
2289
|
])
|
|
2274
2290
|
], !0)
|
|
2275
2291
|
]),
|
|
2276
|
-
!d.isView && d.closeable ? (k(),
|
|
2292
|
+
!d.isView && d.closeable && !w(f)(v) ? (k(), le(w(ct), {
|
|
2277
2293
|
key: 0,
|
|
2278
2294
|
size: "small",
|
|
2279
2295
|
class: "close-icon",
|
|
2280
|
-
"icon-color":
|
|
2281
|
-
onClick: (
|
|
2282
|
-
}, null, 8, ["icon-color", "onClick"])) :
|
|
2296
|
+
"icon-color": w(ut)("--das-ui-color-secondary"),
|
|
2297
|
+
onClick: (M) => w(_)(v)
|
|
2298
|
+
}, null, 8, ["icon-color", "onClick"])) : G("v-if", !0)
|
|
2283
2299
|
], 10, jn))
|
|
2284
2300
|
]),
|
|
2285
2301
|
_: 3
|
|
2286
2302
|
/* FORWARDED */
|
|
2287
|
-
}, 8, ["items", "item-size", "key-field"])) :
|
|
2303
|
+
}, 8, ["items", "item-size", "key-field"])) : G("v-if", !0)
|
|
2288
2304
|
],
|
|
2289
2305
|
2
|
|
2290
2306
|
/* CLASS */
|
|
2291
|
-
)) :
|
|
2292
|
-
|
|
2293
|
-
!d.dragSort && d.infiniteScroll ? Se((k(),
|
|
2307
|
+
)) : G("v-if", !0),
|
|
2308
|
+
G(" 分页加载 "),
|
|
2309
|
+
!d.dragSort && d.infiniteScroll ? Se((k(), W("div", {
|
|
2294
2310
|
key: 2,
|
|
2295
2311
|
ref_key: "$list",
|
|
2296
|
-
ref:
|
|
2297
|
-
class:
|
|
2312
|
+
ref: s,
|
|
2313
|
+
class: oe(["selected-container selected-page-container", { "hide-header": d.hideHeader }]),
|
|
2298
2314
|
"infinite-scroll-disabled": d.infiniteDisabled,
|
|
2299
2315
|
style: { overflow: "overlay" }
|
|
2300
2316
|
}, [
|
|
2301
2317
|
Ce("div", Un, [
|
|
2302
|
-
(k(!0),
|
|
2318
|
+
(k(!0), W(
|
|
2303
2319
|
_t,
|
|
2304
2320
|
null,
|
|
2305
|
-
Et(
|
|
2306
|
-
class:
|
|
2321
|
+
Et(w(m), (v) => (k(), W("div", {
|
|
2322
|
+
class: oe({
|
|
2307
2323
|
"selected-item": !0,
|
|
2308
|
-
disabled: !d.isView &&
|
|
2309
|
-
enable: !d.isView && !
|
|
2310
|
-
active: D
|
|
2324
|
+
disabled: !d.isView && w(u)(v),
|
|
2325
|
+
enable: !d.isView && !w(u)(v),
|
|
2326
|
+
active: w(D) === v[d.valueKey]
|
|
2311
2327
|
}),
|
|
2312
|
-
key:
|
|
2313
|
-
onClick: (
|
|
2328
|
+
key: v[d.valueKey],
|
|
2329
|
+
onClick: (B) => w(V)(v)
|
|
2314
2330
|
}, [
|
|
2315
2331
|
Ce("div", Jn, [
|
|
2316
|
-
he(d.$slots, "default", { item:
|
|
2317
|
-
Se((k(),
|
|
2332
|
+
he(d.$slots, "default", { item: v }, () => [
|
|
2333
|
+
Se((k(), W("div", null, [
|
|
2318
2334
|
Le(
|
|
2319
|
-
Oe(
|
|
2335
|
+
Oe(v[d.labelKey]),
|
|
2320
2336
|
1
|
|
2321
2337
|
/* TEXT */
|
|
2322
2338
|
)
|
|
2323
2339
|
])), [
|
|
2324
|
-
[
|
|
2340
|
+
[w(dt)]
|
|
2325
2341
|
])
|
|
2326
2342
|
], !0)
|
|
2327
2343
|
]),
|
|
2328
|
-
!d.isView && d.closeable ? (k(),
|
|
2344
|
+
!d.isView && d.closeable && !w(f)(v) ? (k(), le(w(ct), {
|
|
2329
2345
|
key: 0,
|
|
2330
2346
|
size: "small",
|
|
2331
2347
|
class: "close-icon",
|
|
2332
|
-
"icon-color":
|
|
2333
|
-
onClick: (
|
|
2334
|
-
}, null, 8, ["icon-color", "onClick"])) :
|
|
2348
|
+
"icon-color": w(ut)("--das-ui-color-secondary"),
|
|
2349
|
+
onClick: (B) => w(_)(v)
|
|
2350
|
+
}, null, 8, ["icon-color", "onClick"])) : G("v-if", !0)
|
|
2335
2351
|
], 10, qn))),
|
|
2336
2352
|
128
|
|
2337
2353
|
/* KEYED_FRAGMENT */
|
|
2338
2354
|
))
|
|
2339
2355
|
])
|
|
2340
2356
|
], 10, Gn)), [
|
|
2341
|
-
[
|
|
2342
|
-
]) :
|
|
2357
|
+
[Y, w(O)]
|
|
2358
|
+
]) : G("v-if", !0)
|
|
2343
2359
|
],
|
|
2344
2360
|
4
|
|
2345
2361
|
/* STYLE */
|
|
@@ -2351,7 +2367,7 @@ const Ln = (t, e, i, n) => {
|
|
|
2351
2367
|
for (const [n, r] of e)
|
|
2352
2368
|
i[n] = r;
|
|
2353
2369
|
return i;
|
|
2354
|
-
}, er = /* @__PURE__ */ Qn(Zn, [["__scopeId", "data-v-
|
|
2370
|
+
}, er = /* @__PURE__ */ Qn(Zn, [["__scopeId", "data-v-b6eca987"]]), tr = {
|
|
2355
2371
|
"das-select-list-removeAll": { "zh-CN": "清空", en: "Clear", _appCode: "framework" },
|
|
2356
2372
|
"das-select-list-selected": { "zh-CN": "已选", en: "Selected", _appCode: "framework" },
|
|
2357
2373
|
"das-select-list-parentheses-left": { "zh-CN": "(", en: "(", _appCode: "framework" },
|