doph-js 0.0.41 → 0.0.43

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { useSlots as J, computed as m, h as X, openBlock as f, createBlock as v, unref as h, createElementBlock as D, Fragment as G, normalizeClass as L, renderSlot as y, createCommentVNode as $, createVNode as K, createElementVNode as O, Transition as oe, withCtx as B, ref as W, resolveDynamicComponent as M, withModifiers as C, normalizeStyle as H, resolveComponent as ie, toDisplayString as q, createTextVNode as ae, renderList as Q, reactive as U, getCurrentInstance as se, watch as re, onUnmounted as de, mergeProps as V } from "vue";
1
+ import { useSlots as Q, computed as p, h as X, openBlock as f, createBlock as v, unref as h, createElementBlock as x, Fragment as G, normalizeClass as W, renderSlot as y, createCommentVNode as T, createVNode as K, createElementVNode as C, toDisplayString as U, withDirectives as oe, normalizeStyle as k, vModelText as ie, Transition as ae, withCtx as B, ref as z, resolveDynamicComponent as E, withModifiers as H, resolveComponent as se, createTextVNode as re, renderList as ee, reactive as j, getCurrentInstance as de, watch as le, onUnmounted as ue, mergeProps as P } from "vue";
2
2
  const R = {
3
3
  __name: "DIcon",
4
4
  props: {
@@ -7,10 +7,10 @@ const R = {
7
7
  color: String
8
8
  },
9
9
  setup(t) {
10
- const n = t, e = J(), o = m(() => {
10
+ const n = t, e = Q(), o = p(() => {
11
11
  const { color: s } = n;
12
12
  return s === void 0 ? null : s;
13
- }), i = m(() => {
13
+ }), i = p(() => {
14
14
  const s = n.size ?? null;
15
15
  if (s !== void 0)
16
16
  return typeof s == "number" || /^\d+$/.test(s) ? `${s}px` : s;
@@ -27,7 +27,7 @@ const R = {
27
27
  );
28
28
  return (s, c) => (f(), v(h(r)));
29
29
  }
30
- }, Ce = {
30
+ }, Ve = {
31
31
  __name: "DButton",
32
32
  props: {
33
33
  class: String,
@@ -44,59 +44,93 @@ const R = {
44
44
  const i = (r) => {
45
45
  n("click", r);
46
46
  };
47
- return (r, s) => (f(), D(G, null, [
48
- h(o) ? $("", !0) : (f(), D("div", {
47
+ return (r, s) => (f(), x(G, null, [
48
+ h(o) ? T("", !0) : (f(), x("div", {
49
49
  key: 0,
50
50
  onClick: i,
51
- class: L(["button", e.class])
51
+ class: W(["button", e.class])
52
52
  }, [
53
53
  y(r.$slots, "default")
54
54
  ], 2)),
55
- h(o) ? (f(), D("div", {
55
+ h(o) ? (f(), x("div", {
56
56
  key: 1,
57
57
  onClick: i,
58
- class: L(["button button-ext", e.class])
58
+ class: W(["button button-ext", e.class])
59
59
  }, [
60
60
  K(h(o)),
61
- O("div", null, [
61
+ C("div", null, [
62
62
  y(r.$slots, "default")
63
63
  ])
64
- ], 2)) : $("", !0)
64
+ ], 2)) : T("", !0)
65
65
  ], 64));
66
66
  }
67
- }, z = {
67
+ };
68
+ const q = (t, n) => {
69
+ const e = t.__vccOpts || t;
70
+ for (const [o, i] of n)
71
+ e[o] = i;
72
+ return e;
73
+ }, ce = { class: "d-input" }, fe = { class: "label" }, pe = ["placeholder"], me = {
74
+ __name: "DInput",
75
+ props: {
76
+ label: String,
77
+ placeholder: String,
78
+ size: String,
79
+ modelValue: String
80
+ },
81
+ emits: ["update:modelValue"],
82
+ setup(t, { emit: n }) {
83
+ const e = t, o = p({
84
+ get: () => e.modelValue,
85
+ set: (i) => {
86
+ n("update:modelValue", i);
87
+ }
88
+ });
89
+ return (i, r) => (f(), x("div", ce, [
90
+ C("div", fe, U(e.label), 1),
91
+ oe(C("input", {
92
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => o.value = s),
93
+ type: "text",
94
+ placeholder: e.placeholder,
95
+ style: k(e.size === "wide" ? "width:100%" : "")
96
+ }, null, 12, pe), [
97
+ [ie, o.value]
98
+ ])
99
+ ]));
100
+ }
101
+ }, Ae = /* @__PURE__ */ q(me, [["__scopeId", "data-v-5d2cb864"]]), F = {
68
102
  state: {},
69
103
  getters: {
70
104
  getIcon(t) {
71
- return z.state[t];
105
+ return F.state[t];
72
106
  },
73
107
  getIcons() {
74
- return z.state;
108
+ return F.state;
75
109
  }
76
110
  },
77
111
  mutations: {
78
112
  addIcon(t, n) {
79
- z.state.name = n;
113
+ F.state.name = n;
80
114
  },
81
115
  addIcons(t) {
82
116
  for (const n in t)
83
- t.hasOwnProperty(n) && (z.state[n] = t[n]);
117
+ t.hasOwnProperty(n) && (F.state[n] = t[n]);
84
118
  }
85
119
  }
86
- }, le = {
120
+ }, ge = {
87
121
  __name: "DBadge",
88
122
  props: {
89
123
  class: String
90
124
  },
91
125
  setup(t) {
92
126
  const n = t;
93
- return (e, o) => (f(), D("div", {
94
- class: L(["badge", n.class])
127
+ return (e, o) => (f(), x("div", {
128
+ class: W(["badge", n.class])
95
129
  }, [
96
130
  y(e.$slots, "default")
97
131
  ], 2));
98
132
  }
99
- }, w = "0px", ue = {
133
+ }, I = "0px", he = {
100
134
  __name: "DCollapse",
101
135
  props: {
102
136
  duration: {
@@ -136,23 +170,23 @@ const R = {
136
170
  }), o = (a, d) => {
137
171
  const { width: l } = getComputedStyle(a);
138
172
  a.style.width = l, a.style.position = "absolute", a.style.visibility = "hidden", a.style.height = "";
139
- let { height: p } = getComputedStyle(a);
140
- return a.style.width = d.width, a.style.position = d.position, a.style.visibility = d.visibility, a.style.height = w, a.style.overflow = "hidden", d.height && d.height !== w ? d.height : p;
141
- }, i = (a, d, l, p, _) => {
142
- const N = a.animate(p, _);
173
+ let { height: m } = getComputedStyle(a);
174
+ return a.style.width = d.width, a.style.position = d.position, a.style.visibility = d.visibility, a.style.height = I, a.style.overflow = "hidden", d.height && d.height !== I ? d.height : m;
175
+ }, i = (a, d, l, m, $) => {
176
+ const N = a.animate(m, $);
143
177
  a.style.height = d.height, N.onfinish = () => {
144
178
  a.style.overflow = d.overflow, l();
145
179
  };
146
180
  }, r = (a, d) => [
147
181
  {
148
- height: w,
182
+ height: I,
149
183
  opacity: n.opacityClosed,
150
- paddingTop: w,
151
- paddingBottom: w,
152
- borderTopWidth: w,
153
- borderBottomWidth: w,
154
- marginTop: w,
155
- marginBottom: w
184
+ paddingTop: I,
185
+ paddingBottom: I,
186
+ borderTopWidth: I,
187
+ borderBottomWidth: I,
188
+ marginTop: I,
189
+ marginBottom: I
156
190
  },
157
191
  {
158
192
  height: a,
@@ -165,15 +199,15 @@ const R = {
165
199
  marginBottom: d.marginBottom
166
200
  }
167
201
  ], s = (a, d) => {
168
- const l = a, p = e(l), _ = o(l, p), N = r(_, p), F = { duration: n.duration, easing: n.easingEnter };
169
- i(l, p, d, N, F);
202
+ const l = a, m = e(l), $ = o(l, m), N = r($, m), M = { duration: n.duration, easing: n.easingEnter };
203
+ i(l, m, d, N, M);
170
204
  }, c = (a, d) => {
171
- const l = a, p = e(l), { height: _ } = getComputedStyle(l);
172
- l.style.height = _, l.style.overflow = "hidden";
173
- const N = r(_, p).reverse(), F = { duration: n.duration, easing: n.easingLeave };
174
- i(l, p, d, N, F);
205
+ const l = a, m = e(l), { height: $ } = getComputedStyle(l);
206
+ l.style.height = $, l.style.overflow = "hidden";
207
+ const N = r($, m).reverse(), M = { duration: n.duration, easing: n.easingLeave };
208
+ i(l, m, d, N, M);
175
209
  };
176
- return (a, d) => (f(), v(oe, {
210
+ return (a, d) => (f(), v(ae, {
177
211
  css: !1,
178
212
  onEnter: s,
179
213
  onLeave: c
@@ -186,7 +220,7 @@ const R = {
186
220
  }
187
221
  }, Z = {
188
222
  data: void 0
189
- }, j = (t) => t.reduce((n, e) => (n[e] = e) && n, {}), b = j([
223
+ }, J = (t) => t.reduce((n, e) => (n[e] = e) && n, {}), b = J([
190
224
  "drag",
191
225
  "dragend",
192
226
  "dragenter",
@@ -194,7 +228,7 @@ const R = {
194
228
  "dragstart",
195
229
  "dragover",
196
230
  "drop"
197
- ]), ce = j(["copy", "move", "link", "none"]), fe = j([
231
+ ]), ye = J(["copy", "move", "link", "none"]), ve = J([
198
232
  "none",
199
233
  "copy",
200
234
  "copyLink",
@@ -204,13 +238,13 @@ const R = {
204
238
  "move",
205
239
  "all",
206
240
  "uninitialized"
207
- ]), me = {
241
+ ]), be = {
208
242
  __name: "DDrag",
209
243
  props: {
210
244
  draggable: { type: Boolean, default: !0 },
211
245
  transferData: {},
212
- dropEffect: { validator: (t) => t in ce },
213
- effectAllowed: { validator: (t) => t in fe },
246
+ dropEffect: { validator: (t) => t in ye },
247
+ effectAllowed: { validator: (t) => t in ve },
214
248
  image: String,
215
249
  imageXOffset: { type: Number, default: 0 },
216
250
  imageYOffset: { type: Number, default: 0 },
@@ -218,7 +252,7 @@ const R = {
218
252
  tag: { type: String, default: "div" }
219
253
  },
220
254
  setup(t) {
221
- const n = t, e = J(), o = W(!1), i = m(() => o && n.transferData), r = m(() => ({ position: "fixed", top: "-1000px" })), s = (c, a) => {
255
+ const n = t, e = Q(), o = z(!1), i = p(() => o && n.transferData), r = p(() => ({ position: "fixed", top: "-1000px" })), s = (c, a) => {
222
256
  const d = a.dataTransfer;
223
257
  if ([b.dragenter, b.dragover].includes(c) && n.dropEffect && (d.dropEffect = n.dropEffect), c === b.dragstart) {
224
258
  if (n.effectAllowed && (d.effectAllowed = n.effectAllowed), n.image || e.image) {
@@ -228,19 +262,19 @@ const R = {
228
262
  n.transferData !== void 0 && (Z.data = n.transferData, a.dataTransfer.setData("text", "")), o.value = !0;
229
263
  }
230
264
  };
231
- return (c, a) => (f(), v(M(t.tag), {
265
+ return (c, a) => (f(), v(E(t.tag), {
232
266
  draggable: n.draggable,
233
267
  onDrag: a[0] || (a[0] = (d) => s(h(b).drag, d)),
234
- onDragstart: a[1] || (a[1] = C((d) => s(h(b).dragstart, d), ["stop"])),
268
+ onDragstart: a[1] || (a[1] = H((d) => s(h(b).dragstart, d), ["stop"])),
235
269
  onDragenter: a[2] || (a[2] = (d) => s(h(b).dragenter, d)),
236
270
  onDragleave: a[3] || (a[3] = (d) => s(h(b).dragleave, d)),
237
271
  onDragend: a[4] || (a[4] = (d) => s(h(b).dragend, d))
238
272
  }, {
239
273
  default: B(() => [
240
274
  y(c.$slots, "default", { transferData: i.value }),
241
- t.hideImageHtml ? (f(), D("div", {
275
+ t.hideImageHtml ? (f(), x("div", {
242
276
  key: 0,
243
- style: H(r.value)
277
+ style: k(r.value)
244
278
  }, [
245
279
  y(c.$slots, "image", { transferData: i.value })
246
280
  ], 4)) : y(c.$slots, "image", {
@@ -252,15 +286,10 @@ const R = {
252
286
  }, 40, ["draggable"]));
253
287
  }
254
288
  };
255
- const ee = (t, n) => {
256
- const e = t.__vccOpts || t;
257
- for (const [o, i] of n)
258
- e[o] = i;
259
- return e;
260
- }, pe = { class: "item-title" }, ge = { style: { display: "flex", "flex-direction": "row", "justify-content": "flex-end" } }, he = {
289
+ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direction": "row", "justify-content": "flex-end" } }, _e = {
261
290
  key: 0,
262
291
  class: "sub-menu"
263
- }, ye = {
292
+ }, Te = {
264
293
  __name: "DTreeItem",
265
294
  props: {
266
295
  model: Object,
@@ -269,96 +298,96 @@ const ee = (t, n) => {
269
298
  },
270
299
  emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick"],
271
300
  setup(t, { emit: n }) {
272
- const e = t, o = W(null), i = W(!1), r = W(!1), s = W(!1), c = m(() => e.model.children && e.model.children.length), a = m(() => (u.actions.isTreeExpanded(e.treeId) && (e.model.expanded = e.model.expanded === void 0 ? !0 : e.model.expanded), e.model.expanded)), d = (S) => {
301
+ const e = t, o = z(null), i = z(!1), r = z(!1), s = z(!1), c = p(() => e.model.children && e.model.children.length), a = p(() => (u.actions.isTreeExpanded(e.treeId) && (e.model.expanded = e.model.expanded === void 0 ? !0 : e.model.expanded), e.model.expanded)), d = (S) => {
273
302
  n("nodeclick", { event: S, model: e.model });
274
303
  }, l = (S) => {
275
304
  n("nodeclick", S);
276
- }, p = m(() => (u.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (i.value ? "node-over " : "") + (r.value ? "node-top " : "") + (s.value ? "node-bottom " : "")), _ = m(() => e.model.draggable === !0), N = (S) => {
277
- let x = Z.data;
278
- if (x.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, x.model.id) || u.actions.isParentOfChild(e.treeId, e.items, x.model.id, e.model.id))
305
+ }, m = p(() => (u.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (i.value ? "node-over " : "") + (r.value ? "node-top " : "") + (s.value ? "node-bottom " : "")), $ = p(() => e.model.draggable === !0), N = (S) => {
306
+ let D = Z.data;
307
+ if (D.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, D.model.id) || u.actions.isParentOfChild(e.treeId, e.items, D.model.id, e.model.id))
279
308
  return i.value = !1, r.value = !1, s.value = !1, !1;
280
- if (!u.state.trees[e.treeId].transfer && x.id !== e.treeId)
309
+ if (!u.state.trees[e.treeId].transfer && D.id !== e.treeId)
281
310
  return !1;
282
- let T = "";
283
- r.value ? T = "before" : s.value ? T = "after" : T = "inside", u.actions.moveTreeNode(x.id, e.treeId, e.items, x.model.id, e.model.id, T), i.value = !1, r.value = !1, s.value = !1;
284
- }, F = (S) => {
285
- let x = Z.data;
286
- if (x.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, x.model.id) || u.actions.isParentOfChild(e.treeId, e.items, x.model.id, e.model.id))
311
+ let _ = "";
312
+ r.value ? _ = "before" : s.value ? _ = "after" : _ = "inside", u.actions.moveTreeNode(D.id, e.treeId, e.items, D.model.id, e.model.id, _), i.value = !1, r.value = !1, s.value = !1;
313
+ }, M = (S) => {
314
+ let D = Z.data;
315
+ if (D.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, D.model.id) || u.actions.isParentOfChild(e.treeId, e.items, D.model.id, e.model.id))
287
316
  return !1;
288
- const T = S.y, k = o.value.getBoundingClientRect().top, I = o.value.getBoundingClientRect().height, g = I / 3;
289
- T > k && T <= k + g ? (i.value = !1, r.value = !0, s.value = !1) : T < k + I && T >= k + I - g ? (i.value = !1, r.value = !1, s.value = !0) : (i.value = !0, r.value = !1, s.value = !1);
317
+ const _ = S.y, w = o.value.getBoundingClientRect().top, L = o.value.getBoundingClientRect().height, g = L / 3;
318
+ _ > w && _ <= w + g ? (i.value = !1, r.value = !0, s.value = !1) : _ < w + L && _ >= w + L - g ? (i.value = !1, r.value = !1, s.value = !0) : (i.value = !0, r.value = !1, s.value = !1);
290
319
  }, Y = () => {
291
320
  i.value = !1, r.value = !1, s.value = !1;
292
321
  };
293
- return (S, x) => {
294
- const T = ie("d-tree-item", !0);
295
- return f(), v(me, {
322
+ return (S, D) => {
323
+ const _ = se("d-tree-item", !0);
324
+ return f(), v(be, {
296
325
  tag: "li",
297
326
  class: "tree-item",
298
327
  "transfer-data": { id: e.treeId, model: e.model },
299
- draggable: _.value,
300
- onDrop: C(N, ["stop"]),
301
- onDragenter: x[0] || (x[0] = C(() => {
328
+ draggable: $.value,
329
+ onDrop: H(N, ["stop"]),
330
+ onDragenter: D[0] || (D[0] = H(() => {
302
331
  }, ["prevent"])),
303
- onDragover: C(F, ["prevent", "stop"]),
304
- onDragleave: C(Y, ["prevent"])
332
+ onDragover: H(M, ["prevent", "stop"]),
333
+ onDragleave: H(Y, ["prevent"])
305
334
  }, {
306
335
  default: B(() => {
307
- var k, I;
336
+ var w, L;
308
337
  return [
309
- O("div", {
338
+ C("div", {
310
339
  ref_key: "node",
311
340
  ref: o,
312
- class: L(p.value),
341
+ class: W(m.value),
313
342
  onClick: d
314
343
  }, [
315
- O("div", null, [
316
- e.model.icons && e.model.icons.pre && c.value ? (f(), v(M(R), {
344
+ C("div", null, [
345
+ e.model.icons && e.model.icons.pre && c.value ? (f(), v(E(R), {
317
346
  key: 0,
318
- component: h(z).getters.getIcon(e.model.icons.pre.component),
347
+ component: h(F).getters.getIcon(e.model.icons.pre.component),
319
348
  size: 18,
320
349
  color: e.model.icons.pre.color ? e.model.icons.pre.color : "inherit",
321
- class: L(a.value ? "tree-open-pre" : "")
322
- }, null, 8, ["component", "color", "class"])) : $("", !0),
323
- e.model.icons && e.model.icons.pre && !c.value ? (f(), v(M(R), {
350
+ class: W(a.value ? "tree-open-pre" : "")
351
+ }, null, 8, ["component", "color", "class"])) : T("", !0),
352
+ e.model.icons && e.model.icons.pre && !c.value ? (f(), v(E(R), {
324
353
  key: 1,
325
- component: h(z).getters.getIcon(e.model.icons.pre.component),
354
+ component: h(F).getters.getIcon(e.model.icons.pre.component),
326
355
  size: 18,
327
356
  color: "rgba(0,0,0,0)",
328
- class: L(a.value ? "tree-open-pre" : "")
329
- }, null, 8, ["component", "class"])) : $("", !0),
330
- e.model.icons && e.model.icons.icon ? (f(), v(M(R), {
357
+ class: W(a.value ? "tree-open-pre" : "")
358
+ }, null, 8, ["component", "class"])) : T("", !0),
359
+ e.model.icons && e.model.icons.icon ? (f(), v(E(R), {
331
360
  key: 2,
332
- component: h(z).getters.getIcon(e.model.icons.icon.component),
361
+ component: h(F).getters.getIcon(e.model.icons.icon.component),
333
362
  color: e.model.icons.icon.color ? e.model.icons.icon.color : "inherit"
334
- }, null, 8, ["component", "color"])) : $("", !0),
335
- O("div", pe, [
336
- O("div", null, q(h(u).actions.renderTitle(e.treeId, e.model.title)), 1)
363
+ }, null, 8, ["component", "color"])) : T("", !0),
364
+ C("div", xe, [
365
+ C("div", null, U(h(u).actions.renderTitle(e.treeId, e.model.title)), 1)
337
366
  ])
338
367
  ]),
339
- O("div", ge, [
340
- ((k = e.model.badge) == null ? void 0 : k.value) !== void 0 ? (f(), v(M(le), {
368
+ C("div", De, [
369
+ ((w = e.model.badge) == null ? void 0 : w.value) !== void 0 ? (f(), v(E(ge), {
341
370
  key: 0,
342
- class: L([(I = e.model.badge) == null ? void 0 : I.class, "badge-sm"])
371
+ class: W([(L = e.model.badge) == null ? void 0 : L.class, "badge-sm"])
343
372
  }, {
344
373
  default: B(() => [
345
- ae(q(e.model.badge.value), 1)
374
+ re(U(e.model.badge.value), 1)
346
375
  ]),
347
376
  _: 1
348
- }, 8, ["class"])) : $("", !0),
349
- e.model.icons && e.model.icons.post && c.value ? (f(), v(M(R), {
377
+ }, 8, ["class"])) : T("", !0),
378
+ e.model.icons && e.model.icons.post && c.value ? (f(), v(E(R), {
350
379
  key: 1,
351
- component: h(z).getters.getIcon(e.model.icons.post.component),
380
+ component: h(F).getters.getIcon(e.model.icons.post.component),
352
381
  size: 20,
353
382
  color: e.model.icons.post.color ? e.model.icons.post.color : "inherit",
354
- class: L(a.value ? "tree-open-post" : "")
355
- }, null, 8, ["component", "color", "class"])) : $("", !0)
383
+ class: W(a.value ? "tree-open-post" : "")
384
+ }, null, 8, ["component", "color", "class"])) : T("", !0)
356
385
  ])
357
386
  ], 2),
358
- K(ue, null, {
387
+ K(he, null, {
359
388
  default: B(() => [
360
- c.value && a.value ? (f(), D("ul", he, [
361
- (f(!0), D(G, null, Q(t.model.children, (g) => (f(), v(T, {
389
+ c.value && a.value ? (f(), x("ul", _e, [
390
+ (f(!0), x(G, null, ee(t.model.children, (g) => (f(), v(_, {
362
391
  class: "tree-item",
363
392
  key: g.id,
364
393
  model: g,
@@ -366,7 +395,7 @@ const ee = (t, n) => {
366
395
  items: e.items,
367
396
  onNodeclick: l
368
397
  }, null, 8, ["model", "treeId", "items"]))), 128))
369
- ])) : $("", !0)
398
+ ])) : T("", !0)
370
399
  ]),
371
400
  _: 1
372
401
  })
@@ -376,8 +405,8 @@ const ee = (t, n) => {
376
405
  }, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"]);
377
406
  };
378
407
  }
379
- }, ve = /* @__PURE__ */ ee(ye, [["__scopeId", "data-v-4c84dfd5"]]);
380
- function be(t) {
408
+ }, $e = /* @__PURE__ */ q(Te, [["__scopeId", "data-v-4c84dfd5"]]);
409
+ function Se(t) {
381
410
  return t = t || /* @__PURE__ */ new Map(), {
382
411
  /**
383
412
  * A Map of event names to registered handler functions.
@@ -424,8 +453,8 @@ function be(t) {
424
453
  }
425
454
  };
426
455
  }
427
- const E = be(), u = {
428
- state: U({
456
+ const V = Se(), u = {
457
+ state: j({
429
458
  trees: {}
430
459
  }),
431
460
  getters: {
@@ -462,7 +491,7 @@ const E = be(), u = {
462
491
  },
463
492
  toggleItem(t, n, e) {
464
493
  const o = u.actions.deepSearch(n, e);
465
- o.expanded = o.expanded === void 0 || !o.expanded, o.children && o.children.length && (o.expanded ? E.emit(`expand-${t}`, { id: t, model: o }) : E.emit(`collapse-${t}`, { id: t, model: o }));
494
+ o.expanded = o.expanded === void 0 || !o.expanded, o.children && o.children.length && (o.expanded ? V.emit(`expand-${t}`, { id: t, model: o }) : V.emit(`collapse-${t}`, { id: t, model: o }));
466
495
  },
467
496
  isTreeExpanded(t) {
468
497
  return u.state.trees[t].expanded;
@@ -486,7 +515,7 @@ const E = be(), u = {
486
515
  },
487
516
  moveTreeNode(t, n, e, o, i, r) {
488
517
  const s = u.actions.deleteTreeNode(e, o);
489
- u.actions.insertTreeNode(e, i, s, r), E.emit(`move-${n}`, { fromTreeId: t, toTreeId: n, moved: s.id, target: i, position: r });
518
+ u.actions.insertTreeNode(e, i, s, r), V.emit(`move-${n}`, { fromTreeId: t, toTreeId: n, moved: s.id, target: i, position: r });
490
519
  },
491
520
  insertTreeNode(t, n, e, o) {
492
521
  if (t)
@@ -513,24 +542,24 @@ const E = be(), u = {
513
542
  }
514
543
  }
515
544
  }
516
- }, xe = {
545
+ }, Be = {
517
546
  __name: "DDrop",
518
547
  props: {
519
548
  tag: { type: String, default: "div" }
520
549
  },
521
550
  emits: Object.keys(b),
522
551
  setup(t, { emit: n }) {
523
- let e = U({});
524
- const o = W("false"), i = W(null), r = /* @__PURE__ */ new Set(), s = m(() => o.value && e), c = (a, d) => {
552
+ let e = j({});
553
+ const o = z("false"), i = z(null), r = /* @__PURE__ */ new Set(), s = p(() => o.value && e), c = (a, d) => {
525
554
  e = Z.data, n(a, d, e), a === b.dragenter && (r.size || d.target === i.value) && r.add(d.target), a === b.dragleave && r.delete(d.target), a === b.drop && r.clear(), o.value = !!r.size;
526
555
  };
527
- return (a, d) => (f(), v(M(t.tag), {
556
+ return (a, d) => (f(), v(E(t.tag), {
528
557
  ref_key: "el",
529
558
  ref: i,
530
559
  onDragenter: d[0] || (d[0] = (l) => c(h(b).dragenter, l)),
531
560
  onDragleave: d[1] || (d[1] = (l) => c(h(b).dragleave, l)),
532
- onDragover: d[2] || (d[2] = C((l) => c(h(b).dragover, l), ["prevent"])),
533
- onDrop: d[3] || (d[3] = C((l) => c(h(b).drop, l), ["prevent"]))
561
+ onDragover: d[2] || (d[2] = H((l) => c(h(b).dragover, l), ["prevent"])),
562
+ onDrop: d[3] || (d[3] = H((l) => c(h(b).drop, l), ["prevent"]))
534
563
  }, {
535
564
  default: B(() => [
536
565
  y(a.$slots, "default", { transferData: s.value })
@@ -538,7 +567,7 @@ const E = be(), u = {
538
567
  _: 3
539
568
  }, 544));
540
569
  }
541
- }, De = {
570
+ }, Ne = {
542
571
  __name: "DTree",
543
572
  props: {
544
573
  items: Array,
@@ -556,30 +585,30 @@ const E = be(), u = {
556
585
  },
557
586
  emits: ["select", "collapse", "expand", "move"],
558
587
  setup(t, { emit: n }) {
559
- const e = t, o = se().uid;
588
+ const e = t, o = de().uid;
560
589
  u.actions.initTreeStore(o, e.noSelect, e.multiSelect, e.expanded, e.transfer, e.renderTitle);
561
590
  const i = (s, c) => {
562
591
  console.log(s, c);
563
592
  };
564
- E.on(`select-${o}`, (s) => {
593
+ V.on(`select-${o}`, (s) => {
565
594
  n("select", s);
566
- }), E.on(`expand-${o}`, (s) => {
595
+ }), V.on(`expand-${o}`, (s) => {
567
596
  n("expand", s);
568
- }), E.on(`collapse-${o}`, (s) => {
597
+ }), V.on(`collapse-${o}`, (s) => {
569
598
  n("collapse", s);
570
- }), E.on(`move-${o}`, (s) => {
599
+ }), V.on(`move-${o}`, (s) => {
571
600
  n("move", s);
572
601
  });
573
602
  const r = (s = null) => {
574
603
  console.log(s), u.mutations.setItemSelect(o, s.model), u.actions.toggleItem(o, e.items, s.model.id);
575
604
  };
576
- return (s, c) => (f(), v(xe, {
605
+ return (s, c) => (f(), v(Be, {
577
606
  class: "tree",
578
607
  tag: "ul",
579
- onDrop: C(i, ["stop"])
608
+ onDrop: H(i, ["stop"])
580
609
  }, {
581
610
  default: B(() => [
582
- (f(!0), D(G, null, Q(e.items, (a) => (f(), v(ve, {
611
+ (f(!0), x(G, null, ee(e.items, (a) => (f(), v($e, {
583
612
  key: a.id,
584
613
  model: a,
585
614
  treeId: h(o),
@@ -591,20 +620,20 @@ const E = be(), u = {
591
620
  }, 8, ["onDrop"]));
592
621
  }
593
622
  };
594
- const Te = {
623
+ const we = {
595
624
  __name: "DAccordion",
596
625
  props: {
597
626
  items: Array
598
627
  },
599
628
  setup(t) {
600
629
  const n = t;
601
- return (e, o) => (f(), v(De, {
630
+ return (e, o) => (f(), v(Ne, {
602
631
  class: "accordion",
603
632
  items: n.items,
604
633
  "no-select": !0
605
634
  }, null, 8, ["items"]));
606
635
  }
607
- }, ze = /* @__PURE__ */ ee(Te, [["__scopeId", "data-v-4c920528"]]), $e = {
636
+ }, Oe = /* @__PURE__ */ q(we, [["__scopeId", "data-v-4c920528"]]), Ie = {
608
637
  __name: "DLayoutHeader",
609
638
  props: {
610
639
  fixed: {
@@ -638,18 +667,18 @@ const Te = {
638
667
  useMinWidthLayout: Boolean
639
668
  },
640
669
  setup(t) {
641
- const n = t, e = m(() => {
642
- const { fixed: o, zIndex: i, minWidth: r, height: s, paddingLeft: c, transitionDuration: a, transitionTimingFunction: d } = n, l = o ? "fixed" : "static", p = n.useMinWidthLayout ? `min-width:${r}px;` : "";
643
- return `position:${l};z-index:${i};${p}height:${s}px;padding-left:${c}px;transition-duration:${a}ms;transition-timing-function:${d};`;
670
+ const n = t, e = p(() => {
671
+ const { fixed: o, zIndex: i, minWidth: r, height: s, paddingLeft: c, transitionDuration: a, transitionTimingFunction: d } = n, l = o ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${r}px;` : "";
672
+ return `position:${l};z-index:${i};${m}height:${s}px;padding-left:${c}px;transition-duration:${a}ms;transition-timing-function:${d};`;
644
673
  });
645
- return (o, i) => (f(), D("header", {
674
+ return (o, i) => (f(), x("header", {
646
675
  class: "d-layout-header",
647
- style: H(e.value)
676
+ style: k(e.value)
648
677
  }, [
649
678
  y(o.$slots, "default")
650
679
  ], 4));
651
680
  }
652
- }, _e = {
681
+ }, ke = {
653
682
  __name: "DLayoutTab",
654
683
  props: {
655
684
  fixed: {
@@ -687,18 +716,18 @@ const Te = {
687
716
  useMinWidthLayout: Boolean
688
717
  },
689
718
  setup(t) {
690
- const n = t, e = m(() => {
691
- const { fixed: o, top: i, zIndex: r, minWidth: s, height: c, paddingLeft: a, transitionDuration: d, transitionTimingFunction: l } = n, p = o ? "fixed" : "static", _ = n.useMinWidthLayout ? `min-width: ${s}px;` : "";
692
- return `position:${p};top:${i}px;z-index:${r};${_}height:${c}px;padding-left:${a}px;transition-duration:${d}ms;transition-timing-function:${l};`;
719
+ const n = t, e = p(() => {
720
+ const { fixed: o, top: i, zIndex: r, minWidth: s, height: c, paddingLeft: a, transitionDuration: d, transitionTimingFunction: l } = n, m = o ? "fixed" : "static", $ = n.useMinWidthLayout ? `min-width: ${s}px;` : "";
721
+ return `position:${m};top:${i}px;z-index:${r};${$}height:${c}px;padding-left:${a}px;transition-duration:${d}ms;transition-timing-function:${l};`;
693
722
  });
694
- return (o, i) => (f(), D("div", {
723
+ return (o, i) => (f(), x("div", {
695
724
  class: "d-layout-tab",
696
- style: H(e.value)
725
+ style: k(e.value)
697
726
  }, [
698
727
  y(o.$slots, "default")
699
728
  ], 4));
700
729
  }
701
- }, Se = {
730
+ }, Le = {
702
731
  __name: "DLayoutFooter",
703
732
  props: {
704
733
  fixed: {
@@ -732,18 +761,18 @@ const Te = {
732
761
  useMinWidthLayout: Boolean
733
762
  },
734
763
  setup(t) {
735
- const n = t, e = m(() => {
736
- const { fixed: o, zIndex: i, minWidth: r, height: s, paddingLeft: c, transitionDuration: a, transitionTimingFunction: d } = n, l = o ? "fixed" : "static", p = n.useMinWidthLayout ? `min-width:${r}px;` : "";
737
- return `position:${l};z-index:${i};${p}height:${s}px;padding-left:${c}px;transition-duration:${a}ms;transition-timing-function:${d};`;
764
+ const n = t, e = p(() => {
765
+ const { fixed: o, zIndex: i, minWidth: r, height: s, paddingLeft: c, transitionDuration: a, transitionTimingFunction: d } = n, l = o ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${r}px;` : "";
766
+ return `position:${l};z-index:${i};${m}height:${s}px;padding-left:${c}px;transition-duration:${a}ms;transition-timing-function:${d};`;
738
767
  });
739
- return (o, i) => (f(), D("footer", {
768
+ return (o, i) => (f(), x("footer", {
740
769
  class: "d-layout-footer",
741
- style: H(e.value)
770
+ style: k(e.value)
742
771
  }, [
743
772
  y(o.$slots, "default")
744
773
  ], 4));
745
774
  }
746
- }, Be = {
775
+ }, We = {
747
776
  __name: "DLayoutSidebar",
748
777
  props: {
749
778
  zIndex: {
@@ -772,18 +801,18 @@ const Te = {
772
801
  }
773
802
  },
774
803
  setup(t) {
775
- const n = t, e = m(() => {
804
+ const n = t, e = p(() => {
776
805
  const { zIndex: o, width: i, paddingTop: r, transitionDuration: s, transitionTimingFunction: c } = n;
777
806
  return `z-index:${o};width:${i}px;padding-top:${r}px;transition-duration:${s}ms;transition-timing-function:${c};`;
778
807
  });
779
- return (o, i) => (f(), D("aside", {
808
+ return (o, i) => (f(), x("aside", {
780
809
  class: "d-layout-sidebar",
781
- style: H(e.value)
810
+ style: k(e.value)
782
811
  }, [
783
812
  y(o.$slots, "default")
784
813
  ], 4));
785
814
  }
786
- }, Ne = {
815
+ }, Ce = {
787
816
  __name: "DLayoutContent",
788
817
  props: {
789
818
  paddingTop: {
@@ -809,28 +838,28 @@ const Te = {
809
838
  }
810
839
  },
811
840
  setup(t) {
812
- const n = t, e = m(() => {
841
+ const n = t, e = p(() => {
813
842
  const { paddingTop: o, paddingBottom: i, paddingLeft: r, transitionDuration: s, transitionTimingFunction: c } = n, a = `overflow:${n.overflowHidden ? "hidden" : "visible"};`;
814
843
  return `padding-top:${o}px;padding-bottom:${i}px;padding-left:${r}px;${a}transition-duration:${s}ms;transition-timing-function:${c};`;
815
844
  });
816
- return (o, i) => (f(), D("main", {
817
- style: H(e.value),
845
+ return (o, i) => (f(), x("main", {
846
+ style: k(e.value),
818
847
  class: "d-layout-content"
819
848
  }, [
820
849
  y(o.$slots, "default")
821
850
  ], 4));
822
851
  }
823
852
  };
824
- function ke(t) {
825
- const n = W(0), e = m(() => `transform: translateX(${-n.value}px);`);
853
+ function ze(t) {
854
+ const n = z(0), e = p(() => `transform: translateX(${-n.value}px);`);
826
855
  let o = !1;
827
856
  function i(l) {
828
857
  n.value = l;
829
858
  }
830
859
  function r() {
831
860
  var l;
832
- const p = ((l = document.scrollingElement) === null || l === void 0 ? void 0 : l.scrollLeft) || 0;
833
- i(p);
861
+ const m = ((l = document.scrollingElement) === null || l === void 0 ? void 0 : l.scrollLeft) || 0;
862
+ i(m);
834
863
  }
835
864
  function s() {
836
865
  r();
@@ -844,13 +873,13 @@ function ke(t) {
844
873
  function d() {
845
874
  s(), c(), o = !0;
846
875
  }
847
- return re(t, (l) => {
876
+ return le(t, (l) => {
848
877
  l ? d() : a();
849
- }, { immediate: !0 }), de(() => {
878
+ }, { immediate: !0 }), ue(() => {
850
879
  a();
851
880
  }), e;
852
881
  }
853
- const we = 1001, Ie = 999, Le = 998, He = {
882
+ const He = 1001, Fe = 999, Me = 998, Pe = {
854
883
  __name: "DLayoutAdmin",
855
884
  props: {
856
885
  mode: {
@@ -941,13 +970,13 @@ const we = 1001, Ie = 999, Le = 998, He = {
941
970
  },
942
971
  emits: ["update:sidebar-collapse"],
943
972
  setup(t, { emit: n }) {
944
- const e = t, o = m(() => e.useMinWidthLayout ? `min-width:${e.minWidth}px;` : ""), i = m(() => e.useMinWidthLayout && (e.fixedHeaderAndTab || e.fixedFooter)), r = ke(i), s = m(() => e.fixedHeaderAndTab ? r.value : ""), c = m(() => e.fixedFooter ? r.value : ""), a = m(() => {
973
+ const e = t, o = p(() => e.useMinWidthLayout ? `min-width:${e.minWidth}px;` : ""), i = p(() => e.useMinWidthLayout && (e.fixedHeaderAndTab || e.fixedFooter)), r = ze(i), s = p(() => e.fixedHeaderAndTab ? r.value : ""), c = p(() => e.fixedFooter ? r.value : ""), a = p(() => {
945
974
  const { transitionDuration: g, transitionTimingFunction: A } = e;
946
975
  return {
947
976
  transitionDuration: g,
948
977
  transitionTimingFunction: A
949
978
  };
950
- }), d = m(() => e.mode === "vertical"), l = m(() => e.isMobile || d.value ? 1003 : 1e3), p = m({
979
+ }), d = p(() => e.mode === "vertical"), l = p(() => e.isMobile || d.value ? 1003 : 1e3), m = p({
951
980
  get() {
952
981
  return e.sidebarCollapse;
953
982
  },
@@ -955,41 +984,41 @@ const we = 1001, Ie = 999, Le = 998, He = {
955
984
  n("update:sidebar-collapse", g);
956
985
  }
957
986
  });
958
- function _() {
959
- p.value = !0;
987
+ function $() {
988
+ m.value = !0;
960
989
  }
961
- const N = m(() => e.isMobile && !p.value), F = m(() => {
990
+ const N = p(() => e.isMobile && !m.value), M = p(() => {
962
991
  const { transitionDuration: g, transitionTimingFunction: A } = e;
963
992
  return `background-color:${e.maskBg};transition-duration:${g}ms;transition-timing-function:${A};`;
964
- }), Y = m(() => {
965
- const { sidebarWidth: g, sidebarCollapsedWidth: A } = e, te = e.isMobile ? 0 : A, ne = p.value ? te : g;
993
+ }), Y = p(() => {
994
+ const { sidebarWidth: g, sidebarCollapsedWidth: A } = e, te = e.isMobile ? 0 : A, ne = m.value ? te : g;
966
995
  return e.sidebarVisible ? ne : 0;
967
- }), S = m(() => e.isMobile ? 0 : Y.value), x = m(() => d.value ? S.value : 0), T = m(
996
+ }), S = p(() => e.isMobile ? 0 : Y.value), D = p(() => d.value ? S.value : 0), _ = p(
968
997
  () => !e.isMobile && !d.value && e.headerVisible ? e.headerHeight : 0
969
- ), k = m(() => {
998
+ ), w = p(() => {
970
999
  let g = 0;
971
1000
  return e.fixedHeaderAndTab && (e.headerVisible && (g += e.headerHeight), e.tabVisible && (g += e.tabHeight)), g;
972
- }), I = m(() => e.fixedFooter && e.footerVisible ? e.footerHeight : 0);
973
- return (g, A) => (f(), D("div", {
1001
+ }), L = p(() => e.fixedFooter && e.footerVisible ? e.footerHeight : 0);
1002
+ return (g, A) => (f(), x("div", {
974
1003
  class: "d-layout",
975
- style: H(o.value)
1004
+ style: k(o.value)
976
1005
  }, [
977
- t.headerVisible ? (f(), v($e, V({ key: 0 }, a.value, {
1006
+ t.headerVisible ? (f(), v(Ie, P({ key: 0 }, a.value, {
978
1007
  fixed: t.fixedHeaderAndTab,
979
- "z-index": we,
1008
+ "z-index": He,
980
1009
  "min-width": t.minWidth,
981
1010
  height: t.headerHeight,
982
- "padding-left": x.value,
1011
+ "padding-left": D.value,
983
1012
  style: s.value
984
1013
  }), {
985
1014
  default: B(() => [
986
1015
  y(g.$slots, "header")
987
1016
  ]),
988
1017
  _: 3
989
- }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : $("", !0),
990
- t.tabVisible ? (f(), v(_e, V({ key: 1 }, a.value, {
1018
+ }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : T("", !0),
1019
+ t.tabVisible ? (f(), v(ke, P({ key: 1 }, a.value, {
991
1020
  fixed: t.fixedHeaderAndTab,
992
- "z-index": Ie,
1021
+ "z-index": Fe,
993
1022
  "min-width": t.minWidth,
994
1023
  top: t.headerHeight,
995
1024
  height: t.tabHeight,
@@ -1000,26 +1029,26 @@ const we = 1001, Ie = 999, Le = 998, He = {
1000
1029
  y(g.$slots, "tab")
1001
1030
  ]),
1002
1031
  _: 3
1003
- }, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : $("", !0),
1004
- t.sidebarVisible ? (f(), v(Be, V({ key: 2 }, a.value, {
1032
+ }, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : T("", !0),
1033
+ t.sidebarVisible ? (f(), v(We, P({ key: 2 }, a.value, {
1005
1034
  "z-index": l.value,
1006
1035
  width: Y.value,
1007
- "padding-top": T.value
1036
+ "padding-top": _.value
1008
1037
  }), {
1009
1038
  default: B(() => [
1010
1039
  y(g.$slots, "sidebar")
1011
1040
  ]),
1012
1041
  _: 3
1013
- }, 16, ["z-index", "width", "padding-top"])) : $("", !0),
1014
- N.value ? (f(), D("div", {
1042
+ }, 16, ["z-index", "width", "padding-top"])) : T("", !0),
1043
+ N.value ? (f(), x("div", {
1015
1044
  key: 3,
1016
1045
  class: "d-layout-sidebar-mask",
1017
- style: H(F.value),
1018
- onClick: _
1019
- }, null, 4)) : $("", !0),
1020
- K(Ne, V(a.value, {
1021
- "padding-top": k.value,
1022
- "padding-bottom": I.value,
1046
+ style: k(M.value),
1047
+ onClick: $
1048
+ }, null, 4)) : T("", !0),
1049
+ K(Ce, P(a.value, {
1050
+ "padding-top": w.value,
1051
+ "padding-bottom": L.value,
1023
1052
  "padding-left": S.value,
1024
1053
  "overflow-hidden": t.addMainOverflowHidden
1025
1054
  }), {
@@ -1028,9 +1057,9 @@ const we = 1001, Ie = 999, Le = 998, He = {
1028
1057
  ]),
1029
1058
  _: 3
1030
1059
  }, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
1031
- t.footerVisible ? (f(), v(Se, V({ key: 4 }, a.value, {
1060
+ t.footerVisible ? (f(), v(Le, P({ key: 4 }, a.value, {
1032
1061
  fixed: t.fixedFooter,
1033
- "z-index": Le,
1062
+ "z-index": Me,
1034
1063
  "min-width": t.minWidth,
1035
1064
  height: t.footerHeight,
1036
1065
  "padding-left": S.value,
@@ -1040,29 +1069,29 @@ const we = 1001, Ie = 999, Le = 998, He = {
1040
1069
  y(g.$slots, "footer")
1041
1070
  ]),
1042
1071
  _: 3
1043
- }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : $("", !0)
1072
+ }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : T("", !0)
1044
1073
  ], 4));
1045
1074
  }
1046
- }, P = {
1047
- state: U({
1075
+ }, O = {
1076
+ state: j({
1048
1077
  theme: "dark"
1049
1078
  }),
1050
1079
  getters: {
1051
1080
  theme() {
1052
- return P.state.theme;
1081
+ return O.state.theme;
1053
1082
  }
1054
1083
  },
1055
1084
  mutations: {
1056
1085
  setTheme(t) {
1057
- P.state.theme = t, document.documentElement.setAttribute("class", t);
1086
+ O.state.theme = t, document.documentElement.setAttribute("class", t);
1058
1087
  }
1059
1088
  },
1060
1089
  actions: {
1061
1090
  toggleTheme() {
1062
- P.state.theme = P.state.theme === "dark" ? "light" : "dark", document.documentElement.setAttribute("class", P.state.theme);
1091
+ O.state.theme = O.state.theme === "dark" ? "light" : "dark", document.documentElement.setAttribute("class", O.state.theme);
1063
1092
  }
1064
1093
  }
1065
- }, Fe = {
1094
+ }, Re = {
1066
1095
  __name: "DConfigProvider",
1067
1096
  props: {
1068
1097
  theme: {
@@ -1072,28 +1101,29 @@ const we = 1001, Ie = 999, Le = 998, He = {
1072
1101
  },
1073
1102
  setup(t) {
1074
1103
  const n = t;
1075
- return P.mutations.setTheme(n.theme), (e, o) => y(e.$slots, "default");
1104
+ return O.mutations.setTheme(n.theme), (e, o) => y(e.$slots, "default");
1076
1105
  }
1077
1106
  };
1078
1107
  export {
1079
- ze as DAccordion,
1080
- le as DBadge,
1081
- Ce as DButton,
1082
- ue as DCollapse,
1083
- Fe as DConfigProvider,
1084
- P as DGlobalStore,
1108
+ Oe as DAccordion,
1109
+ ge as DBadge,
1110
+ Ve as DButton,
1111
+ he as DCollapse,
1112
+ Re as DConfigProvider,
1113
+ O as DGlobalStore,
1085
1114
  R as DIcon,
1086
- z as DIconStore,
1087
- He as DLayoutAdmin,
1088
- Ne as DLayoutContent,
1089
- Se as DLayoutFooter,
1090
- $e as DLayoutHeader,
1091
- Be as DLayoutSidebar,
1092
- _e as DLayoutTab,
1115
+ F as DIconStore,
1116
+ Ae as DInput,
1117
+ Pe as DLayoutAdmin,
1118
+ Ce as DLayoutContent,
1119
+ Le as DLayoutFooter,
1120
+ Ie as DLayoutHeader,
1121
+ We as DLayoutSidebar,
1122
+ ke as DLayoutTab,
1093
1123
  Z as DTransferStore,
1094
- De as DTree,
1095
- ve as DTreeItem,
1124
+ Ne as DTree,
1125
+ $e as DTreeItem,
1096
1126
  u as DTreeStore,
1097
- E as emitter,
1098
- be as eventsBus
1127
+ V as emitter,
1128
+ Se as eventsBus
1099
1129
  };
@@ -1 +1 @@
1
- (function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p.DophJs={},p.Vue))})(this,function(p,e){"use strict";const le="",de="",ce="",fe="",w={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String},setup(o){const n=o,t=e.useSlots(),i=e.computed(()=>{const{color:s}=n;return s===void 0?null:s}),r=e.computed(()=>{const s=n.size??null;if(s!==void 0)return typeof s=="number"||/^\d+$/.test(s)?`${s}px`:s}),l=e.h("i",{class:"icon",style:{color:i.value,fontSize:r.value}},n.component?e.h(n.component):t);return(s,m)=>(e.openBlock(),e.createBlock(e.unref(l)))}},X={__name:"DButton",props:{class:String,icon:Object},emits:["click"],setup(o,{emit:n}){const t=o;let i=null;t.icon&&(i=e.h(w,{component:t.icon,color:"inherit"}));const r=l=>{n("click",l)};return(l,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:r,class:e.normalizeClass(["button",t.class])},[e.renderSlot(l.$slots,"default")],2)),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:r,class:e.normalizeClass(["button button-ext",t.class])},[e.createVNode(e.unref(i)),e.createElementVNode("div",null,[e.renderSlot(l.$slots,"default")])],2)):e.createCommentVNode("",!0)],64))}},D={state:{},getters:{getIcon(o){return D.state[o]},getIcons(){return D.state}},mutations:{addIcon(o,n){D.state.name=n},addIcons(o){for(const n in o)o.hasOwnProperty(n)&&(D.state[n]=o[n])}}},W={__name:"DBadge",props:{class:String},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",n.class])},[e.renderSlot(t.$slots,"default")],2))}},S="0px",V={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(o){const n=o,t=a=>({height:a.style.height,width:a.style.width,position:a.style.position,visibility:a.style.visibility,overflow:a.style.overflow,paddingTop:a.style.paddingTop,paddingBottom:a.style.paddingBottom,borderTopWidth:a.style.borderTopWidth,borderBottomWidth:a.style.borderBottomWidth,marginTop:a.style.marginTop,marginBottom:a.style.marginBottom}),i=(a,d)=>{const{width:f}=getComputedStyle(a);a.style.width=f,a.style.position="absolute",a.style.visibility="hidden",a.style.height="";let{height:u}=getComputedStyle(a);return a.style.width=d.width,a.style.position=d.position,a.style.visibility=d.visibility,a.style.height=S,a.style.overflow="hidden",d.height&&d.height!==S?d.height:u},r=(a,d,f,u,B)=>{const T=a.animate(u,B);a.style.height=d.height,T.onfinish=()=>{a.style.overflow=d.overflow,f()}},l=(a,d)=>[{height:S,opacity:n.opacityClosed,paddingTop:S,paddingBottom:S,borderTopWidth:S,borderBottomWidth:S,marginTop:S,marginBottom:S},{height:a,opacity:n.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}],s=(a,d)=>{const f=a,u=t(f),B=i(f,u),T=l(B,u),C={duration:n.duration,easing:n.easingEnter};r(f,u,d,T,C)},m=(a,d)=>{const f=a,u=t(f),{height:B}=getComputedStyle(f);f.style.height=B,f.style.overflow="hidden";const T=l(B,u).reverse(),C={duration:n.duration,easing:n.easingLeave};r(f,u,d,T,C)};return(a,d)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:s,onLeave:m},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},L={data:void 0},E=o=>o.reduce((n,t)=>(n[t]=t)&&n,{}),h=E(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),j=E(["copy","move","link","none"]),G=E(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),q={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:o=>o in j},effectAllowed:{validator:o=>o in G},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(o){const n=o,t=e.useSlots(),i=e.ref(!1),r=e.computed(()=>i&&n.transferData),l=e.computed(()=>({position:"fixed",top:"-1000px"})),s=(m,a)=>{const d=a.dataTransfer;if([h.dragenter,h.dragover].includes(m)&&n.dropEffect&&(d.dropEffect=n.dropEffect),m===h.dragstart){if(n.effectAllowed&&(d.effectAllowed=n.effectAllowed),n.image||t.image){let f;n.image?(f=new Image,f.src=n.image):t.image&&(f=t.image[0].elm),d.setDragImage&&d.setDragImage(f,n.imageXOffset,n.imageYOffset)}n.transferData!==void 0&&(L.data=n.transferData,a.dataTransfer.setData("text","")),i.value=!0}};return(m,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{draggable:n.draggable,onDrag:a[0]||(a[0]=d=>s(e.unref(h).drag,d)),onDragstart:a[1]||(a[1]=e.withModifiers(d=>s(e.unref(h).dragstart,d),["stop"])),onDragenter:a[2]||(a[2]=d=>s(e.unref(h).dragenter,d)),onDragleave:a[3]||(a[3]=d=>s(e.unref(h).dragleave,d)),onDragend:a[4]||(a[4]=d=>s(e.unref(h).dragend,d))},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"default",{transferData:r.value}),o.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.value)},[e.renderSlot(m.$slots,"image",{transferData:r.value})],4)):e.renderSlot(m.$slots,"image",{key:1,transferData:r.value})]),_:3},40,["draggable"]))}},me="",M=(o,n)=>{const t=o.__vccOpts||o;for(const[i,r]of n)t[i]=r;return t},J={class:"item-title"},K={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},U={key:0,class:"sub-menu"},F=M({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array},emits:["nodedrop","nodedragover","nodedragleave","nodeclick"],setup(o,{emit:n}){const t=o,i=e.ref(null),r=e.ref(!1),l=e.ref(!1),s=e.ref(!1),m=e.computed(()=>t.model.children&&t.model.children.length),a=e.computed(()=>(c.actions.isTreeExpanded(t.treeId)&&(t.model.expanded=t.model.expanded===void 0?!0:t.model.expanded),t.model.expanded)),d=k=>{n("nodeclick",{event:k,model:t.model})},f=k=>{n("nodeclick",k)},u=e.computed(()=>(c.actions.isItemSelected(t.treeId,t.model.id)?"selected":"")+(r.value?"node-over ":"")+(l.value?"node-top ":"")+(s.value?"node-bottom ":"")),B=e.computed(()=>t.model.draggable===!0),T=k=>{let y=L.data;if(y.model.id===t.model.id||c.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||c.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return r.value=!1,l.value=!1,s.value=!1,!1;if(!c.state.trees[t.treeId].transfer&&y.id!==t.treeId)return!1;let b="";l.value?b="before":s.value?b="after":b="inside",c.actions.moveTreeNode(y.id,t.treeId,t.items,y.model.id,t.model.id,b),r.value=!1,l.value=!1,s.value=!1},C=k=>{let y=L.data;if(y.model.id===t.model.id||c.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||c.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return!1;const b=k.y,x=i.value.getBoundingClientRect().top,_=i.value.getBoundingClientRect().height,g=_/3;b>x&&b<=x+g?(r.value=!1,l.value=!0,s.value=!1):b<x+_&&b>=x+_-g?(r.value=!1,l.value=!1,s.value=!0):(r.value=!0,l.value=!1,s.value=!1)},z=()=>{r.value=!1,l.value=!1,s.value=!1};return(k,y)=>{const b=e.resolveComponent("d-tree-item",!0);return e.openBlock(),e.createBlock(q,{tag:"li",class:"tree-item","transfer-data":{id:t.treeId,model:t.model},draggable:B.value,onDrop:e.withModifiers(T,["stop"]),onDragenter:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(C,["prevent","stop"]),onDragleave:e.withModifiers(z,["prevent"])},{default:e.withCtx(()=>{var x,_;return[e.createElementVNode("div",{ref_key:"node",ref:i,class:e.normalizeClass(u.value),onClick:d},[e.createElementVNode("div",null,[t.model.icons&&t.model.icons.pre&&m.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:0,component:e.unref(D).getters.getIcon(t.model.icons.pre.component),size:18,color:t.model.icons.pre.color?t.model.icons.pre.color:"inherit",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.pre&&!m.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(D).getters.getIcon(t.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:2,component:e.unref(D).getters.getIcon(t.model.icons.icon.component),color:t.model.icons.icon.color?t.model.icons.icon.color:"inherit"},null,8,["component","color"])):e.createCommentVNode("",!0),e.createElementVNode("div",J,[e.createElementVNode("div",null,e.toDisplayString(e.unref(c).actions.renderTitle(t.treeId,t.model.title)),1)])]),e.createElementVNode("div",K,[((x=t.model.badge)==null?void 0:x.value)!==void 0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(W),{key:0,class:e.normalizeClass([(_=t.model.badge)==null?void 0:_.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.post&&m.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(D).getters.getIcon(t.model.icons.post.component),size:20,color:t.model.icons.post.color?t.model.icons.post.color:"inherit",class:e.normalizeClass(a.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],2),e.createVNode(V,null,{default:e.withCtx(()=>[m.value&&a.value?(e.openBlock(),e.createElementBlock("ul",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model.children,g=>(e.openBlock(),e.createBlock(b,{class:"tree-item",key:g.id,model:g,treeId:t.treeId,items:t.items,onNodeclick:f},null,8,["model","treeId","items"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])}}},[["__scopeId","data-v-4c84dfd5"]]);function H(o){return o=o||new Map,{all:o,on(n,t){const i=o.get(n);i?i.push(t):o.set(n,[t])},off(n,t){const i=o.get(n);i&&(t?i.splice(i.indexOf(t)>>>0,1):o.set(n,[]))},emit(n,t){let i=o.get(n);i&&i.slice().map(r=>{r(t)}),i=o.get("*"),i&&i.slice().map(r=>{r(n,t)})}}}const $=H(),c={state:e.reactive({trees:{}}),getters:{getItems(o){return c.state.trees[o].items},getItemsSelect(o){return c.state.trees[o].selected},getParentId(o,n,t,i="id",r="children",l={}){return t&&o&&(o.find(s=>s[i]===t?(l.found=n,s):c.getters.getParentId(s[r],s.id,t,i,r,l)),l.found)?l.found:!1}},mutations:{setTreeItems(o,n){c.state.trees[o].items=n},setItemSelect(o,n){c.state.trees[o].noSelect||(c.state.trees[o].multiSelect?c.state.trees[o].selected.includes(n.id)?c.state.trees[o].selected=c.state.trees[o].selected.filter(function(t){return t!==n.id}):c.state.trees[o].selected=[...c.state.trees[o].selected,n.id]:c.state.trees[o].selected=[n.id])}},actions:{initTreeStore(o,n,t,i,r,l){c.state.trees[o]=[],c.state.trees[o].selected=[],c.state.trees[o].noSelect=n,c.state.trees[o].multiSelect=t,c.state.trees[o].expanded=i,c.state.trees[o].transfer=r,c.state.trees[o].renderTitle=l},renderTitle(o,n){return c.state.trees[o].renderTitle?c.state.trees[o].renderTitle(n):n},isItemSelected(o,n){return c.state.trees[o].selected.includes(n)},toggleItem(o,n,t){const i=c.actions.deepSearch(n,t);i.expanded=i.expanded===void 0||!i.expanded,i.children&&i.children.length&&(i.expanded?$.emit(`expand-${o}`,{id:o,model:i}):$.emit(`collapse-${o}`,{id:o,model:i}))},isTreeExpanded(o){return c.state.trees[o].expanded},isChildOfParent(o,n,t,i){const r=c.actions.deepSearch(n,t);if(r&&r.children){for(let l=0;l<r.children.length;l++)if(r.children[l].id===i)return!0}return!1},isParentOfChild(o,n,t,i){const r=c.actions.deepSearch(n,t);return!!(r&&r.children&&c.actions.deepSearch(r.children,i))},deepSearch(o,n,t="id",i="children",r={}){return n&&o&&(o.find(l=>l[t]===n?(r.found=l,l):c.actions.deepSearch(l[i],n,t,i,r)),r.found)?r.found:!1},moveTreeNode(o,n,t,i,r,l){const s=c.actions.deleteTreeNode(t,i);c.actions.insertTreeNode(t,r,s,l),$.emit(`move-${n}`,{fromTreeId:o,toTreeId:n,moved:s.id,target:r,position:l})},insertTreeNode(o,n,t,i){if(o)for(let r=0;r<o.length;r++){if(o[r].id===n){let s=r;return i==="after"?(s++,o.splice(s,0,t)):i==="before"?o.splice(s,0,t):i==="inside"&&(Object.hasOwn(o[r],"children")||(o[r].children=[],o[r].opened=!0),o[r].children.splice(0,0,t)),o[r]}const l=this.insertTreeNode(o[r].children,n,t,i);if(l)return l}},deleteTreeNode(o,n){if(o)for(let t=0;t<o.length;t++){if(o[t].id===n){const r=o[t];return o.splice(t,1),r}const i=c.actions.deleteTreeNode(o[t].children,n);if(i)return i}}}},Q={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(h),setup(o,{emit:n}){let t=e.reactive({});const i=e.ref("false"),r=e.ref(null),l=new Set,s=e.computed(()=>i.value&&t),m=(a,d)=>{t=L.data,n(a,d,t),a===h.dragenter&&(l.size||d.target===r.value)&&l.add(d.target),a===h.dragleave&&l.delete(d.target),a===h.drop&&l.clear(),i.value=!!l.size};return(a,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"el",ref:r,onDragenter:d[0]||(d[0]=f=>m(e.unref(h).dragenter,f)),onDragleave:d[1]||(d[1]=f=>m(e.unref(h).dragleave,f)),onDragover:d[2]||(d[2]=e.withModifiers(f=>m(e.unref(h).dragover,f),["prevent"])),onDrop:d[3]||(d[3]=e.withModifiers(f=>m(e.unref(h).drop,f),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{transferData:s.value})]),_:3},544))}},P={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean,renderTitle:Function},emits:["select","collapse","expand","move"],setup(o,{emit:n}){const t=o,i=e.getCurrentInstance().uid;c.actions.initTreeStore(i,t.noSelect,t.multiSelect,t.expanded,t.transfer,t.renderTitle);const r=(s,m)=>{console.log(s,m)};$.on(`select-${i}`,s=>{n("select",s)}),$.on(`expand-${i}`,s=>{n("expand",s)}),$.on(`collapse-${i}`,s=>{n("collapse",s)}),$.on(`move-${i}`,s=>{n("move",s)});const l=(s=null)=>{console.log(s),c.mutations.setItemSelect(i,s.model),c.actions.toggleItem(i,t.items,s.model.id)};return(s,m)=>(e.openBlock(),e.createBlock(Q,{class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,a=>(e.openBlock(),e.createBlock(F,{key:a.id,model:a,treeId:e.unref(i),items:t.items,onNodeclick:l},null,8,["model","treeId","items"]))),128))]),_:1},8,["onDrop"]))}},ue="",v=M({__name:"DAccordion",props:{items:Array},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createBlock(P,{class:"accordion",items:n.items,"no-select":!0},null,8,["items"]))}},[["__scopeId","data-v-4c920528"]]),A={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:l,height:s,paddingLeft:m,transitionDuration:a,transitionTimingFunction:d}=n,f=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${l}px;`:"";return`position:${f};z-index:${r};${u}height:${s}px;padding-left:${m}px;transition-duration:${a}ms;transition-timing-function:${d};`});return(i,r)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},O={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,top:r,zIndex:l,minWidth:s,height:m,paddingLeft:a,transitionDuration:d,transitionTimingFunction:f}=n,u=i?"fixed":"static",B=n.useMinWidthLayout?`min-width: ${s}px;`:"";return`position:${u};top:${r}px;z-index:${l};${B}height:${m}px;padding-left:${a}px;transition-duration:${d}ms;transition-timing-function:${f};`});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},R={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:l,height:s,paddingLeft:m,transitionDuration:a,transitionTimingFunction:d}=n,f=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${l}px;`:"";return`position:${f};z-index:${r};${u}height:${s}px;padding-left:${m}px;transition-duration:${a}ms;transition-timing-function:${d};`});return(i,r)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Y={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(o){const n=o,t=e.computed(()=>{const{zIndex:i,width:r,paddingTop:l,transitionDuration:s,transitionTimingFunction:m}=n;return`z-index:${i};width:${r}px;padding-top:${l}px;transition-duration:${s}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Z={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(o){const n=o,t=e.computed(()=>{const{paddingTop:i,paddingBottom:r,paddingLeft:l,transitionDuration:s,transitionTimingFunction:m}=n,a=`overflow:${n.overflowHidden?"hidden":"visible"};`;return`padding-top:${i}px;padding-bottom:${r}px;padding-left:${l}px;${a}transition-duration:${s}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(t.value),class:"d-layout-content"},[e.renderSlot(i.$slots,"default")],4))}};function ee(o){const n=e.ref(0),t=e.computed(()=>`transform: translateX(${-n.value}px);`);let i=!1;function r(f){n.value=f}function l(){var f;const u=((f=document.scrollingElement)===null||f===void 0?void 0:f.scrollLeft)||0;r(u)}function s(){l()}function m(){document.addEventListener("scroll",l)}function a(){i&&document.removeEventListener("scroll",l)}function d(){s(),m(),i=!0}return e.watch(o,f=>{f?d():a()},{immediate:!0}),e.onUnmounted(()=>{a()}),t}const te=1001,oe=999,ne=998,ie={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse"],setup(o,{emit:n}){const t=o,i=e.computed(()=>t.useMinWidthLayout?`min-width:${t.minWidth}px;`:""),r=e.computed(()=>t.useMinWidthLayout&&(t.fixedHeaderAndTab||t.fixedFooter)),l=ee(r),s=e.computed(()=>t.fixedHeaderAndTab?l.value:""),m=e.computed(()=>t.fixedFooter?l.value:""),a=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return{transitionDuration:g,transitionTimingFunction:I}}),d=e.computed(()=>t.mode==="vertical"),f=e.computed(()=>t.isMobile||d.value?1003:1e3),u=e.computed({get(){return t.sidebarCollapse},set(g){n("update:sidebar-collapse",g)}});function B(){u.value=!0}const T=e.computed(()=>t.isMobile&&!u.value),C=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return`background-color:${t.maskBg};transition-duration:${g}ms;transition-timing-function:${I};`}),z=e.computed(()=>{const{sidebarWidth:g,sidebarCollapsedWidth:I}=t,ae=t.isMobile?0:I,se=u.value?ae:g;return t.sidebarVisible?se:0}),k=e.computed(()=>t.isMobile?0:z.value),y=e.computed(()=>d.value?k.value:0),b=e.computed(()=>!t.isMobile&&!d.value&&t.headerVisible?t.headerHeight:0),x=e.computed(()=>{let g=0;return t.fixedHeaderAndTab&&(t.headerVisible&&(g+=t.headerHeight),t.tabVisible&&(g+=t.tabHeight)),g}),_=e.computed(()=>t.fixedFooter&&t.footerVisible?t.footerHeight:0);return(g,I)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(i.value)},[o.headerVisible?(e.openBlock(),e.createBlock(A,e.mergeProps({key:0},a.value,{fixed:o.fixedHeaderAndTab,"z-index":te,"min-width":o.minWidth,height:o.headerHeight,"padding-left":y.value,style:s.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),o.tabVisible?(e.openBlock(),e.createBlock(O,e.mergeProps({key:1},a.value,{fixed:o.fixedHeaderAndTab,"z-index":oe,"min-width":o.minWidth,top:o.headerHeight,height:o.tabHeight,"padding-left":k.value,style:s.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),o.sidebarVisible?(e.openBlock(),e.createBlock(Y,e.mergeProps({key:2},a.value,{"z-index":f.value,width:z.value,"padding-top":b.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(C.value),onClick:B},null,4)):e.createCommentVNode("",!0),e.createVNode(Z,e.mergeProps(a.value,{"padding-top":x.value,"padding-bottom":_.value,"padding-left":k.value,"overflow-hidden":o.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),o.footerVisible?(e.openBlock(),e.createBlock(R,e.mergeProps({key:4},a.value,{fixed:o.fixedFooter,"z-index":ne,"min-width":o.minWidth,height:o.footerHeight,"padding-left":k.value,style:m.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},N={state:e.reactive({theme:"dark"}),getters:{theme(){return N.state.theme}},mutations:{setTheme(o){N.state.theme=o,document.documentElement.setAttribute("class",o)}},actions:{toggleTheme(){N.state.theme=N.state.theme==="dark"?"light":"dark",document.documentElement.setAttribute("class",N.state.theme)}}},re={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(o){const n=o;return N.mutations.setTheme(n.theme),(t,i)=>e.renderSlot(t.$slots,"default")}};p.DAccordion=v,p.DBadge=W,p.DButton=X,p.DCollapse=V,p.DConfigProvider=re,p.DGlobalStore=N,p.DIcon=w,p.DIconStore=D,p.DLayoutAdmin=ie,p.DLayoutContent=Z,p.DLayoutFooter=R,p.DLayoutHeader=A,p.DLayoutSidebar=Y,p.DLayoutTab=O,p.DTransferStore=L,p.DTree=P,p.DTreeItem=F,p.DTreeStore=c,p.emitter=$,p.eventsBus=H,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
1
+ (function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p.DophJs={},p.Vue))})(this,function(p,e){"use strict";const fe="",pe="",ue="",ge="",C={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String},setup(o){const n=o,t=e.useSlots(),i=e.computed(()=>{const{color:s}=n;return s===void 0?null:s}),r=e.computed(()=>{const s=n.size??null;if(s!==void 0)return typeof s=="number"||/^\d+$/.test(s)?`${s}px`:s}),l=e.h("i",{class:"icon",style:{color:i.value,fontSize:r.value}},n.component?e.h(n.component):t);return(s,f)=>(e.openBlock(),e.createBlock(e.unref(l)))}},X={__name:"DButton",props:{class:String,icon:Object},emits:["click"],setup(o,{emit:n}){const t=o;let i=null;t.icon&&(i=e.h(C,{component:t.icon,color:"inherit"}));const r=l=>{n("click",l)};return(l,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:r,class:e.normalizeClass(["button",t.class])},[e.renderSlot(l.$slots,"default")],2)),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:r,class:e.normalizeClass(["button button-ext",t.class])},[e.createVNode(e.unref(i)),e.createElementVNode("div",null,[e.renderSlot(l.$slots,"default")])],2)):e.createCommentVNode("",!0)],64))}},he="",E=(o,n)=>{const t=o.__vccOpts||o;for(const[i,r]of n)t[i]=r;return t},j={class:"d-input"},G={class:"label"},U=["placeholder"],q=E({__name:"DInput",props:{label:String,placeholder:String,size:String,modelValue:String},emits:["update:modelValue"],setup(o,{emit:n}){const t=o,i=e.computed({get:()=>t.modelValue,set:r=>{n("update:modelValue",r)}});return(r,l)=>(e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("div",G,e.toDisplayString(t.label),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=s=>i.value=s),type:"text",placeholder:t.placeholder,style:e.normalizeStyle(t.size==="wide"?"width:100%":"")},null,12,U),[[e.vModelText,i.value]])]))}},[["__scopeId","data-v-5d2cb864"]]),D={state:{},getters:{getIcon(o){return D.state[o]},getIcons(){return D.state}},mutations:{addIcon(o,n){D.state.name=n},addIcons(o){for(const n in o)o.hasOwnProperty(n)&&(D.state[n]=o[n])}}},W={__name:"DBadge",props:{class:String},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",n.class])},[e.renderSlot(t.$slots,"default")],2))}},S="0px",M={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(o){const n=o,t=a=>({height:a.style.height,width:a.style.width,position:a.style.position,visibility:a.style.visibility,overflow:a.style.overflow,paddingTop:a.style.paddingTop,paddingBottom:a.style.paddingBottom,borderTopWidth:a.style.borderTopWidth,borderBottomWidth:a.style.borderBottomWidth,marginTop:a.style.marginTop,marginBottom:a.style.marginBottom}),i=(a,d)=>{const{width:m}=getComputedStyle(a);a.style.width=m,a.style.position="absolute",a.style.visibility="hidden",a.style.height="";let{height:u}=getComputedStyle(a);return a.style.width=d.width,a.style.position=d.position,a.style.visibility=d.visibility,a.style.height=S,a.style.overflow="hidden",d.height&&d.height!==S?d.height:u},r=(a,d,m,u,B)=>{const _=a.animate(u,B);a.style.height=d.height,_.onfinish=()=>{a.style.overflow=d.overflow,m()}},l=(a,d)=>[{height:S,opacity:n.opacityClosed,paddingTop:S,paddingBottom:S,borderTopWidth:S,borderBottomWidth:S,marginTop:S,marginBottom:S},{height:a,opacity:n.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}],s=(a,d)=>{const m=a,u=t(m),B=i(m,u),_=l(B,u),w={duration:n.duration,easing:n.easingEnter};r(m,u,d,_,w)},f=(a,d)=>{const m=a,u=t(m),{height:B}=getComputedStyle(m);m.style.height=B,m.style.overflow="hidden";const _=l(B,u).reverse(),w={duration:n.duration,easing:n.easingLeave};r(m,u,d,_,w)};return(a,d)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:s,onLeave:f},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},L={data:void 0},V=o=>o.reduce((n,t)=>(n[t]=t)&&n,{}),h=V(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),J=V(["copy","move","link","none"]),K=V(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),Q={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:o=>o in J},effectAllowed:{validator:o=>o in K},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(o){const n=o,t=e.useSlots(),i=e.ref(!1),r=e.computed(()=>i&&n.transferData),l=e.computed(()=>({position:"fixed",top:"-1000px"})),s=(f,a)=>{const d=a.dataTransfer;if([h.dragenter,h.dragover].includes(f)&&n.dropEffect&&(d.dropEffect=n.dropEffect),f===h.dragstart){if(n.effectAllowed&&(d.effectAllowed=n.effectAllowed),n.image||t.image){let m;n.image?(m=new Image,m.src=n.image):t.image&&(m=t.image[0].elm),d.setDragImage&&d.setDragImage(m,n.imageXOffset,n.imageYOffset)}n.transferData!==void 0&&(L.data=n.transferData,a.dataTransfer.setData("text","")),i.value=!0}};return(f,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{draggable:n.draggable,onDrag:a[0]||(a[0]=d=>s(e.unref(h).drag,d)),onDragstart:a[1]||(a[1]=e.withModifiers(d=>s(e.unref(h).dragstart,d),["stop"])),onDragenter:a[2]||(a[2]=d=>s(e.unref(h).dragenter,d)),onDragleave:a[3]||(a[3]=d=>s(e.unref(h).dragleave,d)),onDragend:a[4]||(a[4]=d=>s(e.unref(h).dragend,d))},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{transferData:r.value}),o.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(l.value)},[e.renderSlot(f.$slots,"image",{transferData:r.value})],4)):e.renderSlot(f.$slots,"image",{key:1,transferData:r.value})]),_:3},40,["draggable"]))}},be="",v={class:"item-title"},ee={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},te={key:0,class:"sub-menu"},F=E({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array},emits:["nodedrop","nodedragover","nodedragleave","nodeclick"],setup(o,{emit:n}){const t=o,i=e.ref(null),r=e.ref(!1),l=e.ref(!1),s=e.ref(!1),f=e.computed(()=>t.model.children&&t.model.children.length),a=e.computed(()=>(c.actions.isTreeExpanded(t.treeId)&&(t.model.expanded=t.model.expanded===void 0?!0:t.model.expanded),t.model.expanded)),d=k=>{n("nodeclick",{event:k,model:t.model})},m=k=>{n("nodeclick",k)},u=e.computed(()=>(c.actions.isItemSelected(t.treeId,t.model.id)?"selected":"")+(r.value?"node-over ":"")+(l.value?"node-top ":"")+(s.value?"node-bottom ":"")),B=e.computed(()=>t.model.draggable===!0),_=k=>{let y=L.data;if(y.model.id===t.model.id||c.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||c.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return r.value=!1,l.value=!1,s.value=!1,!1;if(!c.state.trees[t.treeId].transfer&&y.id!==t.treeId)return!1;let b="";l.value?b="before":s.value?b="after":b="inside",c.actions.moveTreeNode(y.id,t.treeId,t.items,y.model.id,t.model.id,b),r.value=!1,l.value=!1,s.value=!1},w=k=>{let y=L.data;if(y.model.id===t.model.id||c.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||c.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return!1;const b=k.y,x=i.value.getBoundingClientRect().top,$=i.value.getBoundingClientRect().height,g=$/3;b>x&&b<=x+g?(r.value=!1,l.value=!0,s.value=!1):b<x+$&&b>=x+$-g?(r.value=!1,l.value=!1,s.value=!0):(r.value=!0,l.value=!1,s.value=!1)},z=()=>{r.value=!1,l.value=!1,s.value=!1};return(k,y)=>{const b=e.resolveComponent("d-tree-item",!0);return e.openBlock(),e.createBlock(Q,{tag:"li",class:"tree-item","transfer-data":{id:t.treeId,model:t.model},draggable:B.value,onDrop:e.withModifiers(_,["stop"]),onDragenter:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(w,["prevent","stop"]),onDragleave:e.withModifiers(z,["prevent"])},{default:e.withCtx(()=>{var x,$;return[e.createElementVNode("div",{ref_key:"node",ref:i,class:e.normalizeClass(u.value),onClick:d},[e.createElementVNode("div",null,[t.model.icons&&t.model.icons.pre&&f.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C),{key:0,component:e.unref(D).getters.getIcon(t.model.icons.pre.component),size:18,color:t.model.icons.pre.color?t.model.icons.pre.color:"inherit",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.pre&&!f.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C),{key:1,component:e.unref(D).getters.getIcon(t.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C),{key:2,component:e.unref(D).getters.getIcon(t.model.icons.icon.component),color:t.model.icons.icon.color?t.model.icons.icon.color:"inherit"},null,8,["component","color"])):e.createCommentVNode("",!0),e.createElementVNode("div",v,[e.createElementVNode("div",null,e.toDisplayString(e.unref(c).actions.renderTitle(t.treeId,t.model.title)),1)])]),e.createElementVNode("div",ee,[((x=t.model.badge)==null?void 0:x.value)!==void 0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(W),{key:0,class:e.normalizeClass([($=t.model.badge)==null?void 0:$.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.post&&f.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C),{key:1,component:e.unref(D).getters.getIcon(t.model.icons.post.component),size:20,color:t.model.icons.post.color?t.model.icons.post.color:"inherit",class:e.normalizeClass(a.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],2),e.createVNode(M,null,{default:e.withCtx(()=>[f.value&&a.value?(e.openBlock(),e.createElementBlock("ul",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model.children,g=>(e.openBlock(),e.createBlock(b,{class:"tree-item",key:g.id,model:g,treeId:t.treeId,items:t.items,onNodeclick:m},null,8,["model","treeId","items"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])}}},[["__scopeId","data-v-4c84dfd5"]]);function H(o){return o=o||new Map,{all:o,on(n,t){const i=o.get(n);i?i.push(t):o.set(n,[t])},off(n,t){const i=o.get(n);i&&(t?i.splice(i.indexOf(t)>>>0,1):o.set(n,[]))},emit(n,t){let i=o.get(n);i&&i.slice().map(r=>{r(t)}),i=o.get("*"),i&&i.slice().map(r=>{r(n,t)})}}}const T=H(),c={state:e.reactive({trees:{}}),getters:{getItems(o){return c.state.trees[o].items},getItemsSelect(o){return c.state.trees[o].selected},getParentId(o,n,t,i="id",r="children",l={}){return t&&o&&(o.find(s=>s[i]===t?(l.found=n,s):c.getters.getParentId(s[r],s.id,t,i,r,l)),l.found)?l.found:!1}},mutations:{setTreeItems(o,n){c.state.trees[o].items=n},setItemSelect(o,n){c.state.trees[o].noSelect||(c.state.trees[o].multiSelect?c.state.trees[o].selected.includes(n.id)?c.state.trees[o].selected=c.state.trees[o].selected.filter(function(t){return t!==n.id}):c.state.trees[o].selected=[...c.state.trees[o].selected,n.id]:c.state.trees[o].selected=[n.id])}},actions:{initTreeStore(o,n,t,i,r,l){c.state.trees[o]=[],c.state.trees[o].selected=[],c.state.trees[o].noSelect=n,c.state.trees[o].multiSelect=t,c.state.trees[o].expanded=i,c.state.trees[o].transfer=r,c.state.trees[o].renderTitle=l},renderTitle(o,n){return c.state.trees[o].renderTitle?c.state.trees[o].renderTitle(n):n},isItemSelected(o,n){return c.state.trees[o].selected.includes(n)},toggleItem(o,n,t){const i=c.actions.deepSearch(n,t);i.expanded=i.expanded===void 0||!i.expanded,i.children&&i.children.length&&(i.expanded?T.emit(`expand-${o}`,{id:o,model:i}):T.emit(`collapse-${o}`,{id:o,model:i}))},isTreeExpanded(o){return c.state.trees[o].expanded},isChildOfParent(o,n,t,i){const r=c.actions.deepSearch(n,t);if(r&&r.children){for(let l=0;l<r.children.length;l++)if(r.children[l].id===i)return!0}return!1},isParentOfChild(o,n,t,i){const r=c.actions.deepSearch(n,t);return!!(r&&r.children&&c.actions.deepSearch(r.children,i))},deepSearch(o,n,t="id",i="children",r={}){return n&&o&&(o.find(l=>l[t]===n?(r.found=l,l):c.actions.deepSearch(l[i],n,t,i,r)),r.found)?r.found:!1},moveTreeNode(o,n,t,i,r,l){const s=c.actions.deleteTreeNode(t,i);c.actions.insertTreeNode(t,r,s,l),T.emit(`move-${n}`,{fromTreeId:o,toTreeId:n,moved:s.id,target:r,position:l})},insertTreeNode(o,n,t,i){if(o)for(let r=0;r<o.length;r++){if(o[r].id===n){let s=r;return i==="after"?(s++,o.splice(s,0,t)):i==="before"?o.splice(s,0,t):i==="inside"&&(Object.hasOwn(o[r],"children")||(o[r].children=[],o[r].opened=!0),o[r].children.splice(0,0,t)),o[r]}const l=this.insertTreeNode(o[r].children,n,t,i);if(l)return l}},deleteTreeNode(o,n){if(o)for(let t=0;t<o.length;t++){if(o[t].id===n){const r=o[t];return o.splice(t,1),r}const i=c.actions.deleteTreeNode(o[t].children,n);if(i)return i}}}},oe={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(h),setup(o,{emit:n}){let t=e.reactive({});const i=e.ref("false"),r=e.ref(null),l=new Set,s=e.computed(()=>i.value&&t),f=(a,d)=>{t=L.data,n(a,d,t),a===h.dragenter&&(l.size||d.target===r.value)&&l.add(d.target),a===h.dragleave&&l.delete(d.target),a===h.drop&&l.clear(),i.value=!!l.size};return(a,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"el",ref:r,onDragenter:d[0]||(d[0]=m=>f(e.unref(h).dragenter,m)),onDragleave:d[1]||(d[1]=m=>f(e.unref(h).dragleave,m)),onDragover:d[2]||(d[2]=e.withModifiers(m=>f(e.unref(h).dragover,m),["prevent"])),onDrop:d[3]||(d[3]=e.withModifiers(m=>f(e.unref(h).drop,m),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{transferData:s.value})]),_:3},544))}},P={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean,renderTitle:Function},emits:["select","collapse","expand","move"],setup(o,{emit:n}){const t=o,i=e.getCurrentInstance().uid;c.actions.initTreeStore(i,t.noSelect,t.multiSelect,t.expanded,t.transfer,t.renderTitle);const r=(s,f)=>{console.log(s,f)};T.on(`select-${i}`,s=>{n("select",s)}),T.on(`expand-${i}`,s=>{n("expand",s)}),T.on(`collapse-${i}`,s=>{n("collapse",s)}),T.on(`move-${i}`,s=>{n("move",s)});const l=(s=null)=>{console.log(s),c.mutations.setItemSelect(i,s.model),c.actions.toggleItem(i,t.items,s.model.id)};return(s,f)=>(e.openBlock(),e.createBlock(oe,{class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,a=>(e.openBlock(),e.createBlock(F,{key:a.id,model:a,treeId:e.unref(i),items:t.items,onNodeclick:l},null,8,["model","treeId","items"]))),128))]),_:1},8,["onDrop"]))}},ke="",ne=E({__name:"DAccordion",props:{items:Array},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createBlock(P,{class:"accordion",items:n.items,"no-select":!0},null,8,["items"]))}},[["__scopeId","data-v-4c920528"]]),A={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:l,height:s,paddingLeft:f,transitionDuration:a,transitionTimingFunction:d}=n,m=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${l}px;`:"";return`position:${m};z-index:${r};${u}height:${s}px;padding-left:${f}px;transition-duration:${a}ms;transition-timing-function:${d};`});return(i,r)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},O={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,top:r,zIndex:l,minWidth:s,height:f,paddingLeft:a,transitionDuration:d,transitionTimingFunction:m}=n,u=i?"fixed":"static",B=n.useMinWidthLayout?`min-width: ${s}px;`:"";return`position:${u};top:${r}px;z-index:${l};${B}height:${f}px;padding-left:${a}px;transition-duration:${d}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},R={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:l,height:s,paddingLeft:f,transitionDuration:a,transitionTimingFunction:d}=n,m=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${l}px;`:"";return`position:${m};z-index:${r};${u}height:${s}px;padding-left:${f}px;transition-duration:${a}ms;transition-timing-function:${d};`});return(i,r)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Y={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(o){const n=o,t=e.computed(()=>{const{zIndex:i,width:r,paddingTop:l,transitionDuration:s,transitionTimingFunction:f}=n;return`z-index:${i};width:${r}px;padding-top:${l}px;transition-duration:${s}ms;transition-timing-function:${f};`});return(i,r)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Z={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(o){const n=o,t=e.computed(()=>{const{paddingTop:i,paddingBottom:r,paddingLeft:l,transitionDuration:s,transitionTimingFunction:f}=n,a=`overflow:${n.overflowHidden?"hidden":"visible"};`;return`padding-top:${i}px;padding-bottom:${r}px;padding-left:${l}px;${a}transition-duration:${s}ms;transition-timing-function:${f};`});return(i,r)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(t.value),class:"d-layout-content"},[e.renderSlot(i.$slots,"default")],4))}};function ie(o){const n=e.ref(0),t=e.computed(()=>`transform: translateX(${-n.value}px);`);let i=!1;function r(m){n.value=m}function l(){var m;const u=((m=document.scrollingElement)===null||m===void 0?void 0:m.scrollLeft)||0;r(u)}function s(){l()}function f(){document.addEventListener("scroll",l)}function a(){i&&document.removeEventListener("scroll",l)}function d(){s(),f(),i=!0}return e.watch(o,m=>{m?d():a()},{immediate:!0}),e.onUnmounted(()=>{a()}),t}const re=1001,ae=999,se=998,le={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse"],setup(o,{emit:n}){const t=o,i=e.computed(()=>t.useMinWidthLayout?`min-width:${t.minWidth}px;`:""),r=e.computed(()=>t.useMinWidthLayout&&(t.fixedHeaderAndTab||t.fixedFooter)),l=ie(r),s=e.computed(()=>t.fixedHeaderAndTab?l.value:""),f=e.computed(()=>t.fixedFooter?l.value:""),a=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return{transitionDuration:g,transitionTimingFunction:I}}),d=e.computed(()=>t.mode==="vertical"),m=e.computed(()=>t.isMobile||d.value?1003:1e3),u=e.computed({get(){return t.sidebarCollapse},set(g){n("update:sidebar-collapse",g)}});function B(){u.value=!0}const _=e.computed(()=>t.isMobile&&!u.value),w=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return`background-color:${t.maskBg};transition-duration:${g}ms;transition-timing-function:${I};`}),z=e.computed(()=>{const{sidebarWidth:g,sidebarCollapsedWidth:I}=t,ce=t.isMobile?0:I,me=u.value?ce:g;return t.sidebarVisible?me:0}),k=e.computed(()=>t.isMobile?0:z.value),y=e.computed(()=>d.value?k.value:0),b=e.computed(()=>!t.isMobile&&!d.value&&t.headerVisible?t.headerHeight:0),x=e.computed(()=>{let g=0;return t.fixedHeaderAndTab&&(t.headerVisible&&(g+=t.headerHeight),t.tabVisible&&(g+=t.tabHeight)),g}),$=e.computed(()=>t.fixedFooter&&t.footerVisible?t.footerHeight:0);return(g,I)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(i.value)},[o.headerVisible?(e.openBlock(),e.createBlock(A,e.mergeProps({key:0},a.value,{fixed:o.fixedHeaderAndTab,"z-index":re,"min-width":o.minWidth,height:o.headerHeight,"padding-left":y.value,style:s.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),o.tabVisible?(e.openBlock(),e.createBlock(O,e.mergeProps({key:1},a.value,{fixed:o.fixedHeaderAndTab,"z-index":ae,"min-width":o.minWidth,top:o.headerHeight,height:o.tabHeight,"padding-left":k.value,style:s.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),o.sidebarVisible?(e.openBlock(),e.createBlock(Y,e.mergeProps({key:2},a.value,{"z-index":m.value,width:z.value,"padding-top":b.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(w.value),onClick:B},null,4)):e.createCommentVNode("",!0),e.createVNode(Z,e.mergeProps(a.value,{"padding-top":x.value,"padding-bottom":$.value,"padding-left":k.value,"overflow-hidden":o.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),o.footerVisible?(e.openBlock(),e.createBlock(R,e.mergeProps({key:4},a.value,{fixed:o.fixedFooter,"z-index":se,"min-width":o.minWidth,height:o.footerHeight,"padding-left":k.value,style:f.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},N={state:e.reactive({theme:"dark"}),getters:{theme(){return N.state.theme}},mutations:{setTheme(o){N.state.theme=o,document.documentElement.setAttribute("class",o)}},actions:{toggleTheme(){N.state.theme=N.state.theme==="dark"?"light":"dark",document.documentElement.setAttribute("class",N.state.theme)}}},de={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(o){const n=o;return N.mutations.setTheme(n.theme),(t,i)=>e.renderSlot(t.$slots,"default")}};p.DAccordion=ne,p.DBadge=W,p.DButton=X,p.DCollapse=M,p.DConfigProvider=de,p.DGlobalStore=N,p.DIcon=C,p.DIconStore=D,p.DInput=q,p.DLayoutAdmin=le,p.DLayoutContent=Z,p.DLayoutFooter=R,p.DLayoutHeader=A,p.DLayoutSidebar=Y,p.DLayoutTab=O,p.DTransferStore=L,p.DTree=P,p.DTreeItem=F,p.DTreeStore=c,p.emitter=T,p.eventsBus=H,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.button{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-block;padding:.4rem .8rem;border-radius:5px;transition:all .2s;font-weight:400;margin:.25rem .125rem}.button.button-sm{font-size:.8em}.button.button-lg{font-size:1.3em}.button.button-ext{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;height:100%;gap:5px}.button.button-ext .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center}.label{margin-bottom:5px;font-size:.9em;opacity:.7}.d-input,.d-select,.d-checkbox{margin-bottom:15px}.d-input input,select{font-size:1.1em;border-style:solid;border-width:1px;border-radius:5px;padding:5px 10px}.d-checkbox input[type=checkbox]{position:absolute;z-index:-1;opacity:0}.d-checkbox input[type=checkbox]+label{display:inline-flex;align-items:center;-webkit-user-select:none;user-select:none}.d-checkbox input[type=checkbox]+label:before{content:"";display:inline-block;width:1em;height:1em;flex-shrink:0;flex-grow:0;border-radius:.25em;margin-right:.5em;background-repeat:no-repeat;background-position:center center;background-size:50% 50%;transition:all .2s}.d-checkbox input[type=checkbox]:checked+label:before{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");background-size:10px}.icon{line-height:1em;text-align:center;display:inline-block;position:relative;fill:currentColor;transform:translateZ(0)}.icon svg{width:1em;height:1em}.accordion{-webkit-user-select:none;user-select:none}.accordion .accordion-item,.accordion .accordion-sub{cursor:pointer;padding:.25rem .125rem}.badge{display:inline-block;padding:3px 4px;margin:.25rem .125rem;border-radius:5px;line-height:1}.badge.badge-sm{font-size:.8em;padding:2px 3px}.tree{padding-left:0;-webkit-user-select:none;user-select:none;list-style:none}.tree.accordion .tree-item ul{padding-left:0}.tree .tree-item{cursor:pointer;line-height:1.5;overflow:hidden;position:relative}.tree .tree-item>div{padding:3px 5px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-radius:5px}.tree .tree-item>div.selected{transition:all 50ms}.tree .tree-item>div>div{display:flex;flex-direction:row;justify-content:start;align-items:center;gap:3px}.tree .tree-item>div .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center;transition:all .2s}.tree .tree-item>div .tree-open-post{transform:rotate(-90deg)}.tree .tree-item>div .tree-open-pre{transform:rotate(90deg)}.tree .tree-item ul{padding-left:20px;list-style:none}.tree .item-title{display:table;table-layout:fixed;width:100%}.tree .item-title>div{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tree.tree-compact{font-size:.9em}.tree.tree-compact .tree-item{line-height:1}.tree.tree-compact .tree-item>div{padding:1px 3px}.d-layout{display:flex;flex-direction:column;width:100%;height:100%}.d-layout .d-layout-header{left:0;top:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-content{flex-grow:1;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-footer{left:0;bottom:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-sidebar{position:fixed;left:0;top:0;box-sizing:border-box;width:100%;height:100%;transition-property:all;overflow-y:hidden}.d-layout .d-layout-sidebar-mask{position:fixed;left:0;top:0;z-index:1002;width:100%;height:100%;transition-property:background-color}.d-layout .d-layout-tab{left:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.light .button{background-color:#ccc9;color:gray}.light .button:hover{color:#666;background-color:#cccc}.light .button.button-blue{background-color:#51c0e799;color:#43565c}.light .button.button-blue:hover{color:#2d3a3f;background-color:#51c0e7cc}.light .button.button-green{background-color:#90d76099;color:#4f4f4f}.light .button.button-green:hover{color:#363636;background-color:#90d760cc}.light .button.button-red{background-color:#ff929299;color:#ae4a4a}.light .button.button-red:hover{background-color:#ff9292cc;color:#8a3b3b}.light .button.button-orange{background-color:#ffc45899;color:#856a39}.light .button.button-orange:hover{background-color:#ffc458cc;color:#614e2a}.light .button.button-violet{background-color:#c2a7ff99;color:#7456b7}.light .button.button-violet:hover{background-color:#c2a7ffcc;color:#5c4199}.light .button.button-outline{outline:solid 1px rgba(204,204,204,.6);color:gray;background-color:transparent}.light .button.button-outline:hover{color:gray;background-color:#cccc}.light .button.button-outline-blue{outline:solid 1px rgba(81,192,231,.6);background-color:transparent;color:#136c8c99}.light .button.button-outline-blue:hover{color:#43565c;background-color:#51c0e7cc}.light .button.button-outline-green{outline:solid 1px rgba(144,215,96,.6);background-color:transparent;color:#467e2099}.light .button.button-outline-green:hover{color:#4f4f4f;background-color:#90d760cc}.light .button.button-outline-red{outline:solid 1px rgba(255,146,146,.6);background-color:transparent;color:#f8000099}.light .button.button-outline-red:hover{color:#ae4a4a;background-color:#ff9292cc}.light .button.button-outline-orange{outline:solid 1px rgba(255,196,88,.6);background-color:transparent;color:#be7b0099}.light .button.button-outline-orange:hover{color:#856a39;background-color:#ffc458cc}.light .button.button-outline-violet{outline:solid 1px rgba(194,167,255,.6);background-color:transparent;color:#580eff99}.light .button.button-outline-violet:hover{color:#7456b7;background-color:#c2a7ffcc}.dark .button{background-color:#ffffff1a;color:#e5e5e5}.dark .button:hover{color:#fff;background-color:#fff3}.dark .button.button-blue{background-color:#1685ac}.dark .button.button-blue:hover{background-color:#1685accc}.dark .button.button-green{background-color:#5d9d31}.dark .button.button-green:hover{background-color:#5d9d31cc}.dark .button.button-red{background-color:#c33737}.dark .button.button-red:hover{background-color:#c33737cc}.dark .button.button-orange{background-color:#d59622}.dark .button.button-orange:hover{background-color:#d59622cc}.dark .button.button-violet{background-color:#7750d2}.dark .button.button-violet:hover{background-color:#7750d2cc}.dark .button.button-outline{outline:solid 1px #555555;color:#a2a2a2;background-color:transparent}.dark .button.button-outline:hover{color:#fff;background-color:#555}.dark .button.button-outline-blue{outline:solid 1px #1685ac;background-color:transparent;color:#1ca8d9}.dark .button.button-outline-blue:hover{color:#fff;background-color:#1685ac}.dark .button.button-outline-green{outline:solid 1px #5d9d31;background-color:transparent;color:#74c33e}.dark .button.button-outline-green:hover{color:#fff;background-color:#5d9d31}.dark .button.button-outline-red{outline:solid 1px #c33737;background-color:transparent;color:#d15c5c}.dark .button.button-outline-red:hover{color:#fff;background-color:#c33737}.dark .button.button-outline-orange{outline:solid 1px #d59622;background-color:transparent;color:#e2ac48}.dark .button.button-outline-orange:hover{color:#fff;background-color:#d59622}.dark .button.button-outline-violet{outline:solid 1px #7750d2;background-color:transparent;color:#9779dc}.dark .button.button-outline-violet:hover{color:#fff;background-color:#7750d2}.badge{background-color:#ccc9;color:gray}.badge.badge-blue{background-color:#51c0e799;color:#43565c}.badge.badge-green{background-color:#90d76099;color:#4f4f4f}.badge.badge-red{background-color:#ff929299;color:#ae4a4a}.badge.badge-orange{background-color:#ffc45899;color:#856a39}.badge.badge-violet{background-color:#c2a7ff99;color:#7456b7}.badge.badge-stress-gray{color:#fff;background-color:#80808099}.badge.badge-stress-blue{color:#fff;background-color:#136c8c99}.badge.badge-stress-green{color:#fff;background-color:#467e2099}.badge.badge-stress-red{color:#fff;background-color:#f8000099}.badge.badge-stress-orange{color:#fff;background-color:#be7b0099}.badge.badge-stress-violet{color:#fff;background-color:#580eff99}.dark .badge{background-color:#555;color:#e5e5e5}.dark .badge.badge-blue{background-color:#1685ac}.dark .badge.badge-green{background-color:#5d9d31}.dark .badge.badge-red{background-color:#c33737}.dark .badge.badge-orange{background-color:#d59622}.dark .badge.badge-violet{background-color:#7750d2}.dark .badge.badge-stress-gray{color:#888;background-color:#090909}.dark .badge.badge-stress-blue{color:#41bce7;background-color:#051c24}.dark .badge.badge-stress-green{color:#90cf65;background-color:#18280d}.dark .badge.badge-stress-red{color:#dc8484;background-color:#4c1515}.dark .badge.badge-stress-orange{color:#e9c074;background-color:#51390d}.dark .badge.badge-stress-violet{color:#b6a1e7;background-color:#341c6d}.tree .tree-item>div.selected{background-color:#0000001a}.tree .tree-item>div:hover{background-color:#0000001a}.dark .tree .tree-item>div.selected{background-color:#ffffff1a}.dark .tree .tree-item>div:hover{background-color:#ffffff1a}.dark{background-color:#34383e;color:#ccc}.light{background-color:#fff;color:#333}.d-input input,.d-select select{color:#ccc;background-color:#262626;border-color:#fff3}.d-input input:focus,.d-select select:focus{outline:none!important;border-color:#fff6}.d-checkbox input[type=checkbox]+label:before{border:1px solid rgba(255,255,255,.2)}.d-checkbox input[type=checkbox]:checked+label:before{border-color:#666;background-color:#666}.d-checkbox input[type=checkbox]:not(:disabled):not(:checked)+label:hover:before{border-color:#fff6}.d-checkbox input[type=checkbox]:not(:disabled):active+label:before{background-color:#b3d7ff;border-color:#fff6}.d-checkbox input[type=checkbox]:focus:not(:checked)+label:before{border-color:#fff6}.d-checkbox input[type=checkbox]:disabled+label:before{background-color:#e9ecef}.light .icon{color:#333}.dark .icon{color:#ccc}.styled-scrollbars{scrollbar-width:thin;scrollbar-color:blue orange}.styled-scrollbars::-webkit-scrollbar{height:6px;width:6px}.styled-scrollbars::-webkit-scrollbar-track{background:orange}.styled-scrollbars::-webkit-scrollbar-thumb{background-color:#00f;border-radius:3px;border:0}.light .d-layout{background-color:#fff}.light .d-layout .d-layout-sidebar{background-color:#e5e5e5}.light .d-layout .d-layout-header,.light .d-layout .d-layout-footer{background-color:#f0f0f0}.light .d-layout .d-layout-tab{background-color:#fafafa}.dark .d-layout{background-color:#34383e}.dark .d-layout .d-layout-sidebar{background-color:#494c52}.dark .d-layout .d-layout-header,.dark .d-layout .d-layout-footer{background-color:#3e4248}.dark .d-layout .d-layout-tab{background-color:#2f3238}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:400;font-style:normal;font-size:.95rem}.node-top[data-v-4c84dfd5]{background:linear-gradient(0deg,rgba(0,185,255,0) 0%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)!important}.node-bottom[data-v-4c84dfd5]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 100%)!important}.node-over[data-v-4c84dfd5]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)}.tree-item>ul[data-v-4c920528]{padding-left:0!important}
1
+ @charset "UTF-8";.button{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-block;padding:.4rem .8rem;border-radius:5px;transition:all .2s;font-weight:400;margin:.25rem .125rem}.button.button-sm{font-size:.8em}.button.button-lg{font-size:1.3em}.button.button-ext{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;height:100%;gap:5px}.button.button-ext .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center}.label{margin-bottom:5px;font-size:.9em;opacity:.7}.d-input,.d-select,.d-checkbox{margin-bottom:15px}.d-input input,select{font-size:1.1em;border-style:solid;border-width:1px;border-radius:5px;padding:5px 10px}.d-checkbox input[type=checkbox]{position:absolute;z-index:-1;opacity:0}.d-checkbox input[type=checkbox]+label{display:inline-flex;align-items:center;-webkit-user-select:none;user-select:none}.d-checkbox input[type=checkbox]+label:before{content:"";display:inline-block;width:1em;height:1em;flex-shrink:0;flex-grow:0;border-radius:.25em;margin-right:.5em;background-repeat:no-repeat;background-position:center center;background-size:50% 50%;transition:all .2s}.d-checkbox input[type=checkbox]:checked+label:before{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");background-size:10px}.icon{line-height:1em;text-align:center;display:inline-block;position:relative;fill:currentColor;transform:translateZ(0)}.icon svg{width:1em;height:1em}.accordion{-webkit-user-select:none;user-select:none}.accordion .accordion-item,.accordion .accordion-sub{cursor:pointer;padding:.25rem .125rem}.badge{display:inline-block;padding:3px 4px;margin:.25rem .125rem;border-radius:5px;line-height:1}.badge.badge-sm{font-size:.8em;padding:2px 3px}.tree{padding-left:0;-webkit-user-select:none;user-select:none;list-style:none;margin:0}.tree.accordion .tree-item ul{padding-left:0}.tree .tree-item{cursor:pointer;line-height:1.5;overflow:hidden;position:relative}.tree .tree-item>div{padding:3px 5px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-radius:5px}.tree .tree-item>div.selected{transition:all 50ms}.tree .tree-item>div>div{display:flex;flex-direction:row;justify-content:start;align-items:center;gap:3px}.tree .tree-item>div .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center;transition:all .2s}.tree .tree-item>div .tree-open-post{transform:rotate(-90deg)}.tree .tree-item>div .tree-open-pre{transform:rotate(90deg)}.tree .tree-item ul{padding-left:20px;list-style:none}.tree .item-title{display:table;table-layout:fixed;width:100%}.tree .item-title>div{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tree.tree-compact{font-size:.9em}.tree.tree-compact .tree-item{line-height:1}.tree.tree-compact .tree-item>div{padding:1px 3px}.d-layout{display:flex;flex-direction:column;width:100%;height:100%}.d-layout .d-layout-header{left:0;top:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-content{flex-grow:1;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-footer{left:0;bottom:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-sidebar{position:fixed;left:0;top:0;box-sizing:border-box;width:100%;height:100%;transition-property:all;overflow-y:hidden}.d-layout .d-layout-sidebar-mask{position:fixed;left:0;top:0;z-index:1002;width:100%;height:100%;transition-property:background-color}.d-layout .d-layout-tab{left:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.light .button{background-color:#ccc9;color:gray}.light .button:hover{color:#666;background-color:#cccc}.light .button.button-blue{background-color:#51c0e799;color:#43565c}.light .button.button-blue:hover{color:#2d3a3f;background-color:#51c0e7cc}.light .button.button-green{background-color:#90d76099;color:#4f4f4f}.light .button.button-green:hover{color:#363636;background-color:#90d760cc}.light .button.button-red{background-color:#ff929299;color:#ae4a4a}.light .button.button-red:hover{background-color:#ff9292cc;color:#8a3b3b}.light .button.button-orange{background-color:#ffc45899;color:#856a39}.light .button.button-orange:hover{background-color:#ffc458cc;color:#614e2a}.light .button.button-violet{background-color:#c2a7ff99;color:#7456b7}.light .button.button-violet:hover{background-color:#c2a7ffcc;color:#5c4199}.light .button.button-outline{outline:solid 1px rgba(204,204,204,.6);color:gray;background-color:transparent}.light .button.button-outline:hover{color:gray;background-color:#cccc}.light .button.button-outline-blue{outline:solid 1px rgba(81,192,231,.6);background-color:transparent;color:#136c8c99}.light .button.button-outline-blue:hover{color:#43565c;background-color:#51c0e7cc}.light .button.button-outline-green{outline:solid 1px rgba(144,215,96,.6);background-color:transparent;color:#467e2099}.light .button.button-outline-green:hover{color:#4f4f4f;background-color:#90d760cc}.light .button.button-outline-red{outline:solid 1px rgba(255,146,146,.6);background-color:transparent;color:#f8000099}.light .button.button-outline-red:hover{color:#ae4a4a;background-color:#ff9292cc}.light .button.button-outline-orange{outline:solid 1px rgba(255,196,88,.6);background-color:transparent;color:#be7b0099}.light .button.button-outline-orange:hover{color:#856a39;background-color:#ffc458cc}.light .button.button-outline-violet{outline:solid 1px rgba(194,167,255,.6);background-color:transparent;color:#580eff99}.light .button.button-outline-violet:hover{color:#7456b7;background-color:#c2a7ffcc}.dark .button{background-color:#ffffff1a;color:#e5e5e5}.dark .button:hover{color:#fff;background-color:#fff3}.dark .button.button-blue{background-color:#1685ac}.dark .button.button-blue:hover{background-color:#1685accc}.dark .button.button-green{background-color:#5d9d31}.dark .button.button-green:hover{background-color:#5d9d31cc}.dark .button.button-red{background-color:#c33737}.dark .button.button-red:hover{background-color:#c33737cc}.dark .button.button-orange{background-color:#d59622}.dark .button.button-orange:hover{background-color:#d59622cc}.dark .button.button-violet{background-color:#7750d2}.dark .button.button-violet:hover{background-color:#7750d2cc}.dark .button.button-outline{outline:solid 1px #555555;color:#a2a2a2;background-color:transparent}.dark .button.button-outline:hover{color:#fff;background-color:#555}.dark .button.button-outline-blue{outline:solid 1px #1685ac;background-color:transparent;color:#1ca8d9}.dark .button.button-outline-blue:hover{color:#fff;background-color:#1685ac}.dark .button.button-outline-green{outline:solid 1px #5d9d31;background-color:transparent;color:#74c33e}.dark .button.button-outline-green:hover{color:#fff;background-color:#5d9d31}.dark .button.button-outline-red{outline:solid 1px #c33737;background-color:transparent;color:#d15c5c}.dark .button.button-outline-red:hover{color:#fff;background-color:#c33737}.dark .button.button-outline-orange{outline:solid 1px #d59622;background-color:transparent;color:#e2ac48}.dark .button.button-outline-orange:hover{color:#fff;background-color:#d59622}.dark .button.button-outline-violet{outline:solid 1px #7750d2;background-color:transparent;color:#9779dc}.dark .button.button-outline-violet:hover{color:#fff;background-color:#7750d2}.badge{background-color:#ccc9;color:gray}.badge.badge-blue{background-color:#51c0e799;color:#43565c}.badge.badge-green{background-color:#90d76099;color:#4f4f4f}.badge.badge-red{background-color:#ff929299;color:#ae4a4a}.badge.badge-orange{background-color:#ffc45899;color:#856a39}.badge.badge-violet{background-color:#c2a7ff99;color:#7456b7}.badge.badge-stress-gray{color:#fff;background-color:#80808099}.badge.badge-stress-blue{color:#fff;background-color:#136c8c99}.badge.badge-stress-green{color:#fff;background-color:#467e2099}.badge.badge-stress-red{color:#fff;background-color:#f8000099}.badge.badge-stress-orange{color:#fff;background-color:#be7b0099}.badge.badge-stress-violet{color:#fff;background-color:#580eff99}.dark .badge{background-color:#555;color:#e5e5e5}.dark .badge.badge-blue{background-color:#1685ac}.dark .badge.badge-green{background-color:#5d9d31}.dark .badge.badge-red{background-color:#c33737}.dark .badge.badge-orange{background-color:#d59622}.dark .badge.badge-violet{background-color:#7750d2}.dark .badge.badge-stress-gray{color:#888;background-color:#090909}.dark .badge.badge-stress-blue{color:#41bce7;background-color:#051c24}.dark .badge.badge-stress-green{color:#90cf65;background-color:#18280d}.dark .badge.badge-stress-red{color:#dc8484;background-color:#4c1515}.dark .badge.badge-stress-orange{color:#e9c074;background-color:#51390d}.dark .badge.badge-stress-violet{color:#b6a1e7;background-color:#341c6d}.tree .tree-item>div.selected{background-color:#0000001a}.tree .tree-item>div:hover{background-color:#0000001a}.dark .tree .tree-item>div.selected{background-color:#ffffff1a}.dark .tree .tree-item>div:hover{background-color:#ffffff1a}.dark{background-color:#34383e;color:#ccc}.light{background-color:#fff;color:#333}.d-input input,.d-select select{color:#ccc;background-color:#262626;border-color:#fff3}.d-input input:focus,.d-select select:focus{outline:none!important;border-color:#fff6}.d-checkbox input[type=checkbox]+label:before{border:1px solid rgba(255,255,255,.2)}.d-checkbox input[type=checkbox]:checked+label:before{border-color:#666;background-color:#666}.d-checkbox input[type=checkbox]:not(:disabled):not(:checked)+label:hover:before{border-color:#fff6}.d-checkbox input[type=checkbox]:not(:disabled):active+label:before{background-color:#b3d7ff;border-color:#fff6}.d-checkbox input[type=checkbox]:focus:not(:checked)+label:before{border-color:#fff6}.d-checkbox input[type=checkbox]:disabled+label:before{background-color:#e9ecef}.light .icon{color:#333}.dark .icon{color:#ccc}.styled-scrollbars{scrollbar-width:thin;scrollbar-color:blue orange}.styled-scrollbars::-webkit-scrollbar{height:6px;width:6px}.styled-scrollbars::-webkit-scrollbar-track{background:orange}.styled-scrollbars::-webkit-scrollbar-thumb{background-color:#00f;border-radius:3px;border:0}.light .d-layout{background-color:#fff}.light .d-layout .d-layout-sidebar{background-color:#e5e5e5}.light .d-layout .d-layout-header,.light .d-layout .d-layout-footer{background-color:#f0f0f0}.light .d-layout .d-layout-tab{background-color:#fafafa}.dark .d-layout{background-color:#34383e}.dark .d-layout .d-layout-sidebar{background-color:#494c52}.dark .d-layout .d-layout-header,.dark .d-layout .d-layout-footer{background-color:#3e4248}.dark .d-layout .d-layout-tab{background-color:#2f3238}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:400;font-style:normal;font-size:.95rem}*[data-v-5d2cb864],[data-v-5d2cb864]:after,[data-v-5d2cb864]:before{box-sizing:border-box}.node-top[data-v-4c84dfd5]{background:linear-gradient(0deg,rgba(0,185,255,0) 0%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)!important}.node-bottom[data-v-4c84dfd5]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 100%)!important}.node-over[data-v-4c84dfd5]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)}.tree-item>ul[data-v-4c920528]{padding-left:0!important}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doph-js",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "description": "Simple Vue3 component library",
5
5
  "author": "Error202",
6
6
  "license": "MIT",