vlite3 0.7.15 → 0.8.2

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.
Files changed (57) hide show
  1. package/components/Accordion/Accordion.vue.js +35 -22
  2. package/components/Accordion/AccordionContent.vue.js +2 -2
  3. package/components/Accordion/AccordionContent.vue2.js +1 -1
  4. package/components/Breadcrumb/Breadcrumb.vue.js +2 -2
  5. package/components/Breadcrumb/Breadcrumb.vue2.js +44 -44
  6. package/components/Carousel/Carousel.vue.js +1 -1
  7. package/components/Carousel/Carousel.vue2.js +3 -3
  8. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  9. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  10. package/components/CommandPalette/CommandPaletteContent.vue.js +1 -1
  11. package/components/CommandPalette/CommandPaletteContent.vue2.js +2 -2
  12. package/components/Dropdown/DropdownTrigger.vue.js +1 -1
  13. package/components/FilePicker/FilePicker.vue.js +16 -16
  14. package/components/FileTree/FileTree.vue.js +5 -147
  15. package/components/FileTree/FileTree.vue2.js +164 -2
  16. package/components/FileTree/FileTreeNode.vue.js +89 -84
  17. package/components/Form/CustomFields.vue.js +2 -2
  18. package/components/Form/CustomFields.vue2.js +1 -1
  19. package/components/Form/Form.vue.js +1 -1
  20. package/components/Form/Form.vue2.js +133 -129
  21. package/components/Form/FormField.vue.d.ts +3 -0
  22. package/components/Form/FormField.vue.js +85 -82
  23. package/components/Form/FormFields.vue.d.ts +2 -0
  24. package/components/Form/FormFields.vue.js +2 -2
  25. package/components/Form/FormFields.vue2.js +55 -52
  26. package/components/Form/composables/useForm.d.ts +2 -0
  27. package/components/Form/composables/useForm.js +113 -107
  28. package/components/ImportData/ImportData.vue.js +157 -142
  29. package/components/ImportData/ImportStep1.vue.d.ts +6 -0
  30. package/components/ImportData/ImportStep1.vue.js +69 -61
  31. package/components/ImportData/ImportStep2.vue.js +5 -98
  32. package/components/ImportData/ImportStep2.vue2.js +105 -2
  33. package/components/Kanban/Kanban.vue.js +1 -1
  34. package/components/Kanban/Kanban.vue2.js +1 -1
  35. package/components/Kanban/KanbanBoard.vue.js +1 -1
  36. package/components/Kanban/KanbanBoard.vue2.js +92 -83
  37. package/components/Kanban/useKanbanBoard.d.ts +1 -1
  38. package/components/Kanban/useKanbanBoard.js +17 -17
  39. package/components/List/ListFieldRow.vue.js +4 -6
  40. package/components/MultiSelect/MultiSelect.vue.js +10 -4
  41. package/components/NavbarCommandPalette.vue.js +2 -2
  42. package/components/NumberInput.vue.js +2 -2
  43. package/components/NumberInput.vue2.js +1 -1
  44. package/components/PermissionMatrix/PermissionEditor.vue.d.ts +2 -0
  45. package/components/PermissionMatrix/PermissionEditor.vue.js +25 -23
  46. package/components/PermissionMatrix/PermissionEditorMatrix.vue.d.ts +4 -1
  47. package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +2 -2
  48. package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +48 -45
  49. package/components/Screen/ScreenFilter.vue.js +1 -1
  50. package/components/Timeline/Timeline.vue.js +62 -57
  51. package/components/ToastNotification.vue.js +2 -2
  52. package/components/ToastNotification.vue2.js +103 -88
  53. package/components/Workbook/Workbook.vue.js +5 -152
  54. package/components/Workbook/Workbook.vue2.js +166 -2
  55. package/package.json +1 -1
  56. package/style.css +3 -3
  57. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
