vlite3 1.4.39 → 1.4.41

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 (135) hide show
  1. package/components/AppShell/AppShellLayoutClassic.vue.js +27 -28
  2. package/components/AppShell/AppShellLayoutDashboard.vue.js +48 -48
  3. package/components/AppShell/AppShellLayoutDock.vue.js +51 -51
  4. package/components/AppShell/AppShellLayoutHeaderShell.vue.js +69 -69
  5. package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +2 -2
  6. package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +78 -78
  7. package/components/AppShell/AppShellLayoutStorefront.vue.js +14 -15
  8. package/components/AppShell/useAppShell.d.ts +4 -0
  9. package/components/AppShell/useAppShell.js +45 -40
  10. package/components/AsyncSelect/createAsyncSelect.js +10 -10
  11. package/components/AttachmentsList/AttachmentsList.vue.d.ts +50 -2
  12. package/components/AttachmentsList/AttachmentsList.vue.js +289 -272
  13. package/components/AttachmentsList/types.d.ts +37 -0
  14. package/components/BackButton.vue.js +2 -2
  15. package/components/Button.vue.d.ts +1 -0
  16. package/components/Button.vue.js +5 -241
  17. package/components/Button.vue2.js +245 -2
  18. package/components/ButtonGroup.vue.js +2 -2
  19. package/components/ButtonGroup.vue2.js +4 -1
  20. package/components/Calendar/Calendar.vue2.js +16 -16
  21. package/components/Cart/CartCouponInput.vue.js +24 -24
  22. package/components/Cart/CartEmptyState.vue.js +4 -4
  23. package/components/Cart/CartLineItem.vue.js +33 -33
  24. package/components/Cart/CartVariant1.vue.js +3 -3
  25. package/components/Cart/CartVariant2.vue.js +5 -5
  26. package/components/Cart/CartVariant3.vue.js +25 -25
  27. package/components/Cart/CartVariant4.vue.js +9 -9
  28. package/components/CategoryManager/CategoryManager.vue2.js +18 -18
  29. package/components/CategoryManager/CategoryNode.vue.js +4 -4
  30. package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
  31. package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
  32. package/components/Chat/ChatInterface.vue.js +23 -23
  33. package/components/Clipboard.vue.d.ts +7 -1
  34. package/components/Clipboard.vue.js +19 -17
  35. package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
  36. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  37. package/components/ColorPicker/ColorPicker.vue.js +8 -8
  38. package/components/Comment/CommentEditor.vue.js +14 -14
  39. package/components/Comment/CommentItem.vue2.js +6 -6
  40. package/components/Comment/CommentThread.vue.js +4 -4
  41. package/components/DataList/DataList.vue.js +7 -7
  42. package/components/DataTable/DataTable.vue.d.ts +9 -0
  43. package/components/DataTable/DataTable.vue.js +380 -265
  44. package/components/DataTable/DataTableRow.vue.d.ts +23 -2
  45. package/components/DataTable/DataTableRow.vue.js +5 -198
  46. package/components/DataTable/DataTableRow.vue2.js +360 -2
  47. package/components/DataTable/dataTableHeaders.d.ts +18 -0
  48. package/components/DataTable/dataTableHeaders.js +9 -0
  49. package/components/DataTable/types.d.ts +11 -0
  50. package/components/DatePicker.vue.js +8 -9
  51. package/components/DateRangePicker.vue2.js +34 -34
  52. package/components/Dropdown/Dropdown.vue.d.ts +7 -2
  53. package/components/Dropdown/Dropdown.vue.js +146 -139
  54. package/components/Dropdown/DropdownTrigger.vue.js +6 -6
  55. package/components/ExportData/ExportData.vue.js +15 -15
  56. package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
  57. package/components/FilePicker/FilePickerInput.vue.js +3 -2
  58. package/components/FilePicker/FilePreview.vue.js +3 -3
  59. package/components/FileTree/FileTree.vue.js +4 -4
  60. package/components/FileTree/FileTree.vue2.js +9 -9
  61. package/components/FileTree/FileTreeNode.vue.js +76 -72
  62. package/components/Footer/Variant1.vue.js +48 -48
  63. package/components/Footer/Variant2.vue.js +42 -42
  64. package/components/Form/AccordionView.vue.d.ts +1 -1
  65. package/components/Form/AccordionView.vue2.js +2 -2
  66. package/components/Form/AccordionView.vue3.js +61 -57
  67. package/components/Form/Form.vue2.js +41 -41
  68. package/components/Form/TableRow.vue.d.ts +7 -0
  69. package/components/Form/TableRow.vue.js +187 -41
  70. package/components/Form/TableView.vue.d.ts +11 -1
  71. package/components/Form/TableView.vue.js +71 -49
  72. package/components/Form/composables/useForm.js +146 -142
  73. package/components/Form/index.vue.d.ts +5 -1
  74. package/components/Form/index.vue.js +2 -2
  75. package/components/Form/index.vue2.js +44 -37
  76. package/components/Form/rowHelpers.d.ts +20 -0
  77. package/components/Form/rowHelpers.js +76 -28
  78. package/components/Form/types.d.ts +11 -0
  79. package/components/GoogleLogin.vue.js +4 -4
  80. package/components/IconPicker.vue.js +9 -9
  81. package/components/ImportData/ImportData.vue.js +11 -11
  82. package/components/ImportData/ImportStep1.vue.js +10 -10
  83. package/components/ImportData/ImportStep2.vue.js +15 -14
  84. package/components/Input.vue.js +133 -129
  85. package/components/Kanban/KanbanBoard.vue.js +1 -1
  86. package/components/Kanban/KanbanBoard.vue2.js +9 -9
  87. package/components/MultiSelect/MultiSelect.vue.js +3 -2
  88. package/components/Navbar/Navbar.vue.js +17 -17
  89. package/components/Navbar/NavbarGroup.vue.js +8 -7
  90. package/components/Navbar/NavbarItem.vue.js +40 -39
  91. package/components/Navbar/NavbarTabs.vue.js +6 -184
  92. package/components/Navbar/NavbarTabs.vue2.js +204 -0
  93. package/components/Navbar/useNavbar.js +3 -3
  94. package/components/NavbarCommandPalette.vue.js +1 -1
  95. package/components/NumberInput.vue.js +2 -2
  96. package/components/NumberInput.vue2.js +81 -77
  97. package/components/OTPInput/OTPInput.vue.js +24 -23
  98. package/components/Pagination/Pagination.vue.d.ts +1 -1
  99. package/components/Pagination/Pagination.vue.js +5 -274
  100. package/components/Pagination/Pagination.vue2.js +283 -2
  101. package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
  102. package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
  103. package/components/Screen/Screen.vue.d.ts +1 -1
  104. package/components/Screen/Screen.vue.js +21 -21
  105. package/components/Screen/ScreenFilter.vue.js +5 -5
  106. package/components/Screen/components/ScreenAddAction.vue.js +3 -3
  107. package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
  108. package/components/Screen/components/ScreenExportModal.vue.js +12 -12
  109. package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
  110. package/components/Screen/components/ScreenToolbar.vue.js +15 -15
  111. package/components/SidePanel.vue.js +2 -2
  112. package/components/SidePanel.vue2.js +6 -6
  113. package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
  114. package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
  115. package/components/Slider.vue.js +123 -108
  116. package/components/Tabes/Tabes.vue.d.ts +8 -3
  117. package/components/Tabes/Tabes.vue.js +2 -2
  118. package/components/Tabes/Tabes.vue2.js +209 -200
  119. package/components/Tabes/tabes.utils.d.ts +23 -0
  120. package/components/Tabes/tabes.utils.js +39 -16
  121. package/components/Textarea.vue.d.ts +2 -0
  122. package/components/Textarea.vue.js +19 -16
  123. package/components/ThemeToggle.vue.js +8 -8
  124. package/components/ToastNotification.vue2.js +10 -10
  125. package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
  126. package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
  127. package/components/TreeConnectors/geometry.js +77 -69
  128. package/components/Workbook/WorkbookAddButton.vue.js +2 -2
  129. package/composables/useRtl.d.ts +14 -0
  130. package/composables/useRtl.js +33 -0
  131. package/index.js +470 -471
  132. package/package.json +1 -1
  133. package/style.css +86 -1
  134. package/types/button.d.ts +8 -0
  135. package/components/Navbar/NavbarTabs.vue3.js +0 -5
