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