@gridsuite/commons-ui 0.58.0 → 0.59.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/chunks/{criteria-based-filter-edition-dialog.CbhgOSRk.js → criteria-based-filter-edition-dialog.DcXcQOoT.js} +21 -65
- package/dist/components/AuthenticationRouter/AuthenticationRouter.d.ts +28 -9
- package/dist/components/AuthenticationRouter/AuthenticationRouter.js +1 -1
- package/dist/components/AuthenticationRouter/index.d.ts +6 -0
- package/dist/components/CardErrorBoundary/card-error-boundary.d.ts +27 -13
- package/dist/components/CardErrorBoundary/card-error-boundary.js +7 -6
- package/dist/components/CardErrorBoundary/index.d.ts +6 -0
- package/dist/components/CustomAGGrid/custom-aggrid.d.ts +11 -0
- package/dist/components/CustomAGGrid/custom-aggrid.js +73 -0
- package/dist/components/CustomAGGrid/custom-aggrid.style.d.ts +20 -0
- package/dist/components/CustomAGGrid/custom-aggrid.style.js +47 -0
- package/dist/components/DirectoryItemSelector/directory-item-selector.d.ts +0 -4
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +13 -26
- package/dist/components/ElementSearchDialog/equipment-item.d.ts +25 -16
- package/dist/components/ElementSearchDialog/equipment-item.js +5 -5
- package/dist/components/ElementSearchDialog/index.d.ts +6 -0
- package/dist/components/ElementSearchDialog/tag-renderer.d.ts +20 -10
- package/dist/components/ElementSearchDialog/tag-renderer.js +6 -11
- package/dist/components/FlatParameters/FlatParameters.d.ts +29 -9
- package/dist/components/FlatParameters/FlatParameters.js +3 -3
- package/dist/components/FlatParameters/index.d.ts +6 -0
- package/dist/components/Login/Login.d.ts +11 -4
- package/dist/components/Login/Logout.d.ts +11 -4
- package/dist/components/Login/index.d.ts +6 -0
- package/dist/components/MuiVirtualizedTable/ColumnHeader.d.ts +25 -2
- package/dist/components/MuiVirtualizedTable/ColumnHeader.js +68 -59
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.d.ts +72 -61
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +69 -83
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.d.ts +93 -113
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +84 -106
- package/dist/components/MuiVirtualizedTable/index.d.ts +7 -1
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.d.ts +16 -9
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +1 -1
- package/dist/components/MultipleSelectionDialog/index.d.ts +6 -0
- package/dist/components/OverflowableText/index.d.ts +6 -0
- package/dist/components/OverflowableText/overflowable-text.d.ts +11 -1
- package/dist/components/OverflowableText/overflowable-text.js +1 -18
- package/dist/components/ReportViewer/filter-button.d.ts +11 -1
- package/dist/components/ReportViewer/filter-button.js +5 -2
- package/dist/components/ReportViewer/index.d.ts +6 -0
- package/dist/components/ReportViewer/log-report-item.d.ts +14 -64
- package/dist/components/ReportViewer/log-report-item.js +13 -47
- package/dist/components/ReportViewer/log-report.d.ts +16 -17
- package/dist/components/ReportViewer/log-report.js +2 -1
- package/dist/components/ReportViewer/log-severity.d.ts +13 -0
- package/dist/components/ReportViewer/log-severity.js +35 -0
- package/dist/components/ReportViewer/log-table.d.ts +9 -6
- package/dist/components/ReportViewer/log-table.js +6 -4
- package/dist/components/ReportViewer/multi-select-list.d.ts +17 -1
- package/dist/components/ReportViewer/report-item.d.ts +12 -12
- package/dist/components/ReportViewer/report-item.js +0 -7
- package/dist/components/ReportViewer/report-tree-view-context.d.ts +11 -1
- package/dist/components/ReportViewer/report-viewer.d.ts +7 -4
- package/dist/components/ReportViewer/report-viewer.js +8 -6
- package/dist/components/ReportViewer/report.type.d.ts +22 -0
- package/dist/components/ReportViewer/report.type.js +1 -0
- package/dist/components/ReportViewerDialog/index.d.ts +6 -0
- package/dist/components/ReportViewerDialog/report-viewer-dialog.d.ts +9 -1
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +7 -4
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +4 -1
- package/dist/components/SignInCallbackHandler/index.d.ts +6 -0
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +7 -4
- package/dist/components/SilentRenewCallbackHandler/index.d.ts +6 -0
- package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +3 -1
- package/dist/components/SnackbarProvider/SnackbarProvider.js +9 -7
- package/dist/components/SnackbarProvider/index.d.ts +6 -0
- package/dist/components/TopBar/AboutDialog.d.ts +30 -23
- package/dist/components/TopBar/AboutDialog.js +4 -22
- package/dist/components/TopBar/GridLogo.d.ts +13 -32
- package/dist/components/TopBar/GridLogo.js +12 -15
- package/dist/components/TopBar/TopBar.d.ts +52 -51
- package/dist/components/TopBar/TopBar.js +389 -380
- package/dist/components/TopBar/TopBar.test.d.ts +6 -0
- package/dist/components/TopBar/index.d.ts +6 -0
- package/dist/components/dialogs/modify-element-selection.d.ts +1 -1
- package/dist/components/dialogs/modify-element-selection.js +5 -14
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.d.ts +1 -1
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +1 -1
- package/dist/components/filter/criteria-based/filter-free-properties.d.ts +1 -1
- package/dist/components/filter/criteria-based/filter-property.d.ts +1 -1
- package/dist/components/filter/expert/expert-filter-constants.d.ts +22 -1
- package/dist/components/filter/expert/expert-filter-constants.js +39 -10
- package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +0 -6
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +1 -2
- package/dist/components/filter/expert/expert-filter-form.js +1 -1
- package/dist/components/filter/expert/expert-filter.type.d.ts +4 -1
- package/dist/components/filter/expert/expert-filter.type.js +3 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +1 -1
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +1 -1
- package/dist/components/filter/filter-creation-dialog.d.ts +0 -7
- package/dist/components/filter/filter-creation-dialog.js +1 -2
- package/dist/components/filter/filter-form.js +1 -1
- package/dist/components/filter/utils/filter-form-utils.d.ts +3 -2
- package/dist/components/filter/utils/filter-form-utils.js +42 -28
- package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +1 -1
- package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +6 -13
- package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +1 -1
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.d.ts +9 -15
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.js +0 -7
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.d.ts +8 -13
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.js +0 -6
- package/dist/components/inputs/react-hook-form/booleans/switch-input.d.ts +8 -13
- package/dist/components/inputs/react-hook-form/booleans/switch-input.js +0 -6
- package/dist/components/inputs/react-hook-form/directory-items-input.d.ts +0 -2
- package/dist/components/inputs/react-hook-form/directory-items-input.js +10 -14
- package/dist/components/inputs/react-hook-form/error-management/mid-form-error.d.ts +5 -3
- package/dist/components/inputs/react-hook-form/numbers/integer-input.d.ts +3 -20
- package/dist/components/inputs/react-hook-form/numbers/integer-input.js +1 -4
- package/dist/components/inputs/react-hook-form/range-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/select-inputs/countries-input.js +12 -1
- package/dist/components/inputs/react-hook-form/select-inputs/select-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/slider-input.d.ts +7 -20
- package/dist/components/inputs/react-hook-form/slider-input.js +4 -12
- package/dist/components/inputs/react-hook-form/text-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/unique-name-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +1 -1
- package/dist/components/inputs/react-query-builder/element-value-editor.js +8 -14
- package/dist/components/inputs/react-query-builder/remove-button.js +1 -1
- package/dist/components/inputs/react-query-builder/value-editor.js +1 -1
- package/dist/components/translations/card-error-boundary-en.d.ts +1 -1
- package/dist/components/translations/card-error-boundary-fr.d.ts +1 -1
- package/dist/components/translations/common-button-en.d.ts +10 -4
- package/dist/components/translations/common-button-fr.d.ts +10 -4
- package/dist/components/translations/directory-items-input-en.d.ts +1 -1
- package/dist/components/translations/directory-items-input-fr.d.ts +1 -1
- package/dist/components/translations/element-search-en.d.ts +1 -1
- package/dist/components/translations/element-search-fr.d.ts +1 -1
- package/dist/components/translations/equipment-search-en.d.ts +1 -1
- package/dist/components/translations/equipment-search-fr.d.ts +1 -1
- package/dist/components/translations/filter-en.d.ts +27 -21
- package/dist/components/translations/filter-en.js +2 -1
- package/dist/components/translations/filter-expert-en.d.ts +73 -0
- package/dist/components/translations/filter-expert-en.js +69 -0
- package/dist/components/translations/filter-expert-fr.d.ts +73 -0
- package/dist/components/translations/filter-expert-fr.js +69 -0
- package/dist/components/translations/filter-fr.d.ts +27 -21
- package/dist/components/translations/filter-fr.js +2 -1
- package/dist/components/translations/flat-parameters-en.d.ts +1 -1
- package/dist/components/translations/flat-parameters-fr.d.ts +1 -1
- package/dist/components/translations/inputs-en.d.ts +1 -1
- package/dist/components/translations/inputs-fr.d.ts +1 -1
- package/dist/components/translations/login-en.d.ts +1 -1
- package/dist/components/translations/login-fr.d.ts +1 -1
- package/dist/components/translations/multiple-selection-dialog-en.d.ts +1 -1
- package/dist/components/translations/multiple-selection-dialog-fr.d.ts +1 -1
- package/dist/components/translations/report-viewer-en.d.ts +1 -1
- package/dist/components/translations/report-viewer-fr.d.ts +1 -1
- package/dist/components/translations/table-en.d.ts +1 -1
- package/dist/components/translations/table-fr.d.ts +1 -1
- package/dist/components/translations/top-bar-en.d.ts +1 -1
- package/dist/components/translations/top-bar-fr.d.ts +1 -1
- package/dist/components/translations/treeview-finder-en.d.ts +1 -1
- package/dist/components/translations/treeview-finder-fr.d.ts +1 -1
- package/dist/hooks/localized-countries-hook.d.ts +10 -4
- package/dist/hooks/localized-countries-hook.js +1 -1
- package/dist/hooks/predefined-properties-hook.d.ts +1 -15
- package/dist/hooks/predefined-properties-hook.js +8 -16
- package/dist/index.d.ts +65 -217
- package/dist/index.js +104 -77
- package/dist/module-mui.d.js +1 -0
- package/dist/redux/actions.d.ts +33 -29
- package/dist/services/apps-metadata.d.ts +32 -0
- package/dist/services/apps-metadata.js +26 -0
- package/dist/services/directory.d.ts +6 -0
- package/dist/services/directory.js +42 -0
- package/dist/services/explore.d.ts +2 -0
- package/dist/services/explore.js +29 -1
- package/dist/services/index.d.ts +16 -0
- package/dist/services/index.js +20 -0
- package/dist/services/utils.d.ts +1 -0
- package/dist/services/utils.js +5 -1
- package/dist/utils/AuthService.d.ts +20 -9
- package/dist/utils/AuthService.js +29 -13
- package/dist/utils/ElementIcon.d.ts +4 -1
- package/dist/utils/EquipmentType.d.ts +13 -9
- package/dist/utils/EquipmentType.js +9 -9
- package/dist/utils/UserManagerMock.d.ts +14 -14
- package/dist/utils/UserManagerMock.js +9 -15
- package/dist/utils/algos.d.ts +1 -1
- package/dist/utils/equipment-types-for-predefined-properties-mapper.d.ts +1 -1
- package/dist/utils/functions.d.ts +0 -1
- package/dist/utils/functions.js +1 -3
- package/dist/utils/styles.d.ts +5 -3
- package/dist/utils/styles.js +4 -1
- package/dist/utils/types.d.ts +13 -3
- package/package.json +2 -1
- package/dist/components/filter/filter-context.d.ts +0 -13
- package/dist/components/filter/filter-context.js +0 -11
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
const _LogReportItem = class _LogReportItem {
|
|
1
|
+
import { LogSeverities } from "./log-severity.js";
|
|
2
|
+
class LogReportItem {
|
|
8
3
|
static resolveTemplateMessage(templateMessage, templateValues) {
|
|
9
4
|
const templateVars = {};
|
|
10
5
|
for (const [key, value] of Object.entries(templateValues)) {
|
|
@@ -12,17 +7,19 @@ const _LogReportItem = class _LogReportItem {
|
|
|
12
7
|
}
|
|
13
8
|
return templateMessage.replace(/\${([^{}]*)}/g, function(a, b) {
|
|
14
9
|
let r = templateVars[b];
|
|
15
|
-
return typeof r === "string" || typeof r === "number" ? r : a;
|
|
10
|
+
return typeof r === "string" || typeof r === "number" ? r.toString() : a;
|
|
16
11
|
});
|
|
17
12
|
}
|
|
18
13
|
constructor(jsonReport, reportId) {
|
|
19
14
|
this.key = jsonReport.reportKey;
|
|
20
|
-
this.log =
|
|
15
|
+
this.log = LogReportItem.resolveTemplateMessage(
|
|
21
16
|
jsonReport.defaultMessage,
|
|
22
17
|
jsonReport.values
|
|
23
18
|
);
|
|
24
19
|
this.reportId = reportId;
|
|
25
|
-
this.severity = this.initSeverity(
|
|
20
|
+
this.severity = this.initSeverity(
|
|
21
|
+
jsonReport.values["reportSeverity"]
|
|
22
|
+
);
|
|
26
23
|
}
|
|
27
24
|
getLog() {
|
|
28
25
|
return this.log;
|
|
@@ -43,12 +40,14 @@ const _LogReportItem = class _LogReportItem {
|
|
|
43
40
|
return this.severity.colorHexCode;
|
|
44
41
|
}
|
|
45
42
|
initSeverity(jsonSeverity) {
|
|
46
|
-
let severity =
|
|
43
|
+
let severity = LogSeverities.UNKNOWN;
|
|
47
44
|
if (!jsonSeverity) {
|
|
48
45
|
return severity;
|
|
49
46
|
}
|
|
50
|
-
Object.values(
|
|
51
|
-
let severityFound = jsonSeverity.value.includes(
|
|
47
|
+
Object.values(LogSeverities).some((value) => {
|
|
48
|
+
let severityFound = jsonSeverity.value.includes(
|
|
49
|
+
value.name
|
|
50
|
+
);
|
|
52
51
|
if (severityFound) {
|
|
53
52
|
severity = value;
|
|
54
53
|
}
|
|
@@ -56,40 +55,7 @@ const _LogReportItem = class _LogReportItem {
|
|
|
56
55
|
});
|
|
57
56
|
return severity;
|
|
58
57
|
}
|
|
59
|
-
}
|
|
60
|
-
__publicField(_LogReportItem, "SEVERITY", {
|
|
61
|
-
UNKNOWN: {
|
|
62
|
-
name: "UNKNOWN",
|
|
63
|
-
level: 0,
|
|
64
|
-
colorName: "cornflowerblue",
|
|
65
|
-
colorHexCode: "#6495ED"
|
|
66
|
-
},
|
|
67
|
-
INFO: {
|
|
68
|
-
name: "INFO",
|
|
69
|
-
level: 1,
|
|
70
|
-
colorName: "mediumseagreen",
|
|
71
|
-
colorHexCode: "#3CB371"
|
|
72
|
-
},
|
|
73
|
-
WARN: {
|
|
74
|
-
name: "WARN",
|
|
75
|
-
level: 2,
|
|
76
|
-
colorName: "orange",
|
|
77
|
-
colorHexCode: "#FFA500"
|
|
78
|
-
},
|
|
79
|
-
ERROR: {
|
|
80
|
-
name: "ERROR",
|
|
81
|
-
level: 3,
|
|
82
|
-
colorName: "crimson",
|
|
83
|
-
colorHexCode: "#DC143C"
|
|
84
|
-
},
|
|
85
|
-
FATAL: {
|
|
86
|
-
name: "FATAL",
|
|
87
|
-
level: 4,
|
|
88
|
-
colorName: "mediumorchid",
|
|
89
|
-
colorHexCode: "#BA55D3"
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
let LogReportItem = _LogReportItem;
|
|
58
|
+
}
|
|
93
59
|
export {
|
|
94
60
|
LogReportItem as default
|
|
95
61
|
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
+
import { LogSeverity } from './log-severity';
|
|
2
|
+
import { Report } from './report.type';
|
|
3
|
+
import { default as LogReportItem } from './log-report-item';
|
|
4
|
+
|
|
1
5
|
export default class LogReport {
|
|
2
|
-
constructor(jsonReporter: any, parentReportId: any);
|
|
3
6
|
id: string;
|
|
4
|
-
key:
|
|
5
|
-
title:
|
|
6
|
-
subReports:
|
|
7
|
-
logs:
|
|
8
|
-
parentReportId
|
|
7
|
+
key: string;
|
|
8
|
+
title: string;
|
|
9
|
+
subReports: LogReport[];
|
|
10
|
+
logs: LogReportItem[];
|
|
11
|
+
parentReportId?: string;
|
|
12
|
+
constructor(jsonReporter: Report, parentReportId?: string);
|
|
9
13
|
getId(): string;
|
|
10
|
-
getTitle():
|
|
11
|
-
getSubReports():
|
|
12
|
-
getLogs():
|
|
13
|
-
getAllLogs():
|
|
14
|
-
init(jsonReporter:
|
|
15
|
-
getHighestSeverity(currentSeverity?:
|
|
16
|
-
name: string;
|
|
17
|
-
level: number;
|
|
18
|
-
colorName: string;
|
|
19
|
-
colorHexCode: string;
|
|
20
|
-
}): any;
|
|
14
|
+
getTitle(): string;
|
|
15
|
+
getSubReports(): LogReport[];
|
|
16
|
+
getLogs(): LogReportItem[];
|
|
17
|
+
getAllLogs(): LogReportItem[];
|
|
18
|
+
init(jsonReporter: Report): void;
|
|
19
|
+
getHighestSeverity(currentSeverity?: LogSeverity): LogSeverity;
|
|
21
20
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import LogReportItem from "./log-report-item.js";
|
|
2
2
|
import { v4 } from "uuid";
|
|
3
|
+
import { LogSeverities } from "./log-severity.js";
|
|
3
4
|
class LogReport {
|
|
4
5
|
constructor(jsonReporter, parentReportId) {
|
|
5
6
|
this.id = v4();
|
|
@@ -38,7 +39,7 @@ class LogReport {
|
|
|
38
39
|
(value) => this.logs.push(new LogReportItem(value, this.id))
|
|
39
40
|
);
|
|
40
41
|
}
|
|
41
|
-
getHighestSeverity(currentSeverity =
|
|
42
|
+
getHighestSeverity(currentSeverity = LogSeverities.UNKNOWN) {
|
|
42
43
|
let reduceFct = (p, c) => p.level < c.level ? c : p;
|
|
43
44
|
let highestSeverity = this.getLogs().map((r) => r.getSeverity()).reduce(reduceFct, currentSeverity);
|
|
44
45
|
return this.getSubReports().map((r) => r.getHighestSeverity(highestSeverity)).reduce(reduceFct, highestSeverity);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export type LogSeverity = {
|
|
8
|
+
name: 'UNKNOWN' | 'INFO' | 'WARN' | 'ERROR' | 'FATAL';
|
|
9
|
+
level: number;
|
|
10
|
+
colorName: string;
|
|
11
|
+
colorHexCode: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const LogSeverities: Record<string, LogSeverity>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const LogSeverities = {
|
|
2
|
+
UNKNOWN: {
|
|
3
|
+
name: "UNKNOWN",
|
|
4
|
+
level: 0,
|
|
5
|
+
colorName: "cornflowerblue",
|
|
6
|
+
colorHexCode: "#6495ED"
|
|
7
|
+
},
|
|
8
|
+
INFO: {
|
|
9
|
+
name: "INFO",
|
|
10
|
+
level: 1,
|
|
11
|
+
colorName: "mediumseagreen",
|
|
12
|
+
colorHexCode: "#3CB371"
|
|
13
|
+
},
|
|
14
|
+
WARN: {
|
|
15
|
+
name: "WARN",
|
|
16
|
+
level: 2,
|
|
17
|
+
colorName: "orange",
|
|
18
|
+
colorHexCode: "#FFA500"
|
|
19
|
+
},
|
|
20
|
+
ERROR: {
|
|
21
|
+
name: "ERROR",
|
|
22
|
+
level: 3,
|
|
23
|
+
colorName: "crimson",
|
|
24
|
+
colorHexCode: "#DC143C"
|
|
25
|
+
},
|
|
26
|
+
FATAL: {
|
|
27
|
+
name: "FATAL",
|
|
28
|
+
level: 4,
|
|
29
|
+
colorName: "mediumorchid",
|
|
30
|
+
colorHexCode: "#BA55D3"
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
LogSeverities
|
|
35
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { default as LogReportItem } from './log-report-item';
|
|
2
|
+
|
|
3
|
+
export interface LogTableProps {
|
|
4
|
+
logs: LogReportItem[];
|
|
5
|
+
onRowClick: (data: any) => void;
|
|
6
|
+
selectedSeverity: Record<string, boolean>;
|
|
7
|
+
setSelectedSeverity: (func: (items: Record<string, boolean>) => Record<string, boolean>) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import('react').MemoExoticComponent<({ logs, onRowClick, selectedSeverity, setSelectedSeverity, }: LogTableProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
10
|
export default _default;
|
|
@@ -53,6 +53,7 @@ const LogTable = ({
|
|
|
53
53
|
label: intl.formatMessage({ id: "report_viewer/severity" }).toUpperCase(),
|
|
54
54
|
id: "severity",
|
|
55
55
|
dataKey: "severity",
|
|
56
|
+
width: SEVERITY_COLUMN_FIXED_WIDTH,
|
|
56
57
|
maxWidth: SEVERITY_COLUMN_FIXED_WIDTH,
|
|
57
58
|
minWidth: SEVERITY_COLUMN_FIXED_WIDTH,
|
|
58
59
|
cellRenderer: severityCellRender,
|
|
@@ -67,7 +68,8 @@ const LogTable = ({
|
|
|
67
68
|
{
|
|
68
69
|
label: intl.formatMessage({ id: "report_viewer/message" }).toUpperCase(),
|
|
69
70
|
id: "message",
|
|
70
|
-
dataKey: "message"
|
|
71
|
+
dataKey: "message",
|
|
72
|
+
width: SEVERITY_COLUMN_FIXED_WIDTH
|
|
71
73
|
}
|
|
72
74
|
];
|
|
73
75
|
const generateTableColumns = () => {
|
|
@@ -85,9 +87,9 @@ const LogTable = ({
|
|
|
85
87
|
};
|
|
86
88
|
});
|
|
87
89
|
};
|
|
88
|
-
const handleRowClick = (
|
|
89
|
-
setSelectedRowIndex(
|
|
90
|
-
onRowClick(
|
|
90
|
+
const handleRowClick = (row) => {
|
|
91
|
+
setSelectedRowIndex(row.index);
|
|
92
|
+
onRowClick(row.rowData);
|
|
91
93
|
};
|
|
92
94
|
const rowStyleFormat = (row) => {
|
|
93
95
|
if (row.index < 0) {
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { CheckboxProps, MenuProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export interface MultiSelectListProps {
|
|
4
|
+
selectedItems: Record<string, boolean>;
|
|
5
|
+
handleChange: CheckboxProps['onChange'];
|
|
6
|
+
handleClose: () => void;
|
|
7
|
+
anchor: MenuProps['anchorEl'];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* MultiSelectList allows to manipulate an object where each keys are associated to a boolean in order to determine which are the ones the user wants to select
|
|
11
|
+
*
|
|
12
|
+
* @param {Object} selectedItems - It serves as the model and data of the Component each entry must be formatted as a pair of string and boolean. Each key will be displayed and the corresponding boolean is updated in function of its checkbox status
|
|
13
|
+
* @param {Function} handleChange - Allows to customise the behaviour on selection change
|
|
14
|
+
* @param {Function} handleClose - Allows to customise the behaviour when the menu is closing
|
|
15
|
+
* @param {Object} anchor - Determines where the menu will appear on screen
|
|
16
|
+
*/
|
|
17
|
+
export declare const MultiSelectList: ({ selectedItems, handleChange, handleClose, anchor, }: MultiSelectListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
labelText:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
1
|
+
import { TreeItemProps } from '@mui/lab';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface ReportItemProps extends TreeItemProps {
|
|
5
|
+
nodeId: string;
|
|
6
|
+
labelText: ReactNode;
|
|
7
|
+
labelIconColor: string;
|
|
8
|
+
className?: any;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import('@emotion/styled').StyledComponent<ReportItemProps & {
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {}>;
|
|
13
13
|
export default _default;
|
|
@@ -2,7 +2,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useContext } from "react";
|
|
3
3
|
import { Box, Typography } from "@mui/material";
|
|
4
4
|
import { styled, alpha } from "@mui/system";
|
|
5
|
-
import PropTypes from "prop-types";
|
|
6
5
|
import { TreeItem } from "@mui/lab";
|
|
7
6
|
import { Label } from "@mui/icons-material";
|
|
8
7
|
import ReportTreeViewContext from "./report-tree-view-context.js";
|
|
@@ -100,12 +99,6 @@ const ReportItem = (props) => {
|
|
|
100
99
|
}
|
|
101
100
|
);
|
|
102
101
|
};
|
|
103
|
-
ReportItem.propTypes = {
|
|
104
|
-
bgColor: PropTypes.string,
|
|
105
|
-
color: PropTypes.string,
|
|
106
|
-
labelInfo: PropTypes.string,
|
|
107
|
-
labelText: PropTypes.string.isRequired
|
|
108
|
-
};
|
|
109
102
|
const ReportItem$1 = styled(ReportItem)({});
|
|
110
103
|
export {
|
|
111
104
|
ReportItem$1 as default
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
export interface ReportTreeViewContextProps {
|
|
9
|
+
isHighlighted?: (nodeId: string) => boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const ReportTreeViewContext: import('react').Context<ReportTreeViewContextProps>;
|
|
1
12
|
export default ReportTreeViewContext;
|
|
2
|
-
declare const ReportTreeViewContext: import('react').Context<{}>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Report } from './report.type';
|
|
2
|
+
|
|
3
|
+
export interface ReportViewerProps {
|
|
4
|
+
jsonReport: Report;
|
|
5
|
+
maxSubReports?: number;
|
|
6
|
+
}
|
|
7
|
+
export default function ReportViewer({ jsonReport, maxSubReports, }: ReportViewerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -6,8 +6,8 @@ import LogReport from "./log-report.js";
|
|
|
6
6
|
import { Grid } from "@mui/material";
|
|
7
7
|
import LogTable from "./log-table.js";
|
|
8
8
|
import ReportTreeViewContext from "./report-tree-view-context.js";
|
|
9
|
-
import LogReportItem from "./log-report-item.js";
|
|
10
9
|
import { TreeView } from "@mui/x-tree-view";
|
|
10
|
+
import { LogSeverities } from "./log-severity.js";
|
|
11
11
|
const MAX_SUB_REPORTS = 500;
|
|
12
12
|
const styles = {
|
|
13
13
|
treeView: {
|
|
@@ -24,14 +24,14 @@ function ReportViewer({
|
|
|
24
24
|
}) {
|
|
25
25
|
const [selectedNode, setSelectedNode] = useState(null);
|
|
26
26
|
const [expandedNodes, setExpandedNodes] = useState([]);
|
|
27
|
-
const [logs, setLogs] = useState(
|
|
27
|
+
const [logs, setLogs] = useState([]);
|
|
28
28
|
const [highlightedReportId, setHighlightedReportId] = useState();
|
|
29
29
|
const rootReport = useRef(null);
|
|
30
30
|
const allReports = useRef({});
|
|
31
31
|
const treeView = useRef(null);
|
|
32
32
|
const defaultSeverityFilter = useMemo(() => {
|
|
33
33
|
const filterConfig = {};
|
|
34
|
-
Object.values(
|
|
34
|
+
Object.values(LogSeverities).forEach((severity) => {
|
|
35
35
|
filterConfig[severity.name] = true;
|
|
36
36
|
});
|
|
37
37
|
return filterConfig;
|
|
@@ -102,10 +102,12 @@ function ReportViewer({
|
|
|
102
102
|
let reportId = data.reportId;
|
|
103
103
|
while ((_a = allReports.current[reportId]) == null ? void 0 : _a.parentReportId) {
|
|
104
104
|
let parentReportId = allReports.current[reportId].parentReportId;
|
|
105
|
-
if (
|
|
106
|
-
|
|
105
|
+
if (parentReportId !== void 0) {
|
|
106
|
+
if (!previouslyExpandedNodes.includes(parentReportId)) {
|
|
107
|
+
nodesToExpand.push(parentReportId);
|
|
108
|
+
}
|
|
109
|
+
reportId = parentReportId;
|
|
107
110
|
}
|
|
108
|
-
reportId = parentReportId;
|
|
109
111
|
}
|
|
110
112
|
if (nodesToExpand.length > 0) {
|
|
111
113
|
return nodesToExpand.concat(previouslyExpandedNodes);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export interface Report {
|
|
8
|
+
taskKey: string;
|
|
9
|
+
defaultName: string;
|
|
10
|
+
taskValues: Record<string, ReportValue>;
|
|
11
|
+
subReporters: Report[];
|
|
12
|
+
reports: SubReport[];
|
|
13
|
+
}
|
|
14
|
+
export interface SubReport {
|
|
15
|
+
reportKey: string;
|
|
16
|
+
defaultMessage: string;
|
|
17
|
+
values: Record<string, ReportValue>;
|
|
18
|
+
}
|
|
19
|
+
export interface ReportValue {
|
|
20
|
+
value: string | number;
|
|
21
|
+
type: unknown;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
1
7
|
export { default } from './report-viewer-dialog';
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { Report } from '../ReportViewer/report.type';
|
|
2
|
+
|
|
3
|
+
export interface ReportViewerDialogProps {
|
|
4
|
+
title: string;
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
jsonReport: Report;
|
|
8
|
+
}
|
|
9
|
+
export default function ReportViewerDialog(props: ReportViewerDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { UserManager } from 'oidc-client';
|
|
2
|
+
|
|
3
|
+
export interface SignInCallbackHandlerProps {
|
|
4
|
+
userManager: UserManager;
|
|
5
|
+
handleSignInCallback: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const SignInCallbackHandler: ({ userManager, handleSignInCallback, }: SignInCallbackHandlerProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
8
|
export default SignInCallbackHandler;
|
|
2
|
-
declare function SignInCallbackHandler({ userManager, handleSignInCallback }: {
|
|
3
|
-
userManager: any;
|
|
4
|
-
handleSignInCallback: any;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
|
-
const SignInCallbackHandler = ({
|
|
3
|
+
const SignInCallbackHandler = ({
|
|
4
|
+
userManager,
|
|
5
|
+
handleSignInCallback
|
|
6
|
+
}) => {
|
|
4
7
|
useEffect(() => {
|
|
5
8
|
if (userManager !== null) {
|
|
6
9
|
handleSignInCallback();
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
1
7
|
export { default } from './SignInCallbackHandler';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { UserManager } from 'oidc-client';
|
|
2
|
+
|
|
3
|
+
export interface SilentRenewCallbackHandlerProps {
|
|
4
|
+
userManager: UserManager;
|
|
5
|
+
handleSilentRenewCallback: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const SilentRenewCallbackHandler: ({ userManager, handleSilentRenewCallback, }: SilentRenewCallbackHandlerProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
8
|
export default SilentRenewCallbackHandler;
|
|
2
|
-
declare function SilentRenewCallbackHandler({ userManager, handleSilentRenewCallback, }: {
|
|
3
|
-
userManager: any;
|
|
4
|
-
handleSilentRenewCallback: any;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
1
7
|
export { default } from './SilentRenewCallbackHandler';
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import { SnackbarProviderProps } from 'notistack';
|
|
2
|
+
|
|
3
|
+
declare const SnackbarProvider: (props: SnackbarProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
4
|
export default SnackbarProvider;
|
|
2
|
-
declare const SnackbarProvider: import('react').ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useRef } from "react";
|
|
3
3
|
import { Button } from "@mui/material";
|
|
4
4
|
import { SnackbarProvider as SnackbarProvider$1 } from "notistack";
|
|
5
|
-
const SnackbarProvider =
|
|
6
|
-
const
|
|
7
|
-
const notistackRef = ref || innerRef;
|
|
5
|
+
const SnackbarProvider = (props) => {
|
|
6
|
+
const ref = useRef(null);
|
|
8
7
|
return /* @__PURE__ */ jsx(
|
|
9
8
|
SnackbarProvider$1,
|
|
10
9
|
{
|
|
11
|
-
ref
|
|
10
|
+
ref,
|
|
12
11
|
anchorOrigin: { horizontal: "center", vertical: "bottom" },
|
|
13
12
|
hideIconVariant: true,
|
|
14
13
|
action: (key) => /* @__PURE__ */ jsx(
|
|
15
14
|
Button,
|
|
16
15
|
{
|
|
17
|
-
onClick: () =>
|
|
16
|
+
onClick: () => {
|
|
17
|
+
var _a;
|
|
18
|
+
return (_a = ref.current) == null ? void 0 : _a.closeSnackbar(key);
|
|
19
|
+
},
|
|
18
20
|
style: { color: "#fff", fontSize: "20px" },
|
|
19
21
|
children: "✖"
|
|
20
22
|
}
|
|
@@ -22,7 +24,7 @@ const SnackbarProvider = forwardRef((props, ref) => {
|
|
|
22
24
|
...props
|
|
23
25
|
}
|
|
24
26
|
);
|
|
25
|
-
}
|
|
27
|
+
};
|
|
26
28
|
export {
|
|
27
29
|
SnackbarProvider as default
|
|
28
30
|
};
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
1
7
|
export { default } from './SnackbarProvider';
|
|
@@ -1,24 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v.2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
declare const moduleTypeSort: {
|
|
8
|
+
app: number;
|
|
9
|
+
server: number;
|
|
10
|
+
other: number;
|
|
11
|
+
};
|
|
12
|
+
type ModuleType = keyof typeof moduleTypeSort;
|
|
13
|
+
type GridSuiteModule = {
|
|
14
|
+
name: string;
|
|
15
|
+
type: ModuleType;
|
|
16
|
+
version?: string;
|
|
17
|
+
gitTag?: string;
|
|
18
|
+
license?: string;
|
|
19
|
+
};
|
|
20
|
+
export interface AboutDialogProps {
|
|
21
|
+
open: boolean;
|
|
22
|
+
onClose: () => void;
|
|
23
|
+
globalVersionPromise?: () => Promise<string>;
|
|
24
|
+
appName: string;
|
|
25
|
+
appVersion?: string;
|
|
26
|
+
appGitTag?: string;
|
|
27
|
+
appLicense?: string;
|
|
28
|
+
additionalModulesPromise?: () => Promise<GridSuiteModule[]>;
|
|
24
29
|
}
|
|
30
|
+
declare const AboutDialog: ({ open, onClose, globalVersionPromise, appName, appVersion, appGitTag, appLicense, additionalModulesPromise, }: AboutDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default AboutDialog;
|