@adaptabletools/adaptable 15.4.1 → 15.4.3

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 (57) hide show
  1. package/bundle.cjs.js +117 -117
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +3 -0
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
  7. package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
  8. package/src/AdaptableOptions/FinancePluginOptions.d.ts +24 -0
  9. package/src/AdaptableOptions/LayoutOptions.d.ts +3 -0
  10. package/src/AdaptableOptions/ToolPanelOptions.d.ts +3 -0
  11. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +6 -0
  12. package/src/Api/BulkUpdateApi.d.ts +3 -3
  13. package/src/Api/ExportApi.d.ts +3 -3
  14. package/src/Api/GridApi.d.ts +30 -19
  15. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +2 -2
  16. package/src/Api/Implementation/BulkUpdateApiImpl.js +2 -2
  17. package/src/Api/Implementation/GridApiImpl.d.ts +5 -13
  18. package/src/Api/Implementation/GridApiImpl.js +46 -16
  19. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +2 -2
  20. package/src/Api/Implementation/PlusMinusApiImpl.js +2 -2
  21. package/src/Api/Implementation/SmartEditApiImpl.d.ts +2 -2
  22. package/src/Api/Implementation/SmartEditApiImpl.js +2 -2
  23. package/src/Api/Internal/ActionInternalApi.d.ts +0 -1
  24. package/src/Api/Internal/ActionInternalApi.js +0 -28
  25. package/src/Api/Internal/GridInternalApi.d.ts +0 -3
  26. package/src/Api/Internal/GridInternalApi.js +0 -23
  27. package/src/Api/PlusMinusApi.d.ts +3 -3
  28. package/src/Api/SmartEditApi.d.ts +3 -3
  29. package/src/PredefinedConfig/AlertState.d.ts +8 -5
  30. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +13 -1
  31. package/src/PredefinedConfig/Common/Entitlement.d.ts +3 -0
  32. package/src/PredefinedConfig/Selection/GridCell.d.ts +21 -0
  33. package/src/PredefinedConfig/StyledColumnState.d.ts +3 -0
  34. package/src/Redux/ActionsReducers/BulkUpdateRedux.d.ts +3 -3
  35. package/src/Redux/ActionsReducers/BulkUpdateRedux.js +2 -2
  36. package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +3 -3
  37. package/src/Redux/ActionsReducers/PlusMinusRedux.js +2 -2
  38. package/src/Redux/ActionsReducers/SmartEditRedux.d.ts +3 -3
  39. package/src/Redux/ActionsReducers/SmartEditRedux.js +2 -2
  40. package/src/Redux/Store/AdaptableStore.js +5 -5
  41. package/src/Strategy/CalculatedColumnModule.d.ts +4 -1
  42. package/src/Strategy/CalculatedColumnModule.js +30 -13
  43. package/src/Strategy/Interface/ISmartEditModule.d.ts +2 -2
  44. package/src/Strategy/PlusMinusModule.js +10 -1
  45. package/src/Strategy/SmartEditModule.d.ts +2 -2
  46. package/src/Strategy/SmartEditModule.js +2 -2
  47. package/src/Utilities/Helpers/PreviewHelper.d.ts +3 -1
  48. package/src/Utilities/Helpers/PreviewHelper.js +31 -1
  49. package/src/View/Components/FilterForm/QuickFilterValues.js +8 -1
  50. package/src/agGrid/Adaptable.d.ts +0 -1
  51. package/src/agGrid/Adaptable.js +9 -11
  52. package/src/metamodel/adaptable.metamodel.d.ts +148 -0
  53. package/src/metamodel/adaptable.metamodel.js +1 -1
  54. package/src/parser/src/types.d.ts +3 -0
  55. package/src/types.d.ts +1 -1
  56. package/version.d.ts +1 -1
  57. package/version.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "15.4.1",
3
+ "version": "15.4.3",
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: 1686647280452;
1
+ declare const _default: 1688649437408;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1686647280452;
3
+ exports.default = 1688649437408;
@@ -7,6 +7,9 @@ export declare type AdaptableNoCodeWizardInitFn = ({ gridOptions, adaptableOptio
7
7
  adaptableOptions: AdaptableOptions;
8
8
  agGridModules: Module[];
9
9
  }) => Promise<AdaptableApi>;
