vlite3 1.2.1 → 1.2.2
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/AppShellLayoutClassic.vue.js +67 -64
- package/components/AppShell/AppShellLayoutDashboard.vue.js +75 -70
- package/components/AppShell/AppShellLayoutDock.vue.js +27 -27
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +80 -75
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +56 -56
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DataTable/DataTableRow.vue.d.ts +1 -1
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +15 -2
- package/components/Invoice/InvoiceVariant1.vue.js +225 -176
- package/components/Invoice/InvoiceVariant2.vue.js +174 -125
- package/components/Invoice/InvoiceVariant3.vue.js +186 -157
- package/components/Invoice/InvoiceVariant4.vue.js +200 -156
- package/components/Invoice/types.d.ts +10 -1
- package/components/List/ListFieldRow.vue.js +16 -16
- package/components/List/utils.d.ts +2 -2
- package/components/List/utils.js +6 -9
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/Price/Price.vue.d.ts +2 -0
- package/components/Price/Price.vue.js +15 -12
- package/components/Screen/Screen.vue.d.ts +36 -10
- package/components/Screen/Screen.vue.js +398 -304
- package/components/Screen/components/ScreenToolbar.vue.d.ts +62 -0
- package/components/Screen/components/ScreenToolbar.vue.js +116 -0
- package/components/Screen/components/ScreenToolbar.vue2.js +4 -0
- package/components/Screen/types.d.ts +9 -0
- package/components/Stats/StatItem.vue.js +88 -87
- package/components/Stats/Stats.vue.js +20 -20
- package/components/Stats/types.d.ts +3 -1
- package/core/config.d.ts +10 -0
- package/core/config.js +11 -9
- package/index.js +131 -131
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/config.type.d.ts +2 -0
- package/types/list.type.d.ts +4 -0
- package/utils/functions.d.ts +9 -10
- package/utils/functions.js +78 -63
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as _, computed as v, openBlock as o, createElementBlock as a, normalizeStyle as w, createElementVNode as s, normalizeClass as l, toDisplayString as t, createBlock as z, createCommentVNode as c, createVNode as u, unref as m, createTextVNode as r, Fragment as x, renderList as D } from "vue";
|
|
2
|
+
import f from "../Price/Price.vue.js";
|
|
3
3
|
import g from "../DateTime/DateTime.vue.js";
|
|
4
4
|
import T from "../Barcode/Barcode.vue.js";
|
|
5
5
|
import N from "../QRCode/QRCode.vue.js";
|
|
6
6
|
import k from "../Avatar.vue.js";
|
|
7
7
|
import V from "../StatusChip/StatusChip.vue.js";
|
|
8
8
|
import B from "./InvoiceTotals.vue.js";
|
|
9
|
-
const
|
|
9
|
+
const S = { class: "flex flex-col sm:flex-row justify-between items-start gap-4" }, $ = { class: "flex flex-col gap-3" }, M = { class: "flex items-center gap-2.5 mt-1.5 flex-wrap" }, C = { class: "flex flex-wrap gap-5" }, L = { key: 0 }, j = { key: 1 }, q = { key: 2 }, E = { key: 3 }, P = { class: "flex flex-col items-start sm:items-end gap-2 shrink-0" }, F = { key: 0 }, O = { key: 1 }, K = { key: 2 }, Q = { key: 3 }, U = { class: "flex flex-col gap-0.5" }, A = { key: 0 }, G = { key: 1 }, H = {
|
|
10
10
|
key: 2,
|
|
11
11
|
class: "text-gray-700 font-medium"
|
|
12
|
-
}, J = { key: 4 },
|
|
12
|
+
}, J = { key: 4 }, R = { key: 1 }, W = { key: 1 }, X = { key: 2 }, Y = { key: 3 }, Z = { class: "flex flex-col gap-0.5" }, ee = { key: 0 }, te = { key: 1 }, oe = {
|
|
13
13
|
key: 4,
|
|
14
14
|
class: "text-xs font-semibold"
|
|
15
|
-
},
|
|
15
|
+
}, ae = { key: 2 }, se = { key: 1 }, ce = { key: 2 }, ne = { key: 3 }, le = { class: "flex flex-col gap-0.5" }, ie = { key: 0 }, de = { key: 1 }, ue = {
|
|
16
16
|
scope: "col",
|
|
17
17
|
class: "invoice-th font-bold"
|
|
18
|
-
},
|
|
18
|
+
}, re = {
|
|
19
19
|
scope: "col",
|
|
20
20
|
class: "invoice-th invoice-text-right font-bold"
|
|
21
|
-
},
|
|
21
|
+
}, me = {
|
|
22
22
|
key: 0,
|
|
23
23
|
scope: "col",
|
|
24
24
|
class: "invoice-th invoice-text-right font-bold"
|
|
25
|
-
},
|
|
25
|
+
}, pe = {
|
|
26
26
|
scope: "col",
|
|
27
27
|
class: "invoice-th invoice-text-right font-bold"
|
|
28
|
-
},
|
|
28
|
+
}, ve = {
|
|
29
29
|
key: 1,
|
|
30
30
|
scope: "col",
|
|
31
31
|
class: "invoice-th invoice-text-right font-bold"
|
|
32
|
-
},
|
|
32
|
+
}, xe = {
|
|
33
33
|
scope: "col",
|
|
34
34
|
class: "invoice-th invoice-text-right font-bold text-gray-900"
|
|
35
|
-
},
|
|
35
|
+
}, fe = { class: "invoice-tbody" }, he = { class: "invoice-td" }, ye = { class: "flex items-center gap-3" }, be = { class: "min-w-0 flex-1" }, ge = ["title"], ke = ["title"], Ie = {
|
|
36
36
|
key: 1,
|
|
37
37
|
class: "block text-xs text-muted-foreground line-clamp-2 max-w-md whitespace-normal mt-0.5 leading-relaxed"
|
|
38
|
-
},
|
|
38
|
+
}, _e = { class: "invoice-td invoice-text-right tabular-nums text-muted-foreground font-semibold text-sm" }, we = {
|
|
39
39
|
key: 0,
|
|
40
40
|
class: "invoice-td invoice-text-right tabular-nums text-muted-foreground text-sm"
|
|
41
|
-
},
|
|
41
|
+
}, ze = { class: "invoice-td invoice-text-right tabular-nums text-muted-foreground font-medium" }, De = {
|
|
42
42
|
key: 1,
|
|
43
43
|
class: "invoice-td invoice-text-right tabular-nums text-success font-bold"
|
|
44
|
-
},
|
|
44
|
+
}, Te = {
|
|
45
45
|
key: 0,
|
|
46
46
|
class: "flex flex-col items-end"
|
|
47
|
-
},
|
|
47
|
+
}, Ne = {
|
|
48
48
|
key: 0,
|
|
49
49
|
class: "text-sm uppercase tracking-wider font-extrabold opacity-80 mt-0.5"
|
|
50
|
-
},
|
|
50
|
+
}, Ve = {
|
|
51
51
|
key: 1,
|
|
52
52
|
class: "text-muted-foreground font-normal"
|
|
53
|
-
},
|
|
53
|
+
}, Be = { class: "invoice-td invoice-text-right tabular-nums font-bold text-foreground" }, Se = { class: "flex flex-row flex-wrap gap-2 items-center" }, $e = {
|
|
54
54
|
key: 0,
|
|
55
55
|
class: "shrink-0 inline-block"
|
|
56
|
-
},
|
|
56
|
+
}, Me = {
|
|
57
57
|
key: 1,
|
|
58
58
|
class: "shrink-0 inline-block overflow-hidden"
|
|
59
|
-
},
|
|
59
|
+
}, Ce = { key: 0 }, Le = { class: "w-full md:w-[42%] min-w-[260px]" }, je = { key: 0 }, qe = { key: 1 }, He = /* @__PURE__ */ _({
|
|
60
60
|
__name: "InvoiceVariant4",
|
|
61
61
|
props: {
|
|
62
62
|
data: {},
|
|
@@ -64,13 +64,13 @@ const $ = { class: "flex flex-col sm:flex-row justify-between items-start gap-4"
|
|
|
64
64
|
displayBarcodeValue: { type: Boolean, default: !1 },
|
|
65
65
|
labels: {}
|
|
66
66
|
},
|
|
67
|
-
setup(
|
|
68
|
-
const h =
|
|
69
|
-
return (
|
|
67
|
+
setup(n) {
|
|
68
|
+
const h = n, e = v(() => h.data), d = v(() => h.labels || {}), y = v(() => e.value.items.some((p) => !!p.size)), b = v(() => e.value.items.some((p) => p.discount !== void 0));
|
|
69
|
+
return (p, Ee) => (o(), a("div", {
|
|
70
70
|
class: "v-invoice-v4 bg-background border border-border text-foreground overflow-hidden rounded-xl font-sans print:shadow-none print:border-none",
|
|
71
71
|
style: w({
|
|
72
|
-
"--invoice-cell-px":
|
|
73
|
-
"--invoice-cell-py":
|
|
72
|
+
"--invoice-cell-px": n.compact ? "0.75rem" : "1rem",
|
|
73
|
+
"--invoice-cell-py": n.compact ? "0.5rem" : "0.75rem",
|
|
74
74
|
"--invoice-thead-bg": "var(--color-muted)",
|
|
75
75
|
"--invoice-thead-border": "1px solid var(--color-border)",
|
|
76
76
|
"--invoice-thead-color": "var(--color-muted-foreground)",
|
|
@@ -79,20 +79,20 @@ const $ = { class: "flex flex-col sm:flex-row justify-between items-start gap-4"
|
|
|
79
79
|
"--invoice-td-valign": "middle"
|
|
80
80
|
})
|
|
81
81
|
}, [
|
|
82
|
-
|
|
83
|
-
class:
|
|
82
|
+
s("div", {
|
|
83
|
+
class: l(["bg-gray-900 text-white", n.compact ? "px-5 py-4" : "px-6 py-5 sm:px-8"])
|
|
84
84
|
}, [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
class:
|
|
85
|
+
s("div", S, [
|
|
86
|
+
s("div", $, [
|
|
87
|
+
s("div", null, [
|
|
88
|
+
s("h1", {
|
|
89
|
+
class: l(["font-black tracking-tighter uppercase leading-none text-white", n.compact ? "text-3xl" : "text-4xl"])
|
|
90
90
|
}, t(e.value.brandTitle || d.value.invoice || "INVOICE"), 3),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
class:
|
|
91
|
+
s("div", M, [
|
|
92
|
+
s("span", {
|
|
93
|
+
class: l(["font-semibold opacity-80", n.compact ? "text-sm" : "text-base"])
|
|
94
94
|
}, " #" + t(e.value.invoiceNumber), 3),
|
|
95
|
-
e.value.status ? (o(),
|
|
95
|
+
e.value.status ? (o(), z(V, {
|
|
96
96
|
key: 0,
|
|
97
97
|
status: e.value.status,
|
|
98
98
|
"hide-icon": "",
|
|
@@ -100,177 +100,221 @@ const $ = { class: "flex flex-col sm:flex-row justify-between items-start gap-4"
|
|
|
100
100
|
}, null, 8, ["status"])) : c("", !0)
|
|
101
101
|
])
|
|
102
102
|
]),
|
|
103
|
-
|
|
104
|
-
e.value.issuedDate ? (o(),
|
|
105
|
-
|
|
106
|
-
class:
|
|
103
|
+
s("div", C, [
|
|
104
|
+
e.value.issuedDate ? (o(), a("div", L, [
|
|
105
|
+
s("p", {
|
|
106
|
+
class: l(["font-semibold uppercase tracking-widest opacity-60", n.compact ? "text-[9px] mb-0.5" : "text-[10px] mb-1"])
|
|
107
107
|
}, t(d.value.issued || "Issue Date"), 3),
|
|
108
|
-
|
|
108
|
+
u(m(g), {
|
|
109
109
|
value: e.value.issuedDate,
|
|
110
110
|
type: "date",
|
|
111
|
-
class:
|
|
111
|
+
class: l(["font-extrabold", n.compact ? "text-sm" : "text-base"])
|
|
112
112
|
}, null, 8, ["value", "class"])
|
|
113
113
|
])) : c("", !0),
|
|
114
|
-
e.value.dueDate ? (o(),
|
|
115
|
-
|
|
116
|
-
class:
|
|
114
|
+
e.value.dueDate ? (o(), a("div", j, [
|
|
115
|
+
s("p", {
|
|
116
|
+
class: l(["font-semibold uppercase tracking-widest opacity-60", n.compact ? "text-[9px] mb-0.5" : "text-[10px] mb-1"])
|
|
117
117
|
}, t(d.value.due || "Due Date"), 3),
|
|
118
|
-
|
|
118
|
+
u(m(g), {
|
|
119
119
|
value: e.value.dueDate,
|
|
120
120
|
type: "date",
|
|
121
|
-
class:
|
|
121
|
+
class: l(["font-extrabold", n.compact ? "text-sm" : "text-base"])
|
|
122
122
|
}, null, 8, ["value", "class"])
|
|
123
|
+
])) : c("", !0),
|
|
124
|
+
e.value.paymentMethod ? (o(), a("div", q, [
|
|
125
|
+
s("p", {
|
|
126
|
+
class: l(["font-semibold uppercase tracking-widest opacity-60", n.compact ? "text-[9px] mb-0.5" : "text-[10px] mb-1"])
|
|
127
|
+
}, t(d.value.paymentMethod || "Payment"), 3),
|
|
128
|
+
s("p", {
|
|
129
|
+
class: l(["font-extrabold", n.compact ? "text-sm" : "text-base"])
|
|
130
|
+
}, t(e.value.paymentMethod), 3)
|
|
131
|
+
])) : c("", !0),
|
|
132
|
+
e.value.shippingMethod ? (o(), a("div", E, [
|
|
133
|
+
s("p", {
|
|
134
|
+
class: l(["font-semibold uppercase tracking-widest opacity-60", n.compact ? "text-[9px] mb-0.5" : "text-[10px] mb-1"])
|
|
135
|
+
}, t(d.value.shippingMethod || "Shipping"), 3),
|
|
136
|
+
s("p", {
|
|
137
|
+
class: l(["font-extrabold", n.compact ? "text-sm" : "text-base"])
|
|
138
|
+
}, t(e.value.shippingMethod), 3)
|
|
123
139
|
])) : c("", !0)
|
|
124
140
|
])
|
|
125
141
|
]),
|
|
126
|
-
|
|
127
|
-
e.value.brandLogo ? (o(),
|
|
142
|
+
s("div", P, [
|
|
143
|
+
e.value.brandLogo ? (o(), a("div", {
|
|
128
144
|
key: 0,
|
|
129
|
-
class:
|
|
145
|
+
class: l(["bg-white/10 rounded-lg p-2 border border-white/20", n.compact ? "h-11" : "h-14"])
|
|
130
146
|
}, [
|
|
131
|
-
|
|
147
|
+
u(k, {
|
|
132
148
|
src: e.value.brandLogo,
|
|
133
149
|
alt: e.value.brandName,
|
|
134
150
|
class: "h-full w-auto object-contain",
|
|
135
151
|
rounded: "sm"
|
|
136
152
|
}, null, 8, ["src", "alt"])
|
|
137
153
|
], 2)) : c("", !0),
|
|
138
|
-
e.value.brandName ? (o(),
|
|
154
|
+
e.value.brandName ? (o(), a("h2", {
|
|
139
155
|
key: 1,
|
|
140
|
-
class:
|
|
156
|
+
class: l(["font-extrabold tracking-tight opacity-90 text-white", n.compact ? "text-base" : "text-lg"])
|
|
141
157
|
}, t(e.value.brandName), 3)) : c("", !0)
|
|
142
158
|
])
|
|
143
159
|
])
|
|
144
160
|
], 2),
|
|
145
|
-
|
|
146
|
-
class: n
|
|
161
|
+
s("div", {
|
|
162
|
+
class: l(n.compact ? "p-5" : "px-7 py-4.5")
|
|
147
163
|
}, [
|
|
148
|
-
|
|
149
|
-
e.value.
|
|
150
|
-
|
|
151
|
-
|
|
164
|
+
s("div", {
|
|
165
|
+
class: l(["grid grid-cols-1 sm:grid-cols-2 gap-5 mb-6", e.value.shippingInfo ? "md:grid-cols-3" : "md:grid-cols-2"])
|
|
166
|
+
}, [
|
|
167
|
+
e.value.companyInfo ? (o(), a("div", F, [
|
|
168
|
+
s("p", {
|
|
169
|
+
class: l(["font-bold text-gray-700 uppercase tracking-widest border-b border-gray-300 pb-1 inline-block mb-2", n.compact ? "text-[10px]" : "text-[11px]"])
|
|
152
170
|
}, t(d.value.from || "From"), 3),
|
|
153
|
-
|
|
154
|
-
class:
|
|
171
|
+
s("div", {
|
|
172
|
+
class: l(["text-muted-foreground leading-relaxed", n.compact ? "text-xs space-y-0.5" : "text-sm space-y-1"])
|
|
155
173
|
}, [
|
|
156
|
-
e.value.companyInfo.name ? (o(),
|
|
174
|
+
e.value.companyInfo.name ? (o(), a("p", {
|
|
157
175
|
key: 0,
|
|
158
|
-
class:
|
|
176
|
+
class: l(["font-extrabold text-foreground", n.compact ? "text-sm mb-0.5" : "text-base mb-1"])
|
|
159
177
|
}, t(e.value.companyInfo.name), 3)) : c("", !0),
|
|
160
|
-
e.value.companyInfo.address ? (o(),
|
|
161
|
-
e.value.companyInfo.city || e.value.companyInfo.state ? (o(),
|
|
162
|
-
|
|
163
|
-
e.value.companyInfo.city && e.value.companyInfo.state ? (o(),
|
|
164
|
-
|
|
178
|
+
e.value.companyInfo.address ? (o(), a("p", O, t(e.value.companyInfo.address), 1)) : c("", !0),
|
|
179
|
+
e.value.companyInfo.city || e.value.companyInfo.state ? (o(), a("p", K, [
|
|
180
|
+
r(t(e.value.companyInfo.city), 1),
|
|
181
|
+
e.value.companyInfo.city && e.value.companyInfo.state ? (o(), a(x, { key: 0 }, [
|
|
182
|
+
r(", ")
|
|
165
183
|
], 64)) : c("", !0),
|
|
166
|
-
|
|
184
|
+
r(t(e.value.companyInfo.state) + " " + t(e.value.companyInfo.zip), 1)
|
|
167
185
|
])) : c("", !0),
|
|
168
|
-
e.value.companyInfo.country ? (o(),
|
|
169
|
-
|
|
170
|
-
e.value.companyInfo.email ? (o(),
|
|
171
|
-
e.value.companyInfo.phone ? (o(),
|
|
172
|
-
e.value.companyInfo.website ? (o(),
|
|
186
|
+
e.value.companyInfo.country ? (o(), a("p", Q, t(e.value.companyInfo.country), 1)) : c("", !0),
|
|
187
|
+
s("div", U, [
|
|
188
|
+
e.value.companyInfo.email ? (o(), a("p", A, t(e.value.companyInfo.email), 1)) : c("", !0),
|
|
189
|
+
e.value.companyInfo.phone ? (o(), a("p", G, t(e.value.companyInfo.phone), 1)) : c("", !0),
|
|
190
|
+
e.value.companyInfo.website ? (o(), a("p", H, t(e.value.companyInfo.website), 1)) : c("", !0)
|
|
173
191
|
]),
|
|
174
|
-
e.value.companyInfo.taxId ? (o(),
|
|
192
|
+
e.value.companyInfo.taxId ? (o(), a("p", J, t(d.value.taxId || "Tax ID") + ": " + t(e.value.companyInfo.taxId), 1)) : c("", !0)
|
|
175
193
|
], 2)
|
|
176
194
|
])) : c("", !0),
|
|
177
|
-
e.value.customerInfo ? (o(),
|
|
178
|
-
|
|
179
|
-
class:
|
|
195
|
+
e.value.customerInfo ? (o(), a("div", R, [
|
|
196
|
+
s("p", {
|
|
197
|
+
class: l(["font-bold text-gray-700 uppercase tracking-widest border-b border-gray-300 pb-1 inline-block mb-2", n.compact ? "text-[10px]" : "text-[11px]"])
|
|
180
198
|
}, t(d.value.billedTo || "Billed To"), 3),
|
|
181
|
-
|
|
182
|
-
class:
|
|
199
|
+
s("div", {
|
|
200
|
+
class: l(["text-muted-foreground leading-relaxed", n.compact ? "text-xs space-y-0.5" : "text-sm space-y-1"])
|
|
183
201
|
}, [
|
|
184
|
-
e.value.customerInfo.name ? (o(),
|
|
202
|
+
e.value.customerInfo.name ? (o(), a("p", {
|
|
185
203
|
key: 0,
|
|
186
|
-
class:
|
|
204
|
+
class: l(["font-extrabold text-foreground", n.compact ? "text-sm mb-0.5" : "text-base mb-1"])
|
|
187
205
|
}, t(e.value.customerInfo.name), 3)) : c("", !0),
|
|
188
|
-
e.value.customerInfo.address ? (o(),
|
|
189
|
-
e.value.customerInfo.city || e.value.customerInfo.state ? (o(),
|
|
190
|
-
|
|
191
|
-
e.value.customerInfo.city && e.value.customerInfo.state ? (o(),
|
|
192
|
-
|
|
206
|
+
e.value.customerInfo.address ? (o(), a("p", W, t(e.value.customerInfo.address), 1)) : c("", !0),
|
|
207
|
+
e.value.customerInfo.city || e.value.customerInfo.state ? (o(), a("p", X, [
|
|
208
|
+
r(t(e.value.customerInfo.city), 1),
|
|
209
|
+
e.value.customerInfo.city && e.value.customerInfo.state ? (o(), a(x, { key: 0 }, [
|
|
210
|
+
r(", ")
|
|
193
211
|
], 64)) : c("", !0),
|
|
194
|
-
|
|
212
|
+
r(t(e.value.customerInfo.state) + " " + t(e.value.customerInfo.zip), 1)
|
|
195
213
|
])) : c("", !0),
|
|
196
|
-
e.value.customerInfo.country ? (o(),
|
|
197
|
-
|
|
198
|
-
e.value.customerInfo.email ? (o(),
|
|
199
|
-
e.value.customerInfo.phone ? (o(),
|
|
214
|
+
e.value.customerInfo.country ? (o(), a("p", Y, t(e.value.customerInfo.country), 1)) : c("", !0),
|
|
215
|
+
s("div", Z, [
|
|
216
|
+
e.value.customerInfo.email ? (o(), a("p", ee, t(e.value.customerInfo.email), 1)) : c("", !0),
|
|
217
|
+
e.value.customerInfo.phone ? (o(), a("p", te, t(e.value.customerInfo.phone), 1)) : c("", !0)
|
|
200
218
|
]),
|
|
201
|
-
e.value.customerInfo.taxId ? (o(),
|
|
219
|
+
e.value.customerInfo.taxId ? (o(), a("p", oe, t(d.value.taxId || "Tax ID") + ": " + t(e.value.customerInfo.taxId), 1)) : c("", !0)
|
|
220
|
+
], 2)
|
|
221
|
+
])) : c("", !0),
|
|
222
|
+
e.value.shippingInfo ? (o(), a("div", ae, [
|
|
223
|
+
s("p", {
|
|
224
|
+
class: l(["font-bold text-gray-700 uppercase tracking-widest border-b border-gray-300 pb-1 inline-block mb-2", n.compact ? "text-[10px]" : "text-[11px]"])
|
|
225
|
+
}, t(d.value.shipTo || "Ship To"), 3),
|
|
226
|
+
s("div", {
|
|
227
|
+
class: l(["text-muted-foreground leading-relaxed", n.compact ? "text-xs space-y-0.5" : "text-sm space-y-1"])
|
|
228
|
+
}, [
|
|
229
|
+
e.value.shippingInfo.name ? (o(), a("p", {
|
|
230
|
+
key: 0,
|
|
231
|
+
class: l(["font-extrabold text-foreground", n.compact ? "text-sm mb-0.5" : "text-base mb-1"])
|
|
232
|
+
}, t(e.value.shippingInfo.name), 3)) : c("", !0),
|
|
233
|
+
e.value.shippingInfo.address ? (o(), a("p", se, t(e.value.shippingInfo.address), 1)) : c("", !0),
|
|
234
|
+
e.value.shippingInfo.city || e.value.shippingInfo.state ? (o(), a("p", ce, [
|
|
235
|
+
r(t(e.value.shippingInfo.city), 1),
|
|
236
|
+
e.value.shippingInfo.city && e.value.shippingInfo.state ? (o(), a(x, { key: 0 }, [
|
|
237
|
+
r(", ")
|
|
238
|
+
], 64)) : c("", !0),
|
|
239
|
+
r(t(e.value.shippingInfo.state) + " " + t(e.value.shippingInfo.zip), 1)
|
|
240
|
+
])) : c("", !0),
|
|
241
|
+
e.value.shippingInfo.country ? (o(), a("p", ne, t(e.value.shippingInfo.country), 1)) : c("", !0),
|
|
242
|
+
s("div", le, [
|
|
243
|
+
e.value.shippingInfo.email ? (o(), a("p", ie, t(e.value.shippingInfo.email), 1)) : c("", !0),
|
|
244
|
+
e.value.shippingInfo.phone ? (o(), a("p", de, t(e.value.shippingInfo.phone), 1)) : c("", !0)
|
|
245
|
+
])
|
|
202
246
|
], 2)
|
|
203
247
|
])) : c("", !0)
|
|
204
|
-
]),
|
|
205
|
-
|
|
206
|
-
class:
|
|
248
|
+
], 2),
|
|
249
|
+
s("div", {
|
|
250
|
+
class: l(["border border-border rounded-lg overflow-x-auto", n.compact ? "mb-5" : "mb-6"])
|
|
207
251
|
}, [
|
|
208
|
-
|
|
209
|
-
class:
|
|
252
|
+
s("table", {
|
|
253
|
+
class: l(["invoice-table", n.compact ? "text-xs" : "text-sm"])
|
|
210
254
|
}, [
|
|
211
|
-
|
|
212
|
-
class:
|
|
255
|
+
s("thead", {
|
|
256
|
+
class: l(["invoice-thead uppercase", n.compact ? "text-[9px]" : "text-[10px]"])
|
|
213
257
|
}, [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
258
|
+
s("tr", null, [
|
|
259
|
+
s("th", ue, t(d.value.item || "Product"), 1),
|
|
260
|
+
s("th", re, t(d.value.qty || "Qty"), 1),
|
|
261
|
+
y.value ? (o(), a("th", me, t(d.value.size || "Size"), 1)) : c("", !0),
|
|
262
|
+
s("th", pe, t(d.value.price || "Price"), 1),
|
|
263
|
+
b.value ? (o(), a("th", ve, t(d.value.discount || "Discount"), 1)) : c("", !0),
|
|
264
|
+
s("th", xe, t(d.value.total || "Total"), 1)
|
|
221
265
|
])
|
|
222
266
|
], 2),
|
|
223
|
-
|
|
224
|
-
(o(!0),
|
|
225
|
-
key: i.id ||
|
|
267
|
+
s("tbody", fe, [
|
|
268
|
+
(o(!0), a(x, null, D(e.value.items, (i, I) => (o(), a("tr", {
|
|
269
|
+
key: i.id || I,
|
|
226
270
|
class: "invoice-tr group"
|
|
227
271
|
}, [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
i.thumbnail ? (o(),
|
|
272
|
+
s("td", he, [
|
|
273
|
+
s("div", ye, [
|
|
274
|
+
i.thumbnail ? (o(), a("div", {
|
|
231
275
|
key: 0,
|
|
232
|
-
class:
|
|
276
|
+
class: l(["shrink-0 overflow-hidden border border-border", n.compact ? "w-9 h-9 rounded-md" : "w-10 h-10 rounded-lg"])
|
|
233
277
|
}, [
|
|
234
|
-
|
|
278
|
+
u(k, {
|
|
235
279
|
src: i.thumbnail,
|
|
236
280
|
alt: i.name,
|
|
237
281
|
class: "w-full h-full",
|
|
238
282
|
rounded: "sm"
|
|
239
283
|
}, null, 8, ["src", "alt"])
|
|
240
284
|
], 2)) : c("", !0),
|
|
241
|
-
|
|
242
|
-
|
|
285
|
+
s("div", be, [
|
|
286
|
+
s("span", {
|
|
243
287
|
class: "block truncate font-semibold text-foreground text-sm",
|
|
244
288
|
title: i.name
|
|
245
|
-
}, t(i.name), 9,
|
|
246
|
-
i.sku ? (o(),
|
|
289
|
+
}, t(i.name), 9, ge),
|
|
290
|
+
i.sku ? (o(), a("div", {
|
|
247
291
|
key: 0,
|
|
248
292
|
class: "text-xs uppercase tracking-widest text-muted-foreground font-medium truncate mt-0.5",
|
|
249
293
|
title: i.sku
|
|
250
|
-
}, t(d.value.sku || "SKU") + ": " + t(i.sku), 9,
|
|
251
|
-
i.description && !
|
|
294
|
+
}, t(d.value.sku || "SKU") + ": " + t(i.sku), 9, ke)) : c("", !0),
|
|
295
|
+
i.description && !n.compact ? (o(), a("span", Ie, t(i.description), 1)) : c("", !0)
|
|
252
296
|
])
|
|
253
297
|
])
|
|
254
298
|
]),
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
299
|
+
s("td", _e, t(i.quantity), 1),
|
|
300
|
+
y.value ? (o(), a("td", we, t(i.size || "-"), 1)) : c("", !0),
|
|
301
|
+
s("td", ze, [
|
|
302
|
+
u(m(f), {
|
|
259
303
|
value: i.price,
|
|
260
304
|
class: "text-sm"
|
|
261
305
|
}, null, 8, ["value"])
|
|
262
306
|
]),
|
|
263
|
-
|
|
264
|
-
i.discount !== void 0 ? (o(),
|
|
265
|
-
|
|
307
|
+
b.value ? (o(), a("td", De, [
|
|
308
|
+
i.discount !== void 0 ? (o(), a("div", Te, [
|
|
309
|
+
u(m(f), {
|
|
266
310
|
value: -i.discount,
|
|
267
311
|
class: "text-sm"
|
|
268
312
|
}, null, 8, ["value"]),
|
|
269
|
-
i.discountLabel ? (o(),
|
|
270
|
-
])) : (o(),
|
|
313
|
+
i.discountLabel ? (o(), a("span", Ne, t(i.discountLabel), 1)) : c("", !0)
|
|
314
|
+
])) : (o(), a("span", Ve, "-"))
|
|
271
315
|
])) : c("", !0),
|
|
272
|
-
|
|
273
|
-
|
|
316
|
+
s("td", Be, [
|
|
317
|
+
u(m(f), {
|
|
274
318
|
value: i.total,
|
|
275
319
|
class: "text-sm"
|
|
276
320
|
}, null, 8, ["value"])
|
|
@@ -279,55 +323,55 @@ const $ = { class: "flex flex-col sm:flex-row justify-between items-start gap-4"
|
|
|
279
323
|
])
|
|
280
324
|
], 2)
|
|
281
325
|
], 2),
|
|
282
|
-
|
|
283
|
-
class:
|
|
326
|
+
s("div", {
|
|
327
|
+
class: l(["flex flex-col-reverse md:flex-row justify-between items-start", n.compact ? "gap-5" : "gap-6"])
|
|
284
328
|
}, [
|
|
285
|
-
|
|
286
|
-
class:
|
|
329
|
+
s("div", {
|
|
330
|
+
class: l(["w-full md:w-1/2 flex flex-col", n.compact ? "gap-3" : "gap-4"])
|
|
287
331
|
}, [
|
|
288
|
-
|
|
289
|
-
e.value.qrcode ? (o(),
|
|
290
|
-
|
|
332
|
+
s("div", Se, [
|
|
333
|
+
e.value.qrcode ? (o(), a("div", $e, [
|
|
334
|
+
u(m(N), {
|
|
291
335
|
value: e.value.qrcode,
|
|
292
|
-
size:
|
|
336
|
+
size: n.compact ? 56 : 72
|
|
293
337
|
}, null, 8, ["value", "size"])
|
|
294
338
|
])) : c("", !0),
|
|
295
|
-
e.value.barcode ? (o(),
|
|
296
|
-
|
|
339
|
+
e.value.barcode ? (o(), a("div", Me, [
|
|
340
|
+
u(m(T), {
|
|
297
341
|
value: e.value.barcode,
|
|
298
342
|
format: "CODE128",
|
|
299
|
-
height:
|
|
300
|
-
width:
|
|
301
|
-
"display-value":
|
|
343
|
+
height: n.compact ? 28 : 40,
|
|
344
|
+
width: n.compact ? 1.3 : 1.5,
|
|
345
|
+
"display-value": n.displayBarcodeValue
|
|
302
346
|
}, null, 8, ["value", "height", "width", "display-value"])
|
|
303
347
|
])) : c("", !0)
|
|
304
348
|
]),
|
|
305
|
-
e.value.notes ? (o(),
|
|
306
|
-
|
|
307
|
-
class:
|
|
349
|
+
e.value.notes ? (o(), a("div", Ce, [
|
|
350
|
+
s("h4", {
|
|
351
|
+
class: l(["font-bold text-muted-foreground uppercase tracking-widest mb-1.5", n.compact ? "text-[9px]" : "text-[10px]"])
|
|
308
352
|
}, t(d.value.notes || "Notes & Terms"), 3),
|
|
309
|
-
|
|
310
|
-
class:
|
|
353
|
+
s("div", {
|
|
354
|
+
class: l(["text-muted-foreground leading-relaxed whitespace-pre-wrap p-3 bg-muted/30 rounded-lg border border-border", n.compact ? "text-xs max-w-xs" : "text-xs max-w-sm"])
|
|
311
355
|
}, t(e.value.notes), 3)
|
|
312
356
|
])) : c("", !0)
|
|
313
357
|
], 2),
|
|
314
|
-
|
|
315
|
-
|
|
358
|
+
s("div", Le, [
|
|
359
|
+
u(B, {
|
|
316
360
|
totals: e.value.totals,
|
|
317
|
-
compact:
|
|
361
|
+
compact: n.compact,
|
|
318
362
|
variant: "Variant4"
|
|
319
363
|
}, null, 8, ["totals", "compact"])
|
|
320
364
|
])
|
|
321
365
|
], 2)
|
|
322
366
|
], 2),
|
|
323
|
-
|
|
324
|
-
class:
|
|
367
|
+
s("div", {
|
|
368
|
+
class: l(["bg-gray-900 text-white flex justify-center font-bold uppercase tracking-widest", n.compact ? "py-2 px-4 text-[9px]" : "py-2.5 px-6 text-[10px]"])
|
|
325
369
|
}, [
|
|
326
|
-
e.value.footerText ? (o(),
|
|
370
|
+
e.value.footerText ? (o(), a("span", je, t(e.value.footerText), 1)) : (o(), a("span", qe, "Thank you for your business"))
|
|
327
371
|
], 2)
|
|
328
372
|
], 4));
|
|
329
373
|
}
|
|
330
374
|
});
|
|
331
375
|
export {
|
|
332
|
-
|
|
376
|
+
He as default
|
|
333
377
|
};
|
|
@@ -67,8 +67,14 @@ export interface InvoiceData {
|
|
|
67
67
|
issuedDate?: string | Date;
|
|
68
68
|
/** Due date of the invoice */
|
|
69
69
|
dueDate?: string | Date;
|
|
70
|
-
/** Customer details */
|
|
70
|
+
/** Customer details (Bill To) */
|
|
71
71
|
customerInfo?: InvoiceCustomerInfo;
|
|
72
|
+
/** Shipping details (Ship To) */
|
|
73
|
+
shippingInfo?: InvoiceCustomerInfo;
|
|
74
|
+
/** Payment method used or expected */
|
|
75
|
+
paymentMethod?: string;
|
|
76
|
+
/** Shipping method used or expected */
|
|
77
|
+
shippingMethod?: string;
|
|
72
78
|
/** Array of line items */
|
|
73
79
|
items: InvoiceLineItem[];
|
|
74
80
|
/** Array of totals to display at the bottom */
|
|
@@ -89,6 +95,7 @@ export interface InvoiceLabels {
|
|
|
89
95
|
due?: string;
|
|
90
96
|
from?: string;
|
|
91
97
|
billedTo?: string;
|
|
98
|
+
shipTo?: string;
|
|
92
99
|
status?: string;
|
|
93
100
|
item?: string;
|
|
94
101
|
price?: string;
|
|
@@ -99,6 +106,8 @@ export interface InvoiceLabels {
|
|
|
99
106
|
notes?: string;
|
|
100
107
|
sku?: string;
|
|
101
108
|
taxId?: string;
|
|
109
|
+
paymentMethod?: string;
|
|
110
|
+
shippingMethod?: string;
|
|
102
111
|
}
|
|
103
112
|
export interface InvoiceProps {
|
|
104
113
|
data: InvoiceData;
|