@gridsuite/commons-ui 0.57.0 → 0.59.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/_mocks_/svg.d.ts +4 -0
- package/dist/_mocks_/svg.js +8 -0
- package/dist/chunks/{criteria-based-filter-edition-dialog.BEXoNmzz.js → criteria-based-filter-edition-dialog.p2pUWzxc.js} +142 -158
- package/dist/chunks/{filter-properties.GRon8-ML.js → filter-properties.B7-q_yPf.js} +4 -4
- 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/DirectoryItemSelector/directory-item-selector.d.ts +0 -4
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +14 -26
- package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +18 -15
- package/dist/components/ElementSearchDialog/element-search-dialog.js +28 -65
- package/dist/components/ElementSearchDialog/equipment-item.d.ts +25 -16
- package/dist/components/ElementSearchDialog/equipment-item.js +9 -8
- 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 +39 -26
- 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/TreeViewFinder/TreeViewFinder.js +1 -1
- package/dist/components/TreeViewFinder/index.d.ts +7 -0
- package/dist/components/dialogs/custom-mui-dialog.d.ts +2 -1
- package/dist/components/dialogs/custom-mui-dialog.js +6 -4
- package/dist/components/dialogs/description-modification-dialog.js +2 -2
- package/dist/components/dialogs/modify-element-selection.d.ts +14 -0
- package/dist/components/dialogs/modify-element-selection.js +99 -0
- package/dist/components/dialogs/popup-confirmation-dialog.js +1 -1
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.d.ts +2 -3
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +4 -4
- package/dist/components/filter/criteria-based/criteria-based-filter-form.js +5 -3
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.d.ts +12 -6
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +44 -4
- package/dist/components/filter/criteria-based/criteria-based-form.d.ts +2 -0
- package/dist/components/filter/criteria-based/criteria-based-form.js +6 -6
- package/dist/components/filter/criteria-based/filter-free-properties.d.ts +1 -1
- package/dist/components/filter/criteria-based/filter-free-properties.js +5 -5
- package/dist/components/filter/criteria-based/filter-properties.js +3 -3
- package/dist/components/filter/criteria-based/filter-property.d.ts +1 -1
- package/dist/components/filter/criteria-based/filter-property.js +3 -3
- package/dist/components/filter/{constants → expert}/expert-filter-constants.d.ts +22 -1
- package/dist/components/filter/{constants → expert}/expert-filter-constants.js +46 -16
- package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +1 -7
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +5 -7
- package/dist/components/filter/expert/expert-filter-form.js +5 -5
- package/dist/components/filter/expert/expert-filter-utils.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.d.ts +0 -2
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +4 -4
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +10 -2
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +12 -8
- package/dist/components/filter/filter-creation-dialog.d.ts +4 -8
- package/dist/components/filter/filter-creation-dialog.js +3 -4
- package/dist/components/filter/filter-form.d.ts +4 -0
- package/dist/components/filter/filter-form.js +6 -5
- package/dist/components/filter/utils/filter-api.d.ts +5 -0
- package/dist/components/filter/utils/{filters-utils.js → filter-api.js} +16 -10
- package/dist/components/filter/utils/filter-form-utils.d.ts +17 -0
- package/dist/components/filter/utils/{criteria-based-utils.js → filter-form-utils.js} +16 -63
- package/dist/components/{react-hook-form/ag-grid-table-rhf → 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 +61 -0
- package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/custom-ag-grid-table.js +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form/autocomplete-inputs}/autocomplete-input.d.ts +3 -3
- package/dist/components/{react-hook-form → inputs/react-hook-form/autocomplete-inputs}/autocomplete-input.js +4 -4
- package/dist/components/{react-hook-form → inputs/react-hook-form}/autocomplete-inputs/multiple-autocomplete-input.js +1 -1
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.d.ts +10 -0
- package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/boolean-input.js +0 -7
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.d.ts +9 -0
- package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/checkbox-input.js +0 -6
- package/dist/components/inputs/react-hook-form/booleans/switch-input.d.ts +9 -0
- package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/switch-input.js +0 -6
- package/dist/components/{react-hook-form → inputs/react-hook-form}/directory-items-input.d.ts +0 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/directory-items-input.js +11 -15
- package/dist/components/inputs/react-hook-form/error-management/mid-form-error.d.ts +6 -0
- package/dist/components/inputs/react-hook-form/numbers/integer-input.d.ts +4 -0
- package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/integer-input.js +1 -4
- package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/custom-form-provider.js +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/range-input.d.ts +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/range-input.js +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/countries-input.d.ts +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/countries-input.js +14 -4
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/input-with-popup-confirmation.js +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/select-input.d.ts +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/select-input.js +4 -1
- package/dist/components/inputs/react-hook-form/slider-input.d.ts +8 -0
- package/dist/components/{react-hook-form → inputs/react-hook-form}/slider-input.js +4 -12
- package/dist/components/{react-hook-form → inputs/react-hook-form}/text-input.d.ts +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/unique-name-input.d.ts +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/unique-name-input.js +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/text-field-with-adornment.d.ts +1 -1
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/combinator-selector.js +1 -1
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/country-value-editor.js +1 -1
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/custom-react-query-builder.js +3 -3
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/element-value-editor.js +21 -28
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/property-value-editor.js +3 -3
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/remove-button.js +2 -2
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-convert-value.js +1 -1
- package/dist/components/inputs/react-query-builder/value-editor.js +18 -0
- package/dist/components/inputs/select-clearable.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/hooks/useDebounce.d.ts +1 -1
- package/dist/hooks/useSnackMessage.d.ts +4 -7
- package/dist/hooks/useSnackMessage.js +36 -43
- package/dist/index.d.ts +76 -218
- package/dist/index.js +156 -122
- package/dist/redux/actions.d.ts +54 -0
- package/dist/redux/commonStore.d.ts +15 -0
- package/dist/redux/commonStore.js +11 -0
- 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 +6 -0
- package/dist/services/explore.js +62 -0
- package/dist/services/index.d.ts +16 -0
- package/dist/services/index.js +20 -0
- package/dist/services/study.d.ts +3 -0
- package/dist/services/study.js +16 -0
- package/dist/services/utils.d.ts +9 -0
- package/dist/services/utils.js +62 -0
- package/dist/utils/AuthService.d.ts +20 -9
- package/dist/utils/AuthService.js +30 -14
- package/dist/utils/ElementIcon.d.ts +4 -1
- 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 +9 -7
- package/dist/components/filter/filter-context.d.ts +0 -12
- package/dist/components/filter/filter-context.js +0 -10
- package/dist/components/filter/utils/criteria-based-utils.d.ts +0 -28
- package/dist/components/filter/utils/filters-utils.d.ts +0 -5
- package/dist/components/react-hook-form/ag-grid-table-rhf/csv-uploader/csv-uploader.js +0 -69
- package/dist/components/react-hook-form/booleans/boolean-input.d.ts +0 -16
- package/dist/components/react-hook-form/booleans/checkbox-input.d.ts +0 -14
- package/dist/components/react-hook-form/booleans/switch-input.d.ts +0 -14
- package/dist/components/react-hook-form/error-management/mid-form-error.d.ts +0 -4
- package/dist/components/react-hook-form/numbers/integer-input.d.ts +0 -21
- package/dist/components/react-hook-form/slider-input.d.ts +0 -21
- package/dist/components/react-query-builder-inputs/value-editor.js +0 -18
- package/dist/utils/actions.d.ts +0 -50
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/ExpandingTextField.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/ExpandingTextField.js +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/bottom-right-buttons.d.ts +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/cell-editors/numericEditor.d.ts +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/cell-editors/numericEditor.js +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/csv-uploader/csv-uploader.d.ts +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/custom-ag-grid-table.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/autocomplete-inputs/multiple-autocomplete-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/error-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/error-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/field-error-alert.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/field-error-alert.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/mid-form-error.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/float-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/float-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/utils.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/utils.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/custom-form-provider.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/use-custom-form-context.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/use-custom-form-context.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/radio-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/radio-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/raw-read-only-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/raw-read-only-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/input-with-popup-confirmation.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/mui-select-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/mui-select-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/text-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/cancel-button.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/cancel-button.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/field-label.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/field-label.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/functions.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/functions.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/submit-button.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/submit-button.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/text-field-with-adornment.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/add-button.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/add-button.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/combinator-selector.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/country-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/custom-react-query-builder.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/element-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/property-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/remove-button.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/text-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/text-value-editor.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/translated-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/translated-value-editor.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-convert-value.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-valid.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-valid.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/value-selector.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/value-selector.js +0 -0
- /package/dist/{utils → redux}/actions.js +0 -0
- /package/dist/{components/filter/constants → utils}/equipment-types.d.ts +0 -0
- /package/dist/{components/filter/constants → utils}/equipment-types.js +0 -0
- /package/dist/{components/filter/constants → utils}/field-constants.d.ts +0 -0
- /package/dist/{components/filter/constants → utils}/field-constants.js +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { backendFetch, getRequestParamFromList, backendFetchJson } from "./utils.js";
|
|
2
|
+
const PREFIX_EXPLORE_SERVER_QUERIES = "api/gateway/explore";
|
|
3
|
+
function createFilter(newFilter, name, description, parentDirectoryUuid, token) {
|
|
4
|
+
let urlSearchParams = new URLSearchParams();
|
|
5
|
+
urlSearchParams.append("name", name);
|
|
6
|
+
urlSearchParams.append("description", description);
|
|
7
|
+
parentDirectoryUuid && urlSearchParams.append("parentDirectoryUuid", parentDirectoryUuid);
|
|
8
|
+
return backendFetch(
|
|
9
|
+
PREFIX_EXPLORE_SERVER_QUERIES + "/v1/explore/filters?" + urlSearchParams.toString(),
|
|
10
|
+
{
|
|
11
|
+
method: "post",
|
|
12
|
+
headers: { "Content-Type": "application/json" },
|
|
13
|
+
body: JSON.stringify(newFilter)
|
|
14
|
+
},
|
|
15
|
+
token
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
function saveFilter(filter, name, token) {
|
|
19
|
+
let urlSearchParams = new URLSearchParams();
|
|
20
|
+
urlSearchParams.append("name", name);
|
|
21
|
+
return backendFetch(
|
|
22
|
+
PREFIX_EXPLORE_SERVER_QUERIES + "/v1/explore/filters/" + filter.id + "?" + urlSearchParams.toString(),
|
|
23
|
+
{
|
|
24
|
+
method: "put",
|
|
25
|
+
headers: { "Content-Type": "application/json" },
|
|
26
|
+
body: JSON.stringify(filter)
|
|
27
|
+
},
|
|
28
|
+
token
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function fetchElementsInfos(ids, elementTypes, equipmentTypes) {
|
|
32
|
+
console.info("Fetching elements metadata");
|
|
33
|
+
const idsParams = getRequestParamFromList(
|
|
34
|
+
ids.filter((id) => id),
|
|
35
|
+
// filter falsy elements
|
|
36
|
+
"ids"
|
|
37
|
+
);
|
|
38
|
+
const equipmentTypesParams = getRequestParamFromList(
|
|
39
|
+
equipmentTypes,
|
|
40
|
+
"equipmentTypes"
|
|
41
|
+
);
|
|
42
|
+
const elementTypesParams = getRequestParamFromList(
|
|
43
|
+
elementTypes,
|
|
44
|
+
"elementTypes"
|
|
45
|
+
);
|
|
46
|
+
const urlSearchParams = new URLSearchParams([
|
|
47
|
+
...idsParams,
|
|
48
|
+
...equipmentTypesParams,
|
|
49
|
+
...elementTypesParams
|
|
50
|
+
]).toString();
|
|
51
|
+
const url = `${PREFIX_EXPLORE_SERVER_QUERIES}/v1/explore/elements/metadata?${urlSearchParams}`;
|
|
52
|
+
console.debug(url);
|
|
53
|
+
return backendFetchJson(url, {
|
|
54
|
+
method: "get",
|
|
55
|
+
headers: { "Content-Type": "application/json" }
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
createFilter,
|
|
60
|
+
fetchElementsInfos,
|
|
61
|
+
saveFilter
|
|
62
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
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 * from './utils';
|
|
8
|
+
export type * from './utils';
|
|
9
|
+
export * from './explore';
|
|
10
|
+
export type * from './explore';
|
|
11
|
+
export * from './apps-metadata';
|
|
12
|
+
export type * from './apps-metadata';
|
|
13
|
+
export * from './directory';
|
|
14
|
+
export type * from './directory';
|
|
15
|
+
export * from './study';
|
|
16
|
+
export type * from './study';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { backendFetch, backendFetchJson, getRequestParamFromList } from "./utils.js";
|
|
2
|
+
import { createFilter, fetchElementsInfos, saveFilter } from "./explore.js";
|
|
3
|
+
import { fetchAppsMetadata, fetchEnv, fetchStudyMetadata } from "./apps-metadata.js";
|
|
4
|
+
import { fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders } from "./directory.js";
|
|
5
|
+
import { exportFilter } from "./study.js";
|
|
6
|
+
export {
|
|
7
|
+
backendFetch,
|
|
8
|
+
backendFetchJson,
|
|
9
|
+
createFilter,
|
|
10
|
+
exportFilter,
|
|
11
|
+
fetchAppsMetadata,
|
|
12
|
+
fetchDirectoryContent,
|
|
13
|
+
fetchDirectoryElementPath,
|
|
14
|
+
fetchElementsInfos,
|
|
15
|
+
fetchEnv,
|
|
16
|
+
fetchRootFolders,
|
|
17
|
+
fetchStudyMetadata,
|
|
18
|
+
getRequestParamFromList,
|
|
19
|
+
saveFilter
|
|
20
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { backendFetchJson } from "./utils.js";
|
|
2
|
+
const PREFIX_STUDY_QUERIES = "api/gateway/study";
|
|
3
|
+
function exportFilter(studyUuid, filterUuid, token) {
|
|
4
|
+
console.info("get filter export on study root node");
|
|
5
|
+
return backendFetchJson(
|
|
6
|
+
PREFIX_STUDY_QUERIES + "/v1/studies/" + studyUuid + "/filters/" + filterUuid + "/elements",
|
|
7
|
+
{
|
|
8
|
+
method: "get",
|
|
9
|
+
headers: { "Content-Type": "application/json" }
|
|
10
|
+
},
|
|
11
|
+
token
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
exportFilter
|
|
16
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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 declare const backendFetch: (url: string, init: any, token?: string) => Promise<any>;
|
|
8
|
+
export declare const backendFetchJson: (url: string, init: any, token?: string) => Promise<any>;
|
|
9
|
+
export declare const getRequestParamFromList: (params: string[] | undefined, paramName: string) => URLSearchParams;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { getUserToken } from "../redux/commonStore.js";
|
|
2
|
+
const backendFetch = (url, init, token) => {
|
|
3
|
+
const initCopy = prepareRequest(init, token);
|
|
4
|
+
return safeFetch(url, initCopy);
|
|
5
|
+
};
|
|
6
|
+
const backendFetchJson = (url, init, token) => {
|
|
7
|
+
const initCopy = prepareRequest(init, token);
|
|
8
|
+
return safeFetch(url, initCopy).then(
|
|
9
|
+
(safeResponse) => safeResponse.status === 204 ? null : safeResponse.json()
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
const prepareRequest = (init, token) => {
|
|
13
|
+
if (!(typeof init === "undefined" || typeof init === "object")) {
|
|
14
|
+
throw new TypeError(
|
|
15
|
+
"First argument of prepareRequest is not an object : " + typeof init
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
const initCopy = Object.assign({}, init);
|
|
19
|
+
initCopy.headers = new Headers(initCopy.headers || {});
|
|
20
|
+
const tokenCopy = token ?? getUserToken();
|
|
21
|
+
initCopy.headers.append("Authorization", "Bearer " + tokenCopy);
|
|
22
|
+
return initCopy;
|
|
23
|
+
};
|
|
24
|
+
const safeFetch = (url, initCopy) => {
|
|
25
|
+
return fetch(url, initCopy).then(
|
|
26
|
+
(response) => response.ok ? response : handleError(response)
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
const handleError = (response) => {
|
|
30
|
+
return response.text().then((text) => {
|
|
31
|
+
const errorName = "HttpResponseError : ";
|
|
32
|
+
const errorJson = parseError(text);
|
|
33
|
+
let customError;
|
|
34
|
+
if (errorJson && errorJson.status && errorJson.error && errorJson.message) {
|
|
35
|
+
customError = new Error(
|
|
36
|
+
errorName + errorJson.status + " " + errorJson.error + ", message : " + errorJson.message
|
|
37
|
+
);
|
|
38
|
+
customError.status = errorJson.status;
|
|
39
|
+
} else {
|
|
40
|
+
customError = new Error(
|
|
41
|
+
errorName + response.status + " " + response.statusText + ", message : " + text
|
|
42
|
+
);
|
|
43
|
+
customError.status = response.status;
|
|
44
|
+
}
|
|
45
|
+
throw customError;
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const parseError = (text) => {
|
|
49
|
+
try {
|
|
50
|
+
return JSON.parse(text);
|
|
51
|
+
} catch (err) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const getRequestParamFromList = (params = [], paramName) => {
|
|
56
|
+
return new URLSearchParams(params.map((param) => [paramName, param]));
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
backendFetch,
|
|
60
|
+
backendFetchJson,
|
|
61
|
+
getRequestParamFromList
|
|
62
|
+
};
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { NavigateFunction } from 'react-router-dom';
|
|
2
|
+
import { Dispatch } from 'react';
|
|
3
|
+
import { User, UserManager } from 'oidc-client';
|
|
4
|
+
|
|
5
|
+
type UserValidationFunc = (user: User) => Promise<boolean>;
|
|
6
|
+
type CustomUserManager = UserManager & {
|
|
7
|
+
authorizationCodeFlowEnabled?: boolean;
|
|
8
|
+
idpSettings?: {
|
|
9
|
+
maxExpiresIn?: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
declare function initializeAuthenticationDev(dispatch: Dispatch<unknown>, isSilentRenew: boolean, validateUser: UserValidationFunc, isSigninCallback: boolean): Promise<UserManager>;
|
|
13
|
+
declare function initializeAuthenticationProd(dispatch: Dispatch<unknown>, isSilentRenew: boolean, idpSettings: Promise<Response>, validateUser: UserValidationFunc, authorizationCodeFlowEnabled: boolean, isSigninCallback: boolean): Promise<CustomUserManager>;
|
|
14
|
+
declare function login(location: Location, userManagerInstance: UserManager): Promise<void>;
|
|
15
|
+
declare function logout(dispatch: Dispatch<unknown>, userManagerInstance: UserManager): Promise<void | undefined>;
|
|
16
|
+
declare function dispatchUser(dispatch: Dispatch<unknown>, userManagerInstance: CustomUserManager, validateUser: UserValidationFunc): Promise<void | undefined>;
|
|
17
|
+
declare function getPreLoginPath(): string | null;
|
|
18
|
+
declare function handleSigninCallback(dispatch: Dispatch<unknown>, navigate: NavigateFunction, userManagerInstance: UserManager): void;
|
|
19
|
+
declare function handleSilentRenewCallback(userManagerInstance: UserManager): void;
|
|
20
|
+
export { initializeAuthenticationDev, initializeAuthenticationProd, handleSilentRenewCallback, login, logout, dispatchUser, handleSigninCallback, getPreLoginPath, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Log, UserManager } from "oidc-client";
|
|
2
2
|
import { UserManagerMock } from "./UserManagerMock.js";
|
|
3
|
-
import { setShowAuthenticationRouterLogin, setLoggedUser, setLogoutError, setUnauthorizedUserInfo, setUserValidationError, setSignInCallbackError, resetAuthenticationRouterError } from "
|
|
3
|
+
import { setShowAuthenticationRouterLogin, setLoggedUser, setLogoutError, setUnauthorizedUserInfo, setUserValidationError, setSignInCallbackError, resetAuthenticationRouterError } from "../redux/actions.js";
|
|
4
4
|
import { jwtDecode } from "jwt-decode";
|
|
5
5
|
window.OIDCLog = Log;
|
|
6
6
|
const hackAuthorityKey = "oidc.hack.authority";
|
|
@@ -11,11 +11,13 @@ function isIssuerErrorForCodeFlow(error) {
|
|
|
11
11
|
}
|
|
12
12
|
function extractIssuerToSessionStorage(error) {
|
|
13
13
|
const issuer = error.message.split(" ").pop();
|
|
14
|
-
|
|
14
|
+
if (issuer !== void 0) {
|
|
15
|
+
sessionStorage.setItem(hackAuthorityKey, issuer);
|
|
16
|
+
}
|
|
15
17
|
}
|
|
16
18
|
function reload() {
|
|
17
19
|
if (!sessionStorage.getItem(oidcHackReloadedKey)) {
|
|
18
|
-
sessionStorage.setItem(oidcHackReloadedKey, true);
|
|
20
|
+
sessionStorage.setItem(oidcHackReloadedKey, true.toString());
|
|
19
21
|
console.log("Hack oidc, reload page to make login work");
|
|
20
22
|
window.location.reload();
|
|
21
23
|
}
|
|
@@ -44,7 +46,9 @@ function handleSigninSilent(dispatch, userManager) {
|
|
|
44
46
|
});
|
|
45
47
|
}
|
|
46
48
|
function initializeAuthenticationDev(dispatch, isSilentRenew, validateUser, isSigninCallback) {
|
|
47
|
-
let userManager = new UserManagerMock(
|
|
49
|
+
let userManager = new UserManagerMock(
|
|
50
|
+
{}
|
|
51
|
+
);
|
|
48
52
|
if (!isSilentRenew) {
|
|
49
53
|
handleUser(dispatch, userManager, validateUser);
|
|
50
54
|
if (!isSigninCallback) {
|
|
@@ -82,7 +86,9 @@ function initializeAuthenticationProd(dispatch, isSilentRenew, idpSettings, vali
|
|
|
82
86
|
"oidc." + state,
|
|
83
87
|
JSON.stringify(storedState)
|
|
84
88
|
);
|
|
85
|
-
|
|
89
|
+
if (authority !== void 0) {
|
|
90
|
+
sessionStorage.setItem(hackAuthorityKey, authority);
|
|
91
|
+
}
|
|
86
92
|
const matched_expires = window.location.hash.match(regexexpires);
|
|
87
93
|
if (matched_expires != null) {
|
|
88
94
|
const expires_in = parseInt(
|
|
@@ -133,8 +139,11 @@ function initializeAuthenticationProd(dispatch, isSilentRenew, idpSettings, vali
|
|
|
133
139
|
});
|
|
134
140
|
}
|
|
135
141
|
function computeMinExpiresIn(expiresIn, idToken, maxExpiresIn) {
|
|
136
|
-
const now =
|
|
142
|
+
const now = Date.now() / 1e3;
|
|
137
143
|
const exp = jwtDecode(idToken).exp;
|
|
144
|
+
if (exp === void 0) {
|
|
145
|
+
return expiresIn;
|
|
146
|
+
}
|
|
138
147
|
const idTokenExpiresIn = exp - now;
|
|
139
148
|
let newExpiresIn = expiresIn;
|
|
140
149
|
let newExpiresInReplaceReason;
|
|
@@ -182,8 +191,11 @@ function logout(dispatch, userManagerInstance) {
|
|
|
182
191
|
});
|
|
183
192
|
}
|
|
184
193
|
function getIdTokenExpiresIn(user) {
|
|
185
|
-
const now =
|
|
194
|
+
const now = Date.now() / 1e3;
|
|
186
195
|
const exp = jwtDecode(user.id_token).exp;
|
|
196
|
+
if (exp === void 0) {
|
|
197
|
+
return 0;
|
|
198
|
+
}
|
|
187
199
|
return exp - now;
|
|
188
200
|
}
|
|
189
201
|
function dispatchUser(dispatch, userManagerInstance, validateUser) {
|
|
@@ -197,13 +209,13 @@ function dispatchUser(dispatch, userManagerInstance, validateUser) {
|
|
|
197
209
|
}
|
|
198
210
|
let validateUserPromise = validateUser && validateUser(user) || Promise.resolve(true);
|
|
199
211
|
return validateUserPromise.then((valid) => {
|
|
200
|
-
var _a;
|
|
212
|
+
var _a, _b;
|
|
201
213
|
if (!valid) {
|
|
202
214
|
console.debug(
|
|
203
215
|
"User isn't authorized to log in and will not be dispatched"
|
|
204
216
|
);
|
|
205
217
|
return dispatch(
|
|
206
|
-
setUnauthorizedUserInfo((_a = user == null ? void 0 : user.profile) == null ? void 0 : _a.name,
|
|
218
|
+
setUnauthorizedUserInfo((_a = user == null ? void 0 : user.profile) == null ? void 0 : _a.name, "")
|
|
207
219
|
);
|
|
208
220
|
}
|
|
209
221
|
console.debug(
|
|
@@ -216,7 +228,7 @@ function dispatchUser(dispatch, userManagerInstance, validateUser) {
|
|
|
216
228
|
computeMinExpiresIn(
|
|
217
229
|
user.expires_in,
|
|
218
230
|
user.id_token,
|
|
219
|
-
userManagerInstance.idpSettings.maxExpiresIn
|
|
231
|
+
(_b = userManagerInstance.idpSettings) == null ? void 0 : _b.maxExpiresIn
|
|
220
232
|
)
|
|
221
233
|
);
|
|
222
234
|
}
|
|
@@ -240,7 +252,9 @@ function getPreLoginPath() {
|
|
|
240
252
|
}
|
|
241
253
|
function navigateToPreLoginPath(navigate) {
|
|
242
254
|
const previousPath = getPreLoginPath();
|
|
243
|
-
|
|
255
|
+
if (previousPath !== null) {
|
|
256
|
+
navigate(previousPath);
|
|
257
|
+
}
|
|
244
258
|
}
|
|
245
259
|
function handleSigninCallback(dispatch, navigate, userManagerInstance) {
|
|
246
260
|
let reloadAfterNavigate = false;
|
|
@@ -274,10 +288,12 @@ function handleUser(dispatch, userManager, validateUser) {
|
|
|
274
288
|
console.debug(error);
|
|
275
289
|
window.setTimeout(() => {
|
|
276
290
|
userManager.getUser().then((user) => {
|
|
291
|
+
var _a, _b;
|
|
277
292
|
if (!user) {
|
|
278
293
|
console.error(
|
|
279
294
|
"user is null at silent renew error, it shouldn't happen."
|
|
280
295
|
);
|
|
296
|
+
return;
|
|
281
297
|
}
|
|
282
298
|
const idTokenExpiresIn = getIdTokenExpiresIn(user);
|
|
283
299
|
if (idTokenExpiresIn < 0) {
|
|
@@ -288,12 +304,12 @@ function handleUser(dispatch, userManager, validateUser) {
|
|
|
288
304
|
dispatch(setShowAuthenticationRouterLogin(true));
|
|
289
305
|
dispatch(resetAuthenticationRouterError());
|
|
290
306
|
return dispatch(setLoggedUser(null));
|
|
291
|
-
} else if (userManager.idpSettings.maxExpiresIn) {
|
|
307
|
+
} else if ((_a = userManager.idpSettings) == null ? void 0 : _a.maxExpiresIn) {
|
|
292
308
|
if (idTokenExpiresIn < userManager.idpSettings.maxExpiresIn) {
|
|
293
309
|
console.log(
|
|
294
310
|
"Error in silent renew, but idtoken ALMOST expiring (expiring in" + idTokenExpiresIn + ") => last chance, next error will logout",
|
|
295
311
|
"maxExpiresIn = " + userManager.idpSettings.maxExpiresIn,
|
|
296
|
-
"last renew attempt in " + idTokenExpiresIn - accessTokenExpiringNotificationTime + "seconds",
|
|
312
|
+
"last renew attempt in " + (idTokenExpiresIn - accessTokenExpiringNotificationTime) + "seconds",
|
|
297
313
|
error
|
|
298
314
|
);
|
|
299
315
|
reloadTimerOnExpiresIn(
|
|
@@ -314,7 +330,7 @@ function handleUser(dispatch, userManager, validateUser) {
|
|
|
314
330
|
}
|
|
315
331
|
} else {
|
|
316
332
|
console.log(
|
|
317
|
-
"Error in silent renew, unsupported configuration: token still valid for " + idTokenExpiresIn + " but maxExpiresIn is not configured:" + userManager.idpSettings.maxExpiresIn,
|
|
333
|
+
"Error in silent renew, unsupported configuration: token still valid for " + idTokenExpiresIn + " but maxExpiresIn is not configured:" + ((_b = userManager.idpSettings) == null ? void 0 : _b.maxExpiresIn),
|
|
318
334
|
error
|
|
319
335
|
);
|
|
320
336
|
}
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { ElementType } from './ElementType';
|
|
3
|
+
|
|
4
|
+
export declare function getFileIcon(type: ElementType, style: SxProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
*/
|
|
7
|
+
declare class Events {
|
|
8
|
+
userLoadedCallbacks: ((data: any) => void)[];
|
|
9
|
+
addUserLoaded(callback: (data: any) => void): void;
|
|
10
|
+
addSilentRenewError(callback: (data: any) => void): void;
|
|
11
|
+
}
|
|
12
|
+
export declare class UserManagerMock {
|
|
13
|
+
settings: unknown;
|
|
4
14
|
events: Events;
|
|
5
15
|
user: {
|
|
6
16
|
profile: {
|
|
@@ -13,6 +23,7 @@ export class UserManagerMock {
|
|
|
13
23
|
token_type: string;
|
|
14
24
|
scope: string;
|
|
15
25
|
};
|
|
26
|
+
constructor(settings: unknown);
|
|
16
27
|
getUser(): Promise<any>;
|
|
17
28
|
signinSilent(): Promise<any>;
|
|
18
29
|
signinSilentCallback(): Promise<never>;
|
|
@@ -20,15 +31,4 @@ export class UserManagerMock {
|
|
|
20
31
|
signoutRedirect(): Promise<null>;
|
|
21
32
|
signinRedirectCallback(): Promise<string>;
|
|
22
33
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Copyright (c) 2020, RTE (http://www.rte-france.com)
|
|
25
|
-
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
26
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
27
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
28
|
-
*/
|
|
29
|
-
declare class Events {
|
|
30
|
-
userLoadedCallbacks: any[];
|
|
31
|
-
addUserLoaded(callback: any): void;
|
|
32
|
-
addSilentRenewError(callback: any): void;
|
|
33
|
-
}
|
|
34
34
|
export {};
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
1
|
class Events {
|
|
8
2
|
constructor() {
|
|
9
|
-
|
|
3
|
+
this.userLoadedCallbacks = [];
|
|
10
4
|
}
|
|
11
5
|
addUserLoaded(callback) {
|
|
12
6
|
this.userLoadedCallbacks.push(callback);
|
|
@@ -16,28 +10,28 @@ class Events {
|
|
|
16
10
|
}
|
|
17
11
|
class UserManagerMock {
|
|
18
12
|
constructor(settings) {
|
|
19
|
-
|
|
20
|
-
__publicField(this, "events");
|
|
21
|
-
__publicField(this, "user", {
|
|
13
|
+
this.user = {
|
|
22
14
|
profile: { name: "John Doe", email: "Jhon.Doe@rte-france.com" },
|
|
23
15
|
id_token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IllNRUxIVDBndmIwbXhvU0RvWWZvbWpxZmpZVSJ9.eyJhdWQiOiI5YzQwMjQ2MS1iMmFiLTQ3NjctOWRiMy02Njg1OWJiMGZjZDAiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vNzUwMmRhZDUtZDY0Yy00NmM3LTlkNDctYjE2ZjU4MGZjZmE5L3YyLjAiLCJpYXQiOjE1ODUzMzEyNDksIm5iZiI6MTU4NTMzMTI0OSwiZXhwIjoyNTg1MzM1MTQ5LCJhaW8iOiJBV1FBbS84UEFBQUF3Q0xyTDRIUEUvTnVjOU9OdHN0SUV4cVpyMUlqa1FGbXJvUW5EUzJBaksyWnpneUhQTldPdkE3bitveHkvRzgxWElsb1A0TitsQjZINFJteElwakhNYVArTjIyTzVnMUFaR04yc1d6VHA5T3JWMDIvOXhndXJBMjZrdUNXbGg2RSIsImF0X2hhc2giOiJJaWRYdGRHdzVkbjlOZDFQblVvbDh3IiwiaWRwIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvOTE4ODA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkLyIsIm5vbmNlIjoiMjkzZTcxNzhmOWE5NGZlNjg1ZWY3MjdlZTg5MTYxYjEiLCJzdWIiOiJyTnZjWXJMSXJSN25iSDJPQlhoOFkzU05wZEtPc3dfTUNkX3F3NF9vNDRJIiwidGlkIjoiNzUwMmRhZDUtZDY0Yy00NmM3LTlkNDctYjE2ZjU4MGZjZmE5IiwidXRpIjoiUFBYdkw1UWxDMG1oMGp2N3NaNGJBQSIsInZlciI6IjIuMCJ9.dPAh24KTfsqmDaRoBtMLcayAWnDqVtydQ97P1a99dg93JsDu4Jhxju9vlzvjd6Ro5a1RZdrKFKB_pgC2DkQ3wSeYjpdSNyBAlW1_ryq65JkTJVMp33OsM_7SdjaRIiJfPiJ3U9jRBSyj7ofoHCLUjD_Uu-XreKxpMGhFHOQIO72UfXg8TBpsapjkEv9Dyz2UqMa2BQvO5mxKw93LNg5BI6j2a5LhbMEmmRWqfxWGITJ9TWfHjYdFkrXKcmvWZ9D2b4tsw_5NorDxkuzVFhA89M_0ASzOXoj1Yb6LgdkzWXDimssvyyz5Oe4V3gdkAe8Jj7Uwz-9AR-MO2kNkH7ytHA",
|
|
24
16
|
session_state: "session state",
|
|
25
17
|
access_token: "eyJ0eXAiOiJKV1QiLCJub25jZSI6InhKWHlQeXVrU1paQ3BOeEcxZUQway1lVDF0YzZtQ01ZVkZKcnBDOTJxc28iLCJhbGciOiJSUzI1NiIsIng1dCI6IllNRUxIVDBndmIwbXhvU0RvWWZvbWpxZmpZVSIsImtpZCI6IllNRUxIVDBndmIwbXhvU0RvWWZvbWpxZmpZVSJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTAwMDAtYzAwMC0wMDAwMDAwMDAwMDAiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83NTAyZGFkNS1kNjRjLTQ2YzctOWQ0Ny1iMTZmNTgwZmNmYTkvIiwiaWF0IjoxNTg1MzMxMjQ5LCJuYmYiOjE1ODUzMzEyNDksImV4cCI6MTU4NTMzNTE0OSwiYWNjdCI6MCwiYWNyIjoiMSIsImFpbyI6IkFVUUF1LzhQQUFBQXdwc3RYMlVkY2VDQWx4dU9tVHpIY0R3RlhTWUtYanIvZUNTSi9PdTRqbTJyUVBCUml0U1dWMThmNldCVEdNdnQ5ZGx0Ry9lTXB1VXZqaTN2NCtzanh3PT0iLCJhbHRzZWNpZCI6IjE6bGl2ZS5jb206MDAwMzQwMDExOUZEOTIxMiIsImFtciI6WyJwd2QiXSwiYXBwX2Rpc3BsYXluYW1lIjoic3BhIiwiYXBwaWQiOiI5YzQwMjQ2MS1iMmFiLTQ3NjctOWRiMy02Njg1OWJiMGZjZDAiLCJhcHBpZGFjciI6IjAiLCJlbWFpbCI6ImNoYW1zZWRkaW5lLmJlbmhhbWVkQGVuc2ktdW1hLnRuIiwiZmFtaWx5X25hbWUiOiJCRU5IQU1FRCIsImdpdmVuX25hbWUiOiJDaGFtc2VkZGluZSIsImlkcCI6ImxpdmUuY29tIiwiaXBhZGRyIjoiNzcuMjA0LjE0Ni4xNTkiLCJuYW1lIjoiQ2hhbXNlZGRpbmUgQkVOSEFNRUQiLCJvaWQiOiIzNTIzYmQ3OC0yZjIxLTQ3ZjYtODhlOC1hYWIzYjZmMjdmNjAiLCJwbGF0ZiI6IjE0IiwicHVpZCI6IjEwMDMyMDAwOURFMDg1NkEiLCJzY3AiOiJVc2VyLlJlYWQgcHJvZmlsZSBvcGVuaWQgZW1haWwiLCJzdWIiOiJjVEd5LVlfV3FLR2x1cmRUVDdSUVlfY3FjSDJoVHpEdllZTmotQ3hONXA4IiwidGlkIjoiNzUwMmRhZDUtZDY0Yy00NmM3LTlkNDctYjE2ZjU4MGZjZmE5IiwidW5pcXVlX25hbWUiOiJsaXZlLmNvbSNjaGFtc2VkZGluZS5iZW5oYW1lZEBlbnNpLXVtYS50biIsInV0aSI6IlBQWHZMNVFsQzBtaDBqdjdzWjRiQUEiLCJ2ZXIiOiIxLjAiLCJ4bXNfc3QiOnsic3ViIjoick52Y1lyTElyUjduYkgyT0JYaDhZM1NOcGRLT3N3X01DZF9xdzRfbzQ0SSJ9LCJ4bXNfdGNkdCI6MTU4MjgyMDM1Mn0.W_ccOGW_AGdg37KSMi7LWHtvm3Mw5p1dHjgDIrUaXduKF2iLS4dCaPw7yeo4VjAcOyV6C0h6ABLDCtkwVt8BSDTIIU7DaT8k2bRbMCCq69BmeiYPsbp-yX6ywGCx5DHsnOLqI2oHbBQktA2Nmv9Va651Pbm3OpSPuGPdVimkFCcnisiGlUOej1ZMNwyVT6386O2pERPtxmFUt_D1dKLxBXxBNxLVUG5BG3bI7wMpBOHEUA5CbaBzYXmGrLMXVVbrj9OsF-WQ6aNoqsm9cicX6pJB60lFz1dxLeSgcFO7Zh2K3PFe4FnXCqAvNPadQMz_kJEO9_phlDV85c2MPqeXbA",
|
|
26
18
|
token_type: "Bearer",
|
|
27
19
|
scope: "scopes"
|
|
28
|
-
}
|
|
20
|
+
};
|
|
29
21
|
this.settings = settings;
|
|
30
22
|
this.events = new Events();
|
|
31
23
|
}
|
|
32
24
|
getUser() {
|
|
33
25
|
return Promise.resolve(
|
|
34
|
-
JSON.parse(
|
|
26
|
+
JSON.parse(
|
|
27
|
+
sessionStorage.getItem("powsybl-gridsuite-mock-user") ?? "null"
|
|
28
|
+
)
|
|
35
29
|
);
|
|
36
30
|
}
|
|
37
31
|
signinSilent() {
|
|
38
32
|
console.info("signinSilent..............");
|
|
39
33
|
const localStorageUser = JSON.parse(
|
|
40
|
-
localStorage.getItem("powsybl-gridsuite-mock-user")
|
|
34
|
+
localStorage.getItem("powsybl-gridsuite-mock-user") ?? "null"
|
|
41
35
|
);
|
|
42
36
|
if (localStorageUser === null) {
|
|
43
37
|
return Promise.reject(
|
|
@@ -62,13 +56,13 @@ class UserManagerMock {
|
|
|
62
56
|
"powsybl-gridsuite-mock-user",
|
|
63
57
|
JSON.stringify(this.user)
|
|
64
58
|
);
|
|
65
|
-
window.location = "./sign-in-callback";
|
|
59
|
+
window.location.href = "./sign-in-callback";
|
|
66
60
|
return Promise.resolve(null);
|
|
67
61
|
}
|
|
68
62
|
signoutRedirect() {
|
|
69
63
|
sessionStorage.removeItem("powsybl-gridsuite-mock-user");
|
|
70
64
|
localStorage.removeItem("powsybl-gridsuite-mock-user");
|
|
71
|
-
window.location = ".";
|
|
65
|
+
window.location.href = ".";
|
|
72
66
|
return Promise.resolve(null);
|
|
73
67
|
}
|
|
74
68
|
signinRedirectCallback() {
|
package/dist/utils/algos.d.ts
CHANGED
|
@@ -10,5 +10,4 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function keyGenerator(): () => number;
|
|
12
12
|
export declare const areArrayElementsUnique: (array: unknown[]) => boolean;
|
|
13
|
-
export declare const mergeSx: (...allSx: unknown[]) => unknown[];
|
|
14
13
|
export declare const isObjectEmpty: (object: object) => boolean;
|
package/dist/utils/functions.js
CHANGED
|
@@ -6,11 +6,9 @@ const areArrayElementsUnique = (array) => {
|
|
|
6
6
|
let uniqueValues = [...new Set(array)];
|
|
7
7
|
return uniqueValues.length === array.length;
|
|
8
8
|
};
|
|
9
|
-
const mergeSx = (...allSx) => allSx.flat();
|
|
10
9
|
const isObjectEmpty = (object) => object && Object.keys(object).length === 0;
|
|
11
10
|
export {
|
|
12
11
|
areArrayElementsUnique,
|
|
13
12
|
isObjectEmpty,
|
|
14
|
-
keyGenerator
|
|
15
|
-
mergeSx
|
|
13
|
+
keyGenerator
|
|
16
14
|
};
|
package/dist/utils/styles.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export declare const makeComposeClasses: (generateGlobalClass: (className: string) => string) => (classes: Record<string, string>, ruleName: string) => string;
|
|
4
|
+
export declare const toNestedGlobalSelectors: (styles: object, generateGlobalClass: (className: string) => string) => {
|
|
3
5
|
[k: string]: any;
|
|
4
6
|
};
|
|
5
|
-
export
|
|
7
|
+
export declare const mergeSx: (...allSx: (SxProps | undefined)[]) => (boolean | import('@mui/system').SystemStyleObject<{}> | ((theme: {}) => import('@mui/system').SystemStyleObject<{}>) | ((theme: {}) => import('@mui/system').SystemStyleObject<{}>))[];
|
package/dist/utils/styles.js
CHANGED
|
@@ -5,7 +5,10 @@ const toNestedGlobalSelectors = (styles, generateGlobalClass) => Object.fromEntr
|
|
|
5
5
|
v
|
|
6
6
|
])
|
|
7
7
|
);
|
|
8
|
-
const
|
|
8
|
+
const isSxProps = (sx) => {
|
|
9
|
+
return sx !== void 0;
|
|
10
|
+
};
|
|
11
|
+
const mergeSx = (...allSx) => allSx.filter(isSxProps).flat();
|
|
9
12
|
export {
|
|
10
13
|
makeComposeClasses,
|
|
11
14
|
mergeSx,
|
package/dist/utils/types.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, ShuntCompensator, Substation, SVC, ThreeWindingTransfo, TwoWindingTransfo, VoltageLevel, VSC } from '
|
|
2
|
-
import { ElementType } from './ElementType
|
|
1
|
+
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, ShuntCompensator, Substation, SVC, ThreeWindingTransfo, TwoWindingTransfo, VoltageLevel, VSC } from './equipment-types';
|
|
2
|
+
import { ElementType } from './ElementType';
|
|
3
3
|
import { UUID } from 'crypto';
|
|
4
4
|
|
|
5
5
|
export type Input = string | number;
|
|
6
6
|
export type ElementAttributes = {
|
|
7
7
|
elementUuid: UUID;
|
|
8
8
|
elementName: string;
|
|
9
|
-
type:
|
|
9
|
+
type: ElementType;
|
|
10
|
+
accessRights: {
|
|
11
|
+
isPrivate: boolean;
|
|
12
|
+
};
|
|
13
|
+
owner: string;
|
|
14
|
+
subdirectoriesCount: number;
|
|
15
|
+
creationDate: string;
|
|
16
|
+
lastModificationDate: string;
|
|
17
|
+
lastModifiedBy: string;
|
|
18
|
+
children: any[];
|
|
19
|
+
parentUuid: null | UUID;
|
|
10
20
|
};
|
|
11
21
|
export type Equipment = typeof Substation | typeof Line | typeof Generator | typeof Load | typeof Battery | typeof SVC | typeof DanglingLine | typeof LCC | typeof VSC | typeof Hvdc | typeof BusBar | typeof TwoWindingTransfo | typeof ThreeWindingTransfo | typeof ShuntCompensator | typeof VoltageLevel | typeof Substation;
|
|
12
22
|
export type EquipmentType = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridsuite/commons-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "common react components for gridsuite applications",
|
|
5
5
|
"engines": {
|
|
6
6
|
"npm": ">=9",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"start": "vite demo/ --config vite.config.mts",
|
|
20
20
|
"start:open": "vite demo/ --config vite.config.mts --open",
|
|
21
21
|
"build": "tsc && vite build",
|
|
22
|
-
"build:
|
|
22
|
+
"build:pack": "tsc && vite build && npm pack",
|
|
23
23
|
"prepublishOnly": "npm run build",
|
|
24
24
|
"test": "jest",
|
|
25
25
|
"test:coverage": "jest --coverage",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"licenses-check": "license-checker --summary --excludePrivatePackages --production --onlyAllow \"$( jq -r .onlyAllow[] license-checker-config.json | tr '\n' ';')\" --excludePackages \"$( jq -r .excludePackages[] license-checker-config.json | tr '\n' ';')\""
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@react-querybuilder/material": "^7.2.0",
|
|
32
31
|
"@react-querybuilder/dnd": "^7.2.0",
|
|
32
|
+
"@react-querybuilder/material": "^7.2.0",
|
|
33
33
|
"autosuggest-highlight": "^3.3.4",
|
|
34
34
|
"clsx": "^2.1.0",
|
|
35
35
|
"jwt-decode": "^4.0.0",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"oidc-client": "^1.11.5",
|
|
39
39
|
"prop-types": "^15.8.1",
|
|
40
40
|
"react-csv-downloader": "^3.1.0",
|
|
41
|
-
"react-virtualized": "^9.22.5",
|
|
42
|
-
"uuid": "^9.0.1",
|
|
43
41
|
"react-dnd": "^16.0.1",
|
|
44
42
|
"react-dnd-html5-backend": "^16.0.1",
|
|
45
|
-
"react-querybuilder": "^7.2.0"
|
|
43
|
+
"react-querybuilder": "^7.2.0",
|
|
44
|
+
"react-virtualized": "^9.22.5",
|
|
45
|
+
"uuid": "^9.0.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@emotion/react": "^11.11.4",
|
|
@@ -79,7 +79,9 @@
|
|
|
79
79
|
"@types/autosuggest-highlight": "^3.2.3",
|
|
80
80
|
"@types/eslint": "^8.56.7",
|
|
81
81
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
82
|
+
"@types/json-logic-js": "^2.0.7",
|
|
82
83
|
"@types/license-checker": "^25.0.6",
|
|
84
|
+
"@types/localized-countries": "^2.0.3",
|
|
83
85
|
"@types/node": "^18.19.31",
|
|
84
86
|
"@types/prop-types": "^15.7.12",
|
|
85
87
|
"@types/react": "^18.2.75",
|
|
@@ -94,6 +96,7 @@
|
|
|
94
96
|
"ag-grid-community": "^31.0.0",
|
|
95
97
|
"ag-grid-react": "^31.2.0",
|
|
96
98
|
"babel-eslint": "^10.1.0",
|
|
99
|
+
"babel-preset-vite": "^1.1.3",
|
|
97
100
|
"bufferutil": "^4.0.8",
|
|
98
101
|
"eslint": "^8.57.0",
|
|
99
102
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -108,7 +111,6 @@
|
|
|
108
111
|
"identity-obj-proxy": "^3.0.0",
|
|
109
112
|
"jest": "^29.7.0",
|
|
110
113
|
"jest-environment-jsdom": "^29.7.0",
|
|
111
|
-
"jest-svg-transformer": "^1.0.0",
|
|
112
114
|
"license-checker": "^25.0.1",
|
|
113
115
|
"notistack": "^3.0.1",
|
|
114
116
|
"prettier": "^2.8.8",
|