@datapos/datapos-shared 0.3.152 → 0.3.156

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 CHANGED
@@ -31,39 +31,78 @@ registry=https://registry.npmjs.org/
31
31
 
32
32
  ## Declarations
33
33
 
34
+ This package provides composables, constants, errors, types/interfaces and utilities used by Data Positioning modules.
35
+
36
+ ### Modules
37
+
38
+ The Data Positioning solution consists of the following modules. All modules, except `App`, extend the base type `Module`.
39
+
40
+ | Type | Dynamic | Notes |
41
+ | --------- | :-----: | --------------------------------------------------------------- |
42
+ | App | | Implements the data positioning web application. |
43
+ | Engine | ✔ | Implements the data positioning engine. |
44
+ | Connector | ✔ | Implements a connector which handles one or more connections. |
45
+ | Context | ✔ | Implements a context which defines one or more models. |
46
+ | Informer | ✔ | Implements an informer which renders one or more documents. |
47
+ | Presenter | ✔ | Implements a presenter which renders one or more presentations. |
48
+
34
49
  ### Components
35
50
 
36
- #### Component Types
51
+ Each module implements a set of components. All module component types extend the base component types.
37
52
 
38
- | Item | Notes |
39
- | ------------------------------------- | ------------------------------------------------------------ |
40
- | [Component Types](./src/component.ts) | The Component type serves as a base type for all components. |
41
- | ComponentRef | |
42
- | ComponentStatus | |
43
- | ComponentStatusId | |
44
- | ComponentTypeId | |
45
- | StatusColorId | |
53
+ | Types | Notes |
54
+ | ------------------------------- | ------------------------------------------------------------ |
55
+ | [Component](./src/component.ts) | The Component type serves as a base type for all components. |
56
+ | ComponentRef | |
57
+ | ComponentStatus | |
58
+ | ComponentStatusId | |
59
+ | ComponentTypeId | |
60
+ | StatusColorId | |
46
61
 
47
- #### Connector and Connection Types
62
+ #### Connector Module Components
48
63
 
49
64
  | Item | Notes |
50
65
  | --------------------------------------- | ----------------------------------------------------------------- |
51
66
  | [Connector Types](./src/connector.ts) | Connector types. The Connector type extends the Component type. |
52
67
  | [Connection Types](./src/connection.ts) | Connection types. The Connection type extends the Component type. |
53
68
 
54
- #### Context Types
69
+ #### Context Module Components
70
+
71
+ | Item | Notes |
72
+ | ---------------------------------------- | ------------------------------------------------------------------- |
73
+ | [Context Types](./src/context.ts) | Context types. The Context type extends the Component type. |
74
+ | [Data View Types](./src/dataView.ts) | DataView types. The DataView type extends the Component type. |
75
+ | [Dimension Types](./src/dimension.ts) | Dimension types. The Dimension type extends the Component type. |
76
+ | [Engine Types](./src/dimension.ts) | Engine types. |
77
+ | [Event Query Types](./src/eventQuery.ts) | Event Query types. The Event Query type extends the Component type. |
78
+
79
+ #### Engine Module Components
80
+
81
+ | Item | Notes |
82
+ | ---------------------------------- | ------------- |
83
+ | [Engine Types](./src/dimension.ts) | Engine types. |
84
+
85
+ #### Informer Module Components
55
86
 
56
87
  | Item | Notes |
57
88
  | ------------------------------------------- | --------------------------------------------------------------------- |
58
- | [Context Types](./src/context.ts) | Context types. The Context type extends the Component type. |
59
- | [Data View Types](./src/dataView.ts) | DataView types. The DataView type extends the Component type. |
60
- | [Dimension Types](./src/dimension.ts) | Dimension types. The Dimension type extends the Component type. |
61
- | [Engine Types](./src/dimension.ts) | Engine types. |
62
- | [Event Query Types](./src/eventQuery.ts) | Event Query types. The Event Query type extends the Component type. |
63
89
  | [Presenter Types](./src/presenter.ts) | Presenter types. The Presenter type extends the Component type. |
64
90
  | [Presentation Types](./src/presentation.ts) | Presentation types. The Presentation type extends the Component type. |
