@datapos/datapos-shared 0.3.96 → 0.3.97

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.
@@ -37,15 +37,15 @@ class _ extends p {
37
37
  }
38
38
  class D extends p {
39
39
  body;
40
- constructor(t, a, r, o) {
41
- super(t, a, o), this.name = "FetchError", this.body = r;
40
+ constructor(t, a, r, n) {
41
+ super(t, a, n), this.name = "FetchError", this.body = r;
42
42
  }
43
43
  }
44
44
  class v extends p {
45
45
  componentName;
46
46
  info;
47
- constructor(t, a, r, o, n) {
48
- super(t, a, n), this.name = "VueHandledError", this.info = r, this.componentName = o;
47
+ constructor(t, a, r, n, o) {
48
+ super(t, a, o), this.name = "VueHandledError", this.info = r, this.componentName = n;
49
49
  }
50
50
  }
51
51
  class M extends p {
@@ -64,8 +64,8 @@ class B extends I {
64
64
  }
65
65
  }
66
66
  async function j(e, t, a) {
67
- const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
68
- return new D(r, a, o);
67
+ const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, n = await e.text();
68
+ return new D(r, a, n);
69
69
  }
70
70
  function H(e) {
71
71
  return e.map((t) => t.message).join(" ");
@@ -84,18 +84,18 @@ function z(e) {
84
84
  let r = e;
85
85
  for (; r && !t.has(r); ) {
86
86
  t.add(r);
87
- let o;
87
+ let n;
88
88
  if (r instanceof D)
89
- o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
89
+ n = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
90
90
  else if (r instanceof v)
91
- o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
91
+ n = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
92
92
  else if (r instanceof I)
93
- o = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
93
+ n = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
94
94
  else if (r instanceof Error) {
95
- const n = r;
96
- o = { locator: "", message: n.message, name: n.name, stack: n.stack }, r = n.cause;
97
- } else r ? (o = { locator: "", message: String(r), name: "Error" }, r = void 0) : (o = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
98
- /(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), a.push(o);
95
+ const o = r;
96
+ n = { locator: "", message: o.message, name: o.name, stack: o.stack }, r = o.cause;
97
+ } else r ? (n = { locator: "", message: String(r), name: "Error" }, r = void 0) : (n = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
98
+ /(?:\.{3}|[.!?])$/.test(n.message) || (n.message += "."), a.push(n);
99
99
  }
100
100
  return a;
101
101
  }
@@ -114,55 +114,55 @@ function X() {
114
114
  const S = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", E = "highcharts";
115
115
  let b, w = !1;
116
116
  function G() {
117
- async function e(n, s, u, h) {
117
+ async function e(o, s, u, h) {
118
118
  await r();
119
119
  const l = [];
120
120
  for (const c of s.data.measures)
121
- l.push({ type: n.options.highchartsType, name: c.name, data: c.data });
122
- const g = {
123
- chart: { type: n.options.highchartsType },
121
+ l.push({ type: o.options.highchartsType, name: c.name, data: c.data });
122
+ const m = {
123
+ chart: { type: o.options.highchartsType },
124
124
  plotOptions: { series: { borderColor: "#333" } },
125
125
  series: l,
126
126
  title: { text: s.title.text },
127
127
  xAxis: { categories: s.data.categoryLabels },
128
128
  yAxis: { title: { text: s.data.name } }
129
- }, m = b.chart(u, g, h);
130
- return { chart: m, resize: () => m.reflow(), vendorId: E };
129
+ }, g = b.chart(u, m, h);
130
+ return { chart: g, resize: () => g.reflow(), vendorId: E };
131
131
  }
132
- async function t(n, s, u, h) {
133
- await Promise.all([r(), o()]);
132
+ async function t(o, s, u, h) {
133
+ await Promise.all([r(), n()]);
134
134
  const l = [];
135
135
  for (const c of s.data.measures)
136
- l.push({ type: n.options.highchartsType, name: c.name, data: c.data });
137
- const g = {
136
+ l.push({ type: o.options.highchartsType, name: c.name, data: c.data });
137
+ const m = {
138
138
  chart: { polar: !0 },
139
139
  plotOptions: { series: { borderColor: "#333" } },
140
140
  series: l,
141
141
  title: { text: s.title.text },
142
142
  xAxis: { categories: s.data.categoryLabels },
143
143
  yAxis: { title: { text: s.data.name } }
144
- }, m = b.chart(u, g, h);
145
- return { chart: m, resize: () => m.reflow(), vendorId: E };
144
+ }, g = b.chart(u, m, h);
145
+ return { chart: g, resize: () => g.reflow(), vendorId: E };
146
146
  }
147
- async function a(n, s, u, h) {
148
- await Promise.all([r(), o()]);
149
- const l = [], g = [];
147
+ async function a(o, s, u, h) {
148
+ await Promise.all([r(), n()]);
149
+ const l = [], m = [];
150
150
  for (let f = 0; f++; f < s.data.measures[0].data.length)
151
- g.push([s.data.measures[0].data[f], s.data.measures[1].data[f]]);
152
- l.push({ type: n.options.highchartsType, name: "Unknown", data: g });
153
- const m = {
154
- chart: { type: n.options.highchartsType, inverted: n.options.inverted },
151
+ m.push([s.data.measures[0].data[f], s.data.measures[1].data[f]]);
152
+ console.log(1111, s.data.measures, m), l.push({ type: o.options.highchartsType, name: "Unknown", data: m });
153
+ const g = {
154
+ chart: { type: o.options.highchartsType, inverted: o.options.inverted },
155
155
  plotOptions: { series: { borderColor: "#333" } },
156
156
  series: l,
157
157
  title: { text: s.title.text },
158
158
  xAxis: { categories: s.data.categoryLabels },
159
159
  yAxis: { title: { text: s.data.name } }
160
- }, c = b.chart(u, m, h);
160
+ }, c = b.chart(u, g, h);
161
161
  return { chart: c, resize: () => c.reflow(), vendorId: E };
162
162
  }
163
163
  async function r() {
164
164
  if (b) return;
165
- const n = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${n}highcharts.src.js`, u = `${n}modules/accessibility.src.js`;
165
+ const o = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${o}highcharts.src.js`, u = `${o}modules/accessibility.src.js`;
166
166
  b = (await import(
167
167
  /* @vite-ignore */
168
168
  s
@@ -171,7 +171,7 @@ function G() {
171
171
  u
172
172
  );
173
173
  }
174
- async function o() {
174
+ async function n() {
175
175
  if (w) return;
176
176
  await import(`${S}highcharts-more.src.js`), w = !0;
177
177
  }
@@ -228,16 +228,16 @@ const T = "en-US", y = {}, P = (e) => {
228
228
  }
229
229
  }, i = (e, t = 2, a = t, r = T) => {
230
230
  if (e == null) return "";
231
- const o = `${r}decimal${t}.${a}`;
232
- let n = y[o];
233
- return n || (n = new Intl.NumberFormat(r, {
231
+ const n = `${r}decimal${t}.${a}`;
232
+ let o = y[n];
233
+ return o || (o = new Intl.NumberFormat(r, {
234
234
  localeMatcher: "best fit",
235
235
  maximumFractionDigits: t,
236
236
  minimumFractionDigits: a,
237
237
  minimumIntegerDigits: 1,
238
238
  style: "decimal",
239
239
  useGrouping: !0
240
- }), y[o] = n), n.format(e);
240
+ }), y[n] = o), o.format(e);
241
241
  }, q = (e) => e == null ? "" : e < 1e3 ? x(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`, Q = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${x(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`, Y = (e) => e == null ? "" : e < 1e3 ? `${x(e)} ms` : e === 1e3 ? `${x(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`, x = (e, t = T) => {
242
242
  if (e == null) return "";
243
243
  const a = `${t}decimal0.0`;
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.96",
5
+ "version": "0.3.97",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"