@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 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
1
7
|
export {};
|
|
@@ -1,3 +1,9 @@
|
|
|
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 './TopBar';
|
|
2
8
|
export * from './GridLogo';
|
|
3
9
|
export { default as AboutDialog } from './AboutDialog';
|
|
@@ -6,7 +6,7 @@ import { styled } from "@mui/system";
|
|
|
6
6
|
import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Typography } from "@mui/material";
|
|
7
7
|
import { TreeView, TreeItem } from "@mui/x-tree-view";
|
|
8
8
|
import { ChevronRight, ExpandMore, Check } from "@mui/icons-material";
|
|
9
|
-
import CancelButton from "../react-hook-form/utils/cancel-button.js";
|
|
9
|
+
import CancelButton from "../inputs/react-hook-form/utils/cancel-button.js";
|
|
10
10
|
const cssDialogPaper = "dialogPaper";
|
|
11
11
|
const cssLabelRoot = "labelRoot";
|
|
12
12
|
const cssLabelText = "labelText";
|
|
@@ -1 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
1
7
|
export { default, generateTreeViewFinderClass } from './TreeViewFinder';
|
|
8
|
+
export type { TreeViewFinderProps, TreeViewFinderNodeProps, } from './TreeViewFinder';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MergedFormContextProps } from '../react-hook-form/provider/custom-form-provider';
|
|
1
|
+
import { MergedFormContextProps } from '../inputs/react-hook-form/provider/custom-form-provider';
|
|
2
2
|
import { FieldErrors, UseFormReturn } from 'react-hook-form';
|
|
3
3
|
import { default as React, FunctionComponent } from 'react';
|
|
4
4
|
|
|
@@ -16,6 +16,7 @@ interface ICustomMuiDialog {
|
|
|
16
16
|
onCancel?: () => void;
|
|
17
17
|
children: React.ReactNode;
|
|
18
18
|
isDataFetching?: boolean;
|
|
19
|
+
language?: string;
|
|
19
20
|
}
|
|
20
21
|
declare const CustomMuiDialog: FunctionComponent<ICustomMuiDialog>;
|
|
21
22
|
export default CustomMuiDialog;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FormattedMessage } from "react-intl";
|
|
3
3
|
import { Dialog, LinearProgress, DialogTitle, Grid, DialogContent, DialogActions } from "@mui/material";
|
|
4
|
-
import SubmitButton from "../react-hook-form/utils/submit-button.js";
|
|
5
|
-
import CancelButton from "../react-hook-form/utils/cancel-button.js";
|
|
6
|
-
import CustomFormProvider from "../react-hook-form/provider/custom-form-provider.js";
|
|
4
|
+
import SubmitButton from "../inputs/react-hook-form/utils/submit-button.js";
|
|
5
|
+
import CancelButton from "../inputs/react-hook-form/utils/cancel-button.js";
|
|
6
|
+
import CustomFormProvider from "../inputs/react-hook-form/provider/custom-form-provider.js";
|
|
7
7
|
const styles = {
|
|
8
8
|
dialogPaper: {
|
|
9
9
|
".MuiDialog-paper": {
|
|
@@ -25,7 +25,8 @@ const CustomMuiDialog = ({
|
|
|
25
25
|
disabledSave,
|
|
26
26
|
removeOptional = false,
|
|
27
27
|
onCancel,
|
|
28
|
-
children
|
|
28
|
+
children,
|
|
29
|
+
language
|
|
29
30
|
}) => {
|
|
30
31
|
const { handleSubmit } = formMethods;
|
|
31
32
|
const handleCancel = (event) => {
|
|
@@ -51,6 +52,7 @@ const CustomMuiDialog = ({
|
|
|
51
52
|
...formMethods,
|
|
52
53
|
validationSchema: formSchema,
|
|
53
54
|
removeOptional,
|
|
55
|
+
language,
|
|
54
56
|
children: /* @__PURE__ */ jsxs(
|
|
55
57
|
Dialog,
|
|
56
58
|
{
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import "../../utils/yup-config.js";
|
|
4
|
-
import { FieldConstants } from "
|
|
4
|
+
import { FieldConstants } from "../../utils/field-constants.js";
|
|
5
5
|
import { useForm } from "react-hook-form";
|
|
6
6
|
import { yupResolver } from "@hookform/resolvers/yup";
|
|
7
7
|
import { useSnackMessage } from "../../hooks/useSnackMessage.js";
|
|
8
8
|
import CustomMuiDialog from "./custom-mui-dialog.js";
|
|
9
|
-
import ExpandingTextField from "../react-hook-form/ExpandingTextField.js";
|
|
9
|
+
import ExpandingTextField from "../inputs/react-hook-form/ExpandingTextField.js";
|
|
10
10
|
import { Box } from "@mui/material";
|
|
11
11
|
import * as yup from "yup";
|
|
12
12
|
const schema = yup.object().shape({
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ElementType } from '../../utils/ElementType';
|
|
2
|
+
import { UUID } from 'crypto';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface ModifyElementSelectionProps {
|
|
6
|
+
elementType: ElementType;
|
|
7
|
+
dialogOpeningButtonLabel: string;
|
|
8
|
+
dialogTitleLabel: string;
|
|
9
|
+
dialogMessageLabel: string;
|
|
10
|
+
noElementMessageLabel?: string;
|
|
11
|
+
onElementValidated?: (elementId: UUID) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const ModifyElementSelection: React.FunctionComponent<ModifyElementSelectionProps>;
|
|
14
|
+
export default ModifyElementSelection;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { Grid, Button, Typography } from "@mui/material";
|
|
4
|
+
import { useIntl, FormattedMessage } from "react-intl";
|
|
5
|
+
import { useController } from "react-hook-form";
|
|
6
|
+
import { FieldConstants } from "../../utils/field-constants.js";
|
|
7
|
+
import DirectoryItemSelector from "../DirectoryItemSelector/directory-item-selector.js";
|
|
8
|
+
import { ElementType } from "../../utils/ElementType.js";
|
|
9
|
+
import { fetchDirectoryElementPath } from "../../services/directory.js";
|
|
10
|
+
const ModifyElementSelection = (props) => {
|
|
11
|
+
const intl = useIntl();
|
|
12
|
+
const [open, setOpen] = useState(false);
|
|
13
|
+
const [activeDirectoryName, setActiveDirectoryName] = useState("");
|
|
14
|
+
const {
|
|
15
|
+
field: { onChange, value: directory }
|
|
16
|
+
} = useController({
|
|
17
|
+
name: FieldConstants.DIRECTORY
|
|
18
|
+
});
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (directory) {
|
|
21
|
+
fetchDirectoryElementPath(directory).then((res) => {
|
|
22
|
+
setActiveDirectoryName(
|
|
23
|
+
res.map((element) => element.elementName.trim()).reverse().join("/")
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}, [directory]);
|
|
28
|
+
const handleSelectFolder = () => {
|
|
29
|
+
setOpen(true);
|
|
30
|
+
};
|
|
31
|
+
const handleClose = (nodes) => {
|
|
32
|
+
if (nodes.length) {
|
|
33
|
+
onChange(nodes[0].id);
|
|
34
|
+
if (props.onElementValidated) {
|
|
35
|
+
props.onElementValidated(nodes[0].id);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
setOpen(false);
|
|
39
|
+
};
|
|
40
|
+
return /* @__PURE__ */ jsxs(
|
|
41
|
+
Grid,
|
|
42
|
+
{
|
|
43
|
+
sx: {
|
|
44
|
+
marginTop: "10px",
|
|
45
|
+
display: "flex",
|
|
46
|
+
alignItems: "center"
|
|
47
|
+
},
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
Button,
|
|
51
|
+
{
|
|
52
|
+
onClick: handleSelectFolder,
|
|
53
|
+
variant: "contained",
|
|
54
|
+
sx: {
|
|
55
|
+
padding: "10px 30px"
|
|
56
|
+
},
|
|
57
|
+
color: "primary",
|
|
58
|
+
component: "label",
|
|
59
|
+
children: /* @__PURE__ */ jsx(FormattedMessage, { id: props.dialogOpeningButtonLabel })
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
Typography,
|
|
64
|
+
{
|
|
65
|
+
sx: {
|
|
66
|
+
marginLeft: "10px",
|
|
67
|
+
fontWeight: "bold"
|
|
68
|
+
},
|
|
69
|
+
children: activeDirectoryName ? activeDirectoryName : (props == null ? void 0 : props.noElementMessageLabel) ? intl.formatMessage({
|
|
70
|
+
id: props.noElementMessageLabel
|
|
71
|
+
}) : ""
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
DirectoryItemSelector,
|
|
76
|
+
{
|
|
77
|
+
open,
|
|
78
|
+
onClose: handleClose,
|
|
79
|
+
types: [props.elementType],
|
|
80
|
+
onlyLeaves: props.elementType !== ElementType.DIRECTORY,
|
|
81
|
+
multiSelect: false,
|
|
82
|
+
validationButtonText: intl.formatMessage({
|
|
83
|
+
id: "confirmDirectoryDialog"
|
|
84
|
+
}),
|
|
85
|
+
title: intl.formatMessage({
|
|
86
|
+
id: props.dialogTitleLabel
|
|
87
|
+
}),
|
|
88
|
+
contentText: intl.formatMessage({
|
|
89
|
+
id: props.dialogMessageLabel
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
export {
|
|
98
|
+
ModifyElementSelection as default
|
|
99
|
+
};
|
|
@@ -6,7 +6,7 @@ import { DialogContentText } from "@mui/material";
|
|
|
6
6
|
import DialogActions from "@mui/material/DialogActions";
|
|
7
7
|
import Button from "@mui/material/Button";
|
|
8
8
|
import { FormattedMessage } from "react-intl";
|
|
9
|
-
import CancelButton from "../react-hook-form/utils/cancel-button.js";
|
|
9
|
+
import CancelButton from "../inputs/react-hook-form/utils/cancel-button.js";
|
|
10
10
|
const PopupConfirmationDialog = ({
|
|
11
11
|
message,
|
|
12
12
|
validateButtonLabel,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementType } from '../../../utils/ElementType
|
|
1
|
+
import { ElementType } from '../../../utils/ElementType';
|
|
2
2
|
import { UUID } from 'crypto';
|
|
3
3
|
import { Dispatch, FunctionComponent, SetStateAction } from 'react';
|
|
4
4
|
|
|
@@ -18,12 +18,11 @@ interface CriteriaBasedFilterEditionDialogProps {
|
|
|
18
18
|
onClose: () => void;
|
|
19
19
|
broadcastChannel: BroadcastChannel;
|
|
20
20
|
getFilterById: (id: string) => Promise<any>;
|
|
21
|
-
saveFilter: (value: any, t: Record<string, any>) => Promise<void>;
|
|
22
21
|
selectionForCopy: SelectionCopy;
|
|
23
22
|
setSelelectionForCopy: (selection: SelectionCopy) => Dispatch<SetStateAction<SelectionCopy>>;
|
|
24
23
|
activeDirectory?: UUID;
|
|
25
24
|
elementExists?: elementExistsType;
|
|
26
25
|
language?: string;
|
|
27
26
|
}
|
|
28
|
-
|
|
27
|
+
declare const CriteriaBasedFilterEditionDialog: FunctionComponent<CriteriaBasedFilterEditionDialogProps>;
|
|
29
28
|
export default CriteriaBasedFilterEditionDialog;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "
|
|
3
|
+
import "../../../utils/field-constants.js";
|
|
4
4
|
import "./criteria-based-filter-utils.js";
|
|
5
5
|
import "../../dialogs/custom-mui-dialog.js";
|
|
6
6
|
import "../../../hooks/useSnackMessage.js";
|
|
@@ -8,12 +8,12 @@ import "react-hook-form";
|
|
|
8
8
|
import "@hookform/resolvers/yup";
|
|
9
9
|
import "./criteria-based-filter-form.js";
|
|
10
10
|
import "../../../utils/yup-config.js";
|
|
11
|
-
import { b,
|
|
11
|
+
import { b, p } from "../../../chunks/criteria-based-filter-edition-dialog.p2pUWzxc.js";
|
|
12
12
|
import "../constants/filter-constants.js";
|
|
13
13
|
import "../../../utils/FetchStatus.js";
|
|
14
|
+
import "../../../services/explore.js";
|
|
14
15
|
import "yup";
|
|
15
16
|
export {
|
|
16
|
-
b as
|
|
17
|
-
b2 as default,
|
|
17
|
+
b as default,
|
|
18
18
|
p as noSelectionForCopy
|
|
19
19
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { f as filterPropertiesYupSchema, F as FreePropertiesTypes, a as FilterProperties } from "../../../chunks/filter-properties.
|
|
3
|
-
import { FieldConstants } from "
|
|
2
|
+
import { f as filterPropertiesYupSchema, F as FreePropertiesTypes, a as FilterProperties } from "../../../chunks/filter-properties.B7-q_yPf.js";
|
|
3
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
4
4
|
import "../../../utils/yup-config.js";
|
|
5
5
|
import CriteriaBasedForm from "./criteria-based-form.js";
|
|
6
6
|
import Grid from "@mui/material/Grid";
|
|
7
|
-
import { getCriteriaBasedSchema, getCriteriaBasedFormData } from "
|
|
7
|
+
import { getCriteriaBasedSchema, getCriteriaBasedFormData } from "./criteria-based-filter-utils.js";
|
|
8
|
+
import { FILTER_EQUIPMENTS } from "../utils/filter-form-utils.js";
|
|
8
9
|
import * as yup from "yup";
|
|
9
10
|
const criteriaBasedFilterSchema = getCriteriaBasedSchema({
|
|
10
11
|
[FieldConstants.ENERGY_SOURCE]: yup.string().nullable(),
|
|
@@ -20,6 +21,7 @@ const CriteriaBasedFilterForm = () => {
|
|
|
20
21
|
/* @__PURE__ */ jsx(
|
|
21
22
|
CriteriaBasedForm,
|
|
22
23
|
{
|
|
24
|
+
equipments: FILTER_EQUIPMENTS,
|
|
23
25
|
defaultValues: criteriaBasedFilterEmptyFormData[FieldConstants.CRITERIA_BASED]
|
|
24
26
|
}
|
|
25
27
|
),
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { default as yup } from '../../../utils/yup-config';
|
|
2
|
+
|
|
3
|
+
export declare const getCriteriaBasedSchema: (extraFields: any) => {
|
|
4
|
+
criteriaBased: yup.ObjectSchema<{
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
}, yup.AnyObject, {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
}, "">;
|
|
9
|
+
};
|
|
10
|
+
export declare const getCriteriaBasedFormData: (criteriaValues: any, extraFields: any) => {
|
|
11
|
+
criteriaBased: any;
|
|
12
|
+
};
|
|
7
13
|
/**
|
|
8
14
|
* Transform
|
|
9
15
|
* from obj.equipmentFilterForm.{
|
|
@@ -1,8 +1,46 @@
|
|
|
1
|
-
import { FieldConstants } from "
|
|
2
|
-
import { F as FreePropertiesTypes } from "../../../chunks/filter-properties.
|
|
1
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
2
|
+
import { F as FreePropertiesTypes } from "../../../chunks/filter-properties.B7-q_yPf.js";
|
|
3
3
|
import { PROPERTY_VALUES, PROPERTY_VALUES_1, PROPERTY_VALUES_2, PROPERTY_NAME } from "./filter-property.js";
|
|
4
|
-
import { getCriteriaBasedFormData } from "../utils/criteria-based-utils.js";
|
|
5
4
|
import { FilterType } from "../constants/filter-constants.js";
|
|
5
|
+
import "../../../utils/yup-config.js";
|
|
6
|
+
import { getRangeInputSchema, getRangeInputDataForm, DEFAULT_RANGE_VALUE } from "../../inputs/react-hook-form/range-input.js";
|
|
7
|
+
import * as yup from "yup";
|
|
8
|
+
const getCriteriaBasedSchema = (extraFields) => ({
|
|
9
|
+
[FieldConstants.CRITERIA_BASED]: yup.object().shape({
|
|
10
|
+
[FieldConstants.COUNTRIES]: yup.array().of(yup.string()),
|
|
11
|
+
[FieldConstants.COUNTRIES_1]: yup.array().of(yup.string()),
|
|
12
|
+
[FieldConstants.COUNTRIES_2]: yup.array().of(yup.string()),
|
|
13
|
+
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE),
|
|
14
|
+
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE_1),
|
|
15
|
+
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE_2),
|
|
16
|
+
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE_3),
|
|
17
|
+
...extraFields
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
const getCriteriaBasedFormData = (criteriaValues, extraFields) => ({
|
|
21
|
+
[FieldConstants.CRITERIA_BASED]: {
|
|
22
|
+
[FieldConstants.COUNTRIES]: (criteriaValues == null ? void 0 : criteriaValues[FieldConstants.COUNTRIES]) ?? [],
|
|
23
|
+
[FieldConstants.COUNTRIES_1]: (criteriaValues == null ? void 0 : criteriaValues[FieldConstants.COUNTRIES_1]) ?? [],
|
|
24
|
+
[FieldConstants.COUNTRIES_2]: (criteriaValues == null ? void 0 : criteriaValues[FieldConstants.COUNTRIES_2]) ?? [],
|
|
25
|
+
...getRangeInputDataForm(
|
|
26
|
+
FieldConstants.NOMINAL_VOLTAGE,
|
|
27
|
+
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE]) ?? DEFAULT_RANGE_VALUE
|
|
28
|
+
),
|
|
29
|
+
...getRangeInputDataForm(
|
|
30
|
+
FieldConstants.NOMINAL_VOLTAGE_1,
|
|
31
|
+
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE_1]) ?? DEFAULT_RANGE_VALUE
|
|
32
|
+
),
|
|
33
|
+
...getRangeInputDataForm(
|
|
34
|
+
FieldConstants.NOMINAL_VOLTAGE_2,
|
|
35
|
+
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE_2]) ?? DEFAULT_RANGE_VALUE
|
|
36
|
+
),
|
|
37
|
+
...getRangeInputDataForm(
|
|
38
|
+
FieldConstants.NOMINAL_VOLTAGE_3,
|
|
39
|
+
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE_3]) ?? DEFAULT_RANGE_VALUE
|
|
40
|
+
),
|
|
41
|
+
...extraFields
|
|
42
|
+
}
|
|
43
|
+
});
|
|
6
44
|
const backToFrontTweak = (response) => {
|
|
7
45
|
const subProps = response.equipmentFilterForm.substationFreeProperties;
|
|
8
46
|
const freeProps = response.equipmentFilterForm.freeProperties;
|
|
@@ -123,5 +161,7 @@ function isNominalVoltageEmpty(nominalVoltage) {
|
|
|
123
161
|
}
|
|
124
162
|
export {
|
|
125
163
|
backToFrontTweak,
|
|
126
|
-
frontToBackTweak
|
|
164
|
+
frontToBackTweak,
|
|
165
|
+
getCriteriaBasedFormData,
|
|
166
|
+
getCriteriaBasedSchema
|
|
127
167
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { FormEquipment } from '../utils/filter-form-utils';
|
|
1
2
|
import { FunctionComponent } from 'react';
|
|
2
3
|
|
|
3
4
|
export interface CriteriaBasedFormProps {
|
|
5
|
+
equipments: Record<string, FormEquipment>;
|
|
4
6
|
defaultValues: Record<string, any>;
|
|
5
7
|
}
|
|
6
8
|
declare const CriteriaBasedForm: FunctionComponent<CriteriaBasedFormProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FieldConstants } from "
|
|
2
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
3
3
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
4
4
|
import { Grid } from "@mui/material";
|
|
5
|
-
import SelectInput from "../../react-hook-form/select-inputs/select-input.js";
|
|
6
|
-
import InputWithPopupConfirmation from "../../react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
7
|
-
import { FILTER_EQUIPMENTS } from "../utils/criteria-based-utils.js";
|
|
5
|
+
import SelectInput from "../../inputs/react-hook-form/select-inputs/select-input.js";
|
|
6
|
+
import InputWithPopupConfirmation from "../../inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
8
7
|
const CriteriaBasedForm = ({
|
|
8
|
+
equipments,
|
|
9
9
|
defaultValues
|
|
10
10
|
}) => {
|
|
11
11
|
const { getValues, setValue } = useFormContext();
|
|
@@ -29,7 +29,7 @@ const CriteriaBasedForm = ({
|
|
|
29
29
|
{
|
|
30
30
|
Input: SelectInput,
|
|
31
31
|
name: FieldConstants.EQUIPMENT_TYPE,
|
|
32
|
-
options: Object.values(
|
|
32
|
+
options: Object.values(equipments),
|
|
33
33
|
label: "equipmentType",
|
|
34
34
|
shouldOpenPopup: openConfirmationPopup,
|
|
35
35
|
resetOnConfirmation: handleResetOnConfirmation,
|
|
@@ -37,7 +37,7 @@ const CriteriaBasedForm = ({
|
|
|
37
37
|
validateButtonLabel: "button.changeType"
|
|
38
38
|
}
|
|
39
39
|
) }),
|
|
40
|
-
watchEquipmentType &&
|
|
40
|
+
watchEquipmentType && equipments[watchEquipmentType].fields.map(
|
|
41
41
|
(equipment, index) => {
|
|
42
42
|
const EquipmentForm = equipment.renderer;
|
|
43
43
|
return /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, flexGrow: 1, children: /* @__PURE__ */ jsx(EquipmentForm, { ...equipment.props }) }, index);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../../react-hook-form/error-management/error-input.js";
|
|
3
|
-
import "../../react-hook-form/error-management/field-error-alert.js";
|
|
2
|
+
import "../../inputs/react-hook-form/error-management/error-input.js";
|
|
3
|
+
import "../../inputs/react-hook-form/error-management/field-error-alert.js";
|
|
4
4
|
import "@mui/material";
|
|
5
|
-
import "
|
|
5
|
+
import "../../../utils/field-constants.js";
|
|
6
6
|
import "react-hook-form";
|
|
7
7
|
import "react-intl";
|
|
8
|
-
import { b } from "../../../chunks/filter-properties.
|
|
8
|
+
import { b } from "../../../chunks/filter-properties.B7-q_yPf.js";
|
|
9
9
|
import "./filter-property.js";
|
|
10
10
|
import "@mui/icons-material/Add";
|
|
11
11
|
import "react";
|
|
12
|
-
import "
|
|
12
|
+
import "../../../utils/equipment-types.js";
|
|
13
13
|
export {
|
|
14
14
|
b as default
|
|
15
15
|
};
|
|
@@ -3,11 +3,11 @@ import "@mui/material/Grid";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-hook-form";
|
|
5
5
|
import "react-intl";
|
|
6
|
-
import "
|
|
6
|
+
import "../../../utils/equipment-types.js";
|
|
7
7
|
import "../../../utils/functions.js";
|
|
8
|
-
import "
|
|
8
|
+
import "../../../utils/field-constants.js";
|
|
9
9
|
import "../../../utils/yup-config.js";
|
|
10
|
-
import { F, a, f } from "../../../chunks/filter-properties.
|
|
10
|
+
import { F, a, f } from "../../../chunks/filter-properties.B7-q_yPf.js";
|
|
11
11
|
import "./filter-property.js";
|
|
12
12
|
import "../../../hooks/predefined-properties-hook.js";
|
|
13
13
|
import "../constants/filter-constants.js";
|
|
@@ -4,9 +4,9 @@ import DeleteIcon from "@mui/icons-material/Delete";
|
|
|
4
4
|
import IconButton from "@mui/material/IconButton";
|
|
5
5
|
import Grid from "@mui/material/Grid";
|
|
6
6
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
7
|
-
import AutocompleteInput from "../../react-hook-form/autocomplete-input.js";
|
|
8
|
-
import MultipleAutocompleteInput from "../../react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js";
|
|
9
|
-
import { FieldConstants } from "
|
|
7
|
+
import AutocompleteInput from "../../inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js";
|
|
8
|
+
import MultipleAutocompleteInput from "../../inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js";
|
|
9
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
10
10
|
const PROPERTY_NAME = "name_property";
|
|
11
11
|
const PROPERTY_VALUES = "prop_values";
|
|
12
12
|
const PROPERTY_VALUES_1 = "prop_values1";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Field } from 'react-querybuilder';
|
|
2
|
-
import { CombinatorType, DataType, FieldType, OperatorType } from '
|
|
2
|
+
import { CombinatorType, DataType, FieldType, OperatorType } from './expert-filter.type';
|
|
3
3
|
|
|
4
4
|
export declare enum RULES {
|
|
5
5
|
EMPTY_RULE = "emptyRule",
|
|
@@ -547,5 +547,26 @@ export declare const FIELDS_OPTIONS: {
|
|
|
547
547
|
valueEditorType: string;
|
|
548
548
|
defaultValue: string;
|
|
549
549
|
};
|
|
550
|
+
VOLTAGE_LEVEL_PROPERTY: {
|
|
551
|
+
name: FieldType;
|
|
552
|
+
label: string;
|
|
553
|
+
dataType: DataType;
|
|
554
|
+
valueEditorType: string;
|
|
555
|
+
defaultValue: string;
|
|
556
|
+
};
|
|
557
|
+
VOLTAGE_LEVEL_PROPERTY_1: {
|
|
558
|
+
name: FieldType;
|
|
559
|
+
label: string;
|
|
560
|
+
dataType: DataType;
|
|
561
|
+
valueEditorType: string;
|
|
562
|
+
defaultValue: string;
|
|
563
|
+
};
|
|
564
|
+
VOLTAGE_LEVEL_PROPERTY_2: {
|
|
565
|
+
name: FieldType;
|
|
566
|
+
label: string;
|
|
567
|
+
dataType: DataType;
|
|
568
|
+
valueEditorType: string;
|
|
569
|
+
defaultValue: string;
|
|
570
|
+
};
|
|
550
571
|
};
|
|
551
572
|
export declare const fields: Record<string, Field[]>;
|