@adaptabletools/adaptable 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 +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 +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 +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 +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 +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/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 +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/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 +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 +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
|
@@ -8,7 +8,7 @@ import { ColumnScope } from '../../AdaptableState/Common/ColumnScope';
|
|
|
8
8
|
import { AdaptablePredicateDef } from '../../AdaptableState/Common/AdaptablePredicate';
|
|
9
9
|
import { AdaptableMessageType } from '../../AdaptableState/Common/AdaptableMessageType';
|
|
10
10
|
import { IRowNode } from 'ag-grid-enterprise';
|
|
11
|
-
import { RowDataChangedInfo } from '../../types';
|
|
11
|
+
import { LayoutExtendedConfig, RowDataChangedInfo } from '../../types';
|
|
12
12
|
export declare class AlertInternalApi extends ApiBase {
|
|
13
13
|
getExpressionForAlertRule(alertRule: AlertRule): string | undefined;
|
|
14
14
|
/**
|
|
@@ -20,18 +20,18 @@ export declare class AlertInternalApi extends ApiBase {
|
|
|
20
20
|
* Retrieves all Alert Definitions in Alert State which are NOT Reactive (BooleanQuery)
|
|
21
21
|
* @returns alert definitions
|
|
22
22
|
*/
|
|
23
|
-
getNonReactiveAlertDefinitions(): AlertDefinition[];
|
|
23
|
+
getNonReactiveAlertDefinitions(config?: LayoutExtendedConfig): AlertDefinition[];
|
|
24
24
|
/**
|
|
25
25
|
* Retrieves all active (non-suspended) Alert Definitions in Alert State which are NOT Reactive (BooleanQuery)
|
|
26
26
|
* @returns alert definitions
|
|
27
27
|
*/
|
|
28
|
-
getActiveNonReactiveAlertDefinitions(): AlertDefinition[];
|
|
28
|
+
getActiveNonReactiveAlertDefinitions(config?: LayoutExtendedConfig): AlertDefinition[];
|
|
29
29
|
/**
|
|
30
30
|
*
|
|
31
31
|
* Retrieves all Alert Definitions in Alert State which are reactive (ObservableQuery & AggregationQuery)
|
|
32
32
|
* @returns alert definitions
|
|
33
33
|
*/
|
|
34
|
-
getReactiveAlertDefinitions(): AlertDefinition[];
|
|
34
|
+
getReactiveAlertDefinitions(config?: LayoutExtendedConfig): AlertDefinition[];
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
37
|
* Retrieves all active (non-suspended) Alert Definitions in Alert State which are reactive (ObservableQuery & AggregationQuery)
|
|
@@ -42,12 +42,12 @@ export declare class AlertInternalApi extends ApiBase {
|
|
|
42
42
|
* Retrieves all Alert Definitions which prevent a Cell Edit
|
|
43
43
|
* @returns alert definitions
|
|
44
44
|
*/
|
|
45
|
-
getAlertDefinitionsWithPreventEdit(): AlertDefinition[];
|
|
45
|
+
getAlertDefinitionsWithPreventEdit(config?: LayoutExtendedConfig): AlertDefinition[];
|
|
46
46
|
/**
|
|
47
47
|
* Retrieves all Alert Definitions which allow a Cell Edit
|
|
48
48
|
* @returns alert definitions
|
|
49
49
|
*/
|
|
50
|
-
getAlertDefinitionsWithAllowEdit(): AlertDefinition[];
|
|
50
|
+
getAlertDefinitionsWithAllowEdit(config?: LayoutExtendedConfig): AlertDefinition[];
|
|
51
51
|
/**
|
|
52
52
|
* Runs after a button in an Alert Form is clicked
|
|
53
53
|
*/
|
|
@@ -34,26 +34,26 @@ export class AlertInternalApi extends ApiBase {
|
|
|
34
34
|
* Retrieves all Alert Definitions in Alert State which are NOT Reactive (BooleanQuery)
|
|
35
35
|
* @returns alert definitions
|
|
36
36
|
*/
|
|
37
|
-
getNonReactiveAlertDefinitions() {
|
|
37
|
+
getNonReactiveAlertDefinitions(config) {
|
|
38
38
|
return this.getAlertApi()
|
|
39
|
-
.getAlertDefinitions()
|
|
39
|
+
.getAlertDefinitions(config)
|
|
40
40
|
.filter((alertDef) => !isReactiveQuery(alertDef.Rule));
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Retrieves all active (non-suspended) Alert Definitions in Alert State which are NOT Reactive (BooleanQuery)
|
|
44
44
|
* @returns alert definitions
|
|
45
45
|
*/
|
|
46
|
-
getActiveNonReactiveAlertDefinitions() {
|
|
47
|
-
return this.getNonReactiveAlertDefinitions().filter((alertDef) => !alertDef.IsSuspended);
|
|
46
|
+
getActiveNonReactiveAlertDefinitions(config) {
|
|
47
|
+
return this.getNonReactiveAlertDefinitions(config).filter((alertDef) => !alertDef.IsSuspended);
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
50
|
*
|
|
51
51
|
* Retrieves all Alert Definitions in Alert State which are reactive (ObservableQuery & AggregationQuery)
|
|
52
52
|
* @returns alert definitions
|
|
53
53
|
*/
|
|
54
|
-
getReactiveAlertDefinitions() {
|
|
54
|
+
getReactiveAlertDefinitions(config) {
|
|
55
55
|
return this.getAlertApi()
|
|
56
|
-
.getAlertDefinitions()
|
|
56
|
+
.getAlertDefinitions(config)
|
|
57
57
|
.filter((alertDef) => isReactiveQuery(alertDef.Rule));
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
@@ -68,15 +68,15 @@ export class AlertInternalApi extends ApiBase {
|
|
|
68
68
|
* Retrieves all Alert Definitions which prevent a Cell Edit
|
|
69
69
|
* @returns alert definitions
|
|
70
70
|
*/
|
|
71
|
-
getAlertDefinitionsWithPreventEdit() {
|
|
72
|
-
return this.getActiveNonReactiveAlertDefinitions().filter((a) => a.AlertProperties != null && a.AlertProperties.PreventEdit === true);
|
|
71
|
+
getAlertDefinitionsWithPreventEdit(config) {
|
|
72
|
+
return this.getActiveNonReactiveAlertDefinitions(config).filter((a) => a.AlertProperties != null && a.AlertProperties.PreventEdit === true);
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
75
|
* Retrieves all Alert Definitions which allow a Cell Edit
|
|
76
76
|
* @returns alert definitions
|
|
77
77
|
*/
|
|
78
|
-
getAlertDefinitionsWithAllowEdit() {
|
|
79
|
-
return this.getActiveNonReactiveAlertDefinitions().filter((a) => a.AlertProperties == null || a.AlertProperties.PreventEdit !== true);
|
|
78
|
+
getAlertDefinitionsWithAllowEdit(config) {
|
|
79
|
+
return this.getActiveNonReactiveAlertDefinitions(config).filter((a) => a.AlertProperties == null || a.AlertProperties.PreventEdit !== true);
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
82
|
* Runs after a button in an Alert Form is clicked
|
|
@@ -5,7 +5,9 @@ import { AdaptablePredicateDef } from '../../AdaptableState/Common/AdaptablePred
|
|
|
5
5
|
import { ColumnFilter } from '../../AdaptableState/Common/ColumnFilter';
|
|
6
6
|
import { GridCell } from '../../AdaptableState/Selection/GridCell';
|
|
7
7
|
import { LayoutColumnFilterAction } from '../../Redux/ActionsReducers/LayoutRedux';
|
|
8
|
+
import { InFilterValue } from '../../types';
|
|
8
9
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
10
|
+
import { AdaptableFilterHandler } from '../../agGrid/AdaptableFilterHandler';
|
|
9
11
|
export declare class ColumnFilterInternalApi extends ApiBase {
|
|
10
12
|
/**
|
|
11
13
|
* Returns Predicate Definition for given Column and Quick Filter shortcut
|
|
@@ -44,4 +46,15 @@ export declare class ColumnFilterInternalApi extends ApiBase {
|
|
|
44
46
|
getPredicateDefShortcuts(predicateDef: AdaptablePredicateDef): string[];
|
|
45
47
|
showQuickFilterDropdown(columnId: string): boolean;
|
|
46
48
|
openColumnFilterPopup(columnId: string, popupProps?: any): void;
|
|
49
|
+
/**
|
|
50
|
+
* First we try to get the cached values from the FilterHandler
|
|
51
|
+
* Only if the FilterHandler is not available we fallback to the GridApi method
|
|
52
|
+
*/
|
|
53
|
+
getColumnFilterValues(options: {
|
|
54
|
+
columnId: string;
|
|
55
|
+
currentSearchValue: string;
|
|
56
|
+
}): Promise<InFilterValue[]>;
|
|
57
|
+
shouldAutoApplyColumnFilter(columnId: string): boolean;
|
|
58
|
+
shouldCacheColumnFilterValues(columnId: string): boolean;
|
|
59
|
+
getAllAdaptableFilterHandlers(): AdaptableFilterHandler[];
|
|
47
60
|
}
|
|
@@ -4,6 +4,7 @@ import ArrayExtensions, { areArraysEqual } from '../../Utilities/Extensions/Arra
|
|
|
4
4
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
5
5
|
import { COLUMN_FILTER_WINDOW } from '../../View/Components/Popups/WindowPopups/windowFactory';
|
|
6
6
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
7
|
+
import { AdaptableFilterHandler } from '../../agGrid/AdaptableFilterHandler';
|
|
7
8
|
export class ColumnFilterInternalApi extends ApiBase {
|
|
8
9
|
/**
|
|
9
10
|
* Returns Predicate Definition for given Column and Quick Filter shortcut
|
|
@@ -164,7 +165,38 @@ export class ColumnFilterInternalApi extends ApiBase {
|
|
|
164
165
|
if (ArrayExtensions.IsNullOrEmpty(oldFilters) && ArrayExtensions.IsNullOrEmpty(newFilters)) {
|
|
165
166
|
return false;
|
|
166
167
|
}
|
|
167
|
-
return ArrayExtensions.
|
|
168
|
+
return !ArrayExtensions.areArraysEqualWithCustomComparator(oldFilters, newFilters, (filter1, filter2) => {
|
|
169
|
+
// Compare basic properties
|
|
170
|
+
if (filter1.ColumnId !== filter2.ColumnId) {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
if ((filter1.PredicatesOperator || 'AND') !== (filter2.PredicatesOperator || 'AND')) {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
if ((filter1.IsSuspended || false) !== (filter2.IsSuspended || false)) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
// Compare predicates (regardless of order)
|
|
180
|
+
return ArrayExtensions.areArraysEqualWithCustomComparator(filter1.Predicates, filter2.Predicates, (pred1, pred2) => {
|
|
181
|
+
if (pred1.PredicateId !== pred2.PredicateId) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
// Compare inputs array (might be primitives or objects)
|
|
185
|
+
return ArrayExtensions.areArraysEqualWithCustomComparator(pred1.Inputs, pred2.Inputs, (input1, input2) => {
|
|
186
|
+
if (input1 === input2) {
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
if (typeof input1 !== typeof input2) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
// For object inputs, use JSON comparison
|
|
193
|
+
if (typeof input1 === 'object' && input1 !== null && input2 !== null) {
|
|
194
|
+
return JSON.stringify(input1) === JSON.stringify(input2);
|
|
195
|
+
}
|
|
196
|
+
return input1 === input2;
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
});
|
|
168
200
|
}
|
|
169
201
|
getPredicateDefShortcuts(predicateDef) {
|
|
170
202
|
const shortcuts = this.getFilterOptions().columnFilterOptions.quickFilterWildcards;
|
|
@@ -203,4 +235,64 @@ export class ColumnFilterInternalApi extends ApiBase {
|
|
|
203
235
|
},
|
|
204
236
|
});
|
|
205
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* First we try to get the cached values from the FilterHandler
|
|
240
|
+
* Only if the FilterHandler is not available we fallback to the GridApi method
|
|
241
|
+
*/
|
|
242
|
+
async getColumnFilterValues(options) {
|
|
243
|
+
const shouldUseCachedValues = this.shouldCacheColumnFilterValues(options.columnId);
|
|
244
|
+
if (!shouldUseCachedValues) {
|
|
245
|
+
return this.getGridApi().internalApi.getDistinctFilterDisplayValuesForColumn(options);
|
|
246
|
+
}
|
|
247
|
+
const columnFilterHandler = this.getAgGridApi().getColumnFilterHandler(options.columnId);
|
|
248
|
+
if (!columnFilterHandler) {
|
|
249
|
+
this.logWarn(`No ColumnFilterHandler found for columnId: ${options.columnId}!`);
|
|
250
|
+
return this.getGridApi().internalApi.getDistinctFilterDisplayValuesForColumn(options);
|
|
251
|
+
}
|
|
252
|
+
if (typeof columnFilterHandler.getFilterDisplayValues !== 'function') {
|
|
253
|
+
this.logWarn(`ColumnFilterHandler for columnId: ${options.columnId} does not have getFilterDisplayValues method!`);
|
|
254
|
+
return this.getGridApi().internalApi.getDistinctFilterDisplayValuesForColumn(options);
|
|
255
|
+
}
|
|
256
|
+
return columnFilterHandler.getFilterDisplayValues(options.currentSearchValue);
|
|
257
|
+
}
|
|
258
|
+
shouldAutoApplyColumnFilter(columnId) {
|
|
259
|
+
const autoApplyColumnFilterOpt = this.getOptionsApi().getFilterOptions().columnFilterOptions?.autoApplyColumnFilter;
|
|
260
|
+
if (typeof autoApplyColumnFilterOpt === 'boolean') {
|
|
261
|
+
return autoApplyColumnFilterOpt;
|
|
262
|
+
}
|
|
263
|
+
if (typeof autoApplyColumnFilterOpt === 'function') {
|
|
264
|
+
const column = this.getColumnApi().getColumnWithColumnId(columnId);
|
|
265
|
+
const context = {
|
|
266
|
+
column,
|
|
267
|
+
...this.getAdaptableApi().internalApi.buildBaseContext(),
|
|
268
|
+
};
|
|
269
|
+
return autoApplyColumnFilterOpt(context);
|
|
270
|
+
}
|
|
271
|
+
// fallback, should never happen
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
274
|
+
shouldCacheColumnFilterValues(columnId) {
|
|
275
|
+
const cacheColumnFilterValuesOpt = this.getOptionsApi().getFilterOptions().columnFilterOptions?.cacheInFilterValues;
|
|
276
|
+
if (typeof cacheColumnFilterValuesOpt === 'boolean') {
|
|
277
|
+
return cacheColumnFilterValuesOpt;
|
|
278
|
+
}
|
|
279
|
+
if (typeof cacheColumnFilterValuesOpt === 'function') {
|
|
280
|
+
const column = this.getColumnApi().getColumnWithColumnId(columnId);
|
|
281
|
+
const context = {
|
|
282
|
+
column,
|
|
283
|
+
...this.getAdaptableApi().internalApi.buildBaseContext(),
|
|
284
|
+
};
|
|
285
|
+
return cacheColumnFilterValuesOpt(context);
|
|
286
|
+
}
|
|
287
|
+
// fallback, should never happen
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
getAllAdaptableFilterHandlers() {
|
|
291
|
+
const allFilterableColumns = this.getColumnApi().getFilterableColumns();
|
|
292
|
+
const filterHandlers = allFilterableColumns
|
|
293
|
+
.map((column) => this.getAgGridApi().getColumnFilterHandler(column.columnId))
|
|
294
|
+
.filter(Boolean)
|
|
295
|
+
.filter((handler) => handler instanceof AdaptableFilterHandler);
|
|
296
|
+
return filterHandlers;
|
|
297
|
+
}
|
|
206
298
|
}
|
|
@@ -2,7 +2,7 @@ import { ApiBase } from '../Implementation/ApiBase';
|
|
|
2
2
|
import { ColDef, Column, HeaderValueGetterParams, IRowNode } from 'ag-grid-enterprise';
|
|
3
3
|
import { CustomSort } from '../../AdaptableState/CustomSortState';
|
|
4
4
|
import { ColumnValuesComparer } from '../../AdaptableOptions/CustomSortOptions';
|
|
5
|
-
import { AdaptableColumn } from '../../types';
|
|
5
|
+
import { AdaptableColumn, AdaptableColumnDataType } from '../../types';
|
|
6
6
|
export declare function getAutoRowGroupColumnIdFor(columnId: string): string;
|
|
7
7
|
export declare class ColumnInternalApi extends ApiBase {
|
|
8
8
|
/**
|
|
@@ -36,4 +36,5 @@ export declare class ColumnInternalApi extends ApiBase {
|
|
|
36
36
|
hasArrayDataType(column: AdaptableColumn): boolean;
|
|
37
37
|
getQueryableColumnsForUIEditor(): AdaptableColumn[];
|
|
38
38
|
isAlwaysHiddenColumn(columnIdentifier: string | ColDef): boolean;
|
|
39
|
+
getColumnDateTypes(): AdaptableColumnDataType[];
|
|
39
40
|
}
|
|
@@ -294,4 +294,8 @@ export class ColumnInternalApi extends ApiBase {
|
|
|
294
294
|
isAlwaysHiddenColumn(columnIdentifier) {
|
|
295
295
|
return this.getColumnApi().hasColumnType(columnIdentifier, HIDDEN_COLUMN_TYPE);
|
|
296
296
|
}
|
|
297
|
+
getColumnDateTypes() {
|
|
298
|
+
// this is required because Adaptable uses 'date' type for all AG Grid date types: 'date', 'dateString'
|
|
299
|
+
return ['date', 'dateString'];
|
|
300
|
+
}
|
|
297
301
|
}
|
|
@@ -33,7 +33,7 @@ export class DashboardInternalApi extends ApiBase {
|
|
|
33
33
|
getModuleToolbars() {
|
|
34
34
|
const moduleService = this.getAdaptableInternalApi().getModuleService();
|
|
35
35
|
return ALL_TOOLBARS.filter((moduleName) => {
|
|
36
|
-
return moduleService.
|
|
36
|
+
return moduleService.isAdapTableModulePresent(moduleName);
|
|
37
37
|
}).map((moduleName) => {
|
|
38
38
|
return {
|
|
39
39
|
id: moduleName,
|
|
@@ -8,4 +8,12 @@ export class EntitlementInternalApi extends ApiBase {
|
|
|
8
8
|
module.setModuleEntitlement();
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
+
setModulesAgGridDepsInfos() {
|
|
12
|
+
this.getAdaptableInternalApi()
|
|
13
|
+
.getModuleService()
|
|
14
|
+
.getModuleCollection()
|
|
15
|
+
.forEach((module) => {
|
|
16
|
+
module.setAgGridDepsInfo();
|
|
17
|
+
});
|
|
18
|
+
}
|
|
11
19
|
}
|
|
@@ -380,7 +380,7 @@ export class ExportInternalApi extends ApiBase {
|
|
|
380
380
|
};
|
|
381
381
|
const gridParams = {
|
|
382
382
|
modules: this.getAdaptableApi()
|
|
383
|
-
.internalApi.
|
|
383
|
+
.internalApi.getAgGridModulesAdapter()
|
|
384
384
|
.getAgGridRegisteredModules(),
|
|
385
385
|
};
|
|
386
386
|
htmlDivElement.style.display = 'none';
|
|
@@ -41,7 +41,7 @@ export class FlashingCellInternalApi extends ApiBase {
|
|
|
41
41
|
? toFlashingAlert(forPrimaryKey[columnId])
|
|
42
42
|
: toFlashingAlert(forPrimaryKey[FLASHING_CELL_ROW_KEY]);
|
|
43
43
|
if (adaptableFlashingCell?.flashingCellDefinition &&
|
|
44
|
-
!this.getLayoutApi().internalApi.
|
|
44
|
+
!this.getLayoutApi().internalApi.isObjectExtendedInLayout(adaptableFlashingCell.flashingCellDefinition, 'FlashingCell', this.getLayoutApi().getCurrentLayout())) {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
return adaptableFlashingCell;
|
|
@@ -1,37 +1,34 @@
|
|
|
1
1
|
import { HeaderValueGetterParams, IRowNode } from 'ag-grid-enterprise';
|
|
2
|
-
import { AdaptableColumn, AdaptableFormat, AdaptablePredicateDef, ColumnScope, FormatColumn, FormatColumnTarget, StringFormatterOptions } from '../../types';
|
|
2
|
+
import { AdaptableColumn, AdaptableFormat, AdaptablePredicateDef, ColumnScope, FormatColumn, FormatColumnConfig, FormatColumnTarget, StringFormatterOptions } from '../../types';
|
|
3
3
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
4
4
|
export declare class FormatColumnInternalApi extends ApiBase {
|
|
5
5
|
/**
|
|
6
6
|
* Retrieves all Format Columns in Adaptable State with the `Style` property set
|
|
7
7
|
* @returns format columns
|
|
8
8
|
*/
|
|
9
|
-
getAllFormatColumnWithStyle(): FormatColumn[];
|
|
9
|
+
getAllFormatColumnWithStyle(config?: FormatColumnConfig): FormatColumn[];
|
|
10
10
|
/**
|
|
11
11
|
* Retrieves all Format Columns in Adaptable State with the `Style` or the `CellAlignment` property set
|
|
12
12
|
* @returns format columns
|
|
13
13
|
*/
|
|
14
|
-
getAllFormatColumnWithStyleAndCellAlignment(): FormatColumn[];
|
|
14
|
+
getAllFormatColumnWithStyleAndCellAlignment(config?: FormatColumnConfig): FormatColumn[];
|
|
15
15
|
/**
|
|
16
16
|
* Retrieves all Format Columns in Adaptable State with `DisplayFormat` property set
|
|
17
17
|
* @returns format columns
|
|
18
18
|
*/
|
|
19
|
-
getAllFormatColumnWithDisplayFormat(): FormatColumn[];
|
|
19
|
+
getAllFormatColumnWithDisplayFormat(config?: FormatColumnConfig): FormatColumn[];
|
|
20
20
|
/**
|
|
21
21
|
* Retrieves all Format Columns in Adaptable State with `CellAlignment` property set
|
|
22
22
|
* @returns format columns
|
|
23
23
|
*/
|
|
24
|
-
getAllFormatColumnWithCellAlignment(): FormatColumn[];
|
|
24
|
+
getAllFormatColumnWithCellAlignment(config?: FormatColumnConfig): FormatColumn[];
|
|
25
25
|
/**
|
|
26
26
|
* Get all FormatColumns which are defined for this column and have a custom AdaptableStyle
|
|
27
27
|
* @param column
|
|
28
28
|
* @param config
|
|
29
29
|
* @returns list of FormatColumn
|
|
30
30
|
*/
|
|
31
|
-
getFormatColumnsWithStyleForColumn(column: AdaptableColumn, config:
|
|
32
|
-
target: FormatColumnTarget;
|
|
33
|
-
includeSuspended?: boolean;
|
|
34
|
-
}): FormatColumn[];
|
|
31
|
+
getFormatColumnsWithStyleForColumn(column: AdaptableColumn, config: FormatColumnConfig): FormatColumn[];
|
|
35
32
|
/**
|
|
36
33
|
* Gets Format Column if any for given Column which includes Style element with ClassName
|
|
37
34
|
* @param column The Column for which to retrieve the Format Column
|
|
@@ -124,8 +121,8 @@ export declare class FormatColumnInternalApi extends ApiBase {
|
|
|
124
121
|
* Retrieves all Format Columns which have an Expression
|
|
125
122
|
* @returns Format Columns with Expression
|
|
126
123
|
*/
|
|
127
|
-
getFormatColumnsWithExpression(): FormatColumn[];
|
|
128
|
-
getFormatColumnsDependentOnColumns(columnSet: Set<string
|
|
124
|
+
getFormatColumnsWithExpression(config?: FormatColumnConfig): FormatColumn[];
|
|
125
|
+
getFormatColumnsDependentOnColumns(columnSet: Set<string>, config?: FormatColumnConfig): FormatColumn[];
|
|
129
126
|
/**
|
|
130
127
|
* Retrieves the columns that need rerendering based on format column predicates.
|
|
131
128
|
*/
|
|
@@ -36,36 +36,36 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
36
36
|
* Retrieves all Format Columns in Adaptable State with the `Style` property set
|
|
37
37
|
* @returns format columns
|
|
38
38
|
*/
|
|
39
|
-
getAllFormatColumnWithStyle() {
|
|
39
|
+
getAllFormatColumnWithStyle(config) {
|
|
40
40
|
return this.getFormatColumnApi()
|
|
41
|
-
.getFormatColumns()
|
|
41
|
+
.getFormatColumns(config)
|
|
42
42
|
.filter((fc) => fc.Style);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Retrieves all Format Columns in Adaptable State with the `Style` or the `CellAlignment` property set
|
|
46
46
|
* @returns format columns
|
|
47
47
|
*/
|
|
48
|
-
getAllFormatColumnWithStyleAndCellAlignment() {
|
|
48
|
+
getAllFormatColumnWithStyleAndCellAlignment(config) {
|
|
49
49
|
return this.getFormatColumnApi()
|
|
50
|
-
.getFormatColumns()
|
|
50
|
+
.getFormatColumns(config)
|
|
51
51
|
.filter((fc) => fc.Style || fc.CellAlignment);
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Retrieves all Format Columns in Adaptable State with `DisplayFormat` property set
|
|
55
55
|
* @returns format columns
|
|
56
56
|
*/
|
|
57
|
-
getAllFormatColumnWithDisplayFormat() {
|
|
57
|
+
getAllFormatColumnWithDisplayFormat(config) {
|
|
58
58
|
return this.getFormatColumnApi()
|
|
59
|
-
.getFormatColumns()
|
|
59
|
+
.getFormatColumns(config)
|
|
60
60
|
.filter((fc) => fc.DisplayFormat);
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Retrieves all Format Columns in Adaptable State with `CellAlignment` property set
|
|
64
64
|
* @returns format columns
|
|
65
65
|
*/
|
|
66
|
-
getAllFormatColumnWithCellAlignment() {
|
|
66
|
+
getAllFormatColumnWithCellAlignment(config) {
|
|
67
67
|
return this.getFormatColumnApi()
|
|
68
|
-
.getFormatColumns()
|
|
68
|
+
.getFormatColumns(config)
|
|
69
69
|
.filter((fc) => fc.CellAlignment);
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
@@ -189,7 +189,7 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
189
189
|
return true;
|
|
190
190
|
}
|
|
191
191
|
const agGridApi = this.getAdaptableApi().agGridApi;
|
|
192
|
-
const agGridColumn =
|
|
192
|
+
const agGridColumn = this._adaptable.isInPivotMode()
|
|
193
193
|
? agGridApi.getPivotResultColumns().find((col) => col.getColId() === column.columnId)
|
|
194
194
|
: agGridApi.getColumn(column.columnId);
|
|
195
195
|
if (!agGridColumn) {
|
|
@@ -331,14 +331,14 @@ export class FormatColumnInternalApi extends ApiBase {
|
|
|
331
331
|
* Retrieves all Format Columns which have an Expression
|
|
332
332
|
* @returns Format Columns with Expression
|
|
333
333
|
*/
|
|
334
|
-
getFormatColumnsWithExpression() {
|
|
334
|
+
getFormatColumnsWithExpression(config) {
|
|
335
335
|
return this.getFormatColumnApi()
|
|
336
|
-
.getFormatColumns()
|
|
336
|
+
.getFormatColumns(config)
|
|
337
337
|
.filter((fc) => !!fc.Rule?.BooleanExpression);
|
|
338
338
|
}
|
|
339
|
-
getFormatColumnsDependentOnColumns(columnSet) {
|
|
339
|
+
getFormatColumnsDependentOnColumns(columnSet, config) {
|
|
340
340
|
return this.getFormatColumnApi()
|
|
341
|
-
.getFormatColumns()
|
|
341
|
+
.getFormatColumns(config)
|
|
342
342
|
.filter((fc) => fc.Rule?.Predicates?.some((p) => columnSet.has(p.ColumnId)));
|
|
343
343
|
}
|
|
344
344
|
/**
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { RowClassParams } from 'ag-grid-enterprise';
|
|
1
|
+
import { IRowNode, RowClassParams } from 'ag-grid-enterprise';
|
|
2
2
|
import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn';
|
|
3
3
|
import { AdaptableMenuItem } from '../../AdaptableState/Common/Menu';
|
|
4
4
|
import { SpecialColumnSettings } from '../../AdaptableState/Common/SpecialColumnSettings';
|
|
5
5
|
import { GridCell } from '../../AdaptableState/Selection/GridCell';
|
|
6
6
|
import { SelectedCellInfo } from '../../AdaptableState/Selection/SelectedCellInfo';
|
|
7
7
|
import { SelectedRowInfo } from '../../AdaptableState/Selection/SelectedRowInfo';
|
|
8
|
+
import { InFilterValue } from '../../types';
|
|
8
9
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
10
|
+
import { EditColumnValueInfo } from '../../AdaptableOptions/EditOptions';
|
|
9
11
|
export declare class GridInternalApi extends ApiBase {
|
|
10
12
|
/**
|
|
11
13
|
* Gets all distinct display values in the Column for given ColumnId
|
|
@@ -27,20 +29,13 @@ export declare class GridInternalApi extends ApiBase {
|
|
|
27
29
|
getDistinctFilterDisplayValuesForColumn(options: {
|
|
28
30
|
columnId: string;
|
|
29
31
|
currentSearchValue: string;
|
|
30
|
-
}): Promise<
|
|
31
|
-
value: any;
|
|
32
|
-
label: string;
|
|
33
|
-
}[]>;
|
|
32
|
+
}): Promise<InFilterValue[]>;
|
|
34
33
|
getDistinctValuesForColumn(columnId: string): Promise<GridCell[]> | undefined;
|
|
35
|
-
getDistinctDisplayValuesForColumn(columnId: string): Promise<any[]> | undefined;
|
|
36
34
|
getDistinctEditDisplayValuesForColumn(options: {
|
|
37
35
|
columnId: string;
|
|
38
36
|
gridCell: GridCell;
|
|
39
37
|
currentSearchValue: string;
|
|
40
|
-
}): Promise<
|
|
41
|
-
value: any;
|
|
42
|
-
label: string;
|
|
43
|
-
}[]> | undefined;
|
|
38
|
+
}): Promise<EditColumnValueInfo[]> | undefined;
|
|
44
39
|
/**
|
|
45
40
|
* Gets all distinct raw values in Column. Values are sorted.
|
|
46
41
|
* @param columnId Column to check
|
|
@@ -51,6 +46,7 @@ export declare class GridInternalApi extends ApiBase {
|
|
|
51
46
|
* @param columnId Column to check
|
|
52
47
|
*/
|
|
53
48
|
getUnsortedDistinctRawValuesForColumn(columnId: string): any[];
|
|
49
|
+
getSortedRowNodesWithCurrentLayoutSortOrder(rowNodes?: IRowNode[]): IRowNode[];
|
|
54
50
|
sortDistinctValues<T extends GridCell>(returnValues: T[], column: AdaptableColumn): T[];
|
|
55
51
|
setColumns(columns: AdaptableColumn[]): void;
|
|
56
52
|
setSelectedCells(selectedCellInfo: SelectedCellInfo): void;
|
|
@@ -72,4 +68,5 @@ export declare class GridInternalApi extends ApiBase {
|
|
|
72
68
|
* DO NOT USE THIS METHOD DIRECTLY - use `GridApi.isCellEditable` instead
|
|
73
69
|
*/
|
|
74
70
|
isCellEditableAccordingToEditOptions(gridCell: GridCell, defaultColDefinitionEditableValue: boolean): boolean | undefined;
|
|
71
|
+
isRowFilterable(rowNode: IRowNode): boolean;
|
|
75
72
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SortOrder } from '../../AdaptableState/Common/Enums';
|
|
2
2
|
import * as InternalRedux from '../../Redux/ActionsReducers/InternalRedux';
|
|
3
|
-
import
|
|
3
|
+
import { getDateComparatorForGridCell, getGenericComparatorForGridCell, getNumericComparatorForGridCell, sortCellValueArrayNumeric, sortCellValueArrayDates, sortCellValueArray, } from '../../Utilities/Extensions/ArrayExtensions';
|
|
4
|
+
import { multisort } from '@infinite-table/infinite-react';
|
|
4
5
|
import { convertAdaptableStyleToCSS } from '../../Utilities/Helpers/StyleHelper';
|
|
5
6
|
import UIHelper from '../../View/UIHelper';
|
|
6
7
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
@@ -36,20 +37,13 @@ export class GridInternalApi extends ApiBase {
|
|
|
36
37
|
if (abColumn == undefined) {
|
|
37
38
|
return [];
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
+
const inFilterValues = await this._adaptable.getDistinctFilterValuesForColumn({
|
|
40
41
|
column: abColumn,
|
|
41
42
|
get currentSearchValue() {
|
|
42
43
|
return options.currentSearchValue;
|
|
43
44
|
},
|
|
44
45
|
});
|
|
45
|
-
|
|
46
|
-
const valueOptions = gridCells.map((cv) => {
|
|
47
|
-
return {
|
|
48
|
-
label: cv.displayValue,
|
|
49
|
-
value: cv.normalisedValue,
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
return valueOptions;
|
|
46
|
+
return inFilterValues || [];
|
|
53
47
|
}
|
|
54
48
|
async getDistinctValuesForColumn(columnId) {
|
|
55
49
|
const abColumn = this.getColumnApi().getColumnWithColumnId(columnId);
|
|
@@ -59,31 +53,19 @@ export class GridInternalApi extends ApiBase {
|
|
|
59
53
|
const gridCells = await this._adaptable.getDistinctValuesForColumn(abColumn);
|
|
60
54
|
return gridCells;
|
|
61
55
|
}
|
|
62
|
-
async getDistinctDisplayValuesForColumn(columnId) {
|
|
63
|
-
const distinctValues = await this.getDistinctValuesForColumn(columnId);
|
|
64
|
-
return distinctValues.map((gc) => {
|
|
65
|
-
return gc.displayValue;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
56
|
async getDistinctEditDisplayValuesForColumn(options) {
|
|
69
57
|
const abColumn = this.getColumnApi().getColumnWithColumnId(options.columnId);
|
|
70
58
|
if (!abColumn) {
|
|
71
59
|
return undefined;
|
|
72
60
|
}
|
|
73
|
-
|
|
61
|
+
const valueOptions = await this._adaptable.getDistinctEditValuesForColumn({
|
|
74
62
|
column: abColumn,
|
|
75
63
|
gridCell: options.gridCell,
|
|
76
64
|
get currentSearchValue() {
|
|
77
65
|
return options.currentSearchValue;
|
|
78
66
|
},
|
|
79
67
|
});
|
|
80
|
-
|
|
81
|
-
return gridCells.map((gc) => {
|
|
82
|
-
return {
|
|
83
|
-
label: gc.displayValue,
|
|
84
|
-
value: gc.normalisedValue,
|
|
85
|
-
};
|
|
86
|
-
});
|
|
68
|
+
return valueOptions || [];
|
|
87
69
|
}
|
|
88
70
|
/**
|
|
89
71
|
* Gets all distinct raw values in Column. Values are sorted.
|
|
@@ -109,6 +91,58 @@ export class GridInternalApi extends ApiBase {
|
|
|
109
91
|
}
|
|
110
92
|
return this._adaptable.getDistinctGridCellsForColumn(abColumn);
|
|
111
93
|
}
|
|
94
|
+
getSortedRowNodesWithCurrentLayoutSortOrder(rowNodes) {
|
|
95
|
+
const currentLayout = this.getLayoutApi().getCurrentLayout();
|
|
96
|
+
const columnSorts = currentLayout.ColumnSorts || [];
|
|
97
|
+
const columnApi = this.getColumnApi();
|
|
98
|
+
const rowNodesMapToCells = new Map();
|
|
99
|
+
const allRowNodes = [];
|
|
100
|
+
// for each row node,let's create an object
|
|
101
|
+
// with only those gridcells that are needed - meaning
|
|
102
|
+
// for those column that are in the current sort
|
|
103
|
+
const rowNodeCallback = (node) => {
|
|
104
|
+
allRowNodes.push(node);
|
|
105
|
+
const rowNodeCells = {};
|
|
106
|
+
rowNodesMapToCells.set(node, rowNodeCells);
|
|
107
|
+
columnSorts.forEach((columnSort, i) => {
|
|
108
|
+
const { ColumnId } = columnSort;
|
|
109
|
+
const gridCell = this._adaptable.getGridCellFromRowNode(node, ColumnId);
|
|
110
|
+
rowNodeCells[ColumnId] = gridCell;
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
if (rowNodes) {
|
|
114
|
+
rowNodes.forEach(rowNodeCallback);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
this.getAgGridApi().forEachNode(rowNodeCallback);
|
|
118
|
+
}
|
|
119
|
+
if (!columnSorts.length) {
|
|
120
|
+
return allRowNodes;
|
|
121
|
+
}
|
|
122
|
+
const sortInfo = columnSorts.map((columnSort) => {
|
|
123
|
+
const { ColumnId } = columnSort;
|
|
124
|
+
// NOTE: the comparator we pass to multisort should always sort in ascending order
|
|
125
|
+
// that's why we pass SortOrder.Asc to the comparators
|
|
126
|
+
const comparator = columnApi.hasNumberDataType(ColumnId)
|
|
127
|
+
? getNumericComparatorForGridCell(SortOrder.Asc)
|
|
128
|
+
: columnApi.hasDateDataType(ColumnId)
|
|
129
|
+
? getDateComparatorForGridCell(SortOrder.Asc)
|
|
130
|
+
: getGenericComparatorForGridCell(SortOrder.Asc);
|
|
131
|
+
return {
|
|
132
|
+
// but here we pass the actual direction of the column sort
|
|
133
|
+
dir: columnSort.SortOrder === 'Asc' ? 1 : -1,
|
|
134
|
+
fn: (rowNodeA, rowNodeB) => {
|
|
135
|
+
const gridCellA = rowNodesMapToCells.get(rowNodeA)?.[ColumnId];
|
|
136
|
+
const gridCellB = rowNodesMapToCells.get(rowNodeB)?.[ColumnId];
|
|
137
|
+
if (!gridCellA || !gridCellB) {
|
|
138
|
+
return 0;
|
|
139
|
+
}
|
|
140
|
+
return comparator(gridCellA, gridCellB);
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
return multisort(sortInfo, allRowNodes);
|
|
145
|
+
}
|
|
112
146
|
sortDistinctValues(returnValues, column) {
|
|
113
147
|
// this does NOT into account Custom Sort - far too hard for now...
|
|
114
148
|
let sortOrder = undefined;
|
|
@@ -123,13 +157,13 @@ export class GridInternalApi extends ApiBase {
|
|
|
123
157
|
}
|
|
124
158
|
if (sortOrder) {
|
|
125
159
|
if (this.getColumnApi().hasNumberDataType(column?.columnId)) {
|
|
126
|
-
returnValues =
|
|
160
|
+
returnValues = sortCellValueArrayNumeric(returnValues, sortOrder);
|
|
127
161
|
}
|
|
128
162
|
else if (this.getColumnApi().hasDateDataType(column?.columnId)) {
|
|
129
|
-
returnValues =
|
|
163
|
+
returnValues = sortCellValueArrayDates(returnValues, sortOrder);
|
|
130
164
|
}
|
|
131
165
|
else {
|
|
132
|
-
returnValues =
|
|
166
|
+
returnValues = sortCellValueArray(returnValues, sortOrder);
|
|
133
167
|
}
|
|
134
168
|
}
|
|
135
169
|
return returnValues;
|
|
@@ -222,4 +256,19 @@ export class GridInternalApi extends ApiBase {
|
|
|
222
256
|
}
|
|
223
257
|
return undefined;
|
|
224
258
|
}
|
|
259
|
+
isRowFilterable(rowNode) {
|
|
260
|
+
// first assess if the Row is filterable - if not, then return true so it appears in Grid
|
|
261
|
+
const isRowFilterable = this.getOptionsApi().getFilterOptions().isRowFilterable;
|
|
262
|
+
if (typeof isRowFilterable === 'function') {
|
|
263
|
+
const rowFilterableContext = {
|
|
264
|
+
...this.getAdaptableApi().internalApi.buildBaseContext(),
|
|
265
|
+
rowNode,
|
|
266
|
+
data: rowNode.data,
|
|
267
|
+
};
|
|
268
|
+
if (!isRowFilterable(rowFilterableContext)) {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
225
274
|
}
|