@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,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return
|
|
8
|
-
})(
|
|
1
|
+
import equalsArray from "../../utils/algos.js";
|
|
2
|
+
var ChangeWays = /* @__PURE__ */ ((ChangeWays2) => {
|
|
3
|
+
ChangeWays2["SIMPLE"] = "Simple";
|
|
4
|
+
ChangeWays2["TAIL"] = "Tail";
|
|
5
|
+
ChangeWays2["AMEND"] = "Amend";
|
|
6
|
+
ChangeWays2["REMOVE"] = "Remove";
|
|
7
|
+
return ChangeWays2;
|
|
8
|
+
})(ChangeWays || {});
|
|
9
9
|
const noOpHelper = Object.freeze({
|
|
10
10
|
debugName: "noOp",
|
|
11
11
|
maintainsStats: false,
|
|
@@ -55,21 +55,172 @@ const collectibleHelper = Object.freeze({
|
|
|
55
55
|
const getHelper = (column) => {
|
|
56
56
|
if (column == null ? void 0 : column.numeric) {
|
|
57
57
|
return numericHelper;
|
|
58
|
-
}
|
|
58
|
+
}
|
|
59
|
+
if (!(column == null ? void 0 : column.nostat)) {
|
|
59
60
|
return collectibleHelper;
|
|
61
|
+
}
|
|
62
|
+
return noOpHelper;
|
|
63
|
+
};
|
|
64
|
+
const giveDirSignFor = (fuzzySign) => {
|
|
65
|
+
if (fuzzySign < 0) {
|
|
66
|
+
return -1;
|
|
67
|
+
}
|
|
68
|
+
if (fuzzySign > 0) {
|
|
69
|
+
return 1;
|
|
70
|
+
}
|
|
71
|
+
if (fuzzySign === "asc") {
|
|
72
|
+
return 1;
|
|
73
|
+
}
|
|
74
|
+
if (fuzzySign === "desc") {
|
|
75
|
+
return -1;
|
|
76
|
+
}
|
|
77
|
+
return 0;
|
|
78
|
+
};
|
|
79
|
+
const codedColumnsFromKeyAndDirection = (keyAndDirections, columns) => {
|
|
80
|
+
if (!keyAndDirections) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
let ret = [];
|
|
84
|
+
const columIndexByKey = {};
|
|
85
|
+
for (let colIdx = 0; colIdx < columns.length; colIdx++) {
|
|
86
|
+
const col = columns[colIdx];
|
|
87
|
+
const colKey = col.dataKey;
|
|
88
|
+
columIndexByKey[colKey] = colIdx;
|
|
89
|
+
}
|
|
90
|
+
ret = keyAndDirections.map((knd) => {
|
|
91
|
+
const colKey = knd[0];
|
|
92
|
+
const dir = knd[1];
|
|
93
|
+
const colIdx = columIndexByKey[colKey];
|
|
94
|
+
if (colIdx === void 0) {
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
const sign = giveDirSignFor(dir);
|
|
98
|
+
return (colIdx + 1) * sign;
|
|
99
|
+
});
|
|
100
|
+
return ret;
|
|
101
|
+
};
|
|
102
|
+
const compareValue = (a, b, isNumeric, undefSign = -1) => {
|
|
103
|
+
if (a === void 0 && b === void 0) {
|
|
104
|
+
return 0;
|
|
105
|
+
}
|
|
106
|
+
if (a === void 0) {
|
|
107
|
+
return undefSign;
|
|
108
|
+
}
|
|
109
|
+
if (b === void 0) {
|
|
110
|
+
return -undefSign;
|
|
111
|
+
}
|
|
112
|
+
if (!isNumeric) {
|
|
113
|
+
return `${a}`.localeCompare(b);
|
|
114
|
+
}
|
|
115
|
+
if (Number.isNaN(a)) {
|
|
116
|
+
return Number.isNaN(b) ? 0 : 1;
|
|
117
|
+
}
|
|
118
|
+
if (Number.isNaN(b)) {
|
|
119
|
+
return -1;
|
|
120
|
+
}
|
|
121
|
+
return Math.sign(Number(a) - Number(b));
|
|
122
|
+
};
|
|
123
|
+
const makeCompositeComparatorFromCodedColumns = (codedColumns, columns, rowExtractor) => {
|
|
124
|
+
return (row_a_i, row_b_i) => {
|
|
125
|
+
const rowA = rowExtractor(row_a_i);
|
|
126
|
+
const rowB = rowExtractor(row_b_i);
|
|
127
|
+
codedColumns.map((cc) => {
|
|
128
|
+
const i = Math.abs(cc) - 1;
|
|
129
|
+
const mul = Math.sign(cc);
|
|
130
|
+
const col = columns[i];
|
|
131
|
+
const key = col.dataKey;
|
|
132
|
+
const sgn = compareValue(rowA[key], rowB[key], col.numeric);
|
|
133
|
+
if (sgn) {
|
|
134
|
+
return mul * sgn;
|
|
135
|
+
}
|
|
136
|
+
return void 0;
|
|
137
|
+
});
|
|
138
|
+
return 0;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
const canonicalForSign = (dirSign) => {
|
|
142
|
+
if (dirSign > 0) {
|
|
143
|
+
return "asc";
|
|
144
|
+
}
|
|
145
|
+
if (dirSign < 0) {
|
|
146
|
+
return "desc";
|
|
147
|
+
}
|
|
148
|
+
return void 0;
|
|
149
|
+
};
|
|
150
|
+
const groupRows = (groupingColumnsCount, columns, indexedArray) => {
|
|
151
|
+
const groupingComparator = makeCompositeComparatorFromCodedColumns(
|
|
152
|
+
Array(groupingColumnsCount).map((x, i) => i + 1),
|
|
153
|
+
columns,
|
|
154
|
+
// @ts-ignore does not match other pattern
|
|
155
|
+
(ar) => ar[0]
|
|
156
|
+
);
|
|
157
|
+
indexedArray.sort(groupingComparator);
|
|
158
|
+
const groups = [];
|
|
159
|
+
let prevSlice = null;
|
|
160
|
+
let inBuildGroup = [];
|
|
161
|
+
groups.push(inBuildGroup);
|
|
162
|
+
indexedArray.forEach((p) => {
|
|
163
|
+
const nextSlice = p[0].slice(0, groupingColumnsCount);
|
|
164
|
+
if (prevSlice === null || !equalsArray(prevSlice, nextSlice)) {
|
|
165
|
+
inBuildGroup = [];
|
|
166
|
+
groups.push(inBuildGroup);
|
|
167
|
+
}
|
|
168
|
+
inBuildGroup.push(p);
|
|
169
|
+
prevSlice = nextSlice;
|
|
170
|
+
});
|
|
171
|
+
return groups;
|
|
172
|
+
};
|
|
173
|
+
const groupAndSort = (preFilteredRowPairs, codedColumns, groupingColumnsCount, columns) => {
|
|
174
|
+
const nothingToDo = !codedColumns && !groupingColumnsCount;
|
|
175
|
+
let indexedArray = preFilteredRowPairs.rowAndOrigIndex;
|
|
176
|
+
const noOutFiltered = preFilteredRowPairs.rowsCount === indexedArray.length;
|
|
177
|
+
if (nothingToDo && noOutFiltered) {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
if (!nothingToDo) {
|
|
181
|
+
indexedArray = [...indexedArray];
|
|
182
|
+
}
|
|
183
|
+
if (nothingToDo)
|
|
184
|
+
;
|
|
185
|
+
else if (!groupingColumnsCount) {
|
|
186
|
+
const sortingComparator = makeCompositeComparatorFromCodedColumns(
|
|
187
|
+
codedColumns,
|
|
188
|
+
columns,
|
|
189
|
+
// @ts-ignore I don't know how to fix this one
|
|
190
|
+
(ar) => ar[0]
|
|
191
|
+
);
|
|
192
|
+
indexedArray.sort(sortingComparator);
|
|
60
193
|
} else {
|
|
61
|
-
|
|
194
|
+
const groups = groupRows(groupingColumnsCount, columns, indexedArray);
|
|
195
|
+
const interGroupSortingComparator = makeCompositeComparatorFromCodedColumns(
|
|
196
|
+
codedColumns,
|
|
197
|
+
columns,
|
|
198
|
+
(ar) => ar[0][0]
|
|
199
|
+
);
|
|
200
|
+
groups.sort(interGroupSortingComparator);
|
|
201
|
+
const intraGroupSortingComparator = makeCompositeComparatorFromCodedColumns(
|
|
202
|
+
codedColumns,
|
|
203
|
+
columns,
|
|
204
|
+
// @ts-ignore I don't know how to fix this one
|
|
205
|
+
(ar) => ar[0]
|
|
206
|
+
);
|
|
207
|
+
indexedArray = [];
|
|
208
|
+
groups.forEach((group) => {
|
|
209
|
+
group.sort(intraGroupSortingComparator);
|
|
210
|
+
indexedArray.push(...group);
|
|
211
|
+
});
|
|
62
212
|
}
|
|
213
|
+
return indexedArray;
|
|
63
214
|
};
|
|
64
215
|
class KeyedColumnsRowIndexer {
|
|
65
216
|
constructor(isThreeState = true, singleColumnByDefault = false, delegatorCallback = null, versionSetter = null) {
|
|
66
217
|
this.hasVersionSetter = () => {
|
|
67
|
-
return !!this.
|
|
218
|
+
return !!this.versionSetter;
|
|
68
219
|
};
|
|
69
220
|
this.getVersion = () => {
|
|
70
221
|
return this.version;
|
|
71
222
|
};
|
|
72
|
-
this.
|
|
223
|
+
this.bumpVersion = (isFilter = false) => {
|
|
73
224
|
this.version += 1;
|
|
74
225
|
if (isFilter) {
|
|
75
226
|
this.filterVersion = this.version;
|
|
@@ -80,8 +231,8 @@ class KeyedColumnsRowIndexer {
|
|
|
80
231
|
this.indirectionStatus = updated_ok ? "done" : "no_luck";
|
|
81
232
|
});
|
|
82
233
|
}
|
|
83
|
-
if (this.
|
|
84
|
-
this.
|
|
234
|
+
if (this.versionSetter) {
|
|
235
|
+
this.versionSetter(this.version);
|
|
85
236
|
}
|
|
86
237
|
};
|
|
87
238
|
this.updatePreferences = (preferences) => {
|
|
@@ -94,7 +245,8 @@ class KeyedColumnsRowIndexer {
|
|
|
94
245
|
if (preferences.singleColumnByDefault !== this.singleColumnByDefault) {
|
|
95
246
|
this.singleColumnByDefault = preferences.singleColumnByDefault;
|
|
96
247
|
}
|
|
97
|
-
this.
|
|
248
|
+
this.bumpVersion();
|
|
249
|
+
return true;
|
|
98
250
|
};
|
|
99
251
|
this.preFilterRowMapping = (columns, rows, rowFilter) => {
|
|
100
252
|
var _a;
|
|
@@ -103,17 +255,17 @@ class KeyedColumnsRowIndexer {
|
|
|
103
255
|
}
|
|
104
256
|
const ri = [];
|
|
105
257
|
const cs = {};
|
|
106
|
-
|
|
258
|
+
columns.forEach((col) => {
|
|
107
259
|
const helper = getHelper(col);
|
|
108
260
|
const colStat = helper.initStat();
|
|
109
261
|
if (colStat) {
|
|
110
262
|
cs[col.dataKey] = colStat;
|
|
111
263
|
}
|
|
112
|
-
}
|
|
264
|
+
});
|
|
113
265
|
for (let rowIdx = 0; rowIdx < rows.length; rowIdx++) {
|
|
114
266
|
const row = rows[rowIdx];
|
|
115
267
|
let acceptsRow = true;
|
|
116
|
-
|
|
268
|
+
const acceptedOnRow = {};
|
|
117
269
|
for (let colIdx = 0; colIdx < columns.length; colIdx++) {
|
|
118
270
|
const col = columns[colIdx];
|
|
119
271
|
const helper = getHelper(col);
|
|
@@ -141,11 +293,11 @@ class KeyedColumnsRowIndexer {
|
|
|
141
293
|
acceptsRow = this.byRowFilter(row);
|
|
142
294
|
}
|
|
143
295
|
if (acceptsRow) {
|
|
144
|
-
|
|
145
|
-
const col = columns[idx];
|
|
296
|
+
Object.entries(acceptedOnRow).forEach(([idx, value]) => {
|
|
297
|
+
const col = columns[Number(idx)];
|
|
146
298
|
const helper = getHelper(col);
|
|
147
299
|
helper.updateStat(cs[col.dataKey], value, true);
|
|
148
|
-
}
|
|
300
|
+
});
|
|
149
301
|
ri.push([row, rowIdx]);
|
|
150
302
|
}
|
|
151
303
|
}
|
|
@@ -157,7 +309,7 @@ class KeyedColumnsRowIndexer {
|
|
|
157
309
|
}
|
|
158
310
|
const codedColumns = !this.sortingState ? null : codedColumnsFromKeyAndDirection(this.sortingState, columns);
|
|
159
311
|
const groupingColumnsCount = this.groupingCount;
|
|
160
|
-
|
|
312
|
+
const indexedArray = groupAndSort(
|
|
161
313
|
preFilteredRowPairs,
|
|
162
314
|
codedColumns,
|
|
163
315
|
groupingColumnsCount,
|
|
@@ -191,7 +343,7 @@ class KeyedColumnsRowIndexer {
|
|
|
191
343
|
this.sortingState = [[colKey, canonicalForSign(1)]];
|
|
192
344
|
this.lastUsedRank = 1;
|
|
193
345
|
} else {
|
|
194
|
-
|
|
346
|
+
const wasAtIdx = keyAndDirections.findIndex((p) => p[0] === colKey);
|
|
195
347
|
const wasFuzzyDir = wasAtIdx < 0 ? 0 : keyAndDirections[wasAtIdx][1];
|
|
196
348
|
const wasSignDir = giveDirSignFor(wasFuzzyDir);
|
|
197
349
|
if (change_way === "Simple") {
|
|
@@ -226,28 +378,23 @@ class KeyedColumnsRowIndexer {
|
|
|
226
378
|
} else {
|
|
227
379
|
(_f = this.sortingState) == null ? void 0 : _f.splice(wasAtIdx, 1);
|
|
228
380
|
}
|
|
229
|
-
} else {
|
|
230
|
-
if (
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
return false;
|
|
234
|
-
} else {
|
|
235
|
-
(_g = this.sortingState) == null ? void 0 : _g.splice(this.lastUsedRank - 1, 0, [
|
|
236
|
-
colKey,
|
|
237
|
-
canonicalForSign(1)
|
|
238
|
-
]);
|
|
239
|
-
}
|
|
240
|
-
} else if (!(this.isThreeState && wasSignDir === -1)) {
|
|
241
|
-
this.sortingState[wasAtIdx][1] = canonicalForSign(
|
|
242
|
-
-wasSignDir
|
|
243
|
-
);
|
|
244
|
-
} else {
|
|
245
|
-
this.lastUsedRank = wasAtIdx + 1;
|
|
246
|
-
(_h = this.sortingState) == null ? void 0 : _h.splice(wasAtIdx, 1);
|
|
381
|
+
} else if (wasAtIdx < 0) {
|
|
382
|
+
if (this.lastUsedRank - 1 > // @ts-ignore could be undefined, how to handle this case ?
|
|
383
|
+
this.sortingState.length) {
|
|
384
|
+
return false;
|
|
247
385
|
}
|
|
386
|
+
(_g = this.sortingState) == null ? void 0 : _g.splice(this.lastUsedRank - 1, 0, [
|
|
387
|
+
colKey,
|
|
388
|
+
canonicalForSign(1)
|
|
389
|
+
]);
|
|
390
|
+
} else if (!(this.isThreeState && wasSignDir === -1)) {
|
|
391
|
+
this.sortingState[wasAtIdx][1] = canonicalForSign(-wasSignDir);
|
|
392
|
+
} else {
|
|
393
|
+
this.lastUsedRank = wasAtIdx + 1;
|
|
394
|
+
(_h = this.sortingState) == null ? void 0 : _h.splice(wasAtIdx, 1);
|
|
248
395
|
}
|
|
249
396
|
}
|
|
250
|
-
this.
|
|
397
|
+
this.bumpVersion();
|
|
251
398
|
return true;
|
|
252
399
|
};
|
|
253
400
|
this.codedRankByColumnIndex = (columns) => {
|
|
@@ -278,7 +425,7 @@ class KeyedColumnsRowIndexer {
|
|
|
278
425
|
}
|
|
279
426
|
return giveDirSignFor(colSorting[1]) * (idx + 1);
|
|
280
427
|
};
|
|
281
|
-
this.
|
|
428
|
+
this.getColFilterParams = (colKey, isForUser) => {
|
|
282
429
|
if (!colKey || !this.byColFilter) {
|
|
283
430
|
return void 0;
|
|
284
431
|
}
|
|
@@ -288,7 +435,7 @@ class KeyedColumnsRowIndexer {
|
|
|
288
435
|
}
|
|
289
436
|
return colFilter[isForUser ? "userParams" : "outerParams"];
|
|
290
437
|
};
|
|
291
|
-
this.
|
|
438
|
+
this.setColFilterParams = (colKey, params, isForUser) => {
|
|
292
439
|
var _a;
|
|
293
440
|
if (!colKey) {
|
|
294
441
|
if (params) {
|
|
@@ -321,21 +468,21 @@ class KeyedColumnsRowIndexer {
|
|
|
321
468
|
}
|
|
322
469
|
}
|
|
323
470
|
if (isForUser) {
|
|
324
|
-
this.
|
|
471
|
+
this.bumpVersion(true);
|
|
325
472
|
}
|
|
326
473
|
return true;
|
|
327
474
|
};
|
|
328
475
|
this.getColFilterOuterParams = (colKey) => {
|
|
329
|
-
return this.
|
|
476
|
+
return this.getColFilterParams(colKey, false);
|
|
330
477
|
};
|
|
331
478
|
this.setColFilterOuterParams = (colKey, outerParams) => {
|
|
332
|
-
return this.
|
|
479
|
+
return this.setColFilterParams(colKey, outerParams, false);
|
|
333
480
|
};
|
|
334
481
|
this.getColFilterUserParams = (colKey) => {
|
|
335
|
-
return this.
|
|
482
|
+
return this.getColFilterParams(colKey, true);
|
|
336
483
|
};
|
|
337
484
|
this.setColFilterUserParams = (colKey, params) => {
|
|
338
|
-
return this.
|
|
485
|
+
return this.setColFilterParams(colKey, params, true);
|
|
339
486
|
};
|
|
340
487
|
this.getUserFiltering = () => {
|
|
341
488
|
const ret = {};
|
|
@@ -354,9 +501,9 @@ class KeyedColumnsRowIndexer {
|
|
|
354
501
|
throw new Error("row filter should be a function");
|
|
355
502
|
}
|
|
356
503
|
this.byRowFilter = rowFilterFunc;
|
|
357
|
-
this.
|
|
504
|
+
this.bumpVersion();
|
|
358
505
|
};
|
|
359
|
-
this.
|
|
506
|
+
this.versionSetter = versionSetter;
|
|
360
507
|
this.version = 0;
|
|
361
508
|
this.filterVersion = 0;
|
|
362
509
|
this.delegatorCallback = delegatorCallback;
|
|
@@ -370,167 +517,15 @@ class KeyedColumnsRowIndexer {
|
|
|
370
517
|
this.byRowFilter = null;
|
|
371
518
|
}
|
|
372
519
|
static get CHANGE_WAYS() {
|
|
373
|
-
return
|
|
520
|
+
return ChangeWays;
|
|
374
521
|
}
|
|
375
522
|
}
|
|
376
|
-
const giveDirSignFor = (fuzzySign) => {
|
|
377
|
-
if (fuzzySign < 0) {
|
|
378
|
-
return -1;
|
|
379
|
-
}
|
|
380
|
-
if (fuzzySign > 0) {
|
|
381
|
-
return 1;
|
|
382
|
-
}
|
|
383
|
-
if (fuzzySign === "asc") {
|
|
384
|
-
return 1;
|
|
385
|
-
}
|
|
386
|
-
if (fuzzySign === "desc") {
|
|
387
|
-
return -1;
|
|
388
|
-
}
|
|
389
|
-
return 0;
|
|
390
|
-
};
|
|
391
|
-
const canonicalForSign = (dirSign) => {
|
|
392
|
-
if (dirSign > 0) {
|
|
393
|
-
return "asc";
|
|
394
|
-
}
|
|
395
|
-
if (dirSign < 0) {
|
|
396
|
-
return "desc";
|
|
397
|
-
}
|
|
398
|
-
return void 0;
|
|
399
|
-
};
|
|
400
|
-
const codedColumnsFromKeyAndDirection = (keyAndDirections, columns) => {
|
|
401
|
-
if (!keyAndDirections) {
|
|
402
|
-
return null;
|
|
403
|
-
}
|
|
404
|
-
const ret = [];
|
|
405
|
-
const columIndexByKey = {};
|
|
406
|
-
for (let colIdx = 0; colIdx < columns.length; colIdx++) {
|
|
407
|
-
const col = columns[colIdx];
|
|
408
|
-
const colKey = col.dataKey;
|
|
409
|
-
columIndexByKey[colKey] = colIdx;
|
|
410
|
-
}
|
|
411
|
-
for (const knd of keyAndDirections) {
|
|
412
|
-
const colKey = knd[0];
|
|
413
|
-
const dir = knd[1];
|
|
414
|
-
const colIdx = columIndexByKey[colKey];
|
|
415
|
-
if (colIdx === void 0) {
|
|
416
|
-
continue;
|
|
417
|
-
}
|
|
418
|
-
const sign = giveDirSignFor(dir);
|
|
419
|
-
ret.push((colIdx + 1) * sign);
|
|
420
|
-
}
|
|
421
|
-
return ret;
|
|
422
|
-
};
|
|
423
|
-
const compareValue = (a, b, isNumeric, undefSign = -1) => {
|
|
424
|
-
if (a === void 0 && b === void 0) {
|
|
425
|
-
return 0;
|
|
426
|
-
} else {
|
|
427
|
-
if (a === void 0) {
|
|
428
|
-
return undefSign;
|
|
429
|
-
} else {
|
|
430
|
-
if (b === void 0) {
|
|
431
|
-
return -undefSign;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
if (!isNumeric) {
|
|
436
|
-
return ("" + a).localeCompare(b);
|
|
437
|
-
} else {
|
|
438
|
-
if (isNaN(a)) {
|
|
439
|
-
return isNaN(b) ? 0 : 1;
|
|
440
|
-
}
|
|
441
|
-
if (isNaN(b)) {
|
|
442
|
-
return -1;
|
|
443
|
-
}
|
|
444
|
-
return Math.sign(Number(a) - Number(b));
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
const makeCompositeComparatorFromCodedColumns = (codedColumns, columns, rowExtractor) => {
|
|
448
|
-
return (row_a_i, row_b_i) => {
|
|
449
|
-
const row_a = rowExtractor(row_a_i);
|
|
450
|
-
const row_b = rowExtractor(row_b_i);
|
|
451
|
-
for (const cc of codedColumns) {
|
|
452
|
-
const i = Math.abs(cc) - 1;
|
|
453
|
-
const mul = Math.sign(cc);
|
|
454
|
-
const col = columns[i];
|
|
455
|
-
const key = col.dataKey;
|
|
456
|
-
const sgn = compareValue(row_a[key], row_b[key], col.numeric);
|
|
457
|
-
if (sgn) {
|
|
458
|
-
return mul * sgn;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
return 0;
|
|
462
|
-
};
|
|
463
|
-
};
|
|
464
|
-
const groupRows = (groupingColumnsCount, columns, indexedArray) => {
|
|
465
|
-
const groupingComparator = makeCompositeComparatorFromCodedColumns(
|
|
466
|
-
Array(groupingColumnsCount).map((x, i) => i + 1),
|
|
467
|
-
columns,
|
|
468
|
-
//@ts-ignore does not match other pattern
|
|
469
|
-
(ar) => ar[0]
|
|
470
|
-
);
|
|
471
|
-
indexedArray.sort(groupingComparator);
|
|
472
|
-
const groups = [];
|
|
473
|
-
let prevSlice = null;
|
|
474
|
-
let inBuildGroup = [];
|
|
475
|
-
groups.push(inBuildGroup);
|
|
476
|
-
for (const p of indexedArray) {
|
|
477
|
-
const nextSlice = p[0].slice(0, groupingColumnsCount);
|
|
478
|
-
if (prevSlice === null || !equalsArray(prevSlice, nextSlice)) {
|
|
479
|
-
inBuildGroup = [];
|
|
480
|
-
groups.push(inBuildGroup);
|
|
481
|
-
}
|
|
482
|
-
inBuildGroup.push(p);
|
|
483
|
-
prevSlice = nextSlice;
|
|
484
|
-
}
|
|
485
|
-
return groups;
|
|
486
|
-
};
|
|
487
|
-
const groupAndSort = (preFilteredRowPairs, codedColumns, groupingColumnsCount, columns) => {
|
|
488
|
-
const nothingToDo = !codedColumns && !groupingColumnsCount;
|
|
489
|
-
let indexedArray = preFilteredRowPairs.rowAndOrigIndex;
|
|
490
|
-
const noOutFiltered = preFilteredRowPairs.rowsCount === indexedArray.length;
|
|
491
|
-
if (nothingToDo && noOutFiltered) {
|
|
492
|
-
return null;
|
|
493
|
-
} else if (!nothingToDo) {
|
|
494
|
-
indexedArray = [...indexedArray];
|
|
495
|
-
}
|
|
496
|
-
if (nothingToDo)
|
|
497
|
-
;
|
|
498
|
-
else if (!groupingColumnsCount) {
|
|
499
|
-
const sortingComparator = makeCompositeComparatorFromCodedColumns(
|
|
500
|
-
codedColumns,
|
|
501
|
-
columns,
|
|
502
|
-
//@ts-ignore I don't know how to fix this one
|
|
503
|
-
(ar) => ar[0]
|
|
504
|
-
);
|
|
505
|
-
indexedArray.sort(sortingComparator);
|
|
506
|
-
} else {
|
|
507
|
-
const groups = groupRows(groupingColumnsCount, columns, indexedArray);
|
|
508
|
-
const interGroupSortingComparator = makeCompositeComparatorFromCodedColumns(
|
|
509
|
-
codedColumns,
|
|
510
|
-
columns,
|
|
511
|
-
(ar) => ar[0][0]
|
|
512
|
-
);
|
|
513
|
-
groups.sort(interGroupSortingComparator);
|
|
514
|
-
const intraGroupSortingComparator = makeCompositeComparatorFromCodedColumns(
|
|
515
|
-
codedColumns,
|
|
516
|
-
columns,
|
|
517
|
-
//@ts-ignore I don't know how to fix this one
|
|
518
|
-
(ar) => ar[0]
|
|
519
|
-
);
|
|
520
|
-
indexedArray = [];
|
|
521
|
-
for (const group of groups) {
|
|
522
|
-
group.sort(intraGroupSortingComparator);
|
|
523
|
-
indexedArray.push(...group);
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
return indexedArray;
|
|
527
|
-
};
|
|
528
523
|
const forTesting = {
|
|
529
524
|
codedColumnsFromKeyAndDirection,
|
|
530
525
|
makeCompositeComparatorFromCodedColumns
|
|
531
526
|
};
|
|
532
527
|
export {
|
|
533
|
-
|
|
528
|
+
ChangeWays,
|
|
534
529
|
KeyedColumnsRowIndexer,
|
|
535
530
|
collectibleHelper,
|
|
536
531
|
forTesting,
|
|
@@ -10,8 +10,8 @@ import { Table, Column, AutoSizer } from "react-virtualized";
|
|
|
10
10
|
import CsvDownloader from "react-csv-downloader";
|
|
11
11
|
import { OverflowableText } from "../OverflowableText/overflowable-text.js";
|
|
12
12
|
import { toNestedGlobalSelectors, makeComposeClasses } from "../../utils/styles.js";
|
|
13
|
-
import { getHelper, collectibleHelper,
|
|
14
|
-
import ColumnHeader from "./ColumnHeader.js";
|
|
13
|
+
import { getHelper, collectibleHelper, ChangeWays, KeyedColumnsRowIndexer } from "./KeyedColumnsRowIndexer.js";
|
|
14
|
+
import { ColumnHeader } from "./ColumnHeader.js";
|
|
15
15
|
function getTextWidth(text) {
|
|
16
16
|
let canvas = (
|
|
17
17
|
//@ts-ignore this is questioning
|
|
@@ -300,13 +300,13 @@ const _MuiVirtualizedTable = class _MuiVirtualizedTable extends PureComponent {
|
|
|
300
300
|
this.openPopover(evt.target, colKey);
|
|
301
301
|
return;
|
|
302
302
|
}
|
|
303
|
-
let way =
|
|
303
|
+
let way = ChangeWays.SIMPLE;
|
|
304
304
|
if (evt.ctrlKey && evt.shiftKey) {
|
|
305
|
-
way =
|
|
305
|
+
way = ChangeWays.AMEND;
|
|
306
306
|
} else if (evt.ctrlKey) {
|
|
307
|
-
way =
|
|
307
|
+
way = ChangeWays.REMOVE;
|
|
308
308
|
} else if (evt.shiftKey) {
|
|
309
|
-
way =
|
|
309
|
+
way = ChangeWays.TAIL;
|
|
310
310
|
}
|
|
311
311
|
if ((_a = this.state.indexer) == null ? void 0 : _a.updateSortingFromUser(colKey, way)) {
|
|
312
312
|
this.setState({
|
|
@@ -4,5 +4,5 @@
|
|
|
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, generateMuiVirtualizedTableClass, } from './MuiVirtualizedTable';
|
|
8
|
-
export { KeyedColumnsRowIndexer,
|
|
7
|
+
export { default as MuiVirtualizedTable, generateMuiVirtualizedTableClass, } from './MuiVirtualizedTable';
|
|
8
|
+
export { KeyedColumnsRowIndexer, ChangeWays } from './KeyedColumnsRowIndexer';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as default2, generateMuiVirtualizedTableClass } from "./MuiVirtualizedTable.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ChangeWays, KeyedColumnsRowIndexer } from "./KeyedColumnsRowIndexer.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
ChangeWays,
|
|
5
5
|
KeyedColumnsRowIndexer,
|
|
6
|
-
default2 as
|
|
6
|
+
default2 as MuiVirtualizedTable,
|
|
7
7
|
generateMuiVirtualizedTableClass
|
|
8
8
|
};
|
|
@@ -13,5 +13,5 @@ export interface MultipleSelectionDialogProps {
|
|
|
13
13
|
handleValidate: (ids: string[]) => void;
|
|
14
14
|
titleId: string;
|
|
15
15
|
}
|
|
16
|
-
declare
|
|
16
|
+
declare function MultipleSelectionDialog({ options, selectedOptions, open, getOptionLabel, handleClose, handleValidate, titleId, }: MultipleSelectionDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export default MultipleSelectionDialog;
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Dialog, DialogTitle, DialogContent, Grid, FormControlLabel, Checkbox, List, DialogActions, Button } from "@mui/material";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { useState } from "react";
|
|
5
|
-
|
|
5
|
+
function MultipleSelectionDialog({
|
|
6
6
|
options,
|
|
7
7
|
selectedOptions,
|
|
8
8
|
open,
|
|
@@ -10,7 +10,7 @@ const MultipleSelectionDialog = ({
|
|
|
10
10
|
handleClose,
|
|
11
11
|
handleValidate,
|
|
12
12
|
titleId
|
|
13
|
-
})
|
|
13
|
+
}) {
|
|
14
14
|
const [selectedIds, setSelectedIds] = useState(selectedOptions ?? []);
|
|
15
15
|
const handleSelectAll = () => {
|
|
16
16
|
if (selectedIds.length !== options.length) {
|
|
@@ -33,12 +33,7 @@ const MultipleSelectionDialog = ({
|
|
|
33
33
|
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
34
34
|
FormControlLabel,
|
|
35
35
|
{
|
|
36
|
-
label: /* @__PURE__ */ jsx(
|
|
37
|
-
FormattedMessage,
|
|
38
|
-
{
|
|
39
|
-
id: "multiple_selection_dialog/selectAll"
|
|
40
|
-
}
|
|
41
|
-
),
|
|
36
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "multiple_selection_dialog/selectAll" }),
|
|
42
37
|
control: /* @__PURE__ */ jsx(
|
|
43
38
|
Checkbox,
|
|
44
39
|
{
|
|
@@ -73,15 +68,10 @@ const MultipleSelectionDialog = ({
|
|
|
73
68
|
] }) }),
|
|
74
69
|
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
75
70
|
/* @__PURE__ */ jsx(Button, { onClick: () => handleClose(), children: /* @__PURE__ */ jsx(FormattedMessage, { id: "multiple_selection_dialog/cancel" }) }),
|
|
76
|
-
/* @__PURE__ */ jsx(Button, { onClick: () => handleValidate(selectedIds), children: /* @__PURE__ */ jsx(
|
|
77
|
-
FormattedMessage,
|
|
78
|
-
{
|
|
79
|
-
id: "multiple_selection_dialog/validate"
|
|
80
|
-
}
|
|
81
|
-
) })
|
|
71
|
+
/* @__PURE__ */ jsx(Button, { onClick: () => handleValidate(selectedIds), children: /* @__PURE__ */ jsx(FormattedMessage, { id: "multiple_selection_dialog/validate" }) })
|
|
82
72
|
] })
|
|
83
73
|
] });
|
|
84
|
-
}
|
|
74
|
+
}
|
|
85
75
|
export {
|
|
86
76
|
MultipleSelectionDialog as default
|
|
87
77
|
};
|
|
@@ -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 './MultipleSelectionDialog';
|
|
1
|
+
import { default as defaultMultipleSelectionDialog } from './MultipleSelectionDialog';
|
|
2
|
+
|
|
3
|
+
export default defaultMultipleSelectionDialog;
|
|
@@ -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 './overflowable-text';
|
|
1
|
+
import { default as defaultOverflowableText } from './overflowable-text';
|
|
2
|
+
|
|
3
|
+
export default defaultOverflowableText;
|
|
@@ -84,9 +84,9 @@ const OverflowableText = styled(
|
|
|
84
84
|
{
|
|
85
85
|
...props,
|
|
86
86
|
ref: element,
|
|
87
|
-
children: children || text,
|
|
88
87
|
className,
|
|
89
|
-
sx: isMultiLine ? multilineOverflowStyle(maxLineCount) : overflowStyle.overflow
|
|
88
|
+
sx: isMultiLine ? multilineOverflowStyle(maxLineCount) : overflowStyle.overflow,
|
|
89
|
+
children: children || text
|
|
90
90
|
}
|
|
91
91
|
)
|
|
92
92
|
}
|