vlite3 1.5.50 → 1.5.52

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 (31) hide show
  1. package/components/CategoryManager/CategoryManager2.vue.js +2 -2
  2. package/components/CommandPalette/CommandPaletteContent2.vue.js +1 -1
  3. package/components/CommandPalette/{CommandPaletteItem2.vue.js → CommandPaletteItem.vue.js} +1 -1
  4. package/components/Form/Form.vue.d.ts +3 -0
  5. package/components/Form/Form.vue.js +1 -1
  6. package/components/Form/Form2.vue.js +292 -276
  7. package/components/Form/composables/useCustomFieldRows.d.ts +3 -0
  8. package/components/Form/composables/useCustomFieldRows.js +109 -58
  9. package/components/Form/composables/useForm.d.ts +4 -1
  10. package/components/Form/composables/useForm.js +249 -187
  11. package/components/Form/index.vue.d.ts +2 -0
  12. package/components/Form/index.vue.js +2 -2
  13. package/components/Form/index2.vue.js +12 -8
  14. package/components/Form/types.d.ts +2 -0
  15. package/components/NavbarCommandPalette.vue.js +1 -1
  16. package/components/RichTextEditor/RichTextEditor.vue.d.ts +58 -0
  17. package/components/RichTextEditor/RichTextEditor.vue.js +309 -180
  18. package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +3 -8
  19. package/components/RichTextEditor/RichTextLinkPopover3.vue.js +2 -2
  20. package/components/RichTextEditor/RichTextToolbar3.vue.js +2 -2
  21. package/components/RichTextEditor/index.d.ts +1 -1
  22. package/components/RichTextEditor/types.d.ts +22 -0
  23. package/components/Screen/ScreenFilter.vue.js +2 -2
  24. package/components/Screen/components/ScreenToolbar.vue.d.ts +2 -2
  25. package/directives/ScrollReveal/ScrollRevealPager.js +76 -76
  26. package/docs/components/rich-text-editor.md +33 -2
  27. package/docs-manifest.json +3 -3
  28. package/package.json +1 -1
  29. package/style.css +1 -1
  30. /package/components/RichTextEditor/{RichTextLinkPopover2.vue.js → RichTextLinkPopover.vue.js} +0 -0
  31. /package/components/RichTextEditor/{RichTextToolbar2.vue.js → RichTextToolbar.vue.js} +0 -0
@@ -1,43 +1,44 @@
1
- import { defineComponent as Ge, computed as o, inject as He, getCurrentInstance as $e, onMounted as Me, onUnmounted as _, shallowRef as ee, watch as te, nextTick as Oe, openBlock as n, createElementBlock as c, withKeys as ye, withModifiers as ae, normalizeClass as m, createElementVNode as p, createVNode as k, mergeProps as j, toDisplayString as K, renderSlot as he, unref as l, createCommentVNode as d, createBlock as C, withCtx as be, Fragment as je, renderList as Ke, isMemoSame as Ye } from "vue";
2
- import { useForm as Je } from "./composables/useForm.js";
3
- import X from "./FormFields.vue.js";
4
- import Qe from "./FormField.vue.js";
5
- import We from "./FormSkeleton.vue.js";
6
- import Xe from "../Accordion/Accordion.vue.js";
7
- import S from "../Button.vue.js";
8
- import Ze from "../BackButton.vue.js";
9
- import _e from "../Timeline/Timeline.vue.js";
1
+ import { defineComponent as Oe, computed as n, inject as je, getCurrentInstance as Ye, onMounted as Je, onUnmounted as oe, shallowRef as te, watch as ne, nextTick as Qe, toRaw as pe, openBlock as o, createElementBlock as d, withKeys as ke, withModifiers as re, normalizeClass as m, createElementVNode as w, createVNode as p, mergeProps as j, toDisplayString as Y, renderSlot as Ce, unref as l, createCommentVNode as c, createBlock as k, withCtx as Fe, Fragment as We, renderList as Xe, isMemoSame as Ze } from "vue";
2
+ import { useForm as _e } from "./composables/useForm.js";
3
+ import ae from "./FormFields.vue.js";
4
+ import et from "./FormField.vue.js";
5
+ import tt from "./FormSkeleton.vue.js";
6
+ import at from "../Accordion/Accordion.vue.js";
7
+ import C from "../Button.vue.js";
8
+ import lt from "../BackButton.vue.js";
9
+ import it from "../Timeline/Timeline.vue.js";
10
10
  /* empty css */
11
11
  import "@iconify/vue";
12
12
  import "../../icons/IconRegistry.js";
13
- import { resolveI18nText as et } from "../../utils/i18n.js";
13
+ import { resolveI18nText as st } from "../../utils/i18n.js";
14
14
  /* empty css */
15
- import { useVLiteConfig as tt } from "../../core/config.js";
15
+ import { useVLiteConfig as ot } from "../../core/config.js";
16
16
  /* empty css */
