@datapos/datapos-shared 0.3.181 → 0.3.182
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.
|
@@ -11,7 +11,7 @@ function W() {
|
|
|
11
11
|
}
|
|
12
12
|
return { render: e };
|
|
13
13
|
}
|
|
14
|
-
const A = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/",
|
|
14
|
+
const A = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", I = "highcharts";
|
|
15
15
|
let b, R = !1;
|
|
16
16
|
function H() {
|
|
17
17
|
async function e(n, s, m, h) {
|
|
@@ -27,7 +27,7 @@ function H() {
|
|
|
27
27
|
xAxis: { categories: s.data.categoryLabels },
|
|
28
28
|
yAxis: { title: { text: s.data.name } }
|
|
29
29
|
}, u = b.chart(m, p, h);
|
|
30
|
-
return { chart: u, resize: () => u.reflow(), vendorId:
|
|
30
|
+
return { chart: u, resize: () => u.reflow(), vendorId: I };
|
|
31
31
|
}
|
|
32
32
|
async function t(n, s, m, h) {
|
|
33
33
|
await Promise.all([r(), o()]);
|
|
@@ -42,13 +42,13 @@ function H() {
|
|
|
42
42
|
xAxis: { categories: s.data.categoryLabels },
|
|
43
43
|
yAxis: { title: { text: s.data.name } }
|
|
44
44
|
}, u = b.chart(m, p, h);
|
|
45
|
-
return { chart: u, resize: () => u.reflow(), vendorId:
|
|
45
|
+
return { chart: u, resize: () => u.reflow(), vendorId: I };
|
|
46
46
|
}
|
|
47
47
|
async function a(n, s, m, h) {
|
|
48
48
|
await Promise.all([r(), o()]);
|
|
49
49
|
const l = [], p = [];
|
|
50
|
-
for (let
|
|
51
|
-
p.push([s.data.measures[0].data[
|
|
50
|
+
for (let f = 0; f < s.data.measures[0].data.length; f++)
|
|
51
|
+
p.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
|
|
52
52
|
l.push({ type: n.options.highchartsType, name: "Unknown", data: p });
|
|
53
53
|
const u = {
|
|
54
54
|
chart: { type: n.options.highchartsType, inverted: n.options.inverted },
|
|
@@ -58,7 +58,7 @@ function H() {
|
|
|
58
58
|
xAxis: { categories: s.data.categoryLabels },
|
|
59
59
|
yAxis: { title: { text: s.data.name } }
|
|
60
60
|
}, c = b.chart(m, u, h);
|
|
61
|
-
return { chart: c, resize: () => c.reflow(), vendorId:
|
|
61
|
+
return { chart: c, resize: () => c.reflow(), vendorId: I };
|
|
62
62
|
}
|
|
63
63
|
async function r() {
|
|
64
64
|
if (b) return;
|
|
@@ -78,16 +78,16 @@ function H() {
|
|
|
78
78
|
return { renderCartesianChart: e, renderPolarChart: t, renderRangeChart: a };
|
|
79
79
|
}
|
|
80
80
|
const O = 4, N = `https://cdn.jsdelivr.net/npm/micromark@${O}/+esm`, T = 1, _ = `https://cdn.jsdelivr.net/npm/prismjs@${T}/+esm`, C = `https://cdn.jsdelivr.net/npm/prismjs@${T}/components/prism-javascript.min.js`, L = `https://cdn.jsdelivr.net/npm/prismjs@${T}/components/prism-javascript.min.js`;
|
|
81
|
-
let
|
|
81
|
+
let x, D;
|
|
82
82
|
function V() {
|
|
83
83
|
function e() {
|
|
84
|
-
return {
|
|
84
|
+
return { micromark: x, prism: D };
|
|
85
85
|
}
|
|
86
86
|
async function t() {
|
|
87
87
|
await a();
|
|
88
88
|
}
|
|
89
89
|
async function a() {
|
|
90
|
-
if (
|
|
90
|
+
if (x && D) return;
|
|
91
91
|
const r = await Promise.all([
|
|
92
92
|
import(
|
|
93
93
|
/* @vite-ignore */
|
|
@@ -106,7 +106,7 @@ function V() {
|
|
|
106
106
|
L
|
|
107
107
|
)
|
|
108
108
|
]);
|
|
109
|
-
|
|
109
|
+
x = r[0].micromark, D = r[1].default;
|
|
110
110
|
}
|
|
111
111
|
return { getStuff: e, render: t };
|
|
112
112
|
}
|
|
@@ -156,7 +156,7 @@ class v extends g {
|
|
|
156
156
|
super(t, a, o), this.name = "FetchError", this.body = r;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
class
|
|
159
|
+
class $ extends g {
|
|
160
160
|
componentName;
|
|
161
161
|
info;
|
|
162
162
|
constructor(t, a, r, o, n) {
|
|
@@ -202,7 +202,7 @@ function ae(e) {
|
|
|
202
202
|
let o;
|
|
203
203
|
if (r instanceof v)
|
|
204
204
|
o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
205
|
-
else if (r instanceof
|
|
205
|
+
else if (r instanceof $)
|
|
206
206
|
o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
207
207
|
else if (r instanceof w)
|
|
208
208
|
o = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
@@ -214,7 +214,7 @@ function ae(e) {
|
|
|
214
214
|
}
|
|
215
215
|
return a;
|
|
216
216
|
}
|
|
217
|
-
const S = "en-US",
|
|
217
|
+
const S = "en-US", y = {}, ne = (e) => {
|
|
218
218
|
switch (e) {
|
|
219
219
|
case "Edm.Binary":
|
|
220
220
|
return "unknown";
|
|
@@ -266,7 +266,7 @@ const S = "en-US", I = {}, ne = (e) => {
|
|
|
266
266
|
}, i = (e, t = 2, a = t, r = S) => {
|
|
267
267
|
if (e == null) return "";
|
|
268
268
|
const o = `${r}decimal${t}.${a}`;
|
|
269
|
-
let n =
|
|
269
|
+
let n = y[o];
|
|
270
270
|
return n || (n = new Intl.NumberFormat(r, {
|
|
271
271
|
localeMatcher: "best fit",
|
|
272
272
|
maximumFractionDigits: t,
|
|
@@ -274,11 +274,11 @@ const S = "en-US", I = {}, ne = (e) => {
|
|
|
274
274
|
minimumIntegerDigits: 1,
|
|
275
275
|
style: "decimal",
|
|
276
276
|
useGrouping: !0
|
|
277
|
-
}),
|
|
278
|
-
}, ie = (e) => e == null ? "" : e < 1e3 ?
|
|
277
|
+
}), y[o] = n), n.format(e);
|
|
278
|
+
}, ie = (e) => e == null ? "" : e < 1e3 ? E(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`, le = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${E(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`, ce = (e) => e == null ? "" : e < 1e3 ? `${E(e)} ms` : e === 1e3 ? `${E(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`, E = (e, t = S) => {
|
|
279
279
|
if (e == null) return "";
|
|
280
280
|
const a = `${t}decimal0.0`;
|
|
281
|
-
let r =
|
|
281
|
+
let r = y[a];
|
|
282
282
|
return r || (r = new Intl.NumberFormat(t, {
|
|
283
283
|
localeMatcher: "best fit",
|
|
284
284
|
maximumFractionDigits: 0,
|
|
@@ -286,7 +286,7 @@ const S = "en-US", I = {}, ne = (e) => {
|
|
|
286
286
|
minimumIntegerDigits: 1,
|
|
287
287
|
style: "decimal",
|
|
288
288
|
useGrouping: !0
|
|
289
|
-
}),
|
|
289
|
+
}), y[a] = r), r.format(e);
|
|
290
290
|
}, de = (e) => {
|
|
291
291
|
switch (e) {
|
|
292
292
|
case "csv":
|
|
@@ -301,7 +301,7 @@ const S = "en-US", I = {}, ne = (e) => {
|
|
|
301
301
|
default:
|
|
302
302
|
return "application/octet-stream";
|
|
303
303
|
}
|
|
304
|
-
},
|
|
304
|
+
}, M = [
|
|
305
305
|
{ id: "dtv", label: { "en-gb": "Delimited Text" } },
|
|
306
306
|
{ id: "e/e", label: { "en-gb": "Entity/Event" } },
|
|
307
307
|
{ id: "jsonArray", label: { "en-gb": "JSON Array" } },
|
|
@@ -311,7 +311,7 @@ const S = "en-US", I = {}, ne = (e) => {
|
|
|
311
311
|
{ id: "xml", label: { "en-gb": "XML" } }
|
|
312
312
|
], me = (e = d) => {
|
|
313
313
|
const t = [];
|
|
314
|
-
for (const a of
|
|
314
|
+
for (const a of M) t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
|
|
315
315
|
return t;
|
|
316
316
|
}, j = [
|
|
317
317
|
{ id: `
|
|
@@ -365,7 +365,7 @@ export {
|
|
|
365
365
|
q as EngineError,
|
|
366
366
|
v as FetchError,
|
|
367
367
|
Z as OperationalError,
|
|
368
|
-
|
|
368
|
+
$ as VueError,
|
|
369
369
|
Y as WindowPromiseRejectionError,
|
|
370
370
|
Q as WindowRuntimeError,
|
|
371
371
|
ee as buildFetchError,
|
|
@@ -378,7 +378,7 @@ export {
|
|
|
378
378
|
ce as formatNumberAsDuration,
|
|
379
379
|
ie as formatNumberAsSize,
|
|
380
380
|
le as formatNumberAsStorageSize,
|
|
381
|
-
|
|
381
|
+
E as formatNumberAsWholeNumber,
|
|
382
382
|
ge as getComponentStatus,
|
|
383
383
|
G as getCurrentTimestamp,
|
|
384
384
|
me as getDataFormats,
|
|
@@ -2,8 +2,8 @@ import { micromark } from 'micromark';
|
|
|
2
2
|
import { default as prism } from 'prismjs';
|
|
3
3
|
export declare function useMicromark(): {
|
|
4
4
|
getStuff: () => {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
micromark: typeof micromark | undefined;
|
|
6
|
+
prism: typeof prism | undefined;
|
|
7
7
|
};
|
|
8
8
|
render: () => Promise<void>;
|
|
9
9
|
};
|
package/package.json
CHANGED