@datapos/datapos-shared 0.3.54 → 0.3.56
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
|
|
1
|
+
const h = 0, x = (e) => e, w = () => Date.now();
|
|
2
2
|
class d extends Error {
|
|
3
3
|
locator;
|
|
4
4
|
constructor(t, n, r) {
|
|
@@ -29,8 +29,8 @@ class u extends i {
|
|
|
29
29
|
class f extends i {
|
|
30
30
|
componentName;
|
|
31
31
|
info;
|
|
32
|
-
constructor(t, n, r, a,
|
|
33
|
-
super(t, n,
|
|
32
|
+
constructor(t, n, r, a, s) {
|
|
33
|
+
super(t, n, s), this.name = "VueHandledError", this.info = r, this.componentName = a;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
class y extends i {
|
|
@@ -77,8 +77,8 @@ function F(e) {
|
|
|
77
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
|
-
const
|
|
81
|
-
a = { locator: "", message:
|
|
80
|
+
const s = r;
|
|
81
|
+
a = { locator: "", message: s.message, name: s.name, stack: s.stack }, r = s.cause;
|
|
82
82
|
} else r ? (a = { locator: "", message: String(r), name: "Error" }, r = void 0) : (a = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
|
|
83
83
|
/(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a);
|
|
84
84
|
}
|
|
@@ -133,19 +133,19 @@ const m = "en-US", l = {}, k = (e) => {
|
|
|
133
133
|
const t = e.lastIndexOf(".");
|
|
134
134
|
if (t > -1) return e.substring(t + 1);
|
|
135
135
|
}
|
|
136
|
-
},
|
|
136
|
+
}, o = (e, t = 2, n = t, r = m) => {
|
|
137
137
|
if (e == null) return "";
|
|
138
138
|
const a = `${r}decimal${t}.${n}`;
|
|
139
|
-
let
|
|
140
|
-
return
|
|
139
|
+
let s = l[a];
|
|
140
|
+
return s || (s = new Intl.NumberFormat(r, {
|
|
141
141
|
localeMatcher: "best fit",
|
|
142
142
|
maximumFractionDigits: t,
|
|
143
143
|
minimumFractionDigits: n,
|
|
144
144
|
minimumIntegerDigits: 1,
|
|
145
145
|
style: "decimal",
|
|
146
146
|
useGrouping: !0
|
|
147
|
-
}), l[a] =
|
|
148
|
-
}, M = (e) => e == null ? "" : e < 1e3 ? c(e) : e < 1e6 ? `${
|
|
147
|
+
}), l[a] = s), s.format(e);
|
|
148
|
+
}, M = (e) => e == null ? "" : e < 1e3 ? c(e) : e < 1e6 ? `${o(e / 1e3, 2, 0)}K` : e < 1e9 ? `${o(e / 1e6, 2, 0)}M` : e < 1e12 ? `${o(e / 1e9, 2, 0)}B` : `${o(e / 1e12, 2, 0)}T`, R = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${c(e)} bytes` : e < 1048576 ? `${o(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${o(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${o(e / 1073741824, 2, 0)} GB` : `${o(e / 1099511627776, 2, 0)} TB`, O = (e) => e == null ? "" : e < 1e3 ? `${c(e)} ms` : e === 1e3 ? `${c(e)} sec` : e < 6e4 ? `${o(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${o(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${o(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${o(e / 864e5, 2, 0)} days`, c = (e, t = m) => {
|
|
149
149
|
if (e == null) return "";
|
|
150
150
|
const n = `${t}decimal0.0`;
|
|
151
151
|
let r = l[n];
|
|
@@ -215,18 +215,18 @@ const m = "en-US", l = {}, k = (e) => {
|
|
|
215
215
|
{ id: "generalAvailability", label: { en: "" } },
|
|
216
216
|
{ id: "notApplicable", label: { en: "not-applicable" } },
|
|
217
217
|
{ id: "preAlpha", color: "red", label: { en: "pre-alpha" } },
|
|
218
|
-
{ id: "proposed", color: "
|
|
218
|
+
{ id: "proposed", color: "other", label: { en: "proposed" } },
|
|
219
219
|
{ id: "releaseCandidate", label: { en: "release-candidate" } },
|
|
220
|
-
{ id: "unavailable", color: "
|
|
221
|
-
{ id: "underReview", color: "
|
|
220
|
+
{ id: "unavailable", color: "other", label: { en: "unavailable" } },
|
|
221
|
+
{ id: "underReview", color: "other", label: { en: "under-review" } }
|
|
222
222
|
], G = (e, t = "en") => {
|
|
223
223
|
const n = g.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: "other", label: e };
|
|
225
225
|
};
|
|
226
226
|
export {
|
|
227
227
|
N as APIError,
|
|
228
228
|
i as ApplicationError,
|
|
229
|
-
|
|
229
|
+
h as DefaultTimestamp,
|
|
230
230
|
S as EngineError,
|
|
231
231
|
u as FetchError,
|
|
232
232
|
$ as OperationalError,
|
|
@@ -235,11 +235,11 @@ export {
|
|
|
235
235
|
y as WindowRuntimeError,
|
|
236
236
|
v as buildFetchError,
|
|
237
237
|
T as concatenateSerialisedErrorMessages,
|
|
238
|
-
|
|
238
|
+
x as convertMillisecondsToTimestamp,
|
|
239
239
|
k as convertODataTypeIdToUsageTypeId,
|
|
240
240
|
B as extractExtensionFromPath,
|
|
241
241
|
A as extractNameFromPath,
|
|
242
|
-
|
|
242
|
+
o as formatNumberAsDecimalNumber,
|
|
243
243
|
O as formatNumberAsDuration,
|
|
244
244
|
M as formatNumberAsSize,
|
|
245
245
|
R as formatNumberAsStorageSize,
|
|
@@ -16,12 +16,11 @@ 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
|
|
19
|
+
export type StatusColorId = 'amber' | 'red' | 'other';
|
|
20
20
|
export type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
|
|
21
21
|
export type ComponentStatus = {
|
|
22
22
|
id: string;
|
|
23
|
-
color?:
|
|
23
|
+
color?: StatusColorId;
|
|
24
24
|
label: string;
|
|
25
25
|
};
|
|
26
26
|
export declare const getComponentStatus: (id: string, localeId?: string) => ComponentStatus;
|
|
27
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DefaultTimestamp } from './timestamp';
|
|
2
|
-
export type { ComponentConfig, ComponentRef, ComponentStatus, ComponentStatusId, ComponentTypeId } from './component';
|
|
2
|
+
export type { ComponentConfig, ComponentRef, ComponentStatus, ComponentStatusId, ComponentTypeId, StatusColorId } from './component';
|
|
3
3
|
export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig } from './connection';
|
|
4
4
|
export type { DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './connection';
|
|
5
5
|
export type { AuditContentResult, AuditContentSettings } from './connector';
|