vlite3 1.3.11 → 1.4.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 (75) hide show
  1. package/components/Accordion/Accordion.vue.d.ts +2 -2
  2. package/components/Accordion/AccordionItem.vue.d.ts +1 -1
  3. package/components/Accordion/AccordionItem.vue.js +11 -7
  4. package/components/Accordion/AccordionTrigger.vue.d.ts +1 -1
  5. package/components/AppShell/AppShell.vue.d.ts +1 -0
  6. package/components/AppShell/AppShell.vue.js +33 -26
  7. package/components/AppShell/AppShellLayoutStorefront.vue.d.ts +54 -0
  8. package/components/AppShell/AppShellLayoutStorefront.vue.js +222 -0
  9. package/components/AppShell/AppShellLayoutStorefront.vue2.js +4 -0
  10. package/components/AsyncSelect/createAsyncSelect.js +3 -2
  11. package/components/CategoryManager/CategoryManager.vue2.js +36 -31
  12. package/components/CategoryMenu/CategoryMenu.vue.d.ts +22 -0
  13. package/components/CategoryMenu/CategoryMenu.vue.js +106 -0
  14. package/components/CategoryMenu/CategoryMenu.vue2.js +4 -0
  15. package/components/CategoryMenu/CategoryMenuVariant1.vue.d.ts +17 -0
  16. package/components/CategoryMenu/CategoryMenuVariant1.vue.js +146 -0
  17. package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +4 -0
  18. package/components/CategoryMenu/CategoryMenuVariant2.vue.d.ts +18 -0
  19. package/components/CategoryMenu/CategoryMenuVariant2.vue.js +162 -0
  20. package/components/CategoryMenu/CategoryMenuVariant2.vue2.js +4 -0
  21. package/components/CategoryMenu/index.d.ts +2 -0
  22. package/components/CategoryMenu/types.d.ts +32 -0
  23. package/components/CategoryMenu/utils.d.ts +16 -0
  24. package/components/CategoryMenu/utils.js +45 -0
  25. package/components/ColorPicker/ColorPicker.vue.d.ts +7 -3
  26. package/components/ColorPicker/ColorPicker.vue.js +59 -45
  27. package/components/DatePicker.vue.js +5 -4
  28. package/components/DateRangePicker.vue.js +3 -2
  29. package/components/Dropdown/Dropdown.vue.d.ts +4 -1
  30. package/components/Dropdown/Dropdown.vue.js +8 -7
  31. package/components/Dropdown/DropdownGroupedLayout.vue2.js +5 -2
  32. package/components/Dropdown/DropdownGroupedLayout.vue3.js +111 -0
  33. package/components/Dropdown/DropdownItem.vue.d.ts +2 -2
  34. package/components/Dropdown/DropdownItem.vue.js +66 -49
  35. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  36. package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +40 -40
  37. package/components/Dropdown/composables/useDropdownHydration.d.ts +4 -0
  38. package/components/Dropdown/composables/useDropdownNavigation.js +30 -18
  39. package/components/Form/Form.vue.d.ts +13 -1
  40. package/components/Form/Form.vue.js +2 -2
  41. package/components/Form/Form.vue2.js +313 -275
  42. package/components/Form/FormField.vue.js +103 -74
  43. package/components/Form/FormFields.vue.js +2 -2
  44. package/components/Form/FormFields.vue2.js +7 -6
  45. package/components/Form/composables/useForm.js +71 -67
  46. package/components/Form/types.d.ts +21 -1
  47. package/components/IconPicker.vue.js +3 -2
  48. package/components/ImportData/ImportStep2.vue.js +3 -2
  49. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +4 -0
  50. package/components/NavbarCommandPalette.vue.d.ts +1 -1
  51. package/components/PermissionMatrix/PermissionTopBar.vue.js +3 -2
  52. package/components/RichTextEditor/RichTextEditor.vue.js +43 -48
  53. package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
  54. package/components/RichTextEditor/RichTextToolbar.vue.d.ts +12 -3
  55. package/components/RichTextEditor/{RichTextToolbar.vue.js → RichTextToolbar.vue2.js} +157 -121
  56. package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
  57. package/components/RichTextEditor/index.d.ts +2 -0
  58. package/components/RichTextEditor/types.d.ts +38 -0
  59. package/components/RichTextEditor/types.js +52 -0
  60. package/components/Screen/ScreenFilter.vue.js +26 -21
  61. package/components/SidebarMenu/SidebarMenu.vue.d.ts +2 -2
  62. package/components/SidebarMenu/SidebarMenuItem.vue.js +3 -2
  63. package/components/Switch.vue.js +8 -8
  64. package/components/Tooltip.vue.js +1 -0
  65. package/components/Workbook/Sheet.vue.d.ts +1 -1
  66. package/components/Workbook/Sheet.vue.js +14 -13
  67. package/components/index.d.ts +1 -0
  68. package/index.d.ts +1 -0
  69. package/index.js +306 -301
  70. package/package.json +2 -2
  71. package/style.css +2 -2
  72. package/types/appshell.type.d.ts +2 -1
  73. package/types/styles.d.ts +2 -0
  74. package/components/Dropdown/DropdownGroupedLayout.vue.js +0 -75
  75. /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover.vue2.js} +0 -0
