@adaptabletools/adaptable-cjs 20.3.0 → 21.0.0-canary.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/agGrid.d.ts +2 -1
- package/agGrid.js +3 -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 +8 -21
- 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 +101 -7
- package/src/Api/Implementation/LayoutHelpers.d.ts +1 -0
- package/src/Api/Implementation/LayoutHelpers.js +25 -5
- 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 +5 -5
- package/src/Api/Internal/LayoutInternalApi.js +42 -5
- 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 +10 -10
- package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +7 -0
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +15 -1
- 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 +2 -1
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +15 -2
- package/src/Utilities/Extensions/ArrayExtensions.js +68 -15
- package/src/Utilities/ObjectFactory.js +3 -3
- 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 +18 -6
- 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 +5 -5
- 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 +2 -2
- package/src/View/Layout/TransposedPopup.js +2 -2
- 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 +65 -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 +53 -0
- package/src/agGrid/AgGridFloatingFilterAdapter.d.ts +2 -0
- package/src/agGrid/{FloatingFilterWrapper.js → AgGridFloatingFilterAdapter.js} +26 -37
- package/src/agGrid/AgGridModulesAdapter.d.ts +15 -0
- package/src/agGrid/AgGridModulesAdapter.js +70 -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 +4 -4
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +1 -1
- 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 +114 -22
- package/src/components/icons/DefaultIcon.d.ts +0 -1
- package/src/components/icons/DefaultIcon.js +0 -8
- 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 +70 -19
- 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 +28 -0
- package/src/types.d.ts +7 -8
- package/tsconfig.cjs.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 -136
- package/src/agGrid/FloatingFilterWrapper.d.ts +0 -2
- package/src/agGrid/agGridModules.d.ts +0 -3
- package/src/agGrid/agGridModules.js +0 -18
- package/src/agGrid/getAgGridFilterNotifyModelFn.d.ts +0 -2
- package/src/agGrid/getAgGridFilterNotifyModelFn.js +0 -21
- /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,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdaptableFilterHandler = void 0;
|
|
4
|
+
class AdaptableFilterHandler {
|
|
5
|
+
constructor(adaptableApi, columnSetup) {
|
|
6
|
+
this.adaptableApi = adaptableApi;
|
|
7
|
+
this.colId = columnSetup.colId;
|
|
8
|
+
}
|
|
9
|
+
doesFilterPass(params) {
|
|
10
|
+
try {
|
|
11
|
+
const rowNode = params.node;
|
|
12
|
+
// first assess if the Row is filterable - if not, then return true so it always appears in Grid
|
|
13
|
+
const isRowFilterable = this.adaptableApi.gridApi.internalApi.isRowFilterable(rowNode);
|
|
14
|
+
if (!isRowFilterable) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
const columnFilters = this.adaptableApi.filterApi.columnFilterApi
|
|
18
|
+
.getActiveColumnFilters()
|
|
19
|
+
.filter((columnFilter) => this.adaptableApi.filterApi.columnFilterApi.isColumnFilterActive(columnFilter))
|
|
20
|
+
.filter((columnFilter) => columnFilter.ColumnId === this.colId)
|
|
21
|
+
.filter((columnFilter) => {
|
|
22
|
+
const shouldEvaluateFilterOnClient = this.adaptableApi.expressionApi.internalApi.shouldEvaluatePredicatesInAdaptableQL('ColumnFilter', columnFilter, columnFilter.Predicates);
|
|
23
|
+
return shouldEvaluateFilterOnClient;
|
|
24
|
+
});
|
|
25
|
+
const anyFilterFailed = columnFilters.some((columnFilter) => !this.adaptableApi.filterApi.columnFilterApi.internalApi.evaluateColumnFilter(columnFilter, rowNode));
|
|
26
|
+
return anyFilterFailed ? false : true;
|
|
27
|
+
}
|
|
28
|
+
catch (ex) {
|
|
29
|
+
this.adaptableApi.consoleError(ex);
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
getFilterDisplayValues(currentSearchValue) {
|
|
34
|
+
if (!this.filterDisplayValues) {
|
|
35
|
+
this.filterDisplayValues =
|
|
36
|
+
this.adaptableApi.gridApi.internalApi.getDistinctFilterDisplayValuesForColumn({
|
|
37
|
+
columnId: this.colId,
|
|
38
|
+
currentSearchValue,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return this.filterDisplayValues;
|
|
42
|
+
}
|
|
43
|
+
onNewRowsLoaded() {
|
|
44
|
+
this.resetFilterDisplayValues();
|
|
45
|
+
}
|
|
46
|
+
onAnyFilterChanged() {
|
|
47
|
+
this.resetFilterDisplayValues();
|
|
48
|
+
}
|
|
49
|
+
resetFilterDisplayValues() {
|
|
50
|
+
// Reset the filter display values manually
|
|
51
|
+
this.filterDisplayValues = null;
|
|
52
|
+
}
|
|
53
|
+
async refreshFilterDisplayValues() {
|
|
54
|
+
this.resetFilterDisplayValues();
|
|
55
|
+
return this.getFilterDisplayValues('');
|
|
56
|
+
}
|
|
57
|
+
refresh(params) {
|
|
58
|
+
// No specific refresh logic needed for this handler
|
|
59
|
+
// The filter display values will be reset on new rows loaded or any filter changed
|
|
60
|
+
}
|
|
61
|
+
destroy() {
|
|
62
|
+
this.filterDisplayValues = null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.AdaptableFilterHandler = AdaptableFilterHandler;
|
|
@@ -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;
|
|
@@ -8,7 +8,6 @@ const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
|
8
8
|
const Uuid_1 = require("../AdaptableState/Uuid");
|
|
9
9
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
10
10
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
11
|
-
const agGridModules_1 = require("./agGridModules");
|
|
12
11
|
const agGridDataTypeDefinitions_1 = require("./agGridDataTypeDefinitions");
|
|
13
12
|
const ColumnApiImpl_1 = require("../Api/Implementation/ColumnApiImpl");
|
|
14
13
|
const isPivotColumnTotal_1 = require("../layout-manager/src/isPivotColumnTotal");
|
|
@@ -20,8 +19,6 @@ class AgGridAdapter {
|
|
|
20
19
|
constructor(_adaptableInstance, config) {
|
|
21
20
|
this._adaptableInstance = _adaptableInstance;
|
|
22
21
|
const columnApiModuleReference = config?.getAgGridColumnApiModuleReference?.() ?? getColumnApiModule();
|
|
23
|
-
const beans = columnApiModuleReference?.beans;
|
|
24
|
-
console.log(beans?.length);
|
|
25
22
|
const ColumnDefFactory_Prototype = columnApiModuleReference?.beans?.[0]?.prototype;
|
|
26
23
|
if (!ColumnDefFactory_Prototype) {
|
|
27
24
|
console.error(`CRITICAL: could not get hold of AG Grid beans, this should never happen!`);
|
|
@@ -44,8 +41,8 @@ class AgGridAdapter {
|
|
|
44
41
|
this.DANGER_gridApi_from_args = null;
|
|
45
42
|
this.DANGER_USE_GETTER_gridApi = null;
|
|
46
43
|
this.DANGER_updateGridOptionsMonkeyPatcher = null;
|
|
47
|
-
this.
|
|
48
|
-
this.
|
|
44
|
+
this.DANGER_doFiltersPassMonkeyPatcher = null;
|
|
45
|
+
this.DANGER_isAggFilterPresentMonkeyPatcher = null;
|
|
49
46
|
this._adaptableInstance = null;
|
|
50
47
|
}
|
|
51
48
|
get adaptableOptions() {
|
|
@@ -130,7 +127,13 @@ class AgGridAdapter {
|
|
|
130
127
|
// monkey patch ColumnFilterService.doAggregateFiltersPass because currently Adaptable does NOT override the ColumnFilters
|
|
131
128
|
// (it uses the `doesExternalFilterPass` to evaluate the filters on the client side)
|
|
132
129
|
// #doAggregateFiltersPassMonkeyPatcher
|
|
133
|
-
|
|
130
|
+
const original_doFilterPass = agGridColumnFilterService.doFiltersPass;
|
|
131
|
+
this.DANGER_doFiltersPassMonkeyPatcher = function (rowNode, colIdToSkip, targetAggregates) {
|
|
132
|
+
if (!targetAggregates) {
|
|
133
|
+
// if targetAggregates is not set, we are not in the aggregation phase
|
|
134
|
+
// so we can use the original doFiltersPass
|
|
135
|
+
return original_doFilterPass.call(this, rowNode, colIdToSkip);
|
|
136
|
+
}
|
|
134
137
|
if (!self.adaptableApi.layoutApi.isCurrentLayoutPivot()) {
|
|
135
138
|
// should NEVER happen
|
|
136
139
|
return true;
|
|
@@ -157,14 +160,12 @@ class AgGridAdapter {
|
|
|
157
160
|
}
|
|
158
161
|
return true;
|
|
159
162
|
};
|
|
160
|
-
agGridColumnFilterService.
|
|
161
|
-
|
|
162
|
-
this.DANGER_isAggregateFilterPresentMonkeyPatcher = function () {
|
|
163
|
+
agGridColumnFilterService.doFiltersPass = this.DANGER_doFiltersPassMonkeyPatcher;
|
|
164
|
+
this.DANGER_isAggFilterPresentMonkeyPatcher = function () {
|
|
163
165
|
const columnFilters = self.adaptableApi.filterApi.columnFilterApi.getActiveColumnFilters();
|
|
164
166
|
return columnFilters.some((colFilter) => self.adaptableApi.columnApi.isPivotResultColumn(colFilter.ColumnId));
|
|
165
167
|
};
|
|
166
|
-
agGridColumnFilterService.
|
|
167
|
-
this.DANGER_isAggregateFilterPresentMonkeyPatcher;
|
|
168
|
+
agGridColumnFilterService.isAggFilterPresent = this.DANGER_isAggFilterPresentMonkeyPatcher;
|
|
168
169
|
}
|
|
169
170
|
DANGER_getPrivateAgGridBeans() {
|
|
170
171
|
const beans = DANGER_AG_GRID_BEANS_MAP[this._agGridId];
|
|
@@ -176,27 +177,6 @@ class AgGridAdapter {
|
|
|
176
177
|
DANGER_getLiveGridOptions() {
|
|
177
178
|
return this.DANGER_getPrivateAgGridBeans()?.gridOptions;
|
|
178
179
|
}
|
|
179
|
-
isAgGridModuleRegistered(moduleName) {
|
|
180
|
-
const agGridOptionsService = this.DANGER_getPrivateAgGridBeans()?.gos;
|
|
181
|
-
if (!agGridOptionsService) {
|
|
182
|
-
this.logger.consoleError('Could not get hold of GridOptionsService! This is a critical error and will prevent Adaptable from working correctly.');
|
|
183
|
-
return false;
|
|
184
|
-
}
|
|
185
|
-
return agGridOptionsService.isModuleRegistered(moduleName);
|
|
186
|
-
}
|
|
187
|
-
getAgGridRegisteredModules() {
|
|
188
|
-
const allModulesSet = agGridModules_1.ALL_AG_GRID_MODULES;
|
|
189
|
-
const registeredModules = [];
|
|
190
|
-
allModulesSet.forEach((module) => {
|
|
191
|
-
if (this.isAgGridModuleRegistered(module.moduleName)) {
|
|
192
|
-
registeredModules.push(module);
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
return registeredModules;
|
|
196
|
-
}
|
|
197
|
-
getAgGridRegisteredModuleNames() {
|
|
198
|
-
return this.getAgGridRegisteredModules().map((module) => module.moduleName);
|
|
199
|
-
}
|
|
200
180
|
getAgGridRootElement() {
|
|
201
181
|
return this.DANGER_getPrivateAgGridBeans()?.eGridDiv;
|
|
202
182
|
}
|
|
@@ -238,19 +218,6 @@ class AgGridAdapter {
|
|
|
238
218
|
getUserGridOptionsProperty(propertyName) {
|
|
239
219
|
return this.agGridOptionsService.getUserGridOptionsProperty(propertyName);
|
|
240
220
|
}
|
|
241
|
-
updateColumnFilterActiveState() {
|
|
242
|
-
const filteredCols = new Set();
|
|
243
|
-
const columnFilters = this.adaptableApi.filterApi.columnFilterApi.getActiveColumnFilters();
|
|
244
|
-
columnFilters?.forEach?.((columnFilter) => {
|
|
245
|
-
if (this.adaptableApi.filterApi.columnFilterApi.isColumnFilterActive(columnFilter)) {
|
|
246
|
-
filteredCols.add(columnFilter.ColumnId);
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
const agGridApi = this.getAgGridApi();
|
|
250
|
-
(agGridApi.getColumns() || []).forEach((col) => {
|
|
251
|
-
col.filterActive = filteredCols.has(col.getColId());
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
221
|
getColumnDefinitionsInclSpecialColumns(agGridColDefs) {
|
|
255
222
|
const allColDefs = this.enhanceColDefsWithSpecialColumns(agGridColDefs ?? this.getAgGridApi().getColumnDefs());
|
|
256
223
|
return allColDefs;
|
|
@@ -382,7 +349,7 @@ class AgGridAdapter {
|
|
|
382
349
|
deriveSelectedRowInfoFromAgGrid() {
|
|
383
350
|
const nodes = this.getAgGridApi().getSelectedNodes();
|
|
384
351
|
const selectedRows = [];
|
|
385
|
-
if (this.
|
|
352
|
+
if (this._adaptableInstance.isInPivotMode()) {
|
|
386
353
|
// dont perform row selection in pivot mode
|
|
387
354
|
return undefined;
|
|
388
355
|
}
|
|
@@ -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
|
}
|
|
@@ -4,8 +4,6 @@ exports.AgGridColumnAdapter = exports.getEditorForColumnDataType = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
|
|
6
6
|
const merge_1 = tslib_1.__importDefault(require("lodash/merge"));
|
|
7
|
-
const FilterWrapper_1 = require("./FilterWrapper");
|
|
8
|
-
const FloatingFilterWrapper_1 = require("./FloatingFilterWrapper");
|
|
9
7
|
const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
|
|
10
8
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
11
9
|
const AdaptableColumn_1 = require("../AdaptableState/Common/AdaptableColumn");
|
|
@@ -19,6 +17,9 @@ const AdaptableDateEditor_1 = require("./editors/AdaptableDateEditor");
|
|
|
19
17
|
const AgGridExportAdapter_1 = require("./AgGridExportAdapter");
|
|
20
18
|
const AdaptableHelper_1 = require("../Utilities/Helpers/AdaptableHelper");
|
|
21
19
|
const adaptableOverrideCheck_1 = require("../Utilities/adaptableOverrideCheck");
|
|
20
|
+
const AdaptableFilterHandler_1 = require("./AdaptableFilterHandler");
|
|
21
|
+
const AgGridFilterAdapter_1 = require("./AgGridFilterAdapter");
|
|
22
|
+
const AgGridFloatingFilterAdapter_1 = require("./AgGridFloatingFilterAdapter");
|
|
22
23
|
function getEditorForColumnDataType(columnDataType, variant) {
|
|
23
24
|
if (columnDataType === 'number') {
|
|
24
25
|
return variant === 'react' ? AdaptableNumberEditor_1.AdaptableReactNumberEditor : AdaptableNumberEditor_1.AdaptableNumberEditor;
|
|
@@ -105,7 +106,7 @@ class AgGridColumnAdapter {
|
|
|
105
106
|
!this.adaptableApi.columnApi.isSelectionColumn(colId));
|
|
106
107
|
}
|
|
107
108
|
setupColumns() {
|
|
108
|
-
const pivotMode = this.
|
|
109
|
+
const pivotMode = this.adaptableInstance.isInPivotMode();
|
|
109
110
|
let cols = pivotMode
|
|
110
111
|
? // for pivot mode, we take only the initial columns
|
|
111
112
|
this.agGridApi.getColumns()
|
|
@@ -243,6 +244,18 @@ class AgGridColumnAdapter {
|
|
|
243
244
|
return baseHeaderClass;
|
|
244
245
|
}
|
|
245
246
|
const target = 'columnHeader';
|
|
247
|
+
// handle special case of headers with text alignment
|
|
248
|
+
// in this case, we add a specific class to the header
|
|
249
|
+
// see #header_text_align
|
|
250
|
+
const formatColumnWithTextAlignment = this.getRelevantFormatColumnHeaderStyles(abColumn)
|
|
251
|
+
// we take the first one only, even if multiple are defined
|
|
252
|
+
.find((fc) => fc.CellAlignment != undefined);
|
|
253
|
+
if (formatColumnWithTextAlignment) {
|
|
254
|
+
baseHeaderClass = [
|
|
255
|
+
...baseHeaderClass,
|
|
256
|
+
`ab-header__align-${formatColumnWithTextAlignment.CellAlignment.toLowerCase()}`,
|
|
257
|
+
];
|
|
258
|
+
}
|
|
246
259
|
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn, {
|
|
247
260
|
target,
|
|
248
261
|
});
|
|
@@ -291,7 +304,11 @@ class AgGridColumnAdapter {
|
|
|
291
304
|
return {};
|
|
292
305
|
}
|
|
293
306
|
const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(gridCell);
|
|
294
|
-
const
|
|
307
|
+
const isQuickSearchAvailable = this.adaptableApi.internalApi
|
|
308
|
+
.getModuleService()
|
|
309
|
+
.isAdapTableModulePresent('QuickSearch');
|
|
310
|
+
const isCurrentMatch = isQuickSearchAvailable &&
|
|
311
|
+
this.adaptableApi.agGridApi.findGetActiveMatch()?.node === params.node;
|
|
295
312
|
const textStyleToApply = isCurrentMatch
|
|
296
313
|
? { ...textMatchStyle, ...currentTextMatchStyle }
|
|
297
314
|
: textMatchStyle;
|
|
@@ -363,10 +380,18 @@ class AgGridColumnAdapter {
|
|
|
363
380
|
}
|
|
364
381
|
setupColumnCellEditor({ colId, col, colDef, abColumn }) {
|
|
365
382
|
const shouldShowSelectCellEditor = this.adaptableApi.userInterfaceApi.internalApi.shouldShowSelectCellEditor(abColumn);
|
|
366
|
-
const hasRichSelectCellEditor = this.
|
|
383
|
+
const hasRichSelectCellEditor = this.adaptableApi.internalApi
|
|
384
|
+
.getAgGridModulesAdapter()
|
|
385
|
+
.isAgGridModuleRegistered('RichSelectModule');
|
|
367
386
|
this.setColDefProperty(col, 'cellEditor', () => {
|
|
368
387
|
if (shouldShowSelectCellEditor) {
|
|
369
|
-
|
|
388
|
+
if (hasRichSelectCellEditor) {
|
|
389
|
+
return 'agRichSelectCellEditor';
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
this.adaptableApi.logWarn(`Cannot show Select Editor as missing required AG Grid module: RichSelect`);
|
|
393
|
+
return colDef.cellEditor;
|
|
394
|
+
}
|
|
370
395
|
}
|
|
371
396
|
else {
|
|
372
397
|
if (colDef.cellEditor) {
|
|
@@ -517,8 +542,10 @@ class AgGridColumnAdapter {
|
|
|
517
542
|
return original_headerValueGetter;
|
|
518
543
|
});
|
|
519
544
|
}
|
|
520
|
-
setupColumnFilter(
|
|
521
|
-
|
|
545
|
+
setupColumnFilter(columnSetup) {
|
|
546
|
+
const { col, colDef, abColumn, colId } = columnSetup;
|
|
547
|
+
const useAdaptableFilter = this.adaptableOptions.filterOptions.useAdaptableFiltering;
|
|
548
|
+
if (!useAdaptableFilter) {
|
|
522
549
|
return;
|
|
523
550
|
}
|
|
524
551
|
// setup Auto Group Column Filter
|
|
@@ -545,29 +572,38 @@ class AgGridColumnAdapter {
|
|
|
545
572
|
return;
|
|
546
573
|
}
|
|
547
574
|
// setup "normal" column filter
|
|
548
|
-
this.setColDefProperty(col, 'filter', () => {
|
|
575
|
+
this.setColDefProperty(col, 'filter', (original_filter) => {
|
|
549
576
|
if (!colDef.filter) {
|
|
550
577
|
return;
|
|
551
578
|
}
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
?.filter((colDef) => !this.isColGroupDef(colDef))
|
|
562
|
-
.map((colDef) => {
|
|
563
|
-
const isFloatingFilterEnabled = initialGridOptions.defaultColDef?.floatingFilter || colDef.floatingFilter;
|
|
564
|
-
if (isFloatingFilterEnabled) {
|
|
565
|
-
colDef.floatingFilterComponent = (0, FloatingFilterWrapper_1.FloatingFilterWrapperFactory)(this.adaptableInstance);
|
|
579
|
+
if (!useAdaptableFilter) {
|
|
580
|
+
return original_filter;
|
|
581
|
+
}
|
|
582
|
+
if (useAdaptableFilter &&
|
|
583
|
+
typeof original_filter !== 'boolean' &&
|
|
584
|
+
typeof original_filter?.handler !== 'function' &&
|
|
585
|
+
!this.adaptableInstance.isInPivotMode()) {
|
|
586
|
+
this.adaptableApi.consoleError(`Column '${colId}' has a custom filter defined in colDef.filter, but Adaptable Filtering accepts only the TRUE/FALSE values!`);
|
|
587
|
+
return false;
|
|
566
588
|
}
|
|
589
|
+
return {
|
|
590
|
+
component: (0, AgGridFilterAdapter_1.AgGridFilterAdapterFactory)(this.adaptableInstance),
|
|
591
|
+
// doesFilterPass,
|
|
592
|
+
handler: (params) => new AdaptableFilterHandler_1.AdaptableFilterHandler(this.adaptableApi, columnSetup),
|
|
593
|
+
};
|
|
567
594
|
});
|
|
568
595
|
}
|
|
569
596
|
setupColumnFloatingFilter({ col, colDef }) {
|
|
570
|
-
const
|
|
597
|
+
const userProvidedFilterProp = this.getUserColDefProperty(col.getColId(), 'filter');
|
|
598
|
+
const hasInvalidFilterProp = typeof userProvidedFilterProp !== 'boolean' &&
|
|
599
|
+
typeof userProvidedFilterProp?.handler !== 'function' &&
|
|
600
|
+
!this.adaptableInstance.isInPivotMode();
|
|
601
|
+
if (hasInvalidFilterProp) {
|
|
602
|
+
// warning is logged in the 'setupColumnFilter' method
|
|
603
|
+
return false;
|
|
604
|
+
}
|
|
605
|
+
const isFloatingFilterDisabled = !colDef.filter ||
|
|
606
|
+
!colDef.floatingFilter ||
|
|
571
607
|
!this.adaptableOptions.filterOptions.useAdaptableFiltering ||
|
|
572
608
|
!this.adaptableOptions.filterOptions.columnFilterOptions.showQuickFilter;
|
|
573
609
|
if (this.adaptableApi.columnApi.isAutoRowGroupColumn(col.getColId())) {
|
|
@@ -589,13 +625,13 @@ class AgGridColumnAdapter {
|
|
|
589
625
|
if (isFloatingFilterDisabled) {
|
|
590
626
|
return;
|
|
591
627
|
}
|
|
592
|
-
return (0,
|
|
628
|
+
return (0, AgGridFloatingFilterAdapter_1.AgGridFloatingFilterAdapterFactory)(this.adaptableInstance);
|
|
593
629
|
});
|
|
594
630
|
this.setColDefProperty(col, 'floatingFilter', (original_floatingFilter) => {
|
|
595
631
|
if (isFloatingFilterDisabled) {
|
|
596
632
|
return;
|
|
597
633
|
}
|
|
598
|
-
return (0,
|
|
634
|
+
return (0, AgGridFloatingFilterAdapter_1.AgGridFloatingFilterAdapterFactory)(this.adaptableInstance);
|
|
599
635
|
});
|
|
600
636
|
this.setColDefProperty(col, 'suppressFloatingFilterButton', () => {
|
|
601
637
|
return !isFloatingFilterDisabled;
|
|
@@ -816,6 +852,12 @@ class AgGridColumnAdapter {
|
|
|
816
852
|
return true;
|
|
817
853
|
}
|
|
818
854
|
isQuickSearchActive(gridCell) {
|
|
855
|
+
const isQuickSearchAvailable = this.adaptableApi.internalApi
|
|
856
|
+
.getModuleService()
|
|
857
|
+
.isAdapTableModulePresent('QuickSearch');
|
|
858
|
+
if (!isQuickSearchAvailable) {
|
|
859
|
+
return false;
|
|
860
|
+
}
|
|
819
861
|
const quickSearchValue = this.adaptableApi.quickSearchApi.getQuickSearchValue();
|
|
820
862
|
if (!quickSearchValue) {
|
|
821
863
|
return false;
|
|
@@ -893,7 +935,7 @@ class AgGridColumnAdapter {
|
|
|
893
935
|
: undefined;
|
|
894
936
|
}
|
|
895
937
|
getNoteCellClassName(gridCell, params) {
|
|
896
|
-
if (!this.adaptableApi.internalApi.getModuleService().
|
|
938
|
+
if (!this.adaptableApi.internalApi.getModuleService().isAdapTableModulePresent('Note')) {
|
|
897
939
|
return;
|
|
898
940
|
}
|
|
899
941
|
if (!this.adaptableApi.noteApi.internalApi.areNotesSupported()) {
|
|
@@ -910,7 +952,7 @@ class AgGridColumnAdapter {
|
|
|
910
952
|
return 'ab-Cell-Note';
|
|
911
953
|
}
|
|
912
954
|
getCommentCellClassName(gridCell, params) {
|
|
913
|
-
if (!this.adaptableApi.internalApi.getModuleService().
|
|
955
|
+
if (!this.adaptableApi.internalApi.getModuleService().isAdapTableModulePresent('Comment')) {
|
|
914
956
|
return;
|
|
915
957
|
}
|
|
916
958
|
if (!this.adaptableApi.commentApi.internalApi.areCommentsSupportedInLayout()) {
|
|
@@ -1027,16 +1069,10 @@ class AgGridColumnAdapter {
|
|
|
1027
1069
|
// YET, see https://github.com/AdaptableTools/adaptable/issues/2947#issuecomment-3062304655
|
|
1028
1070
|
return {};
|
|
1029
1071
|
}
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1032
|
-
target,
|
|
1033
|
-
});
|
|
1034
|
-
if (!activeFormatColumnsWithStyle.length) {
|
|
1072
|
+
const relevantFormatColumnsWithStyle = this.getRelevantFormatColumnHeaderStyles(column);
|
|
1073
|
+
if (!relevantFormatColumnsWithStyle.length) {
|
|
1035
1074
|
return {};
|
|
1036
1075
|
}
|
|
1037
|
-
const relevantFormatColumnsWithStyle = activeFormatColumnsWithStyle.filter((formatColumn) => {
|
|
1038
|
-
return this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInHeader(formatColumn, column);
|
|
1039
|
-
});
|
|
1040
1076
|
return this.getFormatColumnAdaptableStyle(relevantFormatColumnsWithStyle);
|
|
1041
1077
|
}
|
|
1042
1078
|
getStyledColumnStyle(styledColumn, abColumn, params) {
|
|
@@ -1170,5 +1206,14 @@ class AgGridColumnAdapter {
|
|
|
1170
1206
|
// @ts-ignore
|
|
1171
1207
|
return columnDefinition['children'] != null;
|
|
1172
1208
|
}
|
|
1209
|
+
getRelevantFormatColumnHeaderStyles(column) {
|
|
1210
|
+
return this.adaptableApi.formatColumnApi.internalApi
|
|
1211
|
+
.getFormatColumnsWithStyleForColumn(column, {
|
|
1212
|
+
target: 'columnHeader',
|
|
1213
|
+
})
|
|
1214
|
+
.filter((formatColumn) => {
|
|
1215
|
+
return this.adaptableApi.formatColumnApi.internalApi.formatColumnShouldRenderInHeader(formatColumn, column);
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1173
1218
|
}
|
|
1174
1219
|
exports.AgGridColumnAdapter = AgGridColumnAdapter;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgGridFilterAdapterFactory = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const AdaptableColumnFilter_1 = require("../View/Components/ColumnFilter/AdaptableColumnFilter");
|
|
7
|
+
const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
|
|
8
|
+
const AgGridFilterAdapterFactory = (adaptable) => {
|
|
9
|
+
function isFilterActive(colId) {
|
|
10
|
+
// we need this here
|
|
11
|
+
if (adaptable.isDestroyed) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
//make the small filter icon to appear when there is a filter
|
|
15
|
+
return adaptable.api.filterApi.columnFilterApi.isColumnFilterActiveForColumn(colId);
|
|
16
|
+
}
|
|
17
|
+
function getContainerId(colId) {
|
|
18
|
+
return 'filter_' + colId + '_' + adaptable.adaptableOptions.adaptableId;
|
|
19
|
+
}
|
|
20
|
+
return class AgGridFilterAdapter {
|
|
21
|
+
init(params) {
|
|
22
|
+
this.params = params;
|
|
23
|
+
this.column = params.column;
|
|
24
|
+
this.filterContainer = document.createElement('div');
|
|
25
|
+
this.filterContainer.id = getContainerId(this.params.column.getColId());
|
|
26
|
+
}
|
|
27
|
+
getGui() {
|
|
28
|
+
return this.filterContainer;
|
|
29
|
+
}
|
|
30
|
+
refresh(newParams) {
|
|
31
|
+
// always reuse the current instance
|
|
32
|
+
// the filter is refreshed in the underlying React component
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
afterGuiAttached(params) {
|
|
36
|
+
//we always unmount first so the autofocus from the form works... in other grids we unmount when hidden
|
|
37
|
+
this.unmountReactRoot?.();
|
|
38
|
+
const columnId = this.column.getColId();
|
|
39
|
+
let column = adaptable.api.columnApi.getColumnWithColumnId(columnId);
|
|
40
|
+
if (column) {
|
|
41
|
+
this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(React.createElement(AdaptableColumnFilter_1.AdaptableColumnFilter, {
|
|
42
|
+
columnId,
|
|
43
|
+
wrapperProps: { p: 2 },
|
|
44
|
+
}), adaptable), this.filterContainer);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
destroy() {
|
|
48
|
+
this.unmountReactRoot?.();
|
|
49
|
+
this.filterContainer = null;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
exports.AgGridFilterAdapterFactory = AgGridFilterAdapterFactory;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AgGridFloatingFilterAdapterFactory = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_1 = require("react");
|
|
7
6
|
const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
|
|
8
7
|
const AdaptableFloatingFilter_1 = require("../View/Components/ColumnFilter/AdaptableFloatingFilter");
|
|
9
|
-
const getAgGridFilterNotifyModelFn_1 = require("./getAgGridFilterNotifyModelFn");
|
|
10
8
|
const filterContainerStyle = {
|
|
11
9
|
overflow: 'hidden',
|
|
12
10
|
minWidth: '0',
|
|
@@ -16,7 +14,7 @@ const filterContainerStyle = {
|
|
|
16
14
|
position: 'relative',
|
|
17
15
|
flex: '1 1 auto',
|
|
18
16
|
};
|
|
19
|
-
const
|
|
17
|
+
const AgGridFloatingFilterAdapterFactory = (adaptable) => {
|
|
20
18
|
const adaptableApi = adaptable.api;
|
|
21
19
|
function getContainerId(colId) {
|
|
22
20
|
return `floatingFilter_${colId}_${adaptable.adaptableOptions.adaptableId}`;
|
|
@@ -30,9 +28,6 @@ const FloatingFilterWrapperFactory = (adaptable) => {
|
|
|
30
28
|
};
|
|
31
29
|
return columnFilterProps;
|
|
32
30
|
}
|
|
33
|
-
function getNotifyModel(colId, onModelChange) {
|
|
34
|
-
return (0, getAgGridFilterNotifyModelFn_1.getAgGridFilterNotifyModelFn)(adaptableApi, colId, onModelChange);
|
|
35
|
-
}
|
|
36
31
|
function findParentWithClass(element, className, stopClasses, applyToAll) {
|
|
37
32
|
let current = element.parentElement;
|
|
38
33
|
while (current) {
|
|
@@ -86,57 +81,51 @@ const FloatingFilterWrapperFactory = (adaptable) => {
|
|
|
86
81
|
}
|
|
87
82
|
};
|
|
88
83
|
}
|
|
89
|
-
|
|
90
|
-
return (0, react_1.forwardRef)(function ReactFloatingFilterWrapper(props, ref) {
|
|
91
|
-
const colId = props.column.getId();
|
|
92
|
-
const { onModelChange } = props;
|
|
93
|
-
const column = adaptableApi.columnApi.getColumnWithColumnId(colId);
|
|
94
|
-
(0, react_1.useImperativeHandle)(ref, () => {
|
|
95
|
-
return {
|
|
96
|
-
onParentModelChanged() { },
|
|
97
|
-
};
|
|
98
|
-
});
|
|
99
|
-
const notifyModel = getNotifyModel(colId, onModelChange);
|
|
100
|
-
if (!column) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
return (0, renderWithAdaptableContext_1.renderWithAdaptableContext)(React.createElement("div", { ref: patchParentElement, id: getContainerId(colId), style: filterContainerStyle },
|
|
104
|
-
React.createElement(AdaptableFloatingFilter_1.AdaptableFloatingFilter, { ...getFilterProps(colId), onChange: notifyModel, onClear: notifyModel })), adaptable);
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return class FloatingFilterWrapper {
|
|
108
|
-
onParentModelChanged(parentModel, filterChangedEvent) {
|
|
109
|
-
// todo?
|
|
110
|
-
}
|
|
111
|
-
afterGuiAttached() {
|
|
112
|
-
patchParentElement(this.filterContainer);
|
|
113
|
-
}
|
|
84
|
+
return class AgGridFloatingFilterAdapter {
|
|
114
85
|
init(params) {
|
|
115
86
|
const colId = params.column.getColId();
|
|
87
|
+
this.colId = colId;
|
|
116
88
|
this.filterContainer = document.createElement('div');
|
|
117
89
|
this.filterContainer.id = getContainerId(colId);
|
|
118
90
|
Object.keys(filterContainerStyle).forEach((key) => {
|
|
119
91
|
//@ts-ignore
|
|
120
92
|
this.filterContainer.style[key] = filterContainerStyle[key];
|
|
121
93
|
});
|
|
122
|
-
const notifyModel = getNotifyModel(colId, params.filterParams.filterChangedCallback);
|
|
123
94
|
const column = adaptableApi.columnApi.getColumnWithColumnId(colId);
|
|
124
95
|
if (column) {
|
|
125
96
|
const filterProps = getFilterProps(colId);
|
|
126
97
|
this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(React.createElement(AdaptableFloatingFilter_1.AdaptableFloatingFilter, {
|
|
127
98
|
...filterProps,
|
|
128
|
-
onChange: notifyModel,
|
|
129
|
-
onClear: notifyModel,
|
|
130
99
|
}), adaptable), this.filterContainer);
|
|
131
100
|
}
|
|
132
101
|
}
|
|
102
|
+
onParentModelChanged(parentModel, filterChangedEvent) {
|
|
103
|
+
// AFL: this should NOT be required, but AG Grid calls this method
|
|
104
|
+
// most likely is a bug and will be removed in future versions
|
|
105
|
+
}
|
|
106
|
+
afterGuiAttached() {
|
|
107
|
+
patchParentElement(this.filterContainer);
|
|
108
|
+
}
|
|
133
109
|
getGui() {
|
|
134
110
|
return this.filterContainer;
|
|
135
111
|
}
|
|
112
|
+
refresh(params) {
|
|
113
|
+
// always reuse the current instance
|
|
114
|
+
// the filte ris refreshed in the underlying React component
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
136
117
|
destroy() {
|
|
137
|
-
|
|
118
|
+
// Use setTimeout to defer unmounting to next event loop tick
|
|
119
|
+
// This ensures we're not unmounting during React's rendering phase
|
|
120
|
+
if (this.unmountReactRoot) {
|
|
121
|
+
const unmount = this.unmountReactRoot;
|
|
122
|
+
setTimeout(() => {
|
|
123
|
+
unmount();
|
|
124
|
+
}, 0);
|
|
125
|
+
this.unmountReactRoot = undefined;
|
|
126
|
+
}
|
|
138
127
|
this.filterContainer = null;
|
|
139
128
|
}
|
|
140
129
|
};
|
|
141
130
|
};
|
|
142
|
-
exports.
|
|
131
|
+
exports.AgGridFloatingFilterAdapterFactory = AgGridFloatingFilterAdapterFactory;
|