doph-js 0.0.36 → 0.0.37

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/README.md CHANGED
@@ -12,6 +12,16 @@
12
12
 
13
13
  ---
14
14
 
15
+ ### DConfigProvider
16
+ инициатор конфигурации
17
+
18
+ ---
19
+
20
+ ### DLayoutAdmin
21
+ расположение элементов для панели администратора
22
+
23
+ ---
24
+
15
25
  ### DButton
16
26
  кнопки
17
27
 
package/dist/dophJs.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useSlots as U, computed as p, h as Y, openBlock as f, createBlock as h, unref as g, createElementBlock as $, Fragment as Z, normalizeClass as k, renderSlot as y, createCommentVNode as T, createVNode as X, createElementVNode as A, Transition as ne, withCtx as S, ref as L, resolveDynamicComponent as E, withModifiers as C, normalizeStyle as F, resolveComponent as oe, toDisplayString as K, createTextVNode as ie, renderList as q, reactive as G, getCurrentInstance as ae, watch as se, onUnmounted as re, mergeProps as V } from "vue";
2
- const P = {
1
+ import { useSlots as q, computed as p, h as Y, openBlock as f, createBlock as y, unref as g, createElementBlock as $, Fragment as X, normalizeClass as k, renderSlot as h, createCommentVNode as T, createVNode as j, createElementVNode as A, Transition as oe, withCtx as S, ref as W, resolveDynamicComponent as E, withModifiers as C, normalizeStyle as F, resolveComponent as ie, toDisplayString as U, createTextVNode as ae, renderList as J, reactive as G, getCurrentInstance as se, watch as re, onUnmounted as de, mergeProps as P } from "vue";
2
+ const V = {
3
3
  __name: "DIcon",
4
4
  props: {
5
5
  component: [Object, String],
@@ -7,7 +7,7 @@ const P = {
7
7
  color: String
8
8
  },
9
9
  setup(t) {
10
- const e = t, n = U(), o = p(() => {
10
+ const e = t, n = q(), o = p(() => {
11
11
  const { color: d } = e;
12
12
  return d === void 0 ? null : d;
13
13
  }), i = p(() => {
@@ -25,9 +25,9 @@ const P = {
25
25
  },
26
26
  e.component ? Y(e.component) : n
27
27
  );
28
- return (d, c) => (f(), h(g(s)));
28
+ return (d, c) => (f(), y(g(s)));
29
29
  }
30
- }, ke = {
30
+ }, Ce = {
31
31
  __name: "DButton",
32
32
  props: {
33
33
  class: String,
@@ -36,23 +36,23 @@ const P = {
36
36
  setup(t) {
37
37
  const e = t;
38
38
  let n = null;
39
- return e.icon && (n = Y(P, {
39
+ return e.icon && (n = Y(V, {
40
40
  component: e.icon,
41
41
  color: "inherit"
42
- })), (o, i) => (f(), $(Z, null, [
42
+ })), (o, i) => (f(), $(X, null, [
43
43
  g(n) ? T("", !0) : (f(), $("div", {
44
44
  key: 0,
45
45
  class: k(["button", e.class])
46
46
  }, [
47
- y(o.$slots, "default")
47
+ h(o.$slots, "default")
48
48
  ], 2)),
49
49
  g(n) ? (f(), $("div", {
50
50
  key: 1,
51
51
  class: k(["button button-ext", e.class])
52
52
  }, [
53
- X(g(n)),
53
+ j(g(n)),
54
54
  A("div", null, [
55
- y(o.$slots, "default")
55
+ h(o.$slots, "default")
56
56
  ])
57
57
  ], 2)) : T("", !0)
58
58
  ], 64));
@@ -76,7 +76,7 @@ const P = {
76
76
  t.hasOwnProperty(e) && (z.state[e] = t[e]);
77
77
  }
78
78
  }
79
- }, de = {
79
+ }, le = {
80
80
  __name: "DBadge",
81
81
  props: {
82
82
  class: String
@@ -86,10 +86,10 @@ const P = {
86
86
  return (n, o) => (f(), $("div", {
87
87
  class: k(["badge", e.class])
88
88
  }, [
89
- y(n.$slots, "default")
89
+ h(n.$slots, "default")
90
90
  ], 2));
91
91
  }
92
- }, I = "0px", le = {
92
+ }, I = "0px", ue = {
93
93
  __name: "DCollapse",
94
94
  props: {
95
95
  duration: {
@@ -166,20 +166,20 @@ const P = {
166
166
  const B = s(_, m).reverse(), N = { duration: e.duration, easing: e.easingLeave };
167
167
  i(u, m, r, B, N);
168
168
  };
169
- return (a, r) => (f(), h(ne, {
169
+ return (a, r) => (f(), y(oe, {
170
170
  css: !1,
171
171
  onEnter: d,
172
172
  onLeave: c
173
173
  }, {
174
174
  default: S(() => [
175
- y(a.$slots, "default")
175
+ h(a.$slots, "default")
176
176
  ]),
177
177
  _: 3
178
178
  }));
179
179
  }
180
180
  }, R = {
181
181
  data: void 0
182
- }, j = (t) => t.reduce((e, n) => (e[n] = n) && e, {}), D = j([
182
+ }, K = (t) => t.reduce((e, n) => (e[n] = n) && e, {}), D = K([
183
183
  "drag",
184
184
  "dragend",
185
185
  "dragenter",
@@ -187,7 +187,7 @@ const P = {
187
187
  "dragstart",
188
188
  "dragover",
189
189
  "drop"
190
- ]), ue = j(["copy", "move", "link", "none"]), ce = j([
190
+ ]), ce = K(["copy", "move", "link", "none"]), fe = K([
191
191
  "none",
192
192
  "copy",
193
193
  "copyLink",
@@ -197,13 +197,13 @@ const P = {
197
197
  "move",
198
198
  "all",
199
199
  "uninitialized"
200
- ]), fe = {
200
+ ]), pe = {
201
201
  __name: "DDrag",
202
202
  props: {
203
203
  draggable: { type: Boolean, default: !0 },
204
204
  transferData: {},
205
- dropEffect: { validator: (t) => t in ue },
206
- effectAllowed: { validator: (t) => t in ce },
205
+ dropEffect: { validator: (t) => t in ce },
206
+ effectAllowed: { validator: (t) => t in fe },
207
207
  image: String,
208
208
  imageXOffset: { type: Number, default: 0 },
209
209
  imageYOffset: { type: Number, default: 0 },
@@ -211,7 +211,7 @@ const P = {
211
211
  tag: { type: String, default: "div" }
212
212
  },
213
213
  setup(t) {
214
- const e = t, n = U(), o = L(!1), i = p(() => o && e.transferData), s = p(() => ({ position: "fixed", top: "-1000px" })), d = (c, a) => {
214
+ const e = t, n = q(), o = W(!1), i = p(() => o && e.transferData), s = p(() => ({ position: "fixed", top: "-1000px" })), d = (c, a) => {
215
215
  const r = a.dataTransfer;
216
216
  if ([D.dragenter, D.dragover].includes(c) && e.dropEffect && (r.dropEffect = e.dropEffect), c === D.dragstart) {
217
217
  if (e.effectAllowed && (r.effectAllowed = e.effectAllowed), e.image || n.image) {
@@ -221,7 +221,7 @@ const P = {
221
221
  e.transferData !== void 0 && (R.data = e.transferData, a.dataTransfer.setData("text", "")), o.value = !0;
222
222
  }
223
223
  };
224
- return (c, a) => (f(), h(E(t.tag), {
224
+ return (c, a) => (f(), y(E(t.tag), {
225
225
  draggable: e.draggable,
226
226
  onDrag: a[0] || (a[0] = (r) => d(g(D).drag, r)),
227
227
  onDragstart: a[1] || (a[1] = C((r) => d(g(D).dragstart, r), ["stop"])),
@@ -230,13 +230,13 @@ const P = {
230
230
  onDragend: a[4] || (a[4] = (r) => d(g(D).dragend, r))
231
231
  }, {
232
232
  default: S(() => [
233
- y(c.$slots, "default", { transferData: i.value }),
233
+ h(c.$slots, "default", { transferData: i.value }),
234
234
  t.hideImageHtml ? (f(), $("div", {
235
235
  key: 0,
236
236
  style: F(s.value)
237
237
  }, [
238
- y(c.$slots, "image", { transferData: i.value })
239
- ], 4)) : y(c.$slots, "image", {
238
+ h(c.$slots, "image", { transferData: i.value })
239
+ ], 4)) : h(c.$slots, "image", {
240
240
  key: 1,
241
241
  transferData: i.value
242
242
  })
@@ -245,22 +245,22 @@ const P = {
245
245
  }, 40, ["draggable"]));
246
246
  }
247
247
  };
248
- const J = (t, e) => {
248
+ const Q = (t, e) => {
249
249
  const n = t.__vccOpts || t;
250
250
  for (const [o, i] of e)
251
251
  n[o] = i;
252
252
  return n;
253
- }, pe = { class: "item-title" }, me = { style: { display: "flex", "flex-direction": "row", "justify-content": "flex-end" } }, ge = {
253
+ }, me = { class: "item-title" }, ge = { style: { display: "flex", "flex-direction": "row", "justify-content": "flex-end" } }, he = {
254
254
  key: 0,
255
255
  class: "sub-menu"
256
- }, he = {
256
+ }, ye = {
257
257
  __name: "DTreeItem",
258
258
  props: {
259
259
  model: Object,
260
260
  treeId: [String, Number]
261
261
  },
262
262
  setup(t) {
263
- const e = t, n = L(null), o = L(!1), i = L(!1), s = L(!1), d = p(() => e.model.children && e.model.children.length), c = p(() => l.actions.isItemExpanded(e.treeId, e.model.id)), a = () => {
263
+ const e = t, n = W(null), o = W(!1), i = W(!1), s = W(!1), d = p(() => e.model.children && e.model.children.length), c = p(() => l.actions.isItemExpanded(e.treeId, e.model.id)), a = () => {
264
264
  l.mutations.setItemSelect(e.treeId, e.model), l.actions.toggleItem(e.treeId, e.model.id);
265
265
  }, r = p(() => (l.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (o.value ? "node-over " : "") + (i.value ? "node-top " : "") + (s.value ? "node-bottom " : "")), u = p(() => e.model.draggable === !0);
266
266
  p(() => Object.hasOwn(e.model, "droppable") ? e.model.droppable : !0);
@@ -276,14 +276,14 @@ const J = (t, e) => {
276
276
  let b = R.data;
277
277
  if (b.model.id === e.model.id || l.actions.isChildOfParent(e.treeId, e.model.id, b.model.id) || l.actions.isParentOfChild(e.treeId, b.model.id, e.model.id))
278
278
  return !1;
279
- const x = N.y, w = n.value.getBoundingClientRect().top, W = n.value.getBoundingClientRect().height, M = W / 3;
280
- x > w && x <= w + M ? (o.value = !1, i.value = !0, s.value = !1) : x < w + W && x >= w + W - M ? (o.value = !1, i.value = !1, s.value = !0) : (o.value = !0, i.value = !1, s.value = !1);
279
+ const x = N.y, w = n.value.getBoundingClientRect().top, L = n.value.getBoundingClientRect().height, M = L / 3;
280
+ x > w && x <= w + M ? (o.value = !1, i.value = !0, s.value = !1) : x < w + L && x >= w + L - M ? (o.value = !1, i.value = !1, s.value = !0) : (o.value = !0, i.value = !1, s.value = !1);
281
281
  }, B = () => {
282
282
  o.value = !1, i.value = !1, s.value = !1;
283
283
  };
284
284
  return (N, b) => {
285
- const x = oe("d-tree-item", !0);
286
- return f(), h(fe, {
285
+ const x = ie("d-tree-item", !0);
286
+ return f(), y(pe, {
287
287
  tag: "li",
288
288
  class: "tree-item",
289
289
  "transfer-data": { id: e.treeId, model: e.model },
@@ -295,7 +295,7 @@ const J = (t, e) => {
295
295
  onDragleave: C(B, ["prevent"])
296
296
  }, {
297
297
  default: S(() => {
298
- var w, W;
298
+ var w, L;
299
299
  return [
300
300
  A("div", {
301
301
  ref_key: "node",
@@ -304,40 +304,40 @@ const J = (t, e) => {
304
304
  onClick: a
305
305
  }, [
306
306
  A("div", null, [
307
- e.model.icons && e.model.icons.pre && d.value ? (f(), h(E(P), {
307
+ e.model.icons && e.model.icons.pre && d.value ? (f(), y(E(V), {
308
308
  key: 0,
309
309
  component: g(z).getters.getIcon(e.model.icons.pre.component),
310
310
  size: 18,
311
311
  color: e.model.icons.pre.color ? e.model.icons.pre.color : "inherit",
312
312
  class: k(c.value ? "tree-open-pre" : "")
313
313
  }, null, 8, ["component", "color", "class"])) : T("", !0),
314
- e.model.icons && e.model.icons.pre && !d.value ? (f(), h(E(P), {
314
+ e.model.icons && e.model.icons.pre && !d.value ? (f(), y(E(V), {
315
315
  key: 1,
316
316
  component: g(z).getters.getIcon(e.model.icons.pre.component),
317
317
  size: 18,
318
318
  color: "rgba(0,0,0,0)",
319
319
  class: k(c.value ? "tree-open-pre" : "")
320
320
  }, null, 8, ["component", "class"])) : T("", !0),
321
- e.model.icons && e.model.icons.icon ? (f(), h(E(P), {
321
+ e.model.icons && e.model.icons.icon ? (f(), y(E(V), {
322
322
  key: 2,
323
323
  component: g(z).getters.getIcon(e.model.icons.icon.component),
324
324
  color: e.model.icons.icon.color ? e.model.icons.icon.color : "inherit"
325
325
  }, null, 8, ["component", "color"])) : T("", !0),
326
- A("div", pe, [
327
- A("div", null, K(e.model.title), 1)
326
+ A("div", me, [
327
+ A("div", null, U(e.model.title), 1)
328
328
  ])
329
329
  ]),
330
- A("div", me, [
331
- ((w = e.model.badge) == null ? void 0 : w.value) !== void 0 ? (f(), h(E(de), {
330
+ A("div", ge, [
331
+ ((w = e.model.badge) == null ? void 0 : w.value) !== void 0 ? (f(), y(E(le), {
332
332
  key: 0,
333
- class: k([(W = e.model.badge) == null ? void 0 : W.class, "badge-sm"])
333
+ class: k([(L = e.model.badge) == null ? void 0 : L.class, "badge-sm"])
334
334
  }, {
335
335
  default: S(() => [
336
- ie(K(e.model.badge.value), 1)
336
+ ae(U(e.model.badge.value), 1)
337
337
  ]),
338
338
  _: 1
339
339
  }, 8, ["class"])) : T("", !0),
340
- e.model.icons && e.model.icons.post && d.value ? (f(), h(E(P), {
340
+ e.model.icons && e.model.icons.post && d.value ? (f(), y(E(V), {
341
341
  key: 1,
342
342
  component: g(z).getters.getIcon(e.model.icons.post.component),
343
343
  size: 20,
@@ -346,10 +346,10 @@ const J = (t, e) => {
346
346
  }, null, 8, ["component", "color", "class"])) : T("", !0)
347
347
  ])
348
348
  ], 2),
349
- X(le, null, {
349
+ j(ue, null, {
350
350
  default: S(() => [
351
- d.value && c.value ? (f(), $("ul", ge, [
352
- (f(!0), $(Z, null, q(t.model.children, (M) => (f(), h(x, {
351
+ d.value && c.value ? (f(), $("ul", he, [
352
+ (f(!0), $(X, null, J(t.model.children, (M) => (f(), y(x, {
353
353
  class: "tree-item",
354
354
  key: M.id,
355
355
  model: M,
@@ -365,8 +365,8 @@ const J = (t, e) => {
365
365
  }, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"]);
366
366
  };
367
367
  }
368
- }, ye = /* @__PURE__ */ J(he, [["__scopeId", "data-v-f03192c5"]]);
369
- function ve(t) {
368
+ }, ve = /* @__PURE__ */ Q(ye, [["__scopeId", "data-v-f03192c5"]]);
369
+ function be(t) {
370
370
  return t = t || /* @__PURE__ */ new Map(), {
371
371
  /**
372
372
  * A Map of event names to registered handler functions.
@@ -413,7 +413,7 @@ function ve(t) {
413
413
  }
414
414
  };
415
415
  }
416
- const H = ve(), l = {
416
+ const H = be(), l = {
417
417
  state: G({
418
418
  trees: {}
419
419
  }),
@@ -501,7 +501,7 @@ const H = ve(), l = {
501
501
  }
502
502
  }
503
503
  }
504
- }, be = {
504
+ }, xe = {
505
505
  __name: "DDrop",
506
506
  props: {
507
507
  tag: { type: String, default: "div" }
@@ -509,10 +509,10 @@ const H = ve(), l = {
509
509
  emits: Object.keys(D),
510
510
  setup(t, { emit: e }) {
511
511
  let n = G({});
512
- const o = L("false"), i = L(null), s = /* @__PURE__ */ new Set(), d = p(() => o.value && n), c = (a, r) => {
512
+ const o = W("false"), i = W(null), s = /* @__PURE__ */ new Set(), d = p(() => o.value && n), c = (a, r) => {
513
513
  n = R.data, e(a, r, n), a === D.dragenter && (s.size || r.target === i.value) && s.add(r.target), a === D.dragleave && s.delete(r.target), a === D.drop && s.clear(), o.value = !!s.size;
514
514
  };
515
- return (a, r) => (f(), h(E(t.tag), {
515
+ return (a, r) => (f(), y(E(t.tag), {
516
516
  ref_key: "el",
517
517
  ref: i,
518
518
  onDragenter: r[0] || (r[0] = (u) => c(g(D).dragenter, u)),
@@ -521,12 +521,12 @@ const H = ve(), l = {
521
521
  onDrop: r[3] || (r[3] = C((u) => c(g(D).drop, u), ["prevent"]))
522
522
  }, {
523
523
  default: S(() => [
524
- y(a.$slots, "default", { transferData: d.value })
524
+ h(a.$slots, "default", { transferData: d.value })
525
525
  ]),
526
526
  _: 3
527
527
  }, 544));
528
528
  }
529
- }, xe = {
529
+ }, De = {
530
530
  __name: "DTree",
531
531
  props: {
532
532
  items: Array,
@@ -542,7 +542,7 @@ const H = ve(), l = {
542
542
  },
543
543
  emits: ["select", "collapse", "expand", "move"],
544
544
  setup(t, { emit: e }) {
545
- const n = t, o = ae().uid;
545
+ const n = t, o = se().uid;
546
546
  l.actions.initTreeStore(o, n.items, n.noSelect, n.multiSelect, n.expanded, n.transfer);
547
547
  const i = (s, d) => {
548
548
  console.log(s, d);
@@ -555,13 +555,13 @@ const H = ve(), l = {
555
555
  e("collapse", s);
556
556
  }), H.on(`move-${o}`, (s) => {
557
557
  e("move", s);
558
- }), (s, d) => (f(), h(be, {
558
+ }), (s, d) => (f(), y(xe, {
559
559
  class: "tree",
560
560
  tag: "ul",
561
561
  onDrop: C(i, ["stop"])
562
562
  }, {
563
563
  default: S(() => [
564
- (f(!0), $(Z, null, q(g(l).getters.getItems(g(o)), (c) => (f(), h(ye, {
564
+ (f(!0), $(X, null, J(g(l).getters.getItems(g(o)), (c) => (f(), y(ve, {
565
565
  key: c.id,
566
566
  model: c,
567
567
  treeId: g(o)
@@ -571,20 +571,20 @@ const H = ve(), l = {
571
571
  }, 8, ["onDrop"]));
572
572
  }
573
573
  };
574
- const De = {
574
+ const $e = {
575
575
  __name: "DAccordion",
576
576
  props: {
577
577
  items: Array
578
578
  },
579
579
  setup(t) {
580
580
  const e = t;
581
- return (n, o) => (f(), h(xe, {
581
+ return (n, o) => (f(), y(De, {
582
582
  class: "accordion",
583
583
  items: e.items,
584
584
  "no-select": !0
585
585
  }, null, 8, ["items"]));
586
586
  }
587
- }, Ce = /* @__PURE__ */ J(De, [["__scopeId", "data-v-4c920528"]]), $e = {
587
+ }, ze = /* @__PURE__ */ Q($e, [["__scopeId", "data-v-4c920528"]]), Te = {
588
588
  __name: "DLayoutHeader",
589
589
  props: {
590
590
  fixed: {
@@ -626,10 +626,10 @@ const De = {
626
626
  class: "d-layout-header",
627
627
  style: F(n.value)
628
628
  }, [
629
- y(o.$slots, "default")
629
+ h(o.$slots, "default")
630
630
  ], 4));
631
631
  }
632
- }, Te = {
632
+ }, _e = {
633
633
  __name: "DLayoutTab",
634
634
  props: {
635
635
  fixed: {
@@ -675,10 +675,10 @@ const De = {
675
675
  class: "d-layout-tab",
676
676
  style: F(n.value)
677
677
  }, [
678
- y(o.$slots, "default")
678
+ h(o.$slots, "default")
679
679
  ], 4));
680
680
  }
681
- }, _e = {
681
+ }, Se = {
682
682
  __name: "DLayoutFooter",
683
683
  props: {
684
684
  fixed: {
@@ -720,10 +720,10 @@ const De = {
720
720
  class: "d-layout-footer",
721
721
  style: F(n.value)
722
722
  }, [
723
- y(o.$slots, "default")
723
+ h(o.$slots, "default")
724
724
  ], 4));
725
725
  }
726
- }, Se = {
726
+ }, Be = {
727
727
  __name: "DLayoutSidebar",
728
728
  props: {
729
729
  zIndex: {
@@ -760,10 +760,10 @@ const De = {
760
760
  class: "d-layout-sidebar",
761
761
  style: F(n.value)
762
762
  }, [
763
- y(o.$slots, "default")
763
+ h(o.$slots, "default")
764
764
  ], 4));
765
765
  }
766
- }, Be = {
766
+ }, Ne = {
767
767
  __name: "DLayoutContent",
768
768
  props: {
769
769
  paddingTop: {
@@ -797,34 +797,12 @@ const De = {
797
797
  style: F(n.value),
798
798
  class: "d-layout-content"
799
799
  }, [
800
- y(o.$slots, "default")
800
+ h(o.$slots, "default")
801
801
  ], 4));
802
802
  }
803
803
  };
804
- function ze(t = !1) {
805
- const e = L(t);
806
- function n(d) {
807
- e.value = d;
808
- }
809
- function o() {
810
- n(!0);
811
- }
812
- function i() {
813
- n(!1);
814
- }
815
- function s() {
816
- n(!e.value);
817
- }
818
- return {
819
- bool: e,
820
- setBool: n,
821
- setTrue: o,
822
- setFalse: i,
823
- toggle: s
824
- };
825
- }
826
- function Ne(t) {
827
- const e = L(0), n = p(() => `transform: translateX(${-e.value}px);`);
804
+ function we(t) {
805
+ const e = W(0), n = p(() => `transform: translateX(${-e.value}px);`);
828
806
  let o = !1;
829
807
  function i(u) {
830
808
  e.value = u;
@@ -846,13 +824,13 @@ function Ne(t) {
846
824
  function r() {
847
825
  d(), c(), o = !0;
848
826
  }
849
- return se(t, (u) => {
827
+ return re(t, (u) => {
850
828
  u ? r() : a();
851
- }, { immediate: !0 }), re(() => {
829
+ }, { immediate: !0 }), de(() => {
852
830
  a();
853
831
  }), n;
854
832
  }
855
- const we = 1001, Ie = 999, Le = 998, He = {
833
+ const Ie = 1001, Le = 999, ke = 998, He = {
856
834
  __name: "DLayoutAdmin",
857
835
  props: {
858
836
  mode: {
@@ -943,7 +921,7 @@ const we = 1001, Ie = 999, Le = 998, He = {
943
921
  },
944
922
  emits: ["update:sidebar-collapse"],
945
923
  setup(t, { emit: e }) {
946
- const n = t, o = p(() => n.useMinWidthLayout ? `min-width:${n.minWidth}px;` : ""), i = p(() => n.useMinWidthLayout && (n.fixedHeaderAndTab || n.fixedFooter)), s = Ne(i), d = p(() => n.fixedHeaderAndTab ? s.value : ""), c = p(() => n.fixedFooter ? s.value : ""), a = p(() => {
924
+ const n = t, o = p(() => n.useMinWidthLayout ? `min-width:${n.minWidth}px;` : ""), i = p(() => n.useMinWidthLayout && (n.fixedHeaderAndTab || n.fixedFooter)), s = we(i), d = p(() => n.fixedHeaderAndTab ? s.value : ""), c = p(() => n.fixedFooter ? s.value : ""), a = p(() => {
947
925
  const { transitionDuration: v, transitionTimingFunction: O } = n;
948
926
  return {
949
927
  transitionDuration: v,
@@ -964,34 +942,34 @@ const we = 1001, Ie = 999, Le = 998, He = {
964
942
  const { transitionDuration: v, transitionTimingFunction: O } = n;
965
943
  return `background-color:${n.maskBg};transition-duration:${v}ms;transition-timing-function:${O};`;
966
944
  }), b = p(() => {
967
- const { sidebarWidth: v, sidebarCollapsedWidth: O } = n, ee = n.isMobile ? 0 : O, te = m.value ? ee : v;
968
- return n.sidebarVisible ? te : 0;
969
- }), x = p(() => n.isMobile ? 0 : b.value), w = p(() => r.value ? x.value : 0), W = p(
945
+ const { sidebarWidth: v, sidebarCollapsedWidth: O } = n, te = n.isMobile ? 0 : O, ne = m.value ? te : v;
946
+ return n.sidebarVisible ? ne : 0;
947
+ }), x = p(() => n.isMobile ? 0 : b.value), w = p(() => r.value ? x.value : 0), L = p(
970
948
  () => !n.isMobile && !r.value && n.headerVisible ? n.headerHeight : 0
971
949
  ), M = p(() => {
972
950
  let v = 0;
973
951
  return n.fixedHeaderAndTab && (n.headerVisible && (v += n.headerHeight), n.tabVisible && (v += n.tabHeight)), v;
974
- }), Q = p(() => n.fixedFooter && n.footerVisible ? n.footerHeight : 0);
952
+ }), ee = p(() => n.fixedFooter && n.footerVisible ? n.footerHeight : 0);
975
953
  return (v, O) => (f(), $("div", {
976
954
  class: "d-layout",
977
955
  style: F(o.value)
978
956
  }, [
979
- t.headerVisible ? (f(), h($e, V({ key: 0 }, a.value, {
957
+ t.headerVisible ? (f(), y(Te, P({ key: 0 }, a.value, {
980
958
  fixed: t.fixedHeaderAndTab,
981
- "z-index": we,
959
+ "z-index": Ie,
982
960
  "min-width": t.minWidth,
983
961
  height: t.headerHeight,
984
962
  "padding-left": w.value,
985
963
  style: d.value
986
964
  }), {
987
965
  default: S(() => [
988
- y(v.$slots, "header")
966
+ h(v.$slots, "header")
989
967
  ]),
990
968
  _: 3
991
969
  }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : T("", !0),
992
- t.tabVisible ? (f(), h(Te, V({ key: 1 }, a.value, {
970
+ t.tabVisible ? (f(), y(_e, P({ key: 1 }, a.value, {
993
971
  fixed: t.fixedHeaderAndTab,
994
- "z-index": Ie,
972
+ "z-index": Le,
995
973
  "min-width": t.minWidth,
996
974
  top: t.headerHeight,
997
975
  height: t.tabHeight,
@@ -999,17 +977,17 @@ const we = 1001, Ie = 999, Le = 998, He = {
999
977
  style: d.value
1000
978
  }), {
1001
979
  default: S(() => [
1002
- y(v.$slots, "tab")
980
+ h(v.$slots, "tab")
1003
981
  ]),
1004
982
  _: 3
1005
983
  }, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : T("", !0),
1006
- t.sidebarVisible ? (f(), h(Se, V({ key: 2 }, a.value, {
984
+ t.sidebarVisible ? (f(), y(Be, P({ key: 2 }, a.value, {
1007
985
  "z-index": u.value,
1008
986
  width: b.value,
1009
- "padding-top": W.value
987
+ "padding-top": L.value
1010
988
  }), {
1011
989
  default: S(() => [
1012
- y(v.$slots, "sidebar")
990
+ h(v.$slots, "sidebar")
1013
991
  ]),
1014
992
  _: 3
1015
993
  }, 16, ["z-index", "width", "padding-top"])) : T("", !0),
@@ -1019,52 +997,79 @@ const we = 1001, Ie = 999, Le = 998, He = {
1019
997
  style: F(N.value),
1020
998
  onClick: _
1021
999
  }, null, 4)) : T("", !0),
1022
- X(Be, V(a.value, {
1000
+ j(Ne, P(a.value, {
1023
1001
  "padding-top": M.value,
1024
- "padding-bottom": Q.value,
1002
+ "padding-bottom": ee.value,
1025
1003
  "padding-left": x.value,
1026
1004
  "overflow-hidden": t.addMainOverflowHidden
1027
1005
  }), {
1028
1006
  default: S(() => [
1029
- y(v.$slots, "default")
1007
+ h(v.$slots, "default")
1030
1008
  ]),
1031
1009
  _: 3
1032
1010
  }, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
1033
- t.footerVisible ? (f(), h(_e, V({ key: 4 }, a.value, {
1011
+ t.footerVisible ? (f(), y(Se, P({ key: 4 }, a.value, {
1034
1012
  fixed: t.fixedFooter,
1035
- "z-index": Le,
1013
+ "z-index": ke,
1036
1014
  "min-width": t.minWidth,
1037
1015
  height: t.footerHeight,
1038
1016
  "padding-left": x.value,
1039
1017
  style: c.value
1040
1018
  }), {
1041
1019
  default: S(() => [
1042
- y(v.$slots, "footer")
1020
+ h(v.$slots, "footer")
1043
1021
  ]),
1044
1022
  _: 3
1045
1023
  }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : T("", !0)
1046
1024
  ], 4));
1047
1025
  }
1026
+ }, Z = {
1027
+ state: G({
1028
+ theme: "dark"
1029
+ }),
1030
+ getters: {
1031
+ theme() {
1032
+ return Z.state.theme;
1033
+ }
1034
+ },
1035
+ mutations: {
1036
+ setTheme(t) {
1037
+ Z.state.theme = t, document.documentElement.setAttribute("class", t);
1038
+ }
1039
+ },
1040
+ actions: {}
1041
+ }, Fe = {
1042
+ __name: "DConfigProvider",
1043
+ props: {
1044
+ theme: {
1045
+ type: String,
1046
+ default: "dark"
1047
+ }
1048
+ },
1049
+ setup(t) {
1050
+ const e = t;
1051
+ return Z.mutations.setTheme(e.theme), (n, o) => h(n.$slots, "default");
1052
+ }
1048
1053
  };
1049
1054
  export {
1050
- Ce as DAccordion,
1051
- de as DBadge,
1052
- ke as DButton,
1053
- le as DCollapse,
1054
- P as DIcon,
1055
+ ze as DAccordion,
1056
+ le as DBadge,
1057
+ Ce as DButton,
1058
+ ue as DCollapse,
1059
+ Fe as DConfigProvider,
1060
+ Z as DGlobalStore,
1061
+ V as DIcon,
1055
1062
  z as DIconStore,
1056
1063
  He as DLayoutAdmin,
1057
- Be as DLayoutContent,
1058
- _e as DLayoutFooter,
1059
- $e as DLayoutHeader,
1060
- Se as DLayoutSidebar,
1061
- Te as DLayoutTab,
1064
+ Ne as DLayoutContent,
1065
+ Se as DLayoutFooter,
1066
+ Te as DLayoutHeader,
1067
+ Be as DLayoutSidebar,
1068
+ _e as DLayoutTab,
1062
1069
  R as DTransferStore,
1063
- xe as DTree,
1064
- ye as DTreeItem,
1070
+ De as DTree,
1071
+ ve as DTreeItem,
1065
1072
  l as DTreeStore,
1066
1073
  H as emitter,
1067
- ve as eventsBus,
1068
- ze as useBoolean,
1069
- Ne as useFixedTransformStyle
1074
+ be as eventsBus
1070
1075
  };
@@ -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 se="",le="",de="",ce="",w={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String},setup(o){const t=o,n=e.useSlots(),i=e.computed(()=>{const{color:d}=t;return d===void 0?null:d}),r=e.computed(()=>{const d=t.size??null;if(d!==void 0)return typeof d=="number"||/^\d+$/.test(d)?`${d}px`:d}),s=e.h("i",{class:"icon",style:{color:i.value,fontSize:r.value}},t.component?e.h(t.component):n);return(d,m)=>(e.openBlock(),e.createBlock(e.unref(s)))}},Z={__name:"DButton",props:{class:String,icon:Object},setup(o){const t=o;let n=null;return t.icon&&(n=e.h(w,{component:t.icon,color:"inherit"})),(i,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(n)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button",t.class])},[e.renderSlot(i.$slots,"default")],2)),e.unref(n)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["button button-ext",t.class])},[e.createVNode(e.unref(n)),e.createElementVNode("div",null,[e.renderSlot(i.$slots,"default")])],2)):e.createCommentVNode("",!0)],64))}},k={state:{},getters:{getIcon(o){return k.state[o]},getIcons(){return k.state}},mutations:{addIcon(o,t){k.state.name=t},addIcons(o){for(const t in o)o.hasOwnProperty(t)&&(k.state[t]=o[t])}}},z={__name:"DBadge",props:{class:String},setup(o){const t=o;return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",t.class])},[e.renderSlot(n.$slots,"default")],2))}},D="0px",E={__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 t=o,n=a=>({height:a.style.height,width:a.style.width,position:a.style.position,visibility:a.style.visibility,overflow:a.style.overflow,paddingTop:a.style.paddingTop,paddingBottom:a.style.paddingBottom,borderTopWidth:a.style.borderTopWidth,borderBottomWidth:a.style.borderBottomWidth,marginTop:a.style.marginTop,marginBottom:a.style.marginBottom}),i=(a,l)=>{const{width: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=l.width,a.style.position=l.position,a.style.visibility=l.visibility,a.style.height=D,a.style.overflow="hidden",l.height&&l.height!==D?l.height:u},r=(a,l,f,u,B)=>{const x=a.animate(u,B);a.style.height=l.height,x.onfinish=()=>{a.style.overflow=l.overflow,f()}},s=(a,l)=>[{height:D,opacity:t.opacityClosed,paddingTop:D,paddingBottom:D,borderTopWidth:D,borderBottomWidth:D,marginTop:D,marginBottom:D},{height:a,opacity:t.opacityOpened,paddingTop:l.paddingTop,paddingBottom:l.paddingBottom,borderTopWidth:l.borderTopWidth,borderBottomWidth:l.borderBottomWidth,marginTop:l.marginTop,marginBottom:l.marginBottom}],d=(a,l)=>{const f=a,u=n(f),B=i(f,u),x=s(B,u),$={duration:t.duration,easing:t.easingEnter};r(f,u,l,x,$)},m=(a,l)=>{const f=a,u=n(f),{height:B}=getComputedStyle(f);f.style.height=B,f.style.overflow="hidden";const x=s(B,u).reverse(),$={duration:t.duration,easing:t.easingLeave};r(f,u,l,x,$)};return(a,l)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:d,onLeave:m},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},I={data:void 0},L=o=>o.reduce((t,n)=>(t[n]=n)&&t,{}),h=L(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),j=L(["copy","move","link","none"]),X=L(["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 X},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 t=o,n=e.useSlots(),i=e.ref(!1),r=e.computed(()=>i&&t.transferData),s=e.computed(()=>({position:"fixed",top:"-1000px"})),d=(m,a)=>{const l=a.dataTransfer;if([h.dragenter,h.dragover].includes(m)&&t.dropEffect&&(l.dropEffect=t.dropEffect),m===h.dragstart){if(t.effectAllowed&&(l.effectAllowed=t.effectAllowed),t.image||n.image){let f;t.image?(f=new Image,f.src=t.image):n.image&&(f=n.image[0].elm),l.setDragImage&&l.setDragImage(f,t.imageXOffset,t.imageYOffset)}t.transferData!==void 0&&(I.data=t.transferData,a.dataTransfer.setData("text","")),i.value=!0}};return(m,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{draggable:t.draggable,onDrag:a[0]||(a[0]=l=>d(e.unref(h).drag,l)),onDragstart:a[1]||(a[1]=e.withModifiers(l=>d(e.unref(h).dragstart,l),["stop"])),onDragenter:a[2]||(a[2]=l=>d(e.unref(h).dragenter,l)),onDragleave:a[3]||(a[3]=l=>d(e.unref(h).dragleave,l)),onDragend:a[4]||(a[4]=l=>d(e.unref(h).dragend,l))},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"default",{transferData:r.value}),o.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(s.value)},[e.renderSlot(m.$slots,"image",{transferData:r.value})],4)):e.renderSlot(m.$slots,"image",{key:1,transferData:r.value})]),_:3},40,["draggable"]))}},fe="",W=(o,t)=>{const n=o.__vccOpts||o;for(const[i,r]of t)n[i]=r;return n},J={class:"item-title"},K={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},U={key:0,class:"sub-menu"},V=W({__name:"DTreeItem",props:{model:Object,treeId:[String,Number]},setup(o){const t=o,n=e.ref(null),i=e.ref(!1),r=e.ref(!1),s=e.ref(!1),d=e.computed(()=>t.model.children&&t.model.children.length),m=e.computed(()=>c.actions.isItemExpanded(t.treeId,t.model.id)),a=()=>{c.mutations.setItemSelect(t.treeId,t.model),c.actions.toggleItem(t.treeId,t.model.id)},l=e.computed(()=>(c.actions.isItemSelected(t.treeId,t.model.id)?"selected":"")+(i.value?"node-over ":"")+(r.value?"node-top ":"")+(s.value?"node-bottom ":"")),f=e.computed(()=>t.model.draggable===!0);e.computed(()=>Object.hasOwn(t.model,"droppable")?t.model.droppable:!0);const u=$=>{let y=I.data;if(y.model.id===t.model.id||c.actions.isChildOfParent(t.treeId,t.model.id,y.model.id)||c.actions.isParentOfChild(t.treeId,y.model.id,t.model.id))return i.value=!1,r.value=!1,s.value=!1,!1;if(!c.state.trees[t.treeId].transfer&&y.id!==t.treeId)return!1;let b="";r.value?b="before":s.value?b="after":b="inside",c.actions.moveTreeNode(y.id,t.treeId,c.getters.getItems(t.treeId),y.model.id,t.model.id,b),i.value=!1,r.value=!1,s.value=!1},B=$=>{let y=I.data;if(y.model.id===t.model.id||c.actions.isChildOfParent(t.treeId,t.model.id,y.model.id)||c.actions.isParentOfChild(t.treeId,y.model.id,t.model.id))return!1;const b=$.y,T=n.value.getBoundingClientRect().top,N=n.value.getBoundingClientRect().height,_=N/3;b>T&&b<=T+_?(i.value=!1,r.value=!0,s.value=!1):b<T+N&&b>=T+N-_?(i.value=!1,r.value=!1,s.value=!0):(i.value=!0,r.value=!1,s.value=!1)},x=()=>{i.value=!1,r.value=!1,s.value=!1};return($,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:f.value,onDrop:e.withModifiers(u,["stop"]),onDragenter:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(B,["prevent","stop"]),onDragleave:e.withModifiers(x,["prevent"])},{default:e.withCtx(()=>{var T,N;return[e.createElementVNode("div",{ref_key:"node",ref:n,class:e.normalizeClass(l.value),onClick:a},[e.createElementVNode("div",null,[t.model.icons&&t.model.icons.pre&&d.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:0,component:e.unref(k).getters.getIcon(t.model.icons.pre.component),size:18,color:t.model.icons.pre.color?t.model.icons.pre.color:"inherit",class:e.normalizeClass(m.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.pre&&!d.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(k).getters.getIcon(t.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(m.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(k).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(t.model.title),1)])]),e.createElementVNode("div",K,[((T=t.model.badge)==null?void 0:T.value)!==void 0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(z),{key:0,class:e.normalizeClass([(N=t.model.badge)==null?void 0:N.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&&d.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(k).getters.getIcon(t.model.icons.post.component),size:20,color:t.model.icons.post.color?t.model.icons.post.color:"inherit",class:e.normalizeClass(m.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],2),e.createVNode(E,null,{default:e.withCtx(()=>[d.value&&m.value?(e.openBlock(),e.createElementBlock("ul",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model.children,_=>(e.openBlock(),e.createBlock(b,{class:"tree-item",key:_.id,model:_,treeId:t.treeId},null,8,["model","treeId"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])}}},[["__scopeId","data-v-f03192c5"]]);function M(o){return o=o||new Map,{all:o,on(t,n){const i=o.get(t);i?i.push(n):o.set(t,[n])},off(t,n){const i=o.get(t);i&&(n?i.splice(i.indexOf(n)>>>0,1):o.set(t,[]))},emit(t,n){let i=o.get(t);i&&i.slice().map(r=>{r(n)}),i=o.get("*"),i&&i.slice().map(r=>{r(t,n)})}}}const S=M(),c={state:e.reactive({trees:{}}),getters:{getItems(o){return c.state.trees[o].items},getItemsSelect(o){return c.state.trees[o].selected},getParentId(o,t,n,i="id",r="children",s={}){return n&&o&&(o.find(d=>d[i]===n?(s.found=t,d):c.getters.getParentId(d[r],d.id,n,i,r,s)),s.found)?s.found:!1}},mutations:{setTreeItems(o,t){c.state.trees[o].items=t},setItemSelect(o,t){S.emit(`select-${o}`,{id:o,model:t}),!c.state.trees[o].noSelect&&(c.state.trees[o].multiSelect?c.state.trees[o].selected.includes(t.id)?c.state.trees[o].selected=c.state.trees[o].selected.filter(function(n){return n!==t.id}):c.state.trees[o].selected=[...c.state.trees[o].selected,t.id]:c.state.trees[o].selected=[t.id])}},actions:{initTreeStore(o,t,n,i,r,s){c.state.trees[o]=[],c.state.trees[o].selected=[],c.state.trees[o].items=structuredClone(t),c.state.trees[o].noSelect=n,c.state.trees[o].multiSelect=i,c.state.trees[o].expanded=r,c.state.trees[o].transfer=s},isItemSelected(o,t){return c.state.trees[o].selected.includes(t)},toggleItem(o,t){const n=c.actions.deepSearch(c.state.trees[o].items,t);n.expanded=n.expanded===void 0||!n.expanded,n.children&&n.children.length&&(n.expanded?S.emit(`expand-${o}`,{id:o,model:n}):S.emit(`collapse-${o}`,{id:o,model:n}))},isItemExpanded(o,t){const n=c.actions.deepSearch(c.state.trees[o].items,t);return c.state.trees[o].expanded&&(n.expanded=n.expanded===void 0?!0:n.expanded),n.expanded},isChildOfParent(o,t,n){const i=c.actions.deepSearch(c.state.trees[o].items,t);if(i&&i.children){for(let r=0;r<i.children.length;r++)if(i.children[r].id===n)return!0}return!1},isParentOfChild(o,t,n){const i=c.actions.deepSearch(c.state.trees[o].items,t);return!!(i&&i.children&&c.actions.deepSearch(i.children,n))},deepSearch(o,t,n="id",i="children",r={}){return t&&o&&(o.find(s=>s[n]===t?(r.found=s,s):c.actions.deepSearch(s[i],t,n,i,r)),r.found)?r.found:!1},moveTreeNode(o,t,n,i,r,s){const d=c.actions.deleteTreeNode(n,i);c.actions.insertTreeNode(n,r,d,s),S.emit(`move-${t}`,{fromTreeId:o,toTreeId:t,moved:d.id,target:r,position:s})},insertTreeNode(o,t,n,i){if(o)for(let r=0;r<o.length;r++){if(o[r].id===t){let d=r;return i==="after"?(d++,o.splice(d,0,n)):i==="before"?o.splice(d,0,n):i==="inside"&&(Object.hasOwn(o[r],"children")||(o[r].children=[],o[r].opened=!0),o[r].children.splice(0,0,n)),o[r]}const s=this.insertTreeNode(o[r].children,t,n,i);if(s)return s}},deleteTreeNode(o,t){if(o)for(let n=0;n<o.length;n++){if(o[n].id===t){const r=o[n];return o.splice(n,1),r}const i=c.actions.deleteTreeNode(o[n].children,t);if(i)return i}}}},G={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(h),setup(o,{emit:t}){let n=e.reactive({});const i=e.ref("false"),r=e.ref(null),s=new Set,d=e.computed(()=>i.value&&n),m=(a,l)=>{n=I.data,t(a,l,n),a===h.dragenter&&(s.size||l.target===r.value)&&s.add(l.target),a===h.dragleave&&s.delete(l.target),a===h.drop&&s.clear(),i.value=!!s.size};return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"el",ref:r,onDragenter:l[0]||(l[0]=f=>m(e.unref(h).dragenter,f)),onDragleave:l[1]||(l[1]=f=>m(e.unref(h).dragleave,f)),onDragover:l[2]||(l[2]=e.withModifiers(f=>m(e.unref(h).dragover,f),["prevent"])),onDrop:l[3]||(l[3]=e.withModifiers(f=>m(e.unref(h).drop,f),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{transferData:d.value})]),_:3},544))}},F={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean},emits:["select","collapse","expand","move"],setup(o,{emit:t}){const n=o,i=e.getCurrentInstance().uid;c.actions.initTreeStore(i,n.items,n.noSelect,n.multiSelect,n.expanded,n.transfer);const r=(s,d)=>{console.log(s,d)};return S.on(`select-${i}`,s=>{t("select",s)}),S.on(`expand-${i}`,s=>{t("expand",s)}),S.on(`collapse-${i}`,s=>{t("collapse",s)}),S.on(`move-${i}`,s=>{t("move",s)}),(s,d)=>(e.openBlock(),e.createBlock(G,{class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).getters.getItems(e.unref(i)),m=>(e.openBlock(),e.createBlock(V,{key:m.id,model:m,treeId:e.unref(i)},null,8,["model","treeId"]))),128))]),_:1},8,["onDrop"]))}},pe="",Q=W({__name:"DAccordion",props:{items:Array},setup(o){const t=o;return(n,i)=>(e.openBlock(),e.createBlock(F,{class:"accordion",items:t.items,"no-select":!0},null,8,["items"]))}},[["__scopeId","data-v-4c920528"]]),H={__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 t=o,n=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:s,height:d,paddingLeft:m,transitionDuration:a,transitionTimingFunction:l}=t,f=i?"fixed":"static",u=t.useMinWidthLayout?`min-width:${s}px;`:"";return`position:${f};z-index:${r};${u}height:${d}px;padding-left:${m}px;transition-duration:${a}ms;transition-timing-function:${l};`});return(i,r)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(n.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 t=o,n=e.computed(()=>{const{fixed:i,top:r,zIndex:s,minWidth:d,height:m,paddingLeft:a,transitionDuration:l,transitionTimingFunction:f}=t,u=i?"fixed":"static",B=t.useMinWidthLayout?`min-width: ${d}px;`:"";return`position:${u};top:${r}px;z-index:${s};${B}height:${m}px;padding-left:${a}px;transition-duration:${l}ms;transition-timing-function:${f};`});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(n.value)},[e.renderSlot(i.$slots,"default")],4))}},P={__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 t=o,n=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:s,height:d,paddingLeft:m,transitionDuration:a,transitionTimingFunction:l}=t,f=i?"fixed":"static",u=t.useMinWidthLayout?`min-width:${s}px;`:"";return`position:${f};z-index:${r};${u}height:${d}px;padding-left:${m}px;transition-duration:${a}ms;transition-timing-function:${l};`});return(i,r)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(n.value)},[e.renderSlot(i.$slots,"default")],4))}},A={__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 t=o,n=e.computed(()=>{const{zIndex:i,width:r,paddingTop:s,transitionDuration:d,transitionTimingFunction:m}=t;return`z-index:${i};width:${r}px;padding-top:${s}px;transition-duration:${d}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(n.value)},[e.renderSlot(i.$slots,"default")],4))}},R={__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 t=o,n=e.computed(()=>{const{paddingTop:i,paddingBottom:r,paddingLeft:s,transitionDuration:d,transitionTimingFunction:m}=t,a=`overflow:${t.overflowHidden?"hidden":"visible"};`;return`padding-top:${i}px;padding-bottom:${r}px;padding-left:${s}px;${a}transition-duration:${d}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(n.value),class:"d-layout-content"},[e.renderSlot(i.$slots,"default")],4))}};function v(o=!1){const t=e.ref(o);function n(d){t.value=d}function i(){n(!0)}function r(){n(!1)}function s(){n(!t.value)}return{bool:t,setBool:n,setTrue:i,setFalse:r,toggle:s}}function Y(o){const t=e.ref(0),n=e.computed(()=>`transform: translateX(${-t.value}px);`);let i=!1;function r(f){t.value=f}function s(){var f;const u=((f=document.scrollingElement)===null||f===void 0?void 0:f.scrollLeft)||0;r(u)}function d(){s()}function m(){document.addEventListener("scroll",s)}function a(){i&&document.removeEventListener("scroll",s)}function l(){d(),m(),i=!0}return e.watch(o,f=>{f?l():a()},{immediate:!0}),e.onUnmounted(()=>{a()}),n}const ee=1001,te=999,oe=998,ne={__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:t}){const n=o,i=e.computed(()=>n.useMinWidthLayout?`min-width:${n.minWidth}px;`:""),r=e.computed(()=>n.useMinWidthLayout&&(n.fixedHeaderAndTab||n.fixedFooter)),s=Y(r),d=e.computed(()=>n.fixedHeaderAndTab?s.value:""),m=e.computed(()=>n.fixedFooter?s.value:""),a=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:C}=n;return{transitionDuration:g,transitionTimingFunction:C}}),l=e.computed(()=>n.mode==="vertical"),f=e.computed(()=>n.isMobile||l.value?1003:1e3),u=e.computed({get(){return n.sidebarCollapse},set(g){t("update:sidebar-collapse",g)}});function B(){u.value=!0}const x=e.computed(()=>n.isMobile&&!u.value),$=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:C}=n;return`background-color:${n.maskBg};transition-duration:${g}ms;transition-timing-function:${C};`}),y=e.computed(()=>{const{sidebarWidth:g,sidebarCollapsedWidth:C}=n,re=n.isMobile?0:C,ae=u.value?re:g;return n.sidebarVisible?ae:0}),b=e.computed(()=>n.isMobile?0:y.value),T=e.computed(()=>l.value?b.value:0),N=e.computed(()=>!n.isMobile&&!l.value&&n.headerVisible?n.headerHeight:0),_=e.computed(()=>{let g=0;return n.fixedHeaderAndTab&&(n.headerVisible&&(g+=n.headerHeight),n.tabVisible&&(g+=n.tabHeight)),g}),ie=e.computed(()=>n.fixedFooter&&n.footerVisible?n.footerHeight:0);return(g,C)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(i.value)},[o.headerVisible?(e.openBlock(),e.createBlock(H,e.mergeProps({key:0},a.value,{fixed:o.fixedHeaderAndTab,"z-index":ee,"min-width":o.minWidth,height:o.headerHeight,"padding-left":T.value,style:d.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),o.tabVisible?(e.openBlock(),e.createBlock(O,e.mergeProps({key:1},a.value,{fixed:o.fixedHeaderAndTab,"z-index":te,"min-width":o.minWidth,top:o.headerHeight,height:o.tabHeight,"padding-left":b.value,style:d.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),o.sidebarVisible?(e.openBlock(),e.createBlock(A,e.mergeProps({key:2},a.value,{"z-index":f.value,width:y.value,"padding-top":N.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle($.value),onClick:B},null,4)):e.createCommentVNode("",!0),e.createVNode(R,e.mergeProps(a.value,{"padding-top":_.value,"padding-bottom":ie.value,"padding-left":b.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(P,e.mergeProps({key:4},a.value,{fixed:o.fixedFooter,"z-index":oe,"min-width":o.minWidth,height:o.footerHeight,"padding-left":b.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))}};p.DAccordion=Q,p.DBadge=z,p.DButton=Z,p.DCollapse=E,p.DIcon=w,p.DIconStore=k,p.DLayoutAdmin=ne,p.DLayoutContent=R,p.DLayoutFooter=P,p.DLayoutHeader=H,p.DLayoutSidebar=A,p.DLayoutTab=O,p.DTransferStore=I,p.DTree=F,p.DTreeItem=V,p.DTreeStore=c,p.emitter=S,p.eventsBus=M,p.useBoolean=v,p.useFixedTransformStyle=Y,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 le="",de="",ce="",fe="",C={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String},setup(o){const t=o,n=e.useSlots(),i=e.computed(()=>{const{color:d}=t;return d===void 0?null:d}),r=e.computed(()=>{const d=t.size??null;if(d!==void 0)return typeof d=="number"||/^\d+$/.test(d)?`${d}px`:d}),s=e.h("i",{class:"icon",style:{color:i.value,fontSize:r.value}},t.component?e.h(t.component):n);return(d,m)=>(e.openBlock(),e.createBlock(e.unref(s)))}},Z={__name:"DButton",props:{class:String,icon:Object},setup(o){const t=o;let n=null;return t.icon&&(n=e.h(C,{component:t.icon,color:"inherit"})),(i,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(n)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button",t.class])},[e.renderSlot(i.$slots,"default")],2)),e.unref(n)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["button button-ext",t.class])},[e.createVNode(e.unref(n)),e.createElementVNode("div",null,[e.renderSlot(i.$slots,"default")])],2)):e.createCommentVNode("",!0)],64))}},D={state:{},getters:{getIcon(o){return D.state[o]},getIcons(){return D.state}},mutations:{addIcon(o,t){D.state.name=t},addIcons(o){for(const t in o)o.hasOwnProperty(t)&&(D.state[t]=o[t])}}},E={__name:"DBadge",props:{class:String},setup(o){const t=o;return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",t.class])},[e.renderSlot(n.$slots,"default")],2))}},k="0px",W={__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 t=o,n=a=>({height:a.style.height,width:a.style.width,position:a.style.position,visibility:a.style.visibility,overflow:a.style.overflow,paddingTop:a.style.paddingTop,paddingBottom:a.style.paddingBottom,borderTopWidth:a.style.borderTopWidth,borderBottomWidth:a.style.borderBottomWidth,marginTop:a.style.marginTop,marginBottom:a.style.marginBottom}),i=(a,l)=>{const{width: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=l.width,a.style.position=l.position,a.style.visibility=l.visibility,a.style.height=k,a.style.overflow="hidden",l.height&&l.height!==k?l.height:u},r=(a,l,f,u,B)=>{const x=a.animate(u,B);a.style.height=l.height,x.onfinish=()=>{a.style.overflow=l.overflow,f()}},s=(a,l)=>[{height:k,opacity:t.opacityClosed,paddingTop:k,paddingBottom:k,borderTopWidth:k,borderBottomWidth:k,marginTop:k,marginBottom:k},{height:a,opacity:t.opacityOpened,paddingTop:l.paddingTop,paddingBottom:l.paddingBottom,borderTopWidth:l.borderTopWidth,borderBottomWidth:l.borderBottomWidth,marginTop:l.marginTop,marginBottom:l.marginBottom}],d=(a,l)=>{const f=a,u=n(f),B=i(f,u),x=s(B,u),$={duration:t.duration,easing:t.easingEnter};r(f,u,l,x,$)},m=(a,l)=>{const f=a,u=n(f),{height:B}=getComputedStyle(f);f.style.height=B,f.style.overflow="hidden";const x=s(B,u).reverse(),$={duration:t.duration,easing:t.easingLeave};r(f,u,l,x,$)};return(a,l)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:d,onLeave:m},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},I={data:void 0},z=o=>o.reduce((t,n)=>(t[n]=n)&&t,{}),h=z(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),j=z(["copy","move","link","none"]),X=z(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),G={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:o=>o in j},effectAllowed:{validator:o=>o in X},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 t=o,n=e.useSlots(),i=e.ref(!1),r=e.computed(()=>i&&t.transferData),s=e.computed(()=>({position:"fixed",top:"-1000px"})),d=(m,a)=>{const l=a.dataTransfer;if([h.dragenter,h.dragover].includes(m)&&t.dropEffect&&(l.dropEffect=t.dropEffect),m===h.dragstart){if(t.effectAllowed&&(l.effectAllowed=t.effectAllowed),t.image||n.image){let f;t.image?(f=new Image,f.src=t.image):n.image&&(f=n.image[0].elm),l.setDragImage&&l.setDragImage(f,t.imageXOffset,t.imageYOffset)}t.transferData!==void 0&&(I.data=t.transferData,a.dataTransfer.setData("text","")),i.value=!0}};return(m,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{draggable:t.draggable,onDrag:a[0]||(a[0]=l=>d(e.unref(h).drag,l)),onDragstart:a[1]||(a[1]=e.withModifiers(l=>d(e.unref(h).dragstart,l),["stop"])),onDragenter:a[2]||(a[2]=l=>d(e.unref(h).dragenter,l)),onDragleave:a[3]||(a[3]=l=>d(e.unref(h).dragleave,l)),onDragend:a[4]||(a[4]=l=>d(e.unref(h).dragend,l))},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"default",{transferData:r.value}),o.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(s.value)},[e.renderSlot(m.$slots,"image",{transferData:r.value})],4)):e.renderSlot(m.$slots,"image",{key:1,transferData:r.value})]),_:3},40,["draggable"]))}},me="",V=(o,t)=>{const n=o.__vccOpts||o;for(const[i,r]of t)n[i]=r;return n},q={class:"item-title"},J={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},K={key:0,class:"sub-menu"},M=V({__name:"DTreeItem",props:{model:Object,treeId:[String,Number]},setup(o){const t=o,n=e.ref(null),i=e.ref(!1),r=e.ref(!1),s=e.ref(!1),d=e.computed(()=>t.model.children&&t.model.children.length),m=e.computed(()=>c.actions.isItemExpanded(t.treeId,t.model.id)),a=()=>{c.mutations.setItemSelect(t.treeId,t.model),c.actions.toggleItem(t.treeId,t.model.id)},l=e.computed(()=>(c.actions.isItemSelected(t.treeId,t.model.id)?"selected":"")+(i.value?"node-over ":"")+(r.value?"node-top ":"")+(s.value?"node-bottom ":"")),f=e.computed(()=>t.model.draggable===!0);e.computed(()=>Object.hasOwn(t.model,"droppable")?t.model.droppable:!0);const u=$=>{let y=I.data;if(y.model.id===t.model.id||c.actions.isChildOfParent(t.treeId,t.model.id,y.model.id)||c.actions.isParentOfChild(t.treeId,y.model.id,t.model.id))return i.value=!1,r.value=!1,s.value=!1,!1;if(!c.state.trees[t.treeId].transfer&&y.id!==t.treeId)return!1;let b="";r.value?b="before":s.value?b="after":b="inside",c.actions.moveTreeNode(y.id,t.treeId,c.getters.getItems(t.treeId),y.model.id,t.model.id,b),i.value=!1,r.value=!1,s.value=!1},B=$=>{let y=I.data;if(y.model.id===t.model.id||c.actions.isChildOfParent(t.treeId,t.model.id,y.model.id)||c.actions.isParentOfChild(t.treeId,y.model.id,t.model.id))return!1;const b=$.y,T=n.value.getBoundingClientRect().top,_=n.value.getBoundingClientRect().height,N=_/3;b>T&&b<=T+N?(i.value=!1,r.value=!0,s.value=!1):b<T+_&&b>=T+_-N?(i.value=!1,r.value=!1,s.value=!0):(i.value=!0,r.value=!1,s.value=!1)},x=()=>{i.value=!1,r.value=!1,s.value=!1};return($,y)=>{const b=e.resolveComponent("d-tree-item",!0);return e.openBlock(),e.createBlock(G,{tag:"li",class:"tree-item","transfer-data":{id:t.treeId,model:t.model},draggable:f.value,onDrop:e.withModifiers(u,["stop"]),onDragenter:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(B,["prevent","stop"]),onDragleave:e.withModifiers(x,["prevent"])},{default:e.withCtx(()=>{var T,_;return[e.createElementVNode("div",{ref_key:"node",ref:n,class:e.normalizeClass(l.value),onClick:a},[e.createElementVNode("div",null,[t.model.icons&&t.model.icons.pre&&d.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(m.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.pre&&!d.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(m.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",q,[e.createElementVNode("div",null,e.toDisplayString(t.model.title),1)])]),e.createElementVNode("div",J,[((T=t.model.badge)==null?void 0:T.value)!==void 0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E),{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&&d.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(m.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],2),e.createVNode(W,null,{default:e.withCtx(()=>[d.value&&m.value?(e.openBlock(),e.createElementBlock("ul",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model.children,N=>(e.openBlock(),e.createBlock(b,{class:"tree-item",key:N.id,model:N,treeId:t.treeId},null,8,["model","treeId"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])}}},[["__scopeId","data-v-f03192c5"]]);function H(o){return o=o||new Map,{all:o,on(t,n){const i=o.get(t);i?i.push(n):o.set(t,[n])},off(t,n){const i=o.get(t);i&&(n?i.splice(i.indexOf(n)>>>0,1):o.set(t,[]))},emit(t,n){let i=o.get(t);i&&i.slice().map(r=>{r(n)}),i=o.get("*"),i&&i.slice().map(r=>{r(t,n)})}}}const S=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,t,n,i="id",r="children",s={}){return n&&o&&(o.find(d=>d[i]===n?(s.found=t,d):c.getters.getParentId(d[r],d.id,n,i,r,s)),s.found)?s.found:!1}},mutations:{setTreeItems(o,t){c.state.trees[o].items=t},setItemSelect(o,t){S.emit(`select-${o}`,{id:o,model:t}),!c.state.trees[o].noSelect&&(c.state.trees[o].multiSelect?c.state.trees[o].selected.includes(t.id)?c.state.trees[o].selected=c.state.trees[o].selected.filter(function(n){return n!==t.id}):c.state.trees[o].selected=[...c.state.trees[o].selected,t.id]:c.state.trees[o].selected=[t.id])}},actions:{initTreeStore(o,t,n,i,r,s){c.state.trees[o]=[],c.state.trees[o].selected=[],c.state.trees[o].items=structuredClone(t),c.state.trees[o].noSelect=n,c.state.trees[o].multiSelect=i,c.state.trees[o].expanded=r,c.state.trees[o].transfer=s},isItemSelected(o,t){return c.state.trees[o].selected.includes(t)},toggleItem(o,t){const n=c.actions.deepSearch(c.state.trees[o].items,t);n.expanded=n.expanded===void 0||!n.expanded,n.children&&n.children.length&&(n.expanded?S.emit(`expand-${o}`,{id:o,model:n}):S.emit(`collapse-${o}`,{id:o,model:n}))},isItemExpanded(o,t){const n=c.actions.deepSearch(c.state.trees[o].items,t);return c.state.trees[o].expanded&&(n.expanded=n.expanded===void 0?!0:n.expanded),n.expanded},isChildOfParent(o,t,n){const i=c.actions.deepSearch(c.state.trees[o].items,t);if(i&&i.children){for(let r=0;r<i.children.length;r++)if(i.children[r].id===n)return!0}return!1},isParentOfChild(o,t,n){const i=c.actions.deepSearch(c.state.trees[o].items,t);return!!(i&&i.children&&c.actions.deepSearch(i.children,n))},deepSearch(o,t,n="id",i="children",r={}){return t&&o&&(o.find(s=>s[n]===t?(r.found=s,s):c.actions.deepSearch(s[i],t,n,i,r)),r.found)?r.found:!1},moveTreeNode(o,t,n,i,r,s){const d=c.actions.deleteTreeNode(n,i);c.actions.insertTreeNode(n,r,d,s),S.emit(`move-${t}`,{fromTreeId:o,toTreeId:t,moved:d.id,target:r,position:s})},insertTreeNode(o,t,n,i){if(o)for(let r=0;r<o.length;r++){if(o[r].id===t){let d=r;return i==="after"?(d++,o.splice(d,0,n)):i==="before"?o.splice(d,0,n):i==="inside"&&(Object.hasOwn(o[r],"children")||(o[r].children=[],o[r].opened=!0),o[r].children.splice(0,0,n)),o[r]}const s=this.insertTreeNode(o[r].children,t,n,i);if(s)return s}},deleteTreeNode(o,t){if(o)for(let n=0;n<o.length;n++){if(o[n].id===t){const r=o[n];return o.splice(n,1),r}const i=c.actions.deleteTreeNode(o[n].children,t);if(i)return i}}}},U={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(h),setup(o,{emit:t}){let n=e.reactive({});const i=e.ref("false"),r=e.ref(null),s=new Set,d=e.computed(()=>i.value&&n),m=(a,l)=>{n=I.data,t(a,l,n),a===h.dragenter&&(s.size||l.target===r.value)&&s.add(l.target),a===h.dragleave&&s.delete(l.target),a===h.drop&&s.clear(),i.value=!!s.size};return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"el",ref:r,onDragenter:l[0]||(l[0]=f=>m(e.unref(h).dragenter,f)),onDragleave:l[1]||(l[1]=f=>m(e.unref(h).dragleave,f)),onDragover:l[2]||(l[2]=e.withModifiers(f=>m(e.unref(h).dragover,f),["prevent"])),onDrop:l[3]||(l[3]=e.withModifiers(f=>m(e.unref(h).drop,f),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{transferData:d.value})]),_:3},544))}},F={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean},emits:["select","collapse","expand","move"],setup(o,{emit:t}){const n=o,i=e.getCurrentInstance().uid;c.actions.initTreeStore(i,n.items,n.noSelect,n.multiSelect,n.expanded,n.transfer);const r=(s,d)=>{console.log(s,d)};return S.on(`select-${i}`,s=>{t("select",s)}),S.on(`expand-${i}`,s=>{t("expand",s)}),S.on(`collapse-${i}`,s=>{t("collapse",s)}),S.on(`move-${i}`,s=>{t("move",s)}),(s,d)=>(e.openBlock(),e.createBlock(U,{class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).getters.getItems(e.unref(i)),m=>(e.openBlock(),e.createBlock(M,{key:m.id,model:m,treeId:e.unref(i)},null,8,["model","treeId"]))),128))]),_:1},8,["onDrop"]))}},ue="",Q=V({__name:"DAccordion",props:{items:Array},setup(o){const t=o;return(n,i)=>(e.openBlock(),e.createBlock(F,{class:"accordion",items:t.items,"no-select":!0},null,8,["items"]))}},[["__scopeId","data-v-4c920528"]]),P={__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 t=o,n=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:s,height:d,paddingLeft:m,transitionDuration:a,transitionTimingFunction:l}=t,f=i?"fixed":"static",u=t.useMinWidthLayout?`min-width:${s}px;`:"";return`position:${f};z-index:${r};${u}height:${d}px;padding-left:${m}px;transition-duration:${a}ms;transition-timing-function:${l};`});return(i,r)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(n.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 t=o,n=e.computed(()=>{const{fixed:i,top:r,zIndex:s,minWidth:d,height:m,paddingLeft:a,transitionDuration:l,transitionTimingFunction:f}=t,u=i?"fixed":"static",B=t.useMinWidthLayout?`min-width: ${d}px;`:"";return`position:${u};top:${r}px;z-index:${s};${B}height:${m}px;padding-left:${a}px;transition-duration:${l}ms;transition-timing-function:${f};`});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(n.value)},[e.renderSlot(i.$slots,"default")],4))}},A={__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 t=o,n=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:s,height:d,paddingLeft:m,transitionDuration:a,transitionTimingFunction:l}=t,f=i?"fixed":"static",u=t.useMinWidthLayout?`min-width:${s}px;`:"";return`position:${f};z-index:${r};${u}height:${d}px;padding-left:${m}px;transition-duration:${a}ms;transition-timing-function:${l};`});return(i,r)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(n.value)},[e.renderSlot(i.$slots,"default")],4))}},R={__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 t=o,n=e.computed(()=>{const{zIndex:i,width:r,paddingTop:s,transitionDuration:d,transitionTimingFunction:m}=t;return`z-index:${i};width:${r}px;padding-top:${s}px;transition-duration:${d}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(n.value)},[e.renderSlot(i.$slots,"default")],4))}},Y={__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 t=o,n=e.computed(()=>{const{paddingTop:i,paddingBottom:r,paddingLeft:s,transitionDuration:d,transitionTimingFunction:m}=t,a=`overflow:${t.overflowHidden?"hidden":"visible"};`;return`padding-top:${i}px;padding-bottom:${r}px;padding-left:${s}px;${a}transition-duration:${d}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(n.value),class:"d-layout-content"},[e.renderSlot(i.$slots,"default")],4))}};function v(o){const t=e.ref(0),n=e.computed(()=>`transform: translateX(${-t.value}px);`);let i=!1;function r(f){t.value=f}function s(){var f;const u=((f=document.scrollingElement)===null||f===void 0?void 0:f.scrollLeft)||0;r(u)}function d(){s()}function m(){document.addEventListener("scroll",s)}function a(){i&&document.removeEventListener("scroll",s)}function l(){d(),m(),i=!0}return e.watch(o,f=>{f?l():a()},{immediate:!0}),e.onUnmounted(()=>{a()}),n}const ee=1001,te=999,oe=998,ne={__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:t}){const n=o,i=e.computed(()=>n.useMinWidthLayout?`min-width:${n.minWidth}px;`:""),r=e.computed(()=>n.useMinWidthLayout&&(n.fixedHeaderAndTab||n.fixedFooter)),s=v(r),d=e.computed(()=>n.fixedHeaderAndTab?s.value:""),m=e.computed(()=>n.fixedFooter?s.value:""),a=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:w}=n;return{transitionDuration:g,transitionTimingFunction:w}}),l=e.computed(()=>n.mode==="vertical"),f=e.computed(()=>n.isMobile||l.value?1003:1e3),u=e.computed({get(){return n.sidebarCollapse},set(g){t("update:sidebar-collapse",g)}});function B(){u.value=!0}const x=e.computed(()=>n.isMobile&&!u.value),$=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:w}=n;return`background-color:${n.maskBg};transition-duration:${g}ms;transition-timing-function:${w};`}),y=e.computed(()=>{const{sidebarWidth:g,sidebarCollapsedWidth:w}=n,ae=n.isMobile?0:w,se=u.value?ae:g;return n.sidebarVisible?se:0}),b=e.computed(()=>n.isMobile?0:y.value),T=e.computed(()=>l.value?b.value:0),_=e.computed(()=>!n.isMobile&&!l.value&&n.headerVisible?n.headerHeight:0),N=e.computed(()=>{let g=0;return n.fixedHeaderAndTab&&(n.headerVisible&&(g+=n.headerHeight),n.tabVisible&&(g+=n.tabHeight)),g}),re=e.computed(()=>n.fixedFooter&&n.footerVisible?n.footerHeight:0);return(g,w)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(i.value)},[o.headerVisible?(e.openBlock(),e.createBlock(P,e.mergeProps({key:0},a.value,{fixed:o.fixedHeaderAndTab,"z-index":ee,"min-width":o.minWidth,height:o.headerHeight,"padding-left":T.value,style:d.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),o.tabVisible?(e.openBlock(),e.createBlock(O,e.mergeProps({key:1},a.value,{fixed:o.fixedHeaderAndTab,"z-index":te,"min-width":o.minWidth,top:o.headerHeight,height:o.tabHeight,"padding-left":b.value,style:d.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),o.sidebarVisible?(e.openBlock(),e.createBlock(R,e.mergeProps({key:2},a.value,{"z-index":f.value,width:y.value,"padding-top":_.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle($.value),onClick:B},null,4)):e.createCommentVNode("",!0),e.createVNode(Y,e.mergeProps(a.value,{"padding-top":N.value,"padding-bottom":re.value,"padding-left":b.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(A,e.mergeProps({key:4},a.value,{fixed:o.fixedFooter,"z-index":oe,"min-width":o.minWidth,height:o.footerHeight,"padding-left":b.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))}},L={state:e.reactive({theme:"dark"}),getters:{theme(){return L.state.theme}},mutations:{setTheme(o){L.state.theme=o,document.documentElement.setAttribute("class",o)}},actions:{}},ie={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(o){const t=o;return L.mutations.setTheme(t.theme),(n,i)=>e.renderSlot(n.$slots,"default")}};p.DAccordion=Q,p.DBadge=E,p.DButton=Z,p.DCollapse=W,p.DConfigProvider=ie,p.DGlobalStore=L,p.DIcon=C,p.DIconStore=D,p.DLayoutAdmin=ne,p.DLayoutContent=Y,p.DLayoutFooter=A,p.DLayoutHeader=P,p.DLayoutSidebar=R,p.DLayoutTab=O,p.DTransferStore=I,p.DTree=F,p.DTreeItem=M,p.DTreeStore=c,p.emitter=S,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:2px}.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}.button{background-color:#ccc9;color:gray}.button:hover{color:#666;background-color:#cccc}.button.button-blue{background-color:#51c0e799;color:#43565c}.button.button-blue:hover{color:#2d3a3f;background-color:#51c0e7cc}.button.button-green{background-color:#90d76099;color:#4f4f4f}.button.button-green:hover{color:#363636;background-color:#90d760cc}.button.button-red{background-color:#ff929299;color:#ae4a4a}.button.button-red:hover{background-color:#ff9292cc;color:#8a3b3b}.button.button-orange{background-color:#ffc45899;color:#856a39}.button.button-orange:hover{background-color:#ffc458cc;color:#614e2a}.button.button-violet{background-color:#c2a7ff99;color:#7456b7}.button.button-violet:hover{background-color:#c2a7ffcc;color:#5c4199}.button.button-outline{outline:solid 1px rgba(204,204,204,.6);color:gray;background-color:transparent}.button.button-outline:hover{color:gray;background-color:#cccc}.button.button-outline-blue{outline:solid 1px rgba(81,192,231,.6);background-color:transparent;color:#136c8c99}.button.button-outline-blue:hover{color:#43565c;background-color:#51c0e7cc}.button.button-outline-green{outline:solid 1px rgba(144,215,96,.6);background-color:transparent;color:#467e2099}.button.button-outline-green:hover{color:#4f4f4f;background-color:#90d760cc}.button.button-outline-red{outline:solid 1px rgba(255,146,146,.6);background-color:transparent;color:#f8000099}.button.button-outline-red:hover{color:#ae4a4a;background-color:#ff9292cc}.button.button-outline-orange{outline:solid 1px rgba(255,196,88,.6);background-color:transparent;color:#be7b0099}.button.button-outline-orange:hover{color:#856a39;background-color:#ffc458cc}.button.button-outline-violet{outline:solid 1px rgba(194,167,255,.6);background-color:transparent;color:#580eff99}.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}body{background-color:#fff;color:#333}.dark{background-color:#34383e;color:#ccc}.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}.icon{color:#333}.dark .icon{color:#ccc}.d-layout{background-color:#fff}.d-layout .d-layout-sidebar{background-color:#e5e5e5}.d-layout .d-layout-header,.d-layout .d-layout-footer{background-color:#f0f0f0}.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-f03192c5]{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-f03192c5]{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-f03192c5]{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}.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:2px}.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}.button{background-color:#ccc9;color:gray}.button:hover{color:#666;background-color:#cccc}.button.button-blue{background-color:#51c0e799;color:#43565c}.button.button-blue:hover{color:#2d3a3f;background-color:#51c0e7cc}.button.button-green{background-color:#90d76099;color:#4f4f4f}.button.button-green:hover{color:#363636;background-color:#90d760cc}.button.button-red{background-color:#ff929299;color:#ae4a4a}.button.button-red:hover{background-color:#ff9292cc;color:#8a3b3b}.button.button-orange{background-color:#ffc45899;color:#856a39}.button.button-orange:hover{background-color:#ffc458cc;color:#614e2a}.button.button-violet{background-color:#c2a7ff99;color:#7456b7}.button.button-violet:hover{background-color:#c2a7ffcc;color:#5c4199}.button.button-outline{outline:solid 1px rgba(204,204,204,.6);color:gray;background-color:transparent}.button.button-outline:hover{color:gray;background-color:#cccc}.button.button-outline-blue{outline:solid 1px rgba(81,192,231,.6);background-color:transparent;color:#136c8c99}.button.button-outline-blue:hover{color:#43565c;background-color:#51c0e7cc}.button.button-outline-green{outline:solid 1px rgba(144,215,96,.6);background-color:transparent;color:#467e2099}.button.button-outline-green:hover{color:#4f4f4f;background-color:#90d760cc}.button.button-outline-red{outline:solid 1px rgba(255,146,146,.6);background-color:transparent;color:#f8000099}.button.button-outline-red:hover{color:#ae4a4a;background-color:#ff9292cc}.button.button-outline-orange{outline:solid 1px rgba(255,196,88,.6);background-color:transparent;color:#be7b0099}.button.button-outline-orange:hover{color:#856a39;background-color:#ffc458cc}.button.button-outline-violet{outline:solid 1px rgba(194,167,255,.6);background-color:transparent;color:#580eff99}.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 body{background-color:#34383e;color:#ccc}body{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}.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}.d-layout{background-color:#fff}.d-layout .d-layout-sidebar{background-color:#e5e5e5}.d-layout .d-layout-header,.d-layout .d-layout-footer{background-color:#f0f0f0}.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-f03192c5]{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-f03192c5]{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-f03192c5]{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.36",
3
+ "version": "0.0.37",
4
4
  "description": "Simple Vue3 component library",
5
5
  "author": "Error202",
6
6
  "license": "MIT",