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.
Files changed (37) hide show
  1. package/components/Cart/Cart.vue.js +53 -49
  2. package/components/Cart/CartCouponInput.vue.d.ts +1 -0
  3. package/components/Cart/CartCouponInput.vue.js +36 -33
  4. package/components/Cart/CartLineItem.vue.d.ts +1 -0
  5. package/components/Cart/CartLineItem.vue.js +121 -113
  6. package/components/Cart/CartSummary.vue.d.ts +1 -0
  7. package/components/Cart/CartSummary.vue.js +59 -51
  8. package/components/Cart/CartVariant1.vue.js +66 -63
  9. package/components/Cart/CartVariant2.vue.js +50 -47
  10. package/components/Cart/CartVariant3.vue.js +61 -58
  11. package/components/Cart/CartVariant4.vue.js +72 -68
  12. package/components/CategoryManager/CategoryManager.vue2.js +2 -2
  13. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  14. package/components/Form/AccordionView.vue.js +80 -77
  15. package/components/Form/Form.vue.js +2 -2
  16. package/components/Form/Form.vue2.js +164 -162
  17. package/components/Form/FormField.vue.js +26 -28
  18. package/components/Form/FormFields.vue.js +2 -2
  19. package/components/Form/FormFields.vue2.js +21 -18
  20. package/components/Form/composables/useForm.js +150 -150
  21. package/components/Form/index.vue.js +1 -1
  22. package/components/Form/index.vue2.js +43 -39
  23. package/components/Input.vue.js +3 -3
  24. package/components/Price/Price.vue.js +2 -2
  25. package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
  26. package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
  27. package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
  28. package/components/Screen/ScreenFilter.vue.js +2 -2
  29. package/components/Textarea.vue.js +14 -14
  30. package/index.js +389 -388
  31. package/package.json +1 -1
  32. package/style.css +1 -1
  33. package/utils/i18n.d.ts +10 -4
  34. package/utils/i18n.js +14 -3
  35. /package/components/Dropdown/{DropdownMenu.vue3.js → DropdownMenu.vue2.js} +0 -0
  36. /package/components/RichTextEditor/{RichTextLinkPopover.vue.js → RichTextLinkPopover.vue2.js} +0 -0
  37. /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 s, createVNode as h, unref as i, withCtx as b, Fragment as k, renderList as U, isMemoSame as K, createBlock as f, resolveDynamicComponent as $, createTextVNode as D, toDisplayString as y, createCommentVNode as o, createElementVNode as u, normalizeClass as w, withModifiers as q } from "vue";
