doph-js 0.2.65 → 0.2.67
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 +835 -831
- 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 Le, computed as m, h as
|
|
1
|
+
import { useSlots as Le, computed as m, h as nt, openBlock as d, createBlock as b, unref as E, ref as w, createElementBlock as f, Fragment as ie, normalizeClass as T, renderSlot as L, createCommentVNode as k, normalizeStyle as H, resolveDynamicComponent as Y, createStaticVNode as ct, onMounted as me, toDisplayString as A, withDirectives as te, createElementVNode as _, vModelDynamic as De, withCtx as C, createTextVNode as K, Transition as Ne, withModifiers as X, resolveComponent as Tt, resolveDirective as Re, normalizeProps as ut, guardReactiveProps as pt, createVNode as oe, renderList as ge, pushScopeId as Lt, popScopeId as Ct, reactive as Oe, Teleport as ft, nextTick as mt, getCurrentInstance as ht, watch as gt, onUnmounted as It, mergeProps as ue, useCssVars as Ae, shallowRef as Et, defineComponent as Bt, TransitionGroup as vt, vModelCheckbox as Mt, vModelSelect as Nt, toRef as Rt, KeepAlive as Ot, toRefs as At, vModelText as Ht } from "vue";
|
|
2
2
|
const de = {
|
|
3
3
|
__name: "DIcon",
|
|
4
4
|
props: {
|
|
@@ -8,26 +8,26 @@ const de = {
|
|
|
8
8
|
className: String
|
|
9
9
|
},
|
|
10
10
|
setup(e) {
|
|
11
|
-
const
|
|
12
|
-
const { className: l } =
|
|
11
|
+
const o = e, t = Le(), n = m(() => {
|
|
12
|
+
const { className: l } = o;
|
|
13
13
|
return l === void 0 ? "icon" : ["icon", l].join(" ");
|
|
14
|
-
}),
|
|
15
|
-
const { color: l } =
|
|
14
|
+
}), s = m(() => {
|
|
15
|
+
const { color: l } = o;
|
|
16
16
|
return l === void 0 ? null : l;
|
|
17
17
|
}), a = m(() => {
|
|
18
|
-
const l =
|
|
18
|
+
const l = o.size ?? null;
|
|
19
19
|
if (l !== void 0)
|
|
20
20
|
return typeof l == "number" || /^\d+$/.test(l) ? `${l}px` : l;
|
|
21
|
-
}), r = m(() =>
|
|
21
|
+
}), r = m(() => nt(
|
|
22
22
|
"i",
|
|
23
23
|
{
|
|
24
|
-
class:
|
|
24
|
+
class: n.value,
|
|
25
25
|
style: {
|
|
26
|
-
color:
|
|
26
|
+
color: s.value,
|
|
27
27
|
fontSize: a.value
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
o.component ? nt(o.component) : t
|
|
31
31
|
));
|
|
32
32
|
return (l, i) => (d(), b(E(r)));
|
|
33
33
|
}
|
|
@@ -42,45 +42,45 @@ const de = {
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
mutations: {
|
|
45
|
-
addIcon(e,
|
|
46
|
-
ee.state.name =
|
|
45
|
+
addIcon(e, o) {
|
|
46
|
+
ee.state.name = o;
|
|
47
47
|
},
|
|
48
48
|
addIcons(e) {
|
|
49
|
-
for (const
|
|
50
|
-
e.hasOwnProperty(
|
|
49
|
+
for (const o in e)
|
|
50
|
+
e.hasOwnProperty(o) && (ee.state[o] = e[o]);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
function yt(e) {
|
|
55
|
-
const
|
|
56
|
-
let
|
|
57
|
-
for (;
|
|
58
|
-
|
|
59
|
-
return { top:
|
|
55
|
+
const o = e.value.getBoundingClientRect();
|
|
56
|
+
let t = e.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
|
+
return { top: s, left: n, x: o.x, y: o.y, width: o.width, height: o.height };
|
|
60
60
|
}
|
|
61
61
|
function Vt() {
|
|
62
|
-
function e(
|
|
63
|
-
return
|
|
62
|
+
function e(s) {
|
|
63
|
+
return s * Math.random() | 0;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function o() {
|
|
66
66
|
return e(16).toString(16);
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function t(s) {
|
|
69
69
|
let a = "";
|
|
70
|
-
for (let r = 0; r <
|
|
71
|
-
a +=
|
|
70
|
+
for (let r = 0; r < s; ++r)
|
|
71
|
+
a += o();
|
|
72
72
|
return a;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function n() {
|
|
75
75
|
return (e(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 re = (e,
|
|
80
|
-
const
|
|
81
|
-
for (const [
|
|
82
|
-
|
|
83
|
-
return
|
|
79
|
+
const re = (e, o) => {
|
|
80
|
+
const t = e.__vccOpts || e;
|
|
81
|
+
for (const [n, s] of o)
|
|
82
|
+
t[n] = s;
|
|
83
|
+
return t;
|
|
84
84
|
}, zt = {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: "loading-svg rotating",
|
|
@@ -119,16 +119,16 @@ const re = (e, t) => {
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
emits: ["click", "contextmenu"],
|
|
122
|
-
setup(e, { expose:
|
|
123
|
-
const
|
|
124
|
-
|
|
122
|
+
setup(e, { expose: o, emit: t }) {
|
|
123
|
+
const n = e, s = Le(), a = w(null), r = m(() => n.icon ? ee.getters.getIcon(n.icon) : null), l = ($) => {
|
|
124
|
+
t("click", $);
|
|
125
125
|
}, i = ($) => {
|
|
126
|
-
|
|
127
|
-
}, c = m(() =>
|
|
128
|
-
const $ =
|
|
129
|
-
return
|
|
126
|
+
t("contextmenu", $);
|
|
127
|
+
}, c = m(() => n.scale === "large" ? "button-lg" : n.scale === "small" ? "button-sm" : ""), u = m(() => n.disabled ? "disabled" : ""), h = ($) => !!s[$], x = m(() => h("default") ? "" : n.scale === "large" ? "d-button-lg-icon" : n.scale === "small" ? "d-button-sm-icon" : "d-button-icon"), S = m(() => {
|
|
128
|
+
const $ = n.outline ? "-outline" : "";
|
|
129
|
+
return n.type === "primary" ? `button${$}-blue` : n.type === "success" ? `button${$}-green` : n.type === "error" ? `button${$}-red` : n.type === "warning" ? `button${$}-orange` : n.type === "wait" ? `button${$}-violet` : n.outline ? `button${$}` : "";
|
|
130
130
|
});
|
|
131
|
-
return
|
|
131
|
+
return o({
|
|
132
132
|
elementSize: () => yt(a)
|
|
133
133
|
}), ($, V) => (d(), f(ie, null, [
|
|
134
134
|
r.value ? k("", !0) : (d(), f("div", {
|
|
@@ -137,10 +137,10 @@ const re = (e, t) => {
|
|
|
137
137
|
ref: a,
|
|
138
138
|
onClick: l,
|
|
139
139
|
onContextmenu: i,
|
|
140
|
-
class: T(["button", [
|
|
140
|
+
class: T(["button", [n.class, c.value, S.value, u.value].join(" ")])
|
|
141
141
|
}, [
|
|
142
142
|
L($.$slots, "default", {}, void 0, !0),
|
|
143
|
-
|
|
143
|
+
n.loading ? (d(), f("svg", zt, Wt)) : k("", !0)
|
|
144
144
|
], 34)),
|
|
145
145
|
r.value ? (d(), f("div", {
|
|
146
146
|
key: 1,
|
|
@@ -148,18 +148,18 @@ const re = (e, t) => {
|
|
|
148
148
|
ref: a,
|
|
149
149
|
onClick: l,
|
|
150
150
|
onContextmenu: i,
|
|
151
|
-
class: T(["button button-ext", [
|
|
152
|
-
style: H(
|
|
151
|
+
class: T(["button button-ext", [n.class, c.value, x.value, S.value, u.value].join(" ")]),
|
|
152
|
+
style: H(n.style)
|
|
153
153
|
}, [
|
|
154
|
-
|
|
154
|
+
n.icon ? (d(), b(Y(de), {
|
|
155
155
|
key: 0,
|
|
156
156
|
component: r.value,
|
|
157
157
|
color: "inherit"
|
|
158
158
|
}, null, 8, ["component"])) : k("", !0),
|
|
159
|
-
E(
|
|
159
|
+
E(s).default ? (d(), f("div", Pt, [
|
|
160
160
|
L($.$slots, "default", {}, void 0, !0)
|
|
161
161
|
])) : k("", !0),
|
|
162
|
-
|
|
162
|
+
n.loading ? (d(), f("svg", jt, Yt)) : k("", !0)
|
|
163
163
|
], 38)) : k("", !0)
|
|
164
164
|
], 64));
|
|
165
165
|
}
|
|
@@ -181,10 +181,10 @@ const qt = {
|
|
|
181
181
|
key: 2,
|
|
182
182
|
class: "d-input",
|
|
183
183
|
style: { display: "flex", "flex-direction": "column" }
|
|
184
|
-
},
|
|
184
|
+
}, no = {
|
|
185
185
|
key: 0,
|
|
186
186
|
class: "label"
|
|
187
|
-
},
|
|
187
|
+
}, so = { style: { display: "flex", "align-items": "flex-end", "justify-content": "flex-start" } }, ao = { style: { flex: "1" } }, io = ["type", "placeholder"], ro = {
|
|
188
188
|
__name: "DInput",
|
|
189
189
|
props: {
|
|
190
190
|
label: String,
|
|
@@ -198,98 +198,98 @@ const qt = {
|
|
|
198
198
|
focus: Boolean
|
|
199
199
|
},
|
|
200
200
|
emits: ["update:modelValue"],
|
|
201
|
-
setup(e, { expose:
|
|
202
|
-
const
|
|
203
|
-
get: () =>
|
|
201
|
+
setup(e, { expose: o, emit: t }) {
|
|
202
|
+
const n = e, s = w(null), a = m(() => n.scale === "small" ? "d-input-small" : n.scale === "large" ? "d-input-large" : ""), r = m({
|
|
203
|
+
get: () => n.modelValue,
|
|
204
204
|
set: (i) => {
|
|
205
|
-
|
|
205
|
+
t("update:modelValue", i);
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
208
|
me(() => {
|
|
209
|
-
|
|
209
|
+
n.focus && l();
|
|
210
210
|
});
|
|
211
211
|
const l = () => {
|
|
212
|
-
|
|
212
|
+
s.value.focus();
|
|
213
213
|
};
|
|
214
|
-
return
|
|
214
|
+
return o({
|
|
215
215
|
focus: l
|
|
216
|
-
}), (i, c) => !
|
|
217
|
-
|
|
216
|
+
}), (i, c) => !n.post && !n.pre ? (d(), f("div", qt, [
|
|
217
|
+
n.label ? (d(), f("div", Gt, A(n.label), 1)) : k("", !0),
|
|
218
218
|
te(_("input", {
|
|
219
219
|
ref_key: "inputRef",
|
|
220
|
-
ref:
|
|
220
|
+
ref: s,
|
|
221
221
|
"onUpdate:modelValue": c[0] || (c[0] = (u) => r.value = u),
|
|
222
|
-
type:
|
|
222
|
+
type: n.password ? "password" : "text",
|
|
223
223
|
class: T(a.value),
|
|
224
|
-
placeholder:
|
|
224
|
+
placeholder: n.placeholder,
|
|
225
225
|
style: { width: "100%" }
|
|
226
226
|
}, null, 10, Zt), [
|
|
227
227
|
[De, r.value]
|
|
228
228
|
])
|
|
229
|
-
])) :
|
|
230
|
-
|
|
229
|
+
])) : n.post && n.post.click && !n.pre ? (d(), f("div", Kt, [
|
|
230
|
+
n.label ? (d(), f("div", Jt, A(n.label), 1)) : k("", !0),
|
|
231
231
|
_("div", Qt, [
|
|
232
232
|
_("div", eo, [
|
|
233
233
|
te(_("input", {
|
|
234
234
|
ref_key: "inputRef",
|
|
235
|
-
ref:
|
|
235
|
+
ref: s,
|
|
236
236
|
class: T(["d-input-post-field", a.value]),
|
|
237
237
|
"onUpdate:modelValue": c[1] || (c[1] = (u) => r.value = u),
|
|
238
|
-
type:
|
|
239
|
-
placeholder:
|
|
238
|
+
type: n.password ? "password" : "text",
|
|
239
|
+
placeholder: n.placeholder,
|
|
240
240
|
style: { width: "100%" }
|
|
241
241
|
}, null, 10, to), [
|
|
242
242
|
[De, r.value]
|
|
243
243
|
])
|
|
244
244
|
]),
|
|
245
|
-
|
|
245
|
+
n.post.label ? (d(), b(ae, {
|
|
246
246
|
key: 0,
|
|
247
|
-
scale:
|
|
248
|
-
class: T(["d-input-post-button",
|
|
249
|
-
onClick:
|
|
250
|
-
icon:
|
|
247
|
+
scale: n.scale,
|
|
248
|
+
class: T(["d-input-post-button", n.post.class]),
|
|
249
|
+
onClick: n.post.click,
|
|
250
|
+
icon: n.post.icon
|
|
251
251
|
}, {
|
|
252
252
|
default: C(() => [
|
|
253
|
-
K(A(
|
|
253
|
+
K(A(n.post.label), 1)
|
|
254
254
|
]),
|
|
255
255
|
_: 1
|
|
256
256
|
}, 8, ["scale", "onClick", "icon", "class"])) : (d(), b(ae, {
|
|
257
257
|
key: 1,
|
|
258
|
-
scale:
|
|
259
|
-
class: T(["d-input-post-button",
|
|
260
|
-
onClick:
|
|
261
|
-
icon:
|
|
258
|
+
scale: n.scale,
|
|
259
|
+
class: T(["d-input-post-button", n.post.class]),
|
|
260
|
+
onClick: n.post.click,
|
|
261
|
+
icon: n.post.icon
|
|
262
262
|
}, null, 8, ["scale", "onClick", "icon", "class"]))
|
|
263
263
|
])
|
|
264
|
-
])) : !
|
|
265
|
-
|
|
266
|
-
_("div",
|
|
267
|
-
|
|
264
|
+
])) : !n.post && n.pre && n.pre.click ? (d(), f("div", oo, [
|
|
265
|
+
n.label ? (d(), f("div", no, A(n.label), 1)) : k("", !0),
|
|
266
|
+
_("div", so, [
|
|
267
|
+
n.pre.label ? (d(), b(ae, {
|
|
268
268
|
key: 0,
|
|
269
|
-
scale:
|
|
270
|
-
class: T(["d-input-pre-button",
|
|
271
|
-
onClick:
|
|
272
|
-
icon:
|
|
269
|
+
scale: n.scale,
|
|
270
|
+
class: T(["d-input-pre-button", n.pre.class]),
|
|
271
|
+
onClick: n.pre.click,
|
|
272
|
+
icon: n.pre.icon
|
|
273
273
|
}, {
|
|
274
274
|
default: C(() => [
|
|
275
|
-
K(A(
|
|
275
|
+
K(A(n.pre.label), 1)
|
|
276
276
|
]),
|
|
277
277
|
_: 1
|
|
278
278
|
}, 8, ["scale", "onClick", "icon", "class"])) : (d(), b(ae, {
|
|
279
279
|
key: 1,
|
|
280
|
-
scale:
|
|
281
|
-
class: T(["d-input-pre-button",
|
|
282
|
-
onClick:
|
|
283
|
-
icon:
|
|
280
|
+
scale: n.scale,
|
|
281
|
+
class: T(["d-input-pre-button", n.pre.class]),
|
|
282
|
+
onClick: n.pre.click,
|
|
283
|
+
icon: n.pre.icon
|
|
284
284
|
}, null, 8, ["scale", "onClick", "icon", "class"])),
|
|
285
285
|
_("div", ao, [
|
|
286
286
|
te(_("input", {
|
|
287
287
|
ref_key: "inputRef",
|
|
288
|
-
ref:
|
|
288
|
+
ref: s,
|
|
289
289
|
class: T(["d-input-pre-field", a.value]),
|
|
290
290
|
"onUpdate:modelValue": c[2] || (c[2] = (u) => r.value = u),
|
|
291
|
-
type:
|
|
292
|
-
placeholder:
|
|
291
|
+
type: n.password ? "password" : "text",
|
|
292
|
+
placeholder: n.placeholder,
|
|
293
293
|
style: { width: "100%" }
|
|
294
294
|
}, null, 10, io), [
|
|
295
295
|
[De, r.value]
|
|
@@ -298,7 +298,7 @@ const qt = {
|
|
|
298
298
|
])
|
|
299
299
|
])) : k("", !0);
|
|
300
300
|
}
|
|
301
|
-
},
|
|
301
|
+
}, Ss = /* @__PURE__ */ re(ro, [["__scopeId", "data-v-a972038a"]]), lo = {
|
|
302
302
|
__name: "DBadge",
|
|
303
303
|
props: {
|
|
304
304
|
scale: String,
|
|
@@ -310,17 +310,17 @@ const qt = {
|
|
|
310
310
|
}
|
|
311
311
|
},
|
|
312
312
|
setup(e) {
|
|
313
|
-
const
|
|
314
|
-
const
|
|
315
|
-
return
|
|
313
|
+
const o = e, t = m(() => o.scale === "large" ? "badge-lg" : o.scale === "small" ? "badge-sm" : ""), n = m(() => {
|
|
314
|
+
const s = o.stress ? "-stress" : "";
|
|
315
|
+
return o.type === "primary" ? `badge${s}-blue` : o.type === "success" ? `badge${s}-green` : o.type === "error" ? `badge${s}-red` : o.type === "warning" ? `badge${s}-orange` : o.type === "wait" ? `badge${s}-violet` : o.stress ? `badge${s}-gray` : "";
|
|
316
316
|
});
|
|
317
|
-
return (
|
|
318
|
-
class: T(["badge", [
|
|
317
|
+
return (s, a) => (d(), f("div", {
|
|
318
|
+
class: T(["badge", [o.class, t.value, n.value].join(" ")])
|
|
319
319
|
}, [
|
|
320
|
-
L(
|
|
320
|
+
L(s.$slots, "default")
|
|
321
321
|
], 2));
|
|
322
322
|
}
|
|
323
|
-
},
|
|
323
|
+
}, se = "0px", co = {
|
|
324
324
|
__name: "DCollapse",
|
|
325
325
|
props: {
|
|
326
326
|
duration: {
|
|
@@ -345,7 +345,7 @@ const qt = {
|
|
|
345
345
|
}
|
|
346
346
|
},
|
|
347
347
|
setup(e) {
|
|
348
|
-
const
|
|
348
|
+
const o = e, 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,
|
|
@@ -357,30 +357,30 @@ const qt = {
|
|
|
357
357
|
borderBottomWidth: i == null ? void 0 : i.style.borderBottomWidth,
|
|
358
358
|
marginTop: i == null ? void 0 : i.style.marginTop,
|
|
359
359
|
marginBottom: i == null ? void 0 : i.style.marginBottom
|
|
360
|
-
}),
|
|
360
|
+
}), n = (i, c) => {
|
|
361
361
|
const { width: u } = getComputedStyle(i);
|
|
362
362
|
i.style.width = u, i.style.position = "absolute", i.style.visibility = "hidden", i.style.height = "";
|
|
363
363
|
let { height: h } = getComputedStyle(i);
|
|
364
|
-
return i.style.width = c.width, i.style.position = c.position, i.style.visibility = c.visibility, i.style.height =
|
|
365
|
-
},
|
|
364
|
+
return i.style.width = c.width, i.style.position = c.position, i.style.visibility = c.visibility, i.style.height = se, i.style.overflow = "hidden", c.height && c.height !== se ? c.height : h;
|
|
365
|
+
}, s = (i, c, u, h, x) => {
|
|
366
366
|
const S = i.animate(h, x);
|
|
367
367
|
i.style.height = c.height, S.onfinish = () => {
|
|
368
368
|
i.style.overflow = c.overflow, u();
|
|
369
369
|
};
|
|
370
370
|
}, a = (i, c) => [
|
|
371
371
|
{
|
|
372
|
-
height:
|
|
373
|
-
opacity:
|
|
374
|
-
paddingTop:
|
|
375
|
-
paddingBottom:
|
|
376
|
-
borderTopWidth:
|
|
377
|
-
borderBottomWidth:
|
|
378
|
-
marginTop:
|
|
379
|
-
marginBottom:
|
|
372
|
+
height: se,
|
|
373
|
+
opacity: o.opacityClosed,
|
|
374
|
+
paddingTop: se,
|
|
375
|
+
paddingBottom: se,
|
|
376
|
+
borderTopWidth: se,
|
|
377
|
+
borderBottomWidth: se,
|
|
378
|
+
marginTop: se,
|
|
379
|
+
marginBottom: se
|
|
380
380
|
},
|
|
381
381
|
{
|
|
382
382
|
height: i,
|
|
383
|
-
opacity:
|
|
383
|
+
opacity: o.opacityOpened,
|
|
384
384
|
paddingTop: c.paddingTop,
|
|
385
385
|
paddingBottom: c.paddingBottom,
|
|
386
386
|
borderTopWidth: c.borderTopWidth,
|
|
@@ -389,13 +389,13 @@ const qt = {
|
|
|
389
389
|
marginBottom: c.marginBottom
|
|
390
390
|
}
|
|
391
391
|
], r = (i, c) => {
|
|
392
|
-
const u = i, h =
|
|
393
|
-
|
|
392
|
+
const u = i, h = t(u), x = n(u, h), S = a(x, h), N = { duration: o.duration, easing: o.easingEnter };
|
|
393
|
+
s(u, h, c, S, N);
|
|
394
394
|
}, l = (i, c) => {
|
|
395
|
-
const u = i, h =
|
|
395
|
+
const u = i, h = t(u), { height: x } = getComputedStyle(u);
|
|
396
396
|
u.style.height = x, u.style.overflow = "hidden";
|
|
397
|
-
const S = a(x, h).reverse(), N = { duration:
|
|
398
|
-
|
|
397
|
+
const S = a(x, h).reverse(), N = { duration: o.duration, easing: o.easingLeave };
|
|
398
|
+
s(u, h, c, S, N);
|
|
399
399
|
};
|
|
400
400
|
return (i, c) => (d(), b(Ne, {
|
|
401
401
|
css: !1,
|
|
@@ -410,7 +410,7 @@ const qt = {
|
|
|
410
410
|
}
|
|
411
411
|
}, Te = {
|
|
412
412
|
data: void 0
|
|
413
|
-
}, He = (e) => e.reduce((
|
|
413
|
+
}, He = (e) => e.reduce((o, t) => (o[t] = t) && o, {}), j = He([
|
|
414
414
|
"drag",
|
|
415
415
|
"dragend",
|
|
416
416
|
"dragenter",
|
|
@@ -428,7 +428,7 @@ const qt = {
|
|
|
428
428
|
"move",
|
|
429
429
|
"all",
|
|
430
430
|
"uninitialized"
|
|
431
|
-
]),
|
|
431
|
+
]), st = {
|
|
432
432
|
__name: "DDrag",
|
|
433
433
|
props: {
|
|
434
434
|
draggable: { type: Boolean, default: !0 },
|
|
@@ -442,18 +442,18 @@ const qt = {
|
|
|
442
442
|
tag: { type: String, default: "div" }
|
|
443
443
|
},
|
|
444
444
|
setup(e) {
|
|
445
|
-
const
|
|
445
|
+
const o = e, t = Le(), n = w(!1), s = m(() => n && o.transferData), a = m(() => ({ position: "fixed", top: "-1000px" })), r = (l, i) => {
|
|
446
446
|
const c = i.dataTransfer;
|
|
447
|
-
if ([j.dragenter, j.dragover].includes(l) &&
|
|
448
|
-
if (
|
|
447
|
+
if ([j.dragenter, j.dragover].includes(l) && o.dropEffect && (c.dropEffect = o.dropEffect), l === j.dragstart) {
|
|
448
|
+
if (o.effectAllowed && (c.effectAllowed = o.effectAllowed), o.image || t.image) {
|
|
449
449
|
let u;
|
|
450
|
-
|
|
450
|
+
o.image ? (u = new Image(), u.src = o.image) : t.image && (u = t.image[0].elm), c.setDragImage && c.setDragImage(u, o.imageXOffset, o.imageYOffset);
|
|
451
451
|
}
|
|
452
|
-
|
|
452
|
+
o.transferData !== void 0 && (Te.data = o.transferData, i.dataTransfer.setData("text", "")), n.value = !0;
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
455
|
return (l, i) => (d(), b(Y(e.tag), {
|
|
456
|
-
draggable:
|
|
456
|
+
draggable: o.draggable,
|
|
457
457
|
onDrag: i[0] || (i[0] = (c) => r(E(j).drag, c)),
|
|
458
458
|
onDragstart: i[1] || (i[1] = X((c) => r(E(j).dragstart, c), ["stop"])),
|
|
459
459
|
onDragenter: i[2] || (i[2] = (c) => r(E(j).dragenter, c)),
|
|
@@ -461,22 +461,22 @@ const qt = {
|
|
|
461
461
|
onDragend: i[4] || (i[4] = (c) => r(E(j).dragend, c))
|
|
462
462
|
}, {
|
|
463
463
|
default: C(() => [
|
|
464
|
-
L(l.$slots, "default", { transferData:
|
|
464
|
+
L(l.$slots, "default", { transferData: s.value }),
|
|
465
465
|
e.hideImageHtml ? (d(), f("div", {
|
|
466
466
|
key: 0,
|
|
467
467
|
style: H(a.value)
|
|
468
468
|
}, [
|
|
469
|
-
L(l.$slots, "image", { transferData:
|
|
469
|
+
L(l.$slots, "image", { transferData: s.value })
|
|
470
470
|
], 4)) : L(l.$slots, "image", {
|
|
471
471
|
key: 1,
|
|
472
|
-
transferData:
|
|
472
|
+
transferData: s.value
|
|
473
473
|
})
|
|
474
474
|
]),
|
|
475
475
|
_: 3
|
|
476
476
|
}, 40, ["draggable"]));
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
|
-
const fo = (e) => (Lt("data-v-
|
|
479
|
+
const fo = (e) => (Lt("data-v-ee071ba5"), e = e(), Ct(), e), mo = {
|
|
480
480
|
key: 0,
|
|
481
481
|
style: { display: "none" }
|
|
482
482
|
}, ho = { key: 1 }, go = /* @__PURE__ */ fo(() => /* @__PURE__ */ _("div", { class: "tree-divider" }, null, -1)), vo = [
|
|
@@ -497,54 +497,54 @@ const fo = (e) => (Lt("data-v-df4ffb7f"), e = e(), Ct(), e), mo = {
|
|
|
497
497
|
component: Object
|
|
498
498
|
},
|
|
499
499
|
emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick", "nodecontext"],
|
|
500
|
-
setup(e, { emit:
|
|
501
|
-
const
|
|
502
|
-
|
|
500
|
+
setup(e, { emit: o }) {
|
|
501
|
+
const t = e, n = w(null), s = w(!1), a = w(!1), r = w(!1), l = m(() => t.model.children && t.model.children.length), i = m(() => (v.actions.isTreeExpanded(t.treeId) && (t.model.expanded = t.model.expanded === void 0 ? !0 : t.model.expanded), t.model.expanded)), c = (M) => {
|
|
502
|
+
o("nodeclick", { event: M, model: t.model });
|
|
503
503
|
}, u = (M) => {
|
|
504
|
-
|
|
504
|
+
o("nodeclick", M);
|
|
505
505
|
}, h = (M) => {
|
|
506
|
-
|
|
506
|
+
o("nodedrop", M);
|
|
507
507
|
}, x = (M) => {
|
|
508
|
-
|
|
509
|
-
}, S = m(() => (v.actions.isItemSelected(
|
|
508
|
+
o("nodecontext", M);
|
|
509
|
+
}, S = m(() => (v.actions.isItemSelected(t.treeId, t.model.id) ? "selected" : "") + (s.value ? "node-over " : "") + (a.value ? "node-top " : "") + (r.value ? "node-bottom " : "")), N = m(() => t.search ? !1 : t.model.draggable === !0), $ = (M) => {
|
|
510
510
|
let g = Te.data;
|
|
511
511
|
if (g === void 0 || g.model === void 0)
|
|
512
|
-
return
|
|
513
|
-
if (g.model.id ===
|
|
514
|
-
return
|
|
515
|
-
if (!v.state.trees[
|
|
512
|
+
return s.value = !1, !1;
|
|
513
|
+
if (g.model.id === t.model.id || v.actions.isChildOfParent(t.treeId, t.items, t.model.id, g.model.id) || v.actions.isParentOfChild(t.treeId, t.items, g.model.id, t.model.id))
|
|
514
|
+
return s.value = !1, a.value = !1, r.value = !1, !1;
|
|
515
|
+
if (!v.state.trees[t.treeId].transfer && g.id !== t.treeId || !v.state.trees[t.treeId].dropInside && !r.value && !a.value)
|
|
516
516
|
return !1;
|
|
517
517
|
let O = "";
|
|
518
|
-
a.value ? O = "before" : r.value ? O = "after" : O = "inside",
|
|
518
|
+
a.value ? O = "before" : r.value ? O = "after" : O = "inside", o("nodedrop", { e: M, model: t.model, place: O }), (g.id === t.treeId || g.id !== t.treeId && g.model.transfer) && v.actions.moveTreeNode(g.id, t.treeId, t.items, g.model.id, t.model.id, O), s.value = !1, a.value = !1, r.value = !1;
|
|
519
519
|
}, V = (M) => {
|
|
520
|
-
|
|
520
|
+
o("nodedragover", { e: M, model: t.model });
|
|
521
521
|
let g = Te.data;
|
|
522
|
-
if (!
|
|
522
|
+
if (!t.model.droppable)
|
|
523
523
|
return !1;
|
|
524
524
|
if (g === void 0 || g.model === void 0)
|
|
525
|
-
return
|
|
526
|
-
if (g.model.id ===
|
|
525
|
+
return s.value = !0, !1;
|
|
526
|
+
if (g.model.id === t.model.id || v.actions.isChildOfParent(t.treeId, t.items, t.model.id, g.model.id) || v.actions.isParentOfChild(t.treeId, t.items, g.model.id, t.model.id))
|
|
527
527
|
return !1;
|
|
528
|
-
const O = M.y, W =
|
|
529
|
-
O > W && O <= W + y ? (
|
|
528
|
+
const O = M.y, W = n.value.getBoundingClientRect().top, P = n.value.getBoundingClientRect().height, y = P / 3;
|
|
529
|
+
O > W && O <= W + y ? (s.value = !1, a.value = !0, r.value = !1) : O < W + P && O >= W + P - y ? (s.value = !1, a.value = !1, r.value = !0) : (s.value = v.state.trees[t.treeId].dropInside, a.value = !1, r.value = !1);
|
|
530
530
|
}, R = () => {
|
|
531
|
-
|
|
532
|
-
}, I = m(() =>
|
|
533
|
-
if (
|
|
534
|
-
let [M, ...g] =
|
|
531
|
+
s.value = !1, a.value = !1, r.value = !1;
|
|
532
|
+
}, I = m(() => t.model.title.startsWith("-")), B = m(() => {
|
|
533
|
+
if (t.model.title.startsWith("-")) {
|
|
534
|
+
let [M, ...g] = t.model.title.split(" ");
|
|
535
535
|
return g = g.join(" "), g;
|
|
536
536
|
}
|
|
537
537
|
return null;
|
|
538
538
|
});
|
|
539
539
|
return (M, g) => {
|
|
540
540
|
const O = Tt("d-tree-item", !0), W = Re("touch");
|
|
541
|
-
return E(v).actions.beforeItem(
|
|
542
|
-
_("div", _o, A(E(v).actions.renderTitle(
|
|
543
|
-
])) :
|
|
541
|
+
return E(v).actions.beforeItem(t.treeId, e.model) ? I.value && !B.value ? (d(), f("li", ho, vo)) : I.value && B.value ? (d(), f("li", yo, [
|
|
542
|
+
_("div", _o, A(E(v).actions.renderTitle(t.treeId, B.value)), 1)
|
|
543
|
+
])) : t.model.component ? (d(), b(st, {
|
|
544
544
|
key: 3,
|
|
545
545
|
tag: "li",
|
|
546
546
|
class: "tree-item",
|
|
547
|
-
"transfer-data": { id:
|
|
547
|
+
"transfer-data": { id: t.treeId, model: t.model },
|
|
548
548
|
draggable: N.value,
|
|
549
549
|
onDrop: X($, ["stop"]),
|
|
550
550
|
onDragenter: g[0] || (g[0] = X(() => {
|
|
@@ -553,14 +553,14 @@ const fo = (e) => (Lt("data-v-df4ffb7f"), e = e(), Ct(), e), mo = {
|
|
|
553
553
|
onDragleave: X(R, ["prevent"])
|
|
554
554
|
}, {
|
|
555
555
|
default: C(() => [
|
|
556
|
-
(d(), b(Y(E(fe).getters.getComponent(
|
|
556
|
+
(d(), b(Y(E(fe).getters.getComponent(t.model.component).component), ut(pt(E(fe).getters.getComponent(t.model.component).props)), null, 16))
|
|
557
557
|
]),
|
|
558
558
|
_: 1
|
|
559
|
-
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(), b(
|
|
559
|
+
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(), b(st, {
|
|
560
560
|
key: 4,
|
|
561
561
|
tag: "li",
|
|
562
562
|
class: "tree-item",
|
|
563
|
-
"transfer-data": { id:
|
|
563
|
+
"transfer-data": { id: t.treeId, model: t.model },
|
|
564
564
|
draggable: N.value,
|
|
565
565
|
onDrop: X($, ["stop"]),
|
|
566
566
|
onDragenter: g[2] || (g[2] = X(() => {
|
|
@@ -573,52 +573,52 @@ const fo = (e) => (Lt("data-v-df4ffb7f"), e = e(), Ct(), e), mo = {
|
|
|
573
573
|
return [
|
|
574
574
|
te((d(), f("div", {
|
|
575
575
|
ref_key: "node",
|
|
576
|
-
ref:
|
|
576
|
+
ref: n,
|
|
577
577
|
class: T(S.value),
|
|
578
|
-
onContextmenu: g[1] || (g[1] = X((z) =>
|
|
578
|
+
onContextmenu: g[1] || (g[1] = X((z) => o("nodecontext", { e: z, model: t.model }), ["prevent"]))
|
|
579
579
|
}, [
|
|
580
580
|
_("div", null, [
|
|
581
|
-
|
|
581
|
+
t.model.icons && t.model.icons.pre && l.value && !t.search && !I.value ? (d(), b(Y(de), {
|
|
582
582
|
key: 0,
|
|
583
|
-
component: E(ee).getters.getIcon(
|
|
583
|
+
component: E(ee).getters.getIcon(t.model.icons.pre.component),
|
|
584
584
|
size: 18,
|
|
585
|
-
color:
|
|
585
|
+
color: t.model.icons.pre.color ? t.model.icons.pre.color : "inherit",
|
|
586
586
|
class: T(i.value ? "tree-open-pre" : "")
|
|
587
587
|
}, null, 8, ["component", "color", "class"])) : k("", !0),
|
|
588
|
-
|
|
588
|
+
t.model.icons && t.model.icons.pre && !l.value && !t.search && !I.value ? (d(), b(Y(de), {
|
|
589
589
|
key: 1,
|
|
590
|
-
component: E(ee).getters.getIcon(
|
|
590
|
+
component: E(ee).getters.getIcon(t.model.icons.pre.component),
|
|
591
591
|
size: 18,
|
|
592
592
|
color: "rgba(0,0,0,0)",
|
|
593
593
|
class: T(i.value ? "tree-open-pre" : "")
|
|
594
594
|
}, null, 8, ["component", "class"])) : k("", !0),
|
|
595
|
-
|
|
595
|
+
t.model.icons && t.model.icons.icon && !I.value ? (d(), b(Y(de), {
|
|
596
596
|
key: 2,
|
|
597
|
-
component: E(ee).getters.getIcon(
|
|
598
|
-
color:
|
|
599
|
-
size:
|
|
600
|
-
className:
|
|
597
|
+
component: E(ee).getters.getIcon(t.model.icons.icon.component),
|
|
598
|
+
color: t.model.icons.icon.color ? t.model.icons.icon.color : "inherit",
|
|
599
|
+
size: t.model.icons.icon.size ? t.model.icons.icon.size : null,
|
|
600
|
+
className: t.model.icons.icon.class ? t.model.icons.icon.class : null
|
|
601
601
|
}, null, 8, ["component", "color", "size", "className"])) : k("", !0),
|
|
602
602
|
_("div", bo, [
|
|
603
603
|
I.value ? (d(), f("div", xo)) : k("", !0),
|
|
604
|
-
I.value ? k("", !0) : (d(), f("div", $o, A(E(v).actions.renderTitle(
|
|
604
|
+
I.value ? k("", !0) : (d(), f("div", $o, A(E(v).actions.renderTitle(t.treeId, t.model.title)), 1))
|
|
605
605
|
])
|
|
606
606
|
]),
|
|
607
607
|
_("div", ko, [
|
|
608
|
-
((P =
|
|
608
|
+
((P = t.model.badge) == null ? void 0 : P.value) !== void 0 && !I.value ? (d(), b(Y(lo), {
|
|
609
609
|
key: 0,
|
|
610
|
-
class: T([(y =
|
|
610
|
+
class: T([(y = t.model.badge) == null ? void 0 : y.class, "badge-sm"])
|
|
611
611
|
}, {
|
|
612
612
|
default: C(() => [
|
|
613
|
-
K(A(
|
|
613
|
+
K(A(t.model.badge.value), 1)
|
|
614
614
|
]),
|
|
615
615
|
_: 1
|
|
616
616
|
}, 8, ["class"])) : k("", !0),
|
|
617
|
-
|
|
617
|
+
t.model.icons && t.model.icons.post && l.value && !t.search && !I.value ? (d(), b(Y(de), {
|
|
618
618
|
key: 1,
|
|
619
|
-
component: E(ee).getters.getIcon(
|
|
619
|
+
component: E(ee).getters.getIcon(t.model.icons.post.component),
|
|
620
620
|
size: 20,
|
|
621
|
-
color:
|
|
621
|
+
color: t.model.icons.post.color ? t.model.icons.post.color : "inherit",
|
|
622
622
|
class: T(i.value ? "tree-open-post" : "")
|
|
623
623
|
}, null, 8, ["component", "color", "class"])) : k("", !0)
|
|
624
624
|
])
|
|
@@ -627,14 +627,14 @@ const fo = (e) => (Lt("data-v-df4ffb7f"), e = e(), Ct(), e), mo = {
|
|
|
627
627
|
]),
|
|
628
628
|
oe(co, null, {
|
|
629
629
|
default: C(() => [
|
|
630
|
-
l.value && i.value && !
|
|
630
|
+
l.value && i.value && !t.search ? (d(), f("ul", wo, [
|
|
631
631
|
(d(!0), f(ie, null, ge(e.model.children, (z) => (d(), b(O, {
|
|
632
632
|
class: "tree-item",
|
|
633
633
|
key: z.id,
|
|
634
634
|
model: z,
|
|
635
|
-
treeId:
|
|
636
|
-
items:
|
|
637
|
-
search:
|
|
635
|
+
treeId: t.treeId,
|
|
636
|
+
items: t.items,
|
|
637
|
+
search: t.search,
|
|
638
638
|
onNodeclick: u,
|
|
639
639
|
onNodedrop: h,
|
|
640
640
|
onNodecontext: x
|
|
@@ -649,7 +649,7 @@ const fo = (e) => (Lt("data-v-df4ffb7f"), e = e(), Ct(), e), mo = {
|
|
|
649
649
|
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(), f("li", mo));
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
|
-
}, Do = /* @__PURE__ */ re(So, [["__scopeId", "data-v-
|
|
652
|
+
}, Do = /* @__PURE__ */ re(So, [["__scopeId", "data-v-ee071ba5"]]);
|
|
653
653
|
function To(e) {
|
|
654
654
|
return e = e || /* @__PURE__ */ new Map(), {
|
|
655
655
|
/**
|
|
@@ -662,9 +662,9 @@ function To(e) {
|
|
|
662
662
|
* @param {Function} handler Function to call in response to given event
|
|
663
663
|
* @memberOf eventsBus
|
|
664
664
|
*/
|
|
665
|
-
on(
|
|
666
|
-
const
|
|
667
|
-
|
|
665
|
+
on(o, t) {
|
|
666
|
+
const n = e.get(o);
|
|
667
|
+
n ? n.push(t) : e.set(o, [t]);
|
|
668
668
|
},
|
|
669
669
|
/**
|
|
670
670
|
* Remove an event handler for the given type.
|
|
@@ -673,9 +673,9 @@ function To(e) {
|
|
|
673
673
|
* @param {Function} [handler] Handler function to remove
|
|
674
674
|
* @memberOf eventsBus
|
|
675
675
|
*/
|
|
676
|
-
off(
|
|
677
|
-
const
|
|
678
|
-
|
|
676
|
+
off(o, t) {
|
|
677
|
+
const n = e.get(o);
|
|
678
|
+
n && (t ? n.splice(n.indexOf(t) >>> 0, 1) : e.set(o, []));
|
|
679
679
|
},
|
|
680
680
|
/**
|
|
681
681
|
* Invoke all handlers for the given type.
|
|
@@ -687,12 +687,12 @@ function To(e) {
|
|
|
687
687
|
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
688
688
|
* @memberOf eventsBus
|
|
689
689
|
*/
|
|
690
|
-
emit(
|
|
691
|
-
let
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
}),
|
|
695
|
-
|
|
690
|
+
emit(o, t) {
|
|
691
|
+
let n = e.get(o);
|
|
692
|
+
n && n.slice().map((s) => {
|
|
693
|
+
s(t);
|
|
694
|
+
}), n = e.get("*"), n && n.slice().map((s) => {
|
|
695
|
+
s(o, t);
|
|
696
696
|
});
|
|
697
697
|
}
|
|
698
698
|
};
|
|
@@ -709,93 +709,93 @@ const q = To(), v = {
|
|
|
709
709
|
return v.state.trees[e].selected;
|
|
710
710
|
},
|
|
711
711
|
// data - ноды, dataId - ID ноды родителя data
|
|
712
|
-
getParentId(e,
|
|
713
|
-
return
|
|
712
|
+
getParentId(e, o, t, n = "id", s = "children", a = {}) {
|
|
713
|
+
return t && e && (e.find((r) => r[n] === t ? (a.found = o, r) : v.getters.getParentId(r[s], r.id, t, n, s, a)), a.found) ? a.found : !1;
|
|
714
714
|
}
|
|
715
715
|
},
|
|
716
716
|
mutations: {
|
|
717
|
-
setTreeItems(e,
|
|
718
|
-
v.state.trees[e].items =
|
|
717
|
+
setTreeItems(e, o) {
|
|
718
|
+
v.state.trees[e].items = o;
|
|
719
719
|
},
|
|
720
|
-
setItemSelect(e,
|
|
721
|
-
v.state.trees[e].noSelect || (v.state.trees[e].multiSelect ? v.state.trees[e].selected.includes(
|
|
722
|
-
return
|
|
723
|
-
}) : v.state.trees[e].selected = [...v.state.trees[e].selected,
|
|
720
|
+
setItemSelect(e, o) {
|
|
721
|
+
v.state.trees[e].noSelect || (v.state.trees[e].multiSelect ? v.state.trees[e].selected.includes(o.id) ? v.state.trees[e].selected = v.state.trees[e].selected.filter(function(t) {
|
|
722
|
+
return t !== o.id;
|
|
723
|
+
}) : v.state.trees[e].selected = [...v.state.trees[e].selected, o.id] : v.state.trees[e].selected = [o.id]);
|
|
724
724
|
}
|
|
725
725
|
},
|
|
726
726
|
actions: {
|
|
727
|
-
initTreeStore(e, t,
|
|
728
|
-
v.state.trees[e] = [], v.state.trees[e].selected = [], v.state.trees[e].noSelect =
|
|
727
|
+
initTreeStore(e, o, t, n, s, a, r, l = !0) {
|
|
728
|
+
v.state.trees[e] = [], v.state.trees[e].selected = [], v.state.trees[e].noSelect = o, v.state.trees[e].multiSelect = t, v.state.trees[e].expanded = n, v.state.trees[e].transfer = s, v.state.trees[e].renderTitle = a, v.state.trees[e].beforeItem = r, v.state.trees[e].dropInside = l;
|
|
729
729
|
},
|
|
730
|
-
renderTitle(e,
|
|
731
|
-
return v.state.trees[e].renderTitle ? v.state.trees[e].renderTitle(
|
|
730
|
+
renderTitle(e, o) {
|
|
731
|
+
return v.state.trees[e].renderTitle ? v.state.trees[e].renderTitle(o) : o;
|
|
732
732
|
},
|
|
733
|
-
beforeItem(e,
|
|
734
|
-
return v.state.trees[e].beforeItem ? v.state.trees[e].beforeItem(
|
|
733
|
+
beforeItem(e, o) {
|
|
734
|
+
return v.state.trees[e].beforeItem ? v.state.trees[e].beforeItem(o) : !0;
|
|
735
735
|
},
|
|
736
|
-
isItemSelected(e,
|
|
737
|
-
return v.state.trees[e].selected.includes(
|
|
736
|
+
isItemSelected(e, o) {
|
|
737
|
+
return v.state.trees[e].selected.includes(o);
|
|
738
738
|
},
|
|
739
|
-
toggleItem(e,
|
|
740
|
-
|
|
739
|
+
toggleItem(e, o) {
|
|
740
|
+
o.expanded = o.expanded === void 0 || !o.expanded, o.children && o.children.length && (o.expanded ? q.emit(`expand-${e}`, { id: e, model: o }) : q.emit(`collapse-${e}`, { id: e, model: o }));
|
|
741
741
|
},
|
|
742
742
|
isTreeExpanded(e) {
|
|
743
743
|
return v.state.trees[e].expanded;
|
|
744
744
|
},
|
|
745
|
-
isChildOfParent(e,
|
|
746
|
-
const
|
|
747
|
-
if (
|
|
748
|
-
for (let a = 0; a <
|
|
749
|
-
if (
|
|
745
|
+
isChildOfParent(e, o, t, n) {
|
|
746
|
+
const s = v.actions.deepSearch(o, t);
|
|
747
|
+
if (s && s.children) {
|
|
748
|
+
for (let a = 0; a < s.children.length; a++)
|
|
749
|
+
if (s.children[a].id === n)
|
|
750
750
|
return !0;
|
|
751
751
|
}
|
|
752
752
|
return !1;
|
|
753
753
|
},
|
|
754
754
|
// Является ли нода родителем указанного потомка
|
|
755
|
-
isParentOfChild(e,
|
|
756
|
-
const
|
|
757
|
-
return !!(
|
|
758
|
-
},
|
|
759
|
-
deepSearch(e,
|
|
760
|
-
return
|
|
761
|
-
},
|
|
762
|
-
deepSearchByTitle(e,
|
|
763
|
-
if (
|
|
764
|
-
const r = new RegExp(
|
|
765
|
-
a[
|
|
766
|
-
}),
|
|
767
|
-
for (let a = 0; a <
|
|
755
|
+
isParentOfChild(e, o, t, n) {
|
|
756
|
+
const s = v.actions.deepSearch(o, t);
|
|
757
|
+
return !!(s && s.children && v.actions.deepSearch(s.children, n));
|
|
758
|
+
},
|
|
759
|
+
deepSearch(e, o, t = "id", n = "children", s = {}) {
|
|
760
|
+
return o && e && (e.find((a) => a[t] === o ? (s.found = a, a) : v.actions.deepSearch(a[n], o, t, n, s)), s.found) ? s.found : !1;
|
|
761
|
+
},
|
|
762
|
+
deepSearchByTitle(e, o, t = "title", n = "children", s = []) {
|
|
763
|
+
if (o && e && (e.find((a) => {
|
|
764
|
+
const r = new RegExp(o, "gi");
|
|
765
|
+
a[t].toString().toLowerCase().match(r) !== null && s.push(a), v.actions.deepSearchByTitle(a[n], o, t, n, s);
|
|
766
|
+
}), s)) {
|
|
767
|
+
for (let a = 0; a < s.length; a++)
|
|
768
768
|
;
|
|
769
|
-
return
|
|
769
|
+
return s;
|
|
770
770
|
}
|
|
771
|
-
return
|
|
771
|
+
return s;
|
|
772
772
|
},
|
|
773
|
-
moveTreeNode(e, t,
|
|
774
|
-
const r = v.actions.deleteTreeNode(
|
|
775
|
-
v.actions.insertTreeNode(
|
|
773
|
+
moveTreeNode(e, o, t, n, s, a) {
|
|
774
|
+
const r = v.actions.deleteTreeNode(t, n);
|
|
775
|
+
v.actions.insertTreeNode(t, s, r, a), q.emit(`move-${o}`, { fromTreeId: e, toTreeId: o, moved: r == null ? void 0 : r.id, target: s, position: a });
|
|
776
776
|
},
|
|
777
|
-
insertTreeNode(e,
|
|
777
|
+
insertTreeNode(e, o, t, n) {
|
|
778
778
|
if (e)
|
|
779
|
-
for (let
|
|
780
|
-
if (e[
|
|
781
|
-
let r =
|
|
782
|
-
return
|
|
779
|
+
for (let s = 0; s < e.length; s++) {
|
|
780
|
+
if (e[s].id === o) {
|
|
781
|
+
let r = s;
|
|
782
|
+
return n === "after" ? (r++, e.splice(r, 0, t)) : n === "before" ? e.splice(r, 0, t) : n === "inside" && (Object.hasOwn(e[s], "children") || (e[s].children = [], e[s].opened = !0), e[s].children.splice(0, 0, t)), e[s];
|
|
783
783
|
}
|
|
784
|
-
const a = this.insertTreeNode(e[
|
|
784
|
+
const a = this.insertTreeNode(e[s].children, o, t, n);
|
|
785
785
|
if (a)
|
|
786
786
|
return a;
|
|
787
787
|
}
|
|
788
788
|
},
|
|
789
|
-
deleteTreeNode(e,
|
|
789
|
+
deleteTreeNode(e, o) {
|
|
790
790
|
if (e)
|
|
791
|
-
for (let
|
|
792
|
-
if (e[
|
|
793
|
-
const
|
|
794
|
-
return e.splice(
|
|
791
|
+
for (let t = 0; t < e.length; t++) {
|
|
792
|
+
if (e[t].id === o) {
|
|
793
|
+
const s = e[t];
|
|
794
|
+
return e.splice(t, 1), s;
|
|
795
795
|
}
|
|
796
|
-
const
|
|
797
|
-
if (
|
|
798
|
-
return
|
|
796
|
+
const n = v.actions.deleteTreeNode(e[t].children, o);
|
|
797
|
+
if (n)
|
|
798
|
+
return n;
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
}
|
|
@@ -805,12 +805,12 @@ const q = To(), v = {
|
|
|
805
805
|
tag: { type: String, default: "div" }
|
|
806
806
|
},
|
|
807
807
|
emits: Object.keys(j),
|
|
808
|
-
setup(e, { expose:
|
|
809
|
-
let
|
|
810
|
-
const
|
|
811
|
-
|
|
808
|
+
setup(e, { expose: o, emit: t }) {
|
|
809
|
+
let n = Oe({});
|
|
810
|
+
const s = w("false"), a = w(null), r = /* @__PURE__ */ new Set(), l = m(() => s.value && n), i = (u, h) => {
|
|
811
|
+
n = Te.data, t(u, h, n), u === j.dragenter && (r.size || h.target === a.value) && r.add(h.target), u === j.dragleave && r.delete(h.target), u === j.drop && r.clear(), s.value = !!r.size;
|
|
812
812
|
};
|
|
813
|
-
return
|
|
813
|
+
return o({
|
|
814
814
|
elementSize: () => yt(a)
|
|
815
815
|
}), (u, h) => (d(), b(Y(e.tag), {
|
|
816
816
|
ref_key: "el",
|
|
@@ -844,26 +844,26 @@ const q = To(), v = {
|
|
|
844
844
|
}
|
|
845
845
|
},
|
|
846
846
|
emits: ["select"],
|
|
847
|
-
setup(e, { expose:
|
|
848
|
-
const
|
|
849
|
-
let
|
|
847
|
+
setup(e, { expose: o, emit: t }) {
|
|
848
|
+
const n = e;
|
|
849
|
+
let s = w(null), a = w(!1);
|
|
850
850
|
const r = () => {
|
|
851
851
|
q.emit("menu-show-request"), a.value = !0;
|
|
852
852
|
}, l = () => {
|
|
853
853
|
var x;
|
|
854
|
-
(x =
|
|
854
|
+
(x = s.value) == null || x.collapseAll(), a.value = !1;
|
|
855
855
|
}, i = () => a.value;
|
|
856
856
|
q.on("menu-show-request", () => {
|
|
857
857
|
l();
|
|
858
|
-
}),
|
|
858
|
+
}), o({
|
|
859
859
|
show: r,
|
|
860
860
|
hide: l,
|
|
861
|
-
elementSize: () =>
|
|
861
|
+
elementSize: () => s.value.elementSize(),
|
|
862
862
|
isShowed: i,
|
|
863
|
-
itemsCount: () =>
|
|
863
|
+
itemsCount: () => s.value.itemsCount()
|
|
864
864
|
});
|
|
865
865
|
const h = (x) => {
|
|
866
|
-
|
|
866
|
+
t("select", x), x.model.children || l();
|
|
867
867
|
};
|
|
868
868
|
return (x, S) => {
|
|
869
869
|
const N = Re("click-outside");
|
|
@@ -871,14 +871,14 @@ const q = To(), v = {
|
|
|
871
871
|
E(a) ? te((d(), b(bt, {
|
|
872
872
|
key: 0,
|
|
873
873
|
ref_key: "treeRef",
|
|
874
|
-
ref:
|
|
875
|
-
items:
|
|
876
|
-
"no-select":
|
|
877
|
-
class: T(
|
|
878
|
-
style: H(
|
|
874
|
+
ref: s,
|
|
875
|
+
items: n.items,
|
|
876
|
+
"no-select": n.noSelect,
|
|
877
|
+
class: T(n.class),
|
|
878
|
+
style: H(n.style),
|
|
879
879
|
onSelect: h,
|
|
880
|
-
"render-title":
|
|
881
|
-
"before-item":
|
|
880
|
+
"render-title": n.renderItemTitle,
|
|
881
|
+
"before-item": n.beforeItem
|
|
882
882
|
}, null, 8, ["items", "no-select", "class", "style", "render-title", "before-item"])), [
|
|
883
883
|
[N, () => l()]
|
|
884
884
|
]) : k("", !0)
|
|
@@ -893,30 +893,30 @@ const q = To(), v = {
|
|
|
893
893
|
beforeItem: Function
|
|
894
894
|
},
|
|
895
895
|
emits: ["select"],
|
|
896
|
-
setup(e, { expose:
|
|
897
|
-
const
|
|
896
|
+
setup(e, { expose: o, emit: t }) {
|
|
897
|
+
const n = e, s = w(null), a = w(0), r = w(0), l = m(() => ({
|
|
898
898
|
left: a.value + "px",
|
|
899
899
|
top: r.value + "px"
|
|
900
900
|
})), i = (u) => {
|
|
901
|
-
|
|
902
|
-
const h =
|
|
903
|
-
a.value = x - u.pageX < h.width ? u.pageX - h.width : u.pageX, r.value = S - u.pageY < h.height ? u.pageY - h.height : u.pageY,
|
|
901
|
+
s.value.show(), mt(() => {
|
|
902
|
+
const h = s.value.elementSize(), x = window.innerWidth, S = window.innerHeight;
|
|
903
|
+
a.value = x - u.pageX < h.width ? u.pageX - h.width : u.pageX, r.value = S - u.pageY < h.height ? u.pageY - h.height : u.pageY, s.value.itemsCount() === 0 && s.value.hide();
|
|
904
904
|
});
|
|
905
905
|
}, c = (u) => {
|
|
906
|
-
|
|
906
|
+
t("select", u);
|
|
907
907
|
};
|
|
908
|
-
return
|
|
908
|
+
return o({
|
|
909
909
|
show: i
|
|
910
910
|
}), (u, h) => (d(), b(_t, {
|
|
911
911
|
ref_key: "dMenuRef",
|
|
912
|
-
ref:
|
|
912
|
+
ref: s,
|
|
913
913
|
onSelect: c,
|
|
914
|
-
items:
|
|
914
|
+
items: n.items,
|
|
915
915
|
style: H(l.value),
|
|
916
916
|
class: "context-menu",
|
|
917
917
|
"no-select": !0,
|
|
918
|
-
"render-item-title":
|
|
919
|
-
"before-item":
|
|
918
|
+
"render-item-title": n.renderItemTitle,
|
|
919
|
+
"before-item": n.beforeItem
|
|
920
920
|
}, null, 8, ["items", "style", "render-item-title", "before-item"]));
|
|
921
921
|
}
|
|
922
922
|
}, bt = {
|
|
@@ -961,42 +961,42 @@ const q = To(), v = {
|
|
|
961
961
|
}
|
|
962
962
|
},
|
|
963
963
|
emits: ["select", "collapse", "expand", "move", "over", "drop"],
|
|
964
|
-
setup(e, { expose:
|
|
965
|
-
const
|
|
966
|
-
v.actions.initTreeStore(l,
|
|
964
|
+
setup(e, { expose: o, emit: t }) {
|
|
965
|
+
const n = e, s = w(null), a = w(!1), r = w(null), l = ht().uid;
|
|
966
|
+
v.actions.initTreeStore(l, n.noSelect, n.multiSelect, n.expanded, n.transfer, n.renderTitle, n.beforeItem, n.dropInside);
|
|
967
967
|
const i = (y, z) => {
|
|
968
968
|
console.log(y, z);
|
|
969
969
|
};
|
|
970
970
|
q.on(`expand-${l}`, (y) => {
|
|
971
|
-
|
|
971
|
+
t("expand", y);
|
|
972
972
|
}), q.on(`collapse-${l}`, (y) => {
|
|
973
|
-
|
|
973
|
+
t("collapse", y);
|
|
974
974
|
}), q.on(`move-${l}`, (y) => {
|
|
975
|
-
|
|
975
|
+
t("move", y);
|
|
976
976
|
});
|
|
977
|
-
const c = m(() =>
|
|
978
|
-
v.mutations.setItemSelect(l, y.model), v.actions.toggleItem(l, y.model),
|
|
977
|
+
const c = m(() => n.search ? v.actions.deepSearchByTitle(n.items, n.search) : n.items), u = (y = null) => {
|
|
978
|
+
v.mutations.setItemSelect(l, y.model), v.actions.toggleItem(l, y.model), t("select", y);
|
|
979
979
|
}, h = (y = null) => {
|
|
980
|
-
|
|
980
|
+
t("over", y);
|
|
981
981
|
}, x = (y = null) => {
|
|
982
|
-
|
|
983
|
-
}, S = () =>
|
|
984
|
-
for (let y = 0; y <
|
|
985
|
-
|
|
982
|
+
t("drop", y);
|
|
983
|
+
}, S = () => s.value.elementSize(), N = () => {
|
|
984
|
+
for (let y = 0; y < n.items.length; y++)
|
|
985
|
+
n.items[y].expanded = !0;
|
|
986
986
|
}, $ = () => {
|
|
987
|
-
for (let y = 0; y <
|
|
988
|
-
|
|
989
|
-
}, V = () => l, R = (y) => v.actions.deepSearch(
|
|
987
|
+
for (let y = 0; y < n.items.length; y++)
|
|
988
|
+
n.items[y].expanded = !1;
|
|
989
|
+
}, V = () => l, R = (y) => v.actions.deepSearch(n.items, y), I = (y) => {
|
|
990
990
|
R(y) && v.mutations.setItemSelect(l, R(y));
|
|
991
991
|
}, B = (y) => {
|
|
992
|
-
|
|
993
|
-
}, M = (y) =>
|
|
992
|
+
n.contextClick({ e: y.e, model: y.model, target: r.value });
|
|
993
|
+
}, M = (y) => n.contextBeforeClick({ model: y, target: r.value }), g = m(() => n.context), O = (y) => (g.value && (r.value = y.model, a.value.show(y.e)), !1), W = () => P(c.value), P = (y) => {
|
|
994
994
|
let z = 0;
|
|
995
995
|
for (let p = 0; p < y.length; p++)
|
|
996
996
|
z += v.actions.beforeItem(l, y[p]) ? 1 : 0, y[p].children && y[p].children.length > 0 && (z += P(y[p].children));
|
|
997
997
|
return z;
|
|
998
998
|
};
|
|
999
|
-
return
|
|
999
|
+
return o({
|
|
1000
1000
|
elementSize: S,
|
|
1001
1001
|
expandAll: N,
|
|
1002
1002
|
collapseAll: $,
|
|
@@ -1006,7 +1006,7 @@ const q = To(), v = {
|
|
|
1006
1006
|
itemsCount: W
|
|
1007
1007
|
}), (y, z) => (d(), b(Lo, {
|
|
1008
1008
|
ref_key: "treeRef",
|
|
1009
|
-
ref:
|
|
1009
|
+
ref: s,
|
|
1010
1010
|
class: "tree",
|
|
1011
1011
|
tag: "ul",
|
|
1012
1012
|
onDrop: X(i, ["stop"])
|
|
@@ -1016,8 +1016,8 @@ const q = To(), v = {
|
|
|
1016
1016
|
key: p.id,
|
|
1017
1017
|
model: p,
|
|
1018
1018
|
treeId: E(l),
|
|
1019
|
-
items:
|
|
1020
|
-
search:
|
|
1019
|
+
items: n.items,
|
|
1020
|
+
search: n.search,
|
|
1021
1021
|
onNodeclick: u,
|
|
1022
1022
|
onNodedragover: h,
|
|
1023
1023
|
onNodedrop: x,
|
|
@@ -1047,16 +1047,20 @@ const Io = {
|
|
|
1047
1047
|
default: !0
|
|
1048
1048
|
}
|
|
1049
1049
|
},
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1050
|
+
emits: ["move"],
|
|
1051
|
+
setup(e, { emit: o }) {
|
|
1052
|
+
const t = e, n = (s) => {
|
|
1053
|
+
o("move", s);
|
|
1054
|
+
};
|
|
1055
|
+
return (s, a) => (d(), b(bt, {
|
|
1053
1056
|
class: "accordion",
|
|
1054
1057
|
items: t.items,
|
|
1055
1058
|
"no-select": t.noSelect,
|
|
1056
|
-
"render-title": t.renderTitle
|
|
1059
|
+
"render-title": t.renderTitle,
|
|
1060
|
+
onMove: n
|
|
1057
1061
|
}, null, 8, ["items", "no-select", "render-title"]));
|
|
1058
1062
|
}
|
|
1059
|
-
},
|
|
1063
|
+
}, Ds = /* @__PURE__ */ re(Io, [["__scopeId", "data-v-e3c63c62"]]), Eo = {
|
|
1060
1064
|
__name: "DLayoutHeader",
|
|
1061
1065
|
props: {
|
|
1062
1066
|
fixed: {
|
|
@@ -1090,15 +1094,15 @@ const Io = {
|
|
|
1090
1094
|
useMinWidthLayout: Boolean
|
|
1091
1095
|
},
|
|
1092
1096
|
setup(e) {
|
|
1093
|
-
const
|
|
1094
|
-
const { fixed:
|
|
1095
|
-
return `position:${u};z-index:${
|
|
1097
|
+
const o = e, t = m(() => {
|
|
1098
|
+
const { fixed: n, zIndex: s, minWidth: a, height: r, paddingLeft: l, transitionDuration: i, transitionTimingFunction: c } = o, u = n ? "fixed" : "static", h = o.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1099
|
+
return `position:${u};z-index:${s};${h}height:${r}px;padding-left:${l}px;transition-duration:${i}ms;transition-timing-function:${c};`;
|
|
1096
1100
|
});
|
|
1097
|
-
return (
|
|
1101
|
+
return (n, s) => (d(), f("header", {
|
|
1098
1102
|
class: "d-layout-header",
|
|
1099
|
-
style: H(
|
|
1103
|
+
style: H(t.value)
|
|
1100
1104
|
}, [
|
|
1101
|
-
L(
|
|
1105
|
+
L(n.$slots, "default")
|
|
1102
1106
|
], 4));
|
|
1103
1107
|
}
|
|
1104
1108
|
}, Bo = {
|
|
@@ -1139,15 +1143,15 @@ const Io = {
|
|
|
1139
1143
|
useMinWidthLayout: Boolean
|
|
1140
1144
|
},
|
|
1141
1145
|
setup(e) {
|
|
1142
|
-
const
|
|
1143
|
-
const { fixed:
|
|
1144
|
-
return `position:${h};top:${
|
|
1146
|
+
const o = e, t = m(() => {
|
|
1147
|
+
const { fixed: n, top: s, zIndex: a, minWidth: r, height: l, paddingLeft: i, transitionDuration: c, transitionTimingFunction: u } = o, h = n ? "fixed" : "static", x = o.useMinWidthLayout ? `min-width: ${r}px;` : "";
|
|
1148
|
+
return `position:${h};top:${s}px;z-index:${a};${x}height:${l}px;padding-left:${i}px;transition-duration:${c}ms;transition-timing-function:${u};`;
|
|
1145
1149
|
});
|
|
1146
|
-
return (
|
|
1150
|
+
return (n, s) => (d(), f("div", {
|
|
1147
1151
|
class: "d-layout-tab",
|
|
1148
|
-
style: H(
|
|
1152
|
+
style: H(t.value)
|
|
1149
1153
|
}, [
|
|
1150
|
-
L(
|
|
1154
|
+
L(n.$slots, "default")
|
|
1151
1155
|
], 4));
|
|
1152
1156
|
}
|
|
1153
1157
|
}, Mo = {
|
|
@@ -1184,15 +1188,15 @@ const Io = {
|
|
|
1184
1188
|
useMinWidthLayout: Boolean
|
|
1185
1189
|
},
|
|
1186
1190
|
setup(e) {
|
|
1187
|
-
const
|
|
1188
|
-
const { fixed:
|
|
1189
|
-
return `position:${u};z-index:${
|
|
1191
|
+
const o = e, t = m(() => {
|
|
1192
|
+
const { fixed: n, zIndex: s, minWidth: a, height: r, paddingLeft: l, transitionDuration: i, transitionTimingFunction: c } = o, u = n ? "fixed" : "static", h = o.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1193
|
+
return `position:${u};z-index:${s};${h}height:${r}px;padding-left:${l}px;transition-duration:${i}ms;transition-timing-function:${c};`;
|
|
1190
1194
|
});
|
|
1191
|
-
return (
|
|
1195
|
+
return (n, s) => (d(), f("footer", {
|
|
1192
1196
|
class: "d-layout-footer",
|
|
1193
|
-
style: H(
|
|
1197
|
+
style: H(t.value)
|
|
1194
1198
|
}, [
|
|
1195
|
-
L(
|
|
1199
|
+
L(n.$slots, "default")
|
|
1196
1200
|
], 4));
|
|
1197
1201
|
}
|
|
1198
1202
|
}, No = {
|
|
@@ -1224,15 +1228,15 @@ const Io = {
|
|
|
1224
1228
|
}
|
|
1225
1229
|
},
|
|
1226
1230
|
setup(e) {
|
|
1227
|
-
const
|
|
1228
|
-
const { zIndex:
|
|
1229
|
-
return `z-index:${
|
|
1231
|
+
const o = e, t = m(() => {
|
|
1232
|
+
const { zIndex: n, width: s, paddingTop: a, transitionDuration: r, transitionTimingFunction: l } = o;
|
|
1233
|
+
return `z-index:${n};width:${s}px;padding-top:${a}px;transition-duration:${r}ms;transition-timing-function:${l};`;
|
|
1230
1234
|
});
|
|
1231
|
-
return (
|
|
1235
|
+
return (n, s) => (d(), f("aside", {
|
|
1232
1236
|
class: "d-layout-sidebar",
|
|
1233
|
-
style: H(
|
|
1237
|
+
style: H(t.value)
|
|
1234
1238
|
}, [
|
|
1235
|
-
L(
|
|
1239
|
+
L(n.$slots, "default")
|
|
1236
1240
|
], 4));
|
|
1237
1241
|
}
|
|
1238
1242
|
}, Ro = {
|
|
@@ -1261,28 +1265,28 @@ const Io = {
|
|
|
1261
1265
|
}
|
|
1262
1266
|
},
|
|
1263
1267
|
setup(e) {
|
|
1264
|
-
const
|
|
1265
|
-
const { paddingTop:
|
|
1266
|
-
return `padding-top:${
|
|
1268
|
+
const o = e, t = m(() => {
|
|
1269
|
+
const { paddingTop: n, paddingBottom: s, paddingLeft: a, transitionDuration: r, transitionTimingFunction: l } = o, i = `overflow:${o.overflowHidden ? "hidden" : "visible"};`;
|
|
1270
|
+
return `padding-top:${n}px;padding-bottom:${s}px;padding-left:${a}px;${i}transition-duration:${r}ms;transition-timing-function:${l};`;
|
|
1267
1271
|
});
|
|
1268
|
-
return (
|
|
1269
|
-
style: H(
|
|
1272
|
+
return (n, s) => (d(), f("main", {
|
|
1273
|
+
style: H(t.value),
|
|
1270
1274
|
class: "d-layout-content"
|
|
1271
1275
|
}, [
|
|
1272
|
-
L(
|
|
1276
|
+
L(n.$slots, "default")
|
|
1273
1277
|
], 4));
|
|
1274
1278
|
}
|
|
1275
1279
|
};
|
|
1276
1280
|
function Oo(e) {
|
|
1277
|
-
const
|
|
1278
|
-
let
|
|
1279
|
-
function
|
|
1280
|
-
|
|
1281
|
+
const o = w(0), t = m(() => `transform: translateX(${-o.value}px);`);
|
|
1282
|
+
let n = !1;
|
|
1283
|
+
function s(u) {
|
|
1284
|
+
o.value = u;
|
|
1281
1285
|
}
|
|
1282
1286
|
function a() {
|
|
1283
1287
|
var u;
|
|
1284
1288
|
const h = ((u = document.scrollingElement) === null || u === void 0 ? void 0 : u.scrollLeft) || 0;
|
|
1285
|
-
|
|
1289
|
+
s(h);
|
|
1286
1290
|
}
|
|
1287
1291
|
function r() {
|
|
1288
1292
|
a();
|
|
@@ -1291,18 +1295,18 @@ function Oo(e) {
|
|
|
1291
1295
|
document.addEventListener("scroll", a);
|
|
1292
1296
|
}
|
|
1293
1297
|
function i() {
|
|
1294
|
-
|
|
1298
|
+
n && document.removeEventListener("scroll", a);
|
|
1295
1299
|
}
|
|
1296
1300
|
function c() {
|
|
1297
|
-
r(), l(),
|
|
1301
|
+
r(), l(), n = !0;
|
|
1298
1302
|
}
|
|
1299
1303
|
return gt(e, (u) => {
|
|
1300
1304
|
u ? c() : i();
|
|
1301
1305
|
}, { immediate: !0 }), It(() => {
|
|
1302
1306
|
i();
|
|
1303
|
-
}),
|
|
1307
|
+
}), t;
|
|
1304
1308
|
}
|
|
1305
|
-
const Ao = 1001, Ho = 999, Vo = 998,
|
|
1309
|
+
const Ao = 1001, Ho = 999, Vo = 998, Ts = {
|
|
1306
1310
|
__name: "DLayoutAdmin",
|
|
1307
1311
|
props: {
|
|
1308
1312
|
mode: {
|
|
@@ -1392,39 +1396,39 @@ const Ao = 1001, Ho = 999, Vo = 998, Tn = {
|
|
|
1392
1396
|
}
|
|
1393
1397
|
},
|
|
1394
1398
|
emits: ["update:sidebar-collapse", "sidebar-mask-click"],
|
|
1395
|
-
setup(e, { emit:
|
|
1396
|
-
const
|
|
1397
|
-
const { transitionDuration: g, transitionTimingFunction: O } =
|
|
1399
|
+
setup(e, { emit: o }) {
|
|
1400
|
+
const t = e, n = m(() => t.useMinWidthLayout ? `min-width:${t.minWidth}px;` : ""), s = m(() => t.useMinWidthLayout && (t.fixedHeaderAndTab || t.fixedFooter)), a = Oo(s), r = m(() => t.fixedHeaderAndTab ? a.value : ""), l = m(() => t.fixedFooter ? a.value : ""), i = m(() => {
|
|
1401
|
+
const { transitionDuration: g, transitionTimingFunction: O } = t;
|
|
1398
1402
|
return {
|
|
1399
1403
|
transitionDuration: g,
|
|
1400
1404
|
transitionTimingFunction: O
|
|
1401
1405
|
};
|
|
1402
|
-
}), c = m(() =>
|
|
1406
|
+
}), c = m(() => t.mode === "vertical"), u = m(() => t.isMobile || c.value ? 1003 : 1e3), h = m({
|
|
1403
1407
|
get() {
|
|
1404
|
-
return
|
|
1408
|
+
return t.sidebarCollapse;
|
|
1405
1409
|
},
|
|
1406
1410
|
set(g) {
|
|
1407
|
-
|
|
1411
|
+
o("update:sidebar-collapse", g);
|
|
1408
1412
|
}
|
|
1409
1413
|
});
|
|
1410
1414
|
function x() {
|
|
1411
|
-
|
|
1415
|
+
o("sidebar-mask-click");
|
|
1412
1416
|
}
|
|
1413
|
-
const S = m(() =>
|
|
1414
|
-
const { transitionDuration: g, transitionTimingFunction: O } =
|
|
1415
|
-
return `background-color:${
|
|
1417
|
+
const S = m(() => t.isMobile && !h.value), N = m(() => {
|
|
1418
|
+
const { transitionDuration: g, transitionTimingFunction: O } = t;
|
|
1419
|
+
return `background-color:${t.maskBg};transition-duration:${g}ms;transition-timing-function:${O};`;
|
|
1416
1420
|
}), $ = m(() => {
|
|
1417
|
-
const { sidebarWidth: g, sidebarCollapsedWidth: O } =
|
|
1418
|
-
return
|
|
1419
|
-
}), V = m(() =>
|
|
1420
|
-
() => !
|
|
1421
|
+
const { sidebarWidth: g, sidebarCollapsedWidth: O } = t, W = t.isMobile ? 0 : O, P = h.value ? W : g;
|
|
1422
|
+
return t.sidebarVisible ? P : 0;
|
|
1423
|
+
}), V = m(() => t.isMobile ? 0 : $.value), R = m(() => c.value ? V.value : 0), I = m(
|
|
1424
|
+
() => !t.isMobile && !c.value && t.headerVisible ? t.headerHeight : 0
|
|
1421
1425
|
), B = m(() => {
|
|
1422
1426
|
let g = 0;
|
|
1423
|
-
return
|
|
1424
|
-
}), M = m(() =>
|
|
1427
|
+
return t.fixedHeaderAndTab && (t.headerVisible && (g += t.headerHeight), t.tabVisible && (g += t.tabHeight)), g;
|
|
1428
|
+
}), M = m(() => t.fixedFooter && t.footerVisible ? t.footerHeight : 0);
|
|
1425
1429
|
return (g, O) => (d(), f("div", {
|
|
1426
1430
|
class: "d-layout",
|
|
1427
|
-
style: H(
|
|
1431
|
+
style: H(n.value)
|
|
1428
1432
|
}, [
|
|
1429
1433
|
e.headerVisible ? (d(), b(Eo, ue({ key: 0 }, i.value, {
|
|
1430
1434
|
fixed: e.fixedHeaderAndTab,
|
|
@@ -1514,7 +1518,7 @@ const Ao = 1001, Ho = 999, Vo = 998, Tn = {
|
|
|
1514
1518
|
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);
|
|
1515
1519
|
}
|
|
1516
1520
|
}
|
|
1517
|
-
},
|
|
1521
|
+
}, Ls = {
|
|
1518
1522
|
__name: "DConfigProvider",
|
|
1519
1523
|
props: {
|
|
1520
1524
|
theme: {
|
|
@@ -1523,11 +1527,11 @@ const Ao = 1001, Ho = 999, Vo = 998, Tn = {
|
|
|
1523
1527
|
}
|
|
1524
1528
|
},
|
|
1525
1529
|
setup(e) {
|
|
1526
|
-
const
|
|
1527
|
-
return pe.mutations.setTheme(
|
|
1530
|
+
const o = e;
|
|
1531
|
+
return pe.mutations.setTheme(o.theme), (t, n) => L(t.$slots, "default");
|
|
1528
1532
|
}
|
|
1529
1533
|
};
|
|
1530
|
-
const
|
|
1534
|
+
const Cs = {
|
|
1531
1535
|
__name: "DScrollProvider",
|
|
1532
1536
|
props: {
|
|
1533
1537
|
xHide: {
|
|
@@ -1540,16 +1544,16 @@ const Cn = {
|
|
|
1540
1544
|
}
|
|
1541
1545
|
},
|
|
1542
1546
|
setup(e) {
|
|
1543
|
-
const
|
|
1547
|
+
const o = e;
|
|
1544
1548
|
Ae((a) => ({
|
|
1545
|
-
e35a6f9a:
|
|
1546
|
-
e35a6f98:
|
|
1549
|
+
e35a6f9a: t.value,
|
|
1550
|
+
e35a6f98: n.value
|
|
1547
1551
|
}));
|
|
1548
|
-
const
|
|
1552
|
+
const t = m(() => o.xHide ? "hidden" : "visible"), n = m(() => o.yHide ? "hidden" : "visible"), s = (a) => {
|
|
1549
1553
|
document.body.classList.add(a), document.documentElement.classList.add(a), document.documentElement.classList.add("d-global-scroll");
|
|
1550
1554
|
};
|
|
1551
1555
|
return me(() => {
|
|
1552
|
-
|
|
1556
|
+
s("colored-scroller");
|
|
1553
1557
|
}), (a, r) => (d(), f("div", null, [
|
|
1554
1558
|
L(a.$slots, "default")
|
|
1555
1559
|
]));
|
|
@@ -1572,19 +1576,19 @@ const zo = {
|
|
|
1572
1576
|
}
|
|
1573
1577
|
},
|
|
1574
1578
|
setup(e) {
|
|
1575
|
-
const
|
|
1576
|
-
Ae((
|
|
1577
|
-
c07fa29a:
|
|
1578
|
-
c07fa298:
|
|
1579
|
+
const o = e;
|
|
1580
|
+
Ae((s) => ({
|
|
1581
|
+
c07fa29a: t.value,
|
|
1582
|
+
c07fa298: n.value
|
|
1579
1583
|
}));
|
|
1580
|
-
const
|
|
1581
|
-
return (
|
|
1582
|
-
class: T(
|
|
1584
|
+
const t = m(() => o.xHide ? "hidden" : "visible"), n = m(() => o.yHide ? "hidden" : "visible");
|
|
1585
|
+
return (s, a) => (d(), f("div", {
|
|
1586
|
+
class: T(o.autoHide ? "d-scroll-hide" : "d-scroll")
|
|
1583
1587
|
}, [
|
|
1584
|
-
L(
|
|
1588
|
+
L(s.$slots, "default", {}, void 0, !0)
|
|
1585
1589
|
], 2));
|
|
1586
1590
|
}
|
|
1587
|
-
},
|
|
1591
|
+
}, Is = /* @__PURE__ */ re(zo, [["__scopeId", "data-v-d50b3609"]]), Fo = { class: "modal-content" }, Wo = { class: "modal-header" }, Po = { class: "modal-title" }, jo = { class: "modal-body" }, Xo = { class: "modal-footer" }, xt = {
|
|
1588
1592
|
__name: "DModal",
|
|
1589
1593
|
props: {
|
|
1590
1594
|
show: Boolean,
|
|
@@ -1594,15 +1598,15 @@ const zo = {
|
|
|
1594
1598
|
// максимальная ширина диалога 500px, 100% и т.п.
|
|
1595
1599
|
},
|
|
1596
1600
|
emits: ["open", "close"],
|
|
1597
|
-
setup(e, { expose:
|
|
1598
|
-
const
|
|
1599
|
-
a.value =
|
|
1601
|
+
setup(e, { expose: o, emit: t }) {
|
|
1602
|
+
const n = e, s = w(null), a = w(!1);
|
|
1603
|
+
a.value = n == null ? void 0 : n.show;
|
|
1600
1604
|
const r = () => {
|
|
1601
|
-
a.value = !0,
|
|
1605
|
+
a.value = !0, t("open", s);
|
|
1602
1606
|
}, l = () => {
|
|
1603
|
-
a.value = !1,
|
|
1607
|
+
a.value = !1, t("close", s);
|
|
1604
1608
|
};
|
|
1605
|
-
return
|
|
1609
|
+
return o({
|
|
1606
1610
|
show: r,
|
|
1607
1611
|
hide: l
|
|
1608
1612
|
}), (i, c) => {
|
|
@@ -1613,12 +1617,12 @@ const zo = {
|
|
|
1613
1617
|
a.value ? te((d(), f("div", {
|
|
1614
1618
|
key: 0,
|
|
1615
1619
|
ref_key: "modalRef",
|
|
1616
|
-
ref:
|
|
1620
|
+
ref: s,
|
|
1617
1621
|
class: "modal"
|
|
1618
1622
|
}, [
|
|
1619
1623
|
_("div", {
|
|
1620
1624
|
class: "modal-dialog",
|
|
1621
|
-
style: H({ width:
|
|
1625
|
+
style: H({ width: n.width, maxWidth: n.maxWidth })
|
|
1622
1626
|
}, [
|
|
1623
1627
|
_("div", Fo, [
|
|
1624
1628
|
_("div", Wo, [
|
|
@@ -1647,21 +1651,21 @@ const zo = {
|
|
|
1647
1651
|
function Me(e) {
|
|
1648
1652
|
e === void 0 && (e = ce.value.comp.returnValue()), ce.value.resolve(e), ce.value = null;
|
|
1649
1653
|
}
|
|
1650
|
-
function $t(e,
|
|
1651
|
-
return new Promise((
|
|
1654
|
+
function $t(e, o, t = "default") {
|
|
1655
|
+
return new Promise((n) => {
|
|
1652
1656
|
ce.value = {
|
|
1653
1657
|
dialog: e,
|
|
1654
|
-
props:
|
|
1655
|
-
wrapper:
|
|
1656
|
-
resolve:
|
|
1658
|
+
props: o,
|
|
1659
|
+
wrapper: t,
|
|
1660
|
+
resolve: n
|
|
1657
1661
|
};
|
|
1658
1662
|
});
|
|
1659
1663
|
}
|
|
1660
|
-
var Yo = (e,
|
|
1661
|
-
const
|
|
1662
|
-
for (const [
|
|
1663
|
-
|
|
1664
|
-
return
|
|
1664
|
+
var Yo = (e, o) => {
|
|
1665
|
+
const t = e.__vccOpts || e;
|
|
1666
|
+
for (const [n, s] of o)
|
|
1667
|
+
t[n] = s;
|
|
1668
|
+
return t;
|
|
1665
1669
|
};
|
|
1666
1670
|
const Uo = Bt({
|
|
1667
1671
|
name: "DialogWrapper",
|
|
@@ -1683,7 +1687,7 @@ const Uo = Bt({
|
|
|
1683
1687
|
};
|
|
1684
1688
|
}
|
|
1685
1689
|
});
|
|
1686
|
-
function qo(e, t,
|
|
1690
|
+
function qo(e, o, t, n, s, a) {
|
|
1687
1691
|
return d(), b(Ne, ut(pt(e.transitionAttrs)), {
|
|
1688
1692
|
default: C(() => [
|
|
1689
1693
|
e.dialogRef && e.dialogRef.wrapper === e.name ? (d(), b(Y(e.dialogRef.dialog), ue({ key: 0 }, e.dialogRef.props, { ref: "dialogInstance" }), null, 16)) : k("", !0)
|
|
@@ -1698,17 +1702,17 @@ const Zo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1698
1702
|
title: String,
|
|
1699
1703
|
message: String
|
|
1700
1704
|
},
|
|
1701
|
-
setup(e, { expose:
|
|
1702
|
-
const
|
|
1703
|
-
return
|
|
1705
|
+
setup(e, { expose: o }) {
|
|
1706
|
+
const t = e;
|
|
1707
|
+
return o({
|
|
1704
1708
|
returnValue: () => !0
|
|
1705
|
-
}), (
|
|
1709
|
+
}), (s, a) => (d(), f("div", null, [
|
|
1706
1710
|
oe(xt, { show: !0 }, {
|
|
1707
1711
|
"modal-title": C(() => [
|
|
1708
|
-
K(A(
|
|
1712
|
+
K(A(t.title), 1)
|
|
1709
1713
|
]),
|
|
1710
1714
|
default: C(() => [
|
|
1711
|
-
K(A(
|
|
1715
|
+
K(A(t.message), 1)
|
|
1712
1716
|
]),
|
|
1713
1717
|
"modal-footer": C(() => [
|
|
1714
1718
|
_("div", Zo, [
|
|
@@ -1732,17 +1736,17 @@ const Zo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1732
1736
|
title: String,
|
|
1733
1737
|
message: String
|
|
1734
1738
|
},
|
|
1735
|
-
setup(e, { expose:
|
|
1736
|
-
const
|
|
1737
|
-
return
|
|
1739
|
+
setup(e, { expose: o }) {
|
|
1740
|
+
const t = e;
|
|
1741
|
+
return o({
|
|
1738
1742
|
returnValue: () => !0
|
|
1739
|
-
}), (
|
|
1743
|
+
}), (s, a) => (d(), f("div", null, [
|
|
1740
1744
|
oe(xt, { show: !0 }, {
|
|
1741
1745
|
"modal-title": C(() => [
|
|
1742
|
-
K(A(
|
|
1746
|
+
K(A(t.title), 1)
|
|
1743
1747
|
]),
|
|
1744
1748
|
default: C(() => [
|
|
1745
|
-
K(A(
|
|
1749
|
+
K(A(t.message), 1)
|
|
1746
1750
|
]),
|
|
1747
1751
|
"modal-footer": C(() => [
|
|
1748
1752
|
_("div", Jo, [
|
|
@@ -1769,7 +1773,7 @@ const Zo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1769
1773
|
})
|
|
1770
1774
|
]));
|
|
1771
1775
|
}
|
|
1772
|
-
},
|
|
1776
|
+
}, en = { class: "dropdown" }, Es = {
|
|
1773
1777
|
__name: "DDropdown",
|
|
1774
1778
|
props: {
|
|
1775
1779
|
class: String,
|
|
@@ -1788,9 +1792,9 @@ const Zo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1788
1792
|
}
|
|
1789
1793
|
},
|
|
1790
1794
|
emits: ["select", "click"],
|
|
1791
|
-
setup(e, { expose:
|
|
1792
|
-
const
|
|
1793
|
-
if (
|
|
1795
|
+
setup(e, { expose: o, emit: t }) {
|
|
1796
|
+
const n = e, s = Le(), a = w(null), r = w(null), l = w(0), i = w(0), c = (S) => {
|
|
1797
|
+
if (t("click", S), a.value.isShowed()) {
|
|
1794
1798
|
a.value.hide();
|
|
1795
1799
|
return;
|
|
1796
1800
|
}
|
|
@@ -1799,21 +1803,21 @@ const Zo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1799
1803
|
l.value = V - ($.x + $.width) < N.width ? $.left - N.width + $.width : $.left, i.value = R - ($.y + $.height) < N.height ? $.top - N.height - 5 : $.height + $.top + 5;
|
|
1800
1804
|
});
|
|
1801
1805
|
}, u = (S) => {
|
|
1802
|
-
|
|
1803
|
-
}, h = m(() => ({ left: l.value + "px", top: i.value + "px", position:
|
|
1804
|
-
|
|
1806
|
+
t("select", S);
|
|
1807
|
+
}, h = m(() => ({ left: l.value + "px", top: i.value + "px", position: n.bodyAsParent ? "absolute" : "fixed", ...n.menuStyle }));
|
|
1808
|
+
o({
|
|
1805
1809
|
show: c
|
|
1806
1810
|
});
|
|
1807
|
-
const x = (S) => !!
|
|
1808
|
-
return (S, N) => (d(), f("div",
|
|
1811
|
+
const x = (S) => !!s[S];
|
|
1812
|
+
return (S, N) => (d(), f("div", en, [
|
|
1809
1813
|
x("default") ? (d(), b(ae, {
|
|
1810
1814
|
key: 0,
|
|
1811
1815
|
ref_key: "buttonRef",
|
|
1812
1816
|
ref: r,
|
|
1813
|
-
class: T(
|
|
1814
|
-
icon:
|
|
1817
|
+
class: T(n.class),
|
|
1818
|
+
icon: n.icon,
|
|
1815
1819
|
onClick: X(c, ["stop", "prevent"]),
|
|
1816
|
-
type:
|
|
1820
|
+
type: n.type
|
|
1817
1821
|
}, {
|
|
1818
1822
|
default: C(() => [
|
|
1819
1823
|
L(S.$slots, "default")
|
|
@@ -1823,55 +1827,55 @@ const Zo = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1823
1827
|
key: 1,
|
|
1824
1828
|
ref_key: "buttonRef",
|
|
1825
1829
|
ref: r,
|
|
1826
|
-
class: T(
|
|
1827
|
-
icon:
|
|
1830
|
+
class: T(n.class),
|
|
1831
|
+
icon: n.icon,
|
|
1828
1832
|
onClick: X(c, ["stop", "prevent"]),
|
|
1829
|
-
type:
|
|
1833
|
+
type: n.type
|
|
1830
1834
|
}, null, 8, ["class", "icon", "onClick", "type"])),
|
|
1831
1835
|
oe(_t, {
|
|
1832
1836
|
ref_key: "dMenuRef",
|
|
1833
1837
|
ref: a,
|
|
1834
|
-
items:
|
|
1838
|
+
items: n.items,
|
|
1835
1839
|
class: "dropdown-menu",
|
|
1836
1840
|
style: H(h.value),
|
|
1837
1841
|
"no-select": !0,
|
|
1838
1842
|
onSelect: u,
|
|
1839
|
-
"render-item-title":
|
|
1840
|
-
"before-item":
|
|
1841
|
-
"body-as-parent":
|
|
1843
|
+
"render-item-title": n.renderItemTitle,
|
|
1844
|
+
"before-item": n.beforeItem,
|
|
1845
|
+
"body-as-parent": n.bodyAsParent
|
|
1842
1846
|
}, null, 8, ["items", "style", "render-item-title", "before-item", "body-as-parent"])
|
|
1843
1847
|
]));
|
|
1844
1848
|
}
|
|
1845
|
-
},
|
|
1846
|
-
function
|
|
1847
|
-
return d(), f("div",
|
|
1849
|
+
}, tn = {}, on = { class: "d-panel" };
|
|
1850
|
+
function nn(e, o) {
|
|
1851
|
+
return d(), f("div", on, [
|
|
1848
1852
|
L(e.$slots, "default")
|
|
1849
1853
|
]);
|
|
1850
1854
|
}
|
|
1851
|
-
const
|
|
1855
|
+
const sn = /* @__PURE__ */ re(tn, [["render", nn]]), an = { class: "card-header" }, rn = { class: "modal-title" }, ln = { class: "card-body" }, dn = { class: "card-footer" }, Bs = {
|
|
1852
1856
|
__name: "DCard",
|
|
1853
1857
|
setup(e) {
|
|
1854
|
-
return (
|
|
1858
|
+
return (o, t) => (d(), b(sn, { class: "d-card" }, {
|
|
1855
1859
|
default: C(() => [
|
|
1856
|
-
_("div",
|
|
1857
|
-
_("h5",
|
|
1858
|
-
L(
|
|
1860
|
+
_("div", an, [
|
|
1861
|
+
_("h5", rn, [
|
|
1862
|
+
L(o.$slots, "title")
|
|
1859
1863
|
])
|
|
1860
1864
|
]),
|
|
1861
|
-
_("div",
|
|
1862
|
-
L(
|
|
1865
|
+
_("div", ln, [
|
|
1866
|
+
L(o.$slots, "default")
|
|
1863
1867
|
]),
|
|
1864
|
-
_("div",
|
|
1865
|
-
L(
|
|
1868
|
+
_("div", dn, [
|
|
1869
|
+
L(o.$slots, "footer")
|
|
1866
1870
|
])
|
|
1867
1871
|
]),
|
|
1868
1872
|
_: 3
|
|
1869
1873
|
}));
|
|
1870
1874
|
}
|
|
1871
|
-
},
|
|
1872
|
-
class
|
|
1873
|
-
constructor(
|
|
1874
|
-
this.remaining =
|
|
1875
|
+
}, cn = /* @__PURE__ */ new Map();
|
|
1876
|
+
class un {
|
|
1877
|
+
constructor(o, t, n) {
|
|
1878
|
+
this.remaining = t, this.callback = o, this.notifyItem = n, this.resume();
|
|
1875
1879
|
}
|
|
1876
1880
|
pause() {
|
|
1877
1881
|
clearTimeout(this.notifyItem.timer), this.remaining -= Date.now() - this.start;
|
|
@@ -1897,17 +1901,17 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", at = [
|
|
|
1897
1901
|
name: "px",
|
|
1898
1902
|
regexp: new RegExp(`^${Ee}$`)
|
|
1899
1903
|
}
|
|
1900
|
-
],
|
|
1904
|
+
], pn = (e) => {
|
|
1901
1905
|
if (e === "auto")
|
|
1902
1906
|
return {
|
|
1903
1907
|
type: e,
|
|
1904
1908
|
value: 0
|
|
1905
1909
|
};
|
|
1906
|
-
for (let
|
|
1907
|
-
const
|
|
1908
|
-
if (
|
|
1910
|
+
for (let o = 0; o < at.length; o++) {
|
|
1911
|
+
const t = at[o];
|
|
1912
|
+
if (t.regexp.test(e))
|
|
1909
1913
|
return {
|
|
1910
|
-
type:
|
|
1914
|
+
type: t.name,
|
|
1911
1915
|
value: parseFloat(e)
|
|
1912
1916
|
};
|
|
1913
1917
|
}
|
|
@@ -1915,24 +1919,24 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", at = [
|
|
|
1915
1919
|
type: "",
|
|
1916
1920
|
value: e
|
|
1917
1921
|
};
|
|
1918
|
-
},
|
|
1922
|
+
}, fn = (e) => {
|
|
1919
1923
|
switch (typeof e) {
|
|
1920
1924
|
case "number":
|
|
1921
1925
|
return { type: "px", value: e };
|
|
1922
1926
|
case "string":
|
|
1923
|
-
return
|
|
1927
|
+
return pn(e);
|
|
1924
1928
|
default:
|
|
1925
1929
|
return { type: "", value: e };
|
|
1926
1930
|
}
|
|
1927
1931
|
}, it = {
|
|
1928
1932
|
x: /* @__PURE__ */ new Set(["left", "center", "right"]),
|
|
1929
1933
|
y: /* @__PURE__ */ new Set(["top", "bottom"])
|
|
1930
|
-
},
|
|
1931
|
-
typeof e == "string" && (e =
|
|
1932
|
-
let
|
|
1933
|
-
return e.forEach((
|
|
1934
|
-
it.y.has(
|
|
1935
|
-
}), { x:
|
|
1934
|
+
}, mn = ((e) => () => e++)(0), hn = (e) => typeof e != "string" ? [] : e.split(/\s+/gi).filter(Boolean), gn = (e) => {
|
|
1935
|
+
typeof e == "string" && (e = hn(e));
|
|
1936
|
+
let o = null, t = null;
|
|
1937
|
+
return e.forEach((n) => {
|
|
1938
|
+
it.y.has(n) && (t = n), it.x.has(n) && (o = n);
|
|
1939
|
+
}), { x: o, y: t };
|
|
1936
1940
|
}, Be = {
|
|
1937
1941
|
position: ["top", "right"],
|
|
1938
1942
|
cssAnimation: "fade",
|
|
@@ -1946,23 +1950,23 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", at = [
|
|
|
1946
1950
|
opacity: [0, 1]
|
|
1947
1951
|
}
|
|
1948
1952
|
}
|
|
1949
|
-
},
|
|
1953
|
+
}, vn = {
|
|
1950
1954
|
__name: "VelocityGroup",
|
|
1951
1955
|
emits: ["enter", "leave", "after-leave"],
|
|
1952
|
-
setup(e, { emit:
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1955
|
-
},
|
|
1956
|
-
|
|
1957
|
-
},
|
|
1958
|
-
|
|
1956
|
+
setup(e, { emit: o }) {
|
|
1957
|
+
const t = (a, r) => {
|
|
1958
|
+
o("enter", a, r);
|
|
1959
|
+
}, n = (a, r) => {
|
|
1960
|
+
o("leave", a, r);
|
|
1961
|
+
}, s = () => {
|
|
1962
|
+
o("after-leave");
|
|
1959
1963
|
};
|
|
1960
1964
|
return (a, r) => (d(), b(vt, {
|
|
1961
1965
|
tag: "span",
|
|
1962
1966
|
css: !1,
|
|
1963
|
-
onEnter:
|
|
1964
|
-
onLeave:
|
|
1965
|
-
onAfterLeave:
|
|
1967
|
+
onEnter: t,
|
|
1968
|
+
onLeave: n,
|
|
1969
|
+
onAfterLeave: s
|
|
1966
1970
|
}, {
|
|
1967
1971
|
default: C(() => [
|
|
1968
1972
|
L(a.$slots, "default")
|
|
@@ -1970,7 +1974,7 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", at = [
|
|
|
1970
1974
|
_: 3
|
|
1971
1975
|
}));
|
|
1972
1976
|
}
|
|
1973
|
-
},
|
|
1977
|
+
}, yn = /* @__PURE__ */ Object.assign({
|
|
1974
1978
|
inheritAttrs: !1
|
|
1975
1979
|
}, {
|
|
1976
1980
|
__name: "CssGroup",
|
|
@@ -1978,21 +1982,21 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", at = [
|
|
|
1978
1982
|
name: String
|
|
1979
1983
|
},
|
|
1980
1984
|
setup(e) {
|
|
1981
|
-
const
|
|
1982
|
-
return (
|
|
1985
|
+
const o = e;
|
|
1986
|
+
return (t, n) => (d(), b(vt, {
|
|
1983
1987
|
tag: "span",
|
|
1984
|
-
name:
|
|
1988
|
+
name: o.name
|
|
1985
1989
|
}, {
|
|
1986
1990
|
default: C(() => [
|
|
1987
|
-
L(
|
|
1991
|
+
L(t.$slots, "default")
|
|
1988
1992
|
]),
|
|
1989
1993
|
_: 3
|
|
1990
1994
|
}, 8, ["name"]));
|
|
1991
1995
|
}
|
|
1992
|
-
}),
|
|
1996
|
+
}), _n = ["data-id"], bn = ["onClick"], xn = ["innerHTML"], $n = ["innerHTML"], kn = {
|
|
1993
1997
|
key: 0,
|
|
1994
1998
|
class: "d-notification-title"
|
|
1995
|
-
},
|
|
1999
|
+
}, wn = { class: "notification-content" }, Ms = {
|
|
1996
2000
|
__name: "DNotificationProvider",
|
|
1997
2001
|
props: {
|
|
1998
2002
|
group: {
|
|
@@ -2061,68 +2065,68 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", at = [
|
|
|
2061
2065
|
}
|
|
2062
2066
|
},
|
|
2063
2067
|
emits: ["click", "destroy", "start"],
|
|
2064
|
-
setup(e, { emit:
|
|
2065
|
-
const
|
|
2068
|
+
setup(e, { emit: o }) {
|
|
2069
|
+
const t = e, n = {
|
|
2066
2070
|
IDLE: 0,
|
|
2067
2071
|
DESTROYED: 2
|
|
2068
|
-
},
|
|
2069
|
-
const { x: p, y: F } =
|
|
2072
|
+
}, s = w([]), a = w(null), r = w(cn.get("velocity")), l = m(() => t.animationType === "velocity"), i = m(() => l.value ? vn : yn), c = m(() => s.value.filter((p) => p.state !== n.DESTROYED)), u = m(() => fn(t.width)), h = m(() => {
|
|
2073
|
+
const { x: p, y: F } = gn(t.position), D = u.value.value, G = u.value.type, ne = {
|
|
2070
2074
|
width: D + G
|
|
2071
2075
|
};
|
|
2072
|
-
return F && (
|
|
2076
|
+
return F && (ne[F] = "0px"), p && (p === "center" ? ne.left = `calc(50% - ${+D / 2}${G})` : ne[p] = "0px"), ne;
|
|
2073
2077
|
}), x = m(() => "bottom" in h.value), S = (p) => {
|
|
2074
|
-
|
|
2078
|
+
o("click", p), t.closeOnClick && M(p);
|
|
2075
2079
|
}, N = () => {
|
|
2076
2080
|
var p;
|
|
2077
|
-
|
|
2081
|
+
t.pauseOnHover && ((p = a.value) == null || p.pause());
|
|
2078
2082
|
}, $ = () => {
|
|
2079
2083
|
var p;
|
|
2080
|
-
|
|
2084
|
+
t.pauseOnHover && ((p = a.value) == null || p.resume());
|
|
2081
2085
|
}, V = (p) => {
|
|
2082
|
-
if (p.group || (p.group = ""), p.data || (p.data = {}),
|
|
2086
|
+
if (p.group || (p.group = ""), p.data || (p.data = {}), t.group !== p.group)
|
|
2083
2087
|
return;
|
|
2084
2088
|
if (p.clean || p.clear) {
|
|
2085
2089
|
O();
|
|
2086
2090
|
return;
|
|
2087
2091
|
}
|
|
2088
|
-
const F = typeof p.duration == "number" ? p.duration :
|
|
2089
|
-
id: be ||
|
|
2090
|
-
title:
|
|
2092
|
+
const F = typeof p.duration == "number" ? p.duration : t.duration, D = typeof p.speed == "number" ? p.speed : t.speed, G = typeof p.ignoreDuplicates == "boolean" ? p.ignoreDuplicates : t.ignoreDuplicates, { title: ne, text: ve, type: ye, data: _e, id: be } = p, J = {
|
|
2093
|
+
id: be || mn(),
|
|
2094
|
+
title: ne,
|
|
2091
2095
|
text: ve,
|
|
2092
2096
|
type: ye,
|
|
2093
|
-
state:
|
|
2097
|
+
state: n.IDLE,
|
|
2094
2098
|
speed: D,
|
|
2095
2099
|
length: F + 2 * D,
|
|
2096
2100
|
data: _e
|
|
2097
2101
|
};
|
|
2098
|
-
F >= 0 && (a.value = new
|
|
2099
|
-
const xe =
|
|
2102
|
+
F >= 0 && (a.value = new un(() => M(J), J.length, J));
|
|
2103
|
+
const xe = t.reverse ? !x.value : x.value;
|
|
2100
2104
|
let le = -1;
|
|
2101
2105
|
const $e = c.value.some((he) => he.title === p.title && he.text === p.text);
|
|
2102
|
-
(!G || !$e) && (xe ? (
|
|
2106
|
+
(!G || !$e) && (xe ? (s.value.push(J), o("start", J), c.value.length > t.max && (le = 0)) : (s.value.unshift(J), o("start", J), c.value.length > t.max && (le = c.value.length - 1)), le !== -1 && M(c.value[le]));
|
|
2103
2107
|
}, R = (p) => {
|
|
2104
2108
|
g(p);
|
|
2105
2109
|
}, I = (p) => [
|
|
2106
2110
|
"d-notification-template",
|
|
2107
|
-
|
|
2111
|
+
t.classes,
|
|
2108
2112
|
p.type || ""
|
|
2109
2113
|
], B = (p) => l.value ? void 0 : { transition: `all ${p.speed}ms` }, M = (p) => {
|
|
2110
|
-
clearTimeout(p.timer), p.state =
|
|
2114
|
+
clearTimeout(p.timer), p.state = n.DESTROYED, z(), o("destroy", p);
|
|
2111
2115
|
}, g = (p) => {
|
|
2112
|
-
const F =
|
|
2116
|
+
const F = s.value.find((D) => D.id === p);
|
|
2113
2117
|
F && M(F);
|
|
2114
2118
|
}, O = () => {
|
|
2115
2119
|
c.value.forEach(M);
|
|
2116
2120
|
}, W = (p, F) => {
|
|
2117
2121
|
var G;
|
|
2118
|
-
const D = (G =
|
|
2122
|
+
const D = (G = t.animation) == null ? void 0 : G[p];
|
|
2119
2123
|
return typeof D == "function" ? D(F) : D;
|
|
2120
2124
|
}, P = (p, F) => {
|
|
2121
2125
|
if (!l.value)
|
|
2122
2126
|
return;
|
|
2123
2127
|
const D = W("enter", p);
|
|
2124
2128
|
r.value(p, D, {
|
|
2125
|
-
duration:
|
|
2129
|
+
duration: t.speed,
|
|
2126
2130
|
complete: F
|
|
2127
2131
|
});
|
|
2128
2132
|
}, y = (p, F) => {
|
|
@@ -2130,12 +2134,12 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", at = [
|
|
|
2130
2134
|
return;
|
|
2131
2135
|
const D = W("leave", p);
|
|
2132
2136
|
r.value(p, D, {
|
|
2133
|
-
duration:
|
|
2137
|
+
duration: t.speed,
|
|
2134
2138
|
complete: F
|
|
2135
2139
|
});
|
|
2136
2140
|
};
|
|
2137
2141
|
function z() {
|
|
2138
|
-
|
|
2142
|
+
s.value = s.value.filter((p) => p.state !== n.DESTROYED);
|
|
2139
2143
|
}
|
|
2140
2144
|
return me(() => {
|
|
2141
2145
|
q.on("notification-add", V), q.on("notification-close", R);
|
|
@@ -2172,24 +2176,24 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", at = [
|
|
|
2172
2176
|
key: 0,
|
|
2173
2177
|
class: "d-notification-title",
|
|
2174
2178
|
innerHTML: D.timer
|
|
2175
|
-
}, null, 8,
|
|
2179
|
+
}, null, 8, xn)) : k("", !0),
|
|
2176
2180
|
_("div", {
|
|
2177
2181
|
class: "notification-content",
|
|
2178
2182
|
innerHTML: D.text
|
|
2179
|
-
}, null, 8,
|
|
2183
|
+
}, null, 8, $n)
|
|
2180
2184
|
], 64)) : (d(), f(ie, { key: 1 }, [
|
|
2181
|
-
D.title ? (d(), f("div",
|
|
2182
|
-
_("div",
|
|
2185
|
+
D.title ? (d(), f("div", kn, A(D.title), 1)) : k("", !0),
|
|
2186
|
+
_("div", wn, A(D.text), 1)
|
|
2183
2187
|
], 64))
|
|
2184
|
-
], 10,
|
|
2188
|
+
], 10, bn)
|
|
2185
2189
|
])
|
|
2186
|
-
], 44,
|
|
2190
|
+
], 44, _n))), 128))
|
|
2187
2191
|
]),
|
|
2188
2192
|
_: 3
|
|
2189
2193
|
}, 40, ["name"]))
|
|
2190
2194
|
], 4));
|
|
2191
2195
|
}
|
|
2192
|
-
},
|
|
2196
|
+
}, Sn = { class: "d-info-progress-icon-container" }, Dn = { class: "d-info-progress-icon" }, Tn = { class: "d-info-progress-data-container" }, Ln = ["innerHTML"], Ns = {
|
|
2193
2197
|
__name: "DInfoProgress",
|
|
2194
2198
|
props: {
|
|
2195
2199
|
style: [String, Object],
|
|
@@ -2199,38 +2203,38 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", at = [
|
|
|
2199
2203
|
type: String
|
|
2200
2204
|
},
|
|
2201
2205
|
emits: ["click"],
|
|
2202
|
-
setup(e, { emit:
|
|
2203
|
-
const
|
|
2204
|
-
return (
|
|
2205
|
-
class: T(["d-info-progress",
|
|
2206
|
-
style: H(
|
|
2206
|
+
setup(e, { emit: o }) {
|
|
2207
|
+
const t = e, n = m(() => t.icon ? ee.getters.getIcon(t.icon) : null);
|
|
2208
|
+
return (s, a) => (d(), f("div", {
|
|
2209
|
+
class: T(["d-info-progress", t.type ? `d-info-progress-${t.type}` : null]),
|
|
2210
|
+
style: H(t.style),
|
|
2207
2211
|
onClick: a[0] || (a[0] = (r) => {
|
|
2208
|
-
|
|
2212
|
+
o("click", r);
|
|
2209
2213
|
})
|
|
2210
2214
|
}, [
|
|
2211
|
-
_("div",
|
|
2212
|
-
_("div",
|
|
2213
|
-
|
|
2215
|
+
_("div", Sn, [
|
|
2216
|
+
_("div", Dn, [
|
|
2217
|
+
t.icon ? (d(), b(Y(de), {
|
|
2214
2218
|
key: 0,
|
|
2215
|
-
component:
|
|
2219
|
+
component: n.value,
|
|
2216
2220
|
color: "inherit",
|
|
2217
2221
|
size: 17
|
|
2218
2222
|
}, null, 8, ["component"])) : k("", !0)
|
|
2219
2223
|
])
|
|
2220
2224
|
]),
|
|
2221
|
-
_("div",
|
|
2225
|
+
_("div", Tn, [
|
|
2222
2226
|
_("div", {
|
|
2223
2227
|
class: "d-info-progress-line",
|
|
2224
|
-
style: H("width: " +
|
|
2228
|
+
style: H("width: " + t.progress + "%;")
|
|
2225
2229
|
}, null, 4),
|
|
2226
2230
|
_("div", {
|
|
2227
2231
|
class: "d-info-progress-label",
|
|
2228
2232
|
innerHTML: e.label
|
|
2229
|
-
}, null, 8,
|
|
2233
|
+
}, null, 8, Ln)
|
|
2230
2234
|
])
|
|
2231
2235
|
], 6));
|
|
2232
2236
|
}
|
|
2233
|
-
},
|
|
2237
|
+
}, Cn = { class: "d-checkbox" }, In = ["id", "checked", "disabled"], En = ["for"], Rs = {
|
|
2234
2238
|
__name: "DCheckbox",
|
|
2235
2239
|
props: {
|
|
2236
2240
|
label: String,
|
|
@@ -2243,45 +2247,45 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", at = [
|
|
|
2243
2247
|
checked: Boolean
|
|
2244
2248
|
},
|
|
2245
2249
|
emits: ["update:modelValue"],
|
|
2246
|
-
setup(e, { emit:
|
|
2247
|
-
const
|
|
2248
|
-
get: () =>
|
|
2250
|
+
setup(e, { emit: o }) {
|
|
2251
|
+
const t = e, s = ht().uid, a = m({
|
|
2252
|
+
get: () => t.modelValue,
|
|
2249
2253
|
set: (r) => {
|
|
2250
|
-
|
|
2254
|
+
o("update:modelValue", r);
|
|
2251
2255
|
}
|
|
2252
2256
|
});
|
|
2253
|
-
return (r, l) => (d(), f("div",
|
|
2257
|
+
return (r, l) => (d(), f("div", Cn, [
|
|
2254
2258
|
te(_("input", {
|
|
2255
2259
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => a.value = i),
|
|
2256
|
-
id: `i-${E(
|
|
2260
|
+
id: `i-${E(s)}`,
|
|
2257
2261
|
type: "checkbox",
|
|
2258
|
-
checked:
|
|
2259
|
-
disabled:
|
|
2260
|
-
onChange: l[1] || (l[1] = (...i) =>
|
|
2261
|
-
}, null, 40,
|
|
2262
|
+
checked: t.checked,
|
|
2263
|
+
disabled: t.disabled,
|
|
2264
|
+
onChange: l[1] || (l[1] = (...i) => t.change && t.change(...i))
|
|
2265
|
+
}, null, 40, In), [
|
|
2262
2266
|
[Mt, a.value]
|
|
2263
2267
|
]),
|
|
2264
2268
|
_("label", {
|
|
2265
|
-
for: `i-${E(
|
|
2266
|
-
}, A(
|
|
2269
|
+
for: `i-${E(s)}`
|
|
2270
|
+
}, A(t.label), 9, En)
|
|
2267
2271
|
]));
|
|
2268
2272
|
}
|
|
2269
2273
|
};
|
|
2270
|
-
async function
|
|
2271
|
-
return await $t(Qo, { title: e, message:
|
|
2274
|
+
async function Bn(e, o) {
|
|
2275
|
+
return await $t(Qo, { title: e, message: o });
|
|
2272
2276
|
}
|
|
2273
|
-
async function
|
|
2274
|
-
return await $t(Ko, { title: e, message:
|
|
2277
|
+
async function Mn(e, o) {
|
|
2278
|
+
return await $t(Ko, { title: e, message: o });
|
|
2275
2279
|
}
|
|
2276
|
-
const
|
|
2280
|
+
const Os = {
|
|
2277
2281
|
__name: "DDialogProvider",
|
|
2278
2282
|
setup(e) {
|
|
2279
|
-
return window.alert =
|
|
2283
|
+
return window.alert = Mn, window.confirm = Bn, (o, t) => (d(), b(E(Go)));
|
|
2280
2284
|
}
|
|
2281
|
-
},
|
|
2285
|
+
}, Nn = { class: "d-select" }, Rn = {
|
|
2282
2286
|
key: 0,
|
|
2283
2287
|
class: "label"
|
|
2284
|
-
},
|
|
2288
|
+
}, On = ["value", "selected", "disabled"], As = {
|
|
2285
2289
|
__name: "DSelect",
|
|
2286
2290
|
props: {
|
|
2287
2291
|
label: String,
|
|
@@ -2292,81 +2296,81 @@ const On = {
|
|
|
2292
2296
|
// small, larger
|
|
2293
2297
|
},
|
|
2294
2298
|
emits: ["update:modelValue"],
|
|
2295
|
-
setup(e, { emit:
|
|
2296
|
-
const
|
|
2297
|
-
get: () =>
|
|
2299
|
+
setup(e, { emit: o }) {
|
|
2300
|
+
const t = e, n = m(() => t.scale ? "d-select-" + t.scale : ""), s = m({
|
|
2301
|
+
get: () => t.modelValue,
|
|
2298
2302
|
set: (a) => {
|
|
2299
|
-
|
|
2303
|
+
o("update:modelValue", a);
|
|
2300
2304
|
}
|
|
2301
2305
|
});
|
|
2302
|
-
for (let a = 0; a <
|
|
2303
|
-
if (
|
|
2304
|
-
|
|
2306
|
+
for (let a = 0; a < t.options.length; a++)
|
|
2307
|
+
if (t.options[a].selected) {
|
|
2308
|
+
s.value = t.options[a].value;
|
|
2305
2309
|
break;
|
|
2306
2310
|
}
|
|
2307
|
-
return (a, r) => (d(), f("div",
|
|
2308
|
-
|
|
2311
|
+
return (a, r) => (d(), f("div", Nn, [
|
|
2312
|
+
t.label ? (d(), f("div", Rn, A(t.label), 1)) : k("", !0),
|
|
2309
2313
|
te(_("select", {
|
|
2310
|
-
"onUpdate:modelValue": r[0] || (r[0] = (l) =>
|
|
2311
|
-
class: T(
|
|
2312
|
-
style: H(
|
|
2314
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => s.value = l),
|
|
2315
|
+
class: T(n.value),
|
|
2316
|
+
style: H(t.size === "wide" ? "width:100%" : "")
|
|
2313
2317
|
}, [
|
|
2314
|
-
(d(!0), f(ie, null, ge(
|
|
2318
|
+
(d(!0), f(ie, null, ge(t.options, (l, i) => (d(), f("option", {
|
|
2315
2319
|
key: i,
|
|
2316
2320
|
value: l.value,
|
|
2317
2321
|
selected: l.selected,
|
|
2318
2322
|
disabled: l.disabled
|
|
2319
|
-
}, A(l.label), 9,
|
|
2323
|
+
}, A(l.label), 9, On))), 128))
|
|
2320
2324
|
], 6), [
|
|
2321
|
-
[Nt,
|
|
2325
|
+
[Nt, s.value]
|
|
2322
2326
|
])
|
|
2323
2327
|
]));
|
|
2324
2328
|
}
|
|
2325
|
-
},
|
|
2329
|
+
}, An = ["title"], Hn = ["title"], Vn = {
|
|
2326
2330
|
__name: "DTabLabel",
|
|
2327
2331
|
props: {
|
|
2328
2332
|
tab: Object
|
|
2329
2333
|
},
|
|
2330
2334
|
setup(e) {
|
|
2331
|
-
const
|
|
2332
|
-
return (
|
|
2335
|
+
const o = e;
|
|
2336
|
+
return (t, n) => o.tab.label ? (d(), f("span", {
|
|
2333
2337
|
key: 0,
|
|
2334
|
-
title:
|
|
2335
|
-
}, A(
|
|
2338
|
+
title: o.tab.title ? o.tab.title : ""
|
|
2339
|
+
}, A(o.tab.label), 9, An)) : o.tab.icon ? (d(), f("span", {
|
|
2336
2340
|
key: 1,
|
|
2337
|
-
title:
|
|
2341
|
+
title: o.tab.title ? o.tab.title : ""
|
|
2338
2342
|
}, [
|
|
2339
2343
|
oe(E(de), {
|
|
2340
|
-
component:
|
|
2344
|
+
component: o.tab.icon
|
|
2341
2345
|
}, null, 8, ["component"])
|
|
2342
|
-
], 8,
|
|
2346
|
+
], 8, Hn)) : k("", !0);
|
|
2343
2347
|
}
|
|
2344
2348
|
};
|
|
2345
|
-
const
|
|
2349
|
+
const zn = { class: "d-tabs" }, Fn = {
|
|
2346
2350
|
__name: "DTabs",
|
|
2347
2351
|
props: {
|
|
2348
2352
|
tabs: Array
|
|
2349
2353
|
},
|
|
2350
2354
|
setup(e) {
|
|
2351
|
-
const
|
|
2352
|
-
|
|
2355
|
+
const t = Rt(e, "tabs"), n = w(0), s = (a) => {
|
|
2356
|
+
n.value = a;
|
|
2353
2357
|
};
|
|
2354
2358
|
return (a, r) => (d(), f(ie, null, [
|
|
2355
|
-
_("div",
|
|
2356
|
-
(d(!0), f(ie, null, ge(
|
|
2359
|
+
_("div", zn, [
|
|
2360
|
+
(d(!0), f(ie, null, ge(t.value, (l, i) => (d(), b(Vn, {
|
|
2357
2361
|
index: i,
|
|
2358
2362
|
tab: l,
|
|
2359
|
-
class: T(["d-tab-title", i ===
|
|
2360
|
-
onClick: (c) =>
|
|
2363
|
+
class: T(["d-tab-title", i === n.value ? "active" : ""]),
|
|
2364
|
+
onClick: (c) => s(i)
|
|
2361
2365
|
}, null, 8, ["index", "tab", "class", "onClick"]))), 256))
|
|
2362
2366
|
]),
|
|
2363
2367
|
(d(), b(Ot, null, [
|
|
2364
|
-
(d(), b(Y(
|
|
2368
|
+
(d(), b(Y(t.value[n.value].component)))
|
|
2365
2369
|
], 1024))
|
|
2366
2370
|
], 64));
|
|
2367
2371
|
}
|
|
2368
|
-
},
|
|
2369
|
-
const
|
|
2372
|
+
}, Hs = /* @__PURE__ */ re(Fn, [["__scopeId", "data-v-c98761cd"]]);
|
|
2373
|
+
const Wn = { class: "d-grid" }, Pn = {
|
|
2370
2374
|
__name: "DGrid",
|
|
2371
2375
|
props: {
|
|
2372
2376
|
gap: {
|
|
@@ -2384,7 +2388,7 @@ const Fs = { class: "d-grid" }, Ws = {
|
|
|
2384
2388
|
colXxl: String
|
|
2385
2389
|
},
|
|
2386
2390
|
setup(e) {
|
|
2387
|
-
const
|
|
2391
|
+
const o = e;
|
|
2388
2392
|
Ae((u) => ({
|
|
2389
2393
|
"09eba472": i[0],
|
|
2390
2394
|
"09eba434": i[1],
|
|
@@ -2392,17 +2396,17 @@ const Fs = { class: "d-grid" }, Ws = {
|
|
|
2392
2396
|
"09eba3b8": i[3],
|
|
2393
2397
|
"09eba37a": i[4],
|
|
2394
2398
|
"09eba33c": i[5],
|
|
2395
|
-
"898eb2ac":
|
|
2399
|
+
"898eb2ac": o.gap
|
|
2396
2400
|
}));
|
|
2397
|
-
const { colXs:
|
|
2401
|
+
const { colXs: t, colSm: n, colMd: s, colLg: a, colXl: r, colXxl: l } = At(o), i = [t.value, n.value, s.value, a.value, r.value, l.value];
|
|
2398
2402
|
let c = null;
|
|
2399
2403
|
for (let u = 0; u < i.length; u++)
|
|
2400
2404
|
c || (c = i[0]), u > 0 && (i[u] ? c = i[u] : i[u] = c);
|
|
2401
|
-
return (u, h) => (d(), f("div",
|
|
2405
|
+
return (u, h) => (d(), f("div", Wn, [
|
|
2402
2406
|
L(u.$slots, "default", {}, void 0, !0)
|
|
2403
2407
|
]));
|
|
2404
2408
|
}
|
|
2405
|
-
},
|
|
2409
|
+
}, Vs = /* @__PURE__ */ re(Pn, [["__scopeId", "data-v-b45e8130"]]), jn = ["src", "alt", "title"], zs = {
|
|
2406
2410
|
__name: "DImage",
|
|
2407
2411
|
props: {
|
|
2408
2412
|
src: String,
|
|
@@ -2414,26 +2418,26 @@ const Fs = { class: "d-grid" }, Ws = {
|
|
|
2414
2418
|
radius: String
|
|
2415
2419
|
},
|
|
2416
2420
|
setup(e) {
|
|
2417
|
-
const
|
|
2418
|
-
return
|
|
2419
|
-
|
|
2420
|
-
},
|
|
2421
|
-
|
|
2421
|
+
const o = e, t = w(null), n = new Image();
|
|
2422
|
+
return n.onload = () => {
|
|
2423
|
+
t.value = n.src;
|
|
2424
|
+
}, n.onerror = () => {
|
|
2425
|
+
t.value = o.srcFail;
|
|
2422
2426
|
}, me(() => {
|
|
2423
|
-
|
|
2424
|
-
}), (
|
|
2427
|
+
n.src = o.src;
|
|
2428
|
+
}), (s, a) => t.value ? (d(), f("img", {
|
|
2425
2429
|
key: 0,
|
|
2426
|
-
src:
|
|
2427
|
-
alt:
|
|
2428
|
-
title:
|
|
2429
|
-
style: H({ width:
|
|
2430
|
-
}, null, 12,
|
|
2430
|
+
src: t.value,
|
|
2431
|
+
alt: o.alt,
|
|
2432
|
+
title: o.title,
|
|
2433
|
+
style: H({ width: o.width, height: o.height, borderRadius: o.radius })
|
|
2434
|
+
}, null, 12, jn)) : k("", !0);
|
|
2431
2435
|
}
|
|
2432
2436
|
};
|
|
2433
|
-
const
|
|
2437
|
+
const Xn = { class: "d-textarea" }, Yn = {
|
|
2434
2438
|
key: 0,
|
|
2435
2439
|
class: "label"
|
|
2436
|
-
},
|
|
2440
|
+
}, Un = ["rows", "cols", "placeholder"], qn = {
|
|
2437
2441
|
__name: "DTextarea",
|
|
2438
2442
|
props: {
|
|
2439
2443
|
label: String,
|
|
@@ -2452,164 +2456,164 @@ const js = { class: "d-textarea" }, Xs = {
|
|
|
2452
2456
|
focus: Boolean
|
|
2453
2457
|
},
|
|
2454
2458
|
emits: ["update:modelValue"],
|
|
2455
|
-
setup(e, { expose:
|
|
2456
|
-
const
|
|
2457
|
-
get: () =>
|
|
2459
|
+
setup(e, { expose: o, emit: t }) {
|
|
2460
|
+
const n = e, s = w(null), a = m(() => n.scale === "small" ? "d-textarea-small" : n.scale === "large" ? "d-textarea-large" : ""), r = m({
|
|
2461
|
+
get: () => n.modelValue,
|
|
2458
2462
|
set: (i) => {
|
|
2459
|
-
|
|
2463
|
+
t("update:modelValue", i);
|
|
2460
2464
|
}
|
|
2461
2465
|
});
|
|
2462
2466
|
me(() => {
|
|
2463
|
-
|
|
2467
|
+
n.focus && l();
|
|
2464
2468
|
});
|
|
2465
2469
|
const l = () => {
|
|
2466
|
-
|
|
2470
|
+
s.value.focus();
|
|
2467
2471
|
};
|
|
2468
|
-
return
|
|
2472
|
+
return o({
|
|
2469
2473
|
focus: l
|
|
2470
|
-
}), (i, c) => (d(), f("div",
|
|
2471
|
-
|
|
2474
|
+
}), (i, c) => (d(), f("div", Xn, [
|
|
2475
|
+
n.label ? (d(), f("div", Yn, A(n.label), 1)) : k("", !0),
|
|
2472
2476
|
te(_("textarea", {
|
|
2473
2477
|
ref_key: "inputRef",
|
|
2474
|
-
ref:
|
|
2478
|
+
ref: s,
|
|
2475
2479
|
"onUpdate:modelValue": c[0] || (c[0] = (u) => r.value = u),
|
|
2476
|
-
rows:
|
|
2477
|
-
cols:
|
|
2478
|
-
placeholder:
|
|
2480
|
+
rows: n.rows,
|
|
2481
|
+
cols: n.cols,
|
|
2482
|
+
placeholder: n.placeholder,
|
|
2479
2483
|
class: T(a.value),
|
|
2480
2484
|
style: { width: "100%" }
|
|
2481
|
-
}, null, 10,
|
|
2485
|
+
}, null, 10, Un), [
|
|
2482
2486
|
[Ht, r.value]
|
|
2483
2487
|
])
|
|
2484
2488
|
]));
|
|
2485
2489
|
}
|
|
2486
|
-
},
|
|
2487
|
-
class
|
|
2488
|
-
constructor(
|
|
2489
|
-
this.fields =
|
|
2490
|
+
}, Fs = /* @__PURE__ */ re(qn, [["__scopeId", "data-v-0e805d5d"]]);
|
|
2491
|
+
class Ws {
|
|
2492
|
+
constructor(o) {
|
|
2493
|
+
this.fields = o;
|
|
2490
2494
|
}
|
|
2491
2495
|
validate() {
|
|
2492
|
-
let
|
|
2493
|
-
for (let
|
|
2494
|
-
this.fields[
|
|
2495
|
-
return !
|
|
2496
|
+
let o = !1;
|
|
2497
|
+
for (let t in this.fields)
|
|
2498
|
+
this.fields[t].ref.value.validate() === !0 && (o = !0);
|
|
2499
|
+
return !o;
|
|
2496
2500
|
}
|
|
2497
2501
|
}
|
|
2498
|
-
class
|
|
2499
|
-
validate(
|
|
2500
|
-
return this._isValidURL(
|
|
2502
|
+
class Gn {
|
|
2503
|
+
validate(o, t = "https") {
|
|
2504
|
+
return this._isValidURL(o) || (o = t + "://" + o), this._isValidURL(o);
|
|
2501
2505
|
}
|
|
2502
|
-
message(
|
|
2503
|
-
let
|
|
2504
|
-
switch (
|
|
2506
|
+
message(o, t) {
|
|
2507
|
+
let n = "";
|
|
2508
|
+
switch (o) {
|
|
2505
2509
|
case "url":
|
|
2506
|
-
|
|
2510
|
+
n = t;
|
|
2507
2511
|
break;
|
|
2508
2512
|
}
|
|
2509
|
-
return
|
|
2513
|
+
return n;
|
|
2510
2514
|
}
|
|
2511
|
-
_isValidURL(
|
|
2515
|
+
_isValidURL(o) {
|
|
2512
2516
|
try {
|
|
2513
|
-
return new URL(
|
|
2517
|
+
return new URL(o), !0;
|
|
2514
2518
|
} catch {
|
|
2515
2519
|
return !1;
|
|
2516
2520
|
}
|
|
2517
2521
|
}
|
|
2518
2522
|
}
|
|
2519
|
-
const
|
|
2520
|
-
class
|
|
2521
|
-
validate(
|
|
2522
|
-
return
|
|
2523
|
+
const Zn = new Gn();
|
|
2524
|
+
class Kn {
|
|
2525
|
+
validate(o = "") {
|
|
2526
|
+
return o !== "";
|
|
2523
2527
|
}
|
|
2524
|
-
message(
|
|
2525
|
-
return
|
|
2528
|
+
message(o) {
|
|
2529
|
+
return o;
|
|
2526
2530
|
}
|
|
2527
2531
|
}
|
|
2528
|
-
const
|
|
2529
|
-
class
|
|
2530
|
-
validate(
|
|
2531
|
-
return
|
|
2532
|
+
const Jn = new Kn();
|
|
2533
|
+
class Qn {
|
|
2534
|
+
validate(o = "", t = 0) {
|
|
2535
|
+
return o.length >= t;
|
|
2532
2536
|
}
|
|
2533
|
-
message(
|
|
2534
|
-
return
|
|
2537
|
+
message(o) {
|
|
2538
|
+
return o;
|
|
2535
2539
|
}
|
|
2536
2540
|
}
|
|
2537
|
-
const
|
|
2538
|
-
class
|
|
2539
|
-
validate(
|
|
2540
|
-
return
|
|
2541
|
+
const es = new Qn();
|
|
2542
|
+
class ts {
|
|
2543
|
+
validate(o = "", t = 0) {
|
|
2544
|
+
return o.length <= t;
|
|
2541
2545
|
}
|
|
2542
|
-
message(
|
|
2543
|
-
return
|
|
2546
|
+
message(o) {
|
|
2547
|
+
return o;
|
|
2544
2548
|
}
|
|
2545
2549
|
}
|
|
2546
|
-
const
|
|
2547
|
-
class
|
|
2548
|
-
validate(
|
|
2549
|
-
return /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(
|
|
2550
|
+
const os = new ts();
|
|
2551
|
+
class ns {
|
|
2552
|
+
validate(o) {
|
|
2553
|
+
return /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(o);
|
|
2550
2554
|
}
|
|
2551
|
-
message(
|
|
2552
|
-
return
|
|
2555
|
+
message(o) {
|
|
2556
|
+
return o;
|
|
2553
2557
|
}
|
|
2554
2558
|
}
|
|
2555
|
-
const
|
|
2556
|
-
class
|
|
2557
|
-
validate(
|
|
2558
|
-
return !isNaN(parseFloat(
|
|
2559
|
+
const ss = new ns();
|
|
2560
|
+
class as {
|
|
2561
|
+
validate(o) {
|
|
2562
|
+
return !isNaN(parseFloat(o)) && !isNaN(o - 0);
|
|
2559
2563
|
}
|
|
2560
|
-
message(
|
|
2561
|
-
return
|
|
2564
|
+
message(o) {
|
|
2565
|
+
return o;
|
|
2562
2566
|
}
|
|
2563
2567
|
}
|
|
2564
|
-
const
|
|
2565
|
-
RulesUrl:
|
|
2566
|
-
RulesRequired:
|
|
2567
|
-
RulesMin:
|
|
2568
|
-
RulesMax:
|
|
2569
|
-
RulesEmail:
|
|
2570
|
-
RulesNumber:
|
|
2568
|
+
const is = new as(), U = {
|
|
2569
|
+
RulesUrl: Zn,
|
|
2570
|
+
RulesRequired: Jn,
|
|
2571
|
+
RulesMin: es,
|
|
2572
|
+
RulesMax: os,
|
|
2573
|
+
RulesEmail: ss,
|
|
2574
|
+
RulesNumber: is
|
|
2571
2575
|
};
|
|
2572
|
-
class
|
|
2573
|
-
validate(
|
|
2574
|
-
var
|
|
2575
|
-
let
|
|
2576
|
-
if (
|
|
2576
|
+
class rs {
|
|
2577
|
+
validate(o, t) {
|
|
2578
|
+
var s, a, r, l, i, c, u, h, x, S, N, $, V, R;
|
|
2579
|
+
let n = "";
|
|
2580
|
+
if (t) {
|
|
2577
2581
|
let I = !1;
|
|
2578
|
-
for (let B in
|
|
2582
|
+
for (let B in t)
|
|
2579
2583
|
if (!I)
|
|
2580
2584
|
switch (B) {
|
|
2581
2585
|
case "url":
|
|
2582
|
-
|
|
2586
|
+
n = U.RulesUrl.validate(o, "https") || o.length === 0 ? "" : U.RulesUrl.message("url", (s = t[B]) != null && s.message ? (a = t[B]) == null ? void 0 : a.message : "url_incorrect"), I = n !== "";
|
|
2583
2587
|
break;
|
|
2584
2588
|
case "required":
|
|
2585
|
-
|
|
2589
|
+
n = U.RulesRequired.validate(o) ? "" : U.RulesRequired.message((r = t[B]) != null && r.message ? (l = t[B]) == null ? void 0 : l.message : "required"), I = n !== "";
|
|
2586
2590
|
break;
|
|
2587
2591
|
case "min":
|
|
2588
|
-
|
|
2592
|
+
n = U.RulesMin.validate(o, (i = t[B]) == null ? void 0 : i.value) ? "" : U.RulesMin.message((c = t[B]) != null && c.message ? (u = t[B]) == null ? void 0 : u.message : "very_small"), I = n !== "";
|
|
2589
2593
|
break;
|
|
2590
2594
|
case "max":
|
|
2591
|
-
|
|
2595
|
+
n = U.RulesMax.validate(o, (h = t[B]) == null ? void 0 : h.value) ? "" : U.RulesMax.message((x = t[B]) != null && x.message ? (S = t[B]) == null ? void 0 : S.message : "vary_large"), I = n !== "";
|
|
2592
2596
|
break;
|
|
2593
2597
|
case "email":
|
|
2594
|
-
|
|
2598
|
+
n = U.RulesEmail.validate(o) ? "" : U.RulesMax.message((N = t[B]) != null && N.message ? ($ = t[B]) == null ? void 0 : $.message : "email_incorrect"), I = n !== "";
|
|
2595
2599
|
break;
|
|
2596
2600
|
case "number":
|
|
2597
|
-
|
|
2598
|
-
(V =
|
|
2599
|
-
), I =
|
|
2601
|
+
n = U.RulesNumber.validate(o) ? "" : U.RulesNumber.message(
|
|
2602
|
+
(V = t[B]) != null && V.message ? (R = t[B]) == null ? void 0 : R.message : "number_incorrect"
|
|
2603
|
+
), I = n !== "";
|
|
2600
2604
|
break;
|
|
2601
2605
|
}
|
|
2602
2606
|
}
|
|
2603
|
-
return
|
|
2607
|
+
return n;
|
|
2604
2608
|
}
|
|
2605
2609
|
}
|
|
2606
|
-
const
|
|
2610
|
+
const ls = new rs(), ds = { style: { display: "flex", "flex-direction": "column" } }, cs = {
|
|
2607
2611
|
key: 0,
|
|
2608
2612
|
class: "d-label"
|
|
2609
|
-
},
|
|
2613
|
+
}, us = {
|
|
2610
2614
|
key: 0,
|
|
2611
2615
|
class: "text-red"
|
|
2612
|
-
},
|
|
2616
|
+
}, ps = { style: { display: "flex", "flex-direction": "row" } }, fs = { style: { flex: "1", position: "relative" } }, ms = /* @__PURE__ */ _("svg", {
|
|
2613
2617
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2614
2618
|
viewBox: "0 0 24 24"
|
|
2615
2619
|
}, [
|
|
@@ -2617,9 +2621,9 @@ const ln = new rn(), dn = { style: { display: "flex", "flex-direction": "column"
|
|
|
2617
2621
|
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",
|
|
2618
2622
|
fill: "currentColor"
|
|
2619
2623
|
})
|
|
2620
|
-
], -1),
|
|
2621
|
-
|
|
2622
|
-
],
|
|
2624
|
+
], -1), hs = [
|
|
2625
|
+
ms
|
|
2626
|
+
], gs = ["id", "type", "placeholder", "disabled"], vs = /* @__PURE__ */ _("svg", {
|
|
2623
2627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2624
2628
|
viewBox: "0 0 24 24"
|
|
2625
2629
|
}, [
|
|
@@ -2627,15 +2631,15 @@ const ln = new rn(), dn = { style: { display: "flex", "flex-direction": "column"
|
|
|
2627
2631
|
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",
|
|
2628
2632
|
fill: "currentColor"
|
|
2629
2633
|
})
|
|
2630
|
-
], -1),
|
|
2631
|
-
|
|
2632
|
-
],
|
|
2634
|
+
], -1), ys = [
|
|
2635
|
+
vs
|
|
2636
|
+
], _s = {
|
|
2633
2637
|
key: 1,
|
|
2634
2638
|
class: "d-help"
|
|
2635
|
-
},
|
|
2639
|
+
}, bs = {
|
|
2636
2640
|
key: 2,
|
|
2637
2641
|
class: "d-error text-red"
|
|
2638
|
-
},
|
|
2642
|
+
}, Ps = {
|
|
2639
2643
|
__name: "DInputString",
|
|
2640
2644
|
props: {
|
|
2641
2645
|
form: Object,
|
|
@@ -2658,18 +2662,18 @@ const ln = new rn(), dn = { style: { display: "flex", "flex-direction": "column"
|
|
|
2658
2662
|
disabled: Boolean
|
|
2659
2663
|
},
|
|
2660
2664
|
emits: ["update:modelValue", "input"],
|
|
2661
|
-
setup(e, { expose:
|
|
2662
|
-
const
|
|
2665
|
+
setup(e, { expose: o, emit: t }) {
|
|
2666
|
+
const n = e, s = w(n.error), a = Vt(), r = w(!1), l = w(null);
|
|
2663
2667
|
//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
2664
2668
|
const i = m({
|
|
2665
|
-
get: () =>
|
|
2669
|
+
get: () => n.modelValue,
|
|
2666
2670
|
//props.form?.fields[props.name].model.value,
|
|
2667
2671
|
set: (R) => {
|
|
2668
|
-
|
|
2672
|
+
t("update:modelValue", R);
|
|
2669
2673
|
}
|
|
2670
|
-
}), c = m(() =>
|
|
2671
|
-
|
|
2672
|
-
}, x = () => (
|
|
2674
|
+
}), c = m(() => n.type === "password" ? "password" : "text"), u = m(() => n.scale), h = (R) => {
|
|
2675
|
+
t("input", R), x();
|
|
2676
|
+
}, x = () => (s.value = ls.validate(i.value, n.form.fields[n.name].rules), !!s.value);
|
|
2673
2677
|
me(() => {
|
|
2674
2678
|
S();
|
|
2675
2679
|
});
|
|
@@ -2681,42 +2685,42 @@ const ln = new rn(), dn = { style: { display: "flex", "flex-direction": "column"
|
|
|
2681
2685
|
}, $ = (R) => {
|
|
2682
2686
|
r.value = R;
|
|
2683
2687
|
};
|
|
2684
|
-
return
|
|
2688
|
+
return o({
|
|
2685
2689
|
focus: S,
|
|
2686
2690
|
setError: (R) => {
|
|
2687
|
-
|
|
2691
|
+
s.value = R;
|
|
2688
2692
|
},
|
|
2689
2693
|
validate: x
|
|
2690
2694
|
}), (R, I) => {
|
|
2691
|
-
var B, M, g, O, W, P, y, z, p, F, D, G,
|
|
2695
|
+
var B, M, g, O, W, P, y, z, p, F, D, G, ne, ve, ye, _e, be, J, xe, le, $e, Ce, he, Fe, We, Pe, je, Xe, Ye, Ue, qe, Ge, Ze, Ke, Je, Qe, et, tt, ot;
|
|
2692
2696
|
return d(), f("div", {
|
|
2693
2697
|
class: T(["d-input-string", u.value])
|
|
2694
2698
|
}, [
|
|
2695
|
-
_("div",
|
|
2696
|
-
|
|
2697
|
-
K(A(
|
|
2698
|
-
(B =
|
|
2699
|
+
_("div", ds, [
|
|
2700
|
+
n.label ? (d(), f("div", cs, [
|
|
2701
|
+
K(A(n.label), 1),
|
|
2702
|
+
(B = n.form) != null && B.fields[n.name].rules && n.form.fields[n.name].rules.hasOwnProperty("required") ? (d(), f("span", us, "*")) : k("", !0)
|
|
2699
2703
|
])) : k("", !0),
|
|
2700
|
-
_("div",
|
|
2701
|
-
(g = (M =
|
|
2704
|
+
_("div", ps, [
|
|
2705
|
+
(g = (M = n.pre) == null ? void 0 : M.outside) != null && g.component ? (d(), f("div", {
|
|
2702
2706
|
key: 0,
|
|
2703
|
-
class: T(["d-pre",
|
|
2707
|
+
class: T(["d-pre", n.disabled ? "disabled" : ""])
|
|
2704
2708
|
}, [
|
|
2705
|
-
(d(), b(Y((W = (O =
|
|
2706
|
-
], 2)) : (y = (P =
|
|
2709
|
+
(d(), b(Y((W = (O = n.pre) == null ? void 0 : O.outside) == null ? void 0 : W.component)))
|
|
2710
|
+
], 2)) : (y = (P = n.pre) == null ? void 0 : P.outside) != null && y.text ? (d(), f("div", {
|
|
2707
2711
|
key: 1,
|
|
2708
|
-
class: T(["d-pre",
|
|
2712
|
+
class: T(["d-pre", n.disabled ? "disabled" : ""])
|
|
2709
2713
|
}, [
|
|
2710
2714
|
_("div", {
|
|
2711
2715
|
class: T(["d-text", r.value ? "focused" : ""])
|
|
2712
|
-
}, A((p = (z =
|
|
2716
|
+
}, A((p = (z = n.pre) == null ? void 0 : z.outside) == null ? void 0 : p.text), 3)
|
|
2713
2717
|
], 2)) : k("", !0),
|
|
2714
|
-
_("div",
|
|
2715
|
-
(D = (F =
|
|
2718
|
+
_("div", fs, [
|
|
2719
|
+
(D = (F = n.pre) == null ? void 0 : F.inside) != null && D.action && ((ne = (G = n.pre) == null ? void 0 : G.inside) == null ? void 0 : ne.action) === "clear" && ((ve = i.value) == null ? void 0 : ve.length) > 0 ? (d(), f("div", {
|
|
2716
2720
|
key: 0,
|
|
2717
2721
|
class: "d-pre-inside-button",
|
|
2718
2722
|
onClick: N
|
|
2719
|
-
},
|
|
2723
|
+
}, hs)) : k("", !0),
|
|
2720
2724
|
te(_("input", {
|
|
2721
2725
|
id: E(a),
|
|
2722
2726
|
ref_key: "inputRef",
|
|
@@ -2724,43 +2728,43 @@ const ln = new rn(), dn = { style: { display: "flex", "flex-direction": "column"
|
|
|
2724
2728
|
"onUpdate:modelValue": I[0] || (I[0] = (Ie) => i.value = Ie),
|
|
2725
2729
|
style: { width: "100%" },
|
|
2726
2730
|
type: c.value,
|
|
2727
|
-
placeholder:
|
|
2731
|
+
placeholder: n.placeholder,
|
|
2728
2732
|
onInput: h,
|
|
2729
2733
|
onFocus: I[1] || (I[1] = (Ie) => $(!0)),
|
|
2730
2734
|
onFocusout: I[2] || (I[2] = (Ie) => $(!1)),
|
|
2731
2735
|
class: T([
|
|
2732
|
-
(_e = (ye =
|
|
2733
|
-
(le = (xe =
|
|
2734
|
-
(Fe = (he =
|
|
2735
|
-
(Pe = (We =
|
|
2736
|
+
(_e = (ye = n.pre) == null ? void 0 : ye.outside) != null && _e.component || (J = (be = n.pre) == null ? void 0 : be.outside) != null && J.text ? "has-pre" : "",
|
|
2737
|
+
(le = (xe = n.post) == null ? void 0 : xe.outside) != null && le.component || (Ce = ($e = n.post) == null ? void 0 : $e.outside) != null && Ce.text ? "has-post" : "",
|
|
2738
|
+
(Fe = (he = n.pre) == null ? void 0 : he.inside) != null && Fe.action ? "has-pre-inside-button" : "",
|
|
2739
|
+
(Pe = (We = n.post) == null ? void 0 : We.inside) != null && Pe.action ? "has-post-inside-button" : "",
|
|
2736
2740
|
r.value ? "focused" : ""
|
|
2737
2741
|
]),
|
|
2738
|
-
disabled:
|
|
2739
|
-
}, null, 42,
|
|
2742
|
+
disabled: n.disabled
|
|
2743
|
+
}, null, 42, gs), [
|
|
2740
2744
|
[De, i.value]
|
|
2741
2745
|
]),
|
|
2742
|
-
(Xe = (je =
|
|
2746
|
+
(Xe = (je = n.post) == null ? void 0 : je.inside) != null && Xe.action && ((Ue = (Ye = n.post) == null ? void 0 : Ye.inside) == null ? void 0 : Ue.action) === "clear" && ((qe = i.value) == null ? void 0 : qe.length) > 0 ? (d(), f("div", {
|
|
2743
2747
|
key: 1,
|
|
2744
2748
|
class: "d-post-inside-button",
|
|
2745
2749
|
onClick: N
|
|
2746
|
-
},
|
|
2750
|
+
}, ys)) : k("", !0)
|
|
2747
2751
|
]),
|
|
2748
|
-
(Ze = (Ge =
|
|
2752
|
+
(Ze = (Ge = n.post) == null ? void 0 : Ge.outside) != null && Ze.component ? (d(), f("div", {
|
|
2749
2753
|
key: 2,
|
|
2750
|
-
class: T(["d-post",
|
|
2754
|
+
class: T(["d-post", n.disabled ? "disabled" : ""])
|
|
2751
2755
|
}, [
|
|
2752
|
-
(d(), b(Y((Je = (Ke =
|
|
2753
|
-
], 2)) : (et = (Qe =
|
|
2756
|
+
(d(), b(Y((Je = (Ke = n.post) == null ? void 0 : Ke.outside) == null ? void 0 : Je.component)))
|
|
2757
|
+
], 2)) : (et = (Qe = n.post) == null ? void 0 : Qe.outside) != null && et.text ? (d(), f("div", {
|
|
2754
2758
|
key: 3,
|
|
2755
|
-
class: T(["d-post",
|
|
2759
|
+
class: T(["d-post", n.disabled ? "disabled" : ""])
|
|
2756
2760
|
}, [
|
|
2757
2761
|
_("div", {
|
|
2758
2762
|
class: T(["d-text", r.value ? "focused" : ""])
|
|
2759
|
-
}, A((ot = (tt =
|
|
2763
|
+
}, A((ot = (tt = n.post) == null ? void 0 : tt.outside) == null ? void 0 : ot.text), 3)
|
|
2760
2764
|
], 2)) : k("", !0)
|
|
2761
2765
|
]),
|
|
2762
|
-
|
|
2763
|
-
|
|
2766
|
+
n.help ? (d(), f("div", _s, A(n.help), 1)) : k("", !0),
|
|
2767
|
+
s.value ? (d(), f("div", bs, A(s.value), 1)) : k("", !0)
|
|
2764
2768
|
])
|
|
2765
2769
|
], 2);
|
|
2766
2770
|
};
|
|
@@ -2776,12 +2780,12 @@ const ln = new rn(), dn = { style: { display: "flex", "flex-direction": "column"
|
|
|
2776
2780
|
}
|
|
2777
2781
|
},
|
|
2778
2782
|
mutations: {
|
|
2779
|
-
addComponent(e,
|
|
2780
|
-
fe.state.name =
|
|
2783
|
+
addComponent(e, o) {
|
|
2784
|
+
fe.state.name = o;
|
|
2781
2785
|
},
|
|
2782
2786
|
addComponents(e) {
|
|
2783
|
-
for (const
|
|
2784
|
-
e.hasOwnProperty(
|
|
2787
|
+
for (const o in e)
|
|
2788
|
+
e.hasOwnProperty(o) && (fe.state[o] = e[o]);
|
|
2785
2789
|
}
|
|
2786
2790
|
}
|
|
2787
2791
|
}, kt = (e) => {
|
|
@@ -2790,25 +2794,25 @@ const ln = new rn(), dn = { style: { display: "flex", "flex-direction": "column"
|
|
|
2790
2794
|
kt.close = (e) => {
|
|
2791
2795
|
q.emit("notification-close", e);
|
|
2792
2796
|
};
|
|
2793
|
-
const
|
|
2794
|
-
mounted: function(e,
|
|
2795
|
-
e.clickOutsideEvent = function(
|
|
2796
|
-
e ===
|
|
2797
|
+
const js = () => ({ notify: kt }), Xs = {
|
|
2798
|
+
mounted: function(e, o) {
|
|
2799
|
+
e.clickOutsideEvent = function(t) {
|
|
2800
|
+
e === t.target || e.contains(t.target) || o.value(t, e);
|
|
2797
2801
|
}, document.addEventListener("click", e.clickOutsideEvent);
|
|
2798
2802
|
},
|
|
2799
2803
|
unmounted: function(e) {
|
|
2800
2804
|
document.removeEventListener("click", e.clickOutsideEvent);
|
|
2801
2805
|
}
|
|
2802
|
-
},
|
|
2803
|
-
beforeMount(e,
|
|
2804
|
-
e._keydownCallback = (
|
|
2805
|
-
|
|
2806
|
+
}, Ys = {
|
|
2807
|
+
beforeMount(e, o) {
|
|
2808
|
+
e._keydownCallback = (t) => {
|
|
2809
|
+
t.key === o.arg && o.value();
|
|
2806
2810
|
}, document.addEventListener("keydown", e._keydownCallback);
|
|
2807
2811
|
},
|
|
2808
|
-
unmounted(e,
|
|
2812
|
+
unmounted(e, o) {
|
|
2809
2813
|
document.removeEventListener("keydown", e._keydownCallback), delete e._keydownCallback;
|
|
2810
2814
|
}
|
|
2811
|
-
},
|
|
2815
|
+
}, Us = {
|
|
2812
2816
|
beforeMount(e) {
|
|
2813
2817
|
e.focus();
|
|
2814
2818
|
}
|
|
@@ -2819,19 +2823,19 @@ function wt(e) {
|
|
|
2819
2823
|
function St(e) {
|
|
2820
2824
|
return e.type.indexOf("mouse") !== -1 ? e.clientY : e.touches[0].clientY;
|
|
2821
2825
|
}
|
|
2822
|
-
var
|
|
2826
|
+
var xs = function() {
|
|
2823
2827
|
var e = !1;
|
|
2824
2828
|
try {
|
|
2825
|
-
var
|
|
2829
|
+
var o = Object.defineProperty({}, "passive", {
|
|
2826
2830
|
get: function() {
|
|
2827
2831
|
e = !0;
|
|
2828
2832
|
}
|
|
2829
2833
|
});
|
|
2830
|
-
window.addEventListener("test", null,
|
|
2834
|
+
window.addEventListener("test", null, o);
|
|
2831
2835
|
} catch {
|
|
2832
2836
|
}
|
|
2833
2837
|
return e;
|
|
2834
|
-
}(), $
|
|
2838
|
+
}(), $s = {
|
|
2835
2839
|
disableClick: !1,
|
|
2836
2840
|
tapTolerance: 10,
|
|
2837
2841
|
// px
|
|
@@ -2848,29 +2852,29 @@ var xn = function() {
|
|
|
2848
2852
|
// ms
|
|
2849
2853
|
};
|
|
2850
2854
|
function ke(e) {
|
|
2851
|
-
var
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
},
|
|
2855
|
+
var o = this.$$touchObj, t = e.type.indexOf("touch") >= 0, n = e.type.indexOf("mouse") >= 0, s = this;
|
|
2856
|
+
t && (o.lastTouchStartTime = e.timeStamp), !(n && o.lastTouchStartTime && e.timeStamp - o.lastTouchStartTime < 350) && (o.touchStarted || (Dt(this), o.touchStarted = !0, o.touchMoved = !1, o.swipeOutBounded = !1, o.startX = wt(e), o.startY = St(e), o.currentX = 0, o.currentY = 0, o.touchStartTime = e.timeStamp, o.hasSwipe = Z(this, "swipe") || Z(this, "swipe.left") || Z(this, "swipe.right") || Z(this, "swipe.top") || Z(this, "swipe.bottom"), Z(this, "hold") && (o.touchHoldTimer = setTimeout(function() {
|
|
2857
|
+
o.touchHoldTimer = null, Q(e, s, "hold");
|
|
2858
|
+
}, o.options.touchHoldTolerance)), Q(e, this, "press")));
|
|
2855
2859
|
}
|
|
2856
2860
|
function we(e) {
|
|
2857
|
-
var
|
|
2858
|
-
if (
|
|
2859
|
-
if (
|
|
2860
|
-
var r =
|
|
2861
|
-
|
|
2861
|
+
var o = this.$$touchObj, t = wt(e), n = St(e), s = o.currentX != t || o.currentY != n;
|
|
2862
|
+
if (o.currentX = t, o.currentY = n, o.touchMoved) {
|
|
2863
|
+
if (o.hasSwipe && !o.swipeOutBounded) {
|
|
2864
|
+
var r = o.options.swipeTolerance;
|
|
2865
|
+
o.swipeOutBounded = Math.abs(o.startX - o.currentX) > r && Math.abs(o.startY - o.currentY) > r;
|
|
2862
2866
|
}
|
|
2863
2867
|
} else {
|
|
2864
|
-
var a =
|
|
2865
|
-
|
|
2868
|
+
var a = o.options.tapTolerance;
|
|
2869
|
+
o.touchMoved = Math.abs(o.startX - o.currentX) > a || Math.abs(o.startY - o.currentY) > a, o.touchMoved && (ze(o), Q(e, this, "drag.once"));
|
|
2866
2870
|
}
|
|
2867
|
-
if (Z(this, "rollover") &&
|
|
2868
|
-
var l = e.timeStamp, i =
|
|
2869
|
-
(
|
|
2871
|
+
if (Z(this, "rollover") && s) {
|
|
2872
|
+
var l = e.timeStamp, i = o.options.rollOverFrequency;
|
|
2873
|
+
(o.touchRollTime == null || l > o.touchRollTime + i) && (o.touchRollTime = l, Q(e, this, "rollover"));
|
|
2870
2874
|
}
|
|
2871
|
-
if (Z(this, "drag") &&
|
|
2872
|
-
var l = e.timeStamp, i =
|
|
2873
|
-
(
|
|
2875
|
+
if (Z(this, "drag") && o.touchStarted && o.touchMoved && s) {
|
|
2876
|
+
var l = e.timeStamp, i = o.options.dragFrequency;
|
|
2877
|
+
(o.touchDragTime == null || l > o.touchDragTime + i) && (o.touchDragTime = l, Q(e, this, "drag"));
|
|
2874
2878
|
}
|
|
2875
2879
|
}
|
|
2876
2880
|
function rt() {
|
|
@@ -2878,18 +2882,18 @@ function rt() {
|
|
|
2878
2882
|
ze(e), Ve(this), e.touchStarted = e.touchMoved = !1, e.startX = e.startY = 0;
|
|
2879
2883
|
}
|
|
2880
2884
|
function Se(e) {
|
|
2881
|
-
var
|
|
2882
|
-
|
|
2883
|
-
var
|
|
2884
|
-
if (ze(
|
|
2885
|
-
if (Q(e, this, "release"),
|
|
2886
|
-
if (
|
|
2887
|
-
var a =
|
|
2888
|
-
(l > a || i > a) && (l > a ? r =
|
|
2885
|
+
var o = this.$$touchObj, t = e.type.indexOf("touch") >= 0, n = e.type.indexOf("mouse") >= 0;
|
|
2886
|
+
t && (o.lastTouchEndTime = e.timeStamp);
|
|
2887
|
+
var s = t && !o.touchHoldTimer;
|
|
2888
|
+
if (ze(o), o.touchStarted = !1, Ve(this), !(n && o.lastTouchEndTime && e.timeStamp - o.lastTouchEndTime < 350))
|
|
2889
|
+
if (Q(e, this, "release"), o.touchMoved) {
|
|
2890
|
+
if (o.hasSwipe && !o.swipeOutBounded) {
|
|
2891
|
+
var a = o.options.swipeTolerance, r, l = Math.abs(o.startY - o.currentY), i = Math.abs(o.startX - o.currentX);
|
|
2892
|
+
(l > a || i > a) && (l > a ? r = o.startY > o.currentY ? "top" : "bottom" : r = o.startX > o.currentX ? "left" : "right", Z(this, "swipe." + r) ? Q(e, this, "swipe." + r, r) : Q(e, this, "swipe", r));
|
|
2889
2893
|
}
|
|
2890
|
-
} else if (Z(this, "longtap") && e.timeStamp -
|
|
2894
|
+
} else if (Z(this, "longtap") && e.timeStamp - o.touchStartTime > o.options.longTapTimeInterval)
|
|
2891
2895
|
e.cancelable && e.preventDefault(), Q(e, this, "longtap");
|
|
2892
|
-
else if (Z(this, "hold") &&
|
|
2896
|
+
else if (Z(this, "hold") && s) {
|
|
2893
2897
|
e.cancelable && e.preventDefault();
|
|
2894
2898
|
return;
|
|
2895
2899
|
} else
|
|
@@ -2901,97 +2905,97 @@ function lt() {
|
|
|
2901
2905
|
function dt() {
|
|
2902
2906
|
Ve(this);
|
|
2903
2907
|
}
|
|
2904
|
-
function Z(e,
|
|
2905
|
-
var
|
|
2906
|
-
return
|
|
2908
|
+
function Z(e, o) {
|
|
2909
|
+
var t = e.$$touchObj.callbacks[o];
|
|
2910
|
+
return t != null && t.length > 0;
|
|
2907
2911
|
}
|
|
2908
|
-
function Q(e,
|
|
2909
|
-
var
|
|
2912
|
+
function Q(e, o, t, n) {
|
|
2913
|
+
var s = o.$$touchObj, a = s.callbacks[t];
|
|
2910
2914
|
if (a == null || a.length === 0)
|
|
2911
2915
|
return null;
|
|
2912
2916
|
for (var r = 0; r < a.length; r++) {
|
|
2913
2917
|
var l = a[r];
|
|
2914
|
-
l.modifiers.stop && e.stopPropagation(), l.modifiers.prevent && e.preventDefault(), !(l.modifiers.self && e.target !== e.currentTarget) && typeof l.value == "function" && (
|
|
2918
|
+
l.modifiers.stop && e.stopPropagation(), l.modifiers.prevent && e.preventDefault(), !(l.modifiers.self && e.target !== e.currentTarget) && typeof l.value == "function" && (n ? l.value(n, e) : l.value(e));
|
|
2915
2919
|
}
|
|
2916
2920
|
}
|
|
2917
2921
|
function Dt(e) {
|
|
2918
|
-
var
|
|
2919
|
-
|
|
2922
|
+
var o = e.$$touchObj.options.touchClass;
|
|
2923
|
+
o && e.classList.add(o);
|
|
2920
2924
|
}
|
|
2921
2925
|
function Ve(e) {
|
|
2922
|
-
var
|
|
2923
|
-
|
|
2926
|
+
var o = e.$$touchObj.options.touchClass;
|
|
2927
|
+
o && e.classList.remove(o);
|
|
2924
2928
|
}
|
|
2925
2929
|
function ze(e) {
|
|
2926
2930
|
e.touchHoldTimer && (clearTimeout(e.touchHoldTimer), e.touchHoldTimer = null);
|
|
2927
2931
|
}
|
|
2928
|
-
function
|
|
2929
|
-
var
|
|
2932
|
+
function ks(e, o) {
|
|
2933
|
+
var t = e.$$touchObj || {
|
|
2930
2934
|
// an object contains all callbacks registered,
|
|
2931
2935
|
// key is event name, value is an array
|
|
2932
2936
|
callbacks: {},
|
|
2933
2937
|
// prevent bind twice, set to true when event bound
|
|
2934
2938
|
hasBindTouchEvents: !1,
|
|
2935
2939
|
// default options, would be override by v-touch-options
|
|
2936
|
-
options: $
|
|
2940
|
+
options: $s
|
|
2937
2941
|
};
|
|
2938
|
-
return
|
|
2942
|
+
return o && (t.options = Object.assign({}, t.options, o)), e.$$touchObj = t, e.$$touchObj;
|
|
2939
2943
|
}
|
|
2940
|
-
const
|
|
2941
|
-
beforeMount: function(e,
|
|
2942
|
-
const
|
|
2943
|
-
let
|
|
2944
|
-
const
|
|
2945
|
-
switch (
|
|
2944
|
+
const qs = {
|
|
2945
|
+
beforeMount: function(e, o) {
|
|
2946
|
+
const t = ks(e);
|
|
2947
|
+
let n = xs ? { passive: !0 } : !1;
|
|
2948
|
+
const s = o.arg || "tap";
|
|
2949
|
+
switch (s) {
|
|
2946
2950
|
case "swipe":
|
|
2947
|
-
let a =
|
|
2951
|
+
let a = o.modifiers;
|
|
2948
2952
|
if (a.left || a.right || a.top || a.bottom) {
|
|
2949
|
-
for (let r in
|
|
2953
|
+
for (let r in o.modifiers)
|
|
2950
2954
|
if (["left", "right", "top", "bottom"].indexOf(r) >= 0) {
|
|
2951
2955
|
let l = "swipe." + r;
|
|
2952
|
-
|
|
2956
|
+
t.callbacks[l] = t.callbacks[l] || [], t.callbacks[l].push(o);
|
|
2953
2957
|
}
|
|
2954
2958
|
} else
|
|
2955
|
-
|
|
2959
|
+
t.callbacks.swipe = t.callbacks.swipe || [], t.callbacks.swipe.push(o);
|
|
2956
2960
|
break;
|
|
2957
2961
|
case "press":
|
|
2958
2962
|
case "drag":
|
|
2959
|
-
|
|
2963
|
+
o.modifiers.disablePassive && (n = !1);
|
|
2960
2964
|
default:
|
|
2961
|
-
|
|
2965
|
+
t.callbacks[s] = t.callbacks[s] || [], t.callbacks[s].push(o);
|
|
2962
2966
|
}
|
|
2963
|
-
|
|
2967
|
+
t.hasBindTouchEvents || (e.addEventListener("touchstart", ke, n), e.addEventListener("touchmove", we, n), e.addEventListener("touchcancel", rt), e.addEventListener("touchend", Se), t.options.disableClick || (e.addEventListener("mousedown", ke), e.addEventListener("mousemove", we), e.addEventListener("mouseup", Se), e.addEventListener("mouseenter", lt), e.addEventListener("mouseleave", dt)), t.hasBindTouchEvents = !0);
|
|
2964
2968
|
},
|
|
2965
2969
|
unmounted: function(e) {
|
|
2966
2970
|
e.removeEventListener("touchstart", ke), e.removeEventListener("touchmove", we), e.removeEventListener("touchcancel", rt), e.removeEventListener("touchend", Se), e.$$touchObj && !e.$$touchObj.options.disableClick && (e.removeEventListener("mousedown", ke), e.removeEventListener("mousemove", we), e.removeEventListener("mouseup", Se), e.removeEventListener("mouseenter", lt), e.removeEventListener("mouseleave", dt)), delete e.$$touchObj;
|
|
2967
2971
|
}
|
|
2968
2972
|
};
|
|
2969
2973
|
export {
|
|
2970
|
-
|
|
2974
|
+
Ds as DAccordion,
|
|
2971
2975
|
Ko as DAlertDialog,
|
|
2972
2976
|
lo as DBadge,
|
|
2973
2977
|
ae as DButton,
|
|
2974
|
-
|
|
2975
|
-
|
|
2978
|
+
Bs as DCard,
|
|
2979
|
+
Rs as DCheckbox,
|
|
2976
2980
|
co as DCollapse,
|
|
2977
2981
|
fe as DComponentStore,
|
|
2978
|
-
|
|
2982
|
+
Ls as DConfigProvider,
|
|
2979
2983
|
Qo as DConfirmDialog,
|
|
2980
2984
|
Co as DContextMenu,
|
|
2981
|
-
|
|
2982
|
-
|
|
2985
|
+
Os as DDialogProvider,
|
|
2986
|
+
st as DDrag,
|
|
2983
2987
|
Lo as DDrop,
|
|
2984
|
-
|
|
2985
|
-
|
|
2988
|
+
Es as DDropdown,
|
|
2989
|
+
Ws as DForm,
|
|
2986
2990
|
pe as DGlobalStore,
|
|
2987
|
-
|
|
2991
|
+
Vs as DGrid,
|
|
2988
2992
|
de as DIcon,
|
|
2989
2993
|
ee as DIconStore,
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2994
|
+
zs as DImage,
|
|
2995
|
+
Ns as DInfoProgress,
|
|
2996
|
+
Ss as DInput,
|
|
2997
|
+
Ps as DInputString,
|
|
2998
|
+
Ts as DLayoutAdmin,
|
|
2995
2999
|
Ro as DLayoutContent,
|
|
2996
3000
|
Mo as DLayoutFooter,
|
|
2997
3001
|
Eo as DLayoutHeader,
|
|
@@ -2999,26 +3003,26 @@ export {
|
|
|
2999
3003
|
Bo as DLayoutTab,
|
|
3000
3004
|
_t as DMenu,
|
|
3001
3005
|
xt as DModal,
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3006
|
+
Ms as DNotificationProvider,
|
|
3007
|
+
sn as DPanel,
|
|
3008
|
+
Is as DScroll,
|
|
3009
|
+
Cs as DScrollProvider,
|
|
3010
|
+
As as DSelect,
|
|
3011
|
+
Hs as DTabs,
|
|
3012
|
+
Fs as DTextarea,
|
|
3009
3013
|
Te as DTransferStore,
|
|
3010
3014
|
bt as DTree,
|
|
3011
3015
|
Do as DTreeItem,
|
|
3012
3016
|
v as DTreeStore,
|
|
3013
3017
|
U as Rules,
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3018
|
+
Mn as alert,
|
|
3019
|
+
Xs as clickOutside,
|
|
3020
|
+
Bn as confirm,
|
|
3017
3021
|
q as emitter,
|
|
3018
3022
|
To as eventsBus,
|
|
3019
|
-
|
|
3020
|
-
|
|
3023
|
+
Us as focus,
|
|
3024
|
+
Ys as keydown,
|
|
3021
3025
|
kt as notify,
|
|
3022
|
-
|
|
3023
|
-
|
|
3026
|
+
qs as touch,
|
|
3027
|
+
js as useNotification
|
|
3024
3028
|
};
|