@datapos/datapos-shared 0.3.154 → 0.3.157
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared composables, constants, interfaces, errors
|
|
2
|
+
* Shared composables, constants, types/interfaces, errors and utilities.
|
|
3
3
|
*/
|
|
4
4
|
export type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
|
|
5
5
|
export type LocalisedString = Record<LocaleCode, string>;
|
|
@@ -12,6 +12,7 @@ export type { EngineModuleConfig } from './module';
|
|
|
12
12
|
export type { InformerModuleConfig, InformerModuleOperation } from './module';
|
|
13
13
|
export type { PresenterModuleConfig, PresenterModuleOperation } from './module';
|
|
14
14
|
export { CONNECTOR_DESTINATION_OPERATIONS, CONNECTOR_SOURCE_OPERATIONS } from './module';
|
|
15
|
+
export * from './module/configSchema';
|
|
15
16
|
export type { ComponentConfig, ComponentRef, ComponentStatus, ComponentStatusId, ComponentTypeId } from './component';
|
|
16
17
|
export type { AuditContentResult, AuditContentSettings } from './component/connector';
|
|
17
18
|
export type { Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation, ConnectorOperationSettings, ConnectorLocalisedConfig, ConnectorTools } from './component/connector';
|
|
@@ -52,12 +53,12 @@ export interface ContextOperationSettings {
|
|
|
52
53
|
sessionAccessToken?: string;
|
|
53
54
|
}
|
|
54
55
|
export type { Timestamp } from './timestamp';
|
|
55
|
-
export declare const DEFAULT_LOCALE_CODE: LocaleCode;
|
|
56
|
-
export { DefaultTimestamp } from './timestamp';
|
|
57
|
-
export { presentationViewTypeMap } from './component/presenter/presentation';
|
|
58
56
|
export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscapeJS';
|
|
59
57
|
export { useDataTable } from './composables/useDataTable';
|
|
60
58
|
export { type HighchartsView, useHighcharts } from './composables/useHighcharts';
|
|
59
|
+
export declare const DEFAULT_LOCALE_CODE: LocaleCode;
|
|
60
|
+
export { DefaultTimestamp } from './timestamp';
|
|
61
|
+
export { presentationViewTypeMap } from './component/presenter/presentation';
|
|
61
62
|
export { APIError, ApplicationError, EngineError, FetchError, OperationalError, VueError, WindowRuntimeError, WindowPromiseRejectionError } from './errors';
|
|
62
63
|
export { buildFetchError, concatenateSerialisedErrorMessages, normalizeToError, serialiseError } from './errors';
|
|
63
64
|
export { convertMillisecondsToTimestamp, getCurrentTimestamp } from './timestamp';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const localeCodeSchema: z.ZodEnum<{
|
|
3
|
+
"en-au": "en-au";
|
|
4
|
+
"en-gb": "en-gb";
|
|
5
|
+
"en-us": "en-us";
|
|
6
|
+
"es-es": "es-es";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const moduleTypeIdSchema: z.ZodEnum<{
|
|
9
|
+
connector: "connector";
|
|
10
|
+
context: "context";
|
|
11
|
+
presenter: "presenter";
|
|
12
|
+
informer: "informer";
|
|
13
|
+
app: "app";
|
|
14
|
+
engine: "engine";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const partialLocalisedStringSchema: z.ZodObject<{
|
|
17
|
+
'en-au': z.ZodOptional<z.ZodString>;
|
|
18
|
+
'en-gb': z.ZodOptional<z.ZodString>;
|
|
19
|
+
'en-us': z.ZodOptional<z.ZodString>;
|
|
20
|
+
'es-es': z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const moduleConfigSchema: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
label: z.ZodObject<{
|
|
25
|
+
'en-au': z.ZodOptional<z.ZodString>;
|
|
26
|
+
'en-gb': z.ZodOptional<z.ZodString>;
|
|
27
|
+
'en-us': z.ZodOptional<z.ZodString>;
|
|
28
|
+
'es-es': z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
description: z.ZodObject<{
|
|
31
|
+
'en-au': z.ZodOptional<z.ZodString>;
|
|
32
|
+
'en-gb': z.ZodOptional<z.ZodString>;
|
|
33
|
+
'en-us': z.ZodOptional<z.ZodString>;
|
|
34
|
+
'es-es': z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
statusId: z.ZodUnknown;
|
|
37
|
+
typeId: z.ZodEnum<{
|
|
38
|
+
connector: "connector";
|
|
39
|
+
context: "context";
|
|
40
|
+
presenter: "presenter";
|
|
41
|
+
informer: "informer";
|
|
42
|
+
app: "app";
|
|
43
|
+
engine: "engine";
|
|
44
|
+
}>;
|
|
45
|
+
version: z.ZodString;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type ModuleConfigZ = z.infer<typeof moduleConfigSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.157",
|
|
4
4
|
"description": "A TypeScript library containing common declarations and utilities used across other Data Positioning repositories.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@datapos/datapos-development": "^0.3.
|
|
28
|
+
"@datapos/datapos-development": "^0.3.64",
|
|
29
29
|
"@types/markdown-it": "^14.1.2",
|
|
30
30
|
"@types/node": "^24.10.0",
|
|
31
31
|
"@typescript-eslint/eslint-plugin": "^8.46.3",
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"retire": "^5.3.0",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"vite": "^7.2.2",
|
|
48
|
-
"vite-plugin-dts": "^4.5.4"
|
|
48
|
+
"vite-plugin-dts": "^4.5.4",
|
|
49
|
+
"zod": "^4.1.12"
|
|
49
50
|
},
|
|
50
51
|
"scripts": {
|
|
51
52
|
"audit": "npm audit",
|