@adaptabletools/adaptable 15.4.0 → 15.4.2

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.
Files changed (47) hide show
  1. package/bundle.cjs.js +120 -120
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
  6. package/src/Api/BulkUpdateApi.d.ts +3 -3
  7. package/src/Api/GridApi.d.ts +10 -19
  8. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +2 -2
  9. package/src/Api/Implementation/BulkUpdateApiImpl.js +2 -2
  10. package/src/Api/Implementation/GridApiImpl.d.ts +5 -13
  11. package/src/Api/Implementation/GridApiImpl.js +43 -13
  12. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +2 -2
  13. package/src/Api/Implementation/PlusMinusApiImpl.js +2 -2
  14. package/src/Api/Implementation/SmartEditApiImpl.d.ts +2 -2
  15. package/src/Api/Implementation/SmartEditApiImpl.js +2 -2
  16. package/src/Api/Internal/ActionInternalApi.d.ts +0 -1
  17. package/src/Api/Internal/ActionInternalApi.js +0 -28
  18. package/src/Api/Internal/GridInternalApi.d.ts +0 -3
  19. package/src/Api/Internal/GridInternalApi.js +0 -23
  20. package/src/Api/PlusMinusApi.d.ts +3 -3
  21. package/src/Api/SmartEditApi.d.ts +3 -3
  22. package/src/PredefinedConfig/Selection/GridCell.d.ts +21 -0
  23. package/src/Redux/ActionsReducers/BulkUpdateRedux.d.ts +3 -3
  24. package/src/Redux/ActionsReducers/BulkUpdateRedux.js +2 -2
  25. package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +3 -3
  26. package/src/Redux/ActionsReducers/PlusMinusRedux.js +2 -2
  27. package/src/Redux/ActionsReducers/SmartEditRedux.d.ts +3 -3
  28. package/src/Redux/ActionsReducers/SmartEditRedux.js +2 -2
  29. package/src/Redux/Store/AdaptableStore.js +5 -5
  30. package/src/Strategy/CalculatedColumnModule.d.ts +4 -1
  31. package/src/Strategy/CalculatedColumnModule.js +30 -13
  32. package/src/Strategy/Interface/ISmartEditModule.d.ts +2 -2
  33. package/src/Strategy/PlusMinusModule.js +10 -1
  34. package/src/Strategy/SmartEditModule.d.ts +2 -2
  35. package/src/Strategy/SmartEditModule.js +2 -2
  36. package/src/Utilities/Helpers/FormatHelper.js +1 -1
  37. package/src/Utilities/Helpers/PreviewHelper.d.ts +3 -1
  38. package/src/Utilities/Helpers/PreviewHelper.js +31 -1
  39. package/src/Utilities/Helpers/StyleHelper.d.ts +4 -0
  40. package/src/Utilities/Helpers/StyleHelper.js +25 -1
  41. package/src/agGrid/Adaptable.d.ts +0 -1
  42. package/src/agGrid/Adaptable.js +5 -13
  43. package/src/metamodel/adaptable.metamodel.d.ts +16 -0
  44. package/src/metamodel/adaptable.metamodel.js +1 -1
  45. package/src/types.d.ts +1 -1
  46. package/version.d.ts +1 -1
  47. package/version.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "15.4.0",
