@isoftdata/utility-dashboard-backend 4.1.0 → 4.2.1
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/dist/types/chart.d.ts +17 -11
- package/dist/types/report.d.ts +12 -0
- package/package.json +54 -55
package/dist/types/chart.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { NumberFormatOptions, MediumDateFormatOptions, LongDateFormatOptions } from '../formatting-templates.js';
|
|
2
|
+
import type { ReportBodyStyleOptions } from './report.js';
|
|
2
3
|
export type GoogleDataTableCell = {
|
|
3
4
|
v?: unknown;
|
|
4
5
|
f?: string | undefined;
|
|
@@ -152,17 +153,8 @@ export type TableStyleTemplate = {
|
|
|
152
153
|
[key: string]: string | undefined;
|
|
153
154
|
};
|
|
154
155
|
export type ChartSuperType = 'google' | 'table' | 'embed' | 'markdown';
|
|
155
|
-
export
|
|
156
|
-
|
|
157
|
-
name: string;
|
|
158
|
-
showChart: boolean;
|
|
159
|
-
supertype: ChartSuperType;
|
|
160
|
-
title: string;
|
|
161
|
-
description?: string;
|
|
162
|
-
dataSourceName?: string;
|
|
163
|
-
rank?: number;
|
|
164
|
-
reportChartId?: number;
|
|
165
|
-
}
|
|
156
|
+
export type ChartCardStyleFields = 'backgroundColor' | 'backgroundAlpha';
|
|
157
|
+
export type ChartCardStyleOptions = Pick<ReportBodyStyleOptions, ChartCardStyleFields>;
|
|
166
158
|
export interface ChartJson {
|
|
167
159
|
allowExport?: boolean;
|
|
168
160
|
chartWrapper: ChartWrapper | ChartDimensions;
|
|
@@ -179,6 +171,20 @@ export interface ChartJson {
|
|
|
179
171
|
markdown?: {
|
|
180
172
|
content: string;
|
|
181
173
|
};
|
|
174
|
+
cardStyle?: ChartCardStyleOptions;
|
|
175
|
+
headerStyle?: ChartCardStyleOptions;
|
|
176
|
+
bodyStyle?: ChartCardStyleOptions;
|
|
177
|
+
}
|
|
178
|
+
export interface ChartBase extends ChartJson {
|
|
179
|
+
chartId: number;
|
|
180
|
+
name: string;
|
|
181
|
+
showChart: boolean;
|
|
182
|
+
supertype: ChartSuperType;
|
|
183
|
+
title: string;
|
|
184
|
+
description?: string;
|
|
185
|
+
dataSourceName?: string;
|
|
186
|
+
rank?: number;
|
|
187
|
+
reportChartId?: number;
|
|
182
188
|
}
|
|
183
189
|
interface GoogleChart extends ChartBase {
|
|
184
190
|
query: string;
|
package/dist/types/report.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface Report {
|
|
|
10
10
|
parameterValues: DashboardReportParameter[];
|
|
11
11
|
autoRefreshInterval: number | null;
|
|
12
12
|
hideParameters?: boolean;
|
|
13
|
+
bodyStyle?: ReportBodyStyleOptions;
|
|
13
14
|
}
|
|
14
15
|
export interface ReportInput {
|
|
15
16
|
dashboardReportId: number;
|
|
@@ -21,5 +22,16 @@ export interface ReportInput {
|
|
|
21
22
|
ownerId: number | null;
|
|
22
23
|
autoRefreshInterval: number | null;
|
|
23
24
|
parameters: DashboardReportParameter[];
|
|
25
|
+
bodyStyle?: ReportBodyStyleOptions;
|
|
24
26
|
}
|
|
25
27
|
export type ShareType = 'everyone' | 'store' | 'user' | 'group';
|
|
28
|
+
export type ReportBodyStyleOptions = {
|
|
29
|
+
backgroundColor: string | undefined;
|
|
30
|
+
backgroundAlpha: string | undefined;
|
|
31
|
+
backgroundImage: string | undefined;
|
|
32
|
+
backgroundPosition: 'top' | 'bottom' | 'left' | 'right' | 'center' | 'CUSTOM' | undefined;
|
|
33
|
+
backgroundPositionX: string | undefined;
|
|
34
|
+
backgroundPositionY: string | undefined;
|
|
35
|
+
backgroundSize: 'auto' | 'contain' | 'cover' | 'CUSTOM' | undefined;
|
|
36
|
+
backgroundSizePercent: string | undefined;
|
|
37
|
+
};
|
package/package.json
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@isoftdata/utility-dashboard-backend",
|
|
3
|
+
"version": "4.2.1",
|
|
4
|
+
"description": "A utility for formatting chart and report data to be usable by the frontend dashboard component.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"author": "Charles Kaup",
|
|
8
|
+
"license": "ISC",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/**/*.*"
|
|
11
|
+
],
|
|
12
|
+
"types": "dist/index.d.ts",
|
|
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
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@isoftdata/utility-date-time": "^4.3.1",
|
|
25
|
+
"camelcase": "^6.3.0",
|
|
26
|
+
"date-fns": "^4.1.0",
|
|
27
|
+
"deepmerge": "^4.2.2",
|
|
28
|
+
"klona": "^2.0.6",
|
|
29
|
+
"mathjs": "^11.5.0",
|
|
30
|
+
"to-snake-case": "^1.0.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@isoftdata/eslint-config-typescript": "^3.1.4",
|
|
34
|
+
"@isoftdata/prettier-config-base": "^1.0.3",
|
|
35
|
+
"@types/google.visualization": "^0.0.68",
|
|
36
|
+
"@types/node": "^18.19.130",
|
|
37
|
+
"@types/to-snake-case": "^1.0.2",
|
|
38
|
+
"package-preview": "^4.0.0",
|
|
39
|
+
"prettier": "^3.7.4",
|
|
40
|
+
"type-fest": "^4.41.0",
|
|
41
|
+
"typescript": "^5.9.3"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@isoftdata/utility-db": ">4.2.0"
|
|
45
|
+
},
|
|
46
|
+
"prettier": "@isoftdata/prettier-config-base",
|
|
47
|
+
"engines": {
|
|
48
|
+
"pnpm": "10.x"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
52
|
+
"build": "tsc"
|
|
53
|
+
}
|
|
54
|
+
}
|