vlite3 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +5 -0
  2. package/components/CategoryManager/CategoryManager.vue.js +1 -1
  3. package/components/Chart/BarChart.vue.d.ts +48 -0
  4. package/components/Chart/CircleChart.vue.d.ts +47 -0
  5. package/components/Chart/LineChart.vue.d.ts +55 -0
  6. package/components/Chart/PieChart.vue.d.ts +49 -0
  7. package/components/Chart/index.d.ts +5 -0
  8. package/components/Chart/types.d.ts +135 -0
  9. package/components/Chart/utils.d.ts +40 -0
  10. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  11. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  12. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  13. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  14. package/components/Comment/CommentEditor.vue.d.ts +41 -0
  15. package/components/Comment/CommentEditor.vue.js +221 -0
  16. package/components/Comment/CommentEditor.vue2.js +4 -0
  17. package/components/Comment/CommentItem.vue.d.ts +70 -0
  18. package/components/Comment/CommentItem.vue.js +7 -0
  19. package/components/Comment/CommentItem.vue2.js +322 -0
  20. package/components/Comment/CommentThread.vue.d.ts +64 -0
  21. package/components/Comment/CommentThread.vue.js +185 -0
  22. package/components/Comment/CommentThread.vue2.js +4 -0
  23. package/components/Comment/index.d.ts +4 -0
  24. package/components/Comment/types.d.ts +34 -0
  25. package/components/DataTable/DataTable.vue.d.ts +2 -4
  26. package/components/DataTable/DataTable.vue.js +175 -226
  27. package/components/DataTable/DataTableHeader.vue.d.ts +2 -0
  28. package/components/DataTable/DataTableHeader.vue.js +24 -23
  29. package/components/DataTable/DataTableRow.vue.d.ts +2 -0
  30. package/components/DataTable/DataTableRow.vue.js +32 -31
  31. package/components/DataTable/types.d.ts +2 -9
  32. package/components/Dropdown/Dropdown.vue.d.ts +2 -0
  33. package/components/Dropdown/Dropdown.vue.js +60 -58
  34. package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
  35. package/components/Dropdown/DropdownTrigger.vue.js +7 -6
  36. package/components/Empty/Empty.vue.js +7 -5
  37. package/components/Empty/index.d.ts +1 -1
  38. package/components/Empty/variants/Variant12.vue.d.ts +22 -0
  39. package/components/Empty/variants/Variant12.vue.js +35 -0
  40. package/components/Empty/variants/Variant12.vue2.js +4 -0
  41. package/components/Footer/Footer.vue.d.ts +3 -0
  42. package/components/Footer/Variant1.vue.d.ts +20 -0
  43. package/components/Footer/Variant2.vue.d.ts +20 -0
  44. package/components/Footer/Variant3.vue.d.ts +12 -0
  45. package/components/Footer/index.d.ts +2 -0
  46. package/components/Footer/types.d.ts +73 -0
  47. package/components/Form/CustomFields.vue.d.ts +2 -0
  48. package/components/Form/CustomFields.vue.js +2 -2
  49. package/components/Form/CustomFields.vue2.js +125 -122
  50. package/components/Form/FormField.vue.js +1 -1
  51. package/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
  52. package/components/MultiSelect/MultiSelect.vue.js +95 -94
  53. package/components/NavbarCommandPalette.vue.js +1 -1
  54. package/components/NumberInput.vue.js +1 -1
  55. package/components/NumberInput.vue2.js +39 -38
  56. package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +26 -0
  57. package/components/RichTextEditor/RichTextReader.vue.d.ts +7 -0
  58. package/components/RichTextEditor/RichTextToolbar.vue.d.ts +24 -0
  59. package/components/RichTextEditor/composables/useRichTextImageUpload.d.ts +14 -0
  60. package/components/RichTextEditor/composables/useRichTextLinks.d.ts +32 -0
  61. package/components/RichTextEditor/index.d.ts +2 -0
  62. package/components/Screen/Screen.vue.js +45 -46
  63. package/components/Screen/ScreenFilter.vue.js +1 -1
  64. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  65. package/components/SidebarMenu/SidebarMenu.vue.js +192 -91
  66. package/components/SidebarMenu/SidebarMenu.vue3.js +5 -0
  67. package/components/SidebarMenu/SidebarMenuItem.vue.js +170 -157
  68. package/components/SidebarMenu/types.d.ts +12 -3
  69. package/components/{DataTable/DataTableToolbar.vue.d.ts → Splitter/Splitter.vue.d.ts} +18 -15
  70. package/components/Splitter/Splitter.vue.js +64 -0
  71. package/components/Splitter/Splitter.vue2.js +4 -0
  72. package/components/Splitter/index.d.ts +1 -0
  73. package/components/StatusChip/status-map.js +34 -2
  74. package/components/index.d.ts +4 -0
  75. package/core/config.d.ts +18 -0
  76. package/index.d.ts +2 -0
  77. package/index.js +316 -307
  78. package/package.json +1 -1
  79. package/style.css +42 -6
  80. package/types/config.type.d.ts +2 -0
  81. package/components/DataTable/DataTableToolbar.vue.js +0 -60
  82. package/components/DataTable/DataTableToolbar.vue2.js +0 -4
  83. package/components/SidebarMenu/SidebarMenu.vue2.js +0 -4
  84. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
