doph-js 0.2.87 → 0.2.88
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 +892 -880
- package/dist/dophJs.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/dophJs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useSlots as
|
|
2
|
-
const
|
|
1
|
+
import { useSlots as Le, computed as m, h as st, openBlock as d, createBlock as b, unref as B, ref as T, createElementBlock as p, Fragment as le, normalizeClass as D, renderSlot as C, createCommentVNode as k, normalizeStyle as V, resolveDynamicComponent as Y, createStaticVNode as ut, onMounted as me, toDisplayString as O, withDirectives as J, createElementVNode as _, vModelDynamic as De, withCtx as E, createTextVNode as K, Transition as Ne, withModifiers as j, resolveComponent as Lt, resolveDirective as Re, normalizeProps as pt, guardReactiveProps as ft, createVNode as Q, renderList as ge, pushScopeId as Ct, popScopeId as It, reactive as Oe, Teleport as mt, nextTick as ht, getCurrentInstance as gt, watch as vt, onUnmounted as Bt, mergeProps as ue, useCssVars as Ae, shallowRef as Et, defineComponent as Mt, TransitionGroup as yt, vModelCheckbox as Nt, vModelSelect as Rt, toRef as Ot, KeepAlive as At, toRefs as Ht, vModelText as Vt } from "vue";
|
|
2
|
+
const re = {
|
|
3
3
|
__name: "DIcon",
|
|
4
4
|
props: {
|
|
5
5
|
component: [Object, String],
|
|
@@ -8,17 +8,17 @@ const de = {
|
|
|
8
8
|
className: String
|
|
9
9
|
},
|
|
10
10
|
setup(e) {
|
|
11
|
-
const
|
|
12
|
-
const { className:
|
|
13
|
-
return
|
|
11
|
+
const t = e, o = Le(), n = m(() => {
|
|
12
|
+
const { className: r } = t;
|
|
13
|
+
return r === void 0 ? "icon" : ["icon", r].join(" ");
|
|
14
14
|
}), s = m(() => {
|
|
15
|
-
const { color:
|
|
16
|
-
return
|
|
15
|
+
const { color: r } = t;
|
|
16
|
+
return r === void 0 ? null : r;
|
|
17
17
|
}), a = m(() => {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
return typeof
|
|
21
|
-
}),
|
|
18
|
+
const r = t.size ?? null;
|
|
19
|
+
if (r !== void 0)
|
|
20
|
+
return typeof r == "number" || /^\d+$/.test(r) ? `${r}px` : r;
|
|
21
|
+
}), l = m(() => st(
|
|
22
22
|
"i",
|
|
23
23
|
{
|
|
24
24
|
class: n.value,
|
|
@@ -27,60 +27,60 @@ const de = {
|
|
|
27
27
|
fontSize: a.value
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
t.component ? st(t.component) : o
|
|
31
31
|
));
|
|
32
|
-
return (
|
|
32
|
+
return (r, i) => (d(), b(B(l)));
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, oe = {
|
|
35
35
|
state: {},
|
|
36
36
|
getters: {
|
|
37
37
|
getIcon(e) {
|
|
38
|
-
return
|
|
38
|
+
return oe.state[e];
|
|
39
39
|
},
|
|
40
40
|
getIcons() {
|
|
41
|
-
return
|
|
41
|
+
return oe.state;
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
mutations: {
|
|
45
|
-
addIcon(e,
|
|
46
|
-
|
|
45
|
+
addIcon(e, t) {
|
|
46
|
+
oe.state.name = t;
|
|
47
47
|
},
|
|
48
48
|
addIcons(e) {
|
|
49
|
-
for (const
|
|
50
|
-
e.hasOwnProperty(
|
|
49
|
+
for (const t in e)
|
|
50
|
+
e.hasOwnProperty(t) && (oe.state[t] = e[t]);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
function _t(e) {
|
|
55
|
-
const
|
|
56
|
-
let
|
|
57
|
-
for (;
|
|
58
|
-
n +=
|
|
59
|
-
return { top: s, left: n, x:
|
|
55
|
+
const t = e.value.getBoundingClientRect();
|
|
56
|
+
let o = e.value, n = 0, s = 0;
|
|
57
|
+
for (; o && !isNaN(o.offsetLeft) && !isNaN(o.offsetTop); )
|
|
58
|
+
n += o.offsetLeft - o.scrollLeft, s += o.offsetTop - o.scrollTop, o = o.offsetParent;
|
|
59
|
+
return { top: s, left: n, x: t.x, y: t.y, width: t.width, height: t.height };
|
|
60
60
|
}
|
|
61
61
|
function zt() {
|
|
62
62
|
function e(s) {
|
|
63
63
|
return s * Math.random() | 0;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function t() {
|
|
66
66
|
return e(16).toString(16);
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function o(s) {
|
|
69
69
|
let a = "";
|
|
70
|
-
for (let
|
|
71
|
-
a +=
|
|
70
|
+
for (let l = 0; l < s; ++l)
|
|
71
|
+
a += t();
|
|
72
72
|
return a;
|
|
73
73
|
}
|
|
74
74
|
function n() {
|
|
75
75
|
return (e(16) & 3 | 8).toString(16);
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return o(8) + "-" + o(4) + "-4" + o(3) + "-" + n() + o(3) + "-" + o(12);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
for (const [n, s] of
|
|
82
|
-
|
|
83
|
-
return
|
|
79
|
+
const ne = (e, t) => {
|
|
80
|
+
const o = e.__vccOpts || e;
|
|
81
|
+
for (const [n, s] of t)
|
|
82
|
+
o[n] = s;
|
|
83
|
+
return o;
|
|
84
84
|
}, Ft = {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: "loading-svg rotating",
|
|
@@ -119,51 +119,51 @@ const re = (e, o) => {
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
emits: ["click", "contextmenu"],
|
|
122
|
-
setup(e, { expose:
|
|
123
|
-
const n = e, s =
|
|
124
|
-
|
|
122
|
+
setup(e, { expose: t, emit: o }) {
|
|
123
|
+
const n = e, s = Le(), a = T(null), l = m(() => n.icon ? oe.getters.getIcon(n.icon) : null), r = ($) => {
|
|
124
|
+
o("click", $);
|
|
125
125
|
}, i = ($) => {
|
|
126
|
-
|
|
126
|
+
o("contextmenu", $);
|
|
127
127
|
}, c = m(() => n.scale === "large" ? "button-lg" : n.scale === "small" ? "button-sm" : ""), u = m(() => n.disabled ? "disabled" : ""), h = ($) => !!s[$], x = m(() => h("default") ? "" : n.scale === "large" ? "d-button-lg-icon" : n.scale === "small" ? "d-button-sm-icon" : "d-button-icon"), S = m(() => {
|
|
128
128
|
const $ = n.outline ? "-outline" : "";
|
|
129
129
|
return n.type === "primary" ? `button${$}-blue` : n.type === "success" ? `button${$}-green` : n.type === "error" ? `button${$}-red` : n.type === "warning" ? `button${$}-orange` : n.type === "wait" ? `button${$}-violet` : n.outline ? `button${$}` : "";
|
|
130
130
|
});
|
|
131
|
-
return
|
|
131
|
+
return t({
|
|
132
132
|
elementSize: () => _t(a)
|
|
133
|
-
}), ($, H) => (d(),
|
|
134
|
-
|
|
133
|
+
}), ($, H) => (d(), p(le, null, [
|
|
134
|
+
l.value ? k("", !0) : (d(), p("div", {
|
|
135
135
|
key: 0,
|
|
136
136
|
ref_key: "el",
|
|
137
137
|
ref: a,
|
|
138
|
-
onClick:
|
|
138
|
+
onClick: r,
|
|
139
139
|
onContextmenu: i,
|
|
140
140
|
class: D(["button", [n.class, c.value, S.value, u.value].join(" ")])
|
|
141
141
|
}, [
|
|
142
|
-
|
|
143
|
-
n.loading ? (d(),
|
|
142
|
+
C($.$slots, "default", {}, void 0, !0),
|
|
143
|
+
n.loading ? (d(), p("svg", Ft, Pt)) : k("", !0)
|
|
144
144
|
], 34)),
|
|
145
|
-
|
|
145
|
+
l.value ? (d(), p("div", {
|
|
146
146
|
key: 1,
|
|
147
147
|
ref_key: "el",
|
|
148
148
|
ref: a,
|
|
149
|
-
onClick:
|
|
149
|
+
onClick: r,
|
|
150
150
|
onContextmenu: i,
|
|
151
151
|
class: D(["button button-ext", [n.class, c.value, x.value, S.value, u.value].join(" ")]),
|
|
152
152
|
style: V(n.style)
|
|
153
153
|
}, [
|
|
154
|
-
n.icon ? (d(), b(Y(
|
|
154
|
+
n.icon ? (d(), b(Y(re), {
|
|
155
155
|
key: 0,
|
|
156
|
-
component:
|
|
156
|
+
component: l.value,
|
|
157
157
|
color: "inherit"
|
|
158
158
|
}, null, 8, ["component"])) : k("", !0),
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
B(s).default ? (d(), p("div", jt, [
|
|
160
|
+
C($.$slots, "default", {}, void 0, !0)
|
|
161
161
|
])) : k("", !0),
|
|
162
|
-
n.loading ? (d(),
|
|
162
|
+
n.loading ? (d(), p("svg", Xt, Ut)) : k("", !0)
|
|
163
163
|
], 38)) : k("", !0)
|
|
164
164
|
], 64));
|
|
165
165
|
}
|
|
166
|
-
},
|
|
166
|
+
}, ie = /* @__PURE__ */ ne(qt, [["__scopeId", "data-v-e5cd6ccd"]]);
|
|
167
167
|
const Gt = {
|
|
168
168
|
key: 0,
|
|
169
169
|
class: "d-input"
|
|
@@ -184,7 +184,7 @@ const Gt = {
|
|
|
184
184
|
}, so = {
|
|
185
185
|
key: 0,
|
|
186
186
|
class: "label"
|
|
187
|
-
}, ao = { style: { display: "flex", "align-items": "flex-end", "justify-content": "flex-start" } }, io = { style: { flex: "1" } },
|
|
187
|
+
}, ao = { style: { display: "flex", "align-items": "flex-end", "justify-content": "flex-start" } }, io = { style: { flex: "1" } }, lo = ["type", "placeholder"], ro = {
|
|
188
188
|
__name: "DInput",
|
|
189
189
|
props: {
|
|
190
190
|
label: String,
|
|
@@ -198,62 +198,62 @@ const Gt = {
|
|
|
198
198
|
focus: Boolean
|
|
199
199
|
},
|
|
200
200
|
emits: ["update:modelValue"],
|
|
201
|
-
setup(e, { expose:
|
|
202
|
-
const n = e, s = T(null), a = m(() => n.scale === "small" ? "d-input-small" : n.scale === "large" ? "d-input-large" : ""),
|
|
201
|
+
setup(e, { expose: t, emit: o }) {
|
|
202
|
+
const n = e, s = T(null), a = m(() => n.scale === "small" ? "d-input-small" : n.scale === "large" ? "d-input-large" : ""), l = m({
|
|
203
203
|
get: () => n.modelValue,
|
|
204
204
|
set: (i) => {
|
|
205
|
-
|
|
205
|
+
o("update:modelValue", i);
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
208
|
me(() => {
|
|
209
|
-
n.focus &&
|
|
209
|
+
n.focus && r();
|
|
210
210
|
});
|
|
211
|
-
const
|
|
211
|
+
const r = () => {
|
|
212
212
|
s.value.focus();
|
|
213
213
|
};
|
|
214
|
-
return
|
|
215
|
-
focus:
|
|
216
|
-
}), (i, c) => !n.post && !n.pre ? (d(),
|
|
217
|
-
n.label ? (d(),
|
|
214
|
+
return t({
|
|
215
|
+
focus: r
|
|
216
|
+
}), (i, c) => !n.post && !n.pre ? (d(), p("div", Gt, [
|
|
217
|
+
n.label ? (d(), p("div", Zt, O(n.label), 1)) : k("", !0),
|
|
218
218
|
J(_("input", {
|
|
219
219
|
ref_key: "inputRef",
|
|
220
220
|
ref: s,
|
|
221
|
-
"onUpdate:modelValue": c[0] || (c[0] = (u) =>
|
|
221
|
+
"onUpdate:modelValue": c[0] || (c[0] = (u) => l.value = u),
|
|
222
222
|
type: n.password ? "password" : "text",
|
|
223
223
|
class: D(a.value),
|
|
224
224
|
placeholder: n.placeholder,
|
|
225
225
|
style: { width: "100%" }
|
|
226
226
|
}, null, 10, Kt), [
|
|
227
|
-
[De,
|
|
227
|
+
[De, l.value]
|
|
228
228
|
])
|
|
229
|
-
])) : n.post && n.post.click && !n.pre ? (d(),
|
|
230
|
-
n.label ? (d(),
|
|
229
|
+
])) : n.post && n.post.click && !n.pre ? (d(), p("div", Jt, [
|
|
230
|
+
n.label ? (d(), p("div", Qt, O(n.label), 1)) : k("", !0),
|
|
231
231
|
_("div", eo, [
|
|
232
232
|
_("div", to, [
|
|
233
233
|
J(_("input", {
|
|
234
234
|
ref_key: "inputRef",
|
|
235
235
|
ref: s,
|
|
236
236
|
class: D(["d-input-post-field", a.value]),
|
|
237
|
-
"onUpdate:modelValue": c[1] || (c[1] = (u) =>
|
|
237
|
+
"onUpdate:modelValue": c[1] || (c[1] = (u) => l.value = u),
|
|
238
238
|
type: n.password ? "password" : "text",
|
|
239
239
|
placeholder: n.placeholder,
|
|
240
240
|
style: { width: "100%" }
|
|
241
241
|
}, null, 10, oo), [
|
|
242
|
-
[De,
|
|
242
|
+
[De, l.value]
|
|
243
243
|
])
|
|
244
244
|
]),
|
|
245
|
-
n.post.label ? (d(), b(
|
|
245
|
+
n.post.label ? (d(), b(ie, {
|
|
246
246
|
key: 0,
|
|
247
247
|
scale: n.scale,
|
|
248
248
|
class: D(["d-input-post-button", n.post.class]),
|
|
249
249
|
onClick: n.post.click,
|
|
250
250
|
icon: n.post.icon
|
|
251
251
|
}, {
|
|
252
|
-
default:
|
|
252
|
+
default: E(() => [
|
|
253
253
|
K(O(n.post.label), 1)
|
|
254
254
|
]),
|
|
255
255
|
_: 1
|
|
256
|
-
}, 8, ["scale", "onClick", "icon", "class"])) : (d(), b(
|
|
256
|
+
}, 8, ["scale", "onClick", "icon", "class"])) : (d(), b(ie, {
|
|
257
257
|
key: 1,
|
|
258
258
|
scale: n.scale,
|
|
259
259
|
class: D(["d-input-post-button", n.post.class]),
|
|
@@ -261,21 +261,21 @@ const Gt = {
|
|
|
261
261
|
icon: n.post.icon
|
|
262
262
|
}, null, 8, ["scale", "onClick", "icon", "class"]))
|
|
263
263
|
])
|
|
264
|
-
])) : !n.post && n.pre && n.pre.click ? (d(),
|
|
265
|
-
n.label ? (d(),
|
|
264
|
+
])) : !n.post && n.pre && n.pre.click ? (d(), p("div", no, [
|
|
265
|
+
n.label ? (d(), p("div", so, O(n.label), 1)) : k("", !0),
|
|
266
266
|
_("div", ao, [
|
|
267
|
-
n.pre.label ? (d(), b(
|
|
267
|
+
n.pre.label ? (d(), b(ie, {
|
|
268
268
|
key: 0,
|
|
269
269
|
scale: n.scale,
|
|
270
270
|
class: D(["d-input-pre-button", n.pre.class]),
|
|
271
271
|
onClick: n.pre.click,
|
|
272
272
|
icon: n.pre.icon
|
|
273
273
|
}, {
|
|
274
|
-
default:
|
|
274
|
+
default: E(() => [
|
|
275
275
|
K(O(n.pre.label), 1)
|
|
276
276
|
]),
|
|
277
277
|
_: 1
|
|
278
|
-
}, 8, ["scale", "onClick", "icon", "class"])) : (d(), b(
|
|
278
|
+
}, 8, ["scale", "onClick", "icon", "class"])) : (d(), b(ie, {
|
|
279
279
|
key: 1,
|
|
280
280
|
scale: n.scale,
|
|
281
281
|
class: D(["d-input-pre-button", n.pre.class]),
|
|
@@ -287,18 +287,18 @@ const Gt = {
|
|
|
287
287
|
ref_key: "inputRef",
|
|
288
288
|
ref: s,
|
|
289
289
|
class: D(["d-input-pre-field", a.value]),
|
|
290
|
-
"onUpdate:modelValue": c[2] || (c[2] = (u) =>
|
|
290
|
+
"onUpdate:modelValue": c[2] || (c[2] = (u) => l.value = u),
|
|
291
291
|
type: n.password ? "password" : "text",
|
|
292
292
|
placeholder: n.placeholder,
|
|
293
293
|
style: { width: "100%" }
|
|
294
|
-
}, null, 10,
|
|
295
|
-
[De,
|
|
294
|
+
}, null, 10, lo), [
|
|
295
|
+
[De, l.value]
|
|
296
296
|
])
|
|
297
297
|
])
|
|
298
298
|
])
|
|
299
299
|
])) : k("", !0);
|
|
300
300
|
}
|
|
301
|
-
},
|
|
301
|
+
}, Bs = /* @__PURE__ */ ne(ro, [["__scopeId", "data-v-a972038a"]]), co = {
|
|
302
302
|
__name: "DBadge",
|
|
303
303
|
props: {
|
|
304
304
|
scale: String,
|
|
@@ -310,17 +310,17 @@ const Gt = {
|
|
|
310
310
|
}
|
|
311
311
|
},
|
|
312
312
|
setup(e) {
|
|
313
|
-
const
|
|
314
|
-
const s =
|
|
315
|
-
return
|
|
313
|
+
const t = e, o = m(() => t.scale === "large" ? "badge-lg" : t.scale === "small" ? "badge-sm" : ""), n = m(() => {
|
|
314
|
+
const s = t.stress ? "-stress" : "";
|
|
315
|
+
return t.type === "primary" ? `badge${s}-blue` : t.type === "success" ? `badge${s}-green` : t.type === "error" ? `badge${s}-red` : t.type === "warning" ? `badge${s}-orange` : t.type === "wait" ? `badge${s}-violet` : t.stress ? `badge${s}-gray` : "";
|
|
316
316
|
});
|
|
317
|
-
return (s, a) => (d(),
|
|
318
|
-
class: D(["badge", [
|
|
317
|
+
return (s, a) => (d(), p("div", {
|
|
318
|
+
class: D(["badge", [t.class, o.value, n.value].join(" ")])
|
|
319
319
|
}, [
|
|
320
|
-
|
|
320
|
+
C(s.$slots, "default")
|
|
321
321
|
], 2));
|
|
322
322
|
}
|
|
323
|
-
},
|
|
323
|
+
}, ae = "0px", uo = {
|
|
324
324
|
__name: "DCollapse",
|
|
325
325
|
props: {
|
|
326
326
|
duration: {
|
|
@@ -345,7 +345,7 @@ const Gt = {
|
|
|
345
345
|
}
|
|
346
346
|
},
|
|
347
347
|
setup(e) {
|
|
348
|
-
const
|
|
348
|
+
const t = e, o = (i) => ({
|
|
349
349
|
height: i == null ? void 0 : i.style.height,
|
|
350
350
|
width: i == null ? void 0 : i.style.width,
|
|
351
351
|
position: i == null ? void 0 : i.style.position,
|
|
@@ -361,7 +361,7 @@ const Gt = {
|
|
|
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 =
|
|
364
|
+
return i.style.width = c.width, i.style.position = c.position, i.style.visibility = c.visibility, i.style.height = ae, i.style.overflow = "hidden", c.height && c.height !== ae ? c.height : h;
|
|
365
365
|
}, s = (i, c, u, h, x) => {
|
|
366
366
|
const S = i.animate(h, x);
|
|
367
367
|
i.style.height = c.height, S.onfinish = () => {
|
|
@@ -369,18 +369,18 @@ const Gt = {
|
|
|
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: ae,
|
|
373
|
+
opacity: t.opacityClosed,
|
|
374
|
+
paddingTop: ae,
|
|
375
|
+
paddingBottom: ae,
|
|
376
|
+
borderTopWidth: ae,
|
|
377
|
+
borderBottomWidth: ae,
|
|
378
|
+
marginTop: ae,
|
|
379
|
+
marginBottom: ae
|
|
380
380
|
},
|
|
381
381
|
{
|
|
382
382
|
height: i,
|
|
383
|
-
opacity:
|
|
383
|
+
opacity: t.opacityOpened,
|
|
384
384
|
paddingTop: c.paddingTop,
|
|
385
385
|
paddingBottom: c.paddingBottom,
|
|
386
386
|
borderTopWidth: c.borderTopWidth,
|
|
@@ -388,29 +388,29 @@ const Gt = {
|
|
|
388
388
|
marginTop: c.marginTop,
|
|
389
389
|
marginBottom: c.marginBottom
|
|
390
390
|
}
|
|
391
|
-
],
|
|
392
|
-
const u = i, h =
|
|
391
|
+
], l = (i, c) => {
|
|
392
|
+
const u = i, h = o(u), x = n(u, h), S = a(x, h), N = { duration: t.duration, easing: t.easingEnter };
|
|
393
393
|
s(u, h, c, S, N);
|
|
394
|
-
},
|
|
395
|
-
const u = i, h =
|
|
394
|
+
}, r = (i, c) => {
|
|
395
|
+
const u = i, h = o(u), { height: x } = getComputedStyle(u);
|
|
396
396
|
u.style.height = x, u.style.overflow = "hidden";
|
|
397
|
-
const S = a(x, h).reverse(), N = { duration:
|
|
397
|
+
const S = a(x, h).reverse(), N = { duration: t.duration, easing: t.easingLeave };
|
|
398
398
|
s(u, h, c, S, N);
|
|
399
399
|
};
|
|
400
400
|
return (i, c) => (d(), b(Ne, {
|
|
401
401
|
css: !1,
|
|
402
|
-
onEnter:
|
|
403
|
-
onLeave:
|
|
402
|
+
onEnter: l,
|
|
403
|
+
onLeave: r
|
|
404
404
|
}, {
|
|
405
|
-
default:
|
|
406
|
-
|
|
405
|
+
default: E(() => [
|
|
406
|
+
C(i.$slots, "default")
|
|
407
407
|
]),
|
|
408
408
|
_: 3
|
|
409
409
|
}));
|
|
410
410
|
}
|
|
411
411
|
}, Te = {
|
|
412
412
|
data: void 0
|
|
413
|
-
}, He = (e) => e.reduce((
|
|
413
|
+
}, He = (e) => e.reduce((t, o) => (t[o] = o) && t, {}), X = He([
|
|
414
414
|
"drag",
|
|
415
415
|
"dragend",
|
|
416
416
|
"dragenter",
|
|
@@ -442,32 +442,32 @@ const Gt = {
|
|
|
442
442
|
tag: { type: String, default: "div" }
|
|
443
443
|
},
|
|
444
444
|
setup(e) {
|
|
445
|
-
const
|
|
445
|
+
const t = e, o = Le(), n = T(!1), s = m(() => n && t.transferData), a = m(() => ({ position: "fixed", top: "-1000px" })), l = (r, i) => {
|
|
446
446
|
const c = i.dataTransfer;
|
|
447
|
-
if ([X.dragenter, X.dragover].includes(
|
|
448
|
-
if (
|
|
447
|
+
if ([X.dragenter, X.dragover].includes(r) && t.dropEffect && (c.dropEffect = t.dropEffect), r === X.dragstart) {
|
|
448
|
+
if (t.effectAllowed && (c.effectAllowed = t.effectAllowed), t.image || o.image) {
|
|
449
449
|
let u;
|
|
450
|
-
|
|
450
|
+
t.image ? (u = new Image(), u.src = t.image) : o.image && (u = o.image[0].elm), c.setDragImage && c.setDragImage(u, t.imageXOffset, t.imageYOffset);
|
|
451
451
|
}
|
|
452
|
-
|
|
452
|
+
t.transferData !== void 0 && (Te.data = t.transferData, i.dataTransfer.setData("text", "")), n.value = !0;
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
|
-
return (
|
|
456
|
-
draggable:
|
|
457
|
-
onDrag: i[0] || (i[0] = (c) =>
|
|
458
|
-
onDragstart: i[1] || (i[1] = j((c) =>
|
|
459
|
-
onDragenter: i[2] || (i[2] = (c) =>
|
|
460
|
-
onDragleave: i[3] || (i[3] = (c) =>
|
|
461
|
-
onDragend: i[4] || (i[4] = (c) =>
|
|
455
|
+
return (r, i) => (d(), b(Y(e.tag), {
|
|
456
|
+
draggable: t.draggable,
|
|
457
|
+
onDrag: i[0] || (i[0] = (c) => l(B(X).drag, c)),
|
|
458
|
+
onDragstart: i[1] || (i[1] = j((c) => l(B(X).dragstart, c), ["stop"])),
|
|
459
|
+
onDragenter: i[2] || (i[2] = (c) => l(B(X).dragenter, c)),
|
|
460
|
+
onDragleave: i[3] || (i[3] = (c) => l(B(X).dragleave, c)),
|
|
461
|
+
onDragend: i[4] || (i[4] = (c) => l(B(X).dragend, c))
|
|
462
462
|
}, {
|
|
463
|
-
default:
|
|
464
|
-
|
|
465
|
-
e.hideImageHtml ? (d(),
|
|
463
|
+
default: E(() => [
|
|
464
|
+
C(r.$slots, "default", { transferData: s.value }),
|
|
465
|
+
e.hideImageHtml ? (d(), p("div", {
|
|
466
466
|
key: 0,
|
|
467
467
|
style: V(a.value)
|
|
468
468
|
}, [
|
|
469
|
-
|
|
470
|
-
], 4)) :
|
|
469
|
+
C(r.$slots, "image", { transferData: s.value })
|
|
470
|
+
], 4)) : C(r.$slots, "image", {
|
|
471
471
|
key: 1,
|
|
472
472
|
transferData: s.value
|
|
473
473
|
})
|
|
@@ -476,7 +476,7 @@ const Gt = {
|
|
|
476
476
|
}, 40, ["draggable"]));
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
|
-
const mo = (e) => (
|
|
479
|
+
const mo = (e) => (Ct("data-v-a476bb8e"), e = e(), It(), e), ho = {
|
|
480
480
|
key: 0,
|
|
481
481
|
style: { display: "none" }
|
|
482
482
|
}, go = { key: 1 }, vo = /* @__PURE__ */ mo(() => /* @__PURE__ */ _("div", { class: "tree-divider" }, null, -1)), yo = [
|
|
@@ -497,60 +497,60 @@ const mo = (e) => (Lt("data-v-a476bb8e"), e = e(), It(), e), ho = {
|
|
|
497
497
|
component: Object
|
|
498
498
|
},
|
|
499
499
|
emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick", "nodecontext"],
|
|
500
|
-
setup(e, { emit:
|
|
501
|
-
const
|
|
502
|
-
|
|
500
|
+
setup(e, { emit: t }) {
|
|
501
|
+
const o = e, n = T(null), s = T(!1), a = T(!1), l = T(!1), r = m(() => o.model.children && o.model.children.length), i = m(() => (v.actions.isTreeExpanded(o.treeId) && (o.model.expanded = o.model.expanded === void 0 ? !0 : o.model.expanded), o.model.expanded)), c = (M) => {
|
|
502
|
+
t("nodeclick", { event: M, model: o.model });
|
|
503
503
|
}, u = (M) => {
|
|
504
|
-
|
|
504
|
+
t("nodeclick", M);
|
|
505
505
|
}, h = (M) => {
|
|
506
|
-
|
|
506
|
+
t("nodedrop", M);
|
|
507
507
|
}, x = (M) => {
|
|
508
|
-
|
|
508
|
+
t("nodecontext", M);
|
|
509
509
|
}, S = m(() => [
|
|
510
|
-
v.actions.isItemSelected(
|
|
510
|
+
v.actions.isItemSelected(o.treeId, o.model.id) ? "selected" : "",
|
|
511
511
|
s.value ? "node-over " : "",
|
|
512
512
|
a.value ? "node-top " : "",
|
|
513
|
-
|
|
514
|
-
]), N = m(() =>
|
|
513
|
+
l.value ? "node-bottom " : ""
|
|
514
|
+
]), N = m(() => o.search ? !1 : o.model.draggable === !0), $ = (M) => {
|
|
515
515
|
var A;
|
|
516
516
|
let g = Te.data;
|
|
517
517
|
if (g === void 0 || g.model === void 0)
|
|
518
518
|
return s.value = !1, !1;
|
|
519
|
-
if (g.model.id ===
|
|
520
|
-
return s.value = !1, a.value = !1,
|
|
521
|
-
if (!v.state.trees[
|
|
519
|
+
if (g.model.id === o.model.id || v.actions.isChildOfParent(o.treeId, o.items, o.model.id, g.model.id) || v.actions.isParentOfChild(o.treeId, o.items, g.model.id, o.model.id))
|
|
520
|
+
return s.value = !1, a.value = !1, l.value = !1, !1;
|
|
521
|
+
if (!v.state.trees[o.treeId].transfer && g.id !== o.treeId || !v.state.trees[o.treeId].dropInside && !l.value && !a.value)
|
|
522
522
|
return !1;
|
|
523
523
|
let R = "";
|
|
524
|
-
a.value ? R = "before" :
|
|
524
|
+
a.value ? R = "before" : l.value ? R = "after" : R = "inside", t("nodedrop", { e: M, model: o.model, place: R }), v.actions.moveTreeNode(g.id, o.treeId, o.items, g.model.id, o.model.id, R, (A = g.model) == null ? void 0 : A.transfer), s.value = !1, a.value = !1, l.value = !1;
|
|
525
525
|
}, H = (M) => {
|
|
526
|
-
|
|
526
|
+
t("nodedragover", { e: M, model: o.model });
|
|
527
527
|
let g = Te.data;
|
|
528
|
-
if (!
|
|
528
|
+
if (!o.model.droppable)
|
|
529
529
|
return !1;
|
|
530
530
|
if (g === void 0 || g.model === void 0)
|
|
531
531
|
return s.value = !0, !1;
|
|
532
|
-
if (g.model.id ===
|
|
532
|
+
if (g.model.id === o.model.id || v.actions.isChildOfParent(o.treeId, o.items, o.model.id, g.model.id) || v.actions.isParentOfChild(o.treeId, o.items, g.model.id, o.model.id))
|
|
533
533
|
return !1;
|
|
534
534
|
const R = M.y, A = n.value.getBoundingClientRect().top, z = n.value.getBoundingClientRect().height, y = z / 3;
|
|
535
|
-
R > A && R <= A + y ? (s.value = !1, a.value = !0,
|
|
535
|
+
R > A && R <= A + y ? (s.value = !1, a.value = !0, l.value = !1) : R < A + z && R >= A + z - y ? (s.value = !1, a.value = !1, l.value = !0) : (s.value = v.state.trees[o.treeId].dropInside, a.value = !1, l.value = !1);
|
|
536
536
|
}, P = () => {
|
|
537
|
-
s.value = !1, a.value = !1,
|
|
538
|
-
}, w = m(() =>
|
|
539
|
-
if (
|
|
540
|
-
let [M, ...g] =
|
|
537
|
+
s.value = !1, a.value = !1, l.value = !1;
|
|
538
|
+
}, w = m(() => o.model.title.startsWith("-")), I = m(() => {
|
|
539
|
+
if (o.model.title.startsWith("-")) {
|
|
540
|
+
let [M, ...g] = o.model.title.split(" ");
|
|
541
541
|
return g = g.join(" "), g;
|
|
542
542
|
}
|
|
543
543
|
return null;
|
|
544
544
|
});
|
|
545
545
|
return (M, g) => {
|
|
546
|
-
const R =
|
|
547
|
-
return
|
|
548
|
-
_("div", bo, O(
|
|
549
|
-
])) :
|
|
546
|
+
const R = Lt("d-tree-item", !0), A = Re("touch");
|
|
547
|
+
return B(v).actions.beforeItem(o.treeId, e.model) ? w.value && !I.value ? (d(), p("li", go, yo)) : w.value && I.value ? (d(), p("li", _o, [
|
|
548
|
+
_("div", bo, O(B(v).actions.renderTitle(o.treeId, I.value)), 1)
|
|
549
|
+
])) : o.model.component ? (d(), b(at, {
|
|
550
550
|
key: 3,
|
|
551
551
|
tag: "li",
|
|
552
552
|
class: "tree-item-component",
|
|
553
|
-
"transfer-data": { id:
|
|
553
|
+
"transfer-data": { id: o.treeId, model: o.model },
|
|
554
554
|
draggable: N.value,
|
|
555
555
|
onDrop: j($, ["stop"]),
|
|
556
556
|
onDragenter: g[1] || (g[1] = j(() => {
|
|
@@ -558,14 +558,14 @@ const mo = (e) => (Lt("data-v-a476bb8e"), e = e(), It(), e), ho = {
|
|
|
558
558
|
onDragover: j(H, ["prevent", "stop"]),
|
|
559
559
|
onDragleave: j(P, ["prevent"])
|
|
560
560
|
}, {
|
|
561
|
-
default:
|
|
562
|
-
J((d(),
|
|
561
|
+
default: E(() => [
|
|
562
|
+
J((d(), p("div", {
|
|
563
563
|
ref_key: "node",
|
|
564
564
|
ref: n,
|
|
565
565
|
class: D(S.value),
|
|
566
|
-
onContextmenu: g[0] || (g[0] = j((z) =>
|
|
566
|
+
onContextmenu: g[0] || (g[0] = j((z) => t("nodecontext", { e: z, model: o.model }), ["prevent"]))
|
|
567
567
|
}, [
|
|
568
|
-
(d(), b(Y(
|
|
568
|
+
(d(), b(Y(B(fe).getters.getComponent(o.model.component).component), pt(ft(B(fe).getters.getComponent(o.model.component).props)), null, 16))
|
|
569
569
|
], 34)), [
|
|
570
570
|
[A, c]
|
|
571
571
|
])
|
|
@@ -575,7 +575,7 @@ const mo = (e) => (Lt("data-v-a476bb8e"), e = e(), It(), e), ho = {
|
|
|
575
575
|
key: 4,
|
|
576
576
|
tag: "li",
|
|
577
577
|
class: "tree-item",
|
|
578
|
-
"transfer-data": { id:
|
|
578
|
+
"transfer-data": { id: o.treeId, model: o.model },
|
|
579
579
|
draggable: N.value,
|
|
580
580
|
onDrop: j($, ["stop"]),
|
|
581
581
|
onDragenter: g[3] || (g[3] = j(() => {
|
|
@@ -583,72 +583,72 @@ const mo = (e) => (Lt("data-v-a476bb8e"), e = e(), It(), e), ho = {
|
|
|
583
583
|
onDragover: j(H, ["prevent", "stop"]),
|
|
584
584
|
onDragleave: j(P, ["prevent"])
|
|
585
585
|
}, {
|
|
586
|
-
default:
|
|
586
|
+
default: E(() => {
|
|
587
587
|
var z, y;
|
|
588
588
|
return [
|
|
589
|
-
J((d(),
|
|
589
|
+
J((d(), p("div", {
|
|
590
590
|
ref_key: "node",
|
|
591
591
|
ref: n,
|
|
592
592
|
class: D(S.value),
|
|
593
|
-
onContextmenu: g[2] || (g[2] = j((F) =>
|
|
593
|
+
onContextmenu: g[2] || (g[2] = j((F) => t("nodecontext", { e: F, model: o.model }), ["prevent"]))
|
|
594
594
|
}, [
|
|
595
595
|
_("div", null, [
|
|
596
|
-
|
|
596
|
+
o.model.icons && o.model.icons.pre && r.value && !o.search && !w.value ? (d(), b(Y(re), {
|
|
597
597
|
key: 0,
|
|
598
|
-
component:
|
|
598
|
+
component: B(oe).getters.getIcon(o.model.icons.pre.component),
|
|
599
599
|
size: 18,
|
|
600
|
-
color:
|
|
600
|
+
color: o.model.icons.pre.color ? o.model.icons.pre.color : "inherit",
|
|
601
601
|
class: D(i.value ? "tree-open-pre" : "")
|
|
602
602
|
}, null, 8, ["component", "color", "class"])) : k("", !0),
|
|
603
|
-
|
|
603
|
+
o.model.icons && o.model.icons.pre && !r.value && !o.search && !w.value ? (d(), b(Y(re), {
|
|
604
604
|
key: 1,
|
|
605
|
-
component:
|
|
605
|
+
component: B(oe).getters.getIcon(o.model.icons.pre.component),
|
|
606
606
|
size: 18,
|
|
607
607
|
color: "rgba(0,0,0,0)",
|
|
608
608
|
class: D(i.value ? "tree-open-pre" : "")
|
|
609
609
|
}, null, 8, ["component", "class"])) : k("", !0),
|
|
610
|
-
|
|
610
|
+
o.model.icons && o.model.icons.icon && !w.value ? (d(), b(Y(re), {
|
|
611
611
|
key: 2,
|
|
612
|
-
component:
|
|
613
|
-
color:
|
|
614
|
-
size:
|
|
615
|
-
className:
|
|
612
|
+
component: B(oe).getters.getIcon(o.model.icons.icon.component),
|
|
613
|
+
color: o.model.icons.icon.color ? o.model.icons.icon.color : "inherit",
|
|
614
|
+
size: o.model.icons.icon.size ? o.model.icons.icon.size : null,
|
|
615
|
+
className: o.model.icons.icon.class ? o.model.icons.icon.class : null
|
|
616
616
|
}, null, 8, ["component", "color", "size", "className"])) : k("", !0),
|
|
617
617
|
_("div", xo, [
|
|
618
|
-
w.value ? (d(),
|
|
619
|
-
w.value ? k("", !0) : (d(),
|
|
618
|
+
w.value ? (d(), p("div", $o)) : k("", !0),
|
|
619
|
+
w.value ? k("", !0) : (d(), p("div", ko, O(B(v).actions.renderTitle(o.treeId, o.model.title)), 1))
|
|
620
620
|
])
|
|
621
621
|
]),
|
|
622
622
|
_("div", wo, [
|
|
623
|
-
((z =
|
|
623
|
+
((z = o.model.badge) == null ? void 0 : z.value) !== void 0 && !w.value ? (d(), b(Y(co), {
|
|
624
624
|
key: 0,
|
|
625
|
-
class: D([(y =
|
|
625
|
+
class: D([(y = o.model.badge) == null ? void 0 : y.class, "badge-sm"])
|
|
626
626
|
}, {
|
|
627
|
-
default:
|
|
628
|
-
K(O(
|
|
627
|
+
default: E(() => [
|
|
628
|
+
K(O(o.model.badge.value), 1)
|
|
629
629
|
]),
|
|
630
630
|
_: 1
|
|
631
631
|
}, 8, ["class"])) : k("", !0),
|
|
632
|
-
|
|
632
|
+
o.model.icons && o.model.icons.post && r.value && !o.search && !w.value ? (d(), b(Y(re), {
|
|
633
633
|
key: 1,
|
|
634
|
-
component:
|
|
634
|
+
component: B(oe).getters.getIcon(o.model.icons.post.component),
|
|
635
635
|
size: 20,
|
|
636
|
-
color:
|
|
636
|
+
color: o.model.icons.post.color ? o.model.icons.post.color : "inherit",
|
|
637
637
|
class: D(i.value ? "tree-open-post" : "")
|
|
638
638
|
}, null, 8, ["component", "color", "class"])) : k("", !0)
|
|
639
639
|
])
|
|
640
640
|
], 34)), [
|
|
641
641
|
[A, c]
|
|
642
642
|
]),
|
|
643
|
-
|
|
644
|
-
default:
|
|
645
|
-
|
|
646
|
-
(d(!0),
|
|
643
|
+
Q(uo, null, {
|
|
644
|
+
default: E(() => [
|
|
645
|
+
r.value && i.value && !o.search ? (d(), p("ul", So, [
|
|
646
|
+
(d(!0), p(le, null, ge(e.model.children, (F) => (d(), b(R, {
|
|
647
647
|
key: F.id,
|
|
648
648
|
model: F,
|
|
649
|
-
treeId:
|
|
650
|
-
items:
|
|
651
|
-
search:
|
|
649
|
+
treeId: o.treeId,
|
|
650
|
+
items: o.items,
|
|
651
|
+
search: o.search,
|
|
652
652
|
onNodeclick: u,
|
|
653
653
|
onNodedrop: h,
|
|
654
654
|
onNodecontext: x
|
|
@@ -660,11 +660,11 @@ const mo = (e) => (Lt("data-v-a476bb8e"), e = e(), It(), e), ho = {
|
|
|
660
660
|
];
|
|
661
661
|
}),
|
|
662
662
|
_: 1
|
|
663
|
-
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(),
|
|
663
|
+
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(), p("li", ho));
|
|
664
664
|
};
|
|
665
665
|
}
|
|
666
|
-
}, To = /* @__PURE__ */
|
|
667
|
-
function
|
|
666
|
+
}, To = /* @__PURE__ */ ne(Do, [["__scopeId", "data-v-a476bb8e"]]);
|
|
667
|
+
function Lo(e) {
|
|
668
668
|
return e = e || /* @__PURE__ */ new Map(), {
|
|
669
669
|
/**
|
|
670
670
|
* A Map of event names to registered handler functions.
|
|
@@ -676,9 +676,9 @@ function Co(e) {
|
|
|
676
676
|
* @param {Function} handler Function to call in response to given event
|
|
677
677
|
* @memberOf eventsBus
|
|
678
678
|
*/
|
|
679
|
-
on(
|
|
680
|
-
const n = e.get(
|
|
681
|
-
n ? n.push(
|
|
679
|
+
on(t, o) {
|
|
680
|
+
const n = e.get(t);
|
|
681
|
+
n ? n.push(o) : e.set(t, [o]);
|
|
682
682
|
},
|
|
683
683
|
/**
|
|
684
684
|
* Remove an event handler for the given type.
|
|
@@ -687,9 +687,9 @@ function Co(e) {
|
|
|
687
687
|
* @param {Function} [handler] Handler function to remove
|
|
688
688
|
* @memberOf eventsBus
|
|
689
689
|
*/
|
|
690
|
-
off(
|
|
691
|
-
const n = e.get(
|
|
692
|
-
n && (
|
|
690
|
+
off(t, o) {
|
|
691
|
+
const n = e.get(t);
|
|
692
|
+
n && (o ? n.splice(n.indexOf(o) >>> 0, 1) : e.set(t, []));
|
|
693
693
|
},
|
|
694
694
|
/**
|
|
695
695
|
* Invoke all handlers for the given type.
|
|
@@ -701,17 +701,17 @@ function Co(e) {
|
|
|
701
701
|
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
702
702
|
* @memberOf eventsBus
|
|
703
703
|
*/
|
|
704
|
-
emit(
|
|
705
|
-
let n = e.get(
|
|
704
|
+
emit(t, o) {
|
|
705
|
+
let n = e.get(t);
|
|
706
706
|
n && n.slice().map((s) => {
|
|
707
|
-
s(
|
|
707
|
+
s(o);
|
|
708
708
|
}), n = e.get("*"), n && n.slice().map((s) => {
|
|
709
|
-
s(
|
|
709
|
+
s(t, o);
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
|
-
const U =
|
|
714
|
+
const U = Lo(), v = {
|
|
715
715
|
state: Oe({
|
|
716
716
|
trees: {}
|
|
717
717
|
}),
|
|
@@ -723,41 +723,41 @@ const U = Co(), v = {
|
|
|
723
723
|
return v.state.trees[e].selected;
|
|
724
724
|
},
|
|
725
725
|
// data - ноды, dataId - ID ноды родителя data
|
|
726
|
-
getParentId(e,
|
|
727
|
-
return
|
|
726
|
+
getParentId(e, t, o, n = "id", s = "children", a = {}) {
|
|
727
|
+
return o && e && (e.find((l) => l[n] === o ? (a.found = t, l) : v.getters.getParentId(l[s], l.id, o, n, s, a)), a.found) ? a.found : !1;
|
|
728
728
|
}
|
|
729
729
|
},
|
|
730
730
|
mutations: {
|
|
731
|
-
setTreeItems(e,
|
|
732
|
-
v.state.trees[e].items =
|
|
731
|
+
setTreeItems(e, t) {
|
|
732
|
+
v.state.trees[e].items = t;
|
|
733
733
|
},
|
|
734
|
-
setItemSelect(e,
|
|
735
|
-
v.state.trees[e].noSelect || (v.state.trees[e].multiSelect ? v.state.trees[e].selected.includes(
|
|
736
|
-
return
|
|
737
|
-
}) : v.state.trees[e].selected = [...v.state.trees[e].selected,
|
|
734
|
+
setItemSelect(e, t) {
|
|
735
|
+
v.state.trees[e].noSelect || (v.state.trees[e].multiSelect ? v.state.trees[e].selected.includes(t.id) ? v.state.trees[e].selected = v.state.trees[e].selected.filter(function(o) {
|
|
736
|
+
return o !== t.id;
|
|
737
|
+
}) : v.state.trees[e].selected = [...v.state.trees[e].selected, t.id] : v.state.trees[e].selected = [t.id]);
|
|
738
738
|
}
|
|
739
739
|
},
|
|
740
740
|
actions: {
|
|
741
|
-
initTreeStore(e,
|
|
742
|
-
v.state.trees[e] = [], v.state.trees[e].selected = [], v.state.trees[e].noSelect =
|
|
741
|
+
initTreeStore(e, t, o, n, s, a, l, r = !0) {
|
|
742
|
+
v.state.trees[e] = [], v.state.trees[e].selected = [], v.state.trees[e].noSelect = t, v.state.trees[e].multiSelect = o, v.state.trees[e].expanded = n, v.state.trees[e].transfer = s, v.state.trees[e].renderTitle = a, v.state.trees[e].beforeItem = l, v.state.trees[e].dropInside = r;
|
|
743
743
|
},
|
|
744
|
-
renderTitle(e,
|
|
745
|
-
return v.state.trees[e].renderTitle ? v.state.trees[e].renderTitle(
|
|
744
|
+
renderTitle(e, t) {
|
|
745
|
+
return v.state.trees[e].renderTitle ? v.state.trees[e].renderTitle(t) : t;
|
|
746
746
|
},
|
|
747
|
-
beforeItem(e,
|
|
748
|
-
return v.state.trees[e].beforeItem ? v.state.trees[e].beforeItem(
|
|
747
|
+
beforeItem(e, t) {
|
|
748
|
+
return v.state.trees[e].beforeItem ? v.state.trees[e].beforeItem(t) : !0;
|
|
749
749
|
},
|
|
750
|
-
isItemSelected(e,
|
|
751
|
-
return v.state.trees[e].selected.includes(
|
|
750
|
+
isItemSelected(e, t) {
|
|
751
|
+
return v.state.trees[e].selected.includes(t);
|
|
752
752
|
},
|
|
753
|
-
toggleItem(e,
|
|
754
|
-
|
|
753
|
+
toggleItem(e, t) {
|
|
754
|
+
t.expanded = t.expanded === void 0 || !t.expanded, t.children && t.children.length && (t.expanded ? U.emit(`expand-${e}`, { id: e, model: t }) : U.emit(`collapse-${e}`, { id: e, model: t }));
|
|
755
755
|
},
|
|
756
756
|
isTreeExpanded(e) {
|
|
757
757
|
return v.state.trees[e].expanded;
|
|
758
758
|
},
|
|
759
|
-
isChildOfParent(e,
|
|
760
|
-
const s = v.actions.deepSearch(
|
|
759
|
+
isChildOfParent(e, t, o, n) {
|
|
760
|
+
const s = v.actions.deepSearch(t, o);
|
|
761
761
|
if (s && s.children) {
|
|
762
762
|
for (let a = 0; a < s.children.length; a++)
|
|
763
763
|
if (s.children[a].id === n)
|
|
@@ -766,17 +766,17 @@ const U = Co(), v = {
|
|
|
766
766
|
return !1;
|
|
767
767
|
},
|
|
768
768
|
// Является ли нода родителем указанного потомка
|
|
769
|
-
isParentOfChild(e,
|
|
770
|
-
const s = v.actions.deepSearch(
|
|
769
|
+
isParentOfChild(e, t, o, n) {
|
|
770
|
+
const s = v.actions.deepSearch(t, o);
|
|
771
771
|
return !!(s && s.children && v.actions.deepSearch(s.children, n));
|
|
772
772
|
},
|
|
773
|
-
deepSearch(e,
|
|
774
|
-
return
|
|
773
|
+
deepSearch(e, t, o = "id", n = "children", s = {}) {
|
|
774
|
+
return t && e && (e.find((a) => a[o] === t ? (s.found = a, a) : v.actions.deepSearch(a[n], t, o, n, s)), s.found) ? s.found : !1;
|
|
775
775
|
},
|
|
776
|
-
deepSearchByTitle(e,
|
|
777
|
-
if (
|
|
778
|
-
const
|
|
779
|
-
a[
|
|
776
|
+
deepSearchByTitle(e, t, o = "title", n = "children", s = []) {
|
|
777
|
+
if (t && e && (e.find((a) => {
|
|
778
|
+
const l = new RegExp(t, "gi");
|
|
779
|
+
a[o].toString().toLowerCase().match(l) !== null && s.push(a), v.actions.deepSearchByTitle(a[n], t, o, n, s);
|
|
780
780
|
}), s)) {
|
|
781
781
|
for (let a = 0; a < s.length; a++)
|
|
782
782
|
;
|
|
@@ -784,61 +784,61 @@ const U = Co(), v = {
|
|
|
784
784
|
}
|
|
785
785
|
return s;
|
|
786
786
|
},
|
|
787
|
-
moveTreeNode(e,
|
|
788
|
-
if (
|
|
789
|
-
const
|
|
790
|
-
v.actions.insertTreeNode(
|
|
787
|
+
moveTreeNode(e, t, o, n, s, a, l = !0) {
|
|
788
|
+
if (l) {
|
|
789
|
+
const r = v.actions.deleteTreeNode(o, n);
|
|
790
|
+
v.actions.insertTreeNode(o, s, r, a), U.emit(`move-${t}`, { fromTreeId: e, toTreeId: t, moved: r == null ? void 0 : r.id, target: s, position: a });
|
|
791
791
|
} else
|
|
792
|
-
U.emit(`move-${
|
|
792
|
+
U.emit(`move-${t}`, { fromTreeId: e, toTreeId: t, moved: n, target: s, position: a });
|
|
793
793
|
},
|
|
794
|
-
insertTreeNode(e,
|
|
794
|
+
insertTreeNode(e, t, o, n) {
|
|
795
795
|
if (e)
|
|
796
796
|
for (let s = 0; s < e.length; s++) {
|
|
797
|
-
if (e[s].id ===
|
|
798
|
-
let
|
|
799
|
-
return n === "after" ? (
|
|
797
|
+
if (e[s].id === t) {
|
|
798
|
+
let l = s;
|
|
799
|
+
return n === "after" ? (l++, e.splice(l, 0, o)) : n === "before" ? e.splice(l, 0, o) : n === "inside" && (Object.hasOwn(e[s], "children") || (e[s].children = [], e[s].opened = !0), e[s].children.splice(0, 0, o)), e[s];
|
|
800
800
|
}
|
|
801
|
-
const a = this.insertTreeNode(e[s].children,
|
|
801
|
+
const a = this.insertTreeNode(e[s].children, t, o, n);
|
|
802
802
|
if (a)
|
|
803
803
|
return a;
|
|
804
804
|
}
|
|
805
805
|
},
|
|
806
|
-
deleteTreeNode(e,
|
|
806
|
+
deleteTreeNode(e, t) {
|
|
807
807
|
if (e)
|
|
808
|
-
for (let
|
|
809
|
-
if (e[
|
|
810
|
-
const s = e[
|
|
811
|
-
return e.splice(
|
|
808
|
+
for (let o = 0; o < e.length; o++) {
|
|
809
|
+
if (e[o].id === t) {
|
|
810
|
+
const s = e[o];
|
|
811
|
+
return e.splice(o, 1), s;
|
|
812
812
|
}
|
|
813
|
-
const n = v.actions.deleteTreeNode(e[
|
|
813
|
+
const n = v.actions.deleteTreeNode(e[o].children, t);
|
|
814
814
|
if (n)
|
|
815
815
|
return n;
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
},
|
|
819
|
+
}, Co = {
|
|
820
820
|
__name: "DDrop",
|
|
821
821
|
props: {
|
|
822
822
|
tag: { type: String, default: "div" }
|
|
823
823
|
},
|
|
824
824
|
emits: Object.keys(X),
|
|
825
|
-
setup(e, { expose:
|
|
825
|
+
setup(e, { expose: t, emit: o }) {
|
|
826
826
|
let n = Oe({});
|
|
827
|
-
const s = T("false"), a = T(null),
|
|
828
|
-
n = Te.data,
|
|
827
|
+
const s = T("false"), a = T(null), l = /* @__PURE__ */ new Set(), r = m(() => s.value && n), i = (u, h) => {
|
|
828
|
+
n = Te.data, o(u, h, n), u === X.dragenter && (l.size || h.target === a.value) && l.add(h.target), u === X.dragleave && l.delete(h.target), u === X.drop && l.clear(), s.value = !!l.size;
|
|
829
829
|
};
|
|
830
|
-
return
|
|
830
|
+
return t({
|
|
831
831
|
elementSize: () => _t(a)
|
|
832
832
|
}), (u, h) => (d(), b(Y(e.tag), {
|
|
833
833
|
ref_key: "el",
|
|
834
834
|
ref: a,
|
|
835
|
-
onDragenter: h[0] || (h[0] = (x) => i(
|
|
836
|
-
onDragleave: h[1] || (h[1] = (x) => i(
|
|
837
|
-
onDragover: h[2] || (h[2] = j((x) => i(
|
|
838
|
-
onDrop: h[3] || (h[3] = j((x) => i(
|
|
835
|
+
onDragenter: h[0] || (h[0] = (x) => i(B(X).dragenter, x)),
|
|
836
|
+
onDragleave: h[1] || (h[1] = (x) => i(B(X).dragleave, x)),
|
|
837
|
+
onDragover: h[2] || (h[2] = j((x) => i(B(X).dragover, x), ["prevent"])),
|
|
838
|
+
onDrop: h[3] || (h[3] = j((x) => i(B(X).drop, x), ["prevent"]))
|
|
839
839
|
}, {
|
|
840
|
-
default:
|
|
841
|
-
|
|
840
|
+
default: E(() => [
|
|
841
|
+
C(u.$slots, "default", { transferData: r.value })
|
|
842
842
|
]),
|
|
843
843
|
_: 3
|
|
844
844
|
}, 544));
|
|
@@ -861,31 +861,31 @@ const U = Co(), v = {
|
|
|
861
861
|
}
|
|
862
862
|
},
|
|
863
863
|
emits: ["select"],
|
|
864
|
-
setup(e, { expose:
|
|
864
|
+
setup(e, { expose: t, emit: o }) {
|
|
865
865
|
const n = e;
|
|
866
866
|
let s = T(null), a = T(!1);
|
|
867
|
-
const
|
|
867
|
+
const l = () => {
|
|
868
868
|
U.emit("menu-show-request"), a.value = !0;
|
|
869
|
-
},
|
|
869
|
+
}, r = () => {
|
|
870
870
|
var x;
|
|
871
871
|
(x = s.value) == null || x.collapseAll(), a.value = !1;
|
|
872
872
|
}, i = () => a.value;
|
|
873
873
|
U.on("menu-show-request", () => {
|
|
874
|
-
|
|
875
|
-
}),
|
|
876
|
-
show:
|
|
877
|
-
hide:
|
|
874
|
+
r();
|
|
875
|
+
}), t({
|
|
876
|
+
show: l,
|
|
877
|
+
hide: r,
|
|
878
878
|
elementSize: () => s.value.elementSize(),
|
|
879
879
|
isShowed: i,
|
|
880
880
|
itemsCount: () => s.value.itemsCount()
|
|
881
881
|
});
|
|
882
882
|
const h = (x) => {
|
|
883
|
-
|
|
883
|
+
o("select", x), x.model.children || r();
|
|
884
884
|
};
|
|
885
885
|
return (x, S) => {
|
|
886
886
|
const N = Re("click-outside");
|
|
887
887
|
return d(), b(mt, { to: "body" }, [
|
|
888
|
-
|
|
888
|
+
B(a) ? J((d(), b(xt, {
|
|
889
889
|
key: 0,
|
|
890
890
|
ref_key: "treeRef",
|
|
891
891
|
ref: s,
|
|
@@ -897,7 +897,7 @@ const U = Co(), v = {
|
|
|
897
897
|
"render-title": n.renderItemTitle,
|
|
898
898
|
"before-item": n.beforeItem
|
|
899
899
|
}, null, 8, ["items", "no-select", "class", "style", "render-title", "before-item"])), [
|
|
900
|
-
[N, () =>
|
|
900
|
+
[N, () => r()]
|
|
901
901
|
]) : k("", !0)
|
|
902
902
|
]);
|
|
903
903
|
};
|
|
@@ -910,26 +910,26 @@ const U = Co(), v = {
|
|
|
910
910
|
beforeItem: Function
|
|
911
911
|
},
|
|
912
912
|
emits: ["select"],
|
|
913
|
-
setup(e, { expose:
|
|
914
|
-
const n = e, s = T(null), a = T(0),
|
|
913
|
+
setup(e, { expose: t, emit: o }) {
|
|
914
|
+
const n = e, s = T(null), a = T(0), l = T(0), r = m(() => ({
|
|
915
915
|
left: a.value + "px",
|
|
916
|
-
top:
|
|
916
|
+
top: l.value + "px"
|
|
917
917
|
})), i = (u) => {
|
|
918
918
|
s.value.show(), ht(() => {
|
|
919
919
|
const h = s.value.elementSize(), x = window.innerWidth, S = window.innerHeight;
|
|
920
|
-
a.value = x - u.pageX < h.width ? u.pageX - h.width : u.pageX,
|
|
920
|
+
a.value = x - u.pageX < h.width ? u.pageX - h.width : u.pageX, l.value = S - u.pageY < h.height ? u.pageY - h.height : u.pageY, s.value.itemsCount() === 0 && s.value.hide();
|
|
921
921
|
});
|
|
922
922
|
}, c = (u) => {
|
|
923
|
-
|
|
923
|
+
o("select", u);
|
|
924
924
|
};
|
|
925
|
-
return
|
|
925
|
+
return t({
|
|
926
926
|
show: i
|
|
927
927
|
}), (u, h) => (d(), b(bt, {
|
|
928
928
|
ref_key: "dMenuRef",
|
|
929
929
|
ref: s,
|
|
930
930
|
onSelect: c,
|
|
931
931
|
items: n.items,
|
|
932
|
-
style: V(
|
|
932
|
+
style: V(r.value),
|
|
933
933
|
class: "context-menu",
|
|
934
934
|
"no-select": !0,
|
|
935
935
|
"render-item-title": n.renderItemTitle,
|
|
@@ -978,42 +978,42 @@ const U = Co(), v = {
|
|
|
978
978
|
}
|
|
979
979
|
},
|
|
980
980
|
emits: ["select", "collapse", "expand", "move", "over", "drop"],
|
|
981
|
-
setup(e, { expose:
|
|
982
|
-
const n = e, s = T(null), a = T(!1),
|
|
983
|
-
v.actions.initTreeStore(
|
|
981
|
+
setup(e, { expose: t, emit: o }) {
|
|
982
|
+
const n = e, s = T(null), a = T(!1), l = T(null), r = gt().uid;
|
|
983
|
+
v.actions.initTreeStore(r, n.noSelect, n.multiSelect, n.expanded, n.transfer, n.renderTitle, n.beforeItem, n.dropInside);
|
|
984
984
|
const i = (y, F) => {
|
|
985
985
|
console.log(y, F);
|
|
986
986
|
};
|
|
987
|
-
U.on(`expand-${
|
|
988
|
-
|
|
989
|
-
}), U.on(`collapse-${
|
|
990
|
-
|
|
991
|
-
}), U.on(`move-${
|
|
992
|
-
|
|
987
|
+
U.on(`expand-${r}`, (y) => {
|
|
988
|
+
o("expand", y);
|
|
989
|
+
}), U.on(`collapse-${r}`, (y) => {
|
|
990
|
+
o("collapse", y);
|
|
991
|
+
}), U.on(`move-${r}`, (y) => {
|
|
992
|
+
o("move", y);
|
|
993
993
|
});
|
|
994
994
|
const c = m(() => n.search ? v.actions.deepSearchByTitle(n.items, n.search) : n.items), u = (y = null) => {
|
|
995
|
-
v.mutations.setItemSelect(
|
|
995
|
+
v.mutations.setItemSelect(r, y.model), v.actions.toggleItem(r, y.model), o("select", y);
|
|
996
996
|
}, h = (y = null) => {
|
|
997
|
-
|
|
997
|
+
o("over", y);
|
|
998
998
|
}, x = (y = null) => {
|
|
999
|
-
|
|
999
|
+
o("drop", y);
|
|
1000
1000
|
}, S = () => s.value.elementSize(), N = () => {
|
|
1001
1001
|
for (let y = 0; y < n.items.length; y++)
|
|
1002
1002
|
n.items[y].expanded = !0;
|
|
1003
1003
|
}, $ = () => {
|
|
1004
1004
|
for (let y = 0; y < n.items.length; y++)
|
|
1005
1005
|
n.items[y].expanded = !1;
|
|
1006
|
-
}, H = () =>
|
|
1007
|
-
P(y) && v.mutations.setItemSelect(
|
|
1006
|
+
}, H = () => r, P = (y) => v.actions.deepSearch(n.items, y), w = (y) => {
|
|
1007
|
+
P(y) && v.mutations.setItemSelect(r, P(y));
|
|
1008
1008
|
}, I = (y) => {
|
|
1009
|
-
n.contextClick({ e: y.e, model: y.model, target:
|
|
1010
|
-
}, M = (y) => n.contextBeforeClick({ model: y, target:
|
|
1009
|
+
n.contextClick({ e: y.e, model: y.model, target: l.value });
|
|
1010
|
+
}, M = (y) => n.contextBeforeClick({ model: y, target: l.value }), g = m(() => n.context), R = (y) => (g.value && (l.value = y.model, a.value.show(y.e)), !1), A = () => z(c.value), z = (y) => {
|
|
1011
1011
|
let F = 0;
|
|
1012
|
-
for (let
|
|
1013
|
-
F += v.actions.beforeItem(
|
|
1012
|
+
for (let f = 0; f < y.length; f++)
|
|
1013
|
+
F += v.actions.beforeItem(r, y[f]) ? 1 : 0, y[f].children && y[f].children.length > 0 && (F += z(y[f].children));
|
|
1014
1014
|
return F;
|
|
1015
1015
|
};
|
|
1016
|
-
return
|
|
1016
|
+
return t({
|
|
1017
1017
|
elementSize: S,
|
|
1018
1018
|
expandAll: N,
|
|
1019
1019
|
collapseAll: $,
|
|
@@ -1021,18 +1021,18 @@ const U = Co(), v = {
|
|
|
1021
1021
|
getNode: P,
|
|
1022
1022
|
selectNode: w,
|
|
1023
1023
|
itemsCount: A
|
|
1024
|
-
}), (y, F) => (d(), b(
|
|
1024
|
+
}), (y, F) => (d(), b(Co, {
|
|
1025
1025
|
ref_key: "treeRef",
|
|
1026
1026
|
ref: s,
|
|
1027
1027
|
class: "tree",
|
|
1028
1028
|
tag: "ul",
|
|
1029
1029
|
onDrop: j(i, ["stop"])
|
|
1030
1030
|
}, {
|
|
1031
|
-
default:
|
|
1032
|
-
(d(!0),
|
|
1033
|
-
key:
|
|
1034
|
-
model:
|
|
1035
|
-
treeId:
|
|
1031
|
+
default: E(() => [
|
|
1032
|
+
(d(!0), p(le, null, ge(c.value, (f) => (d(), b(To, {
|
|
1033
|
+
key: f.id,
|
|
1034
|
+
model: f,
|
|
1035
|
+
treeId: B(r),
|
|
1036
1036
|
items: n.items,
|
|
1037
1037
|
search: n.search,
|
|
1038
1038
|
onNodeclick: u,
|
|
@@ -1065,20 +1065,20 @@ const Bo = {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
},
|
|
1067
1067
|
emits: ["move"],
|
|
1068
|
-
setup(e, { emit:
|
|
1069
|
-
const
|
|
1070
|
-
|
|
1068
|
+
setup(e, { emit: t }) {
|
|
1069
|
+
const o = e, n = (s) => {
|
|
1070
|
+
t("move", s);
|
|
1071
1071
|
};
|
|
1072
1072
|
return (s, a) => (d(), b(xt, {
|
|
1073
1073
|
class: "accordion",
|
|
1074
|
-
items:
|
|
1075
|
-
"no-select":
|
|
1076
|
-
"render-title":
|
|
1074
|
+
items: o.items,
|
|
1075
|
+
"no-select": o.noSelect,
|
|
1076
|
+
"render-title": o.renderTitle,
|
|
1077
1077
|
"drop-inside": !1,
|
|
1078
1078
|
onMove: n
|
|
1079
1079
|
}, null, 8, ["items", "no-select", "render-title"]));
|
|
1080
1080
|
}
|
|
1081
|
-
},
|
|
1081
|
+
}, Es = /* @__PURE__ */ ne(Bo, [["__scopeId", "data-v-a724c500"]]), Eo = {
|
|
1082
1082
|
__name: "DLayoutHeader",
|
|
1083
1083
|
props: {
|
|
1084
1084
|
fixed: {
|
|
@@ -1112,15 +1112,15 @@ const Bo = {
|
|
|
1112
1112
|
useMinWidthLayout: Boolean
|
|
1113
1113
|
},
|
|
1114
1114
|
setup(e) {
|
|
1115
|
-
const
|
|
1116
|
-
const { fixed: n, zIndex: s, minWidth: a, height:
|
|
1117
|
-
return `position:${u};z-index:${s};${h}height:${
|
|
1115
|
+
const t = e, o = m(() => {
|
|
1116
|
+
const { fixed: n, zIndex: s, minWidth: a, height: l, paddingLeft: r, transitionDuration: i, transitionTimingFunction: c } = t, u = n ? "fixed" : "static", h = t.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1117
|
+
return `position:${u};z-index:${s};${h}height:${l}px;padding-left:${r}px;transition-duration:${i}ms;transition-timing-function:${c};`;
|
|
1118
1118
|
});
|
|
1119
|
-
return (n, s) => (d(),
|
|
1119
|
+
return (n, s) => (d(), p("header", {
|
|
1120
1120
|
class: "d-layout-header",
|
|
1121
|
-
style: V(
|
|
1121
|
+
style: V(o.value)
|
|
1122
1122
|
}, [
|
|
1123
|
-
|
|
1123
|
+
C(n.$slots, "default")
|
|
1124
1124
|
], 4));
|
|
1125
1125
|
}
|
|
1126
1126
|
}, Mo = {
|
|
@@ -1161,15 +1161,15 @@ const Bo = {
|
|
|
1161
1161
|
useMinWidthLayout: Boolean
|
|
1162
1162
|
},
|
|
1163
1163
|
setup(e) {
|
|
1164
|
-
const
|
|
1165
|
-
const { fixed: n, top: s, zIndex: a, minWidth:
|
|
1166
|
-
return `position:${h};top:${s}px;z-index:${a};${x}height:${
|
|
1164
|
+
const t = e, o = m(() => {
|
|
1165
|
+
const { fixed: n, top: s, zIndex: a, minWidth: l, height: r, paddingLeft: i, transitionDuration: c, transitionTimingFunction: u } = t, h = n ? "fixed" : "static", x = t.useMinWidthLayout ? `min-width: ${l}px;` : "";
|
|
1166
|
+
return `position:${h};top:${s}px;z-index:${a};${x}height:${r}px;padding-left:${i}px;transition-duration:${c}ms;transition-timing-function:${u};`;
|
|
1167
1167
|
});
|
|
1168
|
-
return (n, s) => (d(),
|
|
1168
|
+
return (n, s) => (d(), p("div", {
|
|
1169
1169
|
class: "d-layout-tab",
|
|
1170
|
-
style: V(
|
|
1170
|
+
style: V(o.value)
|
|
1171
1171
|
}, [
|
|
1172
|
-
|
|
1172
|
+
C(n.$slots, "default")
|
|
1173
1173
|
], 4));
|
|
1174
1174
|
}
|
|
1175
1175
|
}, No = {
|
|
@@ -1206,15 +1206,15 @@ const Bo = {
|
|
|
1206
1206
|
useMinWidthLayout: Boolean
|
|
1207
1207
|
},
|
|
1208
1208
|
setup(e) {
|
|
1209
|
-
const
|
|
1210
|
-
const { fixed: n, zIndex: s, minWidth: a, height:
|
|
1211
|
-
return `position:${u};z-index:${s};${h}height:${
|
|
1209
|
+
const t = e, o = m(() => {
|
|
1210
|
+
const { fixed: n, zIndex: s, minWidth: a, height: l, paddingLeft: r, transitionDuration: i, transitionTimingFunction: c } = t, u = n ? "fixed" : "static", h = t.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1211
|
+
return `position:${u};z-index:${s};${h}height:${l}px;padding-left:${r}px;transition-duration:${i}ms;transition-timing-function:${c};`;
|
|
1212
1212
|
});
|
|
1213
|
-
return (n, s) => (d(),
|
|
1213
|
+
return (n, s) => (d(), p("footer", {
|
|
1214
1214
|
class: "d-layout-footer",
|
|
1215
|
-
style: V(
|
|
1215
|
+
style: V(o.value)
|
|
1216
1216
|
}, [
|
|
1217
|
-
|
|
1217
|
+
C(n.$slots, "default")
|
|
1218
1218
|
], 4));
|
|
1219
1219
|
}
|
|
1220
1220
|
}, Ro = {
|
|
@@ -1246,15 +1246,15 @@ const Bo = {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
},
|
|
1248
1248
|
setup(e) {
|
|
1249
|
-
const
|
|
1250
|
-
const { zIndex: n, width: s, paddingTop: a, transitionDuration:
|
|
1251
|
-
return `z-index:${n};width:${s}px;padding-top:${a}px;transition-duration:${
|
|
1249
|
+
const t = e, o = m(() => {
|
|
1250
|
+
const { zIndex: n, width: s, paddingTop: a, transitionDuration: l, transitionTimingFunction: r } = t;
|
|
1251
|
+
return `z-index:${n};width:${s}px;padding-top:${a}px;transition-duration:${l}ms;transition-timing-function:${r};`;
|
|
1252
1252
|
});
|
|
1253
|
-
return (n, s) => (d(),
|
|
1253
|
+
return (n, s) => (d(), p("aside", {
|
|
1254
1254
|
class: "d-layout-sidebar",
|
|
1255
|
-
style: V(
|
|
1255
|
+
style: V(o.value)
|
|
1256
1256
|
}, [
|
|
1257
|
-
|
|
1257
|
+
C(n.$slots, "default")
|
|
1258
1258
|
], 4));
|
|
1259
1259
|
}
|
|
1260
1260
|
}, Oo = {
|
|
@@ -1283,48 +1283,48 @@ const Bo = {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
},
|
|
1285
1285
|
setup(e) {
|
|
1286
|
-
const
|
|
1287
|
-
const { paddingTop: n, paddingBottom: s, paddingLeft: a, transitionDuration:
|
|
1288
|
-
return `padding-top:${n}px;padding-bottom:${s}px;padding-left:${a}px;${i}transition-duration:${
|
|
1286
|
+
const t = e, o = m(() => {
|
|
1287
|
+
const { paddingTop: n, paddingBottom: s, paddingLeft: a, transitionDuration: l, transitionTimingFunction: r } = t, i = `overflow:${t.overflowHidden ? "hidden" : "visible"};`;
|
|
1288
|
+
return `padding-top:${n}px;padding-bottom:${s}px;padding-left:${a}px;${i}transition-duration:${l}ms;transition-timing-function:${r};`;
|
|
1289
1289
|
});
|
|
1290
|
-
return (n, s) => (d(),
|
|
1291
|
-
style: V(
|
|
1290
|
+
return (n, s) => (d(), p("main", {
|
|
1291
|
+
style: V(o.value),
|
|
1292
1292
|
class: "d-layout-content"
|
|
1293
1293
|
}, [
|
|
1294
|
-
|
|
1294
|
+
C(n.$slots, "default")
|
|
1295
1295
|
], 4));
|
|
1296
1296
|
}
|
|
1297
1297
|
};
|
|
1298
1298
|
function Ao(e) {
|
|
1299
|
-
const
|
|
1299
|
+
const t = T(0), o = m(() => `transform: translateX(${-t.value}px);`);
|
|
1300
1300
|
let n = !1;
|
|
1301
1301
|
function s(u) {
|
|
1302
|
-
|
|
1302
|
+
t.value = u;
|
|
1303
1303
|
}
|
|
1304
1304
|
function a() {
|
|
1305
1305
|
var u;
|
|
1306
1306
|
const h = ((u = document.scrollingElement) === null || u === void 0 ? void 0 : u.scrollLeft) || 0;
|
|
1307
1307
|
s(h);
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function l() {
|
|
1310
1310
|
a();
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function r() {
|
|
1313
1313
|
document.addEventListener("scroll", a);
|
|
1314
1314
|
}
|
|
1315
1315
|
function i() {
|
|
1316
1316
|
n && document.removeEventListener("scroll", a);
|
|
1317
1317
|
}
|
|
1318
1318
|
function c() {
|
|
1319
|
-
|
|
1319
|
+
l(), r(), n = !0;
|
|
1320
1320
|
}
|
|
1321
1321
|
return vt(e, (u) => {
|
|
1322
1322
|
u ? c() : i();
|
|
1323
1323
|
}, { immediate: !0 }), Bt(() => {
|
|
1324
1324
|
i();
|
|
1325
|
-
}),
|
|
1325
|
+
}), o;
|
|
1326
1326
|
}
|
|
1327
|
-
const Ho = 1001, Vo = 999, zo = 998,
|
|
1327
|
+
const Ho = 1001, Vo = 999, zo = 998, Ms = {
|
|
1328
1328
|
__name: "DLayoutAdmin",
|
|
1329
1329
|
props: {
|
|
1330
1330
|
mode: {
|
|
@@ -1414,37 +1414,37 @@ const Ho = 1001, Vo = 999, zo = 998, Ls = {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
},
|
|
1416
1416
|
emits: ["update:sidebar-collapse", "sidebar-mask-click"],
|
|
1417
|
-
setup(e, { emit:
|
|
1418
|
-
const
|
|
1419
|
-
const { transitionDuration: g, transitionTimingFunction: R } =
|
|
1417
|
+
setup(e, { emit: t }) {
|
|
1418
|
+
const o = e, n = m(() => o.useMinWidthLayout ? `min-width:${o.minWidth}px;` : ""), s = m(() => o.useMinWidthLayout && (o.fixedHeaderAndTab || o.fixedFooter)), a = Ao(s), l = m(() => o.fixedHeaderAndTab ? a.value : ""), r = m(() => o.fixedFooter ? a.value : ""), i = m(() => {
|
|
1419
|
+
const { transitionDuration: g, transitionTimingFunction: R } = o;
|
|
1420
1420
|
return {
|
|
1421
1421
|
transitionDuration: g,
|
|
1422
1422
|
transitionTimingFunction: R
|
|
1423
1423
|
};
|
|
1424
|
-
}), c = m(() =>
|
|
1424
|
+
}), c = m(() => o.mode === "vertical"), u = m(() => o.isMobile || c.value ? 1003 : 1e3), h = m({
|
|
1425
1425
|
get() {
|
|
1426
|
-
return
|
|
1426
|
+
return o.sidebarCollapse;
|
|
1427
1427
|
},
|
|
1428
1428
|
set(g) {
|
|
1429
|
-
|
|
1429
|
+
t("update:sidebar-collapse", g);
|
|
1430
1430
|
}
|
|
1431
1431
|
});
|
|
1432
1432
|
function x() {
|
|
1433
|
-
|
|
1433
|
+
t("sidebar-mask-click");
|
|
1434
1434
|
}
|
|
1435
|
-
const S = m(() =>
|
|
1436
|
-
const { transitionDuration: g, transitionTimingFunction: R } =
|
|
1437
|
-
return `background-color:${
|
|
1435
|
+
const S = m(() => o.isMobile && !h.value), N = m(() => {
|
|
1436
|
+
const { transitionDuration: g, transitionTimingFunction: R } = o;
|
|
1437
|
+
return `background-color:${o.maskBg};transition-duration:${g}ms;transition-timing-function:${R};`;
|
|
1438
1438
|
}), $ = m(() => {
|
|
1439
|
-
const { sidebarWidth: g, sidebarCollapsedWidth: R } =
|
|
1440
|
-
return
|
|
1441
|
-
}), H = m(() =>
|
|
1442
|
-
() => !
|
|
1439
|
+
const { sidebarWidth: g, sidebarCollapsedWidth: R } = o, A = o.isMobile ? 0 : R, z = h.value ? A : g;
|
|
1440
|
+
return o.sidebarVisible ? z : 0;
|
|
1441
|
+
}), H = m(() => o.isMobile ? 0 : $.value), P = m(() => c.value ? H.value : 0), w = m(
|
|
1442
|
+
() => !o.isMobile && !c.value && o.headerVisible ? o.headerHeight : 0
|
|
1443
1443
|
), I = m(() => {
|
|
1444
1444
|
let g = 0;
|
|
1445
|
-
return
|
|
1446
|
-
}), M = m(() =>
|
|
1447
|
-
return (g, R) => (d(),
|
|
1445
|
+
return o.fixedHeaderAndTab && (o.headerVisible && (g += o.headerHeight), o.tabVisible && (g += o.tabHeight)), g;
|
|
1446
|
+
}), M = m(() => o.fixedFooter && o.footerVisible ? o.footerHeight : 0);
|
|
1447
|
+
return (g, R) => (d(), p("div", {
|
|
1448
1448
|
class: "d-layout",
|
|
1449
1449
|
style: V(n.value)
|
|
1450
1450
|
}, [
|
|
@@ -1454,10 +1454,10 @@ const Ho = 1001, Vo = 999, zo = 998, Ls = {
|
|
|
1454
1454
|
"min-width": e.minWidth,
|
|
1455
1455
|
height: e.headerHeight,
|
|
1456
1456
|
"padding-left": P.value,
|
|
1457
|
-
style:
|
|
1457
|
+
style: l.value
|
|
1458
1458
|
}), {
|
|
1459
|
-
default:
|
|
1460
|
-
|
|
1459
|
+
default: E(() => [
|
|
1460
|
+
C(g.$slots, "header")
|
|
1461
1461
|
]),
|
|
1462
1462
|
_: 3
|
|
1463
1463
|
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : k("", !0),
|
|
@@ -1468,10 +1468,10 @@ const Ho = 1001, Vo = 999, zo = 998, Ls = {
|
|
|
1468
1468
|
top: e.headerHeight,
|
|
1469
1469
|
height: e.tabHeight,
|
|
1470
1470
|
"padding-left": H.value,
|
|
1471
|
-
style:
|
|
1471
|
+
style: l.value
|
|
1472
1472
|
}), {
|
|
1473
|
-
default:
|
|
1474
|
-
|
|
1473
|
+
default: E(() => [
|
|
1474
|
+
C(g.$slots, "tab")
|
|
1475
1475
|
]),
|
|
1476
1476
|
_: 3
|
|
1477
1477
|
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : k("", !0),
|
|
@@ -1480,25 +1480,25 @@ const Ho = 1001, Vo = 999, zo = 998, Ls = {
|
|
|
1480
1480
|
width: $.value,
|
|
1481
1481
|
"padding-top": w.value
|
|
1482
1482
|
}), {
|
|
1483
|
-
default:
|
|
1484
|
-
|
|
1483
|
+
default: E(() => [
|
|
1484
|
+
C(g.$slots, "sidebar")
|
|
1485
1485
|
]),
|
|
1486
1486
|
_: 3
|
|
1487
1487
|
}, 16, ["z-index", "width", "padding-top"])) : k("", !0),
|
|
1488
|
-
S.value ? (d(),
|
|
1488
|
+
S.value ? (d(), p("div", {
|
|
1489
1489
|
key: 3,
|
|
1490
1490
|
class: "d-layout-sidebar-mask",
|
|
1491
1491
|
style: V(N.value),
|
|
1492
1492
|
onClick: x
|
|
1493
1493
|
}, null, 4)) : k("", !0),
|
|
1494
|
-
|
|
1494
|
+
Q(Oo, ue(i.value, {
|
|
1495
1495
|
"padding-top": I.value,
|
|
1496
1496
|
"padding-bottom": M.value,
|
|
1497
1497
|
"padding-left": H.value,
|
|
1498
1498
|
"overflow-hidden": e.addMainOverflowHidden
|
|
1499
1499
|
}), {
|
|
1500
|
-
default:
|
|
1501
|
-
|
|
1500
|
+
default: E(() => [
|
|
1501
|
+
C(g.$slots, "default")
|
|
1502
1502
|
]),
|
|
1503
1503
|
_: 3
|
|
1504
1504
|
}, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
|
|
@@ -1508,10 +1508,10 @@ const Ho = 1001, Vo = 999, zo = 998, Ls = {
|
|
|
1508
1508
|
"min-width": e.minWidth,
|
|
1509
1509
|
height: e.footerHeight,
|
|
1510
1510
|
"padding-left": H.value,
|
|
1511
|
-
style:
|
|
1511
|
+
style: r.value
|
|
1512
1512
|
}), {
|
|
1513
|
-
default:
|
|
1514
|
-
|
|
1513
|
+
default: E(() => [
|
|
1514
|
+
C(g.$slots, "footer")
|
|
1515
1515
|
]),
|
|
1516
1516
|
_: 3
|
|
1517
1517
|
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : k("", !0)
|
|
@@ -1536,7 +1536,7 @@ const Ho = 1001, Vo = 999, zo = 998, Ls = {
|
|
|
1536
1536
|
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);
|
|
1537
1537
|
}
|
|
1538
1538
|
}
|
|
1539
|
-
},
|
|
1539
|
+
}, Ns = {
|
|
1540
1540
|
__name: "DConfigProvider",
|
|
1541
1541
|
props: {
|
|
1542
1542
|
theme: {
|
|
@@ -1545,11 +1545,11 @@ const Ho = 1001, Vo = 999, zo = 998, Ls = {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
},
|
|
1547
1547
|
setup(e) {
|
|
1548
|
-
const
|
|
1549
|
-
return pe.mutations.setTheme(
|
|
1548
|
+
const t = e;
|
|
1549
|
+
return pe.mutations.setTheme(t.theme), (o, n) => C(o.$slots, "default");
|
|
1550
1550
|
}
|
|
1551
1551
|
};
|
|
1552
|
-
const
|
|
1552
|
+
const Rs = {
|
|
1553
1553
|
__name: "DScrollProvider",
|
|
1554
1554
|
props: {
|
|
1555
1555
|
xHide: {
|
|
@@ -1562,18 +1562,18 @@ const Bs = {
|
|
|
1562
1562
|
}
|
|
1563
1563
|
},
|
|
1564
1564
|
setup(e) {
|
|
1565
|
-
const
|
|
1565
|
+
const t = e;
|
|
1566
1566
|
Ae((a) => ({
|
|
1567
|
-
e35a6f9a:
|
|
1567
|
+
e35a6f9a: o.value,
|
|
1568
1568
|
e35a6f98: n.value
|
|
1569
1569
|
}));
|
|
1570
|
-
const
|
|
1570
|
+
const o = m(() => t.xHide ? "hidden" : "visible"), n = m(() => t.yHide ? "hidden" : "visible"), s = (a) => {
|
|
1571
1571
|
document.body.classList.add(a), document.documentElement.classList.add(a), document.documentElement.classList.add("d-global-scroll");
|
|
1572
1572
|
};
|
|
1573
1573
|
return me(() => {
|
|
1574
1574
|
s("colored-scroller");
|
|
1575
|
-
}), (a,
|
|
1576
|
-
|
|
1575
|
+
}), (a, l) => (d(), p("div", null, [
|
|
1576
|
+
C(a.$slots, "default")
|
|
1577
1577
|
]));
|
|
1578
1578
|
}
|
|
1579
1579
|
};
|
|
@@ -1594,19 +1594,19 @@ const Fo = {
|
|
|
1594
1594
|
}
|
|
1595
1595
|
},
|
|
1596
1596
|
setup(e) {
|
|
1597
|
-
const
|
|
1597
|
+
const t = e;
|
|
1598
1598
|
Ae((s) => ({
|
|
1599
|
-
c07fa29a:
|
|
1599
|
+
c07fa29a: o.value,
|
|
1600
1600
|
c07fa298: n.value
|
|
1601
1601
|
}));
|
|
1602
|
-
const
|
|
1603
|
-
return (s, a) => (d(),
|
|
1604
|
-
class: D(
|
|
1602
|
+
const o = m(() => t.xHide ? "hidden" : "visible"), n = m(() => t.yHide ? "hidden" : "visible");
|
|
1603
|
+
return (s, a) => (d(), p("div", {
|
|
1604
|
+
class: D(t.autoHide ? "d-scroll-hide" : "d-scroll")
|
|
1605
1605
|
}, [
|
|
1606
|
-
|
|
1606
|
+
C(s.$slots, "default", {}, void 0, !0)
|
|
1607
1607
|
], 2));
|
|
1608
1608
|
}
|
|
1609
|
-
},
|
|
1609
|
+
}, Os = /* @__PURE__ */ ne(Fo, [["__scopeId", "data-v-d50b3609"]]), Wo = { class: "modal-content" }, Po = { class: "modal-header" }, jo = { class: "modal-title" }, Xo = { class: "modal-body" }, Yo = { class: "modal-footer" }, $t = {
|
|
1610
1610
|
__name: "DModal",
|
|
1611
1611
|
props: {
|
|
1612
1612
|
show: Boolean,
|
|
@@ -1616,23 +1616,23 @@ const Fo = {
|
|
|
1616
1616
|
// максимальная ширина диалога 500px, 100% и т.п.
|
|
1617
1617
|
},
|
|
1618
1618
|
emits: ["open", "close"],
|
|
1619
|
-
setup(e, { expose:
|
|
1619
|
+
setup(e, { expose: t, emit: o }) {
|
|
1620
1620
|
const n = e, s = T(null), a = T(!1);
|
|
1621
1621
|
a.value = n == null ? void 0 : n.show;
|
|
1622
|
-
const
|
|
1623
|
-
a.value = !0,
|
|
1624
|
-
},
|
|
1625
|
-
a.value = !1,
|
|
1622
|
+
const l = () => {
|
|
1623
|
+
a.value = !0, o("open", s);
|
|
1624
|
+
}, r = () => {
|
|
1625
|
+
a.value = !1, o("close", s);
|
|
1626
1626
|
};
|
|
1627
|
-
return
|
|
1628
|
-
show:
|
|
1629
|
-
hide:
|
|
1627
|
+
return t({
|
|
1628
|
+
show: l,
|
|
1629
|
+
hide: r
|
|
1630
1630
|
}), (i, c) => {
|
|
1631
1631
|
const u = Re("keydown");
|
|
1632
1632
|
return d(), b(mt, { to: "body" }, [
|
|
1633
|
-
|
|
1634
|
-
default:
|
|
1635
|
-
a.value ? J((d(),
|
|
1633
|
+
Q(Ne, { name: "fade" }, {
|
|
1634
|
+
default: E(() => [
|
|
1635
|
+
a.value ? J((d(), p("div", {
|
|
1636
1636
|
key: 0,
|
|
1637
1637
|
ref_key: "modalRef",
|
|
1638
1638
|
ref: s,
|
|
@@ -1645,19 +1645,19 @@ const Fo = {
|
|
|
1645
1645
|
_("div", Wo, [
|
|
1646
1646
|
_("div", Po, [
|
|
1647
1647
|
_("h5", jo, [
|
|
1648
|
-
|
|
1648
|
+
C(i.$slots, "modal-title")
|
|
1649
1649
|
])
|
|
1650
1650
|
]),
|
|
1651
1651
|
_("div", Xo, [
|
|
1652
|
-
|
|
1652
|
+
C(i.$slots, "default")
|
|
1653
1653
|
]),
|
|
1654
1654
|
_("div", Yo, [
|
|
1655
|
-
|
|
1655
|
+
C(i.$slots, "modal-footer")
|
|
1656
1656
|
])
|
|
1657
1657
|
])
|
|
1658
1658
|
], 4)
|
|
1659
1659
|
])), [
|
|
1660
|
-
[u,
|
|
1660
|
+
[u, r, "Escape"]
|
|
1661
1661
|
]) : k("", !0)
|
|
1662
1662
|
]),
|
|
1663
1663
|
_: 3
|
|
@@ -1669,21 +1669,21 @@ const Fo = {
|
|
|
1669
1669
|
function Me(e) {
|
|
1670
1670
|
e === void 0 && (e = ce.value.comp.returnValue()), ce.value.resolve(e), ce.value = null;
|
|
1671
1671
|
}
|
|
1672
|
-
function kt(e,
|
|
1672
|
+
function kt(e, t, o = "default") {
|
|
1673
1673
|
return new Promise((n) => {
|
|
1674
1674
|
ce.value = {
|
|
1675
1675
|
dialog: e,
|
|
1676
|
-
props:
|
|
1677
|
-
wrapper:
|
|
1676
|
+
props: t,
|
|
1677
|
+
wrapper: o,
|
|
1678
1678
|
resolve: n
|
|
1679
1679
|
};
|
|
1680
1680
|
});
|
|
1681
1681
|
}
|
|
1682
|
-
var Uo = (e,
|
|
1683
|
-
const
|
|
1684
|
-
for (const [n, s] of
|
|
1685
|
-
|
|
1686
|
-
return
|
|
1682
|
+
var Uo = (e, t) => {
|
|
1683
|
+
const o = e.__vccOpts || e;
|
|
1684
|
+
for (const [n, s] of t)
|
|
1685
|
+
o[n] = s;
|
|
1686
|
+
return o;
|
|
1687
1687
|
};
|
|
1688
1688
|
const qo = Mt({
|
|
1689
1689
|
name: "DialogWrapper",
|
|
@@ -1705,9 +1705,9 @@ const qo = Mt({
|
|
|
1705
1705
|
};
|
|
1706
1706
|
}
|
|
1707
1707
|
});
|
|
1708
|
-
function Go(e,
|
|
1708
|
+
function Go(e, t, o, n, s, a) {
|
|
1709
1709
|
return d(), b(Ne, pt(ft(e.transitionAttrs)), {
|
|
1710
|
-
default:
|
|
1710
|
+
default: E(() => [
|
|
1711
1711
|
e.dialogRef && e.dialogRef.wrapper === e.name ? (d(), b(Y(e.dialogRef.dialog), ue({ key: 0 }, e.dialogRef.props, { ref: "dialogInstance" }), null, 16)) : k("", !0)
|
|
1712
1712
|
]),
|
|
1713
1713
|
_: 1
|
|
@@ -1720,24 +1720,24 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1720
1720
|
title: String,
|
|
1721
1721
|
message: String
|
|
1722
1722
|
},
|
|
1723
|
-
setup(e, { expose:
|
|
1724
|
-
const
|
|
1725
|
-
return
|
|
1723
|
+
setup(e, { expose: t }) {
|
|
1724
|
+
const o = e;
|
|
1725
|
+
return t({
|
|
1726
1726
|
returnValue: () => !0
|
|
1727
|
-
}), (s, a) => (d(),
|
|
1728
|
-
|
|
1729
|
-
"modal-title":
|
|
1730
|
-
K(O(
|
|
1727
|
+
}), (s, a) => (d(), p("div", null, [
|
|
1728
|
+
Q($t, { show: !0 }, {
|
|
1729
|
+
"modal-title": E(() => [
|
|
1730
|
+
K(O(o.title), 1)
|
|
1731
1731
|
]),
|
|
1732
|
-
default:
|
|
1733
|
-
K(O(
|
|
1732
|
+
default: E(() => [
|
|
1733
|
+
K(O(o.message), 1)
|
|
1734
1734
|
]),
|
|
1735
|
-
"modal-footer":
|
|
1735
|
+
"modal-footer": E(() => [
|
|
1736
1736
|
_("div", Ko, [
|
|
1737
|
-
|
|
1738
|
-
onClick: a[0] || (a[0] = (
|
|
1737
|
+
Q(ie, {
|
|
1738
|
+
onClick: a[0] || (a[0] = (l) => B(Me)())
|
|
1739
1739
|
}, {
|
|
1740
|
-
default:
|
|
1740
|
+
default: E(() => [
|
|
1741
1741
|
K("Закрыть")
|
|
1742
1742
|
]),
|
|
1743
1743
|
_: 1
|
|
@@ -1754,33 +1754,33 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1754
1754
|
title: String,
|
|
1755
1755
|
message: String
|
|
1756
1756
|
},
|
|
1757
|
-
setup(e, { expose:
|
|
1758
|
-
const
|
|
1759
|
-
return
|
|
1757
|
+
setup(e, { expose: t }) {
|
|
1758
|
+
const o = e;
|
|
1759
|
+
return t({
|
|
1760
1760
|
returnValue: () => !0
|
|
1761
|
-
}), (s, a) => (d(),
|
|
1762
|
-
|
|
1763
|
-
"modal-title":
|
|
1764
|
-
K(O(
|
|
1761
|
+
}), (s, a) => (d(), p("div", null, [
|
|
1762
|
+
Q($t, { show: !0 }, {
|
|
1763
|
+
"modal-title": E(() => [
|
|
1764
|
+
K(O(o.title), 1)
|
|
1765
1765
|
]),
|
|
1766
|
-
default:
|
|
1767
|
-
K(O(
|
|
1766
|
+
default: E(() => [
|
|
1767
|
+
K(O(o.message), 1)
|
|
1768
1768
|
]),
|
|
1769
|
-
"modal-footer":
|
|
1769
|
+
"modal-footer": E(() => [
|
|
1770
1770
|
_("div", Qo, [
|
|
1771
|
-
|
|
1772
|
-
onClick: a[0] || (a[0] = (
|
|
1771
|
+
Q(ie, {
|
|
1772
|
+
onClick: a[0] || (a[0] = (l) => B(Me)())
|
|
1773
1773
|
}, {
|
|
1774
|
-
default:
|
|
1774
|
+
default: E(() => [
|
|
1775
1775
|
K("Да")
|
|
1776
1776
|
]),
|
|
1777
1777
|
_: 1
|
|
1778
1778
|
}),
|
|
1779
|
-
|
|
1779
|
+
Q(ie, {
|
|
1780
1780
|
class: "button-red",
|
|
1781
|
-
onClick: a[1] || (a[1] = (
|
|
1781
|
+
onClick: a[1] || (a[1] = (l) => B(Me)(!1))
|
|
1782
1782
|
}, {
|
|
1783
|
-
default:
|
|
1783
|
+
default: E(() => [
|
|
1784
1784
|
K("Нет")
|
|
1785
1785
|
]),
|
|
1786
1786
|
_: 1
|
|
@@ -1791,7 +1791,7 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1791
1791
|
})
|
|
1792
1792
|
]));
|
|
1793
1793
|
}
|
|
1794
|
-
}, tn = { class: "dropdown" },
|
|
1794
|
+
}, tn = { class: "dropdown" }, As = {
|
|
1795
1795
|
__name: "DDropdown",
|
|
1796
1796
|
props: {
|
|
1797
1797
|
class: String,
|
|
@@ -1810,47 +1810,47 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1810
1810
|
}
|
|
1811
1811
|
},
|
|
1812
1812
|
emits: ["select", "click"],
|
|
1813
|
-
setup(e, { expose:
|
|
1814
|
-
const n = e, s =
|
|
1815
|
-
if (
|
|
1813
|
+
setup(e, { expose: t, emit: o }) {
|
|
1814
|
+
const n = e, s = Le(), a = T(null), l = T(null), r = T(0), i = T(0), c = (S) => {
|
|
1815
|
+
if (o("click", S), a.value.isShowed()) {
|
|
1816
1816
|
a.value.hide();
|
|
1817
1817
|
return;
|
|
1818
1818
|
}
|
|
1819
1819
|
a.value.show(), ht(() => {
|
|
1820
|
-
const N = a.value.elementSize(), $ =
|
|
1821
|
-
|
|
1820
|
+
const N = a.value.elementSize(), $ = l.value.elementSize(), H = window.innerWidth, P = window.innerHeight;
|
|
1821
|
+
r.value = H - ($.x + $.width) < N.width ? $.left - N.width + $.width : $.left, i.value = P - ($.y + $.height) < N.height ? $.top - N.height - 5 : $.height + $.top + 5;
|
|
1822
1822
|
});
|
|
1823
1823
|
}, u = (S) => {
|
|
1824
|
-
|
|
1825
|
-
}, h = m(() => ({ left:
|
|
1826
|
-
|
|
1824
|
+
o("select", S);
|
|
1825
|
+
}, h = m(() => ({ left: r.value + "px", top: i.value + "px", position: n.bodyAsParent ? "absolute" : "fixed", ...n.menuStyle }));
|
|
1826
|
+
t({
|
|
1827
1827
|
show: c
|
|
1828
1828
|
});
|
|
1829
1829
|
const x = (S) => !!s[S];
|
|
1830
|
-
return (S, N) => (d(),
|
|
1831
|
-
x("default") ? (d(), b(
|
|
1830
|
+
return (S, N) => (d(), p("div", tn, [
|
|
1831
|
+
x("default") ? (d(), b(ie, {
|
|
1832
1832
|
key: 0,
|
|
1833
1833
|
ref_key: "buttonRef",
|
|
1834
|
-
ref:
|
|
1834
|
+
ref: l,
|
|
1835
1835
|
class: D(n.class),
|
|
1836
1836
|
icon: n.icon,
|
|
1837
1837
|
onClick: j(c, ["stop", "prevent"]),
|
|
1838
1838
|
type: n.type
|
|
1839
1839
|
}, {
|
|
1840
|
-
default:
|
|
1841
|
-
|
|
1840
|
+
default: E(() => [
|
|
1841
|
+
C(S.$slots, "default")
|
|
1842
1842
|
]),
|
|
1843
1843
|
_: 3
|
|
1844
|
-
}, 8, ["class", "icon", "onClick", "type"])) : (d(), b(
|
|
1844
|
+
}, 8, ["class", "icon", "onClick", "type"])) : (d(), b(ie, {
|
|
1845
1845
|
key: 1,
|
|
1846
1846
|
ref_key: "buttonRef",
|
|
1847
|
-
ref:
|
|
1847
|
+
ref: l,
|
|
1848
1848
|
class: D(n.class),
|
|
1849
1849
|
icon: n.icon,
|
|
1850
1850
|
onClick: j(c, ["stop", "prevent"]),
|
|
1851
1851
|
type: n.type
|
|
1852
1852
|
}, null, 8, ["class", "icon", "onClick", "type"])),
|
|
1853
|
-
|
|
1853
|
+
Q(bt, {
|
|
1854
1854
|
ref_key: "dMenuRef",
|
|
1855
1855
|
ref: a,
|
|
1856
1856
|
items: n.items,
|
|
@@ -1865,26 +1865,26 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1865
1865
|
]));
|
|
1866
1866
|
}
|
|
1867
1867
|
}, on = {}, nn = { class: "d-panel" };
|
|
1868
|
-
function sn(e,
|
|
1869
|
-
return d(),
|
|
1870
|
-
|
|
1868
|
+
function sn(e, t) {
|
|
1869
|
+
return d(), p("div", nn, [
|
|
1870
|
+
C(e.$slots, "default")
|
|
1871
1871
|
]);
|
|
1872
1872
|
}
|
|
1873
|
-
const an = /* @__PURE__ */
|
|
1873
|
+
const an = /* @__PURE__ */ ne(on, [["render", sn]]), ln = { class: "card-header" }, rn = { class: "modal-title" }, dn = { class: "card-body" }, cn = { class: "card-footer" }, Hs = {
|
|
1874
1874
|
__name: "DCard",
|
|
1875
1875
|
setup(e) {
|
|
1876
|
-
return (
|
|
1877
|
-
default:
|
|
1878
|
-
_("div",
|
|
1879
|
-
_("h5",
|
|
1880
|
-
|
|
1876
|
+
return (t, o) => (d(), b(an, { class: "d-card" }, {
|
|
1877
|
+
default: E(() => [
|
|
1878
|
+
_("div", ln, [
|
|
1879
|
+
_("h5", rn, [
|
|
1880
|
+
C(t.$slots, "title")
|
|
1881
1881
|
])
|
|
1882
1882
|
]),
|
|
1883
1883
|
_("div", dn, [
|
|
1884
|
-
|
|
1884
|
+
C(t.$slots, "default")
|
|
1885
1885
|
]),
|
|
1886
1886
|
_("div", cn, [
|
|
1887
|
-
|
|
1887
|
+
C(t.$slots, "footer")
|
|
1888
1888
|
])
|
|
1889
1889
|
]),
|
|
1890
1890
|
_: 3
|
|
@@ -1892,8 +1892,8 @@ const an = /* @__PURE__ */ re(on, [["render", sn]]), rn = { class: "card-header"
|
|
|
1892
1892
|
}
|
|
1893
1893
|
}, un = /* @__PURE__ */ new Map();
|
|
1894
1894
|
class pn {
|
|
1895
|
-
constructor(
|
|
1896
|
-
this.remaining =
|
|
1895
|
+
constructor(t, o, n) {
|
|
1896
|
+
this.remaining = o, this.callback = t, this.notifyItem = n, this.resume();
|
|
1897
1897
|
}
|
|
1898
1898
|
pause() {
|
|
1899
1899
|
clearTimeout(this.notifyItem.timer), this.remaining -= Date.now() - this.start;
|
|
@@ -1925,11 +1925,11 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
1925
1925
|
type: e,
|
|
1926
1926
|
value: 0
|
|
1927
1927
|
};
|
|
1928
|
-
for (let
|
|
1929
|
-
const
|
|
1930
|
-
if (
|
|
1928
|
+
for (let t = 0; t < it.length; t++) {
|
|
1929
|
+
const o = it[t];
|
|
1930
|
+
if (o.regexp.test(e))
|
|
1931
1931
|
return {
|
|
1932
|
-
type:
|
|
1932
|
+
type: o.name,
|
|
1933
1933
|
value: parseFloat(e)
|
|
1934
1934
|
};
|
|
1935
1935
|
}
|
|
@@ -1946,15 +1946,15 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
1946
1946
|
default:
|
|
1947
1947
|
return { type: "", value: e };
|
|
1948
1948
|
}
|
|
1949
|
-
},
|
|
1949
|
+
}, lt = {
|
|
1950
1950
|
x: /* @__PURE__ */ new Set(["left", "center", "right"]),
|
|
1951
1951
|
y: /* @__PURE__ */ new Set(["top", "bottom"])
|
|
1952
1952
|
}, hn = ((e) => () => e++)(0), gn = (e) => typeof e != "string" ? [] : e.split(/\s+/gi).filter(Boolean), vn = (e) => {
|
|
1953
1953
|
typeof e == "string" && (e = gn(e));
|
|
1954
|
-
let
|
|
1954
|
+
let t = null, o = null;
|
|
1955
1955
|
return e.forEach((n) => {
|
|
1956
|
-
|
|
1957
|
-
}), { x:
|
|
1956
|
+
lt.y.has(n) && (o = n), lt.x.has(n) && (t = n);
|
|
1957
|
+
}), { x: t, y: o };
|
|
1958
1958
|
}, Ee = {
|
|
1959
1959
|
position: ["top", "right"],
|
|
1960
1960
|
cssAnimation: "fade",
|
|
@@ -1971,23 +1971,23 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
1971
1971
|
}, yn = {
|
|
1972
1972
|
__name: "VelocityGroup",
|
|
1973
1973
|
emits: ["enter", "leave", "after-leave"],
|
|
1974
|
-
setup(e, { emit:
|
|
1975
|
-
const
|
|
1976
|
-
|
|
1977
|
-
}, n = (a,
|
|
1978
|
-
|
|
1974
|
+
setup(e, { emit: t }) {
|
|
1975
|
+
const o = (a, l) => {
|
|
1976
|
+
t("enter", a, l);
|
|
1977
|
+
}, n = (a, l) => {
|
|
1978
|
+
t("leave", a, l);
|
|
1979
1979
|
}, s = () => {
|
|
1980
|
-
|
|
1980
|
+
t("after-leave");
|
|
1981
1981
|
};
|
|
1982
|
-
return (a,
|
|
1982
|
+
return (a, l) => (d(), b(yt, {
|
|
1983
1983
|
tag: "span",
|
|
1984
1984
|
css: !1,
|
|
1985
|
-
onEnter:
|
|
1985
|
+
onEnter: o,
|
|
1986
1986
|
onLeave: n,
|
|
1987
1987
|
onAfterLeave: s
|
|
1988
1988
|
}, {
|
|
1989
|
-
default:
|
|
1990
|
-
|
|
1989
|
+
default: E(() => [
|
|
1990
|
+
C(a.$slots, "default")
|
|
1991
1991
|
]),
|
|
1992
1992
|
_: 3
|
|
1993
1993
|
}));
|
|
@@ -2000,13 +2000,13 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2000
2000
|
name: String
|
|
2001
2001
|
},
|
|
2002
2002
|
setup(e) {
|
|
2003
|
-
const
|
|
2004
|
-
return (
|
|
2003
|
+
const t = e;
|
|
2004
|
+
return (o, n) => (d(), b(yt, {
|
|
2005
2005
|
tag: "span",
|
|
2006
|
-
name:
|
|
2006
|
+
name: t.name
|
|
2007
2007
|
}, {
|
|
2008
|
-
default:
|
|
2009
|
-
|
|
2008
|
+
default: E(() => [
|
|
2009
|
+
C(o.$slots, "default")
|
|
2010
2010
|
]),
|
|
2011
2011
|
_: 3
|
|
2012
2012
|
}, 8, ["name"]));
|
|
@@ -2014,7 +2014,7 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2014
2014
|
}), bn = ["data-id"], xn = ["onClick"], $n = ["innerHTML"], kn = ["innerHTML"], wn = {
|
|
2015
2015
|
key: 0,
|
|
2016
2016
|
class: "d-notification-title"
|
|
2017
|
-
}, Sn = { class: "notification-content" },
|
|
2017
|
+
}, Sn = { class: "notification-content" }, Vs = {
|
|
2018
2018
|
__name: "DNotificationProvider",
|
|
2019
2019
|
props: {
|
|
2020
2020
|
group: {
|
|
@@ -2083,85 +2083,85 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2083
2083
|
}
|
|
2084
2084
|
},
|
|
2085
2085
|
emits: ["click", "destroy", "start"],
|
|
2086
|
-
setup(e, { emit:
|
|
2087
|
-
const
|
|
2086
|
+
setup(e, { emit: t }) {
|
|
2087
|
+
const o = e, n = {
|
|
2088
2088
|
IDLE: 0,
|
|
2089
2089
|
DESTROYED: 2
|
|
2090
|
-
}, s = T([]), a = T(null),
|
|
2091
|
-
const { x:
|
|
2092
|
-
width:
|
|
2090
|
+
}, s = T([]), a = T(null), l = T(un.get("velocity")), r = m(() => o.animationType === "velocity"), i = m(() => r.value ? yn : _n), c = m(() => s.value.filter((f) => f.state !== n.DESTROYED)), u = m(() => mn(o.width)), h = m(() => {
|
|
2091
|
+
const { x: f, y: W } = vn(o.position), L = u.value.value, G = u.value.type, se = {
|
|
2092
|
+
width: L + G
|
|
2093
2093
|
};
|
|
2094
|
-
return W && (
|
|
2095
|
-
}), x = m(() => "bottom" in h.value), S = (
|
|
2096
|
-
|
|
2094
|
+
return W && (se[W] = "0px"), f && (f === "center" ? se.left = `calc(50% - ${+L / 2}${G})` : se[f] = "0px"), se;
|
|
2095
|
+
}), x = m(() => "bottom" in h.value), S = (f) => {
|
|
2096
|
+
t("click", f), o.closeOnClick && M(f);
|
|
2097
2097
|
}, N = () => {
|
|
2098
|
-
var
|
|
2099
|
-
|
|
2098
|
+
var f;
|
|
2099
|
+
o.pauseOnHover && ((f = a.value) == null || f.pause());
|
|
2100
2100
|
}, $ = () => {
|
|
2101
|
-
var
|
|
2102
|
-
|
|
2103
|
-
}, H = (
|
|
2104
|
-
if (
|
|
2101
|
+
var f;
|
|
2102
|
+
o.pauseOnHover && ((f = a.value) == null || f.resume());
|
|
2103
|
+
}, H = (f) => {
|
|
2104
|
+
if (f.group || (f.group = ""), f.data || (f.data = {}), o.group !== f.group)
|
|
2105
2105
|
return;
|
|
2106
|
-
if (
|
|
2106
|
+
if (f.clean || f.clear) {
|
|
2107
2107
|
R();
|
|
2108
2108
|
return;
|
|
2109
2109
|
}
|
|
2110
|
-
const W = typeof
|
|
2110
|
+
const W = typeof f.duration == "number" ? f.duration : o.duration, L = typeof f.speed == "number" ? f.speed : o.speed, G = typeof f.ignoreDuplicates == "boolean" ? f.ignoreDuplicates : o.ignoreDuplicates, { title: se, text: ve, type: ye, data: _e, id: be } = f, ee = {
|
|
2111
2111
|
id: be || hn(),
|
|
2112
|
-
title:
|
|
2112
|
+
title: se,
|
|
2113
2113
|
text: ve,
|
|
2114
2114
|
type: ye,
|
|
2115
2115
|
state: n.IDLE,
|
|
2116
|
-
speed:
|
|
2117
|
-
length: W + 2 *
|
|
2116
|
+
speed: L,
|
|
2117
|
+
length: W + 2 * L,
|
|
2118
2118
|
data: _e
|
|
2119
2119
|
};
|
|
2120
|
-
W >= 0 && (a.value = new pn(() => M(
|
|
2121
|
-
const xe =
|
|
2122
|
-
let
|
|
2123
|
-
const $e = c.value.some((he) => he.title ===
|
|
2124
|
-
(!G || !$e) && (xe ? (s.value.push(
|
|
2125
|
-
}, P = (
|
|
2126
|
-
g(
|
|
2127
|
-
}, w = (
|
|
2120
|
+
W >= 0 && (a.value = new pn(() => M(ee), ee.length, ee));
|
|
2121
|
+
const xe = o.reverse ? !x.value : x.value;
|
|
2122
|
+
let de = -1;
|
|
2123
|
+
const $e = c.value.some((he) => he.title === f.title && he.text === f.text);
|
|
2124
|
+
(!G || !$e) && (xe ? (s.value.push(ee), t("start", ee), c.value.length > o.max && (de = 0)) : (s.value.unshift(ee), t("start", ee), c.value.length > o.max && (de = c.value.length - 1)), de !== -1 && M(c.value[de]));
|
|
2125
|
+
}, P = (f) => {
|
|
2126
|
+
g(f);
|
|
2127
|
+
}, w = (f) => [
|
|
2128
2128
|
"d-notification-template",
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
], I = (
|
|
2132
|
-
clearTimeout(
|
|
2133
|
-
}, g = (
|
|
2134
|
-
const W = s.value.find((
|
|
2129
|
+
o.classes,
|
|
2130
|
+
f.type || ""
|
|
2131
|
+
], I = (f) => r.value ? void 0 : { transition: `all ${f.speed}ms` }, M = (f) => {
|
|
2132
|
+
clearTimeout(f.timer), f.state = n.DESTROYED, F(), t("destroy", f);
|
|
2133
|
+
}, g = (f) => {
|
|
2134
|
+
const W = s.value.find((L) => L.id === f);
|
|
2135
2135
|
W && M(W);
|
|
2136
2136
|
}, R = () => {
|
|
2137
2137
|
c.value.forEach(M);
|
|
2138
|
-
}, A = (
|
|
2138
|
+
}, A = (f, W) => {
|
|
2139
2139
|
var G;
|
|
2140
|
-
const
|
|
2141
|
-
return typeof
|
|
2142
|
-
}, z = (
|
|
2143
|
-
if (!
|
|
2140
|
+
const L = (G = o.animation) == null ? void 0 : G[f];
|
|
2141
|
+
return typeof L == "function" ? L(W) : L;
|
|
2142
|
+
}, z = (f, W) => {
|
|
2143
|
+
if (!r.value)
|
|
2144
2144
|
return;
|
|
2145
|
-
const
|
|
2146
|
-
|
|
2147
|
-
duration:
|
|
2145
|
+
const L = A("enter", f);
|
|
2146
|
+
l.value(f, L, {
|
|
2147
|
+
duration: o.speed,
|
|
2148
2148
|
complete: W
|
|
2149
2149
|
});
|
|
2150
|
-
}, y = (
|
|
2151
|
-
if (!
|
|
2150
|
+
}, y = (f, W) => {
|
|
2151
|
+
if (!r.value)
|
|
2152
2152
|
return;
|
|
2153
|
-
const
|
|
2154
|
-
|
|
2155
|
-
duration:
|
|
2153
|
+
const L = A("leave", f);
|
|
2154
|
+
l.value(f, L, {
|
|
2155
|
+
duration: o.speed,
|
|
2156
2156
|
complete: W
|
|
2157
2157
|
});
|
|
2158
2158
|
};
|
|
2159
2159
|
function F() {
|
|
2160
|
-
s.value = s.value.filter((
|
|
2160
|
+
s.value = s.value.filter((f) => f.state !== n.DESTROYED);
|
|
2161
2161
|
}
|
|
2162
2162
|
return me(() => {
|
|
2163
2163
|
U.on("notification-add", H), U.on("notification-close", P);
|
|
2164
|
-
}), (
|
|
2164
|
+
}), (f, W) => (d(), p("div", {
|
|
2165
2165
|
class: "d-notification-group",
|
|
2166
2166
|
style: V(h.value)
|
|
2167
2167
|
}, [
|
|
@@ -2171,37 +2171,37 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2171
2171
|
onLeave: y,
|
|
2172
2172
|
onAfterLeave: F
|
|
2173
2173
|
}, {
|
|
2174
|
-
default:
|
|
2175
|
-
(d(!0),
|
|
2176
|
-
key:
|
|
2174
|
+
default: E(() => [
|
|
2175
|
+
(d(!0), p(le, null, ge(c.value, (L) => (d(), p("div", {
|
|
2176
|
+
key: L.id,
|
|
2177
2177
|
class: "d-notification-wrapper",
|
|
2178
|
-
style: V(I(
|
|
2179
|
-
"data-id":
|
|
2178
|
+
style: V(I(L)),
|
|
2179
|
+
"data-id": L.id,
|
|
2180
2180
|
onMouseenter: N,
|
|
2181
2181
|
onMouseleave: $
|
|
2182
2182
|
}, [
|
|
2183
|
-
|
|
2184
|
-
class: D([e.classes,
|
|
2185
|
-
item:
|
|
2186
|
-
close: () => M(
|
|
2183
|
+
C(f.$slots, "body", {
|
|
2184
|
+
class: D([e.classes, L.type]),
|
|
2185
|
+
item: L,
|
|
2186
|
+
close: () => M(L)
|
|
2187
2187
|
}, () => [
|
|
2188
2188
|
_("div", {
|
|
2189
|
-
class: D(w(
|
|
2190
|
-
onClick: (G) => S(
|
|
2189
|
+
class: D(w(L)),
|
|
2190
|
+
onClick: (G) => S(L)
|
|
2191
2191
|
}, [
|
|
2192
|
-
e.dangerouslySetInnerHtml ? (d(),
|
|
2193
|
-
|
|
2192
|
+
e.dangerouslySetInnerHtml ? (d(), p(le, { key: 0 }, [
|
|
2193
|
+
L.title ? (d(), p("div", {
|
|
2194
2194
|
key: 0,
|
|
2195
2195
|
class: "d-notification-title",
|
|
2196
|
-
innerHTML:
|
|
2196
|
+
innerHTML: L.timer
|
|
2197
2197
|
}, null, 8, $n)) : k("", !0),
|
|
2198
2198
|
_("div", {
|
|
2199
2199
|
class: "notification-content",
|
|
2200
|
-
innerHTML:
|
|
2200
|
+
innerHTML: L.text
|
|
2201
2201
|
}, null, 8, kn)
|
|
2202
|
-
], 64)) : (d(),
|
|
2203
|
-
|
|
2204
|
-
_("div", Sn, O(
|
|
2202
|
+
], 64)) : (d(), p(le, { key: 1 }, [
|
|
2203
|
+
L.title ? (d(), p("div", wn, O(L.title), 1)) : k("", !0),
|
|
2204
|
+
_("div", Sn, O(L.text), 1)
|
|
2205
2205
|
], 64))
|
|
2206
2206
|
], 10, xn)
|
|
2207
2207
|
])
|
|
@@ -2211,7 +2211,7 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2211
2211
|
}, 40, ["name"]))
|
|
2212
2212
|
], 4));
|
|
2213
2213
|
}
|
|
2214
|
-
}, Dn = { class: "d-info-progress-icon-container" }, Tn = { class: "d-info-progress-icon" },
|
|
2214
|
+
}, Dn = { class: "d-info-progress-icon-container" }, Tn = { class: "d-info-progress-icon" }, Ln = { class: "d-info-progress-data-container" }, Cn = ["innerHTML"], zs = {
|
|
2215
2215
|
__name: "DInfoProgress",
|
|
2216
2216
|
props: {
|
|
2217
2217
|
style: [String, Object],
|
|
@@ -2221,18 +2221,18 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2221
2221
|
type: String
|
|
2222
2222
|
},
|
|
2223
2223
|
emits: ["click"],
|
|
2224
|
-
setup(e, { emit:
|
|
2225
|
-
const
|
|
2226
|
-
return (s, a) => (d(),
|
|
2227
|
-
class: D(["d-info-progress",
|
|
2228
|
-
style: V(
|
|
2229
|
-
onClick: a[0] || (a[0] = (
|
|
2230
|
-
|
|
2224
|
+
setup(e, { emit: t }) {
|
|
2225
|
+
const o = e, n = m(() => o.icon ? oe.getters.getIcon(o.icon) : null);
|
|
2226
|
+
return (s, a) => (d(), p("div", {
|
|
2227
|
+
class: D(["d-info-progress", o.type ? `d-info-progress-${o.type}` : null]),
|
|
2228
|
+
style: V(o.style),
|
|
2229
|
+
onClick: a[0] || (a[0] = (l) => {
|
|
2230
|
+
t("click", l);
|
|
2231
2231
|
})
|
|
2232
2232
|
}, [
|
|
2233
2233
|
_("div", Dn, [
|
|
2234
2234
|
_("div", Tn, [
|
|
2235
|
-
|
|
2235
|
+
o.icon ? (d(), b(Y(re), {
|
|
2236
2236
|
key: 0,
|
|
2237
2237
|
component: n.value,
|
|
2238
2238
|
color: "inherit",
|
|
@@ -2240,19 +2240,19 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2240
2240
|
}, null, 8, ["component"])) : k("", !0)
|
|
2241
2241
|
])
|
|
2242
2242
|
]),
|
|
2243
|
-
_("div",
|
|
2243
|
+
_("div", Ln, [
|
|
2244
2244
|
_("div", {
|
|
2245
2245
|
class: "d-info-progress-line",
|
|
2246
|
-
style: V("width: " +
|
|
2246
|
+
style: V("width: " + o.progress + "%;")
|
|
2247
2247
|
}, null, 4),
|
|
2248
2248
|
_("div", {
|
|
2249
2249
|
class: "d-info-progress-label",
|
|
2250
2250
|
innerHTML: e.label
|
|
2251
|
-
}, null, 8,
|
|
2251
|
+
}, null, 8, Cn)
|
|
2252
2252
|
])
|
|
2253
2253
|
], 6));
|
|
2254
2254
|
}
|
|
2255
|
-
}, In = { class: "d-checkbox" }, Bn = ["id", "checked", "disabled"], En = ["for"],
|
|
2255
|
+
}, In = { class: "d-checkbox" }, Bn = ["id", "checked", "disabled"], En = ["for"], Fs = {
|
|
2256
2256
|
__name: "DCheckbox",
|
|
2257
2257
|
props: {
|
|
2258
2258
|
label: String,
|
|
@@ -2265,45 +2265,45 @@ const Be = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2265
2265
|
checked: Boolean
|
|
2266
2266
|
},
|
|
2267
2267
|
emits: ["update:modelValue"],
|
|
2268
|
-
setup(e, { emit:
|
|
2269
|
-
const
|
|
2270
|
-
get: () =>
|
|
2271
|
-
set: (
|
|
2272
|
-
|
|
2268
|
+
setup(e, { emit: t }) {
|
|
2269
|
+
const o = e, s = gt().uid, a = m({
|
|
2270
|
+
get: () => o.modelValue,
|
|
2271
|
+
set: (l) => {
|
|
2272
|
+
t("update:modelValue", l);
|
|
2273
2273
|
}
|
|
2274
2274
|
});
|
|
2275
|
-
return (
|
|
2275
|
+
return (l, r) => (d(), p("div", In, [
|
|
2276
2276
|
J(_("input", {
|
|
2277
|
-
"onUpdate:modelValue":
|
|
2278
|
-
id: `i-${
|
|
2277
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => a.value = i),
|
|
2278
|
+
id: `i-${B(s)}`,
|
|
2279
2279
|
type: "checkbox",
|
|
2280
|
-
checked:
|
|
2281
|
-
disabled:
|
|
2282
|
-
onChange:
|
|
2280
|
+
checked: o.checked,
|
|
2281
|
+
disabled: o.disabled,
|
|
2282
|
+
onChange: r[1] || (r[1] = (...i) => o.change && o.change(...i))
|
|
2283
2283
|
}, null, 40, Bn), [
|
|
2284
2284
|
[Nt, a.value]
|
|
2285
2285
|
]),
|
|
2286
2286
|
_("label", {
|
|
2287
|
-
for: `i-${
|
|
2288
|
-
}, O(
|
|
2287
|
+
for: `i-${B(s)}`
|
|
2288
|
+
}, O(o.label), 9, En)
|
|
2289
2289
|
]));
|
|
2290
2290
|
}
|
|
2291
2291
|
};
|
|
2292
|
-
async function Mn(e,
|
|
2293
|
-
return await kt(en, { title: e, message:
|
|
2292
|
+
async function Mn(e, t) {
|
|
2293
|
+
return await kt(en, { title: e, message: t });
|
|
2294
2294
|
}
|
|
2295
|
-
async function Nn(e,
|
|
2296
|
-
return await kt(Jo, { title: e, message:
|
|
2295
|
+
async function Nn(e, t) {
|
|
2296
|
+
return await kt(Jo, { title: e, message: t });
|
|
2297
2297
|
}
|
|
2298
|
-
const
|
|
2298
|
+
const Ws = {
|
|
2299
2299
|
__name: "DDialogProvider",
|
|
2300
2300
|
setup(e) {
|
|
2301
|
-
return window.alert = Nn, window.confirm = Mn, (
|
|
2301
|
+
return window.alert = Nn, window.confirm = Mn, (t, o) => (d(), b(B(Zo)));
|
|
2302
2302
|
}
|
|
2303
2303
|
}, Rn = { class: "d-select" }, On = {
|
|
2304
2304
|
key: 0,
|
|
2305
2305
|
class: "label"
|
|
2306
|
-
}, An = ["disabled"], Hn = ["value", "selected", "disabled"],
|
|
2306
|
+
}, An = ["disabled"], Hn = ["value", "selected", "disabled"], Ps = {
|
|
2307
2307
|
__name: "DSelect",
|
|
2308
2308
|
props: {
|
|
2309
2309
|
label: String,
|
|
@@ -2318,82 +2318,94 @@ const Hs = {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
},
|
|
2320
2320
|
emits: ["update:modelValue"],
|
|
2321
|
-
setup(e, { emit:
|
|
2322
|
-
const
|
|
2323
|
-
get: () =>
|
|
2321
|
+
setup(e, { emit: t }) {
|
|
2322
|
+
const o = e, n = m(() => o.scale ? "d-select-" + o.scale : ""), s = m({
|
|
2323
|
+
get: () => o.modelValue,
|
|
2324
2324
|
set: (a) => {
|
|
2325
|
-
|
|
2325
|
+
t("update:modelValue", a);
|
|
2326
2326
|
}
|
|
2327
2327
|
});
|
|
2328
|
-
for (let a = 0; a <
|
|
2329
|
-
if (
|
|
2330
|
-
s.value =
|
|
2328
|
+
for (let a = 0; a < o.options.length; a++)
|
|
2329
|
+
if (o.options[a].selected) {
|
|
2330
|
+
s.value = o.options[a].value;
|
|
2331
2331
|
break;
|
|
2332
2332
|
}
|
|
2333
|
-
return (a,
|
|
2334
|
-
|
|
2333
|
+
return (a, l) => (d(), p("div", Rn, [
|
|
2334
|
+
o.label ? (d(), p("div", On, O(o.label), 1)) : k("", !0),
|
|
2335
2335
|
J(_("select", {
|
|
2336
|
-
"onUpdate:modelValue":
|
|
2336
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => s.value = r),
|
|
2337
2337
|
class: D(n.value),
|
|
2338
|
-
style: V(
|
|
2339
|
-
disabled:
|
|
2338
|
+
style: V(o.size === "wide" ? "width:100%" : ""),
|
|
2339
|
+
disabled: o.disabled
|
|
2340
2340
|
}, [
|
|
2341
|
-
(d(!0),
|
|
2341
|
+
(d(!0), p(le, null, ge(o.options, (r, i) => (d(), p("option", {
|
|
2342
2342
|
key: i,
|
|
2343
|
-
value:
|
|
2344
|
-
selected:
|
|
2345
|
-
disabled:
|
|
2346
|
-
}, O(
|
|
2343
|
+
value: r.value,
|
|
2344
|
+
selected: r.selected,
|
|
2345
|
+
disabled: r.disabled
|
|
2346
|
+
}, O(r.label), 9, Hn))), 128))
|
|
2347
2347
|
], 14, An), [
|
|
2348
2348
|
[Rt, s.value]
|
|
2349
2349
|
])
|
|
2350
2350
|
]));
|
|
2351
2351
|
}
|
|
2352
|
-
}
|
|
2352
|
+
};
|
|
2353
|
+
const Vn = ["title"], zn = { class: "tab-icon" }, Fn = { class: "tab-label" }, Wn = ["title"], Pn = ["title"], jn = {
|
|
2353
2354
|
__name: "DTabLabel",
|
|
2354
2355
|
props: {
|
|
2355
2356
|
tab: Object
|
|
2356
2357
|
},
|
|
2357
2358
|
setup(e) {
|
|
2358
|
-
const
|
|
2359
|
-
return (
|
|
2359
|
+
const t = e;
|
|
2360
|
+
return (o, n) => t.tab.label && t.tab.icon ? (d(), p("span", {
|
|
2360
2361
|
key: 0,
|
|
2361
|
-
title:
|
|
2362
|
-
|
|
2362
|
+
title: t.tab.title ? t.tab.title : "",
|
|
2363
|
+
style: { display: "flex", "flex-direction": "column" }
|
|
2364
|
+
}, [
|
|
2365
|
+
_("div", zn, [
|
|
2366
|
+
Q(B(re), {
|
|
2367
|
+
component: t.tab.icon
|
|
2368
|
+
}, null, 8, ["component"])
|
|
2369
|
+
]),
|
|
2370
|
+
_("div", Fn, O(t.tab.label), 1)
|
|
2371
|
+
], 8, Vn)) : t.tab.label ? (d(), p("span", {
|
|
2363
2372
|
key: 1,
|
|
2364
|
-
title:
|
|
2373
|
+
title: t.tab.title ? t.tab.title : ""
|
|
2374
|
+
}, O(t.tab.label), 9, Wn)) : t.tab.icon ? (d(), p("span", {
|
|
2375
|
+
key: 2,
|
|
2376
|
+
title: t.tab.title ? t.tab.title : ""
|
|
2365
2377
|
}, [
|
|
2366
|
-
|
|
2367
|
-
component:
|
|
2378
|
+
Q(B(re), {
|
|
2379
|
+
component: t.tab.icon
|
|
2368
2380
|
}, null, 8, ["component"])
|
|
2369
|
-
], 8,
|
|
2381
|
+
], 8, Pn)) : k("", !0);
|
|
2370
2382
|
}
|
|
2371
|
-
};
|
|
2372
|
-
const
|
|
2383
|
+
}, Xn = /* @__PURE__ */ ne(jn, [["__scopeId", "data-v-9262b225"]]);
|
|
2384
|
+
const Yn = { class: "d-tabs" }, Un = {
|
|
2373
2385
|
__name: "DTabs",
|
|
2374
2386
|
props: {
|
|
2375
2387
|
tabs: Array
|
|
2376
2388
|
},
|
|
2377
2389
|
setup(e) {
|
|
2378
|
-
const
|
|
2390
|
+
const o = Ot(e, "tabs"), n = T(0), s = (a) => {
|
|
2379
2391
|
n.value = a;
|
|
2380
2392
|
};
|
|
2381
|
-
return (a,
|
|
2382
|
-
_("div",
|
|
2383
|
-
(d(!0),
|
|
2393
|
+
return (a, l) => (d(), p(le, null, [
|
|
2394
|
+
_("div", Yn, [
|
|
2395
|
+
(d(!0), p(le, null, ge(o.value, (r, i) => (d(), b(Xn, {
|
|
2384
2396
|
index: i,
|
|
2385
|
-
tab:
|
|
2397
|
+
tab: r,
|
|
2386
2398
|
class: D(["d-tab-title", i === n.value ? "active" : ""]),
|
|
2387
2399
|
onClick: (c) => s(i)
|
|
2388
2400
|
}, null, 8, ["index", "tab", "class", "onClick"]))), 256))
|
|
2389
2401
|
]),
|
|
2390
2402
|
(d(), b(At, null, [
|
|
2391
|
-
(d(), b(Y(
|
|
2403
|
+
(d(), b(Y(o.value[n.value].component)))
|
|
2392
2404
|
], 1024))
|
|
2393
2405
|
], 64));
|
|
2394
2406
|
}
|
|
2395
|
-
},
|
|
2396
|
-
const
|
|
2407
|
+
}, js = /* @__PURE__ */ ne(Un, [["__scopeId", "data-v-5459fcb7"]]);
|
|
2408
|
+
const qn = { class: "d-grid" }, Gn = {
|
|
2397
2409
|
__name: "DGrid",
|
|
2398
2410
|
props: {
|
|
2399
2411
|
gap: {
|
|
@@ -2411,7 +2423,7 @@ const jn = { class: "d-grid" }, Xn = {
|
|
|
2411
2423
|
colXxl: String
|
|
2412
2424
|
},
|
|
2413
2425
|
setup(e) {
|
|
2414
|
-
const
|
|
2426
|
+
const t = e;
|
|
2415
2427
|
Ae((u) => ({
|
|
2416
2428
|
"09eba472": i[0],
|
|
2417
2429
|
"09eba434": i[1],
|
|
@@ -2419,17 +2431,17 @@ const jn = { class: "d-grid" }, Xn = {
|
|
|
2419
2431
|
"09eba3b8": i[3],
|
|
2420
2432
|
"09eba37a": i[4],
|
|
2421
2433
|
"09eba33c": i[5],
|
|
2422
|
-
"898eb2ac":
|
|
2434
|
+
"898eb2ac": t.gap
|
|
2423
2435
|
}));
|
|
2424
|
-
const { colXs:
|
|
2436
|
+
const { colXs: o, colSm: n, colMd: s, colLg: a, colXl: l, colXxl: r } = Ht(t), i = [o.value, n.value, s.value, a.value, l.value, r.value];
|
|
2425
2437
|
let c = null;
|
|
2426
2438
|
for (let u = 0; u < i.length; u++)
|
|
2427
2439
|
c || (c = i[0]), u > 0 && (i[u] ? c = i[u] : i[u] = c);
|
|
2428
|
-
return (u, h) => (d(),
|
|
2429
|
-
|
|
2440
|
+
return (u, h) => (d(), p("div", qn, [
|
|
2441
|
+
C(u.$slots, "default", {}, void 0, !0)
|
|
2430
2442
|
]));
|
|
2431
2443
|
}
|
|
2432
|
-
},
|
|
2444
|
+
}, Xs = /* @__PURE__ */ ne(Gn, [["__scopeId", "data-v-b45e8130"]]), Zn = ["src", "alt", "title"], Ys = {
|
|
2433
2445
|
__name: "DImage",
|
|
2434
2446
|
props: {
|
|
2435
2447
|
src: String,
|
|
@@ -2441,26 +2453,26 @@ const jn = { class: "d-grid" }, Xn = {
|
|
|
2441
2453
|
radius: String
|
|
2442
2454
|
},
|
|
2443
2455
|
setup(e) {
|
|
2444
|
-
const
|
|
2456
|
+
const t = e, o = T(null), n = new Image();
|
|
2445
2457
|
return n.onload = () => {
|
|
2446
|
-
|
|
2458
|
+
o.value = n.src;
|
|
2447
2459
|
}, n.onerror = () => {
|
|
2448
|
-
|
|
2460
|
+
o.value = t.srcFail;
|
|
2449
2461
|
}, me(() => {
|
|
2450
|
-
n.src =
|
|
2451
|
-
}), (s, a) =>
|
|
2462
|
+
n.src = t.src;
|
|
2463
|
+
}), (s, a) => o.value ? (d(), p("img", {
|
|
2452
2464
|
key: 0,
|
|
2453
|
-
src:
|
|
2454
|
-
alt:
|
|
2455
|
-
title:
|
|
2456
|
-
style: V({ width:
|
|
2457
|
-
}, null, 12,
|
|
2465
|
+
src: o.value,
|
|
2466
|
+
alt: t.alt,
|
|
2467
|
+
title: t.title,
|
|
2468
|
+
style: V({ width: t.width, height: t.height, borderRadius: t.radius })
|
|
2469
|
+
}, null, 12, Zn)) : k("", !0);
|
|
2458
2470
|
}
|
|
2459
2471
|
};
|
|
2460
|
-
const
|
|
2472
|
+
const Kn = { class: "d-textarea" }, Jn = {
|
|
2461
2473
|
key: 0,
|
|
2462
2474
|
class: "label"
|
|
2463
|
-
},
|
|
2475
|
+
}, Qn = ["rows", "cols", "placeholder"], es = {
|
|
2464
2476
|
__name: "DTextarea",
|
|
2465
2477
|
props: {
|
|
2466
2478
|
label: String,
|
|
@@ -2479,150 +2491,150 @@ const Un = { class: "d-textarea" }, qn = {
|
|
|
2479
2491
|
focus: Boolean
|
|
2480
2492
|
},
|
|
2481
2493
|
emits: ["update:modelValue"],
|
|
2482
|
-
setup(e, { expose:
|
|
2483
|
-
const n = e, s = T(null), a = m(() => n.scale === "small" ? "d-textarea-small" : n.scale === "large" ? "d-textarea-large" : ""),
|
|
2494
|
+
setup(e, { expose: t, emit: o }) {
|
|
2495
|
+
const n = e, s = T(null), a = m(() => n.scale === "small" ? "d-textarea-small" : n.scale === "large" ? "d-textarea-large" : ""), l = m({
|
|
2484
2496
|
get: () => n.modelValue,
|
|
2485
2497
|
set: (i) => {
|
|
2486
|
-
|
|
2498
|
+
o("update:modelValue", i);
|
|
2487
2499
|
}
|
|
2488
2500
|
});
|
|
2489
2501
|
me(() => {
|
|
2490
|
-
n.focus &&
|
|
2502
|
+
n.focus && r();
|
|
2491
2503
|
});
|
|
2492
|
-
const
|
|
2504
|
+
const r = () => {
|
|
2493
2505
|
s.value.focus();
|
|
2494
2506
|
};
|
|
2495
|
-
return
|
|
2496
|
-
focus:
|
|
2497
|
-
}), (i, c) => (d(),
|
|
2498
|
-
n.label ? (d(),
|
|
2507
|
+
return t({
|
|
2508
|
+
focus: r
|
|
2509
|
+
}), (i, c) => (d(), p("div", Kn, [
|
|
2510
|
+
n.label ? (d(), p("div", Jn, O(n.label), 1)) : k("", !0),
|
|
2499
2511
|
J(_("textarea", {
|
|
2500
2512
|
ref_key: "inputRef",
|
|
2501
2513
|
ref: s,
|
|
2502
|
-
"onUpdate:modelValue": c[0] || (c[0] = (u) =>
|
|
2514
|
+
"onUpdate:modelValue": c[0] || (c[0] = (u) => l.value = u),
|
|
2503
2515
|
rows: n.rows,
|
|
2504
2516
|
cols: n.cols,
|
|
2505
2517
|
placeholder: n.placeholder,
|
|
2506
2518
|
class: D(a.value),
|
|
2507
2519
|
style: { width: "100%" }
|
|
2508
|
-
}, null, 10,
|
|
2509
|
-
[Vt,
|
|
2520
|
+
}, null, 10, Qn), [
|
|
2521
|
+
[Vt, l.value]
|
|
2510
2522
|
])
|
|
2511
2523
|
]));
|
|
2512
2524
|
}
|
|
2513
|
-
},
|
|
2514
|
-
class
|
|
2515
|
-
constructor(
|
|
2516
|
-
this.fields =
|
|
2525
|
+
}, Us = /* @__PURE__ */ ne(es, [["__scopeId", "data-v-0e805d5d"]]);
|
|
2526
|
+
class qs {
|
|
2527
|
+
constructor(t) {
|
|
2528
|
+
this.fields = t;
|
|
2517
2529
|
}
|
|
2518
2530
|
validate() {
|
|
2519
|
-
let
|
|
2520
|
-
for (let
|
|
2521
|
-
this.fields[
|
|
2522
|
-
return !
|
|
2531
|
+
let t = !1;
|
|
2532
|
+
for (let o in this.fields)
|
|
2533
|
+
this.fields[o].ref.value.validate() === !0 && (t = !0);
|
|
2534
|
+
return !t;
|
|
2523
2535
|
}
|
|
2524
2536
|
}
|
|
2525
|
-
class
|
|
2526
|
-
validate(
|
|
2527
|
-
return this._isValidURL(
|
|
2537
|
+
class ts {
|
|
2538
|
+
validate(t, o = "https") {
|
|
2539
|
+
return this._isValidURL(t) || (t = o + "://" + t), this._isValidURL(t);
|
|
2528
2540
|
}
|
|
2529
|
-
message(
|
|
2541
|
+
message(t, o) {
|
|
2530
2542
|
let n = "";
|
|
2531
|
-
switch (
|
|
2543
|
+
switch (t) {
|
|
2532
2544
|
case "url":
|
|
2533
|
-
n =
|
|
2545
|
+
n = o;
|
|
2534
2546
|
break;
|
|
2535
2547
|
}
|
|
2536
2548
|
return n;
|
|
2537
2549
|
}
|
|
2538
|
-
_isValidURL(
|
|
2550
|
+
_isValidURL(t) {
|
|
2539
2551
|
try {
|
|
2540
|
-
return new URL(
|
|
2552
|
+
return new URL(t), !0;
|
|
2541
2553
|
} catch {
|
|
2542
2554
|
return !1;
|
|
2543
2555
|
}
|
|
2544
2556
|
}
|
|
2545
2557
|
}
|
|
2546
|
-
const
|
|
2547
|
-
class
|
|
2548
|
-
validate(
|
|
2549
|
-
return
|
|
2558
|
+
const os = new ts();
|
|
2559
|
+
class ns {
|
|
2560
|
+
validate(t = "") {
|
|
2561
|
+
return t !== "";
|
|
2550
2562
|
}
|
|
2551
|
-
message(
|
|
2552
|
-
return
|
|
2563
|
+
message(t) {
|
|
2564
|
+
return t;
|
|
2553
2565
|
}
|
|
2554
2566
|
}
|
|
2555
|
-
const
|
|
2556
|
-
class
|
|
2557
|
-
validate(
|
|
2558
|
-
return
|
|
2567
|
+
const ss = new ns();
|
|
2568
|
+
class as {
|
|
2569
|
+
validate(t = "", o = 0) {
|
|
2570
|
+
return t.length >= o;
|
|
2559
2571
|
}
|
|
2560
|
-
message(
|
|
2561
|
-
return
|
|
2572
|
+
message(t) {
|
|
2573
|
+
return t;
|
|
2562
2574
|
}
|
|
2563
2575
|
}
|
|
2564
|
-
const
|
|
2565
|
-
class
|
|
2566
|
-
validate(
|
|
2567
|
-
return
|
|
2576
|
+
const is = new as();
|
|
2577
|
+
class ls {
|
|
2578
|
+
validate(t = "", o = 0) {
|
|
2579
|
+
return t.length <= o;
|
|
2568
2580
|
}
|
|
2569
|
-
message(
|
|
2570
|
-
return
|
|
2581
|
+
message(t) {
|
|
2582
|
+
return t;
|
|
2571
2583
|
}
|
|
2572
2584
|
}
|
|
2573
|
-
const
|
|
2574
|
-
class
|
|
2575
|
-
validate(
|
|
2576
|
-
return /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(
|
|
2585
|
+
const rs = new ls();
|
|
2586
|
+
class ds {
|
|
2587
|
+
validate(t) {
|
|
2588
|
+
return /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(t);
|
|
2577
2589
|
}
|
|
2578
|
-
message(
|
|
2579
|
-
return
|
|
2590
|
+
message(t) {
|
|
2591
|
+
return t;
|
|
2580
2592
|
}
|
|
2581
2593
|
}
|
|
2582
|
-
const
|
|
2583
|
-
class
|
|
2584
|
-
validate(
|
|
2585
|
-
return !isNaN(parseFloat(
|
|
2594
|
+
const cs = new ds();
|
|
2595
|
+
class us {
|
|
2596
|
+
validate(t) {
|
|
2597
|
+
return !isNaN(parseFloat(t)) && !isNaN(t - 0);
|
|
2586
2598
|
}
|
|
2587
|
-
message(
|
|
2588
|
-
return
|
|
2599
|
+
message(t) {
|
|
2600
|
+
return t;
|
|
2589
2601
|
}
|
|
2590
2602
|
}
|
|
2591
|
-
const
|
|
2592
|
-
RulesUrl:
|
|
2593
|
-
RulesRequired:
|
|
2594
|
-
RulesMin:
|
|
2595
|
-
RulesMax:
|
|
2596
|
-
RulesEmail:
|
|
2597
|
-
RulesNumber:
|
|
2603
|
+
const ps = new us(), q = {
|
|
2604
|
+
RulesUrl: os,
|
|
2605
|
+
RulesRequired: ss,
|
|
2606
|
+
RulesMin: is,
|
|
2607
|
+
RulesMax: rs,
|
|
2608
|
+
RulesEmail: cs,
|
|
2609
|
+
RulesNumber: ps
|
|
2598
2610
|
};
|
|
2599
|
-
class
|
|
2600
|
-
validate(
|
|
2601
|
-
var s, a,
|
|
2611
|
+
class fs {
|
|
2612
|
+
validate(t, o) {
|
|
2613
|
+
var s, a, l, r, i, c, u, h, x, S, N, $, H, P;
|
|
2602
2614
|
let n = "";
|
|
2603
|
-
if (
|
|
2615
|
+
if (o) {
|
|
2604
2616
|
let w = !1;
|
|
2605
|
-
for (let I in
|
|
2617
|
+
for (let I in o)
|
|
2606
2618
|
if (!w)
|
|
2607
2619
|
switch (I) {
|
|
2608
2620
|
case "url":
|
|
2609
|
-
n = q.RulesUrl.validate(
|
|
2621
|
+
n = q.RulesUrl.validate(t, "https") || t.length === 0 ? "" : q.RulesUrl.message("url", (s = o[I]) != null && s.message ? (a = o[I]) == null ? void 0 : a.message : "url_incorrect"), w = n !== "";
|
|
2610
2622
|
break;
|
|
2611
2623
|
case "required":
|
|
2612
|
-
n = q.RulesRequired.validate(
|
|
2624
|
+
n = q.RulesRequired.validate(t) ? "" : q.RulesRequired.message((l = o[I]) != null && l.message ? (r = o[I]) == null ? void 0 : r.message : "required"), w = n !== "";
|
|
2613
2625
|
break;
|
|
2614
2626
|
case "min":
|
|
2615
|
-
n = q.RulesMin.validate(
|
|
2627
|
+
n = q.RulesMin.validate(t, (i = o[I]) == null ? void 0 : i.value) ? "" : q.RulesMin.message((c = o[I]) != null && c.message ? (u = o[I]) == null ? void 0 : u.message : "very_small"), w = n !== "";
|
|
2616
2628
|
break;
|
|
2617
2629
|
case "max":
|
|
2618
|
-
n = q.RulesMax.validate(
|
|
2630
|
+
n = q.RulesMax.validate(t, (h = o[I]) == null ? void 0 : h.value) ? "" : q.RulesMax.message((x = o[I]) != null && x.message ? (S = o[I]) == null ? void 0 : S.message : "vary_large"), w = n !== "";
|
|
2619
2631
|
break;
|
|
2620
2632
|
case "email":
|
|
2621
|
-
n = q.RulesEmail.validate(
|
|
2633
|
+
n = q.RulesEmail.validate(t) ? "" : q.RulesMax.message((N = o[I]) != null && N.message ? ($ = o[I]) == null ? void 0 : $.message : "email_incorrect"), w = n !== "";
|
|
2622
2634
|
break;
|
|
2623
2635
|
case "number":
|
|
2624
|
-
n = q.RulesNumber.validate(
|
|
2625
|
-
(H =
|
|
2636
|
+
n = q.RulesNumber.validate(t) ? "" : q.RulesNumber.message(
|
|
2637
|
+
(H = o[I]) != null && H.message ? (P = o[I]) == null ? void 0 : P.message : "number_incorrect"
|
|
2626
2638
|
), w = n !== "";
|
|
2627
2639
|
break;
|
|
2628
2640
|
}
|
|
@@ -2630,13 +2642,13 @@ class ds {
|
|
|
2630
2642
|
return n;
|
|
2631
2643
|
}
|
|
2632
2644
|
}
|
|
2633
|
-
const
|
|
2645
|
+
const ms = new fs(), hs = { style: { display: "flex", "flex-direction": "column" } }, gs = {
|
|
2634
2646
|
key: 0,
|
|
2635
2647
|
class: "d-label"
|
|
2636
|
-
},
|
|
2648
|
+
}, vs = {
|
|
2637
2649
|
key: 0,
|
|
2638
2650
|
class: "text-red"
|
|
2639
|
-
},
|
|
2651
|
+
}, ys = { style: { display: "flex", "flex-direction": "row" } }, _s = { style: { flex: "1", position: "relative" } }, bs = /* @__PURE__ */ _("svg", {
|
|
2640
2652
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2641
2653
|
viewBox: "0 0 24 24"
|
|
2642
2654
|
}, [
|
|
@@ -2644,9 +2656,9 @@ const cs = new ds(), us = { style: { display: "flex", "flex-direction": "column"
|
|
|
2644
2656
|
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",
|
|
2645
2657
|
fill: "currentColor"
|
|
2646
2658
|
})
|
|
2647
|
-
], -1),
|
|
2648
|
-
|
|
2649
|
-
],
|
|
2659
|
+
], -1), xs = [
|
|
2660
|
+
bs
|
|
2661
|
+
], $s = ["id", "type", "placeholder", "disabled"], ks = /* @__PURE__ */ _("svg", {
|
|
2650
2662
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2651
2663
|
viewBox: "0 0 24 24"
|
|
2652
2664
|
}, [
|
|
@@ -2654,15 +2666,15 @@ const cs = new ds(), us = { style: { display: "flex", "flex-direction": "column"
|
|
|
2654
2666
|
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",
|
|
2655
2667
|
fill: "currentColor"
|
|
2656
2668
|
})
|
|
2657
|
-
], -1),
|
|
2658
|
-
|
|
2659
|
-
],
|
|
2669
|
+
], -1), ws = [
|
|
2670
|
+
ks
|
|
2671
|
+
], Ss = {
|
|
2660
2672
|
key: 1,
|
|
2661
2673
|
class: "d-help"
|
|
2662
|
-
},
|
|
2674
|
+
}, Ds = {
|
|
2663
2675
|
key: 2,
|
|
2664
2676
|
class: "d-error text-red"
|
|
2665
|
-
},
|
|
2677
|
+
}, Gs = {
|
|
2666
2678
|
__name: "DInputString",
|
|
2667
2679
|
props: {
|
|
2668
2680
|
form: Object,
|
|
@@ -2685,74 +2697,74 @@ const cs = new ds(), us = { style: { display: "flex", "flex-direction": "column"
|
|
|
2685
2697
|
disabled: Boolean
|
|
2686
2698
|
},
|
|
2687
2699
|
emits: ["update:modelValue", "input", "blur"],
|
|
2688
|
-
setup(e, { expose:
|
|
2689
|
-
const n = e, s = T(n.error), a = zt(),
|
|
2700
|
+
setup(e, { expose: t, emit: o }) {
|
|
2701
|
+
const n = e, s = T(n.error), a = zt(), l = T(!1), r = T(null);
|
|
2690
2702
|
//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
2691
2703
|
const i = m({
|
|
2692
2704
|
get: () => n.modelValue,
|
|
2693
2705
|
//props.form?.fields[props.name].model.value,
|
|
2694
2706
|
set: (w) => {
|
|
2695
|
-
|
|
2707
|
+
o("update:modelValue", w);
|
|
2696
2708
|
}
|
|
2697
2709
|
}), c = m(() => n.type === "password" ? "password" : "text"), u = m(() => n.scale), h = (w) => {
|
|
2698
|
-
|
|
2710
|
+
o("input", w), x();
|
|
2699
2711
|
}, x = () => {
|
|
2700
2712
|
if (!(!n.form || !n.form.fields || !n.form.fields[n.name].rules))
|
|
2701
|
-
return s.value =
|
|
2713
|
+
return s.value = ms.validate(i.value, n.form.fields[n.name].rules), !!s.value;
|
|
2702
2714
|
};
|
|
2703
2715
|
me(() => {
|
|
2704
2716
|
S();
|
|
2705
2717
|
});
|
|
2706
2718
|
const S = () => {
|
|
2707
2719
|
var w;
|
|
2708
|
-
(w =
|
|
2720
|
+
(w = r.value) == null || w.focus();
|
|
2709
2721
|
}, N = () => {
|
|
2710
2722
|
i.value = "";
|
|
2711
2723
|
}, $ = (w) => {
|
|
2712
|
-
|
|
2724
|
+
l.value = w;
|
|
2713
2725
|
}, H = (w) => {
|
|
2714
2726
|
s.value = w;
|
|
2715
2727
|
}, P = (w) => {
|
|
2716
|
-
|
|
2728
|
+
o("blur", w);
|
|
2717
2729
|
};
|
|
2718
|
-
return
|
|
2730
|
+
return t({
|
|
2719
2731
|
focus: S,
|
|
2720
2732
|
setError: H,
|
|
2721
2733
|
validate: x
|
|
2722
2734
|
}), (w, I) => {
|
|
2723
|
-
var M, g, R, A, z, y, F,
|
|
2724
|
-
return d(),
|
|
2735
|
+
var M, g, R, A, z, y, F, f, W, L, G, se, ve, ye, _e, be, ee, xe, de, $e, Ce, he, Fe, We, Pe, je, Xe, Ye, Ue, qe, Ge, Ze, Ke, Je, Qe, et, tt, ot, nt;
|
|
2736
|
+
return d(), p("div", {
|
|
2725
2737
|
class: D(["d-input-string", u.value])
|
|
2726
2738
|
}, [
|
|
2727
|
-
_("div",
|
|
2728
|
-
n.label ? (d(),
|
|
2739
|
+
_("div", hs, [
|
|
2740
|
+
n.label ? (d(), p("div", gs, [
|
|
2729
2741
|
K(O(n.label), 1),
|
|
2730
|
-
(M = n.form) != null && M.fields[n.name].rules && n.form.fields[n.name].rules.hasOwnProperty("required") ? (d(),
|
|
2742
|
+
(M = n.form) != null && M.fields[n.name].rules && n.form.fields[n.name].rules.hasOwnProperty("required") ? (d(), p("span", vs, "*")) : k("", !0)
|
|
2731
2743
|
])) : k("", !0),
|
|
2732
|
-
_("div",
|
|
2733
|
-
(R = (g = n.pre) == null ? void 0 : g.outside) != null && R.component ? (d(),
|
|
2744
|
+
_("div", ys, [
|
|
2745
|
+
(R = (g = n.pre) == null ? void 0 : g.outside) != null && R.component ? (d(), p("div", {
|
|
2734
2746
|
key: 0,
|
|
2735
2747
|
class: D(["d-pre", n.disabled ? "disabled" : ""])
|
|
2736
2748
|
}, [
|
|
2737
2749
|
(d(), b(Y((z = (A = n.pre) == null ? void 0 : A.outside) == null ? void 0 : z.component)))
|
|
2738
|
-
], 2)) : (F = (y = n.pre) == null ? void 0 : y.outside) != null && F.text ? (d(),
|
|
2750
|
+
], 2)) : (F = (y = n.pre) == null ? void 0 : y.outside) != null && F.text ? (d(), p("div", {
|
|
2739
2751
|
key: 1,
|
|
2740
2752
|
class: D(["d-pre", n.disabled ? "disabled" : ""])
|
|
2741
2753
|
}, [
|
|
2742
2754
|
_("div", {
|
|
2743
|
-
class: D(["d-text",
|
|
2744
|
-
}, O((W = (
|
|
2755
|
+
class: D(["d-text", l.value ? "focused" : ""])
|
|
2756
|
+
}, O((W = (f = n.pre) == null ? void 0 : f.outside) == null ? void 0 : W.text), 3)
|
|
2745
2757
|
], 2)) : k("", !0),
|
|
2746
|
-
_("div",
|
|
2747
|
-
(G = (
|
|
2758
|
+
_("div", _s, [
|
|
2759
|
+
(G = (L = n.pre) == null ? void 0 : L.inside) != null && G.action && ((ve = (se = n.pre) == null ? void 0 : se.inside) == null ? void 0 : ve.action) === "clear" && ((ye = i.value) == null ? void 0 : ye.length) > 0 ? (d(), p("div", {
|
|
2748
2760
|
key: 0,
|
|
2749
2761
|
class: "d-pre-inside-button",
|
|
2750
2762
|
onClick: N
|
|
2751
|
-
},
|
|
2763
|
+
}, xs)) : k("", !0),
|
|
2752
2764
|
J(_("input", {
|
|
2753
|
-
id:
|
|
2765
|
+
id: B(a),
|
|
2754
2766
|
ref_key: "inputRef",
|
|
2755
|
-
ref:
|
|
2767
|
+
ref: r,
|
|
2756
2768
|
"onUpdate:modelValue": I[0] || (I[0] = (Ie) => i.value = Ie),
|
|
2757
2769
|
style: { width: "100%" },
|
|
2758
2770
|
type: c.value,
|
|
@@ -2762,38 +2774,38 @@ const cs = new ds(), us = { style: { display: "flex", "flex-direction": "column"
|
|
|
2762
2774
|
onBlur: P,
|
|
2763
2775
|
onFocusout: I[2] || (I[2] = (Ie) => $(!1)),
|
|
2764
2776
|
class: D([
|
|
2765
|
-
(be = (_e = n.pre) == null ? void 0 : _e.outside) != null && be.component || (xe = (
|
|
2766
|
-
($e = (
|
|
2777
|
+
(be = (_e = n.pre) == null ? void 0 : _e.outside) != null && be.component || (xe = (ee = n.pre) == null ? void 0 : ee.outside) != null && xe.text ? "has-pre" : "",
|
|
2778
|
+
($e = (de = n.post) == null ? void 0 : de.outside) != null && $e.component || (he = (Ce = n.post) == null ? void 0 : Ce.outside) != null && he.text ? "has-post" : "",
|
|
2767
2779
|
(We = (Fe = n.pre) == null ? void 0 : Fe.inside) != null && We.action ? "has-pre-inside-button" : "",
|
|
2768
2780
|
(je = (Pe = n.post) == null ? void 0 : Pe.inside) != null && je.action ? "has-post-inside-button" : "",
|
|
2769
|
-
|
|
2781
|
+
l.value ? "focused" : ""
|
|
2770
2782
|
]),
|
|
2771
2783
|
disabled: n.disabled
|
|
2772
|
-
}, null, 42,
|
|
2784
|
+
}, null, 42, $s), [
|
|
2773
2785
|
[De, i.value]
|
|
2774
2786
|
]),
|
|
2775
|
-
(Ye = (Xe = n.post) == null ? void 0 : Xe.inside) != null && Ye.action && ((qe = (Ue = n.post) == null ? void 0 : Ue.inside) == null ? void 0 : qe.action) === "clear" && ((Ge = i.value) == null ? void 0 : Ge.length) > 0 ? (d(),
|
|
2787
|
+
(Ye = (Xe = n.post) == null ? void 0 : Xe.inside) != null && Ye.action && ((qe = (Ue = n.post) == null ? void 0 : Ue.inside) == null ? void 0 : qe.action) === "clear" && ((Ge = i.value) == null ? void 0 : Ge.length) > 0 ? (d(), p("div", {
|
|
2776
2788
|
key: 1,
|
|
2777
2789
|
class: "d-post-inside-button",
|
|
2778
2790
|
onClick: N
|
|
2779
|
-
},
|
|
2791
|
+
}, ws)) : k("", !0)
|
|
2780
2792
|
]),
|
|
2781
|
-
(Ke = (Ze = n.post) == null ? void 0 : Ze.outside) != null && Ke.component ? (d(),
|
|
2793
|
+
(Ke = (Ze = n.post) == null ? void 0 : Ze.outside) != null && Ke.component ? (d(), p("div", {
|
|
2782
2794
|
key: 2,
|
|
2783
2795
|
class: D(["d-post", n.disabled ? "disabled" : ""])
|
|
2784
2796
|
}, [
|
|
2785
2797
|
(d(), b(Y((Qe = (Je = n.post) == null ? void 0 : Je.outside) == null ? void 0 : Qe.component)))
|
|
2786
|
-
], 2)) : (tt = (et = n.post) == null ? void 0 : et.outside) != null && tt.text ? (d(),
|
|
2798
|
+
], 2)) : (tt = (et = n.post) == null ? void 0 : et.outside) != null && tt.text ? (d(), p("div", {
|
|
2787
2799
|
key: 3,
|
|
2788
2800
|
class: D(["d-post", n.disabled ? "disabled" : ""])
|
|
2789
2801
|
}, [
|
|
2790
2802
|
_("div", {
|
|
2791
|
-
class: D(["d-text",
|
|
2803
|
+
class: D(["d-text", l.value ? "focused" : ""])
|
|
2792
2804
|
}, O((nt = (ot = n.post) == null ? void 0 : ot.outside) == null ? void 0 : nt.text), 3)
|
|
2793
2805
|
], 2)) : k("", !0)
|
|
2794
2806
|
]),
|
|
2795
|
-
n.help ? (d(),
|
|
2796
|
-
s.value ? (d(),
|
|
2807
|
+
n.help ? (d(), p("div", Ss, O(n.help), 1)) : k("", !0),
|
|
2808
|
+
s.value ? (d(), p("div", Ds, O(s.value), 1)) : k("", !0)
|
|
2797
2809
|
])
|
|
2798
2810
|
], 2);
|
|
2799
2811
|
};
|
|
@@ -2809,12 +2821,12 @@ const cs = new ds(), us = { style: { display: "flex", "flex-direction": "column"
|
|
|
2809
2821
|
}
|
|
2810
2822
|
},
|
|
2811
2823
|
mutations: {
|
|
2812
|
-
addComponent(e,
|
|
2813
|
-
fe.state.name =
|
|
2824
|
+
addComponent(e, t) {
|
|
2825
|
+
fe.state.name = t;
|
|
2814
2826
|
},
|
|
2815
2827
|
addComponents(e) {
|
|
2816
|
-
for (const
|
|
2817
|
-
e.hasOwnProperty(
|
|
2828
|
+
for (const t in e)
|
|
2829
|
+
e.hasOwnProperty(t) && (fe.state[t] = e[t]);
|
|
2818
2830
|
}
|
|
2819
2831
|
}
|
|
2820
2832
|
}, wt = (e) => {
|
|
@@ -2823,25 +2835,25 @@ const cs = new ds(), us = { style: { display: "flex", "flex-direction": "column"
|
|
|
2823
2835
|
wt.close = (e) => {
|
|
2824
2836
|
U.emit("notification-close", e);
|
|
2825
2837
|
};
|
|
2826
|
-
const
|
|
2827
|
-
mounted: function(e,
|
|
2828
|
-
e.clickOutsideEvent = function(
|
|
2829
|
-
e ===
|
|
2838
|
+
const Zs = () => ({ notify: wt }), Ks = {
|
|
2839
|
+
mounted: function(e, t) {
|
|
2840
|
+
e.clickOutsideEvent = function(o) {
|
|
2841
|
+
e === o.target || e.contains(o.target) || t.value(o, e);
|
|
2830
2842
|
}, document.addEventListener("click", e.clickOutsideEvent);
|
|
2831
2843
|
},
|
|
2832
2844
|
unmounted: function(e) {
|
|
2833
2845
|
document.removeEventListener("click", e.clickOutsideEvent);
|
|
2834
2846
|
}
|
|
2835
|
-
},
|
|
2836
|
-
beforeMount(e,
|
|
2837
|
-
e._keydownCallback = (
|
|
2838
|
-
|
|
2847
|
+
}, Js = {
|
|
2848
|
+
beforeMount(e, t) {
|
|
2849
|
+
e._keydownCallback = (o) => {
|
|
2850
|
+
o.key === t.arg && t.value();
|
|
2839
2851
|
}, document.addEventListener("keydown", e._keydownCallback);
|
|
2840
2852
|
},
|
|
2841
|
-
unmounted(e,
|
|
2853
|
+
unmounted(e, t) {
|
|
2842
2854
|
document.removeEventListener("keydown", e._keydownCallback), delete e._keydownCallback;
|
|
2843
2855
|
}
|
|
2844
|
-
},
|
|
2856
|
+
}, Qs = {
|
|
2845
2857
|
beforeMount(e) {
|
|
2846
2858
|
e.focus();
|
|
2847
2859
|
}
|
|
@@ -2852,19 +2864,19 @@ function St(e) {
|
|
|
2852
2864
|
function Dt(e) {
|
|
2853
2865
|
return e.type.indexOf("mouse") !== -1 ? e.clientY : e.touches[0].clientY;
|
|
2854
2866
|
}
|
|
2855
|
-
var
|
|
2867
|
+
var Ts = function() {
|
|
2856
2868
|
var e = !1;
|
|
2857
2869
|
try {
|
|
2858
|
-
var
|
|
2870
|
+
var t = Object.defineProperty({}, "passive", {
|
|
2859
2871
|
get: function() {
|
|
2860
2872
|
e = !0;
|
|
2861
2873
|
}
|
|
2862
2874
|
});
|
|
2863
|
-
window.addEventListener("test", null,
|
|
2875
|
+
window.addEventListener("test", null, t);
|
|
2864
2876
|
} catch {
|
|
2865
2877
|
}
|
|
2866
2878
|
return e;
|
|
2867
|
-
}(),
|
|
2879
|
+
}(), Ls = {
|
|
2868
2880
|
disableClick: !1,
|
|
2869
2881
|
tapTolerance: 10,
|
|
2870
2882
|
// px
|
|
@@ -2881,52 +2893,52 @@ var ks = function() {
|
|
|
2881
2893
|
// ms
|
|
2882
2894
|
};
|
|
2883
2895
|
function ke(e) {
|
|
2884
|
-
var
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
},
|
|
2896
|
+
var t = this.$$touchObj, o = e.type.indexOf("touch") >= 0, n = e.type.indexOf("mouse") >= 0, s = this;
|
|
2897
|
+
o && (t.lastTouchStartTime = e.timeStamp), !(n && t.lastTouchStartTime && e.timeStamp - t.lastTouchStartTime < 350) && (t.touchStarted || (Tt(this), t.touchStarted = !0, t.touchMoved = !1, t.swipeOutBounded = !1, t.startX = St(e), t.startY = Dt(e), t.currentX = 0, t.currentY = 0, t.touchStartTime = e.timeStamp, t.hasSwipe = Z(this, "swipe") || Z(this, "swipe.left") || Z(this, "swipe.right") || Z(this, "swipe.top") || Z(this, "swipe.bottom"), Z(this, "hold") && (t.touchHoldTimer = setTimeout(function() {
|
|
2898
|
+
t.touchHoldTimer = null, te(e, s, "hold");
|
|
2899
|
+
}, t.options.touchHoldTolerance)), te(e, this, "press")));
|
|
2888
2900
|
}
|
|
2889
2901
|
function we(e) {
|
|
2890
|
-
var
|
|
2891
|
-
if (
|
|
2892
|
-
if (
|
|
2893
|
-
var
|
|
2894
|
-
|
|
2902
|
+
var t = this.$$touchObj, o = St(e), n = Dt(e), s = t.currentX !== o || t.currentY !== n;
|
|
2903
|
+
if (t.currentX = o, t.currentY = n, t.touchMoved) {
|
|
2904
|
+
if (t.hasSwipe && !t.swipeOutBounded) {
|
|
2905
|
+
var l = t.options.swipeTolerance;
|
|
2906
|
+
t.swipeOutBounded = Math.abs(t.startX - t.currentX) > l && Math.abs(t.startY - t.currentY) > l;
|
|
2895
2907
|
}
|
|
2896
2908
|
} else {
|
|
2897
|
-
var a =
|
|
2898
|
-
|
|
2909
|
+
var a = t.options.tapTolerance;
|
|
2910
|
+
t.touchMoved = Math.abs(t.startX - t.currentX) > a || Math.abs(t.startY - t.currentY) > a, t.touchMoved && (ze(t), te(e, this, "drag.once"));
|
|
2899
2911
|
}
|
|
2900
2912
|
if (Z(this, "rollover") && s) {
|
|
2901
|
-
var
|
|
2902
|
-
(
|
|
2913
|
+
var r = e.timeStamp, i = t.options.rollOverFrequency;
|
|
2914
|
+
(t.touchRollTime == null || r > t.touchRollTime + i) && (t.touchRollTime = r, te(e, this, "rollover"));
|
|
2903
2915
|
}
|
|
2904
|
-
if (Z(this, "drag") &&
|
|
2905
|
-
var
|
|
2906
|
-
(
|
|
2916
|
+
if (Z(this, "drag") && t.touchStarted && t.touchMoved && s) {
|
|
2917
|
+
var r = e.timeStamp, i = t.options.dragFrequency;
|
|
2918
|
+
(t.touchDragTime == null || r > t.touchDragTime + i) && (t.touchDragTime = r, te(e, this, "drag"));
|
|
2907
2919
|
}
|
|
2908
2920
|
}
|
|
2909
|
-
function
|
|
2921
|
+
function rt() {
|
|
2910
2922
|
var e = this.$$touchObj;
|
|
2911
2923
|
ze(e), Ve(this), e.touchStarted = e.touchMoved = !1, e.startX = e.startY = 0;
|
|
2912
2924
|
}
|
|
2913
2925
|
function Se(e) {
|
|
2914
|
-
var
|
|
2915
|
-
|
|
2916
|
-
var s =
|
|
2917
|
-
if (ze(
|
|
2918
|
-
if (
|
|
2919
|
-
if (
|
|
2920
|
-
var a =
|
|
2921
|
-
(
|
|
2926
|
+
var t = this.$$touchObj, o = e.type.indexOf("touch") >= 0, n = e.type.indexOf("mouse") >= 0;
|
|
2927
|
+
o && (t.lastTouchEndTime = e.timeStamp);
|
|
2928
|
+
var s = o && !t.touchHoldTimer;
|
|
2929
|
+
if (ze(t), t.touchStarted = !1, Ve(this), !(n && t.lastTouchEndTime && e.timeStamp - t.lastTouchEndTime < 350))
|
|
2930
|
+
if (te(e, this, "release"), t.touchMoved) {
|
|
2931
|
+
if (t.hasSwipe && !t.swipeOutBounded) {
|
|
2932
|
+
var a = t.options.swipeTolerance, l, r = Math.abs(t.startY - t.currentY), i = Math.abs(t.startX - t.currentX);
|
|
2933
|
+
(r > a || i > a) && (r > a ? l = t.startY > t.currentY ? "top" : "bottom" : l = t.startX > t.currentX ? "left" : "right", Z(this, "swipe." + l) ? te(e, this, "swipe." + l, l) : te(e, this, "swipe", l));
|
|
2922
2934
|
}
|
|
2923
|
-
} else if (Z(this, "longtap") && e.timeStamp -
|
|
2924
|
-
e.cancelable && e.preventDefault(),
|
|
2935
|
+
} else if (Z(this, "longtap") && e.timeStamp - t.touchStartTime > t.options.longTapTimeInterval)
|
|
2936
|
+
e.cancelable && e.preventDefault(), te(e, this, "longtap");
|
|
2925
2937
|
else if (Z(this, "hold") && s) {
|
|
2926
2938
|
e.cancelable && e.preventDefault();
|
|
2927
2939
|
return;
|
|
2928
2940
|
} else
|
|
2929
|
-
|
|
2941
|
+
te(e, this, "tap");
|
|
2930
2942
|
}
|
|
2931
2943
|
function dt() {
|
|
2932
2944
|
Tt(this);
|
|
@@ -2934,97 +2946,97 @@ function dt() {
|
|
|
2934
2946
|
function ct() {
|
|
2935
2947
|
Ve(this);
|
|
2936
2948
|
}
|
|
2937
|
-
function Z(e,
|
|
2938
|
-
var
|
|
2939
|
-
return
|
|
2949
|
+
function Z(e, t) {
|
|
2950
|
+
var o = e.$$touchObj.callbacks[t];
|
|
2951
|
+
return o != null && o.length > 0;
|
|
2940
2952
|
}
|
|
2941
|
-
function
|
|
2942
|
-
var s =
|
|
2953
|
+
function te(e, t, o, n) {
|
|
2954
|
+
var s = t.$$touchObj, a = s.callbacks[o];
|
|
2943
2955
|
if (a == null || a.length === 0)
|
|
2944
2956
|
return null;
|
|
2945
|
-
for (var
|
|
2946
|
-
var
|
|
2947
|
-
|
|
2957
|
+
for (var l = 0; l < a.length; l++) {
|
|
2958
|
+
var r = a[l];
|
|
2959
|
+
r.modifiers.stop && e.stopPropagation(), r.modifiers.prevent && e.preventDefault(), !(r.modifiers.self && e.target !== e.currentTarget) && typeof r.value == "function" && (n ? r.value(n, e) : r.value(e));
|
|
2948
2960
|
}
|
|
2949
2961
|
}
|
|
2950
2962
|
function Tt(e) {
|
|
2951
|
-
var
|
|
2952
|
-
|
|
2963
|
+
var t = e.$$touchObj.options.touchClass;
|
|
2964
|
+
t && e.classList.add(t);
|
|
2953
2965
|
}
|
|
2954
2966
|
function Ve(e) {
|
|
2955
|
-
var
|
|
2956
|
-
|
|
2967
|
+
var t = e.$$touchObj.options.touchClass;
|
|
2968
|
+
t && e.classList.remove(t);
|
|
2957
2969
|
}
|
|
2958
2970
|
function ze(e) {
|
|
2959
2971
|
e.touchHoldTimer && (clearTimeout(e.touchHoldTimer), e.touchHoldTimer = null);
|
|
2960
2972
|
}
|
|
2961
|
-
function
|
|
2962
|
-
var
|
|
2973
|
+
function Cs(e, t) {
|
|
2974
|
+
var o = e.$$touchObj || {
|
|
2963
2975
|
// an object contains all callbacks registered,
|
|
2964
2976
|
// key is event name, value is an array
|
|
2965
2977
|
callbacks: {},
|
|
2966
2978
|
// prevent bind twice, set to true when event bound
|
|
2967
2979
|
hasBindTouchEvents: !1,
|
|
2968
2980
|
// default options, would be override by v-touch-options
|
|
2969
|
-
options:
|
|
2981
|
+
options: Ls
|
|
2970
2982
|
};
|
|
2971
|
-
return
|
|
2983
|
+
return t && (o.options = Object.assign({}, o.options, t)), e.$$touchObj = o, e.$$touchObj;
|
|
2972
2984
|
}
|
|
2973
|
-
const
|
|
2974
|
-
beforeMount: function(e,
|
|
2975
|
-
const
|
|
2976
|
-
let n =
|
|
2977
|
-
const s =
|
|
2985
|
+
const ea = {
|
|
2986
|
+
beforeMount: function(e, t) {
|
|
2987
|
+
const o = Cs(e);
|
|
2988
|
+
let n = Ts ? { passive: !0 } : !1;
|
|
2989
|
+
const s = t.arg || "tap";
|
|
2978
2990
|
switch (s) {
|
|
2979
2991
|
case "swipe":
|
|
2980
|
-
let a =
|
|
2992
|
+
let a = t.modifiers;
|
|
2981
2993
|
if (a.left || a.right || a.top || a.bottom) {
|
|
2982
|
-
for (let
|
|
2983
|
-
if (["left", "right", "top", "bottom"].indexOf(
|
|
2984
|
-
let
|
|
2985
|
-
|
|
2994
|
+
for (let l in t.modifiers)
|
|
2995
|
+
if (["left", "right", "top", "bottom"].indexOf(l) >= 0) {
|
|
2996
|
+
let r = "swipe." + l;
|
|
2997
|
+
o.callbacks[r] = o.callbacks[r] || [], o.callbacks[r].push(t);
|
|
2986
2998
|
}
|
|
2987
2999
|
} else
|
|
2988
|
-
|
|
3000
|
+
o.callbacks.swipe = o.callbacks.swipe || [], o.callbacks.swipe.push(t);
|
|
2989
3001
|
break;
|
|
2990
3002
|
case "press":
|
|
2991
3003
|
case "drag":
|
|
2992
|
-
|
|
3004
|
+
t.modifiers.disablePassive && (n = !1);
|
|
2993
3005
|
default:
|
|
2994
|
-
|
|
3006
|
+
o.callbacks[s] = o.callbacks[s] || [], o.callbacks[s].push(t);
|
|
2995
3007
|
}
|
|
2996
|
-
|
|
3008
|
+
o.hasBindTouchEvents || (e.addEventListener("touchstart", ke, n), e.addEventListener("touchmove", we, n), e.addEventListener("touchcancel", rt), e.addEventListener("touchend", Se), o.options.disableClick || (e.addEventListener("mousedown", ke), e.addEventListener("mousemove", we), e.addEventListener("mouseup", Se), e.addEventListener("mouseenter", dt), e.addEventListener("mouseleave", ct)), o.hasBindTouchEvents = !0);
|
|
2997
3009
|
},
|
|
2998
3010
|
unmounted: function(e) {
|
|
2999
|
-
e.removeEventListener("touchstart", ke), e.removeEventListener("touchmove", we), e.removeEventListener("touchcancel",
|
|
3011
|
+
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", dt), e.removeEventListener("mouseleave", ct)), delete e.$$touchObj;
|
|
3000
3012
|
}
|
|
3001
3013
|
};
|
|
3002
3014
|
export {
|
|
3003
|
-
|
|
3015
|
+
Es as DAccordion,
|
|
3004
3016
|
Jo as DAlertDialog,
|
|
3005
3017
|
co as DBadge,
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3018
|
+
ie as DButton,
|
|
3019
|
+
Hs as DCard,
|
|
3020
|
+
Fs as DCheckbox,
|
|
3009
3021
|
uo as DCollapse,
|
|
3010
3022
|
fe as DComponentStore,
|
|
3011
|
-
|
|
3023
|
+
Ns as DConfigProvider,
|
|
3012
3024
|
en as DConfirmDialog,
|
|
3013
3025
|
Io as DContextMenu,
|
|
3014
|
-
|
|
3026
|
+
Ws as DDialogProvider,
|
|
3015
3027
|
at as DDrag,
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3028
|
+
Co as DDrop,
|
|
3029
|
+
As as DDropdown,
|
|
3030
|
+
qs as DForm,
|
|
3019
3031
|
pe as DGlobalStore,
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3032
|
+
Xs as DGrid,
|
|
3033
|
+
re as DIcon,
|
|
3034
|
+
oe as DIconStore,
|
|
3035
|
+
Ys as DImage,
|
|
3036
|
+
zs as DInfoProgress,
|
|
3037
|
+
Bs as DInput,
|
|
3038
|
+
Gs as DInputString,
|
|
3039
|
+
Ms as DLayoutAdmin,
|
|
3028
3040
|
Oo as DLayoutContent,
|
|
3029
3041
|
No as DLayoutFooter,
|
|
3030
3042
|
Eo as DLayoutHeader,
|
|
@@ -3032,26 +3044,26 @@ export {
|
|
|
3032
3044
|
Mo as DLayoutTab,
|
|
3033
3045
|
bt as DMenu,
|
|
3034
3046
|
$t as DModal,
|
|
3035
|
-
|
|
3047
|
+
Vs as DNotificationProvider,
|
|
3036
3048
|
an as DPanel,
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3049
|
+
Os as DScroll,
|
|
3050
|
+
Rs as DScrollProvider,
|
|
3051
|
+
Ps as DSelect,
|
|
3052
|
+
js as DTabs,
|
|
3053
|
+
Us as DTextarea,
|
|
3042
3054
|
Te as DTransferStore,
|
|
3043
3055
|
xt as DTree,
|
|
3044
3056
|
To as DTreeItem,
|
|
3045
3057
|
v as DTreeStore,
|
|
3046
3058
|
q as Rules,
|
|
3047
3059
|
Nn as alert,
|
|
3048
|
-
|
|
3060
|
+
Ks as clickOutside,
|
|
3049
3061
|
Mn as confirm,
|
|
3050
3062
|
U as emitter,
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3063
|
+
Lo as eventsBus,
|
|
3064
|
+
Qs as focus,
|
|
3065
|
+
Js as keydown,
|
|
3054
3066
|
wt as notify,
|
|
3055
|
-
|
|
3056
|
-
|
|
3067
|
+
ea as touch,
|
|
3068
|
+
Zs as useNotification
|
|
3057
3069
|
};
|