@datapos/datapos-shared 0.3.131 → 0.3.137

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,5 +1,4 @@
1
- import { promises as i } from "fs";
2
- const j = 0, _ = (e) => e, J = () => Date.now(), L = {
1
+ const R = 0, L = (e) => e, F = () => Date.now(), _ = {
3
2
  cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
4
3
  cartesian_areaSpline: { categoryId: "cartesian", typeId: "areaSpline", label: { "en-gb": "Area Spline" }, options: { highchartsType: "area" } },
5
4
  cartesian_bar: { categoryId: "cartesian", typeId: "bar", label: { "en-gb": "Bar" }, options: { highchartsType: "bar" } },
@@ -18,170 +17,170 @@ const j = 0, _ = (e) => e, J = () => Date.now(), L = {
18
17
  streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
19
18
  values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
20
19
  };
21
- function B() {
22
- function e(r, a, t) {
23
- t.textContent = "Cytoscape.js diagram goes here...";
20
+ function k() {
21
+ function e(t, a, r) {
22
+ r.textContent = "Cytoscape.js diagram goes here...";
24
23
  }
25
24
  return { render: e };
26
25
  }
27
- function M() {
28
- function e(r, a, t) {
29
- t.textContent = "values table goes here...";
26
+ function O() {
27
+ function e(t, a, r) {
28
+ r.textContent = "values table goes here...";
30
29
  }
31
30
  return { render: e };
32
31
  }
33
- const O = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", E = "highcharts";
34
- let b, I = !1;
35
- function U() {
36
- async function e(o, s, d, u) {
37
- await t();
38
- const c = [];
39
- for (const g of s.data.measures)
40
- c.push({ type: o.options.highchartsType, name: g.name, data: g.data });
41
- const f = {
42
- chart: { type: o.options.highchartsType },
32
+ const v = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", E = "highcharts";
33
+ let b, w = !1;
34
+ function M() {
35
+ async function e(n, s, u, h) {
36
+ await r();
37
+ const l = [];
38
+ for (const c of s.data.measures)
39
+ l.push({ type: n.options.highchartsType, name: c.name, data: c.data });
40
+ const g = {
41
+ chart: { type: n.options.highchartsType },
43
42
  plotOptions: { series: { borderColor: "#333" } },
44
- series: c,
43
+ series: l,
45
44
  title: { text: s.title.text },
46
45
  xAxis: { categories: s.data.categoryLabels },
47
46
  yAxis: { title: { text: s.data.name } }
48
- }, m = b.chart(d, f, u);
47
+ }, m = b.chart(u, g, h);
49
48
  return { chart: m, resize: () => m.reflow(), vendorId: E };
50
49
  }
51
- async function r(o, s, d, u) {
52
- await Promise.all([t(), n()]);
53
- const c = [];
54
- for (const g of s.data.measures)
55
- c.push({ type: o.options.highchartsType, name: g.name, data: g.data });
56
- const f = {
50
+ async function t(n, s, u, h) {
51
+ await Promise.all([r(), o()]);
52
+ const l = [];
53
+ for (const c of s.data.measures)
54
+ l.push({ type: n.options.highchartsType, name: c.name, data: c.data });
55
+ const g = {
57
56
  chart: { polar: !0 },
58
57
  plotOptions: { series: { borderColor: "#333" } },
59
- series: c,
58
+ series: l,
60
59
  title: { text: s.title.text },
61
60
  xAxis: { categories: s.data.categoryLabels },
62
61
  yAxis: { title: { text: s.data.name } }
63
- }, m = b.chart(d, f, u);
62
+ }, m = b.chart(u, g, h);
64
63
  return { chart: m, resize: () => m.reflow(), vendorId: E };
65
64
  }
66
- async function a(o, s, d, u) {
67
- await Promise.all([t(), n()]);
68
- const c = [], f = [];
69
- for (let y = 0; y < s.data.measures[0].data.length; y++)
70
- f.push([s.data.measures[0].data[y][0], s.data.measures[1].data[y][0]]);
71
- c.push({ type: o.options.highchartsType, name: "Unknown", data: f });
65
+ async function a(n, s, u, h) {
66
+ await Promise.all([r(), o()]);
67
+ const l = [], g = [];
68
+ for (let f = 0; f < s.data.measures[0].data.length; f++)
69
+ g.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
70
+ l.push({ type: n.options.highchartsType, name: "Unknown", data: g });
72
71
  const m = {
73
- chart: { type: o.options.highchartsType, inverted: o.options.inverted },
72
+ chart: { type: n.options.highchartsType, inverted: n.options.inverted },
74
73
  plotOptions: { series: { borderColor: "#333" } },
75
- series: c,
74
+ series: l,
76
75
  title: { text: s.title.text },
77
76
  xAxis: { categories: s.data.categoryLabels },
78
77
  yAxis: { title: { text: s.data.name } }
79
- }, g = b.chart(d, m, u);
80
- return { chart: g, resize: () => g.reflow(), vendorId: E };
78
+ }, c = b.chart(u, m, h);
79
+ return { chart: c, resize: () => c.reflow(), vendorId: E };
81
80
  }
82
- async function t() {
81
+ async function r() {
83
82
  if (b) return;
84
- const o = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${o}highcharts.src.js`, d = `${o}modules/accessibility.src.js`;
83
+ 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`;
85
84
  b = (await import(
86
85
  /* @vite-ignore */
87
86
  s
88
87
  )).default, await import(
89
88
  /* @vite-ignore */
90
- d
89
+ u
91
90
  );
92
91
  }
93
- async function n() {
94
- if (I) return;
95
- await import(`${O}highcharts-more.src.js`), I = !0;
92
+ async function o() {
93
+ if (w) return;
94
+ await import(`${v}highcharts-more.src.js`), w = !0;
96
95
  }
97
- return { renderCartesianChart: e, renderPolarChart: r, renderRangeChart: a };
96
+ return { renderCartesianChart: e, renderPolarChart: t, renderRangeChart: a };
98
97
  }
99
- class v extends Error {
98
+ class I extends Error {
100
99
  locator;
101
- constructor(r, a, t) {
102
- super(r, t), this.name = "DataPosError", this.locator = a, Error.captureStackTrace?.(this, new.target);
100
+ constructor(t, a, r) {
101
+ super(t, r), this.name = "DataPosError", this.locator = a, Error.captureStackTrace?.(this, new.target);
103
102
  }
104
103
  }
105
- class h extends v {
106
- constructor(r, a, t) {
107
- super(r, a, t), this.name = "ApplicationError";
104
+ class p extends I {
105
+ constructor(t, a, r) {
106
+ super(t, a, r), this.name = "ApplicationError";
108
107
  }
109
108
  }
110
- class z extends h {
111
- constructor(r, a, t) {
112
- super(r, a, t), this.name = "APIError";
109
+ class U extends p {
110
+ constructor(t, a, r) {
111
+ super(t, a, r), this.name = "APIError";
113
112
  }
114
113
  }
115
- class H extends h {
116
- constructor(r, a, t) {
117
- super(r, a, t), this.name = "EngineError";
114
+ class B extends p {
115
+ constructor(t, a, r) {
116
+ super(t, a, r), this.name = "EngineError";
118
117
  }
119
118
  }
120
- class S extends h {
119
+ class T extends p {
121
120
  body;
122
- constructor(r, a, t, n) {
123
- super(r, a, n), this.name = "FetchError", this.body = t;
121
+ constructor(t, a, r, o) {
122
+ super(t, a, o), this.name = "FetchError", this.body = r;
124
123
  }
125
124
  }
126
- class T extends h {
125
+ class S extends p {
127
126
  componentName;
128
127
  info;
129
- constructor(r, a, t, n, o) {
130
- super(r, a, o), this.name = "VueHandledError", this.info = t, this.componentName = n;
128
+ constructor(t, a, r, o, n) {
129
+ super(t, a, n), this.name = "VueHandledError", this.info = r, this.componentName = o;
131
130
  }
132
131
  }
133
- class V extends h {
134
- constructor(r, a, t) {
135
- super(r, a, t), this.name = "WindowHandledRuntimeError";
132
+ class j extends p {
133
+ constructor(t, a, r) {
134
+ super(t, a, r), this.name = "WindowHandledRuntimeError";
136
135
  }
137
136
  }
138
- class P extends h {
139
- constructor(r, a, t) {
140
- super(r, a, t), this.name = "WindowHandledPromiseRejectionError";
137
+ class H extends p {
138
+ constructor(t, a, r) {
139
+ super(t, a, r), this.name = "WindowHandledPromiseRejectionError";
141
140
  }
142
141
  }
143
- class W extends v {
144
- constructor(r, a, t) {
145
- super(r, a, t), this.name = "OperationalError";
142
+ class W extends I {
143
+ constructor(t, a, r) {
144
+ super(t, a, r), this.name = "OperationalError";
146
145
  }
147
146
  }
148
- async function X(e, r, a) {
149
- const t = `${r} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, n = await e.text();
150
- return new S(t, a, n);
147
+ async function z(e, t, a) {
148
+ const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
149
+ return new T(r, a, o);
151
150
  }
152
- function G(e) {
153
- return e.map((r) => r.message).join(" ");
151
+ function P(e) {
152
+ return e.map((t) => t.message).join(" ");
154
153
  }
155
- function Z(e, r = "Unknown error.") {
154
+ function V(e, t = "Unknown error.") {
156
155
  if (e instanceof Error) return e;
157
156
  if (typeof e == "string") return new Error(e);
158
157
  try {
159
- return new Error(JSON.stringify(e ?? r));
158
+ return new Error(JSON.stringify(e ?? t));
160
159
  } catch {
161
- return new Error(r);
160
+ return new Error(t);
162
161
  }
163
162
  }
164
- function K(e) {
165
- const r = /* @__PURE__ */ new Set(), a = [];
166
- let t = e;
167
- for (; t && !r.has(t); ) {
168
- r.add(t);
169
- let n;
170
- if (t instanceof S)
171
- n = { body: t.body, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
172
- else if (t instanceof T)
173
- n = { componentName: t.componentName, info: t.info, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
174
- else if (t instanceof v)
175
- n = { locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
176
- else if (t instanceof Error) {
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);
163
+ function X(e) {
164
+ const t = /* @__PURE__ */ new Set(), a = [];
165
+ let r = e;
166
+ for (; r && !t.has(r); ) {
167
+ t.add(r);
168
+ let o;
169
+ if (r instanceof T)
170
+ o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
171
+ else if (r instanceof S)
172
+ o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
173
+ else if (r instanceof I)
174
+ o = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
175
+ else if (r instanceof Error) {
176
+ const n = r;
177
+ o = { locator: "", message: n.message, name: n.name, stack: n.stack }, r = n.cause;
178
+ } else r ? (o = { locator: "", message: String(r), name: "Error" }, r = void 0) : (o = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
179
+ /(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), a.push(o);
181
180
  }
182
181
  return a;
183
182
  }
184
- const N = "en-US", w = {}, q = (e) => {
183
+ const D = "en-US", y = {}, G = (e) => {
185
184
  switch (e) {
186
185
  case "Edm.Binary":
187
186
  return "unknown";
@@ -220,41 +219,41 @@ const N = "en-US", w = {}, q = (e) => {
220
219
  default:
221
220
  return "unknown";
222
221
  }
223
- }, Q = (e) => {
222
+ }, J = (e) => {
224
223
  if (e) {
225
- const r = e.lastIndexOf("/"), a = e.lastIndexOf(".", r > -1 ? r : e.length);
224
+ const t = e.lastIndexOf("/"), a = e.lastIndexOf(".", t > -1 ? t : e.length);
226
225
  return a > -1 ? e.substring(0, a) : e;
227
226
  }
228
- }, Y = (e) => {
227
+ }, K = (e) => {
229
228
  if (e) {
230
- const r = e.lastIndexOf(".");
231
- if (r > -1) return e.substring(r + 1);
229
+ const t = e.lastIndexOf(".");
230
+ if (t > -1) return e.substring(t + 1);
232
231
  }
233
- }, l = (e, r = 2, a = r, t = N) => {
232
+ }, i = (e, t = 2, a = t, r = D) => {
234
233
  if (e == null) return "";
235
- const n = `${t}decimal${r}.${a}`;
236
- let o = w[n];
237
- return o || (o = new Intl.NumberFormat(t, {
234
+ const o = `${r}decimal${t}.${a}`;
235
+ let n = y[o];
236
+ return n || (n = new Intl.NumberFormat(r, {
238
237
  localeMatcher: "best fit",
239
- maximumFractionDigits: r,
238
+ maximumFractionDigits: t,
240
239
  minimumFractionDigits: a,
241
240
  minimumIntegerDigits: 1,
242
241
  style: "decimal",
243
242
  useGrouping: !0
244
- }), w[n] = o), o.format(e);
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 = N) => {
243
+ }), y[o] = n), n.format(e);
244
+ }, 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 = D) => {
246
245
  if (e == null) return "";
247
- const a = `${r}decimal0.0`;
248
- let t = w[a];
249
- return t || (t = new Intl.NumberFormat(r, {
246
+ const a = `${t}decimal0.0`;
247
+ let r = y[a];
248
+ return r || (r = new Intl.NumberFormat(t, {
250
249
  localeMatcher: "best fit",
251
250
  maximumFractionDigits: 0,
252
251
  minimumFractionDigits: 0,
253
252
  minimumIntegerDigits: 1,
254
253
  style: "decimal",
255
254
  useGrouping: !0
256
- }), w[a] = t), t.format(e);
257
- }, ae = (e) => {
255
+ }), y[a] = r), r.format(e);
256
+ }, Z = (e) => {
258
257
  switch (e) {
259
258
  case "csv":
260
259
  return "text/csv";
@@ -268,7 +267,7 @@ const N = "en-US", w = {}, q = (e) => {
268
267
  default:
269
268
  return "application/octet-stream";
270
269
  }
271
- }, D = [
270
+ }, A = [
272
271
  { id: "dtv", label: { "en-gb": "Delimited Text" } },
273
272
  { id: "e/e", label: { "en-gb": "Entity/Event" } },
274
273
  { id: "jsonArray", label: { "en-gb": "JSON Array" } },
@@ -276,22 +275,22 @@ const N = "en-US", w = {}, q = (e) => {
276
275
  { id: "xls", label: { "en-gb": "XLS" } },
277
276
  { id: "xlsx", label: { "en-gb": "XLSX" } },
278
277
  { id: "xml", label: { "en-gb": "XML" } }
279
- ], oe = (e = p) => {
280
- const r = [];
281
- for (const a of D) r.push({ ...a, label: a.label[e] || a.label[p] || a.id });
282
- return r;
283
- }, C = [
278
+ ], ee = (e = d) => {
279
+ const t = [];
280
+ for (const a of A) t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
281
+ return t;
282
+ }, N = [
284
283
  { id: `
285
284
  `, label: { "en-gb": "Newline" } },
286
285
  { id: "\r", label: { "en-gb": "Carriage Return" } },
287
286
  { id: `\r
288
287
  `, label: { "en-gb": "Carriage Return/Newline" } }
289
- ], ne = (e = p) => {
290
- const r = [];
291
- for (const a of C)
292
- r.push({ ...a, label: a.label[e] || a.label[p] || a.id });
293
- return r;
294
- }, A = [
288
+ ], re = (e = d) => {
289
+ const t = [];
290
+ for (const a of N)
291
+ t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
292
+ return t;
293
+ }, $ = [
295
294
  { id: ":", label: { "en-gb": "Colon" } },
296
295
  { id: ",", label: { "en-gb": "Comma" } },
297
296
  { id: "!", label: { "en-gb": "Exclamation Mark" } },
@@ -303,12 +302,12 @@ const N = "en-US", w = {}, q = (e) => {
303
302
  { id: "_", label: { "en-gb": "Underscore" } },
304
303
  { id: "0x1F", label: { "en-gb": "Unit Separator" } },
305
304
  { id: "|", label: { "en-gb": "Vertical Bar" } }
306
- ], se = (e = p) => {
307
- const r = [];
308
- for (const a of A)
309
- r.push({ ...a, label: a.label[e] || a.label[p] || a.id });
310
- return r;
311
- }, F = [
305
+ ], te = (e = d) => {
306
+ const t = [];
307
+ for (const a of $)
308
+ t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
309
+ return t;
310
+ }, C = [
312
311
  { id: "alpha", color: "red", label: { "en-gb": "alpha" } },
313
312
  { id: "beta", color: "amber", label: { "en-gb": "beta" } },
314
313
  { id: "generalAvailability", color: "green", label: { "en-gb": "" } },
@@ -318,104 +317,42 @@ const N = "en-US", w = {}, q = (e) => {
318
317
  { id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
319
318
  { id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
320
319
  { id: "underReview", color: "other", label: { "en-gb": "under-review" } }
321
- ], ie = (e, r = p) => {
322
- const a = F.find((t) => t.id === e);
323
- return a ? { ...a, label: a.label[r] || a.label[p] || e } : { id: e, color: "other", label: e };
324
- }, R = ["createObject", "dropObject", "removeRecords", "upsertRecords"], $ = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
325
- async function ce() {
326
- try {
327
- console.log("🚀 Building connector configuration...");
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");
329
- let t = !1, n = !1;
330
- const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...a.matchAll(o)].filter((u) => !u[1] && u[2] !== "constructor").map((u) => {
331
- const c = u[2];
332
- return t = t || R.includes(c), n = n || $.includes(c), c;
333
- });
334
- s.length > 0 ? console.log(`ℹ️ Implements ${s.length} operations.`) : console.log("⚠️ Implements no operations.");
335
- const d = n && t ? "bidirectional" : n ? "source" : t ? "destination" : null;
336
- console.log(d ? `ℹ️ Supports ${d} usage.` : "⚠️ No usage identified."), e.name && (r.id = e.name), r.operations = s, r.usageId = d, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8"), console.log("✅ Connector configuration built.");
337
- } catch (e) {
338
- console.warn("❌ Error building connector configuration.", e);
339
- }
340
- }
341
- async function le() {
342
- try {
343
- console.log("🚀 Building context configuration...");
344
- 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, n = [...a.matchAll(t)].filter((o) => !o[1] && o[2] !== "constructor").map((o) => o[2]);
345
- e.name && (r.id = e.name), r.operations = n, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
346
- } catch (e) {
347
- console.warn("❌ Error building context configuration.", e);
348
- }
349
- }
350
- async function de() {
351
- try {
352
- console.log("🚀 Building informer configuration...");
353
- 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, n = [...a.matchAll(t)].filter((o) => !o[1] && o[2] !== "constructor").map((o) => o[2]);
354
- e.name && (r.id = e.name), r.operations = n, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
355
- } catch (e) {
356
- console.warn("❌ Error building informer configuration.", e);
357
- }
358
- }
359
- async function ue() {
360
- try {
361
- console.log("🚀 Building presenter configuration...");
362
- 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, n = [...a.matchAll(t)].filter((o) => !o[1] && o[2] !== "constructor").map((o) => o[2]);
363
- e.name && (r.id = e.name), r.operations = n, e.version && (r.version = e.version), await i.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
364
- } catch (e) {
365
- console.warn("❌ Error building context configuration.", e);
366
- }
367
- }
368
- async function ge() {
369
- try {
370
- console.log("🚀 Bumping version...");
371
- const e = await JSON.parse(await i.readFile("package.json", "utf8"));
372
- if (e.version) {
373
- const r = e.version, a = e.version.split(".");
374
- 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}.`);
375
- } else
376
- e.version = "0.0.001", await i.writeFile("package.json", JSON.stringify(e, void 0, 4), "utf8"), console.log(`⚠️ Version initialised to ${e.version}.`);
377
- } catch (e) {
378
- console.warn("❌ Error bumping package version.", e);
379
- }
380
- }
381
- const p = "en-gb";
320
+ ], ae = (e, t = d) => {
321
+ const a = C.find((r) => r.id === e);
322
+ return a ? { ...a, label: a.label[t] || a.label[d] || e } : { id: e, color: "other", label: e };
323
+ }, d = "en-gb";
382
324
  export {
383
- z as APIError,
384
- h as ApplicationError,
385
- p as DEFAULT_LOCALE_CODE,
386
- j as DefaultTimestamp,
387
- H as EngineError,
388
- S as FetchError,
325
+ U as APIError,
326
+ p as ApplicationError,
327
+ d as DEFAULT_LOCALE_CODE,
328
+ R as DefaultTimestamp,
329
+ B as EngineError,
330
+ T as FetchError,
389
331
  W as OperationalError,
390
- T as VueError,
391
- P as WindowPromiseRejectionError,
392
- V as WindowRuntimeError,
393
- ce as buildConnectorConfig,
394
- le as buildContextConfig,
395
- X as buildFetchError,
396
- de as buildInformerConfig,
397
- ue as buildPresenterConfig,
398
- ge as bumpVersion,
399
- G as concatenateSerialisedErrorMessages,
400
- _ as convertMillisecondsToTimestamp,
401
- q as convertODataTypeIdToUsageTypeId,
402
- Y as extractExtensionFromPath,
403
- Q as extractNameFromPath,
404
- l as formatNumberAsDecimalNumber,
405
- re as formatNumberAsDuration,
406
- ee as formatNumberAsSize,
407
- te as formatNumberAsStorageSize,
332
+ S as VueError,
333
+ H as WindowPromiseRejectionError,
334
+ j as WindowRuntimeError,
335
+ z as buildFetchError,
336
+ P as concatenateSerialisedErrorMessages,
337
+ L as convertMillisecondsToTimestamp,
338
+ G as convertODataTypeIdToUsageTypeId,
339
+ K as extractExtensionFromPath,
340
+ J as extractNameFromPath,
341
+ i as formatNumberAsDecimalNumber,
342
+ Y as formatNumberAsDuration,
343
+ q as formatNumberAsSize,
344
+ Q as formatNumberAsStorageSize,
408
345
  x as formatNumberAsWholeNumber,
409
- ie as getComponentStatus,
410
- J as getCurrentTimestamp,
411
- oe as getDataFormats,
412
- ne as getRecordDelimiters,
413
- se as getValueDelimiters,
414
- ae as lookupMimeTypeForExtension,
415
- Z as normalizeToError,
416
- L as presentationViewTypeMap,
417
- K as serialiseError,
418
- B as useCytoscapeJS,
419
- M as useDataTable,
420
- U as useHighcharts
346
+ ae as getComponentStatus,
347
+ F as getCurrentTimestamp,
348
+ ee as getDataFormats,
349
+ re as getRecordDelimiters,
350
+ te as getValueDelimiters,
351
+ Z as lookupMimeTypeForExtension,
352
+ V as normalizeToError,
353
+ _ as presentationViewTypeMap,
354
+ X as serialiseError,
355
+ k as useCytoscapeJS,
356
+ O as useDataTable,
357
+ M as useHighcharts
421
358
  };
@@ -57,4 +57,3 @@ export { formatNumberAsDecimalNumber, formatNumberAsDuration, formatNumberAsSize
57
57
  export { getDataFormats, getRecordDelimiters, getValueDelimiters } from './component/dataView';
58
58
  export { getComponentStatus } from './component';
59
59
  export { lookupMimeTypeForExtension } from './appUtilities';
60
- export { buildConnectorConfig, buildContextConfig, buildInformerConfig, buildPresenterConfig, bumpVersion } from './devUtilities';
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.131",
5
+ "version": "0.3.137",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"
@@ -1,8 +0,0 @@
1
- /**
2
- * Development utilities.
3
- */
4
- export declare function buildConnectorConfig(): Promise<void>;
5
- export declare function buildContextConfig(): Promise<void>;
6
- export declare function buildInformerConfig(): Promise<void>;
7
- export declare function buildPresenterConfig(): Promise<void>;
8
- export declare function bumpVersion(): Promise<void>;