@adaptabletools/adaptable-cjs 19.1.0 → 19.1.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/package.json +1 -1
- package/src/Api/GridApi.d.ts +2 -1
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -4
- package/src/Api/Implementation/ActionRowApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ActionRowApiImpl.js +4 -4
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +6 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +16 -15
- package/src/Api/Implementation/ApiBase.d.ts +12 -3
- package/src/Api/Implementation/ApiBase.js +39 -24
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -3
- package/src/Api/Implementation/CalendarApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +9 -9
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +18 -18
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ColumnMenuApiImpl.js +2 -5
- package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CommentsApiImpl.js +6 -4
- package/src/Api/Implementation/ConfigApiImpl.js +23 -24
- package/src/Api/Implementation/ContextMenuApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ContextMenuApiImpl.js +1 -4
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +3 -3
- package/src/Api/Implementation/DashboardApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DashboardApiImpl.js +5 -5
- package/src/Api/Implementation/DataImportApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataImportApiImpl.js +3 -3
- package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataSetApiImpl.js +5 -5
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +1 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +5 -5
- package/src/Api/Implementation/EventApiImpl.d.ts +1 -1
- package/src/Api/Implementation/EventApiImpl.js +2 -2
- package/src/Api/Implementation/ExportApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.js +7 -7
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExpressionApiImpl.js +5 -5
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +1 -1
- package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +7 -7
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +4 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -2
- package/src/Api/Implementation/GridApiImpl.js +106 -103
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +4 -4
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
- package/src/Api/Implementation/LayoutApiImpl.js +3 -3
- package/src/Api/Implementation/NamedQueryApiImpl.d.ts +1 -1
- package/src/Api/Implementation/NamedQueryApiImpl.js +3 -3
- package/src/Api/Implementation/NoteApiImpl.d.ts +1 -1
- package/src/Api/Implementation/NoteApiImpl.js +3 -3
- package/src/Api/Implementation/OptionsApiImpl.js +7 -7
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/PredicateApiImpl.js +4 -4
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +3 -3
- package/src/Api/Implementation/SettingsPanelApiImpl.js +1 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.js +4 -4
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +1 -1
- package/src/Api/Implementation/SystemStatusApiImpl.js +4 -4
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/TeamSharingApiImpl.js +11 -11
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +8 -8
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -5
- package/src/Api/Internal/ActionRowInternalApi.js +8 -8
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +55 -50
- package/src/Api/Internal/AlertInternalApi.js +9 -9
- package/src/Api/Internal/CalculatedColumnInternalApi.js +11 -9
- package/src/Api/Internal/ChartingInternalApi.js +1 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +7 -9
- package/src/Api/Internal/ColumnInternalApi.js +3 -3
- package/src/Api/Internal/CustomSortInternalApi.js +3 -3
- package/src/Api/Internal/DashboardInternalApi.js +4 -3
- package/src/Api/Internal/DataImportInternalApi.js +2 -2
- package/src/Api/Internal/DataSetInternalApi.js +2 -2
- package/src/Api/Internal/ExportInternalApi.js +21 -22
- package/src/Api/Internal/ExpressionInternalApi.js +4 -4
- package/src/Api/Internal/Fdc3InternalApi.d.ts +0 -1
- package/src/Api/Internal/Fdc3InternalApi.js +9 -12
- package/src/Api/Internal/FlashingCellInternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +2 -3
- package/src/Api/Internal/FreeTextColumnInternalApi.js +5 -2
- package/src/Api/Internal/GridFilterInternalApi.js +2 -2
- package/src/Api/Internal/GridInternalApi.js +26 -26
- package/src/Api/Internal/LayoutInternalApi.js +6 -5
- package/src/Api/Internal/NamedQueryInternalApi.js +2 -2
- package/src/Api/Internal/PredicateInternalApi.js +5 -5
- package/src/Api/Internal/ScheduleInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +2 -2
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -1
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -2
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Strategy/NoteModule.d.ts +0 -1
- package/src/Strategy/NoteModule.js +4 -5
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +1 -1
- package/src/Utilities/Services/CellPopupService.js +4 -4
- package/src/Utilities/Services/Fdc3Service.js +1 -3
- package/src/Utilities/Services/FlashingCellService.d.ts +0 -2
- package/src/Utilities/Services/FlashingCellService.js +2 -3
- package/src/Utilities/Services/RowEditService.js +3 -5
- package/src/View/Alert/AlertStatusSubPanel.js +4 -4
- package/src/View/Charting/ShowChartButton.js +4 -4
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +14 -13
- package/src/agGrid/FloatingFilterWrapper.js +4 -3
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/ExpressionEditor/ExpressionPreview.js +4 -4
- package/src/env.js +2 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -7,9 +7,9 @@ const ApiBase_1 = require("./ApiBase");
|
|
|
7
7
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
8
|
const FormatColumnInternalApi_1 = require("../Internal/FormatColumnInternalApi");
|
|
9
9
|
class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
10
|
-
constructor(
|
|
11
|
-
super(
|
|
12
|
-
this.internalApi = new FormatColumnInternalApi_1.FormatColumnInternalApi(
|
|
10
|
+
constructor(_adaptable) {
|
|
11
|
+
super(_adaptable);
|
|
12
|
+
this.internalApi = new FormatColumnInternalApi_1.FormatColumnInternalApi(_adaptable);
|
|
13
13
|
}
|
|
14
14
|
getFormatColumnState() {
|
|
15
15
|
return this.getAdaptableState().FormatColumn;
|
|
@@ -112,7 +112,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
112
112
|
this.dispatchAction(FormatColumnRedux.FormatColumnMoveDown(formatColumn));
|
|
113
113
|
}
|
|
114
114
|
findFormatColumns(criteria) {
|
|
115
|
-
return this.
|
|
115
|
+
return this.getAdaptableInternalApi().findAdaptableObjectsByLookupCriteria(criteria, this.getFormatColumns({
|
|
116
116
|
includeLayoutNotAssociatedObjects: true,
|
|
117
117
|
}));
|
|
118
118
|
}
|
|
@@ -6,7 +6,7 @@ import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
|
6
6
|
import { FreeTextColumnInternalApi } from '../Internal/FreeTextColumnInternalApi';
|
|
7
7
|
export declare class FreeTextColumnApiImpl extends ApiBase implements FreeTextColumnApi {
|
|
8
8
|
internalApi: FreeTextColumnInternalApi;
|
|
9
|
-
constructor(
|
|
9
|
+
constructor(_adaptable: IAdaptable);
|
|
10
10
|
getFreeTextColumnState(): FreeTextColumnState;
|
|
11
11
|
getFreeTextColumns(): FreeTextColumn[];
|
|
12
12
|
getFreeTextColumnById(technicalId: FreeTextColumn['Uuid']): FreeTextColumn | undefined;
|
|
@@ -8,9 +8,9 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
|
|
|
8
8
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
9
9
|
const FreeTextColumnInternalApi_1 = require("../Internal/FreeTextColumnInternalApi");
|
|
10
10
|
class FreeTextColumnApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
13
|
-
this.internalApi = new FreeTextColumnInternalApi_1.FreeTextColumnInternalApi(
|
|
11
|
+
constructor(_adaptable) {
|
|
12
|
+
super(_adaptable);
|
|
13
|
+
this.internalApi = new FreeTextColumnInternalApi_1.FreeTextColumnInternalApi(_adaptable);
|
|
14
14
|
}
|
|
15
15
|
getFreeTextColumnState() {
|
|
16
16
|
return this.getAdaptableState().FreeTextColumn;
|
|
@@ -93,7 +93,7 @@ class FreeTextColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
93
93
|
return null;
|
|
94
94
|
}
|
|
95
95
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(freeTextColumn.FreeTextStoredValues)) {
|
|
96
|
-
let pkValue = this.
|
|
96
|
+
let pkValue = this._adaptable.getPrimaryKeyValueFromRowNode(rowNode);
|
|
97
97
|
let freeTextStoredValue = freeTextColumn.FreeTextStoredValues.find((fdx) => fdx.PrimaryKey == pkValue);
|
|
98
98
|
if (freeTextStoredValue) {
|
|
99
99
|
return freeTextStoredValue.FreeText;
|
|
@@ -17,7 +17,7 @@ import { GridInternalApi } from '../Internal/GridInternalApi';
|
|
|
17
17
|
import { TransposeConfig } from '../../PredefinedConfig/Common/TransposeConfig';
|
|
18
18
|
export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
19
19
|
internalApi: GridInternalApi;
|
|
20
|
-
constructor(
|
|
20
|
+
constructor(_adaptable: IAdaptable);
|
|
21
21
|
getVariant(): AdaptableVariant;
|
|
22
22
|
getGridState(): GridState;
|
|
23
23
|
loadGridData(dataSource: any): void;
|
|
@@ -114,7 +114,8 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
114
114
|
unHighlightRow(primaryKeyValue: RowHighlightInfo['primaryKeyValue']): void;
|
|
115
115
|
unHighlightRows(primaryKeyValues: RowsHighlightInfo['primaryKeyValues']): void;
|
|
116
116
|
unHighlightAllRows(): void;
|
|
117
|
-
refreshCells(rowNodes: IRowNode[], columnIds: string[]): void;
|
|
117
|
+
refreshCells(rowNodes: IRowNode[], columnIds: string[], suppressFlash?: boolean): void;
|
|
118
|
+
refreshAllCells(forceUpdate?: boolean): void;
|
|
118
119
|
refreshGridCell(gridCell: GridCell): void;
|
|
119
120
|
refreshGridCells(gridCells: GridCell[]): void;
|
|
120
121
|
refreshColumn(columnId: string): void;
|
|
@@ -11,12 +11,12 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exten
|
|
|
11
11
|
const windowFactory_1 = require("../../View/Components/Popups/WindowPopups/windowFactory");
|
|
12
12
|
const RowSummary_1 = require("../../PredefinedConfig/Common/RowSummary");
|
|
13
13
|
class GridApiImpl extends ApiBase_1.ApiBase {
|
|
14
|
-
constructor(
|
|
15
|
-
super(
|
|
16
|
-
this.internalApi = new GridInternalApi_1.GridInternalApi(
|
|
14
|
+
constructor(_adaptable) {
|
|
15
|
+
super(_adaptable);
|
|
16
|
+
this.internalApi = new GridInternalApi_1.GridInternalApi(_adaptable);
|
|
17
17
|
}
|
|
18
18
|
getVariant() {
|
|
19
|
-
return this.
|
|
19
|
+
return this.getAdaptableVariant();
|
|
20
20
|
}
|
|
21
21
|
getGridState() {
|
|
22
22
|
return this.getAdaptableState().Grid;
|
|
@@ -26,20 +26,20 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
26
26
|
// to prevent `cellchanged` events from being triggered for rows that have
|
|
27
27
|
// the same primary key with existing rows
|
|
28
28
|
// see #testprevent_cellchanged_event_on_load_grid_data
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
29
|
+
this._adaptable.agGridAdapter.setGridOption('rowData', []);
|
|
30
|
+
this._adaptable.setGridData(dataSource);
|
|
31
31
|
const allRowNodes = this.getAllRowNodes();
|
|
32
32
|
this.internalApi.fireGridDataChangedEvent(dataSource, allRowNodes, 'Load');
|
|
33
33
|
}
|
|
34
34
|
getGridData() {
|
|
35
|
-
return this.
|
|
35
|
+
return this._adaptable.getGridData();
|
|
36
36
|
}
|
|
37
37
|
getFilteredData() {
|
|
38
|
-
return this.
|
|
38
|
+
return this._adaptable.getFilteredData();
|
|
39
39
|
}
|
|
40
40
|
getVisibleData() {
|
|
41
41
|
const data = [];
|
|
42
|
-
this.
|
|
42
|
+
this.getAdaptableInternalApi().forAllVisibleRowNodesDo((rowNode) => {
|
|
43
43
|
if (!this.isGroupRowNode(rowNode)) {
|
|
44
44
|
data.push(rowNode.data);
|
|
45
45
|
}
|
|
@@ -47,12 +47,12 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
47
47
|
return data;
|
|
48
48
|
}
|
|
49
49
|
async updateGridData(dataRows, dataUpdateConfig) {
|
|
50
|
-
const rowNodes = await this.
|
|
50
|
+
const rowNodes = await this._adaptable.updateRows(dataRows, dataUpdateConfig);
|
|
51
51
|
this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, 'Update');
|
|
52
52
|
return rowNodes;
|
|
53
53
|
}
|
|
54
54
|
async addOrUpdateGridData(dataRows, dataUpdateConfig) {
|
|
55
|
-
const { added, updated } = await this.
|
|
55
|
+
const { added, updated } = await this._adaptable.addOrUpdateRows(dataRows, dataUpdateConfig);
|
|
56
56
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(updated)) {
|
|
57
57
|
this.internalApi.fireGridDataChangedEvent(dataRows, updated, 'Update');
|
|
58
58
|
}
|
|
@@ -65,13 +65,13 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
async addGridData(dataRows, dataUpdateConfig) {
|
|
68
|
-
const rowNodes = await this.
|
|
68
|
+
const rowNodes = await this._adaptable.addRows(dataRows, dataUpdateConfig);
|
|
69
69
|
this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, 'Add');
|
|
70
70
|
return rowNodes;
|
|
71
71
|
}
|
|
72
72
|
undoCellEdit(cellDataChangedInfo) {
|
|
73
73
|
// for the reason of this hacky solution see the comments in DataService
|
|
74
|
-
this.
|
|
74
|
+
this.getAdaptableInternalApi().getDataService().logUndoChange(cellDataChangedInfo);
|
|
75
75
|
const cellUpdateRequest = {
|
|
76
76
|
columnId: cellDataChangedInfo.column.columnId,
|
|
77
77
|
newValue: cellDataChangedInfo.oldValue,
|
|
@@ -83,7 +83,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
83
83
|
}
|
|
84
84
|
async deleteGridData(dataRows, dataUpdateConfig) {
|
|
85
85
|
if (this.checkArrayExists(dataRows)) {
|
|
86
|
-
const rowNodes = await this.
|
|
86
|
+
const rowNodes = await this._adaptable.deleteRows(dataRows, dataUpdateConfig);
|
|
87
87
|
this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, 'Delete');
|
|
88
88
|
return rowNodes;
|
|
89
89
|
}
|
|
@@ -101,7 +101,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
101
101
|
this.logWarn(`setCellValue() - rowNode not found for primaryKeyValue: ${cellUpdateRequest.primaryKeyValue}`);
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
|
-
this.
|
|
104
|
+
this._adaptable.setDataValue(cellUpdateRequest.newValue, abColumn, cellUpdateRequest.primaryKeyValue, rowNode);
|
|
105
105
|
this.refreshCells([rowNode], [abColumn.columnId]);
|
|
106
106
|
}
|
|
107
107
|
setCellValues(cellUpdateRequests) {
|
|
@@ -126,10 +126,10 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
126
126
|
return rowNode ? this.getNormalisedValueFromRowNode(rowNode, columnId) : undefined;
|
|
127
127
|
}
|
|
128
128
|
hideFilterForm() {
|
|
129
|
-
this.
|
|
129
|
+
this._adaptable.hideColumnFilterForm();
|
|
130
130
|
}
|
|
131
131
|
applyGridFiltering() {
|
|
132
|
-
this.
|
|
132
|
+
this._adaptable.applyColumnFiltering();
|
|
133
133
|
}
|
|
134
134
|
clearGridFiltering() {
|
|
135
135
|
// slightly round the houses but we have to call ColumnFilterAPI as it does it properly
|
|
@@ -143,11 +143,11 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
143
143
|
return columnSorts === null || columnSorts === void 0 ? void 0 : columnSorts.find((cs) => cs.ColumnId == columnId);
|
|
144
144
|
}
|
|
145
145
|
setAdaptableSorting(columnSorts) {
|
|
146
|
-
this.
|
|
146
|
+
this._adaptable.setColumnSort(columnSorts);
|
|
147
147
|
this.setColumnSorts(columnSorts);
|
|
148
148
|
}
|
|
149
149
|
clearAdaptableSorting() {
|
|
150
|
-
this.
|
|
150
|
+
this._adaptable.clearColumnSort();
|
|
151
151
|
this.clearColumnSorts();
|
|
152
152
|
}
|
|
153
153
|
setColumnSorts(columnSorts) {
|
|
@@ -167,13 +167,13 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
167
167
|
this.selectNodes(nodes, clearSelection);
|
|
168
168
|
}
|
|
169
169
|
selectNode(rowNode, clearSelection) {
|
|
170
|
-
this.
|
|
170
|
+
this._adaptable.selectNode(rowNode, clearSelection);
|
|
171
171
|
}
|
|
172
172
|
selectNodes(rowNodes, clearSelection) {
|
|
173
|
-
this.
|
|
173
|
+
this._adaptable.selectNodes(rowNodes, clearSelection);
|
|
174
174
|
}
|
|
175
175
|
deSelectRow(primaryKeyValue, clearSelection) {
|
|
176
|
-
this.
|
|
176
|
+
this._adaptable.deSelectNode(this.getRowNodeForPrimaryKey(primaryKeyValue), clearSelection);
|
|
177
177
|
}
|
|
178
178
|
deSelectRows(primaryKeyValues, clearSelection) {
|
|
179
179
|
let nodes = [];
|
|
@@ -183,22 +183,22 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
183
183
|
this.deSelectNodes(nodes, clearSelection);
|
|
184
184
|
}
|
|
185
185
|
deSelectNode(rowNode, clearSelection) {
|
|
186
|
-
this.
|
|
186
|
+
this._adaptable.deSelectNode(rowNode, clearSelection);
|
|
187
187
|
}
|
|
188
188
|
deSelectNodes(rowNodes, clearSelection) {
|
|
189
|
-
this.
|
|
189
|
+
this._adaptable.deSelectNodes(rowNodes, clearSelection);
|
|
190
190
|
}
|
|
191
191
|
getSelectionStartEndNodes(gridCellRange) {
|
|
192
192
|
let startNode;
|
|
193
193
|
let endNode;
|
|
194
194
|
startNode = gridCellRange.primaryKeyValueEnd
|
|
195
|
-
? this.
|
|
196
|
-
: this.
|
|
195
|
+
? this._adaptable.getRowNodeForPrimaryKey(gridCellRange.primaryKeyValueStart)
|
|
196
|
+
: this._adaptable.getRowNodeByIndex(gridCellRange.rowIndexStart);
|
|
197
197
|
if (gridCellRange.primaryKeyValueEnd) {
|
|
198
|
-
endNode = this.
|
|
198
|
+
endNode = this._adaptable.getRowNodeForPrimaryKey(gridCellRange.primaryKeyValueEnd);
|
|
199
199
|
}
|
|
200
200
|
else if (gridCellRange.rowIndexEnd) {
|
|
201
|
-
endNode = this.
|
|
201
|
+
endNode = this._adaptable.getRowNodeByIndex(gridCellRange.rowIndexEnd);
|
|
202
202
|
}
|
|
203
203
|
else {
|
|
204
204
|
endNode = startNode;
|
|
@@ -215,7 +215,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
215
215
|
}
|
|
216
216
|
const [startNode, endNode] = this.getSelectionStartEndNodes(gridCellRange);
|
|
217
217
|
if (startNode && endNode) {
|
|
218
|
-
this.
|
|
218
|
+
this._adaptable.selectCells(gridCellRange.columnIds, startNode, endNode, clearSelection);
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
selectCellRangeByQuery(query, gridCellRange, clearSelection) {
|
|
@@ -226,13 +226,13 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
226
226
|
if (gridCellRange) {
|
|
227
227
|
const [startNode, endNode] = this.getSelectionStartEndNodes(gridCellRange);
|
|
228
228
|
for (let rowIndex = startNode.rowIndex; rowIndex <= endNode.rowIndex; rowIndex++) {
|
|
229
|
-
const rowNode = this.
|
|
229
|
+
const rowNode = this._adaptable.getRowNodeByIndex(rowIndex);
|
|
230
230
|
isRowNodeInQuery(rowNode) && filteredRowNodes.push(rowNode);
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
else {
|
|
234
234
|
// include all row
|
|
235
|
-
this.
|
|
235
|
+
this._adaptable.forAllRowNodesDo((rowNode) => {
|
|
236
236
|
isRowNodeInQuery(rowNode) && filteredRowNodes.push(rowNode);
|
|
237
237
|
});
|
|
238
238
|
}
|
|
@@ -272,7 +272,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
272
272
|
let preparedClearSelection = clearSelection;
|
|
273
273
|
rowRanges.forEach((range) => {
|
|
274
274
|
// clear only on first range selection
|
|
275
|
-
this.
|
|
275
|
+
this._adaptable.selectCells(preapredGridCellRange.columnIds, range.startNode, range.endNode, preparedClearSelection);
|
|
276
276
|
preparedClearSelection = false;
|
|
277
277
|
});
|
|
278
278
|
}
|
|
@@ -283,106 +283,106 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
283
283
|
this.getAdaptableApi().columnApi.selectColumns(columnIds);
|
|
284
284
|
}
|
|
285
285
|
getFirstRowNode() {
|
|
286
|
-
return this.
|
|
286
|
+
return this._adaptable.getFirstRowNode();
|
|
287
287
|
}
|
|
288
288
|
getFirstDisplayedRowNode() {
|
|
289
|
-
return this.
|
|
289
|
+
return this._adaptable.getFirstDisplayedRowNode();
|
|
290
290
|
}
|
|
291
291
|
getVisibleRowNodes(config) {
|
|
292
292
|
const rowNodes = [];
|
|
293
|
-
this.
|
|
293
|
+
this.getAdaptableInternalApi().forAllVisibleRowNodesDo((rowNode) => rowNodes.push(rowNode), config);
|
|
294
294
|
return rowNodes;
|
|
295
295
|
}
|
|
296
296
|
getAllRowNodes(config) {
|
|
297
|
-
return this.
|
|
297
|
+
return this._adaptable.getAllRowNodes(config);
|
|
298
298
|
}
|
|
299
299
|
getGroupRowNodes(config) {
|
|
300
|
-
return this.
|
|
300
|
+
return this._adaptable.getGroupRowNodes(config);
|
|
301
301
|
}
|
|
302
302
|
getGridCellFromRowNode(rowNode, columnId) {
|
|
303
|
-
return this.
|
|
303
|
+
return this._adaptable.getGridCellFromRowNode(rowNode, columnId);
|
|
304
304
|
}
|
|
305
305
|
getRawValueFromRowNode(rowNode, columnId) {
|
|
306
|
-
return this.
|
|
306
|
+
return this._adaptable.getRawValueFromRowNode(rowNode, columnId);
|
|
307
307
|
}
|
|
308
308
|
getDisplayValueFromRowNode(rowNode, columnId) {
|
|
309
|
-
return this.
|
|
309
|
+
return this._adaptable.getDisplayValueFromRowNode(rowNode, columnId);
|
|
310
310
|
}
|
|
311
311
|
getDisplayValueFromRawValue(rowNode, columnId, rawValue) {
|
|
312
|
-
return this.
|
|
312
|
+
return this._adaptable.getDisplayValueFromRawValue(rowNode, columnId, rawValue);
|
|
313
313
|
}
|
|
314
314
|
getNormalisedValueFromRowNode(rowNode, columnId) {
|
|
315
|
-
const rawValue = this.
|
|
315
|
+
const rawValue = this._adaptable.getRawValueFromRowNode(rowNode, columnId);
|
|
316
316
|
const abColumn = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
|
|
317
|
-
return this.
|
|
317
|
+
return this._adaptable.getNormalisedValueFromRawValue(rawValue, abColumn);
|
|
318
318
|
}
|
|
319
319
|
getRowNodesForPrimaryKeys(primaryKeyValues) {
|
|
320
|
-
return this.
|
|
320
|
+
return this._adaptable.getRowNodesForPrimaryKeys(primaryKeyValues);
|
|
321
321
|
}
|
|
322
322
|
getRowNodeForPrimaryKey(primaryKeyValue) {
|
|
323
|
-
return this.
|
|
323
|
+
return this._adaptable.getRowNodeForPrimaryKey(primaryKeyValue);
|
|
324
324
|
}
|
|
325
325
|
getPrimaryKeyValueForRowNode(rowNode) {
|
|
326
|
-
return this.
|
|
326
|
+
return this._adaptable.getPrimaryKeyValueFromRowNode(rowNode);
|
|
327
327
|
}
|
|
328
328
|
getRowNodeForIndex(index) {
|
|
329
|
-
return this.
|
|
329
|
+
return this._adaptable.getRowNodeByIndex(index);
|
|
330
330
|
}
|
|
331
331
|
getPrimaryKeyValuesForRowNodes(rowNodes) {
|
|
332
332
|
return rowNodes.map((rowNode) => this.getPrimaryKeyValueForRowNode(rowNode));
|
|
333
333
|
}
|
|
334
334
|
setRowGroupColumns(columnIds) {
|
|
335
|
-
this.
|
|
335
|
+
this._adaptable.setRowGroupColumns(columnIds);
|
|
336
336
|
}
|
|
337
337
|
clearRowGroupColumns() {
|
|
338
|
-
this.
|
|
338
|
+
this._adaptable.clearRowGroupColumns();
|
|
339
339
|
}
|
|
340
340
|
expandAllRowGroups() {
|
|
341
|
-
this.
|
|
341
|
+
this._adaptable.expandAllRowGroups();
|
|
342
342
|
}
|
|
343
343
|
collapseAllRowGroups() {
|
|
344
|
-
this.
|
|
344
|
+
this._adaptable.collapseAllRowGroups();
|
|
345
345
|
}
|
|
346
346
|
getExpandRowGroupsKeys() {
|
|
347
|
-
return this.
|
|
347
|
+
return this._adaptable.getExpandRowGroupsKeys();
|
|
348
348
|
}
|
|
349
349
|
expandRowGroupsForValues(columnValues) {
|
|
350
|
-
this.
|
|
350
|
+
this._adaptable.expandRowGroupsForValues(columnValues);
|
|
351
351
|
}
|
|
352
352
|
isGridPivotable() {
|
|
353
|
-
return !this.
|
|
353
|
+
return !this.getAdaptableInternalApi().isGridInTreeMode();
|
|
354
354
|
}
|
|
355
355
|
isGridGroupable() {
|
|
356
|
-
return !this.
|
|
356
|
+
return !this.getAdaptableInternalApi().isGridInTreeMode();
|
|
357
357
|
}
|
|
358
358
|
isGridRowSelectable() {
|
|
359
|
-
return this.
|
|
359
|
+
return this._adaptable.isGridRowSelectable();
|
|
360
360
|
}
|
|
361
361
|
isGridRangeSelectable() {
|
|
362
|
-
return this.
|
|
362
|
+
return this._adaptable.isGridRangeSelectable();
|
|
363
363
|
}
|
|
364
364
|
isGridRowGrouped() {
|
|
365
|
-
return this.
|
|
365
|
+
return this._adaptable.isGridGroupingActive();
|
|
366
366
|
}
|
|
367
367
|
isGridInPivotMode() {
|
|
368
368
|
return this.getLayoutApi().isCurrentLayoutPivot();
|
|
369
369
|
}
|
|
370
370
|
isGroupRowNode(rowNode) {
|
|
371
|
-
return this.
|
|
371
|
+
return this._adaptable.isGroupRowNode(rowNode);
|
|
372
372
|
}
|
|
373
373
|
isSummaryNode(rowNode) {
|
|
374
374
|
var _a;
|
|
375
375
|
return !!((_a = rowNode === null || rowNode === void 0 ? void 0 : rowNode.data) === null || _a === void 0 ? void 0 : _a[RowSummary_1.ROW_SUMMARY_ROW_ID]);
|
|
376
376
|
}
|
|
377
377
|
isQuickFilterAvailable() {
|
|
378
|
-
return this.
|
|
378
|
+
return this._adaptable.isQuickFilterAvailable();
|
|
379
379
|
}
|
|
380
380
|
redrawGrid() {
|
|
381
|
-
this.
|
|
382
|
-
this.
|
|
381
|
+
this._adaptable.redrawBody();
|
|
382
|
+
this._adaptable.refreshHeader();
|
|
383
383
|
}
|
|
384
384
|
getGridCellsForRawValue(columnId, rawValue) {
|
|
385
|
-
const gridCells = this.
|
|
385
|
+
const gridCells = this._adaptable.getGridCellsForColumn(columnId);
|
|
386
386
|
if (!gridCells) {
|
|
387
387
|
return undefined;
|
|
388
388
|
}
|
|
@@ -399,7 +399,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
399
399
|
return gridCells === null || gridCells === void 0 ? void 0 : gridCells.length;
|
|
400
400
|
}
|
|
401
401
|
getGridCellsForDisplayValue(columnId, displayValue) {
|
|
402
|
-
const gridCells = this.
|
|
402
|
+
const gridCells = this._adaptable.getGridCellsForColumn(columnId);
|
|
403
403
|
if (!gridCells) {
|
|
404
404
|
return undefined;
|
|
405
405
|
}
|
|
@@ -412,15 +412,15 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
412
412
|
return returnGridCells;
|
|
413
413
|
}
|
|
414
414
|
jumpToRow(primaryKeyValue) {
|
|
415
|
-
const node = this.
|
|
416
|
-
this.
|
|
415
|
+
const node = this._adaptable.getRowNodeForPrimaryKey(primaryKeyValue);
|
|
416
|
+
this._adaptable.jumpToRow(node);
|
|
417
417
|
}
|
|
418
418
|
jumpToColumn(columnId) {
|
|
419
|
-
this.
|
|
419
|
+
this._adaptable.jumpToColumn(columnId);
|
|
420
420
|
}
|
|
421
421
|
jumpToCell(primaryKeyValue, columnId) {
|
|
422
|
-
const node = this.
|
|
423
|
-
this.
|
|
422
|
+
const node = this._adaptable.getRowNodeForPrimaryKey(primaryKeyValue);
|
|
423
|
+
this._adaptable.jumpToCell(columnId, node);
|
|
424
424
|
}
|
|
425
425
|
highlightCell(cellHighlightInfo) {
|
|
426
426
|
this.dispatchAction((0, SystemRedux_1.SystemHighlightCellAdd)(cellHighlightInfo));
|
|
@@ -461,8 +461,11 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
461
461
|
unHighlightAllRows() {
|
|
462
462
|
this.dispatchAction((0, SystemRedux_1.SystemHighlightRowDeleteAll)());
|
|
463
463
|
}
|
|
464
|
-
refreshCells(rowNodes, columnIds) {
|
|
465
|
-
this.
|
|
464
|
+
refreshCells(rowNodes, columnIds, suppressFlash = true) {
|
|
465
|
+
this._adaptable.refreshCells(rowNodes, columnIds, suppressFlash);
|
|
466
|
+
}
|
|
467
|
+
refreshAllCells(forceUpdate = false) {
|
|
468
|
+
this._adaptable.refreshAllCells(forceUpdate);
|
|
466
469
|
}
|
|
467
470
|
refreshGridCell(gridCell) {
|
|
468
471
|
this.refreshCells([gridCell.rowNode], [gridCell.column.columnId]);
|
|
@@ -473,25 +476,25 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
473
476
|
});
|
|
474
477
|
}
|
|
475
478
|
refreshColumn(columnId) {
|
|
476
|
-
this.
|
|
479
|
+
this._adaptable.refreshCells(null, [columnId], true);
|
|
477
480
|
}
|
|
478
481
|
refreshColumns(columnIds) {
|
|
479
|
-
this.
|
|
482
|
+
this._adaptable.refreshCells(null, columnIds, true);
|
|
480
483
|
}
|
|
481
484
|
refreshRowByPrimaryKey(primaryKey) {
|
|
482
485
|
const rowNode = this.getRowNodeForPrimaryKey(primaryKey);
|
|
483
486
|
this.refreshRowNode(rowNode);
|
|
484
487
|
}
|
|
485
488
|
refreshRowNode(rowNode) {
|
|
486
|
-
this.
|
|
489
|
+
this._adaptable.redrawRow(rowNode);
|
|
487
490
|
}
|
|
488
491
|
refreshRowNodes(rowNodes) {
|
|
489
|
-
this.
|
|
492
|
+
this._adaptable.redrawRows(rowNodes);
|
|
490
493
|
}
|
|
491
494
|
refreshGroupRowNodes() {
|
|
492
495
|
// see https://www.ag-grid.com/javascript-data-grid/client-side-row-stages/#refreshing-the-client-side-model
|
|
493
|
-
this.
|
|
494
|
-
this.
|
|
496
|
+
this.getAgGridApi().refreshClientSideRowModel('group');
|
|
497
|
+
this._adaptable.updateRowGroupsExpandedState();
|
|
495
498
|
}
|
|
496
499
|
isCellEditable(gridCell) {
|
|
497
500
|
if (!gridCell) {
|
|
@@ -509,7 +512,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
509
512
|
}
|
|
510
513
|
const cellEditableFn = this.getEditOptions().isCellEditable;
|
|
511
514
|
if (cellEditableFn) {
|
|
512
|
-
const cellEditableContext = Object.assign({ gridCell }, this.
|
|
515
|
+
const cellEditableContext = Object.assign({ gridCell }, this.getAdaptableInternalApi().buildBaseContext());
|
|
513
516
|
return cellEditableFn(cellEditableContext);
|
|
514
517
|
}
|
|
515
518
|
return true;
|
|
@@ -530,37 +533,37 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
530
533
|
return true;
|
|
531
534
|
}
|
|
532
535
|
getRowCount() {
|
|
533
|
-
return this.
|
|
536
|
+
return this._adaptable.getRowCount();
|
|
534
537
|
}
|
|
535
538
|
getVisibleRowCount() {
|
|
536
|
-
return this.
|
|
539
|
+
return this._adaptable.getVisibleRowCount();
|
|
537
540
|
}
|
|
538
541
|
getRowsInViewport() {
|
|
539
|
-
return this.
|
|
542
|
+
return this._adaptable.getRowsInViewport();
|
|
540
543
|
}
|
|
541
544
|
getColumnCount() {
|
|
542
|
-
return this.
|
|
545
|
+
return this._adaptable.getColumnCount();
|
|
543
546
|
}
|
|
544
547
|
getVisibleColumnCount() {
|
|
545
|
-
return this.
|
|
548
|
+
return this._adaptable.getVisibleColumnCount();
|
|
546
549
|
}
|
|
547
550
|
selectAll() {
|
|
548
|
-
this.
|
|
551
|
+
this._adaptable.selectAll();
|
|
549
552
|
}
|
|
550
553
|
deselectAll() {
|
|
551
|
-
this.
|
|
554
|
+
this._adaptable.deselectAll();
|
|
552
555
|
}
|
|
553
556
|
destroy() {
|
|
554
|
-
this.
|
|
557
|
+
this._adaptable.destroy();
|
|
555
558
|
}
|
|
556
559
|
getGridContainerElement() {
|
|
557
|
-
return this.
|
|
560
|
+
return this._adaptable.getAgGridContainerElement();
|
|
558
561
|
}
|
|
559
562
|
openGridInfoSettingsPanel() {
|
|
560
563
|
this.showModulePopup(ModuleConstants.GridInfoModuleId);
|
|
561
564
|
}
|
|
562
565
|
getAgGridRowModelType() {
|
|
563
|
-
return this.
|
|
566
|
+
return this._adaptable.getAgGridRowModelType();
|
|
564
567
|
}
|
|
565
568
|
showTransposedView(transposeConfig = {}) {
|
|
566
569
|
var _a, _b, _c, _d, _e;
|
|
@@ -569,7 +572,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
569
572
|
const visibleColumns = (_c = transposeConfig.visibleColumns) !== null && _c !== void 0 ? _c : false;
|
|
570
573
|
const visibleRows = (_d = transposeConfig.visibleRows) !== null && _d !== void 0 ? _d : false;
|
|
571
574
|
const autosize = (_e = transposeConfig.autosize) !== null && _e !== void 0 ? _e : true;
|
|
572
|
-
this.
|
|
575
|
+
this.getAdaptableInternalApi().showPopupWindow({
|
|
573
576
|
id: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
574
577
|
factoryId: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
575
578
|
title: 'Transposed View',
|
|
@@ -584,7 +587,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
584
587
|
});
|
|
585
588
|
}
|
|
586
589
|
getAllAgGridColumns() {
|
|
587
|
-
return this.
|
|
590
|
+
return this._adaptable.getAllGridColumns();
|
|
588
591
|
}
|
|
589
592
|
updateAgGridColumnState(columnState) {
|
|
590
593
|
const columnExists = this.getColumnApi().doesColumnExist(columnState.colId);
|
|
@@ -592,7 +595,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
592
595
|
this.logWarn(`Column with id ${columnState.colId} does not exist, could NOT update configuration`);
|
|
593
596
|
return;
|
|
594
597
|
}
|
|
595
|
-
const agGridApi = this.
|
|
598
|
+
const agGridApi = this._adaptable.agGridAdapter.getAgGridApi();
|
|
596
599
|
agGridApi.applyColumnState({
|
|
597
600
|
state: [columnState],
|
|
598
601
|
});
|
|
@@ -605,18 +608,18 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
605
608
|
notExistingColumnIds.forEach((colId) => {
|
|
606
609
|
this.logWarn(`Column with id ${colId} does not exist, could NOT update configuration`);
|
|
607
610
|
});
|
|
608
|
-
const agGridApi = this.
|
|
611
|
+
const agGridApi = this._adaptable.agGridAdapter.getAgGridApi();
|
|
609
612
|
agGridApi.applyColumnState({
|
|
610
613
|
state: existingColumnStates,
|
|
611
614
|
});
|
|
612
615
|
}
|
|
613
616
|
setAgGridColumnDefinitions(columnDefinitions) {
|
|
614
|
-
const agGridApi = this.
|
|
617
|
+
const agGridApi = this._adaptable.agGridAdapter.getAgGridApi();
|
|
615
618
|
agGridApi.setGridOption('columnDefs', columnDefinitions);
|
|
616
|
-
this.
|
|
619
|
+
this._adaptable.updateColumnModelAndRefreshGrid({ skipColDefsRefresh: true });
|
|
617
620
|
}
|
|
618
621
|
updateAgGridColumnDefinition(columnDefinitionToBeUpdated) {
|
|
619
|
-
const currentColDefs = [...this.
|
|
622
|
+
const currentColDefs = [...this._adaptable.agGridAdapter.getAgGridApi().getColumnDefs()];
|
|
620
623
|
const columnId = columnDefinitionToBeUpdated.colId;
|
|
621
624
|
const doesColumnExist = this.getColumnApi().doesColumnExist(columnId);
|
|
622
625
|
if (!doesColumnExist) {
|
|
@@ -625,20 +628,20 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
625
628
|
this.setAgGridColumnDefinitions(newColDefs);
|
|
626
629
|
return;
|
|
627
630
|
}
|
|
628
|
-
const updatedColDefs = this.
|
|
631
|
+
const updatedColDefs = this._adaptable.agGridAdapter.traverseColDefs(currentColDefs, (colDef) => {
|
|
629
632
|
return colDef.colId === columnId ? Object.assign(Object.assign({}, colDef), columnDefinitionToBeUpdated) : colDef;
|
|
630
633
|
});
|
|
631
634
|
this.setAgGridColumnDefinitions(updatedColDefs);
|
|
632
635
|
}
|
|
633
636
|
updateAgGridColumnDefinitions(columnDefinitionsToBeUpdated) {
|
|
634
|
-
const currentColDefs = [...this.
|
|
635
|
-
const updatedColDefs = this.
|
|
637
|
+
const currentColDefs = [...this._adaptable.agGridAdapter.getAgGridApi().getColumnDefs()];
|
|
638
|
+
const updatedColDefs = this._adaptable.agGridAdapter.traverseColDefs(currentColDefs, (colDef) => {
|
|
636
639
|
const newColDef = newColumnDefinitions.find((c) => c.colId === colDef.colId);
|
|
637
640
|
return newColDef ? Object.assign(Object.assign({}, colDef), newColDef) : colDef;
|
|
638
641
|
});
|
|
639
642
|
// find out new columns which are not in the current column definitions
|
|
640
643
|
const currentColIds = [];
|
|
641
|
-
this.
|
|
644
|
+
this._adaptable.agGridAdapter.traverseColDefs(currentColDefs, (colDef) => {
|
|
642
645
|
currentColIds.push(colDef.colId);
|
|
643
646
|
return colDef;
|
|
644
647
|
});
|
|
@@ -654,8 +657,8 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
654
657
|
this.logWarn(`Column with id ${columnId} does not exist!`);
|
|
655
658
|
return;
|
|
656
659
|
}
|
|
657
|
-
const currentColDefs = this.
|
|
658
|
-
const updatedColDefs = this.
|
|
660
|
+
const currentColDefs = this._adaptable.agGridAdapter.getAgGridApi().getColumnDefs();
|
|
661
|
+
const updatedColDefs = this._adaptable.agGridAdapter
|
|
659
662
|
.traverseColDefs(currentColDefs, (colDef) => {
|
|
660
663
|
return colDef.colId === columnId ? null : colDef;
|
|
661
664
|
})
|
|
@@ -663,9 +666,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
663
666
|
this.setAgGridColumnDefinitions(updatedColDefs);
|
|
664
667
|
}
|
|
665
668
|
addAgGridColumnDefinition(newColumnDefinition) {
|
|
666
|
-
const currentColDefs = this.
|
|
669
|
+
const currentColDefs = this._adaptable.agGridAdapter.getAgGridApi().getColumnDefs();
|
|
667
670
|
// just in case check of there is not already an existing column with the same id and eliminate it
|
|
668
|
-
const sanitizedColDefs = this.
|
|
671
|
+
const sanitizedColDefs = this._adaptable.agGridAdapter
|
|
669
672
|
.traverseColDefs(currentColDefs, (colDef) => {
|
|
670
673
|
return colDef.colId === newColumnDefinition.colId ? null : colDef;
|
|
671
674
|
})
|
|
@@ -5,7 +5,7 @@ import { ApiBase } from './ApiBase';
|
|
|
5
5
|
import { GridFilter } from '../../types';
|
|
6
6
|
export declare class GridFilterApiImpl extends ApiBase implements GridFilterApi {
|
|
7
7
|
internalApi: GridFilterInternalApi;
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(_adaptable: IAdaptable);
|
|
9
9
|
getCurrentGridFilter(): GridFilter | undefined;
|
|
10
10
|
getCurrentGridFilterExpression(): string | undefined;
|
|
11
11
|
setGridFilterExpression(filter: string): void;
|