@datapos/datapos-shared 0.3.121 → 0.3.123
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.
|
@@ -33,26 +33,26 @@ function B() {
|
|
|
33
33
|
const S = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", I = "highcharts";
|
|
34
34
|
let b, T = !1;
|
|
35
35
|
function H() {
|
|
36
|
-
async function e(
|
|
36
|
+
async function e(o, s, d, c) {
|
|
37
37
|
await t();
|
|
38
38
|
const i = [];
|
|
39
39
|
for (const u of s.data.measures)
|
|
40
|
-
i.push({ type:
|
|
40
|
+
i.push({ type: o.options.highchartsType, name: u.name, data: u.data });
|
|
41
41
|
const p = {
|
|
42
|
-
chart: { type:
|
|
42
|
+
chart: { type: o.options.highchartsType },
|
|
43
43
|
plotOptions: { series: { borderColor: "#333" } },
|
|
44
44
|
series: i,
|
|
45
45
|
title: { text: s.title.text },
|
|
46
46
|
xAxis: { categories: s.data.categoryLabels },
|
|
47
47
|
yAxis: { title: { text: s.data.name } }
|
|
48
|
-
}, m = b.chart(
|
|
48
|
+
}, m = b.chart(d, p, c);
|
|
49
49
|
return { chart: m, resize: () => m.reflow(), vendorId: I };
|
|
50
50
|
}
|
|
51
|
-
async function r(
|
|
52
|
-
await Promise.all([t(),
|
|
51
|
+
async function r(o, s, d, c) {
|
|
52
|
+
await Promise.all([t(), n()]);
|
|
53
53
|
const i = [];
|
|
54
54
|
for (const u of s.data.measures)
|
|
55
|
-
i.push({ type:
|
|
55
|
+
i.push({ type: o.options.highchartsType, name: u.name, data: u.data });
|
|
56
56
|
const p = {
|
|
57
57
|
chart: { polar: !0 },
|
|
58
58
|
plotOptions: { series: { borderColor: "#333" } },
|
|
@@ -60,37 +60,37 @@ function H() {
|
|
|
60
60
|
title: { text: s.title.text },
|
|
61
61
|
xAxis: { categories: s.data.categoryLabels },
|
|
62
62
|
yAxis: { title: { text: s.data.name } }
|
|
63
|
-
}, m = b.chart(
|
|
63
|
+
}, m = b.chart(d, p, c);
|
|
64
64
|
return { chart: m, resize: () => m.reflow(), vendorId: I };
|
|
65
65
|
}
|
|
66
|
-
async function a(
|
|
67
|
-
await Promise.all([t(),
|
|
66
|
+
async function a(o, s, d, c) {
|
|
67
|
+
await Promise.all([t(), n()]);
|
|
68
68
|
const i = [], p = [];
|
|
69
69
|
for (let f = 0; f < s.data.measures[0].data.length; f++)
|
|
70
70
|
p.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
|
|
71
|
-
i.push({ type:
|
|
71
|
+
i.push({ type: o.options.highchartsType, name: "Unknown", data: p });
|
|
72
72
|
const m = {
|
|
73
|
-
chart: { type:
|
|
73
|
+
chart: { type: o.options.highchartsType, inverted: o.options.inverted },
|
|
74
74
|
plotOptions: { series: { borderColor: "#333" } },
|
|
75
75
|
series: i,
|
|
76
76
|
title: { text: s.title.text },
|
|
77
77
|
xAxis: { categories: s.data.categoryLabels },
|
|
78
78
|
yAxis: { title: { text: s.data.name } }
|
|
79
|
-
}, u = b.chart(
|
|
79
|
+
}, u = b.chart(d, m, c);
|
|
80
80
|
return { chart: u, resize: () => u.reflow(), vendorId: I };
|
|
81
81
|
}
|
|
82
82
|
async function t() {
|
|
83
83
|
if (b) return;
|
|
84
|
-
const
|
|
84
|
+
const o = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${o}highcharts.src.js`, d = `${o}modules/accessibility.src.js`;
|
|
85
85
|
b = (await import(
|
|
86
86
|
/* @vite-ignore */
|
|
87
87
|
s
|
|
88
88
|
)).default, await import(
|
|
89
89
|
/* @vite-ignore */
|
|
90
|
-
|
|
90
|
+
d
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
async function
|
|
93
|
+
async function n() {
|
|
94
94
|
if (T) return;
|
|
95
95
|
await import(`${S}highcharts-more.src.js`), T = !0;
|
|
96
96
|
}
|
|
@@ -119,15 +119,15 @@ class P extends h {
|
|
|
119
119
|
}
|
|
120
120
|
class v extends h {
|
|
121
121
|
body;
|
|
122
|
-
constructor(r, a, t,
|
|
123
|
-
super(r, a,
|
|
122
|
+
constructor(r, a, t, n) {
|
|
123
|
+
super(r, a, n), this.name = "FetchError", this.body = t;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
class N extends h {
|
|
127
127
|
componentName;
|
|
128
128
|
info;
|
|
129
|
-
constructor(r, a, t,
|
|
130
|
-
super(r, a,
|
|
129
|
+
constructor(r, a, t, n, o) {
|
|
130
|
+
super(r, a, o), this.name = "VueHandledError", this.info = t, this.componentName = n;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
class z extends h {
|
|
@@ -146,8 +146,8 @@ class V extends w {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
async function X(e, r, a) {
|
|
149
|
-
const t = `${r} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`,
|
|
150
|
-
return new v(t, a,
|
|
149
|
+
const t = `${r} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, n = await e.text();
|
|
150
|
+
return new v(t, a, n);
|
|
151
151
|
}
|
|
152
152
|
function G(e) {
|
|
153
153
|
return e.map((r) => r.message).join(" ");
|
|
@@ -166,18 +166,18 @@ function Z(e) {
|
|
|
166
166
|
let t = e;
|
|
167
167
|
for (; t && !r.has(t); ) {
|
|
168
168
|
r.add(t);
|
|
169
|
-
let
|
|
169
|
+
let n;
|
|
170
170
|
if (t instanceof v)
|
|
171
|
-
|
|
171
|
+
n = { body: t.body, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
|
|
172
172
|
else if (t instanceof N)
|
|
173
|
-
|
|
173
|
+
n = { componentName: t.componentName, info: t.info, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
|
|
174
174
|
else if (t instanceof w)
|
|
175
|
-
|
|
175
|
+
n = { locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
|
|
176
176
|
else if (t instanceof Error) {
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
} else t ? (
|
|
180
|
-
/(?:\.{3}|[.!?])$/.test(
|
|
177
|
+
const o = t;
|
|
178
|
+
n = { locator: "", message: o.message, name: o.name, stack: o.stack }, t = o.cause;
|
|
179
|
+
} else t ? (n = { locator: "", message: String(t), name: "Error" }, t = void 0) : (n = { locator: "", message: "Unknown error.", name: "Error" }, t = void 0);
|
|
180
|
+
/(?:\.{3}|[.!?])$/.test(n.message) || (n.message += "."), a.push(n);
|
|
181
181
|
}
|
|
182
182
|
return a;
|
|
183
183
|
}
|
|
@@ -232,16 +232,16 @@ const D = "en-US", E = {}, q = (e) => {
|
|
|
232
232
|
}
|
|
233
233
|
}, l = (e, r = 2, a = r, t = D) => {
|
|
234
234
|
if (e == null) return "";
|
|
235
|
-
const
|
|
236
|
-
let
|
|
237
|
-
return
|
|
235
|
+
const n = `${t}decimal${r}.${a}`;
|
|
236
|
+
let o = E[n];
|
|
237
|
+
return o || (o = new Intl.NumberFormat(t, {
|
|
238
238
|
localeMatcher: "best fit",
|
|
239
239
|
maximumFractionDigits: r,
|
|
240
240
|
minimumFractionDigits: a,
|
|
241
241
|
minimumIntegerDigits: 1,
|
|
242
242
|
style: "decimal",
|
|
243
243
|
useGrouping: !0
|
|
244
|
-
}), E[
|
|
244
|
+
}), E[n] = o), o.format(e);
|
|
245
245
|
}, ee = (e) => e == null ? "" : e < 1e3 ? x(e) : e < 1e6 ? `${l(e / 1e3, 2, 0)}K` : e < 1e9 ? `${l(e / 1e6, 2, 0)}M` : e < 1e12 ? `${l(e / 1e9, 2, 0)}B` : `${l(e / 1e12, 2, 0)}T`, te = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${x(e)} bytes` : e < 1048576 ? `${l(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${l(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${l(e / 1073741824, 2, 0)} GB` : `${l(e / 1099511627776, 2, 0)} TB`, re = (e) => e == null ? "" : e < 1e3 ? `${x(e)} ms` : e === 1e3 ? `${x(e)} sec` : e < 6e4 ? `${l(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${l(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${l(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${l(e / 864e5, 2, 0)} days`, x = (e, r = D) => {
|
|
246
246
|
if (e == null) return "";
|
|
247
247
|
const a = `${r}decimal0.0`;
|
|
@@ -280,7 +280,7 @@ const D = "en-US", E = {}, q = (e) => {
|
|
|
280
280
|
const r = [];
|
|
281
281
|
for (const a of O) r.push({ ...a, label: a.label[e] || a.label[g] || a.id });
|
|
282
282
|
return r;
|
|
283
|
-
},
|
|
283
|
+
}, C = [
|
|
284
284
|
{ id: `
|
|
285
285
|
`, label: { "en-gb": "Newline" } },
|
|
286
286
|
{ id: "\r", label: { "en-gb": "Carriage Return" } },
|
|
@@ -288,10 +288,10 @@ const D = "en-US", E = {}, q = (e) => {
|
|
|
288
288
|
`, label: { "en-gb": "Carriage Return/Newline" } }
|
|
289
289
|
], oe = (e = g) => {
|
|
290
290
|
const r = [];
|
|
291
|
-
for (const a of
|
|
291
|
+
for (const a of C)
|
|
292
292
|
r.push({ ...a, label: a.label[e] || a.label[g] || a.id });
|
|
293
293
|
return r;
|
|
294
|
-
},
|
|
294
|
+
}, R = [
|
|
295
295
|
{ id: ":", label: { "en-gb": "Colon" } },
|
|
296
296
|
{ id: ",", label: { "en-gb": "Comma" } },
|
|
297
297
|
{ id: "!", label: { "en-gb": "Exclamation Mark" } },
|
|
@@ -305,10 +305,10 @@ const D = "en-US", E = {}, q = (e) => {
|
|
|
305
305
|
{ id: "|", label: { "en-gb": "Vertical Bar" } }
|
|
306
306
|
], se = (e = g) => {
|
|
307
307
|
const r = [];
|
|
308
|
-
for (const a of
|
|
308
|
+
for (const a of R)
|
|
309
309
|
r.push({ ...a, label: a.label[e] || a.label[g] || a.id });
|
|
310
310
|
return r;
|
|
311
|
-
},
|
|
311
|
+
}, A = [
|
|
312
312
|
{ id: "alpha", color: "red", label: { "en-gb": "alpha" } },
|
|
313
313
|
{ id: "beta", color: "amber", label: { "en-gb": "beta" } },
|
|
314
314
|
{ id: "generalAvailability", color: "green", label: { "en-gb": "" } },
|
|
@@ -319,20 +319,20 @@ const D = "en-US", E = {}, q = (e) => {
|
|
|
319
319
|
{ id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
|
|
320
320
|
{ id: "underReview", color: "other", label: { "en-gb": "under-review" } }
|
|
321
321
|
], ie = (e, r = g) => {
|
|
322
|
-
const a =
|
|
322
|
+
const a = A.find((t) => t.id === e);
|
|
323
323
|
return a ? { ...a, label: a.label[r] || a.label[g] || e } : { id: e, color: "other", label: e };
|
|
324
324
|
}, $ = ["createObject", "dropObject", "removeRecords", "upsertRecords"], _ = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
|
|
325
325
|
async function le() {
|
|
326
326
|
try {
|
|
327
327
|
const e = await JSON.parse(await y.readFile("package.json", "utf8")), r = await JSON.parse(await y.readFile("config.json", "utf8")), a = await y.readFile("src/index.ts", "utf8");
|
|
328
|
-
let t = !1,
|
|
329
|
-
const
|
|
330
|
-
const i =
|
|
331
|
-
return t = $.includes(i),
|
|
332
|
-
}),
|
|
333
|
-
e.name && (r.id = e.name), r.operations = s,
|
|
328
|
+
let t = !1, n = !1;
|
|
329
|
+
const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...a.matchAll(o)].filter((c) => !c[1] && c[2] !== "constructor").map((c) => {
|
|
330
|
+
const i = c[2];
|
|
331
|
+
return t = t || $.includes(i), n = n || _.includes(i), i;
|
|
332
|
+
}), d = n && t ? "bidirectional" : n ? "source" : t ? "destination" : null;
|
|
333
|
+
e.name && (r.id = e.name), r.operations = s, r.usageId = d, e.version && (r.version = e.version), await y.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8"), console.log("✅ Connector configuration built.");
|
|
334
334
|
} catch (e) {
|
|
335
|
-
console.warn("Error building connector configuration.", e);
|
|
335
|
+
console.warn("❌ Error building connector configuration.", e);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
const g = "en-gb";
|
|
@@ -3,3 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare function buildConnectorConfig(): Promise<void>;
|
|
5
5
|
export declare function buildContextConfig(): Promise<void>;
|
|
6
|
+
export declare function buildInformerConfig(): Promise<void>;
|
|
7
|
+
export declare function buildPresenterConfig(): Promise<void>;
|
|
8
|
+
export declare function bumpVersion(): Promise<void>;
|
|
@@ -22,7 +22,7 @@ export interface ConnectorModuleConfig extends ModuleConfig {
|
|
|
22
22
|
iconDark: string;
|
|
23
23
|
operations: ConnectorModuleOperation[];
|
|
24
24
|
typeId: 'connector';
|
|
25
|
-
usageId
|
|
25
|
+
usageId: ConnectorModuleUsageId | null;
|
|
26
26
|
vendorAccountURL?: string;
|
|
27
27
|
vendorDocumentationURL?: string;
|
|
28
28
|
vendorHomeURL?: string;
|