@datapos/datapos-shared 0.3.182 → 0.3.184
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const U = ["createObject", "dropObject", "removeRecords", "upsertRecords"], P = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
|
|
2
2
|
function B() {
|
|
3
|
-
function e(
|
|
4
|
-
|
|
3
|
+
function e(a, r, t) {
|
|
4
|
+
t.textContent = "Cytoscape.js diagram goes here...";
|
|
5
5
|
}
|
|
6
6
|
return { render: e };
|
|
7
7
|
}
|
|
8
8
|
function W() {
|
|
9
|
-
function e(
|
|
10
|
-
|
|
9
|
+
function e(a, r, t) {
|
|
10
|
+
t.textContent = "values table goes here...";
|
|
11
11
|
}
|
|
12
12
|
return { render: e };
|
|
13
13
|
}
|
|
@@ -15,7 +15,7 @@ const A = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/",
|
|
|
15
15
|
let b, R = !1;
|
|
16
16
|
function H() {
|
|
17
17
|
async function e(n, s, m, h) {
|
|
18
|
-
await
|
|
18
|
+
await t();
|
|
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 });
|
|
@@ -29,8 +29,8 @@ function H() {
|
|
|
29
29
|
}, u = b.chart(m, p, h);
|
|
30
30
|
return { chart: u, resize: () => u.reflow(), vendorId: I };
|
|
31
31
|
}
|
|
32
|
-
async function
|
|
33
|
-
await Promise.all([
|
|
32
|
+
async function a(n, s, m, h) {
|
|
33
|
+
await Promise.all([t(), 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 H() {
|
|
|
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 r(n, s, m, h) {
|
|
48
|
+
await Promise.all([t(), 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 H() {
|
|
|
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 t() {
|
|
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(
|
|
@@ -75,20 +75,20 @@ function H() {
|
|
|
75
75
|
if (R) return;
|
|
76
76
|
await import(`${A}highcharts-more.src.js`), R = !0;
|
|
77
77
|
}
|
|
78
|
-
return { renderCartesianChart: e, renderPolarChart:
|
|
78
|
+
return { renderCartesianChart: e, renderPolarChart: a, renderRangeChart: r };
|
|
79
79
|
}
|
|
80
|
-
const O = 4, N = `https://cdn.jsdelivr.net/npm/micromark@${O}/+esm`,
|
|
81
|
-
let x,
|
|
80
|
+
const O = 4, N = `https://cdn.jsdelivr.net/npm/micromark@${O}/+esm`, D = 1, _ = `https://cdn.jsdelivr.net/npm/prismjs@${D}/+esm`, C = `https://cdn.jsdelivr.net/npm/prismjs@${D}/components/prism-javascript.min.js`, L = `https://cdn.jsdelivr.net/npm/prismjs@${D}/components/prism-javascript.min.js`;
|
|
81
|
+
let x, w;
|
|
82
82
|
function V() {
|
|
83
|
-
function e() {
|
|
84
|
-
return { micromark: x, prism:
|
|
85
|
-
}
|
|
86
|
-
async function t() {
|
|
87
|
-
await a();
|
|
83
|
+
async function e() {
|
|
84
|
+
return await r(), { micromark: x, prism: w };
|
|
88
85
|
}
|
|
89
86
|
async function a() {
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
await r();
|
|
88
|
+
}
|
|
89
|
+
async function r() {
|
|
90
|
+
if (x && w) return;
|
|
91
|
+
const t = await Promise.all([
|
|
92
92
|
import(
|
|
93
93
|
/* @vite-ignore */
|
|
94
94
|
N
|
|
@@ -106,9 +106,9 @@ function V() {
|
|
|
106
106
|
L
|
|
107
107
|
)
|
|
108
108
|
]);
|
|
109
|
-
x =
|
|
109
|
+
x = t[0].micromark, w = t[1].default;
|
|
110
110
|
}
|
|
111
|
-
return { getStuff: e, render:
|
|
111
|
+
return { getStuff: e, render: a };
|
|
112
112
|
}
|
|
113
113
|
const z = 0, X = (e) => e, G = () => Date.now(), J = {
|
|
114
114
|
cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
|
|
@@ -129,90 +129,90 @@ const z = 0, X = (e) => e, G = () => Date.now(), J = {
|
|
|
129
129
|
streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
|
|
130
130
|
values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
|
|
131
131
|
};
|
|
132
|
-
class
|
|
132
|
+
class T extends Error {
|
|
133
133
|
locator;
|
|
134
|
-
constructor(
|
|
135
|
-
super(
|
|
134
|
+
constructor(a, r, t) {
|
|
135
|
+
super(a, t), this.name = "DataPosError", this.locator = r, Error.captureStackTrace?.(this, new.target);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
class g extends
|
|
139
|
-
constructor(
|
|
140
|
-
super(
|
|
138
|
+
class g extends T {
|
|
139
|
+
constructor(a, r, t) {
|
|
140
|
+
super(a, r, t), this.name = "ApplicationError";
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
class K extends g {
|
|
144
|
-
constructor(
|
|
145
|
-
super(
|
|
144
|
+
constructor(a, r, t) {
|
|
145
|
+
super(a, r, t), this.name = "APIError";
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
class q extends g {
|
|
149
|
-
constructor(
|
|
150
|
-
super(
|
|
149
|
+
constructor(a, r, t) {
|
|
150
|
+
super(a, r, t), this.name = "EngineError";
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
class v extends g {
|
|
154
154
|
body;
|
|
155
|
-
constructor(
|
|
156
|
-
super(
|
|
155
|
+
constructor(a, r, t, o) {
|
|
156
|
+
super(a, r, o), this.name = "FetchError", this.body = t;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
class $ extends g {
|
|
160
160
|
componentName;
|
|
161
161
|
info;
|
|
162
|
-
constructor(
|
|
163
|
-
super(
|
|
162
|
+
constructor(a, r, t, o, n) {
|
|
163
|
+
super(a, r, n), this.name = "VueHandledError", this.info = t, this.componentName = o;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
class Q extends g {
|
|
167
|
-
constructor(
|
|
168
|
-
super(
|
|
167
|
+
constructor(a, r, t) {
|
|
168
|
+
super(a, r, t), this.name = "WindowHandledRuntimeError";
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
class Y extends g {
|
|
172
|
-
constructor(
|
|
173
|
-
super(
|
|
172
|
+
constructor(a, r, t) {
|
|
173
|
+
super(a, r, t), this.name = "WindowHandledPromiseRejectionError";
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
class Z extends
|
|
177
|
-
constructor(
|
|
178
|
-
super(
|
|
176
|
+
class Z extends T {
|
|
177
|
+
constructor(a, r, t) {
|
|
178
|
+
super(a, r, t), this.name = "OperationalError";
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
async function ee(e,
|
|
182
|
-
const
|
|
183
|
-
return new v(
|
|
181
|
+
async function ee(e, a, r) {
|
|
182
|
+
const t = `${a} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
|
|
183
|
+
return new v(t, r, o);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
return e.map((
|
|
185
|
+
function te(e) {
|
|
186
|
+
return e.map((a) => a.message).join(" ");
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function re(e, a = "Unknown error.") {
|
|
189
189
|
if (e instanceof Error) return e;
|
|
190
190
|
if (typeof e == "string") return new Error(e);
|
|
191
191
|
try {
|
|
192
|
-
return new Error(JSON.stringify(e ??
|
|
192
|
+
return new Error(JSON.stringify(e ?? a));
|
|
193
193
|
} catch {
|
|
194
|
-
return new Error(
|
|
194
|
+
return new Error(a);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
function ae(e) {
|
|
198
|
-
const
|
|
199
|
-
let
|
|
200
|
-
for (;
|
|
201
|
-
|
|
198
|
+
const a = /* @__PURE__ */ new Set(), r = [];
|
|
199
|
+
let t = e;
|
|
200
|
+
for (; t && !a.has(t); ) {
|
|
201
|
+
a.add(t);
|
|
202
202
|
let o;
|
|
203
|
-
if (
|
|
204
|
-
o = { body:
|
|
205
|
-
else if (
|
|
206
|
-
o = { componentName:
|
|
207
|
-
else if (
|
|
208
|
-
o = { locator:
|
|
209
|
-
else if (
|
|
210
|
-
const n =
|
|
211
|
-
o = { locator: "", message: n.message, name: n.name, stack: n.stack },
|
|
212
|
-
} else
|
|
213
|
-
/(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."),
|
|
203
|
+
if (t instanceof v)
|
|
204
|
+
o = { body: t.body, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
|
|
205
|
+
else if (t instanceof $)
|
|
206
|
+
o = { componentName: t.componentName, info: t.info, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
|
|
207
|
+
else if (t instanceof T)
|
|
208
|
+
o = { locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
|
|
209
|
+
else if (t instanceof Error) {
|
|
210
|
+
const n = t;
|
|
211
|
+
o = { locator: "", message: n.message, name: n.name, stack: n.stack }, t = n.cause;
|
|
212
|
+
} else t ? (o = { locator: "", message: String(t), name: "Error" }, t = void 0) : (o = { locator: "", message: "Unknown error.", name: "Error" }, t = void 0);
|
|
213
|
+
/(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), r.push(o);
|
|
214
214
|
}
|
|
215
|
-
return
|
|
215
|
+
return r;
|
|
216
216
|
}
|
|
217
217
|
const S = "en-US", y = {}, ne = (e) => {
|
|
218
218
|
switch (e) {
|
|
@@ -255,38 +255,38 @@ const S = "en-US", y = {}, ne = (e) => {
|
|
|
255
255
|
}
|
|
256
256
|
}, oe = (e) => {
|
|
257
257
|
if (e) {
|
|
258
|
-
const
|
|
259
|
-
return
|
|
258
|
+
const a = e.lastIndexOf("/"), r = e.lastIndexOf(".", a > -1 ? a : e.length);
|
|
259
|
+
return r > -1 ? e.substring(0, r) : e;
|
|
260
260
|
}
|
|
261
261
|
}, se = (e) => {
|
|
262
262
|
if (e) {
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
263
|
+
const a = e.lastIndexOf(".");
|
|
264
|
+
if (a > -1) return e.substring(a + 1);
|
|
265
265
|
}
|
|
266
|
-
}, i = (e,
|
|
266
|
+
}, i = (e, a = 2, r = a, t = S) => {
|
|
267
267
|
if (e == null) return "";
|
|
268
|
-
const o = `${
|
|
268
|
+
const o = `${t}decimal${a}.${r}`;
|
|
269
269
|
let n = y[o];
|
|
270
|
-
return n || (n = new Intl.NumberFormat(
|
|
270
|
+
return n || (n = new Intl.NumberFormat(t, {
|
|
271
271
|
localeMatcher: "best fit",
|
|
272
|
-
maximumFractionDigits:
|
|
273
|
-
minimumFractionDigits:
|
|
272
|
+
maximumFractionDigits: a,
|
|
273
|
+
minimumFractionDigits: r,
|
|
274
274
|
minimumIntegerDigits: 1,
|
|
275
275
|
style: "decimal",
|
|
276
276
|
useGrouping: !0
|
|
277
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,
|
|
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, a = S) => {
|
|
279
279
|
if (e == null) return "";
|
|
280
|
-
const
|
|
281
|
-
let
|
|
282
|
-
return
|
|
280
|
+
const r = `${a}decimal0.0`;
|
|
281
|
+
let t = y[r];
|
|
282
|
+
return t || (t = new Intl.NumberFormat(a, {
|
|
283
283
|
localeMatcher: "best fit",
|
|
284
284
|
maximumFractionDigits: 0,
|
|
285
285
|
minimumFractionDigits: 0,
|
|
286
286
|
minimumIntegerDigits: 1,
|
|
287
287
|
style: "decimal",
|
|
288
288
|
useGrouping: !0
|
|
289
|
-
}), y[
|
|
289
|
+
}), y[r] = t), t.format(e);
|
|
290
290
|
}, de = (e) => {
|
|
291
291
|
switch (e) {
|
|
292
292
|
case "csv":
|
|
@@ -310,9 +310,9 @@ const S = "en-US", y = {}, ne = (e) => {
|
|
|
310
310
|
{ id: "xlsx", label: { "en-gb": "XLSX" } },
|
|
311
311
|
{ id: "xml", label: { "en-gb": "XML" } }
|
|
312
312
|
], me = (e = d) => {
|
|
313
|
-
const
|
|
314
|
-
for (const
|
|
315
|
-
return
|
|
313
|
+
const a = [];
|
|
314
|
+
for (const r of M) a.push({ ...r, label: r.label[e] || r.label[d] || r.id });
|
|
315
|
+
return a;
|
|
316
316
|
}, j = [
|
|
317
317
|
{ id: `
|
|
318
318
|
`, label: { "en-gb": "Newline" } },
|
|
@@ -320,10 +320,10 @@ const S = "en-US", y = {}, ne = (e) => {
|
|
|
320
320
|
{ id: `\r
|
|
321
321
|
`, label: { "en-gb": "Carriage Return/Newline" } }
|
|
322
322
|
], ue = (e = d) => {
|
|
323
|
-
const
|
|
324
|
-
for (const
|
|
325
|
-
|
|
326
|
-
return
|
|
323
|
+
const a = [];
|
|
324
|
+
for (const r of j)
|
|
325
|
+
a.push({ ...r, label: r.label[e] || r.label[d] || r.id });
|
|
326
|
+
return a;
|
|
327
327
|
}, k = [
|
|
328
328
|
{ id: ":", label: { "en-gb": "Colon" } },
|
|
329
329
|
{ id: ",", label: { "en-gb": "Comma" } },
|
|
@@ -337,10 +337,10 @@ const S = "en-US", y = {}, ne = (e) => {
|
|
|
337
337
|
{ id: "0x1F", label: { "en-gb": "Unit Separator" } },
|
|
338
338
|
{ id: "|", label: { "en-gb": "Vertical Bar" } }
|
|
339
339
|
], pe = (e = d) => {
|
|
340
|
-
const
|
|
341
|
-
for (const
|
|
342
|
-
|
|
343
|
-
return
|
|
340
|
+
const a = [];
|
|
341
|
+
for (const r of k)
|
|
342
|
+
a.push({ ...r, label: r.label[e] || r.label[d] || r.id });
|
|
343
|
+
return a;
|
|
344
344
|
}, F = [
|
|
345
345
|
{ id: "alpha", color: "red", label: { "en-gb": "alpha" } },
|
|
346
346
|
{ id: "beta", color: "amber", label: { "en-gb": "beta" } },
|
|
@@ -351,9 +351,9 @@ const S = "en-US", y = {}, ne = (e) => {
|
|
|
351
351
|
{ id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
|
|
352
352
|
{ id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
|
|
353
353
|
{ id: "underReview", color: "other", label: { "en-gb": "under-review" } }
|
|
354
|
-
], ge = (e,
|
|
355
|
-
const
|
|
356
|
-
return
|
|
354
|
+
], ge = (e, a = d) => {
|
|
355
|
+
const r = F.find((t) => t.id === e);
|
|
356
|
+
return r ? { ...r, label: r.label[a] || r.label[d] || e } : { id: e, color: "other", label: e };
|
|
357
357
|
}, d = "en-gb";
|
|
358
358
|
export {
|
|
359
359
|
K as APIError,
|
|
@@ -369,7 +369,7 @@ export {
|
|
|
369
369
|
Y as WindowPromiseRejectionError,
|
|
370
370
|
Q as WindowRuntimeError,
|
|
371
371
|
ee as buildFetchError,
|
|
372
|
-
|
|
372
|
+
te as concatenateSerialisedErrorMessages,
|
|
373
373
|
X as convertMillisecondsToTimestamp,
|
|
374
374
|
ne as convertODataTypeIdToUsageTypeId,
|
|
375
375
|
se as extractExtensionFromPath,
|
|
@@ -385,7 +385,7 @@ export {
|
|
|
385
385
|
ue as getRecordDelimiters,
|
|
386
386
|
pe as getValueDelimiters,
|
|
387
387
|
de as lookupMimeTypeForExtension,
|
|
388
|
-
|
|
388
|
+
re as normalizeToError,
|
|
389
389
|
J as presentationViewTypeMap,
|
|
390
390
|
ae as serialiseError,
|
|
391
391
|
B as useCytoscapeJS,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { micromark } from 'micromark';
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as Prism } from 'prismjs';
|
|
3
3
|
export declare function useMicromark(): {
|
|
4
|
-
getStuff: () => {
|
|
5
|
-
micromark: typeof micromark
|
|
6
|
-
prism: typeof
|
|
7
|
-
}
|
|
4
|
+
getStuff: () => Promise<{
|
|
5
|
+
micromark: typeof micromark;
|
|
6
|
+
prism: typeof Prism;
|
|
7
|
+
}>;
|
|
8
8
|
render: () => Promise<void>;
|
|
9
9
|
};
|
package/package.json
CHANGED