@gridsuite/commons-ui 0.61.4 → 0.63.0
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/components/AuthenticationRouter/AuthenticationRouter.d.ts +1 -1
- package/dist/components/AuthenticationRouter/AuthenticationRouter.js +5 -5
- package/dist/components/AuthenticationRouter/index.d.ts +3 -7
- package/dist/components/AuthenticationRouter/index.js +2 -2
- package/dist/components/CardErrorBoundary/card-error-boundary.d.ts +0 -1
- package/dist/components/CardErrorBoundary/card-error-boundary.js +5 -3
- package/dist/components/CardErrorBoundary/index.d.ts +3 -7
- package/dist/components/CardErrorBoundary/index.js +2 -2
- package/dist/components/CustomAGGrid/custom-aggrid.js +1 -1
- package/dist/components/CustomAGGrid/custom-aggrid.style.js +5 -5
- package/dist/components/DirectoryItemSelector/directory-item-selector.d.ts +2 -3
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +108 -105
- package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +1 -1
- package/dist/components/ElementSearchDialog/element-search-dialog.js +2 -2
- package/dist/components/ElementSearchDialog/element-search-input.d.ts +1 -1
- package/dist/components/ElementSearchDialog/element-search-input.js +4 -6
- package/dist/components/ElementSearchDialog/equipment-item.d.ts +3 -3
- package/dist/components/ElementSearchDialog/equipment-item.js +13 -13
- package/dist/components/ElementSearchDialog/index.d.ts +3 -3
- package/dist/components/ElementSearchDialog/index.js +5 -5
- package/dist/components/ElementSearchDialog/tag-renderer.d.ts +11 -12
- package/dist/components/ElementSearchDialog/tag-renderer.js +5 -6
- package/dist/components/ElementSearchDialog/use-element-search.d.ts +2 -2
- package/dist/components/ElementSearchDialog/use-element-search.js +2 -2
- package/dist/components/ExpandableGroup/expandable-group.d.ts +3 -3
- package/dist/components/ExpandableGroup/expandable-group.js +6 -6
- package/dist/components/ExpandableGroup/index.d.ts +3 -7
- package/dist/components/ExpandableGroup/index.js +2 -2
- package/dist/components/FlatParameters/FlatParameters.d.ts +1 -1
- package/dist/components/FlatParameters/FlatParameters.js +46 -46
- package/dist/components/FlatParameters/index.d.ts +3 -7
- package/dist/components/Login/Login.d.ts +1 -7
- package/dist/components/Login/Login.js +3 -9
- package/dist/components/Login/Logout.d.ts +1 -1
- package/dist/components/Login/Logout.js +11 -11
- package/dist/components/Login/index.d.ts +3 -7
- package/dist/components/Login/index.js +2 -2
- package/dist/components/MuiVirtualizedTable/ColumnHeader.js +9 -8
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.d.ts +24 -9
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +200 -205
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +6 -6
- package/dist/components/MuiVirtualizedTable/index.d.ts +2 -2
- package/dist/components/MuiVirtualizedTable/index.js +3 -3
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.d.ts +1 -1
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +5 -15
- package/dist/components/MultipleSelectionDialog/index.d.ts +3 -7
- package/dist/components/MultipleSelectionDialog/index.js +2 -2
- package/dist/components/OverflowableText/index.d.ts +3 -7
- package/dist/components/OverflowableText/overflowable-text.js +2 -2
- package/dist/components/ReportViewer/filter-button.d.ts +1 -1
- package/dist/components/ReportViewer/filter-button.js +3 -3
- package/dist/components/ReportViewer/index.d.ts +3 -7
- package/dist/components/ReportViewer/index.js +2 -2
- package/dist/components/ReportViewer/log-report-item.d.ts +1 -1
- package/dist/components/ReportViewer/log-report-item.js +12 -9
- package/dist/components/ReportViewer/log-report.js +3 -3
- package/dist/components/ReportViewer/log-table.d.ts +2 -1
- package/dist/components/ReportViewer/log-table.js +6 -5
- package/dist/components/ReportViewer/multi-select-list.d.ts +1 -1
- package/dist/components/ReportViewer/multi-select-list.js +3 -3
- package/dist/components/ReportViewer/report-item.js +4 -3
- package/dist/components/ReportViewer/report-viewer.js +11 -12
- package/dist/components/ReportViewerDialog/index.d.ts +3 -7
- package/dist/components/ReportViewerDialog/index.js +2 -2
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +1 -1
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +3 -3
- package/dist/components/SignInCallbackHandler/index.d.ts +3 -7
- package/dist/components/SignInCallbackHandler/index.js +2 -2
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +1 -1
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +3 -3
- package/dist/components/SilentRenewCallbackHandler/index.d.ts +3 -7
- package/dist/components/SilentRenewCallbackHandler/index.js +2 -2
- package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +1 -1
- package/dist/components/SnackbarProvider/SnackbarProvider.js +14 -13
- package/dist/components/SnackbarProvider/index.d.ts +3 -7
- package/dist/components/SnackbarProvider/index.js +2 -2
- package/dist/components/TopBar/AboutDialog.d.ts +1 -2
- package/dist/components/TopBar/AboutDialog.js +151 -153
- package/dist/components/TopBar/GridLogo.d.ts +2 -2
- package/dist/components/TopBar/GridLogo.js +24 -24
- package/dist/components/TopBar/TopBar.d.ts +2 -27
- package/dist/components/TopBar/TopBar.js +9 -33
- package/dist/components/TopBar/index.d.ts +1 -1
- package/dist/components/TopBar/index.js +1 -1
- package/dist/components/TreeViewFinder/TreeViewFinder.js +51 -45
- package/dist/components/TreeViewFinder/index.d.ts +1 -1
- package/dist/components/TreeViewFinder/index.js +1 -1
- package/dist/components/dialogs/custom-mui-dialog.d.ts +2 -2
- package/dist/components/dialogs/custom-mui-dialog.js +5 -5
- package/dist/components/dialogs/description-modification-dialog.d.ts +7 -3
- package/dist/components/dialogs/description-modification-dialog.js +11 -5
- package/dist/components/dialogs/modify-element-selection.d.ts +1 -2
- package/dist/components/dialogs/modify-element-selection.js +21 -13
- package/dist/components/dialogs/popup-confirmation-dialog.d.ts +7 -3
- package/dist/components/dialogs/popup-confirmation-dialog.js +3 -6
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.d.ts +4 -5
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +123 -16
- package/dist/components/filter/criteria-based/criteria-based-filter-form.d.ts +1 -2
- package/dist/components/filter/criteria-based/criteria-based-filter-form.js +6 -5
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +27 -20
- package/dist/components/filter/criteria-based/criteria-based-form.d.ts +1 -2
- package/dist/components/filter/criteria-based/criteria-based-form.js +17 -6
- package/dist/components/filter/criteria-based/filter-free-properties.d.ts +5 -3
- package/dist/components/filter/criteria-based/filter-free-properties.js +69 -13
- package/dist/components/filter/criteria-based/filter-properties.d.ts +1 -6
- package/dist/components/filter/criteria-based/filter-properties.js +124 -16
- package/dist/components/filter/criteria-based/filter-property.d.ts +1 -2
- package/dist/components/filter/criteria-based/filter-property.js +16 -16
- package/dist/components/filter/expert/expert-filter-constants.d.ts +1 -1
- package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +3 -4
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +128 -15
- package/dist/components/filter/expert/expert-filter-form.d.ts +1 -2
- package/dist/components/filter/expert/expert-filter-form.js +141 -20
- package/dist/components/filter/expert/expert-filter-utils.d.ts +2 -2
- package/dist/components/filter/expert/expert-filter-utils.js +45 -46
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.d.ts +3 -4
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +136 -16
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +4 -5
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +241 -24
- package/dist/components/filter/filter-creation-dialog.d.ts +3 -4
- package/dist/components/filter/filter-creation-dialog.js +125 -13
- package/dist/components/filter/filter-form.d.ts +4 -5
- package/dist/components/filter/filter-form.js +73 -14
- package/dist/components/filter/utils/filter-api.js +1 -1
- package/dist/components/filter/utils/filter-form-utils.js +1 -1
- package/dist/components/inputs/react-hook-form/ExpandingTextField.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/ExpandingTextField.js +5 -5
- package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +102 -13
- package/dist/components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.d.ts +7 -6
- package/dist/components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.js +13 -15
- package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.d.ts +7 -3
- package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +220 -61
- package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +243 -11
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.d.ts +4 -2
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js +12 -12
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js +2 -2
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.js +2 -2
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.js +3 -3
- package/dist/components/inputs/react-hook-form/booleans/switch-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/switch-input.js +3 -3
- package/dist/components/inputs/react-hook-form/directory-items-input.d.ts +11 -3
- package/dist/components/inputs/react-hook-form/directory-items-input.js +11 -11
- package/dist/components/inputs/react-hook-form/error-management/error-input.d.ts +2 -2
- package/dist/components/inputs/react-hook-form/error-management/error-input.js +7 -9
- package/dist/components/inputs/react-hook-form/error-management/field-error-alert.d.ts +2 -2
- package/dist/components/inputs/react-hook-form/error-management/field-error-alert.js +2 -4
- package/dist/components/inputs/react-hook-form/error-management/mid-form-error.d.ts +2 -2
- package/dist/components/inputs/react-hook-form/error-management/mid-form-error.js +2 -2
- package/dist/components/inputs/react-hook-form/numbers/float-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/numbers/float-input.js +6 -5
- package/dist/components/inputs/react-hook-form/numbers/integer-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/numbers/integer-input.js +5 -5
- package/dist/components/inputs/react-hook-form/provider/custom-form-provider.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/provider/custom-form-provider.js +11 -8
- package/dist/components/inputs/react-hook-form/provider/use-custom-form-context.d.ts +2 -1
- package/dist/components/inputs/react-hook-form/provider/use-custom-form-context.js +1 -1
- package/dist/components/inputs/react-hook-form/radio-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/radio-input.js +2 -8
- package/dist/components/inputs/react-hook-form/range-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/range-input.js +5 -5
- package/dist/components/inputs/react-hook-form/raw-read-only-input.d.ts +2 -1
- package/dist/components/inputs/react-hook-form/raw-read-only-input.js +1 -1
- package/dist/components/inputs/react-hook-form/select-inputs/countries-input.d.ts +1 -3
- package/dist/components/inputs/react-hook-form/select-inputs/countries-input.js +4 -8
- package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.d.ts +3 -1
- package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js +4 -4
- package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.js +11 -10
- package/dist/components/inputs/react-hook-form/select-inputs/select-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/select-inputs/select-input.js +16 -8
- package/dist/components/inputs/react-hook-form/slider-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/slider-input.js +6 -6
- package/dist/components/inputs/react-hook-form/text-input.d.ts +6 -2
- package/dist/components/inputs/react-hook-form/text-input.js +9 -9
- package/dist/components/inputs/react-hook-form/unique-name-input.d.ts +4 -6
- package/dist/components/inputs/react-hook-form/unique-name-input.js +12 -12
- package/dist/components/inputs/react-hook-form/utils/cancel-button.d.ts +9 -10
- package/dist/components/inputs/react-hook-form/utils/cancel-button.js +2 -6
- 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 +3 -3
- package/dist/components/inputs/react-hook-form/utils/functions.js +1 -1
- package/dist/components/inputs/react-hook-form/utils/submit-button.d.ts +9 -10
- package/dist/components/inputs/react-hook-form/utils/submit-button.js +2 -6
- package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.js +7 -7
- package/dist/components/inputs/react-query-builder/add-button.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/add-button.js +13 -10
- package/dist/components/inputs/react-query-builder/combinator-selector.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/combinator-selector.js +7 -6
- package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.js +2 -2
- package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.js +5 -5
- package/dist/components/inputs/react-query-builder/country-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/country-value-editor.js +18 -18
- package/dist/components/inputs/react-query-builder/custom-react-query-builder.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +92 -19
- package/dist/components/inputs/react-query-builder/element-value-editor.d.ts +7 -3
- package/dist/components/inputs/react-query-builder/element-value-editor.js +50 -62
- package/dist/components/inputs/react-query-builder/property-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/property-value-editor.js +5 -5
- package/dist/components/inputs/react-query-builder/remove-button.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/remove-button.js +26 -7
- package/dist/components/inputs/react-query-builder/text-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/text-value-editor.js +17 -17
- package/dist/components/inputs/react-query-builder/translated-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/translated-value-editor.js +22 -26
- package/dist/components/inputs/react-query-builder/value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/value-editor.js +119 -18
- package/dist/components/inputs/react-query-builder/value-selector.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/value-selector.js +2 -2
- package/dist/components/inputs/select-clearable.d.ts +1 -2
- package/dist/components/inputs/select-clearable.js +6 -5
- package/dist/components/translations/card-error-boundary-en.d.ts +2 -2
- package/dist/components/translations/card-error-boundary-en.js +2 -2
- package/dist/components/translations/card-error-boundary-fr.d.ts +2 -2
- package/dist/components/translations/card-error-boundary-fr.js +2 -2
- package/dist/components/translations/common-button-en.d.ts +2 -2
- package/dist/components/translations/common-button-en.js +2 -2
- package/dist/components/translations/common-button-fr.d.ts +2 -2
- package/dist/components/translations/common-button-fr.js +2 -2
- package/dist/components/translations/directory-items-input-en.d.ts +2 -2
- package/dist/components/translations/directory-items-input-en.js +2 -2
- package/dist/components/translations/directory-items-input-fr.d.ts +2 -2
- package/dist/components/translations/directory-items-input-fr.js +2 -2
- package/dist/components/translations/element-search-en.d.ts +2 -2
- package/dist/components/translations/element-search-en.js +2 -2
- package/dist/components/translations/element-search-fr.d.ts +2 -2
- package/dist/components/translations/element-search-fr.js +2 -2
- package/dist/components/translations/equipment-search-en.d.ts +2 -2
- package/dist/components/translations/equipment-search-en.js +2 -2
- package/dist/components/translations/equipment-search-fr.d.ts +2 -2
- package/dist/components/translations/equipment-search-fr.js +2 -2
- package/dist/components/translations/filter-en.d.ts +3 -2
- package/dist/components/translations/filter-en.js +3 -2
- package/dist/components/translations/filter-expert-en.d.ts +2 -2
- package/dist/components/translations/filter-expert-en.js +2 -2
- package/dist/components/translations/filter-expert-fr.d.ts +2 -2
- package/dist/components/translations/filter-expert-fr.js +2 -2
- package/dist/components/translations/filter-fr.d.ts +3 -2
- package/dist/components/translations/filter-fr.js +3 -2
- package/dist/components/translations/flat-parameters-en.d.ts +2 -2
- package/dist/components/translations/flat-parameters-en.js +2 -2
- package/dist/components/translations/flat-parameters-fr.d.ts +2 -2
- package/dist/components/translations/flat-parameters-fr.js +2 -2
- package/dist/components/translations/inputs-en.d.ts +2 -2
- package/dist/components/translations/inputs-en.js +2 -2
- package/dist/components/translations/inputs-fr.d.ts +2 -2
- package/dist/components/translations/inputs-fr.js +2 -2
- package/dist/components/translations/login-en.d.ts +2 -2
- package/dist/components/translations/login-en.js +2 -2
- package/dist/components/translations/login-fr.d.ts +2 -2
- package/dist/components/translations/login-fr.js +2 -2
- package/dist/components/translations/multiple-selection-dialog-en.d.ts +2 -2
- package/dist/components/translations/multiple-selection-dialog-en.js +2 -2
- package/dist/components/translations/multiple-selection-dialog-fr.d.ts +2 -2
- package/dist/components/translations/multiple-selection-dialog-fr.js +2 -2
- package/dist/components/translations/report-viewer-en.d.ts +2 -2
- package/dist/components/translations/report-viewer-en.js +2 -2
- package/dist/components/translations/report-viewer-fr.d.ts +2 -2
- package/dist/components/translations/report-viewer-fr.js +2 -2
- package/dist/components/translations/table-en.d.ts +2 -2
- package/dist/components/translations/table-en.js +2 -2
- package/dist/components/translations/table-fr.d.ts +2 -2
- package/dist/components/translations/table-fr.js +2 -2
- package/dist/components/translations/top-bar-en.d.ts +2 -2
- package/dist/components/translations/top-bar-en.js +2 -2
- package/dist/components/translations/top-bar-fr.d.ts +2 -2
- package/dist/components/translations/top-bar-fr.js +2 -2
- package/dist/components/translations/treeview-finder-en.d.ts +2 -2
- package/dist/components/translations/treeview-finder-en.js +2 -2
- package/dist/components/translations/treeview-finder-fr.d.ts +2 -2
- package/dist/components/translations/treeview-finder-fr.js +2 -2
- package/dist/hooks/localized-countries-hook.js +1 -1
- package/dist/hooks/predefined-properties-hook.d.ts +2 -1
- package/dist/hooks/predefined-properties-hook.js +2 -2
- package/dist/hooks/useDebounce.d.ts +2 -1
- package/dist/hooks/useDebounce.js +1 -1
- package/dist/hooks/useIntlRef.d.ts +2 -1
- package/dist/hooks/useIntlRef.js +1 -1
- package/dist/hooks/useSnackMessage.d.ts +2 -2
- package/dist/hooks/useSnackMessage.js +36 -36
- package/dist/index.d.ts +13 -14
- package/dist/index.js +163 -157
- package/dist/redux/commonStore.d.ts +1 -1
- package/dist/services/apps-metadata.js +1 -1
- package/dist/services/directory.js +6 -6
- package/dist/services/explore.js +14 -12
- package/dist/services/index.d.ts +0 -5
- package/dist/services/study.js +2 -2
- package/dist/services/utils.d.ts +1 -1
- package/dist/services/utils.js +26 -26
- package/dist/utils/AuthService.d.ts +21 -12
- package/dist/utils/AuthService.js +88 -143
- package/dist/utils/ElementIcon.d.ts +3 -2
- package/dist/utils/ElementIcon.js +4 -3
- package/dist/utils/ElementType.d.ts +3 -6
- package/dist/utils/EquipmentType.js +3 -3
- package/dist/utils/FetchStatus.d.ts +2 -1
- package/dist/utils/FetchStatus.js +1 -1
- package/dist/utils/Metadata.d.ts +15 -0
- package/dist/utils/Metadata.js +1 -0
- package/dist/utils/UserManagerMock.d.ts +50 -25
- package/dist/utils/UserManagerMock.js +118 -11
- package/dist/utils/algos.d.ts +2 -1
- package/dist/utils/algos.js +2 -2
- package/dist/utils/equipment-types-for-predefined-properties-mapper.d.ts +2 -1
- package/dist/utils/equipment-types-for-predefined-properties-mapper.js +3 -1
- package/dist/utils/field-constants.d.ts +2 -1
- package/dist/utils/field-constants.js +1 -1
- package/dist/utils/functions.js +5 -2
- package/dist/utils/types.d.ts +1 -1
- package/dist/utils/yup-config.js +1 -2
- package/package.json +10 -4
- package/dist/chunks/criteria-based-filter-edition-dialog.CAT38SvB.js +0 -1694
- package/dist/chunks/filter-properties.B7-q_yPf.js +0 -195
- /package/dist/assets/{criteria-based-filter-edition-dialog.css → expert-filter-form.css} +0 -0
|
@@ -8,7 +8,7 @@ import { LogoText } from "./GridLogo.js";
|
|
|
8
8
|
const styles = {
|
|
9
9
|
general: {
|
|
10
10
|
".MuiAccordion-root": {
|
|
11
|
-
//dunno why the theme has the background as black in dark mode
|
|
11
|
+
// dunno why the theme has the background as black in dark mode
|
|
12
12
|
bgcolor: "unset"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
@@ -37,7 +37,7 @@ const styles = {
|
|
|
37
37
|
function getGlobalVersion(fnPromise, type, setData, setLoader) {
|
|
38
38
|
if (fnPromise) {
|
|
39
39
|
console.debug("Getting", type, "global version...");
|
|
40
|
-
return new Promise((resolve
|
|
40
|
+
return new Promise((resolve) => {
|
|
41
41
|
if (setLoader) {
|
|
42
42
|
setLoader(true);
|
|
43
43
|
}
|
|
@@ -60,10 +60,10 @@ function getGlobalVersion(fnPromise, type, setData, setLoader) {
|
|
|
60
60
|
setLoader(false);
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
} else {
|
|
64
|
-
console.debug("No getter for global version");
|
|
65
|
-
setData(null);
|
|
66
63
|
}
|
|
64
|
+
console.debug("No getter for global version");
|
|
65
|
+
setData(null);
|
|
66
|
+
return Promise.resolve(null);
|
|
67
67
|
}
|
|
68
68
|
const moduleTypeSort = {
|
|
69
69
|
app: 1,
|
|
@@ -73,7 +73,141 @@ const moduleTypeSort = {
|
|
|
73
73
|
function compareModules(c1, c2) {
|
|
74
74
|
return (moduleTypeSort[c1.type] || 100) - (moduleTypeSort[c2.type] || 100) || (c1.name || "").localeCompare(c2.name || "");
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const moduleStyles = {
|
|
77
|
+
icons: {
|
|
78
|
+
flexGrow: 0,
|
|
79
|
+
position: "relative",
|
|
80
|
+
top: "4px",
|
|
81
|
+
flexShrink: 0
|
|
82
|
+
},
|
|
83
|
+
version: {
|
|
84
|
+
flexGrow: 0,
|
|
85
|
+
alignSelf: "flex-end",
|
|
86
|
+
flexShrink: 0
|
|
87
|
+
},
|
|
88
|
+
tooltip: (theme) => ({
|
|
89
|
+
[`& .${tooltipClasses.tooltip}`]: {
|
|
90
|
+
border: "1px solid #dadde9",
|
|
91
|
+
boxShadow: theme.shadows[1]
|
|
92
|
+
}
|
|
93
|
+
}),
|
|
94
|
+
tooltipDetails: {
|
|
95
|
+
display: "grid",
|
|
96
|
+
gridTemplateColumns: "max-content auto",
|
|
97
|
+
margin: 0,
|
|
98
|
+
dt: {
|
|
99
|
+
gridColumnStart: 1,
|
|
100
|
+
"&:after": {
|
|
101
|
+
content: '" :"'
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
dd: {
|
|
105
|
+
gridColumnStart: 2,
|
|
106
|
+
paddingLeft: "0.5em"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const ModuleTypesIcons = {
|
|
111
|
+
app: /* @__PURE__ */ jsx(
|
|
112
|
+
WidgetsOutlined,
|
|
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
|
+
),
|
|
127
|
+
other: /* @__PURE__ */ jsx(QuestionMark, { sx: moduleStyles.icons, fontSize: "small" })
|
|
128
|
+
};
|
|
129
|
+
function insensitiveCaseCompare(str, obj) {
|
|
130
|
+
return str.localeCompare(obj, void 0, {
|
|
131
|
+
sensitivity: "base"
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function tooltipTypeLabel(type) {
|
|
135
|
+
if (insensitiveCaseCompare("app", type) === 0) {
|
|
136
|
+
return "about-dialog/module-tooltip-app";
|
|
137
|
+
}
|
|
138
|
+
if (insensitiveCaseCompare("server", type) === 0) {
|
|
139
|
+
return "about-dialog/module-tooltip-server";
|
|
140
|
+
}
|
|
141
|
+
return "about-dialog/module-tooltip-other";
|
|
142
|
+
}
|
|
143
|
+
function Module({ type, name, version, gitTag }) {
|
|
144
|
+
return /* @__PURE__ */ jsx(
|
|
145
|
+
Grid,
|
|
146
|
+
{
|
|
147
|
+
item: true,
|
|
148
|
+
xs: 12,
|
|
149
|
+
sm: 6,
|
|
150
|
+
md: 4,
|
|
151
|
+
sx: {
|
|
152
|
+
".MuiTypography-root": {
|
|
153
|
+
minWidth: "3em"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
children: /* @__PURE__ */ jsx(
|
|
157
|
+
Tooltip,
|
|
158
|
+
{
|
|
159
|
+
TransitionComponent: Zoom,
|
|
160
|
+
enterDelay: 2500,
|
|
161
|
+
enterNextDelay: 350,
|
|
162
|
+
leaveDelay: 200,
|
|
163
|
+
placement: "bottom-start",
|
|
164
|
+
arrow: true,
|
|
165
|
+
sx: moduleStyles.tooltip,
|
|
166
|
+
title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
167
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: name || "<?>" }),
|
|
168
|
+
/* @__PURE__ */ jsxs(Box, { component: "dl", sx: moduleStyles.tooltipDetails, children: [
|
|
169
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dt", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "about-dialog/label-type" }) }),
|
|
170
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dd", children: /* @__PURE__ */ jsx(FormattedMessage, { id: tooltipTypeLabel(type) }) }),
|
|
171
|
+
version && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
172
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dt", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "about-dialog/label-version" }) }),
|
|
173
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dd", children: version })
|
|
174
|
+
] }),
|
|
175
|
+
gitTag && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
176
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dt", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "about-dialog/label-git-version" }) }),
|
|
177
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dd", children: gitTag })
|
|
178
|
+
] })
|
|
179
|
+
] })
|
|
180
|
+
] }),
|
|
181
|
+
children: /* @__PURE__ */ jsxs(
|
|
182
|
+
Stack,
|
|
183
|
+
{
|
|
184
|
+
direction: "row",
|
|
185
|
+
justifyContent: "flex-start",
|
|
186
|
+
alignItems: "baseline",
|
|
187
|
+
spacing: 1,
|
|
188
|
+
children: [
|
|
189
|
+
ModuleTypesIcons[type] || ModuleTypesIcons.other,
|
|
190
|
+
/* @__PURE__ */ jsx(Typography, { display: "inline", noWrap: true, children: name || "<?>" }),
|
|
191
|
+
/* @__PURE__ */ jsx(
|
|
192
|
+
Typography,
|
|
193
|
+
{
|
|
194
|
+
variant: "caption",
|
|
195
|
+
color: (theme) => theme.palette.text.secondary,
|
|
196
|
+
display: "inline",
|
|
197
|
+
noWrap: true,
|
|
198
|
+
sx: moduleStyles.version,
|
|
199
|
+
children: gitTag || version || null
|
|
200
|
+
}
|
|
201
|
+
)
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
)
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
function AboutDialog({
|
|
77
211
|
open,
|
|
78
212
|
onClose,
|
|
79
213
|
globalVersionPromise,
|
|
@@ -83,9 +217,9 @@ const AboutDialog = ({
|
|
|
83
217
|
appLicense,
|
|
84
218
|
additionalModulesPromise,
|
|
85
219
|
logo
|
|
86
|
-
})
|
|
220
|
+
}) {
|
|
87
221
|
const theme = useTheme();
|
|
88
|
-
const [isRefreshing,
|
|
222
|
+
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
89
223
|
const [loadingGlobalVersion, setLoadingGlobalVersion] = useState(false);
|
|
90
224
|
const [showGlobalVersion, setShowGlobalVersion] = useState(false);
|
|
91
225
|
const [initialGlobalVersion, setInitialGlobalVersion] = useState(void 0);
|
|
@@ -94,8 +228,7 @@ const AboutDialog = ({
|
|
|
94
228
|
getGlobalVersion(
|
|
95
229
|
globalVersionPromise,
|
|
96
230
|
"Initial",
|
|
97
|
-
setInitialGlobalVersion
|
|
98
|
-
void 0
|
|
231
|
+
setInitialGlobalVersion
|
|
99
232
|
);
|
|
100
233
|
}
|
|
101
234
|
}, [globalVersionPromise, initialGlobalVersion]);
|
|
@@ -121,14 +254,14 @@ const AboutDialog = ({
|
|
|
121
254
|
name: `Grid${appName}`,
|
|
122
255
|
type: "app",
|
|
123
256
|
version: appVersion,
|
|
124
|
-
gitTag: appGitTag
|
|
125
|
-
license: appLicense
|
|
257
|
+
gitTag: appGitTag
|
|
258
|
+
// license: appLicense,
|
|
126
259
|
};
|
|
127
260
|
(additionalModulesPromise ? Promise.resolve(setLoadingAdditionalModules(true)).then(
|
|
128
261
|
() => additionalModulesPromise()
|
|
129
262
|
) : Promise.reject(new Error("no getter"))).then(
|
|
130
263
|
(values) => Array.isArray(values) ? values : [],
|
|
131
|
-
(
|
|
264
|
+
() => []
|
|
132
265
|
).then((values) => {
|
|
133
266
|
setModules([currentApp, ...values]);
|
|
134
267
|
}).finally(() => setLoadingAdditionalModules(false));
|
|
@@ -158,7 +291,7 @@ const AboutDialog = ({
|
|
|
158
291
|
"aria-labelledby": "alert-dialog-title",
|
|
159
292
|
"aria-describedby": "alert-dialog-description",
|
|
160
293
|
TransitionProps: {
|
|
161
|
-
onExited: (
|
|
294
|
+
onExited: () => {
|
|
162
295
|
setModules(null);
|
|
163
296
|
setActualGlobalVersion(null);
|
|
164
297
|
}
|
|
@@ -180,7 +313,7 @@ const AboutDialog = ({
|
|
|
180
313
|
loadingPosition: "start",
|
|
181
314
|
loading: isRefreshing,
|
|
182
315
|
onClick: () => {
|
|
183
|
-
|
|
316
|
+
setIsRefreshing(true);
|
|
184
317
|
window.location.reload();
|
|
185
318
|
},
|
|
186
319
|
children: /* @__PURE__ */ jsx(FormattedMessage, { id: "refresh" })
|
|
@@ -205,7 +338,7 @@ const AboutDialog = ({
|
|
|
205
338
|
in: loadingGlobalVersion,
|
|
206
339
|
appear: true,
|
|
207
340
|
unmountOnExit: true,
|
|
208
|
-
onExited: (
|
|
341
|
+
onExited: () => setShowGlobalVersion(true),
|
|
209
342
|
children: /* @__PURE__ */ jsx(CircularProgress, {})
|
|
210
343
|
}
|
|
211
344
|
),
|
|
@@ -291,14 +424,13 @@ const AboutDialog = ({
|
|
|
291
424
|
type: module.type,
|
|
292
425
|
name: module.name,
|
|
293
426
|
version: module.version,
|
|
294
|
-
gitTag: module.gitTag
|
|
295
|
-
license: module.license
|
|
427
|
+
gitTag: module.gitTag
|
|
296
428
|
},
|
|
297
429
|
`module-${idx}`
|
|
298
430
|
)) }) || /* @__PURE__ */ jsx(
|
|
299
431
|
Typography,
|
|
300
432
|
{
|
|
301
|
-
color: (
|
|
433
|
+
color: (selectedTheme) => selectedTheme.palette.error.main,
|
|
302
434
|
children: "Error"
|
|
303
435
|
}
|
|
304
436
|
) }) })
|
|
@@ -310,141 +442,7 @@ const AboutDialog = ({
|
|
|
310
442
|
]
|
|
311
443
|
}
|
|
312
444
|
);
|
|
313
|
-
};
|
|
314
|
-
const moduleStyles = {
|
|
315
|
-
icons: {
|
|
316
|
-
flexGrow: 0,
|
|
317
|
-
position: "relative",
|
|
318
|
-
top: "4px",
|
|
319
|
-
flexShrink: 0
|
|
320
|
-
},
|
|
321
|
-
version: {
|
|
322
|
-
flexGrow: 0,
|
|
323
|
-
alignSelf: "flex-end",
|
|
324
|
-
flexShrink: 0
|
|
325
|
-
},
|
|
326
|
-
tooltip: (theme) => ({
|
|
327
|
-
[`& .${tooltipClasses.tooltip}`]: {
|
|
328
|
-
border: "1px solid #dadde9",
|
|
329
|
-
boxShadow: theme.shadows[1]
|
|
330
|
-
}
|
|
331
|
-
}),
|
|
332
|
-
tooltipDetails: {
|
|
333
|
-
display: "grid",
|
|
334
|
-
gridTemplateColumns: "max-content auto",
|
|
335
|
-
margin: 0,
|
|
336
|
-
dt: {
|
|
337
|
-
gridColumnStart: 1,
|
|
338
|
-
"&:after": {
|
|
339
|
-
content: '" :"'
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
dd: {
|
|
343
|
-
gridColumnStart: 2,
|
|
344
|
-
paddingLeft: "0.5em"
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
const ModuleTypesIcons = {
|
|
349
|
-
app: /* @__PURE__ */ jsx(
|
|
350
|
-
WidgetsOutlined,
|
|
351
|
-
{
|
|
352
|
-
sx: moduleStyles.icons,
|
|
353
|
-
fontSize: "small",
|
|
354
|
-
color: "primary"
|
|
355
|
-
}
|
|
356
|
-
),
|
|
357
|
-
server: /* @__PURE__ */ jsx(
|
|
358
|
-
DnsOutlined,
|
|
359
|
-
{
|
|
360
|
-
sx: moduleStyles.icons,
|
|
361
|
-
fontSize: "small",
|
|
362
|
-
color: "secondary"
|
|
363
|
-
}
|
|
364
|
-
),
|
|
365
|
-
other: /* @__PURE__ */ jsx(QuestionMark, { sx: moduleStyles.icons, fontSize: "small" })
|
|
366
|
-
};
|
|
367
|
-
function insensitiveCaseCompare(str, obj) {
|
|
368
|
-
return str.localeCompare(obj, void 0, {
|
|
369
|
-
sensitivity: "base"
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
function tooltipTypeLabel(type) {
|
|
373
|
-
if (insensitiveCaseCompare("app", type) === 0) {
|
|
374
|
-
return "about-dialog/module-tooltip-app";
|
|
375
|
-
} else if (insensitiveCaseCompare("server", type) === 0) {
|
|
376
|
-
return "about-dialog/module-tooltip-server";
|
|
377
|
-
} else {
|
|
378
|
-
return "about-dialog/module-tooltip-other";
|
|
379
|
-
}
|
|
380
445
|
}
|
|
381
|
-
const Module = ({ type, name, version, gitTag }) => {
|
|
382
|
-
return /* @__PURE__ */ jsx(
|
|
383
|
-
Grid,
|
|
384
|
-
{
|
|
385
|
-
item: true,
|
|
386
|
-
xs: 12,
|
|
387
|
-
sm: 6,
|
|
388
|
-
md: 4,
|
|
389
|
-
sx: {
|
|
390
|
-
".MuiTypography-root": {
|
|
391
|
-
minWidth: "3em"
|
|
392
|
-
}
|
|
393
|
-
},
|
|
394
|
-
children: /* @__PURE__ */ jsx(
|
|
395
|
-
Tooltip,
|
|
396
|
-
{
|
|
397
|
-
TransitionComponent: Zoom,
|
|
398
|
-
enterDelay: 2500,
|
|
399
|
-
enterNextDelay: 350,
|
|
400
|
-
leaveDelay: 200,
|
|
401
|
-
placement: "bottom-start",
|
|
402
|
-
arrow: true,
|
|
403
|
-
sx: moduleStyles.tooltip,
|
|
404
|
-
title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
405
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: name || "<?>" }),
|
|
406
|
-
/* @__PURE__ */ jsxs(Box, { component: "dl", sx: moduleStyles.tooltipDetails, children: [
|
|
407
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dt", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "about-dialog/label-type" }) }),
|
|
408
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dd", children: /* @__PURE__ */ jsx(FormattedMessage, { id: tooltipTypeLabel(type) }) }),
|
|
409
|
-
version && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
410
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dt", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "about-dialog/label-version" }) }),
|
|
411
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dd", children: version })
|
|
412
|
-
] }),
|
|
413
|
-
gitTag && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
414
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dt", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "about-dialog/label-git-version" }) }),
|
|
415
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", component: "dd", children: gitTag })
|
|
416
|
-
] })
|
|
417
|
-
] })
|
|
418
|
-
] }),
|
|
419
|
-
children: /* @__PURE__ */ jsxs(
|
|
420
|
-
Stack,
|
|
421
|
-
{
|
|
422
|
-
direction: "row",
|
|
423
|
-
justifyContent: "flex-start",
|
|
424
|
-
alignItems: "baseline",
|
|
425
|
-
spacing: 1,
|
|
426
|
-
children: [
|
|
427
|
-
ModuleTypesIcons[type] || ModuleTypesIcons["other"],
|
|
428
|
-
/* @__PURE__ */ jsx(Typography, { display: "inline", noWrap: true, children: name || "<?>" }),
|
|
429
|
-
/* @__PURE__ */ jsx(
|
|
430
|
-
Typography,
|
|
431
|
-
{
|
|
432
|
-
variant: "caption",
|
|
433
|
-
color: (theme) => theme.palette.text.secondary,
|
|
434
|
-
display: "inline",
|
|
435
|
-
noWrap: true,
|
|
436
|
-
sx: moduleStyles.version,
|
|
437
|
-
children: gitTag || version || null
|
|
438
|
-
}
|
|
439
|
-
)
|
|
440
|
-
]
|
|
441
|
-
}
|
|
442
|
-
)
|
|
443
|
-
}
|
|
444
|
-
)
|
|
445
|
-
}
|
|
446
|
-
);
|
|
447
|
-
};
|
|
448
446
|
export {
|
|
449
447
|
AboutDialog as default
|
|
450
448
|
};
|
|
@@ -4,7 +4,8 @@ import { SxProps } from '@mui/material';
|
|
|
4
4
|
export interface GridLogoProps extends Omit<LogoTextProps, 'style'> {
|
|
5
5
|
appLogo: ReactNode;
|
|
6
6
|
}
|
|
7
|
-
declare
|
|
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;
|
|
8
9
|
export default GridLogo;
|
|
9
10
|
export interface LogoTextProps {
|
|
10
11
|
appName: string;
|
|
@@ -12,4 +13,3 @@ export interface LogoTextProps {
|
|
|
12
13
|
style: SxProps;
|
|
13
14
|
onClick: () => void;
|
|
14
15
|
}
|
|
15
|
-
export declare const LogoText: ({ appName, appColor, style, onClick, }: Partial<LogoTextProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs,
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Typography, Box } from "@mui/material";
|
|
3
3
|
import { BrokenImage } from "@mui/icons-material";
|
|
4
4
|
import { mergeSx } from "../../utils/styles.js";
|
|
5
5
|
const styles = {
|
|
@@ -17,12 +17,31 @@ const styles = {
|
|
|
17
17
|
cursor: "pointer"
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
function LogoText({
|
|
21
|
+
appName,
|
|
22
|
+
appColor,
|
|
23
|
+
style,
|
|
24
|
+
onClick
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */ jsxs(
|
|
27
|
+
Typography,
|
|
28
|
+
{
|
|
29
|
+
variant: "h4",
|
|
30
|
+
sx: mergeSx(style, onClick && styles.clickable),
|
|
31
|
+
onClick,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx("span", { style: { fontWeight: "bold" }, children: "Grid" }),
|
|
34
|
+
/* @__PURE__ */ jsx("span", { style: { color: appColor }, children: appName })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
function GridLogo({
|
|
21
40
|
appLogo,
|
|
22
41
|
appName,
|
|
23
42
|
appColor,
|
|
24
43
|
onClick
|
|
25
|
-
})
|
|
44
|
+
}) {
|
|
26
45
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27
46
|
/* @__PURE__ */ jsx(
|
|
28
47
|
Box,
|
|
@@ -42,26 +61,7 @@ const GridLogo = ({
|
|
|
42
61
|
}
|
|
43
62
|
)
|
|
44
63
|
] });
|
|
45
|
-
}
|
|
46
|
-
const LogoText = ({
|
|
47
|
-
appName,
|
|
48
|
-
appColor,
|
|
49
|
-
style,
|
|
50
|
-
onClick
|
|
51
|
-
}) => {
|
|
52
|
-
return /* @__PURE__ */ jsxs(
|
|
53
|
-
Typography,
|
|
54
|
-
{
|
|
55
|
-
variant: "h4",
|
|
56
|
-
sx: mergeSx(style, onClick && styles.clickable),
|
|
57
|
-
onClick,
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ jsx("span", { style: { fontWeight: "bold" }, children: "Grid" }),
|
|
60
|
-
/* @__PURE__ */ jsx("span", { style: { color: appColor }, children: appName })
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
};
|
|
64
|
+
}
|
|
65
65
|
export {
|
|
66
66
|
LogoText,
|
|
67
67
|
GridLogo as default
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CommonMetadata } from '../../services';
|
|
2
|
-
import { User } from 'oidc-client';
|
|
3
2
|
import { LogoutProps } from '../Login/Logout';
|
|
4
3
|
import { AboutDialogProps } from './AboutDialog';
|
|
5
4
|
import { GridLogoProps } from './GridLogo';
|
|
6
|
-
import {
|
|
5
|
+
import { User } from 'oidc-client';
|
|
7
6
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
8
7
|
|
|
9
8
|
export declare const DARK_THEME = "Dark";
|
|
@@ -28,29 +27,5 @@ export type TopBarProps = Omit<GridLogoProps, 'onClick'> & Omit<LogoutProps, 'di
|
|
|
28
27
|
onLanguageClick: (value: GsLang) => void;
|
|
29
28
|
language: GsLang;
|
|
30
29
|
};
|
|
31
|
-
declare
|
|
32
|
-
({ appName, appColor, appLogo, appVersion, appLicense, logoAboutDialog, onParametersClick, onLogoutClick, onLogoClick, user, children, appsAndUrls, onAboutClick, globalVersionPromise, additionalModulesPromise, onThemeClick, theme, onEquipmentLabellingClick, equipmentLabelling, onLanguageClick, language, }: PropsWithChildren<TopBarProps>): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
propTypes: {
|
|
34
|
-
onParametersClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
35
|
-
onLogoutClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
36
|
-
onLogoClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
|
-
appName: PropTypes.Requireable<string>;
|
|
38
|
-
appColor: PropTypes.Requireable<string>;
|
|
39
|
-
appLogo: PropTypes.Requireable<object>;
|
|
40
|
-
appVersion: PropTypes.Requireable<string>;
|
|
41
|
-
appLicense: PropTypes.Requireable<string>;
|
|
42
|
-
user: PropTypes.Requireable<object>;
|
|
43
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
44
|
-
appsAndUrls: PropTypes.Requireable<any[]>;
|
|
45
|
-
onThemeClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
46
|
-
theme: PropTypes.Requireable<string>;
|
|
47
|
-
onAboutClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
48
|
-
globalVersionPromise: PropTypes.Requireable<(...args: any[]) => any>;
|
|
49
|
-
additionalModulesPromise: PropTypes.Requireable<(...args: any[]) => any>;
|
|
50
|
-
onEquipmentLabellingClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
|
-
equipmentLabelling: PropTypes.Requireable<boolean>;
|
|
52
|
-
onLanguageClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
53
|
-
language: PropTypes.Validator<string>;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
30
|
+
declare function TopBar({ appName, appColor, appLogo, appVersion, appLicense, logoAboutDialog, onParametersClick, onLogoutClick, onLogoClick, user, children, appsAndUrls, onAboutClick, globalVersionPromise, additionalModulesPromise, onThemeClick, theme, onEquipmentLabellingClick, equipmentLabelling, onLanguageClick, language, }: PropsWithChildren<TopBarProps>): import("react/jsx-runtime").JSX.Element;
|
|
56
31
|
export default TopBar;
|
|
@@ -4,7 +4,6 @@ import { FormattedMessage } from "react-intl";
|
|
|
4
4
|
import { Menu, MenuItem, ListItemIcon, AppBar, Toolbar, Box, IconButton, ListItemText, Button, Popper, Paper, ClickAwayListener, MenuList, Typography, ToggleButtonGroup, ToggleButton, darken } from "@mui/material";
|
|
5
5
|
import { Apps, ArrowDropUp, ArrowDropDown, Person, WbSunny, Brightness3, Computer, Settings, HelpOutline, ExitToApp } from "@mui/icons-material";
|
|
6
6
|
import { styled } from "@mui/system";
|
|
7
|
-
import PropTypes from "prop-types";
|
|
8
7
|
import GridLogo from "./GridLogo.js";
|
|
9
8
|
import AboutDialog from "./AboutDialog.js";
|
|
10
9
|
const styles = {
|
|
@@ -107,7 +106,7 @@ const LANG_ENGLISH = "en";
|
|
|
107
106
|
const LANG_FRENCH = "fr";
|
|
108
107
|
const EN = "EN";
|
|
109
108
|
const FR = "FR";
|
|
110
|
-
|
|
109
|
+
function TopBar({
|
|
111
110
|
appName,
|
|
112
111
|
appColor,
|
|
113
112
|
appLogo,
|
|
@@ -129,7 +128,7 @@ const TopBar = ({
|
|
|
129
128
|
equipmentLabelling,
|
|
130
129
|
onLanguageClick,
|
|
131
130
|
language
|
|
132
|
-
})
|
|
131
|
+
}) {
|
|
133
132
|
const [anchorElSettingsMenu, setAnchorElSettingsMenu] = useState(null);
|
|
134
133
|
const [anchorElAppsMenu, setAnchorElAppsMenu] = useState(
|
|
135
134
|
null
|
|
@@ -156,9 +155,8 @@ const TopBar = ({
|
|
|
156
155
|
const tab = name.split(" ").map((x) => x.charAt(0));
|
|
157
156
|
if (tab.length === 1) {
|
|
158
157
|
return tab[0];
|
|
159
|
-
} else {
|
|
160
|
-
return tab[0] + tab[tab.length - 1];
|
|
161
158
|
}
|
|
159
|
+
return tab[0] + tab[tab.length - 1];
|
|
162
160
|
};
|
|
163
161
|
const changeTheme = (_, value) => {
|
|
164
162
|
if (onThemeClick && value !== null) {
|
|
@@ -184,7 +182,7 @@ const TopBar = ({
|
|
|
184
182
|
setAboutDialogOpen(true);
|
|
185
183
|
}
|
|
186
184
|
};
|
|
187
|
-
const
|
|
185
|
+
const logoClickable = useMemo(
|
|
188
186
|
() => /* @__PURE__ */ jsx(
|
|
189
187
|
GridLogo,
|
|
190
188
|
{
|
|
@@ -197,9 +195,9 @@ const TopBar = ({
|
|
|
197
195
|
[onLogoClick, appLogo, appName, appColor]
|
|
198
196
|
);
|
|
199
197
|
return (
|
|
200
|
-
|
|
198
|
+
// @ts-ignore appBar style is not defined
|
|
201
199
|
/* @__PURE__ */ jsx(AppBar, { position: "static", color: "default", sx: styles.appBar, children: /* @__PURE__ */ jsxs(Toolbar, { children: [
|
|
202
|
-
|
|
200
|
+
logoClickable,
|
|
203
201
|
/* @__PURE__ */ jsx(Box, { sx: styles.grow, children }),
|
|
204
202
|
user && /* @__PURE__ */ jsxs(Box, { children: [
|
|
205
203
|
/* @__PURE__ */ jsx(
|
|
@@ -274,10 +272,10 @@ const TopBar = ({
|
|
|
274
272
|
sx: styles.showHideMenu,
|
|
275
273
|
onClick: handleToggleSettingsMenu,
|
|
276
274
|
color: "inherit",
|
|
277
|
-
style:
|
|
275
|
+
style: anchorElSettingsMenu ? { cursor: "initial" } : { cursor: "pointer" },
|
|
278
276
|
children: [
|
|
279
277
|
/* @__PURE__ */ jsx(Box, { component: "span", sx: styles.name, children: user !== null ? abbreviationFromUserName(
|
|
280
|
-
|
|
278
|
+
// @ts-ignore name could be undefined, how to handle this case ?
|
|
281
279
|
user.profile.name
|
|
282
280
|
) : "" }),
|
|
283
281
|
anchorElSettingsMenu ? /* @__PURE__ */ jsx(ArrowDropUp, { sx: styles.arrowIcon }) : /* @__PURE__ */ jsx(ArrowDropDown, { sx: styles.arrowIcon })
|
|
@@ -599,29 +597,7 @@ const TopBar = ({
|
|
|
599
597
|
)
|
|
600
598
|
] }) })
|
|
601
599
|
);
|
|
602
|
-
}
|
|
603
|
-
TopBar.propTypes = {
|
|
604
|
-
onParametersClick: PropTypes.func,
|
|
605
|
-
onLogoutClick: PropTypes.func,
|
|
606
|
-
onLogoClick: PropTypes.func,
|
|
607
|
-
appName: PropTypes.string,
|
|
608
|
-
appColor: PropTypes.string,
|
|
609
|
-
appLogo: PropTypes.object,
|
|
610
|
-
appVersion: PropTypes.string,
|
|
611
|
-
appLicense: PropTypes.string,
|
|
612
|
-
user: PropTypes.object,
|
|
613
|
-
children: PropTypes.node,
|
|
614
|
-
appsAndUrls: PropTypes.array,
|
|
615
|
-
onThemeClick: PropTypes.func,
|
|
616
|
-
theme: PropTypes.string,
|
|
617
|
-
onAboutClick: PropTypes.func,
|
|
618
|
-
globalVersionPromise: PropTypes.func,
|
|
619
|
-
additionalModulesPromise: PropTypes.func,
|
|
620
|
-
onEquipmentLabellingClick: PropTypes.func,
|
|
621
|
-
equipmentLabelling: PropTypes.bool,
|
|
622
|
-
onLanguageClick: PropTypes.func.isRequired,
|
|
623
|
-
language: PropTypes.string.isRequired
|
|
624
|
-
};
|
|
600
|
+
}
|
|
625
601
|
export {
|
|
626
602
|
DARK_THEME,
|
|
627
603
|
LANG_ENGLISH,
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
|
-
export { default } from './TopBar';
|
|
7
|
+
export { default as TopBar } from './TopBar';
|
|
8
8
|
export * from './GridLogo';
|
|
9
9
|
export { default as AboutDialog } from './AboutDialog';
|