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