@datapos/datapos-shared 0.3.137 → 0.3.139

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,4 +1,4 @@
1
- const R = 0, L = (e) => e, F = () => Date.now(), _ = {
1
+ const C = ["createObject", "dropObject", "removeRecords", "upsertRecords"], $ = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], _ = 0, L = (e) => e, F = () => Date.now(), k = {
2
2
  cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
3
3
  cartesian_areaSpline: { categoryId: "cartesian", typeId: "areaSpline", label: { "en-gb": "Area Spline" }, options: { highchartsType: "area" } },
4
4
  cartesian_bar: { categoryId: "cartesian", typeId: "bar", label: { "en-gb": "Bar" }, options: { highchartsType: "bar" } },
@@ -17,21 +17,21 @@ const R = 0, L = (e) => e, F = () => Date.now(), _ = {
17
17
  streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
18
18
  values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
19
19
  };
20
- function k() {
20
+ function M() {
21
21
  function e(t, a, r) {
22
22
  r.textContent = "Cytoscape.js diagram goes here...";
23
23
  }
24
24
  return { render: e };
25
25
  }
26
- function O() {
26
+ function U() {
27
27
  function e(t, a, r) {
28
28
  r.textContent = "values table goes here...";
29
29
  }
30
30
  return { render: e };
31
31
  }
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() {
32
+ const v = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", x = "highcharts";
33
+ let b, T = !1;
34
+ function j() {
35
35
  async function e(n, s, u, h) {
36
36
  await r();
37
37
  const l = [];
@@ -45,7 +45,7 @@ function M() {
45
45
  xAxis: { categories: s.data.categoryLabels },
46
46
  yAxis: { title: { text: s.data.name } }
47
47
  }, m = b.chart(u, g, h);
48
- return { chart: m, resize: () => m.reflow(), vendorId: E };
48
+ return { chart: m, resize: () => m.reflow(), vendorId: x };
49
49
  }
50
50
  async function t(n, s, u, h) {
51
51
  await Promise.all([r(), o()]);
@@ -60,7 +60,7 @@ function M() {
60
60
  xAxis: { categories: s.data.categoryLabels },
61
61
  yAxis: { title: { text: s.data.name } }
62
62
  }, m = b.chart(u, g, h);
63
- return { chart: m, resize: () => m.reflow(), vendorId: E };
63
+ return { chart: m, resize: () => m.reflow(), vendorId: x };
64
64
  }
65
65
  async function a(n, s, u, h) {
66
66
  await Promise.all([r(), o()]);
@@ -76,7 +76,7 @@ function M() {
76
76
  xAxis: { categories: s.data.categoryLabels },
77
77
  yAxis: { title: { text: s.data.name } }
78
78
  }, c = b.chart(u, m, h);
79
- return { chart: c, resize: () => c.reflow(), vendorId: E };
79
+ return { chart: c, resize: () => c.reflow(), vendorId: x };
80
80
  }
81
81
  async function r() {
82
82
  if (b) return;
@@ -90,8 +90,8 @@ function M() {
90
90
  );
91
91
  }
92
92
  async function o() {
93
- if (w) return;
94
- await import(`${v}highcharts-more.src.js`), w = !0;
93
+ if (T) return;
94
+ await import(`${v}highcharts-more.src.js`), T = !0;
95
95
  }
96
96
  return { renderCartesianChart: e, renderPolarChart: t, renderRangeChart: a };
97
97
  }
@@ -106,17 +106,17 @@ class p extends I {
106
106
  super(t, a, r), this.name = "ApplicationError";
107
107
  }
108
108
  }
109
- class U extends p {
109
+ class B extends p {
110
110
  constructor(t, a, r) {
111
111
  super(t, a, r), this.name = "APIError";
112
112
  }
113
113
  }
114
- class B extends p {
114
+ class H extends p {
115
115
  constructor(t, a, r) {
116
116
  super(t, a, r), this.name = "EngineError";
117
117
  }
118
118
  }
119
- class T extends p {
119
+ class w extends p {
120
120
  body;
121
121
  constructor(t, a, r, o) {
122
122
  super(t, a, o), this.name = "FetchError", this.body = r;
@@ -129,29 +129,29 @@ class S extends p {
129
129
  super(t, a, n), this.name = "VueHandledError", this.info = r, this.componentName = o;
130
130
  }
131
131
  }
132
- class j extends p {
132
+ class P extends p {
133
133
  constructor(t, a, r) {
134
134
  super(t, a, r), this.name = "WindowHandledRuntimeError";
135
135
  }
136
136
  }
137
- class H extends p {
137
+ class W extends p {
138
138
  constructor(t, a, r) {
139
139
  super(t, a, r), this.name = "WindowHandledPromiseRejectionError";
140
140
  }
141
141
  }
142
- class W extends I {
142
+ class z extends I {
143
143
  constructor(t, a, r) {
144
144
  super(t, a, r), this.name = "OperationalError";
145
145
  }
146
146
  }
147
- async function z(e, t, a) {
147
+ async function V(e, t, a) {
148
148
  const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
149
- return new T(r, a, o);
149
+ return new w(r, a, o);
150
150
  }
151
- function P(e) {
151
+ function X(e) {
152
152
  return e.map((t) => t.message).join(" ");
153
153
  }
154
- function V(e, t = "Unknown error.") {
154
+ function G(e, t = "Unknown error.") {
155
155
  if (e instanceof Error) return e;
156
156
  if (typeof e == "string") return new Error(e);
157
157
  try {
@@ -160,13 +160,13 @@ function V(e, t = "Unknown error.") {
160
160
  return new Error(t);
161
161
  }
162
162
  }
163
- function X(e) {
163
+ function J(e) {
164
164
  const t = /* @__PURE__ */ new Set(), a = [];
165
165
  let r = e;
166
166
  for (; r && !t.has(r); ) {
167
167
  t.add(r);
168
168
  let o;
169
- if (r instanceof T)
169
+ if (r instanceof w)
170
170
  o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
171
171
  else if (r instanceof S)
172
172
  o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
@@ -180,7 +180,7 @@ function X(e) {
180
180
  }
181
181
  return a;
182
182
  }
183
- const D = "en-US", y = {}, G = (e) => {
183
+ const D = "en-US", y = {}, K = (e) => {
184
184
  switch (e) {
185
185
  case "Edm.Binary":
186
186
  return "unknown";
@@ -219,12 +219,12 @@ const D = "en-US", y = {}, G = (e) => {
219
219
  default:
220
220
  return "unknown";
221
221
  }
222
- }, J = (e) => {
222
+ }, q = (e) => {
223
223
  if (e) {
224
224
  const t = e.lastIndexOf("/"), a = e.lastIndexOf(".", t > -1 ? t : e.length);
225
225
  return a > -1 ? e.substring(0, a) : e;
226
226
  }
227
- }, K = (e) => {
227
+ }, Q = (e) => {
228
228
  if (e) {
229
229
  const t = e.lastIndexOf(".");
230
230
  if (t > -1) return e.substring(t + 1);
@@ -241,7 +241,7 @@ const D = "en-US", y = {}, G = (e) => {
241
241
  style: "decimal",
242
242
  useGrouping: !0
243
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) => {
244
+ }, Y = (e) => e == null ? "" : e < 1e3 ? E(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`, Z = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${E(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`, ee = (e) => e == null ? "" : e < 1e3 ? `${E(e)} ms` : e === 1e3 ? `${E(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`, E = (e, t = D) => {
245
245
  if (e == null) return "";
246
246
  const a = `${t}decimal0.0`;
247
247
  let r = y[a];
@@ -253,7 +253,7 @@ const D = "en-US", y = {}, G = (e) => {
253
253
  style: "decimal",
254
254
  useGrouping: !0
255
255
  }), y[a] = r), r.format(e);
256
- }, Z = (e) => {
256
+ }, re = (e) => {
257
257
  switch (e) {
258
258
  case "csv":
259
259
  return "text/csv";
@@ -267,7 +267,7 @@ const D = "en-US", y = {}, G = (e) => {
267
267
  default:
268
268
  return "application/octet-stream";
269
269
  }
270
- }, A = [
270
+ }, N = [
271
271
  { id: "dtv", label: { "en-gb": "Delimited Text" } },
272
272
  { id: "e/e", label: { "en-gb": "Entity/Event" } },
273
273
  { id: "jsonArray", label: { "en-gb": "JSON Array" } },
@@ -275,22 +275,22 @@ const D = "en-US", y = {}, G = (e) => {
275
275
  { id: "xls", label: { "en-gb": "XLS" } },
276
276
  { id: "xlsx", label: { "en-gb": "XLSX" } },
277
277
  { id: "xml", label: { "en-gb": "XML" } }
278
- ], ee = (e = d) => {
278
+ ], te = (e = d) => {
279
279
  const t = [];
280
- for (const a of A) t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
280
+ for (const a of N) t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
281
281
  return t;
282
- }, N = [
282
+ }, R = [
283
283
  { id: `
284
284
  `, label: { "en-gb": "Newline" } },
285
285
  { id: "\r", label: { "en-gb": "Carriage Return" } },
286
286
  { id: `\r
287
287
  `, label: { "en-gb": "Carriage Return/Newline" } }
288
- ], re = (e = d) => {
288
+ ], ae = (e = d) => {
289
289
  const t = [];
290
- for (const a of N)
290
+ for (const a of R)
291
291
  t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
292
292
  return t;
293
- }, $ = [
293
+ }, A = [
294
294
  { id: ":", label: { "en-gb": "Colon" } },
295
295
  { id: ",", label: { "en-gb": "Comma" } },
296
296
  { id: "!", label: { "en-gb": "Exclamation Mark" } },
@@ -302,12 +302,12 @@ const D = "en-US", y = {}, G = (e) => {
302
302
  { id: "_", label: { "en-gb": "Underscore" } },
303
303
  { id: "0x1F", label: { "en-gb": "Unit Separator" } },
304
304
  { id: "|", label: { "en-gb": "Vertical Bar" } }
305
- ], te = (e = d) => {
305
+ ], ne = (e = d) => {
306
306
  const t = [];
307
- for (const a of $)
307
+ for (const a of A)
308
308
  t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
309
309
  return t;
310
- }, C = [
310
+ }, O = [
311
311
  { id: "alpha", color: "red", label: { "en-gb": "alpha" } },
312
312
  { id: "beta", color: "amber", label: { "en-gb": "beta" } },
313
313
  { id: "generalAvailability", color: "green", label: { "en-gb": "" } },
@@ -317,42 +317,44 @@ const D = "en-US", y = {}, G = (e) => {
317
317
  { id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
318
318
  { id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
319
319
  { id: "underReview", color: "other", label: { "en-gb": "under-review" } }
320
- ], ae = (e, t = d) => {
321
- const a = C.find((r) => r.id === e);
320
+ ], oe = (e, t = d) => {
321
+ const a = O.find((r) => r.id === e);
322
322
  return a ? { ...a, label: a.label[t] || a.label[d] || e } : { id: e, color: "other", label: e };
323
323
  }, d = "en-gb";
324
324
  export {
325
- U as APIError,
325
+ B as APIError,
326
326
  p as ApplicationError,
327
+ C as CONNECTOR_DESTINATION_OPERATIONS,
328
+ $ as CONNECTOR_SOURCE_OPERATIONS,
327
329
  d as DEFAULT_LOCALE_CODE,
328
- R as DefaultTimestamp,
329
- B as EngineError,
330
- T as FetchError,
331
- W as OperationalError,
330
+ _ as DefaultTimestamp,
331
+ H as EngineError,
332
+ w as FetchError,
333
+ z as OperationalError,
332
334
  S as VueError,
333
- H as WindowPromiseRejectionError,
334
- j as WindowRuntimeError,
335
- z as buildFetchError,
336
- P as concatenateSerialisedErrorMessages,
335
+ W as WindowPromiseRejectionError,
336
+ P as WindowRuntimeError,
337
+ V as buildFetchError,
338
+ X as concatenateSerialisedErrorMessages,
337
339
  L as convertMillisecondsToTimestamp,
338
- G as convertODataTypeIdToUsageTypeId,
339
- K as extractExtensionFromPath,
340
- J as extractNameFromPath,
340
+ K as convertODataTypeIdToUsageTypeId,
341
+ Q as extractExtensionFromPath,
342
+ q as extractNameFromPath,
341
343
  i as formatNumberAsDecimalNumber,
342
- Y as formatNumberAsDuration,
343
- q as formatNumberAsSize,
344
- Q as formatNumberAsStorageSize,
345
- x as formatNumberAsWholeNumber,
346
- ae as getComponentStatus,
344
+ ee as formatNumberAsDuration,
345
+ Y as formatNumberAsSize,
346
+ Z as formatNumberAsStorageSize,
347
+ E as formatNumberAsWholeNumber,
348
+ oe as getComponentStatus,
347
349
  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
350
+ te as getDataFormats,
351
+ ae as getRecordDelimiters,
352
+ ne as getValueDelimiters,
353
+ re as lookupMimeTypeForExtension,
354
+ G as normalizeToError,
355
+ k as presentationViewTypeMap,
356
+ J as serialiseError,
357
+ M as useCytoscapeJS,
358
+ U as useDataTable,
359
+ j as useHighcharts
358
360
  };
@@ -4,7 +4,13 @@
4
4
  export type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
5
5
  export type LocalisedString = Record<LocaleCode, string>;
6
6
  export type StatusColorId = 'amber' | 'green' | 'red' | 'other';
7
- export type { AppModuleConfig, ConnectorModuleConfig, EngineModuleConfig, InformerModuleConfig, PresenterModuleConfig } from './module';
7
+ export type { AppModuleConfig } from './module';
8
+ export type { ConnectorModuleConfig, ConnectorModuleOperation, ConnectorModuleUsageId } from './module';
9
+ export type { ContextModuleConfig, ContextModuleOperation } from './module';
10
+ export type { EngineModuleConfig } from './module';
11
+ export type { InformerModuleConfig, InformerModuleOperation } from './module';
12
+ export type { PresenterModuleConfig, PresenterModuleOperation } from './module';
13
+ export { CONNECTOR_DESTINATION_OPERATIONS, CONNECTOR_SOURCE_OPERATIONS } from './module';
8
14
  export type { ComponentConfig, ComponentRef, ComponentStatus, ComponentStatusId, ComponentTypeId } from './component';
9
15
  export type { AuditContentResult, AuditContentSettings } from './component/connector';
10
16
  export type { Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation, ConnectorOperationSettings, ConnectorLocalisedConfig, ConnectorTools } from './component/connector';
package/package.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "name": "@datapos/datapos-shared",
3
3
  "license": "MIT",
4
4
  "private": false,
5
- "version": "0.3.137",
6
5
  "type": "module",
6
+ "version": "0.3.139",
7
7
  "files": [
8
8
  "dist"
9
9
  ],