vlite3 1.4.31 → 1.4.32

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