@dpuse/dpuse-shared 0.3.642 → 0.3.643
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/dpuse-shared-componentModuleTool.es.js +6 -5
- package/dist/dpuse-shared-locale.es.js +9 -2
- package/dist/types/src/component/connection/index.d.ts +2 -2
- package/dist/types/src/component/dataView/index.d.ts +2 -2
- package/dist/types/src/component/dimension/index.d.ts +2 -2
- package/dist/types/src/component/eventQuery/index.d.ts +2 -2
- package/dist/types/src/component/index.d.ts +2 -2
- package/dist/types/src/component/module/connector/index.d.ts +2 -2
- package/dist/types/src/component/module/context/index.d.ts +3 -3
- package/dist/types/src/component/module/context/model/dimension/index.d.ts +3 -3
- package/dist/types/src/component/module/context/model/entity/dataItem/index.d.ts +2 -2
- package/dist/types/src/component/module/context/model/entity/event/index.d.ts +2 -2
- package/dist/types/src/component/module/context/model/entity/index.d.ts +2 -2
- package/dist/types/src/component/module/context/model/entity/primaryMeasure/index.d.ts +2 -2
- package/dist/types/src/component/module/context/model/index.d.ts +5 -5
- package/dist/types/src/component/module/context/model/secondaryMeasure/index.d.ts +2 -2
- package/dist/types/src/component/module/presenter/index.d.ts +2 -2
- package/dist/types/src/locale/index.d.ts +9 -6
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
//#region src/component/module/tool/index.ts
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var e = "https://engine-eu.dpuse.app/tools";
|
|
3
|
+
async function t(t, n) {
|
|
4
|
+
let r = `dpuse-tool-${n}`, i = t.find((e) => e.id === r);
|
|
5
|
+
if (!i) throw Error(`Connector could not load unknown tool '${n}'.`);
|
|
6
|
+
return new (await (import(`${e}/${n}_v${i.version}/${r}.es.js`))).Tool();
|
|
6
7
|
}
|
|
7
8
|
//#endregion
|
|
8
|
-
export {
|
|
9
|
+
export { t as loadTool };
|
|
@@ -12,16 +12,23 @@ function n(e) {
|
|
|
12
12
|
return new Map(Object.entries(e));
|
|
13
13
|
}
|
|
14
14
|
function r(e, t) {
|
|
15
|
+
return {
|
|
16
|
+
...e,
|
|
17
|
+
label: e.label[t] ?? e.id,
|
|
18
|
+
description: e.description[t] ?? e.id
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function i(e, t) {
|
|
15
22
|
return e.map((e) => ({
|
|
16
23
|
...e,
|
|
17
24
|
label: e.label[t] ?? e.id,
|
|
18
25
|
description: e.description[t] ?? e.id
|
|
19
26
|
}));
|
|
20
27
|
}
|
|
21
|
-
function
|
|
28
|
+
function a(e, t, n = "en") {
|
|
22
29
|
let r = e.get(t);
|
|
23
30
|
if (r !== void 0) return r;
|
|
24
31
|
if (n !== t) return e.get(n);
|
|
25
32
|
}
|
|
26
33
|
//#endregion
|
|
27
|
-
export { e as DEFAULT_LOCALE_ID, t as SUPPORTED_LANGUAGES, n as createLabelMap, r as
|
|
34
|
+
export { e as DEFAULT_LOCALE_ID, t as SUPPORTED_LANGUAGES, n as createLabelMap, r as localiseConfig, i as localiseConfigs, a as resolveLabel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentConfig } from '..';
|
|
2
2
|
import { ConnectorConfig } from '../module/connector';
|
|
3
|
-
import {
|
|
3
|
+
import { LocalisedConfig, LocaleLabel } from '../../locale';
|
|
4
4
|
import { DataSubtypeId, DataTypeId } from '../dataView';
|
|
5
5
|
export interface ConnectionConfig extends ComponentConfig {
|
|
6
6
|
authorisation: Record<string, ConnectionAuthorisationConfig>;
|
|
@@ -8,7 +8,7 @@ export interface ConnectionConfig extends ComponentConfig {
|
|
|
8
8
|
lastVerifiedAt: number;
|
|
9
9
|
notation: string | undefined;
|
|
10
10
|
}
|
|
11
|
-
export type ConnectionLocalisedConfig =
|
|
11
|
+
export type ConnectionLocalisedConfig = LocalisedConfig<ConnectionConfig>;
|
|
12
12
|
export interface ConnectionAuthorisationConfig {
|
|
13
13
|
accessToken: string;
|
|
14
14
|
accountId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileTypeResult } from 'file-type';
|
|
2
2
|
import { Component, ComponentConfig } from '..';
|
|
3
3
|
import { ConnectionNodeConfig, ObjectColumnConfig } from '../connection';
|
|
4
|
-
import {
|
|
4
|
+
import { LocalisedConfig } from '../../locale';
|
|
5
5
|
type DataViewInterface = Component;
|
|
6
6
|
interface DataViewConfig extends ComponentConfig {
|
|
7
7
|
connectionId: string | undefined;
|
|
@@ -10,7 +10,7 @@ interface DataViewConfig extends ComponentConfig {
|
|
|
10
10
|
contentAuditConfig: ContentAuditConfig | undefined;
|
|
11
11
|
relationshipsAuditConfig: RelationshipsAuditConfig | undefined;
|
|
12
12
|
}
|
|
13
|
-
type DataViewLocalisedConfig =
|
|
13
|
+
type DataViewLocalisedConfig = LocalisedConfig<DataViewConfig>;
|
|
14
14
|
interface PreviewConfig {
|
|
15
15
|
asAt: number;
|
|
16
16
|
commentMarkId?: string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentConfig } from '..';
|
|
2
|
-
import {
|
|
2
|
+
import { LocalisedConfig } from '../../locale';
|
|
3
3
|
export interface DimensionConfig extends ComponentConfig {
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
}
|
|
6
|
-
export type DimensionLocalisedConfig =
|
|
6
|
+
export type DimensionLocalisedConfig = LocalisedConfig<DimensionConfig>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentConfig } from '..';
|
|
2
|
-
import {
|
|
2
|
+
import { LocalisedConfig } from '../../locale';
|
|
3
3
|
export interface EventQueryConfig extends ComponentConfig {
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
}
|
|
6
|
-
export type EventQueryLocalisedConfig =
|
|
6
|
+
export type EventQueryLocalisedConfig = LocalisedConfig<EventQueryConfig>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { componentConfigSchema, componentReferenceSchema, componentStatusColorIdSchema, componentStatusConfigSchema } from './componentConfig.schema';
|
|
3
|
-
import { LocaleId,
|
|
3
|
+
import { LocaleId, LocalisedConfig } from '../locale';
|
|
4
4
|
export { componentConfigSchema } from './componentConfig.schema';
|
|
5
5
|
export interface Component {
|
|
6
6
|
readonly config: ComponentConfig;
|
|
7
7
|
}
|
|
8
8
|
export type ComponentConfig = InferOutput<typeof componentConfigSchema>;
|
|
9
|
-
export type ComponentLocalisedConfig =
|
|
9
|
+
export type ComponentLocalisedConfig = LocalisedConfig<ComponentConfig>;
|
|
10
10
|
export type ComponentReference = InferOutput<typeof componentReferenceSchema>;
|
|
11
11
|
export type ComponentStatus = InferOutput<typeof componentStatusConfigSchema>;
|
|
12
12
|
export type ComponentStatusColorId = InferOutput<typeof componentStatusColorIdSchema>;
|
|
@@ -4,7 +4,7 @@ import { ToolConfig } from '../tool';
|
|
|
4
4
|
import { ConnectionDescriptionConfig, ConnectionNodeConfig } from '../../connection';
|
|
5
5
|
import { connectorCategoryConfigSchema, connectorConfigSchema, connectorOperationNameSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
6
6
|
import { ContentAuditConfig, ParsingRecord, PreviewConfig, ValueDelimiterId } from '../../dataView';
|
|
7
|
-
import {
|
|
7
|
+
import { LocalisedConfig } from '../../../locale';
|
|
8
8
|
import { EngineConnectorActionOptions, EngineUtilities } from '../../../engine';
|
|
9
9
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
10
10
|
export interface ConnectorInterface extends Component {
|
|
@@ -28,7 +28,7 @@ export interface ConnectorInterface extends Component {
|
|
|
28
28
|
}
|
|
29
29
|
export type ConnectorConstructor = new (engineUtilities: EngineUtilities, toolConfigs: ToolConfig[]) => ConnectorInterface;
|
|
30
30
|
export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
31
|
-
export type ConnectorLocalisedConfig =
|
|
31
|
+
export type ConnectorLocalisedConfig = LocalisedConfig<ConnectorConfig>;
|
|
32
32
|
type ConnectorCategoryConfig = InferOutput<typeof connectorCategoryConfigSchema>;
|
|
33
33
|
type ConnectorCategoryLocalisedConfig = Omit<ConnectorCategoryConfig, 'label'> & {
|
|
34
34
|
label: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { EngineContextActionOptions } from '../../../engine';
|
|
3
|
-
import {
|
|
3
|
+
import { LocalisedConfig } from '../../../locale';
|
|
4
4
|
import { Component, ComponentConfig, ComponentReference } from '../..';
|
|
5
5
|
import { contextConfigSchema, contextOperationNameSchema } from './contextConfig.schema';
|
|
6
6
|
export { contextConfigSchema } from './contextConfig.schema';
|
|
@@ -9,13 +9,13 @@ export interface ContextInterface extends Component {
|
|
|
9
9
|
listContextFocuses?(context: ContextInterface, options?: ListContextOptions): Promise<ListContextResult>;
|
|
10
10
|
}
|
|
11
11
|
export type ContextConfig = InferOutput<typeof contextConfigSchema>;
|
|
12
|
-
export type ContextLocalisedConfig =
|
|
12
|
+
export type ContextLocalisedConfig = LocalisedConfig<ContextConfig>;
|
|
13
13
|
export type ContextOperationName = InferOutput<typeof contextOperationNameSchema>;
|
|
14
14
|
export interface ContextModelGroupConfig extends ComponentConfig {
|
|
15
15
|
modelRefs: ComponentReference[];
|
|
16
16
|
order: number;
|
|
17
17
|
}
|
|
18
|
-
export type ContextModelGroupLocalisedConfig =
|
|
18
|
+
export type ContextModelGroupLocalisedConfig = LocalisedConfig<ContextModelGroupConfig>;
|
|
19
19
|
export interface ListContextOptions extends EngineContextActionOptions {
|
|
20
20
|
placeholder: unknown;
|
|
21
21
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { LocaleLabel,
|
|
1
|
+
import { LocaleLabel, LocalisedConfig } from '../../../../../locale';
|
|
2
2
|
export interface ContextModelDimensionConfig {
|
|
3
3
|
id: string;
|
|
4
4
|
label: LocaleLabel;
|
|
5
5
|
hierarchies: ContextModelDimensionHierarchyConfig[];
|
|
6
6
|
}
|
|
7
|
-
export type ContextModelDimensionLocalisedConfig =
|
|
7
|
+
export type ContextModelDimensionLocalisedConfig = LocalisedConfig<ContextModelDimensionConfig>;
|
|
8
8
|
export interface ContextModelDimensionHierarchyConfig {
|
|
9
9
|
id: string;
|
|
10
10
|
label: LocaleLabel;
|
|
11
11
|
}
|
|
12
|
-
export type ContextModelDimensionHierarchyLocalisedConfig =
|
|
12
|
+
export type ContextModelDimensionHierarchyLocalisedConfig = LocalisedConfig<ContextModelDimensionHierarchyConfig>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LocaleLabel,
|
|
1
|
+
import { LocaleLabel, LocalisedConfig } from '../../../../../../locale';
|
|
2
2
|
export interface ContextModelEntityDataItemConfig {
|
|
3
3
|
id: string;
|
|
4
4
|
label: LocaleLabel;
|
|
5
5
|
}
|
|
6
|
-
export type ContextModelEntityDataItemLocalisedConfig =
|
|
6
|
+
export type ContextModelEntityDataItemLocalisedConfig = LocalisedConfig<ContextModelEntityDataItemConfig>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LocalisedConfig } from '../../../../../../locale';
|
|
2
2
|
export interface ContextModelEntityEventConfig {
|
|
3
3
|
id: string;
|
|
4
4
|
labelAction: Record<string, string>;
|
|
5
5
|
labelState: Record<string, string>;
|
|
6
6
|
}
|
|
7
|
-
export type ContextModelEntityEventLocalisedConfig =
|
|
7
|
+
export type ContextModelEntityEventLocalisedConfig = LocalisedConfig<ContextModelEntityEventConfig>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ContextModelEntityDataItemConfig } from './dataItem';
|
|
2
2
|
import { ContextModelEntityEventConfig } from './event';
|
|
3
3
|
import { ContextModelEntityPrimaryMeasureConfig } from './primaryMeasure';
|
|
4
|
-
import { LocaleLabel,
|
|
4
|
+
import { LocaleLabel, LocalisedConfig } from '../../../../../locale';
|
|
5
5
|
export interface ContextModelEntityConfig {
|
|
6
6
|
id: string;
|
|
7
7
|
label: LocaleLabel;
|
|
@@ -10,4 +10,4 @@ export interface ContextModelEntityConfig {
|
|
|
10
10
|
events: ContextModelEntityEventConfig[];
|
|
11
11
|
primaryMeasures: ContextModelEntityPrimaryMeasureConfig[];
|
|
12
12
|
}
|
|
13
|
-
export type ContextModelEntityLocalisedConfig =
|
|
13
|
+
export type ContextModelEntityLocalisedConfig = LocalisedConfig<ContextModelEntityConfig>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LocaleLabel,
|
|
1
|
+
import { LocaleLabel, LocalisedConfig } from '../../../../../../locale';
|
|
2
2
|
export interface ContextModelEntityPrimaryMeasureConfig {
|
|
3
3
|
id: string;
|
|
4
4
|
label: LocaleLabel;
|
|
5
5
|
}
|
|
6
|
-
export type ContextModelEntityPrimaryMeasureLocalisedConfig =
|
|
6
|
+
export type ContextModelEntityPrimaryMeasureLocalisedConfig = LocalisedConfig<ContextModelEntityPrimaryMeasureConfig>;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { ComponentConfig, ComponentReference } from '../../..';
|
|
2
|
-
import { LocaleLabel,
|
|
2
|
+
import { LocaleLabel, LocalisedConfig } from '../../../../locale';
|
|
3
3
|
export interface ContextModelConfig extends ComponentConfig {
|
|
4
4
|
diagramURL?: string;
|
|
5
5
|
dimensions: ContextModelDimensionGroupConfig[];
|
|
6
6
|
entities: ContextModelEntityGroupConfig[];
|
|
7
7
|
secondaryMeasures: ContextModelSecondaryMeasureGroupConfig[];
|
|
8
8
|
}
|
|
9
|
-
export type ContextModelLocalisedConfig =
|
|
9
|
+
export type ContextModelLocalisedConfig = LocalisedConfig<ContextModelConfig>;
|
|
10
10
|
export interface ContextModelDimensionGroupConfig {
|
|
11
11
|
id: string;
|
|
12
12
|
label: LocaleLabel;
|
|
13
13
|
description: LocaleLabel;
|
|
14
14
|
dimensionRefs: ComponentReference[];
|
|
15
15
|
}
|
|
16
|
-
export type ContextModelDimensionGroupLocalisedConfig =
|
|
16
|
+
export type ContextModelDimensionGroupLocalisedConfig = LocalisedConfig<ContextModelDimensionGroupConfig>;
|
|
17
17
|
export interface ContextModelEntityGroupConfig {
|
|
18
18
|
id: string;
|
|
19
19
|
label: LocaleLabel;
|
|
20
20
|
description?: Record<string, unknown>;
|
|
21
21
|
entityRefs: ComponentReference[];
|
|
22
22
|
}
|
|
23
|
-
export type ContextModelEntityGroupLocalisedConfig =
|
|
23
|
+
export type ContextModelEntityGroupLocalisedConfig = LocalisedConfig<ContextModelEntityGroupConfig>;
|
|
24
24
|
export interface ContextModelSecondaryMeasureGroupConfig {
|
|
25
25
|
id: string;
|
|
26
26
|
label: LocaleLabel;
|
|
27
27
|
description?: Record<string, unknown>;
|
|
28
28
|
secondaryMeasureRefs: ComponentReference[];
|
|
29
29
|
}
|
|
30
|
-
export type ContextModelSecondaryMeasureGroupLocalisedConfig =
|
|
30
|
+
export type ContextModelSecondaryMeasureGroupLocalisedConfig = LocalisedConfig<ContextModelSecondaryMeasureGroupConfig>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LocaleLabel,
|
|
1
|
+
import { LocaleLabel, LocalisedConfig } from '../../../../../locale';
|
|
2
2
|
export interface ContextModelSecondaryMeasureConfig {
|
|
3
3
|
id: string;
|
|
4
4
|
label: LocaleLabel;
|
|
5
5
|
}
|
|
6
|
-
export type ContextModelSecondaryMeasureLocalisedConfig =
|
|
6
|
+
export type ContextModelSecondaryMeasureLocalisedConfig = LocalisedConfig<ContextModelSecondaryMeasureConfig>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
|
-
import {
|
|
2
|
+
import { LocalisedConfig } from '../../../locale';
|
|
3
3
|
import { ModuleConfig } from '..';
|
|
4
4
|
import { presenterOperationNameSchema } from './presenterConfig.schema';
|
|
5
5
|
import { Component, ComponentReference } from '../..';
|
|
@@ -15,5 +15,5 @@ export interface PresenterConfig extends ModuleConfig {
|
|
|
15
15
|
operations: PresenterOperationName[];
|
|
16
16
|
typeId: 'presenter';
|
|
17
17
|
}
|
|
18
|
-
export type PresenterLocalisedConfig =
|
|
18
|
+
export type PresenterLocalisedConfig = LocalisedConfig<PresenterConfig>;
|
|
19
19
|
export type PresenterOperationName = InferOutput<typeof presenterOperationNameSchema>;
|
|
@@ -2,10 +2,15 @@ export type FlagId = 'es' | 'gb';
|
|
|
2
2
|
export type LocaleId = 'en' | 'es';
|
|
3
3
|
export type LocaleLabel = Partial<Record<LocaleId, string>>;
|
|
4
4
|
export type LocaleLabelMap = ReadonlyMap<string, string>;
|
|
5
|
-
export type
|
|
5
|
+
export type LocalisedConfig<T> = Omit<T, 'label' | 'description'> & {
|
|
6
6
|
label: string;
|
|
7
7
|
description: string;
|
|
8
8
|
};
|
|
9
|
+
interface UnlocalisedConfig {
|
|
10
|
+
id: string;
|
|
11
|
+
label: LocaleLabel;
|
|
12
|
+
description: LocaleLabel;
|
|
13
|
+
}
|
|
9
14
|
export declare const DEFAULT_LOCALE_ID: LocaleId;
|
|
10
15
|
export declare const SUPPORTED_LANGUAGES: {
|
|
11
16
|
id: LocaleId;
|
|
@@ -13,9 +18,7 @@ export declare const SUPPORTED_LANGUAGES: {
|
|
|
13
18
|
label: string;
|
|
14
19
|
}[];
|
|
15
20
|
export declare function createLabelMap(labels: Record<string, string>): LocaleLabelMap;
|
|
16
|
-
export declare function
|
|
17
|
-
|
|
18
|
-
label: LocaleLabel;
|
|
19
|
-
description: LocaleLabel;
|
|
20
|
-
}[], localeId: LocaleId): T[];
|
|
21
|
+
export declare function localiseConfig<T extends UnlocalisedConfig>(config: T, localeId: LocaleId): T;
|
|
22
|
+
export declare function localiseConfigs<T extends UnlocalisedConfig>(configs: T[], localeId: LocaleId): T[];
|
|
21
23
|
export declare function resolveLabel(labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: LocaleId): string | undefined;
|
|
24
|
+
export {};
|
package/package.json
CHANGED