@gspa/ui 0.1.4 → 0.3.0
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.
- package/README.md +34 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js +205 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs +1 -0
- package/dist/DataTable.css +1 -0
- package/dist/DataTableToolBar.css +1 -0
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-CIKiZaO1.cjs +1 -0
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-Dx_9f8DO.js +557 -0
- package/dist/FormField.vue_vue_type_script_setup_true_lang-BljDj5YZ.js +205 -0
- package/dist/FormField.vue_vue_type_script_setup_true_lang-FWitIR3U.cjs +1 -0
- package/dist/Header.css +1 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-C1OQn24h.cjs +1 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-CpBoY97r.js +137 -0
- package/dist/Loader.css +1 -0
- package/dist/ReminderConfig.css +1 -0
- package/dist/ReusableForm.css +1 -0
- package/dist/Sidebar.css +1 -0
- package/dist/Toast.css +1 -0
- package/dist/components/AccordionItem.cjs +1 -1
- package/dist/components/AccordionItem.js +5 -5
- package/dist/components/Alert.cjs +1 -1
- package/dist/components/Alert.js +71 -66
- package/dist/components/Button.cjs +1 -1
- package/dist/components/Button.js +2 -188
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.js +1 -1
- package/dist/components/DataTableFilters.cjs +1 -1
- package/dist/components/DataTableFilters.js +19 -19
- package/dist/components/DataTableToolBar.cjs +1 -1
- package/dist/components/DataTableToolBar.js +1 -1
- package/dist/components/DatePicker.cjs +1 -1
- package/dist/components/DatePicker.js +2 -399
- package/dist/components/FormField.cjs +1 -1
- package/dist/components/FormField.js +2 -188
- package/dist/components/GraphFilters.cjs +1 -1
- package/dist/components/GraphFilters.js +29 -29
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/Icon.js +23 -16
- package/dist/components/Input.cjs +1 -1
- package/dist/components/Input.js +2 -164
- package/dist/components/ReusableForm.cjs +1 -1
- package/dist/components/ReusableForm.js +188 -159
- package/dist/components/ThemeConfigurator.cjs +1 -1
- package/dist/components/ThemeConfigurator.js +51 -28
- package/dist/gspa-ui.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +124 -118
- package/dist/layouts/AuthLayout.cjs +1 -1
- package/dist/layouts/AuthLayout.js +110 -112
- package/dist/lib/form-field.cjs +1 -0
- package/dist/lib/form-field.js +4 -0
- package/dist/lib/icon.cjs +1 -0
- package/dist/lib/icon.js +4 -0
- package/dist/lib/theme.cjs +1 -1
- package/dist/lib/theme.js +73 -63
- package/dist/src/components/Alert.vue.d.ts.map +1 -1
- package/dist/src/components/Button.vue.d.ts +127 -29
- package/dist/src/components/Button.vue.d.ts.map +1 -1
- package/dist/src/components/Calendar.vue.d.ts +4 -4
- package/dist/src/components/Checkbox.vue.d.ts +2 -2
- package/dist/src/components/DataTable.vue.d.ts +1 -1
- package/dist/src/components/DatePicker.vue.d.ts +139 -29
- package/dist/src/components/DatePicker.vue.d.ts.map +1 -1
- package/dist/src/components/FormField.vue.d.ts +106 -38
- package/dist/src/components/FormField.vue.d.ts.map +1 -1
- package/dist/src/components/Icon.vue.d.ts.map +1 -1
- package/dist/src/components/Input.vue.d.ts +137 -33
- package/dist/src/components/Input.vue.d.ts.map +1 -1
- package/dist/src/components/ReusableForm.vue.d.ts +1 -1
- package/dist/src/components/ReusableForm.vue.d.ts.map +1 -1
- package/dist/src/components/ReusableFormModal.vue.d.ts +1 -1
- package/dist/src/components/Textarea.vue.d.ts +2 -2
- package/dist/src/index.d.ts +9 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/layouts/AuthLayout.vue.d.ts +2 -0
- package/dist/src/layouts/AuthLayout.vue.d.ts.map +1 -1
- package/dist/src/lib/form-field.d.ts +2 -0
- package/dist/src/lib/form-field.d.ts.map +1 -0
- package/dist/src/lib/icon.d.ts +2 -0
- package/dist/src/lib/icon.d.ts.map +1 -0
- package/dist/src/lib/theme.d.ts +4 -0
- package/dist/src/lib/theme.d.ts.map +1 -1
- package/dist/src/types.d.ts +47 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/styles/auth-layout.css +1 -0
- package/dist/styles/button.css +1 -0
- package/dist/styles/form-field.css +1 -0
- package/dist/styles/input.css +1 -0
- package/dist/styles/tokens.css +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -3
- package/dist/src/__tests__/Alert.spec.d.ts +0 -2
- package/dist/src/__tests__/Alert.spec.d.ts.map +0 -1
- package/dist/src/__tests__/App.spec.d.ts +0 -2
- package/dist/src/__tests__/App.spec.d.ts.map +0 -1
- package/dist/src/__tests__/AuthLayout.spec.d.ts +0 -2
- package/dist/src/__tests__/AuthLayout.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Badge.spec.d.ts +0 -2
- package/dist/src/__tests__/Badge.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Button.spec.d.ts +0 -2
- package/dist/src/__tests__/Button.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Card.spec.d.ts +0 -2
- package/dist/src/__tests__/Card.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Checkbox.spec.d.ts +0 -2
- package/dist/src/__tests__/Checkbox.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Dropdown.spec.d.ts +0 -2
- package/dist/src/__tests__/Dropdown.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Input.spec.d.ts +0 -2
- package/dist/src/__tests__/Input.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Modal.spec.d.ts +0 -2
- package/dist/src/__tests__/Modal.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Radio.spec.d.ts +0 -2
- package/dist/src/__tests__/Radio.spec.d.ts.map +0 -1
- package/dist/src/__tests__/ReusableForm.spec.d.ts +0 -2
- package/dist/src/__tests__/ReusableForm.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Tabs.spec.d.ts +0 -2
- package/dist/src/__tests__/Tabs.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/CardIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/CardIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/FormIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/FormIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useSlots as
|
|
1
|
+
import { useSlots as qe, computed as U, ref as z, watch as re, resolveComponent as ze, createElementBlock as i, openBlock as s, createCommentVNode as w, createElementVNode as k, toDisplayString as _, withModifiers as De, renderSlot as H, Fragment as L, renderList as J, normalizeClass as v, createBlock as x, withCtx as V, createVNode as C, createTextVNode as F } from "vue";
|
|
2
2
|
import Re from "./Slider.js";
|
|
3
|
-
import le from "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { _ as le } from "../DatePicker.vue_vue_type_script_setup_true_lang-Dx_9f8DO.js";
|
|
4
|
+
import { _ as je } from "../FormField.vue_vue_type_script_setup_true_lang-BljDj5YZ.js";
|
|
5
|
+
import { _ as $ } from "../Input.vue_vue_type_script_setup_true_lang-CpBoY97r.js";
|
|
6
|
+
import Pe from "./Textarea.js";
|
|
7
7
|
import ie from "./Select.js";
|
|
8
8
|
import Le from "./MultiSelect.js";
|
|
9
|
-
import
|
|
9
|
+
import { _ as D } from "../Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js";
|
|
10
10
|
import G from "./Label.js";
|
|
11
11
|
import ue from "./FileUpload.js";
|
|
12
|
-
import { toast as
|
|
12
|
+
import { toast as R } from "../lib/toast.js";
|
|
13
13
|
import { _ as Oe } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const Ye = { class: "w-full p-2" }, Ee = {
|
|
15
15
|
key: 0,
|
|
@@ -27,30 +27,43 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
27
27
|
key: 1,
|
|
28
28
|
class: "mt-1 text-sm ui-text-muted"
|
|
29
29
|
}, Ke = ["value"], Qe = ["title", "aria-label", "disabled", "onClick"], We = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "h-4 w-4",
|
|
32
|
+
viewBox: "0 0 24 24",
|
|
33
|
+
fill: "none",
|
|
34
|
+
stroke: "currentColor",
|
|
35
|
+
"aria-hidden": "true"
|
|
36
|
+
}, Xe = {
|
|
37
|
+
key: 0,
|
|
38
|
+
"stroke-linecap": "round",
|
|
39
|
+
"stroke-linejoin": "round",
|
|
40
|
+
"stroke-width": "2",
|
|
41
|
+
d: "M3 3l18 18M10.6 10.7a2 2 0 002.7 2.7M9.9 4.2A10.7 10.7 0 0112 4c5 0 8.7 4.4 9.6 6.5.2.3.2.7 0 1a15 15 0 01-2.2 3.3M6.2 6.2A15.8 15.8 0 002.4 10.5c-.2.3-.2.7 0 1C3.3 13.6 7 18 12 18c1 0 2-.2 2.9-.5"
|
|
42
|
+
}, Ze = {
|
|
30
43
|
key: 2,
|
|
31
44
|
class: "flex w-full items-center gap-2"
|
|
32
|
-
},
|
|
45
|
+
}, fe = { class: "min-w-0 flex-1" }, ea = {
|
|
33
46
|
key: 3,
|
|
34
47
|
class: "flex w-full items-center gap-2"
|
|
35
|
-
},
|
|
48
|
+
}, aa = { class: "min-w-0 flex-1" }, ta = {
|
|
36
49
|
key: 5,
|
|
37
50
|
class: "flex items-center"
|
|
38
|
-
},
|
|
51
|
+
}, na = {
|
|
39
52
|
key: 6,
|
|
40
53
|
class: "flex items-center"
|
|
41
|
-
},
|
|
54
|
+
}, oa = ["id", "aria-checked", "disabled", "onClick"], sa = {
|
|
42
55
|
key: 7,
|
|
43
56
|
class: "space-y-2"
|
|
44
|
-
},
|
|
57
|
+
}, ra = {
|
|
45
58
|
key: 11,
|
|
46
59
|
class: "space-y-2"
|
|
47
|
-
},
|
|
60
|
+
}, la = { class: "flex items-center gap-4" }, ia = { class: "min-w-12 text-right text-sm font-medium ui-text" }, ua = {
|
|
48
61
|
key: 0,
|
|
49
62
|
class: "flex justify-end gap-3 pt-6"
|
|
50
|
-
},
|
|
63
|
+
}, ca = {
|
|
51
64
|
key: 0,
|
|
52
65
|
class: "hidden"
|
|
53
|
-
},
|
|
66
|
+
}, ma = {
|
|
54
67
|
__name: "ReusableForm",
|
|
55
68
|
props: {
|
|
56
69
|
title: { type: String, default: "" },
|
|
@@ -78,10 +91,10 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
78
91
|
},
|
|
79
92
|
emits: ["submit", "reset", "cancel", "form-change"],
|
|
80
93
|
setup(h, { emit: B }) {
|
|
81
|
-
const g = h,
|
|
82
|
-
const
|
|
94
|
+
const g = h, j = B, ce = qe(), c = U(() => g.loading), u = z({}), d = z({}), P = z({}), K = z({}), O = z(!1), me = U(() => Array.isArray(g.sections) && g.sections.length > 0), de = U(() => !!ce.actions), Q = U(() => me.value ? g.sections.map((e, t) => {
|
|
95
|
+
const r = e?.id || `section-${t + 1}`, n = Array.isArray(e?.fields) ? e.fields : (g.fields || []).filter((a) => a.sectionId === r);
|
|
83
96
|
return {
|
|
84
|
-
id:
|
|
97
|
+
id: r,
|
|
85
98
|
title: e?.title || "",
|
|
86
99
|
description: e?.description || "",
|
|
87
100
|
icon: e?.icon || "",
|
|
@@ -99,56 +112,56 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
99
112
|
gridClass: "grid grid-cols-12 gap-4",
|
|
100
113
|
card: !1,
|
|
101
114
|
fields: g.fields || []
|
|
102
|
-
}]), T =
|
|
115
|
+
}]), T = U(() => Q.value.flatMap((e) => e.fields || [])), pe = U(() => Object.keys(d.value).length === 0), W = (e) => {
|
|
103
116
|
try {
|
|
104
117
|
return JSON.stringify(e ?? {});
|
|
105
118
|
} catch {
|
|
106
119
|
return "";
|
|
107
120
|
}
|
|
108
|
-
},
|
|
121
|
+
}, Y = (e, t) => {
|
|
109
122
|
if (!(!e || !t))
|
|
110
|
-
return t.split(".").reduce((
|
|
111
|
-
},
|
|
123
|
+
return t.split(".").reduce((r, n) => r?.[n], e);
|
|
124
|
+
}, M = (e, t, r) => {
|
|
112
125
|
const n = t.split("."), a = n.pop(), l = n.reduce((b, y) => ((!b[y] || typeof b[y] != "object") && (b[y] = {}), b[y]), e);
|
|
113
|
-
l[a] =
|
|
114
|
-
},
|
|
126
|
+
l[a] = r;
|
|
127
|
+
}, E = (e) => e.type === "checkbox" || e.type === "switch" ? !1 : e.type === "number" || e.type === "slider" || e.type === "range" ? e.min ?? 0 : e.type === "file" ? null : e.type === "multifile" || e.type === "multiselect" ? [] : e.type === "radio" && e.options?.[0]?.value || "", X = () => {
|
|
115
128
|
const e = {};
|
|
116
129
|
return T.value.forEach((t) => {
|
|
117
|
-
t.name.includes(".") ?
|
|
130
|
+
t.name.includes(".") ? M(e, t.name, E(t)) : e[t.name] = E(t);
|
|
118
131
|
}), e;
|
|
119
132
|
}, be = (e) => {
|
|
120
133
|
const t = {};
|
|
121
|
-
return T.value.forEach((
|
|
122
|
-
const n =
|
|
123
|
-
if (
|
|
124
|
-
|
|
134
|
+
return T.value.forEach((r) => {
|
|
135
|
+
const n = r.name.includes(".") ? Y(e, r.name) : e?.[r.name], a = E(r), l = n === void 0 ? a : n;
|
|
136
|
+
if (r.name.includes(".")) {
|
|
137
|
+
M(t, r.name, l);
|
|
125
138
|
return;
|
|
126
139
|
}
|
|
127
|
-
|
|
140
|
+
r.type === "file" ? t[r.name] = null : r.type === "multifile" || r.type === "multiselect" ? t[r.name] = Array.isArray(l) ? l : [] : t[r.name] = l;
|
|
128
141
|
}), t;
|
|
129
142
|
};
|
|
130
143
|
re(
|
|
131
144
|
() => g.initialData,
|
|
132
145
|
(e) => {
|
|
133
146
|
const t = e ? be(e) : X();
|
|
134
|
-
W(t) !== W(
|
|
135
|
-
|
|
147
|
+
W(t) !== W(u.value) && (O.value = !0, u.value = t, queueMicrotask(() => {
|
|
148
|
+
O.value = !1;
|
|
136
149
|
}));
|
|
137
150
|
},
|
|
138
151
|
{ immediate: !0 }
|
|
139
152
|
), re(
|
|
140
|
-
|
|
153
|
+
u,
|
|
141
154
|
(e) => {
|
|
142
|
-
|
|
155
|
+
O.value || j("form-change", e);
|
|
143
156
|
},
|
|
144
157
|
{ deep: !0 }
|
|
145
158
|
);
|
|
146
|
-
const m = (e) => e.includes(".") ?
|
|
159
|
+
const m = (e) => e.includes(".") ? Y(u.value, e) : u.value[e], I = (e) => {
|
|
147
160
|
const t = d.value?.[e];
|
|
148
|
-
return t || (e.includes(".") ?
|
|
161
|
+
return t || (e.includes(".") ? Y(d.value, e) : void 0);
|
|
149
162
|
}, p = (e, t) => {
|
|
150
|
-
e.includes(".") ?
|
|
151
|
-
},
|
|
163
|
+
e.includes(".") ? M(u.value, e, t) : u.value[e] = t;
|
|
164
|
+
}, S = (e) => e?.type === "password", q = (e) => !!P.value[e.name], ye = (e) => S(e) ? q(e) ? "text" : "password" : e.type, ve = (e) => {
|
|
152
165
|
e?.name && (P.value = {
|
|
153
166
|
...P.value,
|
|
154
167
|
[e.name]: !P.value[e.name]
|
|
@@ -157,72 +170,72 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
157
170
|
if (d.value = {}, T.value.forEach((e) => {
|
|
158
171
|
const t = m(e.name);
|
|
159
172
|
if (e.required && !e.disabled && e.type !== "hidden" && (e.type === "checkbox" || e.type === "switch" ? t || (d.value[e.name] = e.errorMessage || `${e.label} is required`) : e.type === "multiselect" || e.type === "multifile" ? (!Array.isArray(t) || t.length === 0) && (d.value[e.name] = e.errorMessage || `${e.label} is required`) : e.type === "number" || e.type === "slider" || e.type === "range" ? t === "" || t === null || t === void 0 ? d.value[e.name] = e.errorMessage || `${e.label} is required` : e.min !== void 0 && Number(t) < e.min ? d.value[e.name] = `${e.label} must be at least ${e.min}` : e.max !== void 0 && Number(t) > e.max && (d.value[e.name] = `${e.label} must be at most ${e.max}`) : e.type === "email" ? !t || !String(t).trim() ? d.value[e.name] = e.errorMessage || `${e.label} is required` : /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t)) || (d.value[e.name] = "Please enter a valid email address") : e.type === "url" ? !t || !String(t).trim() ? d.value[e.name] = e.errorMessage || `${e.label} is required` : /^https?:\/\/.+/.test(String(t)) || (d.value[e.name] = "Please enter a valid URL") : (t == null || typeof t == "string" && !t.trim()) && (d.value[e.name] = e.errorMessage || `${e.label} is required`)), typeof e.validate == "function") {
|
|
160
|
-
const
|
|
161
|
-
|
|
173
|
+
const r = e.validate(t, u.value);
|
|
174
|
+
r && (d.value[e.name] = r);
|
|
162
175
|
}
|
|
163
176
|
}), typeof g.customValidation == "function") {
|
|
164
|
-
const e = g.customValidation(
|
|
177
|
+
const e = g.customValidation(u.value);
|
|
165
178
|
e && typeof e == "object" && (d.value = { ...d.value, ...e });
|
|
166
179
|
}
|
|
167
180
|
if (typeof g.crossValidate == "function") {
|
|
168
|
-
const e = g.crossValidate(
|
|
181
|
+
const e = g.crossValidate(u.value);
|
|
169
182
|
e && typeof e == "object" && (d.value = { ...d.value, ...e });
|
|
170
183
|
}
|
|
171
184
|
return Object.keys(d.value).length === 0;
|
|
172
|
-
},
|
|
185
|
+
}, A = (e, t, r = void 0) => typeof e == "function" ? e(u.value, t) : e === void 0 ? r : e, Z = (e) => !!e?.actionButton && e.actionButton.show !== !1, f = (e) => {
|
|
173
186
|
if (!e?.actionButton) return !0;
|
|
174
|
-
const t = typeof e.actionButton.disabled == "function" ? e.actionButton.disabled(
|
|
187
|
+
const t = typeof e.actionButton.disabled == "function" ? e.actionButton.disabled(u.value, e) : e.actionButton.disabled;
|
|
175
188
|
return !!(c.value || e.disabled || t);
|
|
176
|
-
}, ee = (e) => e?.actionButton ? typeof e.actionButton.loading == "function" ? e.actionButton.loading(
|
|
177
|
-
typeof e?.actionButton?.onClick == "function" && e.actionButton.onClick(
|
|
178
|
-
}, te = (e) =>
|
|
179
|
-
if (!
|
|
180
|
-
if (
|
|
189
|
+
}, ee = (e) => e?.actionButton ? typeof e.actionButton.loading == "function" ? e.actionButton.loading(u.value, e) : !!e.actionButton.loading : !1, ae = (e) => {
|
|
190
|
+
typeof e?.actionButton?.onClick == "function" && e.actionButton.onClick(u.value, e);
|
|
191
|
+
}, te = (e) => S(e) || !!A(e.trailingIcon, e, null), ge = (e) => S(e) ? q(e) ? "eye-slash" : "eye" : A(e.trailingIcon, e, null), ne = (e) => S(e) ? q(e) ? "Hide password" : "Show password" : A(e.trailingIconTitle, e, "Action"), xe = (e) => S(e) ? q(e) ? "Hide password" : "Show password" : A(e.trailingIconAriaLabel, e, ne(e)), we = (e) => A(e.trailingIconClass, e, "w-4 h-4"), N = (e) => !!(c.value || e.disabled || A(e.trailingIconDisabled, e, !1)), ke = (e) => {
|
|
192
|
+
if (!N(e)) {
|
|
193
|
+
if (S(e)) {
|
|
181
194
|
ve(e);
|
|
182
195
|
return;
|
|
183
196
|
}
|
|
184
|
-
typeof e?.onTrailingIconClick == "function" && e.onTrailingIconClick(
|
|
197
|
+
typeof e?.onTrailingIconClick == "function" && e.onTrailingIconClick(u.value, e);
|
|
185
198
|
}
|
|
186
199
|
}, oe = async (e, t) => {
|
|
187
200
|
if (p(e.name, t), typeof e?.onChange == "function")
|
|
188
201
|
try {
|
|
189
|
-
await e.onChange(t,
|
|
202
|
+
await e.onChange(t, u.value);
|
|
190
203
|
} catch {
|
|
191
|
-
|
|
204
|
+
R.error("An error occurred while processing the change");
|
|
192
205
|
}
|
|
193
206
|
}, _e = (e, t) => {
|
|
194
207
|
if (p(e.name, t), typeof e?.onChange == "function")
|
|
195
208
|
try {
|
|
196
|
-
e.onChange(t,
|
|
209
|
+
e.onChange(t, u.value);
|
|
197
210
|
} catch {
|
|
198
|
-
|
|
211
|
+
R.error("An error occurred while processing the change");
|
|
199
212
|
}
|
|
200
213
|
}, Ce = (e, t) => {
|
|
201
|
-
p(e.name, t), typeof e?.onChange == "function" && e.onChange(t,
|
|
214
|
+
p(e.name, t), typeof e?.onChange == "function" && e.onChange(t, u.value);
|
|
202
215
|
}, Ve = (e, t) => {
|
|
203
|
-
p(e.name, t), typeof e?.onChange == "function" && e.onChange(t,
|
|
216
|
+
p(e.name, t), typeof e?.onChange == "function" && e.onChange(t, u.value);
|
|
204
217
|
}, Fe = (e, t) => {
|
|
205
|
-
p(e.name, t), typeof e?.onChange == "function" && e.onChange(t,
|
|
218
|
+
p(e.name, t), typeof e?.onChange == "function" && e.onChange(t, u.value);
|
|
206
219
|
}, Se = (e, t) => {
|
|
207
|
-
p(e.name, t), typeof e?.onChange == "function" && e.onChange(t,
|
|
220
|
+
p(e.name, t), typeof e?.onChange == "function" && e.onChange(t, u.value);
|
|
208
221
|
}, $e = (e) => {
|
|
209
222
|
const t = new FormData();
|
|
210
|
-
return Object.keys(e).forEach((
|
|
211
|
-
const n = e[
|
|
212
|
-
n != null && (n instanceof File ? t.append(
|
|
213
|
-
a instanceof File ? t.append(`${
|
|
223
|
+
return Object.keys(e).forEach((r) => {
|
|
224
|
+
const n = e[r];
|
|
225
|
+
n != null && (n instanceof File ? t.append(r, n) : Array.isArray(n) ? n.forEach((a, l) => {
|
|
226
|
+
a instanceof File ? t.append(`${r}[]`, a) : t.append(`${r}[${l}]`, a);
|
|
214
227
|
}) : typeof n == "object" && !(n instanceof Date) ? Object.keys(n).forEach((a) => {
|
|
215
|
-
t.append(`${
|
|
216
|
-
}) : t.append(
|
|
228
|
+
t.append(`${r}[${a}]`, n[a]);
|
|
229
|
+
}) : t.append(r, n));
|
|
217
230
|
}), t;
|
|
218
|
-
},
|
|
231
|
+
}, Ae = () => {
|
|
219
232
|
const e = {};
|
|
220
233
|
let t = !1;
|
|
221
234
|
T.value.forEach((n) => {
|
|
222
235
|
const a = m(n.name);
|
|
223
236
|
if (n.type === "number" || n.type === "slider" || n.type === "range") {
|
|
224
237
|
const b = a === "" || a === null || a === void 0 ? a : Number(a);
|
|
225
|
-
n.name.includes(".") ?
|
|
238
|
+
n.name.includes(".") ? M(e, n.name, b) : e[n.name] = b;
|
|
226
239
|
return;
|
|
227
240
|
}
|
|
228
241
|
if (n.type === "file") {
|
|
@@ -234,90 +247,90 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
234
247
|
return;
|
|
235
248
|
}
|
|
236
249
|
const l = ["text", "textarea", "date", "email", "url", "tel", "search", "time", "datetime-local", "month", "week"].includes(n.type) && typeof a == "string" ? a.trim() : a;
|
|
237
|
-
n.name.includes(".") ?
|
|
250
|
+
n.name.includes(".") ? M(e, n.name, l) : e[n.name] = l;
|
|
238
251
|
});
|
|
239
|
-
let
|
|
240
|
-
return t && (
|
|
252
|
+
let r = e;
|
|
253
|
+
return t && (r = $e(e), g.formType === "edit" && r.append("_method", "PUT")), { formData: r, hasFiles: t };
|
|
241
254
|
}, se = async () => {
|
|
242
255
|
if (T.value.some(
|
|
243
|
-
(
|
|
256
|
+
(r) => r.type !== "multifile" && (K.value[r.name] || []).length > 0
|
|
244
257
|
))
|
|
245
|
-
return
|
|
258
|
+
return R.error("Please wait for all files to finish uploading"), !1;
|
|
246
259
|
if (!he())
|
|
247
|
-
return
|
|
248
|
-
const t =
|
|
249
|
-
return
|
|
260
|
+
return R.error("Please fix the validation errors before submitting"), !1;
|
|
261
|
+
const t = Ae();
|
|
262
|
+
return j("submit", {
|
|
250
263
|
formData: t.formData,
|
|
251
264
|
formType: g.formType,
|
|
252
265
|
originalData: g.initialData,
|
|
253
266
|
hasFiles: t.hasFiles
|
|
254
267
|
}), !0;
|
|
255
|
-
},
|
|
268
|
+
}, Ue = async () => {
|
|
256
269
|
try {
|
|
257
270
|
await se();
|
|
258
271
|
} catch {
|
|
259
|
-
|
|
272
|
+
R.error("An error occurred during submission");
|
|
260
273
|
}
|
|
261
274
|
}, Be = () => {
|
|
262
|
-
|
|
263
|
-
}, Te = () =>
|
|
275
|
+
u.value = X(), d.value = {}, K.value = {}, j("reset");
|
|
276
|
+
}, Te = () => j("cancel");
|
|
264
277
|
return (e, t) => {
|
|
265
|
-
const
|
|
266
|
-
return
|
|
267
|
-
h.title ? (
|
|
268
|
-
|
|
269
|
-
h.description ? (
|
|
278
|
+
const r = ze("font-awesome-icon");
|
|
279
|
+
return s(), i("div", Ye, [
|
|
280
|
+
h.title ? (s(), i("div", Ee, [
|
|
281
|
+
k("h2", Ie, _(h.title), 1),
|
|
282
|
+
h.description ? (s(), i("p", Ne, _(h.description), 1)) : w("", !0)
|
|
270
283
|
])) : w("", !0),
|
|
271
|
-
|
|
284
|
+
k("form", {
|
|
272
285
|
class: "space-y-6",
|
|
273
|
-
onSubmit:
|
|
286
|
+
onSubmit: De(Ue, ["prevent"])
|
|
274
287
|
}, [
|
|
275
|
-
(
|
|
288
|
+
(s(!0), i(L, null, J(Q.value, (n) => (s(), i("div", {
|
|
276
289
|
key: n.id,
|
|
277
290
|
class: v(n.wrapperClass || "")
|
|
278
291
|
}, [
|
|
279
|
-
|
|
292
|
+
k("div", {
|
|
280
293
|
class: v(n.card ? "ui-surface border ui-border-strong rounded-xl p-4 sm:p-5" : "")
|
|
281
294
|
}, [
|
|
282
|
-
|
|
283
|
-
n.title || n.description ? (
|
|
284
|
-
n.title ? (
|
|
285
|
-
n.description ? (
|
|
295
|
+
H(e.$slots, "section-header", { section: n }, () => [
|
|
296
|
+
n.title || n.description ? (s(), i("div", He, [
|
|
297
|
+
n.title ? (s(), i("h3", Je, _(n.title), 1)) : w("", !0),
|
|
298
|
+
n.description ? (s(), i("p", Ge, _(n.description), 1)) : w("", !0)
|
|
286
299
|
])) : w("", !0)
|
|
287
300
|
], !0),
|
|
288
|
-
|
|
301
|
+
k("div", {
|
|
289
302
|
class: v(n.gridClass)
|
|
290
303
|
}, [
|
|
291
|
-
(
|
|
304
|
+
(s(!0), i(L, null, J(n.fields, (a) => (s(), i("div", {
|
|
292
305
|
key: a.name,
|
|
293
306
|
class: v(a.wrapperClass || "col-span-12")
|
|
294
307
|
}, [
|
|
295
|
-
a.type === "hidden" ? (
|
|
308
|
+
a.type === "hidden" ? (s(), i("input", {
|
|
296
309
|
key: 0,
|
|
297
310
|
value: m(a.name),
|
|
298
311
|
type: "hidden"
|
|
299
|
-
}, null, 8, Ke)) : (
|
|
312
|
+
}, null, 8, Ke)) : (s(), x(je, {
|
|
300
313
|
key: 1,
|
|
301
314
|
id: `form-${h.entityName}-${a.name}`,
|
|
302
315
|
label: a.label,
|
|
303
316
|
required: !!a.required,
|
|
304
|
-
error:
|
|
305
|
-
"error-message":
|
|
317
|
+
error: I(a.name),
|
|
318
|
+
"error-message": I(a.name),
|
|
306
319
|
"help-text": a.helpText,
|
|
307
320
|
class: v(a.labelClass || "")
|
|
308
321
|
}, {
|
|
309
322
|
default: V(({ fieldId: l, hasError: b, ariaDescribedBy: y }) => [
|
|
310
|
-
|
|
323
|
+
H(e.$slots, `field-${a.name}`, {
|
|
311
324
|
field: a,
|
|
312
|
-
formData:
|
|
313
|
-
error:
|
|
325
|
+
formData: u.value,
|
|
326
|
+
error: I(a.name),
|
|
314
327
|
update: (o) => p(a.name, o)
|
|
315
328
|
}, () => [
|
|
316
|
-
["text", "number", "password", "color", "email", "tel", "url", "search"].includes(a.type) ? (
|
|
329
|
+
["text", "number", "password", "color", "email", "tel", "url", "search"].includes(a.type) ? (s(), i("div", {
|
|
317
330
|
key: 0,
|
|
318
331
|
class: v(["relative", te(a) ? "has-trailing-icon" : ""])
|
|
319
332
|
}, [
|
|
320
|
-
|
|
333
|
+
C($, {
|
|
321
334
|
id: l,
|
|
322
335
|
"model-value": m(a.name),
|
|
323
336
|
type: ye(a),
|
|
@@ -328,21 +341,37 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
328
341
|
"aria-describedby": y,
|
|
329
342
|
"onUpdate:modelValue": (o) => p(a.name, o)
|
|
330
343
|
}, null, 8, ["id", "model-value", "type", "placeholder", "disabled", "readonly", "class", "aria-describedby", "onUpdate:modelValue"]),
|
|
331
|
-
te(a) ? (
|
|
344
|
+
te(a) ? (s(), i("button", {
|
|
332
345
|
key: 0,
|
|
333
346
|
type: "button",
|
|
334
|
-
class: v(["absolute right-3 top-1/2 -translate-y-1/2 ui-text hover:text-(--ui-text) transition-colors",
|
|
347
|
+
class: v(["absolute right-3 top-1/2 -translate-y-1/2 ui-text hover:text-(--ui-text) transition-colors", N(a) ? "opacity-50 cursor-not-allowed" : ""]),
|
|
335
348
|
title: ne(a),
|
|
336
349
|
"aria-label": xe(a),
|
|
337
|
-
disabled:
|
|
350
|
+
disabled: N(a),
|
|
338
351
|
onClick: (o) => ke(a)
|
|
339
352
|
}, [
|
|
340
|
-
|
|
353
|
+
S(a) ? (s(), i("svg", We, [
|
|
354
|
+
q(a) ? (s(), i("path", Xe)) : (s(), i(L, { key: 1 }, [
|
|
355
|
+
t[0] || (t[0] = k("path", {
|
|
356
|
+
"stroke-linecap": "round",
|
|
357
|
+
"stroke-linejoin": "round",
|
|
358
|
+
"stroke-width": "2",
|
|
359
|
+
d: "M2.4 10.5C3.3 8.4 7 4 12 4s8.7 4.4 9.6 6.5c.2.3.2.7 0 1C20.7 13.6 17 18 12 18s-8.7-4.4-9.6-6.5a1.1 1.1 0 010-1z"
|
|
360
|
+
}, null, -1)),
|
|
361
|
+
t[1] || (t[1] = k("circle", {
|
|
362
|
+
cx: "12",
|
|
363
|
+
cy: "11",
|
|
364
|
+
r: "3",
|
|
365
|
+
"stroke-width": "2"
|
|
366
|
+
}, null, -1))
|
|
367
|
+
], 64))
|
|
368
|
+
])) : (s(), x(r, {
|
|
369
|
+
key: 1,
|
|
341
370
|
icon: ge(a),
|
|
342
371
|
class: v(we(a))
|
|
343
|
-
}, null, 8, ["icon", "class"])
|
|
372
|
+
}, null, 8, ["icon", "class"]))
|
|
344
373
|
], 10, Qe)) : w("", !0)
|
|
345
|
-
], 2)) : a.type === "textarea" ? (
|
|
374
|
+
], 2)) : a.type === "textarea" ? (s(), x(Pe, {
|
|
346
375
|
key: 1,
|
|
347
376
|
id: l,
|
|
348
377
|
"model-value": m(a.name),
|
|
@@ -353,9 +382,9 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
353
382
|
class: v(["w-full rounded-md border px-3 py-2 focus:outline-none focus:ring-2 focus:ring-(--ui-primary)", b ? "border-(--ui-danger)" : "ui-border-strong", a.inputClass || ""]),
|
|
354
383
|
"aria-describedby": y,
|
|
355
384
|
"onUpdate:modelValue": (o) => p(a.name, o)
|
|
356
|
-
}, null, 8, ["id", "model-value", "placeholder", "disabled", "readonly", "rows", "class", "aria-describedby", "onUpdate:modelValue"])) : a.type === "select" ? (
|
|
357
|
-
|
|
358
|
-
|
|
385
|
+
}, null, 8, ["id", "model-value", "placeholder", "disabled", "readonly", "rows", "class", "aria-describedby", "onUpdate:modelValue"])) : a.type === "select" ? (s(), i("div", Ze, [
|
|
386
|
+
k("div", fe, [
|
|
387
|
+
C(ie, {
|
|
359
388
|
id: l,
|
|
360
389
|
"model-value": m(a.name),
|
|
361
390
|
options: a.options,
|
|
@@ -366,7 +395,7 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
366
395
|
"onUpdate:modelValue": (o) => oe(a, o)
|
|
367
396
|
}, null, 8, ["id", "model-value", "options", "placeholder", "disabled", "has-error", "aria-describedby", "onUpdate:modelValue"])
|
|
368
397
|
]),
|
|
369
|
-
Z(a) ? (
|
|
398
|
+
Z(a) ? (s(), x(D, {
|
|
370
399
|
key: 0,
|
|
371
400
|
type: "button",
|
|
372
401
|
variant: a.actionButton.variant || "outline",
|
|
@@ -378,13 +407,13 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
378
407
|
onClick: (o) => ae(a)
|
|
379
408
|
}, {
|
|
380
409
|
default: V(() => [
|
|
381
|
-
F(
|
|
410
|
+
F(_(a.actionButton.label || "+"), 1)
|
|
382
411
|
]),
|
|
383
412
|
_: 2
|
|
384
413
|
}, 1032, ["variant", "size", "class", "title", "disabled", "loading", "onClick"])) : w("", !0)
|
|
385
|
-
])) : a.type === "multiselect" ? (
|
|
386
|
-
|
|
387
|
-
|
|
414
|
+
])) : a.type === "multiselect" ? (s(), i("div", ea, [
|
|
415
|
+
k("div", aa, [
|
|
416
|
+
C(Le, {
|
|
388
417
|
id: l,
|
|
389
418
|
"model-value": m(a.name),
|
|
390
419
|
options: a.options,
|
|
@@ -395,7 +424,7 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
395
424
|
"onUpdate:modelValue": (o) => p(a.name, o)
|
|
396
425
|
}, null, 8, ["id", "model-value", "options", "disabled", "placeholder", "has-error", "aria-describedby", "onUpdate:modelValue"])
|
|
397
426
|
]),
|
|
398
|
-
Z(a) ? (
|
|
427
|
+
Z(a) ? (s(), x(D, {
|
|
399
428
|
key: 0,
|
|
400
429
|
type: "button",
|
|
401
430
|
variant: a.actionButton.variant || "outline",
|
|
@@ -407,11 +436,11 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
407
436
|
onClick: (o) => ae(a)
|
|
408
437
|
}, {
|
|
409
438
|
default: V(() => [
|
|
410
|
-
F(
|
|
439
|
+
F(_(a.actionButton.label || "+"), 1)
|
|
411
440
|
]),
|
|
412
441
|
_: 2
|
|
413
442
|
}, 1032, ["variant", "size", "class", "title", "disabled", "loading", "onClick"])) : w("", !0)
|
|
414
|
-
])) : a.type === "combobox" ? (
|
|
443
|
+
])) : a.type === "combobox" ? (s(), x(ie, {
|
|
415
444
|
key: 4,
|
|
416
445
|
id: l,
|
|
417
446
|
"model-value": m(a.name),
|
|
@@ -422,8 +451,8 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
422
451
|
"aria-describedby": y,
|
|
423
452
|
"allow-create": a.allowCreate,
|
|
424
453
|
"onUpdate:modelValue": (o) => oe(a, o)
|
|
425
|
-
}, null, 8, ["id", "model-value", "options", "placeholder", "disabled", "has-error", "aria-describedby", "allow-create", "onUpdate:modelValue"])) : a.type === "checkbox" ? (
|
|
426
|
-
|
|
454
|
+
}, null, 8, ["id", "model-value", "options", "placeholder", "disabled", "has-error", "aria-describedby", "allow-create", "onUpdate:modelValue"])) : a.type === "checkbox" ? (s(), i("div", ta, [
|
|
455
|
+
C($, {
|
|
427
456
|
id: l,
|
|
428
457
|
"model-value": m(a.name),
|
|
429
458
|
type: "checkbox",
|
|
@@ -432,17 +461,17 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
432
461
|
"aria-describedby": y,
|
|
433
462
|
"onUpdate:modelValue": (o) => p(a.name, o)
|
|
434
463
|
}, null, 8, ["id", "model-value", "disabled", "aria-describedby", "onUpdate:modelValue"]),
|
|
435
|
-
|
|
464
|
+
C(G, {
|
|
436
465
|
for: l,
|
|
437
466
|
class: "ml-2 text-sm ui-text"
|
|
438
467
|
}, {
|
|
439
468
|
default: V(() => [
|
|
440
|
-
F(
|
|
469
|
+
F(_(a.checkboxLabel || a.label), 1)
|
|
441
470
|
]),
|
|
442
471
|
_: 2
|
|
443
472
|
}, 1032, ["for"])
|
|
444
|
-
])) : a.type === "switch" ? (
|
|
445
|
-
|
|
473
|
+
])) : a.type === "switch" ? (s(), i("div", na, [
|
|
474
|
+
k("button", {
|
|
446
475
|
id: l,
|
|
447
476
|
type: "button",
|
|
448
477
|
role: "switch",
|
|
@@ -455,25 +484,25 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
455
484
|
]),
|
|
456
485
|
onClick: (o) => p(a.name, !m(a.name))
|
|
457
486
|
}, [
|
|
458
|
-
|
|
487
|
+
k("span", {
|
|
459
488
|
class: v(["inline-block h-4 w-4 transform rounded-full ui-surface border ui-border-strong transition-transform", m(a.name) ? "translate-x-6" : "translate-x-1"])
|
|
460
489
|
}, null, 2)
|
|
461
|
-
], 10,
|
|
462
|
-
|
|
490
|
+
], 10, oa),
|
|
491
|
+
C(G, {
|
|
463
492
|
for: l,
|
|
464
493
|
class: "ml-3 text-sm ui-text"
|
|
465
494
|
}, {
|
|
466
495
|
default: V(() => [
|
|
467
|
-
F(
|
|
496
|
+
F(_(a.checkboxLabel || a.label), 1)
|
|
468
497
|
]),
|
|
469
498
|
_: 2
|
|
470
499
|
}, 1032, ["for"])
|
|
471
|
-
])) : a.type === "radio" ? (
|
|
472
|
-
(
|
|
500
|
+
])) : a.type === "radio" ? (s(), i("div", sa, [
|
|
501
|
+
(s(!0), i(L, null, J(a.options, (o) => (s(), i("div", {
|
|
473
502
|
key: o.value,
|
|
474
503
|
class: "flex items-center"
|
|
475
504
|
}, [
|
|
476
|
-
|
|
505
|
+
C($, {
|
|
477
506
|
id: `${l}-${o.value}`,
|
|
478
507
|
"model-value": m(a.name),
|
|
479
508
|
type: "radio",
|
|
@@ -481,19 +510,19 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
481
510
|
disabled: c.value || a.disabled,
|
|
482
511
|
class: "h-4 w-4 ui-border-strong",
|
|
483
512
|
"aria-describedby": y,
|
|
484
|
-
"onUpdate:modelValue": (
|
|
513
|
+
"onUpdate:modelValue": (Me) => p(a.name, Me)
|
|
485
514
|
}, null, 8, ["id", "model-value", "value", "disabled", "aria-describedby", "onUpdate:modelValue"]),
|
|
486
|
-
|
|
515
|
+
C(G, {
|
|
487
516
|
for: `${l}-${o.value}`,
|
|
488
517
|
class: "ml-2 text-sm ui-text"
|
|
489
518
|
}, {
|
|
490
519
|
default: V(() => [
|
|
491
|
-
F(
|
|
520
|
+
F(_(o.label), 1)
|
|
492
521
|
]),
|
|
493
522
|
_: 2
|
|
494
523
|
}, 1032, ["for"])
|
|
495
524
|
]))), 128))
|
|
496
|
-
])) : a.type === "file" ? (
|
|
525
|
+
])) : a.type === "file" ? (s(), x(ue, {
|
|
497
526
|
key: 8,
|
|
498
527
|
multiple: !1,
|
|
499
528
|
accept: a.accept,
|
|
@@ -501,7 +530,7 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
501
530
|
variant: a.variant || "default",
|
|
502
531
|
onFilesSelected: (o) => Ce(a, o),
|
|
503
532
|
onFileRemoved: (o) => Ve(a, o)
|
|
504
|
-
}, null, 8, ["accept", "max-size", "variant", "onFilesSelected", "onFileRemoved"])) : a.type === "multifile" ? (
|
|
533
|
+
}, null, 8, ["accept", "max-size", "variant", "onFilesSelected", "onFileRemoved"])) : a.type === "multifile" ? (s(), x(ue, {
|
|
505
534
|
key: 9,
|
|
506
535
|
multiple: a.multiple !== !1,
|
|
507
536
|
accept: a.accept,
|
|
@@ -510,7 +539,7 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
510
539
|
variant: a.variant || "default",
|
|
511
540
|
onFilesSelected: (o) => Fe(a, o),
|
|
512
541
|
onFileRemoved: (o) => Se(a, o)
|
|
513
|
-
}, null, 8, ["multiple", "accept", "max-size", "max-files", "variant", "onFilesSelected", "onFileRemoved"])) : a.type === "slider" ? (
|
|
542
|
+
}, null, 8, ["multiple", "accept", "max-size", "max-files", "variant", "onFilesSelected", "onFileRemoved"])) : a.type === "slider" ? (s(), x(Re, {
|
|
514
543
|
key: 10,
|
|
515
544
|
"model-value": m(a.name),
|
|
516
545
|
min: a.min,
|
|
@@ -518,9 +547,9 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
518
547
|
step: a.step,
|
|
519
548
|
disabled: c.value || a.disabled,
|
|
520
549
|
"onUpdate:modelValue": (o) => _e(a, o)
|
|
521
|
-
}, null, 8, ["model-value", "min", "max", "step", "disabled", "onUpdate:modelValue"])) : a.type === "range" ? (
|
|
522
|
-
|
|
523
|
-
|
|
550
|
+
}, null, 8, ["model-value", "min", "max", "step", "disabled", "onUpdate:modelValue"])) : a.type === "range" ? (s(), i("div", ra, [
|
|
551
|
+
k("div", la, [
|
|
552
|
+
C($, {
|
|
524
553
|
id: l,
|
|
525
554
|
"model-value": m(a.name),
|
|
526
555
|
type: "range",
|
|
@@ -532,9 +561,9 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
532
561
|
"aria-describedby": y,
|
|
533
562
|
"onUpdate:modelValue": (o) => p(a.name, o)
|
|
534
563
|
}, null, 8, ["id", "model-value", "min", "max", "step", "disabled", "aria-describedby", "onUpdate:modelValue"]),
|
|
535
|
-
|
|
564
|
+
k("span", ia, _(m(a.name)), 1)
|
|
536
565
|
])
|
|
537
|
-
])) : a.type === "date" ? (
|
|
566
|
+
])) : a.type === "date" ? (s(), x(le, {
|
|
538
567
|
key: 12,
|
|
539
568
|
id: l,
|
|
540
569
|
"model-value": m(a.name),
|
|
@@ -551,7 +580,7 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
551
580
|
"calendar-position": a.calendarPosition || "left-0 bottom-full",
|
|
552
581
|
"aria-describedby": y,
|
|
553
582
|
"onUpdate:modelValue": (o) => p(a.name, o)
|
|
554
|
-
}, null, 8, ["id", "model-value", "disabled", "required", "min", "max", "placeholder", "format", "enable-time", "minute-interval", "clearable", "show-today", "calendar-position", "aria-describedby", "onUpdate:modelValue"])) : a.type === "time" ? (
|
|
583
|
+
}, null, 8, ["id", "model-value", "disabled", "required", "min", "max", "placeholder", "format", "enable-time", "minute-interval", "clearable", "show-today", "calendar-position", "aria-describedby", "onUpdate:modelValue"])) : a.type === "time" ? (s(), x($, {
|
|
555
584
|
key: 13,
|
|
556
585
|
id: l,
|
|
557
586
|
"model-value": m(a.name),
|
|
@@ -560,7 +589,7 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
560
589
|
class: v([b ? "border-(--ui-danger)" : "ui-border-strong", a.inputClass || ""]),
|
|
561
590
|
"aria-describedby": y,
|
|
562
591
|
"onUpdate:modelValue": (o) => p(a.name, o)
|
|
563
|
-
}, null, 8, ["id", "model-value", "disabled", "class", "aria-describedby", "onUpdate:modelValue"])) : a.type === "datetime-local" ? (
|
|
592
|
+
}, null, 8, ["id", "model-value", "disabled", "class", "aria-describedby", "onUpdate:modelValue"])) : a.type === "datetime-local" ? (s(), x(le, {
|
|
564
593
|
key: 14,
|
|
565
594
|
id: l,
|
|
566
595
|
"model-value": m(a.name),
|
|
@@ -576,7 +605,7 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
576
605
|
"show-today": a.showToday !== !1,
|
|
577
606
|
"aria-describedby": y,
|
|
578
607
|
"onUpdate:modelValue": (o) => p(a.name, o)
|
|
579
|
-
}, null, 8, ["id", "model-value", "disabled", "required", "min", "max", "placeholder", "format", "minute-interval", "clearable", "show-today", "aria-describedby", "onUpdate:modelValue"])) : a.type === "month" ? (
|
|
608
|
+
}, null, 8, ["id", "model-value", "disabled", "required", "min", "max", "placeholder", "format", "minute-interval", "clearable", "show-today", "aria-describedby", "onUpdate:modelValue"])) : a.type === "month" ? (s(), x($, {
|
|
580
609
|
key: 15,
|
|
581
610
|
id: l,
|
|
582
611
|
"model-value": m(a.name),
|
|
@@ -585,7 +614,7 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
585
614
|
class: v([b ? "border-(--ui-danger)" : "ui-border-strong", a.inputClass || ""]),
|
|
586
615
|
"aria-describedby": y,
|
|
587
616
|
"onUpdate:modelValue": (o) => p(a.name, o)
|
|
588
|
-
}, null, 8, ["id", "model-value", "disabled", "class", "aria-describedby", "onUpdate:modelValue"])) : a.type === "week" ? (
|
|
617
|
+
}, null, 8, ["id", "model-value", "disabled", "class", "aria-describedby", "onUpdate:modelValue"])) : a.type === "week" ? (s(), x($, {
|
|
589
618
|
key: 16,
|
|
590
619
|
id: l,
|
|
591
620
|
"model-value": m(a.name),
|
|
@@ -603,55 +632,55 @@ const Ye = { class: "w-full p-2" }, Ee = {
|
|
|
603
632
|
], 2)
|
|
604
633
|
], 2)
|
|
605
634
|
], 2))), 128)),
|
|
606
|
-
|
|
607
|
-
formData:
|
|
635
|
+
H(e.$slots, "actions", {
|
|
636
|
+
formData: u.value,
|
|
608
637
|
isValid: pe.value,
|
|
609
638
|
submit: se
|
|
610
639
|
}, () => [
|
|
611
|
-
h.showSubmit ? (
|
|
612
|
-
h.showReset ? (
|
|
640
|
+
h.showSubmit ? (s(), i("div", ua, [
|
|
641
|
+
h.showReset ? (s(), x(D, {
|
|
613
642
|
key: 0,
|
|
614
643
|
type: "button",
|
|
615
644
|
variant: "outline",
|
|
616
645
|
disabled: c.value,
|
|
617
646
|
onClick: Be
|
|
618
647
|
}, {
|
|
619
|
-
default: V(() => [...t[
|
|
648
|
+
default: V(() => [...t[2] || (t[2] = [
|
|
620
649
|
F(" Reset ", -1)
|
|
621
650
|
])]),
|
|
622
651
|
_: 1
|
|
623
652
|
}, 8, ["disabled"])) : w("", !0),
|
|
624
|
-
h.showCancel ? (
|
|
653
|
+
h.showCancel ? (s(), x(D, {
|
|
625
654
|
key: 1,
|
|
626
655
|
type: "button",
|
|
627
656
|
variant: "outline",
|
|
628
657
|
disabled: c.value,
|
|
629
658
|
onClick: Te
|
|
630
659
|
}, {
|
|
631
|
-
default: V(() => [...t[
|
|
660
|
+
default: V(() => [...t[3] || (t[3] = [
|
|
632
661
|
F(" Cancel ", -1)
|
|
633
662
|
])]),
|
|
634
663
|
_: 1
|
|
635
664
|
}, 8, ["disabled"])) : w("", !0),
|
|
636
|
-
|
|
665
|
+
C(D, {
|
|
637
666
|
type: "submit",
|
|
638
667
|
disabled: c.value,
|
|
639
668
|
loading: c.value,
|
|
640
669
|
variant: "default"
|
|
641
670
|
}, {
|
|
642
671
|
default: V(() => [
|
|
643
|
-
F(
|
|
672
|
+
F(_(h.submitLabel), 1)
|
|
644
673
|
]),
|
|
645
674
|
_: 1
|
|
646
675
|
}, 8, ["disabled", "loading"])
|
|
647
676
|
])) : w("", !0)
|
|
648
677
|
], !0),
|
|
649
|
-
h.showSubmit && de.value ? (
|
|
678
|
+
h.showSubmit && de.value ? (s(), i("div", ca)) : w("", !0)
|
|
650
679
|
], 32)
|
|
651
680
|
]);
|
|
652
681
|
};
|
|
653
682
|
}
|
|
654
|
-
},
|
|
683
|
+
}, Fa = /* @__PURE__ */ Oe(ma, [["__scopeId", "data-v-7f79d2a2"]]);
|
|
655
684
|
export {
|
|
656
|
-
|
|
685
|
+
Fa as default
|
|
657
686
|
};
|