@datapos/datapos-shared 0.3.307 → 0.3.311
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 +9 -7
- package/dist/types/src/component/context/index.d.ts +135 -0
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Data Positioning Shared Library
|
|
2
2
|
|
|
3
|
-
<span><!-- OWASP_BADGES_START -->
|
|
3
|
+
<span><!-- OWASP_BADGES_START -->
|
|
4
|
+
[](https://data-positioning.github.io/datapos-shared/dependency-check-reports/dependency-check-report.html)
|
|
5
|
+
<!-- OWASP_BADGES_END --></span>
|
|
6
|
+
|
|
4
7
|
[](https://www.npmjs.com/package/@datapos/datapos-shared)
|
|
5
8
|
[](./LICENSE)
|
|
6
9
|
|
|
@@ -119,12 +122,11 @@ The following table lists top-level production and peer dependencies. All these
|
|
|
119
122
|
The following table lists top-level production and peer dependencies. All these dependencies (including transitive ones) have been recursively verified to use Apache-2.0, BSD-2-Clause, CC0-1.0, or MIT—commercially friendly licenses with minimal restrictions. Developers cloning this repository should independently verify dev and optional dependencies; users of the published library are covered by these checks. We do not include unlicensed dependencies. Used to support development activity and not released as part of the production release. Check if you clone. We use the `npm` packages [license-report](https://www.npmjs.com/package/license-report), [license-report-check](https://www.npmjs.com/package/license-report-check) and [license-report-recursive](https://www.npmjs.com/package/license-report-recursive) to identify dependency licenses.
|
|
120
123
|
|
|
121
124
|
<!-- DEPENDENCY_LICENSES_START -->
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
| nanoid | MIT | 5.1.6 | 5.1.6 | 2 months ago - 2025-09-22 | 0 | [LICENSE](https://raw.githubusercontent.com/ai/nanoid/main/LICENSE) |
|
|
125
|
+
|Name|Type|Installed|Latest|Latest Released|Deps|Document|
|
|
126
|
+
|:-|:-|:-:|:-:|:-|-:|:-|
|
|
127
|
+
|csv-parse|MIT|6.1.0|6.1.0|5 months ago: 2025-07-16|0|⚠️ No license file|
|
|
128
|
+
|date-fns|MIT|4.1.0|4.1.0|4 months ago: 2025-08-03|0|[LICENSE.md](https://raw.githubusercontent.com/date-fns/date-fns/main/LICENSE.md)|
|
|
129
|
+
|nanoid|MIT|5.1.6|5.1.6|2 months ago: 2025-09-22|0|[LICENSE](https://raw.githubusercontent.com/ai/nanoid/main/LICENSE)|
|
|
128
130
|
|
|
129
131
|
<!-- DEPENDENCY_LICENSES_END -->
|
|
130
132
|
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { LocalisedString } from '../../index';
|
|
2
|
+
import { Component, ComponentConfig, ComponentRef, ModuleConfig } from '..';
|
|
3
|
+
export interface Context extends Component {
|
|
4
|
+
readonly config: ContextConfig;
|
|
5
|
+
list(settings?: ContextListSettings): Promise<ContextListResult>;
|
|
6
|
+
}
|
|
7
|
+
export type ContextOperationSettings = {};
|
|
8
|
+
export type ContextListSettings = {};
|
|
9
|
+
export type ContextListResult = {
|
|
10
|
+
models: ContextModelGroupConfig[];
|
|
11
|
+
};
|
|
12
|
+
export type ContextCallbackData = {
|
|
13
|
+
typeId: string;
|
|
14
|
+
properties: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
export interface ContextConfig extends ModuleConfig {
|
|
17
|
+
models: ContextModelGroupConfig[];
|
|
18
|
+
operations: ContextOperation[];
|
|
19
|
+
typeId: 'context';
|
|
20
|
+
}
|
|
21
|
+
export type ContextOperation = 'list';
|
|
22
|
+
export type ContextLocalisedConfig = Omit<ContextConfig, 'label' | 'description'> & {
|
|
23
|
+
label: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
export interface ContextModelGroupConfig extends ComponentConfig {
|
|
27
|
+
modelRefs: ComponentRef[];
|
|
28
|
+
order: number;
|
|
29
|
+
}
|
|
30
|
+
export type ContextModelGroupLocalisedConfig = Omit<ContextModelGroupConfig, 'label' | 'description'> & {
|
|
31
|
+
label: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
export interface ContextModelConfig extends ComponentConfig {
|
|
35
|
+
diagramURL?: string;
|
|
36
|
+
dimension: ContextModelDimensionGroupConfig[];
|
|
37
|
+
entities: ContextModelEntityGroupConfig[];
|
|
38
|
+
secondaryMeasures: ContextModelSecondaryMeasureGroupConfig[];
|
|
39
|
+
}
|
|
40
|
+
export type ContextModelLocalisedConfig = Omit<ContextModelConfig, 'label' | 'description'> & {
|
|
41
|
+
label: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
export interface ContextModelDimensionGroupConfig {
|
|
45
|
+
id: string;
|
|
46
|
+
label: Partial<LocalisedString>;
|
|
47
|
+
description: Partial<LocalisedString>;
|
|
48
|
+
dimensionRefs: ComponentRef[];
|
|
49
|
+
}
|
|
50
|
+
export type ContextModelDimensionGroupLocalisedConfig = Omit<ContextModelDimensionGroupConfig, 'label' | 'description'> & {
|
|
51
|
+
label: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
export interface ContextModelDimensionConfig {
|
|
55
|
+
id: string;
|
|
56
|
+
label: Partial<LocalisedString>;
|
|
57
|
+
hierarchies: ContextModelDimensionHierarchyConfig[];
|
|
58
|
+
}
|
|
59
|
+
export type ContextModelDimensionLocalisedConfig = Omit<ContextModelDimensionConfig, 'label' | 'description'> & {
|
|
60
|
+
label: string;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
export interface ContextModelDimensionHierarchyConfig {
|
|
64
|
+
id: string;
|
|
65
|
+
label: Partial<LocalisedString>;
|
|
66
|
+
}
|
|
67
|
+
export type ContextModelDimensionHierarchyLocalisedConfig = Omit<ContextModelDimensionHierarchyConfig, 'label' | 'description'> & {
|
|
68
|
+
label: string;
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
export interface ContextModelEntityGroupConfig {
|
|
72
|
+
id: string;
|
|
73
|
+
label: Partial<LocalisedString>;
|
|
74
|
+
description?: Record<string, unknown>;
|
|
75
|
+
entityRefs: ComponentRef[];
|
|
76
|
+
}
|
|
77
|
+
export type ContextModelEntityGroupLocalisedConfig = Omit<ContextModelEntityGroupConfig, 'label' | 'description'> & {
|
|
78
|
+
label: string;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
export interface ContextModelEntityConfig {
|
|
82
|
+
id: string;
|
|
83
|
+
label: Partial<LocalisedString>;
|
|
84
|
+
labelPlural: Partial<LocalisedString>;
|
|
85
|
+
dataItems: ContextModelEntityDataItemConfig[];
|
|
86
|
+
events: ContextModelEntityEventConfig[];
|
|
87
|
+
primaryMeasures: ContextModelEntityPrimaryMeasureConfig[];
|
|
88
|
+
}
|
|
89
|
+
export type ContextModelEntityLocalisedConfig = Omit<ContextModelEntityConfig, 'label' | 'description'> & {
|
|
90
|
+
label: string;
|
|
91
|
+
description: string;
|
|
92
|
+
};
|
|
93
|
+
export interface ContextModelEntityDataItemConfig {
|
|
94
|
+
id: string;
|
|
95
|
+
label: Partial<LocalisedString>;
|
|
96
|
+
}
|
|
97
|
+
export type ContextModelEntityDataItemLocalisedConfig = Omit<ContextModelEntityDataItemConfig, 'label' | 'description'> & {
|
|
98
|
+
label: string;
|
|
99
|
+
description: string;
|
|
100
|
+
};
|
|
101
|
+
export interface ContextModelEntityEventConfig {
|
|
102
|
+
id: string;
|
|
103
|
+
labelAction: Record<string, string>;
|
|
104
|
+
labelState: Record<string, string>;
|
|
105
|
+
}
|
|
106
|
+
export type ContextModelEntityEventLocalisedConfig = Omit<ContextModelEntityEventConfig, 'label' | 'description'> & {
|
|
107
|
+
label: string;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
export interface ContextModelEntityPrimaryMeasureConfig {
|
|
111
|
+
id: string;
|
|
112
|
+
label: Partial<LocalisedString>;
|
|
113
|
+
}
|
|
114
|
+
export type ContextModelEntityPrimaryMeasureLocalisedConfig = Omit<ContextModelEntityPrimaryMeasureConfig, 'label' | 'description'> & {
|
|
115
|
+
label: string;
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
export interface ContextModelSecondaryMeasureGroupConfig {
|
|
119
|
+
id: string;
|
|
120
|
+
label: Partial<LocalisedString>;
|
|
121
|
+
description?: Record<string, unknown>;
|
|
122
|
+
secondaryMeasureRefs: ComponentRef[];
|
|
123
|
+
}
|
|
124
|
+
export type ContextModelSecondaryMeasureGroupLocalisedConfig = Omit<ContextModelSecondaryMeasureGroupConfig, 'label' | 'description'> & {
|
|
125
|
+
label: string;
|
|
126
|
+
description: string;
|
|
127
|
+
};
|
|
128
|
+
export interface ContextModelSecondaryMeasureConfig {
|
|
129
|
+
id: string;
|
|
130
|
+
label: Partial<LocalisedString>;
|
|
131
|
+
}
|
|
132
|
+
export type ContextModelSecondaryMeasureLocalisedConfig = Omit<ContextModelSecondaryMeasureConfig, 'label' | 'description'> & {
|
|
133
|
+
label: string;
|
|
134
|
+
description: string;
|
|
135
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.311",
|
|
4
4
|
"description": "A library containing common constants, types and utilities used across all Data Positioning projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jonathan Terrell <terrell.jm@gmail.com>",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"nanoid": "^5.1.6"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@datapos/datapos-development": "^0.3.
|
|
37
|
-
"@types/node": "^
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
39
|
-
"@typescript-eslint/parser": "^8.
|
|
40
|
-
"eslint": "^9.39.
|
|
36
|
+
"@datapos/datapos-development": "^0.3.389",
|
|
37
|
+
"@types/node": "^25.0.3",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
|
39
|
+
"@typescript-eslint/parser": "^8.50.0",
|
|
40
|
+
"eslint": "^9.39.2",
|
|
41
41
|
"eslint-plugin-import": "^2.32.0",
|
|
42
42
|
"jiti": "^2.6.1",
|
|
43
43
|
"license-downloader": "^1.3.3",
|
|
@@ -45,22 +45,22 @@
|
|
|
45
45
|
"license-report-check": "^0.1.2",
|
|
46
46
|
"license-report-recursive": "^6.8.2",
|
|
47
47
|
"nanoid": "^5.1.6",
|
|
48
|
-
"npm-check-updates": "^19.
|
|
48
|
+
"npm-check-updates": "^19.2.0",
|
|
49
49
|
"owasp-dependency-check": "^1.0.0",
|
|
50
50
|
"prettier": "^3.7.4",
|
|
51
51
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
52
52
|
"typescript": "^5.9.3",
|
|
53
|
-
"vite": "^7.
|
|
53
|
+
"vite": "^7.3.0",
|
|
54
54
|
"vite-plugin-dts": "^4.5.4"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
|
-
"audit": "node -e \"import('@datapos/datapos-development').then(m => m.auditDependencies())\"",
|
|
57
|
+
"audit": "op run --env-file=.env -- node -e \"import('@datapos/datapos-development').then(m => m.auditDependencies())\"",
|
|
58
58
|
"build": "node -e \"import('@datapos/datapos-development').then(m => m.buildProject())\"",
|
|
59
59
|
"check": "node -e \"import('@datapos/datapos-development').then(m => m.checkDependencies())\"",
|
|
60
|
-
"document": "node -e \"import('@datapos/datapos-development').then(m => m.documentDependencies(['MIT']))\"",
|
|
60
|
+
"document": "op run --env-file=.env -- node -e \"import('@datapos/datapos-development').then(m => m.documentDependencies(['MIT']))\"",
|
|
61
61
|
"format": "node -e \"import('@datapos/datapos-development').then(m => m.formatCode())\"",
|
|
62
62
|
"lint": "node -e \"import('@datapos/datapos-development').then(m => m.lintCode())\"",
|
|
63
|
-
"release": "node -e \"import('@datapos/datapos-development').then(m => m.releaseProject())\"",
|
|
63
|
+
"release": "op run --env-file=.env -- node -e \"import('@datapos/datapos-development').then(m => m.releaseProject())\"",
|
|
64
64
|
"sync": "node -e \"import('@datapos/datapos-development').then(m => m.syncProjectWithGitHub())\"",
|
|
65
65
|
"test": "node -e \"import('@datapos/datapos-development').then(m => m.testProject())\"",
|
|
66
66
|
"update": "node -e \"import('@datapos/datapos-development').then(m => m.updateDataPosDependencies(['development']))\""
|