@datapos/datapos-shared 0.3.52 → 0.3.55
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.
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ For detailed implementation, see the `scripts` section in the `package.json` fil
|
|
|
37
37
|
| ------------------ | ---------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
38
38
|
| audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities. |
|
|
39
39
|
| build | alt+ctrl+shift+b | Build the package using Vite. |
|
|
40
|
-
| check | alt+ctrl+shift+c | List outdated dependencies.
|
|
40
|
+
| check | alt+ctrl+shift+c | List outdated dependencies and run retire scanner. |
|
|
41
41
|
| document | alt+ctrl+shift+d | Identify licenses of the project's production and peer dependencies. See [LICENSES.json](./LICENSES.json). |
|
|
42
42
|
| format | alt+ctrl+shift+f | Enforce formatting style rules. |
|
|
43
43
|
| lint | alt+ctrl+shift+l | Check the code for errors and enforce coding style rules. |
|
|
@@ -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,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 = 'amber' | '
|
|
19
|
+
type StatusColor = '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;
|
|
@@ -9,9 +9,9 @@ type ProcessContextRequest = (id: string, contextConfig: ContextConfig, settings
|
|
|
9
9
|
export type ConnectorInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult | RetrieveResult;
|
|
10
10
|
export interface Engine {
|
|
11
11
|
getEncodingConfigs: (localeId: string) => EncodingConfig[];
|
|
12
|
-
invokeWorker(errorEventCallback: (errorEvent: ErrorEvent) => void):
|
|
12
|
+
invokeWorker(errorEventCallback: (errorEvent: ErrorEvent) => void): EngineWorker;
|
|
13
13
|
}
|
|
14
|
-
export interface
|
|
14
|
+
export interface EngineWorker {
|
|
15
15
|
initialise: InitialiseEngine;
|
|
16
16
|
processConnectorRequest: ProcessConnectorRequest;
|
|
17
17
|
processContextRequest: ProcessContextRequest;
|
|
@@ -18,7 +18,7 @@ export type { Context, ContextConfig, ContextFocusConfig, ContextFocusConfigList
|
|
|
18
18
|
export type { ContextEntityConfig, ContextEntityEventConfig, ContextHierarchyConfig, ContextViewConfig, Event } from './context';
|
|
19
19
|
export type { DataFormatId, EncodingConfig, RecordDelimiterId, ValueDelimiterId } from './dataView';
|
|
20
20
|
export type { DataViewConfig, DataViewContentAuditConfig, DataViewPreviewConfig, DataViewRelationshipsAuditConfig, ParsedValue } from './dataView';
|
|
21
|
-
export type { ConnectorInterfaceResult, ContextInterfaceResult, Engine,
|
|
21
|
+
export type { ConnectorInterfaceResult, ContextInterfaceResult, Engine, EngineWorker } from './engine';
|
|
22
22
|
export { APIError, ApplicationError, EngineError, FetchError, OperationalError, VueError, WindowRuntimeError, WindowPromiseRejectionError } from './errors';
|
|
23
23
|
export type { SerialisedError } from './errors';
|
|
24
24
|
export type { EventQueryConfig } from './eventQuery';
|