@dpuse/dpuse-shared 0.3.663 → 0.3.665
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/dist/{componentConfig.schema-CpjcH9JV.js → componentConfig.schema-BIilERDi.js} +2 -0
- package/dist/dpuse-shared-component.es.js +1 -1
- package/dist/dpuse-shared-componentModuleConnector.es.js +2 -2
- package/dist/dpuse-shared-componentModuleContext.es.js +2 -2
- package/dist/dpuse-shared-componentModulePresenter.es.js +2 -2
- package/dist/dpuse-shared-utilities.es.js +42 -23
- package/dist/{moduleConfig.schema-DE8ldb7c.js → moduleConfig.schema-ChaMakUL.js} +1 -1
- package/dist/types/src/component/componentConfig.schema.d.ts +3 -0
- package/dist/types/src/component/module/connector/connectorConfig.schema.d.ts +1 -0
- package/dist/types/src/component/module/context/contextConfig.schema.d.ts +3 -0
- package/dist/types/src/component/module/moduleConfig.schema.d.ts +2 -0
- package/dist/types/src/component/module/presenter/presenterConfig.schema.d.ts +2 -0
- package/dist/types/src/utilities/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -424,6 +424,7 @@ var E = (e) => /* @__PURE__ */ T(e.map((e) => /* @__PURE__ */ _(e))), D = /* @__
|
|
|
424
424
|
description: O,
|
|
425
425
|
icon: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
426
426
|
iconDark: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
427
|
+
iconNeutral: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
427
428
|
order: /* @__PURE__ */ y(),
|
|
428
429
|
path: /* @__PURE__ */ C()
|
|
429
430
|
}), P = {
|
|
@@ -433,6 +434,7 @@ var E = (e) => /* @__PURE__ */ T(e.map((e) => /* @__PURE__ */ _(e))), D = /* @__
|
|
|
433
434
|
firstCreatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
434
435
|
icon: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
435
436
|
iconDark: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
437
|
+
iconNeutral: /* @__PURE__ */ v(/* @__PURE__ */ C()),
|
|
436
438
|
lastUpdatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
|
|
437
439
|
status: /* @__PURE__ */ v(M),
|
|
438
440
|
statusId: /* @__PURE__ */ v(j)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLabelMap as e, resolveLabel as t } from "./dpuse-shared-locale.es.js";
|
|
2
|
-
import { a as n, c as r, d as i, f as a, i as o, l as s, m as c, o as l, p as u, s as d, u as f } from "./componentConfig.schema-
|
|
3
|
-
import { t as p } from "./moduleConfig.schema-
|
|
2
|
+
import { a as n, c as r, d as i, f as a, i as o, l as s, m as c, o as l, p as u, s as d, u as f } from "./componentConfig.schema-BIilERDi.js";
|
|
3
|
+
import { t as p } from "./moduleConfig.schema-ChaMakUL.js";
|
|
4
4
|
//#region src/component/module/connector/connectorConfig.schema.ts
|
|
5
5
|
var m = n([
|
|
6
6
|
"application",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, o as r, r as i, t as a, u as o } from "./componentConfig.schema-
|
|
2
|
-
import { t as s } from "./moduleConfig.schema-
|
|
1
|
+
import { a as e, c as t, d as n, o as r, r as i, t as a, u as o } from "./componentConfig.schema-BIilERDi.js";
|
|
2
|
+
import { t as s } from "./moduleConfig.schema-ChaMakUL.js";
|
|
3
3
|
//#region src/component/module/context/contextConfig.schema.ts
|
|
4
4
|
var c = n({
|
|
5
5
|
...a,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, o as r, r as i } from "./componentConfig.schema-
|
|
2
|
-
import { t as a } from "./moduleConfig.schema-
|
|
1
|
+
import { a as e, c as t, d as n, o as r, r as i } from "./componentConfig.schema-BIilERDi.js";
|
|
2
|
+
import { t as a } from "./moduleConfig.schema-ChaMakUL.js";
|
|
3
3
|
//#region src/component/module/presenter/presenterConfig.schema.ts
|
|
4
4
|
var o = e([
|
|
5
5
|
"list",
|
|
@@ -46,33 +46,52 @@ function a(n, r = 2, i = r, a = e) {
|
|
|
46
46
|
}), t.set(o, s)), s.format(n);
|
|
47
47
|
}
|
|
48
48
|
function o(e, t = 1) {
|
|
49
|
-
return e == null ? "" : e < 1e3 ?
|
|
49
|
+
return e == null ? "" : e < 1e3 ? u(e) : e < 1e6 ? `${a(e / 1e3, t, 0)}K` : e < 1e9 ? `${a(e / 1e6, t, 0)}M` : e < 0xe8d4a51000 ? `${a(e / 1e9, t, 0)}B` : `${a(e / 0xe8d4a51000, t, 0)}T`;
|
|
50
50
|
}
|
|
51
51
|
function s(e, t = 1) {
|
|
52
|
-
return e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${
|
|
52
|
+
return e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${u(e)} bytes` : e < 1048576 ? `${a(e / 1024, t, 0)} KB` : e < 1073741824 ? `${a(e / 1048576, t, 0)} MB` : e < 1099511627776 ? `${a(e / 1073741824, t, 0)} GB` : `${a(e / 1099511627776, t, 0)} TB`;
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
var c = [
|
|
55
|
+
[
|
|
56
|
+
"days",
|
|
57
|
+
864e5,
|
|
58
|
+
(e) => e === 1 ? "1 day" : `${u(e)} days`
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
"hrs",
|
|
62
|
+
36e5,
|
|
63
|
+
(e) => e === 1 ? "1 hr" : `${u(e)} hrs`
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"mins",
|
|
67
|
+
6e4,
|
|
68
|
+
(e) => e === 1 ? "1 min" : `${u(e)} mins`
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
"secs",
|
|
72
|
+
1e3,
|
|
73
|
+
(e) => e === 1 ? "1 sec" : `${u(e)} secs`
|
|
74
|
+
],
|
|
75
|
+
[
|
|
76
|
+
"ms",
|
|
77
|
+
0,
|
|
78
|
+
(e) => `${u(e)} ms`
|
|
79
|
+
]
|
|
80
|
+
];
|
|
81
|
+
function l(e, t = "ms") {
|
|
55
82
|
if (e == null) return "";
|
|
56
|
-
let n = [];
|
|
57
|
-
if (e
|
|
58
|
-
let t =
|
|
59
|
-
|
|
83
|
+
let n = c.findIndex(([e]) => e === t);
|
|
84
|
+
if (e < (c[n]?.[1] ?? 0)) {
|
|
85
|
+
let t = c.find(([, t]) => e >= t);
|
|
86
|
+
if (t == null) return `${u(e)} ms`;
|
|
87
|
+
let [, n, r] = t;
|
|
88
|
+
return r(n > 0 ? Math.floor(e / n) : e);
|
|
60
89
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
if (n.length < t && e >= 6e4) {
|
|
66
|
-
let t = Math.floor(e / 6e4);
|
|
67
|
-
n.push(t === 1 ? "1 min" : `${l(t)} mins`), e %= 6e4;
|
|
68
|
-
}
|
|
69
|
-
if (n.length < t && e >= 1e3) {
|
|
70
|
-
let t = Math.floor(e / 1e3);
|
|
71
|
-
n.push(t === 1 ? "1 sec" : `${l(t)} secs`), e %= 1e3;
|
|
72
|
-
}
|
|
73
|
-
return n.length < t && (e > 0 || n.length === 0) && n.push(`${l(e)} ms`), n.join(" ");
|
|
90
|
+
let r = [], i = e;
|
|
91
|
+
for (let [, e, t] of c.slice(0, n + 1)) e === 0 ? (i > 0 || r.length === 0) && r.push(t(i)) : i >= e && (r.push(t(Math.floor(i / e))), i %= e);
|
|
92
|
+
return r.join(" ");
|
|
74
93
|
}
|
|
75
|
-
function
|
|
94
|
+
function u(n, r = e) {
|
|
76
95
|
if (n == null) return "";
|
|
77
96
|
let i = `${r}decimal0.0`, a = t.get(i);
|
|
78
97
|
return a || (a = new Intl.NumberFormat(r, {
|
|
@@ -84,7 +103,7 @@ function l(n, r = e) {
|
|
|
84
103
|
useGrouping: !0
|
|
85
104
|
}), t.set(i, a)), a.format(n);
|
|
86
105
|
}
|
|
87
|
-
function
|
|
106
|
+
function d(e) {
|
|
88
107
|
switch (e) {
|
|
89
108
|
case "csv": return "text/csv";
|
|
90
109
|
case "tab":
|
|
@@ -95,4 +114,4 @@ function u(e) {
|
|
|
95
114
|
}
|
|
96
115
|
}
|
|
97
116
|
//#endregion
|
|
98
|
-
export { n as convertODataTypeIdToUsageTypeId, i as extractExtensionFromPath, r as extractNameFromPath, a as formatNumberAsDecimalNumber,
|
|
117
|
+
export { n as convertODataTypeIdToUsageTypeId, i as extractExtensionFromPath, r as extractNameFromPath, a as formatNumberAsDecimalNumber, l as formatNumberAsDuration, o as formatNumberAsSize, s as formatNumberAsStorageSize, u as formatNumberAsWholeNumber, d as lookupMimeTypeForExtension };
|
|
@@ -17,6 +17,7 @@ export declare const componentReferenceSchema: import('valibot').ObjectSchema<{
|
|
|
17
17
|
}, undefined>;
|
|
18
18
|
readonly icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
19
19
|
readonly iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
20
|
+
readonly iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
20
21
|
readonly order: import('valibot').NumberSchema<undefined>;
|
|
21
22
|
readonly path: import('valibot').StringSchema<undefined>;
|
|
22
23
|
}, undefined>;
|
|
@@ -33,6 +34,7 @@ export declare const componentConfigCoreFields: {
|
|
|
33
34
|
firstCreatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
34
35
|
icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
35
36
|
iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
37
|
+
iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
36
38
|
lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
37
39
|
status: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
38
40
|
readonly color: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"amber", undefined>, import('valibot').LiteralSchema<"green", undefined>, import('valibot').LiteralSchema<"red", undefined>, import('valibot').LiteralSchema<"other", undefined>], undefined>;
|
|
@@ -54,6 +56,7 @@ export declare const componentConfigSchema: import('valibot').ObjectSchema<{
|
|
|
54
56
|
readonly firstCreatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
55
57
|
readonly icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
56
58
|
readonly iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
59
|
+
readonly iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
57
60
|
readonly lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
58
61
|
readonly status: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
59
62
|
readonly color: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"amber", undefined>, import('valibot').LiteralSchema<"green", undefined>, import('valibot').LiteralSchema<"red", undefined>, import('valibot').LiteralSchema<"other", undefined>], undefined>;
|
|
@@ -49,6 +49,7 @@ export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
|
|
|
49
49
|
readonly firstCreatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
50
50
|
readonly icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
51
51
|
readonly iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
52
|
+
readonly iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
52
53
|
readonly lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
53
54
|
readonly status: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
54
55
|
readonly color: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"amber", undefined>, import('valibot').LiteralSchema<"green", undefined>, import('valibot').LiteralSchema<"red", undefined>, import('valibot').LiteralSchema<"other", undefined>], undefined>;
|
|
@@ -15,6 +15,7 @@ export declare const contextConfigSchema: import('valibot').ObjectSchema<{
|
|
|
15
15
|
}, undefined>;
|
|
16
16
|
readonly icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
17
17
|
readonly iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
18
|
+
readonly iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
18
19
|
readonly order: import('valibot').NumberSchema<undefined>;
|
|
19
20
|
readonly path: import('valibot').StringSchema<undefined>;
|
|
20
21
|
}, undefined>, undefined>;
|
|
@@ -31,6 +32,7 @@ export declare const contextConfigSchema: import('valibot').ObjectSchema<{
|
|
|
31
32
|
readonly firstCreatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
32
33
|
readonly icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
33
34
|
readonly iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
35
|
+
readonly iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
34
36
|
readonly lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
35
37
|
readonly status: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
36
38
|
readonly color: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"amber", undefined>, import('valibot').LiteralSchema<"green", undefined>, import('valibot').LiteralSchema<"red", undefined>, import('valibot').LiteralSchema<"other", undefined>], undefined>;
|
|
@@ -52,6 +54,7 @@ export declare const contextConfigSchema: import('valibot').ObjectSchema<{
|
|
|
52
54
|
readonly firstCreatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
53
55
|
readonly icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
54
56
|
readonly iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
57
|
+
readonly iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
55
58
|
readonly lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
56
59
|
readonly status: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
57
60
|
readonly color: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"amber", undefined>, import('valibot').LiteralSchema<"green", undefined>, import('valibot').LiteralSchema<"red", undefined>, import('valibot').LiteralSchema<"other", undefined>], undefined>;
|
|
@@ -13,6 +13,7 @@ export declare const moduleConfigCoreFields: {
|
|
|
13
13
|
firstCreatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
14
14
|
icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
15
15
|
iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
16
|
+
iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
16
17
|
lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
17
18
|
status: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
18
19
|
readonly color: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"amber", undefined>, import('valibot').LiteralSchema<"green", undefined>, import('valibot').LiteralSchema<"red", undefined>, import('valibot').LiteralSchema<"other", undefined>], undefined>;
|
|
@@ -35,6 +36,7 @@ export declare const moduleConfigSchema: import('valibot').ObjectSchema<{
|
|
|
35
36
|
readonly firstCreatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
36
37
|
readonly icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
37
38
|
readonly iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
39
|
+
readonly iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
38
40
|
readonly lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
39
41
|
readonly status: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
40
42
|
readonly color: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"amber", undefined>, import('valibot').LiteralSchema<"green", undefined>, import('valibot').LiteralSchema<"red", undefined>, import('valibot').LiteralSchema<"other", undefined>], undefined>;
|
|
@@ -13,6 +13,7 @@ export declare const presenterConfigSchema: import('valibot').ObjectSchema<{
|
|
|
13
13
|
}, undefined>;
|
|
14
14
|
readonly icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
15
15
|
readonly iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
16
|
+
readonly iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
16
17
|
readonly order: import('valibot').NumberSchema<undefined>;
|
|
17
18
|
readonly path: import('valibot').StringSchema<undefined>;
|
|
18
19
|
}, undefined>, undefined>;
|
|
@@ -30,6 +31,7 @@ export declare const presenterConfigSchema: import('valibot').ObjectSchema<{
|
|
|
30
31
|
readonly firstCreatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
31
32
|
readonly icon: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
32
33
|
readonly iconDark: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
34
|
+
readonly iconNeutral: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
33
35
|
readonly lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
34
36
|
readonly status: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
35
37
|
readonly color: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"amber", undefined>, import('valibot').LiteralSchema<"green", undefined>, import('valibot').LiteralSchema<"red", undefined>, import('valibot').LiteralSchema<"other", undefined>], undefined>;
|
|
@@ -4,6 +4,7 @@ export declare function extractExtensionFromPath(itemPath: string): string | und
|
|
|
4
4
|
export declare function formatNumberAsDecimalNumber(number?: number, decimalPlaces?: number, minimumFractionDigits?: number, locale?: string): string;
|
|
5
5
|
export declare function formatNumberAsSize(number?: number, decimalPlaces?: number): string;
|
|
6
6
|
export declare function formatNumberAsStorageSize(number?: number, decimalPlaces?: number): string;
|
|
7
|
-
export
|
|
7
|
+
export type DurationLevel = 'days' | 'hrs' | 'mins' | 'secs' | 'ms';
|
|
8
|
+
export declare function formatNumberAsDuration(number?: number, stopAt?: DurationLevel): string;
|
|
8
9
|
export declare function formatNumberAsWholeNumber(number?: number, locale?: string): string;
|
|
9
10
|
export declare function lookupMimeTypeForExtension(extension?: string): string;
|
package/package.json
CHANGED