vlite3 0.4.2 → 0.4.4
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/components/Form/Form.vue.d.ts +3 -0
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +45 -43
- package/components/Form/composables/useForm.d.ts +1 -0
- package/components/Form/composables/useForm.js +73 -66
- package/components/Form/types.d.ts +14 -0
- package/components/Form/utils/form.utils.d.ts +6 -0
- package/components/Form/utils/form.utils.js +136 -70
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -44,6 +44,8 @@ interface Props {
|
|
|
44
44
|
footerClass?: string;
|
|
45
45
|
/** Timeline text position */
|
|
46
46
|
timelineTextPosition?: TimelineTextPosition;
|
|
47
|
+
/** Fields to explicitly include in the submit payload */
|
|
48
|
+
emitFields?: string[];
|
|
47
49
|
}
|
|
48
50
|
declare function __VLS_template(): {
|
|
49
51
|
attrs: Partial<{}>;
|
|
@@ -89,6 +91,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
89
91
|
showCancel: boolean;
|
|
90
92
|
groupClass: string;
|
|
91
93
|
timelineTextPosition: TimelineTextPosition;
|
|
94
|
+
emitFields: string[];
|
|
92
95
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFormElement>;
|
|
93
96
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
94
97
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Form.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a67bf34e"]]);
|
|
5
5
|
export {
|
|
6
6
|
f as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as W, inject as X, computed as d, ref as Y, watch as Z, openBlock as
|
|
2
|
-
import { useForm as
|
|
1
|
+
import { defineComponent as W, inject as X, computed as d, ref as Y, watch as Z, openBlock as s, createElementBlock as o, withModifiers as _, normalizeClass as h, createVNode as x, createCommentVNode as c, unref as t, Fragment as ee, renderList as te, createElementVNode as U, toDisplayString as k, renderSlot as ae, createBlock as p, mergeProps as ie } from "vue";
|
|
2
|
+
import { useForm as le } from "./composables/useForm.js";
|
|
3
3
|
import D from "./FormFields.vue.js";
|
|
4
4
|
import A from "../Button.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import se from "../Timeline.vue.js";
|
|
6
6
|
const ne = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "form-timeline mb-18"
|
|
@@ -45,40 +45,42 @@ const ne = {
|
|
|
45
45
|
groupClass: { default: "" },
|
|
46
46
|
headerClass: { default: "" },
|
|
47
47
|
footerClass: { default: "" },
|
|
48
|
-
timelineTextPosition: { default: "bottom" }
|
|
48
|
+
timelineTextPosition: { default: "bottom" },
|
|
49
|
+
emitFields: { default: () => ["__typename"] }
|
|
49
50
|
},
|
|
50
51
|
emits: ["onSubmit", "onCancel", "onStepChange", "onAddonAction"],
|
|
51
52
|
setup(e, { emit: M }) {
|
|
52
|
-
const
|
|
53
|
+
const l = e, m = M, f = X("modal-context", null), G = d(() => l.showCancel || !!f), $ = d(() => !!f), b = d(() => !l.schema || l.schema.length === 0 ? !1 : Array.isArray(l.schema[0])), r = d(() => l.tabs && l.tabs.length > 0 && b.value), i = Y(0), w = d(() => l.tabs ? l.tabs.map((n, a) => ({
|
|
53
54
|
id: n.id?.toString() || a.toString(),
|
|
54
55
|
title: n.title,
|
|
55
56
|
icon: n.icon,
|
|
56
57
|
description: n.description,
|
|
57
58
|
status: a < i.value ? "completed" : a === i.value ? "current" : "upcoming"
|
|
58
|
-
})) : []), g = d(() => b.value ?
|
|
59
|
+
})) : []), g = d(() => b.value ? l.schema : [l.schema]), P = d(() => r.value ? g.value[i.value] || [] : []), {
|
|
59
60
|
formValues: y,
|
|
60
|
-
errors:
|
|
61
|
+
errors: F,
|
|
61
62
|
isSubmitting: N,
|
|
62
63
|
handleFieldChange: j,
|
|
63
64
|
validateField: E,
|
|
64
65
|
validateAll: he,
|
|
65
|
-
isFieldVisible:
|
|
66
|
-
isFieldDisabled:
|
|
66
|
+
isFieldVisible: S,
|
|
67
|
+
isFieldDisabled: C,
|
|
67
68
|
isFieldReadonly: V,
|
|
68
69
|
getFieldValue: be,
|
|
69
70
|
handleSubmit: L,
|
|
70
71
|
flatSchema: ge
|
|
71
|
-
} =
|
|
72
|
-
schema:
|
|
73
|
-
values:
|
|
74
|
-
isUpdate:
|
|
75
|
-
folderId:
|
|
72
|
+
} = le({
|
|
73
|
+
schema: l.schema,
|
|
74
|
+
values: l.values,
|
|
75
|
+
isUpdate: l.isUpdate,
|
|
76
|
+
folderId: l.folderId,
|
|
77
|
+
emitFields: l.emitFields,
|
|
76
78
|
onSubmit: (n) => {
|
|
77
79
|
m("onSubmit", n, f?.close);
|
|
78
80
|
}
|
|
79
81
|
});
|
|
80
82
|
Z(
|
|
81
|
-
() =>
|
|
83
|
+
() => l.values,
|
|
82
84
|
(n) => {
|
|
83
85
|
},
|
|
84
86
|
{ deep: !0 }
|
|
@@ -90,7 +92,7 @@ const ne = {
|
|
|
90
92
|
const n = P.value;
|
|
91
93
|
let a = !0;
|
|
92
94
|
for (const u of n) {
|
|
93
|
-
if (!
|
|
95
|
+
if (!S(u) || C(u)) continue;
|
|
94
96
|
E(u) && (a = !1);
|
|
95
97
|
}
|
|
96
98
|
return a;
|
|
@@ -112,12 +114,12 @@ const ne = {
|
|
|
112
114
|
}, O = () => {
|
|
113
115
|
m("onCancel"), f && f?.close?.();
|
|
114
116
|
};
|
|
115
|
-
return (n, a) => (
|
|
116
|
-
class: h(["form-container",
|
|
117
|
+
return (n, a) => (s(), o("form", {
|
|
118
|
+
class: h(["form-container", l.class]),
|
|
117
119
|
onSubmit: _(H, ["prevent"])
|
|
118
120
|
}, [
|
|
119
|
-
r.value && w.value.length > 0 ? (
|
|
120
|
-
x(
|
|
121
|
+
r.value && w.value.length > 0 ? (s(), o("div", ne, [
|
|
122
|
+
x(se, {
|
|
121
123
|
steps: w.value,
|
|
122
124
|
activeStep: i.value,
|
|
123
125
|
direction: "horizontal",
|
|
@@ -126,71 +128,71 @@ const ne = {
|
|
|
126
128
|
onStepClick: K
|
|
127
129
|
}, null, 8, ["steps", "activeStep", "textPosition"])
|
|
128
130
|
])) : c("", !0),
|
|
129
|
-
b.value ? b.value && !r.value ? (
|
|
130
|
-
(
|
|
131
|
+
b.value ? b.value && !r.value ? (s(), o("div", re, [
|
|
132
|
+
(s(!0), o(ee, null, te(g.value, (u, v) => (s(), o("div", {
|
|
131
133
|
key: v,
|
|
132
134
|
class: h(["form-group border rounded-lg overflow-hidden", e.groupClass])
|
|
133
135
|
}, [
|
|
134
|
-
e.groupsHeadings?.[v] ? (
|
|
136
|
+
e.groupsHeadings?.[v] ? (s(), o("div", {
|
|
135
137
|
key: 0,
|
|
136
138
|
class: h(["form-group-header bg-muted/50 px-6 py-4 border-b", e.headerClass])
|
|
137
139
|
}, [
|
|
138
140
|
U("h3", de, k(e.groupsHeadings[v]), 1),
|
|
139
|
-
e.groupHeadingsDescription?.[v] ? (
|
|
141
|
+
e.groupHeadingsDescription?.[v] ? (s(), o("p", ue, k(e.groupHeadingsDescription[v]), 1)) : c("", !0)
|
|
140
142
|
], 2)) : c("", !0),
|
|
141
143
|
U("div", ce, [
|
|
142
144
|
x(D, {
|
|
143
145
|
schema: u,
|
|
144
146
|
values: t(y),
|
|
145
|
-
errors: t(
|
|
147
|
+
errors: t(F),
|
|
146
148
|
variant: e.variant,
|
|
147
149
|
size: e.size,
|
|
148
150
|
rounded: e.rounded,
|
|
149
151
|
className: e.className,
|
|
150
152
|
isUpdate: e.isUpdate,
|
|
151
|
-
isFieldVisible: t(
|
|
152
|
-
isFieldDisabled: t(
|
|
153
|
+
isFieldVisible: t(S),
|
|
154
|
+
isFieldDisabled: t(C),
|
|
153
155
|
isFieldReadonly: t(V),
|
|
154
156
|
onChange: z,
|
|
155
157
|
onAddonAction: a[1] || (a[1] = (Q) => m("onAddonAction", Q))
|
|
156
158
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
157
159
|
])
|
|
158
160
|
], 2))), 128))
|
|
159
|
-
])) : r.value ? (
|
|
160
|
-
e.tabs?.[i.value] ? (
|
|
161
|
+
])) : r.value ? (s(), o("div", me, [
|
|
162
|
+
e.tabs?.[i.value] ? (s(), o("div", {
|
|
161
163
|
key: 0,
|
|
162
164
|
class: h(["form-step-header mb-6", e.headerClass])
|
|
163
165
|
}, [
|
|
164
166
|
U("h2", ve, k(e.tabs[i.value].title), 1),
|
|
165
|
-
e.tabs[i.value].description ? (
|
|
167
|
+
e.tabs[i.value].description ? (s(), o("p", fe, k(e.tabs[i.value].description), 1)) : c("", !0)
|
|
166
168
|
], 2)) : c("", !0),
|
|
167
169
|
x(D, {
|
|
168
170
|
schema: P.value,
|
|
169
171
|
values: t(y),
|
|
170
|
-
errors: t(
|
|
172
|
+
errors: t(F),
|
|
171
173
|
variant: e.variant,
|
|
172
174
|
size: e.size,
|
|
173
175
|
rounded: e.rounded,
|
|
174
176
|
className: e.className,
|
|
175
177
|
isUpdate: e.isUpdate,
|
|
176
|
-
isFieldVisible: t(
|
|
177
|
-
isFieldDisabled: t(
|
|
178
|
+
isFieldVisible: t(S),
|
|
179
|
+
isFieldDisabled: t(C),
|
|
178
180
|
isFieldReadonly: t(V),
|
|
179
181
|
onChange: z,
|
|
180
182
|
onAddonAction: a[2] || (a[2] = (u) => m("onAddonAction", u))
|
|
181
183
|
}, null, 8, ["schema", "values", "errors", "variant", "size", "rounded", "className", "isUpdate", "isFieldVisible", "isFieldDisabled", "isFieldReadonly"])
|
|
182
|
-
])) : c("", !0) : (
|
|
184
|
+
])) : c("", !0) : (s(), o("div", oe, [
|
|
183
185
|
x(D, {
|
|
184
186
|
schema: e.schema,
|
|
185
187
|
values: t(y),
|
|
186
|
-
errors: t(
|
|
188
|
+
errors: t(F),
|
|
187
189
|
variant: e.variant,
|
|
188
190
|
size: e.size,
|
|
189
191
|
rounded: e.rounded,
|
|
190
192
|
className: e.className,
|
|
191
193
|
isUpdate: e.isUpdate,
|
|
192
|
-
isFieldVisible: t(
|
|
193
|
-
isFieldDisabled: t(
|
|
194
|
+
isFieldVisible: t(S),
|
|
195
|
+
isFieldDisabled: t(C),
|
|
194
196
|
isFieldReadonly: t(V),
|
|
195
197
|
onChange: z,
|
|
196
198
|
onAddonAction: a[0] || (a[0] = (u) => m("onAddonAction", u))
|
|
@@ -198,11 +200,11 @@ const ne = {
|
|
|
198
200
|
])),
|
|
199
201
|
ae(n.$slots, "default", {
|
|
200
202
|
values: t(y),
|
|
201
|
-
errors: t(
|
|
203
|
+
errors: t(F),
|
|
202
204
|
isSubmitting: t(N),
|
|
203
205
|
handleSubmit: H
|
|
204
206
|
}, void 0, !0),
|
|
205
|
-
e.footer ? (
|
|
207
|
+
e.footer ? (s(), o("div", {
|
|
206
208
|
key: 4,
|
|
207
209
|
class: h([
|
|
208
210
|
"form-footer flex items-center justify-end gap-3",
|
|
@@ -210,7 +212,7 @@ const ne = {
|
|
|
210
212
|
$.value ? "sticky bottom-0 z-20 bg-body pt-4 border-t border-border/75 -mx-4 px-4 mt-8" : "mt-6"
|
|
211
213
|
])
|
|
212
214
|
}, [
|
|
213
|
-
G.value ? (
|
|
215
|
+
G.value ? (s(), p(A, {
|
|
214
216
|
key: 0,
|
|
215
217
|
type: "button",
|
|
216
218
|
variant: "outline",
|
|
@@ -218,7 +220,7 @@ const ne = {
|
|
|
218
220
|
disabled: e.loading || t(N),
|
|
219
221
|
onClick: O
|
|
220
222
|
}, null, 8, ["text", "disabled"])) : c("", !0),
|
|
221
|
-
r.value && R.value ? (
|
|
223
|
+
r.value && R.value ? (s(), p(A, {
|
|
222
224
|
key: 1,
|
|
223
225
|
type: "button",
|
|
224
226
|
variant: "outline",
|
|
@@ -226,14 +228,14 @@ const ne = {
|
|
|
226
228
|
text: "Previous",
|
|
227
229
|
onClick: J
|
|
228
230
|
})) : c("", !0),
|
|
229
|
-
r.value && !B.value ? (
|
|
231
|
+
r.value && !B.value ? (s(), p(A, {
|
|
230
232
|
key: 2,
|
|
231
233
|
type: "button",
|
|
232
234
|
variant: "primary",
|
|
233
235
|
text: "Next",
|
|
234
236
|
iconRight: "lucide:arrow-right",
|
|
235
237
|
onClick: T
|
|
236
|
-
})) : (
|
|
238
|
+
})) : (s(), p(A, ie({
|
|
237
239
|
key: 3,
|
|
238
240
|
type: "submit",
|
|
239
241
|
variant: "primary",
|
|
@@ -1,142 +1,149 @@
|
|
|
1
1
|
import { ref as v, computed as K, watch as L } from "vue";
|
|
2
|
-
import { initializeFormValues as
|
|
3
|
-
import { useFileUpload as
|
|
4
|
-
function
|
|
5
|
-
const { schema:
|
|
2
|
+
import { initializeFormValues as B, deepClone as m, cleanSubmitValues as Q, getNestedValue as M, evaluateConditional as w, setNestedValue as x, collectFileFields as W, filterNullCustomFields as X } from "../utils/form.utils.js";
|
|
3
|
+
import { useFileUpload as Y } from "./useFileUpload.js";
|
|
4
|
+
function te(b) {
|
|
5
|
+
const { schema: o, values: U, isUpdate: F = !1, folderId: g, onSubmit: j } = b, { handleUploadFile: E } = Y(), t = v(B(o, U)), u = v({}), h = v(!1), d = v(!1), V = v(m(t.value)), y = K(() => o ? Array.isArray(o[0]) ? o.flat() : o : []);
|
|
6
6
|
L(
|
|
7
|
-
() =>
|
|
7
|
+
() => U,
|
|
8
8
|
(e) => {
|
|
9
|
-
e && (t.value =
|
|
9
|
+
e && (t.value = B(o, e), V.value = m(t.value), d.value = !1);
|
|
10
10
|
},
|
|
11
11
|
{ deep: !0 }
|
|
12
12
|
);
|
|
13
|
-
const
|
|
13
|
+
const S = () => ({
|
|
14
14
|
values: t.value,
|
|
15
15
|
isUpdate: F
|
|
16
|
-
}),
|
|
17
|
-
l ?
|
|
16
|
+
}), C = (e) => M(t.value, e), T = (e) => u.value[e] || "", N = (e, l) => {
|
|
17
|
+
l ? u.value[e] = l : delete u.value[e];
|
|
18
18
|
}, A = () => {
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
const l =
|
|
22
|
-
let
|
|
23
|
-
if (e.required && (l == null || l === "" || Array.isArray(l) && l.length === 0) && (
|
|
19
|
+
u.value = {};
|
|
20
|
+
}, O = (e) => e.when ? w(e.when, S()) : !0, D = (e) => w(e.disabled, S()), I = (e) => w(e.readonly, S()), P = (e) => {
|
|
21
|
+
const l = C(e.name);
|
|
22
|
+
let s = "";
|
|
23
|
+
if (e.required && (l == null || l === "" || Array.isArray(l) && l.length === 0) && (s = `${e.label || e.name} is required`), !s && e.maxFileSize) {
|
|
24
24
|
const i = e.maxFileSize * 1024 * 1024;
|
|
25
25
|
if (l != null && l !== "") {
|
|
26
26
|
const n = Array.isArray(l) ? l : [l];
|
|
27
|
-
for (const
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
|
|
27
|
+
for (const a of n) {
|
|
28
|
+
const c = a instanceof File ? a.size : a?.fileSize || a?.file?.size || a?.size;
|
|
29
|
+
if (c !== void 0 && c > i) {
|
|
30
|
+
s = `${e.label || e.name} size must be less than ${e.maxFileSize}MB`;
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
if (!
|
|
36
|
+
if (!s && (e.type === "file" || e.type === "fileUploader") && (e.props?.multiple || e.maxFiles)) {
|
|
37
37
|
const i = e.maxFiles || e.props?.maxFiles;
|
|
38
|
-
i && Array.isArray(l) && l.length > i && (
|
|
38
|
+
i && Array.isArray(l) && l.length > i && (s = `Maximum ${i} files allowed`);
|
|
39
39
|
}
|
|
40
|
-
return !
|
|
40
|
+
return !s && e.validation && (s = e.validation({
|
|
41
41
|
value: l,
|
|
42
42
|
values: t.value,
|
|
43
43
|
isUpdate: F
|
|
44
|
-
})),
|
|
45
|
-
},
|
|
44
|
+
})), s ? u.value[e.name] = s : delete u.value[e.name], s;
|
|
45
|
+
}, $ = () => {
|
|
46
46
|
A();
|
|
47
47
|
let e = !0;
|
|
48
48
|
for (const l of y.value) {
|
|
49
|
-
if (!
|
|
50
|
-
|
|
49
|
+
if (!O(l) || D(l)) continue;
|
|
50
|
+
P(l) && (e = !1);
|
|
51
51
|
}
|
|
52
52
|
return e;
|
|
53
|
-
}, R = (e, l,
|
|
54
|
-
t.value =
|
|
53
|
+
}, R = (e, l, s) => {
|
|
54
|
+
t.value = x(t.value, e, l), d.value = !0, delete u.value[e];
|
|
55
55
|
const i = y.value.find((n) => n.name === e);
|
|
56
56
|
if (i?.updateValues) {
|
|
57
57
|
const n = i.updateValues({
|
|
58
58
|
values: t.value,
|
|
59
|
-
data:
|
|
59
|
+
data: s,
|
|
60
60
|
isUpdate: F,
|
|
61
|
-
updateError:
|
|
61
|
+
updateError: N
|
|
62
62
|
});
|
|
63
63
|
n && typeof n == "object" && (t.value = { ...t.value, ...n });
|
|
64
64
|
}
|
|
65
65
|
}, G = async () => {
|
|
66
|
-
const e = m(t.value), l =
|
|
66
|
+
const e = m(t.value), l = W(o, e), s = (a, c) => {
|
|
67
67
|
let r = null;
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
return a instanceof File ? r = a : a && typeof a == "object" && a.file instanceof File && (r = a.file), {
|
|
69
|
+
// Spread original item to keep any metadata like __typename
|
|
70
|
+
...typeof a == "object" && a !== null && !(a instanceof File) ? a : {},
|
|
71
|
+
fileName: a?.fileName || r?.name || c.split("/").pop() || "unknown",
|
|
72
|
+
fileUrl: c,
|
|
73
|
+
fileType: a?.fileType || r?.type || "application/octet-stream",
|
|
74
|
+
fileSize: a?.fileSize || r?.size || 0
|
|
73
75
|
};
|
|
74
|
-
}, i = l.map(async (
|
|
75
|
-
const { name:
|
|
76
|
+
}, i = l.map(async (a) => {
|
|
77
|
+
const { name: c, value: r, field: J } = a, k = J.returnFileObject === !0;
|
|
76
78
|
if (Array.isArray(r)) {
|
|
77
|
-
const
|
|
79
|
+
const q = r.map(async (f) => {
|
|
78
80
|
if (f instanceof File || f && typeof f == "object" && f.file instanceof File) {
|
|
79
|
-
const
|
|
80
|
-
return
|
|
81
|
+
const z = await E(f, g);
|
|
82
|
+
return z ? k ? s(f, z) : z : null;
|
|
81
83
|
}
|
|
82
84
|
return f;
|
|
83
|
-
}), p = await Promise.all(
|
|
84
|
-
return { name:
|
|
85
|
+
}), p = await Promise.all(q);
|
|
86
|
+
return { name: c, value: p };
|
|
85
87
|
} else {
|
|
86
88
|
if (r instanceof File || r && typeof r == "object" && r.file instanceof File) {
|
|
87
|
-
const p = await
|
|
89
|
+
const p = await E(r, g);
|
|
88
90
|
if (p)
|
|
89
|
-
return { name:
|
|
91
|
+
return { name: c, value: k ? s(r, p) : p };
|
|
90
92
|
}
|
|
91
93
|
return null;
|
|
92
94
|
}
|
|
93
95
|
});
|
|
94
|
-
return (await Promise.all(i)).forEach((
|
|
95
|
-
|
|
96
|
+
return (await Promise.all(i)).forEach((a) => {
|
|
97
|
+
a && Object.assign(e, x(e, a.name, a.value));
|
|
96
98
|
}), e;
|
|
97
99
|
}, H = (e) => {
|
|
98
100
|
const l = { ...e };
|
|
99
|
-
for (const
|
|
100
|
-
if (
|
|
101
|
-
const i =
|
|
101
|
+
for (const s of y.value)
|
|
102
|
+
if (s.type === "customFields" && s.props?.schema) {
|
|
103
|
+
const i = M(l, s.name);
|
|
102
104
|
if (Array.isArray(i)) {
|
|
103
|
-
const n =
|
|
104
|
-
Object.assign(l,
|
|
105
|
+
const n = X(i, s.props.schema);
|
|
106
|
+
Object.assign(l, x(l, s.name, n));
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
return l;
|
|
108
110
|
};
|
|
109
111
|
return {
|
|
110
112
|
formValues: t,
|
|
111
|
-
errors:
|
|
112
|
-
isSubmitting:
|
|
113
|
+
errors: u,
|
|
114
|
+
isSubmitting: h,
|
|
113
115
|
isDirty: d,
|
|
114
116
|
handleFieldChange: R,
|
|
115
|
-
validateField:
|
|
116
|
-
validateAll:
|
|
117
|
-
isFieldVisible:
|
|
118
|
-
isFieldDisabled:
|
|
117
|
+
validateField: P,
|
|
118
|
+
validateAll: $,
|
|
119
|
+
isFieldVisible: O,
|
|
120
|
+
isFieldDisabled: D,
|
|
119
121
|
isFieldReadonly: I,
|
|
120
|
-
getFieldValue:
|
|
122
|
+
getFieldValue: C,
|
|
121
123
|
getFieldError: T,
|
|
122
|
-
setFieldError:
|
|
124
|
+
setFieldError: N,
|
|
123
125
|
clearErrors: A,
|
|
124
126
|
resetForm: () => {
|
|
125
|
-
t.value = m(
|
|
127
|
+
t.value = m(V.value), A(), d.value = !1;
|
|
126
128
|
},
|
|
127
129
|
handleSubmit: async () => {
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
+
if ($()) {
|
|
131
|
+
h.value = !0;
|
|
130
132
|
try {
|
|
131
133
|
let l = await G();
|
|
132
|
-
l = H(l),
|
|
134
|
+
l = H(l), l = Q(
|
|
135
|
+
l,
|
|
136
|
+
o,
|
|
137
|
+
b.emitFields,
|
|
138
|
+
b.emitFields
|
|
139
|
+
), j && await j({
|
|
133
140
|
values: l,
|
|
134
141
|
isUpdate: F
|
|
135
|
-
}), d.value = !1,
|
|
142
|
+
}), d.value = !1, V.value = m(l);
|
|
136
143
|
} catch (l) {
|
|
137
144
|
throw console.error("[useForm] Submit error:", l), l;
|
|
138
145
|
} finally {
|
|
139
|
-
|
|
146
|
+
h.value = !1;
|
|
140
147
|
}
|
|
141
148
|
}
|
|
142
149
|
},
|
|
@@ -144,5 +151,5 @@ function se(M) {
|
|
|
144
151
|
};
|
|
145
152
|
}
|
|
146
153
|
export {
|
|
147
|
-
|
|
154
|
+
te as useForm
|
|
148
155
|
};
|
|
@@ -71,6 +71,18 @@ export interface IFormCustomFieldsProps {
|
|
|
71
71
|
export interface IForm {
|
|
72
72
|
/** Field name - supports dot notation for nested paths (e.g., 'pricing.baseAmount') */
|
|
73
73
|
name: string;
|
|
74
|
+
/** Read initial value from a different key in the incoming data (defaults to name) */
|
|
75
|
+
mapFrom?: string;
|
|
76
|
+
/** Write submit value to a different key in the payload (defaults to name) */
|
|
77
|
+
mapTo?: string;
|
|
78
|
+
/** Key to extract from object or array of objects. Useful for mapping arrays of objects to simple values. */
|
|
79
|
+
valueKey?: string;
|
|
80
|
+
/** Alias for valueKey */
|
|
81
|
+
key?: string;
|
|
82
|
+
/** Format raw value before passing to form state */
|
|
83
|
+
format?: (value: any, rawValues: Record<string, any>) => any;
|
|
84
|
+
/** Transform form value before submitting */
|
|
85
|
+
transform?: (value: any, formValues: Record<string, any>) => any;
|
|
74
86
|
/** Field label - can be string or Vue component */
|
|
75
87
|
label?: string | Component;
|
|
76
88
|
/** Placeholder text */
|
|
@@ -175,6 +187,8 @@ export interface IFormProps {
|
|
|
175
187
|
headerClass?: string;
|
|
176
188
|
/** Custom class for the footer area */
|
|
177
189
|
footerClass?: string;
|
|
190
|
+
/** Fields to explicitly include in the submit payload (e.g., ['__typename', 'id']) */
|
|
191
|
+
emitFields?: string[];
|
|
178
192
|
}
|
|
179
193
|
/**
|
|
180
194
|
* Form submit payload
|
|
@@ -47,3 +47,9 @@ export declare function getFieldKey(name: string): string;
|
|
|
47
47
|
* Check if a value is a Vue component
|
|
48
48
|
*/
|
|
49
49
|
export declare function isComponent(value: any): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Cleans the submit payload by extracting only schema fields,
|
|
52
|
+
* injecting specified emitFields, and removing ignoreFields recursively.
|
|
53
|
+
* Also processes mapped output and transformation functions.
|
|
54
|
+
*/
|
|
55
|
+
export declare function cleanSubmitValues(values: Record<string, any>, schema: IForm[] | IForm[][], emitFields?: string[], ignoreFields?: string[]): Record<string, any>;
|
|
@@ -1,108 +1,174 @@
|
|
|
1
|
-
function
|
|
1
|
+
function k(e) {
|
|
2
2
|
return !!e && typeof e == "object";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function p(e, n) {
|
|
5
5
|
if (!n || !e) return;
|
|
6
|
-
const
|
|
7
|
-
let
|
|
8
|
-
for (const
|
|
9
|
-
if (
|
|
10
|
-
|
|
6
|
+
const r = n.split(".");
|
|
7
|
+
let l = e;
|
|
8
|
+
for (const t of r) {
|
|
9
|
+
if (l == null) return;
|
|
10
|
+
l = l[t];
|
|
11
11
|
}
|
|
12
|
-
return
|
|
12
|
+
return l;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function m(e, n, r) {
|
|
15
15
|
if (!n) return e;
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
for (let
|
|
19
|
-
const
|
|
20
|
-
Array.isArray(
|
|
16
|
+
const l = n.split("."), t = { ...e };
|
|
17
|
+
let o = t;
|
|
18
|
+
for (let i = 0; i < l.length - 1; i++) {
|
|
19
|
+
const c = l[i];
|
|
20
|
+
Array.isArray(o[c]) ? o[c] = [...o[c]] : o[c] = o[c] ? { ...o[c] } : {}, o = o[c];
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return o[l[l.length - 1]] = r, t;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return !
|
|
24
|
+
function v(e, n) {
|
|
25
|
+
return !k(n) || !n.name ? e : p(e, n.name) === void 0 && n.value !== void 0 ? m(e, n.name, n.value) : e;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
let
|
|
29
|
-
const
|
|
30
|
-
for (const
|
|
31
|
-
if (!
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
function E(e, n) {
|
|
28
|
+
let r = n ? d(n) : {};
|
|
29
|
+
const l = Array.isArray(e[0]) ? e.flat() : e;
|
|
30
|
+
for (const t of l) {
|
|
31
|
+
if (!t.name) continue;
|
|
32
|
+
const o = t.mapFrom || t.name;
|
|
33
|
+
let i = n ? p(n, o) : void 0;
|
|
34
|
+
if (i != null) {
|
|
35
|
+
const c = t.valueKey || t.key;
|
|
36
|
+
c && (Array.isArray(i) ? i = i.map(
|
|
37
|
+
(y) => y && typeof y == "object" ? p(y, c) : y
|
|
38
|
+
) : typeof i == "object" && (i = p(i, c))), t.format && (i = t.format(i, n || {}));
|
|
35
39
|
}
|
|
36
|
-
|
|
40
|
+
if (i === void 0) {
|
|
41
|
+
if (t.mapFrom && n) {
|
|
42
|
+
const c = p(n, t.name);
|
|
43
|
+
c !== void 0 && (i = c);
|
|
44
|
+
}
|
|
45
|
+
if (i === void 0) {
|
|
46
|
+
const c = typeof t.value == "function" ? t.value() : t.value;
|
|
47
|
+
c !== void 0 && Object.assign(r, m(r, t.name, c));
|
|
48
|
+
} else
|
|
49
|
+
Object.assign(r, m(r, t.name, i));
|
|
50
|
+
} else
|
|
51
|
+
Object.assign(r, m(r, t.name, i));
|
|
52
|
+
r = v(r, t.addonLeft), r = v(r, t.addonRight);
|
|
37
53
|
}
|
|
38
|
-
return
|
|
54
|
+
return r;
|
|
39
55
|
}
|
|
40
|
-
function
|
|
56
|
+
function O(e, n) {
|
|
41
57
|
return e === void 0 ? !1 : typeof e == "boolean" ? e : typeof e == "function" ? e(n) : !1;
|
|
42
58
|
}
|
|
43
|
-
function
|
|
44
|
-
return Array.isArray(e) ? e.filter((
|
|
45
|
-
const
|
|
46
|
-
return
|
|
59
|
+
function S(e, n) {
|
|
60
|
+
return Array.isArray(e) ? e.filter((r) => r ? !n.every((t) => {
|
|
61
|
+
const o = r[t.name];
|
|
62
|
+
return o == null || o === "";
|
|
47
63
|
}) : !1) : [];
|
|
48
64
|
}
|
|
49
65
|
function F(e, n) {
|
|
50
|
-
const
|
|
51
|
-
for (const
|
|
52
|
-
if (!
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
name:
|
|
58
|
-
value:
|
|
59
|
-
type:
|
|
60
|
-
field:
|
|
66
|
+
const r = [], l = Array.isArray(e[0]) ? e.flat() : e;
|
|
67
|
+
for (const t of l) {
|
|
68
|
+
if (!t.name) continue;
|
|
69
|
+
const o = t.type;
|
|
70
|
+
if (o === "file" || o === "avatarUpload" || o === "fileUploader") {
|
|
71
|
+
const i = p(n, t.name);
|
|
72
|
+
i && r.push({
|
|
73
|
+
name: t.name,
|
|
74
|
+
value: i,
|
|
75
|
+
type: o,
|
|
76
|
+
field: t
|
|
61
77
|
});
|
|
62
78
|
}
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
if (Array.isArray(
|
|
66
|
-
const y =
|
|
67
|
-
(
|
|
79
|
+
if (o === "customFields" && t.props?.schema) {
|
|
80
|
+
const i = p(n, t.name);
|
|
81
|
+
if (Array.isArray(i)) {
|
|
82
|
+
const y = t.props.schema.filter(
|
|
83
|
+
(s) => s.type === "file" || s.type === "avatarUpload" || s.type === "fileUploader"
|
|
68
84
|
);
|
|
69
|
-
y.length > 0 &&
|
|
70
|
-
y.forEach((
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
name: `${
|
|
74
|
-
value:
|
|
75
|
-
type:
|
|
76
|
-
field:
|
|
85
|
+
y.length > 0 && i.forEach((s, f) => {
|
|
86
|
+
y.forEach((a) => {
|
|
87
|
+
const u = s?.[a.name];
|
|
88
|
+
u && r.push({
|
|
89
|
+
name: `${t.name}.${f}.${a.name}`,
|
|
90
|
+
value: u,
|
|
91
|
+
type: a.type,
|
|
92
|
+
field: a
|
|
77
93
|
});
|
|
78
94
|
});
|
|
79
95
|
});
|
|
80
96
|
}
|
|
81
97
|
}
|
|
82
98
|
}
|
|
83
|
-
return
|
|
99
|
+
return r;
|
|
84
100
|
}
|
|
85
|
-
function
|
|
101
|
+
function d(e) {
|
|
86
102
|
if (e === null || typeof e != "object") return e;
|
|
87
103
|
if (e instanceof Date) return new Date(e.getTime());
|
|
88
104
|
if (e instanceof File) return e;
|
|
89
|
-
if (Array.isArray(e)) return e.map((
|
|
105
|
+
if (Array.isArray(e)) return e.map((r) => d(r));
|
|
90
106
|
const n = {};
|
|
91
|
-
for (const
|
|
92
|
-
Object.prototype.hasOwnProperty.call(e,
|
|
107
|
+
for (const r in e)
|
|
108
|
+
Object.prototype.hasOwnProperty.call(e, r) && (n[r] = d(e[r]));
|
|
93
109
|
return n;
|
|
94
110
|
}
|
|
95
|
-
function
|
|
111
|
+
function x(e) {
|
|
96
112
|
return e ? typeof e == "object" && (typeof e.render == "function" || typeof e.setup == "function" || e.__name !== void 0 || e.name !== void 0) : !1;
|
|
97
113
|
}
|
|
114
|
+
function g(e, n, r, l) {
|
|
115
|
+
const t = r === void 0 && l === void 0, o = t ? d(e) : {}, i = Array.isArray(n[0]) ? n.flat() : n, c = r || [], y = l || [];
|
|
116
|
+
for (const s of i) {
|
|
117
|
+
if (!s.name) continue;
|
|
118
|
+
let f = p(e, s.name);
|
|
119
|
+
if (f === void 0) continue;
|
|
120
|
+
if (s.type === "customFields" && s.props?.schema && Array.isArray(f)) {
|
|
121
|
+
const A = s.props.schema;
|
|
122
|
+
f = f.map((h) => g(h, A, r, l));
|
|
123
|
+
}
|
|
124
|
+
let a = !1;
|
|
125
|
+
s.transform && (f = s.transform(f, e), a = !0);
|
|
126
|
+
const u = s.mapTo || s.name;
|
|
127
|
+
u !== s.name && (a = !0, t && !s.name.includes(".") && delete o[s.name]), !t || a ? Object.assign(o, m(o, u, f)) : Object.assign(o, m(o, s.name, f));
|
|
128
|
+
}
|
|
129
|
+
if (c.length > 0) {
|
|
130
|
+
const s = (f, a) => {
|
|
131
|
+
if (!(!f || typeof f != "object") && !(!a || typeof a != "object"))
|
|
132
|
+
if (Array.isArray(f) && Array.isArray(a))
|
|
133
|
+
f.forEach((u, A) => {
|
|
134
|
+
a[A] && s(u, a[A]);
|
|
135
|
+
});
|
|
136
|
+
else {
|
|
137
|
+
for (const u of c)
|
|
138
|
+
f[u] !== void 0 && a[u] === void 0 && (a[u] = d(f[u]));
|
|
139
|
+
for (const u in a)
|
|
140
|
+
typeof a[u] == "object" && a[u] !== null && typeof f[u] == "object" && f[u] !== null && s(f[u], a[u]);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
for (const f of c)
|
|
144
|
+
e[f] !== void 0 && o[f] === void 0 && (o[f] = d(e[f]));
|
|
145
|
+
s(e, o);
|
|
146
|
+
}
|
|
147
|
+
if (y.length > 0) {
|
|
148
|
+
const s = (f) => {
|
|
149
|
+
if (!(!f || typeof f != "object"))
|
|
150
|
+
if (Array.isArray(f))
|
|
151
|
+
f.forEach(s);
|
|
152
|
+
else {
|
|
153
|
+
for (const a of y)
|
|
154
|
+
delete f[a];
|
|
155
|
+
for (const a in f)
|
|
156
|
+
s(f[a]);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
s(o);
|
|
160
|
+
}
|
|
161
|
+
return o;
|
|
162
|
+
}
|
|
98
163
|
export {
|
|
164
|
+
g as cleanSubmitValues,
|
|
99
165
|
F as collectFileFields,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
166
|
+
d as deepClone,
|
|
167
|
+
O as evaluateConditional,
|
|
168
|
+
S as filterNullCustomFields,
|
|
169
|
+
p as getNestedValue,
|
|
170
|
+
E as initializeFormValues,
|
|
171
|
+
k as isAddonObject,
|
|
172
|
+
x as isComponent,
|
|
173
|
+
m as setNestedValue
|
|
108
174
|
};
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -713,5 +713,5 @@ textarea::-webkit-scrollbar-thumb {
|
|
|
713
713
|
}
|
|
714
714
|
|
|
715
715
|
/* --- Vite Generated CSS --- */
|
|
716
|
-
.accordion-enter-active[data-v-aa189e08],.accordion-leave-active[data-v-aa189e08]{transition:height .3s ease-in-out}.button-group[data-v-ba735fac] button{align-self:stretch;height:auto!important;min-height:unset!important;min-width:unset!important;width:auto!important}.button-group[data-v-ba735fac]:not(.vertical-group) button{aspect-ratio:unset}.attached-group[data-v-ba735fac] button{position:relative;--radius: .375rem}.attached-group[data-v-ba735fac] button:focus-visible,.attached-group[data-v-ba735fac] button:hover{z-index:10}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child){margin-left:-1px}.attached-group[data-v-ba735fac]:not(.vertical-group) button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius);border-top-right-radius:0;border-bottom-right-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child):not(:last-child){border-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-bottom-left-radius:0}.vertical-group[data-v-ba735fac] button:not(:first-child){margin-top:-1px}.vertical-group[data-v-ba735fac] button:first-child{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.vertical-group[data-v-ba735fac] button:not(:first-child):not(:last-child){border-radius:0}.vertical-group[data-v-ba735fac] button:last-child{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-top-right-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child):not(.border):before{content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none;height:100%}.vertical-group[data-v-ba735fac] button:not(:first-child):not(.border):before{content:"";position:absolute;top:0;left:0;right:0;height:1px;width:100%;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none}.carousel-wrapper[data-v-655a78c8]{width:100%;position:relative}.IroBox{border-radius:8px!important}input[data-v-e7171c4f]::-webkit-outer-spin-button,input[data-v-e7171c4f]::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}input[type=number][data-v-e7171c4f]{-moz-appearance:textfield;appearance:textfield}.custom-fields-table[data-v-ce6a94e8] .form-field-item{margin-bottom:0!important;height:100%}.custom-fields-table[data-v-ce6a94e8] input,.custom-fields-table[data-v-ce6a94e8] textarea{padding-left:1em;padding-right:.5em}.custom-fields-table[data-v-ce6a94e8] input,.custom-fields-table[data-v-ce6a94e8] textarea,.custom-fields-table[data-v-ce6a94e8] select,.custom-fields-table[data-v-ce6a94e8] .input-wrapper,.custom-fields-table[data-v-ce6a94e8] .tooltip-trigger button{border:none!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;height:100%!important;min-height:40px}.custom-fields-table[data-v-ce6a94e8] .tooltip-trigger button{justify-content:space-between!important}.custom-fields-table[data-v-ce6a94e8] input:focus,.custom-fields-table[data-v-ce6a94e8] textarea:focus,.custom-fields-table[data-v-ce6a94e8] select:focus,.custom-fields-table[data-v-ce6a94e8] .input-wrapper:focus-within{background-color:hsla(var(--primary) / .03)!important;box-shadow:inset 0 0 0 2px hsla(var(--primary) / .1)!important}.custom-fields-table[data-v-ce6a94e8] .w-full{width:100%;height:100%}.list-enter-active[data-v-ce6a94e8]{transition:all .15s cubic-bezier(.16,1,.3,1)}.list-enter-from[data-v-ce6a94e8]{opacity:0;transform:translateY(-5px)}.form-field-item[data-v-47af145c]{display:flex;flex-direction:column}.form-field-item[data-v-47af145c]:has([role=switch]),.form-field-item[data-v-47af145c]:has([role=checkbox]){flex-direction:row;align-items:center}.form-container[data-v-
|
|
716
|
+
.accordion-enter-active[data-v-aa189e08],.accordion-leave-active[data-v-aa189e08]{transition:height .3s ease-in-out}.button-group[data-v-ba735fac] button{align-self:stretch;height:auto!important;min-height:unset!important;min-width:unset!important;width:auto!important}.button-group[data-v-ba735fac]:not(.vertical-group) button{aspect-ratio:unset}.attached-group[data-v-ba735fac] button{position:relative;--radius: .375rem}.attached-group[data-v-ba735fac] button:focus-visible,.attached-group[data-v-ba735fac] button:hover{z-index:10}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child){margin-left:-1px}.attached-group[data-v-ba735fac]:not(.vertical-group) button:first-child{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius);border-top-right-radius:0;border-bottom-right-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child):not(:last-child){border-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:last-child{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-bottom-left-radius:0}.vertical-group[data-v-ba735fac] button:not(:first-child){margin-top:-1px}.vertical-group[data-v-ba735fac] button:first-child{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.vertical-group[data-v-ba735fac] button:not(:first-child):not(:last-child){border-radius:0}.vertical-group[data-v-ba735fac] button:last-child{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius);border-top-left-radius:0;border-top-right-radius:0}.attached-group[data-v-ba735fac]:not(.vertical-group) button:not(:first-child):not(.border):before{content:"";position:absolute;left:0;top:0;bottom:0;width:1px;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none;height:100%}.vertical-group[data-v-ba735fac] button:not(:first-child):not(.border):before{content:"";position:absolute;top:0;left:0;right:0;height:1px;width:100%;background-color:currentColor;opacity:.15;z-index:5;pointer-events:none}.carousel-wrapper[data-v-655a78c8]{width:100%;position:relative}.IroBox{border-radius:8px!important}input[data-v-e7171c4f]::-webkit-outer-spin-button,input[data-v-e7171c4f]::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}input[type=number][data-v-e7171c4f]{-moz-appearance:textfield;appearance:textfield}.custom-fields-table[data-v-ce6a94e8] .form-field-item{margin-bottom:0!important;height:100%}.custom-fields-table[data-v-ce6a94e8] input,.custom-fields-table[data-v-ce6a94e8] textarea{padding-left:1em;padding-right:.5em}.custom-fields-table[data-v-ce6a94e8] input,.custom-fields-table[data-v-ce6a94e8] textarea,.custom-fields-table[data-v-ce6a94e8] select,.custom-fields-table[data-v-ce6a94e8] .input-wrapper,.custom-fields-table[data-v-ce6a94e8] .tooltip-trigger button{border:none!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;height:100%!important;min-height:40px}.custom-fields-table[data-v-ce6a94e8] .tooltip-trigger button{justify-content:space-between!important}.custom-fields-table[data-v-ce6a94e8] input:focus,.custom-fields-table[data-v-ce6a94e8] textarea:focus,.custom-fields-table[data-v-ce6a94e8] select:focus,.custom-fields-table[data-v-ce6a94e8] .input-wrapper:focus-within{background-color:hsla(var(--primary) / .03)!important;box-shadow:inset 0 0 0 2px hsla(var(--primary) / .1)!important}.custom-fields-table[data-v-ce6a94e8] .w-full{width:100%;height:100%}.list-enter-active[data-v-ce6a94e8]{transition:all .15s cubic-bezier(.16,1,.3,1)}.list-enter-from[data-v-ce6a94e8]{opacity:0;transform:translateY(-5px)}.form-field-item[data-v-47af145c]{display:flex;flex-direction:column}.form-field-item[data-v-47af145c]:has([role=switch]),.form-field-item[data-v-47af145c]:has([role=checkbox]){flex-direction:row;align-items:center}.form-container[data-v-a67bf34e]{width:100%}.heatmap-container[data-v-00476f00]{width:100%;height:100%;display:flex;flex-direction:column;min-height:0}.heatmap-wrapper[data-v-00476f00]{width:100%;height:100%;overflow:auto;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;position:relative}.heatmap-grid[data-v-00476f00]{width:fit-content;height:fit-content;transition:all .2s ease-in-out}.heatmap-cell[data-v-00476f00]{aspect-ratio:1 / 1;border-radius:2px;transition:all .15s ease-in-out;border:1px solid transparent;box-sizing:border-box}.heatmap-cell-interactive[data-v-00476f00]{cursor:pointer}.heatmap-cell-interactive[data-v-00476f00]:hover{transform:scale(1.1);border-color:var(--border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;z-index:10;position:relative}.heatmap-cell-empty[data-v-00476f00]{opacity:.6}.heatmap-cell-hovered[data-v-00476f00]{outline:2px solid var(--primary);outline-offset:1px}.heatmap-cell-label[data-v-00476f00]{font-size:8px;font-weight:500;color:var(--foreground);opacity:.8;display:flex;align-items:center;justify-content:center;height:100%;width:100%;pointer-events:none}.heatmap-legend[data-v-00476f00]{display:flex;align-items:center;gap:.5rem;margin-top:1rem;font-size:.75rem;color:var(--muted-foreground);flex-shrink:0}.heatmap-legend-label[data-v-00476f00]{font-weight:500}.heatmap-legend-colors[data-v-00476f00]{display:flex;gap:.125rem}.heatmap-legend-item[data-v-00476f00]{width:.75rem;height:.75rem;border-radius:.375rem;border:1px solid var(--border)}@media(max-width:640px){.heatmap-wrapper[data-v-00476f00]{padding:12px}.heatmap-cell[data-v-00476f00]{border-radius:2px}.heatmap-cell-label[data-v-00476f00]{font-size:7px}}@media(min-width:641px)and (max-width:1023px){.heatmap-wrapper[data-v-00476f00]{padding:14px}.heatmap-cell[data-v-00476f00]{border-radius:2px}}@media(min-width:1024px){.heatmap-wrapper[data-v-00476f00]{padding:16px}.heatmap-cell[data-v-00476f00]{border-radius:3px}}.custom-scrollbar[data-v-9ac38977]::-webkit-scrollbar{width:0px}.custom-scrollbar[data-v-9ac38977]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-9ac38977]::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:10px}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar{height:8px}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar-x[data-v-11bc76c9]::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:10px}.masonry-item[data-v-c29d0159]{content-visibility:auto;contain-intrinsic-size:1px 200px}.slide-right-enter-active[data-v-495f8aa0],.slide-right-leave-active[data-v-495f8aa0],.slide-left-enter-active[data-v-495f8aa0],.slide-left-leave-active[data-v-495f8aa0]{transition:transform .3s ease-in-out}.slide-right-enter-from[data-v-495f8aa0],.slide-right-leave-to[data-v-495f8aa0]{transform:translate(100%)}.slide-left-enter-from[data-v-495f8aa0],.slide-left-leave-to[data-v-495f8aa0]{transform:translate(-100%)}.sidebar-manu-item .tooltip-trigger{width:100%!important}.sidebar-menu-tooltip{margin-left:4px!important}[dir=rtl] .sidebar-menu-tooltip{margin-right:4px!important}.first-toast-enter-active[data-v-6b631840]{animation:first-toast-in-6b631840 .45s cubic-bezier(.23,1,.32,1) forwards}.first-toast-leave-active[data-v-6b631840]{transition:all .25s ease-in}.first-toast-leave-to[data-v-6b631840]{opacity:0;transform:scale(.98)}@keyframes first-toast-in-6b631840{0%{opacity:var(--entrance-opacity, .6);transform:translateY(var(--entrance-offset, 25px)) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.stack-toast-enter-active[data-v-6b631840],.stack-toast-leave-active[data-v-6b631840]{transition:all .3s cubic-bezier(.16,1,.3,1)}.stack-toast-enter-from[data-v-6b631840]{opacity:0;transform:scale(.95) translateY(10px)}.stack-toast-leave-to[data-v-6b631840]{opacity:0;transform:scale(.95)}.stack-toast-move[data-v-6b631840]{transition:transform .4s cubic-bezier(.16,1,.3,1)}.bg-stripe[data-v-454a1505]{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.animate-progress-stripe[data-v-454a1505]{animation:progress-stripe-454a1505 1s linear infinite}@keyframes progress-stripe-454a1505{0%{background-position:1rem 0}to{background-position:0 0}}.animate-progress-indeterminate[data-v-454a1505]{animation:progress-indeterminate-454a1505 1.5s infinite cubic-bezier(.65,.815,.735,.395)}@keyframes progress-indeterminate-454a1505{0%{transform:translate(-100%) scaleX(.2)}50%{transform:translate(0) scaleX(.5)}to{transform:translate(100%) scaleX(.2)}}
|
|
717
717
|
|