10
+ /**
11
+ * AdapTable Options used by the No Code Wizard
12
+ */
10
13
  export interface AdaptableNoCodeWizardOptions {
11
14
  onInit?: AdaptableNoCodeWizardInitFn;
12
15
  fileAccept?: string;
@@ -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;
@@ -200,6 +200,9 @@ export interface FilterOptions<TData = any> {
200
200
  */
201
201
  quickFilterValuesWidth?: 'auto' | number;
202
202
  }
203
+ /**
204
+ * Context provided when Filtering
205
+ */
203
206
  export interface FilterContext<TData = any> extends BaseContext {
204
207
  /**
205
208
  * Column being filtered
@@ -214,6 +214,9 @@ export interface OrganizationColumn extends FDC3Column {
214
214
  */
215
215
  intents?: OrganizationIntents;
216
216
  }
217
+ /**
218
+ *
219
+ */
217
220
  export declare type OrganizationIntents = OrganizationIntent[];
218
221
  /**
219
222
  * FDC3 Intents available to an Organization Column
@@ -274,12 +277,33 @@ export interface RaiseFDC3IntentContext extends ContextMenuContext {
274
277
  */
275
278
  intent: FDC3Intent | CustomFDC3Intent;
276
279
  }
280
+ /**
281
+ * Function that handles FDC3 Context
282
+ */
277
283
  export declare type FDC3ContextHandler = (context: FDC3Context) => void;
