@adaptabletools/adaptable 20.3.0 → 21.0.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +2 -1
- package/agGrid.js +2 -1
- package/base.css +36 -15
- package/base.css.map +1 -1
- package/icons/add-circle.svg +1 -0
- package/icons/add.svg +1 -0
- package/icons/alert.svg +1 -0
- package/icons/align-center.svg +1 -0
- package/icons/align-justify.svg +1 -0
- package/icons/align-left.svg +1 -0
- package/icons/align-right.svg +1 -0
- package/icons/arrow-down-long.svg +1 -0
- package/icons/arrow-down.svg +1 -0
- package/icons/arrow-expand.svg +1 -0
- package/icons/arrow-left.svg +1 -0
- package/icons/arrow-right.svg +1 -0
- package/icons/arrow-up-long.svg +1 -0
- package/icons/arrow-up.svg +1 -0
- package/icons/assignment.svg +1 -0
- package/icons/badge.svg +1 -0
- package/icons/bold.svg +1 -0
- package/icons/boolean-list.svg +1 -0
- package/icons/brain.svg +1 -0
- package/icons/broadcast.svg +1 -0
- package/icons/brush.svg +1 -0
- package/icons/building.svg +1 -0
- package/icons/calculated-column.svg +1 -0
- package/icons/calendar.svg +1 -0
- package/icons/call.svg +1 -0
- package/icons/case-lower.svg +1 -0
- package/icons/case-sentence.svg +1 -0
- package/icons/case-upper.svg +1 -0
- package/icons/cells.svg +1 -0
- package/icons/chart.svg +1 -0
- package/icons/chat.svg +1 -0
- package/icons/check-circle.svg +1 -0
- package/icons/check.svg +1 -0
- package/icons/checked.svg +1 -0
- package/icons/clipboard.svg +1 -0
- package/icons/clone.svg +1 -0
- package/icons/close.svg +1 -0
- package/icons/cloud-upload.svg +1 -0
- package/icons/collapse-all.svg +1 -0
- package/icons/collapse.svg +1 -0
- package/icons/color-palette.svg +1 -0
- package/icons/column-add.svg +1 -0
- package/icons/column-outline.svg +1 -0
- package/icons/columns.svg +1 -0
- package/icons/comment.svg +1 -0
- package/icons/comments.svg +1 -0
- package/icons/contact.svg +1 -0
- package/icons/contains.svg +1 -0
- package/icons/copy.svg +1 -0
- package/icons/csv.svg +1 -0
- package/icons/dashboard.svg +1 -0
- package/icons/data-set.svg +1 -0
- package/icons/date-range.svg +1 -0
- package/icons/delete.svg +1 -0
- package/icons/division.svg +1 -0
- package/icons/dock.svg +1 -0
- package/icons/dollar.svg +1 -0
- package/icons/download.svg +1 -0
- package/icons/downloaded.svg +1 -0
- package/icons/drag.svg +1 -0
- package/icons/edit-table.svg +1 -0
- package/icons/edit.svg +1 -0
- package/icons/ends-with.svg +1 -0
- package/icons/equals.svg +1 -0
- package/icons/equation.svg +1 -0
- package/icons/error.svg +1 -0
- package/icons/excel.svg +1 -0
- package/icons/expand-all.svg +1 -0
- package/icons/expand.svg +1 -0
- package/icons/exponent.svg +1 -0
- package/icons/export-data.svg +1 -0
- package/icons/export.svg +1 -0
- package/icons/fast-backward.svg +1 -0
- package/icons/fast-forward.svg +1 -0
- package/icons/fdc3.svg +1 -0
- package/icons/filled-circle.svg +1 -0
- package/icons/filter-list.svg +1 -0
- package/icons/filter-off.svg +1 -0
- package/icons/filter.svg +1 -0
- package/icons/flag.svg +1 -0
- package/icons/folder-open.svg +1 -0
- package/icons/folder-shared.svg +1 -0
- package/icons/folder.svg +1 -0
- package/icons/function.svg +1 -0
- package/icons/gradient.svg +1 -0
- package/icons/greater-than-or-equal.svg +1 -0
- package/icons/greater-than.svg +1 -0
- package/icons/grid-filter.svg +1 -0
- package/icons/grid-info.svg +1 -0
- package/icons/grid.svg +1 -0
- package/icons/history.svg +1 -0
- package/icons/home.svg +1 -0
- package/icons/horizontal-lines.svg +1 -0
- package/icons/import-export.svg +1 -0
- package/icons/import.svg +1 -0
- package/icons/info.svg +1 -0
- package/icons/interactions.svg +1 -0
- package/icons/italic.svg +1 -0
- package/icons/json.svg +1 -0
- package/icons/laptop.svg +1 -0
- package/icons/less-than-or-equal.svg +1 -0
- package/icons/less-than.svg +1 -0
- package/icons/lightning.svg +1 -0
- package/icons/link.svg +1 -0
- package/icons/list.svg +1 -0
- package/icons/logout.svg +1 -0
- package/icons/mail.svg +1 -0
- package/icons/menu.svg +1 -0
- package/icons/minus.svg +1 -0
- package/icons/money.svg +1 -0
- package/icons/multiplication.svg +1 -0
- package/icons/newpage.svg +1 -0
- package/icons/news.svg +1 -0
- package/icons/not-contains.svg +1 -0
- package/icons/not-equal.svg +1 -0
- package/icons/note.svg +1 -0
- package/icons/open-in-new.svg +1 -0
- package/icons/order.svg +1 -0
- package/icons/organisation.svg +1 -0
- package/icons/overline.svg +1 -0
- package/icons/paperclip.svg +1 -0
- package/icons/pause.svg +1 -0
- package/icons/percent-tag.svg +1 -0
- package/icons/percent.svg +1 -0
- package/icons/person.svg +1 -0
- package/icons/pie-chart.svg +1 -0
- package/icons/play.svg +1 -0
- package/icons/plus.svg +1 -0
- package/icons/quote.svg +1 -0
- package/icons/refresh.svg +1 -0
- package/icons/regex.svg +1 -0
- package/icons/reminder.svg +1 -0
- package/icons/resume.svg +1 -0
- package/icons/rows.svg +1 -0
- package/icons/save.svg +1 -0
- package/icons/schedule.svg +1 -0
- package/icons/science.svg +1 -0
- package/icons/search-table.svg +1 -0
- package/icons/search.svg +1 -0
- package/icons/select-all.svg +1 -0
- package/icons/select-fwd.svg +1 -0
- package/icons/select-off.svg +1 -0
- package/icons/settings.svg +1 -0
- package/icons/sort-asc.svg +1 -0
- package/icons/sort-desc.svg +1 -0
- package/icons/spanner.svg +1 -0
- package/icons/spark-line.svg +1 -0
- package/icons/starts-with.svg +1 -0
- package/icons/statusbar.svg +1 -0
- package/icons/stop.svg +1 -0
- package/icons/strikethrough.svg +1 -0
- package/icons/styled-grid.svg +1 -0
- package/icons/sync.svg +1 -0
- package/icons/tab-unselected.svg +1 -0
- package/icons/target.svg +1 -0
- package/icons/theme.svg +1 -0
- package/icons/traffic-lights.svg +1 -0
- package/icons/triangle-down.svg +1 -0
- package/icons/triangle-up.svg +1 -0
- package/icons/unchecked.svg +1 -0
- package/icons/underline.svg +1 -0
- package/icons/undo.svg +1 -0
- package/icons/unfilled-circle.svg +1 -0
- package/icons/upload.svg +1 -0
- package/icons/visibility-off-bold.svg +1 -0
- package/icons/visibility-off.svg +1 -0
- package/icons/visibility-on-bold.svg +1 -0
- package/icons/visibility-on.svg +1 -0
- package/icons/warning.svg +1 -0
- package/index.css +32 -15
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/src/AdaptableInterfaces/IAdaptable.d.ts +10 -5
- package/src/AdaptableOptions/ColumnOptions.d.ts +38 -38
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -2
- package/src/AdaptableOptions/EditOptions.d.ts +4 -7
- package/src/AdaptableOptions/FilterOptions.d.ts +50 -15
- package/src/AdaptableOptions/LayoutOptions.d.ts +40 -22
- package/src/AdaptableOptions/PredicateOptions.d.ts +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +7 -0
- package/src/AdaptableState/Common/AdaptablePredicate.js +2 -2
- package/src/AdaptableState/Common/CustomWindowConfig.d.ts +2 -2
- package/src/AdaptableState/Common/ExtendedLayout.d.ts +50 -0
- package/src/AdaptableState/FormatColumnState.d.ts +8 -1
- package/src/AdaptableState/InternalState.d.ts +1 -1
- package/src/AdaptableState/LayoutState.d.ts +26 -6
- package/src/AdaptableState/Selection/GridCell.d.ts +32 -0
- package/src/AdaptableState/StyledColumnState.d.ts +2 -2
- package/src/Api/AlertApi.d.ts +5 -11
- package/src/Api/ColumnApi.d.ts +17 -1
- package/src/Api/ColumnFilterApi.d.ts +32 -2
- package/src/Api/CustomSortApi.d.ts +5 -10
- package/src/Api/FlashingCellApi.d.ts +10 -6
- package/src/Api/FormatColumnApi.d.ts +8 -18
- package/src/Api/Implementation/AlertApiImpl.d.ts +6 -9
- package/src/Api/Implementation/AlertApiImpl.js +7 -6
- package/src/Api/Implementation/ApiBase.d.ts +2 -12
- package/src/Api/Implementation/ApiBase.js +5 -5
- package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -2
- package/src/Api/Implementation/ColumnApiImpl.js +59 -23
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +7 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.js +76 -3
- package/src/Api/Implementation/ColumnScopeApiImpl.js +10 -2
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -10
- package/src/Api/Implementation/CustomSortApiImpl.js +6 -4
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +7 -6
- package/src/Api/Implementation/FlashingCellApiImpl.js +11 -8
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +8 -18
- package/src/Api/Implementation/FormatColumnApiImpl.js +10 -9
- package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -2
- package/src/Api/Implementation/LayoutApiImpl.js +107 -13
- package/src/Api/Implementation/LayoutHelpers.d.ts +1 -0
- package/src/Api/Implementation/LayoutHelpers.js +23 -4
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +7 -5
- package/src/Api/Implementation/PlusMinusApiImpl.js +10 -7
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +9 -16
- package/src/Api/Implementation/ScheduleApiImpl.js +15 -17
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +5 -6
- package/src/Api/Implementation/ShortcutApiImpl.js +7 -8
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +7 -8
- package/src/Api/Implementation/StyledColumnApiImpl.js +12 -9
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +10 -9
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +3 -0
- package/src/Api/Internal/AlertInternalApi.d.ts +6 -6
- package/src/Api/Internal/AlertInternalApi.js +10 -10
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +13 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +93 -1
- package/src/Api/Internal/ColumnInternalApi.d.ts +2 -1
- package/src/Api/Internal/ColumnInternalApi.js +4 -0
- package/src/Api/Internal/DashboardInternalApi.js +1 -1
- package/src/Api/Internal/EntitlementInternalApi.d.ts +1 -0
- package/src/Api/Internal/EntitlementInternalApi.js +8 -0
- package/src/Api/Internal/ExportInternalApi.js +1 -1
- package/src/Api/Internal/FlashingCellInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +8 -11
- package/src/Api/Internal/FormatColumnInternalApi.js +13 -13
- package/src/Api/Internal/GridInternalApi.d.ts +7 -10
- package/src/Api/Internal/GridInternalApi.js +76 -27
- package/src/Api/Internal/LayoutInternalApi.d.ts +10 -5
- package/src/Api/Internal/LayoutInternalApi.js +86 -6
- package/src/Api/Internal/PredicateInternalApi.d.ts +2 -6
- package/src/Api/Internal/PredicateInternalApi.js +4 -6
- package/src/Api/Internal/UserInterfaceInternalApi.d.ts +1 -0
- package/src/Api/Internal/UserInterfaceInternalApi.js +10 -3
- package/src/Api/LayoutApi.d.ts +7 -2
- package/src/Api/PlusMinusApi.d.ts +11 -7
- package/src/Api/ScheduleApi.d.ts +9 -16
- package/src/Api/ShortcutApi.d.ts +5 -6
- package/src/Api/StyledColumnApi.d.ts +10 -7
- package/src/Api/UserInterfaceApi.d.ts +5 -6
- package/src/Redux/ActionsReducers/InternalRedux.d.ts +4 -4
- package/src/Redux/ActionsReducers/InternalRedux.js +7 -7
- package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +7 -0
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +13 -0
- package/src/Redux/Store/AdaptableStore.js +10 -10
- package/src/Strategy/AdaptableModuleBase.d.ts +14 -4
- package/src/Strategy/AdaptableModuleBase.js +46 -9
- package/src/Strategy/AlertModule.d.ts +3 -4
- package/src/Strategy/AlertModule.js +7 -4
- package/src/Strategy/CalculatedColumnModule.js +2 -2
- package/src/Strategy/CellSummaryModule.js +2 -2
- package/src/Strategy/ChartingModule.d.ts +3 -1
- package/src/Strategy/ChartingModule.js +9 -3
- package/src/Strategy/ColumnFilterModule.d.ts +1 -1
- package/src/Strategy/ColumnFilterModule.js +31 -15
- package/src/Strategy/ColumnInfoModule.js +2 -2
- package/src/Strategy/CommentModule.d.ts +1 -1
- package/src/Strategy/CommentModule.js +3 -3
- package/src/Strategy/CustomSortModule.d.ts +3 -4
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/DashboardModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.d.ts +2 -1
- package/src/Strategy/DataChangeHistoryModule.js +3 -10
- package/src/Strategy/DataImportModule.js +3 -3
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Strategy/Fdc3Module.js +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +3 -5
- package/src/Strategy/FlashingCellModule.js +3 -3
- package/src/Strategy/FormatColumnModule.d.ts +3 -4
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
- package/src/Strategy/FreeTextColumnModule.js +2 -2
- package/src/Strategy/GridInfoModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +7 -3
- package/src/Strategy/LayoutModule.js +11 -11
- package/src/Strategy/NoteModule.d.ts +1 -1
- package/src/Strategy/NoteModule.js +3 -3
- package/src/Strategy/PlusMinusModule.d.ts +3 -4
- package/src/Strategy/PlusMinusModule.js +2 -2
- package/src/Strategy/QuickSearchModule.d.ts +2 -0
- package/src/Strategy/QuickSearchModule.js +9 -0
- package/src/Strategy/ScheduleModule.d.ts +3 -4
- package/src/Strategy/ScheduleModule.js +2 -2
- package/src/Strategy/SettingsPanelModule.js +1 -1
- package/src/Strategy/ShortcutModule.d.ts +3 -4
- package/src/Strategy/ShortcutModule.js +2 -2
- package/src/Strategy/StatusBarModule.d.ts +3 -2
- package/src/Strategy/StatusBarModule.js +6 -3
- package/src/Strategy/StyledColumnModule.d.ts +3 -4
- package/src/Strategy/StyledColumnModule.js +2 -2
- package/src/Strategy/SystemStatusModule.js +2 -2
- package/src/Strategy/TeamSharingModule.d.ts +1 -1
- package/src/Strategy/TeamSharingModule.js +5 -2
- package/src/Strategy/ToolPanelModule.d.ts +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -4
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -0
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +15 -2
- package/src/Utilities/Extensions/ArrayExtensions.js +62 -13
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +1 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -0
- package/src/Utilities/ObjectFactory.d.ts +7 -3
- package/src/Utilities/ObjectFactory.js +26 -18
- package/src/Utilities/Services/AnnotationsService.js +1 -1
- package/src/Utilities/Services/Interface/IModuleService.d.ts +2 -1
- package/src/Utilities/Services/ModuleService.d.ts +3 -3
- package/src/Utilities/Services/ModuleService.js +19 -7
- package/src/View/AdaptableView.js +3 -1
- package/src/View/ColumnInfo/ColumnInfo.js +9 -3
- package/src/View/Components/AdaptableIconSelector/index.js +2 -3
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.d.ts +0 -1
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +2 -3
- package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.d.ts +0 -2
- package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +4 -7
- package/src/View/Components/ColumnFilter/ColumnFilter.js +11 -4
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
- package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -2
- package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +2 -2
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +1 -1
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +2 -2
- package/src/View/Components/ColumnFilter/utils.d.ts +2 -2
- package/src/View/Components/ColumnFilter/utils.js +6 -1
- package/src/View/Components/EntityRulesEditor/index.js +1 -2
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +6 -6
- package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -2
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +1 -1
- package/src/View/Components/Selectors/ColumnSelector.js +1 -1
- package/src/View/Components/Selectors/FieldSelector.js +1 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +1 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
- package/src/View/Dashboard/Dashboard.js +2 -2
- package/src/View/Dashboard/DashboardPopup.js +3 -1
- package/src/View/Dashboard/PinnedDashboard.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +9 -21
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +58 -21
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +11 -11
- package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -1
- package/src/View/Layout/TransposedPopup.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +5 -7
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +64 -9
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +5 -5
- package/src/View/StatusBar/AdaptableStatusBar.js +1 -4
- package/src/View/StatusBar/StatusBarPopup.js +1 -1
- package/src/View/Theme/ThemeSelector.js +1 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +11 -7
- package/src/agGrid/AdaptableAgGrid.js +251 -216
- package/src/agGrid/AdaptableFilterHandler.d.ts +18 -0
- package/src/agGrid/AdaptableFilterHandler.js +61 -0
- package/src/agGrid/AgGridAdapter.d.ts +3 -7
- package/src/agGrid/AgGridAdapter.js +13 -46
- package/src/agGrid/AgGridColumnAdapter.d.ts +2 -2
- package/src/agGrid/AgGridColumnAdapter.js +81 -36
- package/src/agGrid/AgGridFilterAdapter.d.ts +2 -0
- package/src/agGrid/AgGridFilterAdapter.js +48 -0
- package/src/agGrid/AgGridFloatingFilterAdapter.d.ts +2 -0
- package/src/agGrid/{FloatingFilterWrapper.js → AgGridFloatingFilterAdapter.js} +24 -35
- package/src/agGrid/AgGridModulesAdapter.d.ts +15 -0
- package/src/agGrid/AgGridModulesAdapter.js +66 -0
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
- package/src/agGrid/editors/AdaptablePercentageEditor/InternalAdaptablePercentageEditor.js +1 -1
- package/src/components/Dialog/index.js +1 -1
- package/src/components/Dropdown/Arrows.js +2 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +1 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +2 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -2
- package/src/components/FileDroppable/index.js +1 -1
- package/src/components/IconSelector/IconSelector.d.ts +2 -2
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/components/Select/Select.d.ts +1 -1
- package/src/components/Select/Select.js +116 -24
- package/src/components/icons/DefaultIcon.d.ts +0 -1
- package/src/components/icons/DefaultIcon.js +0 -6
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +6 -10
- package/src/layout-manager/src/index.d.ts +11 -3
- package/src/layout-manager/src/index.js +302 -87
- package/src/layout-manager/src/normalizeLayoutModel.js +7 -4
- package/src/layout-manager/src/simplifyLayoutModel.js +4 -4
- package/src/metamodel/adaptable.metamodel.d.ts +103 -40
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +2 -0
- package/src/migration/VersionUpgrade17.js +1 -1
- package/src/migration/VersionUpgrade20.js +1 -0
- package/src/migration/VersionUpgrade21.d.ts +6 -0
- package/src/migration/VersionUpgrade21.js +24 -0
- package/src/types.d.ts +7 -8
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/ExtendedLayoutInfo.d.ts +0 -27
- package/src/agGrid/FilterWrapper.d.ts +0 -2
- package/src/agGrid/FilterWrapper.js +0 -131
- package/src/agGrid/FloatingFilterWrapper.d.ts +0 -2
- package/src/agGrid/agGridModules.d.ts +0 -3
- package/src/agGrid/agGridModules.js +0 -15
- package/src/agGrid/getAgGridFilterNotifyModelFn.d.ts +0 -2
- package/src/agGrid/getAgGridFilterNotifyModelFn.js +0 -16
- /package/src/AdaptableState/Common/{ExtendedLayoutInfo.js → ExtendedLayout.js} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DoesFilterPassParams, FilterHandler, FilterHandlerParams } from 'ag-grid-enterprise';
|
|
2
|
+
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
|
+
import { ColumnSetupInfo } from '../AdaptableState/Common/ColumnSetupInfo';
|
|
4
|
+
import { InFilterValue } from '../AdaptableOptions/FilterOptions';
|
|
5
|
+
export declare class AdaptableFilterHandler implements FilterHandler {
|
|
6
|
+
private adaptableApi;
|
|
7
|
+
readonly colId: string;
|
|
8
|
+
private filterDisplayValues;
|
|
9
|
+
constructor(adaptableApi: AdaptableApi, columnSetup: ColumnSetupInfo);
|
|
10
|
+
doesFilterPass(params: DoesFilterPassParams): boolean;
|
|
11
|
+
getFilterDisplayValues(currentSearchValue: string): Promise<InFilterValue[]>;
|
|
12
|
+
onNewRowsLoaded(): void;
|
|
13
|
+
onAnyFilterChanged(): void;
|
|
14
|
+
resetFilterDisplayValues(): void;
|
|
15
|
+
refreshFilterDisplayValues(): Promise<InFilterValue<any>[]>;
|
|
16
|
+
refresh(params: FilterHandlerParams<any, any, any, any>): void;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export class AdaptableFilterHandler {
|
|
2
|
+
constructor(adaptableApi, columnSetup) {
|
|
3
|
+
this.adaptableApi = adaptableApi;
|
|
4
|
+
this.colId = columnSetup.colId;
|
|
5
|
+
}
|
|
6
|
+
doesFilterPass(params) {
|
|
7
|
+
try {
|
|
8
|
+
const rowNode = params.node;
|
|
9
|
+
// first assess if the Row is filterable - if not, then return true so it always appears in Grid
|
|
10
|
+
const isRowFilterable = this.adaptableApi.gridApi.internalApi.isRowFilterable(rowNode);
|
|
11
|
+
if (!isRowFilterable) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
const columnFilters = this.adaptableApi.filterApi.columnFilterApi
|
|
15
|
+
.getActiveColumnFilters()
|
|
16
|
+
.filter((columnFilter) => this.adaptableApi.filterApi.columnFilterApi.isColumnFilterActive(columnFilter))
|
|
17
|
+
.filter((columnFilter) => columnFilter.ColumnId === this.colId)
|
|
18
|
+
.filter((columnFilter) => {
|
|
19
|
+
const shouldEvaluateFilterOnClient = this.adaptableApi.expressionApi.internalApi.shouldEvaluatePredicatesInAdaptableQL('ColumnFilter', columnFilter, columnFilter.Predicates);
|
|
20
|
+
return shouldEvaluateFilterOnClient;
|
|
21
|
+
});
|
|
22
|
+
const anyFilterFailed = columnFilters.some((columnFilter) => !this.adaptableApi.filterApi.columnFilterApi.internalApi.evaluateColumnFilter(columnFilter, rowNode));
|
|
23
|
+
return anyFilterFailed ? false : true;
|
|
24
|
+
}
|
|
25
|
+
catch (ex) {
|
|
26
|
+
this.adaptableApi.consoleError(ex);
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
getFilterDisplayValues(currentSearchValue) {
|
|
31
|
+
if (!this.filterDisplayValues) {
|
|
32
|
+
this.filterDisplayValues =
|
|
33
|
+
this.adaptableApi.gridApi.internalApi.getDistinctFilterDisplayValuesForColumn({
|
|
34
|
+
columnId: this.colId,
|
|
35
|
+
currentSearchValue,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return this.filterDisplayValues;
|
|
39
|
+
}
|
|
40
|
+
onNewRowsLoaded() {
|
|
41
|
+
this.resetFilterDisplayValues();
|
|
42
|
+
}
|
|
43
|
+
onAnyFilterChanged() {
|
|
44
|
+
this.resetFilterDisplayValues();
|
|
45
|
+
}
|
|
46
|
+
resetFilterDisplayValues() {
|
|
47
|
+
// Reset the filter display values manually
|
|
48
|
+
this.filterDisplayValues = null;
|
|
49
|
+
}
|
|
50
|
+
async refreshFilterDisplayValues() {
|
|
51
|
+
this.resetFilterDisplayValues();
|
|
52
|
+
return this.getFilterDisplayValues('');
|
|
53
|
+
}
|
|
54
|
+
refresh(params) {
|
|
55
|
+
// No specific refresh logic needed for this handler
|
|
56
|
+
// The filter display values will be reset on new rows loaded or any filter changed
|
|
57
|
+
}
|
|
58
|
+
destroy() {
|
|
59
|
+
this.filterDisplayValues = null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColDef, ColGroupDef, Column, GridApi, GridOptions, IRowNode, ManagedGridOptionKey, ManagedGridOptions, Module
|
|
1
|
+
import { ColDef, ColGroupDef, Column, GridApi, GridOptions, IRowNode, ManagedGridOptionKey, ManagedGridOptions, Module } from 'ag-grid-enterprise';
|
|
2
2
|
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
3
3
|
import { AdaptableColumn, AdaptableColumnGroup } from '../AdaptableState/Common/AdaptableColumn';
|
|
4
4
|
import { SelectedCellInfo } from '../AdaptableState/Selection/SelectedCellInfo';
|
|
@@ -9,8 +9,8 @@ export declare class AgGridAdapter {
|
|
|
9
9
|
private DANGER_USE_GETTER_gridApi;
|
|
10
10
|
private DANGER_gridApi_from_args;
|
|
11
11
|
private DANGER_updateGridOptionsMonkeyPatcher;
|
|
12
|
-
private
|
|
13
|
-
private
|
|
12
|
+
private DANGER_doFiltersPassMonkeyPatcher;
|
|
13
|
+
private DANGER_isAggFilterPresentMonkeyPatcher;
|
|
14
14
|
initialGridOptions: GridOptions;
|
|
15
15
|
private _agGridId;
|
|
16
16
|
constructor(_adaptableInstance: AdaptableAgGrid, config?: {
|
|
@@ -28,9 +28,6 @@ export declare class AgGridAdapter {
|
|
|
28
28
|
monkeyPatchingAggColumnFilters(): void;
|
|
29
29
|
private DANGER_getPrivateAgGridBeans;
|
|
30
30
|
DANGER_getLiveGridOptions(): GridOptions<any>;
|
|
31
|
-
isAgGridModuleRegistered(moduleName: ModuleName): boolean;
|
|
32
|
-
getAgGridRegisteredModules(): Module[];
|
|
33
|
-
getAgGridRegisteredModuleNames(): ModuleName[];
|
|
34
31
|
getAgGridRootElement(): HTMLElement;
|
|
35
32
|
/**
|
|
36
33
|
* When AG Grid is rendered the first time, the AG GridApi is not yet set in the Adaptable context (as it's set only AFTER the grid is fully initialised)
|
|
@@ -42,7 +39,6 @@ export declare class AgGridAdapter {
|
|
|
42
39
|
getGridOption<Key extends keyof GridOptions>(key: Key): GridOptions[Key];
|
|
43
40
|
setGridOption<Key extends ManagedGridOptionKey>(key: Key, value: GridOptions[Key]): void;
|
|
44
41
|
getUserGridOptionsProperty<T extends keyof GridOptions>(propertyName: T): GridOptions[T];
|
|
45
|
-
updateColumnFilterActiveState(): void;
|
|
46
42
|
getColumnDefinitionsInclSpecialColumns(agGridColDefs?: GridOptions['columnDefs']): GridOptions['columnDefs'];
|
|
47
43
|
private enhanceColDefsWithSpecialColumns;
|
|
48
44
|
private getSpecialColDefs;
|
|
@@ -4,7 +4,6 @@ import { ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME } from '../Utilities/Constan
|
|
|
4
4
|
import { createUuid } from '../AdaptableState/Uuid';
|
|
5
5
|
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
6
6
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
7
|
-
import { ALL_AG_GRID_MODULES } from './agGridModules';
|
|
8
7
|
import { agGridDataTypeDefinitions, ALL_ADAPTABLE_DATA_TYPES } from './agGridDataTypeDefinitions';
|
|
9
8
|
import { isPivotGrandTotal } from '../Api/Implementation/ColumnApiImpl';
|
|
10
9
|
import { isPivotColumnTotal } from '../layout-manager/src/isPivotColumnTotal';
|
|
@@ -16,8 +15,6 @@ export class AgGridAdapter {
|
|
|
16
15
|
constructor(_adaptableInstance, config) {
|
|
17
16
|
this._adaptableInstance = _adaptableInstance;
|
|
18
17
|
const columnApiModuleReference = config?.getAgGridColumnApiModuleReference?.() ?? getColumnApiModule();
|
|
19
|
-
const beans = columnApiModuleReference?.beans;
|
|
20
|
-
console.log(beans?.length);
|
|
21
18
|
const ColumnDefFactory_Prototype = columnApiModuleReference?.beans?.[0]?.prototype;
|
|
22
19
|
if (!ColumnDefFactory_Prototype) {
|
|
23
20
|
console.error(`CRITICAL: could not get hold of AG Grid beans, this should never happen!`);
|
|
@@ -40,8 +37,8 @@ export class AgGridAdapter {
|
|
|
40
37
|
this.DANGER_gridApi_from_args = null;
|
|
41
38
|
this.DANGER_USE_GETTER_gridApi = null;
|
|
42
39
|
this.DANGER_updateGridOptionsMonkeyPatcher = null;
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
40
|
+
this.DANGER_doFiltersPassMonkeyPatcher = null;
|
|
41
|
+
this.DANGER_isAggFilterPresentMonkeyPatcher = null;
|
|
45
42
|
this._adaptableInstance = null;
|
|
46
43
|
}
|
|
47
44
|
get adaptableOptions() {
|
|
@@ -126,7 +123,13 @@ export class AgGridAdapter {
|
|
|
126
123
|
// monkey patch ColumnFilterService.doAggregateFiltersPass because currently Adaptable does NOT override the ColumnFilters
|
|
127
124
|
// (it uses the `doesExternalFilterPass` to evaluate the filters on the client side)
|
|
128
125
|
// #doAggregateFiltersPassMonkeyPatcher
|
|
129
|
-
|
|
126
|
+
const original_doFilterPass = agGridColumnFilterService.doFiltersPass;
|
|
127
|
+
this.DANGER_doFiltersPassMonkeyPatcher = function (rowNode, colIdToSkip, targetAggregates) {
|
|
128
|
+
if (!targetAggregates) {
|
|
129
|
+
// if targetAggregates is not set, we are not in the aggregation phase
|
|
130
|
+
// so we can use the original doFiltersPass
|
|
131
|
+
return original_doFilterPass.call(this, rowNode, colIdToSkip);
|
|
132
|
+
}
|
|
130
133
|
if (!self.adaptableApi.layoutApi.isCurrentLayoutPivot()) {
|
|
131
134
|
// should NEVER happen
|
|
132
135
|
return true;
|
|
@@ -153,14 +156,12 @@ export class AgGridAdapter {
|
|
|
153
156
|
}
|
|
154
157
|
return true;
|
|
155
158
|
};
|
|
156
|
-
agGridColumnFilterService.
|
|
157
|
-
|
|
158
|
-
this.DANGER_isAggregateFilterPresentMonkeyPatcher = function () {
|
|
159
|
+
agGridColumnFilterService.doFiltersPass = this.DANGER_doFiltersPassMonkeyPatcher;
|
|
160
|
+
this.DANGER_isAggFilterPresentMonkeyPatcher = function () {
|
|
159
161
|
const columnFilters = self.adaptableApi.filterApi.columnFilterApi.getActiveColumnFilters();
|
|
160
162
|
return columnFilters.some((colFilter) => self.adaptableApi.columnApi.isPivotResultColumn(colFilter.ColumnId));
|
|
161
163
|
};
|
|
162
|
-
agGridColumnFilterService.
|
|
163
|
-
this.DANGER_isAggregateFilterPresentMonkeyPatcher;
|
|
164
|
+
agGridColumnFilterService.isAggFilterPresent = this.DANGER_isAggFilterPresentMonkeyPatcher;
|
|
164
165
|
}
|
|
165
166
|
DANGER_getPrivateAgGridBeans() {
|
|
166
167
|
const beans = DANGER_AG_GRID_BEANS_MAP[this._agGridId];
|
|
@@ -172,27 +173,6 @@ export class AgGridAdapter {
|
|
|
172
173
|
DANGER_getLiveGridOptions() {
|
|
173
174
|
return this.DANGER_getPrivateAgGridBeans()?.gridOptions;
|
|
174
175
|
}
|
|
175
|
-
isAgGridModuleRegistered(moduleName) {
|
|
176
|
-
const agGridOptionsService = this.DANGER_getPrivateAgGridBeans()?.gos;
|
|
177
|
-
if (!agGridOptionsService) {
|
|
178
|
-
this.logger.consoleError('Could not get hold of GridOptionsService! This is a critical error and will prevent Adaptable from working correctly.');
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
return agGridOptionsService.isModuleRegistered(moduleName);
|
|
182
|
-
}
|
|
183
|
-
getAgGridRegisteredModules() {
|
|
184
|
-
const allModulesSet = ALL_AG_GRID_MODULES;
|
|
185
|
-
const registeredModules = [];
|
|
186
|
-
allModulesSet.forEach((module) => {
|
|
187
|
-
if (this.isAgGridModuleRegistered(module.moduleName)) {
|
|
188
|
-
registeredModules.push(module);
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
return registeredModules;
|
|
192
|
-
}
|
|
193
|
-
getAgGridRegisteredModuleNames() {
|
|
194
|
-
return this.getAgGridRegisteredModules().map((module) => module.moduleName);
|
|
195
|
-
}
|
|
196
176
|
getAgGridRootElement() {
|
|
197
177
|
return this.DANGER_getPrivateAgGridBeans()?.eGridDiv;
|
|
198
178
|
}
|
|
@@ -234,19 +214,6 @@ export class AgGridAdapter {
|
|
|
234
214
|
getUserGridOptionsProperty(propertyName) {
|
|
235
215
|
return this.agGridOptionsService.getUserGridOptionsProperty(propertyName);
|
|
236
216
|
}
|
|
237
|
-
updateColumnFilterActiveState() {
|
|
238
|
-
const filteredCols = new Set();
|
|
239
|
-
const columnFilters = this.adaptableApi.filterApi.columnFilterApi.getActiveColumnFilters();
|
|
240
|
-
columnFilters?.forEach?.((columnFilter) => {
|
|
241
|
-
if (this.adaptableApi.filterApi.columnFilterApi.isColumnFilterActive(columnFilter)) {
|
|
242
|
-
filteredCols.add(columnFilter.ColumnId);
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
const agGridApi = this.getAgGridApi();
|
|
246
|
-
(agGridApi.getColumns() || []).forEach((col) => {
|
|
247
|
-
col.filterActive = filteredCols.has(col.getColId());
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
217
|
getColumnDefinitionsInclSpecialColumns(agGridColDefs) {
|
|
251
218
|
const allColDefs = this.enhanceColDefsWithSpecialColumns(agGridColDefs ?? this.getAgGridApi().getColumnDefs());
|
|
252
219
|
return allColDefs;
|
|
@@ -378,7 +345,7 @@ export class AgGridAdapter {
|
|
|
378
345
|
deriveSelectedRowInfoFromAgGrid() {
|
|
379
346
|
const nodes = this.getAgGridApi().getSelectedNodes();
|
|
380
347
|
const selectedRows = [];
|
|
381
|
-
if (this.
|
|
348
|
+
if (this._adaptableInstance.isInPivotMode()) {
|
|
382
349
|
// dont perform row selection in pivot mode
|
|
383
350
|
return undefined;
|
|
384
351
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
2
2
|
import { ColumnSetupInfo } from '../AdaptableState/Common/ColumnSetupInfo';
|
|
3
|
-
import { ColDef, ColGroupDef, Column
|
|
3
|
+
import { ColDef, ColGroupDef, Column } from 'ag-grid-enterprise';
|
|
4
4
|
import { AdaptableColumnDataType } from '../AdaptableState/Common/AdaptableColumn';
|
|
5
5
|
import { AdaptableVariant } from '../AdaptableInterfaces/IAdaptable';
|
|
6
6
|
export declare function getEditorForColumnDataType(columnDataType: AdaptableColumnDataType, variant: AdaptableVariant): ColDef['cellEditor'];
|
|
@@ -31,7 +31,6 @@ export declare class AgGridColumnAdapter {
|
|
|
31
31
|
private setupColumnCellDataType;
|
|
32
32
|
setupColumnHeader({ col }: ColumnSetupInfo): void;
|
|
33
33
|
private setupColumnFilter;
|
|
34
|
-
setupColumnFloatingFilterTemporarily(initialGridOptions: GridOptions): void;
|
|
35
34
|
private setupColumnFloatingFilter;
|
|
36
35
|
private setupColumnValueFormatter;
|
|
37
36
|
private setupColumnEditable;
|
|
@@ -68,4 +67,5 @@ export declare class AgGridColumnAdapter {
|
|
|
68
67
|
private getFlashingCellStyle;
|
|
69
68
|
private getCellHighlightStyle;
|
|
70
69
|
isColGroupDef(columnDefinition: ColDef | ColGroupDef): columnDefinition is ColGroupDef;
|
|
70
|
+
private getRelevantFormatColumnHeaderStyles;
|
|
71
71
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import kebabCase from 'lodash/kebabCase';
|
|
2
2
|
import merge from 'lodash/merge';
|
|
3
|
-
import { FilterWrapperFactory } from './FilterWrapper';
|
|
4
|
-
import { FloatingFilterWrapperFactory } from './FloatingFilterWrapper';
|
|
5
3
|
import { convertAdaptableStyleToCSS, getVariableColor, normalizeStyleForAgGrid, } from '../Utilities/Helpers/StyleHelper';
|
|
6
4
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
7
5
|
import { ACTION_COLUMN_TYPE, CALCULATED_COLUMN_TYPE, FDC3_COLUMN_TYPE, FREE_TEXT_COLUMN_TYPE, } from '../AdaptableState/Common/AdaptableColumn';
|
|
@@ -15,6 +13,9 @@ import { AdaptableDateEditor, AdaptableReactDateEditor } from './editors/Adaptab
|
|
|
15
13
|
import { AgGridExportAdapter } from './AgGridExportAdapter';
|
|
16
14
|
import { AdaptableHelper } from '../Utilities/Helpers/AdaptableHelper';
|
|
17
15
|
import { isProvidedByAdaptable } from '../Utilities/adaptableOverrideCheck';
|
|
16
|
+
import { AdaptableFilterHandler } from './AdaptableFilterHandler';
|
|
17
|
+
import { AgGridFilterAdapterFactory } from './AgGridFilterAdapter';
|
|
18
|
+
import { AgGridFloatingFilterAdapterFactory } from './AgGridFloatingFilterAdapter';
|
|
18
19
|
export function getEditorForColumnDataType(columnDataType, variant) {
|
|
19
20
|
if (columnDataType === 'number') {
|
|
20
21
|
return variant === 'react' ? AdaptableReactNumberEditor : AdaptableNumberEditor;
|
|
@@ -100,7 +101,7 @@ export class AgGridColumnAdapter {
|
|
|
100
101
|
!this.adaptableApi.columnApi.isSelectionColumn(colId));
|
|
101
102
|
}
|
|
102
103
|
setupColumns() {
|
|
103
|
-
const pivotMode = this.
|
|
104
|
+
const pivotMode = this.adaptableInstance.isInPivotMode();
|
|
104
105
|
let cols = pivotMode
|
|
105
106
|
? // for pivot mode, we take only the initial columns
|
|
106
107
|
this.agGridApi.getColumns()
|
|
@@ -238,6 +239,18 @@ export class AgGridColumnAdapter {
|
|
|
238
239
|
return baseHeaderClass;
|
|
239
240
|
}
|
|
240
241
|
const target = 'columnHeader';
|
|
242
|
+
// handle special case of headers with text alignment
|
|
243
|
+
// in this case, we add a specific class to the header
|
|
244
|
+
// see #header_text_align
|
|
245
|
+
const formatColumnWithTextAlignment = this.getRelevantFormatColumnHeaderStyles(abColumn)
|
|
246
|
+
// we take the first one only, even if multiple are defined
|
|
247
|
+
.find((fc) => fc.CellAlignment != undefined);
|
|
248
|
+
if (formatColumnWithTextAlignment) {
|
|
249
|
+
baseHeaderClass = [
|
|
250
|
+
...baseHeaderClass,
|
|
251
|
+
`ab-header__align-${formatColumnWithTextAlignment.CellAlignment.toLowerCase()}`,
|
|
252
|
+
];
|
|
253
|
+
}
|
|
241
254
|
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn, {
|
|
242
255
|
target,
|
|
243
256
|
});
|
|
@@ -286,7 +299,11 @@ export class AgGridColumnAdapter {
|
|
|
286
299
|
return {};
|
|
287
300
|
}
|
|
288
301
|
const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(gridCell);
|
|
289
|
-
const
|
|
302
|
+
const isQuickSearchAvailable = this.adaptableApi.internalApi
|
|
303
|
+
.getModuleService()
|
|
304
|
+
.isAdapTableModulePresent('QuickSearch');
|
|
305
|
+
const isCurrentMatch = isQuickSearchAvailable &&
|
|
306
|
+
this.adaptableApi.agGridApi.findGetActiveMatch()?.node === params.node;
|
|
290
307
|
const textStyleToApply = isCurrentMatch
|
|
291
308
|
? { ...textMatchStyle, ...currentTextMatchStyle }
|
|
292
309
|
: textMatchStyle;
|
|
@@ -358,10 +375,18 @@ export class AgGridColumnAdapter {
|
|
|
358
375
|
}
|
|
359
376
|
setupColumnCellEditor({ colId, col, colDef, abColumn }) {
|
|
360
377
|
const shouldShowSelectCellEditor = this.adaptableApi.userInterfaceApi.internalApi.shouldShowSelectCellEditor(abColumn);
|
|
361
|
-
const hasRichSelectCellEditor = this.
|
|
378
|
+
const hasRichSelectCellEditor = this.adaptableApi.internalApi
|
|
379
|
+
.getAgGridModulesAdapter()
|
|
380
|
+
.isAgGridModuleRegistered('RichSelectModule');
|
|
362
381
|
this.setColDefProperty(col, 'cellEditor', () => {
|
|
363
382
|
if (shouldShowSelectCellEditor) {
|
|
364
|
-
|
|
383
|
+
if (hasRichSelectCellEditor) {
|
|
384
|
+
return 'agRichSelectCellEditor';
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
this.adaptableApi.logWarn(`Cannot show Select Editor as missing required AG Grid module: RichSelect`);
|
|
388
|
+
return colDef.cellEditor;
|
|
389
|
+
}
|
|
365
390
|
}
|
|
366
391
|
else {
|
|
367
392
|
if (colDef.cellEditor) {
|
|
@@ -512,8 +537,10 @@ export class AgGridColumnAdapter {
|
|
|
512
537
|
return original_headerValueGetter;
|
|
513
538
|
});
|
|
514
539
|
}
|
|
515
|
-
setupColumnFilter(
|
|
516
|
-
|
|
540
|
+
setupColumnFilter(columnSetup) {
|
|
541
|
+
const { col, colDef, abColumn, colId } = columnSetup;
|
|
542
|
+
const useAdaptableFilter = this.adaptableOptions.filterOptions.useAdaptableFiltering;
|
|
543
|
+
if (!useAdaptableFilter) {
|
|
517
544
|
return;
|
|
518
545
|
}
|
|
519
546
|
// setup Auto Group Column Filter
|
|
@@ -540,29 +567,38 @@ export class AgGridColumnAdapter {
|
|
|
540
567
|
return;
|
|
541
568
|
}
|
|
542
569
|
// setup "normal" column filter
|
|
543
|
-
this.setColDefProperty(col, 'filter', () => {
|
|
570
|
+
this.setColDefProperty(col, 'filter', (original_filter) => {
|
|
544
571
|
if (!colDef.filter) {
|
|
545
572
|
return;
|
|
546
573
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
?.filter((colDef) => !this.isColGroupDef(colDef))
|
|
557
|
-
.map((colDef) => {
|
|
558
|
-
const isFloatingFilterEnabled = initialGridOptions.defaultColDef?.floatingFilter || colDef.floatingFilter;
|
|
559
|
-
if (isFloatingFilterEnabled) {
|
|
560
|
-
colDef.floatingFilterComponent = FloatingFilterWrapperFactory(this.adaptableInstance);
|
|
574
|
+
if (!useAdaptableFilter) {
|
|
575
|
+
return original_filter;
|
|
576
|
+
}
|
|
577
|
+
if (useAdaptableFilter &&
|
|
578
|
+
typeof original_filter !== 'boolean' &&
|
|
579
|
+
typeof original_filter?.handler !== 'function' &&
|
|
580
|
+
!this.adaptableInstance.isInPivotMode()) {
|
|
581
|
+
this.adaptableApi.consoleError(`Column '${colId}' has a custom filter defined in colDef.filter, but Adaptable Filtering accepts only the TRUE/FALSE values!`);
|
|
582
|
+
return false;
|
|
561
583
|
}
|
|
584
|
+
return {
|
|
585
|
+
component: AgGridFilterAdapterFactory(this.adaptableInstance),
|
|
586
|
+
// doesFilterPass,
|
|
587
|
+
handler: (params) => new AdaptableFilterHandler(this.adaptableApi, columnSetup),
|
|
588
|
+
};
|
|
562
589
|
});
|
|
563
590
|
}
|
|
564
591
|
setupColumnFloatingFilter({ col, colDef }) {
|
|
565
|
-
const
|
|
592
|
+
const userProvidedFilterProp = this.getUserColDefProperty(col.getColId(), 'filter');
|
|
593
|
+
const hasInvalidFilterProp = typeof userProvidedFilterProp !== 'boolean' &&
|
|
594
|
+
typeof userProvidedFilterProp?.handler !== 'function' &&
|
|
595
|
+
!this.adaptableInstance.isInPivotMode();
|
|
596
|
+
if (hasInvalidFilterProp) {
|
|
597
|
+
// warning is logged in the 'setupColumnFilter' method
|
|
598
|
+
return false;
|
|
599
|
+
}
|
|
600
|
+
const isFloatingFilterDisabled = !colDef.filter ||
|
|
601
|
+
!colDef.floatingFilter ||
|
|
566
602
|
!this.adaptableOptions.filterOptions.useAdaptableFiltering ||
|
|
567
603
|
!this.adaptableOptions.filterOptions.columnFilterOptions.showQuickFilter;
|
|
568
604
|
if (this.adaptableApi.columnApi.isAutoRowGroupColumn(col.getColId())) {
|
|
@@ -584,13 +620,13 @@ export class AgGridColumnAdapter {
|
|
|
584
620
|
if (isFloatingFilterDisabled) {
|
|
585
621
|
return;
|
|
586
622
|
}
|
|
587
|
-
return
|
|
623
|
+
return AgGridFloatingFilterAdapterFactory(this.adaptableInstance);
|
|
588
624
|
});
|
|
589
625
|
this.setColDefProperty(col, 'floatingFilter', (original_floatingFilter) => {
|
|
590
626
|
if (isFloatingFilterDisabled) {
|
|
591
627
|
return;
|
|
592
628
|
}
|
|
593
|
-
return
|
|
629
|
+
return AgGridFloatingFilterAdapterFactory(this.adaptableInstance);
|
|
594
630
|
});
|
|
595
631
|
this.setColDefProperty(col, 'suppressFloatingFilterButton', () => {
|
|
596
632
|
return !isFloatingFilterDisabled;
|
|
@@ -811,6 +847,12 @@ export class AgGridColumnAdapter {
|
|
|
811
847
|
return true;
|
|
812
848
|
}
|
|
813
849
|
isQuickSearchActive(gridCell) {
|
|
850
|
+
const isQuickSearchAvailable = this.adaptableApi.internalApi
|
|
851
|
+
.getModuleService()
|
|
852
|
+
.isAdapTableModulePresent('QuickSearch');
|
|
853
|
+
if (!isQuickSearchAvailable) {
|
|
854
|
+
return false;
|
|
855
|
+
}
|
|
814
856
|
const quickSearchValue = this.adaptableApi.quickSearchApi.getQuickSearchValue();
|
|
815
857
|
if (!quickSearchValue) {
|
|
816
858
|
return false;
|
|
@@ -888,7 +930,7 @@ export class AgGridColumnAdapter {
|
|
|
888
930
|
: undefined;
|
|
889
931
|
}
|
|
890
932
|
getNoteCellClassName(gridCell, params) {
|
|
891
|
-
if (!this.adaptableApi.internalApi.getModuleService().
|
|
933
|
+
if (!this.adaptableApi.internalApi.getModuleService().isAdapTableModulePresent('Note')) {
|
|
892
934
|
return;
|
|
893
935
|
}
|
|
894
936
|
if (!this.adaptableApi.noteApi.internalApi.areNotesSupported()) {
|
|
@@ -905,7 +947,7 @@ export class AgGridColumnAdapter {
|
|
|
905
947
|
return 'ab-Cell-Note';
|
|
906
948
|
}
|
|
907
949
|
getCommentCellClassName(gridCell, params) {
|
|
908
|
-
if (!this.adaptableApi.internalApi.getModuleService().
|
|
950
|
+
if (!this.adaptableApi.internalApi.getModuleService().isAdapTableModulePresent('Comment')) {
|
|
909
951
|
return;
|
|
910
952
|
}
|
|
911
953
|
if (!this.adaptableApi.commentApi.internalApi.areCommentsSupportedInLayout()) {
|
|
@@ -1022,16 +1064,10 @@ export class AgGridColumnAdapter {
|
|
|
1022
1064
|
// YET, see https://github.com/AdaptableTools/adaptable/issues/2947#issuecomment-3062304655
|
|
1023
1065
|
return {};
|
|
1024
1066
|
}
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1027
|
-
target,
|
|
1028
|
-
});
|
|
1029
|
-
if (!activeFormatColumnsWithStyle.length) {
|
|
1067
|
+
const relevantFormatColumnsWithStyle = this.getRelevantFormatColumnHeaderStyles(column);
|
|
1068
|
+
if (!relevantFormatColumnsWithStyle.length) {
|
|
1030
1069
|
return {};
|
|
1031
1070
|
}
|
|
1032
|
-
const relevantFormatColumnsWithStyle = activeFormatColumnsWithStyle.filter((formatColumn) => {
|
|
1033
|
-
return this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInHeader(formatColumn, column);
|
|
1034
|
-
});
|
|
1035
1071
|
return this.getFormatColumnAdaptableStyle(relevantFormatColumnsWithStyle);
|
|
1036
1072
|
}
|
|
1037
1073
|
getStyledColumnStyle(styledColumn, abColumn, params) {
|
|
@@ -1165,4 +1201,13 @@ export class AgGridColumnAdapter {
|
|
|
1165
1201
|
// @ts-ignore
|
|
1166
1202
|
return columnDefinition['children'] != null;
|
|
1167
1203
|
}
|
|
1204
|
+
getRelevantFormatColumnHeaderStyles(column) {
|
|
1205
|
+
return this.adaptableApi.formatColumnApi.internalApi
|
|
1206
|
+
.getFormatColumnsWithStyleForColumn(column, {
|
|
1207
|
+
target: 'columnHeader',
|
|
1208
|
+
})
|
|
1209
|
+
.filter((formatColumn) => {
|
|
1210
|
+
return this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInHeader(formatColumn, column);
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
1168
1213
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AdaptableColumnFilter } from '../View/Components/ColumnFilter/AdaptableColumnFilter';
|
|
3
|
+
import { renderWithAdaptableContext } from '../View/renderWithAdaptableContext';
|
|
4
|
+
export const AgGridFilterAdapterFactory = (adaptable) => {
|
|
5
|
+
function isFilterActive(colId) {
|
|
6
|
+
// we need this here
|
|
7
|
+
if (adaptable.isDestroyed) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
//make the small filter icon to appear when there is a filter
|
|
11
|
+
return adaptable.api.filterApi.columnFilterApi.isColumnFilterActiveForColumn(colId);
|
|
12
|
+
}
|
|
13
|
+
function getContainerId(colId) {
|
|
14
|
+
return 'filter_' + colId + '_' + adaptable.adaptableOptions.adaptableId;
|
|
15
|
+
}
|
|
16
|
+
return class AgGridFilterAdapter {
|
|
17
|
+
init(params) {
|
|
18
|
+
this.params = params;
|
|
19
|
+
this.column = params.column;
|
|
20
|
+
this.filterContainer = document.createElement('div');
|
|
21
|
+
this.filterContainer.id = getContainerId(this.params.column.getColId());
|
|
22
|
+
}
|
|
23
|
+
getGui() {
|
|
24
|
+
return this.filterContainer;
|
|
25
|
+
}
|
|
26
|
+
refresh(newParams) {
|
|
27
|
+
// always reuse the current instance
|
|
28
|
+
// the filter is refreshed in the underlying React component
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
afterGuiAttached(params) {
|
|
32
|
+
//we always unmount first so the autofocus from the form works... in other grids we unmount when hidden
|
|
33
|
+
this.unmountReactRoot?.();
|
|
34
|
+
const columnId = this.column.getColId();
|
|
35
|
+
let column = adaptable.api.columnApi.getColumnWithColumnId(columnId);
|
|
36
|
+
if (column) {
|
|
37
|
+
this.unmountReactRoot = adaptable.renderReactRoot(renderWithAdaptableContext(React.createElement(AdaptableColumnFilter, {
|
|
38
|
+
columnId,
|
|
39
|
+
wrapperProps: { p: 2 },
|
|
40
|
+
}), adaptable), this.filterContainer);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
destroy() {
|
|
44
|
+
this.unmountReactRoot?.();
|
|
45
|
+
this.filterContainer = null;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { forwardRef, useImperativeHandle } from 'react';
|
|
3
2
|
import { renderWithAdaptableContext } from '../View/renderWithAdaptableContext';
|
|
4
3
|
import { AdaptableFloatingFilter } from '../View/Components/ColumnFilter/AdaptableFloatingFilter';
|
|
5
|
-
import { getAgGridFilterNotifyModelFn } from './getAgGridFilterNotifyModelFn';
|
|
6
4
|
const filterContainerStyle = {
|
|
7
5
|
overflow: 'hidden',
|
|
8
6
|
minWidth: '0',
|
|
@@ -12,7 +10,7 @@ const filterContainerStyle = {
|
|
|
12
10
|
position: 'relative',
|
|
13
11
|
flex: '1 1 auto',
|
|
14
12
|
};
|
|
15
|
-
export const
|
|
13
|
+
export const AgGridFloatingFilterAdapterFactory = (adaptable) => {
|
|
16
14
|
const adaptableApi = adaptable.api;
|
|
17
15
|
function getContainerId(colId) {
|
|
18
16
|
return `floatingFilter_${colId}_${adaptable.adaptableOptions.adaptableId}`;
|
|
@@ -26,9 +24,6 @@ export const FloatingFilterWrapperFactory = (adaptable) => {
|
|
|
26
24
|
};
|
|
27
25
|
return columnFilterProps;
|
|
28
26
|
}
|
|
29
|
-
function getNotifyModel(colId, onModelChange) {
|
|
30
|
-
return getAgGridFilterNotifyModelFn(adaptableApi, colId, onModelChange);
|
|
31
|
-
}
|
|
32
27
|
function findParentWithClass(element, className, stopClasses, applyToAll) {
|
|
33
28
|
let current = element.parentElement;
|
|
34
29
|
while (current) {
|
|
@@ -82,55 +77,49 @@ export const FloatingFilterWrapperFactory = (adaptable) => {
|
|
|
82
77
|
}
|
|
83
78
|
};
|
|
84
79
|
}
|
|
85
|
-
|
|
86
|
-
return forwardRef(function ReactFloatingFilterWrapper(props, ref) {
|
|
87
|
-
const colId = props.column.getId();
|
|
88
|
-
const { onModelChange } = props;
|
|
89
|
-
const column = adaptableApi.columnApi.getColumnWithColumnId(colId);
|
|
90
|
-
useImperativeHandle(ref, () => {
|
|
91
|
-
return {
|
|
92
|
-
onParentModelChanged() { },
|
|
93
|
-
};
|
|
94
|
-
});
|
|
95
|
-
const notifyModel = getNotifyModel(colId, onModelChange);
|
|
96
|
-
if (!column) {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
return renderWithAdaptableContext(React.createElement("div", { ref: patchParentElement, id: getContainerId(colId), style: filterContainerStyle },
|
|
100
|
-
React.createElement(AdaptableFloatingFilter, { ...getFilterProps(colId), onChange: notifyModel, onClear: notifyModel })), adaptable);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
return class FloatingFilterWrapper {
|
|
104
|
-
onParentModelChanged(parentModel, filterChangedEvent) {
|
|
105
|
-
// todo?
|
|
106
|
-
}
|
|
107
|
-
afterGuiAttached() {
|
|
108
|
-
patchParentElement(this.filterContainer);
|
|
109
|
-
}
|
|
80
|
+
return class AgGridFloatingFilterAdapter {
|
|
110
81
|
init(params) {
|
|
111
82
|
const colId = params.column.getColId();
|
|
83
|
+
this.colId = colId;
|
|
112
84
|
this.filterContainer = document.createElement('div');
|
|
113
85
|
this.filterContainer.id = getContainerId(colId);
|
|
114
86
|
Object.keys(filterContainerStyle).forEach((key) => {
|
|
115
87
|
//@ts-ignore
|
|
116
88
|
this.filterContainer.style[key] = filterContainerStyle[key];
|
|
117
89
|
});
|
|
118
|
-
const notifyModel = getNotifyModel(colId, params.filterParams.filterChangedCallback);
|
|
119
90
|
const column = adaptableApi.columnApi.getColumnWithColumnId(colId);
|
|
120
91
|
if (column) {
|
|
121
92
|
const filterProps = getFilterProps(colId);
|
|
122
93
|
this.unmountReactRoot = adaptable.renderReactRoot(renderWithAdaptableContext(React.createElement(AdaptableFloatingFilter, {
|
|
123
94
|
...filterProps,
|
|
124
|
-
onChange: notifyModel,
|
|
125
|
-
onClear: notifyModel,
|
|
126
95
|
}), adaptable), this.filterContainer);
|
|
127
96
|
}
|
|
128
97
|
}
|
|
98
|
+
onParentModelChanged(parentModel, filterChangedEvent) {
|
|
99
|
+
// AFL: this should NOT be required, but AG Grid calls this method
|
|
100
|
+
// most likely is a bug and will be removed in future versions
|
|
101
|
+
}
|
|
102
|
+
afterGuiAttached() {
|
|
103
|
+
patchParentElement(this.filterContainer);
|
|
104
|
+
}
|
|
129
105
|
getGui() {
|
|
130
106
|
return this.filterContainer;
|
|
131
107
|
}
|
|
108
|
+
refresh(params) {
|
|
109
|
+
// always reuse the current instance
|
|
110
|
+
// the filte ris refreshed in the underlying React component
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
132
113
|
destroy() {
|
|
133
|
-
|
|
114
|
+
// Use setTimeout to defer unmounting to next event loop tick
|
|
115
|
+
// This ensures we're not unmounting during React's rendering phase
|
|
116
|
+
if (this.unmountReactRoot) {
|
|
117
|
+
const unmount = this.unmountReactRoot;
|
|
118
|
+
setTimeout(() => {
|
|
119
|
+
unmount();
|
|
120
|
+
}, 0);
|
|
121
|
+
this.unmountReactRoot = undefined;
|
|
122
|
+
}
|
|
134
123
|
this.filterContainer = null;
|
|
135
124
|
}
|
|
136
125
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
2
|
+
import { Module, AgModuleName } from 'ag-grid-enterprise';
|
|
3
|
+
export declare const AG_GRID_VERSION: string;
|
|
4
|
+
export declare class AgGridModulesAdapter {
|
|
5
|
+
private adaptableInstance;
|
|
6
|
+
private allAgGridModules;
|
|
7
|
+
constructor(adaptableInstance: AdaptableAgGrid);
|
|
8
|
+
destroy(): void;
|
|
9
|
+
private get agGridApi();
|
|
10
|
+
isAgGridModuleRegistered(moduleName: AgModuleName): boolean;
|
|
11
|
+
getAgGridRegisteredModules(): Module[];
|
|
12
|
+
getAgGridRegisteredModuleNames(): AgModuleName[];
|
|
13
|
+
getMandatoryAgGridModuleNames(): AgModuleName[];
|
|
14
|
+
private extractAgGridModuleNames;
|
|
15
|
+
}
|