vlite3 0.8.11 → 0.9.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 (84) hide show
  1. package/components/AttachmentsList/AttachmentsList.vue.d.ts +6 -0
  2. package/components/AttachmentsList/AttachmentsList.vue.js +82 -0
  3. package/components/AttachmentsList/AttachmentsList.vue2.js +4 -0
  4. package/components/AttachmentsList/index.d.ts +2 -0
  5. package/components/AttachmentsList/types.d.ts +11 -0
  6. package/components/Button.vue.js +6 -6
  7. package/components/Chat/ChatBubble.vue.d.ts +18 -0
  8. package/components/Chat/ChatInterface.vue.d.ts +45 -0
  9. package/components/Chat/index.d.ts +2 -0
  10. package/components/DataList/DataList.vue.d.ts +1 -1
  11. package/components/DataTable/DataTable.vue.d.ts +3 -3
  12. package/components/DataTable/DataTable.vue.js +22 -22
  13. package/components/DataTable/types.d.ts +1 -1
  14. package/components/DatePicker.vue.d.ts +3 -2
  15. package/components/DatePicker.vue.js +1 -1
  16. package/components/Dropdown/Dropdown.vue.d.ts +2 -0
  17. package/components/Dropdown/Dropdown.vue.js +106 -90
  18. package/components/Dropdown/DropdownItem.vue.js +8 -8
  19. package/components/Dropdown/DropdownMenu.vue.js +2 -2
  20. package/components/Dropdown/DropdownMenu.vue2.js +1 -1
  21. package/components/ExportData/ExportData.vue.d.ts +1 -1
  22. package/components/FilePicker/FilePicker.vue.d.ts +4 -1
  23. package/components/FilePicker/FilePicker.vue.js +189 -139
  24. package/components/FilePreview/FilePreview.vue.d.ts +5 -0
  25. package/components/FilePreview/FilePreview.vue.js +27 -0
  26. package/components/FilePreview/FilePreview.vue2.js +4 -0
  27. package/components/FilePreview/index.d.ts +2 -0
  28. package/components/FilePreview/types.d.ts +5 -0
  29. package/components/Form/FormField.vue.js +3 -1
  30. package/components/Form/composables/useForm.js +50 -47
  31. package/components/Input.vue.d.ts +1 -0
  32. package/components/Input.vue.js +18 -15
  33. package/components/Modal.vue.js +2 -2
  34. package/components/Modal.vue2.js +31 -31
  35. package/components/MultiSelect/MultiSelect.vue.js +92 -84
  36. package/components/Navbar/Navbar.vue.js +61 -60
  37. package/components/Screen/Screen.vue.d.ts +200 -7
  38. package/components/Screen/Screen.vue.js +306 -502
  39. package/components/Screen/ScreenFilter.vue.js +45 -42
  40. package/components/Screen/components/ScreenAddAction.vue.d.ts +15 -0
  41. package/components/Screen/components/ScreenAddAction.vue.js +107 -0
  42. package/components/Screen/components/ScreenAddAction.vue2.js +4 -0
  43. package/components/Screen/components/ScreenEmptyState.vue.d.ts +14 -0
  44. package/components/Screen/components/ScreenEmptyState.vue.js +105 -0
  45. package/components/Screen/components/ScreenEmptyState.vue2.js +4 -0
  46. package/components/Screen/components/ScreenExportModal.vue.d.ts +49 -0
  47. package/components/Screen/components/ScreenExportModal.vue.js +83 -0
  48. package/components/Screen/components/ScreenExportModal.vue2.js +4 -0
  49. package/components/Screen/components/ScreenHeaderTitle.vue.d.ts +28 -0
  50. package/components/Screen/components/ScreenHeaderTitle.vue.js +57 -0
  51. package/components/Screen/components/ScreenHeaderTitle.vue2.js +4 -0
  52. package/components/Screen/components/ScreenOptionsDropdown.vue.d.ts +10 -0
  53. package/components/Screen/components/ScreenOptionsDropdown.vue.js +43 -0
  54. package/components/Screen/components/ScreenOptionsDropdown.vue2.js +4 -0
  55. package/components/Screen/components/ScreenQuickFilters.vue.d.ts +15 -0
  56. package/components/Screen/components/ScreenQuickFilters.vue.js +36 -0
  57. package/components/Screen/components/ScreenQuickFilters.vue2.js +4 -0
  58. package/components/Screen/components/ScreenViewToggle.vue.d.ts +9 -0
  59. package/components/Screen/components/ScreenViewToggle.vue.js +48 -0
  60. package/components/Screen/components/ScreenViewToggle.vue2.js +4 -0
  61. package/components/Screen/index.d.ts +1 -0
  62. package/components/Screen/types.d.ts +41 -2
  63. package/components/SidePanel.vue.js +1 -1
  64. package/components/SidePanel.vue2.js +7 -7
  65. package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
  66. package/components/Stats/Stats.vue.js +50 -49
  67. package/components/StatusChip/StatusChip.vue.d.ts +2 -2
  68. package/components/StatusChip/StatusChip.vue.js +15 -14
  69. package/components/StatusChip/status-map.d.ts +2 -1
  70. package/components/StatusChip/status-map.js +16 -6
  71. package/components/Tabes/Tabes.vue.d.ts +1 -1
  72. package/components/Tabes/Tabes.vue.js +5 -143
  73. package/components/Tabes/Tabes.vue2.js +144 -2
  74. package/components/Timeline/TimelineIndicator.vue.js +6 -6
  75. package/components/Workbook/Sheet.vue.d.ts +1 -1
  76. package/core/config.d.ts +8 -0
  77. package/core/config.js +10 -6
  78. package/core/index.js +28 -20
  79. package/index.d.ts +2 -0
  80. package/index.js +209 -203
  81. package/package.json +3 -2
  82. package/style.css +80 -6
  83. package/types/config.type.d.ts +10 -0
  84. package/types/form.type.d.ts +1 -0