284
+ /**
285
+ * Defines a Desktop Agent which supports FDC3
286
+ */
278
287
  export interface FDC3DesktopAgent {
288
+ /**
289
+ * Raises an Intent
290
+ */
279
291
  raiseIntent: (intent: FDC3Intent, context: FDC3Context) => void;
292
+ /**
293
+ * Broadcasts an FDC3 Message
294
+ */
280
295
  broadcast: (context: FDC3Context) => void;
296
+ /**
297
+ * Raises an FDC3 Intent for a given Context
298
+ */
281
299
  raiseIntentForContext: (context: FDC3Context) => void;
300
+ /**
301
+ * Adds an FDC3 Intent Listener
302
+ */
282
303
  addIntentListener: (intent: FDC3Intent | CustomFDC3Intent, listener: (context: FDC3Context) => void) => void;
304
+ /**
305
+ * Adds an FDC3 Context Listener
306
+ */
283
307
  addContextListener: (contextType: string | null, handler: FDC3ContextHandler) => {
284
308
  unsubscribe: () => void;
285
309
  };
@@ -65,6 +65,9 @@ export interface LayoutOptions {
65
65
  */
66
66
  pivotPreviewColumns?: string[] | ((context: PivotPreviewColumnsContext) => string[]);
67
67
  }
68
+ /**
69
+ * Options for managing Tags in Layouts (used to enhance Layouts)
70
+ */
68
71
  export interface LayoutTagOptions {
69
72
  /**
70
73
  * Automatically generate an AdaptableObjectTag for each Layout
@@ -58,6 +58,9 @@ export interface ToolPanelButtonContext extends BaseContext {
58
58
  */
59
59
  toolPanelState: ToolPanelState;
60
60
  }
61
+ /**
62
+ * Context used for Custom Tool Panels containing Buttons
63
+ */
61
64
  export interface CustomToolPanelButtonContext extends ToolPanelButtonContext {
62
65
  /**
63
66
  *The Custom ToolPanel which contains the button
@@ -185,11 +185,17 @@ export interface BulkUpdatePermittedValuesContext<TData = any> extends Permitted
185
185
  */
186
186
  gridCells: GridCell<TData>[];
187
187
  }
188
+ /**
189
+ * Sets of Tabs avilable in Grid Info Settings Panel
190
+ */
188
191
  export declare type GridInfoSections = GridInfoSection[];
189
192
  /**
190
193
  * Tabs available in the Grid Info Settings Panel
191
194
  */
192
195
  export declare type GridInfoSection = 'GridSummary' | 'AdaptableOptions' | 'ColumnInfo' | 'AdaptableObjects';
196
+ /**
197
+ * Context used when evaluating Object Tags
198
+ */
193
199
  export interface ObjectTagsContext extends BaseContext {
194
200
  }
195
201
  /**
@@ -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
@@ -98,7 +98,7 @@ export interface ExportApi {
98
98
  */
99
99
  exportDataToExcel(reportData: ReportData, fileName: string): void;
100
100
  /**
101
- * Opens Settings Panel with Export section selected and visible
101
+ * Open Settings Panel with Export section selected
102
102
  */
103
103
  openExportSettingsPanel(): void;
104
104
  /**
@@ -129,11 +129,11 @@ export interface ExportApi {
129
129
  */
130
130
  getExportDestinationForm(destinationName: string): AdaptableForm<ExportFormContext> | undefined;
131
131
  /**
132
- * Exports data currently in grid to Excel as What-You-See-Is-What-You-Get
132
+ * Exports data currently in grid to Excel as WYSIWYG
133
133
  */
134
134
  exportVisualDataToExcel(): void;
135
135
  /**
136
- * Whether the given Report is a user-generated (server) one
136
+ * Is given Report user-generated
137
137
  * @param report Report to Check
138
138
  */
139
139
  isServerReport(report: Report): boolean;
@@ -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
@@ -287,9 +286,29 @@ export interface GridApi {
287
286
  * @param columnId ColumnId to lookup
288
287
  */
289
288
  getRawValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
289
+ /**
290
+ * Returns all the Grid Cells in a Column that have the given Raw Value
291
+ * @param columnId ColumnId to lookup
292
+ * @param rawValue Raw Value to use
293
+ */
290
294
  getGridCellsForRawValue(columnId: string, rawValue: any): GridCell[] | undefined;
295
+ /**
296
+ * Gets the count of the cells in a Column that have the given Raw Value
297
+ * @param columnId ColumnId to lookup
298
+ * @param rawValue Raw Value to use
299
+ */
291
300
  getCellRawValueCount(columnId: string, rawValue: any): number;
301
+ /**
302
+ * Returns all the Grid Cells in a Column that have the given Display Value
303
+ * @param columnId ColumnId to lookup
304
+ * @param displayValue Display Value to use
305
+ */
292
306
  getGridCellsForDisplayValue(columnId: string, displayValue: any): GridCell[] | undefined;
307
+ /**
308
+ * Gets the count of the cells in a Column that have the given Display Value
309
+ * @param columnId ColumnId to lookup
310
+ * @param displayValue Display Value to use
311
+ */
293
312
  getCellDisplayValueCount(columnId: string, displayValue: any): number;
294
313
  /**
295
314
  * Retrieves Formatted Value for a given Raw Value in given Column
@@ -503,14 +522,6 @@ export interface GridApi {
503
522
  /**
504
523
  * TO BE REMOVED
505
524
  */
506
- /**
507
- * @deprecated use `setCellValues()` instead
508
- */
509
- setCellsValue(gridCells: {
510
- columnId: any;
511
- newValue: any;
512
- primaryKeyValue: any;
513
- }[]): void;
514
525
  /**
515
526
  * @deprecated use `collapseAllRowGroups()` instead
516
527
  */
@@ -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;
@@ -369,13 +399,13 @@ class GridApiImpl extends ApiBase_1.ApiBase {
369
399
  if (!gridCells) {
370
400
  return undefined;
371
401
  }
372
- const returnValues = [];
402
+ const returnGridCells = [];
373
403
  gridCells.forEach((gc) => {
374
404
  if (gc.displayValue === displayValue) {
375
- returnValues.push(gc);
405
+ returnGridCells.push(gc);
376
406
  }
377
407
  });
378
- return returnValues;
408
+ return returnGridCells;
379
409
  }
380
410
  getCellDisplayValueCount(columnId, displayValue) {
381
411
  const gridCells = this.getGridCellsForDisplayValue(columnId, displayValue);
@@ -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
  */