@datapos/datapos-shared 0.3.151 → 0.3.154
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 +75 -10
- package/dist/types/src/component/connector/index.d.ts +4 -3
- package/dist/types/src/component/context/index.d.ts +3 -2
- package/dist/types/src/component/dataView/index.d.ts +4 -2
- package/dist/types/src/component/index.d.ts +3 -0
- package/dist/types/src/component/informer/document.d.ts +3 -0
- package/dist/types/src/component/informer/index.d.ts +19 -0
- package/dist/types/src/component/presenter/index.d.ts +3 -105
- package/dist/types/src/component/presenter/presentation.d.ts +104 -0
- package/dist/types/src/engine/index.d.ts +2 -1
- package/dist/types/src/index.d.ts +15 -12
- package/dist/types/src/module/index.d.ts +3 -1
- package/package.json +5 -1
- /package/dist/types/src/{appUtilities → utilities}/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
A TypeScript library containing common declarations and utilities used across other Data Positioning repositories.
|
|
7
7
|
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
Ensure your environment meets the following prerequisites before using this library:
|
|
11
|
+
|
|
12
|
+
- **Node.js** version `>=22.0.0`,
|
|
13
|
+
- **npm** version `>=11.0.0`,
|
|
14
|
+
- A Unix-like shell (for command shortcuts, e.g., `bash`, `zsh`, or Git Bash on Windows),
|
|
15
|
+
- Access to the [npm registry](https://www.npmjs.com/) and [GitHub](https://github.com/) for publishing and syncing.
|
|
16
|
+
|
|
8
17
|
## Installation
|
|
9
18
|
|
|
10
19
|
Install as a production dependency:
|
|
@@ -22,9 +31,47 @@ registry=https://registry.npmjs.org/
|
|
|
22
31
|
|
|
23
32
|
## Declarations
|
|
24
33
|
|
|
25
|
-
###
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
### Modules
|
|
35
|
+
|
|
36
|
+
The Data Positioning solution consists of the following modules. All modules, except `App`, extend the base type `Module`.
|
|
37
|
+
|
|
38
|
+
| Type | Dynamic | Notes |
|
|
39
|
+
| --------- | :-----: | --------------------------------------------------------------- |
|
|
40
|
+
| App | | Implements the Data Positioning web application. |
|
|
41
|
+
| Engine | ✔ | Implements the data positioning engine. |
|
|
42
|
+
| Connector | ✔ | Implements a connector which supports one or more connections. |
|
|
43
|
+
| Context | ✔ | Implements a context which defines one or more models. |
|
|
44
|
+
| Informer | ✔ | Implements an informer which renders one or more documents. |
|
|
45
|
+
| Presenter | ✔ | Implements a presenter which renders one or more presentations. |
|
|
46
|
+
|
|
47
|
+
The modules implement the following components. All components extend the base type `Component`.
|
|
48
|
+
|
|
49
|
+
| Module Type | Component Type |
|
|
50
|
+
| ----------- | --------------------------------- |
|
|
51
|
+
| Connector | connector |
|
|
52
|
+
| | connectorConnection |
|
|
53
|
+
| Context | context |
|
|
54
|
+
| | contextModelGroup |
|
|
55
|
+
| | contextModel |
|
|
56
|
+
| | contextModelDimensionGroup |
|
|
57
|
+
| | contextModelDimension |
|
|
58
|
+
| | contextModelDimensionHierarchy |
|
|
59
|
+
| | contextModelEntityGroup |
|
|
60
|
+
| | contextModelEntity |
|
|
61
|
+
| | contextModelEntityDataItem |
|
|
62
|
+
| | contextModelEntityEvent |
|
|
63
|
+
| | contextModelEntityPrimaryMeasure |
|
|
64
|
+
| | contextModelSecondaryMeasureGroup |
|
|
65
|
+
| | contextModelSecondaryMeasure |
|
|
66
|
+
| | dataView |
|
|
67
|
+
| | dimension |
|
|
68
|
+
| | eventQuery |
|
|
69
|
+
| Presenter | presenter |
|
|
70
|
+
| | presenterPresentation |
|
|
71
|
+
| Informer | informer |
|
|
72
|
+
| | informerDocument |
|
|
73
|
+
|
|
74
|
+
### Base Components
|
|
28
75
|
|
|
29
76
|
| Item | Notes |
|
|
30
77
|
| ------------------------------------- | ------------------------------------------------------------ |
|
|
@@ -35,14 +82,20 @@ registry=https://registry.npmjs.org/
|
|
|
35
82
|
| ComponentTypeId | |
|
|
36
83
|
| StatusColorId | |
|
|
37
84
|
|
|
38
|
-
|
|
85
|
+
### Engine Module Components
|
|
86
|
+
|
|
87
|
+
| Item | Notes |
|
|
88
|
+
| ---- | ----- |
|
|
89
|
+
| | |
|
|
90
|
+
|
|
91
|
+
### Connector Module Components
|
|
39
92
|
|
|
40
93
|
| Item | Notes |
|
|
41
94
|
| --------------------------------------- | ----------------------------------------------------------------- |
|
|
42
95
|
| [Connector Types](./src/connector.ts) | Connector types. The Connector type extends the Component type. |
|
|
43
96
|
| [Connection Types](./src/connection.ts) | Connection types. The Connection type extends the Component type. |
|
|
44
97
|
|
|
45
|
-
|
|
98
|
+
### Context Module Components
|
|
46
99
|
|
|
47
100
|
| Item | Notes |
|
|
48
101
|
| ------------------------------------------- | --------------------------------------------------------------------- |
|
|
@@ -56,6 +109,18 @@ registry=https://registry.npmjs.org/
|
|
|
56
109
|
| [Informer Types](./src/informer.ts) | Informer types. The Informer type extends the Component type. |
|
|
57
110
|
| [Recipe Types](./src/recipe.ts) | Recipe types. The Recipe type extends the Component type. |
|
|
58
111
|
|
|
112
|
+
### Informer Module Components
|
|
113
|
+
|
|
114
|
+
| Item | Notes |
|
|
115
|
+
| ---- | ----- |
|
|
116
|
+
| | |
|
|
117
|
+
|
|
118
|
+
### Presenter Module Components
|
|
119
|
+
|
|
120
|
+
| Item | Notes |
|
|
121
|
+
| ---- | ----- |
|
|
122
|
+
| | |
|
|
123
|
+
|
|
59
124
|
## Usage
|
|
60
125
|
|
|
61
126
|
Import the library in your TypeScript project:
|
|
@@ -79,17 +144,17 @@ For detailed implementation, see the `scripts` section in the `package.json` fil
|
|
|
79
144
|
| ------------------ | ---------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
80
145
|
| audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities. |
|
|
81
146
|
| build | alt+ctrl+shift+b | Build the package using Vite. |
|
|
82
|
-
|
|
|
83
|
-
| bumpVersion | alt+ctrl+shift+v | |
|
|
147
|
+
| bump:version | alt+ctrl+shift+v | Increment patch version number. |
|
|
84
148
|
| check | alt+ctrl+shift+c | List outdated dependencies and run retire scanner. |
|
|
85
149
|
| document | alt+ctrl+shift+d | Identify licenses of the project's production and peer dependencies. See [LICENSES.json](./LICENSES.json). |
|
|
86
150
|
| format | alt+ctrl+shift+f | Enforce formatting style rules. |
|
|
87
151
|
| lint | alt+ctrl+shift+l | Check the code for errors and enforce coding style rules. |
|
|
88
|
-
|
|
|
152
|
+
| publish:toNPM | alt+ctrl+shift+p | Publish the package to npm. |
|
|
89
153
|
| release | alt+ctrl+shift+r | Bump version, synchronise local repository with the main GitHub repository, build and publish to npm. |
|
|
90
|
-
|
|
|
154
|
+
| send:deployNotice | alt+ctrl+shift+n | ❌ Not implemented. |
|
|
155
|
+
| sync:withGitHub | alt+ctrl+shift+s | Bump version and synchronise local repository with the main GitHub repository. |
|
|
91
156
|
| test | alt+ctrl+shift+t | ❌ Not implemented. |
|
|
92
|
-
|
|
|
157
|
+
| update:dataPosDeps | alt+ctrl+shift+l | Install the latest version of all Data Positioning dependencies. |
|
|
93
158
|
|
|
94
159
|
## Compliance
|
|
95
160
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { parse as csvParse } from 'csv-parse/browser/esm';
|
|
2
2
|
import { parse as dateFnsParse } from 'date-fns';
|
|
3
3
|
import { nanoid } from 'nanoid';
|
|
4
|
-
import {
|
|
4
|
+
import { Module } from '../../module';
|
|
5
5
|
import { buildFetchError, OperationalError } from '../../errors';
|
|
6
|
+
import { Component, ComponentConfig } from '..';
|
|
6
7
|
import { ConnectionConfig, ConnectionDescription, ConnectionNodeConfig } from './connection';
|
|
7
8
|
import { convertMillisecondsToTimestamp, LocalisedString } from '../../index';
|
|
8
9
|
import { DataViewContentAuditConfig, ValueDelimiterId } from '../dataView';
|
|
9
|
-
import { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '../../
|
|
10
|
-
export interface Connector {
|
|
10
|
+
import { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '../../utilities';
|
|
11
|
+
export interface Connector extends Module, Component {
|
|
11
12
|
abortController?: AbortController | undefined;
|
|
12
13
|
readonly config: ConnectorConfig;
|
|
13
14
|
readonly connectionConfig: ConnectionConfig;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Module } from '../../module';
|
|
2
|
+
import { Component, ComponentConfig, ComponentRef } from '..';
|
|
3
|
+
export interface Context extends Module, Component {
|
|
3
4
|
readonly config: ContextConfig;
|
|
4
5
|
list(settings?: ContextListSettings): Promise<ContextListResult>;
|
|
5
6
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ComponentConfig } from '..';
|
|
2
1
|
import { Timestamp } from '../../timestamp';
|
|
3
|
-
import {
|
|
2
|
+
import { Component, ComponentConfig } from '..';
|
|
3
|
+
import { ConnectionColumnConfig, ConnectionNodeConfig } from '../connector/connection';
|
|
4
|
+
export interface DataView extends Component {
|
|
5
|
+
}
|
|
4
6
|
export interface DataViewConfig extends ComponentConfig {
|
|
5
7
|
connectionId?: string;
|
|
6
8
|
connectionNodeConfig?: ConnectionNodeConfig;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Timestamp } from '../timestamp';
|
|
2
2
|
import { LocaleCode, LocalisedString, StatusColorId } from '../index';
|
|
3
|
+
export interface Component {
|
|
4
|
+
readonly config: ComponentConfig;
|
|
5
|
+
}
|
|
3
6
|
export interface ComponentConfig {
|
|
4
7
|
id: string;
|
|
5
8
|
label: Partial<LocalisedString>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as markdownIt } from 'markdown-it';
|
|
2
|
+
import { Module } from '../../module';
|
|
3
|
+
import { Component, ComponentConfig, ComponentRef } from '..';
|
|
4
|
+
export interface Informer extends Module, Component {
|
|
5
|
+
readonly config: InformerConfig;
|
|
6
|
+
readonly tools: InformerTools;
|
|
7
|
+
list(): ComponentRef[];
|
|
8
|
+
render(informerPath: string, renderTo: HTMLElement, data?: unknown): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export interface InformerConfig extends ComponentConfig {
|
|
11
|
+
version: string;
|
|
12
|
+
}
|
|
13
|
+
export type InformerLocalisedConfig = Omit<InformerConfig, 'label' | 'description'> & {
|
|
14
|
+
label: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
export type InformerTools = {
|
|
18
|
+
markdownIt: typeof markdownIt;
|
|
19
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as markdownIt } from 'markdown-it';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { Module } from '../../module';
|
|
3
|
+
import { Component, ComponentConfig, ComponentRef } from '..';
|
|
4
|
+
export interface Presenter extends Module, Component {
|
|
4
5
|
readonly config: PresenterConfig;
|
|
5
6
|
readonly tools: PresenterTools;
|
|
6
7
|
list(): ComponentRef[];
|
|
@@ -17,106 +18,3 @@ export type PresenterLocalisedConfig = Omit<PresenterConfig, 'label' | 'descript
|
|
|
17
18
|
export type PresenterTools = {
|
|
18
19
|
markdownIt: typeof markdownIt;
|
|
19
20
|
};
|
|
20
|
-
export interface PresentationConfig extends ComponentConfig {
|
|
21
|
-
content: string;
|
|
22
|
-
order: number;
|
|
23
|
-
}
|
|
24
|
-
export type PresentationVisualConfig = {
|
|
25
|
-
content: PresentationVisualContentConfig;
|
|
26
|
-
views: PresentationVisualViewConfig[];
|
|
27
|
-
};
|
|
28
|
-
export type PresentationVisualContentConfig = {
|
|
29
|
-
title: {
|
|
30
|
-
text: string;
|
|
31
|
-
};
|
|
32
|
-
data: {
|
|
33
|
-
name: string;
|
|
34
|
-
categoryLabels: string[];
|
|
35
|
-
measures: {
|
|
36
|
-
id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
data?: number[][];
|
|
39
|
-
}[];
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export interface PresentationVisualViewConfig {
|
|
43
|
-
categoryId: 'cartesian' | 'chordDiagram' | 'polar' | 'range' | 'sankeyDiagram' | 'streamgraph' | 'values';
|
|
44
|
-
default?: boolean;
|
|
45
|
-
}
|
|
46
|
-
export interface PresentationVisualCartesianViewConfig extends PresentationVisualViewConfig {
|
|
47
|
-
categoryId: 'cartesian';
|
|
48
|
-
typeId: 'areaLine' | 'areaSpline' | 'bar' | 'column' | 'line' | 'pyramid' | 'spline';
|
|
49
|
-
}
|
|
50
|
-
export interface PresentationVisualChordDiagramViewConfig extends PresentationVisualViewConfig {
|
|
51
|
-
categoryId: 'chordDiagram';
|
|
52
|
-
}
|
|
53
|
-
export interface PresentationVisualPolarViewConfig extends PresentationVisualViewConfig {
|
|
54
|
-
categoryId: 'polar';
|
|
55
|
-
typeId: 'area' | 'column' | 'line';
|
|
56
|
-
}
|
|
57
|
-
export interface PresentationVisualRangeViewConfig extends PresentationVisualViewConfig {
|
|
58
|
-
categoryId: 'range';
|
|
59
|
-
typeId: 'area' | 'bar' | 'column';
|
|
60
|
-
}
|
|
61
|
-
export interface PresentationVisualSankeyDiagramViewConfig extends PresentationVisualViewConfig {
|
|
62
|
-
categoryId: 'sankeyDiagram';
|
|
63
|
-
}
|
|
64
|
-
export interface PresentationVisualStreamgraphViewConfig extends PresentationVisualViewConfig {
|
|
65
|
-
categoryId: 'streamgraph';
|
|
66
|
-
}
|
|
67
|
-
export interface PresentationVisualValuesViewConfig extends PresentationVisualViewConfig {
|
|
68
|
-
categoryId: 'values';
|
|
69
|
-
}
|
|
70
|
-
export type PresentationVisualViewType = PresentationVisualCartesianViewType | PresentationVisualChordViewType | PresentationVisualPolarViewType | PresentationVisualRangeViewType | PresentationVisualSankeyDiagramViewType | PresentationVisualStreamgraphViewType | PresentationVisualValuesViewType;
|
|
71
|
-
export type PresentationVisualCartesianViewType = {
|
|
72
|
-
categoryId: 'cartesian';
|
|
73
|
-
typeId: 'areaLine' | 'areaSpline' | 'bar' | 'column' | 'line' | 'pyramid' | 'spline';
|
|
74
|
-
label: Record<string, string>;
|
|
75
|
-
options: {
|
|
76
|
-
highchartsType: 'area' | 'bar' | 'column' | 'line';
|
|
77
|
-
inverted?: boolean;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
export type PresentationVisualChordViewType = {
|
|
81
|
-
categoryId: 'chordDiagram';
|
|
82
|
-
label: Record<string, string>;
|
|
83
|
-
options: {};
|
|
84
|
-
};
|
|
85
|
-
export type PresentationVisualPolarViewType = {
|
|
86
|
-
categoryId: 'polar';
|
|
87
|
-
typeId: 'area' | 'column' | 'line';
|
|
88
|
-
label: Record<string, string>;
|
|
89
|
-
options: {
|
|
90
|
-
highchartsType: 'area' | 'column' | 'line';
|
|
91
|
-
inverted?: boolean;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
export type PresentationVisualRangeViewType = {
|
|
95
|
-
categoryId: 'range';
|
|
96
|
-
typeId: 'area' | 'bar' | 'column';
|
|
97
|
-
label: Record<string, string>;
|
|
98
|
-
options: {
|
|
99
|
-
highchartsType: 'arearange' | 'columnrange';
|
|
100
|
-
inverted?: boolean;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
export type PresentationVisualSankeyDiagramViewType = {
|
|
104
|
-
categoryId: 'sankeyDiagram';
|
|
105
|
-
label: Record<string, string>;
|
|
106
|
-
options: {};
|
|
107
|
-
};
|
|
108
|
-
export type PresentationVisualStreamgraphViewType = {
|
|
109
|
-
categoryId: 'streamgraph';
|
|
110
|
-
label: Record<string, string>;
|
|
111
|
-
options: {};
|
|
112
|
-
};
|
|
113
|
-
export type PresentationVisualValuesViewType = {
|
|
114
|
-
categoryId: 'values';
|
|
115
|
-
label: Record<string, string>;
|
|
116
|
-
options: {};
|
|
117
|
-
};
|
|
118
|
-
export interface PresentationView {
|
|
119
|
-
resize: () => void;
|
|
120
|
-
vendorId: string;
|
|
121
|
-
}
|
|
122
|
-
export declare const presentationViewTypeMap: Record<string, PresentationVisualViewType>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ComponentConfig } from '..';
|
|
2
|
+
export interface PresentationConfig extends ComponentConfig {
|
|
3
|
+
content: string;
|
|
4
|
+
order: number;
|
|
5
|
+
}
|
|
6
|
+
export type PresentationVisualConfig = {
|
|
7
|
+
content: PresentationVisualContentConfig;
|
|
8
|
+
views: PresentationVisualViewConfig[];
|
|
9
|
+
};
|
|
10
|
+
export type PresentationVisualContentConfig = {
|
|
11
|
+
title: {
|
|
12
|
+
text: string;
|
|
13
|
+
};
|
|
14
|
+
data: {
|
|
15
|
+
name: string;
|
|
16
|
+
categoryLabels: string[];
|
|
17
|
+
measures: {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
data?: number[][];
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export interface PresentationVisualViewConfig {
|
|
25
|
+
categoryId: 'cartesian' | 'chordDiagram' | 'polar' | 'range' | 'sankeyDiagram' | 'streamgraph' | 'values';
|
|
26
|
+
default?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface PresentationVisualCartesianViewConfig extends PresentationVisualViewConfig {
|
|
29
|
+
categoryId: 'cartesian';
|
|
30
|
+
typeId: 'areaLine' | 'areaSpline' | 'bar' | 'column' | 'line' | 'pyramid' | 'spline';
|
|
31
|
+
}
|
|
32
|
+
export interface PresentationVisualChordDiagramViewConfig extends PresentationVisualViewConfig {
|
|
33
|
+
categoryId: 'chordDiagram';
|
|
34
|
+
}
|
|
35
|
+
export interface PresentationVisualPolarViewConfig extends PresentationVisualViewConfig {
|
|
36
|
+
categoryId: 'polar';
|
|
37
|
+
typeId: 'area' | 'column' | 'line';
|
|
38
|
+
}
|
|
39
|
+
export interface PresentationVisualRangeViewConfig extends PresentationVisualViewConfig {
|
|
40
|
+
categoryId: 'range';
|
|
41
|
+
typeId: 'area' | 'bar' | 'column';
|
|
42
|
+
}
|
|
43
|
+
export interface PresentationVisualSankeyDiagramViewConfig extends PresentationVisualViewConfig {
|
|
44
|
+
categoryId: 'sankeyDiagram';
|
|
45
|
+
}
|
|
46
|
+
export interface PresentationVisualStreamgraphViewConfig extends PresentationVisualViewConfig {
|
|
47
|
+
categoryId: 'streamgraph';
|
|
48
|
+
}
|
|
49
|
+
export interface PresentationVisualValuesViewConfig extends PresentationVisualViewConfig {
|
|
50
|
+
categoryId: 'values';
|
|
51
|
+
}
|
|
52
|
+
export type PresentationVisualViewType = PresentationVisualCartesianViewType | PresentationVisualChordViewType | PresentationVisualPolarViewType | PresentationVisualRangeViewType | PresentationVisualSankeyDiagramViewType | PresentationVisualStreamgraphViewType | PresentationVisualValuesViewType;
|
|
53
|
+
export type PresentationVisualCartesianViewType = {
|
|
54
|
+
categoryId: 'cartesian';
|
|
55
|
+
typeId: 'areaLine' | 'areaSpline' | 'bar' | 'column' | 'line' | 'pyramid' | 'spline';
|
|
56
|
+
label: Record<string, string>;
|
|
57
|
+
options: {
|
|
58
|
+
highchartsType: 'area' | 'bar' | 'column' | 'line';
|
|
59
|
+
inverted?: boolean;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export type PresentationVisualChordViewType = {
|
|
63
|
+
categoryId: 'chordDiagram';
|
|
64
|
+
label: Record<string, string>;
|
|
65
|
+
options: {};
|
|
66
|
+
};
|
|
67
|
+
export type PresentationVisualPolarViewType = {
|
|
68
|
+
categoryId: 'polar';
|
|
69
|
+
typeId: 'area' | 'column' | 'line';
|
|
70
|
+
label: Record<string, string>;
|
|
71
|
+
options: {
|
|
72
|
+
highchartsType: 'area' | 'column' | 'line';
|
|
73
|
+
inverted?: boolean;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export type PresentationVisualRangeViewType = {
|
|
77
|
+
categoryId: 'range';
|
|
78
|
+
typeId: 'area' | 'bar' | 'column';
|
|
79
|
+
label: Record<string, string>;
|
|
80
|
+
options: {
|
|
81
|
+
highchartsType: 'arearange' | 'columnrange';
|
|
82
|
+
inverted?: boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export type PresentationVisualSankeyDiagramViewType = {
|
|
86
|
+
categoryId: 'sankeyDiagram';
|
|
87
|
+
label: Record<string, string>;
|
|
88
|
+
options: {};
|
|
89
|
+
};
|
|
90
|
+
export type PresentationVisualStreamgraphViewType = {
|
|
91
|
+
categoryId: 'streamgraph';
|
|
92
|
+
label: Record<string, string>;
|
|
93
|
+
options: {};
|
|
94
|
+
};
|
|
95
|
+
export type PresentationVisualValuesViewType = {
|
|
96
|
+
categoryId: 'values';
|
|
97
|
+
label: Record<string, string>;
|
|
98
|
+
options: {};
|
|
99
|
+
};
|
|
100
|
+
export interface PresentationView {
|
|
101
|
+
resize: () => void;
|
|
102
|
+
vendorId: string;
|
|
103
|
+
}
|
|
104
|
+
export declare const presentationViewTypeMap: Record<string, PresentationVisualViewType>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConnectionConfig } from '../component/connector/connection';
|
|
2
|
+
import { Module } from '../module';
|
|
2
3
|
import { AuditContentResult, ConnectorCallbackData, ConnectorOperationSettings, InitialiseSettings, ListResult, RetrieveResult } from '../component/connector';
|
|
3
4
|
import { ContextCallbackData, ContextConfig, ContextOperationSettings } from '../component/context';
|
|
4
5
|
import { DataViewPreviewConfig, EncodingConfig } from '../component/dataView';
|
|
@@ -7,7 +8,7 @@ type ProcessConnectorRequest = (id: string, connectionConfig: ConnectionConfig,
|
|
|
7
8
|
export type ContextInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult | RetrieveResult;
|
|
8
9
|
type ProcessContextRequest = (id: string, contextConfig: ContextConfig, settings: ContextOperationSettings, callback?: ((callbackData: ConnectorCallbackData) => void) | undefined) => Promise<ConnectorInterfaceResult>;
|
|
9
10
|
export type ConnectorInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult | RetrieveResult;
|
|
10
|
-
export interface Engine {
|
|
11
|
+
export interface Engine extends Module {
|
|
11
12
|
getEncodingConfigs: (localeId: string) => EncodingConfig[];
|
|
12
13
|
invokeWorker(errorEventCallback: (errorEvent: ErrorEvent) => void): EngineWorker;
|
|
13
14
|
}
|
|
@@ -27,40 +27,43 @@ export type { RetrieveResult, RetrieveSettings, RetrieveSummary } from './compon
|
|
|
27
27
|
export type { UpsertSettings } from './component/connector';
|
|
28
28
|
export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig } from './component/connector/connection';
|
|
29
29
|
export type { DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
|
|
30
|
-
export type { Context, ContextConfig, ContextLocalisedConfig, ContextListSettings, ContextListResult
|
|
30
|
+
export type { Context, ContextConfig, ContextLocalisedConfig, ContextListSettings, ContextListResult } from './component/context';
|
|
31
|
+
export type { ContextModelGroupConfig, ContextModelGroupLocalisedConfig, ContextModelConfig, ContextModelLocalisedConfig } from './component/context';
|
|
32
|
+
export type { ContextModelDimensionGroupConfig, ContextModelDimensionGroupLocalisedConfig, ContextModelDimensionConfig, ContextModelDimensionLocalisedConfig, ContextModelDimensionHierarchyConfig, ContextModelDimensionHierarchyLocalisedConfig } from './component/context';
|
|
33
|
+
export type { ContextModelEntityGroupConfig, ContextModelEntityGroupLocalisedConfig, ContextModelEntityConfig, ContextModelEntityLocalisedConfig, ContextModelEntityDataItemConfig, // Data items.
|
|
31
34
|
ContextModelEntityDataItemLocalisedConfig, ContextModelEntityEventConfig, // Events.
|
|
32
35
|
ContextModelEntityEventLocalisedConfig, ContextModelEntityPrimaryMeasureConfig, // Primary measures.
|
|
33
|
-
ContextModelEntityPrimaryMeasureLocalisedConfig
|
|
36
|
+
ContextModelEntityPrimaryMeasureLocalisedConfig } from './component/context';
|
|
37
|
+
export type { ContextModelSecondaryMeasureGroupConfig, ContextModelSecondaryMeasureGroupLocalisedConfig, ContextModelSecondaryMeasureConfig, ContextModelSecondaryMeasureLocalisedConfig } from './component/context';
|
|
34
38
|
export type { DataFormatId, EncodingConfig, RecordDelimiterId, ValueDelimiterId } from './component/dataView';
|
|
35
39
|
export type { DataViewConfig, DataViewContentAuditConfig, DataViewLocalisedConfig, DataViewPreviewConfig, DataViewRelationshipsAuditConfig, ParsedValue } from './component/dataView';
|
|
36
40
|
export type { DimensionConfig, DimensionLocalisedConfig } from './component/dimension';
|
|
37
41
|
export type { ConnectorInterfaceResult, ContextInterfaceResult, Engine, EngineWorker } from './engine';
|
|
38
42
|
export type { SerialisedError } from './errors';
|
|
39
43
|
export type { EventQueryConfig, EventQueryLocalisedConfig } from './component/eventQuery';
|
|
44
|
+
export type { Informer, InformerConfig, InformerLocalisedConfig, InformerTools } from './component/informer';
|
|
40
45
|
export type { Presenter, PresenterConfig, PresenterLocalisedConfig, PresenterTools } from './component/presenter';
|
|
41
|
-
export type { PresentationConfig, PresentationView } from './component/presenter';
|
|
42
|
-
export type { PresentationVisualConfig, PresentationVisualContentConfig, PresentationVisualViewConfig, PresentationVisualCartesianViewConfig, PresentationVisualChordDiagramViewConfig, PresentationVisualPolarViewConfig, PresentationVisualRangeViewConfig, PresentationVisualSankeyDiagramViewConfig, PresentationVisualStreamgraphViewConfig, PresentationVisualValuesViewConfig } from './component/presenter';
|
|
43
|
-
export type { PresentationVisualViewType, PresentationVisualCartesianViewType, PresentationVisualChordViewType, PresentationVisualPolarViewType, PresentationVisualRangeViewType, PresentationVisualSankeyDiagramViewType, PresentationVisualStreamgraphViewType, PresentationVisualValuesViewType } from './component/presenter';
|
|
44
|
-
export type { Recipe, RecipeConfig, RecipeLocalisedConfig } from './component/informer/recipe';
|
|
46
|
+
export type { PresentationConfig, PresentationView } from './component/presenter/presentation';
|
|
47
|
+
export type { PresentationVisualConfig, PresentationVisualContentConfig, PresentationVisualViewConfig, PresentationVisualCartesianViewConfig, PresentationVisualChordDiagramViewConfig, PresentationVisualPolarViewConfig, PresentationVisualRangeViewConfig, PresentationVisualSankeyDiagramViewConfig, PresentationVisualStreamgraphViewConfig, PresentationVisualValuesViewConfig } from './component/presenter/presentation';
|
|
48
|
+
export type { PresentationVisualViewType, PresentationVisualCartesianViewType, PresentationVisualChordViewType, PresentationVisualPolarViewType, PresentationVisualRangeViewType, PresentationVisualSankeyDiagramViewType, PresentationVisualStreamgraphViewType, PresentationVisualValuesViewType } from './component/presenter/presentation';
|
|
45
49
|
export interface ContextOperationSettings {
|
|
46
50
|
accountId?: string;
|
|
47
51
|
appCheckToken?: string;
|
|
48
52
|
sessionAccessToken?: string;
|
|
49
53
|
}
|
|
50
54
|
export type { Timestamp } from './timestamp';
|
|
51
|
-
export type { TutorialConfig } from './component/informer/tutorial';
|
|
52
55
|
export declare const DEFAULT_LOCALE_CODE: LocaleCode;
|
|
53
56
|
export { DefaultTimestamp } from './timestamp';
|
|
54
|
-
export { presentationViewTypeMap } from './component/presenter';
|
|
57
|
+
export { presentationViewTypeMap } from './component/presenter/presentation';
|
|
55
58
|
export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscapeJS';
|
|
56
59
|
export { useDataTable } from './composables/useDataTable';
|
|
57
60
|
export { type HighchartsView, useHighcharts } from './composables/useHighcharts';
|
|
58
61
|
export { APIError, ApplicationError, EngineError, FetchError, OperationalError, VueError, WindowRuntimeError, WindowPromiseRejectionError } from './errors';
|
|
59
62
|
export { buildFetchError, concatenateSerialisedErrorMessages, normalizeToError, serialiseError } from './errors';
|
|
60
63
|
export { convertMillisecondsToTimestamp, getCurrentTimestamp } from './timestamp';
|
|
61
|
-
export { convertODataTypeIdToUsageTypeId } from './
|
|
62
|
-
export { extractExtensionFromPath, extractNameFromPath } from './
|
|
63
|
-
export { formatNumberAsDecimalNumber, formatNumberAsDuration, formatNumberAsSize, formatNumberAsStorageSize, formatNumberAsWholeNumber } from './
|
|
64
|
+
export { convertODataTypeIdToUsageTypeId } from './utilities';
|
|
65
|
+
export { extractExtensionFromPath, extractNameFromPath } from './utilities';
|
|
66
|
+
export { formatNumberAsDecimalNumber, formatNumberAsDuration, formatNumberAsSize, formatNumberAsStorageSize, formatNumberAsWholeNumber } from './utilities';
|
|
64
67
|
export { getDataFormats, getRecordDelimiters, getValueDelimiters } from './component/dataView';
|
|
65
68
|
export { getComponentStatus } from './component';
|
|
66
|
-
export { lookupMimeTypeForExtension } from './
|
|
69
|
+
export { lookupMimeTypeForExtension } from './utilities';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ContextModelGroupConfig } from '../component/context';
|
|
2
2
|
import { LocalisedString } from '../index';
|
|
3
|
+
export interface Module {
|
|
4
|
+
}
|
|
3
5
|
export interface ModuleConfig {
|
|
4
6
|
id: string;
|
|
5
7
|
label: Partial<LocalisedString>;
|
|
@@ -8,7 +10,7 @@ export interface ModuleConfig {
|
|
|
8
10
|
typeId: ModuleTypeId;
|
|
9
11
|
version: string;
|
|
10
12
|
}
|
|
11
|
-
type ModuleTypeId = 'app' | 'engine' | 'connector' | 'context' | '
|
|
13
|
+
type ModuleTypeId = 'app' | 'engine' | 'connector' | 'context' | 'informer' | 'presenter';
|
|
12
14
|
export interface AppModuleConfig extends ModuleConfig {
|
|
13
15
|
typeId: 'app';
|
|
14
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.154",
|
|
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,
|
|
@@ -63,5 +63,9 @@
|
|
|
63
63
|
"_document:licenceReport": "license-report --only=prod,peer > LICENSES.json",
|
|
64
64
|
"_document:licenceCheck": "license-report-check --source ./LICENSES.json --allowed 'MIT' --allowed 'n/a' --allowed 'Apache-2.0' --output=table",
|
|
65
65
|
"_update:developDeps": "npm install --save-dev @datapos/datapos-development@latest"
|
|
66
|
+
},
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=22.0.0",
|
|
69
|
+
"npm": ">=11.0.0"
|
|
66
70
|
}
|
|
67
71
|
}
|
|
File without changes
|