@datapos/datapos-shared 0.3.154 → 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,95 +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
+
34
36
  ### Modules
35
37
 
36
38
  The Data Positioning solution consists of the following modules. All modules, except `App`, extend the base type `Module`.
37
39
 
38
40
  | Type | Dynamic | Notes |
39
41
  | --------- | :-----: | --------------------------------------------------------------- |
40
- | App | | Implements the Data Positioning web application. |
42
+ | App | | Implements the data positioning web application. |
41
43
  | Engine | ✔ | Implements the data positioning engine. |
42
- | Connector | ✔ | Implements a connector which supports one or more connections. |
44
+ | Connector | ✔ | Implements a connector which handles one or more connections. |
43
45
  | Context | ✔ | Implements a context which defines one or more models. |
44
46
  | Informer | ✔ | Implements an informer which renders one or more documents. |
45
47
  | Presenter | ✔ | Implements a presenter which renders one or more presentations. |
46
48
 
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
75
-
76
- | Item | Notes |
77
- | ------------------------------------- | ------------------------------------------------------------ |
78
- | [Component Types](./src/component.ts) | The Component type serves as a base type for all components. |
79
- | ComponentRef | |
80
- | ComponentStatus | |
81
- | ComponentStatusId | |
82
- | ComponentTypeId | |
83
- | StatusColorId | |
84
-
85
- ### Engine Module Components
86
-
87
- | Item | Notes |
88
- | ---- | ----- |
89
- | | |
90
-
91
- ### Connector Module Components
49
+ ### Components
50
+
51
+ Each module implements a set of components. All module component types extend the base component types.
52
+
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 | |
61
+
62
+ #### Connector Module Components
92
63
 
93
64
  | Item | Notes |
94
65
  | --------------------------------------- | ----------------------------------------------------------------- |
95
66
  | [Connector Types](./src/connector.ts) | Connector types. The Connector type extends the Component type. |
96
67
  | [Connection Types](./src/connection.ts) | Connection types. The Connection type extends the Component type. |
97
68
 
98
- ### Context Module Components
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
99
86
 
100
87
  | Item | Notes |
101
88
  | ------------------------------------------- | --------------------------------------------------------------------- |
102
- | [Context Types](./src/context.ts) | Context types. The Context type extends the Component type. |
103
- | [Data View Types](./src/dataView.ts) | DataView types. The DataView type extends the Component type. |
104
- | [Dimension Types](./src/dimension.ts) | Dimension types. The Dimension type extends the Component type. |
105
- | [Engine Types](./src/dimension.ts) | Engine types. |
106
- | [Event Query Types](./src/eventQuery.ts) | Event Query types. The Event Query type extends the Component type. |
107
89
  | [Presenter Types](./src/presenter.ts) | Presenter types. The Presenter type extends the Component type. |
108
90
  | [Presentation Types](./src/presentation.ts) | Presentation types. The Presentation type extends the Component type. |
109
- | [Informer Types](./src/informer.ts) | Informer types. The Informer type extends the Component type. |
110
- | [Recipe Types](./src/recipe.ts) | Recipe types. The Recipe type extends the Component type. |
111
91
 
112
- ### Informer Module Components
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
113
100
 
114
- | Item | Notes |
115
- | ---- | ----- |
116
- | | |
101
+ ### Constants
117
102
 
118
- ### Presenter Module Components
103
+ ### Errors
119
104
 
120
- | Item | Notes |
121
- | ---- | ----- |
122
- | | |
105
+ ### Utilities
123
106
 
124
107
  ## Usage
125
108
 
@@ -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,3 +1,3 @@
1
1
  /**
2
- * Document composables, constants, interfaces, errors, types and utilities.
2
+ * Document composables, constants, types/interfaces, errors and utilities..
3
3
  */
@@ -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>;
@@ -52,12 +52,12 @@ export interface ContextOperationSettings {
52
52
  sessionAccessToken?: string;
53
53
  }
54
54
  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
55
  export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscapeJS';
59
56
  export { useDataTable } from './composables/useDataTable';
60
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';
61
61
  export { APIError, ApplicationError, EngineError, FetchError, OperationalError, VueError, WindowRuntimeError, WindowPromiseRejectionError } from './errors';
62
62
  export { buildFetchError, concatenateSerialisedErrorMessages, normalizeToError, serialiseError } from './errors';
63
63
  export { convertMillisecondsToTimestamp, getCurrentTimestamp } from './timestamp';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.154",
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",