@@ -1,18 +1,18 @@
1
- import { ref as S, shallowRef as H, computed as ee, watch as ae } from "vue";
2
- import { deepClone as V, initializeFormValues as le, cleanSubmitValues as te, getNestedValue as J, evaluateConditional as $, setNestedValue as j, collectFileFields as se, filterNullCustomFields as ie } from "../utils/form.utils.js";
1
+ import { ref as S, shallowRef as G, computed as ee, watch as ae } from "vue";
2
+ import { deepClone as g, initializeFormValues as le, cleanSubmitValues as te, getNestedValue as J, evaluateConditional as $, setNestedValue as j, collectFileFields as se, filterNullCustomFields as ie } from "../utils/form.utils.js";
3
3
  import { useFileUpload as oe } from "./useFileUpload.js";
4
4
  import { $t as re } from "../../../utils/i18n.js";
5
5
  function Fe(q) {
6
- let { schema: K, values: b, isUpdate: F = !1, folderId: U, onSubmit: L } = q;
7
- const { handleUploadFile: E } = oe(), n = S(b ? V(b) : {}), y = S({}), I = S(!1), g = S(!1), m = S({}), A = H(K), C = H(
8
- b ? V(b) : {}
6
+ let { schema: K, values: b, isUpdate: F = !1, folderId: E, onSubmit: L } = q;
7
+ const { handleUploadFile: U } = oe(), n = S(b ? g(b) : {}), y = S({}), I = S(!1), V = S(!1), m = S({}), A = G(K), C = G(
8
+ b ? g(b) : {}
9
9
  ), x = ee(() => {
10
10
  const e = A.value;
11
11
  return e ? Array.isArray(e[0]) ? e.flat() : e : [];
12
12
  }), D = async (e) => {
13
13
  try {
14
14
  const a = await le(A.value, e, n.value, F);
15
- n.value = a, C.value = V(a), g.value = !1;
15
+ n.value = a, C.value = g(a), V.value = !1;
16
16
  } catch (a) {
17
17
  console.error("[useForm] Initialization error:", a);
18
18
  }
@@ -33,55 +33,59 @@ function Fe(q) {
33
33
  }, O = () => {
34
34
  y.value = {};
35
35
  }, z = (e) => e.when ? $(e.when, N()) : !0, P = (e) => $(e.disabled, N()), W = (e) => $(e.readonly, N()), T = async (e, a = "") => {
36
- const o = a ? `${a}.${e.name}` : e.name, i = M(o);
37
- let s = "";
36
+ const r = a ? `${a}.${e.name}` : e.name, s = M(r);
37
+ let i = "";
38
38
  const l = e.labelI18n ? re(e.labelI18n) : typeof e.label == "string" ? e.label : e.name;
39
- if (e.required && (i == null || i === "" || Array.isArray(i) && i.length === 0) && (s = `${l} is required`), !s && e.maxFileSize) {
40
- const r = e.maxFileSize * 1024 * 1024;
41
- if (i != null && i !== "") {
42
- const t = Array.isArray(i) ? i : [i];
39
+ if (e.required) {
40
+ const o = typeof s == "string" && /<\/?[a-z][^>]*>/i.test(s) && s.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, " ").trim() === "";
41
+ (s == null || s === "" || Array.isArray(s) && s.length === 0 || o) && (i = `${l} is required`);
42
+ }
43
+ if (!i && e.maxFileSize) {
44
+ const o = e.maxFileSize * 1024 * 1024;
45
+ if (s != null && s !== "") {
46
+ const t = Array.isArray(s) ? s : [s];
43
47
  for (const f of t) {
44
48
  const v = f instanceof File ? f.size : f?.fileSize || f?.file?.size || f?.size;
45
- if (v !== void 0 && v > r) {
46
- s = `${l} size must be less than ${e.maxFileSize}MB`;
49
+ if (v !== void 0 && v > o) {
50
+ i = `${l} size must be less than ${e.maxFileSize}MB`;
47
51
  break;
48
52
  }
49
53
  }
50
54
  }
51
55
  }
52
- if (!s && (e.type === "file" || e.type === "fileUploader") && (e.props?.multiple || e.maxFiles)) {
53
- const r = e.maxFiles || e.props?.maxFiles;
54
- r && Array.isArray(i) && i.length > r && (s = `Maximum ${r} files allowed`);
56
+ if (!i && (e.type === "file" || e.type === "fileUploader") && (e.props?.multiple || e.maxFiles)) {
57
+ const o = e.maxFiles || e.props?.maxFiles;
58
+ o && Array.isArray(s) && s.length > o && (i = `Maximum ${o} files allowed`);
55
59
  }
56
- if (!s && e.validation) {
57
- m.value[o] = !0;
60
+ if (!i && e.validation) {
61
+ m.value[r] = !0;
58
62
  try {
59
- s = await e.validation({
60
- value: i,
63
+ i = await e.validation({
64
+ value: s,
61
65
  values: n.value,
62
66
  globalValues: n.value,
63
67
  isUpdate: F
64
68
  });
65
- } catch (r) {
66
- console.error(`[useForm] Validation error in field ${o}:`, r), s = "Validation failed";
69
+ } catch (o) {
70
+ console.error(`[useForm] Validation error in field ${r}:`, o), i = "Validation failed";
67
71
  } finally {
68
- m.value[o] = !1;
72
+ m.value[r] = !1;
69
73
  }
70
74
  }
71
- if (s ? y.value[o] = s : delete y.value[o], e.type === "customFields" && e.props?.schema) {
72
- const r = e.props.schema, t = Array.isArray(i) ? i : [];
75
+ if (i ? y.value[r] = i : delete y.value[r], e.type === "customFields" && e.props?.schema) {
76
+ const o = e.props.schema, t = Array.isArray(s) ? s : [];
73
77
  let f = !1;
74
78
  for (let v = 0; v < t.length; v++) {
75
79
  const d = { values: t[v] || {}, globalValues: n.value, isUpdate: F };
76
- for (const u of r) {
80
+ for (const u of o) {
77
81
  const c = !u.when || $(u.when, d), w = $(u.disabled, d);
78
- c && !w ? await T(u, `${o}.${v}`) && (f = !0) : delete y.value[`${o}.${v}.${u.name}`];
82
+ c && !w ? await T(u, `${r}.${v}`) && (f = !0) : delete y.value[`${r}.${v}.${u.name}`];
79
83
  }
80
84
  }
81
- f && !s && (s = "Please fix errors in the list.", y.value[o] = s);
85
+ f && !i && (i = "Please fix errors in the list.", y.value[r] = i);
82
86
  }
83
- return s;
84
- }, G = async () => {
87
+ return i;
88
+ }, H = async () => {
85
89
  O();
86
90
  let e = !0;
87
91
  for (const a of x.value) {
@@ -89,22 +93,22 @@ function Fe(q) {
89
93
  await T(a) && (e = !1);
90
94
  }
91
95
  return e;
92
- }, X = async (e, a, o) => {
93
- const i = x.value.filter((l) => l.name === e);
94
- let s = i.find((l) => z(l));
95
- if (!s && i.length > 0 && (s = i[0]), s && (!z(s) || P(s) || W(s))) {
96
+ }, X = async (e, a, r) => {
97
+ const s = x.value.filter((l) => l.name === e);
98
+ let i = s.find((l) => z(l));
99
+ if (!i && s.length > 0 && (i = s[0]), i && (!z(i) || P(i) || W(i))) {
96
100
  console.warn(`[vlite3/useForm] Blocked attempted update to disabled/readonly/hidden field: ${e}`);
97
101
  return;
98
102
  }
99
- if (n.value = j(n.value, e, a), g.value = !0, delete y.value[e], s?.updateValues) {
103
+ if (n.value = j(n.value, e, a), V.value = !0, delete y.value[e], i?.updateValues) {
100
104
  m.value[e] = !0;
101
105
  try {
102
- const l = await s.updateValues({
106
+ const l = await i.updateValues({
103
107
  value: a,
104
108
  // Exposing the explicitly requested value
105
109
  values: n.value,
106
110
  globalValues: n.value,
107
- data: o,
111
+ data: r,
108
112
  isUpdate: F,
109
113
  updateError: R
110
114
  });
@@ -116,28 +120,28 @@ function Fe(q) {
116
120
  }
117
121
  }
118
122
  }, Y = async () => {
119
- const e = V(n.value), a = se(A.value, e, n.value, F), o = (l, r) => {
123
+ const e = g(n.value), a = se(A.value, e, n.value, F), r = (l, o) => {
120
124
  let t = null;
121
125
  l instanceof File ? t = l : l && typeof l == "object" && l.file instanceof File && (t = l.file);
122
126
  const f = {
123
127
  ...typeof l == "object" ? l : {},
124
- fileName: l?.fileName || t?.name || r.split("/").pop() || "unknown",
125
- fileUrl: r,
128
+ fileName: l?.fileName || t?.name || o.split("/").pop() || "unknown",
129
+ fileUrl: o,
126
130
  fileType: l?.fileType || t?.type || "application/octet-stream",
127
131
  fileSize: l?.fileSize || t?.size || 0
128
132
  };
129
133
  return delete f.file, delete f.base64, f;
130
- }, i = a.map(async (l) => {
131
- const { name: r, value: t, field: f } = l;
134
+ }, s = a.map(async (l) => {
135
+ const { name: o, value: t, field: f } = l;
132
136
  if (l.type === "thumbnailSelector") {
133
137
  const d = t, u = Array.isArray(d.images) ? d.images : [], c = d.thumbnail;
134
- m.value[r] = !0;
138
+ m.value[o] = !0;
135
139
  try {
136
140
  const w = await Promise.all(
137
141
  u.map(async (h) => {
138
142
  if (h.startsWith("data:image/")) {
139
143
  const B = await (await fetch(h)).blob(), _ = new File([B], `thumbnail-${Date.now()}.${B.type.split("/")[1] || "jpg"}`, { type: B.type });
140
- return await E(_, U) || h;
144
+ return await U(_, E) || h;
141
145
  }
142
146
  return h;
143
147
  })
@@ -147,21 +151,21 @@ function Fe(q) {
147
151
  const h = u.indexOf(c);
148
152
  h !== -1 && w[h] && (p = w[h]);
149
153
  }
150
- return { name: r, value: { images: w, thumbnail: p } };
154
+ return { name: o, value: { images: w, thumbnail: p } };
151
155
  } finally {
152
- m.value[r] = !1;
156
+ m.value[o] = !1;
153
157
  }
154
158
  }
155
159
  const v = f.returnFileObject === !0, k = Array.isArray(t) ? t.some(
156
160
  (d) => d instanceof File || d && typeof d == "object" && d.file instanceof File
157
161
  ) : t instanceof File || t && typeof t == "object" && t.file instanceof File;
158
- k && (m.value[r] = !0);
162
+ k && (m.value[o] = !0);
159
163
  try {
160
164
  if (Array.isArray(t)) {
161
165
  const d = t.map(async (c) => {
162
166
  if (c instanceof File || c && typeof c == "object" && c.file instanceof File) {
163
- const p = await E(c, U);
164
- return p ? v ? o(c, p) : p : null;
167
+ const p = await U(c, E);
168
+ return p ? v ? r(c, p) : p : null;
165
169
  }
166
170
  if (c && typeof c == "object") {
167
171
  const p = { ...c };
@@ -169,33 +173,33 @@ function Fe(q) {
169
173
  }
170
174
  return c;
171
175
  }), u = await Promise.all(d);
172
- return { name: r, value: u };
176
+ return { name: o, value: u };
173
177
  } else {
174
178
  if (t instanceof File || t && typeof t == "object" && t.file instanceof File) {
175
- const u = await E(t, U);
179
+ const u = await U(t, E);
176
180
  if (u)
177
- return { name: r, value: v ? o(t, u) : u };
181
+ return { name: o, value: v ? r(t, u) : u };
178
182
  } else if (t && typeof t == "object") {
179
183
  const u = { ...t };
180
- return delete u.file, delete u.base64, { name: r, value: u };
184
+ return delete u.file, delete u.base64, { name: o, value: u };
181
185
  }
182
186
  return null;
183
187
  }
184
188
  } finally {
185
- k && (m.value[r] = !1);
189
+ k && (m.value[o] = !1);
186
190
  }
187
191
  });
188
- return (await Promise.all(i)).forEach((l) => {
192
+ return (await Promise.all(s)).forEach((l) => {
189
193
  l && (Object.assign(e, j(e, l.name, l.value)), n.value = j(n.value, l.name, l.value));
190
194
  }), e;
191
195
  }, Z = (e) => {
192
196
  const a = { ...e };
193
- for (const o of x.value)
194
- if (z(o) && o.type === "customFields" && o.props?.schema) {
195
- const i = J(a, o.name);
196
- if (Array.isArray(i)) {
197
- const s = ie(i, o.props.schema);
198
- Object.assign(a, j(a, o.name, s));
197
+ for (const r of x.value)
198
+ if (z(r) && r.type === "customFields" && r.props?.schema) {
199
+ const s = J(a, r.name);
200
+ if (Array.isArray(s)) {
201
+ const i = ie(s, r.props.schema);
202
+ Object.assign(a, j(a, r.name, i));
199
203
  }
200
204
  }
201
205
  return a;
@@ -204,11 +208,11 @@ function Fe(q) {
204
208
  formValues: n,
205
209
  errors: y,
206
210
  isSubmitting: I,
207
- isDirty: g,
211
+ isDirty: V,
208
212
  fieldLoading: m,
209
213
  handleFieldChange: X,
210
214
  validateField: T,
211
- validateAll: G,
215
+ validateAll: H,
212
216
  isFieldVisible: z,
213
217
  isFieldDisabled: P,
214
218
  isFieldReadonly: W,
@@ -217,10 +221,10 @@ function Fe(q) {
217
221
  setFieldError: R,
218
222
  clearErrors: O,
219
223
  resetForm: () => {
220
- n.value = V(C.value), O(), g.value = !1;
224
+ n.value = g(C.value), O(), V.value = !1;
221
225
  },
222
226
  handleSubmit: async () => {
223
- if (await G()) {
227
+ if (await H()) {
224
228
  I.value = !0;
225
229
  try {
226
230
  let a = await Y();
@@ -234,7 +238,7 @@ function Fe(q) {
234
238
  ), L && await L({
235
239
  values: a,
236
240
  isUpdate: F
237
- }), g.value = !1, C.value = V(a);
241
+ }), V.value = !1, C.value = g(a);
238
242
  } catch (a) {
239
243
  throw console.error("[useForm] Submit error:", a), a;
240
244
  } finally {
@@ -23,7 +23,7 @@ export interface IFormAddon {
23
23
  /**
24
24
  * Form field types - maps to corresponding UI components
25
25
  */
26
- export type IFormFieldType = 'text' | 'email' | 'password' | 'number' | 'file' | 'fileUploader' | 'tel' | 'url' | 'search' | 'date' | 'dateRangePicker' | 'textarea' | 'time' | 'iconPicker' | 'color' | 'switch' | 'check' | 'customFields' | 'select' | 'multiSelect' | 'choiceBox' | 'avatarUpload' | 'thumbnailSelector' | 'tags' | Component;
26
+ export type IFormFieldType = 'text' | 'email' | 'password' | 'number' | 'file' | 'fileUploader' | 'tel' | 'url' | 'search' | 'date' | 'dateRangePicker' | 'textarea' | 'time' | 'iconPicker' | 'color' | 'switch' | 'check' | 'customFields' | 'select' | 'multiSelect' | 'choiceBox' | 'avatarUpload' | 'thumbnailSelector' | 'tags' | 'richTextEditor' | Component;
27
27
  /**
28
28
  * Context passed to conditional functions
29
29
  */
@@ -84,6 +84,18 @@ export interface IFormCustomFieldsProps {
84
84
  headers?: string[];
85
85
  draggable?: boolean;
86
86
  }
87
+ /**
88
+ * Layout for grouped schemas (schema: IForm[][]).
89
+ *
90
+ * - 'basic' each group renders as a card with a header/heading and
91
+ * a body. This is the default and matches the original
92
+ * behavior — fully backward compatible.
93
+ * - 'accordion' each group renders as an `AccordionItem` with the
94
+ * heading as the trigger and the fields inside the body.
95
+ * Use it when a form has many groups and you want the
96
+ * user to expand only the ones they care about.
97
+ */
98
+ export type IFormGroupLayout = 'basic' | 'accordion';
87
99
  /**
88
100
  * Main form field interface
89
101
  */
@@ -190,6 +202,14 @@ export interface IFormProps {
190
202
  groupsHeadings?: IFormGroupsHeadings;
191
203
  /** Descriptions for grouped schemas — static array or `(ctx) => string[]` */
192
204
  groupHeadingsDescription?: IFormGroupsHeadings;
205
+ /**
206
+ * Layout for grouped schemas (`schema: IForm[][]`).
207
+ * - `'basic'` (default) — each group is a card with a header and a body
208
+ * - `'accordion'` — each group is an `AccordionItem` with the heading as the trigger
209
+ *
210
+ * Has no effect on flat schemas. Backward compatible.
211
+ */
212
+ groupLayout?: IFormGroupLayout;
193
213
  /** Timeline steps for multi-step form mode */
194
214
  tabs?: IFormStep[];
195
215
  /** Submit button text */
@@ -3,11 +3,12 @@ import $ 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
+ /* empty css */
6
7
  /* empty css */
7
8
  import C from "./Button.vue.js";
8
9
  import I from "iconify-icon-picker";
9
10
  import "iconify-icon-picker/style.css";
10
- const j = /* @__PURE__ */ g({
11
+ const A = /* @__PURE__ */ g({
11
12
  __name: "IconPicker",
12
13
  props: {
13
14
  btnProps: {},
@@ -130,5 +131,5 @@ const j = /* @__PURE__ */ g({
130
131
  }
131
132
  });
132
133
  export {
133
- j as default
134
+ A as default
134
135
  };
@@ -3,6 +3,7 @@ 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
+ /* empty css */
6
7
  /* empty css */
7
8
  import P from "../CheckBox.vue.js";
8
9
  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 = {
@@ -14,7 +15,7 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
14
15
  }, st = { class: "import-td-action" }, ot = { class: "flex justify-center items-center h-full" }, it = {
15
16
  key: 0,
16
17
  class: "text-center text-sm text-warning font-medium p-4 bg-warning/10 rounded-lg border border-warning/20"
17
- }, ut = /* @__PURE__ */ V({
18
+ }, vt = /* @__PURE__ */ V({
18
19
  __name: "ImportStep2",
19
20
  props: {
20
21
  headers: {},
@@ -113,5 +114,5 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
113
114
  }
114
115
  });
115
116
  export {
116
- ut as default
117
+ vt as default
117
118
  };
@@ -13,6 +13,8 @@ export declare function useMultiSelectHydration(opts: UseMultiSelectHydrationOpt
13
13
  selectedBuffer: import('vue').Ref<Map<any, {
14
14
  label: string;
15
15
  labelI18n?: string;
16
+ to?: string;
17
+ href?: string;
16
18
  value?: any;
17
19
  subtitle?: string;
18
20
  subtitleI18n?: string;
@@ -54,6 +56,8 @@ export declare function useMultiSelectHydration(opts: UseMultiSelectHydrationOpt
54
56
  }> & Omit<Map<any, IDropdownOption>, keyof Map<any, any>>, Map<any, IDropdownOption> | (Map<any, {
55
57
  label: string;
56
58
  labelI18n?: string;
59
+ to?: string;
60
+ href?: string;
57
61
  value?: any;
58
62
  subtitle?: string;
59
63
  subtitleI18n?: string;
@@ -22,8 +22,8 @@ interface Props {
22
22
  }
23
23
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
24
24
  placeholder: string;
25
- enabled: boolean;
26
25
  items: import('./CommandPalette').CommandPaletteItem[];
26
+ enabled: boolean;
27
27
  menuItems: SidebarMenuItemSchema[];
28
28
  maxResultsPerGroup: number;
29
29
  shortcutKey: string;
@@ -5,6 +5,7 @@ import y from "../Icon.vue.js";
5
5
  import K from "../CheckBox.vue.js";
6
6
  import B from "../Dropdown/Dropdown.vue.js";
7
7
  import "../../core/config.js";
8
+ /* empty css */
8
9
  /* empty css */
9
10
  const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3 mb-4" }, A = { class: "flex items-center gap-2 flex-1 w-full sm:max-w-lg" }, Q = {
10
11
  key: 0,
@@ -15,7 +16,7 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
15
16
  }, N = ["onClick"], P = { class: "text-sm" }, E = {
16
17
  key: 0,
17
18
  class: "border-t px-3 py-1.5"
18
- }, F = { class: "flex items-center gap-3 ml-auto" }, I = /* @__PURE__ */ w({
19
+ }, F = { class: "flex items-center gap-3 ml-auto" }, J = /* @__PURE__ */ w({
19
20
  __name: "PermissionTopBar",
20
21
  props: {
21
22
  searchQuery: {},
@@ -129,5 +130,5 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
129
130
  }
130
131
  });
131
132
  export {
132
- I as default
133
+ J as default
133
134
  };
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as te, ref as v, shallowRef as ne, watch as oe, computed as h, onMounted as le, onUnmounted as ae, openBlock as C, createElementBlock as L, normalizeClass as re, toDisplayString as I, createCommentVNode as U, createElementVNode as w, createVNode as q, unref as a, normalizeStyle as ie } from "vue";
2
2
  /* empty css */
3
- import de from "./RichTextToolbar.vue.js";
4
- /* empty css */
5
- import se from "./RichTextLinkPopover.vue.js";
6
- /* empty css */
3
+ import se from "./RichTextToolbar.vue2.js";
4
+ /* empty css */
5
+ import de from "./RichTextLinkPopover.vue2.js";
6
+ /* empty css */
7
7
  import { useRichTextImageUpload as ue } from "./composables/useRichTextImageUpload.js";
8
8
  import { useRichTextLinks as ce } from "./composables/useRichTextLinks.js";
9
- const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { class: "rte-wrapper" }, ge = { class: "rte-body-wrap" }, ye = ["id", "contenteditable", "aria-label", "aria-readonly", "aria-disabled", "aria-invalid"], be = ["id"], Se = /* @__PURE__ */ te({
9
+ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { class: "rte-wrapper" }, ye = { class: "rte-body-wrap" }, ge = ["id", "contenteditable", "aria-label", "aria-readonly", "aria-disabled", "aria-invalid"], be = ["id"], Se = /* @__PURE__ */ te({
10
10
  __name: "RichTextEditor",
11
11
  props: {
12
12
  modelValue: { default: "" },
@@ -17,7 +17,8 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
17
17
  label: {},
18
18
  error: {},
19
19
  id: {},
20
- readonly: { type: Boolean, default: !1 }
20
+ readonly: { type: Boolean, default: !1 },
21
+ tools: {}
21
22
  },
22
23
  emits: ["update:modelValue", "focus", "blur", "image-removed"],
23
24
  setup(o, { emit: N }) {
@@ -33,7 +34,7 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
33
34
  justifyRight: !1
34
35
  }), S = v("");
35
36
  let u = null, c = null, p = !1;
36
- function g() {
37
+ function y() {
37
38
  if (p) return;
38
39
  const e = window.getSelection();
39
40
  if (e && e.rangeCount > 0)
@@ -43,7 +44,7 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
43
44
  u = null;
44
45
  }
45
46
  }
46
- function y() {
47
+ function g() {
47
48
  if (!(!u || p))
48
49
  try {
49
50
  const e = window.getSelection();
@@ -73,19 +74,12 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
73
74
  H = t;
74
75
  }
75
76
  const $ = {
76
- saveSelection: g,
77
- restoreSelection: y,
77
+ saveSelection: y,
78
+ restoreSelection: g,
78
79
  onInput: f
79
80
  };
80
81
  h(() => r.value);
81
- const {
82
- imageInputRef: z,
83
- isUploadingImage: W,
84
- triggerImageUpload: Y,
85
- onImageFileChange: D,
86
- onPaste: j,
87
- onDrop: V
88
- } = ue(r, $), l = ce({
82
+ const { imageInputRef: z, isUploadingImage: W, triggerImageUpload: Y, onImageFileChange: D, onPaste: j, onDrop: V } = ue(r, $), l = ce({
89
83
  editorRef: r,
90
84
  rootRef: A,
91
85
  linkPopoverElRef: x,
@@ -104,41 +98,41 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
104
98
  T.value = t === "" && !e.querySelector("img");
105
99
  }
106
100
  function f() {
107
- E(), b("update:modelValue", r.value?.innerHTML ?? ""), P(), s();
101
+ E(), b("update:modelValue", r.value?.innerHTML ?? ""), P(), d();
108
102
  }
109
103
  function k(e, t) {
110
104
  if (!(i.disabled || i.readonly)) {
111
- y(), r.value?.focus();
105
+ g(), r.value?.focus();
112
106
  try {
113
107
  document.execCommand(e, !1, t ?? void 0);
114
108
  } catch {
115
109
  }
116
- s(), f();
110
+ d(), f();
117
111
  }
118
112
  }
119
113
  function G(e) {
120
114
  if (!(i.disabled || i.readonly)) {
121
- y(), r.value?.focus();
115
+ g(), r.value?.focus();
122
116
  try {
123
117
  document.execCommand("formatBlock", !1, e);
124
118
  } catch {
125
119
  }
126
- s(), f();
120
+ d(), f();
127
121
  }
128
122
  }
129
123
  function J() {
130
124
  if (!(i.disabled || i.readonly)) {
131
- y(), r.value?.focus();
125
+ g(), r.value?.focus();
132
126
  try {
133
127
  document.execCommand("removeFormat", !1, void 0), document.execCommand("formatBlock", !1, "div");
134
128
  } catch {
135
129
  }
136
- s(), f();
130
+ d(), f();
137
131
  }
138
132
  }
139
133
  function Q() {
140
134
  if (i.disabled || i.readonly) return;
141
- y(), r.value?.focus();
135
+ g(), r.value?.focus();
142
136
  const e = window.getSelection();
143
137
  if (!e || e.rangeCount === 0 || e.isCollapsed) return;
144
138
  const t = e.getRangeAt(0);
@@ -149,14 +143,14 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
149
143
  const n = t.extractContents(), O = document.createElement("code");
150
144
  O.appendChild(n), t.insertNode(O), e.removeAllRanges();
151
145
  }
152
- s(), f();
146
+ d(), f();
153
147
  }
154
- function s() {
148
+ function d() {
155
149
  c !== null && cancelAnimationFrame(c), c = requestAnimationFrame(() => {
156
150
  c = null, X();
157
151
  });
158
152
  }
159
- function d(e) {
153
+ function s(e) {
160
154
  try {
161
155
  return document.queryCommandState(e);
162
156
  } catch {
@@ -166,15 +160,15 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
166
160
  function X() {
167
161
  if (!p) {
168
162
  B.value = {
169
- bold: d("bold"),
170
- italic: d("italic"),
171
- underline: d("underline"),
172
- strikeThrough: d("strikeThrough"),
173
- insertOrderedList: d("insertOrderedList"),
174
- insertUnorderedList: d("insertUnorderedList"),
175
- justifyLeft: d("justifyLeft"),
176
- justifyCenter: d("justifyCenter"),
177
- justifyRight: d("justifyRight")
163
+ bold: s("bold"),
164
+ italic: s("italic"),
165
+ underline: s("underline"),
166
+ strikeThrough: s("strikeThrough"),
167
+ insertOrderedList: s("insertOrderedList"),
168
+ insertUnorderedList: s("insertUnorderedList"),
169
+ justifyLeft: s("justifyLeft"),
170
+ justifyCenter: s("justifyCenter"),
171
+ justifyRight: s("justifyRight")
178
172
  };
179
173
  try {
180
174
  S.value = document.queryCommandValue("formatBlock").toLowerCase();
@@ -188,7 +182,7 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
188
182
  const e = r.value;
189
183
  if (!e) return;
190
184
  const t = document.activeElement;
191
- t !== e && !e.contains(t) || (g(), s());
185
+ t !== e && !e.contains(t) || (y(), d());
192
186
  }
193
187
  function Z(e) {
194
188
  if (e.ctrlKey || e.metaKey)
@@ -241,26 +235,27 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
241
235
  class: "rte-label"
242
236
  }, I(o.label), 9, me)) : U("", !0),
243
237
  w("div", ve, [
244
- q(de, {
238
+ q(se, {
245
239
  toolbarState: B.value,
246
240
  activeBlock: S.value,
247
241
  disabled: o.disabled,
248
242
  readonly: o.readonly,
249
243
  isUploadingImage: a(W),
250
244
  label: o.label,
245
+ tools: o.tools,
251
246
  onCommand: k,
252
247
  onSetBlock: G,
253
248
  onInsertCode: Q,
254
249
  onTriggerImageUpload: t[0] || (t[0] = (n) => a(Y)(!(!o.disabled && !o.readonly))),
255
250
  onOpenLinkPopover: a(l).openLinkPopover,
256
251
  onClearFormat: J
257
- }, null, 8, ["toolbarState", "activeBlock", "disabled", "readonly", "isUploadingImage", "label", "onOpenLinkPopover"]),
258
- w("div", ge, [
252
+ }, null, 8, ["toolbarState", "activeBlock", "disabled", "readonly", "isUploadingImage", "label", "tools", "onOpenLinkPopover"]),
253
+ w("div", ye, [
259
254
  w("div", {
260
255
  id: m.value,
261
256
  ref_key: "editorRef",
262
257
  ref: r,
263
- class: "rte-editor",
258
+ class: "rte-editor scrollbar-thin always-scroll",
264
259
  style: ie(_.value),
265
260
  contenteditable: !o.disabled && !o.readonly ? "true" : "false",
266
261
  role: "textbox",
@@ -272,19 +267,19 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
272
267
  spellcheck: "true",
273
268
  onInputPassive: f,
274
269
  onFocus: t[1] || (t[1] = (n) => {
275
- R.value = !0, g(), s(), b("focus", n);
270
+ R.value = !0, y(), d(), b("focus", n);
276
271
  }),
277
272
  onBlur: t[2] || (t[2] = (n) => {
278
273
  R.value = !1, b("blur", n);
279
274
  }),
280
275
  onKeydown: Z,
281
- onKeyupPassive: g,
282
- onMouseupPassive: g,
276
+ onKeyupPassive: y,
277
+ onMouseupPassive: y,
283
278
  onPaste: t[3] || (t[3] = //@ts-ignore
284
279
  (...n) => a(j) && a(j)(...n)),
285
280
  onDrop: t[4] || (t[4] = //@ts-ignore
286
281
  (...n) => a(V) && a(V)(...n))
287
- }, null, 44, ye),
282
+ }, null, 44, ge),
288
283
  w("input", {
289
284
  ref_key: "imageInputRef",
290
285
  ref: z,
@@ -303,7 +298,7 @@ const fe = ["aria-labelledby", "aria-describedby"], me = ["id", "for"], ve = { c
303
298
  "aria-hidden": "true",
304
299
  onClick: t[6] || (t[6] = (n) => r.value?.focus())
305
300
  }, I(o.placeholder), 1)) : U("", !0),
306
- q(se, {
301
+ q(de, {
307
302
  ref_key: "linkPopoverCompRef",
308
303
  ref: x,
309
304
  visible: a(l).linkPopover.value.visible,