65
- | [Informer Types](./src/informer.ts) | Informer types. The Informer type extends the Component type. |
66
- | [Recipe Types](./src/recipe.ts) | Recipe types. The Recipe type extends the Component type. |
91
+
92
+ #### Presenter Module Components
93
+
94
+ | Item | Notes |
95
+ | ----------------------------------- | ------------------------------------------------------------- |
96
+ | [Informer Types](./src/informer.ts) | Informer types. The Informer type extends the Component type. |
97
+ | [Recipe Types](./src/recipe.ts) | Recipe types. The Recipe type extends the Component type. |
98
+
99
+ ### Composables
100
+
101
+ ### Constants
102
+
103
+ ### Errors
104
+
105
+ ### Utilities
67
106
 
68
107
  ## Usage
69
108
 
@@ -88,17 +127,17 @@ For detailed implementation, see the `scripts` section in the `package.json` fil
88
127
  | ------------------ | ---------------- | ---------------------------------------------------------------------------------------------------------- |
89
128
  | audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities. |
90
129
  | build | alt+ctrl+shift+b | Build the package using Vite. |
91
- | build...Config | | |
92
- | bumpVersion | alt+ctrl+shift+v | |
130
+ | bump:version | alt+ctrl+shift+v | Increment patch version number. |
93
131
  | check | alt+ctrl+shift+c | List outdated dependencies and run retire scanner. |
94
132
  | document | alt+ctrl+shift+d | Identify licenses of the project's production and peer dependencies. See [LICENSES.json](./LICENSES.json). |
95
133
  | format | alt+ctrl+shift+f | Enforce formatting style rules. |
96
134
  | lint | alt+ctrl+shift+l | Check the code for errors and enforce coding style rules. |
97
- | publishToNPM | alt+ctrl+shift+p | |
135
+ | publish:toNPM | alt+ctrl+shift+p | Publish the package to npm. |
98
136
  | release | alt+ctrl+shift+r | Bump version, synchronise local repository with the main GitHub repository, build and publish to npm. |
99
- | syncWithGitHub | alt+ctrl+shift+s | Bump version and synchronise local repository with the main GitHub repository. |
137
+ | send:deployNotice | alt+ctrl+shift+n | Not implemented. |
138
+ | sync:withGitHub | alt+ctrl+shift+s | Bump version and synchronise local repository with the main GitHub repository. |
100
139
  | test | alt+ctrl+shift+t | ❌ Not implemented. |
101
- | updateDependencies | alt+ctrl+shift+l | Install the latest version of all Data Positioning dependencies. |
140
+ | update:dataPosDeps | alt+ctrl+shift+l | Install the latest version of all Data Positioning dependencies. |
102
141
 
103
142
  ## Compliance
104
143
 
