@adaptabletools/adaptable-cjs 19.2.4 → 20.0.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +1 -1
- package/base.css +3903 -1294
- package/base.css.map +1 -1
- package/index.css +2967 -2120
- package/index.css.map +1 -1
- package/package.json +17 -16
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +28 -32
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +17 -4
- package/src/AdaptableOptions/AdaptableOptions.d.ts +14 -31
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -2
- package/src/AdaptableOptions/AlertOptions.d.ts +6 -6
- package/src/AdaptableOptions/CellSummaryOptions.d.ts +9 -4
- package/src/AdaptableOptions/ColumnMenuOptions.d.ts +4 -3
- package/src/AdaptableOptions/ColumnOptions.d.ts +5 -1
- package/src/AdaptableOptions/ContextMenuOptions.d.ts +13 -9
- package/src/AdaptableOptions/DashboardOptions.d.ts +12 -8
- package/src/AdaptableOptions/DataImportOptions.d.ts +1 -1
- package/src/AdaptableOptions/DefaultAdaptableOptions.d.ts +1 -1
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +233 -250
- package/src/AdaptableOptions/EditOptions.d.ts +27 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +128 -55
- package/src/AdaptableOptions/ExpressionOptions.d.ts +3 -7
- package/src/AdaptableOptions/Fdc3Options.d.ts +7 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +219 -0
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +1 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +4 -45
- package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/PredicateOptions.d.ts +6 -0
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +11 -28
- package/src/AdaptableOptions/RowFormOptions.d.ts +116 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -3
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +13 -121
- package/src/Api/ActionColumnApi.d.ts +5 -0
- package/src/Api/AdaptableApi.d.ts +10 -19
- package/src/Api/AlertApi.d.ts +2 -2
- package/src/Api/CalculatedColumnApi.d.ts +4 -0
- package/src/Api/CellSummaryApi.d.ts +6 -6
- package/src/Api/ChartingApi.d.ts +1 -1
- package/src/Api/ColumnApi.d.ts +41 -65
- package/src/Api/ColumnFilterApi.d.ts +3 -3
- package/src/Api/ColumnMenuApi.d.ts +62 -0
- package/src/Api/ColumnScopeApi.d.ts +1 -1
- package/src/Api/CommentApi.d.ts +4 -4
- package/src/Api/ConfigApi.d.ts +1 -3
- package/src/Api/ContextMenuApi.d.ts +62 -0
- package/src/Api/DashboardApi.d.ts +1 -1
- package/src/Api/EventApi.d.ts +22 -22
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/AdaptableStateChanged.d.ts +2 -10
- package/src/Api/Events/AdaptableStateReloaded.d.ts +2 -6
- package/src/Api/Events/AlertFired.d.ts +2 -2
- package/src/Api/Events/CalculatedColumnChanged.d.ts +2 -2
- package/src/Api/Events/CellChanged.d.ts +3 -3
- package/src/Api/Events/CellSelectionChanged.d.ts +2 -2
- package/src/Api/Events/ChartChanged.d.ts +2 -3
- package/src/Api/Events/ColumnFilterApplied.d.ts +2 -3
- package/src/Api/Events/CommentChanged.d.ts +2 -3
- package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -2
- package/src/Api/Events/DashboardChanged.d.ts +2 -2
- package/src/Api/Events/DataImported.d.ts +3 -3
- package/src/Api/Events/DataSetSelected.d.ts +2 -3
- package/src/Api/Events/Fdc3MessageInfo.d.ts +3 -3
- package/src/Api/Events/FlashingCellDisplayed.d.ts +2 -2
- package/src/Api/Events/GridFilterApplied.d.ts +2 -3
- package/src/Api/Events/GridSorted.d.ts +3 -17
- package/src/Api/Events/LayoutChanged.d.ts +2 -2
- package/src/Api/Events/LiveDataChanged.d.ts +2 -2
- package/src/Api/Events/RowChanged.d.ts +11 -0
- package/src/Api/Events/RowFormSubmitted.d.ts +54 -0
- package/src/Api/Events/RowSelectionChanged.d.ts +2 -2
- package/src/Api/Events/ScheduleTriggered.d.ts +2 -2
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -2
- package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -2
- package/src/Api/Events/ThemeChanged.d.ts +2 -2
- package/src/Api/ExportApi.d.ts +75 -69
- package/src/Api/ExpressionApi.d.ts +2 -2
- package/src/Api/Fdc3Api.d.ts +1 -9
- package/src/Api/FilterApi.d.ts +18 -0
- package/src/Api/FormatColumnApi.d.ts +7 -2
- package/src/Api/FreeTextColumnApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +51 -35
- package/src/Api/GridFilterApi.d.ts +1 -2
- package/src/Api/IPushPullApi.d.ts +1 -1
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +5 -2
- package/src/Api/Implementation/ActionColumnApiImpl.js +8 -31
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +5 -8
- package/src/Api/Implementation/AdaptableApiImpl.js +6 -11
- package/src/Api/Implementation/AlertApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AlertApiImpl.js +42 -48
- package/src/Api/Implementation/ApiBase.d.ts +10 -7
- package/src/Api/Implementation/ApiBase.js +21 -18
- package/src/Api/Implementation/BulkUpdateApiImpl.js +1 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +26 -22
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +3 -3
- package/src/Api/Implementation/CellSummaryApiImpl.js +6 -8
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +30 -24
- package/src/Api/Implementation/ColumnApiImpl.d.ts +22 -16
- package/src/Api/Implementation/ColumnApiImpl.js +186 -114
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +4 -4
- package/src/Api/Implementation/ColumnFilterApiImpl.js +53 -51
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +13 -0
- package/src/Api/Implementation/ColumnMenuApiImpl.js +51 -0
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnScopeApiImpl.js +16 -21
- package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -4
- package/src/Api/Implementation/CommentsApiImpl.js +8 -11
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -3
- package/src/Api/Implementation/ConfigApiImpl.js +17 -25
- package/src/Api/Implementation/ContextMenuApiImpl.d.ts +13 -0
- package/src/Api/Implementation/ContextMenuApiImpl.js +51 -0
- package/src/Api/Implementation/CustomSortApiImpl.js +5 -3
- package/src/Api/Implementation/DashboardApiImpl.js +8 -7
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +10 -11
- package/src/Api/Implementation/DataSetApiImpl.js +5 -6
- package/src/Api/Implementation/EntitlementApiImpl.js +6 -2
- package/src/Api/Implementation/EventApiImpl.d.ts +2 -0
- package/src/Api/Implementation/EventApiImpl.js +2 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +22 -19
- package/src/Api/Implementation/ExportApiImpl.js +105 -58
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ExpressionApiImpl.js +11 -5
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +1 -3
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -33
- package/src/Api/Implementation/FilterApiImpl.d.ts +13 -0
- package/src/Api/Implementation/FilterApiImpl.js +20 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +16 -25
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +3 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +19 -12
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +5 -6
- package/src/Api/Implementation/GridApiImpl.d.ts +15 -12
- package/src/Api/Implementation/GridApiImpl.js +92 -82
- package/src/Api/Implementation/GridFilterApiImpl.js +6 -4
- package/src/Api/Implementation/LayoutApiImpl.d.ts +7 -9
- package/src/Api/Implementation/LayoutApiImpl.js +45 -50
- package/src/Api/Implementation/LayoutHelpers.d.ts +23 -0
- package/src/Api/Implementation/LayoutHelpers.js +319 -0
- package/src/Api/Implementation/NamedQueryApiImpl.js +1 -1
- package/src/Api/Implementation/NoteApiImpl.js +4 -1
- package/src/Api/Implementation/OptionsApiImpl.d.ts +9 -12
- package/src/Api/Implementation/OptionsApiImpl.js +25 -11
- package/src/Api/Implementation/PlusMinusApiImpl.js +2 -3
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/PredicateApiImpl.js +22 -8
- package/src/Api/Implementation/QuickSearchApiImpl.js +3 -3
- package/src/Api/Implementation/RowFormApiImpl.d.ts +11 -0
- package/src/Api/Implementation/{ActionRowApiImpl.js → RowFormApiImpl.js} +10 -18
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ScheduleApiImpl.js +10 -14
- package/src/Api/Implementation/ShortcutApiImpl.js +3 -3
- package/src/Api/Implementation/SmartEditApiImpl.js +7 -8
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.js +1 -2
- package/src/Api/Implementation/SystemStatusApiImpl.js +8 -7
- package/src/Api/Implementation/TeamSharingApiImpl.js +5 -6
- package/src/Api/Implementation/ThemeApiImpl.js +6 -11
- package/src/Api/Implementation/ToolPanelApiImpl.js +3 -6
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -15
- package/src/Api/Implementation/UserInterfaceApiImpl.js +29 -117
- package/src/Api/Internal/ActionColumnInternalApi.d.ts +13 -0
- package/src/Api/Internal/ActionColumnInternalApi.js +143 -0
- package/src/Api/Internal/AdaptableInternalApi.d.ts +27 -28
- package/src/Api/Internal/AdaptableInternalApi.js +69 -125
- package/src/Api/Internal/AlertInternalApi.d.ts +15 -18
- package/src/Api/Internal/AlertInternalApi.js +158 -139
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -2
- package/src/Api/Internal/CalculatedColumnInternalApi.js +36 -28
- package/src/Api/Internal/ChartingInternalApi.js +33 -18
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +6 -22
- package/src/Api/Internal/ColumnFilterInternalApi.js +69 -91
- package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
- package/src/Api/Internal/ColumnInternalApi.js +30 -1
- package/src/Api/Internal/CommentsInternalApi.d.ts +1 -1
- package/src/Api/Internal/CommentsInternalApi.js +2 -3
- package/src/Api/Internal/CustomSortInternalApi.d.ts +2 -0
- package/src/Api/Internal/CustomSortInternalApi.js +22 -7
- package/src/Api/Internal/DashboardInternalApi.d.ts +0 -4
- package/src/Api/Internal/DashboardInternalApi.js +3 -39
- package/src/Api/Internal/DataImportInternalApi.d.ts +0 -6
- package/src/Api/Internal/DataImportInternalApi.js +22 -21
- package/src/Api/Internal/DataSetInternalApi.d.ts +1 -5
- package/src/Api/Internal/DataSetInternalApi.js +15 -8
- package/src/Api/Internal/EntitlementInternalApi.js +2 -2
- package/src/Api/Internal/EventInternalApi.d.ts +27 -0
- package/src/Api/Internal/EventInternalApi.js +199 -0
- package/src/Api/Internal/ExportInternalApi.d.ts +19 -26
- package/src/Api/Internal/ExportInternalApi.js +175 -399
- package/src/Api/Internal/ExpressionInternalApi.js +21 -17
- package/src/Api/Internal/Fdc3InternalApi.d.ts +3 -2
- package/src/Api/Internal/Fdc3InternalApi.js +66 -34
- package/src/Api/Internal/FilterInternalApi.d.ts +3 -0
- package/src/Api/Internal/FilterInternalApi.js +7 -0
- package/src/Api/Internal/FlashingCellInternalApi.js +3 -4
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.js +34 -23
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -1
- package/src/Api/Internal/FreeTextColumnInternalApi.js +32 -26
- package/src/Api/Internal/GridFilterInternalApi.d.ts +0 -1
- package/src/Api/Internal/GridFilterInternalApi.js +1 -11
- package/src/Api/Internal/GridInternalApi.d.ts +24 -73
- package/src/Api/Internal/GridInternalApi.js +88 -382
- package/src/Api/Internal/LayoutInternalApi.d.ts +7 -24
- package/src/Api/Internal/LayoutInternalApi.js +93 -107
- package/src/Api/Internal/NamedQueryInternalApi.d.ts +2 -0
- package/src/Api/Internal/NamedQueryInternalApi.js +39 -3
- package/src/Api/Internal/NoteInternalApi.js +1 -2
- package/src/Api/Internal/PredicateInternalApi.js +40 -19
- package/src/Api/Internal/RowFormInternalApi.d.ts +22 -0
- package/src/Api/Internal/RowFormInternalApi.js +204 -0
- package/src/Api/Internal/ScheduleInternalApi.d.ts +1 -8
- package/src/Api/Internal/ScheduleInternalApi.js +0 -13
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +19 -22
- package/src/Api/Internal/SystemStatusInternalApi.d.ts +0 -5
- package/src/Api/Internal/SystemStatusInternalApi.js +3 -11
- package/src/Api/Internal/TeamSharingInternalApi.d.ts +0 -5
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -13
- package/src/Api/Internal/UserInterfaceInternalApi.d.ts +2 -1
- package/src/Api/Internal/UserInterfaceInternalApi.js +11 -0
- package/src/Api/LayoutApi.d.ts +14 -23
- package/src/Api/OptionsApi.d.ts +31 -17
- package/src/Api/PredicateApi.d.ts +1 -0
- package/src/Api/RowFormApi.d.ts +19 -0
- package/src/Api/StatusBarApi.d.ts +1 -1
- package/src/Api/UserInterfaceApi.d.ts +9 -42
- package/src/EnvVars.js +1 -1
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -4
- package/src/PredefinedConfig/AlertState.d.ts +6 -6
- package/src/PredefinedConfig/ChartingState.d.ts +1 -1
- package/src/PredefinedConfig/CommentState.d.ts +2 -3
- package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +37 -7
- package/src/PredefinedConfig/Common/AdaptableColumn.js +6 -7
- package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +11 -0
- package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +1 -2
- package/src/PredefinedConfig/Common/AdaptableForm.js +1 -2
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +3 -2
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +99 -129
- package/src/PredefinedConfig/Common/AdaptableSortState.d.ts +15 -0
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +11 -5
- package/src/PredefinedConfig/Common/AggregationColumns.js +9 -2
- package/src/PredefinedConfig/Common/BaseContext.d.ts +14 -2
- package/src/PredefinedConfig/Common/CellDataChangedInfo.d.ts +1 -1
- package/src/PredefinedConfig/Common/CellSummary.d.ts +5 -5
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +7 -15
- package/src/PredefinedConfig/Common/ColumnScope.d.ts +1 -1
- package/src/PredefinedConfig/Common/ColumnSetupInfo.d.ts +8 -0
- package/src/PredefinedConfig/Common/CustomWindowConfig.d.ts +1 -1
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -11
- package/src/PredefinedConfig/Common/Enums.js +12 -25
- package/src/PredefinedConfig/Common/Menu.d.ts +7 -5
- package/src/PredefinedConfig/Common/Menu.js +26 -23
- package/src/PredefinedConfig/Common/ProgressIndicatorConfig.d.ts +1 -1
- package/src/PredefinedConfig/Common/RowDataChangedInfo.d.ts +23 -0
- package/src/PredefinedConfig/Common/RowScope.d.ts +2 -2
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +2 -1
- package/src/PredefinedConfig/Common/Types.d.ts +0 -4
- package/src/PredefinedConfig/Common/Types.js +2 -2
- package/src/PredefinedConfig/CustomSortState.d.ts +2 -2
- package/src/PredefinedConfig/ExportState.d.ts +70 -15
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/InternalState.d.ts +118 -7
- package/src/PredefinedConfig/LayoutState.d.ts +152 -32
- package/src/PredefinedConfig/PopupState.d.ts +7 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +18 -18
- package/src/PredefinedConfig/Selection/GridCell.d.ts +16 -9
- package/src/PredefinedConfig/Selection/GridRow.d.ts +1 -1
- package/src/PredefinedConfig/Selection/SelectedRowInfo.d.ts +1 -1
- package/src/PredefinedConfig/ShortcutState.d.ts +1 -1
- package/src/PredefinedConfig/StatusBarState.d.ts +1 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +7 -6
- package/src/PredefinedConfig/TeamSharingState.d.ts +2 -2
- package/src/Redux/ActionsReducers/AlertRedux.js +26 -8
- package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +11 -5
- package/src/Redux/ActionsReducers/ChartingRedux.js +41 -14
- package/src/Redux/ActionsReducers/CommentsRedux.js +49 -24
- package/src/Redux/ActionsReducers/CustomSortRedux.js +26 -8
- package/src/Redux/ActionsReducers/DashboardRedux.js +9 -9
- package/src/Redux/ActionsReducers/ExportRedux.d.ts +6 -16
- package/src/Redux/ActionsReducers/ExportRedux.js +19 -23
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +31 -10
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +38 -11
- package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +12 -7
- package/src/Redux/ActionsReducers/InternalRedux.d.ts +349 -0
- package/src/Redux/ActionsReducers/InternalRedux.js +964 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +13 -1
- package/src/Redux/ActionsReducers/LayoutRedux.js +142 -65
- package/src/Redux/ActionsReducers/NamedQueryRedux.js +12 -6
- package/src/Redux/ActionsReducers/NoteRedux.js +11 -6
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/PluginsRedux.js +1 -1
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +36 -13
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +10 -1
- package/src/Redux/ActionsReducers/PopupRedux.js +66 -7
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -2
- package/src/Redux/ActionsReducers/ScheduleRedux.js +104 -32
- package/src/Redux/ActionsReducers/ShortcutRedux.js +26 -8
- package/src/Redux/ActionsReducers/SmartEditRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/SmartEditRedux.js +1 -1
- package/src/Redux/ActionsReducers/StatusBarRedux.js +4 -1
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +26 -8
- package/src/Redux/ActionsReducers/TeamSharingRedux.js +1 -1
- package/src/Redux/ActionsReducers/ThemeRedux.js +3 -2
- package/src/Redux/ActionsReducers/ToolPanelRedux.js +9 -8
- package/src/Redux/ActionsReducers/utils.js +13 -4
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.d.ts +1 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +7 -26
- package/src/Redux/Store/AdaptableReduxMerger.js +4 -5
- package/src/Redux/Store/AdaptableStore.d.ts +1 -1
- package/src/Redux/Store/AdaptableStore.js +406 -538
- package/src/Strategy/AlertModule.d.ts +10 -5
- package/src/Strategy/AlertModule.js +55 -27
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/BulkUpdateModule.js +6 -6
- package/src/Strategy/CalculatedColumnModule.d.ts +12 -11
- package/src/Strategy/CalculatedColumnModule.js +41 -16
- package/src/Strategy/CellSummaryModule.d.ts +18 -11
- package/src/Strategy/CellSummaryModule.js +83 -45
- package/src/Strategy/ChartingModule.d.ts +2 -1
- package/src/Strategy/ChartingModule.js +17 -3
- package/src/Strategy/ColumnFilterModule.d.ts +1 -2
- package/src/Strategy/ColumnFilterModule.js +27 -29
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/ColumnInfoModule.js +1 -1
- package/src/Strategy/CommentModule.d.ts +1 -2
- package/src/Strategy/CommentModule.js +18 -14
- package/src/Strategy/CustomSortModule.d.ts +2 -13
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.d.ts +8 -3
- package/src/Strategy/DataChangeHistoryModule.js +22 -10
- package/src/Strategy/DataSetModule.js +4 -7
- package/src/Strategy/ExportModule.d.ts +5 -17
- package/src/Strategy/ExportModule.js +70 -282
- package/src/Strategy/Fdc3Module.d.ts +1 -1
- package/src/Strategy/Fdc3Module.js +10 -12
- package/src/Strategy/FlashingCellModule.d.ts +12 -9
- package/src/Strategy/FlashingCellModule.js +139 -108
- package/src/Strategy/FormatColumnModule.d.ts +1 -1
- package/src/Strategy/FormatColumnModule.js +5 -5
- package/src/Strategy/FreeTextColumnModule.d.ts +10 -9
- package/src/Strategy/FreeTextColumnModule.js +39 -17
- package/src/Strategy/GridFilterModule.d.ts +3 -1
- package/src/Strategy/GridFilterModule.js +13 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/Interface/ICellDataChangeListenerModule.d.ts +6 -0
- package/src/Strategy/Interface/ICellSummaryModule.d.ts +2 -2
- package/src/Strategy/Interface/{IShortcutModule.d.ts → IKeyDownListenerModule.d.ts} +1 -1
- package/src/Strategy/Interface/IModule.d.ts +4 -0
- package/src/Strategy/Interface/IPlusMinusModule.d.ts +2 -3
- package/src/Strategy/LayoutModule.d.ts +6 -25
- package/src/Strategy/LayoutModule.js +109 -64
- package/src/Strategy/NamedQueryModule.d.ts +2 -15
- package/src/Strategy/NamedQueryModule.js +2 -2
- package/src/Strategy/NoteModule.d.ts +3 -1
- package/src/Strategy/NoteModule.js +12 -7
- package/src/Strategy/PlusMinusModule.d.ts +3 -2
- package/src/Strategy/PlusMinusModule.js +32 -24
- package/src/Strategy/ScheduleModule.js +2 -2
- package/src/Strategy/SettingsPanelModule.d.ts +2 -2
- package/src/Strategy/ShortcutModule.d.ts +3 -2
- package/src/Strategy/ShortcutModule.js +10 -2
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +10 -6
- package/src/Strategy/StatusBarModule.d.ts +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +1 -1
- package/src/Strategy/StyledColumnModule.js +47 -20
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/TeamSharingModule.js +9 -9
- package/src/Strategy/Utilities/Alert/getAlertPreviewViewItems.js +1 -2
- package/src/Strategy/Utilities/CustomSort/getCustomSortSortOrderViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +4 -5
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +11 -18
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -2
- package/src/Strategy/Utilities/Shortcut/getShortcutSettingsViewItems.js +2 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +15 -15
- package/src/Utilities/Constants/GeneralConstants.d.ts +31 -85
- package/src/Utilities/Constants/GeneralConstants.js +55 -113
- package/src/Utilities/Constants/ModuleConstants.d.ts +28 -30
- package/src/Utilities/Constants/ModuleConstants.js +30 -33
- package/src/Utilities/Constants/ObjectDefaultConstants.d.ts +7 -0
- package/src/Utilities/Constants/ObjectDefaultConstants.js +9 -0
- package/src/Utilities/Constants/ReduxConstants.d.ts +7 -0
- package/src/Utilities/Constants/ReduxConstants.js +28 -0
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +2 -3
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +365 -71
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -4
- package/src/Utilities/ExpressionFunctions/deepMap.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/deepMap.js +8 -8
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +8 -8
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +12 -13
- package/src/Utilities/ExpressionFunctions/groupingMap.js +4 -5
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +13 -17
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +2 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +95 -9
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +5 -4
- package/src/Utilities/Extensions/ArrayExtensions.js +3 -3
- package/src/Utilities/Extensions/NumberExtensions.d.ts +6 -2
- package/src/Utilities/Extensions/NumberExtensions.js +61 -4
- package/src/Utilities/Extensions/ObjectExtensions.js +8 -3
- package/src/Utilities/Extensions/TypeExtensions.d.ts +5 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +4 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +19 -8
- package/src/Utilities/Helpers/FormatHelper.d.ts +1 -1
- package/src/Utilities/Helpers/FormatHelper.js +5 -6
- package/src/Utilities/Helpers/Helper.d.ts +1 -1
- package/src/Utilities/Helpers/Helper.js +19 -33
- package/src/Utilities/Helpers/StyleHelper.js +7 -4
- package/src/Utilities/Interface/Preview.d.ts +1 -1
- package/src/Utilities/MenuItem.d.ts +3 -3
- package/src/Utilities/MenuItem.js +3 -3
- package/src/Utilities/ObjectFactory.d.ts +13 -10
- package/src/Utilities/ObjectFactory.js +66 -35
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +1 -1
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +4 -7
- package/src/Utilities/Services/AlertService.js +3 -3
- package/src/Utilities/Services/{CellPopupService.d.ts → AnnotationsService.d.ts} +7 -3
- package/src/Utilities/Services/{CellPopupService.js → AnnotationsService.js} +47 -33
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +5 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +36 -43
- package/src/Utilities/Services/ChartingService.d.ts +1 -1
- package/src/Utilities/Services/ChartingService.js +22 -12
- package/src/Utilities/Services/DataService.d.ts +7 -7
- package/src/Utilities/Services/DataService.js +23 -18
- package/src/Utilities/Services/Fdc3Service.js +66 -29
- package/src/Utilities/Services/FlashingCellService.d.ts +1 -1
- package/src/Utilities/Services/FlashingCellService.js +2 -2
- package/src/Utilities/Services/Interface/IAlertService.d.ts +7 -7
- package/src/Utilities/Services/Interface/IAlertService.js +4 -4
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +5 -1
- package/src/Utilities/Services/Interface/IChartingService.d.ts +1 -1
- package/src/Utilities/Services/Interface/IDataService.d.ts +6 -5
- package/src/Utilities/Services/Interface/IModuleService.d.ts +2 -1
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +4 -4
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/MetamodelService.js +15 -15
- package/src/Utilities/Services/ModuleService.d.ts +4 -1
- package/src/Utilities/Services/ModuleService.js +34 -23
- package/src/Utilities/Services/QueryLanguageService.d.ts +4 -4
- package/src/Utilities/Services/QueryLanguageService.js +79 -59
- package/src/Utilities/Services/{RowEditService.d.ts → RowFormService.d.ts} +2 -2
- package/src/Utilities/Services/RowFormService.js +49 -0
- package/src/Utilities/Services/RowSummaryService.d.ts +3 -3
- package/src/Utilities/Services/RowSummaryService.js +22 -21
- package/src/Utilities/Services/TeamSharingService.js +29 -21
- package/src/Utilities/Services/ThemeService.js +1 -2
- package/src/Utilities/Services/ValidationService.js +30 -14
- package/src/Utilities/adaptableQlUtils.d.ts +1 -0
- package/src/Utilities/adaptableQlUtils.js +33 -5
- package/src/{agGrid → Utilities}/buildSortedColumnStateForLayout.d.ts +2 -2
- package/src/{agGrid → Utilities}/buildSortedColumnStateForLayout.js +39 -28
- package/src/{agGrid → Utilities}/createAgStatusPanelComponent.d.ts +3 -3
- package/src/{agGrid → Utilities}/createAgStatusPanelComponent.js +1 -2
- package/src/Utilities/getExpressionViewItems.d.ts +3 -0
- package/src/{Strategy/Utilities → Utilities}/getExpressionViewItems.js +2 -2
- package/src/Utilities/getObjectTagsViewItems.d.ts +3 -0
- package/src/{Strategy/Utilities → Utilities}/getObjectTagsViewItems.js +9 -8
- package/src/{Strategy/Utilities → Utilities}/getRuleViewItems.d.ts +1 -1
- package/src/Utilities/getRuleViewItems.js +14 -0
- package/src/Utilities/getScopeViewItems.d.ts +3 -0
- package/src/Utilities/isPivotLayout.d.ts +2 -0
- package/src/Utilities/isPivotLayout.js +5 -0
- package/src/Utilities/license/decode.js +1 -1
- package/src/Utilities/logDeprecation.d.ts +3 -3
- package/src/Utilities/logDeprecation.js +2 -2
- package/src/Utilities/runIfNotResolvedIn.js +1 -1
- package/src/{Strategy/Utilities → Utilities}/updateSingleToMultiplePredicates.js +1 -2
- package/src/{agGrid → Utilities}/weightedAverage.d.ts +1 -1
- package/src/{agGrid → Utilities}/weightedAverage.js +2 -3
- package/src/View/AdaptablePopover/index.d.ts +1 -1
- package/src/View/AdaptablePopover/index.js +3 -4
- package/src/View/AdaptableView.js +6 -9
- package/src/View/AdaptableViewFactory.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +16 -13
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +25 -17
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +25 -11
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +2 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +23 -13
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +12 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +20 -10
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +22 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +1 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.js +5 -2
- package/src/View/AdaptableWizardView/Wizard.d.ts +2 -2
- package/src/View/AdaptableWizardView/Wizard.js +24 -7
- package/src/View/AdaptableWizardView/helper.d.ts +1 -1
- package/src/View/AdaptableWizardView/helper.js +20 -11
- package/src/View/AdaptableWizardView/index.js +1 -1
- package/src/View/Alert/ActiveAlertsPanel.js +1 -1
- package/src/View/Alert/ActiveAlertsPanelItemLabel.js +1 -1
- package/src/View/Alert/AlertEmptyView.js +1 -1
- package/src/View/Alert/AlertStatusSubPanel.d.ts +2 -2
- package/src/View/Alert/AlertStatusSubPanel.js +5 -3
- package/src/View/Alert/AlertViewPanel.d.ts +7 -5
- package/src/View/Alert/AlertViewPanel.js +4 -4
- package/src/View/Alert/AlertsPanel.js +1 -2
- package/src/View/Alert/Utilities/getAlertType.js +8 -9
- package/src/View/Alert/Utilities/getAvailablePredicates.js +1 -8
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -1
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +5 -6
- package/src/View/Alert/Utilities/mapAlertDefinition.js +9 -10
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +4 -4
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +7 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +2 -2
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +77 -52
- package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +3 -3
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +14 -5
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +2 -2
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +38 -19
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +4 -4
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +20 -11
- package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +2 -2
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +3 -3
- package/src/View/Alert/Wizard/AlertWizard.d.ts +2 -2
- package/src/View/Alert/Wizard/AlertWizard.js +8 -10
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -2
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -2
- package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +7 -5
- package/src/View/BulkUpdate/BulkUpdatePopup.js +12 -13
- package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +7 -6
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +11 -14
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +6 -3
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingsTags.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +17 -7
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +16 -5
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +28 -14
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.d.ts +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +13 -10
- package/src/View/CalculatedColumn/utils.js +1 -2
- package/src/View/CellSummary/CellSummaryDetails.d.ts +3 -3
- package/src/View/CellSummary/CellSummaryDetails.js +5 -5
- package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -2
- package/src/View/CellSummary/CellSummaryPopup.d.ts +8 -6
- package/src/View/CellSummary/CellSummaryPopup.js +5 -6
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
- package/src/View/CellSummary/CellSummaryStatusPanel.d.ts +2 -2
- package/src/View/CellSummary/CellSummaryStatusPanel.js +4 -5
- package/src/View/CellSummary/CellSummaryViewPanel.d.ts +9 -8
- package/src/View/CellSummary/CellSummaryViewPanel.js +9 -13
- package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +1 -2
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +6 -3
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +33 -5
- package/src/View/Charting/ChartingWizard/ChartingWizard.js +3 -3
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +2 -4
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +4 -1
- package/src/View/Charting/ShowChartButton.js +18 -17
- package/src/View/Charting/useAgChartState.js +6 -7
- package/src/View/Charting/useChartingElements.d.ts +6 -6
- package/src/View/Charting/useChartingElements.js +4 -5
- package/src/View/ColumnInfo/ColumnInfo.js +144 -98
- package/src/View/ColumnInfo/ColumnInfoPopup.js +1 -2
- package/src/View/Comments/CommentsEditor.js +23 -23
- package/src/View/Comments/CommentsPopup.js +3 -4
- package/src/View/Components/AdaptableButton/index.js +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +4 -2
- package/src/View/Components/AdaptableDateInput/index.js +24 -17
- package/src/View/Components/AdaptableIconComponent/index.js +1 -1
- package/src/View/Components/AdaptableIconSelector/index.js +3 -4
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +3 -2
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +4 -7
- package/src/View/Components/AdaptableInput/index.d.ts +5 -3
- package/src/View/Components/AdaptableInput/index.js +3 -4
- package/src/View/Components/AdaptableObjectCollection/index.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +10 -12
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +18 -28
- package/src/View/Components/Badge/index.js +1 -1
- package/src/View/Components/Buttons/ButtonApply.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonApply.js +1 -1
- package/src/View/Components/Buttons/ButtonBase/index.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonBase/index.js +1 -1
- package/src/View/Components/Buttons/ButtonClear.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonClear.js +1 -1
- package/src/View/Components/Buttons/ButtonClone.d.ts +2 -2
- package/src/View/Components/Buttons/ButtonClone.js +1 -1
- package/src/View/Components/Buttons/ButtonClose.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonClose.js +1 -1
- package/src/View/Components/Buttons/ButtonConfigure.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonConfigure.js +1 -1
- package/src/View/Components/Buttons/ButtonDelete.d.ts +3 -8
- package/src/View/Components/Buttons/ButtonDelete.js +17 -27
- package/src/View/Components/Buttons/ButtonEdit.js +1 -2
- package/src/View/Components/Buttons/ButtonExpand.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonExpand.js +1 -1
- package/src/View/Components/Buttons/ButtonExport.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonExport.js +1 -1
- package/src/View/Components/Buttons/ButtonFunction.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonFunction.js +1 -1
- package/src/View/Components/Buttons/ButtonGeneral.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonGeneral.js +1 -1
- package/src/View/Components/Buttons/ButtonInfo.js +1 -1
- package/src/View/Components/Buttons/ButtonInvalid.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonInvalid.js +1 -1
- package/src/View/Components/Buttons/ButtonLogin.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonLogin.js +1 -1
- package/src/View/Components/Buttons/ButtonLogout.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonLogout.js +1 -1
- package/src/View/Components/Buttons/ButtonMaximise.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonMaximise.js +1 -1
- package/src/View/Components/Buttons/ButtonMinimise.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonMinimise.js +1 -1
- package/src/View/Components/Buttons/ButtonNew.d.ts +2 -2
- package/src/View/Components/Buttons/ButtonNew.js +1 -1
- package/src/View/Components/Buttons/ButtonNewPage.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonNewPage.js +2 -2
- package/src/View/Components/Buttons/ButtonOpen.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonOpen.js +1 -1
- package/src/View/Components/Buttons/ButtonPause.d.ts +1 -3
- package/src/View/Components/Buttons/ButtonPause.js +13 -15
- package/src/View/Components/Buttons/ButtonPlay.d.ts +1 -3
- package/src/View/Components/Buttons/ButtonPlay.js +3 -5
- package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +2 -2
- package/src/View/Components/Buttons/ButtonPreviewDelete.js +1 -1
- package/src/View/Components/Buttons/ButtonSave.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonSave.js +1 -1
- package/src/View/Components/Buttons/ButtonSchedule.d.ts +1 -3
- package/src/View/Components/Buttons/ButtonSchedule.js +3 -5
- package/src/View/Components/Buttons/ButtonShare.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonShare.js +2 -3
- package/src/View/Components/Buttons/ButtonShow.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonShow.js +1 -1
- package/src/View/Components/Buttons/ButtonShowChart.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonShowChart.js +1 -1
- package/src/View/Components/Buttons/ButtonStop.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonStop.js +1 -1
- package/src/View/Components/Buttons/ButtonUndo.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonUndo.js +1 -1
- package/src/View/Components/Buttons/ButtonUnsuspend.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonUnsuspend.js +1 -1
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -1
- package/src/View/Components/CellPopup/index.js +1 -2
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.d.ts +12 -0
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +16 -0
- package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.d.ts +9 -0
- package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +36 -0
- package/src/View/Components/ColumnFilter/ColumnFilter.d.ts +13 -0
- package/src/View/Components/ColumnFilter/ColumnFilter.js +149 -0
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.d.ts +3 -0
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +37 -0
- package/src/View/Components/ColumnFilter/FloatingFilter.d.ts +12 -0
- package/src/View/Components/ColumnFilter/FloatingFilter.js +89 -0
- package/src/View/Components/ColumnFilter/LayoutColumnFilter.d.ts +6 -0
- package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +30 -0
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.d.ts +27 -0
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +122 -0
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.d.ts +13 -0
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +61 -0
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.d.ts +12 -0
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +22 -0
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.d.ts +13 -0
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +63 -0
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.d.ts +44 -0
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +114 -0
- package/src/View/Components/ColumnFilter/hooks.d.ts +2 -0
- package/src/View/Components/ColumnFilter/hooks.js +15 -0
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +12 -0
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +67 -0
- package/src/View/Components/ColumnFilter/utils.d.ts +8 -0
- package/src/View/Components/ColumnFilter/utils.js +128 -0
- package/src/View/Components/ColumnSelector/index.d.ts +2 -2
- package/src/View/Components/ColumnSelector/index.js +1 -2
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +18 -16
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +23 -17
- package/src/View/Components/EntityRulesEditor/Utilities.js +11 -12
- package/src/View/Components/EntityRulesEditor/index.d.ts +2 -2
- package/src/View/Components/EntityRulesEditor/index.js +47 -27
- package/src/View/Components/ExpressionWizard.d.ts +1 -1
- package/src/View/Components/ExpressionWizard.js +2 -3
- package/src/View/Components/ExternalRenderer.js +7 -14
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +8 -15
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +29 -75
- package/src/View/Components/FilterForm/ListBoxMenu.d.ts +1 -1
- package/src/View/Components/FilterForm/Waiting.js +2 -2
- package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +2 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +6 -1
- package/src/View/Components/ListBox/DualListBoxEditor.d.ts +1 -1
- package/src/View/Components/ListBox/DualListBoxEditor.js +4 -4
- package/src/View/Components/ListBox/ListBoxFilterSortComponent.d.ts +1 -1
- package/src/View/Components/ModuleValueSelector/index.d.ts +2 -2
- package/src/View/Components/ModuleValueSelector/index.js +4 -4
- package/src/View/Components/NewScopeComponent.d.ts +2 -2
- package/src/View/Components/NewScopeComponent.js +22 -27
- package/src/View/Components/Panels/PanelDashboard/index.d.ts +3 -3
- package/src/View/Components/Panels/PanelDashboard/index.js +4 -4
- package/src/View/Components/Panels/PanelFooter.js +2 -3
- package/src/View/Components/Panels/PanelToolPanel/index.d.ts +1 -1
- package/src/View/Components/Panels/PanelToolPanel/index.js +25 -2
- package/src/View/Components/Panels/PanelWithButton.d.ts +1 -3
- package/src/View/Components/Panels/PanelWithButton.js +15 -21
- package/src/View/Components/Panels/PanelWithImage.js +6 -3
- package/src/View/Components/Panels/PanelWithRow.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithTwoButtons.js +1 -1
- package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +1 -1
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +2 -2
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +7 -8
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +2 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +13 -11
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +36 -34
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +7 -7
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +1 -2
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +9 -11
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +2 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +7 -5
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -3
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +1 -2
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.d.ts +2 -2
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +3 -3
- package/src/View/Components/Popups/FormPopups/FormPopups.js +6 -3
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +13 -14
- package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +1 -1
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +22 -10
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -4
- package/src/View/Components/PredicateEditor/PredicateEditor.js +46 -29
- package/src/View/Components/PreviewResultsPanel.js +23 -32
- package/src/View/Components/RangesComponent.d.ts +1 -1
- package/src/View/Components/RangesComponent.js +21 -10
- package/src/View/Components/ReorderDraggable/index.d.ts +12 -0
- package/src/View/Components/ReorderDraggable/index.js +45 -0
- package/src/View/Components/Selectors/{ColumnValueSelector.d.ts → BulkUpdateValueSelector.d.ts} +2 -2
- package/src/View/Components/Selectors/{ColumnValueSelector.js → BulkUpdateValueSelector.js} +32 -14
- package/src/View/Components/Selectors/ColumnSelector.d.ts +3 -2
- package/src/View/Components/Selectors/ColumnSelector.js +9 -7
- package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +1 -1
- package/src/View/Components/Selectors/ColumnSelectorOld.js +1 -2
- package/src/View/Components/Selectors/FieldSelector.js +5 -9
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +13 -2
- package/src/View/Components/Selectors/PermittedValuesSelector.js +37 -8
- package/src/View/Components/SharedProps/EditableConfigEntityState.js +1 -1
- package/src/View/Components/StyleComponent.d.ts +1 -1
- package/src/View/Components/StyleComponent.js +3 -4
- package/src/View/Components/TagValueSelector/index.d.ts +3 -3
- package/src/View/Components/TagValueSelector/index.js +1 -2
- package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +11 -8
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +15 -27
- package/src/View/Components/ToolPanel/CustomToolPanelContent.d.ts +2 -2
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +19 -8
- package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +7 -4
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +8 -10
- package/src/View/Components/ToolPanel/ToolPanelWrapper.d.ts +2 -2
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -2
- package/src/View/Components/ValueSelector/index.d.ts +20 -2
- package/src/View/Components/ValueSelector/index.js +57 -43
- package/src/View/Components/WizardSummaryPage.d.ts +2 -2
- package/src/View/Components/WizardSummaryPage.js +4 -4
- package/src/View/CustomSort/CustomSortSummary.d.ts +3 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +3 -3
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +6 -2
- package/src/View/CustomSort/Wizard/CustomSortSummaryWizard.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.d.ts +3 -3
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +21 -5
- package/src/View/CustomSort/Wizard/CustomSortWizard.d.ts +2 -2
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +5 -7
- package/src/View/Dashboard/CustomDashboardButton.d.ts +2 -2
- package/src/View/Dashboard/CustomDashboardButton.js +6 -4
- package/src/View/Dashboard/CustomToolbar.d.ts +3 -3
- package/src/View/Dashboard/CustomToolbar.js +13 -20
- package/src/View/Dashboard/Dashboard.d.ts +8 -6
- package/src/View/Dashboard/Dashboard.js +13 -10
- package/src/View/Dashboard/DashboardPopup.d.ts +6 -4
- package/src/View/Dashboard/DashboardPopup.js +6 -6
- package/src/View/Dashboard/DashboardToolbarFactory.js +1 -1
- package/src/View/Dashboard/DashboardViewPanel.d.ts +4 -2
- package/src/View/Dashboard/ModuleToolbarWrapper.d.ts +1 -1
- package/src/View/Dashboard/ModuleToolbarWrapper.js +1 -1
- package/src/View/Dashboard/PinnedDashboard.js +1 -2
- package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +31 -38
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +10 -8
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +9 -9
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +10 -11
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
- package/src/View/DataChangeHistory/buildActionColumnButton.js +9 -4
- package/src/View/DataImport/DataImportPopup.js +4 -6
- package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +2 -2
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +26 -23
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +27 -14
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +14 -13
- package/src/View/DataImport/systemFileHandlers.js +1 -2
- package/src/View/DataSet/DataSetSelector.js +2 -2
- package/src/View/DataSet/DataSetViewPanel.d.ts +9 -4
- package/src/View/DataSet/DataSetViewPanel.js +4 -5
- package/src/View/Export/ExportDestinationPicker.d.ts +9 -0
- package/src/View/Export/ExportDestinationPicker.js +27 -0
- package/src/View/Export/ExportStatusBar.d.ts +2 -0
- package/src/View/Export/ExportStatusBar.js +21 -0
- package/src/View/Export/ExportViewPanel.d.ts +2 -26
- package/src/View/Export/ExportViewPanel.js +40 -127
- package/src/View/Export/ReportFormatSelector.d.ts +10 -0
- package/src/View/Export/ReportFormatSelector.js +27 -0
- package/src/View/Export/{ReportExportDropdown.d.ts → ReportListItem.d.ts} +1 -1
- package/src/View/Export/ReportListItem.js +18 -0
- package/src/View/Export/ReportNameSelector.d.ts +10 -0
- package/src/View/Export/ReportNameSelector.js +25 -0
- package/src/View/Export/Wizard/NewReportWizard.d.ts +2 -2
- package/src/View/Export/Wizard/NewReportWizard.js +2 -3
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +1 -1
- package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +3 -3
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +5 -2
- package/src/View/Export/Wizard/ReportNameWizardSection.d.ts +3 -3
- package/src/View/Export/Wizard/ReportNameWizardSection.js +5 -2
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +1 -1
- package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +3 -3
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +11 -7
- package/src/View/Filter/ActiveFiltersPanel.js +1 -1
- package/src/View/Filter/FilterSummary.d.ts +4 -1
- package/src/View/Filter/FilterSummary.js +2 -2
- package/src/View/Filter/FilterViewPanel.d.ts +9 -5
- package/src/View/Filter/FilterViewPanel.js +14 -20
- package/src/View/FlashingCell/FlashingCellStyle.js +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +1 -2
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +15 -15
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +6 -7
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.d.ts +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +3 -4
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -2
- package/src/View/FormatColumn/FormatColumnSummary.d.ts +3 -1
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -2
- package/src/View/FormatColumn/MoveFormatColumn.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +4 -4
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +37 -45
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.d.ts +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +2 -3
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.d.ts +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +29 -13
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +4 -4
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +8 -5
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.d.ts +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +10 -13
- package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +3 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +3 -12
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +48 -24
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.d.ts +2 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +2 -4
- package/src/View/GridFilter/GridFilterExpressionEditor.d.ts +2 -2
- package/src/View/GridFilter/GridFilterExpressionEditor.js +3 -4
- package/src/View/GridFilter/GridFilterPopup.d.ts +2 -2
- package/src/View/GridFilter/GridFilterPopup.js +2 -2
- package/src/View/GridFilter/GridFilterStatusbar.js +2 -3
- package/src/View/GridFilter/GridFilterViewPanel.d.ts +2 -2
- package/src/View/GridFilter/GridFilterViewPanel.js +2 -2
- package/src/View/GridFilter/NamedQuerySelector.d.ts +3 -3
- package/src/View/GridFilter/NamedQuerySelector.js +1 -2
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +19 -21
- package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +3 -4
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +2 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.d.ts +2 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +21 -15
- package/src/View/KeyHint.d.ts +2 -2
- package/src/View/KeyHint.js +1 -1
- package/src/View/Layout/EditCurrentLayoutButton.js +5 -1
- package/src/View/Layout/LayoutCloneButton.js +3 -2
- package/src/View/Layout/LayoutRadioSelector.js +1 -1
- package/src/View/Layout/LayoutViewPanel.d.ts +18 -10
- package/src/View/Layout/LayoutViewPanel.js +64 -39
- package/src/View/Layout/PivotDetailsPopoup.js +23 -7
- package/src/View/Layout/TransposedPopup.d.ts +2 -2
- package/src/View/Layout/TransposedPopup.js +8 -14
- package/src/View/Layout/Wizard/Components/ColumnLabels.d.ts +1 -1
- package/src/View/Layout/Wizard/Components/ColumnLabels.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +114 -31
- package/src/View/Layout/Wizard/getGridFilterPreview.d.ts +2 -2
- package/src/View/Layout/Wizard/getGridFilterPreview.js +1 -2
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -2
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +78 -37
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +211 -50
- package/src/View/Layout/Wizard/sections/FilterSection.js +28 -30
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +12 -14
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +9 -0
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +193 -0
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +2 -2
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +7 -7
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +47 -0
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +78 -34
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +4 -4
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +76 -41
- package/src/View/Layout/Wizard/sections/SettingsSection.js +12 -10
- package/src/View/Layout/Wizard/sections/SortSection.js +19 -15
- package/src/View/Layout/Wizard/sections/Utilities.js +1 -1
- package/src/View/License/LicenseWatermark.js +1 -1
- package/src/View/NamedQuery/EditCurrentQueryButton.d.ts +2 -2
- package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.d.ts +3 -3
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.d.ts +3 -3
- package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +4 -1
- package/src/View/NamedQuery/Wizard/NamedQueryWizard.d.ts +2 -2
- package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -2
- package/src/View/Note/NoteEditor.js +2 -4
- package/src/View/PlusMinus/MovePlusMinus.js +1 -1
- package/src/View/PlusMinus/PlusMinusSummary.d.ts +3 -1
- package/src/View/PlusMinus/PlusMinusSummary.js +1 -2
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +3 -3
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +4 -2
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +9 -3
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +7 -7
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +9 -8
- package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.js +2 -2
- package/src/View/QuickSearch/QuickSearchInput.js +1 -2
- package/src/View/QuickSearch/QuickSearchPopup.d.ts +4 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -2
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +40 -20
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +28 -8
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +8 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +29 -14
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +16 -10
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +13 -13
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +7 -7
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +9 -10
- package/src/View/Schedule/Wizard/ScheduleWizard.js +3 -4
- package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +9 -3
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +15 -8
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +4 -8
- package/src/View/SmartEdit/SmartEditPopup.d.ts +9 -6
- package/src/View/SmartEdit/SmartEditPopup.js +8 -8
- package/src/View/SmartEdit/SmartEditViewPanel.d.ts +8 -7
- package/src/View/SmartEdit/SmartEditViewPanel.js +11 -13
- package/src/View/SpecialColumnSettingsWizardStep.js +20 -19
- package/src/View/StateManagement/components/ClearButton.js +1 -1
- package/src/View/StateManagement/components/ExportDropdown.js +1 -1
- package/src/View/StateManagement/components/LoadButton.js +1 -1
- package/src/View/StatusBar/AdaptableStatusBar.d.ts +1 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +12 -12
- package/src/View/StatusBar/StatusBarPanel.d.ts +1 -1
- package/src/View/StatusBar/StatusBarPanel.js +3 -4
- package/src/View/StatusBar/StatusBarPopup.js +4 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +47 -19
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +51 -114
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +12 -15
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +3 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +14 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +3 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +36 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +9 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +74 -30
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +3 -1
- package/src/View/SystemStatus/SystemStatusEntityRow.js +1 -2
- package/src/View/SystemStatus/SystemStatusPopup.d.ts +6 -4
- package/src/View/SystemStatus/SystemStatusPopup.js +4 -4
- package/src/View/SystemStatus/SystemStatusStatusBarContent.js +1 -1
- package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +7 -2
- package/src/View/SystemStatus/SystemStatusViewPanel.js +2 -2
- package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -2
- package/src/View/TeamSharing/SharedEntityDependencies.js +3 -1
- package/src/View/TeamSharing/SharedEntityObjectView.d.ts +2 -3
- package/src/View/TeamSharing/SharedEntityObjectView.js +4 -5
- package/src/View/Theme/ThemeEditor.js +29 -13
- package/src/View/Theme/ThemePopup.d.ts +4 -2
- package/src/View/Theme/ThemeStatusbar.d.ts +2 -2
- package/src/View/Theme/ThemeViewPanel.d.ts +2 -2
- package/src/View/Theme/VariantSelector.js +1 -2
- package/src/View/UIHelper.d.ts +2 -2
- package/src/View/UIHelper.js +10 -11
- package/src/View/Wizard/AdaptableWizard.d.ts +2 -2
- package/src/View/Wizard/AdaptableWizard.js +8 -3
- package/src/View/Wizard/ObjectTagsWizardSection.d.ts +3 -3
- package/src/View/Wizard/ObjectTagsWizardSection.js +2 -3
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +2 -2
- package/src/View/Wizard/OnePageAdaptableWizard.js +30 -11
- package/src/View/Wizard/OnePageWizards.d.ts +1 -1
- package/src/View/Wizard/OnePageWizards.js +40 -34
- package/src/View/Wizard/TypeRadio.d.ts +5 -4
- package/src/View/Wizard/TypeRadio.js +1 -1
- package/src/View/Wizard/useKeyboardNavigation.d.ts +1 -1
- package/src/View/renderWithAdaptableContext.d.ts +2 -1
- package/src/agGrid/Adaptable.d.ts +1 -1
- package/src/agGrid/Adaptable.js +12 -11
- package/src/agGrid/AdaptableAgGrid.d.ts +63 -78
- package/src/agGrid/AdaptableAgGrid.js +820 -1587
- package/src/{AdaptableOptions → agGrid}/AdaptableFrameworkComponent.d.ts +1 -7
- package/src/agGrid/AdaptableLogger.d.ts +1 -0
- package/src/agGrid/AdaptableLogger.js +21 -12
- package/src/agGrid/AgGridAdapter.d.ts +25 -10
- package/src/agGrid/AgGridAdapter.js +329 -204
- package/src/agGrid/AgGridColumnAdapter.d.ts +6 -4
- package/src/agGrid/AgGridColumnAdapter.js +211 -144
- package/src/agGrid/AgGridExportAdapter.d.ts +52 -0
- package/src/agGrid/AgGridExportAdapter.js +778 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +5 -6
- package/src/agGrid/AgGridMenuAdapter.js +116 -104
- package/src/agGrid/AgGridOptionsService.d.ts +1 -1
- package/src/agGrid/AgGridOptionsService.js +1 -1
- package/src/agGrid/FilterWrapper.js +16 -14
- package/src/agGrid/FloatingFilterWrapper.js +7 -7
- package/src/agGrid/agGridDataTypeDefinitions.d.ts +8 -0
- package/src/agGrid/agGridDataTypeDefinitions.js +77 -0
- package/src/agGrid/agGridModules.d.ts +3 -0
- package/src/agGrid/agGridModules.js +18 -0
- package/src/agGrid/{ActionColumnRenderer.d.ts → cellRenderers/ActionColumnRenderer.d.ts} +3 -3
- package/src/agGrid/{ActionColumnRenderer.js → cellRenderers/ActionColumnRenderer.js} +35 -27
- package/src/agGrid/cellRenderers/BadgeRenderer.d.ts +4 -0
- package/src/agGrid/{BadgeRenderer.js → cellRenderers/BadgeRenderer.js} +28 -19
- package/src/agGrid/cellRenderers/PercentBarRenderer.d.ts +4 -0
- package/src/agGrid/{PercentBarRenderer.js → cellRenderers/PercentBarRenderer.js} +2 -3
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -8
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +2 -2
- package/src/agGrid/editors/AdaptableDateEditor/index.js +25 -21
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +17 -7
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +21 -19
- package/src/agGrid/editors/AdaptablePercentageEditor/InternalAdaptablePercentageEditor.js +10 -7
- package/src/agGrid/editors/AdaptablePercentageEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +23 -22
- package/src/components/Accordion.js +2 -4
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +3 -3
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +22 -28
- package/src/components/CheckBox/index.d.ts +2 -2
- package/src/components/CheckBox/index.js +5 -6
- package/src/components/CodeBlock/index.d.ts +2 -2
- package/src/components/CodeBlock/index.js +1 -1
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/ColorPicker/ColorPicker.js +5 -6
- package/src/components/Dashboard/Dashboard.d.ts +2 -1
- package/src/components/Dashboard/Dashboard.js +1 -2
- package/src/components/Dashboard/DashboardToolbar.d.ts +2 -1
- package/src/components/Dashboard/DashboardToolbar.js +1 -1
- package/src/components/Datepicker/DatepickerContext.d.ts +2 -0
- package/src/components/Datepicker/index.d.ts +2 -1
- package/src/components/Datepicker/index.js +30 -37
- package/src/components/Dialog/index.js +5 -5
- package/src/components/DragAndDropContext/ModuleManager.js +19 -6
- package/src/components/DragAndDropContext/TabList.d.ts +5 -5
- package/src/components/DragAndDropContext/TabList.js +11 -9
- package/src/components/DragAndDropContext/UnusedPanel.d.ts +2 -2
- package/src/components/DragAndDropContext/UnusedPanel.js +17 -7
- package/src/components/Drawer/index.js +1 -2
- package/src/components/Dropdown/Arrows.d.ts +2 -2
- package/src/components/Dropdown/index.d.ts +1 -1
- package/src/components/Dropdown/index.js +8 -4
- package/src/components/DropdownButton/index.d.ts +3 -1
- package/src/components/DropdownButton/index.js +36 -17
- package/src/components/DropdownButton/renderItem.d.ts +1 -1
- package/src/components/DropdownButton/renderItem.js +2 -2
- package/src/components/EllipsisContainer/index.d.ts +1 -1
- package/src/components/EllipsisContainer/index.js +6 -9
- package/src/components/EmptyContent/index.d.ts +2 -1
- package/src/components/EmptyContent/index.js +2 -3
- package/src/components/ErrorBox/index.d.ts +2 -2
- package/src/components/ErrorBox/index.js +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +2 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +12 -6
- package/src/components/ExpressionEditor/DataTableEditor.d.ts +2 -2
- package/src/components/ExpressionEditor/DataTableEditor.js +6 -9
- package/src/components/ExpressionEditor/EditorButton.d.ts +2 -2
- package/src/components/ExpressionEditor/EditorButton.js +6 -8
- package/src/components/ExpressionEditor/EditorInput.d.ts +2 -2
- package/src/components/ExpressionEditor/EditorInput.js +4 -1
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.d.ts +2 -2
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +4 -1
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.d.ts +2 -2
- package/src/components/ExpressionEditor/ExpressionPreview.js +1 -2
- package/src/components/ExpressionEditor/NamedQueryEditor.d.ts +2 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +9 -7
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +6 -6
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +14 -18
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +61 -35
- package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +1 -2
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +10 -27
- package/src/components/ExpressionEditor/index.d.ts +1 -1
- package/src/components/ExpressionEditor/index.js +20 -24
- package/src/components/FieldWrap/index.d.ts +2 -2
- package/src/components/FieldWrap/index.js +2 -2
- package/src/components/FileDroppable/index.d.ts +1 -1
- package/src/components/FileDroppable/index.js +4 -5
- package/src/components/FileDroppable/reducer.js +18 -5
- package/src/components/Flex.d.ts +1 -0
- package/src/components/Flex.js +5 -0
- package/src/components/FlexWithFooter.d.ts +1 -1
- package/src/components/FlexWithFooter.js +3 -3
- package/src/components/FormLayout/index.d.ts +4 -5
- package/src/components/FormLayout/index.js +7 -3
- package/src/components/HelpBlock/index.d.ts +2 -2
- package/src/components/HelpBlock/index.js +1 -1
- package/src/components/Icon/index.d.ts +2 -2
- package/src/components/Icon/index.js +9 -10
- package/src/components/IconSelector/IconSelector.js +4 -5
- package/src/components/InfiniteTable/index.d.ts +3 -1
- package/src/components/InfiniteTable/index.js +6 -7
- package/src/components/Input/NumberInput.d.ts +1 -1
- package/src/components/Input/NumberInput.js +4 -6
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/Input/index.js +2 -2
- package/src/components/InputGroup/InputGroup.d.ts +1 -1
- package/src/components/InputGroup/InputGroup.js +2 -4
- package/src/components/List/GridList/index.d.ts +2 -1
- package/src/components/List/GridList/index.js +4 -5
- package/src/components/List/ListGroup/index.d.ts +2 -2
- package/src/components/List/ListGroup/index.js +2 -2
- package/src/components/List/ListGroupItem/index.d.ts +2 -3
- package/src/components/List/ListGroupItem/index.js +3 -3
- package/src/components/Logo/index.js +1 -1
- package/src/components/Modal/Backdrop.d.ts +2 -2
- package/src/components/Modal/Backdrop.js +4 -1
- package/src/components/Modal/index.d.ts +1 -0
- package/src/components/Modal/index.js +16 -3
- package/src/components/NotifyResize/index.d.ts +2 -2
- package/src/components/OverlayTrigger/Overlay.js +3 -4
- package/src/components/OverlayTrigger/index.d.ts +1 -0
- package/src/components/OverlayTrigger/index.js +12 -10
- package/src/components/Panel/index.d.ts +3 -1
- package/src/components/Panel/index.js +16 -12
- package/src/components/PopupWithFooter.js +2 -2
- package/src/components/ProgressIndicator/ProgressIndicator.js +2 -1
- package/src/components/Radio/index.d.ts +4 -3
- package/src/components/Radio/index.js +13 -6
- package/src/components/ResizeObserver/index.d.ts +1 -1
- package/src/components/ResizeObserver/index.js +2 -4
- package/src/components/Select/Select.d.ts +17 -1
- package/src/components/Select/Select.js +279 -51
- package/src/components/SelectableList/index.d.ts +2 -1
- package/src/components/SelectableList/index.js +2 -2
- package/src/components/SimpleButton/index.d.ts +1 -1
- package/src/components/SimpleButton/index.js +8 -8
- package/src/components/SizedContainer/index.d.ts +2 -1
- package/src/components/SizedContainer/index.js +3 -3
- package/src/components/StylePreview.js +1 -4
- package/src/components/Table/index.d.ts +2 -1
- package/src/components/Table/index.js +1 -1
- package/src/components/Tabs/index.d.ts +6 -5
- package/src/components/Tabs/index.js +11 -13
- package/src/components/Tag/Tag.js +1 -4
- package/src/components/Textarea/index.d.ts +1 -1
- package/src/components/Textarea/index.js +5 -7
- package/src/components/Toggle/Toggle.js +2 -3
- package/src/components/Tooltip/index.d.ts +1 -1
- package/src/components/WarningBox/index.d.ts +2 -2
- package/src/components/WarningBox/index.js +1 -1
- package/src/components/WindowModal/WindowModal.js +4 -4
- package/src/components/WindowModal/useStacking.js +1 -2
- package/src/components/WizardPanel/index.d.ts +2 -2
- package/src/components/WizardPanel/index.js +1 -1
- package/src/components/dnd/index.d.ts +13 -0
- package/src/components/dnd/index.js +61 -0
- package/src/components/icons/DefaultIcon.d.ts +2 -2
- package/src/components/icons/DefaultIcon.js +6 -4
- package/src/components/icons/add-row.d.ts +2 -2
- package/src/components/icons/add-row.js +1 -1
- package/src/components/icons/alert.d.ts +2 -2
- package/src/components/icons/alert.js +1 -1
- package/src/components/icons/align-center.d.ts +2 -2
- package/src/components/icons/align-center.js +1 -1
- package/src/components/icons/align-justify.d.ts +2 -2
- package/src/components/icons/align-justify.js +1 -1
- package/src/components/icons/align-left.d.ts +2 -2
- package/src/components/icons/align-left.js +1 -1
- package/src/components/icons/align-right.d.ts +2 -2
- package/src/components/icons/align-right.js +1 -1
- package/src/components/icons/analysis.d.ts +2 -2
- package/src/components/icons/analysis.js +1 -1
- package/src/components/icons/application.d.ts +2 -2
- package/src/components/icons/application.js +1 -1
- package/src/components/icons/arrow-down-long.d.ts +2 -2
- package/src/components/icons/arrow-down-long.js +1 -1
- package/src/components/icons/arrow-down.d.ts +2 -2
- package/src/components/icons/arrow-down.js +1 -1
- package/src/components/icons/arrow-expand.d.ts +2 -2
- package/src/components/icons/arrow-expand.js +1 -1
- package/src/components/icons/arrow-left.d.ts +2 -2
- package/src/components/icons/arrow-left.js +1 -1
- package/src/components/icons/arrow-right.d.ts +2 -2
- package/src/components/icons/arrow-right.js +1 -1
- package/src/components/icons/arrow-up-long.d.ts +2 -2
- package/src/components/icons/arrow-up-long.js +1 -1
- package/src/components/icons/arrow-up.d.ts +2 -2
- package/src/components/icons/arrow-up.js +1 -1
- package/src/components/icons/attach-file.d.ts +2 -2
- package/src/components/icons/attach-file.js +1 -1
- package/src/components/icons/badge.d.ts +2 -2
- package/src/components/icons/badge.js +1 -1
- package/src/components/icons/blanks.d.ts +2 -2
- package/src/components/icons/blanks.js +1 -1
- package/src/components/icons/bold.d.ts +2 -2
- package/src/components/icons/bold.js +1 -1
- package/src/components/icons/boolean-list.d.ts +2 -2
- package/src/components/icons/boolean-list.js +1 -1
- package/src/components/icons/brush.d.ts +2 -2
- package/src/components/icons/brush.js +1 -1
- package/src/components/icons/build.d.ts +2 -2
- package/src/components/icons/build.js +1 -1
- package/src/components/icons/bulk-update.d.ts +2 -2
- package/src/components/icons/bulk-update.js +2 -6
- package/src/components/icons/calculated-column.d.ts +2 -2
- package/src/components/icons/calculated-column.js +1 -1
- package/src/components/icons/calendar.d.ts +2 -2
- package/src/components/icons/calendar.js +1 -1
- package/src/components/icons/call.d.ts +2 -2
- package/src/components/icons/call.js +1 -1
- package/src/components/icons/campaign.d.ts +2 -2
- package/src/components/icons/campaign.js +1 -1
- package/src/components/icons/case-lower.d.ts +2 -2
- package/src/components/icons/case-lower.js +1 -1
- package/src/components/icons/case-sentence.d.ts +2 -2
- package/src/components/icons/case-sentence.js +1 -1
- package/src/components/icons/case-upper.d.ts +2 -2
- package/src/components/icons/case-upper.js +1 -1
- package/src/components/icons/cell-summary.d.ts +2 -2
- package/src/components/icons/cell-summary.js +1 -1
- package/src/components/icons/cell-validation.d.ts +2 -2
- package/src/components/icons/cell-validation.js +1 -1
- package/src/components/icons/chart.d.ts +2 -2
- package/src/components/icons/chart.js +1 -1
- package/src/components/icons/chat.d.ts +2 -2
- package/src/components/icons/chat.js +1 -1
- package/src/components/icons/check-box-outline.d.ts +2 -2
- package/src/components/icons/check-box-outline.js +1 -1
- package/src/components/icons/check-box.d.ts +2 -2
- package/src/components/icons/check-box.js +1 -1
- package/src/components/icons/check-circle.d.ts +2 -2
- package/src/components/icons/check-circle.js +1 -1
- package/src/components/icons/check.d.ts +2 -2
- package/src/components/icons/check.js +1 -1
- package/src/components/icons/clone.d.ts +2 -2
- package/src/components/icons/clone.js +1 -1
- package/src/components/icons/close.d.ts +2 -2
- package/src/components/icons/close.js +1 -1
- package/src/components/icons/cloud-upload.d.ts +2 -2
- package/src/components/icons/cloud-upload.js +1 -1
- package/src/components/icons/collapse-all.d.ts +2 -2
- package/src/components/icons/collapse-all.js +1 -1
- package/src/components/icons/collapse.d.ts +2 -2
- package/src/components/icons/collapse.js +1 -1
- package/src/components/icons/column-add.d.ts +2 -2
- package/src/components/icons/column-add.js +1 -1
- package/src/components/icons/column-chooser.d.ts +2 -2
- package/src/components/icons/column-chooser.js +1 -1
- package/src/components/icons/column-filter.d.ts +2 -2
- package/src/components/icons/column-filter.js +1 -1
- package/src/components/icons/column-info.d.ts +2 -2
- package/src/components/icons/column-info.js +1 -1
- package/src/components/icons/column-outline.d.ts +2 -2
- package/src/components/icons/column-outline.js +1 -1
- package/src/components/icons/comment.d.ts +2 -2
- package/src/components/icons/comment.js +1 -1
- package/src/components/icons/comments.d.ts +2 -2
- package/src/components/icons/comments.js +1 -1
- package/src/components/icons/contact.d.ts +2 -2
- package/src/components/icons/contact.js +1 -1
- package/src/components/icons/contains.d.ts +2 -2
- package/src/components/icons/contains.js +2 -2
- package/src/components/icons/copy.d.ts +2 -2
- package/src/components/icons/copy.js +1 -1
- package/src/components/icons/csv.d.ts +2 -2
- package/src/components/icons/csv.js +1 -1
- package/src/components/icons/custom-sort.d.ts +2 -2
- package/src/components/icons/custom-sort.js +1 -1
- package/src/components/icons/dashboard.d.ts +2 -2
- package/src/components/icons/dashboard.js +1 -1
- package/src/components/icons/data-object.d.ts +2 -2
- package/src/components/icons/data-object.js +1 -1
- package/src/components/icons/data-set.d.ts +2 -2
- package/src/components/icons/data-set.js +1 -1
- package/src/components/icons/date-range.d.ts +2 -2
- package/src/components/icons/date-range.js +1 -1
- package/src/components/icons/delete.d.ts +2 -2
- package/src/components/icons/delete.js +1 -1
- package/src/components/icons/division.d.ts +2 -2
- package/src/components/icons/division.js +1 -1
- package/src/components/icons/dock.d.ts +2 -2
- package/src/components/icons/dock.js +1 -1
- package/src/components/icons/dollar.d.ts +2 -2
- package/src/components/icons/dollar.js +1 -1
- package/src/components/icons/drag.d.ts +2 -2
- package/src/components/icons/drag.js +1 -1
- package/src/components/icons/edit.d.ts +2 -2
- package/src/components/icons/edit.js +1 -1
- package/src/components/icons/ends-with.d.ts +2 -2
- package/src/components/icons/ends-with.js +1 -1
- package/src/components/icons/equal.d.ts +2 -2
- package/src/components/icons/equal.js +1 -1
- package/src/components/icons/equation.d.ts +2 -2
- package/src/components/icons/equation.js +1 -1
- package/src/components/icons/error.d.ts +2 -2
- package/src/components/icons/error.js +1 -1
- package/src/components/icons/excel.d.ts +2 -2
- package/src/components/icons/excel.js +1 -1
- package/src/components/icons/expand-all.d.ts +2 -2
- package/src/components/icons/expand-all.js +1 -1
- package/src/components/icons/expand.d.ts +2 -2
- package/src/components/icons/expand.js +1 -1
- package/src/components/icons/exponent.d.ts +2 -2
- package/src/components/icons/exponent.js +1 -1
- package/src/components/icons/export.d.ts +2 -2
- package/src/components/icons/export.js +1 -1
- package/src/components/icons/fast-backward.d.ts +2 -2
- package/src/components/icons/fast-backward.js +1 -1
- package/src/components/icons/fast-forward.d.ts +2 -2
- package/src/components/icons/fast-forward.js +1 -1
- package/src/components/icons/fdc3.d.ts +2 -2
- package/src/components/icons/fdc3.js +1 -1
- package/src/components/icons/filter-off.d.ts +2 -2
- package/src/components/icons/filter-off.js +1 -1
- package/src/components/icons/filter.d.ts +2 -2
- package/src/components/icons/filter.js +1 -1
- package/src/components/icons/flashing-cell.d.ts +2 -2
- package/src/components/icons/flashing-cell.js +1 -1
- package/src/components/icons/folder-open.d.ts +2 -2
- package/src/components/icons/folder-open.js +1 -1
- package/src/components/icons/folder-shared.d.ts +2 -2
- package/src/components/icons/folder-shared.js +1 -1
- package/src/components/icons/folder.d.ts +2 -2
- package/src/components/icons/folder.js +1 -1
- package/src/components/icons/format-column.d.ts +2 -2
- package/src/components/icons/format-column.js +1 -1
- package/src/components/icons/freetext-column.d.ts +2 -2
- package/src/components/icons/freetext-column.js +1 -1
- package/src/components/icons/function.d.ts +2 -2
- package/src/components/icons/function.js +1 -1
- package/src/components/icons/gradient-column.d.ts +2 -2
- package/src/components/icons/gradient-column.js +1 -1
- package/src/components/icons/gradient.d.ts +2 -2
- package/src/components/icons/gradient.js +1 -1
- package/src/components/icons/greater-than-or-equal.d.ts +2 -2
- package/src/components/icons/greater-than-or-equal.js +1 -1
- package/src/components/icons/greater-than.d.ts +2 -2
- package/src/components/icons/greater-than.js +1 -1
- package/src/components/icons/grid-filter.d.ts +2 -2
- package/src/components/icons/grid-filter.js +1 -1
- package/src/components/icons/grid-info.d.ts +2 -2
- package/src/components/icons/grid-info.js +1 -1
- package/src/components/icons/hide-column.d.ts +2 -2
- package/src/components/icons/hide-column.js +1 -1
- package/src/components/icons/history.d.ts +2 -2
- package/src/components/icons/history.js +1 -1
- package/src/components/icons/home.d.ts +2 -2
- package/src/components/icons/home.js +1 -1
- package/src/components/icons/import-export.d.ts +2 -2
- package/src/components/icons/import-export.js +1 -1
- package/src/components/icons/import.d.ts +2 -2
- package/src/components/icons/import.js +1 -1
- package/src/components/icons/index.d.ts +7 -4
- package/src/components/icons/index.js +37 -32
- package/src/components/icons/info.d.ts +2 -2
- package/src/components/icons/info.js +1 -1
- package/src/components/icons/instrument.d.ts +2 -2
- package/src/components/icons/instrument.js +1 -1
- package/src/components/icons/interactions.d.ts +2 -2
- package/src/components/icons/interactions.js +1 -1
- package/src/components/icons/invalid.d.ts +2 -2
- package/src/components/icons/invalid.js +1 -1
- package/src/components/icons/ipushpull.d.ts +2 -2
- package/src/components/icons/ipushpull.js +1 -1
- package/src/components/icons/italic.d.ts +2 -2
- package/src/components/icons/italic.js +1 -1
- package/src/components/icons/justify.d.ts +2 -2
- package/src/components/icons/justify.js +1 -1
- package/src/components/icons/layout.d.ts +2 -2
- package/src/components/icons/layout.js +1 -1
- package/src/components/icons/less-than-or-equal.d.ts +2 -2
- package/src/components/icons/less-than-or-equal.js +1 -1
- package/src/components/icons/less-than.d.ts +2 -2
- package/src/components/icons/less-than.js +1 -1
- package/src/components/icons/list.d.ts +2 -2
- package/src/components/icons/list.js +1 -1
- package/src/components/icons/login.d.ts +2 -2
- package/src/components/icons/login.js +1 -1
- package/src/components/icons/logout copy.d.ts +2 -2
- package/src/components/icons/logout copy.js +1 -1
- package/src/components/icons/logout.d.ts +2 -2
- package/src/components/icons/logout.js +1 -1
- package/src/components/icons/mail.d.ts +2 -2
- package/src/components/icons/mail.js +1 -1
- package/src/components/icons/menu.d.ts +2 -2
- package/src/components/icons/menu.js +1 -1
- package/src/components/icons/minus.d.ts +2 -2
- package/src/components/icons/minus.js +1 -1
- package/src/components/icons/money.d.ts +2 -2
- package/src/components/icons/money.js +1 -1
- package/src/components/icons/multiplication.d.ts +2 -2
- package/src/components/icons/multiplication.js +1 -1
- package/src/components/icons/newpage.d.ts +2 -2
- package/src/components/icons/newpage.js +1 -1
- package/src/components/icons/news.d.ts +2 -2
- package/src/components/icons/news.js +1 -1
- package/src/components/icons/non-blanks.d.ts +2 -2
- package/src/components/icons/non-blanks.js +1 -1
- package/src/components/icons/not-contains.d.ts +2 -2
- package/src/components/icons/not-contains.js +2 -2
- package/src/components/icons/not-equal.d.ts +2 -2
- package/src/components/icons/not-equal.js +1 -1
- package/src/components/icons/note.d.ts +2 -2
- package/src/components/icons/note.js +1 -1
- package/src/components/icons/open-in-new.d.ts +2 -2
- package/src/components/icons/open-in-new.js +1 -1
- package/src/components/icons/order.d.ts +2 -2
- package/src/components/icons/order.js +1 -1
- package/src/components/icons/organisation.d.ts +2 -2
- package/src/components/icons/organisation.js +1 -1
- package/src/components/icons/overline.d.ts +2 -2
- package/src/components/icons/overline.js +1 -1
- package/src/components/icons/pause.d.ts +2 -2
- package/src/components/icons/pause.js +1 -1
- package/src/components/icons/percent-bar.d.ts +2 -2
- package/src/components/icons/percent-bar.js +1 -1
- package/src/components/icons/percent.d.ts +2 -2
- package/src/components/icons/percent.js +1 -1
- package/src/components/icons/person.d.ts +2 -2
- package/src/components/icons/person.js +1 -1
- package/src/components/icons/pie-chart.d.ts +2 -2
- package/src/components/icons/pie-chart.js +1 -1
- package/src/components/icons/play.d.ts +2 -2
- package/src/components/icons/play.js +1 -1
- package/src/components/icons/plus-minus.d.ts +2 -2
- package/src/components/icons/plus-minus.js +1 -1
- package/src/components/icons/plus.d.ts +2 -2
- package/src/components/icons/plus.js +1 -1
- package/src/components/icons/query.d.ts +2 -2
- package/src/components/icons/query.js +1 -1
- package/src/components/icons/quick-search.d.ts +2 -2
- package/src/components/icons/quick-search.js +1 -1
- package/src/components/icons/quote.d.ts +2 -2
- package/src/components/icons/quote.js +1 -1
- package/src/components/icons/refresh.d.ts +2 -2
- package/src/components/icons/refresh.js +1 -1
- package/src/components/icons/regex.d.ts +2 -2
- package/src/components/icons/regex.js +1 -1
- package/src/components/icons/reminder.d.ts +2 -2
- package/src/components/icons/reminder.js +1 -1
- package/src/components/icons/resume.d.ts +2 -2
- package/src/components/icons/resume.js +1 -1
- package/src/components/icons/rows.d.ts +2 -2
- package/src/components/icons/rows.js +1 -1
- package/src/components/icons/save.d.ts +2 -2
- package/src/components/icons/save.js +1 -1
- package/src/components/icons/schedule.d.ts +2 -2
- package/src/components/icons/schedule.js +1 -1
- package/src/components/icons/science.d.ts +2 -2
- package/src/components/icons/science.js +1 -1
- package/src/components/icons/select-all.d.ts +2 -2
- package/src/components/icons/select-all.js +1 -1
- package/src/components/icons/select-fwd.d.ts +2 -2
- package/src/components/icons/select-fwd.js +1 -1
- package/src/components/icons/select-off.d.ts +2 -2
- package/src/components/icons/select-off.js +1 -1
- package/src/components/icons/settings.d.ts +2 -2
- package/src/components/icons/settings.js +1 -1
- package/src/components/icons/shortcut.d.ts +2 -2
- package/src/components/icons/shortcut.js +1 -1
- package/src/components/icons/show-column.d.ts +2 -2
- package/src/components/icons/show-column.js +1 -1
- package/src/components/icons/smart-edit.d.ts +2 -2
- package/src/components/icons/smart-edit.js +1 -1
- package/src/components/icons/sort-asc.d.ts +2 -2
- package/src/components/icons/sort-asc.js +1 -1
- package/src/components/icons/sort-desc.d.ts +2 -2
- package/src/components/icons/sort-desc.js +1 -1
- package/src/components/icons/spark-line.d.ts +2 -2
- package/src/components/icons/spark-line.js +1 -1
- package/src/components/icons/starts-with.d.ts +2 -2
- package/src/components/icons/starts-with.js +1 -1
- package/src/components/icons/state-management.d.ts +2 -2
- package/src/components/icons/state-management.js +1 -1
- package/src/components/icons/statusbar.d.ts +2 -2
- package/src/components/icons/statusbar.js +1 -1
- package/src/components/icons/stop.d.ts +2 -2
- package/src/components/icons/stop.js +1 -1
- package/src/components/icons/strikethrough.d.ts +2 -2
- package/src/components/icons/strikethrough.js +1 -1
- package/src/components/icons/styled-grid.d.ts +3 -0
- package/src/components/icons/styled-grid.js +8 -0
- package/src/components/icons/sync.d.ts +2 -2
- package/src/components/icons/sync.js +1 -1
- package/src/components/icons/system-status.d.ts +2 -2
- package/src/components/icons/system-status.js +1 -1
- package/src/components/icons/tab-unselected.d.ts +2 -2
- package/src/components/icons/tab-unselected.js +1 -1
- package/src/components/icons/table-arrow-right.d.ts +2 -2
- package/src/components/icons/table-arrow-right.js +1 -1
- package/src/components/icons/team-share.d.ts +2 -2
- package/src/components/icons/team-share.js +1 -1
- package/src/components/icons/theme.d.ts +2 -2
- package/src/components/icons/theme.js +1 -1
- package/src/components/icons/tool-panel.d.ts +2 -2
- package/src/components/icons/tool-panel.js +1 -1
- package/src/components/icons/track-changes.d.ts +2 -2
- package/src/components/icons/track-changes.js +1 -1
- package/src/components/icons/triangle-down.d.ts +2 -2
- package/src/components/icons/triangle-down.js +1 -1
- package/src/components/icons/triangle-up.d.ts +2 -2
- package/src/components/icons/triangle-up.js +1 -1
- package/src/components/icons/unchecked.d.ts +2 -2
- package/src/components/icons/unchecked.js +1 -1
- package/src/components/icons/underline.d.ts +2 -2
- package/src/components/icons/underline.js +1 -1
- package/src/components/icons/undo.d.ts +2 -2
- package/src/components/icons/undo.js +1 -1
- package/src/components/icons/updated-row.d.ts +2 -2
- package/src/components/icons/updated-row.js +1 -1
- package/src/components/icons/upload.d.ts +2 -2
- package/src/components/icons/upload.js +1 -1
- package/src/components/icons/user-filter.d.ts +2 -2
- package/src/components/icons/user-filter.js +1 -1
- package/src/components/icons/visibility-off.d.ts +2 -2
- package/src/components/icons/visibility-off.js +1 -1
- package/src/components/icons/visibility.d.ts +2 -2
- package/src/components/icons/visibility.js +1 -1
- package/src/components/icons/warning.d.ts +2 -2
- package/src/components/icons/warning.js +1 -1
- package/src/components/utils/useContainerScrollObserver/index.js +1 -2
- package/src/components/utils/useDraggable.d.ts +1 -1
- package/src/components/utils/useDraggable.js +2 -3
- package/src/components/utils/useLatest.d.ts +1 -1
- package/src/components/utils/useProperty.d.ts +1 -1
- package/src/components/utils/useSelectionRange.js +1 -1
- package/src/env.d.ts +1 -1
- package/src/env.js +3 -3
- package/src/layout-manager/src/LMEmitter.d.ts +25 -0
- package/src/layout-manager/src/LMEmitter.js +59 -0
- package/src/layout-manager/src/LMLogger.d.ts +20 -0
- package/src/layout-manager/src/LMLogger.js +66 -0
- package/src/layout-manager/src/LayoutManagerModel.d.ts +111 -0
- package/src/layout-manager/src/index.d.ts +75 -0
- package/src/layout-manager/src/index.js +1046 -0
- package/src/layout-manager/src/isLayoutEqual.d.ts +4 -0
- package/src/layout-manager/src/isLayoutEqual.js +32 -0
- package/src/layout-manager/src/isPivotLayoutModel.d.ts +2 -0
- package/src/layout-manager/src/isPivotLayoutModel.js +7 -0
- package/src/layout-manager/src/normalizeLayoutModel.d.ts +12 -0
- package/src/layout-manager/src/normalizeLayoutModel.js +158 -0
- package/src/layout-manager/src/simplifyLayoutModel.d.ts +4 -0
- package/src/layout-manager/src/simplifyLayoutModel.js +88 -0
- package/src/layout-manager/src/sortColumnIdsByOrder.d.ts +7 -0
- package/src/layout-manager/src/sortColumnIdsByOrder.js +89 -0
- package/src/metamodel/adaptable.metamodel.d.ts +428 -574
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +5 -4
- package/src/migration/VersionUpgrade17.js +56 -50
- package/src/migration/VersionUpgrade20.d.ts +7 -0
- package/src/migration/VersionUpgrade20.js +134 -0
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.d.ts +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -2
- package/src/parser/src/predicate/types.d.ts +11 -1
- package/src/parser/src/types.d.ts +6 -2
- package/src/parser/src/types.js +1 -1
- package/src/renderReactRoot.d.ts +3 -3
- package/src/types.d.ts +32 -31
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableOptions/ActionRowOptions.d.ts +0 -175
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +0 -311
- package/src/AdaptableOptions/GridFilterOptions.d.ts +0 -26
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -19
- package/src/Api/ActionRowApi.d.ts +0 -24
- package/src/Api/Events/ActionRowSubmitted.d.ts +0 -54
- package/src/Api/Events/AdaptableSearchState.d.ts +0 -22
- package/src/Api/Events/BaseEventInfo.d.ts +0 -18
- package/src/Api/Events/GridDataChanged.d.ts +0 -26
- package/src/Api/Implementation/ActionRowApiImpl.d.ts +0 -12
- package/src/Api/Internal/ActionRowInternalApi.d.ts +0 -29
- package/src/Api/Internal/ActionRowInternalApi.js +0 -285
- package/src/PredefinedConfig/GridState.d.ts +0 -23
- package/src/PredefinedConfig/SystemState.d.ts +0 -110
- package/src/Redux/ActionsReducers/GridRedux.d.ts +0 -224
- package/src/Redux/ActionsReducers/GridRedux.js +0 -433
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +0 -330
- package/src/Redux/ActionsReducers/SystemRedux.js +0 -787
- package/src/Redux/DeadRedux.d.ts +0 -27
- package/src/Redux/DeadRedux.js +0 -85
- package/src/Strategy/Interface/IExportModule.d.ts +0 -6
- package/src/Strategy/Interface/IShortcutModule.js +0 -2
- package/src/Strategy/Utilities/getExpressionViewItems.d.ts +0 -4
- package/src/Strategy/Utilities/getObjectTagsViewItems.d.ts +0 -4
- package/src/Strategy/Utilities/getRuleViewItems.js +0 -15
- package/src/Strategy/Utilities/getScopeViewItems.d.ts +0 -3
- package/src/Utilities/Constants/ConfigConstants.d.ts +0 -10
- package/src/Utilities/Constants/ConfigConstants.js +0 -14
- package/src/Utilities/Constants/FilterConstants.d.ts +0 -10
- package/src/Utilities/Constants/FilterConstants.js +0 -11
- package/src/Utilities/Services/RowEditService.js +0 -39
- package/src/Utilities/divideBy100.d.ts +0 -1
- package/src/Utilities/divideBy100.js +0 -34
- package/src/Utilities/times100.d.ts +0 -1
- package/src/Utilities/times100.js +0 -27
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.d.ts +0 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +0 -35
- package/src/View/Components/FilterForm/FilterForm.d.ts +0 -18
- package/src/View/Components/FilterForm/FilterForm.js +0 -298
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +0 -7
- package/src/View/Components/FilterForm/QuickFilterForm.js +0 -255
- package/src/View/Components/FilterForm/QuickFilterValues.d.ts +0 -19
- package/src/View/Components/FilterForm/QuickFilterValues.js +0 -201
- package/src/View/Components/Panels/FilterFormPanel.d.ts +0 -22
- package/src/View/Components/Panels/FilterFormPanel.js +0 -41
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.d.ts +0 -8
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +0 -27
- package/src/View/Components/PermittedValuesSelector/index.d.ts +0 -1
- package/src/View/Components/PermittedValuesSelector/index.js +0 -5
- package/src/View/Export/ExportSelector.d.ts +0 -4
- package/src/View/Export/ExportSelector.js +0 -75
- package/src/View/Export/ExportTablePopup.d.ts +0 -3
- package/src/View/Export/ExportTablePopup.js +0 -61
- package/src/View/Export/ReportExportDropdown.js +0 -39
- package/src/View/Export/constants.d.ts +0 -2
- package/src/View/Export/constants.js +0 -5
- package/src/View/Layout/SaveLayoutButton.d.ts +0 -2
- package/src/View/Layout/SaveLayoutButton.js +0 -29
- package/src/agGrid/BadgeRenderer.d.ts +0 -4
- package/src/agGrid/ColumnSetupInfo.d.ts +0 -8
- package/src/agGrid/PercentBarRenderer.d.ts +0 -4
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +0 -16
- package/src/agGrid/attachAddaptableColumnTypes.js +0 -23
- package/src/components/Datepicker/Caption.d.ts +0 -7
- package/src/components/Datepicker/Caption.js +0 -47
- package/src/components/Datepicker/CaptionLabel.d.ts +0 -8
- package/src/components/Datepicker/CaptionLabel.js +0 -25
- /package/src/AdaptableOptions/{ActionRowOptions.js → FilterOptions.js} +0 -0
- /package/src/AdaptableOptions/{AdaptableFrameworkComponent.js → RowFormOptions.js} +0 -0
- /package/src/{AdaptableOptions/ColumnFilterOptions.js → Api/Events/RowChanged.js} +0 -0
- /package/src/{AdaptableOptions/GridFilterOptions.js → Api/Events/RowFormSubmitted.js} +0 -0
- /package/src/{AdaptableOptions/GroupingOptions.js → Api/FilterApi.js} +0 -0
- /package/src/Api/{ActionRowApi.js → RowFormApi.js} +0 -0
- /package/src/{Api/Events/ActionRowSubmitted.js → PredefinedConfig/Common/AdaptableColumnContext.js} +0 -0
- /package/src/{Api/Events/AdaptableSearchState.js → PredefinedConfig/Common/AdaptableSortState.js} +0 -0
- /package/src/{agGrid → PredefinedConfig/Common}/ColumnSetupInfo.js +0 -0
- /package/src/{Api/Events/BaseEventInfo.js → PredefinedConfig/Common/RowDataChangedInfo.js} +0 -0
- /package/src/{Api/Events/GridDataChanged.js → Strategy/Interface/ICellDataChangeListenerModule.js} +0 -0
- /package/src/{PredefinedConfig/GridState.js → Strategy/Interface/IKeyDownListenerModule.js} +0 -0
- /package/src/{Strategy/Utilities → Utilities}/getScopeViewItems.js +0 -0
- /package/src/{agGrid → Utilities}/sortColumnStateForVisibleColumns.d.ts +0 -0
- /package/src/{agGrid → Utilities}/sortColumnStateForVisibleColumns.js +0 -0
- /package/src/{Strategy/Utilities → Utilities}/updateSingleToMultiplePredicates.d.ts +0 -0
- /package/src/{PredefinedConfig/SystemState.js → agGrid/AdaptableFrameworkComponent.js} +0 -0
- /package/src/{Strategy/Interface/IExportModule.js → layout-manager/src/LayoutManagerModel.js} +0 -0
|
@@ -4,7 +4,7 @@ exports.AdaptableAgGrid = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
|
|
6
6
|
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
7
|
-
const
|
|
7
|
+
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
8
8
|
const AdaptableLogger_1 = require("./AdaptableLogger");
|
|
9
9
|
const DocumentationLinkConstants_1 = require("../Utilities/Constants/DocumentationLinkConstants");
|
|
10
10
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
@@ -17,7 +17,7 @@ const DataService_1 = require("../Utilities/Services/DataService");
|
|
|
17
17
|
const AdaptableStore_1 = require("../Redux/Store/AdaptableStore");
|
|
18
18
|
const AdaptableApiImpl_1 = require("../Api/Implementation/AdaptableApiImpl");
|
|
19
19
|
const Fdc3Service_1 = require("../Utilities/Services/Fdc3Service");
|
|
20
|
-
const
|
|
20
|
+
const AnnotationsService_1 = require("../Utilities/Services/AnnotationsService");
|
|
21
21
|
const ChartingService_1 = require("../Utilities/Services/ChartingService");
|
|
22
22
|
const ThemeService_1 = require("../Utilities/Services/ThemeService");
|
|
23
23
|
const ValidationService_1 = require("../Utilities/Services/ValidationService");
|
|
@@ -72,7 +72,6 @@ const uuid_1 = require("../components/utils/uuid");
|
|
|
72
72
|
const UIHelper_1 = tslib_1.__importDefault(require("../View/UIHelper"));
|
|
73
73
|
const AdaptableToolPanel_1 = require("../View/Components/ToolPanel/AdaptableToolPanel");
|
|
74
74
|
const StatusBarState_1 = require("../PredefinedConfig/StatusBarState");
|
|
75
|
-
const createAgStatusPanelComponent_1 = require("./createAgStatusPanelComponent");
|
|
76
75
|
const AdaptableStatusBar_1 = require("../View/StatusBar/AdaptableStatusBar");
|
|
77
76
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
78
77
|
const AgGridMenuAdapter_1 = require("./AgGridMenuAdapter");
|
|
@@ -81,46 +80,33 @@ const renderReactRoot_1 = require("../renderReactRoot");
|
|
|
81
80
|
const AgGridOptionsService_1 = require("./AgGridOptionsService");
|
|
82
81
|
const DateHelper_1 = require("../Utilities/Helpers/DateHelper");
|
|
83
82
|
const AgGridColumnAdapter_1 = require("./AgGridColumnAdapter");
|
|
84
|
-
const uniqBy_1 = tslib_1.__importDefault(require("lodash/uniqBy"));
|
|
85
83
|
const getScrollbarSize_1 = tslib_1.__importDefault(require("../Utilities/getScrollbarSize"));
|
|
86
84
|
const AggregationColumns_1 = require("../PredefinedConfig/Common/AggregationColumns");
|
|
87
|
-
const
|
|
88
|
-
const RowEditService_1 = require("../Utilities/Services/RowEditService");
|
|
89
|
-
const weightedAverage_1 = require("./weightedAverage");
|
|
85
|
+
const RowFormService_1 = require("../Utilities/Services/RowFormService");
|
|
90
86
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
91
|
-
const ObjectFactory_1 = tslib_1.__importStar(require("../Utilities/ObjectFactory"));
|
|
92
87
|
const EnvVars_1 = require("../EnvVars");
|
|
93
88
|
const AdaptableUpgradeHelper_1 = require("../migration/AdaptableUpgradeHelper");
|
|
94
89
|
const Modal_1 = require("../components/Modal");
|
|
95
90
|
const AdaptableLoadingScreen_1 = require("../View/Components/Popups/AdaptableLoadingScreen");
|
|
96
91
|
const react_1 = require("react");
|
|
97
|
-
const
|
|
98
|
-
const
|
|
92
|
+
const createAgStatusPanelComponent_1 = require("../Utilities/createAgStatusPanelComponent");
|
|
93
|
+
const weightedAverage_1 = require("../Utilities/weightedAverage");
|
|
99
94
|
const RowSummary_1 = require("../PredefinedConfig/Common/RowSummary");
|
|
100
95
|
const FlashingCellService_1 = require("../Utilities/Services/FlashingCellService");
|
|
101
|
-
const
|
|
96
|
+
const AgGridExportAdapter_1 = require("./AgGridExportAdapter");
|
|
97
|
+
const LayoutHelpers_1 = require("../Api/Implementation/LayoutHelpers");
|
|
98
|
+
const src_1 = require("../layout-manager/src");
|
|
99
|
+
const isPivotLayoutModel_1 = require("../layout-manager/src/isPivotLayoutModel");
|
|
100
|
+
const AdaptableColumn_1 = require("../PredefinedConfig/Common/AdaptableColumn");
|
|
101
|
+
const agGridDataTypeDefinitions_1 = require("./agGridDataTypeDefinitions");
|
|
102
|
+
const LocalEventService_Prototype = ag_grid_enterprise_1.LocalEventService.prototype;
|
|
102
103
|
const LocalEventService_dispatchEvent = LocalEventService_Prototype.dispatchEvent;
|
|
103
|
-
const GridOptionsService_updateGridOptions = core_1.GridOptionsService.prototype.updateGridOptions;
|
|
104
|
-
const EventService_Prototype = core_1.EventService.prototype;
|
|
105
|
-
const EventService_wireBeans = EventService_Prototype.wireBeans;
|
|
106
|
-
// AG GRID obfuscates its internals, this is (currently) the best way to get hold of its internal services
|
|
107
|
-
const DANGER_AG_GRID_BEANS_MAP = {};
|
|
108
|
-
EventService_Prototype.wireBeans = function (beans) {
|
|
109
|
-
var _a;
|
|
110
|
-
EventService_wireBeans.apply(this, arguments);
|
|
111
|
-
const gridId = (_a = beans === null || beans === void 0 ? void 0 : beans.context) === null || _a === void 0 ? void 0 : _a.getGridId();
|
|
112
|
-
if (!gridId) {
|
|
113
|
-
console.error('CRITICAL: No gridId found in beans, this should never happen!');
|
|
114
|
-
}
|
|
115
|
-
DANGER_AG_GRID_BEANS_MAP[gridId] = beans;
|
|
116
|
-
};
|
|
117
104
|
LocalEventService_Prototype.dispatchEvent = function (event) {
|
|
118
105
|
LocalEventService_dispatchEvent.apply(this, arguments);
|
|
119
106
|
if (event.type === 'cellChanged' || event.type === 'dataChanged') {
|
|
120
107
|
const eventRowNode = event.node;
|
|
121
108
|
const extractGridApiFromRowNode = (rowNode) => {
|
|
122
|
-
|
|
123
|
-
const rowNodeApi = (_a = rowNode === null || rowNode === void 0 ? void 0 : rowNode.beans) === null || _a === void 0 ? void 0 : _a.gridApi;
|
|
109
|
+
const rowNodeApi = rowNode?.beans?.gridApi;
|
|
124
110
|
if (!rowNodeApi) {
|
|
125
111
|
AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`No GridAPI found in passed RowNode, this should never happen!`, rowNode);
|
|
126
112
|
}
|
|
@@ -130,8 +116,7 @@ LocalEventService_Prototype.dispatchEvent = function (event) {
|
|
|
130
116
|
// as this fn is shared by all instances
|
|
131
117
|
if (eventRowNode) {
|
|
132
118
|
AdaptableAgGrid.forEachAdaptable((adaptable) => {
|
|
133
|
-
|
|
134
|
-
if (extractGridApiFromRowNode(eventRowNode) !== ((_a = adaptable.agGridAdapter) === null || _a === void 0 ? void 0 : _a.getAgGridApi(true))) {
|
|
119
|
+
if (extractGridApiFromRowNode(eventRowNode) !== adaptable.agGridAdapter?.getAgGridApi(true)) {
|
|
135
120
|
// the event is coming from another aggrid instance
|
|
136
121
|
// so IGNORE IT
|
|
137
122
|
return;
|
|
@@ -149,19 +134,15 @@ LocalEventService_Prototype.dispatchEvent = function (event) {
|
|
|
149
134
|
const adaptableInstances = {};
|
|
150
135
|
const publishTimestamp = Number(EnvVars_1.ADAPTABLE_PUBLISH_TIMESTAMP);
|
|
151
136
|
class AdaptableAgGrid {
|
|
152
|
-
constructor() {
|
|
137
|
+
constructor(config) {
|
|
153
138
|
/**
|
|
154
139
|
* once layouts are properly handled with the new aggrid methods & events
|
|
155
140
|
* we can remove this hack
|
|
156
141
|
*/
|
|
157
142
|
this.previousAgGridLayoutState = '';
|
|
143
|
+
this.filteredOutPrimaryKeys = new Set();
|
|
158
144
|
this.columnMinMaxValuesCache = {};
|
|
159
145
|
this.renderReactRoot = (node, container) => (0, renderReactRoot_1.renderReactRoot)(node, container);
|
|
160
|
-
/**
|
|
161
|
-
* do NOT mutate this array reference, this is passed only initially to AG Grid and we can only change it's internal state
|
|
162
|
-
*/
|
|
163
|
-
this.DANGER_excelStyles = [];
|
|
164
|
-
this.originalExcelStyles = [];
|
|
165
146
|
/**
|
|
166
147
|
* Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
|
|
167
148
|
*/
|
|
@@ -193,9 +174,10 @@ class AdaptableAgGrid {
|
|
|
193
174
|
this.lifecycleState = 'initial';
|
|
194
175
|
this.emitter = new Emitter_1.default();
|
|
195
176
|
this.agGridOptionsService = new AgGridOptionsService_1.AgGridOptionsService(this);
|
|
196
|
-
this.agGridAdapter = new AgGridAdapter_1.AgGridAdapter(this);
|
|
177
|
+
this.agGridAdapter = new AgGridAdapter_1.AgGridAdapter(this, config);
|
|
197
178
|
this.agGridMenuAdapter = new AgGridMenuAdapter_1.AgGridMenuAdapter(this);
|
|
198
179
|
this.agGridColumnAdapter = new AgGridColumnAdapter_1.AgGridColumnAdapter(this);
|
|
180
|
+
this.agGridExportAdapter = new AgGridExportAdapter_1.AgGridExportAdapter(this);
|
|
199
181
|
this.DataService = new DataService_1.DataService(this);
|
|
200
182
|
}
|
|
201
183
|
static forEachAdaptable(fn) {
|
|
@@ -261,17 +243,20 @@ class AdaptableAgGrid {
|
|
|
261
243
|
};
|
|
262
244
|
if (promise && promise.then) {
|
|
263
245
|
return promise.then(() => {
|
|
264
|
-
const adaptableInstance = new AdaptableAgGrid(
|
|
246
|
+
const adaptableInstance = new AdaptableAgGrid({
|
|
247
|
+
getAgGridColumnApiModuleReference: config.getAgGridColumnApiModuleReference,
|
|
248
|
+
});
|
|
265
249
|
return doInit(adaptableInstance);
|
|
266
250
|
});
|
|
267
251
|
}
|
|
268
252
|
else {
|
|
269
|
-
const adaptableInstance = new AdaptableAgGrid(
|
|
253
|
+
const adaptableInstance = new AdaptableAgGrid({
|
|
254
|
+
getAgGridColumnApiModuleReference: config.getAgGridColumnApiModuleReference,
|
|
255
|
+
});
|
|
270
256
|
return doInit(adaptableInstance);
|
|
271
257
|
}
|
|
272
258
|
}
|
|
273
259
|
async _initAdaptableAgGrid(config) {
|
|
274
|
-
var _a, _b;
|
|
275
260
|
// Phase 1: Preprocess Adaptable Options
|
|
276
261
|
this._isDetailGrid = config.isDetailGrid === true;
|
|
277
262
|
this._isDetailGridForIndex = config.isDetailGridForRowIndex;
|
|
@@ -280,7 +265,7 @@ class AdaptableAgGrid {
|
|
|
280
265
|
if (StringExtensions_1.default.IsNullOrEmptyOrWhiteSpace(this._rawAdaptableOptions.adaptableId)) {
|
|
281
266
|
this._rawAdaptableOptions.adaptableId = `adaptable_id_${Date.now()}`;
|
|
282
267
|
}
|
|
283
|
-
this.logger =
|
|
268
|
+
this.logger = this.logger ?? new AdaptableLogger_1.AdaptableLogger(this._rawAdaptableOptions.adaptableId);
|
|
284
269
|
const perfInitAdaptableAgGrid = this.logger.beginPerf(`Adaptable._initAdaptableAgGrid()`);
|
|
285
270
|
AdaptableAgGrid.collectInstance(this, this._rawAdaptableOptions.adaptableId);
|
|
286
271
|
this.variant = config.variant;
|
|
@@ -289,10 +274,15 @@ class AdaptableAgGrid {
|
|
|
289
274
|
this.hasAutogeneratedPrimaryKey = !!this._rawAdaptableOptions.autogeneratePrimaryKey;
|
|
290
275
|
this.adaptableOptions = (0, DefaultAdaptableOptions_1.applyDefaultAdaptableOptions)(this._rawAdaptableOptions);
|
|
291
276
|
this.adaptableOptions = this.normalizeAdaptableOptions(this.adaptableOptions);
|
|
292
|
-
const { showLoadingScreen, loadingScreenDelay, loadingScreenText, loadingScreenTitle } = this.adaptableOptions.userInterfaceOptions;
|
|
277
|
+
const { showLoadingScreen, loadingScreenDelay, loadingScreenText, loadingScreenTitle } = this.adaptableOptions.userInterfaceOptions.loadingScreenOptions;
|
|
293
278
|
if (showLoadingScreen) {
|
|
294
279
|
this.logger.info(`Show Loading Screen`);
|
|
295
|
-
|
|
280
|
+
// it's important to use ensureLoadingScreenPortalElement
|
|
281
|
+
// and not ensurePortalElement, because multiple adaptable instances share the same portal element
|
|
282
|
+
// so when displaying the second one, the react root associated to the portal element
|
|
283
|
+
// seems to be somewhat shared via the html element, so the portal element of the first one is destroyed
|
|
284
|
+
// resulting in the settings popup not being displayed anymore
|
|
285
|
+
const portalElement = (0, Modal_1.ensureLoadingScreenPortalElement)();
|
|
296
286
|
if (portalElement) {
|
|
297
287
|
this.unmountLoadingScreen = this.renderReactRoot((0, react_1.createElement)(AdaptableLoadingScreen_1.AdaptableLoadingScreen, {
|
|
298
288
|
showLoadingScreen,
|
|
@@ -327,7 +317,7 @@ class AdaptableAgGrid {
|
|
|
327
317
|
/**
|
|
328
318
|
* This method is called after the store is loaded;
|
|
329
319
|
* it allows to modify the state before it is used by the application
|
|
330
|
-
* e.g.
|
|
320
|
+
* e.g. migrating deprecated state, etc.
|
|
331
321
|
*/
|
|
332
322
|
postLoadHook: (state) => {
|
|
333
323
|
if (this.adaptableOptions.stateOptions.autoMigrateState) {
|
|
@@ -357,10 +347,20 @@ class AdaptableAgGrid {
|
|
|
357
347
|
this.lifecycleState = 'setupAgGrid';
|
|
358
348
|
const gridOptions = config.gridOptions;
|
|
359
349
|
// Needed here because special column defs are required for deriving the adaptable column state
|
|
360
|
-
const columnDefs = this.getColumnDefinitionsInclSpecialColumns(gridOptions.columnDefs || []);
|
|
350
|
+
const columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns(gridOptions.columnDefs || []);
|
|
361
351
|
gridOptions.columnDefs = columnDefs;
|
|
362
352
|
this.setInitialGridOptions(gridOptions, config.variant);
|
|
363
|
-
|
|
353
|
+
const { gridState: initialGridState, layoutModel } = this.mapAdaptableStateToAgGridState(this.adaptableStore.TheStore.getState(), gridOptions.columnDefs, { isTree: !!gridOptions.treeData });
|
|
354
|
+
gridOptions.initialState = initialGridState;
|
|
355
|
+
if (layoutModel) {
|
|
356
|
+
if ((0, isPivotLayoutModel_1.isPivotLayoutModel)(layoutModel)) {
|
|
357
|
+
gridOptions.pivotDefaultExpanded = layoutModel.PivotExpandLevel;
|
|
358
|
+
}
|
|
359
|
+
else {
|
|
360
|
+
gridOptions.groupDisplayType =
|
|
361
|
+
layoutModel.RowGroupDisplayType === 'multi' ? 'multipleColumns' : 'singleColumn';
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
364
|
this.lifecycleState = 'initAgGrid';
|
|
365
365
|
this.agGridAdapter.initialGridOptions = gridOptions;
|
|
366
366
|
const perfInitAgGrid = this.logger.beginPerf(`initAgGrid()`);
|
|
@@ -372,14 +372,40 @@ class AdaptableAgGrid {
|
|
|
372
372
|
this.logger.consoleError(`Adaptable failed to initialize AG Grid!`);
|
|
373
373
|
return Promise.reject('Adaptable failed to initialize AG Grid!');
|
|
374
374
|
}
|
|
375
|
+
this.layoutManager = new src_1.LayoutManager({
|
|
376
|
+
gridApi: agGridApi,
|
|
377
|
+
debugId: this.adaptableOptions.adaptableId,
|
|
378
|
+
});
|
|
379
|
+
this.layoutManager.silentSetCurrentLayout(layoutModel, {
|
|
380
|
+
normalize: true,
|
|
381
|
+
});
|
|
382
|
+
// this shouldn't be needed
|
|
383
|
+
// but AG Grid has a bug, and in pivot layout,
|
|
384
|
+
// even if we provide an initial AG Grid state with
|
|
385
|
+
// the aggregations in the correct order,
|
|
386
|
+
// they will end up in the wrong order
|
|
387
|
+
// so we need to force the layout to be applied again
|
|
388
|
+
if ((0, isPivotLayoutModel_1.isPivotLayoutModel)(layoutModel)) {
|
|
389
|
+
this.layoutManager.setLayout(layoutModel, {
|
|
390
|
+
force: true,
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
this.layoutManager.onChange((layoutModel) => {
|
|
394
|
+
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
395
|
+
const newLayoutObject = (0, LayoutHelpers_1.layoutModelToLayoutState)(layoutModel, currentLayout);
|
|
396
|
+
this.onLayoutChange(newLayoutObject);
|
|
397
|
+
});
|
|
398
|
+
this.layoutManager.onColumnDefsChanged(() => {
|
|
399
|
+
this.updateColumnModelAndRefreshGrid();
|
|
400
|
+
});
|
|
375
401
|
this.logger.info(`Hide Loading Screen`);
|
|
376
|
-
|
|
402
|
+
this.unmountLoadingScreen?.();
|
|
377
403
|
perfInitAgGrid.end();
|
|
378
404
|
// we need to intercept several AG Grid Api methods and trigger Adaptale state changes
|
|
379
|
-
this.monkeyPatchingGridOptionsUpdates(agGridApi);
|
|
380
405
|
this.agGridAdapter.setAgGridApi(agGridApi);
|
|
406
|
+
this.agGridAdapter.monkeyPatchingGridOptionsUpdates(agGridApi);
|
|
381
407
|
this.lifecycleState = 'agGridReady';
|
|
382
|
-
this.logger.info(`Registered AG Grid modules: `, this.agGridAdapter.
|
|
408
|
+
this.logger.info(`Registered AG Grid modules: `, this.agGridAdapter.getAgGridRegisteredModuleNames().sort());
|
|
383
409
|
/**
|
|
384
410
|
* At this point AG Grid is initialized!
|
|
385
411
|
*/
|
|
@@ -389,17 +415,17 @@ class AdaptableAgGrid {
|
|
|
389
415
|
this.lifecycleState = 'available';
|
|
390
416
|
this.api.themeApi.applyCurrentTheme();
|
|
391
417
|
this.validatePrimaryKey();
|
|
392
|
-
this.embedColumnMenu = this.agGridAdapter.isModulePresent(core_1.ModuleNames.MenuModule);
|
|
393
|
-
this.api.internalApi.setTreeMode(!!this.agGridAdapter.getAgGridApi().getGridOption('treeData'));
|
|
394
418
|
// TODO AFL MIG: we could just patch the defautl Layout on init? instead
|
|
395
419
|
this.checkShouldClearExistingFiltersOrSearches();
|
|
396
|
-
this.
|
|
420
|
+
this.applyFiltering();
|
|
397
421
|
this.addGridEventListeners();
|
|
398
422
|
this.temporaryAdaptableStateUpdates();
|
|
399
423
|
this.redrawBody();
|
|
400
424
|
this.refreshHeader();
|
|
401
425
|
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
402
|
-
|
|
426
|
+
(0, LayoutHelpers_1.checkForDuplicateColumns)(currentLayout);
|
|
427
|
+
this.layoutManager.silentSetCurrentLayout((0, LayoutHelpers_1.layoutStateToLayoutModel)(currentLayout));
|
|
428
|
+
if ((0, LayoutHelpers_1.isPivotLayout)(currentLayout)) {
|
|
403
429
|
// this is very very strange!
|
|
404
430
|
// for some projects, if the initial layout is pivot, the columnDefs of the pivot resutl columns are NOT derived correctly from the main colDefs
|
|
405
431
|
// doing the following line fixes the issue because it foces the pivot columns to be created again
|
|
@@ -407,12 +433,16 @@ class AdaptableAgGrid {
|
|
|
407
433
|
// but this proj needs the hack: /tests/pages/format-column/initial-pivot-layout-docs.page.tsx
|
|
408
434
|
this.agGridAdapter.setGridOption('pivotMode', false);
|
|
409
435
|
this.agGridAdapter.setGridOption('pivotMode', true);
|
|
436
|
+
// also quick search is not working initially, although the setupColumns is called correctly
|
|
437
|
+
// so we need to do this to make it work
|
|
438
|
+
// see test /tests/pages/quick-search/pivot-search.spec.ts
|
|
439
|
+
this.updateColumnModelAndRefreshGrid();
|
|
410
440
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
this.
|
|
441
|
+
else {
|
|
442
|
+
this.layoutManager.applyRowGroupValues((0, LayoutHelpers_1.layoutStateToLayoutModel)(currentLayout).RowGroupValues);
|
|
443
|
+
}
|
|
444
|
+
this.autoSizeLayoutIfNeeded();
|
|
445
|
+
this.ModuleService.createModuleUIItems();
|
|
416
446
|
const adaptableContainerElem = this.getAdaptableContainerElement();
|
|
417
447
|
if (adaptableContainerElem != null) {
|
|
418
448
|
adaptableContainerElem.innerHTML = '';
|
|
@@ -433,13 +463,12 @@ class AdaptableAgGrid {
|
|
|
433
463
|
this.lifecycleState = 'ready';
|
|
434
464
|
this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
|
|
435
465
|
setTimeout(() => {
|
|
436
|
-
var _a, _b;
|
|
437
466
|
// without the setTimeout, calling autoSizeAllColumns immediately in the onAdaptableReady
|
|
438
467
|
// does not work. (I prefer setTimeout to rAF, as raf is not running when you switch tabs)
|
|
439
468
|
//
|
|
440
469
|
// it also makes it possible to listen to CALCULATED_COLUMN_READY, DASHBOARD_READY, etc.
|
|
441
470
|
// in onAdaptableReady - without this those event listeners are not triggered
|
|
442
|
-
|
|
471
|
+
this.api?.eventApi?.emit('AdaptableReady', {
|
|
443
472
|
adaptableApi: this.api,
|
|
444
473
|
agGridApi: this.agGridAdapter.getAgGridApi(),
|
|
445
474
|
});
|
|
@@ -453,95 +482,70 @@ class AdaptableAgGrid {
|
|
|
453
482
|
return state;
|
|
454
483
|
}
|
|
455
484
|
normaliseLayoutState(state, gridOptions) {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
layoutState.CurrentLayout = defaultLayout.Name;
|
|
464
|
-
state.Layout = layoutState;
|
|
465
|
-
}
|
|
466
|
-
else {
|
|
467
|
-
const layoutState = state.Layout;
|
|
468
|
-
// ensure CurrentLayout is valid
|
|
469
|
-
if (!layoutState.CurrentLayout ||
|
|
470
|
-
!layoutState.Layouts.find((l) => l.Name === layoutState.CurrentLayout)) {
|
|
471
|
-
layoutState.CurrentLayout = (_b = (_a = layoutState.Layouts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.Name;
|
|
472
|
-
}
|
|
485
|
+
const layoutState = state.Layout;
|
|
486
|
+
// ensure that at least one Layout has been provided
|
|
487
|
+
if (!layoutState || !layoutState.Layouts?.length) {
|
|
488
|
+
this.logger
|
|
489
|
+
.consoleError(`You have not defined any Layout in your predefinedConfig.Layout.Layouts[] state!
|
|
490
|
+
|
|
491
|
+
You need to define at least one Layout!`);
|
|
473
492
|
}
|
|
474
|
-
//
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
if (hasActionRowButtons) {
|
|
479
|
-
const currentLayout = state.Layout.Layouts.find((l) => l.Name === state.Layout.CurrentLayout);
|
|
480
|
-
if (currentLayout && !currentLayout.Columns.includes(GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS)) {
|
|
481
|
-
currentLayout.Columns.push(GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS);
|
|
482
|
-
const columnPosition = (_e = (_d = this.adaptableOptions.actionRowOptions) === null || _d === void 0 ? void 0 : _d.actionRowButtonOptions) === null || _e === void 0 ? void 0 : _e.position;
|
|
483
|
-
currentLayout.PinnedColumnsMap = currentLayout.PinnedColumnsMap || {};
|
|
484
|
-
currentLayout.PinnedColumnsMap[GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS] =
|
|
485
|
-
columnPosition === 'pinnedRight' ? 'right' : 'left';
|
|
486
|
-
}
|
|
493
|
+
// ensure CurrentLayout is valid
|
|
494
|
+
if (!layoutState.CurrentLayout ||
|
|
495
|
+
!layoutState.Layouts.find((l) => l.Name === layoutState.CurrentLayout)) {
|
|
496
|
+
layoutState.CurrentLayout = layoutState.Layouts?.[0]?.Name;
|
|
487
497
|
}
|
|
488
498
|
/**
|
|
489
|
-
* Viewport mode does not support a few
|
|
490
|
-
*
|
|
491
|
-
* logic where layout is applied, it is easier and
|
|
492
|
-
* less error prone to just remove it.
|
|
499
|
+
* Viewport mode does not support a few AG Grid features which are contained in a Layout
|
|
500
|
+
* Accordingly we remove this when using this Row Model
|
|
493
501
|
*/
|
|
494
502
|
if (gridOptions.rowModelType === 'viewport') {
|
|
495
|
-
(
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
503
|
+
if (state.Layout.Layouts) {
|
|
504
|
+
state.Layout.Layouts = state.Layout.Layouts.filter((layout) => {
|
|
505
|
+
if ((0, LayoutHelpers_1.isPivotLayout)(layout)) {
|
|
506
|
+
return false;
|
|
507
|
+
}
|
|
508
|
+
if (layout.RowGroupedColumns) {
|
|
509
|
+
delete layout.RowGroupedColumns;
|
|
510
|
+
}
|
|
511
|
+
if (layout.TableAggregationColumns) {
|
|
512
|
+
delete layout.TableAggregationColumns;
|
|
513
|
+
}
|
|
514
|
+
return true;
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
if (state.Layout.Layouts) {
|
|
519
|
+
const normalizeOptions = {
|
|
520
|
+
isTree: !!gridOptions.treeData,
|
|
521
|
+
};
|
|
522
|
+
// it's very important that we do this here
|
|
523
|
+
// as the layout may not be fully specified in the predefinedConfig
|
|
524
|
+
// eg: might not include the generated row group columns in the column order
|
|
525
|
+
// but the normalization does this for us
|
|
526
|
+
state.Layout.Layouts = state.Layout.Layouts.map((layout) => (0, LayoutHelpers_1.normalizeLayout)(layout, normalizeOptions));
|
|
507
527
|
}
|
|
508
528
|
return state;
|
|
509
529
|
}
|
|
510
530
|
normaliseToolPanelState(state) {
|
|
511
|
-
|
|
512
|
-
if ((_a = state === null || state === void 0 ? void 0 : state.ToolPanel) === null || _a === void 0 ? void 0 : _a.ToolPanels) {
|
|
531
|
+
if (state?.ToolPanel?.ToolPanels) {
|
|
513
532
|
return state;
|
|
514
533
|
}
|
|
515
534
|
// no predefined config provided, we will display all the panels collapsed (custom & module)
|
|
516
535
|
const defaultToolPanels = [];
|
|
517
|
-
|
|
536
|
+
this.adaptableOptions.toolPanelOptions?.customToolPanels?.forEach((customToolPanel) => defaultToolPanels.push({ Name: customToolPanel.name }));
|
|
518
537
|
Types_1.ALL_TOOL_PANELS.forEach((moduleToolPanel) => defaultToolPanels.push({ Name: moduleToolPanel }));
|
|
519
538
|
const toolPanelState = state.ToolPanel || {};
|
|
520
539
|
toolPanelState.ToolPanels = defaultToolPanels;
|
|
521
540
|
state.ToolPanel = toolPanelState;
|
|
522
541
|
return state;
|
|
523
542
|
}
|
|
524
|
-
|
|
525
|
-
const isQuickFilterVisible = this.api.internalApi.getSystemState().IsQuickFilterVisible;
|
|
526
|
-
if (this.isQuickFilterAvailable()) {
|
|
527
|
-
if (isQuickFilterVisible) {
|
|
528
|
-
this.api.columnFilterApi.showQuickFilterBar();
|
|
529
|
-
}
|
|
530
|
-
else {
|
|
531
|
-
this.api.columnFilterApi.hideQuickFilterBar();
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
applyColumnFiltering() {
|
|
536
|
-
this.refreshQuickFilter();
|
|
537
|
-
this.applyGridFiltering();
|
|
538
|
-
this.agGridAdapter.updateColumnFilterActiveState();
|
|
539
|
-
}
|
|
540
|
-
applyGridFiltering() {
|
|
543
|
+
applyFiltering() {
|
|
541
544
|
this.agGridAdapter.getAgGridApi().onFilterChanged();
|
|
542
545
|
this._emit('AdapTableFiltersApplied');
|
|
543
546
|
this.refreshSelectedCellsState();
|
|
544
547
|
this.refreshSelectedRowsState();
|
|
548
|
+
this.agGridAdapter.updateColumnFilterActiveState();
|
|
545
549
|
}
|
|
546
550
|
// refreshAgGridWithAdaptableState() {
|
|
547
551
|
// this.refreshColDefs();
|
|
@@ -550,12 +554,8 @@ class AdaptableAgGrid {
|
|
|
550
554
|
// this.checkShouldClearExistingFiltersOrSearches();
|
|
551
555
|
// this.applyColumnFiltering();
|
|
552
556
|
// }
|
|
553
|
-
refreshColDefs(agGridColDefs) {
|
|
554
|
-
const freshColDefs = this.getColumnDefinitionsInclSpecialColumns(agGridColDefs);
|
|
555
|
-
this.agGridAdapter.setGridOption('columnDefs', freshColDefs);
|
|
556
|
-
}
|
|
557
557
|
showQuickFilter() {
|
|
558
|
-
const height = this.api.optionsApi.
|
|
558
|
+
const height = this.api.optionsApi.getFilterOptions().columnFilterOptions.quickFilterHeight;
|
|
559
559
|
this.agGridAdapter.getAgGridApi().setGridOption('floatingFiltersHeight', height);
|
|
560
560
|
}
|
|
561
561
|
hideQuickFilter() {
|
|
@@ -585,7 +585,11 @@ class AdaptableAgGrid {
|
|
|
585
585
|
*/
|
|
586
586
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'context', (original_context) => {
|
|
587
587
|
const userContext = original_context || {};
|
|
588
|
-
return
|
|
588
|
+
return {
|
|
589
|
+
...userContext,
|
|
590
|
+
__adaptable: this,
|
|
591
|
+
adaptableApi: this.api,
|
|
592
|
+
};
|
|
589
593
|
});
|
|
590
594
|
/**
|
|
591
595
|
* `gridId`
|
|
@@ -595,9 +599,16 @@ class AdaptableAgGrid {
|
|
|
595
599
|
if (this._isDetailGridForIndex != null) {
|
|
596
600
|
agGridId = `${agGridId}_detail-${this._isDetailGridForIndex}`;
|
|
597
601
|
}
|
|
598
|
-
this.
|
|
602
|
+
this.agGridAdapter.setAgGridId(agGridId);
|
|
599
603
|
return agGridId;
|
|
600
604
|
});
|
|
605
|
+
// FIXME AFL: handle both ThemingApi and legacy CSS
|
|
606
|
+
/**
|
|
607
|
+
* `theme`
|
|
608
|
+
*/
|
|
609
|
+
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'theme', (original_gridId) => {
|
|
610
|
+
return 'legacy';
|
|
611
|
+
});
|
|
601
612
|
/**
|
|
602
613
|
* `getRowId`
|
|
603
614
|
*/
|
|
@@ -623,20 +634,19 @@ class AdaptableAgGrid {
|
|
|
623
634
|
};
|
|
624
635
|
}
|
|
625
636
|
return (params) => {
|
|
626
|
-
|
|
627
|
-
if ((_a = params.data) === null || _a === void 0 ? void 0 : _a[primaryKey]) {
|
|
637
|
+
if (params.data?.[primaryKey]) {
|
|
628
638
|
const primaryKeyValue = params.data[primaryKey];
|
|
629
639
|
return typeof primaryKeyValue === 'number'
|
|
630
640
|
? `${primaryKeyValue}`
|
|
631
641
|
: params.data[primaryKey];
|
|
632
642
|
}
|
|
633
643
|
// might be a summary row
|
|
634
|
-
if (
|
|
644
|
+
if (params.data?.[RowSummary_1.ROW_SUMMARY_ROW_ID]) {
|
|
635
645
|
return params.data[RowSummary_1.ROW_SUMMARY_ROW_ID];
|
|
636
646
|
}
|
|
637
647
|
// AFL 2024.08.17 - no idea why is this here and when it's used
|
|
638
648
|
// might be a group row
|
|
639
|
-
const parentKeys =
|
|
649
|
+
const parentKeys = params.parentKeys ?? [];
|
|
640
650
|
const values = Object.values(params.data);
|
|
641
651
|
if (values.length) {
|
|
642
652
|
const id = [...parentKeys, values[0]].join('/');
|
|
@@ -688,9 +698,8 @@ class AdaptableAgGrid {
|
|
|
688
698
|
if (!this.isAvailable) {
|
|
689
699
|
return true;
|
|
690
700
|
}
|
|
691
|
-
const
|
|
692
|
-
const
|
|
693
|
-
const isGridFilterActive = StringExtensions_1.default.IsNotNullOrEmpty(this.api.gridFilterApi.getCurrentGridFilterExpression());
|
|
701
|
+
const isColumnFiltersActive = ArrayExtensions_1.default.IsNotNullOrEmpty(this.api.filterApi.columnFilterApi.getActiveColumnFilters());
|
|
702
|
+
const isGridFilterActive = StringExtensions_1.default.IsNotNullOrEmpty(this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression());
|
|
694
703
|
return (isColumnFiltersActive ||
|
|
695
704
|
isGridFilterActive ||
|
|
696
705
|
// it means that userPropertyValue will be called so we re-init that collection
|
|
@@ -701,39 +710,65 @@ class AdaptableAgGrid {
|
|
|
701
710
|
* `doesExternalFilterPass`
|
|
702
711
|
*/
|
|
703
712
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'doesExternalFilterPass', (original_doesExternalFilterPass) => {
|
|
713
|
+
const { filteredOutPrimaryKeys } = this;
|
|
714
|
+
filteredOutPrimaryKeys.clear();
|
|
704
715
|
return (node) => {
|
|
716
|
+
if (node.rowIndex === 0) {
|
|
717
|
+
filteredOutPrimaryKeys.clear();
|
|
718
|
+
}
|
|
705
719
|
if (!this.isAvailable) {
|
|
706
720
|
return true;
|
|
707
721
|
}
|
|
708
|
-
//
|
|
709
|
-
if
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
722
|
+
// Note: not sure we need this check as doubtful AG Grid ever passes in a Group Row node to filter...
|
|
723
|
+
// But if it does, then we might change this IF we allow Column filtering (but not Grid Filters) for Group nodes
|
|
724
|
+
if (this.isGroupRowNode(node)) {
|
|
725
|
+
return true;
|
|
726
|
+
}
|
|
727
|
+
// first assess if the Row is filterable - if not, then return true so it appears in Grid
|
|
728
|
+
const isRowFilterable = this.api.optionsApi.getFilterOptions().isRowFilterable;
|
|
729
|
+
if (typeof isRowFilterable === 'function') {
|
|
730
|
+
const rowFilterableContext = {
|
|
731
|
+
...this.api.internalApi.buildBaseContext(),
|
|
732
|
+
rowNode: node,
|
|
733
|
+
data: node.data,
|
|
734
|
+
};
|
|
735
|
+
if (!isRowFilterable(rowFilterableContext)) {
|
|
736
|
+
return true;
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
// get the Primary Key Value for the Row Node being evaluated
|
|
740
|
+
const primaryKey = this.getPrimaryKeyValueFromRowNode(node);
|
|
741
|
+
// next we assess a Grid Filter (if its running locally)
|
|
742
|
+
const currentGridFilterExpression = this.api.filterApi.gridFilterApi.getCurrentGridFilterExpression();
|
|
743
|
+
if (StringExtensions_1.default.IsNotNullOrEmpty(currentGridFilterExpression)) {
|
|
744
|
+
const evaluateGridFilterOnClient = this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('GridFilter', undefined, currentGridFilterExpression);
|
|
745
|
+
if (evaluateGridFilterOnClient) {
|
|
746
|
+
const isCurrentGridFilterValid = this.api.expressionApi.isValidBooleanExpression(currentGridFilterExpression, ModuleConstants_1.GridFilterModuleId, `Invalid Grid Filter '${currentGridFilterExpression}'`);
|
|
747
|
+
// Not sure about this - what should we do with an invalid Grid Filter?
|
|
748
|
+
// Here we essentially clear the Grid for invalid Grid Filter by returning false for each row
|
|
749
|
+
if (!isCurrentGridFilterValid) {
|
|
750
|
+
filteredOutPrimaryKeys.add(primaryKey);
|
|
751
|
+
return false;
|
|
752
|
+
}
|
|
753
|
+
const gridFilterEvaluationResult = this.api.internalApi
|
|
754
|
+
.getQueryLanguageService()
|
|
755
|
+
.evaluateBooleanExpression(currentGridFilterExpression, ModuleConstants_1.GridFilterModuleId, node);
|
|
756
|
+
if (!gridFilterEvaluationResult) {
|
|
757
|
+
filteredOutPrimaryKeys.add(primaryKey);
|
|
758
|
+
return false;
|
|
721
759
|
}
|
|
722
760
|
}
|
|
723
761
|
}
|
|
724
|
-
|
|
762
|
+
// finally we evaluate column filters
|
|
763
|
+
const columnFilters = this.api.filterApi.columnFilterApi.getActiveColumnFilters();
|
|
725
764
|
try {
|
|
726
765
|
if (columnFilters.length > 0) {
|
|
727
|
-
const isRowFiltrable = this.api.optionsApi.getColumnFilterOptions().isRowFilterable;
|
|
728
766
|
for (const columnFilter of columnFilters) {
|
|
729
|
-
const
|
|
730
|
-
if (
|
|
731
|
-
|
|
732
|
-
if (
|
|
733
|
-
|
|
734
|
-
return true;
|
|
735
|
-
}
|
|
736
|
-
if (!this.api.columnFilterApi.internalApi.evaluateColumnFilter(columnFilter, node)) {
|
|
767
|
+
const evaluateColumnFilterOnClient = this.api.expressionApi.internalApi.evaluatePredicatesInAdaptableQL('ColumnFilter', columnFilter, columnFilter.Predicates);
|
|
768
|
+
if (evaluateColumnFilterOnClient) {
|
|
769
|
+
const columnFilterEvaluationResult = this.api.filterApi.columnFilterApi.internalApi.evaluateColumnFilter(columnFilter, node);
|
|
770
|
+
if (!columnFilterEvaluationResult) {
|
|
771
|
+
filteredOutPrimaryKeys.add(primaryKey);
|
|
737
772
|
return false;
|
|
738
773
|
}
|
|
739
774
|
}
|
|
@@ -742,9 +777,16 @@ class AdaptableAgGrid {
|
|
|
742
777
|
}
|
|
743
778
|
catch (ex) {
|
|
744
779
|
this.logger.error(ex);
|
|
780
|
+
filteredOutPrimaryKeys.add(primaryKey);
|
|
745
781
|
return false;
|
|
746
782
|
}
|
|
747
|
-
|
|
783
|
+
const result = original_doesExternalFilterPass
|
|
784
|
+
? original_doesExternalFilterPass(node)
|
|
785
|
+
: true;
|
|
786
|
+
if (!result) {
|
|
787
|
+
filteredOutPrimaryKeys.add(primaryKey);
|
|
788
|
+
}
|
|
789
|
+
return result;
|
|
748
790
|
};
|
|
749
791
|
});
|
|
750
792
|
/**
|
|
@@ -764,59 +806,16 @@ class AdaptableAgGrid {
|
|
|
764
806
|
return this.agGridMenuAdapter.buildContextMenu(params, original_getContextMenuItems);
|
|
765
807
|
};
|
|
766
808
|
});
|
|
767
|
-
/**
|
|
768
|
-
* `initialGroupOrderComparator
|
|
769
|
-
*/
|
|
770
|
-
// Build the default group sort comparator - will get custom sort values (but not functions) in real time
|
|
771
|
-
// TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
|
|
772
|
-
if (this.getAgGridRowModelType(gridOptions) === 'clientSide' &&
|
|
773
|
-
this.adaptableOptions.groupingOptions.autoOrderGroupedColumns) {
|
|
774
|
-
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'initialGroupOrderComparator', (original_initialGroupOrderComparator) => {
|
|
775
|
-
if (original_initialGroupOrderComparator) {
|
|
776
|
-
return original_initialGroupOrderComparator;
|
|
777
|
-
}
|
|
778
|
-
return (params) => {
|
|
779
|
-
const { nodeA, nodeB } = params;
|
|
780
|
-
const firstGroupedColumnId = this.agGridAdapter.getFirstGroupedColumn();
|
|
781
|
-
if (firstGroupedColumnId) {
|
|
782
|
-
const definedColumnComparator = this.api.columnApi.internalApi.getActiveColumnComparator(firstGroupedColumnId, this.api.customSortApi.getCustomSortForColumn(firstGroupedColumnId), this.api.customSortApi.internalApi.getCustomSortComparer(firstGroupedColumnId));
|
|
783
|
-
if (definedColumnComparator) {
|
|
784
|
-
return definedColumnComparator(nodeA.key, nodeB.key);
|
|
785
|
-
}
|
|
786
|
-
const sortOder = this.api.layoutApi.getCurrentLayoutColumnSort(firstGroupedColumnId);
|
|
787
|
-
if (sortOder === 'Desc') {
|
|
788
|
-
return nodeA.key > nodeB.key ? -1 : 1;
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
// if no comparator available, just sort alphanumerically
|
|
792
|
-
if (nodeA.key == nodeB.key) {
|
|
793
|
-
return 0;
|
|
794
|
-
}
|
|
795
|
-
return nodeA.key < nodeB.key ? -1 : 1;
|
|
796
|
-
};
|
|
797
|
-
});
|
|
798
|
-
/**
|
|
799
|
-
* `autoSizeStrategy`
|
|
800
|
-
*
|
|
801
|
-
* This is needed here, even if we do auto sizing on FIRST_DATA_RENDERED.
|
|
802
|
-
* Sometimes FIRST_DATA_RENDERED is triggered too early and autoSizing doesn't work initially
|
|
803
|
-
* so we need this block
|
|
804
|
-
*/
|
|
805
|
-
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'autoSizeStrategy', (original_autoSizeStrategy) => {
|
|
806
|
-
return this.shouldAutoSizeLayout()
|
|
807
|
-
? {
|
|
808
|
-
type: 'fitCellContents',
|
|
809
|
-
}
|
|
810
|
-
: original_autoSizeStrategy;
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
809
|
/**
|
|
814
810
|
* `components`
|
|
815
811
|
*/
|
|
816
812
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'components', (original_components) => {
|
|
817
813
|
const AdaptableToolPanel = (0, AdaptableToolPanel_1.getAdaptableToolPanelAgGridComponent)(this);
|
|
818
814
|
const components = original_components || {};
|
|
819
|
-
const adaptableComponents =
|
|
815
|
+
const adaptableComponents = {
|
|
816
|
+
...components,
|
|
817
|
+
AdaptableToolPanel,
|
|
818
|
+
};
|
|
820
819
|
return adaptableComponents;
|
|
821
820
|
});
|
|
822
821
|
if (variant === 'react') {
|
|
@@ -832,7 +831,6 @@ class AdaptableAgGrid {
|
|
|
832
831
|
* `sidebar`
|
|
833
832
|
*/
|
|
834
833
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'sideBar', (original_sideBar) => {
|
|
835
|
-
var _a, _b;
|
|
836
834
|
if (!original_sideBar) {
|
|
837
835
|
// lucky us, no sideBar is defined, so we don't have to do anything
|
|
838
836
|
return original_sideBar;
|
|
@@ -855,7 +853,7 @@ class AdaptableAgGrid {
|
|
|
855
853
|
: toolPanelDef);
|
|
856
854
|
};
|
|
857
855
|
const isSideBarDefObject = (sidebarDef) => {
|
|
858
|
-
return Array.isArray(sidebarDef
|
|
856
|
+
return Array.isArray(sidebarDef?.toolPanels);
|
|
859
857
|
};
|
|
860
858
|
let result;
|
|
861
859
|
if (original_sideBar === true) {
|
|
@@ -895,45 +893,54 @@ class AdaptableAgGrid {
|
|
|
895
893
|
}
|
|
896
894
|
// if it's fully-fledged SideBarDef, process its tool panel definitions
|
|
897
895
|
else if (isSideBarDefObject(original_sideBar)) {
|
|
898
|
-
if (
|
|
896
|
+
if (original_sideBar.toolPanels?.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
|
|
899
897
|
toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID &&
|
|
900
898
|
!isAdaptableToolPanelHidden)) {
|
|
901
899
|
// if there is an Adaptable SideBarDef, don't touch it as it may contain user-defined properties
|
|
902
900
|
result = original_sideBar;
|
|
903
901
|
}
|
|
904
902
|
else {
|
|
905
|
-
result =
|
|
903
|
+
result = {
|
|
904
|
+
...original_sideBar,
|
|
905
|
+
toolPanels: mapToolPanelDefs(original_sideBar.toolPanels),
|
|
906
|
+
};
|
|
906
907
|
}
|
|
907
908
|
}
|
|
908
909
|
this.hasAdaptableToolPanel =
|
|
909
910
|
isSideBarDefObject(result) &&
|
|
910
|
-
|
|
911
|
-
toolPanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID)
|
|
911
|
+
result.toolPanels?.some((toolPanelDef) => typeof toolPanelDef !== 'string' &&
|
|
912
|
+
toolPanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID);
|
|
912
913
|
return result;
|
|
913
914
|
});
|
|
914
915
|
/**
|
|
915
916
|
* `statusBar`
|
|
916
917
|
*/
|
|
917
918
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
|
|
918
|
-
|
|
919
|
-
const statusPanels = (_b = ((_a = original_statusBar === null || original_statusBar === void 0 ? void 0 : original_statusBar.statusPanels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.map((statusPanel) => {
|
|
919
|
+
const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
|
|
920
920
|
if (statusPanel.statusPanel === StatusBarState_1.ADAPTABLE_STATUS_PANEL) {
|
|
921
921
|
this.adaptableStatusPanelKeys.push(statusPanel.key);
|
|
922
922
|
const context = {
|
|
923
923
|
Key: statusPanel.key,
|
|
924
924
|
};
|
|
925
|
-
return
|
|
925
|
+
return {
|
|
926
|
+
...statusPanel,
|
|
927
|
+
statusPanel: (0, createAgStatusPanelComponent_1.createAgStatusPanelComponent)(AdaptableStatusBar_1.AdaptableStatusBar, this, context),
|
|
928
|
+
};
|
|
926
929
|
}
|
|
927
930
|
return statusPanel;
|
|
928
931
|
});
|
|
929
|
-
return
|
|
932
|
+
return { ...original_statusBar, statusPanels };
|
|
930
933
|
});
|
|
931
934
|
/**
|
|
932
935
|
* `getRowStyle`
|
|
933
936
|
*/
|
|
934
937
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'getRowStyle', (original_getRowStyle) => {
|
|
935
938
|
return (params) => {
|
|
936
|
-
const result =
|
|
939
|
+
const result = {
|
|
940
|
+
...original_getRowStyle?.(params),
|
|
941
|
+
...this.api.gridApi.internalApi.getRowHighlightStyle(params),
|
|
942
|
+
...this.api.gridApi.internalApi.getAlertRowStyle(params),
|
|
943
|
+
};
|
|
937
944
|
return result;
|
|
938
945
|
};
|
|
939
946
|
});
|
|
@@ -954,15 +961,15 @@ class AdaptableAgGrid {
|
|
|
954
961
|
// we flatten it because 'original_getRowClass' might return a string[]
|
|
955
962
|
.flat()
|
|
956
963
|
.filter((x) => !!x);
|
|
957
|
-
return
|
|
964
|
+
return returnValue?.length ? returnValue : undefined;
|
|
958
965
|
};
|
|
959
966
|
});
|
|
960
967
|
/**
|
|
961
968
|
* `floatingFiltersHeight`
|
|
962
969
|
*/
|
|
963
970
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'floatingFiltersHeight', (original_floatingFiltersHeight) => {
|
|
964
|
-
if (this.api.layoutApi.
|
|
965
|
-
// if
|
|
971
|
+
if (this.api.layoutApi.isCurrentLayoutPivot()) {
|
|
972
|
+
// if Current Layout is Pivot, hide the floating filters from the beginning, otherwise we get an annoying flicker
|
|
966
973
|
return 0;
|
|
967
974
|
}
|
|
968
975
|
return original_floatingFiltersHeight;
|
|
@@ -971,21 +978,30 @@ class AdaptableAgGrid {
|
|
|
971
978
|
* `excelStyles`
|
|
972
979
|
*/
|
|
973
980
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'excelStyles', (original_excelStyles) => {
|
|
974
|
-
|
|
975
|
-
|
|
981
|
+
const excelStyles = original_excelStyles || [];
|
|
982
|
+
// see ##masterDetailHeader
|
|
983
|
+
excelStyles.push({
|
|
984
|
+
id: '_masterDetailHeader',
|
|
985
|
+
interior: {
|
|
986
|
+
color: '#aaaaaa',
|
|
987
|
+
pattern: 'Solid',
|
|
988
|
+
},
|
|
989
|
+
});
|
|
990
|
+
this.agGridExportAdapter.originalExcelStyles = excelStyles;
|
|
991
|
+
this.agGridExportAdapter.DANGER_excelStyles = this.agGridExportAdapter.originalExcelStyles;
|
|
976
992
|
// this array reference will be used for the entire AG Grid session
|
|
977
|
-
return this.DANGER_excelStyles;
|
|
993
|
+
return this.agGridExportAdapter.DANGER_excelStyles;
|
|
978
994
|
});
|
|
979
995
|
/**
|
|
980
996
|
* `processPivotResultColDef`
|
|
981
997
|
*/
|
|
982
998
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'processPivotResultColDef', (original_processPivotResultColDef) => {
|
|
983
999
|
return (colDef) => {
|
|
984
|
-
if (this.adaptableOptions.
|
|
1000
|
+
if (this.adaptableOptions.filterOptions.useAdaptableFiltering) {
|
|
985
1001
|
colDef.floatingFilter = false;
|
|
986
1002
|
colDef.filter = false;
|
|
987
1003
|
}
|
|
988
|
-
original_processPivotResultColDef
|
|
1004
|
+
original_processPivotResultColDef?.(colDef);
|
|
989
1005
|
};
|
|
990
1006
|
});
|
|
991
1007
|
/**
|
|
@@ -1001,80 +1017,34 @@ class AdaptableAgGrid {
|
|
|
1001
1017
|
*/
|
|
1002
1018
|
// this will have to go/be heavily extended with https://github.com/AdaptableTools/adaptable/issues/2230
|
|
1003
1019
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'columnTypes', (original_columnTypes) => {
|
|
1004
|
-
var _a;
|
|
1005
1020
|
const providedColumnTypes = original_columnTypes || {};
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1008
|
-
[
|
|
1009
|
-
[
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
abColDefObject: Object.assign({}, gridOptionsColumnTypes.abColDefObject),
|
|
1015
|
-
abColDefCustom: Object.assign({}, gridOptionsColumnTypes.abColDefCustom),
|
|
1016
|
-
abColDefStringArray: Object.assign({}, gridOptionsColumnTypes.abColDefStringArray),
|
|
1017
|
-
abColDefNumberArray: Object.assign({}, gridOptionsColumnTypes.abColDefNumberArray),
|
|
1018
|
-
abColDefTupleNumberArray: Object.assign({}, gridOptionsColumnTypes.abColDefTupleNumberArray),
|
|
1019
|
-
abColDefObjectNumberArray: Object.assign({}, gridOptionsColumnTypes.abColDefObjectNumberArray),
|
|
1020
|
-
});
|
|
1021
|
-
const customColumnTypes = (_a = this.api.columnApi.getColumnTypes()) !== null && _a !== void 0 ? _a : [];
|
|
1021
|
+
const adaptableColumnTypes = {
|
|
1022
|
+
[AdaptableColumn_1.CALCULATED_COLUMN_TYPE]: {},
|
|
1023
|
+
[AdaptableColumn_1.FREE_TEXT_COLUMN_TYPE]: {},
|
|
1024
|
+
[AdaptableColumn_1.ACTION_COLUMN_TYPE]: {},
|
|
1025
|
+
[AdaptableColumn_1.FDC3_COLUMN_TYPE]: {},
|
|
1026
|
+
};
|
|
1027
|
+
const patchedColumnTypes = Object.assign({}, providedColumnTypes, adaptableColumnTypes);
|
|
1028
|
+
const customColumnTypes = this.api.columnApi.getColumnTypes() ?? [];
|
|
1022
1029
|
for (const customColumnType of customColumnTypes) {
|
|
1023
1030
|
if (!patchedColumnTypes[customColumnType]) {
|
|
1024
1031
|
patchedColumnTypes[customColumnType] = {};
|
|
1025
1032
|
}
|
|
1026
1033
|
}
|
|
1027
|
-
const colTypesToEditors = (0, AgGridColumnAdapter_1.getEditorsForColumnTypes)(this.variant);
|
|
1028
|
-
// we used to patch here the column types
|
|
1029
|
-
// and have the editors for abColDefNumber and abColDefDate set here
|
|
1030
|
-
// but AG Grid seems to have a bug where if we have a custom editor
|
|
1031
|
-
// for a specific number column, it's applied to all abColDefNumber columns, because they
|
|
1032
|
-
// share the same column type
|
|
1033
|
-
// so we're now doing this logic in AgGridColumnAdaptapter.setupColumnCellEditor
|
|
1034
|
-
// and instead, here we're just assigning the editor to null
|
|
1035
|
-
// because if we don't assign to null, the default that AG Grid provides
|
|
1036
|
-
// will be used instead, and we don't want that for those column types
|
|
1037
|
-
Object.keys(colTypesToEditors).forEach((colType) => {
|
|
1038
|
-
if (patchedColumnTypes[colType].cellEditor == undefined) {
|
|
1039
|
-
patchedColumnTypes[colType].cellEditor = null; // colTypesToEditors[colType];
|
|
1040
|
-
// if you dont believe me, just put colTypesToEditors[colType] in the line above instead of the null value
|
|
1041
|
-
// and see the editing/percentage-editor.spec.ts test fail as it wont be using the correct editor
|
|
1042
|
-
}
|
|
1043
|
-
});
|
|
1044
1034
|
return patchedColumnTypes;
|
|
1045
1035
|
});
|
|
1046
1036
|
/**
|
|
1047
1037
|
* `dataTypeDefinitions`
|
|
1048
1038
|
*/
|
|
1049
1039
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'dataTypeDefinitions', () => {
|
|
1050
|
-
|
|
1051
|
-
const revertedDateTypeDefinitions = {
|
|
1052
|
-
date: {
|
|
1053
|
-
baseDataType: 'date',
|
|
1054
|
-
extendsDataType: 'date',
|
|
1055
|
-
valueParser: null,
|
|
1056
|
-
valueFormatter: null,
|
|
1057
|
-
suppressDefaultProperties: true,
|
|
1058
|
-
},
|
|
1059
|
-
dateString: {
|
|
1060
|
-
baseDataType: 'dateString',
|
|
1061
|
-
extendsDataType: 'dateString',
|
|
1062
|
-
valueParser: null,
|
|
1063
|
-
valueFormatter: null,
|
|
1064
|
-
suppressDefaultProperties: true,
|
|
1065
|
-
},
|
|
1066
|
-
};
|
|
1040
|
+
const revertedDateTypeDefinitions = agGridDataTypeDefinitions_1.agGridDataTypeDefinitions;
|
|
1067
1041
|
return revertedDateTypeDefinitions;
|
|
1068
1042
|
});
|
|
1069
1043
|
}
|
|
1070
|
-
isDetailGrid() {
|
|
1071
|
-
return this._isDetailGrid;
|
|
1072
|
-
}
|
|
1073
1044
|
/**
|
|
1074
1045
|
* Either initializes the AG Grid instance or delegates it to the framework wrappers (React/Anglar)
|
|
1075
1046
|
*/
|
|
1076
1047
|
async initializeAgGrid(gridOptions, modules, renderAgGridFrameworkComponent) {
|
|
1077
|
-
var _a;
|
|
1078
1048
|
if (renderAgGridFrameworkComponent) {
|
|
1079
1049
|
const result = await renderAgGridFrameworkComponent(gridOptions);
|
|
1080
1050
|
if (result === false) {
|
|
@@ -1096,9 +1066,8 @@ class AdaptableAgGrid {
|
|
|
1096
1066
|
}
|
|
1097
1067
|
if (!this.getAgGridContainerElement()) {
|
|
1098
1068
|
// initialize the agGridContainerElement from the AgGrid instance
|
|
1099
|
-
|
|
1100
|
-
const
|
|
1101
|
-
const gridContainer = gridRoot === null || gridRoot === void 0 ? void 0 : gridRoot.closest('[class*="ag-theme"]');
|
|
1069
|
+
const gridRoot = this.agGridAdapter.getAgGridRootElement();
|
|
1070
|
+
const gridContainer = gridRoot?.closest('[class*="ag-theme"]');
|
|
1102
1071
|
if (!gridContainer) {
|
|
1103
1072
|
this.logger.consoleError(`No AG Grid container could be derived from the Adaptable framework wrapper.
|
|
1104
1073
|
Please contact AdapTable Support and in the meantime provide a valid container element in 'ContainerOptions.agGridContainer'!`);
|
|
@@ -1113,108 +1082,33 @@ class AdaptableAgGrid {
|
|
|
1113
1082
|
return Promise.resolve(false);
|
|
1114
1083
|
}
|
|
1115
1084
|
let gridParams;
|
|
1116
|
-
if (modules
|
|
1085
|
+
if (modules?.length) {
|
|
1117
1086
|
gridParams = { modules };
|
|
1118
1087
|
}
|
|
1119
|
-
const agGridApi = (0,
|
|
1088
|
+
const agGridApi = (0, ag_grid_enterprise_1.createGrid)(agGridContainer, gridOptions, gridParams);
|
|
1120
1089
|
return agGridApi;
|
|
1121
1090
|
}
|
|
1122
|
-
getColumnDefinitionsInclSpecialColumns(agGridColDefs) {
|
|
1123
|
-
const allColDefs = this.enhanceColDefsWithSpecialColumns(agGridColDefs !== null && agGridColDefs !== void 0 ? agGridColDefs : this.agGridAdapter.getAgGridApi().getColumnDefs());
|
|
1124
|
-
return allColDefs;
|
|
1125
|
-
}
|
|
1126
|
-
getSpecialColDefs() {
|
|
1127
|
-
const specialColDefs = [
|
|
1128
|
-
...this.api.calculatedColumnApi.internalApi.getColDefsForCalculatedColumns(),
|
|
1129
|
-
...this.api.actionColumnApi.getColDefsForActionColumns(),
|
|
1130
|
-
...this.api.freeTextColumnApi.internalApi.getColDefsForFreeTextColumns(),
|
|
1131
|
-
...this.api.actionRowApi.internalApi.getColDefsForActionRowColumns(),
|
|
1132
|
-
...this.api.fdc3Api.internalApi.getFdc3ActionColDefs(),
|
|
1133
|
-
];
|
|
1134
|
-
this.agGridAdapter.assignColumnIdsToColDefs(specialColDefs);
|
|
1135
|
-
return specialColDefs;
|
|
1136
|
-
}
|
|
1137
|
-
enhanceColDefsWithSpecialColumns(agGridColDefs) {
|
|
1138
|
-
this.agGridAdapter.assignColumnIdsToColDefs(agGridColDefs);
|
|
1139
|
-
const specialColDefs = this.getSpecialColDefs();
|
|
1140
|
-
const isSpecialColDef = (colDef) => {
|
|
1141
|
-
const { type } = colDef;
|
|
1142
|
-
if (type === GeneralConstants_1.AB_SPECIAL_COLUMN || (Array.isArray(type) && type.includes(GeneralConstants_1.AB_SPECIAL_COLUMN))) {
|
|
1143
|
-
return true;
|
|
1144
|
-
}
|
|
1145
|
-
return false;
|
|
1146
|
-
};
|
|
1147
|
-
const processedSpecialColDefIds = [];
|
|
1148
|
-
const mapColDefs = (colDefs) => {
|
|
1149
|
-
return colDefs.map((colDef) => {
|
|
1150
|
-
if (this.agGridColumnAdapter.isColGroupDef(colDef)) {
|
|
1151
|
-
// if it's a group column, recursively map its children
|
|
1152
|
-
colDef.children = mapColDefs(colDef.children);
|
|
1153
|
-
return colDef;
|
|
1154
|
-
}
|
|
1155
|
-
else {
|
|
1156
|
-
if (!isSpecialColDef(colDef)) {
|
|
1157
|
-
// if it's not a special column, return it as is
|
|
1158
|
-
// without a minWidth, columns in details grid are VERY wide
|
|
1159
|
-
// so the line below fixes https://github.com/AdaptableTools/adaptable/issues/2559
|
|
1160
|
-
return Object.assign({ minWidth: 10 }, colDef);
|
|
1161
|
-
}
|
|
1162
|
-
const newlyCreatedSpecialColDef = specialColDefs.find((specialColDef) => specialColDef.colId === colDef.colId);
|
|
1163
|
-
if (newlyCreatedSpecialColDef) {
|
|
1164
|
-
// if it's a special column and we have a special col def for it, return the special col def
|
|
1165
|
-
processedSpecialColDefIds.push(colDef.colId);
|
|
1166
|
-
// merge the user defined colDef with the special col def
|
|
1167
|
-
// this way the user may provide some custom settings for the special col def (tooltip, etc)
|
|
1168
|
-
const mergedColDef = Object.assign(Object.assign({
|
|
1169
|
-
// see above comment for minWidth
|
|
1170
|
-
minWidth: 10 }, colDef), newlyCreatedSpecialColDef);
|
|
1171
|
-
return mergedColDef;
|
|
1172
|
-
}
|
|
1173
|
-
else {
|
|
1174
|
-
// otherwise, return the original col def
|
|
1175
|
-
return colDef;
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
});
|
|
1179
|
-
};
|
|
1180
|
-
let resultColDefs = mapColDefs(agGridColDefs);
|
|
1181
|
-
// check if there are any special colDefs that were not processed
|
|
1182
|
-
// in that case, add them to the end of the colDefs
|
|
1183
|
-
specialColDefs.forEach((specialColDef) => {
|
|
1184
|
-
if (!processedSpecialColDefIds.includes(specialColDef.colId)) {
|
|
1185
|
-
resultColDefs.push(specialColDef);
|
|
1186
|
-
}
|
|
1187
|
-
});
|
|
1188
|
-
// remove special column that are no longer defined
|
|
1189
|
-
resultColDefs = resultColDefs.filter((colDef) => {
|
|
1190
|
-
if (isSpecialColDef(colDef)) {
|
|
1191
|
-
// must be in specialColDefs
|
|
1192
|
-
return specialColDefs.some((specialColDef) => specialColDef.colId === colDef.colId);
|
|
1193
|
-
}
|
|
1194
|
-
return true;
|
|
1195
|
-
});
|
|
1196
|
-
return resultColDefs;
|
|
1197
|
-
}
|
|
1198
1091
|
useRowNodeLookUp() {
|
|
1199
1092
|
return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
|
|
1200
1093
|
}
|
|
1094
|
+
getAgGridRegisteredModules() {
|
|
1095
|
+
return this.agGridAdapter.getAgGridRegisteredModules();
|
|
1096
|
+
}
|
|
1201
1097
|
getAgGridContainerElement() {
|
|
1202
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1203
1098
|
if (!this.DANGER_USE_GETTER_agGridContainerElement) {
|
|
1204
1099
|
this.DANGER_USE_GETTER_agGridContainerElement =
|
|
1205
|
-
typeof
|
|
1206
|
-
? document.getElementById(
|
|
1207
|
-
:
|
|
1100
|
+
typeof this.adaptableOptions?.containerOptions?.agGridContainer === 'string'
|
|
1101
|
+
? document.getElementById(this.adaptableOptions?.containerOptions?.agGridContainer)
|
|
1102
|
+
: this.adaptableOptions?.containerOptions?.agGridContainer;
|
|
1208
1103
|
}
|
|
1209
1104
|
return this.DANGER_USE_GETTER_agGridContainerElement;
|
|
1210
1105
|
}
|
|
1211
1106
|
getAdaptableContainerElement() {
|
|
1212
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1213
1107
|
if (!this.DANGER_USE_GETTER_adaptableContainerElement) {
|
|
1214
1108
|
this.DANGER_USE_GETTER_adaptableContainerElement =
|
|
1215
|
-
typeof
|
|
1216
|
-
? document.getElementById(
|
|
1217
|
-
:
|
|
1109
|
+
typeof this.adaptableOptions?.containerOptions?.adaptableContainer === 'string'
|
|
1110
|
+
? document.getElementById(this.adaptableOptions?.containerOptions?.adaptableContainer)
|
|
1111
|
+
: this.adaptableOptions?.containerOptions?.adaptableContainer;
|
|
1218
1112
|
}
|
|
1219
1113
|
return this.DANGER_USE_GETTER_adaptableContainerElement;
|
|
1220
1114
|
}
|
|
@@ -1227,7 +1121,10 @@ class AdaptableAgGrid {
|
|
|
1227
1121
|
const selectedCellInfo = this.agGridAdapter.deriveSelectedCellInfoFromAgGrid();
|
|
1228
1122
|
this.api.gridApi.internalApi.setSelectedCells(selectedCellInfo);
|
|
1229
1123
|
this._emit('CellsSelected');
|
|
1230
|
-
let cellSelectionChangedInfo =
|
|
1124
|
+
let cellSelectionChangedInfo = {
|
|
1125
|
+
...this.api.internalApi.buildBaseContext(),
|
|
1126
|
+
selectedCellInfo: this.api.gridApi.getInternalState().SelectedCellInfo,
|
|
1127
|
+
};
|
|
1231
1128
|
this.api.eventApi.emit('CellSelectionChanged', cellSelectionChangedInfo);
|
|
1232
1129
|
return selectedCellInfo;
|
|
1233
1130
|
}
|
|
@@ -1237,7 +1134,10 @@ class AdaptableAgGrid {
|
|
|
1237
1134
|
}
|
|
1238
1135
|
const selectedRowInfo = this.agGridAdapter.deriveSelectedRowInfoFromAgGrid();
|
|
1239
1136
|
this.api.gridApi.internalApi.setSelectedRows(selectedRowInfo);
|
|
1240
|
-
const rowSelectionChangedInfo =
|
|
1137
|
+
const rowSelectionChangedInfo = {
|
|
1138
|
+
...this.api.internalApi.buildBaseContext(),
|
|
1139
|
+
selectedRowInfo: this.api.gridApi.getInternalState().SelectedRowInfo,
|
|
1140
|
+
};
|
|
1241
1141
|
this.api.eventApi.emit('RowSelectionChanged', rowSelectionChangedInfo);
|
|
1242
1142
|
return selectedRowInfo;
|
|
1243
1143
|
}
|
|
@@ -1255,7 +1155,7 @@ class AdaptableAgGrid {
|
|
|
1255
1155
|
return false;
|
|
1256
1156
|
}
|
|
1257
1157
|
isGridRangeSelectable() {
|
|
1258
|
-
return (this.agGridAdapter.
|
|
1158
|
+
return (this.agGridAdapter.isAgGridModuleRegistered('CellSelection') &&
|
|
1259
1159
|
(this.agGridAdapter.getGridOption('enableRangeSelection') ||
|
|
1260
1160
|
!!this.agGridAdapter.getGridOption('cellSelection')));
|
|
1261
1161
|
}
|
|
@@ -1263,114 +1163,34 @@ class AdaptableAgGrid {
|
|
|
1263
1163
|
const perfNewAdaptableStore = this.logger.beginPerf(`initAdaptableStore()`);
|
|
1264
1164
|
const adaptableStore = new AdaptableStore_1.AdaptableStore(this);
|
|
1265
1165
|
adaptableStore.onAny((eventName, data) => {
|
|
1266
|
-
this.
|
|
1166
|
+
if (this.isReady) {
|
|
1167
|
+
this.api.eventApi.internalApi.fireAdaptableStateChangedEvent(data.action, data.state, data.newState);
|
|
1168
|
+
}
|
|
1267
1169
|
this.forPlugins((plugin) => plugin.onStoreEvent(eventName, data, this.adaptableStore));
|
|
1268
1170
|
});
|
|
1269
1171
|
perfNewAdaptableStore.end();
|
|
1270
1172
|
return adaptableStore;
|
|
1271
1173
|
}
|
|
1272
|
-
mapAdaptableStateToAgGridState(adaptableState, agGridColDefs) {
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
if (!_currentLayout) {
|
|
1279
|
-
return agGridState;
|
|
1280
|
-
}
|
|
1281
|
-
const currentLayout = (0, AdaptableHelper_1.removeUuidAndSource)(_currentLayout);
|
|
1282
|
-
const allAgGridFlattenedColDefs = this.agGridAdapter.getFlattenedColDefs(agGridColDefs);
|
|
1283
|
-
const allAgGridColDefIds = allAgGridFlattenedColDefs.map((colDef) => colDef.colId);
|
|
1284
|
-
const { columnApi } = this.api;
|
|
1285
|
-
// also add the row group columns, if they are specified in the layout
|
|
1286
|
-
currentLayout.Columns.forEach((colId) => {
|
|
1287
|
-
if (columnApi.isAutoRowGroupColumn(colId)) {
|
|
1288
|
-
allAgGridColDefIds.push(colId);
|
|
1289
|
-
}
|
|
1290
|
-
});
|
|
1291
|
-
const getColDef = (colId) => allAgGridFlattenedColDefs.find((colDef) => colDef.colId === colId);
|
|
1292
|
-
agGridState.columnVisibility = {
|
|
1293
|
-
hiddenColIds: allAgGridFlattenedColDefs
|
|
1294
|
-
.filter((colDef) => { var _a; return !((_a = currentLayout.Columns) === null || _a === void 0 ? void 0 : _a.includes(colDef.colId)) || colDef.hide || colDef.initialHide; })
|
|
1295
|
-
.map((colDef) => colDef.colId),
|
|
1296
|
-
};
|
|
1297
|
-
agGridState.columnOrder = {
|
|
1298
|
-
orderedColIds: ArrayExtensions_1.default.sortArrayWithOrder(allAgGridColDefIds, currentLayout.Columns || [], {
|
|
1299
|
-
sortUnorderedItems: false,
|
|
1300
|
-
}),
|
|
1301
|
-
};
|
|
1302
|
-
if (currentLayout.ColumnWidthMap) {
|
|
1303
|
-
agGridState.columnSizing = {
|
|
1304
|
-
columnSizingModel: Object.keys(currentLayout.ColumnWidthMap).map((colId) => {
|
|
1305
|
-
const width = currentLayout.ColumnWidthMap[colId];
|
|
1306
|
-
return {
|
|
1307
|
-
colId,
|
|
1308
|
-
width,
|
|
1309
|
-
};
|
|
1310
|
-
}),
|
|
1311
|
-
};
|
|
1312
|
-
}
|
|
1313
|
-
if (currentLayout.ColumnSorts) {
|
|
1314
|
-
agGridState.sort = {
|
|
1315
|
-
sortModel: currentLayout.ColumnSorts.map((columnSort) => {
|
|
1316
|
-
return {
|
|
1317
|
-
colId: columnSort.ColumnId,
|
|
1318
|
-
sort: columnSort.SortOrder === 'Asc' ? 'asc' : 'desc',
|
|
1319
|
-
};
|
|
1320
|
-
}),
|
|
1321
|
-
};
|
|
1322
|
-
}
|
|
1323
|
-
if (currentLayout.RowGroupedColumns) {
|
|
1324
|
-
agGridState.rowGroup = {
|
|
1325
|
-
groupColIds: currentLayout.RowGroupedColumns,
|
|
1326
|
-
};
|
|
1327
|
-
}
|
|
1328
|
-
if (currentLayout.AggregationColumns) {
|
|
1329
|
-
agGridState.aggregation = {
|
|
1330
|
-
aggregationModel: Object.keys(currentLayout.AggregationColumns).map((colId) => {
|
|
1331
|
-
let aggFunc = currentLayout.AggregationColumns[colId];
|
|
1332
|
-
if (aggFunc === true) {
|
|
1333
|
-
const colDef = getColDef(colId);
|
|
1334
|
-
// fallback to SUM if no defaultAggFunc is defined
|
|
1335
|
-
aggFunc = (colDef === null || colDef === void 0 ? void 0 : colDef.defaultAggFunc) || 'sum';
|
|
1336
|
-
}
|
|
1337
|
-
if ((0, AggregationColumns_1.isWeightedAverageAggregation)(aggFunc)) {
|
|
1338
|
-
aggFunc = AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME;
|
|
1339
|
-
}
|
|
1340
|
-
return {
|
|
1341
|
-
colId,
|
|
1342
|
-
aggFunc,
|
|
1343
|
-
};
|
|
1344
|
-
}),
|
|
1345
|
-
};
|
|
1346
|
-
}
|
|
1347
|
-
if (currentLayout.PivotColumns || currentLayout.EnablePivot) {
|
|
1348
|
-
agGridState.pivot = {
|
|
1349
|
-
pivotMode: currentLayout.EnablePivot,
|
|
1350
|
-
pivotColIds: currentLayout.PivotColumns || [],
|
|
1351
|
-
};
|
|
1352
|
-
}
|
|
1353
|
-
if (currentLayout.PinnedColumnsMap) {
|
|
1354
|
-
const columnPinning = {
|
|
1355
|
-
leftColIds: [],
|
|
1356
|
-
rightColIds: [],
|
|
1357
|
-
};
|
|
1358
|
-
Object.keys(currentLayout.PinnedColumnsMap).forEach((colId) => {
|
|
1359
|
-
const pinned = currentLayout.PinnedColumnsMap[colId];
|
|
1360
|
-
if (pinned === 'left') {
|
|
1361
|
-
columnPinning.leftColIds.push(colId);
|
|
1362
|
-
}
|
|
1363
|
-
else if (pinned === 'right') {
|
|
1364
|
-
columnPinning.rightColIds.push(colId);
|
|
1365
|
-
}
|
|
1366
|
-
});
|
|
1367
|
-
agGridState.columnPinning = columnPinning;
|
|
1174
|
+
mapAdaptableStateToAgGridState(adaptableState, agGridColDefs, options) {
|
|
1175
|
+
const currentLayoutName = adaptableState.Layout?.CurrentLayout;
|
|
1176
|
+
let currentLayout = currentLayoutName &&
|
|
1177
|
+
adaptableState.Layout?.Layouts?.find((l) => l.Name === currentLayoutName);
|
|
1178
|
+
if (!currentLayout) {
|
|
1179
|
+
currentLayout = GeneralConstants_1.ERROR_LAYOUT;
|
|
1368
1180
|
}
|
|
1369
|
-
|
|
1181
|
+
const layoutModel = (0, LayoutHelpers_1.layoutStateToLayoutModel)(currentLayout);
|
|
1182
|
+
return {
|
|
1183
|
+
gridState: src_1.LayoutManager.getAGGridInitialStateForLayout(layoutModel, agGridColDefs, options),
|
|
1184
|
+
currentLayout: currentLayout,
|
|
1185
|
+
layoutModel,
|
|
1186
|
+
};
|
|
1370
1187
|
}
|
|
1371
1188
|
addGridEventListeners() {
|
|
1372
1189
|
/**
|
|
1373
|
-
* Intercept DOM events and emit them as Adaptable events
|
|
1190
|
+
* Intercept 3 DOM events and emit them as Adaptable events:
|
|
1191
|
+
* KeyDown
|
|
1192
|
+
* MouseEnter
|
|
1193
|
+
* MouseLeave
|
|
1374
1194
|
*/
|
|
1375
1195
|
const gridContainerElement = this.getAgGridContainerElement();
|
|
1376
1196
|
if (gridContainerElement) {
|
|
@@ -1383,80 +1203,33 @@ class AdaptableAgGrid {
|
|
|
1383
1203
|
}), true);
|
|
1384
1204
|
gridContainerElement.addEventListener('mouseleave', (this.agGridListenerMouseLeave = (event) => this._emit('MouseLeave', event)));
|
|
1385
1205
|
}
|
|
1386
|
-
this.
|
|
1206
|
+
this.throttleFilterOnDataChange = (0, throttle_1.default)(
|
|
1387
1207
|
// the extra function is to make sure we have a reference to ag-grid-api
|
|
1388
|
-
() =>
|
|
1389
|
-
trailing: true,
|
|
1390
|
-
leading: false,
|
|
1391
|
-
});
|
|
1392
|
-
this.throttleFilterOnTickingDataChange = (0, throttle_1.default)(() => { var _a; return (_a = this.agGridAdapter.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.onFilterChanged(); }, this.adaptableOptions.columnFilterOptions.filterActionOnExternalDataChange.throttleDelay, {
|
|
1208
|
+
() => this.agGridAdapter.getAgGridApi()?.onFilterChanged(), this.adaptableOptions.filterOptions.filterActionOnDataChange.throttleDelay, {
|
|
1393
1209
|
trailing: true,
|
|
1394
1210
|
leading: false,
|
|
1395
1211
|
});
|
|
1396
1212
|
/**
|
|
1397
|
-
* Use Case:
|
|
1398
|
-
* Action: Set Columns in store and filter grid
|
|
1399
|
-
*/
|
|
1400
|
-
this.debouncedSetColumnIntoStore = (0, debounce_1.default)(() => {
|
|
1401
|
-
if (!this.isReady) {
|
|
1402
|
-
return;
|
|
1403
|
-
}
|
|
1404
|
-
this.deriveAdaptableColumnStateFromAgGrid();
|
|
1405
|
-
}, GeneralConstants_1.HALF_SECOND);
|
|
1406
|
-
const columnEventsThatTriggersStateChange = [
|
|
1407
|
-
'columnMoved',
|
|
1408
|
-
'gridColumnsChanged',
|
|
1409
|
-
'displayedColumnsChanged',
|
|
1410
|
-
'columnVisible',
|
|
1411
|
-
'newColumnsLoaded',
|
|
1412
|
-
];
|
|
1413
|
-
this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalColumnEventsThatTriggerStateChange = (type) => {
|
|
1414
|
-
if (columnEventsThatTriggersStateChange.indexOf(type) > -1) {
|
|
1415
|
-
this.debouncedSetColumnIntoStore();
|
|
1416
|
-
}
|
|
1417
|
-
}));
|
|
1418
|
-
/**
|
|
1419
|
-
* Use Case: User has started inline editing but its distabled in Action Row Options
|
|
1213
|
+
* Use Case: User has started inline editing but its disabled in Row Form Options
|
|
1420
1214
|
* Action: Stop editing
|
|
1421
1215
|
*/
|
|
1422
1216
|
this.agGridAdapter.getAgGridApi().addEventListener('cellEditingStarted', (this.listenerCellEditingStarted = () => {
|
|
1423
|
-
|
|
1424
|
-
if ((_a = this.adaptableOptions.actionRowOptions) === null || _a === void 0 ? void 0 : _a.disableInlineEditing)
|
|
1217
|
+
if (this.adaptableOptions.rowFormOptions.disableInlineEditing)
|
|
1425
1218
|
this.agGridAdapter.getAgGridApi().stopEditing();
|
|
1426
1219
|
}));
|
|
1427
1220
|
/**
|
|
1428
|
-
* Use Case: initial data has been displayed
|
|
1429
|
-
* Action1:
|
|
1430
|
-
* Action2:
|
|
1431
|
-
* Note: Deals with scenario where the data is provided to AdapTable after grid has been setup
|
|
1221
|
+
* Use Case: Grid was already set up and now the initial data has been displayed
|
|
1222
|
+
* Action1: Update the Column Model
|
|
1223
|
+
* Action2: Refresh Calculated Columns
|
|
1432
1224
|
*/
|
|
1433
1225
|
this.agGridAdapter.getAgGridApi().addEventListener('firstDataRendered', (this.listenerFirstDataRendered = () => {
|
|
1434
1226
|
if (this.initWithLazyData) {
|
|
1435
|
-
this.updateColumnModelAndRefreshGrid(
|
|
1227
|
+
this.updateColumnModelAndRefreshGrid();
|
|
1436
1228
|
this.api.calculatedColumnApi.refreshAggregatedCalculatedColumns();
|
|
1437
1229
|
this._emit('FirstDataRendered');
|
|
1438
1230
|
}
|
|
1439
1231
|
this.autoSizeLayoutIfNeeded();
|
|
1440
1232
|
}));
|
|
1441
|
-
/**
|
|
1442
|
-
* Use Case: Entered or Left Pivot Mode
|
|
1443
|
-
* Action 1: Autosize pivot columns when entering pivot mode (if autosize pivot in Layout is true)
|
|
1444
|
-
* Action 2: Set pivot mode on / off in api as necessary
|
|
1445
|
-
*/
|
|
1446
|
-
this.agGridAdapter.getAgGridApi().addEventListener('columnPivotModeChanged', (this.listenerPivotModeChanged = (params) => {
|
|
1447
|
-
if (params.type == 'columnPivotModeChanged' &&
|
|
1448
|
-
params.columnApi != null &&
|
|
1449
|
-
params.columnApi.columnController != null &&
|
|
1450
|
-
params.columnApi.columnController.pivotMode == true) {
|
|
1451
|
-
if (this.adaptableOptions.layoutOptions.autoSizeColumnsInPivotLayout == true) {
|
|
1452
|
-
this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
|
|
1453
|
-
}
|
|
1454
|
-
this.api.internalApi.setPivotModeOn();
|
|
1455
|
-
}
|
|
1456
|
-
else {
|
|
1457
|
-
this.api.internalApi.setPivotModeOff();
|
|
1458
|
-
}
|
|
1459
|
-
}));
|
|
1460
1233
|
/**
|
|
1461
1234
|
* Use Case: A pivot column has changed
|
|
1462
1235
|
* Action: Autosize pivot columns (if autosize pivot in Layout is true)
|
|
@@ -1466,77 +1239,14 @@ class AdaptableAgGrid {
|
|
|
1466
1239
|
params.columnApi != null &&
|
|
1467
1240
|
params.columnApi.columnController != null &&
|
|
1468
1241
|
params.columnApi.columnController.pivotMode == true) {
|
|
1469
|
-
if (this.
|
|
1242
|
+
if (this.api.layoutApi.getCurrentLayout().AutoSizeColumns) {
|
|
1470
1243
|
this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
|
|
1471
1244
|
}
|
|
1472
1245
|
}
|
|
1473
1246
|
}));
|
|
1474
1247
|
/**
|
|
1475
|
-
* Use Case:
|
|
1476
|
-
* Action:
|
|
1477
|
-
*/
|
|
1478
|
-
const columnEventsThatTriggersAutoLayoutSave = [
|
|
1479
|
-
'columnPinned',
|
|
1480
|
-
'columnPivotChanged',
|
|
1481
|
-
'columnPivotModeChanged',
|
|
1482
|
-
'displayedColumnsChanged',
|
|
1483
|
-
'sortChanged',
|
|
1484
|
-
'columnRowGroupChanged',
|
|
1485
|
-
'columnValueChanged',
|
|
1486
|
-
];
|
|
1487
|
-
// ADD filter event
|
|
1488
|
-
this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
|
|
1489
|
-
if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
1490
|
-
this.debouncedSaveGridLayout(type);
|
|
1491
|
-
}
|
|
1492
|
-
}));
|
|
1493
|
-
/**
|
|
1494
|
-
* Save Layout if Display Row Groups is "dynamic
|
|
1495
|
-
*/
|
|
1496
|
-
this.debouncedSaveGridLayout = (0, debounce_1.default)((type) => {
|
|
1497
|
-
if (!this.isReady) {
|
|
1498
|
-
return;
|
|
1499
|
-
}
|
|
1500
|
-
this.logger.info('Event Triggering Auto Layout Save', type || '');
|
|
1501
|
-
this.updateLayoutFromGrid();
|
|
1502
|
-
}, GeneralConstants_1.HALF_SECOND);
|
|
1503
|
-
const rowGroupEventsThatTriggersAutoLayoutSave = [
|
|
1504
|
-
'rowGroupOpened',
|
|
1505
|
-
'expandOrCollapseAll',
|
|
1506
|
-
];
|
|
1507
|
-
this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave = (type) => {
|
|
1508
|
-
if (rowGroupEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
1509
|
-
if (this.adaptableOptions.layoutOptions.displayRowGroups == 'dynamic') {
|
|
1510
|
-
this.debouncedSaveGridLayout(type);
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
}));
|
|
1514
|
-
/**
|
|
1515
|
-
* Use Case: Column Row Grouping changes and 'restoreUngroupedColumns' is true
|
|
1516
|
-
* Action: Make the column invisiblel
|
|
1517
|
-
*/
|
|
1518
|
-
this.agGridAdapter.getAgGridApi().addEventListener('columnRowGroupChanged', (this.listenerColumnRowGroupChanged = (params) => {
|
|
1519
|
-
var _a, _b;
|
|
1520
|
-
if (this.api.internalApi.isGridInPivotMode()) {
|
|
1521
|
-
return;
|
|
1522
|
-
}
|
|
1523
|
-
if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.groupingOptions) === null || _b === void 0 ? void 0 : _b.restoreUngroupedColumns) {
|
|
1524
|
-
this.persistColumnIndexBeforeGrouping(params);
|
|
1525
|
-
}
|
|
1526
|
-
}));
|
|
1527
|
-
/**
|
|
1528
|
-
* Use Case: A Column has finished being resized
|
|
1529
|
-
* Action 1: Save the Layout (on a debounce)
|
|
1530
|
-
* Action 2: Emit the internal ColumnResized event - used by Sparkline Column (in Charts)
|
|
1531
|
-
*/
|
|
1532
|
-
this.agGridAdapter.getAgGridApi().addEventListener('columnResized', (this.listenerColumnResized = (params) => {
|
|
1533
|
-
if (params.finished == true && params.type == 'columnResized' && params.column) {
|
|
1534
|
-
this.debouncedSaveGridLayout(params.type);
|
|
1535
|
-
}
|
|
1536
|
-
}));
|
|
1537
|
-
/**
|
|
1538
|
-
* Use Case: Row Selection has changed
|
|
1539
|
-
* Action: Set Selected Rows (on a debeounce)
|
|
1248
|
+
* Use Case: User has selected Rows or opened a Row Group
|
|
1249
|
+
* Action: Set Selected Rows (on a debounce of 500ms)
|
|
1540
1250
|
*/
|
|
1541
1251
|
this.debouncedSetSelectedRows = (0, debounce_1.default)(() => {
|
|
1542
1252
|
if (!this.isReady) {
|
|
@@ -1556,14 +1266,14 @@ class AdaptableAgGrid {
|
|
|
1556
1266
|
}));
|
|
1557
1267
|
/**
|
|
1558
1268
|
* Use Case: User has selected a range of cells
|
|
1559
|
-
* Action: Set Selected Cells (on a debounce)
|
|
1269
|
+
* Action: Set Selected Cells (on a debounce of 250ms)
|
|
1560
1270
|
*/
|
|
1561
1271
|
this.debouncedSetSelectedCells = (0, debounce_1.default)(() => {
|
|
1562
1272
|
if (!this.isReady) {
|
|
1563
1273
|
return;
|
|
1564
1274
|
}
|
|
1565
1275
|
this.refreshSelectedCellsState();
|
|
1566
|
-
},
|
|
1276
|
+
}, GeneralConstants_1.QUARTER_SECOND);
|
|
1567
1277
|
this.agGridAdapter.getAgGridApi().addEventListener('cellSelectionChanged', (this.listenerCellSelectionChanged = (params) => {
|
|
1568
1278
|
if (params.finished == true) {
|
|
1569
1279
|
this.debouncedSetSelectedCells();
|
|
@@ -1571,20 +1281,21 @@ class AdaptableAgGrid {
|
|
|
1571
1281
|
}));
|
|
1572
1282
|
/**
|
|
1573
1283
|
* Use Case: Sort has changed in the Grid
|
|
1574
|
-
* Action1:
|
|
1284
|
+
* Action1: Fire the Grid Sorted Event
|
|
1575
1285
|
* Action2: Set Selected Cells (on a debounce)
|
|
1576
1286
|
*/
|
|
1577
1287
|
this.agGridAdapter.getAgGridApi().addEventListener('sortChanged', (this.listenerSortChanged = () => {
|
|
1578
|
-
this.
|
|
1288
|
+
this.api.eventApi.internalApi.fireGridSortedEvent();
|
|
1579
1289
|
this.debouncedSetSelectedCells();
|
|
1580
1290
|
}));
|
|
1291
|
+
/**
|
|
1292
|
+
* Use Case: Charts have been created or destroyed, Chart ranges selected or Chart options changed
|
|
1293
|
+
* Action: Call onChartModelChange in Charting Service
|
|
1294
|
+
*/
|
|
1581
1295
|
const eventsThatTriggerChartingChanges = [
|
|
1582
1296
|
'chartCreated',
|
|
1583
|
-
/** Chart Range selection has changed */
|
|
1584
1297
|
'chartRangeSelectionChanged',
|
|
1585
|
-
/** Chart Options have changed */
|
|
1586
1298
|
'chartOptionsChanged',
|
|
1587
|
-
/** Chart was destroyed */
|
|
1588
1299
|
'chartDestroyed',
|
|
1589
1300
|
];
|
|
1590
1301
|
const chartingModule = this.ModuleService.getModuleById('Charting');
|
|
@@ -1621,32 +1332,21 @@ class AdaptableAgGrid {
|
|
|
1621
1332
|
}
|
|
1622
1333
|
shouldAutoSizeLayout() {
|
|
1623
1334
|
const { layoutApi } = this.api;
|
|
1624
|
-
const { layoutOptions } = this.adaptableOptions;
|
|
1625
1335
|
const currentLayout = layoutApi.getCurrentLayout();
|
|
1626
|
-
if (currentLayout.
|
|
1336
|
+
if (currentLayout.ColumnWidths && Object.keys(currentLayout.ColumnWidths).length > 0) {
|
|
1627
1337
|
return;
|
|
1628
1338
|
}
|
|
1629
|
-
|
|
1630
|
-
? layoutOptions.autoSizeColumnsInPivotLayout
|
|
1631
|
-
: layoutOptions.autoSizeColumnsInLayout;
|
|
1632
|
-
return autoSize;
|
|
1339
|
+
return currentLayout.AutoSizeColumns;
|
|
1633
1340
|
}
|
|
1634
1341
|
autoSizeLayoutIfNeeded() {
|
|
1635
1342
|
if (this.shouldAutoSizeLayout()) {
|
|
1636
1343
|
requestAnimationFrame(() => {
|
|
1637
|
-
var _a;
|
|
1638
1344
|
if (this.isAvailable) {
|
|
1639
|
-
|
|
1345
|
+
this.autoSizeAllColumns();
|
|
1640
1346
|
}
|
|
1641
1347
|
});
|
|
1642
1348
|
}
|
|
1643
1349
|
}
|
|
1644
|
-
performAudit(action, oldState, newState) {
|
|
1645
|
-
if (this.isReady) {
|
|
1646
|
-
const adaptableStateChangedInfo = Object.assign(Object.assign({ actionName: action.type, clientTimestamp: new Date() }, this.api.internalApi.buildBaseContext()), { adaptableStateKey: this.adaptableOptions.adaptableStateKey, action: action, oldState: oldState, newState: newState });
|
|
1647
|
-
this.api.eventApi.emit('AdaptableStateChanged', adaptableStateChangedInfo);
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
1350
|
forPlugins(callback) {
|
|
1651
1351
|
if (Array.isArray(this.adaptableOptions.plugins)) {
|
|
1652
1352
|
this.adaptableOptions.plugins.forEach((plugin) => {
|
|
@@ -1684,9 +1384,9 @@ class AdaptableAgGrid {
|
|
|
1684
1384
|
this.AlertService = new AlertService_1.AlertService(this.api);
|
|
1685
1385
|
this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
|
|
1686
1386
|
this.Fdc3Service = new Fdc3Service_1.Fdc3Service(this.api);
|
|
1687
|
-
this.
|
|
1387
|
+
this.AnnotationsService = new AnnotationsService_1.AnnotationsService(this.api);
|
|
1688
1388
|
this.FlashingCellService = new FlashingCellService_1.FlashingCellService(this.api);
|
|
1689
|
-
this.
|
|
1389
|
+
this.RowFormService = new RowFormService_1.RowFormService(this.api);
|
|
1690
1390
|
this.MetamodelService = new MetamodelService_1.MetamodelService(() => this.api.optionsApi.getAdaptableOptions(), true);
|
|
1691
1391
|
}
|
|
1692
1392
|
initLicenseService() {
|
|
@@ -1743,18 +1443,17 @@ class AdaptableAgGrid {
|
|
|
1743
1443
|
*/
|
|
1744
1444
|
temporaryAdaptableStateUpdates() {
|
|
1745
1445
|
this.api.eventApi.on('AdaptableReady', () => {
|
|
1746
|
-
var _a, _b;
|
|
1747
1446
|
// update status bar state
|
|
1748
|
-
const adaptableStatusPanels =
|
|
1447
|
+
const adaptableStatusPanels = this.agGridAdapter
|
|
1749
1448
|
.getAgGridApi()
|
|
1750
|
-
.getGridOption('statusBar')
|
|
1449
|
+
.getGridOption('statusBar')
|
|
1450
|
+
?.statusPanels?.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key));
|
|
1751
1451
|
const statusBarModule = this.ModuleService.getModuleById(ModuleConstants.StatusBarModuleId);
|
|
1752
1452
|
// need to add only the adaptable panels
|
|
1753
1453
|
statusBarModule.syncStateWithOptions(adaptableStatusPanels);
|
|
1754
1454
|
});
|
|
1755
1455
|
}
|
|
1756
1456
|
validatePrimaryKey() {
|
|
1757
|
-
var _a;
|
|
1758
1457
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
1759
1458
|
return;
|
|
1760
1459
|
}
|
|
@@ -1764,7 +1463,7 @@ class AdaptableAgGrid {
|
|
|
1764
1463
|
if (!primaryKeyColDef) {
|
|
1765
1464
|
let errorMessage;
|
|
1766
1465
|
// if no primary key column then lets check the first row to see if its a data item
|
|
1767
|
-
const primaryKeyDataItem =
|
|
1466
|
+
const primaryKeyDataItem = this.getFirstRowNode()?.data[primaryKey];
|
|
1768
1467
|
if (!primaryKeyDataItem) {
|
|
1769
1468
|
errorMessage = `The Primary Key '${this.adaptableOptions.primaryKey}' does not exist. This will affect many functions in AdapTable.`;
|
|
1770
1469
|
if (this.adaptableOptions.alertOptions.showMissingPrimaryKeyAlert) {
|
|
@@ -1781,21 +1480,31 @@ class AdaptableAgGrid {
|
|
|
1781
1480
|
}
|
|
1782
1481
|
deriveAdaptableColumnStateFromAgGrid() {
|
|
1783
1482
|
const allColumns = [];
|
|
1784
|
-
const
|
|
1785
|
-
const
|
|
1786
|
-
|
|
1483
|
+
const gridApi = this.agGridAdapter.getAgGridApi();
|
|
1484
|
+
const isPivot = gridApi.isPivotMode();
|
|
1485
|
+
let agGridCols = isPivot
|
|
1486
|
+
? gridApi.getColumns()
|
|
1487
|
+
: // we call getAllGridColumns because we want to also have the generated group columns
|
|
1488
|
+
gridApi.getAllGridColumns();
|
|
1489
|
+
if (isPivot) {
|
|
1490
|
+
// let's also support the pivot result columns
|
|
1491
|
+
const pivotResultColumns = gridApi.getPivotResultColumns() || [];
|
|
1492
|
+
if (pivotResultColumns.length) {
|
|
1493
|
+
agGridCols = [...agGridCols, ...pivotResultColumns];
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
const columnGroupChildren = gridApi
|
|
1787
1497
|
// TODO AFL MIG: check why this assertion is here
|
|
1788
1498
|
.getAllDisplayedColumnGroups();
|
|
1789
1499
|
const groupsCount = {};
|
|
1790
|
-
const colsToGroups = (columnGroupChildren
|
|
1791
|
-
|
|
1792
|
-
if (!((_b = (_a = columnGroup.getProvidedColumnGroup) === null || _a === void 0 ? void 0 : _a.call(columnGroup)) === null || _b === void 0 ? void 0 : _b.getColGroupDef())) {
|
|
1500
|
+
const colsToGroups = (columnGroupChildren ?? []).reduce((acc, columnGroup) => {
|
|
1501
|
+
if (!columnGroup.getProvidedColumnGroup?.()?.getColGroupDef()) {
|
|
1793
1502
|
return acc;
|
|
1794
1503
|
}
|
|
1795
1504
|
const ColumnGroupId = columnGroup.getGroupId();
|
|
1796
1505
|
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef()
|
|
1797
1506
|
.marryChildren;
|
|
1798
|
-
const FriendlyName =
|
|
1507
|
+
const FriendlyName = columnGroup.getProvidedColumnGroup().getColGroupDef().headerName ?? ColumnGroupId;
|
|
1799
1508
|
const columnsInGroup = columnGroup.getLeafColumns();
|
|
1800
1509
|
columnsInGroup.forEach((col) => {
|
|
1801
1510
|
const group = {
|
|
@@ -1813,58 +1522,96 @@ class AdaptableAgGrid {
|
|
|
1813
1522
|
Object.keys(colsToGroups).forEach((colId) => {
|
|
1814
1523
|
colsToGroups[colId].groupCount = groupsCount[colsToGroups[colId].columnGroupId];
|
|
1815
1524
|
});
|
|
1816
|
-
|
|
1525
|
+
agGridCols = agGridCols.filter((agGridColumn) => !this.agGridColumnAdapter.shouldSkipColumn(agGridColumn.getId()));
|
|
1817
1526
|
agGridCols.forEach((agGridColumn) => {
|
|
1818
|
-
|
|
1819
|
-
if (!this.api.columnApi.isAutoRowGroupColumn(colId)) {
|
|
1820
|
-
allColumns.push(this.agGridAdapter.createAdaptableColumnFromAgGridColumn(agGridColumn, colsToGroups));
|
|
1821
|
-
}
|
|
1527
|
+
allColumns.push(this.agGridAdapter.createAdaptableColumnFromAgGridColumn(agGridColumn, colsToGroups));
|
|
1822
1528
|
});
|
|
1823
1529
|
this.api.gridApi.internalApi.setColumns(allColumns);
|
|
1824
1530
|
}
|
|
1825
1531
|
checkShouldClearExistingFiltersOrSearches() {
|
|
1826
|
-
// if they have selected to clear
|
|
1827
|
-
if (this.adaptableOptions.
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
this.api.columnFilterApi.clearColumnFilters();
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1833
|
-
// if they have selected to clear the Grid filter on startup then do it
|
|
1834
|
-
if (this.adaptableOptions.gridFilterOptions.clearGridFilterOnStartUp) {
|
|
1835
|
-
if (StringExtensions_1.default.IsNotNullOrEmpty(this.api.gridFilterApi.getCurrentGridFilterExpression())) {
|
|
1836
|
-
this.logger.warn('Clearing existing Grid Filter as "clearGridFilterOnStartUp" is true');
|
|
1837
|
-
this.api.gridFilterApi.setGridFilterExpression('');
|
|
1838
|
-
}
|
|
1532
|
+
// if they have selected to clear Filters on startup then do it
|
|
1533
|
+
if (this.adaptableOptions.filterOptions.clearFiltersOnStartUp) {
|
|
1534
|
+
this.logger.warn('Clearing any saved Filters as "clearFiltersOnStartUp" is true');
|
|
1535
|
+
this.api.filterApi.clearAllFilters();
|
|
1839
1536
|
}
|
|
1840
1537
|
// if they have selected to clear searches on startup then do it
|
|
1841
1538
|
if (this.adaptableOptions.quickSearchOptions.clearQuickSearchOnStartUp) {
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
this.api.quickSearchApi.clearQuickSearch();
|
|
1845
|
-
}
|
|
1539
|
+
this.logger.warn('Clearing any saved Searches as "clearQuickSearchOnStartUp" is true');
|
|
1540
|
+
this.api.quickSearchApi.clearQuickSearch();
|
|
1846
1541
|
}
|
|
1847
1542
|
}
|
|
1848
1543
|
getGridCellFromRowNode(rowNode, columnId) {
|
|
1849
1544
|
if (rowNode == null) {
|
|
1850
1545
|
return undefined;
|
|
1851
1546
|
}
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1547
|
+
return this.createGridCell(rowNode, columnId);
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Use (lazy evaluated) getters to avoid unnecessary calculations and memoization to avoid recalculating the same values
|
|
1551
|
+
*/
|
|
1552
|
+
createGridCell(rowNode, columnId) {
|
|
1553
|
+
let _column;
|
|
1554
|
+
let _primaryKeyValue;
|
|
1555
|
+
let _rawValue;
|
|
1556
|
+
let _displayValue;
|
|
1557
|
+
let _normalisedValue;
|
|
1558
|
+
let _isPivotCell;
|
|
1559
|
+
let _isRowGroupCell;
|
|
1560
|
+
const self = this;
|
|
1561
|
+
const api = this.api;
|
|
1562
|
+
const getRawValue = () => {
|
|
1563
|
+
if (_rawValue === undefined) {
|
|
1564
|
+
_rawValue = self.getRawValueFromRowNode(rowNode, columnId);
|
|
1565
|
+
}
|
|
1566
|
+
return _rawValue;
|
|
1567
|
+
};
|
|
1568
|
+
const getColumn = () => {
|
|
1569
|
+
if (_column === undefined) {
|
|
1570
|
+
_column = api.columnApi.getColumnWithColumnId(columnId);
|
|
1571
|
+
}
|
|
1572
|
+
return _column;
|
|
1573
|
+
};
|
|
1859
1574
|
return {
|
|
1860
|
-
rawValue
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1575
|
+
get rawValue() {
|
|
1576
|
+
return getRawValue();
|
|
1577
|
+
},
|
|
1578
|
+
get visible() {
|
|
1579
|
+
return self.isPrimaryKeyVisible(this.primaryKeyValue);
|
|
1580
|
+
},
|
|
1581
|
+
get displayValue() {
|
|
1582
|
+
if (_displayValue === undefined) {
|
|
1583
|
+
_displayValue = self.getDisplayValueFromRawValue(rowNode, columnId, getRawValue());
|
|
1584
|
+
}
|
|
1585
|
+
return _displayValue;
|
|
1586
|
+
},
|
|
1587
|
+
get normalisedValue() {
|
|
1588
|
+
if (_normalisedValue === undefined) {
|
|
1589
|
+
_normalisedValue = self.getNormalisedValueFromRawValue(getRawValue(), getColumn());
|
|
1590
|
+
}
|
|
1591
|
+
return _normalisedValue;
|
|
1592
|
+
},
|
|
1593
|
+
get column() {
|
|
1594
|
+
return getColumn();
|
|
1595
|
+
},
|
|
1596
|
+
get primaryKeyValue() {
|
|
1597
|
+
if (_primaryKeyValue === undefined) {
|
|
1598
|
+
_primaryKeyValue = self.getPrimaryKeyValueFromRowNode(rowNode);
|
|
1599
|
+
}
|
|
1600
|
+
return _primaryKeyValue;
|
|
1601
|
+
},
|
|
1602
|
+
get isPivotCell() {
|
|
1603
|
+
if (_isPivotCell === undefined) {
|
|
1604
|
+
_isPivotCell = api.columnApi.isPivotResultColumn(columnId);
|
|
1605
|
+
}
|
|
1606
|
+
return _isPivotCell;
|
|
1607
|
+
},
|
|
1608
|
+
get isRowGroupCell() {
|
|
1609
|
+
if (_isRowGroupCell === undefined) {
|
|
1610
|
+
_isRowGroupCell = rowNode.group;
|
|
1611
|
+
}
|
|
1612
|
+
return _isRowGroupCell;
|
|
1613
|
+
},
|
|
1865
1614
|
rowNode: rowNode,
|
|
1866
|
-
isPivotCell,
|
|
1867
|
-
isRowGroupCell,
|
|
1868
1615
|
};
|
|
1869
1616
|
}
|
|
1870
1617
|
getPrimaryKeyValueFromRowNode(rowNode, gridApi) {
|
|
@@ -1944,31 +1691,25 @@ class AdaptableAgGrid {
|
|
|
1944
1691
|
return rawValue;
|
|
1945
1692
|
}
|
|
1946
1693
|
const dataType = column.dataType;
|
|
1947
|
-
if (dataType === '
|
|
1694
|
+
if (dataType === 'text') {
|
|
1948
1695
|
return typeof rawValue !== 'string' ? String(rawValue) : rawValue;
|
|
1949
1696
|
}
|
|
1950
|
-
if (dataType === '
|
|
1697
|
+
if (dataType === 'number') {
|
|
1951
1698
|
// empty string or space should not be converted to 0
|
|
1952
1699
|
return typeof rawValue !== 'number' && StringExtensions_1.default.IsNumeric(rawValue)
|
|
1953
1700
|
? Number(rawValue)
|
|
1954
1701
|
: rawValue;
|
|
1955
1702
|
}
|
|
1956
|
-
if (dataType === '
|
|
1703
|
+
if (dataType === 'boolean') {
|
|
1957
1704
|
return typeof rawValue !== 'boolean' ? Boolean(rawValue) : rawValue;
|
|
1958
1705
|
}
|
|
1959
|
-
if (dataType === '
|
|
1706
|
+
if (dataType === 'date' || dataType === 'dateString') {
|
|
1960
1707
|
return rawValue instanceof Date ? rawValue : (0, DateHelper_1.parseDateValue)(rawValue);
|
|
1961
1708
|
}
|
|
1962
1709
|
return rawValue;
|
|
1963
1710
|
}
|
|
1964
|
-
updateColumnModelAndRefreshGrid(
|
|
1965
|
-
this.logger.info(`Updating Column Model and Refreshing Grid
|
|
1966
|
-
if (config === null || config === void 0 ? void 0 : config.preemptiveColumnStateRefresh) {
|
|
1967
|
-
this.deriveAdaptableColumnStateFromAgGrid();
|
|
1968
|
-
}
|
|
1969
|
-
if (!(config === null || config === void 0 ? void 0 : config.skipColDefsRefresh)) {
|
|
1970
|
-
this.refreshColDefs();
|
|
1971
|
-
}
|
|
1711
|
+
updateColumnModelAndRefreshGrid() {
|
|
1712
|
+
this.logger.info(`Updating Column Model and Refreshing Grid.`);
|
|
1972
1713
|
this.deriveAdaptableColumnStateFromAgGrid();
|
|
1973
1714
|
this.agGridColumnAdapter.setupColumns();
|
|
1974
1715
|
this.redrawBody();
|
|
@@ -2000,9 +1741,12 @@ class AdaptableAgGrid {
|
|
|
2000
1741
|
redrawRow(rowNode) {
|
|
2001
1742
|
this.redrawRows([rowNode]);
|
|
2002
1743
|
}
|
|
2003
|
-
|
|
1744
|
+
refreshCell(rowNode, column, forceUpdate, suppressFlash = false) {
|
|
1745
|
+
this.refreshCells(rowNode, [column], forceUpdate, suppressFlash);
|
|
1746
|
+
}
|
|
1747
|
+
refreshCells(rowNode, columns, forceUpdate, suppressFlash = false) {
|
|
2004
1748
|
const refreshCellParams = {
|
|
2005
|
-
rowNodes,
|
|
1749
|
+
rowNodes: [rowNode],
|
|
2006
1750
|
columns: columns,
|
|
2007
1751
|
force: forceUpdate,
|
|
2008
1752
|
suppressFlash,
|
|
@@ -2013,7 +1757,13 @@ class AdaptableAgGrid {
|
|
|
2013
1757
|
this.agGridAdapter.getAgGridApi().refreshCells({ force: forceUpdate });
|
|
2014
1758
|
}
|
|
2015
1759
|
refreshColumns(columns, forceUpdate, suppressFlash) {
|
|
2016
|
-
|
|
1760
|
+
const refreshCellParams = {
|
|
1761
|
+
rowNodes: null,
|
|
1762
|
+
columns: columns,
|
|
1763
|
+
force: forceUpdate,
|
|
1764
|
+
suppressFlash,
|
|
1765
|
+
};
|
|
1766
|
+
this.agGridAdapter.getAgGridApi().refreshCells(refreshCellParams);
|
|
2017
1767
|
}
|
|
2018
1768
|
jumpToRow(rowNode) {
|
|
2019
1769
|
this.agGridAdapter.getAgGridApi().ensureNodeVisible(rowNode, 'middle');
|
|
@@ -2026,7 +1776,7 @@ class AdaptableAgGrid {
|
|
|
2026
1776
|
this.jumpToColumn(columnId);
|
|
2027
1777
|
}
|
|
2028
1778
|
selectColumn(columnId, config) {
|
|
2029
|
-
if (!
|
|
1779
|
+
if (!config?.keepExistingSelection) {
|
|
2030
1780
|
this.agGridAdapter.getAgGridApi().clearCellSelection();
|
|
2031
1781
|
}
|
|
2032
1782
|
const cellRangeParams = {
|
|
@@ -2038,7 +1788,7 @@ class AdaptableAgGrid {
|
|
|
2038
1788
|
this.agGridAdapter.getAgGridApi().addCellRange(cellRangeParams);
|
|
2039
1789
|
}
|
|
2040
1790
|
selectColumns(columnIds, config) {
|
|
2041
|
-
if (!
|
|
1791
|
+
if (!config?.keepExistingSelection) {
|
|
2042
1792
|
this.agGridAdapter.getAgGridApi().clearCellSelection();
|
|
2043
1793
|
}
|
|
2044
1794
|
const rowCount = this.agGridAdapter.getAgGridApi().getDisplayedRowCount();
|
|
@@ -2069,7 +1819,7 @@ class AdaptableAgGrid {
|
|
|
2069
1819
|
}
|
|
2070
1820
|
this.agGridAdapter.setGridOption('rowData', dataSource);
|
|
2071
1821
|
this.updateRowGroupsExpandedState();
|
|
2072
|
-
this.updateColumnModelAndRefreshGrid();
|
|
1822
|
+
// this.updateColumnModelAndRefreshGrid();
|
|
2073
1823
|
}
|
|
2074
1824
|
getGridData() {
|
|
2075
1825
|
const data = [];
|
|
@@ -2102,7 +1852,7 @@ class AdaptableAgGrid {
|
|
|
2102
1852
|
}
|
|
2103
1853
|
getFirstRowNode() {
|
|
2104
1854
|
let firstRowNode = this.getFirstDisplayedRowNode();
|
|
2105
|
-
if (firstRowNode
|
|
1855
|
+
if (firstRowNode?.group) {
|
|
2106
1856
|
// all groups may be closed so it is safer to get first leaf node
|
|
2107
1857
|
// all groups should have at least one leafe node (though not necessarily if using SSRM)
|
|
2108
1858
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(firstRowNode.allLeafChildren)) {
|
|
@@ -2115,12 +1865,10 @@ class AdaptableAgGrid {
|
|
|
2115
1865
|
if (!layout) {
|
|
2116
1866
|
layout = this.api.layoutApi.getCurrentLayout();
|
|
2117
1867
|
}
|
|
2118
|
-
if (
|
|
2119
|
-
|
|
2120
|
-
this.
|
|
2121
|
-
|
|
2122
|
-
if (this.adaptableOptions.layoutOptions.displayRowGroups === 'expanded') {
|
|
2123
|
-
this.expandAllRowGroups();
|
|
1868
|
+
if (!(0, LayoutHelpers_1.isPivotLayout)(layout)) {
|
|
1869
|
+
const layoutModel = (0, LayoutHelpers_1.tableLayoutToTableLayoutModel)(layout);
|
|
1870
|
+
this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues);
|
|
1871
|
+
return;
|
|
2124
1872
|
}
|
|
2125
1873
|
}
|
|
2126
1874
|
isGroupRowNode(rowNode) {
|
|
@@ -2154,7 +1902,7 @@ class AdaptableAgGrid {
|
|
|
2154
1902
|
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2155
1903
|
dataUpdateConfig.callback(transaction);
|
|
2156
1904
|
}
|
|
2157
|
-
resolve(transaction
|
|
1905
|
+
resolve(transaction?.update);
|
|
2158
1906
|
});
|
|
2159
1907
|
if (dataUpdateConfig.flushAsync) {
|
|
2160
1908
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
@@ -2168,7 +1916,7 @@ class AdaptableAgGrid {
|
|
|
2168
1916
|
if (dataUpdateConfig.flushAsync) {
|
|
2169
1917
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2170
1918
|
}
|
|
2171
|
-
return Promise.resolve(transaction
|
|
1919
|
+
return Promise.resolve(transaction?.update);
|
|
2172
1920
|
}
|
|
2173
1921
|
}
|
|
2174
1922
|
addRows(dataRows, dataUpdateConfig) {
|
|
@@ -2186,7 +1934,7 @@ class AdaptableAgGrid {
|
|
|
2186
1934
|
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2187
1935
|
dataUpdateConfig.callback(transaction);
|
|
2188
1936
|
}
|
|
2189
|
-
resolve(transaction
|
|
1937
|
+
resolve(transaction?.add);
|
|
2190
1938
|
this.updateRowGroupsExpandedState();
|
|
2191
1939
|
});
|
|
2192
1940
|
if (dataUpdateConfig.flushAsync) {
|
|
@@ -2200,7 +1948,7 @@ class AdaptableAgGrid {
|
|
|
2200
1948
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2201
1949
|
}
|
|
2202
1950
|
this.updateRowGroupsExpandedState();
|
|
2203
|
-
return Promise.resolve(transaction
|
|
1951
|
+
return Promise.resolve(transaction?.add);
|
|
2204
1952
|
}
|
|
2205
1953
|
}
|
|
2206
1954
|
addOrUpdateRows(dataRows, dataUpdateConfig) {
|
|
@@ -2228,12 +1976,12 @@ class AdaptableAgGrid {
|
|
|
2228
1976
|
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2229
1977
|
dataUpdateConfig.callback(transaction);
|
|
2230
1978
|
}
|
|
2231
|
-
if (transaction
|
|
1979
|
+
if (transaction?.add) {
|
|
2232
1980
|
this.updateRowGroupsExpandedState();
|
|
2233
1981
|
}
|
|
2234
1982
|
resolve({
|
|
2235
|
-
added: transaction
|
|
2236
|
-
updated: transaction
|
|
1983
|
+
added: transaction?.add,
|
|
1984
|
+
updated: transaction?.update,
|
|
2237
1985
|
});
|
|
2238
1986
|
});
|
|
2239
1987
|
if (dataUpdateConfig.flushAsync) {
|
|
@@ -2247,15 +1995,15 @@ class AdaptableAgGrid {
|
|
|
2247
1995
|
add: addDataRows,
|
|
2248
1996
|
addIndex: dataUpdateConfig.addIndex,
|
|
2249
1997
|
});
|
|
2250
|
-
if (transaction
|
|
1998
|
+
if (transaction?.add) {
|
|
2251
1999
|
this.updateRowGroupsExpandedState();
|
|
2252
2000
|
}
|
|
2253
2001
|
if (dataUpdateConfig.flushAsync) {
|
|
2254
2002
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2255
2003
|
}
|
|
2256
2004
|
return Promise.resolve({
|
|
2257
|
-
added: transaction
|
|
2258
|
-
updated: transaction
|
|
2005
|
+
added: transaction?.add,
|
|
2006
|
+
updated: transaction?.update,
|
|
2259
2007
|
});
|
|
2260
2008
|
}
|
|
2261
2009
|
}
|
|
@@ -2269,7 +2017,7 @@ class AdaptableAgGrid {
|
|
|
2269
2017
|
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2270
2018
|
dataUpdateConfig.callback(transaction);
|
|
2271
2019
|
}
|
|
2272
|
-
resolve(transaction
|
|
2020
|
+
resolve(transaction?.remove);
|
|
2273
2021
|
});
|
|
2274
2022
|
if (dataUpdateConfig.flushAsync) {
|
|
2275
2023
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
@@ -2316,51 +2064,137 @@ class AdaptableAgGrid {
|
|
|
2316
2064
|
this.autoSizeColumns([columnId]);
|
|
2317
2065
|
}
|
|
2318
2066
|
autoSizeColumns(columnIds) {
|
|
2319
|
-
this.
|
|
2067
|
+
this.layoutManager.autoSizeColumns(columnIds);
|
|
2320
2068
|
}
|
|
2321
2069
|
autoSizeAllColumns() {
|
|
2322
|
-
this.agGridAdapter.getAgGridApi()
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2070
|
+
const agGridApi = this.agGridAdapter.getAgGridApi();
|
|
2071
|
+
if (agGridApi) {
|
|
2072
|
+
agGridApi.autoSizeAllColumns();
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
async getDistinctValuesForColumn(column) {
|
|
2076
|
+
return this.getDistinctGridCellsForColumn(column);
|
|
2077
|
+
}
|
|
2078
|
+
async getDistinctFilterValuesForColumn(options) {
|
|
2079
|
+
const { column } = options;
|
|
2080
|
+
// First get the Grid Cells in the Column
|
|
2081
|
+
const currentGridCells = this.getDistinctGridCellsForColumn(column);
|
|
2082
|
+
// If there are custom distinct value, return them; otherwise return the Grids Cells just retrieved
|
|
2083
|
+
const customInFilterValues = this.adaptableOptions.filterOptions.customInFilterValues;
|
|
2084
|
+
if (customInFilterValues) {
|
|
2085
|
+
const gridApiInternal = this.api.gridApi.internalApi;
|
|
2086
|
+
const customInFilterValuesContext = {
|
|
2087
|
+
...this.api.internalApi.buildBaseContext(),
|
|
2088
|
+
column,
|
|
2089
|
+
get currentSearchValue() {
|
|
2090
|
+
return options.currentSearchValue;
|
|
2091
|
+
},
|
|
2092
|
+
get sortedValues() {
|
|
2093
|
+
const result = gridApiInternal
|
|
2094
|
+
.sortDistinctValues(currentGridCells, column)
|
|
2095
|
+
.map((gridCell) => {
|
|
2096
|
+
return {
|
|
2097
|
+
label: gridCell.displayValue,
|
|
2098
|
+
value: gridCell.rawValue,
|
|
2099
|
+
isSelected: gridCell.rowNode.displayed,
|
|
2100
|
+
count: gridCell.count,
|
|
2101
|
+
get visible() {
|
|
2102
|
+
return gridCell.visible;
|
|
2103
|
+
},
|
|
2104
|
+
};
|
|
2105
|
+
});
|
|
2106
|
+
return result;
|
|
2107
|
+
},
|
|
2108
|
+
get defaultValues() {
|
|
2109
|
+
const result = currentGridCells.map((gridCell) => {
|
|
2110
|
+
return {
|
|
2111
|
+
label: gridCell.displayValue,
|
|
2112
|
+
value: gridCell.rawValue,
|
|
2113
|
+
isSelected: gridCell.rowNode.displayed,
|
|
2114
|
+
count: gridCell.count,
|
|
2115
|
+
get visible() {
|
|
2116
|
+
return gridCell.visible;
|
|
2117
|
+
},
|
|
2118
|
+
};
|
|
2119
|
+
});
|
|
2120
|
+
return result;
|
|
2121
|
+
},
|
|
2122
|
+
};
|
|
2123
|
+
let customDistinctValues;
|
|
2124
|
+
try {
|
|
2125
|
+
customDistinctValues = await customInFilterValues(customInFilterValuesContext);
|
|
2126
|
+
}
|
|
2127
|
+
catch (error) {
|
|
2128
|
+
this.logger.consoleError(`Failed to fetch custom filter values`, column, error);
|
|
2129
|
+
}
|
|
2130
|
+
if (customDistinctValues) {
|
|
2131
|
+
return this.getGridCellsForCustomColumnValues(customDistinctValues, column);
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
// No distinct values so lets return unique grid cells
|
|
2135
|
+
return currentGridCells;
|
|
2136
|
+
}
|
|
2137
|
+
async getDistinctEditValuesForColumn(options) {
|
|
2138
|
+
const { column, gridCell } = options;
|
|
2139
|
+
// First get the Grid Cells in the Column
|
|
2140
|
+
const currentGridCells = this.getDistinctGridCellsForColumn(column);
|
|
2141
|
+
// If there are custom distinct value, return them, but only if a module has been specifically set
|
|
2142
|
+
const customEditColumnValues = this.adaptableOptions.editOptions.customEditColumnValues;
|
|
2143
|
+
if (customEditColumnValues) {
|
|
2144
|
+
const customEditValuesContext = {
|
|
2145
|
+
...this.api.internalApi.buildBaseContext(),
|
|
2146
|
+
column,
|
|
2147
|
+
gridCell: gridCell,
|
|
2148
|
+
get currentSearchValue() {
|
|
2149
|
+
return options.currentSearchValue;
|
|
2150
|
+
},
|
|
2151
|
+
get defaultValues() {
|
|
2152
|
+
const result = currentGridCells.map((gridCell) => {
|
|
2153
|
+
return {
|
|
2154
|
+
label: gridCell.displayValue,
|
|
2155
|
+
value: gridCell.rawValue,
|
|
2156
|
+
get visible() {
|
|
2157
|
+
return gridCell.visible;
|
|
2158
|
+
},
|
|
2159
|
+
};
|
|
2160
|
+
});
|
|
2161
|
+
return result;
|
|
2162
|
+
},
|
|
2163
|
+
};
|
|
2164
|
+
if (customEditColumnValues) {
|
|
2165
|
+
let customDistinctValues;
|
|
2166
|
+
try {
|
|
2167
|
+
customDistinctValues = await customEditColumnValues(customEditValuesContext);
|
|
2168
|
+
}
|
|
2169
|
+
catch (error) {
|
|
2170
|
+
this.logger.consoleError(`Failed to fetch custom edit values`, column, error);
|
|
2171
|
+
}
|
|
2172
|
+
if (customDistinctValues) {
|
|
2173
|
+
return this.getGridCellsForCustomColumnValues(customDistinctValues, column);
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
// No distinct values so lets return unique grid cells
|
|
2178
|
+
return currentGridCells;
|
|
2179
|
+
}
|
|
2180
|
+
getDistinctGridCellsForColumn(column) {
|
|
2181
|
+
let gridCells = [];
|
|
2182
|
+
this.agGridAdapter.getAgGridApi().forEachNode((rowNode) => {
|
|
2183
|
+
const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
|
|
2184
|
+
if (gridCell) {
|
|
2185
|
+
gridCells.push(gridCell);
|
|
2186
|
+
}
|
|
2187
|
+
});
|
|
2188
|
+
return this.getUniqueGridCells(column, gridCells);
|
|
2189
|
+
}
|
|
2190
|
+
getGridCellsForCustomColumnValues(customColumnValues, column) {
|
|
2191
|
+
let gridCells = [];
|
|
2192
|
+
if (ArrayExtensions_1.default.IsNotNullOrEmpty(customColumnValues)) {
|
|
2193
|
+
gridCells = customColumnValues.map((pv) => {
|
|
2360
2194
|
return {
|
|
2361
|
-
rawValue: pv,
|
|
2362
|
-
displayValue: pv,
|
|
2363
|
-
normalisedValue: pv,
|
|
2195
|
+
rawValue: pv.value,
|
|
2196
|
+
displayValue: pv.label ?? pv.value,
|
|
2197
|
+
normalisedValue: pv.value,
|
|
2364
2198
|
columnId: column.columnId,
|
|
2365
2199
|
column: column,
|
|
2366
2200
|
rowNode: undefined,
|
|
@@ -2371,25 +2205,8 @@ class AdaptableAgGrid {
|
|
|
2371
2205
|
return gridCells;
|
|
2372
2206
|
}
|
|
2373
2207
|
}
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
if (distinctValuesParams.visibleRowsOnly === true) {
|
|
2377
|
-
this.agGridAdapter.getAgGridApi().forEachNodeAfterFilter((rowNode) => {
|
|
2378
|
-
const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
|
|
2379
|
-
if (gridCell && gridCell.rowNode !== distinctValuesParams.skipRowNode) {
|
|
2380
|
-
gridCells.push(gridCell);
|
|
2381
|
-
}
|
|
2382
|
-
});
|
|
2383
|
-
}
|
|
2384
|
-
else {
|
|
2385
|
-
this.agGridAdapter.getAgGridApi().forEachNode((rowNode) => {
|
|
2386
|
-
const gridCell = this.addDistinctColumnValue(rowNode, column.columnId);
|
|
2387
|
-
if (gridCell && gridCell.rowNode !== distinctValuesParams.skipRowNode) {
|
|
2388
|
-
gridCells.push(gridCell);
|
|
2389
|
-
}
|
|
2390
|
-
});
|
|
2391
|
-
}
|
|
2392
|
-
return gridCells;
|
|
2208
|
+
isPrimaryKeyVisible(primaryKey) {
|
|
2209
|
+
return !this.filteredOutPrimaryKeys.has(primaryKey);
|
|
2393
2210
|
}
|
|
2394
2211
|
addDistinctColumnValue(rowNode, columnId) {
|
|
2395
2212
|
// we do not return the values of the aggregates when in grouping mode
|
|
@@ -2405,17 +2222,43 @@ class AdaptableAgGrid {
|
|
|
2405
2222
|
}
|
|
2406
2223
|
}
|
|
2407
2224
|
getUniqueGridCells(column, gridCells) {
|
|
2408
|
-
|
|
2409
|
-
|
|
2225
|
+
const cache = new Map();
|
|
2226
|
+
const lowercase = this.api.predicateApi.useCaseSensitivity();
|
|
2227
|
+
const getter = (dataItem) => {
|
|
2228
|
+
let value = dataItem.rawValue;
|
|
2410
2229
|
if (value instanceof Date) {
|
|
2411
2230
|
return value.toISOString();
|
|
2412
2231
|
}
|
|
2232
|
+
if (lowercase && column.dataType == 'text') {
|
|
2233
|
+
value = dataItem.displayValue.toLowerCase();
|
|
2234
|
+
}
|
|
2413
2235
|
return value;
|
|
2236
|
+
};
|
|
2237
|
+
gridCells.forEach((dataItem) => {
|
|
2238
|
+
const value = getter(dataItem);
|
|
2239
|
+
const primaryKey = dataItem.primaryKeyValue;
|
|
2240
|
+
if (!cache.has(value)) {
|
|
2241
|
+
cache.set(value, {
|
|
2242
|
+
count: 1,
|
|
2243
|
+
cell: dataItem,
|
|
2244
|
+
visible: this.isPrimaryKeyVisible(primaryKey),
|
|
2245
|
+
});
|
|
2246
|
+
}
|
|
2247
|
+
else {
|
|
2248
|
+
const data = cache.get(value);
|
|
2249
|
+
data.count++;
|
|
2250
|
+
data.visible = data.visible || this.isPrimaryKeyVisible(primaryKey);
|
|
2251
|
+
}
|
|
2414
2252
|
});
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2253
|
+
const result = [];
|
|
2254
|
+
cache.forEach(({ count, cell, visible }) => {
|
|
2255
|
+
result.push({
|
|
2256
|
+
...cell,
|
|
2257
|
+
count,
|
|
2258
|
+
visible,
|
|
2259
|
+
});
|
|
2260
|
+
});
|
|
2261
|
+
return result;
|
|
2419
2262
|
}
|
|
2420
2263
|
getGridCellsForColumn(columnId, onlyVisibleRows = false) {
|
|
2421
2264
|
let returnValues = [];
|
|
@@ -2435,27 +2278,6 @@ class AdaptableAgGrid {
|
|
|
2435
2278
|
}
|
|
2436
2279
|
return returnValues;
|
|
2437
2280
|
}
|
|
2438
|
-
// This horrible method is temporary until we can get rid of having predicates inside values which is coming soon
|
|
2439
|
-
// We need it in case Blanks is requested
|
|
2440
|
-
// once we go to the new multi predicate screen then we wont show blanks any more - which we should never have done
|
|
2441
|
-
getGridCellsForColumnTemp(columnId, onlyVisibleRows) {
|
|
2442
|
-
let returnValues = [];
|
|
2443
|
-
const handler = (rowNode) => {
|
|
2444
|
-
if (!this.isGroupRowNode(rowNode)) {
|
|
2445
|
-
const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
|
|
2446
|
-
if (gridCell) {
|
|
2447
|
-
returnValues.push(gridCell);
|
|
2448
|
-
}
|
|
2449
|
-
}
|
|
2450
|
-
};
|
|
2451
|
-
if (onlyVisibleRows) {
|
|
2452
|
-
this.agGridAdapter.getAgGridApi().forEachNodeAfterFilter(handler);
|
|
2453
|
-
}
|
|
2454
|
-
else {
|
|
2455
|
-
this.agGridAdapter.getAgGridApi().forEachNode(handler);
|
|
2456
|
-
}
|
|
2457
|
-
return returnValues;
|
|
2458
|
-
}
|
|
2459
2281
|
getRowNodesForPrimaryKeys(primaryKeyValues) {
|
|
2460
2282
|
let rowNodes = [];
|
|
2461
2283
|
if (this.useRowNodeLookUp) {
|
|
@@ -2483,15 +2305,14 @@ class AdaptableAgGrid {
|
|
|
2483
2305
|
return this.agGridAdapter.getAgGridApi().getDisplayedRowAtIndex(index);
|
|
2484
2306
|
}
|
|
2485
2307
|
getAgGridStatusPanels() {
|
|
2486
|
-
|
|
2487
|
-
return (_b = (_a = this.agGridAdapter.getGridOption('statusBar')) === null || _a === void 0 ? void 0 : _a.statusPanels) !== null && _b !== void 0 ? _b : [];
|
|
2308
|
+
return this.agGridAdapter.getGridOption('statusBar')?.statusPanels ?? [];
|
|
2488
2309
|
}
|
|
2489
2310
|
setDataValue(value, column, primaryKeyValue, rowNode) {
|
|
2490
2311
|
// note: because we use RowNode.setDataValue() this will cause Validation to fire
|
|
2491
2312
|
// see https://www.ag-grid.com/javascript-data-grid/change-detection/#triggering-value-change-detection
|
|
2492
2313
|
let newValue;
|
|
2493
2314
|
let dataType = column.dataType;
|
|
2494
|
-
newValue = dataType == '
|
|
2315
|
+
newValue = dataType == 'number' ? Number(value) : value;
|
|
2495
2316
|
if (dataType == undefined) {
|
|
2496
2317
|
return; // no point continuing as probably a wrong column
|
|
2497
2318
|
}
|
|
@@ -2521,8 +2342,8 @@ class AdaptableAgGrid {
|
|
|
2521
2342
|
}
|
|
2522
2343
|
forAllRowNodesDo(func, config) {
|
|
2523
2344
|
this.agGridAdapter.getAgGridApi().forEachNode((rowNode, rowIndex) => {
|
|
2524
|
-
const includeGroupRows =
|
|
2525
|
-
const filterFnFulfilled = !
|
|
2345
|
+
const includeGroupRows = config?.includeGroupRows || !this.isGroupRowNode(rowNode);
|
|
2346
|
+
const filterFnFulfilled = !config?.filterFn || config?.filterFn(rowNode);
|
|
2526
2347
|
if (includeGroupRows && filterFnFulfilled) {
|
|
2527
2348
|
func(rowNode, rowIndex);
|
|
2528
2349
|
}
|
|
@@ -2536,8 +2357,8 @@ class AdaptableAgGrid {
|
|
|
2536
2357
|
return this.forAllRowNodesDo(func, config);
|
|
2537
2358
|
}
|
|
2538
2359
|
this.agGridAdapter.getAgGridApi().forEachNodeAfterFilterAndSort((rowNode, rowIndex) => {
|
|
2539
|
-
const includeGroupRows =
|
|
2540
|
-
const filterFnFulfilled = !
|
|
2360
|
+
const includeGroupRows = config?.includeGroupRows || !this.isGroupRowNode(rowNode);
|
|
2361
|
+
const filterFnFulfilled = !config?.filterFn || config?.filterFn(rowNode);
|
|
2541
2362
|
if (includeGroupRows && filterFnFulfilled) {
|
|
2542
2363
|
func(rowNode, rowIndex);
|
|
2543
2364
|
}
|
|
@@ -2546,11 +2367,10 @@ class AdaptableAgGrid {
|
|
|
2546
2367
|
getAgGridRowModelType(gridOptions) {
|
|
2547
2368
|
// it seems that this can be null so we need explicitly to return "clientSide" in this case
|
|
2548
2369
|
// need to check that for ServerSideRowModel it is ALWAYS returned...
|
|
2549
|
-
var _a, _b;
|
|
2550
2370
|
if (gridOptions) {
|
|
2551
|
-
return
|
|
2371
|
+
return gridOptions.rowModelType ?? 'clientSide';
|
|
2552
2372
|
}
|
|
2553
|
-
return
|
|
2373
|
+
return this.agGridAdapter.getAgGridApi().getGridOption('rowModelType') ?? 'clientSide';
|
|
2554
2374
|
}
|
|
2555
2375
|
getAllRowNodes(config) {
|
|
2556
2376
|
let rowNodes = [];
|
|
@@ -2609,16 +2429,18 @@ class AdaptableAgGrid {
|
|
|
2609
2429
|
this.agGridAdapter.getAgGridApi().addCellRange(cellRangeParams);
|
|
2610
2430
|
}
|
|
2611
2431
|
getAgGridColumnType(columnId) {
|
|
2612
|
-
|
|
2613
|
-
const { type } = (_a = this.agGridAdapter.getAgGridApi().getColumnDef(columnId)) !== null && _a !== void 0 ? _a : {};
|
|
2432
|
+
const { type } = this.agGridAdapter.getAgGridApi().getColumnDef(columnId) ?? {};
|
|
2614
2433
|
return type || '';
|
|
2615
2434
|
}
|
|
2616
2435
|
setColumnSort(columnSorts) {
|
|
2617
2436
|
if (!this.isReady) {
|
|
2618
2437
|
return;
|
|
2619
2438
|
}
|
|
2620
|
-
const columnSortsMap = columnSorts
|
|
2621
|
-
acc[columnSort.ColumnId] =
|
|
2439
|
+
const columnSortsMap = columnSorts?.reduce((acc, columnSort, index) => {
|
|
2440
|
+
acc[columnSort.ColumnId] = {
|
|
2441
|
+
...columnSort,
|
|
2442
|
+
SortIndex: index,
|
|
2443
|
+
};
|
|
2622
2444
|
return acc;
|
|
2623
2445
|
}, {});
|
|
2624
2446
|
const newColumnState = this.agGridAdapter
|
|
@@ -2626,7 +2448,7 @@ class AdaptableAgGrid {
|
|
|
2626
2448
|
.getColumnState()
|
|
2627
2449
|
.map((colState) => {
|
|
2628
2450
|
const { colId } = colState;
|
|
2629
|
-
const state =
|
|
2451
|
+
const state = { ...colState };
|
|
2630
2452
|
const colSort = columnSortsMap ? columnSortsMap[colId] : undefined;
|
|
2631
2453
|
if (colSort) {
|
|
2632
2454
|
state.sort = colSort.SortOrder === 'Asc' ? 'asc' : 'desc';
|
|
@@ -2647,11 +2469,6 @@ class AdaptableAgGrid {
|
|
|
2647
2469
|
clearColumnSort() {
|
|
2648
2470
|
this.setColumnSort(null);
|
|
2649
2471
|
}
|
|
2650
|
-
hideColumnFilterForm() {
|
|
2651
|
-
if (this.hideFilterFormPopup) {
|
|
2652
|
-
this.hideFilterFormPopup();
|
|
2653
|
-
}
|
|
2654
|
-
}
|
|
2655
2472
|
clearColumnFiltering() {
|
|
2656
2473
|
this.agGridAdapter
|
|
2657
2474
|
.getAgGridApi()
|
|
@@ -2672,11 +2489,11 @@ class AdaptableAgGrid {
|
|
|
2672
2489
|
});
|
|
2673
2490
|
}
|
|
2674
2491
|
canGenerateCharts() {
|
|
2675
|
-
return (this.agGridAdapter.
|
|
2492
|
+
return (this.agGridAdapter.isAgGridModuleRegistered('IntegratedCharts') &&
|
|
2676
2493
|
this.agGridAdapter.getAgGridApi().getGridOption('enableCharts'));
|
|
2677
2494
|
}
|
|
2678
2495
|
canDisplaySparklines() {
|
|
2679
|
-
return this.agGridAdapter.
|
|
2496
|
+
return this.agGridAdapter.isAgGridModuleRegistered('Sparklines');
|
|
2680
2497
|
}
|
|
2681
2498
|
showCharts(chartsDefinitions, chartContainer) {
|
|
2682
2499
|
return chartsDefinitions.map((chartDefinition) => this.showChart(chartDefinition, chartContainer));
|
|
@@ -2696,7 +2513,10 @@ class AdaptableAgGrid {
|
|
|
2696
2513
|
.restoreChart(chartDefinition.Model, container);
|
|
2697
2514
|
const chartModel = this.getChartModels().find((chartModel) => chartModel.chartId === chartRef.chartId);
|
|
2698
2515
|
// Update the definition in state so it is not considered new
|
|
2699
|
-
this.api.chartingApi.editChartDefinition(
|
|
2516
|
+
this.api.chartingApi.editChartDefinition({
|
|
2517
|
+
...chartDefinition,
|
|
2518
|
+
Model: chartModel,
|
|
2519
|
+
});
|
|
2700
2520
|
return chartRef;
|
|
2701
2521
|
}
|
|
2702
2522
|
updateChart(chart) {
|
|
@@ -2726,17 +2546,13 @@ class AdaptableAgGrid {
|
|
|
2726
2546
|
return this.agGridAdapter.getAgGridApi().getDisplayedRowCount();
|
|
2727
2547
|
}
|
|
2728
2548
|
getColumnCount() {
|
|
2729
|
-
|
|
2730
|
-
return (_b = (_a = this.agGridAdapter.getAgGridApi().getColumns()) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
2549
|
+
return this.agGridAdapter.getAgGridApi().getColumns()?.length ?? 0;
|
|
2731
2550
|
}
|
|
2732
2551
|
getVisibleColumnCount() {
|
|
2733
|
-
|
|
2734
|
-
return ((_b = (_a = this.agGridAdapter
|
|
2552
|
+
return (this.agGridAdapter
|
|
2735
2553
|
.getAgGridApi()
|
|
2736
|
-
.getColumns()
|
|
2737
|
-
|
|
2738
|
-
isGridGroupable() {
|
|
2739
|
-
return !this.api.internalApi.isGridInTreeMode();
|
|
2554
|
+
.getColumns()
|
|
2555
|
+
?.filter((c) => c.isVisible()).length ?? 0);
|
|
2740
2556
|
}
|
|
2741
2557
|
isGridGroupingActive() {
|
|
2742
2558
|
let isGroupedActive = false;
|
|
@@ -2752,6 +2568,9 @@ class AdaptableAgGrid {
|
|
|
2752
2568
|
setAgGridQuickSearch(searchText) {
|
|
2753
2569
|
this.agGridAdapter.setGridOption('quickFilterText', searchText);
|
|
2754
2570
|
}
|
|
2571
|
+
clearAgGridQuickSearch() {
|
|
2572
|
+
this.setAgGridQuickSearch('');
|
|
2573
|
+
}
|
|
2755
2574
|
getAgGridCurrentThemeName() {
|
|
2756
2575
|
const container = this.getAgGridContainerElement();
|
|
2757
2576
|
if (container && container.classList) {
|
|
@@ -2790,7 +2609,7 @@ class AdaptableAgGrid {
|
|
|
2790
2609
|
const container = this.getAgGridContainerElement();
|
|
2791
2610
|
if (container != null) {
|
|
2792
2611
|
container.classList.add('ab-Grid');
|
|
2793
|
-
if (this.adaptableOptions.columnFilterOptions.indicateFilteredColumns) {
|
|
2612
|
+
if (this.adaptableOptions.filterOptions.columnFilterOptions.indicateFilteredColumns) {
|
|
2794
2613
|
container.classList.add('ab-Grid--indicate-filtered-columns');
|
|
2795
2614
|
}
|
|
2796
2615
|
}
|
|
@@ -2806,7 +2625,7 @@ class AdaptableAgGrid {
|
|
|
2806
2625
|
// we mutate the theme later,
|
|
2807
2626
|
// and since we don't want the mutation to end up in state
|
|
2808
2627
|
// we better clone it here
|
|
2809
|
-
return
|
|
2628
|
+
return { ...t };
|
|
2810
2629
|
});
|
|
2811
2630
|
const allThemesMap = allThemes.reduce((acc, theme) => {
|
|
2812
2631
|
acc[theme.Name] = theme;
|
|
@@ -2938,36 +2757,15 @@ class AdaptableAgGrid {
|
|
|
2938
2757
|
this.agGridAdapter.getAgGridApi().onGroupExpandedOrCollapsed();
|
|
2939
2758
|
}
|
|
2940
2759
|
}
|
|
2941
|
-
getExpandRowGroupsKeys() {
|
|
2942
|
-
let returnValues = [];
|
|
2943
|
-
if (this.api.layoutApi.internalApi.areExpandedRowGroupsSavedInLayouts()) {
|
|
2944
|
-
this.agGridAdapter.getAgGridApi().forEachNode((node) => {
|
|
2945
|
-
if (node.group && node.expanded) {
|
|
2946
|
-
let current = node;
|
|
2947
|
-
const path = [];
|
|
2948
|
-
while (current) {
|
|
2949
|
-
path.push(current.key);
|
|
2950
|
-
current = current.parent;
|
|
2951
|
-
}
|
|
2952
|
-
returnValues.push(path
|
|
2953
|
-
.filter((x) => !!x)
|
|
2954
|
-
.reverse()
|
|
2955
|
-
.join(GeneralConstants_1.GROUP_PATH_SEPARATOR));
|
|
2956
|
-
}
|
|
2957
|
-
});
|
|
2958
|
-
}
|
|
2959
|
-
return returnValues;
|
|
2960
|
-
}
|
|
2961
2760
|
getAgGridColumnForColumnId(columnId) {
|
|
2962
2761
|
return this.agGridAdapter.getAgGridApi().getColumn(columnId);
|
|
2963
2762
|
}
|
|
2964
2763
|
getMinMaxCachedValueForColumn(column, minMax) {
|
|
2965
|
-
var _a;
|
|
2966
2764
|
const { columnId, dataType } = column;
|
|
2967
|
-
if (dataType !== '
|
|
2765
|
+
if (dataType !== 'number') {
|
|
2968
2766
|
return undefined;
|
|
2969
2767
|
}
|
|
2970
|
-
let value =
|
|
2768
|
+
let value = this.columnMinMaxValuesCache[columnId]?.[minMax];
|
|
2971
2769
|
if (value !== undefined) {
|
|
2972
2770
|
return value;
|
|
2973
2771
|
}
|
|
@@ -2975,14 +2773,13 @@ class AdaptableAgGrid {
|
|
|
2975
2773
|
.getUnsortedDistinctRawValuesForColumn(columnId)
|
|
2976
2774
|
.map((item) => item.rawValue);
|
|
2977
2775
|
value = minMax === 'min' ? Math.min(...distinctRawValues) : Math.max(...distinctRawValues);
|
|
2978
|
-
this.columnMinMaxValuesCache[columnId] =
|
|
2776
|
+
this.columnMinMaxValuesCache[columnId] = {
|
|
2777
|
+
...this.columnMinMaxValuesCache[columnId],
|
|
2778
|
+
[minMax]: value,
|
|
2779
|
+
};
|
|
2979
2780
|
return value;
|
|
2980
2781
|
}
|
|
2981
|
-
getAgGridRegisteredModules() {
|
|
2982
|
-
return this.agGridAdapter.getRegisteredModules();
|
|
2983
|
-
}
|
|
2984
2782
|
destroy(config) {
|
|
2985
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
|
|
2986
2783
|
if (!config) {
|
|
2987
2784
|
config = {
|
|
2988
2785
|
unmount: true,
|
|
@@ -2998,16 +2795,13 @@ class AdaptableAgGrid {
|
|
|
2998
2795
|
config.destroyAgGrid = true;
|
|
2999
2796
|
}
|
|
3000
2797
|
}
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
if (
|
|
2798
|
+
this.__prevLayoutForOnChange = undefined;
|
|
2799
|
+
this.layoutManager.destroy();
|
|
2800
|
+
this.filteredOutPrimaryKeys.clear();
|
|
2801
|
+
if (this.agGridAdapter?.getAgGridApi() && !this.agGridAdapter.getAgGridApi().isDestroyed()) {
|
|
3005
2802
|
this.agGridAdapter
|
|
3006
2803
|
.getAgGridApi()
|
|
3007
2804
|
.removeEventListener('firstDataRendered', this.listenerFirstDataRendered);
|
|
3008
|
-
this.agGridAdapter
|
|
3009
|
-
.getAgGridApi()
|
|
3010
|
-
.removeEventListener('columnPivotModeChanged', this.listenerPivotModeChanged);
|
|
3011
2805
|
this.agGridAdapter
|
|
3012
2806
|
.getAgGridApi()
|
|
3013
2807
|
.removeEventListener('columnPivotChanged', this.listenerPivotChanged);
|
|
@@ -3040,7 +2834,6 @@ class AdaptableAgGrid {
|
|
|
3040
2834
|
.getAgGridApi()
|
|
3041
2835
|
.removeGlobalListener(this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave);
|
|
3042
2836
|
this.listenerFirstDataRendered = null;
|
|
3043
|
-
this.listenerPivotModeChanged = null;
|
|
3044
2837
|
this.listenerPivotChanged = null;
|
|
3045
2838
|
this.listenerCellEditingStarted = null;
|
|
3046
2839
|
this.listenerColumnRowGroupChanged = null;
|
|
@@ -3052,9 +2845,8 @@ class AdaptableAgGrid {
|
|
|
3052
2845
|
this.listenerGlobalColumnEventsThatTriggerStateChange = null;
|
|
3053
2846
|
this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = null;
|
|
3054
2847
|
this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave = null;
|
|
3055
|
-
this.
|
|
3056
|
-
|
|
3057
|
-
const liveGridOptions = this.DANGER_getPrivateAgGridBeans().gridOptions;
|
|
2848
|
+
this.throttleFilterOnDataChange = null;
|
|
2849
|
+
const liveGridOptions = this.agGridAdapter.DANGER_getLiveGridOptions();
|
|
3058
2850
|
if (liveGridOptions) {
|
|
3059
2851
|
this.agGridOptionsService.revertGridOptionsPropertiesToUserValue(liveGridOptions, [
|
|
3060
2852
|
'aggFuncs',
|
|
@@ -3071,7 +2863,6 @@ class AdaptableAgGrid {
|
|
|
3071
2863
|
'getRowId',
|
|
3072
2864
|
'getRowStyle',
|
|
3073
2865
|
'gridId',
|
|
3074
|
-
'initialGroupOrderComparator',
|
|
3075
2866
|
'isExternalFilterPresent',
|
|
3076
2867
|
'sideBar',
|
|
3077
2868
|
'statusBar',
|
|
@@ -3082,10 +2873,8 @@ class AdaptableAgGrid {
|
|
|
3082
2873
|
}
|
|
3083
2874
|
}
|
|
3084
2875
|
}
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
if ((config === null || config === void 0 ? void 0 : config.destroyApi) === true || (config === null || config === void 0 ? void 0 : config.destroyAgGrid) === true) {
|
|
3088
|
-
(_b = this.agGridAdapter.getAgGridApi()) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
2876
|
+
if (config?.destroyAgGrid === true) {
|
|
2877
|
+
this.agGridAdapter.getAgGridApi()?.destroy();
|
|
3089
2878
|
}
|
|
3090
2879
|
this.previousAgGridLayoutState = '';
|
|
3091
2880
|
const gridContainerElement = this.getAgGridContainerElement();
|
|
@@ -3098,14 +2887,18 @@ class AdaptableAgGrid {
|
|
|
3098
2887
|
this.agGridListenerMouseLeave = null;
|
|
3099
2888
|
}
|
|
3100
2889
|
this.api._internalDestroySelf();
|
|
3101
|
-
|
|
2890
|
+
this.layoutManager?.destroy();
|
|
2891
|
+
this.layoutManager = null;
|
|
2892
|
+
this.agGridOptionsService?.destroy();
|
|
3102
2893
|
this.agGridOptionsService = null;
|
|
3103
|
-
|
|
2894
|
+
this.agGridAdapter?.destroy();
|
|
3104
2895
|
this.agGridAdapter = null;
|
|
3105
|
-
|
|
2896
|
+
this.agGridMenuAdapter?.destroy();
|
|
3106
2897
|
this.agGridMenuAdapter = null;
|
|
3107
|
-
|
|
2898
|
+
this.agGridColumnAdapter?.destroy();
|
|
3108
2899
|
this.agGridColumnAdapter = null;
|
|
2900
|
+
this.agGridExportAdapter?.destroy();
|
|
2901
|
+
this.agGridExportAdapter = null;
|
|
3109
2902
|
this.rowListeners = null;
|
|
3110
2903
|
this.emitter.destroy();
|
|
3111
2904
|
this.emitter = null;
|
|
@@ -3114,189 +2907,65 @@ class AdaptableAgGrid {
|
|
|
3114
2907
|
this.lifecycleState = 'preDestroyed';
|
|
3115
2908
|
AdaptableAgGrid.dismissInstance(this);
|
|
3116
2909
|
// !! this has to be before clearing up references to container and/or adaptableOptions
|
|
3117
|
-
if (config
|
|
2910
|
+
if (config?.unmount) {
|
|
3118
2911
|
const abContainerElement = this.getAdaptableContainerElement();
|
|
3119
2912
|
if (abContainerElement != null) {
|
|
3120
|
-
|
|
2913
|
+
this.unmountReactRoot?.();
|
|
3121
2914
|
}
|
|
3122
2915
|
this.unmountReactRoot = null;
|
|
3123
2916
|
}
|
|
3124
2917
|
this.DANGER_USE_GETTER_adaptableContainerElement = null;
|
|
3125
2918
|
this.DANGER_USE_GETTER_agGridContainerElement = null;
|
|
3126
|
-
this.debouncedSaveGridLayout = null;
|
|
3127
|
-
this.debouncedSetColumnIntoStore = null;
|
|
3128
2919
|
this.debouncedSetSelectedCells = null;
|
|
3129
2920
|
this.debouncedSetSelectedRows = null;
|
|
3130
|
-
|
|
2921
|
+
this.adaptableStore?.destroy();
|
|
3131
2922
|
this.adaptableStore = null;
|
|
3132
|
-
|
|
2923
|
+
this.adaptableModules?.clear();
|
|
3133
2924
|
this.adaptableModules = null;
|
|
3134
2925
|
this.adaptableOptions = null;
|
|
3135
2926
|
this.adaptableStatusPanelKeys = null;
|
|
3136
|
-
|
|
2927
|
+
this.CalculatedColumnExpressionService?.destroy?.();
|
|
3137
2928
|
this.CalculatedColumnExpressionService = null;
|
|
3138
|
-
|
|
2929
|
+
this.DataService?.destroy?.();
|
|
3139
2930
|
this.DataService = null;
|
|
3140
|
-
|
|
2931
|
+
this.Fdc3Service?.destroy?.();
|
|
3141
2932
|
this.Fdc3Service = null;
|
|
3142
|
-
|
|
2933
|
+
this.ModuleService?.destroy?.();
|
|
3143
2934
|
this.ModuleService = null;
|
|
3144
|
-
|
|
2935
|
+
this.ValidationService?.destroy?.();
|
|
3145
2936
|
this.ValidationService = null;
|
|
3146
|
-
|
|
2937
|
+
this.QueryLanguageService?.destroy?.();
|
|
3147
2938
|
this.QueryLanguageService = null;
|
|
3148
|
-
|
|
2939
|
+
this.AlertService?.destroy?.();
|
|
3149
2940
|
this.AlertService = null;
|
|
3150
|
-
|
|
2941
|
+
this.TeamSharingService?.destroy?.();
|
|
3151
2942
|
this.TeamSharingService = null;
|
|
3152
|
-
|
|
3153
|
-
this.
|
|
3154
|
-
|
|
2943
|
+
this.RowFormService?.destroy?.();
|
|
2944
|
+
this.RowFormService = null;
|
|
2945
|
+
this.MetamodelService?.destroy?.();
|
|
3155
2946
|
this.MetamodelService = null;
|
|
3156
|
-
|
|
2947
|
+
this.LicenseService?.destroy?.();
|
|
3157
2948
|
this.LicenseService = null;
|
|
3158
|
-
|
|
2949
|
+
this.FlashingCellService?.destroy?.();
|
|
3159
2950
|
this.FlashingCellService = null;
|
|
3160
|
-
|
|
2951
|
+
this.ThemeService?.destroy?.();
|
|
3161
2952
|
this.ThemeService = null;
|
|
3162
|
-
|
|
2953
|
+
this.ChartingService?.destroy?.();
|
|
3163
2954
|
this.ChartingService = null;
|
|
3164
|
-
|
|
3165
|
-
this.
|
|
3166
|
-
|
|
2955
|
+
this.AnnotationsService?.destroy?.();
|
|
2956
|
+
this.AnnotationsService = null;
|
|
2957
|
+
this.unmountLoadingScreen?.();
|
|
3167
2958
|
this.unmountLoadingScreen = null;
|
|
3168
2959
|
}
|
|
3169
2960
|
canExportToExcel() {
|
|
3170
|
-
return this.agGridAdapter.
|
|
2961
|
+
return this.agGridAdapter.isAgGridModuleRegistered('ExcelExport');
|
|
3171
2962
|
}
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
field: column.columnId,
|
|
3175
|
-
headerName: column.friendlyName,
|
|
3176
|
-
}));
|
|
3177
|
-
const NESTED_COL_SEPARATOR = '.';
|
|
3178
|
-
const nestedColumns = reportData.columns.filter((column) => column.columnId.includes(NESTED_COL_SEPARATOR));
|
|
3179
|
-
if (nestedColumns.length) {
|
|
3180
|
-
// the rowData of nested fields (containing dots) was flattened during the report data extraction and we need to un-flatten it back
|
|
3181
|
-
// ex.
|
|
3182
|
-
// current state: { field: 'outerKey.innerKey', value: 2}
|
|
3183
|
-
// original (desired) state: { field: 'outerKey.innerKey', value: {outerKey: {innerKey: 2}}}
|
|
3184
|
-
reportData.rows.forEach((rowDataEntry) => nestedColumns.forEach((nestedColumn) => {
|
|
3185
|
-
const cellExportValue = rowDataEntry[nestedColumn.columnId];
|
|
3186
|
-
let intermediaryValue = rowDataEntry;
|
|
3187
|
-
// augment the rowDataEntry with the new object
|
|
3188
|
-
nestedColumn.columnId
|
|
3189
|
-
.split(NESTED_COL_SEPARATOR)
|
|
3190
|
-
.forEach((nestedKey, index, nestedCols) => {
|
|
3191
|
-
// we reached the leaf node, so we set the cell value and break
|
|
3192
|
-
if (index === nestedCols.length - 1) {
|
|
3193
|
-
intermediaryValue[nestedKey] = cellExportValue;
|
|
3194
|
-
return;
|
|
3195
|
-
}
|
|
3196
|
-
if (intermediaryValue[nestedKey] == undefined) {
|
|
3197
|
-
intermediaryValue[nestedKey] = {};
|
|
3198
|
-
} // else means that the object already has a property with this key
|
|
3199
|
-
intermediaryValue = intermediaryValue[nestedKey];
|
|
3200
|
-
});
|
|
3201
|
-
// delete the obsolete flattened property
|
|
3202
|
-
delete rowDataEntry[nestedColumn.columnId];
|
|
3203
|
-
}));
|
|
3204
|
-
}
|
|
3205
|
-
const gridOptions = {
|
|
3206
|
-
columnDefs,
|
|
3207
|
-
rowData: reportData.rows,
|
|
3208
|
-
};
|
|
3209
|
-
let gridParams = { modules: this.getAgGridRegisteredModules() };
|
|
3210
|
-
const ephemeralGridApi = (0, core_1.createGrid)(document.createElement('div'), gridOptions, gridParams);
|
|
3211
|
-
ephemeralGridApi.exportDataAsExcel({
|
|
3212
|
-
sheetName: 'Sheet 1',
|
|
3213
|
-
fileName: fileName,
|
|
3214
|
-
});
|
|
3215
|
-
ephemeralGridApi.destroy();
|
|
3216
|
-
}
|
|
3217
|
-
exportVisualDataToExcel() {
|
|
3218
|
-
try {
|
|
3219
|
-
const exportExcelStyles = this.api.exportApi.internalApi.buildExcelStylesForVisualReports();
|
|
3220
|
-
// set DANGER_excelStyles without changing the array reference
|
|
3221
|
-
this.DANGER_excelStyles.splice(0, this.DANGER_excelStyles.length, ...exportExcelStyles);
|
|
3222
|
-
// this.agGridOptionsService.CAREFUL_patchGridOptionsProperty('excelStyles', exportExcelStyles);
|
|
3223
|
-
this.agGridAdapter.getAgGridApi().exportDataAsExcel({
|
|
3224
|
-
sheetName: 'Sheet 1',
|
|
3225
|
-
fileName: this.api.exportApi.internalApi.getReportFileName(this.adaptableOptions.adaptableId, 'Excel'),
|
|
3226
|
-
// delegate the cell value processing to Adaptable
|
|
3227
|
-
processCellCallback: ({ node, column, value }) => {
|
|
3228
|
-
var _a;
|
|
3229
|
-
const columnId = column.getColId();
|
|
3230
|
-
if ((node === null || node === void 0 ? void 0 : node.group) &&
|
|
3231
|
-
(this.api.columnApi.isAutoRowGroupColumn(columnId) ||
|
|
3232
|
-
// we would still need to process the cell if this is a group row with an aggregated value
|
|
3233
|
-
((_a = node === null || node === void 0 ? void 0 : node.aggData) === null || _a === void 0 ? void 0 : _a[columnId]) == undefined)) {
|
|
3234
|
-
// skip processing of row groups, this was already handled in processRowGroupCallback()
|
|
3235
|
-
return value;
|
|
3236
|
-
}
|
|
3237
|
-
return this.processCellForExcelExport(node, columnId);
|
|
3238
|
-
},
|
|
3239
|
-
processRowGroupCallback: (params) => {
|
|
3240
|
-
var _a;
|
|
3241
|
-
// recreating the standard AG Grid styling for row groups: 'Parent -> Child'
|
|
3242
|
-
// additionally the values are formatted
|
|
3243
|
-
let rowGroupNode = params.node;
|
|
3244
|
-
const isFooterRow = rowGroupNode.footer;
|
|
3245
|
-
const rowGroupSummary = [(_a = this.processRowGroupForExcelExport(rowGroupNode)) !== null && _a !== void 0 ? _a : ''];
|
|
3246
|
-
while (rowGroupNode.parent) {
|
|
3247
|
-
rowGroupNode = rowGroupNode.parent;
|
|
3248
|
-
const formattedParentNode = this.processRowGroupForExcelExport(rowGroupNode);
|
|
3249
|
-
if (formattedParentNode) {
|
|
3250
|
-
rowGroupSummary.push(formattedParentNode);
|
|
3251
|
-
}
|
|
3252
|
-
}
|
|
3253
|
-
let summary = rowGroupSummary.reverse().join(' -> ');
|
|
3254
|
-
if (isFooterRow) {
|
|
3255
|
-
summary = `Total: ${summary}`;
|
|
3256
|
-
}
|
|
3257
|
-
return summary;
|
|
3258
|
-
},
|
|
3259
|
-
});
|
|
3260
|
-
this.DANGER_excelStyles.splice(0, this.DANGER_excelStyles.length, ...this.originalExcelStyles);
|
|
3261
|
-
}
|
|
3262
|
-
catch (error) {
|
|
3263
|
-
this.logger.consoleError('Error exporting visual data to Excel', error);
|
|
3264
|
-
}
|
|
3265
|
-
}
|
|
3266
|
-
processRowGroupForExcelExport(rowNode) {
|
|
3267
|
-
var _a, _b, _c, _d, _e;
|
|
3268
|
-
const columnId = (_c = (_a = rowNode.field) !== null && _a !== void 0 ? _a : (_b = rowNode.rowGroupColumn) === null || _b === void 0 ? void 0 : _b.getColId()) !== null && _c !== void 0 ? _c : (_e = (_d = rowNode.rowGroupColumn) === null || _d === void 0 ? void 0 : _d.getColDef()) === null || _e === void 0 ? void 0 : _e.field;
|
|
3269
|
-
if (!columnId || !rowNode.key) {
|
|
3270
|
-
return;
|
|
3271
|
-
}
|
|
3272
|
-
let rawValue = rowNode.key;
|
|
3273
|
-
if (this.api.columnApi.getColumnDataTypeForColumnId(columnId) === 'Date' &&
|
|
3274
|
-
typeof rawValue === 'string' &&
|
|
3275
|
-
// rawValue is composed only of digits
|
|
3276
|
-
/^\d+$/.test(rawValue)) {
|
|
3277
|
-
// AG-Grid converts the value to string, we have to reconvert it back
|
|
3278
|
-
const dateRawValue = parseInt(rawValue);
|
|
3279
|
-
if (dateRawValue != undefined) {
|
|
3280
|
-
// @ts-ignore
|
|
3281
|
-
rawValue = dateRawValue;
|
|
3282
|
-
}
|
|
3283
|
-
}
|
|
3284
|
-
return this.api.exportApi.internalApi.getCellExportValueFromRawValue(rowNode, rawValue, columnId, GeneralConstants.VISUAL_DATA_REPORT);
|
|
3285
|
-
}
|
|
3286
|
-
processCellForExcelExport(rowNode, columnId) {
|
|
3287
|
-
if (this.api.exportApi.internalApi.isVisualDataExportInProgress()) {
|
|
3288
|
-
const cellKey = this.agGridColumnAdapter.getExcelClassNameForCell(columnId, this.getPrimaryKeyValueFromRowNode(rowNode));
|
|
3289
|
-
const isoFormattedDate = this.api.exportApi.internalApi.getExcelStyleWithFormattedDate(cellKey);
|
|
3290
|
-
if (isoFormattedDate) {
|
|
3291
|
-
// this is a Date cell which will be formatted by Excel
|
|
3292
|
-
return isoFormattedDate;
|
|
3293
|
-
}
|
|
3294
|
-
}
|
|
3295
|
-
return this.api.exportApi.internalApi.getCellExportValueFromRowNode(rowNode, columnId, GeneralConstants.VISUAL_DATA_REPORT);
|
|
2963
|
+
canExportToCsv() {
|
|
2964
|
+
return this.agGridAdapter.isAgGridModuleRegistered('CsvExport');
|
|
3296
2965
|
}
|
|
3297
2966
|
isQuickFilterAvailable() {
|
|
3298
2967
|
if (this.api.layoutApi.isCurrentLayoutPivot() &&
|
|
3299
|
-
this.adaptableOptions.
|
|
2968
|
+
this.adaptableOptions.filterOptions.useAdaptableFiltering) {
|
|
3300
2969
|
// hide completely the quick filter if pivot is enabled
|
|
3301
2970
|
return false;
|
|
3302
2971
|
}
|
|
@@ -3320,152 +2989,23 @@ class AdaptableAgGrid {
|
|
|
3320
2989
|
return this.agGridAdapter.getAgGridApi().getChartRef(chartId);
|
|
3321
2990
|
}
|
|
3322
2991
|
setLayout(layout) {
|
|
3323
|
-
var _a, _b, _c, _d, _e, _f;
|
|
3324
2992
|
if (!layout) {
|
|
3325
2993
|
layout = this.api.layoutApi.getCurrentLayout();
|
|
3326
2994
|
}
|
|
2995
|
+
(0, LayoutHelpers_1.checkForDuplicateColumns)(layout);
|
|
2996
|
+
const isLayoutSwitch = this._prevLayout && layout.Name != this._prevLayout.Name;
|
|
2997
|
+
let shouldUpdateExpandState = isLayoutSwitch;
|
|
2998
|
+
if (!isLayoutSwitch &&
|
|
2999
|
+
this._prevLayout &&
|
|
3000
|
+
layout.RowGroupValues?.RowGroupDefaultBehavior &&
|
|
3001
|
+
this._prevLayout?.RowGroupValues?.RowGroupDefaultBehavior !=
|
|
3002
|
+
layout.RowGroupValues?.RowGroupDefaultBehavior) {
|
|
3003
|
+
shouldUpdateExpandState = true;
|
|
3004
|
+
}
|
|
3005
|
+
this._prevLayout = layout;
|
|
3327
3006
|
const perfSetLayout = this.logger.beginPerf(`setLayout(${layout.Name})`);
|
|
3328
|
-
|
|
3329
|
-
const actionRowColumn = this.api.actionRowApi.internalApi.getColDefsForActionRowColumns()[0];
|
|
3330
|
-
if (actionRowColumn) {
|
|
3331
|
-
layout.Columns.push(actionRowColumn.colId);
|
|
3332
|
-
layout.PinnedColumnsMap = layout.PinnedColumnsMap || {};
|
|
3333
|
-
layout.PinnedColumnsMap[actionRowColumn.colId] = actionRowColumn.pinned;
|
|
3334
|
-
}
|
|
3335
|
-
const columnsState = this.agGridAdapter.getAgGridApi().getColumnState();
|
|
3336
|
-
const columnsStateIndexes = {};
|
|
3337
|
-
const columnsStateMap = columnsState.reduce((acc, colState, index) => {
|
|
3338
|
-
columnsStateIndexes[colState.colId] = index;
|
|
3339
|
-
acc[colState.colId] = colState;
|
|
3340
|
-
return acc;
|
|
3341
|
-
}, {});
|
|
3342
|
-
let sortIndex = 0;
|
|
3343
|
-
const sortModelMap = ((_a = layout.ColumnSorts) !== null && _a !== void 0 ? _a : []).reduce((acc, customSort) => {
|
|
3344
|
-
const colId = customSort.ColumnId;
|
|
3345
|
-
acc[colId] = {
|
|
3346
|
-
colId,
|
|
3347
|
-
sort: customSort.SortOrder === 'Asc' ? 'asc' : 'desc',
|
|
3348
|
-
sortIndex,
|
|
3349
|
-
};
|
|
3350
|
-
sortIndex++;
|
|
3351
|
-
return acc;
|
|
3352
|
-
}, {});
|
|
3353
|
-
const groupedColumnsIndexesMap = (layout.RowGroupedColumns || []).reduce((acc, colId, index) => {
|
|
3354
|
-
acc[colId] = index;
|
|
3355
|
-
return acc;
|
|
3356
|
-
}, {});
|
|
3357
|
-
let pivotedColumnsIndexesMap = {};
|
|
3358
|
-
const aggregationFunctionsColumnsMap = layout.AggregationColumns || {};
|
|
3359
|
-
const columnsToShow = !layout.EnablePivot
|
|
3360
|
-
? layout.Columns
|
|
3361
|
-
: ((_b = this.agGridAdapter
|
|
3362
|
-
.getAgGridApi()
|
|
3363
|
-
.getPivotResultColumns()) === null || _b === void 0 ? void 0 : _b.map((column) => column.getColId())) || [];
|
|
3364
|
-
let isChanged = false;
|
|
3365
|
-
const colsToAutoSize = {};
|
|
3366
|
-
let newColumnsState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState, layout);
|
|
3367
|
-
newColumnsState = newColumnsState
|
|
3368
|
-
.map((colState) => {
|
|
3369
|
-
var _a, _b, _c;
|
|
3370
|
-
const { colId } = colState;
|
|
3371
|
-
const oldColState = columnsStateMap[colId];
|
|
3372
|
-
// it's important to have width here, so it's not inherited from the existing colState
|
|
3373
|
-
// which could be from a different layout
|
|
3374
|
-
const newColState = Object.assign(Object.assign(Object.assign({}, oldColState), { width: null }), colState);
|
|
3375
|
-
if (layout.ColumnWidthMap && layout.ColumnWidthMap[colId] != null) {
|
|
3376
|
-
newColState.width = layout.ColumnWidthMap[colId];
|
|
3377
|
-
}
|
|
3378
|
-
else if (!colState.hide) {
|
|
3379
|
-
// autosize only the columns which are part of the selected layout
|
|
3380
|
-
colsToAutoSize[colId] = true;
|
|
3381
|
-
}
|
|
3382
|
-
if (actionRowColumn && actionRowColumn.colId === colId) {
|
|
3383
|
-
newColState.width = actionRowColumn.width;
|
|
3384
|
-
}
|
|
3385
|
-
newColState.rowGroupIndex =
|
|
3386
|
-
groupedColumnsIndexesMap[colId] != null ? groupedColumnsIndexesMap[colId] : null;
|
|
3387
|
-
newColState.rowGroup = newColState.rowGroupIndex != null;
|
|
3388
|
-
const normalizePinned = (pinnedValue) => {
|
|
3389
|
-
if (typeof pinnedValue === 'string') {
|
|
3390
|
-
return pinnedValue;
|
|
3391
|
-
}
|
|
3392
|
-
return pinnedValue == true ? 'left' : !!pinnedValue;
|
|
3393
|
-
};
|
|
3394
|
-
const newValuePinned = normalizePinned(layout.PinnedColumnsMap ? layout.PinnedColumnsMap[colId] : false);
|
|
3395
|
-
const stateValuePinned = normalizePinned(newColState.pinned);
|
|
3396
|
-
if (newValuePinned !== stateValuePinned) {
|
|
3397
|
-
newColState.pinned = newValuePinned;
|
|
3398
|
-
}
|
|
3399
|
-
newColState.pivotIndex = null;
|
|
3400
|
-
if (pivotedColumnsIndexesMap[colId] != null) {
|
|
3401
|
-
newColState.pivotIndex = pivotedColumnsIndexesMap[colId];
|
|
3402
|
-
}
|
|
3403
|
-
newColState.aggFunc = null;
|
|
3404
|
-
if (aggregationFunctionsColumnsMap[colId] != null) {
|
|
3405
|
-
const colDef = this.agGridAdapter.getAgGridApi().getColumnDef(colId);
|
|
3406
|
-
let aggFunc = null;
|
|
3407
|
-
const aggFuncFromLayout = aggregationFunctionsColumnsMap[colId];
|
|
3408
|
-
const adaptableAggFunc = this.getActiveAdaptableAggFuncForCol(colId);
|
|
3409
|
-
if (aggFuncFromLayout === true) {
|
|
3410
|
-
// if we have true, it means - take the default aggFunc from colDef
|
|
3411
|
-
// NOTE: colState gives us the current aggFunc, which can be null,
|
|
3412
|
-
// while the colDef gives us the initially configured aggFunc for that column
|
|
3413
|
-
aggFunc =
|
|
3414
|
-
(_c = (_b = (_a = colState.aggFunc) !== null && _a !== void 0 ? _a : colDef === null || colDef === void 0 ? void 0 : colDef.aggFunc) !== null && _b !== void 0 ? _b :
|
|
3415
|
-
// @ts-ignore available only wth ag-Grid v27.3.x
|
|
3416
|
-
colDef === null || colDef === void 0 ? void 0 : colDef.defaultAggFunc) !== null && _c !== void 0 ? _c : 'sum';
|
|
3417
|
-
}
|
|
3418
|
-
else if (adaptableAggFunc && adaptableAggFunc.type === 'weightedAverage') {
|
|
3419
|
-
aggFunc = AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME;
|
|
3420
|
-
}
|
|
3421
|
-
else if (typeof aggFuncFromLayout === 'string') {
|
|
3422
|
-
aggFunc = aggFuncFromLayout;
|
|
3423
|
-
}
|
|
3424
|
-
newColState.aggFunc = aggFunc;
|
|
3425
|
-
}
|
|
3426
|
-
if (sortModelMap[colId]) {
|
|
3427
|
-
newColState.sort = sortModelMap[colId].sort;
|
|
3428
|
-
newColState.sortIndex = sortModelMap[colId].sortIndex;
|
|
3429
|
-
}
|
|
3430
|
-
else {
|
|
3431
|
-
newColState.sort = null;
|
|
3432
|
-
newColState.sortIndex = null;
|
|
3433
|
-
}
|
|
3434
|
-
isChanged = isChanged || !(0, isEqual_1.default)(newColState, oldColState);
|
|
3435
|
-
return newColState;
|
|
3436
|
-
})
|
|
3437
|
-
.filter((x) => !!x);
|
|
3438
|
-
if (!isChanged) {
|
|
3439
|
-
// order changed
|
|
3440
|
-
const toString = (c) => `${c.colId}-${c.rowGroupIndex}-${c.pivotIndex}-${c.aggFunc}-${c.pinned}-${c.width}-${c.hide}`;
|
|
3441
|
-
const oldColStateString = columnsState.map(toString).join(',');
|
|
3442
|
-
const newColStateString = newColumnsState.map(toString).join(',');
|
|
3443
|
-
isChanged = newColStateString != oldColStateString;
|
|
3444
|
-
}
|
|
3445
|
-
const pivoted = !!layout.EnablePivot;
|
|
3446
|
-
const shouldUpdatePivoted = this.agGridAdapter.getAgGridApi().isPivotMode() !== pivoted;
|
|
3447
|
-
/**
|
|
3448
|
-
* Pivot columns are secondary columns that are created on the fly and base
|
|
3449
|
-
* their configuration on the main columns by copying that configuration.
|
|
3450
|
-
* Because they copy the colDefs they might have an old copy of the colldefs.
|
|
3451
|
-
* This is why when the layout is pivoted we need to set columns before pivoting is applied.
|
|
3452
|
-
* e.g. {
|
|
3453
|
-
* field: 'pivot-1',
|
|
3454
|
-
* pivotValueColumn: {
|
|
3455
|
-
* colDef: {
|
|
3456
|
-
* field: 'price',
|
|
3457
|
-
* // this is a copy of the original column
|
|
3458
|
-
* }
|
|
3459
|
-
* }
|
|
3460
|
-
*
|
|
3461
|
-
*/
|
|
3462
|
-
if (shouldUpdatePivoted) {
|
|
3463
|
-
this.updateColumnModelAndRefreshGrid();
|
|
3464
|
-
}
|
|
3465
|
-
isChanged = isChanged || shouldUpdatePivoted;
|
|
3466
|
-
let shouldUpdateHeaders = false;
|
|
3007
|
+
const isPivot = (0, LayoutHelpers_1.isPivotLayout)(layout);
|
|
3467
3008
|
// update the header name for all columns
|
|
3468
|
-
// there should be a simpler solution for this, once the Layout Management is refactored
|
|
3469
3009
|
this.agGridAdapter
|
|
3470
3010
|
.getAgGridApi()
|
|
3471
3011
|
.getColumns()
|
|
@@ -3479,66 +3019,27 @@ class AdaptableAgGrid {
|
|
|
3479
3019
|
colId,
|
|
3480
3020
|
abColumn,
|
|
3481
3021
|
};
|
|
3482
|
-
|
|
3483
|
-
this.agGridColumnAdapter.setupColumnHeader(colSetupInfo) || shouldUpdateHeaders;
|
|
3022
|
+
this.agGridColumnAdapter.setupColumnHeader(colSetupInfo);
|
|
3484
3023
|
});
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
if (shouldUpdatePivoted) {
|
|
3492
|
-
this.agGridAdapter.setGridOption('pivotMode', pivoted);
|
|
3493
|
-
}
|
|
3494
|
-
const perfApplyColumnState = this.logger.beginPerf('applyColumnState (layout.isChanged)');
|
|
3495
|
-
this.agGridAdapter.getAgGridApi().applyColumnState({
|
|
3496
|
-
state: newColumnsState,
|
|
3497
|
-
applyOrder: true,
|
|
3498
|
-
});
|
|
3499
|
-
perfApplyColumnState.end();
|
|
3500
|
-
this.api.gridApi.setColumnSorts(layout.ColumnSorts);
|
|
3501
|
-
if (shouldUpdatePivoted) {
|
|
3502
|
-
// simply setting PivotColumns fires an AG Grid 'modelChanged' event which cascades to a full row reload in SSRM
|
|
3503
|
-
// this includes the case when we simply set an empty array of pivot columns
|
|
3504
|
-
this.agGridAdapter.getAgGridApi().setPivotColumns(layout.PivotColumns || []);
|
|
3505
|
-
}
|
|
3506
|
-
// aggrid 25.1.0 introduced a bug such that a layout that has a grouped column, if the column has enableRowGroup: true but not rowGroup: true
|
|
3507
|
-
// the group column is not possitioned correctly at the start of the layout
|
|
3508
|
-
// see the test in layout/layout-switch/"should be able to switch from grouped to non-grouped and back"
|
|
3509
|
-
// so we figured out the following line fixes the issue
|
|
3510
|
-
// this.gridOptions.api.setColumnDefs(this.gridOptions.api.getColumnDefs()); //TODO find a solution for weighted averages - column floating filters are not showing
|
|
3511
|
-
// these updates need to be at the end, the methods are based on the grid state/col defs
|
|
3512
|
-
// the layout needs to be applied for them to work
|
|
3513
|
-
this.updateRowGroupsExpandedState(layout);
|
|
3514
|
-
}
|
|
3515
|
-
const colsToAutoSizeArray = Object.keys(colsToAutoSize);
|
|
3516
|
-
if (pivoted && ((_d = (_c = this.adaptableOptions) === null || _c === void 0 ? void 0 : _c.layoutOptions) === null || _d === void 0 ? void 0 : _d.autoSizeColumnsInPivotLayout)) {
|
|
3517
|
-
// when a pivoted layout loads, autosize all cols
|
|
3518
|
-
requestAnimationFrame(() => {
|
|
3519
|
-
if (this.isAvailable) {
|
|
3520
|
-
this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
|
|
3521
|
-
}
|
|
3522
|
-
});
|
|
3523
|
-
// //but if it's also the first time the grid is loading
|
|
3524
|
-
// //it's not timely enough the above call, so we keep trying... I know it's ugly, we need to find a better way
|
|
3525
|
-
// setTimeout(() => {
|
|
3526
|
-
// this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
|
|
3527
|
-
// setTimeout(() => {
|
|
3528
|
-
// this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
|
|
3529
|
-
// }, 200);
|
|
3530
|
-
// }, 100);
|
|
3531
|
-
}
|
|
3532
|
-
else {
|
|
3533
|
-
if (((_f = (_e = this.adaptableOptions) === null || _e === void 0 ? void 0 : _e.layoutOptions) === null || _f === void 0 ? void 0 : _f.autoSizeColumnsInLayout) &&
|
|
3534
|
-
colsToAutoSizeArray.length) {
|
|
3024
|
+
const layoutModel = (0, LayoutHelpers_1.layoutStateToLayoutModel)(layout);
|
|
3025
|
+
this.layoutManager?.setLayout(layoutModel, {
|
|
3026
|
+
skipApplyRowGroupsExpandedState: !shouldUpdateExpandState,
|
|
3027
|
+
});
|
|
3028
|
+
if (layout.AutoSizeColumns) {
|
|
3029
|
+
if (isPivot) {
|
|
3535
3030
|
requestAnimationFrame(() => {
|
|
3536
3031
|
if (this.isAvailable) {
|
|
3537
|
-
this.
|
|
3032
|
+
this.agGridAdapter.getAgGridApi().autoSizeAllColumns();
|
|
3538
3033
|
}
|
|
3539
3034
|
});
|
|
3540
3035
|
}
|
|
3036
|
+
else {
|
|
3037
|
+
requestAnimationFrame(() => {
|
|
3038
|
+
this.autoSizeColumns();
|
|
3039
|
+
});
|
|
3040
|
+
}
|
|
3541
3041
|
}
|
|
3042
|
+
// this.showQuickFilter()
|
|
3542
3043
|
this.forPlugins((plugin) => {
|
|
3543
3044
|
if (plugin.afterSetLayout) {
|
|
3544
3045
|
plugin.afterSetLayout(this, layout);
|
|
@@ -3551,7 +3052,12 @@ class AdaptableAgGrid {
|
|
|
3551
3052
|
return null;
|
|
3552
3053
|
}
|
|
3553
3054
|
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
3554
|
-
const aggregationFunctionsColumnsMap = currentLayout
|
|
3055
|
+
const aggregationFunctionsColumnsMap = ((0, LayoutHelpers_1.isPivotLayout)(currentLayout)
|
|
3056
|
+
? currentLayout.PivotAggregationColumns
|
|
3057
|
+
: currentLayout.TableAggregationColumns).reduce((acc, col) => {
|
|
3058
|
+
acc[col.ColumnId] = col.AggFunc;
|
|
3059
|
+
return acc;
|
|
3060
|
+
}, {});
|
|
3555
3061
|
const adaptableAggFunc = aggregationFunctionsColumnsMap[columnId];
|
|
3556
3062
|
if (typeof adaptableAggFunc === 'object' &&
|
|
3557
3063
|
'type' in adaptableAggFunc &&
|
|
@@ -3571,14 +3077,13 @@ class AdaptableAgGrid {
|
|
|
3571
3077
|
if (!primaryKeyValue) {
|
|
3572
3078
|
return;
|
|
3573
3079
|
}
|
|
3574
|
-
// rowNode = this.getRowNodeForPrimaryKey(primaryKeyValue);
|
|
3575
3080
|
let cellDataChangedInfos = [];
|
|
3576
3081
|
Object.keys(oldData).forEach((key) => {
|
|
3577
3082
|
if (this.api.columnApi.isColumnInGrid(key)) {
|
|
3578
3083
|
const oldValue = oldData[key];
|
|
3579
3084
|
const newValue = newData[key];
|
|
3580
3085
|
if (oldValue != newValue) {
|
|
3581
|
-
const cellDataChangedInfo = this.api.internalApi.
|
|
3086
|
+
const cellDataChangedInfo = this.api.internalApi.buildCellDataChangedInfo({
|
|
3582
3087
|
oldValue: oldValue,
|
|
3583
3088
|
newValue: newValue,
|
|
3584
3089
|
column: this.api.columnApi.getColumnWithColumnId(key),
|
|
@@ -3593,7 +3098,7 @@ class AdaptableAgGrid {
|
|
|
3593
3098
|
}
|
|
3594
3099
|
}
|
|
3595
3100
|
});
|
|
3596
|
-
this.performPostEditChecks(cellDataChangedInfos);
|
|
3101
|
+
this.performPostEditChecks(rowNode, cellDataChangedInfos);
|
|
3597
3102
|
}
|
|
3598
3103
|
onCellDataChanged({ rowNode, oldValue, newValue, colId, }) {
|
|
3599
3104
|
if (oldValue == newValue) {
|
|
@@ -3604,7 +3109,7 @@ class AdaptableAgGrid {
|
|
|
3604
3109
|
return;
|
|
3605
3110
|
}
|
|
3606
3111
|
if (this.isGroupRowNode(rowNode)) {
|
|
3607
|
-
const cellDataChangedInfo = this.api.internalApi.
|
|
3112
|
+
const cellDataChangedInfo = this.api.internalApi.buildCellDataChangedInfo({
|
|
3608
3113
|
oldValue: oldValue,
|
|
3609
3114
|
newValue: newValue,
|
|
3610
3115
|
column: abColumn,
|
|
@@ -3616,14 +3121,14 @@ class AdaptableAgGrid {
|
|
|
3616
3121
|
rowNode: rowNode,
|
|
3617
3122
|
trigger: 'aggChange',
|
|
3618
3123
|
});
|
|
3619
|
-
this.DataService.
|
|
3124
|
+
this.DataService.CreateCellDataChangedEvent(cellDataChangedInfo);
|
|
3620
3125
|
return;
|
|
3621
3126
|
}
|
|
3622
3127
|
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(rowNode);
|
|
3623
3128
|
if (!primaryKeyValue) {
|
|
3624
3129
|
return;
|
|
3625
3130
|
}
|
|
3626
|
-
const cellDataChangedInfo = this.api.internalApi.
|
|
3131
|
+
const cellDataChangedInfo = this.api.internalApi.buildCellDataChangedInfo({
|
|
3627
3132
|
oldValue: oldValue,
|
|
3628
3133
|
newValue: newValue,
|
|
3629
3134
|
column: abColumn,
|
|
@@ -3634,7 +3139,7 @@ class AdaptableAgGrid {
|
|
|
3634
3139
|
if (this.isUndoChange(cellDataChangedInfo)) {
|
|
3635
3140
|
cellDataChangedInfo.trigger = 'undo';
|
|
3636
3141
|
}
|
|
3637
|
-
this.performPostEditChecks([cellDataChangedInfo]);
|
|
3142
|
+
this.performPostEditChecks(rowNode, [cellDataChangedInfo]);
|
|
3638
3143
|
}
|
|
3639
3144
|
isUndoChange(dataChange) {
|
|
3640
3145
|
// check if this is not a reverted change
|
|
@@ -3642,70 +3147,67 @@ class AdaptableAgGrid {
|
|
|
3642
3147
|
return !!undoChange;
|
|
3643
3148
|
}
|
|
3644
3149
|
/**
|
|
3645
|
-
* There are a few things
|
|
3150
|
+
* There are a few things we need to do AFTER we edit a cell and it makes sense to put them in one place
|
|
3646
3151
|
*/
|
|
3647
|
-
performPostEditChecks(cellDataChangedInfos) {
|
|
3648
|
-
const firstInfo = cellDataChangedInfos[0];
|
|
3649
|
-
if (!firstInfo || !firstInfo.rowNode) {
|
|
3650
|
-
return;
|
|
3651
|
-
}
|
|
3152
|
+
performPostEditChecks(rowNode, cellDataChangedInfos) {
|
|
3652
3153
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
3154
|
+
// if a Cell Data Change is undone, log to the Console
|
|
3653
3155
|
if (cellDataChangedInfo.trigger === 'undo') {
|
|
3654
3156
|
this.logger.info(`Undo data change: PK(${cellDataChangedInfo.primaryKeyValue}) Col(${cellDataChangedInfo.column}) RevertedValue(${cellDataChangedInfo.oldValue}) OriginalValue(${cellDataChangedInfo.newValue})`);
|
|
3655
3157
|
}
|
|
3158
|
+
// For Changes except Aggregations, reset cell selection if required
|
|
3656
3159
|
if (cellDataChangedInfo.trigger === 'edit' ||
|
|
3657
3160
|
cellDataChangedInfo.trigger === 'undo' ||
|
|
3658
3161
|
cellDataChangedInfo.trigger === 'tick') {
|
|
3659
|
-
this.
|
|
3660
|
-
this.api.freeTextColumnApi.internalApi.handleFreeTextColumnDataChange(cellDataChangedInfo);
|
|
3162
|
+
this.checkIfChangedCellCurrentlySelected(cellDataChangedInfo);
|
|
3661
3163
|
}
|
|
3662
|
-
|
|
3164
|
+
// Call the Data Service to create an Internal Event so other parts of App can respond
|
|
3165
|
+
this.DataService.CreateCellDataChangedEvent(cellDataChangedInfo);
|
|
3166
|
+
// Reset Min and Max values for the Column
|
|
3663
3167
|
this.resetMinMaxCachedValueForColumn(cellDataChangedInfo.column);
|
|
3664
3168
|
});
|
|
3665
|
-
this.refreshCellsBasedOnCellDataChange(cellDataChangedInfos);
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
// if node is visible
|
|
3671
|
-
|
|
3672
|
-
// 2. referenced in Format Column styles that use Column Comparisons (which might also be calculated columns)
|
|
3673
|
-
if (this.agGridAdapter.isVisibleNode(firstInfo.rowNode)) {
|
|
3169
|
+
this.refreshCellsBasedOnCellDataChange(rowNode, cellDataChangedInfos);
|
|
3170
|
+
this.refreshColumnsBasedOnCellDataChange(cellDataChangedInfos);
|
|
3171
|
+
this.filterOnDataChange();
|
|
3172
|
+
}
|
|
3173
|
+
refreshCellsBasedOnCellDataChange(rowNode, cellDataChangedInfos) {
|
|
3174
|
+
// Check if node is visible as otherwise AG Grid wont refresh
|
|
3175
|
+
if (this.agGridAdapter.isVisibleNode(rowNode)) {
|
|
3674
3176
|
let dataChangedScope = {
|
|
3675
3177
|
wholeRow: false,
|
|
3676
3178
|
columnIds: new Set(),
|
|
3677
3179
|
};
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
}
|
|
3180
|
+
// First check Format Column Expressions
|
|
3181
|
+
this.checkFormatColumnExpressionStyleChanges(dataChangedScope, cellDataChangedInfos);
|
|
3182
|
+
// If Scope is whole row then redraw row and return
|
|
3682
3183
|
if (dataChangedScope.wholeRow) {
|
|
3683
|
-
this.redrawRow(
|
|
3184
|
+
this.redrawRow(rowNode);
|
|
3185
|
+
return;
|
|
3684
3186
|
}
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3187
|
+
// Next check for Format Column Predicates, Styled Columns and FreeText Columns to update the ColumnIds refresh list as required
|
|
3188
|
+
this.checkFormatColumnPredicateStyleChanges(dataChangedScope, cellDataChangedInfos);
|
|
3189
|
+
this.checkFreeTextColumnChanges(dataChangedScope, cellDataChangedInfos);
|
|
3190
|
+
this.checkStyledColumnComparisonChanges(dataChangedScope, cellDataChangedInfos);
|
|
3191
|
+
if (dataChangedScope.columnIds.size > 0) {
|
|
3192
|
+
this.refreshCells(rowNode, Array.from(dataChangedScope.columnIds.values()), true);
|
|
3690
3193
|
}
|
|
3691
3194
|
}
|
|
3692
|
-
this.refreshColumnForRelativeRangeStyledColumns(cellDataChangedInfos);
|
|
3693
3195
|
}
|
|
3694
|
-
|
|
3695
|
-
const
|
|
3196
|
+
refreshColumnsBasedOnCellDataChange(cellDataChangedInfos) {
|
|
3197
|
+
const columnIdsToUpdate = [];
|
|
3198
|
+
// The only use case is Styled Columns with a Relative Cell Range
|
|
3696
3199
|
cellDataChangedInfos.forEach((cellDataChangeInfo) => {
|
|
3697
3200
|
const styledColumn = this.api.styledColumnApi.getActiveStyledColumnForColumn(cellDataChangeInfo.column);
|
|
3698
3201
|
if (styledColumn &&
|
|
3699
3202
|
this.api.styledColumnApi.internalApi.hasStyledColumnRelativeCellRange(styledColumn)) {
|
|
3700
|
-
|
|
3203
|
+
columnIdsToUpdate.push(styledColumn.ColumnId);
|
|
3701
3204
|
}
|
|
3702
3205
|
});
|
|
3703
|
-
|
|
3704
|
-
if (columnIdsToUpdate.length) {
|
|
3206
|
+
if (ArrayExtensions_1.default.IsNotNullOrEmpty(columnIdsToUpdate)) {
|
|
3705
3207
|
this.refreshColumns(columnIdsToUpdate, true);
|
|
3706
3208
|
}
|
|
3707
3209
|
}
|
|
3708
|
-
|
|
3210
|
+
checkStyledColumnComparisonChanges(dataChangedScope, cellDataChangedInfos) {
|
|
3709
3211
|
this.api.styledColumnApi.getStyledColumns().forEach((sc) => {
|
|
3710
3212
|
let columnComparison = this.api.styledColumnApi.internalApi.getColumnComparisonForStyledColumn(sc);
|
|
3711
3213
|
if (columnComparison) {
|
|
@@ -3720,7 +3222,7 @@ class AdaptableAgGrid {
|
|
|
3720
3222
|
}
|
|
3721
3223
|
});
|
|
3722
3224
|
}
|
|
3723
|
-
|
|
3225
|
+
checkFormatColumnPredicateStyleChanges(dataChangedScope, cellDataChangedInfos) {
|
|
3724
3226
|
cellDataChangedInfos.forEach((cellDataChangeInfo) => {
|
|
3725
3227
|
const dependentColumns = this.api.formatColumnApi.internalApi.getFormatColumnColumnsDependentOnColumnChange(cellDataChangeInfo.column);
|
|
3726
3228
|
for (let colId of dependentColumns) {
|
|
@@ -3728,7 +3230,21 @@ class AdaptableAgGrid {
|
|
|
3728
3230
|
}
|
|
3729
3231
|
});
|
|
3730
3232
|
}
|
|
3731
|
-
|
|
3233
|
+
checkFreeTextColumnChanges(dataChangedScope, cellDataChangedInfos) {
|
|
3234
|
+
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
3235
|
+
const freeTextColumn = this.api.freeTextColumnApi
|
|
3236
|
+
.getFreeTextColumns()
|
|
3237
|
+
.find((fc) => fc.ColumnId == cellDataChangedInfo.column.columnId);
|
|
3238
|
+
if (freeTextColumn) {
|
|
3239
|
+
dataChangedScope.columnIds.add(freeTextColumn.ColumnId);
|
|
3240
|
+
const refencedCalcColumns = this.api.calculatedColumnApi.internalApi.getCalculatedColumnsReferencingColumnId(cellDataChangedInfo.column.columnId);
|
|
3241
|
+
refencedCalcColumns.forEach((calculatedColumn) => {
|
|
3242
|
+
dataChangedScope.columnIds.add(calculatedColumn.ColumnId);
|
|
3243
|
+
});
|
|
3244
|
+
}
|
|
3245
|
+
});
|
|
3246
|
+
}
|
|
3247
|
+
checkFormatColumnExpressionStyleChanges(dataChangedScope, cellDataChangedInfos) {
|
|
3732
3248
|
const formatColumnsWithExpression = [];
|
|
3733
3249
|
formatColumnsWithExpression.push(...this.api.formatColumnApi.internalApi.getFormatColumnsWithExpression());
|
|
3734
3250
|
if (ArrayExtensions_1.default.IsNullOrEmpty(formatColumnsWithExpression)) {
|
|
@@ -3736,17 +3252,17 @@ class AdaptableAgGrid {
|
|
|
3736
3252
|
}
|
|
3737
3253
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
3738
3254
|
if (!dataChangedScope.wholeRow) {
|
|
3739
|
-
formatColumnsWithExpression.forEach((
|
|
3255
|
+
formatColumnsWithExpression.forEach((formatColumn) => {
|
|
3740
3256
|
if (!dataChangedScope.wholeRow) {
|
|
3741
|
-
const columnIds = this.api.expressionApi.getColumnsFromExpression(
|
|
3257
|
+
const columnIds = this.api.expressionApi.getColumnsFromExpression(formatColumn.Rule.BooleanExpression);
|
|
3742
3258
|
if (columnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
3743
|
-
if (this.api.columnScopeApi.scopeIsAll(
|
|
3259
|
+
if (this.api.columnScopeApi.scopeIsAll(formatColumn.Scope)) {
|
|
3744
3260
|
dataChangedScope.wholeRow = true;
|
|
3745
3261
|
return;
|
|
3746
3262
|
}
|
|
3747
3263
|
else {
|
|
3748
3264
|
this.api.columnScopeApi
|
|
3749
|
-
.
|
|
3265
|
+
.getColumnsInScope(formatColumn.Scope)
|
|
3750
3266
|
.map((c) => c.columnId)
|
|
3751
3267
|
.forEach((colId) => {
|
|
3752
3268
|
dataChangedScope.columnIds.add(colId);
|
|
@@ -3758,7 +3274,7 @@ class AdaptableAgGrid {
|
|
|
3758
3274
|
}
|
|
3759
3275
|
});
|
|
3760
3276
|
}
|
|
3761
|
-
|
|
3277
|
+
checkIfChangedCellCurrentlySelected(cellDataChangedInfo) {
|
|
3762
3278
|
let selectedCellInfo = this.api.gridApi.getSelectedCellInfo();
|
|
3763
3279
|
if (selectedCellInfo && ArrayExtensions_1.default.IsNotNullOrEmpty(selectedCellInfo.gridCells)) {
|
|
3764
3280
|
let matchingCell = selectedCellInfo.gridCells.find((gc) => gc.primaryKeyValue == cellDataChangedInfo.primaryKeyValue &&
|
|
@@ -3783,298 +3299,60 @@ class AdaptableAgGrid {
|
|
|
3783
3299
|
this.columnMinMaxValuesCache[column.columnId] = undefined;
|
|
3784
3300
|
}
|
|
3785
3301
|
}
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
if (this.adaptableOptions.columnFilterOptions.filterActionOnExternalDataChange.applyFilter ==
|
|
3789
|
-
Enums_1.FilterOnDataChangeOptions.Always) {
|
|
3790
|
-
(_a = this.agGridAdapter.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.onFilterChanged();
|
|
3791
|
-
}
|
|
3792
|
-
else if (this.adaptableOptions.columnFilterOptions.filterActionOnExternalDataChange.applyFilter ==
|
|
3793
|
-
Enums_1.FilterOnDataChangeOptions.Throttle) {
|
|
3794
|
-
this.throttleFilterOnTickingDataChange();
|
|
3795
|
-
}
|
|
3796
|
-
}
|
|
3797
|
-
filterOnEditDataChange() {
|
|
3798
|
-
var _a;
|
|
3799
|
-
if (this.adaptableOptions.columnFilterOptions.filterActionOnUserDataChange.applyFilter ==
|
|
3302
|
+
filterOnDataChange() {
|
|
3303
|
+
if (this.adaptableOptions.filterOptions.filterActionOnDataChange.applyFilter ==
|
|
3800
3304
|
Enums_1.FilterOnDataChangeOptions.Always) {
|
|
3801
|
-
|
|
3305
|
+
this.agGridAdapter.getAgGridApi()?.onFilterChanged();
|
|
3802
3306
|
}
|
|
3803
|
-
else if (this.adaptableOptions.
|
|
3307
|
+
else if (this.adaptableOptions.filterOptions.filterActionOnDataChange.applyFilter ==
|
|
3804
3308
|
Enums_1.FilterOnDataChangeOptions.Throttle) {
|
|
3805
|
-
this.
|
|
3806
|
-
}
|
|
3807
|
-
}
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3309
|
+
this.throttleFilterOnDataChange();
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
refreshLayout() {
|
|
3313
|
+
const columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns();
|
|
3314
|
+
// this setGridOption call will also trigger layout.onColumnDefsChanged()
|
|
3315
|
+
// which will in turn call updateColumnModelAndRefreshGrid
|
|
3316
|
+
this.agGridAdapter.setGridOption('columnDefs', columnDefs);
|
|
3317
|
+
// this is needed here for when we call setAdaptableStateKey
|
|
3318
|
+
// and pass a new config
|
|
3319
|
+
this.setLayout();
|
|
3320
|
+
this.applyFiltering();
|
|
3321
|
+
}
|
|
3322
|
+
isRowGroupDifferentInLayout(one, other) {
|
|
3323
|
+
const prevRowGroupedColumns = one.RowGroupedColumns || one.PivotGroupedColumns || [];
|
|
3324
|
+
const currentRowGroupedColumns = other.RowGroupedColumns || other.PivotGroupedColumns || [];
|
|
3325
|
+
const prevRowGroupDisplayType = one.RowGroupDisplayType;
|
|
3326
|
+
const currentRowGroupDisplayType = other.RowGroupDisplayType;
|
|
3327
|
+
if (prevRowGroupDisplayType !== currentRowGroupDisplayType) {
|
|
3813
3328
|
return true;
|
|
3814
3329
|
}
|
|
3815
|
-
return
|
|
3816
|
-
}
|
|
3817
|
-
createDefaultLayout(state, agGridOptions) {
|
|
3818
|
-
var _a, _b, _c;
|
|
3819
|
-
const agGridColDefs = agGridOptions.columnDefs;
|
|
3820
|
-
const agGridAutoGroupColDef = agGridOptions.autoGroupColumnDef;
|
|
3821
|
-
const allColumnDefs = this.agGridAdapter.getFlattenedColDefs(agGridColDefs);
|
|
3822
|
-
const defaultLayout = ObjectFactory_1.default.CreateEmptyLayout({
|
|
3823
|
-
Name: GeneralConstants_1.DEFAULT_LAYOUT,
|
|
3824
|
-
Columns: allColumnDefs.map((c) => c.colId),
|
|
3825
|
-
AggregationColumns: allColumnDefs.reduce((acc, col) => {
|
|
3826
|
-
if (typeof col.aggFunc === 'string') {
|
|
3827
|
-
acc[col.colId] = col.aggFunc;
|
|
3828
|
-
}
|
|
3829
|
-
return acc;
|
|
3830
|
-
}, {}),
|
|
3831
|
-
PinnedColumnsMap: allColumnDefs.reduce((acc, col) => {
|
|
3832
|
-
const pinned = col.pinned;
|
|
3833
|
-
if (pinned) {
|
|
3834
|
-
acc[col.colId] = pinned === true ? 'left' : pinned;
|
|
3835
|
-
}
|
|
3836
|
-
return acc;
|
|
3837
|
-
}, {}),
|
|
3838
|
-
RowGroupedColumns: allColumnDefs.reduce((acc, col) => {
|
|
3839
|
-
if (col.rowGroup) {
|
|
3840
|
-
acc.push(col.colId);
|
|
3841
|
-
}
|
|
3842
|
-
return acc;
|
|
3843
|
-
}, []),
|
|
3844
|
-
});
|
|
3845
|
-
// handle optional 'gridOptions.autoGroupColumnDefs' parameter
|
|
3846
|
-
if (agGridAutoGroupColDef &&
|
|
3847
|
-
(((_a = defaultLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) || agGridOptions.treeData)) {
|
|
3848
|
-
defaultLayout.Columns = [GeneralConstants_1.AG_GRID_GROUPED_COLUMN, ...defaultLayout.Columns];
|
|
3849
|
-
}
|
|
3850
|
-
if (agGridAutoGroupColDef === null || agGridAutoGroupColDef === void 0 ? void 0 : agGridAutoGroupColDef.pinned) {
|
|
3851
|
-
defaultLayout.PinnedColumnsMap[GeneralConstants_1.AG_GRID_GROUPED_COLUMN] =
|
|
3852
|
-
agGridAutoGroupColDef.pinned === true ? 'left' : agGridAutoGroupColDef.pinned;
|
|
3853
|
-
}
|
|
3854
|
-
if (agGridAutoGroupColDef === null || agGridAutoGroupColDef === void 0 ? void 0 : agGridAutoGroupColDef.width) {
|
|
3855
|
-
defaultLayout.ColumnWidthMap[GeneralConstants_1.AG_GRID_GROUPED_COLUMN] = agGridAutoGroupColDef.width;
|
|
3856
|
-
}
|
|
3857
|
-
// ADD special columns
|
|
3858
|
-
const calculatedColumns = ((_b = state.CalculatedColumn) === null || _b === void 0 ? void 0 : _b.CalculatedColumns) || [];
|
|
3859
|
-
if (calculatedColumns.length) {
|
|
3860
|
-
defaultLayout.Columns.push(...calculatedColumns.map((c) => c.ColumnId));
|
|
3861
|
-
}
|
|
3862
|
-
const freeTextColumns = ((_c = state.FreeTextColumn) === null || _c === void 0 ? void 0 : _c.FreeTextColumns) || [];
|
|
3863
|
-
if (freeTextColumns.length) {
|
|
3864
|
-
defaultLayout.Columns.push(...freeTextColumns.map((c) => c.ColumnId));
|
|
3865
|
-
}
|
|
3866
|
-
return defaultLayout;
|
|
3330
|
+
return prevRowGroupedColumns.join(',') !== currentRowGroupedColumns.join(',');
|
|
3867
3331
|
}
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
const columnState = agGridApi.getColumnState();
|
|
3876
|
-
const expandedState = agGridApi.getState().rowGroupExpansion || { expandedRowGroupIds: [] };
|
|
3877
|
-
const currentLayoutState = { columnState, expandedState };
|
|
3878
|
-
try {
|
|
3879
|
-
const stringifiedLayoutState = JSON.stringify(currentLayoutState);
|
|
3880
|
-
if (stringifiedLayoutState === this.previousAgGridLayoutState) {
|
|
3881
|
-
// same grid column state as a previous,
|
|
3882
|
-
// so no need to update, as the layout has already been updated
|
|
3883
|
-
// for this grid column state
|
|
3884
|
-
return;
|
|
3885
|
-
}
|
|
3886
|
-
this.previousAgGridLayoutState = stringifiedLayoutState;
|
|
3887
|
-
}
|
|
3888
|
-
catch (ex) {
|
|
3889
|
-
this.logger.consoleError('Error stringifying column state', ex);
|
|
3890
|
-
}
|
|
3891
|
-
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
3892
|
-
if (currentLayout.IsReadOnly) {
|
|
3893
|
-
// reaply the layout so the grid is reverted
|
|
3894
|
-
this.setLayout();
|
|
3895
|
-
return;
|
|
3896
|
-
}
|
|
3897
|
-
const layout = Object.assign({}, currentLayout);
|
|
3898
|
-
let columnOrder = [];
|
|
3899
|
-
const columnFlexes = {};
|
|
3900
|
-
const pinnedColumns = {};
|
|
3901
|
-
const columnSorts = [];
|
|
3902
|
-
let groupedColumns = [...new Array(columnState.length)];
|
|
3903
|
-
let pivotedColumns = [...new Array(columnState.length)];
|
|
3904
|
-
const pivotColumns = [];
|
|
3905
|
-
const aggregatedColumns = {};
|
|
3906
|
-
const columnWidths = columnState.reduce((acc, colState) => {
|
|
3907
|
-
const { colId } = colState;
|
|
3908
|
-
if (colState.sort && colState.sortIndex != null) {
|
|
3909
|
-
columnSorts.push({
|
|
3910
|
-
ColumnId: colId,
|
|
3911
|
-
SortOrder: colState.sort === 'asc' ? 'Asc' : 'Desc',
|
|
3912
|
-
SortIndex: colState.sortIndex,
|
|
3913
|
-
});
|
|
3914
|
-
}
|
|
3915
|
-
if (colState.width != null) {
|
|
3916
|
-
acc[colId] = colState.width;
|
|
3917
|
-
}
|
|
3918
|
-
if (colState.flex != null) {
|
|
3919
|
-
columnFlexes[colId] = colState.flex;
|
|
3920
|
-
}
|
|
3921
|
-
if (colState.pinned === 'left') {
|
|
3922
|
-
pinnedColumns[colId] = 'left';
|
|
3923
|
-
}
|
|
3924
|
-
if (colState.pinned === 'right') {
|
|
3925
|
-
pinnedColumns[colId] = 'right';
|
|
3926
|
-
}
|
|
3927
|
-
if (!colState.hide) {
|
|
3928
|
-
columnOrder.push(colId);
|
|
3929
|
-
}
|
|
3930
|
-
if (colState.rowGroupIndex != null) {
|
|
3931
|
-
groupedColumns[colState.rowGroupIndex] = colId;
|
|
3932
|
-
}
|
|
3933
|
-
if (colState.pivotIndex != null) {
|
|
3934
|
-
pivotedColumns[colState.pivotIndex] = colId;
|
|
3935
|
-
}
|
|
3936
|
-
if (colState.aggFunc && typeof colState.aggFunc === 'string') {
|
|
3937
|
-
aggregatedColumns[colId] = colState.aggFunc;
|
|
3938
|
-
}
|
|
3939
|
-
return acc;
|
|
3940
|
-
}, {});
|
|
3941
|
-
columnSorts.sort((a, b) => a.SortIndex - b.SortIndex);
|
|
3942
|
-
this.agGridAdapter
|
|
3943
|
-
.getAgGridApi()
|
|
3944
|
-
.getPivotColumns()
|
|
3945
|
-
.forEach((col) => {
|
|
3946
|
-
pivotColumns.push(col.getColId());
|
|
3947
|
-
});
|
|
3948
|
-
groupedColumns = groupedColumns.filter((x) => !!x);
|
|
3949
|
-
pivotedColumns = pivotedColumns.filter((x) => !!x);
|
|
3950
|
-
if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.groupingOptions) === null || _b === void 0 ? void 0 : _b.restoreUngroupedColumns) {
|
|
3951
|
-
columnOrder = this.restoreUnGroupColumnOrder({
|
|
3952
|
-
columnOrder,
|
|
3953
|
-
newGroupColumns: groupedColumns,
|
|
3954
|
-
});
|
|
3955
|
-
}
|
|
3956
|
-
layout.ColumnWidthMap = columnWidths;
|
|
3957
|
-
// layout.ColumnFlexMap = columnFlexes;
|
|
3958
|
-
layout.PinnedColumnsMap = pinnedColumns;
|
|
3959
|
-
layout.Columns = columnOrder;
|
|
3960
|
-
layout.ColumnSorts = columnSorts;
|
|
3961
|
-
layout.RowGroupedColumns = groupedColumns;
|
|
3962
|
-
if (Object.keys(aggregatedColumns).length) {
|
|
3963
|
-
// AG Grid aggregations are not 1-1 with adaptable column-aggregations
|
|
3964
|
-
layout.AggregationColumns = this.mapAggregationColumnsFromGrid(aggregatedColumns, currentLayout);
|
|
3965
|
-
}
|
|
3966
|
-
else {
|
|
3967
|
-
layout.AggregationColumns = {};
|
|
3968
|
-
}
|
|
3969
|
-
layout.EnablePivot = this.agGridAdapter.getAgGridApi().isPivotMode();
|
|
3970
|
-
layout.PivotColumns = pivotColumns;
|
|
3971
|
-
if (
|
|
3972
|
-
// check first row node for presence of data without iterating over whole grid
|
|
3973
|
-
this.api.layoutApi.internalApi.areExpandedRowGroupsSavedInLayouts() &&
|
|
3974
|
-
this.api.gridApi.getFirstDisplayedRowNode()) {
|
|
3975
|
-
layout.ExpandedRowGroupValues = this.getExpandRowGroupsKeys();
|
|
3976
|
-
}
|
|
3977
|
-
const previousVisibleColumns = currentLayout.Columns;
|
|
3978
|
-
const newVisibleColumns = layout.Columns;
|
|
3979
|
-
// check if all new columns were previously visible
|
|
3980
|
-
const someColumnsAreNew = newVisibleColumns.some((colId) => !previousVisibleColumns.includes(colId));
|
|
3981
|
-
if (someColumnsAreNew) {
|
|
3332
|
+
onLayoutChange(layout) {
|
|
3333
|
+
this.logger.info('onLayoutChange()');
|
|
3334
|
+
const prevOnChangeLayout = this.__prevLayoutForOnChange || this.api.layoutApi.getCurrentLayout();
|
|
3335
|
+
// see #on-regroup-expect-group-column-to-be-recomputed-and-setup-properly
|
|
3336
|
+
const rowGroupsChanged = this.isRowGroupDifferentInLayout(prevOnChangeLayout, layout);
|
|
3337
|
+
const pivotColsChanged = JSON.stringify(layout.PivotColumns) !== JSON.stringify(prevOnChangeLayout.PivotColumns);
|
|
3338
|
+
if (rowGroupsChanged || pivotColsChanged) {
|
|
3982
3339
|
this.updateColumnModelAndRefreshGrid();
|
|
3983
3340
|
}
|
|
3984
|
-
this.persistLayout(layout);
|
|
3985
|
-
}
|
|
3986
|
-
persistLayout(layout) {
|
|
3987
|
-
if (this.api.layoutApi.shouldAutoSaveLayouts()) {
|
|
3988
|
-
this.api.layoutApi.createOrUpdateLayout(layout);
|
|
3989
|
-
}
|
|
3990
3341
|
else {
|
|
3991
|
-
this.
|
|
3992
|
-
}
|
|
3993
|
-
}
|
|
3994
|
-
/**
|
|
3995
|
-
* When reading the state from the grid, we have to make sure 'avg' is not overriden with the 'avg' string.
|
|
3996
|
-
*/
|
|
3997
|
-
mapAggregationColumnsFromGrid(aggFuncFromGrid, currentLayout) {
|
|
3998
|
-
return Object.entries(aggFuncFromGrid).reduce((acc, [colId, agg]) => {
|
|
3999
|
-
const adaptableAggFunc = this.getActiveAdaptableAggFuncForCol(colId);
|
|
4000
|
-
if ((adaptableAggFunc === null || adaptableAggFunc === void 0 ? void 0 : adaptableAggFunc.type) === 'weightedAverage' && agg === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME) {
|
|
4001
|
-
// do not override the agg func
|
|
4002
|
-
acc[colId] = currentLayout.AggregationColumns[colId];
|
|
4003
|
-
}
|
|
4004
|
-
else {
|
|
4005
|
-
acc[colId] = agg;
|
|
4006
|
-
}
|
|
4007
|
-
return acc;
|
|
4008
|
-
}, {});
|
|
4009
|
-
}
|
|
4010
|
-
persistColumnIndexBeforeGrouping(params) {
|
|
4011
|
-
const layout = this.api.layoutApi.getCurrentLayout();
|
|
4012
|
-
const columnGroupsInLayout = layout.RowGroupedColumns;
|
|
4013
|
-
const columnGroupsInGrid = params.columns.map((col) => col.getColId());
|
|
4014
|
-
// what is new
|
|
4015
|
-
const newGroups = columnGroupsInGrid.filter((colId) => !columnGroupsInLayout.includes(colId));
|
|
4016
|
-
newGroups.forEach((colId) => {
|
|
4017
|
-
const columnIndex = layout.Columns.filter((colId) => !(this.api.columnApi.isAutoRowGroupColumn(colId) ||
|
|
4018
|
-
this.api.columnApi.isAutoPivotColumn(colId))).findIndex((columnIdInLayout) => columnIdInLayout === colId);
|
|
4019
|
-
// user may group after a column not in layout
|
|
4020
|
-
if (columnIndex !== -1) {
|
|
4021
|
-
this.api.internalApi.persistPreviousGroupedColumnsIndex(layout.Uuid, colId, columnIndex);
|
|
4022
|
-
}
|
|
4023
|
-
});
|
|
4024
|
-
}
|
|
4025
|
-
/**
|
|
4026
|
-
* Restores the order previous grouping order.
|
|
4027
|
-
*/
|
|
4028
|
-
restoreUnGroupColumnOrder({ newGroupColumns, columnOrder, }) {
|
|
4029
|
-
var _a;
|
|
4030
|
-
const newColumnOrder = [...columnOrder];
|
|
4031
|
-
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
4032
|
-
const previousGroupedColumnsIndex = this.api.internalApi.getPreviousGroupedColumnsIndex(currentLayout.Uuid);
|
|
4033
|
-
const isUnGroup = newGroupColumns.length < ((_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length);
|
|
4034
|
-
if (!isUnGroup) {
|
|
4035
|
-
return columnOrder;
|
|
4036
|
-
}
|
|
4037
|
-
if (!previousGroupedColumnsIndex) {
|
|
4038
|
-
return columnOrder;
|
|
4039
|
-
}
|
|
4040
|
-
for (let [colId, previousIndex] of Object.entries(previousGroupedColumnsIndex)) {
|
|
4041
|
-
const isStillGrouped = newGroupColumns.includes(colId);
|
|
4042
|
-
const isAlreadyInGrid = currentLayout.Columns.includes(colId); // was not just added by ungrouping
|
|
4043
|
-
if (isStillGrouped) {
|
|
4044
|
-
continue;
|
|
4045
|
-
}
|
|
4046
|
-
if (isAlreadyInGrid) {
|
|
4047
|
-
// no longer grouped, but already in grid, this means it was already in grid before ungrouping
|
|
4048
|
-
// in this case the state can be cleared
|
|
4049
|
-
this.api.internalApi.persistPreviousGroupedColumnsIndex(currentLayout.Uuid, colId, null);
|
|
4050
|
-
continue;
|
|
4051
|
-
}
|
|
4052
|
-
// need to ajust index based if grouped
|
|
4053
|
-
const numberOfGroupedColumns = newColumnOrder.filter((colId) => this.api.columnApi.isAutoRowGroupColumn(colId)).length;
|
|
4054
|
-
const adjustedPreviousIndex = previousIndex + numberOfGroupedColumns;
|
|
4055
|
-
const indexInGrid = newColumnOrder.indexOf(colId);
|
|
4056
|
-
const hasDifferentPositionAsPreviousLayout = adjustedPreviousIndex !== null && // if null, the reorder was already applied
|
|
4057
|
-
indexInGrid > 0 && // needs to be in grid
|
|
4058
|
-
adjustedPreviousIndex !== indexInGrid;
|
|
4059
|
-
const isPreviousPositionInRange = adjustedPreviousIndex < newColumnOrder.length;
|
|
4060
|
-
if (hasDifferentPositionAsPreviousLayout && isPreviousPositionInRange) {
|
|
4061
|
-
newColumnOrder.splice(indexInGrid, 1);
|
|
4062
|
-
newColumnOrder.splice(adjustedPreviousIndex, 0, colId);
|
|
4063
|
-
}
|
|
4064
|
-
this.api.internalApi.persistPreviousGroupedColumnsIndex(currentLayout.Uuid, colId, null);
|
|
3342
|
+
this.deriveAdaptableColumnStateFromAgGrid();
|
|
4065
3343
|
}
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
onSortChanged() {
|
|
4069
|
-
const columnSorts = this.getColumnSorts();
|
|
4070
|
-
this.api.gridApi.setColumnSorts(columnSorts);
|
|
4071
|
-
this._emit('SortChanged', columnSorts);
|
|
3344
|
+
this.__prevLayoutForOnChange = layout;
|
|
3345
|
+
this.api.layoutApi.createOrUpdateLayout(layout);
|
|
4072
3346
|
}
|
|
4073
3347
|
getColumnSorts() {
|
|
4074
3348
|
const columnSorts = [];
|
|
3349
|
+
const { columnApi } = this.api;
|
|
4075
3350
|
const columnState = this.agGridAdapter.getAgGridApi().getColumnState();
|
|
4076
3351
|
columnState.forEach((colState) => {
|
|
4077
3352
|
const { colId } = colState;
|
|
3353
|
+
if (columnApi.isAutoRowGroupColumn(colId)) {
|
|
3354
|
+
return;
|
|
3355
|
+
}
|
|
4078
3356
|
if (colState.sort && colState.sortIndex != null) {
|
|
4079
3357
|
columnSorts.push({
|
|
4080
3358
|
ColumnId: colId,
|
|
@@ -4091,50 +3369,5 @@ class AdaptableAgGrid {
|
|
|
4091
3369
|
};
|
|
4092
3370
|
});
|
|
4093
3371
|
}
|
|
4094
|
-
// #gridOpts_monkey_patch
|
|
4095
|
-
// we need to intercept some of the GridOptions updates and refresh the Adaptable state
|
|
4096
|
-
monkeyPatchingGridOptionsUpdates(agGridApi) {
|
|
4097
|
-
var _a;
|
|
4098
|
-
const gridOptionsService = (_a = this.DANGER_getPrivateAgGridBeans()) === null || _a === void 0 ? void 0 : _a.gos;
|
|
4099
|
-
if (!gridOptionsService) {
|
|
4100
|
-
this.logger.consoleError('Could not get hold of GridOptionsService! This is a critical error and will prevent Adaptable from working correctly.');
|
|
4101
|
-
}
|
|
4102
|
-
const self = this;
|
|
4103
|
-
this.DANGER_updateGridOptionsMonkeyPatcher = function ({ options, force, source = 'api', }) {
|
|
4104
|
-
// `columnDefs`
|
|
4105
|
-
const passedColumnDefs = options.columnDefs;
|
|
4106
|
-
if (passedColumnDefs) {
|
|
4107
|
-
const colDefsWithSpecialColumns = self.getColumnDefinitionsInclSpecialColumns(passedColumnDefs);
|
|
4108
|
-
const allDisplayedColIds = self.agGridAdapter
|
|
4109
|
-
.getAgGridApi()
|
|
4110
|
-
.getAllDisplayedColumns()
|
|
4111
|
-
.map((col) => col.getColId());
|
|
4112
|
-
// mark as hidden the colDefs of special columns which are not visible
|
|
4113
|
-
self.agGridAdapter.patchColDefs(colDefsWithSpecialColumns, (colDef) => {
|
|
4114
|
-
if (self.api.columnApi.isSpecialColumn(colDef.colId)) {
|
|
4115
|
-
colDef.hide = !allDisplayedColIds.includes(colDef.colId);
|
|
4116
|
-
}
|
|
4117
|
-
});
|
|
4118
|
-
options['columnDefs'] = colDefsWithSpecialColumns;
|
|
4119
|
-
self.logger.info(`Added SpecialColumns on GridOptions.columnDefs update (source=${source})`);
|
|
4120
|
-
}
|
|
4121
|
-
// `context`
|
|
4122
|
-
const passedContext = options.context;
|
|
4123
|
-
if (passedContext) {
|
|
4124
|
-
passedContext['__adaptable'] = self;
|
|
4125
|
-
passedContext['adaptableApi'] = self.api;
|
|
4126
|
-
}
|
|
4127
|
-
// we mutated the options array, so it's OK to use the 'arguments' object
|
|
4128
|
-
GridOptionsService_updateGridOptions.apply(this, arguments);
|
|
4129
|
-
};
|
|
4130
|
-
gridOptionsService.updateGridOptions = this.DANGER_updateGridOptionsMonkeyPatcher;
|
|
4131
|
-
}
|
|
4132
|
-
DANGER_getPrivateAgGridBeans() {
|
|
4133
|
-
const beans = DANGER_AG_GRID_BEANS_MAP[this._agGridId];
|
|
4134
|
-
if (!beans) {
|
|
4135
|
-
this.logger.consoleError('Could not get hold of AgGridBeans! This is a critical error and will prevent Adaptable from working correctly.');
|
|
4136
|
-
}
|
|
4137
|
-
return beans;
|
|
4138
|
-
}
|
|
4139
3372
|
}
|
|
4140
3373
|
exports.AdaptableAgGrid = AdaptableAgGrid;
|