17
- import { resolveFieldType as at } from "./utils/form.utils.js";
18
- const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { class: "flex items-center gap-2 shrink-0" }, nt = {
17
+ import { resolveFieldType as nt } from "./utils/form.utils.js";
18
+ const rt = ["onKeydown"], ut = { class: "flex items-center gap-3" }, dt = { class: "flex items-center gap-2 shrink-0" }, ct = {
19
19
  key: 0,
20
20
  class: "w-full order-first lg:order-last lg:min-w-100 lg:max-w-[380px] shrink-0"
21
- }, ot = { key: 0 }, rt = {
21
+ }, vt = { key: 0 }, mt = {
22
22
  key: 0,
23
23
  class: "flex gap-3 items-end ml-auto"
24
- }, ut = { class: "text-base font-semibold text-foreground" }, dt = {
24
+ }, ft = { class: "text-base font-semibold text-foreground" }, gt = {
25
25
  key: 0,
26
26
  class: "text-sm text-muted-foreground mt-1"
27
- }, ct = {
27
+ }, yt = {
28
28
  key: 3,
29
29
  class: "form-step"
30
- }, mt = { class: "text-lg font-semibold text-foreground" }, vt = {
30
+ }, ht = { class: "text-lg font-semibold text-foreground" }, bt = {
31
31
  key: 0,
32
32
  class: "text-sm text-muted-foreground mt-1"
33
- }, ft = {
33
+ }, xt = {
34
34
  key: 0,
35
35
  class: "flex gap-3 items-center"
36
- }, zt = /* @__PURE__ */ Ge({
36
+ }, Dt = /* @__PURE__ */ Oe({
37
37
  __name: "Form",
38
38
  props: {
39
39
  schema: {},
40
40
  values: { default: () => ({}) },
41
+ documentKey: {},
41
42
  variant: {},
42
43
  size: {},
43
44
  rounded: {},
@@ -75,21 +76,21 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
75
76
  layout: { default: "vertical" }
76
77
  },
77
78
  emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction", "onBack", "onChange"],
78
- setup(e, { expose: xe, emit: pe }) {
79
- const i = e, f = pe, ke = o(() => et(i.pageTitleI18n, i.pageTitle)), g = He("modal-context", null), Ce = tt(), Y = o(() => Ce?.components?.form || {}), U = o(() => i.variant ?? Y.value.variant ?? "outline"), I = o(() => i.size ?? Y.value.size ?? "md"), z = o(() => i.rounded ?? Y.value.rounded ?? "md"), D = o(
80
- () => i.showRequiredAsterisk ?? Y.value.showRequiredAsterisk ?? !0
81
- ), J = o(() => i.showCancel || !!g), E = o(() => !!g), Se = $e(), Fe = o(() => {
82
- const t = Se?.vnode.props;
79
+ setup(e, { expose: Se, emit: we }) {
80
+ const i = e, g = we, Ae = n(() => st(i.pageTitleI18n, i.pageTitle)), y = je("modal-context", null), Te = ot(), J = n(() => Te?.components?.form || {}), I = n(() => i.variant ?? J.value.variant ?? "outline"), z = n(() => i.size ?? J.value.size ?? "md"), L = n(() => i.rounded ?? J.value.rounded ?? "md"), E = n(
81
+ () => i.showRequiredAsterisk ?? J.value.showRequiredAsterisk ?? !0
82
+ ), Q = n(() => i.showCancel || !!y), q = n(() => !!y), Pe = Ye(), Re = n(() => {
83
+ const t = Pe?.vnode.props;
83
84
  return !!t && (Object.prototype.hasOwnProperty.call(t, "stickyFooter") || Object.prototype.hasOwnProperty.call(t, "sticky-footer")) && i.stickyFooter;
84
- }), L = o(
85
- () => i.layout !== "inline" && (i.stickyFooter || E.value)
85
+ }), B = n(
86
+ () => i.layout !== "inline" && (i.stickyFooter || q.value)
86
87
  );
87
- Me(() => {
88
- i.footer && E.value && g?.registerFormFooter?.(!0);
89
- }), _(() => {
90
- E.value && g?.registerFormFooter?.(!1);
88
+ Je(() => {
89
+ i.footer && q.value && y?.registerFormFooter?.(!0);
90
+ }), oe(() => {
91
+ q.value && y?.registerFormFooter?.(!1);
91
92
  });
92
- const F = ee(null), q = ee(!1), le = (t) => {
93
+ const F = te(null), G = te(!1), ue = (t) => {
93
94
  let a = t?.parentElement ?? null;
94
95
  for (; a && a !== document.body; ) {
95
96
  const { overflowY: s } = getComputedStyle(a);
@@ -98,45 +99,45 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
98
99
  a = a.parentElement;
99
100
  }
100
101
  return document.documentElement;
101
- }, ie = () => {
102
- if (!L.value || !F.value) {
103
- q.value = !1;
102
+ }, de = () => {
103
+ if (!B.value || !F.value) {
104
+ G.value = !1;
104
105
  return;
105
106
  }
106
- const t = le(F.value);
107
+ const t = ue(F.value);
107
108
  if (!t) {
108
- q.value = !1;
109
+ G.value = !1;
109
110
  return;
110
111
  }
111
- q.value = t.scrollHeight > t.clientHeight + 1;
112
- }, we = o(
113
- () => L.value && (E.value || Fe.value || q.value)
112
+ G.value = t.scrollHeight > t.clientHeight + 1;
113
+ }, Ue = n(
114
+ () => B.value && (q.value || Re.value || G.value)
114
115
  );
115
116
  let A = null;
116
- te(
117
- [F, L, () => i.schemaLoading],
117
+ ne(
118
+ [F, B, () => i.schemaLoading],
118
119
  async () => {
119
- if (A?.disconnect(), A = null, await Oe(), !F.value || !L.value) {
120
- q.value = !1;
120
+ if (A?.disconnect(), A = null, await Qe(), !F.value || !B.value) {
121
+ G.value = !1;
121
122
  return;
122
123
  }
123
- const t = le(F.value);
124
- if (ie(), typeof ResizeObserver > "u" || !t) return;
125
- A = new ResizeObserver(() => ie()), A.observe(t), A.observe(F.value);
124
+ const t = ue(F.value);
125
+ if (de(), typeof ResizeObserver > "u" || !t) return;
126
+ A = new ResizeObserver(() => de()), A.observe(t), A.observe(F.value);
126
127
  const a = F.value.closest("form");
127
128
  a && A.observe(a);
128
129
  },
129
130
  { flush: "post", immediate: !0 }
130
- ), _(() => {
131
+ ), oe(() => {
131
132
  A?.disconnect();
132
133
  });
133
- const T = o(() => !i.schema || i.schema.length === 0 ? !1 : Array.isArray(i.schema[0])), u = o(() => i.tabs && i.tabs.length > 0 && T.value), r = ee(0), se = o(() => i.tabs ? i.tabs.map((t, a) => ({
134
+ const T = n(() => !i.schema || i.schema.length === 0 ? !1 : Array.isArray(i.schema[0])), u = n(() => i.tabs && i.tabs.length > 0 && T.value), r = te(0), ce = n(() => i.tabs ? i.tabs.map((t, a) => ({
134
135
  id: t.id?.toString() || a.toString(),
135
136
  title: t.title,
136
137
  icon: t.icon,
137
138
  description: t.description,
138
139
  status: a < r.value ? "completed" : a === r.value ? "current" : "upcoming"
139
- })) : []), G = o(() => T.value ? i.schema : [i.schema]), ne = o(() => u.value ? G.value[r.value] || [] : []), oe = (t) => {
140
+ })) : []), H = n(() => T.value ? i.schema : [i.schema]), ve = n(() => u.value ? H.value[r.value] || [] : []), me = (t) => {
140
141
  if (!t) return [];
141
142
  if (Array.isArray(t)) return t;
142
143
  try {
@@ -149,390 +150,405 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
149
150
  } catch (a) {
150
151
  return console.error("[Form] Error evaluating dynamic group headings:", a), [];
151
152
  }
152
- }, Q = o(() => oe(i.groupsHeadings)), W = o(
153
- () => oe(i.groupHeadingsDescription)
154
- ), H = o(() => {
155
- const t = G.value, a = [];
153
+ }, W = n(() => me(i.groupsHeadings)), X = n(
154
+ () => me(i.groupHeadingsDescription)
155
+ ), K = n(() => {
156
+ const t = H.value, a = [];
156
157
  for (let s = 0; s < t.length; s++) {
157
- const x = t[s];
158
- !Array.isArray(x) || x.length === 0 || x.some((ve) => R(ve)) && a.push({ schema: x, originalIndex: s });
158
+ const f = t[s];
159
+ !Array.isArray(f) || f.length === 0 || f.some((Z) => R(Z)) && a.push({ schema: f, originalIndex: s });
159
160
  }
160
161
  return a;
161
- }), Ae = o(
162
- () => H.value.map((t) => ({
162
+ }), Ie = n(
163
+ () => K.value.map((t) => ({
163
164
  id: `form-group-${t.originalIndex}`,
164
- title: Q.value?.[t.originalIndex] || "",
165
- description: W.value?.[t.originalIndex] || void 0
165
+ title: W.value?.[t.originalIndex] || "",
166
+ description: X.value?.[t.originalIndex] || void 0
166
167
  }))
167
- ), Te = o(() => {
168
+ ), ze = n(() => {
168
169
  const t = /* @__PURE__ */ new Map();
169
- for (const a of H.value)
170
+ for (const a of K.value)
170
171
  t.set(`form-group-${a.originalIndex}`, a.schema);
171
172
  return t;
172
- }), h = o(() => u.value ? null : (T.value ? i.schema.flat() : i.schema).find((a) => at(a, {
173
+ }), b = n(() => u.value ? null : (T.value ? i.schema.flat() : i.schema).find((a) => nt(a, {
173
174
  values: v.value,
174
175
  globalValues: v.value,
175
176
  isUpdate: i.isUpdate
176
- }) === "thumbnailSelector") ?? null), P = o(() => !!h.value), {
177
+ }) === "thumbnailSelector") ?? null), P = n(() => !!b.value), {
177
178
  formValues: v,
178
- errors: b,
179
- isSubmitting: y,
180
- fieldLoading: V,
181
- handleFieldChange: re,
182
- validateField: Pe,
183
- validateAll: ue,
179
+ errors: x,
180
+ isSubmitting: h,
181
+ fieldLoading: N,
182
+ handleFieldChange: fe,
183
+ validateField: Le,
184
+ validateAll: ge,
184
185
  isFieldVisible: R,
185
- isFieldDisabled: B,
186
+ isFieldDisabled: V,
186
187
  isFieldReadonly: $,
187
- handleSubmit: Re,
188
- reinitialize: Ue,
189
- resetForm: Ie,
190
- setFieldError: ze,
191
- clearErrors: Le
192
- } = Je({
188
+ handleSubmit: Be,
189
+ reinitialize: le,
190
+ replaceValues: Ne,
191
+ resetForm: Ve,
192
+ setFieldError: De,
193
+ clearErrors: Ee
194
+ } = _e({
193
195
  schema: i.schema,
194
196
  values: i.values,
195
197
  isUpdate: i.isUpdate,
196
198
  folderId: i.folderId,
197
199
  emitFields: i.emitFields,
200
+ onAsyncChange: (t) => g("onChange", t),
198
201
  onSubmit: (t) => {
199
- f("onSubmit", t, g?.close || (() => {
202
+ g("onSubmit", t, y?.close || (() => {
200
203
  }));
201
204
  }
202
- });
203
- te(
204
- () => i.loading || y.value,
205
+ }), ie = te(0), qe = () => {
206
+ Ve(), ie.value++;
207
+ };
208
+ ne(
209
+ () => i.loading || h.value,
205
210
  (t) => {
206
- g?.setSubmitting && g.setSubmitting(t);
211
+ y?.setSubmitting && y.setSubmitting(t);
207
212
  },
208
213
  { immediate: !0 }
209
- ), _(() => {
210
- g?.setSubmitting && g.setSubmitting(!1);
211
- }), te(
212
- [() => i.schema, () => i.values, () => i.schemaLoading],
213
- ([t, a, s]) => {
214
- s || Ue(t, a);
214
+ ), oe(() => {
215
+ y?.setSubmitting && y.setSubmitting(!1);
216
+ });
217
+ let ye = i.documentKey;
218
+ ne(
219
+ [() => i.schema, () => i.values, () => i.schemaLoading, () => i.documentKey],
220
+ ([t, a, s, f], [Z, U, _]) => {
221
+ if (s) return;
222
+ const O = f !== ye;
223
+ if (ye = f, O || _) {
224
+ O && ie.value++, le(t, a, "replace");
225
+ return;
226
+ }
227
+ const ee = pe(a) === pe(v.value);
228
+ t !== Z && (a === U || ee) ? le(t, void 0, "schema") : ee || le(t, a, "refresh");
215
229
  }
216
230
  );
217
231
  const M = (t, a) => {
218
- re(t, a.value, a.data), f("onChange", v.value);
219
- }, Ve = async () => {
232
+ fe(t, a.value, a.data), g("onChange", v.value);
233
+ }, Ge = async () => {
220
234
  if (!u.value) return !0;
221
- const t = ne.value;
235
+ const t = ve.value;
222
236
  let a = !0;
223
237
  for (const s of t) {
224
- if (!R(s) || B(s)) continue;
225
- await Pe(s) && (a = !1);
238
+ if (!R(s) || V(s)) continue;
239
+ await Le(s) && (a = !1);
226
240
  }
227
241
  return a;
228
- }, Be = o(() => u.value ? r.value < G.value.length - 1 : !1), de = o(() => u.value ? r.value > 0 : !1), N = o(() => u.value ? r.value === G.value.length - 1 : !0), ce = async () => {
229
- !Be.value || !await Ve() || (r.value++, f("onStepChange", r.value));
230
- }, Ne = () => {
231
- de.value && (r.value--, f("onStepChange", r.value));
232
- }, De = (t, a) => {
233
- a <= r.value && (r.value = a, f("onStepChange", r.value));
234
- }, w = async () => {
242
+ }, He = n(() => u.value ? r.value < H.value.length - 1 : !1), he = n(() => u.value ? r.value > 0 : !1), D = n(() => u.value ? r.value === H.value.length - 1 : !0), be = async () => {
243
+ !He.value || !await Ge() || (r.value++, g("onStepChange", r.value));
244
+ }, Ke = () => {
245
+ he.value && (r.value--, g("onStepChange", r.value));
246
+ }, $e = (t, a) => {
247
+ a <= r.value && (r.value = a, g("onStepChange", r.value));
248
+ }, S = async () => {
235
249
  if (u.value) {
236
- if (!N.value && !i.isUpdate) {
237
- await ce();
250
+ if (!D.value && !i.isUpdate) {
251
+ await be();
238
252
  return;
239
253
  }
240
- if (!await ue()) {
241
- const a = G.value.findIndex(
242
- (s) => s.some((x) => !!b.value[x.name])
254
+ if (!await ge()) {
255
+ const a = H.value.findIndex(
256
+ (s) => s.some((f) => !!x.value[f.name])
243
257
  );
244
- a !== -1 && a !== r.value && (r.value = a, f("onStepChange", r.value));
258
+ a !== -1 && a !== r.value && (r.value = a, g("onStepChange", r.value));
245
259
  return;
246
260
  }
247
261
  }
248
262
  try {
249
- await Re();
263
+ await Be();
250
264
  } catch {
251
265
  }
252
- }, Ee = (t) => {
266
+ }, Me = (t) => {
253
267
  if (t.key !== "Enter" || t.defaultPrevented) return;
254
268
  const a = t.target;
255
269
  if (!a) return;
256
270
  const s = a.tagName.toLowerCase();
257
- s !== "textarea" && s !== "button" && (a.isContentEditable || (t.preventDefault(), w()));
258
- }, me = (t) => {
259
- (t.metaKey || t.ctrlKey) && t.key === "s" && (t.preventDefault(), w());
271
+ s !== "textarea" && s !== "button" && (a.isContentEditable || (t.preventDefault(), S()));
272
+ }, xe = (t) => {
273
+ (t.metaKey || t.ctrlKey) && t.key === "s" && (t.preventDefault(), S());
260
274
  };
261
- xe({
275
+ Se({
262
276
  formValues: v,
263
- errors: b,
264
- isSubmitting: y,
265
- handleSubmit: w,
266
- validateAll: ue,
267
- resetForm: Ie,
268
- setFieldError: ze,
269
- clearErrors: Le,
270
- setFieldValue: re
277
+ errors: x,
278
+ isSubmitting: h,
279
+ handleSubmit: S,
280
+ validateAll: ge,
281
+ resetForm: qe,
282
+ setFieldError: De,
283
+ clearErrors: Ee,
284
+ setFieldValue: fe,
285
+ replaceValues: Ne
271
286
  });
272
- const Z = () => {
273
- f("onCancel"), g && g?.close?.();
287
+ const se = () => {
288
+ g("onCancel"), y && y?.close?.();
274
289
  };
275
- return (t, a) => (n(), c("form", {
290
+ return (t, a) => (o(), d("form", {
276
291
  class: m(["form-container", i.class, e.isPage && "pb-10"]),
277
- onSubmit: ae(w, ["prevent"]),
292
+ onSubmit: re(S, ["prevent"]),
278
293
  onKeydown: [
279
- Ee,
280
- ye(ae(me, ["meta", "prevent"]), ["s"]),
281
- ye(ae(me, ["ctrl", "prevent"]), ["s"])
294
+ Me,
295
+ ke(re(xe, ["meta", "prevent"]), ["s"]),
296
+ ke(re(xe, ["ctrl", "prevent"]), ["s"])
282
297
  ]
283
298
  }, [
284
- e.isPage ? (n(), c("div", {
299
+ e.isPage ? (o(), d("div", {
285
300
  key: 0,
286
301
  class: m([
287
302
  "form-page-header sticky top-0 z-30 bg-background flex items-center justify-between pb-3.5 pt-4 -mt-3.5 mb-4.5",
288
303
  e.pageHeaderClass
289
304
  ])
290
305
  }, [
291
- p("div", it, [
292
- k(Ze, j(e.backButtonProps, {
306
+ w("div", ut, [
307
+ p(lt, j(e.backButtonProps, {
293
308
  fallback: e.backButtonPath,
294
309
  class: "max-sm:w-8 max-sm:h-8 max-sm:min-w-8 max-sm:min-h-8 max-sm:px-0 shrink-0"
295
310
  }), null, 16, ["fallback"]),
296
- p("h1", {
311
+ w("h1", {
297
312
  class: m(["text-foreground max-sm:text-lg text-fs-5 truncate", e.pageTitleClass])
298
- }, K(ke.value), 3)
313
+ }, Y(Ae.value), 3)
299
314
  ]),
300
- p("div", st, [
301
- he(t.$slots, "header-actions", {
315
+ w("div", dt, [
316
+ Ce(t.$slots, "header-actions", {
302
317
  values: l(v),
303
- isSubmitting: l(y),
304
- handleSubmit: w
318
+ isSubmitting: l(h),
319
+ handleSubmit: S
305
320
  }, void 0, !0),
306
- k(S, j({
321
+ p(C, j({
307
322
  type: "button",
308
323
  variant: e.isUpdate ? "outline" : "primary",
309
324
  text: e.submitText
310
325
  }, e.submitProps, {
311
326
  disabled: e.schemaLoading,
312
- loading: e.loading || l(y),
313
- onClick: w,
327
+ loading: e.loading || l(h),
328
+ onClick: S,
314
329
  class: "max-sm:hidden"
315
330
  }), null, 16, ["variant", "text", "disabled", "loading"])
316
331
  ])
317
- ], 2)) : d("", !0),
318
- !e.schemaLoading && u.value && se.value.length > 0 ? (n(), c("div", {
332
+ ], 2)) : c("", !0),
333
+ !e.schemaLoading && u.value && ce.value.length > 0 ? (o(), d("div", {
319
334
  key: 1,
320
335
  class: m(["form-timeline", e.timelineTextPosition == "right" ? "mb-2" : "mb-8"])
321
336
  }, [
322
- k(l(_e), {
323
- steps: se.value,
337
+ p(l(it), {
338
+ steps: ce.value,
324
339
  activeStep: r.value,
325
340
  direction: "horizontal",
326
341
  textPosition: e.timelineTextPosition,
327
342
  clickable: !0,
328
- onStepClick: De
343
+ onStepClick: $e
329
344
  }, null, 8, ["steps", "activeStep", "textPosition"])
330
- ], 2)) : d("", !0),
331
- p("div", {
332
- class: m(e.footer && L.value ? "pb-2" : "")
345
+ ], 2)) : c("", !0),
346
+ (o(), d("div", {
347
+ key: ie.value,
348
+ class: m(e.footer && B.value ? "pb-2" : "")
333
349
  }, [
334
- e.schemaLoading ? (n(), C(We, {
350
+ e.schemaLoading ? (o(), k(tt, {
335
351
  key: 0,
336
352
  isGrouped: T.value
337
- }, null, 8, ["isGrouped"])) : (n(), c("div", {
353
+ }, null, 8, ["isGrouped"])) : (o(), d("div", {
338
354
  key: 1,
339
355
  class: m(P.value ? "flex flex-col lg:flex-row gap-10 lg:gap-16" : "")
340
356
  }, [
341
- P.value ? (n(), c("div", nt, [
342
- h.value && l(R)(h.value) ? (n(), C(Qe, {
357
+ P.value ? (o(), d("div", ct, [
358
+ b.value && l(R)(b.value) ? (o(), k(et, {
343
359
  key: 0,
344
- field: h.value,
345
- value: l(v)[h.value.name],
360
+ field: b.value,
361
+ value: l(v)[b.value.name],
346
362
  values: l(v),
347
- errors: l(b),
348
- variant: U.value,
349
- size: I.value,
350
- rounded: z.value,
351
- disabled: l(B)(h.value),
352
- readonly: l($)(h.value),
353
- error: l(b)[h.value.name] || "",
363
+ errors: l(x),
364
+ variant: I.value,
365
+ size: z.value,
366
+ rounded: L.value,
367
+ disabled: l(V)(b.value),
368
+ readonly: l($)(b.value),
369
+ error: l(x)[b.value.name] || "",
354
370
  isUpdate: e.isUpdate,
355
- loading: l(V)[h.value?.name],
356
- onChange: a[0] || (a[0] = (s) => M(h.value.name, s))
357
- }, null, 8, ["field", "value", "values", "errors", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading"])) : d("", !0)
358
- ])) : d("", !0),
359
- p("div", {
371
+ loading: l(N)[b.value?.name],
372
+ onChange: a[0] || (a[0] = (s) => M(b.value.name, s))
373
+ }, null, 8, ["field", "value", "values", "errors", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading"])) : c("", !0)
374
+ ])) : c("", !0),
375
+ w("div", {
360
376
  class: m(P.value ? "flex-1 min-w-0 order-last lg:order-first" : "w-full")
361
377
  }, [
362
- T.value ? T.value && !u.value && e.groupLayout === "basic" ? (n(), c("div", {
378
+ T.value ? T.value && !u.value && e.groupLayout === "basic" ? (o(), d("div", {
363
379
  key: 1,
364
380
  class: m(["form-groups space-y-6", e.groupContainerClass])
365
381
  }, [
366
- (n(!0), c(je, null, Ke(H.value, (s, x, ve, O) => {
367
- const fe = [
382
+ (o(!0), d(We, null, Xe(K.value, (s, f, Z, U) => {
383
+ const _ = [
368
384
  s.schema,
369
385
  s.originalIndex,
370
386
  l(v),
371
- l(b),
372
- l(V),
373
- U.value,
387
+ l(x),
388
+ l(N),
374
389
  I.value,
375
390
  z.value,
376
- Q.value?.[s.originalIndex],
391
+ L.value,
377
392
  W.value?.[s.originalIndex],
393
+ X.value?.[s.originalIndex],
378
394
  e.groupClass,
379
395
  e.groupBodyClass,
380
396
  e.headerClass,
381
397
  e.className,
382
398
  e.isUpdate,
383
- D.value
399
+ E.value
384
400
  ];
385
- if (O && O.el && O.key === s.originalIndex && Ye(O, fe)) return O;
386
- const ge = (n(), c("div", {
401
+ if (U && U.el && U.key === s.originalIndex && Ze(U, _)) return U;
402
+ const O = (o(), d("div", {
387
403
  key: s.originalIndex,
388
404
  class: m([
389
405
  "form-group overflow-hidden bg-body",
390
406
  e.groupClass,
391
- H.value.length > 1 ? "border rounded" : ""
407
+ K.value.length > 1 ? "border rounded" : ""
392
408
  ])
393
409
  }, [
394
- Q.value?.[s.originalIndex] ? (n(), c("div", {
410
+ W.value?.[s.originalIndex] ? (o(), d("div", {
395
411
  key: 0,
396
412
  class: m(["form-group-header bg-muted/50 px-4 py-2.5 border-b", e.headerClass])
397
413
  }, [
398
- p("h3", ut, K(Q.value[s.originalIndex]), 1),
399
- W.value?.[s.originalIndex] ? (n(), c("p", dt, K(W.value[s.originalIndex]), 1)) : d("", !0)
400
- ], 2)) : d("", !0),
401
- p("div", {
402
- class: m(["form-group-body", [e.groupBodyClass, H.value.length > 1 ? "p-4.5" : ""]])
414
+ w("h3", ft, Y(W.value[s.originalIndex]), 1),
415
+ X.value?.[s.originalIndex] ? (o(), d("p", gt, Y(X.value[s.originalIndex]), 1)) : c("", !0)
416
+ ], 2)) : c("", !0),
417
+ w("div", {
418
+ class: m(["form-group-body", [e.groupBodyClass, K.value.length > 1 ? "p-4.5" : ""]])
403
419
  }, [
404
- k(X, {
420
+ p(ae, {
405
421
  schema: s.schema,
406
422
  values: l(v),
407
- errors: l(b),
408
- fieldLoading: l(V),
409
- variant: U.value,
410
- size: I.value,
411
- rounded: z.value,
423
+ errors: l(x),
424
+ fieldLoading: l(N),
425
+ variant: I.value,
426
+ size: z.value,
427
+ rounded: L.value,
412
428
  className: e.className,
413
429
  isUpdate: e.isUpdate,
414
- showRequiredAsterisk: D.value,
430
+ showRequiredAsterisk: E.value,
415
431
  isFieldVisible: l(R),
416
- isFieldDisabled: l(B),
432
+ isFieldDisabled: l(V),
417
433
  isFieldReadonly: l($),
418
434
  excludeTypes: P.value ? ["thumbnailSelector"] : [],
419
435
  onChange: M,
420
- onAddonAction: a[2] || (a[2] = (qe) => f("onAddonAction", qe))
436
+ onAddonAction: a[2] || (a[2] = (ee) => g("onAddonAction", ee))
421
437
  }, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
422
438
  ], 2)
423
439
  ], 2));
424
- return ge.memo = fe, ge;
440
+ return O.memo = _, O;
425
441
  }, a, 3), 128))
426
- ], 2)) : T.value && !u.value && e.groupLayout === "accordion" ? (n(), c("div", {
442
+ ], 2)) : T.value && !u.value && e.groupLayout === "accordion" ? (o(), d("div", {
427
443
  key: 2,
428
444
  class: m(e.groupContainerClass)
429
445
  }, [
430
- k(Xe, {
446
+ p(at, {
431
447
  variant: "solid",
432
- items: Ae.value,
448
+ items: Ie.value,
433
449
  "allow-multiple": "",
434
450
  class: m(e.groupClass)
435
451
  }, {
436
- content: be(({ item: s }) => [
437
- k(X, {
438
- schema: Te.value.get(s.id) || [],
452
+ content: Fe(({ item: s }) => [
453
+ p(ae, {
454
+ schema: ze.value.get(s.id) || [],
439
455
  values: l(v),
440
- errors: l(b),
441
- fieldLoading: l(V),
442
- variant: U.value,
443
- size: I.value,
444
- rounded: z.value,
456
+ errors: l(x),
457
+ fieldLoading: l(N),
458
+ variant: I.value,
459
+ size: z.value,
460
+ rounded: L.value,
445
461
  className: e.className,
446
462
  isUpdate: e.isUpdate,
447
- showRequiredAsterisk: D.value,
463
+ showRequiredAsterisk: E.value,
448
464
  isFieldVisible: l(R),
449
- isFieldDisabled: l(B),
465
+ isFieldDisabled: l(V),
450
466
  isFieldReadonly: l($),
451
467
  excludeTypes: P.value ? ["thumbnailSelector"] : [],
452
468
  onChange: M,
453
- onAddonAction: a[5] || (a[5] = (x) => f("onAddonAction", x))
469
+ onAddonAction: a[5] || (a[5] = (f) => g("onAddonAction", f))
454
470
  }, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
455
471
  ]),
456
472
  _: 1
457
473
  }, 8, ["items", "class"])
458
- ], 2)) : u.value ? (n(), c("div", ct, [
459
- e.tabs?.[r.value] ? (n(), c("div", {
474
+ ], 2)) : u.value ? (o(), d("div", yt, [
475
+ e.tabs?.[r.value] ? (o(), d("div", {
460
476
  key: 0,
461
477
  class: m(["form-step-header mb-6", e.headerClass])
462
478
  }, [
463
- p("h2", mt, K(e.tabs[r.value].title), 1),
464
- e.tabs[r.value].description ? (n(), c("p", vt, K(e.tabs[r.value].description), 1)) : d("", !0)
465
- ], 2)) : d("", !0),
466
- k(X, {
467
- schema: ne.value,
479
+ w("h2", ht, Y(e.tabs[r.value].title), 1),
480
+ e.tabs[r.value].description ? (o(), d("p", bt, Y(e.tabs[r.value].description), 1)) : c("", !0)
481
+ ], 2)) : c("", !0),
482
+ p(ae, {
483
+ schema: ve.value,
468
484
  values: l(v),
469
- errors: l(b),
470
- fieldLoading: l(V),
471
- variant: U.value,
472
- size: I.value,
473
- rounded: z.value,
485
+ errors: l(x),
486
+ fieldLoading: l(N),
487
+ variant: I.value,
488
+ size: z.value,
489
+ rounded: L.value,
474
490
  className: e.className,
475
491
  isUpdate: e.isUpdate,
476
- showRequiredAsterisk: D.value,
492
+ showRequiredAsterisk: E.value,
477
493
  isFieldVisible: l(R),
478
- isFieldDisabled: l(B),
494
+ isFieldDisabled: l(V),
479
495
  isFieldReadonly: l($),
480
496
  excludeTypes: P.value ? ["thumbnailSelector"] : [],
481
497
  onChange: M,
482
- onAddonAction: a[6] || (a[6] = (s) => f("onAddonAction", s))
498
+ onAddonAction: a[6] || (a[6] = (s) => g("onAddonAction", s))
483
499
  }, null, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes"])
484
- ])) : d("", !0) : (n(), c("div", ot, [
485
- k(X, {
500
+ ])) : c("", !0) : (o(), d("div", vt, [
501
+ p(ae, {
486
502
  schema: e.schema,
487
503
  values: l(v),
488
- errors: l(b),
489
- fieldLoading: l(V),
490
- variant: U.value,
491
- size: I.value,
492
- rounded: z.value,
504
+ errors: l(x),
505
+ fieldLoading: l(N),
506
+ variant: I.value,
507
+ size: z.value,
508
+ rounded: L.value,
493
509
  className: e.className,
494
510
  isUpdate: e.isUpdate,
495
- showRequiredAsterisk: D.value,
511
+ showRequiredAsterisk: E.value,
496
512
  isFieldVisible: l(R),
497
- isFieldDisabled: l(B),
513
+ isFieldDisabled: l(V),
498
514
  isFieldReadonly: l($),
499
515
  excludeTypes: P.value ? ["thumbnailSelector"] : [],
500
516
  layout: i.layout,
501
517
  onChange: M,
502
- onAddonAction: a[1] || (a[1] = (s) => f("onAddonAction", s))
518
+ onAddonAction: a[1] || (a[1] = (s) => g("onAddonAction", s))
503
519
  }, {
504
- default: be(() => [
505
- i.layout === "inline" && e.footer ? (n(), c("div", rt, [
506
- J.value ? (n(), C(S, {
520
+ default: Fe(() => [
521
+ i.layout === "inline" && e.footer ? (o(), d("div", mt, [
522
+ Q.value ? (o(), k(C, {
507
523
  key: 0,
508
524
  type: "button",
509
525
  variant: "outline",
510
526
  text: e.cancelText,
511
- disabled: e.loading || l(y),
512
- onClick: Z
513
- }, null, 8, ["text", "disabled"])) : d("", !0),
514
- k(S, j({
527
+ disabled: e.loading || l(h),
528
+ onClick: se
529
+ }, null, 8, ["text", "disabled"])) : c("", !0),
530
+ p(C, j({
515
531
  type: "submit",
516
532
  variant: "primary",
517
533
  text: e.submitText
518
534
  }, e.submitProps, {
519
- loading: e.loading || l(y)
535
+ loading: e.loading || l(h)
520
536
  }), null, 16, ["text", "loading"])
521
- ])) : d("", !0)
537
+ ])) : c("", !0)
522
538
  ]),
523
539
  _: 1
524
540
  }, 8, ["schema", "values", "errors", "fieldLoading", "variant", "size", "rounded", "className", "isUpdate", "showRequiredAsterisk", "isFieldVisible", "isFieldDisabled", "isFieldReadonly", "excludeTypes", "layout"])
525
541
  ])),
526
- he(t.$slots, "default", {
542
+ Ce(t.$slots, "default", {
527
543
  values: l(v),
528
- errors: l(b),
529
- isSubmitting: l(y),
530
- handleSubmit: w
544
+ errors: l(x),
545
+ isSubmitting: l(h),
546
+ handleSubmit: S
531
547
  }, void 0, !0)
532
548
  ], 2)
533
549
  ], 2))
534
- ], 2),
535
- e.footer && !e.schemaLoading && i.layout !== "inline" ? (n(), c("div", {
550
+ ], 2)),
551
+ e.footer && !e.schemaLoading && i.layout !== "inline" ? (o(), d("div", {
536
552
  key: 2,
537
553
  ref_key: "footerRef",
538
554
  ref: F,
@@ -545,77 +561,77 @@ const lt = ["onKeydown"], it = { class: "flex items-center gap-3" }, st = { clas
545
561
  // `sticky bottom-0` anchors the footer to the bottom of the nearest scrollable ancestor
546
562
  // (the modal's overflow-y-auto body), keeping it visible at all times without leaving
547
563
  // the normal document flow (unlike `fixed` which would escape the modal bounds).
548
- L.value ? "sticky bottom-0 -mx-0.5 px-0.5 mt-4" : i.layout !== "inline" ? "mt-6" : "",
564
+ B.value ? "sticky bottom-0 -mx-0.5 px-0.5 mt-4" : i.layout !== "inline" ? "mt-6" : "",
549
565
  // Show the separator for modal/explicit sticky mode, or when the default
550
566
  // auto-sticky footer is active because its scroll container overflows.
551
- we.value ? "border-t border-border/75 bg-body pt-3 pb-3 mt-6" : "",
567
+ Ue.value ? "border-t border-border/75 bg-body pt-3 pb-3 mt-6" : "",
552
568
  // Inside modal: extend footer flush to modal edge padding
553
- E.value && i.layout !== "inline" ? "-mx-4 px-4 pb-3! mt-7.5!" : "",
569
+ q.value && i.layout !== "inline" ? "-mx-4 px-4 pb-3! mt-7.5!" : "",
554
570
  i.layout === "inline" ? "mt-0 shrink-0" : ""
555
571
  ])
556
572
  }, [
557
- u.value && (J.value || e.isUpdate && !N.value) ? (n(), c("div", ft, [
558
- J.value ? (n(), C(S, {
573
+ u.value && (Q.value || e.isUpdate && !D.value) ? (o(), d("div", xt, [
574
+ Q.value ? (o(), k(C, {
559
575
  key: 0,
560
576
  type: "button",
561
577
  variant: "outline",
562
578
  text: e.cancelText,
563
- disabled: e.loading || l(y),
564
- onClick: Z
565
- }, null, 8, ["text", "disabled"])) : d("", !0),
566
- e.isUpdate && !N.value ? (n(), C(S, j({
579
+ disabled: e.loading || l(h),
580
+ onClick: se
581
+ }, null, 8, ["text", "disabled"])) : c("", !0),
582
+ e.isUpdate && !D.value ? (o(), k(C, j({
567
583
  key: 1,
568
584
  type: "button",
569
585
  variant: "primary",
570
586
  text: e.submitText
571
587
  }, e.submitProps, {
572
- loading: e.loading || l(y),
573
- onClick: w
574
- }), null, 16, ["text", "loading"])) : d("", !0)
575
- ])) : d("", !0),
576
- p("div", {
588
+ loading: e.loading || l(h),
589
+ onClick: S
590
+ }), null, 16, ["text", "loading"])) : c("", !0)
591
+ ])) : c("", !0),
592
+ w("div", {
577
593
  class: m(["flex gap-3 items-center", [
578
594
  u.value && "ml-auto",
579
- !u.value || N.value ? "w-full justify-end" : ""
595
+ !u.value || D.value ? "w-full justify-end" : ""
580
596
  ]])
581
597
  }, [
582
- J.value && !u.value ? (n(), C(S, {
598
+ Q.value && !u.value ? (o(), k(C, {
583
599
  key: 0,
584
600
  type: "button",
585
601
  variant: "outline",
586
602
  text: e.cancelText,
587
- disabled: e.loading || l(y),
588
- onClick: Z
589
- }, null, 8, ["text", "disabled"])) : d("", !0),
590
- u.value && de.value ? (n(), C(S, {
603
+ disabled: e.loading || l(h),
604
+ onClick: se
605
+ }, null, 8, ["text", "disabled"])) : c("", !0),
606
+ u.value && he.value ? (o(), k(C, {
591
607
  key: 1,
592
608
  type: "button",
593
609
  variant: "outline",
594
610
  icon: "lucide:arrow-left",
595
611
  text: "Previous",
596
- onClick: Ne
597
- })) : d("", !0),
598
- u.value && !N.value ? (n(), C(S, {
612
+ onClick: Ke
613
+ })) : c("", !0),
614
+ u.value && !D.value ? (o(), k(C, {
599
615
  key: 2,
600
616
  type: "button",
601
617
  variant: e.isUpdate ? "outline" : "primary",
602
618
  text: "Next",
603
619
  iconRight: "lucide:arrow-right",
604
- onClick: ce
605
- }, null, 8, ["variant"])) : d("", !0),
606
- !u.value || N.value ? (n(), C(S, j({
620
+ onClick: be
621
+ }, null, 8, ["variant"])) : c("", !0),
622
+ !u.value || D.value ? (o(), k(C, j({
607
623
  key: 3,
608
624
  type: "submit",
609
625
  variant: "primary",
610
626
  text: e.submitText
611
627
  }, e.submitProps, {
612
- loading: e.loading || l(y)
613
- }), null, 16, ["text", "loading"])) : d("", !0)
628
+ loading: e.loading || l(h)
629
+ }), null, 16, ["text", "loading"])) : c("", !0)
614
630
  ], 2)
615
- ], 2)) : d("", !0)
616
- ], 42, lt));
631
+ ], 2)) : c("", !0)
632
+ ], 42, rt));
617
633
  }
618
634
  });
619
635
  export {
620
- zt as default
636
+ Dt as default
621
637
  };