doph-js 0.3.8 → 0.3.10
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 +926 -915
- 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 h, h as at, openBlock as d, createBlock as
|
|
1
|
+
import { useSlots as Ce, computed as h, h as at, openBlock as d, createBlock as k, unref as L, ref as T, createElementBlock as p, Fragment as ne, normalizeClass as D, renderSlot as I, createCommentVNode as x, normalizeStyle as z, resolveDynamicComponent as U, createStaticVNode as pt, onMounted as he, toDisplayString as O, withDirectives as Z, createElementVNode as b, vModelDynamic as De, withCtx as E, createTextVNode as J, Transition as Ne, withModifiers as j, resolveComponent as Lt, resolveDirective as Re, normalizeProps as ft, guardReactiveProps as mt, createVNode as Q, renderList as me, pushScopeId as It, popScopeId as Bt, reactive as Oe, Teleport as ht, nextTick as gt, getCurrentInstance as Ve, watch as vt, onUnmounted as Et, mergeProps as ue, useCssVars as Ae, shallowRef as Mt, defineComponent as Nt, TransitionGroup as yt, vModelCheckbox as _t, vModelSelect as Rt, toRef as Ot, KeepAlive as Vt, vShow as At, toRefs as Ht, vModelText as zt } from "vue";
|
|
2
2
|
const re = {
|
|
3
3
|
__name: "DIcon",
|
|
4
4
|
props: {
|
|
@@ -7,8 +7,8 @@ const re = {
|
|
|
7
7
|
color: String,
|
|
8
8
|
className: String
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const e =
|
|
10
|
+
setup(o) {
|
|
11
|
+
const e = o, t = Ce(), n = h(() => {
|
|
12
12
|
const { className: r } = e;
|
|
13
13
|
return r === void 0 ? "icon" : ["icon", r].join(" ");
|
|
14
14
|
}), s = h(() => {
|
|
@@ -27,60 +27,60 @@ const re = {
|
|
|
27
27
|
fontSize: a.value
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
e.component ? at(e.component) :
|
|
30
|
+
e.component ? at(e.component) : t
|
|
31
31
|
));
|
|
32
|
-
return (r, i) => (d(),
|
|
32
|
+
return (r, i) => (d(), k(L(l)));
|
|
33
33
|
}
|
|
34
34
|
}, oe = {
|
|
35
35
|
state: {},
|
|
36
36
|
getters: {
|
|
37
|
-
getIcon(
|
|
38
|
-
return oe.state[
|
|
37
|
+
getIcon(o) {
|
|
38
|
+
return oe.state[o];
|
|
39
39
|
},
|
|
40
40
|
getIcons() {
|
|
41
41
|
return oe.state;
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
mutations: {
|
|
45
|
-
addIcon(
|
|
45
|
+
addIcon(o, e) {
|
|
46
46
|
oe.state.name = e;
|
|
47
47
|
},
|
|
48
|
-
addIcons(
|
|
49
|
-
for (const e in
|
|
50
|
-
|
|
48
|
+
addIcons(o) {
|
|
49
|
+
for (const e in o)
|
|
50
|
+
o.hasOwnProperty(e) && (oe.state[e] = o[e]);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
function bt(
|
|
55
|
-
const e =
|
|
56
|
-
let
|
|
57
|
-
for (;
|
|
58
|
-
n +=
|
|
54
|
+
function bt(o) {
|
|
55
|
+
const e = o.value.getBoundingClientRect();
|
|
56
|
+
let t = o.value, n = 0, s = 0;
|
|
57
|
+
for (; t && !isNaN(t.offsetLeft) && !isNaN(t.offsetTop); )
|
|
58
|
+
n += t.offsetLeft - t.scrollLeft, s += t.offsetTop - t.scrollTop, t = t.offsetParent;
|
|
59
59
|
return { top: s, left: n, x: e.x, y: e.y, width: e.width, height: e.height };
|
|
60
60
|
}
|
|
61
61
|
function Ft() {
|
|
62
|
-
function
|
|
62
|
+
function o(s) {
|
|
63
63
|
return s * Math.random() | 0;
|
|
64
64
|
}
|
|
65
65
|
function e() {
|
|
66
|
-
return
|
|
66
|
+
return o(16).toString(16);
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function t(s) {
|
|
69
69
|
let a = "";
|
|
70
70
|
for (let l = 0; l < s; ++l)
|
|
71
71
|
a += e();
|
|
72
72
|
return a;
|
|
73
73
|
}
|
|
74
74
|
function n() {
|
|
75
|
-
return (
|
|
75
|
+
return (o(16) & 3 | 8).toString(16);
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return t(8) + "-" + t(4) + "-4" + t(3) + "-" + n() + t(3) + "-" + t(12);
|
|
78
78
|
}
|
|
79
|
-
const se = (
|
|
80
|
-
const
|
|
79
|
+
const se = (o, e) => {
|
|
80
|
+
const t = o.__vccOpts || o;
|
|
81
81
|
for (const [n, s] of e)
|
|
82
|
-
|
|
83
|
-
return
|
|
82
|
+
t[n] = s;
|
|
83
|
+
return t;
|
|
84
84
|
}, Wt = {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: "loading-svg rotating",
|
|
@@ -119,48 +119,48 @@ const se = (t, e) => {
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
emits: ["click", "contextmenu"],
|
|
122
|
-
setup(
|
|
123
|
-
const n =
|
|
124
|
-
|
|
122
|
+
setup(o, { expose: e, emit: t }) {
|
|
123
|
+
const n = o, s = Ce(), a = T(null), l = h(() => n.icon ? oe.getters.getIcon(n.icon) : null), r = ($) => {
|
|
124
|
+
t("click", $);
|
|
125
125
|
}, i = ($) => {
|
|
126
|
-
|
|
127
|
-
}, c = h(() => n.scale === "large" ? "button-lg" : n.scale === "small" ? "button-sm" : ""), u = h(() => n.disabled ? "disabled" : ""), g = ($) => !!s[$],
|
|
126
|
+
t("contextmenu", $);
|
|
127
|
+
}, c = h(() => n.scale === "large" ? "button-lg" : n.scale === "small" ? "button-sm" : ""), u = h(() => n.disabled ? "disabled" : ""), g = ($) => !!s[$], _ = h(() => g("default") ? "" : n.scale === "large" ? "d-button-lg-icon" : n.scale === "small" ? "d-button-sm-icon" : "d-button-icon"), C = h(() => {
|
|
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
131
|
return e({
|
|
132
132
|
elementSize: () => bt(a)
|
|
133
|
-
}), ($, A) => (d(),
|
|
134
|
-
l.value ?
|
|
133
|
+
}), ($, A) => (d(), p(ne, null, [
|
|
134
|
+
l.value ? x("", !0) : (d(), p("div", {
|
|
135
135
|
key: 0,
|
|
136
136
|
ref_key: "el",
|
|
137
137
|
ref: a,
|
|
138
138
|
onClick: r,
|
|
139
139
|
onContextmenu: i,
|
|
140
|
-
class:
|
|
140
|
+
class: D(["button", [n.class, c.value, C.value, u.value].join(" ")])
|
|
141
141
|
}, [
|
|
142
142
|
I($.$slots, "default", {}, void 0, !0),
|
|
143
|
-
n.loading ? (d(),
|
|
143
|
+
n.loading ? (d(), p("svg", Wt, jt)) : x("", !0)
|
|
144
144
|
], 34)),
|
|
145
|
-
l.value ? (d(),
|
|
145
|
+
l.value ? (d(), p("div", {
|
|
146
146
|
key: 1,
|
|
147
147
|
ref_key: "el",
|
|
148
148
|
ref: a,
|
|
149
149
|
onClick: r,
|
|
150
150
|
onContextmenu: i,
|
|
151
|
-
class:
|
|
151
|
+
class: D(["button button-ext", [n.class, c.value, _.value, C.value, u.value].join(" ")]),
|
|
152
152
|
style: z(n.style)
|
|
153
153
|
}, [
|
|
154
|
-
n.icon ? (d(),
|
|
154
|
+
n.icon ? (d(), k(U(re), {
|
|
155
155
|
key: 0,
|
|
156
156
|
component: l.value,
|
|
157
157
|
color: "inherit"
|
|
158
|
-
}, null, 8, ["component"])) :
|
|
159
|
-
L(s).default ? (d(),
|
|
158
|
+
}, null, 8, ["component"])) : x("", !0),
|
|
159
|
+
L(s).default ? (d(), p("div", Xt, [
|
|
160
160
|
I($.$slots, "default", {}, void 0, !0)
|
|
161
|
-
])) :
|
|
162
|
-
n.loading ? (d(),
|
|
163
|
-
], 38)) :
|
|
161
|
+
])) : x("", !0),
|
|
162
|
+
n.loading ? (d(), p("svg", Yt, qt)) : x("", !0)
|
|
163
|
+
], 38)) : x("", !0)
|
|
164
164
|
], 64));
|
|
165
165
|
}
|
|
166
166
|
}, le = /* @__PURE__ */ se(Gt, [["__scopeId", "data-v-e5cd6ccd"]]);
|
|
@@ -198,11 +198,11 @@ const Zt = {
|
|
|
198
198
|
focus: Boolean
|
|
199
199
|
},
|
|
200
200
|
emits: ["update:modelValue"],
|
|
201
|
-
setup(
|
|
202
|
-
const n =
|
|
201
|
+
setup(o, { expose: e, emit: t }) {
|
|
202
|
+
const n = o, s = T(null), a = h(() => n.scale === "small" ? "d-input-small" : n.scale === "large" ? "d-input-large" : ""), l = h({
|
|
203
203
|
get: () => n.modelValue,
|
|
204
204
|
set: (i) => {
|
|
205
|
-
|
|
205
|
+
t("update:modelValue", i);
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
208
|
he(() => {
|
|
@@ -213,27 +213,27 @@ const Zt = {
|
|
|
213
213
|
};
|
|
214
214
|
return e({
|
|
215
215
|
focus: r
|
|
216
|
-
}), (i, c) => !n.post && !n.pre ? (d(),
|
|
217
|
-
n.label ? (d(),
|
|
218
|
-
Z(
|
|
216
|
+
}), (i, c) => !n.post && !n.pre ? (d(), p("div", Zt, [
|
|
217
|
+
n.label ? (d(), p("div", Kt, O(n.label), 1)) : x("", !0),
|
|
218
|
+
Z(b("input", {
|
|
219
219
|
ref_key: "inputRef",
|
|
220
220
|
ref: s,
|
|
221
221
|
"onUpdate:modelValue": c[0] || (c[0] = (u) => l.value = u),
|
|
222
222
|
type: n.password ? "password" : "text",
|
|
223
|
-
class:
|
|
223
|
+
class: D(a.value),
|
|
224
224
|
placeholder: n.placeholder,
|
|
225
225
|
style: { width: "100%" }
|
|
226
226
|
}, null, 10, Jt), [
|
|
227
227
|
[De, l.value]
|
|
228
228
|
])
|
|
229
|
-
])) : n.post && n.post.click && !n.pre ? (d(),
|
|
230
|
-
n.label ? (d(),
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
Z(
|
|
229
|
+
])) : n.post && n.post.click && !n.pre ? (d(), p("div", Qt, [
|
|
230
|
+
n.label ? (d(), p("div", eo, O(n.label), 1)) : x("", !0),
|
|
231
|
+
b("div", to, [
|
|
232
|
+
b("div", oo, [
|
|
233
|
+
Z(b("input", {
|
|
234
234
|
ref_key: "inputRef",
|
|
235
235
|
ref: s,
|
|
236
|
-
class:
|
|
236
|
+
class: D(["d-input-post-field", a.value]),
|
|
237
237
|
"onUpdate:modelValue": c[1] || (c[1] = (u) => l.value = u),
|
|
238
238
|
type: n.password ? "password" : "text",
|
|
239
239
|
placeholder: n.placeholder,
|
|
@@ -242,10 +242,10 @@ const Zt = {
|
|
|
242
242
|
[De, l.value]
|
|
243
243
|
])
|
|
244
244
|
]),
|
|
245
|
-
n.post.label ? (d(),
|
|
245
|
+
n.post.label ? (d(), k(le, {
|
|
246
246
|
key: 0,
|
|
247
247
|
scale: n.scale,
|
|
248
|
-
class:
|
|
248
|
+
class: D(["d-input-post-button", n.post.class]),
|
|
249
249
|
onClick: n.post.click,
|
|
250
250
|
icon: n.post.icon
|
|
251
251
|
}, {
|
|
@@ -253,21 +253,21 @@ const Zt = {
|
|
|
253
253
|
J(O(n.post.label), 1)
|
|
254
254
|
]),
|
|
255
255
|
_: 1
|
|
256
|
-
}, 8, ["scale", "onClick", "icon", "class"])) : (d(),
|
|
256
|
+
}, 8, ["scale", "onClick", "icon", "class"])) : (d(), k(le, {
|
|
257
257
|
key: 1,
|
|
258
258
|
scale: n.scale,
|
|
259
|
-
class:
|
|
259
|
+
class: D(["d-input-post-button", n.post.class]),
|
|
260
260
|
onClick: n.post.click,
|
|
261
261
|
icon: n.post.icon
|
|
262
262
|
}, null, 8, ["scale", "onClick", "icon", "class"]))
|
|
263
263
|
])
|
|
264
|
-
])) : !n.post && n.pre && n.pre.click ? (d(),
|
|
265
|
-
n.label ? (d(),
|
|
266
|
-
|
|
267
|
-
n.pre.label ? (d(),
|
|
264
|
+
])) : !n.post && n.pre && n.pre.click ? (d(), p("div", so, [
|
|
265
|
+
n.label ? (d(), p("div", ao, O(n.label), 1)) : x("", !0),
|
|
266
|
+
b("div", io, [
|
|
267
|
+
n.pre.label ? (d(), k(le, {
|
|
268
268
|
key: 0,
|
|
269
269
|
scale: n.scale,
|
|
270
|
-
class:
|
|
270
|
+
class: D(["d-input-pre-button", n.pre.class]),
|
|
271
271
|
onClick: n.pre.click,
|
|
272
272
|
icon: n.pre.icon
|
|
273
273
|
}, {
|
|
@@ -275,18 +275,18 @@ const Zt = {
|
|
|
275
275
|
J(O(n.pre.label), 1)
|
|
276
276
|
]),
|
|
277
277
|
_: 1
|
|
278
|
-
}, 8, ["scale", "onClick", "icon", "class"])) : (d(),
|
|
278
|
+
}, 8, ["scale", "onClick", "icon", "class"])) : (d(), k(le, {
|
|
279
279
|
key: 1,
|
|
280
280
|
scale: n.scale,
|
|
281
|
-
class:
|
|
281
|
+
class: D(["d-input-pre-button", n.pre.class]),
|
|
282
282
|
onClick: n.pre.click,
|
|
283
283
|
icon: n.pre.icon
|
|
284
284
|
}, null, 8, ["scale", "onClick", "icon", "class"])),
|
|
285
|
-
|
|
286
|
-
Z(
|
|
285
|
+
b("div", lo, [
|
|
286
|
+
Z(b("input", {
|
|
287
287
|
ref_key: "inputRef",
|
|
288
288
|
ref: s,
|
|
289
|
-
class:
|
|
289
|
+
class: D(["d-input-pre-field", a.value]),
|
|
290
290
|
"onUpdate:modelValue": c[2] || (c[2] = (u) => l.value = u),
|
|
291
291
|
type: n.password ? "password" : "text",
|
|
292
292
|
placeholder: n.placeholder,
|
|
@@ -296,9 +296,9 @@ const Zt = {
|
|
|
296
296
|
])
|
|
297
297
|
])
|
|
298
298
|
])
|
|
299
|
-
])) :
|
|
299
|
+
])) : x("", !0);
|
|
300
300
|
}
|
|
301
|
-
},
|
|
301
|
+
}, Rs = /* @__PURE__ */ se(co, [["__scopeId", "data-v-a972038a"]]), uo = {
|
|
302
302
|
__name: "DBadge",
|
|
303
303
|
props: {
|
|
304
304
|
scale: String,
|
|
@@ -309,13 +309,13 @@ const Zt = {
|
|
|
309
309
|
default: !1
|
|
310
310
|
}
|
|
311
311
|
},
|
|
312
|
-
setup(
|
|
313
|
-
const e =
|
|
312
|
+
setup(o) {
|
|
313
|
+
const e = o, t = h(() => e.scale === "large" ? "badge-lg" : e.scale === "small" ? "badge-sm" : ""), n = h(() => {
|
|
314
314
|
const s = e.stress ? "-stress" : "";
|
|
315
315
|
return e.type === "primary" ? `badge${s}-blue` : e.type === "success" ? `badge${s}-green` : e.type === "error" ? `badge${s}-red` : e.type === "warning" ? `badge${s}-orange` : e.type === "wait" ? `badge${s}-violet` : e.stress ? `badge${s}-gray` : "";
|
|
316
316
|
});
|
|
317
|
-
return (s, a) => (d(),
|
|
318
|
-
class:
|
|
317
|
+
return (s, a) => (d(), p("div", {
|
|
318
|
+
class: D(["badge", [e.class, t.value, n.value].join(" ")])
|
|
319
319
|
}, [
|
|
320
320
|
I(s.$slots, "default")
|
|
321
321
|
], 2));
|
|
@@ -344,8 +344,8 @@ const Zt = {
|
|
|
344
344
|
default: 1
|
|
345
345
|
}
|
|
346
346
|
},
|
|
347
|
-
setup(
|
|
348
|
-
const e =
|
|
347
|
+
setup(o) {
|
|
348
|
+
const e = o, t = (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,
|
|
@@ -362,9 +362,9 @@ const Zt = {
|
|
|
362
362
|
i.style.width = u, i.style.position = "absolute", i.style.visibility = "hidden", i.style.height = "";
|
|
363
363
|
let { height: g } = getComputedStyle(i);
|
|
364
364
|
return i.style.width = c.width, i.style.position = c.position, i.style.visibility = c.visibility, i.style.height = ie, i.style.overflow = "hidden", c.height && c.height !== ie ? c.height : g;
|
|
365
|
-
}, s = (i, c, u, g,
|
|
366
|
-
const
|
|
367
|
-
i.style.height = c.height,
|
|
365
|
+
}, s = (i, c, u, g, _) => {
|
|
366
|
+
const C = i.animate(g, _);
|
|
367
|
+
i.style.height = c.height, C.onfinish = () => {
|
|
368
368
|
i.style.overflow = c.overflow, u();
|
|
369
369
|
};
|
|
370
370
|
}, a = (i, c) => [
|
|
@@ -389,15 +389,15 @@ const Zt = {
|
|
|
389
389
|
marginBottom: c.marginBottom
|
|
390
390
|
}
|
|
391
391
|
], l = (i, c) => {
|
|
392
|
-
const u = i, g =
|
|
393
|
-
s(u, g, c,
|
|
392
|
+
const u = i, g = t(u), _ = n(u, g), C = a(_, g), R = { duration: e.duration, easing: e.easingEnter };
|
|
393
|
+
s(u, g, c, C, R);
|
|
394
394
|
}, r = (i, c) => {
|
|
395
|
-
const u = i, g =
|
|
396
|
-
u.style.height =
|
|
397
|
-
const
|
|
398
|
-
s(u, g, c,
|
|
395
|
+
const u = i, g = t(u), { height: _ } = getComputedStyle(u);
|
|
396
|
+
u.style.height = _, u.style.overflow = "hidden";
|
|
397
|
+
const C = a(_, g).reverse(), R = { duration: e.duration, easing: e.easingLeave };
|
|
398
|
+
s(u, g, c, C, R);
|
|
399
399
|
};
|
|
400
|
-
return (i, c) => (d(),
|
|
400
|
+
return (i, c) => (d(), k(Ne, {
|
|
401
401
|
css: !1,
|
|
402
402
|
onEnter: l,
|
|
403
403
|
onLeave: r
|
|
@@ -410,7 +410,7 @@ const Zt = {
|
|
|
410
410
|
}
|
|
411
411
|
}, Te = {
|
|
412
412
|
data: void 0
|
|
413
|
-
}, He = (
|
|
413
|
+
}, He = (o) => o.reduce((e, t) => (e[t] = t) && e, {}), X = He([
|
|
414
414
|
"drag",
|
|
415
415
|
"dragend",
|
|
416
416
|
"dragenter",
|
|
@@ -433,26 +433,26 @@ const Zt = {
|
|
|
433
433
|
props: {
|
|
434
434
|
draggable: { type: Boolean, default: !0 },
|
|
435
435
|
transferData: {},
|
|
436
|
-
dropEffect: { validator: (
|
|
437
|
-
effectAllowed: { validator: (
|
|
436
|
+
dropEffect: { validator: (o) => o in fo },
|
|
437
|
+
effectAllowed: { validator: (o) => o in mo },
|
|
438
438
|
image: String,
|
|
439
439
|
imageXOffset: { type: Number, default: 0 },
|
|
440
440
|
imageYOffset: { type: Number, default: 0 },
|
|
441
441
|
hideImageHtml: { type: Boolean, default: !1 },
|
|
442
442
|
tag: { type: String, default: "div" }
|
|
443
443
|
},
|
|
444
|
-
setup(
|
|
445
|
-
const e =
|
|
444
|
+
setup(o) {
|
|
445
|
+
const e = o, t = Ce(), n = T(!1), s = h(() => n && e.transferData), a = h(() => ({ position: "fixed", top: "-1000px" })), l = (r, i) => {
|
|
446
446
|
const c = i.dataTransfer;
|
|
447
447
|
if ([X.dragenter, X.dragover].includes(r) && e.dropEffect && (c.dropEffect = e.dropEffect), r === X.dragstart) {
|
|
448
|
-
if (e.effectAllowed && (c.effectAllowed = e.effectAllowed), e.image ||
|
|
448
|
+
if (e.effectAllowed && (c.effectAllowed = e.effectAllowed), e.image || t.image) {
|
|
449
449
|
let u;
|
|
450
|
-
e.image ? (u = new Image(), u.src = e.image) :
|
|
450
|
+
e.image ? (u = new Image(), u.src = e.image) : t.image && (u = t.image[0].elm), c.setDragImage && c.setDragImage(u, e.imageXOffset, e.imageYOffset);
|
|
451
451
|
}
|
|
452
452
|
e.transferData !== void 0 && (Te.data = e.transferData, i.dataTransfer.setData("text", "")), n.value = !0;
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
|
-
return (r, i) => (d(),
|
|
455
|
+
return (r, i) => (d(), k(U(o.tag), {
|
|
456
456
|
draggable: e.draggable,
|
|
457
457
|
onDrag: i[0] || (i[0] = (c) => l(L(X).drag, c)),
|
|
458
458
|
onDragstart: i[1] || (i[1] = j((c) => l(L(X).dragstart, c), ["stop"])),
|
|
@@ -462,7 +462,7 @@ const Zt = {
|
|
|
462
462
|
}, {
|
|
463
463
|
default: E(() => [
|
|
464
464
|
I(r.$slots, "default", { transferData: s.value }),
|
|
465
|
-
|
|
465
|
+
o.hideImageHtml ? (d(), p("div", {
|
|
466
466
|
key: 0,
|
|
467
467
|
style: z(a.value)
|
|
468
468
|
}, [
|
|
@@ -476,18 +476,18 @@ const Zt = {
|
|
|
476
476
|
}, 40, ["draggable"]));
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
|
-
const ho = (
|
|
479
|
+
const ho = (o) => (It("data-v-09adec49"), o = o(), Bt(), o), go = {
|
|
480
480
|
key: 0,
|
|
481
481
|
style: { display: "none" }
|
|
482
|
-
}, vo = { key: 1 }, yo = /* @__PURE__ */ ho(() => /* @__PURE__ */
|
|
482
|
+
}, vo = { key: 1 }, yo = /* @__PURE__ */ ho(() => /* @__PURE__ */ b("div", { class: "tree-divider" }, null, -1)), _o = [
|
|
483
483
|
yo
|
|
484
484
|
], bo = { key: 2 }, xo = { class: "tree-divider-header" }, ko = { class: "item-title" }, $o = {
|
|
485
485
|
key: 0,
|
|
486
486
|
class: "tree-divider"
|
|
487
|
-
}, wo = { key:
|
|
487
|
+
}, wo = ["href", "target"], So = { key: 0 }, Do = { key: 2 }, To = { style: { display: "flex", "flex-direction": "row", "justify-content": "flex-end" } }, Co = {
|
|
488
488
|
key: 0,
|
|
489
489
|
class: "sub-menu"
|
|
490
|
-
},
|
|
490
|
+
}, Lo = {
|
|
491
491
|
__name: "DTreeItem",
|
|
492
492
|
props: {
|
|
493
493
|
model: Object,
|
|
@@ -497,66 +497,66 @@ const ho = (t) => (It("data-v-9da49c73"), t = t(), Bt(), t), go = {
|
|
|
497
497
|
component: Object
|
|
498
498
|
},
|
|
499
499
|
emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick", "nodecontext", "nodedoubleclick", "nodefoldericonclick"],
|
|
500
|
-
setup(
|
|
501
|
-
const
|
|
502
|
-
e("nodeclick", { event: N, model:
|
|
500
|
+
setup(o, { emit: e }) {
|
|
501
|
+
const t = o, n = T(null), s = T(!1), a = T(!1), l = T(!1), r = h(() => t.model.children && t.model.children.length), i = h(() => (v.actions.isTreeExpanded(t.treeId) && (t.model.expanded = t.model.expanded === void 0 ? !0 : t.model.expanded), t.model.expanded)), c = (N) => {
|
|
502
|
+
e("nodeclick", { event: N, model: t.model });
|
|
503
503
|
}, u = (N) => {
|
|
504
|
-
e("nodefoldericonclick", { event: N, model:
|
|
504
|
+
e("nodefoldericonclick", { event: N, model: t.model });
|
|
505
505
|
}, g = (N) => {
|
|
506
506
|
e("nodefoldericonclick", N);
|
|
507
|
-
},
|
|
507
|
+
}, _ = (N) => {
|
|
508
508
|
e("nodeclick", N);
|
|
509
|
-
},
|
|
509
|
+
}, C = (N) => {
|
|
510
510
|
e("nodedoubleclick", N);
|
|
511
511
|
}, R = (N) => {
|
|
512
512
|
e("nodedrop", N);
|
|
513
513
|
}, $ = (N) => {
|
|
514
514
|
e("nodecontext", N);
|
|
515
515
|
}, A = h(() => [
|
|
516
|
-
v.actions.isItemSelected(
|
|
516
|
+
v.actions.isItemSelected(t.treeId, t.model.id) ? "selected" : "",
|
|
517
517
|
s.value ? "node-over " : "",
|
|
518
518
|
a.value ? "node-top " : "",
|
|
519
519
|
l.value ? "node-bottom " : ""
|
|
520
|
-
]), Y = h(() =>
|
|
520
|
+
]), Y = h(() => t.search ? !1 : t.model.draggable === !0), M = (N) => {
|
|
521
521
|
var P;
|
|
522
522
|
let w = Te.data;
|
|
523
523
|
if (w === void 0 || w.model === void 0)
|
|
524
524
|
return s.value = !1, !1;
|
|
525
|
-
if (w.model.id ===
|
|
525
|
+
if (w.model.id === t.model.id || v.actions.isChildOfParent(t.treeId, t.items, t.model.id, w.model.id) || v.actions.isParentOfChild(t.treeId, t.items, w.model.id, t.model.id))
|
|
526
526
|
return s.value = !1, a.value = !1, l.value = !1, !1;
|
|
527
|
-
if (!v.state.trees[
|
|
527
|
+
if (!v.state.trees[t.treeId].transfer && w.id !== t.treeId || !v.state.trees[t.treeId].dropInside && !l.value && !a.value)
|
|
528
528
|
return !1;
|
|
529
529
|
let H = "";
|
|
530
|
-
a.value ? H = "before" : l.value ? H = "after" : H = "inside", e("nodedrop", { e: N, model:
|
|
530
|
+
a.value ? H = "before" : l.value ? H = "after" : H = "inside", e("nodedrop", { e: N, model: t.model, place: H }), v.actions.moveTreeNode(w.id, t.treeId, t.items, w.model.id, t.model.id, H, (P = w.model) == null ? void 0 : P.transfer), s.value = !1, a.value = !1, l.value = !1;
|
|
531
531
|
}, B = (N) => {
|
|
532
|
-
e("nodedragover", { e: N, model:
|
|
532
|
+
e("nodedragover", { e: N, model: t.model });
|
|
533
533
|
let w = Te.data;
|
|
534
|
-
if (!
|
|
534
|
+
if (!t.model.droppable)
|
|
535
535
|
return !1;
|
|
536
536
|
if (w === void 0 || w.model === void 0)
|
|
537
537
|
return s.value = !0, !1;
|
|
538
|
-
if (w.model.id ===
|
|
538
|
+
if (w.model.id === t.model.id || v.actions.isChildOfParent(t.treeId, t.items, t.model.id, w.model.id) || v.actions.isParentOfChild(t.treeId, t.items, w.model.id, t.model.id))
|
|
539
539
|
return !1;
|
|
540
|
-
const H = N.y, P = n.value.getBoundingClientRect().top, m = n.value.getBoundingClientRect().height,
|
|
541
|
-
H > P && H <= P +
|
|
540
|
+
const H = N.y, P = n.value.getBoundingClientRect().top, m = n.value.getBoundingClientRect().height, f = m / 3;
|
|
541
|
+
H > P && H <= P + f ? (s.value = !1, a.value = !0, l.value = !1) : H < P + m && H >= P + m - f ? (s.value = !1, a.value = !1, l.value = !0) : (s.value = v.state.trees[t.treeId].dropInside, a.value = !1, l.value = !1);
|
|
542
542
|
}, F = () => {
|
|
543
543
|
s.value = !1, a.value = !1, l.value = !1;
|
|
544
|
-
},
|
|
545
|
-
if (
|
|
546
|
-
let [N, ...w] =
|
|
544
|
+
}, S = h(() => t.model.title.startsWith("-")), W = h(() => {
|
|
545
|
+
if (t.model.title.startsWith("-")) {
|
|
546
|
+
let [N, ...w] = t.model.title.split(" ");
|
|
547
547
|
return w = w.join(" "), w;
|
|
548
548
|
}
|
|
549
549
|
return null;
|
|
550
550
|
});
|
|
551
551
|
return (N, w) => {
|
|
552
552
|
const H = Lt("d-tree-item", !0), P = Re("touch");
|
|
553
|
-
return L(v).actions.beforeItem(
|
|
554
|
-
|
|
555
|
-
])) :
|
|
553
|
+
return L(v).actions.beforeItem(t.treeId, o.model) ? S.value && !W.value ? (d(), p("li", vo, _o)) : S.value && W.value ? (d(), p("li", bo, [
|
|
554
|
+
b("div", xo, O(L(v).actions.renderTitle(t.treeId, W.value)), 1)
|
|
555
|
+
])) : t.model.component ? (d(), k(it, {
|
|
556
556
|
key: 3,
|
|
557
557
|
tag: "li",
|
|
558
558
|
class: "tree-item-component",
|
|
559
|
-
"transfer-data": { id:
|
|
559
|
+
"transfer-data": { id: t.treeId, model: t.model },
|
|
560
560
|
draggable: Y.value,
|
|
561
561
|
onDrop: j(M, ["stop"]),
|
|
562
562
|
onDragenter: w[1] || (w[1] = j(() => {
|
|
@@ -565,23 +565,23 @@ const ho = (t) => (It("data-v-9da49c73"), t = t(), Bt(), t), go = {
|
|
|
565
565
|
onDragleave: j(F, ["prevent"])
|
|
566
566
|
}, {
|
|
567
567
|
default: E(() => [
|
|
568
|
-
Z((d(),
|
|
568
|
+
Z((d(), p("div", {
|
|
569
569
|
ref_key: "node",
|
|
570
570
|
ref: n,
|
|
571
|
-
class:
|
|
572
|
-
onContextmenu: w[0] || (w[0] = j((m) => e("nodecontext", { e: m, model:
|
|
571
|
+
class: D(A.value),
|
|
572
|
+
onContextmenu: w[0] || (w[0] = j((m) => e("nodecontext", { e: m, model: t.model }), ["prevent"]))
|
|
573
573
|
}, [
|
|
574
|
-
(d(),
|
|
574
|
+
(d(), k(U(L(fe).getters.getComponent(t.model.component).component), ft(mt(L(fe).getters.getComponent(t.model.component).props)), null, 16))
|
|
575
575
|
], 34)), [
|
|
576
576
|
[P, c, "press"]
|
|
577
577
|
])
|
|
578
578
|
]),
|
|
579
579
|
_: 1
|
|
580
|
-
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(),
|
|
580
|
+
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(), k(it, {
|
|
581
581
|
key: 4,
|
|
582
582
|
tag: "li",
|
|
583
583
|
class: "tree-item",
|
|
584
|
-
"transfer-data": { id:
|
|
584
|
+
"transfer-data": { id: t.treeId, model: t.model },
|
|
585
585
|
draggable: Y.value,
|
|
586
586
|
onDrop: j(M, ["stop"]),
|
|
587
587
|
onDragenter: w[4] || (w[4] = j(() => {
|
|
@@ -590,105 +590,112 @@ const ho = (t) => (It("data-v-9da49c73"), t = t(), Bt(), t), go = {
|
|
|
590
590
|
onDragleave: j(F, ["prevent"])
|
|
591
591
|
}, {
|
|
592
592
|
default: E(() => {
|
|
593
|
-
var m,
|
|
593
|
+
var m, f;
|
|
594
594
|
return [
|
|
595
|
-
|
|
595
|
+
b("div", {
|
|
596
596
|
ref_key: "node",
|
|
597
597
|
ref: n,
|
|
598
|
-
class:
|
|
598
|
+
class: D(A.value),
|
|
599
599
|
onPointerdownCapture: c,
|
|
600
|
-
onDblclick: w[2] || (w[2] = j((y) => e("nodedoubleclick", { e: y, model:
|
|
601
|
-
onContextmenu: w[3] || (w[3] = j((y) => e("nodecontext", { e: y, model:
|
|
600
|
+
onDblclick: w[2] || (w[2] = j((y) => e("nodedoubleclick", { e: y, model: t.model }), ["prevent"])),
|
|
601
|
+
onContextmenu: w[3] || (w[3] = j((y) => e("nodecontext", { e: y, model: t.model }), ["prevent"]))
|
|
602
602
|
}, [
|
|
603
|
-
|
|
604
|
-
|
|
603
|
+
b("div", null, [
|
|
604
|
+
t.model.icons && t.model.icons.pre && r.value && !t.search && !S.value ? (d(), k(U(re), {
|
|
605
605
|
key: 0,
|
|
606
|
-
component: L(oe).getters.getIcon(
|
|
606
|
+
component: L(oe).getters.getIcon(t.model.icons.pre.component),
|
|
607
607
|
size: 18,
|
|
608
|
-
color:
|
|
609
|
-
class:
|
|
608
|
+
color: t.model.icons.pre.color ? t.model.icons.pre.color : "inherit",
|
|
609
|
+
class: D(i.value ? "tree-open-pre" : ""),
|
|
610
610
|
onPointerdownCapture: u
|
|
611
|
-
}, null, 40, ["component", "color", "class"])) :
|
|
612
|
-
|
|
611
|
+
}, null, 40, ["component", "color", "class"])) : x("", !0),
|
|
612
|
+
t.model.icons && t.model.icons.pre && !r.value && !t.search && !S.value ? (d(), k(U(re), {
|
|
613
613
|
key: 1,
|
|
614
|
-
component: L(oe).getters.getIcon(
|
|
614
|
+
component: L(oe).getters.getIcon(t.model.icons.pre.component),
|
|
615
615
|
size: 18,
|
|
616
616
|
color: "rgba(0,0,0,0)",
|
|
617
|
-
class:
|
|
618
|
-
}, null, 8, ["component", "class"])) :
|
|
619
|
-
|
|
617
|
+
class: D(i.value ? "tree-open-pre" : "")
|
|
618
|
+
}, null, 8, ["component", "class"])) : x("", !0),
|
|
619
|
+
t.model.icons && t.model.icons.icon && !S.value ? (d(), k(U(re), {
|
|
620
620
|
key: 2,
|
|
621
|
-
component: L(oe).getters.getIcon(
|
|
622
|
-
color:
|
|
623
|
-
size:
|
|
624
|
-
className:
|
|
625
|
-
}, null, 8, ["component", "color", "size", "className"])) :
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
621
|
+
component: L(oe).getters.getIcon(t.model.icons.icon.component),
|
|
622
|
+
color: t.model.icons.icon.color ? t.model.icons.icon.color : "inherit",
|
|
623
|
+
size: t.model.icons.icon.size ? t.model.icons.icon.size : null,
|
|
624
|
+
className: t.model.icons.icon.class ? t.model.icons.icon.class : null
|
|
625
|
+
}, null, 8, ["component", "color", "size", "className"])) : x("", !0),
|
|
626
|
+
b("div", ko, [
|
|
627
|
+
S.value ? (d(), p("div", $o)) : x("", !0),
|
|
628
|
+
!S.value && Object.hasOwn(t.model, "link") ? (d(), p("a", {
|
|
629
|
+
key: 1,
|
|
630
|
+
href: t.model.link,
|
|
631
|
+
target: Object.hasOwn(t.model, "target") ? t.model.target : "_self"
|
|
632
|
+
}, [
|
|
633
|
+
S.value ? x("", !0) : (d(), p("div", So, O(L(v).actions.renderTitle(t.treeId, t.model.title)), 1))
|
|
634
|
+
], 8, wo)) : x("", !0),
|
|
635
|
+
!S.value && !Object.hasOwn(t.model, "link") ? (d(), p("div", Do, O(L(v).actions.renderTitle(t.treeId, t.model.title)), 1)) : x("", !0)
|
|
629
636
|
])
|
|
630
637
|
]),
|
|
631
|
-
|
|
632
|
-
((m =
|
|
638
|
+
b("div", To, [
|
|
639
|
+
((m = t.model.badge) == null ? void 0 : m.value) !== void 0 && !S.value ? (d(), k(U(uo), {
|
|
633
640
|
key: 0,
|
|
634
|
-
class:
|
|
641
|
+
class: D([(f = t.model.badge) == null ? void 0 : f.class, "badge-sm"])
|
|
635
642
|
}, {
|
|
636
643
|
default: E(() => [
|
|
637
|
-
J(O(
|
|
644
|
+
J(O(t.model.badge.value), 1)
|
|
638
645
|
]),
|
|
639
646
|
_: 1
|
|
640
|
-
}, 8, ["class"])) :
|
|
641
|
-
|
|
647
|
+
}, 8, ["class"])) : x("", !0),
|
|
648
|
+
t.model.icons && t.model.icons.post && r.value && !t.search && !S.value ? (d(), k(U(re), {
|
|
642
649
|
key: 1,
|
|
643
|
-
component: L(oe).getters.getIcon(
|
|
650
|
+
component: L(oe).getters.getIcon(t.model.icons.post.component),
|
|
644
651
|
size: 20,
|
|
645
|
-
color:
|
|
646
|
-
class:
|
|
652
|
+
color: t.model.icons.post.color ? t.model.icons.post.color : "inherit",
|
|
653
|
+
class: D(i.value ? "tree-open-post" : ""),
|
|
647
654
|
onPointerdownCapture: u
|
|
648
|
-
}, null, 40, ["component", "color", "class"])) :
|
|
655
|
+
}, null, 40, ["component", "color", "class"])) : x("", !0)
|
|
649
656
|
])
|
|
650
657
|
], 34),
|
|
651
658
|
Q(po, null, {
|
|
652
659
|
default: E(() => [
|
|
653
|
-
r.value && i.value && !
|
|
654
|
-
(d(!0),
|
|
660
|
+
r.value && i.value && !t.search ? (d(), p("ul", Co, [
|
|
661
|
+
(d(!0), p(ne, null, me(o.model.children, (y) => (d(), k(H, {
|
|
655
662
|
key: y.id,
|
|
656
663
|
model: y,
|
|
657
|
-
treeId:
|
|
658
|
-
items:
|
|
659
|
-
search:
|
|
660
|
-
onNodeclick:
|
|
661
|
-
onNodedoubleclick:
|
|
664
|
+
treeId: t.treeId,
|
|
665
|
+
items: t.items,
|
|
666
|
+
search: t.search,
|
|
667
|
+
onNodeclick: _,
|
|
668
|
+
onNodedoubleclick: C,
|
|
662
669
|
onNodedrop: R,
|
|
663
670
|
onNodecontext: $,
|
|
664
671
|
onNodefoldericonclick: g
|
|
665
672
|
}, null, 8, ["model", "treeId", "items", "search"]))), 128))
|
|
666
|
-
])) :
|
|
673
|
+
])) : x("", !0)
|
|
667
674
|
]),
|
|
668
675
|
_: 1
|
|
669
676
|
})
|
|
670
677
|
];
|
|
671
678
|
}),
|
|
672
679
|
_: 1
|
|
673
|
-
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(),
|
|
680
|
+
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(), p("li", go));
|
|
674
681
|
};
|
|
675
682
|
}
|
|
676
|
-
},
|
|
677
|
-
function
|
|
678
|
-
return
|
|
683
|
+
}, Io = /* @__PURE__ */ se(Lo, [["__scopeId", "data-v-09adec49"]]);
|
|
684
|
+
function Bo(o) {
|
|
685
|
+
return o = o || /* @__PURE__ */ new Map(), {
|
|
679
686
|
/**
|
|
680
687
|
* A Map of event names to registered handler functions.
|
|
681
688
|
*/
|
|
682
|
-
all:
|
|
689
|
+
all: o,
|
|
683
690
|
/**
|
|
684
691
|
* Register an event handler for the given type.
|
|
685
692
|
* @param {string|symbol} type Type of event to listen for, or `'*'` for all events
|
|
686
693
|
* @param {Function} handler Function to call in response to given event
|
|
687
694
|
* @memberOf eventsBus
|
|
688
695
|
*/
|
|
689
|
-
on(e,
|
|
690
|
-
const n =
|
|
691
|
-
n ? n.push(
|
|
696
|
+
on(e, t) {
|
|
697
|
+
const n = o.get(e);
|
|
698
|
+
n ? n.push(t) : o.set(e, [t]);
|
|
692
699
|
},
|
|
693
700
|
/**
|
|
694
701
|
* Remove an event handler for the given type.
|
|
@@ -697,9 +704,9 @@ function Lo(t) {
|
|
|
697
704
|
* @param {Function} [handler] Handler function to remove
|
|
698
705
|
* @memberOf eventsBus
|
|
699
706
|
*/
|
|
700
|
-
off(e,
|
|
701
|
-
const n =
|
|
702
|
-
n && (
|
|
707
|
+
off(e, t) {
|
|
708
|
+
const n = o.get(e);
|
|
709
|
+
n && (t ? n.splice(n.indexOf(t) >>> 0, 1) : o.set(e, []));
|
|
703
710
|
},
|
|
704
711
|
/**
|
|
705
712
|
* Invoke all handlers for the given type.
|
|
@@ -711,63 +718,63 @@ function Lo(t) {
|
|
|
711
718
|
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
712
719
|
* @memberOf eventsBus
|
|
713
720
|
*/
|
|
714
|
-
emit(e,
|
|
715
|
-
let n =
|
|
721
|
+
emit(e, t) {
|
|
722
|
+
let n = o.get(e);
|
|
716
723
|
n && n.slice().map((s) => {
|
|
717
|
-
s(
|
|
718
|
-
}), n =
|
|
719
|
-
s(e,
|
|
724
|
+
s(t);
|
|
725
|
+
}), n = o.get("*"), n && n.slice().map((s) => {
|
|
726
|
+
s(e, t);
|
|
720
727
|
});
|
|
721
728
|
}
|
|
722
729
|
};
|
|
723
730
|
}
|
|
724
|
-
const q =
|
|
731
|
+
const q = Bo(), v = {
|
|
725
732
|
state: Oe({
|
|
726
733
|
trees: {}
|
|
727
734
|
}),
|
|
728
735
|
getters: {
|
|
729
|
-
getItems(
|
|
730
|
-
return v.state.trees[
|
|
736
|
+
getItems(o) {
|
|
737
|
+
return v.state.trees[o].items;
|
|
731
738
|
},
|
|
732
|
-
getItemsSelect(
|
|
733
|
-
return v.state.trees[
|
|
739
|
+
getItemsSelect(o) {
|
|
740
|
+
return v.state.trees[o].selected;
|
|
734
741
|
},
|
|
735
742
|
// data - ноды, dataId - ID ноды родителя data
|
|
736
|
-
getParentId(
|
|
737
|
-
return
|
|
743
|
+
getParentId(o, e, t, n = "id", s = "children", a = {}) {
|
|
744
|
+
return t && o && (o.find((l) => l[n] === t ? (a.found = e, l) : v.getters.getParentId(l[s], l.id, t, n, s, a)), a.found) ? a.found : !1;
|
|
738
745
|
}
|
|
739
746
|
},
|
|
740
747
|
mutations: {
|
|
741
|
-
setTreeItems(
|
|
742
|
-
v.state.trees[
|
|
748
|
+
setTreeItems(o, e) {
|
|
749
|
+
v.state.trees[o].items = e;
|
|
743
750
|
},
|
|
744
|
-
setItemSelect(
|
|
745
|
-
v.state.trees[
|
|
746
|
-
return
|
|
747
|
-
}) : v.state.trees[
|
|
751
|
+
setItemSelect(o, e) {
|
|
752
|
+
v.state.trees[o].noSelect || (v.state.trees[o].multiSelect ? v.state.trees[o].selected.includes(e.id) ? v.state.trees[o].selected = v.state.trees[o].selected.filter(function(t) {
|
|
753
|
+
return t !== e.id;
|
|
754
|
+
}) : v.state.trees[o].selected = [...v.state.trees[o].selected, e.id] : v.state.trees[o].selected = [e.id]);
|
|
748
755
|
}
|
|
749
756
|
},
|
|
750
757
|
actions: {
|
|
751
|
-
initTreeStore(
|
|
752
|
-
v.state.trees[
|
|
758
|
+
initTreeStore(o, e, t, n, s, a, l, r = !0) {
|
|
759
|
+
v.state.trees[o] = [], v.state.trees[o].selected = [], v.state.trees[o].noSelect = e, v.state.trees[o].multiSelect = t, v.state.trees[o].expanded = n, v.state.trees[o].transfer = s, v.state.trees[o].renderTitle = a, v.state.trees[o].beforeItem = l, v.state.trees[o].dropInside = r;
|
|
753
760
|
},
|
|
754
|
-
renderTitle(
|
|
755
|
-
return v.state.trees[
|
|
761
|
+
renderTitle(o, e) {
|
|
762
|
+
return v.state.trees[o].renderTitle ? v.state.trees[o].renderTitle(e) : e;
|
|
756
763
|
},
|
|
757
|
-
beforeItem(
|
|
758
|
-
return v.state.trees[
|
|
764
|
+
beforeItem(o, e) {
|
|
765
|
+
return v.state.trees[o].beforeItem ? v.state.trees[o].beforeItem(e) : !0;
|
|
759
766
|
},
|
|
760
|
-
isItemSelected(
|
|
761
|
-
return v.state.trees[
|
|
767
|
+
isItemSelected(o, e) {
|
|
768
|
+
return v.state.trees[o].selected.includes(e);
|
|
762
769
|
},
|
|
763
|
-
toggleItem(
|
|
764
|
-
e.expanded = e.expanded === void 0 || !e.expanded, e.children && e.children.length && (e.expanded ? q.emit(`expand-${
|
|
770
|
+
toggleItem(o, e) {
|
|
771
|
+
e.expanded = e.expanded === void 0 || !e.expanded, e.children && e.children.length && (e.expanded ? q.emit(`expand-${o}`, { id: o, model: e }) : q.emit(`collapse-${o}`, { id: o, model: e }));
|
|
765
772
|
},
|
|
766
|
-
isTreeExpanded(
|
|
767
|
-
return v.state.trees[
|
|
773
|
+
isTreeExpanded(o) {
|
|
774
|
+
return v.state.trees[o].expanded;
|
|
768
775
|
},
|
|
769
|
-
isChildOfParent(
|
|
770
|
-
const s = v.actions.deepSearch(e,
|
|
776
|
+
isChildOfParent(o, e, t, n) {
|
|
777
|
+
const s = v.actions.deepSearch(e, t);
|
|
771
778
|
if (s && s.children) {
|
|
772
779
|
for (let a = 0; a < s.children.length; a++)
|
|
773
780
|
if (s.children[a].id === n)
|
|
@@ -776,17 +783,17 @@ const q = Lo(), v = {
|
|
|
776
783
|
return !1;
|
|
777
784
|
},
|
|
778
785
|
// Является ли нода родителем указанного потомка
|
|
779
|
-
isParentOfChild(
|
|
780
|
-
const s = v.actions.deepSearch(e,
|
|
786
|
+
isParentOfChild(o, e, t, n) {
|
|
787
|
+
const s = v.actions.deepSearch(e, t);
|
|
781
788
|
return !!(s && s.children && v.actions.deepSearch(s.children, n));
|
|
782
789
|
},
|
|
783
|
-
deepSearch(
|
|
784
|
-
return e &&
|
|
790
|
+
deepSearch(o, e, t = "id", n = "children", s = {}) {
|
|
791
|
+
return e && o && (o.find((a) => a[t] === e ? (s.found = a, a) : v.actions.deepSearch(a[n], e, t, n, s)), s.found) ? s.found : !1;
|
|
785
792
|
},
|
|
786
|
-
deepSearchByTitle(
|
|
787
|
-
if (e &&
|
|
793
|
+
deepSearchByTitle(o, e, t = "title", n = "children", s = []) {
|
|
794
|
+
if (e && o && (o.find((a) => {
|
|
788
795
|
const l = new RegExp(e, "gi");
|
|
789
|
-
a[
|
|
796
|
+
a[t].toString().toLowerCase().match(l) !== null && s.push(a), v.actions.deepSearchByTitle(a[n], e, t, n, s);
|
|
790
797
|
}), s)) {
|
|
791
798
|
for (let a = 0; a < s.length; a++)
|
|
792
799
|
;
|
|
@@ -794,58 +801,58 @@ const q = Lo(), v = {
|
|
|
794
801
|
}
|
|
795
802
|
return s;
|
|
796
803
|
},
|
|
797
|
-
moveTreeNode(
|
|
804
|
+
moveTreeNode(o, e, t, n, s, a, l = !0) {
|
|
798
805
|
if (l) {
|
|
799
|
-
const r = v.actions.deleteTreeNode(
|
|
800
|
-
v.actions.insertTreeNode(
|
|
806
|
+
const r = v.actions.deleteTreeNode(t, n);
|
|
807
|
+
v.actions.insertTreeNode(t, s, r, a), q.emit(`move-${e}`, { fromTreeId: o, toTreeId: e, moved: r == null ? void 0 : r.id, target: s, position: a });
|
|
801
808
|
} else
|
|
802
|
-
q.emit(`move-${e}`, { fromTreeId:
|
|
809
|
+
q.emit(`move-${e}`, { fromTreeId: o, toTreeId: e, moved: n, target: s, position: a });
|
|
803
810
|
},
|
|
804
|
-
insertTreeNode(
|
|
805
|
-
if (
|
|
806
|
-
for (let s = 0; s <
|
|
807
|
-
if (
|
|
811
|
+
insertTreeNode(o, e, t, n) {
|
|
812
|
+
if (o)
|
|
813
|
+
for (let s = 0; s < o.length; s++) {
|
|
814
|
+
if (o[s].id === e) {
|
|
808
815
|
let l = s;
|
|
809
|
-
return n === "after" ? (l++,
|
|
816
|
+
return n === "after" ? (l++, o.splice(l, 0, t)) : n === "before" ? o.splice(l, 0, t) : n === "inside" && (Object.hasOwn(o[s], "children") || (o[s].children = [], o[s].opened = !0), o[s].children.splice(0, 0, t)), o[s];
|
|
810
817
|
}
|
|
811
|
-
const a = this.insertTreeNode(
|
|
818
|
+
const a = this.insertTreeNode(o[s].children, e, t, n);
|
|
812
819
|
if (a)
|
|
813
820
|
return a;
|
|
814
821
|
}
|
|
815
822
|
},
|
|
816
|
-
deleteTreeNode(
|
|
817
|
-
if (
|
|
818
|
-
for (let
|
|
819
|
-
if (t
|
|
820
|
-
const s = t
|
|
821
|
-
return
|
|
823
|
+
deleteTreeNode(o, e) {
|
|
824
|
+
if (o)
|
|
825
|
+
for (let t = 0; t < o.length; t++) {
|
|
826
|
+
if (o[t].id === e) {
|
|
827
|
+
const s = o[t];
|
|
828
|
+
return o.splice(t, 1), s;
|
|
822
829
|
}
|
|
823
|
-
const n = v.actions.deleteTreeNode(t
|
|
830
|
+
const n = v.actions.deleteTreeNode(o[t].children, e);
|
|
824
831
|
if (n)
|
|
825
832
|
return n;
|
|
826
833
|
}
|
|
827
834
|
}
|
|
828
835
|
}
|
|
829
|
-
},
|
|
836
|
+
}, Eo = {
|
|
830
837
|
__name: "DDrop",
|
|
831
838
|
props: {
|
|
832
839
|
tag: { type: String, default: "div" }
|
|
833
840
|
},
|
|
834
841
|
emits: Object.keys(X),
|
|
835
|
-
setup(
|
|
842
|
+
setup(o, { expose: e, emit: t }) {
|
|
836
843
|
let n = Oe({});
|
|
837
|
-
const s =
|
|
838
|
-
n = Te.data,
|
|
844
|
+
const s = T("false"), a = T(null), l = /* @__PURE__ */ new Set(), r = h(() => s.value && n), i = (u, g) => {
|
|
845
|
+
n = Te.data, t(u, g, n), u === X.dragenter && (l.size || g.target === a.value) && l.add(g.target), u === X.dragleave && l.delete(g.target), u === X.drop && l.clear(), s.value = !!l.size;
|
|
839
846
|
};
|
|
840
847
|
return e({
|
|
841
848
|
elementSize: () => bt(a)
|
|
842
|
-
}), (u, g) => (d(),
|
|
849
|
+
}), (u, g) => (d(), k(U(o.tag), {
|
|
843
850
|
ref_key: "el",
|
|
844
851
|
ref: a,
|
|
845
|
-
onDragenter: g[0] || (g[0] = (
|
|
846
|
-
onDragleave: g[1] || (g[1] = (
|
|
847
|
-
onDragover: g[2] || (g[2] = j((
|
|
848
|
-
onDrop: g[3] || (g[3] = j((
|
|
852
|
+
onDragenter: g[0] || (g[0] = (_) => i(L(X).dragenter, _)),
|
|
853
|
+
onDragleave: g[1] || (g[1] = (_) => i(L(X).dragleave, _)),
|
|
854
|
+
onDragover: g[2] || (g[2] = j((_) => i(L(X).dragover, _), ["prevent"])),
|
|
855
|
+
onDrop: g[3] || (g[3] = j((_) => i(L(X).drop, _), ["prevent"]))
|
|
849
856
|
}, {
|
|
850
857
|
default: E(() => [
|
|
851
858
|
I(u.$slots, "default", { transferData: r.value })
|
|
@@ -871,14 +878,14 @@ const q = Lo(), v = {
|
|
|
871
878
|
}
|
|
872
879
|
},
|
|
873
880
|
emits: ["select"],
|
|
874
|
-
setup(
|
|
875
|
-
const n =
|
|
876
|
-
let s =
|
|
881
|
+
setup(o, { expose: e, emit: t }) {
|
|
882
|
+
const n = o;
|
|
883
|
+
let s = T(null), a = T(!1);
|
|
877
884
|
const l = () => {
|
|
878
885
|
q.emit("menu-show-request"), a.value = !0;
|
|
879
886
|
}, r = () => {
|
|
880
|
-
var
|
|
881
|
-
(
|
|
887
|
+
var _;
|
|
888
|
+
(_ = s.value) == null || _.collapseAll(), a.value = !1;
|
|
882
889
|
}, i = () => a.value;
|
|
883
890
|
q.on("menu-show-request", () => {
|
|
884
891
|
r();
|
|
@@ -889,30 +896,30 @@ const q = Lo(), v = {
|
|
|
889
896
|
isShowed: i,
|
|
890
897
|
itemsCount: () => s.value.itemsCount()
|
|
891
898
|
});
|
|
892
|
-
const g = (
|
|
893
|
-
|
|
899
|
+
const g = (_) => {
|
|
900
|
+
t("select", _), _.model.children || r();
|
|
894
901
|
};
|
|
895
|
-
return (
|
|
902
|
+
return (_, C) => {
|
|
896
903
|
const R = Re("click-outside");
|
|
897
|
-
return d(),
|
|
898
|
-
L(a) ? Z((d(),
|
|
904
|
+
return d(), k(ht, { to: "body" }, [
|
|
905
|
+
L(a) ? Z((d(), k(kt, {
|
|
899
906
|
key: 0,
|
|
900
907
|
ref_key: "treeRef",
|
|
901
908
|
ref: s,
|
|
902
909
|
items: n.items,
|
|
903
910
|
"no-select": n.noSelect,
|
|
904
|
-
class:
|
|
911
|
+
class: D(n.class),
|
|
905
912
|
style: z(n.style),
|
|
906
913
|
onSelect: g,
|
|
907
914
|
"render-title": n.renderItemTitle,
|
|
908
915
|
"before-item": n.beforeItem
|
|
909
916
|
}, null, 8, ["items", "no-select", "class", "style", "render-title", "before-item"])), [
|
|
910
917
|
[R, () => r()]
|
|
911
|
-
]) :
|
|
918
|
+
]) : x("", !0)
|
|
912
919
|
]);
|
|
913
920
|
};
|
|
914
921
|
}
|
|
915
|
-
},
|
|
922
|
+
}, Mo = {
|
|
916
923
|
__name: "DContextMenu",
|
|
917
924
|
props: {
|
|
918
925
|
items: Array,
|
|
@@ -920,21 +927,21 @@ const q = Lo(), v = {
|
|
|
920
927
|
beforeItem: Function
|
|
921
928
|
},
|
|
922
929
|
emits: ["select"],
|
|
923
|
-
setup(
|
|
924
|
-
const n =
|
|
930
|
+
setup(o, { expose: e, emit: t }) {
|
|
931
|
+
const n = o, s = T(null), a = T(0), l = T(0), r = h(() => ({
|
|
925
932
|
left: a.value + "px",
|
|
926
933
|
top: l.value + "px"
|
|
927
934
|
})), i = (u) => {
|
|
928
935
|
s.value.show(), gt(() => {
|
|
929
|
-
const g = s.value.elementSize(),
|
|
930
|
-
a.value =
|
|
936
|
+
const g = s.value.elementSize(), _ = window.innerWidth, C = window.innerHeight;
|
|
937
|
+
a.value = _ - u.pageX < g.width ? u.pageX - g.width : u.pageX, l.value = C - u.pageY < g.height ? u.pageY - g.height : u.pageY, s.value.itemsCount() === 0 && s.value.hide();
|
|
931
938
|
});
|
|
932
939
|
}, c = (u) => {
|
|
933
|
-
|
|
940
|
+
t("select", u);
|
|
934
941
|
};
|
|
935
942
|
return e({
|
|
936
943
|
show: i
|
|
937
|
-
}), (u, g) => (d(),
|
|
944
|
+
}), (u, g) => (d(), k(xt, {
|
|
938
945
|
ref_key: "dMenuRef",
|
|
939
946
|
ref: s,
|
|
940
947
|
onSelect: c,
|
|
@@ -993,46 +1000,46 @@ const q = Lo(), v = {
|
|
|
993
1000
|
}
|
|
994
1001
|
},
|
|
995
1002
|
emits: ["select", "collapse", "expand", "move", "over", "drop", "doubleclick", "foldericonclick"],
|
|
996
|
-
setup(
|
|
997
|
-
const n =
|
|
1003
|
+
setup(o, { expose: e, emit: t }) {
|
|
1004
|
+
const n = o, s = T(null), a = T(!1), l = T(null), r = Ve().uid;
|
|
998
1005
|
v.actions.initTreeStore(r, n.noSelect, n.multiSelect, n.expanded, n.transfer, n.renderTitle, n.beforeItem, n.dropInside);
|
|
999
|
-
const i = (
|
|
1000
|
-
console.log(
|
|
1006
|
+
const i = (f, y) => {
|
|
1007
|
+
console.log(f, y);
|
|
1001
1008
|
};
|
|
1002
|
-
q.on(`expand-${r}`, (
|
|
1003
|
-
|
|
1004
|
-
}), q.on(`collapse-${r}`, (
|
|
1005
|
-
|
|
1006
|
-
}), q.on(`move-${r}`, (
|
|
1007
|
-
|
|
1009
|
+
q.on(`expand-${r}`, (f) => {
|
|
1010
|
+
t("expand", f);
|
|
1011
|
+
}), q.on(`collapse-${r}`, (f) => {
|
|
1012
|
+
t("collapse", f);
|
|
1013
|
+
}), q.on(`move-${r}`, (f) => {
|
|
1014
|
+
t("move", f);
|
|
1008
1015
|
});
|
|
1009
|
-
const c = h(() => n.search ? v.actions.deepSearchByTitle(n.items, n.search) : n.items), u = (
|
|
1016
|
+
const c = h(() => n.search ? v.actions.deepSearchByTitle(n.items, n.search) : n.items), u = (f) => {
|
|
1010
1017
|
for (let y = 0; y < n.items.length; y++)
|
|
1011
|
-
n.items[y].id ===
|
|
1012
|
-
}, g = (
|
|
1013
|
-
v.mutations.setItemSelect(r,
|
|
1014
|
-
},
|
|
1015
|
-
n.doubleClickExpand && v.actions.toggleItem(r,
|
|
1016
|
-
},
|
|
1017
|
-
n.doubleClickExpand && v.actions.toggleItem(r,
|
|
1018
|
-
}, R = (
|
|
1019
|
-
|
|
1020
|
-
}, $ = (
|
|
1021
|
-
|
|
1018
|
+
n.items[y].id === f && v.actions.toggleItem(r, n.items[y]), n.items[y].expanded = !0;
|
|
1019
|
+
}, g = (f = null) => {
|
|
1020
|
+
v.mutations.setItemSelect(r, f.model), n.doubleClickExpand || v.actions.toggleItem(r, f.model), t("select", f);
|
|
1021
|
+
}, _ = (f = null) => {
|
|
1022
|
+
n.doubleClickExpand && v.actions.toggleItem(r, f.model), t("doubleclick", f);
|
|
1023
|
+
}, C = (f = null) => {
|
|
1024
|
+
n.doubleClickExpand && v.actions.toggleItem(r, f.model), t("foldericonclick", f);
|
|
1025
|
+
}, R = (f = null) => {
|
|
1026
|
+
t("over", f);
|
|
1027
|
+
}, $ = (f = null) => {
|
|
1028
|
+
t("drop", f);
|
|
1022
1029
|
}, A = () => s.value.elementSize(), Y = () => {
|
|
1023
|
-
for (let
|
|
1024
|
-
n.items[
|
|
1030
|
+
for (let f = 0; f < n.items.length; f++)
|
|
1031
|
+
n.items[f].expanded = !0;
|
|
1025
1032
|
}, M = () => {
|
|
1026
|
-
for (let
|
|
1027
|
-
n.items[
|
|
1028
|
-
}, B = () => r, F = (
|
|
1029
|
-
F(
|
|
1030
|
-
}, W = (
|
|
1031
|
-
n.contextClick({ e:
|
|
1032
|
-
}, N = (
|
|
1033
|
+
for (let f = 0; f < n.items.length; f++)
|
|
1034
|
+
n.items[f].expanded = !1;
|
|
1035
|
+
}, B = () => r, F = (f) => v.actions.deepSearch(n.items, f), S = (f) => {
|
|
1036
|
+
F(f) && v.mutations.setItemSelect(r, F(f));
|
|
1037
|
+
}, W = (f) => {
|
|
1038
|
+
n.contextClick({ e: f.e, model: f.model, target: l.value });
|
|
1039
|
+
}, N = (f) => n.contextBeforeClick({ model: f, target: l.value }), w = h(() => n.context), H = (f) => (w.value && (l.value = f.model, a.value.show(f.e)), !1), P = () => m(c.value), m = (f) => {
|
|
1033
1040
|
let y = 0;
|
|
1034
|
-
for (let V = 0; V <
|
|
1035
|
-
y += v.actions.beforeItem(r,
|
|
1041
|
+
for (let V = 0; V < f.length; V++)
|
|
1042
|
+
y += v.actions.beforeItem(r, f[V]) ? 1 : 0, f[V].children && f[V].children.length > 0 && (y += m(f[V].children));
|
|
1036
1043
|
return y;
|
|
1037
1044
|
};
|
|
1038
1045
|
return e({
|
|
@@ -1041,10 +1048,10 @@ const q = Lo(), v = {
|
|
|
1041
1048
|
collapseAll: M,
|
|
1042
1049
|
getId: B,
|
|
1043
1050
|
getNode: F,
|
|
1044
|
-
selectNode:
|
|
1051
|
+
selectNode: S,
|
|
1045
1052
|
itemsCount: P,
|
|
1046
1053
|
expandNode: u
|
|
1047
|
-
}), (
|
|
1054
|
+
}), (f, y) => (d(), k(Eo, {
|
|
1048
1055
|
ref_key: "treeRef",
|
|
1049
1056
|
ref: s,
|
|
1050
1057
|
class: "tree",
|
|
@@ -1052,33 +1059,33 @@ const q = Lo(), v = {
|
|
|
1052
1059
|
onDrop: j(i, ["stop"])
|
|
1053
1060
|
}, {
|
|
1054
1061
|
default: E(() => [
|
|
1055
|
-
(d(!0),
|
|
1062
|
+
(d(!0), p(ne, null, me(c.value, (V) => (d(), k(Io, {
|
|
1056
1063
|
key: V.id,
|
|
1057
1064
|
model: V,
|
|
1058
1065
|
treeId: L(r),
|
|
1059
1066
|
items: n.items,
|
|
1060
1067
|
search: n.search,
|
|
1061
1068
|
onNodeclick: g,
|
|
1062
|
-
onNodedoubleclick:
|
|
1069
|
+
onNodedoubleclick: _,
|
|
1063
1070
|
onNodedragover: R,
|
|
1064
1071
|
onNodedrop: $,
|
|
1065
1072
|
onNodecontext: H,
|
|
1066
|
-
onNodefoldericonclick:
|
|
1073
|
+
onNodefoldericonclick: C
|
|
1067
1074
|
}, null, 8, ["model", "treeId", "items", "search"]))), 128)),
|
|
1068
|
-
w.value ? (d(),
|
|
1075
|
+
w.value ? (d(), k(Mo, {
|
|
1069
1076
|
key: 0,
|
|
1070
1077
|
ref_key: "contextTreeRef",
|
|
1071
1078
|
ref: a,
|
|
1072
1079
|
items: w.value,
|
|
1073
1080
|
onSelect: W,
|
|
1074
1081
|
"before-item": N
|
|
1075
|
-
}, null, 8, ["items"])) :
|
|
1082
|
+
}, null, 8, ["items"])) : x("", !0)
|
|
1076
1083
|
]),
|
|
1077
1084
|
_: 1
|
|
1078
1085
|
}, 8, ["onDrop"]));
|
|
1079
1086
|
}
|
|
1080
1087
|
};
|
|
1081
|
-
const
|
|
1088
|
+
const No = {
|
|
1082
1089
|
__name: "DAccordion",
|
|
1083
1090
|
props: {
|
|
1084
1091
|
items: Array,
|
|
@@ -1090,20 +1097,20 @@ const Eo = {
|
|
|
1090
1097
|
}
|
|
1091
1098
|
},
|
|
1092
1099
|
emits: ["move"],
|
|
1093
|
-
setup(
|
|
1094
|
-
const
|
|
1100
|
+
setup(o, { emit: e }) {
|
|
1101
|
+
const t = o, n = (s) => {
|
|
1095
1102
|
e("move", s);
|
|
1096
1103
|
};
|
|
1097
|
-
return (s, a) => (d(),
|
|
1104
|
+
return (s, a) => (d(), k(kt, {
|
|
1098
1105
|
class: "accordion",
|
|
1099
|
-
items:
|
|
1100
|
-
"no-select":
|
|
1101
|
-
"render-title":
|
|
1106
|
+
items: t.items,
|
|
1107
|
+
"no-select": t.noSelect,
|
|
1108
|
+
"render-title": t.renderTitle,
|
|
1102
1109
|
"drop-inside": !1,
|
|
1103
1110
|
onMove: n
|
|
1104
1111
|
}, null, 8, ["items", "no-select", "render-title"]));
|
|
1105
1112
|
}
|
|
1106
|
-
},
|
|
1113
|
+
}, Os = /* @__PURE__ */ se(No, [["__scopeId", "data-v-a724c500"]]), Ro = {
|
|
1107
1114
|
__name: "DLayoutHeader",
|
|
1108
1115
|
props: {
|
|
1109
1116
|
fixed: {
|
|
@@ -1136,19 +1143,19 @@ const Eo = {
|
|
|
1136
1143
|
},
|
|
1137
1144
|
useMinWidthLayout: Boolean
|
|
1138
1145
|
},
|
|
1139
|
-
setup(
|
|
1140
|
-
const e =
|
|
1146
|
+
setup(o) {
|
|
1147
|
+
const e = o, t = h(() => {
|
|
1141
1148
|
const { fixed: n, zIndex: s, minWidth: a, height: l, paddingLeft: r, transitionDuration: i, transitionTimingFunction: c } = e, u = n ? "fixed" : "static", g = e.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1142
1149
|
return `position:${u};z-index:${s};${g}height:${l}px;padding-left:${r}px;transition-duration:${i}ms;transition-timing-function:${c};`;
|
|
1143
1150
|
});
|
|
1144
|
-
return (n, s) => (d(),
|
|
1151
|
+
return (n, s) => (d(), p("header", {
|
|
1145
1152
|
class: "d-layout-header",
|
|
1146
|
-
style: z(
|
|
1153
|
+
style: z(t.value)
|
|
1147
1154
|
}, [
|
|
1148
1155
|
I(n.$slots, "default")
|
|
1149
1156
|
], 4));
|
|
1150
1157
|
}
|
|
1151
|
-
},
|
|
1158
|
+
}, Oo = {
|
|
1152
1159
|
__name: "DLayoutTab",
|
|
1153
1160
|
props: {
|
|
1154
1161
|
fixed: {
|
|
@@ -1185,19 +1192,19 @@ const Eo = {
|
|
|
1185
1192
|
},
|
|
1186
1193
|
useMinWidthLayout: Boolean
|
|
1187
1194
|
},
|
|
1188
|
-
setup(
|
|
1189
|
-
const e =
|
|
1190
|
-
const { fixed: n, top: s, zIndex: a, minWidth: l, height: r, paddingLeft: i, transitionDuration: c, transitionTimingFunction: u } = e, g = n ? "fixed" : "static",
|
|
1191
|
-
return `position:${g};top:${s}px;z-index:${a};${
|
|
1195
|
+
setup(o) {
|
|
1196
|
+
const e = o, t = h(() => {
|
|
1197
|
+
const { fixed: n, top: s, zIndex: a, minWidth: l, height: r, paddingLeft: i, transitionDuration: c, transitionTimingFunction: u } = e, g = n ? "fixed" : "static", _ = e.useMinWidthLayout ? `min-width: ${l}px;` : "";
|
|
1198
|
+
return `position:${g};top:${s}px;z-index:${a};${_}height:${r}px;padding-left:${i}px;transition-duration:${c}ms;transition-timing-function:${u};`;
|
|
1192
1199
|
});
|
|
1193
|
-
return (n, s) => (d(),
|
|
1200
|
+
return (n, s) => (d(), p("div", {
|
|
1194
1201
|
class: "d-layout-tab",
|
|
1195
|
-
style: z(
|
|
1202
|
+
style: z(t.value)
|
|
1196
1203
|
}, [
|
|
1197
1204
|
I(n.$slots, "default")
|
|
1198
1205
|
], 4));
|
|
1199
1206
|
}
|
|
1200
|
-
},
|
|
1207
|
+
}, Vo = {
|
|
1201
1208
|
__name: "DLayoutFooter",
|
|
1202
1209
|
props: {
|
|
1203
1210
|
fixed: {
|
|
@@ -1230,19 +1237,19 @@ const Eo = {
|
|
|
1230
1237
|
},
|
|
1231
1238
|
useMinWidthLayout: Boolean
|
|
1232
1239
|
},
|
|
1233
|
-
setup(
|
|
1234
|
-
const e =
|
|
1240
|
+
setup(o) {
|
|
1241
|
+
const e = o, t = h(() => {
|
|
1235
1242
|
const { fixed: n, zIndex: s, minWidth: a, height: l, paddingLeft: r, transitionDuration: i, transitionTimingFunction: c } = e, u = n ? "fixed" : "static", g = e.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1236
1243
|
return `position:${u};z-index:${s};${g}height:${l}px;padding-left:${r}px;transition-duration:${i}ms;transition-timing-function:${c};`;
|
|
1237
1244
|
});
|
|
1238
|
-
return (n, s) => (d(),
|
|
1245
|
+
return (n, s) => (d(), p("footer", {
|
|
1239
1246
|
class: "d-layout-footer",
|
|
1240
|
-
style: z(
|
|
1247
|
+
style: z(t.value)
|
|
1241
1248
|
}, [
|
|
1242
1249
|
I(n.$slots, "default")
|
|
1243
1250
|
], 4));
|
|
1244
1251
|
}
|
|
1245
|
-
},
|
|
1252
|
+
}, Ao = {
|
|
1246
1253
|
__name: "DLayoutSidebar",
|
|
1247
1254
|
props: {
|
|
1248
1255
|
zIndex: {
|
|
@@ -1270,19 +1277,19 @@ const Eo = {
|
|
|
1270
1277
|
default: !1
|
|
1271
1278
|
}
|
|
1272
1279
|
},
|
|
1273
|
-
setup(
|
|
1274
|
-
const e =
|
|
1280
|
+
setup(o) {
|
|
1281
|
+
const e = o, t = h(() => {
|
|
1275
1282
|
const { zIndex: n, width: s, paddingTop: a, transitionDuration: l, transitionTimingFunction: r } = e;
|
|
1276
1283
|
return `z-index:${n};width:${s}px;padding-top:${a}px;transition-duration:${l}ms;transition-timing-function:${r};`;
|
|
1277
1284
|
});
|
|
1278
|
-
return (n, s) => (d(),
|
|
1285
|
+
return (n, s) => (d(), p("aside", {
|
|
1279
1286
|
class: "d-layout-sidebar",
|
|
1280
|
-
style: z(
|
|
1287
|
+
style: z(t.value)
|
|
1281
1288
|
}, [
|
|
1282
1289
|
I(n.$slots, "default")
|
|
1283
1290
|
], 4));
|
|
1284
1291
|
}
|
|
1285
|
-
},
|
|
1292
|
+
}, Ho = {
|
|
1286
1293
|
__name: "DLayoutContent",
|
|
1287
1294
|
props: {
|
|
1288
1295
|
paddingTop: {
|
|
@@ -1307,21 +1314,21 @@ const Eo = {
|
|
|
1307
1314
|
default: "ease-in-out"
|
|
1308
1315
|
}
|
|
1309
1316
|
},
|
|
1310
|
-
setup(
|
|
1311
|
-
const e =
|
|
1317
|
+
setup(o) {
|
|
1318
|
+
const e = o, t = h(() => {
|
|
1312
1319
|
const { paddingTop: n, paddingBottom: s, paddingLeft: a, transitionDuration: l, transitionTimingFunction: r } = e, i = `overflow:${e.overflowHidden ? "hidden" : "visible"};`;
|
|
1313
1320
|
return `padding-top:${n}px;padding-bottom:${s}px;padding-left:${a}px;${i}transition-duration:${l}ms;transition-timing-function:${r};`;
|
|
1314
1321
|
});
|
|
1315
|
-
return (n, s) => (d(),
|
|
1316
|
-
style: z(
|
|
1322
|
+
return (n, s) => (d(), p("main", {
|
|
1323
|
+
style: z(t.value),
|
|
1317
1324
|
class: "d-layout-content"
|
|
1318
1325
|
}, [
|
|
1319
1326
|
I(n.$slots, "default")
|
|
1320
1327
|
], 4));
|
|
1321
1328
|
}
|
|
1322
1329
|
};
|
|
1323
|
-
function
|
|
1324
|
-
const e =
|
|
1330
|
+
function zo(o) {
|
|
1331
|
+
const e = T(0), t = h(() => `transform: translateX(${-e.value}px);`);
|
|
1325
1332
|
let n = !1;
|
|
1326
1333
|
function s(u) {
|
|
1327
1334
|
e.value = u;
|
|
@@ -1343,13 +1350,13 @@ function Ao(t) {
|
|
|
1343
1350
|
function c() {
|
|
1344
1351
|
l(), r(), n = !0;
|
|
1345
1352
|
}
|
|
1346
|
-
return vt(
|
|
1353
|
+
return vt(o, (u) => {
|
|
1347
1354
|
u ? c() : i();
|
|
1348
1355
|
}, { immediate: !0 }), Et(() => {
|
|
1349
1356
|
i();
|
|
1350
|
-
}),
|
|
1357
|
+
}), t;
|
|
1351
1358
|
}
|
|
1352
|
-
const
|
|
1359
|
+
const Fo = 1001, Wo = 999, Po = 998, Vs = {
|
|
1353
1360
|
__name: "DLayoutAdmin",
|
|
1354
1361
|
props: {
|
|
1355
1362
|
mode: {
|
|
@@ -1439,107 +1446,107 @@ const Ho = 1001, zo = 999, Fo = 998, Os = {
|
|
|
1439
1446
|
}
|
|
1440
1447
|
},
|
|
1441
1448
|
emits: ["update:sidebar-collapse", "sidebar-mask-click"],
|
|
1442
|
-
setup(
|
|
1443
|
-
const
|
|
1444
|
-
const { transitionDuration:
|
|
1449
|
+
setup(o, { emit: e }) {
|
|
1450
|
+
const t = o, n = h(() => t.useMinWidthLayout ? `min-width:${t.minWidth}px;` : ""), s = h(() => t.useMinWidthLayout && (t.fixedHeaderAndTab || t.fixedFooter)), a = zo(s), l = h(() => t.fixedHeaderAndTab ? a.value : ""), r = h(() => t.fixedFooter ? a.value : ""), i = h(() => {
|
|
1451
|
+
const { transitionDuration: S, transitionTimingFunction: W } = t;
|
|
1445
1452
|
return {
|
|
1446
|
-
transitionDuration:
|
|
1453
|
+
transitionDuration: S,
|
|
1447
1454
|
transitionTimingFunction: W
|
|
1448
1455
|
};
|
|
1449
|
-
}), c = h(() =>
|
|
1456
|
+
}), c = h(() => t.mode === "vertical"), u = h(() => t.isMobile || c.value ? 1003 : 1e3), g = h({
|
|
1450
1457
|
get() {
|
|
1451
|
-
return
|
|
1458
|
+
return t.sidebarCollapse;
|
|
1452
1459
|
},
|
|
1453
|
-
set(
|
|
1454
|
-
e("update:sidebar-collapse",
|
|
1460
|
+
set(S) {
|
|
1461
|
+
e("update:sidebar-collapse", S);
|
|
1455
1462
|
}
|
|
1456
1463
|
});
|
|
1457
|
-
function
|
|
1464
|
+
function _() {
|
|
1458
1465
|
e("sidebar-mask-click");
|
|
1459
1466
|
}
|
|
1460
|
-
const
|
|
1461
|
-
const { transitionDuration:
|
|
1462
|
-
return `background-color:${
|
|
1467
|
+
const C = h(() => t.isMobile && !g.value), R = h(() => {
|
|
1468
|
+
const { transitionDuration: S, transitionTimingFunction: W } = t;
|
|
1469
|
+
return `background-color:${t.maskBg};transition-duration:${S}ms;transition-timing-function:${W};`;
|
|
1463
1470
|
}), $ = h(() => {
|
|
1464
|
-
const { sidebarWidth:
|
|
1465
|
-
return
|
|
1466
|
-
}), A = h(() =>
|
|
1467
|
-
() => !
|
|
1471
|
+
const { sidebarWidth: S, sidebarCollapsedWidth: W } = t, N = t.isMobile ? 0 : W, w = g.value ? N : S;
|
|
1472
|
+
return t.sidebarVisible ? w : 0;
|
|
1473
|
+
}), A = h(() => t.isMobile ? 0 : $.value), Y = h(() => c.value ? A.value : 0), M = h(
|
|
1474
|
+
() => !t.isMobile && !c.value && t.headerVisible ? t.headerHeight : 0
|
|
1468
1475
|
), B = h(() => {
|
|
1469
|
-
let
|
|
1470
|
-
return
|
|
1471
|
-
}), F = h(() =>
|
|
1472
|
-
return (
|
|
1476
|
+
let S = 0;
|
|
1477
|
+
return t.fixedHeaderAndTab && (t.headerVisible && (S += t.headerHeight), t.tabVisible && (S += t.tabHeight)), S;
|
|
1478
|
+
}), F = h(() => t.fixedFooter && t.footerVisible ? t.footerHeight : 0);
|
|
1479
|
+
return (S, W) => (d(), p("div", {
|
|
1473
1480
|
class: "d-layout",
|
|
1474
1481
|
style: z(n.value)
|
|
1475
1482
|
}, [
|
|
1476
|
-
|
|
1477
|
-
fixed:
|
|
1478
|
-
"z-index":
|
|
1479
|
-
"min-width":
|
|
1480
|
-
height:
|
|
1483
|
+
o.headerVisible ? (d(), k(Ro, ue({ key: 0 }, i.value, {
|
|
1484
|
+
fixed: o.fixedHeaderAndTab,
|
|
1485
|
+
"z-index": Fo,
|
|
1486
|
+
"min-width": o.minWidth,
|
|
1487
|
+
height: o.headerHeight,
|
|
1481
1488
|
"padding-left": Y.value,
|
|
1482
1489
|
style: l.value
|
|
1483
1490
|
}), {
|
|
1484
1491
|
default: E(() => [
|
|
1485
|
-
I(
|
|
1492
|
+
I(S.$slots, "header")
|
|
1486
1493
|
]),
|
|
1487
1494
|
_: 3
|
|
1488
|
-
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) :
|
|
1489
|
-
|
|
1490
|
-
fixed:
|
|
1491
|
-
"z-index":
|
|
1492
|
-
"min-width":
|
|
1493
|
-
top:
|
|
1494
|
-
height:
|
|
1495
|
+
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : x("", !0),
|
|
1496
|
+
o.tabVisible ? (d(), k(Oo, ue({ key: 1 }, i.value, {
|
|
1497
|
+
fixed: o.fixedHeaderAndTab,
|
|
1498
|
+
"z-index": Wo,
|
|
1499
|
+
"min-width": o.minWidth,
|
|
1500
|
+
top: o.headerHeight,
|
|
1501
|
+
height: o.tabHeight,
|
|
1495
1502
|
"padding-left": A.value,
|
|
1496
1503
|
style: l.value
|
|
1497
1504
|
}), {
|
|
1498
1505
|
default: E(() => [
|
|
1499
|
-
I(
|
|
1506
|
+
I(S.$slots, "tab")
|
|
1500
1507
|
]),
|
|
1501
1508
|
_: 3
|
|
1502
|
-
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) :
|
|
1503
|
-
|
|
1509
|
+
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : x("", !0),
|
|
1510
|
+
o.sidebarVisible ? (d(), k(Ao, ue({ key: 2 }, i.value, {
|
|
1504
1511
|
"z-index": u.value,
|
|
1505
1512
|
width: $.value,
|
|
1506
1513
|
"padding-top": M.value
|
|
1507
1514
|
}), {
|
|
1508
1515
|
default: E(() => [
|
|
1509
|
-
I(
|
|
1516
|
+
I(S.$slots, "sidebar")
|
|
1510
1517
|
]),
|
|
1511
1518
|
_: 3
|
|
1512
|
-
}, 16, ["z-index", "width", "padding-top"])) :
|
|
1513
|
-
|
|
1519
|
+
}, 16, ["z-index", "width", "padding-top"])) : x("", !0),
|
|
1520
|
+
C.value ? (d(), p("div", {
|
|
1514
1521
|
key: 3,
|
|
1515
1522
|
class: "d-layout-sidebar-mask",
|
|
1516
1523
|
style: z(R.value),
|
|
1517
|
-
onClick:
|
|
1518
|
-
}, null, 4)) :
|
|
1519
|
-
Q(
|
|
1524
|
+
onClick: _
|
|
1525
|
+
}, null, 4)) : x("", !0),
|
|
1526
|
+
Q(Ho, ue(i.value, {
|
|
1520
1527
|
"padding-top": B.value,
|
|
1521
1528
|
"padding-bottom": F.value,
|
|
1522
1529
|
"padding-left": A.value,
|
|
1523
|
-
"overflow-hidden":
|
|
1530
|
+
"overflow-hidden": o.addMainOverflowHidden
|
|
1524
1531
|
}), {
|
|
1525
1532
|
default: E(() => [
|
|
1526
|
-
I(
|
|
1533
|
+
I(S.$slots, "default")
|
|
1527
1534
|
]),
|
|
1528
1535
|
_: 3
|
|
1529
1536
|
}, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
|
|
1530
|
-
|
|
1531
|
-
fixed:
|
|
1532
|
-
"z-index":
|
|
1533
|
-
"min-width":
|
|
1534
|
-
height:
|
|
1537
|
+
o.footerVisible ? (d(), k(Vo, ue({ key: 4 }, i.value, {
|
|
1538
|
+
fixed: o.fixedFooter,
|
|
1539
|
+
"z-index": Po,
|
|
1540
|
+
"min-width": o.minWidth,
|
|
1541
|
+
height: o.footerHeight,
|
|
1535
1542
|
"padding-left": A.value,
|
|
1536
1543
|
style: r.value
|
|
1537
1544
|
}), {
|
|
1538
1545
|
default: E(() => [
|
|
1539
|
-
I(
|
|
1546
|
+
I(S.$slots, "footer")
|
|
1540
1547
|
]),
|
|
1541
1548
|
_: 3
|
|
1542
|
-
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) :
|
|
1549
|
+
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : x("", !0)
|
|
1543
1550
|
], 4));
|
|
1544
1551
|
}
|
|
1545
1552
|
}, pe = {
|
|
@@ -1552,8 +1559,8 @@ const Ho = 1001, zo = 999, Fo = 998, Os = {
|
|
|
1552
1559
|
}
|
|
1553
1560
|
},
|
|
1554
1561
|
mutations: {
|
|
1555
|
-
setTheme(
|
|
1556
|
-
pe.state.theme =
|
|
1562
|
+
setTheme(o) {
|
|
1563
|
+
pe.state.theme = o, document.documentElement.classList.remove("dark"), document.documentElement.classList.remove("light"), document.documentElement.classList.add(o);
|
|
1557
1564
|
}
|
|
1558
1565
|
},
|
|
1559
1566
|
actions: {
|
|
@@ -1561,7 +1568,7 @@ const Ho = 1001, zo = 999, Fo = 998, Os = {
|
|
|
1561
1568
|
pe.state.theme = pe.state.theme === "dark" ? "light" : "dark", document.documentElement.classList.remove("dark"), document.documentElement.classList.remove("light"), document.documentElement.classList.add(pe.state.theme);
|
|
1562
1569
|
}
|
|
1563
1570
|
}
|
|
1564
|
-
},
|
|
1571
|
+
}, As = {
|
|
1565
1572
|
__name: "DConfigProvider",
|
|
1566
1573
|
props: {
|
|
1567
1574
|
theme: {
|
|
@@ -1569,12 +1576,12 @@ const Ho = 1001, zo = 999, Fo = 998, Os = {
|
|
|
1569
1576
|
default: "dark"
|
|
1570
1577
|
}
|
|
1571
1578
|
},
|
|
1572
|
-
setup(
|
|
1573
|
-
const e =
|
|
1574
|
-
return pe.mutations.setTheme(e.theme), (
|
|
1579
|
+
setup(o) {
|
|
1580
|
+
const e = o;
|
|
1581
|
+
return pe.mutations.setTheme(e.theme), (t, n) => I(t.$slots, "default");
|
|
1575
1582
|
}
|
|
1576
1583
|
};
|
|
1577
|
-
const
|
|
1584
|
+
const Hs = {
|
|
1578
1585
|
__name: "DScrollProvider",
|
|
1579
1586
|
props: {
|
|
1580
1587
|
xHide: {
|
|
@@ -1586,23 +1593,23 @@ const As = {
|
|
|
1586
1593
|
default: !1
|
|
1587
1594
|
}
|
|
1588
1595
|
},
|
|
1589
|
-
setup(
|
|
1590
|
-
const e =
|
|
1596
|
+
setup(o) {
|
|
1597
|
+
const e = o;
|
|
1591
1598
|
Ae((a) => ({
|
|
1592
|
-
e35a6f9a:
|
|
1599
|
+
e35a6f9a: t.value,
|
|
1593
1600
|
e35a6f98: n.value
|
|
1594
1601
|
}));
|
|
1595
|
-
const
|
|
1602
|
+
const t = h(() => e.xHide ? "hidden" : "visible"), n = h(() => e.yHide ? "hidden" : "visible"), s = (a) => {
|
|
1596
1603
|
document.body.classList.add(a), document.documentElement.classList.add(a), document.documentElement.classList.add("d-global-scroll");
|
|
1597
1604
|
};
|
|
1598
1605
|
return he(() => {
|
|
1599
1606
|
s("colored-scroller");
|
|
1600
|
-
}), (a, l) => (d(),
|
|
1607
|
+
}), (a, l) => (d(), p("div", null, [
|
|
1601
1608
|
I(a.$slots, "default")
|
|
1602
1609
|
]));
|
|
1603
1610
|
}
|
|
1604
1611
|
};
|
|
1605
|
-
const
|
|
1612
|
+
const jo = {
|
|
1606
1613
|
__name: "DScroll",
|
|
1607
1614
|
props: {
|
|
1608
1615
|
autoHide: {
|
|
@@ -1618,20 +1625,20 @@ const Wo = {
|
|
|
1618
1625
|
default: !1
|
|
1619
1626
|
}
|
|
1620
1627
|
},
|
|
1621
|
-
setup(
|
|
1622
|
-
const e =
|
|
1628
|
+
setup(o) {
|
|
1629
|
+
const e = o;
|
|
1623
1630
|
Ae((s) => ({
|
|
1624
|
-
c07fa29a:
|
|
1631
|
+
c07fa29a: t.value,
|
|
1625
1632
|
c07fa298: n.value
|
|
1626
1633
|
}));
|
|
1627
|
-
const
|
|
1628
|
-
return (s, a) => (d(),
|
|
1629
|
-
class:
|
|
1634
|
+
const t = h(() => e.xHide ? "hidden" : "visible"), n = h(() => e.yHide ? "hidden" : "visible");
|
|
1635
|
+
return (s, a) => (d(), p("div", {
|
|
1636
|
+
class: D(e.autoHide ? "d-scroll-hide" : "d-scroll")
|
|
1630
1637
|
}, [
|
|
1631
1638
|
I(s.$slots, "default", {}, void 0, !0)
|
|
1632
1639
|
], 2));
|
|
1633
1640
|
}
|
|
1634
|
-
},
|
|
1641
|
+
}, zs = /* @__PURE__ */ se(jo, [["__scopeId", "data-v-d50b3609"]]), Xo = { class: "modal-content" }, Yo = { class: "modal-header" }, Uo = { class: "modal-title" }, qo = { class: "modal-body" }, Go = { class: "modal-footer" }, $t = {
|
|
1635
1642
|
__name: "DModal",
|
|
1636
1643
|
props: {
|
|
1637
1644
|
show: Boolean,
|
|
@@ -1641,49 +1648,49 @@ const Wo = {
|
|
|
1641
1648
|
// максимальная ширина диалога 500px, 100% и т.п.
|
|
1642
1649
|
},
|
|
1643
1650
|
emits: ["open", "close"],
|
|
1644
|
-
setup(
|
|
1645
|
-
const n =
|
|
1651
|
+
setup(o, { expose: e, emit: t }) {
|
|
1652
|
+
const n = o, s = T(null), a = T(!1);
|
|
1646
1653
|
a.value = n == null ? void 0 : n.show;
|
|
1647
1654
|
const l = () => {
|
|
1648
|
-
a.value = !0,
|
|
1655
|
+
a.value = !0, t("open", s);
|
|
1649
1656
|
}, r = () => {
|
|
1650
|
-
a.value = !1,
|
|
1657
|
+
a.value = !1, t("close", s);
|
|
1651
1658
|
};
|
|
1652
1659
|
return e({
|
|
1653
1660
|
show: l,
|
|
1654
1661
|
hide: r
|
|
1655
1662
|
}), (i, c) => {
|
|
1656
1663
|
const u = Re("keydown");
|
|
1657
|
-
return d(),
|
|
1664
|
+
return d(), k(ht, { to: "body" }, [
|
|
1658
1665
|
Q(Ne, { name: "fade" }, {
|
|
1659
1666
|
default: E(() => [
|
|
1660
|
-
a.value ? Z((d(),
|
|
1667
|
+
a.value ? Z((d(), p("div", {
|
|
1661
1668
|
key: 0,
|
|
1662
1669
|
ref_key: "modalRef",
|
|
1663
1670
|
ref: s,
|
|
1664
1671
|
class: "modal"
|
|
1665
1672
|
}, [
|
|
1666
|
-
|
|
1673
|
+
b("div", {
|
|
1667
1674
|
class: "modal-dialog",
|
|
1668
1675
|
style: z({ width: n.width, maxWidth: n.maxWidth })
|
|
1669
1676
|
}, [
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1677
|
+
b("div", Xo, [
|
|
1678
|
+
b("div", Yo, [
|
|
1679
|
+
b("h5", Uo, [
|
|
1673
1680
|
I(i.$slots, "modal-title")
|
|
1674
1681
|
])
|
|
1675
1682
|
]),
|
|
1676
|
-
|
|
1683
|
+
b("div", qo, [
|
|
1677
1684
|
I(i.$slots, "default")
|
|
1678
1685
|
]),
|
|
1679
|
-
|
|
1686
|
+
b("div", Go, [
|
|
1680
1687
|
I(i.$slots, "modal-footer")
|
|
1681
1688
|
])
|
|
1682
1689
|
])
|
|
1683
1690
|
], 4)
|
|
1684
1691
|
])), [
|
|
1685
1692
|
[u, r, "Escape"]
|
|
1686
|
-
]) :
|
|
1693
|
+
]) : x("", !0)
|
|
1687
1694
|
]),
|
|
1688
1695
|
_: 3
|
|
1689
1696
|
})
|
|
@@ -1691,26 +1698,26 @@ const Wo = {
|
|
|
1691
1698
|
};
|
|
1692
1699
|
}
|
|
1693
1700
|
}, ce = Mt();
|
|
1694
|
-
function Me(
|
|
1695
|
-
|
|
1701
|
+
function Me(o) {
|
|
1702
|
+
o === void 0 && (o = ce.value.comp.returnValue()), ce.value.resolve(o), ce.value = null;
|
|
1696
1703
|
}
|
|
1697
|
-
function wt(
|
|
1704
|
+
function wt(o, e, t = "default") {
|
|
1698
1705
|
return new Promise((n) => {
|
|
1699
1706
|
ce.value = {
|
|
1700
|
-
dialog:
|
|
1707
|
+
dialog: o,
|
|
1701
1708
|
props: e,
|
|
1702
|
-
wrapper:
|
|
1709
|
+
wrapper: t,
|
|
1703
1710
|
resolve: n
|
|
1704
1711
|
};
|
|
1705
1712
|
});
|
|
1706
1713
|
}
|
|
1707
|
-
var
|
|
1708
|
-
const
|
|
1714
|
+
var Zo = (o, e) => {
|
|
1715
|
+
const t = o.__vccOpts || o;
|
|
1709
1716
|
for (const [n, s] of e)
|
|
1710
|
-
|
|
1711
|
-
return
|
|
1717
|
+
t[n] = s;
|
|
1718
|
+
return t;
|
|
1712
1719
|
};
|
|
1713
|
-
const
|
|
1720
|
+
const Ko = Nt({
|
|
1714
1721
|
name: "DialogWrapper",
|
|
1715
1722
|
components: {},
|
|
1716
1723
|
props: {
|
|
@@ -1721,44 +1728,44 @@ const Go = Nt({
|
|
|
1721
1728
|
transitionAttrs: Object
|
|
1722
1729
|
},
|
|
1723
1730
|
setup() {
|
|
1724
|
-
const
|
|
1725
|
-
return vt(
|
|
1726
|
-
ce.value && (ce.value.comp =
|
|
1731
|
+
const o = T();
|
|
1732
|
+
return vt(o, () => {
|
|
1733
|
+
ce.value && (ce.value.comp = o.value);
|
|
1727
1734
|
}), {
|
|
1728
1735
|
dialogRef: ce,
|
|
1729
|
-
dialogInstance:
|
|
1736
|
+
dialogInstance: o
|
|
1730
1737
|
};
|
|
1731
1738
|
}
|
|
1732
1739
|
});
|
|
1733
|
-
function
|
|
1734
|
-
return d(),
|
|
1740
|
+
function Jo(o, e, t, n, s, a) {
|
|
1741
|
+
return d(), k(Ne, ft(mt(o.transitionAttrs)), {
|
|
1735
1742
|
default: E(() => [
|
|
1736
|
-
|
|
1743
|
+
o.dialogRef && o.dialogRef.wrapper === o.name ? (d(), k(U(o.dialogRef.dialog), ue({ key: 0 }, o.dialogRef.props, { ref: "dialogInstance" }), null, 16)) : x("", !0)
|
|
1737
1744
|
]),
|
|
1738
1745
|
_: 1
|
|
1739
1746
|
}, 16);
|
|
1740
1747
|
}
|
|
1741
|
-
var
|
|
1742
|
-
const
|
|
1748
|
+
var Qo = /* @__PURE__ */ Zo(Ko, [["render", Jo]]);
|
|
1749
|
+
const en = { style: { display: "flex", "flex-direction": "row", "justify-content": "center", gap: "5px" } }, tn = {
|
|
1743
1750
|
__name: "DAlertDialog",
|
|
1744
1751
|
props: {
|
|
1745
1752
|
title: String,
|
|
1746
1753
|
message: String
|
|
1747
1754
|
},
|
|
1748
|
-
setup(
|
|
1749
|
-
const
|
|
1755
|
+
setup(o, { expose: e }) {
|
|
1756
|
+
const t = o;
|
|
1750
1757
|
return e({
|
|
1751
1758
|
returnValue: () => !0
|
|
1752
|
-
}), (s, a) => (d(),
|
|
1759
|
+
}), (s, a) => (d(), p("div", null, [
|
|
1753
1760
|
Q($t, { show: !0 }, {
|
|
1754
1761
|
"modal-title": E(() => [
|
|
1755
|
-
J(O(
|
|
1762
|
+
J(O(t.title), 1)
|
|
1756
1763
|
]),
|
|
1757
1764
|
default: E(() => [
|
|
1758
|
-
J(O(
|
|
1765
|
+
J(O(t.message), 1)
|
|
1759
1766
|
]),
|
|
1760
1767
|
"modal-footer": E(() => [
|
|
1761
|
-
|
|
1768
|
+
b("div", en, [
|
|
1762
1769
|
Q(le, {
|
|
1763
1770
|
onClick: a[0] || (a[0] = (l) => L(Me)())
|
|
1764
1771
|
}, {
|
|
@@ -1773,26 +1780,26 @@ const Jo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1773
1780
|
})
|
|
1774
1781
|
]));
|
|
1775
1782
|
}
|
|
1776
|
-
},
|
|
1783
|
+
}, on = { style: { display: "flex", "flex-direction": "row", "justify-content": "center", gap: "5px" } }, nn = {
|
|
1777
1784
|
__name: "DConfirmDialog",
|
|
1778
1785
|
props: {
|
|
1779
1786
|
title: String,
|
|
1780
1787
|
message: String
|
|
1781
1788
|
},
|
|
1782
|
-
setup(
|
|
1783
|
-
const
|
|
1789
|
+
setup(o, { expose: e }) {
|
|
1790
|
+
const t = o;
|
|
1784
1791
|
return e({
|
|
1785
1792
|
returnValue: () => !0
|
|
1786
|
-
}), (s, a) => (d(),
|
|
1793
|
+
}), (s, a) => (d(), p("div", null, [
|
|
1787
1794
|
Q($t, { show: !0 }, {
|
|
1788
1795
|
"modal-title": E(() => [
|
|
1789
|
-
J(O(
|
|
1796
|
+
J(O(t.title), 1)
|
|
1790
1797
|
]),
|
|
1791
1798
|
default: E(() => [
|
|
1792
|
-
J(O(
|
|
1799
|
+
J(O(t.message), 1)
|
|
1793
1800
|
]),
|
|
1794
1801
|
"modal-footer": E(() => [
|
|
1795
|
-
|
|
1802
|
+
b("div", on, [
|
|
1796
1803
|
Q(le, {
|
|
1797
1804
|
onClick: a[0] || (a[0] = (l) => L(Me)())
|
|
1798
1805
|
}, {
|
|
@@ -1816,7 +1823,7 @@ const Jo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1816
1823
|
})
|
|
1817
1824
|
]));
|
|
1818
1825
|
}
|
|
1819
|
-
},
|
|
1826
|
+
}, sn = { class: "dropdown" }, Fs = {
|
|
1820
1827
|
__name: "DDropdown",
|
|
1821
1828
|
props: {
|
|
1822
1829
|
class: String,
|
|
@@ -1835,9 +1842,9 @@ const Jo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1835
1842
|
}
|
|
1836
1843
|
},
|
|
1837
1844
|
emits: ["select", "click"],
|
|
1838
|
-
setup(
|
|
1839
|
-
const n =
|
|
1840
|
-
if (
|
|
1845
|
+
setup(o, { expose: e, emit: t }) {
|
|
1846
|
+
const n = o, s = Ce(), a = T(null), l = T(null), r = T(0), i = T(0), c = (C) => {
|
|
1847
|
+
if (t("click", C), a.value.isShowed()) {
|
|
1841
1848
|
a.value.hide();
|
|
1842
1849
|
return;
|
|
1843
1850
|
}
|
|
@@ -1845,32 +1852,32 @@ const Jo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1845
1852
|
const R = a.value.elementSize(), $ = l.value.elementSize(), A = window.innerWidth, Y = window.innerHeight;
|
|
1846
1853
|
r.value = A - ($.x + $.width) < R.width ? $.left - R.width + $.width : $.left, i.value = Y - ($.y + $.height) < R.height ? $.top - R.height - 5 : $.height + $.top + 5;
|
|
1847
1854
|
});
|
|
1848
|
-
}, u = (
|
|
1849
|
-
|
|
1855
|
+
}, u = (C) => {
|
|
1856
|
+
t("select", C);
|
|
1850
1857
|
}, g = h(() => ({ left: r.value + "px", top: i.value + "px", position: n.bodyAsParent ? "absolute" : "fixed", ...n.menuStyle }));
|
|
1851
1858
|
e({
|
|
1852
1859
|
show: c
|
|
1853
1860
|
});
|
|
1854
|
-
const
|
|
1855
|
-
return (
|
|
1856
|
-
|
|
1861
|
+
const _ = (C) => !!s[C];
|
|
1862
|
+
return (C, R) => (d(), p("div", sn, [
|
|
1863
|
+
_("default") ? (d(), k(le, {
|
|
1857
1864
|
key: 0,
|
|
1858
1865
|
ref_key: "buttonRef",
|
|
1859
1866
|
ref: l,
|
|
1860
|
-
class:
|
|
1867
|
+
class: D(n.class),
|
|
1861
1868
|
icon: n.icon,
|
|
1862
1869
|
onClick: j(c, ["stop", "prevent"]),
|
|
1863
1870
|
type: n.type
|
|
1864
1871
|
}, {
|
|
1865
1872
|
default: E(() => [
|
|
1866
|
-
I(
|
|
1873
|
+
I(C.$slots, "default")
|
|
1867
1874
|
]),
|
|
1868
1875
|
_: 3
|
|
1869
|
-
}, 8, ["class", "icon", "onClick", "type"])) : (d(),
|
|
1876
|
+
}, 8, ["class", "icon", "onClick", "type"])) : (d(), k(le, {
|
|
1870
1877
|
key: 1,
|
|
1871
1878
|
ref_key: "buttonRef",
|
|
1872
1879
|
ref: l,
|
|
1873
|
-
class:
|
|
1880
|
+
class: D(n.class),
|
|
1874
1881
|
icon: n.icon,
|
|
1875
1882
|
onClick: j(c, ["stop", "prevent"]),
|
|
1876
1883
|
type: n.type
|
|
@@ -1889,36 +1896,40 @@ const Jo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1889
1896
|
}, null, 8, ["items", "style", "render-item-title", "before-item", "body-as-parent"])
|
|
1890
1897
|
]));
|
|
1891
1898
|
}
|
|
1892
|
-
},
|
|
1893
|
-
function
|
|
1894
|
-
return d(),
|
|
1895
|
-
I(
|
|
1899
|
+
}, an = {}, ln = { class: "d-panel" };
|
|
1900
|
+
function rn(o, e) {
|
|
1901
|
+
return d(), p("div", ln, [
|
|
1902
|
+
I(o.$slots, "default")
|
|
1896
1903
|
]);
|
|
1897
1904
|
}
|
|
1898
|
-
const
|
|
1905
|
+
const dn = /* @__PURE__ */ se(an, [["render", rn]]), cn = {
|
|
1906
|
+
key: 0,
|
|
1907
|
+
class: "card-header"
|
|
1908
|
+
}, un = { class: "card-body" }, pn = {
|
|
1909
|
+
key: 1,
|
|
1910
|
+
class: "card-footer"
|
|
1911
|
+
}, Ws = {
|
|
1899
1912
|
__name: "DCard",
|
|
1900
|
-
setup(
|
|
1901
|
-
return (e,
|
|
1913
|
+
setup(o) {
|
|
1914
|
+
return (e, t) => (d(), k(dn, { class: "d-card" }, {
|
|
1902
1915
|
default: E(() => [
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
]),
|
|
1908
|
-
_("div", cn, [
|
|
1916
|
+
e.$slots.header ? (d(), p("div", cn, [
|
|
1917
|
+
I(e.$slots, "header")
|
|
1918
|
+
])) : x("", !0),
|
|
1919
|
+
b("div", un, [
|
|
1909
1920
|
I(e.$slots, "default")
|
|
1910
1921
|
]),
|
|
1911
|
-
|
|
1922
|
+
e.$slots.footer ? (d(), p("div", pn, [
|
|
1912
1923
|
I(e.$slots, "footer")
|
|
1913
|
-
])
|
|
1924
|
+
])) : x("", !0)
|
|
1914
1925
|
]),
|
|
1915
1926
|
_: 3
|
|
1916
1927
|
}));
|
|
1917
1928
|
}
|
|
1918
|
-
},
|
|
1919
|
-
class
|
|
1920
|
-
constructor(e,
|
|
1921
|
-
this.remaining =
|
|
1929
|
+
}, fn = /* @__PURE__ */ new Map();
|
|
1930
|
+
class mn {
|
|
1931
|
+
constructor(e, t, n) {
|
|
1932
|
+
this.remaining = t, this.callback = e, this.notifyItem = n, this.resume();
|
|
1922
1933
|
}
|
|
1923
1934
|
pause() {
|
|
1924
1935
|
clearTimeout(this.notifyItem.timer), this.remaining -= Date.now() - this.start;
|
|
@@ -1944,48 +1955,48 @@ const Be = "[-+]?[0-9]*.?[0-9]+", lt = [
|
|
|
1944
1955
|
name: "px",
|
|
1945
1956
|
regexp: new RegExp(`^${Be}$`)
|
|
1946
1957
|
}
|
|
1947
|
-
],
|
|
1948
|
-
if (
|
|
1958
|
+
], hn = (o) => {
|
|
1959
|
+
if (o === "auto")
|
|
1949
1960
|
return {
|
|
1950
|
-
type:
|
|
1961
|
+
type: o,
|
|
1951
1962
|
value: 0
|
|
1952
1963
|
};
|
|
1953
1964
|
for (let e = 0; e < lt.length; e++) {
|
|
1954
|
-
const
|
|
1955
|
-
if (
|
|
1965
|
+
const t = lt[e];
|
|
1966
|
+
if (t.regexp.test(o))
|
|
1956
1967
|
return {
|
|
1957
|
-
type:
|
|
1958
|
-
value: parseFloat(
|
|
1968
|
+
type: t.name,
|
|
1969
|
+
value: parseFloat(o)
|
|
1959
1970
|
};
|
|
1960
1971
|
}
|
|
1961
1972
|
return {
|
|
1962
1973
|
type: "",
|
|
1963
|
-
value:
|
|
1974
|
+
value: o
|
|
1964
1975
|
};
|
|
1965
|
-
},
|
|
1966
|
-
switch (typeof
|
|
1976
|
+
}, gn = (o) => {
|
|
1977
|
+
switch (typeof o) {
|
|
1967
1978
|
case "number":
|
|
1968
|
-
return { type: "px", value:
|
|
1979
|
+
return { type: "px", value: o };
|
|
1969
1980
|
case "string":
|
|
1970
|
-
return
|
|
1981
|
+
return hn(o);
|
|
1971
1982
|
default:
|
|
1972
|
-
return { type: "", value:
|
|
1983
|
+
return { type: "", value: o };
|
|
1973
1984
|
}
|
|
1974
1985
|
}, rt = {
|
|
1975
1986
|
x: /* @__PURE__ */ new Set(["left", "center", "right"]),
|
|
1976
1987
|
y: /* @__PURE__ */ new Set(["top", "bottom"])
|
|
1977
|
-
},
|
|
1978
|
-
typeof
|
|
1979
|
-
let e = null,
|
|
1980
|
-
return
|
|
1981
|
-
rt.y.has(n) && (
|
|
1982
|
-
}), { x: e, y:
|
|
1988
|
+
}, vn = ((o) => () => o++)(0), yn = (o) => typeof o != "string" ? [] : o.split(/\s+/gi).filter(Boolean), _n = (o) => {
|
|
1989
|
+
typeof o == "string" && (o = yn(o));
|
|
1990
|
+
let e = null, t = null;
|
|
1991
|
+
return o.forEach((n) => {
|
|
1992
|
+
rt.y.has(n) && (t = n), rt.x.has(n) && (e = n);
|
|
1993
|
+
}), { x: e, y: t };
|
|
1983
1994
|
}, Ee = {
|
|
1984
1995
|
position: ["top", "right"],
|
|
1985
1996
|
cssAnimation: "fade",
|
|
1986
1997
|
velocityAnimation: {
|
|
1987
|
-
enter: (
|
|
1988
|
-
height: [
|
|
1998
|
+
enter: (o) => ({
|
|
1999
|
+
height: [o.clientHeight, 0],
|
|
1989
2000
|
opacity: [1, 0]
|
|
1990
2001
|
}),
|
|
1991
2002
|
leave: {
|
|
@@ -1993,21 +2004,21 @@ const Be = "[-+]?[0-9]*.?[0-9]+", lt = [
|
|
|
1993
2004
|
opacity: [0, 1]
|
|
1994
2005
|
}
|
|
1995
2006
|
}
|
|
1996
|
-
},
|
|
2007
|
+
}, bn = {
|
|
1997
2008
|
__name: "VelocityGroup",
|
|
1998
2009
|
emits: ["enter", "leave", "after-leave"],
|
|
1999
|
-
setup(
|
|
2000
|
-
const
|
|
2010
|
+
setup(o, { emit: e }) {
|
|
2011
|
+
const t = (a, l) => {
|
|
2001
2012
|
e("enter", a, l);
|
|
2002
2013
|
}, n = (a, l) => {
|
|
2003
2014
|
e("leave", a, l);
|
|
2004
2015
|
}, s = () => {
|
|
2005
2016
|
e("after-leave");
|
|
2006
2017
|
};
|
|
2007
|
-
return (a, l) => (d(),
|
|
2018
|
+
return (a, l) => (d(), k(yt, {
|
|
2008
2019
|
tag: "span",
|
|
2009
2020
|
css: !1,
|
|
2010
|
-
onEnter:
|
|
2021
|
+
onEnter: t,
|
|
2011
2022
|
onLeave: n,
|
|
2012
2023
|
onAfterLeave: s
|
|
2013
2024
|
}, {
|
|
@@ -2017,29 +2028,29 @@ const Be = "[-+]?[0-9]*.?[0-9]+", lt = [
|
|
|
2017
2028
|
_: 3
|
|
2018
2029
|
}));
|
|
2019
2030
|
}
|
|
2020
|
-
},
|
|
2031
|
+
}, xn = /* @__PURE__ */ Object.assign({
|
|
2021
2032
|
inheritAttrs: !1
|
|
2022
2033
|
}, {
|
|
2023
2034
|
__name: "CssGroup",
|
|
2024
2035
|
props: {
|
|
2025
2036
|
name: String
|
|
2026
2037
|
},
|
|
2027
|
-
setup(
|
|
2028
|
-
const e =
|
|
2029
|
-
return (
|
|
2038
|
+
setup(o) {
|
|
2039
|
+
const e = o;
|
|
2040
|
+
return (t, n) => (d(), k(yt, {
|
|
2030
2041
|
tag: "span",
|
|
2031
2042
|
name: e.name
|
|
2032
2043
|
}, {
|
|
2033
2044
|
default: E(() => [
|
|
2034
|
-
I(
|
|
2045
|
+
I(t.$slots, "default")
|
|
2035
2046
|
]),
|
|
2036
2047
|
_: 3
|
|
2037
2048
|
}, 8, ["name"]));
|
|
2038
2049
|
}
|
|
2039
|
-
}),
|
|
2050
|
+
}), kn = ["data-id"], $n = ["onClick"], wn = ["innerHTML"], Sn = ["innerHTML"], Dn = {
|
|
2040
2051
|
key: 0,
|
|
2041
2052
|
class: "d-notification-title"
|
|
2042
|
-
},
|
|
2053
|
+
}, Tn = { class: "notification-content" }, Ps = {
|
|
2043
2054
|
__name: "DNotificationProvider",
|
|
2044
2055
|
props: {
|
|
2045
2056
|
group: {
|
|
@@ -2108,77 +2119,77 @@ const Be = "[-+]?[0-9]*.?[0-9]+", lt = [
|
|
|
2108
2119
|
}
|
|
2109
2120
|
},
|
|
2110
2121
|
emits: ["click", "destroy", "start"],
|
|
2111
|
-
setup(
|
|
2112
|
-
const
|
|
2122
|
+
setup(o, { emit: e }) {
|
|
2123
|
+
const t = o, n = {
|
|
2113
2124
|
IDLE: 0,
|
|
2114
2125
|
DESTROYED: 2
|
|
2115
|
-
}, s =
|
|
2116
|
-
const { x: m, y:
|
|
2126
|
+
}, s = T([]), a = T(null), l = T(fn.get("velocity")), r = h(() => t.animationType === "velocity"), i = h(() => r.value ? bn : xn), c = h(() => s.value.filter((m) => m.state !== n.DESTROYED)), u = h(() => gn(t.width)), g = h(() => {
|
|
2127
|
+
const { x: m, y: f } = _n(t.position), y = u.value.value, V = u.value.type, ae = {
|
|
2117
2128
|
width: y + V
|
|
2118
2129
|
};
|
|
2119
|
-
return
|
|
2120
|
-
}),
|
|
2121
|
-
e("click", m),
|
|
2130
|
+
return f && (ae[f] = "0px"), m && (m === "center" ? ae.left = `calc(50% - ${+y / 2}${V})` : ae[m] = "0px"), ae;
|
|
2131
|
+
}), _ = h(() => "bottom" in g.value), C = (m) => {
|
|
2132
|
+
e("click", m), t.closeOnClick && F(m);
|
|
2122
2133
|
}, R = () => {
|
|
2123
2134
|
var m;
|
|
2124
|
-
|
|
2135
|
+
t.pauseOnHover && ((m = a.value) == null || m.pause());
|
|
2125
2136
|
}, $ = () => {
|
|
2126
2137
|
var m;
|
|
2127
|
-
|
|
2138
|
+
t.pauseOnHover && ((m = a.value) == null || m.resume());
|
|
2128
2139
|
}, A = (m) => {
|
|
2129
|
-
if (m.group || (m.group = ""), m.data || (m.data = {}),
|
|
2140
|
+
if (m.group || (m.group = ""), m.data || (m.data = {}), t.group !== m.group)
|
|
2130
2141
|
return;
|
|
2131
2142
|
if (m.clean || m.clear) {
|
|
2132
2143
|
W();
|
|
2133
2144
|
return;
|
|
2134
2145
|
}
|
|
2135
|
-
const
|
|
2136
|
-
id: be ||
|
|
2146
|
+
const f = typeof m.duration == "number" ? m.duration : t.duration, y = typeof m.speed == "number" ? m.speed : t.speed, V = typeof m.ignoreDuplicates == "boolean" ? m.ignoreDuplicates : t.ignoreDuplicates, { title: ae, text: ve, type: ye, data: _e, id: be } = m, ee = {
|
|
2147
|
+
id: be || vn(),
|
|
2137
2148
|
title: ae,
|
|
2138
2149
|
text: ve,
|
|
2139
2150
|
type: ye,
|
|
2140
2151
|
state: n.IDLE,
|
|
2141
2152
|
speed: y,
|
|
2142
|
-
length:
|
|
2153
|
+
length: f + 2 * y,
|
|
2143
2154
|
data: _e
|
|
2144
2155
|
};
|
|
2145
|
-
|
|
2146
|
-
const xe =
|
|
2156
|
+
f >= 0 && (a.value = new mn(() => F(ee), ee.length, ee));
|
|
2157
|
+
const xe = t.reverse ? !_.value : _.value;
|
|
2147
2158
|
let de = -1;
|
|
2148
2159
|
const ke = c.value.some((ge) => ge.title === m.title && ge.text === m.text);
|
|
2149
|
-
(!V || !ke) && (xe ? (s.value.push(ee), e("start", ee), c.value.length >
|
|
2160
|
+
(!V || !ke) && (xe ? (s.value.push(ee), e("start", ee), c.value.length > t.max && (de = 0)) : (s.value.unshift(ee), e("start", ee), c.value.length > t.max && (de = c.value.length - 1)), de !== -1 && F(c.value[de]));
|
|
2150
2161
|
}, Y = (m) => {
|
|
2151
|
-
|
|
2162
|
+
S(m);
|
|
2152
2163
|
}, M = (m) => [
|
|
2153
2164
|
"d-notification-template",
|
|
2154
|
-
|
|
2165
|
+
t.classes,
|
|
2155
2166
|
m.type || ""
|
|
2156
2167
|
], B = (m) => r.value ? void 0 : { transition: `all ${m.speed}ms` }, F = (m) => {
|
|
2157
2168
|
clearTimeout(m.timer), m.state = n.DESTROYED, P(), e("destroy", m);
|
|
2158
|
-
},
|
|
2159
|
-
const
|
|
2160
|
-
|
|
2169
|
+
}, S = (m) => {
|
|
2170
|
+
const f = s.value.find((y) => y.id === m);
|
|
2171
|
+
f && F(f);
|
|
2161
2172
|
}, W = () => {
|
|
2162
2173
|
c.value.forEach(F);
|
|
2163
|
-
}, N = (m,
|
|
2174
|
+
}, N = (m, f) => {
|
|
2164
2175
|
var V;
|
|
2165
|
-
const y = (V =
|
|
2166
|
-
return typeof y == "function" ? y(
|
|
2167
|
-
}, w = (m,
|
|
2176
|
+
const y = (V = t.animation) == null ? void 0 : V[m];
|
|
2177
|
+
return typeof y == "function" ? y(f) : y;
|
|
2178
|
+
}, w = (m, f) => {
|
|
2168
2179
|
if (!r.value)
|
|
2169
2180
|
return;
|
|
2170
2181
|
const y = N("enter", m);
|
|
2171
2182
|
l.value(m, y, {
|
|
2172
|
-
duration:
|
|
2173
|
-
complete:
|
|
2183
|
+
duration: t.speed,
|
|
2184
|
+
complete: f
|
|
2174
2185
|
});
|
|
2175
|
-
}, H = (m,
|
|
2186
|
+
}, H = (m, f) => {
|
|
2176
2187
|
if (!r.value)
|
|
2177
2188
|
return;
|
|
2178
2189
|
const y = N("leave", m);
|
|
2179
2190
|
l.value(m, y, {
|
|
2180
|
-
duration:
|
|
2181
|
-
complete:
|
|
2191
|
+
duration: t.speed,
|
|
2192
|
+
complete: f
|
|
2182
2193
|
});
|
|
2183
2194
|
};
|
|
2184
2195
|
function P() {
|
|
@@ -2186,18 +2197,18 @@ const Be = "[-+]?[0-9]*.?[0-9]+", lt = [
|
|
|
2186
2197
|
}
|
|
2187
2198
|
return he(() => {
|
|
2188
2199
|
q.on("notification-add", A), q.on("notification-close", Y);
|
|
2189
|
-
}), (m,
|
|
2200
|
+
}), (m, f) => (d(), p("div", {
|
|
2190
2201
|
class: "d-notification-group",
|
|
2191
2202
|
style: z(g.value)
|
|
2192
2203
|
}, [
|
|
2193
|
-
(d(),
|
|
2194
|
-
name:
|
|
2204
|
+
(d(), k(U(i.value), {
|
|
2205
|
+
name: o.animationName,
|
|
2195
2206
|
onEnter: w,
|
|
2196
2207
|
onLeave: H,
|
|
2197
2208
|
onAfterLeave: P
|
|
2198
2209
|
}, {
|
|
2199
2210
|
default: E(() => [
|
|
2200
|
-
(d(!0),
|
|
2211
|
+
(d(!0), p(ne, null, me(c.value, (y) => (d(), p("div", {
|
|
2201
2212
|
key: y.id,
|
|
2202
2213
|
class: "d-notification-wrapper",
|
|
2203
2214
|
style: z(B(y)),
|
|
@@ -2206,37 +2217,37 @@ const Be = "[-+]?[0-9]*.?[0-9]+", lt = [
|
|
|
2206
2217
|
onMouseleave: $
|
|
2207
2218
|
}, [
|
|
2208
2219
|
I(m.$slots, "body", {
|
|
2209
|
-
class:
|
|
2220
|
+
class: D([o.classes, y.type]),
|
|
2210
2221
|
item: y,
|
|
2211
2222
|
close: () => F(y)
|
|
2212
2223
|
}, () => [
|
|
2213
|
-
|
|
2214
|
-
class:
|
|
2215
|
-
onClick: (V) =>
|
|
2224
|
+
b("div", {
|
|
2225
|
+
class: D(M(y)),
|
|
2226
|
+
onClick: (V) => C(y)
|
|
2216
2227
|
}, [
|
|
2217
|
-
|
|
2218
|
-
y.title ? (d(),
|
|
2228
|
+
o.dangerouslySetInnerHtml ? (d(), p(ne, { key: 0 }, [
|
|
2229
|
+
y.title ? (d(), p("div", {
|
|
2219
2230
|
key: 0,
|
|
2220
2231
|
class: "d-notification-title",
|
|
2221
2232
|
innerHTML: y.timer
|
|
2222
|
-
}, null, 8,
|
|
2223
|
-
|
|
2233
|
+
}, null, 8, wn)) : x("", !0),
|
|
2234
|
+
b("div", {
|
|
2224
2235
|
class: "notification-content",
|
|
2225
2236
|
innerHTML: y.text
|
|
2226
|
-
}, null, 8,
|
|
2227
|
-
], 64)) : (d(),
|
|
2228
|
-
y.title ? (d(),
|
|
2229
|
-
|
|
2237
|
+
}, null, 8, Sn)
|
|
2238
|
+
], 64)) : (d(), p(ne, { key: 1 }, [
|
|
2239
|
+
y.title ? (d(), p("div", Dn, O(y.title), 1)) : x("", !0),
|
|
2240
|
+
b("div", Tn, O(y.text), 1)
|
|
2230
2241
|
], 64))
|
|
2231
|
-
], 10,
|
|
2242
|
+
], 10, $n)
|
|
2232
2243
|
])
|
|
2233
|
-
], 44,
|
|
2244
|
+
], 44, kn))), 128))
|
|
2234
2245
|
]),
|
|
2235
2246
|
_: 3
|
|
2236
2247
|
}, 40, ["name"]))
|
|
2237
2248
|
], 4));
|
|
2238
2249
|
}
|
|
2239
|
-
},
|
|
2250
|
+
}, Cn = { class: "d-info-progress-icon-container" }, Ln = { class: "d-info-progress-icon" }, In = { class: "d-info-progress-data-container" }, Bn = ["innerHTML"], js = {
|
|
2240
2251
|
__name: "DInfoProgress",
|
|
2241
2252
|
props: {
|
|
2242
2253
|
style: [String, Object],
|
|
@@ -2246,38 +2257,38 @@ const Be = "[-+]?[0-9]*.?[0-9]+", lt = [
|
|
|
2246
2257
|
type: String
|
|
2247
2258
|
},
|
|
2248
2259
|
emits: ["click"],
|
|
2249
|
-
setup(
|
|
2250
|
-
const
|
|
2251
|
-
return (s, a) => (d(),
|
|
2252
|
-
class:
|
|
2253
|
-
style: z(
|
|
2260
|
+
setup(o, { emit: e }) {
|
|
2261
|
+
const t = o, n = h(() => t.icon ? oe.getters.getIcon(t.icon) : null);
|
|
2262
|
+
return (s, a) => (d(), p("div", {
|
|
2263
|
+
class: D(["d-info-progress", t.type ? `d-info-progress-${t.type}` : null]),
|
|
2264
|
+
style: z(t.style),
|
|
2254
2265
|
onClick: a[0] || (a[0] = (l) => {
|
|
2255
2266
|
e("click", l);
|
|
2256
2267
|
})
|
|
2257
2268
|
}, [
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2269
|
+
b("div", Cn, [
|
|
2270
|
+
b("div", Ln, [
|
|
2271
|
+
t.icon ? (d(), k(U(re), {
|
|
2261
2272
|
key: 0,
|
|
2262
2273
|
component: n.value,
|
|
2263
2274
|
color: "inherit",
|
|
2264
2275
|
size: 17
|
|
2265
|
-
}, null, 8, ["component"])) :
|
|
2276
|
+
}, null, 8, ["component"])) : x("", !0)
|
|
2266
2277
|
])
|
|
2267
2278
|
]),
|
|
2268
|
-
|
|
2269
|
-
|
|
2279
|
+
b("div", In, [
|
|
2280
|
+
b("div", {
|
|
2270
2281
|
class: "d-info-progress-line",
|
|
2271
|
-
style: z("width: " +
|
|
2282
|
+
style: z("width: " + t.progress + "%;")
|
|
2272
2283
|
}, null, 4),
|
|
2273
|
-
|
|
2284
|
+
b("div", {
|
|
2274
2285
|
class: "d-info-progress-label",
|
|
2275
|
-
innerHTML:
|
|
2276
|
-
}, null, 8,
|
|
2286
|
+
innerHTML: o.label
|
|
2287
|
+
}, null, 8, Bn)
|
|
2277
2288
|
])
|
|
2278
2289
|
], 6));
|
|
2279
2290
|
}
|
|
2280
|
-
},
|
|
2291
|
+
}, En = { class: "d-checkbox" }, Mn = ["id", "checked", "disabled"], Nn = ["for"], Xs = {
|
|
2281
2292
|
__name: "DCheckbox",
|
|
2282
2293
|
props: {
|
|
2283
2294
|
label: String,
|
|
@@ -2290,45 +2301,45 @@ const Be = "[-+]?[0-9]*.?[0-9]+", lt = [
|
|
|
2290
2301
|
checked: Boolean
|
|
2291
2302
|
},
|
|
2292
2303
|
emits: ["update:modelValue"],
|
|
2293
|
-
setup(
|
|
2294
|
-
const
|
|
2295
|
-
get: () =>
|
|
2304
|
+
setup(o, { emit: e }) {
|
|
2305
|
+
const t = o, s = Ve().uid, a = h({
|
|
2306
|
+
get: () => t.modelValue,
|
|
2296
2307
|
set: (l) => {
|
|
2297
2308
|
e("update:modelValue", l);
|
|
2298
2309
|
}
|
|
2299
2310
|
});
|
|
2300
|
-
return (l, r) => (d(),
|
|
2301
|
-
Z(
|
|
2311
|
+
return (l, r) => (d(), p("div", En, [
|
|
2312
|
+
Z(b("input", {
|
|
2302
2313
|
"onUpdate:modelValue": r[0] || (r[0] = (i) => a.value = i),
|
|
2303
2314
|
id: `i-${L(s)}`,
|
|
2304
2315
|
type: "checkbox",
|
|
2305
|
-
checked:
|
|
2306
|
-
disabled:
|
|
2307
|
-
onChange: r[1] || (r[1] = (...i) =>
|
|
2308
|
-
}, null, 40,
|
|
2316
|
+
checked: t.checked,
|
|
2317
|
+
disabled: t.disabled,
|
|
2318
|
+
onChange: r[1] || (r[1] = (...i) => t.change && t.change(...i))
|
|
2319
|
+
}, null, 40, Mn), [
|
|
2309
2320
|
[_t, a.value]
|
|
2310
2321
|
]),
|
|
2311
|
-
|
|
2322
|
+
b("label", {
|
|
2312
2323
|
for: `i-${L(s)}`
|
|
2313
|
-
}, O(
|
|
2324
|
+
}, O(t.label), 9, Nn)
|
|
2314
2325
|
]));
|
|
2315
2326
|
}
|
|
2316
2327
|
};
|
|
2317
|
-
async function
|
|
2318
|
-
return await wt(
|
|
2328
|
+
async function Rn(o, e) {
|
|
2329
|
+
return await wt(nn, { title: o, message: e });
|
|
2319
2330
|
}
|
|
2320
|
-
async function
|
|
2321
|
-
return await wt(
|
|
2331
|
+
async function On(o, e) {
|
|
2332
|
+
return await wt(tn, { title: o, message: e });
|
|
2322
2333
|
}
|
|
2323
|
-
const
|
|
2334
|
+
const Ys = {
|
|
2324
2335
|
__name: "DDialogProvider",
|
|
2325
|
-
setup(
|
|
2326
|
-
return window.alert =
|
|
2336
|
+
setup(o) {
|
|
2337
|
+
return window.alert = On, window.confirm = Rn, (e, t) => (d(), k(L(Qo)));
|
|
2327
2338
|
}
|
|
2328
|
-
},
|
|
2339
|
+
}, Vn = { class: "d-select" }, An = {
|
|
2329
2340
|
key: 0,
|
|
2330
2341
|
class: "label"
|
|
2331
|
-
},
|
|
2342
|
+
}, Hn = ["disabled"], zn = ["value", "selected", "disabled"], Us = {
|
|
2332
2343
|
__name: "DSelect",
|
|
2333
2344
|
props: {
|
|
2334
2345
|
label: String,
|
|
@@ -2343,105 +2354,105 @@ const Xs = {
|
|
|
2343
2354
|
}
|
|
2344
2355
|
},
|
|
2345
2356
|
emits: ["update:modelValue"],
|
|
2346
|
-
setup(
|
|
2347
|
-
const
|
|
2348
|
-
get: () =>
|
|
2357
|
+
setup(o, { emit: e }) {
|
|
2358
|
+
const t = o, n = h(() => t.scale ? "d-select-" + t.scale : ""), s = h({
|
|
2359
|
+
get: () => t.modelValue,
|
|
2349
2360
|
set: (a) => {
|
|
2350
2361
|
e("update:modelValue", a);
|
|
2351
2362
|
}
|
|
2352
2363
|
});
|
|
2353
|
-
for (let a = 0; a <
|
|
2354
|
-
if (
|
|
2355
|
-
s.value =
|
|
2364
|
+
for (let a = 0; a < t.options.length; a++)
|
|
2365
|
+
if (t.options[a].selected) {
|
|
2366
|
+
s.value = t.options[a].value;
|
|
2356
2367
|
break;
|
|
2357
2368
|
}
|
|
2358
|
-
return (a, l) => (d(),
|
|
2359
|
-
|
|
2360
|
-
Z(
|
|
2369
|
+
return (a, l) => (d(), p("div", Vn, [
|
|
2370
|
+
t.label ? (d(), p("div", An, O(t.label), 1)) : x("", !0),
|
|
2371
|
+
Z(b("select", {
|
|
2361
2372
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => s.value = r),
|
|
2362
|
-
class:
|
|
2363
|
-
style: z(
|
|
2364
|
-
disabled:
|
|
2373
|
+
class: D(n.value),
|
|
2374
|
+
style: z(t.size === "wide" ? "width:100%" : ""),
|
|
2375
|
+
disabled: t.disabled
|
|
2365
2376
|
}, [
|
|
2366
|
-
(d(!0),
|
|
2377
|
+
(d(!0), p(ne, null, me(t.options, (r, i) => (d(), p("option", {
|
|
2367
2378
|
key: i,
|
|
2368
2379
|
value: r.value,
|
|
2369
2380
|
selected: r.selected,
|
|
2370
2381
|
disabled: r.disabled
|
|
2371
|
-
}, O(r.label), 9,
|
|
2372
|
-
], 14,
|
|
2382
|
+
}, O(r.label), 9, zn))), 128))
|
|
2383
|
+
], 14, Hn), [
|
|
2373
2384
|
[Rt, s.value]
|
|
2374
2385
|
])
|
|
2375
2386
|
]));
|
|
2376
2387
|
}
|
|
2377
2388
|
};
|
|
2378
|
-
const
|
|
2389
|
+
const Fn = ["title"], Wn = { class: "tab-icon" }, Pn = { class: "tab-label" }, jn = ["title"], Xn = ["title"], Yn = {
|
|
2379
2390
|
__name: "DTabLabel",
|
|
2380
2391
|
props: {
|
|
2381
2392
|
tab: Object
|
|
2382
2393
|
},
|
|
2383
|
-
setup(
|
|
2384
|
-
const e =
|
|
2385
|
-
return (
|
|
2394
|
+
setup(o) {
|
|
2395
|
+
const e = o;
|
|
2396
|
+
return (t, n) => e.tab.label && e.tab.icon ? (d(), p("span", {
|
|
2386
2397
|
key: 0,
|
|
2387
2398
|
title: e.tab.title ? e.tab.title : "",
|
|
2388
2399
|
style: { display: "flex", "flex-direction": "column" }
|
|
2389
2400
|
}, [
|
|
2390
|
-
|
|
2401
|
+
b("div", Wn, [
|
|
2391
2402
|
Q(L(re), {
|
|
2392
2403
|
component: e.tab.icon
|
|
2393
2404
|
}, null, 8, ["component"])
|
|
2394
2405
|
]),
|
|
2395
|
-
|
|
2396
|
-
], 8,
|
|
2406
|
+
b("div", Pn, O(e.tab.label), 1)
|
|
2407
|
+
], 8, Fn)) : e.tab.label ? (d(), p("span", {
|
|
2397
2408
|
key: 1,
|
|
2398
2409
|
title: e.tab.title ? e.tab.title : ""
|
|
2399
|
-
}, O(e.tab.label), 9,
|
|
2410
|
+
}, O(e.tab.label), 9, jn)) : e.tab.icon ? (d(), p("span", {
|
|
2400
2411
|
key: 2,
|
|
2401
2412
|
title: e.tab.title ? e.tab.title : ""
|
|
2402
2413
|
}, [
|
|
2403
2414
|
Q(L(re), {
|
|
2404
2415
|
component: e.tab.icon
|
|
2405
2416
|
}, null, 8, ["component"])
|
|
2406
|
-
], 8,
|
|
2417
|
+
], 8, Xn)) : x("", !0);
|
|
2407
2418
|
}
|
|
2408
|
-
},
|
|
2409
|
-
const
|
|
2419
|
+
}, Un = /* @__PURE__ */ se(Yn, [["__scopeId", "data-v-9262b225"]]);
|
|
2420
|
+
const qn = { class: "d-tabs" }, Gn = {
|
|
2410
2421
|
__name: "DTabs",
|
|
2411
2422
|
props: {
|
|
2412
2423
|
tabs: Array
|
|
2413
2424
|
},
|
|
2414
|
-
setup(
|
|
2415
|
-
const n = Ot(
|
|
2425
|
+
setup(o, { expose: e }) {
|
|
2426
|
+
const n = Ot(o, "tabs"), s = T([]), a = T(0), l = (c) => {
|
|
2416
2427
|
a.value = c;
|
|
2417
2428
|
}, r = (c) => {
|
|
2418
2429
|
c && !s.value.includes(c) && s.value.push(c);
|
|
2419
2430
|
};
|
|
2420
2431
|
return e({
|
|
2421
2432
|
refs: () => s.value
|
|
2422
|
-
}), (c, u) => (d(),
|
|
2423
|
-
|
|
2424
|
-
(d(!0),
|
|
2425
|
-
index:
|
|
2433
|
+
}), (c, u) => (d(), p(ne, null, [
|
|
2434
|
+
b("div", qn, [
|
|
2435
|
+
(d(!0), p(ne, null, me(n.value, (g, _) => (d(), k(Un, {
|
|
2436
|
+
index: _,
|
|
2426
2437
|
tab: g,
|
|
2427
|
-
class:
|
|
2428
|
-
onClick: (
|
|
2438
|
+
class: D(["d-tab-title", _ === a.value ? "active" : ""]),
|
|
2439
|
+
onClick: (C) => l(_)
|
|
2429
2440
|
}, null, 8, ["index", "tab", "class", "onClick"]))), 256))
|
|
2430
2441
|
]),
|
|
2431
|
-
(d(),
|
|
2432
|
-
(d(!0),
|
|
2433
|
-
Z((d(),
|
|
2442
|
+
(d(), k(Vt, null, [
|
|
2443
|
+
(d(!0), p(ne, null, me(n.value, (g, _) => (d(), p("div", null, [
|
|
2444
|
+
Z((d(), k(U(g.component), {
|
|
2434
2445
|
ref_for: !0,
|
|
2435
2446
|
ref: r
|
|
2436
2447
|
}, null, 512)), [
|
|
2437
|
-
[At,
|
|
2448
|
+
[At, _ === a.value]
|
|
2438
2449
|
])
|
|
2439
2450
|
]))), 256))
|
|
2440
2451
|
], 1024))
|
|
2441
2452
|
], 64));
|
|
2442
2453
|
}
|
|
2443
|
-
},
|
|
2444
|
-
const
|
|
2454
|
+
}, qs = /* @__PURE__ */ se(Gn, [["__scopeId", "data-v-4b44471a"]]);
|
|
2455
|
+
const Zn = { class: "d-grid" }, Kn = {
|
|
2445
2456
|
__name: "DGrid",
|
|
2446
2457
|
props: {
|
|
2447
2458
|
gap: {
|
|
@@ -2458,8 +2469,8 @@ const Gn = { class: "d-grid" }, Zn = {
|
|
|
2458
2469
|
colXl: String,
|
|
2459
2470
|
colXxl: String
|
|
2460
2471
|
},
|
|
2461
|
-
setup(
|
|
2462
|
-
const e =
|
|
2472
|
+
setup(o) {
|
|
2473
|
+
const e = o;
|
|
2463
2474
|
Ae((u) => ({
|
|
2464
2475
|
"09eba472": i[0],
|
|
2465
2476
|
"09eba434": i[1],
|
|
@@ -2469,15 +2480,15 @@ const Gn = { class: "d-grid" }, Zn = {
|
|
|
2469
2480
|
"09eba33c": i[5],
|
|
2470
2481
|
"898eb2ac": e.gap
|
|
2471
2482
|
}));
|
|
2472
|
-
const { colXs:
|
|
2483
|
+
const { colXs: t, colSm: n, colMd: s, colLg: a, colXl: l, colXxl: r } = Ht(e), i = [t.value, n.value, s.value, a.value, l.value, r.value];
|
|
2473
2484
|
let c = null;
|
|
2474
2485
|
for (let u = 0; u < i.length; u++)
|
|
2475
2486
|
c || (c = i[0]), u > 0 && (i[u] ? c = i[u] : i[u] = c);
|
|
2476
|
-
return (u, g) => (d(),
|
|
2487
|
+
return (u, g) => (d(), p("div", Zn, [
|
|
2477
2488
|
I(u.$slots, "default", {}, void 0, !0)
|
|
2478
2489
|
]));
|
|
2479
2490
|
}
|
|
2480
|
-
},
|
|
2491
|
+
}, Gs = /* @__PURE__ */ se(Kn, [["__scopeId", "data-v-b45e8130"]]), Jn = ["src", "alt", "title"], Zs = {
|
|
2481
2492
|
__name: "DImage",
|
|
2482
2493
|
props: {
|
|
2483
2494
|
src: String,
|
|
@@ -2488,27 +2499,27 @@ const Gn = { class: "d-grid" }, Zn = {
|
|
|
2488
2499
|
height: String,
|
|
2489
2500
|
radius: String
|
|
2490
2501
|
},
|
|
2491
|
-
setup(
|
|
2492
|
-
const e =
|
|
2502
|
+
setup(o) {
|
|
2503
|
+
const e = o, t = T(null), n = new Image();
|
|
2493
2504
|
return n.onload = () => {
|
|
2494
|
-
|
|
2505
|
+
t.value = n.src;
|
|
2495
2506
|
}, n.onerror = () => {
|
|
2496
|
-
|
|
2507
|
+
t.value = e.srcFail;
|
|
2497
2508
|
}, he(() => {
|
|
2498
2509
|
n.src = e.src;
|
|
2499
|
-
}), (s, a) =>
|
|
2510
|
+
}), (s, a) => t.value ? (d(), p("img", {
|
|
2500
2511
|
key: 0,
|
|
2501
|
-
src:
|
|
2512
|
+
src: t.value,
|
|
2502
2513
|
alt: e.alt,
|
|
2503
2514
|
title: e.title,
|
|
2504
2515
|
style: z({ width: e.width, height: e.height, borderRadius: e.radius })
|
|
2505
|
-
}, null, 12,
|
|
2516
|
+
}, null, 12, Jn)) : x("", !0);
|
|
2506
2517
|
}
|
|
2507
2518
|
};
|
|
2508
|
-
const
|
|
2519
|
+
const Qn = { class: "d-textarea" }, es = {
|
|
2509
2520
|
key: 0,
|
|
2510
2521
|
class: "label"
|
|
2511
|
-
},
|
|
2522
|
+
}, ts = ["rows", "cols", "placeholder"], os = {
|
|
2512
2523
|
__name: "DTextarea",
|
|
2513
2524
|
props: {
|
|
2514
2525
|
label: String,
|
|
@@ -2527,11 +2538,11 @@ const Jn = { class: "d-textarea" }, Qn = {
|
|
|
2527
2538
|
focus: Boolean
|
|
2528
2539
|
},
|
|
2529
2540
|
emits: ["update:modelValue"],
|
|
2530
|
-
setup(
|
|
2531
|
-
const n =
|
|
2541
|
+
setup(o, { expose: e, emit: t }) {
|
|
2542
|
+
const n = o, s = T(null), a = h(() => n.scale === "small" ? "d-textarea-small" : n.scale === "large" ? "d-textarea-large" : ""), l = h({
|
|
2532
2543
|
get: () => n.modelValue,
|
|
2533
2544
|
set: (i) => {
|
|
2534
|
-
|
|
2545
|
+
t("update:modelValue", i);
|
|
2535
2546
|
}
|
|
2536
2547
|
});
|
|
2537
2548
|
he(() => {
|
|
@@ -2542,23 +2553,23 @@ const Jn = { class: "d-textarea" }, Qn = {
|
|
|
2542
2553
|
};
|
|
2543
2554
|
return e({
|
|
2544
2555
|
focus: r
|
|
2545
|
-
}), (i, c) => (d(),
|
|
2546
|
-
n.label ? (d(),
|
|
2547
|
-
Z(
|
|
2556
|
+
}), (i, c) => (d(), p("div", Qn, [
|
|
2557
|
+
n.label ? (d(), p("div", es, O(n.label), 1)) : x("", !0),
|
|
2558
|
+
Z(b("textarea", {
|
|
2548
2559
|
ref_key: "inputRef",
|
|
2549
2560
|
ref: s,
|
|
2550
2561
|
"onUpdate:modelValue": c[0] || (c[0] = (u) => l.value = u),
|
|
2551
2562
|
rows: n.rows,
|
|
2552
2563
|
cols: n.cols,
|
|
2553
2564
|
placeholder: n.placeholder,
|
|
2554
|
-
class:
|
|
2565
|
+
class: D(a.value),
|
|
2555
2566
|
style: { width: "100%" }
|
|
2556
|
-
}, null, 10,
|
|
2567
|
+
}, null, 10, ts), [
|
|
2557
2568
|
[zt, l.value]
|
|
2558
2569
|
])
|
|
2559
2570
|
]));
|
|
2560
2571
|
}
|
|
2561
|
-
},
|
|
2572
|
+
}, Ks = /* @__PURE__ */ se(os, [["__scopeId", "data-v-0e805d5d"]]), ns = ["id", "checked", "disabled"], ss = ["for"], Js = {
|
|
2562
2573
|
__name: "DSwitcher",
|
|
2563
2574
|
props: {
|
|
2564
2575
|
modelValue: Boolean,
|
|
@@ -2574,53 +2585,53 @@ const Jn = { class: "d-textarea" }, Qn = {
|
|
|
2574
2585
|
checked: Boolean
|
|
2575
2586
|
},
|
|
2576
2587
|
emits: ["update:modelValue", "change"],
|
|
2577
|
-
setup(
|
|
2578
|
-
const
|
|
2579
|
-
get: () =>
|
|
2588
|
+
setup(o, { emit: e }) {
|
|
2589
|
+
const t = o, s = Ve().uid, a = h({
|
|
2590
|
+
get: () => t.modelValue,
|
|
2580
2591
|
set: (l) => {
|
|
2581
2592
|
e("update:modelValue", l);
|
|
2582
2593
|
}
|
|
2583
2594
|
});
|
|
2584
|
-
return (l, r) => (d(),
|
|
2585
|
-
class:
|
|
2595
|
+
return (l, r) => (d(), p("div", {
|
|
2596
|
+
class: D(["d-switcher", t.type])
|
|
2586
2597
|
}, [
|
|
2587
|
-
Z(
|
|
2598
|
+
Z(b("input", {
|
|
2588
2599
|
"onUpdate:modelValue": r[0] || (r[0] = (i) => a.value = i),
|
|
2589
2600
|
id: `i-${L(s)}`,
|
|
2590
2601
|
type: "checkbox",
|
|
2591
|
-
checked:
|
|
2592
|
-
disabled:
|
|
2602
|
+
checked: t.checked,
|
|
2603
|
+
disabled: t.disabled,
|
|
2593
2604
|
onChange: r[1] || (r[1] = (i) => e("change", i))
|
|
2594
|
-
}, null, 40,
|
|
2605
|
+
}, null, 40, ns), [
|
|
2595
2606
|
[_t, a.value]
|
|
2596
2607
|
]),
|
|
2597
|
-
|
|
2608
|
+
b("label", {
|
|
2598
2609
|
for: `i-${L(s)}`,
|
|
2599
|
-
class:
|
|
2600
|
-
}, "Toggle", 10,
|
|
2610
|
+
class: D(t.type)
|
|
2611
|
+
}, "Toggle", 10, ss)
|
|
2601
2612
|
], 2));
|
|
2602
2613
|
}
|
|
2603
2614
|
};
|
|
2604
|
-
class
|
|
2615
|
+
class Qs {
|
|
2605
2616
|
constructor(e) {
|
|
2606
2617
|
this.fields = e;
|
|
2607
2618
|
}
|
|
2608
2619
|
validate() {
|
|
2609
2620
|
let e = !1;
|
|
2610
|
-
for (let
|
|
2611
|
-
this.fields[
|
|
2621
|
+
for (let t in this.fields)
|
|
2622
|
+
this.fields[t].ref.value.validate() === !0 && (e = !0);
|
|
2612
2623
|
return !e;
|
|
2613
2624
|
}
|
|
2614
2625
|
}
|
|
2615
|
-
class
|
|
2616
|
-
validate(e,
|
|
2617
|
-
return this._isValidURL(e) || (e =
|
|
2626
|
+
class as {
|
|
2627
|
+
validate(e, t = "https") {
|
|
2628
|
+
return this._isValidURL(e) || (e = t + "://" + e), this._isValidURL(e);
|
|
2618
2629
|
}
|
|
2619
|
-
message(e,
|
|
2630
|
+
message(e, t) {
|
|
2620
2631
|
let n = "";
|
|
2621
2632
|
switch (e) {
|
|
2622
2633
|
case "url":
|
|
2623
|
-
n =
|
|
2634
|
+
n = t;
|
|
2624
2635
|
break;
|
|
2625
2636
|
}
|
|
2626
2637
|
return n;
|
|
@@ -2633,8 +2644,8 @@ class ss {
|
|
|
2633
2644
|
}
|
|
2634
2645
|
}
|
|
2635
2646
|
}
|
|
2636
|
-
const
|
|
2637
|
-
class
|
|
2647
|
+
const is = new as();
|
|
2648
|
+
class ls {
|
|
2638
2649
|
validate(e = "") {
|
|
2639
2650
|
return e !== "";
|
|
2640
2651
|
}
|
|
@@ -2642,26 +2653,26 @@ class is {
|
|
|
2642
2653
|
return e;
|
|
2643
2654
|
}
|
|
2644
2655
|
}
|
|
2645
|
-
const
|
|
2646
|
-
class
|
|
2647
|
-
validate(e = "",
|
|
2648
|
-
return e.length >=
|
|
2656
|
+
const rs = new ls();
|
|
2657
|
+
class ds {
|
|
2658
|
+
validate(e = "", t = 0) {
|
|
2659
|
+
return e.length >= t;
|
|
2649
2660
|
}
|
|
2650
2661
|
message(e) {
|
|
2651
2662
|
return e;
|
|
2652
2663
|
}
|
|
2653
2664
|
}
|
|
2654
|
-
const
|
|
2655
|
-
class
|
|
2656
|
-
validate(e = "",
|
|
2657
|
-
return e.length <=
|
|
2665
|
+
const cs = new ds();
|
|
2666
|
+
class us {
|
|
2667
|
+
validate(e = "", t = 0) {
|
|
2668
|
+
return e.length <= t;
|
|
2658
2669
|
}
|
|
2659
2670
|
message(e) {
|
|
2660
2671
|
return e;
|
|
2661
2672
|
}
|
|
2662
2673
|
}
|
|
2663
|
-
const
|
|
2664
|
-
class
|
|
2674
|
+
const ps = new us();
|
|
2675
|
+
class fs {
|
|
2665
2676
|
validate(e) {
|
|
2666
2677
|
return /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(e);
|
|
2667
2678
|
}
|
|
@@ -2669,8 +2680,8 @@ class ps {
|
|
|
2669
2680
|
return e;
|
|
2670
2681
|
}
|
|
2671
2682
|
}
|
|
2672
|
-
const
|
|
2673
|
-
class
|
|
2683
|
+
const ms = new fs();
|
|
2684
|
+
class hs {
|
|
2674
2685
|
validate(e) {
|
|
2675
2686
|
return !isNaN(parseFloat(e)) && !isNaN(e - 0);
|
|
2676
2687
|
}
|
|
@@ -2678,41 +2689,41 @@ class ms {
|
|
|
2678
2689
|
return e;
|
|
2679
2690
|
}
|
|
2680
2691
|
}
|
|
2681
|
-
const
|
|
2682
|
-
RulesUrl:
|
|
2683
|
-
RulesRequired:
|
|
2684
|
-
RulesMin:
|
|
2685
|
-
RulesMax:
|
|
2686
|
-
RulesEmail:
|
|
2687
|
-
RulesNumber:
|
|
2692
|
+
const gs = new hs(), G = {
|
|
2693
|
+
RulesUrl: is,
|
|
2694
|
+
RulesRequired: rs,
|
|
2695
|
+
RulesMin: cs,
|
|
2696
|
+
RulesMax: ps,
|
|
2697
|
+
RulesEmail: ms,
|
|
2698
|
+
RulesNumber: gs
|
|
2688
2699
|
};
|
|
2689
|
-
class
|
|
2690
|
-
validate(e,
|
|
2691
|
-
var s, a, l, r, i, c, u, g,
|
|
2700
|
+
class vs {
|
|
2701
|
+
validate(e, t) {
|
|
2702
|
+
var s, a, l, r, i, c, u, g, _, C, R, $, A, Y;
|
|
2692
2703
|
let n = "";
|
|
2693
|
-
if (
|
|
2704
|
+
if (t) {
|
|
2694
2705
|
let M = !1;
|
|
2695
|
-
for (let B in
|
|
2706
|
+
for (let B in t)
|
|
2696
2707
|
if (!M)
|
|
2697
2708
|
switch (B) {
|
|
2698
2709
|
case "url":
|
|
2699
|
-
n = G.RulesUrl.validate(e, "https") || e.length === 0 ? "" : G.RulesUrl.message("url", (s =
|
|
2710
|
+
n = G.RulesUrl.validate(e, "https") || e.length === 0 ? "" : G.RulesUrl.message("url", (s = t[B]) != null && s.message ? (a = t[B]) == null ? void 0 : a.message : "url_incorrect"), M = n !== "";
|
|
2700
2711
|
break;
|
|
2701
2712
|
case "required":
|
|
2702
|
-
n = G.RulesRequired.validate(e) ? "" : G.RulesRequired.message((l =
|
|
2713
|
+
n = G.RulesRequired.validate(e) ? "" : G.RulesRequired.message((l = t[B]) != null && l.message ? (r = t[B]) == null ? void 0 : r.message : "required"), M = n !== "";
|
|
2703
2714
|
break;
|
|
2704
2715
|
case "min":
|
|
2705
|
-
n = G.RulesMin.validate(e, (i =
|
|
2716
|
+
n = G.RulesMin.validate(e, (i = t[B]) == null ? void 0 : i.value) ? "" : G.RulesMin.message((c = t[B]) != null && c.message ? (u = t[B]) == null ? void 0 : u.message : "very_small"), M = n !== "";
|
|
2706
2717
|
break;
|
|
2707
2718
|
case "max":
|
|
2708
|
-
n = G.RulesMax.validate(e, (g =
|
|
2719
|
+
n = G.RulesMax.validate(e, (g = t[B]) == null ? void 0 : g.value) ? "" : G.RulesMax.message((_ = t[B]) != null && _.message ? (C = t[B]) == null ? void 0 : C.message : "vary_large"), M = n !== "";
|
|
2709
2720
|
break;
|
|
2710
2721
|
case "email":
|
|
2711
|
-
n = G.RulesEmail.validate(e) ? "" : G.RulesMax.message((R =
|
|
2722
|
+
n = G.RulesEmail.validate(e) ? "" : G.RulesMax.message((R = t[B]) != null && R.message ? ($ = t[B]) == null ? void 0 : $.message : "email_incorrect"), M = n !== "";
|
|
2712
2723
|
break;
|
|
2713
2724
|
case "number":
|
|
2714
2725
|
n = G.RulesNumber.validate(e) ? "" : G.RulesNumber.message(
|
|
2715
|
-
(A =
|
|
2726
|
+
(A = t[B]) != null && A.message ? (Y = t[B]) == null ? void 0 : Y.message : "number_incorrect"
|
|
2716
2727
|
), M = n !== "";
|
|
2717
2728
|
break;
|
|
2718
2729
|
}
|
|
@@ -2720,39 +2731,39 @@ class gs {
|
|
|
2720
2731
|
return n;
|
|
2721
2732
|
}
|
|
2722
2733
|
}
|
|
2723
|
-
const
|
|
2734
|
+
const ys = new vs(), _s = { style: { display: "flex", "flex-direction": "column" } }, bs = {
|
|
2724
2735
|
key: 0,
|
|
2725
2736
|
class: "d-label"
|
|
2726
|
-
},
|
|
2737
|
+
}, xs = {
|
|
2727
2738
|
key: 0,
|
|
2728
2739
|
class: "text-red"
|
|
2729
|
-
},
|
|
2740
|
+
}, ks = { style: { display: "flex", "flex-direction": "row" } }, $s = { style: { flex: "1", position: "relative" } }, ws = /* @__PURE__ */ b("svg", {
|
|
2730
2741
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2731
2742
|
viewBox: "0 0 24 24"
|
|
2732
2743
|
}, [
|
|
2733
|
-
/* @__PURE__ */
|
|
2744
|
+
/* @__PURE__ */ b("path", {
|
|
2734
2745
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",
|
|
2735
2746
|
fill: "currentColor"
|
|
2736
2747
|
})
|
|
2737
|
-
], -1),
|
|
2738
|
-
|
|
2739
|
-
],
|
|
2748
|
+
], -1), Ss = [
|
|
2749
|
+
ws
|
|
2750
|
+
], Ds = ["id", "type", "placeholder", "disabled"], Ts = /* @__PURE__ */ b("svg", {
|
|
2740
2751
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2741
2752
|
viewBox: "0 0 24 24"
|
|
2742
2753
|
}, [
|
|
2743
|
-
/* @__PURE__ */
|
|
2754
|
+
/* @__PURE__ */ b("path", {
|
|
2744
2755
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",
|
|
2745
2756
|
fill: "currentColor"
|
|
2746
2757
|
})
|
|
2747
|
-
], -1),
|
|
2748
|
-
|
|
2749
|
-
],
|
|
2758
|
+
], -1), Cs = [
|
|
2759
|
+
Ts
|
|
2760
|
+
], Ls = {
|
|
2750
2761
|
key: 1,
|
|
2751
2762
|
class: "d-help"
|
|
2752
|
-
},
|
|
2763
|
+
}, Is = {
|
|
2753
2764
|
key: 2,
|
|
2754
2765
|
class: "d-error text-red"
|
|
2755
|
-
},
|
|
2766
|
+
}, ea = {
|
|
2756
2767
|
__name: "DInputString",
|
|
2757
2768
|
props: {
|
|
2758
2769
|
form: Object,
|
|
@@ -2775,25 +2786,25 @@ const vs = new gs(), ys = { style: { display: "flex", "flex-direction": "column"
|
|
|
2775
2786
|
disabled: Boolean
|
|
2776
2787
|
},
|
|
2777
2788
|
emits: ["update:modelValue", "input", "blur"],
|
|
2778
|
-
setup(
|
|
2779
|
-
const n =
|
|
2789
|
+
setup(o, { expose: e, emit: t }) {
|
|
2790
|
+
const n = o, s = T(n.error), a = Ft(), l = T(!1), r = T(null);
|
|
2780
2791
|
//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
2781
2792
|
const i = h({
|
|
2782
2793
|
get: () => n.modelValue,
|
|
2783
2794
|
//props.form?.fields[props.name].model.value,
|
|
2784
2795
|
set: (M) => {
|
|
2785
|
-
|
|
2796
|
+
t("update:modelValue", M);
|
|
2786
2797
|
}
|
|
2787
2798
|
}), c = h(() => n.type === "password" ? "password" : "text"), u = h(() => n.scale), g = (M) => {
|
|
2788
|
-
|
|
2789
|
-
},
|
|
2799
|
+
t("input", M), _();
|
|
2800
|
+
}, _ = () => {
|
|
2790
2801
|
if (!(!n.form || !n.form.fields || !n.form.fields[n.name].rules))
|
|
2791
|
-
return s.value =
|
|
2802
|
+
return s.value = ys.validate(i.value, n.form.fields[n.name].rules), !!s.value;
|
|
2792
2803
|
};
|
|
2793
2804
|
he(() => {
|
|
2794
|
-
|
|
2805
|
+
C();
|
|
2795
2806
|
});
|
|
2796
|
-
const
|
|
2807
|
+
const C = () => {
|
|
2797
2808
|
var M;
|
|
2798
2809
|
(M = r.value) == null || M.focus();
|
|
2799
2810
|
}, R = () => {
|
|
@@ -2803,43 +2814,43 @@ const vs = new gs(), ys = { style: { display: "flex", "flex-direction": "column"
|
|
|
2803
2814
|
}, A = (M) => {
|
|
2804
2815
|
s.value = M;
|
|
2805
2816
|
}, Y = (M) => {
|
|
2806
|
-
|
|
2817
|
+
t("blur", M);
|
|
2807
2818
|
};
|
|
2808
2819
|
return e({
|
|
2809
|
-
focus:
|
|
2820
|
+
focus: C,
|
|
2810
2821
|
setError: A,
|
|
2811
|
-
validate:
|
|
2822
|
+
validate: _
|
|
2812
2823
|
}), (M, B) => {
|
|
2813
|
-
var F,
|
|
2814
|
-
return d(),
|
|
2815
|
-
class:
|
|
2824
|
+
var F, S, W, N, w, H, P, m, f, y, V, ae, ve, ye, _e, be, ee, xe, de, ke, Le, ge, We, Pe, je, Xe, Ye, Ue, qe, Ge, Ze, Ke, Je, Qe, et, tt, ot, nt, st;
|
|
2825
|
+
return d(), p("div", {
|
|
2826
|
+
class: D(["d-input-string", u.value])
|
|
2816
2827
|
}, [
|
|
2817
|
-
|
|
2818
|
-
n.label ? (d(),
|
|
2828
|
+
b("div", _s, [
|
|
2829
|
+
n.label ? (d(), p("div", bs, [
|
|
2819
2830
|
J(O(n.label), 1),
|
|
2820
|
-
(F = n.form) != null && F.fields[n.name].rules && n.form.fields[n.name].rules.hasOwnProperty("required") ? (d(),
|
|
2821
|
-
])) :
|
|
2822
|
-
|
|
2823
|
-
(W = (
|
|
2831
|
+
(F = n.form) != null && F.fields[n.name].rules && n.form.fields[n.name].rules.hasOwnProperty("required") ? (d(), p("span", xs, "*")) : x("", !0)
|
|
2832
|
+
])) : x("", !0),
|
|
2833
|
+
b("div", ks, [
|
|
2834
|
+
(W = (S = n.pre) == null ? void 0 : S.outside) != null && W.component ? (d(), p("div", {
|
|
2824
2835
|
key: 0,
|
|
2825
|
-
class:
|
|
2836
|
+
class: D(["d-pre", n.disabled ? "disabled" : ""])
|
|
2826
2837
|
}, [
|
|
2827
|
-
(d(),
|
|
2828
|
-
], 2)) : (P = (H = n.pre) == null ? void 0 : H.outside) != null && P.text ? (d(),
|
|
2838
|
+
(d(), k(U((w = (N = n.pre) == null ? void 0 : N.outside) == null ? void 0 : w.component)))
|
|
2839
|
+
], 2)) : (P = (H = n.pre) == null ? void 0 : H.outside) != null && P.text ? (d(), p("div", {
|
|
2829
2840
|
key: 1,
|
|
2830
|
-
class:
|
|
2841
|
+
class: D(["d-pre", n.disabled ? "disabled" : ""])
|
|
2831
2842
|
}, [
|
|
2832
|
-
|
|
2833
|
-
class:
|
|
2834
|
-
}, O((
|
|
2835
|
-
], 2)) :
|
|
2836
|
-
|
|
2837
|
-
(V = (y = n.pre) == null ? void 0 : y.inside) != null && V.action && ((ve = (ae = n.pre) == null ? void 0 : ae.inside) == null ? void 0 : ve.action) === "clear" && ((ye = i.value) == null ? void 0 : ye.length) > 0 ? (d(),
|
|
2843
|
+
b("div", {
|
|
2844
|
+
class: D(["d-text", l.value ? "focused" : ""])
|
|
2845
|
+
}, O((f = (m = n.pre) == null ? void 0 : m.outside) == null ? void 0 : f.text), 3)
|
|
2846
|
+
], 2)) : x("", !0),
|
|
2847
|
+
b("div", $s, [
|
|
2848
|
+
(V = (y = n.pre) == null ? void 0 : y.inside) != null && V.action && ((ve = (ae = n.pre) == null ? void 0 : ae.inside) == null ? void 0 : ve.action) === "clear" && ((ye = i.value) == null ? void 0 : ye.length) > 0 ? (d(), p("div", {
|
|
2838
2849
|
key: 0,
|
|
2839
2850
|
class: "d-pre-inside-button",
|
|
2840
2851
|
onClick: R
|
|
2841
|
-
},
|
|
2842
|
-
Z(
|
|
2852
|
+
}, Ss)) : x("", !0),
|
|
2853
|
+
Z(b("input", {
|
|
2843
2854
|
id: L(a),
|
|
2844
2855
|
ref_key: "inputRef",
|
|
2845
2856
|
ref: r,
|
|
@@ -2851,7 +2862,7 @@ const vs = new gs(), ys = { style: { display: "flex", "flex-direction": "column"
|
|
|
2851
2862
|
onFocus: B[1] || (B[1] = (Ie) => $(!0)),
|
|
2852
2863
|
onBlur: Y,
|
|
2853
2864
|
onFocusout: B[2] || (B[2] = (Ie) => $(!1)),
|
|
2854
|
-
class:
|
|
2865
|
+
class: D([
|
|
2855
2866
|
(be = (_e = n.pre) == null ? void 0 : _e.outside) != null && be.component || (xe = (ee = n.pre) == null ? void 0 : ee.outside) != null && xe.text ? "has-pre" : "",
|
|
2856
2867
|
(ke = (de = n.post) == null ? void 0 : de.outside) != null && ke.component || (ge = (Le = n.post) == null ? void 0 : Le.outside) != null && ge.text ? "has-post" : "",
|
|
2857
2868
|
(Pe = (We = n.pre) == null ? void 0 : We.inside) != null && Pe.action ? "has-pre-inside-button" : "",
|
|
@@ -2859,31 +2870,31 @@ const vs = new gs(), ys = { style: { display: "flex", "flex-direction": "column"
|
|
|
2859
2870
|
l.value ? "focused" : ""
|
|
2860
2871
|
]),
|
|
2861
2872
|
disabled: n.disabled
|
|
2862
|
-
}, null, 42,
|
|
2873
|
+
}, null, 42, Ds), [
|
|
2863
2874
|
[De, i.value]
|
|
2864
2875
|
]),
|
|
2865
|
-
(Ue = (Ye = n.post) == null ? void 0 : Ye.inside) != null && Ue.action && ((Ge = (qe = n.post) == null ? void 0 : qe.inside) == null ? void 0 : Ge.action) === "clear" && ((Ze = i.value) == null ? void 0 : Ze.length) > 0 ? (d(),
|
|
2876
|
+
(Ue = (Ye = n.post) == null ? void 0 : Ye.inside) != null && Ue.action && ((Ge = (qe = n.post) == null ? void 0 : qe.inside) == null ? void 0 : Ge.action) === "clear" && ((Ze = i.value) == null ? void 0 : Ze.length) > 0 ? (d(), p("div", {
|
|
2866
2877
|
key: 1,
|
|
2867
2878
|
class: "d-post-inside-button",
|
|
2868
2879
|
onClick: R
|
|
2869
|
-
},
|
|
2880
|
+
}, Cs)) : x("", !0)
|
|
2870
2881
|
]),
|
|
2871
|
-
(Je = (Ke = n.post) == null ? void 0 : Ke.outside) != null && Je.component ? (d(),
|
|
2882
|
+
(Je = (Ke = n.post) == null ? void 0 : Ke.outside) != null && Je.component ? (d(), p("div", {
|
|
2872
2883
|
key: 2,
|
|
2873
|
-
class:
|
|
2884
|
+
class: D(["d-post", n.disabled ? "disabled" : ""])
|
|
2874
2885
|
}, [
|
|
2875
|
-
(d(),
|
|
2876
|
-
], 2)) : (ot = (tt = n.post) == null ? void 0 : tt.outside) != null && ot.text ? (d(),
|
|
2886
|
+
(d(), k(U((et = (Qe = n.post) == null ? void 0 : Qe.outside) == null ? void 0 : et.component)))
|
|
2887
|
+
], 2)) : (ot = (tt = n.post) == null ? void 0 : tt.outside) != null && ot.text ? (d(), p("div", {
|
|
2877
2888
|
key: 3,
|
|
2878
|
-
class:
|
|
2889
|
+
class: D(["d-post", n.disabled ? "disabled" : ""])
|
|
2879
2890
|
}, [
|
|
2880
|
-
|
|
2881
|
-
class:
|
|
2891
|
+
b("div", {
|
|
2892
|
+
class: D(["d-text", l.value ? "focused" : ""])
|
|
2882
2893
|
}, O((st = (nt = n.post) == null ? void 0 : nt.outside) == null ? void 0 : st.text), 3)
|
|
2883
|
-
], 2)) :
|
|
2894
|
+
], 2)) : x("", !0)
|
|
2884
2895
|
]),
|
|
2885
|
-
n.help ? (d(),
|
|
2886
|
-
s.value ? (d(),
|
|
2896
|
+
n.help ? (d(), p("div", Ls, O(n.help), 1)) : x("", !0),
|
|
2897
|
+
s.value ? (d(), p("div", Is, O(s.value), 1)) : x("", !0)
|
|
2887
2898
|
])
|
|
2888
2899
|
], 2);
|
|
2889
2900
|
};
|
|
@@ -2891,70 +2902,70 @@ const vs = new gs(), ys = { style: { display: "flex", "flex-direction": "column"
|
|
|
2891
2902
|
}, fe = {
|
|
2892
2903
|
state: {},
|
|
2893
2904
|
getters: {
|
|
2894
|
-
getComponent(
|
|
2895
|
-
return fe.state[
|
|
2905
|
+
getComponent(o) {
|
|
2906
|
+
return fe.state[o];
|
|
2896
2907
|
},
|
|
2897
2908
|
getComponents() {
|
|
2898
2909
|
return fe.state;
|
|
2899
2910
|
}
|
|
2900
2911
|
},
|
|
2901
2912
|
mutations: {
|
|
2902
|
-
addComponent(
|
|
2913
|
+
addComponent(o, e) {
|
|
2903
2914
|
fe.state.name = e;
|
|
2904
2915
|
},
|
|
2905
|
-
addComponents(
|
|
2906
|
-
for (const e in
|
|
2907
|
-
|
|
2916
|
+
addComponents(o) {
|
|
2917
|
+
for (const e in o)
|
|
2918
|
+
o.hasOwnProperty(e) && (fe.state[e] = o[e]);
|
|
2908
2919
|
}
|
|
2909
2920
|
}
|
|
2910
|
-
}, St = (
|
|
2911
|
-
typeof
|
|
2921
|
+
}, St = (o) => {
|
|
2922
|
+
typeof o == "string" && (o = { title: "", text: o }), typeof o == "object" && q.emit("notification-add", o);
|
|
2912
2923
|
};
|
|
2913
|
-
St.close = (
|
|
2914
|
-
q.emit("notification-close",
|
|
2924
|
+
St.close = (o) => {
|
|
2925
|
+
q.emit("notification-close", o);
|
|
2915
2926
|
};
|
|
2916
|
-
const
|
|
2917
|
-
mounted: function(
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
}, document.addEventListener("click",
|
|
2921
|
-
},
|
|
2922
|
-
unmounted: function(t) {
|
|
2923
|
-
document.removeEventListener("click", t.clickOutsideEvent);
|
|
2924
|
-
}
|
|
2925
|
-
}, oa = {
|
|
2926
|
-
beforeMount(t, e) {
|
|
2927
|
-
t._keydownCallback = (o) => {
|
|
2928
|
-
o.key === e.arg && e.value();
|
|
2929
|
-
}, document.addEventListener("keydown", t._keydownCallback);
|
|
2927
|
+
const ta = () => ({ notify: St }), oa = {
|
|
2928
|
+
mounted: function(o, e) {
|
|
2929
|
+
o.clickOutsideEvent = function(t) {
|
|
2930
|
+
o === t.target || o.contains(t.target) || e.value(t, o);
|
|
2931
|
+
}, document.addEventListener("click", o.clickOutsideEvent);
|
|
2930
2932
|
},
|
|
2931
|
-
unmounted(
|
|
2932
|
-
document.removeEventListener("
|
|
2933
|
+
unmounted: function(o) {
|
|
2934
|
+
document.removeEventListener("click", o.clickOutsideEvent);
|
|
2933
2935
|
}
|
|
2934
2936
|
}, na = {
|
|
2935
|
-
beforeMount(
|
|
2936
|
-
|
|
2937
|
+
beforeMount(o, e) {
|
|
2938
|
+
o._keydownCallback = (t) => {
|
|
2939
|
+
t.key === e.arg && e.value();
|
|
2940
|
+
}, document.addEventListener("keydown", o._keydownCallback);
|
|
2941
|
+
},
|
|
2942
|
+
unmounted(o, e) {
|
|
2943
|
+
document.removeEventListener("keydown", o._keydownCallback), delete o._keydownCallback;
|
|
2944
|
+
}
|
|
2945
|
+
}, sa = {
|
|
2946
|
+
beforeMount(o) {
|
|
2947
|
+
o.focus();
|
|
2937
2948
|
}
|
|
2938
2949
|
};
|
|
2939
|
-
function Dt(
|
|
2940
|
-
return
|
|
2950
|
+
function Dt(o) {
|
|
2951
|
+
return o.type.indexOf("mouse") !== -1 ? o.clientX : o.touches[0].clientX;
|
|
2941
2952
|
}
|
|
2942
|
-
function Tt(
|
|
2943
|
-
return
|
|
2953
|
+
function Tt(o) {
|
|
2954
|
+
return o.type.indexOf("mouse") !== -1 ? o.clientY : o.touches[0].clientY;
|
|
2944
2955
|
}
|
|
2945
|
-
var
|
|
2946
|
-
var
|
|
2956
|
+
var Bs = function() {
|
|
2957
|
+
var o = !1;
|
|
2947
2958
|
try {
|
|
2948
2959
|
var e = Object.defineProperty({}, "passive", {
|
|
2949
2960
|
get: function() {
|
|
2950
|
-
|
|
2961
|
+
o = !0;
|
|
2951
2962
|
}
|
|
2952
2963
|
});
|
|
2953
2964
|
window.addEventListener("test", null, e);
|
|
2954
2965
|
} catch {
|
|
2955
2966
|
}
|
|
2956
|
-
return
|
|
2957
|
-
}(),
|
|
2967
|
+
return o;
|
|
2968
|
+
}(), Es = {
|
|
2958
2969
|
disableClick: !1,
|
|
2959
2970
|
tapTolerance: 10,
|
|
2960
2971
|
// px
|
|
@@ -2970,53 +2981,53 @@ var Is = function() {
|
|
|
2970
2981
|
rollOverFrequency: 100
|
|
2971
2982
|
// ms
|
|
2972
2983
|
};
|
|
2973
|
-
function $e(
|
|
2974
|
-
var e = this.$$touchObj,
|
|
2975
|
-
|
|
2976
|
-
e.touchHoldTimer = null, te(
|
|
2977
|
-
}, e.options.touchHoldTolerance)), te(
|
|
2984
|
+
function $e(o) {
|
|
2985
|
+
var e = this.$$touchObj, t = o.type.indexOf("touch") >= 0, n = o.type.indexOf("mouse") >= 0, s = this;
|
|
2986
|
+
t && (e.lastTouchStartTime = o.timeStamp), !(n && e.lastTouchStartTime && o.timeStamp - e.lastTouchStartTime < 350) && (e.touchStarted || (Ct(this), e.touchStarted = !0, e.touchMoved = !1, e.swipeOutBounded = !1, e.startX = Dt(o), e.startY = Tt(o), e.currentX = 0, e.currentY = 0, e.touchStartTime = o.timeStamp, e.hasSwipe = K(this, "swipe") || K(this, "swipe.left") || K(this, "swipe.right") || K(this, "swipe.top") || K(this, "swipe.bottom"), K(this, "hold") && (e.touchHoldTimer = setTimeout(function() {
|
|
2987
|
+
e.touchHoldTimer = null, te(o, s, "hold");
|
|
2988
|
+
}, e.options.touchHoldTolerance)), te(o, this, "press")));
|
|
2978
2989
|
}
|
|
2979
|
-
function we(
|
|
2980
|
-
var e = this.$$touchObj,
|
|
2981
|
-
if (e.currentX =
|
|
2990
|
+
function we(o) {
|
|
2991
|
+
var e = this.$$touchObj, t = Dt(o), n = Tt(o), s = e.currentX !== t || e.currentY !== n;
|
|
2992
|
+
if (e.currentX = t, e.currentY = n, e.touchMoved) {
|
|
2982
2993
|
if (e.hasSwipe && !e.swipeOutBounded) {
|
|
2983
2994
|
var l = e.options.swipeTolerance;
|
|
2984
2995
|
e.swipeOutBounded = Math.abs(e.startX - e.currentX) > l && Math.abs(e.startY - e.currentY) > l;
|
|
2985
2996
|
}
|
|
2986
2997
|
} else {
|
|
2987
2998
|
var a = e.options.tapTolerance;
|
|
2988
|
-
e.touchMoved = Math.abs(e.startX - e.currentX) > a || Math.abs(e.startY - e.currentY) > a, e.touchMoved && (Fe(e), te(
|
|
2999
|
+
e.touchMoved = Math.abs(e.startX - e.currentX) > a || Math.abs(e.startY - e.currentY) > a, e.touchMoved && (Fe(e), te(o, this, "drag.once"));
|
|
2989
3000
|
}
|
|
2990
3001
|
if (K(this, "rollover") && s) {
|
|
2991
|
-
var r =
|
|
2992
|
-
(e.touchRollTime == null || r > e.touchRollTime + i) && (e.touchRollTime = r, te(
|
|
3002
|
+
var r = o.timeStamp, i = e.options.rollOverFrequency;
|
|
3003
|
+
(e.touchRollTime == null || r > e.touchRollTime + i) && (e.touchRollTime = r, te(o, this, "rollover"));
|
|
2993
3004
|
}
|
|
2994
3005
|
if (K(this, "drag") && e.touchStarted && e.touchMoved && s) {
|
|
2995
|
-
var r =
|
|
2996
|
-
(e.touchDragTime == null || r > e.touchDragTime + i) && (e.touchDragTime = r, te(
|
|
3006
|
+
var r = o.timeStamp, i = e.options.dragFrequency;
|
|
3007
|
+
(e.touchDragTime == null || r > e.touchDragTime + i) && (e.touchDragTime = r, te(o, this, "drag"));
|
|
2997
3008
|
}
|
|
2998
3009
|
}
|
|
2999
3010
|
function dt() {
|
|
3000
|
-
var
|
|
3001
|
-
Fe(
|
|
3011
|
+
var o = this.$$touchObj;
|
|
3012
|
+
Fe(o), ze(this), o.touchStarted = o.touchMoved = !1, o.startX = o.startY = 0;
|
|
3002
3013
|
}
|
|
3003
|
-
function Se(
|
|
3004
|
-
var e = this.$$touchObj,
|
|
3005
|
-
|
|
3006
|
-
var s =
|
|
3007
|
-
if (Fe(e), e.touchStarted = !1, ze(this), !(n && e.lastTouchEndTime &&
|
|
3008
|
-
if (te(
|
|
3014
|
+
function Se(o) {
|
|
3015
|
+
var e = this.$$touchObj, t = o.type.indexOf("touch") >= 0, n = o.type.indexOf("mouse") >= 0;
|
|
3016
|
+
t && (e.lastTouchEndTime = o.timeStamp);
|
|
3017
|
+
var s = t && !e.touchHoldTimer;
|
|
3018
|
+
if (Fe(e), e.touchStarted = !1, ze(this), !(n && e.lastTouchEndTime && o.timeStamp - e.lastTouchEndTime < 350))
|
|
3019
|
+
if (te(o, this, "release"), e.touchMoved) {
|
|
3009
3020
|
if (e.hasSwipe && !e.swipeOutBounded) {
|
|
3010
3021
|
var a = e.options.swipeTolerance, l, r = Math.abs(e.startY - e.currentY), i = Math.abs(e.startX - e.currentX);
|
|
3011
|
-
(r > a || i > a) && (r > a ? l = e.startY > e.currentY ? "top" : "bottom" : l = e.startX > e.currentX ? "left" : "right", K(this, "swipe." + l) ? te(
|
|
3022
|
+
(r > a || i > a) && (r > a ? l = e.startY > e.currentY ? "top" : "bottom" : l = e.startX > e.currentX ? "left" : "right", K(this, "swipe." + l) ? te(o, this, "swipe." + l, l) : te(o, this, "swipe", l));
|
|
3012
3023
|
}
|
|
3013
|
-
} else if (K(this, "longtap") &&
|
|
3014
|
-
|
|
3024
|
+
} else if (K(this, "longtap") && o.timeStamp - e.touchStartTime > e.options.longTapTimeInterval)
|
|
3025
|
+
o.cancelable && o.preventDefault(), te(o, this, "longtap");
|
|
3015
3026
|
else if (K(this, "hold") && s) {
|
|
3016
|
-
|
|
3027
|
+
o.cancelable && o.preventDefault();
|
|
3017
3028
|
return;
|
|
3018
3029
|
} else
|
|
3019
|
-
te(
|
|
3030
|
+
te(o, this, "tap");
|
|
3020
3031
|
}
|
|
3021
3032
|
function ct() {
|
|
3022
3033
|
Ct(this);
|
|
@@ -3024,46 +3035,46 @@ function ct() {
|
|
|
3024
3035
|
function ut() {
|
|
3025
3036
|
ze(this);
|
|
3026
3037
|
}
|
|
3027
|
-
function K(
|
|
3028
|
-
var
|
|
3029
|
-
return
|
|
3038
|
+
function K(o, e) {
|
|
3039
|
+
var t = o.$$touchObj.callbacks[e];
|
|
3040
|
+
return t != null && t.length > 0;
|
|
3030
3041
|
}
|
|
3031
|
-
function te(
|
|
3032
|
-
var s = e.$$touchObj, a = s.callbacks[
|
|
3042
|
+
function te(o, e, t, n) {
|
|
3043
|
+
var s = e.$$touchObj, a = s.callbacks[t];
|
|
3033
3044
|
if (a == null || a.length === 0)
|
|
3034
3045
|
return null;
|
|
3035
3046
|
for (var l = 0; l < a.length; l++) {
|
|
3036
3047
|
var r = a[l];
|
|
3037
|
-
r.modifiers.stop &&
|
|
3048
|
+
r.modifiers.stop && o.stopPropagation(), r.modifiers.prevent && o.preventDefault(), !(r.modifiers.self && o.target !== o.currentTarget) && typeof r.value == "function" && (n ? r.value(n, o) : r.value(o));
|
|
3038
3049
|
}
|
|
3039
3050
|
}
|
|
3040
|
-
function Ct(
|
|
3041
|
-
var e =
|
|
3042
|
-
e &&
|
|
3051
|
+
function Ct(o) {
|
|
3052
|
+
var e = o.$$touchObj.options.touchClass;
|
|
3053
|
+
e && o.classList.add(e);
|
|
3043
3054
|
}
|
|
3044
|
-
function ze(
|
|
3045
|
-
var e =
|
|
3046
|
-
e &&
|
|
3055
|
+
function ze(o) {
|
|
3056
|
+
var e = o.$$touchObj.options.touchClass;
|
|
3057
|
+
e && o.classList.remove(e);
|
|
3047
3058
|
}
|
|
3048
|
-
function Fe(
|
|
3049
|
-
|
|
3059
|
+
function Fe(o) {
|
|
3060
|
+
o.touchHoldTimer && (clearTimeout(o.touchHoldTimer), o.touchHoldTimer = null);
|
|
3050
3061
|
}
|
|
3051
|
-
function
|
|
3052
|
-
var
|
|
3062
|
+
function Ms(o, e) {
|
|
3063
|
+
var t = o.$$touchObj || {
|
|
3053
3064
|
// an object contains all callbacks registered,
|
|
3054
3065
|
// key is event name, value is an array
|
|
3055
3066
|
callbacks: {},
|
|
3056
3067
|
// prevent bind twice, set to true when event bound
|
|
3057
3068
|
hasBindTouchEvents: !1,
|
|
3058
3069
|
// default options, would be override by v-touch-options
|
|
3059
|
-
options:
|
|
3070
|
+
options: Es
|
|
3060
3071
|
};
|
|
3061
|
-
return e && (
|
|
3072
|
+
return e && (t.options = Object.assign({}, t.options, e)), o.$$touchObj = t, o.$$touchObj;
|
|
3062
3073
|
}
|
|
3063
|
-
const
|
|
3064
|
-
beforeMount: function(
|
|
3065
|
-
const
|
|
3066
|
-
let n =
|
|
3074
|
+
const aa = {
|
|
3075
|
+
beforeMount: function(o, e) {
|
|
3076
|
+
const t = Ms(o);
|
|
3077
|
+
let n = Bs ? { passive: !0 } : !1;
|
|
3067
3078
|
const s = e.arg || "tap";
|
|
3068
3079
|
switch (s) {
|
|
3069
3080
|
case "swipe":
|
|
@@ -3072,77 +3083,77 @@ const sa = {
|
|
|
3072
3083
|
for (let l in e.modifiers)
|
|
3073
3084
|
if (["left", "right", "top", "bottom"].indexOf(l) >= 0) {
|
|
3074
3085
|
let r = "swipe." + l;
|
|
3075
|
-
|
|
3086
|
+
t.callbacks[r] = t.callbacks[r] || [], t.callbacks[r].push(e);
|
|
3076
3087
|
}
|
|
3077
3088
|
} else
|
|
3078
|
-
|
|
3089
|
+
t.callbacks.swipe = t.callbacks.swipe || [], t.callbacks.swipe.push(e);
|
|
3079
3090
|
break;
|
|
3080
3091
|
case "press":
|
|
3081
3092
|
case "drag":
|
|
3082
3093
|
e.modifiers.disablePassive && (n = !1);
|
|
3083
3094
|
default:
|
|
3084
|
-
|
|
3095
|
+
t.callbacks[s] = t.callbacks[s] || [], t.callbacks[s].push(e);
|
|
3085
3096
|
}
|
|
3086
|
-
|
|
3097
|
+
t.hasBindTouchEvents || (o.addEventListener("touchstart", $e, n), o.addEventListener("touchmove", we, n), o.addEventListener("touchcancel", dt), o.addEventListener("touchend", Se), t.options.disableClick || (o.addEventListener("mousedown", $e), o.addEventListener("mousemove", we), o.addEventListener("mouseup", Se), o.addEventListener("mouseenter", ct), o.addEventListener("mouseleave", ut)), t.hasBindTouchEvents = !0);
|
|
3087
3098
|
},
|
|
3088
|
-
unmounted: function(
|
|
3089
|
-
|
|
3099
|
+
unmounted: function(o) {
|
|
3100
|
+
o.removeEventListener("touchstart", $e), o.removeEventListener("touchmove", we), o.removeEventListener("touchcancel", dt), o.removeEventListener("touchend", Se), o.$$touchObj && !o.$$touchObj.options.disableClick && (o.removeEventListener("mousedown", $e), o.removeEventListener("mousemove", we), o.removeEventListener("mouseup", Se), o.removeEventListener("mouseenter", ct), o.removeEventListener("mouseleave", ut)), delete o.$$touchObj;
|
|
3090
3101
|
}
|
|
3091
3102
|
};
|
|
3092
3103
|
export {
|
|
3093
|
-
|
|
3094
|
-
|
|
3104
|
+
Os as DAccordion,
|
|
3105
|
+
tn as DAlertDialog,
|
|
3095
3106
|
uo as DBadge,
|
|
3096
3107
|
le as DButton,
|
|
3097
|
-
|
|
3098
|
-
|
|
3108
|
+
Ws as DCard,
|
|
3109
|
+
Xs as DCheckbox,
|
|
3099
3110
|
po as DCollapse,
|
|
3100
3111
|
fe as DComponentStore,
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3112
|
+
As as DConfigProvider,
|
|
3113
|
+
nn as DConfirmDialog,
|
|
3114
|
+
Mo as DContextMenu,
|
|
3115
|
+
Ys as DDialogProvider,
|
|
3105
3116
|
it as DDrag,
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3117
|
+
Eo as DDrop,
|
|
3118
|
+
Fs as DDropdown,
|
|
3119
|
+
Qs as DForm,
|
|
3109
3120
|
pe as DGlobalStore,
|
|
3110
|
-
|
|
3121
|
+
Gs as DGrid,
|
|
3111
3122
|
re as DIcon,
|
|
3112
3123
|
oe as DIconStore,
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3124
|
+
Zs as DImage,
|
|
3125
|
+
js as DInfoProgress,
|
|
3126
|
+
Rs as DInput,
|
|
3127
|
+
ea as DInputString,
|
|
3128
|
+
Vs as DLayoutAdmin,
|
|
3129
|
+
Ho as DLayoutContent,
|
|
3130
|
+
Vo as DLayoutFooter,
|
|
3131
|
+
Ro as DLayoutHeader,
|
|
3132
|
+
Ao as DLayoutSidebar,
|
|
3133
|
+
Oo as DLayoutTab,
|
|
3123
3134
|
xt as DMenu,
|
|
3124
3135
|
$t as DModal,
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3136
|
+
Ps as DNotificationProvider,
|
|
3137
|
+
dn as DPanel,
|
|
3138
|
+
zs as DScroll,
|
|
3139
|
+
Hs as DScrollProvider,
|
|
3140
|
+
Us as DSelect,
|
|
3141
|
+
Js as DSwitcher,
|
|
3142
|
+
qs as DTabs,
|
|
3143
|
+
Ks as DTextarea,
|
|
3133
3144
|
Te as DTransferStore,
|
|
3134
3145
|
kt as DTree,
|
|
3135
|
-
|
|
3146
|
+
Io as DTreeItem,
|
|
3136
3147
|
v as DTreeStore,
|
|
3137
3148
|
G as Rules,
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3149
|
+
On as alert,
|
|
3150
|
+
oa as clickOutside,
|
|
3151
|
+
Rn as confirm,
|
|
3141
3152
|
q as emitter,
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3153
|
+
Bo as eventsBus,
|
|
3154
|
+
sa as focus,
|
|
3155
|
+
na as keydown,
|
|
3145
3156
|
St as notify,
|
|
3146
|
-
|
|
3147
|
-
|
|
3157
|
+
aa as touch,
|
|
3158
|
+
ta as useNotification
|
|
3148
3159
|
};
|