2
- import { VueDraggable as L } from "vue-draggable-plus";
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 { $t as v } from "../../utils/i18n.js";
10
- const G = { class: "custom-fields-accordion min-w-0 w-full" }, J = ["onClick"], P = { class: "flex items-center flex-1 py-3 px-4 min-w-0" }, Q = { class: "font-medium flex-1 text-left truncate mr-4 min-w-0" }, W = { class: "flex items-center gap-2 flex-none" }, X = {
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: "text-destructive ml-0.5"
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
- }, ee = {
25
+ }, te = {
26
26
  key: 0,
27
27
  class: "col-span-1 flex justify-end"
28
- }, te = {
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" }, he = /* @__PURE__ */ S({
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 d = e, c = E([]), g = E([]), N = (r) => {
56
- c.value.includes(r) ? c.value = c.value.filter((n) => n !== r) : (g.value.includes(r) || g.value.push(r), c.value = [...c.value, r]);
57
- }, C = (r, m) => d.accordionTitleKey && r[d.accordionTitleKey] ? String(r[d.accordionTitleKey]) : `${d.itemName} #${m + 1}`;
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
- () => [d.helpers.errors, d.rows],
62
+ () => [c.helpers.errors, c.rows],
60
63
  () => {
61
- const r = d.rows.map((l, F) => d.helpers.hasRowErrors(F) ? l._id : null).filter((l) => l !== null);
62
- if (r.length === 0) return;
63
- const m = /* @__PURE__ */ new Set([...c.value, ...r]);
64
- c.value = Array.from(m);
65
- const n = /* @__PURE__ */ new Set([...g.value, ...r]);
66
- g.value = Array.from(n);
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
- ), (r, m) => (a(), s("div", G, [
70
- h(i(L), {
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), s(k, null, U(e.rows, (n, l, F, R) => {
83
+ (a(!0), n(f, null, U(e.rows, (r, s, C, R) => {
81
84
  const V = [
82
- n,
85
+ r,
83
86
  e.disabled,
84
87
  e.readonly,
85
88
  e.isUpdate,
86
89
  e.draggable,
87
- l,
88
- e.helpers.getRowErrorsHash(l),
89
- e.helpers.hasRowErrors(l),
90
- c.value.includes(n._id)
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 === n._id && K(R, V)) return R;
93
- const B = (a(), f(M, {
94
- key: n._id,
95
- item: { id: n._id, title: C(n, l) },
96
- "is-open": c.value.includes(n._id),
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
- u("div", {
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(), s("div", {
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: m[0] || (m[0] = q(() => {
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)) : o("", !0),
120
- u("div", P, [
121
- u("span", Q, y(C(n, l)), 1),
122
- u("div", W, [
123
- e.helpers.hasRowErrors(l) ? (a(), s("div", X, [
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
- ])) : o("", !0),
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, J)
138
+ ], 10, P)
136
139
  ]),
137
140
  content: b(() => [
138
- g.value.includes(n._id) ? (a(), s("div", Y, [
139
- (a(!0), s(k, null, U(e.schema, (t) => (a(), s("div", {
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(l, t) ? (a(), s(k, { key: 0 }, [
144
- (t.label || t.labelI18n) && e.helpers.getResolvedType(t, l) !== "switch" && e.helpers.getResolvedType(t, l) !== "check" && e.helpers.getResolvedType(t, l) !== "customFields" && e.helpers.getResolvedType(t, l) !== "choiceBox" ? (a(), f(z, {
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 i(x)(t.labelI18n ? i(v)(t.labelI18n) : t.label) != "string" ? (a(), f($(i(x)(t.labelI18n ? i(v)(t.labelI18n) : t.label)), { key: 0 })) : (a(), s(k, { key: 1 }, [
150
- D(y(t.labelI18n ? i(v)(t.labelI18n) : t.label) + " ", 1),
151
- t.required ? (a(), s("span", Z, "*")) : o("", !0)
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)) : o("", !0),
156
- u("div", {
158
+ }, 1024)) : i("", !0),
159
+ m("div", {
157
160
  class: w(["relative min-w-0", [
158
- e.helpers.getResolvedType(t, l) === "check" || e.helpers.getResolvedType(t, l) === "switch" && t.props?.switchVariant === "basic" ? "w-auto flex items-center" : "w-full"
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(l, t.name),
164
- values: n,
166
+ value: e.helpers.getFieldValue(s, t.name),
167
+ values: r,
165
168
  errors: e.helpers.errors,
166
- error: e.helpers.getFieldError(l, t.name),
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(l, t),
171
- readonly: e.readonly || e.helpers.isFieldReadonly(l, t),
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(l, t.name, T)
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, l) === "check" || e.helpers.getResolvedType(t, l) === "switch" && t.props?.switchVariant === "basic" ? (a(), f(z, {
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 i(x)(t.labelI18n ? i(v)(t.labelI18n) : t.label) != "string" ? (a(), f($(i(x)(t.labelI18n ? i(v)(t.labelI18n) : t.label)), { key: 0 })) : (a(), s(k, { key: 1 }, [
181
- D(y(t.labelI18n ? i(v)(t.labelI18n) : t.label) + " ", 1),
182
- t.required ? (a(), s("span", I, "*")) : o("", !0)
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)) : o("", !0)
189
+ }, 1024)) : i("", !0)
187
190
  ], 2),
188
- e.helpers.getFieldError(l, t.name) ? (a(), s("p", _, y(e.helpers.getFieldError(l, t.name)), 1)) : o("", !0)
189
- ], 64)) : o("", !0)
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(), s("div", ee, [
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(l)
201
+ onClick: (t) => e.onRemoveRow(s)
199
202
  }, null, 8, ["disabled", "onClick"])
200
- ])) : o("", !0)
201
- ])) : o("", !0)
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
- }, m, 1), 128))
209
+ }, d, 1), 128))
207
210
  ]),
208
211
  _: 1
209
212
  }, 8, ["model-value", "onUpdate:modelValue", "disabled"]),
210
- e.rows.length === 0 ? (a(), s("div", te, [
211
- u("p", le, y(e.emptyTitle), 1),
212
- u("p", ae, y(e.emptyDescription), 1)
213
- ])) : o("", !0)
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
- he as default
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 p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-db13df10"]]);
4
+ const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4ce4b819"]]);
5
5
  export {
6
- p as default
6
+ _ as default
7
7
  };