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,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as S, ref as E, watch as j, openBlock as a, createElementBlock as
|
|
2
|
-
import { VueDraggable as
|
|
1
|
+
import { defineComponent as S, ref as E, watch as j, openBlock as a, createElementBlock as n, createVNode as h, unref as g, withCtx as b, Fragment as f, renderList as U, isMemoSame as K, createBlock as k, resolveDynamicComponent as D, createTextVNode as $, toDisplayString as y, createCommentVNode as i, createElementVNode as m, normalizeClass as w, withModifiers as L } from "vue";
|
|
2
|
+
import { VueDraggable as q } from "vue-draggable-plus";
|
|
3
3
|
import M from "../Accordion/AccordionItem.vue.js";
|
|
4
4
|
import O from "./FormField.vue.js";
|
|
5
5
|
import z from "../Label.vue.js";
|
|
6
6
|
import H from "../Button.vue.js";
|
|
7
7
|
import p from "../Icon.vue.js";
|
|
8
8
|
import { renderLabel as x } from "./rowHelpers.js";
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
9
|
+
import { resolveI18nText as G } from "../../utils/i18n.js";
|
|
10
|
+
const J = { class: "custom-fields-accordion min-w-0 w-full" }, P = ["onClick"], Q = { class: "flex items-center flex-1 py-3 px-4 min-w-0" }, W = { class: "font-medium flex-1 text-left truncate mr-4 min-w-0" }, X = { class: "flex items-center gap-2 flex-none" }, Y = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "text-destructive flex items-center justify-center rounded-full bg-destructive/10 w-6 h-6"
|
|
13
|
-
}, Y = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "grid gap-4 min-w-0"
|
|
16
13
|
}, Z = {
|
|
17
14
|
key: 0,
|
|
18
|
-
class: "
|
|
15
|
+
class: "grid gap-4 min-w-0"
|
|
19
16
|
}, I = {
|
|
20
17
|
key: 0,
|
|
21
18
|
class: "text-destructive ml-0.5"
|
|
22
19
|
}, _ = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "text-destructive ml-0.5"
|
|
22
|
+
}, ee = {
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "mt-1 text-xs text-destructive"
|
|
25
|
-
},
|
|
25
|
+
}, te = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "col-span-1 flex justify-end"
|
|
28
|
-
},
|
|
28
|
+
}, se = {
|
|
29
29
|
key: 0,
|
|
30
30
|
class: "flex flex-col items-center justify-center py-6 text-center border border-border rounded bg-muted/5 mt-2"
|
|
31
|
-
}, le = { class: "text-sm font-medium text-foreground" }, ae = { class: "text-xs text-muted-foreground mt-1" },
|
|
31
|
+
}, le = { class: "text-sm font-medium text-foreground" }, ae = { class: "text-xs text-muted-foreground mt-1" }, ye = /* @__PURE__ */ S({
|
|
32
32
|
__name: "AccordionView",
|
|
33
33
|
props: {
|
|
34
34
|
rows: {},
|
|
@@ -52,22 +52,25 @@ const G = { class: "custom-fields-accordion min-w-0 w-full" }, J = ["onClick"],
|
|
|
52
52
|
onDragUpdate: { type: Function }
|
|
53
53
|
},
|
|
54
54
|
setup(e) {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
},
|
|
55
|
+
const c = e, o = E([]), v = E([]), N = (l) => {
|
|
56
|
+
o.value.includes(l) ? o.value = o.value.filter((r) => r !== l) : (v.value.includes(l) || v.value.push(l), o.value = [...o.value, l]);
|
|
57
|
+
}, F = (l, d) => c.accordionTitleKey && l[c.accordionTitleKey] ? String(l[c.accordionTitleKey]) : `${c.itemName} #${d + 1}`, u = (l) => l.labelI18n ? G(
|
|
58
|
+
l.labelI18n,
|
|
59
|
+
typeof l.label == "string" ? l.label : void 0
|
|
60
|
+
) ?? l.label : l.label;
|
|
58
61
|
return j(
|
|
59
|
-
() => [
|
|
62
|
+
() => [c.helpers.errors, c.rows],
|
|
60
63
|
() => {
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
64
|
+
const l = c.rows.map((s, C) => c.helpers.hasRowErrors(C) ? s._id : null).filter((s) => s !== null);
|
|
65
|
+
if (l.length === 0) return;
|
|
66
|
+
const d = /* @__PURE__ */ new Set([...o.value, ...l]);
|
|
67
|
+
o.value = Array.from(d);
|
|
68
|
+
const r = /* @__PURE__ */ new Set([...v.value, ...l]);
|
|
69
|
+
v.value = Array.from(r);
|
|
67
70
|
},
|
|
68
71
|
{ deep: !0, immediate: !0 }
|
|
69
|
-
), (
|
|
70
|
-
h(
|
|
72
|
+
), (l, d) => (a(), n("div", J, [
|
|
73
|
+
h(g(q), {
|
|
71
74
|
"model-value": e.rows,
|
|
72
75
|
"onUpdate:modelValue": e.onDragUpdate,
|
|
73
76
|
disabled: !e.draggable || e.disabled || e.readonly,
|
|
@@ -77,143 +80,143 @@ const G = { class: "custom-fields-accordion min-w-0 w-full" }, J = ["onClick"],
|
|
|
77
80
|
class: "space-y-2 min-w-0"
|
|
78
81
|
}, {
|
|
79
82
|
default: b(() => [
|
|
80
|
-
(a(!0),
|
|
83
|
+
(a(!0), n(f, null, U(e.rows, (r, s, C, R) => {
|
|
81
84
|
const V = [
|
|
82
|
-
|
|
85
|
+
r,
|
|
83
86
|
e.disabled,
|
|
84
87
|
e.readonly,
|
|
85
88
|
e.isUpdate,
|
|
86
89
|
e.draggable,
|
|
87
|
-
|
|
88
|
-
e.helpers.getRowErrorsHash(
|
|
89
|
-
e.helpers.hasRowErrors(
|
|
90
|
-
|
|
90
|
+
s,
|
|
91
|
+
e.helpers.getRowErrorsHash(s),
|
|
92
|
+
e.helpers.hasRowErrors(s),
|
|
93
|
+
o.value.includes(r._id)
|
|
91
94
|
];
|
|
92
|
-
if (R && R.key ===
|
|
93
|
-
const B = (a(),
|
|
94
|
-
key:
|
|
95
|
-
item: { id:
|
|
96
|
-
"is-open":
|
|
95
|
+
if (R && R.key === r._id && K(R, V)) return R;
|
|
96
|
+
const B = (a(), k(M, {
|
|
97
|
+
key: r._id,
|
|
98
|
+
item: { id: r._id, title: F(r, s) },
|
|
99
|
+
"is-open": o.value.includes(r._id),
|
|
97
100
|
variant: "solid",
|
|
98
101
|
onToggle: N,
|
|
99
102
|
class: "bg-white min-w-0"
|
|
100
103
|
}, {
|
|
101
104
|
trigger: b(({ open: t, toggle: T, triggerClass: A }) => [
|
|
102
|
-
|
|
105
|
+
m("div", {
|
|
103
106
|
class: w(["flex items-stretch w-full min-w-0", [A, "!p-0 overflow-hidden"]]),
|
|
104
107
|
onClick: T
|
|
105
108
|
}, [
|
|
106
|
-
e.draggable && !e.disabled && !e.readonly ? (a(),
|
|
109
|
+
e.draggable && !e.disabled && !e.readonly ? (a(), n("div", {
|
|
107
110
|
key: 0,
|
|
108
111
|
class: w([
|
|
109
112
|
"w-12 flex-none flex items-center justify-center border-r border-border bg-muted/5 drag-handle transition-colors",
|
|
110
113
|
e.disabled ? "cursor-not-allowed opacity-50" : "cursor-grab active:cursor-grabbing hover:bg-muted/10 text-muted-foreground hover:text-foreground"
|
|
111
114
|
]),
|
|
112
|
-
onClick:
|
|
115
|
+
onClick: d[0] || (d[0] = L(() => {
|
|
113
116
|
}, ["stop"]))
|
|
114
117
|
}, [
|
|
115
118
|
h(p, {
|
|
116
119
|
icon: "lucide:grip-vertical",
|
|
117
120
|
class: "w-4 h-4"
|
|
118
121
|
})
|
|
119
|
-
], 2)) :
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
e.helpers.hasRowErrors(
|
|
122
|
+
], 2)) : i("", !0),
|
|
123
|
+
m("div", Q, [
|
|
124
|
+
m("span", W, y(F(r, s)), 1),
|
|
125
|
+
m("div", X, [
|
|
126
|
+
e.helpers.hasRowErrors(s) ? (a(), n("div", Y, [
|
|
124
127
|
h(p, {
|
|
125
128
|
icon: "lucide:alert-circle",
|
|
126
129
|
class: "w-4 h-4"
|
|
127
130
|
})
|
|
128
|
-
])) :
|
|
131
|
+
])) : i("", !0),
|
|
129
132
|
h(p, {
|
|
130
133
|
icon: "lucide:chevron-down",
|
|
131
134
|
class: w(["w-4 h-4 transition-transform duration-200", { "rotate-180": t }])
|
|
132
135
|
}, null, 8, ["class"])
|
|
133
136
|
])
|
|
134
137
|
])
|
|
135
|
-
], 10,
|
|
138
|
+
], 10, P)
|
|
136
139
|
]),
|
|
137
140
|
content: b(() => [
|
|
138
|
-
|
|
139
|
-
(a(!0),
|
|
141
|
+
v.value.includes(r._id) ? (a(), n("div", Z, [
|
|
142
|
+
(a(!0), n(f, null, U(e.schema, (t) => (a(), n("div", {
|
|
140
143
|
key: t.name,
|
|
141
144
|
class: "col-span-1 flex flex-col min-w-0"
|
|
142
145
|
}, [
|
|
143
|
-
e.helpers.isFieldVisible(
|
|
144
|
-
(t.label || t.labelI18n) && e.helpers.getResolvedType(t,
|
|
146
|
+
e.helpers.isFieldVisible(s, t) ? (a(), n(f, { key: 0 }, [
|
|
147
|
+
(t.label || t.labelI18n) && e.helpers.getResolvedType(t, s) !== "switch" && e.helpers.getResolvedType(t, s) !== "check" && e.helpers.getResolvedType(t, s) !== "customFields" && e.helpers.getResolvedType(t, s) !== "choiceBox" ? (a(), k(z, {
|
|
145
148
|
key: 0,
|
|
146
149
|
class: "mb-2 block text-sm font-medium"
|
|
147
150
|
}, {
|
|
148
151
|
default: b(() => [
|
|
149
|
-
typeof
|
|
150
|
-
|
|
151
|
-
t.required ? (a(),
|
|
152
|
+
typeof g(x)(u(t)) != "string" ? (a(), k(D(g(x)(u(t))), { key: 0 })) : (a(), n(f, { key: 1 }, [
|
|
153
|
+
$(y(u(t)) + " ", 1),
|
|
154
|
+
t.required ? (a(), n("span", I, "*")) : i("", !0)
|
|
152
155
|
], 64))
|
|
153
156
|
]),
|
|
154
157
|
_: 2
|
|
155
|
-
}, 1024)) :
|
|
156
|
-
|
|
158
|
+
}, 1024)) : i("", !0),
|
|
159
|
+
m("div", {
|
|
157
160
|
class: w(["relative min-w-0", [
|
|
158
|
-
e.helpers.getResolvedType(t,
|
|
161
|
+
e.helpers.getResolvedType(t, s) === "check" || e.helpers.getResolvedType(t, s) === "switch" && t.props?.switchVariant === "basic" ? "w-auto flex items-center" : "w-full"
|
|
159
162
|
]])
|
|
160
163
|
}, [
|
|
161
164
|
h(O, {
|
|
162
165
|
field: { ...t, props: { ...t.props || {} } },
|
|
163
|
-
value: e.helpers.getFieldValue(
|
|
164
|
-
values:
|
|
166
|
+
value: e.helpers.getFieldValue(s, t.name),
|
|
167
|
+
values: r,
|
|
165
168
|
errors: e.helpers.errors,
|
|
166
|
-
error: e.helpers.getFieldError(
|
|
169
|
+
error: e.helpers.getFieldError(s, t.name),
|
|
167
170
|
variant: e.variant,
|
|
168
171
|
size: e.size,
|
|
169
172
|
rounded: e.rounded,
|
|
170
|
-
disabled: e.disabled || e.helpers.isFieldDisabled(
|
|
171
|
-
readonly: e.readonly || e.helpers.isFieldReadonly(
|
|
173
|
+
disabled: e.disabled || e.helpers.isFieldDisabled(s, t),
|
|
174
|
+
readonly: e.readonly || e.helpers.isFieldReadonly(s, t),
|
|
172
175
|
isUpdate: e.isUpdate,
|
|
173
|
-
onChange: (T) => e.onFieldChange(
|
|
176
|
+
onChange: (T) => e.onFieldChange(s, t.name, T)
|
|
174
177
|
}, null, 8, ["field", "value", "values", "errors", "error", "variant", "size", "rounded", "disabled", "readonly", "isUpdate", "onChange"]),
|
|
175
|
-
e.helpers.getResolvedType(t,
|
|
178
|
+
e.helpers.getResolvedType(t, s) === "check" || e.helpers.getResolvedType(t, s) === "switch" && t.props?.switchVariant === "basic" ? (a(), k(z, {
|
|
176
179
|
key: 0,
|
|
177
180
|
class: "ml-2 text-sm font-medium cursor-pointer"
|
|
178
181
|
}, {
|
|
179
182
|
default: b(() => [
|
|
180
|
-
typeof
|
|
181
|
-
|
|
182
|
-
t.required ? (a(),
|
|
183
|
+
typeof g(x)(u(t)) != "string" ? (a(), k(D(g(x)(u(t))), { key: 0 })) : (a(), n(f, { key: 1 }, [
|
|
184
|
+
$(y(u(t)) + " ", 1),
|
|
185
|
+
t.required ? (a(), n("span", _, "*")) : i("", !0)
|
|
183
186
|
], 64))
|
|
184
187
|
]),
|
|
185
188
|
_: 2
|
|
186
|
-
}, 1024)) :
|
|
189
|
+
}, 1024)) : i("", !0)
|
|
187
190
|
], 2),
|
|
188
|
-
e.helpers.getFieldError(
|
|
189
|
-
], 64)) :
|
|
191
|
+
e.helpers.getFieldError(s, t.name) ? (a(), n("p", ee, y(e.helpers.getFieldError(s, t.name)), 1)) : i("", !0)
|
|
192
|
+
], 64)) : i("", !0)
|
|
190
193
|
]))), 128)),
|
|
191
|
-
e.canRemoveRow ? (a(),
|
|
194
|
+
e.canRemoveRow ? (a(), n("div", te, [
|
|
192
195
|
h(H, {
|
|
193
196
|
type: "button",
|
|
194
197
|
variant: "secondary",
|
|
195
198
|
size: "xs",
|
|
196
199
|
icon: "lucide:trash-2",
|
|
197
200
|
disabled: e.disabled || e.readonly,
|
|
198
|
-
onClick: (t) => e.onRemoveRow(
|
|
201
|
+
onClick: (t) => e.onRemoveRow(s)
|
|
199
202
|
}, null, 8, ["disabled", "onClick"])
|
|
200
|
-
])) :
|
|
201
|
-
])) :
|
|
203
|
+
])) : i("", !0)
|
|
204
|
+
])) : i("", !0)
|
|
202
205
|
]),
|
|
203
206
|
_: 2
|
|
204
207
|
}, 1032, ["item", "is-open"]));
|
|
205
208
|
return B.memo = V, B;
|
|
206
|
-
},
|
|
209
|
+
}, d, 1), 128))
|
|
207
210
|
]),
|
|
208
211
|
_: 1
|
|
209
212
|
}, 8, ["model-value", "onUpdate:modelValue", "disabled"]),
|
|
210
|
-
e.rows.length === 0 ? (a(),
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
])) :
|
|
213
|
+
e.rows.length === 0 ? (a(), n("div", se, [
|
|
214
|
+
m("p", le, y(e.emptyTitle), 1),
|
|
215
|
+
m("p", ae, y(e.emptyDescription), 1)
|
|
216
|
+
])) : i("", !0)
|
|
214
217
|
]));
|
|
215
218
|
}
|
|
216
219
|
});
|
|
217
220
|
export {
|
|
218
|
-
|
|
221
|
+
ye as default
|
|
219
222
|
};
|
|
@@ -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
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4ce4b819"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|