vlite3 1.4.37 → 1.4.40

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 (48) hide show
  1. package/components/Badge.vue.js +5 -5
  2. package/components/Badge.vue3.js +5 -0
  3. package/components/CategoryManager/CategoryManager.vue2.js +5 -4
  4. package/components/Chip/Chip.vue.js +21 -21
  5. package/components/Chip/Chip.vue3.js +5 -0
  6. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  7. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  8. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  9. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  10. package/components/Comment/CommentItem.vue2.js +3 -2
  11. package/components/DataTable/DataTable.vue.d.ts +1 -0
  12. package/components/DataTable/DataTable.vue.js +204 -203
  13. package/components/DataTable/DataTableRow.vue.js +54 -51
  14. package/components/DataTable/types.d.ts +5 -0
  15. package/components/DataTable/useDataTableTree.d.ts +4 -3
  16. package/components/DataTable/useDataTableTree.js +102 -92
  17. package/components/FileTree/FileTree.vue.d.ts +3 -1
  18. package/components/FileTree/FileTree.vue.js +1 -1
  19. package/components/FileTree/FileTree.vue2.js +157 -116
  20. package/components/FileTree/FileTreeNode.vue.d.ts +9 -5
  21. package/components/FileTree/FileTreeNode.vue.js +147 -189
  22. package/components/Form/{AccordionView.vue2.js → AccordionView.vue.js} +1 -1
  23. package/components/Form/Form.vue2.js +45 -43
  24. package/components/Form/index.vue2.js +1 -1
  25. package/components/ImportData/ImportData.vue.js +4 -2
  26. package/components/Invoice/InvoiceVariant1.vue.js +3 -2
  27. package/components/Invoice/InvoiceVariant2.vue.js +3 -2
  28. package/components/Invoice/InvoiceVariant3.vue.js +3 -2
  29. package/components/Invoice/InvoiceVariant4.vue.js +3 -2
  30. package/components/MultiSelect/MultiSelect.vue.js +3 -2
  31. package/components/NavbarCommandPalette.vue.js +1 -1
  32. package/components/PricingPlan/PricingPlanItem.vue.js +10 -9
  33. package/components/Screen/ScreenFilter.vue.js +20 -19
  34. package/components/StatusChip/StatusChip.vue.js +8 -7
  35. package/components/StatusChip/StatusChip.vue3.js +5 -0
  36. package/components/Timeline/TimelineItem.vue.js +3 -2
  37. package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
  38. package/components/TreeConnectors/TreeConnectors.vue.js +26 -17
  39. package/components/TreeConnectors/geometry.d.ts +29 -3
  40. package/components/TreeConnectors/geometry.js +128 -46
  41. package/components/TreeConnectors/index.d.ts +1 -1
  42. package/index.js +473 -470
  43. package/package.json +1 -1
  44. package/style.css +15 -1
  45. package/components/Badge.vue2.js +0 -4
  46. package/components/Chip/Chip.vue2.js +0 -4
  47. package/components/StatusChip/StatusChip.vue2.js +0 -4
  48. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
