@datapos/datapos-shared 0.3.126 → 0.3.128

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,11 +33,11 @@ function M() {
33
33
  const O = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", E = "highcharts";
34
34
  let b, I = !1;
35
35
  function U() {
36
- async function e(o, s, d, u) {
36
+ async function e(o, s, d, g) {
37
37
  await t();
38
38
  const c = [];
39
- for (const g of s.data.measures)
40
- c.push({ type: o.options.highchartsType, name: g.name, data: g.data });
39
+ for (const u of s.data.measures)
40
+ c.push({ type: o.options.highchartsType, name: u.name, data: u.data });
41
41
  const f = {
42
42
  chart: { type: o.options.highchartsType },
43
43
  plotOptions: { series: { borderColor: "#333" } },
@@ -45,14 +45,14 @@ function U() {
45
45
  title: { text: s.title.text },
46
46
  xAxis: { categories: s.data.categoryLabels },
47
47
  yAxis: { title: { text: s.data.name } }
48
- }, m = b.chart(d, f, u);
48
+ }, m = b.chart(d, f, g);
49
49
  return { chart: m, resize: () => m.reflow(), vendorId: E };
50
50
  }
51
- async function r(o, s, d, u) {
51
+ async function r(o, s, d, g) {
52
52
  await Promise.all([t(), n()]);
53
53
  const c = [];
54
- for (const g of s.data.measures)
55
- c.push({ type: o.options.highchartsType, name: g.name, data: g.data });
54
+ for (const u of s.data.measures)
55
+ c.push({ type: o.options.highchartsType, name: u.name, data: u.data });
56
56
  const f = {
57
57
  chart: { polar: !0 },
58
58
  plotOptions: { series: { borderColor: "#333" } },
@@ -60,10 +60,10 @@ function U() {
60
60
  title: { text: s.title.text },
61
61
  xAxis: { categories: s.data.categoryLabels },
62
62
  yAxis: { title: { text: s.data.name } }
63
- }, m = b.chart(d, f, u);
63
+ }, m = b.chart(d, f, g);
64
64
  return { chart: m, resize: () => m.reflow(), vendorId: E };
65
65
  }
66
- async function a(o, s, d, u) {
66
+ async function a(o, s, d, g) {
67
67
  await Promise.all([t(), n()]);
68
68
  const c = [], f = [];
69
69
  for (let y = 0; y < s.data.measures[0].data.length; y++)
@@ -76,8 +76,8 @@ function U() {
76
76
  title: { text: s.title.text },
77
77
  xAxis: { categories: s.data.categoryLabels },
78
78
  yAxis: { title: { text: s.data.name } }
79
- }, g = b.chart(d, m, u);
80
- return { chart: g, resize: () => g.reflow(), vendorId: E };
79
+ }, u = b.chart(d, m, g);
80
+ return { chart: u, resize: () => u.reflow(), vendorId: E };
81
81
  }
82
82
  async function t() {
83
83
  if (b) return;
@@ -324,18 +324,18 @@ 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
+ console.log("ā— Building connector configuration...");
328
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
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];
330
+ const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...a.matchAll(o)].filter((g) => !g[1] && g[2] !== "constructor").map((g) => {
331
+ const c = g[2];
332
332
  return t = t || R.includes(c), n = n || $.includes(c), c;
333
333
  });
334
- s.length > 0 ? console.log(`ā„¹ļø Implements ${s.length} operations.`) : console.log("āš ļø Implements no operations.");
334
+ s.length > 0 ? console.log(`ℹ Implements ${s.length} operations.`) : console.log("⚠ Implements no operations.");
335
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.");
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("%cāœ“ Connector configuration built.", "color: green; font-size: 20px;");
337
337
  } catch (e) {
338
- console.warn("āŒ Error building connector configuration.", e);
338
+ console.warn("āœ— Error building connector configuration.", e);
339
339
  }
340
340
  }
341
341
  async function le() {
@@ -356,7 +356,7 @@ async function de() {
356
356
  console.warn("āŒ Error building informer configuration.", e);
357
357
  }
358
358
  }
359
- async function ue() {
359
+ async function ge() {
360
360
  try {
361
361
  console.log("šŸš€ Building presenter configuration...");
362
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]);
@@ -365,7 +365,7 @@ async function ue() {
365
365
  console.warn("āŒ Error building context configuration.", e);
366
366
  }
367
367
  }
368
- async function ge() {
368
+ async function ue() {
369
369
  try {
370
370
  console.log("šŸš€ Bumping version...");
371
371
  const e = await JSON.parse(await i.readFile("package.json", "utf8"));
@@ -394,8 +394,8 @@ export {
394
394
  le as buildContextConfig,
395
395
  X as buildFetchError,
396
396
  de as buildInformerConfig,
397
- ue as buildPresenterConfig,
398
- ge as bumpVersion,
397
+ ge as buildPresenterConfig,
398
+ ue as bumpVersion,
399
399
  G as concatenateSerialisedErrorMessages,
400
400
  _ as convertMillisecondsToTimestamp,
401
401
  q as convertODataTypeIdToUsageTypeId,
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.126",
5
+ "version": "0.3.128",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"