@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assets/criteria-based-filter-edition-dialog.css';
|
|
2
2
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
import React, { useState, useMemo, useEffect, useCallback
|
|
4
|
-
import { FieldConstants } from "../
|
|
3
|
+
import React, { useState, useMemo, useEffect, useCallback } from "react";
|
|
4
|
+
import { FieldConstants } from "../utils/field-constants.js";
|
|
5
5
|
import { backToFrontTweak, frontToBackTweak } from "../components/filter/criteria-based/criteria-based-filter-utils.js";
|
|
6
6
|
import CustomMuiDialog from "../components/dialogs/custom-mui-dialog.js";
|
|
7
7
|
import { useSnackMessage } from "../hooks/useSnackMessage.js";
|
|
@@ -9,7 +9,7 @@ import { useWatch, useFormContext, useFieldArray, useController, useForm } from
|
|
|
9
9
|
import { yupResolver } from "@hookform/resolvers/yup";
|
|
10
10
|
import CriteriaBasedFilterForm, { criteriaBasedFilterEmptyFormData, criteriaBasedFilterSchema } from "../components/filter/criteria-based/criteria-based-filter-form.js";
|
|
11
11
|
import "../utils/yup-config.js";
|
|
12
|
-
import { UniqueNameInput } from "../components/react-hook-form/unique-name-input.js";
|
|
12
|
+
import { UniqueNameInput } from "../components/inputs/react-hook-form/unique-name-input.js";
|
|
13
13
|
import { AgGridReact } from "ag-grid-react";
|
|
14
14
|
import "ag-grid-community/styles/ag-grid.css";
|
|
15
15
|
import "ag-grid-community/styles/ag-theme-alpine.css";
|
|
@@ -30,9 +30,8 @@ import CsvDownloader from "react-csv-downloader";
|
|
|
30
30
|
import Alert from "@mui/material/Alert";
|
|
31
31
|
import "../components/TreeViewFinder/TreeViewFinder.js";
|
|
32
32
|
import "../components/TopBar/TopBar.js";
|
|
33
|
-
import "
|
|
34
|
-
import "
|
|
35
|
-
import "../components/SnackbarProvider/SnackbarProvider.js";
|
|
33
|
+
import "@mui/lab";
|
|
34
|
+
import "notistack";
|
|
36
35
|
import "react-router-dom";
|
|
37
36
|
import "../utils/AuthService.js";
|
|
38
37
|
import "../components/MuiVirtualizedTable/MuiVirtualizedTable.js";
|
|
@@ -42,68 +41,63 @@ import "../components/ReportViewer/log-table.js";
|
|
|
42
41
|
import "../components/ReportViewer/report-tree-view-context.js";
|
|
43
42
|
import "@mui/x-tree-view";
|
|
44
43
|
import "../components/OverflowableText/overflowable-text.js";
|
|
45
|
-
import "
|
|
46
|
-
import "../components/
|
|
47
|
-
import "../components/react-hook-form/utils/
|
|
48
|
-
import
|
|
49
|
-
import "../components/react-hook-form/provider/custom-form-provider.js";
|
|
44
|
+
import "clsx";
|
|
45
|
+
import "../components/inputs/react-hook-form/utils/submit-button.js";
|
|
46
|
+
import CancelButton from "../components/inputs/react-hook-form/utils/cancel-button.js";
|
|
47
|
+
import "../components/inputs/react-hook-form/provider/custom-form-provider.js";
|
|
50
48
|
import "../components/dialogs/description-modification-dialog.js";
|
|
51
49
|
import * as yup from "yup";
|
|
52
50
|
import "../components/dialogs/popup-confirmation-dialog.js";
|
|
53
|
-
import { FILTER_EQUIPMENTS } from "../components/filter/utils/criteria-based-utils.js";
|
|
54
51
|
import "autosuggest-highlight/match";
|
|
55
52
|
import "autosuggest-highlight/parse";
|
|
56
|
-
import "clsx";
|
|
57
53
|
import "../components/CardErrorBoundary/card-error-boundary.js";
|
|
58
|
-
import "notistack";
|
|
59
|
-
import "../components/react-hook-form/slider-input.js";
|
|
60
|
-
import "../components/react-hook-form/numbers/integer-input.js";
|
|
61
|
-
import "../components/react-hook-form/booleans/checkbox-input.js";
|
|
62
|
-
import "../components/react-hook-form/booleans/switch-input.js";
|
|
63
54
|
import "@mui/icons-material/Folder";
|
|
64
|
-
import {
|
|
65
|
-
import { saveExplicitNamingFilter, saveCriteriaBasedFilter, saveExpertFilter } from "../components/filter/utils/filters-utils.js";
|
|
55
|
+
import { saveExplicitNamingFilter, saveCriteriaBasedFilter, saveExpertFilter } from "../components/filter/utils/filter-api.js";
|
|
66
56
|
import { formatQuery, QueryBuilder } from "react-querybuilder";
|
|
67
57
|
import { getNumberOfSiblings, recursiveRemove, countRules, getOperators, queryValidator, testQuery, importExpertRules } from "../components/filter/expert/expert-filter-utils.js";
|
|
68
|
-
import { COMBINATOR_OPTIONS, RULES, EXPERT_FILTER_EQUIPMENTS, OPERATOR_OPTIONS, fields } from "../components/filter/
|
|
58
|
+
import { COMBINATOR_OPTIONS, RULES, EXPERT_FILTER_EQUIPMENTS, OPERATOR_OPTIONS, fields } from "../components/filter/expert/expert-filter-constants.js";
|
|
69
59
|
import { FieldType, OperatorType, DataType } from "../components/filter/expert/expert-filter.type.js";
|
|
70
60
|
import { QueryBuilderDnD } from "@react-querybuilder/dnd";
|
|
71
61
|
import * as ReactDnD from "react-dnd";
|
|
72
62
|
import * as ReactDndHtml5Backend from "react-dnd-html5-backend";
|
|
73
63
|
import { MaterialValueEditor, QueryBuilderMaterial } from "@react-querybuilder/material";
|
|
74
|
-
import CombinatorSelector from "../components/react-query-builder
|
|
75
|
-
import AddButton from "../components/react-query-builder
|
|
76
|
-
import CountryValueEditor from "../components/react-query-builder
|
|
77
|
-
import TranslatedValueEditor from "../components/react-query-builder
|
|
78
|
-
import TextValueEditor from "../components/react-query-builder
|
|
64
|
+
import CombinatorSelector from "../components/inputs/react-query-builder/combinator-selector.js";
|
|
65
|
+
import AddButton from "../components/inputs/react-query-builder/add-button.js";
|
|
66
|
+
import CountryValueEditor from "../components/inputs/react-query-builder/country-value-editor.js";
|
|
67
|
+
import TranslatedValueEditor from "../components/inputs/react-query-builder/translated-value-editor.js";
|
|
68
|
+
import TextValueEditor from "../components/inputs/react-query-builder/text-value-editor.js";
|
|
79
69
|
import Box from "@mui/material/Box";
|
|
80
|
-
import { Generator, Load, VoltageLevel, Substation, noSelectionForCopy as noSelectionForCopy$1 } from "../
|
|
81
|
-
import {
|
|
82
|
-
import
|
|
70
|
+
import { Generator, Load, VoltageLevel, Substation, noSelectionForCopy as noSelectionForCopy$1 } from "../utils/equipment-types.js";
|
|
71
|
+
import { fetchElementsInfos, saveFilter } from "../services/explore.js";
|
|
72
|
+
import { useCustomFormContext } from "../components/inputs/react-hook-form/provider/use-custom-form-context.js";
|
|
73
|
+
import DirectoryItemsInput from "../components/inputs/react-hook-form/directory-items-input.js";
|
|
83
74
|
import { DISTRIBUTION_KEY, FilterType } from "../components/filter/constants/filter-constants.js";
|
|
84
75
|
import { FetchStatus } from "../utils/FetchStatus.js";
|
|
85
76
|
import PropTypes from "prop-types";
|
|
86
|
-
import "./filter-properties.
|
|
87
|
-
import "../components/react-hook-form/range-input.js";
|
|
88
|
-
import "../components/react-hook-form/select-inputs/mui-select-input.js";
|
|
77
|
+
import "./filter-properties.B7-q_yPf.js";
|
|
78
|
+
import "../components/inputs/react-hook-form/range-input.js";
|
|
79
|
+
import "../components/inputs/react-hook-form/select-inputs/mui-select-input.js";
|
|
89
80
|
import "localized-countries";
|
|
90
81
|
import "localized-countries/data/fr";
|
|
91
82
|
import "localized-countries/data/en";
|
|
92
83
|
import "@mui/icons-material/Check";
|
|
93
84
|
import "@mui/material/CircularProgress";
|
|
94
85
|
import "@mui/material/TextField";
|
|
86
|
+
import { FILTER_EQUIPMENTS } from "../components/filter/utils/filter-form-utils.js";
|
|
95
87
|
import { ElementType } from "../utils/ElementType.js";
|
|
96
|
-
import PropertyValueEditor from "../components/react-query-builder
|
|
97
|
-
import ValueSelector from "../components/react-query-builder
|
|
98
|
-
import ErrorInput from "../components/react-hook-form/error-management/error-input.js";
|
|
99
|
-
import FieldErrorAlert from "../components/react-hook-form/error-management/field-error-alert.js";
|
|
100
|
-
import InputWithPopupConfirmation from "../components/react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
101
|
-
import SelectInput from "../components/react-hook-form/select-inputs/select-input.js";
|
|
88
|
+
import PropertyValueEditor from "../components/inputs/react-query-builder/property-value-editor.js";
|
|
89
|
+
import ValueSelector from "../components/inputs/react-query-builder/value-selector.js";
|
|
90
|
+
import ErrorInput from "../components/inputs/react-hook-form/error-management/error-input.js";
|
|
91
|
+
import FieldErrorAlert from "../components/inputs/react-hook-form/error-management/field-error-alert.js";
|
|
92
|
+
import InputWithPopupConfirmation from "../components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
93
|
+
import SelectInput from "../components/inputs/react-hook-form/select-inputs/select-input.js";
|
|
102
94
|
import { styled } from "@mui/material/styles";
|
|
103
|
-
import { NumericEditor } from "../components/react-hook-form/ag-grid-table
|
|
104
|
-
import { toFloatOrNullValue } from "../components/react-hook-form/utils/functions.js";
|
|
105
|
-
import
|
|
106
|
-
import
|
|
95
|
+
import { NumericEditor } from "../components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.js";
|
|
96
|
+
import { toFloatOrNullValue } from "../components/inputs/react-hook-form/utils/functions.js";
|
|
97
|
+
import ModifyElementSelection from "../components/dialogs/modify-element-selection.js";
|
|
98
|
+
import { exportFilter } from "../services/study.js";
|
|
99
|
+
import RadioInput from "../components/inputs/react-hook-form/radio-input.js";
|
|
100
|
+
import ExpandingTextField from "../components/inputs/react-hook-form/ExpandingTextField.js";
|
|
107
101
|
const CsvUploader = ({
|
|
108
102
|
name,
|
|
109
103
|
onClose,
|
|
@@ -657,13 +651,22 @@ function getExplicitNamingFilterEmptyFormData() {
|
|
|
657
651
|
[FILTER_EQUIPMENTS_ATTRIBUTES]: makeDefaultTableRows()
|
|
658
652
|
};
|
|
659
653
|
}
|
|
660
|
-
const ExplicitNamingFilterForm = () => {
|
|
654
|
+
const ExplicitNamingFilterForm = ({ sourceFilterForExplicitNamingConversion }) => {
|
|
661
655
|
const intl = useIntl();
|
|
656
|
+
const { snackError } = useSnackMessage();
|
|
662
657
|
const { getValues, setValue } = useFormContext();
|
|
663
658
|
const watchEquipmentType = useWatch({
|
|
664
659
|
name: FieldConstants.EQUIPMENT_TYPE
|
|
665
660
|
});
|
|
666
661
|
const forGeneratorOrLoad = isGeneratorOrLoad(watchEquipmentType);
|
|
662
|
+
useEffect(() => {
|
|
663
|
+
if (sourceFilterForExplicitNamingConversion) {
|
|
664
|
+
setValue(
|
|
665
|
+
FieldConstants.EQUIPMENT_TYPE,
|
|
666
|
+
sourceFilterForExplicitNamingConversion.equipmentType
|
|
667
|
+
);
|
|
668
|
+
}
|
|
669
|
+
}, [sourceFilterForExplicitNamingConversion, setValue]);
|
|
667
670
|
const columnDefs = useMemo(() => {
|
|
668
671
|
const columnDefs2 = [
|
|
669
672
|
...ROW_DRAGGING_SELECTION_COLUMN_DEF,
|
|
@@ -729,20 +732,51 @@ const ExplicitNamingFilterForm = () => {
|
|
|
729
732
|
const handleResetOnConfirmation = () => {
|
|
730
733
|
setValue(FILTER_EQUIPMENTS_ATTRIBUTES, makeDefaultTableRows());
|
|
731
734
|
};
|
|
735
|
+
const onStudySelected = (studyUuid) => {
|
|
736
|
+
exportFilter(studyUuid, sourceFilterForExplicitNamingConversion == null ? void 0 : sourceFilterForExplicitNamingConversion.id).then((matchingEquipments) => {
|
|
737
|
+
setValue(
|
|
738
|
+
FILTER_EQUIPMENTS_ATTRIBUTES,
|
|
739
|
+
matchingEquipments.length === 0 ? makeDefaultTableRows() : matchingEquipments.map((equipment) => ({
|
|
740
|
+
[FieldConstants.AG_GRID_ROW_UUID]: v4(),
|
|
741
|
+
[FieldConstants.EQUIPMENT_ID]: equipment.id,
|
|
742
|
+
[DISTRIBUTION_KEY]: equipment.distributionKey
|
|
743
|
+
}))
|
|
744
|
+
);
|
|
745
|
+
}).catch(
|
|
746
|
+
(error) => snackError({
|
|
747
|
+
messageTxt: error.message,
|
|
748
|
+
headerId: "convertIntoExplicitNamingFilterError"
|
|
749
|
+
})
|
|
750
|
+
);
|
|
751
|
+
};
|
|
732
752
|
return /* @__PURE__ */ jsxs(Grid, { container: true, item: true, spacing: 2, children: [
|
|
733
|
-
/* @__PURE__ */
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
753
|
+
/* @__PURE__ */ jsxs(Grid, { item: true, xs: 12, children: [
|
|
754
|
+
/* @__PURE__ */ jsx(
|
|
755
|
+
InputWithPopupConfirmation,
|
|
756
|
+
{
|
|
757
|
+
Input: SelectInput,
|
|
758
|
+
name: FieldConstants.EQUIPMENT_TYPE,
|
|
759
|
+
options: Object.values(FILTER_EQUIPMENTS),
|
|
760
|
+
disabled: sourceFilterForExplicitNamingConversion,
|
|
761
|
+
label: "equipmentType",
|
|
762
|
+
shouldOpenPopup: openConfirmationPopup,
|
|
763
|
+
resetOnConfirmation: handleResetOnConfirmation,
|
|
764
|
+
message: "changeTypeMessage",
|
|
765
|
+
validateButtonLabel: "button.changeType"
|
|
766
|
+
}
|
|
767
|
+
),
|
|
768
|
+
sourceFilterForExplicitNamingConversion && /* @__PURE__ */ jsx(
|
|
769
|
+
ModifyElementSelection,
|
|
770
|
+
{
|
|
771
|
+
elementType: ElementType.STUDY,
|
|
772
|
+
onElementValidated: onStudySelected,
|
|
773
|
+
dialogOpeningButtonLabel: "selectStudyDialogButton",
|
|
774
|
+
dialogTitleLabel: "selectStudyDialogTitle",
|
|
775
|
+
dialogMessageLabel: "selectStudyText",
|
|
776
|
+
noElementMessageLabel: "noSelectedStudyText"
|
|
777
|
+
}
|
|
778
|
+
)
|
|
779
|
+
] }),
|
|
746
780
|
watchEquipmentType && /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(
|
|
747
781
|
CustomAgGridTable,
|
|
748
782
|
{
|
|
@@ -791,10 +825,9 @@ const RemoveButton = (props) => {
|
|
|
791
825
|
};
|
|
792
826
|
const ElementValueEditor = (props) => {
|
|
793
827
|
const { setValue } = useCustomFormContext();
|
|
794
|
-
const { fetchElementsInfos } = useContext(FilterContext);
|
|
795
828
|
useEffect(() => {
|
|
796
829
|
if (props.defaultValue && Array.isArray(props.defaultValue) && props.defaultValue.length > 0 && props.defaultValue[0].length > 0 && validate(props.defaultValue[0])) {
|
|
797
|
-
fetchElementsInfos
|
|
830
|
+
fetchElementsInfos(props.defaultValue).then(
|
|
798
831
|
(childrenWithMetadata) => {
|
|
799
832
|
setValue(
|
|
800
833
|
props.name,
|
|
@@ -809,13 +842,7 @@ const ElementValueEditor = (props) => {
|
|
|
809
842
|
}
|
|
810
843
|
);
|
|
811
844
|
}
|
|
812
|
-
}, [
|
|
813
|
-
props.name,
|
|
814
|
-
props.defaultValue,
|
|
815
|
-
props.elementType,
|
|
816
|
-
setValue,
|
|
817
|
-
fetchElementsInfos
|
|
818
|
-
]);
|
|
845
|
+
}, [props.name, props.defaultValue, props.elementType, setValue]);
|
|
819
846
|
return /* @__PURE__ */ jsx(
|
|
820
847
|
DirectoryItemsInput,
|
|
821
848
|
{
|
|
@@ -893,10 +920,12 @@ const ValueEditor = (props) => {
|
|
|
893
920
|
);
|
|
894
921
|
} else if (props.field === FieldType.ID || props.field === FieldType.NAME || props.field === FieldType.VOLTAGE_LEVEL_ID || props.field === FieldType.VOLTAGE_LEVEL_ID_1 || props.field === FieldType.VOLTAGE_LEVEL_ID_2) {
|
|
895
922
|
return /* @__PURE__ */ jsx(TextValueEditor, { ...props });
|
|
896
|
-
} else if (props.field === FieldType.PROPERTY || props.field === FieldType.SUBSTATION_PROPERTY || props.field === FieldType.SUBSTATION_PROPERTY_1 || props.field === FieldType.SUBSTATION_PROPERTY_2) {
|
|
923
|
+
} else if (props.field === FieldType.PROPERTY || props.field === FieldType.SUBSTATION_PROPERTY || props.field === FieldType.SUBSTATION_PROPERTY_1 || props.field === FieldType.SUBSTATION_PROPERTY_2 || props.field === FieldType.VOLTAGE_LEVEL_PROPERTY || props.field === FieldType.VOLTAGE_LEVEL_PROPERTY_1 || props.field === FieldType.VOLTAGE_LEVEL_PROPERTY_2) {
|
|
897
924
|
let equipmentType;
|
|
898
925
|
if (props.field === FieldType.SUBSTATION_PROPERTY || props.field === FieldType.SUBSTATION_PROPERTY_1 || props.field === FieldType.SUBSTATION_PROPERTY_2) {
|
|
899
926
|
equipmentType = Substation.type;
|
|
927
|
+
} else if (props.field === FieldType.VOLTAGE_LEVEL_PROPERTY || props.field === FieldType.VOLTAGE_LEVEL_PROPERTY_1 || props.field === FieldType.VOLTAGE_LEVEL_PROPERTY_2) {
|
|
928
|
+
equipmentType = VoltageLevel.type;
|
|
900
929
|
} else {
|
|
901
930
|
equipmentType = getValues(FieldConstants.EQUIPMENT_TYPE);
|
|
902
931
|
}
|
|
@@ -1108,6 +1137,11 @@ const FilterForm = (props) => {
|
|
|
1108
1137
|
const handleChange = (_event, value) => {
|
|
1109
1138
|
setValue(FieldConstants.FILTER_TYPE, value);
|
|
1110
1139
|
};
|
|
1140
|
+
useEffect(() => {
|
|
1141
|
+
if (props.sourceFilterForExplicitNamingConversion) {
|
|
1142
|
+
setValue(FieldConstants.FILTER_TYPE, FilterType.EXPLICIT_NAMING.id);
|
|
1143
|
+
}
|
|
1144
|
+
}, [props.sourceFilterForExplicitNamingConversion, setValue]);
|
|
1111
1145
|
return /* @__PURE__ */ jsxs(Grid$1, { container: true, spacing: 2, children: [
|
|
1112
1146
|
/* @__PURE__ */ jsx(Grid$1, { item: true, xs: 12, children: /* @__PURE__ */ jsx(
|
|
1113
1147
|
UniqueNameInput,
|
|
@@ -1130,7 +1164,7 @@ const FilterForm = (props) => {
|
|
|
1130
1164
|
rows: 5
|
|
1131
1165
|
}
|
|
1132
1166
|
) }) }),
|
|
1133
|
-
/* @__PURE__ */ jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsx(
|
|
1167
|
+
!props.sourceFilterForExplicitNamingConversion && /* @__PURE__ */ jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsx(
|
|
1134
1168
|
RadioInput,
|
|
1135
1169
|
{
|
|
1136
1170
|
name: FieldConstants.FILTER_TYPE,
|
|
@@ -1140,7 +1174,12 @@ const FilterForm = (props) => {
|
|
|
1140
1174
|
) })
|
|
1141
1175
|
] }),
|
|
1142
1176
|
filterType === FilterType.CRITERIA_BASED.id && /* @__PURE__ */ jsx(CriteriaBasedFilterForm, {}),
|
|
1143
|
-
filterType === FilterType.EXPLICIT_NAMING.id && /* @__PURE__ */ jsx(
|
|
1177
|
+
filterType === FilterType.EXPLICIT_NAMING.id && /* @__PURE__ */ jsx(
|
|
1178
|
+
ExplicitNamingFilterForm,
|
|
1179
|
+
{
|
|
1180
|
+
sourceFilterForExplicitNamingConversion: props.sourceFilterForExplicitNamingConversion
|
|
1181
|
+
}
|
|
1182
|
+
),
|
|
1144
1183
|
filterType === FilterType.EXPERT.id && /* @__PURE__ */ jsx(ExpertFilterForm, {})
|
|
1145
1184
|
] });
|
|
1146
1185
|
};
|
|
@@ -1166,24 +1205,16 @@ const FilterCreationDialog = ({
|
|
|
1166
1205
|
open,
|
|
1167
1206
|
onClose,
|
|
1168
1207
|
activeDirectory,
|
|
1169
|
-
createFilter,
|
|
1170
|
-
saveFilter,
|
|
1171
|
-
fetchAppsAndUrls,
|
|
1172
1208
|
elementExists,
|
|
1173
1209
|
language,
|
|
1174
|
-
|
|
1175
|
-
fetchRootFolders,
|
|
1176
|
-
fetchElementsInfos
|
|
1210
|
+
sourceFilterForExplicitNamingConversion = void 0
|
|
1177
1211
|
}) => {
|
|
1178
1212
|
var _a;
|
|
1179
1213
|
const { snackError } = useSnackMessage();
|
|
1180
|
-
const formMethods = {
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
}),
|
|
1185
|
-
language
|
|
1186
|
-
};
|
|
1214
|
+
const formMethods = useForm({
|
|
1215
|
+
defaultValues: emptyFormData,
|
|
1216
|
+
resolver: yupResolver(formSchema$3)
|
|
1217
|
+
});
|
|
1187
1218
|
const {
|
|
1188
1219
|
formState: { errors }
|
|
1189
1220
|
} = formMethods;
|
|
@@ -1205,8 +1236,6 @@ const FilterCreationDialog = ({
|
|
|
1205
1236
|
});
|
|
1206
1237
|
},
|
|
1207
1238
|
onClose,
|
|
1208
|
-
createFilter,
|
|
1209
|
-
saveFilter,
|
|
1210
1239
|
activeDirectory
|
|
1211
1240
|
);
|
|
1212
1241
|
} else if (filterForm[FieldConstants.FILTER_TYPE] === FilterType.CRITERIA_BASED.id) {
|
|
@@ -1218,8 +1247,7 @@ const FilterCreationDialog = ({
|
|
|
1218
1247
|
snackError({
|
|
1219
1248
|
messageTxt: error
|
|
1220
1249
|
});
|
|
1221
|
-
}
|
|
1222
|
-
createFilter
|
|
1250
|
+
}
|
|
1223
1251
|
);
|
|
1224
1252
|
} else if (filterForm[FieldConstants.FILTER_TYPE] === FilterType.EXPERT.id) {
|
|
1225
1253
|
saveExpertFilter(
|
|
@@ -1235,13 +1263,11 @@ const FilterCreationDialog = ({
|
|
|
1235
1263
|
snackError({
|
|
1236
1264
|
messageTxt: error
|
|
1237
1265
|
});
|
|
1238
|
-
}
|
|
1239
|
-
createFilter,
|
|
1240
|
-
saveFilter
|
|
1266
|
+
}
|
|
1241
1267
|
);
|
|
1242
1268
|
}
|
|
1243
1269
|
},
|
|
1244
|
-
[activeDirectory, snackError, onClose
|
|
1270
|
+
[activeDirectory, snackError, onClose]
|
|
1245
1271
|
);
|
|
1246
1272
|
return /* @__PURE__ */ jsx(
|
|
1247
1273
|
CustomMuiDialog,
|
|
@@ -1251,26 +1277,17 @@ const FilterCreationDialog = ({
|
|
|
1251
1277
|
onSave: onSubmit,
|
|
1252
1278
|
formSchema: formSchema$3,
|
|
1253
1279
|
formMethods,
|
|
1254
|
-
titleId: "createNewFilter",
|
|
1280
|
+
titleId: sourceFilterForExplicitNamingConversion ? "convertIntoExplicitNamingFilter" : "createNewFilter",
|
|
1255
1281
|
removeOptional: true,
|
|
1256
1282
|
disabledSave: !!nameError || !!isValidating,
|
|
1283
|
+
language,
|
|
1257
1284
|
children: /* @__PURE__ */ jsx(
|
|
1258
|
-
|
|
1285
|
+
FilterForm,
|
|
1259
1286
|
{
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
fetchAppsAndUrls
|
|
1265
|
-
},
|
|
1266
|
-
children: /* @__PURE__ */ jsx(
|
|
1267
|
-
FilterForm,
|
|
1268
|
-
{
|
|
1269
|
-
creation: true,
|
|
1270
|
-
activeDirectory,
|
|
1271
|
-
elementExists
|
|
1272
|
-
}
|
|
1273
|
-
)
|
|
1287
|
+
creation: true,
|
|
1288
|
+
activeDirectory,
|
|
1289
|
+
elementExists,
|
|
1290
|
+
sourceFilterForExplicitNamingConversion
|
|
1274
1291
|
}
|
|
1275
1292
|
)
|
|
1276
1293
|
}
|
|
@@ -1292,24 +1309,16 @@ const ExpertFilterEditionDialog = ({
|
|
|
1292
1309
|
selectionForCopy,
|
|
1293
1310
|
getFilterById,
|
|
1294
1311
|
setSelectionForCopy,
|
|
1295
|
-
createFilter,
|
|
1296
|
-
saveFilter,
|
|
1297
1312
|
activeDirectory,
|
|
1298
1313
|
elementExists,
|
|
1299
|
-
language
|
|
1300
|
-
fetchDirectoryContent,
|
|
1301
|
-
fetchRootFolders,
|
|
1302
|
-
fetchElementsInfos
|
|
1314
|
+
language
|
|
1303
1315
|
}) => {
|
|
1304
1316
|
var _a;
|
|
1305
1317
|
const { snackError } = useSnackMessage();
|
|
1306
1318
|
const [dataFetchStatus, setDataFetchStatus] = useState(FetchStatus.IDLE);
|
|
1307
|
-
const formMethods = {
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
}),
|
|
1311
|
-
language
|
|
1312
|
-
};
|
|
1319
|
+
const formMethods = useForm({
|
|
1320
|
+
resolver: yupResolver(formSchema$2)
|
|
1321
|
+
});
|
|
1313
1322
|
const {
|
|
1314
1323
|
reset,
|
|
1315
1324
|
formState: { errors }
|
|
@@ -1354,9 +1363,7 @@ const ExpertFilterEditionDialog = ({
|
|
|
1354
1363
|
snackError({
|
|
1355
1364
|
messageTxt: error
|
|
1356
1365
|
});
|
|
1357
|
-
}
|
|
1358
|
-
createFilter,
|
|
1359
|
-
saveFilter
|
|
1366
|
+
}
|
|
1360
1367
|
);
|
|
1361
1368
|
if (selectionForCopy.sourceItemUuid === id) {
|
|
1362
1369
|
setSelectionForCopy(noSelectionForCopy$1);
|
|
@@ -1371,9 +1378,7 @@ const ExpertFilterEditionDialog = ({
|
|
|
1371
1378
|
onClose,
|
|
1372
1379
|
selectionForCopy.sourceItemUuid,
|
|
1373
1380
|
snackError,
|
|
1374
|
-
setSelectionForCopy
|
|
1375
|
-
saveFilter,
|
|
1376
|
-
createFilter
|
|
1381
|
+
setSelectionForCopy
|
|
1377
1382
|
]
|
|
1378
1383
|
);
|
|
1379
1384
|
const isDataReady = dataFetchStatus === FetchStatus.FETCH_SUCCESS;
|
|
@@ -1389,21 +1394,12 @@ const ExpertFilterEditionDialog = ({
|
|
|
1389
1394
|
removeOptional: true,
|
|
1390
1395
|
disabledSave: !!nameError || !!isValidating,
|
|
1391
1396
|
isDataFetching: dataFetchStatus === FetchStatus.FETCHING,
|
|
1392
|
-
|
|
1393
|
-
|
|
1397
|
+
language,
|
|
1398
|
+
children: isDataReady && /* @__PURE__ */ jsx(
|
|
1399
|
+
FilterForm,
|
|
1394
1400
|
{
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
fetchRootFolders,
|
|
1398
|
-
fetchElementsInfos
|
|
1399
|
-
},
|
|
1400
|
-
children: isDataReady && /* @__PURE__ */ jsx(
|
|
1401
|
-
FilterForm,
|
|
1402
|
-
{
|
|
1403
|
-
activeDirectory,
|
|
1404
|
-
elementExists
|
|
1405
|
-
}
|
|
1406
|
-
)
|
|
1401
|
+
activeDirectory,
|
|
1402
|
+
elementExists
|
|
1407
1403
|
}
|
|
1408
1404
|
)
|
|
1409
1405
|
}
|
|
@@ -1425,8 +1421,6 @@ const ExplicitNamingFilterEditionDialog = ({
|
|
|
1425
1421
|
selectionForCopy,
|
|
1426
1422
|
setSelectionForCopy,
|
|
1427
1423
|
getFilterById,
|
|
1428
|
-
createFilter,
|
|
1429
|
-
saveFilter,
|
|
1430
1424
|
activeDirectory,
|
|
1431
1425
|
elementExists,
|
|
1432
1426
|
language
|
|
@@ -1434,12 +1428,9 @@ const ExplicitNamingFilterEditionDialog = ({
|
|
|
1434
1428
|
var _a;
|
|
1435
1429
|
const { snackError } = useSnackMessage();
|
|
1436
1430
|
const [dataFetchStatus, setDataFetchStatus] = useState(FetchStatus.IDLE);
|
|
1437
|
-
const formMethods = {
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
}),
|
|
1441
|
-
language
|
|
1442
|
-
};
|
|
1431
|
+
const formMethods = useForm({
|
|
1432
|
+
resolver: yupResolver(formSchema$1)
|
|
1433
|
+
});
|
|
1443
1434
|
const {
|
|
1444
1435
|
reset,
|
|
1445
1436
|
formState: { errors }
|
|
@@ -1484,9 +1475,7 @@ const ExplicitNamingFilterEditionDialog = ({
|
|
|
1484
1475
|
messageTxt: error
|
|
1485
1476
|
});
|
|
1486
1477
|
},
|
|
1487
|
-
onClose
|
|
1488
|
-
createFilter,
|
|
1489
|
-
saveFilter
|
|
1478
|
+
onClose
|
|
1490
1479
|
);
|
|
1491
1480
|
if (selectionForCopy.sourceItemUuid === id) {
|
|
1492
1481
|
setSelectionForCopy(noSelectionForCopy$1);
|
|
@@ -1501,8 +1490,6 @@ const ExplicitNamingFilterEditionDialog = ({
|
|
|
1501
1490
|
selectionForCopy,
|
|
1502
1491
|
onClose,
|
|
1503
1492
|
snackError,
|
|
1504
|
-
createFilter,
|
|
1505
|
-
saveFilter,
|
|
1506
1493
|
setSelectionForCopy
|
|
1507
1494
|
]
|
|
1508
1495
|
);
|
|
@@ -1519,6 +1506,7 @@ const ExplicitNamingFilterEditionDialog = ({
|
|
|
1519
1506
|
removeOptional: true,
|
|
1520
1507
|
disabledSave: !!nameError || !!isValidating,
|
|
1521
1508
|
isDataFetching: dataFetchStatus === FetchStatus.FETCHING,
|
|
1509
|
+
language,
|
|
1522
1510
|
children: isDataReady && /* @__PURE__ */ jsx(
|
|
1523
1511
|
FilterForm,
|
|
1524
1512
|
{
|
|
@@ -1556,7 +1544,6 @@ const CriteriaBasedFilterEditionDialog = ({
|
|
|
1556
1544
|
onClose,
|
|
1557
1545
|
broadcastChannel,
|
|
1558
1546
|
getFilterById,
|
|
1559
|
-
saveFilter,
|
|
1560
1547
|
selectionForCopy,
|
|
1561
1548
|
setSelelectionForCopy,
|
|
1562
1549
|
activeDirectory,
|
|
@@ -1566,12 +1553,9 @@ const CriteriaBasedFilterEditionDialog = ({
|
|
|
1566
1553
|
var _a;
|
|
1567
1554
|
const { snackError } = useSnackMessage();
|
|
1568
1555
|
const [dataFetchStatus, setDataFetchStatus] = useState(FetchStatus.IDLE);
|
|
1569
|
-
const formMethods = {
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
}),
|
|
1573
|
-
language
|
|
1574
|
-
};
|
|
1556
|
+
const formMethods = useForm({
|
|
1557
|
+
resolver: yupResolver(formSchema)
|
|
1558
|
+
});
|
|
1575
1559
|
const {
|
|
1576
1560
|
reset,
|
|
1577
1561
|
formState: { errors }
|
|
@@ -1620,7 +1604,6 @@ const CriteriaBasedFilterEditionDialog = ({
|
|
|
1620
1604
|
id,
|
|
1621
1605
|
selectionForCopy.sourceItemUuid,
|
|
1622
1606
|
snackError,
|
|
1623
|
-
saveFilter,
|
|
1624
1607
|
setSelelectionForCopy
|
|
1625
1608
|
]
|
|
1626
1609
|
);
|
|
@@ -1637,6 +1620,7 @@ const CriteriaBasedFilterEditionDialog = ({
|
|
|
1637
1620
|
removeOptional: true,
|
|
1638
1621
|
disabledSave: !!nameError || !!isValidating,
|
|
1639
1622
|
isDataFetching: dataFetchStatus === FetchStatus.FETCHING,
|
|
1623
|
+
language,
|
|
1640
1624
|
children: isDataReady && /* @__PURE__ */ jsx(
|
|
1641
1625
|
FilterForm,
|
|
1642
1626
|
{
|
|
@@ -3,12 +3,12 @@ import Grid$1 from "@mui/material/Grid";
|
|
|
3
3
|
import { useMemo, useEffect } from "react";
|
|
4
4
|
import { useWatch, useFieldArray } from "react-hook-form";
|
|
5
5
|
import { FormattedMessage } from "react-intl";
|
|
6
|
-
import { Line, Hvdc, Substation, Load, Generator, TwoWindingTransfo, Battery, ShuntCompensator, VoltageLevel } from "../
|
|
6
|
+
import { Line, Hvdc, Substation, Load, Generator, TwoWindingTransfo, Battery, ShuntCompensator, VoltageLevel } from "../utils/equipment-types.js";
|
|
7
7
|
import { areArrayElementsUnique } from "../utils/functions.js";
|
|
8
|
-
import { FieldConstants } from "../
|
|
8
|
+
import { FieldConstants } from "../utils/field-constants.js";
|
|
9
9
|
import "../utils/yup-config.js";
|
|
10
|
-
import ErrorInput from "../components/react-hook-form/error-management/error-input.js";
|
|
11
|
-
import FieldErrorAlert from "../components/react-hook-form/error-management/field-error-alert.js";
|
|
10
|
+
import ErrorInput from "../components/inputs/react-hook-form/error-management/error-input.js";
|
|
11
|
+
import FieldErrorAlert from "../components/inputs/react-hook-form/error-management/field-error-alert.js";
|
|
12
12
|
import { Grid, ListItem, Button } from "@mui/material";
|
|
13
13
|
import FilterProperty, { PROPERTY_NAME, PROPERTY_VALUES_1, PROPERTY_VALUES_2, PROPERTY_VALUES } from "../components/filter/criteria-based/filter-property.js";
|
|
14
14
|
import { usePredefinedProperties } from "../hooks/predefined-properties-hook.js";
|
|
@@ -1,10 +1,29 @@
|
|
|
1
|
+
import { UserManager } from 'oidc-client';
|
|
2
|
+
import { Dispatch } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface AuthenticationRouterProps {
|
|
5
|
+
userManager: {
|
|
6
|
+
instance: UserManager;
|
|
7
|
+
error: string;
|
|
8
|
+
};
|
|
9
|
+
signInCallbackError: {
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
authenticationRouterError: {
|
|
13
|
+
userName: string;
|
|
14
|
+
userValidationError?: {
|
|
15
|
+
error: Error;
|
|
16
|
+
};
|
|
17
|
+
logoutError?: {
|
|
18
|
+
error: Error;
|
|
19
|
+
};
|
|
20
|
+
unauthorizedUserInfo?: string;
|
|
21
|
+
error: string;
|
|
22
|
+
};
|
|
23
|
+
showAuthenticationRouterLogin: boolean;
|
|
24
|
+
dispatch: Dispatch<unknown>;
|
|
25
|
+
navigate: () => void;
|
|
26
|
+
location: Location;
|
|
27
|
+
}
|
|
28
|
+
declare const AuthenticationRouter: ({ userManager, signInCallbackError, authenticationRouterError, showAuthenticationRouterLogin, dispatch, navigate, location, }: AuthenticationRouterProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
29
|
export default AuthenticationRouter;
|
|
2
|
-
declare function AuthenticationRouter({ userManager, signInCallbackError, authenticationRouterError, showAuthenticationRouterLogin, dispatch, navigate, location, }: {
|
|
3
|
-
userManager: any;
|
|
4
|
-
signInCallbackError: any;
|
|
5
|
-
authenticationRouterError: any;
|
|
6
|
-
showAuthenticationRouterLogin: any;
|
|
7
|
-
dispatch: any;
|
|
8
|
-
navigate: any;
|
|
9
|
-
location: any;
|
|
10
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -88,7 +88,7 @@ const AuthenticationRouter = ({
|
|
|
88
88
|
Logout,
|
|
89
89
|
{
|
|
90
90
|
disabled: userManager.instance === null,
|
|
91
|
-
onLogoutClick: () => logout(
|
|
91
|
+
onLogoutClick: () => logout(dispatch, userManager.instance)
|
|
92
92
|
}
|
|
93
93
|
) }),
|
|
94
94
|
/* @__PURE__ */ jsxs(Grid, { item: true, xs: 4, children: [
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
1
7
|
export { default } from './AuthenticationRouter';
|