vlite3 1.1.1 → 1.1.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/AttachmentsList/AttachmentsList.vue.d.ts +2 -17
- package/components/AttachmentsList/AttachmentsList.vue.js +273 -175
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.d.ts +1 -1
- package/components/Button.vue.js +30 -28
- package/components/Calendar/Calendar.vue.d.ts +6 -6
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +12 -3
- package/components/CategoryManager/CategoryManager.vue.js +204 -145
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/CategoryManager/types.d.ts +14 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/Chip/Chip.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTable.vue.js +44 -44
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +5 -2
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +3 -1
- package/components/Dropdown/DropdownTrigger.vue.js +10 -6
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/FilePicker/FilePicker.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +230 -238
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/FormField.vue.js +204 -148
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.d.ts +3 -3
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.d.ts +1 -4
- package/components/Invoice/Invoice.vue.js +22 -13
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant1.vue.js +304 -271
- package/components/Invoice/InvoiceVariant2.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant2.vue.js +168 -181
- package/components/Invoice/InvoiceVariant3.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant3.vue.js +215 -182
- package/components/Invoice/InvoiceVariant4.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant4.vue.js +281 -238
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +26 -0
- package/components/List/List.vue.d.ts +1 -9
- package/components/List/List.vue.js +166 -165
- package/components/List/ListFieldRow.vue.d.ts +2 -2
- package/components/List/ListFieldRow.vue.js +50 -50
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.vue.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +2 -2
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/Stats/types.d.ts +1 -0
- package/components/StatusChip/status-map.js +27 -7
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +112 -0
- package/core/index.js +17 -5
- package/index.d.ts +2 -0
- package/index.js +279 -271
- package/package.json +1 -1
- package/style.css +617 -2
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/types/styles.d.ts +1 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- package/utils/functions.js +9 -9
- package/utils/index.d.ts +1 -0
|
@@ -30,10 +30,10 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
30
30
|
variant: InputVariant;
|
|
31
31
|
size: InputSize;
|
|
32
32
|
rounded: InputRounded;
|
|
33
|
+
loading: boolean;
|
|
33
34
|
readonly: boolean;
|
|
34
35
|
error: string;
|
|
35
36
|
disabled: boolean;
|
|
36
|
-
loading: boolean;
|
|
37
37
|
isUpdate: boolean;
|
|
38
38
|
floatingActive: boolean;
|
|
39
39
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { resolveFieldType as J, isComponent as
|
|
1
|
+
import { defineComponent as H, computed as o, markRaw as M, openBlock as c, createBlock as m, mergeProps as p, toHandlers as L, createSlots as q, unref as P, withCtx as s, createVNode as N, createTextVNode as b, toDisplayString as y, createCommentVNode as B, resolveDynamicComponent as G } from "vue";
|
|
2
|
+
import { resolveFieldType as J, isComponent as R, isAddonObject as x } from "./utils/form.utils.js";
|
|
3
3
|
import K from "../NumberInput.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import { $t as
|
|
6
|
-
import
|
|
4
|
+
import z from "../Button.vue.js";
|
|
5
|
+
import { $t as Q } from "../../utils/i18n.js";
|
|
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 te from "../
|
|
19
|
-
import
|
|
20
|
-
|
|
8
|
+
import W from "../Switch.vue.js";
|
|
9
|
+
import X from "../CheckBox.vue.js";
|
|
10
|
+
import Y from "../FilePicker/FilePicker.vue.js";
|
|
11
|
+
import Z from "../AvatarUploader/AvatarUploader.vue.js";
|
|
12
|
+
import _ from "../ThumbnailSelector/ThumbnailSelector.vue.js";
|
|
13
|
+
import ee from "../TagInput/TagInput.vue.js";
|
|
14
|
+
import w from "../Dropdown/Dropdown.vue.js";
|
|
15
|
+
import ae from "../MultiSelect/MultiSelect.vue.js";
|
|
16
|
+
import le from "../DatePicker.vue.js";
|
|
17
|
+
import ie from "../DateRangePicker.vue.js";
|
|
18
|
+
import te from "../ColorPicker/ColorPicker.vue.js";
|
|
19
|
+
import ne from "../IconPicker.vue.js";
|
|
20
|
+
import re from "./CustomFields.vue.js";
|
|
21
|
+
import de from "../ChoiceBox/ChoiceBox.vue.js";
|
|
22
|
+
const Pe = /* @__PURE__ */ H({
|
|
21
23
|
__name: "FormField",
|
|
22
24
|
props: {
|
|
23
25
|
field: {},
|
|
@@ -36,21 +38,21 @@ const ke = /* @__PURE__ */ E({
|
|
|
36
38
|
loading: { type: Boolean, default: !1 }
|
|
37
39
|
},
|
|
38
40
|
emits: ["change", "addonChange", "addonAction"],
|
|
39
|
-
setup(
|
|
40
|
-
const e =
|
|
41
|
+
setup(i, { emit: U }) {
|
|
42
|
+
const e = i, v = U, d = (a, l) => {
|
|
41
43
|
v("change", { value: a, data: l });
|
|
42
|
-
},
|
|
44
|
+
}, S = (a) => {
|
|
43
45
|
v("change", { value: a });
|
|
44
|
-
}, u =
|
|
46
|
+
}, u = o(() => J(e.field, {
|
|
45
47
|
values: e.values,
|
|
46
48
|
globalValues: e.values,
|
|
47
49
|
isUpdate: e.isUpdate
|
|
48
|
-
})),
|
|
50
|
+
})), k = o(
|
|
49
51
|
() => u.value === "number" && e.field.isSensitiveField === !0
|
|
50
|
-
),
|
|
52
|
+
), T = o(() => {
|
|
51
53
|
const a = u.value;
|
|
52
|
-
if (
|
|
53
|
-
return
|
|
54
|
+
if (R(a))
|
|
55
|
+
return M(a);
|
|
54
56
|
switch (a) {
|
|
55
57
|
case "text":
|
|
56
58
|
case "email":
|
|
@@ -59,53 +61,57 @@ const ke = /* @__PURE__ */ E({
|
|
|
59
61
|
case "url":
|
|
60
62
|
case "search":
|
|
61
63
|
case "textarea":
|
|
62
|
-
return
|
|
64
|
+
return V;
|
|
63
65
|
case "number":
|
|
64
|
-
return
|
|
66
|
+
return k.value ? V : K;
|
|
65
67
|
case "switch":
|
|
66
|
-
return Q;
|
|
67
|
-
case "check":
|
|
68
68
|
return W;
|
|
69
|
+
case "check":
|
|
70
|
+
return X;
|
|
69
71
|
case "select":
|
|
70
|
-
return
|
|
72
|
+
return w;
|
|
71
73
|
case "multiSelect":
|
|
72
|
-
return
|
|
74
|
+
return ae;
|
|
75
|
+
case "choiceBox":
|
|
76
|
+
return de;
|
|
73
77
|
case "date":
|
|
74
78
|
case "time":
|
|
75
|
-
return
|
|
79
|
+
return le;
|
|
76
80
|
case "dateRangePicker":
|
|
77
|
-
return
|
|
81
|
+
return ie;
|
|
78
82
|
case "file":
|
|
79
83
|
case "fileUploader":
|
|
80
|
-
return X;
|
|
81
|
-
case "avatarUpload":
|
|
82
84
|
return Y;
|
|
85
|
+
case "avatarUpload":
|
|
86
|
+
return Z;
|
|
83
87
|
case "color":
|
|
84
|
-
return le;
|
|
85
|
-
case "iconPicker":
|
|
86
88
|
return te;
|
|
89
|
+
case "iconPicker":
|
|
90
|
+
return ne;
|
|
87
91
|
case "customFields":
|
|
88
|
-
return
|
|
92
|
+
return re;
|
|
89
93
|
case "thumbnailSelector":
|
|
90
|
-
return
|
|
94
|
+
return _;
|
|
95
|
+
case "tags":
|
|
96
|
+
return ee;
|
|
91
97
|
default:
|
|
92
|
-
return
|
|
98
|
+
return V;
|
|
93
99
|
}
|
|
94
|
-
}),
|
|
95
|
-
const a = u.value, { disabled: l, readonly:
|
|
96
|
-
...
|
|
100
|
+
}), A = o(() => {
|
|
101
|
+
const a = u.value, { disabled: l, readonly: n, ...g } = e.field, t = {
|
|
102
|
+
...g,
|
|
97
103
|
disabled: e.disabled || l === !0,
|
|
98
|
-
readonly: e.readonly ||
|
|
104
|
+
readonly: e.readonly || n === !0,
|
|
99
105
|
...e.field.props || {},
|
|
100
106
|
label: "",
|
|
101
107
|
labelI18n: ""
|
|
102
|
-
},
|
|
108
|
+
}, h = e.field.placeholderI18n ? Q(e.field.placeholderI18n) : e.field.placeholder, I = e.variant === "floating" && e.label && !e.floatingActive, f = I ? "" : h;
|
|
103
109
|
if (a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || a === "textarea" || !a)
|
|
104
110
|
return {
|
|
105
|
-
...
|
|
111
|
+
...t,
|
|
106
112
|
modelValue: e.value ?? "",
|
|
107
113
|
type: a || "text",
|
|
108
|
-
placeholder:
|
|
114
|
+
placeholder: f,
|
|
109
115
|
label: e.label,
|
|
110
116
|
icon: e.field.icon,
|
|
111
117
|
iconRight: e.field.iconRight,
|
|
@@ -121,14 +127,14 @@ const ke = /* @__PURE__ */ E({
|
|
|
121
127
|
rows: a === "textarea" ? e.field.props?.rows || 3 : void 0,
|
|
122
128
|
class: `${e.field.className || ""}`
|
|
123
129
|
};
|
|
124
|
-
if (a === "number" &&
|
|
130
|
+
if (a === "number" && k.value)
|
|
125
131
|
return {
|
|
126
|
-
...
|
|
132
|
+
...t,
|
|
127
133
|
// Convert numeric value to string so Input.vue (string-based) displays it correctly
|
|
128
134
|
modelValue: e.value !== void 0 && e.value !== null ? String(e.value) : "",
|
|
129
135
|
// 'password' activates the eye-toggle inside Input.vue
|
|
130
136
|
type: "password",
|
|
131
|
-
placeholder:
|
|
137
|
+
placeholder: f,
|
|
132
138
|
label: e.label,
|
|
133
139
|
variant: e.variant,
|
|
134
140
|
size: e.size,
|
|
@@ -140,7 +146,7 @@ const ke = /* @__PURE__ */ E({
|
|
|
140
146
|
};
|
|
141
147
|
if (a === "number")
|
|
142
148
|
return {
|
|
143
|
-
...
|
|
149
|
+
...t,
|
|
144
150
|
modelValue: e.value ?? void 0,
|
|
145
151
|
min: e.field.min,
|
|
146
152
|
max: e.field.max,
|
|
@@ -149,78 +155,108 @@ const ke = /* @__PURE__ */ E({
|
|
|
149
155
|
mode: e.field.props?.mode ?? (e.variant === "transparent" ? "ghost" : "outline"),
|
|
150
156
|
size: e.size,
|
|
151
157
|
rounded: e.rounded,
|
|
152
|
-
placeholder:
|
|
158
|
+
placeholder: f,
|
|
153
159
|
class: e.field.className
|
|
154
160
|
};
|
|
155
|
-
if (a === "switch")
|
|
161
|
+
if (a === "switch") {
|
|
162
|
+
const { variant: r, size: oe, rounded: se, error: ue, switchVariant: fe, ...E } = t;
|
|
156
163
|
return {
|
|
157
|
-
...
|
|
164
|
+
...E,
|
|
158
165
|
modelValue: !!e.value,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
166
|
+
label: e.field.label,
|
|
167
|
+
labelI18n: e.field.labelI18n,
|
|
168
|
+
description: e.field.props?.description,
|
|
169
|
+
descriptionI18n: e.field.props?.descriptionI18n,
|
|
170
|
+
// Default to 'card' inside forms unless explicitly overridden via field.props.switchVariant
|
|
171
|
+
variant: e.field.props?.switchVariant ?? "card"
|
|
162
172
|
};
|
|
173
|
+
}
|
|
163
174
|
if (a === "check")
|
|
164
175
|
return {
|
|
165
|
-
...
|
|
176
|
+
...t,
|
|
166
177
|
modelValue: !!e.value,
|
|
167
178
|
label: ""
|
|
168
179
|
// Label handled externally
|
|
169
180
|
};
|
|
170
181
|
if (a === "select")
|
|
171
182
|
return {
|
|
172
|
-
...
|
|
183
|
+
...t,
|
|
173
184
|
modelValue: e.value,
|
|
174
185
|
options: e.field.options || [],
|
|
175
|
-
placeholder:
|
|
186
|
+
placeholder: f,
|
|
176
187
|
selectable: !0,
|
|
177
188
|
closeOnSelect: !0,
|
|
178
189
|
triggerProps: {
|
|
179
190
|
variant: e.variant === "floating" ? "outline-floating" : e.variant || "outline",
|
|
180
191
|
size: e.size,
|
|
181
|
-
...
|
|
192
|
+
...I ? { text: "" } : {}
|
|
182
193
|
}
|
|
183
194
|
};
|
|
184
195
|
if (a === "multiSelect")
|
|
185
196
|
return {
|
|
186
|
-
...
|
|
197
|
+
...t,
|
|
187
198
|
modelValue: Array.isArray(e.value) ? e.value : [],
|
|
188
199
|
options: e.field.options || [],
|
|
189
|
-
placeholder:
|
|
200
|
+
placeholder: h,
|
|
190
201
|
variant: e.variant,
|
|
191
202
|
size: e.size,
|
|
192
203
|
rounded: e.rounded
|
|
193
204
|
};
|
|
205
|
+
if (a === "choiceBox")
|
|
206
|
+
return {
|
|
207
|
+
...t,
|
|
208
|
+
modelValue: e.value,
|
|
209
|
+
title: e.label,
|
|
210
|
+
titleI18n: e.field.labelI18n,
|
|
211
|
+
description: e.field.props?.description,
|
|
212
|
+
descriptionI18n: e.field.props?.descriptionI18n,
|
|
213
|
+
options: (e.field.options || []).map((r) => ({
|
|
214
|
+
id: r.value ?? r.label,
|
|
215
|
+
title: r.label,
|
|
216
|
+
titleI18n: r.labelI18n,
|
|
217
|
+
description: r.description || r.subtitle,
|
|
218
|
+
descriptionI18n: r.descriptionI18n || r.subtitleI18n,
|
|
219
|
+
icon: r.icon,
|
|
220
|
+
disabled: r.disabled,
|
|
221
|
+
badge: r.badge || r.data?.badge,
|
|
222
|
+
badgeI18n: r.badgeI18n || r.data?.badgeI18n,
|
|
223
|
+
data: r.data
|
|
224
|
+
})),
|
|
225
|
+
multiple: e.field.props?.multiple || !1,
|
|
226
|
+
grid: e.field.props?.grid || 1,
|
|
227
|
+
gap: e.field.props?.gap || 4,
|
|
228
|
+
class: e.field.className
|
|
229
|
+
};
|
|
194
230
|
if (a === "date" || a === "time")
|
|
195
231
|
return {
|
|
196
|
-
...
|
|
232
|
+
...t,
|
|
197
233
|
modelValue: e.value,
|
|
198
234
|
mode: a === "time" ? "time" : "date",
|
|
199
|
-
placeholder:
|
|
235
|
+
placeholder: f,
|
|
200
236
|
btnProps: {
|
|
201
237
|
variant: e.variant === "floating" ? "outline-floating" : e.variant || "outline",
|
|
202
238
|
size: e.size,
|
|
203
239
|
class: "px-3!",
|
|
204
|
-
...
|
|
240
|
+
...I ? { text: "" } : {}
|
|
205
241
|
}
|
|
206
242
|
};
|
|
207
243
|
if (a === "dateRangePicker")
|
|
208
244
|
return {
|
|
209
|
-
...
|
|
245
|
+
...t,
|
|
210
246
|
modelValue: e.value,
|
|
211
247
|
variant: e.variant === "floating" ? "outline-floating" : e.variant || "outline",
|
|
212
248
|
size: e.size
|
|
213
249
|
};
|
|
214
250
|
if (a === "fileUploader" || a === "file")
|
|
215
251
|
return {
|
|
216
|
-
...
|
|
252
|
+
...t,
|
|
217
253
|
modelValue: e.value,
|
|
218
254
|
multiSelect: e.field.props?.multiple || !1,
|
|
219
255
|
maxFiles: e.field.maxFiles || e.field.props?.maxFiles,
|
|
220
256
|
fileTypes: e.field.props?.accept ? e.field.props.accept.split(",") : [],
|
|
221
257
|
returnFormat: "base64",
|
|
222
258
|
variant: a === "file" ? "input" : "dropzone",
|
|
223
|
-
placeholder:
|
|
259
|
+
placeholder: f,
|
|
224
260
|
size: e.size,
|
|
225
261
|
rounded: e.rounded,
|
|
226
262
|
maxSize: e.field.maxFileSize ? e.field.maxFileSize * 1024 * 1024 : void 0,
|
|
@@ -230,25 +266,36 @@ const ke = /* @__PURE__ */ E({
|
|
|
230
266
|
if (a === "avatarUpload")
|
|
231
267
|
return {
|
|
232
268
|
size: "2xl",
|
|
233
|
-
...
|
|
269
|
+
...t,
|
|
234
270
|
modelValue: e.value,
|
|
235
271
|
editable: !e.readonly,
|
|
236
272
|
maxSize: e.field.maxFileSize ? e.field.maxFileSize * 1024 * 1024 : void 0,
|
|
237
273
|
loading: e.loading
|
|
238
274
|
};
|
|
275
|
+
if (a === "tags")
|
|
276
|
+
return {
|
|
277
|
+
...t,
|
|
278
|
+
modelValue: Array.isArray(e.value) ? e.value : [],
|
|
279
|
+
placeholder: f,
|
|
280
|
+
variant: e.variant,
|
|
281
|
+
size: e.size,
|
|
282
|
+
rounded: e.rounded,
|
|
283
|
+
maxTags: e.field.props?.maxTags,
|
|
284
|
+
class: e.field.className
|
|
285
|
+
};
|
|
239
286
|
if (a === "color")
|
|
240
287
|
return {
|
|
241
|
-
...
|
|
288
|
+
...t,
|
|
242
289
|
modelValue: e.value || "#000000"
|
|
243
290
|
};
|
|
244
291
|
if (a === "iconPicker")
|
|
245
292
|
return {
|
|
246
|
-
...
|
|
293
|
+
...t,
|
|
247
294
|
value: e.value || "lucide:smile"
|
|
248
295
|
};
|
|
249
296
|
if (a === "customFields")
|
|
250
297
|
return {
|
|
251
|
-
...
|
|
298
|
+
...t,
|
|
252
299
|
name: e.field.name,
|
|
253
300
|
label: e?.field?.label,
|
|
254
301
|
labelI18n: e?.field?.labelI18n,
|
|
@@ -264,165 +311,174 @@ const ke = /* @__PURE__ */ E({
|
|
|
264
311
|
isUpdate: e.isUpdate
|
|
265
312
|
};
|
|
266
313
|
if (a === "thumbnailSelector") {
|
|
267
|
-
const
|
|
314
|
+
const r = e.value && typeof e.value == "object" ? e.value : { images: [], thumbnail: null };
|
|
268
315
|
return {
|
|
269
|
-
...
|
|
270
|
-
images: Array.isArray(
|
|
271
|
-
thumbnail:
|
|
316
|
+
...t,
|
|
317
|
+
images: Array.isArray(r.images) ? r.images : [],
|
|
318
|
+
thumbnail: r.thumbnail ?? null,
|
|
272
319
|
disabled: e.disabled || l === !0,
|
|
273
320
|
loading: e.loading,
|
|
274
321
|
maxSize: e.field.maxFileSize,
|
|
275
322
|
label: e.field.label
|
|
276
323
|
};
|
|
277
324
|
}
|
|
278
|
-
return
|
|
279
|
-
...
|
|
325
|
+
return R(a) ? {
|
|
326
|
+
...t,
|
|
280
327
|
value: e.value,
|
|
281
328
|
values: e.values
|
|
282
|
-
} :
|
|
283
|
-
}), F =
|
|
329
|
+
} : t;
|
|
330
|
+
}), F = o(() => {
|
|
284
331
|
const a = u.value;
|
|
285
332
|
return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || a === "textarea" || a === "switch" || a === "check" || !a ? {
|
|
286
|
-
"update:modelValue":
|
|
287
|
-
} : a === "number" &&
|
|
333
|
+
"update:modelValue": S
|
|
334
|
+
} : a === "number" && k.value ? {
|
|
288
335
|
"update:modelValue": (l) => {
|
|
289
|
-
const
|
|
290
|
-
v("change", { value: isNaN(
|
|
336
|
+
const n = l === "" ? void 0 : Number(l);
|
|
337
|
+
v("change", { value: isNaN(n) ? void 0 : n });
|
|
291
338
|
}
|
|
292
339
|
} : a === "number" ? {
|
|
293
|
-
"update:modelValue":
|
|
340
|
+
"update:modelValue": S
|
|
294
341
|
} : a === "select" ? {
|
|
295
342
|
onSelect: (l) => {
|
|
296
|
-
|
|
343
|
+
d(l.value, l.data);
|
|
297
344
|
}
|
|
298
345
|
} : a === "multiSelect" ? {
|
|
299
|
-
change: (l) =>
|
|
346
|
+
change: (l) => d(l)
|
|
347
|
+
} : a === "choiceBox" ? {
|
|
348
|
+
change: (l) => {
|
|
349
|
+
const n = e.field.props?.multiple;
|
|
350
|
+
let g = null;
|
|
351
|
+
n && Array.isArray(l) ? g = l.map((t) => e.field.options?.find((h) => (h.value ?? h.label) === t)?.data) : g = e.field.options?.find((t) => (t.value ?? t.label) === l)?.data, d(l, g);
|
|
352
|
+
}
|
|
300
353
|
} : a === "date" || a === "time" || a === "dateRangePicker" ? {
|
|
301
|
-
change: (l) =>
|
|
354
|
+
change: (l) => d(l)
|
|
302
355
|
} : a === "fileUploader" || a === "file" ? {
|
|
303
356
|
change: (l) => {
|
|
304
|
-
|
|
357
|
+
d(l);
|
|
305
358
|
},
|
|
306
359
|
"update:modelValue": (l) => {
|
|
307
|
-
|
|
360
|
+
d(l);
|
|
308
361
|
}
|
|
309
362
|
} : a === "avatarUpload" ? {
|
|
310
363
|
change: (l) => {
|
|
311
|
-
|
|
364
|
+
d(l);
|
|
312
365
|
},
|
|
313
366
|
"update:modelValue": (l) => {
|
|
314
|
-
|
|
367
|
+
d(l);
|
|
315
368
|
}
|
|
369
|
+
} : a === "tags" ? {
|
|
370
|
+
"update:modelValue": S,
|
|
371
|
+
change: (l) => d(l)
|
|
316
372
|
} : a === "color" ? {
|
|
317
|
-
change: (l) =>
|
|
373
|
+
change: (l) => d(l)
|
|
318
374
|
} : a === "iconPicker" ? {
|
|
319
|
-
onSelect: (l) =>
|
|
375
|
+
onSelect: (l) => d(l)
|
|
320
376
|
} : a === "customFields" ? {
|
|
321
|
-
change: (l) =>
|
|
377
|
+
change: (l) => d(l)
|
|
322
378
|
} : a === "thumbnailSelector" ? {
|
|
323
379
|
change: (l) => {
|
|
324
|
-
|
|
380
|
+
d(l);
|
|
325
381
|
},
|
|
326
382
|
"update:images": (l) => {
|
|
327
|
-
const
|
|
328
|
-
|
|
383
|
+
const n = e.value && typeof e.value == "object" ? e.value : { images: [], thumbnail: null };
|
|
384
|
+
d({ ...n, images: l });
|
|
329
385
|
},
|
|
330
386
|
"update:thumbnail": (l) => {
|
|
331
|
-
const
|
|
332
|
-
|
|
387
|
+
const n = e.value && typeof e.value == "object" ? e.value : { images: [], thumbnail: null };
|
|
388
|
+
d({ ...n, thumbnail: l });
|
|
333
389
|
}
|
|
334
|
-
} :
|
|
390
|
+
} : R(a) ? {
|
|
335
391
|
onChange: (l) => {
|
|
336
|
-
|
|
392
|
+
d(l.value, l.data);
|
|
337
393
|
}
|
|
338
394
|
} : {};
|
|
339
|
-
}),
|
|
395
|
+
}), j = o(() => x(e.field.addonLeft) || x(e.field.addonRight)), O = o(() => {
|
|
340
396
|
const a = u.value;
|
|
341
397
|
return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || !a;
|
|
342
|
-
}),
|
|
398
|
+
}), D = o(() => j.value && O.value), $ = (a, l) => {
|
|
343
399
|
v("addonChange", a.name, { value: l.value });
|
|
344
400
|
}, C = (a) => {
|
|
345
401
|
a.action && v("addonAction", a.action);
|
|
346
402
|
};
|
|
347
|
-
return (a, l) =>
|
|
348
|
-
...
|
|
349
|
-
...
|
|
403
|
+
return (a, l) => D.value ? (c(), m(V, p({ key: 0 }, {
|
|
404
|
+
...A.value,
|
|
405
|
+
...i.field?.props || {}
|
|
350
406
|
}, L(F.value)), q({ _: 2 }, [
|
|
351
|
-
P(
|
|
407
|
+
P(x)(i.field.addonLeft) ? {
|
|
352
408
|
name: "addon-left",
|
|
353
|
-
fn:
|
|
354
|
-
|
|
409
|
+
fn: s(() => [
|
|
410
|
+
i.field.addonLeft.type === "select" ? (c(), m(w, p({
|
|
355
411
|
key: 0,
|
|
356
|
-
modelValue:
|
|
357
|
-
options:
|
|
358
|
-
},
|
|
359
|
-
onOnSelect: l[0] || (l[0] = (
|
|
412
|
+
modelValue: i.field.addonLeft.name ? i.values[i.field.addonLeft.name] : void 0,
|
|
413
|
+
options: i.field.addonLeft.options || []
|
|
414
|
+
}, i.field.addonLeft.props || {}, {
|
|
415
|
+
onOnSelect: l[0] || (l[0] = (n) => $(i.field.addonLeft, n))
|
|
360
416
|
}), {
|
|
361
|
-
trigger:
|
|
362
|
-
N(
|
|
363
|
-
default:
|
|
364
|
-
|
|
417
|
+
trigger: s(({ selectedLabel: n }) => [
|
|
418
|
+
N(z, { variant: "outline" }, {
|
|
419
|
+
default: s(() => [
|
|
420
|
+
b(y(n), 1)
|
|
365
421
|
]),
|
|
366
422
|
_: 2
|
|
367
423
|
}, 1024)
|
|
368
424
|
]),
|
|
369
425
|
_: 1
|
|
370
|
-
}, 16, ["modelValue", "options"])) :
|
|
426
|
+
}, 16, ["modelValue", "options"])) : i.field.addonLeft.type === "button" ? (c(), m(z, p({
|
|
371
427
|
key: 1,
|
|
372
428
|
variant: "outline"
|
|
373
|
-
},
|
|
374
|
-
onClick: l[1] || (l[1] = (
|
|
429
|
+
}, i.field.addonLeft.props || {}, {
|
|
430
|
+
onClick: l[1] || (l[1] = (n) => C(i.field.addonLeft))
|
|
375
431
|
}), {
|
|
376
|
-
default:
|
|
377
|
-
|
|
432
|
+
default: s(() => [
|
|
433
|
+
b(y(i.field.addonLeft.text), 1)
|
|
378
434
|
]),
|
|
379
435
|
_: 1
|
|
380
|
-
}, 16)) :
|
|
436
|
+
}, 16)) : B("", !0)
|
|
381
437
|
]),
|
|
382
438
|
key: "0"
|
|
383
439
|
} : void 0,
|
|
384
|
-
P(
|
|
440
|
+
P(x)(i.field.addonRight) ? {
|
|
385
441
|
name: "addon-right",
|
|
386
|
-
fn:
|
|
387
|
-
|
|
442
|
+
fn: s(() => [
|
|
443
|
+
i.field.addonRight.type === "select" ? (c(), m(w, p({
|
|
388
444
|
key: 0,
|
|
389
|
-
modelValue:
|
|
390
|
-
options:
|
|
391
|
-
},
|
|
392
|
-
onOnSelect: l[2] || (l[2] = (
|
|
445
|
+
modelValue: i.field.addonRight.name ? i.values[i.field.addonRight.name] : void 0,
|
|
446
|
+
options: i.field.addonRight.options || []
|
|
447
|
+
}, i.field.addonRight.props || {}, {
|
|
448
|
+
onOnSelect: l[2] || (l[2] = (n) => $(i.field.addonRight, n))
|
|
393
449
|
}), {
|
|
394
|
-
trigger:
|
|
395
|
-
N(
|
|
396
|
-
default:
|
|
397
|
-
|
|
450
|
+
trigger: s(({ selectedLabel: n }) => [
|
|
451
|
+
N(z, { variant: "outline" }, {
|
|
452
|
+
default: s(() => [
|
|
453
|
+
b(y(n), 1)
|
|
398
454
|
]),
|
|
399
455
|
_: 2
|
|
400
456
|
}, 1024)
|
|
401
457
|
]),
|
|
402
458
|
_: 1
|
|
403
|
-
}, 16, ["modelValue", "options"])) :
|
|
459
|
+
}, 16, ["modelValue", "options"])) : i.field.addonRight.type === "button" ? (c(), m(z, p({
|
|
404
460
|
key: 1,
|
|
405
461
|
variant: "outline"
|
|
406
|
-
},
|
|
407
|
-
onClick: l[3] || (l[3] = (
|
|
462
|
+
}, i.field.addonRight.props || {}, {
|
|
463
|
+
onClick: l[3] || (l[3] = (n) => C(i.field.addonRight))
|
|
408
464
|
}), {
|
|
409
|
-
default:
|
|
410
|
-
|
|
465
|
+
default: s(() => [
|
|
466
|
+
b(y(i.field.addonRight.text), 1)
|
|
411
467
|
]),
|
|
412
468
|
_: 1
|
|
413
|
-
}, 16)) :
|
|
469
|
+
}, 16)) : B("", !0)
|
|
414
470
|
]),
|
|
415
471
|
key: "1"
|
|
416
472
|
} : void 0
|
|
417
|
-
]), 1040)) : (
|
|
473
|
+
]), 1040)) : (c(), m(G(T.value), p({
|
|
418
474
|
key: 1,
|
|
419
|
-
class:
|
|
475
|
+
class: u.value === "check" || u.value === "switch" && i.field.props?.switchVariant === "basic" ? "" : "w-full"
|
|
420
476
|
}, {
|
|
421
|
-
...
|
|
422
|
-
...
|
|
477
|
+
...A.value,
|
|
478
|
+
...i.field?.props || {}
|
|
423
479
|
}, L(F.value)), null, 16, ["class"]));
|
|
424
480
|
}
|
|
425
481
|
});
|
|
426
482
|
export {
|
|
427
|
-
|
|
483
|
+
Pe as default
|
|
428
484
|
};
|
|
@@ -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 e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3e65ff52"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|