@@ -0,0 +1,20 @@
1
+ import { FooterData, FooterLabels } from './types';
2
+ type __VLS_Props = {
3
+ data: FooterData;
4
+ labels?: FooterLabels;
5
+ containerClass?: string | any[] | Record<string, boolean>;
6
+ };
7
+ type __VLS_PublicProps = {
8
+ 'newsletterEmail'?: string;
9
+ } & __VLS_Props;
10
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ "update:newsletterEmail": (value: string) => any;
12
+ } & {
13
+ subscribe: (email: string) => any;
14
+ "link-click": (url: string, event: MouseEvent) => any;
15
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
+ onSubscribe?: (email: string) => any;
17
+ "onLink-click"?: (url: string, event: MouseEvent) => any;
18
+ "onUpdate:newsletterEmail"?: (value: string) => any;
19
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
20
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { FooterData, FooterLabels } from './types';
2
+ type __VLS_Props = {
3
+ data: FooterData;
4
+ labels?: FooterLabels;
5
+ containerClass?: string | any[] | Record<string, boolean>;
6
+ };
7
+ type __VLS_PublicProps = {
8
+ 'newsletterEmail'?: string;
9
+ } & __VLS_Props;
10
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ "update:newsletterEmail": (value: string) => any;
12
+ } & {
13
+ subscribe: (email: string) => any;
14
+ "link-click": (url: string, event: MouseEvent) => any;
15
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
+ onSubscribe?: (email: string) => any;
17
+ "onLink-click"?: (url: string, event: MouseEvent) => any;
18
+ "onUpdate:newsletterEmail"?: (value: string) => any;
19
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
20
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { FooterData, FooterLabels } from './types';
2
+ type __VLS_Props = {
3
+ data: FooterData;
4
+ labels?: FooterLabels;
5
+ containerClass?: string | any[] | Record<string, boolean>;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
+ "link-click": (url: string, event: MouseEvent) => any;
9
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ "onLink-click"?: (url: string, event: MouseEvent) => any;
11
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
12
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as Footer } from './Footer.vue';
2
+ export * from './types';
@@ -0,0 +1,73 @@
1
+ export type FooterVariant = 'Variant1' | 'Variant2' | 'Variant3';
2
+ export interface FooterSocialLink {
3
+ /** Iconify icon name (e.g., 'lucide:instagram') or image URL */
4
+ icon: string;
5
+ /** Full URL for the social link */
6
+ url: string;
7
+ /** Accessible label for screen readers (e.g., 'Instagram') */
8
+ label?: string;
9
+ }
10
+ export interface FooterLink {
11
+ /** Display text for the link */
12
+ label: string;
13
+ /** Full URL (href) */
14
+ url: string;
15
+ /** If true, link opens in a new tab with rel="noopener noreferrer" */
16
+ external?: boolean;
17
+ /** Optional leading icon (Iconify name or image URL) */
18
+ icon?: string;
19
+ }
20
+ export interface FooterLinkGroup {
21
+ /** Column heading (e.g., 'Product', 'Company', 'Resources') */
22
+ title: string;
23
+ /** Array of links in this group */
24
+ links: FooterLink[];
25
+ }
26
+ export interface FooterNewsletterConfig {
27
+ /** Title text (e.g., "Stay updated") */
28
+ title?: string;
29
+ /** Description text (e.g., "Subscribe to our newsletter for the latest updates.") */
30
+ description?: string;
31
+ /** Input placeholder text */
32
+ placeholder?: string;
33
+ /** Submit button text */
34
+ buttonText?: string;
35
+ }
36
+ export interface FooterData {
37
+ /** Company / brand name displayed in the footer */
38
+ brandName?: string;
39
+ /** URL to brand logo image, or an Iconify icon name */
40
+ brandLogo?: string;
41
+ /** Brand tagline or short description */
42
+ brandDescription?: string;
43
+ /** Column-based link groups (e.g., Product, Company, Resources) */
44
+ linkGroups?: FooterLinkGroup[];
45
+ /** Social media icon links (rendered as icon buttons) */
46
+ socialLinks?: FooterSocialLink[];
47
+ /** Copyright text (e.g., '© 2024 Acme Inc. All rights reserved.') */
48
+ copyright?: string;
49
+ /** Legal links displayed in the bottom bar (e.g., Terms, Privacy Policy) */
50
+ legalLinks?: FooterLink[];
51
+ /** Newsletter subscription section configuration */
52
+ newsletter?: FooterNewsletterConfig;
53
+ /** Small badge text near brand (e.g., version number, status) */
54
+ badge?: string;
55
+ }
56
+ export interface FooterLabels {
57
+ /** Replaces the default "Follow us" heading above social icons */
58
+ followUs?: string;
59
+ /** Replaces the default "Subscribe" button text */
60
+ subscribe?: string;
61
+ /** Replaces the default "Newsletter" heading */
62
+ newsletter?: string;
63
+ }
64
+ export interface FooterProps {
65
+ /** The complete footer data object (required) */
66
+ data: FooterData;
67
+ /** Visual style variant */
68
+ variant?: FooterVariant;
69
+ /** Custom text label overrides for static UI strings */
70
+ labels?: FooterLabels;
71
+ /** Custom CSS class for the root container */
72
+ containerClass?: string | any[] | Record<string, boolean>;
73
+ }
@@ -9,6 +9,7 @@ interface Props {
9
9
  size?: InputSize;
10
10
  rounded?: InputRounded;
11
11
  disabled?: boolean;
12
+ readonly?: boolean;
12
13
  draggable?: boolean;
13
14
  minRows?: number;
14
15
  maxRows?: number;
@@ -33,6 +34,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
33
34
  variant: InputVariant;
34
35
  size: InputSize;
35
36
  rounded: InputRounded;
37
+ readonly: boolean;
36
38
  disabled: boolean;
37
39
  isUpdate: boolean;
38
40
  modelValue: Record<string, any>[];
@@ -1,7 +1,7 @@
1
1
  import o from "./CustomFields.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-087f0277"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6aede99c"]]);
5
5
  export {
6
- s as default
6
+ r as default
7
7
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as Z, computed as f, shallowRef as I, watch as ee, openBlock as n, createElementBlock as d, createElementVNode as p, createBlock as B, withCtx as D, createTextVNode as te, toDisplayString as v, createCommentVNode as c, createVNode as w, Fragment as k, renderList as V, normalizeClass as C, unref as ae, isMemoSame as re } from "vue";
2
- import { VueDraggable as le } from "vue-draggable-plus";
1
+ import { defineComponent as _, computed as f, shallowRef as I, watch as ee, openBlock as n, createElementBlock as d, createElementVNode as w, createBlock as R, withCtx as N, createTextVNode as te, toDisplayString as v, createCommentVNode as i, Fragment as k, renderList as V, normalizeClass as C, createVNode as $, unref as ae, isMemoSame as le } from "vue";
2
+ import { VueDraggable as re } from "vue-draggable-plus";
3
3
  import se from "./FormField.vue.js";
4
- import N from "../Button.vue.js";
4
+ import E from "../Button.vue.js";
5
5
  import oe from "../Label.vue.js";
6
6
  import ne from "../Icon.vue.js";
7
- import { $t as x } from "../../utils/i18n.js";
8
- import { setNestedValue as E, resolveFieldType as de, evaluateConditional as $ } from "./utils/form.utils.js";
7
+ import { $t as p } from "../../utils/i18n.js";
8
+ import { setNestedValue as T, resolveFieldType as de, evaluateConditional as F } from "./utils/form.utils.js";
9
9
  const ue = { class: "custom-fields-wrapper" }, ie = { class: "flex justify-between items-center mb-2" }, ce = { class: "custom-fields-table border border-border rounded overflow-hidden bg-background" }, me = {
10
10
  key: 0,
11
11
  class: "flex border-b border-border bg-muted/50 text-gray-800 text-xs font-semibold uppercase tracking-wider"
@@ -18,16 +18,16 @@ const ue = { class: "custom-fields-wrapper" }, ie = { class: "flex justify-betwe
18
18
  }, ve = {
19
19
  key: 2,
20
20
  class: "w-10 flex-none p-3"
21
- }, ge = {
21
+ }, ye = {
22
22
  key: 1,
23
23
  class: "w-10 flex-none flex items-center justify-center text-xs text-muted-foreground border-r border-border bg-muted/20"
24
- }, he = {
24
+ }, ge = {
25
25
  key: 2,
26
26
  class: "w-10 flex-none flex items-center justify-center border-l border-border bg-muted/20"
27
- }, ye = {
27
+ }, he = {
28
28
  key: 1,
29
29
  class: "flex flex-col items-center justify-center py-6 text-center bg-muted/5"
30
- }, pe = { class: "text-sm font-medium text-foreground" }, we = { class: "text-xs text-muted-foreground mt-1" }, _e = /* @__PURE__ */ Z({
30
+ }, we = { class: "text-sm font-medium text-foreground" }, pe = { class: "text-xs text-muted-foreground mt-1" }, Be = /* @__PURE__ */ _({
31
31
  __name: "CustomFields",
32
32
  props: {
33
33
  name: {},
@@ -38,6 +38,7 @@ const ue = { class: "custom-fields-wrapper" }, ie = { class: "flex justify-betwe
38
38
  size: { default: "md" },
39
39
  rounded: { default: "md" },
40
40
  disabled: { type: Boolean, default: !1 },
41
+ readonly: { type: Boolean, default: !1 },
41
42
  draggable: { type: Boolean, default: !1 },
42
43
  minRows: { default: 0 },
43
44
  maxRows: {},
@@ -51,195 +52,197 @@ const ue = { class: "custom-fields-wrapper" }, ie = { class: "flex justify-betwe
51
52
  isUpdate: { type: Boolean, default: !1 }
52
53
  },
53
54
  emits: ["update:modelValue", "change"],
54
- setup(s, { emit: T }) {
55
- const a = s, F = T, U = f(() => a.labelI18n ? x(a.labelI18n) : a.label), z = f(() => {
56
- const e = x("vlite.customFields.emptyTitle");
55
+ setup(r, { emit: z }) {
56
+ const t = r, U = z, B = f(() => t.labelI18n ? p(t.labelI18n) : t.label), A = f(() => {
57
+ const e = p("vlite.customFields.emptyTitle");
57
58
  return e !== "vlite.customFields.emptyTitle" ? e : "No items added";
58
- }), A = f(() => {
59
- const e = x("vlite.customFields.emptyDescription");
59
+ }), S = f(() => {
60
+ const e = p("vlite.customFields.emptyDescription");
60
61
  return e !== "vlite.customFields.emptyDescription" ? e : "Add a new item to get started";
61
- }), l = I([]), _ = () => `row_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
62
+ }), s = I([]), j = () => `row_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
62
63
  ee(
63
- () => a.modelValue,
64
+ () => t.modelValue,
64
65
  (e) => {
65
- Array.isArray(e) ? l.value = e.map((t, o) => {
66
- const r = l.value[o];
66
+ Array.isArray(e) ? s.value = e.map((a, o) => {
67
+ const l = s.value[o];
67
68
  return {
68
- ...t,
69
- _id: r?._id || _()
69
+ ...a,
70
+ _id: l?._id || j()
70
71
  };
71
- }) : l.value = [];
72
+ }) : s.value = [];
72
73
  },
73
74
  { immediate: !0, deep: !0 }
74
75
  );
75
- const S = () => {
76
+ const H = () => {
76
77
  const e = {};
77
- for (const t of a.schema) {
78
- const o = typeof t.value == "function" ? t.value() : t.value;
79
- e[t.name] = o ?? null;
78
+ for (const a of t.schema) {
79
+ const o = typeof a.value == "function" ? a.value() : a.value;
80
+ let l = null;
81
+ (a.props?.multiple || a.type === "multiSelect" || a.type === "tags") && (l = []), e[a.name] = o ?? l;
80
82
  }
81
- return { ...e, _id: _() };
82
- }, H = () => {
83
- if (a.disabled || a.maxRows && l.value.length >= a.maxRows) return;
84
- const e = [...l.value, S()];
85
- l.value = e, g(e);
86
- }, L = (e) => {
87
- if (a.disabled || l.value.length <= a.minRows) return;
88
- const t = [...l.value];
89
- t.splice(e, 1), l.value = t, g(t);
90
- }, M = async (e, t, o) => {
91
- const r = [...l.value];
92
- r[e] = {
93
- ...r[e],
94
- [t]: o.value
83
+ return { ...e, _id: j() };
84
+ }, L = () => {
85
+ if (t.disabled || t.readonly || t.maxRows && s.value.length >= t.maxRows) return;
86
+ const e = [...s.value, H()];
87
+ s.value = e, y(e);
88
+ }, M = (e) => {
89
+ if (t.disabled || t.readonly || s.value.length <= t.minRows) return;
90
+ const a = [...s.value];
91
+ a.splice(e, 1), s.value = a, y(a);
92
+ }, G = async (e, a, o) => {
93
+ const l = [...s.value];
94
+ l[e] = {
95
+ ...l[e],
96
+ [a]: o.value
95
97
  };
96
- const y = a.schema.find((i) => i.name === t);
97
- if (y && y.updateValues)
98
+ const h = t.schema.find((c) => c.name === a);
99
+ if (h && h.updateValues)
98
100
  try {
99
- const i = r[e];
100
- let m = { ...a.values || {} };
101
- a.name && (m = E(m, a.name, r));
102
- const b = await y.updateValues({
101
+ const c = l[e];
102
+ let m = { ...t.values || {} };
103
+ t.name && (m = T(m, t.name, l));
104
+ const b = await h.updateValues({
103
105
  value: o.value,
104
- values: i,
106
+ values: c,
105
107
  // strictly local row scope
106
108
  globalValues: m,
107
109
  // strictly global root scope
108
110
  data: o.data,
109
- isUpdate: a.isUpdate
111
+ isUpdate: t.isUpdate
110
112
  });
111
- b && typeof b == "object" && (r[e] = { ...r[e], ...b });
112
- } catch (i) {
113
- console.error(`[CustomFields] Error in updateValues for ${t}:`, i);
113
+ b && typeof b == "object" && (l[e] = { ...l[e], ...b });
114
+ } catch (c) {
115
+ console.error(`[CustomFields] Error in updateValues for ${a}:`, c);
114
116
  }
115
- l.value = r, g(r);
116
- }, G = (e) => {
117
- l.value = e, g(e);
118
- }, g = (e) => {
119
- const t = e.map(({ _id: o, ...r }) => r);
120
- F("update:modelValue", t), F("change", t);
121
- }, O = (e, t) => l.value[e]?.[t], W = f(() => !(a.disabled || a.maxRows && l.value.length >= a.maxRows)), R = f(() => a.disabled ? !1 : l.value.length > a.minRows), j = f(() => a.headers && a.headers.length > 0 ? a.headers : a.schema.map((e) => e.labelI18n ? x(e.labelI18n) : e.label || e.name)), h = (e) => {
122
- let t = { ...a.values || {} };
123
- return a.name && (t = E(t, a.name, l.value)), {
124
- values: l.value[e] || {},
125
- globalValues: t,
126
- isUpdate: a.isUpdate
117
+ s.value = l, y(l);
118
+ }, O = (e) => {
119
+ s.value = e, y(e);
120
+ }, y = (e) => {
121
+ const a = e.map(({ _id: o, ...l }) => l);
122
+ U("update:modelValue", a), U("change", a);
123
+ }, W = (e, a) => s.value[e]?.[a], q = f(() => !(t.disabled || t.readonly || t.maxRows && s.value.length >= t.maxRows)), x = f(() => t.disabled || t.readonly ? !1 : s.value.length > t.minRows), D = f(() => t.headers && t.headers.length > 0 ? t.headers : t.schema.map((e) => e.labelI18n ? p(e.labelI18n) : e.label || e.name)), g = (e) => {
124
+ let a = { ...t.values || {} };
125
+ return t.name && (a = T(a, t.name, s.value)), {
126
+ values: s.value[e] || {},
127
+ globalValues: a,
128
+ isUpdate: t.isUpdate
127
129
  };
128
- }, q = (e, t) => de(e, h(t)), J = (e, t) => a.disabled ? !0 : $(t.disabled, h(e)), K = (e, t) => $(t.readonly, h(e)), P = (e, t) => t.when ? $(t.when, h(e)) : !0, Q = (e) => {
129
- if (!a.errors || !a.name) return "";
130
- const t = `${a.name}.${e}.`;
131
- return Object.keys(a.errors).filter((o) => o.startsWith(t)).map((o) => a.errors[o]).join(",");
130
+ }, J = (e, a) => de(e, g(a)), K = (e, a) => t.disabled ? !0 : F(a.disabled, g(e)), P = (e, a) => t.readonly ? !0 : F(a.readonly, g(e)), Q = (e, a) => a.when ? F(a.when, g(e)) : !0, X = (e) => {
131
+ if (!t.errors || !t.name) return "";
132
+ const a = `${t.name}.${e}.`;
133
+ return Object.keys(t.errors).filter((o) => o.startsWith(a)).map((o) => t.errors[o]).join(",");
132
134
  };
133
- return (e, t) => (n(), d("div", ue, [
134
- p("div", ie, [
135
- U.value ? (n(), B(oe, {
135
+ return (e, a) => (n(), d("div", ue, [
136
+ w("div", ie, [
137
+ B.value ? (n(), R(oe, {
136
138
  key: 0,
137
139
  class: "text-sm font-medium text-foreground"
138
140
  }, {
139
- default: D(() => [
140
- te(v(U.value), 1)
141
+ default: N(() => [
142
+ te(v(B.value), 1)
141
143
  ]),
142
144
  _: 1
143
- })) : c("", !0),
144
- w(N, {
145
+ })) : i("", !0),
146
+ r.readonly ? i("", !0) : (n(), R(E, {
147
+ key: 1,
145
148
  type: "button",
146
149
  variant: "outline",
147
150
  size: "xs",
148
151
  rounded: "full",
149
152
  icon: "lucide:plus",
150
- disabled: !W.value,
151
- onClick: H
152
- }, null, 8, ["disabled"])
153
+ disabled: !q.value,
154
+ onClick: L
155
+ }, null, 8, ["disabled"]))
153
156
  ]),
154
- p("div", ce, [
155
- j.value.length > 0 ? (n(), d("div", me, [
156
- s.draggable ? (n(), d("div", be)) : c("", !0),
157
- s.showRowNumbers ? (n(), d("div", fe, " # ")) : c("", !0),
158
- (n(!0), d(k, null, V(j.value, (o, r) => (n(), d("div", {
159
- key: r,
160
- class: C(["flex-1 p-3 min-w-0 truncate", { "border-l border-border": r > 0 }])
157
+ w("div", ce, [
158
+ D.value.length > 0 ? (n(), d("div", me, [
159
+ r.draggable && !r.disabled && !r.readonly ? (n(), d("div", be)) : i("", !0),
160
+ r.showRowNumbers ? (n(), d("div", fe, " # ")) : i("", !0),
161
+ (n(!0), d(k, null, V(D.value, (o, l) => (n(), d("div", {
162
+ key: l,
163
+ class: C(["flex-1 p-3 min-w-0 truncate", { "border-l border-border": l > 0 }])
161
164
  }, v(o), 3))), 128)),
162
- R.value ? (n(), d("div", ve)) : c("", !0)
163
- ])) : c("", !0),
164
- w(ae(le), {
165
- "model-value": l.value,
166
- "onUpdate:modelValue": G,
167
- disabled: !s.draggable || s.disabled,
165
+ x.value ? (n(), d("div", ve)) : i("", !0)
166
+ ])) : i("", !0),
167
+ $(ae(re), {
168
+ "model-value": s.value,
169
+ "onUpdate:modelValue": O,
170
+ disabled: !r.draggable || r.disabled || r.readonly,
168
171
  animation: 150,
169
172
  handle: ".drag-handle",
170
173
  "ghost-class": "opacity-50",
171
174
  class: "divide-y divide-border"
172
175
  }, {
173
- default: D(() => [
174
- (n(!0), d(k, null, V(l.value, (o, r, y, i) => {
175
- const m = [o, s.disabled, s.isUpdate, s.showRowNumbers, R.value, s.draggable, r, Q(r)];
176
- if (i && i.key === o._id && re(i, m)) return i;
176
+ default: N(() => [
177
+ (n(!0), d(k, null, V(s.value, (o, l, h, c) => {
178
+ const m = [o, r.disabled, r.readonly, r.isUpdate, r.showRowNumbers, x.value, r.draggable, l, X(l)];
179
+ if (c && c.key === o._id && le(c, m)) return c;
177
180
  const b = (n(), d("div", {
178
181
  key: o._id,
179
182
  class: "flex group bg-white transition-colors"
180
183
  }, [
181
- s.draggable ? (n(), d("div", {
184
+ r.draggable && !r.disabled && !r.readonly ? (n(), d("div", {
182
185
  key: 0,
183
- class: C(["w-10 flex-none flex items-center justify-center border-r border-border bg-muted/5 drag-handle transition-colors", s.disabled ? "cursor-not-allowed opacity-50" : "cursor-grab active:cursor-grabbing hover:bg-muted/10 text-muted-foreground hover:text-foreground"])
186
+ class: C(["w-10 flex-none flex items-center justify-center border-r border-border bg-muted/5 drag-handle transition-colors", r.disabled ? "cursor-not-allowed opacity-50" : "cursor-grab active:cursor-grabbing hover:bg-muted/10 text-muted-foreground hover:text-foreground"])
184
187
  }, [
185
- w(ne, {
188
+ $(ne, {
186
189
  icon: "lucide:grip-vertical",
187
190
  class: "w-4 h-4"
188
191
  })
189
- ], 2)) : c("", !0),
190
- s.showRowNumbers ? (n(), d("div", ge, v(r + 1), 1)) : c("", !0),
191
- (n(!0), d(k, null, V(s.schema, (u, X) => (n(), d("div", {
192
+ ], 2)) : i("", !0),
193
+ r.showRowNumbers ? (n(), d("div", ye, v(l + 1), 1)) : i("", !0),
194
+ (n(!0), d(k, null, V(r.schema, (u, Y) => (n(), d("div", {
192
195
  key: u.name,
193
- class: C(["flex-1 min-w-0 relative", { "border-l border-border": X > 0 }])
196
+ class: C(["flex-1 min-w-0 relative", { "border-l border-border": Y > 0 }])
194
197
  }, [
195
- P(r, u) ? (n(), B(se, {
198
+ Q(l, u) ? (n(), R(se, {
196
199
  key: 0,
197
200
  field: {
198
201
  ...u,
199
202
  props: {
200
- ...q(u, r) === "multiSelect" ? { showControls: !1, wrap: !1 } : {},
203
+ ...J(u, l) === "multiSelect" ? { showControls: !1, wrap: !1 } : {},
201
204
  ...u.props || {}
202
205
  },
203
206
  label: void 0
204
207
  },
205
- value: O(r, u.name),
206
- values: l.value[r] || {},
207
- errors: s.errors,
208
- error: s.name && s.errors ? s.errors[`${s.name}.${r}.${u.name}`] : "",
208
+ value: W(l, u.name),
209
+ values: s.value[l] || {},
210
+ errors: r.errors,
211
+ error: r.name && r.errors ? r.errors[`${r.name}.${l}.${u.name}`] : "",
209
212
  variant: "transparent",
210
213
  size: "sm",
211
214
  rounded: "none",
212
- disabled: J(r, u),
213
- readonly: K(r, u),
214
- isUpdate: s.isUpdate,
215
+ disabled: K(l, u),
216
+ readonly: P(l, u),
217
+ isUpdate: r.isUpdate,
215
218
  class: "w-full h-full min-h-[40px]",
216
- onChange: (Y) => M(r, u.name, Y)
217
- }, null, 8, ["field", "value", "values", "errors", "error", "disabled", "readonly", "isUpdate", "onChange"])) : c("", !0)
219
+ onChange: (Z) => G(l, u.name, Z)
220
+ }, null, 8, ["field", "value", "values", "errors", "error", "disabled", "readonly", "isUpdate", "onChange"])) : i("", !0)
218
221
  ], 2))), 128)),
219
- R.value ? (n(), d("div", he, [
220
- w(N, {
222
+ x.value ? (n(), d("div", ge, [
223
+ $(E, {
221
224
  type: "button",
222
225
  variant: "ghost",
223
226
  size: "xs",
224
227
  icon: "lucide:trash-2",
225
- disabled: s.disabled,
226
- onClick: (u) => L(r)
228
+ disabled: r.disabled || r.readonly,
229
+ onClick: (u) => M(l)
227
230
  }, null, 8, ["disabled", "onClick"])
228
- ])) : c("", !0)
231
+ ])) : i("", !0)
229
232
  ]));
230
233
  return b.memo = m, b;
231
- }, t, 0), 128))
234
+ }, a, 0), 128))
232
235
  ]),
233
236
  _: 1
234
237
  }, 8, ["model-value", "disabled"]),
235
- l.value.length === 0 ? (n(), d("div", ye, [
236
- p("p", pe, v(z.value), 1),
237
- p("p", we, v(A.value), 1)
238
- ])) : c("", !0)
238
+ s.value.length === 0 ? (n(), d("div", he, [
239
+ w("p", we, v(A.value), 1),
240
+ w("p", pe, v(S.value), 1)
241
+ ])) : i("", !0)
239
242
  ])
240
243
  ]));
241
244
  }
242
245
  });
243
246
  export {
244
- _e as default
247
+ Be as default
245
248
  };
@@ -324,7 +324,7 @@ const Pe = /* @__PURE__ */ H({
324
324
  }
325
325
  return R(a) ? {
326
326
  ...t,
327
- value: e.value,
327
+ value: e.field.props?.multiple && (e.value === null || e.value === void 0) ? [] : e.value,
328
328
  values: e.values
329
329
  } : t;
330
330
  }), F = o(() => {
@@ -5,6 +5,7 @@ interface Props {
5
5
  placeholder?: string;
6
6
  placeholderI18n?: string;
7
7
  disabled?: boolean;
8
+ readonly?: boolean;
8
9
  searchable?: boolean;
9
10
  variant?: 'default' | 'outline' | 'solid' | 'floating' | string;
10
11
  size?: 'sm' | 'md' | 'lg';
@@ -34,6 +35,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
34
35
  size: "sm" | "md" | "lg";
35
36
  rounded: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full" | string;
36
37
  loading: boolean;
38
+ readonly: boolean;
37
39
  disabled: boolean;
38
40
  modelValue: any[];
39
41
  options: (IDropdownOption | string | number)[];