doph-js 0.0.44 → 0.0.45
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 +215 -199
- package/dist/dophJs.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/dophJs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useSlots as
|
|
1
|
+
import { useSlots as j, computed as f, h as X, openBlock as p, createBlock as v, unref as h, createElementBlock as x, Fragment as G, normalizeClass as k, renderSlot as y, createCommentVNode as T, createVNode as K, createElementVNode as C, toDisplayString as U, withDirectives as oe, normalizeStyle as L, vModelText as ie, Transition as se, withCtx as B, ref as z, resolveDynamicComponent as E, withModifiers as H, resolveComponent as ae, createTextVNode as re, renderList as ee, reactive as q, getCurrentInstance as de, watch as le, onUnmounted as ue, mergeProps as O } from "vue";
|
|
2
2
|
const R = {
|
|
3
3
|
__name: "DIcon",
|
|
4
4
|
props: {
|
|
@@ -7,14 +7,14 @@ const R = {
|
|
|
7
7
|
color: String
|
|
8
8
|
},
|
|
9
9
|
setup(t) {
|
|
10
|
-
const n = t, e =
|
|
11
|
-
const { color:
|
|
12
|
-
return
|
|
13
|
-
}), i =
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
return typeof
|
|
17
|
-
}),
|
|
10
|
+
const n = t, e = j(), o = f(() => {
|
|
11
|
+
const { color: d } = n;
|
|
12
|
+
return d === void 0 ? null : d;
|
|
13
|
+
}), i = f(() => {
|
|
14
|
+
const d = n.size ?? null;
|
|
15
|
+
if (d !== void 0)
|
|
16
|
+
return typeof d == "number" || /^\d+$/.test(d) ? `${d}px` : d;
|
|
17
|
+
}), a = X(
|
|
18
18
|
"i",
|
|
19
19
|
{
|
|
20
20
|
class: "icon",
|
|
@@ -25,7 +25,7 @@ const R = {
|
|
|
25
25
|
},
|
|
26
26
|
n.component ? X(n.component) : e
|
|
27
27
|
);
|
|
28
|
-
return (
|
|
28
|
+
return (d, l) => (p(), v(h(a)));
|
|
29
29
|
}
|
|
30
30
|
}, Ve = {
|
|
31
31
|
__name: "DButton",
|
|
@@ -41,31 +41,31 @@ const R = {
|
|
|
41
41
|
component: e.icon,
|
|
42
42
|
color: "inherit"
|
|
43
43
|
}));
|
|
44
|
-
const i = (
|
|
45
|
-
n("click",
|
|
44
|
+
const i = (a) => {
|
|
45
|
+
n("click", a);
|
|
46
46
|
};
|
|
47
|
-
return (
|
|
48
|
-
h(o) ? T("", !0) : (
|
|
47
|
+
return (a, d) => (p(), x(G, null, [
|
|
48
|
+
h(o) ? T("", !0) : (p(), x("div", {
|
|
49
49
|
key: 0,
|
|
50
50
|
onClick: i,
|
|
51
51
|
class: k(["button", e.class])
|
|
52
52
|
}, [
|
|
53
|
-
y(
|
|
53
|
+
y(a.$slots, "default")
|
|
54
54
|
], 2)),
|
|
55
|
-
h(o) ? (
|
|
55
|
+
h(o) ? (p(), x("div", {
|
|
56
56
|
key: 1,
|
|
57
57
|
onClick: i,
|
|
58
58
|
class: k(["button button-ext", e.class])
|
|
59
59
|
}, [
|
|
60
60
|
K(h(o)),
|
|
61
61
|
C("div", null, [
|
|
62
|
-
y(
|
|
62
|
+
y(a.$slots, "default")
|
|
63
63
|
])
|
|
64
64
|
], 2)) : T("", !0)
|
|
65
65
|
], 64));
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
const
|
|
68
|
+
const J = (t, n) => {
|
|
69
69
|
const e = t.__vccOpts || t;
|
|
70
70
|
for (const [o, i] of n)
|
|
71
71
|
e[o] = i;
|
|
@@ -82,16 +82,16 @@ const q = (t, n) => {
|
|
|
82
82
|
},
|
|
83
83
|
emits: ["update:modelValue"],
|
|
84
84
|
setup(t, { emit: n }) {
|
|
85
|
-
const e = t, o =
|
|
85
|
+
const e = t, o = f(() => e.font === "small" ? "d-input-small" : e.font === "big" ? "d-input-big" : ""), i = f({
|
|
86
86
|
get: () => e.modelValue,
|
|
87
|
-
set: (
|
|
88
|
-
n("update:modelValue",
|
|
87
|
+
set: (a) => {
|
|
88
|
+
n("update:modelValue", a);
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
return (
|
|
91
|
+
return (a, d) => (p(), x("div", ce, [
|
|
92
92
|
C("div", fe, U(e.label), 1),
|
|
93
93
|
oe(C("input", {
|
|
94
|
-
"onUpdate:modelValue":
|
|
94
|
+
"onUpdate:modelValue": d[0] || (d[0] = (l) => i.value = l),
|
|
95
95
|
type: "text",
|
|
96
96
|
class: k(o.value),
|
|
97
97
|
placeholder: e.placeholder,
|
|
@@ -101,7 +101,7 @@ const q = (t, n) => {
|
|
|
101
101
|
])
|
|
102
102
|
]));
|
|
103
103
|
}
|
|
104
|
-
}, Ae = /* @__PURE__ */
|
|
104
|
+
}, Ae = /* @__PURE__ */ J(me, [["__scopeId", "data-v-11679fd8"]]), F = {
|
|
105
105
|
state: {},
|
|
106
106
|
getters: {
|
|
107
107
|
getIcon(t) {
|
|
@@ -127,7 +127,7 @@ const q = (t, n) => {
|
|
|
127
127
|
},
|
|
128
128
|
setup(t) {
|
|
129
129
|
const n = t;
|
|
130
|
-
return (e, o) => (
|
|
130
|
+
return (e, o) => (p(), x("div", {
|
|
131
131
|
class: k(["badge", n.class])
|
|
132
132
|
}, [
|
|
133
133
|
y(e.$slots, "default")
|
|
@@ -170,17 +170,17 @@ const q = (t, n) => {
|
|
|
170
170
|
borderBottomWidth: s.style.borderBottomWidth,
|
|
171
171
|
marginTop: s.style.marginTop,
|
|
172
172
|
marginBottom: s.style.marginBottom
|
|
173
|
-
}), o = (s,
|
|
174
|
-
const { width:
|
|
175
|
-
s.style.width =
|
|
173
|
+
}), o = (s, r) => {
|
|
174
|
+
const { width: c } = getComputedStyle(s);
|
|
175
|
+
s.style.width = c, s.style.position = "absolute", s.style.visibility = "hidden", s.style.height = "";
|
|
176
176
|
let { height: m } = getComputedStyle(s);
|
|
177
|
-
return s.style.width =
|
|
178
|
-
}, i = (s,
|
|
177
|
+
return s.style.width = r.width, s.style.position = r.position, s.style.visibility = r.visibility, s.style.height = I, s.style.overflow = "hidden", r.height && r.height !== I ? r.height : m;
|
|
178
|
+
}, i = (s, r, c, m, $) => {
|
|
179
179
|
const N = s.animate(m, $);
|
|
180
|
-
s.style.height =
|
|
181
|
-
s.style.overflow =
|
|
180
|
+
s.style.height = r.height, N.onfinish = () => {
|
|
181
|
+
s.style.overflow = r.overflow, c();
|
|
182
182
|
};
|
|
183
|
-
},
|
|
183
|
+
}, a = (s, r) => [
|
|
184
184
|
{
|
|
185
185
|
height: I,
|
|
186
186
|
opacity: n.opacityClosed,
|
|
@@ -194,26 +194,26 @@ const q = (t, n) => {
|
|
|
194
194
|
{
|
|
195
195
|
height: s,
|
|
196
196
|
opacity: n.opacityOpened,
|
|
197
|
-
paddingTop:
|
|
198
|
-
paddingBottom:
|
|
199
|
-
borderTopWidth:
|
|
200
|
-
borderBottomWidth:
|
|
201
|
-
marginTop:
|
|
202
|
-
marginBottom:
|
|
197
|
+
paddingTop: r.paddingTop,
|
|
198
|
+
paddingBottom: r.paddingBottom,
|
|
199
|
+
borderTopWidth: r.borderTopWidth,
|
|
200
|
+
borderBottomWidth: r.borderBottomWidth,
|
|
201
|
+
marginTop: r.marginTop,
|
|
202
|
+
marginBottom: r.marginBottom
|
|
203
203
|
}
|
|
204
|
-
],
|
|
205
|
-
const
|
|
206
|
-
i(
|
|
207
|
-
},
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
const N =
|
|
211
|
-
i(
|
|
204
|
+
], d = (s, r) => {
|
|
205
|
+
const c = s, m = e(c), $ = o(c, m), N = a($, m), M = { duration: n.duration, easing: n.easingEnter };
|
|
206
|
+
i(c, m, r, N, M);
|
|
207
|
+
}, l = (s, r) => {
|
|
208
|
+
const c = s, m = e(c), { height: $ } = getComputedStyle(c);
|
|
209
|
+
c.style.height = $, c.style.overflow = "hidden";
|
|
210
|
+
const N = a($, m).reverse(), M = { duration: n.duration, easing: n.easingLeave };
|
|
211
|
+
i(c, m, r, N, M);
|
|
212
212
|
};
|
|
213
|
-
return (s,
|
|
213
|
+
return (s, r) => (p(), v(se, {
|
|
214
214
|
css: !1,
|
|
215
|
-
onEnter:
|
|
216
|
-
onLeave:
|
|
215
|
+
onEnter: d,
|
|
216
|
+
onLeave: l
|
|
217
217
|
}, {
|
|
218
218
|
default: B(() => [
|
|
219
219
|
y(s.$slots, "default")
|
|
@@ -223,7 +223,7 @@ const q = (t, n) => {
|
|
|
223
223
|
}
|
|
224
224
|
}, Z = {
|
|
225
225
|
data: void 0
|
|
226
|
-
},
|
|
226
|
+
}, Q = (t) => t.reduce((n, e) => (n[e] = e) && n, {}), b = Q([
|
|
227
227
|
"drag",
|
|
228
228
|
"dragend",
|
|
229
229
|
"dragenter",
|
|
@@ -231,7 +231,7 @@ const q = (t, n) => {
|
|
|
231
231
|
"dragstart",
|
|
232
232
|
"dragover",
|
|
233
233
|
"drop"
|
|
234
|
-
]), ye =
|
|
234
|
+
]), ye = Q(["copy", "move", "link", "none"]), ve = Q([
|
|
235
235
|
"none",
|
|
236
236
|
"copy",
|
|
237
237
|
"copyLink",
|
|
@@ -255,32 +255,32 @@ const q = (t, n) => {
|
|
|
255
255
|
tag: { type: String, default: "div" }
|
|
256
256
|
},
|
|
257
257
|
setup(t) {
|
|
258
|
-
const n = t, e =
|
|
259
|
-
const
|
|
260
|
-
if ([b.dragenter, b.dragover].includes(
|
|
261
|
-
if (n.effectAllowed && (
|
|
262
|
-
let
|
|
263
|
-
n.image ? (
|
|
258
|
+
const n = t, e = j(), o = z(!1), i = f(() => o && n.transferData), a = f(() => ({ position: "fixed", top: "-1000px" })), d = (l, s) => {
|
|
259
|
+
const r = s.dataTransfer;
|
|
260
|
+
if ([b.dragenter, b.dragover].includes(l) && n.dropEffect && (r.dropEffect = n.dropEffect), l === b.dragstart) {
|
|
261
|
+
if (n.effectAllowed && (r.effectAllowed = n.effectAllowed), n.image || e.image) {
|
|
262
|
+
let c;
|
|
263
|
+
n.image ? (c = new Image(), c.src = n.image) : e.image && (c = e.image[0].elm), r.setDragImage && r.setDragImage(c, n.imageXOffset, n.imageYOffset);
|
|
264
264
|
}
|
|
265
265
|
n.transferData !== void 0 && (Z.data = n.transferData, s.dataTransfer.setData("text", "")), o.value = !0;
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
|
-
return (
|
|
268
|
+
return (l, s) => (p(), v(E(t.tag), {
|
|
269
269
|
draggable: n.draggable,
|
|
270
|
-
onDrag: s[0] || (s[0] = (
|
|
271
|
-
onDragstart: s[1] || (s[1] = H((
|
|
272
|
-
onDragenter: s[2] || (s[2] = (
|
|
273
|
-
onDragleave: s[3] || (s[3] = (
|
|
274
|
-
onDragend: s[4] || (s[4] = (
|
|
270
|
+
onDrag: s[0] || (s[0] = (r) => d(h(b).drag, r)),
|
|
271
|
+
onDragstart: s[1] || (s[1] = H((r) => d(h(b).dragstart, r), ["stop"])),
|
|
272
|
+
onDragenter: s[2] || (s[2] = (r) => d(h(b).dragenter, r)),
|
|
273
|
+
onDragleave: s[3] || (s[3] = (r) => d(h(b).dragleave, r)),
|
|
274
|
+
onDragend: s[4] || (s[4] = (r) => d(h(b).dragend, r))
|
|
275
275
|
}, {
|
|
276
276
|
default: B(() => [
|
|
277
|
-
y(
|
|
278
|
-
t.hideImageHtml ? (
|
|
277
|
+
y(l.$slots, "default", { transferData: i.value }),
|
|
278
|
+
t.hideImageHtml ? (p(), x("div", {
|
|
279
279
|
key: 0,
|
|
280
|
-
style: L(
|
|
280
|
+
style: L(a.value)
|
|
281
281
|
}, [
|
|
282
|
-
y(
|
|
283
|
-
], 4)) : y(
|
|
282
|
+
y(l.$slots, "image", { transferData: i.value })
|
|
283
|
+
], 4)) : y(l.$slots, "image", {
|
|
284
284
|
key: 1,
|
|
285
285
|
transferData: i.value
|
|
286
286
|
})
|
|
@@ -297,34 +297,35 @@ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direc
|
|
|
297
297
|
props: {
|
|
298
298
|
model: Object,
|
|
299
299
|
treeId: [String, Number],
|
|
300
|
-
items: Array
|
|
300
|
+
items: Array,
|
|
301
|
+
search: String
|
|
301
302
|
},
|
|
302
303
|
emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick"],
|
|
303
304
|
setup(t, { emit: n }) {
|
|
304
|
-
const e = t, o = z(null), i = z(!1),
|
|
305
|
+
const e = t, o = z(null), i = z(!1), a = z(!1), d = z(!1), l = f(() => e.model.children && e.model.children.length), s = f(() => (u.actions.isTreeExpanded(e.treeId) && (e.model.expanded = e.model.expanded === void 0 ? !0 : e.model.expanded), e.model.expanded)), r = (S) => {
|
|
305
306
|
n("nodeclick", { event: S, model: e.model });
|
|
306
|
-
},
|
|
307
|
+
}, c = (S) => {
|
|
307
308
|
n("nodeclick", S);
|
|
308
|
-
}, m =
|
|
309
|
+
}, m = f(() => (u.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (i.value ? "node-over " : "") + (a.value ? "node-top " : "") + (d.value ? "node-bottom " : "")), $ = f(() => e.search ? !1 : e.model.draggable === !0), N = (S) => {
|
|
309
310
|
let D = Z.data;
|
|
310
311
|
if (D.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, D.model.id) || u.actions.isParentOfChild(e.treeId, e.items, D.model.id, e.model.id))
|
|
311
|
-
return i.value = !1,
|
|
312
|
+
return i.value = !1, a.value = !1, d.value = !1, !1;
|
|
312
313
|
if (!u.state.trees[e.treeId].transfer && D.id !== e.treeId)
|
|
313
314
|
return !1;
|
|
314
315
|
let _ = "";
|
|
315
|
-
|
|
316
|
+
a.value ? _ = "before" : d.value ? _ = "after" : _ = "inside", u.actions.moveTreeNode(D.id, e.treeId, e.items, D.model.id, e.model.id, _), i.value = !1, a.value = !1, d.value = !1;
|
|
316
317
|
}, M = (S) => {
|
|
317
318
|
let D = Z.data;
|
|
318
319
|
if (D.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, D.model.id) || u.actions.isParentOfChild(e.treeId, e.items, D.model.id, e.model.id))
|
|
319
320
|
return !1;
|
|
320
321
|
const _ = S.y, w = o.value.getBoundingClientRect().top, W = o.value.getBoundingClientRect().height, g = W / 3;
|
|
321
|
-
_ > w && _ <= w + g ? (i.value = !1,
|
|
322
|
+
_ > w && _ <= w + g ? (i.value = !1, a.value = !0, d.value = !1) : _ < w + W && _ >= w + W - g ? (i.value = !1, a.value = !1, d.value = !0) : (i.value = !0, a.value = !1, d.value = !1);
|
|
322
323
|
}, Y = () => {
|
|
323
|
-
i.value = !1,
|
|
324
|
+
i.value = !1, a.value = !1, d.value = !1;
|
|
324
325
|
};
|
|
325
326
|
return (S, D) => {
|
|
326
327
|
const _ = ae("d-tree-item", !0);
|
|
327
|
-
return
|
|
328
|
+
return p(), v(be, {
|
|
328
329
|
tag: "li",
|
|
329
330
|
class: "tree-item",
|
|
330
331
|
"transfer-data": { id: e.treeId, model: e.model },
|
|
@@ -342,24 +343,24 @@ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direc
|
|
|
342
343
|
ref_key: "node",
|
|
343
344
|
ref: o,
|
|
344
345
|
class: k(m.value),
|
|
345
|
-
onClick:
|
|
346
|
+
onClick: r
|
|
346
347
|
}, [
|
|
347
348
|
C("div", null, [
|
|
348
|
-
e.model.icons && e.model.icons.pre &&
|
|
349
|
+
e.model.icons && e.model.icons.pre && l.value && !e.search ? (p(), v(E(R), {
|
|
349
350
|
key: 0,
|
|
350
351
|
component: h(F).getters.getIcon(e.model.icons.pre.component),
|
|
351
352
|
size: 18,
|
|
352
353
|
color: e.model.icons.pre.color ? e.model.icons.pre.color : "inherit",
|
|
353
354
|
class: k(s.value ? "tree-open-pre" : "")
|
|
354
355
|
}, null, 8, ["component", "color", "class"])) : T("", !0),
|
|
355
|
-
e.model.icons && e.model.icons.pre && !
|
|
356
|
+
e.model.icons && e.model.icons.pre && !l.value && !e.search ? (p(), v(E(R), {
|
|
356
357
|
key: 1,
|
|
357
358
|
component: h(F).getters.getIcon(e.model.icons.pre.component),
|
|
358
359
|
size: 18,
|
|
359
360
|
color: "rgba(0,0,0,0)",
|
|
360
361
|
class: k(s.value ? "tree-open-pre" : "")
|
|
361
362
|
}, null, 8, ["component", "class"])) : T("", !0),
|
|
362
|
-
e.model.icons && e.model.icons.icon ? (
|
|
363
|
+
e.model.icons && e.model.icons.icon ? (p(), v(E(R), {
|
|
363
364
|
key: 2,
|
|
364
365
|
component: h(F).getters.getIcon(e.model.icons.icon.component),
|
|
365
366
|
color: e.model.icons.icon.color ? e.model.icons.icon.color : "inherit"
|
|
@@ -369,7 +370,7 @@ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direc
|
|
|
369
370
|
])
|
|
370
371
|
]),
|
|
371
372
|
C("div", De, [
|
|
372
|
-
((w = e.model.badge) == null ? void 0 : w.value) !== void 0 ? (
|
|
373
|
+
((w = e.model.badge) == null ? void 0 : w.value) !== void 0 ? (p(), v(E(ge), {
|
|
373
374
|
key: 0,
|
|
374
375
|
class: k([(W = e.model.badge) == null ? void 0 : W.class, "badge-sm"])
|
|
375
376
|
}, {
|
|
@@ -378,7 +379,7 @@ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direc
|
|
|
378
379
|
]),
|
|
379
380
|
_: 1
|
|
380
381
|
}, 8, ["class"])) : T("", !0),
|
|
381
|
-
e.model.icons && e.model.icons.post &&
|
|
382
|
+
e.model.icons && e.model.icons.post && l.value && !e.search ? (p(), v(E(R), {
|
|
382
383
|
key: 1,
|
|
383
384
|
component: h(F).getters.getIcon(e.model.icons.post.component),
|
|
384
385
|
size: 20,
|
|
@@ -389,15 +390,16 @@ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direc
|
|
|
389
390
|
], 2),
|
|
390
391
|
K(he, null, {
|
|
391
392
|
default: B(() => [
|
|
392
|
-
|
|
393
|
-
(
|
|
393
|
+
l.value && s.value && !e.search ? (p(), x("ul", _e, [
|
|
394
|
+
(p(!0), x(G, null, ee(t.model.children, (g) => (p(), v(_, {
|
|
394
395
|
class: "tree-item",
|
|
395
396
|
key: g.id,
|
|
396
397
|
model: g,
|
|
397
398
|
treeId: e.treeId,
|
|
398
399
|
items: e.items,
|
|
399
|
-
|
|
400
|
-
|
|
400
|
+
search: e.search,
|
|
401
|
+
onNodeclick: c
|
|
402
|
+
}, null, 8, ["model", "treeId", "items", "search"]))), 128))
|
|
401
403
|
])) : T("", !0)
|
|
402
404
|
]),
|
|
403
405
|
_: 1
|
|
@@ -408,7 +410,7 @@ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direc
|
|
|
408
410
|
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"]);
|
|
409
411
|
};
|
|
410
412
|
}
|
|
411
|
-
}, $e = /* @__PURE__ */
|
|
413
|
+
}, $e = /* @__PURE__ */ J(Te, [["__scopeId", "data-v-f4157b53"]]);
|
|
412
414
|
function Se(t) {
|
|
413
415
|
return t = t || /* @__PURE__ */ new Map(), {
|
|
414
416
|
/**
|
|
@@ -457,7 +459,7 @@ function Se(t) {
|
|
|
457
459
|
};
|
|
458
460
|
}
|
|
459
461
|
const V = Se(), u = {
|
|
460
|
-
state:
|
|
462
|
+
state: q({
|
|
461
463
|
trees: {}
|
|
462
464
|
}),
|
|
463
465
|
getters: {
|
|
@@ -468,8 +470,8 @@ const V = Se(), u = {
|
|
|
468
470
|
return u.state.trees[t].selected;
|
|
469
471
|
},
|
|
470
472
|
// data - ноды, dataId - ID ноды родителя data
|
|
471
|
-
getParentId(t, n, e, o = "id", i = "children",
|
|
472
|
-
return e && t && (t.find((
|
|
473
|
+
getParentId(t, n, e, o = "id", i = "children", a = {}) {
|
|
474
|
+
return e && t && (t.find((d) => d[o] === e ? (a.found = n, d) : u.getters.getParentId(d[i], d.id, e, o, i, a)), a.found) ? a.found : !1;
|
|
473
475
|
}
|
|
474
476
|
},
|
|
475
477
|
mutations: {
|
|
@@ -483,8 +485,8 @@ const V = Se(), u = {
|
|
|
483
485
|
}
|
|
484
486
|
},
|
|
485
487
|
actions: {
|
|
486
|
-
initTreeStore(t, n, e, o, i,
|
|
487
|
-
u.state.trees[t] = [], u.state.trees[t].selected = [], u.state.trees[t].noSelect = n, u.state.trees[t].multiSelect = e, u.state.trees[t].expanded = o, u.state.trees[t].transfer = i, u.state.trees[t].renderTitle =
|
|
488
|
+
initTreeStore(t, n, e, o, i, a) {
|
|
489
|
+
u.state.trees[t] = [], u.state.trees[t].selected = [], u.state.trees[t].noSelect = n, u.state.trees[t].multiSelect = e, u.state.trees[t].expanded = o, u.state.trees[t].transfer = i, u.state.trees[t].renderTitle = a;
|
|
488
490
|
},
|
|
489
491
|
renderTitle(t, n) {
|
|
490
492
|
return u.state.trees[t].renderTitle ? u.state.trees[t].renderTitle(n) : n;
|
|
@@ -502,8 +504,8 @@ const V = Se(), u = {
|
|
|
502
504
|
isChildOfParent(t, n, e, o) {
|
|
503
505
|
const i = u.actions.deepSearch(n, e);
|
|
504
506
|
if (i && i.children) {
|
|
505
|
-
for (let
|
|
506
|
-
if (i.children[
|
|
507
|
+
for (let a = 0; a < i.children.length; a++)
|
|
508
|
+
if (i.children[a].id === o)
|
|
507
509
|
return !0;
|
|
508
510
|
}
|
|
509
511
|
return !1;
|
|
@@ -514,22 +516,33 @@ const V = Se(), u = {
|
|
|
514
516
|
return !!(i && i.children && u.actions.deepSearch(i.children, o));
|
|
515
517
|
},
|
|
516
518
|
deepSearch(t, n, e = "id", o = "children", i = {}) {
|
|
517
|
-
return n && t && (t.find((
|
|
519
|
+
return n && t && (t.find((a) => a[e] === n ? (i.found = a, a) : u.actions.deepSearch(a[o], n, e, o, i)), i.found) ? i.found : !1;
|
|
520
|
+
},
|
|
521
|
+
deepSearchByTitle(t, n, e = "title", o = "children", i = []) {
|
|
522
|
+
if (n && t && (t.find((a) => {
|
|
523
|
+
const d = new RegExp(n, "gi");
|
|
524
|
+
a[e].toString().toLowerCase().match(d) !== null && i.push(a), u.actions.deepSearchByTitle(a[o], n, e, o, i);
|
|
525
|
+
}), i)) {
|
|
526
|
+
for (let a = 0; a < i.length; a++)
|
|
527
|
+
;
|
|
528
|
+
return i;
|
|
529
|
+
}
|
|
530
|
+
return i;
|
|
518
531
|
},
|
|
519
|
-
moveTreeNode(t, n, e, o, i,
|
|
520
|
-
const
|
|
521
|
-
u.actions.insertTreeNode(e, i,
|
|
532
|
+
moveTreeNode(t, n, e, o, i, a) {
|
|
533
|
+
const d = u.actions.deleteTreeNode(e, o);
|
|
534
|
+
u.actions.insertTreeNode(e, i, d, a), V.emit(`move-${n}`, { fromTreeId: t, toTreeId: n, moved: d.id, target: i, position: a });
|
|
522
535
|
},
|
|
523
536
|
insertTreeNode(t, n, e, o) {
|
|
524
537
|
if (t)
|
|
525
538
|
for (let i = 0; i < t.length; i++) {
|
|
526
539
|
if (t[i].id === n) {
|
|
527
|
-
let
|
|
528
|
-
return o === "after" ? (
|
|
540
|
+
let d = i;
|
|
541
|
+
return o === "after" ? (d++, t.splice(d, 0, e)) : o === "before" ? t.splice(d, 0, e) : o === "inside" && (Object.hasOwn(t[i], "children") || (t[i].children = [], t[i].opened = !0), t[i].children.splice(0, 0, e)), t[i];
|
|
529
542
|
}
|
|
530
|
-
const
|
|
531
|
-
if (
|
|
532
|
-
return
|
|
543
|
+
const a = this.insertTreeNode(t[i].children, n, e, o);
|
|
544
|
+
if (a)
|
|
545
|
+
return a;
|
|
533
546
|
}
|
|
534
547
|
},
|
|
535
548
|
deleteTreeNode(t, n) {
|
|
@@ -552,20 +565,20 @@ const V = Se(), u = {
|
|
|
552
565
|
},
|
|
553
566
|
emits: Object.keys(b),
|
|
554
567
|
setup(t, { emit: n }) {
|
|
555
|
-
let e =
|
|
556
|
-
const o = z("false"), i = z(null),
|
|
557
|
-
e = Z.data, n(s,
|
|
568
|
+
let e = q({});
|
|
569
|
+
const o = z("false"), i = z(null), a = /* @__PURE__ */ new Set(), d = f(() => o.value && e), l = (s, r) => {
|
|
570
|
+
e = Z.data, n(s, r, e), s === b.dragenter && (a.size || r.target === i.value) && a.add(r.target), s === b.dragleave && a.delete(r.target), s === b.drop && a.clear(), o.value = !!a.size;
|
|
558
571
|
};
|
|
559
|
-
return (s,
|
|
572
|
+
return (s, r) => (p(), v(E(t.tag), {
|
|
560
573
|
ref_key: "el",
|
|
561
574
|
ref: i,
|
|
562
|
-
onDragenter:
|
|
563
|
-
onDragleave:
|
|
564
|
-
onDragover:
|
|
565
|
-
onDrop:
|
|
575
|
+
onDragenter: r[0] || (r[0] = (c) => l(h(b).dragenter, c)),
|
|
576
|
+
onDragleave: r[1] || (r[1] = (c) => l(h(b).dragleave, c)),
|
|
577
|
+
onDragover: r[2] || (r[2] = H((c) => l(h(b).dragover, c), ["prevent"])),
|
|
578
|
+
onDrop: r[3] || (r[3] = H((c) => l(h(b).drop, c), ["prevent"]))
|
|
566
579
|
}, {
|
|
567
580
|
default: B(() => [
|
|
568
|
-
y(s.$slots, "default", { transferData:
|
|
581
|
+
y(s.$slots, "default", { transferData: d.value })
|
|
569
582
|
]),
|
|
570
583
|
_: 3
|
|
571
584
|
}, 544));
|
|
@@ -583,41 +596,44 @@ const V = Se(), u = {
|
|
|
583
596
|
// все ноды раскрыты
|
|
584
597
|
transfer: Boolean,
|
|
585
598
|
// перенос нод между деревьями
|
|
586
|
-
renderTitle: Function
|
|
599
|
+
renderTitle: Function,
|
|
587
600
|
// генерация заголовка (постобработка)
|
|
601
|
+
search: String
|
|
602
|
+
// строка поиска
|
|
588
603
|
},
|
|
589
604
|
emits: ["select", "collapse", "expand", "move"],
|
|
590
605
|
setup(t, { emit: n }) {
|
|
591
606
|
const e = t, o = de().uid;
|
|
592
607
|
u.actions.initTreeStore(o, e.noSelect, e.multiSelect, e.expanded, e.transfer, e.renderTitle);
|
|
593
|
-
const i = (
|
|
594
|
-
console.log(
|
|
608
|
+
const i = (l, s) => {
|
|
609
|
+
console.log(l, s);
|
|
595
610
|
};
|
|
596
|
-
V.on(`select-${o}`, (
|
|
597
|
-
n("select",
|
|
598
|
-
}), V.on(`expand-${o}`, (
|
|
599
|
-
n("expand",
|
|
600
|
-
}), V.on(`collapse-${o}`, (
|
|
601
|
-
n("collapse",
|
|
602
|
-
}), V.on(`move-${o}`, (
|
|
603
|
-
n("move",
|
|
611
|
+
V.on(`select-${o}`, (l) => {
|
|
612
|
+
n("select", l);
|
|
613
|
+
}), V.on(`expand-${o}`, (l) => {
|
|
614
|
+
n("expand", l);
|
|
615
|
+
}), V.on(`collapse-${o}`, (l) => {
|
|
616
|
+
n("collapse", l);
|
|
617
|
+
}), V.on(`move-${o}`, (l) => {
|
|
618
|
+
n("move", l);
|
|
604
619
|
});
|
|
605
|
-
const
|
|
606
|
-
|
|
620
|
+
const a = f(() => e.search ? u.actions.deepSearchByTitle(e.items, e.search) : e.items), d = (l = null) => {
|
|
621
|
+
u.mutations.setItemSelect(o, l.model), u.actions.toggleItem(o, e.items, l.model.id);
|
|
607
622
|
};
|
|
608
|
-
return (
|
|
623
|
+
return (l, s) => (p(), v(Be, {
|
|
609
624
|
class: "tree",
|
|
610
625
|
tag: "ul",
|
|
611
626
|
onDrop: H(i, ["stop"])
|
|
612
627
|
}, {
|
|
613
628
|
default: B(() => [
|
|
614
|
-
(
|
|
615
|
-
key:
|
|
616
|
-
model:
|
|
629
|
+
(p(!0), x(G, null, ee(a.value, (r) => (p(), v($e, {
|
|
630
|
+
key: r.id,
|
|
631
|
+
model: r,
|
|
617
632
|
treeId: h(o),
|
|
618
633
|
items: e.items,
|
|
619
|
-
|
|
620
|
-
|
|
634
|
+
search: e.search,
|
|
635
|
+
onNodeclick: d
|
|
636
|
+
}, null, 8, ["model", "treeId", "items", "search"]))), 128))
|
|
621
637
|
]),
|
|
622
638
|
_: 1
|
|
623
639
|
}, 8, ["onDrop"]));
|
|
@@ -630,13 +646,13 @@ const we = {
|
|
|
630
646
|
},
|
|
631
647
|
setup(t) {
|
|
632
648
|
const n = t;
|
|
633
|
-
return (e, o) => (
|
|
649
|
+
return (e, o) => (p(), v(Ne, {
|
|
634
650
|
class: "accordion",
|
|
635
651
|
items: n.items,
|
|
636
652
|
"no-select": !0
|
|
637
653
|
}, null, 8, ["items"]));
|
|
638
654
|
}
|
|
639
|
-
},
|
|
655
|
+
}, Pe = /* @__PURE__ */ J(we, [["__scopeId", "data-v-4c920528"]]), Ie = {
|
|
640
656
|
__name: "DLayoutHeader",
|
|
641
657
|
props: {
|
|
642
658
|
fixed: {
|
|
@@ -670,11 +686,11 @@ const we = {
|
|
|
670
686
|
useMinWidthLayout: Boolean
|
|
671
687
|
},
|
|
672
688
|
setup(t) {
|
|
673
|
-
const n = t, e =
|
|
674
|
-
const { fixed: o, zIndex: i, minWidth:
|
|
675
|
-
return `position:${
|
|
689
|
+
const n = t, e = f(() => {
|
|
690
|
+
const { fixed: o, zIndex: i, minWidth: a, height: d, paddingLeft: l, transitionDuration: s, transitionTimingFunction: r } = n, c = o ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
691
|
+
return `position:${c};z-index:${i};${m}height:${d}px;padding-left:${l}px;transition-duration:${s}ms;transition-timing-function:${r};`;
|
|
676
692
|
});
|
|
677
|
-
return (o, i) => (
|
|
693
|
+
return (o, i) => (p(), x("header", {
|
|
678
694
|
class: "d-layout-header",
|
|
679
695
|
style: L(e.value)
|
|
680
696
|
}, [
|
|
@@ -719,11 +735,11 @@ const we = {
|
|
|
719
735
|
useMinWidthLayout: Boolean
|
|
720
736
|
},
|
|
721
737
|
setup(t) {
|
|
722
|
-
const n = t, e =
|
|
723
|
-
const { fixed: o, top: i, zIndex:
|
|
724
|
-
return `position:${m};top:${i}px;z-index:${
|
|
738
|
+
const n = t, e = f(() => {
|
|
739
|
+
const { fixed: o, top: i, zIndex: a, minWidth: d, height: l, paddingLeft: s, transitionDuration: r, transitionTimingFunction: c } = n, m = o ? "fixed" : "static", $ = n.useMinWidthLayout ? `min-width: ${d}px;` : "";
|
|
740
|
+
return `position:${m};top:${i}px;z-index:${a};${$}height:${l}px;padding-left:${s}px;transition-duration:${r}ms;transition-timing-function:${c};`;
|
|
725
741
|
});
|
|
726
|
-
return (o, i) => (
|
|
742
|
+
return (o, i) => (p(), x("div", {
|
|
727
743
|
class: "d-layout-tab",
|
|
728
744
|
style: L(e.value)
|
|
729
745
|
}, [
|
|
@@ -764,11 +780,11 @@ const we = {
|
|
|
764
780
|
useMinWidthLayout: Boolean
|
|
765
781
|
},
|
|
766
782
|
setup(t) {
|
|
767
|
-
const n = t, e =
|
|
768
|
-
const { fixed: o, zIndex: i, minWidth:
|
|
769
|
-
return `position:${
|
|
783
|
+
const n = t, e = f(() => {
|
|
784
|
+
const { fixed: o, zIndex: i, minWidth: a, height: d, paddingLeft: l, transitionDuration: s, transitionTimingFunction: r } = n, c = o ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${a}px;` : "";
|
|
785
|
+
return `position:${c};z-index:${i};${m}height:${d}px;padding-left:${l}px;transition-duration:${s}ms;transition-timing-function:${r};`;
|
|
770
786
|
});
|
|
771
|
-
return (o, i) => (
|
|
787
|
+
return (o, i) => (p(), x("footer", {
|
|
772
788
|
class: "d-layout-footer",
|
|
773
789
|
style: L(e.value)
|
|
774
790
|
}, [
|
|
@@ -804,11 +820,11 @@ const we = {
|
|
|
804
820
|
}
|
|
805
821
|
},
|
|
806
822
|
setup(t) {
|
|
807
|
-
const n = t, e =
|
|
808
|
-
const { zIndex: o, width: i, paddingTop:
|
|
809
|
-
return `z-index:${o};width:${i}px;padding-top:${
|
|
823
|
+
const n = t, e = f(() => {
|
|
824
|
+
const { zIndex: o, width: i, paddingTop: a, transitionDuration: d, transitionTimingFunction: l } = n;
|
|
825
|
+
return `z-index:${o};width:${i}px;padding-top:${a}px;transition-duration:${d}ms;transition-timing-function:${l};`;
|
|
810
826
|
});
|
|
811
|
-
return (o, i) => (
|
|
827
|
+
return (o, i) => (p(), x("aside", {
|
|
812
828
|
class: "d-layout-sidebar",
|
|
813
829
|
style: L(e.value)
|
|
814
830
|
}, [
|
|
@@ -841,11 +857,11 @@ const we = {
|
|
|
841
857
|
}
|
|
842
858
|
},
|
|
843
859
|
setup(t) {
|
|
844
|
-
const n = t, e =
|
|
845
|
-
const { paddingTop: o, paddingBottom: i, paddingLeft:
|
|
846
|
-
return `padding-top:${o}px;padding-bottom:${i}px;padding-left:${
|
|
860
|
+
const n = t, e = f(() => {
|
|
861
|
+
const { paddingTop: o, paddingBottom: i, paddingLeft: a, transitionDuration: d, transitionTimingFunction: l } = n, s = `overflow:${n.overflowHidden ? "hidden" : "visible"};`;
|
|
862
|
+
return `padding-top:${o}px;padding-bottom:${i}px;padding-left:${a}px;${s}transition-duration:${d}ms;transition-timing-function:${l};`;
|
|
847
863
|
});
|
|
848
|
-
return (o, i) => (
|
|
864
|
+
return (o, i) => (p(), x("main", {
|
|
849
865
|
style: L(e.value),
|
|
850
866
|
class: "d-layout-content"
|
|
851
867
|
}, [
|
|
@@ -854,35 +870,35 @@ const we = {
|
|
|
854
870
|
}
|
|
855
871
|
};
|
|
856
872
|
function ze(t) {
|
|
857
|
-
const n = z(0), e =
|
|
873
|
+
const n = z(0), e = f(() => `transform: translateX(${-n.value}px);`);
|
|
858
874
|
let o = !1;
|
|
859
|
-
function i(
|
|
860
|
-
n.value =
|
|
875
|
+
function i(c) {
|
|
876
|
+
n.value = c;
|
|
861
877
|
}
|
|
862
|
-
function
|
|
863
|
-
var
|
|
864
|
-
const m = ((
|
|
878
|
+
function a() {
|
|
879
|
+
var c;
|
|
880
|
+
const m = ((c = document.scrollingElement) === null || c === void 0 ? void 0 : c.scrollLeft) || 0;
|
|
865
881
|
i(m);
|
|
866
882
|
}
|
|
867
|
-
function
|
|
868
|
-
|
|
883
|
+
function d() {
|
|
884
|
+
a();
|
|
869
885
|
}
|
|
870
|
-
function
|
|
871
|
-
document.addEventListener("scroll",
|
|
886
|
+
function l() {
|
|
887
|
+
document.addEventListener("scroll", a);
|
|
872
888
|
}
|
|
873
889
|
function s() {
|
|
874
|
-
o && document.removeEventListener("scroll",
|
|
890
|
+
o && document.removeEventListener("scroll", a);
|
|
875
891
|
}
|
|
876
|
-
function
|
|
877
|
-
|
|
892
|
+
function r() {
|
|
893
|
+
d(), l(), o = !0;
|
|
878
894
|
}
|
|
879
|
-
return le(t, (
|
|
880
|
-
|
|
895
|
+
return le(t, (c) => {
|
|
896
|
+
c ? r() : s();
|
|
881
897
|
}, { immediate: !0 }), ue(() => {
|
|
882
898
|
s();
|
|
883
899
|
}), e;
|
|
884
900
|
}
|
|
885
|
-
const He = 1001, Fe = 999, Me = 998,
|
|
901
|
+
const He = 1001, Fe = 999, Me = 998, Oe = {
|
|
886
902
|
__name: "DLayoutAdmin",
|
|
887
903
|
props: {
|
|
888
904
|
mode: {
|
|
@@ -973,13 +989,13 @@ const He = 1001, Fe = 999, Me = 998, Pe = {
|
|
|
973
989
|
},
|
|
974
990
|
emits: ["update:sidebar-collapse"],
|
|
975
991
|
setup(t, { emit: n }) {
|
|
976
|
-
const e = t, o =
|
|
992
|
+
const e = t, o = f(() => e.useMinWidthLayout ? `min-width:${e.minWidth}px;` : ""), i = f(() => e.useMinWidthLayout && (e.fixedHeaderAndTab || e.fixedFooter)), a = ze(i), d = f(() => e.fixedHeaderAndTab ? a.value : ""), l = f(() => e.fixedFooter ? a.value : ""), s = f(() => {
|
|
977
993
|
const { transitionDuration: g, transitionTimingFunction: A } = e;
|
|
978
994
|
return {
|
|
979
995
|
transitionDuration: g,
|
|
980
996
|
transitionTimingFunction: A
|
|
981
997
|
};
|
|
982
|
-
}),
|
|
998
|
+
}), r = f(() => e.mode === "vertical"), c = f(() => e.isMobile || r.value ? 1003 : 1e3), m = f({
|
|
983
999
|
get() {
|
|
984
1000
|
return e.sidebarCollapse;
|
|
985
1001
|
},
|
|
@@ -990,51 +1006,51 @@ const He = 1001, Fe = 999, Me = 998, Pe = {
|
|
|
990
1006
|
function $() {
|
|
991
1007
|
m.value = !0;
|
|
992
1008
|
}
|
|
993
|
-
const N =
|
|
1009
|
+
const N = f(() => e.isMobile && !m.value), M = f(() => {
|
|
994
1010
|
const { transitionDuration: g, transitionTimingFunction: A } = e;
|
|
995
1011
|
return `background-color:${e.maskBg};transition-duration:${g}ms;transition-timing-function:${A};`;
|
|
996
|
-
}), Y =
|
|
1012
|
+
}), Y = f(() => {
|
|
997
1013
|
const { sidebarWidth: g, sidebarCollapsedWidth: A } = e, te = e.isMobile ? 0 : A, ne = m.value ? te : g;
|
|
998
1014
|
return e.sidebarVisible ? ne : 0;
|
|
999
|
-
}), S =
|
|
1000
|
-
() => !e.isMobile && !
|
|
1001
|
-
), w =
|
|
1015
|
+
}), S = f(() => e.isMobile ? 0 : Y.value), D = f(() => r.value ? S.value : 0), _ = f(
|
|
1016
|
+
() => !e.isMobile && !r.value && e.headerVisible ? e.headerHeight : 0
|
|
1017
|
+
), w = f(() => {
|
|
1002
1018
|
let g = 0;
|
|
1003
1019
|
return e.fixedHeaderAndTab && (e.headerVisible && (g += e.headerHeight), e.tabVisible && (g += e.tabHeight)), g;
|
|
1004
|
-
}), W =
|
|
1005
|
-
return (g, A) => (
|
|
1020
|
+
}), W = f(() => e.fixedFooter && e.footerVisible ? e.footerHeight : 0);
|
|
1021
|
+
return (g, A) => (p(), x("div", {
|
|
1006
1022
|
class: "d-layout",
|
|
1007
1023
|
style: L(o.value)
|
|
1008
1024
|
}, [
|
|
1009
|
-
t.headerVisible ? (
|
|
1025
|
+
t.headerVisible ? (p(), v(Ie, O({ key: 0 }, s.value, {
|
|
1010
1026
|
fixed: t.fixedHeaderAndTab,
|
|
1011
1027
|
"z-index": He,
|
|
1012
1028
|
"min-width": t.minWidth,
|
|
1013
1029
|
height: t.headerHeight,
|
|
1014
1030
|
"padding-left": D.value,
|
|
1015
|
-
style:
|
|
1031
|
+
style: d.value
|
|
1016
1032
|
}), {
|
|
1017
1033
|
default: B(() => [
|
|
1018
1034
|
y(g.$slots, "header")
|
|
1019
1035
|
]),
|
|
1020
1036
|
_: 3
|
|
1021
1037
|
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : T("", !0),
|
|
1022
|
-
t.tabVisible ? (
|
|
1038
|
+
t.tabVisible ? (p(), v(ke, O({ key: 1 }, s.value, {
|
|
1023
1039
|
fixed: t.fixedHeaderAndTab,
|
|
1024
1040
|
"z-index": Fe,
|
|
1025
1041
|
"min-width": t.minWidth,
|
|
1026
1042
|
top: t.headerHeight,
|
|
1027
1043
|
height: t.tabHeight,
|
|
1028
1044
|
"padding-left": S.value,
|
|
1029
|
-
style:
|
|
1045
|
+
style: d.value
|
|
1030
1046
|
}), {
|
|
1031
1047
|
default: B(() => [
|
|
1032
1048
|
y(g.$slots, "tab")
|
|
1033
1049
|
]),
|
|
1034
1050
|
_: 3
|
|
1035
1051
|
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : T("", !0),
|
|
1036
|
-
t.sidebarVisible ? (
|
|
1037
|
-
"z-index":
|
|
1052
|
+
t.sidebarVisible ? (p(), v(We, O({ key: 2 }, s.value, {
|
|
1053
|
+
"z-index": c.value,
|
|
1038
1054
|
width: Y.value,
|
|
1039
1055
|
"padding-top": _.value
|
|
1040
1056
|
}), {
|
|
@@ -1043,13 +1059,13 @@ const He = 1001, Fe = 999, Me = 998, Pe = {
|
|
|
1043
1059
|
]),
|
|
1044
1060
|
_: 3
|
|
1045
1061
|
}, 16, ["z-index", "width", "padding-top"])) : T("", !0),
|
|
1046
|
-
N.value ? (
|
|
1062
|
+
N.value ? (p(), x("div", {
|
|
1047
1063
|
key: 3,
|
|
1048
1064
|
class: "d-layout-sidebar-mask",
|
|
1049
1065
|
style: L(M.value),
|
|
1050
1066
|
onClick: $
|
|
1051
1067
|
}, null, 4)) : T("", !0),
|
|
1052
|
-
K(Ce,
|
|
1068
|
+
K(Ce, O(s.value, {
|
|
1053
1069
|
"padding-top": w.value,
|
|
1054
1070
|
"padding-bottom": W.value,
|
|
1055
1071
|
"padding-left": S.value,
|
|
@@ -1060,13 +1076,13 @@ const He = 1001, Fe = 999, Me = 998, Pe = {
|
|
|
1060
1076
|
]),
|
|
1061
1077
|
_: 3
|
|
1062
1078
|
}, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
|
|
1063
|
-
t.footerVisible ? (
|
|
1079
|
+
t.footerVisible ? (p(), v(Le, O({ key: 4 }, s.value, {
|
|
1064
1080
|
fixed: t.fixedFooter,
|
|
1065
1081
|
"z-index": Me,
|
|
1066
1082
|
"min-width": t.minWidth,
|
|
1067
1083
|
height: t.footerHeight,
|
|
1068
1084
|
"padding-left": S.value,
|
|
1069
|
-
style:
|
|
1085
|
+
style: l.value
|
|
1070
1086
|
}), {
|
|
1071
1087
|
default: B(() => [
|
|
1072
1088
|
y(g.$slots, "footer")
|
|
@@ -1075,23 +1091,23 @@ const He = 1001, Fe = 999, Me = 998, Pe = {
|
|
|
1075
1091
|
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : T("", !0)
|
|
1076
1092
|
], 4));
|
|
1077
1093
|
}
|
|
1078
|
-
},
|
|
1079
|
-
state:
|
|
1094
|
+
}, P = {
|
|
1095
|
+
state: q({
|
|
1080
1096
|
theme: "dark"
|
|
1081
1097
|
}),
|
|
1082
1098
|
getters: {
|
|
1083
1099
|
theme() {
|
|
1084
|
-
return
|
|
1100
|
+
return P.state.theme;
|
|
1085
1101
|
}
|
|
1086
1102
|
},
|
|
1087
1103
|
mutations: {
|
|
1088
1104
|
setTheme(t) {
|
|
1089
|
-
|
|
1105
|
+
P.state.theme = t, document.documentElement.setAttribute("class", t);
|
|
1090
1106
|
}
|
|
1091
1107
|
},
|
|
1092
1108
|
actions: {
|
|
1093
1109
|
toggleTheme() {
|
|
1094
|
-
|
|
1110
|
+
P.state.theme = P.state.theme === "dark" ? "light" : "dark", document.documentElement.setAttribute("class", P.state.theme);
|
|
1095
1111
|
}
|
|
1096
1112
|
}
|
|
1097
1113
|
}, Re = {
|
|
@@ -1104,20 +1120,20 @@ const He = 1001, Fe = 999, Me = 998, Pe = {
|
|
|
1104
1120
|
},
|
|
1105
1121
|
setup(t) {
|
|
1106
1122
|
const n = t;
|
|
1107
|
-
return
|
|
1123
|
+
return P.mutations.setTheme(n.theme), (e, o) => y(e.$slots, "default");
|
|
1108
1124
|
}
|
|
1109
1125
|
};
|
|
1110
1126
|
export {
|
|
1111
|
-
|
|
1127
|
+
Pe as DAccordion,
|
|
1112
1128
|
ge as DBadge,
|
|
1113
1129
|
Ve as DButton,
|
|
1114
1130
|
he as DCollapse,
|
|
1115
1131
|
Re as DConfigProvider,
|
|
1116
|
-
|
|
1132
|
+
P as DGlobalStore,
|
|
1117
1133
|
R as DIcon,
|
|
1118
1134
|
F as DIconStore,
|
|
1119
1135
|
Ae as DInput,
|
|
1120
|
-
|
|
1136
|
+
Oe as DLayoutAdmin,
|
|
1121
1137
|
Ce as DLayoutContent,
|
|
1122
1138
|
Le as DLayoutFooter,
|
|
1123
1139
|
Ie as DLayoutHeader,
|
package/dist/dophJs.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p.DophJs={},p.Vue))})(this,function(p,e){"use strict";const fe="",pe="",ue="",ge="",w={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String},setup(o){const n=o,t=e.useSlots(),i=e.computed(()=>{const{color:s}=n;return s===void 0?null:s}),r=e.computed(()=>{const s=n.size??null;if(s!==void 0)return typeof s=="number"||/^\d+$/.test(s)?`${s}px`:s}),l=e.h("i",{class:"icon",style:{color:i.value,fontSize:r.value}},n.component?e.h(n.component):t);return(s,f)=>(e.openBlock(),e.createBlock(e.unref(l)))}},X={__name:"DButton",props:{class:String,icon:Object},emits:["click"],setup(o,{emit:n}){const t=o;let i=null;t.icon&&(i=e.h(w,{component:t.icon,color:"inherit"}));const r=l=>{n("click",l)};return(l,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:r,class:e.normalizeClass(["button",t.class])},[e.renderSlot(l.$slots,"default")],2)),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:r,class:e.normalizeClass(["button button-ext",t.class])},[e.createVNode(e.unref(i)),e.createElementVNode("div",null,[e.renderSlot(l.$slots,"default")])],2)):e.createCommentVNode("",!0)],64))}},he="",E=(o,n)=>{const t=o.__vccOpts||o;for(const[i,r]of n)t[i]=r;return t},j={class:"d-input"},G={class:"label"},U=["placeholder"],q=E({__name:"DInput",props:{label:String,placeholder:String,size:String,font:String,modelValue:String},emits:["update:modelValue"],setup(o,{emit:n}){const t=o,i=e.computed(()=>t.font==="small"?"d-input-small":t.font==="big"?"d-input-big":""),r=e.computed({get:()=>t.modelValue,set:l=>{n("update:modelValue",l)}});return(l,s)=>(e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("div",G,e.toDisplayString(t.label),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=f=>r.value=f),type:"text",class:e.normalizeClass(i.value),placeholder:t.placeholder,style:e.normalizeStyle(t.size==="wide"?"width:100%":"")},null,14,U),[[e.vModelText,r.value]])]))}},[["__scopeId","data-v-11679fd8"]]),D={state:{},getters:{getIcon(o){return D.state[o]},getIcons(){return D.state}},mutations:{addIcon(o,n){D.state.name=n},addIcons(o){for(const n in o)o.hasOwnProperty(n)&&(D.state[n]=o[n])}}},W={__name:"DBadge",props:{class:String},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",n.class])},[e.renderSlot(t.$slots,"default")],2))}},S="0px",M={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(o){const n=o,t=a=>({height:a.style.height,width:a.style.width,position:a.style.position,visibility:a.style.visibility,overflow:a.style.overflow,paddingTop:a.style.paddingTop,paddingBottom:a.style.paddingBottom,borderTopWidth:a.style.borderTopWidth,borderBottomWidth:a.style.borderBottomWidth,marginTop:a.style.marginTop,marginBottom:a.style.marginBottom}),i=(a,d)=>{const{width:m}=getComputedStyle(a);a.style.width=m,a.style.position="absolute",a.style.visibility="hidden",a.style.height="";let{height:u}=getComputedStyle(a);return a.style.width=d.width,a.style.position=d.position,a.style.visibility=d.visibility,a.style.height=S,a.style.overflow="hidden",d.height&&d.height!==S?d.height:u},r=(a,d,m,u,B)=>{const _=a.animate(u,B);a.style.height=d.height,_.onfinish=()=>{a.style.overflow=d.overflow,m()}},l=(a,d)=>[{height:S,opacity:n.opacityClosed,paddingTop:S,paddingBottom:S,borderTopWidth:S,borderBottomWidth:S,marginTop:S,marginBottom:S},{height:a,opacity:n.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}],s=(a,d)=>{const m=a,u=t(m),B=i(m,u),_=l(B,u),C={duration:n.duration,easing:n.easingEnter};r(m,u,d,_,C)},f=(a,d)=>{const m=a,u=t(m),{height:B}=getComputedStyle(m);m.style.height=B,m.style.overflow="hidden";const _=l(B,u).reverse(),C={duration:n.duration,easing:n.easingLeave};r(m,u,d,_,C)};return(a,d)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:s,onLeave:f},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},L={data:void 0},V=o=>o.reduce((n,t)=>(n[t]=t)&&n,{}),h=V(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),J=V(["copy","move","link","none"]),K=V(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),Q={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:o=>o in J},effectAllowed:{validator:o=>o in K},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(o){const n=o,t=e.useSlots(),i=e.ref(!1),r=e.computed(()=>i&&n.transferData),l=e.computed(()=>({position:"fixed",top:"-1000px"})),s=(f,a)=>{const d=a.dataTransfer;if([h.dragenter,h.dragover].includes(f)&&n.dropEffect&&(d.dropEffect=n.dropEffect),f===h.dragstart){if(n.effectAllowed&&(d.effectAllowed=n.effectAllowed),n.image||t.image){let m;n.image?(m=new Image,m.src=n.image):t.image&&(m=t.image[0].elm),d.setDragImage&&d.setDragImage(m,n.imageXOffset,n.imageYOffset)}n.transferData!==void 0&&(L.data=n.transferData,a.dataTransfer.setData("text","")),i.value=!0}};return(f,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{draggable:n.draggable,onDrag:a[0]||(a[0]=d=>s(e.unref(h).drag,d)),onDragstart:a[1]||(a[1]=e.withModifiers(d=>s(e.unref(h).dragstart,d),["stop"])),onDragenter:a[2]||(a[2]=d=>s(e.unref(h).dragenter,d)),onDragleave:a[3]||(a[3]=d=>s(e.unref(h).dragleave,d)),onDragend:a[4]||(a[4]=d=>s(e.unref(h).dragend,d))},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{transferData:r.value}),o.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.value)},[e.renderSlot(f.$slots,"image",{transferData:r.value})],4)):e.renderSlot(f.$slots,"image",{key:1,transferData:r.value})]),_:3},40,["draggable"]))}},be="",v={class:"item-title"},ee={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},te={key:0,class:"sub-menu"},F=E({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array},emits:["nodedrop","nodedragover","nodedragleave","nodeclick"],setup(o,{emit:n}){const t=o,i=e.ref(null),r=e.ref(!1),l=e.ref(!1),s=e.ref(!1),f=e.computed(()=>t.model.children&&t.model.children.length),a=e.computed(()=>(c.actions.isTreeExpanded(t.treeId)&&(t.model.expanded=t.model.expanded===void 0?!0:t.model.expanded),t.model.expanded)),d=k=>{n("nodeclick",{event:k,model:t.model})},m=k=>{n("nodeclick",k)},u=e.computed(()=>(c.actions.isItemSelected(t.treeId,t.model.id)?"selected":"")+(r.value?"node-over ":"")+(l.value?"node-top ":"")+(s.value?"node-bottom ":"")),B=e.computed(()=>t.model.draggable===!0),_=k=>{let y=L.data;if(y.model.id===t.model.id||c.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||c.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return r.value=!1,l.value=!1,s.value=!1,!1;if(!c.state.trees[t.treeId].transfer&&y.id!==t.treeId)return!1;let b="";l.value?b="before":s.value?b="after":b="inside",c.actions.moveTreeNode(y.id,t.treeId,t.items,y.model.id,t.model.id,b),r.value=!1,l.value=!1,s.value=!1},C=k=>{let y=L.data;if(y.model.id===t.model.id||c.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||c.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return!1;const b=k.y,x=i.value.getBoundingClientRect().top,$=i.value.getBoundingClientRect().height,g=$/3;b>x&&b<=x+g?(r.value=!1,l.value=!0,s.value=!1):b<x+$&&b>=x+$-g?(r.value=!1,l.value=!1,s.value=!0):(r.value=!0,l.value=!1,s.value=!1)},z=()=>{r.value=!1,l.value=!1,s.value=!1};return(k,y)=>{const b=e.resolveComponent("d-tree-item",!0);return e.openBlock(),e.createBlock(Q,{tag:"li",class:"tree-item","transfer-data":{id:t.treeId,model:t.model},draggable:B.value,onDrop:e.withModifiers(_,["stop"]),onDragenter:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(C,["prevent","stop"]),onDragleave:e.withModifiers(z,["prevent"])},{default:e.withCtx(()=>{var x,$;return[e.createElementVNode("div",{ref_key:"node",ref:i,class:e.normalizeClass(u.value),onClick:d},[e.createElementVNode("div",null,[t.model.icons&&t.model.icons.pre&&f.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:0,component:e.unref(D).getters.getIcon(t.model.icons.pre.component),size:18,color:t.model.icons.pre.color?t.model.icons.pre.color:"inherit",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.pre&&!f.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(D).getters.getIcon(t.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:2,component:e.unref(D).getters.getIcon(t.model.icons.icon.component),color:t.model.icons.icon.color?t.model.icons.icon.color:"inherit"},null,8,["component","color"])):e.createCommentVNode("",!0),e.createElementVNode("div",v,[e.createElementVNode("div",null,e.toDisplayString(e.unref(c).actions.renderTitle(t.treeId,t.model.title)),1)])]),e.createElementVNode("div",ee,[((x=t.model.badge)==null?void 0:x.value)!==void 0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(W),{key:0,class:e.normalizeClass([($=t.model.badge)==null?void 0:$.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.post&&f.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(D).getters.getIcon(t.model.icons.post.component),size:20,color:t.model.icons.post.color?t.model.icons.post.color:"inherit",class:e.normalizeClass(a.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],2),e.createVNode(M,null,{default:e.withCtx(()=>[f.value&&a.value?(e.openBlock(),e.createElementBlock("ul",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model.children,g=>(e.openBlock(),e.createBlock(b,{class:"tree-item",key:g.id,model:g,treeId:t.treeId,items:t.items,onNodeclick:m},null,8,["model","treeId","items"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])}}},[["__scopeId","data-v-4c84dfd5"]]);function H(o){return o=o||new Map,{all:o,on(n,t){const i=o.get(n);i?i.push(t):o.set(n,[t])},off(n,t){const i=o.get(n);i&&(t?i.splice(i.indexOf(t)>>>0,1):o.set(n,[]))},emit(n,t){let i=o.get(n);i&&i.slice().map(r=>{r(t)}),i=o.get("*"),i&&i.slice().map(r=>{r(n,t)})}}}const T=H(),c={state:e.reactive({trees:{}}),getters:{getItems(o){return c.state.trees[o].items},getItemsSelect(o){return c.state.trees[o].selected},getParentId(o,n,t,i="id",r="children",l={}){return t&&o&&(o.find(s=>s[i]===t?(l.found=n,s):c.getters.getParentId(s[r],s.id,t,i,r,l)),l.found)?l.found:!1}},mutations:{setTreeItems(o,n){c.state.trees[o].items=n},setItemSelect(o,n){c.state.trees[o].noSelect||(c.state.trees[o].multiSelect?c.state.trees[o].selected.includes(n.id)?c.state.trees[o].selected=c.state.trees[o].selected.filter(function(t){return t!==n.id}):c.state.trees[o].selected=[...c.state.trees[o].selected,n.id]:c.state.trees[o].selected=[n.id])}},actions:{initTreeStore(o,n,t,i,r,l){c.state.trees[o]=[],c.state.trees[o].selected=[],c.state.trees[o].noSelect=n,c.state.trees[o].multiSelect=t,c.state.trees[o].expanded=i,c.state.trees[o].transfer=r,c.state.trees[o].renderTitle=l},renderTitle(o,n){return c.state.trees[o].renderTitle?c.state.trees[o].renderTitle(n):n},isItemSelected(o,n){return c.state.trees[o].selected.includes(n)},toggleItem(o,n,t){const i=c.actions.deepSearch(n,t);i.expanded=i.expanded===void 0||!i.expanded,i.children&&i.children.length&&(i.expanded?T.emit(`expand-${o}`,{id:o,model:i}):T.emit(`collapse-${o}`,{id:o,model:i}))},isTreeExpanded(o){return c.state.trees[o].expanded},isChildOfParent(o,n,t,i){const r=c.actions.deepSearch(n,t);if(r&&r.children){for(let l=0;l<r.children.length;l++)if(r.children[l].id===i)return!0}return!1},isParentOfChild(o,n,t,i){const r=c.actions.deepSearch(n,t);return!!(r&&r.children&&c.actions.deepSearch(r.children,i))},deepSearch(o,n,t="id",i="children",r={}){return n&&o&&(o.find(l=>l[t]===n?(r.found=l,l):c.actions.deepSearch(l[i],n,t,i,r)),r.found)?r.found:!1},moveTreeNode(o,n,t,i,r,l){const s=c.actions.deleteTreeNode(t,i);c.actions.insertTreeNode(t,r,s,l),T.emit(`move-${n}`,{fromTreeId:o,toTreeId:n,moved:s.id,target:r,position:l})},insertTreeNode(o,n,t,i){if(o)for(let r=0;r<o.length;r++){if(o[r].id===n){let s=r;return i==="after"?(s++,o.splice(s,0,t)):i==="before"?o.splice(s,0,t):i==="inside"&&(Object.hasOwn(o[r],"children")||(o[r].children=[],o[r].opened=!0),o[r].children.splice(0,0,t)),o[r]}const l=this.insertTreeNode(o[r].children,n,t,i);if(l)return l}},deleteTreeNode(o,n){if(o)for(let t=0;t<o.length;t++){if(o[t].id===n){const r=o[t];return o.splice(t,1),r}const i=c.actions.deleteTreeNode(o[t].children,n);if(i)return i}}}},oe={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(h),setup(o,{emit:n}){let t=e.reactive({});const i=e.ref("false"),r=e.ref(null),l=new Set,s=e.computed(()=>i.value&&t),f=(a,d)=>{t=L.data,n(a,d,t),a===h.dragenter&&(l.size||d.target===r.value)&&l.add(d.target),a===h.dragleave&&l.delete(d.target),a===h.drop&&l.clear(),i.value=!!l.size};return(a,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"el",ref:r,onDragenter:d[0]||(d[0]=m=>f(e.unref(h).dragenter,m)),onDragleave:d[1]||(d[1]=m=>f(e.unref(h).dragleave,m)),onDragover:d[2]||(d[2]=e.withModifiers(m=>f(e.unref(h).dragover,m),["prevent"])),onDrop:d[3]||(d[3]=e.withModifiers(m=>f(e.unref(h).drop,m),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{transferData:s.value})]),_:3},544))}},P={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean,renderTitle:Function},emits:["select","collapse","expand","move"],setup(o,{emit:n}){const t=o,i=e.getCurrentInstance().uid;c.actions.initTreeStore(i,t.noSelect,t.multiSelect,t.expanded,t.transfer,t.renderTitle);const r=(s,f)=>{console.log(s,f)};T.on(`select-${i}`,s=>{n("select",s)}),T.on(`expand-${i}`,s=>{n("expand",s)}),T.on(`collapse-${i}`,s=>{n("collapse",s)}),T.on(`move-${i}`,s=>{n("move",s)});const l=(s=null)=>{console.log(s),c.mutations.setItemSelect(i,s.model),c.actions.toggleItem(i,t.items,s.model.id)};return(s,f)=>(e.openBlock(),e.createBlock(oe,{class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,a=>(e.openBlock(),e.createBlock(F,{key:a.id,model:a,treeId:e.unref(i),items:t.items,onNodeclick:l},null,8,["model","treeId","items"]))),128))]),_:1},8,["onDrop"]))}},ke="",ne=E({__name:"DAccordion",props:{items:Array},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createBlock(P,{class:"accordion",items:n.items,"no-select":!0},null,8,["items"]))}},[["__scopeId","data-v-4c920528"]]),A={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:l,height:s,paddingLeft:f,transitionDuration:a,transitionTimingFunction:d}=n,m=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${l}px;`:"";return`position:${m};z-index:${r};${u}height:${s}px;padding-left:${f}px;transition-duration:${a}ms;transition-timing-function:${d};`});return(i,r)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},O={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,top:r,zIndex:l,minWidth:s,height:f,paddingLeft:a,transitionDuration:d,transitionTimingFunction:m}=n,u=i?"fixed":"static",B=n.useMinWidthLayout?`min-width: ${s}px;`:"";return`position:${u};top:${r}px;z-index:${l};${B}height:${f}px;padding-left:${a}px;transition-duration:${d}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},R={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:l,height:s,paddingLeft:f,transitionDuration:a,transitionTimingFunction:d}=n,m=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${l}px;`:"";return`position:${m};z-index:${r};${u}height:${s}px;padding-left:${f}px;transition-duration:${a}ms;transition-timing-function:${d};`});return(i,r)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Y={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(o){const n=o,t=e.computed(()=>{const{zIndex:i,width:r,paddingTop:l,transitionDuration:s,transitionTimingFunction:f}=n;return`z-index:${i};width:${r}px;padding-top:${l}px;transition-duration:${s}ms;transition-timing-function:${f};`});return(i,r)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Z={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(o){const n=o,t=e.computed(()=>{const{paddingTop:i,paddingBottom:r,paddingLeft:l,transitionDuration:s,transitionTimingFunction:f}=n,a=`overflow:${n.overflowHidden?"hidden":"visible"};`;return`padding-top:${i}px;padding-bottom:${r}px;padding-left:${l}px;${a}transition-duration:${s}ms;transition-timing-function:${f};`});return(i,r)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(t.value),class:"d-layout-content"},[e.renderSlot(i.$slots,"default")],4))}};function ie(o){const n=e.ref(0),t=e.computed(()=>`transform: translateX(${-n.value}px);`);let i=!1;function r(m){n.value=m}function l(){var m;const u=((m=document.scrollingElement)===null||m===void 0?void 0:m.scrollLeft)||0;r(u)}function s(){l()}function f(){document.addEventListener("scroll",l)}function a(){i&&document.removeEventListener("scroll",l)}function d(){s(),f(),i=!0}return e.watch(o,m=>{m?d():a()},{immediate:!0}),e.onUnmounted(()=>{a()}),t}const re=1001,ae=999,se=998,le={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse"],setup(o,{emit:n}){const t=o,i=e.computed(()=>t.useMinWidthLayout?`min-width:${t.minWidth}px;`:""),r=e.computed(()=>t.useMinWidthLayout&&(t.fixedHeaderAndTab||t.fixedFooter)),l=ie(r),s=e.computed(()=>t.fixedHeaderAndTab?l.value:""),f=e.computed(()=>t.fixedFooter?l.value:""),a=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return{transitionDuration:g,transitionTimingFunction:I}}),d=e.computed(()=>t.mode==="vertical"),m=e.computed(()=>t.isMobile||d.value?1003:1e3),u=e.computed({get(){return t.sidebarCollapse},set(g){n("update:sidebar-collapse",g)}});function B(){u.value=!0}const _=e.computed(()=>t.isMobile&&!u.value),C=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return`background-color:${t.maskBg};transition-duration:${g}ms;transition-timing-function:${I};`}),z=e.computed(()=>{const{sidebarWidth:g,sidebarCollapsedWidth:I}=t,ce=t.isMobile?0:I,me=u.value?ce:g;return t.sidebarVisible?me:0}),k=e.computed(()=>t.isMobile?0:z.value),y=e.computed(()=>d.value?k.value:0),b=e.computed(()=>!t.isMobile&&!d.value&&t.headerVisible?t.headerHeight:0),x=e.computed(()=>{let g=0;return t.fixedHeaderAndTab&&(t.headerVisible&&(g+=t.headerHeight),t.tabVisible&&(g+=t.tabHeight)),g}),$=e.computed(()=>t.fixedFooter&&t.footerVisible?t.footerHeight:0);return(g,I)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(i.value)},[o.headerVisible?(e.openBlock(),e.createBlock(A,e.mergeProps({key:0},a.value,{fixed:o.fixedHeaderAndTab,"z-index":re,"min-width":o.minWidth,height:o.headerHeight,"padding-left":y.value,style:s.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),o.tabVisible?(e.openBlock(),e.createBlock(O,e.mergeProps({key:1},a.value,{fixed:o.fixedHeaderAndTab,"z-index":ae,"min-width":o.minWidth,top:o.headerHeight,height:o.tabHeight,"padding-left":k.value,style:s.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),o.sidebarVisible?(e.openBlock(),e.createBlock(Y,e.mergeProps({key:2},a.value,{"z-index":m.value,width:z.value,"padding-top":b.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(C.value),onClick:B},null,4)):e.createCommentVNode("",!0),e.createVNode(Z,e.mergeProps(a.value,{"padding-top":x.value,"padding-bottom":$.value,"padding-left":k.value,"overflow-hidden":o.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),o.footerVisible?(e.openBlock(),e.createBlock(R,e.mergeProps({key:4},a.value,{fixed:o.fixedFooter,"z-index":se,"min-width":o.minWidth,height:o.footerHeight,"padding-left":k.value,style:f.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},N={state:e.reactive({theme:"dark"}),getters:{theme(){return N.state.theme}},mutations:{setTheme(o){N.state.theme=o,document.documentElement.setAttribute("class",o)}},actions:{toggleTheme(){N.state.theme=N.state.theme==="dark"?"light":"dark",document.documentElement.setAttribute("class",N.state.theme)}}},de={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(o){const n=o;return N.mutations.setTheme(n.theme),(t,i)=>e.renderSlot(t.$slots,"default")}};p.DAccordion=ne,p.DBadge=W,p.DButton=X,p.DCollapse=M,p.DConfigProvider=de,p.DGlobalStore=N,p.DIcon=w,p.DIconStore=D,p.DInput=q,p.DLayoutAdmin=le,p.DLayoutContent=Z,p.DLayoutFooter=R,p.DLayoutHeader=A,p.DLayoutSidebar=Y,p.DLayoutTab=O,p.DTransferStore=L,p.DTree=P,p.DTreeItem=F,p.DTreeStore=c,p.emitter=T,p.eventsBus=H,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p.DophJs={},p.Vue))})(this,function(p,e){"use strict";const me="",pe="",ue="",ge="",w={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String},setup(o){const n=o,t=e.useSlots(),i=e.computed(()=>{const{color:d}=n;return d===void 0?null:d}),r=e.computed(()=>{const d=n.size??null;if(d!==void 0)return typeof d=="number"||/^\d+$/.test(d)?`${d}px`:d}),s=e.h("i",{class:"icon",style:{color:i.value,fontSize:r.value}},n.component?e.h(n.component):t);return(d,c)=>(e.openBlock(),e.createBlock(e.unref(s)))}},X={__name:"DButton",props:{class:String,icon:Object},emits:["click"],setup(o,{emit:n}){const t=o;let i=null;t.icon&&(i=e.h(w,{component:t.icon,color:"inherit"}));const r=s=>{n("click",s)};return(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:r,class:e.normalizeClass(["button",t.class])},[e.renderSlot(s.$slots,"default")],2)),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:r,class:e.normalizeClass(["button button-ext",t.class])},[e.createVNode(e.unref(i)),e.createElementVNode("div",null,[e.renderSlot(s.$slots,"default")])],2)):e.createCommentVNode("",!0)],64))}},he="",E=(o,n)=>{const t=o.__vccOpts||o;for(const[i,r]of n)t[i]=r;return t},G={class:"d-input"},U={class:"label"},q=["placeholder"],J=E({__name:"DInput",props:{label:String,placeholder:String,size:String,font:String,modelValue:String},emits:["update:modelValue"],setup(o,{emit:n}){const t=o,i=e.computed(()=>t.font==="small"?"d-input-small":t.font==="big"?"d-input-big":""),r=e.computed({get:()=>t.modelValue,set:s=>{n("update:modelValue",s)}});return(s,d)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",U,e.toDisplayString(t.label),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=c=>r.value=c),type:"text",class:e.normalizeClass(i.value),placeholder:t.placeholder,style:e.normalizeStyle(t.size==="wide"?"width:100%":"")},null,14,q),[[e.vModelText,r.value]])]))}},[["__scopeId","data-v-11679fd8"]]),S={state:{},getters:{getIcon(o){return S.state[o]},getIcons(){return S.state}},mutations:{addIcon(o,n){S.state.name=n},addIcons(o){for(const n in o)o.hasOwnProperty(n)&&(S.state[n]=o[n])}}},W={__name:"DBadge",props:{class:String},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",n.class])},[e.renderSlot(t.$slots,"default")],2))}},D="0px",M={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(o){const n=o,t=a=>({height:a.style.height,width:a.style.width,position:a.style.position,visibility:a.style.visibility,overflow:a.style.overflow,paddingTop:a.style.paddingTop,paddingBottom:a.style.paddingBottom,borderTopWidth:a.style.borderTopWidth,borderBottomWidth:a.style.borderBottomWidth,marginTop:a.style.marginTop,marginBottom:a.style.marginBottom}),i=(a,l)=>{const{width:m}=getComputedStyle(a);a.style.width=m,a.style.position="absolute",a.style.visibility="hidden",a.style.height="";let{height:u}=getComputedStyle(a);return a.style.width=l.width,a.style.position=l.position,a.style.visibility=l.visibility,a.style.height=D,a.style.overflow="hidden",l.height&&l.height!==D?l.height:u},r=(a,l,m,u,B)=>{const _=a.animate(u,B);a.style.height=l.height,_.onfinish=()=>{a.style.overflow=l.overflow,m()}},s=(a,l)=>[{height:D,opacity:n.opacityClosed,paddingTop:D,paddingBottom:D,borderTopWidth:D,borderBottomWidth:D,marginTop:D,marginBottom:D},{height:a,opacity:n.opacityOpened,paddingTop:l.paddingTop,paddingBottom:l.paddingBottom,borderTopWidth:l.borderTopWidth,borderBottomWidth:l.borderBottomWidth,marginTop:l.marginTop,marginBottom:l.marginBottom}],d=(a,l)=>{const m=a,u=t(m),B=i(m,u),_=s(B,u),C={duration:n.duration,easing:n.easingEnter};r(m,u,l,_,C)},c=(a,l)=>{const m=a,u=t(m),{height:B}=getComputedStyle(m);m.style.height=B,m.style.overflow="hidden";const _=s(B,u).reverse(),C={duration:n.duration,easing:n.easingLeave};r(m,u,l,_,C)};return(a,l)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:d,onLeave:c},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},L={data:void 0},V=o=>o.reduce((n,t)=>(n[t]=t)&&n,{}),h=V(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),K=V(["copy","move","link","none"]),Q=V(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),j={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:o=>o in K},effectAllowed:{validator:o=>o in Q},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(o){const n=o,t=e.useSlots(),i=e.ref(!1),r=e.computed(()=>i&&n.transferData),s=e.computed(()=>({position:"fixed",top:"-1000px"})),d=(c,a)=>{const l=a.dataTransfer;if([h.dragenter,h.dragover].includes(c)&&n.dropEffect&&(l.dropEffect=n.dropEffect),c===h.dragstart){if(n.effectAllowed&&(l.effectAllowed=n.effectAllowed),n.image||t.image){let m;n.image?(m=new Image,m.src=n.image):t.image&&(m=t.image[0].elm),l.setDragImage&&l.setDragImage(m,n.imageXOffset,n.imageYOffset)}n.transferData!==void 0&&(L.data=n.transferData,a.dataTransfer.setData("text","")),i.value=!0}};return(c,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{draggable:n.draggable,onDrag:a[0]||(a[0]=l=>d(e.unref(h).drag,l)),onDragstart:a[1]||(a[1]=e.withModifiers(l=>d(e.unref(h).dragstart,l),["stop"])),onDragenter:a[2]||(a[2]=l=>d(e.unref(h).dragenter,l)),onDragleave:a[3]||(a[3]=l=>d(e.unref(h).dragleave,l)),onDragend:a[4]||(a[4]=l=>d(e.unref(h).dragend,l))},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{transferData:r.value}),o.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(s.value)},[e.renderSlot(c.$slots,"image",{transferData:r.value})],4)):e.renderSlot(c.$slots,"image",{key:1,transferData:r.value})]),_:3},40,["draggable"]))}},be="",v={class:"item-title"},ee={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},te={key:0,class:"sub-menu"},F=E({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array,search:String},emits:["nodedrop","nodedragover","nodedragleave","nodeclick"],setup(o,{emit:n}){const t=o,i=e.ref(null),r=e.ref(!1),s=e.ref(!1),d=e.ref(!1),c=e.computed(()=>t.model.children&&t.model.children.length),a=e.computed(()=>(f.actions.isTreeExpanded(t.treeId)&&(t.model.expanded=t.model.expanded===void 0?!0:t.model.expanded),t.model.expanded)),l=k=>{n("nodeclick",{event:k,model:t.model})},m=k=>{n("nodeclick",k)},u=e.computed(()=>(f.actions.isItemSelected(t.treeId,t.model.id)?"selected":"")+(r.value?"node-over ":"")+(s.value?"node-top ":"")+(d.value?"node-bottom ":"")),B=e.computed(()=>t.search?!1:t.model.draggable===!0),_=k=>{let y=L.data;if(y.model.id===t.model.id||f.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||f.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return r.value=!1,s.value=!1,d.value=!1,!1;if(!f.state.trees[t.treeId].transfer&&y.id!==t.treeId)return!1;let b="";s.value?b="before":d.value?b="after":b="inside",f.actions.moveTreeNode(y.id,t.treeId,t.items,y.model.id,t.model.id,b),r.value=!1,s.value=!1,d.value=!1},C=k=>{let y=L.data;if(y.model.id===t.model.id||f.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||f.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return!1;const b=k.y,T=i.value.getBoundingClientRect().top,$=i.value.getBoundingClientRect().height,g=$/3;b>T&&b<=T+g?(r.value=!1,s.value=!0,d.value=!1):b<T+$&&b>=T+$-g?(r.value=!1,s.value=!1,d.value=!0):(r.value=!0,s.value=!1,d.value=!1)},z=()=>{r.value=!1,s.value=!1,d.value=!1};return(k,y)=>{const b=e.resolveComponent("d-tree-item",!0);return e.openBlock(),e.createBlock(j,{tag:"li",class:"tree-item","transfer-data":{id:t.treeId,model:t.model},draggable:B.value,onDrop:e.withModifiers(_,["stop"]),onDragenter:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(C,["prevent","stop"]),onDragleave:e.withModifiers(z,["prevent"])},{default:e.withCtx(()=>{var T,$;return[e.createElementVNode("div",{ref_key:"node",ref:i,class:e.normalizeClass(u.value),onClick:l},[e.createElementVNode("div",null,[t.model.icons&&t.model.icons.pre&&c.value&&!t.search?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:0,component:e.unref(S).getters.getIcon(t.model.icons.pre.component),size:18,color:t.model.icons.pre.color?t.model.icons.pre.color:"inherit",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.pre&&!c.value&&!t.search?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(S).getters.getIcon(t.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:2,component:e.unref(S).getters.getIcon(t.model.icons.icon.component),color:t.model.icons.icon.color?t.model.icons.icon.color:"inherit"},null,8,["component","color"])):e.createCommentVNode("",!0),e.createElementVNode("div",v,[e.createElementVNode("div",null,e.toDisplayString(e.unref(f).actions.renderTitle(t.treeId,t.model.title)),1)])]),e.createElementVNode("div",ee,[((T=t.model.badge)==null?void 0:T.value)!==void 0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(W),{key:0,class:e.normalizeClass([($=t.model.badge)==null?void 0:$.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.post&&c.value&&!t.search?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(S).getters.getIcon(t.model.icons.post.component),size:20,color:t.model.icons.post.color?t.model.icons.post.color:"inherit",class:e.normalizeClass(a.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],2),e.createVNode(M,null,{default:e.withCtx(()=>[c.value&&a.value&&!t.search?(e.openBlock(),e.createElementBlock("ul",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model.children,g=>(e.openBlock(),e.createBlock(b,{class:"tree-item",key:g.id,model:g,treeId:t.treeId,items:t.items,search:t.search,onNodeclick:m},null,8,["model","treeId","items","search"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])}}},[["__scopeId","data-v-f4157b53"]]);function H(o){return o=o||new Map,{all:o,on(n,t){const i=o.get(n);i?i.push(t):o.set(n,[t])},off(n,t){const i=o.get(n);i&&(t?i.splice(i.indexOf(t)>>>0,1):o.set(n,[]))},emit(n,t){let i=o.get(n);i&&i.slice().map(r=>{r(t)}),i=o.get("*"),i&&i.slice().map(r=>{r(n,t)})}}}const x=H(),f={state:e.reactive({trees:{}}),getters:{getItems(o){return f.state.trees[o].items},getItemsSelect(o){return f.state.trees[o].selected},getParentId(o,n,t,i="id",r="children",s={}){return t&&o&&(o.find(d=>d[i]===t?(s.found=n,d):f.getters.getParentId(d[r],d.id,t,i,r,s)),s.found)?s.found:!1}},mutations:{setTreeItems(o,n){f.state.trees[o].items=n},setItemSelect(o,n){f.state.trees[o].noSelect||(f.state.trees[o].multiSelect?f.state.trees[o].selected.includes(n.id)?f.state.trees[o].selected=f.state.trees[o].selected.filter(function(t){return t!==n.id}):f.state.trees[o].selected=[...f.state.trees[o].selected,n.id]:f.state.trees[o].selected=[n.id])}},actions:{initTreeStore(o,n,t,i,r,s){f.state.trees[o]=[],f.state.trees[o].selected=[],f.state.trees[o].noSelect=n,f.state.trees[o].multiSelect=t,f.state.trees[o].expanded=i,f.state.trees[o].transfer=r,f.state.trees[o].renderTitle=s},renderTitle(o,n){return f.state.trees[o].renderTitle?f.state.trees[o].renderTitle(n):n},isItemSelected(o,n){return f.state.trees[o].selected.includes(n)},toggleItem(o,n,t){const i=f.actions.deepSearch(n,t);i.expanded=i.expanded===void 0||!i.expanded,i.children&&i.children.length&&(i.expanded?x.emit(`expand-${o}`,{id:o,model:i}):x.emit(`collapse-${o}`,{id:o,model:i}))},isTreeExpanded(o){return f.state.trees[o].expanded},isChildOfParent(o,n,t,i){const r=f.actions.deepSearch(n,t);if(r&&r.children){for(let s=0;s<r.children.length;s++)if(r.children[s].id===i)return!0}return!1},isParentOfChild(o,n,t,i){const r=f.actions.deepSearch(n,t);return!!(r&&r.children&&f.actions.deepSearch(r.children,i))},deepSearch(o,n,t="id",i="children",r={}){return n&&o&&(o.find(s=>s[t]===n?(r.found=s,s):f.actions.deepSearch(s[i],n,t,i,r)),r.found)?r.found:!1},deepSearchByTitle(o,n,t="title",i="children",r=[]){if(n&&o&&(o.find(s=>{const d=new RegExp(n,"gi");s[t].toString().toLowerCase().match(d)!==null&&r.push(s),f.actions.deepSearchByTitle(s[i],n,t,i,r)}),r)){for(let s=0;s<r.length;s++);return r}return r},moveTreeNode(o,n,t,i,r,s){const d=f.actions.deleteTreeNode(t,i);f.actions.insertTreeNode(t,r,d,s),x.emit(`move-${n}`,{fromTreeId:o,toTreeId:n,moved:d.id,target:r,position:s})},insertTreeNode(o,n,t,i){if(o)for(let r=0;r<o.length;r++){if(o[r].id===n){let d=r;return i==="after"?(d++,o.splice(d,0,t)):i==="before"?o.splice(d,0,t):i==="inside"&&(Object.hasOwn(o[r],"children")||(o[r].children=[],o[r].opened=!0),o[r].children.splice(0,0,t)),o[r]}const s=this.insertTreeNode(o[r].children,n,t,i);if(s)return s}},deleteTreeNode(o,n){if(o)for(let t=0;t<o.length;t++){if(o[t].id===n){const r=o[t];return o.splice(t,1),r}const i=f.actions.deleteTreeNode(o[t].children,n);if(i)return i}}}},oe={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(h),setup(o,{emit:n}){let t=e.reactive({});const i=e.ref("false"),r=e.ref(null),s=new Set,d=e.computed(()=>i.value&&t),c=(a,l)=>{t=L.data,n(a,l,t),a===h.dragenter&&(s.size||l.target===r.value)&&s.add(l.target),a===h.dragleave&&s.delete(l.target),a===h.drop&&s.clear(),i.value=!!s.size};return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"el",ref:r,onDragenter:l[0]||(l[0]=m=>c(e.unref(h).dragenter,m)),onDragleave:l[1]||(l[1]=m=>c(e.unref(h).dragleave,m)),onDragover:l[2]||(l[2]=e.withModifiers(m=>c(e.unref(h).dragover,m),["prevent"])),onDrop:l[3]||(l[3]=e.withModifiers(m=>c(e.unref(h).drop,m),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{transferData:d.value})]),_:3},544))}},P={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean,renderTitle:Function,search:String},emits:["select","collapse","expand","move"],setup(o,{emit:n}){const t=o,i=e.getCurrentInstance().uid;f.actions.initTreeStore(i,t.noSelect,t.multiSelect,t.expanded,t.transfer,t.renderTitle);const r=(c,a)=>{console.log(c,a)};x.on(`select-${i}`,c=>{n("select",c)}),x.on(`expand-${i}`,c=>{n("expand",c)}),x.on(`collapse-${i}`,c=>{n("collapse",c)}),x.on(`move-${i}`,c=>{n("move",c)});const s=e.computed(()=>t.search?f.actions.deepSearchByTitle(t.items,t.search):t.items),d=(c=null)=>{f.mutations.setItemSelect(i,c.model),f.actions.toggleItem(i,t.items,c.model.id)};return(c,a)=>(e.openBlock(),e.createBlock(oe,{class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createBlock(F,{key:l.id,model:l,treeId:e.unref(i),items:t.items,search:t.search,onNodeclick:d},null,8,["model","treeId","items","search"]))),128))]),_:1},8,["onDrop"]))}},ke="",ne=E({__name:"DAccordion",props:{items:Array},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createBlock(P,{class:"accordion",items:n.items,"no-select":!0},null,8,["items"]))}},[["__scopeId","data-v-4c920528"]]),A={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:s,height:d,paddingLeft:c,transitionDuration:a,transitionTimingFunction:l}=n,m=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${s}px;`:"";return`position:${m};z-index:${r};${u}height:${d}px;padding-left:${c}px;transition-duration:${a}ms;transition-timing-function:${l};`});return(i,r)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},O={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,top:r,zIndex:s,minWidth:d,height:c,paddingLeft:a,transitionDuration:l,transitionTimingFunction:m}=n,u=i?"fixed":"static",B=n.useMinWidthLayout?`min-width: ${d}px;`:"";return`position:${u};top:${r}px;z-index:${s};${B}height:${c}px;padding-left:${a}px;transition-duration:${l}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},R={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:s,height:d,paddingLeft:c,transitionDuration:a,transitionTimingFunction:l}=n,m=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${s}px;`:"";return`position:${m};z-index:${r};${u}height:${d}px;padding-left:${c}px;transition-duration:${a}ms;transition-timing-function:${l};`});return(i,r)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Y={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(o){const n=o,t=e.computed(()=>{const{zIndex:i,width:r,paddingTop:s,transitionDuration:d,transitionTimingFunction:c}=n;return`z-index:${i};width:${r}px;padding-top:${s}px;transition-duration:${d}ms;transition-timing-function:${c};`});return(i,r)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Z={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(o){const n=o,t=e.computed(()=>{const{paddingTop:i,paddingBottom:r,paddingLeft:s,transitionDuration:d,transitionTimingFunction:c}=n,a=`overflow:${n.overflowHidden?"hidden":"visible"};`;return`padding-top:${i}px;padding-bottom:${r}px;padding-left:${s}px;${a}transition-duration:${d}ms;transition-timing-function:${c};`});return(i,r)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(t.value),class:"d-layout-content"},[e.renderSlot(i.$slots,"default")],4))}};function ie(o){const n=e.ref(0),t=e.computed(()=>`transform: translateX(${-n.value}px);`);let i=!1;function r(m){n.value=m}function s(){var m;const u=((m=document.scrollingElement)===null||m===void 0?void 0:m.scrollLeft)||0;r(u)}function d(){s()}function c(){document.addEventListener("scroll",s)}function a(){i&&document.removeEventListener("scroll",s)}function l(){d(),c(),i=!0}return e.watch(o,m=>{m?l():a()},{immediate:!0}),e.onUnmounted(()=>{a()}),t}const re=1001,ae=999,se=998,le={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse"],setup(o,{emit:n}){const t=o,i=e.computed(()=>t.useMinWidthLayout?`min-width:${t.minWidth}px;`:""),r=e.computed(()=>t.useMinWidthLayout&&(t.fixedHeaderAndTab||t.fixedFooter)),s=ie(r),d=e.computed(()=>t.fixedHeaderAndTab?s.value:""),c=e.computed(()=>t.fixedFooter?s.value:""),a=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return{transitionDuration:g,transitionTimingFunction:I}}),l=e.computed(()=>t.mode==="vertical"),m=e.computed(()=>t.isMobile||l.value?1003:1e3),u=e.computed({get(){return t.sidebarCollapse},set(g){n("update:sidebar-collapse",g)}});function B(){u.value=!0}const _=e.computed(()=>t.isMobile&&!u.value),C=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return`background-color:${t.maskBg};transition-duration:${g}ms;transition-timing-function:${I};`}),z=e.computed(()=>{const{sidebarWidth:g,sidebarCollapsedWidth:I}=t,ce=t.isMobile?0:I,fe=u.value?ce:g;return t.sidebarVisible?fe:0}),k=e.computed(()=>t.isMobile?0:z.value),y=e.computed(()=>l.value?k.value:0),b=e.computed(()=>!t.isMobile&&!l.value&&t.headerVisible?t.headerHeight:0),T=e.computed(()=>{let g=0;return t.fixedHeaderAndTab&&(t.headerVisible&&(g+=t.headerHeight),t.tabVisible&&(g+=t.tabHeight)),g}),$=e.computed(()=>t.fixedFooter&&t.footerVisible?t.footerHeight:0);return(g,I)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(i.value)},[o.headerVisible?(e.openBlock(),e.createBlock(A,e.mergeProps({key:0},a.value,{fixed:o.fixedHeaderAndTab,"z-index":re,"min-width":o.minWidth,height:o.headerHeight,"padding-left":y.value,style:d.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),o.tabVisible?(e.openBlock(),e.createBlock(O,e.mergeProps({key:1},a.value,{fixed:o.fixedHeaderAndTab,"z-index":ae,"min-width":o.minWidth,top:o.headerHeight,height:o.tabHeight,"padding-left":k.value,style:d.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),o.sidebarVisible?(e.openBlock(),e.createBlock(Y,e.mergeProps({key:2},a.value,{"z-index":m.value,width:z.value,"padding-top":b.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(C.value),onClick:B},null,4)):e.createCommentVNode("",!0),e.createVNode(Z,e.mergeProps(a.value,{"padding-top":T.value,"padding-bottom":$.value,"padding-left":k.value,"overflow-hidden":o.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),o.footerVisible?(e.openBlock(),e.createBlock(R,e.mergeProps({key:4},a.value,{fixed:o.fixedFooter,"z-index":se,"min-width":o.minWidth,height:o.footerHeight,"padding-left":k.value,style:c.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},N={state:e.reactive({theme:"dark"}),getters:{theme(){return N.state.theme}},mutations:{setTheme(o){N.state.theme=o,document.documentElement.setAttribute("class",o)}},actions:{toggleTheme(){N.state.theme=N.state.theme==="dark"?"light":"dark",document.documentElement.setAttribute("class",N.state.theme)}}},de={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(o){const n=o;return N.mutations.setTheme(n.theme),(t,i)=>e.renderSlot(t.$slots,"default")}};p.DAccordion=ne,p.DBadge=W,p.DButton=X,p.DCollapse=M,p.DConfigProvider=de,p.DGlobalStore=N,p.DIcon=w,p.DIconStore=S,p.DInput=J,p.DLayoutAdmin=le,p.DLayoutContent=Z,p.DLayoutFooter=R,p.DLayoutHeader=A,p.DLayoutSidebar=Y,p.DLayoutTab=O,p.DTransferStore=L,p.DTree=P,p.DTreeItem=F,p.DTreeStore=f,p.emitter=x,p.eventsBus=H,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.button{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-block;padding:.4rem .8rem;border-radius:5px;transition:all .2s;font-weight:400;margin:.25rem .125rem}.button.button-sm{font-size:.8em}.button.button-lg{font-size:1.3em}.button.button-ext{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;height:100%;gap:5px}.button.button-ext .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center}.label{margin-bottom:5px;font-size:.9em;opacity:.7}.d-input .d-input-small{font-size:.8em}.d-input .d-input-big{font-size:1.2em}.d-input,.d-select,.d-checkbox{margin-bottom:15px}.d-input input,select{font-size:1.1em;border-style:solid;border-width:1px;border-radius:5px;padding:5px 7px}.d-checkbox input[type=checkbox]{position:absolute;z-index:-1;opacity:0}.d-checkbox input[type=checkbox]+label{display:inline-flex;align-items:center;-webkit-user-select:none;user-select:none}.d-checkbox input[type=checkbox]+label:before{content:"";display:inline-block;width:1em;height:1em;flex-shrink:0;flex-grow:0;border-radius:.25em;margin-right:.5em;background-repeat:no-repeat;background-position:center center;background-size:50% 50%;transition:all .2s}.d-checkbox input[type=checkbox]:checked+label:before{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");background-size:10px}.icon{line-height:1em;text-align:center;display:inline-block;position:relative;fill:currentColor;transform:translateZ(0)}.icon svg{width:1em;height:1em}.accordion{-webkit-user-select:none;user-select:none}.accordion .accordion-item,.accordion .accordion-sub{cursor:pointer;padding:.25rem .125rem}.badge{display:inline-block;padding:3px 4px;margin:.25rem .125rem;border-radius:5px;line-height:1}.badge.badge-sm{font-size:.8em;padding:2px 3px}.tree{padding-left:0;-webkit-user-select:none;user-select:none;list-style:none;margin:0}.tree.accordion .tree-item ul{padding-left:0}.tree .tree-item{cursor:pointer;line-height:1.5;overflow:hidden;position:relative}.tree .tree-item>div{padding:3px 5px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-radius:5px}.tree .tree-item>div.selected{transition:all 50ms}.tree .tree-item>div>div{display:flex;flex-direction:row;justify-content:start;align-items:center;gap:3px}.tree .tree-item>div .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center;transition:all .2s}.tree .tree-item>div .tree-open-post{transform:rotate(-90deg)}.tree .tree-item>div .tree-open-pre{transform:rotate(90deg)}.tree .tree-item ul{padding-left:20px;list-style:none}.tree .item-title{display:table;table-layout:fixed;width:100%}.tree .item-title>div{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tree.tree-compact{font-size:.9em}.tree.tree-compact .tree-item{line-height:1}.tree.tree-compact .tree-item>div{padding:1px 3px}.d-layout{display:flex;flex-direction:column;width:100%;height:100%}.d-layout .d-layout-header{left:0;top:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-content{flex-grow:1;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-footer{left:0;bottom:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-sidebar{position:fixed;left:0;top:0;box-sizing:border-box;width:100%;height:100%;transition-property:all;overflow-y:hidden}.d-layout .d-layout-sidebar-mask{position:fixed;left:0;top:0;z-index:1002;width:100%;height:100%;transition-property:background-color}.d-layout .d-layout-tab{left:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.light .button{background-color:#ccc9;color:gray}.light .button:hover{color:#666;background-color:#cccc}.light .button.button-blue{background-color:#51c0e799;color:#43565c}.light .button.button-blue:hover{color:#2d3a3f;background-color:#51c0e7cc}.light .button.button-green{background-color:#90d76099;color:#4f4f4f}.light .button.button-green:hover{color:#363636;background-color:#90d760cc}.light .button.button-red{background-color:#ff929299;color:#ae4a4a}.light .button.button-red:hover{background-color:#ff9292cc;color:#8a3b3b}.light .button.button-orange{background-color:#ffc45899;color:#856a39}.light .button.button-orange:hover{background-color:#ffc458cc;color:#614e2a}.light .button.button-violet{background-color:#c2a7ff99;color:#7456b7}.light .button.button-violet:hover{background-color:#c2a7ffcc;color:#5c4199}.light .button.button-outline{outline:solid 1px rgba(204,204,204,.6);color:gray;background-color:transparent}.light .button.button-outline:hover{color:gray;background-color:#cccc}.light .button.button-outline-blue{outline:solid 1px rgba(81,192,231,.6);background-color:transparent;color:#136c8c99}.light .button.button-outline-blue:hover{color:#43565c;background-color:#51c0e7cc}.light .button.button-outline-green{outline:solid 1px rgba(144,215,96,.6);background-color:transparent;color:#467e2099}.light .button.button-outline-green:hover{color:#4f4f4f;background-color:#90d760cc}.light .button.button-outline-red{outline:solid 1px rgba(255,146,146,.6);background-color:transparent;color:#f8000099}.light .button.button-outline-red:hover{color:#ae4a4a;background-color:#ff9292cc}.light .button.button-outline-orange{outline:solid 1px rgba(255,196,88,.6);background-color:transparent;color:#be7b0099}.light .button.button-outline-orange:hover{color:#856a39;background-color:#ffc458cc}.light .button.button-outline-violet{outline:solid 1px rgba(194,167,255,.6);background-color:transparent;color:#580eff99}.light .button.button-outline-violet:hover{color:#7456b7;background-color:#c2a7ffcc}.dark .button{background-color:#ffffff1a;color:#e5e5e5}.dark .button:hover{color:#fff;background-color:#fff3}.dark .button.button-blue{background-color:#1685ac}.dark .button.button-blue:hover{background-color:#1685accc}.dark .button.button-green{background-color:#5d9d31}.dark .button.button-green:hover{background-color:#5d9d31cc}.dark .button.button-red{background-color:#c33737}.dark .button.button-red:hover{background-color:#c33737cc}.dark .button.button-orange{background-color:#d59622}.dark .button.button-orange:hover{background-color:#d59622cc}.dark .button.button-violet{background-color:#7750d2}.dark .button.button-violet:hover{background-color:#7750d2cc}.dark .button.button-outline{outline:solid 1px #555555;color:#a2a2a2;background-color:transparent}.dark .button.button-outline:hover{color:#fff;background-color:#555}.dark .button.button-outline-blue{outline:solid 1px #1685ac;background-color:transparent;color:#1ca8d9}.dark .button.button-outline-blue:hover{color:#fff;background-color:#1685ac}.dark .button.button-outline-green{outline:solid 1px #5d9d31;background-color:transparent;color:#74c33e}.dark .button.button-outline-green:hover{color:#fff;background-color:#5d9d31}.dark .button.button-outline-red{outline:solid 1px #c33737;background-color:transparent;color:#d15c5c}.dark .button.button-outline-red:hover{color:#fff;background-color:#c33737}.dark .button.button-outline-orange{outline:solid 1px #d59622;background-color:transparent;color:#e2ac48}.dark .button.button-outline-orange:hover{color:#fff;background-color:#d59622}.dark .button.button-outline-violet{outline:solid 1px #7750d2;background-color:transparent;color:#9779dc}.dark .button.button-outline-violet:hover{color:#fff;background-color:#7750d2}.badge{background-color:#ccc9;color:gray}.badge.badge-blue{background-color:#51c0e799;color:#43565c}.badge.badge-green{background-color:#90d76099;color:#4f4f4f}.badge.badge-red{background-color:#ff929299;color:#ae4a4a}.badge.badge-orange{background-color:#ffc45899;color:#856a39}.badge.badge-violet{background-color:#c2a7ff99;color:#7456b7}.badge.badge-stress-gray{color:#fff;background-color:#80808099}.badge.badge-stress-blue{color:#fff;background-color:#136c8c99}.badge.badge-stress-green{color:#fff;background-color:#467e2099}.badge.badge-stress-red{color:#fff;background-color:#f8000099}.badge.badge-stress-orange{color:#fff;background-color:#be7b0099}.badge.badge-stress-violet{color:#fff;background-color:#580eff99}.dark .badge{background-color:#555;color:#e5e5e5}.dark .badge.badge-blue{background-color:#1685ac}.dark .badge.badge-green{background-color:#5d9d31}.dark .badge.badge-red{background-color:#c33737}.dark .badge.badge-orange{background-color:#d59622}.dark .badge.badge-violet{background-color:#7750d2}.dark .badge.badge-stress-gray{color:#888;background-color:#090909}.dark .badge.badge-stress-blue{color:#41bce7;background-color:#051c24}.dark .badge.badge-stress-green{color:#90cf65;background-color:#18280d}.dark .badge.badge-stress-red{color:#dc8484;background-color:#4c1515}.dark .badge.badge-stress-orange{color:#e9c074;background-color:#51390d}.dark .badge.badge-stress-violet{color:#b6a1e7;background-color:#341c6d}.tree .tree-item>div.selected{background-color:#0000001a}.tree .tree-item>div:hover{background-color:#0000001a}.dark .tree .tree-item>div.selected{background-color:#ffffff1a}.dark .tree .tree-item>div:hover{background-color:#ffffff1a}.dark{background-color:#34383e;color:#ccc}.light{background-color:#fff;color:#333}.d-input input,.d-select select{color:#ccc;background-color:#262626;border-color:#fff3}.d-input input:focus,.d-select select:focus{outline:none!important;border-color:#fff6}.d-checkbox input[type=checkbox]+label:before{border:1px solid rgba(255,255,255,.2)}.d-checkbox input[type=checkbox]:checked+label:before{border-color:#666;background-color:#666}.d-checkbox input[type=checkbox]:not(:disabled):not(:checked)+label:hover:before{border-color:#fff6}.d-checkbox input[type=checkbox]:not(:disabled):active+label:before{background-color:#b3d7ff;border-color:#fff6}.d-checkbox input[type=checkbox]:focus:not(:checked)+label:before{border-color:#fff6}.d-checkbox input[type=checkbox]:disabled+label:before{background-color:#e9ecef}.light .icon{color:#333}.dark .icon{color:#ccc}.styled-scrollbars{scrollbar-width:thin;scrollbar-color:blue orange}.styled-scrollbars::-webkit-scrollbar{height:6px;width:6px}.styled-scrollbars::-webkit-scrollbar-track{background:orange}.styled-scrollbars::-webkit-scrollbar-thumb{background-color:#00f;border-radius:3px;border:0}.light .d-layout{background-color:#fff}.light .d-layout .d-layout-sidebar{background-color:#e5e5e5}.light .d-layout .d-layout-header,.light .d-layout .d-layout-footer{background-color:#f0f0f0}.light .d-layout .d-layout-tab{background-color:#fafafa}.dark .d-layout{background-color:#34383e}.dark .d-layout .d-layout-sidebar{background-color:#494c52}.dark .d-layout .d-layout-header,.dark .d-layout .d-layout-footer{background-color:#3e4248}.dark .d-layout .d-layout-tab{background-color:#2f3238}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:400;font-style:normal;font-size:.95rem}*[data-v-11679fd8],[data-v-11679fd8]:after,[data-v-11679fd8]:before{box-sizing:border-box}.node-top[data-v-4c84dfd5]{background:linear-gradient(0deg,rgba(0,185,255,0) 0%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)!important}.node-bottom[data-v-4c84dfd5]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 100%)!important}.node-over[data-v-4c84dfd5]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)}.tree-item>ul[data-v-4c920528]{padding-left:0!important}
|
|
1
|
+
@charset "UTF-8";.button{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-block;padding:.4rem .8rem;border-radius:5px;transition:all .2s;font-weight:400;margin:.25rem .125rem}.button.button-sm{font-size:.8em}.button.button-lg{font-size:1.3em}.button.button-ext{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;height:100%;gap:5px}.button.button-ext .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center}.label{margin-bottom:5px;font-size:.9em;opacity:.7}.d-input .d-input-small{font-size:.8em}.d-input .d-input-big{font-size:1.2em}.d-input,.d-select,.d-checkbox{margin-bottom:15px}.d-input input,select{font-size:1.1em;border-style:solid;border-width:1px;border-radius:5px;padding:5px 7px}.d-checkbox input[type=checkbox]{position:absolute;z-index:-1;opacity:0}.d-checkbox input[type=checkbox]+label{display:inline-flex;align-items:center;-webkit-user-select:none;user-select:none}.d-checkbox input[type=checkbox]+label:before{content:"";display:inline-block;width:1em;height:1em;flex-shrink:0;flex-grow:0;border-radius:.25em;margin-right:.5em;background-repeat:no-repeat;background-position:center center;background-size:50% 50%;transition:all .2s}.d-checkbox input[type=checkbox]:checked+label:before{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");background-size:10px}.icon{line-height:1em;text-align:center;display:inline-block;position:relative;fill:currentColor;transform:translateZ(0)}.icon svg{width:1em;height:1em}.accordion{-webkit-user-select:none;user-select:none}.accordion .accordion-item,.accordion .accordion-sub{cursor:pointer;padding:.25rem .125rem}.badge{display:inline-block;padding:3px 4px;margin:.25rem .125rem;border-radius:5px;line-height:1}.badge.badge-sm{font-size:.8em;padding:2px 3px}.tree{padding-left:0;-webkit-user-select:none;user-select:none;list-style:none;margin:0}.tree.accordion .tree-item ul{padding-left:0}.tree .tree-item{cursor:pointer;line-height:1.5;overflow:hidden;position:relative}.tree .tree-item>div{padding:3px 5px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-radius:5px}.tree .tree-item>div.selected{transition:all 50ms}.tree .tree-item>div>div{display:flex;flex-direction:row;justify-content:start;align-items:center;gap:3px}.tree .tree-item>div .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center;transition:all .2s}.tree .tree-item>div .tree-open-post{transform:rotate(-90deg)}.tree .tree-item>div .tree-open-pre{transform:rotate(90deg)}.tree .tree-item ul{padding-left:20px;list-style:none}.tree .item-title{display:table;table-layout:fixed;width:100%}.tree .item-title>div{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tree.tree-compact{font-size:.9em}.tree.tree-compact .tree-item{line-height:1}.tree.tree-compact .tree-item>div{padding:1px 3px}.d-layout{display:flex;flex-direction:column;width:100%;height:100%}.d-layout .d-layout-header{left:0;top:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-content{flex-grow:1;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-footer{left:0;bottom:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-sidebar{position:fixed;left:0;top:0;box-sizing:border-box;width:100%;height:100%;transition-property:all;overflow-y:hidden}.d-layout .d-layout-sidebar-mask{position:fixed;left:0;top:0;z-index:1002;width:100%;height:100%;transition-property:background-color}.d-layout .d-layout-tab{left:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.light .button{background-color:#ccc9;color:gray}.light .button:hover{color:#666;background-color:#cccc}.light .button.button-blue{background-color:#51c0e799;color:#43565c}.light .button.button-blue:hover{color:#2d3a3f;background-color:#51c0e7cc}.light .button.button-green{background-color:#90d76099;color:#4f4f4f}.light .button.button-green:hover{color:#363636;background-color:#90d760cc}.light .button.button-red{background-color:#ff929299;color:#ae4a4a}.light .button.button-red:hover{background-color:#ff9292cc;color:#8a3b3b}.light .button.button-orange{background-color:#ffc45899;color:#856a39}.light .button.button-orange:hover{background-color:#ffc458cc;color:#614e2a}.light .button.button-violet{background-color:#c2a7ff99;color:#7456b7}.light .button.button-violet:hover{background-color:#c2a7ffcc;color:#5c4199}.light .button.button-outline{outline:solid 1px rgba(204,204,204,.6);color:gray;background-color:transparent}.light .button.button-outline:hover{color:gray;background-color:#cccc}.light .button.button-outline-blue{outline:solid 1px rgba(81,192,231,.6);background-color:transparent;color:#136c8c99}.light .button.button-outline-blue:hover{color:#43565c;background-color:#51c0e7cc}.light .button.button-outline-green{outline:solid 1px rgba(144,215,96,.6);background-color:transparent;color:#467e2099}.light .button.button-outline-green:hover{color:#4f4f4f;background-color:#90d760cc}.light .button.button-outline-red{outline:solid 1px rgba(255,146,146,.6);background-color:transparent;color:#f8000099}.light .button.button-outline-red:hover{color:#ae4a4a;background-color:#ff9292cc}.light .button.button-outline-orange{outline:solid 1px rgba(255,196,88,.6);background-color:transparent;color:#be7b0099}.light .button.button-outline-orange:hover{color:#856a39;background-color:#ffc458cc}.light .button.button-outline-violet{outline:solid 1px rgba(194,167,255,.6);background-color:transparent;color:#580eff99}.light .button.button-outline-violet:hover{color:#7456b7;background-color:#c2a7ffcc}.dark .button{background-color:#ffffff1a;color:#e5e5e5}.dark .button:hover{color:#fff;background-color:#fff3}.dark .button.button-blue{background-color:#1685ac}.dark .button.button-blue:hover{background-color:#1685accc}.dark .button.button-green{background-color:#5d9d31}.dark .button.button-green:hover{background-color:#5d9d31cc}.dark .button.button-red{background-color:#c33737}.dark .button.button-red:hover{background-color:#c33737cc}.dark .button.button-orange{background-color:#d59622}.dark .button.button-orange:hover{background-color:#d59622cc}.dark .button.button-violet{background-color:#7750d2}.dark .button.button-violet:hover{background-color:#7750d2cc}.dark .button.button-outline{outline:solid 1px #555555;color:#a2a2a2;background-color:transparent}.dark .button.button-outline:hover{color:#fff;background-color:#555}.dark .button.button-outline-blue{outline:solid 1px #1685ac;background-color:transparent;color:#1ca8d9}.dark .button.button-outline-blue:hover{color:#fff;background-color:#1685ac}.dark .button.button-outline-green{outline:solid 1px #5d9d31;background-color:transparent;color:#74c33e}.dark .button.button-outline-green:hover{color:#fff;background-color:#5d9d31}.dark .button.button-outline-red{outline:solid 1px #c33737;background-color:transparent;color:#d15c5c}.dark .button.button-outline-red:hover{color:#fff;background-color:#c33737}.dark .button.button-outline-orange{outline:solid 1px #d59622;background-color:transparent;color:#e2ac48}.dark .button.button-outline-orange:hover{color:#fff;background-color:#d59622}.dark .button.button-outline-violet{outline:solid 1px #7750d2;background-color:transparent;color:#9779dc}.dark .button.button-outline-violet:hover{color:#fff;background-color:#7750d2}.badge{background-color:#ccc9;color:gray}.badge.badge-blue{background-color:#51c0e799;color:#43565c}.badge.badge-green{background-color:#90d76099;color:#4f4f4f}.badge.badge-red{background-color:#ff929299;color:#ae4a4a}.badge.badge-orange{background-color:#ffc45899;color:#856a39}.badge.badge-violet{background-color:#c2a7ff99;color:#7456b7}.badge.badge-stress-gray{color:#fff;background-color:#80808099}.badge.badge-stress-blue{color:#fff;background-color:#136c8c99}.badge.badge-stress-green{color:#fff;background-color:#467e2099}.badge.badge-stress-red{color:#fff;background-color:#f8000099}.badge.badge-stress-orange{color:#fff;background-color:#be7b0099}.badge.badge-stress-violet{color:#fff;background-color:#580eff99}.dark .badge{background-color:#555;color:#e5e5e5}.dark .badge.badge-blue{background-color:#1685ac}.dark .badge.badge-green{background-color:#5d9d31}.dark .badge.badge-red{background-color:#c33737}.dark .badge.badge-orange{background-color:#d59622}.dark .badge.badge-violet{background-color:#7750d2}.dark .badge.badge-stress-gray{color:#888;background-color:#090909}.dark .badge.badge-stress-blue{color:#41bce7;background-color:#051c24}.dark .badge.badge-stress-green{color:#90cf65;background-color:#18280d}.dark .badge.badge-stress-red{color:#dc8484;background-color:#4c1515}.dark .badge.badge-stress-orange{color:#e9c074;background-color:#51390d}.dark .badge.badge-stress-violet{color:#b6a1e7;background-color:#341c6d}.tree .tree-item>div.selected{background-color:#0000001a}.tree .tree-item>div:hover{background-color:#0000001a}.dark .tree .tree-item>div.selected{background-color:#ffffff1a}.dark .tree .tree-item>div:hover{background-color:#ffffff1a}.dark{background-color:#34383e;color:#ccc}.light{background-color:#fff;color:#333}.d-input input,.d-select select{color:#ccc;background-color:#262626;border-color:#fff3}.d-input input:focus,.d-select select:focus{outline:none!important;border-color:#fff6}.d-checkbox input[type=checkbox]+label:before{border:1px solid rgba(255,255,255,.2)}.d-checkbox input[type=checkbox]:checked+label:before{border-color:#666;background-color:#666}.d-checkbox input[type=checkbox]:not(:disabled):not(:checked)+label:hover:before{border-color:#fff6}.d-checkbox input[type=checkbox]:not(:disabled):active+label:before{background-color:#b3d7ff;border-color:#fff6}.d-checkbox input[type=checkbox]:focus:not(:checked)+label:before{border-color:#fff6}.d-checkbox input[type=checkbox]:disabled+label:before{background-color:#e9ecef}.light .icon{color:#333}.dark .icon{color:#ccc}.styled-scrollbars{scrollbar-width:thin;scrollbar-color:blue orange}.styled-scrollbars::-webkit-scrollbar{height:6px;width:6px}.styled-scrollbars::-webkit-scrollbar-track{background:orange}.styled-scrollbars::-webkit-scrollbar-thumb{background-color:#00f;border-radius:3px;border:0}.light .d-layout{background-color:#fff}.light .d-layout .d-layout-sidebar{background-color:#e5e5e5}.light .d-layout .d-layout-header,.light .d-layout .d-layout-footer{background-color:#f0f0f0}.light .d-layout .d-layout-tab{background-color:#fafafa}.dark .d-layout{background-color:#34383e}.dark .d-layout .d-layout-sidebar{background-color:#494c52}.dark .d-layout .d-layout-header,.dark .d-layout .d-layout-footer{background-color:#3e4248}.dark .d-layout .d-layout-tab{background-color:#2f3238}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:400;font-style:normal;font-size:.95rem}*[data-v-11679fd8],[data-v-11679fd8]:after,[data-v-11679fd8]:before{box-sizing:border-box}.node-top[data-v-f4157b53]{background:linear-gradient(0deg,rgba(0,185,255,0) 0%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)!important}.node-bottom[data-v-f4157b53]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 100%)!important}.node-over[data-v-f4157b53]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)}.tree-item>ul[data-v-4c920528]{padding-left:0!important}
|