@gridsuite/commons-ui 0.62.0 → 0.63.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AuthenticationRouter/AuthenticationRouter.d.ts +21 -20
- package/dist/components/AuthenticationRouter/AuthenticationRouter.js +15 -13
- package/dist/components/AuthenticationRouter/index.d.ts +4 -7
- package/dist/components/AuthenticationRouter/index.js +2 -2
- package/dist/components/CardErrorBoundary/card-error-boundary.d.ts +0 -1
- package/dist/components/CardErrorBoundary/card-error-boundary.js +5 -3
- package/dist/components/CardErrorBoundary/index.d.ts +3 -7
- package/dist/components/CardErrorBoundary/index.js +2 -2
- package/dist/components/CustomAGGrid/custom-aggrid.js +1 -1
- package/dist/components/CustomAGGrid/custom-aggrid.style.js +5 -5
- package/dist/components/DirectoryItemSelector/directory-item-selector.d.ts +2 -3
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +108 -105
- package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +1 -1
- package/dist/components/ElementSearchDialog/element-search-dialog.js +2 -2
- package/dist/components/ElementSearchDialog/element-search-input.d.ts +1 -1
- package/dist/components/ElementSearchDialog/element-search-input.js +4 -6
- package/dist/components/ElementSearchDialog/equipment-item.d.ts +3 -3
- package/dist/components/ElementSearchDialog/equipment-item.js +13 -13
- package/dist/components/ElementSearchDialog/index.d.ts +3 -3
- package/dist/components/ElementSearchDialog/index.js +5 -5
- package/dist/components/ElementSearchDialog/tag-renderer.d.ts +11 -12
- package/dist/components/ElementSearchDialog/tag-renderer.js +5 -6
- package/dist/components/ElementSearchDialog/use-element-search.d.ts +2 -2
- package/dist/components/ElementSearchDialog/use-element-search.js +2 -2
- package/dist/components/ExpandableGroup/expandable-group.d.ts +3 -3
- package/dist/components/ExpandableGroup/expandable-group.js +6 -6
- package/dist/components/ExpandableGroup/index.d.ts +3 -7
- package/dist/components/ExpandableGroup/index.js +2 -2
- package/dist/components/FlatParameters/FlatParameters.d.ts +1 -1
- package/dist/components/FlatParameters/FlatParameters.js +46 -46
- package/dist/components/FlatParameters/index.d.ts +3 -7
- package/dist/components/Login/Login.d.ts +1 -7
- package/dist/components/Login/Login.js +3 -9
- package/dist/components/Login/Logout.d.ts +1 -1
- package/dist/components/Login/Logout.js +11 -11
- package/dist/components/Login/index.d.ts +3 -7
- package/dist/components/Login/index.js +2 -2
- package/dist/components/MuiVirtualizedTable/ColumnHeader.js +9 -8
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.d.ts +24 -9
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +200 -205
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +6 -6
- package/dist/components/MuiVirtualizedTable/index.d.ts +2 -2
- package/dist/components/MuiVirtualizedTable/index.js +3 -3
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.d.ts +1 -1
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +5 -15
- package/dist/components/MultipleSelectionDialog/index.d.ts +3 -7
- package/dist/components/MultipleSelectionDialog/index.js +2 -2
- package/dist/components/OverflowableText/index.d.ts +3 -7
- package/dist/components/OverflowableText/overflowable-text.js +2 -2
- package/dist/components/ReportViewer/filter-button.d.ts +1 -1
- package/dist/components/ReportViewer/filter-button.js +3 -3
- package/dist/components/ReportViewer/index.d.ts +3 -7
- package/dist/components/ReportViewer/index.js +2 -2
- package/dist/components/ReportViewer/log-report-item.d.ts +1 -1
- package/dist/components/ReportViewer/log-report-item.js +12 -9
- package/dist/components/ReportViewer/log-report.js +3 -3
- package/dist/components/ReportViewer/log-table.d.ts +2 -1
- package/dist/components/ReportViewer/log-table.js +6 -5
- package/dist/components/ReportViewer/multi-select-list.d.ts +1 -1
- package/dist/components/ReportViewer/multi-select-list.js +3 -3
- package/dist/components/ReportViewer/report-item.js +4 -3
- package/dist/components/ReportViewer/report-viewer.js +11 -12
- package/dist/components/ReportViewerDialog/index.d.ts +3 -7
- package/dist/components/ReportViewerDialog/index.js +2 -2
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +2 -2
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +3 -3
- package/dist/components/SignInCallbackHandler/index.d.ts +3 -7
- package/dist/components/SignInCallbackHandler/index.js +2 -2
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +2 -2
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +3 -3
- package/dist/components/SilentRenewCallbackHandler/index.d.ts +3 -7
- package/dist/components/SilentRenewCallbackHandler/index.js +2 -2
- package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +1 -1
- package/dist/components/SnackbarProvider/SnackbarProvider.js +14 -13
- package/dist/components/SnackbarProvider/index.d.ts +3 -7
- package/dist/components/SnackbarProvider/index.js +2 -2
- package/dist/components/TopBar/AboutDialog.d.ts +2 -3
- package/dist/components/TopBar/AboutDialog.js +151 -153
- package/dist/components/TopBar/GridLogo.d.ts +2 -2
- package/dist/components/TopBar/GridLogo.js +24 -24
- package/dist/components/TopBar/TopBar.d.ts +5 -29
- package/dist/components/TopBar/TopBar.js +9 -33
- package/dist/components/TopBar/index.d.ts +1 -1
- package/dist/components/TopBar/index.js +1 -1
- package/dist/components/TreeViewFinder/TreeViewFinder.js +51 -45
- package/dist/components/TreeViewFinder/index.d.ts +1 -1
- package/dist/components/TreeViewFinder/index.js +1 -1
- package/dist/components/dialogs/custom-mui-dialog.d.ts +2 -2
- package/dist/components/dialogs/custom-mui-dialog.js +5 -5
- package/dist/components/dialogs/description-modification-dialog.d.ts +7 -3
- package/dist/components/dialogs/description-modification-dialog.js +11 -5
- package/dist/components/dialogs/modify-element-selection.d.ts +1 -2
- package/dist/components/dialogs/modify-element-selection.js +21 -13
- package/dist/components/dialogs/popup-confirmation-dialog.d.ts +7 -3
- package/dist/components/dialogs/popup-confirmation-dialog.js +3 -6
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.d.ts +4 -5
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +123 -16
- package/dist/components/filter/criteria-based/criteria-based-filter-form.d.ts +1 -2
- package/dist/components/filter/criteria-based/criteria-based-filter-form.js +6 -5
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +27 -20
- package/dist/components/filter/criteria-based/criteria-based-form.d.ts +1 -2
- package/dist/components/filter/criteria-based/criteria-based-form.js +17 -6
- package/dist/components/filter/criteria-based/filter-free-properties.d.ts +5 -3
- package/dist/components/filter/criteria-based/filter-free-properties.js +69 -13
- package/dist/components/filter/criteria-based/filter-properties.d.ts +1 -6
- package/dist/components/filter/criteria-based/filter-properties.js +124 -16
- package/dist/components/filter/criteria-based/filter-property.d.ts +1 -2
- package/dist/components/filter/criteria-based/filter-property.js +16 -16
- package/dist/components/filter/expert/expert-filter-constants.d.ts +8 -1
- package/dist/components/filter/expert/expert-filter-constants.js +7 -0
- package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +3 -4
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +128 -15
- package/dist/components/filter/expert/expert-filter-form.d.ts +2 -2
- package/dist/components/filter/expert/expert-filter-form.js +115 -20
- package/dist/components/filter/expert/expert-filter-utils.d.ts +2 -2
- package/dist/components/filter/expert/expert-filter-utils.js +58 -46
- package/dist/components/filter/expert/expert-filter.type.d.ts +4 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.d.ts +3 -4
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +136 -16
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +4 -5
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +241 -24
- package/dist/components/filter/filter-creation-dialog.d.ts +3 -4
- package/dist/components/filter/filter-creation-dialog.js +125 -13
- package/dist/components/filter/filter-form.d.ts +4 -5
- package/dist/components/filter/filter-form.js +73 -14
- package/dist/components/filter/utils/filter-api.js +1 -1
- package/dist/components/filter/utils/filter-form-utils.js +1 -1
- package/dist/components/inputs/react-hook-form/ExpandingTextField.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/ExpandingTextField.js +5 -5
- package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +102 -13
- package/dist/components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.d.ts +7 -6
- package/dist/components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.js +13 -15
- package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.d.ts +7 -3
- package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +220 -61
- package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +243 -11
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.d.ts +4 -2
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js +12 -12
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js +2 -2
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.js +2 -2
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.js +3 -3
- package/dist/components/inputs/react-hook-form/booleans/switch-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/switch-input.js +3 -3
- package/dist/components/inputs/react-hook-form/directory-items-input.d.ts +11 -3
- package/dist/components/inputs/react-hook-form/directory-items-input.js +11 -11
- package/dist/components/inputs/react-hook-form/error-management/error-input.d.ts +2 -2
- package/dist/components/inputs/react-hook-form/error-management/error-input.js +7 -9
- package/dist/components/inputs/react-hook-form/error-management/field-error-alert.d.ts +2 -2
- package/dist/components/inputs/react-hook-form/error-management/field-error-alert.js +2 -4
- package/dist/components/inputs/react-hook-form/error-management/mid-form-error.d.ts +2 -2
- package/dist/components/inputs/react-hook-form/error-management/mid-form-error.js +2 -2
- package/dist/components/inputs/react-hook-form/numbers/float-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/numbers/float-input.js +6 -5
- package/dist/components/inputs/react-hook-form/numbers/integer-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/numbers/integer-input.js +5 -5
- package/dist/components/inputs/react-hook-form/provider/custom-form-provider.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/provider/custom-form-provider.js +11 -8
- package/dist/components/inputs/react-hook-form/provider/use-custom-form-context.d.ts +2 -1
- package/dist/components/inputs/react-hook-form/provider/use-custom-form-context.js +1 -1
- package/dist/components/inputs/react-hook-form/radio-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/radio-input.js +2 -8
- package/dist/components/inputs/react-hook-form/range-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/range-input.js +5 -5
- package/dist/components/inputs/react-hook-form/raw-read-only-input.d.ts +2 -1
- package/dist/components/inputs/react-hook-form/raw-read-only-input.js +1 -1
- package/dist/components/inputs/react-hook-form/select-inputs/countries-input.d.ts +1 -3
- package/dist/components/inputs/react-hook-form/select-inputs/countries-input.js +4 -8
- package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.d.ts +3 -1
- package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js +4 -4
- package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.js +11 -10
- package/dist/components/inputs/react-hook-form/select-inputs/select-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/select-inputs/select-input.js +16 -8
- package/dist/components/inputs/react-hook-form/slider-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/slider-input.js +6 -6
- package/dist/components/inputs/react-hook-form/text-input.d.ts +6 -2
- package/dist/components/inputs/react-hook-form/text-input.js +9 -9
- package/dist/components/inputs/react-hook-form/unique-name-input.d.ts +4 -6
- package/dist/components/inputs/react-hook-form/unique-name-input.js +12 -12
- package/dist/components/inputs/react-hook-form/utils/cancel-button.d.ts +9 -10
- package/dist/components/inputs/react-hook-form/utils/cancel-button.js +2 -6
- package/dist/components/inputs/react-hook-form/utils/field-label.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/utils/field-label.js +3 -3
- package/dist/components/inputs/react-hook-form/utils/functions.js +1 -1
- package/dist/components/inputs/react-hook-form/utils/submit-button.d.ts +9 -10
- package/dist/components/inputs/react-hook-form/utils/submit-button.js +2 -6
- package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.js +7 -7
- package/dist/components/inputs/react-query-builder/add-button.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/add-button.js +13 -10
- package/dist/components/inputs/react-query-builder/combinator-selector.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/combinator-selector.js +7 -6
- package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.js +2 -2
- package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.js +5 -5
- package/dist/components/inputs/react-query-builder/country-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/country-value-editor.js +18 -18
- package/dist/components/inputs/react-query-builder/custom-react-query-builder.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +92 -19
- package/dist/components/inputs/react-query-builder/element-value-editor.d.ts +7 -3
- package/dist/components/inputs/react-query-builder/element-value-editor.js +50 -62
- package/dist/components/inputs/react-query-builder/property-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/property-value-editor.js +5 -5
- package/dist/components/inputs/react-query-builder/remove-button.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/remove-button.js +26 -7
- package/dist/components/inputs/react-query-builder/text-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/text-value-editor.js +17 -17
- package/dist/components/inputs/react-query-builder/translated-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/translated-value-editor.js +22 -26
- package/dist/components/inputs/react-query-builder/value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/value-editor.js +119 -18
- package/dist/components/inputs/react-query-builder/value-selector.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/value-selector.js +2 -2
- package/dist/components/inputs/select-clearable.d.ts +1 -2
- package/dist/components/inputs/select-clearable.js +6 -5
- package/dist/components/translations/card-error-boundary-en.d.ts +2 -2
- package/dist/components/translations/card-error-boundary-en.js +2 -2
- package/dist/components/translations/card-error-boundary-fr.d.ts +2 -2
- package/dist/components/translations/card-error-boundary-fr.js +2 -2
- package/dist/components/translations/common-button-en.d.ts +2 -2
- package/dist/components/translations/common-button-en.js +2 -2
- package/dist/components/translations/common-button-fr.d.ts +2 -2
- package/dist/components/translations/common-button-fr.js +2 -2
- package/dist/components/translations/directory-items-input-en.d.ts +2 -2
- package/dist/components/translations/directory-items-input-en.js +2 -2
- package/dist/components/translations/directory-items-input-fr.d.ts +2 -2
- package/dist/components/translations/directory-items-input-fr.js +2 -2
- package/dist/components/translations/element-search-en.d.ts +2 -2
- package/dist/components/translations/element-search-en.js +2 -2
- package/dist/components/translations/element-search-fr.d.ts +2 -2
- package/dist/components/translations/element-search-fr.js +2 -2
- package/dist/components/translations/equipment-search-en.d.ts +2 -2
- package/dist/components/translations/equipment-search-en.js +2 -2
- package/dist/components/translations/equipment-search-fr.d.ts +2 -2
- package/dist/components/translations/equipment-search-fr.js +2 -2
- package/dist/components/translations/filter-en.d.ts +3 -2
- package/dist/components/translations/filter-en.js +3 -2
- package/dist/components/translations/filter-expert-en.d.ts +2 -2
- package/dist/components/translations/filter-expert-en.js +2 -2
- package/dist/components/translations/filter-expert-fr.d.ts +2 -2
- package/dist/components/translations/filter-expert-fr.js +2 -2
- package/dist/components/translations/filter-fr.d.ts +3 -2
- package/dist/components/translations/filter-fr.js +3 -2
- package/dist/components/translations/flat-parameters-en.d.ts +2 -2
- package/dist/components/translations/flat-parameters-en.js +2 -2
- package/dist/components/translations/flat-parameters-fr.d.ts +2 -2
- package/dist/components/translations/flat-parameters-fr.js +2 -2
- package/dist/components/translations/inputs-en.d.ts +2 -2
- package/dist/components/translations/inputs-en.js +2 -2
- package/dist/components/translations/inputs-fr.d.ts +2 -2
- package/dist/components/translations/inputs-fr.js +2 -2
- package/dist/components/translations/login-en.d.ts +2 -2
- package/dist/components/translations/login-en.js +2 -2
- package/dist/components/translations/login-fr.d.ts +2 -2
- package/dist/components/translations/login-fr.js +2 -2
- package/dist/components/translations/multiple-selection-dialog-en.d.ts +2 -2
- package/dist/components/translations/multiple-selection-dialog-en.js +2 -2
- package/dist/components/translations/multiple-selection-dialog-fr.d.ts +2 -2
- package/dist/components/translations/multiple-selection-dialog-fr.js +2 -2
- package/dist/components/translations/report-viewer-en.d.ts +2 -2
- package/dist/components/translations/report-viewer-en.js +2 -2
- package/dist/components/translations/report-viewer-fr.d.ts +2 -2
- package/dist/components/translations/report-viewer-fr.js +2 -2
- package/dist/components/translations/table-en.d.ts +2 -2
- package/dist/components/translations/table-en.js +2 -2
- package/dist/components/translations/table-fr.d.ts +2 -2
- package/dist/components/translations/table-fr.js +2 -2
- package/dist/components/translations/top-bar-en.d.ts +2 -2
- package/dist/components/translations/top-bar-en.js +2 -2
- package/dist/components/translations/top-bar-fr.d.ts +2 -2
- package/dist/components/translations/top-bar-fr.js +2 -2
- package/dist/components/translations/treeview-finder-en.d.ts +2 -2
- package/dist/components/translations/treeview-finder-en.js +2 -2
- package/dist/components/translations/treeview-finder-fr.d.ts +2 -2
- package/dist/components/translations/treeview-finder-fr.js +2 -2
- package/dist/hooks/localized-countries-hook.js +1 -1
- package/dist/hooks/predefined-properties-hook.d.ts +2 -1
- package/dist/hooks/predefined-properties-hook.js +2 -2
- package/dist/hooks/useDebounce.d.ts +2 -1
- package/dist/hooks/useDebounce.js +1 -1
- package/dist/hooks/useIntlRef.d.ts +2 -1
- package/dist/hooks/useIntlRef.js +1 -1
- package/dist/hooks/usePrevious.d.ts +2 -0
- package/dist/hooks/usePrevious.js +12 -0
- package/dist/hooks/useSnackMessage.d.ts +2 -2
- package/dist/hooks/useSnackMessage.js +36 -36
- package/dist/index.d.ts +27 -16
- package/dist/index.js +183 -159
- package/dist/redux/authActions.d.ts +56 -0
- package/dist/redux/commonStore.d.ts +4 -3
- package/dist/redux/commonStore.js +2 -1
- package/dist/services/apps-metadata.js +1 -1
- package/dist/services/directory.js +6 -6
- package/dist/services/explore.js +14 -12
- package/dist/services/index.d.ts +0 -5
- package/dist/services/study.js +2 -2
- package/dist/services/utils.d.ts +1 -1
- package/dist/services/utils.js +26 -26
- package/dist/utils/AuthService.d.ts +9 -8
- package/dist/utils/AuthService.js +77 -76
- package/dist/utils/ElementIcon.d.ts +3 -2
- package/dist/utils/ElementIcon.js +4 -3
- package/dist/utils/ElementType.d.ts +3 -6
- package/dist/utils/EquipmentType.js +3 -3
- package/dist/utils/FetchStatus.d.ts +2 -1
- package/dist/utils/FetchStatus.js +1 -1
- package/dist/utils/Metadata.d.ts +15 -0
- package/dist/utils/Metadata.js +1 -0
- package/dist/utils/UserManagerMock.d.ts +50 -25
- package/dist/utils/UserManagerMock.js +118 -11
- package/dist/utils/algos.d.ts +2 -1
- package/dist/utils/algos.js +2 -2
- package/dist/utils/equipment-types-for-predefined-properties-mapper.d.ts +2 -1
- package/dist/utils/equipment-types-for-predefined-properties-mapper.js +3 -1
- package/dist/utils/field-constants.d.ts +2 -1
- package/dist/utils/field-constants.js +1 -1
- package/dist/utils/functions.js +5 -2
- package/dist/utils/types.d.ts +1 -1
- package/dist/utils/yup-config.js +1 -2
- package/package.json +10 -4
- package/dist/chunks/criteria-based-filter-edition-dialog.CAT38SvB.js +0 -1694
- package/dist/chunks/filter-properties.B7-q_yPf.js +0 -195
- package/dist/redux/actions.d.ts +0 -54
- /package/dist/assets/{criteria-based-filter-edition-dialog.css → expert-filter-form.css} +0 -0
- /package/dist/redux/{actions.js → authActions.js} +0 -0
|
@@ -3,7 +3,7 @@ import { useCallback } from "react";
|
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { FormControlLabel } from "@mui/material";
|
|
5
5
|
import { useController } from "react-hook-form";
|
|
6
|
-
|
|
6
|
+
function BooleanInput({ name, label, formProps, Input }) {
|
|
7
7
|
const {
|
|
8
8
|
field: { onChange, value, ref }
|
|
9
9
|
} = useController({ name });
|
|
@@ -36,7 +36,7 @@ const BooleanInput = ({ name, label, formProps, Input }) => {
|
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
38
|
return CustomInput;
|
|
39
|
-
}
|
|
39
|
+
}
|
|
40
40
|
export {
|
|
41
41
|
BooleanInput as default
|
|
42
42
|
};
|
|
@@ -5,5 +5,5 @@ export interface CheckboxInputProps {
|
|
|
5
5
|
label?: string;
|
|
6
6
|
formProps?: CheckboxProps;
|
|
7
7
|
}
|
|
8
|
-
declare
|
|
8
|
+
declare function CheckboxInput({ name, label, formProps }: CheckboxInputProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default CheckboxInput;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import BooleanInput from "./boolean-input.js";
|
|
3
2
|
import { Checkbox } from "@mui/material";
|
|
4
|
-
|
|
3
|
+
import BooleanInput from "./boolean-input.js";
|
|
4
|
+
function CheckboxInput({ name, label, formProps }) {
|
|
5
5
|
return /* @__PURE__ */ jsx(
|
|
6
6
|
BooleanInput,
|
|
7
7
|
{
|
|
@@ -11,7 +11,7 @@ const CheckboxInput = ({ name, label, formProps }) => {
|
|
|
11
11
|
Input: Checkbox
|
|
12
12
|
}
|
|
13
13
|
);
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
export {
|
|
16
16
|
CheckboxInput as default
|
|
17
17
|
};
|
|
@@ -5,5 +5,5 @@ export interface SwitchInputProps {
|
|
|
5
5
|
label?: string;
|
|
6
6
|
formProps?: SwitchProps;
|
|
7
7
|
}
|
|
8
|
-
declare
|
|
8
|
+
declare function SwitchInput({ name, label, formProps }: SwitchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default SwitchInput;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import BooleanInput from "./boolean-input.js";
|
|
3
2
|
import { Switch } from "@mui/material";
|
|
4
|
-
|
|
3
|
+
import BooleanInput from "./boolean-input.js";
|
|
4
|
+
function SwitchInput({ name, label, formProps }) {
|
|
5
5
|
return /* @__PURE__ */ jsx(
|
|
6
6
|
BooleanInput,
|
|
7
7
|
{
|
|
@@ -11,7 +11,7 @@ const SwitchInput = ({ name, label, formProps }) => {
|
|
|
11
11
|
Input: Switch
|
|
12
12
|
}
|
|
13
13
|
);
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
export {
|
|
16
16
|
SwitchInput as default
|
|
17
17
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023, 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
|
+
*/
|
|
3
7
|
export declare const NAME = "name";
|
|
4
8
|
export interface DirectoryItemsInputProps {
|
|
5
9
|
label: string | undefined;
|
|
@@ -14,5 +18,9 @@ export interface DirectoryItemsInputProps {
|
|
|
14
18
|
disable?: boolean;
|
|
15
19
|
labelRequiredFromContext?: boolean;
|
|
16
20
|
}
|
|
17
|
-
declare
|
|
21
|
+
declare function DirectoryItemsInput({ label, name, elementType, // Used to specify type of element (Filter, Contingency list, ...)
|
|
22
|
+
equipmentTypes, // Mostly used for filters, it allows the user to get elements of specific equipment only
|
|
23
|
+
itemFilter, // Used to further filter the results displayed according to specific requirement
|
|
24
|
+
titleId, // title of directory item selector dialogue
|
|
25
|
+
hideErrorMessage, onRowChanged, onChange, disable, labelRequiredFromContext, }: DirectoryItemsInputProps): import("react/jsx-runtime").JSX.Element;
|
|
18
26
|
export default DirectoryItemsInput;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { FormControl, Chip, Grid, Tooltip, IconButton } from "@mui/material";
|
|
3
|
-
import FieldLabel from "./utils/field-label.js";
|
|
4
3
|
import FolderIcon from "@mui/icons-material/Folder";
|
|
5
4
|
import { useState, useMemo, useCallback } from "react";
|
|
6
5
|
import { useFieldArray, useController } from "react-hook-form";
|
|
7
6
|
import { useIntl } from "react-intl";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import RawReadOnlyInput from "./raw-read-only-input.js";
|
|
8
|
+
import FieldLabel from "./utils/field-label.js";
|
|
9
|
+
import useCustomFormContext from "./provider/use-custom-form-context.js";
|
|
10
10
|
import { isFieldRequired } from "./utils/functions.js";
|
|
11
11
|
import ErrorInput from "./error-management/error-input.js";
|
|
12
12
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
@@ -43,7 +43,7 @@ const styles = {
|
|
|
43
43
|
marginTop: "-5px"
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
function DirectoryItemsInput({
|
|
47
47
|
label,
|
|
48
48
|
name,
|
|
49
49
|
elementType,
|
|
@@ -59,7 +59,7 @@ const DirectoryItemsInput = ({
|
|
|
59
59
|
onChange,
|
|
60
60
|
disable = false,
|
|
61
61
|
labelRequiredFromContext = true
|
|
62
|
-
})
|
|
62
|
+
}) {
|
|
63
63
|
const { snackError } = useSnackMessage();
|
|
64
64
|
const intl = useIntl();
|
|
65
65
|
const [selected, setSelected] = useState([]);
|
|
@@ -106,8 +106,8 @@ const DirectoryItemsInput = ({
|
|
|
106
106
|
});
|
|
107
107
|
} else {
|
|
108
108
|
append(otherElementAttributes);
|
|
109
|
-
onRowChanged
|
|
110
|
-
onChange
|
|
109
|
+
onRowChanged == null ? void 0 : onRowChanged(true);
|
|
110
|
+
onChange == null ? void 0 : onChange(getValues(name));
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
setDirectoryItemSelectorOpen(false);
|
|
@@ -127,8 +127,8 @@ const DirectoryItemsInput = ({
|
|
|
127
127
|
const removeElements = useCallback(
|
|
128
128
|
(index) => {
|
|
129
129
|
remove(index);
|
|
130
|
-
onRowChanged
|
|
131
|
-
onChange
|
|
130
|
+
onRowChanged == null ? void 0 : onRowChanged(true);
|
|
131
|
+
onChange == null ? void 0 : onChange(getValues(name));
|
|
132
132
|
},
|
|
133
133
|
[onRowChanged, remove, getValues, name, onChange]
|
|
134
134
|
);
|
|
@@ -155,7 +155,7 @@ const DirectoryItemsInput = ({
|
|
|
155
155
|
{
|
|
156
156
|
sx: mergeSx(
|
|
157
157
|
styles.formDirectoryElements1,
|
|
158
|
-
|
|
158
|
+
// @ts-ignore
|
|
159
159
|
(error == null ? void 0 : error.message) && styles.formDirectoryElementsError
|
|
160
160
|
),
|
|
161
161
|
error: !!(error == null ? void 0 : error.message),
|
|
@@ -224,7 +224,7 @@ const DirectoryItemsInput = ({
|
|
|
224
224
|
}
|
|
225
225
|
)
|
|
226
226
|
] });
|
|
227
|
-
}
|
|
227
|
+
}
|
|
228
228
|
export {
|
|
229
229
|
NAME,
|
|
230
230
|
DirectoryItemsInput as default
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
|
|
3
3
|
export type ErrorMessage = {
|
|
4
4
|
id: string;
|
|
@@ -10,5 +10,5 @@ export interface ErrorInputProps {
|
|
|
10
10
|
message: string | React.ReactNode;
|
|
11
11
|
}) => React.ReactNode;
|
|
12
12
|
}
|
|
13
|
-
declare
|
|
13
|
+
declare function ErrorInput({ name, InputField }: ErrorInputProps): "" | import("react/jsx-runtime").JSX.Element | undefined;
|
|
14
14
|
export default ErrorInput;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useEffect } from "react";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { useController } from "react-hook-form";
|
|
5
|
-
|
|
6
|
-
name,
|
|
7
|
-
InputField
|
|
8
|
-
}) => {
|
|
5
|
+
function ErrorInput({ name, InputField }) {
|
|
9
6
|
var _a;
|
|
10
7
|
const {
|
|
11
8
|
fieldState: { error },
|
|
@@ -19,7 +16,8 @@ const ErrorInput = ({
|
|
|
19
16
|
return {
|
|
20
17
|
id: errorMsg2
|
|
21
18
|
};
|
|
22
|
-
}
|
|
19
|
+
}
|
|
20
|
+
if (typeof errorMsg2 === "object") {
|
|
23
21
|
return {
|
|
24
22
|
id: errorMsg2.id,
|
|
25
23
|
values: {
|
|
@@ -35,10 +33,10 @@ const ErrorInput = ({
|
|
|
35
33
|
}
|
|
36
34
|
}, [isSubmitting]);
|
|
37
35
|
const errorMsg = (error == null ? void 0 : error.message) || ((_a = error == null ? void 0 : error.root) == null ? void 0 : _a.message);
|
|
38
|
-
return
|
|
36
|
+
return errorMsg && /* @__PURE__ */ jsx("div", { ref: errorRef, children: InputField({
|
|
39
37
|
message: /* @__PURE__ */ jsx(FormattedMessage, { ...errorProps(errorMsg) })
|
|
40
|
-
}) })
|
|
41
|
-
}
|
|
38
|
+
}) });
|
|
39
|
+
}
|
|
42
40
|
export {
|
|
43
41
|
ErrorInput as default
|
|
44
42
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { default as React
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
|
|
3
3
|
interface FieldErrorAlertProps {
|
|
4
4
|
message: string | React.ReactNode;
|
|
5
5
|
}
|
|
6
|
-
declare
|
|
6
|
+
declare function FieldErrorAlert({ message }: FieldErrorAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default FieldErrorAlert;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Grid, Alert } from "@mui/material";
|
|
3
|
-
|
|
4
|
-
message
|
|
5
|
-
}) => {
|
|
3
|
+
function FieldErrorAlert({ message }) {
|
|
6
4
|
return /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: message }) });
|
|
7
|
-
}
|
|
5
|
+
}
|
|
8
6
|
export {
|
|
9
7
|
FieldErrorAlert as default
|
|
10
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
declare
|
|
3
|
+
declare function MidFormError({ message }: {
|
|
4
4
|
message: string | ReactNode;
|
|
5
|
-
})
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default MidFormError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from "@mui/material";
|
|
3
|
-
|
|
3
|
+
function MidFormError({ message }) {
|
|
4
4
|
return /* @__PURE__ */ jsx(
|
|
5
5
|
Box,
|
|
6
6
|
{
|
|
@@ -13,7 +13,7 @@ const MidFormError = ({ message }) => {
|
|
|
13
13
|
children: message
|
|
14
14
|
}
|
|
15
15
|
);
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
17
|
export {
|
|
18
18
|
MidFormError as default
|
|
19
19
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
1
|
import { TextInputProps } from '../text-input';
|
|
3
2
|
|
|
4
3
|
export type FloatInputProps = Omit<TextInputProps, 'outputTransform' | 'inputTransform' | 'acceptValue'>;
|
|
5
|
-
declare
|
|
4
|
+
declare function FloatInput(props: FloatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default FloatInput;
|
|
@@ -7,11 +7,12 @@ const normalizeFixed = (number) => {
|
|
|
7
7
|
useGrouping: false
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
function FloatInput(props) {
|
|
11
11
|
const inputTransform = (value) => {
|
|
12
|
-
if (typeof value
|
|
12
|
+
if (typeof value === "number" && !Number.isNaN(value)) {
|
|
13
13
|
return normalizeFixed(value);
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
|
+
if (typeof value === "string") {
|
|
15
16
|
if (["-", "."].includes(value)) {
|
|
16
17
|
return value;
|
|
17
18
|
}
|
|
@@ -31,7 +32,7 @@ const FloatInput = (props) => {
|
|
|
31
32
|
return tmp;
|
|
32
33
|
}
|
|
33
34
|
const parsed = parseFloat(tmp);
|
|
34
|
-
return isNaN(parsed) ? null : normalizeFixed(parsed);
|
|
35
|
+
return Number.isNaN(parsed) ? null : normalizeFixed(parsed);
|
|
35
36
|
};
|
|
36
37
|
return /* @__PURE__ */ jsx(
|
|
37
38
|
TextInput,
|
|
@@ -42,7 +43,7 @@ const FloatInput = (props) => {
|
|
|
42
43
|
...props
|
|
43
44
|
}
|
|
44
45
|
);
|
|
45
|
-
}
|
|
46
|
+
}
|
|
46
47
|
export {
|
|
47
48
|
FloatInput as default
|
|
48
49
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TextInputProps } from '../text-input';
|
|
2
2
|
|
|
3
|
-
declare
|
|
3
|
+
declare function IntegerInput(props: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default IntegerInput;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import TextInput from "../text-input.js";
|
|
3
3
|
import { isIntegerNumber } from "./utils.js";
|
|
4
|
-
|
|
4
|
+
function IntegerInput(props) {
|
|
5
5
|
const inputTransform = (value) => {
|
|
6
|
-
if ("-"
|
|
6
|
+
if (value === "-") {
|
|
7
7
|
return value;
|
|
8
8
|
}
|
|
9
|
-
return value === null || typeof value === "number" && isNaN(value) ? "" : value.toString();
|
|
9
|
+
return value === null || typeof value === "number" && Number.isNaN(value) ? "" : value.toString();
|
|
10
10
|
};
|
|
11
11
|
const outputTransform = (value) => {
|
|
12
12
|
if (value === "-") {
|
|
@@ -15,7 +15,7 @@ const IntegerInput = (props) => {
|
|
|
15
15
|
if (value === "0") {
|
|
16
16
|
return 0;
|
|
17
17
|
}
|
|
18
|
-
return parseInt(value) || null;
|
|
18
|
+
return parseInt(value, 10) || null;
|
|
19
19
|
};
|
|
20
20
|
return /* @__PURE__ */ jsx(
|
|
21
21
|
TextInput,
|
|
@@ -26,7 +26,7 @@ const IntegerInput = (props) => {
|
|
|
26
26
|
...props
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
30
|
export {
|
|
31
31
|
IntegerInput as default
|
|
32
32
|
};
|
|
@@ -10,5 +10,5 @@ type CustomFormContextProps = {
|
|
|
10
10
|
export type MergedFormContextProps = UseFormReturn<any> & CustomFormContextProps;
|
|
11
11
|
type CustomFormProviderProps = PropsWithChildren<MergedFormContextProps>;
|
|
12
12
|
export declare const CustomFormContext: React.Context<CustomFormContextProps>;
|
|
13
|
-
declare
|
|
13
|
+
declare function CustomFormProvider(props: CustomFormProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export default CustomFormProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext } from "react";
|
|
2
|
+
import React, { createContext } from "react";
|
|
3
3
|
import { FormProvider } from "react-hook-form";
|
|
4
4
|
import * as yup from "yup";
|
|
5
5
|
import { getSystemLanguage } from "../../../../hooks/localized-countries-hook.js";
|
|
@@ -8,7 +8,7 @@ const CustomFormContext = createContext({
|
|
|
8
8
|
validationSchema: yup.object(),
|
|
9
9
|
language: getSystemLanguage()
|
|
10
10
|
});
|
|
11
|
-
|
|
11
|
+
function CustomFormProvider(props) {
|
|
12
12
|
const {
|
|
13
13
|
validationSchema,
|
|
14
14
|
removeOptional,
|
|
@@ -19,15 +19,18 @@ const CustomFormProvider = (props) => {
|
|
|
19
19
|
return /* @__PURE__ */ jsx(FormProvider, { ...formMethods, children: /* @__PURE__ */ jsx(
|
|
20
20
|
CustomFormContext.Provider,
|
|
21
21
|
{
|
|
22
|
-
value:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
value: React.useMemo(
|
|
23
|
+
() => ({
|
|
24
|
+
validationSchema,
|
|
25
|
+
removeOptional,
|
|
26
|
+
language
|
|
27
|
+
}),
|
|
28
|
+
[validationSchema, removeOptional, language]
|
|
29
|
+
),
|
|
27
30
|
children
|
|
28
31
|
}
|
|
29
32
|
) });
|
|
30
|
-
}
|
|
33
|
+
}
|
|
31
34
|
export {
|
|
32
35
|
CustomFormContext,
|
|
33
36
|
CustomFormProvider as default
|
|
@@ -11,5 +11,5 @@ interface RadioInputProps {
|
|
|
11
11
|
options: RadioOptions;
|
|
12
12
|
formProps?: Omit<RadioGroupProps, 'value'>;
|
|
13
13
|
}
|
|
14
|
-
declare
|
|
14
|
+
declare function RadioInput({ name, label, id, options, formProps }: RadioInputProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export default RadioInput;
|
|
@@ -3,13 +3,7 @@ import { FormControl, FormLabel, RadioGroup, FormControlLabel, Radio } from "@mu
|
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { useController } from "react-hook-form";
|
|
5
5
|
import FieldLabel from "./utils/field-label.js";
|
|
6
|
-
|
|
7
|
-
name,
|
|
8
|
-
label,
|
|
9
|
-
id,
|
|
10
|
-
options,
|
|
11
|
-
formProps
|
|
12
|
-
}) => {
|
|
6
|
+
function RadioInput({ name, label, id, options, formProps }) {
|
|
13
7
|
const {
|
|
14
8
|
field: { onChange, value }
|
|
15
9
|
} = useController({ name });
|
|
@@ -35,7 +29,7 @@ const RadioInput = ({
|
|
|
35
29
|
}
|
|
36
30
|
)
|
|
37
31
|
] });
|
|
38
|
-
}
|
|
32
|
+
}
|
|
39
33
|
export {
|
|
40
34
|
RadioInput as default
|
|
41
35
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
1
|
import { default as yup } from '../../../utils/yup-config';
|
|
3
2
|
|
|
4
3
|
export declare const RangeType: {
|
|
@@ -50,5 +49,5 @@ interface RangeInputProps {
|
|
|
50
49
|
name: string;
|
|
51
50
|
label: string;
|
|
52
51
|
}
|
|
53
|
-
declare
|
|
52
|
+
declare function RangeInput({ name, label }: RangeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
54
53
|
export default RangeInput;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useWatch } from "react-hook-form";
|
|
3
|
-
import FloatInput from "./numbers/float-input.js";
|
|
4
|
-
import "../../../utils/yup-config.js";
|
|
5
3
|
import { FormattedMessage } from "react-intl";
|
|
6
4
|
import { useMemo } from "react";
|
|
7
5
|
import InputLabel from "@mui/material/InputLabel";
|
|
8
6
|
import { Grid } from "@mui/material";
|
|
9
7
|
import FormControl from "@mui/material/FormControl";
|
|
8
|
+
import FloatInput from "./numbers/float-input.js";
|
|
9
|
+
import "../../../utils/yup-config.js";
|
|
10
10
|
import MuiSelectInput from "./select-inputs/mui-select-input.js";
|
|
11
|
-
import
|
|
11
|
+
import FieldConstants from "../../../utils/field-constants.js";
|
|
12
12
|
import * as yup from "yup";
|
|
13
13
|
const style = {
|
|
14
14
|
inputLegend: (theme) => ({
|
|
@@ -51,7 +51,7 @@ const getRangeInputSchema = (name) => ({
|
|
|
51
51
|
[[FieldConstants.VALUE_1, FieldConstants.VALUE_2]]
|
|
52
52
|
)
|
|
53
53
|
});
|
|
54
|
-
|
|
54
|
+
function RangeInput({ name, label }) {
|
|
55
55
|
const watchOperationType = useWatch({
|
|
56
56
|
name: `${name}.${FieldConstants.OPERATION_TYPE}`
|
|
57
57
|
});
|
|
@@ -108,7 +108,7 @@ const RangeInput = ({ name, label }) => {
|
|
|
108
108
|
isOperationTypeRange && /* @__PURE__ */ jsx(Grid, { item: true, children: secondValueField })
|
|
109
109
|
] })
|
|
110
110
|
] });
|
|
111
|
-
}
|
|
111
|
+
}
|
|
112
112
|
export {
|
|
113
113
|
DEFAULT_RANGE_VALUE,
|
|
114
114
|
RangeType,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
declare function RawReadOnlyInput({ name }: {
|
|
8
8
|
name: string;
|
|
9
9
|
}): any;
|
|
10
|
+
export default RawReadOnlyInput;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
|
|
3
1
|
interface CountryInputProps {
|
|
4
2
|
name: string;
|
|
5
3
|
label: string;
|
|
6
4
|
}
|
|
7
|
-
declare
|
|
5
|
+
declare function CountriesInput({ name, label }: CountryInputProps): import("react/jsx-runtime").JSX.Element;
|
|
8
6
|
export default CountriesInput;
|
|
@@ -3,20 +3,16 @@ import { useCallback } from "react";
|
|
|
3
3
|
import { Chip } from "@mui/material";
|
|
4
4
|
import AutocompleteInput from "../autocomplete-inputs/autocomplete-input.js";
|
|
5
5
|
import { useLocalizedCountries } from "../../../../hooks/localized-countries-hook.js";
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
name,
|
|
9
|
-
label
|
|
10
|
-
}) => {
|
|
6
|
+
import useCustomFormContext from "../provider/use-custom-form-context.js";
|
|
7
|
+
function CountriesInput({ name, label }) {
|
|
11
8
|
const { language } = useCustomFormContext();
|
|
12
9
|
const { translate, countryCodes } = useLocalizedCountries(language);
|
|
13
10
|
const translateOption = useCallback(
|
|
14
11
|
(option) => {
|
|
15
12
|
if (typeof option === "string") {
|
|
16
13
|
return translate(option);
|
|
17
|
-
} else {
|
|
18
|
-
return translate(option.label);
|
|
19
14
|
}
|
|
15
|
+
return translate(option.label);
|
|
20
16
|
},
|
|
21
17
|
[translate]
|
|
22
18
|
);
|
|
@@ -40,7 +36,7 @@ const CountriesInput = ({
|
|
|
40
36
|
))
|
|
41
37
|
}
|
|
42
38
|
);
|
|
43
|
-
}
|
|
39
|
+
}
|
|
44
40
|
export {
|
|
45
41
|
CountriesInput as default
|
|
46
42
|
};
|
package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare function InputWithPopupConfirmation({ Input, name, shouldOpenPopup, // condition to open popup confirmation
|
|
2
|
+
resetOnConfirmation, // function to reset values in your form on confirmation,
|
|
3
|
+
message, validateButtonLabel, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
2
4
|
export default InputWithPopupConfirmation;
|
package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useController } from "react-hook-form";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import PopupConfirmationDialog from "../../../dialogs/popup-confirmation-dialog.js";
|
|
5
|
-
|
|
5
|
+
function InputWithPopupConfirmation({
|
|
6
6
|
Input,
|
|
7
7
|
name,
|
|
8
8
|
shouldOpenPopup,
|
|
@@ -12,7 +12,7 @@ const InputWithPopupConfirmation = ({
|
|
|
12
12
|
message,
|
|
13
13
|
validateButtonLabel,
|
|
14
14
|
...props
|
|
15
|
-
})
|
|
15
|
+
}) {
|
|
16
16
|
const [newValue, setNewValue] = useState(null);
|
|
17
17
|
const [openPopup, setOpenPopup] = useState(false);
|
|
18
18
|
const {
|
|
@@ -29,7 +29,7 @@ const InputWithPopupConfirmation = ({
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
const handlePopupConfirmation = () => {
|
|
32
|
-
resetOnConfirmation
|
|
32
|
+
resetOnConfirmation == null ? void 0 : resetOnConfirmation();
|
|
33
33
|
onChange(newValue);
|
|
34
34
|
setOpenPopup(false);
|
|
35
35
|
};
|
|
@@ -55,7 +55,7 @@ const InputWithPopupConfirmation = ({
|
|
|
55
55
|
}
|
|
56
56
|
)
|
|
57
57
|
] });
|
|
58
|
-
}
|
|
58
|
+
}
|
|
59
59
|
export {
|
|
60
60
|
InputWithPopupConfirmation as default
|
|
61
61
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
1
|
import { SelectProps } from '@mui/material';
|
|
3
2
|
|
|
4
3
|
interface MuiSelectInputProps {
|
|
@@ -8,5 +7,5 @@ interface MuiSelectInputProps {
|
|
|
8
7
|
label: string;
|
|
9
8
|
}[];
|
|
10
9
|
}
|
|
11
|
-
declare
|
|
10
|
+
declare function MuiSelectInput({ name, options, ...props }: MuiSelectInputProps & SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default MuiSelectInput;
|