3
+ "version": "15.4.2",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,2 +1,2 @@
1
- declare const _default: 1686584389051;
1
+ declare const _default: 1687108346180;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1686584389051;
3
+ exports.default = 1687108346180;
@@ -2,7 +2,6 @@ import { ChartModel, ChartRef, Column, IRowNode, ModuleNames, RowModelType, Stat
2
2
  import { AdaptableApi } from '../Api/AdaptableApi';
3
3
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
4
4
  import { ColumnSort } from '../PredefinedConfig/Common/ColumnSort';
5
- import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
6
5
  import { DataUpdateConfig } from '../PredefinedConfig/Common/DataUpdateConfig';
7
6
  import { ReportData } from '../PredefinedConfig/ExportState';
8
7
  import { Layout } from '../PredefinedConfig/LayoutState';
@@ -187,7 +186,6 @@ export interface IAdaptable {
187
186
  getPluginProperty(pluginId: string, propertyName: string, ...args: any): any;
188
187
  getPlugin(pluginId: string): AdaptablePlugin;
189
188
  setDataValue(value: any, column: AdaptableColumn, primaryKeyValue: any, rowNode?: IRowNode): void;
190
- setCellValue(cellDataChangedInfo: CellDataChangedInfo): void;
191
189
  cancelEdit(): any;
192
190
  isCellEditable(rowNode: IRowNode, column: Column): boolean;
193
191
  getFirstRowNode(): IRowNode | undefined;
@@ -1,4 +1,4 @@
1
- import { GridCell } from '../PredefinedConfig/Selection/GridCell';
1
+ import { CellUpdateRequest } from '../PredefinedConfig/Selection/GridCell';
2
2
  /**
3
3
  * Provides run-time access to the Bulk Update Module
4
4
  **/
@@ -13,9 +13,9 @@ export interface BulkUpdateApi {
13
13
  openBulkUpdateSettingsPanel(): void;
14
14
  /**
15
15
  * Applies a Bulk Update to given Cells
16
- * @param gridCells Cells to apply the Bulk Update
16
+ * @param cellUpdateRequests Cells to apply the Bulk Update
17
17
  */
18
- applyBulkUpdate(gridCells: GridCell[]): void;
18
+ applyBulkUpdate(cellUpdateRequests: CellUpdateRequest[]): void;
19
19
  /**
20
20
  * Sets Bulk Update value
21
21
  * @param bulkUpdateValue the value to use in Bulk Update Operation
@@ -2,7 +2,7 @@ import { GridState } from '../PredefinedConfig/GridState';
2
2
  import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
3
3
  import { SelectedRowInfo } from '../PredefinedConfig/Selection/SelectedRowInfo';
4
4
  import { ColumnSort } from '../PredefinedConfig/Common/ColumnSort';
5
- import { GridCell } from '../PredefinedConfig/Selection/GridCell';
5
+ import { CellUpdateRequest, GridCell } from '../PredefinedConfig/Selection/GridCell';
6
6
  import { DataUpdateConfig } from '../PredefinedConfig/Common/DataUpdateConfig';
7
7
  import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
8
8
  import { CellHighlightInfo } from '../PredefinedConfig/Common/CellHighlightInfo';
@@ -48,6 +48,12 @@ export interface GridApi {
48
48
  * @param config batch option and callback function to run post update
49
49
  */
50
50
  updateGridData(dataRows: any[], config?: DataUpdateConfig): Promise<IRowNode[]>;
51
+ /**
52
+ * Adds or Updates Adaptable (and AG Grid) with new and changed rows
53
+ * @param dataRows rows to add or update
54
+ * @param config batch option and callback function to run post change
55
+ */
56
+ addOrUpdateGridData(dataRows: any[], config?: DataUpdateConfig): Promise<IRowNode[]>;
51
57
  /**
52
58
  * Adds rows to Adaptable (and AG Grid)
53
59
  * @param dataRows rows to add; ensure all 'mandatory' fields are included and Primary Key is unique
@@ -62,21 +68,14 @@ export interface GridApi {
62
68
  deleteGridData(dataRows: any[], config?: DataUpdateConfig): Promise<IRowNode[]>;
63
69
  /**
64
70
  * Updates cell in Adaptable (first performs Cell & Server Validation)
65
- * @param columnId column to update
66
- * @param newValue new value to use
67
- * @param primaryKeyValue primaryKeyValue of the row (i.e. the value in the PrimaryKeyColumn identified in Adaptable Options)
71
+ * @param cellUpdateRequest (contains columnId, newValue and primaryKeyValue
68
72
  *
69
73
  */
70
- setCellValue(columnId: string, newValue: any, primaryKeyValue: any): void;
74
+ setCellValue(cellUpdateRequest: CellUpdateRequest): void;
71
75
  /**
72
76
  * Updates multiple cells
73
- * @param gridCells cells to update
74
77
  */
75
- setCellValues(gridCells: {
76
- columnId: any;
77
- newValue: any;
78
- primaryKeyValue: any;
79
- }[]): void;
78
+ setCellValues(cellUpdateRequests: CellUpdateRequest[]): void;
80
79
  /**
81
80
  * Reverses a data change (if triggered by cell edit)
82
81
  * @param cellDataChangedInfo data change to undo
@@ -503,14 +502,6 @@ export interface GridApi {
503
502
  /**
504
503
  * TO BE REMOVED
505
504
  */
506
- /**
507
- * @deprecated use `setCellValues()` instead
508
- */
509
- setCellsValue(gridCells: {
510
- columnId: any;
511
- newValue: any;
512
- primaryKeyValue: any;
513
- }[]): void;
514
505
  /**
515
506
  * @deprecated use `collapseAllRowGroups()` instead
516
507
  */
@@ -1,10 +1,10 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { BulkUpdateApi } from '../BulkUpdateApi';
3
- import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
3
+ import { CellUpdateRequest } from '../../PredefinedConfig/Selection/GridCell';
4
4
  export declare class BulkUpdateApiImpl extends ApiBase implements BulkUpdateApi {
5
5
  getBulkUpdateValue(): string;
6
6
  openBulkUpdateSettingsPanel(): void;
7
7
  showBulkUpdatePopup(): void;
8
- applyBulkUpdate(gridCells: GridCell[]): void;
8
+ applyBulkUpdate(cellUpdateRequests: CellUpdateRequest[]): void;
9
9
  setBulkUpdateValue(bulkUpdateValue: string): void;
10
10
  }
@@ -16,8 +16,8 @@ class BulkUpdateApiImpl extends ApiBase_1.ApiBase {
16
16
  showBulkUpdatePopup() {
17
17
  this.openBulkUpdateSettingsPanel();
18
18
  }
19
- applyBulkUpdate(gridCells) {
20
- this.dispatchAction(BulkUpdateRedux.BulkUpdateApply(gridCells));
19
+ applyBulkUpdate(cellUpdateRequests) {
20
+ this.dispatchAction(BulkUpdateRedux.BulkUpdateApply(cellUpdateRequests));
21
21
  }
22
22
  setBulkUpdateValue(bulkUpdateValue) {
23
23
  this.dispatchAction(SystemRedux.BulkUpdateChangeValue(bulkUpdateValue));
@@ -3,7 +3,7 @@ import { GridApi } from '../GridApi';
3
3
  import { GridState } from '../../PredefinedConfig/GridState';
4
4
  import { SelectedCellInfo } from '../../PredefinedConfig/Selection/SelectedCellInfo';
5
5
  import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInfo';
6
- import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
6
+ import { CellUpdateRequest, GridCell } from '../../PredefinedConfig/Selection/GridCell';
7
7
  import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
8
8
  import { DataUpdateConfig } from '../../PredefinedConfig/Common/DataUpdateConfig';
9
9
  import { CellHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
@@ -26,20 +26,12 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
26
26
  getGridData(): any[];
27
27
  getFilteredData(): any[];
28
28
  updateGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
29
- addGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode<any>[]>;
29
+ addOrUpdateGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
30
+ addGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
30
31
  undoCellEdit(cellDataChangedInfo: CellDataChangedInfo): boolean;
31
32
  deleteGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
32
- setCellValue(columnId: string, newValue: any, primaryKeyValue: any): void;
33
- setCellsValue(gridCells: {
34
- columnId: any;
35
- newValue: any;
36
- primaryKeyValue: any;
37
- }[]): void;
38
- setCellValues(gridCells: {
39
- columnId: any;
40
- newValue: any;
41
- primaryKeyValue: any;
42
- }[]): void;
33
+ setCellValue(cellUpdateRequest: CellUpdateRequest): void;
34
+ setCellValues(cellUpdateRequests: CellUpdateRequest[]): void;
43
35
  getSelectedCellInfo(): SelectedCellInfo;
44
36
  getSelectedRowInfo(): SelectedRowInfo;
45
37
  getCellDisplayValue(primaryKeyValue: any, columnId: string): any | undefined;
@@ -8,6 +8,7 @@ const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
8
8
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
9
9
  const logDeprecation_1 = require("../../Utilities/logDeprecation");
10
10
  const GridInternalApi_1 = require("../Internal/GridInternalApi");
11
+ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
11
12
  class GridApiImpl extends ApiBase_1.ApiBase {
12
13
  constructor(adaptable) {
13
14
  super(adaptable);
@@ -39,6 +40,32 @@ class GridApiImpl extends ApiBase_1.ApiBase {
39
40
  this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, 'Edit');
40
41
  return rowNodes;
41
42
  }
43
+ async addOrUpdateGridData(dataRows, dataUpdateConfig) {
44
+ let addRows = [];
45
+ let updateRows = [];
46
+ const primaryKey = this.getOptions().primaryKey;
47
+ dataRows.forEach((dataRow) => {
48
+ const node = this.getRowNodeForPrimaryKey(dataRow[primaryKey]);
49
+ if (node) {
50
+ updateRows.push(dataRow);
51
+ }
52
+ else {
53
+ addRows.push(dataRow);
54
+ }
55
+ });
56
+ let returnNodes = [];
57
+ if (ArrayExtensions_1.default.IsNotNullOrEmpty(updateRows)) {
58
+ const updatedNodes = await this.adaptable.updateRows(updateRows, dataUpdateConfig);
59
+ this.internalApi.fireGridDataChangedEvent(dataRows, updatedNodes, 'Edit');
60
+ (await returnNodes).push(...updatedNodes);
61
+ }
62
+ if (ArrayExtensions_1.default.IsNotNullOrEmpty(addRows)) {
63
+ const addedNodes = await this.adaptable.addRows(addRows, dataUpdateConfig);
64
+ this.internalApi.fireGridDataChangedEvent(dataRows, addedNodes, 'Add');
65
+ (await returnNodes).push(...addedNodes);
66
+ }
67
+ return returnNodes;
68
+ }
42
69
  async addGridData(dataRows, dataUpdateConfig) {
43
70
  const rowNodes = await this.adaptable.addRows(dataRows, dataUpdateConfig);
44
71
  this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, 'Add');
@@ -47,7 +74,13 @@ class GridApiImpl extends ApiBase_1.ApiBase {
47
74
  undoCellEdit(cellDataChangedInfo) {
48
75
  // for the reason of this hacky solution see the comments in DataService
49
76
  this.adaptable.api.internalApi.getDataService().logUndoChange(cellDataChangedInfo);
50
- this.setCellValue(cellDataChangedInfo.column.columnId, cellDataChangedInfo.oldValue, cellDataChangedInfo.primaryKeyValue);
77
+ const cellUpdateRequest = {
78
+ columnId: cellDataChangedInfo.column.columnId,
79
+ newValue: cellDataChangedInfo.newValue,
80
+ primaryKeyValue: cellDataChangedInfo.primaryKeyValue,
81
+ rowNode: cellDataChangedInfo.rowNode,
82
+ };
83
+ this.setCellValue(cellUpdateRequest);
51
84
  return true;
52
85
  }
53
86
  async deleteGridData(dataRows, dataUpdateConfig) {
@@ -58,25 +91,22 @@ class GridApiImpl extends ApiBase_1.ApiBase {
58
91
  }
59
92
  return [];
60
93
  }
61
- setCellValue(columnId, newValue, primaryKeyValue) {
62
- const abColumn = this.adaptable.api.columnApi.getColumnWithColumnId(columnId);
94
+ setCellValue(cellUpdateRequest) {
95
+ var _a;
96
+ const abColumn = this.adaptable.api.columnApi.getColumnWithColumnId(cellUpdateRequest.columnId);
63
97
  if (!abColumn) {
64
- this.logWarn(`setCellValue() - column not found for columnId: ${columnId}`);
98
+ this.logWarn(`setCellValue() - column not found for columnId: ${cellUpdateRequest.columnId}`);
65
99
  return;
66
100
  }
67
- const rowNode = this.getRowNodeForPrimaryKey(primaryKeyValue);
101
+ const rowNode = (_a = cellUpdateRequest.rowNode) !== null && _a !== void 0 ? _a : this.getRowNodeForPrimaryKey(cellUpdateRequest.primaryKeyValue);
68
102
  if (!rowNode) {
69
- this.logWarn(`setCellValue() - rowNode not found for primaryKeyValue: ${primaryKeyValue}`);
103
+ this.logWarn(`setCellValue() - rowNode not found for primaryKeyValue: ${cellUpdateRequest.primaryKeyValue}`);
70
104
  return;
71
105
  }
72
- this.adaptable.setDataValue(newValue, abColumn, primaryKeyValue, rowNode);
73
- }
74
- setCellsValue(gridCells) {
75
- (0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'GridApi', 'setCellsValue', 'setCellValues');
76
- this.setCellValues(gridCells);
106
+ this.adaptable.setDataValue(cellUpdateRequest.newValue, abColumn, cellUpdateRequest.primaryKeyValue, rowNode);
77
107
  }
78
- setCellValues(gridCells) {
79
- gridCells === null || gridCells === void 0 ? void 0 : gridCells.forEach((gridCell) => this.setCellValue(gridCell.columnId, gridCell.newValue, gridCell.primaryKeyValue));
108
+ setCellValues(cellUpdateRequests) {
109
+ cellUpdateRequests === null || cellUpdateRequests === void 0 ? void 0 : cellUpdateRequests.forEach((cellUpdateRequest) => this.setCellValue(cellUpdateRequest));
80
110
  }
81
111
  getSelectedCellInfo() {
82
112
  return this.getGridState().SelectedCellInfo;
@@ -1,7 +1,7 @@
1
1
  import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
2
2
  import { PlusMinusNudge, PlusMinusState } from '../../PredefinedConfig/PlusMinusState';
3
3
  import { PlusMinusApi } from '../PlusMinusApi';
4
- import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
4
+ import { CellUpdateRequest, GridCell } from '../../PredefinedConfig/Selection/GridCell';
5
5
  export declare class PlusMinusApiImpl extends ApiBase implements PlusMinusApi {
6
6
  getPlusMinusState(): PlusMinusState;
7
7
  getAllPlusMinus(config?: LayoutAssociatedObjectLoadConfig): PlusMinusNudge[];
@@ -9,7 +9,7 @@ export declare class PlusMinusApiImpl extends ApiBase implements PlusMinusApi {
9
9
  getAllActivePlusMinus(): PlusMinusNudge[];
10
10
  getAllSuspendedPlusMinus(): PlusMinusNudge[];
11
11
  runPlusMinusNudge(plusMinusNudge: PlusMinusNudge, cellsToUpdate: GridCell[], direction: 'up' | 'down'): void;
12
- applyPlusMinus(gridCells: GridCell[]): void;
12
+ applyPlusMinus(cellUpdateRequests: CellUpdateRequest[]): void;
13
13
  showPlusMinusPopup(): void;
14
14
  openPlusMinusSettingsPanel(): void;
15
15
  editPlusMinusNudge(plusMinusNudge: PlusMinusNudge): PlusMinusNudge;
@@ -28,8 +28,8 @@ class PlusMinusApiImpl extends ApiBase_1.ApiBase {
28
28
  let plusMinusModule = (this.adaptable.adaptableModules.get(ModuleConstants.PlusMinusModuleId));
29
29
  plusMinusModule.applyPlusMinus([plusMinusNudge], cellsToUpdate, direction);
30
30
  }
31
- applyPlusMinus(gridCells) {
32
- this.dispatchAction(PlusMinusRedux.PlusMinusApply(gridCells));
31
+ applyPlusMinus(cellUpdateRequests) {
32
+ this.dispatchAction(PlusMinusRedux.PlusMinusApply(cellUpdateRequests));
33
33
  }
34
34
  showPlusMinusPopup() {
35
35
  (0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'PlusMinusApi', 'showPlusMinusPopup', 'openPlusMinusSettingsPanel');
@@ -1,7 +1,7 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { MathOperation } from '../../PredefinedConfig/Common/Enums';
3
3
  import { SmartEditApi } from '../SmartEditApi';
4
- import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
4
+ import { CellUpdateRequest } from '../../PredefinedConfig/Selection/GridCell';
5
5
  import { SmartEditCustomOperation, SmartEditOperation } from '../../AdaptableOptions/EditOptions';
6
6
  export declare class SmartEditApiImpl extends ApiBase implements SmartEditApi {
7
7
  setSmartEditOperation(mathOperation: MathOperation): void;
@@ -10,7 +10,7 @@ export declare class SmartEditApiImpl extends ApiBase implements SmartEditApi {
10
10
  getSmartEditValue(): number;
11
11
  showSmartEditPopup(): void;
12
12
  openSmartEditSettingsPanel(): void;
13
- applySmartEdit(gridCells: GridCell[]): void;
13
+ applySmartEdit(cellUpdateRequests: CellUpdateRequest[]): void;
14
14
  getSmartEditCustomOperations(): SmartEditCustomOperation[];
15
15
  setCustomSmartEditOperation(customOperationName: string): void;
16
16
  }
@@ -27,8 +27,8 @@ class SmartEditApiImpl extends ApiBase_1.ApiBase {
27
27
  openSmartEditSettingsPanel() {
28
28
  this.showModulePopup(ModuleConstants.SmartEditModuleId);
29
29
  }
30
- applySmartEdit(gridCells) {
31
- this.dispatchAction(SmartEditRedux.SmartEditApply(gridCells));
30
+ applySmartEdit(cellUpdateRequests) {
31
+ this.dispatchAction(SmartEditRedux.SmartEditApply(cellUpdateRequests));
32
32
  }
33
33
  getSmartEditCustomOperations() {
34
34
  var _a;
@@ -19,5 +19,4 @@ export declare class ActionInternalApi extends ApiBase {
19
19
  private buildFormFieldLabelContext;
20
20
  private getFieldTypeFromColumnType;
21
21
  private getFieldValueOptions;
22
- private autoHandleActionRowButtons;
23
22
  }
@@ -166,33 +166,5 @@ class ActionInternalApi extends ApiBase_1.ApiBase {
166
166
  label: value,
167
167
  }));
168
168
  }
169
- autoHandleActionRowButtons(actionRowSubmittedInfo) {
170
- const { adaptableApi } = actionRowSubmittedInfo;
171
- if (actionRowSubmittedInfo.type === 'rowEdited') {
172
- const { rowNode, formData } = actionRowSubmittedInfo;
173
- const newRowData = Object.assign(Object.assign({}, rowNode.data), formData);
174
- adaptableApi.gridApi.updateGridData([newRowData]);
175
- }
176
- if (actionRowSubmittedInfo.type === 'rowDeleted') {
177
- const { rowNode } = actionRowSubmittedInfo;
178
- const deletedRowData = rowNode.data;
179
- adaptableApi.gridApi.deleteGridData([deletedRowData]);
180
- }
181
- if (actionRowSubmittedInfo.type === 'rowCreated') {
182
- const { formData } = actionRowSubmittedInfo;
183
- const setPrimaryKeyValueFunction = adaptableApi.internalApi.getAdaptableInstance().adaptableOptions.actionOptions
184
- .actionRowButtonOptions.setPrimaryKeyValue;
185
- const newRowData = typeof setPrimaryKeyValueFunction === 'function'
186
- ? setPrimaryKeyValueFunction({
187
- rowData: formData,
188
- adaptableApi,
189
- })
190
- : Object.assign({}, formData);
191
- const config = {
192
- addIndex: 0,
193
- };
194
- adaptableApi.gridApi.addGridData([newRowData], config);
195
- }
196
- }
197
169
  }
198
170
  exports.ActionInternalApi = ActionInternalApi;
@@ -74,9 +74,6 @@ export declare class GridInternalApi extends ApiBase {
74
74
  setColumns(columns: AdaptableColumn[]): void;
75
75
  setSelectedCells(selectedCellInfo: SelectedCellInfo): void;
76
76
  setSelectedRows(selectedRowInfo: SelectedRowInfo): void;
77
- setGridCell(gridCell: GridCell): void;
78
- setGridCells(gridCells: GridCell[]): void;
79
- private createDataChangedInfoFromGridCell;
80
77
  buildStandaloneColumnHeader(column: AdaptableColumn): AdaptableMenuItem[];
81
78
  getEditLookUpValuesForColumn(editLookUpItem: EditLookUpPermittedValues, column: AdaptableColumn, gridCell?: GridCell): any[] | undefined;
82
79
  }
@@ -208,29 +208,6 @@ class GridInternalApi extends ApiBase_1.ApiBase {
208
208
  setSelectedRows(selectedRowInfo) {
209
209
  this.dispatchAction(GridRedux.GridSetSelectedRows(selectedRowInfo));
210
210
  }
211
- setGridCell(gridCell) {
212
- const cellDataChangedInfo = this.createDataChangedInfoFromGridCell(gridCell);
213
- this.adaptable.setCellValue(cellDataChangedInfo);
214
- }
215
- setGridCells(gridCells) {
216
- if (ArrayExtensions_1.default.IsNotNullOrEmpty(gridCells)) {
217
- gridCells.forEach((gc) => {
218
- this.setGridCell(gc);
219
- });
220
- }
221
- }
222
- createDataChangedInfoFromGridCell(gridCell) {
223
- let currentValue = this.adaptable.getDisplayValue(gridCell.primaryKeyValue, gridCell.column.columnId);
224
- const currentRowNode = this.adaptable.getRowNodeForPrimaryKey(gridCell.primaryKeyValue);
225
- const cellDataChangedInfo = this.getAdaptableApi().internalApi.buildDataChangedInfo({
226
- oldValue: currentValue,
227
- newValue: gridCell.rawValue,
228
- column: gridCell.column,
229
- primaryKeyValue: gridCell.primaryKeyValue,
230
- rowNode: currentRowNode,
231
- });
232
- return cellDataChangedInfo;
233
- }
234
211
  buildStandaloneColumnHeader(column) {
235
212
  return this.adaptable.buildStandaloneColumnHeader(column);
236
213
  }
@@ -1,5 +1,5 @@
1
1
  import { PlusMinusState, PlusMinusNudge } from '../PredefinedConfig/PlusMinusState';
2
- import { GridCell } from '../PredefinedConfig/Selection/GridCell';
2
+ import { CellUpdateRequest, GridCell } from '../PredefinedConfig/Selection/GridCell';
3
3
  /**
4
4
  * Provides run-time access to the Plus / Minus Module and associated state
5
5
  */
@@ -40,9 +40,9 @@ export interface PlusMinusApi {
40
40
  runPlusMinusNudge(plusMinusNudge: PlusMinusNudge, cells: GridCell[], direction: 'up' | 'down'): void;
41
41
  /**
42
42
  * Applies a Plus Minus to given cells
43
- * @param cells cells to which Rule should be applied
43
+ * @param cellUpdateRequests cells to which Rule should be applied
44
44
  */
45
- applyPlusMinus(cells: GridCell[]): void;
45
+ applyPlusMinus(cellUpdateRequests: CellUpdateRequest[]): void;
46
46
  /**
47
47
  * Opens Settings Panel with Plus Minus section selected and visible
48
48
  */
@@ -1,6 +1,6 @@
1
1
  import { SmartEditOperation } from '../AdaptableOptions/EditOptions';
2
2
  import { MathOperation } from '../PredefinedConfig/Common/Enums';
3
- import { GridCell } from '../PredefinedConfig/Selection/GridCell';
3
+ import { CellUpdateRequest } from '../PredefinedConfig/Selection/GridCell';
4
4
  import { SmartEditCustomOperation } from '../types';
5
5
  /**
6
6
  * Provides run-time access to the Smart Edit Module
@@ -35,9 +35,9 @@ export interface SmartEditApi {
35
35
  openSmartEditSettingsPanel(): void;
36
36
  /**
37
37
  * Applies a Smart Edit to given Cells
38
- * @param gridCells Cells to apply the Smart Edit
38
+ * @param cellUpdateRequests Cells to apply the Smart Edit
39
39
  */
40
- applySmartEdit(gridCells: GridCell[]): void;
40
+ applySmartEdit(cellUpdateRequests: CellUpdateRequest[]): void;
41
41
  /**
42
42
  * Retrieves an Smart Edit Custom Operations (provided in Edit Options)
43
43
  */
@@ -29,3 +29,24 @@ export interface GridCell<TData = any> {
29
29
  */
30
30
  rowNode: IRowNode<TData>;
31
31
  }
32
+ /**
33
+ * Lightweight object used for identifying a Cell to be updated
34
+ */
35
+ export interface CellUpdateRequest<TData = any> {
36
+ /**
37
+ * Id of Column in which edited cell is situated
38
+ */
39
+ columnId: string;
40
+ /**
41
+ * New Value for the cell
42
+ */
43
+ newValue: any;
44
+ /**
45
+ * Primary Key column's value in row - how Adaptable locates the cell
46
+ */
47
+ primaryKeyValue?: any;
48
+ /**
49
+ * AG Grid Row Node that contains the cell (optional)
50
+ */
51
+ rowNode?: IRowNode<TData>;
52
+ }
@@ -1,5 +1,5 @@
1
1
  import * as Redux from 'redux';
2
- import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
2
+ import { CellUpdateRequest } from '../../PredefinedConfig/Selection/GridCell';
3
3
  /**
4
4
  * @ReduxAction Bulk Update has been completed
5
5
  */
@@ -16,10 +16,10 @@ export interface BulkUpdateCompleteAction extends Redux.Action {
16
16
  bypassValidationWarnings: boolean;
17
17
  }
18
18
  export interface BulkUpdateApplyAction extends Redux.Action {
19
- gridCells: GridCell[];
19
+ cellUpdateRequests: CellUpdateRequest[];
20
20
  }
21
21
  export interface BulkUpdateReadyAction extends Redux.Action {
22
22
  }
23
23
  export declare const BulkUpdateComplete: (bypassValidationWarnings: boolean) => BulkUpdateCompleteAction;
24
- export declare const BulkUpdateApply: (gridCells: GridCell[]) => BulkUpdateApplyAction;
24
+ export declare const BulkUpdateApply: (cellUpdateRequests: CellUpdateRequest[]) => BulkUpdateApplyAction;
25
25
  export declare const BulkUpdateReady: () => BulkUpdateReadyAction;
@@ -18,9 +18,9 @@ const BulkUpdateComplete = (bypassValidationWarnings) => ({
18
18
  bypassValidationWarnings: bypassValidationWarnings,
19
19
  });
20
20
  exports.BulkUpdateComplete = BulkUpdateComplete;
21
- const BulkUpdateApply = (gridCells) => ({
21
+ const BulkUpdateApply = (cellUpdateRequests) => ({
22
22
  type: exports.BULK_UPDATE_APPLY,
23
- gridCells,
23
+ cellUpdateRequests,
24
24
  });
25
25
  exports.BulkUpdateApply = BulkUpdateApply;
26
26
  const BulkUpdateReady = () => ({
@@ -1,6 +1,6 @@
1
1
  import { PlusMinusState, PlusMinusNudge } from '../../PredefinedConfig/PlusMinusState';
2
2
  import * as Redux from 'redux';
3
- import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
3
+ import { CellUpdateRequest } from '../../PredefinedConfig/Selection/GridCell';
4
4
  /**
5
5
  * @ReduxAction A Plus Minus Rule has been applied
6
6
  */
@@ -38,7 +38,7 @@ export declare const PLUS_MINUS_RULE_UNSUSPEND_ALL = "PLUS_MINUS_RULE_UNSUSPEND_
38
38
  */
39
39
  export declare const PLUS_MINUS_READY = "PLUS_MINUS_READY";
40
40
  export interface PlusMinusApplyAction extends Redux.Action {
41
- gridCells: GridCell[];
41
+ cellUpdateRequests: CellUpdateRequest[];
42
42
  }
43
43
  export interface PlusMinusNudgeAction extends Redux.Action {
44
44
  plusMinusNudge: PlusMinusNudge;
@@ -60,7 +60,7 @@ export interface PlusMinusNudgeUnSuspendAllAction extends Redux.Action {
60
60
  export interface PlusMinusReadyAction extends Redux.Action {
61
61
  plusMinusState: PlusMinusState;
62
62
  }
63
- export declare const PlusMinusApply: (gridCells: GridCell[]) => PlusMinusApplyAction;
63
+ export declare const PlusMinusApply: (cellUpdateRequests: CellUpdateRequest[]) => PlusMinusApplyAction;
64
64
  export declare const PlusMinusNudgeAdd: (plusMinusNudge: PlusMinusNudge) => PlusMinusNudgeAddAction;
65
65
  export declare const PlusMinusNudgeEdit: (plusMinusNudge: PlusMinusNudge) => PlusMinusNudgeEditAction;
66
66
  export declare const PlusMinusNudgeDelete: (plusMinusNudge: PlusMinusNudge) => PlusMinusNudgeDeleteAction;
@@ -41,9 +41,9 @@ exports.PLUS_MINUS_RULE_UNSUSPEND_ALL = 'PLUS_MINUS_RULE_UNSUSPEND_ALL';
41
41
  * @ReduxAction PlusMinus Module is ready
42
42
  */
43
43
  exports.PLUS_MINUS_READY = 'PLUS_MINUS_READY';
44
- const PlusMinusApply = (gridCells) => ({
44
+ const PlusMinusApply = (cellUpdateRequests) => ({
45
45
  type: exports.PLUS_MINUS_APPLY,
46
- gridCells,
46
+ cellUpdateRequests,
47
47
  });
48
48
  exports.PlusMinusApply = PlusMinusApply;
49
49
  const PlusMinusNudgeAdd = (plusMinusNudge) => ({
@@ -1,5 +1,5 @@
1
1
  import * as Redux from 'redux';
2
- import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
2
+ import { CellUpdateRequest } from '../../PredefinedConfig/Selection/GridCell';
3
3
  /**
4
4
  * @ReduxAction Smart Edit has been completed
5
5
  */
@@ -16,10 +16,10 @@ export interface SmartEditRunAction extends Redux.Action {
16
16
  bypassValidationWarnings: boolean;
17
17
  }
18
18
  export interface SmartEditApplyAction extends Redux.Action {
19
- gridCells: GridCell[];
19
+ cellUpdateRequests: CellUpdateRequest[];
20
20
  }
21
21
  export interface SmartEditReadyAction extends Redux.Action {
22
22
  }
23
23
  export declare const SmartEditRun: (bypassValidationWarnings: boolean) => SmartEditRunAction;
24
- export declare const SmartEditApply: (gridCells: GridCell[]) => SmartEditApplyAction;
24
+ export declare const SmartEditApply: (cellUpdateRequests: CellUpdateRequest[]) => SmartEditApplyAction;
25
25
  export declare const SmartEditReady: () => SmartEditReadyAction;
@@ -18,9 +18,9 @@ const SmartEditRun = (bypassValidationWarnings) => ({
18
18
  bypassValidationWarnings: bypassValidationWarnings,
19
19
  });
20
20
  exports.SmartEditRun = SmartEditRun;
21
- const SmartEditApply = (gridCells) => ({
21
+ const SmartEditApply = (cellUpdateRequests) => ({
22
22
  type: exports.SMART_EDIT_APPLY,
23
- gridCells,
23
+ cellUpdateRequests,
24
24
  });
25
25
  exports.SmartEditApply = SmartEditApply;
26
26
  const SmartEditReady = () => ({
@@ -1035,7 +1035,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1035
1035
  let module = (adaptable.adaptableModules.get(ModuleConstants.SmartEditModuleId));
1036
1036
  const actionTyped = action;
1037
1037
  let thePreview = middlewareAPI.getState().System.SmartEditPreviewInfo;
1038
- let newValues = PreviewHelper_1.PreviewHelper.GetCellInfosFromPreview(thePreview, actionTyped.bypassValidationWarnings);
1038
+ let newValues = PreviewHelper_1.PreviewHelper.GetCellUpdateRequestsFromPreview(thePreview, actionTyped.bypassValidationWarnings);
1039
1039
  module.ApplySmartEdit(newValues);
1040
1040
  middlewareAPI.dispatch(PopupRedux.PopupHideScreen());
1041
1041
  return next(action);
@@ -1047,7 +1047,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1047
1047
  case SmartEditRedux.SMART_EDIT_APPLY: {
1048
1048
  let returnAction = next(action);
1049
1049
  const actionTyped = action;
1050
- adaptable.api.gridApi.internalApi.setGridCells(actionTyped.gridCells);
1050
+ adaptable.api.gridApi.setCellValues(actionTyped.cellUpdateRequests);
1051
1051
  return returnAction;
1052
1052
  }
1053
1053
  /*******************
@@ -1090,7 +1090,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1090
1090
  case BulkUpdateRedux.BULK_UPDATE_COMPLETE: {
1091
1091
  const actionTyped = action;
1092
1092
  let thePreview = middlewareAPI.getState().System.BulkUpdatePreviewInfo;
1093
- let newValues = PreviewHelper_1.PreviewHelper.GetCellInfosFromPreview(thePreview, actionTyped.bypassValidationWarnings);
1093
+ let newValues = PreviewHelper_1.PreviewHelper.GetCellUpdateRequestsFromPreview(thePreview, actionTyped.bypassValidationWarnings);
1094
1094
  adaptable.api.bulkUpdateApi.applyBulkUpdate(newValues);
1095
1095
  middlewareAPI.dispatch(PopupRedux.PopupHideScreen());
1096
1096
  return next(action);
@@ -1098,7 +1098,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1098
1098
  case BulkUpdateRedux.BULK_UPDATE_APPLY: {
1099
1099
  let returnAction = next(action);
1100
1100
  const actionTyped = action;
1101
- adaptable.api.gridApi.internalApi.setGridCells(actionTyped.gridCells);
1101
+ adaptable.api.gridApi.setCellValues(actionTyped.cellUpdateRequests);
1102
1102
  return returnAction;
1103
1103
  }
1104
1104
  /*******************
@@ -1125,7 +1125,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1125
1125
  case PlusMinusRedux.PLUS_MINUS_APPLY: {
1126
1126
  let returnAction = next(action);
1127
1127
  const actionTyped = action;
1128
- adaptable.api.gridApi.internalApi.setGridCells(actionTyped.gridCells);
1128
+ adaptable.api.gridApi.setCellValues(actionTyped.cellUpdateRequests);
1129
1129
  return returnAction;
1130
1130
  }
1131
1131
  /*******************