@dpuse/dpuse-shared 0.3.610 → 0.3.615
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-B6kdXy8u.js → componentConfig.schema-cyVi0ezr.js} +2 -2
- package/dist/dpuse-shared-component.es.js +1 -1
- package/dist/dpuse-shared-connector.es.js +8 -8
- package/dist/dpuse-shared-locale.es.js +15 -3
- package/dist/dpuse-shared.es.js +7 -7
- package/dist/{moduleConfig.schema-DPEkEXqp.js → moduleConfig.schema-DsAmxx58.js} +1 -1
- package/dist/types/src/component/componentConfig.schema.d.ts +13 -51
- package/dist/types/src/component/connector/connection.d.ts +2 -2
- package/dist/types/src/component/connector/index.d.ts +1 -1
- package/dist/types/src/component/context/index.d.ts +12 -12
- package/dist/types/src/component/index.d.ts +5 -6
- package/dist/types/src/engine/index.d.ts +2 -2
- package/dist/types/src/locale/index.d.ts +12 -26
- package/dist/types/src/schema.d.ts +6 -0
- package/package.json +1 -1
|
@@ -369,7 +369,7 @@ function T(e, t) {
|
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
371
|
//#endregion
|
|
372
|
-
//#region src/
|
|
372
|
+
//#region src/schema.ts
|
|
373
373
|
var E = (e) => /* @__PURE__ */ T(e.map((e) => /* @__PURE__ */ _(e))), D = /* @__PURE__ */ b({
|
|
374
374
|
en: /* @__PURE__ */ C(),
|
|
375
375
|
es: /* @__PURE__ */ C()
|
|
@@ -442,4 +442,4 @@ var E = (e) => /* @__PURE__ */ T(e.map((e) => /* @__PURE__ */ _(e))), D = /* @__
|
|
|
442
442
|
path: /* @__PURE__ */ C()
|
|
443
443
|
});
|
|
444
444
|
//#endregion
|
|
445
|
-
export {
|
|
445
|
+
export { O as a, g as c, y as d, b as f, C as h, D as i, _ as l, S as m, N as n, E as o, x as p, P as r, h as s, M as t, v as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, o as c, p as l, s as u, u as d } from "./componentConfig.schema-
|
|
2
|
-
import { t as f } from "./moduleConfig.schema-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, o as c, p as l, s as u, u as d } from "./componentConfig.schema-cyVi0ezr.js";
|
|
2
|
+
import { t as f } from "./moduleConfig.schema-DsAmxx58.js";
|
|
3
3
|
import { createLabelMap as p, resolveLabel as m } from "./dpuse-shared-locale.es.js";
|
|
4
4
|
//#region src/component/connector/connectorConfig.schema.ts
|
|
5
5
|
var h = r({
|
|
6
|
-
authMethodId:
|
|
6
|
+
authMethodId: c([
|
|
7
7
|
"apiKey",
|
|
8
8
|
"disabled",
|
|
9
9
|
"oAuth2",
|
|
@@ -12,15 +12,15 @@ var h = r({
|
|
|
12
12
|
activeConnectionCount: l(n()),
|
|
13
13
|
canDescribe: l(t()),
|
|
14
14
|
id: l(i()),
|
|
15
|
-
label: l(
|
|
15
|
+
label: l(a),
|
|
16
16
|
maxConnectionCount: d(n()),
|
|
17
17
|
params: l(u(s(i(), i())))
|
|
18
|
-
}), g =
|
|
18
|
+
}), g = c([
|
|
19
19
|
"application",
|
|
20
20
|
"curatedDataset",
|
|
21
21
|
"database",
|
|
22
22
|
"fileStore"
|
|
23
|
-
]), _ =
|
|
23
|
+
]), _ = c([
|
|
24
24
|
"abortOperation",
|
|
25
25
|
"auditObjectContent",
|
|
26
26
|
"createObject",
|
|
@@ -35,14 +35,14 @@ var h = r({
|
|
|
35
35
|
"retrieveChunks",
|
|
36
36
|
"retrieveRecords",
|
|
37
37
|
"upsertRecords"
|
|
38
|
-
]), v =
|
|
38
|
+
]), v = c([
|
|
39
39
|
"bidirectional",
|
|
40
40
|
"destination",
|
|
41
41
|
"source",
|
|
42
42
|
"unknown"
|
|
43
43
|
]), y = r({
|
|
44
44
|
id: i(),
|
|
45
|
-
label:
|
|
45
|
+
label: e
|
|
46
46
|
}), b = r({
|
|
47
47
|
...f,
|
|
48
48
|
typeId: o("connector"),
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
//#region src/locale/index.ts
|
|
2
|
-
var e = "en", t =
|
|
2
|
+
var e = "en", t = [{
|
|
3
|
+
id: "en",
|
|
4
|
+
flag: "gb",
|
|
5
|
+
label: "English"
|
|
6
|
+
}, {
|
|
7
|
+
id: "es",
|
|
8
|
+
flag: "es",
|
|
9
|
+
label: "Español"
|
|
10
|
+
}];
|
|
11
|
+
function n(e) {
|
|
12
|
+
return new Map(Object.entries(e));
|
|
13
|
+
}
|
|
14
|
+
function r(e, t, n = "en") {
|
|
3
15
|
let r = e.get(t);
|
|
4
16
|
if (r !== void 0) return r;
|
|
5
17
|
if (n !== t) return e.get(n);
|
|
6
|
-
}
|
|
18
|
+
}
|
|
7
19
|
//#endregion
|
|
8
|
-
export { e as
|
|
20
|
+
export { e as DEFAULT_LOCALE_ID, t as SUPPORTED_LANGUAGES, n as createLabelMap, r as resolveLabel };
|
package/dist/dpuse-shared.es.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { d as e, f as t,
|
|
2
|
-
import { t as s } from "./moduleConfig.schema-
|
|
1
|
+
import { d as e, f as t, l as n, o as r, r as i, s as a, t as o } from "./componentConfig.schema-cyVi0ezr.js";
|
|
2
|
+
import { t as s } from "./moduleConfig.schema-DsAmxx58.js";
|
|
3
3
|
//#region src/component/context/contextConfig.schema.ts
|
|
4
|
-
var c =
|
|
4
|
+
var c = r(["list"]), l = t({
|
|
5
5
|
...o,
|
|
6
|
-
typeId:
|
|
6
|
+
typeId: n("contextModelGroup"),
|
|
7
7
|
modelRefs: a(i),
|
|
8
8
|
order: e()
|
|
9
9
|
}), u = t({
|
|
10
10
|
...s,
|
|
11
|
-
typeId:
|
|
11
|
+
typeId: n("context"),
|
|
12
12
|
models: a(l),
|
|
13
13
|
operations: a(c)
|
|
14
|
-
}), d =
|
|
14
|
+
}), d = r([
|
|
15
15
|
"list",
|
|
16
16
|
"render",
|
|
17
17
|
"setColorMode"
|
|
18
18
|
]), f = t({
|
|
19
19
|
...s,
|
|
20
|
-
typeId:
|
|
20
|
+
typeId: n("presenter"),
|
|
21
21
|
presentations: a(i),
|
|
22
22
|
operations: a(d)
|
|
23
23
|
});
|
|
@@ -1,52 +1,20 @@
|
|
|
1
|
-
import { LiteralSchema, UnionSchema } from 'valibot';
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
type LiteralUnionSchema<T extends readonly string[]> = UnionSchema<{
|
|
6
|
-
[K in keyof T]: LiteralSchema<T[K], undefined>;
|
|
7
|
-
}, undefined>;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
declare const literalUnion: <const T extends readonly string[]>(values: T) => LiteralUnionSchema<T>;
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
1
|
declare const localisedStringSchema: import('valibot').ObjectSchema<{
|
|
16
2
|
readonly en: import('valibot').StringSchema<undefined>;
|
|
17
3
|
readonly es: import('valibot').StringSchema<undefined>;
|
|
18
4
|
}, undefined>;
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
5
|
declare const partialLocalisedStringSchema: import('valibot').ObjectSchema<{
|
|
23
6
|
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
24
7
|
readonly es: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
25
8
|
}, undefined>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
declare const componentStatusColorIdSchema: LiteralUnionSchema<readonly ["amber", "green", "red", "other"]>;
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
declare const componentStatusIdSchema: LiteralUnionSchema<readonly ["alpha", "beta", "generalAvailability", "notApplicable", "preAlpha", "proposed", "releaseCandidate", "unavailable", "underReview"]>;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
declare const componentTypeIdSchema: LiteralUnionSchema<readonly ["app", "connector", "connectorConnection", "context", "contextModelGroup", "contextModel", "contextModelDimensionGroup", "contextModelDimension", "contextModelDimensionHierarchy", "contextModelEntityGroup", "contextModelEntity", "contextModelEntityDataItem", "contextModelEntityEvent", "contextModelEntityPrimaryMeasure", "contextModelSecondaryMeasureGroup", "contextModelSecondaryMeasure", "dataView", "dimension", "engine", "eventQuery", "presenter", "presenterPresentation", "tool"]>;
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
9
|
+
declare const componentStatusColorIdSchema: 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>;
|
|
10
|
+
declare const componentStatusIdSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"alpha", undefined>, import('valibot').LiteralSchema<"beta", undefined>, import('valibot').LiteralSchema<"generalAvailability", undefined>, import('valibot').LiteralSchema<"notApplicable", undefined>, import('valibot').LiteralSchema<"preAlpha", undefined>, import('valibot').LiteralSchema<"proposed", undefined>, import('valibot').LiteralSchema<"releaseCandidate", undefined>, import('valibot').LiteralSchema<"unavailable", undefined>, import('valibot').LiteralSchema<"underReview", undefined>], undefined>;
|
|
11
|
+
declare const componentTypeIdSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"app", undefined>, import('valibot').LiteralSchema<"connector", undefined>, import('valibot').LiteralSchema<"connectorConnection", undefined>, import('valibot').LiteralSchema<"context", undefined>, import('valibot').LiteralSchema<"contextModelGroup", undefined>, import('valibot').LiteralSchema<"contextModel", undefined>, import('valibot').LiteralSchema<"contextModelDimensionGroup", undefined>, import('valibot').LiteralSchema<"contextModelDimension", undefined>, import('valibot').LiteralSchema<"contextModelDimensionHierarchy", undefined>, import('valibot').LiteralSchema<"contextModelEntityGroup", undefined>, import('valibot').LiteralSchema<"contextModelEntity", undefined>, import('valibot').LiteralSchema<"contextModelEntityDataItem", undefined>, import('valibot').LiteralSchema<"contextModelEntityEvent", undefined>, import('valibot').LiteralSchema<"contextModelEntityPrimaryMeasure", undefined>, import('valibot').LiteralSchema<"contextModelSecondaryMeasureGroup", undefined>, import('valibot').LiteralSchema<"contextModelSecondaryMeasure", undefined>, import('valibot').LiteralSchema<"dataView", undefined>, import('valibot').LiteralSchema<"dimension", undefined>, import('valibot').LiteralSchema<"engine", undefined>, import('valibot').LiteralSchema<"eventQuery", undefined>, import('valibot').LiteralSchema<"presenter", undefined>, import('valibot').LiteralSchema<"presenterPresentation", undefined>, import('valibot').LiteralSchema<"tool", undefined>], undefined>;
|
|
41
12
|
declare const componentStatusSchema: import('valibot').ObjectSchema<{
|
|
42
13
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
43
|
-
readonly color:
|
|
14
|
+
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>;
|
|
44
15
|
readonly label: import('valibot').StringSchema<undefined>;
|
|
45
16
|
}, undefined>;
|
|
46
|
-
|
|
47
|
-
*
|
|
48
|
-
*/
|
|
49
|
-
declare const componentConfigCoreFields: {
|
|
17
|
+
export declare const componentConfigCoreFields: {
|
|
50
18
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
51
19
|
readonly label: import('valibot').ObjectSchema<{
|
|
52
20
|
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
@@ -62,16 +30,13 @@ declare const componentConfigCoreFields: {
|
|
|
62
30
|
readonly lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
63
31
|
readonly status: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
64
32
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
65
|
-
readonly color:
|
|
33
|
+
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>;
|
|
66
34
|
readonly label: import('valibot').StringSchema<undefined>;
|
|
67
35
|
}, undefined>, undefined>;
|
|
68
|
-
readonly statusId:
|
|
36
|
+
readonly statusId: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"alpha", undefined>, import('valibot').LiteralSchema<"beta", undefined>, import('valibot').LiteralSchema<"generalAvailability", undefined>, import('valibot').LiteralSchema<"notApplicable", undefined>, import('valibot').LiteralSchema<"preAlpha", undefined>, import('valibot').LiteralSchema<"proposed", undefined>, import('valibot').LiteralSchema<"releaseCandidate", undefined>, import('valibot').LiteralSchema<"unavailable", undefined>, import('valibot').LiteralSchema<"underReview", undefined>], undefined>;
|
|
69
37
|
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*/
|
|
73
|
-
declare const componentConfigSchema: import('valibot').ObjectSchema<{
|
|
74
|
-
readonly typeId: LiteralUnionSchema<readonly ["app", "connector", "connectorConnection", "context", "contextModelGroup", "contextModel", "contextModelDimensionGroup", "contextModelDimension", "contextModelDimensionHierarchy", "contextModelEntityGroup", "contextModelEntity", "contextModelEntityDataItem", "contextModelEntityEvent", "contextModelEntityPrimaryMeasure", "contextModelSecondaryMeasureGroup", "contextModelSecondaryMeasure", "dataView", "dimension", "engine", "eventQuery", "presenter", "presenterPresentation", "tool"]>;
|
|
38
|
+
export declare const componentConfigSchema: import('valibot').ObjectSchema<{
|
|
39
|
+
readonly typeId: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"app", undefined>, import('valibot').LiteralSchema<"connector", undefined>, import('valibot').LiteralSchema<"connectorConnection", undefined>, import('valibot').LiteralSchema<"context", undefined>, import('valibot').LiteralSchema<"contextModelGroup", undefined>, import('valibot').LiteralSchema<"contextModel", undefined>, import('valibot').LiteralSchema<"contextModelDimensionGroup", undefined>, import('valibot').LiteralSchema<"contextModelDimension", undefined>, import('valibot').LiteralSchema<"contextModelDimensionHierarchy", undefined>, import('valibot').LiteralSchema<"contextModelEntityGroup", undefined>, import('valibot').LiteralSchema<"contextModelEntity", undefined>, import('valibot').LiteralSchema<"contextModelEntityDataItem", undefined>, import('valibot').LiteralSchema<"contextModelEntityEvent", undefined>, import('valibot').LiteralSchema<"contextModelEntityPrimaryMeasure", undefined>, import('valibot').LiteralSchema<"contextModelSecondaryMeasureGroup", undefined>, import('valibot').LiteralSchema<"contextModelSecondaryMeasure", undefined>, import('valibot').LiteralSchema<"dataView", undefined>, import('valibot').LiteralSchema<"dimension", undefined>, import('valibot').LiteralSchema<"engine", undefined>, import('valibot').LiteralSchema<"eventQuery", undefined>, import('valibot').LiteralSchema<"presenter", undefined>, import('valibot').LiteralSchema<"presenterPresentation", undefined>, import('valibot').LiteralSchema<"tool", undefined>], undefined>;
|
|
75
40
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
76
41
|
readonly label: import('valibot').ObjectSchema<{
|
|
77
42
|
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
@@ -87,15 +52,12 @@ declare const componentConfigSchema: import('valibot').ObjectSchema<{
|
|
|
87
52
|
readonly lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
88
53
|
readonly status: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
89
54
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
90
|
-
readonly color:
|
|
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>;
|
|
91
56
|
readonly label: import('valibot').StringSchema<undefined>;
|
|
92
57
|
}, undefined>, undefined>;
|
|
93
|
-
readonly statusId:
|
|
58
|
+
readonly statusId: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"alpha", undefined>, import('valibot').LiteralSchema<"beta", undefined>, import('valibot').LiteralSchema<"generalAvailability", undefined>, import('valibot').LiteralSchema<"notApplicable", undefined>, import('valibot').LiteralSchema<"preAlpha", undefined>, import('valibot').LiteralSchema<"proposed", undefined>, import('valibot').LiteralSchema<"releaseCandidate", undefined>, import('valibot').LiteralSchema<"unavailable", undefined>, import('valibot').LiteralSchema<"underReview", undefined>], undefined>;
|
|
94
59
|
}, undefined>;
|
|
95
|
-
|
|
96
|
-
*
|
|
97
|
-
*/
|
|
98
|
-
declare const componentReferenceSchema: import('valibot').ObjectSchema<{
|
|
60
|
+
export declare const componentReferenceSchema: import('valibot').ObjectSchema<{
|
|
99
61
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
100
62
|
readonly label: import('valibot').ObjectSchema<{
|
|
101
63
|
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
@@ -110,4 +72,4 @@ declare const componentReferenceSchema: import('valibot').ObjectSchema<{
|
|
|
110
72
|
readonly order: import('valibot').NumberSchema<undefined>;
|
|
111
73
|
readonly path: import('valibot').StringSchema<undefined>;
|
|
112
74
|
}, undefined>;
|
|
113
|
-
export {
|
|
75
|
+
export { componentStatusColorIdSchema, componentStatusIdSchema, componentStatusSchema, componentTypeIdSchema, localisedStringSchema, partialLocalisedStringSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentConfig } from '..';
|
|
2
2
|
import { ConnectorConfig } from '.';
|
|
3
|
-
import {
|
|
3
|
+
import { LocaleLabel } from '../../locale';
|
|
4
4
|
import { DataSubtypeId, DataTypeId } from '../dataView';
|
|
5
5
|
/**
|
|
6
6
|
* Connection configuration.
|
|
@@ -78,7 +78,7 @@ interface ObjectColumnConfig {
|
|
|
78
78
|
isIgnored: boolean | undefined;
|
|
79
79
|
isRequired: boolean | undefined;
|
|
80
80
|
isUnique: boolean | undefined;
|
|
81
|
-
label:
|
|
81
|
+
label: LocaleLabel;
|
|
82
82
|
leadingInferenceCounts: Record<string, number>;
|
|
83
83
|
maxDecimals: number | undefined;
|
|
84
84
|
maxSize: number | undefined;
|
|
@@ -211,7 +211,7 @@ type ConnectorCategoryLocalisedConfig = Omit<ConnectorCategoryConfig, 'label'> &
|
|
|
211
211
|
/**
|
|
212
212
|
* Construct connector category configuration.
|
|
213
213
|
*/
|
|
214
|
-
declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../locale').
|
|
214
|
+
declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../locale').LocaleId) => ConnectorCategoryLocalisedConfig;
|
|
215
215
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
216
216
|
export { constructConnectorCategoryConfig };
|
|
217
217
|
export type { ConnectionConfig, ConnectionLocalisedConfig, ConnectionNodeConfig, ObjectColumnConfig } from './connection';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { contextConfigSchema } from './contextConfig.schema';
|
|
3
3
|
import { EngineContextActionOptions } from '../../engine';
|
|
4
|
-
import {
|
|
4
|
+
import { LocaleLabel } from '../../locale';
|
|
5
5
|
import { ModuleConfig } from '../module';
|
|
6
6
|
import { Component, ComponentConfig, ComponentReference } from '..';
|
|
7
7
|
export interface Context extends Component {
|
|
@@ -45,8 +45,8 @@ export type ContextModelLocalisedConfig = Omit<ContextModelConfig, 'label' | 'de
|
|
|
45
45
|
};
|
|
46
46
|
export interface ContextModelDimensionGroupConfig {
|
|
47
47
|
id: string;
|
|
48
|
-
label:
|
|
49
|
-
description:
|
|
48
|
+
label: LocaleLabel;
|
|
49
|
+
description: LocaleLabel;
|
|
50
50
|
dimensionRefs: ComponentReference[];
|
|
51
51
|
}
|
|
52
52
|
export type ContextModelDimensionGroupLocalisedConfig = Omit<ContextModelDimensionGroupConfig, 'label' | 'description'> & {
|
|
@@ -55,7 +55,7 @@ export type ContextModelDimensionGroupLocalisedConfig = Omit<ContextModelDimensi
|
|
|
55
55
|
};
|
|
56
56
|
export interface ContextModelDimensionConfig {
|
|
57
57
|
id: string;
|
|
58
|
-
label:
|
|
58
|
+
label: LocaleLabel;
|
|
59
59
|
hierarchies: ContextModelDimensionHierarchyConfig[];
|
|
60
60
|
}
|
|
61
61
|
export type ContextModelDimensionLocalisedConfig = Omit<ContextModelDimensionConfig, 'label' | 'description'> & {
|
|
@@ -64,7 +64,7 @@ export type ContextModelDimensionLocalisedConfig = Omit<ContextModelDimensionCon
|
|
|
64
64
|
};
|
|
65
65
|
export interface ContextModelDimensionHierarchyConfig {
|
|
66
66
|
id: string;
|
|
67
|
-
label:
|
|
67
|
+
label: LocaleLabel;
|
|
68
68
|
}
|
|
69
69
|
export type ContextModelDimensionHierarchyLocalisedConfig = Omit<ContextModelDimensionHierarchyConfig, 'label' | 'description'> & {
|
|
70
70
|
label: string;
|
|
@@ -72,7 +72,7 @@ export type ContextModelDimensionHierarchyLocalisedConfig = Omit<ContextModelDim
|
|
|
72
72
|
};
|
|
73
73
|
export interface ContextModelEntityGroupConfig {
|
|
74
74
|
id: string;
|
|
75
|
-
label:
|
|
75
|
+
label: LocaleLabel;
|
|
76
76
|
description?: Record<string, unknown>;
|
|
77
77
|
entityRefs: ComponentReference[];
|
|
78
78
|
}
|
|
@@ -82,8 +82,8 @@ export type ContextModelEntityGroupLocalisedConfig = Omit<ContextModelEntityGrou
|
|
|
82
82
|
};
|
|
83
83
|
export interface ContextModelEntityConfig {
|
|
84
84
|
id: string;
|
|
85
|
-
label:
|
|
86
|
-
labelPlural:
|
|
85
|
+
label: LocaleLabel;
|
|
86
|
+
labelPlural: LocaleLabel;
|
|
87
87
|
dataItems: ContextModelEntityDataItemConfig[];
|
|
88
88
|
events: ContextModelEntityEventConfig[];
|
|
89
89
|
primaryMeasures: ContextModelEntityPrimaryMeasureConfig[];
|
|
@@ -94,7 +94,7 @@ export type ContextModelEntityLocalisedConfig = Omit<ContextModelEntityConfig, '
|
|
|
94
94
|
};
|
|
95
95
|
export interface ContextModelEntityDataItemConfig {
|
|
96
96
|
id: string;
|
|
97
|
-
label:
|
|
97
|
+
label: LocaleLabel;
|
|
98
98
|
}
|
|
99
99
|
export type ContextModelEntityDataItemLocalisedConfig = Omit<ContextModelEntityDataItemConfig, 'label' | 'description'> & {
|
|
100
100
|
label: string;
|
|
@@ -111,7 +111,7 @@ export type ContextModelEntityEventLocalisedConfig = Omit<ContextModelEntityEven
|
|
|
111
111
|
};
|
|
112
112
|
export interface ContextModelEntityPrimaryMeasureConfig {
|
|
113
113
|
id: string;
|
|
114
|
-
label:
|
|
114
|
+
label: LocaleLabel;
|
|
115
115
|
}
|
|
116
116
|
export type ContextModelEntityPrimaryMeasureLocalisedConfig = Omit<ContextModelEntityPrimaryMeasureConfig, 'label' | 'description'> & {
|
|
117
117
|
label: string;
|
|
@@ -119,7 +119,7 @@ export type ContextModelEntityPrimaryMeasureLocalisedConfig = Omit<ContextModelE
|
|
|
119
119
|
};
|
|
120
120
|
export interface ContextModelSecondaryMeasureGroupConfig {
|
|
121
121
|
id: string;
|
|
122
|
-
label:
|
|
122
|
+
label: LocaleLabel;
|
|
123
123
|
description?: Record<string, unknown>;
|
|
124
124
|
secondaryMeasureRefs: ComponentReference[];
|
|
125
125
|
}
|
|
@@ -129,7 +129,7 @@ export type ContextModelSecondaryMeasureGroupLocalisedConfig = Omit<ContextModel
|
|
|
129
129
|
};
|
|
130
130
|
export interface ContextModelSecondaryMeasureConfig {
|
|
131
131
|
id: string;
|
|
132
|
-
label:
|
|
132
|
+
label: LocaleLabel;
|
|
133
133
|
}
|
|
134
134
|
export type ContextModelSecondaryMeasureLocalisedConfig = Omit<ContextModelSecondaryMeasureConfig, 'label' | 'description'> & {
|
|
135
135
|
label: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { componentConfigSchema, componentReferenceSchema, componentStatusSchema } from './componentConfig.schema';
|
|
3
|
-
import {
|
|
3
|
+
import { LocaleId } from '../locale';
|
|
4
|
+
export { componentConfigSchema } from './componentConfig.schema';
|
|
5
|
+
export type { ModuleConfig, ModuleTypeId } from './module';
|
|
4
6
|
export interface Component {
|
|
5
7
|
readonly config: ComponentConfig;
|
|
6
8
|
}
|
|
@@ -10,8 +12,5 @@ export type ComponentLocalisedConfig = Omit<ComponentConfig, 'label' | 'descript
|
|
|
10
12
|
description: string;
|
|
11
13
|
};
|
|
12
14
|
export type ComponentReference = InferOutput<typeof componentReferenceSchema>;
|
|
13
|
-
type ComponentStatus = InferOutput<typeof componentStatusSchema>;
|
|
14
|
-
declare function getComponentStatus(id: string, localeId?:
|
|
15
|
-
export { getComponentStatus };
|
|
16
|
-
export { componentConfigSchema } from './componentConfig.schema';
|
|
17
|
-
export type { ModuleConfig, ModuleTypeId } from './module';
|
|
15
|
+
export type ComponentStatus = InferOutput<typeof componentStatusSchema>;
|
|
16
|
+
export declare function getComponentStatus(id: string, localeId?: LocaleId): ComponentStatus;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ComponentLocalisedConfig } from '../component';
|
|
2
1
|
import { EncodingTypeConfig } from '../encoding';
|
|
3
2
|
import { ModuleConfig } from '../component/module';
|
|
4
3
|
import { ObjectColumnConfig } from '../component/connector';
|
|
5
4
|
import { ToolConfig } from '../component/tool';
|
|
5
|
+
import { ComponentConfig, ComponentLocalisedConfig } from '../component';
|
|
6
6
|
import { InferenceRecord, InferenceSummary, ParsingRecord } from '../component/dataView';
|
|
7
7
|
export interface EngineRuntime {
|
|
8
8
|
getEncodingTypeConfigs: (localeId: string) => EncodingTypeConfig[];
|
|
@@ -10,7 +10,7 @@ export interface EngineRuntime {
|
|
|
10
10
|
}
|
|
11
11
|
export interface EngineWorker {
|
|
12
12
|
initialise: (options: EngineInitialiseOptions) => Promise<void>;
|
|
13
|
-
processRequest: (id: string, config: ComponentLocalisedConfig, options: EngineAuthActionOptions | EngineConnectorActionOptions | EngineContextActionOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
|
|
13
|
+
processRequest: (id: string, config: ComponentConfig | ComponentLocalisedConfig, options: EngineAuthActionOptions | EngineConnectorActionOptions | EngineContextActionOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
|
|
14
14
|
}
|
|
15
15
|
export interface EngineConfig extends ModuleConfig {
|
|
16
16
|
typeId: 'engine';
|
|
@@ -1,26 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
type LocaleLabelMap = ReadonlyMap<string, string>;
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
declare const createLabelMap: (labels: Record<string, string>) => LocaleLabelMap;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
declare const resolveLabel: (labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: "en") => string | undefined;
|
|
25
|
-
export { createLabelMap, DEFAULT_LOCALE_CODE, resolveLabel };
|
|
26
|
-
export type { LocaleCode, LocaleLabelMap, LocalisedString };
|
|
1
|
+
export type FlagId = 'es' | 'gb';
|
|
2
|
+
export type LocaleId = 'en' | 'es';
|
|
3
|
+
export type LocaleLabel = Partial<Record<LocaleId, string>>;
|
|
4
|
+
export type LocaleLabelMap = ReadonlyMap<string, string>;
|
|
5
|
+
export declare const DEFAULT_LOCALE_ID: LocaleId;
|
|
6
|
+
export declare const SUPPORTED_LANGUAGES: {
|
|
7
|
+
id: LocaleId;
|
|
8
|
+
flag: FlagId;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
11
|
+
export declare function createLabelMap(labels: Record<string, string>): LocaleLabelMap;
|
|
12
|
+
export declare function resolveLabel(labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: LocaleId): string | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LiteralSchema, UnionSchema } from 'valibot';
|
|
2
|
+
type LiteralUnionSchema<T extends readonly string[]> = UnionSchema<{
|
|
3
|
+
[K in keyof T]: LiteralSchema<T[K], undefined>;
|
|
4
|
+
}, undefined>;
|
|
5
|
+
export declare const literalUnion: <const T extends readonly string[]>(values: T) => LiteralUnionSchema<T>;
|
|
6
|
+
export {};
|
package/package.json
CHANGED