@datapos/datapos-shared 0.3.121 → 0.3.122

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.
@@ -33,13 +33,13 @@ function B() {
33
33
  const S = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", I = "highcharts";
34
34
  let b, T = !1;
35
35
  function H() {
36
- async function e(n, s, c, d) {
36
+ async function e(o, s, c, d) {
37
37
  await t();
38
38
  const i = [];
39
39
  for (const u of s.data.measures)
40
- i.push({ type: n.options.highchartsType, name: u.name, data: u.data });
40
+ i.push({ type: o.options.highchartsType, name: u.name, data: u.data });
41
41
  const p = {
42
- chart: { type: n.options.highchartsType },
42
+ chart: { type: o.options.highchartsType },
43
43
  plotOptions: { series: { borderColor: "#333" } },
44
44
  series: i,
45
45
  title: { text: s.title.text },
@@ -48,11 +48,11 @@ function H() {
48
48
  }, m = b.chart(c, p, d);
49
49
  return { chart: m, resize: () => m.reflow(), vendorId: I };
50
50
  }
51
- async function r(n, s, c, d) {
52
- await Promise.all([t(), o()]);
51
+ async function r(o, s, c, d) {
52
+ await Promise.all([t(), n()]);
53
53
  const i = [];
54
54
  for (const u of s.data.measures)
55
- i.push({ type: n.options.highchartsType, name: u.name, data: u.data });
55
+ i.push({ type: o.options.highchartsType, name: u.name, data: u.data });
56
56
  const p = {
57
57
  chart: { polar: !0 },
58
58
  plotOptions: { series: { borderColor: "#333" } },
@@ -63,14 +63,14 @@ function H() {
63
63
  }, m = b.chart(c, p, d);
64
64
  return { chart: m, resize: () => m.reflow(), vendorId: I };
65
65
  }
66
- async function a(n, s, c, d) {
67
- await Promise.all([t(), o()]);
66
+ async function a(o, s, c, d) {
67
+ await Promise.all([t(), n()]);
68
68
  const i = [], p = [];
69
69
  for (let f = 0; f < s.data.measures[0].data.length; f++)
70
70
  p.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
71
- i.push({ type: n.options.highchartsType, name: "Unknown", data: p });
71
+ i.push({ type: o.options.highchartsType, name: "Unknown", data: p });
72
72
  const m = {
73
- chart: { type: n.options.highchartsType, inverted: n.options.inverted },
73
+ chart: { type: o.options.highchartsType, inverted: o.options.inverted },
74
74
  plotOptions: { series: { borderColor: "#333" } },
75
75
  series: i,
76
76
  title: { text: s.title.text },
@@ -81,7 +81,7 @@ function H() {
81
81
  }
82
82
  async function t() {
83
83
  if (b) return;
84
- const n = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${n}highcharts.src.js`, c = `${n}modules/accessibility.src.js`;
84
+ const o = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${o}highcharts.src.js`, c = `${o}modules/accessibility.src.js`;
85
85
  b = (await import(
86
86
  /* @vite-ignore */
87
87
  s
@@ -90,7 +90,7 @@ function H() {
90
90
  c
91
91
  );
92
92
  }
93
- async function o() {
93
+ async function n() {
94
94
  if (T) return;
95
95
  await import(`${S}highcharts-more.src.js`), T = !0;
96
96
  }
@@ -119,15 +119,15 @@ class P extends h {
119
119
  }
120
120
  class v extends h {
121
121
  body;
122
- constructor(r, a, t, o) {
123
- super(r, a, o), this.name = "FetchError", this.body = t;
122
+ constructor(r, a, t, n) {
123
+ super(r, a, n), this.name = "FetchError", this.body = t;
124
124
  }
125
125
  }
126
126
  class N extends h {
127
127
  componentName;
128
128
  info;
129
- constructor(r, a, t, o, n) {
130
- super(r, a, n), this.name = "VueHandledError", this.info = t, this.componentName = o;
129
+ constructor(r, a, t, n, o) {
130
+ super(r, a, o), this.name = "VueHandledError", this.info = t, this.componentName = n;
131
131
  }
132
132
  }
133
133
  class z extends h {
@@ -146,8 +146,8 @@ class V extends w {
146
146
  }
147
147
  }
148
148
  async function X(e, r, a) {
149
- const t = `${r} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
150
- return new v(t, a, o);
149
+ const t = `${r} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, n = await e.text();
150
+ return new v(t, a, n);
151
151
  }
152
152
  function G(e) {
153
153
  return e.map((r) => r.message).join(" ");
@@ -166,18 +166,18 @@ function Z(e) {
166
166
  let t = e;
167
167
  for (; t && !r.has(t); ) {
168
168
  r.add(t);
169
- let o;
169
+ let n;
170
170
  if (t instanceof v)
171
- o = { body: t.body, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
171
+ n = { body: t.body, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
172
172
  else if (t instanceof N)
173
- o = { componentName: t.componentName, info: t.info, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
173
+ n = { componentName: t.componentName, info: t.info, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
174
174
  else if (t instanceof w)
175
- o = { locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
175
+ n = { locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
176
176
  else if (t instanceof Error) {
177
- const n = t;
178
- o = { locator: "", message: n.message, name: n.name, stack: n.stack }, t = n.cause;
179
- } else t ? (o = { locator: "", message: String(t), name: "Error" }, t = void 0) : (o = { locator: "", message: "Unknown error.", name: "Error" }, t = void 0);
180
- /(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), a.push(o);
177
+ const o = t;
178
+ n = { locator: "", message: o.message, name: o.name, stack: o.stack }, t = o.cause;
179
+ } else t ? (n = { locator: "", message: String(t), name: "Error" }, t = void 0) : (n = { locator: "", message: "Unknown error.", name: "Error" }, t = void 0);
180
+ /(?:\.{3}|[.!?])$/.test(n.message) || (n.message += "."), a.push(n);
181
181
  }
182
182
  return a;
183
183
  }
@@ -232,16 +232,16 @@ const D = "en-US", E = {}, q = (e) => {
232
232
  }
233
233
  }, l = (e, r = 2, a = r, t = D) => {
234
234
  if (e == null) return "";
235
- const o = `${t}decimal${r}.${a}`;
236
- let n = E[o];
237
- return n || (n = new Intl.NumberFormat(t, {
235
+ const n = `${t}decimal${r}.${a}`;
236
+ let o = E[n];
237
+ return o || (o = new Intl.NumberFormat(t, {
238
238
  localeMatcher: "best fit",
239
239
  maximumFractionDigits: r,
240
240
  minimumFractionDigits: a,
241
241
  minimumIntegerDigits: 1,
242
242
  style: "decimal",
243
243
  useGrouping: !0
244
- }), E[o] = n), n.format(e);
244
+ }), E[n] = o), o.format(e);
245
245
  }, ee = (e) => e == null ? "" : e < 1e3 ? x(e) : e < 1e6 ? `${l(e / 1e3, 2, 0)}K` : e < 1e9 ? `${l(e / 1e6, 2, 0)}M` : e < 1e12 ? `${l(e / 1e9, 2, 0)}B` : `${l(e / 1e12, 2, 0)}T`, te = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${x(e)} bytes` : e < 1048576 ? `${l(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${l(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${l(e / 1073741824, 2, 0)} GB` : `${l(e / 1099511627776, 2, 0)} TB`, re = (e) => e == null ? "" : e < 1e3 ? `${x(e)} ms` : e === 1e3 ? `${x(e)} sec` : e < 6e4 ? `${l(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${l(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${l(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${l(e / 864e5, 2, 0)} days`, x = (e, r = D) => {
246
246
  if (e == null) return "";
247
247
  const a = `${r}decimal0.0`;
@@ -325,11 +325,11 @@ const D = "en-US", E = {}, q = (e) => {
325
325
  async function le() {
326
326
  try {
327
327
  const e = await JSON.parse(await y.readFile("package.json", "utf8")), r = await JSON.parse(await y.readFile("config.json", "utf8")), a = await y.readFile("src/index.ts", "utf8");
328
- let t = !1, o = !1;
329
- 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) => {
328
+ let t = !1, n = !1;
329
+ const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...a.matchAll(o)].filter((d) => !d[1] && d[2] !== "constructor").map((d) => {
330
330
  const i = d[2];
331
- return t = $.includes(i), o = _.includes(i), i;
332
- }), c = o && t ? "bidirectional" : o ? "source" : t ? "destination" : void 0;
331
+ return t = t || $.includes(i), n = n || _.includes(i), i;
332
+ }), c = n && t ? "bidirectional" : n ? "source" : t ? "destination" : void 0;
333
333
  e.name && (r.id = e.name), r.operations = s, c && (r.usageId = c), e.version && (r.version = e.version), await y.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
334
334
  } catch (e) {
335
335
  console.warn("Error building connector configuration.", e);
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.121",
5
+ "version": "0.3.122",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"