@datapos/datapos-shared 0.3.124 → 0.3.125

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.
@@ -18,21 +18,21 @@ const j = 0, _ = (e) => e, J = () => Date.now(), L = {
18
18
  streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
19
19
  values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
20
20
  };
21
- function M() {
21
+ function B() {
22
22
  function e(r, a, t) {
23
23
  t.textContent = "Cytoscape.js diagram goes here...";
24
24
  }
25
25
  return { render: e };
26
26
  }
27
- function U() {
27
+ function M() {
28
28
  function e(r, a, t) {
29
29
  t.textContent = "values table goes here...";
30
30
  }
31
31
  return { render: e };
32
32
  }
33
33
  const O = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", E = "highcharts";
34
- let b, S = !1;
35
- function B() {
34
+ let b, I = !1;
35
+ function U() {
36
36
  async function e(n, s, u, d) {
37
37
  await t();
38
38
  const c = [];
@@ -91,8 +91,8 @@ function B() {
91
91
  );
92
92
  }
93
93
  async function o() {
94
- if (S) return;
95
- await import(`${O}highcharts-more.src.js`), S = !0;
94
+ if (I) return;
95
+ await import(`${O}highcharts-more.src.js`), I = !0;
96
96
  }
97
97
  return { renderCartesianChart: e, renderPolarChart: r, renderRangeChart: a };
98
98
  }
@@ -117,7 +117,7 @@ class H extends h {
117
117
  super(r, a, t), this.name = "EngineError";
118
118
  }
119
119
  }
120
- class I extends h {
120
+ class S extends h {
121
121
  body;
122
122
  constructor(r, a, t, o) {
123
123
  super(r, a, o), this.name = "FetchError", this.body = t;
@@ -130,12 +130,12 @@ class T extends h {
130
130
  super(r, a, n), this.name = "VueHandledError", this.info = t, this.componentName = o;
131
131
  }
132
132
  }
133
- class P extends h {
133
+ class V extends h {
134
134
  constructor(r, a, t) {
135
135
  super(r, a, t), this.name = "WindowHandledRuntimeError";
136
136
  }
137
137
  }
138
- class V extends h {
138
+ class P extends h {
139
139
  constructor(r, a, t) {
140
140
  super(r, a, t), this.name = "WindowHandledPromiseRejectionError";
141
141
  }
@@ -147,7 +147,7 @@ class W extends v {
147
147
  }
148
148
  async function X(e, r, a) {
149
149
  const t = `${r} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
150
- return new I(t, a, o);
150
+ return new S(t, a, o);
151
151
  }
152
152
  function G(e) {
153
153
  return e.map((r) => r.message).join(" ");
@@ -167,7 +167,7 @@ function K(e) {
167
167
  for (; t && !r.has(t); ) {
168
168
  r.add(t);
169
169
  let o;
170
- if (t instanceof I)
170
+ if (t instanceof S)
171
171
  o = { body: t.body, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
172
172
  else if (t instanceof T)
173
173
  o = { componentName: t.componentName, info: t.info, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
@@ -324,6 +324,7 @@ const N = "en-US", w = {}, q = (e) => {
324
324
  }, R = ["createObject", "dropObject", "removeRecords", "upsertRecords"], $ = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
325
325
  async function ce() {
326
326
  try {
327
+ console.log("🚀 Building connector configuration...");
327
328
  const e = await JSON.parse(await i.readFile("package.json", "utf8")), r = await JSON.parse(await i.readFile("config.json", "utf8")), a = await i.readFile("src/index.ts", "utf8");
328
329
  let t = !1, o = !1;
329
330
  const n = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...a.matchAll(n)].filter((d) => !d[1] && d[2] !== "constructor").map((d) => {
@@ -337,6 +338,7 @@ async function ce() {
337
338
  }
338
339
  async function le() {
339
340
  try {
341
+ console.log("🚀 Building context configuration...");
340
342
  const e = await JSON.parse(await i.readFile("package.json", "utf8")), r = await JSON.parse(await i.readFile("config.json", "utf8")), a = await i.readFile("src/index.ts", "utf8"), t = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, o = [...a.matchAll(t)].filter((n) => !n[1] && n[2] !== "constructor").map((n) => n[2]);
341
343
  e.name && (r.id = e.name), r.operations = o, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
342
344
  } catch (e) {
@@ -345,6 +347,7 @@ async function le() {
345
347
  }
346
348
  async function de() {
347
349
  try {
350
+ console.log("🚀 Building informer configuration...");
348
351
  const e = await JSON.parse(await i.readFile("package.json", "utf8")), r = await JSON.parse(await i.readFile("config.json", "utf8")), a = await i.readFile("src/index.ts", "utf8"), t = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, o = [...a.matchAll(t)].filter((n) => !n[1] && n[2] !== "constructor").map((n) => n[2]);
349
352
  e.name && (r.id = e.name), r.operations = o, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
350
353
  } catch (e) {
@@ -353,6 +356,7 @@ async function de() {
353
356
  }
354
357
  async function ue() {
355
358
  try {
359
+ console.log("🚀 Building presenter configuration...");
356
360
  const e = await JSON.parse(await i.readFile("package.json", "utf8")), r = await JSON.parse(await i.readFile("config.json", "utf8")), a = await i.readFile("src/index.ts", "utf8"), t = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, o = [...a.matchAll(t)].filter((n) => !n[1] && n[2] !== "constructor").map((n) => n[2]);
357
361
  e.name && (r.id = e.name), r.operations = o, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
358
362
  } catch (e) {
@@ -361,12 +365,13 @@ async function ue() {
361
365
  }
362
366
  async function ge() {
363
367
  try {
368
+ console.log("🚀 Bumping version...");
364
369
  const e = await JSON.parse(await i.readFile("package.json", "utf8"));
365
370
  if (e.version) {
366
371
  const r = e.version, a = e.version.split(".");
367
- e.version = `${a[0]}.${a[1]}.${Number(a[2]) + 1}`, await i.writeFile("package.json", JSON.stringify(e, void 0, 4), "utf8"), console.log(`✅ Bumped version from ${r} to ${e.version}.`);
372
+ e.version = `${a[0]}.${a[1]}.${Number(a[2]) + 1}`, await i.writeFile("package.json", JSON.stringify(e, void 0, 4), "utf8"), console.log(`✅ Version bumped from ${r} to ${e.version}.`);
368
373
  } else
369
- e.version = "0.0.001", await i.writeFile("package.json", JSON.stringify(e, void 0, 4), "utf8"), console.log(`⚠️ Set version to ${e.version}.`);
374
+ e.version = "0.0.001", await i.writeFile("package.json", JSON.stringify(e, void 0, 4), "utf8"), console.log(`⚠️ Version initialised to ${e.version}.`);
370
375
  } catch (e) {
371
376
  console.warn("❌ Error bumping package version.", e);
372
377
  }
@@ -378,11 +383,11 @@ export {
378
383
  p as DEFAULT_LOCALE_CODE,
379
384
  j as DefaultTimestamp,
380
385
  H as EngineError,
381
- I as FetchError,
386
+ S as FetchError,
382
387
  W as OperationalError,
383
388
  T as VueError,
384
- V as WindowPromiseRejectionError,
385
- P as WindowRuntimeError,
389
+ P as WindowPromiseRejectionError,
390
+ V as WindowRuntimeError,
386
391
  ce as buildConnectorConfig,
387
392
  le as buildContextConfig,
388
393
  X as buildFetchError,
@@ -408,7 +413,7 @@ export {
408
413
  Z as normalizeToError,
409
414
  L as presentationViewTypeMap,
410
415
  K as serialiseError,
411
- M as useCytoscapeJS,
412
- U as useDataTable,
413
- B as useHighcharts
416
+ B as useCytoscapeJS,
417
+ M as useDataTable,
418
+ U as useHighcharts
414
419
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@datapos/datapos-shared",
3
3
  "license": "MIT",
4
4
  "private": false,
5
- "version": "0.3.124",
5
+ "version": "0.3.125",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"