vlite3 1.0.10 → 1.1.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 (113) hide show
  1. package/README.md +4 -1
  2. package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -16
  3. package/components/AttachmentsList/AttachmentsList.vue.js +191 -167
  4. package/components/AvatarGroup/AvatarGroup.vue.d.ts +24 -0
  5. package/components/AvatarGroup/AvatarGroup.vue.js +91 -0
  6. package/components/AvatarGroup/AvatarGroup.vue2.js +4 -0
  7. package/components/AvatarGroup/index.d.ts +2 -0
  8. package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
  9. package/components/Barcode/Barcode.vue.js +6 -5
  10. package/components/Button.vue.d.ts +1 -1
  11. package/components/Calendar/Calendar.vue.d.ts +229 -0
  12. package/components/Calendar/Calendar.vue.js +7 -0
  13. package/components/Calendar/Calendar.vue2.js +186 -0
  14. package/components/Calendar/CalendarEventItem.vue.d.ts +17 -0
  15. package/components/Calendar/CalendarEventItem.vue.js +111 -0
  16. package/components/Calendar/CalendarEventItem.vue2.js +4 -0
  17. package/components/Calendar/index.d.ts +2 -0
  18. package/components/Carousel/Carousel.vue.d.ts +2 -2
  19. package/components/CategoryManager/CategoryManager.vue.d.ts +2 -1
  20. package/components/CategoryManager/CategoryManager.vue.js +322 -0
  21. package/components/CategoryManager/CategoryManager.vue2.js +4 -0
  22. package/components/CategoryManager/CategoryNode.vue.js +224 -0
  23. package/components/CategoryManager/CategoryNode.vue2.js +4 -0
  24. package/components/CategoryManager/types.d.ts +14 -0
  25. package/components/Chip/Chip.vue.d.ts +2 -2
  26. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  27. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  28. package/components/CommandPalette/CommandPaletteContent.vue.js +1 -1
  29. package/components/CommandPalette/CommandPaletteContent.vue2.js +7 -7
  30. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  31. package/components/ConfirmationModal.vue.d.ts +2 -2
  32. package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +48 -0
  33. package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.js +97 -0
  34. package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue2.js +4 -0
  35. package/components/CustomFieldsDisplay/index.d.ts +2 -0
  36. package/components/CustomFieldsDisplay/types.d.ts +18 -0
  37. package/components/DataTable/DataTable.vue.d.ts +3 -3
  38. package/components/DateTime/DateTime.vue.d.ts +2 -0
  39. package/components/DateTime/DateTime.vue.js +9 -23
  40. package/components/Dropdown/Dropdown.vue.d.ts +3 -3
  41. package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
  42. package/components/Dropdown/DropdownMenu.vue.d.ts +2 -2
  43. package/components/Dropdown/DropdownTrigger.vue.d.ts +1 -1
  44. package/components/FilePicker/FilePicker.vue.d.ts +1 -1
  45. package/components/Form/CustomFields.vue.d.ts +1 -1
  46. package/components/Form/Form.vue.js +2 -2
  47. package/components/Form/Form.vue2.js +230 -241
  48. package/components/Form/FormField.vue.d.ts +1 -1
  49. package/components/Form/composables/useForm.d.ts +2 -0
  50. package/components/Form/composables/useForm.js +76 -69
  51. package/components/Form/utils/form.utils.js +66 -66
  52. package/components/ImportData/ImportData.vue.js +48 -48
  53. package/components/ImportData/ImportStep2.vue.js +116 -5
  54. package/components/ImportData/ImportStep2.vue2.js +2 -105
  55. package/components/Input.vue.d.ts +3 -3
  56. package/components/Invoice/Invoice.vue.d.ts +3 -0
  57. package/components/Invoice/Invoice.vue.js +38 -0
  58. package/components/Invoice/Invoice.vue2.js +4 -0
  59. package/components/Invoice/InvoiceVariant1.vue.d.ts +13 -0
  60. package/components/Invoice/InvoiceVariant1.vue.js +360 -0
  61. package/components/Invoice/InvoiceVariant1.vue2.js +4 -0
  62. package/components/Invoice/InvoiceVariant2.vue.d.ts +13 -0
  63. package/components/Invoice/InvoiceVariant2.vue.js +226 -0
  64. package/components/Invoice/InvoiceVariant2.vue2.js +4 -0
  65. package/components/Invoice/InvoiceVariant3.vue.d.ts +13 -0
  66. package/components/Invoice/InvoiceVariant3.vue.js +292 -0
  67. package/components/Invoice/InvoiceVariant3.vue2.js +4 -0
  68. package/components/Invoice/InvoiceVariant4.vue.d.ts +13 -0
  69. package/components/Invoice/InvoiceVariant4.vue.js +343 -0
  70. package/components/Invoice/InvoiceVariant4.vue2.js +4 -0
  71. package/components/Invoice/index.d.ts +2 -0
  72. package/components/Invoice/types.d.ts +97 -0
  73. package/components/List/List.vue.d.ts +1 -9
  74. package/components/List/List.vue.js +166 -165
  75. package/components/List/ListFieldRow.vue.d.ts +10 -2
  76. package/components/List/ListFieldRow.vue.js +80 -78
  77. package/components/List/utils.d.ts +2 -1
  78. package/components/List/utils.js +8 -39
  79. package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
  80. package/components/Navbar/NavbarItem.vue.d.ts +1 -1
  81. package/components/Navbar/NavbarTabs.vue.js +2 -2
  82. package/components/NavbarCommandPalette.vue.js +1 -1
  83. package/components/NumberInput.vue.d.ts +2 -2
  84. package/components/NumberInput.vue.js +2 -2
  85. package/components/NumberInput.vue2.js +38 -38
  86. package/components/OTPInput/OTPInput.vue.d.ts +1 -1
  87. package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
  88. package/components/Screen/ScreenFilter.vue.js +22 -21
  89. package/components/Screen/components/ScreenQuickFilters.vue.js +6 -5
  90. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  91. package/components/Stats/Stats.vue.d.ts +1 -1
  92. package/components/StatusChip/status-map.js +27 -7
  93. package/components/Tabes/Tabes.vue.d.ts +1 -0
  94. package/components/Tabes/Tabes.vue.js +2 -2
  95. package/components/Tabes/Tabes.vue2.js +33 -32
  96. package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
  97. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  98. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +141 -115
  99. package/components/Workbook/Workbook.vue.d.ts +3 -3
  100. package/core/config.d.ts +76 -0
  101. package/core/index.js +17 -5
  102. package/index.d.ts +6 -1
  103. package/index.js +271 -256
  104. package/package.json +2 -1
  105. package/style.css +5 -3
  106. package/types/config.type.d.ts +6 -0
  107. package/types/list.type.d.ts +6 -0
  108. package/utils/configUtils.d.ts +9 -0
  109. package/utils/configUtils.js +7 -0
  110. package/utils/index.d.ts +1 -0
  111. package/utils/status.d.ts +5 -0
  112. package/utils/status.js +33 -0
  113. /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
