vlite3 1.0.4 → 1.0.6

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 (49) hide show
  1. package/components/AttachmentsList/AttachmentsList.vue.d.ts +19 -3
  2. package/components/AttachmentsList/AttachmentsList.vue.js +274 -111
  3. package/components/AttachmentsList/fileTypeIcon.d.ts +16 -0
  4. package/components/AttachmentsList/fileTypeIcon.js +127 -0
  5. package/components/AttachmentsList/index.d.ts +1 -0
  6. package/components/AttachmentsList/types.d.ts +74 -2
  7. package/components/Avatar.vue.js +2 -2
  8. package/components/Badge.vue.js +7 -7
  9. package/components/Button.vue.js +36 -43
  10. package/components/ButtonGroup.vue.js +2 -2
  11. package/components/ButtonGroup.vue2.js +8 -8
  12. package/components/CategoryManager/CategoryManager.vue.d.ts +36 -0
  13. package/components/CategoryManager/CategoryNode.vue.d.ts +15 -0
  14. package/components/CategoryManager/index.d.ts +2 -0
  15. package/components/CategoryManager/types.d.ts +43 -0
  16. package/components/Chat/ChatBubble.vue.js +70 -56
  17. package/components/Chat/ChatInterface.vue.js +182 -142
  18. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  19. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  20. package/components/Dropdown/DropdownMenu.vue.js +2 -2
  21. package/components/Dropdown/DropdownMenu.vue2.js +1 -0
  22. package/components/FilePicker/FilePicker.vue.js +117 -122
  23. package/components/Input.vue.js +28 -26
  24. package/components/Kanban/Kanban.vue.d.ts +7 -16
  25. package/components/Kanban/Kanban.vue.js +1 -1
  26. package/components/Kanban/Kanban.vue2.js +79 -47
  27. package/components/Kanban/KanbanBoard.vue.js +2 -2
  28. package/components/Kanban/KanbanBoard.vue2.js +21 -21
  29. package/components/Kanban/types.d.ts +3 -0
  30. package/components/List/List.vue.js +89 -85
  31. package/components/Navbar/Navbar.vue.d.ts +4 -0
  32. package/components/Navbar/Navbar.vue.js +196 -173
  33. package/components/Navbar/NavbarTabs.vue.js +72 -66
  34. package/components/NavbarCommandPalette.vue.js +11 -11
  35. package/components/NumberInput.vue.js +2 -2
  36. package/components/NumberInput.vue2.js +144 -104
  37. package/components/Screen/Screen.vue.d.ts +12 -29
  38. package/components/Screen/Screen.vue.js +228 -195
  39. package/components/Screen/components/ScreenViewToggle.vue.d.ts +6 -3
  40. package/components/Screen/components/ScreenViewToggle.vue.js +29 -34
  41. package/components/Screen/types.d.ts +59 -7
  42. package/components/Stats/Stats.vue.d.ts +1 -0
  43. package/components/Stats/Stats.vue.js +184 -156
  44. package/components/Stats/types.d.ts +1 -0
  45. package/components/Workbook/Sheet.vue.d.ts +1 -1
  46. package/directives/vRipple.js +28 -9
  47. package/index.js +87 -85
  48. package/package.json +1 -1
  49. package/style.css +1 -1
