doph-js 0.0.57 → 0.0.59
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 +378 -327
- 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 de, computed as p, h as pe, openBlock as h, createBlock as w, unref as E, createElementBlock as D, Fragment as J, normalizeClass as
|
|
1
|
+
import { useSlots as de, computed as p, h as pe, openBlock as h, createBlock as w, unref as E, createElementBlock as D, Fragment as J, normalizeClass as k, renderSlot as _, createCommentVNode as N, resolveDynamicComponent as R, createElementVNode as P, toDisplayString as le, withDirectives as se, normalizeStyle as C, vModelText as Ee, Transition as ze, withCtx as H, ref as V, withModifiers as W, resolveComponent as Le, createTextVNode as Ne, createVNode as ue, renderList as ce, reactive as ae, getCurrentInstance as Be, watch as K, onUnmounted as ee, mergeProps as Y, defineComponent as Te, shallowRef as A, setBlockTracking as he, vShow as ge, onMounted as ke, watchEffect as He } from "vue";
|
|
2
2
|
const Z = {
|
|
3
3
|
__name: "DIcon",
|
|
4
4
|
props: {
|
|
@@ -18,7 +18,7 @@ const Z = {
|
|
|
18
18
|
const s = n.size ?? null;
|
|
19
19
|
if (s !== void 0)
|
|
20
20
|
return typeof s == "number" || /^\d+$/.test(s) ? `${s}px` : s;
|
|
21
|
-
}),
|
|
21
|
+
}), r = p(() => pe(
|
|
22
22
|
"i",
|
|
23
23
|
{
|
|
24
24
|
class: i.value,
|
|
@@ -29,7 +29,7 @@ const Z = {
|
|
|
29
29
|
},
|
|
30
30
|
n.component ? pe(n.component) : e
|
|
31
31
|
));
|
|
32
|
-
return (s,
|
|
32
|
+
return (s, a) => (h(), w(E(r)));
|
|
33
33
|
}
|
|
34
34
|
}, F = {
|
|
35
35
|
state: {},
|
|
@@ -50,7 +50,7 @@ const Z = {
|
|
|
50
50
|
t.hasOwnProperty(n) && (F.state[n] = t[n]);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
},
|
|
53
|
+
}, Me = { key: 1 }, tn = {
|
|
54
54
|
__name: "DButton",
|
|
55
55
|
props: {
|
|
56
56
|
class: String,
|
|
@@ -58,29 +58,29 @@ const Z = {
|
|
|
58
58
|
},
|
|
59
59
|
emits: ["click"],
|
|
60
60
|
setup(t, { emit: n }) {
|
|
61
|
-
const e = t, i = de(), o = p(() => e.icon ? F.getters.getIcon(e.icon) : null), l = (
|
|
62
|
-
n("click",
|
|
61
|
+
const e = t, i = de(), o = p(() => e.icon ? F.getters.getIcon(e.icon) : null), l = (r) => {
|
|
62
|
+
n("click", r);
|
|
63
63
|
};
|
|
64
|
-
return (
|
|
64
|
+
return (r, s) => (h(), D(J, null, [
|
|
65
65
|
o.value ? N("", !0) : (h(), D("div", {
|
|
66
66
|
key: 0,
|
|
67
67
|
onClick: l,
|
|
68
|
-
class:
|
|
68
|
+
class: k(["button", e.class])
|
|
69
69
|
}, [
|
|
70
|
-
|
|
70
|
+
_(r.$slots, "default")
|
|
71
71
|
], 2)),
|
|
72
72
|
o.value ? (h(), D("div", {
|
|
73
73
|
key: 1,
|
|
74
74
|
onClick: l,
|
|
75
|
-
class:
|
|
75
|
+
class: k(["button button-ext", e.class])
|
|
76
76
|
}, [
|
|
77
77
|
e.icon ? (h(), w(R(Z), {
|
|
78
78
|
key: 0,
|
|
79
79
|
component: o.value,
|
|
80
80
|
color: "inherit"
|
|
81
81
|
}, null, 8, ["component"])) : N("", !0),
|
|
82
|
-
E(i).default ? (h(), D("div",
|
|
83
|
-
|
|
82
|
+
E(i).default ? (h(), D("div", Me, [
|
|
83
|
+
_(r.$slots, "default")
|
|
84
84
|
])) : N("", !0)
|
|
85
85
|
], 2)) : N("", !0)
|
|
86
86
|
], 64));
|
|
@@ -91,7 +91,7 @@ const fe = (t, n) => {
|
|
|
91
91
|
for (const [i, o] of n)
|
|
92
92
|
e[i] = o;
|
|
93
93
|
return e;
|
|
94
|
-
},
|
|
94
|
+
}, Ce = { class: "d-input" }, Pe = { class: "label" }, Oe = ["placeholder"], We = {
|
|
95
95
|
__name: "DInput",
|
|
96
96
|
props: {
|
|
97
97
|
label: String,
|
|
@@ -109,20 +109,20 @@ const fe = (t, n) => {
|
|
|
109
109
|
n("update:modelValue", l);
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
|
-
return (l,
|
|
113
|
-
|
|
114
|
-
se(
|
|
115
|
-
"onUpdate:modelValue":
|
|
112
|
+
return (l, r) => (h(), D("div", Ce, [
|
|
113
|
+
P("div", Pe, le(e.label), 1),
|
|
114
|
+
se(P("input", {
|
|
115
|
+
"onUpdate:modelValue": r[0] || (r[0] = (s) => o.value = s),
|
|
116
116
|
type: "text",
|
|
117
|
-
class:
|
|
117
|
+
class: k(i.value),
|
|
118
118
|
placeholder: e.placeholder,
|
|
119
|
-
style:
|
|
120
|
-
}, null, 14,
|
|
119
|
+
style: C(e.size === "wide" ? "width:100%" : "")
|
|
120
|
+
}, null, 14, Oe), [
|
|
121
121
|
[Ee, o.value]
|
|
122
122
|
])
|
|
123
123
|
]));
|
|
124
124
|
}
|
|
125
|
-
}, nn = /* @__PURE__ */ fe(
|
|
125
|
+
}, nn = /* @__PURE__ */ fe(We, [["__scopeId", "data-v-11679fd8"]]), Ae = {
|
|
126
126
|
__name: "DBadge",
|
|
127
127
|
props: {
|
|
128
128
|
class: String
|
|
@@ -130,12 +130,12 @@ const fe = (t, n) => {
|
|
|
130
130
|
setup(t) {
|
|
131
131
|
const n = t;
|
|
132
132
|
return (e, i) => (h(), D("div", {
|
|
133
|
-
class:
|
|
133
|
+
class: k(["badge", n.class])
|
|
134
134
|
}, [
|
|
135
|
-
|
|
135
|
+
_(e.$slots, "default")
|
|
136
136
|
], 2));
|
|
137
137
|
}
|
|
138
|
-
},
|
|
138
|
+
}, O = "0px", Fe = {
|
|
139
139
|
__name: "DCollapse",
|
|
140
140
|
props: {
|
|
141
141
|
duration: {
|
|
@@ -160,41 +160,41 @@ const fe = (t, n) => {
|
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
162
|
setup(t) {
|
|
163
|
-
const n = t, e = (
|
|
164
|
-
height:
|
|
165
|
-
width:
|
|
166
|
-
position:
|
|
167
|
-
visibility:
|
|
168
|
-
overflow:
|
|
169
|
-
paddingTop:
|
|
170
|
-
paddingBottom:
|
|
171
|
-
borderTopWidth:
|
|
172
|
-
borderBottomWidth:
|
|
173
|
-
marginTop:
|
|
174
|
-
marginBottom:
|
|
175
|
-
}), i = (
|
|
176
|
-
const { width: u } = getComputedStyle(
|
|
177
|
-
|
|
178
|
-
let { height: m } = getComputedStyle(
|
|
179
|
-
return
|
|
180
|
-
}, o = (
|
|
181
|
-
const I =
|
|
182
|
-
|
|
183
|
-
|
|
163
|
+
const n = t, e = (a) => ({
|
|
164
|
+
height: a.style.height,
|
|
165
|
+
width: a.style.width,
|
|
166
|
+
position: a.style.position,
|
|
167
|
+
visibility: a.style.visibility,
|
|
168
|
+
overflow: a.style.overflow,
|
|
169
|
+
paddingTop: a.style.paddingTop,
|
|
170
|
+
paddingBottom: a.style.paddingBottom,
|
|
171
|
+
borderTopWidth: a.style.borderTopWidth,
|
|
172
|
+
borderBottomWidth: a.style.borderBottomWidth,
|
|
173
|
+
marginTop: a.style.marginTop,
|
|
174
|
+
marginBottom: a.style.marginBottom
|
|
175
|
+
}), i = (a, d) => {
|
|
176
|
+
const { width: u } = getComputedStyle(a);
|
|
177
|
+
a.style.width = u, a.style.position = "absolute", a.style.visibility = "hidden", a.style.height = "";
|
|
178
|
+
let { height: m } = getComputedStyle(a);
|
|
179
|
+
return a.style.width = d.width, a.style.position = d.position, a.style.visibility = d.visibility, a.style.height = O, a.style.overflow = "hidden", d.height && d.height !== O ? d.height : m;
|
|
180
|
+
}, o = (a, d, u, m, y) => {
|
|
181
|
+
const I = a.animate(m, y);
|
|
182
|
+
a.style.height = d.height, I.onfinish = () => {
|
|
183
|
+
a.style.overflow = d.overflow, u();
|
|
184
184
|
};
|
|
185
|
-
}, l = (
|
|
185
|
+
}, l = (a, d) => [
|
|
186
186
|
{
|
|
187
|
-
height:
|
|
187
|
+
height: O,
|
|
188
188
|
opacity: n.opacityClosed,
|
|
189
|
-
paddingTop:
|
|
190
|
-
paddingBottom:
|
|
191
|
-
borderTopWidth:
|
|
192
|
-
borderBottomWidth:
|
|
193
|
-
marginTop:
|
|
194
|
-
marginBottom:
|
|
189
|
+
paddingTop: O,
|
|
190
|
+
paddingBottom: O,
|
|
191
|
+
borderTopWidth: O,
|
|
192
|
+
borderBottomWidth: O,
|
|
193
|
+
marginTop: O,
|
|
194
|
+
marginBottom: O
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
|
-
height:
|
|
197
|
+
height: a,
|
|
198
198
|
opacity: n.opacityOpened,
|
|
199
199
|
paddingTop: d.paddingTop,
|
|
200
200
|
paddingBottom: d.paddingBottom,
|
|
@@ -203,29 +203,29 @@ const fe = (t, n) => {
|
|
|
203
203
|
marginTop: d.marginTop,
|
|
204
204
|
marginBottom: d.marginBottom
|
|
205
205
|
}
|
|
206
|
-
],
|
|
207
|
-
const u =
|
|
208
|
-
o(u, m, d, I,
|
|
209
|
-
}, s = (
|
|
210
|
-
const u =
|
|
206
|
+
], r = (a, d) => {
|
|
207
|
+
const u = a, m = e(u), y = i(u, m), I = l(y, m), B = { duration: n.duration, easing: n.easingEnter };
|
|
208
|
+
o(u, m, d, I, B);
|
|
209
|
+
}, s = (a, d) => {
|
|
210
|
+
const u = a, m = e(u), { height: y } = getComputedStyle(u);
|
|
211
211
|
u.style.height = y, u.style.overflow = "hidden";
|
|
212
|
-
const I = l(y, m).reverse(),
|
|
213
|
-
o(u, m, d, I,
|
|
212
|
+
const I = l(y, m).reverse(), B = { duration: n.duration, easing: n.easingLeave };
|
|
213
|
+
o(u, m, d, I, B);
|
|
214
214
|
};
|
|
215
|
-
return (
|
|
215
|
+
return (a, d) => (h(), w(ze, {
|
|
216
216
|
css: !1,
|
|
217
|
-
onEnter:
|
|
217
|
+
onEnter: r,
|
|
218
218
|
onLeave: s
|
|
219
219
|
}, {
|
|
220
|
-
default:
|
|
221
|
-
|
|
220
|
+
default: H(() => [
|
|
221
|
+
_(a.$slots, "default")
|
|
222
222
|
]),
|
|
223
223
|
_: 3
|
|
224
224
|
}));
|
|
225
225
|
}
|
|
226
226
|
}, te = {
|
|
227
227
|
data: void 0
|
|
228
|
-
}, me = (t) => t.reduce((n, e) => (n[e] = e) && n, {}),
|
|
228
|
+
}, me = (t) => t.reduce((n, e) => (n[e] = e) && n, {}), L = me([
|
|
229
229
|
"drag",
|
|
230
230
|
"dragend",
|
|
231
231
|
"dragenter",
|
|
@@ -257,32 +257,32 @@ const fe = (t, n) => {
|
|
|
257
257
|
tag: { type: String, default: "div" }
|
|
258
258
|
},
|
|
259
259
|
setup(t) {
|
|
260
|
-
const n = t, e = de(), i = V(!1), o = p(() => i && n.transferData), l = p(() => ({ position: "fixed", top: "-1000px" })),
|
|
261
|
-
const d =
|
|
262
|
-
if ([
|
|
260
|
+
const n = t, e = de(), i = V(!1), o = p(() => i && n.transferData), l = p(() => ({ position: "fixed", top: "-1000px" })), r = (s, a) => {
|
|
261
|
+
const d = a.dataTransfer;
|
|
262
|
+
if ([L.dragenter, L.dragover].includes(s) && n.dropEffect && (d.dropEffect = n.dropEffect), s === L.dragstart) {
|
|
263
263
|
if (n.effectAllowed && (d.effectAllowed = n.effectAllowed), n.image || e.image) {
|
|
264
264
|
let u;
|
|
265
265
|
n.image ? (u = new Image(), u.src = n.image) : e.image && (u = e.image[0].elm), d.setDragImage && d.setDragImage(u, n.imageXOffset, n.imageYOffset);
|
|
266
266
|
}
|
|
267
|
-
n.transferData !== void 0 && (te.data = n.transferData,
|
|
267
|
+
n.transferData !== void 0 && (te.data = n.transferData, a.dataTransfer.setData("text", "")), i.value = !0;
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
return (s,
|
|
270
|
+
return (s, a) => (h(), w(R(t.tag), {
|
|
271
271
|
draggable: n.draggable,
|
|
272
|
-
onDrag:
|
|
273
|
-
onDragstart:
|
|
274
|
-
onDragenter:
|
|
275
|
-
onDragleave:
|
|
276
|
-
onDragend:
|
|
272
|
+
onDrag: a[0] || (a[0] = (d) => r(E(L).drag, d)),
|
|
273
|
+
onDragstart: a[1] || (a[1] = W((d) => r(E(L).dragstart, d), ["stop"])),
|
|
274
|
+
onDragenter: a[2] || (a[2] = (d) => r(E(L).dragenter, d)),
|
|
275
|
+
onDragleave: a[3] || (a[3] = (d) => r(E(L).dragleave, d)),
|
|
276
|
+
onDragend: a[4] || (a[4] = (d) => r(E(L).dragend, d))
|
|
277
277
|
}, {
|
|
278
|
-
default:
|
|
279
|
-
|
|
278
|
+
default: H(() => [
|
|
279
|
+
_(s.$slots, "default", { transferData: o.value }),
|
|
280
280
|
t.hideImageHtml ? (h(), D("div", {
|
|
281
281
|
key: 0,
|
|
282
|
-
style:
|
|
282
|
+
style: C(l.value)
|
|
283
283
|
}, [
|
|
284
|
-
|
|
285
|
-
], 4)) :
|
|
284
|
+
_(s.$slots, "image", { transferData: o.value })
|
|
285
|
+
], 4)) : _(s.$slots, "image", {
|
|
286
286
|
key: 1,
|
|
287
287
|
transferData: o.value
|
|
288
288
|
})
|
|
@@ -304,63 +304,63 @@ const Xe = { class: "item-title" }, Ye = { style: { display: "flex", "flex-direc
|
|
|
304
304
|
},
|
|
305
305
|
emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick"],
|
|
306
306
|
setup(t, { emit: n }) {
|
|
307
|
-
const e = t, i = V(null), o = V(!1), l = V(!1),
|
|
308
|
-
n("nodeclick", { event:
|
|
309
|
-
}, u = (
|
|
310
|
-
n("nodeclick",
|
|
311
|
-
}, m = p(() => (f.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (o.value ? "node-over " : "") + (l.value ? "node-top " : "") + (
|
|
307
|
+
const e = t, i = V(null), o = V(!1), l = V(!1), r = V(!1), s = p(() => e.model.children && e.model.children.length), a = p(() => (f.actions.isTreeExpanded(e.treeId) && (e.model.expanded = e.model.expanded === void 0 ? !0 : e.model.expanded), e.model.expanded)), d = (x) => {
|
|
308
|
+
n("nodeclick", { event: x, model: e.model });
|
|
309
|
+
}, u = (x) => {
|
|
310
|
+
n("nodeclick", x);
|
|
311
|
+
}, m = p(() => (f.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (o.value ? "node-over " : "") + (l.value ? "node-top " : "") + (r.value ? "node-bottom " : "")), y = p(() => e.search ? !1 : e.model.draggable === !0), I = (x) => {
|
|
312
312
|
let b = te.data;
|
|
313
313
|
if (b.model.id === e.model.id || f.actions.isChildOfParent(e.treeId, e.items, e.model.id, b.model.id) || f.actions.isParentOfChild(e.treeId, e.items, b.model.id, e.model.id))
|
|
314
|
-
return o.value = !1, l.value = !1,
|
|
314
|
+
return o.value = !1, l.value = !1, r.value = !1, !1;
|
|
315
315
|
if (!f.state.trees[e.treeId].transfer && b.id !== e.treeId)
|
|
316
316
|
return !1;
|
|
317
|
-
let
|
|
318
|
-
l.value ?
|
|
319
|
-
},
|
|
317
|
+
let $ = "";
|
|
318
|
+
l.value ? $ = "before" : r.value ? $ = "after" : $ = "inside", f.actions.moveTreeNode(b.id, e.treeId, e.items, b.model.id, e.model.id, $), o.value = !1, l.value = !1, r.value = !1;
|
|
319
|
+
}, B = (x) => {
|
|
320
320
|
let b = te.data;
|
|
321
321
|
if (b.model.id === e.model.id || f.actions.isChildOfParent(e.treeId, e.items, e.model.id, b.model.id) || f.actions.isParentOfChild(e.treeId, e.items, b.model.id, e.model.id))
|
|
322
322
|
return !1;
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
},
|
|
326
|
-
o.value = !1, l.value = !1,
|
|
323
|
+
const $ = x.y, z = i.value.getBoundingClientRect().top, S = i.value.getBoundingClientRect().height, g = S / 3;
|
|
324
|
+
$ > z && $ <= z + g ? (o.value = !1, l.value = !0, r.value = !1) : $ < z + S && $ >= z + S - g ? (o.value = !1, l.value = !1, r.value = !0) : (o.value = !0, l.value = !1, r.value = !1);
|
|
325
|
+
}, M = () => {
|
|
326
|
+
o.value = !1, l.value = !1, r.value = !1;
|
|
327
327
|
};
|
|
328
|
-
return (
|
|
329
|
-
const
|
|
328
|
+
return (x, b) => {
|
|
329
|
+
const $ = Le("d-tree-item", !0);
|
|
330
330
|
return h(), w(je, {
|
|
331
331
|
tag: "li",
|
|
332
332
|
class: "tree-item",
|
|
333
333
|
"transfer-data": { id: e.treeId, model: e.model },
|
|
334
334
|
draggable: y.value,
|
|
335
|
-
onDrop:
|
|
336
|
-
onDragenter: b[0] || (b[0] =
|
|
335
|
+
onDrop: W(I, ["stop"]),
|
|
336
|
+
onDragenter: b[0] || (b[0] = W(() => {
|
|
337
337
|
}, ["prevent"])),
|
|
338
|
-
onDragover:
|
|
339
|
-
onDragleave:
|
|
338
|
+
onDragover: W(B, ["prevent", "stop"]),
|
|
339
|
+
onDragleave: W(M, ["prevent"])
|
|
340
340
|
}, {
|
|
341
|
-
default:
|
|
342
|
-
var
|
|
341
|
+
default: H(() => {
|
|
342
|
+
var z, S;
|
|
343
343
|
return [
|
|
344
|
-
|
|
344
|
+
P("div", {
|
|
345
345
|
ref_key: "node",
|
|
346
346
|
ref: i,
|
|
347
|
-
class:
|
|
347
|
+
class: k(m.value),
|
|
348
348
|
onClick: d
|
|
349
349
|
}, [
|
|
350
|
-
|
|
350
|
+
P("div", null, [
|
|
351
351
|
e.model.icons && e.model.icons.pre && s.value && !e.search ? (h(), w(R(Z), {
|
|
352
352
|
key: 0,
|
|
353
353
|
component: E(F).getters.getIcon(e.model.icons.pre.component),
|
|
354
354
|
size: 18,
|
|
355
355
|
color: e.model.icons.pre.color ? e.model.icons.pre.color : "inherit",
|
|
356
|
-
class:
|
|
356
|
+
class: k(a.value ? "tree-open-pre" : "")
|
|
357
357
|
}, null, 8, ["component", "color", "class"])) : N("", !0),
|
|
358
358
|
e.model.icons && e.model.icons.pre && !s.value && !e.search ? (h(), w(R(Z), {
|
|
359
359
|
key: 1,
|
|
360
360
|
component: E(F).getters.getIcon(e.model.icons.pre.component),
|
|
361
361
|
size: 18,
|
|
362
362
|
color: "rgba(0,0,0,0)",
|
|
363
|
-
class:
|
|
363
|
+
class: k(a.value ? "tree-open-pre" : "")
|
|
364
364
|
}, null, 8, ["component", "class"])) : N("", !0),
|
|
365
365
|
e.model.icons && e.model.icons.icon ? (h(), w(R(Z), {
|
|
366
366
|
key: 2,
|
|
@@ -369,16 +369,16 @@ const Xe = { class: "item-title" }, Ye = { style: { display: "flex", "flex-direc
|
|
|
369
369
|
size: e.model.icons.icon.size ? e.model.icons.icon.size : null,
|
|
370
370
|
className: e.model.icons.icon.class ? e.model.icons.icon.class : null
|
|
371
371
|
}, null, 8, ["component", "color", "size", "className"])) : N("", !0),
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
P("div", Xe, [
|
|
373
|
+
P("div", null, le(E(f).actions.renderTitle(e.treeId, e.model.title)), 1)
|
|
374
374
|
])
|
|
375
375
|
]),
|
|
376
|
-
|
|
377
|
-
((
|
|
376
|
+
P("div", Ye, [
|
|
377
|
+
((z = e.model.badge) == null ? void 0 : z.value) !== void 0 ? (h(), w(R(Ae), {
|
|
378
378
|
key: 0,
|
|
379
|
-
class:
|
|
379
|
+
class: k([(S = e.model.badge) == null ? void 0 : S.class, "badge-sm"])
|
|
380
380
|
}, {
|
|
381
|
-
default:
|
|
381
|
+
default: H(() => [
|
|
382
382
|
Ne(le(e.model.badge.value), 1)
|
|
383
383
|
]),
|
|
384
384
|
_: 1
|
|
@@ -388,14 +388,14 @@ const Xe = { class: "item-title" }, Ye = { style: { display: "flex", "flex-direc
|
|
|
388
388
|
component: E(F).getters.getIcon(e.model.icons.post.component),
|
|
389
389
|
size: 20,
|
|
390
390
|
color: e.model.icons.post.color ? e.model.icons.post.color : "inherit",
|
|
391
|
-
class:
|
|
391
|
+
class: k(a.value ? "tree-open-post" : "")
|
|
392
392
|
}, null, 8, ["component", "color", "class"])) : N("", !0)
|
|
393
393
|
])
|
|
394
394
|
], 2),
|
|
395
395
|
ue(Fe, null, {
|
|
396
|
-
default:
|
|
397
|
-
s.value &&
|
|
398
|
-
(h(!0), D(J, null, ce(t.model.children, (g) => (h(), w(
|
|
396
|
+
default: H(() => [
|
|
397
|
+
s.value && a.value && !e.search ? (h(), D("ul", Ue, [
|
|
398
|
+
(h(!0), D(J, null, ce(t.model.children, (g) => (h(), w($, {
|
|
399
399
|
class: "tree-item",
|
|
400
400
|
key: g.id,
|
|
401
401
|
model: g,
|
|
@@ -463,7 +463,7 @@ function Ke(t) {
|
|
|
463
463
|
};
|
|
464
464
|
}
|
|
465
465
|
const j = Ke(), f = {
|
|
466
|
-
state:
|
|
466
|
+
state: ae({
|
|
467
467
|
trees: {}
|
|
468
468
|
}),
|
|
469
469
|
getters: {
|
|
@@ -475,7 +475,7 @@ const j = Ke(), f = {
|
|
|
475
475
|
},
|
|
476
476
|
// data - ноды, dataId - ID ноды родителя data
|
|
477
477
|
getParentId(t, n, e, i = "id", o = "children", l = {}) {
|
|
478
|
-
return e && t && (t.find((
|
|
478
|
+
return e && t && (t.find((r) => r[i] === e ? (l.found = n, r) : f.getters.getParentId(r[o], r.id, e, i, o, l)), l.found) ? l.found : !1;
|
|
479
479
|
}
|
|
480
480
|
},
|
|
481
481
|
mutations: {
|
|
@@ -524,8 +524,8 @@ const j = Ke(), f = {
|
|
|
524
524
|
},
|
|
525
525
|
deepSearchByTitle(t, n, e = "title", i = "children", o = []) {
|
|
526
526
|
if (n && t && (t.find((l) => {
|
|
527
|
-
const
|
|
528
|
-
l[e].toString().toLowerCase().match(
|
|
527
|
+
const r = new RegExp(n, "gi");
|
|
528
|
+
l[e].toString().toLowerCase().match(r) !== null && o.push(l), f.actions.deepSearchByTitle(l[i], n, e, i, o);
|
|
529
529
|
}), o)) {
|
|
530
530
|
for (let l = 0; l < o.length; l++)
|
|
531
531
|
;
|
|
@@ -534,15 +534,15 @@ const j = Ke(), f = {
|
|
|
534
534
|
return o;
|
|
535
535
|
},
|
|
536
536
|
moveTreeNode(t, n, e, i, o, l) {
|
|
537
|
-
const
|
|
538
|
-
f.actions.insertTreeNode(e, o,
|
|
537
|
+
const r = f.actions.deleteTreeNode(e, i);
|
|
538
|
+
f.actions.insertTreeNode(e, o, r, l), j.emit(`move-${n}`, { fromTreeId: t, toTreeId: n, moved: r.id, target: o, position: l });
|
|
539
539
|
},
|
|
540
540
|
insertTreeNode(t, n, e, i) {
|
|
541
541
|
if (t)
|
|
542
542
|
for (let o = 0; o < t.length; o++) {
|
|
543
543
|
if (t[o].id === n) {
|
|
544
|
-
let
|
|
545
|
-
return i === "after" ? (
|
|
544
|
+
let r = o;
|
|
545
|
+
return i === "after" ? (r++, t.splice(r, 0, e)) : i === "before" ? t.splice(r, 0, e) : i === "inside" && (Object.hasOwn(t[o], "children") || (t[o].children = [], t[o].opened = !0), t[o].children.splice(0, 0, e)), t[o];
|
|
546
546
|
}
|
|
547
547
|
const l = this.insertTreeNode(t[o].children, n, e, i);
|
|
548
548
|
if (l)
|
|
@@ -567,22 +567,22 @@ const j = Ke(), f = {
|
|
|
567
567
|
props: {
|
|
568
568
|
tag: { type: String, default: "div" }
|
|
569
569
|
},
|
|
570
|
-
emits: Object.keys(
|
|
570
|
+
emits: Object.keys(L),
|
|
571
571
|
setup(t, { emit: n }) {
|
|
572
|
-
let e =
|
|
573
|
-
const i = V("false"), o = V(null), l = /* @__PURE__ */ new Set(),
|
|
574
|
-
e = te.data, n(
|
|
572
|
+
let e = ae({});
|
|
573
|
+
const i = V("false"), o = V(null), l = /* @__PURE__ */ new Set(), r = p(() => i.value && e), s = (a, d) => {
|
|
574
|
+
e = te.data, n(a, d, e), a === L.dragenter && (l.size || d.target === o.value) && l.add(d.target), a === L.dragleave && l.delete(d.target), a === L.drop && l.clear(), i.value = !!l.size;
|
|
575
575
|
};
|
|
576
|
-
return (
|
|
576
|
+
return (a, d) => (h(), w(R(t.tag), {
|
|
577
577
|
ref_key: "el",
|
|
578
578
|
ref: o,
|
|
579
|
-
onDragenter: d[0] || (d[0] = (u) => s(E(
|
|
580
|
-
onDragleave: d[1] || (d[1] = (u) => s(E(
|
|
581
|
-
onDragover: d[2] || (d[2] =
|
|
582
|
-
onDrop: d[3] || (d[3] =
|
|
579
|
+
onDragenter: d[0] || (d[0] = (u) => s(E(L).dragenter, u)),
|
|
580
|
+
onDragleave: d[1] || (d[1] = (u) => s(E(L).dragleave, u)),
|
|
581
|
+
onDragover: d[2] || (d[2] = W((u) => s(E(L).dragover, u), ["prevent"])),
|
|
582
|
+
onDrop: d[3] || (d[3] = W((u) => s(E(L).drop, u), ["prevent"]))
|
|
583
583
|
}, {
|
|
584
|
-
default:
|
|
585
|
-
|
|
584
|
+
default: H(() => [
|
|
585
|
+
_(a.$slots, "default", { transferData: r.value })
|
|
586
586
|
]),
|
|
587
587
|
_: 3
|
|
588
588
|
}, 544));
|
|
@@ -607,10 +607,10 @@ const j = Ke(), f = {
|
|
|
607
607
|
},
|
|
608
608
|
emits: ["select", "collapse", "expand", "move"],
|
|
609
609
|
setup(t, { emit: n }) {
|
|
610
|
-
const e = t, i =
|
|
610
|
+
const e = t, i = Be().uid;
|
|
611
611
|
f.actions.initTreeStore(i, e.noSelect, e.multiSelect, e.expanded, e.transfer, e.renderTitle);
|
|
612
|
-
const o = (s,
|
|
613
|
-
console.log(s,
|
|
612
|
+
const o = (s, a) => {
|
|
613
|
+
console.log(s, a);
|
|
614
614
|
};
|
|
615
615
|
j.on(`select-${i}`, (s) => {
|
|
616
616
|
n("select", s);
|
|
@@ -621,22 +621,22 @@ const j = Ke(), f = {
|
|
|
621
621
|
}), j.on(`move-${i}`, (s) => {
|
|
622
622
|
n("move", s);
|
|
623
623
|
});
|
|
624
|
-
const l = p(() => e.search ? f.actions.deepSearchByTitle(e.items, e.search) : e.items),
|
|
624
|
+
const l = p(() => e.search ? f.actions.deepSearchByTitle(e.items, e.search) : e.items), r = (s = null) => {
|
|
625
625
|
f.mutations.setItemSelect(i, s.model), f.actions.toggleItem(i, e.items, s.model.id);
|
|
626
626
|
};
|
|
627
|
-
return (s,
|
|
627
|
+
return (s, a) => (h(), w(qe, {
|
|
628
628
|
class: "tree",
|
|
629
629
|
tag: "ul",
|
|
630
|
-
onDrop:
|
|
630
|
+
onDrop: W(o, ["stop"])
|
|
631
631
|
}, {
|
|
632
|
-
default:
|
|
632
|
+
default: H(() => [
|
|
633
633
|
(h(!0), D(J, null, ce(l.value, (d) => (h(), w(Ze, {
|
|
634
634
|
key: d.id,
|
|
635
635
|
model: d,
|
|
636
636
|
treeId: E(i),
|
|
637
637
|
items: e.items,
|
|
638
638
|
search: e.search,
|
|
639
|
-
onNodeclick:
|
|
639
|
+
onNodeclick: r
|
|
640
640
|
}, null, 8, ["model", "treeId", "items", "search"]))), 128))
|
|
641
641
|
]),
|
|
642
642
|
_: 1
|
|
@@ -691,14 +691,14 @@ const Qe = {
|
|
|
691
691
|
},
|
|
692
692
|
setup(t) {
|
|
693
693
|
const n = t, e = p(() => {
|
|
694
|
-
const { fixed: i, zIndex: o, minWidth: l, height:
|
|
695
|
-
return `position:${u};z-index:${o};${m}height:${
|
|
694
|
+
const { fixed: i, zIndex: o, minWidth: l, height: r, paddingLeft: s, transitionDuration: a, transitionTimingFunction: d } = n, u = i ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${l}px;` : "";
|
|
695
|
+
return `position:${u};z-index:${o};${m}height:${r}px;padding-left:${s}px;transition-duration:${a}ms;transition-timing-function:${d};`;
|
|
696
696
|
});
|
|
697
697
|
return (i, o) => (h(), D("header", {
|
|
698
698
|
class: "d-layout-header",
|
|
699
|
-
style:
|
|
699
|
+
style: C(e.value)
|
|
700
700
|
}, [
|
|
701
|
-
|
|
701
|
+
_(i.$slots, "default")
|
|
702
702
|
], 4));
|
|
703
703
|
}
|
|
704
704
|
}, tt = {
|
|
@@ -740,14 +740,14 @@ const Qe = {
|
|
|
740
740
|
},
|
|
741
741
|
setup(t) {
|
|
742
742
|
const n = t, e = p(() => {
|
|
743
|
-
const { fixed: i, top: o, zIndex: l, minWidth:
|
|
744
|
-
return `position:${m};top:${o}px;z-index:${l};${y}height:${s}px;padding-left:${
|
|
743
|
+
const { fixed: i, top: o, zIndex: l, minWidth: r, height: s, paddingLeft: a, transitionDuration: d, transitionTimingFunction: u } = n, m = i ? "fixed" : "static", y = n.useMinWidthLayout ? `min-width: ${r}px;` : "";
|
|
744
|
+
return `position:${m};top:${o}px;z-index:${l};${y}height:${s}px;padding-left:${a}px;transition-duration:${d}ms;transition-timing-function:${u};`;
|
|
745
745
|
});
|
|
746
746
|
return (i, o) => (h(), D("div", {
|
|
747
747
|
class: "d-layout-tab",
|
|
748
|
-
style:
|
|
748
|
+
style: C(e.value)
|
|
749
749
|
}, [
|
|
750
|
-
|
|
750
|
+
_(i.$slots, "default")
|
|
751
751
|
], 4));
|
|
752
752
|
}
|
|
753
753
|
}, nt = {
|
|
@@ -785,14 +785,14 @@ const Qe = {
|
|
|
785
785
|
},
|
|
786
786
|
setup(t) {
|
|
787
787
|
const n = t, e = p(() => {
|
|
788
|
-
const { fixed: i, zIndex: o, minWidth: l, height:
|
|
789
|
-
return `position:${u};z-index:${o};${m}height:${
|
|
788
|
+
const { fixed: i, zIndex: o, minWidth: l, height: r, paddingLeft: s, transitionDuration: a, transitionTimingFunction: d } = n, u = i ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${l}px;` : "";
|
|
789
|
+
return `position:${u};z-index:${o};${m}height:${r}px;padding-left:${s}px;transition-duration:${a}ms;transition-timing-function:${d};`;
|
|
790
790
|
});
|
|
791
791
|
return (i, o) => (h(), D("footer", {
|
|
792
792
|
class: "d-layout-footer",
|
|
793
|
-
style:
|
|
793
|
+
style: C(e.value)
|
|
794
794
|
}, [
|
|
795
|
-
|
|
795
|
+
_(i.$slots, "default")
|
|
796
796
|
], 4));
|
|
797
797
|
}
|
|
798
798
|
}, ot = {
|
|
@@ -825,14 +825,14 @@ const Qe = {
|
|
|
825
825
|
},
|
|
826
826
|
setup(t) {
|
|
827
827
|
const n = t, e = p(() => {
|
|
828
|
-
const { zIndex: i, width: o, paddingTop: l, transitionDuration:
|
|
829
|
-
return `z-index:${i};width:${o}px;padding-top:${l}px;transition-duration:${
|
|
828
|
+
const { zIndex: i, width: o, paddingTop: l, transitionDuration: r, transitionTimingFunction: s } = n;
|
|
829
|
+
return `z-index:${i};width:${o}px;padding-top:${l}px;transition-duration:${r}ms;transition-timing-function:${s};`;
|
|
830
830
|
});
|
|
831
831
|
return (i, o) => (h(), D("aside", {
|
|
832
832
|
class: "d-layout-sidebar",
|
|
833
|
-
style:
|
|
833
|
+
style: C(e.value)
|
|
834
834
|
}, [
|
|
835
|
-
|
|
835
|
+
_(i.$slots, "default")
|
|
836
836
|
], 4));
|
|
837
837
|
}
|
|
838
838
|
}, it = {
|
|
@@ -862,18 +862,18 @@ const Qe = {
|
|
|
862
862
|
},
|
|
863
863
|
setup(t) {
|
|
864
864
|
const n = t, e = p(() => {
|
|
865
|
-
const { paddingTop: i, paddingBottom: o, paddingLeft: l, transitionDuration:
|
|
866
|
-
return `padding-top:${i}px;padding-bottom:${o}px;padding-left:${l}px;${
|
|
865
|
+
const { paddingTop: i, paddingBottom: o, paddingLeft: l, transitionDuration: r, transitionTimingFunction: s } = n, a = `overflow:${n.overflowHidden ? "hidden" : "visible"};`;
|
|
866
|
+
return `padding-top:${i}px;padding-bottom:${o}px;padding-left:${l}px;${a}transition-duration:${r}ms;transition-timing-function:${s};`;
|
|
867
867
|
});
|
|
868
868
|
return (i, o) => (h(), D("main", {
|
|
869
|
-
style:
|
|
869
|
+
style: C(e.value),
|
|
870
870
|
class: "d-layout-content"
|
|
871
871
|
}, [
|
|
872
|
-
|
|
872
|
+
_(i.$slots, "default")
|
|
873
873
|
], 4));
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
|
-
function
|
|
876
|
+
function at(t) {
|
|
877
877
|
const n = V(0), e = p(() => `transform: translateX(${-n.value}px);`);
|
|
878
878
|
let i = !1;
|
|
879
879
|
function o(u) {
|
|
@@ -884,25 +884,25 @@ function rt(t) {
|
|
|
884
884
|
const m = ((u = document.scrollingElement) === null || u === void 0 ? void 0 : u.scrollLeft) || 0;
|
|
885
885
|
o(m);
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function r() {
|
|
888
888
|
l();
|
|
889
889
|
}
|
|
890
890
|
function s() {
|
|
891
891
|
document.addEventListener("scroll", l);
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function a() {
|
|
894
894
|
i && document.removeEventListener("scroll", l);
|
|
895
895
|
}
|
|
896
896
|
function d() {
|
|
897
|
-
|
|
897
|
+
r(), s(), i = !0;
|
|
898
898
|
}
|
|
899
899
|
return K(t, (u) => {
|
|
900
|
-
u ? d() :
|
|
900
|
+
u ? d() : a();
|
|
901
901
|
}, { immediate: !0 }), ee(() => {
|
|
902
|
-
|
|
902
|
+
a();
|
|
903
903
|
}), e;
|
|
904
904
|
}
|
|
905
|
-
const
|
|
905
|
+
const rt = 1001, lt = 999, st = 998, an = {
|
|
906
906
|
__name: "DLayoutAdmin",
|
|
907
907
|
props: {
|
|
908
908
|
mode: {
|
|
@@ -993,7 +993,7 @@ const at = 1001, lt = 999, st = 998, rn = {
|
|
|
993
993
|
},
|
|
994
994
|
emits: ["update:sidebar-collapse"],
|
|
995
995
|
setup(t, { emit: n }) {
|
|
996
|
-
const e = t, i = p(() => e.useMinWidthLayout ? `min-width:${e.minWidth}px;` : ""), o = p(() => e.useMinWidthLayout && (e.fixedHeaderAndTab || e.fixedFooter)), l =
|
|
996
|
+
const e = t, i = p(() => e.useMinWidthLayout ? `min-width:${e.minWidth}px;` : ""), o = p(() => e.useMinWidthLayout && (e.fixedHeaderAndTab || e.fixedFooter)), l = at(o), r = p(() => e.fixedHeaderAndTab ? l.value : ""), s = p(() => e.fixedFooter ? l.value : ""), a = p(() => {
|
|
997
997
|
const { transitionDuration: g, transitionTimingFunction: c } = e;
|
|
998
998
|
return {
|
|
999
999
|
transitionDuration: g,
|
|
@@ -1010,93 +1010,93 @@ const at = 1001, lt = 999, st = 998, rn = {
|
|
|
1010
1010
|
function y() {
|
|
1011
1011
|
m.value = !0;
|
|
1012
1012
|
}
|
|
1013
|
-
const I = p(() => e.isMobile && !m.value),
|
|
1013
|
+
const I = p(() => e.isMobile && !m.value), B = p(() => {
|
|
1014
1014
|
const { transitionDuration: g, transitionTimingFunction: c } = e;
|
|
1015
1015
|
return `background-color:${e.maskBg};transition-duration:${g}ms;transition-timing-function:${c};`;
|
|
1016
|
-
}),
|
|
1016
|
+
}), M = p(() => {
|
|
1017
1017
|
const { sidebarWidth: g, sidebarCollapsedWidth: c } = e, v = e.isMobile ? 0 : c, T = m.value ? v : g;
|
|
1018
1018
|
return e.sidebarVisible ? T : 0;
|
|
1019
|
-
}),
|
|
1019
|
+
}), x = p(() => e.isMobile ? 0 : M.value), b = p(() => d.value ? x.value : 0), $ = p(
|
|
1020
1020
|
() => !e.isMobile && !d.value && e.headerVisible ? e.headerHeight : 0
|
|
1021
|
-
),
|
|
1021
|
+
), z = p(() => {
|
|
1022
1022
|
let g = 0;
|
|
1023
1023
|
return e.fixedHeaderAndTab && (e.headerVisible && (g += e.headerHeight), e.tabVisible && (g += e.tabHeight)), g;
|
|
1024
|
-
}),
|
|
1024
|
+
}), S = p(() => e.fixedFooter && e.footerVisible ? e.footerHeight : 0);
|
|
1025
1025
|
return (g, c) => (h(), D("div", {
|
|
1026
1026
|
class: "d-layout",
|
|
1027
|
-
style:
|
|
1027
|
+
style: C(i.value)
|
|
1028
1028
|
}, [
|
|
1029
|
-
t.headerVisible ? (h(), w(et, Y({ key: 0 },
|
|
1029
|
+
t.headerVisible ? (h(), w(et, Y({ key: 0 }, a.value, {
|
|
1030
1030
|
fixed: t.fixedHeaderAndTab,
|
|
1031
|
-
"z-index":
|
|
1031
|
+
"z-index": rt,
|
|
1032
1032
|
"min-width": t.minWidth,
|
|
1033
1033
|
height: t.headerHeight,
|
|
1034
1034
|
"padding-left": b.value,
|
|
1035
|
-
style:
|
|
1035
|
+
style: r.value
|
|
1036
1036
|
}), {
|
|
1037
|
-
default:
|
|
1038
|
-
|
|
1037
|
+
default: H(() => [
|
|
1038
|
+
_(g.$slots, "header")
|
|
1039
1039
|
]),
|
|
1040
1040
|
_: 3
|
|
1041
1041
|
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : N("", !0),
|
|
1042
|
-
t.tabVisible ? (h(), w(tt, Y({ key: 1 },
|
|
1042
|
+
t.tabVisible ? (h(), w(tt, Y({ key: 1 }, a.value, {
|
|
1043
1043
|
fixed: t.fixedHeaderAndTab,
|
|
1044
1044
|
"z-index": lt,
|
|
1045
1045
|
"min-width": t.minWidth,
|
|
1046
1046
|
top: t.headerHeight,
|
|
1047
1047
|
height: t.tabHeight,
|
|
1048
|
-
"padding-left":
|
|
1049
|
-
style:
|
|
1048
|
+
"padding-left": x.value,
|
|
1049
|
+
style: r.value
|
|
1050
1050
|
}), {
|
|
1051
|
-
default:
|
|
1052
|
-
|
|
1051
|
+
default: H(() => [
|
|
1052
|
+
_(g.$slots, "tab")
|
|
1053
1053
|
]),
|
|
1054
1054
|
_: 3
|
|
1055
1055
|
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : N("", !0),
|
|
1056
|
-
t.sidebarVisible ? (h(), w(ot, Y({ key: 2 },
|
|
1056
|
+
t.sidebarVisible ? (h(), w(ot, Y({ key: 2 }, a.value, {
|
|
1057
1057
|
"z-index": u.value,
|
|
1058
|
-
width:
|
|
1059
|
-
"padding-top":
|
|
1058
|
+
width: M.value,
|
|
1059
|
+
"padding-top": $.value
|
|
1060
1060
|
}), {
|
|
1061
|
-
default:
|
|
1062
|
-
|
|
1061
|
+
default: H(() => [
|
|
1062
|
+
_(g.$slots, "sidebar")
|
|
1063
1063
|
]),
|
|
1064
1064
|
_: 3
|
|
1065
1065
|
}, 16, ["z-index", "width", "padding-top"])) : N("", !0),
|
|
1066
1066
|
I.value ? (h(), D("div", {
|
|
1067
1067
|
key: 3,
|
|
1068
1068
|
class: "d-layout-sidebar-mask",
|
|
1069
|
-
style:
|
|
1069
|
+
style: C(B.value),
|
|
1070
1070
|
onClick: y
|
|
1071
1071
|
}, null, 4)) : N("", !0),
|
|
1072
|
-
ue(it, Y(
|
|
1073
|
-
"padding-top":
|
|
1074
|
-
"padding-bottom":
|
|
1075
|
-
"padding-left":
|
|
1072
|
+
ue(it, Y(a.value, {
|
|
1073
|
+
"padding-top": z.value,
|
|
1074
|
+
"padding-bottom": S.value,
|
|
1075
|
+
"padding-left": x.value,
|
|
1076
1076
|
"overflow-hidden": t.addMainOverflowHidden
|
|
1077
1077
|
}), {
|
|
1078
|
-
default:
|
|
1079
|
-
|
|
1078
|
+
default: H(() => [
|
|
1079
|
+
_(g.$slots, "default")
|
|
1080
1080
|
]),
|
|
1081
1081
|
_: 3
|
|
1082
1082
|
}, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
|
|
1083
|
-
t.footerVisible ? (h(), w(nt, Y({ key: 4 },
|
|
1083
|
+
t.footerVisible ? (h(), w(nt, Y({ key: 4 }, a.value, {
|
|
1084
1084
|
fixed: t.fixedFooter,
|
|
1085
1085
|
"z-index": st,
|
|
1086
1086
|
"min-width": t.minWidth,
|
|
1087
1087
|
height: t.footerHeight,
|
|
1088
|
-
"padding-left":
|
|
1088
|
+
"padding-left": x.value,
|
|
1089
1089
|
style: s.value
|
|
1090
1090
|
}), {
|
|
1091
|
-
default:
|
|
1092
|
-
|
|
1091
|
+
default: H(() => [
|
|
1092
|
+
_(g.$slots, "footer")
|
|
1093
1093
|
]),
|
|
1094
1094
|
_: 3
|
|
1095
1095
|
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : N("", !0)
|
|
1096
1096
|
], 4));
|
|
1097
1097
|
}
|
|
1098
1098
|
}, U = {
|
|
1099
|
-
state:
|
|
1099
|
+
state: ae({
|
|
1100
1100
|
theme: "dark"
|
|
1101
1101
|
}),
|
|
1102
1102
|
getters: {
|
|
@@ -1114,7 +1114,7 @@ const at = 1001, lt = 999, st = 998, rn = {
|
|
|
1114
1114
|
U.state.theme = U.state.theme === "dark" ? "light" : "dark", document.documentElement.setAttribute("class", U.state.theme);
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
|
-
},
|
|
1117
|
+
}, rn = {
|
|
1118
1118
|
__name: "DConfigProvider",
|
|
1119
1119
|
props: {
|
|
1120
1120
|
theme: {
|
|
@@ -1124,16 +1124,16 @@ const at = 1001, lt = 999, st = 998, rn = {
|
|
|
1124
1124
|
},
|
|
1125
1125
|
setup(t) {
|
|
1126
1126
|
const n = t;
|
|
1127
|
-
return U.mutations.setTheme(n.theme), (e, i) =>
|
|
1127
|
+
return U.mutations.setTheme(n.theme), (e, i) => _(e.$slots, "default");
|
|
1128
1128
|
}
|
|
1129
1129
|
};
|
|
1130
1130
|
var dt = typeof global == "object" && global && global.Object === Object && global;
|
|
1131
1131
|
const ut = dt;
|
|
1132
1132
|
var ct = typeof self == "object" && self && self.Object === Object && self, ft = ut || ct || Function("return this")();
|
|
1133
|
-
const
|
|
1134
|
-
var mt =
|
|
1133
|
+
const $e = ft;
|
|
1134
|
+
var mt = $e.Symbol;
|
|
1135
1135
|
const ne = mt;
|
|
1136
|
-
var
|
|
1136
|
+
var _e = Object.prototype, pt = _e.hasOwnProperty, ht = _e.toString, G = ne ? ne.toStringTag : void 0;
|
|
1137
1137
|
function gt(t) {
|
|
1138
1138
|
var n = pt.call(t, G), e = t[G];
|
|
1139
1139
|
try {
|
|
@@ -1148,16 +1148,16 @@ var vt = Object.prototype, yt = vt.toString;
|
|
|
1148
1148
|
function bt(t) {
|
|
1149
1149
|
return yt.call(t);
|
|
1150
1150
|
}
|
|
1151
|
-
var
|
|
1151
|
+
var St = "[object Null]", xt = "[object Undefined]", ve = ne ? ne.toStringTag : void 0;
|
|
1152
1152
|
function Tt(t) {
|
|
1153
|
-
return t == null ? t === void 0 ?
|
|
1153
|
+
return t == null ? t === void 0 ? xt : St : ve && ve in Object(t) ? gt(t) : bt(t);
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function $t(t) {
|
|
1156
1156
|
return t != null && typeof t == "object";
|
|
1157
1157
|
}
|
|
1158
|
-
var
|
|
1158
|
+
var _t = "[object Symbol]";
|
|
1159
1159
|
function Dt(t) {
|
|
1160
|
-
return typeof t == "symbol" ||
|
|
1160
|
+
return typeof t == "symbol" || $t(t) && Tt(t) == _t;
|
|
1161
1161
|
}
|
|
1162
1162
|
var wt = /\s/;
|
|
1163
1163
|
function It(t) {
|
|
@@ -1166,14 +1166,14 @@ function It(t) {
|
|
|
1166
1166
|
return n;
|
|
1167
1167
|
}
|
|
1168
1168
|
var Et = /^\s+/;
|
|
1169
|
-
function
|
|
1169
|
+
function zt(t) {
|
|
1170
1170
|
return t && t.slice(0, It(t) + 1).replace(Et, "");
|
|
1171
1171
|
}
|
|
1172
1172
|
function oe(t) {
|
|
1173
1173
|
var n = typeof t;
|
|
1174
1174
|
return t != null && (n == "object" || n == "function");
|
|
1175
1175
|
}
|
|
1176
|
-
var ye = 0 / 0,
|
|
1176
|
+
var ye = 0 / 0, Lt = /^[-+]0x[0-9a-f]+$/i, Nt = /^0b[01]+$/i, Bt = /^0o[0-7]+$/i, kt = parseInt;
|
|
1177
1177
|
function q(t) {
|
|
1178
1178
|
if (typeof t == "number")
|
|
1179
1179
|
return t;
|
|
@@ -1185,85 +1185,85 @@ function q(t) {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
if (typeof t != "string")
|
|
1187
1187
|
return t === 0 ? t : +t;
|
|
1188
|
-
t =
|
|
1188
|
+
t = zt(t);
|
|
1189
1189
|
var e = Nt.test(t);
|
|
1190
|
-
return e ||
|
|
1190
|
+
return e || Bt.test(t) ? kt(t.slice(2), e ? 2 : 8) : Lt.test(t) ? ye : +t;
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function Ht(t, n, e) {
|
|
1193
1193
|
return t === t && (e !== void 0 && (t = t <= e ? t : e), n !== void 0 && (t = t >= n ? t : n)), t;
|
|
1194
1194
|
}
|
|
1195
1195
|
function Q(t, n, e) {
|
|
1196
|
-
return e === void 0 && (e = n, n = void 0), e !== void 0 && (e = q(e), e = e === e ? e : 0), n !== void 0 && (n = q(n), n = n === n ? n : 0),
|
|
1196
|
+
return e === void 0 && (e = n, n = void 0), e !== void 0 && (e = q(e), e = e === e ? e : 0), n !== void 0 && (n = q(n), n = n === n ? n : 0), Ht(q(t), n, e);
|
|
1197
1197
|
}
|
|
1198
|
-
var
|
|
1199
|
-
return
|
|
1198
|
+
var Mt = function() {
|
|
1199
|
+
return $e.Date.now();
|
|
1200
1200
|
};
|
|
1201
|
-
const
|
|
1202
|
-
var
|
|
1201
|
+
const re = Mt;
|
|
1202
|
+
var Ct = "Expected a function", Pt = Math.max, Ot = Math.min;
|
|
1203
1203
|
function De(t, n, e) {
|
|
1204
|
-
var i, o, l,
|
|
1204
|
+
var i, o, l, r, s, a, d = 0, u = !1, m = !1, y = !0;
|
|
1205
1205
|
if (typeof t != "function")
|
|
1206
|
-
throw new TypeError(
|
|
1207
|
-
n = q(n) || 0, oe(e) && (u = !!e.leading, m = "maxWait" in e, l = m ?
|
|
1206
|
+
throw new TypeError(Ct);
|
|
1207
|
+
n = q(n) || 0, oe(e) && (u = !!e.leading, m = "maxWait" in e, l = m ? Pt(q(e.maxWait) || 0, n) : l, y = "trailing" in e ? !!e.trailing : y);
|
|
1208
1208
|
function I(c) {
|
|
1209
1209
|
var v = i, T = o;
|
|
1210
|
-
return i = o = void 0, d = c,
|
|
1210
|
+
return i = o = void 0, d = c, r = t.apply(T, v), r;
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1213
|
-
return d = c, s = setTimeout(b, n), u ? I(c) :
|
|
1212
|
+
function B(c) {
|
|
1213
|
+
return d = c, s = setTimeout(b, n), u ? I(c) : r;
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1216
|
-
var v = c -
|
|
1217
|
-
return m ?
|
|
1215
|
+
function M(c) {
|
|
1216
|
+
var v = c - a, T = c - d, X = n - v;
|
|
1217
|
+
return m ? Ot(X, l - T) : X;
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1220
|
-
var v = c -
|
|
1221
|
-
return
|
|
1219
|
+
function x(c) {
|
|
1220
|
+
var v = c - a, T = c - d;
|
|
1221
|
+
return a === void 0 || v >= n || v < 0 || m && T >= l;
|
|
1222
1222
|
}
|
|
1223
1223
|
function b() {
|
|
1224
|
-
var c =
|
|
1225
|
-
if (
|
|
1226
|
-
return
|
|
1227
|
-
s = setTimeout(b,
|
|
1224
|
+
var c = re();
|
|
1225
|
+
if (x(c))
|
|
1226
|
+
return $(c);
|
|
1227
|
+
s = setTimeout(b, M(c));
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1230
|
-
return s = void 0, y && i ? I(c) : (i = o = void 0,
|
|
1229
|
+
function $(c) {
|
|
1230
|
+
return s = void 0, y && i ? I(c) : (i = o = void 0, r);
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1233
|
-
s !== void 0 && clearTimeout(s), d = 0, i =
|
|
1232
|
+
function z() {
|
|
1233
|
+
s !== void 0 && clearTimeout(s), d = 0, i = a = o = s = void 0;
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
return s === void 0 ?
|
|
1235
|
+
function S() {
|
|
1236
|
+
return s === void 0 ? r : $(re());
|
|
1237
1237
|
}
|
|
1238
1238
|
function g() {
|
|
1239
|
-
var c =
|
|
1240
|
-
if (i = arguments, o = this,
|
|
1239
|
+
var c = re(), v = x(c);
|
|
1240
|
+
if (i = arguments, o = this, a = c, v) {
|
|
1241
1241
|
if (s === void 0)
|
|
1242
|
-
return
|
|
1242
|
+
return B(a);
|
|
1243
1243
|
if (m)
|
|
1244
|
-
return clearTimeout(s), s = setTimeout(b, n), I(
|
|
1244
|
+
return clearTimeout(s), s = setTimeout(b, n), I(a);
|
|
1245
1245
|
}
|
|
1246
|
-
return s === void 0 && (s = setTimeout(b, n)),
|
|
1246
|
+
return s === void 0 && (s = setTimeout(b, n)), r;
|
|
1247
1247
|
}
|
|
1248
|
-
return g.cancel =
|
|
1248
|
+
return g.cancel = z, g.flush = S, g;
|
|
1249
1249
|
}
|
|
1250
|
-
var
|
|
1250
|
+
var Wt = "Expected a function";
|
|
1251
1251
|
function we(t, n, e) {
|
|
1252
1252
|
var i = !0, o = !0;
|
|
1253
1253
|
if (typeof t != "function")
|
|
1254
|
-
throw new TypeError(
|
|
1254
|
+
throw new TypeError(Wt);
|
|
1255
1255
|
return oe(e) && (i = "leading" in e ? !!e.leading : i, o = "trailing" in e ? !!e.trailing : o), De(t, n, {
|
|
1256
1256
|
leading: i,
|
|
1257
1257
|
maxWait: n,
|
|
1258
1258
|
trailing: o
|
|
1259
1259
|
});
|
|
1260
1260
|
}
|
|
1261
|
-
var At = Object.defineProperty, Ft = Object.defineProperties, Rt = Object.getOwnPropertyDescriptors, be = Object.getOwnPropertySymbols, Vt = Object.prototype.hasOwnProperty, jt = Object.prototype.propertyIsEnumerable,
|
|
1261
|
+
var At = Object.defineProperty, Ft = Object.defineProperties, Rt = Object.getOwnPropertyDescriptors, be = Object.getOwnPropertySymbols, Vt = Object.prototype.hasOwnProperty, jt = Object.prototype.propertyIsEnumerable, Se = (t, n, e) => n in t ? At(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e, ie = (t, n) => {
|
|
1262
1262
|
for (var e in n || (n = {}))
|
|
1263
|
-
Vt.call(n, e) &&
|
|
1263
|
+
Vt.call(n, e) && Se(t, e, n[e]);
|
|
1264
1264
|
if (be)
|
|
1265
1265
|
for (var e of be(n))
|
|
1266
|
-
jt.call(n, e) &&
|
|
1266
|
+
jt.call(n, e) && Se(t, e, n[e]);
|
|
1267
1267
|
return t;
|
|
1268
1268
|
}, Ie = (t, n) => Ft(t, Rt(n));
|
|
1269
1269
|
const Xt = ["onPointerdown"], Yt = {
|
|
@@ -1273,40 +1273,40 @@ function Ut(t, { expose: n }) {
|
|
|
1273
1273
|
const e = t;
|
|
1274
1274
|
let i = null, o = A(null);
|
|
1275
1275
|
const l = { pageX: 0, pageY: 0, scrollPos: 0 };
|
|
1276
|
-
let
|
|
1276
|
+
let r = null;
|
|
1277
1277
|
const s = () => {
|
|
1278
1278
|
i = setTimeout(() => {
|
|
1279
1279
|
o.value && o.value.classList.remove("scrollbar__thumbPlaceholder--scrolling"), i = null;
|
|
1280
1280
|
}, e.autoHideDelay);
|
|
1281
|
-
},
|
|
1281
|
+
}, a = () => {
|
|
1282
1282
|
i !== null && clearTimeout(i);
|
|
1283
1283
|
};
|
|
1284
|
-
ee(
|
|
1284
|
+
ee(a);
|
|
1285
1285
|
const d = we((c) => {
|
|
1286
1286
|
c.stopPropagation(), c.preventDefault();
|
|
1287
1287
|
const v = e.type === "horizontal" ? "pageX" : "pageY", T = (c[v] - l[v]) / e.scrollInfo.wrapperMainSize * e.scrollInfo.contentMainSize;
|
|
1288
1288
|
e.wrapperEl.scrollTo({ [e.type === "horizontal" ? "left" : "top"]: l.scrollPos + T, behavior: "auto" });
|
|
1289
1289
|
}, 16), u = () => {
|
|
1290
|
-
s(), o.value.removeEventListener("pointermove", d), o.value.removeEventListener("pointerup", u), o.value.removeEventListener("pointercancel", u), o.value.removeEventListener("mousewheel", u), document.removeEventListener("mousewheel", u), typeof
|
|
1290
|
+
s(), o.value.removeEventListener("pointermove", d), o.value.removeEventListener("pointerup", u), o.value.removeEventListener("pointercancel", u), o.value.removeEventListener("mousewheel", u), document.removeEventListener("mousewheel", u), typeof r == "number" && o.value.releasePointerCapture(r), r = null;
|
|
1291
1291
|
}, m = (c) => {
|
|
1292
|
-
c.ctrlKey || c.button !== 0 || (
|
|
1292
|
+
c.ctrlKey || c.button !== 0 || (a(), l.pageX = c.pageX, l.pageY = c.pageY, l.scrollPos = e.wrapperEl[e.type === "horizontal" ? "scrollLeft" : "scrollTop"], r = c == null ? void 0 : c.pointerId, o.value.setPointerCapture(r), o.value.addEventListener("pointermove", d), o.value.addEventListener("pointerup", u), o.value.addEventListener("pointercancel", u), o.value.addEventListener("mousewheel", u, { passive: !1 }), document.addEventListener("mousewheel", u, { passive: !1 }), o.value.classList.add("scrollbar__thumbPlaceholder--scrolling"));
|
|
1293
1293
|
};
|
|
1294
1294
|
n({
|
|
1295
1295
|
autoHideAfterScroll: () => {
|
|
1296
|
-
|
|
1296
|
+
a(), o.value && o.value.classList.add("scrollbar__thumbPlaceholder--scrolling"), s();
|
|
1297
1297
|
}
|
|
1298
1298
|
});
|
|
1299
|
-
let I = A(!1),
|
|
1300
|
-
const
|
|
1301
|
-
|
|
1299
|
+
let I = A(!1), B = A(!1), M = A(null), x = null, b = null, $ = p(() => e.fixedThumb && !B.value);
|
|
1300
|
+
const z = ([c]) => B.value = c.isIntersecting, S = ([c]) => I.value = c.isIntersecting, g = () => {
|
|
1301
|
+
x && (x.disconnect(), x = null), b && (b.disconnect(), b = null);
|
|
1302
1302
|
};
|
|
1303
1303
|
return K(() => [e.fixedThumb, e.wrapperEl], () => {
|
|
1304
1304
|
if (!e.fixedThumb || !e.wrapperEl)
|
|
1305
1305
|
return g();
|
|
1306
|
-
g(), b = new IntersectionObserver(
|
|
1306
|
+
g(), b = new IntersectionObserver(S, { threshold: [0, 0.5] }), b.observe(e.wrapperEl), x = new IntersectionObserver(z), x.observe(M.value);
|
|
1307
1307
|
}), ee(g), (c, v) => (h(), D(J, null, [
|
|
1308
|
-
se(
|
|
1309
|
-
class:
|
|
1308
|
+
se(P("div", {
|
|
1309
|
+
class: k([
|
|
1310
1310
|
"scrollbar__thumbPlaceholder",
|
|
1311
1311
|
`scrollbar__thumbPlaceholder--${t.type}`,
|
|
1312
1312
|
{
|
|
@@ -1314,19 +1314,19 @@ function Ut(t, { expose: n }) {
|
|
|
1314
1314
|
"scrollbar__thumbPlaceholder--autoExpand": t.autoExpand
|
|
1315
1315
|
}
|
|
1316
1316
|
]),
|
|
1317
|
-
style:
|
|
1317
|
+
style: C({
|
|
1318
1318
|
width: t.type === "horizontal" ? `${t.scrollInfo.thumbSize}px` : "",
|
|
1319
1319
|
height: t.type === "vertical" ? `${t.scrollInfo.thumbSize}px` : "",
|
|
1320
|
-
position:
|
|
1321
|
-
[t.type === "vertical" ? "top" : "left"]:
|
|
1320
|
+
position: $.value ? "fixed" : "absolute",
|
|
1321
|
+
[t.type === "vertical" ? "top" : "left"]: $.value ? `${t.scrollInfo.boundaryDistance + 3}px` : "3px"
|
|
1322
1322
|
}),
|
|
1323
1323
|
ref: (T, X) => {
|
|
1324
1324
|
X.thumbEl = T, o.value = T;
|
|
1325
1325
|
},
|
|
1326
|
-
onPointerdown:
|
|
1326
|
+
onPointerdown: W(m, ["stop"])
|
|
1327
1327
|
}, [
|
|
1328
|
-
v[0] || (he(-1), v[0] =
|
|
1329
|
-
class:
|
|
1328
|
+
v[0] || (he(-1), v[0] = P("div", {
|
|
1329
|
+
class: k(["scrollbar__thumb", `scrollbar__thumb--${t.type}`])
|
|
1330
1330
|
}, null, 2), he(1), v[0])
|
|
1331
1331
|
], 46, Xt), [
|
|
1332
1332
|
[ge, !!t.scrollInfo.thumbSize && (t.fixedThumb ? I.value : !0)]
|
|
@@ -1334,9 +1334,9 @@ function Ut(t, { expose: n }) {
|
|
|
1334
1334
|
e.fixedThumb ? se((h(), D("div", {
|
|
1335
1335
|
key: 0,
|
|
1336
1336
|
ref: (T, X) => {
|
|
1337
|
-
X.shepherdEl = T,
|
|
1337
|
+
X.shepherdEl = T, M.value = T;
|
|
1338
1338
|
},
|
|
1339
|
-
class:
|
|
1339
|
+
class: k(["scrollbar__shepherd", `scrollbar__shepherd--${t.type}`])
|
|
1340
1340
|
}, null, 2)), [
|
|
1341
1341
|
[ge, !!t.scrollInfo.thumbSize]
|
|
1342
1342
|
]) : N("", !0)
|
|
@@ -1357,21 +1357,21 @@ const Gt = /* @__PURE__ */ Te(Ie(ie({}, Yt), {
|
|
|
1357
1357
|
wait: 333,
|
|
1358
1358
|
type: "debounce"
|
|
1359
1359
|
};
|
|
1360
|
-
function
|
|
1360
|
+
function xe(...t) {
|
|
1361
1361
|
const n = "value" in (t == null ? void 0 : t[0]);
|
|
1362
1362
|
let e;
|
|
1363
1363
|
n ? e = t == null ? void 0 : t[1] : e = t == null ? void 0 : t[0];
|
|
1364
|
-
const { wait: i, type: o, callback: l } = ie(ie({}, Zt), e),
|
|
1365
|
-
const y =
|
|
1364
|
+
const { wait: i, type: o, callback: l } = ie(ie({}, Zt), e), r = n ? t[0] : A(null), s = ae({ left: 0, top: 0, right: 0, bottom: 0, width: 0, height: 0, x: 0, y: 0 }), a = () => {
|
|
1365
|
+
const y = r.value.getBoundingClientRect();
|
|
1366
1366
|
s.left = y.left, s.top = y.top, s.right = y.right, s.bottom = y.bottom, s.width = y.width, s.height = y.height, s.x = y.x, s.y = y.y, l == null || l();
|
|
1367
1367
|
};
|
|
1368
1368
|
let d = null, u = null;
|
|
1369
1369
|
const m = () => {
|
|
1370
1370
|
d && window.removeEventListener("resize", d), u && (u.disconnect(), u = null);
|
|
1371
1371
|
};
|
|
1372
|
-
return
|
|
1373
|
-
|
|
1374
|
-
}), ee(m), n ? s : [
|
|
1372
|
+
return He(() => {
|
|
1373
|
+
r.value && (m(), d = a, o === "throttle" && i >= 4 ? d = we(d, i) : o === "debounce" && i >= 4 && (d = De(d, i)), window.addEventListener("resize", d), u = new ResizeObserver(d), u.observe(r.value));
|
|
1374
|
+
}), ee(m), n ? s : [r, s];
|
|
1375
1375
|
}
|
|
1376
1376
|
const Kt = { class: "scrollbar__wrapper" }, qt = {
|
|
1377
1377
|
name: "CustomScrollbar",
|
|
@@ -1381,66 +1381,66 @@ function Jt(t, { expose: n, emit: e }) {
|
|
|
1381
1381
|
const i = t, o = {
|
|
1382
1382
|
horizontal: { el: null, instance: null },
|
|
1383
1383
|
vertical: { el: null, instance: null }
|
|
1384
|
-
}, l = (
|
|
1385
|
-
o[g].instance || (o[g].instance =
|
|
1384
|
+
}, l = (S, g) => {
|
|
1385
|
+
o[g].instance || (o[g].instance = S);
|
|
1386
1386
|
};
|
|
1387
|
-
let
|
|
1388
|
-
|
|
1389
|
-
var
|
|
1390
|
-
const g = Array.from((
|
|
1387
|
+
let r = A(null), s = A(null);
|
|
1388
|
+
ke(() => {
|
|
1389
|
+
var S;
|
|
1390
|
+
const g = Array.from((S = r.value.parentElement) == null ? void 0 : S.childNodes);
|
|
1391
1391
|
for (const c in o)
|
|
1392
1392
|
o[c].el = g.find((v) => {
|
|
1393
1393
|
var T;
|
|
1394
1394
|
return (T = v == null ? void 0 : v.classList) == null ? void 0 : T.contains(`scrollbar__thumbPlaceholder--${c}`);
|
|
1395
1395
|
});
|
|
1396
1396
|
});
|
|
1397
|
-
const
|
|
1397
|
+
const a = xe(r, { wait: i.throttleWait, type: i.throttleType, callback: y }), d = xe(s, { wait: i.throttleWait, type: i.throttleType, callback: y });
|
|
1398
1398
|
let u = A(0), m = A(0);
|
|
1399
1399
|
function y() {
|
|
1400
|
-
u.value = Math.max(
|
|
1400
|
+
u.value = Math.max(r.value.scrollHeight - a.height | 0, 0), m.value = Math.max(r.value.scrollWidth - a.width | 0, 0);
|
|
1401
1401
|
}
|
|
1402
1402
|
let I = p(() => ({
|
|
1403
|
-
thumbSize: m.value ? Q(
|
|
1403
|
+
thumbSize: m.value ? Q(a.width / r.value.scrollWidth * a.width, i.thumbMinSize > a.width ? 48 : i.thumbMinSize, i.thumbMaxSize) : 0,
|
|
1404
1404
|
contentMainSize: d.width,
|
|
1405
|
-
wrapperMainSize:
|
|
1406
|
-
boundaryDistance: Math.abs(
|
|
1407
|
-
})),
|
|
1408
|
-
thumbSize: u.value ? Q(
|
|
1405
|
+
wrapperMainSize: a.width,
|
|
1406
|
+
boundaryDistance: Math.abs(a.left)
|
|
1407
|
+
})), B = p(() => ({
|
|
1408
|
+
thumbSize: u.value ? Q(a.height / r.value.scrollHeight * a.height, i.thumbMinSize > a.height ? 48 : i.thumbMinSize, i.thumbMaxSize) : 0,
|
|
1409
1409
|
contentMainSize: d.height,
|
|
1410
|
-
wrapperMainSize:
|
|
1411
|
-
boundaryDistance: Math.abs(
|
|
1412
|
-
})),
|
|
1410
|
+
wrapperMainSize: a.height,
|
|
1411
|
+
boundaryDistance: Math.abs(a.top)
|
|
1412
|
+
})), M = p(() => a.height - B.value.thumbSize - 5), x = p(() => a.width - I.value.thumbSize - 5);
|
|
1413
1413
|
const b = () => {
|
|
1414
|
-
m.value && (o.horizontal.el.style.transform = `translate3d(${
|
|
1414
|
+
m.value && (o.horizontal.el.style.transform = `translate3d(${r.value.scrollLeft / m.value * x.value}px, 0, 0)`, o.horizontal.instance.autoHideAfterScroll()), u.value && (o.vertical.el.style.transform = `translate3d(0, ${r.value.scrollTop / u.value * M.value}px, 0)`, o.vertical.instance.autoHideAfterScroll());
|
|
1415
1415
|
};
|
|
1416
1416
|
K(() => [m.value, u.value], b);
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
const g =
|
|
1420
|
-
|
|
1421
|
-
},
|
|
1422
|
-
i.simulateScroll ?
|
|
1417
|
+
const $ = (S) => {
|
|
1418
|
+
S.stopPropagation();
|
|
1419
|
+
const g = r.value.scrollLeft, c = r.value.scrollTop, v = Q(g + ((S == null ? void 0 : S.deltaX) || 0), 0, m.value) | 0, T = Q(c + ((S == null ? void 0 : S.deltaY) || 0), 0, u.value) | 0;
|
|
1420
|
+
r.value.scrollLeft = v, r.value.scrollTop = T, m.value && (o.horizontal.el.style.transform = `translate3d(${v / m.value * x.value}px, 0, 0)`, o.horizontal.instance.autoHideAfterScroll()), u.value && (o.vertical.el.style.transform = `translate3d(0, ${T / u.value * M.value}px, 0)`, o.vertical.instance.autoHideAfterScroll()), e("scroll", { target: r.value, scrollLeft: v, scrollTop: T });
|
|
1421
|
+
}, z = (S) => {
|
|
1422
|
+
i.simulateScroll ? $(S) : b();
|
|
1423
1423
|
};
|
|
1424
|
-
return K(
|
|
1425
|
-
scrollEl:
|
|
1426
|
-
}), (
|
|
1427
|
-
|
|
1424
|
+
return K(a, () => e("wrapperResize", a)), K(d, () => e("contentResize", d)), n({
|
|
1425
|
+
scrollEl: r
|
|
1426
|
+
}), (S, g) => (h(), D("div", Kt, [
|
|
1427
|
+
P("div", Y({
|
|
1428
1428
|
ref: (c, v) => {
|
|
1429
|
-
v.wrapperEl = c,
|
|
1429
|
+
v.wrapperEl = c, r.value = c;
|
|
1430
1430
|
},
|
|
1431
1431
|
class: "scrollbar__scroller"
|
|
1432
|
-
},
|
|
1433
|
-
onWheel:
|
|
1434
|
-
onScroll:
|
|
1432
|
+
}, S.$attrs, {
|
|
1433
|
+
onWheel: z,
|
|
1434
|
+
onScroll: z
|
|
1435
1435
|
}), [
|
|
1436
|
-
|
|
1436
|
+
P("div", {
|
|
1437
1437
|
ref: (c, v) => {
|
|
1438
1438
|
v.contentEl = c, s.value = c;
|
|
1439
1439
|
},
|
|
1440
|
-
class:
|
|
1441
|
-
style:
|
|
1440
|
+
class: k(["scrollbar__content", t.contentClass, { "scrollbar__content--fixedThumb": t.fixedThumb, [`scrollbar__content--${t.direction}`]: t.direction }]),
|
|
1441
|
+
style: C(t.contentStyle)
|
|
1442
1442
|
}, [
|
|
1443
|
-
|
|
1443
|
+
_(S.$slots, "default")
|
|
1444
1444
|
], 6)
|
|
1445
1445
|
], 16),
|
|
1446
1446
|
(h(), D(J, null, ce(o, (c, v) => ue(Gt, {
|
|
@@ -1451,8 +1451,8 @@ function Jt(t, { expose: n, emit: e }) {
|
|
|
1451
1451
|
autoHideDelay: t.autoHideDelay,
|
|
1452
1452
|
fixedThumb: v === t.direction ? !1 : t.fixedThumb,
|
|
1453
1453
|
type: v,
|
|
1454
|
-
scrollInfo: v === "vertical" ?
|
|
1455
|
-
wrapperEl:
|
|
1454
|
+
scrollInfo: v === "vertical" ? B.value : I.value,
|
|
1455
|
+
wrapperEl: r.value
|
|
1456
1456
|
}, null, 8, ["autoExpand", "autoHide", "autoHideDelay", "fixedThumb", "type", "scrollInfo", "wrapperEl"])), 64))
|
|
1457
1457
|
]));
|
|
1458
1458
|
}
|
|
@@ -1475,13 +1475,64 @@ const Qt = /* @__PURE__ */ Te(Ie(ie({}, qt), {
|
|
|
1475
1475
|
setup: Jt
|
|
1476
1476
|
})), ln = {
|
|
1477
1477
|
__name: "DScrollbars",
|
|
1478
|
+
props: {
|
|
1479
|
+
height: {
|
|
1480
|
+
type: String,
|
|
1481
|
+
default: "200px"
|
|
1482
|
+
},
|
|
1483
|
+
// высота блока
|
|
1484
|
+
class: String,
|
|
1485
|
+
// класс контейнера для установки высоты
|
|
1486
|
+
style: Object,
|
|
1487
|
+
// стиль контейнера
|
|
1488
|
+
contentClass: String,
|
|
1489
|
+
// класс контента для установки отступов, отображения
|
|
1490
|
+
contentStyle: Object,
|
|
1491
|
+
// стиль контента
|
|
1492
|
+
direction: {
|
|
1493
|
+
type: String,
|
|
1494
|
+
default: "vertical"
|
|
1495
|
+
},
|
|
1496
|
+
// horizontal, vertical
|
|
1497
|
+
thumbMinSize: Number,
|
|
1498
|
+
// 48 - минимальный размер скролла
|
|
1499
|
+
thumbMaxSize: Number,
|
|
1500
|
+
// 48 - максимальный размер скролла
|
|
1501
|
+
autoHide: {
|
|
1502
|
+
type: Boolean,
|
|
1503
|
+
default: !0
|
|
1504
|
+
},
|
|
1505
|
+
// true - гасить скролл, если мышь за пределами
|
|
1506
|
+
autoHideDelay: {
|
|
1507
|
+
type: Number,
|
|
1508
|
+
default: 900
|
|
1509
|
+
},
|
|
1510
|
+
// 900 - гасить через, мс
|
|
1511
|
+
autoExpand: {
|
|
1512
|
+
type: Boolean,
|
|
1513
|
+
default: !0
|
|
1514
|
+
}
|
|
1515
|
+
// true - расширить скролл при наведении мыши с 8px до 12px
|
|
1516
|
+
},
|
|
1478
1517
|
setup(t) {
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1518
|
+
const n = t, e = p(() => ({ ...n.style, height: n.height }));
|
|
1519
|
+
return (i, o) => (h(), w(E(Qt), {
|
|
1520
|
+
class: k(n.class),
|
|
1521
|
+
style: C(e.value),
|
|
1522
|
+
contentClass: n.contentClass,
|
|
1523
|
+
contentStyle: n.contentStyle,
|
|
1524
|
+
direction: n.direction,
|
|
1525
|
+
thumbMinSize: n.thumbMinSize,
|
|
1526
|
+
thumbMaxSize: n.thumbMaxSize,
|
|
1527
|
+
autoHide: n.autoHide,
|
|
1528
|
+
autoHideDelay: n.autoHideDelay,
|
|
1529
|
+
autoExpand: n.autoExpand
|
|
1530
|
+
}, {
|
|
1531
|
+
default: H(() => [
|
|
1532
|
+
_(i.$slots, "default")
|
|
1482
1533
|
]),
|
|
1483
1534
|
_: 3
|
|
1484
|
-
}));
|
|
1535
|
+
}, 8, ["class", "style", "contentClass", "contentStyle", "direction", "thumbMinSize", "thumbMaxSize", "autoHide", "autoHideDelay", "autoExpand"]));
|
|
1485
1536
|
}
|
|
1486
1537
|
};
|
|
1487
1538
|
export {
|
|
@@ -1489,12 +1540,12 @@ export {
|
|
|
1489
1540
|
Ae as DBadge,
|
|
1490
1541
|
tn as DButton,
|
|
1491
1542
|
Fe as DCollapse,
|
|
1492
|
-
|
|
1543
|
+
rn as DConfigProvider,
|
|
1493
1544
|
U as DGlobalStore,
|
|
1494
1545
|
Z as DIcon,
|
|
1495
1546
|
F as DIconStore,
|
|
1496
1547
|
nn as DInput,
|
|
1497
|
-
|
|
1548
|
+
an as DLayoutAdmin,
|
|
1498
1549
|
it as DLayoutContent,
|
|
1499
1550
|
nt as DLayoutFooter,
|
|
1500
1551
|
et as DLayoutHeader,
|