@@ -0,0 +1,224 @@
1
+ import { defineComponent as F, inject as K, computed as p, resolveComponent as R, openBlock as r, createBlock as x, unref as l, withCtx as T, createElementBlock as s, Fragment as A, renderList as L, isMemoSame as O, createElementVNode as f, normalizeClass as u, createVNode as i, createCommentVNode as c, withDirectives as k, withModifiers as P, withKeys as w, vModelText as U, toDisplayString as Q, vShow as q } from "vue";
2
+ import { VueDraggable as G } from "vue-draggable-plus";
3
+ import C from "../Icon.vue.js";
4
+ import g from "../Button.vue.js";
5
+ import N from "../IconPicker.vue.js";
6
+ const H = { class: "flex items-center gap-px overflow-hidden flex-1" }, J = ["onClick"], W = { class: "flex items-center gap-1.5 overflow-hidden flex-1 w-full" }, X = {
7
+ key: 0,
8
+ class: "drag-handle cursor-grab active:cursor-grabbing text-muted hover:text-foreground transition-colors p-0.5 shrink-0"
9
+ }, Y = ["onUpdate:modelValue", "onChange"], Z = {
10
+ key: 0,
11
+ class: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0 bg-background/80 px-1 rounded ml-2"
12
+ }, ee = {
13
+ key: 0,
14
+ class: "ml-6 pl-3 border-l border-border mt-1.5 flex flex-col relative"
15
+ }, te = {
16
+ key: 1,
17
+ class: "flex items-center gap-1.5 py-1.5 px-2 bg-background border border-border shadow-sm rounded-lg w-full mb-1.5"
18
+ }, de = /* @__PURE__ */ F({
19
+ __name: "CategoryNode",
20
+ props: {
21
+ modelValue: {},
22
+ level: { default: 0 }
23
+ },
24
+ emits: ["update:modelValue", "change"],
25
+ setup(V, { emit: D }) {
26
+ const S = V, y = D, t = K("categoryManager"), b = p({
27
+ get: () => S.modelValue,
28
+ set: (d) => y("update:modelValue", d)
29
+ }), M = (d, n) => {
30
+ n.children = d, y("change");
31
+ }, I = () => y("change"), v = p(() => t?.readonly.value || !1), a = p(() => t?.size.value || "md"), j = p(() => a.value === "sm" ? "p-1 md:p-1.5" : a.value === "lg" ? "p-2 md:p-2.5" : "py-1.5 px-2"), $ = p(() => {
32
+ const n = S.level === 0 ? "font-semibold" : "font-medium";
33
+ return a.value === "sm" ? `text-xs ${n} text-foreground` : a.value === "lg" ? `-text-fs-1 ${n} text-foreground` : `text-sm ${n} text-foreground`;
34
+ }), m = p(() => a.value === "sm" ? "w-3.5 h-3.5" : a.value === "lg" ? "w-4.5 h-4.5" : "w-4 h-4"), B = {
35
+ mounted: (d) => {
36
+ setTimeout(() => d.focus(), 10);
37
+ }
38
+ };
39
+ return (d, n) => {
40
+ const E = R("CategoryNode", !0);
41
+ return r(), x(l(G), {
42
+ modelValue: b.value,
43
+ "onUpdate:modelValue": n[10] || (n[10] = (e) => b.value = e),
44
+ group: "category-manager",
45
+ animation: 150,
46
+ handle: ".drag-handle",
47
+ "ghost-class": "opacity-50",
48
+ disabled: v.value,
49
+ class: "min-h-[2px]",
50
+ onChange: I
51
+ }, {
52
+ default: T(() => [
53
+ (r(!0), s(A, null, L(b.value, (e, ne, le, h) => {
54
+ const _ = [
55
+ e.id,
56
+ e.title,
57
+ e.icon,
58
+ e.children?.length,
59
+ l(t)?.expandedIds.value.has(e.id),
60
+ l(t)?.inlineState.value.targetId === e.id,
61
+ l(t)?.inlineState.value.mode,
62
+ v.value,
63
+ a.value
64
+ ];
65
+ if (h && h.key === e.id && O(h, _)) return h;
66
+ const z = (r(), s("div", {
67
+ key: e.id,
68
+ class: "mb-1.5 flex flex-col"
69
+ }, [
70
+ f("div", {
71
+ class: u([
72
+ "group flex items-center justify-between rounded-lg transition-colors bg-body! border border-border ",
73
+ j.value
74
+ ])
75
+ }, [
76
+ f("div", H, [
77
+ e.children && e.children.length > 0 ? (r(), s("button", {
78
+ key: 0,
79
+ onClick: (o) => l(t)?.toggleExpand(e.id),
80
+ class: u([
81
+ "flex items-center justify-center shrink-0 text-muted-foreground hover:bg-muted rounded transition-colors",
82
+ a.value === "sm" ? "w-4 h-4" : a.value === "lg" ? "w-6 h-6" : "w-6.5 h-6.5"
83
+ ])
84
+ }, [
85
+ i(C, {
86
+ icon: l(t)?.expandedIds.value.has(e.id) ? "lucide:chevron-down" : "lucide:chevron-right",
87
+ class: u(m.value)
88
+ }, null, 8, ["icon", "class"])
89
+ ], 10, J)) : c("", !0),
90
+ f("div", W, [
91
+ v.value ? c("", !0) : (r(), s("div", X, [
92
+ i(C, {
93
+ icon: "lucide:grip-vertical",
94
+ class: u(m.value)
95
+ }, null, 8, ["class"])
96
+ ])),
97
+ v.value ? e.icon ? (r(), x(C, {
98
+ key: 2,
99
+ icon: e.icon,
100
+ class: u([m.value, "shrink-0 text-muted-foreground"])
101
+ }, null, 8, ["icon", "class"])) : c("", !0) : (r(), x(N, {
102
+ key: 1,
103
+ value: e.icon,
104
+ "btn-props": {
105
+ variant: "ghost",
106
+ size: "xs",
107
+ iconClass: m.value,
108
+ class: (a.value === "sm" ? "h-5 w-5" : a.value === "lg" ? "h-7 w-7" : "h-6 w-6") + " -ml-0.5! p-0 text-muted-foreground hover:text-foreground shrink-0 rounded-md"
109
+ },
110
+ position: "bottom-start",
111
+ onOnSelect: (o) => {
112
+ console.log("IconPicker value :>> ", o), e.icon = o, l(t)?.saveItem(e);
113
+ }
114
+ }, null, 8, ["value", "btn-props", "onOnSelect"])),
115
+ v.value ? (r(), s("span", {
116
+ key: 4,
117
+ class: u(["truncate", $.value])
118
+ }, Q(e.title), 3)) : k((r(), s("input", {
119
+ key: 3,
120
+ "onUpdate:modelValue": (o) => e.title = o,
121
+ class: u([
122
+ "bg-transparent border-0 outline-none focus:ring-0 px-1 py-0.5 -ml-1 transition-colors w-full truncate cursor-text min-w-0 shadow-none caret-primary",
123
+ $.value
124
+ ]),
125
+ placeholder: "Category title...",
126
+ onChange: (o) => l(t)?.saveItem(e),
127
+ onKeyup: n[0] || (n[0] = w((o) => o.target.blur(), ["enter"])),
128
+ onClick: n[1] || (n[1] = P(() => {
129
+ }, ["stop"]))
130
+ }, null, 42, Y)), [
131
+ [U, e.title]
132
+ ])
133
+ ])
134
+ ]),
135
+ v.value ? c("", !0) : (r(), s("div", Z, [
136
+ i(g, {
137
+ variant: "ghost",
138
+ size: "xs",
139
+ icon: "lucide:plus",
140
+ title: "Quick Add Subcategory",
141
+ class: "h-7 w-7 px-0 text-muted-foreground hover:text-primary",
142
+ onClick: (o) => l(t)?.startInline("add-child", e.id)
143
+ }, null, 8, ["onClick"]),
144
+ i(g, {
145
+ variant: "ghost",
146
+ size: "xs",
147
+ icon: "lucide:settings",
148
+ title: "Advanced Details",
149
+ class: "h-7 w-7 px-0 text-muted-foreground hover:text-primary",
150
+ onClick: (o) => l(t)?.openModalForm("edit", e)
151
+ }, null, 8, ["onClick"]),
152
+ i(g, {
153
+ variant: "ghost",
154
+ size: "xs",
155
+ icon: "lucide:trash-2",
156
+ title: "Delete",
157
+ class: "h-7 w-7 px-0 text-muted-foreground hover:text-destructive hover:bg-destructive/10",
158
+ onClick: (o) => l(t)?.deleteItem(e)
159
+ }, null, 8, ["onClick"])
160
+ ]))
161
+ ], 2),
162
+ e.children && e.children.length > 0 || l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? k((r(), s("div", ee, [
163
+ e.children && e.children.length > 0 ? (r(), x(E, {
164
+ key: 0,
165
+ modelValue: e.children,
166
+ "onUpdate:modelValue": (o) => M(o, e),
167
+ level: V.level + 1,
168
+ onChange: I
169
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "level"])) : c("", !0),
170
+ l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? (r(), s("div", te, [
171
+ i(N, {
172
+ modelValue: l(t).inlineState.value.icon,
173
+ "onUpdate:modelValue": n[2] || (n[2] = (o) => l(t).inlineState.value.icon = o),
174
+ "btn-props": {
175
+ variant: "ghost",
176
+ size: "xs",
177
+ class: "h-6 w-6 p-0 text-muted-foreground hover:text-foreground shrink-0 rounded-md"
178
+ },
179
+ position: "bottom-start"
180
+ }, null, 8, ["modelValue"]),
181
+ k(f("input", {
182
+ "onUpdate:modelValue": n[3] || (n[3] = (o) => l(t).inlineState.value.title = o),
183
+ class: "flex-1 bg-transparent border-0 outline-none focus:ring-0 px-1 py-0.5 text-sm transition-colors w-full shadow-none caret-primary text-foreground placeholder:text-muted-foreground",
184
+ placeholder: "New subcategory title...",
185
+ onKeyup: [
186
+ n[4] || (n[4] = w((o) => l(t).saveInline(), ["enter"])),
187
+ n[5] || (n[5] = w((o) => l(t).cancelInline(), ["esc"]))
188
+ ]
189
+ }, null, 544), [
190
+ [B],
191
+ [U, l(t).inlineState.value.title]
192
+ ]),
193
+ i(g, {
194
+ variant: "primary",
195
+ size: "xs",
196
+ icon: "lucide:check",
197
+ class: "shrink-0 h-6 w-6 px-0",
198
+ title: "Save",
199
+ onClick: n[6] || (n[6] = (o) => l(t).saveInline())
200
+ }),
201
+ i(g, {
202
+ variant: "ghost",
203
+ size: "xs",
204
+ icon: "lucide:x",
205
+ class: "shrink-0 h-6 w-6 px-0",
206
+ title: "Cancel",
207
+ onClick: n[7] || (n[7] = (o) => l(t).cancelInline())
208
+ })
209
+ ])) : c("", !0)
210
+ ], 512)), [
211
+ [q, l(t)?.expandedIds.value.has(e.id)]
212
+ ]) : c("", !0)
213
+ ]));
214
+ return z.memo = _, z;
215
+ }, n, 8), 128))
216
+ ]),
217
+ _: 1
218
+ }, 8, ["modelValue", "disabled"]);
219
+ };
220
+ }
221
+ });
222
+ export {
223
+ de as default
224
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CategoryNode.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -6,11 +6,25 @@ export interface CategoryItem {
6
6
  icon?: string;
7
7
  description?: string;
8
8
  children?: CategoryItem[];
9
+ parentId?: string | number | null;
10
+ position?: number;
11
+ [key: string]: any;
12
+ }
13
+ export interface RawCategoryItem {
14
+ id: string | number;
15
+ name?: string;
16
+ title?: string;
17
+ icon?: string;
18
+ position?: number;
19
+ parentId?: string | number | null;
20
+ fullPath?: string;
9
21
  [key: string]: any;
10
22
  }
11
23
  export interface CategoryManagerProps {
12
24
  /** The nested array of category items */
13
25
  modelValue?: CategoryItem[];
26
+ /** Optional flat list of items to be auto-converted to a nested tree */
27
+ rawData?: RawCategoryItem[];
14
28
  /** Optional custom form schema for add/edit operations */
15
29
  formSchema?: IForm[];
16
30
  /** Disable drag-and-drop and mutation actions */
@@ -13,11 +13,11 @@ declare function __VLS_template(): {
13
13
  };
14
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
15
  declare const __VLS_component: import('vue').DefineComponent<ExtendedProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
- click: (event: MouseEvent) => any;
17
16
  delete: (event: MouseEvent) => any;
17
+ click: (event: MouseEvent) => any;
18
18
  }, string, import('vue').PublicProps, Readonly<ExtendedProps> & Readonly<{
19
- onClick?: (event: MouseEvent) => any;
20
19
  onDelete?: (event: MouseEvent) => any;
20
+ onClick?: (event: MouseEvent) => any;
21
21
  }>, {
22
22
  text: string;
23
23
  class: string;
@@ -1,5 +1,5 @@
1
- import o from "./ColorIro.vue.js";
2
- /* empty css */
1
+ import o from "./ColorIro.vue2.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -6,8 +6,8 @@ import O from "../Input.vue.js";
6
6
  import "../../core/config.js";
7
7
  /* empty css */
8
8
  import y from "../Button.vue.js";
9
- import E from "./ColorIro.vue.js";
10
- /* empty css */
9
+ import E from "./ColorIro.vue2.js";
10
+ /* empty css */
11
11
  import { useEyeDropper as P } from "@vueuse/core";
12
12
  const I = {
13
13
  key: 0,
@@ -1,7 +1,7 @@
1
1
  import t from "./CommandPaletteContent.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-1bae4c0f"]]);
