@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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
},
|
|
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
|
|
210
|
+
for (const n of b) t.push({ ...n, label: n.label[e] || n.label.en || n.id });
|
|
211
211
|
return t;
|
|
212
|
-
},
|
|
213
|
-
{ id: "alpha", color: "
|
|
214
|
-
{ id: "beta", color: "
|
|
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: "
|
|
218
|
-
{ id: "proposed", color: "
|
|
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: "
|
|
221
|
-
{ id: "underReview", color: "
|
|
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 =
|
|
224
|
-
return n ? { ...n, label: n.label[t] || n.label.en || e } : { id: e, color: "
|
|
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
|
-
|
|
227
|
+
y as APIError,
|
|
228
228
|
i as ApplicationError,
|
|
229
229
|
x as DefaultTimestamp,
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
N as EngineError,
|
|
231
|
+
u as FetchError,
|
|
232
232
|
$ as OperationalError,
|
|
233
233
|
f as VueError,
|
|
234
234
|
D as WindowPromiseRejectionError,
|
|
235
|
-
|
|
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 = '
|
|
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;
|