@datapos/datapos-shared 0.3.229 → 0.3.231

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,17 +1,17 @@
1
- const h = ["createObject", "dropObject", "removeRecords", "upsertRecords"], I = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
1
+ const E = ["createObject", "dropObject", "removeRecords", "upsertRecords"], I = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
2
2
  function x() {
3
- function e(t, a, r) {
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 C() {
9
- function e(t, a, r) {
8
+ function S() {
9
+ function e(a, t, r) {
10
10
  r.textContent = "values table goes here...";
11
11
  }
12
12
  return { render: e };
13
13
  }
14
- const w = 0, S = (e) => e, N = () => Date.now(), D = {
14
+ const C = 0, w = (e) => e, N = () => Date.now(), D = {
15
15
  cartesian_areaLine: { categoryId: "cartesianChart", typeId: "areaLine", label: { "en-gb": "Area Line" } },
16
16
  cartesian_areaSpline: { categoryId: "cartesianChart", typeId: "areaSpline", label: { "en-gb": "Area Spline" } },
17
17
  cartesian_bar: { categoryId: "cartesianChart", typeId: "bar", label: { "en-gb": "Bar" } },
@@ -21,10 +21,13 @@ const w = 0, S = (e) => e, N = () => Date.now(), D = {
21
21
  cartesian_spline: { categoryId: "cartesianChart", typeId: "spline", label: { "en-gb": "Spline" } },
22
22
  chordDiagram: { categoryId: "chordDiagram", label: { "en-gb": "Chord Diagram" } },
23
23
  periodFlowBoundariesChart: { categoryId: "periodFlowBoundariesChart", label: { "en-gb": "Period Flow & Boundaries" } },
24
- polar_area: { categoryId: "polarChart", typeId: "area", label: { "en-gb": "Radar (Area)" } },
24
+ polar_areaLine: { categoryId: "polarChart", typeId: "areaLine", label: { "en-gb": "Radar (Area Line)" } },
25
+ polar_areaSpline: { categoryId: "polarChart", typeId: "areaSpline", label: { "en-gb": "Radar (Area Spline)" } },
25
26
  polar_column: { categoryId: "polarChart", typeId: "column", label: { "en-gb": "Radar (Column)" } },
26
27
  polar_line: { categoryId: "polarChart", typeId: "line", label: { "en-gb": "Radar (Line)" } },
27
- range_area: { categoryId: "rangeChart", typeId: "area", label: { "en-gb": "Range (Area)" } },
28
+ polar_spline: { categoryId: "polarChart", typeId: "spline", label: { "en-gb": "Radar (Spline)" } },
29
+ range_areaLine: { categoryId: "rangeChart", typeId: "areaLine", label: { "en-gb": "Range (Area Line)" } },
30
+ range_areaSpline: { categoryId: "rangeChart", typeId: "areaSpline", label: { "en-gb": "Range (Area Spline)" } },
28
31
  range_bar: { categoryId: "rangeChart", typeId: "bar", label: { "en-gb": "Range (Bar)" } },
29
32
  range_column: { categoryId: "rangeChart", typeId: "column", label: { "en-gb": "Range (Column)" } },
30
33
  sankeyDiagram: { categoryId: "sankeyDiagram", label: { "en-gb": "Sankey Diagram" } },
@@ -33,76 +36,76 @@ const w = 0, S = (e) => e, N = () => Date.now(), D = {
33
36
  };
34
37
  class u extends Error {
35
38
  locator;
36
- constructor(t, a, r) {
37
- super(t, r), this.name = "DataPosError", this.locator = a, Error.captureStackTrace?.(this, new.target);
39
+ constructor(a, t, r) {
40
+ super(a, r), this.name = "DataPosError", this.locator = t, Error.captureStackTrace?.(this, new.target);
38
41
  }
39
42
  }
40
43
  class i extends u {
41
- constructor(t, a, r) {
42
- super(t, a, r), this.name = "ApplicationError";
44
+ constructor(a, t, r) {
45
+ super(a, t, r), this.name = "ApplicationError";
43
46
  }
44
47
  }
45
48
  class T extends i {
46
- constructor(t, a, r) {
47
- super(t, a, r), this.name = "APIError";
49
+ constructor(a, t, r) {
50
+ super(a, t, r), this.name = "APIError";
48
51
  }
49
52
  }
50
53
  class v extends i {
51
- constructor(t, a, r) {
52
- super(t, a, r), this.name = "EngineError";
54
+ constructor(a, t, r) {
55
+ super(a, t, r), this.name = "EngineError";
53
56
  }
54
57
  }
55
- class m extends i {
58
+ class g extends i {
56
59
  body;
57
- constructor(t, a, r, n) {
58
- super(t, a, n), this.name = "FetchError", this.body = r;
60
+ constructor(a, t, r, n) {
61
+ super(a, t, n), this.name = "FetchError", this.body = r;
59
62
  }
60
63
  }
61
64
  class b extends i {
62
65
  componentName;
63
66
  info;
64
- constructor(t, a, r, n, s) {
65
- super(t, a, s), this.name = "VueHandledError", this.info = r, this.componentName = n;
67
+ constructor(a, t, r, n, s) {
68
+ super(a, t, s), this.name = "VueHandledError", this.info = r, this.componentName = n;
66
69
  }
67
70
  }
68
- class O extends i {
69
- constructor(t, a, r) {
70
- super(t, a, r), this.name = "WindowHandledRuntimeError";
71
+ class R extends i {
72
+ constructor(a, t, r) {
73
+ super(a, t, r), this.name = "WindowHandledRuntimeError";
71
74
  }
72
75
  }
73
- class R extends i {
74
- constructor(t, a, r) {
75
- super(t, a, r), this.name = "WindowHandledPromiseRejectionError";
76
+ class A extends i {
77
+ constructor(a, t, r) {
78
+ super(a, t, r), this.name = "WindowHandledPromiseRejectionError";
76
79
  }
77
80
  }
78
- class $ extends u {
79
- constructor(t, a, r) {
80
- super(t, a, r), this.name = "OperationalError";
81
+ class O extends u {
82
+ constructor(a, t, r) {
83
+ super(a, t, r), this.name = "OperationalError";
81
84
  }
82
85
  }
83
- async function A(e, t, a) {
84
- const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, n = await e.text();
85
- return new m(r, a, n);
86
+ async function $(e, a, t) {
87
+ const r = `${a} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, n = await e.text();
88
+ return new g(r, t, n);
86
89
  }
87
- function F(e) {
88
- return e.map((t) => t.message).join(" ");
90
+ function _(e) {
91
+ return e.map((a) => a.message).join(" ");
89
92
  }
90
- function _(e, t = "Unknown error.") {
93
+ function F(e, a = "Unknown error.") {
91
94
  if (e instanceof Error) return e;
92
95
  if (typeof e == "string") return new Error(e);
93
96
  try {
94
- return new Error(JSON.stringify(e ?? t));
97
+ return new Error(JSON.stringify(e ?? a));
95
98
  } catch {
96
- return new Error(t);
99
+ return new Error(a);
97
100
  }
98
101
  }
99
- function k(e) {
100
- const t = /* @__PURE__ */ new Set(), a = [];
102
+ function L(e) {
103
+ const a = /* @__PURE__ */ new Set(), t = [];
101
104
  let r = e;
102
- for (; r && !t.has(r); ) {
103
- t.add(r);
105
+ for (; r && !a.has(r); ) {
106
+ a.add(r);
104
107
  let n;
105
- if (r instanceof m)
108
+ if (r instanceof g)
106
109
  n = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
107
110
  else if (r instanceof b)
108
111
  n = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
@@ -112,11 +115,11 @@ function k(e) {
112
115
  const s = r;
113
116
  n = { locator: "", message: s.message, name: s.name, stack: s.stack }, r = s.cause;
114
117
  } else r ? (n = { locator: "", message: String(r), name: "Error" }, r = void 0) : (n = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
115
- /(?:\.{3}|[.!?])$/.test(n.message) || (n.message += "."), a.push(n);
118
+ /(?:\.{3}|[.!?])$/.test(n.message) || (n.message += "."), t.push(n);
116
119
  }
117
- return a;
120
+ return t;
118
121
  }
119
- const g = "en-US", c = {}, B = (e) => {
122
+ const m = "en-US", c = {}, k = (e) => {
120
123
  switch (e) {
121
124
  case "Edm.Binary":
122
125
  return "unknown";
@@ -155,40 +158,40 @@ const g = "en-US", c = {}, B = (e) => {
155
158
  default:
156
159
  return "unknown";
157
160
  }
158
- }, L = (e) => {
161
+ }, B = (e) => {
159
162
  if (e) {
160
- const t = e.lastIndexOf("/"), a = e.lastIndexOf(".", t > -1 ? t : e.length);
161
- return a > -1 ? e.substring(0, a) : e;
163
+ const a = e.lastIndexOf("/"), t = e.lastIndexOf(".", a > -1 ? a : e.length);
164
+ return t > -1 ? e.substring(0, t) : e;
162
165
  }
163
166
  }, M = (e) => {
164
167
  if (e) {
165
- const t = e.lastIndexOf(".");
166
- if (t > -1) return e.substring(t + 1);
168
+ const a = e.lastIndexOf(".");
169
+ if (a > -1) return e.substring(a + 1);
167
170
  }
168
- }, o = (e, t = 2, a = t, r = g) => {
171
+ }, o = (e, a = 2, t = a, r = m) => {
169
172
  if (e == null) return "";
170
- const n = `${r}decimal${t}.${a}`;
173
+ const n = `${r}decimal${a}.${t}`;
171
174
  let s = c[n];
172
175
  return s || (s = new Intl.NumberFormat(r, {
173
176
  localeMatcher: "best fit",
174
- maximumFractionDigits: t,
175
- minimumFractionDigits: a,
177
+ maximumFractionDigits: a,
178
+ minimumFractionDigits: t,
176
179
  minimumIntegerDigits: 1,
177
180
  style: "decimal",
178
181
  useGrouping: !0
179
182
  }), c[n] = s), s.format(e);
180
- }, j = (e) => e == null ? "" : e < 1e3 ? d(e) : e < 1e6 ? `${o(e / 1e3, 2, 0)}K` : e < 1e9 ? `${o(e / 1e6, 2, 0)}M` : e < 1e12 ? `${o(e / 1e9, 2, 0)}B` : `${o(e / 1e12, 2, 0)}T`, U = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${d(e)} bytes` : e < 1048576 ? `${o(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${o(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${o(e / 1073741824, 2, 0)} GB` : `${o(e / 1099511627776, 2, 0)} TB`, G = (e) => e == null ? "" : e < 1e3 ? `${d(e)} ms` : e === 1e3 ? `${d(e)} sec` : e < 6e4 ? `${o(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${o(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${o(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${o(e / 864e5, 2, 0)} days`, d = (e, t = g) => {
183
+ }, j = (e) => e == null ? "" : e < 1e3 ? d(e) : e < 1e6 ? `${o(e / 1e3, 2, 0)}K` : e < 1e9 ? `${o(e / 1e6, 2, 0)}M` : e < 1e12 ? `${o(e / 1e9, 2, 0)}B` : `${o(e / 1e12, 2, 0)}T`, U = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${d(e)} bytes` : e < 1048576 ? `${o(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${o(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${o(e / 1073741824, 2, 0)} GB` : `${o(e / 1099511627776, 2, 0)} TB`, G = (e) => e == null ? "" : e < 1e3 ? `${d(e)} ms` : e === 1e3 ? `${d(e)} sec` : e < 6e4 ? `${o(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${o(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${o(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${o(e / 864e5, 2, 0)} days`, d = (e, a = m) => {
181
184
  if (e == null) return "";
182
- const a = `${t}decimal0.0`;
183
- let r = c[a];
184
- return r || (r = new Intl.NumberFormat(t, {
185
+ const t = `${a}decimal0.0`;
186
+ let r = c[t];
187
+ return r || (r = new Intl.NumberFormat(a, {
185
188
  localeMatcher: "best fit",
186
189
  maximumFractionDigits: 0,
187
190
  minimumFractionDigits: 0,
188
191
  minimumIntegerDigits: 1,
189
192
  style: "decimal",
190
193
  useGrouping: !0
191
- }), c[a] = r), r.format(e);
194
+ }), c[t] = r), r.format(e);
192
195
  }, V = (e) => {
193
196
  switch (e) {
194
197
  case "csv":
@@ -212,9 +215,9 @@ const g = "en-US", c = {}, B = (e) => {
212
215
  { id: "xlsx", label: { "en-gb": "XLSX" } },
213
216
  { id: "xml", label: { "en-gb": "XML" } }
214
217
  ], W = (e = l) => {
215
- const t = [];
216
- for (const a of p) t.push({ ...a, label: a.label[e] || a.label[l] || a.id });
217
- return t;
218
+ const a = [];
219
+ for (const t of p) a.push({ ...t, label: t.label[e] || t.label[l] || t.id });
220
+ return a;
218
221
  }, f = [
219
222
  { id: `
220
223
  `, label: { "en-gb": "Newline" } },
@@ -222,10 +225,10 @@ const g = "en-US", c = {}, B = (e) => {
222
225
  { id: `\r
223
226
  `, label: { "en-gb": "Carriage Return/Newline" } }
224
227
  ], P = (e = l) => {
225
- const t = [];
226
- for (const a of f)
227
- t.push({ ...a, label: a.label[e] || a.label[l] || a.id });
228
- return t;
228
+ const a = [];
229
+ for (const t of f)
230
+ a.push({ ...t, label: t.label[e] || t.label[l] || t.id });
231
+ return a;
229
232
  }, y = [
230
233
  { id: ":", label: { "en-gb": "Colon" } },
231
234
  { id: ",", label: { "en-gb": "Comma" } },
@@ -239,11 +242,11 @@ const g = "en-US", c = {}, B = (e) => {
239
242
  { id: "0x1F", label: { "en-gb": "Unit Separator" } },
240
243
  { id: "|", label: { "en-gb": "Vertical Bar" } }
241
244
  ], X = (e = l) => {
242
- const t = [];
243
- for (const a of y)
244
- t.push({ ...a, label: a.label[e] || a.label[l] || a.id });
245
- return t;
246
- }, E = [
245
+ const a = [];
246
+ for (const t of y)
247
+ a.push({ ...t, label: t.label[e] || t.label[l] || t.id });
248
+ return a;
249
+ }, h = [
247
250
  { id: "alpha", color: "red", label: { "en-gb": "alpha" } },
248
251
  { id: "beta", color: "amber", label: { "en-gb": "beta" } },
249
252
  { id: "generalAvailability", color: "green", label: { "en-gb": "" } },
@@ -253,29 +256,29 @@ const g = "en-US", c = {}, B = (e) => {
253
256
  { id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
254
257
  { id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
255
258
  { id: "underReview", color: "other", label: { "en-gb": "under-review" } }
256
- ], z = (e, t = l) => {
257
- const a = E.find((r) => r.id === e);
258
- return a ? { ...a, label: a.label[t] || a.label[l] || e } : { id: e, color: "other", label: e };
259
+ ], z = (e, a = l) => {
260
+ const t = h.find((r) => r.id === e);
261
+ return t ? { ...t, label: t.label[a] || t.label[l] || e } : { id: e, color: "other", label: e };
259
262
  }, l = "en-gb";
260
263
  export {
261
264
  T as APIError,
262
265
  i as ApplicationError,
263
- h as CONNECTOR_DESTINATION_OPERATIONS,
266
+ E as CONNECTOR_DESTINATION_OPERATIONS,
264
267
  I as CONNECTOR_SOURCE_OPERATIONS,
265
268
  l as DEFAULT_LOCALE_CODE,
266
- w as DefaultTimestamp,
269
+ C as DefaultTimestamp,
267
270
  v as EngineError,
268
- m as FetchError,
269
- $ as OperationalError,
271
+ g as FetchError,
272
+ O as OperationalError,
270
273
  b as VueError,
271
- R as WindowPromiseRejectionError,
272
- O as WindowRuntimeError,
273
- A as buildFetchError,
274
- F as concatenateSerialisedErrorMessages,
275
- S as convertMillisecondsToTimestamp,
276
- B as convertODataTypeIdToUsageTypeId,
274
+ A as WindowPromiseRejectionError,
275
+ R as WindowRuntimeError,
276
+ $ as buildFetchError,
277
+ _ as concatenateSerialisedErrorMessages,
278
+ w as convertMillisecondsToTimestamp,
279
+ k as convertODataTypeIdToUsageTypeId,
277
280
  M as extractExtensionFromPath,
278
- L as extractNameFromPath,
281
+ B as extractNameFromPath,
279
282
  o as formatNumberAsDecimalNumber,
280
283
  G as formatNumberAsDuration,
281
284
  j as formatNumberAsSize,
@@ -287,9 +290,9 @@ export {
287
290
  P as getRecordDelimiters,
288
291
  X as getValueDelimiters,
289
292
  V as lookupMimeTypeForExtension,
290
- _ as normalizeToError,
293
+ F as normalizeToError,
291
294
  D as presentationViewTypeMap,
292
- k as serialiseError,
295
+ L as serialiseError,
293
296
  x as useCytoscapeJS,
294
- C as useDataTable
297
+ S as useDataTable
295
298
  };
@@ -5,8 +5,8 @@ export interface PresentationConfig extends ComponentConfig {
5
5
  }
6
6
  export type PresentationCategoryId = 'cartesianChart' | 'chordDiagram' | 'periodFlowBoundariesChart' | 'polarChart' | 'rangeChart' | 'sankeyDiagram' | 'streamGraph' | 'valueTable';
7
7
  export type PresentationCartesianTypeId = 'areaLine' | 'areaSpline' | 'bar' | 'column' | 'line' | 'pyramid' | 'spline';
8
- export type PresentationPolarTypeId = 'area' | 'column' | 'line';
9
- export type PresentationRangeTypeId = 'area' | 'bar' | 'column';
8
+ export type PresentationPolarTypeId = 'areaLine' | 'areaRange' | 'areaSpline' | 'column' | 'line' | 'spline';
9
+ export type PresentationRangeTypeId = 'areaLine' | 'areaSpline' | 'bar' | 'column';
10
10
  export type PresentationVisualConfig = {
11
11
  content: PresentationVisualContentConfig;
12
12
  views: PresentationVisualViewConfig[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.229",
3
+ "version": "0.3.231",
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,