doph-js 0.0.56 → 0.0.57
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 +825 -652
- package/dist/dophJs.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/dist/dophJs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useSlots as
|
|
2
|
-
const
|
|
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 B, renderSlot as $, createCommentVNode as N, resolveDynamicComponent as R, createElementVNode as M, toDisplayString as le, withDirectives as se, normalizeStyle as O, vModelText as Ee, Transition as Le, withCtx as P, ref as V, withModifiers as C, resolveComponent as ze, createTextVNode as Ne, createVNode as ue, renderList as ce, reactive as re, getCurrentInstance as ke, watch as K, onUnmounted as ee, mergeProps as Y, defineComponent as Te, shallowRef as A, setBlockTracking as he, vShow as ge, onMounted as Be, watchEffect as Pe } from "vue";
|
|
2
|
+
const Z = {
|
|
3
3
|
__name: "DIcon",
|
|
4
4
|
props: {
|
|
5
5
|
component: [Object, String],
|
|
@@ -7,91 +7,91 @@ const K = {
|
|
|
7
7
|
color: String,
|
|
8
8
|
className: String
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
const { className:
|
|
13
|
-
return
|
|
14
|
-
}),
|
|
15
|
-
const { color:
|
|
16
|
-
return
|
|
17
|
-
}),
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
return typeof
|
|
21
|
-
}),
|
|
10
|
+
setup(t) {
|
|
11
|
+
const n = t, e = de(), i = p(() => {
|
|
12
|
+
const { className: s } = n;
|
|
13
|
+
return s === void 0 ? "icon" : ["icon", s].join(" ");
|
|
14
|
+
}), o = p(() => {
|
|
15
|
+
const { color: s } = n;
|
|
16
|
+
return s === void 0 ? null : s;
|
|
17
|
+
}), l = p(() => {
|
|
18
|
+
const s = n.size ?? null;
|
|
19
|
+
if (s !== void 0)
|
|
20
|
+
return typeof s == "number" || /^\d+$/.test(s) ? `${s}px` : s;
|
|
21
|
+
}), a = p(() => pe(
|
|
22
22
|
"i",
|
|
23
23
|
{
|
|
24
|
-
class:
|
|
24
|
+
class: i.value,
|
|
25
25
|
style: {
|
|
26
|
-
color:
|
|
27
|
-
fontSize:
|
|
26
|
+
color: o.value,
|
|
27
|
+
fontSize: l.value
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
n.component ? pe(n.component) : e
|
|
31
31
|
));
|
|
32
|
-
return (
|
|
32
|
+
return (s, r) => (h(), w(E(a)));
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, F = {
|
|
35
35
|
state: {},
|
|
36
36
|
getters: {
|
|
37
|
-
getIcon(
|
|
38
|
-
return
|
|
37
|
+
getIcon(t) {
|
|
38
|
+
return F.state[t];
|
|
39
39
|
},
|
|
40
40
|
getIcons() {
|
|
41
|
-
return
|
|
41
|
+
return F.state;
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
mutations: {
|
|
45
|
-
addIcon(
|
|
46
|
-
|
|
45
|
+
addIcon(t, n) {
|
|
46
|
+
F.state.name = n;
|
|
47
47
|
},
|
|
48
|
-
addIcons(
|
|
49
|
-
for (const
|
|
50
|
-
|
|
48
|
+
addIcons(t) {
|
|
49
|
+
for (const n in t)
|
|
50
|
+
t.hasOwnProperty(n) && (F.state[n] = t[n]);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
},
|
|
53
|
+
}, He = { key: 1 }, tn = {
|
|
54
54
|
__name: "DButton",
|
|
55
55
|
props: {
|
|
56
56
|
class: String,
|
|
57
57
|
icon: String
|
|
58
58
|
},
|
|
59
59
|
emits: ["click"],
|
|
60
|
-
setup(
|
|
61
|
-
const e =
|
|
62
|
-
|
|
60
|
+
setup(t, { emit: n }) {
|
|
61
|
+
const e = t, i = de(), o = p(() => e.icon ? F.getters.getIcon(e.icon) : null), l = (a) => {
|
|
62
|
+
n("click", a);
|
|
63
63
|
};
|
|
64
|
-
return (
|
|
65
|
-
|
|
64
|
+
return (a, s) => (h(), D(J, null, [
|
|
65
|
+
o.value ? N("", !0) : (h(), D("div", {
|
|
66
66
|
key: 0,
|
|
67
|
-
onClick:
|
|
68
|
-
class:
|
|
67
|
+
onClick: l,
|
|
68
|
+
class: B(["button", e.class])
|
|
69
69
|
}, [
|
|
70
|
-
|
|
70
|
+
$(a.$slots, "default")
|
|
71
71
|
], 2)),
|
|
72
|
-
|
|
72
|
+
o.value ? (h(), D("div", {
|
|
73
73
|
key: 1,
|
|
74
|
-
onClick:
|
|
75
|
-
class:
|
|
74
|
+
onClick: l,
|
|
75
|
+
class: B(["button button-ext", e.class])
|
|
76
76
|
}, [
|
|
77
|
-
e.icon ? (
|
|
77
|
+
e.icon ? (h(), w(R(Z), {
|
|
78
78
|
key: 0,
|
|
79
|
-
component:
|
|
79
|
+
component: o.value,
|
|
80
80
|
color: "inherit"
|
|
81
|
-
}, null, 8, ["component"])) :
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
])) :
|
|
85
|
-
], 2)) :
|
|
81
|
+
}, null, 8, ["component"])) : N("", !0),
|
|
82
|
+
E(i).default ? (h(), D("div", He, [
|
|
83
|
+
$(a.$slots, "default")
|
|
84
|
+
])) : N("", !0)
|
|
85
|
+
], 2)) : N("", !0)
|
|
86
86
|
], 64));
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
-
const
|
|
90
|
-
const e =
|
|
91
|
-
for (const [
|
|
92
|
-
e[
|
|
89
|
+
const fe = (t, n) => {
|
|
90
|
+
const e = t.__vccOpts || t;
|
|
91
|
+
for (const [i, o] of n)
|
|
92
|
+
e[i] = o;
|
|
93
93
|
return e;
|
|
94
|
-
},
|
|
94
|
+
}, Me = { class: "d-input" }, Oe = { class: "label" }, We = ["placeholder"], Ce = {
|
|
95
95
|
__name: "DInput",
|
|
96
96
|
props: {
|
|
97
97
|
label: String,
|
|
@@ -102,40 +102,40 @@ const se = (n, t) => {
|
|
|
102
102
|
modelValue: String
|
|
103
103
|
},
|
|
104
104
|
emits: ["update:modelValue"],
|
|
105
|
-
setup(
|
|
106
|
-
const e =
|
|
105
|
+
setup(t, { emit: n }) {
|
|
106
|
+
const e = t, i = p(() => e.font === "small" ? "d-input-small" : e.font === "big" ? "d-input-big" : ""), o = p({
|
|
107
107
|
get: () => e.modelValue,
|
|
108
|
-
set: (
|
|
109
|
-
|
|
108
|
+
set: (l) => {
|
|
109
|
+
n("update:modelValue", l);
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
|
-
return (
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"onUpdate:modelValue":
|
|
112
|
+
return (l, a) => (h(), D("div", Me, [
|
|
113
|
+
M("div", Oe, le(e.label), 1),
|
|
114
|
+
se(M("input", {
|
|
115
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => o.value = s),
|
|
116
116
|
type: "text",
|
|
117
|
-
class:
|
|
117
|
+
class: B(i.value),
|
|
118
118
|
placeholder: e.placeholder,
|
|
119
|
-
style:
|
|
120
|
-
}, null, 14,
|
|
121
|
-
[
|
|
119
|
+
style: O(e.size === "wide" ? "width:100%" : "")
|
|
120
|
+
}, null, 14, We), [
|
|
121
|
+
[Ee, o.value]
|
|
122
122
|
])
|
|
123
123
|
]));
|
|
124
124
|
}
|
|
125
|
-
},
|
|
125
|
+
}, nn = /* @__PURE__ */ fe(Ce, [["__scopeId", "data-v-11679fd8"]]), Ae = {
|
|
126
126
|
__name: "DBadge",
|
|
127
127
|
props: {
|
|
128
128
|
class: String
|
|
129
129
|
},
|
|
130
|
-
setup(
|
|
131
|
-
const
|
|
132
|
-
return (e,
|
|
133
|
-
class:
|
|
130
|
+
setup(t) {
|
|
131
|
+
const n = t;
|
|
132
|
+
return (e, i) => (h(), D("div", {
|
|
133
|
+
class: B(["badge", n.class])
|
|
134
134
|
}, [
|
|
135
|
-
|
|
135
|
+
$(e.$slots, "default")
|
|
136
136
|
], 2));
|
|
137
137
|
}
|
|
138
|
-
},
|
|
138
|
+
}, W = "0px", Fe = {
|
|
139
139
|
__name: "DCollapse",
|
|
140
140
|
props: {
|
|
141
141
|
duration: {
|
|
@@ -159,8 +159,8 @@ const se = (n, t) => {
|
|
|
159
159
|
default: 1
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
setup(
|
|
163
|
-
const
|
|
162
|
+
setup(t) {
|
|
163
|
+
const n = t, e = (r) => ({
|
|
164
164
|
height: r.style.height,
|
|
165
165
|
width: r.style.width,
|
|
166
166
|
position: r.style.position,
|
|
@@ -172,30 +172,30 @@ const se = (n, t) => {
|
|
|
172
172
|
borderBottomWidth: r.style.borderBottomWidth,
|
|
173
173
|
marginTop: r.style.marginTop,
|
|
174
174
|
marginBottom: r.style.marginBottom
|
|
175
|
-
}),
|
|
176
|
-
const { width:
|
|
177
|
-
r.style.width =
|
|
178
|
-
let { height:
|
|
179
|
-
return r.style.width = d.width, r.style.position = d.position, r.style.visibility = d.visibility, r.style.height =
|
|
180
|
-
},
|
|
181
|
-
const
|
|
182
|
-
r.style.height = d.height,
|
|
183
|
-
r.style.overflow = d.overflow,
|
|
175
|
+
}), i = (r, d) => {
|
|
176
|
+
const { width: u } = getComputedStyle(r);
|
|
177
|
+
r.style.width = u, r.style.position = "absolute", r.style.visibility = "hidden", r.style.height = "";
|
|
178
|
+
let { height: m } = getComputedStyle(r);
|
|
179
|
+
return r.style.width = d.width, r.style.position = d.position, r.style.visibility = d.visibility, r.style.height = W, r.style.overflow = "hidden", d.height && d.height !== W ? d.height : m;
|
|
180
|
+
}, o = (r, d, u, m, y) => {
|
|
181
|
+
const I = r.animate(m, y);
|
|
182
|
+
r.style.height = d.height, I.onfinish = () => {
|
|
183
|
+
r.style.overflow = d.overflow, u();
|
|
184
184
|
};
|
|
185
|
-
},
|
|
185
|
+
}, l = (r, d) => [
|
|
186
186
|
{
|
|
187
|
-
height:
|
|
188
|
-
opacity:
|
|
189
|
-
paddingTop:
|
|
190
|
-
paddingBottom:
|
|
191
|
-
borderTopWidth:
|
|
192
|
-
borderBottomWidth:
|
|
193
|
-
marginTop:
|
|
194
|
-
marginBottom:
|
|
187
|
+
height: W,
|
|
188
|
+
opacity: n.opacityClosed,
|
|
189
|
+
paddingTop: W,
|
|
190
|
+
paddingBottom: W,
|
|
191
|
+
borderTopWidth: W,
|
|
192
|
+
borderBottomWidth: W,
|
|
193
|
+
marginTop: W,
|
|
194
|
+
marginBottom: W
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
height: r,
|
|
198
|
-
opacity:
|
|
198
|
+
opacity: n.opacityOpened,
|
|
199
199
|
paddingTop: d.paddingTop,
|
|
200
200
|
paddingBottom: d.paddingBottom,
|
|
201
201
|
borderTopWidth: d.borderTopWidth,
|
|
@@ -203,29 +203,29 @@ const se = (n, t) => {
|
|
|
203
203
|
marginTop: d.marginTop,
|
|
204
204
|
marginBottom: d.marginBottom
|
|
205
205
|
}
|
|
206
|
-
],
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
const
|
|
213
|
-
|
|
206
|
+
], a = (r, d) => {
|
|
207
|
+
const u = r, m = e(u), y = i(u, m), I = l(y, m), k = { duration: n.duration, easing: n.easingEnter };
|
|
208
|
+
o(u, m, d, I, k);
|
|
209
|
+
}, s = (r, d) => {
|
|
210
|
+
const u = r, m = e(u), { height: y } = getComputedStyle(u);
|
|
211
|
+
u.style.height = y, u.style.overflow = "hidden";
|
|
212
|
+
const I = l(y, m).reverse(), k = { duration: n.duration, easing: n.easingLeave };
|
|
213
|
+
o(u, m, d, I, k);
|
|
214
214
|
};
|
|
215
|
-
return (r, d) => (
|
|
215
|
+
return (r, d) => (h(), w(Le, {
|
|
216
216
|
css: !1,
|
|
217
|
-
onEnter:
|
|
218
|
-
onLeave:
|
|
217
|
+
onEnter: a,
|
|
218
|
+
onLeave: s
|
|
219
219
|
}, {
|
|
220
|
-
default:
|
|
221
|
-
|
|
220
|
+
default: P(() => [
|
|
221
|
+
$(r.$slots, "default")
|
|
222
222
|
]),
|
|
223
223
|
_: 3
|
|
224
224
|
}));
|
|
225
225
|
}
|
|
226
|
-
},
|
|
226
|
+
}, te = {
|
|
227
227
|
data: void 0
|
|
228
|
-
},
|
|
228
|
+
}, me = (t) => t.reduce((n, e) => (n[e] = e) && n, {}), z = me([
|
|
229
229
|
"drag",
|
|
230
230
|
"dragend",
|
|
231
231
|
"dragenter",
|
|
@@ -233,7 +233,7 @@ const se = (n, t) => {
|
|
|
233
233
|
"dragstart",
|
|
234
234
|
"dragover",
|
|
235
235
|
"drop"
|
|
236
|
-
]),
|
|
236
|
+
]), Re = me(["copy", "move", "link", "none"]), Ve = me([
|
|
237
237
|
"none",
|
|
238
238
|
"copy",
|
|
239
239
|
"copyLink",
|
|
@@ -243,58 +243,58 @@ const se = (n, t) => {
|
|
|
243
243
|
"move",
|
|
244
244
|
"all",
|
|
245
245
|
"uninitialized"
|
|
246
|
-
]),
|
|
246
|
+
]), je = {
|
|
247
247
|
__name: "DDrag",
|
|
248
248
|
props: {
|
|
249
249
|
draggable: { type: Boolean, default: !0 },
|
|
250
250
|
transferData: {},
|
|
251
|
-
dropEffect: { validator: (
|
|
252
|
-
effectAllowed: { validator: (
|
|
251
|
+
dropEffect: { validator: (t) => t in Re },
|
|
252
|
+
effectAllowed: { validator: (t) => t in Ve },
|
|
253
253
|
image: String,
|
|
254
254
|
imageXOffset: { type: Number, default: 0 },
|
|
255
255
|
imageYOffset: { type: Number, default: 0 },
|
|
256
256
|
hideImageHtml: { type: Boolean, default: !1 },
|
|
257
257
|
tag: { type: String, default: "div" }
|
|
258
258
|
},
|
|
259
|
-
setup(
|
|
260
|
-
const
|
|
259
|
+
setup(t) {
|
|
260
|
+
const n = t, e = de(), i = V(!1), o = p(() => i && n.transferData), l = p(() => ({ position: "fixed", top: "-1000px" })), a = (s, r) => {
|
|
261
261
|
const d = r.dataTransfer;
|
|
262
|
-
if ([
|
|
263
|
-
if (
|
|
264
|
-
let
|
|
265
|
-
|
|
262
|
+
if ([z.dragenter, z.dragover].includes(s) && n.dropEffect && (d.dropEffect = n.dropEffect), s === z.dragstart) {
|
|
263
|
+
if (n.effectAllowed && (d.effectAllowed = n.effectAllowed), n.image || e.image) {
|
|
264
|
+
let u;
|
|
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
|
-
|
|
267
|
+
n.transferData !== void 0 && (te.data = n.transferData, r.dataTransfer.setData("text", "")), i.value = !0;
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
return (
|
|
271
|
-
draggable:
|
|
272
|
-
onDrag: r[0] || (r[0] = (d) =>
|
|
273
|
-
onDragstart: r[1] || (r[1] =
|
|
274
|
-
onDragenter: r[2] || (r[2] = (d) =>
|
|
275
|
-
onDragleave: r[3] || (r[3] = (d) =>
|
|
276
|
-
onDragend: r[4] || (r[4] = (d) =>
|
|
270
|
+
return (s, r) => (h(), w(R(t.tag), {
|
|
271
|
+
draggable: n.draggable,
|
|
272
|
+
onDrag: r[0] || (r[0] = (d) => a(E(z).drag, d)),
|
|
273
|
+
onDragstart: r[1] || (r[1] = C((d) => a(E(z).dragstart, d), ["stop"])),
|
|
274
|
+
onDragenter: r[2] || (r[2] = (d) => a(E(z).dragenter, d)),
|
|
275
|
+
onDragleave: r[3] || (r[3] = (d) => a(E(z).dragleave, d)),
|
|
276
|
+
onDragend: r[4] || (r[4] = (d) => a(E(z).dragend, d))
|
|
277
277
|
}, {
|
|
278
|
-
default:
|
|
279
|
-
|
|
280
|
-
|
|
278
|
+
default: P(() => [
|
|
279
|
+
$(s.$slots, "default", { transferData: o.value }),
|
|
280
|
+
t.hideImageHtml ? (h(), D("div", {
|
|
281
281
|
key: 0,
|
|
282
|
-
style:
|
|
282
|
+
style: O(l.value)
|
|
283
283
|
}, [
|
|
284
|
-
|
|
285
|
-
], 4)) :
|
|
284
|
+
$(s.$slots, "image", { transferData: o.value })
|
|
285
|
+
], 4)) : $(s.$slots, "image", {
|
|
286
286
|
key: 1,
|
|
287
|
-
transferData:
|
|
287
|
+
transferData: o.value
|
|
288
288
|
})
|
|
289
289
|
]),
|
|
290
290
|
_: 3
|
|
291
291
|
}, 40, ["draggable"]));
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
const
|
|
294
|
+
const Xe = { class: "item-title" }, Ye = { style: { display: "flex", "flex-direction": "row", "justify-content": "flex-end" } }, Ue = {
|
|
295
295
|
key: 0,
|
|
296
296
|
class: "sub-menu"
|
|
297
|
-
},
|
|
297
|
+
}, Ge = {
|
|
298
298
|
__name: "DTreeItem",
|
|
299
299
|
props: {
|
|
300
300
|
model: Object,
|
|
@@ -303,108 +303,108 @@ const Ee = { class: "item-title" }, Be = { style: { display: "flex", "flex-direc
|
|
|
303
303
|
search: String
|
|
304
304
|
},
|
|
305
305
|
emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick"],
|
|
306
|
-
setup(
|
|
307
|
-
const e =
|
|
308
|
-
|
|
309
|
-
},
|
|
310
|
-
|
|
311
|
-
},
|
|
312
|
-
let
|
|
313
|
-
if (
|
|
314
|
-
return
|
|
315
|
-
if (!
|
|
306
|
+
setup(t, { emit: n }) {
|
|
307
|
+
const e = t, i = V(null), o = V(!1), l = V(!1), a = V(!1), s = p(() => e.model.children && e.model.children.length), r = p(() => (f.actions.isTreeExpanded(e.treeId) && (e.model.expanded = e.model.expanded === void 0 ? !0 : e.model.expanded), e.model.expanded)), d = (S) => {
|
|
308
|
+
n("nodeclick", { event: S, model: e.model });
|
|
309
|
+
}, u = (S) => {
|
|
310
|
+
n("nodeclick", S);
|
|
311
|
+
}, m = p(() => (f.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (o.value ? "node-over " : "") + (l.value ? "node-top " : "") + (a.value ? "node-bottom " : "")), y = p(() => e.search ? !1 : e.model.draggable === !0), I = (S) => {
|
|
312
|
+
let b = te.data;
|
|
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, a.value = !1, !1;
|
|
315
|
+
if (!f.state.trees[e.treeId].transfer && b.id !== e.treeId)
|
|
316
316
|
return !1;
|
|
317
|
-
let
|
|
318
|
-
|
|
319
|
-
},
|
|
320
|
-
let
|
|
321
|
-
if (
|
|
317
|
+
let _ = "";
|
|
318
|
+
l.value ? _ = "before" : a.value ? _ = "after" : _ = "inside", f.actions.moveTreeNode(b.id, e.treeId, e.items, b.model.id, e.model.id, _), o.value = !1, l.value = !1, a.value = !1;
|
|
319
|
+
}, k = (S) => {
|
|
320
|
+
let b = te.data;
|
|
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
|
-
|
|
323
|
+
const _ = S.y, L = i.value.getBoundingClientRect().top, x = i.value.getBoundingClientRect().height, g = x / 3;
|
|
324
|
+
_ > L && _ <= L + g ? (o.value = !1, l.value = !0, a.value = !1) : _ < L + x && _ >= L + x - g ? (o.value = !1, l.value = !1, a.value = !0) : (o.value = !0, l.value = !1, a.value = !1);
|
|
325
|
+
}, H = () => {
|
|
326
|
+
o.value = !1, l.value = !1, a.value = !1;
|
|
327
327
|
};
|
|
328
|
-
return (
|
|
329
|
-
const
|
|
330
|
-
return
|
|
328
|
+
return (S, b) => {
|
|
329
|
+
const _ = ze("d-tree-item", !0);
|
|
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:
|
|
335
|
+
onDrop: C(I, ["stop"]),
|
|
336
|
+
onDragenter: b[0] || (b[0] = C(() => {
|
|
337
337
|
}, ["prevent"])),
|
|
338
|
-
onDragover:
|
|
339
|
-
onDragleave:
|
|
338
|
+
onDragover: C(k, ["prevent", "stop"]),
|
|
339
|
+
onDragleave: C(H, ["prevent"])
|
|
340
340
|
}, {
|
|
341
|
-
default:
|
|
342
|
-
var
|
|
341
|
+
default: P(() => {
|
|
342
|
+
var L, x;
|
|
343
343
|
return [
|
|
344
|
-
|
|
344
|
+
M("div", {
|
|
345
345
|
ref_key: "node",
|
|
346
|
-
ref:
|
|
347
|
-
class:
|
|
346
|
+
ref: i,
|
|
347
|
+
class: B(m.value),
|
|
348
348
|
onClick: d
|
|
349
349
|
}, [
|
|
350
|
-
|
|
351
|
-
e.model.icons && e.model.icons.pre &&
|
|
350
|
+
M("div", null, [
|
|
351
|
+
e.model.icons && e.model.icons.pre && s.value && !e.search ? (h(), w(R(Z), {
|
|
352
352
|
key: 0,
|
|
353
|
-
component:
|
|
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:
|
|
357
|
-
}, null, 8, ["component", "color", "class"])) :
|
|
358
|
-
e.model.icons && e.model.icons.pre && !
|
|
356
|
+
class: B(r.value ? "tree-open-pre" : "")
|
|
357
|
+
}, null, 8, ["component", "color", "class"])) : N("", !0),
|
|
358
|
+
e.model.icons && e.model.icons.pre && !s.value && !e.search ? (h(), w(R(Z), {
|
|
359
359
|
key: 1,
|
|
360
|
-
component:
|
|
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:
|
|
364
|
-
}, null, 8, ["component", "class"])) :
|
|
365
|
-
e.model.icons && e.model.icons.icon ? (
|
|
363
|
+
class: B(r.value ? "tree-open-pre" : "")
|
|
364
|
+
}, null, 8, ["component", "class"])) : N("", !0),
|
|
365
|
+
e.model.icons && e.model.icons.icon ? (h(), w(R(Z), {
|
|
366
366
|
key: 2,
|
|
367
|
-
component:
|
|
367
|
+
component: E(F).getters.getIcon(e.model.icons.icon.component),
|
|
368
368
|
color: e.model.icons.icon.color ? e.model.icons.icon.color : "inherit",
|
|
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
|
-
}, null, 8, ["component", "color", "size", "className"])) :
|
|
372
|
-
|
|
373
|
-
|
|
371
|
+
}, null, 8, ["component", "color", "size", "className"])) : N("", !0),
|
|
372
|
+
M("div", Xe, [
|
|
373
|
+
M("div", null, le(E(f).actions.renderTitle(e.treeId, e.model.title)), 1)
|
|
374
374
|
])
|
|
375
375
|
]),
|
|
376
|
-
|
|
377
|
-
((
|
|
376
|
+
M("div", Ye, [
|
|
377
|
+
((L = e.model.badge) == null ? void 0 : L.value) !== void 0 ? (h(), w(R(Ae), {
|
|
378
378
|
key: 0,
|
|
379
|
-
class:
|
|
379
|
+
class: B([(x = e.model.badge) == null ? void 0 : x.class, "badge-sm"])
|
|
380
380
|
}, {
|
|
381
|
-
default:
|
|
382
|
-
|
|
381
|
+
default: P(() => [
|
|
382
|
+
Ne(le(e.model.badge.value), 1)
|
|
383
383
|
]),
|
|
384
384
|
_: 1
|
|
385
|
-
}, 8, ["class"])) :
|
|
386
|
-
e.model.icons && e.model.icons.post &&
|
|
385
|
+
}, 8, ["class"])) : N("", !0),
|
|
386
|
+
e.model.icons && e.model.icons.post && s.value && !e.search ? (h(), w(R(Z), {
|
|
387
387
|
key: 1,
|
|
388
|
-
component:
|
|
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:
|
|
392
|
-
}, null, 8, ["component", "color", "class"])) :
|
|
391
|
+
class: B(r.value ? "tree-open-post" : "")
|
|
392
|
+
}, null, 8, ["component", "color", "class"])) : N("", !0)
|
|
393
393
|
])
|
|
394
394
|
], 2),
|
|
395
|
-
|
|
396
|
-
default:
|
|
397
|
-
|
|
398
|
-
(
|
|
395
|
+
ue(Fe, null, {
|
|
396
|
+
default: P(() => [
|
|
397
|
+
s.value && r.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
|
-
key:
|
|
401
|
-
model:
|
|
400
|
+
key: g.id,
|
|
401
|
+
model: g,
|
|
402
402
|
treeId: e.treeId,
|
|
403
403
|
items: e.items,
|
|
404
404
|
search: e.search,
|
|
405
|
-
onNodeclick:
|
|
405
|
+
onNodeclick: u
|
|
406
406
|
}, null, 8, ["model", "treeId", "items", "search"]))), 128))
|
|
407
|
-
])) :
|
|
407
|
+
])) : N("", !0)
|
|
408
408
|
]),
|
|
409
409
|
_: 1
|
|
410
410
|
})
|
|
@@ -414,22 +414,22 @@ const Ee = { class: "item-title" }, Be = { style: { display: "flex", "flex-direc
|
|
|
414
414
|
}, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"]);
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
},
|
|
418
|
-
function
|
|
419
|
-
return
|
|
417
|
+
}, Ze = /* @__PURE__ */ fe(Ge, [["__scopeId", "data-v-00a53150"]]);
|
|
418
|
+
function Ke(t) {
|
|
419
|
+
return t = t || /* @__PURE__ */ new Map(), {
|
|
420
420
|
/**
|
|
421
421
|
* A Map of event names to registered handler functions.
|
|
422
422
|
*/
|
|
423
|
-
all:
|
|
423
|
+
all: t,
|
|
424
424
|
/**
|
|
425
425
|
* Register an event handler for the given type.
|
|
426
426
|
* @param {string|symbol} type Type of event to listen for, or `'*'` for all events
|
|
427
427
|
* @param {Function} handler Function to call in response to given event
|
|
428
428
|
* @memberOf eventsBus
|
|
429
429
|
*/
|
|
430
|
-
on(
|
|
431
|
-
const
|
|
432
|
-
|
|
430
|
+
on(n, e) {
|
|
431
|
+
const i = t.get(n);
|
|
432
|
+
i ? i.push(e) : t.set(n, [e]);
|
|
433
433
|
},
|
|
434
434
|
/**
|
|
435
435
|
* Remove an event handler for the given type.
|
|
@@ -438,9 +438,9 @@ function Ce(n) {
|
|
|
438
438
|
* @param {Function} [handler] Handler function to remove
|
|
439
439
|
* @memberOf eventsBus
|
|
440
440
|
*/
|
|
441
|
-
off(
|
|
442
|
-
const
|
|
443
|
-
|
|
441
|
+
off(n, e) {
|
|
442
|
+
const i = t.get(n);
|
|
443
|
+
i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : t.set(n, []));
|
|
444
444
|
},
|
|
445
445
|
/**
|
|
446
446
|
* Invoke all handlers for the given type.
|
|
@@ -452,142 +452,142 @@ function Ce(n) {
|
|
|
452
452
|
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
453
453
|
* @memberOf eventsBus
|
|
454
454
|
*/
|
|
455
|
-
emit(
|
|
456
|
-
let
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
}),
|
|
460
|
-
|
|
455
|
+
emit(n, e) {
|
|
456
|
+
let i = t.get(n);
|
|
457
|
+
i && i.slice().map((o) => {
|
|
458
|
+
o(e);
|
|
459
|
+
}), i = t.get("*"), i && i.slice().map((o) => {
|
|
460
|
+
o(n, e);
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
};
|
|
464
464
|
}
|
|
465
|
-
const
|
|
466
|
-
state:
|
|
465
|
+
const j = Ke(), f = {
|
|
466
|
+
state: re({
|
|
467
467
|
trees: {}
|
|
468
468
|
}),
|
|
469
469
|
getters: {
|
|
470
|
-
getItems(
|
|
471
|
-
return
|
|
470
|
+
getItems(t) {
|
|
471
|
+
return f.state.trees[t].items;
|
|
472
472
|
},
|
|
473
|
-
getItemsSelect(
|
|
474
|
-
return
|
|
473
|
+
getItemsSelect(t) {
|
|
474
|
+
return f.state.trees[t].selected;
|
|
475
475
|
},
|
|
476
476
|
// data - ноды, dataId - ID ноды родителя data
|
|
477
|
-
getParentId(
|
|
478
|
-
return e &&
|
|
477
|
+
getParentId(t, n, e, i = "id", o = "children", l = {}) {
|
|
478
|
+
return e && t && (t.find((a) => a[i] === e ? (l.found = n, a) : f.getters.getParentId(a[o], a.id, e, i, o, l)), l.found) ? l.found : !1;
|
|
479
479
|
}
|
|
480
480
|
},
|
|
481
481
|
mutations: {
|
|
482
|
-
setTreeItems(
|
|
483
|
-
|
|
482
|
+
setTreeItems(t, n) {
|
|
483
|
+
f.state.trees[t].items = n;
|
|
484
484
|
},
|
|
485
|
-
setItemSelect(
|
|
486
|
-
|
|
487
|
-
return e !==
|
|
488
|
-
}) :
|
|
485
|
+
setItemSelect(t, n) {
|
|
486
|
+
f.state.trees[t].noSelect || (f.state.trees[t].multiSelect ? f.state.trees[t].selected.includes(n.id) ? f.state.trees[t].selected = f.state.trees[t].selected.filter(function(e) {
|
|
487
|
+
return e !== n.id;
|
|
488
|
+
}) : f.state.trees[t].selected = [...f.state.trees[t].selected, n.id] : f.state.trees[t].selected = [n.id]);
|
|
489
489
|
}
|
|
490
490
|
},
|
|
491
491
|
actions: {
|
|
492
|
-
initTreeStore(
|
|
493
|
-
|
|
492
|
+
initTreeStore(t, n, e, i, o, l) {
|
|
493
|
+
f.state.trees[t] = [], f.state.trees[t].selected = [], f.state.trees[t].noSelect = n, f.state.trees[t].multiSelect = e, f.state.trees[t].expanded = i, f.state.trees[t].transfer = o, f.state.trees[t].renderTitle = l;
|
|
494
494
|
},
|
|
495
|
-
renderTitle(
|
|
496
|
-
return
|
|
495
|
+
renderTitle(t, n) {
|
|
496
|
+
return f.state.trees[t].renderTitle ? f.state.trees[t].renderTitle(n) : n;
|
|
497
497
|
},
|
|
498
|
-
isItemSelected(
|
|
499
|
-
return
|
|
498
|
+
isItemSelected(t, n) {
|
|
499
|
+
return f.state.trees[t].selected.includes(n);
|
|
500
500
|
},
|
|
501
|
-
toggleItem(
|
|
502
|
-
const
|
|
503
|
-
|
|
501
|
+
toggleItem(t, n, e) {
|
|
502
|
+
const i = f.actions.deepSearch(n, e);
|
|
503
|
+
i.expanded = i.expanded === void 0 || !i.expanded, i.children && i.children.length && (i.expanded ? j.emit(`expand-${t}`, { id: t, model: i }) : j.emit(`collapse-${t}`, { id: t, model: i }));
|
|
504
504
|
},
|
|
505
|
-
isTreeExpanded(
|
|
506
|
-
return
|
|
505
|
+
isTreeExpanded(t) {
|
|
506
|
+
return f.state.trees[t].expanded;
|
|
507
507
|
},
|
|
508
|
-
isChildOfParent(
|
|
509
|
-
const
|
|
510
|
-
if (
|
|
511
|
-
for (let
|
|
512
|
-
if (
|
|
508
|
+
isChildOfParent(t, n, e, i) {
|
|
509
|
+
const o = f.actions.deepSearch(n, e);
|
|
510
|
+
if (o && o.children) {
|
|
511
|
+
for (let l = 0; l < o.children.length; l++)
|
|
512
|
+
if (o.children[l].id === i)
|
|
513
513
|
return !0;
|
|
514
514
|
}
|
|
515
515
|
return !1;
|
|
516
516
|
},
|
|
517
517
|
// Является ли нода родителем указанного потомка
|
|
518
|
-
isParentOfChild(
|
|
519
|
-
const
|
|
520
|
-
return !!(
|
|
521
|
-
},
|
|
522
|
-
deepSearch(
|
|
523
|
-
return
|
|
524
|
-
},
|
|
525
|
-
deepSearchByTitle(
|
|
526
|
-
if (
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
}),
|
|
530
|
-
for (let
|
|
518
|
+
isParentOfChild(t, n, e, i) {
|
|
519
|
+
const o = f.actions.deepSearch(n, e);
|
|
520
|
+
return !!(o && o.children && f.actions.deepSearch(o.children, i));
|
|
521
|
+
},
|
|
522
|
+
deepSearch(t, n, e = "id", i = "children", o = {}) {
|
|
523
|
+
return n && t && (t.find((l) => l[e] === n ? (o.found = l, l) : f.actions.deepSearch(l[i], n, e, i, o)), o.found) ? o.found : !1;
|
|
524
|
+
},
|
|
525
|
+
deepSearchByTitle(t, n, e = "title", i = "children", o = []) {
|
|
526
|
+
if (n && t && (t.find((l) => {
|
|
527
|
+
const a = new RegExp(n, "gi");
|
|
528
|
+
l[e].toString().toLowerCase().match(a) !== null && o.push(l), f.actions.deepSearchByTitle(l[i], n, e, i, o);
|
|
529
|
+
}), o)) {
|
|
530
|
+
for (let l = 0; l < o.length; l++)
|
|
531
531
|
;
|
|
532
|
-
return
|
|
532
|
+
return o;
|
|
533
533
|
}
|
|
534
|
-
return
|
|
535
|
-
},
|
|
536
|
-
moveTreeNode(
|
|
537
|
-
const
|
|
538
|
-
|
|
539
|
-
},
|
|
540
|
-
insertTreeNode(
|
|
541
|
-
if (
|
|
542
|
-
for (let
|
|
543
|
-
if (
|
|
544
|
-
let
|
|
545
|
-
return
|
|
534
|
+
return o;
|
|
535
|
+
},
|
|
536
|
+
moveTreeNode(t, n, e, i, o, l) {
|
|
537
|
+
const a = f.actions.deleteTreeNode(e, i);
|
|
538
|
+
f.actions.insertTreeNode(e, o, a, l), j.emit(`move-${n}`, { fromTreeId: t, toTreeId: n, moved: a.id, target: o, position: l });
|
|
539
|
+
},
|
|
540
|
+
insertTreeNode(t, n, e, i) {
|
|
541
|
+
if (t)
|
|
542
|
+
for (let o = 0; o < t.length; o++) {
|
|
543
|
+
if (t[o].id === n) {
|
|
544
|
+
let a = o;
|
|
545
|
+
return i === "after" ? (a++, t.splice(a, 0, e)) : i === "before" ? t.splice(a, 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
|
-
const
|
|
548
|
-
if (
|
|
549
|
-
return
|
|
547
|
+
const l = this.insertTreeNode(t[o].children, n, e, i);
|
|
548
|
+
if (l)
|
|
549
|
+
return l;
|
|
550
550
|
}
|
|
551
551
|
},
|
|
552
|
-
deleteTreeNode(
|
|
553
|
-
if (
|
|
554
|
-
for (let e = 0; e <
|
|
555
|
-
if (
|
|
556
|
-
const
|
|
557
|
-
return
|
|
552
|
+
deleteTreeNode(t, n) {
|
|
553
|
+
if (t)
|
|
554
|
+
for (let e = 0; e < t.length; e++) {
|
|
555
|
+
if (t[e].id === n) {
|
|
556
|
+
const o = t[e];
|
|
557
|
+
return t.splice(e, 1), o;
|
|
558
558
|
}
|
|
559
|
-
const
|
|
560
|
-
if (
|
|
561
|
-
return
|
|
559
|
+
const i = f.actions.deleteTreeNode(t[e].children, n);
|
|
560
|
+
if (i)
|
|
561
|
+
return i;
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
},
|
|
565
|
+
}, qe = {
|
|
566
566
|
__name: "DDrop",
|
|
567
567
|
props: {
|
|
568
568
|
tag: { type: String, default: "div" }
|
|
569
569
|
},
|
|
570
|
-
emits: Object.keys(
|
|
571
|
-
setup(
|
|
572
|
-
let e =
|
|
573
|
-
const
|
|
574
|
-
e =
|
|
570
|
+
emits: Object.keys(z),
|
|
571
|
+
setup(t, { emit: n }) {
|
|
572
|
+
let e = re({});
|
|
573
|
+
const i = V("false"), o = V(null), l = /* @__PURE__ */ new Set(), a = p(() => i.value && e), s = (r, d) => {
|
|
574
|
+
e = te.data, n(r, d, e), r === z.dragenter && (l.size || d.target === o.value) && l.add(d.target), r === z.dragleave && l.delete(d.target), r === z.drop && l.clear(), i.value = !!l.size;
|
|
575
575
|
};
|
|
576
|
-
return (r, d) => (
|
|
576
|
+
return (r, d) => (h(), w(R(t.tag), {
|
|
577
577
|
ref_key: "el",
|
|
578
|
-
ref:
|
|
579
|
-
onDragenter: d[0] || (d[0] = (
|
|
580
|
-
onDragleave: d[1] || (d[1] = (
|
|
581
|
-
onDragover: d[2] || (d[2] =
|
|
582
|
-
onDrop: d[3] || (d[3] =
|
|
578
|
+
ref: o,
|
|
579
|
+
onDragenter: d[0] || (d[0] = (u) => s(E(z).dragenter, u)),
|
|
580
|
+
onDragleave: d[1] || (d[1] = (u) => s(E(z).dragleave, u)),
|
|
581
|
+
onDragover: d[2] || (d[2] = C((u) => s(E(z).dragover, u), ["prevent"])),
|
|
582
|
+
onDrop: d[3] || (d[3] = C((u) => s(E(z).drop, u), ["prevent"]))
|
|
583
583
|
}, {
|
|
584
|
-
default:
|
|
585
|
-
|
|
584
|
+
default: P(() => [
|
|
585
|
+
$(r.$slots, "default", { transferData: a.value })
|
|
586
586
|
]),
|
|
587
587
|
_: 3
|
|
588
588
|
}, 544));
|
|
589
589
|
}
|
|
590
|
-
},
|
|
590
|
+
}, Je = {
|
|
591
591
|
__name: "DTree",
|
|
592
592
|
props: {
|
|
593
593
|
items: Array,
|
|
@@ -606,57 +606,57 @@ const X = Ce(), u = {
|
|
|
606
606
|
// строка поиска
|
|
607
607
|
},
|
|
608
608
|
emits: ["select", "collapse", "expand", "move"],
|
|
609
|
-
setup(
|
|
610
|
-
const e =
|
|
611
|
-
|
|
612
|
-
const
|
|
613
|
-
console.log(
|
|
609
|
+
setup(t, { emit: n }) {
|
|
610
|
+
const e = t, i = ke().uid;
|
|
611
|
+
f.actions.initTreeStore(i, e.noSelect, e.multiSelect, e.expanded, e.transfer, e.renderTitle);
|
|
612
|
+
const o = (s, r) => {
|
|
613
|
+
console.log(s, r);
|
|
614
614
|
};
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
}),
|
|
618
|
-
|
|
619
|
-
}),
|
|
620
|
-
|
|
621
|
-
}),
|
|
622
|
-
|
|
615
|
+
j.on(`select-${i}`, (s) => {
|
|
616
|
+
n("select", s);
|
|
617
|
+
}), j.on(`expand-${i}`, (s) => {
|
|
618
|
+
n("expand", s);
|
|
619
|
+
}), j.on(`collapse-${i}`, (s) => {
|
|
620
|
+
n("collapse", s);
|
|
621
|
+
}), j.on(`move-${i}`, (s) => {
|
|
622
|
+
n("move", s);
|
|
623
623
|
});
|
|
624
|
-
const
|
|
625
|
-
|
|
624
|
+
const l = p(() => e.search ? f.actions.deepSearchByTitle(e.items, e.search) : e.items), a = (s = null) => {
|
|
625
|
+
f.mutations.setItemSelect(i, s.model), f.actions.toggleItem(i, e.items, s.model.id);
|
|
626
626
|
};
|
|
627
|
-
return (
|
|
627
|
+
return (s, r) => (h(), w(qe, {
|
|
628
628
|
class: "tree",
|
|
629
629
|
tag: "ul",
|
|
630
|
-
onDrop:
|
|
630
|
+
onDrop: C(o, ["stop"])
|
|
631
631
|
}, {
|
|
632
|
-
default:
|
|
633
|
-
(
|
|
632
|
+
default: P(() => [
|
|
633
|
+
(h(!0), D(J, null, ce(l.value, (d) => (h(), w(Ze, {
|
|
634
634
|
key: d.id,
|
|
635
635
|
model: d,
|
|
636
|
-
treeId:
|
|
636
|
+
treeId: E(i),
|
|
637
637
|
items: e.items,
|
|
638
638
|
search: e.search,
|
|
639
|
-
onNodeclick:
|
|
639
|
+
onNodeclick: a
|
|
640
640
|
}, null, 8, ["model", "treeId", "items", "search"]))), 128))
|
|
641
641
|
]),
|
|
642
642
|
_: 1
|
|
643
643
|
}, 8, ["onDrop"]));
|
|
644
644
|
}
|
|
645
645
|
};
|
|
646
|
-
const
|
|
646
|
+
const Qe = {
|
|
647
647
|
__name: "DAccordion",
|
|
648
648
|
props: {
|
|
649
649
|
items: Array
|
|
650
650
|
},
|
|
651
|
-
setup(
|
|
652
|
-
const
|
|
653
|
-
return (e,
|
|
651
|
+
setup(t) {
|
|
652
|
+
const n = t;
|
|
653
|
+
return (e, i) => (h(), w(Je, {
|
|
654
654
|
class: "accordion",
|
|
655
|
-
items:
|
|
655
|
+
items: n.items,
|
|
656
656
|
"no-select": !0
|
|
657
657
|
}, null, 8, ["items"]));
|
|
658
658
|
}
|
|
659
|
-
},
|
|
659
|
+
}, on = /* @__PURE__ */ fe(Qe, [["__scopeId", "data-v-4c920528"]]), et = {
|
|
660
660
|
__name: "DLayoutHeader",
|
|
661
661
|
props: {
|
|
662
662
|
fixed: {
|
|
@@ -689,19 +689,19 @@ const ze = {
|
|
|
689
689
|
},
|
|
690
690
|
useMinWidthLayout: Boolean
|
|
691
691
|
},
|
|
692
|
-
setup(
|
|
693
|
-
const
|
|
694
|
-
const { fixed:
|
|
695
|
-
return `position:${
|
|
692
|
+
setup(t) {
|
|
693
|
+
const n = t, e = p(() => {
|
|
694
|
+
const { fixed: i, zIndex: o, minWidth: l, height: a, paddingLeft: s, transitionDuration: r, transitionTimingFunction: d } = n, u = i ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${l}px;` : "";
|
|
695
|
+
return `position:${u};z-index:${o};${m}height:${a}px;padding-left:${s}px;transition-duration:${r}ms;transition-timing-function:${d};`;
|
|
696
696
|
});
|
|
697
|
-
return (
|
|
697
|
+
return (i, o) => (h(), D("header", {
|
|
698
698
|
class: "d-layout-header",
|
|
699
|
-
style:
|
|
699
|
+
style: O(e.value)
|
|
700
700
|
}, [
|
|
701
|
-
|
|
701
|
+
$(i.$slots, "default")
|
|
702
702
|
], 4));
|
|
703
703
|
}
|
|
704
|
-
},
|
|
704
|
+
}, tt = {
|
|
705
705
|
__name: "DLayoutTab",
|
|
706
706
|
props: {
|
|
707
707
|
fixed: {
|
|
@@ -738,19 +738,19 @@ const ze = {
|
|
|
738
738
|
},
|
|
739
739
|
useMinWidthLayout: Boolean
|
|
740
740
|
},
|
|
741
|
-
setup(
|
|
742
|
-
const
|
|
743
|
-
const { fixed:
|
|
744
|
-
return `position:${
|
|
741
|
+
setup(t) {
|
|
742
|
+
const n = t, e = p(() => {
|
|
743
|
+
const { fixed: i, top: o, zIndex: l, minWidth: a, height: s, paddingLeft: r, transitionDuration: d, transitionTimingFunction: u } = n, m = i ? "fixed" : "static", y = n.useMinWidthLayout ? `min-width: ${a}px;` : "";
|
|
744
|
+
return `position:${m};top:${o}px;z-index:${l};${y}height:${s}px;padding-left:${r}px;transition-duration:${d}ms;transition-timing-function:${u};`;
|
|
745
745
|
});
|
|
746
|
-
return (
|
|
746
|
+
return (i, o) => (h(), D("div", {
|
|
747
747
|
class: "d-layout-tab",
|
|
748
|
-
style:
|
|
748
|
+
style: O(e.value)
|
|
749
749
|
}, [
|
|
750
|
-
|
|
750
|
+
$(i.$slots, "default")
|
|
751
751
|
], 4));
|
|
752
752
|
}
|
|
753
|
-
},
|
|
753
|
+
}, nt = {
|
|
754
754
|
__name: "DLayoutFooter",
|
|
755
755
|
props: {
|
|
756
756
|
fixed: {
|
|
@@ -783,19 +783,19 @@ const ze = {
|
|
|
783
783
|
},
|
|
784
784
|
useMinWidthLayout: Boolean
|
|
785
785
|
},
|
|
786
|
-
setup(
|
|
787
|
-
const
|
|
788
|
-
const { fixed:
|
|
789
|
-
return `position:${
|
|
786
|
+
setup(t) {
|
|
787
|
+
const n = t, e = p(() => {
|
|
788
|
+
const { fixed: i, zIndex: o, minWidth: l, height: a, paddingLeft: s, transitionDuration: r, transitionTimingFunction: d } = n, u = i ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${l}px;` : "";
|
|
789
|
+
return `position:${u};z-index:${o};${m}height:${a}px;padding-left:${s}px;transition-duration:${r}ms;transition-timing-function:${d};`;
|
|
790
790
|
});
|
|
791
|
-
return (
|
|
791
|
+
return (i, o) => (h(), D("footer", {
|
|
792
792
|
class: "d-layout-footer",
|
|
793
|
-
style:
|
|
793
|
+
style: O(e.value)
|
|
794
794
|
}, [
|
|
795
|
-
|
|
795
|
+
$(i.$slots, "default")
|
|
796
796
|
], 4));
|
|
797
797
|
}
|
|
798
|
-
},
|
|
798
|
+
}, ot = {
|
|
799
799
|
__name: "DLayoutSidebar",
|
|
800
800
|
props: {
|
|
801
801
|
zIndex: {
|
|
@@ -823,19 +823,19 @@ const ze = {
|
|
|
823
823
|
default: !1
|
|
824
824
|
}
|
|
825
825
|
},
|
|
826
|
-
setup(
|
|
827
|
-
const
|
|
828
|
-
const { zIndex:
|
|
829
|
-
return `z-index:${
|
|
826
|
+
setup(t) {
|
|
827
|
+
const n = t, e = p(() => {
|
|
828
|
+
const { zIndex: i, width: o, paddingTop: l, transitionDuration: a, transitionTimingFunction: s } = n;
|
|
829
|
+
return `z-index:${i};width:${o}px;padding-top:${l}px;transition-duration:${a}ms;transition-timing-function:${s};`;
|
|
830
830
|
});
|
|
831
|
-
return (
|
|
831
|
+
return (i, o) => (h(), D("aside", {
|
|
832
832
|
class: "d-layout-sidebar",
|
|
833
|
-
style:
|
|
833
|
+
style: O(e.value)
|
|
834
834
|
}, [
|
|
835
|
-
|
|
835
|
+
$(i.$slots, "default")
|
|
836
836
|
], 4));
|
|
837
837
|
}
|
|
838
|
-
},
|
|
838
|
+
}, it = {
|
|
839
839
|
__name: "DLayoutContent",
|
|
840
840
|
props: {
|
|
841
841
|
paddingTop: {
|
|
@@ -860,49 +860,49 @@ const ze = {
|
|
|
860
860
|
default: "ease-in-out"
|
|
861
861
|
}
|
|
862
862
|
},
|
|
863
|
-
setup(
|
|
864
|
-
const
|
|
865
|
-
const { paddingTop:
|
|
866
|
-
return `padding-top:${
|
|
863
|
+
setup(t) {
|
|
864
|
+
const n = t, e = p(() => {
|
|
865
|
+
const { paddingTop: i, paddingBottom: o, paddingLeft: l, transitionDuration: a, transitionTimingFunction: s } = n, r = `overflow:${n.overflowHidden ? "hidden" : "visible"};`;
|
|
866
|
+
return `padding-top:${i}px;padding-bottom:${o}px;padding-left:${l}px;${r}transition-duration:${a}ms;transition-timing-function:${s};`;
|
|
867
867
|
});
|
|
868
|
-
return (
|
|
869
|
-
style:
|
|
868
|
+
return (i, o) => (h(), D("main", {
|
|
869
|
+
style: O(e.value),
|
|
870
870
|
class: "d-layout-content"
|
|
871
871
|
}, [
|
|
872
|
-
|
|
872
|
+
$(i.$slots, "default")
|
|
873
873
|
], 4));
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
|
-
function
|
|
877
|
-
const
|
|
878
|
-
let
|
|
879
|
-
function
|
|
880
|
-
|
|
881
|
-
}
|
|
882
|
-
function i() {
|
|
883
|
-
var c;
|
|
884
|
-
const p = ((c = document.scrollingElement) === null || c === void 0 ? void 0 : c.scrollLeft) || 0;
|
|
885
|
-
s(p);
|
|
876
|
+
function rt(t) {
|
|
877
|
+
const n = V(0), e = p(() => `transform: translateX(${-n.value}px);`);
|
|
878
|
+
let i = !1;
|
|
879
|
+
function o(u) {
|
|
880
|
+
n.value = u;
|
|
886
881
|
}
|
|
887
882
|
function l() {
|
|
888
|
-
|
|
883
|
+
var u;
|
|
884
|
+
const m = ((u = document.scrollingElement) === null || u === void 0 ? void 0 : u.scrollLeft) || 0;
|
|
885
|
+
o(m);
|
|
889
886
|
}
|
|
890
887
|
function a() {
|
|
891
|
-
|
|
888
|
+
l();
|
|
889
|
+
}
|
|
890
|
+
function s() {
|
|
891
|
+
document.addEventListener("scroll", l);
|
|
892
892
|
}
|
|
893
893
|
function r() {
|
|
894
|
-
|
|
894
|
+
i && document.removeEventListener("scroll", l);
|
|
895
895
|
}
|
|
896
896
|
function d() {
|
|
897
|
-
|
|
897
|
+
a(), s(), i = !0;
|
|
898
898
|
}
|
|
899
|
-
return
|
|
900
|
-
|
|
901
|
-
}, { immediate: !0 }),
|
|
899
|
+
return K(t, (u) => {
|
|
900
|
+
u ? d() : r();
|
|
901
|
+
}, { immediate: !0 }), ee(() => {
|
|
902
902
|
r();
|
|
903
903
|
}), e;
|
|
904
904
|
}
|
|
905
|
-
const
|
|
905
|
+
const at = 1001, lt = 999, st = 998, rn = {
|
|
906
906
|
__name: "DLayoutAdmin",
|
|
907
907
|
props: {
|
|
908
908
|
mode: {
|
|
@@ -992,129 +992,129 @@ const Ye = 1001, Ze = 999, Xe = 998, Qe = {
|
|
|
992
992
|
}
|
|
993
993
|
},
|
|
994
994
|
emits: ["update:sidebar-collapse"],
|
|
995
|
-
setup(
|
|
996
|
-
const e =
|
|
997
|
-
const { transitionDuration:
|
|
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 = rt(o), a = p(() => e.fixedHeaderAndTab ? l.value : ""), s = p(() => e.fixedFooter ? l.value : ""), r = p(() => {
|
|
997
|
+
const { transitionDuration: g, transitionTimingFunction: c } = e;
|
|
998
998
|
return {
|
|
999
|
-
transitionDuration:
|
|
1000
|
-
transitionTimingFunction:
|
|
999
|
+
transitionDuration: g,
|
|
1000
|
+
transitionTimingFunction: c
|
|
1001
1001
|
};
|
|
1002
|
-
}), d =
|
|
1002
|
+
}), d = p(() => e.mode === "vertical"), u = p(() => e.isMobile || d.value ? 1003 : 1e3), m = p({
|
|
1003
1003
|
get() {
|
|
1004
1004
|
return e.sidebarCollapse;
|
|
1005
1005
|
},
|
|
1006
|
-
set(
|
|
1007
|
-
|
|
1006
|
+
set(g) {
|
|
1007
|
+
n("update:sidebar-collapse", g);
|
|
1008
1008
|
}
|
|
1009
1009
|
});
|
|
1010
1010
|
function y() {
|
|
1011
|
-
|
|
1011
|
+
m.value = !0;
|
|
1012
1012
|
}
|
|
1013
|
-
const
|
|
1014
|
-
const { transitionDuration:
|
|
1015
|
-
return `background-color:${e.maskBg};transition-duration:${
|
|
1016
|
-
}),
|
|
1017
|
-
const { sidebarWidth:
|
|
1018
|
-
return e.sidebarVisible ?
|
|
1019
|
-
}),
|
|
1013
|
+
const I = p(() => e.isMobile && !m.value), k = p(() => {
|
|
1014
|
+
const { transitionDuration: g, transitionTimingFunction: c } = e;
|
|
1015
|
+
return `background-color:${e.maskBg};transition-duration:${g}ms;transition-timing-function:${c};`;
|
|
1016
|
+
}), H = p(() => {
|
|
1017
|
+
const { sidebarWidth: g, sidebarCollapsedWidth: c } = e, v = e.isMobile ? 0 : c, T = m.value ? v : g;
|
|
1018
|
+
return e.sidebarVisible ? T : 0;
|
|
1019
|
+
}), S = p(() => e.isMobile ? 0 : H.value), b = p(() => d.value ? S.value : 0), _ = p(
|
|
1020
1020
|
() => !e.isMobile && !d.value && e.headerVisible ? e.headerHeight : 0
|
|
1021
|
-
),
|
|
1022
|
-
let
|
|
1023
|
-
return e.fixedHeaderAndTab && (e.headerVisible && (
|
|
1024
|
-
}),
|
|
1025
|
-
return (
|
|
1021
|
+
), L = p(() => {
|
|
1022
|
+
let g = 0;
|
|
1023
|
+
return e.fixedHeaderAndTab && (e.headerVisible && (g += e.headerHeight), e.tabVisible && (g += e.tabHeight)), g;
|
|
1024
|
+
}), x = p(() => e.fixedFooter && e.footerVisible ? e.footerHeight : 0);
|
|
1025
|
+
return (g, c) => (h(), D("div", {
|
|
1026
1026
|
class: "d-layout",
|
|
1027
|
-
style:
|
|
1027
|
+
style: O(i.value)
|
|
1028
1028
|
}, [
|
|
1029
|
-
|
|
1030
|
-
fixed:
|
|
1031
|
-
"z-index":
|
|
1032
|
-
"min-width":
|
|
1033
|
-
height:
|
|
1034
|
-
"padding-left":
|
|
1035
|
-
style:
|
|
1029
|
+
t.headerVisible ? (h(), w(et, Y({ key: 0 }, r.value, {
|
|
1030
|
+
fixed: t.fixedHeaderAndTab,
|
|
1031
|
+
"z-index": at,
|
|
1032
|
+
"min-width": t.minWidth,
|
|
1033
|
+
height: t.headerHeight,
|
|
1034
|
+
"padding-left": b.value,
|
|
1035
|
+
style: a.value
|
|
1036
1036
|
}), {
|
|
1037
|
-
default:
|
|
1038
|
-
|
|
1037
|
+
default: P(() => [
|
|
1038
|
+
$(g.$slots, "header")
|
|
1039
1039
|
]),
|
|
1040
1040
|
_: 3
|
|
1041
|
-
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) :
|
|
1042
|
-
|
|
1043
|
-
fixed:
|
|
1044
|
-
"z-index":
|
|
1045
|
-
"min-width":
|
|
1046
|
-
top:
|
|
1047
|
-
height:
|
|
1048
|
-
"padding-left":
|
|
1049
|
-
style:
|
|
1041
|
+
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : N("", !0),
|
|
1042
|
+
t.tabVisible ? (h(), w(tt, Y({ key: 1 }, r.value, {
|
|
1043
|
+
fixed: t.fixedHeaderAndTab,
|
|
1044
|
+
"z-index": lt,
|
|
1045
|
+
"min-width": t.minWidth,
|
|
1046
|
+
top: t.headerHeight,
|
|
1047
|
+
height: t.tabHeight,
|
|
1048
|
+
"padding-left": S.value,
|
|
1049
|
+
style: a.value
|
|
1050
1050
|
}), {
|
|
1051
|
-
default:
|
|
1052
|
-
|
|
1051
|
+
default: P(() => [
|
|
1052
|
+
$(g.$slots, "tab")
|
|
1053
1053
|
]),
|
|
1054
1054
|
_: 3
|
|
1055
|
-
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) :
|
|
1056
|
-
|
|
1057
|
-
"z-index":
|
|
1058
|
-
width:
|
|
1059
|
-
"padding-top":
|
|
1055
|
+
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : N("", !0),
|
|
1056
|
+
t.sidebarVisible ? (h(), w(ot, Y({ key: 2 }, r.value, {
|
|
1057
|
+
"z-index": u.value,
|
|
1058
|
+
width: H.value,
|
|
1059
|
+
"padding-top": _.value
|
|
1060
1060
|
}), {
|
|
1061
|
-
default:
|
|
1062
|
-
|
|
1061
|
+
default: P(() => [
|
|
1062
|
+
$(g.$slots, "sidebar")
|
|
1063
1063
|
]),
|
|
1064
1064
|
_: 3
|
|
1065
|
-
}, 16, ["z-index", "width", "padding-top"])) :
|
|
1066
|
-
|
|
1065
|
+
}, 16, ["z-index", "width", "padding-top"])) : N("", !0),
|
|
1066
|
+
I.value ? (h(), D("div", {
|
|
1067
1067
|
key: 3,
|
|
1068
1068
|
class: "d-layout-sidebar-mask",
|
|
1069
|
-
style:
|
|
1069
|
+
style: O(k.value),
|
|
1070
1070
|
onClick: y
|
|
1071
|
-
}, null, 4)) :
|
|
1072
|
-
|
|
1073
|
-
"padding-top":
|
|
1074
|
-
"padding-bottom":
|
|
1075
|
-
"padding-left":
|
|
1076
|
-
"overflow-hidden":
|
|
1071
|
+
}, null, 4)) : N("", !0),
|
|
1072
|
+
ue(it, Y(r.value, {
|
|
1073
|
+
"padding-top": L.value,
|
|
1074
|
+
"padding-bottom": x.value,
|
|
1075
|
+
"padding-left": S.value,
|
|
1076
|
+
"overflow-hidden": t.addMainOverflowHidden
|
|
1077
1077
|
}), {
|
|
1078
|
-
default:
|
|
1079
|
-
|
|
1078
|
+
default: P(() => [
|
|
1079
|
+
$(g.$slots, "default")
|
|
1080
1080
|
]),
|
|
1081
1081
|
_: 3
|
|
1082
1082
|
}, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
|
|
1083
|
-
|
|
1084
|
-
fixed:
|
|
1085
|
-
"z-index":
|
|
1086
|
-
"min-width":
|
|
1087
|
-
height:
|
|
1088
|
-
"padding-left":
|
|
1089
|
-
style:
|
|
1083
|
+
t.footerVisible ? (h(), w(nt, Y({ key: 4 }, r.value, {
|
|
1084
|
+
fixed: t.fixedFooter,
|
|
1085
|
+
"z-index": st,
|
|
1086
|
+
"min-width": t.minWidth,
|
|
1087
|
+
height: t.footerHeight,
|
|
1088
|
+
"padding-left": S.value,
|
|
1089
|
+
style: s.value
|
|
1090
1090
|
}), {
|
|
1091
|
-
default:
|
|
1092
|
-
|
|
1091
|
+
default: P(() => [
|
|
1092
|
+
$(g.$slots, "footer")
|
|
1093
1093
|
]),
|
|
1094
1094
|
_: 3
|
|
1095
|
-
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) :
|
|
1095
|
+
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : N("", !0)
|
|
1096
1096
|
], 4));
|
|
1097
1097
|
}
|
|
1098
|
-
},
|
|
1099
|
-
state:
|
|
1098
|
+
}, U = {
|
|
1099
|
+
state: re({
|
|
1100
1100
|
theme: "dark"
|
|
1101
1101
|
}),
|
|
1102
1102
|
getters: {
|
|
1103
1103
|
theme() {
|
|
1104
|
-
return
|
|
1104
|
+
return U.state.theme;
|
|
1105
1105
|
}
|
|
1106
1106
|
},
|
|
1107
1107
|
mutations: {
|
|
1108
|
-
setTheme(
|
|
1109
|
-
|
|
1108
|
+
setTheme(t) {
|
|
1109
|
+
U.state.theme = t, document.documentElement.setAttribute("class", t);
|
|
1110
1110
|
}
|
|
1111
1111
|
},
|
|
1112
1112
|
actions: {
|
|
1113
1113
|
toggleTheme() {
|
|
1114
|
-
|
|
1114
|
+
U.state.theme = U.state.theme === "dark" ? "light" : "dark", document.documentElement.setAttribute("class", U.state.theme);
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
|
-
},
|
|
1117
|
+
}, an = {
|
|
1118
1118
|
__name: "DConfigProvider",
|
|
1119
1119
|
props: {
|
|
1120
1120
|
theme: {
|
|
@@ -1122,216 +1122,389 @@ const Ye = 1001, Ze = 999, Xe = 998, Qe = {
|
|
|
1122
1122
|
default: "dark"
|
|
1123
1123
|
}
|
|
1124
1124
|
},
|
|
1125
|
-
setup(
|
|
1126
|
-
const
|
|
1127
|
-
return
|
|
1125
|
+
setup(t) {
|
|
1126
|
+
const n = t;
|
|
1127
|
+
return U.mutations.setTheme(n.theme), (e, i) => $(e.$slots, "default");
|
|
1128
1128
|
}
|
|
1129
1129
|
};
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
_ = !1;
|
|
1212
|
-
};
|
|
1213
|
-
_ || (E.apply(C, R), _ = !0, setTimeout(Y, g));
|
|
1214
|
-
};
|
|
1215
|
-
}
|
|
1216
|
-
this.SetupScroll = function() {
|
|
1217
|
-
let g = document.getElementById(this.selector), _ = g.style.cssText;
|
|
1218
|
-
g.classList.add("lms_scrollable"), g.style.cssText = _ + " width:" + t.config.dimensions.width + ";height:" + t.config.dimensions.height;
|
|
1219
|
-
let C = g.innerHTML;
|
|
1220
|
-
g.innerHTML = "", g.insertAdjacentHTML("afterbegin", "<div id='scroll_inner_" + o + "' class='lms_content_wrapper'></div>");
|
|
1221
|
-
let R = document.getElementById("scroll_inner_" + o);
|
|
1222
|
-
R.insertAdjacentHTML("afterbegin", "<div id='scroll_content_" + o + "' class='lms_content'></div> <div style='display:none;' id='lms_track_" + o + "' class='lms_scroll_track'></div>");
|
|
1223
|
-
let Y = document.getElementById("scroll_content_" + o), ee = document.getElementById("lms_track_" + o);
|
|
1224
|
-
Y.innerHTML = C, this.scrollTrack = ee, this.scrollElement = R, this.scrollContent = Y, this.mainElement = g, l = g, a = R, y = T(), ee.insertAdjacentHTML("beforeend", "<div id='lms_scroller_" + o + "' class='lms_scroller'></div>"), c = document.getElementById("lms_scroller_" + o), this.scroller = c, c.addEventListener("mousedown", N), window.addEventListener("mouseup", H), window.addEventListener("mousemove", h), y / l.offsetHeight < 1 && (c.style.height = y + "px", this.scrollTrack.style.display = "block", l.className += " lms_showScroll"), a.addEventListener("scroll", w), U() ? (t.config.scroll.autoHide == !0 && i.hideElement(c, 0), l.addEventListener("touchstart", function() {
|
|
1225
|
-
typeof i.onTouchStart == "function" && i.onTouchStart(), t.config.scroll.autoHide == !0 && i.hideElement(c, 1);
|
|
1226
|
-
}), l.addEventListener("touchend", function() {
|
|
1227
|
-
typeof i.onTouchStop == "function" && i.onTouchStop(), t.config.scroll.autoHide == !0 && i.hideElement(c, 0);
|
|
1228
|
-
})) : (ee.addEventListener("click", k), t.config.scroll.autoHide == !0 && (this.hideElement(c, 0), l.addEventListener("mouseover", function() {
|
|
1229
|
-
i.hideElement(c, 1);
|
|
1230
|
-
}), l.addEventListener("mouseout", function() {
|
|
1231
|
-
i.hideElement(c, 0);
|
|
1232
|
-
}))), typeof this.onComplete == "function" && this.onComplete();
|
|
1233
|
-
}, this.SetupScroll();
|
|
1234
|
-
var Q = J(function() {
|
|
1235
|
-
F();
|
|
1236
|
-
}, 10);
|
|
1237
|
-
window.addEventListener("resize", Q);
|
|
1130
|
+
var dt = typeof global == "object" && global && global.Object === Object && global;
|
|
1131
|
+
const ut = dt;
|
|
1132
|
+
var ct = typeof self == "object" && self && self.Object === Object && self, ft = ut || ct || Function("return this")();
|
|
1133
|
+
const _e = ft;
|
|
1134
|
+
var mt = _e.Symbol;
|
|
1135
|
+
const ne = mt;
|
|
1136
|
+
var $e = Object.prototype, pt = $e.hasOwnProperty, ht = $e.toString, G = ne ? ne.toStringTag : void 0;
|
|
1137
|
+
function gt(t) {
|
|
1138
|
+
var n = pt.call(t, G), e = t[G];
|
|
1139
|
+
try {
|
|
1140
|
+
t[G] = void 0;
|
|
1141
|
+
var i = !0;
|
|
1142
|
+
} catch {
|
|
1143
|
+
}
|
|
1144
|
+
var o = ht.call(t);
|
|
1145
|
+
return i && (n ? t[G] = e : delete t[G]), o;
|
|
1146
|
+
}
|
|
1147
|
+
var vt = Object.prototype, yt = vt.toString;
|
|
1148
|
+
function bt(t) {
|
|
1149
|
+
return yt.call(t);
|
|
1150
|
+
}
|
|
1151
|
+
var xt = "[object Null]", St = "[object Undefined]", ve = ne ? ne.toStringTag : void 0;
|
|
1152
|
+
function Tt(t) {
|
|
1153
|
+
return t == null ? t === void 0 ? St : xt : ve && ve in Object(t) ? gt(t) : bt(t);
|
|
1154
|
+
}
|
|
1155
|
+
function _t(t) {
|
|
1156
|
+
return t != null && typeof t == "object";
|
|
1157
|
+
}
|
|
1158
|
+
var $t = "[object Symbol]";
|
|
1159
|
+
function Dt(t) {
|
|
1160
|
+
return typeof t == "symbol" || _t(t) && Tt(t) == $t;
|
|
1161
|
+
}
|
|
1162
|
+
var wt = /\s/;
|
|
1163
|
+
function It(t) {
|
|
1164
|
+
for (var n = t.length; n-- && wt.test(t.charAt(n)); )
|
|
1165
|
+
;
|
|
1166
|
+
return n;
|
|
1167
|
+
}
|
|
1168
|
+
var Et = /^\s+/;
|
|
1169
|
+
function Lt(t) {
|
|
1170
|
+
return t && t.slice(0, It(t) + 1).replace(Et, "");
|
|
1171
|
+
}
|
|
1172
|
+
function oe(t) {
|
|
1173
|
+
var n = typeof t;
|
|
1174
|
+
return t != null && (n == "object" || n == "function");
|
|
1175
|
+
}
|
|
1176
|
+
var ye = 0 / 0, zt = /^[-+]0x[0-9a-f]+$/i, Nt = /^0b[01]+$/i, kt = /^0o[0-7]+$/i, Bt = parseInt;
|
|
1177
|
+
function q(t) {
|
|
1178
|
+
if (typeof t == "number")
|
|
1179
|
+
return t;
|
|
1180
|
+
if (Dt(t))
|
|
1181
|
+
return ye;
|
|
1182
|
+
if (oe(t)) {
|
|
1183
|
+
var n = typeof t.valueOf == "function" ? t.valueOf() : t;
|
|
1184
|
+
t = oe(n) ? n + "" : n;
|
|
1185
|
+
}
|
|
1186
|
+
if (typeof t != "string")
|
|
1187
|
+
return t === 0 ? t : +t;
|
|
1188
|
+
t = Lt(t);
|
|
1189
|
+
var e = Nt.test(t);
|
|
1190
|
+
return e || kt.test(t) ? Bt(t.slice(2), e ? 2 : 8) : zt.test(t) ? ye : +t;
|
|
1191
|
+
}
|
|
1192
|
+
function Pt(t, n, e) {
|
|
1193
|
+
return t === t && (e !== void 0 && (t = t <= e ? t : e), n !== void 0 && (t = t >= n ? t : n)), t;
|
|
1194
|
+
}
|
|
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), Pt(q(t), n, e);
|
|
1197
|
+
}
|
|
1198
|
+
var Ht = function() {
|
|
1199
|
+
return _e.Date.now();
|
|
1200
|
+
};
|
|
1201
|
+
const ae = Ht;
|
|
1202
|
+
var Mt = "Expected a function", Ot = Math.max, Wt = Math.min;
|
|
1203
|
+
function De(t, n, e) {
|
|
1204
|
+
var i, o, l, a, s, r, d = 0, u = !1, m = !1, y = !0;
|
|
1205
|
+
if (typeof t != "function")
|
|
1206
|
+
throw new TypeError(Mt);
|
|
1207
|
+
n = q(n) || 0, oe(e) && (u = !!e.leading, m = "maxWait" in e, l = m ? Ot(q(e.maxWait) || 0, n) : l, y = "trailing" in e ? !!e.trailing : y);
|
|
1208
|
+
function I(c) {
|
|
1209
|
+
var v = i, T = o;
|
|
1210
|
+
return i = o = void 0, d = c, a = t.apply(T, v), a;
|
|
1238
1211
|
}
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
*/
|
|
1242
|
-
// Scroll to specific value
|
|
1243
|
-
scrollTo(t) {
|
|
1244
|
-
this.scroller.style.top = "0px", this.scrollElement.scrollTop = 0, this.scroller.style.top = t + "px", this.scrollElement.scrollTop = t;
|
|
1212
|
+
function k(c) {
|
|
1213
|
+
return d = c, s = setTimeout(b, n), u ? I(c) : a;
|
|
1245
1214
|
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
this.scrollContent.remove(), this.scrollElement.remove(), this.mainElement.innerHTML = t, this.mainElement.classList.remove("lms_scrollable"), this.mainElement.classList.remove("lms_showScroll");
|
|
1215
|
+
function H(c) {
|
|
1216
|
+
var v = c - r, T = c - d, X = n - v;
|
|
1217
|
+
return m ? Wt(X, l - T) : X;
|
|
1250
1218
|
}
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1219
|
+
function S(c) {
|
|
1220
|
+
var v = c - r, T = c - d;
|
|
1221
|
+
return r === void 0 || v >= n || v < 0 || m && T >= l;
|
|
1254
1222
|
}
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1223
|
+
function b() {
|
|
1224
|
+
var c = ae();
|
|
1225
|
+
if (S(c))
|
|
1226
|
+
return _(c);
|
|
1227
|
+
s = setTimeout(b, H(c));
|
|
1258
1228
|
}
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
function e(l) {
|
|
1262
|
-
typeof l == "function" && l();
|
|
1263
|
-
}
|
|
1264
|
-
var o = t.position;
|
|
1265
|
-
if (o == null)
|
|
1266
|
-
var o = "beforeend";
|
|
1267
|
-
if (t.items && typeof t.items == "object")
|
|
1268
|
-
for (var s = Object.keys(t.items).length, i = 0; i < s; i++)
|
|
1269
|
-
this.scrollContent.insertAdjacentHTML(o, t.items[i].content);
|
|
1270
|
-
this.refresh(), typeof t.onComplete == "function" && e(t.onComplete);
|
|
1229
|
+
function _(c) {
|
|
1230
|
+
return s = void 0, y && i ? I(c) : (i = o = void 0, a);
|
|
1271
1231
|
}
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
*/
|
|
1275
|
-
// Get main element Id
|
|
1276
|
-
get mainElementId() {
|
|
1277
|
-
return "scroll_content_" + this.randomID;
|
|
1232
|
+
function L() {
|
|
1233
|
+
s !== void 0 && clearTimeout(s), d = 0, i = r = o = s = void 0;
|
|
1278
1234
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
return "lms_scroller_" + this.randomID;
|
|
1235
|
+
function x() {
|
|
1236
|
+
return s === void 0 ? a : _(ae());
|
|
1282
1237
|
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1238
|
+
function g() {
|
|
1239
|
+
var c = ae(), v = S(c);
|
|
1240
|
+
if (i = arguments, o = this, r = c, v) {
|
|
1241
|
+
if (s === void 0)
|
|
1242
|
+
return k(r);
|
|
1243
|
+
if (m)
|
|
1244
|
+
return clearTimeout(s), s = setTimeout(b, n), I(r);
|
|
1245
|
+
}
|
|
1246
|
+
return s === void 0 && (s = setTimeout(b, n)), a;
|
|
1286
1247
|
}
|
|
1248
|
+
return g.cancel = L, g.flush = x, g;
|
|
1287
1249
|
}
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1250
|
+
var Ct = "Expected a function";
|
|
1251
|
+
function we(t, n, e) {
|
|
1252
|
+
var i = !0, o = !0;
|
|
1253
|
+
if (typeof t != "function")
|
|
1254
|
+
throw new TypeError(Ct);
|
|
1255
|
+
return oe(e) && (i = "leading" in e ? !!e.leading : i, o = "trailing" in e ? !!e.trailing : o), De(t, n, {
|
|
1256
|
+
leading: i,
|
|
1257
|
+
maxWait: n,
|
|
1258
|
+
trailing: o
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
var At = Object.defineProperty, Ft = Object.defineProperties, Rt = Object.getOwnPropertyDescriptors, be = Object.getOwnPropertySymbols, Vt = Object.prototype.hasOwnProperty, jt = Object.prototype.propertyIsEnumerable, xe = (t, n, e) => n in t ? At(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e, ie = (t, n) => {
|
|
1262
|
+
for (var e in n || (n = {}))
|
|
1263
|
+
Vt.call(n, e) && xe(t, e, n[e]);
|
|
1264
|
+
if (be)
|
|
1265
|
+
for (var e of be(n))
|
|
1266
|
+
jt.call(n, e) && xe(t, e, n[e]);
|
|
1267
|
+
return t;
|
|
1268
|
+
}, Ie = (t, n) => Ft(t, Rt(n));
|
|
1269
|
+
const Xt = ["onPointerdown"], Yt = {
|
|
1270
|
+
name: "ScrollbarThumb"
|
|
1271
|
+
};
|
|
1272
|
+
function Ut(t, { expose: n }) {
|
|
1273
|
+
const e = t;
|
|
1274
|
+
let i = null, o = A(null);
|
|
1275
|
+
const l = { pageX: 0, pageY: 0, scrollPos: 0 };
|
|
1276
|
+
let a = null;
|
|
1277
|
+
const s = () => {
|
|
1278
|
+
i = setTimeout(() => {
|
|
1279
|
+
o.value && o.value.classList.remove("scrollbar__thumbPlaceholder--scrolling"), i = null;
|
|
1280
|
+
}, e.autoHideDelay);
|
|
1281
|
+
}, r = () => {
|
|
1282
|
+
i !== null && clearTimeout(i);
|
|
1283
|
+
};
|
|
1284
|
+
ee(r);
|
|
1285
|
+
const d = we((c) => {
|
|
1286
|
+
c.stopPropagation(), c.preventDefault();
|
|
1287
|
+
const v = e.type === "horizontal" ? "pageX" : "pageY", T = (c[v] - l[v]) / e.scrollInfo.wrapperMainSize * e.scrollInfo.contentMainSize;
|
|
1288
|
+
e.wrapperEl.scrollTo({ [e.type === "horizontal" ? "left" : "top"]: l.scrollPos + T, behavior: "auto" });
|
|
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 a == "number" && o.value.releasePointerCapture(a), a = null;
|
|
1291
|
+
}, m = (c) => {
|
|
1292
|
+
c.ctrlKey || c.button !== 0 || (r(), l.pageX = c.pageX, l.pageY = c.pageY, l.scrollPos = e.wrapperEl[e.type === "horizontal" ? "scrollLeft" : "scrollTop"], a = c == null ? void 0 : c.pointerId, o.value.setPointerCapture(a), 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
|
+
};
|
|
1294
|
+
n({
|
|
1295
|
+
autoHideAfterScroll: () => {
|
|
1296
|
+
r(), o.value && o.value.classList.add("scrollbar__thumbPlaceholder--scrolling"), s();
|
|
1297
|
+
}
|
|
1298
|
+
});
|
|
1299
|
+
let I = A(!1), k = A(!1), H = A(null), S = null, b = null, _ = p(() => e.fixedThumb && !k.value);
|
|
1300
|
+
const L = ([c]) => k.value = c.isIntersecting, x = ([c]) => I.value = c.isIntersecting, g = () => {
|
|
1301
|
+
S && (S.disconnect(), S = null), b && (b.disconnect(), b = null);
|
|
1302
|
+
};
|
|
1303
|
+
return K(() => [e.fixedThumb, e.wrapperEl], () => {
|
|
1304
|
+
if (!e.fixedThumb || !e.wrapperEl)
|
|
1305
|
+
return g();
|
|
1306
|
+
g(), b = new IntersectionObserver(x, { threshold: [0, 0.5] }), b.observe(e.wrapperEl), S = new IntersectionObserver(L), S.observe(H.value);
|
|
1307
|
+
}), ee(g), (c, v) => (h(), D(J, null, [
|
|
1308
|
+
se(M("div", {
|
|
1309
|
+
class: B([
|
|
1310
|
+
"scrollbar__thumbPlaceholder",
|
|
1311
|
+
`scrollbar__thumbPlaceholder--${t.type}`,
|
|
1312
|
+
{
|
|
1313
|
+
"scrollbar__thumbPlaceholder--autoHide": t.autoHide,
|
|
1314
|
+
"scrollbar__thumbPlaceholder--autoExpand": t.autoExpand
|
|
1304
1315
|
}
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1316
|
+
]),
|
|
1317
|
+
style: O({
|
|
1318
|
+
width: t.type === "horizontal" ? `${t.scrollInfo.thumbSize}px` : "",
|
|
1319
|
+
height: t.type === "vertical" ? `${t.scrollInfo.thumbSize}px` : "",
|
|
1320
|
+
position: _.value ? "fixed" : "absolute",
|
|
1321
|
+
[t.type === "vertical" ? "top" : "left"]: _.value ? `${t.scrollInfo.boundaryDistance + 3}px` : "3px"
|
|
1322
|
+
}),
|
|
1323
|
+
ref: (T, X) => {
|
|
1324
|
+
X.thumbEl = T, o.value = T;
|
|
1325
|
+
},
|
|
1326
|
+
onPointerdown: C(m, ["stop"])
|
|
1309
1327
|
}, [
|
|
1310
|
-
v(
|
|
1311
|
-
|
|
1328
|
+
v[0] || (he(-1), v[0] = M("div", {
|
|
1329
|
+
class: B(["scrollbar__thumb", `scrollbar__thumb--${t.type}`])
|
|
1330
|
+
}, null, 2), he(1), v[0])
|
|
1331
|
+
], 46, Xt), [
|
|
1332
|
+
[ge, !!t.scrollInfo.thumbSize && (t.fixedThumb ? I.value : !0)]
|
|
1333
|
+
]),
|
|
1334
|
+
e.fixedThumb ? se((h(), D("div", {
|
|
1335
|
+
key: 0,
|
|
1336
|
+
ref: (T, X) => {
|
|
1337
|
+
X.shepherdEl = T, H.value = T;
|
|
1338
|
+
},
|
|
1339
|
+
class: B(["scrollbar__shepherd", `scrollbar__shepherd--${t.type}`])
|
|
1340
|
+
}, null, 2)), [
|
|
1341
|
+
[ge, !!t.scrollInfo.thumbSize]
|
|
1342
|
+
]) : N("", !0)
|
|
1343
|
+
], 64));
|
|
1344
|
+
}
|
|
1345
|
+
const Gt = /* @__PURE__ */ Te(Ie(ie({}, Yt), {
|
|
1346
|
+
props: {
|
|
1347
|
+
type: null,
|
|
1348
|
+
autoExpand: null,
|
|
1349
|
+
autoHide: null,
|
|
1350
|
+
autoHideDelay: null,
|
|
1351
|
+
fixedThumb: null,
|
|
1352
|
+
scrollInfo: null,
|
|
1353
|
+
wrapperEl: null
|
|
1354
|
+
},
|
|
1355
|
+
setup: Ut
|
|
1356
|
+
})), Zt = {
|
|
1357
|
+
wait: 333,
|
|
1358
|
+
type: "debounce"
|
|
1359
|
+
};
|
|
1360
|
+
function Se(...t) {
|
|
1361
|
+
const n = "value" in (t == null ? void 0 : t[0]);
|
|
1362
|
+
let e;
|
|
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), a = n ? t[0] : A(null), s = re({ left: 0, top: 0, right: 0, bottom: 0, width: 0, height: 0, x: 0, y: 0 }), r = () => {
|
|
1365
|
+
const y = a.value.getBoundingClientRect();
|
|
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
|
+
};
|
|
1368
|
+
let d = null, u = null;
|
|
1369
|
+
const m = () => {
|
|
1370
|
+
d && window.removeEventListener("resize", d), u && (u.disconnect(), u = null);
|
|
1371
|
+
};
|
|
1372
|
+
return Pe(() => {
|
|
1373
|
+
a.value && (m(), d = r, 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(a.value));
|
|
1374
|
+
}), ee(m), n ? s : [a, s];
|
|
1375
|
+
}
|
|
1376
|
+
const Kt = { class: "scrollbar__wrapper" }, qt = {
|
|
1377
|
+
name: "CustomScrollbar",
|
|
1378
|
+
inheritAttrs: !1
|
|
1379
|
+
};
|
|
1380
|
+
function Jt(t, { expose: n, emit: e }) {
|
|
1381
|
+
const i = t, o = {
|
|
1382
|
+
horizontal: { el: null, instance: null },
|
|
1383
|
+
vertical: { el: null, instance: null }
|
|
1384
|
+
}, l = (x, g) => {
|
|
1385
|
+
o[g].instance || (o[g].instance = x);
|
|
1386
|
+
};
|
|
1387
|
+
let a = A(null), s = A(null);
|
|
1388
|
+
Be(() => {
|
|
1389
|
+
var x;
|
|
1390
|
+
const g = Array.from((x = a.value.parentElement) == null ? void 0 : x.childNodes);
|
|
1391
|
+
for (const c in o)
|
|
1392
|
+
o[c].el = g.find((v) => {
|
|
1393
|
+
var T;
|
|
1394
|
+
return (T = v == null ? void 0 : v.classList) == null ? void 0 : T.contains(`scrollbar__thumbPlaceholder--${c}`);
|
|
1395
|
+
});
|
|
1396
|
+
});
|
|
1397
|
+
const r = Se(a, { wait: i.throttleWait, type: i.throttleType, callback: y }), d = Se(s, { wait: i.throttleWait, type: i.throttleType, callback: y });
|
|
1398
|
+
let u = A(0), m = A(0);
|
|
1399
|
+
function y() {
|
|
1400
|
+
u.value = Math.max(a.value.scrollHeight - r.height | 0, 0), m.value = Math.max(a.value.scrollWidth - r.width | 0, 0);
|
|
1401
|
+
}
|
|
1402
|
+
let I = p(() => ({
|
|
1403
|
+
thumbSize: m.value ? Q(r.width / a.value.scrollWidth * r.width, i.thumbMinSize > r.width ? 48 : i.thumbMinSize, i.thumbMaxSize) : 0,
|
|
1404
|
+
contentMainSize: d.width,
|
|
1405
|
+
wrapperMainSize: r.width,
|
|
1406
|
+
boundaryDistance: Math.abs(r.left)
|
|
1407
|
+
})), k = p(() => ({
|
|
1408
|
+
thumbSize: u.value ? Q(r.height / a.value.scrollHeight * r.height, i.thumbMinSize > r.height ? 48 : i.thumbMinSize, i.thumbMaxSize) : 0,
|
|
1409
|
+
contentMainSize: d.height,
|
|
1410
|
+
wrapperMainSize: r.height,
|
|
1411
|
+
boundaryDistance: Math.abs(r.top)
|
|
1412
|
+
})), H = p(() => r.height - k.value.thumbSize - 5), S = p(() => r.width - I.value.thumbSize - 5);
|
|
1413
|
+
const b = () => {
|
|
1414
|
+
m.value && (o.horizontal.el.style.transform = `translate3d(${a.value.scrollLeft / m.value * S.value}px, 0, 0)`, o.horizontal.instance.autoHideAfterScroll()), u.value && (o.vertical.el.style.transform = `translate3d(0, ${a.value.scrollTop / u.value * H.value}px, 0)`, o.vertical.instance.autoHideAfterScroll());
|
|
1415
|
+
};
|
|
1416
|
+
K(() => [m.value, u.value], b);
|
|
1417
|
+
const _ = (x) => {
|
|
1418
|
+
x.stopPropagation();
|
|
1419
|
+
const g = a.value.scrollLeft, c = a.value.scrollTop, v = Q(g + ((x == null ? void 0 : x.deltaX) || 0), 0, m.value) | 0, T = Q(c + ((x == null ? void 0 : x.deltaY) || 0), 0, u.value) | 0;
|
|
1420
|
+
a.value.scrollLeft = v, a.value.scrollTop = T, m.value && (o.horizontal.el.style.transform = `translate3d(${v / m.value * S.value}px, 0, 0)`, o.horizontal.instance.autoHideAfterScroll()), u.value && (o.vertical.el.style.transform = `translate3d(0, ${T / u.value * H.value}px, 0)`, o.vertical.instance.autoHideAfterScroll()), e("scroll", { target: a.value, scrollLeft: v, scrollTop: T });
|
|
1421
|
+
}, L = (x) => {
|
|
1422
|
+
i.simulateScroll ? _(x) : b();
|
|
1423
|
+
};
|
|
1424
|
+
return K(r, () => e("wrapperResize", r)), K(d, () => e("contentResize", d)), n({
|
|
1425
|
+
scrollEl: a
|
|
1426
|
+
}), (x, g) => (h(), D("div", Kt, [
|
|
1427
|
+
M("div", Y({
|
|
1428
|
+
ref: (c, v) => {
|
|
1429
|
+
v.wrapperEl = c, a.value = c;
|
|
1430
|
+
},
|
|
1431
|
+
class: "scrollbar__scroller"
|
|
1432
|
+
}, x.$attrs, {
|
|
1433
|
+
onWheel: L,
|
|
1434
|
+
onScroll: L
|
|
1435
|
+
}), [
|
|
1436
|
+
M("div", {
|
|
1437
|
+
ref: (c, v) => {
|
|
1438
|
+
v.contentEl = c, s.value = c;
|
|
1439
|
+
},
|
|
1440
|
+
class: B(["scrollbar__content", t.contentClass, { "scrollbar__content--fixedThumb": t.fixedThumb, [`scrollbar__content--${t.direction}`]: t.direction }]),
|
|
1441
|
+
style: O(t.contentStyle)
|
|
1442
|
+
}, [
|
|
1443
|
+
$(x.$slots, "default")
|
|
1444
|
+
], 6)
|
|
1445
|
+
], 16),
|
|
1446
|
+
(h(), D(J, null, ce(o, (c, v) => ue(Gt, {
|
|
1447
|
+
ref: (T) => l(T, v),
|
|
1448
|
+
key: v,
|
|
1449
|
+
autoExpand: t.autoExpand,
|
|
1450
|
+
autoHide: t.autoHide,
|
|
1451
|
+
autoHideDelay: t.autoHideDelay,
|
|
1452
|
+
fixedThumb: v === t.direction ? !1 : t.fixedThumb,
|
|
1453
|
+
type: v,
|
|
1454
|
+
scrollInfo: v === "vertical" ? k.value : I.value,
|
|
1455
|
+
wrapperEl: a.value
|
|
1456
|
+
}, null, 8, ["autoExpand", "autoHide", "autoHideDelay", "fixedThumb", "type", "scrollInfo", "wrapperEl"])), 64))
|
|
1457
|
+
]));
|
|
1458
|
+
}
|
|
1459
|
+
const Qt = /* @__PURE__ */ Te(Ie(ie({}, qt), {
|
|
1460
|
+
props: {
|
|
1461
|
+
contentClass: null,
|
|
1462
|
+
contentStyle: null,
|
|
1463
|
+
direction: { default: "vertical" },
|
|
1464
|
+
thumbMinSize: { default: 48 },
|
|
1465
|
+
thumbMaxSize: { default: 1 / 0 },
|
|
1466
|
+
autoHide: { default: !0 },
|
|
1467
|
+
autoHideDelay: { default: 900 },
|
|
1468
|
+
autoExpand: { default: !0 },
|
|
1469
|
+
fixedThumb: null,
|
|
1470
|
+
throttleType: { default: "debounce" },
|
|
1471
|
+
throttleWait: { default: 333 },
|
|
1472
|
+
simulateScroll: null
|
|
1473
|
+
},
|
|
1474
|
+
emits: ["wrapperResize", "contentResize", "scroll"],
|
|
1475
|
+
setup: Jt
|
|
1476
|
+
})), ln = {
|
|
1477
|
+
__name: "DScrollbars",
|
|
1478
|
+
setup(t) {
|
|
1479
|
+
return (n, e) => (h(), w(E(Qt), { style: { height: "200px" } }, {
|
|
1480
|
+
default: P(() => [
|
|
1481
|
+
$(n.$slots, "default")
|
|
1482
|
+
]),
|
|
1483
|
+
_: 3
|
|
1484
|
+
}));
|
|
1312
1485
|
}
|
|
1313
1486
|
};
|
|
1314
1487
|
export {
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1488
|
+
on as DAccordion,
|
|
1489
|
+
Ae as DBadge,
|
|
1490
|
+
tn as DButton,
|
|
1491
|
+
Fe as DCollapse,
|
|
1492
|
+
an as DConfigProvider,
|
|
1493
|
+
U as DGlobalStore,
|
|
1494
|
+
Z as DIcon,
|
|
1495
|
+
F as DIconStore,
|
|
1496
|
+
nn as DInput,
|
|
1497
|
+
rn as DLayoutAdmin,
|
|
1498
|
+
it as DLayoutContent,
|
|
1499
|
+
nt as DLayoutFooter,
|
|
1500
|
+
et as DLayoutHeader,
|
|
1501
|
+
ot as DLayoutSidebar,
|
|
1502
|
+
tt as DLayoutTab,
|
|
1503
|
+
ln as DScrollbars,
|
|
1504
|
+
te as DTransferStore,
|
|
1505
|
+
Je as DTree,
|
|
1506
|
+
Ze as DTreeItem,
|
|
1507
|
+
f as DTreeStore,
|
|
1508
|
+
j as emitter,
|
|
1509
|
+
Ke as eventsBus
|
|
1337
1510
|
};
|