@gridsuite/commons-ui 0.63.4 → 0.63.5
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/_mocks_/svg.js +1 -3
- package/dist/assets/expert-filter-form.css +18 -8
- package/dist/components/AuthenticationRouter/AuthenticationRouter.js +88 -97
- package/dist/components/CardErrorBoundary/card-error-boundary.js +6 -20
- package/dist/components/CustomAGGrid/custom-aggrid.js +47 -49
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +10 -40
- package/dist/components/ElementSearchDialog/element-search-dialog.js +1 -17
- package/dist/components/ElementSearchDialog/equipment-item.js +29 -47
- package/dist/components/ElementSearchDialog/tag-renderer.js +2 -8
- package/dist/components/ElementSearchDialog/use-element-search.js +1 -4
- package/dist/components/FlatParameters/FlatParameters.js +13 -77
- package/dist/components/Login/Login.js +9 -34
- package/dist/components/Login/Logout.js +3 -26
- package/dist/components/MuiVirtualizedTable/ColumnHeader.js +35 -64
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +4 -17
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.d.ts +1 -1
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +19 -95
- package/dist/components/MuiVirtualizedTable/index.d.ts +1 -1
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +2 -6
- package/dist/components/OverflowableText/overflowable-text.js +3 -10
- package/dist/components/ReportViewer/filter-button.d.ts +1 -1
- package/dist/components/ReportViewer/filter-button.js +2 -7
- package/dist/components/ReportViewer/log-report-item.js +7 -17
- package/dist/components/ReportViewer/log-report.js +4 -13
- package/dist/components/ReportViewer/log-table.d.ts +1 -1
- package/dist/components/ReportViewer/log-table.js +3 -16
- package/dist/components/ReportViewer/multi-select-list.d.ts +1 -1
- package/dist/components/ReportViewer/multi-select-list.js +2 -14
- package/dist/components/ReportViewer/report-item.js +4 -10
- package/dist/components/ReportViewer/report-viewer.d.ts +1 -1
- package/dist/components/ReportViewer/report-viewer.js +2 -7
- package/dist/components/ReportViewerDialog/report-viewer-dialog.js +1 -13
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +1 -1
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +1 -4
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +1 -1
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +1 -4
- package/dist/components/SnackbarProvider/SnackbarProvider.js +4 -11
- package/dist/components/TopBar/AboutDialog.js +51 -152
- package/dist/components/TopBar/GridLogo.d.ts +2 -2
- package/dist/components/TopBar/GridLogo.js +8 -41
- package/dist/components/TopBar/TopBar.js +197 -328
- package/dist/components/TreeViewFinder/TreeViewFinder.js +23 -66
- package/dist/components/TreeViewFinder/index.d.ts +2 -2
- package/dist/components/dialogs/custom-mui-dialog.d.ts +2 -1
- package/dist/components/dialogs/custom-mui-dialog.js +64 -39
- package/dist/components/dialogs/modify-element-selection.js +1 -3
- package/dist/components/dialogs/popup-confirmation-dialog.d.ts +1 -1
- package/dist/components/dialogs/popup-confirmation-dialog.js +8 -15
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +3 -18
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +3 -9
- package/dist/components/filter/criteria-based/criteria-based-form.d.ts +1 -1
- package/dist/components/filter/criteria-based/criteria-based-form.js +7 -15
- package/dist/components/filter/criteria-based/filter-free-properties.d.ts +1 -1
- package/dist/components/filter/criteria-based/filter-free-properties.js +1 -4
- package/dist/components/filter/criteria-based/filter-properties.js +16 -24
- package/dist/components/filter/criteria-based/filter-property.js +1 -4
- package/dist/components/filter/expert/expert-filter-constants.d.ts +10 -3
- package/dist/components/filter/expert/expert-filter-constants.js +16 -12
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +3 -18
- package/dist/components/filter/expert/expert-filter-form.js +1 -7
- package/dist/components/filter/expert/expert-filter-utils.js +10 -30
- package/dist/components/filter/expert/expert-filter.type.d.ts +3 -1
- package/dist/components/filter/expert/expert-filter.type.js +2 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +2 -15
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +1 -1
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +10 -35
- package/dist/components/filter/filter-creation-dialog.js +5 -10
- package/dist/components/filter/filter-form.js +1 -6
- package/dist/components/filter/utils/filter-api.js +1 -7
- package/dist/components/inputs/react-hook-form/ExpandingTextField.js +1 -9
- package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +14 -52
- package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +14 -62
- package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +29 -40
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js +2 -8
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js +1 -3
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.js +1 -7
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.js +1 -9
- package/dist/components/inputs/react-hook-form/booleans/switch-input.js +1 -9
- package/dist/components/inputs/react-hook-form/directory-items-input.js +5 -29
- package/dist/components/inputs/react-hook-form/error-management/error-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/provider/custom-form-provider.js +1 -7
- package/dist/components/inputs/react-hook-form/radio-input.js +8 -18
- package/dist/components/inputs/react-hook-form/range-input.js +1 -4
- package/dist/components/inputs/react-hook-form/select-inputs/countries-input.js +1 -9
- package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.js +2 -13
- package/dist/components/inputs/react-hook-form/select-inputs/select-input.js +2 -6
- package/dist/components/inputs/react-hook-form/slider-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/slider-input.js +2 -19
- package/dist/components/inputs/react-hook-form/unique-name-input.js +1 -9
- package/dist/components/inputs/react-hook-form/utils/field-label.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/utils/field-label.js +1 -5
- package/dist/components/inputs/react-hook-form/utils/submit-button.js +1 -8
- package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.js +18 -47
- package/dist/components/inputs/react-query-builder/add-button.js +1 -10
- package/dist/components/inputs/react-query-builder/autocomplete-with-favorites.d.ts +12 -0
- package/dist/components/inputs/react-query-builder/autocomplete-with-favorites.js +43 -0
- package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.js +14 -27
- package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.js +1 -3
- package/dist/components/inputs/react-query-builder/country-value-editor.js +27 -28
- package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +25 -31
- package/dist/components/inputs/react-query-builder/element-value-editor.js +1 -10
- package/dist/components/inputs/react-query-builder/property-value-editor.js +6 -11
- package/dist/components/inputs/react-query-builder/remove-button.js +1 -9
- package/dist/components/inputs/react-query-builder/text-value-editor.js +2 -1
- package/dist/components/inputs/react-query-builder/translated-value-editor.js +3 -4
- package/dist/components/inputs/react-query-builder/use-convert-value.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/use-convert-value.js +1 -6
- package/dist/components/inputs/react-query-builder/value-editor.js +4 -20
- package/dist/components/translations/filter-expert-en.d.ts +2 -0
- package/dist/components/translations/filter-expert-en.js +3 -1
- package/dist/components/translations/filter-expert-fr.d.ts +2 -0
- package/dist/components/translations/filter-expert-fr.js +3 -1
- package/dist/hooks/localized-countries-hook.js +1 -3
- package/dist/hooks/useConfidentialityWarning.d.ts +8 -0
- package/dist/hooks/useConfidentialityWarning.js +14 -0
- package/dist/hooks/useDebounce.js +1 -4
- package/dist/hooks/useSnackMessage.js +3 -12
- package/dist/index.d.ts +10 -9
- package/dist/index.js +77 -73
- package/dist/services/apps-metadata.d.ts +7 -0
- package/dist/services/apps-metadata.js +13 -0
- package/dist/services/directory.js +3 -11
- package/dist/services/explore.js +2 -8
- package/dist/services/index.js +3 -1
- package/dist/services/utils.js +4 -12
- package/dist/utils/AuthService.js +8 -29
- package/dist/utils/UserManagerMock.js +6 -23
- package/dist/utils/styles.js +1 -6
- package/package.json +1 -1
|
@@ -36,23 +36,16 @@ const OverflowableText = styled(
|
|
|
36
36
|
}) => {
|
|
37
37
|
var _a, _b, _c, _d;
|
|
38
38
|
const element = useRef();
|
|
39
|
-
const isMultiLine = useMemo(
|
|
40
|
-
() => maxLineCount && maxLineCount > 1,
|
|
41
|
-
[maxLineCount]
|
|
42
|
-
);
|
|
39
|
+
const isMultiLine = useMemo(() => maxLineCount && maxLineCount > 1, [maxLineCount]);
|
|
43
40
|
const [overflowed, setOverflowed] = useState(false);
|
|
44
41
|
const checkOverflow = useCallback(() => {
|
|
45
42
|
if (!element.current) {
|
|
46
43
|
return;
|
|
47
44
|
}
|
|
48
45
|
if (isMultiLine) {
|
|
49
|
-
setOverflowed(
|
|
50
|
-
element.current.scrollHeight > element.current.clientHeight
|
|
51
|
-
);
|
|
46
|
+
setOverflowed(element.current.scrollHeight > element.current.clientHeight);
|
|
52
47
|
} else {
|
|
53
|
-
setOverflowed(
|
|
54
|
-
element.current.scrollWidth > element.current.clientWidth
|
|
55
|
-
);
|
|
48
|
+
setOverflowed(element.current.scrollWidth > element.current.clientWidth);
|
|
56
49
|
}
|
|
57
50
|
}, [isMultiLine, setOverflowed, element]);
|
|
58
51
|
useLayoutEffect(() => {
|
|
@@ -8,4 +8,4 @@ export interface FilterButtonProps {
|
|
|
8
8
|
* @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
|
|
9
9
|
* @param {Function} setSelectedItems - Setter needed to update the list underlying data
|
|
10
10
|
*/
|
|
11
|
-
export declare function FilterButton({ selectedItems, setSelectedItems
|
|
11
|
+
export declare function FilterButton({ selectedItems, setSelectedItems }: FilterButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,10 +21,7 @@ const styles = {
|
|
|
21
21
|
height: "0.7em"
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
function FilterButton({
|
|
25
|
-
selectedItems,
|
|
26
|
-
setSelectedItems
|
|
27
|
-
}) {
|
|
24
|
+
function FilterButton({ selectedItems, setSelectedItems }) {
|
|
28
25
|
const [initialState] = useState(selectedItems);
|
|
29
26
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
30
27
|
const handleClick = (event) => {
|
|
@@ -42,9 +39,7 @@ function FilterButton({
|
|
|
42
39
|
});
|
|
43
40
|
};
|
|
44
41
|
const isInitialStateModified = useMemo(() => {
|
|
45
|
-
return Object.keys(selectedItems).some(
|
|
46
|
-
(key) => initialState[key] !== selectedItems[key]
|
|
47
|
-
);
|
|
42
|
+
return Object.keys(selectedItems).some((key) => initialState[key] !== selectedItems[key]);
|
|
48
43
|
}, [initialState, selectedItems]);
|
|
49
44
|
return /* @__PURE__ */ jsxs(Box, { sx: styles.container, children: [
|
|
50
45
|
/* @__PURE__ */ jsxs(IconButton, { onClick: handleClick, children: [
|
|
@@ -5,24 +5,16 @@ class LogReportItem {
|
|
|
5
5
|
Object.entries(templateValues).forEach(([key, value]) => {
|
|
6
6
|
templateVars[key] = value.value;
|
|
7
7
|
});
|
|
8
|
-
return templateMessage.replace(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return typeof r === "string" || typeof r === "number" ? r.toString() : a;
|
|
13
|
-
}
|
|
14
|
-
);
|
|
8
|
+
return templateMessage.replace(/\${([^{}]*)}/g, function resolveTemplate(a, b) {
|
|
9
|
+
const r = templateVars[b];
|
|
10
|
+
return typeof r === "string" || typeof r === "number" ? r.toString() : a;
|
|
11
|
+
});
|
|
15
12
|
}
|
|
16
13
|
constructor(jsonReport, reportId) {
|
|
17
14
|
this.key = jsonReport.reportKey;
|
|
18
|
-
this.log = LogReportItem.resolveTemplateMessage(
|
|
19
|
-
jsonReport.defaultMessage,
|
|
20
|
-
jsonReport.values
|
|
21
|
-
);
|
|
15
|
+
this.log = LogReportItem.resolveTemplateMessage(jsonReport.defaultMessage, jsonReport.values);
|
|
22
16
|
this.reportId = reportId;
|
|
23
|
-
this.severity = LogReportItem.initSeverity(
|
|
24
|
-
jsonReport.values.reportSeverity
|
|
25
|
-
);
|
|
17
|
+
this.severity = LogReportItem.initSeverity(jsonReport.values.reportSeverity);
|
|
26
18
|
}
|
|
27
19
|
getLog() {
|
|
28
20
|
return this.log;
|
|
@@ -48,9 +40,7 @@ class LogReportItem {
|
|
|
48
40
|
return severity;
|
|
49
41
|
}
|
|
50
42
|
Object.values(LogSeverities).some((value) => {
|
|
51
|
-
const severityFound = jsonSeverity.value.includes(
|
|
52
|
-
value.name
|
|
53
|
-
);
|
|
43
|
+
const severityFound = jsonSeverity.value.includes(value.name);
|
|
54
44
|
if (severityFound) {
|
|
55
45
|
severity = value;
|
|
56
46
|
}
|
|
@@ -5,10 +5,7 @@ class LogReport {
|
|
|
5
5
|
constructor(jsonReporter, parentReportId) {
|
|
6
6
|
this.id = v4();
|
|
7
7
|
this.key = jsonReporter.taskKey;
|
|
8
|
-
this.title = LogReportItem.resolveTemplateMessage(
|
|
9
|
-
jsonReporter.defaultName,
|
|
10
|
-
jsonReporter.taskValues
|
|
11
|
-
);
|
|
8
|
+
this.title = LogReportItem.resolveTemplateMessage(jsonReporter.defaultName, jsonReporter.taskValues);
|
|
12
9
|
this.subReports = [];
|
|
13
10
|
this.logs = [];
|
|
14
11
|
this.parentReportId = parentReportId;
|
|
@@ -27,17 +24,11 @@ class LogReport {
|
|
|
27
24
|
return this.logs;
|
|
28
25
|
}
|
|
29
26
|
getAllLogs() {
|
|
30
|
-
return this.getLogs().concat(
|
|
31
|
-
this.getSubReports().flatMap((r) => r.getAllLogs())
|
|
32
|
-
);
|
|
27
|
+
return this.getLogs().concat(this.getSubReports().flatMap((r) => r.getAllLogs()));
|
|
33
28
|
}
|
|
34
29
|
init(jsonReporter) {
|
|
35
|
-
jsonReporter.subReporters.map(
|
|
36
|
-
|
|
37
|
-
);
|
|
38
|
-
jsonReporter.reports.map(
|
|
39
|
-
(value) => this.logs.push(new LogReportItem(value, this.id))
|
|
40
|
-
);
|
|
30
|
+
jsonReporter.subReporters.map((value) => this.subReports.push(new LogReport(value, this.id)));
|
|
31
|
+
jsonReporter.reports.map((value) => this.logs.push(new LogReportItem(value, this.id)));
|
|
41
32
|
}
|
|
42
33
|
getHighestSeverity(currentSeverity = LogSeverities.UNKNOWN) {
|
|
43
34
|
const reduceFct = (p, c) => p.level < c.level ? c : p;
|
|
@@ -6,6 +6,6 @@ export interface LogTableProps {
|
|
|
6
6
|
selectedSeverity: Record<string, boolean>;
|
|
7
7
|
setSelectedSeverity: (func: (items: Record<string, boolean>) => Record<string, boolean>) => void;
|
|
8
8
|
}
|
|
9
|
-
declare function LogTable({ logs, onRowClick, selectedSeverity, setSelectedSeverity
|
|
9
|
+
declare function LogTable({ logs, onRowClick, selectedSeverity, setSelectedSeverity }: LogTableProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
declare const _default: import('react').MemoExoticComponent<typeof LogTable>;
|
|
11
11
|
export default _default;
|
|
@@ -23,12 +23,7 @@ const styles = {
|
|
|
23
23
|
header: { variant: "header" }
|
|
24
24
|
};
|
|
25
25
|
const VirtualizedTable = styled(MuiVirtualizedTable)(styles);
|
|
26
|
-
function LogTable({
|
|
27
|
-
logs,
|
|
28
|
-
onRowClick,
|
|
29
|
-
selectedSeverity,
|
|
30
|
-
setSelectedSeverity
|
|
31
|
-
}) {
|
|
26
|
+
function LogTable({ logs, onRowClick, selectedSeverity, setSelectedSeverity }) {
|
|
32
27
|
const intl = useIntl();
|
|
33
28
|
const theme = useTheme();
|
|
34
29
|
const [selectedRowIndex, setSelectedRowIndex] = useState(-1);
|
|
@@ -57,13 +52,7 @@ function LogTable({
|
|
|
57
52
|
maxWidth: SEVERITY_COLUMN_FIXED_WIDTH,
|
|
58
53
|
minWidth: SEVERITY_COLUMN_FIXED_WIDTH,
|
|
59
54
|
cellRenderer: severityCellRender,
|
|
60
|
-
extra: /* @__PURE__ */ jsx(
|
|
61
|
-
FilterButton,
|
|
62
|
-
{
|
|
63
|
-
selectedItems: selectedSeverity,
|
|
64
|
-
setSelectedItems: setSelectedSeverity
|
|
65
|
-
}
|
|
66
|
-
)
|
|
55
|
+
extra: /* @__PURE__ */ jsx(FilterButton, { selectedItems: selectedSeverity, setSelectedItems: setSelectedSeverity })
|
|
67
56
|
},
|
|
68
57
|
{
|
|
69
58
|
label: intl.formatMessage({ id: "report_viewer/message" }).toUpperCase(),
|
|
@@ -107,9 +96,7 @@ function LogTable({
|
|
|
107
96
|
}, [logs]);
|
|
108
97
|
const filter = useCallback(
|
|
109
98
|
(row) => {
|
|
110
|
-
return row.severity && Object.entries(selectedSeverity).some(
|
|
111
|
-
([key, value]) => key === row.severity && value
|
|
112
|
-
);
|
|
99
|
+
return row.severity && Object.entries(selectedSeverity).some(([key, value]) => key === row.severity && value);
|
|
113
100
|
},
|
|
114
101
|
[selectedSeverity]
|
|
115
102
|
);
|
|
@@ -14,4 +14,4 @@ export interface MultiSelectListProps {
|
|
|
14
14
|
* @param {Function} handleClose - Allows to customise the behaviour when the menu is closing
|
|
15
15
|
* @param {Object} anchor - Determines where the menu will appear on screen
|
|
16
16
|
*/
|
|
17
|
-
export declare function MultiSelectList({ selectedItems, handleChange, handleClose, anchor
|
|
17
|
+
export declare function MultiSelectList({ selectedItems, handleChange, handleClose, anchor }: MultiSelectListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,25 +9,13 @@ const styles = {
|
|
|
9
9
|
padding: "0 10px 0 0"
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
function MultiSelectList({
|
|
13
|
-
selectedItems,
|
|
14
|
-
handleChange,
|
|
15
|
-
handleClose,
|
|
16
|
-
anchor
|
|
17
|
-
}) {
|
|
12
|
+
function MultiSelectList({ selectedItems, handleChange, handleClose, anchor }) {
|
|
18
13
|
const open = Boolean(anchor);
|
|
19
14
|
return /* @__PURE__ */ jsx(Menu, { open, onClose: handleClose, anchorEl: anchor, children: Object.entries(selectedItems).map(([key, value]) => {
|
|
20
15
|
return /* @__PURE__ */ jsx(MenuItem, { sx: styles.menuItem, children: /* @__PURE__ */ jsx(
|
|
21
16
|
FormControlLabel,
|
|
22
17
|
{
|
|
23
|
-
control: /* @__PURE__ */ jsx(
|
|
24
|
-
Checkbox,
|
|
25
|
-
{
|
|
26
|
-
checked: value,
|
|
27
|
-
onChange: handleChange,
|
|
28
|
-
name: key
|
|
29
|
-
}
|
|
30
|
-
),
|
|
18
|
+
control: /* @__PURE__ */ jsx(Checkbox, { checked: value, onChange: handleChange, name: key }),
|
|
31
19
|
label: key,
|
|
32
20
|
sx: styles.label
|
|
33
21
|
}
|
|
@@ -86,16 +86,10 @@ function ReportItem(props) {
|
|
|
86
86
|
"& .MuiTreeItem-group": styles.group,
|
|
87
87
|
"& .MuiTreeItem-label": styles.label
|
|
88
88
|
},
|
|
89
|
-
label: /* @__PURE__ */ jsxs(
|
|
90
|
-
|
|
91
|
-
{
|
|
92
|
-
|
|
93
|
-
children: [
|
|
94
|
-
/* @__PURE__ */ jsx(Label, { htmlColor: labelIconColor, sx: styles.labelIcon }),
|
|
95
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", sx: styles.labelText, children: labelText })
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
),
|
|
89
|
+
label: /* @__PURE__ */ jsxs(Box, { sx: highlighted ? styles.labelRootHighlighted : styles.labelRoot, children: [
|
|
90
|
+
/* @__PURE__ */ jsx(Label, { htmlColor: labelIconColor, sx: styles.labelIcon }),
|
|
91
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", sx: styles.labelText, children: labelText })
|
|
92
|
+
] }),
|
|
99
93
|
...other
|
|
100
94
|
}
|
|
101
95
|
);
|
|
@@ -4,4 +4,4 @@ export interface ReportViewerProps {
|
|
|
4
4
|
jsonReport: Report;
|
|
5
5
|
maxSubReports?: number;
|
|
6
6
|
}
|
|
7
|
-
export default function ReportViewer({ jsonReport, maxSubReports
|
|
7
|
+
export default function ReportViewer({ jsonReport, maxSubReports }: ReportViewerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -18,10 +18,7 @@ const styles = {
|
|
|
18
18
|
whiteSpace: "nowrap"
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
function ReportViewer({
|
|
22
|
-
jsonReport,
|
|
23
|
-
maxSubReports = MAX_SUB_REPORTS
|
|
24
|
-
}) {
|
|
21
|
+
function ReportViewer({ jsonReport, maxSubReports = MAX_SUB_REPORTS }) {
|
|
25
22
|
const [selectedNode, setSelectedNode] = useState(null);
|
|
26
23
|
const [expandedNodes, setExpandedNodes] = useState([]);
|
|
27
24
|
const [logs, setLogs] = useState([]);
|
|
@@ -36,9 +33,7 @@ function ReportViewer({
|
|
|
36
33
|
});
|
|
37
34
|
return filterConfig;
|
|
38
35
|
}, []);
|
|
39
|
-
const [selectedSeverity, setSelectedSeverity] = useState(
|
|
40
|
-
defaultSeverityFilter
|
|
41
|
-
);
|
|
36
|
+
const [selectedSeverity, setSelectedSeverity] = useState(defaultSeverityFilter);
|
|
42
37
|
const createReporterItem = useCallback(
|
|
43
38
|
(logReport) => {
|
|
44
39
|
allReports.current[logReport.getId()] = logReport;
|
|
@@ -37,19 +37,7 @@ function ReportViewerDialog(props) {
|
|
|
37
37
|
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
38
38
|
/* @__PURE__ */ jsx(DialogContent, { dividers: true, children: /* @__PURE__ */ jsx(ReportViewer, { jsonReport }) }),
|
|
39
39
|
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
40
|
-
fullScreen ? /* @__PURE__ */ jsx(
|
|
41
|
-
FullscreenExit,
|
|
42
|
-
{
|
|
43
|
-
onClick: hideFullScreen,
|
|
44
|
-
sx: styles.fullScreenIcon
|
|
45
|
-
}
|
|
46
|
-
) : /* @__PURE__ */ jsx(
|
|
47
|
-
Fullscreen,
|
|
48
|
-
{
|
|
49
|
-
onClick: showFullScreen,
|
|
50
|
-
sx: styles.fullScreenIcon
|
|
51
|
-
}
|
|
52
|
-
),
|
|
40
|
+
fullScreen ? /* @__PURE__ */ jsx(FullscreenExit, { onClick: hideFullScreen, sx: styles.fullScreenIcon }) : /* @__PURE__ */ jsx(Fullscreen, { onClick: showFullScreen, sx: styles.fullScreenIcon }),
|
|
53
41
|
/* @__PURE__ */ jsx(Button, { onClick: () => onClose(), variant: "text", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "report_viewer/close" }) })
|
|
54
42
|
] })
|
|
55
43
|
]
|
|
@@ -4,5 +4,5 @@ export interface SignInCallbackHandlerProps {
|
|
|
4
4
|
userManager: UserManager | null;
|
|
5
5
|
handleSignInCallback: () => void;
|
|
6
6
|
}
|
|
7
|
-
declare function SignInCallbackHandler({ userManager, handleSignInCallback
|
|
7
|
+
declare function SignInCallbackHandler({ userManager, handleSignInCallback }: SignInCallbackHandlerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default SignInCallbackHandler;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
|
-
function SignInCallbackHandler({
|
|
4
|
-
userManager,
|
|
5
|
-
handleSignInCallback
|
|
6
|
-
}) {
|
|
3
|
+
function SignInCallbackHandler({ userManager, handleSignInCallback }) {
|
|
7
4
|
useEffect(() => {
|
|
8
5
|
if (userManager !== null) {
|
|
9
6
|
handleSignInCallback();
|
|
@@ -4,5 +4,5 @@ export interface SilentRenewCallbackHandlerProps {
|
|
|
4
4
|
userManager: UserManager | null;
|
|
5
5
|
handleSilentRenewCallback: () => void;
|
|
6
6
|
}
|
|
7
|
-
declare function SilentRenewCallbackHandler({ userManager, handleSilentRenewCallback
|
|
7
|
+
declare function SilentRenewCallbackHandler({ userManager, handleSilentRenewCallback }: SilentRenewCallbackHandlerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default SilentRenewCallbackHandler;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
|
-
function SilentRenewCallbackHandler({
|
|
4
|
-
userManager,
|
|
5
|
-
handleSilentRenewCallback
|
|
6
|
-
}) {
|
|
3
|
+
function SilentRenewCallbackHandler({ userManager, handleSilentRenewCallback }) {
|
|
7
4
|
useEffect(() => {
|
|
8
5
|
if (userManager !== null) {
|
|
9
6
|
handleSilentRenewCallback();
|
|
@@ -4,17 +4,10 @@ import { Button } from "@mui/material";
|
|
|
4
4
|
import { SnackbarProvider as SnackbarProvider$1 } from "notistack";
|
|
5
5
|
function SnackbarProvider(props) {
|
|
6
6
|
const ref = useRef(null);
|
|
7
|
-
const action = (key) => /* @__PURE__ */ jsx(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _a;
|
|
12
|
-
return (_a = ref.current) == null ? void 0 : _a.closeSnackbar(key);
|
|
13
|
-
},
|
|
14
|
-
style: { color: "#fff", fontSize: "20px" },
|
|
15
|
-
children: "✖"
|
|
16
|
-
}
|
|
17
|
-
);
|
|
7
|
+
const action = (key) => /* @__PURE__ */ jsx(Button, { onClick: () => {
|
|
8
|
+
var _a;
|
|
9
|
+
return (_a = ref.current) == null ? void 0 : _a.closeSnackbar(key);
|
|
10
|
+
}, style: { color: "#fff", fontSize: "20px" }, children: "✖" });
|
|
18
11
|
return /* @__PURE__ */ jsx(
|
|
19
12
|
SnackbarProvider$1,
|
|
20
13
|
{
|
|
@@ -48,11 +48,7 @@ function getGlobalVersion(fnPromise, type, setData, setLoader) {
|
|
|
48
48
|
setData(value ?? null);
|
|
49
49
|
},
|
|
50
50
|
(reason) => {
|
|
51
|
-
console.debug(
|
|
52
|
-
type,
|
|
53
|
-
"global version isn't available",
|
|
54
|
-
reason
|
|
55
|
-
);
|
|
51
|
+
console.debug(type, "global version isn't available", reason);
|
|
56
52
|
setData(null);
|
|
57
53
|
}
|
|
58
54
|
).finally(() => {
|
|
@@ -108,22 +104,8 @@ const moduleStyles = {
|
|
|
108
104
|
}
|
|
109
105
|
};
|
|
110
106
|
const ModuleTypesIcons = {
|
|
111
|
-
app: /* @__PURE__ */ jsx(
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
sx: moduleStyles.icons,
|
|
115
|
-
fontSize: "small",
|
|
116
|
-
color: "primary"
|
|
117
|
-
}
|
|
118
|
-
),
|
|
119
|
-
server: /* @__PURE__ */ jsx(
|
|
120
|
-
DnsOutlined,
|
|
121
|
-
{
|
|
122
|
-
sx: moduleStyles.icons,
|
|
123
|
-
fontSize: "small",
|
|
124
|
-
color: "secondary"
|
|
125
|
-
}
|
|
126
|
-
),
|
|
107
|
+
app: /* @__PURE__ */ jsx(WidgetsOutlined, { sx: moduleStyles.icons, fontSize: "small", color: "primary" }),
|
|
108
|
+
server: /* @__PURE__ */ jsx(DnsOutlined, { sx: moduleStyles.icons, fontSize: "small", color: "secondary" }),
|
|
127
109
|
other: /* @__PURE__ */ jsx(QuestionMark, { sx: moduleStyles.icons, fontSize: "small" })
|
|
128
110
|
};
|
|
129
111
|
function insensitiveCaseCompare(str, obj) {
|
|
@@ -178,30 +160,21 @@ function Module({ type, name, version, gitTag }) {
|
|
|
178
160
|
] })
|
|
179
161
|
] })
|
|
180
162
|
] }),
|
|
181
|
-
children: /* @__PURE__ */ jsxs(
|
|
182
|
-
|
|
183
|
-
{
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
display: "inline",
|
|
197
|
-
noWrap: true,
|
|
198
|
-
sx: moduleStyles.version,
|
|
199
|
-
children: gitTag || version || null
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
]
|
|
203
|
-
}
|
|
204
|
-
)
|
|
163
|
+
children: /* @__PURE__ */ jsxs(Stack, { direction: "row", justifyContent: "flex-start", alignItems: "baseline", spacing: 1, children: [
|
|
164
|
+
ModuleTypesIcons[type] || ModuleTypesIcons.other,
|
|
165
|
+
/* @__PURE__ */ jsx(Typography, { display: "inline", noWrap: true, children: name || "<?>" }),
|
|
166
|
+
/* @__PURE__ */ jsx(
|
|
167
|
+
Typography,
|
|
168
|
+
{
|
|
169
|
+
variant: "caption",
|
|
170
|
+
color: (theme) => theme.palette.text.secondary,
|
|
171
|
+
display: "inline",
|
|
172
|
+
noWrap: true,
|
|
173
|
+
sx: moduleStyles.version,
|
|
174
|
+
children: gitTag || version || null
|
|
175
|
+
}
|
|
176
|
+
)
|
|
177
|
+
] })
|
|
205
178
|
}
|
|
206
179
|
)
|
|
207
180
|
}
|
|
@@ -225,25 +198,16 @@ function AboutDialog({
|
|
|
225
198
|
const [initialGlobalVersion, setInitialGlobalVersion] = useState(void 0);
|
|
226
199
|
useEffect(() => {
|
|
227
200
|
if (initialGlobalVersion === void 0) {
|
|
228
|
-
getGlobalVersion(
|
|
229
|
-
globalVersionPromise,
|
|
230
|
-
"Initial",
|
|
231
|
-
setInitialGlobalVersion
|
|
232
|
-
);
|
|
201
|
+
getGlobalVersion(globalVersionPromise, "Initial", setInitialGlobalVersion);
|
|
233
202
|
}
|
|
234
203
|
}, [globalVersionPromise, initialGlobalVersion]);
|
|
235
204
|
const [actualGlobalVersion, setActualGlobalVersion] = useState(null);
|
|
236
205
|
useEffect(() => {
|
|
237
206
|
if (open) {
|
|
238
|
-
getGlobalVersion(
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
(loading) => {
|
|
243
|
-
setLoadingGlobalVersion(loading);
|
|
244
|
-
setShowGlobalVersion(false);
|
|
245
|
-
}
|
|
246
|
-
);
|
|
207
|
+
getGlobalVersion(globalVersionPromise, "Actual", setActualGlobalVersion, (loading) => {
|
|
208
|
+
setLoadingGlobalVersion(loading);
|
|
209
|
+
setShowGlobalVersion(false);
|
|
210
|
+
});
|
|
247
211
|
}
|
|
248
212
|
}, [open, globalVersionPromise]);
|
|
249
213
|
const [loadingAdditionalModules, setLoadingAdditionalModules] = useState(false);
|
|
@@ -257,23 +221,14 @@ function AboutDialog({
|
|
|
257
221
|
gitTag: appGitTag
|
|
258
222
|
// license: appLicense,
|
|
259
223
|
};
|
|
260
|
-
(additionalModulesPromise ? Promise.resolve(setLoadingAdditionalModules(true)).then(
|
|
261
|
-
() => additionalModulesPromise()
|
|
262
|
-
) : Promise.reject(new Error("no getter"))).then(
|
|
224
|
+
(additionalModulesPromise ? Promise.resolve(setLoadingAdditionalModules(true)).then(() => additionalModulesPromise()) : Promise.reject(new Error("no getter"))).then(
|
|
263
225
|
(values) => Array.isArray(values) ? values : [],
|
|
264
226
|
() => []
|
|
265
227
|
).then((values) => {
|
|
266
228
|
setModules([currentApp, ...values]);
|
|
267
229
|
}).finally(() => setLoadingAdditionalModules(false));
|
|
268
230
|
}
|
|
269
|
-
}, [
|
|
270
|
-
open,
|
|
271
|
-
additionalModulesPromise,
|
|
272
|
-
appName,
|
|
273
|
-
appVersion,
|
|
274
|
-
appGitTag,
|
|
275
|
-
appLicense
|
|
276
|
-
]);
|
|
231
|
+
}, [open, additionalModulesPromise, appName, appVersion, appGitTag, appLicense]);
|
|
277
232
|
const handleClose = useCallback(() => {
|
|
278
233
|
if (onClose) {
|
|
279
234
|
onClose();
|
|
@@ -324,13 +279,7 @@ function AboutDialog({
|
|
|
324
279
|
}
|
|
325
280
|
) }),
|
|
326
281
|
/* @__PURE__ */ jsxs(Box, { sx: styles.mainSection, children: [
|
|
327
|
-
/* @__PURE__ */ jsx(Box, { sx: styles.logoSection, children: logo || /* @__PURE__ */ jsx(
|
|
328
|
-
LogoText,
|
|
329
|
-
{
|
|
330
|
-
appName: "Suite",
|
|
331
|
-
appColor: theme.palette.grey["500"]
|
|
332
|
-
}
|
|
333
|
-
) }),
|
|
282
|
+
/* @__PURE__ */ jsx(Box, { sx: styles.logoSection, children: logo || /* @__PURE__ */ jsx(LogoText, { appName: "Suite", appColor: theme.palette.grey["500"] }) }),
|
|
334
283
|
/* @__PURE__ */ jsxs(Box, { sx: styles.mainInfos, children: [
|
|
335
284
|
/* @__PURE__ */ jsx(
|
|
336
285
|
Fade,
|
|
@@ -352,9 +301,7 @@ function AboutDialog({
|
|
|
352
301
|
Typography,
|
|
353
302
|
{
|
|
354
303
|
component: "span",
|
|
355
|
-
sx: styles.versionField(
|
|
356
|
-
!loadingGlobalVersion && !!actualGlobalVersion
|
|
357
|
-
),
|
|
304
|
+
sx: styles.versionField(!loadingGlobalVersion && !!actualGlobalVersion),
|
|
358
305
|
children: actualGlobalVersion || "unknown"
|
|
359
306
|
}
|
|
360
307
|
)
|
|
@@ -365,78 +312,30 @@ function AboutDialog({
|
|
|
365
312
|
] })
|
|
366
313
|
] }),
|
|
367
314
|
/* @__PURE__ */ jsx(DialogContent, { id: "alert-dialog-description", children: /* @__PURE__ */ jsxs(Box, { sx: styles.detailsSection, children: [
|
|
368
|
-
/* @__PURE__ */ jsxs(
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
),
|
|
393
|
-
/* @__PURE__ */ jsxs(
|
|
394
|
-
Accordion,
|
|
395
|
-
{
|
|
396
|
-
disableGutters: true,
|
|
397
|
-
variant: "outlined",
|
|
398
|
-
TransitionProps: { unmountOnExit: true },
|
|
399
|
-
children: [
|
|
400
|
-
/* @__PURE__ */ jsxs(
|
|
401
|
-
AccordionSummary,
|
|
402
|
-
{
|
|
403
|
-
expandIcon: /* @__PURE__ */ jsx(ExpandMore, {}),
|
|
404
|
-
"aria-controls": "panel2-content",
|
|
405
|
-
id: "panel2-header",
|
|
406
|
-
children: [
|
|
407
|
-
/* @__PURE__ */ jsx(Apps, { fontSize: "small" }),
|
|
408
|
-
/* @__PURE__ */ jsx(FormattedMessage, { id: "about-dialog/modules-section" })
|
|
409
|
-
]
|
|
410
|
-
}
|
|
411
|
-
),
|
|
412
|
-
/* @__PURE__ */ jsx(AccordionDetails, { children: /* @__PURE__ */ jsx(Grid, { container: true, sx: { pl: 2 }, spacing: 1, children: loadingAdditionalModules ? /* @__PURE__ */ jsx(
|
|
413
|
-
Grid,
|
|
414
|
-
{
|
|
415
|
-
item: true,
|
|
416
|
-
xs: true,
|
|
417
|
-
display: "inline-flex",
|
|
418
|
-
justifyContent: "center",
|
|
419
|
-
children: /* @__PURE__ */ jsx(CircularProgress, { color: "inherit" })
|
|
420
|
-
}
|
|
421
|
-
) : Array.isArray(modules) && /* @__PURE__ */ jsx(Fragment, { children: [...modules].sort(compareModules).map((module, idx) => /* @__PURE__ */ jsx(
|
|
422
|
-
Module,
|
|
423
|
-
{
|
|
424
|
-
type: module.type,
|
|
425
|
-
name: module.name,
|
|
426
|
-
version: module.version,
|
|
427
|
-
gitTag: module.gitTag
|
|
428
|
-
},
|
|
429
|
-
`module-${idx}`
|
|
430
|
-
)) }) || /* @__PURE__ */ jsx(
|
|
431
|
-
Typography,
|
|
432
|
-
{
|
|
433
|
-
color: (selectedTheme) => selectedTheme.palette.error.main,
|
|
434
|
-
children: "Error"
|
|
435
|
-
}
|
|
436
|
-
) }) })
|
|
437
|
-
]
|
|
438
|
-
}
|
|
439
|
-
)
|
|
315
|
+
/* @__PURE__ */ jsxs(Accordion, { disableGutters: true, variant: "outlined", disabled: true, sx: { display: "none" }, children: [
|
|
316
|
+
/* @__PURE__ */ jsxs(AccordionSummary, { expandIcon: /* @__PURE__ */ jsx(ExpandMore, {}), "aria-controls": "panel1-content", id: "panel1-header", children: [
|
|
317
|
+
/* @__PURE__ */ jsx(Gavel, { fontSize: "small" }),
|
|
318
|
+
/* @__PURE__ */ jsx(Typography, { sx: { width: "33%", flexShrink: 0 }, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "about-dialog/license" }) }),
|
|
319
|
+
/* @__PURE__ */ jsx(Typography, { sx: { color: "text.secondary" }, children: appLicense })
|
|
320
|
+
] }),
|
|
321
|
+
/* @__PURE__ */ jsx(AccordionDetails, { children: "license app summary text" })
|
|
322
|
+
] }),
|
|
323
|
+
/* @__PURE__ */ jsxs(Accordion, { disableGutters: true, variant: "outlined", TransitionProps: { unmountOnExit: true }, children: [
|
|
324
|
+
/* @__PURE__ */ jsxs(AccordionSummary, { expandIcon: /* @__PURE__ */ jsx(ExpandMore, {}), "aria-controls": "panel2-content", id: "panel2-header", children: [
|
|
325
|
+
/* @__PURE__ */ jsx(Apps, { fontSize: "small" }),
|
|
326
|
+
/* @__PURE__ */ jsx(FormattedMessage, { id: "about-dialog/modules-section" })
|
|
327
|
+
] }),
|
|
328
|
+
/* @__PURE__ */ jsx(AccordionDetails, { children: /* @__PURE__ */ jsx(Grid, { container: true, sx: { pl: 2 }, spacing: 1, children: loadingAdditionalModules ? /* @__PURE__ */ jsx(Grid, { item: true, xs: true, display: "inline-flex", justifyContent: "center", children: /* @__PURE__ */ jsx(CircularProgress, { color: "inherit" }) }) : Array.isArray(modules) && /* @__PURE__ */ jsx(Fragment, { children: [...modules].sort(compareModules).map((module, idx) => /* @__PURE__ */ jsx(
|
|
329
|
+
Module,
|
|
330
|
+
{
|
|
331
|
+
type: module.type,
|
|
332
|
+
name: module.name,
|
|
333
|
+
version: module.version,
|
|
334
|
+
gitTag: module.gitTag
|
|
335
|
+
},
|
|
336
|
+
`module-${idx}`
|
|
337
|
+
)) }) || /* @__PURE__ */ jsx(Typography, { color: (selectedTheme) => selectedTheme.palette.error.main, children: "Error" }) }) })
|
|
338
|
+
] })
|
|
440
339
|
] }) }),
|
|
441
340
|
/* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, { onClick: handleClose, autoFocus: true, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "close" }) }) })
|
|
442
341
|
]
|
|
@@ -4,8 +4,8 @@ import { SxProps } from '@mui/material';
|
|
|
4
4
|
export interface GridLogoProps extends Omit<LogoTextProps, 'style'> {
|
|
5
5
|
appLogo: ReactNode;
|
|
6
6
|
}
|
|
7
|
-
export declare function LogoText({ appName, appColor, style, onClick
|
|
8
|
-
declare function GridLogo({ appLogo, appName, appColor, onClick
|
|
7
|
+
export declare function LogoText({ appName, appColor, style, onClick }: Partial<LogoTextProps>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function GridLogo({ appLogo, appName, appColor, onClick }: Partial<GridLogoProps>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default GridLogo;
|
|
10
10
|
export interface LogoTextProps {
|
|
11
11
|
appName: string;
|