@datapos/datapos-shared 0.3.11 → 0.3.13

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,26 +1,26 @@
1
1
  const x = 0, h = (e) => e, w = () => Date.now();
2
- class u extends Error {
2
+ class d extends Error {
3
3
  locator;
4
4
  constructor(t, n, r) {
5
5
  super(t, r), this.name = "DataPosError", this.locator = n, Error.captureStackTrace?.(this, new.target);
6
6
  }
7
7
  }
8
- class i extends u {
8
+ class i extends d {
9
9
  constructor(t, n, r) {
10
10
  super(t, n, r), this.name = "ApplicationError";
11
11
  }
12
12
  }
13
- class N extends i {
13
+ class y extends i {
14
14
  constructor(t, n, r) {
15
15
  super(t, n, r), this.name = "APIError";
16
16
  }
17
17
  }
18
- class S extends i {
18
+ class N extends i {
19
19
  constructor(t, n, r) {
20
20
  super(t, n, r), this.name = "EngineError";
21
21
  }
22
22
  }
23
- class d extends i {
23
+ class u extends i {
24
24
  body;
25
25
  constructor(t, n, r, a) {
26
26
  super(t, n, a), this.name = "FetchError", this.body = r;
@@ -33,7 +33,7 @@ class f extends i {
33
33
  super(t, n, o), this.name = "VueHandledError", this.info = r, this.componentName = a;
34
34
  }
35
35
  }
36
- class y extends i {
36
+ class S extends i {
37
37
  constructor(t, n, r) {
38
38
  super(t, n, r), this.name = "WindowHandledRuntimeError";
39
39
  }
@@ -43,14 +43,14 @@ class D extends i {
43
43
  super(t, n, r), this.name = "WindowHandledPromiseRejectionError";
44
44
  }
45
45
  }
46
- class $ extends u {
46
+ class $ extends d {
47
47
  constructor(t, n, r) {
48
48
  super(t, n, r), this.name = "OperationalError";
49
49
  }
50
50
  }
51
51
  async function v(e, t, n) {
52
52
  const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, a = await e.text();
53
- return new d(r, n, a);
53
+ return new u(r, n, a);
54
54
  }
55
55
  function T(e) {
56
56
  return e.map((t) => t.message).join(" ");
@@ -70,11 +70,11 @@ function F(e) {
70
70
  for (; r && !t.has(r); ) {
71
71
  t.add(r);
72
72
  let a;
73
- if (r instanceof d)
73
+ if (r instanceof u)
74
74
  a = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
75
75
  else if (r instanceof f)
76
76
  a = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
77
- else if (r instanceof u)
77
+ else if (r instanceof d)
78
78
  a = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
79
79
  else if (r instanceof Error) {
80
80
  const o = r;
@@ -193,7 +193,7 @@ const m = "en-US", l = {}, k = (e) => {
193
193
  const t = [];
194
194
  for (const n of E) t.push({ ...n, label: n.label[e] || n.label.en || n.id });
195
195
  return t;
196
- }, g = [
196
+ }, b = [
197
197
  { id: ":", label: { en: "Colon" } },
198
198
  { id: ",", label: { en: "Comma" } },
199
199
  { id: "!", label: { en: "Exclamation Mark" } },
@@ -207,32 +207,32 @@ const m = "en-US", l = {}, k = (e) => {
207
207
  { id: "|", label: { en: "Vertical Bar" } }
208
208
  ], j = (e = "en") => {
209
209
  const t = [];
210
- for (const n of g) t.push({ ...n, label: n.label[e] || n.label.en || n.id });
210
+ for (const n of b) t.push({ ...n, label: n.label[e] || n.label.en || n.id });
211
211
  return t;
212
- }, b = [
213
- { id: "alpha", color: "warning", label: { en: "alpha" } },
214
- { id: "beta", color: "success", label: { en: "beta" } },
212
+ }, g = [
213
+ { id: "alpha", color: "orange", label: { en: "alpha" } },
214
+ { id: "beta", color: "yellow", label: { en: "beta" } },
215
215
  { id: "generalAvailability", label: { en: "" } },
216
216
  { id: "notApplicable", label: { en: "not-applicable" } },
217
- { id: "preAlpha", color: "warning", label: { en: "pre-alpha" } },
218
- { id: "proposed", color: "neutral", label: { en: "proposed" } },
217
+ { id: "preAlpha", color: "red", label: { en: "pre-alpha" } },
218
+ { id: "proposed", color: "slate", label: { en: "proposed" } },
219
219
  { id: "releaseCandidate", label: { en: "release-candidate" } },
220
- { id: "unavailable", color: "neutral", label: { en: "unavailable" } },
221
- { id: "underReview", color: "neutral", label: { en: "under-review" } }
220
+ { id: "unavailable", color: "slate", label: { en: "unavailable" } },
221
+ { id: "underReview", color: "slate", label: { en: "under-review" } }
222
222
  ], G = (e, t = "en") => {
223
- const n = b.find((r) => r.id === e);
224
- return n ? { ...n, label: n.label[t] || n.label.en || e } : { id: e, color: "neutral", label: e };
223
+ const n = g.find((r) => r.id === e);
224
+ return n ? { ...n, label: n.label[t] || n.label.en || e } : { id: e, color: "slate", label: e };
225
225
  };
226
226
  export {
227
- N as APIError,
227
+ y as APIError,
228
228
  i as ApplicationError,
229
229
  x as DefaultTimestamp,
230
- S as EngineError,
231
- d as FetchError,
230
+ N as EngineError,
231
+ u as FetchError,
232
232
  $ as OperationalError,
233
233
  f as VueError,
234
234
  D as WindowPromiseRejectionError,
235
- y as WindowRuntimeError,
235
+ S as WindowRuntimeError,
236
236
  v as buildFetchError,
237
237
  T as concatenateSerialisedErrorMessages,
238
238
  h as convertMillisecondsToTimestamp,
@@ -16,7 +16,7 @@ export interface ComponentRef {
16
16
  label: Record<string, string>;
17
17
  }
18
18
  export type ComponentTypeId = 'app' | 'connection' | 'connector' | 'engine' | 'focus' | 'model' | 'dataView' | 'eventQuery' | 'presentation' | 'presenter' | 'tutorial';
19
- type StatusColor = 'success' | 'error' | 'primary' | 'secondary' | 'info' | 'warning' | 'neutral';
19
+ type StatusColor = 'amber' | 'blue' | 'emerald' | 'green' | 'orange' | 'red' | 'rose' | 'sky' | 'slate' | 'yellow';
20
20
  export type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
21
21
  export type ComponentStatus = {
22
22
  id: string;
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.11",
5
+ "version": "0.3.13",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"