@datapos/datapos-shared 0.3.166 → 0.3.168
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 +108 -90
- package/dist/types/src/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,83 +1,100 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
1
|
+
const F = ["createObject", "dropObject", "removeRecords", "upsertRecords"], j = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
|
|
2
|
+
function U() {
|
|
3
3
|
function e(t, a, r) {
|
|
4
4
|
r.textContent = "Cytoscape.js diagram goes here...";
|
|
5
5
|
}
|
|
6
6
|
return { render: e };
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function B() {
|
|
9
9
|
function e(t, a, r) {
|
|
10
10
|
r.textContent = "values table goes here...";
|
|
11
11
|
}
|
|
12
12
|
return { render: e };
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const O = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", x = "highcharts";
|
|
15
15
|
let b, T = !1;
|
|
16
|
-
function
|
|
17
|
-
async function e(n, s,
|
|
16
|
+
function P() {
|
|
17
|
+
async function e(n, s, m, h) {
|
|
18
18
|
await r();
|
|
19
19
|
const l = [];
|
|
20
20
|
for (const c of s.data.measures)
|
|
21
21
|
l.push({ type: n.options.highchartsType, name: c.name, data: c.data });
|
|
22
|
-
const
|
|
22
|
+
const p = {
|
|
23
23
|
chart: { type: n.options.highchartsType },
|
|
24
24
|
plotOptions: { series: { borderColor: "#333" } },
|
|
25
25
|
series: l,
|
|
26
26
|
title: { text: s.title.text },
|
|
27
27
|
xAxis: { categories: s.data.categoryLabels },
|
|
28
28
|
yAxis: { title: { text: s.data.name } }
|
|
29
|
-
},
|
|
30
|
-
return { chart:
|
|
29
|
+
}, u = b.chart(m, p, h);
|
|
30
|
+
return { chart: u, resize: () => u.reflow(), vendorId: x };
|
|
31
31
|
}
|
|
32
|
-
async function t(n, s,
|
|
32
|
+
async function t(n, s, m, h) {
|
|
33
33
|
await Promise.all([r(), o()]);
|
|
34
34
|
const l = [];
|
|
35
35
|
for (const c of s.data.measures)
|
|
36
36
|
l.push({ type: n.options.highchartsType, name: c.name, data: c.data });
|
|
37
|
-
const
|
|
37
|
+
const p = {
|
|
38
38
|
chart: { polar: !0 },
|
|
39
39
|
plotOptions: { series: { borderColor: "#333" } },
|
|
40
40
|
series: l,
|
|
41
41
|
title: { text: s.title.text },
|
|
42
42
|
xAxis: { categories: s.data.categoryLabels },
|
|
43
43
|
yAxis: { title: { text: s.data.name } }
|
|
44
|
-
},
|
|
45
|
-
return { chart:
|
|
44
|
+
}, u = b.chart(m, p, h);
|
|
45
|
+
return { chart: u, resize: () => u.reflow(), vendorId: x };
|
|
46
46
|
}
|
|
47
|
-
async function a(n, s,
|
|
47
|
+
async function a(n, s, m, h) {
|
|
48
48
|
await Promise.all([r(), o()]);
|
|
49
|
-
const l = [],
|
|
49
|
+
const l = [], p = [];
|
|
50
50
|
for (let f = 0; f < s.data.measures[0].data.length; f++)
|
|
51
|
-
|
|
52
|
-
l.push({ type: n.options.highchartsType, name: "Unknown", data:
|
|
53
|
-
const
|
|
51
|
+
p.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
|
|
52
|
+
l.push({ type: n.options.highchartsType, name: "Unknown", data: p });
|
|
53
|
+
const u = {
|
|
54
54
|
chart: { type: n.options.highchartsType, inverted: n.options.inverted },
|
|
55
55
|
plotOptions: { series: { borderColor: "#333" } },
|
|
56
56
|
series: l,
|
|
57
57
|
title: { text: s.title.text },
|
|
58
58
|
xAxis: { categories: s.data.categoryLabels },
|
|
59
59
|
yAxis: { title: { text: s.data.name } }
|
|
60
|
-
}, c = b.chart(
|
|
60
|
+
}, c = b.chart(m, u, h);
|
|
61
61
|
return { chart: c, resize: () => c.reflow(), vendorId: x };
|
|
62
62
|
}
|
|
63
63
|
async function r() {
|
|
64
64
|
if (b) return;
|
|
65
|
-
const n = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${n}highcharts.src.js`,
|
|
65
|
+
const n = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${n}highcharts.src.js`, m = `${n}modules/accessibility.src.js`;
|
|
66
66
|
b = (await import(
|
|
67
67
|
/* @vite-ignore */
|
|
68
68
|
s
|
|
69
69
|
)).default, await import(
|
|
70
70
|
/* @vite-ignore */
|
|
71
|
-
|
|
71
|
+
m
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
async function o() {
|
|
75
75
|
if (T) return;
|
|
76
|
-
await import(`${
|
|
76
|
+
await import(`${O}highcharts-more.src.js`), T = !0;
|
|
77
77
|
}
|
|
78
78
|
return { renderCartesianChart: e, renderPolarChart: t, renderRangeChart: a };
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const S = 4, A = `https://cdn.jsdelivr.net/npm/micromark@${S}/+esm`, N = 1, C = `https://cdn.jsdelivr.net/npm/prismjs@${N}/+esm`;
|
|
81
|
+
let I, w;
|
|
82
|
+
function W() {
|
|
83
|
+
async function e(a, r, o) {
|
|
84
|
+
await t(), o.textContent = "Micromark & Prism content goes here...";
|
|
85
|
+
}
|
|
86
|
+
async function t() {
|
|
87
|
+
I && w || (I = await import(
|
|
88
|
+
/* @vite-ignore */
|
|
89
|
+
A
|
|
90
|
+
), w = await import(
|
|
91
|
+
/* @vite-ignore */
|
|
92
|
+
C
|
|
93
|
+
), console.log("micromarkModule", I), console.log("prismModule", w));
|
|
94
|
+
}
|
|
95
|
+
return { render: e };
|
|
96
|
+
}
|
|
97
|
+
const H = 0, z = (e) => e, V = () => Date.now(), X = {
|
|
81
98
|
cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
|
|
82
99
|
cartesian_areaSpline: { categoryId: "cartesian", typeId: "areaSpline", label: { "en-gb": "Area Spline" }, options: { highchartsType: "area" } },
|
|
83
100
|
cartesian_bar: { categoryId: "cartesian", typeId: "bar", label: { "en-gb": "Bar" }, options: { highchartsType: "bar" } },
|
|
@@ -96,63 +113,63 @@ const k = 0, M = (e) => e, U = () => Date.now(), j = {
|
|
|
96
113
|
streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
|
|
97
114
|
values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
|
|
98
115
|
};
|
|
99
|
-
class
|
|
116
|
+
class D extends Error {
|
|
100
117
|
locator;
|
|
101
118
|
constructor(t, a, r) {
|
|
102
119
|
super(t, r), this.name = "DataPosError", this.locator = a, Error.captureStackTrace?.(this, new.target);
|
|
103
120
|
}
|
|
104
121
|
}
|
|
105
|
-
class
|
|
122
|
+
class g extends D {
|
|
106
123
|
constructor(t, a, r) {
|
|
107
124
|
super(t, a, r), this.name = "ApplicationError";
|
|
108
125
|
}
|
|
109
126
|
}
|
|
110
|
-
class
|
|
127
|
+
class G extends g {
|
|
111
128
|
constructor(t, a, r) {
|
|
112
129
|
super(t, a, r), this.name = "APIError";
|
|
113
130
|
}
|
|
114
131
|
}
|
|
115
|
-
class
|
|
132
|
+
class K extends g {
|
|
116
133
|
constructor(t, a, r) {
|
|
117
134
|
super(t, a, r), this.name = "EngineError";
|
|
118
135
|
}
|
|
119
136
|
}
|
|
120
|
-
class
|
|
137
|
+
class v extends g {
|
|
121
138
|
body;
|
|
122
139
|
constructor(t, a, r, o) {
|
|
123
140
|
super(t, a, o), this.name = "FetchError", this.body = r;
|
|
124
141
|
}
|
|
125
142
|
}
|
|
126
|
-
class
|
|
143
|
+
class _ extends g {
|
|
127
144
|
componentName;
|
|
128
145
|
info;
|
|
129
146
|
constructor(t, a, r, o, n) {
|
|
130
147
|
super(t, a, n), this.name = "VueHandledError", this.info = r, this.componentName = o;
|
|
131
148
|
}
|
|
132
149
|
}
|
|
133
|
-
class
|
|
150
|
+
class J extends g {
|
|
134
151
|
constructor(t, a, r) {
|
|
135
152
|
super(t, a, r), this.name = "WindowHandledRuntimeError";
|
|
136
153
|
}
|
|
137
154
|
}
|
|
138
|
-
class
|
|
155
|
+
class q extends g {
|
|
139
156
|
constructor(t, a, r) {
|
|
140
157
|
super(t, a, r), this.name = "WindowHandledPromiseRejectionError";
|
|
141
158
|
}
|
|
142
159
|
}
|
|
143
|
-
class
|
|
160
|
+
class Q extends D {
|
|
144
161
|
constructor(t, a, r) {
|
|
145
162
|
super(t, a, r), this.name = "OperationalError";
|
|
146
163
|
}
|
|
147
164
|
}
|
|
148
|
-
async function
|
|
165
|
+
async function Y(e, t, a) {
|
|
149
166
|
const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
|
|
150
|
-
return new
|
|
167
|
+
return new v(r, a, o);
|
|
151
168
|
}
|
|
152
|
-
function
|
|
169
|
+
function Z(e) {
|
|
153
170
|
return e.map((t) => t.message).join(" ");
|
|
154
171
|
}
|
|
155
|
-
function
|
|
172
|
+
function ee(e, t = "Unknown error.") {
|
|
156
173
|
if (e instanceof Error) return e;
|
|
157
174
|
if (typeof e == "string") return new Error(e);
|
|
158
175
|
try {
|
|
@@ -161,17 +178,17 @@ function G(e, t = "Unknown error.") {
|
|
|
161
178
|
return new Error(t);
|
|
162
179
|
}
|
|
163
180
|
}
|
|
164
|
-
function
|
|
181
|
+
function re(e) {
|
|
165
182
|
const t = /* @__PURE__ */ new Set(), a = [];
|
|
166
183
|
let r = e;
|
|
167
184
|
for (; r && !t.has(r); ) {
|
|
168
185
|
t.add(r);
|
|
169
186
|
let o;
|
|
170
|
-
if (r instanceof
|
|
187
|
+
if (r instanceof v)
|
|
171
188
|
o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
172
|
-
else if (r instanceof
|
|
189
|
+
else if (r instanceof _)
|
|
173
190
|
o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
174
|
-
else if (r instanceof
|
|
191
|
+
else if (r instanceof D)
|
|
175
192
|
o = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
176
193
|
else if (r instanceof Error) {
|
|
177
194
|
const n = r;
|
|
@@ -181,7 +198,7 @@ function J(e) {
|
|
|
181
198
|
}
|
|
182
199
|
return a;
|
|
183
200
|
}
|
|
184
|
-
const
|
|
201
|
+
const R = "en-US", y = {}, te = (e) => {
|
|
185
202
|
switch (e) {
|
|
186
203
|
case "Edm.Binary":
|
|
187
204
|
return "unknown";
|
|
@@ -220,17 +237,17 @@ const D = "en-US", y = {}, K = (e) => {
|
|
|
220
237
|
default:
|
|
221
238
|
return "unknown";
|
|
222
239
|
}
|
|
223
|
-
},
|
|
240
|
+
}, ae = (e) => {
|
|
224
241
|
if (e) {
|
|
225
242
|
const t = e.lastIndexOf("/"), a = e.lastIndexOf(".", t > -1 ? t : e.length);
|
|
226
243
|
return a > -1 ? e.substring(0, a) : e;
|
|
227
244
|
}
|
|
228
|
-
},
|
|
245
|
+
}, ne = (e) => {
|
|
229
246
|
if (e) {
|
|
230
247
|
const t = e.lastIndexOf(".");
|
|
231
248
|
if (t > -1) return e.substring(t + 1);
|
|
232
249
|
}
|
|
233
|
-
}, i = (e, t = 2, a = t, r =
|
|
250
|
+
}, i = (e, t = 2, a = t, r = R) => {
|
|
234
251
|
if (e == null) return "";
|
|
235
252
|
const o = `${r}decimal${t}.${a}`;
|
|
236
253
|
let n = y[o];
|
|
@@ -242,7 +259,7 @@ const D = "en-US", y = {}, K = (e) => {
|
|
|
242
259
|
style: "decimal",
|
|
243
260
|
useGrouping: !0
|
|
244
261
|
}), y[o] = n), n.format(e);
|
|
245
|
-
},
|
|
262
|
+
}, oe = (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`, se = (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`, ie = (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 = R) => {
|
|
246
263
|
if (e == null) return "";
|
|
247
264
|
const a = `${t}decimal0.0`;
|
|
248
265
|
let r = y[a];
|
|
@@ -254,7 +271,7 @@ const D = "en-US", y = {}, K = (e) => {
|
|
|
254
271
|
style: "decimal",
|
|
255
272
|
useGrouping: !0
|
|
256
273
|
}), y[a] = r), r.format(e);
|
|
257
|
-
},
|
|
274
|
+
}, le = (e) => {
|
|
258
275
|
switch (e) {
|
|
259
276
|
case "csv":
|
|
260
277
|
return "text/csv";
|
|
@@ -268,7 +285,7 @@ const D = "en-US", y = {}, K = (e) => {
|
|
|
268
285
|
default:
|
|
269
286
|
return "application/octet-stream";
|
|
270
287
|
}
|
|
271
|
-
},
|
|
288
|
+
}, L = [
|
|
272
289
|
{ id: "dtv", label: { "en-gb": "Delimited Text" } },
|
|
273
290
|
{ id: "e/e", label: { "en-gb": "Entity/Event" } },
|
|
274
291
|
{ id: "jsonArray", label: { "en-gb": "JSON Array" } },
|
|
@@ -276,22 +293,22 @@ const D = "en-US", y = {}, K = (e) => {
|
|
|
276
293
|
{ id: "xls", label: { "en-gb": "XLS" } },
|
|
277
294
|
{ id: "xlsx", label: { "en-gb": "XLSX" } },
|
|
278
295
|
{ id: "xml", label: { "en-gb": "XML" } }
|
|
279
|
-
],
|
|
296
|
+
], ce = (e = d) => {
|
|
280
297
|
const t = [];
|
|
281
|
-
for (const a of
|
|
298
|
+
for (const a of L) t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
|
|
282
299
|
return t;
|
|
283
|
-
},
|
|
300
|
+
}, $ = [
|
|
284
301
|
{ id: `
|
|
285
302
|
`, label: { "en-gb": "Newline" } },
|
|
286
303
|
{ id: "\r", label: { "en-gb": "Carriage Return" } },
|
|
287
304
|
{ id: `\r
|
|
288
305
|
`, label: { "en-gb": "Carriage Return/Newline" } }
|
|
289
|
-
],
|
|
306
|
+
], de = (e = d) => {
|
|
290
307
|
const t = [];
|
|
291
|
-
for (const a of
|
|
308
|
+
for (const a of $)
|
|
292
309
|
t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
|
|
293
310
|
return t;
|
|
294
|
-
},
|
|
311
|
+
}, M = [
|
|
295
312
|
{ id: ":", label: { "en-gb": "Colon" } },
|
|
296
313
|
{ id: ",", label: { "en-gb": "Comma" } },
|
|
297
314
|
{ id: "!", label: { "en-gb": "Exclamation Mark" } },
|
|
@@ -303,12 +320,12 @@ const D = "en-US", y = {}, K = (e) => {
|
|
|
303
320
|
{ id: "_", label: { "en-gb": "Underscore" } },
|
|
304
321
|
{ id: "0x1F", label: { "en-gb": "Unit Separator" } },
|
|
305
322
|
{ id: "|", label: { "en-gb": "Vertical Bar" } }
|
|
306
|
-
],
|
|
323
|
+
], me = (e = d) => {
|
|
307
324
|
const t = [];
|
|
308
|
-
for (const a of
|
|
325
|
+
for (const a of M)
|
|
309
326
|
t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
|
|
310
327
|
return t;
|
|
311
|
-
},
|
|
328
|
+
}, k = [
|
|
312
329
|
{ id: "alpha", color: "red", label: { "en-gb": "alpha" } },
|
|
313
330
|
{ id: "beta", color: "amber", label: { "en-gb": "beta" } },
|
|
314
331
|
{ id: "generalAvailability", color: "green", label: { "en-gb": "" } },
|
|
@@ -318,44 +335,45 @@ const D = "en-US", y = {}, K = (e) => {
|
|
|
318
335
|
{ id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
|
|
319
336
|
{ id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
|
|
320
337
|
{ id: "underReview", color: "other", label: { "en-gb": "under-review" } }
|
|
321
|
-
],
|
|
322
|
-
const a =
|
|
338
|
+
], ue = (e, t = d) => {
|
|
339
|
+
const a = k.find((r) => r.id === e);
|
|
323
340
|
return a ? { ...a, label: a.label[t] || a.label[d] || e } : { id: e, color: "other", label: e };
|
|
324
341
|
}, d = "en-gb";
|
|
325
342
|
export {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
343
|
+
G as APIError,
|
|
344
|
+
g as ApplicationError,
|
|
345
|
+
F as CONNECTOR_DESTINATION_OPERATIONS,
|
|
346
|
+
j as CONNECTOR_SOURCE_OPERATIONS,
|
|
330
347
|
d as DEFAULT_LOCALE_CODE,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
348
|
+
H as DefaultTimestamp,
|
|
349
|
+
K as EngineError,
|
|
350
|
+
v as FetchError,
|
|
351
|
+
Q as OperationalError,
|
|
352
|
+
_ as VueError,
|
|
353
|
+
q as WindowPromiseRejectionError,
|
|
354
|
+
J as WindowRuntimeError,
|
|
355
|
+
Y as buildFetchError,
|
|
356
|
+
Z as concatenateSerialisedErrorMessages,
|
|
357
|
+
z as convertMillisecondsToTimestamp,
|
|
358
|
+
te as convertODataTypeIdToUsageTypeId,
|
|
359
|
+
ne as extractExtensionFromPath,
|
|
360
|
+
ae as extractNameFromPath,
|
|
344
361
|
i as formatNumberAsDecimalNumber,
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
362
|
+
ie as formatNumberAsDuration,
|
|
363
|
+
oe as formatNumberAsSize,
|
|
364
|
+
se as formatNumberAsStorageSize,
|
|
348
365
|
E as formatNumberAsWholeNumber,
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
366
|
+
ue as getComponentStatus,
|
|
367
|
+
V as getCurrentTimestamp,
|
|
368
|
+
ce as getDataFormats,
|
|
369
|
+
de as getRecordDelimiters,
|
|
370
|
+
me as getValueDelimiters,
|
|
371
|
+
le as lookupMimeTypeForExtension,
|
|
372
|
+
ee as normalizeToError,
|
|
373
|
+
X as presentationViewTypeMap,
|
|
374
|
+
re as serialiseError,
|
|
375
|
+
U as useCytoscapeJS,
|
|
376
|
+
B as useDataTable,
|
|
377
|
+
P as useHighcharts,
|
|
378
|
+
W as useMicromark
|
|
361
379
|
};
|
|
@@ -55,6 +55,7 @@ export type { Timestamp } from './timestamp';
|
|
|
55
55
|
export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscapeJS';
|
|
56
56
|
export { useDataTable } from './composables/useDataTable';
|
|
57
57
|
export { type HighchartsView, useHighcharts } from './composables/useHighcharts';
|
|
58
|
+
export { useMicromark } from './composables/useMicromark';
|
|
58
59
|
export declare const DEFAULT_LOCALE_CODE: LocaleCode;
|
|
59
60
|
export { DefaultTimestamp } from './timestamp';
|
|
60
61
|
export { presentationViewTypeMap } from './component/presenter/presentation';
|
package/package.json
CHANGED