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,17 +1,4 @@
1
- import { KanbanColumn, KanbanLoadDataResult, KanbanChangeEvent, KanbanMoveEvent } from './types';
2
- type __VLS_Props = {
3
- columns: KanbanColumn[];
4
- group?: string;
5
- itemKey?: string;
6
- loadData?: (columnId: string | number, page: number) => Promise<KanbanLoadDataResult>;
7
- data?: Record<string | number, any[]>;
8
- boardClass?: string;
9
- headerClass?: string;
10
- bodyClass?: string;
11
- draggableClass?: string;
12
- ghostClass?: string;
13
- class?: string;
14
- };
1
+ import { KanbanColumn, KanbanChangeEvent, KanbanMoveEvent, KanbanProps } from './types';
15
2
  declare function __VLS_template(): {
16
3
  attrs: Partial<{}>;
17
4
  slots: {
@@ -40,18 +27,22 @@ declare function __VLS_template(): {
40
27
  rootEl: HTMLDivElement;
41
28
  };
42
29
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
43
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
30
+ declare const __VLS_component: import('vue').DefineComponent<KanbanProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
44
31
  change: (payload: KanbanChangeEvent) => any;
45
32
  move: (payload: KanbanMoveEvent) => any;
46
33
  "update:data": (val: Record<string | number, any[]>) => any;
47
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
34
+ "item-moved": (itemId: string | number, toColumnId: string | number, newPosition: number, item: any) => any;
35
+ }, string, import('vue').PublicProps, Readonly<KanbanProps> & Readonly<{
48
36
  onChange?: (payload: KanbanChangeEvent) => any;
49
37
  onMove?: (payload: KanbanMoveEvent) => any;
50
38
  "onUpdate:data"?: (val: Record<string | number, any[]>) => any;
39
+ "onItem-moved"?: (itemId: string | number, toColumnId: string | number, newPosition: number, item: any) => any;
51
40
  }>, {
52
41
  class: string;
53
42
  group: string;
54
43
  itemKey: string;
44
+ groupKey: string;
45
+ positionKey: string;
55
46
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
56
47
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
57
48
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import o from "./Kanban.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-50c60912"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2b04ec18"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as C, ref as h, openBlock as c, createElementBlock as i, normalizeClass as b, Fragment as x, renderList as k, createBlock as w, withCtx as r, renderSlot as m, mergeProps as u } from "vue";
2
- import K from "./KanbanBoard.vue.js";
3
- const $ = /* @__PURE__ */ C({
1
+ import { defineComponent as x, ref as g, watch as k, openBlock as v, createElementBlock as h, normalizeClass as B, Fragment as D, renderList as w, createBlock as P, withCtx as i, renderSlot as m, mergeProps as c } from "vue";
2
+ import E from "./KanbanBoard.vue.js";
3
+ const A = /* @__PURE__ */ x({
4
4
  __name: "Kanban",
5
5
  props: {
6
6
  columns: {},
@@ -8,6 +8,9 @@ const $ = /* @__PURE__ */ C({
8
8
  itemKey: { default: "id" },
9
9
  loadData: {},
10
10
  data: {},
11
+ rawData: {},
12
+ groupKey: { default: "status" },
13
+ positionKey: { default: "position" },
11
14
  boardClass: {},
12
15
  headerClass: {},
13
16
  bodyClass: {},
@@ -15,62 +18,91 @@ const $ = /* @__PURE__ */ C({
15
18
  ghostClass: {},
16
19
  class: { default: "h-full w-full" }
17
20
  },
18
- emits: ["change", "move", "update:data"],
19
- setup(t, { emit: v }) {
20
- const d = t, s = v, o = h({}), f = (e) => {
21
- if (s("change", e), e.type === "remove" ? o.value.remove = { columnId: e.columnId, event: e.event } : e.type === "add" ? o.value.add = { columnId: e.columnId, event: e.event } : e.type === "update" && s("move", {
22
- itemId: e.event.data?.[d.itemKey] || e.event.item?._underlying_vm_?.[d.itemKey],
21
+ emits: ["change", "move", "update:data", "item-moved"],
22
+ setup(r, { emit: C }) {
23
+ const n = r, d = C, l = g({}), u = g({});
24
+ k(
25
+ [() => n.data, () => n.rawData],
26
+ ([e, o]) => {
27
+ if (o && Array.isArray(o)) {
28
+ const t = {};
29
+ n.columns.forEach((a) => t[a.id] = []), o.forEach((a) => {
30
+ const s = a[n.groupKey];
31
+ t[s] ? t[s].push({ ...a }) : t[s] = [{ ...a }];
32
+ }), Object.keys(t).forEach((a) => {
33
+ t[a].sort((s, y) => (s[n.positionKey] || 0) - (y[n.positionKey] || 0));
34
+ }), u.value = t;
35
+ } else e && (u.value = { ...e });
36
+ },
37
+ { immediate: !0, deep: !0 }
38
+ );
39
+ const b = (e, o) => {
40
+ let t = 0, a = 0;
41
+ return o > 0 && (t = Number(e[o - 1]?.[n.positionKey]) || 0), o < e.length - 1 && (a = Number(e[o + 1]?.[n.positionKey]) || 0), t === 0 && a === 0 ? 1024 : t === 0 ? a / 2 : a === 0 ? t + 1024 : (t + a) / 2;
42
+ }, f = (e, o) => {
43
+ const t = u.value[e];
44
+ if (!t) return;
45
+ const a = t[o];
46
+ if (!a) return;
47
+ const s = b(t, o);
48
+ a[n.positionKey] = s, a[n.groupKey] = e, d("item-moved", a[n.itemKey], e, s, a);
49
+ }, I = (e) => {
50
+ if (d("change", e), e.type === "remove" ? l.value.remove = { columnId: e.columnId, event: e.event } : e.type === "add" ? l.value.add = { columnId: e.columnId, event: e.event } : e.type === "update" && (f(e.columnId, e.event.newIndex), d("move", {
51
+ itemId: e.event.data?.[n.itemKey] || e.event.item?._underlying_vm_?.[n.itemKey],
23
52
  item: e.event.data,
24
53
  fromColumnId: e.columnId,
25
54
  toColumnId: e.columnId,
26
55
  oldIndex: e.event.oldIndex,
27
56
  newIndex: e.event.newIndex
28
- }), o.value.remove && o.value.add) {
29
- const { remove: l, add: a } = o.value;
30
- s("move", {
31
- itemId: a.event.data?.[d.itemKey],
32
- item: a.event.data,
33
- fromColumnId: l.columnId,
34
- toColumnId: a.columnId,
35
- oldIndex: l.event.oldIndex,
36
- newIndex: a.event.newIndex
37
- }), o.value = {};
57
+ })), l.value.remove && l.value.add) {
58
+ const { remove: o, add: t } = l.value;
59
+ f(t.columnId, t.event.newIndex), d("move", {
60
+ itemId: t.event.data?.[n.itemKey],
61
+ item: t.event.data,
62
+ fromColumnId: o.columnId,
63
+ toColumnId: t.columnId,
64
+ oldIndex: o.event.oldIndex,
65
+ newIndex: t.event.newIndex
66
+ }), l.value = {};
38
67
  }
39
68
  setTimeout(() => {
40
- o.value = {};
69
+ l.value = {};
41
70
  }, 100);
42
- }, g = (e, l) => {
43
- d.data && s("update:data", { ...d.data, [e]: l });
44
- }, I = (e) => d.data ? d.data[e] || [] : [];
45
- return (e, l) => (c(), i("div", {
46
- class: b(["flex gap-4 overflow-x-auto p-1 custom-scrollbar-x scrollable-container", d.class])
71
+ }, K = (e, o) => {
72
+ u.value[e] = o, n.data && d("update:data", { ...n.data, [e]: o });
73
+ }, p = (e) => u.value[e] || [];
74
+ return (e, o) => (v(), h("div", {
75
+ class: B([
76
+ "flex gap-4 overflow-x-auto p-1 custom-scrollbar-x scrollable-container",
77
+ n.class
78
+ ])
47
79
  }, [
48
- (c(!0), i(x, null, k(t.columns, (a) => (c(), w(K, {
49
- key: a.id,
50
- column: a,
51
- group: t.group,
52
- "item-key": t.itemKey,
53
- "load-data": t.loadData,
54
- "column-data": I(a.id),
55
- "board-class": t.boardClass,
56
- "header-class": t.headerClass,
57
- "body-class": t.bodyClass,
58
- "draggable-class": t.draggableClass,
59
- "ghost-class": t.ghostClass,
60
- onChange: f,
61
- "onUpdate:columnData": (n) => g(a.id, n)
80
+ (v(!0), h(D, null, w(r.columns, (t) => (v(), P(E, {
81
+ key: t.id,
82
+ column: t,
83
+ group: r.group,
84
+ "item-key": r.itemKey,
85
+ "load-data": r.loadData,
86
+ "column-data": p(t.id),
87
+ "board-class": r.boardClass,
88
+ "header-class": r.headerClass,
89
+ "body-class": r.bodyClass,
90
+ "draggable-class": r.draggableClass,
91
+ "ghost-class": r.ghostClass,
92
+ onChange: I,
93
+ "onUpdate:columnData": (a) => K(t.id, a)
62
94
  }, {
63
- header: r((n) => [
64
- m(e.$slots, "column-header", u({ ref_for: !0 }, n), void 0, !0)
95
+ header: i((a) => [
96
+ m(e.$slots, "column-header", c({ ref_for: !0 }, a), void 0, !0)
65
97
  ]),
66
- "prepend-item": r((n) => [
67
- m(e.$slots, "prepend-item", u({ ref_for: !0 }, n), void 0, !0)
98
+ "prepend-item": i((a) => [
99
+ m(e.$slots, "prepend-item", c({ ref_for: !0 }, a), void 0, !0)
68
100
  ]),
69
- item: r((n) => [
70
- m(e.$slots, "item", u({ ref_for: !0 }, n), void 0, !0)
101
+ item: i((a) => [
102
+ m(e.$slots, "item", c({ ref_for: !0 }, a), void 0, !0)
71
103
  ]),
72
- "append-item": r((n) => [
73
- m(e.$slots, "append-item", u({ ref_for: !0 }, n), void 0, !0)
104
+ "append-item": i((a) => [
105
+ m(e.$slots, "append-item", c({ ref_for: !0 }, a), void 0, !0)
74
106
  ]),
75
107
  _: 3
76
108
  }, 8, ["column", "group", "item-key", "load-data", "column-data", "board-class", "header-class", "body-class", "draggable-class", "ghost-class", "onUpdate:columnData"]))), 128))
@@ -78,5 +110,5 @@ const $ = /* @__PURE__ */ C({
78
110
  }
79
111
  });
80
112
  export {
81
- $ as default
113
+ A as default
82
114
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./KanbanBoard.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-3a733454"]]);
4
+ const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-50fa2cb8"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -26,38 +26,38 @@ const P = { class: "flex items-center justify-between font-semibold text-foregro
26
26
  },
27
27
  emits: ["change", "update:columnData"],
28
28
  setup(o, { emit: C }) {
29
- const k = V(() => import("../Spinner/Spinner.vue2.js")), t = o, m = C, D = j(null), { items: s, isInitialLoading: I, isLoadingMore: S, pageInfo: w, loadInitial: B, loadMore: K } = q(
30
- t.column.id,
31
- t.loadData,
32
- t.columnData
29
+ const k = V(() => import("../Spinner/Spinner.vue2.js")), l = o, m = C, D = j(null), { items: s, isInitialLoading: I, isLoadingMore: w, pageInfo: S, loadInitial: B, loadMore: K } = q(
30
+ l.column.id,
31
+ l.loadData,
32
+ l.columnData
33
33
  ), N = (e) => {
34
34
  s.value = e, m("update:columnData", e);
35
35
  };
36
36
  z(
37
- () => t.columnData,
37
+ () => l.columnData,
38
38
  (e) => {
39
39
  e && JSON.stringify(e) !== JSON.stringify(s.value) && (s.value = [...e]);
40
40
  },
41
41
  { deep: !0 }
42
42
  ), A(() => {
43
- t.loadData && (!t.columnData || t.columnData.length === 0) && B();
43
+ l.loadData && (!l.columnData || l.columnData.length === 0) && B();
44
44
  });
45
45
  const $ = (e) => {
46
- const l = e.target;
47
- l.scrollTop + l.clientHeight >= l.scrollHeight - 50 && K();
46
+ const t = e.target;
47
+ t.scrollTop + t.clientHeight >= t.scrollHeight - 50 && K();
48
48
  }, M = (e) => {
49
- m("change", { type: "add", event: e, columnId: t.column.id });
49
+ m("change", { type: "add", event: e, columnId: l.column.id });
50
50
  }, U = (e) => {
51
- m("change", { type: "remove", event: e, columnId: t.column.id });
51
+ m("change", { type: "remove", event: e, columnId: l.column.id });
52
52
  }, E = (e) => {
53
- m("change", { type: "update", event: e, columnId: t.column.id });
53
+ m("change", { type: "update", event: e, columnId: l.column.id });
54
54
  }, L = F(
55
- () => t.column.titleI18n ? G(t.column.titleI18n) : t.column.title
55
+ () => l.column.titleI18n ? G(l.column.titleI18n) : l.column.title
56
56
  );
57
- return (e, l) => (d(), i("div", {
57
+ return (e, t) => (d(), i("div", {
58
58
  class: c([
59
- "flex flex-col bg-card rounded-lg overflow-hidden shrink-0 border border-border/60",
60
- o.boardClass || "w-80"
59
+ "flex flex-col bg-card rounded-lg overflow-hidden shrink-0 border border-border/50 w-full flex-1 min-w-75",
60
+ o.boardClass
61
61
  ])
62
62
  }, [
63
63
  r("div", {
@@ -65,7 +65,7 @@ const P = { class: "flex items-center justify-between font-semibold text-foregro
65
65
  }, [
66
66
  g(e.$slots, "header", {
67
67
  column: o.column,
68
- pageInfo: n(w)
68
+ pageInfo: n(S)
69
69
  }, () => [
70
70
  r("div", P, [
71
71
  r("span", null, y(L.value), 1)
@@ -82,13 +82,13 @@ const P = { class: "flex items-center justify-between font-semibold text-foregro
82
82
  onScroll: $
83
83
  }, [
84
84
  n(I) && n(s).length === 0 ? (d(), i("div", Q, [
85
- l[0] || (v(-1, !0), (l[0] = (d(), i(f, null, h(3, (a) => r("div", {
85
+ t[0] || (v(-1, !0), (t[0] = (d(), i(f, null, h(3, (a) => r("div", {
86
86
  key: "skeleton-" + a,
87
87
  class: "bg-body p-3 rounded-md shadow-sm border border-border animate-pulse flex flex-col gap-3"
88
- }, [...l[3] || (l[3] = [
88
+ }, [...t[3] || (t[3] = [
89
89
  r("div", { class: "h-4 bg-muted/60 rounded w-2/3" }, null, -1),
90
90
  r("div", { class: "h-3 bg-muted/60 rounded w-1/3" }, null, -1)
91
- ])])), 64))).cacheIndex = 0, v(1), l[0])
91
+ ])])), 64))).cacheIndex = 0, v(1), t[0])
92
92
  ])) : (d(), i(f, { key: 1 }, [
93
93
  g(e.$slots, "prepend-item", {
94
94
  column: o.column,
@@ -121,7 +121,7 @@ const P = { class: "flex items-center justify-between font-semibold text-foregro
121
121
  ], !0)
122
122
  ]));
123
123
  return p.memo = b, p;
124
- }, l, 1), 128))
124
+ }, t, 1), 128))
125
125
  ]),
126
126
  _: 3
127
127
  }, 8, ["model-value", "group", "ghostClass", "class"]),
@@ -129,7 +129,7 @@ const P = { class: "flex items-center justify-between font-semibold text-foregro
129
129
  column: o.column,
130
130
  items: n(s)
131
131
  }, void 0, !0),
132
- n(S) ? (d(), i("div", X, [
132
+ n(w) ? (d(), i("div", X, [
133
133
  x(n(k), {
134
134
  size: "sm",
135
135
  variant: "dots",
@@ -39,6 +39,9 @@ export interface KanbanProps {
39
39
  itemKey?: string;
40
40
  loadData?: (columnId: string | number, page: number) => Promise<KanbanLoadDataResult>;
41
41
  data?: Record<string | number, any[]>;
42
+ rawData?: any[];
43
+ groupKey?: string;
44
+ positionKey?: string;
42
45
  boardClass?: string;
43
46
  headerClass?: string;
44
47
  bodyClass?: string;