@isoftdata/utility-dashboard-backend 2.4.0 → 2.4.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/README.md +177 -177
- package/dist/chart-helper.d.ts +30 -30
- package/dist/chart-helper.js +255 -255
- package/dist/formatting-templates.d.ts +3 -3
- package/dist/formatting-templates.js +16 -16
- package/dist/index.d.ts +82 -82
- package/dist/index.js +345 -345
- package/dist/style-templates.d.ts +4 -4
- package/dist/style-templates.js +37 -37
- package/dist/types/chart.d.ts +92 -92
- package/dist/types/chart.js +2 -2
- package/dist/types/parameter.d.ts +38 -38
- package/dist/types/parameter.js +2 -2
- package/dist/types/report.d.ts +25 -24
- package/dist/types/report.js +2 -2
- package/dist/types/session.d.ts +10 -10
- package/dist/types/session.js +2 -2
- package/package.json +46 -46
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RowDataPacket } from "mysql";
|
|
2
|
-
import { TableStyleTemplateObject } from "./types/chart";
|
|
3
|
-
declare function styleRow(row: RowDataPacket, templates: TableStyleTemplateObject): RowDataPacket;
|
|
4
|
-
export default styleRow;
|
|
1
|
+
import { RowDataPacket } from "mysql";
|
|
2
|
+
import { TableStyleTemplateObject } from "./types/chart";
|
|
3
|
+
declare function styleRow(row: RowDataPacket, templates: TableStyleTemplateObject): RowDataPacket;
|
|
4
|
+
export default styleRow;
|
package/dist/style-templates.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const mathjs_1 = require("mathjs");
|
|
7
|
-
const snakecase_keys_1 = __importDefault(require("snakecase-keys"));
|
|
8
|
-
const klona_1 = require("klona");
|
|
9
|
-
const math = (0, mathjs_1.create)(mathjs_1.all);
|
|
10
|
-
math.import({
|
|
11
|
-
locale: (value) => value.toLocaleString(),
|
|
12
|
-
includes: (value, search) => value.includes(search),
|
|
13
|
-
});
|
|
14
|
-
function handleMathJsCellStyleTemplate(row, columnToStyle, templates) {
|
|
15
|
-
const outCell = { value: row[columnToStyle] };
|
|
16
|
-
if (columnToStyle in templates) {
|
|
17
|
-
const scope = (0, snakecase_keys_1.default)((0, klona_1.klona)({ ...row, value: outCell.value }), { deep: true });
|
|
18
|
-
for (const key in templates[columnToStyle]) {
|
|
19
|
-
try {
|
|
20
|
-
const expression = templates[columnToStyle][key] ?? '';
|
|
21
|
-
outCell[key] = math.evaluate(expression, scope);
|
|
22
|
-
}
|
|
23
|
-
catch (err) {
|
|
24
|
-
console.error(`Error evaluating expression: '${templates[columnToStyle][key]}'\n`, err);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return outCell;
|
|
29
|
-
}
|
|
30
|
-
function styleRow(row, templates) {
|
|
31
|
-
const outRow = {};
|
|
32
|
-
for (const columnName in row) {
|
|
33
|
-
outRow[columnName] = handleMathJsCellStyleTemplate(row, columnName, templates);
|
|
34
|
-
}
|
|
35
|
-
return outRow;
|
|
36
|
-
}
|
|
37
|
-
exports.default = styleRow;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mathjs_1 = require("mathjs");
|
|
7
|
+
const snakecase_keys_1 = __importDefault(require("snakecase-keys"));
|
|
8
|
+
const klona_1 = require("klona");
|
|
9
|
+
const math = (0, mathjs_1.create)(mathjs_1.all);
|
|
10
|
+
math.import({
|
|
11
|
+
locale: (value) => value.toLocaleString(),
|
|
12
|
+
includes: (value, search) => value.includes(search),
|
|
13
|
+
});
|
|
14
|
+
function handleMathJsCellStyleTemplate(row, columnToStyle, templates) {
|
|
15
|
+
const outCell = { value: row[columnToStyle] };
|
|
16
|
+
if (columnToStyle in templates) {
|
|
17
|
+
const scope = (0, snakecase_keys_1.default)((0, klona_1.klona)({ ...row, value: outCell.value }), { deep: true });
|
|
18
|
+
for (const key in templates[columnToStyle]) {
|
|
19
|
+
try {
|
|
20
|
+
const expression = templates[columnToStyle][key] ?? '';
|
|
21
|
+
outCell[key] = math.evaluate(expression, scope);
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
console.error(`Error evaluating expression: '${templates[columnToStyle][key]}'\n`, err);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return outCell;
|
|
29
|
+
}
|
|
30
|
+
function styleRow(row, templates) {
|
|
31
|
+
const outRow = {};
|
|
32
|
+
for (const columnName in row) {
|
|
33
|
+
outRow[columnName] = handleMathJsCellStyleTemplate(row, columnName, templates);
|
|
34
|
+
}
|
|
35
|
+
return outRow;
|
|
36
|
+
}
|
|
37
|
+
exports.default = styleRow;
|
|
38
38
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUtdGVtcGxhdGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3N0eWxlLXRlbXBsYXRlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUlBLG1DQUFvQztBQUVwQyxvRUFBMEM7QUFDMUMsaUNBQTZCO0FBRTdCLE1BQU0sSUFBSSxHQUFHLElBQUEsZUFBTSxFQUFDLFlBQUcsQ0FBQyxDQUFBO0FBQ3hCLElBQUksQ0FBQyxNQUFNLENBQUM7SUFDWCxNQUFNLEVBQUUsQ0FBQyxLQUFhLEVBQUUsRUFBRSxDQUFDLEtBQUssQ0FBQyxjQUFjLEVBQUU7SUFDakQsUUFBUSxFQUFFLENBQUMsS0FBYSxFQUFFLE1BQWMsRUFBRSxFQUFFLENBQUMsS0FBSyxDQUFDLFFBQVEsQ0FBQyxNQUFNLENBQUM7Q0FDbkUsQ0FBQyxDQUFBO0FBRUYsU0FBUyw2QkFBNkIsQ0FBQyxHQUFrQixFQUFFLGFBQXFCLEVBQUUsU0FBbUM7SUFDcEgsTUFBTSxPQUFPLEdBQUcsRUFBRSxLQUFLLEVBQUUsR0FBRyxDQUFDLGFBQWEsQ0FBQyxFQUFxQyxDQUFBO0lBQ2hGLElBQUksYUFBYSxJQUFJLFNBQVMsRUFBRTtRQUUvQixNQUFNLEtBQUssR0FBRyxJQUFBLHdCQUFhLEVBQUMsSUFBQSxhQUFLLEVBQUMsRUFBRSxHQUFHLEdBQUcsRUFBRSxLQUFLLEVBQUUsT0FBTyxDQUFDLEtBQUssRUFBRSxDQUFDLEVBQUUsRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQTtRQUNwRixLQUFLLE1BQU0sR0FBRyxJQUFJLFNBQVMsQ0FBQyxhQUFhLENBQUMsRUFBRTtZQUMzQyxJQUFJO2dCQUNILE1BQU0sVUFBVSxHQUFHLFNBQVMsQ0FBQyxhQUFhLENBQUMsQ0FBQyxHQUFHLENBQUMsSUFBSSxFQUFFLENBQUE7Z0JBQ3RELE9BQU8sQ0FBQyxHQUFHLENBQUMsR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLFVBQVUsRUFBRSxLQUFLLENBQUMsQ0FBQTthQUMvQztZQUFDLE9BQU8sR0FBRyxFQUFFO2dCQUdiLE9BQU8sQ0FBQyxLQUFLLENBQUMsaUNBQWlDLFNBQVMsQ0FBQyxhQUFhLENBQUMsQ0FBQyxHQUFHLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQyxDQUFBO2FBQ3ZGO1NBQ0Q7S0FDRDtJQUNELE9BQU8sT0FBTyxDQUFBO0FBQ2YsQ0FBQztBQUVELFNBQVMsUUFBUSxDQUFDLEdBQWtCLEVBQUUsU0FBbUM7SUFDeEUsTUFBTSxNQUFNLEdBQUcsRUFBbUIsQ0FBQTtJQUNsQyxLQUFLLE1BQU0sVUFBVSxJQUFJLEdBQUcsRUFBRTtRQUM3QixNQUFNLENBQUMsVUFBVSxDQUFDLEdBQUcsNkJBQTZCLENBQUMsR0FBRyxFQUFFLFVBQVUsRUFBRSxTQUFTLENBQUMsQ0FBQTtLQUM5RTtJQUNELE9BQU8sTUFBTSxDQUFBO0FBQ2QsQ0FBQztBQUVELGtCQUFlLFFBQVEsQ0FBQSJ9
|
package/dist/types/chart.d.ts
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
export type GoogleDataTableCell = {
|
|
2
|
-
v?: unknown;
|
|
3
|
-
f?: string | undefined;
|
|
4
|
-
p?: unknown;
|
|
5
|
-
};
|
|
6
|
-
export type GoogleDataTableColumn = {
|
|
7
|
-
type: string;
|
|
8
|
-
id?: string | undefined;
|
|
9
|
-
label?: string | undefined;
|
|
10
|
-
pattern?: string | undefined;
|
|
11
|
-
p?: unknown;
|
|
12
|
-
};
|
|
13
|
-
export type GoogleDataTableRow = {
|
|
14
|
-
c: GoogleDataTableCell[];
|
|
15
|
-
p?: unknown;
|
|
16
|
-
};
|
|
17
|
-
export type GoogleDataTable = {
|
|
18
|
-
cols: GoogleDataTableColumn[];
|
|
19
|
-
rows: GoogleDataTableRow[];
|
|
20
|
-
p?: unknown;
|
|
21
|
-
};
|
|
22
|
-
export type ChartWrapper = {
|
|
23
|
-
options: Record<string, unknown>;
|
|
24
|
-
dataTable?: GoogleDataTable;
|
|
25
|
-
chartType: string;
|
|
26
|
-
};
|
|
27
|
-
export type MultiSeriesOptions = {
|
|
28
|
-
value: string;
|
|
29
|
-
series: string;
|
|
30
|
-
groupXAxisBy: string;
|
|
31
|
-
tooltip?: string;
|
|
32
|
-
};
|
|
33
|
-
export type FormattingRule = {
|
|
34
|
-
type: string;
|
|
35
|
-
format: string;
|
|
36
|
-
};
|
|
37
|
-
export type Formatting = Record<string, FormattingRule>;
|
|
38
|
-
export type FormattingTemplates = Record<string, FormattingTemplate>;
|
|
39
|
-
export type FormattingTemplate = {
|
|
40
|
-
prefix?: string;
|
|
41
|
-
fractionDigits?: number;
|
|
42
|
-
groupingSymbol?: string;
|
|
43
|
-
format?: string;
|
|
44
|
-
};
|
|
45
|
-
export type ProcessedFormatting = {
|
|
46
|
-
[key: string]: {
|
|
47
|
-
type: string;
|
|
48
|
-
format: FormattingTemplate | null;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export type TableColumn = {
|
|
52
|
-
property: string;
|
|
53
|
-
name: string;
|
|
54
|
-
class: string;
|
|
55
|
-
};
|
|
56
|
-
export type TableRow = {
|
|
57
|
-
[key: string]: unknown;
|
|
58
|
-
};
|
|
59
|
-
export type Table = {
|
|
60
|
-
rows: TableRow[];
|
|
61
|
-
columns: TableColumn[];
|
|
62
|
-
style?: TableStyleTemplateObject;
|
|
63
|
-
filterEnabled?: boolean;
|
|
64
|
-
perPageCount?: number;
|
|
65
|
-
};
|
|
66
|
-
export type TableStyleTemplateObject = Record<string, TableStyleTemplate>;
|
|
67
|
-
export type TableStyleTemplate = {
|
|
68
|
-
class?: string;
|
|
69
|
-
html?: string;
|
|
70
|
-
[key: string]: string | undefined;
|
|
71
|
-
};
|
|
72
|
-
export type ChartSuperType = 'google' | 'table' | 'embed';
|
|
73
|
-
export type Chart = {
|
|
74
|
-
chartId: string;
|
|
75
|
-
query: string;
|
|
76
|
-
multiSeries?: MultiSeriesOptions;
|
|
77
|
-
formatting?: Formatting;
|
|
78
|
-
chartWrapper: ChartWrapper;
|
|
79
|
-
table?: Table;
|
|
80
|
-
cumulative?: boolean;
|
|
81
|
-
greedyHeight?: boolean;
|
|
82
|
-
greedyWidth?: boolean;
|
|
83
|
-
hideTitle?: boolean;
|
|
84
|
-
name: string;
|
|
85
|
-
showChart: boolean;
|
|
86
|
-
supertype: ChartSuperType;
|
|
87
|
-
title: string;
|
|
88
|
-
description?: string;
|
|
89
|
-
dataSourceName?: string;
|
|
90
|
-
rank?: number;
|
|
91
|
-
reportChartId?: number;
|
|
92
|
-
};
|
|
1
|
+
export type GoogleDataTableCell = {
|
|
2
|
+
v?: unknown;
|
|
3
|
+
f?: string | undefined;
|
|
4
|
+
p?: unknown;
|
|
5
|
+
};
|
|
6
|
+
export type GoogleDataTableColumn = {
|
|
7
|
+
type: string;
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
label?: string | undefined;
|
|
10
|
+
pattern?: string | undefined;
|
|
11
|
+
p?: unknown;
|
|
12
|
+
};
|
|
13
|
+
export type GoogleDataTableRow = {
|
|
14
|
+
c: GoogleDataTableCell[];
|
|
15
|
+
p?: unknown;
|
|
16
|
+
};
|
|
17
|
+
export type GoogleDataTable = {
|
|
18
|
+
cols: GoogleDataTableColumn[];
|
|
19
|
+
rows: GoogleDataTableRow[];
|
|
20
|
+
p?: unknown;
|
|
21
|
+
};
|
|
22
|
+
export type ChartWrapper = {
|
|
23
|
+
options: Record<string, unknown>;
|
|
24
|
+
dataTable?: GoogleDataTable;
|
|
25
|
+
chartType: string;
|
|
26
|
+
};
|
|
27
|
+
export type MultiSeriesOptions = {
|
|
28
|
+
value: string;
|
|
29
|
+
series: string;
|
|
30
|
+
groupXAxisBy: string;
|
|
31
|
+
tooltip?: string;
|
|
32
|
+
};
|
|
33
|
+
export type FormattingRule = {
|
|
34
|
+
type: string;
|
|
35
|
+
format: string;
|
|
36
|
+
};
|
|
37
|
+
export type Formatting = Record<string, FormattingRule>;
|
|
38
|
+
export type FormattingTemplates = Record<string, FormattingTemplate>;
|
|
39
|
+
export type FormattingTemplate = {
|
|
40
|
+
prefix?: string;
|
|
41
|
+
fractionDigits?: number;
|
|
42
|
+
groupingSymbol?: string;
|
|
43
|
+
format?: string;
|
|
44
|
+
};
|
|
45
|
+
export type ProcessedFormatting = {
|
|
46
|
+
[key: string]: {
|
|
47
|
+
type: string;
|
|
48
|
+
format: FormattingTemplate | null;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export type TableColumn = {
|
|
52
|
+
property: string;
|
|
53
|
+
name: string;
|
|
54
|
+
class: string;
|
|
55
|
+
};
|
|
56
|
+
export type TableRow = {
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
};
|
|
59
|
+
export type Table = {
|
|
60
|
+
rows: TableRow[];
|
|
61
|
+
columns: TableColumn[];
|
|
62
|
+
style?: TableStyleTemplateObject;
|
|
63
|
+
filterEnabled?: boolean;
|
|
64
|
+
perPageCount?: number;
|
|
65
|
+
};
|
|
66
|
+
export type TableStyleTemplateObject = Record<string, TableStyleTemplate>;
|
|
67
|
+
export type TableStyleTemplate = {
|
|
68
|
+
class?: string;
|
|
69
|
+
html?: string;
|
|
70
|
+
[key: string]: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
export type ChartSuperType = 'google' | 'table' | 'embed';
|
|
73
|
+
export type Chart = {
|
|
74
|
+
chartId: string;
|
|
75
|
+
query: string;
|
|
76
|
+
multiSeries?: MultiSeriesOptions;
|
|
77
|
+
formatting?: Formatting;
|
|
78
|
+
chartWrapper: ChartWrapper;
|
|
79
|
+
table?: Table;
|
|
80
|
+
cumulative?: boolean;
|
|
81
|
+
greedyHeight?: boolean;
|
|
82
|
+
greedyWidth?: boolean;
|
|
83
|
+
hideTitle?: boolean;
|
|
84
|
+
name: string;
|
|
85
|
+
showChart: boolean;
|
|
86
|
+
supertype: ChartSuperType;
|
|
87
|
+
title: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
dataSourceName?: string;
|
|
90
|
+
rank?: number;
|
|
91
|
+
reportChartId?: number;
|
|
92
|
+
};
|
package/dist/types/chart.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvY2hhcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
export interface OptionListEntry {
|
|
2
|
-
id: number | string;
|
|
3
|
-
name: string;
|
|
4
|
-
rawSql?: boolean;
|
|
5
|
-
fromQuery?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export type OptionList = Array<OptionListEntry>;
|
|
8
|
-
export interface DashboardReportBaseParameter {
|
|
9
|
-
name: string;
|
|
10
|
-
title: string;
|
|
11
|
-
default: string;
|
|
12
|
-
value: string;
|
|
13
|
-
queryValues: Record<string, string | string[]>;
|
|
14
|
-
}
|
|
15
|
-
export interface DashboardReportDateParameter extends DashboardReportBaseParameter {
|
|
16
|
-
type: 'date';
|
|
17
|
-
}
|
|
18
|
-
export interface DashboardReportDateRangeParameter extends DashboardReportBaseParameter {
|
|
19
|
-
type: 'dateRange';
|
|
20
|
-
dates: {
|
|
21
|
-
from: string;
|
|
22
|
-
to: string;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export interface DashboardReportSelectionParameter extends DashboardReportBaseParameter {
|
|
26
|
-
type: 'selection';
|
|
27
|
-
optionList: OptionList;
|
|
28
|
-
optionListQuery?: string;
|
|
29
|
-
}
|
|
30
|
-
export interface DashboardReportSiteSelectionParameter extends DashboardReportBaseParameter {
|
|
31
|
-
type: 'siteSelection';
|
|
32
|
-
optionList: OptionList;
|
|
33
|
-
permission?: string;
|
|
34
|
-
}
|
|
35
|
-
export interface DashboardReportSessionParameter extends DashboardReportBaseParameter {
|
|
36
|
-
type: 'session';
|
|
37
|
-
}
|
|
38
|
-
export type DashboardReportParameter = DashboardReportDateParameter | DashboardReportSelectionParameter | DashboardReportSiteSelectionParameter | DashboardReportDateRangeParameter | DashboardReportSessionParameter;
|
|
1
|
+
export interface OptionListEntry {
|
|
2
|
+
id: number | string;
|
|
3
|
+
name: string;
|
|
4
|
+
rawSql?: boolean;
|
|
5
|
+
fromQuery?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type OptionList = Array<OptionListEntry>;
|
|
8
|
+
export interface DashboardReportBaseParameter {
|
|
9
|
+
name: string;
|
|
10
|
+
title: string;
|
|
11
|
+
default: string;
|
|
12
|
+
value: string;
|
|
13
|
+
queryValues: Record<string, string | string[]>;
|
|
14
|
+
}
|
|
15
|
+
export interface DashboardReportDateParameter extends DashboardReportBaseParameter {
|
|
16
|
+
type: 'date';
|
|
17
|
+
}
|
|
18
|
+
export interface DashboardReportDateRangeParameter extends DashboardReportBaseParameter {
|
|
19
|
+
type: 'dateRange';
|
|
20
|
+
dates: {
|
|
21
|
+
from: string;
|
|
22
|
+
to: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface DashboardReportSelectionParameter extends DashboardReportBaseParameter {
|
|
26
|
+
type: 'selection';
|
|
27
|
+
optionList: OptionList;
|
|
28
|
+
optionListQuery?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface DashboardReportSiteSelectionParameter extends DashboardReportBaseParameter {
|
|
31
|
+
type: 'siteSelection';
|
|
32
|
+
optionList: OptionList;
|
|
33
|
+
permission?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface DashboardReportSessionParameter extends DashboardReportBaseParameter {
|
|
36
|
+
type: 'session';
|
|
37
|
+
}
|
|
38
|
+
export type DashboardReportParameter = DashboardReportDateParameter | DashboardReportSelectionParameter | DashboardReportSiteSelectionParameter | DashboardReportDateRangeParameter | DashboardReportSessionParameter;
|
package/dist/types/parameter.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW1ldGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL3BhcmFtZXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
package/dist/types/report.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { Chart } from './chart';
|
|
2
|
-
import { DashboardReportParameter } from './parameter';
|
|
3
|
-
export interface Report {
|
|
4
|
-
dashboardReportId: number;
|
|
5
|
-
name: string;
|
|
6
|
-
title: string;
|
|
7
|
-
description: string;
|
|
8
|
-
charts: Chart[];
|
|
9
|
-
ownerId: number | null;
|
|
10
|
-
parameterValues: DashboardReportParameter[];
|
|
11
|
-
autoRefreshInterval: number | null;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { Chart } from './chart';
|
|
2
|
+
import { DashboardReportParameter } from './parameter';
|
|
3
|
+
export interface Report {
|
|
4
|
+
dashboardReportId: number;
|
|
5
|
+
name: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
charts: Chart[];
|
|
9
|
+
ownerId: number | null;
|
|
10
|
+
parameterValues: DashboardReportParameter[];
|
|
11
|
+
autoRefreshInterval: number | null;
|
|
12
|
+
hideParameters?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ReportInput {
|
|
15
|
+
dashboardReportId: number;
|
|
16
|
+
reportName: string;
|
|
17
|
+
reportTitle: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
shareId: number | null;
|
|
20
|
+
shareType: ShareType;
|
|
21
|
+
ownerId: number | null;
|
|
22
|
+
autoRefreshInterval: number | null;
|
|
23
|
+
parameters: DashboardReportParameter[];
|
|
24
|
+
}
|
|
25
|
+
export type ShareType = 'everyone' | 'owner' | 'user' | 'group';
|
package/dist/types/report.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVwb3J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL3JlcG9ydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
package/dist/types/session.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type SiteType = 'plant' | 'store' | 'region';
|
|
2
|
-
export interface Session {
|
|
3
|
-
plantId?: number | null;
|
|
4
|
-
storeId?: number | null;
|
|
5
|
-
regionId?: number | null;
|
|
6
|
-
siteId: number | null;
|
|
7
|
-
userAccountId: number | null;
|
|
8
|
-
userName: string;
|
|
9
|
-
companyCode: number;
|
|
10
|
-
}
|
|
1
|
+
export type SiteType = 'plant' | 'store' | 'region';
|
|
2
|
+
export interface Session {
|
|
3
|
+
plantId?: number | null;
|
|
4
|
+
storeId?: number | null;
|
|
5
|
+
regionId?: number | null;
|
|
6
|
+
siteId: number | null;
|
|
7
|
+
userAccountId: number | null;
|
|
8
|
+
userName: string;
|
|
9
|
+
companyCode: number;
|
|
10
|
+
}
|
package/dist/types/session.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vzc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90eXBlcy9zZXNzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
package/package.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@isoftdata/utility-dashboard-backend",
|
|
3
|
-
"version": "2.4.
|
|
4
|
-
"description": "A utility for formatting chart and report data to be usable by the frontend dashboard component.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
-
"build": "tsc",
|
|
9
|
-
"prepublishOnly": "npm run build"
|
|
10
|
-
},
|
|
11
|
-
"author": "Charles Kaup",
|
|
12
|
-
"license": "ISC",
|
|
13
|
-
"files": [
|
|
14
|
-
"dist/**/*.*"
|
|
15
|
-
],
|
|
16
|
-
"types": "dist/index.d.ts",
|
|
17
|
-
"eslintConfig": {
|
|
18
|
-
"extends": "@isoftdata/typescript",
|
|
19
|
-
"ignorePatterns": "dist/**",
|
|
20
|
-
"rules": {
|
|
21
|
-
"@typescript-eslint/no-var-requires": 0
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"dependencies": {
|
|
25
|
-
"@isoftdata/utility-date-time": "^2.0.3",
|
|
26
|
-
"@isoftdata/utility-db": "^1.4.0",
|
|
27
|
-
"camelcase": "^6.3.0",
|
|
28
|
-
"date-fns": "^2.23.0",
|
|
29
|
-
"deepmerge": "^4.2.2",
|
|
30
|
-
"klona": "^2.0.5",
|
|
31
|
-
"mathjs": "^11.5.0",
|
|
32
|
-
"mysql": "^2.18.1",
|
|
33
|
-
"snakecase-keys": "^5.4.4",
|
|
34
|
-
"snakeize": "^0.1.0",
|
|
35
|
-
"to-snake-case": "^1.0.0"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@isoftdata/eslint-config-typescript": "^1.0.13",
|
|
39
|
-
"@types/google.visualization": "^0.0.68",
|
|
40
|
-
"@types/mysql": "github:types/mysql",
|
|
41
|
-
"@types/node": "^18.11.18",
|
|
42
|
-
"eslint": "^7.32.0",
|
|
43
|
-
"package-preview": "^4.0.0",
|
|
44
|
-
"typescript": "^4.9.4"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@isoftdata/utility-dashboard-backend",
|
|
3
|
+
"version": "2.4.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
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"prepublishOnly": "npm run build"
|
|
10
|
+
},
|
|
11
|
+
"author": "Charles Kaup",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/**/*.*"
|
|
15
|
+
],
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"eslintConfig": {
|
|
18
|
+
"extends": "@isoftdata/typescript",
|
|
19
|
+
"ignorePatterns": "dist/**",
|
|
20
|
+
"rules": {
|
|
21
|
+
"@typescript-eslint/no-var-requires": 0
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@isoftdata/utility-date-time": "^2.0.3",
|
|
26
|
+
"@isoftdata/utility-db": "^1.4.0",
|
|
27
|
+
"camelcase": "^6.3.0",
|
|
28
|
+
"date-fns": "^2.23.0",
|
|
29
|
+
"deepmerge": "^4.2.2",
|
|
30
|
+
"klona": "^2.0.5",
|
|
31
|
+
"mathjs": "^11.5.0",
|
|
32
|
+
"mysql": "^2.18.1",
|
|
33
|
+
"snakecase-keys": "^5.4.4",
|
|
34
|
+
"snakeize": "^0.1.0",
|
|
35
|
+
"to-snake-case": "^1.0.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@isoftdata/eslint-config-typescript": "^1.0.13",
|
|
39
|
+
"@types/google.visualization": "^0.0.68",
|
|
40
|
+
"@types/mysql": "github:types/mysql",
|
|
41
|
+
"@types/node": "^18.11.18",
|
|
42
|
+
"eslint": "^7.32.0",
|
|
43
|
+
"package-preview": "^4.0.0",
|
|
44
|
+
"typescript": "^4.9.4"
|
|
45
|
+
}
|
|
46
|
+
}
|