@datapos/datapos-shared 0.3.215 → 0.3.216
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
|
@@ -123,21 +123,21 @@ getComponentStatus('alpha');
|
|
|
123
123
|
The table below lists the repository management commands available in this project.
|
|
124
124
|
For detailed implementation, see the `scripts` section in the `package.json` file.
|
|
125
125
|
|
|
126
|
-
| Name | Key Code | Notes
|
|
127
|
-
| ------------------ | ---------------- |
|
|
128
|
-
| audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities.
|
|
129
|
-
| build | alt+ctrl+shift+b | Build the package using Vite.
|
|
130
|
-
| bump:version | alt+ctrl+shift+v | Increment patch version number.
|
|
131
|
-
| check | alt+ctrl+shift+c |
|
|
132
|
-
| document | alt+ctrl+shift+d | Identify licenses of the project's production and peer dependencies. See [LICENSES.json](./LICENSES.json).
|
|
133
|
-
| format | alt+ctrl+shift+f |
|
|
134
|
-
| lint | alt+ctrl+shift+l |
|
|
135
|
-
| publish:toNPM | alt+ctrl+shift+p | Publish the package to npm.
|
|
136
|
-
| release | alt+ctrl+shift+r | Bump version,
|
|
137
|
-
| send:deployNotice | alt+ctrl+shift+n | ❌ Not implemented.
|
|
138
|
-
| sync:withGitHub | alt+ctrl+shift+s |
|
|
139
|
-
| test | alt+ctrl+shift+t | ❌ Not implemented.
|
|
140
|
-
| update:dataPosDeps | alt+ctrl+shift+
|
|
126
|
+
| Name | Key Code | Notes |
|
|
127
|
+
| ------------------ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
128
|
+
| audit | alt+ctrl+shift+a | Audit the project's dependencies for known security vulnerabilities. |
|
|
129
|
+
| build | alt+ctrl+shift+b | Build the package using Vite. Output to '/dist' directory. |
|
|
130
|
+
| bump:version | alt+ctrl+shift+v | Increment patch version number by 1. |
|
|
131
|
+
| check | alt+ctrl+shift+c | Identify outdated dependencies using npm `outdated` and `npm-check-updates` with option to install latest versions. Also runs `retire` scanner. |
|
|
132
|
+
| document | alt+ctrl+shift+d | Identify licenses of the project's production and peer dependencies. See [LICENSES.json](./LICENSES.json). |
|
|
133
|
+
| format | alt+ctrl+shift+f | Use `prettier`to enforce formatting style rules. |
|
|
134
|
+
| lint | alt+ctrl+shift+l | Use `eslint`to check the code for potential errors and enforces coding style rules. |
|
|
135
|
+
| publish:toNPM | alt+ctrl+shift+p | Publish the package to npm. |
|
|
136
|
+
| release | alt+ctrl+shift+r | Bump version, build library, synchronise with `GitHub` and publish to `npm`. |
|
|
137
|
+
| send:deployNotice | alt+ctrl+shift+n | ❌ Not implemented. |
|
|
138
|
+
| sync:withGitHub | alt+ctrl+shift+s | Synchronise local repository with the main GitHub repository. |
|
|
139
|
+
| test | alt+ctrl+shift+t | ❌ Not implemented. |
|
|
140
|
+
| update:dataPosDeps | alt+ctrl+shift+u | Install the latest version of all Data Positioning dependencies. |
|
|
141
141
|
|
|
142
142
|
## Compliance
|
|
143
143
|
|
|
@@ -11,7 +11,7 @@ function T() {
|
|
|
11
11
|
}
|
|
12
12
|
return { render: e };
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const w = 0, S = (e) => e, N = () => Date.now(), D = {
|
|
15
15
|
cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
|
|
16
16
|
cartesian_areaSpline: { categoryId: "cartesian", typeId: "areaSpline", label: { "en-gb": "Area Spline" }, options: { highchartsType: "area" } },
|
|
17
17
|
cartesian_bar: { categoryId: "cartesian", typeId: "bar", label: { "en-gb": "Bar" }, options: { highchartsType: "bar" } },
|
|
@@ -20,6 +20,7 @@ const S = 0, N = (e) => e, w = () => Date.now(), D = {
|
|
|
20
20
|
cartesian_pyramid: { categoryId: "cartesian", typeId: "line", label: { "en-gb": "Pyramid" }, options: { highchartsType: "line" } },
|
|
21
21
|
cartesian_spline: { categoryId: "cartesian", typeId: "line", label: { "en-gb": "Spline" }, options: { highchartsType: "line" } },
|
|
22
22
|
chordDiagram: { categoryId: "chordDiagram", label: { "en-gb": "Chord Diagram" }, options: {} },
|
|
23
|
+
periodFLowBoundaries: { categoryId: "periodFLowBoundaries", label: { "en-gb": "Period Flow & Boundaries" }, options: {} },
|
|
23
24
|
polar_area: { categoryId: "polar", typeId: "area", label: { "en-gb": "Radar (Area)" }, options: { highchartsType: "area" } },
|
|
24
25
|
polar_column: { categoryId: "polar", typeId: "column", label: { "en-gb": "Radar (Column)" }, options: { highchartsType: "column" } },
|
|
25
26
|
polar_line: { categoryId: "polar", typeId: "line", label: { "en-gb": "Radar (Line)" }, options: { highchartsType: "line" } },
|
|
@@ -30,13 +31,13 @@ const S = 0, N = (e) => e, w = () => Date.now(), D = {
|
|
|
30
31
|
streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
|
|
31
32
|
values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
|
|
32
33
|
};
|
|
33
|
-
class
|
|
34
|
+
class u extends Error {
|
|
34
35
|
locator;
|
|
35
36
|
constructor(t, a, r) {
|
|
36
37
|
super(t, r), this.name = "DataPosError", this.locator = a, Error.captureStackTrace?.(this, new.target);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
class l extends
|
|
40
|
+
class l extends u {
|
|
40
41
|
constructor(t, a, r) {
|
|
41
42
|
super(t, a, r), this.name = "ApplicationError";
|
|
42
43
|
}
|
|
@@ -51,7 +52,7 @@ class C extends l {
|
|
|
51
52
|
super(t, a, r), this.name = "EngineError";
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
class
|
|
55
|
+
class g extends l {
|
|
55
56
|
body;
|
|
56
57
|
constructor(t, a, r, n) {
|
|
57
58
|
super(t, a, n), this.name = "FetchError", this.body = r;
|
|
@@ -74,19 +75,19 @@ class R extends l {
|
|
|
74
75
|
super(t, a, r), this.name = "WindowHandledPromiseRejectionError";
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
class $ extends
|
|
78
|
+
class $ extends u {
|
|
78
79
|
constructor(t, a, r) {
|
|
79
80
|
super(t, a, r), this.name = "OperationalError";
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
async function A(e, t, a) {
|
|
83
84
|
const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, n = await e.text();
|
|
84
|
-
return new
|
|
85
|
+
return new g(r, a, n);
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
+
function F(e) {
|
|
87
88
|
return e.map((t) => t.message).join(" ");
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function _(e, t = "Unknown error.") {
|
|
90
91
|
if (e instanceof Error) return e;
|
|
91
92
|
if (typeof e == "string") return new Error(e);
|
|
92
93
|
try {
|
|
@@ -101,11 +102,11 @@ function k(e) {
|
|
|
101
102
|
for (; r && !t.has(r); ) {
|
|
102
103
|
t.add(r);
|
|
103
104
|
let n;
|
|
104
|
-
if (r instanceof
|
|
105
|
+
if (r instanceof g)
|
|
105
106
|
n = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
106
107
|
else if (r instanceof p)
|
|
107
108
|
n = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
108
|
-
else if (r instanceof
|
|
109
|
+
else if (r instanceof u)
|
|
109
110
|
n = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
110
111
|
else if (r instanceof Error) {
|
|
111
112
|
const s = r;
|
|
@@ -220,7 +221,7 @@ const m = "en-US", c = {}, B = (e) => {
|
|
|
220
221
|
{ id: "\r", label: { "en-gb": "Carriage Return" } },
|
|
221
222
|
{ id: `\r
|
|
222
223
|
`, label: { "en-gb": "Carriage Return/Newline" } }
|
|
223
|
-
],
|
|
224
|
+
], P = (e = i) => {
|
|
224
225
|
const t = [];
|
|
225
226
|
for (const a of h)
|
|
226
227
|
t.push({ ...a, label: a.label[e] || a.label[i] || a.id });
|
|
@@ -237,7 +238,7 @@ const m = "en-US", c = {}, B = (e) => {
|
|
|
237
238
|
{ id: "_", label: { "en-gb": "Underscore" } },
|
|
238
239
|
{ id: "0x1F", label: { "en-gb": "Unit Separator" } },
|
|
239
240
|
{ id: "|", label: { "en-gb": "Vertical Bar" } }
|
|
240
|
-
],
|
|
241
|
+
], X = (e = i) => {
|
|
241
242
|
const t = [];
|
|
242
243
|
for (const a of f)
|
|
243
244
|
t.push({ ...a, label: a.label[e] || a.label[i] || a.id });
|
|
@@ -252,7 +253,7 @@ const m = "en-US", c = {}, B = (e) => {
|
|
|
252
253
|
{ id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
|
|
253
254
|
{ id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
|
|
254
255
|
{ id: "underReview", color: "other", label: { "en-gb": "under-review" } }
|
|
255
|
-
],
|
|
256
|
+
], z = (e, t = i) => {
|
|
256
257
|
const a = y.find((r) => r.id === e);
|
|
257
258
|
return a ? { ...a, label: a.label[t] || a.label[i] || e } : { id: e, color: "other", label: e };
|
|
258
259
|
}, i = "en-gb";
|
|
@@ -262,16 +263,16 @@ export {
|
|
|
262
263
|
E as CONNECTOR_DESTINATION_OPERATIONS,
|
|
263
264
|
I as CONNECTOR_SOURCE_OPERATIONS,
|
|
264
265
|
i as DEFAULT_LOCALE_CODE,
|
|
265
|
-
|
|
266
|
+
w as DefaultTimestamp,
|
|
266
267
|
C as EngineError,
|
|
267
|
-
|
|
268
|
+
g as FetchError,
|
|
268
269
|
$ as OperationalError,
|
|
269
270
|
p as VueError,
|
|
270
271
|
R as WindowPromiseRejectionError,
|
|
271
272
|
O as WindowRuntimeError,
|
|
272
273
|
A as buildFetchError,
|
|
273
|
-
|
|
274
|
-
|
|
274
|
+
F as concatenateSerialisedErrorMessages,
|
|
275
|
+
S as convertMillisecondsToTimestamp,
|
|
275
276
|
B as convertODataTypeIdToUsageTypeId,
|
|
276
277
|
M as extractExtensionFromPath,
|
|
277
278
|
L as extractNameFromPath,
|
|
@@ -280,13 +281,13 @@ export {
|
|
|
280
281
|
j as formatNumberAsSize,
|
|
281
282
|
U as formatNumberAsStorageSize,
|
|
282
283
|
d as formatNumberAsWholeNumber,
|
|
283
|
-
|
|
284
|
-
|
|
284
|
+
z as getComponentStatus,
|
|
285
|
+
N as getCurrentTimestamp,
|
|
285
286
|
G as getDataFormats,
|
|
286
|
-
|
|
287
|
-
|
|
287
|
+
P as getRecordDelimiters,
|
|
288
|
+
X as getValueDelimiters,
|
|
288
289
|
W as lookupMimeTypeForExtension,
|
|
289
|
-
|
|
290
|
+
_ as normalizeToError,
|
|
290
291
|
D as presentationViewTypeMap,
|
|
291
292
|
k as serialiseError,
|
|
292
293
|
x as useCytoscapeJS,
|
|
@@ -22,7 +22,7 @@ export type PresentationVisualContentConfig = {
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
export interface PresentationVisualViewConfig {
|
|
25
|
-
categoryId: 'cartesian' | 'chordDiagram' | 'polar' | 'range' | 'sankeyDiagram' | 'streamgraph' | 'values';
|
|
25
|
+
categoryId: 'cartesian' | 'chordDiagram' | 'periodFlowBoundaries' | 'polar' | 'range' | 'sankeyDiagram' | 'streamgraph' | 'values';
|
|
26
26
|
default?: boolean;
|
|
27
27
|
}
|
|
28
28
|
export interface PresentationVisualCartesianViewConfig extends PresentationVisualViewConfig {
|
|
@@ -49,7 +49,7 @@ export interface PresentationVisualStreamgraphViewConfig extends PresentationVis
|
|
|
49
49
|
export interface PresentationVisualValuesViewConfig extends PresentationVisualViewConfig {
|
|
50
50
|
categoryId: 'values';
|
|
51
51
|
}
|
|
52
|
-
export type PresentationVisualViewType = PresentationVisualCartesianViewType | PresentationVisualChordViewType | PresentationVisualPolarViewType | PresentationVisualRangeViewType | PresentationVisualSankeyDiagramViewType | PresentationVisualStreamgraphViewType | PresentationVisualValuesViewType;
|
|
52
|
+
export type PresentationVisualViewType = PresentationVisualCartesianViewType | PresentationVisualChordViewType | PresentationVisualPeriodFLowBoundariesViewType | PresentationVisualPolarViewType | PresentationVisualRangeViewType | PresentationVisualSankeyDiagramViewType | PresentationVisualStreamgraphViewType | PresentationVisualValuesViewType;
|
|
53
53
|
export type PresentationVisualCartesianViewType = {
|
|
54
54
|
categoryId: 'cartesian';
|
|
55
55
|
typeId: 'areaLine' | 'areaSpline' | 'bar' | 'column' | 'line' | 'pyramid' | 'spline';
|
|
@@ -64,6 +64,11 @@ export type PresentationVisualChordViewType = {
|
|
|
64
64
|
label: Record<string, string>;
|
|
65
65
|
options: {};
|
|
66
66
|
};
|
|
67
|
+
export type PresentationVisualPeriodFLowBoundariesViewType = {
|
|
68
|
+
categoryId: 'periodFLowBoundaries';
|
|
69
|
+
label: Record<string, string>;
|
|
70
|
+
options: {};
|
|
71
|
+
};
|
|
67
72
|
export type PresentationVisualPolarViewType = {
|
|
68
73
|
categoryId: 'polar';
|
|
69
74
|
typeId: 'area' | 'column' | 'line';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.216",
|
|
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,
|
|
@@ -57,13 +57,14 @@
|
|
|
57
57
|
"format": "prettier --write src/",
|
|
58
58
|
"lint": "eslint .",
|
|
59
59
|
"publish:toNPM": "npm publish --access public",
|
|
60
|
-
"release": "npm run
|
|
61
|
-
"sync
|
|
60
|
+
"release": "npm run bump:version && npm run build && npm run _sync:withGitHub && npm run publish:toNPM",
|
|
61
|
+
"sync": "npm run bump:version && npm run _sync:withGitHub",
|
|
62
62
|
"test": "node -e \"import('@datapos/datapos-development').then(m => m.echoScriptNotImplemented('Test'))\"",
|
|
63
|
-
"update:dataPosDeps": "npm run _update:
|
|
63
|
+
"update:dataPosDeps": "npm run _update:developDep",
|
|
64
64
|
"_document:licenceReport": "license-report --only=prod,peer > LICENSES.json",
|
|
65
65
|
"_document:licenceCheck": "license-report-check --source ./LICENSES.json --allowed 'MIT' --allowed 'n/a' --allowed 'Apache-2.0' --output=table",
|
|
66
|
-
"
|
|
66
|
+
"_sync:withGitHub": "node -e \"import('@datapos/datapos-development').then(m => m.syncWithGitHub())\"",
|
|
67
|
+
"_update:developDep": "npm install --save-dev @datapos/datapos-development@latest"
|
|
67
68
|
},
|
|
68
69
|
"engines": {
|
|
69
70
|
"node": ">=22.0.0",
|