@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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { OverflowableText } from "../OverflowableText/overflowable-text.js";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import clsx from "clsx";
|
|
3
|
+
import { OverflowableText } from "../OverflowableText/overflowable-text.js";
|
|
4
4
|
import { EQUIPMENT_TYPE } from "../../utils/EquipmentType.js";
|
|
5
5
|
import { mergeSx } from "../../utils/styles.js";
|
|
6
|
-
|
|
6
|
+
function TagRenderer({ element, ...props }) {
|
|
7
7
|
var _a, _b, _c, _d, _e, _f;
|
|
8
8
|
if (element.type !== ((_a = EQUIPMENT_TYPE.SUBSTATION) == null ? void 0 : _a.name) && element.type !== ((_b = EQUIPMENT_TYPE.VOLTAGE_LEVEL) == null ? void 0 : _b.name)) {
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
@@ -21,8 +21,7 @@ const TagRenderer = ({ props, element }) => {
|
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
};
|
|
24
|
+
}
|
|
26
25
|
export {
|
|
27
|
-
TagRenderer
|
|
26
|
+
TagRenderer as default
|
|
28
27
|
};
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
interface UseElementSearch<T> {
|
|
8
8
|
fetchElements: (newSearchTerm: string) => Promise<T[]>;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
declare const useElementSearch: <T>(props: UseElementSearch<T>) => {
|
|
11
11
|
searchTerm: string;
|
|
12
12
|
updateSearchTerm: (newSearchTerm: string) => void;
|
|
13
13
|
elementsFound: T[];
|
|
14
14
|
isLoading: boolean;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export default useElementSearch;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useRef, useCallback } from "react";
|
|
2
|
-
import
|
|
2
|
+
import useDebounce from "../../hooks/useDebounce.js";
|
|
3
3
|
import { useSnackMessage } from "../../hooks/useSnackMessage.js";
|
|
4
4
|
const SEARCH_FETCH_TIMEOUT_MILLIS = 1e3;
|
|
5
5
|
const useElementSearch = (props) => {
|
|
@@ -53,5 +53,5 @@ const useElementSearch = (props) => {
|
|
|
53
53
|
return { searchTerm, updateSearchTerm, elementsFound, isLoading };
|
|
54
54
|
};
|
|
55
55
|
export {
|
|
56
|
-
useElementSearch
|
|
56
|
+
useElementSearch as default
|
|
57
57
|
};
|
|
@@ -2,7 +2,7 @@ import { PropsWithChildren, ReactNode } from 'react';
|
|
|
2
2
|
import { Theme } from '@mui/material';
|
|
3
3
|
|
|
4
4
|
export declare const styles: {
|
|
5
|
-
accordion: (
|
|
5
|
+
accordion: () => {
|
|
6
6
|
'&:before': {
|
|
7
7
|
display: string;
|
|
8
8
|
};
|
|
@@ -25,12 +25,12 @@ export declare const styles: {
|
|
|
25
25
|
transform: string;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
accordionDetails: (
|
|
28
|
+
accordionDetails: () => {
|
|
29
29
|
padding: number;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
interface ExpandableGroupProps extends PropsWithChildren {
|
|
33
33
|
renderHeader: ReactNode;
|
|
34
34
|
}
|
|
35
|
-
declare
|
|
35
|
+
declare function ExpandableGroup({ renderHeader, children }: ExpandableGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
export default ExpandableGroup;
|
|
@@ -4,7 +4,7 @@ import { useState } from "react";
|
|
|
4
4
|
import { ExpandCircleDown, ExpandMore } from "@mui/icons-material";
|
|
5
5
|
import { FormattedMessage } from "react-intl";
|
|
6
6
|
const styles = {
|
|
7
|
-
accordion: (
|
|
7
|
+
accordion: () => ({
|
|
8
8
|
"&:before": {
|
|
9
9
|
display: "none"
|
|
10
10
|
},
|
|
@@ -31,12 +31,12 @@ const styles = {
|
|
|
31
31
|
transform: "rotate(0deg)"
|
|
32
32
|
}
|
|
33
33
|
}),
|
|
34
|
-
accordionDetails: (
|
|
34
|
+
accordionDetails: () => ({
|
|
35
35
|
padding: 0
|
|
36
36
|
// reset default left right space in details
|
|
37
37
|
})
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
function ExpandableGroup({ renderHeader, children }) {
|
|
40
40
|
const [mouseHover, setMouseHover] = useState(false);
|
|
41
41
|
return /* @__PURE__ */ jsxs(Accordion, { sx: styles.accordion, disableGutters: true, elevation: 0, children: [
|
|
42
42
|
/* @__PURE__ */ jsx(
|
|
@@ -44,14 +44,14 @@ const ExpandableGroup = ({ renderHeader, children }) => {
|
|
|
44
44
|
{
|
|
45
45
|
sx: styles.accordionSummary,
|
|
46
46
|
expandIcon: mouseHover ? /* @__PURE__ */ jsx(ExpandCircleDown, {}) : /* @__PURE__ */ jsx(ExpandMore, {}),
|
|
47
|
-
onMouseEnter: (
|
|
48
|
-
onMouseLeave: (
|
|
47
|
+
onMouseEnter: () => setMouseHover(true),
|
|
48
|
+
onMouseLeave: () => setMouseHover(false),
|
|
49
49
|
children: typeof renderHeader === "string" ? /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(FormattedMessage, { id: renderHeader }) }) : renderHeader
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
52
|
/* @__PURE__ */ jsx(AccordionDetails, { sx: styles.accordionDetails, children })
|
|
53
53
|
] });
|
|
54
|
-
}
|
|
54
|
+
}
|
|
55
55
|
export {
|
|
56
56
|
ExpandableGroup as default,
|
|
57
57
|
styles
|
|
@@ -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 './expandable-group';
|
|
1
|
+
import { default as ExpandableGroup } from './expandable-group';
|
|
2
|
+
|
|
3
|
+
export default ExpandableGroup;
|
|
@@ -26,5 +26,5 @@ export interface FlatParametersProps {
|
|
|
26
26
|
* @param showSeparator if true, a separator is added between parameters
|
|
27
27
|
* @param selectionWithDialog {(param: {}) => boolean} if true, param with multiple options use dialog for selection
|
|
28
28
|
*/
|
|
29
|
-
export declare
|
|
29
|
+
export declare function FlatParameters({ paramsAsArray, initValues, onChange, variant, showSeparator, selectionWithDialog, }: FlatParametersProps): import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export default FlatParameters;
|
|
@@ -56,21 +56,21 @@ function longestCommonPrefix(stringList) {
|
|
|
56
56
|
let prefix = stringList.reduce(
|
|
57
57
|
(acc, str) => str.length < acc.length ? str : acc
|
|
58
58
|
);
|
|
59
|
-
|
|
60
|
-
while (str.
|
|
59
|
+
stringList.forEach((str) => {
|
|
60
|
+
while (!str.startsWith(prefix)) {
|
|
61
61
|
prefix = prefix.slice(0, -1);
|
|
62
62
|
}
|
|
63
|
-
}
|
|
63
|
+
});
|
|
64
64
|
return prefix;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
function FlatParameters({
|
|
67
67
|
paramsAsArray,
|
|
68
68
|
initValues,
|
|
69
69
|
onChange,
|
|
70
70
|
variant = "outlined",
|
|
71
71
|
showSeparator = false,
|
|
72
|
-
selectionWithDialog = (
|
|
73
|
-
})
|
|
72
|
+
selectionWithDialog = () => false
|
|
73
|
+
}) {
|
|
74
74
|
const intl = useIntl();
|
|
75
75
|
const longestPrefix = longestCommonPrefix(paramsAsArray.map((m) => m.name));
|
|
76
76
|
const lastDotIndex = longestPrefix.lastIndexOf(".");
|
|
@@ -79,9 +79,9 @@ const FlatParameters = ({
|
|
|
79
79
|
const [inEditionParam, setInEditionParam] = useState(null);
|
|
80
80
|
const [openSelector, setOpenSelector] = useState(false);
|
|
81
81
|
const getTranslatedValue = useCallback(
|
|
82
|
-
(
|
|
82
|
+
(prefixValue, value) => {
|
|
83
83
|
return intl.formatMessage({
|
|
84
|
-
id:
|
|
84
|
+
id: `${prefixValue}.${value}`,
|
|
85
85
|
defaultMessage: value
|
|
86
86
|
});
|
|
87
87
|
},
|
|
@@ -94,21 +94,21 @@ const FlatParameters = ({
|
|
|
94
94
|
defaultMessage: paramName.slice(prefix.length)
|
|
95
95
|
});
|
|
96
96
|
return intl.formatMessage({
|
|
97
|
-
id: paramName
|
|
97
|
+
id: `${paramName}.selectionDialog.name`,
|
|
98
98
|
defaultMessage
|
|
99
99
|
});
|
|
100
100
|
},
|
|
101
101
|
[intl, prefix.length]
|
|
102
102
|
);
|
|
103
103
|
const sortPossibleValues = useCallback(
|
|
104
|
-
(
|
|
104
|
+
(prefixValue, values) => {
|
|
105
105
|
if (values == null) {
|
|
106
106
|
return [];
|
|
107
107
|
}
|
|
108
108
|
return values.map((value) => {
|
|
109
109
|
return {
|
|
110
110
|
id: value,
|
|
111
|
-
message: getTranslatedValue(
|
|
111
|
+
message: getTranslatedValue(prefixValue, value)
|
|
112
112
|
};
|
|
113
113
|
}).sort((a, b) => a.message.localeCompare(b.message));
|
|
114
114
|
},
|
|
@@ -158,7 +158,8 @@ const FlatParameters = ({
|
|
|
158
158
|
function mixInitAndDefault(param) {
|
|
159
159
|
if (param.name === inEditionParam && uncommitted !== null) {
|
|
160
160
|
return uncommitted;
|
|
161
|
-
}
|
|
161
|
+
}
|
|
162
|
+
if (Object.hasOwn(initValues, param.name)) {
|
|
162
163
|
if (param.type === "BOOLEAN") {
|
|
163
164
|
return initValues[param.name] === "false" ? false : initValues[param.name];
|
|
164
165
|
}
|
|
@@ -170,9 +171,8 @@ const FlatParameters = ({
|
|
|
170
171
|
return valueList;
|
|
171
172
|
}
|
|
172
173
|
return valueList ? valueList.split(",").map((s) => s.trim()).filter((s) => !!s) : [];
|
|
173
|
-
} else {
|
|
174
|
-
return extractDefault(param);
|
|
175
174
|
}
|
|
175
|
+
return extractDefault(param);
|
|
176
176
|
}
|
|
177
177
|
const outputTransformFloatString = (value) => {
|
|
178
178
|
return (value == null ? void 0 : value.replace(",", ".")) || "";
|
|
@@ -197,8 +197,8 @@ const FlatParameters = ({
|
|
|
197
197
|
onChange: (e) => onFieldChange(e.target.checked, param)
|
|
198
198
|
}
|
|
199
199
|
);
|
|
200
|
-
case "DOUBLE":
|
|
201
|
-
const err = isNaN(fieldValue) || typeof fieldValue !== "number" && !!fieldValue && isNaN(fieldValue - 0);
|
|
200
|
+
case "DOUBLE": {
|
|
201
|
+
const err = Number.isNaN(fieldValue) || typeof fieldValue !== "number" && !!fieldValue && Number.isNaN(fieldValue - 0);
|
|
202
202
|
return /* @__PURE__ */ jsx(
|
|
203
203
|
TextField,
|
|
204
204
|
{
|
|
@@ -221,6 +221,7 @@ const FlatParameters = ({
|
|
|
221
221
|
variant
|
|
222
222
|
}
|
|
223
223
|
);
|
|
224
|
+
}
|
|
224
225
|
case "INTEGER":
|
|
225
226
|
return /* @__PURE__ */ jsx(
|
|
226
227
|
TextField,
|
|
@@ -315,36 +316,35 @@ const FlatParameters = ({
|
|
|
315
316
|
renderInput: (inputProps) => /* @__PURE__ */ jsx(TextField, { ...inputProps, variant })
|
|
316
317
|
}
|
|
317
318
|
);
|
|
318
|
-
} else {
|
|
319
|
-
return /* @__PURE__ */ jsx(
|
|
320
|
-
Autocomplete,
|
|
321
|
-
{
|
|
322
|
-
multiple: true,
|
|
323
|
-
freeSolo: true,
|
|
324
|
-
autoSelect: true,
|
|
325
|
-
sx: { width: "50%" },
|
|
326
|
-
options: [],
|
|
327
|
-
size: "small",
|
|
328
|
-
onChange: (e, value) => onFieldChange(value, param),
|
|
329
|
-
value: fieldValue,
|
|
330
|
-
renderTags: (values, getTagProps) => {
|
|
331
|
-
return values.map((value, index) => /* @__PURE__ */ jsx(
|
|
332
|
-
Chip,
|
|
333
|
-
{
|
|
334
|
-
id: "chip_" + value,
|
|
335
|
-
size: "small",
|
|
336
|
-
label: value,
|
|
337
|
-
...getTagProps({ index })
|
|
338
|
-
}
|
|
339
|
-
));
|
|
340
|
-
},
|
|
341
|
-
renderInput: (inputProps) => /* @__PURE__ */ jsx(TextField, { ...inputProps, variant })
|
|
342
|
-
}
|
|
343
|
-
);
|
|
344
319
|
}
|
|
320
|
+
return /* @__PURE__ */ jsx(
|
|
321
|
+
Autocomplete,
|
|
322
|
+
{
|
|
323
|
+
multiple: true,
|
|
324
|
+
freeSolo: true,
|
|
325
|
+
autoSelect: true,
|
|
326
|
+
sx: { width: "50%" },
|
|
327
|
+
options: [],
|
|
328
|
+
size: "small",
|
|
329
|
+
onChange: (e, value) => onFieldChange(value, param),
|
|
330
|
+
value: fieldValue,
|
|
331
|
+
renderTags: (values, getTagProps) => {
|
|
332
|
+
return values.map((value, index) => /* @__PURE__ */ jsx(
|
|
333
|
+
Chip,
|
|
334
|
+
{
|
|
335
|
+
id: `chip_${value}`,
|
|
336
|
+
size: "small",
|
|
337
|
+
label: value,
|
|
338
|
+
...getTagProps({ index })
|
|
339
|
+
}
|
|
340
|
+
));
|
|
341
|
+
},
|
|
342
|
+
renderInput: (inputProps) => /* @__PURE__ */ jsx(TextField, { ...inputProps, variant })
|
|
343
|
+
}
|
|
344
|
+
);
|
|
345
345
|
case "STRING":
|
|
346
346
|
if (param.possibleValues) {
|
|
347
|
-
return /* @__PURE__ */ jsx(
|
|
347
|
+
return /* @__PURE__ */ jsx(
|
|
348
348
|
Select,
|
|
349
349
|
{
|
|
350
350
|
labelId: param.name,
|
|
@@ -360,7 +360,7 @@ const FlatParameters = ({
|
|
|
360
360
|
param.possibleValues
|
|
361
361
|
).map((value) => /* @__PURE__ */ jsx(MenuItem, { value: value.id, children: /* @__PURE__ */ jsx(Typography, { children: value.message }) }, value.id))
|
|
362
362
|
}
|
|
363
|
-
)
|
|
363
|
+
);
|
|
364
364
|
}
|
|
365
365
|
default:
|
|
366
366
|
return /* @__PURE__ */ jsx(
|
|
@@ -385,7 +385,7 @@ const FlatParameters = ({
|
|
|
385
385
|
title: /* @__PURE__ */ jsx(
|
|
386
386
|
FormattedMessage,
|
|
387
387
|
{
|
|
388
|
-
id: param.name
|
|
388
|
+
id: `${param.name}.desc`,
|
|
389
389
|
defaultMessage: param.description
|
|
390
390
|
}
|
|
391
391
|
),
|
|
@@ -406,7 +406,7 @@ const FlatParameters = ({
|
|
|
406
406
|
] }),
|
|
407
407
|
showSeparator && index !== paramsAsArray.length - 1 && /* @__PURE__ */ jsx(Divider, {})
|
|
408
408
|
] }, param.name)) });
|
|
409
|
-
}
|
|
409
|
+
}
|
|
410
410
|
export {
|
|
411
411
|
FlatParameters,
|
|
412
412
|
FlatParameters as default,
|
|
@@ -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 './FlatParameters';
|
|
1
|
+
import { default as defaultFlatParameters } from './FlatParameters';
|
|
2
|
+
|
|
3
|
+
export default defaultFlatParameters;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2020, RTE (http://www.rte-france.com)
|
|
3
|
-
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
-
*/
|
|
7
1
|
export interface LoginProps {
|
|
8
2
|
onLoginClick: () => void;
|
|
9
3
|
disabled: boolean;
|
|
10
4
|
}
|
|
11
|
-
declare
|
|
5
|
+
declare function Login({ onLoginClick, disabled }: LoginProps): import("react/jsx-runtime").JSX.Element;
|
|
12
6
|
export default Login;
|
|
@@ -22,18 +22,12 @@ const styles = {
|
|
|
22
22
|
height: 64
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
function Login({ onLoginClick, disabled }) {
|
|
26
26
|
return /* @__PURE__ */ jsxs(Container, { component: "main", maxWidth: "xs", children: [
|
|
27
27
|
/* @__PURE__ */ jsxs(Box, { sx: styles.paper, children: [
|
|
28
28
|
/* @__PURE__ */ jsx(Avatar, { sx: styles.avatar, children: /* @__PURE__ */ jsx(LockOutlined, {}) }),
|
|
29
29
|
/* @__PURE__ */ jsxs(Typography, { component: "h1", variant: "h5", children: [
|
|
30
|
-
/* @__PURE__ */ jsx(
|
|
31
|
-
FormattedMessage,
|
|
32
|
-
{
|
|
33
|
-
id: "login/login",
|
|
34
|
-
defaultMessage: "login"
|
|
35
|
-
}
|
|
36
|
-
),
|
|
30
|
+
/* @__PURE__ */ jsx(FormattedMessage, { id: "login/login", defaultMessage: "login" }),
|
|
37
31
|
" ",
|
|
38
32
|
"?"
|
|
39
33
|
] }),
|
|
@@ -71,7 +65,7 @@ const Login = ({ onLoginClick, disabled }) => {
|
|
|
71
65
|
}
|
|
72
66
|
) })
|
|
73
67
|
] });
|
|
74
|
-
}
|
|
68
|
+
}
|
|
75
69
|
export {
|
|
76
70
|
Login as default
|
|
77
71
|
};
|
|
@@ -8,5 +8,5 @@ export interface LogoutProps {
|
|
|
8
8
|
onLogoutClick: () => void;
|
|
9
9
|
disabled: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare
|
|
11
|
+
declare function Logout({ onLogoutClick, disabled }: LogoutProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export default Logout;
|
|
@@ -18,16 +18,16 @@ const styles = {
|
|
|
18
18
|
borderRadius: "30px"
|
|
19
19
|
})
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
function Copyright() {
|
|
22
|
+
return /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "textSecondary", align: "center", children: [
|
|
23
|
+
"Copyright © ",
|
|
24
|
+
/* @__PURE__ */ jsx(Link, { color: "inherit", href: "#", children: "GridSuite" }),
|
|
25
|
+
" ",
|
|
26
|
+
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
27
|
+
"."
|
|
28
|
+
] });
|
|
29
|
+
}
|
|
30
|
+
function Logout({ onLogoutClick, disabled }) {
|
|
31
31
|
return /* @__PURE__ */ jsxs(Container, { component: "main", maxWidth: "xs", children: [
|
|
32
32
|
/* @__PURE__ */ jsxs(Box, { sx: styles.paper, children: [
|
|
33
33
|
/* @__PURE__ */ jsx(Avatar, { sx: styles.avatar, children: /* @__PURE__ */ jsx(LogoutOutlined, {}) }),
|
|
@@ -62,7 +62,7 @@ const Logout = ({ onLogoutClick, disabled }) => {
|
|
|
62
62
|
] }),
|
|
63
63
|
/* @__PURE__ */ jsx(Box, { mt: 2, children: /* @__PURE__ */ jsx(Copyright, {}) })
|
|
64
64
|
] });
|
|
65
|
-
}
|
|
65
|
+
}
|
|
66
66
|
export {
|
|
67
67
|
Logout as default
|
|
68
68
|
};
|
|
@@ -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 './Login';
|
|
1
|
+
import { default as defaultLogin } from './Login';
|
|
2
|
+
|
|
3
|
+
export default defaultLogin;
|
|
@@ -41,29 +41,30 @@ const styles = {
|
|
|
41
41
|
opacity: 0.5
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
function SortButton({ signedRank = 0, ...props }) {
|
|
45
45
|
const sortRank = Math.abs(signedRank);
|
|
46
46
|
const visibilityStyle = (!signedRank || void 0) && (props.headerHovered ? styles.hovered : styles.transparent);
|
|
47
47
|
return /* @__PURE__ */ jsxs(Box, { sx: styles.sortDiv, onClick: props.onClick, children: [
|
|
48
48
|
signedRank >= 0 ? /* @__PURE__ */ jsx(ArrowUpward, { sx: visibilityStyle }) : /* @__PURE__ */ jsx(ArrowDownward, { sx: visibilityStyle }),
|
|
49
49
|
sortRank > 1 && !props.hovered && /* @__PURE__ */ jsx("sub", { children: sortRank })
|
|
50
50
|
] });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const
|
|
51
|
+
}
|
|
52
|
+
function FilterButton(props) {
|
|
53
|
+
const { filterLevel, headerHovered, onClick } = props;
|
|
54
|
+
const visibilityStyle = !filterLevel && (headerHovered ? styles.hovered : styles.transparent);
|
|
54
55
|
return /* @__PURE__ */ jsx(
|
|
55
56
|
FilterAltOutlined,
|
|
56
57
|
{
|
|
57
|
-
onClick
|
|
58
|
+
onClick,
|
|
58
59
|
sx: mergeSx(
|
|
59
60
|
styles.filterButton,
|
|
60
61
|
// @ts-ignore type incompatibility of styles
|
|
61
|
-
|
|
62
|
+
filterLevel > 1 && styles.filterTooLossy,
|
|
62
63
|
visibilityStyle
|
|
63
64
|
)
|
|
64
65
|
}
|
|
65
66
|
);
|
|
66
|
-
}
|
|
67
|
+
}
|
|
67
68
|
const ColumnHeader = forwardRef(
|
|
68
69
|
(props, ref) => {
|
|
69
70
|
const {
|
|
@@ -91,7 +92,7 @@ const ColumnHeader = forwardRef(
|
|
|
91
92
|
};
|
|
92
93
|
}, [onFilterClick]);
|
|
93
94
|
return (
|
|
94
|
-
|
|
95
|
+
// @ts-ignore it does not let us define Box with onMouseEnter/onMouseLeave attributes with 'div' I think, not sure though
|
|
95
96
|
/* @__PURE__ */ jsxs(
|
|
96
97
|
Box,
|
|
97
98
|
{
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColumnProps } from 'react-virtualized';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
+
export interface RowProps {
|
|
5
|
+
notClickable?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface CustomColumnProps extends ColumnProps {
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
numeric?: boolean;
|
|
10
|
+
indexer?: KeyedColumnsRowIndexer;
|
|
11
|
+
label: string;
|
|
12
|
+
clickable?: boolean;
|
|
13
|
+
fractionDigits?: number;
|
|
14
|
+
unit?: number;
|
|
15
|
+
extra?: ReactElement;
|
|
16
|
+
nostat?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare enum ChangeWays {
|
|
4
19
|
SIMPLE = "Simple",
|
|
5
20
|
TAIL = "Tail",
|
|
6
21
|
AMEND = "Amend",
|
|
@@ -69,8 +84,8 @@ export interface FilteredRows {
|
|
|
69
84
|
* a view index to model index array.
|
|
70
85
|
*/
|
|
71
86
|
export declare class KeyedColumnsRowIndexer {
|
|
72
|
-
static get CHANGE_WAYS(): typeof
|
|
73
|
-
|
|
87
|
+
static get CHANGE_WAYS(): typeof ChangeWays;
|
|
88
|
+
versionSetter: ((version: number) => void) | null;
|
|
74
89
|
byColFilter: Record<string, {
|
|
75
90
|
userParams?: any[];
|
|
76
91
|
outerParams?: any[];
|
|
@@ -88,17 +103,17 @@ export declare class KeyedColumnsRowIndexer {
|
|
|
88
103
|
constructor(isThreeState?: boolean, singleColumnByDefault?: boolean, delegatorCallback?: null, versionSetter?: ((version: number) => void) | null);
|
|
89
104
|
hasVersionSetter: () => boolean;
|
|
90
105
|
getVersion: () => number;
|
|
91
|
-
|
|
92
|
-
updatePreferences: (preferences: Preferences) =>
|
|
106
|
+
bumpVersion: (isFilter?: boolean) => void;
|
|
107
|
+
updatePreferences: (preferences: Preferences) => boolean;
|
|
93
108
|
preFilterRowMapping: (columns: CustomColumnProps[], rows: RowProps[], rowFilter: (row: RowProps) => boolean) => FilteredRows | null;
|
|
94
109
|
makeGroupAndSortIndirector: (preFilteredRowPairs: FilteredRows | null, columns: CustomColumnProps[]) => number[] | null;
|
|
95
110
|
getSortingAsKeyAndCodedRank: () => (string | number)[][];
|
|
96
|
-
updateSortingFromUser: (colKey: string, change_way:
|
|
111
|
+
updateSortingFromUser: (colKey: string, change_way: ChangeWays) => boolean;
|
|
97
112
|
codedRankByColumnIndex: (columns: CustomColumnProps[]) => number[] | null;
|
|
98
113
|
columnSortingSignedRank: (colKey: string) => number;
|
|
99
114
|
highestCodedColumn: (columns: CustomColumnProps[]) => number;
|
|
100
|
-
|
|
101
|
-
|
|
115
|
+
getColFilterParams: (colKey: string | null, isForUser: boolean) => any[] | undefined;
|
|
116
|
+
setColFilterParams: (colKey: string | null, params: any[] | null, isForUser: boolean) => boolean;
|
|
102
117
|
getColFilterOuterParams: (colKey: string | null) => any[] | undefined;
|
|
103
118
|
setColFilterOuterParams: (colKey: string, outerParams: any[]) => boolean;
|
|
104
119
|
getColFilterUserParams: (colKey: string | null) => any[] | undefined;
|