@@ -1,17 +1,17 @@
1
- import { defineComponent as P, ref as V, computed as s, watch as M, openBlock as o, createBlock as v, unref as h, withCtx as p, createVNode as k, createElementVNode as g, normalizeClass as u, createElementBlock as c, toDisplayString as S, Fragment as I, renderList as R, withModifiers as T, createCommentVNode as b, createTextVNode as U } from "vue";
1
+ import { defineComponent as P, ref as k, computed as s, watch as M, openBlock as r, createBlock as m, unref as h, withCtx as p, createCommentVNode as f, createElementVNode as g, withKeys as I, withModifiers as y, normalizeClass as c, createElementBlock as v, toDisplayString as S, Fragment as T, renderList as R, createVNode as L, createTextVNode as U } from "vue";
2
2
  import C from "../Icon.vue.js";
3
3
  import q from "../Dropdown/Dropdown.vue.js";
4
4
  import G from "../Dropdown/DropdownMenu.vue.js";
5
- import { $t as O } from "../../utils/i18n.js";
6
- import L from "../Badge.vue.js";
5
+ import { $t as $ } from "../../utils/i18n.js";
6
+ import N from "../Badge.vue.js";
7
7
  import { useMultiSelectHydration as J } from "./composables/useMultiSelectHydration.js";
