@adaptabletools/adaptable 18.0.0-canary.3 → 18.0.0-canary.5
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 +4 -21
- package/agGrid.js +9 -26
- package/base.css +4 -1
- package/base.css.map +1 -1
- package/index.css +79 -68
- package/index.css.map +1 -1
- package/package.json +3 -4
- package/src/AdaptableInterfaces/IAdaptable.d.ts +55 -109
- package/src/AdaptableOptions/AdaptableOptions.d.ts +11 -5
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
- package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
- package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.js +1 -5
- package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
- package/src/Api/AdaptableApi.d.ts +5 -0
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/GridApi.d.ts +14 -13
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +33 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
- package/src/Api/Implementation/ApiBase.d.ts +2 -1
- package/src/Api/Implementation/ApiBase.js +4 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- package/src/Api/Implementation/CommentsApiImpl.js +2 -1
- package/src/Api/Implementation/ConfigApiImpl.js +8 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.js +20 -14
- package/src/Api/Implementation/LayoutApiImpl.d.ts +4 -0
- package/src/Api/Implementation/LayoutApiImpl.js +14 -0
- package/src/Api/Implementation/NotesApiImpl.d.ts +2 -4
- package/src/Api/Implementation/NotesApiImpl.js +4 -8
- package/src/Api/Implementation/OptionsApiImpl.d.ts +1 -1
- package/src/Api/Implementation/OptionsApiImpl.js +2 -2
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
- package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
- package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
- package/src/Api/Internal/ActionRowInternalApi.js +106 -0
- package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
- package/src/Api/Internal/AdaptableInternalApi.js +10 -8
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +70 -0
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +11 -1
- package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
- package/src/Api/Internal/ColumnInternalApi.js +12 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +32 -1
- package/src/Api/Internal/DataSetInternalApi.js +1 -1
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +59 -0
- package/src/Api/Internal/GridFilterInternalApi.js +1 -1
- package/src/Api/Internal/GridInternalApi.d.ts +21 -3
- package/src/Api/Internal/GridInternalApi.js +126 -7
- package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +8 -0
- package/src/Api/OptionsApi.d.ts +1 -1
- package/src/EnvVars.d.ts +3 -0
- package/src/EnvVars.js +4 -0
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
- package/src/PredefinedConfig/NotesState.d.ts +10 -20
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
- package/src/Redux/ActionsReducers/NotesRedux.js +8 -7
- package/src/Redux/Store/AdaptableStore.d.ts +4 -6
- package/src/Redux/Store/AdaptableStore.js +22 -50
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +7 -1
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -3
- package/src/Strategy/AdaptableModuleBase.js +4 -7
- package/src/Strategy/AlertModule.d.ts +1 -2
- package/src/Strategy/AlertModule.js +2 -55
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
- package/src/Strategy/CalculatedColumnModule.js +5 -25
- package/src/Strategy/ChartingModule.d.ts +0 -1
- package/src/Strategy/ChartingModule.js +2 -22
- package/src/Strategy/ColumnFilterModule.d.ts +1 -2
- package/src/Strategy/ColumnFilterModule.js +1 -64
- package/src/Strategy/CommentsModule.d.ts +1 -0
- package/src/Strategy/CommentsModule.js +2 -1
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.d.ts +1 -2
- package/src/Strategy/DashboardModule.js +1 -8
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +3 -1
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +1 -2
- package/src/Strategy/FlashingCellModule.js +2 -15
- package/src/Strategy/FormatColumnModule.d.ts +0 -2
- package/src/Strategy/FormatColumnModule.js +0 -47
- package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
- package/src/Strategy/FreeTextColumnModule.js +0 -30
- package/src/Strategy/GridFilterModule.d.ts +0 -1
- package/src/Strategy/GridFilterModule.js +0 -37
- package/src/Strategy/Interface/IModule.d.ts +0 -1
- package/src/Strategy/LayoutModule.d.ts +1 -3
- package/src/Strategy/LayoutModule.js +6 -50
- package/src/Strategy/NamedQueryModule.d.ts +0 -1
- package/src/Strategy/NamedQueryModule.js +0 -19
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/ScheduleModule.d.ts +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/ShortcutModule.d.ts +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +0 -1
- package/src/Strategy/StyledColumnModule.js +0 -21
- package/src/Strategy/TeamSharingModule.d.ts +1 -0
- package/src/Strategy/TeamSharingModule.js +5 -5
- package/src/Strategy/ToolPanelModule.d.ts +0 -1
- package/src/Strategy/ToolPanelModule.js +0 -23
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +1 -0
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +0 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +0 -58
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +4 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +3 -1
- package/src/Utilities/Services/CellPopupService.js +0 -1
- package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
- package/src/Utilities/Services/LicenseService/index.js +10 -3
- package/src/Utilities/Services/MetamodelService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.js +6 -3
- package/src/Utilities/Services/RowEditService.d.ts +3 -2
- package/src/Utilities/Services/RowEditService.js +3 -1
- package/src/View/AdaptableView.js +0 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +1 -1
- package/src/View/Comments/CommentsPopup.js +12 -8
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +6 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +193 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
- package/src/View/Notes/NotesPopup.js +9 -11
- package/src/View/Theme/ThemeSelector.js +3 -3
- package/src/agGrid/ActionColumnRenderer.js +4 -4
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +8 -5292
- package/src/agGrid/AdaptableAgGrid.d.ts +336 -0
- package/src/agGrid/AdaptableAgGrid.js +3780 -0
- package/src/agGrid/AdaptableLogger.js +77 -11
- package/src/agGrid/AgGridAdapter.d.ts +54 -0
- package/src/agGrid/AgGridAdapter.js +549 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
- package/src/agGrid/AgGridColumnAdapter.js +813 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
- package/src/agGrid/AgGridMenuAdapter.js +271 -0
- package/src/agGrid/AgGridOptionsService.d.ts +11 -0
- package/src/agGrid/AgGridOptionsService.js +50 -0
- package/src/agGrid/BadgeRenderer.js +1 -1
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.d.ts +2 -2
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
- package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
- package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +70 -9
- package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/InfiniteTable/index.js +2 -2
- package/src/components/Modal/index.d.ts +1 -0
- package/src/components/Modal/index.js +4 -3
- package/src/components/Select/Select.d.ts +2 -0
- package/src/components/Select/Select.js +2 -2
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +39 -11
- package/src/metamodel/adaptable.metamodel.js +73 -32
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +48 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +11 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +342 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +6 -0
- package/src/types.d.ts +7 -3
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
- package/src/Utilities/Services/Interface/IRowEditService.js +0 -1
- package/src/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -686
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -668
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartModel, ChartRef, Column, GridOptions, IRowNode, Module,
|
|
1
|
+
import { ChartModel, ChartRef, Column, GridApi, GridOptions, IRowNode, Module, RowModelType, StatusPanelDef } from '@ag-grid-community/core';
|
|
2
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { ColumnSort } from '../PredefinedConfig/Common/ColumnSort';
|
|
@@ -10,8 +10,7 @@ import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo
|
|
|
10
10
|
import { AdaptableTheme } from '../PredefinedConfig/ThemeState';
|
|
11
11
|
import { IAdaptableStore } from '../Redux/Store/Interface/IAdaptableStore';
|
|
12
12
|
import { IModuleCollection } from '../Strategy/Interface/IModule';
|
|
13
|
-
import {
|
|
14
|
-
import { IPPStyle } from '../Utilities/Interface/IPPStyle';
|
|
13
|
+
import { AdaptableMenuItem, AdaptableOptions, AdaptablePlugin, ChartDefinition, SelectedRowInfo } from '../types';
|
|
15
14
|
import { ICalculatedColumnExpressionService } from '../Utilities/Services/Interface/ICalculatedColumnExpressionService';
|
|
16
15
|
import { IDataService } from '../Utilities/Services/Interface/IDataService';
|
|
17
16
|
import { CellPopupService } from '../Utilities/Services/CellPopupService';
|
|
@@ -25,11 +24,13 @@ import { IAlertService } from '../Utilities/Services/Interface/IAlertService';
|
|
|
25
24
|
import { ITeamSharingService } from '../Utilities/Services/Interface/ITeamSharingService';
|
|
26
25
|
import { AdaptableFrameworkComponent } from '../AdaptableOptions/AdaptableFrameworkComponent';
|
|
27
26
|
import { IMetamodelService } from '../Utilities/Services/Interface/IMetamodelService';
|
|
28
|
-
import { ColumnValuesComparer } from '../AdaptableOptions/CustomSortOptions';
|
|
29
|
-
import { IRowEditService } from '../Utilities/Services/Interface/IRowEditService';
|
|
30
27
|
import { RenderReactRootFn } from '../renderReactRoot';
|
|
31
28
|
import { AdaptableLogger } from '../agGrid/AdaptableLogger';
|
|
32
29
|
import { Fdc3Service } from '../Utilities/Services/Fdc3Service';
|
|
30
|
+
import { AgGridAdapter } from '../agGrid/AgGridAdapter';
|
|
31
|
+
import { AgGridColumnAdapter } from '../agGrid/AgGridColumnAdapter';
|
|
32
|
+
import { AgGridMenuAdapter } from '../agGrid/AgGridMenuAdapter';
|
|
33
|
+
import { RowEditService } from '../Utilities/Services/RowEditService';
|
|
33
34
|
/**
|
|
34
35
|
* Contains AG Grid Options and Modules - used when instantiating AdapTable vanilla
|
|
35
36
|
*/
|
|
@@ -59,37 +60,18 @@ export type AdaptableVariant = 'vanilla' | 'react' | 'angular';
|
|
|
59
60
|
export interface IAdaptable {
|
|
60
61
|
logger: AdaptableLogger;
|
|
61
62
|
variant: AdaptableVariant;
|
|
62
|
-
|
|
63
|
+
isReady: boolean;
|
|
64
|
+
isDestroyed: boolean;
|
|
63
65
|
api: AdaptableApi;
|
|
64
66
|
adaptableOptions: AdaptableOptions;
|
|
65
|
-
_rawAdaptableOptions: AdaptableOptions;
|
|
66
67
|
adaptableStore: IAdaptableStore;
|
|
67
68
|
adaptableModules: IModuleCollection;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
*/
|
|
69
|
+
agGridAdapter: AgGridAdapter;
|
|
70
|
+
agGridMenuAdapter: AgGridMenuAdapter;
|
|
71
|
+
agGridColumnAdapter: AgGridColumnAdapter;
|
|
72
72
|
embedColumnMenu: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Set when Adaptable is fully initialised
|
|
75
|
-
*
|
|
76
|
-
* Avoid unnecessary store calls and rendering
|
|
77
|
-
*/
|
|
78
|
-
isInitialised: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Set to true when adaptable is destroyed.
|
|
81
|
-
*/
|
|
82
|
-
isDestroyed: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* TRUE iff:
|
|
85
|
-
* 1. isInitialised = TRUE
|
|
86
|
-
* 2. isDestroyed = FALSE
|
|
87
|
-
*/
|
|
88
|
-
isLive: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* TRUE if the Adaptable custom tool panel (side-bar) is displayed
|
|
91
|
-
*/
|
|
92
73
|
hasAdaptableToolPanel: boolean;
|
|
74
|
+
renderReactRoot: RenderReactRootFn;
|
|
93
75
|
/**
|
|
94
76
|
* Adaptable contains a number of 'Services' which are created at Startup
|
|
95
77
|
*
|
|
@@ -105,7 +87,7 @@ export interface IAdaptable {
|
|
|
105
87
|
AlertService: IAlertService;
|
|
106
88
|
TeamSharingService: ITeamSharingService;
|
|
107
89
|
MetamodelService: IMetamodelService;
|
|
108
|
-
RowEditService:
|
|
90
|
+
RowEditService: RowEditService;
|
|
109
91
|
Fdc3Service: Fdc3Service;
|
|
110
92
|
CellPopupService: CellPopupService;
|
|
111
93
|
/**
|
|
@@ -149,20 +131,34 @@ export interface IAdaptable {
|
|
|
149
131
|
componentType: string;
|
|
150
132
|
}): Promise<any>;
|
|
151
133
|
_emitSync(eventName: 'CreateAdaptableContextMenuItems', data?: any): Promise<any>;
|
|
152
|
-
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
*/
|
|
137
|
+
getAgGridContainerElement(): HTMLElement | null;
|
|
153
138
|
redrawBody(): void;
|
|
154
|
-
|
|
155
|
-
redrawHeader(): void;
|
|
139
|
+
refreshHeader(): void;
|
|
156
140
|
redrawRow(rowNode: IRowNode): void;
|
|
157
|
-
redrawRows(rowNodes
|
|
141
|
+
redrawRows(rowNodes?: IRowNode[]): void;
|
|
158
142
|
refreshCells(rowNodes: IRowNode[], columns: (string | any)[], forceUpdate: boolean, suppressFlash?: boolean): void;
|
|
159
143
|
refreshColumns(columns: (string | Column)[], forceUpdate: boolean, suppressFlash?: boolean): void;
|
|
160
|
-
|
|
161
|
-
|
|
144
|
+
refreshSelectedCellsState(): SelectedCellInfo | undefined;
|
|
145
|
+
refreshSelectedRowsState(): SelectedRowInfo | undefined;
|
|
146
|
+
selectColumn(columnId: string, config?: {
|
|
147
|
+
keepExistingSelection?: boolean;
|
|
148
|
+
}): void;
|
|
149
|
+
selectColumns(columnIds: string[], config?: {
|
|
150
|
+
keepExistingSelection?: boolean;
|
|
151
|
+
}): void;
|
|
152
|
+
selectAll(): void;
|
|
153
|
+
deselectAll(): void;
|
|
154
|
+
selectNodes(rowNodes: IRowNode[], clearSelection: boolean): void;
|
|
155
|
+
deSelectNodes(rowNodes: IRowNode[], clearSelection: boolean): void;
|
|
156
|
+
selectNode(rowNode: IRowNode, clearSelection: boolean): void;
|
|
157
|
+
deSelectNode(rowNode: IRowNode, clearSelection: boolean): void;
|
|
158
|
+
selectCells(columnIds: string[], startNode: IRowNode, endNode: IRowNode, clearSelection?: boolean): void;
|
|
162
159
|
jumpToRow(rowNode: IRowNode): void;
|
|
163
160
|
jumpToColumn(columnId: string): void;
|
|
164
161
|
jumpToCell(columnId: string, rowNode: IRowNode): void;
|
|
165
|
-
getAgGridContainerElement(): HTMLElement | null;
|
|
166
162
|
setGridData(dataSource: any): void;
|
|
167
163
|
getGridData(): any[];
|
|
168
164
|
getFilteredData(): any[];
|
|
@@ -173,50 +169,22 @@ export interface IAdaptable {
|
|
|
173
169
|
updated: IRowNode[];
|
|
174
170
|
}>;
|
|
175
171
|
deleteRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
176
|
-
|
|
177
|
-
keepExistingSelection?: boolean;
|
|
178
|
-
}): void;
|
|
179
|
-
selectColumns(columnIds: string[], config?: {
|
|
180
|
-
keepExistingSelection?: boolean;
|
|
181
|
-
}): void;
|
|
182
|
-
selectAll(): void;
|
|
183
|
-
deselectAll(): void;
|
|
184
|
-
hideColumn(columnId: string): void;
|
|
185
|
-
showColumn(columnId: string): void;
|
|
186
|
-
autoSizeColumn(columnId: string): void;
|
|
187
|
-
autoSizeColumns(columnIds: string[]): void;
|
|
188
|
-
autoSizeAllColumns(): void;
|
|
189
|
-
updateColumnsIntoStore(): void;
|
|
190
|
-
setColumnOrder(visibleColumnList: string[]): void;
|
|
191
|
-
getPrimaryKeyValueFromRowNode(rowNode: IRowNode): any;
|
|
192
|
-
getColumnValueDisplayValuePairList(columnId: string, visibleRowsOnly: boolean, onlyIncludeIds?: {
|
|
193
|
-
[key: string]: boolean;
|
|
194
|
-
}): any[];
|
|
172
|
+
getPrimaryKeyValueFromRowNode(rowNode: IRowNode, gridApi?: GridApi): any;
|
|
195
173
|
getDistinctValuesForColumn(column: AdaptableColumn, distinctValuesParams: DistinctValuesParams): GridCell[];
|
|
196
|
-
getDistinctFilterListValuesForColumn(column: AdaptableColumn, filter: string, distinctValuesParams: DistinctValuesParams): Promise<{
|
|
197
|
-
gridCells: GridCell[];
|
|
198
|
-
suppressClientSideFilter?: boolean;
|
|
199
|
-
}>;
|
|
200
|
-
getDistinctCustomSortValuesForColumn(column: AdaptableColumn, distinctValuesParams: DistinctValuesParams): Promise<GridCell[]>;
|
|
201
|
-
getDistinctBulkUpdateValuesForColumn(column: AdaptableColumn, selectedGridCells: GridCell[], distinctValuesParams: DistinctValuesParams): Promise<GridCell[]>;
|
|
202
|
-
getDisplayValue(id: any, columnId: string): string | undefined;
|
|
203
174
|
getGridCellFromRowNode(rowNode: IRowNode, columnId: string): GridCell | undefined;
|
|
204
175
|
getRawValueFromRowNode(rowNode: IRowNode, columnId: string): any;
|
|
205
176
|
getDisplayValueFromRowNode(rowNode: IRowNode, columnId: string): string | undefined;
|
|
206
177
|
getDisplayValueFromRawValue(rowNode: IRowNode, columnId: string, rawValue: any): string | undefined;
|
|
207
178
|
getNormalisedValueFromRawValue(rawValue: any, column: AdaptableColumn): string | number | boolean | Date | unknown;
|
|
208
179
|
getGridCellsForColumn(columnId: string): GridCell[] | undefined;
|
|
209
|
-
getDataRowFromRowNode(rowNode: IRowNode): any;
|
|
210
180
|
getRowNodesForPrimaryKeys(primaryKeyValues: any[]): IRowNode[];
|
|
211
181
|
getRowNodeForPrimaryKey(primaryKeyValue: any): IRowNode;
|
|
212
182
|
getRowNodeByIndex(index: number): IRowNode;
|
|
213
183
|
getAgGridStatusPanels(): StatusPanelDef[];
|
|
214
184
|
forPlugins(callback: (plugin: AdaptablePlugin) => any): void;
|
|
215
|
-
lookupPlugins(propertyName: string, ...args: any): any;
|
|
216
185
|
getPluginProperty(pluginId: string, propertyName: string, ...args: any): any;
|
|
217
186
|
getPlugin(pluginId: string): AdaptablePlugin;
|
|
218
187
|
setDataValue(value: any, column: AdaptableColumn, primaryKeyValue: any, rowNode?: IRowNode): void;
|
|
219
|
-
cancelEdit(): any;
|
|
220
188
|
isCellEditable(rowNode: IRowNode, column: Column): boolean;
|
|
221
189
|
getFirstRowNode(): IRowNode | undefined;
|
|
222
190
|
getFirstDisplayedRowNode(): IRowNode | undefined;
|
|
@@ -228,10 +196,6 @@ export interface IAdaptable {
|
|
|
228
196
|
includeGroupRows?: boolean;
|
|
229
197
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
230
198
|
}): void;
|
|
231
|
-
getVisibleRowNodes(config?: {
|
|
232
|
-
includeGroupRows?: boolean;
|
|
233
|
-
filterFn?: (rowNode: IRowNode) => boolean;
|
|
234
|
-
}): IRowNode[];
|
|
235
199
|
getAllRowNodes(config?: {
|
|
236
200
|
includeGroupRows?: boolean;
|
|
237
201
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
@@ -242,26 +206,25 @@ export interface IAdaptable {
|
|
|
242
206
|
updateRowGroupsExpandedState(layout?: Layout): void;
|
|
243
207
|
getRowsInViewport(): IRowNode[];
|
|
244
208
|
isGroupRowNode(rowNode: IRowNode): boolean;
|
|
245
|
-
isVisibleNode(rowNode: IRowNode): boolean;
|
|
246
|
-
selectNodes(rowNodes: IRowNode[], clearSelection: boolean): void;
|
|
247
|
-
deSelectNodes(rowNodes: IRowNode[], clearSelection: boolean): void;
|
|
248
|
-
selectNode(rowNode: IRowNode, clearSelection: boolean): void;
|
|
249
|
-
deSelectNode(rowNode: IRowNode, clearSelection: boolean): void;
|
|
250
|
-
selectCells(columnIds: string[], startNode: IRowNode, endNode: IRowNode, clearSelection?: boolean): void;
|
|
251
|
-
getFirstGroupedColumn(): AdaptableColumn | undefined;
|
|
252
209
|
isRowNodeVisible(rowNode: IRowNode): boolean;
|
|
253
210
|
getAgGridColumnType(columnId: string): string | string[];
|
|
254
|
-
|
|
211
|
+
hideColumn(columnId: string): void;
|
|
212
|
+
showColumn(columnId: string): void;
|
|
213
|
+
autoSizeColumn(columnId: string): void;
|
|
214
|
+
autoSizeColumns(columnIds: string[]): void;
|
|
215
|
+
autoSizeAllColumns(): void;
|
|
216
|
+
setColumnOrder(visibleColumnList: string[]): void;
|
|
255
217
|
setColumnSort(columnSorts: ColumnSort[]): void;
|
|
256
218
|
clearColumnSort(): void;
|
|
257
219
|
hideColumnFilterForm(): void;
|
|
258
|
-
applyColumnFiltering(): void;
|
|
259
220
|
clearColumnFiltering(): void;
|
|
260
221
|
clearColumnFilteringForColumns(columnIds: string[]): void;
|
|
222
|
+
applyColumnFiltering(): void;
|
|
261
223
|
applyGridFiltering(): void;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
224
|
+
showQuickFilter(): void;
|
|
225
|
+
hideQuickFilter(): void;
|
|
226
|
+
isQuickFilterAvailable(): boolean;
|
|
227
|
+
setAgGridQuickSearch(query: string): void;
|
|
265
228
|
canGenerateCharts(): boolean;
|
|
266
229
|
canDisplaySparklines(): boolean;
|
|
267
230
|
showCharts(charts: ChartDefinition[]): ChartRef[];
|
|
@@ -270,32 +233,13 @@ export interface IAdaptable {
|
|
|
270
233
|
updateChart(chart: ChartDefinition): void;
|
|
271
234
|
getChartModels(): ChartModel[];
|
|
272
235
|
getAgGridRowModelType(): RowModelType;
|
|
273
|
-
getCurrentIPPStyle(): IPPStyle;
|
|
274
|
-
getDefaultIPPStyle(): IPPStyle;
|
|
275
236
|
getRowCount(): number;
|
|
276
237
|
getColumnCount(): number;
|
|
277
|
-
getVisibleRowCount(): number;
|
|
278
238
|
getVisibleColumnCount(): number;
|
|
279
|
-
setLayout(layout: Layout): void;
|
|
280
239
|
isGridSelectable(): boolean;
|
|
281
|
-
isGridRangeSelectable(): boolean;
|
|
282
|
-
isGridGroupable(): boolean;
|
|
283
|
-
isGridPivotable(): boolean;
|
|
284
240
|
isGridGroupingActive(): boolean;
|
|
285
|
-
showQuickFilter(): void;
|
|
286
|
-
hideQuickFilter(): void;
|
|
287
|
-
isQuickFilterAvailable(): boolean;
|
|
288
|
-
setAgGridQuickSearch(query: string): void;
|
|
289
|
-
getAgGridLightThemeName(): string;
|
|
290
241
|
getAgGridCurrentThemeName(): string;
|
|
291
242
|
applyAdaptableTheme(theme: AdaptableTheme | string): void;
|
|
292
|
-
/**
|
|
293
|
-
* called when you want to destroy the instance & cleanup resources
|
|
294
|
-
*/
|
|
295
|
-
destroy(config?: {
|
|
296
|
-
unmount: boolean;
|
|
297
|
-
destroyApi?: boolean;
|
|
298
|
-
}): void;
|
|
299
243
|
setRowGroupColumns(columnIds: string[]): void;
|
|
300
244
|
getAgGridAllGridColumns(): Column<any>[];
|
|
301
245
|
clearRowGroupColumns(): void;
|
|
@@ -305,14 +249,16 @@ export interface IAdaptable {
|
|
|
305
249
|
getExpandRowGroupsKeys(): any[];
|
|
306
250
|
getAdaptableContainerElement(): HTMLElement | null;
|
|
307
251
|
getAgGridContainerElement(): HTMLElement | null;
|
|
308
|
-
|
|
309
|
-
setupColumns(): void;
|
|
310
|
-
updateColDefsForSpecialColumns({ skipSetupColumns }?: {
|
|
311
|
-
skipSetupColumns?: boolean;
|
|
312
|
-
}): void;
|
|
252
|
+
updateColumnModelAndRefreshGrid(): void;
|
|
313
253
|
getAgGridColumnForColumnId(columnId: string): Column;
|
|
314
|
-
isAgGridModulePresent(moduleName: ModuleNames): boolean;
|
|
315
254
|
getMinMaxCachedValueForColumn(column: AdaptableColumn, minMax: 'min' | 'max'): number | undefined;
|
|
316
255
|
getAgGridRegisteredModules(): Module[];
|
|
317
|
-
|
|
256
|
+
destroy(config?: {
|
|
257
|
+
unmount: boolean;
|
|
258
|
+
destroyApi?: boolean;
|
|
259
|
+
}): void;
|
|
260
|
+
setLayout(layout?: Layout): void;
|
|
261
|
+
canExportToExcel(): boolean;
|
|
262
|
+
exportToExcel(reportData: ReportData, fileName: string): void;
|
|
263
|
+
exportVisualDataToExcel(): void;
|
|
318
264
|
}
|
|
@@ -29,12 +29,12 @@ import { CalendarOptions } from './CalendarOptions';
|
|
|
29
29
|
import { QuickSearchOptions } from './QuickSearchOptions';
|
|
30
30
|
import { FormatColumnOptions } from './FormatColumnOptions';
|
|
31
31
|
import { Fdc3Options } from './Fdc3Options';
|
|
32
|
-
import {
|
|
32
|
+
import { NoteOptions } from './NoteOptions';
|
|
33
33
|
import { PredicateOptions } from './PredicateOptions';
|
|
34
34
|
import { DataImportOptions } from './DataImportOptions';
|
|
35
35
|
import { ColumnFilterOptions } from './ColumnFilterOptions';
|
|
36
36
|
import { GridFilterOptions } from './GridFilterOptions';
|
|
37
|
-
import { CommentsOptions } from './
|
|
37
|
+
import { CommentsOptions } from './CommentOptions';
|
|
38
38
|
/**
|
|
39
39
|
* Large group of options enabling developers to set up AdapTable at design time to fit precise requirements
|
|
40
40
|
*/
|
|
@@ -65,6 +65,12 @@ export interface AdaptableOptions<TData = any> {
|
|
|
65
65
|
* Commercial license key. If the license is not provided or is expired, various visual information notes will be displayed and some functionality may be limited.
|
|
66
66
|
*/
|
|
67
67
|
licenseKey?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Automatically migrate the state from the previous version of Adaptable to the current version.
|
|
70
|
+
*
|
|
71
|
+
* @defaultValue true
|
|
72
|
+
*/
|
|
73
|
+
autoMigrateState?: boolean;
|
|
68
74
|
/**
|
|
69
75
|
* User State set at design-time and shipped with AdapTable for first use; can be `PredefinedConfig` object or url to file containing config
|
|
70
76
|
*
|
|
@@ -128,13 +134,13 @@ export interface AdaptableOptions<TData = any> {
|
|
|
128
134
|
*/
|
|
129
135
|
containerOptions?: ContainerOptions;
|
|
130
136
|
/**
|
|
131
|
-
* Options for managing
|
|
137
|
+
* Options for managing Notes
|
|
132
138
|
*/
|
|
133
|
-
|
|
139
|
+
noteOptions?: NoteOptions;
|
|
134
140
|
/**
|
|
135
141
|
* Options for managing AdapTable Comments
|
|
136
142
|
*/
|
|
137
|
-
|
|
143
|
+
commentOptions?: CommentsOptions<TData>;
|
|
138
144
|
/**
|
|
139
145
|
* Options for using Custom Sort
|
|
140
146
|
*/
|
|
@@ -177,17 +177,17 @@ export interface FilterFormOptions<TData = any> {
|
|
|
177
177
|
defaultFilterFormTab?: 'Values' | 'Predicates';
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
* Options for managing the Values (IN)
|
|
180
|
+
* Options for managing the Values (IN) Filter in Filter Bar and Filter Form
|
|
181
181
|
*/
|
|
182
182
|
export interface ValuesFilterOptions<TData = any> {
|
|
183
183
|
/**
|
|
184
|
-
* Distinct column items to display in Filter
|
|
184
|
+
* Distinct column items to display in Values Filter; useful with large datasource (though AdapTable offers virtualisation)
|
|
185
185
|
*
|
|
186
|
-
* @defaultValue
|
|
186
|
+
* @defaultValue undefined
|
|
187
187
|
* @gridInfoItem
|
|
188
188
|
* @noCodeItem
|
|
189
189
|
*/
|
|
190
|
-
maxFilterValuesToDisplay?: number;
|
|
190
|
+
maxFilterValuesToDisplay?: ((columFilterContext: ColumnFilterContext<TData>) => number) | number;
|
|
191
191
|
/**
|
|
192
192
|
* If Values filter should filter on datetime rather than date
|
|
193
193
|
* @defaultValue true
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { CommentThread, BaseContext, CellAddress } from '../../types';
|
|
2
2
|
/**
|
|
3
|
-
* Options for managing AdapTable
|
|
3
|
+
* Options for managing Comments and Comment Threads in AdapTable
|
|
4
4
|
*/
|
|
5
5
|
export interface CommentsOptions<TData = any> {
|
|
6
6
|
/**
|
|
7
7
|
* Whether a cell can be noted on
|
|
8
8
|
* TODO: check if it works
|
|
9
9
|
*/
|
|
10
|
-
isCellCommentable?: (
|
|
10
|
+
isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;
|
|
11
11
|
/**
|
|
12
12
|
* Called to load initial comments
|
|
13
13
|
*/
|
|
14
|
-
loadCommentThreads?(
|
|
14
|
+
loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise<CommentThread[]>;
|
|
15
15
|
/**
|
|
16
16
|
* Called when comments change
|
|
17
17
|
* @param commentThreads
|
|
@@ -19,10 +19,10 @@ export interface CommentsOptions<TData = any> {
|
|
|
19
19
|
persistCommentThreads?(commentThreads: CommentThread[]): void;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Context used when determining if a
|
|
22
|
+
* Context used when determining if a Comment can be added to a Cell
|
|
23
23
|
*/
|
|
24
24
|
export interface CommentableCellContext extends BaseContext {
|
|
25
25
|
address: CellAddress;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface CommentLoadContext extends BaseContext {
|
|
28
28
|
}
|
|
@@ -230,5 +230,5 @@ type ModuleGroup = {
|
|
|
230
230
|
title: string;
|
|
231
231
|
};
|
|
232
232
|
export declare const DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE: (AdaptableModule | ModuleGroup)[];
|
|
233
|
-
export declare const
|
|
233
|
+
export declare const DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE: (AdaptableModule | ModuleGroup)[];
|
|
234
234
|
export {};
|
|
@@ -38,9 +38,7 @@ export const DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = [
|
|
|
38
38
|
ModuleConstants.ExportModuleId,
|
|
39
39
|
ModuleConstants.DataImportModuleId,
|
|
40
40
|
ModuleConstants.DataChangeHistoryModuleId,
|
|
41
|
-
ModuleConstants.SmartEditModuleId,
|
|
42
41
|
ModuleConstants.PlusMinusModuleId,
|
|
43
|
-
ModuleConstants.BulkUpdateModuleId,
|
|
44
42
|
ModuleConstants.ShortcutModuleId,
|
|
45
43
|
ModuleConstants.TeamSharingModuleId,
|
|
46
44
|
ModuleConstants.ScheduleModuleId,
|
|
@@ -50,7 +48,7 @@ export const DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE = [
|
|
|
50
48
|
ModuleConstants.NotesModuleId,
|
|
51
49
|
ModuleConstants.CommentsModuleId,
|
|
52
50
|
];
|
|
53
|
-
export const
|
|
51
|
+
export const DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE = [
|
|
54
52
|
ModuleConstants.SettingsPanelModuleId,
|
|
55
53
|
ModuleConstants.DashboardModuleId,
|
|
56
54
|
ModuleConstants.ToolPanelModuleId,
|
|
@@ -86,9 +84,7 @@ export const DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER = [
|
|
|
86
84
|
ModuleConstants.ExportModuleId,
|
|
87
85
|
ModuleConstants.DataImportModuleId,
|
|
88
86
|
ModuleConstants.DataChangeHistoryModuleId,
|
|
89
|
-
ModuleConstants.SmartEditModuleId,
|
|
90
87
|
ModuleConstants.PlusMinusModuleId,
|
|
91
|
-
ModuleConstants.BulkUpdateModuleId,
|
|
92
88
|
ModuleConstants.ShortcutModuleId,
|
|
93
89
|
ModuleConstants.TeamSharingModuleId,
|
|
94
90
|
ModuleConstants.ScheduleModuleId,
|
|
@@ -111,6 +111,23 @@ export interface UserInterfaceOptions<TData = any> {
|
|
|
111
111
|
* @noCodeItem
|
|
112
112
|
*/
|
|
113
113
|
showLoadingScreen?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Delay in milliseconds before Loading Screen appears. `showLoadingScreen` must be true for this to take effect
|
|
116
|
+
*
|
|
117
|
+
* @defaultValue 200
|
|
118
|
+
*/
|
|
119
|
+
loadingScreenDelay?: number;
|
|
120
|
+
/**
|
|
121
|
+
* Title to display in Loading Screen.
|
|
122
|
+
* @defaultValue 'Initialising Grid'
|
|
123
|
+
*/
|
|
124
|
+
loadingScreenTitle?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Text to display in Loading Screen.
|
|
127
|
+
*
|
|
128
|
+
* @defaultValue 'Retrieving your settings and setting up the grid...'
|
|
129
|
+
*/
|
|
130
|
+
loadingScreenText?: string;
|
|
114
131
|
}
|
|
115
132
|
/**
|
|
116
133
|
* Base class for all Permitted Values related objects
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GridApi as AgGridApi } from '@ag-grid-community/core';
|
|
1
2
|
import { AlertApi } from './AlertApi';
|
|
2
3
|
import { PluginsApi } from './PluginsApi';
|
|
3
4
|
import { BulkUpdateApi } from './BulkUpdateApi';
|
|
@@ -53,6 +54,10 @@ import { CommentApi } from './CommentApi';
|
|
|
53
54
|
* Has a huge number of classes each dedicated to a specific AdapTable Module or functionality
|
|
54
55
|
*/
|
|
55
56
|
export interface AdaptableApi {
|
|
57
|
+
/**
|
|
58
|
+
* AG Grid API; try to use the API methods provided by Adaptable instead of using this directly
|
|
59
|
+
*/
|
|
60
|
+
agGridApi: AgGridApi;
|
|
56
61
|
/**
|
|
57
62
|
* Provides access to Action Columns
|
|
58
63
|
*/
|
|
@@ -16,9 +16,4 @@ export interface BulkUpdateApi {
|
|
|
16
16
|
* @param cellUpdateRequests Cells to apply the Bulk Update
|
|
17
17
|
*/
|
|
18
18
|
applyBulkUpdate(cellUpdateRequests: CellUpdateRequest[]): void;
|
|
19
|
-
/**
|
|
20
|
-
* Sets Bulk Update value
|
|
21
|
-
* @param bulkUpdateValue the value to use in Bulk Update Operation
|
|
22
|
-
*/
|
|
23
|
-
setBulkUpdateValue(bulkUpdateValue: string): void;
|
|
24
19
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GridApi } from '@ag-grid-community/core';
|
|
2
2
|
import { BaseEventInfo } from './BaseEventInfo';
|
|
3
3
|
/**
|
|
4
4
|
* Object returned by `AdaptableReady` event - fired when AdapTable has loaded
|
|
5
5
|
*/
|
|
6
6
|
export interface AdaptableReadyInfo<TData = any> extends BaseEventInfo {
|
|
7
7
|
/**
|
|
8
|
-
* Underlying AG Grid
|
|
8
|
+
* Underlying AG Grid API
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
agGridApi: GridApi<TData>;
|
|
11
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IRowNode } from '@ag-grid-community/core';
|
|
2
2
|
import { BaseEventInfo } from './BaseEventInfo';
|
|
3
|
+
export type GridDataChangeTrigger = 'Add' | 'Edit' | 'Delete' | 'Load';
|
|
3
4
|
/**
|
|
4
5
|
* EventInfo returned by GridDataChanged event
|
|
5
|
-
*/
|
|
6
|
-
export interface GridDataChangedInfo<TData = any> extends BaseEventInfo {
|
|
6
|
+
*/ export interface GridDataChangedInfo<TData = any> extends BaseEventInfo {
|
|
7
7
|
/**
|
|
8
8
|
* Timestamp of change occurrence (in milliseconds)
|
|
9
9
|
*/
|
|
@@ -13,9 +13,9 @@ export interface GridDataChangedInfo<TData = any> extends BaseEventInfo {
|
|
|
13
13
|
*/
|
|
14
14
|
dataRows: TData[];
|
|
15
15
|
/**
|
|
16
|
-
* Trigger for row change: 'Add', 'Edit'
|
|
16
|
+
* Trigger for row change: 'Add', 'Edit', 'Delete', 'Load'
|
|
17
17
|
*/
|
|
18
|
-
rowTrigger:
|
|
18
|
+
rowTrigger: GridDataChangeTrigger;
|
|
19
19
|
/**
|
|
20
20
|
* Row Nodes that were affected by this change
|
|
21
21
|
*/
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { DataUpdateConfig } from '../PredefinedConfig/Common/DataUpdateConfig';
|
|
|
7
7
|
import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
|
|
8
8
|
import { CellHighlightInfo } from '../PredefinedConfig/Common/CellHighlightInfo';
|
|
9
9
|
import { RowHighlightInfo } from '../PredefinedConfig/Common/RowHighlightInfo';
|
|
10
|
-
import {
|
|
10
|
+
import { IRowNode, RowModelType } from '@ag-grid-community/core';
|
|
11
11
|
import { GridCellRange } from '../PredefinedConfig/Selection/GridCellRange';
|
|
12
12
|
import { RowsHighlightInfo } from '../PredefinedConfig/Common/RowsHighlightInfo';
|
|
13
13
|
/**
|
|
@@ -27,15 +27,18 @@ export interface GridApi {
|
|
|
27
27
|
*/
|
|
28
28
|
getFilteredData(): any[];
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @param data any data suitable as AG Grid data source
|
|
30
|
+
* @deprecated use `loadGridData()` instead
|
|
32
31
|
*/
|
|
33
32
|
resetGridData(data: any[]): void;
|
|
34
33
|
/**
|
|
35
|
-
*
|
|
36
|
-
* @param dataany data suitable as AG Grid data source
|
|
34
|
+
* @deprecated use `loadGridData()` instead
|
|
37
35
|
*/
|
|
38
36
|
setInitialGridData(data: any): void;
|
|
37
|
+
/**
|
|
38
|
+
* Loads data into grid and fire a `GridDataChanged.trigger='Load'` event
|
|
39
|
+
* @param data data to load
|
|
40
|
+
*/
|
|
41
|
+
loadGridData(data: any): void;
|
|
39
42
|
/**
|
|
40
43
|
* Updates AdapTable (and AG Grid) with rows that have changed
|
|
41
44
|
* @param dataRows rows which have been updated - send whole row and AdapTable take cares of the rest
|
|
@@ -86,10 +89,6 @@ export interface GridApi {
|
|
|
86
89
|
* Returns all current Selected Rows in AdapTable
|
|
87
90
|
*/
|
|
88
91
|
getSelectedRowInfo(): SelectedRowInfo;
|
|
89
|
-
/**
|
|
90
|
-
* Returns Ag Grid instance (passed into Adaptable Options at start-up)
|
|
91
|
-
*/
|
|
92
|
-
getAgGridInstance(): GridOptions;
|
|
93
92
|
/**
|
|
94
93
|
* Returns Column Sort information in AdapTable
|
|
95
94
|
*/
|
|
@@ -469,10 +468,6 @@ export interface GridApi {
|
|
|
469
468
|
* Returns number of rows in Data Source
|
|
470
469
|
*/
|
|
471
470
|
getRowCount(): number;
|
|
472
|
-
/**
|
|
473
|
-
* Returns number of visible rows in Data Source
|
|
474
|
-
*/
|
|
475
|
-
getVisibleRowCount(): number;
|
|
476
471
|
/**
|
|
477
472
|
* Returns number of columns in Data Source
|
|
478
473
|
*/
|
|
@@ -515,4 +510,10 @@ export interface GridApi {
|
|
|
515
510
|
* Returns AG Grid Row Model Type
|
|
516
511
|
*/
|
|
517
512
|
getAgGridRowModelType(): RowModelType;
|
|
513
|
+
/**
|
|
514
|
+
* Returns number of visible rows in Data Source
|
|
515
|
+
*
|
|
516
|
+
* @deprecated use `getRowCount()` instead
|
|
517
|
+
*/
|
|
518
|
+
getVisibleRowCount(): number;
|
|
518
519
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ActionColumn, ActionColumnApi } from '../../../types';
|
|
2
2
|
import { ApiBase } from './ApiBase';
|
|
3
3
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
4
|
+
import { ColDef } from '@ag-grid-community/core';
|
|
4
5
|
export declare class ActionColumnApiImpl extends ApiBase implements ActionColumnApi {
|
|
5
6
|
constructor(adaptable: IAdaptable);
|
|
6
7
|
getActionColumns(): ActionColumn[];
|
|
8
|
+
getColDefsForActionColumns(): ColDef[];
|
|
7
9
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
+
import { ActionColumnRenderer, ReactActionColumnRenderer } from '../../agGrid/ActionColumnRenderer';
|
|
3
|
+
import { AB_SPECIAL_COLUMN } from '../../Utilities/Constants/GeneralConstants';
|
|
2
4
|
export class ActionColumnApiImpl extends ApiBase {
|
|
3
5
|
constructor(adaptable) {
|
|
4
6
|
super(adaptable);
|
|
@@ -7,4 +9,35 @@ export class ActionColumnApiImpl extends ApiBase {
|
|
|
7
9
|
var _a;
|
|
8
10
|
return (_a = this.getActionColumnOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
|
|
9
11
|
}
|
|
12
|
+
getColDefsForActionColumns() {
|
|
13
|
+
const defaultActionColumnSettings = {
|
|
14
|
+
resizable: true,
|
|
15
|
+
suppressMenu: false,
|
|
16
|
+
suppressMovable: false,
|
|
17
|
+
};
|
|
18
|
+
return this.getActionColumnApi()
|
|
19
|
+
.getActionColumns()
|
|
20
|
+
.map((actionColumn) => {
|
|
21
|
+
const actionColumnSettings = Object.assign(Object.assign({}, defaultActionColumnSettings), actionColumn.actionColumnSettings);
|
|
22
|
+
const newColDef = {
|
|
23
|
+
headerName: actionColumn.friendlyName ? actionColumn.friendlyName : actionColumn.columnId,
|
|
24
|
+
colId: actionColumn.columnId,
|
|
25
|
+
hide: false,
|
|
26
|
+
editable: false,
|
|
27
|
+
width: actionColumnSettings.width,
|
|
28
|
+
resizable: actionColumnSettings.resizable,
|
|
29
|
+
suppressMenu: actionColumnSettings.suppressMenu,
|
|
30
|
+
suppressMovable: actionColumnSettings.suppressMovable,
|
|
31
|
+
filter: false,
|
|
32
|
+
sortable: false,
|
|
33
|
+
enableRowGroup: false,
|
|
34
|
+
cellRenderer: this.getAdaptableApi().internalApi.getAdaptableInstance().variant === 'react'
|
|
35
|
+
? ReactActionColumnRenderer
|
|
36
|
+
: ActionColumnRenderer,
|
|
37
|
+
type: [AB_SPECIAL_COLUMN, 'abColDefObject'],
|
|
38
|
+
};
|
|
39
|
+
this.getAdaptableApi().logInfo('Setting up Action Column: ' + actionColumn.columnId);
|
|
40
|
+
return newColDef;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
10
43
|
}
|
|
@@ -98,6 +98,7 @@ export declare class AdaptableApiImpl implements AdaptableApi {
|
|
|
98
98
|
commentApi: CommentApi;
|
|
99
99
|
private destroyed;
|
|
100
100
|
constructor(adaptable: IAdaptable);
|
|
101
|
+
get agGridApi(): import("@ag-grid-community/core/dist/esm/es6/gridApi").GridApi<any>;
|
|
101
102
|
/**
|
|
102
103
|
* This is only meant to be called by the Adaptable instance.
|
|
103
104
|
*/
|
|
@@ -103,6 +103,9 @@ export class AdaptableApiImpl {
|
|
|
103
103
|
// adaptable internal api
|
|
104
104
|
this.internalApi = new AdaptableInternalApi(adaptable);
|
|
105
105
|
}
|
|
106
|
+
get agGridApi() {
|
|
107
|
+
return this.adaptable.agGridAdapter.getAgGridApi();
|
|
108
|
+
}
|
|
106
109
|
/**
|
|
107
110
|
* This is only meant to be called by the Adaptable instance.
|
|
108
111
|
*/
|