doph-js 0.2.81 → 0.2.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dophJs.js +530 -526
- package/dist/dophJs.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/dophJs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useSlots as Ce, computed as m, h as st, openBlock as d, createBlock as b, unref as B, ref as T, createElementBlock as f, Fragment as ie, normalizeClass as D, renderSlot as L, createCommentVNode as k, normalizeStyle as
|
|
1
|
+
import { useSlots as Ce, computed as m, h as st, openBlock as d, createBlock as b, unref as B, ref as T, createElementBlock as f, Fragment as ie, normalizeClass as D, renderSlot as L, createCommentVNode as k, normalizeStyle as V, resolveDynamicComponent as Y, createStaticVNode as ut, onMounted as me, toDisplayString as O, withDirectives as J, createElementVNode as _, vModelDynamic as De, withCtx as E, createTextVNode as K, Transition as Ne, withModifiers as j, resolveComponent as Ct, resolveDirective as Re, normalizeProps as pt, guardReactiveProps as ft, createVNode as oe, renderList as ge, pushScopeId as Lt, popScopeId as It, reactive as Oe, Teleport as mt, nextTick as ht, getCurrentInstance as gt, watch as vt, onUnmounted as Et, mergeProps as ue, useCssVars as Ae, shallowRef as Bt, defineComponent as Mt, TransitionGroup as yt, vModelCheckbox as Nt, vModelSelect as Rt, toRef as Ot, KeepAlive as At, toRefs as Ht, vModelText as Vt } from "vue";
|
|
2
2
|
const de = {
|
|
3
3
|
__name: "DIcon",
|
|
4
4
|
props: {
|
|
@@ -8,14 +8,14 @@ const de = {
|
|
|
8
8
|
className: String
|
|
9
9
|
},
|
|
10
10
|
setup(e) {
|
|
11
|
-
const
|
|
12
|
-
const { className: l } =
|
|
11
|
+
const t = e, o = Ce(), n = m(() => {
|
|
12
|
+
const { className: l } = t;
|
|
13
13
|
return l === void 0 ? "icon" : ["icon", l].join(" ");
|
|
14
14
|
}), s = m(() => {
|
|
15
|
-
const { color: l } =
|
|
15
|
+
const { color: l } = t;
|
|
16
16
|
return l === void 0 ? null : l;
|
|
17
17
|
}), a = m(() => {
|
|
18
|
-
const l =
|
|
18
|
+
const l = t.size ?? null;
|
|
19
19
|
if (l !== void 0)
|
|
20
20
|
return typeof l == "number" || /^\d+$/.test(l) ? `${l}px` : l;
|
|
21
21
|
}), r = m(() => st(
|
|
@@ -27,7 +27,7 @@ const de = {
|
|
|
27
27
|
fontSize: a.value
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
t.component ? st(t.component) : o
|
|
31
31
|
));
|
|
32
32
|
return (l, i) => (d(), b(B(r)));
|
|
33
33
|
}
|
|
@@ -42,45 +42,45 @@ const de = {
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
mutations: {
|
|
45
|
-
addIcon(e,
|
|
46
|
-
te.state.name =
|
|
45
|
+
addIcon(e, t) {
|
|
46
|
+
te.state.name = t;
|
|
47
47
|
},
|
|
48
48
|
addIcons(e) {
|
|
49
|
-
for (const
|
|
50
|
-
e.hasOwnProperty(
|
|
49
|
+
for (const t in e)
|
|
50
|
+
e.hasOwnProperty(t) && (te.state[t] = e[t]);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
function _t(e) {
|
|
55
|
-
const
|
|
56
|
-
let
|
|
57
|
-
for (;
|
|
58
|
-
n +=
|
|
59
|
-
return { top: s, left: n, x:
|
|
55
|
+
const t = e.value.getBoundingClientRect();
|
|
56
|
+
let o = e.value, n = 0, s = 0;
|
|
57
|
+
for (; o && !isNaN(o.offsetLeft) && !isNaN(o.offsetTop); )
|
|
58
|
+
n += o.offsetLeft - o.scrollLeft, s += o.offsetTop - o.scrollTop, o = o.offsetParent;
|
|
59
|
+
return { top: s, left: n, x: t.x, y: t.y, width: t.width, height: t.height };
|
|
60
60
|
}
|
|
61
61
|
function zt() {
|
|
62
62
|
function e(s) {
|
|
63
63
|
return s * Math.random() | 0;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function t() {
|
|
66
66
|
return e(16).toString(16);
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function o(s) {
|
|
69
69
|
let a = "";
|
|
70
70
|
for (let r = 0; r < s; ++r)
|
|
71
|
-
a +=
|
|
71
|
+
a += t();
|
|
72
72
|
return a;
|
|
73
73
|
}
|
|
74
74
|
function n() {
|
|
75
75
|
return (e(16) & 3 | 8).toString(16);
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return o(8) + "-" + o(4) + "-4" + o(3) + "-" + n() + o(3) + "-" + o(12);
|
|
78
78
|
}
|
|
79
|
-
const re = (e,
|
|
80
|
-
const
|
|
81
|
-
for (const [n, s] of
|
|
82
|
-
|
|
83
|
-
return
|
|
79
|
+
const re = (e, t) => {
|
|
80
|
+
const o = e.__vccOpts || e;
|
|
81
|
+
for (const [n, s] of t)
|
|
82
|
+
o[n] = s;
|
|
83
|
+
return o;
|
|
84
84
|
}, Ft = {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: "loading-svg rotating",
|
|
@@ -119,18 +119,18 @@ const re = (e, o) => {
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
emits: ["click", "contextmenu"],
|
|
122
|
-
setup(e, { expose:
|
|
122
|
+
setup(e, { expose: t, emit: o }) {
|
|
123
123
|
const n = e, s = Ce(), a = T(null), r = m(() => n.icon ? te.getters.getIcon(n.icon) : null), l = ($) => {
|
|
124
|
-
|
|
124
|
+
o("click", $);
|
|
125
125
|
}, i = ($) => {
|
|
126
|
-
|
|
126
|
+
o("contextmenu", $);
|
|
127
127
|
}, c = m(() => n.scale === "large" ? "button-lg" : n.scale === "small" ? "button-sm" : ""), u = m(() => n.disabled ? "disabled" : ""), h = ($) => !!s[$], x = m(() => h("default") ? "" : n.scale === "large" ? "d-button-lg-icon" : n.scale === "small" ? "d-button-sm-icon" : "d-button-icon"), S = m(() => {
|
|
128
128
|
const $ = n.outline ? "-outline" : "";
|
|
129
129
|
return n.type === "primary" ? `button${$}-blue` : n.type === "success" ? `button${$}-green` : n.type === "error" ? `button${$}-red` : n.type === "warning" ? `button${$}-orange` : n.type === "wait" ? `button${$}-violet` : n.outline ? `button${$}` : "";
|
|
130
130
|
});
|
|
131
|
-
return
|
|
131
|
+
return t({
|
|
132
132
|
elementSize: () => _t(a)
|
|
133
|
-
}), ($,
|
|
133
|
+
}), ($, H) => (d(), f(ie, null, [
|
|
134
134
|
r.value ? k("", !0) : (d(), f("div", {
|
|
135
135
|
key: 0,
|
|
136
136
|
ref_key: "el",
|
|
@@ -149,7 +149,7 @@ const re = (e, o) => {
|
|
|
149
149
|
onClick: l,
|
|
150
150
|
onContextmenu: i,
|
|
151
151
|
class: D(["button button-ext", [n.class, c.value, x.value, S.value, u.value].join(" ")]),
|
|
152
|
-
style:
|
|
152
|
+
style: V(n.style)
|
|
153
153
|
}, [
|
|
154
154
|
n.icon ? (d(), b(Y(de), {
|
|
155
155
|
key: 0,
|
|
@@ -198,11 +198,11 @@ const Gt = {
|
|
|
198
198
|
focus: Boolean
|
|
199
199
|
},
|
|
200
200
|
emits: ["update:modelValue"],
|
|
201
|
-
setup(e, { expose:
|
|
201
|
+
setup(e, { expose: t, emit: o }) {
|
|
202
202
|
const n = e, s = T(null), a = m(() => n.scale === "small" ? "d-input-small" : n.scale === "large" ? "d-input-large" : ""), r = m({
|
|
203
203
|
get: () => n.modelValue,
|
|
204
204
|
set: (i) => {
|
|
205
|
-
|
|
205
|
+
o("update:modelValue", i);
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
208
|
me(() => {
|
|
@@ -211,7 +211,7 @@ const Gt = {
|
|
|
211
211
|
const l = () => {
|
|
212
212
|
s.value.focus();
|
|
213
213
|
};
|
|
214
|
-
return
|
|
214
|
+
return t({
|
|
215
215
|
focus: l
|
|
216
216
|
}), (i, c) => !n.post && !n.pre ? (d(), f("div", Gt, [
|
|
217
217
|
n.label ? (d(), f("div", Zt, O(n.label), 1)) : k("", !0),
|
|
@@ -310,12 +310,12 @@ const Gt = {
|
|
|
310
310
|
}
|
|
311
311
|
},
|
|
312
312
|
setup(e) {
|
|
313
|
-
const
|
|
314
|
-
const s =
|
|
315
|
-
return
|
|
313
|
+
const t = e, o = m(() => t.scale === "large" ? "badge-lg" : t.scale === "small" ? "badge-sm" : ""), n = m(() => {
|
|
314
|
+
const s = t.stress ? "-stress" : "";
|
|
315
|
+
return t.type === "primary" ? `badge${s}-blue` : t.type === "success" ? `badge${s}-green` : t.type === "error" ? `badge${s}-red` : t.type === "warning" ? `badge${s}-orange` : t.type === "wait" ? `badge${s}-violet` : t.stress ? `badge${s}-gray` : "";
|
|
316
316
|
});
|
|
317
317
|
return (s, a) => (d(), f("div", {
|
|
318
|
-
class: D(["badge", [
|
|
318
|
+
class: D(["badge", [t.class, o.value, n.value].join(" ")])
|
|
319
319
|
}, [
|
|
320
320
|
L(s.$slots, "default")
|
|
321
321
|
], 2));
|
|
@@ -345,7 +345,7 @@ const Gt = {
|
|
|
345
345
|
}
|
|
346
346
|
},
|
|
347
347
|
setup(e) {
|
|
348
|
-
const
|
|
348
|
+
const t = e, o = (i) => ({
|
|
349
349
|
height: i == null ? void 0 : i.style.height,
|
|
350
350
|
width: i == null ? void 0 : i.style.width,
|
|
351
351
|
position: i == null ? void 0 : i.style.position,
|
|
@@ -370,7 +370,7 @@ const Gt = {
|
|
|
370
370
|
}, a = (i, c) => [
|
|
371
371
|
{
|
|
372
372
|
height: se,
|
|
373
|
-
opacity:
|
|
373
|
+
opacity: t.opacityClosed,
|
|
374
374
|
paddingTop: se,
|
|
375
375
|
paddingBottom: se,
|
|
376
376
|
borderTopWidth: se,
|
|
@@ -380,7 +380,7 @@ const Gt = {
|
|
|
380
380
|
},
|
|
381
381
|
{
|
|
382
382
|
height: i,
|
|
383
|
-
opacity:
|
|
383
|
+
opacity: t.opacityOpened,
|
|
384
384
|
paddingTop: c.paddingTop,
|
|
385
385
|
paddingBottom: c.paddingBottom,
|
|
386
386
|
borderTopWidth: c.borderTopWidth,
|
|
@@ -389,12 +389,12 @@ const Gt = {
|
|
|
389
389
|
marginBottom: c.marginBottom
|
|
390
390
|
}
|
|
391
391
|
], r = (i, c) => {
|
|
392
|
-
const u = i, h =
|
|
392
|
+
const u = i, h = o(u), x = n(u, h), S = a(x, h), N = { duration: t.duration, easing: t.easingEnter };
|
|
393
393
|
s(u, h, c, S, N);
|
|
394
394
|
}, l = (i, c) => {
|
|
395
|
-
const u = i, h =
|
|
395
|
+
const u = i, h = o(u), { height: x } = getComputedStyle(u);
|
|
396
396
|
u.style.height = x, u.style.overflow = "hidden";
|
|
397
|
-
const S = a(x, h).reverse(), N = { duration:
|
|
397
|
+
const S = a(x, h).reverse(), N = { duration: t.duration, easing: t.easingLeave };
|
|
398
398
|
s(u, h, c, S, N);
|
|
399
399
|
};
|
|
400
400
|
return (i, c) => (d(), b(Ne, {
|
|
@@ -410,7 +410,7 @@ const Gt = {
|
|
|
410
410
|
}
|
|
411
411
|
}, Te = {
|
|
412
412
|
data: void 0
|
|
413
|
-
}, He = (e) => e.reduce((
|
|
413
|
+
}, He = (e) => e.reduce((t, o) => (t[o] = o) && t, {}), X = He([
|
|
414
414
|
"drag",
|
|
415
415
|
"dragend",
|
|
416
416
|
"dragenter",
|
|
@@ -442,18 +442,18 @@ const Gt = {
|
|
|
442
442
|
tag: { type: String, default: "div" }
|
|
443
443
|
},
|
|
444
444
|
setup(e) {
|
|
445
|
-
const
|
|
445
|
+
const t = e, o = Ce(), n = T(!1), s = m(() => n && t.transferData), a = m(() => ({ position: "fixed", top: "-1000px" })), r = (l, i) => {
|
|
446
446
|
const c = i.dataTransfer;
|
|
447
|
-
if ([X.dragenter, X.dragover].includes(l) &&
|
|
448
|
-
if (
|
|
447
|
+
if ([X.dragenter, X.dragover].includes(l) && t.dropEffect && (c.dropEffect = t.dropEffect), l === X.dragstart) {
|
|
448
|
+
if (t.effectAllowed && (c.effectAllowed = t.effectAllowed), t.image || o.image) {
|
|
449
449
|
let u;
|
|
450
|
-
|
|
450
|
+
t.image ? (u = new Image(), u.src = t.image) : o.image && (u = o.image[0].elm), c.setDragImage && c.setDragImage(u, t.imageXOffset, t.imageYOffset);
|
|
451
451
|
}
|
|
452
|
-
|
|
452
|
+
t.transferData !== void 0 && (Te.data = t.transferData, i.dataTransfer.setData("text", "")), n.value = !0;
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
455
|
return (l, i) => (d(), b(Y(e.tag), {
|
|
456
|
-
draggable:
|
|
456
|
+
draggable: t.draggable,
|
|
457
457
|
onDrag: i[0] || (i[0] = (c) => r(B(X).drag, c)),
|
|
458
458
|
onDragstart: i[1] || (i[1] = j((c) => r(B(X).dragstart, c), ["stop"])),
|
|
459
459
|
onDragenter: i[2] || (i[2] = (c) => r(B(X).dragenter, c)),
|
|
@@ -464,7 +464,7 @@ const Gt = {
|
|
|
464
464
|
L(l.$slots, "default", { transferData: s.value }),
|
|
465
465
|
e.hideImageHtml ? (d(), f("div", {
|
|
466
466
|
key: 0,
|
|
467
|
-
style:
|
|
467
|
+
style: V(a.value)
|
|
468
468
|
}, [
|
|
469
469
|
L(l.$slots, "image", { transferData: s.value })
|
|
470
470
|
], 4)) : L(l.$slots, "image", {
|
|
@@ -476,7 +476,7 @@ const Gt = {
|
|
|
476
476
|
}, 40, ["draggable"]));
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
|
-
const mo = (e) => (Lt("data-v-
|
|
479
|
+
const mo = (e) => (Lt("data-v-a476bb8e"), e = e(), It(), e), ho = {
|
|
480
480
|
key: 0,
|
|
481
481
|
style: { display: "none" }
|
|
482
482
|
}, go = { key: 1 }, vo = /* @__PURE__ */ mo(() => /* @__PURE__ */ _("div", { class: "tree-divider" }, null, -1)), yo = [
|
|
@@ -497,76 +497,77 @@ const mo = (e) => (Lt("data-v-1fe2ffac"), e = e(), It(), e), ho = {
|
|
|
497
497
|
component: Object
|
|
498
498
|
},
|
|
499
499
|
emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick", "nodecontext"],
|
|
500
|
-
setup(e, { emit:
|
|
501
|
-
const
|
|
502
|
-
|
|
500
|
+
setup(e, { emit: t }) {
|
|
501
|
+
const o = e, n = T(null), s = T(!1), a = T(!1), r = T(!1), l = m(() => o.model.children && o.model.children.length), i = m(() => (v.actions.isTreeExpanded(o.treeId) && (o.model.expanded = o.model.expanded === void 0 ? !0 : o.model.expanded), o.model.expanded)), c = (M) => {
|
|
502
|
+
t("nodeclick", { event: M, model: o.model });
|
|
503
503
|
}, u = (M) => {
|
|
504
|
-
|
|
504
|
+
t("nodeclick", M);
|
|
505
505
|
}, h = (M) => {
|
|
506
|
-
|
|
506
|
+
t("nodedrop", M);
|
|
507
507
|
}, x = (M) => {
|
|
508
|
-
|
|
508
|
+
t("nodecontext", M);
|
|
509
509
|
}, S = m(() => [
|
|
510
|
-
v.actions.isItemSelected(
|
|
510
|
+
v.actions.isItemSelected(o.treeId, o.model.id) ? "selected" : "",
|
|
511
511
|
s.value ? "node-over " : "",
|
|
512
512
|
a.value ? "node-top " : "",
|
|
513
513
|
r.value ? "node-bottom " : ""
|
|
514
|
-
]), N = m(() =>
|
|
514
|
+
]), N = m(() => o.search ? !1 : o.model.draggable === !0), $ = (M) => {
|
|
515
|
+
var A;
|
|
515
516
|
let g = Te.data;
|
|
516
517
|
if (g === void 0 || g.model === void 0)
|
|
517
518
|
return s.value = !1, !1;
|
|
518
|
-
if (g.model.id ===
|
|
519
|
+
if (g.model.id === o.model.id || v.actions.isChildOfParent(o.treeId, o.items, o.model.id, g.model.id) || v.actions.isParentOfChild(o.treeId, o.items, g.model.id, o.model.id))
|
|
519
520
|
return s.value = !1, a.value = !1, r.value = !1, !1;
|
|
520
|
-
if (!v.state.trees[
|
|
521
|
+
if (!v.state.trees[o.treeId].transfer && g.id !== o.treeId || !v.state.trees[o.treeId].dropInside && !r.value && !a.value)
|
|
521
522
|
return !1;
|
|
522
523
|
let R = "";
|
|
523
|
-
a.value ? R = "before" : r.value ? R = "after" : R = "inside",
|
|
524
|
-
},
|
|
525
|
-
|
|
524
|
+
a.value ? R = "before" : r.value ? R = "after" : R = "inside", t("nodedrop", { e: M, model: o.model, place: R }), v.actions.moveTreeNode(g.id, o.treeId, o.items, g.model.id, o.model.id, R, (A = g.model) == null ? void 0 : A.transfer), s.value = !1, a.value = !1, r.value = !1;
|
|
525
|
+
}, H = (M) => {
|
|
526
|
+
t("nodedragover", { e: M, model: o.model });
|
|
526
527
|
let g = Te.data;
|
|
527
|
-
if (!
|
|
528
|
+
if (!o.model.droppable)
|
|
528
529
|
return !1;
|
|
529
530
|
if (g === void 0 || g.model === void 0)
|
|
530
531
|
return s.value = !0, !1;
|
|
531
|
-
if (g.model.id ===
|
|
532
|
+
if (g.model.id === o.model.id || v.actions.isChildOfParent(o.treeId, o.items, o.model.id, g.model.id) || v.actions.isParentOfChild(o.treeId, o.items, g.model.id, o.model.id))
|
|
532
533
|
return !1;
|
|
533
|
-
const R = M.y,
|
|
534
|
-
R >
|
|
535
|
-
},
|
|
534
|
+
const R = M.y, A = n.value.getBoundingClientRect().top, z = n.value.getBoundingClientRect().height, y = z / 3;
|
|
535
|
+
R > A && R <= A + y ? (s.value = !1, a.value = !0, r.value = !1) : R < A + z && R >= A + z - y ? (s.value = !1, a.value = !1, r.value = !0) : (s.value = v.state.trees[o.treeId].dropInside, a.value = !1, r.value = !1);
|
|
536
|
+
}, P = () => {
|
|
536
537
|
s.value = !1, a.value = !1, r.value = !1;
|
|
537
|
-
}, w = m(() =>
|
|
538
|
-
if (
|
|
539
|
-
let [M, ...g] =
|
|
538
|
+
}, w = m(() => o.model.title.startsWith("-")), I = m(() => {
|
|
539
|
+
if (o.model.title.startsWith("-")) {
|
|
540
|
+
let [M, ...g] = o.model.title.split(" ");
|
|
540
541
|
return g = g.join(" "), g;
|
|
541
542
|
}
|
|
542
543
|
return null;
|
|
543
544
|
});
|
|
544
545
|
return (M, g) => {
|
|
545
|
-
const R = Ct("d-tree-item", !0),
|
|
546
|
-
return B(v).actions.beforeItem(
|
|
547
|
-
_("div", bo, O(B(v).actions.renderTitle(
|
|
548
|
-
])) :
|
|
546
|
+
const R = Ct("d-tree-item", !0), A = Re("touch");
|
|
547
|
+
return B(v).actions.beforeItem(o.treeId, e.model) ? w.value && !I.value ? (d(), f("li", go, yo)) : w.value && I.value ? (d(), f("li", _o, [
|
|
548
|
+
_("div", bo, O(B(v).actions.renderTitle(o.treeId, I.value)), 1)
|
|
549
|
+
])) : o.model.component ? (d(), b(at, {
|
|
549
550
|
key: 3,
|
|
550
551
|
tag: "li",
|
|
551
552
|
class: "tree-item-component",
|
|
552
|
-
"transfer-data": { id:
|
|
553
|
+
"transfer-data": { id: o.treeId, model: o.model },
|
|
553
554
|
draggable: N.value,
|
|
554
555
|
onDrop: j($, ["stop"]),
|
|
555
556
|
onDragenter: g[1] || (g[1] = j(() => {
|
|
556
557
|
}, ["prevent"])),
|
|
557
|
-
onDragover: j(
|
|
558
|
-
onDragleave: j(
|
|
558
|
+
onDragover: j(H, ["prevent", "stop"]),
|
|
559
|
+
onDragleave: j(P, ["prevent"])
|
|
559
560
|
}, {
|
|
560
561
|
default: E(() => [
|
|
561
562
|
J((d(), f("div", {
|
|
562
563
|
ref_key: "node",
|
|
563
564
|
ref: n,
|
|
564
565
|
class: D(S.value),
|
|
565
|
-
onContextmenu: g[0] || (g[0] = j((
|
|
566
|
+
onContextmenu: g[0] || (g[0] = j((z) => t("nodecontext", { e: z, model: o.model }), ["prevent"]))
|
|
566
567
|
}, [
|
|
567
|
-
(d(), b(Y(B(fe).getters.getComponent(
|
|
568
|
+
(d(), b(Y(B(fe).getters.getComponent(o.model.component).component), pt(ft(B(fe).getters.getComponent(o.model.component).props)), null, 16))
|
|
568
569
|
], 34)), [
|
|
569
|
-
[
|
|
570
|
+
[A, c]
|
|
570
571
|
])
|
|
571
572
|
]),
|
|
572
573
|
_: 1
|
|
@@ -574,80 +575,80 @@ const mo = (e) => (Lt("data-v-1fe2ffac"), e = e(), It(), e), ho = {
|
|
|
574
575
|
key: 4,
|
|
575
576
|
tag: "li",
|
|
576
577
|
class: "tree-item",
|
|
577
|
-
"transfer-data": { id:
|
|
578
|
+
"transfer-data": { id: o.treeId, model: o.model },
|
|
578
579
|
draggable: N.value,
|
|
579
580
|
onDrop: j($, ["stop"]),
|
|
580
581
|
onDragenter: g[3] || (g[3] = j(() => {
|
|
581
582
|
}, ["prevent"])),
|
|
582
|
-
onDragover: j(
|
|
583
|
-
onDragleave: j(
|
|
583
|
+
onDragover: j(H, ["prevent", "stop"]),
|
|
584
|
+
onDragleave: j(P, ["prevent"])
|
|
584
585
|
}, {
|
|
585
586
|
default: E(() => {
|
|
586
|
-
var
|
|
587
|
+
var z, y;
|
|
587
588
|
return [
|
|
588
589
|
J((d(), f("div", {
|
|
589
590
|
ref_key: "node",
|
|
590
591
|
ref: n,
|
|
591
592
|
class: D(S.value),
|
|
592
|
-
onContextmenu: g[2] || (g[2] = j((
|
|
593
|
+
onContextmenu: g[2] || (g[2] = j((F) => t("nodecontext", { e: F, model: o.model }), ["prevent"]))
|
|
593
594
|
}, [
|
|
594
595
|
_("div", null, [
|
|
595
|
-
|
|
596
|
+
o.model.icons && o.model.icons.pre && l.value && !o.search && !w.value ? (d(), b(Y(de), {
|
|
596
597
|
key: 0,
|
|
597
|
-
component: B(te).getters.getIcon(
|
|
598
|
+
component: B(te).getters.getIcon(o.model.icons.pre.component),
|
|
598
599
|
size: 18,
|
|
599
|
-
color:
|
|
600
|
+
color: o.model.icons.pre.color ? o.model.icons.pre.color : "inherit",
|
|
600
601
|
class: D(i.value ? "tree-open-pre" : "")
|
|
601
602
|
}, null, 8, ["component", "color", "class"])) : k("", !0),
|
|
602
|
-
|
|
603
|
+
o.model.icons && o.model.icons.pre && !l.value && !o.search && !w.value ? (d(), b(Y(de), {
|
|
603
604
|
key: 1,
|
|
604
|
-
component: B(te).getters.getIcon(
|
|
605
|
+
component: B(te).getters.getIcon(o.model.icons.pre.component),
|
|
605
606
|
size: 18,
|
|
606
607
|
color: "rgba(0,0,0,0)",
|
|
607
608
|
class: D(i.value ? "tree-open-pre" : "")
|
|
608
609
|
}, null, 8, ["component", "class"])) : k("", !0),
|
|
609
|
-
|
|
610
|
+
o.model.icons && o.model.icons.icon && !w.value ? (d(), b(Y(de), {
|
|
610
611
|
key: 2,
|
|
611
|
-
component: B(te).getters.getIcon(
|
|
612
|
-
color:
|
|
613
|
-
size:
|
|
614
|
-
className:
|
|
612
|
+
component: B(te).getters.getIcon(o.model.icons.icon.component),
|
|
613
|
+
color: o.model.icons.icon.color ? o.model.icons.icon.color : "inherit",
|
|
614
|
+
size: o.model.icons.icon.size ? o.model.icons.icon.size : null,
|
|
615
|
+
className: o.model.icons.icon.class ? o.model.icons.icon.class : null
|
|
615
616
|
}, null, 8, ["component", "color", "size", "className"])) : k("", !0),
|
|
616
617
|
_("div", xo, [
|
|
617
618
|
w.value ? (d(), f("div", $o)) : k("", !0),
|
|
618
|
-
w.value ? k("", !0) : (d(), f("div", ko, O(B(v).actions.renderTitle(
|
|
619
|
+
w.value ? k("", !0) : (d(), f("div", ko, O(B(v).actions.renderTitle(o.treeId, o.model.title)), 1))
|
|
619
620
|
])
|
|
620
621
|
]),
|
|
621
622
|
_("div", wo, [
|
|
622
|
-
((
|
|
623
|
+
((z = o.model.badge) == null ? void 0 : z.value) !== void 0 && !w.value ? (d(), b(Y(co), {
|
|
623
624
|
key: 0,
|
|
624
|
-
class: D([(y =
|
|
625
|
+
class: D([(y = o.model.badge) == null ? void 0 : y.class, "badge-sm"])
|
|
625
626
|
}, {
|
|
626
627
|
default: E(() => [
|
|
627
|
-
K(O(
|
|
628
|
+
K(O(o.model.badge.value), 1)
|
|
628
629
|
]),
|
|
629
630
|
_: 1
|
|
630
631
|
}, 8, ["class"])) : k("", !0),
|
|
631
|
-
|
|
632
|
+
o.model.icons && o.model.icons.post && l.value && !o.search && !w.value ? (d(), b(Y(de), {
|
|
632
633
|
key: 1,
|
|
633
|
-
component: B(te).getters.getIcon(
|
|
634
|
+
component: B(te).getters.getIcon(o.model.icons.post.component),
|
|
634
635
|
size: 20,
|
|
635
|
-
color:
|
|
636
|
+
color: o.model.icons.post.color ? o.model.icons.post.color : "inherit",
|
|
636
637
|
class: D(i.value ? "tree-open-post" : "")
|
|
637
638
|
}, null, 8, ["component", "color", "class"])) : k("", !0)
|
|
638
639
|
])
|
|
639
640
|
], 34)), [
|
|
640
|
-
[
|
|
641
|
+
[A, c]
|
|
641
642
|
]),
|
|
642
643
|
oe(uo, null, {
|
|
643
644
|
default: E(() => [
|
|
644
|
-
l.value && i.value && !
|
|
645
|
-
(d(!0), f(ie, null, ge(e.model.children, (
|
|
646
|
-
key:
|
|
647
|
-
model:
|
|
648
|
-
treeId:
|
|
649
|
-
items:
|
|
650
|
-
search:
|
|
645
|
+
l.value && i.value && !o.search ? (d(), f("ul", So, [
|
|
646
|
+
(d(!0), f(ie, null, ge(e.model.children, (F) => (d(), b(R, {
|
|
647
|
+
key: F.id,
|
|
648
|
+
model: F,
|
|
649
|
+
treeId: o.treeId,
|
|
650
|
+
items: o.items,
|
|
651
|
+
search: o.search,
|
|
651
652
|
onNodeclick: u,
|
|
652
653
|
onNodedrop: h,
|
|
653
654
|
onNodecontext: x
|
|
@@ -662,7 +663,7 @@ const mo = (e) => (Lt("data-v-1fe2ffac"), e = e(), It(), e), ho = {
|
|
|
662
663
|
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(), f("li", ho));
|
|
663
664
|
};
|
|
664
665
|
}
|
|
665
|
-
}, To = /* @__PURE__ */ re(Do, [["__scopeId", "data-v-
|
|
666
|
+
}, To = /* @__PURE__ */ re(Do, [["__scopeId", "data-v-a476bb8e"]]);
|
|
666
667
|
function Co(e) {
|
|
667
668
|
return e = e || /* @__PURE__ */ new Map(), {
|
|
668
669
|
/**
|
|
@@ -675,9 +676,9 @@ function Co(e) {
|
|
|
675
676
|
* @param {Function} handler Function to call in response to given event
|
|
676
677
|
* @memberOf eventsBus
|
|
677
678
|
*/
|
|
678
|
-
on(
|
|
679
|
-
const n = e.get(
|
|
680
|
-
n ? n.push(
|
|
679
|
+
on(t, o) {
|
|
680
|
+
const n = e.get(t);
|
|
681
|
+
n ? n.push(o) : e.set(t, [o]);
|
|
681
682
|
},
|
|
682
683
|
/**
|
|
683
684
|
* Remove an event handler for the given type.
|
|
@@ -686,9 +687,9 @@ function Co(e) {
|
|
|
686
687
|
* @param {Function} [handler] Handler function to remove
|
|
687
688
|
* @memberOf eventsBus
|
|
688
689
|
*/
|
|
689
|
-
off(
|
|
690
|
-
const n = e.get(
|
|
691
|
-
n && (
|
|
690
|
+
off(t, o) {
|
|
691
|
+
const n = e.get(t);
|
|
692
|
+
n && (o ? n.splice(n.indexOf(o) >>> 0, 1) : e.set(t, []));
|
|
692
693
|
},
|
|
693
694
|
/**
|
|
694
695
|
* Invoke all handlers for the given type.
|
|
@@ -700,17 +701,17 @@ function Co(e) {
|
|
|
700
701
|
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
701
702
|
* @memberOf eventsBus
|
|
702
703
|
*/
|
|
703
|
-
emit(
|
|
704
|
-
let n = e.get(
|
|
704
|
+
emit(t, o) {
|
|
705
|
+
let n = e.get(t);
|
|
705
706
|
n && n.slice().map((s) => {
|
|
706
|
-
s(
|
|
707
|
+
s(o);
|
|
707
708
|
}), n = e.get("*"), n && n.slice().map((s) => {
|
|
708
|
-
s(
|
|
709
|
+
s(t, o);
|
|
709
710
|
});
|
|
710
711
|
}
|
|
711
712
|
};
|
|
712
713
|
}
|
|
713
|
-
const
|
|
714
|
+
const U = Co(), v = {
|
|
714
715
|
state: Oe({
|
|
715
716
|
trees: {}
|
|
716
717
|
}),
|
|
@@ -722,41 +723,41 @@ const q = Co(), v = {
|
|
|
722
723
|
return v.state.trees[e].selected;
|
|
723
724
|
},
|
|
724
725
|
// data - ноды, dataId - ID ноды родителя data
|
|
725
|
-
getParentId(e,
|
|
726
|
-
return
|
|
726
|
+
getParentId(e, t, o, n = "id", s = "children", a = {}) {
|
|
727
|
+
return o && e && (e.find((r) => r[n] === o ? (a.found = t, r) : v.getters.getParentId(r[s], r.id, o, n, s, a)), a.found) ? a.found : !1;
|
|
727
728
|
}
|
|
728
729
|
},
|
|
729
730
|
mutations: {
|
|
730
|
-
setTreeItems(e,
|
|
731
|
-
v.state.trees[e].items =
|
|
731
|
+
setTreeItems(e, t) {
|
|
732
|
+
v.state.trees[e].items = t;
|
|
732
733
|
},
|
|
733
|
-
setItemSelect(e,
|
|
734
|
-
v.state.trees[e].noSelect || (v.state.trees[e].multiSelect ? v.state.trees[e].selected.includes(
|
|
735
|
-
return
|
|
736
|
-
}) : v.state.trees[e].selected = [...v.state.trees[e].selected,
|
|
734
|
+
setItemSelect(e, t) {
|
|
735
|
+
v.state.trees[e].noSelect || (v.state.trees[e].multiSelect ? v.state.trees[e].selected.includes(t.id) ? v.state.trees[e].selected = v.state.trees[e].selected.filter(function(o) {
|
|
736
|
+
return o !== t.id;
|
|
737
|
+
}) : v.state.trees[e].selected = [...v.state.trees[e].selected, t.id] : v.state.trees[e].selected = [t.id]);
|
|
737
738
|
}
|
|
738
739
|
},
|
|
739
740
|
actions: {
|
|
740
|
-
initTreeStore(e,
|
|
741
|
-
v.state.trees[e] = [], v.state.trees[e].selected = [], v.state.trees[e].noSelect =
|
|
741
|
+
initTreeStore(e, t, o, n, s, a, r, l = !0) {
|
|
742
|
+
v.state.trees[e] = [], v.state.trees[e].selected = [], v.state.trees[e].noSelect = t, v.state.trees[e].multiSelect = o, v.state.trees[e].expanded = n, v.state.trees[e].transfer = s, v.state.trees[e].renderTitle = a, v.state.trees[e].beforeItem = r, v.state.trees[e].dropInside = l;
|
|
742
743
|
},
|
|
743
|
-
renderTitle(e,
|
|
744
|
-
return v.state.trees[e].renderTitle ? v.state.trees[e].renderTitle(
|
|
744
|
+
renderTitle(e, t) {
|
|
745
|
+
return v.state.trees[e].renderTitle ? v.state.trees[e].renderTitle(t) : t;
|
|
745
746
|
},
|
|
746
|
-
beforeItem(e,
|
|
747
|
-
return v.state.trees[e].beforeItem ? v.state.trees[e].beforeItem(
|
|
747
|
+
beforeItem(e, t) {
|
|
748
|
+
return v.state.trees[e].beforeItem ? v.state.trees[e].beforeItem(t) : !0;
|
|
748
749
|
},
|
|
749
|
-
isItemSelected(e,
|
|
750
|
-
return v.state.trees[e].selected.includes(
|
|
750
|
+
isItemSelected(e, t) {
|
|
751
|
+
return v.state.trees[e].selected.includes(t);
|
|
751
752
|
},
|
|
752
|
-
toggleItem(e,
|
|
753
|
-
|
|
753
|
+
toggleItem(e, t) {
|
|
754
|
+
t.expanded = t.expanded === void 0 || !t.expanded, t.children && t.children.length && (t.expanded ? U.emit(`expand-${e}`, { id: e, model: t }) : U.emit(`collapse-${e}`, { id: e, model: t }));
|
|
754
755
|
},
|
|
755
756
|
isTreeExpanded(e) {
|
|
756
757
|
return v.state.trees[e].expanded;
|
|
757
758
|
},
|
|
758
|
-
isChildOfParent(e,
|
|
759
|
-
const s = v.actions.deepSearch(
|
|
759
|
+
isChildOfParent(e, t, o, n) {
|
|
760
|
+
const s = v.actions.deepSearch(t, o);
|
|
760
761
|
if (s && s.children) {
|
|
761
762
|
for (let a = 0; a < s.children.length; a++)
|
|
762
763
|
if (s.children[a].id === n)
|
|
@@ -765,17 +766,17 @@ const q = Co(), v = {
|
|
|
765
766
|
return !1;
|
|
766
767
|
},
|
|
767
768
|
// Является ли нода родителем указанного потомка
|
|
768
|
-
isParentOfChild(e,
|
|
769
|
-
const s = v.actions.deepSearch(
|
|
769
|
+
isParentOfChild(e, t, o, n) {
|
|
770
|
+
const s = v.actions.deepSearch(t, o);
|
|
770
771
|
return !!(s && s.children && v.actions.deepSearch(s.children, n));
|
|
771
772
|
},
|
|
772
|
-
deepSearch(e,
|
|
773
|
-
return
|
|
773
|
+
deepSearch(e, t, o = "id", n = "children", s = {}) {
|
|
774
|
+
return t && e && (e.find((a) => a[o] === t ? (s.found = a, a) : v.actions.deepSearch(a[n], t, o, n, s)), s.found) ? s.found : !1;
|
|
774
775
|
},
|
|
775
|
-
deepSearchByTitle(e,
|
|
776
|
-
if (
|
|
777
|
-
const r = new RegExp(
|
|
778
|
-
a[
|
|
776
|
+
deepSearchByTitle(e, t, o = "title", n = "children", s = []) {
|
|
777
|
+
if (t && e && (e.find((a) => {
|
|
778
|
+
const r = new RegExp(t, "gi");
|
|
779
|
+
a[o].toString().toLowerCase().match(r) !== null && s.push(a), v.actions.deepSearchByTitle(a[n], t, o, n, s);
|
|
779
780
|
}), s)) {
|
|
780
781
|
for (let a = 0; a < s.length; a++)
|
|
781
782
|
;
|
|
@@ -783,30 +784,33 @@ const q = Co(), v = {
|
|
|
783
784
|
}
|
|
784
785
|
return s;
|
|
785
786
|
},
|
|
786
|
-
moveTreeNode(e,
|
|
787
|
-
|
|
788
|
-
|
|
787
|
+
moveTreeNode(e, t, o, n, s, a, r = !0) {
|
|
788
|
+
if (r) {
|
|
789
|
+
const l = v.actions.deleteTreeNode(o, n);
|
|
790
|
+
v.actions.insertTreeNode(o, s, l, a), U.emit(`move-${t}`, { fromTreeId: e, toTreeId: t, moved: l == null ? void 0 : l.id, target: s, position: a });
|
|
791
|
+
} else
|
|
792
|
+
U.emit(`move-${t}`, { fromTreeId: e, toTreeId: t, moved: n, target: s, position: a });
|
|
789
793
|
},
|
|
790
|
-
insertTreeNode(e,
|
|
794
|
+
insertTreeNode(e, t, o, n) {
|
|
791
795
|
if (e)
|
|
792
796
|
for (let s = 0; s < e.length; s++) {
|
|
793
|
-
if (e[s].id ===
|
|
797
|
+
if (e[s].id === t) {
|
|
794
798
|
let r = s;
|
|
795
|
-
return n === "after" ? (r++, e.splice(r, 0,
|
|
799
|
+
return n === "after" ? (r++, e.splice(r, 0, o)) : n === "before" ? e.splice(r, 0, o) : n === "inside" && (Object.hasOwn(e[s], "children") || (e[s].children = [], e[s].opened = !0), e[s].children.splice(0, 0, o)), e[s];
|
|
796
800
|
}
|
|
797
|
-
const a = this.insertTreeNode(e[s].children,
|
|
801
|
+
const a = this.insertTreeNode(e[s].children, t, o, n);
|
|
798
802
|
if (a)
|
|
799
803
|
return a;
|
|
800
804
|
}
|
|
801
805
|
},
|
|
802
|
-
deleteTreeNode(e,
|
|
806
|
+
deleteTreeNode(e, t) {
|
|
803
807
|
if (e)
|
|
804
|
-
for (let
|
|
805
|
-
if (e[
|
|
806
|
-
const s = e[
|
|
807
|
-
return e.splice(
|
|
808
|
+
for (let o = 0; o < e.length; o++) {
|
|
809
|
+
if (e[o].id === t) {
|
|
810
|
+
const s = e[o];
|
|
811
|
+
return e.splice(o, 1), s;
|
|
808
812
|
}
|
|
809
|
-
const n = v.actions.deleteTreeNode(e[
|
|
813
|
+
const n = v.actions.deleteTreeNode(e[o].children, t);
|
|
810
814
|
if (n)
|
|
811
815
|
return n;
|
|
812
816
|
}
|
|
@@ -818,12 +822,12 @@ const q = Co(), v = {
|
|
|
818
822
|
tag: { type: String, default: "div" }
|
|
819
823
|
},
|
|
820
824
|
emits: Object.keys(X),
|
|
821
|
-
setup(e, { expose:
|
|
825
|
+
setup(e, { expose: t, emit: o }) {
|
|
822
826
|
let n = Oe({});
|
|
823
827
|
const s = T("false"), a = T(null), r = /* @__PURE__ */ new Set(), l = m(() => s.value && n), i = (u, h) => {
|
|
824
|
-
n = Te.data,
|
|
828
|
+
n = Te.data, o(u, h, n), u === X.dragenter && (r.size || h.target === a.value) && r.add(h.target), u === X.dragleave && r.delete(h.target), u === X.drop && r.clear(), s.value = !!r.size;
|
|
825
829
|
};
|
|
826
|
-
return
|
|
830
|
+
return t({
|
|
827
831
|
elementSize: () => _t(a)
|
|
828
832
|
}), (u, h) => (d(), b(Y(e.tag), {
|
|
829
833
|
ref_key: "el",
|
|
@@ -857,18 +861,18 @@ const q = Co(), v = {
|
|
|
857
861
|
}
|
|
858
862
|
},
|
|
859
863
|
emits: ["select"],
|
|
860
|
-
setup(e, { expose:
|
|
864
|
+
setup(e, { expose: t, emit: o }) {
|
|
861
865
|
const n = e;
|
|
862
866
|
let s = T(null), a = T(!1);
|
|
863
867
|
const r = () => {
|
|
864
|
-
|
|
868
|
+
U.emit("menu-show-request"), a.value = !0;
|
|
865
869
|
}, l = () => {
|
|
866
870
|
var x;
|
|
867
871
|
(x = s.value) == null || x.collapseAll(), a.value = !1;
|
|
868
872
|
}, i = () => a.value;
|
|
869
|
-
|
|
873
|
+
U.on("menu-show-request", () => {
|
|
870
874
|
l();
|
|
871
|
-
}),
|
|
875
|
+
}), t({
|
|
872
876
|
show: r,
|
|
873
877
|
hide: l,
|
|
874
878
|
elementSize: () => s.value.elementSize(),
|
|
@@ -876,7 +880,7 @@ const q = Co(), v = {
|
|
|
876
880
|
itemsCount: () => s.value.itemsCount()
|
|
877
881
|
});
|
|
878
882
|
const h = (x) => {
|
|
879
|
-
|
|
883
|
+
o("select", x), x.model.children || l();
|
|
880
884
|
};
|
|
881
885
|
return (x, S) => {
|
|
882
886
|
const N = Re("click-outside");
|
|
@@ -888,7 +892,7 @@ const q = Co(), v = {
|
|
|
888
892
|
items: n.items,
|
|
889
893
|
"no-select": n.noSelect,
|
|
890
894
|
class: D(n.class),
|
|
891
|
-
style:
|
|
895
|
+
style: V(n.style),
|
|
892
896
|
onSelect: h,
|
|
893
897
|
"render-title": n.renderItemTitle,
|
|
894
898
|
"before-item": n.beforeItem
|
|
@@ -906,7 +910,7 @@ const q = Co(), v = {
|
|
|
906
910
|
beforeItem: Function
|
|
907
911
|
},
|
|
908
912
|
emits: ["select"],
|
|
909
|
-
setup(e, { expose:
|
|
913
|
+
setup(e, { expose: t, emit: o }) {
|
|
910
914
|
const n = e, s = T(null), a = T(0), r = T(0), l = m(() => ({
|
|
911
915
|
left: a.value + "px",
|
|
912
916
|
top: r.value + "px"
|
|
@@ -916,16 +920,16 @@ const q = Co(), v = {
|
|
|
916
920
|
a.value = x - u.pageX < h.width ? u.pageX - h.width : u.pageX, r.value = S - u.pageY < h.height ? u.pageY - h.height : u.pageY, s.value.itemsCount() === 0 && s.value.hide();
|
|
917
921
|
});
|
|
918
922
|
}, c = (u) => {
|
|
919
|
-
|
|
923
|
+
o("select", u);
|
|
920
924
|
};
|
|
921
|
-
return
|
|
925
|
+
return t({
|
|
922
926
|
show: i
|
|
923
927
|
}), (u, h) => (d(), b(bt, {
|
|
924
928
|
ref_key: "dMenuRef",
|
|
925
929
|
ref: s,
|
|
926
930
|
onSelect: c,
|
|
927
931
|
items: n.items,
|
|
928
|
-
style:
|
|
932
|
+
style: V(l.value),
|
|
929
933
|
class: "context-menu",
|
|
930
934
|
"no-select": !0,
|
|
931
935
|
"render-item-title": n.renderItemTitle,
|
|
@@ -974,50 +978,50 @@ const q = Co(), v = {
|
|
|
974
978
|
}
|
|
975
979
|
},
|
|
976
980
|
emits: ["select", "collapse", "expand", "move", "over", "drop"],
|
|
977
|
-
setup(e, { expose:
|
|
981
|
+
setup(e, { expose: t, emit: o }) {
|
|
978
982
|
const n = e, s = T(null), a = T(!1), r = T(null), l = gt().uid;
|
|
979
983
|
v.actions.initTreeStore(l, n.noSelect, n.multiSelect, n.expanded, n.transfer, n.renderTitle, n.beforeItem, n.dropInside);
|
|
980
|
-
const i = (y,
|
|
981
|
-
console.log(y,
|
|
984
|
+
const i = (y, F) => {
|
|
985
|
+
console.log(y, F);
|
|
982
986
|
};
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
}),
|
|
986
|
-
|
|
987
|
-
}),
|
|
988
|
-
|
|
987
|
+
U.on(`expand-${l}`, (y) => {
|
|
988
|
+
o("expand", y);
|
|
989
|
+
}), U.on(`collapse-${l}`, (y) => {
|
|
990
|
+
o("collapse", y);
|
|
991
|
+
}), U.on(`move-${l}`, (y) => {
|
|
992
|
+
o("move", y);
|
|
989
993
|
});
|
|
990
994
|
const c = m(() => n.search ? v.actions.deepSearchByTitle(n.items, n.search) : n.items), u = (y = null) => {
|
|
991
|
-
v.mutations.setItemSelect(l, y.model), v.actions.toggleItem(l, y.model),
|
|
995
|
+
v.mutations.setItemSelect(l, y.model), v.actions.toggleItem(l, y.model), o("select", y);
|
|
992
996
|
}, h = (y = null) => {
|
|
993
|
-
|
|
997
|
+
o("over", y);
|
|
994
998
|
}, x = (y = null) => {
|
|
995
|
-
|
|
999
|
+
o("drop", y);
|
|
996
1000
|
}, S = () => s.value.elementSize(), N = () => {
|
|
997
1001
|
for (let y = 0; y < n.items.length; y++)
|
|
998
1002
|
n.items[y].expanded = !0;
|
|
999
1003
|
}, $ = () => {
|
|
1000
1004
|
for (let y = 0; y < n.items.length; y++)
|
|
1001
1005
|
n.items[y].expanded = !1;
|
|
1002
|
-
},
|
|
1003
|
-
|
|
1006
|
+
}, H = () => l, P = (y) => v.actions.deepSearch(n.items, y), w = (y) => {
|
|
1007
|
+
P(y) && v.mutations.setItemSelect(l, P(y));
|
|
1004
1008
|
}, I = (y) => {
|
|
1005
1009
|
n.contextClick({ e: y.e, model: y.model, target: r.value });
|
|
1006
|
-
}, M = (y) => n.contextBeforeClick({ model: y, target: r.value }), g = m(() => n.context), R = (y) => (g.value && (r.value = y.model, a.value.show(y.e)), !1),
|
|
1007
|
-
let
|
|
1010
|
+
}, M = (y) => n.contextBeforeClick({ model: y, target: r.value }), g = m(() => n.context), R = (y) => (g.value && (r.value = y.model, a.value.show(y.e)), !1), A = () => z(c.value), z = (y) => {
|
|
1011
|
+
let F = 0;
|
|
1008
1012
|
for (let p = 0; p < y.length; p++)
|
|
1009
|
-
|
|
1010
|
-
return
|
|
1013
|
+
F += v.actions.beforeItem(l, y[p]) ? 1 : 0, y[p].children && y[p].children.length > 0 && (F += z(y[p].children));
|
|
1014
|
+
return F;
|
|
1011
1015
|
};
|
|
1012
|
-
return
|
|
1016
|
+
return t({
|
|
1013
1017
|
elementSize: S,
|
|
1014
1018
|
expandAll: N,
|
|
1015
1019
|
collapseAll: $,
|
|
1016
|
-
getId:
|
|
1017
|
-
getNode:
|
|
1020
|
+
getId: H,
|
|
1021
|
+
getNode: P,
|
|
1018
1022
|
selectNode: w,
|
|
1019
|
-
itemsCount:
|
|
1020
|
-
}), (y,
|
|
1023
|
+
itemsCount: A
|
|
1024
|
+
}), (y, F) => (d(), b(Lo, {
|
|
1021
1025
|
ref_key: "treeRef",
|
|
1022
1026
|
ref: s,
|
|
1023
1027
|
class: "tree",
|
|
@@ -1061,15 +1065,15 @@ const Eo = {
|
|
|
1061
1065
|
}
|
|
1062
1066
|
},
|
|
1063
1067
|
emits: ["move"],
|
|
1064
|
-
setup(e, { emit:
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1068
|
+
setup(e, { emit: t }) {
|
|
1069
|
+
const o = e, n = (s) => {
|
|
1070
|
+
t("move", s);
|
|
1067
1071
|
};
|
|
1068
1072
|
return (s, a) => (d(), b(xt, {
|
|
1069
1073
|
class: "accordion",
|
|
1070
|
-
items:
|
|
1071
|
-
"no-select":
|
|
1072
|
-
"render-title":
|
|
1074
|
+
items: o.items,
|
|
1075
|
+
"no-select": o.noSelect,
|
|
1076
|
+
"render-title": o.renderTitle,
|
|
1073
1077
|
"drop-inside": !1,
|
|
1074
1078
|
onMove: n
|
|
1075
1079
|
}, null, 8, ["items", "no-select", "render-title"]));
|
|
@@ -1108,13 +1112,13 @@ const Eo = {
|
|
|
1108
1112
|
useMinWidthLayout: Boolean
|
|
1109
1113
|
},
|
|
1110
1114
|
setup(e) {
|
|
1111
|
-
const
|
|
1112
|
-
const { fixed: n, zIndex: s, minWidth: a, height: r, paddingLeft: l, transitionDuration: i, transitionTimingFunction: c } =
|
|
1115
|
+
const t = e, o = m(() => {
|
|
1116
|
+
const { fixed: n, zIndex: s, minWidth: a, height: r, paddingLeft: l, transitionDuration: i, transitionTimingFunction: c } = t, u = n ? "fixed" : "static", h = t.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1113
1117
|
return `position:${u};z-index:${s};${h}height:${r}px;padding-left:${l}px;transition-duration:${i}ms;transition-timing-function:${c};`;
|
|
1114
1118
|
});
|
|
1115
1119
|
return (n, s) => (d(), f("header", {
|
|
1116
1120
|
class: "d-layout-header",
|
|
1117
|
-
style:
|
|
1121
|
+
style: V(o.value)
|
|
1118
1122
|
}, [
|
|
1119
1123
|
L(n.$slots, "default")
|
|
1120
1124
|
], 4));
|
|
@@ -1157,13 +1161,13 @@ const Eo = {
|
|
|
1157
1161
|
useMinWidthLayout: Boolean
|
|
1158
1162
|
},
|
|
1159
1163
|
setup(e) {
|
|
1160
|
-
const
|
|
1161
|
-
const { fixed: n, top: s, zIndex: a, minWidth: r, height: l, paddingLeft: i, transitionDuration: c, transitionTimingFunction: u } =
|
|
1164
|
+
const t = e, o = m(() => {
|
|
1165
|
+
const { fixed: n, top: s, zIndex: a, minWidth: r, height: l, paddingLeft: i, transitionDuration: c, transitionTimingFunction: u } = t, h = n ? "fixed" : "static", x = t.useMinWidthLayout ? `min-width: ${r}px;` : "";
|
|
1162
1166
|
return `position:${h};top:${s}px;z-index:${a};${x}height:${l}px;padding-left:${i}px;transition-duration:${c}ms;transition-timing-function:${u};`;
|
|
1163
1167
|
});
|
|
1164
1168
|
return (n, s) => (d(), f("div", {
|
|
1165
1169
|
class: "d-layout-tab",
|
|
1166
|
-
style:
|
|
1170
|
+
style: V(o.value)
|
|
1167
1171
|
}, [
|
|
1168
1172
|
L(n.$slots, "default")
|
|
1169
1173
|
], 4));
|
|
@@ -1202,13 +1206,13 @@ const Eo = {
|
|
|
1202
1206
|
useMinWidthLayout: Boolean
|
|
1203
1207
|
},
|
|
1204
1208
|
setup(e) {
|
|
1205
|
-
const
|
|
1206
|
-
const { fixed: n, zIndex: s, minWidth: a, height: r, paddingLeft: l, transitionDuration: i, transitionTimingFunction: c } =
|
|
1209
|
+
const t = e, o = m(() => {
|
|
1210
|
+
const { fixed: n, zIndex: s, minWidth: a, height: r, paddingLeft: l, transitionDuration: i, transitionTimingFunction: c } = t, u = n ? "fixed" : "static", h = t.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1207
1211
|
return `position:${u};z-index:${s};${h}height:${r}px;padding-left:${l}px;transition-duration:${i}ms;transition-timing-function:${c};`;
|
|
1208
1212
|
});
|
|
1209
1213
|
return (n, s) => (d(), f("footer", {
|
|
1210
1214
|
class: "d-layout-footer",
|
|
1211
|
-
style:
|
|
1215
|
+
style: V(o.value)
|
|
1212
1216
|
}, [
|
|
1213
1217
|
L(n.$slots, "default")
|
|
1214
1218
|
], 4));
|
|
@@ -1242,13 +1246,13 @@ const Eo = {
|
|
|
1242
1246
|
}
|
|
1243
1247
|
},
|
|
1244
1248
|
setup(e) {
|
|
1245
|
-
const
|
|
1246
|
-
const { zIndex: n, width: s, paddingTop: a, transitionDuration: r, transitionTimingFunction: l } =
|
|
1249
|
+
const t = e, o = m(() => {
|
|
1250
|
+
const { zIndex: n, width: s, paddingTop: a, transitionDuration: r, transitionTimingFunction: l } = t;
|
|
1247
1251
|
return `z-index:${n};width:${s}px;padding-top:${a}px;transition-duration:${r}ms;transition-timing-function:${l};`;
|
|
1248
1252
|
});
|
|
1249
1253
|
return (n, s) => (d(), f("aside", {
|
|
1250
1254
|
class: "d-layout-sidebar",
|
|
1251
|
-
style:
|
|
1255
|
+
style: V(o.value)
|
|
1252
1256
|
}, [
|
|
1253
1257
|
L(n.$slots, "default")
|
|
1254
1258
|
], 4));
|
|
@@ -1279,12 +1283,12 @@ const Eo = {
|
|
|
1279
1283
|
}
|
|
1280
1284
|
},
|
|
1281
1285
|
setup(e) {
|
|
1282
|
-
const
|
|
1283
|
-
const { paddingTop: n, paddingBottom: s, paddingLeft: a, transitionDuration: r, transitionTimingFunction: l } =
|
|
1286
|
+
const t = e, o = m(() => {
|
|
1287
|
+
const { paddingTop: n, paddingBottom: s, paddingLeft: a, transitionDuration: r, transitionTimingFunction: l } = t, i = `overflow:${t.overflowHidden ? "hidden" : "visible"};`;
|
|
1284
1288
|
return `padding-top:${n}px;padding-bottom:${s}px;padding-left:${a}px;${i}transition-duration:${r}ms;transition-timing-function:${l};`;
|
|
1285
1289
|
});
|
|
1286
1290
|
return (n, s) => (d(), f("main", {
|
|
1287
|
-
style:
|
|
1291
|
+
style: V(o.value),
|
|
1288
1292
|
class: "d-layout-content"
|
|
1289
1293
|
}, [
|
|
1290
1294
|
L(n.$slots, "default")
|
|
@@ -1292,10 +1296,10 @@ const Eo = {
|
|
|
1292
1296
|
}
|
|
1293
1297
|
};
|
|
1294
1298
|
function Ao(e) {
|
|
1295
|
-
const
|
|
1299
|
+
const t = T(0), o = m(() => `transform: translateX(${-t.value}px);`);
|
|
1296
1300
|
let n = !1;
|
|
1297
1301
|
function s(u) {
|
|
1298
|
-
|
|
1302
|
+
t.value = u;
|
|
1299
1303
|
}
|
|
1300
1304
|
function a() {
|
|
1301
1305
|
var u;
|
|
@@ -1318,7 +1322,7 @@ function Ao(e) {
|
|
|
1318
1322
|
u ? c() : i();
|
|
1319
1323
|
}, { immediate: !0 }), Et(() => {
|
|
1320
1324
|
i();
|
|
1321
|
-
}),
|
|
1325
|
+
}), o;
|
|
1322
1326
|
}
|
|
1323
1327
|
const Ho = 1001, Vo = 999, zo = 998, Cs = {
|
|
1324
1328
|
__name: "DLayoutAdmin",
|
|
@@ -1410,46 +1414,46 @@ const Ho = 1001, Vo = 999, zo = 998, Cs = {
|
|
|
1410
1414
|
}
|
|
1411
1415
|
},
|
|
1412
1416
|
emits: ["update:sidebar-collapse", "sidebar-mask-click"],
|
|
1413
|
-
setup(e, { emit:
|
|
1414
|
-
const
|
|
1415
|
-
const { transitionDuration: g, transitionTimingFunction: R } =
|
|
1417
|
+
setup(e, { emit: t }) {
|
|
1418
|
+
const o = e, n = m(() => o.useMinWidthLayout ? `min-width:${o.minWidth}px;` : ""), s = m(() => o.useMinWidthLayout && (o.fixedHeaderAndTab || o.fixedFooter)), a = Ao(s), r = m(() => o.fixedHeaderAndTab ? a.value : ""), l = m(() => o.fixedFooter ? a.value : ""), i = m(() => {
|
|
1419
|
+
const { transitionDuration: g, transitionTimingFunction: R } = o;
|
|
1416
1420
|
return {
|
|
1417
1421
|
transitionDuration: g,
|
|
1418
1422
|
transitionTimingFunction: R
|
|
1419
1423
|
};
|
|
1420
|
-
}), c = m(() =>
|
|
1424
|
+
}), c = m(() => o.mode === "vertical"), u = m(() => o.isMobile || c.value ? 1003 : 1e3), h = m({
|
|
1421
1425
|
get() {
|
|
1422
|
-
return
|
|
1426
|
+
return o.sidebarCollapse;
|
|
1423
1427
|
},
|
|
1424
1428
|
set(g) {
|
|
1425
|
-
|
|
1429
|
+
t("update:sidebar-collapse", g);
|
|
1426
1430
|
}
|
|
1427
1431
|
});
|
|
1428
1432
|
function x() {
|
|
1429
|
-
|
|
1433
|
+
t("sidebar-mask-click");
|
|
1430
1434
|
}
|
|
1431
|
-
const S = m(() =>
|
|
1432
|
-
const { transitionDuration: g, transitionTimingFunction: R } =
|
|
1433
|
-
return `background-color:${
|
|
1435
|
+
const S = m(() => o.isMobile && !h.value), N = m(() => {
|
|
1436
|
+
const { transitionDuration: g, transitionTimingFunction: R } = o;
|
|
1437
|
+
return `background-color:${o.maskBg};transition-duration:${g}ms;transition-timing-function:${R};`;
|
|
1434
1438
|
}), $ = m(() => {
|
|
1435
|
-
const { sidebarWidth: g, sidebarCollapsedWidth: R } =
|
|
1436
|
-
return
|
|
1437
|
-
}),
|
|
1438
|
-
() => !
|
|
1439
|
+
const { sidebarWidth: g, sidebarCollapsedWidth: R } = o, A = o.isMobile ? 0 : R, z = h.value ? A : g;
|
|
1440
|
+
return o.sidebarVisible ? z : 0;
|
|
1441
|
+
}), H = m(() => o.isMobile ? 0 : $.value), P = m(() => c.value ? H.value : 0), w = m(
|
|
1442
|
+
() => !o.isMobile && !c.value && o.headerVisible ? o.headerHeight : 0
|
|
1439
1443
|
), I = m(() => {
|
|
1440
1444
|
let g = 0;
|
|
1441
|
-
return
|
|
1442
|
-
}), M = m(() =>
|
|
1445
|
+
return o.fixedHeaderAndTab && (o.headerVisible && (g += o.headerHeight), o.tabVisible && (g += o.tabHeight)), g;
|
|
1446
|
+
}), M = m(() => o.fixedFooter && o.footerVisible ? o.footerHeight : 0);
|
|
1443
1447
|
return (g, R) => (d(), f("div", {
|
|
1444
1448
|
class: "d-layout",
|
|
1445
|
-
style:
|
|
1449
|
+
style: V(n.value)
|
|
1446
1450
|
}, [
|
|
1447
1451
|
e.headerVisible ? (d(), b(Bo, ue({ key: 0 }, i.value, {
|
|
1448
1452
|
fixed: e.fixedHeaderAndTab,
|
|
1449
1453
|
"z-index": Ho,
|
|
1450
1454
|
"min-width": e.minWidth,
|
|
1451
1455
|
height: e.headerHeight,
|
|
1452
|
-
"padding-left":
|
|
1456
|
+
"padding-left": P.value,
|
|
1453
1457
|
style: r.value
|
|
1454
1458
|
}), {
|
|
1455
1459
|
default: E(() => [
|
|
@@ -1463,7 +1467,7 @@ const Ho = 1001, Vo = 999, zo = 998, Cs = {
|
|
|
1463
1467
|
"min-width": e.minWidth,
|
|
1464
1468
|
top: e.headerHeight,
|
|
1465
1469
|
height: e.tabHeight,
|
|
1466
|
-
"padding-left":
|
|
1470
|
+
"padding-left": H.value,
|
|
1467
1471
|
style: r.value
|
|
1468
1472
|
}), {
|
|
1469
1473
|
default: E(() => [
|
|
@@ -1484,13 +1488,13 @@ const Ho = 1001, Vo = 999, zo = 998, Cs = {
|
|
|
1484
1488
|
S.value ? (d(), f("div", {
|
|
1485
1489
|
key: 3,
|
|
1486
1490
|
class: "d-layout-sidebar-mask",
|
|
1487
|
-
style:
|
|
1491
|
+
style: V(N.value),
|
|
1488
1492
|
onClick: x
|
|
1489
1493
|
}, null, 4)) : k("", !0),
|
|
1490
1494
|
oe(Oo, ue(i.value, {
|
|
1491
1495
|
"padding-top": I.value,
|
|
1492
1496
|
"padding-bottom": M.value,
|
|
1493
|
-
"padding-left":
|
|
1497
|
+
"padding-left": H.value,
|
|
1494
1498
|
"overflow-hidden": e.addMainOverflowHidden
|
|
1495
1499
|
}), {
|
|
1496
1500
|
default: E(() => [
|
|
@@ -1503,7 +1507,7 @@ const Ho = 1001, Vo = 999, zo = 998, Cs = {
|
|
|
1503
1507
|
"z-index": zo,
|
|
1504
1508
|
"min-width": e.minWidth,
|
|
1505
1509
|
height: e.footerHeight,
|
|
1506
|
-
"padding-left":
|
|
1510
|
+
"padding-left": H.value,
|
|
1507
1511
|
style: l.value
|
|
1508
1512
|
}), {
|
|
1509
1513
|
default: E(() => [
|
|
@@ -1541,8 +1545,8 @@ const Ho = 1001, Vo = 999, zo = 998, Cs = {
|
|
|
1541
1545
|
}
|
|
1542
1546
|
},
|
|
1543
1547
|
setup(e) {
|
|
1544
|
-
const
|
|
1545
|
-
return pe.mutations.setTheme(
|
|
1548
|
+
const t = e;
|
|
1549
|
+
return pe.mutations.setTheme(t.theme), (o, n) => L(o.$slots, "default");
|
|
1546
1550
|
}
|
|
1547
1551
|
};
|
|
1548
1552
|
const Is = {
|
|
@@ -1558,12 +1562,12 @@ const Is = {
|
|
|
1558
1562
|
}
|
|
1559
1563
|
},
|
|
1560
1564
|
setup(e) {
|
|
1561
|
-
const
|
|
1565
|
+
const t = e;
|
|
1562
1566
|
Ae((a) => ({
|
|
1563
|
-
e35a6f9a:
|
|
1567
|
+
e35a6f9a: o.value,
|
|
1564
1568
|
e35a6f98: n.value
|
|
1565
1569
|
}));
|
|
1566
|
-
const
|
|
1570
|
+
const o = m(() => t.xHide ? "hidden" : "visible"), n = m(() => t.yHide ? "hidden" : "visible"), s = (a) => {
|
|
1567
1571
|
document.body.classList.add(a), document.documentElement.classList.add(a), document.documentElement.classList.add("d-global-scroll");
|
|
1568
1572
|
};
|
|
1569
1573
|
return me(() => {
|
|
@@ -1590,14 +1594,14 @@ const Fo = {
|
|
|
1590
1594
|
}
|
|
1591
1595
|
},
|
|
1592
1596
|
setup(e) {
|
|
1593
|
-
const
|
|
1597
|
+
const t = e;
|
|
1594
1598
|
Ae((s) => ({
|
|
1595
|
-
c07fa29a:
|
|
1599
|
+
c07fa29a: o.value,
|
|
1596
1600
|
c07fa298: n.value
|
|
1597
1601
|
}));
|
|
1598
|
-
const
|
|
1602
|
+
const o = m(() => t.xHide ? "hidden" : "visible"), n = m(() => t.yHide ? "hidden" : "visible");
|
|
1599
1603
|
return (s, a) => (d(), f("div", {
|
|
1600
|
-
class: D(
|
|
1604
|
+
class: D(t.autoHide ? "d-scroll-hide" : "d-scroll")
|
|
1601
1605
|
}, [
|
|
1602
1606
|
L(s.$slots, "default", {}, void 0, !0)
|
|
1603
1607
|
], 2));
|
|
@@ -1612,15 +1616,15 @@ const Fo = {
|
|
|
1612
1616
|
// максимальная ширина диалога 500px, 100% и т.п.
|
|
1613
1617
|
},
|
|
1614
1618
|
emits: ["open", "close"],
|
|
1615
|
-
setup(e, { expose:
|
|
1619
|
+
setup(e, { expose: t, emit: o }) {
|
|
1616
1620
|
const n = e, s = T(null), a = T(!1);
|
|
1617
1621
|
a.value = n == null ? void 0 : n.show;
|
|
1618
1622
|
const r = () => {
|
|
1619
|
-
a.value = !0,
|
|
1623
|
+
a.value = !0, o("open", s);
|
|
1620
1624
|
}, l = () => {
|
|
1621
|
-
a.value = !1,
|
|
1625
|
+
a.value = !1, o("close", s);
|
|
1622
1626
|
};
|
|
1623
|
-
return
|
|
1627
|
+
return t({
|
|
1624
1628
|
show: r,
|
|
1625
1629
|
hide: l
|
|
1626
1630
|
}), (i, c) => {
|
|
@@ -1636,7 +1640,7 @@ const Fo = {
|
|
|
1636
1640
|
}, [
|
|
1637
1641
|
_("div", {
|
|
1638
1642
|
class: "modal-dialog",
|
|
1639
|
-
style:
|
|
1643
|
+
style: V({ width: n.width, maxWidth: n.maxWidth })
|
|
1640
1644
|
}, [
|
|
1641
1645
|
_("div", Wo, [
|
|
1642
1646
|
_("div", Po, [
|
|
@@ -1665,21 +1669,21 @@ const Fo = {
|
|
|
1665
1669
|
function Me(e) {
|
|
1666
1670
|
e === void 0 && (e = ce.value.comp.returnValue()), ce.value.resolve(e), ce.value = null;
|
|
1667
1671
|
}
|
|
1668
|
-
function kt(e,
|
|
1672
|
+
function kt(e, t, o = "default") {
|
|
1669
1673
|
return new Promise((n) => {
|
|
1670
1674
|
ce.value = {
|
|
1671
1675
|
dialog: e,
|
|
1672
|
-
props:
|
|
1673
|
-
wrapper:
|
|
1676
|
+
props: t,
|
|
1677
|
+
wrapper: o,
|
|
1674
1678
|
resolve: n
|
|
1675
1679
|
};
|
|
1676
1680
|
});
|
|
1677
1681
|
}
|
|
1678
|
-
var Uo = (e,
|
|
1679
|
-
const
|
|
1680
|
-
for (const [n, s] of
|
|
1681
|
-
|
|
1682
|
-
return
|
|
1682
|
+
var Uo = (e, t) => {
|
|
1683
|
+
const o = e.__vccOpts || e;
|
|
1684
|
+
for (const [n, s] of t)
|
|
1685
|
+
o[n] = s;
|
|
1686
|
+
return o;
|
|
1683
1687
|
};
|
|
1684
1688
|
const qo = Mt({
|
|
1685
1689
|
name: "DialogWrapper",
|
|
@@ -1701,7 +1705,7 @@ const qo = Mt({
|
|
|
1701
1705
|
};
|
|
1702
1706
|
}
|
|
1703
1707
|
});
|
|
1704
|
-
function Go(e,
|
|
1708
|
+
function Go(e, t, o, n, s, a) {
|
|
1705
1709
|
return d(), b(Ne, pt(ft(e.transitionAttrs)), {
|
|
1706
1710
|
default: E(() => [
|
|
1707
1711
|
e.dialogRef && e.dialogRef.wrapper === e.name ? (d(), b(Y(e.dialogRef.dialog), ue({ key: 0 }, e.dialogRef.props, { ref: "dialogInstance" }), null, 16)) : k("", !0)
|
|
@@ -1716,17 +1720,17 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1716
1720
|
title: String,
|
|
1717
1721
|
message: String
|
|
1718
1722
|
},
|
|
1719
|
-
setup(e, { expose:
|
|
1720
|
-
const
|
|
1721
|
-
return
|
|
1723
|
+
setup(e, { expose: t }) {
|
|
1724
|
+
const o = e;
|
|
1725
|
+
return t({
|
|
1722
1726
|
returnValue: () => !0
|
|
1723
1727
|
}), (s, a) => (d(), f("div", null, [
|
|
1724
1728
|
oe($t, { show: !0 }, {
|
|
1725
1729
|
"modal-title": E(() => [
|
|
1726
|
-
K(O(
|
|
1730
|
+
K(O(o.title), 1)
|
|
1727
1731
|
]),
|
|
1728
1732
|
default: E(() => [
|
|
1729
|
-
K(O(
|
|
1733
|
+
K(O(o.message), 1)
|
|
1730
1734
|
]),
|
|
1731
1735
|
"modal-footer": E(() => [
|
|
1732
1736
|
_("div", Ko, [
|
|
@@ -1750,17 +1754,17 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1750
1754
|
title: String,
|
|
1751
1755
|
message: String
|
|
1752
1756
|
},
|
|
1753
|
-
setup(e, { expose:
|
|
1754
|
-
const
|
|
1755
|
-
return
|
|
1757
|
+
setup(e, { expose: t }) {
|
|
1758
|
+
const o = e;
|
|
1759
|
+
return t({
|
|
1756
1760
|
returnValue: () => !0
|
|
1757
1761
|
}), (s, a) => (d(), f("div", null, [
|
|
1758
1762
|
oe($t, { show: !0 }, {
|
|
1759
1763
|
"modal-title": E(() => [
|
|
1760
|
-
K(O(
|
|
1764
|
+
K(O(o.title), 1)
|
|
1761
1765
|
]),
|
|
1762
1766
|
default: E(() => [
|
|
1763
|
-
K(O(
|
|
1767
|
+
K(O(o.message), 1)
|
|
1764
1768
|
]),
|
|
1765
1769
|
"modal-footer": E(() => [
|
|
1766
1770
|
_("div", Qo, [
|
|
@@ -1806,20 +1810,20 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1806
1810
|
}
|
|
1807
1811
|
},
|
|
1808
1812
|
emits: ["select", "click"],
|
|
1809
|
-
setup(e, { expose:
|
|
1813
|
+
setup(e, { expose: t, emit: o }) {
|
|
1810
1814
|
const n = e, s = Ce(), a = T(null), r = T(null), l = T(0), i = T(0), c = (S) => {
|
|
1811
|
-
if (
|
|
1815
|
+
if (o("click", S), a.value.isShowed()) {
|
|
1812
1816
|
a.value.hide();
|
|
1813
1817
|
return;
|
|
1814
1818
|
}
|
|
1815
1819
|
a.value.show(), ht(() => {
|
|
1816
|
-
const N = a.value.elementSize(), $ = r.value.elementSize(),
|
|
1817
|
-
l.value =
|
|
1820
|
+
const N = a.value.elementSize(), $ = r.value.elementSize(), H = window.innerWidth, P = window.innerHeight;
|
|
1821
|
+
l.value = H - ($.x + $.width) < N.width ? $.left - N.width + $.width : $.left, i.value = P - ($.y + $.height) < N.height ? $.top - N.height - 5 : $.height + $.top + 5;
|
|
1818
1822
|
});
|
|
1819
1823
|
}, u = (S) => {
|
|
1820
|
-
|
|
1824
|
+
o("select", S);
|
|
1821
1825
|
}, h = m(() => ({ left: l.value + "px", top: i.value + "px", position: n.bodyAsParent ? "absolute" : "fixed", ...n.menuStyle }));
|
|
1822
|
-
|
|
1826
|
+
t({
|
|
1823
1827
|
show: c
|
|
1824
1828
|
});
|
|
1825
1829
|
const x = (S) => !!s[S];
|
|
@@ -1851,7 +1855,7 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1851
1855
|
ref: a,
|
|
1852
1856
|
items: n.items,
|
|
1853
1857
|
class: "dropdown-menu",
|
|
1854
|
-
style:
|
|
1858
|
+
style: V(h.value),
|
|
1855
1859
|
"no-select": !0,
|
|
1856
1860
|
onSelect: u,
|
|
1857
1861
|
"render-item-title": n.renderItemTitle,
|
|
@@ -1861,7 +1865,7 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1861
1865
|
]));
|
|
1862
1866
|
}
|
|
1863
1867
|
}, on = {}, nn = { class: "d-panel" };
|
|
1864
|
-
function sn(e,
|
|
1868
|
+
function sn(e, t) {
|
|
1865
1869
|
return d(), f("div", nn, [
|
|
1866
1870
|
L(e.$slots, "default")
|
|
1867
1871
|
]);
|
|
@@ -1869,18 +1873,18 @@ function sn(e, o) {
|
|
|
1869
1873
|
const an = /* @__PURE__ */ re(on, [["render", sn]]), rn = { class: "card-header" }, ln = { class: "modal-title" }, dn = { class: "card-body" }, cn = { class: "card-footer" }, Ms = {
|
|
1870
1874
|
__name: "DCard",
|
|
1871
1875
|
setup(e) {
|
|
1872
|
-
return (
|
|
1876
|
+
return (t, o) => (d(), b(an, { class: "d-card" }, {
|
|
1873
1877
|
default: E(() => [
|
|
1874
1878
|
_("div", rn, [
|
|
1875
1879
|
_("h5", ln, [
|
|
1876
|
-
L(
|
|
1880
|
+
L(t.$slots, "title")
|
|
1877
1881
|
])
|
|
1878
1882
|
]),
|
|
1879
1883
|
_("div", dn, [
|
|
1880
|
-
L(
|
|
1884
|
+
L(t.$slots, "default")
|
|
1881
1885
|
]),
|
|
1882
1886
|
_("div", cn, [
|
|
1883
|
-
L(
|
|
1887
|
+
L(t.$slots, "footer")
|
|
1884
1888
|
])
|
|
1885
1889
|
]),
|
|
1886
1890
|
_: 3
|
|
@@ -1888,8 +1892,8 @@ const an = /* @__PURE__ */ re(on, [["render", sn]]), rn = { class: "card-header"
|
|
|
1888
1892
|
}
|
|
1889
1893
|
}, un = /* @__PURE__ */ new Map();
|
|
1890
1894
|
class pn {
|
|
1891
|
-
constructor(
|
|
1892
|
-
this.remaining =
|
|
1895
|
+
constructor(t, o, n) {
|
|
1896
|
+
this.remaining = o, this.callback = t, this.notifyItem = n, this.resume();
|
|
1893
1897
|
}
|
|
1894
1898
|
pause() {
|
|
1895
1899
|
clearTimeout(this.notifyItem.timer), this.remaining -= Date.now() - this.start;
|
|
@@ -1921,11 +1925,11 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
1921
1925
|
type: e,
|
|
1922
1926
|
value: 0
|
|
1923
1927
|
};
|
|
1924
|
-
for (let
|
|
1925
|
-
const
|
|
1926
|
-
if (
|
|
1928
|
+
for (let t = 0; t < it.length; t++) {
|
|
1929
|
+
const o = it[t];
|
|
1930
|
+
if (o.regexp.test(e))
|
|
1927
1931
|
return {
|
|
1928
|
-
type:
|
|
1932
|
+
type: o.name,
|
|
1929
1933
|
value: parseFloat(e)
|
|
1930
1934
|
};
|
|
1931
1935
|
}
|
|
@@ -1947,10 +1951,10 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
1947
1951
|
y: /* @__PURE__ */ new Set(["top", "bottom"])
|
|
1948
1952
|
}, hn = ((e) => () => e++)(0), gn = (e) => typeof e != "string" ? [] : e.split(/\s+/gi).filter(Boolean), vn = (e) => {
|
|
1949
1953
|
typeof e == "string" && (e = gn(e));
|
|
1950
|
-
let
|
|
1954
|
+
let t = null, o = null;
|
|
1951
1955
|
return e.forEach((n) => {
|
|
1952
|
-
rt.y.has(n) && (
|
|
1953
|
-
}), { x:
|
|
1956
|
+
rt.y.has(n) && (o = n), rt.x.has(n) && (t = n);
|
|
1957
|
+
}), { x: t, y: o };
|
|
1954
1958
|
}, Be = {
|
|
1955
1959
|
position: ["top", "right"],
|
|
1956
1960
|
cssAnimation: "fade",
|
|
@@ -1967,18 +1971,18 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
1967
1971
|
}, yn = {
|
|
1968
1972
|
__name: "VelocityGroup",
|
|
1969
1973
|
emits: ["enter", "leave", "after-leave"],
|
|
1970
|
-
setup(e, { emit:
|
|
1971
|
-
const
|
|
1972
|
-
|
|
1974
|
+
setup(e, { emit: t }) {
|
|
1975
|
+
const o = (a, r) => {
|
|
1976
|
+
t("enter", a, r);
|
|
1973
1977
|
}, n = (a, r) => {
|
|
1974
|
-
|
|
1978
|
+
t("leave", a, r);
|
|
1975
1979
|
}, s = () => {
|
|
1976
|
-
|
|
1980
|
+
t("after-leave");
|
|
1977
1981
|
};
|
|
1978
1982
|
return (a, r) => (d(), b(yt, {
|
|
1979
1983
|
tag: "span",
|
|
1980
1984
|
css: !1,
|
|
1981
|
-
onEnter:
|
|
1985
|
+
onEnter: o,
|
|
1982
1986
|
onLeave: n,
|
|
1983
1987
|
onAfterLeave: s
|
|
1984
1988
|
}, {
|
|
@@ -1996,13 +2000,13 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
1996
2000
|
name: String
|
|
1997
2001
|
},
|
|
1998
2002
|
setup(e) {
|
|
1999
|
-
const
|
|
2000
|
-
return (
|
|
2003
|
+
const t = e;
|
|
2004
|
+
return (o, n) => (d(), b(yt, {
|
|
2001
2005
|
tag: "span",
|
|
2002
|
-
name:
|
|
2006
|
+
name: t.name
|
|
2003
2007
|
}, {
|
|
2004
2008
|
default: E(() => [
|
|
2005
|
-
L(
|
|
2009
|
+
L(o.$slots, "default")
|
|
2006
2010
|
]),
|
|
2007
2011
|
_: 3
|
|
2008
2012
|
}, 8, ["name"]));
|
|
@@ -2079,99 +2083,99 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2079
2083
|
}
|
|
2080
2084
|
},
|
|
2081
2085
|
emits: ["click", "destroy", "start"],
|
|
2082
|
-
setup(e, { emit:
|
|
2083
|
-
const
|
|
2086
|
+
setup(e, { emit: t }) {
|
|
2087
|
+
const o = e, n = {
|
|
2084
2088
|
IDLE: 0,
|
|
2085
2089
|
DESTROYED: 2
|
|
2086
|
-
}, s = T([]), a = T(null), r = T(un.get("velocity")), l = m(() =>
|
|
2087
|
-
const { x: p, y:
|
|
2090
|
+
}, s = T([]), a = T(null), r = T(un.get("velocity")), l = m(() => o.animationType === "velocity"), i = m(() => l.value ? yn : _n), c = m(() => s.value.filter((p) => p.state !== n.DESTROYED)), u = m(() => mn(o.width)), h = m(() => {
|
|
2091
|
+
const { x: p, y: W } = vn(o.position), C = u.value.value, G = u.value.type, ne = {
|
|
2088
2092
|
width: C + G
|
|
2089
2093
|
};
|
|
2090
|
-
return
|
|
2094
|
+
return W && (ne[W] = "0px"), p && (p === "center" ? ne.left = `calc(50% - ${+C / 2}${G})` : ne[p] = "0px"), ne;
|
|
2091
2095
|
}), x = m(() => "bottom" in h.value), S = (p) => {
|
|
2092
|
-
|
|
2096
|
+
t("click", p), o.closeOnClick && M(p);
|
|
2093
2097
|
}, N = () => {
|
|
2094
2098
|
var p;
|
|
2095
|
-
|
|
2099
|
+
o.pauseOnHover && ((p = a.value) == null || p.pause());
|
|
2096
2100
|
}, $ = () => {
|
|
2097
2101
|
var p;
|
|
2098
|
-
|
|
2099
|
-
},
|
|
2100
|
-
if (p.group || (p.group = ""), p.data || (p.data = {}),
|
|
2102
|
+
o.pauseOnHover && ((p = a.value) == null || p.resume());
|
|
2103
|
+
}, H = (p) => {
|
|
2104
|
+
if (p.group || (p.group = ""), p.data || (p.data = {}), o.group !== p.group)
|
|
2101
2105
|
return;
|
|
2102
2106
|
if (p.clean || p.clear) {
|
|
2103
2107
|
R();
|
|
2104
2108
|
return;
|
|
2105
2109
|
}
|
|
2106
|
-
const
|
|
2110
|
+
const W = typeof p.duration == "number" ? p.duration : o.duration, C = typeof p.speed == "number" ? p.speed : o.speed, G = typeof p.ignoreDuplicates == "boolean" ? p.ignoreDuplicates : o.ignoreDuplicates, { title: ne, text: ve, type: ye, data: _e, id: be } = p, Q = {
|
|
2107
2111
|
id: be || hn(),
|
|
2108
2112
|
title: ne,
|
|
2109
2113
|
text: ve,
|
|
2110
2114
|
type: ye,
|
|
2111
2115
|
state: n.IDLE,
|
|
2112
2116
|
speed: C,
|
|
2113
|
-
length:
|
|
2117
|
+
length: W + 2 * C,
|
|
2114
2118
|
data: _e
|
|
2115
2119
|
};
|
|
2116
|
-
|
|
2117
|
-
const xe =
|
|
2120
|
+
W >= 0 && (a.value = new pn(() => M(Q), Q.length, Q));
|
|
2121
|
+
const xe = o.reverse ? !x.value : x.value;
|
|
2118
2122
|
let le = -1;
|
|
2119
2123
|
const $e = c.value.some((he) => he.title === p.title && he.text === p.text);
|
|
2120
|
-
(!G || !$e) && (xe ? (s.value.push(Q),
|
|
2121
|
-
},
|
|
2124
|
+
(!G || !$e) && (xe ? (s.value.push(Q), t("start", Q), c.value.length > o.max && (le = 0)) : (s.value.unshift(Q), t("start", Q), c.value.length > o.max && (le = c.value.length - 1)), le !== -1 && M(c.value[le]));
|
|
2125
|
+
}, P = (p) => {
|
|
2122
2126
|
g(p);
|
|
2123
2127
|
}, w = (p) => [
|
|
2124
2128
|
"d-notification-template",
|
|
2125
|
-
|
|
2129
|
+
o.classes,
|
|
2126
2130
|
p.type || ""
|
|
2127
2131
|
], I = (p) => l.value ? void 0 : { transition: `all ${p.speed}ms` }, M = (p) => {
|
|
2128
|
-
clearTimeout(p.timer), p.state = n.DESTROYED,
|
|
2132
|
+
clearTimeout(p.timer), p.state = n.DESTROYED, F(), t("destroy", p);
|
|
2129
2133
|
}, g = (p) => {
|
|
2130
|
-
const
|
|
2131
|
-
|
|
2134
|
+
const W = s.value.find((C) => C.id === p);
|
|
2135
|
+
W && M(W);
|
|
2132
2136
|
}, R = () => {
|
|
2133
2137
|
c.value.forEach(M);
|
|
2134
|
-
},
|
|
2138
|
+
}, A = (p, W) => {
|
|
2135
2139
|
var G;
|
|
2136
|
-
const C = (G =
|
|
2137
|
-
return typeof C == "function" ? C(
|
|
2138
|
-
},
|
|
2140
|
+
const C = (G = o.animation) == null ? void 0 : G[p];
|
|
2141
|
+
return typeof C == "function" ? C(W) : C;
|
|
2142
|
+
}, z = (p, W) => {
|
|
2139
2143
|
if (!l.value)
|
|
2140
2144
|
return;
|
|
2141
|
-
const C =
|
|
2145
|
+
const C = A("enter", p);
|
|
2142
2146
|
r.value(p, C, {
|
|
2143
|
-
duration:
|
|
2144
|
-
complete:
|
|
2147
|
+
duration: o.speed,
|
|
2148
|
+
complete: W
|
|
2145
2149
|
});
|
|
2146
|
-
}, y = (p,
|
|
2150
|
+
}, y = (p, W) => {
|
|
2147
2151
|
if (!l.value)
|
|
2148
2152
|
return;
|
|
2149
|
-
const C =
|
|
2153
|
+
const C = A("leave", p);
|
|
2150
2154
|
r.value(p, C, {
|
|
2151
|
-
duration:
|
|
2152
|
-
complete:
|
|
2155
|
+
duration: o.speed,
|
|
2156
|
+
complete: W
|
|
2153
2157
|
});
|
|
2154
2158
|
};
|
|
2155
|
-
function
|
|
2159
|
+
function F() {
|
|
2156
2160
|
s.value = s.value.filter((p) => p.state !== n.DESTROYED);
|
|
2157
2161
|
}
|
|
2158
2162
|
return me(() => {
|
|
2159
|
-
|
|
2160
|
-
}), (p,
|
|
2163
|
+
U.on("notification-add", H), U.on("notification-close", P);
|
|
2164
|
+
}), (p, W) => (d(), f("div", {
|
|
2161
2165
|
class: "d-notification-group",
|
|
2162
|
-
style:
|
|
2166
|
+
style: V(h.value)
|
|
2163
2167
|
}, [
|
|
2164
2168
|
(d(), b(Y(i.value), {
|
|
2165
2169
|
name: e.animationName,
|
|
2166
|
-
onEnter:
|
|
2170
|
+
onEnter: z,
|
|
2167
2171
|
onLeave: y,
|
|
2168
|
-
onAfterLeave:
|
|
2172
|
+
onAfterLeave: F
|
|
2169
2173
|
}, {
|
|
2170
2174
|
default: E(() => [
|
|
2171
2175
|
(d(!0), f(ie, null, ge(c.value, (C) => (d(), f("div", {
|
|
2172
2176
|
key: C.id,
|
|
2173
2177
|
class: "d-notification-wrapper",
|
|
2174
|
-
style:
|
|
2178
|
+
style: V(I(C)),
|
|
2175
2179
|
"data-id": C.id,
|
|
2176
2180
|
onMouseenter: N,
|
|
2177
2181
|
onMouseleave: $
|
|
@@ -2217,18 +2221,18 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2217
2221
|
type: String
|
|
2218
2222
|
},
|
|
2219
2223
|
emits: ["click"],
|
|
2220
|
-
setup(e, { emit:
|
|
2221
|
-
const
|
|
2224
|
+
setup(e, { emit: t }) {
|
|
2225
|
+
const o = e, n = m(() => o.icon ? te.getters.getIcon(o.icon) : null);
|
|
2222
2226
|
return (s, a) => (d(), f("div", {
|
|
2223
|
-
class: D(["d-info-progress",
|
|
2224
|
-
style:
|
|
2227
|
+
class: D(["d-info-progress", o.type ? `d-info-progress-${o.type}` : null]),
|
|
2228
|
+
style: V(o.style),
|
|
2225
2229
|
onClick: a[0] || (a[0] = (r) => {
|
|
2226
|
-
|
|
2230
|
+
t("click", r);
|
|
2227
2231
|
})
|
|
2228
2232
|
}, [
|
|
2229
2233
|
_("div", Dn, [
|
|
2230
2234
|
_("div", Tn, [
|
|
2231
|
-
|
|
2235
|
+
o.icon ? (d(), b(Y(de), {
|
|
2232
2236
|
key: 0,
|
|
2233
2237
|
component: n.value,
|
|
2234
2238
|
color: "inherit",
|
|
@@ -2239,7 +2243,7 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2239
2243
|
_("div", Cn, [
|
|
2240
2244
|
_("div", {
|
|
2241
2245
|
class: "d-info-progress-line",
|
|
2242
|
-
style:
|
|
2246
|
+
style: V("width: " + o.progress + "%;")
|
|
2243
2247
|
}, null, 4),
|
|
2244
2248
|
_("div", {
|
|
2245
2249
|
class: "d-info-progress-label",
|
|
@@ -2261,11 +2265,11 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2261
2265
|
checked: Boolean
|
|
2262
2266
|
},
|
|
2263
2267
|
emits: ["update:modelValue"],
|
|
2264
|
-
setup(e, { emit:
|
|
2265
|
-
const
|
|
2266
|
-
get: () =>
|
|
2268
|
+
setup(e, { emit: t }) {
|
|
2269
|
+
const o = e, s = gt().uid, a = m({
|
|
2270
|
+
get: () => o.modelValue,
|
|
2267
2271
|
set: (r) => {
|
|
2268
|
-
|
|
2272
|
+
t("update:modelValue", r);
|
|
2269
2273
|
}
|
|
2270
2274
|
});
|
|
2271
2275
|
return (r, l) => (d(), f("div", In, [
|
|
@@ -2273,28 +2277,28 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2273
2277
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => a.value = i),
|
|
2274
2278
|
id: `i-${B(s)}`,
|
|
2275
2279
|
type: "checkbox",
|
|
2276
|
-
checked:
|
|
2277
|
-
disabled:
|
|
2278
|
-
onChange: l[1] || (l[1] = (...i) =>
|
|
2280
|
+
checked: o.checked,
|
|
2281
|
+
disabled: o.disabled,
|
|
2282
|
+
onChange: l[1] || (l[1] = (...i) => o.change && o.change(...i))
|
|
2279
2283
|
}, null, 40, En), [
|
|
2280
2284
|
[Nt, a.value]
|
|
2281
2285
|
]),
|
|
2282
2286
|
_("label", {
|
|
2283
2287
|
for: `i-${B(s)}`
|
|
2284
|
-
}, O(
|
|
2288
|
+
}, O(o.label), 9, Bn)
|
|
2285
2289
|
]));
|
|
2286
2290
|
}
|
|
2287
2291
|
};
|
|
2288
|
-
async function Mn(e,
|
|
2289
|
-
return await kt(en, { title: e, message:
|
|
2292
|
+
async function Mn(e, t) {
|
|
2293
|
+
return await kt(en, { title: e, message: t });
|
|
2290
2294
|
}
|
|
2291
|
-
async function Nn(e,
|
|
2292
|
-
return await kt(Jo, { title: e, message:
|
|
2295
|
+
async function Nn(e, t) {
|
|
2296
|
+
return await kt(Jo, { title: e, message: t });
|
|
2293
2297
|
}
|
|
2294
2298
|
const As = {
|
|
2295
2299
|
__name: "DDialogProvider",
|
|
2296
2300
|
setup(e) {
|
|
2297
|
-
return window.alert = Nn, window.confirm = Mn, (
|
|
2301
|
+
return window.alert = Nn, window.confirm = Mn, (t, o) => (d(), b(B(Zo)));
|
|
2298
2302
|
}
|
|
2299
2303
|
}, Rn = { class: "d-select" }, On = {
|
|
2300
2304
|
key: 0,
|
|
@@ -2310,26 +2314,26 @@ const As = {
|
|
|
2310
2314
|
// small, larger
|
|
2311
2315
|
},
|
|
2312
2316
|
emits: ["update:modelValue"],
|
|
2313
|
-
setup(e, { emit:
|
|
2314
|
-
const
|
|
2315
|
-
get: () =>
|
|
2317
|
+
setup(e, { emit: t }) {
|
|
2318
|
+
const o = e, n = m(() => o.scale ? "d-select-" + o.scale : ""), s = m({
|
|
2319
|
+
get: () => o.modelValue,
|
|
2316
2320
|
set: (a) => {
|
|
2317
|
-
|
|
2321
|
+
t("update:modelValue", a);
|
|
2318
2322
|
}
|
|
2319
2323
|
});
|
|
2320
|
-
for (let a = 0; a <
|
|
2321
|
-
if (
|
|
2322
|
-
s.value =
|
|
2324
|
+
for (let a = 0; a < o.options.length; a++)
|
|
2325
|
+
if (o.options[a].selected) {
|
|
2326
|
+
s.value = o.options[a].value;
|
|
2323
2327
|
break;
|
|
2324
2328
|
}
|
|
2325
2329
|
return (a, r) => (d(), f("div", Rn, [
|
|
2326
|
-
|
|
2330
|
+
o.label ? (d(), f("div", On, O(o.label), 1)) : k("", !0),
|
|
2327
2331
|
J(_("select", {
|
|
2328
2332
|
"onUpdate:modelValue": r[0] || (r[0] = (l) => s.value = l),
|
|
2329
2333
|
class: D(n.value),
|
|
2330
|
-
style:
|
|
2334
|
+
style: V(o.size === "wide" ? "width:100%" : "")
|
|
2331
2335
|
}, [
|
|
2332
|
-
(d(!0), f(ie, null, ge(
|
|
2336
|
+
(d(!0), f(ie, null, ge(o.options, (l, i) => (d(), f("option", {
|
|
2333
2337
|
key: i,
|
|
2334
2338
|
value: l.value,
|
|
2335
2339
|
selected: l.selected,
|
|
@@ -2346,16 +2350,16 @@ const As = {
|
|
|
2346
2350
|
tab: Object
|
|
2347
2351
|
},
|
|
2348
2352
|
setup(e) {
|
|
2349
|
-
const
|
|
2350
|
-
return (
|
|
2353
|
+
const t = e;
|
|
2354
|
+
return (o, n) => t.tab.label ? (d(), f("span", {
|
|
2351
2355
|
key: 0,
|
|
2352
|
-
title:
|
|
2353
|
-
}, O(
|
|
2356
|
+
title: t.tab.title ? t.tab.title : ""
|
|
2357
|
+
}, O(t.tab.label), 9, Hn)) : t.tab.icon ? (d(), f("span", {
|
|
2354
2358
|
key: 1,
|
|
2355
|
-
title:
|
|
2359
|
+
title: t.tab.title ? t.tab.title : ""
|
|
2356
2360
|
}, [
|
|
2357
2361
|
oe(B(de), {
|
|
2358
|
-
component:
|
|
2362
|
+
component: t.tab.icon
|
|
2359
2363
|
}, null, 8, ["component"])
|
|
2360
2364
|
], 8, Vn)) : k("", !0);
|
|
2361
2365
|
}
|
|
@@ -2366,12 +2370,12 @@ const Fn = { class: "d-tabs" }, Wn = {
|
|
|
2366
2370
|
tabs: Array
|
|
2367
2371
|
},
|
|
2368
2372
|
setup(e) {
|
|
2369
|
-
const
|
|
2373
|
+
const o = Ot(e, "tabs"), n = T(0), s = (a) => {
|
|
2370
2374
|
n.value = a;
|
|
2371
2375
|
};
|
|
2372
2376
|
return (a, r) => (d(), f(ie, null, [
|
|
2373
2377
|
_("div", Fn, [
|
|
2374
|
-
(d(!0), f(ie, null, ge(
|
|
2378
|
+
(d(!0), f(ie, null, ge(o.value, (l, i) => (d(), b(zn, {
|
|
2375
2379
|
index: i,
|
|
2376
2380
|
tab: l,
|
|
2377
2381
|
class: D(["d-tab-title", i === n.value ? "active" : ""]),
|
|
@@ -2379,7 +2383,7 @@ const Fn = { class: "d-tabs" }, Wn = {
|
|
|
2379
2383
|
}, null, 8, ["index", "tab", "class", "onClick"]))), 256))
|
|
2380
2384
|
]),
|
|
2381
2385
|
(d(), b(At, null, [
|
|
2382
|
-
(d(), b(Y(
|
|
2386
|
+
(d(), b(Y(o.value[n.value].component)))
|
|
2383
2387
|
], 1024))
|
|
2384
2388
|
], 64));
|
|
2385
2389
|
}
|
|
@@ -2402,7 +2406,7 @@ const Pn = { class: "d-grid" }, jn = {
|
|
|
2402
2406
|
colXxl: String
|
|
2403
2407
|
},
|
|
2404
2408
|
setup(e) {
|
|
2405
|
-
const
|
|
2409
|
+
const t = e;
|
|
2406
2410
|
Ae((u) => ({
|
|
2407
2411
|
"09eba472": i[0],
|
|
2408
2412
|
"09eba434": i[1],
|
|
@@ -2410,9 +2414,9 @@ const Pn = { class: "d-grid" }, jn = {
|
|
|
2410
2414
|
"09eba3b8": i[3],
|
|
2411
2415
|
"09eba37a": i[4],
|
|
2412
2416
|
"09eba33c": i[5],
|
|
2413
|
-
"898eb2ac":
|
|
2417
|
+
"898eb2ac": t.gap
|
|
2414
2418
|
}));
|
|
2415
|
-
const { colXs:
|
|
2419
|
+
const { colXs: o, colSm: n, colMd: s, colLg: a, colXl: r, colXxl: l } = Ht(t), i = [o.value, n.value, s.value, a.value, r.value, l.value];
|
|
2416
2420
|
let c = null;
|
|
2417
2421
|
for (let u = 0; u < i.length; u++)
|
|
2418
2422
|
c || (c = i[0]), u > 0 && (i[u] ? c = i[u] : i[u] = c);
|
|
@@ -2432,19 +2436,19 @@ const Pn = { class: "d-grid" }, jn = {
|
|
|
2432
2436
|
radius: String
|
|
2433
2437
|
},
|
|
2434
2438
|
setup(e) {
|
|
2435
|
-
const
|
|
2439
|
+
const t = e, o = T(null), n = new Image();
|
|
2436
2440
|
return n.onload = () => {
|
|
2437
|
-
|
|
2441
|
+
o.value = n.src;
|
|
2438
2442
|
}, n.onerror = () => {
|
|
2439
|
-
|
|
2443
|
+
o.value = t.srcFail;
|
|
2440
2444
|
}, me(() => {
|
|
2441
|
-
n.src =
|
|
2442
|
-
}), (s, a) =>
|
|
2445
|
+
n.src = t.src;
|
|
2446
|
+
}), (s, a) => o.value ? (d(), f("img", {
|
|
2443
2447
|
key: 0,
|
|
2444
|
-
src:
|
|
2445
|
-
alt:
|
|
2446
|
-
title:
|
|
2447
|
-
style:
|
|
2448
|
+
src: o.value,
|
|
2449
|
+
alt: t.alt,
|
|
2450
|
+
title: t.title,
|
|
2451
|
+
style: V({ width: t.width, height: t.height, borderRadius: t.radius })
|
|
2448
2452
|
}, null, 12, Xn)) : k("", !0);
|
|
2449
2453
|
}
|
|
2450
2454
|
};
|
|
@@ -2470,11 +2474,11 @@ const Yn = { class: "d-textarea" }, Un = {
|
|
|
2470
2474
|
focus: Boolean
|
|
2471
2475
|
},
|
|
2472
2476
|
emits: ["update:modelValue"],
|
|
2473
|
-
setup(e, { expose:
|
|
2477
|
+
setup(e, { expose: t, emit: o }) {
|
|
2474
2478
|
const n = e, s = T(null), a = m(() => n.scale === "small" ? "d-textarea-small" : n.scale === "large" ? "d-textarea-large" : ""), r = m({
|
|
2475
2479
|
get: () => n.modelValue,
|
|
2476
2480
|
set: (i) => {
|
|
2477
|
-
|
|
2481
|
+
o("update:modelValue", i);
|
|
2478
2482
|
}
|
|
2479
2483
|
});
|
|
2480
2484
|
me(() => {
|
|
@@ -2483,7 +2487,7 @@ const Yn = { class: "d-textarea" }, Un = {
|
|
|
2483
2487
|
const l = () => {
|
|
2484
2488
|
s.value.focus();
|
|
2485
2489
|
};
|
|
2486
|
-
return
|
|
2490
|
+
return t({
|
|
2487
2491
|
focus: l
|
|
2488
2492
|
}), (i, c) => (d(), f("div", Yn, [
|
|
2489
2493
|
n.label ? (d(), f("div", Un, O(n.label), 1)) : k("", !0),
|
|
@@ -2503,32 +2507,32 @@ const Yn = { class: "d-textarea" }, Un = {
|
|
|
2503
2507
|
}
|
|
2504
2508
|
}, Ws = /* @__PURE__ */ re(Gn, [["__scopeId", "data-v-0e805d5d"]]);
|
|
2505
2509
|
class Ps {
|
|
2506
|
-
constructor(
|
|
2507
|
-
this.fields =
|
|
2510
|
+
constructor(t) {
|
|
2511
|
+
this.fields = t;
|
|
2508
2512
|
}
|
|
2509
2513
|
validate() {
|
|
2510
|
-
let
|
|
2511
|
-
for (let
|
|
2512
|
-
this.fields[
|
|
2513
|
-
return !
|
|
2514
|
+
let t = !1;
|
|
2515
|
+
for (let o in this.fields)
|
|
2516
|
+
this.fields[o].ref.value.validate() === !0 && (t = !0);
|
|
2517
|
+
return !t;
|
|
2514
2518
|
}
|
|
2515
2519
|
}
|
|
2516
2520
|
class Zn {
|
|
2517
|
-
validate(
|
|
2518
|
-
return this._isValidURL(
|
|
2521
|
+
validate(t, o = "https") {
|
|
2522
|
+
return this._isValidURL(t) || (t = o + "://" + t), this._isValidURL(t);
|
|
2519
2523
|
}
|
|
2520
|
-
message(
|
|
2524
|
+
message(t, o) {
|
|
2521
2525
|
let n = "";
|
|
2522
|
-
switch (
|
|
2526
|
+
switch (t) {
|
|
2523
2527
|
case "url":
|
|
2524
|
-
n =
|
|
2528
|
+
n = o;
|
|
2525
2529
|
break;
|
|
2526
2530
|
}
|
|
2527
2531
|
return n;
|
|
2528
2532
|
}
|
|
2529
|
-
_isValidURL(
|
|
2533
|
+
_isValidURL(t) {
|
|
2530
2534
|
try {
|
|
2531
|
-
return new URL(
|
|
2535
|
+
return new URL(t), !0;
|
|
2532
2536
|
} catch {
|
|
2533
2537
|
return !1;
|
|
2534
2538
|
}
|
|
@@ -2536,50 +2540,50 @@ class Zn {
|
|
|
2536
2540
|
}
|
|
2537
2541
|
const Kn = new Zn();
|
|
2538
2542
|
class Jn {
|
|
2539
|
-
validate(
|
|
2540
|
-
return
|
|
2543
|
+
validate(t = "") {
|
|
2544
|
+
return t !== "";
|
|
2541
2545
|
}
|
|
2542
|
-
message(
|
|
2543
|
-
return
|
|
2546
|
+
message(t) {
|
|
2547
|
+
return t;
|
|
2544
2548
|
}
|
|
2545
2549
|
}
|
|
2546
2550
|
const Qn = new Jn();
|
|
2547
2551
|
class es {
|
|
2548
|
-
validate(
|
|
2549
|
-
return
|
|
2552
|
+
validate(t = "", o = 0) {
|
|
2553
|
+
return t.length >= o;
|
|
2550
2554
|
}
|
|
2551
|
-
message(
|
|
2552
|
-
return
|
|
2555
|
+
message(t) {
|
|
2556
|
+
return t;
|
|
2553
2557
|
}
|
|
2554
2558
|
}
|
|
2555
2559
|
const ts = new es();
|
|
2556
2560
|
class os {
|
|
2557
|
-
validate(
|
|
2558
|
-
return
|
|
2561
|
+
validate(t = "", o = 0) {
|
|
2562
|
+
return t.length <= o;
|
|
2559
2563
|
}
|
|
2560
|
-
message(
|
|
2561
|
-
return
|
|
2564
|
+
message(t) {
|
|
2565
|
+
return t;
|
|
2562
2566
|
}
|
|
2563
2567
|
}
|
|
2564
2568
|
const ns = new os();
|
|
2565
2569
|
class ss {
|
|
2566
|
-
validate(
|
|
2567
|
-
return /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(
|
|
2570
|
+
validate(t) {
|
|
2571
|
+
return /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(t);
|
|
2568
2572
|
}
|
|
2569
|
-
message(
|
|
2570
|
-
return
|
|
2573
|
+
message(t) {
|
|
2574
|
+
return t;
|
|
2571
2575
|
}
|
|
2572
2576
|
}
|
|
2573
2577
|
const as = new ss();
|
|
2574
2578
|
class is {
|
|
2575
|
-
validate(
|
|
2576
|
-
return !isNaN(parseFloat(
|
|
2579
|
+
validate(t) {
|
|
2580
|
+
return !isNaN(parseFloat(t)) && !isNaN(t - 0);
|
|
2577
2581
|
}
|
|
2578
|
-
message(
|
|
2579
|
-
return
|
|
2582
|
+
message(t) {
|
|
2583
|
+
return t;
|
|
2580
2584
|
}
|
|
2581
2585
|
}
|
|
2582
|
-
const rs = new is(),
|
|
2586
|
+
const rs = new is(), q = {
|
|
2583
2587
|
RulesUrl: Kn,
|
|
2584
2588
|
RulesRequired: Qn,
|
|
2585
2589
|
RulesMin: ts,
|
|
@@ -2588,32 +2592,32 @@ const rs = new is(), U = {
|
|
|
2588
2592
|
RulesNumber: rs
|
|
2589
2593
|
};
|
|
2590
2594
|
class ls {
|
|
2591
|
-
validate(
|
|
2592
|
-
var s, a, r, l, i, c, u, h, x, S, N, $,
|
|
2595
|
+
validate(t, o) {
|
|
2596
|
+
var s, a, r, l, i, c, u, h, x, S, N, $, H, P;
|
|
2593
2597
|
let n = "";
|
|
2594
|
-
if (
|
|
2598
|
+
if (o) {
|
|
2595
2599
|
let w = !1;
|
|
2596
|
-
for (let I in
|
|
2600
|
+
for (let I in o)
|
|
2597
2601
|
if (!w)
|
|
2598
2602
|
switch (I) {
|
|
2599
2603
|
case "url":
|
|
2600
|
-
n =
|
|
2604
|
+
n = q.RulesUrl.validate(t, "https") || t.length === 0 ? "" : q.RulesUrl.message("url", (s = o[I]) != null && s.message ? (a = o[I]) == null ? void 0 : a.message : "url_incorrect"), w = n !== "";
|
|
2601
2605
|
break;
|
|
2602
2606
|
case "required":
|
|
2603
|
-
n =
|
|
2607
|
+
n = q.RulesRequired.validate(t) ? "" : q.RulesRequired.message((r = o[I]) != null && r.message ? (l = o[I]) == null ? void 0 : l.message : "required"), w = n !== "";
|
|
2604
2608
|
break;
|
|
2605
2609
|
case "min":
|
|
2606
|
-
n =
|
|
2610
|
+
n = q.RulesMin.validate(t, (i = o[I]) == null ? void 0 : i.value) ? "" : q.RulesMin.message((c = o[I]) != null && c.message ? (u = o[I]) == null ? void 0 : u.message : "very_small"), w = n !== "";
|
|
2607
2611
|
break;
|
|
2608
2612
|
case "max":
|
|
2609
|
-
n =
|
|
2613
|
+
n = q.RulesMax.validate(t, (h = o[I]) == null ? void 0 : h.value) ? "" : q.RulesMax.message((x = o[I]) != null && x.message ? (S = o[I]) == null ? void 0 : S.message : "vary_large"), w = n !== "";
|
|
2610
2614
|
break;
|
|
2611
2615
|
case "email":
|
|
2612
|
-
n =
|
|
2616
|
+
n = q.RulesEmail.validate(t) ? "" : q.RulesMax.message((N = o[I]) != null && N.message ? ($ = o[I]) == null ? void 0 : $.message : "email_incorrect"), w = n !== "";
|
|
2613
2617
|
break;
|
|
2614
2618
|
case "number":
|
|
2615
|
-
n =
|
|
2616
|
-
(
|
|
2619
|
+
n = q.RulesNumber.validate(t) ? "" : q.RulesNumber.message(
|
|
2620
|
+
(H = o[I]) != null && H.message ? (P = o[I]) == null ? void 0 : P.message : "number_incorrect"
|
|
2617
2621
|
), w = n !== "";
|
|
2618
2622
|
break;
|
|
2619
2623
|
}
|
|
@@ -2676,17 +2680,17 @@ const ds = new ls(), cs = { style: { display: "flex", "flex-direction": "column"
|
|
|
2676
2680
|
disabled: Boolean
|
|
2677
2681
|
},
|
|
2678
2682
|
emits: ["update:modelValue", "input", "blur"],
|
|
2679
|
-
setup(e, { expose:
|
|
2683
|
+
setup(e, { expose: t, emit: o }) {
|
|
2680
2684
|
const n = e, s = T(n.error), a = zt(), r = T(!1), l = T(null);
|
|
2681
2685
|
//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
2682
2686
|
const i = m({
|
|
2683
2687
|
get: () => n.modelValue,
|
|
2684
2688
|
//props.form?.fields[props.name].model.value,
|
|
2685
2689
|
set: (w) => {
|
|
2686
|
-
|
|
2690
|
+
o("update:modelValue", w);
|
|
2687
2691
|
}
|
|
2688
2692
|
}), c = m(() => n.type === "password" ? "password" : "text"), u = m(() => n.scale), h = (w) => {
|
|
2689
|
-
|
|
2693
|
+
o("input", w), x();
|
|
2690
2694
|
}, x = () => {
|
|
2691
2695
|
if (!(!n.form || !n.form.fields || !n.form.fields[n.name].rules))
|
|
2692
2696
|
return s.value = ds.validate(i.value, n.form.fields[n.name].rules), !!s.value;
|
|
@@ -2701,17 +2705,17 @@ const ds = new ls(), cs = { style: { display: "flex", "flex-direction": "column"
|
|
|
2701
2705
|
i.value = "";
|
|
2702
2706
|
}, $ = (w) => {
|
|
2703
2707
|
r.value = w;
|
|
2704
|
-
},
|
|
2708
|
+
}, H = (w) => {
|
|
2705
2709
|
s.value = w;
|
|
2706
|
-
},
|
|
2707
|
-
|
|
2710
|
+
}, P = (w) => {
|
|
2711
|
+
o("blur", w);
|
|
2708
2712
|
};
|
|
2709
|
-
return
|
|
2713
|
+
return t({
|
|
2710
2714
|
focus: S,
|
|
2711
|
-
setError:
|
|
2715
|
+
setError: H,
|
|
2712
2716
|
validate: x
|
|
2713
2717
|
}), (w, I) => {
|
|
2714
|
-
var M, g, R,
|
|
2718
|
+
var M, g, R, A, z, y, F, p, W, C, G, ne, ve, ye, _e, be, Q, xe, le, $e, Le, he, Fe, We, Pe, je, Xe, Ye, Ue, qe, Ge, Ze, Ke, Je, Qe, et, tt, ot, nt;
|
|
2715
2719
|
return d(), f("div", {
|
|
2716
2720
|
class: D(["d-input-string", u.value])
|
|
2717
2721
|
}, [
|
|
@@ -2725,14 +2729,14 @@ const ds = new ls(), cs = { style: { display: "flex", "flex-direction": "column"
|
|
|
2725
2729
|
key: 0,
|
|
2726
2730
|
class: D(["d-pre", n.disabled ? "disabled" : ""])
|
|
2727
2731
|
}, [
|
|
2728
|
-
(d(), b(Y((
|
|
2729
|
-
], 2)) : (
|
|
2732
|
+
(d(), b(Y((z = (A = n.pre) == null ? void 0 : A.outside) == null ? void 0 : z.component)))
|
|
2733
|
+
], 2)) : (F = (y = n.pre) == null ? void 0 : y.outside) != null && F.text ? (d(), f("div", {
|
|
2730
2734
|
key: 1,
|
|
2731
2735
|
class: D(["d-pre", n.disabled ? "disabled" : ""])
|
|
2732
2736
|
}, [
|
|
2733
2737
|
_("div", {
|
|
2734
2738
|
class: D(["d-text", r.value ? "focused" : ""])
|
|
2735
|
-
}, O((
|
|
2739
|
+
}, O((W = (p = n.pre) == null ? void 0 : p.outside) == null ? void 0 : W.text), 3)
|
|
2736
2740
|
], 2)) : k("", !0),
|
|
2737
2741
|
_("div", ms, [
|
|
2738
2742
|
(G = (C = n.pre) == null ? void 0 : C.inside) != null && G.action && ((ve = (ne = n.pre) == null ? void 0 : ne.inside) == null ? void 0 : ve.action) === "clear" && ((ye = i.value) == null ? void 0 : ye.length) > 0 ? (d(), f("div", {
|
|
@@ -2750,7 +2754,7 @@ const ds = new ls(), cs = { style: { display: "flex", "flex-direction": "column"
|
|
|
2750
2754
|
placeholder: n.placeholder,
|
|
2751
2755
|
onInput: h,
|
|
2752
2756
|
onFocus: I[1] || (I[1] = (Ie) => $(!0)),
|
|
2753
|
-
onBlur:
|
|
2757
|
+
onBlur: P,
|
|
2754
2758
|
onFocusout: I[2] || (I[2] = (Ie) => $(!1)),
|
|
2755
2759
|
class: D([
|
|
2756
2760
|
(be = (_e = n.pre) == null ? void 0 : _e.outside) != null && be.component || (xe = (Q = n.pre) == null ? void 0 : Q.outside) != null && xe.text ? "has-pre" : "",
|
|
@@ -2800,36 +2804,36 @@ const ds = new ls(), cs = { style: { display: "flex", "flex-direction": "column"
|
|
|
2800
2804
|
}
|
|
2801
2805
|
},
|
|
2802
2806
|
mutations: {
|
|
2803
|
-
addComponent(e,
|
|
2804
|
-
fe.state.name =
|
|
2807
|
+
addComponent(e, t) {
|
|
2808
|
+
fe.state.name = t;
|
|
2805
2809
|
},
|
|
2806
2810
|
addComponents(e) {
|
|
2807
|
-
for (const
|
|
2808
|
-
e.hasOwnProperty(
|
|
2811
|
+
for (const t in e)
|
|
2812
|
+
e.hasOwnProperty(t) && (fe.state[t] = e[t]);
|
|
2809
2813
|
}
|
|
2810
2814
|
}
|
|
2811
2815
|
}, wt = (e) => {
|
|
2812
|
-
typeof e == "string" && (e = { title: "", text: e }), typeof e == "object" &&
|
|
2816
|
+
typeof e == "string" && (e = { title: "", text: e }), typeof e == "object" && U.emit("notification-add", e);
|
|
2813
2817
|
};
|
|
2814
2818
|
wt.close = (e) => {
|
|
2815
|
-
|
|
2819
|
+
U.emit("notification-close", e);
|
|
2816
2820
|
};
|
|
2817
2821
|
const Xs = () => ({ notify: wt }), Ys = {
|
|
2818
|
-
mounted: function(e,
|
|
2819
|
-
e.clickOutsideEvent = function(
|
|
2820
|
-
e ===
|
|
2822
|
+
mounted: function(e, t) {
|
|
2823
|
+
e.clickOutsideEvent = function(o) {
|
|
2824
|
+
e === o.target || e.contains(o.target) || t.value(o, e);
|
|
2821
2825
|
}, document.addEventListener("click", e.clickOutsideEvent);
|
|
2822
2826
|
},
|
|
2823
2827
|
unmounted: function(e) {
|
|
2824
2828
|
document.removeEventListener("click", e.clickOutsideEvent);
|
|
2825
2829
|
}
|
|
2826
2830
|
}, Us = {
|
|
2827
|
-
beforeMount(e,
|
|
2828
|
-
e._keydownCallback = (
|
|
2829
|
-
|
|
2831
|
+
beforeMount(e, t) {
|
|
2832
|
+
e._keydownCallback = (o) => {
|
|
2833
|
+
o.key === t.arg && t.value();
|
|
2830
2834
|
}, document.addEventListener("keydown", e._keydownCallback);
|
|
2831
2835
|
},
|
|
2832
|
-
unmounted(e,
|
|
2836
|
+
unmounted(e, t) {
|
|
2833
2837
|
document.removeEventListener("keydown", e._keydownCallback), delete e._keydownCallback;
|
|
2834
2838
|
}
|
|
2835
2839
|
}, qs = {
|
|
@@ -2846,12 +2850,12 @@ function Dt(e) {
|
|
|
2846
2850
|
var $s = function() {
|
|
2847
2851
|
var e = !1;
|
|
2848
2852
|
try {
|
|
2849
|
-
var
|
|
2853
|
+
var t = Object.defineProperty({}, "passive", {
|
|
2850
2854
|
get: function() {
|
|
2851
2855
|
e = !0;
|
|
2852
2856
|
}
|
|
2853
2857
|
});
|
|
2854
|
-
window.addEventListener("test", null,
|
|
2858
|
+
window.addEventListener("test", null, t);
|
|
2855
2859
|
} catch {
|
|
2856
2860
|
}
|
|
2857
2861
|
return e;
|
|
@@ -2872,29 +2876,29 @@ var $s = function() {
|
|
|
2872
2876
|
// ms
|
|
2873
2877
|
};
|
|
2874
2878
|
function ke(e) {
|
|
2875
|
-
var
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
},
|
|
2879
|
+
var t = this.$$touchObj, o = e.type.indexOf("touch") >= 0, n = e.type.indexOf("mouse") >= 0, s = this;
|
|
2880
|
+
o && (t.lastTouchStartTime = e.timeStamp), !(n && t.lastTouchStartTime && e.timeStamp - t.lastTouchStartTime < 350) && (t.touchStarted || (Tt(this), t.touchStarted = !0, t.touchMoved = !1, t.swipeOutBounded = !1, t.startX = St(e), t.startY = Dt(e), t.currentX = 0, t.currentY = 0, t.touchStartTime = e.timeStamp, t.hasSwipe = Z(this, "swipe") || Z(this, "swipe.left") || Z(this, "swipe.right") || Z(this, "swipe.top") || Z(this, "swipe.bottom"), Z(this, "hold") && (t.touchHoldTimer = setTimeout(function() {
|
|
2881
|
+
t.touchHoldTimer = null, ee(e, s, "hold");
|
|
2882
|
+
}, t.options.touchHoldTolerance)), ee(e, this, "press")));
|
|
2879
2883
|
}
|
|
2880
2884
|
function we(e) {
|
|
2881
|
-
var
|
|
2882
|
-
if (
|
|
2883
|
-
if (
|
|
2884
|
-
var r =
|
|
2885
|
-
|
|
2885
|
+
var t = this.$$touchObj, o = St(e), n = Dt(e), s = t.currentX != o || t.currentY != n;
|
|
2886
|
+
if (t.currentX = o, t.currentY = n, t.touchMoved) {
|
|
2887
|
+
if (t.hasSwipe && !t.swipeOutBounded) {
|
|
2888
|
+
var r = t.options.swipeTolerance;
|
|
2889
|
+
t.swipeOutBounded = Math.abs(t.startX - t.currentX) > r && Math.abs(t.startY - t.currentY) > r;
|
|
2886
2890
|
}
|
|
2887
2891
|
} else {
|
|
2888
|
-
var a =
|
|
2889
|
-
|
|
2892
|
+
var a = t.options.tapTolerance;
|
|
2893
|
+
t.touchMoved = Math.abs(t.startX - t.currentX) > a || Math.abs(t.startY - t.currentY) > a, t.touchMoved && (ze(t), ee(e, this, "drag.once"));
|
|
2890
2894
|
}
|
|
2891
2895
|
if (Z(this, "rollover") && s) {
|
|
2892
|
-
var l = e.timeStamp, i =
|
|
2893
|
-
(
|
|
2896
|
+
var l = e.timeStamp, i = t.options.rollOverFrequency;
|
|
2897
|
+
(t.touchRollTime == null || l > t.touchRollTime + i) && (t.touchRollTime = l, ee(e, this, "rollover"));
|
|
2894
2898
|
}
|
|
2895
|
-
if (Z(this, "drag") &&
|
|
2896
|
-
var l = e.timeStamp, i =
|
|
2897
|
-
(
|
|
2899
|
+
if (Z(this, "drag") && t.touchStarted && t.touchMoved && s) {
|
|
2900
|
+
var l = e.timeStamp, i = t.options.dragFrequency;
|
|
2901
|
+
(t.touchDragTime == null || l > t.touchDragTime + i) && (t.touchDragTime = l, ee(e, this, "drag"));
|
|
2898
2902
|
}
|
|
2899
2903
|
}
|
|
2900
2904
|
function lt() {
|
|
@@ -2902,16 +2906,16 @@ function lt() {
|
|
|
2902
2906
|
ze(e), Ve(this), e.touchStarted = e.touchMoved = !1, e.startX = e.startY = 0;
|
|
2903
2907
|
}
|
|
2904
2908
|
function Se(e) {
|
|
2905
|
-
var
|
|
2906
|
-
|
|
2907
|
-
var s =
|
|
2908
|
-
if (ze(
|
|
2909
|
-
if (ee(e, this, "release"),
|
|
2910
|
-
if (
|
|
2911
|
-
var a =
|
|
2912
|
-
(l > a || i > a) && (l > a ? r =
|
|
2909
|
+
var t = this.$$touchObj, o = e.type.indexOf("touch") >= 0, n = e.type.indexOf("mouse") >= 0;
|
|
2910
|
+
o && (t.lastTouchEndTime = e.timeStamp);
|
|
2911
|
+
var s = o && !t.touchHoldTimer;
|
|
2912
|
+
if (ze(t), t.touchStarted = !1, Ve(this), !(n && t.lastTouchEndTime && e.timeStamp - t.lastTouchEndTime < 350))
|
|
2913
|
+
if (ee(e, this, "release"), t.touchMoved) {
|
|
2914
|
+
if (t.hasSwipe && !t.swipeOutBounded) {
|
|
2915
|
+
var a = t.options.swipeTolerance, r, l = Math.abs(t.startY - t.currentY), i = Math.abs(t.startX - t.currentX);
|
|
2916
|
+
(l > a || i > a) && (l > a ? r = t.startY > t.currentY ? "top" : "bottom" : r = t.startX > t.currentX ? "left" : "right", Z(this, "swipe." + r) ? ee(e, this, "swipe." + r, r) : ee(e, this, "swipe", r));
|
|
2913
2917
|
}
|
|
2914
|
-
} else if (Z(this, "longtap") && e.timeStamp -
|
|
2918
|
+
} else if (Z(this, "longtap") && e.timeStamp - t.touchStartTime > t.options.longTapTimeInterval)
|
|
2915
2919
|
e.cancelable && e.preventDefault(), ee(e, this, "longtap");
|
|
2916
2920
|
else if (Z(this, "hold") && s) {
|
|
2917
2921
|
e.cancelable && e.preventDefault();
|
|
@@ -2925,12 +2929,12 @@ function dt() {
|
|
|
2925
2929
|
function ct() {
|
|
2926
2930
|
Ve(this);
|
|
2927
2931
|
}
|
|
2928
|
-
function Z(e,
|
|
2929
|
-
var
|
|
2930
|
-
return
|
|
2932
|
+
function Z(e, t) {
|
|
2933
|
+
var o = e.$$touchObj.callbacks[t];
|
|
2934
|
+
return o != null && o.length > 0;
|
|
2931
2935
|
}
|
|
2932
|
-
function ee(e,
|
|
2933
|
-
var s =
|
|
2936
|
+
function ee(e, t, o, n) {
|
|
2937
|
+
var s = t.$$touchObj, a = s.callbacks[o];
|
|
2934
2938
|
if (a == null || a.length === 0)
|
|
2935
2939
|
return null;
|
|
2936
2940
|
for (var r = 0; r < a.length; r++) {
|
|
@@ -2939,18 +2943,18 @@ function ee(e, o, t, n) {
|
|
|
2939
2943
|
}
|
|
2940
2944
|
}
|
|
2941
2945
|
function Tt(e) {
|
|
2942
|
-
var
|
|
2943
|
-
|
|
2946
|
+
var t = e.$$touchObj.options.touchClass;
|
|
2947
|
+
t && e.classList.add(t);
|
|
2944
2948
|
}
|
|
2945
2949
|
function Ve(e) {
|
|
2946
|
-
var
|
|
2947
|
-
|
|
2950
|
+
var t = e.$$touchObj.options.touchClass;
|
|
2951
|
+
t && e.classList.remove(t);
|
|
2948
2952
|
}
|
|
2949
2953
|
function ze(e) {
|
|
2950
2954
|
e.touchHoldTimer && (clearTimeout(e.touchHoldTimer), e.touchHoldTimer = null);
|
|
2951
2955
|
}
|
|
2952
|
-
function ws(e,
|
|
2953
|
-
var
|
|
2956
|
+
function ws(e, t) {
|
|
2957
|
+
var o = e.$$touchObj || {
|
|
2954
2958
|
// an object contains all callbacks registered,
|
|
2955
2959
|
// key is event name, value is an array
|
|
2956
2960
|
callbacks: {},
|
|
@@ -2959,32 +2963,32 @@ function ws(e, o) {
|
|
|
2959
2963
|
// default options, would be override by v-touch-options
|
|
2960
2964
|
options: ks
|
|
2961
2965
|
};
|
|
2962
|
-
return
|
|
2966
|
+
return t && (o.options = Object.assign({}, o.options, t)), e.$$touchObj = o, e.$$touchObj;
|
|
2963
2967
|
}
|
|
2964
2968
|
const Gs = {
|
|
2965
|
-
beforeMount: function(e,
|
|
2966
|
-
const
|
|
2969
|
+
beforeMount: function(e, t) {
|
|
2970
|
+
const o = ws(e);
|
|
2967
2971
|
let n = $s ? { passive: !0 } : !1;
|
|
2968
|
-
const s =
|
|
2972
|
+
const s = t.arg || "tap";
|
|
2969
2973
|
switch (s) {
|
|
2970
2974
|
case "swipe":
|
|
2971
|
-
let a =
|
|
2975
|
+
let a = t.modifiers;
|
|
2972
2976
|
if (a.left || a.right || a.top || a.bottom) {
|
|
2973
|
-
for (let r in
|
|
2977
|
+
for (let r in t.modifiers)
|
|
2974
2978
|
if (["left", "right", "top", "bottom"].indexOf(r) >= 0) {
|
|
2975
2979
|
let l = "swipe." + r;
|
|
2976
|
-
|
|
2980
|
+
o.callbacks[l] = o.callbacks[l] || [], o.callbacks[l].push(t);
|
|
2977
2981
|
}
|
|
2978
2982
|
} else
|
|
2979
|
-
|
|
2983
|
+
o.callbacks.swipe = o.callbacks.swipe || [], o.callbacks.swipe.push(t);
|
|
2980
2984
|
break;
|
|
2981
2985
|
case "press":
|
|
2982
2986
|
case "drag":
|
|
2983
|
-
|
|
2987
|
+
t.modifiers.disablePassive && (n = !1);
|
|
2984
2988
|
default:
|
|
2985
|
-
|
|
2989
|
+
o.callbacks[s] = o.callbacks[s] || [], o.callbacks[s].push(t);
|
|
2986
2990
|
}
|
|
2987
|
-
|
|
2991
|
+
o.hasBindTouchEvents || (e.addEventListener("touchstart", ke, n), e.addEventListener("touchmove", we, n), e.addEventListener("touchcancel", lt), e.addEventListener("touchend", Se), o.options.disableClick || (e.addEventListener("mousedown", ke), e.addEventListener("mousemove", we), e.addEventListener("mouseup", Se), e.addEventListener("mouseenter", dt), e.addEventListener("mouseleave", ct)), o.hasBindTouchEvents = !0);
|
|
2988
2992
|
},
|
|
2989
2993
|
unmounted: function(e) {
|
|
2990
2994
|
e.removeEventListener("touchstart", ke), e.removeEventListener("touchmove", we), e.removeEventListener("touchcancel", lt), e.removeEventListener("touchend", Se), e.$$touchObj && !e.$$touchObj.options.disableClick && (e.removeEventListener("mousedown", ke), e.removeEventListener("mousemove", we), e.removeEventListener("mouseup", Se), e.removeEventListener("mouseenter", dt), e.removeEventListener("mouseleave", ct)), delete e.$$touchObj;
|
|
@@ -3034,11 +3038,11 @@ export {
|
|
|
3034
3038
|
xt as DTree,
|
|
3035
3039
|
To as DTreeItem,
|
|
3036
3040
|
v as DTreeStore,
|
|
3037
|
-
|
|
3041
|
+
q as Rules,
|
|
3038
3042
|
Nn as alert,
|
|
3039
3043
|
Ys as clickOutside,
|
|
3040
3044
|
Mn as confirm,
|
|
3041
|
-
|
|
3045
|
+
U as emitter,
|
|
3042
3046
|
Co as eventsBus,
|
|
3043
3047
|
qs as focus,
|
|
3044
3048
|
Us as keydown,
|