@datapos/datapos-shared 0.3.96 → 0.3.98
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/dist/datapos-shared.es.js +40 -40
- package/package.json +1 -1
|
@@ -37,15 +37,15 @@ class _ extends p {
|
|
|
37
37
|
}
|
|
38
38
|
class D extends p {
|
|
39
39
|
body;
|
|
40
|
-
constructor(t, a, r,
|
|
41
|
-
super(t, a,
|
|
40
|
+
constructor(t, a, r, n) {
|
|
41
|
+
super(t, a, n), this.name = "FetchError", this.body = r;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
class v extends p {
|
|
45
45
|
componentName;
|
|
46
46
|
info;
|
|
47
|
-
constructor(t, a, r,
|
|
48
|
-
super(t, a,
|
|
47
|
+
constructor(t, a, r, n, o) {
|
|
48
|
+
super(t, a, o), this.name = "VueHandledError", this.info = r, this.componentName = n;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
class M extends p {
|
|
@@ -64,8 +64,8 @@ class B extends I {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
async function j(e, t, a) {
|
|
67
|
-
const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`,
|
|
68
|
-
return new D(r, a,
|
|
67
|
+
const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, n = await e.text();
|
|
68
|
+
return new D(r, a, n);
|
|
69
69
|
}
|
|
70
70
|
function H(e) {
|
|
71
71
|
return e.map((t) => t.message).join(" ");
|
|
@@ -84,18 +84,18 @@ function z(e) {
|
|
|
84
84
|
let r = e;
|
|
85
85
|
for (; r && !t.has(r); ) {
|
|
86
86
|
t.add(r);
|
|
87
|
-
let
|
|
87
|
+
let n;
|
|
88
88
|
if (r instanceof D)
|
|
89
|
-
|
|
89
|
+
n = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
90
90
|
else if (r instanceof v)
|
|
91
|
-
|
|
91
|
+
n = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
92
92
|
else if (r instanceof I)
|
|
93
|
-
|
|
93
|
+
n = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
94
94
|
else if (r instanceof Error) {
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
} else r ? (
|
|
98
|
-
/(?:\.{3}|[.!?])$/.test(
|
|
95
|
+
const o = r;
|
|
96
|
+
n = { locator: "", message: o.message, name: o.name, stack: o.stack }, r = o.cause;
|
|
97
|
+
} else r ? (n = { locator: "", message: String(r), name: "Error" }, r = void 0) : (n = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
|
|
98
|
+
/(?:\.{3}|[.!?])$/.test(n.message) || (n.message += "."), a.push(n);
|
|
99
99
|
}
|
|
100
100
|
return a;
|
|
101
101
|
}
|
|
@@ -114,55 +114,55 @@ function X() {
|
|
|
114
114
|
const S = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", E = "highcharts";
|
|
115
115
|
let b, w = !1;
|
|
116
116
|
function G() {
|
|
117
|
-
async function e(
|
|
117
|
+
async function e(o, s, u, h) {
|
|
118
118
|
await r();
|
|
119
119
|
const l = [];
|
|
120
120
|
for (const c of s.data.measures)
|
|
121
|
-
l.push({ type:
|
|
122
|
-
const
|
|
123
|
-
chart: { type:
|
|
121
|
+
l.push({ type: o.options.highchartsType, name: c.name, data: c.data });
|
|
122
|
+
const m = {
|
|
123
|
+
chart: { type: o.options.highchartsType },
|
|
124
124
|
plotOptions: { series: { borderColor: "#333" } },
|
|
125
125
|
series: l,
|
|
126
126
|
title: { text: s.title.text },
|
|
127
127
|
xAxis: { categories: s.data.categoryLabels },
|
|
128
128
|
yAxis: { title: { text: s.data.name } }
|
|
129
|
-
},
|
|
130
|
-
return { chart:
|
|
129
|
+
}, g = b.chart(u, m, h);
|
|
130
|
+
return { chart: g, resize: () => g.reflow(), vendorId: E };
|
|
131
131
|
}
|
|
132
|
-
async function t(
|
|
133
|
-
await Promise.all([r(),
|
|
132
|
+
async function t(o, s, u, h) {
|
|
133
|
+
await Promise.all([r(), n()]);
|
|
134
134
|
const l = [];
|
|
135
135
|
for (const c of s.data.measures)
|
|
136
|
-
l.push({ type:
|
|
137
|
-
const
|
|
136
|
+
l.push({ type: o.options.highchartsType, name: c.name, data: c.data });
|
|
137
|
+
const m = {
|
|
138
138
|
chart: { polar: !0 },
|
|
139
139
|
plotOptions: { series: { borderColor: "#333" } },
|
|
140
140
|
series: l,
|
|
141
141
|
title: { text: s.title.text },
|
|
142
142
|
xAxis: { categories: s.data.categoryLabels },
|
|
143
143
|
yAxis: { title: { text: s.data.name } }
|
|
144
|
-
},
|
|
145
|
-
return { chart:
|
|
144
|
+
}, g = b.chart(u, m, h);
|
|
145
|
+
return { chart: g, resize: () => g.reflow(), vendorId: E };
|
|
146
146
|
}
|
|
147
|
-
async function a(
|
|
148
|
-
await Promise.all([r(),
|
|
149
|
-
const l = [],
|
|
147
|
+
async function a(o, s, u, h) {
|
|
148
|
+
await Promise.all([r(), n()]);
|
|
149
|
+
const l = [], m = [];
|
|
150
150
|
for (let f = 0; f++; f < s.data.measures[0].data.length)
|
|
151
|
-
|
|
152
|
-
l.push({ type:
|
|
153
|
-
const
|
|
154
|
-
chart: { type:
|
|
151
|
+
m.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
|
|
152
|
+
console.log(1111, s.data.measures, m), l.push({ type: o.options.highchartsType, name: "Unknown", data: m });
|
|
153
|
+
const g = {
|
|
154
|
+
chart: { type: o.options.highchartsType, inverted: o.options.inverted },
|
|
155
155
|
plotOptions: { series: { borderColor: "#333" } },
|
|
156
156
|
series: l,
|
|
157
157
|
title: { text: s.title.text },
|
|
158
158
|
xAxis: { categories: s.data.categoryLabels },
|
|
159
159
|
yAxis: { title: { text: s.data.name } }
|
|
160
|
-
}, c = b.chart(u,
|
|
160
|
+
}, c = b.chart(u, g, h);
|
|
161
161
|
return { chart: c, resize: () => c.reflow(), vendorId: E };
|
|
162
162
|
}
|
|
163
163
|
async function r() {
|
|
164
164
|
if (b) return;
|
|
165
|
-
const
|
|
165
|
+
const o = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${o}highcharts.src.js`, u = `${o}modules/accessibility.src.js`;
|
|
166
166
|
b = (await import(
|
|
167
167
|
/* @vite-ignore */
|
|
168
168
|
s
|
|
@@ -171,7 +171,7 @@ function G() {
|
|
|
171
171
|
u
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
async function
|
|
174
|
+
async function n() {
|
|
175
175
|
if (w) return;
|
|
176
176
|
await import(`${S}highcharts-more.src.js`), w = !0;
|
|
177
177
|
}
|
|
@@ -228,16 +228,16 @@ const T = "en-US", y = {}, P = (e) => {
|
|
|
228
228
|
}
|
|
229
229
|
}, i = (e, t = 2, a = t, r = T) => {
|
|
230
230
|
if (e == null) return "";
|
|
231
|
-
const
|
|
232
|
-
let
|
|
233
|
-
return
|
|
231
|
+
const n = `${r}decimal${t}.${a}`;
|
|
232
|
+
let o = y[n];
|
|
233
|
+
return o || (o = new Intl.NumberFormat(r, {
|
|
234
234
|
localeMatcher: "best fit",
|
|
235
235
|
maximumFractionDigits: t,
|
|
236
236
|
minimumFractionDigits: a,
|
|
237
237
|
minimumIntegerDigits: 1,
|
|
238
238
|
style: "decimal",
|
|
239
239
|
useGrouping: !0
|
|
240
|
-
}), y[
|
|
240
|
+
}), y[n] = o), o.format(e);
|
|
241
241
|
}, q = (e) => e == null ? "" : e < 1e3 ? x(e) : e < 1e6 ? `${i(e / 1e3, 2, 0)}K` : e < 1e9 ? `${i(e / 1e6, 2, 0)}M` : e < 1e12 ? `${i(e / 1e9, 2, 0)}B` : `${i(e / 1e12, 2, 0)}T`, Q = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${x(e)} bytes` : e < 1048576 ? `${i(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${i(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${i(e / 1073741824, 2, 0)} GB` : `${i(e / 1099511627776, 2, 0)} TB`, Y = (e) => e == null ? "" : e < 1e3 ? `${x(e)} ms` : e === 1e3 ? `${x(e)} sec` : e < 6e4 ? `${i(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${i(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${i(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${i(e / 864e5, 2, 0)} days`, x = (e, t = T) => {
|
|
242
242
|
if (e == null) return "";
|
|
243
243
|
const a = `${t}decimal0.0`;
|