@datapos/datapos-shared 0.3.7 → 0.3.9
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,11 +1,11 @@
|
|
|
1
1
|
const x = 0, h = (e) => e, w = () => Date.now();
|
|
2
|
-
class
|
|
2
|
+
class u 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 u {
|
|
9
9
|
constructor(t, n, r) {
|
|
10
10
|
super(t, n, r), this.name = "ApplicationError";
|
|
11
11
|
}
|
|
@@ -20,7 +20,7 @@ class S extends i {
|
|
|
20
20
|
super(t, n, r), this.name = "EngineError";
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
class
|
|
23
|
+
class d extends i {
|
|
24
24
|
body;
|
|
25
25
|
constructor(t, n, r, a) {
|
|
26
26
|
super(t, n, a), this.name = "FetchError", this.body = r;
|
|
@@ -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 u {
|
|
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 d(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 d)
|
|
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 u)
|
|
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;
|
|
@@ -221,14 +221,14 @@ const m = "en-US", l = {}, k = (e) => {
|
|
|
221
221
|
{ id: "underReview", color: "neutral", label: { en: "under-review" } }
|
|
222
222
|
], G = (e, t = "en") => {
|
|
223
223
|
const n = b.find((r) => r.id === e);
|
|
224
|
-
return n ? { ...n, label: n.label[t] || n.label.en || e } : { id: e, color: "
|
|
224
|
+
return n ? { ...n, label: n.label[t] || n.label.en || e } : { id: e, color: "neutral", label: e };
|
|
225
225
|
};
|
|
226
226
|
export {
|
|
227
227
|
N as APIError,
|
|
228
228
|
i as ApplicationError,
|
|
229
229
|
x as DefaultTimestamp,
|
|
230
230
|
S as EngineError,
|
|
231
|
-
|
|
231
|
+
d as FetchError,
|
|
232
232
|
$ as OperationalError,
|
|
233
233
|
f as VueError,
|
|
234
234
|
D as WindowPromiseRejectionError,
|
|
@@ -5,8 +5,8 @@ export interface ComponentConfig {
|
|
|
5
5
|
id: string;
|
|
6
6
|
label: Record<string, string>;
|
|
7
7
|
lastUpdatedAt?: Timestamp;
|
|
8
|
+
logo?: string;
|
|
8
9
|
logoDark?: string;
|
|
9
|
-
logoLight?: string;
|
|
10
10
|
status?: ComponentStatus;
|
|
11
11
|
statusId: ComponentStatusId;
|
|
12
12
|
typeId: ComponentTypeId;
|
|
@@ -16,10 +16,12 @@ 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
20
|
export type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
|
|
20
21
|
export type ComponentStatus = {
|
|
21
22
|
id: string;
|
|
22
|
-
color?:
|
|
23
|
+
color?: StatusColor;
|
|
23
24
|
label: string;
|
|
24
25
|
};
|
|
25
26
|
export declare const getComponentStatus: (id: string, localeId?: string) => ComponentStatus;
|
|
27
|
+
export {};
|