@@ -1,48 +1,43 @@
1
- import { defineComponent as V, computed as l, openBlock as f, createElementBlock as g, createElementVNode as n, normalizeClass as s, createVNode as d } from "vue";
2
- import i from "../../Icon.vue.js";
3
- import { $t as a } from "../../../utils/i18n.js";
4
- const p = { class: "flex items-center p-1 rounded-md bg-body border border-border shrink-0" }, w = ["title"], v = ["title"], k = /* @__PURE__ */ V({
1
+ import { defineComponent as V, computed as o, openBlock as r, createElementBlock as n, Fragment as p, renderList as g, normalizeClass as w, createVNode as k } from "vue";
2
+ import v from "../../Icon.vue.js";
3
+ import { $t as s } from "../../../utils/i18n.js";
4
+ const y = { class: "flex items-center p-1 rounded-md bg-body border border-border shrink-0" }, f = ["onClick", "title"], T = /* @__PURE__ */ V({
5
5
  __name: "ScreenViewToggle",
6
6
  props: {
7
- modelValue: {}
7
+ modelValue: {},
8
+ views: {}
8
9
  },
9
10
  emits: ["update:modelValue"],
10
- setup(o, { emit: u }) {
11
- const r = u, c = l(() => {
12
- const e = a("vlite.screen.listView");
11
+ setup(i, { emit: c }) {
12
+ const l = i, a = c, d = o(() => {
13
+ const e = s("vlite.screen.listView");
13
14
  return e !== "vlite.screen.listView" ? e : "List View";
14
- }), m = l(() => {
15
- const e = a("vlite.screen.tableView");
15
+ }), u = o(() => {
16
+ const e = s("vlite.screen.tableView");
16
17
  return e !== "vlite.screen.tableView" ? e : "Table View";
17
- });
18
- return (e, t) => (f(), g("div", p, [
19
- n("button", {
20
- onClick: t[0] || (t[0] = (b) => r("update:modelValue", "table")),
21
- class: s(["p-1.5 rounded", [
22
- o.modelValue === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
18
+ }), m = o(() => [
19
+ { key: "table", icon: "lucide:list", label: u.value },
20
+ { key: "list", icon: "lucide:layout-grid", label: d.value }
21
+ ]), b = o(
22
+ () => l.views && l.views.length > 0 ? l.views : m.value
23
+ );
24
+ return (e, _) => (r(), n("div", y, [
25
+ (r(!0), n(p, null, g(b.value, (t) => (r(), n("button", {
26
+ key: t.key,
27
+ onClick: (h) => a("update:modelValue", t.key),
28
+ class: w(["p-1.5 rounded", [
29
+ i.modelValue === t.key ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
23
30
  ]]),
24
- title: m.value
31
+ title: t.label
25
32
  }, [
26
- d(i, {
27
- icon: "lucide:list",
33
+ k(v, {
34
+ icon: t.icon || "lucide:layout-grid",
28
35
  class: "w-4 h-4"
29
- })
30
- ], 10, w),
31
- n("button", {
32
- onClick: t[1] || (t[1] = (b) => r("update:modelValue", "list")),
33
- class: s(["p-1.5 rounded", [
34
- o.modelValue === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
35
- ]]),
36
- title: c.value
37
- }, [
38
- d(i, {
39
- icon: "lucide:layout-grid",
40
- class: "w-4 h-4"
41
- })
42
- ], 10, v)
36
+ }, null, 8, ["icon"])
37
+ ], 10, f))), 128))
43
38
  ]));
44
39
  }
45
40
  });
46
41
  export {
47
- k as default
42
+ T as default
48
43
  };
@@ -33,6 +33,31 @@ export interface ScreenQuickFilter {
33
33
  /** Optional badge/count displayed next to the label */
34
34
  count?: number;
35
35
  }
36
+ /**
37
+ * A named view definition for dynamic multi-view support.
38
+ * Pass an array of these via the `views` prop to render any number of views
39
+ * (table, list, kanban, calendar, etc.) with automatic toggle buttons.
40
+ *
41
+ * @example
42
+ * :views="[
43
+ * { key: 'table', component: UserTable, icon: 'lucide:list', label: 'Table' },
44
+ * { key: 'list', component: UserList, icon: 'lucide:layout-grid', label: 'Grid' },
45
+ * { key: 'kanban', component: UserKanban, icon: 'lucide:kanban', label: 'Kanban' },
46
+ * { key: 'calendar', component: UserCalendar, icon: 'lucide:calendar', label: 'Calendar' },
47
+ * ]"
48
+ */
49
+ export interface ScreenView {
50
+ /** Unique key used to identify and persist this view */
51
+ key: string;
52
+ /** The Vue component to render for this view */
53
+ component: Component | any;
54
+ /** Icon string (e.g. lucide icon name) shown in the view toggle button */
55
+ icon?: string;
56
+ /** Tooltip / aria-label for the toggle button */
57
+ label?: string;
58
+ /** i18n key for the label */
59
+ labelI18n?: string;
60
+ }
36
61
  export interface ScreenProps {
37
62
  name?: string;
38
63
  title?: string;
@@ -73,8 +98,31 @@ export interface ScreenProps {
73
98
  exportMode?: 'frontend' | 'backend';
74
99
  importType?: string;
75
100
  exportType?: string;
101
+ /**
102
+ * Legacy: single list component (list/grid view).
103
+ * Prefer `views` prop for multi-view support.
104
+ */
76
105
  list?: Component | any;
106
+ /**
107
+ * Legacy: single table component.
108
+ * Prefer `views` prop for multi-view support.
109
+ */
77
110
  table?: Component | any;
111
+ /**
112
+ * Dynamic multi-view definitions. When provided, replaces the legacy
113
+ * `table` / `list` props and renders a toggle button for each view.
114
+ * Supports any number of views: table, list, kanban, calendar, etc.
115
+ *
116
+ * The first entry becomes the default active view (unless persisted state exists).
117
+ *
118
+ * @example
119
+ * :views="[
120
+ * { key: 'table', component: UserTable, icon: 'lucide:list', label: 'Table' },
121
+ * { key: 'kanban', component: UserKanban, icon: 'lucide:kanban', label: 'Kanban' },
122
+ * { key: 'calendar', component: UserCalendar, icon: 'lucide:calendar', label: 'Calendar' },
123
+ * ]"
124
+ */
125
+ views?: ScreenView[];
78
126
  customHeader?: boolean;
79
127
  canSearch?: boolean;
80
128
  canAdd?: boolean;
@@ -92,15 +140,13 @@ export interface ScreenProps {
92
140
  /**
93
141
  * Quick-filter tabs rendered below the header (above the content).
94
142
  * Inspired by modern dashboards (Shopify, Linear, Vercel).
95
- * Example:
96
- * [
97
- * { label: 'All', value: '' },
98
- * { label: 'Active', value: 'active' },
99
- * { label: 'Draft', value: 'draft' },
100
- * { label: 'Archived', value: 'archived' },
101
- * ]
102
143
  */
103
144
  quickFilters?: ScreenQuickFilter[];
145
+ /**
146
+ * Optional array of view keys (e.g., ['table', 'list']) where quick filters should be visible.
147
+ * If omitted, quick filters are shown on all views.
148
+ */
149
+ quickFilterViews?: string[];
104
150
  /**
105
151
  * The key used to inject the active quick filter into the refetch filter payload.
106
152
  * Defaults to 'status'.
@@ -111,4 +157,10 @@ export interface ScreenProps {
111
157
  */
112
158
  defaultQuickFilter?: string | number;
113
159
  quickFilterVariant?: TabesVariant;
160
+ /**
161
+ * Array of view keys that should bypass the default empty state
162
+ * and always render their component even when there is no data.
163
+ * Useful for kanban boards or calendars where empty columns/grids are needed.
164
+ */
165
+ skipEmptyViews?: string[];
114
166
  }
@@ -2,6 +2,7 @@ import { StatsProps } from './types';
2
2
  declare const _default: import('vue').DefineComponent<StatsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StatsProps> & Readonly<{}>, {
3
3
  class: string;
4
4
  variant: import('./types').StatsVariant;
5
+ loading: boolean;
5
6
  columns: number | string;
6
7
  layout: import('./types').StatsLayout;
7
8
  attached: boolean;