vlite3 1.4.17 → 1.4.19
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/CategoryManager/CategoryManager.vue2.js +1 -1
- package/components/Chart/BarChart.vue.d.ts +2 -0
- package/components/Chart/BarChart.vue.js +165 -150
- package/components/Chart/types.d.ts +2 -0
- package/components/Chart/utils.js +45 -41
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/Invoice/InvoiceVariant1.vue.js +8 -8
- package/components/Invoice/InvoiceVariant2.vue.js +9 -9
- package/components/Invoice/InvoiceVariant3.vue.js +7 -7
- package/components/Invoice/InvoiceVariant4.vue.js +56 -56
- package/components/Invoice/types.d.ts +2 -0
- package/components/QRCode/QRCode.vue.d.ts +4 -10
- package/components/QRCode/QRCode.vue.js +45 -15
- package/components/QRCode/index.d.ts +1 -0
- package/components/QRCode/types.d.ts +14 -0
- package/components/ScaleGenerator/ScaleGenerator.vue.d.ts +1 -1
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/Tabes/Tabes.vue.js +1 -1
- package/components/Tabes/Tabes.vue2.js +29 -29
- package/components/ThemeToggle.vue.d.ts +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
|
@@ -6,7 +6,7 @@ const d = [
|
|
|
6
6
|
"var(--color-chart-5)",
|
|
7
7
|
"var(--color-chart-6)"
|
|
8
8
|
];
|
|
9
|
-
function
|
|
9
|
+
function F(t) {
|
|
10
10
|
return {
|
|
11
11
|
primary: "var(--color-primary)",
|
|
12
12
|
success: "var(--color-success)",
|
|
@@ -20,72 +20,76 @@ function x(t) {
|
|
|
20
20
|
cyan: "#06b6d4"
|
|
21
21
|
}[t] ?? t;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return t[
|
|
23
|
+
function C(t, r) {
|
|
24
|
+
return t[r % t.length];
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function k(t) {
|
|
27
27
|
return Math.abs(t) >= 1e6 ? (t / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : Math.abs(t) >= 1e3 ? (t / 1e3).toFixed(1).replace(/\.0$/, "") + "k" : String(t);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return Math.max(
|
|
29
|
+
function M(t, r, a) {
|
|
30
|
+
return Math.max(r, Math.min(a, t));
|
|
31
31
|
}
|
|
32
32
|
function w(t) {
|
|
33
33
|
if (t.length < 2) return "";
|
|
34
34
|
if (t.length === 2)
|
|
35
35
|
return `M ${t[0][0]},${t[0][1]} L ${t[1][0]},${t[1][1]}`;
|
|
36
|
-
const
|
|
37
|
-
for (let
|
|
38
|
-
const
|
|
39
|
-
|
|
36
|
+
const r = [`M ${t[0][0]},${t[0][1]}`];
|
|
37
|
+
for (let a = 0; a < t.length - 1; a++) {
|
|
38
|
+
const c = t[Math.max(0, a - 1)], n = t[a], o = t[a + 1], i = t[Math.min(t.length - 1, a + 2)], e = n[0] + (o[0] - c[0]) / 6;
|
|
39
|
+
let s = n[1] + (o[1] - c[1]) / 6;
|
|
40
|
+
const u = o[0] - (i[0] - n[0]) / 6;
|
|
41
|
+
let h = o[1] - (i[1] - n[1]) / 6;
|
|
42
|
+
const $ = Math.min(n[1], o[1]), l = Math.max(n[1], o[1]);
|
|
43
|
+
s = M(s, $, l), h = M(h, $, l), r.push(`C ${e},${s} ${u},${h} ${o[0]},${o[1]}`);
|
|
40
44
|
}
|
|
41
|
-
return
|
|
45
|
+
return r.join(" ");
|
|
42
46
|
}
|
|
43
47
|
function y(t) {
|
|
44
|
-
return t.length === 0 ? "" : t.map(([
|
|
48
|
+
return t.length === 0 ? "" : t.map(([r, a], c) => `${c === 0 ? "M" : "L"} ${r},${a}`).join(" ");
|
|
45
49
|
}
|
|
46
|
-
function L(t, a,
|
|
47
|
-
Math.abs(
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
return `M ${t},${
|
|
51
|
-
const
|
|
50
|
+
function L(t, r, a, c, n, o = 0) {
|
|
51
|
+
Math.abs(n - c) >= 360 && (n -= 0.01);
|
|
52
|
+
const i = (b) => b * Math.PI / 180, e = i(c), s = i(n), u = n - c > 180 ? 1 : 0, h = t + a * Math.cos(e), $ = r + a * Math.sin(e), l = t + a * Math.cos(s), f = r + a * Math.sin(s);
|
|
53
|
+
if (o <= 0)
|
|
54
|
+
return `M ${t},${r} L ${h},${$} A ${a},${a} 0 ${u} 1 ${l},${f} Z`;
|
|
55
|
+
const m = t + o * Math.cos(s), g = r + o * Math.sin(s), p = t + o * Math.cos(e), v = r + o * Math.sin(e);
|
|
52
56
|
return [
|
|
53
|
-
`M ${
|
|
54
|
-
`A ${
|
|
55
|
-
`L ${
|
|
56
|
-
`A ${
|
|
57
|
+
`M ${h},${$}`,
|
|
58
|
+
`A ${a},${a} 0 ${u} 1 ${l},${f}`,
|
|
59
|
+
`L ${m},${g}`,
|
|
60
|
+
`A ${o},${o} 0 ${u} 0 ${p},${v}`,
|
|
57
61
|
"Z"
|
|
58
62
|
].join(" ");
|
|
59
63
|
}
|
|
60
|
-
function P(t,
|
|
61
|
-
const
|
|
62
|
-
let
|
|
63
|
-
for (;
|
|
64
|
-
|
|
65
|
-
return
|
|
64
|
+
function P(t, r, a = 5) {
|
|
65
|
+
const n = (r - t || 1) / (a - 1), o = Math.pow(10, Math.floor(Math.log10(n))), e = ([1, 2, 2.5, 5, 10].find(($) => $ * o >= n) ?? 10) * o, s = Math.floor(t / e) * e, u = [];
|
|
66
|
+
let h = s;
|
|
67
|
+
for (; u.push(parseFloat(h.toFixed(10))), !(h >= r); )
|
|
68
|
+
h += e;
|
|
69
|
+
return u;
|
|
66
70
|
}
|
|
67
|
-
function
|
|
71
|
+
function x(t) {
|
|
68
72
|
return 1 - Math.pow(1 - t, 3);
|
|
69
73
|
}
|
|
70
|
-
function j(t,
|
|
71
|
-
let
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
const e =
|
|
75
|
-
|
|
74
|
+
function j(t, r, a) {
|
|
75
|
+
let c = null, n;
|
|
76
|
+
const o = (i) => {
|
|
77
|
+
c === null && (c = i);
|
|
78
|
+
const e = i - c, s = x(Math.min(e / t, 1));
|
|
79
|
+
r(s), e < t && (n = requestAnimationFrame(o));
|
|
76
80
|
};
|
|
77
|
-
return
|
|
81
|
+
return n = requestAnimationFrame(o), () => cancelAnimationFrame(n);
|
|
78
82
|
}
|
|
79
83
|
export {
|
|
80
84
|
d as CHART_COLORS,
|
|
81
85
|
j as animateProgress,
|
|
82
86
|
L as arcPath,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
M as clamp,
|
|
88
|
+
x as easeOutCubic,
|
|
89
|
+
k as formatNumber,
|
|
90
|
+
C as getColor,
|
|
87
91
|
y as linearPath,
|
|
88
92
|
P as niceYTicks,
|
|
89
|
-
|
|
93
|
+
F as resolveColor,
|
|
90
94
|
w as smoothPath
|
|
91
95
|
};
|
|
@@ -7,8 +7,8 @@ import "../../core/config.js";
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
import E from "../Button.vue.js";
|
|
10
|
-
import _ from "./ColorIro.
|
|
11
|
-
/* empty css
|
|
10
|
+
import _ from "./ColorIro.vue.js";
|
|
11
|
+
/* empty css */
|
|
12
12
|
import { useEyeDropper as I } from "@vueuse/core";
|
|
13
13
|
const N = { class: "absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center z-20 pointer-events-none" }, j = {
|
|
14
14
|
key: 0,
|
|
@@ -6,7 +6,7 @@ import N from "../QRCode/QRCode.vue.js";
|
|
|
6
6
|
import k from "../Avatar.vue.js";
|
|
7
7
|
import M from "../StatusChip/StatusChip.vue.js";
|
|
8
8
|
import B from "./InvoiceTotals.vue.js";
|
|
9
|
-
const
|
|
9
|
+
const S = { class: "flex items-center justify-between gap-3" }, V = { class: "shrink-0" }, $ = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "flex items-center gap-3 border-r-[1.5px] pr-3 border-gray-300"
|
|
12
12
|
}, q = { class: "text-muted-foreground uppercase tracking-wider font-medium" }, C = {
|
|
@@ -77,10 +77,10 @@ const V = { class: "flex items-center justify-between gap-3" }, S = { class: "sh
|
|
|
77
77
|
}, Be = {
|
|
78
78
|
key: 0,
|
|
79
79
|
class: "shrink-0"
|
|
80
|
-
},
|
|
80
|
+
}, Se = {
|
|
81
81
|
key: 1,
|
|
82
82
|
class: "shrink-0"
|
|
83
|
-
},
|
|
83
|
+
}, Ve = { class: "w-full lg:w-2/5 min-w-[220px]" }, Ke = /* @__PURE__ */ _({
|
|
84
84
|
__name: "InvoiceVariant1",
|
|
85
85
|
props: {
|
|
86
86
|
data: {},
|
|
@@ -104,8 +104,8 @@ const V = { class: "flex items-center justify-between gap-3" }, S = { class: "sh
|
|
|
104
104
|
c("div", {
|
|
105
105
|
class: l(["border-b border-border", n.compact ? "px-5 py-3" : "px-6 pt-5 pb-3.5"])
|
|
106
106
|
}, [
|
|
107
|
-
c("div",
|
|
108
|
-
c("div",
|
|
107
|
+
c("div", S, [
|
|
108
|
+
c("div", V, [
|
|
109
109
|
c("div", {
|
|
110
110
|
class: l(n.compact ? "h-10 w-10" : "h-13 w-13")
|
|
111
111
|
}, [
|
|
@@ -361,10 +361,10 @@ const V = { class: "flex items-center justify-between gap-3" }, S = { class: "sh
|
|
|
361
361
|
e.value.qrcode ? (o(), a("div", Be, [
|
|
362
362
|
d(m(N), {
|
|
363
363
|
value: e.value.qrcode,
|
|
364
|
-
size: n.compact ? 48 : 56
|
|
364
|
+
size: e.value.qrcodeSize ?? (n.compact ? 48 : 56)
|
|
365
365
|
}, null, 8, ["value", "size"])
|
|
366
366
|
])) : s("", !0),
|
|
367
|
-
e.value.barcode ? (o(), a("div",
|
|
367
|
+
e.value.barcode ? (o(), a("div", Se, [
|
|
368
368
|
d(m(T), {
|
|
369
369
|
value: e.value.barcode,
|
|
370
370
|
format: "CODE128",
|
|
@@ -375,7 +375,7 @@ const V = { class: "flex items-center justify-between gap-3" }, S = { class: "sh
|
|
|
375
375
|
])) : s("", !0)
|
|
376
376
|
])) : s("", !0)
|
|
377
377
|
], 2),
|
|
378
|
-
c("div",
|
|
378
|
+
c("div", Ve, [
|
|
379
379
|
d(B, {
|
|
380
380
|
totals: e.value.totals,
|
|
381
381
|
compact: n.compact,
|
|
@@ -9,10 +9,10 @@ import z from "./InvoiceTotals.vue.js";
|
|
|
9
9
|
const N = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "flex justify-center mb-2"
|
|
12
|
-
}, T = { key: 0 }, V = { key: 1 }, B = { key: 2 },
|
|
12
|
+
}, T = { key: 0 }, V = { key: 1 }, B = { key: 2 }, S = { key: 3 }, $ = { class: "flex justify-between items-center" }, D = { class: "text-muted-foreground font-medium" }, M = { class: "font-semibold text-foreground" }, L = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "flex justify-between items-center"
|
|
15
|
-
},
|
|
15
|
+
}, q = { class: "text-muted-foreground font-medium" }, C = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "flex justify-between items-start mt-1.5"
|
|
18
18
|
}, E = { class: "text-muted-foreground font-medium shrink-0 mr-4" }, A = { class: "text-right flex flex-col" }, F = { class: "font-semibold text-foreground" }, K = {
|
|
@@ -96,7 +96,7 @@ const N = {
|
|
|
96
96
|
e.value.companyInfo.address ? (a(), o("p", T, t(e.value.companyInfo.address), 1)) : l("", !0),
|
|
97
97
|
e.value.companyInfo.city || e.value.companyInfo.state ? (a(), o("p", V, t(e.value.companyInfo.city) + " " + t(e.value.companyInfo.state) + " " + t(e.value.companyInfo.zip), 1)) : l("", !0),
|
|
98
98
|
e.value.companyInfo.phone ? (a(), o("p", B, t(e.value.companyInfo.phone), 1)) : l("", !0),
|
|
99
|
-
e.value.companyInfo.taxId ? (a(), o("p",
|
|
99
|
+
e.value.companyInfo.taxId ? (a(), o("p", S, t(d.value.taxId || "VAT") + ": " + t(e.value.companyInfo.taxId), 1)) : l("", !0)
|
|
100
100
|
], 2)) : l("", !0)
|
|
101
101
|
], 2),
|
|
102
102
|
s("div", {
|
|
@@ -105,19 +105,19 @@ const N = {
|
|
|
105
105
|
s("div", {
|
|
106
106
|
class: c(n.compact ? "px-4 py-2.5 space-y-1 text-xs" : "px-5 py-3.5 space-y-1.5 text-sm")
|
|
107
107
|
}, [
|
|
108
|
-
s("div",
|
|
109
|
-
s("span",
|
|
110
|
-
s("span",
|
|
108
|
+
s("div", $, [
|
|
109
|
+
s("span", D, t(d.value.invoiceNumber || "Receipt #"), 1),
|
|
110
|
+
s("span", M, t(e.value.invoiceNumber), 1)
|
|
111
111
|
]),
|
|
112
112
|
e.value.issuedDate ? (a(), o("div", L, [
|
|
113
|
-
s("span",
|
|
113
|
+
s("span", q, t(d.value.issued || "Date"), 1),
|
|
114
114
|
i(r(_), {
|
|
115
115
|
value: e.value.issuedDate,
|
|
116
116
|
type: "dateTime",
|
|
117
117
|
class: "font-medium text-foreground"
|
|
118
118
|
}, null, 8, ["value"])
|
|
119
119
|
])) : l("", !0),
|
|
120
|
-
e.value.customerInfo?.name ? (a(), o("div",
|
|
120
|
+
e.value.customerInfo?.name ? (a(), o("div", C, [
|
|
121
121
|
s("span", E, t(d.value.billedTo || "Bill To"), 1),
|
|
122
122
|
s("div", A, [
|
|
123
123
|
s("span", F, t(e.value.customerInfo.name), 1),
|
|
@@ -236,7 +236,7 @@ const N = {
|
|
|
236
236
|
e.value.qrcode ? (a(), o("div", fe, [
|
|
237
237
|
i(r(w), {
|
|
238
238
|
value: e.value.qrcode,
|
|
239
|
-
size: n.compact ? 48 : 64
|
|
239
|
+
size: e.value.qrcodeSize ?? (n.compact ? 48 : 64)
|
|
240
240
|
}, null, 8, ["value", "size"])
|
|
241
241
|
])) : l("", !0),
|
|
242
242
|
e.value.barcode ? (a(), o("div", pe, [
|
|
@@ -9,7 +9,7 @@ import B from "./InvoiceTotals.vue.js";
|
|
|
9
9
|
const S = { class: "flex items-center gap-3" }, V = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "shrink-0"
|
|
12
|
-
}, $ = { class: "flex flex-col leading-tight" },
|
|
12
|
+
}, $ = { class: "flex flex-col leading-tight" }, q = { class: "flex items-center gap-3" }, M = { key: 0 }, L = { class: "mt-0.5 text-muted-foreground space-y-0.5 text-xs" }, C = { key: 0 }, j = { key: 1 }, E = { key: 2 }, P = {
|
|
13
13
|
key: 3,
|
|
14
14
|
class: "pt-0.5"
|
|
15
15
|
}, F = { key: 1 }, K = { class: "mt-0.5 text-muted-foreground space-y-0.5 text-xs" }, O = { key: 0 }, Q = { key: 1 }, U = { key: 2 }, A = { key: 2 }, G = { class: "mt-0.5 text-muted-foreground space-y-0.5 text-xs" }, H = { key: 0 }, J = { key: 1 }, R = { key: 2 }, W = { key: 3 }, X = { key: 4 }, Y = { class: "flex flex-col md:items-end gap-2" }, Z = {
|
|
@@ -54,7 +54,7 @@ const S = { class: "flex items-center gap-3" }, V = {
|
|
|
54
54
|
}, Be = { class: "invoice-td invoice-text-right tabular-nums font-semibold text-foreground" }, Se = {
|
|
55
55
|
key: 0,
|
|
56
56
|
class: "text-muted-foreground text-xs border-t border-border pt-3"
|
|
57
|
-
}, Ve = { class: "text-foreground" }, $e = { class: "whitespace-pre-wrap" },
|
|
57
|
+
}, Ve = { class: "text-foreground" }, $e = { class: "whitespace-pre-wrap" }, qe = {
|
|
58
58
|
key: 1,
|
|
59
59
|
class: "text-center text-muted-foreground opacity-70 text-xs"
|
|
60
60
|
}, Qe = /* @__PURE__ */ b({
|
|
@@ -67,7 +67,7 @@ const S = { class: "flex items-center gap-3" }, V = {
|
|
|
67
67
|
},
|
|
68
68
|
setup(n) {
|
|
69
69
|
const f = n, e = v(() => f.data), d = v(() => f.labels || {}), h = v(() => e.value.items.some((m) => !!m.size)), x = v(() => e.value.items.some((m) => m.discount !== void 0));
|
|
70
|
-
return (m,
|
|
70
|
+
return (m, Me) => (s(), a("div", {
|
|
71
71
|
class: i(["v-invoice-v3 bg-background text-foreground border border-border rounded-lg overflow-hidden", n.compact ? "text-xs" : "text-sm"]),
|
|
72
72
|
style: k({
|
|
73
73
|
"--invoice-cell-px": n.compact ? "0.75rem" : "1rem",
|
|
@@ -100,7 +100,7 @@ const S = { class: "flex items-center gap-3" }, V = {
|
|
|
100
100
|
}, t(e.value.brandTitle), 3)) : c("", !0)
|
|
101
101
|
])
|
|
102
102
|
]),
|
|
103
|
-
o("div",
|
|
103
|
+
o("div", q, [
|
|
104
104
|
o("span", {
|
|
105
105
|
class: i(["opacity-80 font-medium", n.compact ? "text-xs" : "text-sm"])
|
|
106
106
|
}, "#" + t(e.value.invoiceNumber), 3),
|
|
@@ -118,7 +118,7 @@ const S = { class: "flex items-center gap-3" }, V = {
|
|
|
118
118
|
o("div", {
|
|
119
119
|
class: i(["grid grid-cols-1 sm:grid-cols-2", [e.value.shippingInfo ? "md:grid-cols-4" : "md:grid-cols-3", n.compact ? "gap-3" : "gap-5"]])
|
|
120
120
|
}, [
|
|
121
|
-
e.value.companyInfo ? (s(), a("div",
|
|
121
|
+
e.value.companyInfo ? (s(), a("div", M, [
|
|
122
122
|
o("p", {
|
|
123
123
|
class: i(["text-muted-foreground uppercase tracking-widest font-semibold mb-1.5", n.compact ? "text-[9px]" : "text-[10px]"])
|
|
124
124
|
}, t(d.value.from || "From"), 3),
|
|
@@ -189,7 +189,7 @@ const S = { class: "flex items-center gap-3" }, V = {
|
|
|
189
189
|
e.value.qrcode ? (s(), a("div", ue, [
|
|
190
190
|
u(r(D), {
|
|
191
191
|
value: e.value.qrcode,
|
|
192
|
-
size: n.compact ? 40 : 48
|
|
192
|
+
size: e.value.qrcodeSize ?? (n.compact ? 40 : 48)
|
|
193
193
|
}, null, 8, ["value", "size"])
|
|
194
194
|
])) : c("", !0),
|
|
195
195
|
e.value.barcode ? (s(), a("div", re, [
|
|
@@ -301,7 +301,7 @@ const S = { class: "flex items-center gap-3" }, V = {
|
|
|
301
301
|
o("strong", Ve, t(d.value.notes || "Notes") + ":", 1),
|
|
302
302
|
o("span", $e, t(e.value.notes), 1)
|
|
303
303
|
])) : c("", !0),
|
|
304
|
-
e.value.footerText ? (s(), a("div",
|
|
304
|
+
e.value.footerText ? (s(), a("div", qe, t(e.value.footerText), 1)) : c("", !0)
|
|
305
305
|
], 2)
|
|
306
306
|
], 6));
|
|
307
307
|
}
|