vlite3 1.4.21 → 1.4.23
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/Cart/Cart.vue.js +53 -49
- package/components/Cart/CartCouponInput.vue.d.ts +1 -0
- package/components/Cart/CartCouponInput.vue.js +36 -33
- package/components/Cart/CartLineItem.vue.d.ts +1 -0
- package/components/Cart/CartLineItem.vue.js +121 -113
- package/components/Cart/CartSummary.vue.d.ts +1 -0
- package/components/Cart/CartSummary.vue.js +59 -51
- package/components/Cart/CartVariant1.vue.js +66 -63
- package/components/Cart/CartVariant2.vue.js +50 -47
- package/components/Cart/CartVariant3.vue.js +61 -58
- package/components/Cart/CartVariant4.vue.js +72 -68
- package/components/CategoryManager/CategoryManager.vue2.js +2 -2
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- 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 +26 -28
- 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/Price/Price.vue.js +2 -2
- 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/Dropdown/{DropdownMenu.vue3.js → DropdownMenu.vue2.js} +0 -0
- /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover.vue2.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar.vue.js → RichTextToolbar.vue2.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
2
|
-
import { resolveFieldType as G, isComponent as k, isAddonObject as
|
|
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
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
8
|
import Q from "../Switch.vue.js";
|
|
@@ -40,8 +40,8 @@ const Ne = /* @__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 });
|
|
@@ -108,8 +108,12 @@ const Ne = /* @__PURE__ */ E({
|
|
|
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,
|
|
@@ -353,7 +357,7 @@ const Ne = /* @__PURE__ */ E({
|
|
|
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
|
-
}),
|
|
360
|
+
}), A = f(() => {
|
|
357
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
|
|
@@ -425,16 +429,13 @@ const Ne = /* @__PURE__ */ E({
|
|
|
425
429
|
}), H = f(() => {
|
|
426
430
|
const a = o.value;
|
|
427
431
|
return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || !a;
|
|
428
|
-
}), j = f(() => H.value || o.value === "textarea" || b.value),
|
|
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) => j.value ? (c(), m(V, p({ key: 0 }, {
|
|
434
|
-
|
|
435
|
-
...i.field?.props || {}
|
|
436
|
-
}, C($.value)), M({ _: 2 }, [
|
|
437
|
-
P(B)(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
441
|
i.field.addonLeft.type === "select" ? (c(), m(R, p({
|
|
@@ -442,12 +443,12 @@ const Ne = /* @__PURE__ */ E({
|
|
|
442
443
|
modelValue: i.field.addonLeft.name ? i.values[i.field.addonLeft.name] : void 0,
|
|
443
444
|
options: i.field.addonLeft.options || []
|
|
444
445
|
}, i.field.addonLeft.props || {}, {
|
|
445
|
-
onOnSelect: l[0] || (l[0] = (r) =>
|
|
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
|
-
y(
|
|
451
|
+
x(y(r), 1)
|
|
451
452
|
]),
|
|
452
453
|
_: 2
|
|
453
454
|
}, 1024)
|
|
@@ -457,17 +458,17 @@ const Ne = /* @__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
|
-
y(
|
|
464
|
+
x(y(i.field.addonLeft.text), 1)
|
|
464
465
|
]),
|
|
465
466
|
_: 1
|
|
466
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
474
|
i.field.addonRight.type === "select" ? (c(), m(R, p({
|
|
@@ -475,12 +476,12 @@ const Ne = /* @__PURE__ */ E({
|
|
|
475
476
|
modelValue: i.field.addonRight.name ? i.values[i.field.addonRight.name] : void 0,
|
|
476
477
|
options: i.field.addonRight.options || []
|
|
477
478
|
}, i.field.addonRight.props || {}, {
|
|
478
|
-
onOnSelect: l[2] || (l[2] = (r) =>
|
|
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
|
-
y(
|
|
484
|
+
x(y(r), 1)
|
|
484
485
|
]),
|
|
485
486
|
_: 2
|
|
486
487
|
}, 1024)
|
|
@@ -490,10 +491,10 @@ const Ne = /* @__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
|
-
y(
|
|
497
|
+
x(y(i.field.addonRight.text), 1)
|
|
497
498
|
]),
|
|
498
499
|
_: 1
|
|
499
500
|
}, 16)) : N("", !0)
|
|
@@ -503,10 +504,7 @@ const Ne = /* @__PURE__ */ E({
|
|
|
503
504
|
]), 1040)) : (c(), m(q(U.value), p({
|
|
504
505
|
key: 1,
|
|
505
506
|
class: o.value === "check" || o.value === "switch" && i.field.props?.switchVariant === "basic" ? "" : "w-full"
|
|
506
|
-
},
|
|
507
|
-
...w.value,
|
|
508
|
-
...i.field?.props || {}
|
|
509
|
-
}, C($.value)), null, 16, ["class"]));
|
|
507
|
+
}, w.value, C(A.value)), null, 16, ["class"]));
|
|
510
508
|
}
|
|
511
509
|
});
|
|
512
510
|
export {
|
|
@@ -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"
|