8
- const K = {
8
+ const Q = ["tabindex"], W = {
9
9
  key: 0,
10
10
  class: "text-muted-foreground pl-0.5 truncate"
11
- }, Q = { class: "truncate min-w-0" }, W = ["onClick"], X = {
11
+ }, X = { class: "truncate min-w-0" }, Y = ["onClick"], Z = {
12
12
  key: 0,
13
13
  class: "flex items-center gap-2 pl-2 shrink-0 text-muted-foreground"
14
- }, re = /* @__PURE__ */ P({
14
+ }, oe = /* @__PURE__ */ P({
15
15
  __name: "MultiSelect",
16
16
  props: {
17
17
  modelValue: { default: () => [] },
@@ -34,142 +34,150 @@ const K = {
34
34
  rounded: { default: "md" }
35
35
  },
36
36
  emits: ["update:modelValue", "change", "load-more", "search"],
37
- setup(l, { emit: N }) {
38
- const t = l, i = N, m = V(!1), j = s(() => {
39
- if (t.placeholderI18n) return O(t.placeholderI18n);
40
- if (t.placeholder) return t.placeholder;
41
- const e = O("vlite.multiSelect.placeholder");
42
- return e !== "vlite.multiSelect.placeholder" ? e : "Select items...";
43
- }), y = s(() => t.options ? t.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), B = V(!1), x = V(!1);
37
+ setup(l, { emit: j }) {
38
+ const e = l, i = j, o = k(!1), D = s(() => {
39
+ if (e.placeholderI18n) return $(e.placeholderI18n);
40
+ if (e.placeholder) return e.placeholder;
41
+ const t = $("vlite.multiSelect.placeholder");
42
+ return t !== "vlite.multiSelect.placeholder" ? t : "Select items...";
43
+ }), x = s(() => e.options ? e.options.map((t) => typeof t == "string" || typeof t == "number" ? { label: String(t), value: String(t) } : t) : []), B = k(!1), w = k(!1);
44
44
  M(
45
- y,
46
- (e) => {
47
- !B.value && e.length > 0 && (B.value = !0, setTimeout(() => {
48
- x.value = !0, d.hydrateSelected(t.modelValue || []);
45
+ x,
46
+ (t) => {
47
+ !B.value && t.length > 0 && (B.value = !0, setTimeout(() => {
48
+ w.value = !0, d.hydrateSelected(e.modelValue || []);
49
49
  }, 10));
50
50
  },
51
51
  { immediate: !0 }
52
52
  );
53
- const w = s(() => {
54
- const e = [...y.value], a = new Set(e.map((n) => n.value ?? n.label));
55
- return d.selectedBuffer.value.forEach((n, r) => {
56
- a.has(r) || (e.unshift(n), a.add(r));
57
- }), e;
53
+ const V = s(() => {
54
+ const t = [...x.value], a = new Set(t.map((n) => n.value ?? n.label));
55
+ return d.selectedBuffer.value.forEach((n, u) => {
56
+ a.has(u) || (t.unshift(n), a.add(u));
57
+ }), t;
58
58
  }), d = J({
59
- fetchSelected: t.fetchSelected,
60
- getValues: () => t.modelValue || [],
61
- getOptions: () => w.value,
62
- isInitialLoadDone: () => x.value
59
+ fetchSelected: e.fetchSelected,
60
+ getValues: () => e.modelValue || [],
61
+ getOptions: () => V.value,
62
+ isInitialLoadDone: () => w.value
63
63
  });
64
64
  M(
65
- () => t.modelValue,
66
- (e) => {
67
- x.value && d.hydrateSelected(e || []);
65
+ () => e.modelValue,
66
+ (t) => {
67
+ w.value && d.hydrateSelected(t || []);
68
68
  },
69
69
  { deep: !0 }
70
70
  );
71
- const f = s(() => w.value.filter((e) => {
72
- const a = e.value ?? e.label;
73
- return t.modelValue.includes(a);
74
- })), D = s(() => f.value.slice(0, t.maxVisible)), $ = s(() => f.value.length - t.maxVisible), E = (e) => {
75
- const a = e.value ?? e.label;
76
- d.selectedBuffer.value.has(a) || d.selectedBuffer.value.set(a, e);
77
- const n = [...t.modelValue], r = n.indexOf(a);
78
- r === -1 ? n.push(a) : n.splice(r, 1), i("update:modelValue", n), i("change", n);
79
- }, H = (e) => {
80
- const a = t.modelValue.filter((n) => n !== e);
71
+ const b = s(() => V.value.filter((t) => {
72
+ const a = t.value ?? t.label;
73
+ return e.modelValue.includes(a);
74
+ })), E = s(() => b.value.slice(0, e.maxVisible)), O = s(() => b.value.length - e.maxVisible), H = (t) => {
75
+ if (e.disabled) return;
76
+ const a = t.value ?? t.label;
77
+ d.selectedBuffer.value.has(a) || d.selectedBuffer.value.set(a, t);
78
+ const n = [...e.modelValue], u = n.indexOf(a);
79
+ u === -1 ? n.push(a) : n.splice(u, 1), i("update:modelValue", n), i("change", n);
80
+ }, K = (t) => {
81
+ if (e.disabled) return;
82
+ const a = e.modelValue.filter((n) => n !== t);
81
83
  i("update:modelValue", a), i("change", a);
82
84
  }, A = () => {
83
- i("update:modelValue", []), i("change", []);
85
+ e.disabled || (i("update:modelValue", []), i("change", []));
84
86
  }, F = s(() => {
85
- const e = t.rounded === "none" ? "rounded-none" : `rounded-${t.rounded}`, a = t.variant === "transparent" ? "px-2 py-0" : "px-3 py-1.5", n = t.variant === "transparent" ? "h-full min-h-[40px]" : "min-h-[40px]";
87
+ const t = e.rounded === "none" ? "rounded-none" : `rounded-${e.rounded}`, a = e.variant === "transparent" ? "px-2 py-0" : "px-3 py-1.5", n = e.variant === "transparent" ? "h-full min-h-[40px]" : "min-h-[40px]";
86
88
  return [
87
- `flex items-center justify-between w-full ${a} ${n} ${e} border text-sm transition-colors cursor-pointer`,
88
- t.disabled ? "opacity-50 cursor-not-allowed bg-muted" : t.variant === "floating" || t.variant === "transparent" ? "bg-transparent text-foreground" : "bg-background hover:bg-gray-50/70",
89
- t.variant === "outline" || t.variant === "floating" ? "border-input" : t.variant === "transparent" ? "border-transparent" : "border-transparent bg-muted",
90
- m.value && t.variant !== "transparent" ? "border-primary/20" : ""
89
+ `flex items-center justify-between w-full ${a} ${n} ${t} border text-sm transition-colors cursor-pointer outline-none`,
90
+ e.disabled ? "opacity-50 cursor-not-allowed bg-muted" : e.variant === "floating" || e.variant === "transparent" ? "bg-transparent text-foreground" : "bg-background hover:bg-gray-50/70",
91
+ e.variant === "outline" || e.variant === "floating" ? "border-input focus-visible:ring-1 focus-visible:ring-primary" : e.variant === "transparent" ? "border-transparent" : "border-transparent bg-muted",
92
+ o.value && e.variant !== "transparent" ? "border-primary/20 ring-1 ring-primary/20" : ""
91
93
  ].join(" ");
92
- }), z = s(() => t.size === "sm" ? "xs" : "sm");
93
- return (e, a) => (o(), v(h(q), {
94
- isOpen: m.value,
95
- "onUpdate:isOpen": a[3] || (a[3] = (n) => m.value = n),
94
+ }), z = s(() => e.size === "sm" ? "xs" : "sm");
95
+ return (t, a) => (r(), m(h(q), {
96
+ isOpen: o.value,
97
+ "onUpdate:isOpen": a[5] || (a[5] = (n) => o.value = n),
96
98
  "close-on-select": !1,
97
99
  selectable: !0,
98
100
  disabled: l.disabled
99
101
  }, {
100
- trigger: p(({ isOpen: n }) => [
102
+ trigger: p(() => [
101
103
  g("div", {
102
- class: u(F.value)
104
+ class: c(F.value),
105
+ tabindex: l.disabled ? -1 : 0,
106
+ onKeydown: [
107
+ a[0] || (a[0] = I(y((n) => !l.disabled && (o.value = !o.value), ["prevent"]), ["enter"])),
108
+ a[1] || (a[1] = I(y((n) => !l.disabled && (o.value = !o.value), ["prevent"]), ["space"]))
109
+ ]
103
110
  }, [
104
111
  g("div", {
105
- class: u(["flex gap-1.5 items-center flex-1 min-w-0", [l.wrap ? "flex-wrap py-0.5" : "flex-nowrap overflow-hidden py-1"]])
112
+ class: c(["flex gap-1.5 items-center flex-1 min-w-0", [l.wrap ? "flex-wrap py-0.5" : "flex-nowrap overflow-hidden py-1"]])
106
113
  }, [
107
- f.value.length === 0 ? (o(), c("span", K, S(j.value), 1)) : (o(), c(I, { key: 1 }, [
108
- (o(!0), c(I, null, R(D.value, (r) => (o(), v(L, {
109
- key: r.value,
114
+ b.value.length === 0 ? (r(), v("span", W, S(D.value), 1)) : (r(), v(T, { key: 1 }, [
115
+ (r(!0), v(T, null, R(E.value, (n) => (r(), m(N, {
116
+ key: n.value,
110
117
  variant: l.variant === "transparent" ? "outline" : "secondary",
111
118
  size: z.value,
112
119
  rounded: l.rounded === "none" ? "sm" : "full",
113
- class: u(["gap-1 pr-1 truncate min-w-0 shrink", [
120
+ class: c(["gap-1 pr-1 truncate min-w-0 shrink", [
114
121
  l.wrap ? "max-w-[150px]" : "",
115
122
  l.variant === "transparent" ? "border-transparent bg-muted/50 text-foreground font-medium shadow-none" : ""
116
123
  ]])
117
124
  }, {
118
125
  default: p(() => [
119
- g("span", Q, S(r.labelI18n ? h(O)(r.labelI18n) : r.label), 1),
120
- l.disabled ? b("", !0) : (o(), c("button", {
126
+ g("span", X, S(n.labelI18n ? h($)(n.labelI18n) : n.label), 1),
127
+ l.disabled ? f("", !0) : (r(), v("button", {
121
128
  key: 0,
122
129
  type: "button",
123
- onClick: T((Y) => H(r.value), ["stop"]),
124
- class: u([
130
+ onClick: y((u) => K(n.value), ["stop"]),
131
+ class: c([
125
132
  "rounded transition-colors shrink-0 flex items-center justify-center p-px",
126
133
  l.variant === "transparent" ? "text-muted-foreground hover:bg-black/10 hover:text-foreground" : "hover:bg-destructive/10 hover:text-destructive p-0.5 rounded-full"
127
134
  ])
128
135
  }, [
129
- k(C, {
136
+ L(C, {
130
137
  icon: "lucide:x",
131
138
  class: "w-3 h-3"
132
139
  })
133
- ], 10, W))
140
+ ], 10, Y))
134
141
  ]),
135
142
  _: 2
136
143
  }, 1032, ["variant", "size", "rounded", "class"]))), 128)),
137
- $.value > 0 ? (o(), v(L, {
144
+ O.value > 0 ? (r(), m(N, {
138
145
  key: 0,
139
146
  variant: l.variant === "transparent" ? "outline" : "secondary",
140
147
  size: z.value,
141
148
  rounded: l.rounded === "none" ? "sm" : "full",
142
- class: u([
149
+ class: c([
143
150
  "shrink-0",
144
151
  l.variant === "transparent" ? "border-transparent bg-muted/50 text-muted-foreground font-medium shadow-none" : ""
145
152
  ])
146
153
  }, {
147
154
  default: p(() => [
148
- U(" +" + S($.value), 1)
155
+ U(" +" + S(O.value), 1)
149
156
  ]),
150
157
  _: 1
151
- }, 8, ["variant", "size", "rounded", "class"])) : b("", !0)
158
+ }, 8, ["variant", "size", "rounded", "class"])) : f("", !0)
152
159
  ], 64))
153
160
  ], 2),
154
- l.showControls ? (o(), c("div", X, [
155
- f.value.length > 0 && !l.disabled ? (o(), v(C, {
161
+ l.showControls ? (r(), v("div", Z, [
162
+ b.value.length > 0 && !l.disabled ? (r(), m(C, {
156
163
  key: 0,
157
164
  icon: "lucide:x",
158
165
  class: "w-4 h-4 hover:text-foreground transition-colors",
159
- onClick: T(A, ["stop"])
160
- })) : b("", !0),
161
- a[4] || (a[4] = g("div", { class: "w-px h-4 bg-border mx-0.5" }, null, -1)),
162
- k(C, {
166
+ onClick: y(A, ["stop"])
167
+ })) : f("", !0),
168
+ a[6] || (a[6] = g("div", { class: "w-px h-4 bg-border mx-0.5" }, null, -1)),
169
+ L(C, {
163
170
  icon: "lucide:chevron-down",
164
- class: u(["w-4 h-4 transition-transform duration-200", { "rotate-180": n }])
171
+ class: c(["w-4 h-4 transition-transform duration-200", { "rotate-180": o.value }])
165
172
  }, null, 8, ["class"])
166
- ])) : b("", !0)
167
- ], 2)
173
+ ])) : f("", !0)
174
+ ], 42, Q)
168
175
  ]),
169
176
  default: p(() => [
170
- k(h(G), {
171
- options: y.value,
172
- cachedOptions: w.value,
177
+ l.disabled ? f("", !0) : (r(), m(h(G), {
178
+ key: 0,
179
+ options: x.value,
180
+ cachedOptions: V.value,
173
181
  selected: l.modelValue,
174
182
  class: "min-w-[300px]",
175
183
  loading: l.loading || h(d).isHydrating.value,
@@ -178,16 +186,16 @@ const K = {
178
186
  remote: l.remote,
179
187
  debounceTime: l.debounceTime,
180
188
  layout: l.layout,
181
- onSelect: E,
182
- onClose: a[0] || (a[0] = (n) => m.value = !1),
183
- onLoadMore: a[1] || (a[1] = (n) => e.$emit("load-more")),
184
- onSearch: a[2] || (a[2] = (n) => e.$emit("search", n))
185
- }, null, 8, ["options", "cachedOptions", "selected", "loading", "hasMore", "searchable", "remote", "debounceTime", "layout"])
189
+ onSelect: H,
190
+ onClose: a[2] || (a[2] = (n) => o.value = !1),
191
+ onLoadMore: a[3] || (a[3] = (n) => t.$emit("load-more")),
192
+ onSearch: a[4] || (a[4] = (n) => t.$emit("search", n))
193
+ }, null, 8, ["options", "cachedOptions", "selected", "loading", "hasMore", "searchable", "remote", "debounceTime", "layout"]))
186
194
  ]),
187
195
  _: 1
188
196
  }, 8, ["isOpen", "disabled"]));
189
197
  }
190
198
  });
191
199
  export {
192
- re as default
200
+ oe as default
193
201
  };