@gridsuite/commons-ui 0.61.4 → 0.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AuthenticationRouter/AuthenticationRouter.d.ts +1 -1
- package/dist/components/AuthenticationRouter/AuthenticationRouter.js +5 -5
- package/dist/components/AuthenticationRouter/index.d.ts +3 -7
- package/dist/components/AuthenticationRouter/index.js +2 -2
- package/dist/components/CardErrorBoundary/card-error-boundary.d.ts +0 -1
- package/dist/components/CardErrorBoundary/card-error-boundary.js +5 -3
- package/dist/components/CardErrorBoundary/index.d.ts +3 -7
- package/dist/components/CardErrorBoundary/index.js +2 -2
- package/dist/components/CustomAGGrid/custom-aggrid.js +1 -1
- package/dist/components/CustomAGGrid/custom-aggrid.style.js +5 -5
- package/dist/components/DirectoryItemSelector/directory-item-selector.d.ts +2 -3
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +108 -105
- package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +1 -1
- package/dist/components/ElementSearchDialog/element-search-dialog.js +2 -2
- package/dist/components/ElementSearchDialog/element-search-input.d.ts +1 -1
- package/dist/components/ElementSearchDialog/element-search-input.js +4 -6
- package/dist/components/ElementSearchDialog/equipment-item.d.ts +3 -3
- package/dist/components/ElementSearchDialog/equipment-item.js +13 -13
- package/dist/components/ElementSearchDialog/index.d.ts +3 -3
- package/dist/components/ElementSearchDialog/index.js +5 -5
- package/dist/components/ElementSearchDialog/tag-renderer.d.ts +11 -12
- package/dist/components/ElementSearchDialog/tag-renderer.js +5 -6
- package/dist/components/ElementSearchDialog/use-element-search.d.ts +2 -2
- package/dist/components/ElementSearchDialog/use-element-search.js +2 -2
- package/dist/components/ExpandableGroup/expandable-group.d.ts +3 -3
- package/dist/components/ExpandableGroup/expandable-group.js +6 -6
- package/dist/components/ExpandableGroup/index.d.ts +3 -7
- package/dist/components/ExpandableGroup/index.js +2 -2
- package/dist/components/FlatParameters/FlatParameters.d.ts +1 -1
- package/dist/components/FlatParameters/FlatParameters.js +46 -46
- package/dist/components/FlatParameters/index.d.ts +3 -7
- package/dist/components/Login/Login.d.ts +1 -7
- package/dist/components/Login/Login.js +3 -9
- package/dist/components/Login/Logout.d.ts +1 -1
- package/dist/components/Login/Logout.js +11 -11
- package/dist/components/Login/index.d.ts +3 -7
- package/dist/components/Login/index.js +2 -2
- package/dist/components/MuiVirtualizedTable/ColumnHeader.js +9 -8
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.d.ts +24 -9
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +200 -205
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +6 -6
- package/dist/components/MuiVirtualizedTable/index.d.ts +2 -2
- package/dist/components/MuiVirtualizedTable/index.js +3 -3
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.d.ts +1 -1
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +5 -15
- package/dist/components/MultipleSelectionDialog/index.d.ts +3 -7
- package/dist/components/MultipleSelectionDialog/index.js +2 -2
- package/dist/components/OverflowableText/index.d.ts +3 -7
- package/dist/components/OverflowableText/overflowable-text.js +2 -2
- package/dist/components/ReportViewer/filter-button.d.ts +1 -1
- package/dist/components/ReportViewer/filter-button.js +3 -3
- package/dist/components/ReportViewer/index.d.ts +3 -7
- package/dist/components/ReportViewer/index.js +2 -2
- package/dist/components/ReportViewer/log-report-item.d.ts +1 -1
- package/dist/components/ReportViewer/log-report-item.js +12 -9
- package/dist/components/ReportViewer/log-report.js +3 -3
- package/dist/components/ReportViewer/log-table.d.ts +2 -1
- package/dist/components/ReportViewer/log-table.js +6 -5
- package/dist/components/ReportViewer/multi-select-list.d.ts +1 -1
- package/dist/components/ReportViewer/multi-select-list.js +3 -3
- package/dist/components/ReportViewer/report-item.js +4 -3
- package/dist/components/ReportViewer/report-viewer.js +11 -12
- package/dist/components/ReportViewerDialog/index.d.ts +3 -7
- package/dist/components/ReportViewerDialog/index.js +2 -2
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +1 -1
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +3 -3
- package/dist/components/SignInCallbackHandler/index.d.ts +3 -7
- package/dist/components/SignInCallbackHandler/index.js +2 -2
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +1 -1
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +3 -3
- package/dist/components/SilentRenewCallbackHandler/index.d.ts +3 -7
- package/dist/components/SilentRenewCallbackHandler/index.js +2 -2
- package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +1 -1
- package/dist/components/SnackbarProvider/SnackbarProvider.js +14 -13
- package/dist/components/SnackbarProvider/index.d.ts +3 -7
- package/dist/components/SnackbarProvider/index.js +2 -2
- package/dist/components/TopBar/AboutDialog.d.ts +1 -2
- package/dist/components/TopBar/AboutDialog.js +151 -153
- package/dist/components/TopBar/GridLogo.d.ts +2 -2
- package/dist/components/TopBar/GridLogo.js +24 -24
- package/dist/components/TopBar/TopBar.d.ts +2 -27
- package/dist/components/TopBar/TopBar.js +9 -33
- package/dist/components/TopBar/index.d.ts +1 -1
- package/dist/components/TopBar/index.js +1 -1
- package/dist/components/TreeViewFinder/TreeViewFinder.js +51 -45
- package/dist/components/TreeViewFinder/index.d.ts +1 -1
- package/dist/components/TreeViewFinder/index.js +1 -1
- package/dist/components/dialogs/custom-mui-dialog.d.ts +2 -2
- package/dist/components/dialogs/custom-mui-dialog.js +5 -5
- package/dist/components/dialogs/description-modification-dialog.d.ts +7 -3
- package/dist/components/dialogs/description-modification-dialog.js +11 -5
- package/dist/components/dialogs/modify-element-selection.d.ts +1 -2
- package/dist/components/dialogs/modify-element-selection.js +21 -13
- package/dist/components/dialogs/popup-confirmation-dialog.d.ts +7 -3
- package/dist/components/dialogs/popup-confirmation-dialog.js +3 -6
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.d.ts +4 -5
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +123 -16
- package/dist/components/filter/criteria-based/criteria-based-filter-form.d.ts +1 -2
- package/dist/components/filter/criteria-based/criteria-based-filter-form.js +6 -5
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +27 -20
- package/dist/components/filter/criteria-based/criteria-based-form.d.ts +1 -2
- package/dist/components/filter/criteria-based/criteria-based-form.js +17 -6
- package/dist/components/filter/criteria-based/filter-free-properties.d.ts +5 -3
- package/dist/components/filter/criteria-based/filter-free-properties.js +69 -13
- package/dist/components/filter/criteria-based/filter-properties.d.ts +1 -6
- package/dist/components/filter/criteria-based/filter-properties.js +124 -16
- package/dist/components/filter/criteria-based/filter-property.d.ts +1 -2
- package/dist/components/filter/criteria-based/filter-property.js +16 -16
- package/dist/components/filter/expert/expert-filter-constants.d.ts +1 -1
- package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +3 -4
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +128 -15
- package/dist/components/filter/expert/expert-filter-form.d.ts +1 -2
- package/dist/components/filter/expert/expert-filter-form.js +141 -20
- package/dist/components/filter/expert/expert-filter-utils.d.ts +2 -2
- package/dist/components/filter/expert/expert-filter-utils.js +45 -46
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.d.ts +3 -4
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +136 -16
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +4 -5
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +241 -24
- package/dist/components/filter/filter-creation-dialog.d.ts +3 -4
- package/dist/components/filter/filter-creation-dialog.js +125 -13
- package/dist/components/filter/filter-form.d.ts +4 -5
- package/dist/components/filter/filter-form.js +73 -14
- package/dist/components/filter/utils/filter-api.js +1 -1
- package/dist/components/filter/utils/filter-form-utils.js +1 -1
- package/dist/components/inputs/react-hook-form/ExpandingTextField.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/ExpandingTextField.js +5 -5
- package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +102 -13
- package/dist/components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.d.ts +7 -6
- package/dist/components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.js +13 -15
- package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.d.ts +7 -3
- package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +220 -61
- package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +243 -11
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.d.ts +4 -2
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js +12 -12
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js +2 -2
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.js +2 -2
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.js +3 -3
- package/dist/components/inputs/react-hook-form/booleans/switch-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/switch-input.js +3 -3
- package/dist/components/inputs/react-hook-form/directory-items-input.d.ts +11 -3
- package/dist/components/inputs/react-hook-form/directory-items-input.js +11 -11
- package/dist/components/inputs/react-hook-form/error-management/error-input.d.ts +2 -2
- package/dist/components/inputs/react-hook-form/error-management/error-input.js +7 -9
- package/dist/components/inputs/react-hook-form/error-management/field-error-alert.d.ts +2 -2
- package/dist/components/inputs/react-hook-form/error-management/field-error-alert.js +2 -4
- package/dist/components/inputs/react-hook-form/error-management/mid-form-error.d.ts +2 -2
- package/dist/components/inputs/react-hook-form/error-management/mid-form-error.js +2 -2
- package/dist/components/inputs/react-hook-form/numbers/float-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/numbers/float-input.js +6 -5
- package/dist/components/inputs/react-hook-form/numbers/integer-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/numbers/integer-input.js +5 -5
- package/dist/components/inputs/react-hook-form/provider/custom-form-provider.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/provider/custom-form-provider.js +11 -8
- package/dist/components/inputs/react-hook-form/provider/use-custom-form-context.d.ts +2 -1
- package/dist/components/inputs/react-hook-form/provider/use-custom-form-context.js +1 -1
- package/dist/components/inputs/react-hook-form/radio-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/radio-input.js +2 -8
- package/dist/components/inputs/react-hook-form/range-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/range-input.js +5 -5
- package/dist/components/inputs/react-hook-form/raw-read-only-input.d.ts +2 -1
- package/dist/components/inputs/react-hook-form/raw-read-only-input.js +1 -1
- package/dist/components/inputs/react-hook-form/select-inputs/countries-input.d.ts +1 -3
- package/dist/components/inputs/react-hook-form/select-inputs/countries-input.js +4 -8
- package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.d.ts +3 -1
- package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js +4 -4
- package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.js +11 -10
- package/dist/components/inputs/react-hook-form/select-inputs/select-input.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/select-inputs/select-input.js +16 -8
- package/dist/components/inputs/react-hook-form/slider-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/slider-input.js +6 -6
- package/dist/components/inputs/react-hook-form/text-input.d.ts +6 -2
- package/dist/components/inputs/react-hook-form/text-input.js +9 -9
- package/dist/components/inputs/react-hook-form/unique-name-input.d.ts +4 -6
- package/dist/components/inputs/react-hook-form/unique-name-input.js +12 -12
- package/dist/components/inputs/react-hook-form/utils/cancel-button.d.ts +9 -10
- package/dist/components/inputs/react-hook-form/utils/cancel-button.js +2 -6
- package/dist/components/inputs/react-hook-form/utils/field-label.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/utils/field-label.js +3 -3
- package/dist/components/inputs/react-hook-form/utils/functions.js +1 -1
- package/dist/components/inputs/react-hook-form/utils/submit-button.d.ts +9 -10
- package/dist/components/inputs/react-hook-form/utils/submit-button.js +2 -6
- package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.d.ts +1 -2
- package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.js +7 -7
- package/dist/components/inputs/react-query-builder/add-button.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/add-button.js +13 -10
- package/dist/components/inputs/react-query-builder/combinator-selector.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/combinator-selector.js +7 -6
- package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.js +2 -2
- package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.js +5 -5
- package/dist/components/inputs/react-query-builder/country-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/country-value-editor.js +18 -18
- package/dist/components/inputs/react-query-builder/custom-react-query-builder.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +92 -19
- package/dist/components/inputs/react-query-builder/element-value-editor.d.ts +7 -3
- package/dist/components/inputs/react-query-builder/element-value-editor.js +50 -62
- package/dist/components/inputs/react-query-builder/property-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/property-value-editor.js +5 -5
- package/dist/components/inputs/react-query-builder/remove-button.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/remove-button.js +26 -7
- package/dist/components/inputs/react-query-builder/text-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/text-value-editor.js +17 -17
- package/dist/components/inputs/react-query-builder/translated-value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/translated-value-editor.js +22 -26
- package/dist/components/inputs/react-query-builder/value-editor.d.ts +1 -2
- package/dist/components/inputs/react-query-builder/value-editor.js +119 -18
- package/dist/components/inputs/react-query-builder/value-selector.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/value-selector.js +2 -2
- package/dist/components/inputs/select-clearable.d.ts +1 -2
- package/dist/components/inputs/select-clearable.js +6 -5
- package/dist/components/translations/card-error-boundary-en.d.ts +2 -2
- package/dist/components/translations/card-error-boundary-en.js +2 -2
- package/dist/components/translations/card-error-boundary-fr.d.ts +2 -2
- package/dist/components/translations/card-error-boundary-fr.js +2 -2
- package/dist/components/translations/common-button-en.d.ts +2 -2
- package/dist/components/translations/common-button-en.js +2 -2
- package/dist/components/translations/common-button-fr.d.ts +2 -2
- package/dist/components/translations/common-button-fr.js +2 -2
- package/dist/components/translations/directory-items-input-en.d.ts +2 -2
- package/dist/components/translations/directory-items-input-en.js +2 -2
- package/dist/components/translations/directory-items-input-fr.d.ts +2 -2
- package/dist/components/translations/directory-items-input-fr.js +2 -2
- package/dist/components/translations/element-search-en.d.ts +2 -2
- package/dist/components/translations/element-search-en.js +2 -2
- package/dist/components/translations/element-search-fr.d.ts +2 -2
- package/dist/components/translations/element-search-fr.js +2 -2
- package/dist/components/translations/equipment-search-en.d.ts +2 -2
- package/dist/components/translations/equipment-search-en.js +2 -2
- package/dist/components/translations/equipment-search-fr.d.ts +2 -2
- package/dist/components/translations/equipment-search-fr.js +2 -2
- package/dist/components/translations/filter-en.d.ts +3 -2
- package/dist/components/translations/filter-en.js +3 -2
- package/dist/components/translations/filter-expert-en.d.ts +2 -2
- package/dist/components/translations/filter-expert-en.js +2 -2
- package/dist/components/translations/filter-expert-fr.d.ts +2 -2
- package/dist/components/translations/filter-expert-fr.js +2 -2
- package/dist/components/translations/filter-fr.d.ts +3 -2
- package/dist/components/translations/filter-fr.js +3 -2
- package/dist/components/translations/flat-parameters-en.d.ts +2 -2
- package/dist/components/translations/flat-parameters-en.js +2 -2
- package/dist/components/translations/flat-parameters-fr.d.ts +2 -2
- package/dist/components/translations/flat-parameters-fr.js +2 -2
- package/dist/components/translations/inputs-en.d.ts +2 -2
- package/dist/components/translations/inputs-en.js +2 -2
- package/dist/components/translations/inputs-fr.d.ts +2 -2
- package/dist/components/translations/inputs-fr.js +2 -2
- package/dist/components/translations/login-en.d.ts +2 -2
- package/dist/components/translations/login-en.js +2 -2
- package/dist/components/translations/login-fr.d.ts +2 -2
- package/dist/components/translations/login-fr.js +2 -2
- package/dist/components/translations/multiple-selection-dialog-en.d.ts +2 -2
- package/dist/components/translations/multiple-selection-dialog-en.js +2 -2
- package/dist/components/translations/multiple-selection-dialog-fr.d.ts +2 -2
- package/dist/components/translations/multiple-selection-dialog-fr.js +2 -2
- package/dist/components/translations/report-viewer-en.d.ts +2 -2
- package/dist/components/translations/report-viewer-en.js +2 -2
- package/dist/components/translations/report-viewer-fr.d.ts +2 -2
- package/dist/components/translations/report-viewer-fr.js +2 -2
- package/dist/components/translations/table-en.d.ts +2 -2
- package/dist/components/translations/table-en.js +2 -2
- package/dist/components/translations/table-fr.d.ts +2 -2
- package/dist/components/translations/table-fr.js +2 -2
- package/dist/components/translations/top-bar-en.d.ts +2 -2
- package/dist/components/translations/top-bar-en.js +2 -2
- package/dist/components/translations/top-bar-fr.d.ts +2 -2
- package/dist/components/translations/top-bar-fr.js +2 -2
- package/dist/components/translations/treeview-finder-en.d.ts +2 -2
- package/dist/components/translations/treeview-finder-en.js +2 -2
- package/dist/components/translations/treeview-finder-fr.d.ts +2 -2
- package/dist/components/translations/treeview-finder-fr.js +2 -2
- package/dist/hooks/localized-countries-hook.js +1 -1
- package/dist/hooks/predefined-properties-hook.d.ts +2 -1
- package/dist/hooks/predefined-properties-hook.js +2 -2
- package/dist/hooks/useDebounce.d.ts +2 -1
- package/dist/hooks/useDebounce.js +1 -1
- package/dist/hooks/useIntlRef.d.ts +2 -1
- package/dist/hooks/useIntlRef.js +1 -1
- package/dist/hooks/useSnackMessage.d.ts +2 -2
- package/dist/hooks/useSnackMessage.js +36 -36
- package/dist/index.d.ts +13 -14
- package/dist/index.js +163 -157
- package/dist/redux/commonStore.d.ts +1 -1
- package/dist/services/apps-metadata.js +1 -1
- package/dist/services/directory.js +6 -6
- package/dist/services/explore.js +14 -12
- package/dist/services/index.d.ts +0 -5
- package/dist/services/study.js +2 -2
- package/dist/services/utils.d.ts +1 -1
- package/dist/services/utils.js +26 -26
- package/dist/utils/AuthService.d.ts +21 -12
- package/dist/utils/AuthService.js +88 -143
- package/dist/utils/ElementIcon.d.ts +3 -2
- package/dist/utils/ElementIcon.js +4 -3
- package/dist/utils/ElementType.d.ts +3 -6
- package/dist/utils/EquipmentType.js +3 -3
- package/dist/utils/FetchStatus.d.ts +2 -1
- package/dist/utils/FetchStatus.js +1 -1
- package/dist/utils/Metadata.d.ts +15 -0
- package/dist/utils/Metadata.js +1 -0
- package/dist/utils/UserManagerMock.d.ts +50 -25
- package/dist/utils/UserManagerMock.js +118 -11
- package/dist/utils/algos.d.ts +2 -1
- package/dist/utils/algos.js +2 -2
- package/dist/utils/equipment-types-for-predefined-properties-mapper.d.ts +2 -1
- package/dist/utils/equipment-types-for-predefined-properties-mapper.js +3 -1
- package/dist/utils/field-constants.d.ts +2 -1
- package/dist/utils/field-constants.js +1 -1
- package/dist/utils/functions.js +5 -2
- package/dist/utils/types.d.ts +1 -1
- package/dist/utils/yup-config.js +1 -2
- package/package.json +10 -4
- package/dist/chunks/criteria-based-filter-edition-dialog.CAT38SvB.js +0 -1694
- package/dist/chunks/filter-properties.B7-q_yPf.js +0 -195
- /package/dist/assets/{criteria-based-filter-edition-dialog.css → expert-filter-form.css} +0 -0
|
@@ -26,5 +26,5 @@ export interface AuthenticationRouterProps {
|
|
|
26
26
|
navigate: NavigateFunction;
|
|
27
27
|
location: Location;
|
|
28
28
|
}
|
|
29
|
-
declare
|
|
29
|
+
declare function AuthenticationRouter({ userManager, signInCallbackError, authenticationRouterError, showAuthenticationRouterLogin, dispatch, navigate, location, }: Readonly<AuthenticationRouterProps>): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export default AuthenticationRouter;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import { Routes, Route, Navigate } from "react-router-dom";
|
|
4
|
+
import { Grid, Alert, AlertTitle } from "@mui/material";
|
|
5
|
+
import { FormattedMessage } from "react-intl";
|
|
4
6
|
import SignInCallbackHandler from "../SignInCallbackHandler/SignInCallbackHandler.js";
|
|
5
7
|
import { handleSigninCallback, handleSilentRenewCallback, login, logout } from "../../utils/AuthService.js";
|
|
6
8
|
import SilentRenewCallbackHandler from "../SilentRenewCallbackHandler/SilentRenewCallbackHandler.js";
|
|
7
9
|
import Login from "../Login/Login.js";
|
|
8
10
|
import Logout from "../Login/Logout.js";
|
|
9
|
-
|
|
10
|
-
import { FormattedMessage } from "react-intl";
|
|
11
|
-
const AuthenticationRouter = ({
|
|
11
|
+
function AuthenticationRouter({
|
|
12
12
|
userManager,
|
|
13
13
|
signInCallbackError,
|
|
14
14
|
authenticationRouterError,
|
|
@@ -16,7 +16,7 @@ const AuthenticationRouter = ({
|
|
|
16
16
|
dispatch,
|
|
17
17
|
navigate,
|
|
18
18
|
location
|
|
19
|
-
})
|
|
19
|
+
}) {
|
|
20
20
|
const handleSigninCallbackClosure = useCallback(() => {
|
|
21
21
|
if (userManager.instance != null) {
|
|
22
22
|
handleSigninCallback(dispatch, navigate, userManager.instance);
|
|
@@ -137,7 +137,7 @@ const AuthenticationRouter = ({
|
|
|
137
137
|
]
|
|
138
138
|
}
|
|
139
139
|
);
|
|
140
|
-
}
|
|
140
|
+
}
|
|
141
141
|
export {
|
|
142
142
|
AuthenticationRouter as default
|
|
143
143
|
};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
-
*/
|
|
7
|
-
export { default } from './AuthenticationRouter';
|
|
1
|
+
import { default as AuthenticationRouter } from './AuthenticationRouter';
|
|
2
|
+
|
|
3
|
+
export default AuthenticationRouter;
|
|
8
4
|
export type { AuthenticationRouterErrorState, AuthenticationRouterProps, UserManagerState, } from './AuthenticationRouter';
|
|
@@ -18,7 +18,6 @@ type CardErrorBoundaryState = (CardErrorBoundaryStateError | CardErrorBoundarySt
|
|
|
18
18
|
expanded: boolean;
|
|
19
19
|
};
|
|
20
20
|
declare class CardErrorBoundary extends Component<Props, CardErrorBoundaryState> {
|
|
21
|
-
state: CardErrorBoundaryState;
|
|
22
21
|
constructor(props: Props);
|
|
23
22
|
static getDerivedStateFromError(error: Error): {
|
|
24
23
|
hasError: boolean;
|
|
@@ -35,14 +35,16 @@ class CardErrorBoundary extends Component {
|
|
|
35
35
|
}));
|
|
36
36
|
}
|
|
37
37
|
handleReloadClick() {
|
|
38
|
-
this.setState((
|
|
38
|
+
this.setState(() => ({
|
|
39
39
|
hasError: false,
|
|
40
40
|
expanded: false,
|
|
41
41
|
error: void 0
|
|
42
42
|
}));
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
|
|
45
|
+
const { hasError } = this.state;
|
|
46
|
+
const { children } = this.props;
|
|
47
|
+
if (hasError) {
|
|
46
48
|
const { error, expanded } = this.state;
|
|
47
49
|
return /* @__PURE__ */ jsx(Box, { sx: { p: 4 }, children: /* @__PURE__ */ jsxs(Card, { sx: { mx: "auto", maxWidth: 600 }, children: [
|
|
48
50
|
/* @__PURE__ */ jsx(
|
|
@@ -103,7 +105,7 @@ class CardErrorBoundary extends Component {
|
|
|
103
105
|
] }) })
|
|
104
106
|
] }) });
|
|
105
107
|
}
|
|
106
|
-
return
|
|
108
|
+
return children;
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
111
|
export {
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
-
*/
|
|
7
|
-
export { default } from './card-error-boundary';
|
|
1
|
+
import { default as defaultCardErrorBoundary } from './card-error-boundary';
|
|
2
|
+
|
|
3
|
+
export default defaultCardErrorBoundary;
|
|
@@ -5,8 +5,8 @@ import { useIntl } from "react-intl";
|
|
|
5
5
|
import "ag-grid-community/styles/ag-grid.css";
|
|
6
6
|
import "ag-grid-community/styles/ag-theme-alpine.css";
|
|
7
7
|
import { Box } from "@mui/system";
|
|
8
|
-
import { mergeSx } from "../../utils/styles.js";
|
|
9
8
|
import { useTheme } from "@mui/material";
|
|
9
|
+
import { mergeSx } from "../../utils/styles.js";
|
|
10
10
|
import { CUSTOM_AGGRID_THEME, styles } from "./custom-aggrid.style.js";
|
|
11
11
|
const onColumnResized = (params) => {
|
|
12
12
|
var _a;
|
|
@@ -11,19 +11,19 @@ const styles = {
|
|
|
11
11
|
},
|
|
12
12
|
"& .ag-checkbox-input": {
|
|
13
13
|
cursor: "pointer",
|
|
14
|
-
//Enlarge checkbox area to be more permissive when selecting it
|
|
14
|
+
// Enlarge checkbox area to be more permissive when selecting it
|
|
15
15
|
scale: "2.5"
|
|
16
16
|
},
|
|
17
|
-
//overrides the default computed max height for ag grid default selector editor to make it more usable
|
|
18
|
-
//can be removed if a custom selector editor is implemented
|
|
17
|
+
// overrides the default computed max height for ag grid default selector editor to make it more usable
|
|
18
|
+
// can be removed if a custom selector editor is implemented
|
|
19
19
|
"& .ag-select-list": {
|
|
20
20
|
maxHeight: "300px !important"
|
|
21
21
|
},
|
|
22
|
-
//allows to hide the scrollbar in the pinned rows section as it is unecessary to our implementation
|
|
22
|
+
// allows to hide the scrollbar in the pinned rows section as it is unecessary to our implementation
|
|
23
23
|
"& .ag-body-horizontal-scroll:not(.ag-scrollbar-invisible) .ag-horizontal-left-spacer:not(.ag-scroller-corner)": {
|
|
24
24
|
visibility: "hidden"
|
|
25
25
|
},
|
|
26
|
-
//removes border on focused cell - using "suppressCellFocus" Aggrid option causes side effects and breaks field edition
|
|
26
|
+
// removes border on focused cell - using "suppressCellFocus" Aggrid option causes side effects and breaks field edition
|
|
27
27
|
"& .ag-cell-focus, .ag-cell": {
|
|
28
28
|
border: "none !important"
|
|
29
29
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { UUID } from 'crypto';
|
|
2
1
|
import { TreeViewFinderProps } from '../TreeViewFinder/TreeViewFinder';
|
|
3
|
-
import {
|
|
2
|
+
import { UUID } from 'crypto';
|
|
4
3
|
|
|
5
4
|
interface DirectoryItemSelectorProps extends TreeViewFinderProps {
|
|
6
5
|
open: boolean;
|
|
@@ -18,5 +17,5 @@ interface DirectoryItemSelectorProps extends TreeViewFinderProps {
|
|
|
18
17
|
multiselect?: boolean;
|
|
19
18
|
expanded?: UUID[];
|
|
20
19
|
}
|
|
21
|
-
declare
|
|
20
|
+
declare function DirectoryItemSelector({ open, types, equipmentTypes, itemFilter, expanded, ...otherTreeViewFinderProps }: DirectoryItemSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
22
21
|
export default DirectoryItemSelector;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useRef, useCallback, useEffect } from "react";
|
|
3
|
-
import
|
|
3
|
+
import getFileIcon from "../../utils/ElementIcon.js";
|
|
4
4
|
import { ElementType } from "../../utils/ElementType.js";
|
|
5
5
|
import TreeViewFinder from "../TreeViewFinder/TreeViewFinder.js";
|
|
6
6
|
import { useSnackMessage } from "../../hooks/useSnackMessage.js";
|
|
@@ -13,14 +13,113 @@ const styles = {
|
|
|
13
13
|
height: "18px"
|
|
14
14
|
})
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
function sameRights(a, b) {
|
|
17
|
+
if (!a && !b) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
if (!a || !b) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
return a.isPrivate === b.isPrivate;
|
|
24
|
+
}
|
|
25
|
+
function flattenDownNodes(n, cef) {
|
|
26
|
+
const subs = cef(n);
|
|
27
|
+
if (subs.length === 0) {
|
|
28
|
+
return [n];
|
|
29
|
+
}
|
|
30
|
+
return Array.prototype.concat(
|
|
31
|
+
[n],
|
|
32
|
+
...subs.map((sn) => flattenDownNodes(sn, cef))
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
function refreshedUpNodes(m, nn) {
|
|
36
|
+
if (!(nn == null ? void 0 : nn.elementUuid)) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
if (nn.parentUuid === null) {
|
|
40
|
+
return [nn];
|
|
41
|
+
}
|
|
42
|
+
const parent = m[nn.parentUuid];
|
|
43
|
+
const nextChildren = parent.children.map(
|
|
44
|
+
(c) => c.elementUuid === nn.elementUuid ? nn : c
|
|
45
|
+
);
|
|
46
|
+
const nextParent = { ...parent, children: nextChildren };
|
|
47
|
+
return [nn, ...refreshedUpNodes(m, nextParent)];
|
|
48
|
+
}
|
|
49
|
+
function updatedTree(prevRoots, prevMap, nodeId, children) {
|
|
50
|
+
var _a;
|
|
51
|
+
const nextChildren = children.sort((a, b) => a.elementName.localeCompare(b.elementName)).map((n) => {
|
|
52
|
+
const pn = prevMap[n.elementUuid];
|
|
53
|
+
if (!pn) {
|
|
54
|
+
return { ...n, children: [], parentUuid: nodeId };
|
|
55
|
+
}
|
|
56
|
+
if (n.elementName === pn.elementName && sameRights(n.accessRights, pn.accessRights) && n.subdirectoriesCount === pn.subdirectoriesCount && nodeId === pn.parentUuid) {
|
|
57
|
+
return pn;
|
|
58
|
+
}
|
|
59
|
+
if (pn.parentUuid !== nodeId) {
|
|
60
|
+
console.warn(`reparent ${pn.parentUuid} -> ${nodeId}`);
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
...pn,
|
|
64
|
+
elementName: n.elementName,
|
|
65
|
+
accessRights: n.accessRights,
|
|
66
|
+
subdirectoriesCount: n.subdirectoriesCount,
|
|
67
|
+
parentUuid: nodeId
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
const prevChildren = nodeId ? (_a = prevMap[nodeId]) == null ? void 0 : _a.children : prevRoots;
|
|
71
|
+
if ((prevChildren == null ? void 0 : prevChildren.length) === nextChildren.length && prevChildren.every((e, i) => e === nextChildren[i])) {
|
|
72
|
+
return [prevRoots, prevMap];
|
|
73
|
+
}
|
|
74
|
+
const nextUuids = new Set(
|
|
75
|
+
children ? children.map((n) => n.elementUuid) : []
|
|
76
|
+
);
|
|
77
|
+
const prevUuids = prevChildren ? prevChildren.map((n) => n.elementUuid) : [];
|
|
78
|
+
const mayNodeId = nodeId ? [nodeId] : [];
|
|
79
|
+
const nonCopyUuids = /* @__PURE__ */ new Set([
|
|
80
|
+
...nextUuids,
|
|
81
|
+
...mayNodeId,
|
|
82
|
+
...Array.prototype.concat(
|
|
83
|
+
...prevUuids.filter((u) => !nextUuids.has(u)).map(
|
|
84
|
+
(u) => flattenDownNodes(prevMap[u], (n) => n.children).map(
|
|
85
|
+
(n) => n.elementUuid
|
|
86
|
+
)
|
|
87
|
+
)
|
|
88
|
+
)
|
|
89
|
+
]);
|
|
90
|
+
const prevNode = nodeId ? prevMap[nodeId] : {};
|
|
91
|
+
const nextNode = {
|
|
92
|
+
elementUuid: nodeId,
|
|
93
|
+
parentUuid: null,
|
|
94
|
+
...prevNode,
|
|
95
|
+
children: nextChildren,
|
|
96
|
+
subdirectoriesCount: nextChildren.length
|
|
97
|
+
};
|
|
98
|
+
const nextMap = Object.fromEntries([
|
|
99
|
+
...Object.entries(prevMap).filter(([k]) => !nonCopyUuids.has(k)),
|
|
100
|
+
...nextChildren.map((n) => [n.elementUuid, n]),
|
|
101
|
+
...refreshedUpNodes(prevMap, nextNode).map((n) => [n.elementUuid, n])
|
|
102
|
+
]);
|
|
103
|
+
const nextRoots = nodeId === null ? nextChildren : prevRoots.map((r) => nextMap[r.elementUuid]);
|
|
104
|
+
return [nextRoots, nextMap];
|
|
105
|
+
}
|
|
106
|
+
function sortHandlingDirectories(a, b) {
|
|
107
|
+
if (a.children && !b.children) {
|
|
108
|
+
return -1;
|
|
109
|
+
}
|
|
110
|
+
if (b.children && !a.children) {
|
|
111
|
+
return 1;
|
|
112
|
+
}
|
|
113
|
+
return a.name.localeCompare(b.name);
|
|
114
|
+
}
|
|
115
|
+
function DirectoryItemSelector({
|
|
17
116
|
open,
|
|
18
117
|
types,
|
|
19
118
|
equipmentTypes,
|
|
20
119
|
itemFilter,
|
|
21
120
|
expanded,
|
|
22
121
|
...otherTreeViewFinderProps
|
|
23
|
-
})
|
|
122
|
+
}) {
|
|
24
123
|
const [data, setData] = useState([]);
|
|
25
124
|
const [rootDirectories, setRootDirectories] = useState([]);
|
|
26
125
|
const nodeMap = useRef({});
|
|
@@ -63,7 +162,7 @@ const DirectoryItemSelector = ({
|
|
|
63
162
|
);
|
|
64
163
|
const addToDirectory = useCallback(
|
|
65
164
|
(nodeId, content) => {
|
|
66
|
-
|
|
165
|
+
const [nrs, mdr] = updatedTree(
|
|
67
166
|
rootsRef.current,
|
|
68
167
|
nodeMap.current,
|
|
69
168
|
nodeId,
|
|
@@ -76,12 +175,12 @@ const DirectoryItemSelector = ({
|
|
|
76
175
|
[convertRoots]
|
|
77
176
|
);
|
|
78
177
|
const updateRootDirectories = useCallback(() => {
|
|
79
|
-
fetchRootFolders(types).then((
|
|
80
|
-
|
|
178
|
+
fetchRootFolders(types).then((newData) => {
|
|
179
|
+
const [nrs, mdr] = updatedTree(
|
|
81
180
|
rootsRef.current,
|
|
82
181
|
nodeMap.current,
|
|
83
182
|
null,
|
|
84
|
-
|
|
183
|
+
newData
|
|
85
184
|
);
|
|
86
185
|
setRootDirectories(nrs);
|
|
87
186
|
nodeMap.current = mdr;
|
|
@@ -106,13 +205,13 @@ const DirectoryItemSelector = ({
|
|
|
106
205
|
types,
|
|
107
206
|
equipmentTypes
|
|
108
207
|
).then((childrenWithMetadata) => {
|
|
109
|
-
const
|
|
208
|
+
const filtredChildren = itemFilter ? childrenWithMetadata.filter((val) => {
|
|
110
209
|
if (val.type === ElementType.DIRECTORY) {
|
|
111
210
|
return true;
|
|
112
211
|
}
|
|
113
212
|
return itemFilter(val);
|
|
114
213
|
}) : childrenWithMetadata;
|
|
115
|
-
addToDirectory(nodeId,
|
|
214
|
+
addToDirectory(nodeId, filtredChildren);
|
|
116
215
|
});
|
|
117
216
|
} else {
|
|
118
217
|
addToDirectory(nodeId, childrenMatchedTypes);
|
|
@@ -135,14 +234,6 @@ const DirectoryItemSelector = ({
|
|
|
135
234
|
}
|
|
136
235
|
}
|
|
137
236
|
}, [open, updateRootDirectories, expanded, fetchDirectory]);
|
|
138
|
-
function sortHandlingDirectories(a, b) {
|
|
139
|
-
if (a.children && !b.children) {
|
|
140
|
-
return -1;
|
|
141
|
-
} else if (b.children && !a.children) {
|
|
142
|
-
return 1;
|
|
143
|
-
}
|
|
144
|
-
return a.name.localeCompare(b.name);
|
|
145
|
-
}
|
|
146
237
|
return /* @__PURE__ */ jsx(
|
|
147
238
|
TreeViewFinder,
|
|
148
239
|
{
|
|
@@ -156,94 +247,6 @@ const DirectoryItemSelector = ({
|
|
|
156
247
|
data
|
|
157
248
|
}
|
|
158
249
|
);
|
|
159
|
-
};
|
|
160
|
-
function updatedTree(prevRoots, prevMap, nodeId, children) {
|
|
161
|
-
var _a;
|
|
162
|
-
const nextChildren = children.sort((a, b) => a.elementName.localeCompare(b.elementName)).map((n) => {
|
|
163
|
-
let pn = prevMap[n.elementUuid];
|
|
164
|
-
if (!pn) {
|
|
165
|
-
return { ...n, children: [], parentUuid: nodeId };
|
|
166
|
-
} else if (n.elementName === pn.elementName && sameRights(n.accessRights, pn.accessRights) && n.subdirectoriesCount === pn.subdirectoriesCount && nodeId === pn.parentUuid) {
|
|
167
|
-
return pn;
|
|
168
|
-
} else {
|
|
169
|
-
if (pn.parentUuid !== nodeId) {
|
|
170
|
-
console.warn("reparent " + pn.parentUuid + " -> " + nodeId);
|
|
171
|
-
}
|
|
172
|
-
return {
|
|
173
|
-
...pn,
|
|
174
|
-
elementName: n.elementName,
|
|
175
|
-
accessRights: n.accessRights,
|
|
176
|
-
subdirectoriesCount: n.subdirectoriesCount,
|
|
177
|
-
parentUuid: nodeId
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
const prevChildren = nodeId ? (_a = prevMap[nodeId]) == null ? void 0 : _a.children : prevRoots;
|
|
182
|
-
if ((prevChildren == null ? void 0 : prevChildren.length) === nextChildren.length && prevChildren.every((e, i) => e === nextChildren[i])) {
|
|
183
|
-
return [prevRoots, prevMap];
|
|
184
|
-
}
|
|
185
|
-
let nextUuids = new Set(children ? children.map((n) => n.elementUuid) : []);
|
|
186
|
-
let prevUuids = prevChildren ? prevChildren.map((n) => n.elementUuid) : [];
|
|
187
|
-
let mayNodeId = nodeId ? [nodeId] : [];
|
|
188
|
-
let nonCopyUuids = /* @__PURE__ */ new Set([
|
|
189
|
-
...nextUuids,
|
|
190
|
-
...mayNodeId,
|
|
191
|
-
...Array.prototype.concat(
|
|
192
|
-
...prevUuids.filter((u) => !nextUuids.has(u)).map(
|
|
193
|
-
(u) => flattenDownNodes(prevMap[u], (n) => n.children).map(
|
|
194
|
-
(n) => n.elementUuid
|
|
195
|
-
)
|
|
196
|
-
)
|
|
197
|
-
)
|
|
198
|
-
]);
|
|
199
|
-
const prevNode = nodeId ? prevMap[nodeId] : {};
|
|
200
|
-
const nextNode = {
|
|
201
|
-
elementUuid: nodeId,
|
|
202
|
-
parentUuid: null,
|
|
203
|
-
...prevNode,
|
|
204
|
-
children: nextChildren,
|
|
205
|
-
subdirectoriesCount: nextChildren.length
|
|
206
|
-
};
|
|
207
|
-
const nextMap = Object.fromEntries([
|
|
208
|
-
...Object.entries(prevMap).filter(([k, v], i) => !nonCopyUuids.has(k)),
|
|
209
|
-
...nextChildren.map((n) => [n.elementUuid, n]),
|
|
210
|
-
...refreshedUpNodes(prevMap, nextNode).map((n) => [n.elementUuid, n])
|
|
211
|
-
]);
|
|
212
|
-
const nextRoots = nodeId === null ? nextChildren : prevRoots.map((r) => nextMap[r.elementUuid]);
|
|
213
|
-
return [nextRoots, nextMap];
|
|
214
|
-
}
|
|
215
|
-
function sameRights(a, b) {
|
|
216
|
-
if (!a && !b) {
|
|
217
|
-
return true;
|
|
218
|
-
}
|
|
219
|
-
if (!a || !b) {
|
|
220
|
-
return false;
|
|
221
|
-
}
|
|
222
|
-
return a.isPrivate === b.isPrivate;
|
|
223
|
-
}
|
|
224
|
-
function flattenDownNodes(n, cef) {
|
|
225
|
-
const subs = cef(n);
|
|
226
|
-
if (subs.length === 0) {
|
|
227
|
-
return [n];
|
|
228
|
-
}
|
|
229
|
-
return Array.prototype.concat(
|
|
230
|
-
[n],
|
|
231
|
-
...subs.map((sn) => flattenDownNodes(sn, cef))
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
function refreshedUpNodes(m, nn) {
|
|
235
|
-
if (!(nn == null ? void 0 : nn.elementUuid)) {
|
|
236
|
-
return [];
|
|
237
|
-
}
|
|
238
|
-
if (nn.parentUuid === null) {
|
|
239
|
-
return [nn];
|
|
240
|
-
}
|
|
241
|
-
const parent = m[nn.parentUuid];
|
|
242
|
-
const nextChildren = parent.children.map(
|
|
243
|
-
(c) => c.elementUuid === nn.elementUuid ? nn : c
|
|
244
|
-
);
|
|
245
|
-
const nextParent = { ...parent, children: nextChildren };
|
|
246
|
-
return [nn, ...refreshedUpNodes(m, nextParent)];
|
|
247
250
|
}
|
|
248
251
|
export {
|
|
249
252
|
DirectoryItemSelector as default
|
|
@@ -4,5 +4,5 @@ export interface ElementSearchDialogProps<T> extends ElementSearchInputProps<T>
|
|
|
4
4
|
onClose?: () => void;
|
|
5
5
|
open: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare
|
|
7
|
+
export declare function ElementSearchDialog<T>(props: ElementSearchDialogProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default ElementSearchDialog;
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import { Dialog, DialogContent } from "@mui/material";
|
|
4
4
|
import { ElementSearchInput } from "./element-search-input.js";
|
|
5
|
-
|
|
5
|
+
function ElementSearchDialog(props) {
|
|
6
6
|
const { open, onClose, onSearchTermChange, ...rest } = props;
|
|
7
7
|
const handleClose = useCallback(() => {
|
|
8
8
|
onSearchTermChange("");
|
|
@@ -25,7 +25,7 @@ const ElementSearchDialog = (props) => {
|
|
|
25
25
|
) })
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
export {
|
|
30
30
|
ElementSearchDialog,
|
|
31
31
|
ElementSearchDialog as default
|
|
@@ -18,4 +18,4 @@ export interface ElementSearchInputProps<T> extends Pick<AutocompleteProps<T, fa
|
|
|
18
18
|
searchTermDisableReason?: string;
|
|
19
19
|
showResults?: boolean;
|
|
20
20
|
}
|
|
21
|
-
export declare
|
|
21
|
+
export declare function ElementSearchInput<T>(props: ElementSearchInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Autocomplete } from "@mui/material";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
|
-
|
|
5
|
+
function ElementSearchInput(props) {
|
|
6
6
|
const {
|
|
7
7
|
elementsFound,
|
|
8
8
|
loading,
|
|
@@ -27,9 +27,8 @@ const ElementSearchInput = (props) => {
|
|
|
27
27
|
return searchTermDisableReason ?? intl.formatMessage({
|
|
28
28
|
id: "element_search/searchDisabled"
|
|
29
29
|
});
|
|
30
|
-
} else {
|
|
31
|
-
return searchTerm ?? "";
|
|
32
30
|
}
|
|
31
|
+
return searchTerm ?? "";
|
|
33
32
|
}, [searchTerm, searchTermDisabled, searchTermDisableReason, intl]);
|
|
34
33
|
return /* @__PURE__ */ jsx(
|
|
35
34
|
Autocomplete,
|
|
@@ -74,14 +73,13 @@ const ElementSearchInput = (props) => {
|
|
|
74
73
|
isOptionEqualToValue: (option, value) => {
|
|
75
74
|
if (typeof option !== "string" && typeof value !== "string") {
|
|
76
75
|
return isOptionEqualToValue(option, value);
|
|
77
|
-
} else {
|
|
78
|
-
return option === value;
|
|
79
76
|
}
|
|
77
|
+
return option === value;
|
|
80
78
|
},
|
|
81
79
|
disabled: searchTermDisabled
|
|
82
80
|
}
|
|
83
81
|
);
|
|
84
|
-
}
|
|
82
|
+
}
|
|
85
83
|
export {
|
|
86
84
|
ElementSearchInput
|
|
87
85
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SxProps, Theme } from '@mui/material';
|
|
2
|
-
import { EquipmentInfos } from '../../utils/EquipmentType';
|
|
3
1
|
import { TagRenderer } from './index';
|
|
2
|
+
import { EquipmentInfos } from '../../utils/EquipmentType';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material';
|
|
4
4
|
|
|
5
5
|
export interface EquipmentItemProps {
|
|
6
6
|
inputValue: string;
|
|
@@ -22,4 +22,4 @@ export interface EquipmentItemProps {
|
|
|
22
22
|
equipmentVlTag?: SxProps<Theme>;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
export declare
|
|
25
|
+
export declare function EquipmentItem({ inputValue, suffixRenderer, element, showsJustText, ...props }: EquipmentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { Box } from "@mui/material";
|
|
4
|
-
import { FormattedMessage } from "react-intl";
|
|
5
|
-
import { TagRenderer } from "./tag-renderer.js";
|
|
6
|
-
import "notistack";
|
|
7
2
|
import match from "autosuggest-highlight/match";
|
|
8
3
|
import parse from "autosuggest-highlight/parse";
|
|
9
4
|
import clsx from "clsx";
|
|
5
|
+
import { FormattedMessage } from "react-intl";
|
|
6
|
+
import { Box } from "@mui/material";
|
|
10
7
|
import { EQUIPMENT_TYPE } from "../../utils/EquipmentType.js";
|
|
8
|
+
import "react";
|
|
9
|
+
import TagRenderer from "./tag-renderer.js";
|
|
10
|
+
import "notistack";
|
|
11
11
|
import { OverflowableText } from "../OverflowableText/overflowable-text.js";
|
|
12
12
|
import { mergeSx } from "../../utils/styles.js";
|
|
13
|
-
|
|
13
|
+
function EquipmentItem({
|
|
14
14
|
inputValue,
|
|
15
15
|
suffixRenderer = TagRenderer,
|
|
16
16
|
element,
|
|
17
17
|
showsJustText = false,
|
|
18
18
|
...props
|
|
19
|
-
})
|
|
19
|
+
}) {
|
|
20
20
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
21
|
-
|
|
21
|
+
const matches = match(element.label, inputValue, {
|
|
22
22
|
insideWords: true,
|
|
23
23
|
findAllOccurrences: true
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
const parts = parse(element.label, matches);
|
|
26
26
|
return /* @__PURE__ */ jsx("li", { ...props, children: /* @__PURE__ */ jsxs(
|
|
27
27
|
Box,
|
|
28
28
|
{
|
|
@@ -55,7 +55,7 @@ const EquipmentItem = ({
|
|
|
55
55
|
text: parts.map((e) => e.text).join(),
|
|
56
56
|
className: (_h = props.classes) == null ? void 0 : _h.result,
|
|
57
57
|
sx: (_i = props.styles) == null ? void 0 : _i.result,
|
|
58
|
-
children: parts.map((part
|
|
58
|
+
children: parts.map((part) => /* @__PURE__ */ jsx(
|
|
59
59
|
"span",
|
|
60
60
|
{
|
|
61
61
|
style: {
|
|
@@ -63,15 +63,15 @@ const EquipmentItem = ({
|
|
|
63
63
|
},
|
|
64
64
|
children: part.text
|
|
65
65
|
},
|
|
66
|
-
|
|
66
|
+
`${part.text}-${part.highlight}`
|
|
67
67
|
))
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
!showsJustText && suffixRenderer({
|
|
70
|
+
!showsJustText && suffixRenderer({ element, ...props })
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
73
|
) }, element.key);
|
|
74
|
-
}
|
|
74
|
+
}
|
|
75
75
|
export {
|
|
76
76
|
EquipmentItem
|
|
77
77
|
};
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
|
-
export { default } from './element-search-dialog';
|
|
8
|
-
export { TagRenderer } from './tag-renderer';
|
|
7
|
+
export { default as ElementSearchDialog } from './element-search-dialog';
|
|
8
|
+
export { default as TagRenderer } from './tag-renderer';
|
|
9
9
|
export type { TagRendererProps } from './tag-renderer';
|
|
10
10
|
export { ElementSearchInput } from './element-search-input';
|
|
11
|
-
export { useElementSearch } from './use-element-search';
|
|
11
|
+
export { default as useElementSearch } from './use-element-search';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ElementSearchDialog } from "./element-search-dialog.js";
|
|
2
|
-
import {
|
|
2
|
+
import { default as default2 } from "./tag-renderer.js";
|
|
3
3
|
import { ElementSearchInput } from "./element-search-input.js";
|
|
4
|
-
import {
|
|
4
|
+
import { default as default3 } from "./use-element-search.js";
|
|
5
5
|
export {
|
|
6
|
+
ElementSearchDialog,
|
|
6
7
|
ElementSearchInput,
|
|
7
|
-
TagRenderer,
|
|
8
|
-
|
|
9
|
-
useElementSearch
|
|
8
|
+
default2 as TagRenderer,
|
|
9
|
+
default3 as useElementSearch
|
|
10
10
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { SxProps, Theme } from '@mui/material';
|
|
2
1
|
import { EquipmentInfos } from '../../utils/EquipmentType';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
3
|
|
|
4
4
|
export interface TagRendererProps {
|
|
5
|
-
props: {
|
|
6
|
-
classes?: {
|
|
7
|
-
equipmentTag?: string;
|
|
8
|
-
equipmentVlTag?: string;
|
|
9
|
-
};
|
|
10
|
-
styles?: {
|
|
11
|
-
equipmentTag?: SxProps<Theme>;
|
|
12
|
-
equipmentVlTag?: SxProps<Theme>;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
5
|
element: EquipmentInfos;
|
|
6
|
+
classes?: {
|
|
7
|
+
equipmentTag?: string;
|
|
8
|
+
equipmentVlTag?: string;
|
|
9
|
+
};
|
|
10
|
+
styles?: {
|
|
11
|
+
equipmentTag?: SxProps<Theme>;
|
|
12
|
+
equipmentVlTag?: SxProps<Theme>;
|
|
13
|
+
};
|
|
16
14
|
}
|
|
17
|
-
|
|
15
|
+
declare function TagRenderer({ element, ...props }: TagRendererProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
16
|
+
export default TagRenderer;
|