vlite3 1.4.35 → 1.4.39

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