@@ -1,29 +1,11 @@
1
- const C = ["createObject", "dropObject", "removeRecords", "upsertRecords"], $ = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], _ = 0, L = (e) => e, F = () => Date.now(), k = {
2
- cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
3
- cartesian_areaSpline: { categoryId: "cartesian", typeId: "areaSpline", label: { "en-gb": "Area Spline" }, options: { highchartsType: "area" } },
4
- cartesian_bar: { categoryId: "cartesian", typeId: "bar", label: { "en-gb": "Bar" }, options: { highchartsType: "bar" } },
5
- cartesian_column: { categoryId: "cartesian", typeId: "column", label: { "en-gb": "Column" }, options: { highchartsType: "column" } },
6
- cartesian_line: { categoryId: "cartesian", typeId: "line", label: { "en-gb": "Line" }, options: { highchartsType: "line" } },
7
- cartesian_pyramid: { categoryId: "cartesian", typeId: "line", label: { "en-gb": "Pyramid" }, options: { highchartsType: "line" } },
8
- cartesian_spline: { categoryId: "cartesian", typeId: "line", label: { "en-gb": "Spline" }, options: { highchartsType: "line" } },
9
- chordDiagram: { categoryId: "chordDiagram", label: { "en-gb": "Chord Diagram" }, options: {} },
10
- polar_area: { categoryId: "polar", typeId: "area", label: { "en-gb": "Radar (Area)" }, options: { highchartsType: "area" } },
11
- polar_column: { categoryId: "polar", typeId: "column", label: { "en-gb": "Radar (Column)" }, options: { highchartsType: "column" } },
12
- polar_line: { categoryId: "polar", typeId: "line", label: { "en-gb": "Radar (Line)" }, options: { highchartsType: "line" } },
13
- range_area: { categoryId: "range", typeId: "area", label: { "en-gb": "Range (Area)" }, options: { highchartsType: "arearange" } },
14
- range_bar: { categoryId: "range", typeId: "bar", label: { "en-gb": "Range (Bar)" }, options: { highchartsType: "columnrange", inverted: !0 } },
15
- range_column: { categoryId: "range", typeId: "column", label: { "en-gb": "Range (Column)" }, options: { highchartsType: "columnrange" } },
16
- sankeyDiagram: { categoryId: "sankeyDiagram", label: { "en-gb": "Sankey Diagram" }, options: {} },
17
- streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
18
- values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
19
- };
20
- function M() {
1
+ const C = ["createObject", "dropObject", "removeRecords", "upsertRecords"], $ = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
2
+ function _() {
21
3
  function e(t, a, r) {
22
4
  r.textContent = "Cytoscape.js diagram goes here...";
23
5
  }
24
6
  return { render: e };
25
7
  }
26
- function U() {
8
+ function L() {
27
9
  function e(t, a, r) {
28
10
  r.textContent = "values table goes here...";
29
11
  }
@@ -31,7 +13,7 @@ function U() {
31
13
  }
32
14
  const v = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", x = "highcharts";
33
15
  let b, T = !1;
34
- function j() {
16
+ function F() {
35
17
  async function e(n, s, u, h) {
36
18
  await r();
37
19
  const l = [];
@@ -95,6 +77,25 @@ function j() {
95
77
  }
96
78
  return { renderCartesianChart: e, renderPolarChart: t, renderRangeChart: a };
97
79
  }
80
+ const k = 0, M = (e) => e, U = () => Date.now(), j = {
81
+ cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
82
+ cartesian_areaSpline: { categoryId: "cartesian", typeId: "areaSpline", label: { "en-gb": "Area Spline" }, options: { highchartsType: "area" } },
83
+ cartesian_bar: { categoryId: "cartesian", typeId: "bar", label: { "en-gb": "Bar" }, options: { highchartsType: "bar" } },
84
+ cartesian_column: { categoryId: "cartesian", typeId: "column", label: { "en-gb": "Column" }, options: { highchartsType: "column" } },
85
+ cartesian_line: { categoryId: "cartesian", typeId: "line", label: { "en-gb": "Line" }, options: { highchartsType: "line" } },
86
+ cartesian_pyramid: { categoryId: "cartesian", typeId: "line", label: { "en-gb": "Pyramid" }, options: { highchartsType: "line" } },
87
+ cartesian_spline: { categoryId: "cartesian", typeId: "line", label: { "en-gb": "Spline" }, options: { highchartsType: "line" } },
88
+ chordDiagram: { categoryId: "chordDiagram", label: { "en-gb": "Chord Diagram" }, options: {} },
89
+ polar_area: { categoryId: "polar", typeId: "area", label: { "en-gb": "Radar (Area)" }, options: { highchartsType: "area" } },
90
+ polar_column: { categoryId: "polar", typeId: "column", label: { "en-gb": "Radar (Column)" }, options: { highchartsType: "column" } },
91
+ polar_line: { categoryId: "polar", typeId: "line", label: { "en-gb": "Radar (Line)" }, options: { highchartsType: "line" } },
92
+ range_area: { categoryId: "range", typeId: "area", label: { "en-gb": "Range (Area)" }, options: { highchartsType: "arearange" } },
93
+ range_bar: { categoryId: "range", typeId: "bar", label: { "en-gb": "Range (Bar)" }, options: { highchartsType: "columnrange", inverted: !0 } },
94
+ range_column: { categoryId: "range", typeId: "column", label: { "en-gb": "Range (Column)" }, options: { highchartsType: "columnrange" } },
95
+ sankeyDiagram: { categoryId: "sankeyDiagram", label: { "en-gb": "Sankey Diagram" }, options: {} },
96
+ streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
97
+ values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
98
+ };
98
99
  class I extends Error {
99
100
  locator;
100
101
  constructor(t, a, r) {
@@ -327,7 +328,7 @@ export {
327
328
  C as CONNECTOR_DESTINATION_OPERATIONS,
328
329
  $ as CONNECTOR_SOURCE_OPERATIONS,
329
330
  d as DEFAULT_LOCALE_CODE,
330
- _ as DefaultTimestamp,
331
+ k as DefaultTimestamp,
331
332
  H as EngineError,
332
333
  w as FetchError,
333
334
  z as OperationalError,
@@ -336,7 +337,7 @@ export {
336
337
  P as WindowRuntimeError,
337
338
  V as buildFetchError,
338
339
  X as concatenateSerialisedErrorMessages,
339
- L as convertMillisecondsToTimestamp,
340
+ M as convertMillisecondsToTimestamp,
340
341
  K as convertODataTypeIdToUsageTypeId,
341
342
  Q as extractExtensionFromPath,
342
343
  q as extractNameFromPath,
@@ -346,15 +347,15 @@ export {
346
347
  Z as formatNumberAsStorageSize,
347
348
  E as formatNumberAsWholeNumber,
348
349
  oe as getComponentStatus,
349
- F as getCurrentTimestamp,
350
+ U as getCurrentTimestamp,
350
351
  te as getDataFormats,
351
352
  ae as getRecordDelimiters,
352
353
  ne as getValueDelimiters,
353
354
  re as lookupMimeTypeForExtension,
354
355
  G as normalizeToError,
355
- k as presentationViewTypeMap,
356
+ j as presentationViewTypeMap,
356
357
  J as serialiseError,
357
- M as useCytoscapeJS,
358
- U as useDataTable,
359
- j as useHighcharts
358
+ _ as useCytoscapeJS,
359
+ L as useDataTable,
360
+ F as useHighcharts
360
361
  };
@@ -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 { ComponentConfig } from '..';
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 '../../appUtilities';
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 { ComponentConfig, ComponentRef } from '..';
2
- export interface Context {
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 { ConnectionColumnConfig, ConnectionNodeConfig } from '../../connection';
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,3 @@
1
+ /**
2
+ * Document composables, constants, types/interfaces, errors and utilities..
3
+ */
@@ -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 { ComponentConfig, ComponentRef } from '..';
3
- export interface Presenter {
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
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Shared composables, constants, interfaces, errors, types and utilities.
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>;
@@ -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, ContextModelGroupConfig, ContextModelGroupLocalisedConfig, ContextModelConfig, ContextModelLocalisedConfig, ContextModelDimensionGroupConfig, ContextModelDimensionGroupLocalisedConfig, ContextModelDimensionConfig, ContextModelDimensionLocalisedConfig, ContextModelDimensionHierarchyConfig, ContextModelDimensionHierarchyLocalisedConfig, ContextModelEntityGroupConfig, ContextModelEntityGroupLocalisedConfig, ContextModelEntityConfig, ContextModelEntityLocalisedConfig, ContextModelEntityDataItemConfig, // Data items.
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, ContextModelSecondaryMeasureGroupConfig, ContextModelSecondaryMeasureGroupLocalisedConfig, ContextModelSecondaryMeasureConfig, ContextModelSecondaryMeasureLocalisedConfig } from './component/context';
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
- export declare const DEFAULT_LOCALE_CODE: LocaleCode;
53
- export { DefaultTimestamp } from './timestamp';
54
- export { presentationViewTypeMap } from './component/presenter';
55
55
  export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscapeJS';
56
56
  export { useDataTable } from './composables/useDataTable';
57
57
  export { type HighchartsView, useHighcharts } from './composables/useHighcharts';
58
+ export declare const DEFAULT_LOCALE_CODE: LocaleCode;
59
+ export { DefaultTimestamp } from './timestamp';
60
+ export { presentationViewTypeMap } from './component/presenter/presentation';
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 './appUtilities';
62
- export { extractExtensionFromPath, extractNameFromPath } from './appUtilities';
63
- export { formatNumberAsDecimalNumber, formatNumberAsDuration, formatNumberAsSize, formatNumberAsStorageSize, formatNumberAsWholeNumber } from './appUtilities';
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 './appUtilities';
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' | 'presenter' | 'informer';
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.152",
3
+ "version": "0.3.156",
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.63",
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",