@isoftdata/utility-dashboard-backend 4.0.0-beta.1 → 4.0.0-beta.3
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 +201 -185
- package/dist/chart-helper.d.ts +3 -2
- package/dist/chart-helper.js +57 -27
- package/dist/index.d.ts +25 -12
- package/dist/index.js +66 -38
- package/dist/style-templates.d.ts +1 -1
- package/dist/style-templates.js +16 -4
- package/dist/types/chart.d.ts +59 -44
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +2 -0
- package/dist/types/parameter.d.ts +9 -5
- package/dist/types/report.d.ts +2 -2
- package/dist/types/session.d.ts +1 -0
- package/package.json +20 -10
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { NamedDateRange } from '@isoftdata/utility-date-time';
|
|
2
|
+
type MaybeArray<T> = T | T[];
|
|
2
3
|
export interface OptionListEntry {
|
|
3
|
-
id:
|
|
4
|
+
id: string;
|
|
4
5
|
name: string;
|
|
5
6
|
rawSql?: boolean;
|
|
6
7
|
fromQuery?: boolean;
|
|
@@ -9,16 +10,16 @@ export type OptionList = Array<OptionListEntry>;
|
|
|
9
10
|
export interface DashboardReportBaseParameter {
|
|
10
11
|
name: string;
|
|
11
12
|
title: string;
|
|
12
|
-
default: string;
|
|
13
|
-
value: string;
|
|
14
|
-
queryValues: Record<string, string |
|
|
13
|
+
default: string | null;
|
|
14
|
+
value: string | null;
|
|
15
|
+
queryValues: Record<string, MaybeArray<string | null>>;
|
|
15
16
|
}
|
|
16
17
|
export interface DashboardReportDateParameter extends DashboardReportBaseParameter {
|
|
17
18
|
type: 'date';
|
|
18
19
|
}
|
|
19
20
|
export interface DashboardReportDateRangeParameter extends DashboardReportBaseParameter {
|
|
20
21
|
type: 'dateRange';
|
|
21
|
-
value: NamedDateRange | 'Custom';
|
|
22
|
+
value: NamedDateRange | 'Custom' | null;
|
|
22
23
|
dates: {
|
|
23
24
|
from: string;
|
|
24
25
|
to: string;
|
|
@@ -38,3 +39,6 @@ export interface DashboardReportSessionParameter extends DashboardReportBasePara
|
|
|
38
39
|
type: 'session';
|
|
39
40
|
}
|
|
40
41
|
export type DashboardReportParameter = DashboardReportDateParameter | DashboardReportSelectionParameter | DashboardReportSiteSelectionParameter | DashboardReportDateRangeParameter | DashboardReportSessionParameter;
|
|
42
|
+
type OmitOutputProperties<T extends DashboardReportBaseParameter> = Omit<T, 'value' | 'queryValues' | 'dates'>;
|
|
43
|
+
export type DashboardReportParameterInput = OmitOutputProperties<DashboardReportDateParameter> | OmitOutputProperties<DashboardReportSelectionParameter> | OmitOutputProperties<DashboardReportSiteSelectionParameter> | OmitOutputProperties<DashboardReportDateRangeParameter> | OmitOutputProperties<DashboardReportSessionParameter>;
|
|
44
|
+
export {};
|
package/dist/types/report.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Chart } from './chart';
|
|
2
|
-
import type { DashboardReportParameter } from './parameter';
|
|
1
|
+
import type { Chart } from './chart.js';
|
|
2
|
+
import type { DashboardReportParameter } from './parameter.js';
|
|
3
3
|
export interface Report {
|
|
4
4
|
dashboardReportId: number;
|
|
5
5
|
name: string;
|
package/dist/types/session.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isoftdata/utility-dashboard-backend",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.3",
|
|
4
4
|
"description": "A utility for formatting chart and report data to be usable by the frontend dashboard component.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
"dist/**/*.*"
|
|
11
11
|
],
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./chart-helper": {
|
|
19
|
+
"import": "./dist/chart-helper.js",
|
|
20
|
+
"types": "./dist/chart-helper.d.ts"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@isoftdata/utility-date-time": "^4.0.1",
|
|
25
|
-
"@isoftdata/utility-db": "4.0.0-beta.
|
|
25
|
+
"@isoftdata/utility-db": "4.0.0-beta.11",
|
|
26
26
|
"@types/to-snake-case": "^1.0.2",
|
|
27
27
|
"camelcase": "^6.3.0",
|
|
28
28
|
"date-fns": "^3.6.0",
|
|
@@ -45,6 +45,16 @@
|
|
|
45
45
|
"typescript": "^5.6.2"
|
|
46
46
|
},
|
|
47
47
|
"prettier": "@isoftdata/prettier-config",
|
|
48
|
+
"eslintConfig": {
|
|
49
|
+
"extends": [
|
|
50
|
+
"@isoftdata/typescript",
|
|
51
|
+
"prettier"
|
|
52
|
+
],
|
|
53
|
+
"ignorePatterns": "dist/**",
|
|
54
|
+
"rules": {
|
|
55
|
+
"@typescript-eslint/no-var-requires": 0
|
|
56
|
+
}
|
|
57
|
+
},
|
|
48
58
|
"engines": {
|
|
49
59
|
"pnpm": "10.x"
|
|
50
60
|
},
|