@@ -1,6 +1,6 @@
1
- import { defineComponent as y, ref as I, watch as f, computed as B, openBlock as s, createElementBlock as m, normalizeClass as b, renderSlot as r, Fragment as k, renderList as p, createBlock as z, createSlots as $, withCtx as v, mergeProps as g } from "vue";
2
- import x from "./AccordionItem.vue.js";
3
- const S = /* @__PURE__ */ y({
1
+ import { defineComponent as C, shallowRef as y, watch as u, computed as b, openBlock as f, createElementBlock as m, normalizeClass as z, renderSlot as s, Fragment as B, renderList as $, withMemo as k, createVNode as x, createSlots as M, withCtx as v, mergeProps as g } from "vue";
2
+ import A from "./AccordionItem.vue.js";
3
+ const E = /* @__PURE__ */ C({
4
4
  __name: "Accordion",
5
5
  props: {
6
6
  modelValue: {},
@@ -23,44 +23,55 @@ const S = /* @__PURE__ */ y({
23
23
  },
24
24
  emits: ["update:modelValue", "change"],
25
25
  setup(a, { emit: h }) {
26
- const l = a, c = h, t = I([]), u = (e) => Array.isArray(e) ? e : typeof e == "string" && e ? [e] : [];
27
- f(
26
+ const l = a, c = h, t = y([]), d = (e) => Array.isArray(e) ? e : typeof e == "string" && e ? [e] : [];
27
+ u(
28
28
  () => l.modelValue,
29
29
  (e) => {
30
- t.value = u(e);
30
+ t.value = d(e);
31
31
  },
32
32
  { immediate: !0 }
33
- ), f(
33
+ ), u(
34
34
  () => l.defaultValue,
35
35
  (e) => {
36
- !l.modelValue && e && (t.value = u(e));
36
+ !l.modelValue && e && (t.value = d(e));
37
37
  },
38
38
  { immediate: !0 }
39
39
  );
40
- const d = (e) => {
40
+ const r = (e) => {
41
41
  if (l.disabled) return;
42
42
  const i = t.value.includes(e);
43
43
  l.allowMultiple ? i ? t.value = t.value.filter((n) => n !== e) : t.value = [...t.value, e] : i ? t.value = [] : t.value = [e], V();
44
44
  }, V = () => {
45
45
  const e = l.allowMultiple ? t.value : t.value[0] || "";
46
46
  c("update:modelValue", e), c("change", e);
47
- }, C = B(() => {
47
+ }, w = b(() => {
48
48
  const e = ["w-full", l.class];
49
49
  return l.attached && (e.push("rounded-lg overflow-hidden"), (l.variant === "outline" || l.variant === "default" || l.variant === "solid") && e.push("border")), e.join(" ");
50
50
  });
51
- return (e, i) => (s(), m("div", {
52
- class: b(C.value)
51
+ return (e, i) => (f(), m("div", {
52
+ class: z(w.value)
53
53
  }, [
54
- r(e.$slots, "default", {}, () => [
55
- (s(!0), m(k, null, p(a.items, (n, w) => (s(), z(x, {
56
- key: n.id,
54
+ s(e.$slots, "default", {}, () => [
55
+ (f(!0), m(B, null, $(a.items, (n, I) => k([
56
+ n,
57
+ t.value.includes(n.id),
58
+ a.variant,
59
+ a.size,
60
+ a.attached,
61
+ a.disabled,
62
+ a.showIndex,
63
+ a.openIcon,
64
+ a.closeIcon,
65
+ a.iconVariant,
66
+ a.activeIconVariant
67
+ ], () => x(A, {
57
68
  item: n,
58
69
  "is-open": t.value.includes(n.id),
59
70
  variant: a.variant,
60
71
  size: a.size,
61
72
  attached: a.attached,
62
73
  disabled: a.disabled,
63
- index: w + 1,
74
+ index: I + 1,
64
75
  "show-index": a.showIndex,
65
76
  "open-icon": a.openIcon,
66
77
  "close-icon": a.closeIcon,
@@ -69,27 +80,29 @@ const S = /* @__PURE__ */ y({
69
80
  "trigger-class": a.triggerClass,
70
81
  "content-class": a.contentClass,
71
82
  "item-class": a.itemClass,
72
- onToggle: d
73
- }, $({ _: 2 }, [
83
+ onToggle: r
84
+ }, M({ _: 2 }, [
74
85
  e.$slots.trigger ? {
75
86
  name: "trigger",
76
87
  fn: v((o) => [
77
- r(e.$slots, "trigger", g({ ref_for: !0 }, o))
88
+ s(e.$slots, "trigger", g({ ref_for: !0 }, o))
78
89
  ]),
79
90
  key: "0"
80
91
  } : void 0,
81
92
  e.$slots.content ? {
82
93
  name: "content",
83
94
  fn: v((o) => [
84
- r(e.$slots, "content", g({ ref_for: !0 }, o, { close: d }))
95
+ s(e.$slots, "content", g({ ref_for: !0 }, o, { close: r }))
85
96
  ]),
86
97
  key: "1"
87
98
  } : void 0
88
- ]), 1032, ["item", "is-open", "variant", "size", "attached", "disabled", "index", "show-index", "open-icon", "close-icon", "icon-variant", "active-icon-variant", "trigger-class", "content-class", "item-class"]))), 128))
99
+ ]), 1032, ["item", "is-open", "variant", "size", "attached", "disabled", "index", "show-index", "open-icon", "close-icon", "icon-variant", "active-icon-variant", "trigger-class", "content-class", "item-class"]), {
100
+ key: n.id
101
+ }, 0)), 128))
89
102
  ])
90
103
  ], 2));
91
104
  }
92
105
  });
93
106
  export {
94
- S as default
107
+ E as default
95
108
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./AccordionContent.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-aa189e08"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0075dffb"]]);
5
5
  export {
6
- e as default
6
+ m as default
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as d, openBlock as h, createBlock as f, Transition as m, withCtx as p, createElementVNode as n, normalizeClass as u, renderSlot as v } from "vue";
2
- const _ = { class: "overflow-hidden text-sm transition-all duration-300 ease-in-out" }, E = /* @__PURE__ */ d({
2
+ const _ = { class: "overflow-hidden text-sm transition-all duration-300 ease-in-out content-wrapper" }, E = /* @__PURE__ */ d({
3
3
  __name: "AccordionContent",
4
4
  props: {
5
5
  class: { default: "" }
@@ -1,7 +1,7 @@
1
1
  import o from "./Breadcrumb.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-12cf2491"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4ca31ff0"]]);
5
5
  export {
6
- c as default
6
+ m as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as B, ref as w, computed as l, openBlock as i, createElementBlock as m, normalizeClass as p, createElementVNode as s, Fragment as u, renderList as M, toDisplayString as v, createCommentVNode as h, createVNode as N, mergeProps as S, renderSlot as V } from "vue";
2
- import E from "./BreadcrumbItem.vue.js";
3
- const O = { class: "breadcrumb-list" }, _ = {
1
+ import { defineComponent as B, ref as M, computed as i, openBlock as m, createElementBlock as o, normalizeClass as p, createElementVNode as n, Fragment as b, renderList as N, withMemo as v, toDisplayString as h, createCommentVNode as g, createVNode as S, mergeProps as V, renderSlot as E } from "vue";
2
+ import O from "./BreadcrumbItem.vue.js";
3
+ const j = { class: "breadcrumb-list" }, D = {
4
4
  class: "breadcrumb-separator",
5
5
  "aria-hidden": "true"
6
- }, F = /* @__PURE__ */ B({
6
+ }, P = /* @__PURE__ */ B({
7
7
  __name: "Breadcrumb",
8
8
  props: {
9
9
  items: {},
@@ -14,82 +14,82 @@ const O = { class: "breadcrumb-list" }, _ = {
14
14
  class: { default: "" }
15
15
  },
16
16
  emits: ["item-click"],
17
- setup(n, { emit: x }) {
18
- const e = n, k = x, d = w(!0), c = l(() => !e.maxItems || !e.items ? !1 : e.items.length > e.maxItems && d.value), b = l(() => {
17
+ setup(s, { emit: k }) {
18
+ const e = s, x = k, f = M(!0), u = i(() => !e.maxItems || !e.items ? !1 : e.items.length > e.maxItems && f.value), c = i(() => {
19
19
  if (!e.items) return [];
20
- if (!c.value) return e.items;
21
- const t = e.maxItems, r = Math.max(t - 1, 1);
22
- return [e.items[0], ...e.items.slice(-r)];
23
- }), g = l(() => c.value ? 1 : -1);
24
- function C() {
25
- d.value = !1;
20
+ if (!u.value) return e.items;
21
+ const t = e.maxItems, a = Math.max(t - 1, 1);
22
+ return [e.items[0], ...e.items.slice(-a)];
23
+ }), C = i(() => u.value ? 1 : -1);
24
+ function z() {
25
+ f.value = !1;
26
26
  }
27
27
  function I(t) {
28
- if (!e.items || !c.value) return t;
29
- const r = e.maxItems, o = Math.max(r - 1, 1), a = e.items.length - o;
30
- return t === 0 ? 0 : a + (t - 1);
28
+ if (!e.items || !u.value) return t;
29
+ const a = e.maxItems, l = Math.max(a - 1, 1), r = e.items.length - l;
30
+ return t === 0 ? 0 : r + (t - 1);
31
31
  }
32
- function z(t) {
33
- k("item-click", { item: t.item, index: I(t.index) });
32
+ function w(t) {
33
+ x("item-click", { item: t.item, index: I(t.index) });
34
34
  }
35
- const y = l(() => {
35
+ const y = i(() => {
36
36
  const t = {
37
37
  default: "breadcrumb--default",
38
38
  contained: "breadcrumb--contained",
39
39
  pills: "breadcrumb--pills",
40
40
  arrow: "breadcrumb--arrow"
41
- }, r = {
41
+ }, a = {
42
42
  sm: "breadcrumb--sm",
43
43
  md: "breadcrumb--md",
44
44
  lg: "breadcrumb--lg"
45
45
  };
46
- return ["breadcrumb", t[e.variant], r[e.size], e.class].filter(Boolean).join(" ");
47
- }), f = l(() => ({
46
+ return ["breadcrumb", t[e.variant], a[e.size], e.class].filter(Boolean).join(" ");
47
+ }), d = i(() => ({
48
48
  slash: "/",
49
49
  chevron: "›",
50
50
  dot: "·",
51
51
  arrow: "→"
52
52
  })[e.separator] || "›");
53
- return (t, r) => (i(), m("nav", {
53
+ return (t, a) => (m(), o("nav", {
54
54
  class: p(y.value),
55
55
  "aria-label": "Breadcrumb"
56
56
  }, [
57
- s("ol", O, [
58
- n.items && n.items.length ? (i(!0), m(u, { key: 0 }, M(b.value, (o, a) => (i(), m(u, {
59
- key: o.label + a
57
+ n("ol", j, [
58
+ s.items && s.items.length ? (m(!0), o(b, { key: 0 }, N(c.value, (l, r) => (m(), o(b, {
59
+ key: l.label + r
60
60
  }, [
61
- a > 0 ? (i(), m("li", {
61
+ r > 0 ? v([d.value, e.separator], () => (m(), o("li", {
62
62
  key: 0,
63
63
  class: p(["breadcrumb-separator", (e.separator == "chevron" || e?.separator === "dot") && "text-fs-3!"]),
64
64
  "aria-hidden": "true"
65
65
  }, [
66
- s("span", null, v(f.value), 1)
67
- ], 2)) : h("", !0),
68
- a === g.value ? (i(), m(u, { key: 1 }, [
69
- s("li", _, [
70
- s("span", null, v(f.value), 1)
66
+ n("span", null, h(d.value), 1)
67
+ ], 2)), a, 0) : g("", !0),
68
+ r === C.value ? (m(), o(b, { key: 1 }, [
69
+ n("li", D, [
70
+ n("span", null, h(d.value), 1)
71
71
  ]),
72
- s("li", { class: "breadcrumb-ellipsis" }, [
73
- s("button", {
72
+ n("li", { class: "breadcrumb-ellipsis" }, [
73
+ n("button", {
74
74
  type: "button",
75
75
  class: "breadcrumb-ellipsis-btn",
76
76
  "aria-label": "Show all breadcrumb items",
77
- onClick: C
77
+ onClick: z
78
78
  }, " … ")
79
79
  ])
80
- ], 64)) : h("", !0),
81
- N(E, S({ ref_for: !0 }, o, {
82
- size: n.size,
83
- variant: n.variant,
84
- "is-current": a === b.value.length - 1,
85
- "item-index": a,
86
- onItemClick: z
87
- }), null, 16, ["size", "variant", "is-current", "item-index"])
88
- ], 64))), 128)) : V(t.$slots, "default", { key: 1 }, void 0, !0)
80
+ ], 64)) : g("", !0),
81
+ v([l, s.size, s.variant, r === c.value.length - 1], () => S(O, V({ ref_for: !0 }, l, {
82
+ size: s.size,
83
+ variant: s.variant,
84
+ "is-current": r === c.value.length - 1,
85
+ "item-index": r,
86
+ onItemClick: w
87
+ }), null, 16, ["size", "variant", "is-current", "item-index"]), a, 1)
88
+ ], 64))), 128)) : E(t.$slots, "default", { key: 1 }, void 0, !0)
89
89
  ])
90
90
  ], 2));
91
91
  }
92
92
  });
93
93
  export {
94
- F as default
94
+ P as default
95
95
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./Carousel.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-655a78c8"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4034dab4"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as g, ref as f, openBlock as p, createElementBlock as m, createVNode as c, unref as v, mergeProps as P, createSlots as h, renderList as y, withCtx as S, renderSlot as x, normalizeProps as B, guardReactiveProps as N } from "vue";
1
+ import { defineComponent as g, shallowRef as f, openBlock as p, createElementBlock as m, createVNode as c, unref as v, mergeProps as P, createSlots as h, renderList as y, withCtx as S, renderSlot as x, normalizeProps as B, guardReactiveProps as N } from "vue";
2
2
  import _ from "vue-carousel-lite";
3
3
  import "vue-carousel-lite/style.css";
4
- const T = { class: "carousel-wrapper" }, V = /* @__PURE__ */ g({
4
+ const w = { class: "carousel-wrapper" }, V = /* @__PURE__ */ g({
5
5
  __name: "Carousel",
6
6
  props: {
7
7
  data: { default: () => [] },
@@ -45,7 +45,7 @@ const T = { class: "carousel-wrapper" }, V = /* @__PURE__ */ g({
45
45
  goPrevPage: (e) => {
46
46
  o.value?.goPrevPage(e);
47
47
  }
48
- }), (e, t) => (p(), m("div", T, [
48
+ }), (e, t) => (p(), m("div", w, [
49
49
  c(v(_), P({
50
50
  ref_key: "carouselRef",
51
51
  ref: o
@@ -1,5 +1,5 @@
1
- import o from "./ColorIro.vue2.js";
2
- /* empty css */
1
+ import o from "./ColorIro.vue.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -6,8 +6,8 @@ import O from "../Input.vue.js";
6
6
  import "../../core/config.js";
7
7
  /* empty css */
8
8
  import y from "../Button.vue.js";
9
- import E from "./ColorIro.vue2.js";
10
- /* empty css */
9
+ import E from "./ColorIro.vue.js";
10
+ /* empty css */
11
11
  import { useEyeDropper as P } from "@vueuse/core";
12
12
  const I = {
13
13
  key: 0,
@@ -1,7 +1,7 @@
1
1
  import t from "./CommandPaletteContent.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-1ace469f"]]);
4
+ const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-1bae4c0f"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -5,7 +5,7 @@ import { $t as E } from "../../utils/i18n.js";
5
5
  import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
6
6
  import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
7
7
  import ee from "./CommandPaletteItem.vue2.js";
8
- const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3.5 border-b border-border/60 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
8
+ const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/60 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
9
9
  key: 0,
10
10
  class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
11
11
  "aria-live": "polite"
@@ -137,7 +137,7 @@ const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[
137
137
  o("div", {
138
138
  role: "group",
139
139
  "aria-label": t.label,
140
- class: "px-2"
140
+ class: "px-1.5"
141
141
  }, [
142
142
  (i(!0), c(_, null, B(t.rows, (d, ve, he, x) => {
143
143
  const M = [d.index === u(h), d.item.id];
@@ -19,7 +19,7 @@ const s = /* @__PURE__ */ t({
19
19
  disabled: e.disabled,
20
20
  dir: e.direction
21
21
  }, e.triggerProps, {
22
- class: ["w-full justify-between! font-normal", e.className]
22
+ class: ["w-full justify-between! font-normal px-2.5!", e.className]
23
23
  }), null, 16, ["text", "disabled", "dir", "class"]));
24
24
  }
25
25
  });
@@ -1,4 +1,4 @@
1
- import { defineComponent as Y, computed as f, ref as S, useSlots as Z, openBlock as r, createElementBlock as c, createElementVNode as n, renderSlot as _, normalizeClass as C, createBlock as y, withModifiers as M, createVNode as V, toDisplayString as b, createTextVNode as ee, createCommentVNode as F, Fragment as le, renderList as te } from "vue";
1
+ import { defineComponent as Y, computed as f, ref as S, useSlots as Z, openBlock as r, createElementBlock as c, createElementVNode as n, renderSlot as _, normalizeClass as C, createBlock as x, withModifiers as M, createVNode as V, toDisplayString as b, createTextVNode as ee, createCommentVNode as F, Fragment as le, renderList as te } from "vue";
2
2
  import p from "../Icon.vue.js";
3
3
  import P from "../Button.vue.js";
4
4
  import { $t as k } from "../../utils/i18n.js";
@@ -8,12 +8,12 @@ const ie = { class: "w-full" }, oe = ["multiple", "accept"], ae = ["value", "pla
8
8
  }, fe = {
9
9
  key: 1,
10
10
  class: "space-y-2"
11
- }, me = { class: "shrink-0 mr-3" }, ge = { class: "p-2 bg-primary-light rounded text-primary-fg-light" }, pe = { class: "flex-1 min-w-0" }, he = { class: "text-sm font-medium text-foreground truncate" }, ve = { class: "text-xs text-muted-foreground" }, xe = { class: "flex-shrink-0 ml-3 flex gap-2" }, ye = {
11
+ }, me = { class: "shrink-0 mr-3" }, ge = { class: "p-2 bg-primary-light rounded text-primary-fg-light" }, pe = { class: "flex-1 min-w-0" }, he = { class: "text-sm font-medium text-foreground truncate" }, ve = { class: "text-xs text-muted-foreground" }, ye = { class: "flex-shrink-0 ml-3 flex gap-2" }, xe = {
12
12
  key: 0,
13
13
  class: "flex gap-2"
14
14
  }, be = {
15
15
  key: 2,
16
- class: "absolute inset-0 bg-white/60 backdrop-blur-[1px] flex items-center justify-center rounded-lg z-10"
16
+ class: "absolute inset-0 bg-white/80 flex items-center justify-center rounded-lg z-10"
17
17
  }, ke = { class: "bg-white p-2 rounded-full shadow-lg" }, Se = /* @__PURE__ */ Y({
18
18
  name: "FilePicker",
19
19
  __name: "FilePicker",
@@ -106,14 +106,14 @@ const ie = { class: "w-full" }, oe = ["multiple", "accept"], ae = ["value", "pla
106
106
  }
107
107
  try {
108
108
  for (const o of m) {
109
- if (e.fileTypes.length > 0 && !e.fileTypes.some((x) => {
110
- if (x.startsWith("."))
111
- return o.name.toLowerCase().endsWith(x.toLowerCase());
112
- if (x.endsWith("/*")) {
113
- const X = x.split("/")[0];
109
+ if (e.fileTypes.length > 0 && !e.fileTypes.some((y) => {
110
+ if (y.startsWith("."))
111
+ return o.name.toLowerCase().endsWith(y.toLowerCase());
112
+ if (y.endsWith("/*")) {
113
+ const X = y.split("/")[0];
114
114
  return o.type.startsWith(X);
115
115
  }
116
- return o.type === x;
116
+ return o.type === y;
117
117
  })) {
118
118
  a.push(`File type not allowed: ${o.name}`);
119
119
  continue;
@@ -208,7 +208,7 @@ const ie = { class: "w-full" }, oe = ["multiple", "accept"], ae = ["value", "pla
208
208
  disabled: i.disabled || i.loading || u.value
209
209
  }, null, 10, ae),
210
210
  n("div", re, [
211
- i.loading || u.value ? (r(), y(p, {
211
+ i.loading || u.value ? (r(), x(p, {
212
212
  key: 0,
213
213
  icon: "lucide:loader-2",
214
214
  class: "h-4 w-4 animate-spin text-muted-foreground"
@@ -222,7 +222,7 @@ const ie = { class: "w-full" }, oe = ["multiple", "accept"], ae = ["value", "pla
222
222
  icon: "lucide:x-circle",
223
223
  class: "h-4 w-4"
224
224
  })
225
- ])) : (r(), y(p, {
225
+ ])) : (r(), x(p, {
226
226
  key: 2,
227
227
  icon: "lucide:upload",
228
228
  class: "h-4 w-4 text-muted-foreground"
@@ -253,8 +253,8 @@ const ie = { class: "w-full" }, oe = ["multiple", "accept"], ae = ["value", "pla
253
253
  n("p", he, b(a.fileName), 1),
254
254
  n("p", ve, b(G(a.fileSize)), 1)
255
255
  ]),
256
- n("div", xe, [
257
- !i.disabled && !i.loading ? (r(), y(P, {
256
+ n("div", ye, [
257
+ !i.disabled && !i.loading ? (r(), x(P, {
258
258
  key: 0,
259
259
  size: "xs",
260
260
  variant: "ghost",
@@ -265,7 +265,7 @@ const ie = { class: "w-full" }, oe = ["multiple", "accept"], ae = ["value", "pla
265
265
  }, null, 8, ["onClick"])) : F("", !0)
266
266
  ])
267
267
  ], 2))), 128)),
268
- i.multiSelect && (!i.maxFiles || w.value.length < i.maxFiles) ? (r(), c("div", ye, [
268
+ i.multiSelect && (!i.maxFiles || w.value.length < i.maxFiles) ? (r(), c("div", xe, [
269
269
  V(P, {
270
270
  size: "sm",
271
271
  variant: "outline",
@@ -284,11 +284,11 @@ const ie = { class: "w-full" }, oe = ["multiple", "accept"], ae = ["value", "pla
284
284
  onClick: v
285
285
  }, [
286
286
  n("div", se, [
287
- i.loading || u.value ? (r(), y(p, {
287
+ i.loading || u.value ? (r(), x(p, {
288
288
  key: 0,
289
289
  icon: "lucide:loader-2",
290
290
  class: "w-6 h-6 animate-spin"
291
- })) : (r(), y(p, {
291
+ })) : (r(), x(p, {
292
292
  key: 1,
293
293
  icon: "lucide:upload-cloud",
294
294
  class: "w-6 h-6"
@@ -1,149 +1,7 @@
1
- import { defineComponent as N, ref as p, watch as E, computed as y, openBlock as g, createElementBlock as S, normalizeClass as q, Fragment as Q, renderList as V, createBlock as F, toDisplayString as $ } from "vue";
2
- import z from "./FileTreeNode.vue.js";
3
- import { $t as k } from "../../utils/i18n.js";
4
- const A = {
5
- key: 1,
6
- class: "text-sm text-muted-foreground p-4 text-center"
7
- }, J = /* @__PURE__ */ N({
8
- __name: "FileTree",
9
- props: {
10
- modelValue: { default: () => [] },
11
- data: { default: () => [] },
12
- selectionMode: { default: "single" },
13
- showCheckboxes: { type: Boolean, default: !1 },
14
- defaultExpandedKeys: { default: () => [] },
15
- loadData: {},
16
- highlightSearch: { type: Boolean, default: !1 },
17
- searchQuery: {},
18
- class: {},
19
- emptyText: {},
20
- emptyTextI18n: {}
21
- },
22
- emits: ["update:modelValue", "select", "expand", "node-click"],
23
- setup(h, { emit: C }) {
24
- const l = h, f = C, u = p(new Set(l.defaultExpandedKeys)), v = p(/* @__PURE__ */ new Set()), m = p(/* @__PURE__ */ new Map()), x = p(/* @__PURE__ */ new Map()), M = (t, a) => {
25
- for (const e of t)
26
- m.value.set(e.id, e), a && x.value.set(e.id, a), e.children && M(e.children, e.id);
27
- };
28
- E(
29
- () => l.data,
30
- (t) => {
31
- m.value.clear(), x.value.clear(), M(t);
32
- },
33
- { immediate: !0, deep: !0 }
34
- );
35
- const b = (t) => {
36
- let a = [];
37
- if (t.children)
38
- for (const e of t.children)
39
- a.push(e.id), a = a.concat(b(e));
40
- return a;
41
- }, w = y(() => new Set(l.modelValue)), L = y(() => {
42
- const t = /* @__PURE__ */ new Set();
43
- if (l.selectionMode !== "multiple") return t;
44
- const a = (e) => {
45
- if (!e.children || e.children.length === 0)
46
- return w.value.has(e.id) ? { status: "checked" } : { status: "unchecked" };
47
- let n = !1, s = !1, i = !1;
48
- for (const r of e.children) {
49
- const c = a(r);
50
- c.status === "checked" && (n = !0), c.status === "unchecked" && (s = !0), c.status === "indeterminate" && (i = !0);
51
- }
52
- return i || n && s ? (t.add(e.id), { status: "indeterminate" }) : n ? { status: "checked" } : { status: "unchecked" };
53
- };
54
- return l.data.forEach(a), t;
55
- }), I = async (t) => {
56
- if (t.disabled) return;
57
- if (u.value.has(t.id)) {
58
- u.value.delete(t.id);
59
- const e = m.value.get(t.id) || t;
60
- b(e).forEach((s) => u.value.delete(s)), f("expand", t, !1);
61
- } else if (u.value.add(t.id), f("expand", t, !0), l.loadData && !t.isLoaded && (!t.children || t.children.length === 0)) {
62
- v.value.add(t.id);
63
- try {
64
- await l.loadData(t);
65
- } finally {
66
- v.value.delete(t.id);
67
- }
68
- }
69
- }, D = (t) => {
70
- if (t.disabled) return;
71
- const a = m.value.get(t.id) || t;
72
- let e = new Set(w.value);
73
- const n = e.has(t.id);
74
- if (l.selectionMode === "single")
75
- e.clear(), n || e.add(t.id);
76
- else if (l.selectionMode === "multiple") {
77
- const s = b(a), i = !n, r = (d, o) => {
78
- o ? e.add(d) : e.delete(d);
79
- };
80
- r(t.id, i), s.forEach((d) => r(d, i));
81
- let c = a;
82
- for (; ; ) {
83
- const d = x.value.get(c.id);
84
- if (!d) break;
85
- const o = m.value.get(d);
86
- if (!o || !o.children) break;
87
- o.children.every((B) => e.has(B.id)) ? e.add(o.id) : e.delete(o.id), c = o;
88
- }
89
- }
90
- f("update:modelValue", Array.from(e)), f("select", a, !n);
91
- }, T = y(() => {
92
- if (!l.searchQuery) return l.data;
93
- const t = l.searchQuery.toLowerCase(), a = (e) => {
94
- const s = (e.labelI18n ? k(e.labelI18n) : e.label).toLowerCase().includes(t), i = !!e.searchMatch;
95
- let r = [];
96
- return e.children && (r = e.children.map(a).filter((c) => c !== null)), s || i || r.length > 0 ? {
97
- ...e,
98
- children: r
99
- } : null;
100
- };
101
- return l.data.map(a).filter((e) => e !== null);
102
- });
103
- E(
104
- () => [l.searchQuery, l.data],
105
- ([t]) => {
106
- if (t) {
107
- const a = t.toLowerCase(), e = /* @__PURE__ */ new Set(), n = (s) => {
108
- let i = !1;
109
- if (s.children)
110
- for (const d of s.children)
111
- n(d) && (i = !0);
112
- const c = (s.labelI18n ? k(s.labelI18n) : s.label).toLowerCase().includes(a) || !!s.searchMatch;
113
- return i && e.add(s.id), c || i;
114
- };
115
- l.data.forEach(n), e.forEach((s) => u.value.add(s));
116
- }
117
- },
118
- { deep: !0 }
119
- );
120
- const K = y(() => {
121
- if (l.emptyTextI18n) return k(l.emptyTextI18n);
122
- if (l.emptyText) return l.emptyText;
123
- const t = k("vlite.fileTree.emptyText");
124
- return t !== "vlite.fileTree.emptyText" ? t : "No results found.";
125
- });
126
- return (t, a) => (g(), S("div", {
127
- class: q(["w-full h-full overflow-y-auto", l.class])
128
- }, [
129
- T.value.length > 0 ? (g(!0), S(Q, { key: 0 }, V(T.value, (e) => (g(), F(z, {
130
- key: e.id,
131
- node: e,
132
- "selection-mode": h.selectionMode,
133
- "selected-keys": w.value,
134
- "expanded-keys": u.value,
135
- "indeterminate-keys": L.value,
136
- "loading-keys": v.value,
137
- "show-checkboxes": h.showCheckboxes,
138
- "highlight-search": h.highlightSearch,
139
- "search-query": h.searchQuery,
140
- onToggleExpand: I,
141
- onToggleSelect: D,
142
- onClickNode: a[0] || (a[0] = (n) => f("node-click", n))
143
- }, null, 8, ["node", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query"]))), 128)) : (g(), S("div", A, $(K.value), 1))
144
- ], 2));
145
- }
146
- });
1
+ import o from "./FileTree.vue2.js";
2
+ /* empty css */
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-91337be9"]]);
147
5
  export {
148
- J as default
6
+ p as default
149
7
  };