doph-js 0.0.45 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dophJs.js CHANGED
@@ -1,4 +1,4 @@
1
- import { useSlots as j, computed as f, h as X, openBlock as p, createBlock as v, unref as h, createElementBlock as x, Fragment as G, normalizeClass as k, renderSlot as y, createCommentVNode as T, createVNode as K, createElementVNode as C, toDisplayString as U, withDirectives as oe, normalizeStyle as L, vModelText as ie, Transition as se, withCtx as B, ref as z, resolveDynamicComponent as E, withModifiers as H, resolveComponent as ae, createTextVNode as re, renderList as ee, reactive as q, getCurrentInstance as de, watch as le, onUnmounted as ue, mergeProps as O } from "vue";
1
+ import { useSlots as G, computed as p, h as X, openBlock as f, createBlock as v, unref as h, createElementBlock as b, Fragment as K, normalizeClass as k, renderSlot as y, createCommentVNode as D, createVNode as q, createElementVNode as M, toDisplayString as U, withDirectives as oe, normalizeStyle as L, vModelText as ie, Transition as se, withCtx as B, ref as C, resolveDynamicComponent as E, withModifiers as z, resolveComponent as ae, createTextVNode as re, renderList as ee, reactive as J, getCurrentInstance as de, watch as le, onUnmounted as ue, mergeProps as O } from "vue";
2
2
  const R = {
3
3
  __name: "DIcon",
4
4
  props: {
@@ -7,13 +7,13 @@ const R = {
7
7
  color: String
8
8
  },
9
9
  setup(t) {
10
- const n = t, e = j(), o = f(() => {
11
- const { color: d } = n;
12
- return d === void 0 ? null : d;
13
- }), i = f(() => {
14
- const d = n.size ?? null;
15
- if (d !== void 0)
16
- return typeof d == "number" || /^\d+$/.test(d) ? `${d}px` : d;
10
+ const n = t, e = G(), o = p(() => {
11
+ const { color: r } = n;
12
+ return r === void 0 ? null : r;
13
+ }), i = p(() => {
14
+ const r = n.size ?? null;
15
+ if (r !== void 0)
16
+ return typeof r == "number" || /^\d+$/.test(r) ? `${r}px` : r;
17
17
  }), a = X(
18
18
  "i",
19
19
  {
@@ -25,9 +25,9 @@ const R = {
25
25
  },
26
26
  n.component ? X(n.component) : e
27
27
  );
28
- return (d, l) => (p(), v(h(a)));
28
+ return (r, l) => (f(), v(h(a)));
29
29
  }
30
- }, Ve = {
30
+ }, ce = { key: 0 }, Ae = {
31
31
  __name: "DButton",
32
32
  props: {
33
33
  class: String,
@@ -35,42 +35,42 @@ const R = {
35
35
  },
36
36
  emits: ["click"],
37
37
  setup(t, { emit: n }) {
38
- const e = t;
39
- let o = null;
40
- e.icon && (o = X(R, {
38
+ const e = t, o = G();
39
+ let i = null;
40
+ e.icon && (i = X(R, {
41
41
  component: e.icon,
42
42
  color: "inherit"
43
43
  }));
44
- const i = (a) => {
45
- n("click", a);
44
+ const a = (r) => {
45
+ n("click", r);
46
46
  };
47
- return (a, d) => (p(), x(G, null, [
48
- h(o) ? T("", !0) : (p(), x("div", {
47
+ return (r, l) => (f(), b(K, null, [
48
+ h(i) ? D("", !0) : (f(), b("div", {
49
49
  key: 0,
50
- onClick: i,
50
+ onClick: a,
51
51
  class: k(["button", e.class])
52
52
  }, [
53
- y(a.$slots, "default")
53
+ y(r.$slots, "default")
54
54
  ], 2)),
55
- h(o) ? (p(), x("div", {
55
+ h(i) ? (f(), b("div", {
56
56
  key: 1,
57
- onClick: i,
57
+ onClick: a,
58
58
  class: k(["button button-ext", e.class])
59
59
  }, [
60
- K(h(o)),
61
- C("div", null, [
62
- y(a.$slots, "default")
63
- ])
64
- ], 2)) : T("", !0)
60
+ q(h(i)),
61
+ h(o).default ? (f(), b("div", ce, [
62
+ y(r.$slots, "default")
63
+ ])) : D("", !0)
64
+ ], 2)) : D("", !0)
65
65
  ], 64));
66
66
  }
67
67
  };
68
- const J = (t, n) => {
68
+ const Q = (t, n) => {
69
69
  const e = t.__vccOpts || t;
70
70
  for (const [o, i] of n)
71
71
  e[o] = i;
72
72
  return e;
73
- }, ce = { class: "d-input" }, fe = { class: "label" }, pe = ["placeholder"], me = {
73
+ }, fe = { class: "d-input" }, pe = { class: "label" }, me = ["placeholder"], ge = {
74
74
  __name: "DInput",
75
75
  props: {
76
76
  label: String,
@@ -82,58 +82,58 @@ const J = (t, n) => {
82
82
  },
83
83
  emits: ["update:modelValue"],
84
84
  setup(t, { emit: n }) {
85
- const e = t, o = f(() => e.font === "small" ? "d-input-small" : e.font === "big" ? "d-input-big" : ""), i = f({
85
+ const e = t, o = p(() => e.font === "small" ? "d-input-small" : e.font === "big" ? "d-input-big" : ""), i = p({
86
86
  get: () => e.modelValue,
87
87
  set: (a) => {
88
88
  n("update:modelValue", a);
89
89
  }
90
90
  });
91
- return (a, d) => (p(), x("div", ce, [
92
- C("div", fe, U(e.label), 1),
93
- oe(C("input", {
94
- "onUpdate:modelValue": d[0] || (d[0] = (l) => i.value = l),
91
+ return (a, r) => (f(), b("div", fe, [
92
+ M("div", pe, U(e.label), 1),
93
+ oe(M("input", {
94
+ "onUpdate:modelValue": r[0] || (r[0] = (l) => i.value = l),
95
95
  type: "text",
96
96
  class: k(o.value),
97
97
  placeholder: e.placeholder,
98
98
  style: L(e.size === "wide" ? "width:100%" : "")
99
- }, null, 14, pe), [
99
+ }, null, 14, me), [
100
100
  [ie, i.value]
101
101
  ])
102
102
  ]));
103
103
  }
104
- }, Ae = /* @__PURE__ */ J(me, [["__scopeId", "data-v-11679fd8"]]), F = {
104
+ }, Pe = /* @__PURE__ */ Q(ge, [["__scopeId", "data-v-11679fd8"]]), H = {
105
105
  state: {},
106
106
  getters: {
107
107
  getIcon(t) {
108
- return F.state[t];
108
+ return H.state[t];
109
109
  },
110
110
  getIcons() {
111
- return F.state;
111
+ return H.state;
112
112
  }
113
113
  },
114
114
  mutations: {
115
115
  addIcon(t, n) {
116
- F.state.name = n;
116
+ H.state.name = n;
117
117
  },
118
118
  addIcons(t) {
119
119
  for (const n in t)
120
- t.hasOwnProperty(n) && (F.state[n] = t[n]);
120
+ t.hasOwnProperty(n) && (H.state[n] = t[n]);
121
121
  }
122
122
  }
123
- }, ge = {
123
+ }, he = {
124
124
  __name: "DBadge",
125
125
  props: {
126
126
  class: String
127
127
  },
128
128
  setup(t) {
129
129
  const n = t;
130
- return (e, o) => (p(), x("div", {
130
+ return (e, o) => (f(), b("div", {
131
131
  class: k(["badge", n.class])
132
132
  }, [
133
133
  y(e.$slots, "default")
134
134
  ], 2));
135
135
  }
136
- }, I = "0px", he = {
136
+ }, I = "0px", ye = {
137
137
  __name: "DCollapse",
138
138
  props: {
139
139
  duration: {
@@ -170,17 +170,17 @@ const J = (t, n) => {
170
170
  borderBottomWidth: s.style.borderBottomWidth,
171
171
  marginTop: s.style.marginTop,
172
172
  marginBottom: s.style.marginBottom
173
- }), o = (s, r) => {
173
+ }), o = (s, d) => {
174
174
  const { width: c } = getComputedStyle(s);
175
175
  s.style.width = c, s.style.position = "absolute", s.style.visibility = "hidden", s.style.height = "";
176
176
  let { height: m } = getComputedStyle(s);
177
- return s.style.width = r.width, s.style.position = r.position, s.style.visibility = r.visibility, s.style.height = I, s.style.overflow = "hidden", r.height && r.height !== I ? r.height : m;
178
- }, i = (s, r, c, m, $) => {
177
+ return s.style.width = d.width, s.style.position = d.position, s.style.visibility = d.visibility, s.style.height = I, s.style.overflow = "hidden", d.height && d.height !== I ? d.height : m;
178
+ }, i = (s, d, c, m, $) => {
179
179
  const N = s.animate(m, $);
180
- s.style.height = r.height, N.onfinish = () => {
181
- s.style.overflow = r.overflow, c();
180
+ s.style.height = d.height, N.onfinish = () => {
181
+ s.style.overflow = d.overflow, c();
182
182
  };
183
- }, a = (s, r) => [
183
+ }, a = (s, d) => [
184
184
  {
185
185
  height: I,
186
186
  opacity: n.opacityClosed,
@@ -194,25 +194,25 @@ const J = (t, n) => {
194
194
  {
195
195
  height: s,
196
196
  opacity: n.opacityOpened,
197
- paddingTop: r.paddingTop,
198
- paddingBottom: r.paddingBottom,
199
- borderTopWidth: r.borderTopWidth,
200
- borderBottomWidth: r.borderBottomWidth,
201
- marginTop: r.marginTop,
202
- marginBottom: r.marginBottom
197
+ paddingTop: d.paddingTop,
198
+ paddingBottom: d.paddingBottom,
199
+ borderTopWidth: d.borderTopWidth,
200
+ borderBottomWidth: d.borderBottomWidth,
201
+ marginTop: d.marginTop,
202
+ marginBottom: d.marginBottom
203
203
  }
204
- ], d = (s, r) => {
205
- const c = s, m = e(c), $ = o(c, m), N = a($, m), M = { duration: n.duration, easing: n.easingEnter };
206
- i(c, m, r, N, M);
207
- }, l = (s, r) => {
204
+ ], r = (s, d) => {
205
+ const c = s, m = e(c), $ = o(c, m), N = a($, m), F = { duration: n.duration, easing: n.easingEnter };
206
+ i(c, m, d, N, F);
207
+ }, l = (s, d) => {
208
208
  const c = s, m = e(c), { height: $ } = getComputedStyle(c);
209
209
  c.style.height = $, c.style.overflow = "hidden";
210
- const N = a($, m).reverse(), M = { duration: n.duration, easing: n.easingLeave };
211
- i(c, m, r, N, M);
210
+ const N = a($, m).reverse(), F = { duration: n.duration, easing: n.easingLeave };
211
+ i(c, m, d, N, F);
212
212
  };
213
- return (s, r) => (p(), v(se, {
213
+ return (s, d) => (f(), v(se, {
214
214
  css: !1,
215
- onEnter: d,
215
+ onEnter: r,
216
216
  onLeave: l
217
217
  }, {
218
218
  default: B(() => [
@@ -223,7 +223,7 @@ const J = (t, n) => {
223
223
  }
224
224
  }, Z = {
225
225
  data: void 0
226
- }, Q = (t) => t.reduce((n, e) => (n[e] = e) && n, {}), b = Q([
226
+ }, j = (t) => t.reduce((n, e) => (n[e] = e) && n, {}), x = j([
227
227
  "drag",
228
228
  "dragend",
229
229
  "dragenter",
@@ -231,7 +231,7 @@ const J = (t, n) => {
231
231
  "dragstart",
232
232
  "dragover",
233
233
  "drop"
234
- ]), ye = Q(["copy", "move", "link", "none"]), ve = Q([
234
+ ]), ve = j(["copy", "move", "link", "none"]), be = j([
235
235
  "none",
236
236
  "copy",
237
237
  "copyLink",
@@ -241,13 +241,13 @@ const J = (t, n) => {
241
241
  "move",
242
242
  "all",
243
243
  "uninitialized"
244
- ]), be = {
244
+ ]), xe = {
245
245
  __name: "DDrag",
246
246
  props: {
247
247
  draggable: { type: Boolean, default: !0 },
248
248
  transferData: {},
249
- dropEffect: { validator: (t) => t in ye },
250
- effectAllowed: { validator: (t) => t in ve },
249
+ dropEffect: { validator: (t) => t in ve },
250
+ effectAllowed: { validator: (t) => t in be },
251
251
  image: String,
252
252
  imageXOffset: { type: Number, default: 0 },
253
253
  imageYOffset: { type: Number, default: 0 },
@@ -255,27 +255,27 @@ const J = (t, n) => {
255
255
  tag: { type: String, default: "div" }
256
256
  },
257
257
  setup(t) {
258
- const n = t, e = j(), o = z(!1), i = f(() => o && n.transferData), a = f(() => ({ position: "fixed", top: "-1000px" })), d = (l, s) => {
259
- const r = s.dataTransfer;
260
- if ([b.dragenter, b.dragover].includes(l) && n.dropEffect && (r.dropEffect = n.dropEffect), l === b.dragstart) {
261
- if (n.effectAllowed && (r.effectAllowed = n.effectAllowed), n.image || e.image) {
258
+ const n = t, e = G(), o = C(!1), i = p(() => o && n.transferData), a = p(() => ({ position: "fixed", top: "-1000px" })), r = (l, s) => {
259
+ const d = s.dataTransfer;
260
+ if ([x.dragenter, x.dragover].includes(l) && n.dropEffect && (d.dropEffect = n.dropEffect), l === x.dragstart) {
261
+ if (n.effectAllowed && (d.effectAllowed = n.effectAllowed), n.image || e.image) {
262
262
  let c;
263
- n.image ? (c = new Image(), c.src = n.image) : e.image && (c = e.image[0].elm), r.setDragImage && r.setDragImage(c, n.imageXOffset, n.imageYOffset);
263
+ n.image ? (c = new Image(), c.src = n.image) : e.image && (c = e.image[0].elm), d.setDragImage && d.setDragImage(c, n.imageXOffset, n.imageYOffset);
264
264
  }
265
265
  n.transferData !== void 0 && (Z.data = n.transferData, s.dataTransfer.setData("text", "")), o.value = !0;
266
266
  }
267
267
  };
268
- return (l, s) => (p(), v(E(t.tag), {
268
+ return (l, s) => (f(), v(E(t.tag), {
269
269
  draggable: n.draggable,
270
- onDrag: s[0] || (s[0] = (r) => d(h(b).drag, r)),
271
- onDragstart: s[1] || (s[1] = H((r) => d(h(b).dragstart, r), ["stop"])),
272
- onDragenter: s[2] || (s[2] = (r) => d(h(b).dragenter, r)),
273
- onDragleave: s[3] || (s[3] = (r) => d(h(b).dragleave, r)),
274
- onDragend: s[4] || (s[4] = (r) => d(h(b).dragend, r))
270
+ onDrag: s[0] || (s[0] = (d) => r(h(x).drag, d)),
271
+ onDragstart: s[1] || (s[1] = z((d) => r(h(x).dragstart, d), ["stop"])),
272
+ onDragenter: s[2] || (s[2] = (d) => r(h(x).dragenter, d)),
273
+ onDragleave: s[3] || (s[3] = (d) => r(h(x).dragleave, d)),
274
+ onDragend: s[4] || (s[4] = (d) => r(h(x).dragend, d))
275
275
  }, {
276
276
  default: B(() => [
277
277
  y(l.$slots, "default", { transferData: i.value }),
278
- t.hideImageHtml ? (p(), x("div", {
278
+ t.hideImageHtml ? (f(), b("div", {
279
279
  key: 0,
280
280
  style: L(a.value)
281
281
  }, [
@@ -289,10 +289,10 @@ const J = (t, n) => {
289
289
  }, 40, ["draggable"]));
290
290
  }
291
291
  };
292
- const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direction": "row", "justify-content": "flex-end" } }, _e = {
292
+ const _e = { class: "item-title" }, De = { style: { display: "flex", "flex-direction": "row", "justify-content": "flex-end" } }, Te = {
293
293
  key: 0,
294
294
  class: "sub-menu"
295
- }, Te = {
295
+ }, $e = {
296
296
  __name: "DTreeItem",
297
297
  props: {
298
298
  model: Object,
@@ -302,75 +302,75 @@ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direc
302
302
  },
303
303
  emits: ["nodedrop", "nodedragover", "nodedragleave", "nodeclick"],
304
304
  setup(t, { emit: n }) {
305
- const e = t, o = z(null), i = z(!1), a = z(!1), d = z(!1), l = f(() => e.model.children && e.model.children.length), s = f(() => (u.actions.isTreeExpanded(e.treeId) && (e.model.expanded = e.model.expanded === void 0 ? !0 : e.model.expanded), e.model.expanded)), r = (S) => {
305
+ const e = t, o = C(null), i = C(!1), a = C(!1), r = C(!1), l = p(() => e.model.children && e.model.children.length), s = p(() => (u.actions.isTreeExpanded(e.treeId) && (e.model.expanded = e.model.expanded === void 0 ? !0 : e.model.expanded), e.model.expanded)), d = (S) => {
306
306
  n("nodeclick", { event: S, model: e.model });
307
307
  }, c = (S) => {
308
308
  n("nodeclick", S);
309
- }, m = f(() => (u.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (i.value ? "node-over " : "") + (a.value ? "node-top " : "") + (d.value ? "node-bottom " : "")), $ = f(() => e.search ? !1 : e.model.draggable === !0), N = (S) => {
310
- let D = Z.data;
311
- if (D.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, D.model.id) || u.actions.isParentOfChild(e.treeId, e.items, D.model.id, e.model.id))
312
- return i.value = !1, a.value = !1, d.value = !1, !1;
313
- if (!u.state.trees[e.treeId].transfer && D.id !== e.treeId)
309
+ }, m = p(() => (u.actions.isItemSelected(e.treeId, e.model.id) ? "selected" : "") + (i.value ? "node-over " : "") + (a.value ? "node-top " : "") + (r.value ? "node-bottom " : "")), $ = p(() => e.search ? !1 : e.model.draggable === !0), N = (S) => {
310
+ let _ = Z.data;
311
+ if (_.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, _.model.id) || u.actions.isParentOfChild(e.treeId, e.items, _.model.id, e.model.id))
312
+ return i.value = !1, a.value = !1, r.value = !1, !1;
313
+ if (!u.state.trees[e.treeId].transfer && _.id !== e.treeId)
314
314
  return !1;
315
- let _ = "";
316
- a.value ? _ = "before" : d.value ? _ = "after" : _ = "inside", u.actions.moveTreeNode(D.id, e.treeId, e.items, D.model.id, e.model.id, _), i.value = !1, a.value = !1, d.value = !1;
317
- }, M = (S) => {
318
- let D = Z.data;
319
- if (D.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, D.model.id) || u.actions.isParentOfChild(e.treeId, e.items, D.model.id, e.model.id))
315
+ let T = "";
316
+ a.value ? T = "before" : r.value ? T = "after" : T = "inside", u.actions.moveTreeNode(_.id, e.treeId, e.items, _.model.id, e.model.id, T), i.value = !1, a.value = !1, r.value = !1;
317
+ }, F = (S) => {
318
+ let _ = Z.data;
319
+ if (_.model.id === e.model.id || u.actions.isChildOfParent(e.treeId, e.items, e.model.id, _.model.id) || u.actions.isParentOfChild(e.treeId, e.items, _.model.id, e.model.id))
320
320
  return !1;
321
- const _ = S.y, w = o.value.getBoundingClientRect().top, W = o.value.getBoundingClientRect().height, g = W / 3;
322
- _ > w && _ <= w + g ? (i.value = !1, a.value = !0, d.value = !1) : _ < w + W && _ >= w + W - g ? (i.value = !1, a.value = !1, d.value = !0) : (i.value = !0, a.value = !1, d.value = !1);
321
+ const T = S.y, w = o.value.getBoundingClientRect().top, W = o.value.getBoundingClientRect().height, g = W / 3;
322
+ T > w && T <= w + g ? (i.value = !1, a.value = !0, r.value = !1) : T < w + W && T >= w + W - g ? (i.value = !1, a.value = !1, r.value = !0) : (i.value = !0, a.value = !1, r.value = !1);
323
323
  }, Y = () => {
324
- i.value = !1, a.value = !1, d.value = !1;
324
+ i.value = !1, a.value = !1, r.value = !1;
325
325
  };
326
- return (S, D) => {
327
- const _ = ae("d-tree-item", !0);
328
- return p(), v(be, {
326
+ return (S, _) => {
327
+ const T = ae("d-tree-item", !0);
328
+ return f(), v(xe, {
329
329
  tag: "li",
330
330
  class: "tree-item",
331
331
  "transfer-data": { id: e.treeId, model: e.model },
332
332
  draggable: $.value,
333
- onDrop: H(N, ["stop"]),
334
- onDragenter: D[0] || (D[0] = H(() => {
333
+ onDrop: z(N, ["stop"]),
334
+ onDragenter: _[0] || (_[0] = z(() => {
335
335
  }, ["prevent"])),
336
- onDragover: H(M, ["prevent", "stop"]),
337
- onDragleave: H(Y, ["prevent"])
336
+ onDragover: z(F, ["prevent", "stop"]),
337
+ onDragleave: z(Y, ["prevent"])
338
338
  }, {
339
339
  default: B(() => {
340
340
  var w, W;
341
341
  return [
342
- C("div", {
342
+ M("div", {
343
343
  ref_key: "node",
344
344
  ref: o,
345
345
  class: k(m.value),
346
- onClick: r
346
+ onClick: d
347
347
  }, [
348
- C("div", null, [
349
- e.model.icons && e.model.icons.pre && l.value && !e.search ? (p(), v(E(R), {
348
+ M("div", null, [
349
+ e.model.icons && e.model.icons.pre && l.value && !e.search ? (f(), v(E(R), {
350
350
  key: 0,
351
- component: h(F).getters.getIcon(e.model.icons.pre.component),
351
+ component: h(H).getters.getIcon(e.model.icons.pre.component),
352
352
  size: 18,
353
353
  color: e.model.icons.pre.color ? e.model.icons.pre.color : "inherit",
354
354
  class: k(s.value ? "tree-open-pre" : "")
355
- }, null, 8, ["component", "color", "class"])) : T("", !0),
356
- e.model.icons && e.model.icons.pre && !l.value && !e.search ? (p(), v(E(R), {
355
+ }, null, 8, ["component", "color", "class"])) : D("", !0),
356
+ e.model.icons && e.model.icons.pre && !l.value && !e.search ? (f(), v(E(R), {
357
357
  key: 1,
358
- component: h(F).getters.getIcon(e.model.icons.pre.component),
358
+ component: h(H).getters.getIcon(e.model.icons.pre.component),
359
359
  size: 18,
360
360
  color: "rgba(0,0,0,0)",
361
361
  class: k(s.value ? "tree-open-pre" : "")
362
- }, null, 8, ["component", "class"])) : T("", !0),
363
- e.model.icons && e.model.icons.icon ? (p(), v(E(R), {
362
+ }, null, 8, ["component", "class"])) : D("", !0),
363
+ e.model.icons && e.model.icons.icon ? (f(), v(E(R), {
364
364
  key: 2,
365
- component: h(F).getters.getIcon(e.model.icons.icon.component),
365
+ component: h(H).getters.getIcon(e.model.icons.icon.component),
366
366
  color: e.model.icons.icon.color ? e.model.icons.icon.color : "inherit"
367
- }, null, 8, ["component", "color"])) : T("", !0),
368
- C("div", xe, [
369
- C("div", null, U(h(u).actions.renderTitle(e.treeId, e.model.title)), 1)
367
+ }, null, 8, ["component", "color"])) : D("", !0),
368
+ M("div", _e, [
369
+ M("div", null, U(h(u).actions.renderTitle(e.treeId, e.model.title)), 1)
370
370
  ])
371
371
  ]),
372
- C("div", De, [
373
- ((w = e.model.badge) == null ? void 0 : w.value) !== void 0 ? (p(), v(E(ge), {
372
+ M("div", De, [
373
+ ((w = e.model.badge) == null ? void 0 : w.value) !== void 0 ? (f(), v(E(he), {
374
374
  key: 0,
375
375
  class: k([(W = e.model.badge) == null ? void 0 : W.class, "badge-sm"])
376
376
  }, {
@@ -378,20 +378,20 @@ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direc
378
378
  re(U(e.model.badge.value), 1)
379
379
  ]),
380
380
  _: 1
381
- }, 8, ["class"])) : T("", !0),
382
- e.model.icons && e.model.icons.post && l.value && !e.search ? (p(), v(E(R), {
381
+ }, 8, ["class"])) : D("", !0),
382
+ e.model.icons && e.model.icons.post && l.value && !e.search ? (f(), v(E(R), {
383
383
  key: 1,
384
- component: h(F).getters.getIcon(e.model.icons.post.component),
384
+ component: h(H).getters.getIcon(e.model.icons.post.component),
385
385
  size: 20,
386
386
  color: e.model.icons.post.color ? e.model.icons.post.color : "inherit",
387
387
  class: k(s.value ? "tree-open-post" : "")
388
- }, null, 8, ["component", "color", "class"])) : T("", !0)
388
+ }, null, 8, ["component", "color", "class"])) : D("", !0)
389
389
  ])
390
390
  ], 2),
391
- K(he, null, {
391
+ q(ye, null, {
392
392
  default: B(() => [
393
- l.value && s.value && !e.search ? (p(), x("ul", _e, [
394
- (p(!0), x(G, null, ee(t.model.children, (g) => (p(), v(_, {
393
+ l.value && s.value && !e.search ? (f(), b("ul", Te, [
394
+ (f(!0), b(K, null, ee(t.model.children, (g) => (f(), v(T, {
395
395
  class: "tree-item",
396
396
  key: g.id,
397
397
  model: g,
@@ -400,7 +400,7 @@ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direc
400
400
  search: e.search,
401
401
  onNodeclick: c
402
402
  }, null, 8, ["model", "treeId", "items", "search"]))), 128))
403
- ])) : T("", !0)
403
+ ])) : D("", !0)
404
404
  ]),
405
405
  _: 1
406
406
  })
@@ -410,8 +410,8 @@ const xe = { class: "item-title" }, De = { style: { display: "flex", "flex-direc
410
410
  }, 8, ["transfer-data", "draggable", "onDrop", "onDragover", "onDragleave"]);
411
411
  };
412
412
  }
413
- }, $e = /* @__PURE__ */ J(Te, [["__scopeId", "data-v-f4157b53"]]);
414
- function Se(t) {
413
+ }, Se = /* @__PURE__ */ Q($e, [["__scopeId", "data-v-f4157b53"]]);
414
+ function Be(t) {
415
415
  return t = t || /* @__PURE__ */ new Map(), {
416
416
  /**
417
417
  * A Map of event names to registered handler functions.
@@ -458,8 +458,8 @@ function Se(t) {
458
458
  }
459
459
  };
460
460
  }
461
- const V = Se(), u = {
462
- state: q({
461
+ const V = Be(), u = {
462
+ state: J({
463
463
  trees: {}
464
464
  }),
465
465
  getters: {
@@ -471,7 +471,7 @@ const V = Se(), u = {
471
471
  },
472
472
  // data - ноды, dataId - ID ноды родителя data
473
473
  getParentId(t, n, e, o = "id", i = "children", a = {}) {
474
- return e && t && (t.find((d) => d[o] === e ? (a.found = n, d) : u.getters.getParentId(d[i], d.id, e, o, i, a)), a.found) ? a.found : !1;
474
+ return e && t && (t.find((r) => r[o] === e ? (a.found = n, r) : u.getters.getParentId(r[i], r.id, e, o, i, a)), a.found) ? a.found : !1;
475
475
  }
476
476
  },
477
477
  mutations: {
@@ -520,8 +520,8 @@ const V = Se(), u = {
520
520
  },
521
521
  deepSearchByTitle(t, n, e = "title", o = "children", i = []) {
522
522
  if (n && t && (t.find((a) => {
523
- const d = new RegExp(n, "gi");
524
- a[e].toString().toLowerCase().match(d) !== null && i.push(a), u.actions.deepSearchByTitle(a[o], n, e, o, i);
523
+ const r = new RegExp(n, "gi");
524
+ a[e].toString().toLowerCase().match(r) !== null && i.push(a), u.actions.deepSearchByTitle(a[o], n, e, o, i);
525
525
  }), i)) {
526
526
  for (let a = 0; a < i.length; a++)
527
527
  ;
@@ -530,15 +530,15 @@ const V = Se(), u = {
530
530
  return i;
531
531
  },
532
532
  moveTreeNode(t, n, e, o, i, a) {
533
- const d = u.actions.deleteTreeNode(e, o);
534
- u.actions.insertTreeNode(e, i, d, a), V.emit(`move-${n}`, { fromTreeId: t, toTreeId: n, moved: d.id, target: i, position: a });
533
+ const r = u.actions.deleteTreeNode(e, o);
534
+ u.actions.insertTreeNode(e, i, r, a), V.emit(`move-${n}`, { fromTreeId: t, toTreeId: n, moved: r.id, target: i, position: a });
535
535
  },
536
536
  insertTreeNode(t, n, e, o) {
537
537
  if (t)
538
538
  for (let i = 0; i < t.length; i++) {
539
539
  if (t[i].id === n) {
540
- let d = i;
541
- return o === "after" ? (d++, t.splice(d, 0, e)) : o === "before" ? t.splice(d, 0, e) : o === "inside" && (Object.hasOwn(t[i], "children") || (t[i].children = [], t[i].opened = !0), t[i].children.splice(0, 0, e)), t[i];
540
+ let r = i;
541
+ return o === "after" ? (r++, t.splice(r, 0, e)) : o === "before" ? t.splice(r, 0, e) : o === "inside" && (Object.hasOwn(t[i], "children") || (t[i].children = [], t[i].opened = !0), t[i].children.splice(0, 0, e)), t[i];
542
542
  }
543
543
  const a = this.insertTreeNode(t[i].children, n, e, o);
544
544
  if (a)
@@ -558,32 +558,32 @@ const V = Se(), u = {
558
558
  }
559
559
  }
560
560
  }
561
- }, Be = {
561
+ }, Ne = {
562
562
  __name: "DDrop",
563
563
  props: {
564
564
  tag: { type: String, default: "div" }
565
565
  },
566
- emits: Object.keys(b),
566
+ emits: Object.keys(x),
567
567
  setup(t, { emit: n }) {
568
- let e = q({});
569
- const o = z("false"), i = z(null), a = /* @__PURE__ */ new Set(), d = f(() => o.value && e), l = (s, r) => {
570
- e = Z.data, n(s, r, e), s === b.dragenter && (a.size || r.target === i.value) && a.add(r.target), s === b.dragleave && a.delete(r.target), s === b.drop && a.clear(), o.value = !!a.size;
568
+ let e = J({});
569
+ const o = C("false"), i = C(null), a = /* @__PURE__ */ new Set(), r = p(() => o.value && e), l = (s, d) => {
570
+ e = Z.data, n(s, d, e), s === x.dragenter && (a.size || d.target === i.value) && a.add(d.target), s === x.dragleave && a.delete(d.target), s === x.drop && a.clear(), o.value = !!a.size;
571
571
  };
572
- return (s, r) => (p(), v(E(t.tag), {
572
+ return (s, d) => (f(), v(E(t.tag), {
573
573
  ref_key: "el",
574
574
  ref: i,
575
- onDragenter: r[0] || (r[0] = (c) => l(h(b).dragenter, c)),
576
- onDragleave: r[1] || (r[1] = (c) => l(h(b).dragleave, c)),
577
- onDragover: r[2] || (r[2] = H((c) => l(h(b).dragover, c), ["prevent"])),
578
- onDrop: r[3] || (r[3] = H((c) => l(h(b).drop, c), ["prevent"]))
575
+ onDragenter: d[0] || (d[0] = (c) => l(h(x).dragenter, c)),
576
+ onDragleave: d[1] || (d[1] = (c) => l(h(x).dragleave, c)),
577
+ onDragover: d[2] || (d[2] = z((c) => l(h(x).dragover, c), ["prevent"])),
578
+ onDrop: d[3] || (d[3] = z((c) => l(h(x).drop, c), ["prevent"]))
579
579
  }, {
580
580
  default: B(() => [
581
- y(s.$slots, "default", { transferData: d.value })
581
+ y(s.$slots, "default", { transferData: r.value })
582
582
  ]),
583
583
  _: 3
584
584
  }, 544));
585
585
  }
586
- }, Ne = {
586
+ }, we = {
587
587
  __name: "DTree",
588
588
  props: {
589
589
  items: Array,
@@ -617,42 +617,42 @@ const V = Se(), u = {
617
617
  }), V.on(`move-${o}`, (l) => {
618
618
  n("move", l);
619
619
  });
620
- const a = f(() => e.search ? u.actions.deepSearchByTitle(e.items, e.search) : e.items), d = (l = null) => {
620
+ const a = p(() => e.search ? u.actions.deepSearchByTitle(e.items, e.search) : e.items), r = (l = null) => {
621
621
  u.mutations.setItemSelect(o, l.model), u.actions.toggleItem(o, e.items, l.model.id);
622
622
  };
623
- return (l, s) => (p(), v(Be, {
623
+ return (l, s) => (f(), v(Ne, {
624
624
  class: "tree",
625
625
  tag: "ul",
626
- onDrop: H(i, ["stop"])
626
+ onDrop: z(i, ["stop"])
627
627
  }, {
628
628
  default: B(() => [
629
- (p(!0), x(G, null, ee(a.value, (r) => (p(), v($e, {
630
- key: r.id,
631
- model: r,
629
+ (f(!0), b(K, null, ee(a.value, (d) => (f(), v(Se, {
630
+ key: d.id,
631
+ model: d,
632
632
  treeId: h(o),
633
633
  items: e.items,
634
634
  search: e.search,
635
- onNodeclick: d
635
+ onNodeclick: r
636
636
  }, null, 8, ["model", "treeId", "items", "search"]))), 128))
637
637
  ]),
638
638
  _: 1
639
639
  }, 8, ["onDrop"]));
640
640
  }
641
641
  };
642
- const we = {
642
+ const Ie = {
643
643
  __name: "DAccordion",
644
644
  props: {
645
645
  items: Array
646
646
  },
647
647
  setup(t) {
648
648
  const n = t;
649
- return (e, o) => (p(), v(Ne, {
649
+ return (e, o) => (f(), v(we, {
650
650
  class: "accordion",
651
651
  items: n.items,
652
652
  "no-select": !0
653
653
  }, null, 8, ["items"]));
654
654
  }
655
- }, Pe = /* @__PURE__ */ J(we, [["__scopeId", "data-v-4c920528"]]), Ie = {
655
+ }, Oe = /* @__PURE__ */ Q(Ie, [["__scopeId", "data-v-4c920528"]]), ke = {
656
656
  __name: "DLayoutHeader",
657
657
  props: {
658
658
  fixed: {
@@ -686,18 +686,18 @@ const we = {
686
686
  useMinWidthLayout: Boolean
687
687
  },
688
688
  setup(t) {
689
- const n = t, e = f(() => {
690
- const { fixed: o, zIndex: i, minWidth: a, height: d, paddingLeft: l, transitionDuration: s, transitionTimingFunction: r } = n, c = o ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${a}px;` : "";
691
- return `position:${c};z-index:${i};${m}height:${d}px;padding-left:${l}px;transition-duration:${s}ms;transition-timing-function:${r};`;
689
+ const n = t, e = p(() => {
690
+ const { fixed: o, zIndex: i, minWidth: a, height: r, paddingLeft: l, transitionDuration: s, transitionTimingFunction: d } = n, c = o ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${a}px;` : "";
691
+ return `position:${c};z-index:${i};${m}height:${r}px;padding-left:${l}px;transition-duration:${s}ms;transition-timing-function:${d};`;
692
692
  });
693
- return (o, i) => (p(), x("header", {
693
+ return (o, i) => (f(), b("header", {
694
694
  class: "d-layout-header",
695
695
  style: L(e.value)
696
696
  }, [
697
697
  y(o.$slots, "default")
698
698
  ], 4));
699
699
  }
700
- }, ke = {
700
+ }, Le = {
701
701
  __name: "DLayoutTab",
702
702
  props: {
703
703
  fixed: {
@@ -735,18 +735,18 @@ const we = {
735
735
  useMinWidthLayout: Boolean
736
736
  },
737
737
  setup(t) {
738
- const n = t, e = f(() => {
739
- const { fixed: o, top: i, zIndex: a, minWidth: d, height: l, paddingLeft: s, transitionDuration: r, transitionTimingFunction: c } = n, m = o ? "fixed" : "static", $ = n.useMinWidthLayout ? `min-width: ${d}px;` : "";
740
- return `position:${m};top:${i}px;z-index:${a};${$}height:${l}px;padding-left:${s}px;transition-duration:${r}ms;transition-timing-function:${c};`;
738
+ const n = t, e = p(() => {
739
+ const { fixed: o, top: i, zIndex: a, minWidth: r, height: l, paddingLeft: s, transitionDuration: d, transitionTimingFunction: c } = n, m = o ? "fixed" : "static", $ = n.useMinWidthLayout ? `min-width: ${r}px;` : "";
740
+ return `position:${m};top:${i}px;z-index:${a};${$}height:${l}px;padding-left:${s}px;transition-duration:${d}ms;transition-timing-function:${c};`;
741
741
  });
742
- return (o, i) => (p(), x("div", {
742
+ return (o, i) => (f(), b("div", {
743
743
  class: "d-layout-tab",
744
744
  style: L(e.value)
745
745
  }, [
746
746
  y(o.$slots, "default")
747
747
  ], 4));
748
748
  }
749
- }, Le = {
749
+ }, We = {
750
750
  __name: "DLayoutFooter",
751
751
  props: {
752
752
  fixed: {
@@ -780,18 +780,18 @@ const we = {
780
780
  useMinWidthLayout: Boolean
781
781
  },
782
782
  setup(t) {
783
- const n = t, e = f(() => {
784
- const { fixed: o, zIndex: i, minWidth: a, height: d, paddingLeft: l, transitionDuration: s, transitionTimingFunction: r } = n, c = o ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${a}px;` : "";
785
- return `position:${c};z-index:${i};${m}height:${d}px;padding-left:${l}px;transition-duration:${s}ms;transition-timing-function:${r};`;
783
+ const n = t, e = p(() => {
784
+ const { fixed: o, zIndex: i, minWidth: a, height: r, paddingLeft: l, transitionDuration: s, transitionTimingFunction: d } = n, c = o ? "fixed" : "static", m = n.useMinWidthLayout ? `min-width:${a}px;` : "";
785
+ return `position:${c};z-index:${i};${m}height:${r}px;padding-left:${l}px;transition-duration:${s}ms;transition-timing-function:${d};`;
786
786
  });
787
- return (o, i) => (p(), x("footer", {
787
+ return (o, i) => (f(), b("footer", {
788
788
  class: "d-layout-footer",
789
789
  style: L(e.value)
790
790
  }, [
791
791
  y(o.$slots, "default")
792
792
  ], 4));
793
793
  }
794
- }, We = {
794
+ }, Ce = {
795
795
  __name: "DLayoutSidebar",
796
796
  props: {
797
797
  zIndex: {
@@ -820,18 +820,18 @@ const we = {
820
820
  }
821
821
  },
822
822
  setup(t) {
823
- const n = t, e = f(() => {
824
- const { zIndex: o, width: i, paddingTop: a, transitionDuration: d, transitionTimingFunction: l } = n;
825
- return `z-index:${o};width:${i}px;padding-top:${a}px;transition-duration:${d}ms;transition-timing-function:${l};`;
823
+ const n = t, e = p(() => {
824
+ const { zIndex: o, width: i, paddingTop: a, transitionDuration: r, transitionTimingFunction: l } = n;
825
+ return `z-index:${o};width:${i}px;padding-top:${a}px;transition-duration:${r}ms;transition-timing-function:${l};`;
826
826
  });
827
- return (o, i) => (p(), x("aside", {
827
+ return (o, i) => (f(), b("aside", {
828
828
  class: "d-layout-sidebar",
829
829
  style: L(e.value)
830
830
  }, [
831
831
  y(o.$slots, "default")
832
832
  ], 4));
833
833
  }
834
- }, Ce = {
834
+ }, ze = {
835
835
  __name: "DLayoutContent",
836
836
  props: {
837
837
  paddingTop: {
@@ -857,11 +857,11 @@ const we = {
857
857
  }
858
858
  },
859
859
  setup(t) {
860
- const n = t, e = f(() => {
861
- const { paddingTop: o, paddingBottom: i, paddingLeft: a, transitionDuration: d, transitionTimingFunction: l } = n, s = `overflow:${n.overflowHidden ? "hidden" : "visible"};`;
862
- return `padding-top:${o}px;padding-bottom:${i}px;padding-left:${a}px;${s}transition-duration:${d}ms;transition-timing-function:${l};`;
860
+ const n = t, e = p(() => {
861
+ const { paddingTop: o, paddingBottom: i, paddingLeft: a, transitionDuration: r, transitionTimingFunction: l } = n, s = `overflow:${n.overflowHidden ? "hidden" : "visible"};`;
862
+ return `padding-top:${o}px;padding-bottom:${i}px;padding-left:${a}px;${s}transition-duration:${r}ms;transition-timing-function:${l};`;
863
863
  });
864
- return (o, i) => (p(), x("main", {
864
+ return (o, i) => (f(), b("main", {
865
865
  style: L(e.value),
866
866
  class: "d-layout-content"
867
867
  }, [
@@ -869,8 +869,8 @@ const we = {
869
869
  ], 4));
870
870
  }
871
871
  };
872
- function ze(t) {
873
- const n = z(0), e = f(() => `transform: translateX(${-n.value}px);`);
872
+ function He(t) {
873
+ const n = C(0), e = p(() => `transform: translateX(${-n.value}px);`);
874
874
  let o = !1;
875
875
  function i(c) {
876
876
  n.value = c;
@@ -880,7 +880,7 @@ function ze(t) {
880
880
  const m = ((c = document.scrollingElement) === null || c === void 0 ? void 0 : c.scrollLeft) || 0;
881
881
  i(m);
882
882
  }
883
- function d() {
883
+ function r() {
884
884
  a();
885
885
  }
886
886
  function l() {
@@ -889,16 +889,16 @@ function ze(t) {
889
889
  function s() {
890
890
  o && document.removeEventListener("scroll", a);
891
891
  }
892
- function r() {
893
- d(), l(), o = !0;
892
+ function d() {
893
+ r(), l(), o = !0;
894
894
  }
895
895
  return le(t, (c) => {
896
- c ? r() : s();
896
+ c ? d() : s();
897
897
  }, { immediate: !0 }), ue(() => {
898
898
  s();
899
899
  }), e;
900
900
  }
901
- const He = 1001, Fe = 999, Me = 998, Oe = {
901
+ const Fe = 1001, Me = 999, Ee = 998, Re = {
902
902
  __name: "DLayoutAdmin",
903
903
  props: {
904
904
  mode: {
@@ -989,13 +989,13 @@ const He = 1001, Fe = 999, Me = 998, Oe = {
989
989
  },
990
990
  emits: ["update:sidebar-collapse"],
991
991
  setup(t, { emit: n }) {
992
- const e = t, o = f(() => e.useMinWidthLayout ? `min-width:${e.minWidth}px;` : ""), i = f(() => e.useMinWidthLayout && (e.fixedHeaderAndTab || e.fixedFooter)), a = ze(i), d = f(() => e.fixedHeaderAndTab ? a.value : ""), l = f(() => e.fixedFooter ? a.value : ""), s = f(() => {
992
+ const e = t, o = p(() => e.useMinWidthLayout ? `min-width:${e.minWidth}px;` : ""), i = p(() => e.useMinWidthLayout && (e.fixedHeaderAndTab || e.fixedFooter)), a = He(i), r = p(() => e.fixedHeaderAndTab ? a.value : ""), l = p(() => e.fixedFooter ? a.value : ""), s = p(() => {
993
993
  const { transitionDuration: g, transitionTimingFunction: A } = e;
994
994
  return {
995
995
  transitionDuration: g,
996
996
  transitionTimingFunction: A
997
997
  };
998
- }), r = f(() => e.mode === "vertical"), c = f(() => e.isMobile || r.value ? 1003 : 1e3), m = f({
998
+ }), d = p(() => e.mode === "vertical"), c = p(() => e.isMobile || d.value ? 1003 : 1e3), m = p({
999
999
  get() {
1000
1000
  return e.sidebarCollapse;
1001
1001
  },
@@ -1006,66 +1006,66 @@ const He = 1001, Fe = 999, Me = 998, Oe = {
1006
1006
  function $() {
1007
1007
  m.value = !0;
1008
1008
  }
1009
- const N = f(() => e.isMobile && !m.value), M = f(() => {
1009
+ const N = p(() => e.isMobile && !m.value), F = p(() => {
1010
1010
  const { transitionDuration: g, transitionTimingFunction: A } = e;
1011
1011
  return `background-color:${e.maskBg};transition-duration:${g}ms;transition-timing-function:${A};`;
1012
- }), Y = f(() => {
1012
+ }), Y = p(() => {
1013
1013
  const { sidebarWidth: g, sidebarCollapsedWidth: A } = e, te = e.isMobile ? 0 : A, ne = m.value ? te : g;
1014
1014
  return e.sidebarVisible ? ne : 0;
1015
- }), S = f(() => e.isMobile ? 0 : Y.value), D = f(() => r.value ? S.value : 0), _ = f(
1016
- () => !e.isMobile && !r.value && e.headerVisible ? e.headerHeight : 0
1017
- ), w = f(() => {
1015
+ }), S = p(() => e.isMobile ? 0 : Y.value), _ = p(() => d.value ? S.value : 0), T = p(
1016
+ () => !e.isMobile && !d.value && e.headerVisible ? e.headerHeight : 0
1017
+ ), w = p(() => {
1018
1018
  let g = 0;
1019
1019
  return e.fixedHeaderAndTab && (e.headerVisible && (g += e.headerHeight), e.tabVisible && (g += e.tabHeight)), g;
1020
- }), W = f(() => e.fixedFooter && e.footerVisible ? e.footerHeight : 0);
1021
- return (g, A) => (p(), x("div", {
1020
+ }), W = p(() => e.fixedFooter && e.footerVisible ? e.footerHeight : 0);
1021
+ return (g, A) => (f(), b("div", {
1022
1022
  class: "d-layout",
1023
1023
  style: L(o.value)
1024
1024
  }, [
1025
- t.headerVisible ? (p(), v(Ie, O({ key: 0 }, s.value, {
1025
+ t.headerVisible ? (f(), v(ke, O({ key: 0 }, s.value, {
1026
1026
  fixed: t.fixedHeaderAndTab,
1027
- "z-index": He,
1027
+ "z-index": Fe,
1028
1028
  "min-width": t.minWidth,
1029
1029
  height: t.headerHeight,
1030
- "padding-left": D.value,
1031
- style: d.value
1030
+ "padding-left": _.value,
1031
+ style: r.value
1032
1032
  }), {
1033
1033
  default: B(() => [
1034
1034
  y(g.$slots, "header")
1035
1035
  ]),
1036
1036
  _: 3
1037
- }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : T("", !0),
1038
- t.tabVisible ? (p(), v(ke, O({ key: 1 }, s.value, {
1037
+ }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : D("", !0),
1038
+ t.tabVisible ? (f(), v(Le, O({ key: 1 }, s.value, {
1039
1039
  fixed: t.fixedHeaderAndTab,
1040
- "z-index": Fe,
1040
+ "z-index": Me,
1041
1041
  "min-width": t.minWidth,
1042
1042
  top: t.headerHeight,
1043
1043
  height: t.tabHeight,
1044
1044
  "padding-left": S.value,
1045
- style: d.value
1045
+ style: r.value
1046
1046
  }), {
1047
1047
  default: B(() => [
1048
1048
  y(g.$slots, "tab")
1049
1049
  ]),
1050
1050
  _: 3
1051
- }, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : T("", !0),
1052
- t.sidebarVisible ? (p(), v(We, O({ key: 2 }, s.value, {
1051
+ }, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : D("", !0),
1052
+ t.sidebarVisible ? (f(), v(Ce, O({ key: 2 }, s.value, {
1053
1053
  "z-index": c.value,
1054
1054
  width: Y.value,
1055
- "padding-top": _.value
1055
+ "padding-top": T.value
1056
1056
  }), {
1057
1057
  default: B(() => [
1058
1058
  y(g.$slots, "sidebar")
1059
1059
  ]),
1060
1060
  _: 3
1061
- }, 16, ["z-index", "width", "padding-top"])) : T("", !0),
1062
- N.value ? (p(), x("div", {
1061
+ }, 16, ["z-index", "width", "padding-top"])) : D("", !0),
1062
+ N.value ? (f(), b("div", {
1063
1063
  key: 3,
1064
1064
  class: "d-layout-sidebar-mask",
1065
- style: L(M.value),
1065
+ style: L(F.value),
1066
1066
  onClick: $
1067
- }, null, 4)) : T("", !0),
1068
- K(Ce, O(s.value, {
1067
+ }, null, 4)) : D("", !0),
1068
+ q(ze, O(s.value, {
1069
1069
  "padding-top": w.value,
1070
1070
  "padding-bottom": W.value,
1071
1071
  "padding-left": S.value,
@@ -1076,9 +1076,9 @@ const He = 1001, Fe = 999, Me = 998, Oe = {
1076
1076
  ]),
1077
1077
  _: 3
1078
1078
  }, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
1079
- t.footerVisible ? (p(), v(Le, O({ key: 4 }, s.value, {
1079
+ t.footerVisible ? (f(), v(We, O({ key: 4 }, s.value, {
1080
1080
  fixed: t.fixedFooter,
1081
- "z-index": Me,
1081
+ "z-index": Ee,
1082
1082
  "min-width": t.minWidth,
1083
1083
  height: t.footerHeight,
1084
1084
  "padding-left": S.value,
@@ -1088,11 +1088,11 @@ const He = 1001, Fe = 999, Me = 998, Oe = {
1088
1088
  y(g.$slots, "footer")
1089
1089
  ]),
1090
1090
  _: 3
1091
- }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : T("", !0)
1091
+ }, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : D("", !0)
1092
1092
  ], 4));
1093
1093
  }
1094
1094
  }, P = {
1095
- state: q({
1095
+ state: J({
1096
1096
  theme: "dark"
1097
1097
  }),
1098
1098
  getters: {
@@ -1110,7 +1110,7 @@ const He = 1001, Fe = 999, Me = 998, Oe = {
1110
1110
  P.state.theme = P.state.theme === "dark" ? "light" : "dark", document.documentElement.setAttribute("class", P.state.theme);
1111
1111
  }
1112
1112
  }
1113
- }, Re = {
1113
+ }, Ye = {
1114
1114
  __name: "DConfigProvider",
1115
1115
  props: {
1116
1116
  theme: {
@@ -1124,25 +1124,25 @@ const He = 1001, Fe = 999, Me = 998, Oe = {
1124
1124
  }
1125
1125
  };
1126
1126
  export {
1127
- Pe as DAccordion,
1128
- ge as DBadge,
1129
- Ve as DButton,
1130
- he as DCollapse,
1131
- Re as DConfigProvider,
1127
+ Oe as DAccordion,
1128
+ he as DBadge,
1129
+ Ae as DButton,
1130
+ ye as DCollapse,
1131
+ Ye as DConfigProvider,
1132
1132
  P as DGlobalStore,
1133
1133
  R as DIcon,
1134
- F as DIconStore,
1135
- Ae as DInput,
1136
- Oe as DLayoutAdmin,
1137
- Ce as DLayoutContent,
1138
- Le as DLayoutFooter,
1139
- Ie as DLayoutHeader,
1140
- We as DLayoutSidebar,
1141
- ke as DLayoutTab,
1134
+ H as DIconStore,
1135
+ Pe as DInput,
1136
+ Re as DLayoutAdmin,
1137
+ ze as DLayoutContent,
1138
+ We as DLayoutFooter,
1139
+ ke as DLayoutHeader,
1140
+ Ce as DLayoutSidebar,
1141
+ Le as DLayoutTab,
1142
1142
  Z as DTransferStore,
1143
- Ne as DTree,
1144
- $e as DTreeItem,
1143
+ we as DTree,
1144
+ Se as DTreeItem,
1145
1145
  u as DTreeStore,
1146
1146
  V as emitter,
1147
- Se as eventsBus
1147
+ Be as eventsBus
1148
1148
  };
@@ -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 me="",pe="",ue="",ge="",w={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String},setup(o){const n=o,t=e.useSlots(),i=e.computed(()=>{const{color:d}=n;return d===void 0?null:d}),r=e.computed(()=>{const d=n.size??null;if(d!==void 0)return typeof d=="number"||/^\d+$/.test(d)?`${d}px`:d}),s=e.h("i",{class:"icon",style:{color:i.value,fontSize:r.value}},n.component?e.h(n.component):t);return(d,c)=>(e.openBlock(),e.createBlock(e.unref(s)))}},X={__name:"DButton",props:{class:String,icon:Object},emits:["click"],setup(o,{emit:n}){const t=o;let i=null;t.icon&&(i=e.h(w,{component:t.icon,color:"inherit"}));const r=s=>{n("click",s)};return(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:r,class:e.normalizeClass(["button",t.class])},[e.renderSlot(s.$slots,"default")],2)),e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:r,class:e.normalizeClass(["button button-ext",t.class])},[e.createVNode(e.unref(i)),e.createElementVNode("div",null,[e.renderSlot(s.$slots,"default")])],2)):e.createCommentVNode("",!0)],64))}},he="",E=(o,n)=>{const t=o.__vccOpts||o;for(const[i,r]of n)t[i]=r;return t},G={class:"d-input"},U={class:"label"},q=["placeholder"],J=E({__name:"DInput",props:{label:String,placeholder:String,size:String,font:String,modelValue:String},emits:["update:modelValue"],setup(o,{emit:n}){const t=o,i=e.computed(()=>t.font==="small"?"d-input-small":t.font==="big"?"d-input-big":""),r=e.computed({get:()=>t.modelValue,set:s=>{n("update:modelValue",s)}});return(s,d)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",U,e.toDisplayString(t.label),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=c=>r.value=c),type:"text",class:e.normalizeClass(i.value),placeholder:t.placeholder,style:e.normalizeStyle(t.size==="wide"?"width:100%":"")},null,14,q),[[e.vModelText,r.value]])]))}},[["__scopeId","data-v-11679fd8"]]),S={state:{},getters:{getIcon(o){return S.state[o]},getIcons(){return S.state}},mutations:{addIcon(o,n){S.state.name=n},addIcons(o){for(const n in o)o.hasOwnProperty(n)&&(S.state[n]=o[n])}}},W={__name:"DBadge",props:{class:String},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",n.class])},[e.renderSlot(t.$slots,"default")],2))}},D="0px",M={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(o){const n=o,t=a=>({height:a.style.height,width:a.style.width,position:a.style.position,visibility:a.style.visibility,overflow:a.style.overflow,paddingTop:a.style.paddingTop,paddingBottom:a.style.paddingBottom,borderTopWidth:a.style.borderTopWidth,borderBottomWidth:a.style.borderBottomWidth,marginTop:a.style.marginTop,marginBottom:a.style.marginBottom}),i=(a,l)=>{const{width:m}=getComputedStyle(a);a.style.width=m,a.style.position="absolute",a.style.visibility="hidden",a.style.height="";let{height:u}=getComputedStyle(a);return a.style.width=l.width,a.style.position=l.position,a.style.visibility=l.visibility,a.style.height=D,a.style.overflow="hidden",l.height&&l.height!==D?l.height:u},r=(a,l,m,u,B)=>{const _=a.animate(u,B);a.style.height=l.height,_.onfinish=()=>{a.style.overflow=l.overflow,m()}},s=(a,l)=>[{height:D,opacity:n.opacityClosed,paddingTop:D,paddingBottom:D,borderTopWidth:D,borderBottomWidth:D,marginTop:D,marginBottom:D},{height:a,opacity:n.opacityOpened,paddingTop:l.paddingTop,paddingBottom:l.paddingBottom,borderTopWidth:l.borderTopWidth,borderBottomWidth:l.borderBottomWidth,marginTop:l.marginTop,marginBottom:l.marginBottom}],d=(a,l)=>{const m=a,u=t(m),B=i(m,u),_=s(B,u),C={duration:n.duration,easing:n.easingEnter};r(m,u,l,_,C)},c=(a,l)=>{const m=a,u=t(m),{height:B}=getComputedStyle(m);m.style.height=B,m.style.overflow="hidden";const _=s(B,u).reverse(),C={duration:n.duration,easing:n.easingLeave};r(m,u,l,_,C)};return(a,l)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:d,onLeave:c},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},L={data:void 0},V=o=>o.reduce((n,t)=>(n[t]=t)&&n,{}),h=V(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),K=V(["copy","move","link","none"]),Q=V(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),j={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:o=>o in K},effectAllowed:{validator:o=>o in Q},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(o){const n=o,t=e.useSlots(),i=e.ref(!1),r=e.computed(()=>i&&n.transferData),s=e.computed(()=>({position:"fixed",top:"-1000px"})),d=(c,a)=>{const l=a.dataTransfer;if([h.dragenter,h.dragover].includes(c)&&n.dropEffect&&(l.dropEffect=n.dropEffect),c===h.dragstart){if(n.effectAllowed&&(l.effectAllowed=n.effectAllowed),n.image||t.image){let m;n.image?(m=new Image,m.src=n.image):t.image&&(m=t.image[0].elm),l.setDragImage&&l.setDragImage(m,n.imageXOffset,n.imageYOffset)}n.transferData!==void 0&&(L.data=n.transferData,a.dataTransfer.setData("text","")),i.value=!0}};return(c,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{draggable:n.draggable,onDrag:a[0]||(a[0]=l=>d(e.unref(h).drag,l)),onDragstart:a[1]||(a[1]=e.withModifiers(l=>d(e.unref(h).dragstart,l),["stop"])),onDragenter:a[2]||(a[2]=l=>d(e.unref(h).dragenter,l)),onDragleave:a[3]||(a[3]=l=>d(e.unref(h).dragleave,l)),onDragend:a[4]||(a[4]=l=>d(e.unref(h).dragend,l))},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{transferData:r.value}),o.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(s.value)},[e.renderSlot(c.$slots,"image",{transferData:r.value})],4)):e.renderSlot(c.$slots,"image",{key:1,transferData:r.value})]),_:3},40,["draggable"]))}},be="",v={class:"item-title"},ee={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},te={key:0,class:"sub-menu"},F=E({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array,search:String},emits:["nodedrop","nodedragover","nodedragleave","nodeclick"],setup(o,{emit:n}){const t=o,i=e.ref(null),r=e.ref(!1),s=e.ref(!1),d=e.ref(!1),c=e.computed(()=>t.model.children&&t.model.children.length),a=e.computed(()=>(f.actions.isTreeExpanded(t.treeId)&&(t.model.expanded=t.model.expanded===void 0?!0:t.model.expanded),t.model.expanded)),l=k=>{n("nodeclick",{event:k,model:t.model})},m=k=>{n("nodeclick",k)},u=e.computed(()=>(f.actions.isItemSelected(t.treeId,t.model.id)?"selected":"")+(r.value?"node-over ":"")+(s.value?"node-top ":"")+(d.value?"node-bottom ":"")),B=e.computed(()=>t.search?!1:t.model.draggable===!0),_=k=>{let y=L.data;if(y.model.id===t.model.id||f.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||f.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return r.value=!1,s.value=!1,d.value=!1,!1;if(!f.state.trees[t.treeId].transfer&&y.id!==t.treeId)return!1;let b="";s.value?b="before":d.value?b="after":b="inside",f.actions.moveTreeNode(y.id,t.treeId,t.items,y.model.id,t.model.id,b),r.value=!1,s.value=!1,d.value=!1},C=k=>{let y=L.data;if(y.model.id===t.model.id||f.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||f.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return!1;const b=k.y,T=i.value.getBoundingClientRect().top,$=i.value.getBoundingClientRect().height,g=$/3;b>T&&b<=T+g?(r.value=!1,s.value=!0,d.value=!1):b<T+$&&b>=T+$-g?(r.value=!1,s.value=!1,d.value=!0):(r.value=!0,s.value=!1,d.value=!1)},z=()=>{r.value=!1,s.value=!1,d.value=!1};return(k,y)=>{const b=e.resolveComponent("d-tree-item",!0);return e.openBlock(),e.createBlock(j,{tag:"li",class:"tree-item","transfer-data":{id:t.treeId,model:t.model},draggable:B.value,onDrop:e.withModifiers(_,["stop"]),onDragenter:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(C,["prevent","stop"]),onDragleave:e.withModifiers(z,["prevent"])},{default:e.withCtx(()=>{var T,$;return[e.createElementVNode("div",{ref_key:"node",ref:i,class:e.normalizeClass(u.value),onClick:l},[e.createElementVNode("div",null,[t.model.icons&&t.model.icons.pre&&c.value&&!t.search?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:0,component:e.unref(S).getters.getIcon(t.model.icons.pre.component),size:18,color:t.model.icons.pre.color?t.model.icons.pre.color:"inherit",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.pre&&!c.value&&!t.search?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(S).getters.getIcon(t.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:2,component:e.unref(S).getters.getIcon(t.model.icons.icon.component),color:t.model.icons.icon.color?t.model.icons.icon.color:"inherit"},null,8,["component","color"])):e.createCommentVNode("",!0),e.createElementVNode("div",v,[e.createElementVNode("div",null,e.toDisplayString(e.unref(f).actions.renderTitle(t.treeId,t.model.title)),1)])]),e.createElementVNode("div",ee,[((T=t.model.badge)==null?void 0:T.value)!==void 0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(W),{key:0,class:e.normalizeClass([($=t.model.badge)==null?void 0:$.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.post&&c.value&&!t.search?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(S).getters.getIcon(t.model.icons.post.component),size:20,color:t.model.icons.post.color?t.model.icons.post.color:"inherit",class:e.normalizeClass(a.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],2),e.createVNode(M,null,{default:e.withCtx(()=>[c.value&&a.value&&!t.search?(e.openBlock(),e.createElementBlock("ul",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model.children,g=>(e.openBlock(),e.createBlock(b,{class:"tree-item",key:g.id,model:g,treeId:t.treeId,items:t.items,search:t.search,onNodeclick:m},null,8,["model","treeId","items","search"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])}}},[["__scopeId","data-v-f4157b53"]]);function H(o){return o=o||new Map,{all:o,on(n,t){const i=o.get(n);i?i.push(t):o.set(n,[t])},off(n,t){const i=o.get(n);i&&(t?i.splice(i.indexOf(t)>>>0,1):o.set(n,[]))},emit(n,t){let i=o.get(n);i&&i.slice().map(r=>{r(t)}),i=o.get("*"),i&&i.slice().map(r=>{r(n,t)})}}}const x=H(),f={state:e.reactive({trees:{}}),getters:{getItems(o){return f.state.trees[o].items},getItemsSelect(o){return f.state.trees[o].selected},getParentId(o,n,t,i="id",r="children",s={}){return t&&o&&(o.find(d=>d[i]===t?(s.found=n,d):f.getters.getParentId(d[r],d.id,t,i,r,s)),s.found)?s.found:!1}},mutations:{setTreeItems(o,n){f.state.trees[o].items=n},setItemSelect(o,n){f.state.trees[o].noSelect||(f.state.trees[o].multiSelect?f.state.trees[o].selected.includes(n.id)?f.state.trees[o].selected=f.state.trees[o].selected.filter(function(t){return t!==n.id}):f.state.trees[o].selected=[...f.state.trees[o].selected,n.id]:f.state.trees[o].selected=[n.id])}},actions:{initTreeStore(o,n,t,i,r,s){f.state.trees[o]=[],f.state.trees[o].selected=[],f.state.trees[o].noSelect=n,f.state.trees[o].multiSelect=t,f.state.trees[o].expanded=i,f.state.trees[o].transfer=r,f.state.trees[o].renderTitle=s},renderTitle(o,n){return f.state.trees[o].renderTitle?f.state.trees[o].renderTitle(n):n},isItemSelected(o,n){return f.state.trees[o].selected.includes(n)},toggleItem(o,n,t){const i=f.actions.deepSearch(n,t);i.expanded=i.expanded===void 0||!i.expanded,i.children&&i.children.length&&(i.expanded?x.emit(`expand-${o}`,{id:o,model:i}):x.emit(`collapse-${o}`,{id:o,model:i}))},isTreeExpanded(o){return f.state.trees[o].expanded},isChildOfParent(o,n,t,i){const r=f.actions.deepSearch(n,t);if(r&&r.children){for(let s=0;s<r.children.length;s++)if(r.children[s].id===i)return!0}return!1},isParentOfChild(o,n,t,i){const r=f.actions.deepSearch(n,t);return!!(r&&r.children&&f.actions.deepSearch(r.children,i))},deepSearch(o,n,t="id",i="children",r={}){return n&&o&&(o.find(s=>s[t]===n?(r.found=s,s):f.actions.deepSearch(s[i],n,t,i,r)),r.found)?r.found:!1},deepSearchByTitle(o,n,t="title",i="children",r=[]){if(n&&o&&(o.find(s=>{const d=new RegExp(n,"gi");s[t].toString().toLowerCase().match(d)!==null&&r.push(s),f.actions.deepSearchByTitle(s[i],n,t,i,r)}),r)){for(let s=0;s<r.length;s++);return r}return r},moveTreeNode(o,n,t,i,r,s){const d=f.actions.deleteTreeNode(t,i);f.actions.insertTreeNode(t,r,d,s),x.emit(`move-${n}`,{fromTreeId:o,toTreeId:n,moved:d.id,target:r,position:s})},insertTreeNode(o,n,t,i){if(o)for(let r=0;r<o.length;r++){if(o[r].id===n){let d=r;return i==="after"?(d++,o.splice(d,0,t)):i==="before"?o.splice(d,0,t):i==="inside"&&(Object.hasOwn(o[r],"children")||(o[r].children=[],o[r].opened=!0),o[r].children.splice(0,0,t)),o[r]}const s=this.insertTreeNode(o[r].children,n,t,i);if(s)return s}},deleteTreeNode(o,n){if(o)for(let t=0;t<o.length;t++){if(o[t].id===n){const r=o[t];return o.splice(t,1),r}const i=f.actions.deleteTreeNode(o[t].children,n);if(i)return i}}}},oe={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(h),setup(o,{emit:n}){let t=e.reactive({});const i=e.ref("false"),r=e.ref(null),s=new Set,d=e.computed(()=>i.value&&t),c=(a,l)=>{t=L.data,n(a,l,t),a===h.dragenter&&(s.size||l.target===r.value)&&s.add(l.target),a===h.dragleave&&s.delete(l.target),a===h.drop&&s.clear(),i.value=!!s.size};return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"el",ref:r,onDragenter:l[0]||(l[0]=m=>c(e.unref(h).dragenter,m)),onDragleave:l[1]||(l[1]=m=>c(e.unref(h).dragleave,m)),onDragover:l[2]||(l[2]=e.withModifiers(m=>c(e.unref(h).dragover,m),["prevent"])),onDrop:l[3]||(l[3]=e.withModifiers(m=>c(e.unref(h).drop,m),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{transferData:d.value})]),_:3},544))}},P={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean,renderTitle:Function,search:String},emits:["select","collapse","expand","move"],setup(o,{emit:n}){const t=o,i=e.getCurrentInstance().uid;f.actions.initTreeStore(i,t.noSelect,t.multiSelect,t.expanded,t.transfer,t.renderTitle);const r=(c,a)=>{console.log(c,a)};x.on(`select-${i}`,c=>{n("select",c)}),x.on(`expand-${i}`,c=>{n("expand",c)}),x.on(`collapse-${i}`,c=>{n("collapse",c)}),x.on(`move-${i}`,c=>{n("move",c)});const s=e.computed(()=>t.search?f.actions.deepSearchByTitle(t.items,t.search):t.items),d=(c=null)=>{f.mutations.setItemSelect(i,c.model),f.actions.toggleItem(i,t.items,c.model.id)};return(c,a)=>(e.openBlock(),e.createBlock(oe,{class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createBlock(F,{key:l.id,model:l,treeId:e.unref(i),items:t.items,search:t.search,onNodeclick:d},null,8,["model","treeId","items","search"]))),128))]),_:1},8,["onDrop"]))}},ke="",ne=E({__name:"DAccordion",props:{items:Array},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createBlock(P,{class:"accordion",items:n.items,"no-select":!0},null,8,["items"]))}},[["__scopeId","data-v-4c920528"]]),A={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:s,height:d,paddingLeft:c,transitionDuration:a,transitionTimingFunction:l}=n,m=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${s}px;`:"";return`position:${m};z-index:${r};${u}height:${d}px;padding-left:${c}px;transition-duration:${a}ms;transition-timing-function:${l};`});return(i,r)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},O={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,top:r,zIndex:s,minWidth:d,height:c,paddingLeft:a,transitionDuration:l,transitionTimingFunction:m}=n,u=i?"fixed":"static",B=n.useMinWidthLayout?`min-width: ${d}px;`:"";return`position:${u};top:${r}px;z-index:${s};${B}height:${c}px;padding-left:${a}px;transition-duration:${l}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},R={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:s,height:d,paddingLeft:c,transitionDuration:a,transitionTimingFunction:l}=n,m=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${s}px;`:"";return`position:${m};z-index:${r};${u}height:${d}px;padding-left:${c}px;transition-duration:${a}ms;transition-timing-function:${l};`});return(i,r)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Y={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(o){const n=o,t=e.computed(()=>{const{zIndex:i,width:r,paddingTop:s,transitionDuration:d,transitionTimingFunction:c}=n;return`z-index:${i};width:${r}px;padding-top:${s}px;transition-duration:${d}ms;transition-timing-function:${c};`});return(i,r)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Z={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(o){const n=o,t=e.computed(()=>{const{paddingTop:i,paddingBottom:r,paddingLeft:s,transitionDuration:d,transitionTimingFunction:c}=n,a=`overflow:${n.overflowHidden?"hidden":"visible"};`;return`padding-top:${i}px;padding-bottom:${r}px;padding-left:${s}px;${a}transition-duration:${d}ms;transition-timing-function:${c};`});return(i,r)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(t.value),class:"d-layout-content"},[e.renderSlot(i.$slots,"default")],4))}};function ie(o){const n=e.ref(0),t=e.computed(()=>`transform: translateX(${-n.value}px);`);let i=!1;function r(m){n.value=m}function s(){var m;const u=((m=document.scrollingElement)===null||m===void 0?void 0:m.scrollLeft)||0;r(u)}function d(){s()}function c(){document.addEventListener("scroll",s)}function a(){i&&document.removeEventListener("scroll",s)}function l(){d(),c(),i=!0}return e.watch(o,m=>{m?l():a()},{immediate:!0}),e.onUnmounted(()=>{a()}),t}const re=1001,ae=999,se=998,le={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse"],setup(o,{emit:n}){const t=o,i=e.computed(()=>t.useMinWidthLayout?`min-width:${t.minWidth}px;`:""),r=e.computed(()=>t.useMinWidthLayout&&(t.fixedHeaderAndTab||t.fixedFooter)),s=ie(r),d=e.computed(()=>t.fixedHeaderAndTab?s.value:""),c=e.computed(()=>t.fixedFooter?s.value:""),a=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return{transitionDuration:g,transitionTimingFunction:I}}),l=e.computed(()=>t.mode==="vertical"),m=e.computed(()=>t.isMobile||l.value?1003:1e3),u=e.computed({get(){return t.sidebarCollapse},set(g){n("update:sidebar-collapse",g)}});function B(){u.value=!0}const _=e.computed(()=>t.isMobile&&!u.value),C=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return`background-color:${t.maskBg};transition-duration:${g}ms;transition-timing-function:${I};`}),z=e.computed(()=>{const{sidebarWidth:g,sidebarCollapsedWidth:I}=t,ce=t.isMobile?0:I,fe=u.value?ce:g;return t.sidebarVisible?fe:0}),k=e.computed(()=>t.isMobile?0:z.value),y=e.computed(()=>l.value?k.value:0),b=e.computed(()=>!t.isMobile&&!l.value&&t.headerVisible?t.headerHeight:0),T=e.computed(()=>{let g=0;return t.fixedHeaderAndTab&&(t.headerVisible&&(g+=t.headerHeight),t.tabVisible&&(g+=t.tabHeight)),g}),$=e.computed(()=>t.fixedFooter&&t.footerVisible?t.footerHeight:0);return(g,I)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(i.value)},[o.headerVisible?(e.openBlock(),e.createBlock(A,e.mergeProps({key:0},a.value,{fixed:o.fixedHeaderAndTab,"z-index":re,"min-width":o.minWidth,height:o.headerHeight,"padding-left":y.value,style:d.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),o.tabVisible?(e.openBlock(),e.createBlock(O,e.mergeProps({key:1},a.value,{fixed:o.fixedHeaderAndTab,"z-index":ae,"min-width":o.minWidth,top:o.headerHeight,height:o.tabHeight,"padding-left":k.value,style:d.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),o.sidebarVisible?(e.openBlock(),e.createBlock(Y,e.mergeProps({key:2},a.value,{"z-index":m.value,width:z.value,"padding-top":b.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(C.value),onClick:B},null,4)):e.createCommentVNode("",!0),e.createVNode(Z,e.mergeProps(a.value,{"padding-top":T.value,"padding-bottom":$.value,"padding-left":k.value,"overflow-hidden":o.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),o.footerVisible?(e.openBlock(),e.createBlock(R,e.mergeProps({key:4},a.value,{fixed:o.fixedFooter,"z-index":se,"min-width":o.minWidth,height:o.footerHeight,"padding-left":k.value,style:c.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},N={state:e.reactive({theme:"dark"}),getters:{theme(){return N.state.theme}},mutations:{setTheme(o){N.state.theme=o,document.documentElement.setAttribute("class",o)}},actions:{toggleTheme(){N.state.theme=N.state.theme==="dark"?"light":"dark",document.documentElement.setAttribute("class",N.state.theme)}}},de={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(o){const n=o;return N.mutations.setTheme(n.theme),(t,i)=>e.renderSlot(t.$slots,"default")}};p.DAccordion=ne,p.DBadge=W,p.DButton=X,p.DCollapse=M,p.DConfigProvider=de,p.DGlobalStore=N,p.DIcon=w,p.DIconStore=S,p.DInput=J,p.DLayoutAdmin=le,p.DLayoutContent=Z,p.DLayoutFooter=R,p.DLayoutHeader=A,p.DLayoutSidebar=Y,p.DLayoutTab=O,p.DTransferStore=L,p.DTree=P,p.DTreeItem=F,p.DTreeStore=f,p.emitter=x,p.eventsBus=H,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
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 pe="",ue="",ge="",he="",w={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String},setup(o){const n=o,t=e.useSlots(),i=e.computed(()=>{const{color:l}=n;return l===void 0?null:l}),r=e.computed(()=>{const l=n.size??null;if(l!==void 0)return typeof l=="number"||/^\d+$/.test(l)?`${l}px`:l}),s=e.h("i",{class:"icon",style:{color:i.value,fontSize:r.value}},n.component?e.h(n.component):t);return(l,c)=>(e.openBlock(),e.createBlock(e.unref(s)))}},X={key:0},G={__name:"DButton",props:{class:String,icon:Object},emits:["click"],setup(o,{emit:n}){const t=o,i=e.useSlots();let r=null;t.icon&&(r=e.h(w,{component:t.icon,color:"inherit"}));const s=l=>{n("click",l)};return(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:s,class:e.normalizeClass(["button",t.class])},[e.renderSlot(l.$slots,"default")],2)),e.unref(r)?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:s,class:e.normalizeClass(["button button-ext",t.class])},[e.createVNode(e.unref(r)),e.unref(i).default?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(l.$slots,"default")])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],64))}},ye="",E=(o,n)=>{const t=o.__vccOpts||o;for(const[i,r]of n)t[i]=r;return t},U={class:"d-input"},q={class:"label"},J=["placeholder"],K=E({__name:"DInput",props:{label:String,placeholder:String,size:String,font:String,modelValue:String},emits:["update:modelValue"],setup(o,{emit:n}){const t=o,i=e.computed(()=>t.font==="small"?"d-input-small":t.font==="big"?"d-input-big":""),r=e.computed({get:()=>t.modelValue,set:s=>{n("update:modelValue",s)}});return(s,l)=>(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",q,e.toDisplayString(t.label),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),type:"text",class:e.normalizeClass(i.value),placeholder:t.placeholder,style:e.normalizeStyle(t.size==="wide"?"width:100%":"")},null,14,J),[[e.vModelText,r.value]])]))}},[["__scopeId","data-v-11679fd8"]]),S={state:{},getters:{getIcon(o){return S.state[o]},getIcons(){return S.state}},mutations:{addIcon(o,n){S.state.name=n},addIcons(o){for(const n in o)o.hasOwnProperty(n)&&(S.state[n]=o[n])}}},W={__name:"DBadge",props:{class:String},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",n.class])},[e.renderSlot(t.$slots,"default")],2))}},D="0px",M={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(o){const n=o,t=a=>({height:a.style.height,width:a.style.width,position:a.style.position,visibility:a.style.visibility,overflow:a.style.overflow,paddingTop:a.style.paddingTop,paddingBottom:a.style.paddingBottom,borderTopWidth:a.style.borderTopWidth,borderBottomWidth:a.style.borderBottomWidth,marginTop:a.style.marginTop,marginBottom:a.style.marginBottom}),i=(a,d)=>{const{width:m}=getComputedStyle(a);a.style.width=m,a.style.position="absolute",a.style.visibility="hidden",a.style.height="";let{height:u}=getComputedStyle(a);return a.style.width=d.width,a.style.position=d.position,a.style.visibility=d.visibility,a.style.height=D,a.style.overflow="hidden",d.height&&d.height!==D?d.height:u},r=(a,d,m,u,B)=>{const _=a.animate(u,B);a.style.height=d.height,_.onfinish=()=>{a.style.overflow=d.overflow,m()}},s=(a,d)=>[{height:D,opacity:n.opacityClosed,paddingTop:D,paddingBottom:D,borderTopWidth:D,borderBottomWidth:D,marginTop:D,marginBottom:D},{height:a,opacity:n.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}],l=(a,d)=>{const m=a,u=t(m),B=i(m,u),_=s(B,u),C={duration:n.duration,easing:n.easingEnter};r(m,u,d,_,C)},c=(a,d)=>{const m=a,u=t(m),{height:B}=getComputedStyle(m);m.style.height=B,m.style.overflow="hidden";const _=s(B,u).reverse(),C={duration:n.duration,easing:n.easingLeave};r(m,u,d,_,C)};return(a,d)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:l,onLeave:c},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},L={data:void 0},V=o=>o.reduce((n,t)=>(n[t]=t)&&n,{}),h=V(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),Q=V(["copy","move","link","none"]),j=V(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),v={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:o=>o in Q},effectAllowed:{validator:o=>o in j},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(o){const n=o,t=e.useSlots(),i=e.ref(!1),r=e.computed(()=>i&&n.transferData),s=e.computed(()=>({position:"fixed",top:"-1000px"})),l=(c,a)=>{const d=a.dataTransfer;if([h.dragenter,h.dragover].includes(c)&&n.dropEffect&&(d.dropEffect=n.dropEffect),c===h.dragstart){if(n.effectAllowed&&(d.effectAllowed=n.effectAllowed),n.image||t.image){let m;n.image?(m=new Image,m.src=n.image):t.image&&(m=t.image[0].elm),d.setDragImage&&d.setDragImage(m,n.imageXOffset,n.imageYOffset)}n.transferData!==void 0&&(L.data=n.transferData,a.dataTransfer.setData("text","")),i.value=!0}};return(c,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{draggable:n.draggable,onDrag:a[0]||(a[0]=d=>l(e.unref(h).drag,d)),onDragstart:a[1]||(a[1]=e.withModifiers(d=>l(e.unref(h).dragstart,d),["stop"])),onDragenter:a[2]||(a[2]=d=>l(e.unref(h).dragenter,d)),onDragleave:a[3]||(a[3]=d=>l(e.unref(h).dragleave,d)),onDragend:a[4]||(a[4]=d=>l(e.unref(h).dragend,d))},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{transferData:r.value}),o.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(s.value)},[e.renderSlot(c.$slots,"image",{transferData:r.value})],4)):e.renderSlot(c.$slots,"image",{key:1,transferData:r.value})]),_:3},40,["draggable"]))}},Be="",ee={class:"item-title"},te={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},oe={key:0,class:"sub-menu"},F=E({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array,search:String},emits:["nodedrop","nodedragover","nodedragleave","nodeclick"],setup(o,{emit:n}){const t=o,i=e.ref(null),r=e.ref(!1),s=e.ref(!1),l=e.ref(!1),c=e.computed(()=>t.model.children&&t.model.children.length),a=e.computed(()=>(f.actions.isTreeExpanded(t.treeId)&&(t.model.expanded=t.model.expanded===void 0?!0:t.model.expanded),t.model.expanded)),d=k=>{n("nodeclick",{event:k,model:t.model})},m=k=>{n("nodeclick",k)},u=e.computed(()=>(f.actions.isItemSelected(t.treeId,t.model.id)?"selected":"")+(r.value?"node-over ":"")+(s.value?"node-top ":"")+(l.value?"node-bottom ":"")),B=e.computed(()=>t.search?!1:t.model.draggable===!0),_=k=>{let y=L.data;if(y.model.id===t.model.id||f.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||f.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return r.value=!1,s.value=!1,l.value=!1,!1;if(!f.state.trees[t.treeId].transfer&&y.id!==t.treeId)return!1;let b="";s.value?b="before":l.value?b="after":b="inside",f.actions.moveTreeNode(y.id,t.treeId,t.items,y.model.id,t.model.id,b),r.value=!1,s.value=!1,l.value=!1},C=k=>{let y=L.data;if(y.model.id===t.model.id||f.actions.isChildOfParent(t.treeId,t.items,t.model.id,y.model.id)||f.actions.isParentOfChild(t.treeId,t.items,y.model.id,t.model.id))return!1;const b=k.y,T=i.value.getBoundingClientRect().top,$=i.value.getBoundingClientRect().height,g=$/3;b>T&&b<=T+g?(r.value=!1,s.value=!0,l.value=!1):b<T+$&&b>=T+$-g?(r.value=!1,s.value=!1,l.value=!0):(r.value=!0,s.value=!1,l.value=!1)},z=()=>{r.value=!1,s.value=!1,l.value=!1};return(k,y)=>{const b=e.resolveComponent("d-tree-item",!0);return e.openBlock(),e.createBlock(v,{tag:"li",class:"tree-item","transfer-data":{id:t.treeId,model:t.model},draggable:B.value,onDrop:e.withModifiers(_,["stop"]),onDragenter:y[0]||(y[0]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(C,["prevent","stop"]),onDragleave:e.withModifiers(z,["prevent"])},{default:e.withCtx(()=>{var T,$;return[e.createElementVNode("div",{ref_key:"node",ref:i,class:e.normalizeClass(u.value),onClick:d},[e.createElementVNode("div",null,[t.model.icons&&t.model.icons.pre&&c.value&&!t.search?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:0,component:e.unref(S).getters.getIcon(t.model.icons.pre.component),size:18,color:t.model.icons.pre.color?t.model.icons.pre.color:"inherit",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.pre&&!c.value&&!t.search?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(S).getters.getIcon(t.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(a.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:2,component:e.unref(S).getters.getIcon(t.model.icons.icon.component),color:t.model.icons.icon.color?t.model.icons.icon.color:"inherit"},null,8,["component","color"])):e.createCommentVNode("",!0),e.createElementVNode("div",ee,[e.createElementVNode("div",null,e.toDisplayString(e.unref(f).actions.renderTitle(t.treeId,t.model.title)),1)])]),e.createElementVNode("div",te,[((T=t.model.badge)==null?void 0:T.value)!==void 0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(W),{key:0,class:e.normalizeClass([($=t.model.badge)==null?void 0:$.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),t.model.icons&&t.model.icons.post&&c.value&&!t.search?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w),{key:1,component:e.unref(S).getters.getIcon(t.model.icons.post.component),size:20,color:t.model.icons.post.color?t.model.icons.post.color:"inherit",class:e.normalizeClass(a.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],2),e.createVNode(M,null,{default:e.withCtx(()=>[c.value&&a.value&&!t.search?(e.openBlock(),e.createElementBlock("ul",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.model.children,g=>(e.openBlock(),e.createBlock(b,{class:"tree-item",key:g.id,model:g,treeId:t.treeId,items:t.items,search:t.search,onNodeclick:m},null,8,["model","treeId","items","search"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])}}},[["__scopeId","data-v-f4157b53"]]);function H(o){return o=o||new Map,{all:o,on(n,t){const i=o.get(n);i?i.push(t):o.set(n,[t])},off(n,t){const i=o.get(n);i&&(t?i.splice(i.indexOf(t)>>>0,1):o.set(n,[]))},emit(n,t){let i=o.get(n);i&&i.slice().map(r=>{r(t)}),i=o.get("*"),i&&i.slice().map(r=>{r(n,t)})}}}const x=H(),f={state:e.reactive({trees:{}}),getters:{getItems(o){return f.state.trees[o].items},getItemsSelect(o){return f.state.trees[o].selected},getParentId(o,n,t,i="id",r="children",s={}){return t&&o&&(o.find(l=>l[i]===t?(s.found=n,l):f.getters.getParentId(l[r],l.id,t,i,r,s)),s.found)?s.found:!1}},mutations:{setTreeItems(o,n){f.state.trees[o].items=n},setItemSelect(o,n){f.state.trees[o].noSelect||(f.state.trees[o].multiSelect?f.state.trees[o].selected.includes(n.id)?f.state.trees[o].selected=f.state.trees[o].selected.filter(function(t){return t!==n.id}):f.state.trees[o].selected=[...f.state.trees[o].selected,n.id]:f.state.trees[o].selected=[n.id])}},actions:{initTreeStore(o,n,t,i,r,s){f.state.trees[o]=[],f.state.trees[o].selected=[],f.state.trees[o].noSelect=n,f.state.trees[o].multiSelect=t,f.state.trees[o].expanded=i,f.state.trees[o].transfer=r,f.state.trees[o].renderTitle=s},renderTitle(o,n){return f.state.trees[o].renderTitle?f.state.trees[o].renderTitle(n):n},isItemSelected(o,n){return f.state.trees[o].selected.includes(n)},toggleItem(o,n,t){const i=f.actions.deepSearch(n,t);i.expanded=i.expanded===void 0||!i.expanded,i.children&&i.children.length&&(i.expanded?x.emit(`expand-${o}`,{id:o,model:i}):x.emit(`collapse-${o}`,{id:o,model:i}))},isTreeExpanded(o){return f.state.trees[o].expanded},isChildOfParent(o,n,t,i){const r=f.actions.deepSearch(n,t);if(r&&r.children){for(let s=0;s<r.children.length;s++)if(r.children[s].id===i)return!0}return!1},isParentOfChild(o,n,t,i){const r=f.actions.deepSearch(n,t);return!!(r&&r.children&&f.actions.deepSearch(r.children,i))},deepSearch(o,n,t="id",i="children",r={}){return n&&o&&(o.find(s=>s[t]===n?(r.found=s,s):f.actions.deepSearch(s[i],n,t,i,r)),r.found)?r.found:!1},deepSearchByTitle(o,n,t="title",i="children",r=[]){if(n&&o&&(o.find(s=>{const l=new RegExp(n,"gi");s[t].toString().toLowerCase().match(l)!==null&&r.push(s),f.actions.deepSearchByTitle(s[i],n,t,i,r)}),r)){for(let s=0;s<r.length;s++);return r}return r},moveTreeNode(o,n,t,i,r,s){const l=f.actions.deleteTreeNode(t,i);f.actions.insertTreeNode(t,r,l,s),x.emit(`move-${n}`,{fromTreeId:o,toTreeId:n,moved:l.id,target:r,position:s})},insertTreeNode(o,n,t,i){if(o)for(let r=0;r<o.length;r++){if(o[r].id===n){let l=r;return i==="after"?(l++,o.splice(l,0,t)):i==="before"?o.splice(l,0,t):i==="inside"&&(Object.hasOwn(o[r],"children")||(o[r].children=[],o[r].opened=!0),o[r].children.splice(0,0,t)),o[r]}const s=this.insertTreeNode(o[r].children,n,t,i);if(s)return s}},deleteTreeNode(o,n){if(o)for(let t=0;t<o.length;t++){if(o[t].id===n){const r=o[t];return o.splice(t,1),r}const i=f.actions.deleteTreeNode(o[t].children,n);if(i)return i}}}},ne={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(h),setup(o,{emit:n}){let t=e.reactive({});const i=e.ref("false"),r=e.ref(null),s=new Set,l=e.computed(()=>i.value&&t),c=(a,d)=>{t=L.data,n(a,d,t),a===h.dragenter&&(s.size||d.target===r.value)&&s.add(d.target),a===h.dragleave&&s.delete(d.target),a===h.drop&&s.clear(),i.value=!!s.size};return(a,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"el",ref:r,onDragenter:d[0]||(d[0]=m=>c(e.unref(h).dragenter,m)),onDragleave:d[1]||(d[1]=m=>c(e.unref(h).dragleave,m)),onDragover:d[2]||(d[2]=e.withModifiers(m=>c(e.unref(h).dragover,m),["prevent"])),onDrop:d[3]||(d[3]=e.withModifiers(m=>c(e.unref(h).drop,m),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{transferData:l.value})]),_:3},544))}},P={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean,renderTitle:Function,search:String},emits:["select","collapse","expand","move"],setup(o,{emit:n}){const t=o,i=e.getCurrentInstance().uid;f.actions.initTreeStore(i,t.noSelect,t.multiSelect,t.expanded,t.transfer,t.renderTitle);const r=(c,a)=>{console.log(c,a)};x.on(`select-${i}`,c=>{n("select",c)}),x.on(`expand-${i}`,c=>{n("expand",c)}),x.on(`collapse-${i}`,c=>{n("collapse",c)}),x.on(`move-${i}`,c=>{n("move",c)});const s=e.computed(()=>t.search?f.actions.deepSearchByTitle(t.items,t.search):t.items),l=(c=null)=>{f.mutations.setItemSelect(i,c.model),f.actions.toggleItem(i,t.items,c.model.id)};return(c,a)=>(e.openBlock(),e.createBlock(ne,{class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createBlock(F,{key:d.id,model:d,treeId:e.unref(i),items:t.items,search:t.search,onNodeclick:l},null,8,["model","treeId","items","search"]))),128))]),_:1},8,["onDrop"]))}},Se="",ie=E({__name:"DAccordion",props:{items:Array},setup(o){const n=o;return(t,i)=>(e.openBlock(),e.createBlock(P,{class:"accordion",items:n.items,"no-select":!0},null,8,["items"]))}},[["__scopeId","data-v-4c920528"]]),A={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:s,height:l,paddingLeft:c,transitionDuration:a,transitionTimingFunction:d}=n,m=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${s}px;`:"";return`position:${m};z-index:${r};${u}height:${l}px;padding-left:${c}px;transition-duration:${a}ms;transition-timing-function:${d};`});return(i,r)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},O={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,top:r,zIndex:s,minWidth:l,height:c,paddingLeft:a,transitionDuration:d,transitionTimingFunction:m}=n,u=i?"fixed":"static",B=n.useMinWidthLayout?`min-width: ${l}px;`:"";return`position:${u};top:${r}px;z-index:${s};${B}height:${c}px;padding-left:${a}px;transition-duration:${d}ms;transition-timing-function:${m};`});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},R={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(o){const n=o,t=e.computed(()=>{const{fixed:i,zIndex:r,minWidth:s,height:l,paddingLeft:c,transitionDuration:a,transitionTimingFunction:d}=n,m=i?"fixed":"static",u=n.useMinWidthLayout?`min-width:${s}px;`:"";return`position:${m};z-index:${r};${u}height:${l}px;padding-left:${c}px;transition-duration:${a}ms;transition-timing-function:${d};`});return(i,r)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Y={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(o){const n=o,t=e.computed(()=>{const{zIndex:i,width:r,paddingTop:s,transitionDuration:l,transitionTimingFunction:c}=n;return`z-index:${i};width:${r}px;padding-top:${s}px;transition-duration:${l}ms;transition-timing-function:${c};`});return(i,r)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(t.value)},[e.renderSlot(i.$slots,"default")],4))}},Z={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(o){const n=o,t=e.computed(()=>{const{paddingTop:i,paddingBottom:r,paddingLeft:s,transitionDuration:l,transitionTimingFunction:c}=n,a=`overflow:${n.overflowHidden?"hidden":"visible"};`;return`padding-top:${i}px;padding-bottom:${r}px;padding-left:${s}px;${a}transition-duration:${l}ms;transition-timing-function:${c};`});return(i,r)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(t.value),class:"d-layout-content"},[e.renderSlot(i.$slots,"default")],4))}};function re(o){const n=e.ref(0),t=e.computed(()=>`transform: translateX(${-n.value}px);`);let i=!1;function r(m){n.value=m}function s(){var m;const u=((m=document.scrollingElement)===null||m===void 0?void 0:m.scrollLeft)||0;r(u)}function l(){s()}function c(){document.addEventListener("scroll",s)}function a(){i&&document.removeEventListener("scroll",s)}function d(){l(),c(),i=!0}return e.watch(o,m=>{m?d():a()},{immediate:!0}),e.onUnmounted(()=>{a()}),t}const ae=1001,se=999,le=998,de={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse"],setup(o,{emit:n}){const t=o,i=e.computed(()=>t.useMinWidthLayout?`min-width:${t.minWidth}px;`:""),r=e.computed(()=>t.useMinWidthLayout&&(t.fixedHeaderAndTab||t.fixedFooter)),s=re(r),l=e.computed(()=>t.fixedHeaderAndTab?s.value:""),c=e.computed(()=>t.fixedFooter?s.value:""),a=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return{transitionDuration:g,transitionTimingFunction:I}}),d=e.computed(()=>t.mode==="vertical"),m=e.computed(()=>t.isMobile||d.value?1003:1e3),u=e.computed({get(){return t.sidebarCollapse},set(g){n("update:sidebar-collapse",g)}});function B(){u.value=!0}const _=e.computed(()=>t.isMobile&&!u.value),C=e.computed(()=>{const{transitionDuration:g,transitionTimingFunction:I}=t;return`background-color:${t.maskBg};transition-duration:${g}ms;transition-timing-function:${I};`}),z=e.computed(()=>{const{sidebarWidth:g,sidebarCollapsedWidth:I}=t,fe=t.isMobile?0:I,me=u.value?fe:g;return t.sidebarVisible?me:0}),k=e.computed(()=>t.isMobile?0:z.value),y=e.computed(()=>d.value?k.value:0),b=e.computed(()=>!t.isMobile&&!d.value&&t.headerVisible?t.headerHeight:0),T=e.computed(()=>{let g=0;return t.fixedHeaderAndTab&&(t.headerVisible&&(g+=t.headerHeight),t.tabVisible&&(g+=t.tabHeight)),g}),$=e.computed(()=>t.fixedFooter&&t.footerVisible?t.footerHeight:0);return(g,I)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(i.value)},[o.headerVisible?(e.openBlock(),e.createBlock(A,e.mergeProps({key:0},a.value,{fixed:o.fixedHeaderAndTab,"z-index":ae,"min-width":o.minWidth,height:o.headerHeight,"padding-left":y.value,style:l.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":se,"min-width":o.minWidth,top:o.headerHeight,height:o.tabHeight,"padding-left":k.value,style:l.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),o.sidebarVisible?(e.openBlock(),e.createBlock(Y,e.mergeProps({key:2},a.value,{"z-index":m.value,width:z.value,"padding-top":b.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(C.value),onClick:B},null,4)):e.createCommentVNode("",!0),e.createVNode(Z,e.mergeProps(a.value,{"padding-top":T.value,"padding-bottom":$.value,"padding-left":k.value,"overflow-hidden":o.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),o.footerVisible?(e.openBlock(),e.createBlock(R,e.mergeProps({key:4},a.value,{fixed:o.fixedFooter,"z-index":le,"min-width":o.minWidth,height:o.footerHeight,"padding-left":k.value,style:c.value}),{default:e.withCtx(()=>[e.renderSlot(g.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},N={state:e.reactive({theme:"dark"}),getters:{theme(){return N.state.theme}},mutations:{setTheme(o){N.state.theme=o,document.documentElement.setAttribute("class",o)}},actions:{toggleTheme(){N.state.theme=N.state.theme==="dark"?"light":"dark",document.documentElement.setAttribute("class",N.state.theme)}}},ce={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(o){const n=o;return N.mutations.setTheme(n.theme),(t,i)=>e.renderSlot(t.$slots,"default")}};p.DAccordion=ie,p.DBadge=W,p.DButton=G,p.DCollapse=M,p.DConfigProvider=ce,p.DGlobalStore=N,p.DIcon=w,p.DIconStore=S,p.DInput=K,p.DLayoutAdmin=de,p.DLayoutContent=Z,p.DLayoutFooter=R,p.DLayoutHeader=A,p.DLayoutSidebar=Y,p.DLayoutTab=O,p.DTransferStore=L,p.DTree=P,p.DTreeItem=F,p.DTreeStore=f,p.emitter=x,p.eventsBus=H,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.button{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-block;padding:.4rem .8rem;border-radius:5px;transition:all .2s;font-weight:400;margin:.25rem .125rem}.button.button-sm{font-size:.8em}.button.button-lg{font-size:1.3em}.button.button-ext{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;height:100%;gap:5px}.button.button-ext .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center}.label{margin-bottom:5px;font-size:.9em;opacity:.7}.d-input .d-input-small{font-size:.8em}.d-input .d-input-big{font-size:1.2em}.d-input,.d-select,.d-checkbox{margin-bottom:15px}.d-input input,select{font-size:1.1em;border-style:solid;border-width:1px;border-radius:5px;padding:5px 7px}.d-checkbox input[type=checkbox]{position:absolute;z-index:-1;opacity:0}.d-checkbox input[type=checkbox]+label{display:inline-flex;align-items:center;-webkit-user-select:none;user-select:none}.d-checkbox input[type=checkbox]+label:before{content:"";display:inline-block;width:1em;height:1em;flex-shrink:0;flex-grow:0;border-radius:.25em;margin-right:.5em;background-repeat:no-repeat;background-position:center center;background-size:50% 50%;transition:all .2s}.d-checkbox input[type=checkbox]:checked+label:before{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");background-size:10px}.icon{line-height:1em;text-align:center;display:inline-block;position:relative;fill:currentColor;transform:translateZ(0)}.icon svg{width:1em;height:1em}.accordion{-webkit-user-select:none;user-select:none}.accordion .accordion-item,.accordion .accordion-sub{cursor:pointer;padding:.25rem .125rem}.badge{display:inline-block;padding:3px 4px;margin:.25rem .125rem;border-radius:5px;line-height:1}.badge.badge-sm{font-size:.8em;padding:2px 3px}.tree{padding-left:0;-webkit-user-select:none;user-select:none;list-style:none;margin:0}.tree.accordion .tree-item ul{padding-left:0}.tree .tree-item{cursor:pointer;line-height:1.5;overflow:hidden;position:relative}.tree .tree-item>div{padding:3px 5px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-radius:5px}.tree .tree-item>div.selected{transition:all 50ms}.tree .tree-item>div>div{display:flex;flex-direction:row;justify-content:start;align-items:center;gap:3px}.tree .tree-item>div .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center;transition:all .2s}.tree .tree-item>div .tree-open-post{transform:rotate(-90deg)}.tree .tree-item>div .tree-open-pre{transform:rotate(90deg)}.tree .tree-item ul{padding-left:20px;list-style:none}.tree .item-title{display:table;table-layout:fixed;width:100%}.tree .item-title>div{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tree.tree-compact{font-size:.9em}.tree.tree-compact .tree-item{line-height:1}.tree.tree-compact .tree-item>div{padding:1px 3px}.d-layout{display:flex;flex-direction:column;width:100%;height:100%}.d-layout .d-layout-header{left:0;top:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-content{flex-grow:1;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-footer{left:0;bottom:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-sidebar{position:fixed;left:0;top:0;box-sizing:border-box;width:100%;height:100%;transition-property:all;overflow-y:hidden}.d-layout .d-layout-sidebar-mask{position:fixed;left:0;top:0;z-index:1002;width:100%;height:100%;transition-property:background-color}.d-layout .d-layout-tab{left:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.light .button{background-color:#ccc9;color:gray}.light .button:hover{color:#666;background-color:#cccc}.light .button.button-blue{background-color:#51c0e799;color:#43565c}.light .button.button-blue:hover{color:#2d3a3f;background-color:#51c0e7cc}.light .button.button-green{background-color:#90d76099;color:#4f4f4f}.light .button.button-green:hover{color:#363636;background-color:#90d760cc}.light .button.button-red{background-color:#ff929299;color:#ae4a4a}.light .button.button-red:hover{background-color:#ff9292cc;color:#8a3b3b}.light .button.button-orange{background-color:#ffc45899;color:#856a39}.light .button.button-orange:hover{background-color:#ffc458cc;color:#614e2a}.light .button.button-violet{background-color:#c2a7ff99;color:#7456b7}.light .button.button-violet:hover{background-color:#c2a7ffcc;color:#5c4199}.light .button.button-outline{outline:solid 1px rgba(204,204,204,.6);color:gray;background-color:transparent}.light .button.button-outline:hover{color:gray;background-color:#cccc}.light .button.button-outline-blue{outline:solid 1px rgba(81,192,231,.6);background-color:transparent;color:#136c8c99}.light .button.button-outline-blue:hover{color:#43565c;background-color:#51c0e7cc}.light .button.button-outline-green{outline:solid 1px rgba(144,215,96,.6);background-color:transparent;color:#467e2099}.light .button.button-outline-green:hover{color:#4f4f4f;background-color:#90d760cc}.light .button.button-outline-red{outline:solid 1px rgba(255,146,146,.6);background-color:transparent;color:#f8000099}.light .button.button-outline-red:hover{color:#ae4a4a;background-color:#ff9292cc}.light .button.button-outline-orange{outline:solid 1px rgba(255,196,88,.6);background-color:transparent;color:#be7b0099}.light .button.button-outline-orange:hover{color:#856a39;background-color:#ffc458cc}.light .button.button-outline-violet{outline:solid 1px rgba(194,167,255,.6);background-color:transparent;color:#580eff99}.light .button.button-outline-violet:hover{color:#7456b7;background-color:#c2a7ffcc}.dark .button{background-color:#ffffff1a;color:#e5e5e5}.dark .button:hover{color:#fff;background-color:#fff3}.dark .button.button-blue{background-color:#1685ac}.dark .button.button-blue:hover{background-color:#1685accc}.dark .button.button-green{background-color:#5d9d31}.dark .button.button-green:hover{background-color:#5d9d31cc}.dark .button.button-red{background-color:#c33737}.dark .button.button-red:hover{background-color:#c33737cc}.dark .button.button-orange{background-color:#d59622}.dark .button.button-orange:hover{background-color:#d59622cc}.dark .button.button-violet{background-color:#7750d2}.dark .button.button-violet:hover{background-color:#7750d2cc}.dark .button.button-outline{outline:solid 1px #555555;color:#a2a2a2;background-color:transparent}.dark .button.button-outline:hover{color:#fff;background-color:#555}.dark .button.button-outline-blue{outline:solid 1px #1685ac;background-color:transparent;color:#1ca8d9}.dark .button.button-outline-blue:hover{color:#fff;background-color:#1685ac}.dark .button.button-outline-green{outline:solid 1px #5d9d31;background-color:transparent;color:#74c33e}.dark .button.button-outline-green:hover{color:#fff;background-color:#5d9d31}.dark .button.button-outline-red{outline:solid 1px #c33737;background-color:transparent;color:#d15c5c}.dark .button.button-outline-red:hover{color:#fff;background-color:#c33737}.dark .button.button-outline-orange{outline:solid 1px #d59622;background-color:transparent;color:#e2ac48}.dark .button.button-outline-orange:hover{color:#fff;background-color:#d59622}.dark .button.button-outline-violet{outline:solid 1px #7750d2;background-color:transparent;color:#9779dc}.dark .button.button-outline-violet:hover{color:#fff;background-color:#7750d2}.badge{background-color:#ccc9;color:gray}.badge.badge-blue{background-color:#51c0e799;color:#43565c}.badge.badge-green{background-color:#90d76099;color:#4f4f4f}.badge.badge-red{background-color:#ff929299;color:#ae4a4a}.badge.badge-orange{background-color:#ffc45899;color:#856a39}.badge.badge-violet{background-color:#c2a7ff99;color:#7456b7}.badge.badge-stress-gray{color:#fff;background-color:#80808099}.badge.badge-stress-blue{color:#fff;background-color:#136c8c99}.badge.badge-stress-green{color:#fff;background-color:#467e2099}.badge.badge-stress-red{color:#fff;background-color:#f8000099}.badge.badge-stress-orange{color:#fff;background-color:#be7b0099}.badge.badge-stress-violet{color:#fff;background-color:#580eff99}.dark .badge{background-color:#555;color:#e5e5e5}.dark .badge.badge-blue{background-color:#1685ac}.dark .badge.badge-green{background-color:#5d9d31}.dark .badge.badge-red{background-color:#c33737}.dark .badge.badge-orange{background-color:#d59622}.dark .badge.badge-violet{background-color:#7750d2}.dark .badge.badge-stress-gray{color:#888;background-color:#090909}.dark .badge.badge-stress-blue{color:#41bce7;background-color:#051c24}.dark .badge.badge-stress-green{color:#90cf65;background-color:#18280d}.dark .badge.badge-stress-red{color:#dc8484;background-color:#4c1515}.dark .badge.badge-stress-orange{color:#e9c074;background-color:#51390d}.dark .badge.badge-stress-violet{color:#b6a1e7;background-color:#341c6d}.tree .tree-item>div.selected{background-color:#0000001a}.tree .tree-item>div:hover{background-color:#0000001a}.dark .tree .tree-item>div.selected{background-color:#ffffff1a}.dark .tree .tree-item>div:hover{background-color:#ffffff1a}.dark{background-color:#34383e;color:#ccc}.light{background-color:#fff;color:#333}.d-input input,.d-select select{color:#ccc;background-color:#262626;border-color:#fff3}.d-input input:focus,.d-select select:focus{outline:none!important;border-color:#fff6}.d-checkbox input[type=checkbox]+label:before{border:1px solid rgba(255,255,255,.2)}.d-checkbox input[type=checkbox]:checked+label:before{border-color:#666;background-color:#666}.d-checkbox input[type=checkbox]:not(:disabled):not(:checked)+label:hover:before{border-color:#fff6}.d-checkbox input[type=checkbox]:not(:disabled):active+label:before{background-color:#b3d7ff;border-color:#fff6}.d-checkbox input[type=checkbox]:focus:not(:checked)+label:before{border-color:#fff6}.d-checkbox input[type=checkbox]:disabled+label:before{background-color:#e9ecef}.light .icon{color:#333}.dark .icon{color:#ccc}.styled-scrollbars{scrollbar-width:thin;scrollbar-color:blue orange}.styled-scrollbars::-webkit-scrollbar{height:6px;width:6px}.styled-scrollbars::-webkit-scrollbar-track{background:orange}.styled-scrollbars::-webkit-scrollbar-thumb{background-color:#00f;border-radius:3px;border:0}.light .d-layout{background-color:#fff}.light .d-layout .d-layout-sidebar{background-color:#e5e5e5}.light .d-layout .d-layout-header,.light .d-layout .d-layout-footer{background-color:#f0f0f0}.light .d-layout .d-layout-tab{background-color:#fafafa}.dark .d-layout{background-color:#34383e}.dark .d-layout .d-layout-sidebar{background-color:#494c52}.dark .d-layout .d-layout-header,.dark .d-layout .d-layout-footer{background-color:#3e4248}.dark .d-layout .d-layout-tab{background-color:#2f3238}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:400;font-style:normal;font-size:.95rem}*[data-v-11679fd8],[data-v-11679fd8]:after,[data-v-11679fd8]:before{box-sizing:border-box}.node-top[data-v-f4157b53]{background:linear-gradient(0deg,rgba(0,185,255,0) 0%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)!important}.node-bottom[data-v-f4157b53]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 100%)!important}.node-over[data-v-f4157b53]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)}.tree-item>ul[data-v-4c920528]{padding-left:0!important}
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;height:auto}.button.button-sm{font-size:.8em}.button.button-lg{font-size:1.3em}.button.button-ext{display:inline-flex;flex-direction:row;justify-content:center;align-items:center;height:100%;gap:5px}.button.button-ext .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center}.label{margin-bottom:5px;font-size:.9em;opacity:.7}.d-input .d-input-small{font-size:.8em}.d-input .d-input-big{font-size:1.2em}.d-input,.d-select,.d-checkbox{margin-bottom:15px}.d-input input,select{font-size:1.1em;border-style:solid;border-width:1px;border-radius:5px;padding:5px 7px}.d-checkbox input[type=checkbox]{position:absolute;z-index:-1;opacity:0}.d-checkbox input[type=checkbox]+label{display:inline-flex;align-items:center;-webkit-user-select:none;user-select:none}.d-checkbox input[type=checkbox]+label:before{content:"";display:inline-block;width:1em;height:1em;flex-shrink:0;flex-grow:0;border-radius:.25em;margin-right:.5em;background-repeat:no-repeat;background-position:center center;background-size:50% 50%;transition:all .2s}.d-checkbox input[type=checkbox]:checked+label:before{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");background-size:10px}.icon{line-height:1em;text-align:center;display:inline-block;position:relative;fill:currentColor;transform:translateZ(0)}.icon svg{width:1em;height:1em}.accordion{-webkit-user-select:none;user-select:none}.accordion .accordion-item,.accordion .accordion-sub{cursor:pointer;padding:.25rem .125rem}.badge{display:inline-block;padding:3px 4px;margin:.25rem .125rem;border-radius:5px;line-height:1}.badge.badge-sm{font-size:.8em;padding:2px 3px}.tree{padding-left:0;-webkit-user-select:none;user-select:none;list-style:none;margin:0}.tree.accordion .tree-item ul{padding-left:0}.tree .tree-item{cursor:pointer;line-height:1.5;overflow:hidden;position:relative}.tree .tree-item>div{padding:3px 5px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-radius:5px}.tree .tree-item>div.selected{transition:all 50ms}.tree .tree-item>div>div{display:flex;flex-direction:row;justify-content:start;align-items:center;gap:3px}.tree .tree-item>div .icon{display:inline-flex!important;flex-direction:row;justify-content:center;align-items:center;transition:all .2s}.tree .tree-item>div .tree-open-post{transform:rotate(-90deg)}.tree .tree-item>div .tree-open-pre{transform:rotate(90deg)}.tree .tree-item ul{padding-left:20px;list-style:none}.tree .item-title{display:table;table-layout:fixed;width:100%}.tree .item-title>div{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tree.tree-compact{font-size:.9em}.tree.tree-compact .tree-item{line-height:1}.tree.tree-compact .tree-item>div{padding:1px 3px}.d-layout{display:flex;flex-direction:column;width:100%;height:100%}.d-layout .d-layout-header{left:0;top:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-content{flex-grow:1;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-footer{left:0;bottom:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.d-layout .d-layout-sidebar{position:fixed;left:0;top:0;box-sizing:border-box;width:100%;height:100%;transition-property:all;overflow-y:hidden}.d-layout .d-layout-sidebar-mask{position:fixed;left:0;top:0;z-index:1002;width:100%;height:100%;transition-property:background-color}.d-layout .d-layout-tab{left:0;flex-shrink:0;box-sizing:border-box;width:100%;transition-property:padding-left}.light .button{background-color:#ccc9;color:gray}.light .button:hover{color:#666;background-color:#cccc}.light .button.button-blue{background-color:#51c0e799;color:#43565c}.light .button.button-blue:hover{color:#2d3a3f;background-color:#51c0e7cc}.light .button.button-green{background-color:#90d76099;color:#4f4f4f}.light .button.button-green:hover{color:#363636;background-color:#90d760cc}.light .button.button-red{background-color:#ff929299;color:#ae4a4a}.light .button.button-red:hover{background-color:#ff9292cc;color:#8a3b3b}.light .button.button-orange{background-color:#ffc45899;color:#856a39}.light .button.button-orange:hover{background-color:#ffc458cc;color:#614e2a}.light .button.button-violet{background-color:#c2a7ff99;color:#7456b7}.light .button.button-violet:hover{background-color:#c2a7ffcc;color:#5c4199}.light .button.button-outline{outline:solid 1px rgba(204,204,204,.6);color:gray;background-color:transparent}.light .button.button-outline:hover{color:gray;background-color:#cccc}.light .button.button-outline-blue{outline:solid 1px rgba(81,192,231,.6);background-color:transparent;color:#136c8c99}.light .button.button-outline-blue:hover{color:#43565c;background-color:#51c0e7cc}.light .button.button-outline-green{outline:solid 1px rgba(144,215,96,.6);background-color:transparent;color:#467e2099}.light .button.button-outline-green:hover{color:#4f4f4f;background-color:#90d760cc}.light .button.button-outline-red{outline:solid 1px rgba(255,146,146,.6);background-color:transparent;color:#f8000099}.light .button.button-outline-red:hover{color:#ae4a4a;background-color:#ff9292cc}.light .button.button-outline-orange{outline:solid 1px rgba(255,196,88,.6);background-color:transparent;color:#be7b0099}.light .button.button-outline-orange:hover{color:#856a39;background-color:#ffc458cc}.light .button.button-outline-violet{outline:solid 1px rgba(194,167,255,.6);background-color:transparent;color:#580eff99}.light .button.button-outline-violet:hover{color:#7456b7;background-color:#c2a7ffcc}.dark .button{background-color:#ffffff1a;color:#e5e5e5}.dark .button:hover{color:#fff;background-color:#fff3}.dark .button.button-blue{background-color:#1685ac}.dark .button.button-blue:hover{background-color:#1685accc}.dark .button.button-green{background-color:#5d9d31}.dark .button.button-green:hover{background-color:#5d9d31cc}.dark .button.button-red{background-color:#c33737}.dark .button.button-red:hover{background-color:#c33737cc}.dark .button.button-orange{background-color:#d59622}.dark .button.button-orange:hover{background-color:#d59622cc}.dark .button.button-violet{background-color:#7750d2}.dark .button.button-violet:hover{background-color:#7750d2cc}.dark .button.button-outline{outline:solid 1px #555555;color:#a2a2a2;background-color:transparent}.dark .button.button-outline:hover{color:#fff;background-color:#555}.dark .button.button-outline-blue{outline:solid 1px #1685ac;background-color:transparent;color:#1ca8d9}.dark .button.button-outline-blue:hover{color:#fff;background-color:#1685ac}.dark .button.button-outline-green{outline:solid 1px #5d9d31;background-color:transparent;color:#74c33e}.dark .button.button-outline-green:hover{color:#fff;background-color:#5d9d31}.dark .button.button-outline-red{outline:solid 1px #c33737;background-color:transparent;color:#d15c5c}.dark .button.button-outline-red:hover{color:#fff;background-color:#c33737}.dark .button.button-outline-orange{outline:solid 1px #d59622;background-color:transparent;color:#e2ac48}.dark .button.button-outline-orange:hover{color:#fff;background-color:#d59622}.dark .button.button-outline-violet{outline:solid 1px #7750d2;background-color:transparent;color:#9779dc}.dark .button.button-outline-violet:hover{color:#fff;background-color:#7750d2}.badge{background-color:#ccc9;color:gray}.badge.badge-blue{background-color:#51c0e799;color:#43565c}.badge.badge-green{background-color:#90d76099;color:#4f4f4f}.badge.badge-red{background-color:#ff929299;color:#ae4a4a}.badge.badge-orange{background-color:#ffc45899;color:#856a39}.badge.badge-violet{background-color:#c2a7ff99;color:#7456b7}.badge.badge-stress-gray{color:#fff;background-color:#80808099}.badge.badge-stress-blue{color:#fff;background-color:#136c8c99}.badge.badge-stress-green{color:#fff;background-color:#467e2099}.badge.badge-stress-red{color:#fff;background-color:#f8000099}.badge.badge-stress-orange{color:#fff;background-color:#be7b0099}.badge.badge-stress-violet{color:#fff;background-color:#580eff99}.dark .badge{background-color:#555;color:#e5e5e5}.dark .badge.badge-blue{background-color:#1685ac}.dark .badge.badge-green{background-color:#5d9d31}.dark .badge.badge-red{background-color:#c33737}.dark .badge.badge-orange{background-color:#d59622}.dark .badge.badge-violet{background-color:#7750d2}.dark .badge.badge-stress-gray{color:#888;background-color:#090909}.dark .badge.badge-stress-blue{color:#41bce7;background-color:#051c24}.dark .badge.badge-stress-green{color:#90cf65;background-color:#18280d}.dark .badge.badge-stress-red{color:#dc8484;background-color:#4c1515}.dark .badge.badge-stress-orange{color:#e9c074;background-color:#51390d}.dark .badge.badge-stress-violet{color:#b6a1e7;background-color:#341c6d}.tree .tree-item>div.selected{background-color:#0000001a}.tree .tree-item>div:hover{background-color:#0000001a}.dark .tree .tree-item>div.selected{background-color:#ffffff1a}.dark .tree .tree-item>div:hover{background-color:#ffffff1a}.dark{background-color:#34383e;color:#ccc}.light{background-color:#fff;color:#333}.d-input input,.d-select select{color:#ccc;background-color:#262626;border-color:#fff3}.d-input input:focus,.d-select select:focus{outline:none!important;border-color:#fff6}.d-checkbox input[type=checkbox]+label:before{border:1px solid rgba(255,255,255,.2)}.d-checkbox input[type=checkbox]:checked+label:before{border-color:#666;background-color:#666}.d-checkbox input[type=checkbox]:not(:disabled):not(:checked)+label:hover:before{border-color:#fff6}.d-checkbox input[type=checkbox]:not(:disabled):active+label:before{background-color:#b3d7ff;border-color:#fff6}.d-checkbox input[type=checkbox]:focus:not(:checked)+label:before{border-color:#fff6}.d-checkbox input[type=checkbox]:disabled+label:before{background-color:#e9ecef}.light .icon{color:#333}.dark .icon{color:#ccc}.styled-scrollbars{scrollbar-width:thin;scrollbar-color:blue orange}.styled-scrollbars::-webkit-scrollbar{height:6px;width:6px}.styled-scrollbars::-webkit-scrollbar-track{background:orange}.styled-scrollbars::-webkit-scrollbar-thumb{background-color:#00f;border-radius:3px;border:0}.light .d-layout{background-color:#fff}.light .d-layout .d-layout-sidebar{background-color:#e5e5e5}.light .d-layout .d-layout-header,.light .d-layout .d-layout-footer{background-color:#f0f0f0}.light .d-layout .d-layout-tab{background-color:#fafafa}.dark .d-layout{background-color:#34383e}.dark .d-layout .d-layout-sidebar{background-color:#494c52}.dark .d-layout .d-layout-header,.dark .d-layout .d-layout-footer{background-color:#3e4248}.dark .d-layout .d-layout-tab{background-color:#2f3238}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-weight:400;font-style:normal;font-size:.95rem}*[data-v-11679fd8],[data-v-11679fd8]:after,[data-v-11679fd8]:before{box-sizing:border-box}.node-top[data-v-f4157b53]{background:linear-gradient(0deg,rgba(0,185,255,0) 0%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)!important}.node-bottom[data-v-f4157b53]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 100%)!important}.node-over[data-v-f4157b53]{background:linear-gradient(0deg,rgb(0,185,255) 0%,rgb(0,185,255) 4%,rgba(0,185,255,0) 5%,rgba(0,185,255,0) 95%,rgb(0,185,255) 96%,rgb(0,185,255) 100%)}.tree-item>ul[data-v-4c920528]{padding-left:0!important}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doph-js",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "description": "Simple Vue3 component library",
5
5
  "author": "Error202",
6
6
  "license": "MIT",