4
+ const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-aa0dbb48"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -4,17 +4,17 @@ import k from "../Icon.vue.js";
4
4
  import { $t as E } from "../../utils/i18n.js";
5
5
  import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
6
6
  import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
7
- import ee from "./CommandPaletteItem.vue2.js";
8
- const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/60 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
7
+ import ee from "./CommandPaletteItem.vue.js";
8
+ const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
9
9
  key: 0,
10
10
  class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
11
11
  "aria-live": "polite"
12
12
  }, le = { class: "text-sm font-medium text-muted-foreground" }, ae = { class: "text-foreground font-semibold" }, de = { class: "text-xs text-muted-foreground/60 mt-1" }, ie = ["aria-label"], ue = ["aria-label"], ce = {
13
13
  key: 0,
14
- class: "my-1.5 mx-3 h-px bg-border/40",
14
+ class: "my-1.5 mx-3 h-px bg-border/80",
15
15
  "aria-hidden": "true"
16
16
  }, me = {
17
- class: "px-4 py-2.5 border-t border-border/40 flex items-center gap-4 shrink-0 bg-muted/30",
17
+ class: "px-4 py-2.5 border-t border-border/80 flex items-center gap-4 shrink-0 bg-muted/30",
18
18
  "aria-hidden": "true"
19
19
  }, pe = { class: "flex items-center gap-1 text-[11px] text-muted-foreground/60" }, xe = { class: "flex items-center gap-1 text-[11px] text-muted-foreground/60" }, fe = { class: "flex items-center gap-1 text-[11px] text-muted-foreground/60" }, be = { class: "ml-auto text-[11px] text-muted-foreground/50" }, Ce = /* @__PURE__ */ j({
20
20
  __name: "CommandPaletteContent",
@@ -159,15 +159,15 @@ const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[
159
159
  ], 8, ne),
160
160
  o("div", me, [
161
161
  o("span", pe, [
162
- s[5] || (s[5] = o("kbd", { class: "px-1 rounded border border-border/60 bg-background text-[10px]" }, "↑↓", -1)),
162
+ s[5] || (s[5] = o("kbd", { class: "px-1 rounded border border-border/80 bg-background text-[10px]" }, "↑↓", -1)),
163
163
  f(" " + l(O.value), 1)
164
164
  ]),
165
165
  o("span", xe, [
166
- s[6] || (s[6] = o("kbd", { class: "px-1 rounded border border-border/60 bg-background text-[10px]" }, "↵", -1)),
166
+ s[6] || (s[6] = o("kbd", { class: "px-1 rounded border border-border/80 bg-background text-[10px]" }, "↵", -1)),
167
167
  f(" " + l(T.value), 1)
168
168
  ]),
169
169
  o("span", fe, [
170
- s[7] || (s[7] = o("kbd", { class: "px-1 rounded border border-border/60 bg-background text-[10px]" }, "Esc", -1)),
170
+ s[7] || (s[7] = o("kbd", { class: "px-1 rounded border border-border/80 bg-background text-[10px]" }, "Esc", -1)),
171
171
  f(" " + l(F.value), 1)
172
172
  ]),
173
173
  o("span", be, l(p.value) + " " + l(p.value === 1 ? P.value : w.value), 1)
@@ -1,5 +1,5 @@
1
1
  import t from "./CommandPaletteItem.vue3.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-66b1ae06"]]);