@@ -1,226 +1,184 @@
1
- import { defineComponent as U, computed as d, resolveComponent as G, openBlock as a, createElementBlock as o, createElementVNode as g, normalizeClass as m, normalizeStyle as k, createCommentVNode as u, createVNode as w, unref as H, withModifiers as C, createBlock as f, Fragment as K, renderList as M, toDisplayString as S, renderSlot as I, isMemoSame as J, createSlots as W, withCtx as X, mergeProps as Y } from "vue";
2
- import y from "../Icon.vue.js";
3
- import Z from "../CheckBox.vue.js";
4
- import p from "../TreeConnectors/TreeConnectors.vue.js";
5
- import { $t as _ } from "../../utils/i18n.js";
6
- const ee = { class: "flex flex-col select-none" }, te = ["title"], ne = {
1
+ import { defineComponent as z, computed as d, openBlock as o, createElementBlock as a, createElementVNode as c, normalizeClass as r, normalizeStyle as b, createCommentVNode as f, createVNode as y, unref as P, withModifiers as v, createBlock as m, Fragment as w, renderList as C, toDisplayString as k, renderSlot as A } from "vue";
2
+ import h from "../Icon.vue.js";
3
+ import D from "../CheckBox.vue.js";
4
+ import O from "../TreeConnectors/TreeConnectors.vue.js";
5
+ import { EMPTY_ANCESTOR_LAST_FLAGS as Q } from "../TreeConnectors/geometry.js";
6
+ import { $t as V } from "../../utils/i18n.js";
7
+ const R = { class: "flex flex-col select-none" }, j = ["title"], q = {
7
8
  key: 1,
8
9
  class: "relative z-10 w-6 mr-1"
9
- }, le = { class: "mr-2 text-muted-foreground shrink-0" }, se = { class: "flex-1 truncate text-sm font-medium" }, ae = { class: "mr-2 text-gray-400 select-none shrink-0" }, ie = { class: "truncate" }, oe = {
10
- key: 0,
11
- class: "relative flex flex-col"
12
- }, P = 20, ue = /* @__PURE__ */ U({
10
+ }, G = { class: "mr-2 text-muted-foreground shrink-0" }, U = { class: "flex-1 truncate text-sm font-medium" }, Y = { class: "mr-2 text-gray-400 select-none shrink-0" }, H = { class: "truncate" }, x = 20, ee = /* @__PURE__ */ z({
13
11
  name: "FileTreeNode",
14
12
  __name: "FileTreeNode",
15
13
  props: {
16
14
  node: {},
17
15
  depth: { default: 0 },
18
16
  selectionMode: { default: "single" },
19
- selectedKeys: {},
20
- indeterminateKeys: {},
21
- expandedKeys: {},
22
- loadingKeys: {},
17
+ isSelected: { type: Boolean, default: !1 },
18
+ isIndeterminate: { type: Boolean, default: !1 },
19
+ isExpanded: { type: Boolean, default: !1 },
20
+ isLoading: { type: Boolean, default: !1 },
23
21
  showCheckboxes: { type: Boolean, default: !1 },
24
22
  highlightSearch: { type: Boolean, default: !1 },
25
23
  searchQuery: {},
26
24
  variant: { default: "default" },
27
25
  maxLabelLength: { default: 35 },
28
26
  isLast: { type: Boolean, default: !0 },
29
- ancestorLastFlags: { default: () => [] }
27
+ ancestorLastFlags: { default: () => Q }
30
28
  },
31
29
  emits: ["toggle-expand", "toggle-select", "click-node"],
32
- setup(e, { emit: Q }) {
33
- const n = e, x = Q, L = d(() => n.selectedKeys.has(n.node.id)), q = d(() => n.indeterminateKeys.has(n.node.id)), v = d(() => n.expandedKeys.has(n.node.id)), $ = d(() => n.loadingKeys.has(n.node.id)), h = d(
34
- () => !!(n.node.isFolder || n.node.children && n.node.children.length > 0)
35
- ), F = d(() => [...n.ancestorLastFlags, n.isLast]), D = d(() => n.depth * P + "px"), N = d(() => n.node.labelI18n ? _(n.node.labelI18n) : n.node.label), V = d(() => {
36
- const t = N.value, l = n.maxLabelLength;
30
+ setup(e, { emit: S }) {
31
+ const s = e, u = S, g = d(
32
+ () => !!(s.node.isFolder || s.node.children && s.node.children.length > 0)
33
+ ), M = d(() => `${s.depth * x}px`), L = d(
34
+ () => s.node.labelI18n ? V(s.node.labelI18n) : s.node.label
35
+ ), E = d(() => {
36
+ const t = L.value, l = s.maxLabelLength;
37
37
  if (t.length <= l) return t;
38
- const s = t.lastIndexOf(".");
39
- if (s === -1 || t.length - s > 10)
38
+ const n = t.lastIndexOf(".");
39
+ if (n === -1 || t.length - n > 10)
40
40
  return t.substring(0, l) + "...";
41
- const i = t.substring(s), r = t.substring(0, s), E = Math.max(0, l - i.length - 3);
42
- return r.substring(0, E) + "..." + i;
43
- }), O = d(() => {
44
- const t = V.value;
45
- if (!n.highlightSearch || !n.searchQuery)
41
+ const i = t.substring(n), I = t.substring(0, n), $ = Math.max(0, l - i.length - 3);
42
+ return I.substring(0, $) + "..." + i;
43
+ }), B = d(() => {
44
+ const t = E.value;
45
+ if (!s.highlightSearch || !s.searchQuery)
46
46
  return [{ text: t, highlight: !1 }];
47
- const l = n.searchQuery.toLowerCase(), s = t.toLowerCase().indexOf(l);
48
- return s === -1 ? [{ text: t, highlight: !1 }] : [
49
- { text: t.slice(0, s), highlight: !1 },
47
+ const l = s.searchQuery.toLowerCase(), n = t.toLowerCase().indexOf(l);
48
+ return n === -1 ? [{ text: t, highlight: !1 }] : [
49
+ { text: t.slice(0, n), highlight: !1 },
50
50
  {
51
- text: t.slice(s, s + l.length),
51
+ text: t.slice(n, n + l.length),
52
52
  highlight: !0
53
53
  },
54
- { text: t.slice(s + l.length), highlight: !1 }
54
+ { text: t.slice(n + l.length), highlight: !1 }
55
55
  ];
56
- }), j = d(() => {
57
- const t = n.node.searchMatch;
56
+ }), F = d(() => {
57
+ const t = s.node.searchMatch;
58
58
  if (!t) return [];
59
- const l = t.line_content, s = t.match_start, i = t.match_length;
60
- return s < 0 || s >= l.length ? [{ text: l, highlight: !1 }] : [
61
- { text: l.substring(0, s), highlight: !1 },
62
- { text: l.substring(s, s + i), highlight: !0 },
63
- { text: l.substring(s + i), highlight: !1 }
59
+ const l = t.line_content, n = t.match_start, i = t.match_length;
60
+ return n < 0 || n >= l.length ? [{ text: l, highlight: !1 }] : [
61
+ { text: l.substring(0, n), highlight: !1 },
62
+ { text: l.substring(n, n + i), highlight: !0 },
63
+ { text: l.substring(n + i), highlight: !1 }
64
64
  ];
65
- }), T = (t) => {
66
- t && t.stopPropagation(), x("toggle-expand", n.node);
67
- }, A = () => {
68
- x("toggle-select", n.node);
69
- }, R = (t) => {
70
- t.stopPropagation(), h.value ? T() : n.selectionMode !== "none" && x("toggle-select", n.node), x("click-node", n.node);
65
+ }), p = (t) => {
66
+ t && t.stopPropagation(), u("toggle-expand", s.node);
67
+ }, N = () => {
68
+ u("toggle-select", s.node);
69
+ }, T = (t) => {
70
+ t.stopPropagation(), g.value ? p() : s.selectionMode !== "none" && u("toggle-select", s.node), u("click-node", s.node);
71
71
  };
72
- return (t, l) => {
73
- const s = G("FileTreeNode", !0);
74
- return a(), o("div", ee, [
75
- g("div", {
76
- class: m(["group flex flex-col transition-colors cursor-pointer relative", {
77
- "bg-accent/50 text-accent-foreground": L.value && e.selectionMode === "single" && !e.showCheckboxes,
78
- "hover:bg-accent/50": !L.value || e.selectionMode !== "single",
79
- "opacity-50 pointer-events-none": e.node.disabled,
80
- "rounded-none": e.variant === "bordered",
81
- "rounded-md": e.variant === "default"
82
- }]),
83
- onClick: R,
84
- title: N.value
72
+ return (t, l) => (o(), a("div", R, [
73
+ c("div", {
74
+ class: r(["group flex flex-col transition-colors cursor-pointer relative", {
75
+ "bg-accent/50 text-accent-foreground": e.isSelected && e.selectionMode === "single" && !e.showCheckboxes,
76
+ "hover:bg-accent/50": !e.isSelected || e.selectionMode !== "single",
77
+ "opacity-50 pointer-events-none": e.node.disabled,
78
+ "rounded-none": e.variant === "bordered",
79
+ "rounded-md": e.variant === "default"
80
+ }]),
81
+ title: L.value,
82
+ onClick: T
83
+ }, [
84
+ e.variant === "bordered" ? (o(), a("div", {
85
+ key: 0,
86
+ class: "absolute bottom-0 right-0 h-[1px] bg-border pointer-events-none",
87
+ style: b({ left: e.depth * x + "px" })
88
+ }, null, 4)) : f("", !0),
89
+ c("div", {
90
+ class: r(["relative flex items-center pr-2", e.variant === "bordered" ? "py-2 min-h-[40px]" : "py-1 min-h-[32px]"]),
91
+ style: b({ paddingLeft: M.value })
85
92
  }, [
86
- e.variant === "bordered" ? (a(), o("div", {
93
+ y(P(O), {
94
+ depth: e.depth,
95
+ "is-last-sibling": e.isLast,
96
+ "ancestor-last-flags": e.ancestorLastFlags,
97
+ "has-toggle": g.value,
98
+ indent: x,
99
+ "line-class": "bg-border"
100
+ }, null, 8, ["depth", "is-last-sibling", "ancestor-last-flags", "has-toggle"]),
101
+ g.value ? (o(), a("button", {
87
102
  key: 0,
88
- class: "absolute bottom-0 right-0 h-[1px] bg-border pointer-events-none",
89
- style: k({ left: e.depth * 20 + "px" })
90
- }, null, 4)) : u("", !0),
91
- g("div", {
92
- class: m(["relative flex items-center pr-2", e.variant === "bordered" ? "py-2 min-h-[40px]" : "py-1 min-h-[32px]"]),
93
- style: k({ paddingLeft: D.value })
103
+ type: "button",
104
+ class: r(["relative z-10 p-1 mr-1 rounded-sm hover:bg-muted text-muted-foreground transition-transform duration-200 focus:outline-none", { "rotate-90": e.isExpanded }]),
105
+ onClick: v(p, ["stop"])
94
106
  }, [
95
- w(H(p), {
96
- depth: e.depth,
97
- "is-last-sibling": e.isLast,
98
- "ancestor-last-flags": e.ancestorLastFlags,
99
- "has-toggle": h.value,
100
- indent: P,
101
- "line-class": "bg-border"
102
- }, null, 8, ["depth", "is-last-sibling", "ancestor-last-flags", "has-toggle"]),
103
- h.value ? (a(), o("button", {
107
+ y(h, {
108
+ icon: "lucide:chevron-right",
109
+ class: "w-4 h-4"
110
+ })
111
+ ], 2)) : (o(), a("div", q)),
112
+ e.showCheckboxes && e.selectionMode !== "none" ? (o(), a("div", {
113
+ key: 2,
114
+ class: "mr-2 flex items-center justify-center bg-transparent",
115
+ onClick: l[0] || (l[0] = v(() => {
116
+ }, ["stop"]))
117
+ }, [
118
+ y(D, {
119
+ checked: e.isSelected,
120
+ indeterminate: e.isIndeterminate,
121
+ disabled: e.node.disabled,
122
+ rounded: "sm",
123
+ size: "sm",
124
+ "onUpdate:checked": N
125
+ }, null, 8, ["checked", "indeterminate", "disabled"])
126
+ ])) : f("", !0),
127
+ c("div", G, [
128
+ e.isLoading ? (o(), m(h, {
104
129
  key: 0,
105
- type: "button",
106
- class: m(["relative z-10 p-1 mr-1 rounded-sm hover:bg-muted text-muted-foreground transition-transform duration-200 focus:outline-none", { "rotate-90": v.value }]),
107
- onClick: C(T, ["stop"])
108
- }, [
109
- w(y, {
110
- icon: "lucide:chevron-right",
111
- class: "w-4 h-4"
112
- })
113
- ], 2)) : (a(), o("div", ne)),
114
- e.showCheckboxes && e.selectionMode !== "none" ? (a(), o("div", {
130
+ icon: "lucide:loader-2",
131
+ class: "w-4 h-4 animate-spin"
132
+ })) : e.node.icon ? (o(), m(h, {
133
+ key: 1,
134
+ icon: e.node.icon,
135
+ class: "w-4 h-4"
136
+ }, null, 8, ["icon"])) : g.value ? (o(), m(h, {
115
137
  key: 2,
116
- class: "mr-2 flex items-center justify-center bg-transparent",
117
- onClick: l[0] || (l[0] = C(() => {
118
- }, ["stop"]))
119
- }, [
120
- w(Z, {
121
- checked: L.value,
122
- indeterminate: q.value,
123
- disabled: e.node.disabled,
124
- "onUpdate:checked": A,
125
- rounded: "sm",
126
- size: "sm"
127
- }, null, 8, ["checked", "indeterminate", "disabled"])
128
- ])) : u("", !0),
129
- g("div", le, [
130
- $.value ? (a(), f(y, {
131
- key: 0,
132
- icon: "lucide:loader-2",
133
- class: "w-4 h-4 animate-spin"
134
- })) : e.node.icon ? (a(), f(y, {
135
- key: 1,
136
- icon: e.node.icon,
137
- class: "w-4 h-4"
138
- }, null, 8, ["icon"])) : h.value ? (a(), f(y, {
139
- key: 2,
140
- icon: v.value ? "lucide:folder-open" : "lucide:folder",
141
- class: "w-4 h-4"
142
- }, null, 8, ["icon"])) : (a(), f(y, {
143
- key: 3,
144
- icon: "lucide:file",
145
- class: "w-4 h-4"
146
- }))
147
- ]),
148
- g("div", se, [
149
- (a(!0), o(K, null, M(O.value, (i, r) => (a(), o("span", {
150
- key: r,
151
- class: m({
152
- "bg-yellow-100 text-yellow-900 rounded-sm px-0.5": i.highlight
153
- })
154
- }, S(i.text), 3))), 128))
155
- ]),
156
- t.$slots.actions ? (a(), o("div", {
138
+ icon: e.isExpanded ? "lucide:folder-open" : "lucide:folder",
139
+ class: "w-4 h-4"
140
+ }, null, 8, ["icon"])) : (o(), m(h, {
157
141
  key: 3,
158
- class: "ml-2 flex items-center shrink-0",
159
- onClick: l[1] || (l[1] = C(() => {
160
- }, ["stop"]))
161
- }, [
162
- I(t.$slots, "actions", { node: e.node })
163
- ])) : u("", !0)
164
- ], 6),
165
- e.node.searchMatch ? (a(), o("div", {
166
- key: 1,
167
- class: "flex items-center text-[11px] text-gray-500 font-mono pr-2 pb-1.5 truncate",
168
- style: k({ paddingLeft: e.depth * 20 + 28 + "px" })
142
+ icon: "lucide:file",
143
+ class: "w-4 h-4"
144
+ }))
145
+ ]),
146
+ c("div", U, [
147
+ (o(!0), a(w, null, C(B.value, (n, i) => (o(), a("span", {
148
+ key: i,
149
+ class: r({
150
+ "bg-yellow-100 text-yellow-900 rounded-sm px-0.5": n.highlight
151
+ })
152
+ }, k(n.text), 3))), 128))
153
+ ]),
154
+ t.$slots.actions ? (o(), a("div", {
155
+ key: 3,
156
+ class: "ml-2 flex items-center shrink-0",
157
+ onClick: l[1] || (l[1] = v(() => {
158
+ }, ["stop"]))
169
159
  }, [
170
- g("span", ae, "L" + S(e.node.searchMatch.line_number), 1),
171
- g("div", ie, [
172
- (a(!0), o(K, null, M(j.value, (i, r) => (a(), o("span", {
173
- key: r,
174
- class: m({
175
- "bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30": i.highlight
176
- })
177
- }, S(i.text), 3))), 128))
178
- ])
179
- ], 4)) : u("", !0)
180
- ], 10, te),
181
- v.value && h.value && !$.value ? (a(), o("div", oe, [
182
- e.node.children && e.node.children.length > 0 ? (a(!0), o(K, { key: 0 }, M(e.node.children, (i, r, E, b) => {
183
- const B = [i, e.selectedKeys, e.expandedKeys, e.indeterminateKeys, e.loadingKeys, e.highlightSearch, e.searchQuery, e.showCheckboxes, e.variant, e.maxLabelLength, F.value, r === e.node.children.length - 1, !!t.$slots.actions];
184
- if (b && b.key === i.id && J(b, B)) return b;
185
- const z = (a(), f(s, {
186
- key: i.id,
187
- node: i,
188
- depth: e.depth + 1,
189
- "is-last": r === e.node.children.length - 1,
190
- "ancestor-last-flags": F.value,
191
- "selection-mode": e.selectionMode,
192
- "selected-keys": e.selectedKeys,
193
- "expanded-keys": e.expandedKeys,
194
- "indeterminate-keys": e.indeterminateKeys,
195
- "loading-keys": e.loadingKeys,
196
- "show-checkboxes": e.showCheckboxes,
197
- "highlight-search": e.highlightSearch,
198
- "search-query": e.searchQuery,
199
- variant: e.variant,
200
- "max-label-length": e.maxLabelLength,
201
- onToggleExpand: l[2] || (l[2] = (c) => t.$emit("toggle-expand", c)),
202
- onToggleSelect: l[3] || (l[3] = (c) => t.$emit("toggle-select", c)),
203
- onClickNode: l[4] || (l[4] = (c) => t.$emit("click-node", c))
204
- }, W({ _: 2 }, [
205
- t.$slots.actions ? {
206
- name: "actions",
207
- fn: X((c) => [
208
- I(t.$slots, "actions", Y({ ref_for: !0 }, c))
209
- ]),
210
- key: "0"
211
- } : void 0
212
- ]), 1032, ["node", "depth", "is-last", "ancestor-last-flags", "selection-mode", "selected-keys", "expanded-keys", "indeterminate-keys", "loading-keys", "show-checkboxes", "highlight-search", "search-query", "variant", "max-label-length"]));
213
- return z.memo = B, z;
214
- }, l, 5), 128)) : v.value && h.value && (!e.node.children || e.node.children.length === 0) ? (a(), o("div", {
215
- key: 1,
216
- class: "py-0.5 text-xs text-muted-foreground italic",
217
- style: k({ paddingLeft: (e.depth + 1) * 20 + 26 + "px" })
218
- }, null, 4)) : u("", !0)
219
- ])) : u("", !0)
220
- ]);
221
- };
160
+ A(t.$slots, "actions", { node: e.node })
161
+ ])) : f("", !0)
162
+ ], 6),
163
+ e.node.searchMatch ? (o(), a("div", {
164
+ key: 1,
165
+ class: "flex items-center text-[11px] text-gray-500 font-mono pr-2 pb-1.5 truncate",
166
+ style: b({ paddingLeft: e.depth * x + 28 + "px" })
167
+ }, [
168
+ c("span", Y, "L" + k(e.node.searchMatch.line_number), 1),
169
+ c("div", H, [
170
+ (o(!0), a(w, null, C(F.value, (n, i) => (o(), a("span", {
171
+ key: i,
172
+ class: r({
173
+ "bg-yellow-500/20 text-gray-900 px-0.5 rounded-[1px] font-medium border border-yellow-600/30": n.highlight
174
+ })
175
+ }, k(n.text), 3))), 128))
176
+ ])
177
+ ], 4)) : f("", !0)
178
+ ], 10, j)
179
+ ]));
222
180
  }
223
181
  });
224
182
  export {
225
- ue as default
183
+ ee as default
226
184
  };
@@ -1,5 +1,5 @@
1
1
  import o from "./AccordionView.vue3.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-bb30cb10"]]);
5
5
  export {