@@ -1,12 +1,12 @@
1
- import { defineComponent as b, computed as d, openBlock as n, createElementBlock as g, createElementVNode as R, createBlock as r, withCtx as x, createTextVNode as k, toDisplayString as I, createCommentVNode as v, unref as l } from "vue";
2
- import B from "./TableView.vue.js";
1
+ import { defineComponent as g, computed as d, openBlock as n, createElementBlock as R, createElementVNode as x, createBlock as s, withCtx as k, createTextVNode as B, toDisplayString as I, createCommentVNode as y, unref as l } from "vue";
2
+ import T from "./TableView.vue.js";
3
3
  import C from "./AccordionView.vue2.js";
4
4
  import U from "../Label.vue.js";
5
- import N from "../Button.vue.js";
6
- import { useCustomFieldRows as V } from "./composables/useCustomFieldRows.js";
7
- import { createRowHelpers as A } from "./rowHelpers.js";
8
- import { resolveI18nText as s } from "../../utils/i18n.js";
9
- const F = { class: "custom-fields-wrapper min-w-0 w-full" }, T = { class: "flex justify-between items-center mb-2" }, O = /* @__PURE__ */ b({
5
+ import z from "../Button.vue.js";
6
+ import { useCustomFieldRows as N } from "./composables/useCustomFieldRows.js";
7
+ import { createRowHelpers as V } from "./rowHelpers.js";
8
+ import { resolveI18nText as r } from "../../utils/i18n.js";
9
+ const A = { class: "custom-fields-wrapper min-w-0 w-full" }, F = { class: "flex justify-between items-center mb-2" }, q = /* @__PURE__ */ g({
10
10
  name: "CustomFields",
11
11
  __name: "index",
12
12
  props: {
@@ -31,18 +31,21 @@ const F = { class: "custom-fields-wrapper min-w-0 w-full" }, T = { class: "flex
31
31
  errors: { default: () => ({}) },
32
32
  isUpdate: { type: Boolean, default: !1 },
33
33
  layout: { default: "table" },
34
+ rowTitleKey: { default: void 0 },
34
35
  accordionTitleKey: { default: void 0 }
35
36
  },
36
37
  emits: ["update:modelValue", "change"],
37
38
  setup(a, { emit: f }) {
38
- const e = a, h = f, i = d(() => s(e.labelI18n, e.label)), m = d(
39
- () => s("vlite.customFields.emptyTitle", "No items added") ?? "No items added"
40
- ), u = d(
41
- () => s(
39
+ const e = a, i = d(
40
+ () => e.rowTitleKey || e.accordionTitleKey || void 0
41
+ ), h = f, m = d(() => r(e.labelI18n, e.label)), u = d(
42
+ () => r("vlite.customFields.emptyTitle", "No items added") ?? "No items added"
43
+ ), c = d(
44
+ () => r(
42
45
  "vlite.customFields.emptyDescription",
43
46
  "Add a new item to get started"
44
47
  ) ?? "Add a new item to get started"
45
- ), t = V(
48
+ ), t = N(
46
49
  {
47
50
  // Getters (not snapshots) — see the long-form note in the composable
48
51
  // file. The `watch(() => options.modelValue, ...)` source must
@@ -60,11 +63,11 @@ const F = { class: "custom-fields-wrapper min-w-0 w-full" }, T = { class: "flex
60
63
  maxRows: () => e.maxRows
61
64
  },
62
65
  h
63
- ), c = d(() => e.headers && e.headers.length > 0 ? e.headers : e.schema.map((o) => o.labelI18n ? s(
66
+ ), w = d(() => e.headers && e.headers.length > 0 ? e.headers : e.schema.map((o) => o.labelI18n ? r(
64
67
  o.labelI18n,
65
68
  typeof o.label == "string" ? o.label : o.name
66
- ) ?? o.name : typeof o.label == "string" ? o.label : o.name)), p = d(() => e.schema.slice(0, c.value.length)), w = d(
67
- () => A({
69
+ ) ?? o.name : typeof o.label == "string" ? o.label : o.name)), b = d(() => e.schema.slice(0, w.value.length)), v = d(
70
+ () => V({
68
71
  rows: t.rows.value,
69
72
  schema: e.schema,
70
73
  name: e.name,
@@ -72,19 +75,19 @@ const F = { class: "custom-fields-wrapper min-w-0 w-full" }, T = { class: "flex
72
75
  isUpdate: e.isUpdate,
73
76
  errors: e.errors
74
77
  })
75
- ), y = d(() => s(e.labelI18n, e.label ?? "Item") ?? "Item");
76
- return (o, z) => (n(), g("div", F, [
77
- R("div", T, [
78
- i.value ? (n(), r(U, {
78
+ ), p = d(() => r(e.labelI18n, e.label ?? "Item") ?? "Item");
79
+ return (o, D) => (n(), R("div", A, [
80
+ x("div", F, [
81
+ m.value ? (n(), s(U, {
79
82
  key: 0,
80
83
  class: "text-sm font-medium text-foreground"
81
84
  }, {
82
- default: x(() => [
83
- k(I(i.value), 1)
85
+ default: k(() => [
86
+ B(I(m.value), 1)
84
87
  ]),
85
88
  _: 1
86
- })) : v("", !0),
87
- a.readonly ? v("", !0) : (n(), r(N, {
89
+ })) : y("", !0),
90
+ a.readonly ? y("", !0) : (n(), s(z, {
88
91
  key: 1,
89
92
  type: "button",
90
93
  variant: "outline",
@@ -96,12 +99,12 @@ const F = { class: "custom-fields-wrapper min-w-0 w-full" }, T = { class: "flex
96
99
  onClick: l(t).addRow
97
100
  }, null, 8, ["disabled", "onClick"]))
98
101
  ]),
99
- a.layout === "table" ? (n(), r(B, {
102
+ a.layout === "table" ? (n(), s(T, {
100
103
  key: 0,
101
104
  rows: l(t).rows.value,
102
105
  schema: e.schema,
103
- "column-headers": c.value,
104
- "visible-schema-fields": p.value,
106
+ "column-headers": w.value,
107
+ "visible-schema-fields": b.value,
105
108
  draggable: a.draggable,
106
109
  disabled: a.disabled,
107
110
  readonly: a.readonly,
@@ -109,13 +112,17 @@ const F = { class: "custom-fields-wrapper min-w-0 w-full" }, T = { class: "flex
109
112
  "show-row-numbers": a.showRowNumbers,
110
113
  "can-remove-row": l(t).canRemoveRow.value,
111
114
  "can-add-row": l(t).canAddRow.value,
112
- helpers: w.value,
113
- "empty-title": m.value,
114
- "empty-description": u.value,
115
+ helpers: v.value,
116
+ variant: a.variant,
117
+ size: a.size,
118
+ rounded: a.rounded,
119
+ "row-title-key": i.value,
120
+ "empty-title": u.value,
121
+ "empty-description": c.value,
115
122
  "on-field-change": l(t).handleFieldChange,
116
123
  "on-remove-row": l(t).removeRow,
117
124
  "on-drag-update": l(t).handleDragUpdate
118
- }, null, 8, ["rows", "schema", "column-headers", "visible-schema-fields", "draggable", "disabled", "readonly", "is-update", "show-row-numbers", "can-remove-row", "can-add-row", "helpers", "empty-title", "empty-description", "on-field-change", "on-remove-row", "on-drag-update"])) : (n(), r(C, {
125
+ }, null, 8, ["rows", "schema", "column-headers", "visible-schema-fields", "draggable", "disabled", "readonly", "is-update", "show-row-numbers", "can-remove-row", "can-add-row", "helpers", "variant", "size", "rounded", "row-title-key", "empty-title", "empty-description", "on-field-change", "on-remove-row", "on-drag-update"])) : (n(), s(C, {
119
126
  key: 1,
120
127
  rows: l(t).rows.value,
121
128
  schema: e.schema,
@@ -128,18 +135,18 @@ const F = { class: "custom-fields-wrapper min-w-0 w-full" }, T = { class: "flex
128
135
  rounded: a.rounded,
129
136
  "can-remove-row": l(t).canRemoveRow.value,
130
137
  "can-add-row": l(t).canAddRow.value,
131
- helpers: w.value,
132
- "accordion-title-key": a.accordionTitleKey,
133
- "item-name": y.value,
134
- "empty-title": m.value,
135
- "empty-description": u.value,
138
+ helpers: v.value,
139
+ "row-title-key": i.value,
140
+ "item-name": p.value,
141
+ "empty-title": u.value,
142
+ "empty-description": c.value,
136
143
  "on-field-change": l(t).handleFieldChange,
137
144
  "on-remove-row": l(t).removeRow,
138
145
  "on-drag-update": l(t).handleDragUpdate
139
- }, null, 8, ["rows", "schema", "draggable", "disabled", "readonly", "is-update", "variant", "size", "rounded", "can-remove-row", "can-add-row", "helpers", "accordion-title-key", "item-name", "empty-title", "empty-description", "on-field-change", "on-remove-row", "on-drag-update"]))
146
+ }, null, 8, ["rows", "schema", "draggable", "disabled", "readonly", "is-update", "variant", "size", "rounded", "can-remove-row", "can-add-row", "helpers", "row-title-key", "item-name", "empty-title", "empty-description", "on-field-change", "on-remove-row", "on-drag-update"]))
140
147
  ]));
141
148
  }
142
149
  });
143
150
  export {
144
- O as default
151
+ q as default
145
152
  };
@@ -43,3 +43,23 @@ export declare const createRowHelpers: (params: {
43
43
  * presentational components from the schema author.
44
44
  */
45
45
  export declare const renderLabel: (label: string | Component | undefined) => string | Component | undefined;
46
+ /**
47
+ * Pick a human-readable title for a customFields row.
48
+ *
49
+ * Used by accordion headers and the small-screen stacked table card header.
50
+ *
51
+ * Resolution order:
52
+ * 1. Explicit `titleKey` (rowTitleKey / accordionTitleKey) when it has a value
53
+ * 2. Common row keys: `label`, `title`, `name` (covers Proof of Work, etc.)
54
+ * 3. First schema text-like field with a string value
55
+ * 4. First schema field whose value is an object with label/name/title
56
+ * 5. First schema select field whose selected option has a label
57
+ *
58
+ * Returns `undefined` when nothing meaningful is available — callers show
59
+ * `#N` as a fallback so stacked card headers never look empty.
60
+ */
61
+ export declare const resolveCustomFieldRowTitle: (params: {
62
+ row: Record<string, any>;
63
+ titleKey?: string;
64
+ schema?: IForm[];
65
+ }) => string | undefined;
@@ -1,40 +1,88 @@
1
- import { evaluateConditional as l, resolveFieldType as h, setNestedValue as m } from "./utils/form.utils.js";
2
- import { markRaw as y } from "vue";
3
- const x = (s) => {
4
- const { rows: u, name: i, values: c, isUpdate: d, errors: o } = s, p = (r, e) => u[r]?.[e], n = (r) => {
5
- let e = { ...c || {} };
6
- return i && (e = m(e, i, u)), {
7
- values: u[r] || {},
1
+ import { evaluateConditional as p, resolveFieldType as E, setNestedValue as j } from "./utils/form.utils.js";
2
+ import { markRaw as R } from "vue";
3
+ const V = (r) => {
4
+ const { rows: t, name: n, values: l, isUpdate: c, errors: s } = r, f = (o, e) => t[o]?.[e], i = (o) => {
5
+ let e = { ...l || {} };
6
+ return n && (e = j(e, n, t)), {
7
+ values: t[o] || {},
8
8
  globalValues: e,
9
- isUpdate: d
9
+ isUpdate: c
10
10
  };
11
- }, f = (r, e) => h(r, n(e)), w = (r, e) => l(e.disabled, n(r)), g = (r, e) => l(e.readonly, n(r)), R = (r, e) => e.when ? l(e.when, n(r)) : !0, a = (r) => i ? `${i}.${r}.` : null;
11
+ }, b = (o, e) => E(o, i(e)), w = (o, e) => p(e.disabled, i(o)), g = (o, e) => p(e.readonly, i(o)), h = (o, e) => e.when ? p(e.when, i(o)) : !0, y = (o) => n ? `${n}.${o}.` : null;
12
12
  return {
13
- errors: o,
14
- getFieldValue: p,
15
- getRowContext: n,
16
- getResolvedType: f,
17
- isFieldVisible: R,
13
+ errors: s,
14
+ getFieldValue: f,
15
+ getRowContext: i,
16
+ getResolvedType: b,
17
+ isFieldVisible: h,
18
18
  isFieldDisabled: w,
19
19
  isFieldReadonly: g,
20
- getRowErrorsHash: (r) => {
21
- const e = a(r);
22
- return e ? Object.keys(o).filter((t) => t.startsWith(e)).map((t) => o[t]).join(",") : "";
20
+ getRowErrorsHash: (o) => {
21
+ const e = y(o);
22
+ return e ? Object.keys(s).filter((a) => a.startsWith(e)).map((a) => s[a]).join(",") : "";
23
23
  },
24
- getFieldError: (r, e) => {
25
- const t = a(r);
26
- return t && o[`${t}${e}`] || "";
24
+ getFieldError: (o, e) => {
25
+ const a = y(o);
26
+ return a && s[`${a}${e}`] || "";
27
27
  },
28
- hasRowErrors: (r) => {
29
- const e = a(r);
30
- return e ? Object.keys(o).some((t) => t.startsWith(e)) : !1;
28
+ hasRowErrors: (o) => {
29
+ const e = y(o);
30
+ return e ? Object.keys(s).some((a) => a.startsWith(e)) : !1;
31
31
  }
32
32
  };
33
- }, $ = (s) => {
34
- if (s)
35
- return typeof s != "string" ? y(s) : s;
33
+ }, _ = (r) => {
34
+ if (r)
35
+ return typeof r != "string" ? R(r) : r;
36
+ }, T = /* @__PURE__ */ new Set(["text", "textarea", "email", "url", "tel", "search"]), F = ["label", "title", "name"], u = (r) => {
37
+ if (typeof r != "string") return;
38
+ const t = r.trim();
39
+ return t || void 0;
40
+ }, d = (r) => {
41
+ const t = u(r);
42
+ if (t)
43
+ return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t) || /^[a-z0-9_-]{24,}$/i.test(t) ? void 0 : t;
44
+ if (!r || typeof r != "object" || Array.isArray(r)) return;
45
+ const n = r;
46
+ return u(n.label) || u(n.name) || u(n.title) || u(n.text) || d(n.value);
47
+ }, m = (r, t) => {
48
+ if (t == null || t === "") return;
49
+ const n = d(t);
50
+ if (n && typeof t == "object") return n;
51
+ const l = r.options;
52
+ if (!Array.isArray(l)) return;
53
+ const c = t && typeof t == "object" && !Array.isArray(t) ? t.value ?? t.id : t, s = l.find((f) => f?.value === c || f?.value === t);
54
+ return u(s?.label);
55
+ }, $ = (r) => {
56
+ const { row: t, titleKey: n, schema: l = [] } = r;
57
+ if (!(!t || typeof t != "object")) {
58
+ if (n) {
59
+ const c = l.find((f) => f.name === n), s = c && m(c, t[n]) || d(t[n]);
60
+ if (s) return s;
61
+ }
62
+ for (const c of F) {
63
+ const s = d(t[c]);
64
+ if (s) return s;
65
+ }
66
+ for (const c of l) {
67
+ const s = typeof c.type == "string" ? c.type : void 0, f = t[c.name];
68
+ if (s && T.has(s)) {
69
+ const i = d(f);
70
+ if (i) return i;
71
+ continue;
72
+ }
73
+ if (f && typeof f == "object" && !Array.isArray(f)) {
74
+ const i = d(f);
75
+ if (i) return i;
76
+ }
77
+ if (s === "select") {
78
+ const i = m(c, f);
79
+ if (i) return i;
80
+ }
81
+ }
82
+ }
36
83
  };
37
84
  export {
38
- x as createRowHelpers,
39
- $ as renderLabel
85
+ V as createRowHelpers,
86
+ _ as renderLabel,
87
+ $ as resolveCustomFieldRowTitle
40
88
  };
@@ -78,12 +78,23 @@ export type IFormWhen = (context: IFormContext) => boolean;
78
78
  export type IFormGroupsHeadings = string[] | ((context: IFormContext) => string[] | undefined | null);
79
79
  /**
80
80
  * CustomFields schema props
81
+ *
82
+ * When `layout` is `'table'` (default), viewports below Tailwind `md`
83
+ * automatically render stacked labeled cards instead of the grid table.
84
+ * Card / accordion titles resolve via `rowTitleKey` (or legacy
85
+ * `accordionTitleKey`), then smart fallbacks (`label` / `title` / `name`).
81
86
  */
82
87
  export interface IFormCustomFieldsProps {
83
88
  schema: IForm[];
84
89
  headers?: string[];
85
90
  draggable?: boolean;
86
91
  layout?: 'table' | 'accordion';
92
+ /**
93
+ * Row object key used as the title in accordion headers and in the
94
+ * small-screen stacked table card header (e.g. `'label'`, `'title'`).
95
+ */
96
+ rowTitleKey?: string;
97
+ /** @deprecated Use `rowTitleKey`. Kept as an alias for backward compatibility. */
87
98
  accordionTitleKey?: string;
88
99
  addButtonText?: string;
89
100
  }
@@ -2,7 +2,7 @@ import { defineComponent as c, ref as f, computed as g, openBlock as m, createEl
2
2
  import { useTokenClient as w } from "vue3-google-signin";
3
3
  import y from "./Button.vue.js";
4
4
  import { $t as i } from "../utils/i18n.js";
5
- const z = { class: "google-login-wrapper inline-block w-full" }, L = { class: "font-medium" }, G = /* @__PURE__ */ c({
5
+ const z = { class: "google-login-wrapper inline-block w-full" }, B = { class: "font-medium" }, N = /* @__PURE__ */ c({
6
6
  __name: "GoogleLogin",
7
7
  props: {
8
8
  buttonText: {},
@@ -37,7 +37,7 @@ const z = { class: "google-login-wrapper inline-block w-full" }, L = { class: "f
37
37
  const e = i("vlite.googleLogin.buttonText");
38
38
  return e !== "vlite.googleLogin.buttonText" ? e : "Sign in with Google";
39
39
  });
40
- return (e, B) => (m(), b("div", z, [
40
+ return (e, L) => (m(), b("div", z, [
41
41
  v(e.$slots, "default", {
42
42
  login: a,
43
43
  loading: t.value,
@@ -54,7 +54,7 @@ const z = { class: "google-login-wrapper inline-block w-full" }, L = { class: "f
54
54
  onClick: a
55
55
  }, {
56
56
  default: C(() => [
57
- h("span", L, k(d.value), 1)
57
+ h("span", B, k(d.value), 1)
58
58
  ]),
59
59
  _: 1
60
60
  }, 8, ["variant", "size", "rounded", "disabled", "loading", "class"])
@@ -63,5 +63,5 @@ const z = { class: "google-login-wrapper inline-block w-full" }, L = { class: "f
63
63
  }
64
64
  });
65
65
  export {
66
- G as default
66
+ N as default
67
67
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as g, ref as v, computed as w, openBlock as k, createBlock as y, unref as a, withCtx as n, renderSlot as c, createVNode as s, mergeProps as P } from "vue";
2
- import $ from "./Dropdown/Dropdown.vue.js";
1
+ import { defineComponent as g, ref as v, computed as w, openBlock as k, createBlock as y, unref as n, withCtx as a, renderSlot as c, createVNode as s, mergeProps as P } from "vue";
2
+ import C from "./Dropdown/Dropdown.vue.js";
3
3
  import "@iconify/vue";
4
4
  import { $t as d } from "../utils/i18n.js";
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  /* empty css */
8
- import C from "./Button.vue.js";
9
- import I from "iconify-icon-picker";
8
+ import I from "./Button.vue.js";
9
+ import S from "iconify-icon-picker";
10
10
  import "iconify-icon-picker/style.css";
11
11
  const A = /* @__PURE__ */ g({
12
12
  __name: "IconPicker",
@@ -98,14 +98,14 @@ const A = /* @__PURE__ */ g({
98
98
  "tabler:ruler-2",
99
99
  "material-symbols:download-rounded"
100
100
  ];
101
- return (e, r) => (k(), y(a($), {
101
+ return (e, r) => (k(), y(n(C), {
102
102
  className: "max-h-[392px]! min-w-[250px]",
103
103
  onOnClose: r[1] || (r[1] = (b) => i("onClose")),
104
104
  position: o.position
105
105
  }, {
106
- trigger: n(() => [
106
+ trigger: a(() => [
107
107
  c(e.$slots, "default", {}, () => [
108
- s(C, P({
108
+ s(I, P({
109
109
  icon: o.value,
110
110
  rounded: "md",
111
111
  variant: "outline",
@@ -115,9 +115,9 @@ const A = /* @__PURE__ */ g({
115
115
  }), null, 16)
116
116
  ])
117
117
  ]),
118
- menu: n(() => [
118
+ menu: a(() => [
119
119
  c(e.$slots, "menu-top", { close: l }),
120
- s(a(I), {
120
+ s(n(S), {
121
121
  id: "icon-picker",
122
122
  placeholder: h.value,
123
123
  "items-per-page": 35,
@@ -1,4 +1,4 @@
1
- import { defineComponent as ne, computed as h, ref as y, shallowRef as $, openBlock as n, createBlock as d, withCtx as b, createElementVNode as B, createTextVNode as U, toDisplayString as _, createElementBlock as N, createCommentVNode as T, createVNode as ue, unref as pe, Fragment as ce, renderList as de, renderSlot as ve } from "vue";
1
+ import { defineComponent as ne, computed as h, ref as y, shallowRef as B, openBlock as n, createBlock as d, withCtx as b, createElementVNode as U, createTextVNode as $, toDisplayString as _, createElementBlock as N, createCommentVNode as T, createVNode as ue, unref as pe, Fragment as ce, renderList as de, renderSlot as ve } from "vue";
2
2
  import me from "../Modal.vue.js";
3
3
  import I from "../Button.vue.js";
4
4
  import fe from "../Timeline/Timeline.vue.js";
@@ -42,10 +42,10 @@ const we = { class: "px-2" }, xe = { class: "min-h-[300px]" }, De = {
42
42
  if (e !== i.titleI18n) return e;
43
43
  }
44
44
  return i.title;
45
- }), l = y(1), m = y(!1), C = $([]), v = y({}), q = y({
45
+ }), l = y(1), m = y(!1), C = B([]), v = y({}), q = y({
46
46
  existing: "replace",
47
47
  new: "create"
48
- }), M = y(""), O = $(null), S = $([]), F = $([]), x = y([]), V = {
48
+ }), M = y(""), O = B(null), S = B([]), F = B([]), x = y([]), V = {
49
49
  total: 0,
50
50
  processed: 0,
51
51
  created: 0,
@@ -161,13 +161,13 @@ const we = { class: "px-2" }, xe = { class: "min-h-[300px]" }, De = {
161
161
  ])
162
162
  ]),
163
163
  default: b(({ close: u }) => [
164
- B("div", we, [
164
+ U("div", we, [
165
165
  ue(pe(fe), {
166
166
  steps: Y.value,
167
167
  "active-step": l.value - 1,
168
168
  class: "mb-8"
169
169
  }, null, 8, ["steps", "active-step"]),
170
- B("div", xe, [
170
+ U("div", xe, [
171
171
  l.value === 1 ? (n(), d(he, {
172
172
  key: 0,
173
173
  importMethod: M.value,
@@ -200,14 +200,14 @@ const we = { class: "px-2" }, xe = { class: "min-h-[300px]" }, De = {
200
200
  }, null, 8, ["progress"])) : T("", !0)
201
201
  ]),
202
202
  x.value.length > 0 && l.value === 2 ? (n(), N("div", De, [
203
- B("ul", ke, [
203
+ U("ul", ke, [
204
204
  (n(!0), N(ce, null, de(x.value, (a) => (n(), N("li", { key: a }, _(a), 1))), 128))
205
205
  ])
206
206
  ])) : T("", !0)
207
207
  ])
208
208
  ]),
209
209
  footer: b(({ close: u }) => [
210
- B("div", _e, [
210
+ U("div", _e, [
211
211
  l.value > 1 && l.value < 4 ? (n(), d(I, {
212
212
  key: 0,
213
213
  variant: "outline",
@@ -216,7 +216,7 @@ const we = { class: "px-2" }, xe = { class: "min-h-[300px]" }, De = {
216
216
  icon: "lucide:arrow-left"
217
217
  }, {
218
218
  default: b(() => [
219
- U(_(Z.value), 1)
219
+ $(_(Z.value), 1)
220
220
  ]),
221
221
  _: 1
222
222
  }, 8, ["disabled"])) : (n(), N("div", Ie)),
@@ -228,7 +228,7 @@ const we = { class: "px-2" }, xe = { class: "min-h-[300px]" }, De = {
228
228
  "icon-right": "lucide:arrow-right"
229
229
  }, {
230
230
  default: b(() => [
231
- U(_(ee.value), 1)
231
+ $(_(ee.value), 1)
232
232
  ]),
233
233
  _: 1
234
234
  }, 8, ["disabled"])) : l.value === 3 ? (n(), d(I, {
@@ -239,7 +239,7 @@ const we = { class: "px-2" }, xe = { class: "min-h-[300px]" }, De = {
239
239
  loading: m.value
240
240
  }, {
241
241
  default: b(() => [
242
- U(_(te.value), 1)
242
+ $(_(te.value), 1)
243
243
  ]),
244
244
  _: 1
245
245
  }, 8, ["loading"])) : l.value === 4 && o.value.percentage >= 100 ? (n(), d(I, {
@@ -248,7 +248,7 @@ const we = { class: "px-2" }, xe = { class: "min-h-[300px]" }, De = {
248
248
  onClick: u
249
249
  }, {
250
250
  default: b(() => [
251
- U(_(ae.value), 1)
251
+ $(_(ae.value), 1)
252
252
  ]),
253
253
  _: 1
254
254
  }, 8, ["onClick"])) : T("", !0)
@@ -41,10 +41,10 @@ const X = { class: "space-y-2" }, Y = { class: "font-medium text-md" }, Z = { cl
41
41
  i("update:csvFile", r), i("update:importMethod", "file");
42
42
  const e = new FileReader();
43
43
  e.onload = (a) => {
44
- a.target?.result && _(a.target.result);
44
+ a.target?.result && C(a.target.result);
45
45
  }, e.readAsText(r);
46
46
  }, j = () => {
47
- i("update:importMethod", "paste"), c.value && _(c.value);
47
+ i("update:importMethod", "paste"), c.value && C(c.value);
48
48
  }, O = (r) => {
49
49
  const e = g(r), a = {};
50
50
  return b.fields.forEach((t) => {
@@ -52,7 +52,7 @@ const X = { class: "space-y-2" }, Y = { class: "font-medium text-md" }, Z = { cl
52
52
  a[g(u)] = t.field;
53
53
  });
54
54
  }), a[e] || "";
55
- }, _ = async (r) => {
55
+ }, C = async (r) => {
56
56
  try {
57
57
  const e = await import("papaparse"), a = Q(
58
58
  e,
@@ -76,11 +76,11 @@ const X = { class: "space-y-2" }, Y = { class: "font-medium text-md" }, Z = { cl
76
76
  }), f;
77
77
  });
78
78
  i("update:importData", A), i("update:preview", t.data.slice(0, 3));
79
- const C = {};
79
+ const _ = {};
80
80
  u.forEach((p) => {
81
81
  const f = O(p);
82
- C[p] = f || "";
83
- }), i("update:mappings", C), i("next");
82
+ _[p] = f || "";
83
+ }), i("update:mappings", _), i("next");
84
84
  },
85
85
  error: (t) => h(
86
86
  s("vlite.importData.parseError", "Failed to parse CSV: ") + t.message,
@@ -93,10 +93,10 @@ const X = { class: "space-y-2" }, Y = { class: "font-medium text-md" }, Z = { cl
93
93
  }, $ = (r) => {
94
94
  const e = r.target;
95
95
  e.files && e.files.length > 0 && w(e.files[0]);
96
- }, I = d(() => s("vlite.importData.uploadData", "Upload Data")), z = d(() => s("vlite.importData.dragDrop", "Drag & drop a file here or click to browse")), B = d(() => s("vlite.importData.csvOnlyHint", "Only CSV files are supported")), H = d(() => s("vlite.importData.pasteData", "Or paste CSV/Excel data")), N = d(() => s("vlite.importData.process", "Process Data")), U = d(() => s("vlite.importData.pastePlaceholder", `id, name, email
96
+ }, B = d(() => s("vlite.importData.uploadData", "Upload Data")), I = d(() => s("vlite.importData.dragDrop", "Drag & drop a file here or click to browse")), z = d(() => s("vlite.importData.csvOnlyHint", "Only CSV files are supported")), H = d(() => s("vlite.importData.pasteData", "Or paste CSV/Excel data")), N = d(() => s("vlite.importData.process", "Process Data")), U = d(() => s("vlite.importData.pastePlaceholder", `id, name, email
97
97
  1, John Doe, john@example.com`));
98
98
  return (r, e) => (V(), F("div", X, [
99
- o("h5", Y, n(I.value), 1),
99
+ o("h5", Y, n(B.value), 1),
100
100
  o("div", Z, [
101
101
  o("div", {
102
102
  class: M([
@@ -124,8 +124,8 @@ const X = { class: "space-y-2" }, Y = { class: "font-medium text-md" }, Z = { cl
124
124
  class: "w-6 h-6"
125
125
  })
126
126
  ]),
127
- o("p", re, n(z.value), 1),
128
- o("p", ae, n(B.value), 1),
127
+ o("p", re, n(I.value), 1),
128
+ o("p", ae, n(z.value), 1),
129
129
  l.csvFile ? (V(), F("p", oe, n(l.csvFile.name) + " (" + n((l.csvFile.size / 1024).toFixed(2)) + " KB) ", 1)) : K("", !0)
130
130
  ])
131
131
  ], 34),
@@ -1,10 +1,11 @@
1
- import { defineComponent as V, ref as $, computed as r, openBlock as n, createElementBlock as a, createElementVNode as e, toDisplayString as c, Fragment as f, renderList as x, isMemoSame as B, normalizeClass as I, createBlock as O, unref as j, createCommentVNode as w, createVNode as z } from "vue";
1
+ import { defineComponent as V, ref as $, computed as a, openBlock as n, createElementBlock as r, createElementVNode as e, toDisplayString as c, Fragment as f, renderList as x, isMemoSame as B, normalizeClass as I, createBlock as O, unref as j, createCommentVNode as w, createVNode as z } from "vue";
2
2
  import A from "../Dropdown/Dropdown.vue.js";
3
3
  import "@iconify/vue";
4
4
  import { $t as E } from "../../utils/i18n.js";
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  /* empty css */
8
+ /* empty css */
8
9
  import P from "../CheckBox.vue.js";
9
10
  const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }, q = { class: "border border-border rounded-xl overflow-hidden" }, L = { class: "overflow-x-auto max-h-[440px] always-scroll scrollbar-thin" }, W = { class: "import-table" }, G = { class: "import-thead" }, J = { class: "import-th" }, K = { class: "import-th" }, Q = { class: "import-th" }, T = { class: "import-tbody" }, X = { class: "import-td-header" }, Y = { class: "import-td-dropdown" }, Z = {
10
11
  key: 1,
@@ -15,7 +16,7 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
15
16
  }, st = { class: "import-td-action" }, ot = { class: "flex justify-center items-center h-full" }, it = {
16
17
  key: 0,
17
18
  class: "text-center text-sm text-warning font-medium p-4 bg-warning/10 rounded-lg border border-warning/20"
18
- }, vt = /* @__PURE__ */ V({
19
+ }, gt = /* @__PURE__ */ V({
19
20
  __name: "ImportStep2",
20
21
  props: {
21
22
  headers: {},
@@ -28,20 +29,20 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
28
29
  const m = l, v = b, o = $([]), d = (s, i) => {
29
30
  const t = E(s);
30
31
  return t !== s ? t : i;
31
- }, y = r(() => m.headers.filter((s) => m.mappings[s] !== "")), k = (s) => {
32
+ }, y = a(() => m.headers.filter((s) => m.mappings[s] !== "")), k = (s) => {
32
33
  const i = { ...m.mappings };
33
34
  o.value.includes(s) ? o.value = o.value.filter((g) => g !== s) : o.value.push(s), i[s] !== "" && (i[s] = ""), v("update:mappings", i);
34
35
  }, D = () => m.availableFields.map((s) => ({
35
36
  label: s.required ? `${s.label} *` : s.label,
36
37
  value: s.value
37
38
  }));
38
- r(() => d("vlite.importData.assignFields", "Assign Fields"));
39
- const S = r(
39
+ a(() => d("vlite.importData.assignFields", "Assign Fields"));
40
+ const S = a(
40
41
  () => d("vlite.importData.assignDesc", "Match your CSV columns to the correct system fields.")
41
- ), F = r(() => d("vlite.importData.csvHeader", "CSV Header")), C = r(() => d("vlite.importData.fieldMapping", "System Field")), H = r(() => d("vlite.importData.preview", "Data Preview")), M = r(
42
+ ), F = a(() => d("vlite.importData.csvHeader", "CSV Header")), C = a(() => d("vlite.importData.fieldMapping", "System Field")), H = a(() => d("vlite.importData.preview", "Data Preview")), M = a(
42
43
  () => d("vlite.importData.noHeaders", "No headers mapped. Data will not be imported properly.")
43
44
  );
44
- return (s, i) => (n(), a("div", R, [
45
+ return (s, i) => (n(), r("div", R, [
45
46
  e("div", null, [
46
47
  e("p", U, c(S.value), 1)
47
48
  ]),
@@ -57,7 +58,7 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
57
58
  ])
58
59
  ]),
59
60
  e("tbody", T, [
60
- (n(!0), a(f, null, x(l.headers, (t, g, nt, u) => {
61
+ (n(!0), r(f, null, x(l.headers, (t, g, nt, u) => {
61
62
  const _ = [
62
63
  t,
63
64
  o.value.includes(t),
@@ -65,7 +66,7 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
65
66
  l.preview.map((p) => p[t])
66
67
  ];
67
68
  if (u && u.key === t && B(u, _)) return u;
68
- const h = (n(), a("tr", {
69
+ const h = (n(), r("tr", {
69
70
  key: t,
70
71
  class: I([
71
72
  "import-tr",
@@ -74,7 +75,7 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
74
75
  }, [
75
76
  e("td", X, c(t), 1),
76
77
  e("td", Y, [
77
- o.value.includes(t) ? (n(), a("span", Z, "Ignored")) : (n(), O(j(A), {
78
+ o.value.includes(t) ? (n(), r("span", Z, "Ignored")) : (n(), O(j(A), {
78
79
  key: 0,
79
80
  class: "w-full",
80
81
  options: D(),
@@ -86,8 +87,8 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
86
87
  }, null, 8, ["options", "selected", "onOnSelect"]))
87
88
  ]),
88
89
  e("td", tt, [
89
- o.value.includes(t) ? w("", !0) : (n(), a("div", et, [
90
- (n(!0), a(f, null, x(l.preview, (p, N) => (n(), a("div", {
90
+ o.value.includes(t) ? w("", !0) : (n(), r("div", et, [
91
+ (n(!0), r(f, null, x(l.preview, (p, N) => (n(), r("div", {
91
92
  key: N,
92
93
  class: "truncate text-xs"
93
94
  }, c(String(p[t] || "").slice(0, 50)), 1))), 128))
@@ -109,10 +110,10 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
109
110
  ])
110
111
  ])
111
112
  ]),
112
- y.value.length === 0 ? (n(), a("div", it, c(M.value), 1)) : w("", !0)
113
+ y.value.length === 0 ? (n(), r("div", it, c(M.value), 1)) : w("", !0)
113
114
  ]));
114
115
  }
115
116
  });
116
117
  export {
117
- vt as default
118
+ gt as default
118
119
  };