@datapos/datapos-shared 0.3.193 → 0.3.195

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,11 +1,11 @@
1
- const F = ["createObject", "dropObject", "removeRecords", "upsertRecords"], U = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
2
- function P() {
1
+ const M = ["createObject", "dropObject", "removeRecords", "upsertRecords"], F = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
2
+ function j() {
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 B() {
8
+ function U() {
9
9
  function e(a, t, r) {
10
10
  r.textContent = "values table goes here...";
11
11
  }
@@ -13,7 +13,7 @@ function B() {
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 W() {
16
+ function B() {
17
17
  async function e(n, s, m, h) {
18
18
  await r();
19
19
  const l = [];
@@ -77,9 +77,9 @@ function W() {
77
77
  }
78
78
  return { renderCartesianChart: e, renderPolarChart: a, renderRangeChart: t };
79
79
  }
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`;
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 H() {
82
+ function P() {
83
83
  async function e() {
84
84
  return await t(), { micromark: x };
85
85
  }
@@ -87,23 +87,18 @@ function H() {
87
87
  await t();
88
88
  }
89
89
  async function t() {
90
- x || (x = (await Promise.all([import(
90
+ if (x) return;
91
+ x = (await Promise.all([import(
91
92
  /* @vite-ignore */
92
93
  O
93
94
  ), import(
94
95
  /* @vite-ignore */
95
96
  N
96
- )]))[0].micromark, !globalThis.Prism) || await Promise.all([import(
97
- /* @vite-ignore */
98
- _
99
- ), import(
100
- /* @vite-ignore */
101
- C
102
- )]);
97
+ )]))[0].micromark;
103
98
  }
104
99
  return { getStuff: e, render: a };
105
100
  }
106
- const V = 0, z = (e) => e, X = () => Date.now(), G = {
101
+ const W = 0, H = (e) => e, z = () => Date.now(), V = {
107
102
  cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
108
103
  cartesian_areaSpline: { categoryId: "cartesian", typeId: "areaSpline", label: { "en-gb": "Area Spline" }, options: { highchartsType: "area" } },
109
104
  cartesian_bar: { categoryId: "cartesian", typeId: "bar", label: { "en-gb": "Bar" }, options: { highchartsType: "bar" } },
@@ -122,63 +117,63 @@ const V = 0, z = (e) => e, X = () => Date.now(), G = {
122
117
  streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
123
118
  values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
124
119
  };
125
- class T extends Error {
120
+ class w extends Error {
126
121
  locator;
127
122
  constructor(a, t, r) {
128
123
  super(a, r), this.name = "DataPosError", this.locator = t, Error.captureStackTrace?.(this, new.target);
129
124
  }
130
125
  }
131
- class g extends T {
126
+ class g extends w {
132
127
  constructor(a, t, r) {
133
128
  super(a, t, r), this.name = "ApplicationError";
134
129
  }
135
130
  }
136
- class J extends g {
131
+ class X extends g {
137
132
  constructor(a, t, r) {
138
133
  super(a, t, r), this.name = "APIError";
139
134
  }
140
135
  }
141
- class K extends g {
136
+ class G extends g {
142
137
  constructor(a, t, r) {
143
138
  super(a, t, r), this.name = "EngineError";
144
139
  }
145
140
  }
146
- class R extends g {
141
+ class T extends g {
147
142
  body;
148
143
  constructor(a, t, r, o) {
149
144
  super(a, t, o), this.name = "FetchError", this.body = r;
150
145
  }
151
146
  }
152
- class L extends g {
147
+ class _ extends g {
153
148
  componentName;
154
149
  info;
155
150
  constructor(a, t, r, o, n) {
156
151
  super(a, t, n), this.name = "VueHandledError", this.info = r, this.componentName = o;
157
152
  }
158
153
  }
159
- class q extends g {
154
+ class K extends g {
160
155
  constructor(a, t, r) {
161
156
  super(a, t, r), this.name = "WindowHandledRuntimeError";
162
157
  }
163
158
  }
164
- class Q extends g {
159
+ class J extends g {
165
160
  constructor(a, t, r) {
166
161
  super(a, t, r), this.name = "WindowHandledPromiseRejectionError";
167
162
  }
168
163
  }
169
- class Y extends T {
164
+ class q extends w {
170
165
  constructor(a, t, r) {
171
166
  super(a, t, r), this.name = "OperationalError";
172
167
  }
173
168
  }
174
- async function Z(e, a, t) {
169
+ async function Q(e, a, t) {
175
170
  const r = `${a} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
176
- return new R(r, t, o);
171
+ return new T(r, t, o);
177
172
  }
178
- function ee(e) {
173
+ function Y(e) {
179
174
  return e.map((a) => a.message).join(" ");
180
175
  }
181
- function re(e, a = "Unknown error.") {
176
+ function Z(e, a = "Unknown error.") {
182
177
  if (e instanceof Error) return e;
183
178
  if (typeof e == "string") return new Error(e);
184
179
  try {
@@ -187,17 +182,17 @@ function re(e, a = "Unknown error.") {
187
182
  return new Error(a);
188
183
  }
189
184
  }
190
- function te(e) {
185
+ function ee(e) {
191
186
  const a = /* @__PURE__ */ new Set(), t = [];
192
187
  let r = e;
193
188
  for (; r && !a.has(r); ) {
194
189
  a.add(r);
195
190
  let o;
196
- if (r instanceof R)
191
+ if (r instanceof T)
197
192
  o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
198
- else if (r instanceof L)
193
+ else if (r instanceof _)
199
194
  o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
200
- else if (r instanceof T)
195
+ else if (r instanceof w)
201
196
  o = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
202
197
  else if (r instanceof Error) {
203
198
  const n = r;
@@ -207,7 +202,7 @@ function te(e) {
207
202
  }
208
203
  return t;
209
204
  }
210
- const S = "en-US", y = {}, ae = (e) => {
205
+ const R = "en-US", y = {}, re = (e) => {
211
206
  switch (e) {
212
207
  case "Edm.Binary":
213
208
  return "unknown";
@@ -246,17 +241,17 @@ const S = "en-US", y = {}, ae = (e) => {
246
241
  default:
247
242
  return "unknown";
248
243
  }
249
- }, ne = (e) => {
244
+ }, te = (e) => {
250
245
  if (e) {
251
246
  const a = e.lastIndexOf("/"), t = e.lastIndexOf(".", a > -1 ? a : e.length);
252
247
  return t > -1 ? e.substring(0, t) : e;
253
248
  }
254
- }, oe = (e) => {
249
+ }, ae = (e) => {
255
250
  if (e) {
256
251
  const a = e.lastIndexOf(".");
257
252
  if (a > -1) return e.substring(a + 1);
258
253
  }
259
- }, i = (e, a = 2, t = a, r = S) => {
254
+ }, i = (e, a = 2, t = a, r = R) => {
260
255
  if (e == null) return "";
261
256
  const o = `${r}decimal${a}.${t}`;
262
257
  let n = y[o];
@@ -268,7 +263,7 @@ const S = "en-US", y = {}, ae = (e) => {
268
263
  style: "decimal",
269
264
  useGrouping: !0
270
265
  }), y[o] = n), n.format(e);
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) => {
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) => {
272
267
  if (e == null) return "";
273
268
  const t = `${a}decimal0.0`;
274
269
  let r = y[t];
@@ -280,7 +275,7 @@ const S = "en-US", y = {}, ae = (e) => {
280
275
  style: "decimal",
281
276
  useGrouping: !0
282
277
  }), y[t] = r), r.format(e);
283
- }, ce = (e) => {
278
+ }, ie = (e) => {
284
279
  switch (e) {
285
280
  case "csv":
286
281
  return "text/csv";
@@ -294,7 +289,7 @@ const S = "en-US", y = {}, ae = (e) => {
294
289
  default:
295
290
  return "application/octet-stream";
296
291
  }
297
- }, $ = [
292
+ }, C = [
298
293
  { id: "dtv", label: { "en-gb": "Delimited Text" } },
299
294
  { id: "e/e", label: { "en-gb": "Entity/Event" } },
300
295
  { id: "jsonArray", label: { "en-gb": "JSON Array" } },
@@ -302,22 +297,22 @@ const S = "en-US", y = {}, ae = (e) => {
302
297
  { id: "xls", label: { "en-gb": "XLS" } },
303
298
  { id: "xlsx", label: { "en-gb": "XLSX" } },
304
299
  { id: "xml", label: { "en-gb": "XML" } }
305
- ], de = (e = d) => {
300
+ ], le = (e = d) => {
306
301
  const a = [];
307
- for (const t of $) a.push({ ...t, label: t.label[e] || t.label[d] || t.id });
302
+ for (const t of C) a.push({ ...t, label: t.label[e] || t.label[d] || t.id });
308
303
  return a;
309
- }, M = [
304
+ }, L = [
310
305
  { id: `
311
306
  `, label: { "en-gb": "Newline" } },
312
307
  { id: "\r", label: { "en-gb": "Carriage Return" } },
313
308
  { id: `\r
314
309
  `, label: { "en-gb": "Carriage Return/Newline" } }
315
- ], me = (e = d) => {
310
+ ], ce = (e = d) => {
316
311
  const a = [];
317
- for (const t of M)
312
+ for (const t of L)
318
313
  a.push({ ...t, label: t.label[e] || t.label[d] || t.id });
319
314
  return a;
320
- }, j = [
315
+ }, $ = [
321
316
  { id: ":", label: { "en-gb": "Colon" } },
322
317
  { id: ",", label: { "en-gb": "Comma" } },
323
318
  { id: "!", label: { "en-gb": "Exclamation Mark" } },
@@ -329,9 +324,9 @@ const S = "en-US", y = {}, ae = (e) => {
329
324
  { id: "_", label: { "en-gb": "Underscore" } },
330
325
  { id: "0x1F", label: { "en-gb": "Unit Separator" } },
331
326
  { id: "|", label: { "en-gb": "Vertical Bar" } }
332
- ], ue = (e = d) => {
327
+ ], de = (e = d) => {
333
328
  const a = [];
334
- for (const t of j)
329
+ for (const t of $)
335
330
  a.push({ ...t, label: t.label[e] || t.label[d] || t.id });
336
331
  return a;
337
332
  }, k = [
@@ -344,45 +339,45 @@ const S = "en-US", y = {}, ae = (e) => {
344
339
  { id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
345
340
  { id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
346
341
  { id: "underReview", color: "other", label: { "en-gb": "under-review" } }
347
- ], pe = (e, a = d) => {
342
+ ], me = (e, a = d) => {
348
343
  const t = k.find((r) => r.id === e);
349
344
  return t ? { ...t, label: t.label[a] || t.label[d] || e } : { id: e, color: "other", label: e };
350
345
  }, d = "en-gb";
351
346
  export {
352
- J as APIError,
347
+ X as APIError,
353
348
  g as ApplicationError,
354
- F as CONNECTOR_DESTINATION_OPERATIONS,
355
- U as CONNECTOR_SOURCE_OPERATIONS,
349
+ M as CONNECTOR_DESTINATION_OPERATIONS,
350
+ F as CONNECTOR_SOURCE_OPERATIONS,
356
351
  d as DEFAULT_LOCALE_CODE,
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,
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,
370
365
  i as formatNumberAsDecimalNumber,
371
- le as formatNumberAsDuration,
372
- se as formatNumberAsSize,
373
- ie as formatNumberAsStorageSize,
366
+ se as formatNumberAsDuration,
367
+ ne as formatNumberAsSize,
368
+ oe as formatNumberAsStorageSize,
374
369
  E as formatNumberAsWholeNumber,
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
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
388
383
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.193",
3
+ "version": "0.3.195",
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,