vlite3 1.4.4 → 1.4.5
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/AppShell/AppShellLayoutStorefront.vue.js +2 -2
- package/components/Cart/Cart.vue.js +242 -0
- package/components/Cart/Cart.vue2.js +4 -0
- package/components/Cart/CartCouponInput.vue.js +176 -0
- package/components/Cart/CartCouponInput.vue2.js +4 -0
- package/components/Cart/CartEmptyState.vue.js +48 -0
- package/components/Cart/CartEmptyState.vue2.js +4 -0
- package/components/Cart/CartLineItem.vue.js +341 -0
- package/components/Cart/CartLineItem.vue2.js +4 -0
- package/components/Cart/CartSummary.vue.js +157 -0
- package/components/Cart/CartSummary.vue2.js +4 -0
- package/components/Cart/CartVariant1.vue.js +156 -0
- package/components/Cart/CartVariant1.vue2.js +4 -0
- package/components/Cart/CartVariant2.vue.js +154 -0
- package/components/Cart/CartVariant2.vue2.js +4 -0
- package/components/Cart/CartVariant3.vue.js +192 -0
- package/components/Cart/CartVariant3.vue2.js +4 -0
- package/components/Cart/CartVariant4.vue.js +145 -0
- package/components/Cart/CartVariant4.vue2.js +4 -0
- package/components/Cart/composables/useCart.d.ts +46 -0
- package/components/Cart/composables/useCart.js +110 -0
- package/components/Cart/composables/useCartCalculation.js +145 -0
- package/components/Cart/index.d.ts +2 -0
- package/components/CategoryManager/CategoryManager.vue.js +3 -3
- package/components/CategoryManager/CategoryManager.vue2.js +224 -248
- package/components/CategoryManager/utils.d.ts +3 -0
- package/components/CategoryManager/utils.js +31 -0
- package/components/CategoryMenu/CategoryMenu.vue.d.ts +2 -0
- package/components/CategoryMenu/CategoryMenu.vue.js +46 -40
- package/components/CategoryMenu/CategoryMenuVariant1.vue.d.ts +5 -1
- package/components/CategoryMenu/CategoryMenuVariant1.vue.js +5 -144
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +220 -2
- package/components/CategoryMenu/CategoryMenuVariant2.vue.d.ts +5 -1
- package/components/CategoryMenu/CategoryMenuVariant2.vue.js +5 -160
- package/components/CategoryMenu/CategoryMenuVariant2.vue2.js +235 -2
- package/components/CategoryMenu/types.d.ts +5 -2
- package/components/Dropdown/Dropdown.vue.d.ts +1 -0
- package/components/Dropdown/Dropdown.vue.js +31 -29
- package/components/FilePicker/FilePicker.vue.js +278 -202
- package/components/Form/CustomFields.vue.d.ts +4 -0
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +349 -145
- package/components/Form/FormField.vue.js +1 -1
- package/components/Form/types.d.ts +3 -0
- package/components/Modal.vue.d.ts +2 -0
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +30 -28
- package/components/Screen/ScreenFilter.vue.js +3 -2
- package/components/SidePanel.vue.d.ts +2 -0
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel.vue2.js +25 -23
- package/components/SidebarMenu/SidebarMenu.vue.js +145 -128
- package/components/index.d.ts +1 -0
- package/core/config.d.ts +6 -6
- package/index.d.ts +1 -0
- package/index.js +327 -306
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { useBreakpoints as ie, breakpointsTailwind as
|
|
1
|
+
import { defineComponent as Z, inject as ee, ref as C, computed as r, watch as B, reactive as te, provide as ne, openBlock as d, createElementBlock as v, normalizeClass as D, createVNode as R, TransitionGroup as le, withCtx as ae, createBlock as S, createCommentVNode as P, createElementVNode as W, toDisplayString as re, Fragment as H, renderList as A } from "vue";
|
|
2
|
+
import { useRoute as oe, useRouter as se } from "vue-router";
|
|
3
|
+
import { useBreakpoints as ie, breakpointsTailwind as ue } from "@vueuse/core";
|
|
4
4
|
import F from "./SidebarMenuItem.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
import $ from "../Icon.vue.js";
|
|
7
|
-
const
|
|
7
|
+
const ce = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "w-full sidebar-drilldown-container relative overflow-hidden"
|
|
10
|
-
},
|
|
10
|
+
}, de = { class: "truncate font-semibold text-foreground" }, fe = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "h-px bg-border/60 mx-1 mb-1.5"
|
|
13
|
-
},
|
|
13
|
+
}, we = /* @__PURE__ */ Z({
|
|
14
14
|
__name: "SidebarMenu",
|
|
15
15
|
props: {
|
|
16
16
|
items: { default: () => [] },
|
|
@@ -36,220 +36,237 @@ const ue = {
|
|
|
36
36
|
showTooltip: { type: Boolean, default: !1 },
|
|
37
37
|
forceTreeView: { type: Boolean, default: !1 }
|
|
38
38
|
},
|
|
39
|
-
setup(
|
|
40
|
-
const b =
|
|
41
|
-
|
|
42
|
-
const j = ie(
|
|
39
|
+
setup(p) {
|
|
40
|
+
const b = ee("navbar-context", null), n = p, h = oe();
|
|
41
|
+
se();
|
|
42
|
+
const j = ie(ue), c = C([...n.defaultExpanded]), M = C(null), o = C([]), g = C("forward"), x = r(() => o.value.length > 0), T = r(() => o.value.length === 0 ? n.items : o.value[o.value.length - 1].items), q = r(() => o.value.length === 0 ? "" : o.value[o.value.length - 1].label), z = r(() => {
|
|
43
43
|
if (o.value.length !== 0)
|
|
44
44
|
return o.value[o.value.length - 1].icon;
|
|
45
|
-
}),
|
|
45
|
+
}), G = (e) => {
|
|
46
46
|
e.children?.length && (g.value = "forward", o.value = [
|
|
47
47
|
...o.value,
|
|
48
48
|
{ items: e.children, label: e.label, icon: e.icon }
|
|
49
49
|
]);
|
|
50
|
-
},
|
|
50
|
+
}, N = () => {
|
|
51
51
|
o.value.length !== 0 && (g.value = "backward", o.value = o.value.slice(0, -1));
|
|
52
|
-
},
|
|
52
|
+
}, J = r(() => !n.mobileBreakpoint || n.mobileBreakpoint === "none" ? !0 : j.greaterOrEqual(n.mobileBreakpoint).value), k = r(() => J.value && n.orientation || "vertical"), I = r(() => n.forceTreeView ? !1 : !!b?.renderNestedTabs?.value), w = (e) => e.id || (typeof e.to == "string" ? e.to : null) || e.label, K = r(() => {
|
|
53
|
+
const e = /* @__PURE__ */ new Map(), l = (t, a = []) => {
|
|
54
|
+
const i = [];
|
|
55
|
+
return t.forEach((u) => {
|
|
56
|
+
const s = w(u), f = [...a, s], y = u.children?.length ? l(u.children, f) : [];
|
|
57
|
+
e.set(s, {
|
|
58
|
+
ancestors: a,
|
|
59
|
+
descendants: y
|
|
60
|
+
}), i.push(s, ...y);
|
|
61
|
+
}), i;
|
|
62
|
+
};
|
|
63
|
+
return l(n.items), e;
|
|
64
|
+
}), m = (e, l) => {
|
|
53
65
|
if (!e.to) return !1;
|
|
54
66
|
const t = typeof e.to == "string" ? e.to : e.to.path;
|
|
55
67
|
if (!t) return !1;
|
|
56
|
-
if (
|
|
57
|
-
if (t !== "/" && t.length > 1 &&
|
|
58
|
-
const a =
|
|
68
|
+
if (l === t) return !0;
|
|
69
|
+
if (t !== "/" && t.length > 1 && l.startsWith(t)) {
|
|
70
|
+
const a = l[t.length];
|
|
59
71
|
return !a || a === "/" || a === "?";
|
|
60
72
|
}
|
|
61
73
|
return !1;
|
|
62
|
-
},
|
|
74
|
+
}, E = (e, l, t = []) => {
|
|
63
75
|
for (const a of e) {
|
|
64
|
-
const
|
|
76
|
+
const i = w(a);
|
|
65
77
|
if (a.children?.length) {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
return c.value.includes(
|
|
78
|
+
const u = E(a.children, l, [...t, i]);
|
|
79
|
+
if (u !== null)
|
|
80
|
+
return c.value.includes(i) || c.value.push(i), u;
|
|
69
81
|
}
|
|
70
|
-
if (
|
|
71
|
-
return t.forEach((
|
|
72
|
-
c.value.includes(
|
|
73
|
-
}),
|
|
82
|
+
if (m(a, l))
|
|
83
|
+
return t.forEach((u) => {
|
|
84
|
+
c.value.includes(u) || c.value.push(u);
|
|
85
|
+
}), i;
|
|
74
86
|
}
|
|
75
87
|
return null;
|
|
76
|
-
},
|
|
77
|
-
for (const t of
|
|
78
|
-
if (!t.children?.length || !(
|
|
79
|
-
(
|
|
88
|
+
}, O = (e, l) => {
|
|
89
|
+
for (const t of n.items) {
|
|
90
|
+
if (!t.children?.length || !(m(t, e) || t.children.some(
|
|
91
|
+
(s) => m(s, e) || s.children?.some((f) => m(f, e))
|
|
80
92
|
))) continue;
|
|
81
|
-
const
|
|
82
|
-
label:
|
|
83
|
-
labelI18n:
|
|
84
|
-
value:
|
|
85
|
-
icon:
|
|
86
|
-
disabled:
|
|
87
|
-
to:
|
|
88
|
-
href:
|
|
93
|
+
const i = t.children.map((s) => ({
|
|
94
|
+
label: s.label,
|
|
95
|
+
labelI18n: s.labelI18n,
|
|
96
|
+
value: w(s),
|
|
97
|
+
icon: s.icon,
|
|
98
|
+
disabled: s.disabled,
|
|
99
|
+
to: s.to,
|
|
100
|
+
href: s.href
|
|
89
101
|
}));
|
|
90
|
-
let
|
|
91
|
-
if (
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
|
|
102
|
+
let u = i[0]?.value ?? "";
|
|
103
|
+
if (l) {
|
|
104
|
+
const s = i.find((f) => f.value === l);
|
|
105
|
+
if (s)
|
|
106
|
+
u = s.value;
|
|
95
107
|
else {
|
|
96
|
-
const
|
|
97
|
-
(
|
|
108
|
+
const f = t.children.find(
|
|
109
|
+
(y) => y.children?.some((Y) => w(Y) === l)
|
|
98
110
|
);
|
|
99
|
-
|
|
111
|
+
f && (u = w(f));
|
|
100
112
|
}
|
|
101
113
|
}
|
|
102
|
-
return { tabs:
|
|
114
|
+
return { tabs: i, activeTab: u };
|
|
103
115
|
}
|
|
104
116
|
return null;
|
|
105
|
-
},
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
108
|
-
const t =
|
|
117
|
+
}, L = (e) => {
|
|
118
|
+
const l = E(n.items, e);
|
|
119
|
+
if (M.value = l, !I.value) return;
|
|
120
|
+
const t = O(e, l);
|
|
109
121
|
t ? b.setNestedTabs(t.tabs, t.activeTab) : b.setNestedTabs([], "");
|
|
110
122
|
};
|
|
111
|
-
|
|
112
|
-
() =>
|
|
123
|
+
B(
|
|
124
|
+
() => h?.path,
|
|
113
125
|
(e) => {
|
|
114
|
-
e &&
|
|
126
|
+
e && L(e);
|
|
115
127
|
},
|
|
116
128
|
{ immediate: !0 }
|
|
117
|
-
),
|
|
118
|
-
() =>
|
|
129
|
+
), B(
|
|
130
|
+
() => n.items,
|
|
119
131
|
() => {
|
|
120
|
-
|
|
132
|
+
h?.path && L(h.path);
|
|
121
133
|
},
|
|
122
134
|
{ deep: !0 }
|
|
123
135
|
);
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
136
|
+
const Q = (e) => {
|
|
137
|
+
const l = c.value.includes(e), t = K.value.get(e);
|
|
138
|
+
if (l) {
|
|
139
|
+
const a = /* @__PURE__ */ new Set([e, ...t?.descendants || []]);
|
|
140
|
+
c.value = c.value.filter((i) => !a.has(i));
|
|
141
|
+
} else
|
|
142
|
+
n.allowMultiple ? c.value.push(e) : c.value = [...t?.ancestors || [], e];
|
|
143
|
+
}, U = (e) => {
|
|
144
|
+
if (M.value = e, I.value && h?.path) {
|
|
145
|
+
const l = O(h.path, e);
|
|
146
|
+
l ? b.setNestedTabs(l.tabs, l.activeTab) : b.setNestedTabs([], "");
|
|
130
147
|
}
|
|
131
|
-
},
|
|
148
|
+
}, _ = (e, l, t = []) => {
|
|
132
149
|
for (const a of e) {
|
|
133
|
-
if (t.length === 0 &&
|
|
150
|
+
if (t.length === 0 && m(a, l)) return null;
|
|
134
151
|
if (a.children?.length) {
|
|
135
|
-
const
|
|
152
|
+
const i = [
|
|
136
153
|
...t,
|
|
137
154
|
{ items: a.children, label: a.label, icon: a.icon }
|
|
138
155
|
];
|
|
139
|
-
for (const
|
|
140
|
-
if (
|
|
141
|
-
const
|
|
142
|
-
if (
|
|
156
|
+
for (const s of a.children)
|
|
157
|
+
if (m(s, l)) return i;
|
|
158
|
+
const u = _(a.children, l, i);
|
|
159
|
+
if (u) return u;
|
|
143
160
|
}
|
|
144
161
|
}
|
|
145
162
|
return null;
|
|
146
|
-
},
|
|
163
|
+
}, V = (e, l) => {
|
|
147
164
|
for (const t of e)
|
|
148
|
-
if (
|
|
165
|
+
if (m(t, l)) return !0;
|
|
149
166
|
return !1;
|
|
150
167
|
};
|
|
151
|
-
|
|
152
|
-
() =>
|
|
168
|
+
B(
|
|
169
|
+
() => h?.path,
|
|
153
170
|
(e) => {
|
|
154
|
-
if (!e || (
|
|
155
|
-
const t =
|
|
156
|
-
if (
|
|
157
|
-
if (
|
|
171
|
+
if (!e || (n.renderMode || "tree") !== "drilldown") return;
|
|
172
|
+
const t = T.value;
|
|
173
|
+
if (V(t, e)) return;
|
|
174
|
+
if (V(n.items, e)) {
|
|
158
175
|
o.value.length > 0 && (g.value = "backward", o.value = []);
|
|
159
176
|
return;
|
|
160
177
|
}
|
|
161
|
-
const a =
|
|
178
|
+
const a = _(n.items, e);
|
|
162
179
|
a && a.length > 0 && (g.value = "forward", o.value = a);
|
|
163
180
|
}
|
|
164
181
|
);
|
|
165
|
-
const
|
|
166
|
-
activeItem:
|
|
182
|
+
const X = te({
|
|
183
|
+
activeItem: M,
|
|
167
184
|
expandedItems: c,
|
|
168
|
-
toggleExpand:
|
|
169
|
-
setActive:
|
|
170
|
-
indentSize: r(() =>
|
|
171
|
-
variant: r(() =>
|
|
172
|
-
renderMode: r(() =>
|
|
185
|
+
toggleExpand: Q,
|
|
186
|
+
setActive: U,
|
|
187
|
+
indentSize: r(() => n.indentSize),
|
|
188
|
+
variant: r(() => n.variant),
|
|
189
|
+
renderMode: r(() => n.renderMode || "tree"),
|
|
173
190
|
// Expose the effective value so SidebarMenuItem respects forceTreeView
|
|
174
|
-
renderNestedTabs:
|
|
175
|
-
compact: r(() =>
|
|
176
|
-
showCompactLabels: r(() =>
|
|
177
|
-
iconSize: r(() =>
|
|
178
|
-
compactIconSize: r(() =>
|
|
179
|
-
labelClass: r(() =>
|
|
180
|
-
compactLabelClass: r(() =>
|
|
181
|
-
itemPadding: r(() =>
|
|
182
|
-
compactItemPadding: r(() =>
|
|
183
|
-
nestedMenuWidth: r(() =>
|
|
184
|
-
nestedMenuMaxHeight: r(() =>
|
|
185
|
-
currentOrientation:
|
|
186
|
-
showTooltip: r(() =>
|
|
191
|
+
renderNestedTabs: I,
|
|
192
|
+
compact: r(() => n.compact),
|
|
193
|
+
showCompactLabels: r(() => n.showCompactLabels),
|
|
194
|
+
iconSize: r(() => n.iconSize),
|
|
195
|
+
compactIconSize: r(() => n.compactIconSize),
|
|
196
|
+
labelClass: r(() => n.labelClass),
|
|
197
|
+
compactLabelClass: r(() => n.compactLabelClass),
|
|
198
|
+
itemPadding: r(() => n.itemPadding),
|
|
199
|
+
compactItemPadding: r(() => n.compactItemPadding),
|
|
200
|
+
nestedMenuWidth: r(() => n.nestedMenuWidth),
|
|
201
|
+
nestedMenuMaxHeight: r(() => n.nestedMenuMaxHeight),
|
|
202
|
+
currentOrientation: k,
|
|
203
|
+
showTooltip: r(() => n.showTooltip),
|
|
187
204
|
drilldownStack: o,
|
|
188
|
-
drillInto:
|
|
189
|
-
drillBack:
|
|
190
|
-
drilldownItems:
|
|
191
|
-
isDrilldown:
|
|
205
|
+
drillInto: G,
|
|
206
|
+
drillBack: N,
|
|
207
|
+
drilldownItems: T,
|
|
208
|
+
isDrilldown: x
|
|
192
209
|
});
|
|
193
|
-
return
|
|
194
|
-
class:
|
|
195
|
-
|
|
196
|
-
|
|
210
|
+
return ne("sidebar-menu-ctx", X), (e, l) => (d(), v("nav", {
|
|
211
|
+
class: D(["flex w-full transition-all duration-300", [
|
|
212
|
+
k.value === "horizontal" ? "flex-row flex-wrap gap-2 items-center" : "flex-col",
|
|
213
|
+
k.value === "vertical" && !n.compact ? "space-y-1" : ""
|
|
197
214
|
]]),
|
|
198
215
|
role: "tree",
|
|
199
216
|
"aria-label": "Sidebar Menu"
|
|
200
217
|
}, [
|
|
201
|
-
(
|
|
202
|
-
|
|
218
|
+
(n.renderMode || "tree") === "drilldown" && k.value === "vertical" ? (d(), v("div", ce, [
|
|
219
|
+
R(le, {
|
|
203
220
|
name: g.value === "forward" ? "drill-forward" : "drill-backward",
|
|
204
221
|
tag: "div",
|
|
205
222
|
class: "relative w-full"
|
|
206
223
|
}, {
|
|
207
|
-
default:
|
|
208
|
-
(d(),
|
|
224
|
+
default: ae(() => [
|
|
225
|
+
(d(), v("div", {
|
|
209
226
|
key: o.value.length,
|
|
210
227
|
class: "w-full"
|
|
211
228
|
}, [
|
|
212
|
-
|
|
229
|
+
x.value ? (d(), v("button", {
|
|
213
230
|
key: 0,
|
|
214
231
|
type: "button",
|
|
215
232
|
class: "flex items-center gap-2 w-full px-2 py-2.5 mb-1 text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-accent/60 rounded-md transition-all duration-150 group cursor-pointer",
|
|
216
|
-
onClick:
|
|
233
|
+
onClick: N
|
|
217
234
|
}, [
|
|
218
|
-
|
|
235
|
+
R($, {
|
|
219
236
|
icon: "lucide:chevron-left",
|
|
220
237
|
class: "w-4 h-4 shrink-0 transition-transform duration-200 group-hover:-translate-x-0.5"
|
|
221
238
|
}),
|
|
222
|
-
|
|
239
|
+
z.value ? (d(), S($, {
|
|
223
240
|
key: 0,
|
|
224
|
-
icon:
|
|
241
|
+
icon: z.value,
|
|
225
242
|
class: "w-4 h-4 shrink-0 opacity-70"
|
|
226
|
-
}, null, 8, ["icon"])) :
|
|
227
|
-
|
|
228
|
-
])) :
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
class:
|
|
243
|
+
}, null, 8, ["icon"])) : P("", !0),
|
|
244
|
+
W("span", de, re(q.value), 1)
|
|
245
|
+
])) : P("", !0),
|
|
246
|
+
x.value ? (d(), v("div", fe)) : P("", !0),
|
|
247
|
+
W("div", {
|
|
248
|
+
class: D(x.value ? "space-y-0.5" : "space-y-1")
|
|
232
249
|
}, [
|
|
233
|
-
(d(!0),
|
|
250
|
+
(d(!0), v(H, null, A(T.value, (t) => (d(), S(F, {
|
|
234
251
|
key: t.id || t.label,
|
|
235
252
|
item: t,
|
|
236
|
-
itemClass:
|
|
237
|
-
menuOffset:
|
|
253
|
+
itemClass: p.itemClass,
|
|
254
|
+
menuOffset: p.menuOffset
|
|
238
255
|
}, null, 8, ["item", "itemClass", "menuOffset"]))), 128))
|
|
239
256
|
], 2)
|
|
240
257
|
]))
|
|
241
258
|
]),
|
|
242
259
|
_: 1
|
|
243
260
|
}, 8, ["name"])
|
|
244
|
-
])) : (d(!0),
|
|
261
|
+
])) : (d(!0), v(H, { key: 1 }, A(p.items, (t) => (d(), S(F, {
|
|
245
262
|
key: t.id || t.label,
|
|
246
263
|
item: t,
|
|
247
|
-
itemClass:
|
|
248
|
-
menuOffset:
|
|
264
|
+
itemClass: p.itemClass,
|
|
265
|
+
menuOffset: p.menuOffset
|
|
249
266
|
}, null, 8, ["item", "itemClass", "menuOffset"]))), 128))
|
|
250
267
|
], 2));
|
|
251
268
|
}
|
|
252
269
|
});
|
|
253
270
|
export {
|
|
254
|
-
|
|
271
|
+
we as default
|
|
255
272
|
};
|
package/components/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { default as Button } from './Button.vue';
|
|
|
11
11
|
export { default as BackButton } from './BackButton.vue';
|
|
12
12
|
export { default as ButtonGroup } from './ButtonGroup.vue';
|
|
13
13
|
export { Carousel } from './Carousel';
|
|
14
|
+
export * from './Cart';
|
|
14
15
|
export { default as CheckBox } from './CheckBox.vue';
|
|
15
16
|
export { Chip } from './Chip';
|
|
16
17
|
export { ChoiceBox } from './ChoiceBox';
|
package/core/config.d.ts
CHANGED
|
@@ -114,7 +114,7 @@ export declare const configState: {
|
|
|
114
114
|
containerClass?: string | any[] | Record<string, boolean>;
|
|
115
115
|
};
|
|
116
116
|
cart?: {
|
|
117
|
-
variant?: import('
|
|
117
|
+
variant?: import('..').CartVariant;
|
|
118
118
|
labels?: {
|
|
119
119
|
cart?: string;
|
|
120
120
|
emptyTitle?: string;
|
|
@@ -170,8 +170,8 @@ export declare const configState: {
|
|
|
170
170
|
validateCoupon?: (code: string, context: {
|
|
171
171
|
subtotal: number;
|
|
172
172
|
currency?: string;
|
|
173
|
-
items: import('
|
|
174
|
-
}) => Promise<import('
|
|
173
|
+
items: import('..').CartItem[];
|
|
174
|
+
}) => Promise<import('..').CartCouponDefinition | {
|
|
175
175
|
code: string;
|
|
176
176
|
message: string;
|
|
177
177
|
state?: "invalid" | "expired" | "error";
|
|
@@ -293,7 +293,7 @@ export declare function useVLiteConfig(): {
|
|
|
293
293
|
containerClass?: string | any[] | Record<string, boolean>;
|
|
294
294
|
};
|
|
295
295
|
cart?: {
|
|
296
|
-
variant?: import('
|
|
296
|
+
variant?: import('..').CartVariant;
|
|
297
297
|
labels?: {
|
|
298
298
|
cart?: string;
|
|
299
299
|
emptyTitle?: string;
|
|
@@ -349,8 +349,8 @@ export declare function useVLiteConfig(): {
|
|
|
349
349
|
validateCoupon?: (code: string, context: {
|
|
350
350
|
subtotal: number;
|
|
351
351
|
currency?: string;
|
|
352
|
-
items: import('
|
|
353
|
-
}) => Promise<import('
|
|
352
|
+
items: import('..').CartItem[];
|
|
353
|
+
}) => Promise<import('..').CartCouponDefinition | {
|
|
354
354
|
code: string;
|
|
355
355
|
message: string;
|
|
356
356
|
state?: "invalid" | "expired" | "error";
|
package/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './components/Masonry';
|
|
|
14
14
|
export * from './components/Spinner';
|
|
15
15
|
export * from './components/Barcode';
|
|
16
16
|
export * from './components/Carousel';
|
|
17
|
+
export * from './components/Cart';
|
|
17
18
|
export * from './components/Dropdown';
|
|
18
19
|
export * from './components/Breadcrumb';
|
|
19
20
|
export * from './components/FileTree';
|