@dpuse/dpuse-shared 0.3.816 → 0.3.821
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 +45 -9
- package/dist/{componentConfig.schema-Dxqinpxy.js → componentConfig.schema-DT3mO5rS.js} +80 -64
- package/dist/componentConfig.schema-DT3mO5rS.js.map +1 -0
- package/dist/dpuse-shared-component.es.js +2 -2
- package/dist/dpuse-shared-component.es.js.map +1 -0
- package/dist/dpuse-shared-componentDataView.es.js +1 -1
- package/dist/dpuse-shared-componentDataView.es.js.map +1 -0
- package/dist/dpuse-shared-componentModuleConnector.es.js +17 -17
- package/dist/dpuse-shared-componentModuleConnector.es.js.map +1 -0
- package/dist/dpuse-shared-componentModuleCookbook.es.js +5 -5
- package/dist/dpuse-shared-componentModuleCookbook.es.js.map +1 -0
- package/dist/dpuse-shared-componentModulePresenter.es.js +6 -6
- package/dist/dpuse-shared-componentModulePresenter.es.js.map +1 -0
- package/dist/dpuse-shared-componentModuleTool.es.js.map +1 -0
- package/dist/dpuse-shared-componentRecipe.es.js.map +1 -0
- package/dist/dpuse-shared-encoding.es.js +229 -121
- package/dist/dpuse-shared-encoding.es.js.map +1 -0
- package/dist/dpuse-shared-errors.es.js.map +1 -0
- package/dist/dpuse-shared-locale.es.js +8 -24
- package/dist/dpuse-shared-locale.es.js.map +1 -0
- package/dist/dpuse-shared-utilities.es.js +4 -11
- package/dist/dpuse-shared-utilities.es.js.map +1 -0
- package/dist/label-DexpXrnC.js +19 -0
- package/dist/label-DexpXrnC.js.map +1 -0
- package/dist/moduleConfig.schema-aYmFWSrn.js +22 -0
- package/dist/moduleConfig.schema-aYmFWSrn.js.map +1 -0
- package/dist/types/src/baseConfig.schema.d.ts +2 -2
- package/dist/types/src/component/componentConfig.schema.d.ts +13 -14
- package/dist/types/src/component/connection/index.d.ts +1 -1
- package/dist/types/src/component/context/model/dimension/hierarchy/index.d.ts +1 -1
- package/dist/types/src/component/context/model/entity/dataItem/index.d.ts +1 -1
- package/dist/types/src/component/context/model/entity/event/index.d.ts +1 -1
- package/dist/types/src/component/context/model/entity/index.d.ts +1 -1
- package/dist/types/src/component/context/model/entity/primaryMeasure/index.d.ts +1 -1
- package/dist/types/src/component/index.d.ts +3 -3
- package/dist/types/src/component/module/connector/connectorConfig.schema.d.ts +14 -14
- package/dist/types/src/component/module/cookbook/cookbookConfig.schema.d.ts +7 -7
- package/dist/types/src/component/module/engine/index.d.ts +3 -2
- package/dist/types/src/component/module/moduleConfig.schema.d.ts +7 -7
- package/dist/types/src/component/module/presenter/presenterConfig.schema.d.ts +7 -7
- package/dist/types/src/encoding/index.d.ts +22 -6
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/locale/index.d.ts +2 -14
- package/dist/types/src/locale/label.d.ts +13 -0
- package/dist/types/src/locale/locale.schema.d.ts +3 -3
- package/package.json +14 -8
- package/dist/moduleConfig.schema-B_EBeUaj.js +0 -22
- package/dist/types/eslint.config.d.ts +0 -3
- package/dist/types/tests/errors/index.test.d.ts +0 -1
- package/dist/types/tests/locale/index.test.d.ts +0 -1
- package/dist/types/tests/schema/index.test.d.ts +0 -1
- package/dist/types/tests/utilities/index.test.d.ts +0 -1
- package/dist/types/vite.config.d.ts +0 -2
- package/dist/types/vitest.config.d.ts +0 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export declare const presenterActionNameSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"list", undefined>, import('valibot').LiteralSchema<"render", undefined>, import('valibot').LiteralSchema<"setColorMode", undefined>], undefined>;
|
|
2
|
-
export declare const presenterConfigSchema: import('valibot').
|
|
2
|
+
export declare const presenterConfigSchema: import('valibot').StrictObjectSchema<{
|
|
3
3
|
readonly typeId: import('valibot').LiteralSchema<"presenter", undefined>;
|
|
4
4
|
readonly actionNames: import('valibot').ArraySchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"list", undefined>, import('valibot').LiteralSchema<"render", undefined>, import('valibot').LiteralSchema<"setColorMode", undefined>], undefined>, undefined>;
|
|
5
|
-
readonly presentations: import('valibot').ArraySchema<import('valibot').
|
|
5
|
+
readonly presentations: import('valibot').ArraySchema<import('valibot').StrictObjectSchema<{
|
|
6
6
|
readonly order: import('valibot').NumberSchema<undefined>;
|
|
7
7
|
readonly path: import('valibot').StringSchema<undefined>;
|
|
8
8
|
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<"contextArea", undefined>, import('valibot').LiteralSchema<"contextModel", undefined>, import('valibot').LiteralSchema<"contextModelDimension", undefined>, import('valibot').LiteralSchema<"contextModelDimensionHierarchy", undefined>, import('valibot').LiteralSchema<"contextModelEntity", undefined>, import('valibot').LiteralSchema<"contextModelEntityDataItem", undefined>, import('valibot').LiteralSchema<"contextModelEntityEvent", undefined>, import('valibot').LiteralSchema<"contextModelEntityPrimaryMeasure", undefined>, import('valibot').LiteralSchema<"contextModelSecondaryMeasure", undefined>, import('valibot').LiteralSchema<"cookbook", undefined>, import('valibot').LiteralSchema<"cookbookRecipe", undefined>, import('valibot').LiteralSchema<"dataView", 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>;
|
|
9
9
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
10
|
-
readonly label: import('valibot').
|
|
10
|
+
readonly label: import('valibot').StrictObjectSchema<{
|
|
11
11
|
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
12
12
|
readonly es: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
13
13
|
}, undefined>;
|
|
14
|
-
readonly description: import('valibot').
|
|
14
|
+
readonly description: import('valibot').StrictObjectSchema<{
|
|
15
15
|
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
16
16
|
readonly es: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
17
17
|
}, undefined>;
|
|
@@ -24,17 +24,17 @@ export declare const presenterConfigSchema: import('valibot').ObjectSchema<{
|
|
|
24
24
|
readonly version: import('valibot').StringSchema<undefined>;
|
|
25
25
|
readonly firstCreatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
26
26
|
readonly lastUpdatedAt: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
27
|
-
readonly status: import('valibot').NullableSchema<import('valibot').
|
|
27
|
+
readonly status: import('valibot').NullableSchema<import('valibot').StrictObjectSchema<{
|
|
28
28
|
readonly color: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"danger", undefined>, import('valibot').LiteralSchema<"success", undefined>, import('valibot').LiteralSchema<"warning", undefined>], undefined>;
|
|
29
29
|
readonly label: import('valibot').StringSchema<undefined>;
|
|
30
30
|
}, undefined>, undefined>;
|
|
31
31
|
readonly statusId: import('valibot').NullableSchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"alpha", undefined>, import('valibot').LiteralSchema<"beta", undefined>, import('valibot').LiteralSchema<"releaseCandidate", undefined>, import('valibot').LiteralSchema<"generalAvailability", undefined>], undefined>, undefined>;
|
|
32
32
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
33
|
-
readonly label: import('valibot').
|
|
33
|
+
readonly label: import('valibot').StrictObjectSchema<{
|
|
34
34
|
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
35
35
|
readonly es: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
36
36
|
}, undefined>;
|
|
37
|
-
readonly description: import('valibot').
|
|
37
|
+
readonly description: import('valibot').StrictObjectSchema<{
|
|
38
38
|
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
39
39
|
readonly es: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
40
40
|
}, undefined>;
|
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { LocaleId, LocaleLabel } from '../locale/label';
|
|
2
|
+
import { default as encodingGroupConfigData } from './encodingGroupConfigs.json';
|
|
3
|
+
import { default as encodingTypeConfigData } from './encodingTypeConfigs.json';
|
|
4
|
+
export type EncodingGroupId = keyof typeof encodingGroupConfigData;
|
|
5
|
+
export type EncodingTypeId = keyof typeof encodingTypeConfigData;
|
|
6
|
+
export interface EncodingGroupConfig {
|
|
7
|
+
id: EncodingGroupId;
|
|
8
|
+
label: LocaleLabel;
|
|
4
9
|
}
|
|
5
10
|
export interface EncodingTypeConfig {
|
|
6
|
-
id:
|
|
11
|
+
id: EncodingTypeId;
|
|
12
|
+
groupId: EncodingGroupId | null;
|
|
13
|
+
isDetectable: boolean;
|
|
14
|
+
isDecodable: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface EncodingTypeConfigLocalised {
|
|
17
|
+
id: EncodingTypeId;
|
|
7
18
|
groupLabel: string;
|
|
8
19
|
label: string;
|
|
9
20
|
isDetectable: boolean;
|
|
10
21
|
isDecodable: boolean;
|
|
11
22
|
}
|
|
12
|
-
export
|
|
13
|
-
|
|
23
|
+
export interface EncodingDetectionConfig {
|
|
24
|
+
id: EncodingTypeId;
|
|
25
|
+
confidenceLevel: number | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare const ENCODING_GROUP_CONFIG_MAP: Record<EncodingGroupId, EncodingGroupConfig>;
|
|
28
|
+
export declare const ENCODING_TYPE_CONFIG_MAP: Record<string, EncodingTypeConfig>;
|
|
29
|
+
export declare function getEncodingTypeConfigs(localeId?: LocaleId): EncodingTypeConfigLocalised[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { InferOutput,
|
|
1
|
+
import { InferOutput, strictObject } from 'valibot';
|
|
2
2
|
import { baseConfigSchema } from './baseConfig.schema';
|
|
3
|
-
export type BaseConfig = InferOutput<ReturnType<typeof
|
|
3
|
+
export type BaseConfig = InferOutput<ReturnType<typeof strictObject<typeof baseConfigSchema>>>;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export type LocaleLabel = Partial<Record<LocaleId, string>>;
|
|
4
|
-
export type LocaleDescription = Partial<Record<LocaleId, string>>;
|
|
5
|
-
export type LocaleLabelMap = ReadonlyMap<string, string>;
|
|
1
|
+
import { LocaleDescription, LocaleId, LocaleLabel } from './label';
|
|
2
|
+
export * from './label';
|
|
6
3
|
export type LocalisedConfig<T> = Omit<T, 'label' | 'description' | 'verb'> & {
|
|
7
4
|
label: string;
|
|
8
5
|
description: string;
|
|
@@ -23,15 +20,6 @@ interface UnlocalisedReference {
|
|
|
23
20
|
label: LocaleLabel;
|
|
24
21
|
description: LocaleDescription;
|
|
25
22
|
}
|
|
26
|
-
export declare const DEFAULT_LOCALE_ID: LocaleId;
|
|
27
|
-
export declare const SUPPORTED_LANGUAGES: {
|
|
28
|
-
id: LocaleId;
|
|
29
|
-
flag: FlagId;
|
|
30
|
-
label: string;
|
|
31
|
-
}[];
|
|
32
|
-
export declare function createLabelMap(labels: Record<string, string>): LocaleLabelMap;
|
|
33
23
|
export declare function localiseConfig<T extends UnlocalisedConfig>(config: T, localeId: LocaleId): LocalisedConfig<T>;
|
|
34
24
|
export declare function localiseConfigs<T extends UnlocalisedConfig>(configs: T[], localeId: LocaleId, isResultSorted?: boolean): LocalisedConfig<T>[];
|
|
35
25
|
export declare function localiseReference<T extends UnlocalisedReference>(reference: T, localeId: LocaleId): LocalisedReference<T>;
|
|
36
|
-
export declare function resolveLabel(labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: LocaleId): string | undefined;
|
|
37
|
-
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type FlagId = 'es' | 'gb';
|
|
2
|
+
export type LocaleId = 'en' | 'es';
|
|
3
|
+
export type LocaleLabel = Partial<Record<LocaleId, string>>;
|
|
4
|
+
export type LocaleDescription = Partial<Record<LocaleId, string>>;
|
|
5
|
+
export type LocaleLabelMap = ReadonlyMap<string, string>;
|
|
6
|
+
export declare const DEFAULT_LOCALE_ID: LocaleId;
|
|
7
|
+
export declare const SUPPORTED_LANGUAGES: {
|
|
8
|
+
id: LocaleId;
|
|
9
|
+
flag: FlagId;
|
|
10
|
+
label: string;
|
|
11
|
+
}[];
|
|
12
|
+
export declare function createLabelMap(labels: Record<string, string>): LocaleLabelMap;
|
|
13
|
+
export declare function resolveLabel(labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: LocaleId): string | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare const localeLabelSchema: import('valibot').
|
|
1
|
+
export declare const localeLabelSchema: import('valibot').StrictObjectSchema<{
|
|
2
2
|
readonly en: import('valibot').StringSchema<undefined>;
|
|
3
3
|
readonly es: import('valibot').StringSchema<undefined>;
|
|
4
4
|
}, undefined>;
|
|
5
|
-
export declare const partialLocaleDescriptionSchema: import('valibot').
|
|
5
|
+
export declare const partialLocaleDescriptionSchema: import('valibot').StrictObjectSchema<{
|
|
6
6
|
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
7
7
|
readonly es: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
8
8
|
}, undefined>;
|
|
9
|
-
export declare const partialLocaleLabelSchema: import('valibot').
|
|
9
|
+
export declare const partialLocaleLabelSchema: import('valibot').StrictObjectSchema<{
|
|
10
10
|
readonly en: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
11
11
|
readonly es: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
12
12
|
}, undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpuse/dpuse-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.821",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Common constants, types and utilities used across all DPUse projects.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -99,11 +99,11 @@
|
|
|
99
99
|
"types": "./dist/types/src/component/module/tool/index.d.ts"
|
|
100
100
|
},
|
|
101
101
|
"./component/presentation": {
|
|
102
|
-
"import": "./dist/dpuse-shared-
|
|
102
|
+
"import": "./dist/dpuse-shared-componentPresentation.es.js",
|
|
103
103
|
"types": "./dist/types/src/component/presentation/index.d.ts"
|
|
104
104
|
},
|
|
105
105
|
"./component/recipe": {
|
|
106
|
-
"import": "./dist/dpuse-shared-
|
|
106
|
+
"import": "./dist/dpuse-shared-componentRecipe.es.js",
|
|
107
107
|
"types": "./dist/types/src/component/recipe/index.d.ts"
|
|
108
108
|
},
|
|
109
109
|
"./encoding": {
|
|
@@ -157,21 +157,27 @@
|
|
|
157
157
|
"documentGovernance": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentGovernance())\"",
|
|
158
158
|
"documentOpening": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentOpening())\"",
|
|
159
159
|
"format": "node -e \"import('@dpuse/dpuse-development').then(m => m.formatCode())\"",
|
|
160
|
+
"health": "npm run test:coverage && fallow --coverage coverage/coverage-final.json",
|
|
160
161
|
"lint": "node -e \"import('@dpuse/dpuse-development').then(m => m.lintCode())\"",
|
|
161
162
|
"release": "npm run sync && gh release create \"v$(npm pkg get version | tr -d '\"')\" --target \"$(git rev-parse HEAD)\" --generate-notes --latest",
|
|
162
163
|
"sync": "node -e \"import('@dpuse/dpuse-development').then(m => m.syncProjectWithGitHub())\"",
|
|
163
|
-
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\""
|
|
164
|
+
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\"",
|
|
165
|
+
"test:coverage": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject(['unit'], true))\""
|
|
166
|
+
},
|
|
167
|
+
"dependencies": {
|
|
168
|
+
"file-type": "^22.1.1",
|
|
169
|
+
"valibot": "^1.5.0"
|
|
164
170
|
},
|
|
165
171
|
"devDependencies": {
|
|
166
|
-
"@dpuse/dpuse-development": "^0.3.
|
|
167
|
-
"@dpuse/eslint-config-dpuse": "^1.0.
|
|
172
|
+
"@dpuse/dpuse-development": "^0.3.722",
|
|
173
|
+
"@dpuse/eslint-config-dpuse": "^1.0.121",
|
|
168
174
|
"@types/node": "^26.6.2",
|
|
175
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
169
176
|
"eslint": "^10.11.0",
|
|
170
|
-
"
|
|
177
|
+
"fallow": "^3.28.0",
|
|
171
178
|
"prettier": "^3.9.9",
|
|
172
179
|
"sonda": "^0.14.0",
|
|
173
180
|
"typescript": "^6.0.3",
|
|
174
|
-
"valibot": "^1.5.0",
|
|
175
181
|
"vite": "^8.3.0",
|
|
176
182
|
"vite-plugin-dts": "^5.1.1",
|
|
177
183
|
"vitest": "^5.0.1"
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { d as e, i as t, l as n, m as r, t as i } from "./componentConfig.schema-Dxqinpxy.js";
|
|
2
|
-
//#region src/component/module/moduleConfig.schema.ts
|
|
3
|
-
var a = t([
|
|
4
|
-
"app",
|
|
5
|
-
"engine",
|
|
6
|
-
"connector",
|
|
7
|
-
"cookbook",
|
|
8
|
-
"presenter",
|
|
9
|
-
"tool"
|
|
10
|
-
]), o = {
|
|
11
|
-
...i,
|
|
12
|
-
vendorAccountURL: n(r()),
|
|
13
|
-
vendorDocumentationURL: n(r()),
|
|
14
|
-
vendorHomeURL: n(r()),
|
|
15
|
-
version: r()
|
|
16
|
-
};
|
|
17
|
-
e({
|
|
18
|
-
...o,
|
|
19
|
-
typeId: a
|
|
20
|
-
});
|
|
21
|
-
//#endregion
|
|
22
|
-
export { o as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|