doph-js 0.2.93 → 0.2.94
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 +699 -695
- package/dist/dophJs.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/dophJs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useSlots as Ce, computed as
|
|
1
|
+
import { useSlots as Ce, computed as h, h as st, openBlock as d, createBlock as b, unref as E, ref as T, createElementBlock as m, Fragment as le, normalizeClass as D, renderSlot as L, createCommentVNode as k, normalizeStyle as z, resolveDynamicComponent as U, createStaticVNode as ut, onMounted as me, toDisplayString as O, withDirectives as oe, createElementVNode as _, vModelDynamic as De, withCtx as B, createTextVNode as K, Transition as Ne, withModifiers as j, resolveComponent as Ct, resolveDirective as Re, normalizeProps as pt, guardReactiveProps as ft, createVNode as J, renderList as ge, pushScopeId as Lt, popScopeId as It, reactive as Oe, Teleport as mt, nextTick as ht, getCurrentInstance as gt, watch as vt, onUnmounted as Et, mergeProps as ue, useCssVars as Ae, shallowRef as Bt, defineComponent as Mt, TransitionGroup as yt, vModelCheckbox as Nt, vModelSelect as Rt, toRef as Ot, KeepAlive as At, toRefs as Ht, vModelText as Vt } from "vue";
|
|
2
2
|
const re = {
|
|
3
3
|
__name: "DIcon",
|
|
4
4
|
props: {
|
|
@@ -8,17 +8,17 @@ const re = {
|
|
|
8
8
|
className: String
|
|
9
9
|
},
|
|
10
10
|
setup(t) {
|
|
11
|
-
const e = t, o = Ce(), n =
|
|
11
|
+
const e = t, o = Ce(), n = h(() => {
|
|
12
12
|
const { className: r } = e;
|
|
13
13
|
return r === void 0 ? "icon" : ["icon", r].join(" ");
|
|
14
|
-
}), s =
|
|
14
|
+
}), s = h(() => {
|
|
15
15
|
const { color: r } = e;
|
|
16
16
|
return r === void 0 ? null : r;
|
|
17
|
-
}), a =
|
|
17
|
+
}), a = h(() => {
|
|
18
18
|
const r = e.size ?? null;
|
|
19
19
|
if (r !== void 0)
|
|
20
20
|
return typeof r == "number" || /^\d+$/.test(r) ? `${r}px` : r;
|
|
21
|
-
}), l =
|
|
21
|
+
}), l = h(() => st(
|
|
22
22
|
"i",
|
|
23
23
|
{
|
|
24
24
|
class: n.value,
|
|
@@ -29,7 +29,7 @@ const re = {
|
|
|
29
29
|
},
|
|
30
30
|
e.component ? st(e.component) : o
|
|
31
31
|
));
|
|
32
|
-
return (r, i) => (
|
|
32
|
+
return (r, i) => (d(), b(E(l)));
|
|
33
33
|
}
|
|
34
34
|
}, te = {
|
|
35
35
|
state: {},
|
|
@@ -120,47 +120,47 @@ const ne = (t, e) => {
|
|
|
120
120
|
},
|
|
121
121
|
emits: ["click", "contextmenu"],
|
|
122
122
|
setup(t, { expose: e, emit: o }) {
|
|
123
|
-
const n = t, s = Ce(), a =
|
|
124
|
-
o("click",
|
|
125
|
-
}, i = (
|
|
126
|
-
o("contextmenu",
|
|
127
|
-
},
|
|
128
|
-
const
|
|
129
|
-
return n.type === "primary" ? `button${
|
|
123
|
+
const n = t, s = Ce(), a = T(null), l = h(() => n.icon ? te.getters.getIcon(n.icon) : null), r = ($) => {
|
|
124
|
+
o("click", $);
|
|
125
|
+
}, i = ($) => {
|
|
126
|
+
o("contextmenu", $);
|
|
127
|
+
}, c = h(() => n.scale === "large" ? "button-lg" : n.scale === "small" ? "button-sm" : ""), u = h(() => n.disabled ? "disabled" : ""), g = ($) => !!s[$], x = h(() => g("default") ? "" : n.scale === "large" ? "d-button-lg-icon" : n.scale === "small" ? "d-button-sm-icon" : "d-button-icon"), C = h(() => {
|
|
128
|
+
const $ = n.outline ? "-outline" : "";
|
|
129
|
+
return n.type === "primary" ? `button${$}-blue` : n.type === "success" ? `button${$}-green` : n.type === "error" ? `button${$}-red` : n.type === "warning" ? `button${$}-orange` : n.type === "wait" ? `button${$}-violet` : n.outline ? `button${$}` : "";
|
|
130
130
|
});
|
|
131
131
|
return e({
|
|
132
132
|
elementSize: () => _t(a)
|
|
133
|
-
}), (
|
|
134
|
-
l.value ?
|
|
133
|
+
}), ($, H) => (d(), m(le, null, [
|
|
134
|
+
l.value ? k("", !0) : (d(), m("div", {
|
|
135
135
|
key: 0,
|
|
136
136
|
ref_key: "el",
|
|
137
137
|
ref: a,
|
|
138
138
|
onClick: r,
|
|
139
139
|
onContextmenu: i,
|
|
140
|
-
class:
|
|
140
|
+
class: D(["button", [n.class, c.value, C.value, u.value].join(" ")])
|
|
141
141
|
}, [
|
|
142
|
-
L(
|
|
143
|
-
n.loading ? (
|
|
142
|
+
L($.$slots, "default", {}, void 0, !0),
|
|
143
|
+
n.loading ? (d(), m("svg", Ft, Pt)) : k("", !0)
|
|
144
144
|
], 34)),
|
|
145
|
-
l.value ? (
|
|
145
|
+
l.value ? (d(), m("div", {
|
|
146
146
|
key: 1,
|
|
147
147
|
ref_key: "el",
|
|
148
148
|
ref: a,
|
|
149
149
|
onClick: r,
|
|
150
150
|
onContextmenu: i,
|
|
151
|
-
class:
|
|
152
|
-
style:
|
|
151
|
+
class: D(["button button-ext", [n.class, c.value, x.value, C.value, u.value].join(" ")]),
|
|
152
|
+
style: z(n.style)
|
|
153
153
|
}, [
|
|
154
|
-
n.icon ? (
|
|
154
|
+
n.icon ? (d(), b(U(re), {
|
|
155
155
|
key: 0,
|
|
156
156
|
component: l.value,
|
|
157
157
|
color: "inherit"
|
|
158
|
-
}, null, 8, ["component"])) :
|
|
159
|
-
|
|
160
|
-
L(
|
|
161
|
-
])) :
|
|
162
|
-
n.loading ? (
|
|
163
|
-
], 38)) :
|
|
158
|
+
}, null, 8, ["component"])) : k("", !0),
|
|
159
|
+
E(s).default ? (d(), m("div", jt, [
|
|
160
|
+
L($.$slots, "default", {}, void 0, !0)
|
|
161
|
+
])) : k("", !0),
|
|
162
|
+
n.loading ? (d(), m("svg", Xt, Ut)) : k("", !0)
|
|
163
|
+
], 38)) : k("", !0)
|
|
164
164
|
], 64));
|
|
165
165
|
}
|
|
166
166
|
}, ie = /* @__PURE__ */ ne(qt, [["__scopeId", "data-v-e5cd6ccd"]]);
|
|
@@ -199,7 +199,7 @@ const Gt = {
|
|
|
199
199
|
},
|
|
200
200
|
emits: ["update:modelValue"],
|
|
201
201
|
setup(t, { expose: e, emit: o }) {
|
|
202
|
-
const n = t, s =
|
|
202
|
+
const n = t, s = T(null), a = h(() => n.scale === "small" ? "d-input-small" : n.scale === "large" ? "d-input-large" : ""), l = h({
|
|
203
203
|
get: () => n.modelValue,
|
|
204
204
|
set: (i) => {
|
|
205
205
|
o("update:modelValue", i);
|
|
@@ -213,28 +213,28 @@ const Gt = {
|
|
|
213
213
|
};
|
|
214
214
|
return e({
|
|
215
215
|
focus: r
|
|
216
|
-
}), (i,
|
|
217
|
-
n.label ? (
|
|
218
|
-
oe(
|
|
216
|
+
}), (i, c) => !n.post && !n.pre ? (d(), m("div", Gt, [
|
|
217
|
+
n.label ? (d(), m("div", Zt, O(n.label), 1)) : k("", !0),
|
|
218
|
+
oe(_("input", {
|
|
219
219
|
ref_key: "inputRef",
|
|
220
220
|
ref: s,
|
|
221
|
-
"onUpdate:modelValue":
|
|
221
|
+
"onUpdate:modelValue": c[0] || (c[0] = (u) => l.value = u),
|
|
222
222
|
type: n.password ? "password" : "text",
|
|
223
|
-
class:
|
|
223
|
+
class: D(a.value),
|
|
224
224
|
placeholder: n.placeholder,
|
|
225
225
|
style: { width: "100%" }
|
|
226
226
|
}, null, 10, Kt), [
|
|
227
227
|
[De, l.value]
|
|
228
228
|
])
|
|
229
|
-
])) : n.post && n.post.click && !n.pre ? (
|
|
230
|
-
n.label ? (
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
oe(
|
|
229
|
+
])) : n.post && n.post.click && !n.pre ? (d(), m("div", Jt, [
|
|
230
|
+
n.label ? (d(), m("div", Qt, O(n.label), 1)) : k("", !0),
|
|
231
|
+
_("div", eo, [
|
|
232
|
+
_("div", to, [
|
|
233
|
+
oe(_("input", {
|
|
234
234
|
ref_key: "inputRef",
|
|
235
235
|
ref: s,
|
|
236
|
-
class:
|
|
237
|
-
"onUpdate:modelValue":
|
|
236
|
+
class: D(["d-input-post-field", a.value]),
|
|
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%" }
|
|
@@ -242,52 +242,52 @@ const Gt = {
|
|
|
242
242
|
[De, l.value]
|
|
243
243
|
])
|
|
244
244
|
]),
|
|
245
|
-
n.post.label ? (
|
|
245
|
+
n.post.label ? (d(), b(ie, {
|
|
246
246
|
key: 0,
|
|
247
247
|
scale: n.scale,
|
|
248
|
-
class:
|
|
248
|
+
class: D(["d-input-post-button", n.post.class]),
|
|
249
249
|
onClick: n.post.click,
|
|
250
250
|
icon: n.post.icon
|
|
251
251
|
}, {
|
|
252
|
-
default:
|
|
252
|
+
default: B(() => [
|
|
253
253
|
K(O(n.post.label), 1)
|
|
254
254
|
]),
|
|
255
255
|
_: 1
|
|
256
|
-
}, 8, ["scale", "onClick", "icon", "class"])) : (
|
|
256
|
+
}, 8, ["scale", "onClick", "icon", "class"])) : (d(), b(ie, {
|
|
257
257
|
key: 1,
|
|
258
258
|
scale: n.scale,
|
|
259
|
-
class:
|
|
259
|
+
class: D(["d-input-post-button", n.post.class]),
|
|
260
260
|
onClick: n.post.click,
|
|
261
261
|
icon: n.post.icon
|
|
262
262
|
}, null, 8, ["scale", "onClick", "icon", "class"]))
|
|
263
263
|
])
|
|
264
|
-
])) : !n.post && n.pre && n.pre.click ? (
|
|
265
|
-
n.label ? (
|
|
266
|
-
|
|
267
|
-
n.pre.label ? (
|
|
264
|
+
])) : !n.post && n.pre && n.pre.click ? (d(), m("div", no, [
|
|
265
|
+
n.label ? (d(), m("div", so, O(n.label), 1)) : k("", !0),
|
|
266
|
+
_("div", ao, [
|
|
267
|
+
n.pre.label ? (d(), b(ie, {
|
|
268
268
|
key: 0,
|
|
269
269
|
scale: n.scale,
|
|
270
|
-
class:
|
|
270
|
+
class: D(["d-input-pre-button", n.pre.class]),
|
|
271
271
|
onClick: n.pre.click,
|
|
272
272
|
icon: n.pre.icon
|
|
273
273
|
}, {
|
|
274
|
-
default:
|
|
274
|
+
default: B(() => [
|
|
275
275
|
K(O(n.pre.label), 1)
|
|
276
276
|
]),
|
|
277
277
|
_: 1
|
|
278
|
-
}, 8, ["scale", "onClick", "icon", "class"])) : (
|
|
278
|
+
}, 8, ["scale", "onClick", "icon", "class"])) : (d(), b(ie, {
|
|
279
279
|
key: 1,
|
|
280
280
|
scale: n.scale,
|
|
281
|
-
class:
|
|
281
|
+
class: D(["d-input-pre-button", n.pre.class]),
|
|
282
282
|
onClick: n.pre.click,
|
|
283
283
|
icon: n.pre.icon
|
|
284
284
|
}, null, 8, ["scale", "onClick", "icon", "class"])),
|
|
285
|
-
|
|
286
|
-
oe(
|
|
285
|
+
_("div", io, [
|
|
286
|
+
oe(_("input", {
|
|
287
287
|
ref_key: "inputRef",
|
|
288
288
|
ref: s,
|
|
289
|
-
class:
|
|
290
|
-
"onUpdate:modelValue":
|
|
289
|
+
class: D(["d-input-pre-field", a.value]),
|
|
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%" }
|
|
@@ -296,7 +296,7 @@ const Gt = {
|
|
|
296
296
|
])
|
|
297
297
|
])
|
|
298
298
|
])
|
|
299
|
-
])) :
|
|
299
|
+
])) : k("", !0);
|
|
300
300
|
}
|
|
301
301
|
}, Es = /* @__PURE__ */ ne(ro, [["__scopeId", "data-v-a972038a"]]), co = {
|
|
302
302
|
__name: "DBadge",
|
|
@@ -310,12 +310,12 @@ const Gt = {
|
|
|
310
310
|
}
|
|
311
311
|
},
|
|
312
312
|
setup(t) {
|
|
313
|
-
const e = t, o =
|
|
313
|
+
const e = t, o = h(() => e.scale === "large" ? "badge-lg" : e.scale === "small" ? "badge-sm" : ""), n = h(() => {
|
|
314
314
|
const s = e.stress ? "-stress" : "";
|
|
315
315
|
return e.type === "primary" ? `badge${s}-blue` : e.type === "success" ? `badge${s}-green` : e.type === "error" ? `badge${s}-red` : e.type === "warning" ? `badge${s}-orange` : e.type === "wait" ? `badge${s}-violet` : e.stress ? `badge${s}-gray` : "";
|
|
316
316
|
});
|
|
317
|
-
return (s, a) => (
|
|
318
|
-
class:
|
|
317
|
+
return (s, a) => (d(), m("div", {
|
|
318
|
+
class: D(["badge", [e.class, o.value, n.value].join(" ")])
|
|
319
319
|
}, [
|
|
320
320
|
L(s.$slots, "default")
|
|
321
321
|
], 2));
|
|
@@ -357,17 +357,17 @@ const Gt = {
|
|
|
357
357
|
borderBottomWidth: i == null ? void 0 : i.style.borderBottomWidth,
|
|
358
358
|
marginTop: i == null ? void 0 : i.style.marginTop,
|
|
359
359
|
marginBottom: i == null ? void 0 : i.style.marginBottom
|
|
360
|
-
}), n = (i,
|
|
361
|
-
const { width:
|
|
362
|
-
i.style.width =
|
|
363
|
-
let { height:
|
|
364
|
-
return i.style.width =
|
|
365
|
-
}, s = (i,
|
|
366
|
-
const
|
|
367
|
-
i.style.height =
|
|
368
|
-
i.style.overflow =
|
|
360
|
+
}), n = (i, c) => {
|
|
361
|
+
const { width: u } = getComputedStyle(i);
|
|
362
|
+
i.style.width = u, i.style.position = "absolute", i.style.visibility = "hidden", i.style.height = "";
|
|
363
|
+
let { height: g } = getComputedStyle(i);
|
|
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 : g;
|
|
365
|
+
}, s = (i, c, u, g, x) => {
|
|
366
|
+
const C = i.animate(g, x);
|
|
367
|
+
i.style.height = c.height, C.onfinish = () => {
|
|
368
|
+
i.style.overflow = c.overflow, u();
|
|
369
369
|
};
|
|
370
|
-
}, a = (i,
|
|
370
|
+
}, a = (i, c) => [
|
|
371
371
|
{
|
|
372
372
|
height: ae,
|
|
373
373
|
opacity: e.opacityClosed,
|
|
@@ -381,28 +381,28 @@ const Gt = {
|
|
|
381
381
|
{
|
|
382
382
|
height: i,
|
|
383
383
|
opacity: e.opacityOpened,
|
|
384
|
-
paddingTop:
|
|
385
|
-
paddingBottom:
|
|
386
|
-
borderTopWidth:
|
|
387
|
-
borderBottomWidth:
|
|
388
|
-
marginTop:
|
|
389
|
-
marginBottom:
|
|
384
|
+
paddingTop: c.paddingTop,
|
|
385
|
+
paddingBottom: c.paddingBottom,
|
|
386
|
+
borderTopWidth: c.borderTopWidth,
|
|
387
|
+
borderBottomWidth: c.borderBottomWidth,
|
|
388
|
+
marginTop: c.marginTop,
|
|
389
|
+
marginBottom: c.marginBottom
|
|
390
390
|
}
|
|
391
|
-
], l = (i,
|
|
392
|
-
const
|
|
393
|
-
s(
|
|
394
|
-
}, r = (i,
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
const
|
|
398
|
-
s(
|
|
391
|
+
], l = (i, c) => {
|
|
392
|
+
const u = i, g = o(u), x = n(u, g), C = a(x, g), R = { duration: e.duration, easing: e.easingEnter };
|
|
393
|
+
s(u, g, c, C, R);
|
|
394
|
+
}, r = (i, c) => {
|
|
395
|
+
const u = i, g = o(u), { height: x } = getComputedStyle(u);
|
|
396
|
+
u.style.height = x, u.style.overflow = "hidden";
|
|
397
|
+
const C = a(x, g).reverse(), R = { duration: e.duration, easing: e.easingLeave };
|
|
398
|
+
s(u, g, c, C, R);
|
|
399
399
|
};
|
|
400
|
-
return (i,
|
|
400
|
+
return (i, c) => (d(), b(Ne, {
|
|
401
401
|
css: !1,
|
|
402
402
|
onEnter: l,
|
|
403
403
|
onLeave: r
|
|
404
404
|
}, {
|
|
405
|
-
default:
|
|
405
|
+
default: B(() => [
|
|
406
406
|
L(i.$slots, "default")
|
|
407
407
|
]),
|
|
408
408
|
_: 3
|
|
@@ -410,7 +410,7 @@ const Gt = {
|
|
|
410
410
|
}
|
|
411
411
|
}, Te = {
|
|
412
412
|
data: void 0
|
|
413
|
-
}, He = (t) => t.reduce((e, o) => (e[o] = o) && e, {}),
|
|
413
|
+
}, He = (t) => t.reduce((e, o) => (e[o] = o) && e, {}), X = He([
|
|
414
414
|
"drag",
|
|
415
415
|
"dragend",
|
|
416
416
|
"dragenter",
|
|
@@ -442,29 +442,29 @@ const Gt = {
|
|
|
442
442
|
tag: { type: String, default: "div" }
|
|
443
443
|
},
|
|
444
444
|
setup(t) {
|
|
445
|
-
const e = t, o = Ce(), n =
|
|
446
|
-
const
|
|
447
|
-
if ([
|
|
448
|
-
if (e.effectAllowed && (
|
|
449
|
-
let
|
|
450
|
-
e.image ? (
|
|
445
|
+
const e = t, o = Ce(), n = T(!1), s = h(() => n && e.transferData), a = h(() => ({ position: "fixed", top: "-1000px" })), l = (r, i) => {
|
|
446
|
+
const c = i.dataTransfer;
|
|
447
|
+
if ([X.dragenter, X.dragover].includes(r) && e.dropEffect && (c.dropEffect = e.dropEffect), r === X.dragstart) {
|
|
448
|
+
if (e.effectAllowed && (c.effectAllowed = e.effectAllowed), e.image || o.image) {
|
|
449
|
+
let u;
|
|
450
|
+
e.image ? (u = new Image(), u.src = e.image) : o.image && (u = o.image[0].elm), c.setDragImage && c.setDragImage(u, e.imageXOffset, e.imageYOffset);
|
|
451
451
|
}
|
|
452
452
|
e.transferData !== void 0 && (Te.data = e.transferData, i.dataTransfer.setData("text", "")), n.value = !0;
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
|
-
return (r, i) => (
|
|
455
|
+
return (r, i) => (d(), b(U(t.tag), {
|
|
456
456
|
draggable: e.draggable,
|
|
457
|
-
onDrag: i[0] || (i[0] = (
|
|
458
|
-
onDragstart: i[1] || (i[1] =
|
|
459
|
-
onDragenter: i[2] || (i[2] = (
|
|
460
|
-
onDragleave: i[3] || (i[3] = (
|
|
461
|
-
onDragend: i[4] || (i[4] = (
|
|
457
|
+
onDrag: i[0] || (i[0] = (c) => l(E(X).drag, c)),
|
|
458
|
+
onDragstart: i[1] || (i[1] = j((c) => l(E(X).dragstart, c), ["stop"])),
|
|
459
|
+
onDragenter: i[2] || (i[2] = (c) => l(E(X).dragenter, c)),
|
|
460
|
+
onDragleave: i[3] || (i[3] = (c) => l(E(X).dragleave, c)),
|
|
461
|
+
onDragend: i[4] || (i[4] = (c) => l(E(X).dragend, c))
|
|
462
462
|
}, {
|
|
463
|
-
default:
|
|
463
|
+
default: B(() => [
|
|
464
464
|
L(r.$slots, "default", { transferData: s.value }),
|
|
465
|
-
t.hideImageHtml ? (
|
|
465
|
+
t.hideImageHtml ? (d(), m("div", {
|
|
466
466
|
key: 0,
|
|
467
|
-
style:
|
|
467
|
+
style: z(a.value)
|
|
468
468
|
}, [
|
|
469
469
|
L(r.$slots, "image", { transferData: s.value })
|
|
470
470
|
], 4)) : L(r.$slots, "image", {
|
|
@@ -479,7 +479,7 @@ const Gt = {
|
|
|
479
479
|
const mo = (t) => (Lt("data-v-9da49c73"), t = t(), It(), t), ho = {
|
|
480
480
|
key: 0,
|
|
481
481
|
style: { display: "none" }
|
|
482
|
-
}, go = { key: 1 }, vo = /* @__PURE__ */ mo(() => /* @__PURE__ */
|
|
482
|
+
}, go = { key: 1 }, vo = /* @__PURE__ */ mo(() => /* @__PURE__ */ _("div", { class: "tree-divider" }, null, -1)), yo = [
|
|
483
483
|
vo
|
|
484
484
|
], _o = { key: 2 }, bo = { class: "tree-divider-header" }, xo = { class: "item-title" }, ko = {
|
|
485
485
|
key: 0,
|
|
@@ -498,179 +498,179 @@ const mo = (t) => (Lt("data-v-9da49c73"), t = t(), It(), t), ho = {
|
|
|
498
498
|
},
|
|
499
499
|
emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick", "nodecontext", "nodedoubleclick", "nodefoldericonclick"],
|
|
500
500
|
setup(t, { emit: e }) {
|
|
501
|
-
const o = t, n =
|
|
502
|
-
e("nodeclick", { event:
|
|
503
|
-
},
|
|
504
|
-
e("nodefoldericonclick", { event:
|
|
505
|
-
},
|
|
506
|
-
e("nodefoldericonclick",
|
|
507
|
-
},
|
|
508
|
-
e("nodeclick",
|
|
509
|
-
},
|
|
510
|
-
e("nodedoubleclick",
|
|
511
|
-
}, R = (
|
|
512
|
-
e("nodedrop",
|
|
513
|
-
},
|
|
514
|
-
e("nodecontext",
|
|
515
|
-
},
|
|
516
|
-
|
|
501
|
+
const o = t, n = T(null), s = T(!1), a = T(!1), l = T(!1), r = h(() => o.model.children && o.model.children.length), i = h(() => (v.actions.isTreeExpanded(o.treeId) && (o.model.expanded = o.model.expanded === void 0 ? !0 : o.model.expanded), o.model.expanded)), c = (N) => {
|
|
502
|
+
e("nodeclick", { event: N, model: o.model });
|
|
503
|
+
}, u = (N) => {
|
|
504
|
+
e("nodefoldericonclick", { event: N, model: o.model });
|
|
505
|
+
}, g = (N) => {
|
|
506
|
+
e("nodefoldericonclick", N);
|
|
507
|
+
}, x = (N) => {
|
|
508
|
+
e("nodeclick", N);
|
|
509
|
+
}, C = (N) => {
|
|
510
|
+
e("nodedoubleclick", N);
|
|
511
|
+
}, R = (N) => {
|
|
512
|
+
e("nodedrop", N);
|
|
513
|
+
}, $ = (N) => {
|
|
514
|
+
e("nodecontext", N);
|
|
515
|
+
}, H = h(() => [
|
|
516
|
+
v.actions.isItemSelected(o.treeId, o.model.id) ? "selected" : "",
|
|
517
517
|
s.value ? "node-over " : "",
|
|
518
518
|
a.value ? "node-top " : "",
|
|
519
519
|
l.value ? "node-bottom " : ""
|
|
520
|
-
]),
|
|
521
|
-
var
|
|
522
|
-
let
|
|
523
|
-
if (
|
|
520
|
+
]), Y = h(() => o.search ? !1 : o.model.draggable === !0), M = (N) => {
|
|
521
|
+
var P;
|
|
522
|
+
let w = Te.data;
|
|
523
|
+
if (w === void 0 || w.model === void 0)
|
|
524
524
|
return s.value = !1, !1;
|
|
525
|
-
if (
|
|
525
|
+
if (w.model.id === o.model.id || v.actions.isChildOfParent(o.treeId, o.items, o.model.id, w.model.id) || v.actions.isParentOfChild(o.treeId, o.items, w.model.id, o.model.id))
|
|
526
526
|
return s.value = !1, a.value = !1, l.value = !1, !1;
|
|
527
|
-
if (!
|
|
527
|
+
if (!v.state.trees[o.treeId].transfer && w.id !== o.treeId || !v.state.trees[o.treeId].dropInside && !l.value && !a.value)
|
|
528
528
|
return !1;
|
|
529
|
-
let
|
|
530
|
-
a.value ?
|
|
531
|
-
},
|
|
532
|
-
e("nodedragover", { e:
|
|
533
|
-
let
|
|
529
|
+
let V = "";
|
|
530
|
+
a.value ? V = "before" : l.value ? V = "after" : V = "inside", e("nodedrop", { e: N, model: o.model, place: V }), v.actions.moveTreeNode(w.id, o.treeId, o.items, w.model.id, o.model.id, V, (P = w.model) == null ? void 0 : P.transfer), s.value = !1, a.value = !1, l.value = !1;
|
|
531
|
+
}, I = (N) => {
|
|
532
|
+
e("nodedragover", { e: N, model: o.model });
|
|
533
|
+
let w = Te.data;
|
|
534
534
|
if (!o.model.droppable)
|
|
535
535
|
return !1;
|
|
536
|
-
if (
|
|
536
|
+
if (w === void 0 || w.model === void 0)
|
|
537
537
|
return s.value = !0, !1;
|
|
538
|
-
if (
|
|
538
|
+
if (w.model.id === o.model.id || v.actions.isChildOfParent(o.treeId, o.items, o.model.id, w.model.id) || v.actions.isParentOfChild(o.treeId, o.items, w.model.id, o.model.id))
|
|
539
539
|
return !1;
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
},
|
|
540
|
+
const V = N.y, P = n.value.getBoundingClientRect().top, f = n.value.getBoundingClientRect().height, p = f / 3;
|
|
541
|
+
V > P && V <= P + p ? (s.value = !1, a.value = !0, l.value = !1) : V < P + f && V >= P + f - p ? (s.value = !1, a.value = !1, l.value = !0) : (s.value = v.state.trees[o.treeId].dropInside, a.value = !1, l.value = !1);
|
|
542
|
+
}, F = () => {
|
|
543
543
|
s.value = !1, a.value = !1, l.value = !1;
|
|
544
|
-
},
|
|
544
|
+
}, S = h(() => o.model.title.startsWith("-")), W = h(() => {
|
|
545
545
|
if (o.model.title.startsWith("-")) {
|
|
546
|
-
let [
|
|
547
|
-
return
|
|
546
|
+
let [N, ...w] = o.model.title.split(" ");
|
|
547
|
+
return w = w.join(" "), w;
|
|
548
548
|
}
|
|
549
549
|
return null;
|
|
550
550
|
});
|
|
551
|
-
return (
|
|
552
|
-
const
|
|
553
|
-
return
|
|
554
|
-
|
|
555
|
-
])) : o.model.component ? (
|
|
551
|
+
return (N, w) => {
|
|
552
|
+
const V = Ct("d-tree-item", !0), P = Re("touch");
|
|
553
|
+
return E(v).actions.beforeItem(o.treeId, t.model) ? S.value && !W.value ? (d(), m("li", go, yo)) : S.value && W.value ? (d(), m("li", _o, [
|
|
554
|
+
_("div", bo, O(E(v).actions.renderTitle(o.treeId, W.value)), 1)
|
|
555
|
+
])) : o.model.component ? (d(), b(at, {
|
|
556
556
|
key: 3,
|
|
557
557
|
tag: "li",
|
|
558
558
|
class: "tree-item-component",
|
|
559
559
|
"transfer-data": { id: o.treeId, model: o.model },
|
|
560
|
-
draggable:
|
|
561
|
-
onDrop:
|
|
562
|
-
onDragenter:
|
|
560
|
+
draggable: Y.value,
|
|
561
|
+
onDrop: j(M, ["stop"]),
|
|
562
|
+
onDragenter: w[1] || (w[1] = j(() => {
|
|
563
563
|
}, ["prevent"])),
|
|
564
|
-
onDragover:
|
|
565
|
-
onDragleave:
|
|
564
|
+
onDragover: j(I, ["prevent", "stop"]),
|
|
565
|
+
onDragleave: j(F, ["prevent"])
|
|
566
566
|
}, {
|
|
567
|
-
default:
|
|
568
|
-
oe((
|
|
567
|
+
default: B(() => [
|
|
568
|
+
oe((d(), m("div", {
|
|
569
569
|
ref_key: "node",
|
|
570
570
|
ref: n,
|
|
571
|
-
class:
|
|
572
|
-
onContextmenu:
|
|
571
|
+
class: D(H.value),
|
|
572
|
+
onContextmenu: w[0] || (w[0] = j((f) => e("nodecontext", { e: f, model: o.model }), ["prevent"]))
|
|
573
573
|
}, [
|
|
574
|
-
(
|
|
574
|
+
(d(), b(U(E(fe).getters.getComponent(o.model.component).component), pt(ft(E(fe).getters.getComponent(o.model.component).props)), null, 16))
|
|
575
575
|
], 34)), [
|
|
576
|
-
[
|
|
576
|
+
[P, c, "press"]
|
|
577
577
|
])
|
|
578
578
|
]),
|
|
579
579
|
_: 1
|
|
580
|
-
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (
|
|
580
|
+
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(), b(at, {
|
|
581
581
|
key: 4,
|
|
582
582
|
tag: "li",
|
|
583
583
|
class: "tree-item",
|
|
584
584
|
"transfer-data": { id: o.treeId, model: o.model },
|
|
585
|
-
draggable:
|
|
586
|
-
onDrop:
|
|
587
|
-
onDragenter:
|
|
585
|
+
draggable: Y.value,
|
|
586
|
+
onDrop: j(M, ["stop"]),
|
|
587
|
+
onDragenter: w[4] || (w[4] = j(() => {
|
|
588
588
|
}, ["prevent"])),
|
|
589
|
-
onDragover:
|
|
590
|
-
onDragleave:
|
|
589
|
+
onDragover: j(I, ["prevent", "stop"]),
|
|
590
|
+
onDragleave: j(F, ["prevent"])
|
|
591
591
|
}, {
|
|
592
|
-
default:
|
|
593
|
-
var
|
|
592
|
+
default: B(() => {
|
|
593
|
+
var f, p;
|
|
594
594
|
return [
|
|
595
|
-
|
|
595
|
+
_("div", {
|
|
596
596
|
ref_key: "node",
|
|
597
597
|
ref: n,
|
|
598
|
-
class:
|
|
599
|
-
onPointerdownCapture:
|
|
600
|
-
onDblclick:
|
|
601
|
-
onContextmenu:
|
|
598
|
+
class: D(H.value),
|
|
599
|
+
onPointerdownCapture: c,
|
|
600
|
+
onDblclick: w[2] || (w[2] = j((y) => e("nodedoubleclick", { e: y, model: o.model }), ["prevent"])),
|
|
601
|
+
onContextmenu: w[3] || (w[3] = j((y) => e("nodecontext", { e: y, model: o.model }), ["prevent"]))
|
|
602
602
|
}, [
|
|
603
|
-
|
|
604
|
-
o.model.icons && o.model.icons.pre && r.value && !o.search && !
|
|
603
|
+
_("div", null, [
|
|
604
|
+
o.model.icons && o.model.icons.pre && r.value && !o.search && !S.value ? (d(), b(U(re), {
|
|
605
605
|
key: 0,
|
|
606
|
-
component:
|
|
606
|
+
component: E(te).getters.getIcon(o.model.icons.pre.component),
|
|
607
607
|
size: 18,
|
|
608
608
|
color: o.model.icons.pre.color ? o.model.icons.pre.color : "inherit",
|
|
609
|
-
class:
|
|
610
|
-
onPointerdownCapture:
|
|
611
|
-
}, null, 40, ["component", "color", "class"])) :
|
|
612
|
-
o.model.icons && o.model.icons.pre && !r.value && !o.search && !
|
|
609
|
+
class: D(i.value ? "tree-open-pre" : ""),
|
|
610
|
+
onPointerdownCapture: u
|
|
611
|
+
}, null, 40, ["component", "color", "class"])) : k("", !0),
|
|
612
|
+
o.model.icons && o.model.icons.pre && !r.value && !o.search && !S.value ? (d(), b(U(re), {
|
|
613
613
|
key: 1,
|
|
614
|
-
component:
|
|
614
|
+
component: E(te).getters.getIcon(o.model.icons.pre.component),
|
|
615
615
|
size: 18,
|
|
616
616
|
color: "rgba(0,0,0,0)",
|
|
617
|
-
class:
|
|
618
|
-
}, null, 8, ["component", "class"])) :
|
|
619
|
-
o.model.icons && o.model.icons.icon && !
|
|
617
|
+
class: D(i.value ? "tree-open-pre" : "")
|
|
618
|
+
}, null, 8, ["component", "class"])) : k("", !0),
|
|
619
|
+
o.model.icons && o.model.icons.icon && !S.value ? (d(), b(U(re), {
|
|
620
620
|
key: 2,
|
|
621
|
-
component:
|
|
621
|
+
component: E(te).getters.getIcon(o.model.icons.icon.component),
|
|
622
622
|
color: o.model.icons.icon.color ? o.model.icons.icon.color : "inherit",
|
|
623
623
|
size: o.model.icons.icon.size ? o.model.icons.icon.size : null,
|
|
624
624
|
className: o.model.icons.icon.class ? o.model.icons.icon.class : null
|
|
625
|
-
}, null, 8, ["component", "color", "size", "className"])) :
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
625
|
+
}, null, 8, ["component", "color", "size", "className"])) : k("", !0),
|
|
626
|
+
_("div", xo, [
|
|
627
|
+
S.value ? (d(), m("div", ko)) : k("", !0),
|
|
628
|
+
S.value ? k("", !0) : (d(), m("div", $o, O(E(v).actions.renderTitle(o.treeId, o.model.title)), 1))
|
|
629
629
|
])
|
|
630
630
|
]),
|
|
631
|
-
|
|
632
|
-
((
|
|
631
|
+
_("div", wo, [
|
|
632
|
+
((f = o.model.badge) == null ? void 0 : f.value) !== void 0 && !S.value ? (d(), b(U(co), {
|
|
633
633
|
key: 0,
|
|
634
|
-
class:
|
|
634
|
+
class: D([(p = o.model.badge) == null ? void 0 : p.class, "badge-sm"])
|
|
635
635
|
}, {
|
|
636
|
-
default:
|
|
636
|
+
default: B(() => [
|
|
637
637
|
K(O(o.model.badge.value), 1)
|
|
638
638
|
]),
|
|
639
639
|
_: 1
|
|
640
|
-
}, 8, ["class"])) :
|
|
641
|
-
o.model.icons && o.model.icons.post && r.value && !o.search && !
|
|
640
|
+
}, 8, ["class"])) : k("", !0),
|
|
641
|
+
o.model.icons && o.model.icons.post && r.value && !o.search && !S.value ? (d(), b(U(re), {
|
|
642
642
|
key: 1,
|
|
643
|
-
component:
|
|
643
|
+
component: E(te).getters.getIcon(o.model.icons.post.component),
|
|
644
644
|
size: 20,
|
|
645
645
|
color: o.model.icons.post.color ? o.model.icons.post.color : "inherit",
|
|
646
|
-
class:
|
|
647
|
-
onPointerdownCapture:
|
|
648
|
-
}, null, 40, ["component", "color", "class"])) :
|
|
646
|
+
class: D(i.value ? "tree-open-post" : ""),
|
|
647
|
+
onPointerdownCapture: u
|
|
648
|
+
}, null, 40, ["component", "color", "class"])) : k("", !0)
|
|
649
649
|
])
|
|
650
650
|
], 34),
|
|
651
651
|
J(uo, null, {
|
|
652
|
-
default:
|
|
653
|
-
r.value && i.value && !o.search ? (
|
|
654
|
-
(
|
|
655
|
-
key:
|
|
656
|
-
model:
|
|
652
|
+
default: B(() => [
|
|
653
|
+
r.value && i.value && !o.search ? (d(), m("ul", So, [
|
|
654
|
+
(d(!0), m(le, null, ge(t.model.children, (y) => (d(), b(V, {
|
|
655
|
+
key: y.id,
|
|
656
|
+
model: y,
|
|
657
657
|
treeId: o.treeId,
|
|
658
658
|
items: o.items,
|
|
659
659
|
search: o.search,
|
|
660
|
-
onNodeclick:
|
|
661
|
-
onNodedoubleclick:
|
|
660
|
+
onNodeclick: x,
|
|
661
|
+
onNodedoubleclick: C,
|
|
662
662
|
onNodedrop: R,
|
|
663
|
-
onNodecontext:
|
|
664
|
-
onNodefoldericonclick:
|
|
663
|
+
onNodecontext: $,
|
|
664
|
+
onNodefoldericonclick: g
|
|
665
665
|
}, null, 8, ["model", "treeId", "items", "search"]))), 128))
|
|
666
|
-
])) :
|
|
666
|
+
])) : k("", !0)
|
|
667
667
|
]),
|
|
668
668
|
_: 1
|
|
669
669
|
})
|
|
670
670
|
];
|
|
671
671
|
}),
|
|
672
672
|
_: 1
|
|
673
|
-
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (
|
|
673
|
+
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"])) : (d(), m("li", ho));
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
676
|
}, To = /* @__PURE__ */ ne(Do, [["__scopeId", "data-v-9da49c73"]]);
|
|
@@ -721,53 +721,53 @@ function Co(t) {
|
|
|
721
721
|
}
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
|
-
const
|
|
724
|
+
const q = Co(), v = {
|
|
725
725
|
state: Oe({
|
|
726
726
|
trees: {}
|
|
727
727
|
}),
|
|
728
728
|
getters: {
|
|
729
729
|
getItems(t) {
|
|
730
|
-
return
|
|
730
|
+
return v.state.trees[t].items;
|
|
731
731
|
},
|
|
732
732
|
getItemsSelect(t) {
|
|
733
|
-
return
|
|
733
|
+
return v.state.trees[t].selected;
|
|
734
734
|
},
|
|
735
735
|
// data - ноды, dataId - ID ноды родителя data
|
|
736
736
|
getParentId(t, e, o, n = "id", s = "children", a = {}) {
|
|
737
|
-
return o && t && (t.find((l) => l[n] === o ? (a.found = e, l) :
|
|
737
|
+
return o && t && (t.find((l) => l[n] === o ? (a.found = e, l) : v.getters.getParentId(l[s], l.id, o, n, s, a)), a.found) ? a.found : !1;
|
|
738
738
|
}
|
|
739
739
|
},
|
|
740
740
|
mutations: {
|
|
741
741
|
setTreeItems(t, e) {
|
|
742
|
-
|
|
742
|
+
v.state.trees[t].items = e;
|
|
743
743
|
},
|
|
744
744
|
setItemSelect(t, e) {
|
|
745
|
-
|
|
745
|
+
v.state.trees[t].noSelect || (v.state.trees[t].multiSelect ? v.state.trees[t].selected.includes(e.id) ? v.state.trees[t].selected = v.state.trees[t].selected.filter(function(o) {
|
|
746
746
|
return o !== e.id;
|
|
747
|
-
}) :
|
|
747
|
+
}) : v.state.trees[t].selected = [...v.state.trees[t].selected, e.id] : v.state.trees[t].selected = [e.id]);
|
|
748
748
|
}
|
|
749
749
|
},
|
|
750
750
|
actions: {
|
|
751
751
|
initTreeStore(t, e, o, n, s, a, l, r = !0) {
|
|
752
|
-
|
|
752
|
+
v.state.trees[t] = [], v.state.trees[t].selected = [], v.state.trees[t].noSelect = e, v.state.trees[t].multiSelect = o, v.state.trees[t].expanded = n, v.state.trees[t].transfer = s, v.state.trees[t].renderTitle = a, v.state.trees[t].beforeItem = l, v.state.trees[t].dropInside = r;
|
|
753
753
|
},
|
|
754
754
|
renderTitle(t, e) {
|
|
755
|
-
return
|
|
755
|
+
return v.state.trees[t].renderTitle ? v.state.trees[t].renderTitle(e) : e;
|
|
756
756
|
},
|
|
757
757
|
beforeItem(t, e) {
|
|
758
|
-
return
|
|
758
|
+
return v.state.trees[t].beforeItem ? v.state.trees[t].beforeItem(e) : !0;
|
|
759
759
|
},
|
|
760
760
|
isItemSelected(t, e) {
|
|
761
|
-
return
|
|
761
|
+
return v.state.trees[t].selected.includes(e);
|
|
762
762
|
},
|
|
763
763
|
toggleItem(t, e) {
|
|
764
|
-
e.expanded = e.expanded === void 0 || !e.expanded, e.children && e.children.length && (e.expanded ?
|
|
764
|
+
e.expanded = e.expanded === void 0 || !e.expanded, e.children && e.children.length && (e.expanded ? q.emit(`expand-${t}`, { id: t, model: e }) : q.emit(`collapse-${t}`, { id: t, model: e }));
|
|
765
765
|
},
|
|
766
766
|
isTreeExpanded(t) {
|
|
767
|
-
return
|
|
767
|
+
return v.state.trees[t].expanded;
|
|
768
768
|
},
|
|
769
769
|
isChildOfParent(t, e, o, n) {
|
|
770
|
-
const s =
|
|
770
|
+
const s = v.actions.deepSearch(e, o);
|
|
771
771
|
if (s && s.children) {
|
|
772
772
|
for (let a = 0; a < s.children.length; a++)
|
|
773
773
|
if (s.children[a].id === n)
|
|
@@ -777,16 +777,16 @@ const U = Co(), g = {
|
|
|
777
777
|
},
|
|
778
778
|
// Является ли нода родителем указанного потомка
|
|
779
779
|
isParentOfChild(t, e, o, n) {
|
|
780
|
-
const s =
|
|
781
|
-
return !!(s && s.children &&
|
|
780
|
+
const s = v.actions.deepSearch(e, o);
|
|
781
|
+
return !!(s && s.children && v.actions.deepSearch(s.children, n));
|
|
782
782
|
},
|
|
783
783
|
deepSearch(t, e, o = "id", n = "children", s = {}) {
|
|
784
|
-
return e && t && (t.find((a) => a[o] === e ? (s.found = a, a) :
|
|
784
|
+
return e && t && (t.find((a) => a[o] === e ? (s.found = a, a) : v.actions.deepSearch(a[n], e, o, n, s)), s.found) ? s.found : !1;
|
|
785
785
|
},
|
|
786
786
|
deepSearchByTitle(t, e, o = "title", n = "children", s = []) {
|
|
787
787
|
if (e && t && (t.find((a) => {
|
|
788
788
|
const l = new RegExp(e, "gi");
|
|
789
|
-
a[o].toString().toLowerCase().match(l) !== null && s.push(a),
|
|
789
|
+
a[o].toString().toLowerCase().match(l) !== null && s.push(a), v.actions.deepSearchByTitle(a[n], e, o, n, s);
|
|
790
790
|
}), s)) {
|
|
791
791
|
for (let a = 0; a < s.length; a++)
|
|
792
792
|
;
|
|
@@ -796,10 +796,10 @@ const U = Co(), g = {
|
|
|
796
796
|
},
|
|
797
797
|
moveTreeNode(t, e, o, n, s, a, l = !0) {
|
|
798
798
|
if (l) {
|
|
799
|
-
const r =
|
|
800
|
-
|
|
799
|
+
const r = v.actions.deleteTreeNode(o, n);
|
|
800
|
+
v.actions.insertTreeNode(o, s, r, a), q.emit(`move-${e}`, { fromTreeId: t, toTreeId: e, moved: r == null ? void 0 : r.id, target: s, position: a });
|
|
801
801
|
} else
|
|
802
|
-
|
|
802
|
+
q.emit(`move-${e}`, { fromTreeId: t, toTreeId: e, moved: n, target: s, position: a });
|
|
803
803
|
},
|
|
804
804
|
insertTreeNode(t, e, o, n) {
|
|
805
805
|
if (t)
|
|
@@ -820,7 +820,7 @@ const U = Co(), g = {
|
|
|
820
820
|
const s = t[o];
|
|
821
821
|
return t.splice(o, 1), s;
|
|
822
822
|
}
|
|
823
|
-
const n =
|
|
823
|
+
const n = v.actions.deleteTreeNode(t[o].children, e);
|
|
824
824
|
if (n)
|
|
825
825
|
return n;
|
|
826
826
|
}
|
|
@@ -831,24 +831,24 @@ const U = Co(), g = {
|
|
|
831
831
|
props: {
|
|
832
832
|
tag: { type: String, default: "div" }
|
|
833
833
|
},
|
|
834
|
-
emits: Object.keys(
|
|
834
|
+
emits: Object.keys(X),
|
|
835
835
|
setup(t, { expose: e, emit: o }) {
|
|
836
836
|
let n = Oe({});
|
|
837
|
-
const s =
|
|
838
|
-
n = Te.data, o(
|
|
837
|
+
const s = T("false"), a = T(null), l = /* @__PURE__ */ new Set(), r = h(() => s.value && n), i = (u, g) => {
|
|
838
|
+
n = Te.data, o(u, g, n), u === X.dragenter && (l.size || g.target === a.value) && l.add(g.target), u === X.dragleave && l.delete(g.target), u === X.drop && l.clear(), s.value = !!l.size;
|
|
839
839
|
};
|
|
840
840
|
return e({
|
|
841
841
|
elementSize: () => _t(a)
|
|
842
|
-
}), (
|
|
842
|
+
}), (u, g) => (d(), b(U(t.tag), {
|
|
843
843
|
ref_key: "el",
|
|
844
844
|
ref: a,
|
|
845
|
-
onDragenter:
|
|
846
|
-
onDragleave:
|
|
847
|
-
onDragover:
|
|
848
|
-
onDrop:
|
|
845
|
+
onDragenter: g[0] || (g[0] = (x) => i(E(X).dragenter, x)),
|
|
846
|
+
onDragleave: g[1] || (g[1] = (x) => i(E(X).dragleave, x)),
|
|
847
|
+
onDragover: g[2] || (g[2] = j((x) => i(E(X).dragover, x), ["prevent"])),
|
|
848
|
+
onDrop: g[3] || (g[3] = j((x) => i(E(X).drop, x), ["prevent"]))
|
|
849
849
|
}, {
|
|
850
|
-
default:
|
|
851
|
-
L(
|
|
850
|
+
default: B(() => [
|
|
851
|
+
L(u.$slots, "default", { transferData: r.value })
|
|
852
852
|
]),
|
|
853
853
|
_: 3
|
|
854
854
|
}, 544));
|
|
@@ -873,14 +873,14 @@ const U = Co(), g = {
|
|
|
873
873
|
emits: ["select"],
|
|
874
874
|
setup(t, { expose: e, emit: o }) {
|
|
875
875
|
const n = t;
|
|
876
|
-
let s =
|
|
876
|
+
let s = T(null), a = T(!1);
|
|
877
877
|
const l = () => {
|
|
878
|
-
|
|
878
|
+
q.emit("menu-show-request"), a.value = !0;
|
|
879
879
|
}, r = () => {
|
|
880
|
-
var
|
|
881
|
-
(
|
|
880
|
+
var x;
|
|
881
|
+
(x = s.value) == null || x.collapseAll(), a.value = !1;
|
|
882
882
|
}, i = () => a.value;
|
|
883
|
-
|
|
883
|
+
q.on("menu-show-request", () => {
|
|
884
884
|
r();
|
|
885
885
|
}), e({
|
|
886
886
|
show: l,
|
|
@@ -889,26 +889,26 @@ const U = Co(), g = {
|
|
|
889
889
|
isShowed: i,
|
|
890
890
|
itemsCount: () => s.value.itemsCount()
|
|
891
891
|
});
|
|
892
|
-
const
|
|
893
|
-
o("select",
|
|
892
|
+
const g = (x) => {
|
|
893
|
+
o("select", x), x.model.children || r();
|
|
894
894
|
};
|
|
895
|
-
return (
|
|
895
|
+
return (x, C) => {
|
|
896
896
|
const R = Re("click-outside");
|
|
897
|
-
return
|
|
898
|
-
|
|
897
|
+
return d(), b(mt, { to: "body" }, [
|
|
898
|
+
E(a) ? oe((d(), b(xt, {
|
|
899
899
|
key: 0,
|
|
900
900
|
ref_key: "treeRef",
|
|
901
901
|
ref: s,
|
|
902
902
|
items: n.items,
|
|
903
903
|
"no-select": n.noSelect,
|
|
904
|
-
class:
|
|
905
|
-
style:
|
|
906
|
-
onSelect:
|
|
904
|
+
class: D(n.class),
|
|
905
|
+
style: z(n.style),
|
|
906
|
+
onSelect: g,
|
|
907
907
|
"render-title": n.renderItemTitle,
|
|
908
908
|
"before-item": n.beforeItem
|
|
909
909
|
}, null, 8, ["items", "no-select", "class", "style", "render-title", "before-item"])), [
|
|
910
910
|
[R, () => r()]
|
|
911
|
-
]) :
|
|
911
|
+
]) : k("", !0)
|
|
912
912
|
]);
|
|
913
913
|
};
|
|
914
914
|
}
|
|
@@ -921,25 +921,25 @@ const U = Co(), g = {
|
|
|
921
921
|
},
|
|
922
922
|
emits: ["select"],
|
|
923
923
|
setup(t, { expose: e, emit: o }) {
|
|
924
|
-
const n = t, s =
|
|
924
|
+
const n = t, s = T(null), a = T(0), l = T(0), r = h(() => ({
|
|
925
925
|
left: a.value + "px",
|
|
926
926
|
top: l.value + "px"
|
|
927
|
-
})), i = (
|
|
927
|
+
})), i = (u) => {
|
|
928
928
|
s.value.show(), ht(() => {
|
|
929
|
-
const
|
|
930
|
-
a.value =
|
|
929
|
+
const g = s.value.elementSize(), x = window.innerWidth, C = window.innerHeight;
|
|
930
|
+
a.value = x - u.pageX < g.width ? u.pageX - g.width : u.pageX, l.value = C - u.pageY < g.height ? u.pageY - g.height : u.pageY, s.value.itemsCount() === 0 && s.value.hide();
|
|
931
931
|
});
|
|
932
|
-
},
|
|
933
|
-
o("select",
|
|
932
|
+
}, c = (u) => {
|
|
933
|
+
o("select", u);
|
|
934
934
|
};
|
|
935
935
|
return e({
|
|
936
936
|
show: i
|
|
937
|
-
}), (
|
|
937
|
+
}), (u, g) => (d(), b(bt, {
|
|
938
938
|
ref_key: "dMenuRef",
|
|
939
939
|
ref: s,
|
|
940
|
-
onSelect:
|
|
940
|
+
onSelect: c,
|
|
941
941
|
items: n.items,
|
|
942
|
-
style:
|
|
942
|
+
style: z(r.value),
|
|
943
943
|
class: "context-menu",
|
|
944
944
|
"no-select": !0,
|
|
945
945
|
"render-item-title": n.renderItemTitle,
|
|
@@ -994,81 +994,85 @@ const U = Co(), g = {
|
|
|
994
994
|
},
|
|
995
995
|
emits: ["select", "collapse", "expand", "move", "over", "drop", "doubleclick", "foldericonclick"],
|
|
996
996
|
setup(t, { expose: e, emit: o }) {
|
|
997
|
-
const n = t, s =
|
|
998
|
-
|
|
999
|
-
const i = (
|
|
1000
|
-
console.log(
|
|
997
|
+
const n = t, s = T(null), a = T(!1), l = T(null), r = gt().uid;
|
|
998
|
+
v.actions.initTreeStore(r, n.noSelect, n.multiSelect, n.expanded, n.transfer, n.renderTitle, n.beforeItem, n.dropInside);
|
|
999
|
+
const i = (p, y) => {
|
|
1000
|
+
console.log(p, y);
|
|
1001
1001
|
};
|
|
1002
|
-
|
|
1003
|
-
o("expand",
|
|
1004
|
-
}),
|
|
1005
|
-
o("collapse",
|
|
1006
|
-
}),
|
|
1007
|
-
o("move",
|
|
1002
|
+
q.on(`expand-${r}`, (p) => {
|
|
1003
|
+
o("expand", p);
|
|
1004
|
+
}), q.on(`collapse-${r}`, (p) => {
|
|
1005
|
+
o("collapse", p);
|
|
1006
|
+
}), q.on(`move-${r}`, (p) => {
|
|
1007
|
+
o("move", p);
|
|
1008
1008
|
});
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
},
|
|
1023
|
-
for (let
|
|
1024
|
-
n.items[
|
|
1025
|
-
},
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1009
|
+
const c = h(() => n.search ? v.actions.deepSearchByTitle(n.items, n.search) : n.items), u = (p) => {
|
|
1010
|
+
for (let y = 0; y < n.items.length; y++)
|
|
1011
|
+
n.items[y].id === p && v.actions.toggleItem(r, n.items[y]), n.items[y].expanded = !0;
|
|
1012
|
+
}, g = (p = null) => {
|
|
1013
|
+
v.mutations.setItemSelect(r, p.model), n.doubleClickExpand || v.actions.toggleItem(r, p.model), o("select", p);
|
|
1014
|
+
}, x = (p = null) => {
|
|
1015
|
+
n.doubleClickExpand && v.actions.toggleItem(r, p.model), o("doubleclick", p);
|
|
1016
|
+
}, C = (p = null) => {
|
|
1017
|
+
n.doubleClickExpand && v.actions.toggleItem(r, p.model), o("foldericonclick", p);
|
|
1018
|
+
}, R = (p = null) => {
|
|
1019
|
+
o("over", p);
|
|
1020
|
+
}, $ = (p = null) => {
|
|
1021
|
+
o("drop", p);
|
|
1022
|
+
}, H = () => s.value.elementSize(), Y = () => {
|
|
1023
|
+
for (let p = 0; p < n.items.length; p++)
|
|
1024
|
+
n.items[p].expanded = !0;
|
|
1025
|
+
}, M = () => {
|
|
1026
|
+
for (let p = 0; p < n.items.length; p++)
|
|
1027
|
+
n.items[p].expanded = !1;
|
|
1028
|
+
}, I = () => r, F = (p) => v.actions.deepSearch(n.items, p), S = (p) => {
|
|
1029
|
+
F(p) && v.mutations.setItemSelect(r, F(p));
|
|
1030
|
+
}, W = (p) => {
|
|
1031
|
+
n.contextClick({ e: p.e, model: p.model, target: l.value });
|
|
1032
|
+
}, N = (p) => n.contextBeforeClick({ model: p, target: l.value }), w = h(() => n.context), V = (p) => (w.value && (l.value = p.model, a.value.show(p.e)), !1), P = () => f(c.value), f = (p) => {
|
|
1033
|
+
let y = 0;
|
|
1034
|
+
for (let A = 0; A < p.length; A++)
|
|
1035
|
+
y += v.actions.beforeItem(r, p[A]) ? 1 : 0, p[A].children && p[A].children.length > 0 && (y += f(p[A].children));
|
|
1036
|
+
return y;
|
|
1034
1037
|
};
|
|
1035
1038
|
return e({
|
|
1036
|
-
elementSize:
|
|
1037
|
-
expandAll:
|
|
1038
|
-
collapseAll:
|
|
1039
|
-
getId:
|
|
1040
|
-
getNode:
|
|
1041
|
-
selectNode:
|
|
1042
|
-
itemsCount:
|
|
1043
|
-
|
|
1039
|
+
elementSize: H,
|
|
1040
|
+
expandAll: Y,
|
|
1041
|
+
collapseAll: M,
|
|
1042
|
+
getId: I,
|
|
1043
|
+
getNode: F,
|
|
1044
|
+
selectNode: S,
|
|
1045
|
+
itemsCount: P,
|
|
1046
|
+
expandItem: u
|
|
1047
|
+
}), (p, y) => (d(), b(Lo, {
|
|
1044
1048
|
ref_key: "treeRef",
|
|
1045
1049
|
ref: s,
|
|
1046
1050
|
class: "tree",
|
|
1047
1051
|
tag: "ul",
|
|
1048
|
-
onDrop:
|
|
1052
|
+
onDrop: j(i, ["stop"])
|
|
1049
1053
|
}, {
|
|
1050
|
-
default:
|
|
1051
|
-
(
|
|
1052
|
-
key:
|
|
1053
|
-
model:
|
|
1054
|
-
treeId:
|
|
1054
|
+
default: B(() => [
|
|
1055
|
+
(d(!0), m(le, null, ge(c.value, (A) => (d(), b(To, {
|
|
1056
|
+
key: A.id,
|
|
1057
|
+
model: A,
|
|
1058
|
+
treeId: E(r),
|
|
1055
1059
|
items: n.items,
|
|
1056
1060
|
search: n.search,
|
|
1057
|
-
onNodeclick:
|
|
1058
|
-
onNodedoubleclick:
|
|
1059
|
-
onNodedragover:
|
|
1060
|
-
onNodedrop:
|
|
1061
|
-
onNodecontext:
|
|
1062
|
-
onNodefoldericonclick:
|
|
1061
|
+
onNodeclick: g,
|
|
1062
|
+
onNodedoubleclick: x,
|
|
1063
|
+
onNodedragover: R,
|
|
1064
|
+
onNodedrop: $,
|
|
1065
|
+
onNodecontext: V,
|
|
1066
|
+
onNodefoldericonclick: C
|
|
1063
1067
|
}, null, 8, ["model", "treeId", "items", "search"]))), 128)),
|
|
1064
|
-
|
|
1068
|
+
w.value ? (d(), b(Io, {
|
|
1065
1069
|
key: 0,
|
|
1066
1070
|
ref_key: "contextTreeRef",
|
|
1067
1071
|
ref: a,
|
|
1068
|
-
items:
|
|
1069
|
-
onSelect:
|
|
1070
|
-
"before-item":
|
|
1071
|
-
}, null, 8, ["items"])) :
|
|
1072
|
+
items: w.value,
|
|
1073
|
+
onSelect: W,
|
|
1074
|
+
"before-item": N
|
|
1075
|
+
}, null, 8, ["items"])) : k("", !0)
|
|
1072
1076
|
]),
|
|
1073
1077
|
_: 1
|
|
1074
1078
|
}, 8, ["onDrop"]));
|
|
@@ -1090,7 +1094,7 @@ const Eo = {
|
|
|
1090
1094
|
const o = t, n = (s) => {
|
|
1091
1095
|
e("move", s);
|
|
1092
1096
|
};
|
|
1093
|
-
return (s, a) => (
|
|
1097
|
+
return (s, a) => (d(), b(xt, {
|
|
1094
1098
|
class: "accordion",
|
|
1095
1099
|
items: o.items,
|
|
1096
1100
|
"no-select": o.noSelect,
|
|
@@ -1133,13 +1137,13 @@ const Eo = {
|
|
|
1133
1137
|
useMinWidthLayout: Boolean
|
|
1134
1138
|
},
|
|
1135
1139
|
setup(t) {
|
|
1136
|
-
const e = t, o =
|
|
1137
|
-
const { fixed: n, zIndex: s, minWidth: a, height: l, paddingLeft: r, transitionDuration: i, transitionTimingFunction:
|
|
1138
|
-
return `position:${
|
|
1140
|
+
const e = t, o = h(() => {
|
|
1141
|
+
const { fixed: n, zIndex: s, minWidth: a, height: l, paddingLeft: r, transitionDuration: i, transitionTimingFunction: c } = e, u = n ? "fixed" : "static", g = e.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1142
|
+
return `position:${u};z-index:${s};${g}height:${l}px;padding-left:${r}px;transition-duration:${i}ms;transition-timing-function:${c};`;
|
|
1139
1143
|
});
|
|
1140
|
-
return (n, s) => (
|
|
1144
|
+
return (n, s) => (d(), m("header", {
|
|
1141
1145
|
class: "d-layout-header",
|
|
1142
|
-
style:
|
|
1146
|
+
style: z(o.value)
|
|
1143
1147
|
}, [
|
|
1144
1148
|
L(n.$slots, "default")
|
|
1145
1149
|
], 4));
|
|
@@ -1182,13 +1186,13 @@ const Eo = {
|
|
|
1182
1186
|
useMinWidthLayout: Boolean
|
|
1183
1187
|
},
|
|
1184
1188
|
setup(t) {
|
|
1185
|
-
const e = t, o =
|
|
1186
|
-
const { fixed: n, top: s, zIndex: a, minWidth: l, height: r, paddingLeft: i, transitionDuration:
|
|
1187
|
-
return `position:${
|
|
1189
|
+
const e = t, o = h(() => {
|
|
1190
|
+
const { fixed: n, top: s, zIndex: a, minWidth: l, height: r, paddingLeft: i, transitionDuration: c, transitionTimingFunction: u } = e, g = n ? "fixed" : "static", x = e.useMinWidthLayout ? `min-width: ${l}px;` : "";
|
|
1191
|
+
return `position:${g};top:${s}px;z-index:${a};${x}height:${r}px;padding-left:${i}px;transition-duration:${c}ms;transition-timing-function:${u};`;
|
|
1188
1192
|
});
|
|
1189
|
-
return (n, s) => (
|
|
1193
|
+
return (n, s) => (d(), m("div", {
|
|
1190
1194
|
class: "d-layout-tab",
|
|
1191
|
-
style:
|
|
1195
|
+
style: z(o.value)
|
|
1192
1196
|
}, [
|
|
1193
1197
|
L(n.$slots, "default")
|
|
1194
1198
|
], 4));
|
|
@@ -1227,13 +1231,13 @@ const Eo = {
|
|
|
1227
1231
|
useMinWidthLayout: Boolean
|
|
1228
1232
|
},
|
|
1229
1233
|
setup(t) {
|
|
1230
|
-
const e = t, o =
|
|
1231
|
-
const { fixed: n, zIndex: s, minWidth: a, height: l, paddingLeft: r, transitionDuration: i, transitionTimingFunction:
|
|
1232
|
-
return `position:${
|
|
1234
|
+
const e = t, o = h(() => {
|
|
1235
|
+
const { fixed: n, zIndex: s, minWidth: a, height: l, paddingLeft: r, transitionDuration: i, transitionTimingFunction: c } = e, u = n ? "fixed" : "static", g = e.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
1236
|
+
return `position:${u};z-index:${s};${g}height:${l}px;padding-left:${r}px;transition-duration:${i}ms;transition-timing-function:${c};`;
|
|
1233
1237
|
});
|
|
1234
|
-
return (n, s) => (
|
|
1238
|
+
return (n, s) => (d(), m("footer", {
|
|
1235
1239
|
class: "d-layout-footer",
|
|
1236
|
-
style:
|
|
1240
|
+
style: z(o.value)
|
|
1237
1241
|
}, [
|
|
1238
1242
|
L(n.$slots, "default")
|
|
1239
1243
|
], 4));
|
|
@@ -1267,13 +1271,13 @@ const Eo = {
|
|
|
1267
1271
|
}
|
|
1268
1272
|
},
|
|
1269
1273
|
setup(t) {
|
|
1270
|
-
const e = t, o =
|
|
1274
|
+
const e = t, o = h(() => {
|
|
1271
1275
|
const { zIndex: n, width: s, paddingTop: a, transitionDuration: l, transitionTimingFunction: r } = e;
|
|
1272
1276
|
return `z-index:${n};width:${s}px;padding-top:${a}px;transition-duration:${l}ms;transition-timing-function:${r};`;
|
|
1273
1277
|
});
|
|
1274
|
-
return (n, s) => (
|
|
1278
|
+
return (n, s) => (d(), m("aside", {
|
|
1275
1279
|
class: "d-layout-sidebar",
|
|
1276
|
-
style:
|
|
1280
|
+
style: z(o.value)
|
|
1277
1281
|
}, [
|
|
1278
1282
|
L(n.$slots, "default")
|
|
1279
1283
|
], 4));
|
|
@@ -1304,12 +1308,12 @@ const Eo = {
|
|
|
1304
1308
|
}
|
|
1305
1309
|
},
|
|
1306
1310
|
setup(t) {
|
|
1307
|
-
const e = t, o =
|
|
1311
|
+
const e = t, o = h(() => {
|
|
1308
1312
|
const { paddingTop: n, paddingBottom: s, paddingLeft: a, transitionDuration: l, transitionTimingFunction: r } = e, i = `overflow:${e.overflowHidden ? "hidden" : "visible"};`;
|
|
1309
1313
|
return `padding-top:${n}px;padding-bottom:${s}px;padding-left:${a}px;${i}transition-duration:${l}ms;transition-timing-function:${r};`;
|
|
1310
1314
|
});
|
|
1311
|
-
return (n, s) => (
|
|
1312
|
-
style:
|
|
1315
|
+
return (n, s) => (d(), m("main", {
|
|
1316
|
+
style: z(o.value),
|
|
1313
1317
|
class: "d-layout-content"
|
|
1314
1318
|
}, [
|
|
1315
1319
|
L(n.$slots, "default")
|
|
@@ -1317,15 +1321,15 @@ const Eo = {
|
|
|
1317
1321
|
}
|
|
1318
1322
|
};
|
|
1319
1323
|
function Ao(t) {
|
|
1320
|
-
const e =
|
|
1324
|
+
const e = T(0), o = h(() => `transform: translateX(${-e.value}px);`);
|
|
1321
1325
|
let n = !1;
|
|
1322
|
-
function s(
|
|
1323
|
-
e.value =
|
|
1326
|
+
function s(u) {
|
|
1327
|
+
e.value = u;
|
|
1324
1328
|
}
|
|
1325
1329
|
function a() {
|
|
1326
|
-
var
|
|
1327
|
-
const
|
|
1328
|
-
s(
|
|
1330
|
+
var u;
|
|
1331
|
+
const g = ((u = document.scrollingElement) === null || u === void 0 ? void 0 : u.scrollLeft) || 0;
|
|
1332
|
+
s(g);
|
|
1329
1333
|
}
|
|
1330
1334
|
function l() {
|
|
1331
1335
|
a();
|
|
@@ -1336,11 +1340,11 @@ function Ao(t) {
|
|
|
1336
1340
|
function i() {
|
|
1337
1341
|
n && document.removeEventListener("scroll", a);
|
|
1338
1342
|
}
|
|
1339
|
-
function
|
|
1343
|
+
function c() {
|
|
1340
1344
|
l(), r(), n = !0;
|
|
1341
1345
|
}
|
|
1342
|
-
return vt(t, (
|
|
1343
|
-
|
|
1346
|
+
return vt(t, (u) => {
|
|
1347
|
+
u ? c() : i();
|
|
1344
1348
|
}, { immediate: !0 }), Et(() => {
|
|
1345
1349
|
i();
|
|
1346
1350
|
}), o;
|
|
@@ -1436,106 +1440,106 @@ const Ho = 1001, Vo = 999, zo = 998, Ms = {
|
|
|
1436
1440
|
},
|
|
1437
1441
|
emits: ["update:sidebar-collapse", "sidebar-mask-click"],
|
|
1438
1442
|
setup(t, { emit: e }) {
|
|
1439
|
-
const o = t, n =
|
|
1440
|
-
const { transitionDuration:
|
|
1443
|
+
const o = t, n = h(() => o.useMinWidthLayout ? `min-width:${o.minWidth}px;` : ""), s = h(() => o.useMinWidthLayout && (o.fixedHeaderAndTab || o.fixedFooter)), a = Ao(s), l = h(() => o.fixedHeaderAndTab ? a.value : ""), r = h(() => o.fixedFooter ? a.value : ""), i = h(() => {
|
|
1444
|
+
const { transitionDuration: S, transitionTimingFunction: W } = o;
|
|
1441
1445
|
return {
|
|
1442
|
-
transitionDuration:
|
|
1443
|
-
transitionTimingFunction:
|
|
1446
|
+
transitionDuration: S,
|
|
1447
|
+
transitionTimingFunction: W
|
|
1444
1448
|
};
|
|
1445
|
-
}),
|
|
1449
|
+
}), c = h(() => o.mode === "vertical"), u = h(() => o.isMobile || c.value ? 1003 : 1e3), g = h({
|
|
1446
1450
|
get() {
|
|
1447
1451
|
return o.sidebarCollapse;
|
|
1448
1452
|
},
|
|
1449
|
-
set(
|
|
1450
|
-
e("update:sidebar-collapse",
|
|
1453
|
+
set(S) {
|
|
1454
|
+
e("update:sidebar-collapse", S);
|
|
1451
1455
|
}
|
|
1452
1456
|
});
|
|
1453
|
-
function
|
|
1457
|
+
function x() {
|
|
1454
1458
|
e("sidebar-mask-click");
|
|
1455
1459
|
}
|
|
1456
|
-
const
|
|
1457
|
-
const { transitionDuration:
|
|
1458
|
-
return `background-color:${o.maskBg};transition-duration:${
|
|
1459
|
-
}),
|
|
1460
|
-
const { sidebarWidth:
|
|
1461
|
-
return o.sidebarVisible ?
|
|
1462
|
-
}),
|
|
1463
|
-
() => !o.isMobile && !
|
|
1464
|
-
),
|
|
1465
|
-
let
|
|
1466
|
-
return o.fixedHeaderAndTab && (o.headerVisible && (
|
|
1467
|
-
}),
|
|
1468
|
-
return (
|
|
1460
|
+
const C = h(() => o.isMobile && !g.value), R = h(() => {
|
|
1461
|
+
const { transitionDuration: S, transitionTimingFunction: W } = o;
|
|
1462
|
+
return `background-color:${o.maskBg};transition-duration:${S}ms;transition-timing-function:${W};`;
|
|
1463
|
+
}), $ = h(() => {
|
|
1464
|
+
const { sidebarWidth: S, sidebarCollapsedWidth: W } = o, N = o.isMobile ? 0 : W, w = g.value ? N : S;
|
|
1465
|
+
return o.sidebarVisible ? w : 0;
|
|
1466
|
+
}), H = h(() => o.isMobile ? 0 : $.value), Y = h(() => c.value ? H.value : 0), M = h(
|
|
1467
|
+
() => !o.isMobile && !c.value && o.headerVisible ? o.headerHeight : 0
|
|
1468
|
+
), I = h(() => {
|
|
1469
|
+
let S = 0;
|
|
1470
|
+
return o.fixedHeaderAndTab && (o.headerVisible && (S += o.headerHeight), o.tabVisible && (S += o.tabHeight)), S;
|
|
1471
|
+
}), F = h(() => o.fixedFooter && o.footerVisible ? o.footerHeight : 0);
|
|
1472
|
+
return (S, W) => (d(), m("div", {
|
|
1469
1473
|
class: "d-layout",
|
|
1470
|
-
style:
|
|
1474
|
+
style: z(n.value)
|
|
1471
1475
|
}, [
|
|
1472
|
-
t.headerVisible ? (
|
|
1476
|
+
t.headerVisible ? (d(), b(Bo, ue({ key: 0 }, i.value, {
|
|
1473
1477
|
fixed: t.fixedHeaderAndTab,
|
|
1474
1478
|
"z-index": Ho,
|
|
1475
1479
|
"min-width": t.minWidth,
|
|
1476
1480
|
height: t.headerHeight,
|
|
1477
|
-
"padding-left":
|
|
1481
|
+
"padding-left": Y.value,
|
|
1478
1482
|
style: l.value
|
|
1479
1483
|
}), {
|
|
1480
|
-
default:
|
|
1481
|
-
L(
|
|
1484
|
+
default: B(() => [
|
|
1485
|
+
L(S.$slots, "header")
|
|
1482
1486
|
]),
|
|
1483
1487
|
_: 3
|
|
1484
|
-
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) :
|
|
1485
|
-
t.tabVisible ? (
|
|
1488
|
+
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : k("", !0),
|
|
1489
|
+
t.tabVisible ? (d(), b(Mo, ue({ key: 1 }, i.value, {
|
|
1486
1490
|
fixed: t.fixedHeaderAndTab,
|
|
1487
1491
|
"z-index": Vo,
|
|
1488
1492
|
"min-width": t.minWidth,
|
|
1489
1493
|
top: t.headerHeight,
|
|
1490
1494
|
height: t.tabHeight,
|
|
1491
|
-
"padding-left":
|
|
1495
|
+
"padding-left": H.value,
|
|
1492
1496
|
style: l.value
|
|
1493
1497
|
}), {
|
|
1494
|
-
default:
|
|
1495
|
-
L(
|
|
1498
|
+
default: B(() => [
|
|
1499
|
+
L(S.$slots, "tab")
|
|
1496
1500
|
]),
|
|
1497
1501
|
_: 3
|
|
1498
|
-
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) :
|
|
1499
|
-
t.sidebarVisible ? (
|
|
1500
|
-
"z-index":
|
|
1501
|
-
width:
|
|
1502
|
-
"padding-top":
|
|
1502
|
+
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : k("", !0),
|
|
1503
|
+
t.sidebarVisible ? (d(), b(Ro, ue({ key: 2 }, i.value, {
|
|
1504
|
+
"z-index": u.value,
|
|
1505
|
+
width: $.value,
|
|
1506
|
+
"padding-top": M.value
|
|
1503
1507
|
}), {
|
|
1504
|
-
default:
|
|
1505
|
-
L(
|
|
1508
|
+
default: B(() => [
|
|
1509
|
+
L(S.$slots, "sidebar")
|
|
1506
1510
|
]),
|
|
1507
1511
|
_: 3
|
|
1508
|
-
}, 16, ["z-index", "width", "padding-top"])) :
|
|
1509
|
-
|
|
1512
|
+
}, 16, ["z-index", "width", "padding-top"])) : k("", !0),
|
|
1513
|
+
C.value ? (d(), m("div", {
|
|
1510
1514
|
key: 3,
|
|
1511
1515
|
class: "d-layout-sidebar-mask",
|
|
1512
|
-
style:
|
|
1513
|
-
onClick:
|
|
1514
|
-
}, null, 4)) :
|
|
1516
|
+
style: z(R.value),
|
|
1517
|
+
onClick: x
|
|
1518
|
+
}, null, 4)) : k("", !0),
|
|
1515
1519
|
J(Oo, ue(i.value, {
|
|
1516
|
-
"padding-top":
|
|
1517
|
-
"padding-bottom":
|
|
1518
|
-
"padding-left":
|
|
1520
|
+
"padding-top": I.value,
|
|
1521
|
+
"padding-bottom": F.value,
|
|
1522
|
+
"padding-left": H.value,
|
|
1519
1523
|
"overflow-hidden": t.addMainOverflowHidden
|
|
1520
1524
|
}), {
|
|
1521
|
-
default:
|
|
1522
|
-
L(
|
|
1525
|
+
default: B(() => [
|
|
1526
|
+
L(S.$slots, "default")
|
|
1523
1527
|
]),
|
|
1524
1528
|
_: 3
|
|
1525
1529
|
}, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
|
|
1526
|
-
t.footerVisible ? (
|
|
1530
|
+
t.footerVisible ? (d(), b(No, ue({ key: 4 }, i.value, {
|
|
1527
1531
|
fixed: t.fixedFooter,
|
|
1528
1532
|
"z-index": zo,
|
|
1529
1533
|
"min-width": t.minWidth,
|
|
1530
1534
|
height: t.footerHeight,
|
|
1531
|
-
"padding-left":
|
|
1535
|
+
"padding-left": H.value,
|
|
1532
1536
|
style: r.value
|
|
1533
1537
|
}), {
|
|
1534
|
-
default:
|
|
1535
|
-
L(
|
|
1538
|
+
default: B(() => [
|
|
1539
|
+
L(S.$slots, "footer")
|
|
1536
1540
|
]),
|
|
1537
1541
|
_: 3
|
|
1538
|
-
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) :
|
|
1542
|
+
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : k("", !0)
|
|
1539
1543
|
], 4));
|
|
1540
1544
|
}
|
|
1541
1545
|
}, pe = {
|
|
@@ -1588,12 +1592,12 @@ const Rs = {
|
|
|
1588
1592
|
e35a6f9a: o.value,
|
|
1589
1593
|
e35a6f98: n.value
|
|
1590
1594
|
}));
|
|
1591
|
-
const o =
|
|
1595
|
+
const o = h(() => e.xHide ? "hidden" : "visible"), n = h(() => e.yHide ? "hidden" : "visible"), s = (a) => {
|
|
1592
1596
|
document.body.classList.add(a), document.documentElement.classList.add(a), document.documentElement.classList.add("d-global-scroll");
|
|
1593
1597
|
};
|
|
1594
1598
|
return me(() => {
|
|
1595
1599
|
s("colored-scroller");
|
|
1596
|
-
}), (a, l) => (
|
|
1600
|
+
}), (a, l) => (d(), m("div", null, [
|
|
1597
1601
|
L(a.$slots, "default")
|
|
1598
1602
|
]));
|
|
1599
1603
|
}
|
|
@@ -1620,9 +1624,9 @@ const Fo = {
|
|
|
1620
1624
|
c07fa29a: o.value,
|
|
1621
1625
|
c07fa298: n.value
|
|
1622
1626
|
}));
|
|
1623
|
-
const o =
|
|
1624
|
-
return (s, a) => (
|
|
1625
|
-
class:
|
|
1627
|
+
const o = h(() => e.xHide ? "hidden" : "visible"), n = h(() => e.yHide ? "hidden" : "visible");
|
|
1628
|
+
return (s, a) => (d(), m("div", {
|
|
1629
|
+
class: D(e.autoHide ? "d-scroll-hide" : "d-scroll")
|
|
1626
1630
|
}, [
|
|
1627
1631
|
L(s.$slots, "default", {}, void 0, !0)
|
|
1628
1632
|
], 2));
|
|
@@ -1638,7 +1642,7 @@ const Fo = {
|
|
|
1638
1642
|
},
|
|
1639
1643
|
emits: ["open", "close"],
|
|
1640
1644
|
setup(t, { expose: e, emit: o }) {
|
|
1641
|
-
const n = t, s =
|
|
1645
|
+
const n = t, s = T(null), a = T(!1);
|
|
1642
1646
|
a.value = n == null ? void 0 : n.show;
|
|
1643
1647
|
const l = () => {
|
|
1644
1648
|
a.value = !0, o("open", s);
|
|
@@ -1648,38 +1652,38 @@ const Fo = {
|
|
|
1648
1652
|
return e({
|
|
1649
1653
|
show: l,
|
|
1650
1654
|
hide: r
|
|
1651
|
-
}), (i,
|
|
1652
|
-
const
|
|
1653
|
-
return
|
|
1655
|
+
}), (i, c) => {
|
|
1656
|
+
const u = Re("keydown");
|
|
1657
|
+
return d(), b(mt, { to: "body" }, [
|
|
1654
1658
|
J(Ne, { name: "fade" }, {
|
|
1655
|
-
default:
|
|
1656
|
-
a.value ? oe((
|
|
1659
|
+
default: B(() => [
|
|
1660
|
+
a.value ? oe((d(), m("div", {
|
|
1657
1661
|
key: 0,
|
|
1658
1662
|
ref_key: "modalRef",
|
|
1659
1663
|
ref: s,
|
|
1660
1664
|
class: "modal"
|
|
1661
1665
|
}, [
|
|
1662
|
-
|
|
1666
|
+
_("div", {
|
|
1663
1667
|
class: "modal-dialog",
|
|
1664
|
-
style:
|
|
1668
|
+
style: z({ width: n.width, maxWidth: n.maxWidth })
|
|
1665
1669
|
}, [
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1670
|
+
_("div", Wo, [
|
|
1671
|
+
_("div", Po, [
|
|
1672
|
+
_("h5", jo, [
|
|
1669
1673
|
L(i.$slots, "modal-title")
|
|
1670
1674
|
])
|
|
1671
1675
|
]),
|
|
1672
|
-
|
|
1676
|
+
_("div", Xo, [
|
|
1673
1677
|
L(i.$slots, "default")
|
|
1674
1678
|
]),
|
|
1675
|
-
|
|
1679
|
+
_("div", Yo, [
|
|
1676
1680
|
L(i.$slots, "modal-footer")
|
|
1677
1681
|
])
|
|
1678
1682
|
])
|
|
1679
1683
|
], 4)
|
|
1680
1684
|
])), [
|
|
1681
|
-
[
|
|
1682
|
-
]) :
|
|
1685
|
+
[u, r, "Escape"]
|
|
1686
|
+
]) : k("", !0)
|
|
1683
1687
|
]),
|
|
1684
1688
|
_: 3
|
|
1685
1689
|
})
|
|
@@ -1717,7 +1721,7 @@ const qo = Mt({
|
|
|
1717
1721
|
transitionAttrs: Object
|
|
1718
1722
|
},
|
|
1719
1723
|
setup() {
|
|
1720
|
-
const t =
|
|
1724
|
+
const t = T();
|
|
1721
1725
|
return vt(t, () => {
|
|
1722
1726
|
ce.value && (ce.value.comp = t.value);
|
|
1723
1727
|
}), {
|
|
@@ -1727,9 +1731,9 @@ const qo = Mt({
|
|
|
1727
1731
|
}
|
|
1728
1732
|
});
|
|
1729
1733
|
function Go(t, e, o, n, s, a) {
|
|
1730
|
-
return
|
|
1731
|
-
default:
|
|
1732
|
-
t.dialogRef && t.dialogRef.wrapper === t.name ? (
|
|
1734
|
+
return d(), b(Ne, pt(ft(t.transitionAttrs)), {
|
|
1735
|
+
default: B(() => [
|
|
1736
|
+
t.dialogRef && t.dialogRef.wrapper === t.name ? (d(), b(U(t.dialogRef.dialog), ue({ key: 0 }, t.dialogRef.props, { ref: "dialogInstance" }), null, 16)) : k("", !0)
|
|
1733
1737
|
]),
|
|
1734
1738
|
_: 1
|
|
1735
1739
|
}, 16);
|
|
@@ -1745,20 +1749,20 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1745
1749
|
const o = t;
|
|
1746
1750
|
return e({
|
|
1747
1751
|
returnValue: () => !0
|
|
1748
|
-
}), (s, a) => (
|
|
1752
|
+
}), (s, a) => (d(), m("div", null, [
|
|
1749
1753
|
J(kt, { show: !0 }, {
|
|
1750
|
-
"modal-title":
|
|
1754
|
+
"modal-title": B(() => [
|
|
1751
1755
|
K(O(o.title), 1)
|
|
1752
1756
|
]),
|
|
1753
|
-
default:
|
|
1757
|
+
default: B(() => [
|
|
1754
1758
|
K(O(o.message), 1)
|
|
1755
1759
|
]),
|
|
1756
|
-
"modal-footer":
|
|
1757
|
-
|
|
1760
|
+
"modal-footer": B(() => [
|
|
1761
|
+
_("div", Ko, [
|
|
1758
1762
|
J(ie, {
|
|
1759
|
-
onClick: a[0] || (a[0] = (l) =>
|
|
1763
|
+
onClick: a[0] || (a[0] = (l) => E(Me)())
|
|
1760
1764
|
}, {
|
|
1761
|
-
default:
|
|
1765
|
+
default: B(() => [
|
|
1762
1766
|
K("Закрыть")
|
|
1763
1767
|
]),
|
|
1764
1768
|
_: 1
|
|
@@ -1779,29 +1783,29 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1779
1783
|
const o = t;
|
|
1780
1784
|
return e({
|
|
1781
1785
|
returnValue: () => !0
|
|
1782
|
-
}), (s, a) => (
|
|
1786
|
+
}), (s, a) => (d(), m("div", null, [
|
|
1783
1787
|
J(kt, { show: !0 }, {
|
|
1784
|
-
"modal-title":
|
|
1788
|
+
"modal-title": B(() => [
|
|
1785
1789
|
K(O(o.title), 1)
|
|
1786
1790
|
]),
|
|
1787
|
-
default:
|
|
1791
|
+
default: B(() => [
|
|
1788
1792
|
K(O(o.message), 1)
|
|
1789
1793
|
]),
|
|
1790
|
-
"modal-footer":
|
|
1791
|
-
|
|
1794
|
+
"modal-footer": B(() => [
|
|
1795
|
+
_("div", Qo, [
|
|
1792
1796
|
J(ie, {
|
|
1793
|
-
onClick: a[0] || (a[0] = (l) =>
|
|
1797
|
+
onClick: a[0] || (a[0] = (l) => E(Me)())
|
|
1794
1798
|
}, {
|
|
1795
|
-
default:
|
|
1799
|
+
default: B(() => [
|
|
1796
1800
|
K("Да")
|
|
1797
1801
|
]),
|
|
1798
1802
|
_: 1
|
|
1799
1803
|
}),
|
|
1800
1804
|
J(ie, {
|
|
1801
1805
|
class: "button-red",
|
|
1802
|
-
onClick: a[1] || (a[1] = (l) =>
|
|
1806
|
+
onClick: a[1] || (a[1] = (l) => E(Me)(!1))
|
|
1803
1807
|
}, {
|
|
1804
|
-
default:
|
|
1808
|
+
default: B(() => [
|
|
1805
1809
|
K("Нет")
|
|
1806
1810
|
]),
|
|
1807
1811
|
_: 1
|
|
@@ -1832,43 +1836,43 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1832
1836
|
},
|
|
1833
1837
|
emits: ["select", "click"],
|
|
1834
1838
|
setup(t, { expose: e, emit: o }) {
|
|
1835
|
-
const n = t, s = Ce(), a =
|
|
1836
|
-
if (o("click",
|
|
1839
|
+
const n = t, s = Ce(), a = T(null), l = T(null), r = T(0), i = T(0), c = (C) => {
|
|
1840
|
+
if (o("click", C), a.value.isShowed()) {
|
|
1837
1841
|
a.value.hide();
|
|
1838
1842
|
return;
|
|
1839
1843
|
}
|
|
1840
1844
|
a.value.show(), ht(() => {
|
|
1841
|
-
const R = a.value.elementSize(),
|
|
1842
|
-
r.value =
|
|
1845
|
+
const R = a.value.elementSize(), $ = l.value.elementSize(), H = window.innerWidth, Y = window.innerHeight;
|
|
1846
|
+
r.value = H - ($.x + $.width) < R.width ? $.left - R.width + $.width : $.left, i.value = Y - ($.y + $.height) < R.height ? $.top - R.height - 5 : $.height + $.top + 5;
|
|
1843
1847
|
});
|
|
1844
|
-
},
|
|
1845
|
-
o("select",
|
|
1846
|
-
},
|
|
1848
|
+
}, u = (C) => {
|
|
1849
|
+
o("select", C);
|
|
1850
|
+
}, g = h(() => ({ left: r.value + "px", top: i.value + "px", position: n.bodyAsParent ? "absolute" : "fixed", ...n.menuStyle }));
|
|
1847
1851
|
e({
|
|
1848
|
-
show:
|
|
1852
|
+
show: c
|
|
1849
1853
|
});
|
|
1850
|
-
const
|
|
1851
|
-
return (
|
|
1852
|
-
|
|
1854
|
+
const x = (C) => !!s[C];
|
|
1855
|
+
return (C, R) => (d(), m("div", tn, [
|
|
1856
|
+
x("default") ? (d(), b(ie, {
|
|
1853
1857
|
key: 0,
|
|
1854
1858
|
ref_key: "buttonRef",
|
|
1855
1859
|
ref: l,
|
|
1856
|
-
class:
|
|
1860
|
+
class: D(n.class),
|
|
1857
1861
|
icon: n.icon,
|
|
1858
|
-
onClick:
|
|
1862
|
+
onClick: j(c, ["stop", "prevent"]),
|
|
1859
1863
|
type: n.type
|
|
1860
1864
|
}, {
|
|
1861
|
-
default:
|
|
1862
|
-
L(
|
|
1865
|
+
default: B(() => [
|
|
1866
|
+
L(C.$slots, "default")
|
|
1863
1867
|
]),
|
|
1864
1868
|
_: 3
|
|
1865
|
-
}, 8, ["class", "icon", "onClick", "type"])) : (
|
|
1869
|
+
}, 8, ["class", "icon", "onClick", "type"])) : (d(), b(ie, {
|
|
1866
1870
|
key: 1,
|
|
1867
1871
|
ref_key: "buttonRef",
|
|
1868
1872
|
ref: l,
|
|
1869
|
-
class:
|
|
1873
|
+
class: D(n.class),
|
|
1870
1874
|
icon: n.icon,
|
|
1871
|
-
onClick:
|
|
1875
|
+
onClick: j(c, ["stop", "prevent"]),
|
|
1872
1876
|
type: n.type
|
|
1873
1877
|
}, null, 8, ["class", "icon", "onClick", "type"])),
|
|
1874
1878
|
J(bt, {
|
|
@@ -1876,9 +1880,9 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1876
1880
|
ref: a,
|
|
1877
1881
|
items: n.items,
|
|
1878
1882
|
class: "dropdown-menu",
|
|
1879
|
-
style:
|
|
1883
|
+
style: z(g.value),
|
|
1880
1884
|
"no-select": !0,
|
|
1881
|
-
onSelect:
|
|
1885
|
+
onSelect: u,
|
|
1882
1886
|
"render-item-title": n.renderItemTitle,
|
|
1883
1887
|
"before-item": n.beforeItem,
|
|
1884
1888
|
"body-as-parent": n.bodyAsParent
|
|
@@ -1887,24 +1891,24 @@ const Ko = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1887
1891
|
}
|
|
1888
1892
|
}, on = {}, nn = { class: "d-panel" };
|
|
1889
1893
|
function sn(t, e) {
|
|
1890
|
-
return
|
|
1894
|
+
return d(), m("div", nn, [
|
|
1891
1895
|
L(t.$slots, "default")
|
|
1892
1896
|
]);
|
|
1893
1897
|
}
|
|
1894
1898
|
const an = /* @__PURE__ */ ne(on, [["render", sn]]), ln = { class: "card-header" }, rn = { class: "modal-title" }, dn = { class: "card-body" }, cn = { class: "card-footer" }, Hs = {
|
|
1895
1899
|
__name: "DCard",
|
|
1896
1900
|
setup(t) {
|
|
1897
|
-
return (e, o) => (
|
|
1898
|
-
default:
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
+
return (e, o) => (d(), b(an, { class: "d-card" }, {
|
|
1902
|
+
default: B(() => [
|
|
1903
|
+
_("div", ln, [
|
|
1904
|
+
_("h5", rn, [
|
|
1901
1905
|
L(e.$slots, "title")
|
|
1902
1906
|
])
|
|
1903
1907
|
]),
|
|
1904
|
-
|
|
1908
|
+
_("div", dn, [
|
|
1905
1909
|
L(e.$slots, "default")
|
|
1906
1910
|
]),
|
|
1907
|
-
|
|
1911
|
+
_("div", cn, [
|
|
1908
1912
|
L(e.$slots, "footer")
|
|
1909
1913
|
])
|
|
1910
1914
|
]),
|
|
@@ -2000,14 +2004,14 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2000
2004
|
}, s = () => {
|
|
2001
2005
|
e("after-leave");
|
|
2002
2006
|
};
|
|
2003
|
-
return (a, l) => (
|
|
2007
|
+
return (a, l) => (d(), b(yt, {
|
|
2004
2008
|
tag: "span",
|
|
2005
2009
|
css: !1,
|
|
2006
2010
|
onEnter: o,
|
|
2007
2011
|
onLeave: n,
|
|
2008
2012
|
onAfterLeave: s
|
|
2009
2013
|
}, {
|
|
2010
|
-
default:
|
|
2014
|
+
default: B(() => [
|
|
2011
2015
|
L(a.$slots, "default")
|
|
2012
2016
|
]),
|
|
2013
2017
|
_: 3
|
|
@@ -2022,11 +2026,11 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2022
2026
|
},
|
|
2023
2027
|
setup(t) {
|
|
2024
2028
|
const e = t;
|
|
2025
|
-
return (o, n) => (
|
|
2029
|
+
return (o, n) => (d(), b(yt, {
|
|
2026
2030
|
tag: "span",
|
|
2027
2031
|
name: e.name
|
|
2028
2032
|
}, {
|
|
2029
|
-
default:
|
|
2033
|
+
default: B(() => [
|
|
2030
2034
|
L(o.$slots, "default")
|
|
2031
2035
|
]),
|
|
2032
2036
|
_: 3
|
|
@@ -2108,121 +2112,121 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2108
2112
|
const o = t, n = {
|
|
2109
2113
|
IDLE: 0,
|
|
2110
2114
|
DESTROYED: 2
|
|
2111
|
-
}, s =
|
|
2112
|
-
const { x:
|
|
2113
|
-
width:
|
|
2115
|
+
}, s = T([]), a = T(null), l = T(un.get("velocity")), r = h(() => o.animationType === "velocity"), i = h(() => r.value ? yn : _n), c = h(() => s.value.filter((f) => f.state !== n.DESTROYED)), u = h(() => mn(o.width)), g = h(() => {
|
|
2116
|
+
const { x: f, y: p } = vn(o.position), y = u.value.value, A = u.value.type, se = {
|
|
2117
|
+
width: y + A
|
|
2114
2118
|
};
|
|
2115
|
-
return
|
|
2116
|
-
}),
|
|
2117
|
-
e("click",
|
|
2119
|
+
return p && (se[p] = "0px"), f && (f === "center" ? se.left = `calc(50% - ${+y / 2}${A})` : se[f] = "0px"), se;
|
|
2120
|
+
}), x = h(() => "bottom" in g.value), C = (f) => {
|
|
2121
|
+
e("click", f), o.closeOnClick && F(f);
|
|
2118
2122
|
}, R = () => {
|
|
2119
|
-
var
|
|
2120
|
-
o.pauseOnHover && ((
|
|
2121
|
-
},
|
|
2122
|
-
var
|
|
2123
|
-
o.pauseOnHover && ((
|
|
2124
|
-
},
|
|
2125
|
-
if (
|
|
2123
|
+
var f;
|
|
2124
|
+
o.pauseOnHover && ((f = a.value) == null || f.pause());
|
|
2125
|
+
}, $ = () => {
|
|
2126
|
+
var f;
|
|
2127
|
+
o.pauseOnHover && ((f = a.value) == null || f.resume());
|
|
2128
|
+
}, H = (f) => {
|
|
2129
|
+
if (f.group || (f.group = ""), f.data || (f.data = {}), o.group !== f.group)
|
|
2126
2130
|
return;
|
|
2127
|
-
if (
|
|
2128
|
-
|
|
2131
|
+
if (f.clean || f.clear) {
|
|
2132
|
+
W();
|
|
2129
2133
|
return;
|
|
2130
2134
|
}
|
|
2131
|
-
const
|
|
2135
|
+
const p = typeof f.duration == "number" ? f.duration : o.duration, y = typeof f.speed == "number" ? f.speed : o.speed, A = typeof f.ignoreDuplicates == "boolean" ? f.ignoreDuplicates : o.ignoreDuplicates, { title: se, text: ve, type: ye, data: _e, id: be } = f, Q = {
|
|
2132
2136
|
id: be || hn(),
|
|
2133
2137
|
title: se,
|
|
2134
2138
|
text: ve,
|
|
2135
2139
|
type: ye,
|
|
2136
2140
|
state: n.IDLE,
|
|
2137
|
-
speed:
|
|
2138
|
-
length:
|
|
2141
|
+
speed: y,
|
|
2142
|
+
length: p + 2 * y,
|
|
2139
2143
|
data: _e
|
|
2140
2144
|
};
|
|
2141
|
-
|
|
2142
|
-
const xe = o.reverse ? !
|
|
2145
|
+
p >= 0 && (a.value = new pn(() => F(Q), Q.length, Q));
|
|
2146
|
+
const xe = o.reverse ? !x.value : x.value;
|
|
2143
2147
|
let de = -1;
|
|
2144
|
-
const ke =
|
|
2145
|
-
(!
|
|
2146
|
-
},
|
|
2147
|
-
|
|
2148
|
-
},
|
|
2148
|
+
const ke = c.value.some((he) => he.title === f.title && he.text === f.text);
|
|
2149
|
+
(!A || !ke) && (xe ? (s.value.push(Q), e("start", Q), c.value.length > o.max && (de = 0)) : (s.value.unshift(Q), e("start", Q), c.value.length > o.max && (de = c.value.length - 1)), de !== -1 && F(c.value[de]));
|
|
2150
|
+
}, Y = (f) => {
|
|
2151
|
+
S(f);
|
|
2152
|
+
}, M = (f) => [
|
|
2149
2153
|
"d-notification-template",
|
|
2150
2154
|
o.classes,
|
|
2151
|
-
|
|
2152
|
-
],
|
|
2153
|
-
clearTimeout(
|
|
2154
|
-
},
|
|
2155
|
-
const
|
|
2156
|
-
|
|
2157
|
-
},
|
|
2158
|
-
|
|
2159
|
-
},
|
|
2160
|
-
var
|
|
2161
|
-
const
|
|
2162
|
-
return typeof
|
|
2163
|
-
},
|
|
2155
|
+
f.type || ""
|
|
2156
|
+
], I = (f) => r.value ? void 0 : { transition: `all ${f.speed}ms` }, F = (f) => {
|
|
2157
|
+
clearTimeout(f.timer), f.state = n.DESTROYED, P(), e("destroy", f);
|
|
2158
|
+
}, S = (f) => {
|
|
2159
|
+
const p = s.value.find((y) => y.id === f);
|
|
2160
|
+
p && F(p);
|
|
2161
|
+
}, W = () => {
|
|
2162
|
+
c.value.forEach(F);
|
|
2163
|
+
}, N = (f, p) => {
|
|
2164
|
+
var A;
|
|
2165
|
+
const y = (A = o.animation) == null ? void 0 : A[f];
|
|
2166
|
+
return typeof y == "function" ? y(p) : y;
|
|
2167
|
+
}, w = (f, p) => {
|
|
2164
2168
|
if (!r.value)
|
|
2165
2169
|
return;
|
|
2166
|
-
const
|
|
2167
|
-
l.value(
|
|
2170
|
+
const y = N("enter", f);
|
|
2171
|
+
l.value(f, y, {
|
|
2168
2172
|
duration: o.speed,
|
|
2169
|
-
complete:
|
|
2173
|
+
complete: p
|
|
2170
2174
|
});
|
|
2171
|
-
},
|
|
2175
|
+
}, V = (f, p) => {
|
|
2172
2176
|
if (!r.value)
|
|
2173
2177
|
return;
|
|
2174
|
-
const
|
|
2175
|
-
l.value(
|
|
2178
|
+
const y = N("leave", f);
|
|
2179
|
+
l.value(f, y, {
|
|
2176
2180
|
duration: o.speed,
|
|
2177
|
-
complete:
|
|
2181
|
+
complete: p
|
|
2178
2182
|
});
|
|
2179
2183
|
};
|
|
2180
|
-
function
|
|
2181
|
-
s.value = s.value.filter((
|
|
2184
|
+
function P() {
|
|
2185
|
+
s.value = s.value.filter((f) => f.state !== n.DESTROYED);
|
|
2182
2186
|
}
|
|
2183
2187
|
return me(() => {
|
|
2184
|
-
|
|
2185
|
-
}), (
|
|
2188
|
+
q.on("notification-add", H), q.on("notification-close", Y);
|
|
2189
|
+
}), (f, p) => (d(), m("div", {
|
|
2186
2190
|
class: "d-notification-group",
|
|
2187
|
-
style:
|
|
2191
|
+
style: z(g.value)
|
|
2188
2192
|
}, [
|
|
2189
|
-
(
|
|
2193
|
+
(d(), b(U(i.value), {
|
|
2190
2194
|
name: t.animationName,
|
|
2191
|
-
onEnter:
|
|
2192
|
-
onLeave:
|
|
2193
|
-
onAfterLeave:
|
|
2195
|
+
onEnter: w,
|
|
2196
|
+
onLeave: V,
|
|
2197
|
+
onAfterLeave: P
|
|
2194
2198
|
}, {
|
|
2195
|
-
default:
|
|
2196
|
-
(
|
|
2197
|
-
key:
|
|
2199
|
+
default: B(() => [
|
|
2200
|
+
(d(!0), m(le, null, ge(c.value, (y) => (d(), m("div", {
|
|
2201
|
+
key: y.id,
|
|
2198
2202
|
class: "d-notification-wrapper",
|
|
2199
|
-
style:
|
|
2200
|
-
"data-id":
|
|
2203
|
+
style: z(I(y)),
|
|
2204
|
+
"data-id": y.id,
|
|
2201
2205
|
onMouseenter: R,
|
|
2202
|
-
onMouseleave:
|
|
2206
|
+
onMouseleave: $
|
|
2203
2207
|
}, [
|
|
2204
|
-
L(
|
|
2205
|
-
class:
|
|
2206
|
-
item:
|
|
2207
|
-
close: () =>
|
|
2208
|
+
L(f.$slots, "body", {
|
|
2209
|
+
class: D([t.classes, y.type]),
|
|
2210
|
+
item: y,
|
|
2211
|
+
close: () => F(y)
|
|
2208
2212
|
}, () => [
|
|
2209
|
-
|
|
2210
|
-
class:
|
|
2211
|
-
onClick: (
|
|
2213
|
+
_("div", {
|
|
2214
|
+
class: D(M(y)),
|
|
2215
|
+
onClick: (A) => C(y)
|
|
2212
2216
|
}, [
|
|
2213
|
-
t.dangerouslySetInnerHtml ? (
|
|
2214
|
-
|
|
2217
|
+
t.dangerouslySetInnerHtml ? (d(), m(le, { key: 0 }, [
|
|
2218
|
+
y.title ? (d(), m("div", {
|
|
2215
2219
|
key: 0,
|
|
2216
2220
|
class: "d-notification-title",
|
|
2217
|
-
innerHTML:
|
|
2218
|
-
}, null, 8, kn)) :
|
|
2219
|
-
|
|
2221
|
+
innerHTML: y.timer
|
|
2222
|
+
}, null, 8, kn)) : k("", !0),
|
|
2223
|
+
_("div", {
|
|
2220
2224
|
class: "notification-content",
|
|
2221
|
-
innerHTML:
|
|
2225
|
+
innerHTML: y.text
|
|
2222
2226
|
}, null, 8, $n)
|
|
2223
|
-
], 64)) : (
|
|
2224
|
-
|
|
2225
|
-
|
|
2227
|
+
], 64)) : (d(), m(le, { key: 1 }, [
|
|
2228
|
+
y.title ? (d(), m("div", wn, O(y.title), 1)) : k("", !0),
|
|
2229
|
+
_("div", Sn, O(y.text), 1)
|
|
2226
2230
|
], 64))
|
|
2227
2231
|
], 10, xn)
|
|
2228
2232
|
])
|
|
@@ -2243,30 +2247,30 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2243
2247
|
},
|
|
2244
2248
|
emits: ["click"],
|
|
2245
2249
|
setup(t, { emit: e }) {
|
|
2246
|
-
const o = t, n =
|
|
2247
|
-
return (s, a) => (
|
|
2248
|
-
class:
|
|
2249
|
-
style:
|
|
2250
|
+
const o = t, n = h(() => o.icon ? te.getters.getIcon(o.icon) : null);
|
|
2251
|
+
return (s, a) => (d(), m("div", {
|
|
2252
|
+
class: D(["d-info-progress", o.type ? `d-info-progress-${o.type}` : null]),
|
|
2253
|
+
style: z(o.style),
|
|
2250
2254
|
onClick: a[0] || (a[0] = (l) => {
|
|
2251
2255
|
e("click", l);
|
|
2252
2256
|
})
|
|
2253
2257
|
}, [
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
o.icon ? (
|
|
2258
|
+
_("div", Dn, [
|
|
2259
|
+
_("div", Tn, [
|
|
2260
|
+
o.icon ? (d(), b(U(re), {
|
|
2257
2261
|
key: 0,
|
|
2258
2262
|
component: n.value,
|
|
2259
2263
|
color: "inherit",
|
|
2260
2264
|
size: 17
|
|
2261
|
-
}, null, 8, ["component"])) :
|
|
2265
|
+
}, null, 8, ["component"])) : k("", !0)
|
|
2262
2266
|
])
|
|
2263
2267
|
]),
|
|
2264
|
-
|
|
2265
|
-
|
|
2268
|
+
_("div", Cn, [
|
|
2269
|
+
_("div", {
|
|
2266
2270
|
class: "d-info-progress-line",
|
|
2267
|
-
style:
|
|
2271
|
+
style: z("width: " + o.progress + "%;")
|
|
2268
2272
|
}, null, 4),
|
|
2269
|
-
|
|
2273
|
+
_("div", {
|
|
2270
2274
|
class: "d-info-progress-label",
|
|
2271
2275
|
innerHTML: t.label
|
|
2272
2276
|
}, null, 8, Ln)
|
|
@@ -2287,16 +2291,16 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2287
2291
|
},
|
|
2288
2292
|
emits: ["update:modelValue"],
|
|
2289
2293
|
setup(t, { emit: e }) {
|
|
2290
|
-
const o = t, s = gt().uid, a =
|
|
2294
|
+
const o = t, s = gt().uid, a = h({
|
|
2291
2295
|
get: () => o.modelValue,
|
|
2292
2296
|
set: (l) => {
|
|
2293
2297
|
e("update:modelValue", l);
|
|
2294
2298
|
}
|
|
2295
2299
|
});
|
|
2296
|
-
return (l, r) => (
|
|
2297
|
-
oe(
|
|
2300
|
+
return (l, r) => (d(), m("div", In, [
|
|
2301
|
+
oe(_("input", {
|
|
2298
2302
|
"onUpdate:modelValue": r[0] || (r[0] = (i) => a.value = i),
|
|
2299
|
-
id: `i-${
|
|
2303
|
+
id: `i-${E(s)}`,
|
|
2300
2304
|
type: "checkbox",
|
|
2301
2305
|
checked: o.checked,
|
|
2302
2306
|
disabled: o.disabled,
|
|
@@ -2304,8 +2308,8 @@ const Ee = "[-+]?[0-9]*.?[0-9]+", it = [
|
|
|
2304
2308
|
}, null, 40, En), [
|
|
2305
2309
|
[Nt, a.value]
|
|
2306
2310
|
]),
|
|
2307
|
-
|
|
2308
|
-
for: `i-${
|
|
2311
|
+
_("label", {
|
|
2312
|
+
for: `i-${E(s)}`
|
|
2309
2313
|
}, O(o.label), 9, Bn)
|
|
2310
2314
|
]));
|
|
2311
2315
|
}
|
|
@@ -2319,7 +2323,7 @@ async function Nn(t, e) {
|
|
|
2319
2323
|
const Ws = {
|
|
2320
2324
|
__name: "DDialogProvider",
|
|
2321
2325
|
setup(t) {
|
|
2322
|
-
return window.alert = Nn, window.confirm = Mn, (e, o) => (
|
|
2326
|
+
return window.alert = Nn, window.confirm = Mn, (e, o) => (d(), b(E(Zo)));
|
|
2323
2327
|
}
|
|
2324
2328
|
}, Rn = { class: "d-select" }, On = {
|
|
2325
2329
|
key: 0,
|
|
@@ -2340,7 +2344,7 @@ const Ws = {
|
|
|
2340
2344
|
},
|
|
2341
2345
|
emits: ["update:modelValue"],
|
|
2342
2346
|
setup(t, { emit: e }) {
|
|
2343
|
-
const o = t, n =
|
|
2347
|
+
const o = t, n = h(() => o.scale ? "d-select-" + o.scale : ""), s = h({
|
|
2344
2348
|
get: () => o.modelValue,
|
|
2345
2349
|
set: (a) => {
|
|
2346
2350
|
e("update:modelValue", a);
|
|
@@ -2351,15 +2355,15 @@ const Ws = {
|
|
|
2351
2355
|
s.value = o.options[a].value;
|
|
2352
2356
|
break;
|
|
2353
2357
|
}
|
|
2354
|
-
return (a, l) => (
|
|
2355
|
-
o.label ? (
|
|
2356
|
-
oe(
|
|
2358
|
+
return (a, l) => (d(), m("div", Rn, [
|
|
2359
|
+
o.label ? (d(), m("div", On, O(o.label), 1)) : k("", !0),
|
|
2360
|
+
oe(_("select", {
|
|
2357
2361
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => s.value = r),
|
|
2358
|
-
class:
|
|
2359
|
-
style:
|
|
2362
|
+
class: D(n.value),
|
|
2363
|
+
style: z(o.size === "wide" ? "width:100%" : ""),
|
|
2360
2364
|
disabled: o.disabled
|
|
2361
2365
|
}, [
|
|
2362
|
-
(
|
|
2366
|
+
(d(!0), m(le, null, ge(o.options, (r, i) => (d(), m("option", {
|
|
2363
2367
|
key: i,
|
|
2364
2368
|
value: r.value,
|
|
2365
2369
|
selected: r.selected,
|
|
@@ -2378,28 +2382,28 @@ const Vn = ["title"], zn = { class: "tab-icon" }, Fn = { class: "tab-label" }, W
|
|
|
2378
2382
|
},
|
|
2379
2383
|
setup(t) {
|
|
2380
2384
|
const e = t;
|
|
2381
|
-
return (o, n) => e.tab.label && e.tab.icon ? (
|
|
2385
|
+
return (o, n) => e.tab.label && e.tab.icon ? (d(), m("span", {
|
|
2382
2386
|
key: 0,
|
|
2383
2387
|
title: e.tab.title ? e.tab.title : "",
|
|
2384
2388
|
style: { display: "flex", "flex-direction": "column" }
|
|
2385
2389
|
}, [
|
|
2386
|
-
|
|
2387
|
-
J(
|
|
2390
|
+
_("div", zn, [
|
|
2391
|
+
J(E(re), {
|
|
2388
2392
|
component: e.tab.icon
|
|
2389
2393
|
}, null, 8, ["component"])
|
|
2390
2394
|
]),
|
|
2391
|
-
|
|
2392
|
-
], 8, Vn)) : e.tab.label ? (
|
|
2395
|
+
_("div", Fn, O(e.tab.label), 1)
|
|
2396
|
+
], 8, Vn)) : e.tab.label ? (d(), m("span", {
|
|
2393
2397
|
key: 1,
|
|
2394
2398
|
title: e.tab.title ? e.tab.title : ""
|
|
2395
|
-
}, O(e.tab.label), 9, Wn)) : e.tab.icon ? (
|
|
2399
|
+
}, O(e.tab.label), 9, Wn)) : e.tab.icon ? (d(), m("span", {
|
|
2396
2400
|
key: 2,
|
|
2397
2401
|
title: e.tab.title ? e.tab.title : ""
|
|
2398
2402
|
}, [
|
|
2399
|
-
J(
|
|
2403
|
+
J(E(re), {
|
|
2400
2404
|
component: e.tab.icon
|
|
2401
2405
|
}, null, 8, ["component"])
|
|
2402
|
-
], 8, Pn)) :
|
|
2406
|
+
], 8, Pn)) : k("", !0);
|
|
2403
2407
|
}
|
|
2404
2408
|
}, Xn = /* @__PURE__ */ ne(jn, [["__scopeId", "data-v-9262b225"]]);
|
|
2405
2409
|
const Yn = { class: "d-tabs" }, Un = {
|
|
@@ -2408,20 +2412,20 @@ const Yn = { class: "d-tabs" }, Un = {
|
|
|
2408
2412
|
tabs: Array
|
|
2409
2413
|
},
|
|
2410
2414
|
setup(t) {
|
|
2411
|
-
const o = Ot(t, "tabs"), n =
|
|
2415
|
+
const o = Ot(t, "tabs"), n = T(0), s = (a) => {
|
|
2412
2416
|
n.value = a;
|
|
2413
2417
|
};
|
|
2414
|
-
return (a, l) => (
|
|
2415
|
-
|
|
2416
|
-
(
|
|
2418
|
+
return (a, l) => (d(), m(le, null, [
|
|
2419
|
+
_("div", Yn, [
|
|
2420
|
+
(d(!0), m(le, null, ge(o.value, (r, i) => (d(), b(Xn, {
|
|
2417
2421
|
index: i,
|
|
2418
2422
|
tab: r,
|
|
2419
|
-
class:
|
|
2420
|
-
onClick: (
|
|
2423
|
+
class: D(["d-tab-title", i === n.value ? "active" : ""]),
|
|
2424
|
+
onClick: (c) => s(i)
|
|
2421
2425
|
}, null, 8, ["index", "tab", "class", "onClick"]))), 256))
|
|
2422
2426
|
]),
|
|
2423
|
-
(
|
|
2424
|
-
(
|
|
2427
|
+
(d(), b(At, null, [
|
|
2428
|
+
(d(), b(U(o.value[n.value].component)))
|
|
2425
2429
|
], 1024))
|
|
2426
2430
|
], 64));
|
|
2427
2431
|
}
|
|
@@ -2445,7 +2449,7 @@ const qn = { class: "d-grid" }, Gn = {
|
|
|
2445
2449
|
},
|
|
2446
2450
|
setup(t) {
|
|
2447
2451
|
const e = t;
|
|
2448
|
-
Ae((
|
|
2452
|
+
Ae((u) => ({
|
|
2449
2453
|
"09eba472": i[0],
|
|
2450
2454
|
"09eba434": i[1],
|
|
2451
2455
|
"09eba3f6": i[2],
|
|
@@ -2455,11 +2459,11 @@ const qn = { class: "d-grid" }, Gn = {
|
|
|
2455
2459
|
"898eb2ac": e.gap
|
|
2456
2460
|
}));
|
|
2457
2461
|
const { colXs: o, colSm: n, colMd: s, colLg: a, colXl: l, colXxl: r } = Ht(e), i = [o.value, n.value, s.value, a.value, l.value, r.value];
|
|
2458
|
-
let
|
|
2459
|
-
for (let
|
|
2460
|
-
|
|
2461
|
-
return (
|
|
2462
|
-
L(
|
|
2462
|
+
let c = null;
|
|
2463
|
+
for (let u = 0; u < i.length; u++)
|
|
2464
|
+
c || (c = i[0]), u > 0 && (i[u] ? c = i[u] : i[u] = c);
|
|
2465
|
+
return (u, g) => (d(), m("div", qn, [
|
|
2466
|
+
L(u.$slots, "default", {}, void 0, !0)
|
|
2463
2467
|
]));
|
|
2464
2468
|
}
|
|
2465
2469
|
}, Xs = /* @__PURE__ */ ne(Gn, [["__scopeId", "data-v-b45e8130"]]), Zn = ["src", "alt", "title"], Ys = {
|
|
@@ -2474,20 +2478,20 @@ const qn = { class: "d-grid" }, Gn = {
|
|
|
2474
2478
|
radius: String
|
|
2475
2479
|
},
|
|
2476
2480
|
setup(t) {
|
|
2477
|
-
const e = t, o =
|
|
2481
|
+
const e = t, o = T(null), n = new Image();
|
|
2478
2482
|
return n.onload = () => {
|
|
2479
2483
|
o.value = n.src;
|
|
2480
2484
|
}, n.onerror = () => {
|
|
2481
2485
|
o.value = e.srcFail;
|
|
2482
2486
|
}, me(() => {
|
|
2483
2487
|
n.src = e.src;
|
|
2484
|
-
}), (s, a) => o.value ? (
|
|
2488
|
+
}), (s, a) => o.value ? (d(), m("img", {
|
|
2485
2489
|
key: 0,
|
|
2486
2490
|
src: o.value,
|
|
2487
2491
|
alt: e.alt,
|
|
2488
2492
|
title: e.title,
|
|
2489
|
-
style:
|
|
2490
|
-
}, null, 12, Zn)) :
|
|
2493
|
+
style: z({ width: e.width, height: e.height, borderRadius: e.radius })
|
|
2494
|
+
}, null, 12, Zn)) : k("", !0);
|
|
2491
2495
|
}
|
|
2492
2496
|
};
|
|
2493
2497
|
const Kn = { class: "d-textarea" }, Jn = {
|
|
@@ -2513,7 +2517,7 @@ const Kn = { class: "d-textarea" }, Jn = {
|
|
|
2513
2517
|
},
|
|
2514
2518
|
emits: ["update:modelValue"],
|
|
2515
2519
|
setup(t, { expose: e, emit: o }) {
|
|
2516
|
-
const n = t, s =
|
|
2520
|
+
const n = t, s = T(null), a = h(() => n.scale === "small" ? "d-textarea-small" : n.scale === "large" ? "d-textarea-large" : ""), l = h({
|
|
2517
2521
|
get: () => n.modelValue,
|
|
2518
2522
|
set: (i) => {
|
|
2519
2523
|
o("update:modelValue", i);
|
|
@@ -2527,16 +2531,16 @@ const Kn = { class: "d-textarea" }, Jn = {
|
|
|
2527
2531
|
};
|
|
2528
2532
|
return e({
|
|
2529
2533
|
focus: r
|
|
2530
|
-
}), (i,
|
|
2531
|
-
n.label ? (
|
|
2532
|
-
oe(
|
|
2534
|
+
}), (i, c) => (d(), m("div", Kn, [
|
|
2535
|
+
n.label ? (d(), m("div", Jn, O(n.label), 1)) : k("", !0),
|
|
2536
|
+
oe(_("textarea", {
|
|
2533
2537
|
ref_key: "inputRef",
|
|
2534
2538
|
ref: s,
|
|
2535
|
-
"onUpdate:modelValue":
|
|
2539
|
+
"onUpdate:modelValue": c[0] || (c[0] = (u) => l.value = u),
|
|
2536
2540
|
rows: n.rows,
|
|
2537
2541
|
cols: n.cols,
|
|
2538
2542
|
placeholder: n.placeholder,
|
|
2539
|
-
class:
|
|
2543
|
+
class: D(a.value),
|
|
2540
2544
|
style: { width: "100%" }
|
|
2541
2545
|
}, null, 10, Qn), [
|
|
2542
2546
|
[Vt, l.value]
|
|
@@ -2621,7 +2625,7 @@ class us {
|
|
|
2621
2625
|
return e;
|
|
2622
2626
|
}
|
|
2623
2627
|
}
|
|
2624
|
-
const ps = new us(),
|
|
2628
|
+
const ps = new us(), G = {
|
|
2625
2629
|
RulesUrl: os,
|
|
2626
2630
|
RulesRequired: ss,
|
|
2627
2631
|
RulesMin: is,
|
|
@@ -2631,32 +2635,32 @@ const ps = new us(), q = {
|
|
|
2631
2635
|
};
|
|
2632
2636
|
class fs {
|
|
2633
2637
|
validate(e, o) {
|
|
2634
|
-
var s, a, l, r, i,
|
|
2638
|
+
var s, a, l, r, i, c, u, g, x, C, R, $, H, Y;
|
|
2635
2639
|
let n = "";
|
|
2636
2640
|
if (o) {
|
|
2637
|
-
let
|
|
2638
|
-
for (let
|
|
2639
|
-
if (!
|
|
2640
|
-
switch (
|
|
2641
|
+
let M = !1;
|
|
2642
|
+
for (let I in o)
|
|
2643
|
+
if (!M)
|
|
2644
|
+
switch (I) {
|
|
2641
2645
|
case "url":
|
|
2642
|
-
n =
|
|
2646
|
+
n = G.RulesUrl.validate(e, "https") || e.length === 0 ? "" : G.RulesUrl.message("url", (s = o[I]) != null && s.message ? (a = o[I]) == null ? void 0 : a.message : "url_incorrect"), M = n !== "";
|
|
2643
2647
|
break;
|
|
2644
2648
|
case "required":
|
|
2645
|
-
n =
|
|
2649
|
+
n = G.RulesRequired.validate(e) ? "" : G.RulesRequired.message((l = o[I]) != null && l.message ? (r = o[I]) == null ? void 0 : r.message : "required"), M = n !== "";
|
|
2646
2650
|
break;
|
|
2647
2651
|
case "min":
|
|
2648
|
-
n =
|
|
2652
|
+
n = G.RulesMin.validate(e, (i = o[I]) == null ? void 0 : i.value) ? "" : G.RulesMin.message((c = o[I]) != null && c.message ? (u = o[I]) == null ? void 0 : u.message : "very_small"), M = n !== "";
|
|
2649
2653
|
break;
|
|
2650
2654
|
case "max":
|
|
2651
|
-
n =
|
|
2655
|
+
n = G.RulesMax.validate(e, (g = o[I]) == null ? void 0 : g.value) ? "" : G.RulesMax.message((x = o[I]) != null && x.message ? (C = o[I]) == null ? void 0 : C.message : "vary_large"), M = n !== "";
|
|
2652
2656
|
break;
|
|
2653
2657
|
case "email":
|
|
2654
|
-
n =
|
|
2658
|
+
n = G.RulesEmail.validate(e) ? "" : G.RulesMax.message((R = o[I]) != null && R.message ? ($ = o[I]) == null ? void 0 : $.message : "email_incorrect"), M = n !== "";
|
|
2655
2659
|
break;
|
|
2656
2660
|
case "number":
|
|
2657
|
-
n =
|
|
2658
|
-
(
|
|
2659
|
-
),
|
|
2661
|
+
n = G.RulesNumber.validate(e) ? "" : G.RulesNumber.message(
|
|
2662
|
+
(H = o[I]) != null && H.message ? (Y = o[I]) == null ? void 0 : Y.message : "number_incorrect"
|
|
2663
|
+
), M = n !== "";
|
|
2660
2664
|
break;
|
|
2661
2665
|
}
|
|
2662
2666
|
}
|
|
@@ -2669,21 +2673,21 @@ const ms = new fs(), hs = { style: { display: "flex", "flex-direction": "column"
|
|
|
2669
2673
|
}, vs = {
|
|
2670
2674
|
key: 0,
|
|
2671
2675
|
class: "text-red"
|
|
2672
|
-
}, ys = { style: { display: "flex", "flex-direction": "row" } }, _s = { style: { flex: "1", position: "relative" } }, bs = /* @__PURE__ */
|
|
2676
|
+
}, ys = { style: { display: "flex", "flex-direction": "row" } }, _s = { style: { flex: "1", position: "relative" } }, bs = /* @__PURE__ */ _("svg", {
|
|
2673
2677
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2674
2678
|
viewBox: "0 0 24 24"
|
|
2675
2679
|
}, [
|
|
2676
|
-
/* @__PURE__ */
|
|
2680
|
+
/* @__PURE__ */ _("path", {
|
|
2677
2681
|
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",
|
|
2678
2682
|
fill: "currentColor"
|
|
2679
2683
|
})
|
|
2680
2684
|
], -1), xs = [
|
|
2681
2685
|
bs
|
|
2682
|
-
], ks = ["id", "type", "placeholder", "disabled"], $s = /* @__PURE__ */
|
|
2686
|
+
], ks = ["id", "type", "placeholder", "disabled"], $s = /* @__PURE__ */ _("svg", {
|
|
2683
2687
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2684
2688
|
viewBox: "0 0 24 24"
|
|
2685
2689
|
}, [
|
|
2686
|
-
/* @__PURE__ */
|
|
2690
|
+
/* @__PURE__ */ _("path", {
|
|
2687
2691
|
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",
|
|
2688
2692
|
fill: "currentColor"
|
|
2689
2693
|
})
|
|
@@ -2719,82 +2723,82 @@ const ms = new fs(), hs = { style: { display: "flex", "flex-direction": "column"
|
|
|
2719
2723
|
},
|
|
2720
2724
|
emits: ["update:modelValue", "input", "blur"],
|
|
2721
2725
|
setup(t, { expose: e, emit: o }) {
|
|
2722
|
-
const n = t, s =
|
|
2726
|
+
const n = t, s = T(n.error), a = zt(), l = T(!1), r = T(null);
|
|
2723
2727
|
//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
2724
|
-
const i =
|
|
2728
|
+
const i = h({
|
|
2725
2729
|
get: () => n.modelValue,
|
|
2726
2730
|
//props.form?.fields[props.name].model.value,
|
|
2727
|
-
set: (
|
|
2728
|
-
o("update:modelValue",
|
|
2731
|
+
set: (M) => {
|
|
2732
|
+
o("update:modelValue", M);
|
|
2729
2733
|
}
|
|
2730
|
-
}),
|
|
2731
|
-
o("input",
|
|
2732
|
-
},
|
|
2734
|
+
}), c = h(() => n.type === "password" ? "password" : "text"), u = h(() => n.scale), g = (M) => {
|
|
2735
|
+
o("input", M), x();
|
|
2736
|
+
}, x = () => {
|
|
2733
2737
|
if (!(!n.form || !n.form.fields || !n.form.fields[n.name].rules))
|
|
2734
2738
|
return s.value = ms.validate(i.value, n.form.fields[n.name].rules), !!s.value;
|
|
2735
2739
|
};
|
|
2736
2740
|
me(() => {
|
|
2737
|
-
|
|
2741
|
+
C();
|
|
2738
2742
|
});
|
|
2739
|
-
const
|
|
2740
|
-
var
|
|
2741
|
-
(
|
|
2743
|
+
const C = () => {
|
|
2744
|
+
var M;
|
|
2745
|
+
(M = r.value) == null || M.focus();
|
|
2742
2746
|
}, R = () => {
|
|
2743
2747
|
i.value = "";
|
|
2744
|
-
},
|
|
2745
|
-
l.value =
|
|
2746
|
-
},
|
|
2747
|
-
s.value =
|
|
2748
|
-
},
|
|
2749
|
-
o("blur",
|
|
2748
|
+
}, $ = (M) => {
|
|
2749
|
+
l.value = M;
|
|
2750
|
+
}, H = (M) => {
|
|
2751
|
+
s.value = M;
|
|
2752
|
+
}, Y = (M) => {
|
|
2753
|
+
o("blur", M);
|
|
2750
2754
|
};
|
|
2751
2755
|
return e({
|
|
2752
|
-
focus:
|
|
2753
|
-
setError:
|
|
2754
|
-
validate:
|
|
2755
|
-
}), (
|
|
2756
|
-
var
|
|
2757
|
-
return
|
|
2758
|
-
class:
|
|
2756
|
+
focus: C,
|
|
2757
|
+
setError: H,
|
|
2758
|
+
validate: x
|
|
2759
|
+
}), (M, I) => {
|
|
2760
|
+
var F, S, W, N, w, V, P, f, p, y, A, se, ve, ye, _e, be, Q, xe, de, ke, Le, he, Fe, We, Pe, je, Xe, Ye, Ue, qe, Ge, Ze, Ke, Je, Qe, et, tt, ot, nt;
|
|
2761
|
+
return d(), m("div", {
|
|
2762
|
+
class: D(["d-input-string", u.value])
|
|
2759
2763
|
}, [
|
|
2760
|
-
|
|
2761
|
-
n.label ? (
|
|
2764
|
+
_("div", hs, [
|
|
2765
|
+
n.label ? (d(), m("div", gs, [
|
|
2762
2766
|
K(O(n.label), 1),
|
|
2763
|
-
(
|
|
2764
|
-
])) :
|
|
2765
|
-
|
|
2766
|
-
(
|
|
2767
|
+
(F = n.form) != null && F.fields[n.name].rules && n.form.fields[n.name].rules.hasOwnProperty("required") ? (d(), m("span", vs, "*")) : k("", !0)
|
|
2768
|
+
])) : k("", !0),
|
|
2769
|
+
_("div", ys, [
|
|
2770
|
+
(W = (S = n.pre) == null ? void 0 : S.outside) != null && W.component ? (d(), m("div", {
|
|
2767
2771
|
key: 0,
|
|
2768
|
-
class:
|
|
2772
|
+
class: D(["d-pre", n.disabled ? "disabled" : ""])
|
|
2769
2773
|
}, [
|
|
2770
|
-
(
|
|
2771
|
-
], 2)) : (
|
|
2774
|
+
(d(), b(U((w = (N = n.pre) == null ? void 0 : N.outside) == null ? void 0 : w.component)))
|
|
2775
|
+
], 2)) : (P = (V = n.pre) == null ? void 0 : V.outside) != null && P.text ? (d(), m("div", {
|
|
2772
2776
|
key: 1,
|
|
2773
|
-
class:
|
|
2777
|
+
class: D(["d-pre", n.disabled ? "disabled" : ""])
|
|
2774
2778
|
}, [
|
|
2775
|
-
|
|
2776
|
-
class:
|
|
2777
|
-
}, O((
|
|
2778
|
-
], 2)) :
|
|
2779
|
-
|
|
2780
|
-
(
|
|
2779
|
+
_("div", {
|
|
2780
|
+
class: D(["d-text", l.value ? "focused" : ""])
|
|
2781
|
+
}, O((p = (f = n.pre) == null ? void 0 : f.outside) == null ? void 0 : p.text), 3)
|
|
2782
|
+
], 2)) : k("", !0),
|
|
2783
|
+
_("div", _s, [
|
|
2784
|
+
(A = (y = n.pre) == null ? void 0 : y.inside) != null && A.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(), m("div", {
|
|
2781
2785
|
key: 0,
|
|
2782
2786
|
class: "d-pre-inside-button",
|
|
2783
2787
|
onClick: R
|
|
2784
|
-
}, xs)) :
|
|
2785
|
-
oe(
|
|
2786
|
-
id:
|
|
2788
|
+
}, xs)) : k("", !0),
|
|
2789
|
+
oe(_("input", {
|
|
2790
|
+
id: E(a),
|
|
2787
2791
|
ref_key: "inputRef",
|
|
2788
2792
|
ref: r,
|
|
2789
|
-
"onUpdate:modelValue":
|
|
2793
|
+
"onUpdate:modelValue": I[0] || (I[0] = (Ie) => i.value = Ie),
|
|
2790
2794
|
style: { width: "100%" },
|
|
2791
|
-
type:
|
|
2795
|
+
type: c.value,
|
|
2792
2796
|
placeholder: n.placeholder,
|
|
2793
|
-
onInput:
|
|
2794
|
-
onFocus:
|
|
2795
|
-
onBlur:
|
|
2796
|
-
onFocusout:
|
|
2797
|
-
class:
|
|
2797
|
+
onInput: g,
|
|
2798
|
+
onFocus: I[1] || (I[1] = (Ie) => $(!0)),
|
|
2799
|
+
onBlur: Y,
|
|
2800
|
+
onFocusout: I[2] || (I[2] = (Ie) => $(!1)),
|
|
2801
|
+
class: D([
|
|
2798
2802
|
(be = (_e = n.pre) == null ? void 0 : _e.outside) != null && be.component || (xe = (Q = n.pre) == null ? void 0 : Q.outside) != null && xe.text ? "has-pre" : "",
|
|
2799
2803
|
(ke = (de = n.post) == null ? void 0 : de.outside) != null && ke.component || (he = (Le = n.post) == null ? void 0 : Le.outside) != null && he.text ? "has-post" : "",
|
|
2800
2804
|
(We = (Fe = n.pre) == null ? void 0 : Fe.inside) != null && We.action ? "has-pre-inside-button" : "",
|
|
@@ -2805,28 +2809,28 @@ const ms = new fs(), hs = { style: { display: "flex", "flex-direction": "column"
|
|
|
2805
2809
|
}, null, 42, ks), [
|
|
2806
2810
|
[De, i.value]
|
|
2807
2811
|
]),
|
|
2808
|
-
(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 ? (
|
|
2812
|
+
(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(), m("div", {
|
|
2809
2813
|
key: 1,
|
|
2810
2814
|
class: "d-post-inside-button",
|
|
2811
2815
|
onClick: R
|
|
2812
|
-
}, ws)) :
|
|
2816
|
+
}, ws)) : k("", !0)
|
|
2813
2817
|
]),
|
|
2814
|
-
(Ke = (Ze = n.post) == null ? void 0 : Ze.outside) != null && Ke.component ? (
|
|
2818
|
+
(Ke = (Ze = n.post) == null ? void 0 : Ze.outside) != null && Ke.component ? (d(), m("div", {
|
|
2815
2819
|
key: 2,
|
|
2816
|
-
class:
|
|
2820
|
+
class: D(["d-post", n.disabled ? "disabled" : ""])
|
|
2817
2821
|
}, [
|
|
2818
|
-
(
|
|
2819
|
-
], 2)) : (tt = (et = n.post) == null ? void 0 : et.outside) != null && tt.text ? (
|
|
2822
|
+
(d(), b(U((Qe = (Je = n.post) == null ? void 0 : Je.outside) == null ? void 0 : Qe.component)))
|
|
2823
|
+
], 2)) : (tt = (et = n.post) == null ? void 0 : et.outside) != null && tt.text ? (d(), m("div", {
|
|
2820
2824
|
key: 3,
|
|
2821
|
-
class:
|
|
2825
|
+
class: D(["d-post", n.disabled ? "disabled" : ""])
|
|
2822
2826
|
}, [
|
|
2823
|
-
|
|
2824
|
-
class:
|
|
2827
|
+
_("div", {
|
|
2828
|
+
class: D(["d-text", l.value ? "focused" : ""])
|
|
2825
2829
|
}, O((nt = (ot = n.post) == null ? void 0 : ot.outside) == null ? void 0 : nt.text), 3)
|
|
2826
|
-
], 2)) :
|
|
2830
|
+
], 2)) : k("", !0)
|
|
2827
2831
|
]),
|
|
2828
|
-
n.help ? (
|
|
2829
|
-
s.value ? (
|
|
2832
|
+
n.help ? (d(), m("div", Ss, O(n.help), 1)) : k("", !0),
|
|
2833
|
+
s.value ? (d(), m("div", Ds, O(s.value), 1)) : k("", !0)
|
|
2830
2834
|
])
|
|
2831
2835
|
], 2);
|
|
2832
2836
|
};
|
|
@@ -2851,10 +2855,10 @@ const ms = new fs(), hs = { style: { display: "flex", "flex-direction": "column"
|
|
|
2851
2855
|
}
|
|
2852
2856
|
}
|
|
2853
2857
|
}, wt = (t) => {
|
|
2854
|
-
typeof t == "string" && (t = { title: "", text: t }), typeof t == "object" &&
|
|
2858
|
+
typeof t == "string" && (t = { title: "", text: t }), typeof t == "object" && q.emit("notification-add", t);
|
|
2855
2859
|
};
|
|
2856
2860
|
wt.close = (t) => {
|
|
2857
|
-
|
|
2861
|
+
q.emit("notification-close", t);
|
|
2858
2862
|
};
|
|
2859
2863
|
const Zs = () => ({ notify: wt }), Ks = {
|
|
2860
2864
|
mounted: function(t, e) {
|
|
@@ -3075,12 +3079,12 @@ export {
|
|
|
3075
3079
|
Te as DTransferStore,
|
|
3076
3080
|
xt as DTree,
|
|
3077
3081
|
To as DTreeItem,
|
|
3078
|
-
|
|
3079
|
-
|
|
3082
|
+
v as DTreeStore,
|
|
3083
|
+
G as Rules,
|
|
3080
3084
|
Nn as alert,
|
|
3081
3085
|
Ks as clickOutside,
|
|
3082
3086
|
Mn as confirm,
|
|
3083
|
-
|
|
3087
|
+
q as emitter,
|
|
3084
3088
|
Co as eventsBus,
|
|
3085
3089
|
Qs as focus,
|
|
3086
3090
|
Js as keydown,
|