5
5
  export {
@@ -22,11 +22,11 @@ declare function __VLS_template(): {
22
22
  };
23
23
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
24
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
25
- cancel: () => any;
26
25
  confirm: () => any;
26
+ cancel: () => any;
27
27
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
28
- onCancel?: () => any;
29
28
  onConfirm?: () => any;
29
+ onCancel?: () => any;
30
30
  }>, {
31
31
  variant: "danger" | "primary" | "warning" | "success" | "info";
32
32
  loading: boolean;
@@ -0,0 +1,48 @@
1
+ import { CustomFieldItem, CustomFieldsDisplayVariant } from './types';
2
+ interface Props {
3
+ title?: string;
4
+ titleI18n?: string;
5
+ icon?: string;
6
+ fields?: CustomFieldItem[];
7
+ variant?: CustomFieldsDisplayVariant;
8
+ columns?: 1 | 2 | 3 | 4;
9
+ emptyText?: string;
10
+ keyProp?: string;
11
+ valueProp?: string;
12
+ class?: string;
13
+ listValueThreshold?: number;
14
+ }
15
+ declare function __VLS_template(): {
16
+ attrs: Partial<{}>;
17
+ slots: {
18
+ title?(_: {}): any;
19
+ key?(_: {
20
+ field: CustomFieldItem;
21
+ index: number;
22
+ }): any;
23
+ value?(_: {
24
+ field: CustomFieldItem;
25
+ index: number;
26
+ }): any;
27
+ empty?(_: {}): any;
28
+ };
29
+ refs: {};
30
+ rootEl: HTMLDivElement;
31
+ };
32
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
33
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
34
+ variant: CustomFieldsDisplayVariant;
35
+ fields: CustomFieldItem[];
36
+ columns: 1 | 2 | 3 | 4;
37
+ emptyText: string;
38
+ keyProp: string;
39
+ valueProp: string;
40
+ listValueThreshold: number;
41
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
42
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
43
+ export default _default;
44
+ type __VLS_WithTemplateSlots<T, S> = T & {
45
+ new (): {
46
+ $slots: S;
47
+ };
48
+ };
@@ -0,0 +1,97 @@
1
+ import { defineComponent as T, computed as o, openBlock as n, createElementBlock as s, normalizeClass as l, renderSlot as a, createBlock as P, createCommentVNode as g, createElementVNode as d, toDisplayString as u, Fragment as w, renderList as N, createTextVNode as c } from "vue";
2
+ import j from "../Icon.vue.js";
3
+ import { $t as I } from "../../utils/i18n.js";
4
+ const L = { class: "text-sm font-semibold text-gray-900 tracking-tight" }, D = /* @__PURE__ */ T({
5
+ __name: "CustomFieldsDisplay",
6
+ props: {
7
+ title: {},
8
+ titleI18n: {},
9
+ icon: {},
10
+ fields: { default: () => [] },
11
+ variant: { default: "grid" },
12
+ columns: { default: 2 },
13
+ emptyText: { default: "--" },
14
+ keyProp: { default: "key" },
15
+ valueProp: { default: "value" },
16
+ class: {},
17
+ listValueThreshold: { default: 50 }
18
+ },
19
+ setup(r) {
20
+ const t = r, x = o(() => t.titleI18n ? I(t.titleI18n) : t.title ?? ""), v = (e) => e == null || e === "" ? t.emptyText : typeof e == "boolean" ? e ? "Yes" : "No" : Array.isArray(e) ? e.join(", ") : typeof e == "object" ? JSON.stringify(e) : String(e), b = (e) => v(e).length > t.listValueThreshold, k = o(() => t.variant === "list" ? "flex flex-col border border-border rounded-md bg-body overflow-hidden" : "flex flex-col w-full"), h = o(() => {
21
+ const e = {
22
+ 1: "grid-cols-1",
23
+ 2: "grid-cols-1 sm:grid-cols-2",
24
+ 3: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
25
+ 4: "grid-cols-1 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-4"
26
+ };
27
+ return t.variant === "grid" ? `grid gap-4 px-2 ${e[t.columns] || e[2]}` : t.variant === "card" ? `grid gap-3.5 ${e[t.columns] || e[2]}` : t.variant === "list" ? "flex flex-col divide-y divide-border" : t.variant === "inline" ? "flex flex-wrap gap-3" : "";
28
+ }), C = (e) => t.variant !== "list" ? p.value : [
29
+ "flex py-3 pl-3 pr-3.5 transition-colors hover:bg-muted/30 min-w-0",
30
+ b(e[t.valueProp]) ? "flex-col items-start gap-1" : "flex-col sm:flex-row sm:justify-between sm:items-start gap-1 sm:gap-0"
31
+ ], $ = (e) => t.variant !== "list" ? y.value : [
32
+ "text-sm font-normal text-foreground break-words",
33
+ b(e[t.valueProp]) ? "w-full" : "w-full sm:w-auto sm:text-right sm:max-w-[60%]"
34
+ ], p = o(() => t.variant === "grid" ? "flex flex-col space-y-1 min-w-0" : t.variant === "list" ? "flex justify-between items-start py-3 pl-3 pr-3.5 transition-colors hover:bg-muted/30 min-w-0" : t.variant === "card" ? "flex flex-col space-y-1.5 p-3 rounded-lg border border-border bg-card min-w-0" : t.variant === "inline" ? "flex items-center space-x-2 bg-muted/40 border border-border px-3 py-1.5 rounded-full min-w-0" : ""), V = o(() => t.variant === "inline" ? "text-xs font-medium text-foreground truncate max-w-[120px]" : t.variant === "list" ? "text-sm! font-medium! text-foreground! leading-snug truncate mr-4 shrink-0" : "text-xs font-semibold text-foreground uppercase tracking-wider truncate"), y = o(() => t.variant === "inline" ? "text-sm font-semibold text-foreground truncate max-w-[200px]" : t.variant === "list" ? "text-sm font-normal text-foreground text-right break-words max-w-[60%]" : "text-sm text-foreground break-words");
35
+ return (e, f) => (n(), s("div", {
36
+ class: l(["custom-fields-display", k.value, t.class])
37
+ }, [
38
+ x.value || r.icon || e.$slots.title ? (n(), s("div", {
39
+ key: 0,
40
+ class: l([
41
+ r.variant == "list" ? "px-3 py-2.5 border-b border-border/70 flex items-center gap-2 bg-muted/60" : "bg-muted p-2 rounded flex items-center gap-2 mb-4.5"
42
+ ])
43
+ }, [
44
+ a(e.$slots, "title", {}, () => [
45
+ r.icon ? (n(), P(j, {
46
+ key: 0,
47
+ icon: r.icon,
48
+ class: "w-4 h-4 text-muted-foreground shrink-0"
49
+ }, null, 8, ["icon"])) : g("", !0),
50
+ d("h3", L, u(x.value), 1)
51
+ ])
52
+ ], 2)) : g("", !0),
53
+ d("div", {
54
+ class: l(h.value)
55
+ }, [
56
+ r.fields && r.fields.length > 0 ? (n(!0), s(w, { key: 0 }, N(r.fields, (i, m) => (n(), s("div", {
57
+ key: m,
58
+ class: l(r.variant === "list" ? C(i) : p.value)
59
+ }, [
60
+ d("div", {
61
+ class: l(["cf-label shrink-0", V.value])
62
+ }, [
63
+ a(e.$slots, "key", {
64
+ field: i,
65
+ index: m
66
+ }, () => [
67
+ c(u(i[r.keyProp]) + " ", 1),
68
+ t.variant === "inline" ? (n(), s(w, { key: 0 }, [
69
+ c(":")
70
+ ], 64)) : g("", !0)
71
+ ])
72
+ ], 2),
73
+ d("div", {
74
+ class: l(["cf-value", r.variant === "list" ? $(i) : y.value])
75
+ }, [
76
+ a(e.$slots, "value", {
77
+ field: i,
78
+ index: m
79
+ }, () => [
80
+ c(u(v(i[r.valueProp])), 1)
81
+ ])
82
+ ], 2)
83
+ ], 2))), 128)) : (n(), s("div", {
84
+ key: 1,
85
+ class: l(["text-sm text-muted-foreground py-6 text-center w-full bg-muted/5 rounded-lg border border-dashed border-border", r.variant === "list" ? "border-none rounded-none" : ""])
86
+ }, [
87
+ a(e.$slots, "empty", {}, () => [
88
+ c(u(r.emptyText), 1)
89
+ ])
90
+ ], 2))
91
+ ], 2)
92
+ ], 2));
93
+ }
94
+ });
95
+ export {
96
+ D as default
97
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CustomFieldsDisplay.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as CustomFieldsDisplay } from './CustomFieldsDisplay.vue';
2
+ export * from './types';
@@ -0,0 +1,18 @@
1
+ export type CustomFieldsDisplayVariant = 'grid' | 'list' | 'card' | 'inline';
2
+ export interface CustomFieldItem {
3
+ key?: string;
4
+ value?: any;
5
+ [key: string]: any;
6
+ }
7
+ export interface CustomFieldsDisplayProps {
8
+ title?: string;
9
+ titleI18n?: string;
10
+ icon?: string;
11
+ fields?: CustomFieldItem[];
12
+ variant?: CustomFieldsDisplayVariant;
13
+ columns?: 1 | 2 | 3 | 4;
14
+ emptyText?: string;
15
+ keyProp?: string;
16
+ valueProp?: string;
17
+ class?: string;
18
+ }
@@ -18,24 +18,24 @@ declare function __VLS_template(): {
18
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
19
  declare const __VLS_component: import('vue').DefineComponent<DataTableProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
20
  select: (state: SelectionState) => any;
21
- change: (state: TableState) => any;
22
21
  delete: (rows: any[]) => any;
22
+ change: (state: TableState) => any;
23
23
  "update:itemsPerPage": (value: number) => any;
24
24
  rowClick: (payload: RowClickPayload) => any;
25
25
  "update:selectedRows": (value: any[]) => any;
26
26
  }, string, import('vue').PublicProps, Readonly<DataTableProps> & Readonly<{
27
27
  onSelect?: (state: SelectionState) => any;
28
- onChange?: (state: TableState) => any;
29
28
  onDelete?: (rows: any[]) => any;
29
+ onChange?: (state: TableState) => any;
30
30
  "onUpdate:itemsPerPage"?: (value: number) => any;
31
31
  onRowClick?: (payload: RowClickPayload) => any;
32
32
  "onUpdate:selectedRows"?: (value: any[]) => any;
33
33
  }>, {
34
34
  search: string;
35
35
  variant: "default" | "raised";
36
+ loading: boolean;
36
37
  striped: boolean;
37
38
  compact: boolean;
38
- loading: boolean;
39
39
  rows: any[];
40
40
  showSearch: boolean;
41
41
  headers: TableHeader[];
@@ -3,6 +3,8 @@ type __VLS_Props = {
3
3
  value?: string | number | Date;
4
4
  /** Custom format string overriding the global configuration */
5
5
  format?: string;
6
+ /** Semantic formatting type ('date', 'dateTime', 'time') */
7
+ type?: 'date' | 'dateTime' | 'time';
6
8
  };
7
9
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>;
8
10
  export default _default;
@@ -1,31 +1,17 @@
1
- import { defineComponent as D, computed as n, openBlock as _, createElementBlock as g, toDisplayString as h } from "vue";
2
- import s from "dayjs";
3
- import { useVLiteConfig as y } from "../../core/config.js";
4
- const V = /* @__PURE__ */ D({
1
+ import { defineComponent as r, computed as a, openBlock as n, createElementBlock as p, toDisplayString as m } from "vue";
2
+ import { formatDate as c } from "../../utils/functions.js";
3
+ const i = /* @__PURE__ */ r({
5
4
  __name: "DateTime",
6
5
  props: {
7
6
  value: {},
8
- format: {}
7
+ format: {},
8
+ type: {}
9
9
  },
10
- setup(m) {
11
- const t = m, i = y(), c = n(() => t.format || i?.components?.datetime?.format || "MM/DD/YYYY"), f = n(() => {
12
- if (!t.value) return "--";
13
- if (typeof t.value == "string") {
14
- const e = t.value.trim();
15
- if (/^([01]?\d|2[0-3]):([0-5]\d)(:([0-5]\d))?$/.test(e)) {
16
- const r = e.split(":"), u = r[0].padStart(2, "0"), l = r[1], p = r[2] || "00", d = `1970-01-01T${u}:${l}:${p}`, a = s(d);
17
- if (a.isValid()) {
18
- const v = t.format || "h:mm A";
19
- return a.format(v);
20
- }
21
- }
22
- }
23
- const o = s(t.value);
24
- return o.isValid() ? o.format(c.value) : String(t.value);
25
- });
26
- return (o, e) => (_(), g("span", null, h(f.value), 1));
10
+ setup(e) {
11
+ const t = e, o = a(() => c(t.value, t.format, t.type));
12
+ return (l, s) => (n(), p("span", null, m(o.value), 1));
27
13
  }
28
14
  });
29
15
  export {
30
- V as default
16
+ i as default
31
17
  };
@@ -83,11 +83,12 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
83
83
  onOnOpen?: () => any;
84
84
  "onUpdate:isOpen"?: (value: boolean) => any;
85
85
  }>, {
86
- disabled: boolean;
86
+ columns: number | string;
87
87
  loading: boolean;
88
+ disabled: boolean;
89
+ direction: "ltr" | "rtl";
88
90
  selectable: boolean;
89
91
  options: (IDropdownOption | string | number)[];
90
- columns: number | string;
91
92
  selectedIndex: number | null;
92
93
  maxHeight: string;
93
94
  layout: "default" | "grouped";
@@ -95,7 +96,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
95
96
  searchable: boolean;
96
97
  remote: boolean;
97
98
  debounceTime: number;
98
- direction: "ltr" | "rtl";
99
99
  canCloseOutside: boolean;
100
100
  closeOnSelect: boolean;
101
101
  toggleSelection: boolean;