vlite3 1.4.20 → 1.4.22
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/CategoryManager/CategoryManager.vue2.js +2 -2
- package/components/Form/AccordionView.vue.js +80 -77
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +164 -162
- package/components/Form/FormField.vue.js +93 -95
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +21 -18
- package/components/Form/composables/useForm.js +150 -150
- package/components/Form/index.vue.js +1 -1
- package/components/Form/index.vue2.js +43 -39
- package/components/Input.vue.js +3 -3
- package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
- package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
- package/components/Screen/ScreenFilter.vue.js +2 -2
- package/components/Textarea.vue.js +14 -14
- package/index.js +389 -388
- package/package.json +1 -1
- package/style.css +1 -1
- package/utils/i18n.d.ts +10 -4
- package/utils/i18n.js +14 -3
- /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover.vue2.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue.js → RichTextToolbar.vue2.js} +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as E, computed as
|
|
2
|
-
import { resolveFieldType as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as E, computed as f, markRaw as O, openBlock as c, createBlock as m, mergeProps as p, toHandlers as C, createSlots as M, unref as P, withCtx as u, createVNode as L, createTextVNode as x, toDisplayString as y, createCommentVNode as N, resolveDynamicComponent as q } from "vue";
|
|
2
|
+
import { resolveFieldType as G, isComponent as k, isAddonObject as T } from "./utils/form.utils.js";
|
|
3
|
+
import J from "../NumberInput.vue.js";
|
|
4
4
|
import z from "../Button.vue.js";
|
|
5
|
-
import {
|
|
5
|
+
import { resolveI18nText as K } from "../../utils/i18n.js";
|
|
6
6
|
import V from "../Input.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
8
|
+
import Q from "../Switch.vue.js";
|
|
9
|
+
import W from "../CheckBox.vue.js";
|
|
10
|
+
import X from "../FilePicker/index.vue.js";
|
|
11
|
+
import Y from "../AvatarUploader/AvatarUploader.vue.js";
|
|
12
|
+
import Z from "../ThumbnailSelector/ThumbnailSelector.vue.js";
|
|
13
|
+
import _ from "../TagInput/TagInput.vue.js";
|
|
14
|
+
import R from "../Dropdown/Dropdown.vue.js";
|
|
15
|
+
import ee from "../MultiSelect/MultiSelect.vue.js";
|
|
16
|
+
import ae from "../DatePicker.vue.js";
|
|
17
|
+
import le from "../DateRangePicker.vue.js";
|
|
18
|
+
import ie from "../ColorPicker/ColorPicker.vue.js";
|
|
19
|
+
import te from "../IconPicker.vue.js";
|
|
20
|
+
import re from "./index.vue.js";
|
|
21
|
+
import ne from "../ChoiceBox/ChoiceBox.vue.js";
|
|
22
|
+
import de from "../RichTextEditor/RichTextEditor.vue.js";
|
|
23
23
|
/* empty css */
|
|
24
|
-
const
|
|
24
|
+
const Ne = /* @__PURE__ */ E({
|
|
25
25
|
__name: "FormField",
|
|
26
26
|
props: {
|
|
27
27
|
field: {},
|
|
@@ -40,21 +40,21 @@ const Be = /* @__PURE__ */ E({
|
|
|
40
40
|
loading: { type: Boolean, default: !1 }
|
|
41
41
|
},
|
|
42
42
|
emits: ["change", "addonChange", "addonAction"],
|
|
43
|
-
setup(i, { emit:
|
|
44
|
-
const e = i, v =
|
|
43
|
+
setup(i, { emit: B }) {
|
|
44
|
+
const e = i, v = B, d = (a, l) => {
|
|
45
45
|
v("change", { value: a, data: l });
|
|
46
46
|
}, S = (a) => {
|
|
47
47
|
v("change", { value: a });
|
|
48
|
-
},
|
|
48
|
+
}, o = f(() => G(e.field, {
|
|
49
49
|
values: e.values,
|
|
50
50
|
globalValues: e.values,
|
|
51
51
|
isUpdate: e.isUpdate
|
|
52
|
-
})),
|
|
53
|
-
() =>
|
|
54
|
-
), U =
|
|
55
|
-
const a =
|
|
56
|
-
if (
|
|
57
|
-
return
|
|
52
|
+
})), b = f(
|
|
53
|
+
() => o.value === "number" && e.field.isSensitiveField === !0
|
|
54
|
+
), U = f(() => {
|
|
55
|
+
const a = o.value;
|
|
56
|
+
if (k(a))
|
|
57
|
+
return O(a);
|
|
58
58
|
switch (a) {
|
|
59
59
|
case "text":
|
|
60
60
|
case "email":
|
|
@@ -65,57 +65,61 @@ const Be = /* @__PURE__ */ E({
|
|
|
65
65
|
case "textarea":
|
|
66
66
|
return V;
|
|
67
67
|
case "number":
|
|
68
|
-
return
|
|
68
|
+
return b.value ? V : J;
|
|
69
69
|
case "switch":
|
|
70
|
-
return
|
|
70
|
+
return Q;
|
|
71
71
|
case "check":
|
|
72
|
-
return
|
|
72
|
+
return W;
|
|
73
73
|
case "select":
|
|
74
|
-
return
|
|
74
|
+
return R;
|
|
75
75
|
case "multiSelect":
|
|
76
|
-
return
|
|
76
|
+
return ee;
|
|
77
77
|
case "choiceBox":
|
|
78
|
-
return
|
|
78
|
+
return ne;
|
|
79
79
|
case "date":
|
|
80
80
|
case "time":
|
|
81
|
-
return
|
|
81
|
+
return ae;
|
|
82
82
|
case "dateRangePicker":
|
|
83
|
-
return
|
|
83
|
+
return le;
|
|
84
84
|
case "file":
|
|
85
85
|
case "fileUploader":
|
|
86
|
-
return
|
|
86
|
+
return X;
|
|
87
87
|
case "avatarUpload":
|
|
88
|
-
return
|
|
88
|
+
return Y;
|
|
89
89
|
case "color":
|
|
90
|
-
return
|
|
90
|
+
return ie;
|
|
91
91
|
case "iconPicker":
|
|
92
|
-
return
|
|
92
|
+
return te;
|
|
93
93
|
case "customFields":
|
|
94
|
-
return
|
|
94
|
+
return re;
|
|
95
95
|
case "thumbnailSelector":
|
|
96
|
-
return
|
|
96
|
+
return Z;
|
|
97
97
|
case "tags":
|
|
98
|
-
return
|
|
98
|
+
return _;
|
|
99
99
|
case "richTextEditor":
|
|
100
|
-
return
|
|
100
|
+
return de;
|
|
101
101
|
default:
|
|
102
102
|
return V;
|
|
103
103
|
}
|
|
104
|
-
}),
|
|
105
|
-
const a =
|
|
104
|
+
}), w = f(() => {
|
|
105
|
+
const a = o.value, { disabled: l, readonly: r, ...g } = e.field, t = {
|
|
106
106
|
...g,
|
|
107
107
|
disabled: e.disabled || l === !0,
|
|
108
108
|
readonly: e.readonly || r === !0,
|
|
109
109
|
...e.field.props || {},
|
|
110
110
|
label: "",
|
|
111
|
-
labelI18n:
|
|
112
|
-
|
|
111
|
+
labelI18n: void 0,
|
|
112
|
+
placeholderI18n: void 0
|
|
113
|
+
}, h = K(
|
|
114
|
+
e.field.placeholderI18n,
|
|
115
|
+
e.field.placeholder
|
|
116
|
+
), I = e.variant === "floating" && e.label && !e.floatingActive, s = I ? "" : h;
|
|
113
117
|
if (a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || a === "textarea" || !a)
|
|
114
118
|
return {
|
|
115
119
|
...t,
|
|
116
120
|
modelValue: e.value ?? "",
|
|
117
121
|
type: a || "text",
|
|
118
|
-
placeholder:
|
|
122
|
+
placeholder: s,
|
|
119
123
|
label: e.label,
|
|
120
124
|
icon: e.field.icon,
|
|
121
125
|
iconRight: e.field.iconRight,
|
|
@@ -131,14 +135,14 @@ const Be = /* @__PURE__ */ E({
|
|
|
131
135
|
rows: a === "textarea" ? e.field.props?.rows || 3 : void 0,
|
|
132
136
|
class: `${e.field.className || ""}`
|
|
133
137
|
};
|
|
134
|
-
if (a === "number" &&
|
|
138
|
+
if (a === "number" && b.value)
|
|
135
139
|
return {
|
|
136
140
|
...t,
|
|
137
141
|
// Convert numeric value to string so Input.vue (string-based) displays it correctly
|
|
138
142
|
modelValue: e.value !== void 0 && e.value !== null ? String(e.value) : "",
|
|
139
143
|
// 'password' activates the eye-toggle inside Input.vue
|
|
140
144
|
type: "password",
|
|
141
|
-
placeholder:
|
|
145
|
+
placeholder: s,
|
|
142
146
|
label: e.label,
|
|
143
147
|
variant: e.variant,
|
|
144
148
|
size: e.size,
|
|
@@ -159,15 +163,15 @@ const Be = /* @__PURE__ */ E({
|
|
|
159
163
|
mode: e.field.props?.mode ?? (e.variant === "transparent" ? "ghost" : "outline"),
|
|
160
164
|
size: e.size,
|
|
161
165
|
rounded: e.rounded,
|
|
162
|
-
placeholder:
|
|
166
|
+
placeholder: s,
|
|
163
167
|
class: e.field.className
|
|
164
168
|
};
|
|
165
169
|
if (a === "switch") {
|
|
166
170
|
const {
|
|
167
171
|
variant: n,
|
|
168
|
-
rounded:
|
|
169
|
-
error:
|
|
170
|
-
switchVariant:
|
|
172
|
+
rounded: oe,
|
|
173
|
+
error: se,
|
|
174
|
+
switchVariant: ue,
|
|
171
175
|
...D
|
|
172
176
|
} = t;
|
|
173
177
|
return {
|
|
@@ -194,7 +198,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
194
198
|
...t,
|
|
195
199
|
modelValue: e.value,
|
|
196
200
|
options: e.field.options || [],
|
|
197
|
-
placeholder:
|
|
201
|
+
placeholder: s,
|
|
198
202
|
selectable: !0,
|
|
199
203
|
closeOnSelect: !0,
|
|
200
204
|
triggerProps: {
|
|
@@ -243,7 +247,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
243
247
|
...t,
|
|
244
248
|
modelValue: e.value,
|
|
245
249
|
mode: a === "time" ? "time" : "date",
|
|
246
|
-
placeholder:
|
|
250
|
+
placeholder: s,
|
|
247
251
|
btnProps: {
|
|
248
252
|
variant: e.variant === "floating" ? "outline-floating" : e.variant || "outline",
|
|
249
253
|
size: e.size,
|
|
@@ -267,7 +271,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
267
271
|
fileTypes: e.field.props?.accept ? e.field.props.accept.split(",") : [],
|
|
268
272
|
returnFormat: "base64",
|
|
269
273
|
variant: e.field.props?.variant ?? (a === "file" ? "input" : "dropzone"),
|
|
270
|
-
placeholder:
|
|
274
|
+
placeholder: s,
|
|
271
275
|
size: e.size,
|
|
272
276
|
rounded: e.rounded,
|
|
273
277
|
maxSize: e.field.maxFileSize ? e.field.maxFileSize * 1024 * 1024 : void 0,
|
|
@@ -287,7 +291,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
287
291
|
return {
|
|
288
292
|
...t,
|
|
289
293
|
modelValue: Array.isArray(e.value) ? e.value : [],
|
|
290
|
-
placeholder:
|
|
294
|
+
placeholder: s,
|
|
291
295
|
variant: e.variant,
|
|
292
296
|
size: e.size,
|
|
293
297
|
rounded: e.rounded,
|
|
@@ -298,7 +302,7 @@ const Be = /* @__PURE__ */ E({
|
|
|
298
302
|
return {
|
|
299
303
|
...t,
|
|
300
304
|
modelValue: e.value ?? "",
|
|
301
|
-
placeholder:
|
|
305
|
+
placeholder: s,
|
|
302
306
|
label: void 0,
|
|
303
307
|
error: e.error,
|
|
304
308
|
minHeight: e.field.props?.minHeight || "140px",
|
|
@@ -348,16 +352,16 @@ const Be = /* @__PURE__ */ E({
|
|
|
348
352
|
label: e.field.label
|
|
349
353
|
};
|
|
350
354
|
}
|
|
351
|
-
return
|
|
355
|
+
return k(a) ? {
|
|
352
356
|
...t,
|
|
353
357
|
value: e.field.props?.multiple && (e.value === null || e.value === void 0) ? [] : e.value,
|
|
354
358
|
values: e.values
|
|
355
359
|
} : t;
|
|
356
|
-
}),
|
|
357
|
-
const a =
|
|
360
|
+
}), A = f(() => {
|
|
361
|
+
const a = o.value;
|
|
358
362
|
return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || a === "textarea" || a === "switch" || a === "check" || !a ? {
|
|
359
363
|
"update:modelValue": S
|
|
360
|
-
} : a === "number" &&
|
|
364
|
+
} : a === "number" && b.value ? {
|
|
361
365
|
"update:modelValue": (l) => {
|
|
362
366
|
const r = l === "" ? void 0 : Number(l);
|
|
363
367
|
v("change", { value: isNaN(r) ? void 0 : r });
|
|
@@ -417,27 +421,24 @@ const Be = /* @__PURE__ */ E({
|
|
|
417
421
|
const r = e.value && typeof e.value == "object" ? e.value : { images: [], thumbnail: null };
|
|
418
422
|
d({ ...r, thumbnail: l });
|
|
419
423
|
}
|
|
420
|
-
} :
|
|
424
|
+
} : k(a) ? {
|
|
421
425
|
onChange: (l) => {
|
|
422
426
|
d(l.value, l.data);
|
|
423
427
|
}
|
|
424
428
|
} : {};
|
|
425
|
-
}),
|
|
426
|
-
const a =
|
|
429
|
+
}), H = f(() => {
|
|
430
|
+
const a = o.value;
|
|
427
431
|
return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || !a;
|
|
428
|
-
}),
|
|
432
|
+
}), j = f(() => H.value || o.value === "textarea" || b.value), F = (a, l) => {
|
|
429
433
|
v("addonChange", a.name, { value: l.value });
|
|
430
|
-
},
|
|
434
|
+
}, $ = (a) => {
|
|
431
435
|
a.action && v("addonAction", a.action);
|
|
432
436
|
};
|
|
433
|
-
return (a, l) =>
|
|
434
|
-
|
|
435
|
-
...i.field?.props || {}
|
|
436
|
-
}, L($.value)), q({ _: 2 }, [
|
|
437
|
-
P(x)(i.field.addonLeft) ? {
|
|
437
|
+
return (a, l) => j.value ? (c(), m(V, p({ key: 0 }, w.value, C(A.value)), M({ _: 2 }, [
|
|
438
|
+
P(T)(i.field.addonLeft) ? {
|
|
438
439
|
name: "addon-left",
|
|
439
440
|
fn: u(() => [
|
|
440
|
-
i.field.addonLeft.type === "select" ? (c(), m(
|
|
441
|
+
i.field.addonLeft.type === "select" ? (c(), m(R, p({
|
|
441
442
|
key: 0,
|
|
442
443
|
modelValue: i.field.addonLeft.name ? i.values[i.field.addonLeft.name] : void 0,
|
|
443
444
|
options: i.field.addonLeft.options || []
|
|
@@ -445,9 +446,9 @@ const Be = /* @__PURE__ */ E({
|
|
|
445
446
|
onOnSelect: l[0] || (l[0] = (r) => F(i.field.addonLeft, r))
|
|
446
447
|
}), {
|
|
447
448
|
trigger: u(({ selectedLabel: r }) => [
|
|
448
|
-
|
|
449
|
+
L(z, { variant: "outline" }, {
|
|
449
450
|
default: u(() => [
|
|
450
|
-
|
|
451
|
+
x(y(r), 1)
|
|
451
452
|
]),
|
|
452
453
|
_: 2
|
|
453
454
|
}, 1024)
|
|
@@ -457,20 +458,20 @@ const Be = /* @__PURE__ */ E({
|
|
|
457
458
|
key: 1,
|
|
458
459
|
variant: "outline"
|
|
459
460
|
}, i.field.addonLeft.props || {}, {
|
|
460
|
-
onClick: l[1] || (l[1] = (r) =>
|
|
461
|
+
onClick: l[1] || (l[1] = (r) => $(i.field.addonLeft))
|
|
461
462
|
}), {
|
|
462
463
|
default: u(() => [
|
|
463
|
-
|
|
464
|
+
x(y(i.field.addonLeft.text), 1)
|
|
464
465
|
]),
|
|
465
466
|
_: 1
|
|
466
|
-
}, 16)) :
|
|
467
|
+
}, 16)) : N("", !0)
|
|
467
468
|
]),
|
|
468
469
|
key: "0"
|
|
469
470
|
} : void 0,
|
|
470
|
-
P(
|
|
471
|
+
P(T)(i.field.addonRight) ? {
|
|
471
472
|
name: "addon-right",
|
|
472
473
|
fn: u(() => [
|
|
473
|
-
i.field.addonRight.type === "select" ? (c(), m(
|
|
474
|
+
i.field.addonRight.type === "select" ? (c(), m(R, p({
|
|
474
475
|
key: 0,
|
|
475
476
|
modelValue: i.field.addonRight.name ? i.values[i.field.addonRight.name] : void 0,
|
|
476
477
|
options: i.field.addonRight.options || []
|
|
@@ -478,9 +479,9 @@ const Be = /* @__PURE__ */ E({
|
|
|
478
479
|
onOnSelect: l[2] || (l[2] = (r) => F(i.field.addonRight, r))
|
|
479
480
|
}), {
|
|
480
481
|
trigger: u(({ selectedLabel: r }) => [
|
|
481
|
-
|
|
482
|
+
L(z, { variant: "outline" }, {
|
|
482
483
|
default: u(() => [
|
|
483
|
-
|
|
484
|
+
x(y(r), 1)
|
|
484
485
|
]),
|
|
485
486
|
_: 2
|
|
486
487
|
}, 1024)
|
|
@@ -490,25 +491,22 @@ const Be = /* @__PURE__ */ E({
|
|
|
490
491
|
key: 1,
|
|
491
492
|
variant: "outline"
|
|
492
493
|
}, i.field.addonRight.props || {}, {
|
|
493
|
-
onClick: l[3] || (l[3] = (r) =>
|
|
494
|
+
onClick: l[3] || (l[3] = (r) => $(i.field.addonRight))
|
|
494
495
|
}), {
|
|
495
496
|
default: u(() => [
|
|
496
|
-
|
|
497
|
+
x(y(i.field.addonRight.text), 1)
|
|
497
498
|
]),
|
|
498
499
|
_: 1
|
|
499
|
-
}, 16)) :
|
|
500
|
+
}, 16)) : N("", !0)
|
|
500
501
|
]),
|
|
501
502
|
key: "1"
|
|
502
503
|
} : void 0
|
|
503
|
-
]), 1040)) : (c(), m(
|
|
504
|
+
]), 1040)) : (c(), m(q(U.value), p({
|
|
504
505
|
key: 1,
|
|
505
|
-
class:
|
|
506
|
-
},
|
|
507
|
-
...A.value,
|
|
508
|
-
...i.field?.props || {}
|
|
509
|
-
}, L($.value)), null, 16, ["class"]));
|
|
506
|
+
class: o.value === "check" || o.value === "switch" && i.field.props?.switchVariant === "basic" ? "" : "w-full"
|
|
507
|
+
}, w.value, C(A.value)), null, 16, ["class"]));
|
|
510
508
|
}
|
|
511
509
|
});
|
|
512
510
|
export {
|
|
513
|
-
|
|
511
|
+
Ne as default
|
|
514
512
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FormFields.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d4db8f9b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as J, computed as K, ref as Q, openBlock as o, createElementBlock as u, normalizeClass as d, Fragment as
|
|
1
|
+
import { defineComponent as J, computed as K, ref as Q, openBlock as o, createElementBlock as u, normalizeClass as d, Fragment as b, renderList as W, withMemo as X, unref as m, createBlock as p, withCtx as U, resolveDynamicComponent as D, createTextVNode as A, toDisplayString as x, createCommentVNode as c, createElementVNode as Y, createVNode as Z, renderSlot as _, markRaw as ee } from "vue";
|
|
2
2
|
import { isComponent as v, getNestedValue as V, resolveFieldType as te } from "./utils/form.utils.js";
|
|
3
3
|
import B from "../Label.vue.js";
|
|
4
4
|
import ae from "./FormField.vue.js";
|
|
5
|
-
import {
|
|
5
|
+
import { resolveI18nText as ne } from "../../utils/i18n.js";
|
|
6
6
|
const se = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "text-destructive ml-0.5"
|
|
@@ -32,18 +32,21 @@ const se = {
|
|
|
32
32
|
layout: { default: "vertical" }
|
|
33
33
|
},
|
|
34
34
|
emits: ["change", "addonAction"],
|
|
35
|
-
setup(n, { emit:
|
|
36
|
-
const r = n, k =
|
|
35
|
+
setup(n, { emit: q }) {
|
|
36
|
+
const r = n, k = q, E = K(() => {
|
|
37
37
|
if (r.className) return r.className;
|
|
38
38
|
}), s = (t) => te(t, {
|
|
39
39
|
values: r.values,
|
|
40
40
|
globalValues: r.values,
|
|
41
41
|
isUpdate: r.isUpdate
|
|
42
|
-
}),
|
|
42
|
+
}), I = (t) => {
|
|
43
43
|
if (!r.excludeTypes || r.excludeTypes.length === 0) return !0;
|
|
44
44
|
const a = s(t);
|
|
45
45
|
return !a || !r.excludeTypes.includes(a);
|
|
46
|
-
}, F = (t) => V(r.values, t.name), h = (t) => r.errors[t.name] || "",
|
|
46
|
+
}, F = (t) => V(r.values, t.name), h = (t) => r.errors[t.name] || "", $ = (t) => r.isFieldVisible ? r.isFieldVisible(t) : !0, C = (t) => r.isFieldDisabled ? r.isFieldDisabled(t) : t.disabled === !0, N = (t) => r.isFieldReadonly ? r.isFieldReadonly(t) : t.readonly === !0, l = (t) => t.labelI18n ? ne(
|
|
47
|
+
t.labelI18n,
|
|
48
|
+
typeof t.label == "string" ? t.label : void 0
|
|
49
|
+
) ?? t.label : t.label, R = (t) => {
|
|
47
50
|
if (t)
|
|
48
51
|
return v(t) ? ee(t) : t;
|
|
49
52
|
}, S = (t, a) => {
|
|
@@ -60,8 +63,8 @@ const se = {
|
|
|
60
63
|
const a = F(t), e = s(t);
|
|
61
64
|
let i = a != null && a !== "" && !(Array.isArray(a) && a.length === 0);
|
|
62
65
|
const z = typeof a == "number" && !isNaN(a);
|
|
63
|
-
return e === "dateRangePicker" && a && typeof a == "object" && (i = !!(a.startDate || a.endDate || a.start || a.end)),
|
|
64
|
-
},
|
|
66
|
+
return e === "dateRangePicker" && a && typeof a == "object" && (i = !!(a.startDate || a.endDate || a.start || a.end)), T(t) || e === "number" ? y.value[t.name] || i || z : i || z;
|
|
67
|
+
}, T = (t) => {
|
|
65
68
|
const a = s(t) || "text";
|
|
66
69
|
return ["text", "email", "password", "tel", "url", "search", "textarea"].includes(a);
|
|
67
70
|
}, G = (t) => {
|
|
@@ -80,7 +83,7 @@ const se = {
|
|
|
80
83
|
"choiceBox",
|
|
81
84
|
"richTextEditor"
|
|
82
85
|
].includes(a);
|
|
83
|
-
},
|
|
86
|
+
}, f = (t) => {
|
|
84
87
|
const a = l(t);
|
|
85
88
|
if (!(!a || v(a)))
|
|
86
89
|
return a;
|
|
@@ -89,13 +92,13 @@ const se = {
|
|
|
89
92
|
class: d([
|
|
90
93
|
n.layout === "inline" ? "flex flex-row flex-wrap items-end w-full " : "grid",
|
|
91
94
|
n.variant === "floating" ? "gap-5 mt-1" : "gap-4",
|
|
92
|
-
|
|
95
|
+
E.value
|
|
93
96
|
])
|
|
94
97
|
}, [
|
|
95
|
-
(o(!0), u(
|
|
98
|
+
(o(!0), u(b, null, W(n.schema, (e) => (o(), u(b, {
|
|
96
99
|
key: e.name
|
|
97
100
|
}, [
|
|
98
|
-
|
|
101
|
+
$(e) && I(e) ? X([
|
|
99
102
|
e,
|
|
100
103
|
F(e),
|
|
101
104
|
h(e),
|
|
@@ -120,14 +123,14 @@ const se = {
|
|
|
120
123
|
n.layout === "inline" ? " " : ""
|
|
121
124
|
])
|
|
122
125
|
}, [
|
|
123
|
-
l(e) && s(e) !== "switch" && s(e) !== "check" && s(e) !== "customFields" && s(e) !== "choiceBox" && !w(e) ? (o(),
|
|
126
|
+
l(e) && s(e) !== "switch" && s(e) !== "check" && s(e) !== "customFields" && s(e) !== "choiceBox" && !w(e) ? (o(), p(B, {
|
|
124
127
|
key: 0,
|
|
125
128
|
size: "md",
|
|
126
129
|
for: e.name,
|
|
127
130
|
class: "mb-2 block font-medium"
|
|
128
131
|
}, {
|
|
129
132
|
default: U(() => [
|
|
130
|
-
m(v)(l(e)) ? (o(),
|
|
133
|
+
m(v)(l(e)) ? (o(), p(D(R(l(e))), { key: 0 })) : (o(), u(b, { key: 1 }, [
|
|
131
134
|
A(x(l(e)) + " ", 1),
|
|
132
135
|
e.required && n.showRequiredAsterisk ? (o(), u("span", se, "*")) : c("", !0)
|
|
133
136
|
], 64))
|
|
@@ -142,7 +145,7 @@ const se = {
|
|
|
142
145
|
onFocusin: (i) => M(e.name),
|
|
143
146
|
onFocusout: (i) => O(e.name)
|
|
144
147
|
}, [
|
|
145
|
-
w(e) &&
|
|
148
|
+
w(e) && f(e) && !T(e) ? (o(), u("label", {
|
|
146
149
|
key: 0,
|
|
147
150
|
for: e.name,
|
|
148
151
|
class: d([
|
|
@@ -150,7 +153,7 @@ const se = {
|
|
|
150
153
|
L(e) ? "-top-2.5 left-3 text-xs bg-background px-1 text-black shadow-[0_4px_4px_-4px_bg-background]" : `top-1/2 -translate-y-1/2 text-sm text-muted-foreground/70 ${G(e)}`
|
|
151
154
|
])
|
|
152
155
|
}, [
|
|
153
|
-
m(v)(l(e)) ? (o(),
|
|
156
|
+
m(v)(l(e)) ? (o(), p(D(R(l(e))), { key: 0 })) : (o(), u(b, { key: 1 }, [
|
|
154
157
|
A(x(l(e)) + " ", 1),
|
|
155
158
|
e.required ? (o(), u("span", ue, "*")) : c("", !0)
|
|
156
159
|
], 64))
|
|
@@ -164,7 +167,7 @@ const se = {
|
|
|
164
167
|
} : { ...e, props: { ...e.props || {}, id: e.name } },
|
|
165
168
|
value: F(e),
|
|
166
169
|
floatingActive: L(e),
|
|
167
|
-
label: s(e) === "customFields" ? void 0 : w(e) ?
|
|
170
|
+
label: s(e) === "customFields" ? void 0 : w(e) ? f(e) : void 0,
|
|
168
171
|
values: n.values,
|
|
169
172
|
errors: n.errors,
|
|
170
173
|
variant: n.variant,
|
|
@@ -180,7 +183,7 @@ const se = {
|
|
|
180
183
|
onAddonAction: H
|
|
181
184
|
}, null, 8, ["field", "value", "floatingActive", "label", "values", "errors", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading", "onChange"])
|
|
182
185
|
], 42, re),
|
|
183
|
-
s(e) === "check" || s(e) === "switch" && e.props?.switchVariant === "basic" ? (o(),
|
|
186
|
+
s(e) === "check" || s(e) === "switch" && e.props?.switchVariant === "basic" ? (o(), p(B, {
|
|
184
187
|
key: 1,
|
|
185
188
|
for: e.name,
|
|
186
189
|
class: "ml-2 text-sm font-medium cursor-pointer"
|