@adaptabletools/adaptable 19.0.0 → 19.0.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 (73) hide show
  1. package/README.md +1 -2
  2. package/base.css +1 -1
  3. package/base.css.map +1 -1
  4. package/index.css +1 -1
  5. package/index.css.map +1 -1
  6. package/package.json +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
  8. package/src/AdaptableOptions/ActionRowOptions.d.ts +2 -2
  9. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +6 -2
  11. package/src/Api/AlertApi.d.ts +8 -0
  12. package/src/Api/ColumnApi.d.ts +18 -15
  13. package/src/Api/CustomSortApi.d.ts +8 -0
  14. package/src/Api/DataChangeHistoryApi.d.ts +5 -0
  15. package/src/Api/Events/GridSorted.d.ts +3 -3
  16. package/src/Api/Events/LiveDataChanged.d.ts +1 -1
  17. package/src/Api/FlashingCellApi.d.ts +25 -12
  18. package/src/Api/FormatColumnApi.d.ts +8 -0
  19. package/src/Api/GridApi.d.ts +53 -2
  20. package/src/Api/Implementation/AlertApiImpl.d.ts +2 -0
  21. package/src/Api/Implementation/AlertApiImpl.js +6 -0
  22. package/src/Api/Implementation/ColumnApiImpl.d.ts +3 -2
  23. package/src/Api/Implementation/ColumnApiImpl.js +19 -30
  24. package/src/Api/Implementation/CustomSortApiImpl.d.ts +2 -0
  25. package/src/Api/Implementation/CustomSortApiImpl.js +6 -0
  26. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +2 -0
  27. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +5 -0
  28. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +3 -0
  29. package/src/Api/Implementation/FlashingCellApiImpl.js +9 -0
  30. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -0
  31. package/src/Api/Implementation/FormatColumnApiImpl.js +6 -0
  32. package/src/Api/Implementation/GridApiImpl.d.ts +11 -2
  33. package/src/Api/Implementation/GridApiImpl.js +105 -1
  34. package/src/Api/Implementation/ShortcutApiImpl.d.ts +2 -0
  35. package/src/Api/Implementation/ShortcutApiImpl.js +6 -0
  36. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +2 -0
  37. package/src/Api/Implementation/StyledColumnApiImpl.js +6 -0
  38. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -0
  39. package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -0
  40. package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -1
  41. package/src/Api/Internal/ActionRowInternalApi.js +10 -8
  42. package/src/Api/Internal/ExportInternalApi.d.ts +3 -3
  43. package/src/Api/Internal/ExportInternalApi.js +17 -13
  44. package/src/Api/Internal/GridFilterInternalApi.d.ts +1 -1
  45. package/src/Api/Internal/GridFilterInternalApi.js +5 -2
  46. package/src/Api/ShortcutApi.d.ts +8 -0
  47. package/src/Api/StyledColumnApi.d.ts +8 -0
  48. package/src/Api/UserInterfaceApi.d.ts +6 -2
  49. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -1
  50. package/src/PredefinedConfig/Common/RowScope.d.ts +1 -1
  51. package/src/Redux/ActionsReducers/SystemRedux.js +3 -8
  52. package/src/Utilities/license/hashing.js +1 -1
  53. package/src/View/Dashboard/DashboardPopup.js +4 -3
  54. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -0
  55. package/src/View/Layout/Wizard/getGridFilterPreview.js +1 -1
  56. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  57. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  58. package/src/agGrid/ActionColumnRenderer.d.ts +2 -0
  59. package/src/agGrid/ActionColumnRenderer.js +29 -3
  60. package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
  61. package/src/agGrid/AdaptableAgGrid.js +22 -8
  62. package/src/agGrid/AgGridAdapter.d.ts +1 -0
  63. package/src/agGrid/AgGridAdapter.js +12 -0
  64. package/src/agGrid/AgGridColumnAdapter.d.ts +2 -0
  65. package/src/agGrid/AgGridColumnAdapter.js +26 -13
  66. package/src/agGrid/PercentBarRenderer.js +1 -1
  67. package/src/agGrid/defaultAdaptableOptions.js +1 -0
  68. package/src/env.js +2 -2
  69. package/src/metamodel/adaptable.metamodel.js +1 -1
  70. package/src/types.d.ts +2 -2
  71. package/tsconfig.esm.tsbuildinfo +1 -1
  72. package/src/agGrid/CheckboxRenderer.d.ts +0 -16
  73. package/src/agGrid/CheckboxRenderer.js +0 -89
@@ -79,11 +79,11 @@ export interface ActionRowFormOptions<TData = any> {
79
79
  */
80
80
  formFieldLabel?: (context: ActionRowParamFieldContext<TData>) => string;
81
81
  /**
82
- * Custom form buttons provider. If provided, the custom implementation is responsible for firing the 'ActionRowSubmitted' and/or invoking the 'onFormSubmit' callback (if necessary).
82
+ * Custom form buttons; if provided, need to handle form submission explicitly
83
83
  */
84
84
  formButtons?: AdaptableButton<ActionRowFormContext<TData>>[];
85
85
  /**
86
- * Event published when the form in an Action Row is submitted via a standard button (provided by AdapTable). This is not invoked when custom form buttons are provided!
86
+ * Event fired when an Action Row Form is submitted via a standard button provided by AdapTable; this is not invoked when custom form buttons are provided
87
87
  *
88
88
  * @param actionRowSubmittedInfo the form submitted info
89
89
  * @defaultValue undefined
@@ -5,7 +5,7 @@ import { ActionColumnContext, AdaptableApi, AdaptableButton } from '../types';
5
5
  */
6
6
  export interface DataChangeHistoryOptions<TData = any> {
7
7
  /**
8
- * Whether data change history should be active by default
8
+ * Make Data Change History active by default
9
9
  *
10
10
  * @defaultValue false
11
11
  * @gridInfoItem
@@ -26,7 +26,7 @@ export interface DataChangeHistoryOptions<TData = any> {
26
26
  */
27
27
  changeHistoryButton?: DataChangeHistoryButton<TData> | DataChangeHistoryButton<TData>[];
28
28
  /**
29
- * Show all changes for each Cell or just the last one
29
+ * Show all changes for a Cell or just the last one
30
30
  * @defaultValue true
31
31
  */
32
32
  showLastDataChangeOnly?: boolean;
@@ -55,13 +55,17 @@ export interface UserInterfaceOptions<TData = any> {
55
55
  */
56
56
  colorPalette?: string[] | ((currentTheme: string) => string[]);
57
57
  /**
58
- * Style to set for editable cells
58
+ * Style to set for editable Cells
59
59
  */
60
60
  editableCellStyle?: AdaptableStyle;
61
61
  /**
62
- * Style to set for non-editable cells
62
+ * Style to set for non-editable Cells
63
63
  */
64
64
  readOnlyCellStyle?: AdaptableStyle;
65
+ /**
66
+ * Style to set for Cells which have been edited
67
+ */
68
+ editedCellStyle?: AdaptableStyle;
65
69
  /**
66
70
  * Optional list of CSS styles that can be used when creating Adaptable Styles in Adaptable (e.g. in Format Column and other Modules)
67
71
  *
@@ -69,6 +69,14 @@ export interface AlertApi {
69
69
  * @returns alert definition
70
70
  */
71
71
  unSuspendAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
72
+ /**
73
+ * Suspends all Alert Definitions
74
+ */
75
+ suspendAllAlertDefinition(): void;
76
+ /**
77
+ * Activates all suspended Alert Definition
78
+ */
79
+ unSuspendAllAlertDefinition(): void;
72
80
  /**
73
81
  * Evaluates the given Alert Definitions - will fire Alert if rule is met
74
82
  * @param alertDefinitions Alert Definitions to evaluate
@@ -8,6 +8,10 @@ export interface ColumnApi {
8
8
  * Returns all Columns
9
9
  */
10
10
  getColumns(): AdaptableColumn[];
11
+ /**
12
+ * Returns all standard Columns (i.e. not Action Rows)
13
+ */
14
+ getStandardColumns(): AdaptableColumn[];
11
15
  /**
12
16
  * Returns all visible Columns
13
17
  */
@@ -276,20 +280,6 @@ export interface ColumnApi {
276
280
  * Returns all columns currently Row Grouped
277
281
  */
278
282
  getRowGroupedColumns(): AdaptableColumn[];
279
- /**
280
- * Updates the Column Configuration for a given Column. It will update the current Layout with the new configuration.
281
- * @param columnConfiguration - the Column Configuration to set
282
- */
283
- updateColumnConfiguration(columnConfiguration: ColumnConfig): void;
284
- /**
285
- * Updates the Column Configurations for a list of Columns. It will update the current Layout with the new configurations.
286
- * @param columnConfigurations - the Column Configurations to set
287
- */
288
- updateColumnConfigurations(columnConfigurations: ColumnConfig[]): void;
289
- /**
290
- * Sets the Column Definitions for the Grid
291
- */
292
- setColumnDefinitions(columnDefinitions: (ColDef | ColGroupDef)[]): void;
293
283
  /**
294
284
  * Returns all the distinct display values in a given Column
295
285
  * @param columnId Column to Check
@@ -301,9 +291,22 @@ export interface ColumnApi {
301
291
  * @param caption New Caption to display
302
292
  */
303
293
  setColumnCaption(columnId: string, caption: string): void;
294
+ /**
295
+ * @deprecated use `GridApi.setAgGridColumnDefinitions()` instead
296
+ */
297
+ setColumnDefinitions(columnDefinitions: (ColDef | ColGroupDef)[]): void;
298
+ /**
299
+ * @deprecated use `GridApi.updateAgGridColumnState()` instead
300
+ */
301
+ updateColumnConfiguration(columnConfiguration: ColumnConfig): void;
302
+ /**
303
+ * @deprecated use `GridApi.updateAgGridColumnState()` instead
304
+ */
305
+ updateColumnConfigurations(columnConfigurations: ColumnConfig[]): void;
304
306
  }
305
307
  /**
306
- * Configuration of an AG Grid Column, used for runtime updating of ColDefs
308
+ * Column State is stateful information and represents changing properties of the grid columns.
309
+ * @deprecated use `ColumnState` from `@ag-grid-community/core` instead
307
310
  */
308
311
  export interface ColumnConfig {
309
312
  /** Column Id (mandatory) */
@@ -70,6 +70,14 @@ export interface CustomSortApi {
70
70
  * @returns sort column
71
71
  */
72
72
  suspendCustomSort(customSort: CustomSort): CustomSort;
73
+ /**
74
+ * Suspends all Custom Sorts
75
+ */
76
+ suspendAllCustomSort(): void;
77
+ /**
78
+ * Activates all suspended Custom Sort
79
+ */
80
+ unSuspendAllCustomSort(): void;
73
81
  /**
74
82
  * Un-suspends or activates a suspended Custom Sort
75
83
  * @param customSort Custom Sort to suspend
@@ -1,4 +1,5 @@
1
1
  import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
2
+ import { GridCell } from '../types';
2
3
  /**
3
4
  * Provides run-time access to the Data Change History Module
4
5
  **/
@@ -25,6 +26,10 @@ export interface DataChangeHistoryApi {
25
26
  * Retrieves all data changes which are currently available
26
27
  */
27
28
  getDataChangeHistoryLog(): CellDataChangedInfo[];
29
+ /**
30
+ * Retrieves last data change for a given Cell
31
+ */
32
+ getDataChangeForGridCell(gridCell: GridCell): CellDataChangedInfo | undefined;
28
33
  /**
29
34
  * Adds item to Data Change History log
30
35
  *
@@ -11,15 +11,15 @@ export interface GridSortedInfo extends BaseEventInfo {
11
11
  adaptableSortState: AdaptableSortState;
12
12
  }
13
13
  /**
14
- * Overview of current sorting state in the grid
14
+ * Overview of current sorting state in AG Grid
15
15
  */
16
16
  export interface AdaptableSortState {
17
17
  /**
18
- * Which columns have sorting applied and,if so, which direction
18
+ * Which Columns have sorting applied and,if so, in which direction
19
19
  */
20
20
  columnSorts: ColumnSort[];
21
21
  /**
22
- * All the Custom Sorts in State; this is always sent even if no custom sorts are active
22
+ * All Custom Sorts in State (note: this is always sent, even if no custom sorts are active)
23
23
  */
24
24
  customSorts: CustomSort[];
25
25
  }
@@ -22,7 +22,7 @@ export interface LiveDataChangedInfo extends BaseEventInfo {
22
22
  */
23
23
  export interface LiveReport {
24
24
  /**
25
- * For OpenFin this is the workbook name; for iPushpull the page name;
25
+ * For OpenFin this is the workbook name; for iPushpull the page name
26
26
  */
27
27
  pageName: string;
28
28
  /**
@@ -13,7 +13,7 @@ export interface FlashingCellApi {
13
13
  */
14
14
  getFlashingCellState(): FlashingCellState;
15
15
  /**
16
- * Retrieves all Flashing cell Definitions in Flashing Cell State
16
+ * Retrieves all Flashing Cell Definitions in Flashing Cell State
17
17
  */
18
18
  getFlashingCellDefinitions(config?: {
19
19
  includeLayoutNotAssociatedObjects?: boolean;
@@ -21,7 +21,7 @@ export interface FlashingCellApi {
21
21
  /**
22
22
  * Retrieves Flashing Cell Definition by the technical ID (from `FlashingCellState`)
23
23
  * @param id Flashing Cell Definition Id
24
- * @returns flashing cell definition
24
+ * @returns Flashing Cell Definition
25
25
  */
26
26
  getFlashingCellDefinitionById(id: FlashingCellDefinition['Uuid']): FlashingCellDefinition;
27
27
  /**
@@ -29,9 +29,14 @@ export interface FlashingCellApi {
29
29
  * @returns flashing cell definitions
30
30
  */
31
31
  getActiveFlashingCellDefinitions(): FlashingCellDefinition[];
32
+ /**
33
+ * Retrieves all suspended Cell Definitions in Flashing Cell State
34
+ * @returns flashing cell definitions
35
+ */
36
+ getSuspendedFlashingCellDefinitions(): FlashingCellDefinition[];
32
37
  /**
33
38
  * Returns `FlashTarget` of the given Flashing Cell Definition
34
- * @param flashingCellDefinition Flashing cell Definition to check
39
+ * @param flashingCellDefinition Flashing Cell Definition to check
35
40
  */
36
41
  getFlashingCellFlashTarget(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition['FlashTarget'];
37
42
  /**
@@ -46,13 +51,13 @@ export interface FlashingCellApi {
46
51
  */
47
52
  editFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
48
53
  /**
49
- * Edits provided Flashing cell Definitions
54
+ * Edits provided Flashing Cell Definitions
50
55
  * @param flashingCellDefinitions Flashing Cell Definitions to Edit
51
- * @returns flashing cell definitions
56
+ * @returns Flashing Cell definitions
52
57
  */
53
58
  editFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): FlashingCellDefinition[];
54
59
  /**
55
- * Adds a Flashing cell Definition to State
60
+ * Adds a Flashing Cell Definition to State
56
61
  * @param flashingCellDefinition Flashing Cell Definition to Add
57
62
  */
58
63
  addFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
@@ -62,23 +67,31 @@ export interface FlashingCellApi {
62
67
  */
63
68
  setFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): void;
64
69
  /**
65
- * Adds provided Flashing cell Definitions
70
+ * Adds provided Flashing Cell Definitions
66
71
  * @param flashingCellDefinitions Flashing Cell Definition to Add
67
- * @returns flashing cell definition
72
+ * @returns Flashing Cell Definition
68
73
  */
69
74
  addFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): FlashingCellDefinition[];
70
75
  /**
71
- * Suspends a Flashing cell Definition
76
+ * Suspends a Flashing Cell Definition
72
77
  * @param flashingCellDefinition Flashing Cell Definition to Suspend
73
- * @returns flashing cell definition
78
+ * @returns Flashing Cell Definition
74
79
  */
75
80
  suspendFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
76
81
  /**
77
- * Activates a suspended Flashing cell Definition
82
+ * Activates a suspended Flashing Cell Definition
78
83
  * @param flashingCellDefinition Flashing Cell Definition to Un-Suspend (activate)
79
- * @returns flashing cell definition
84
+ * @returns Flashing Cell Definition
80
85
  */
81
86
  unSuspendFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
87
+ /**
88
+ * Suspends all FlashingCell Definitions
89
+ */
90
+ suspendAllFlashingCellDefinition(): void;
91
+ /**
92
+ * Activates all suspended Flashing Cell Definition
93
+ */
94
+ unSuspendAllFlashingCellDefinition(): void;
82
95
  /**
83
96
  * Retrieves all Predicate Defs that match given Scope
84
97
  * @param scope the Scope to check
@@ -74,6 +74,14 @@ export interface FormatColumnApi {
74
74
  * @returns format column
75
75
  */
76
76
  unSuspendFormatColumn(formatColumn: FormatColumn): FormatColumn;
77
+ /**
78
+ * Suspends all Format Columns
79
+ */
80
+ suspendAllFormatColumn(): void;
81
+ /**
82
+ * Activates all suspended Format Column
83
+ */
84
+ unSuspendAllFormatColumn(): void;
77
85
  /**
78
86
  * Opens Settings Panel with Format Column section selected and visible
79
87
  */
@@ -7,7 +7,7 @@ import { DataUpdateConfig } from '../PredefinedConfig/Common/DataUpdateConfig';
7
7
  import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
8
8
  import { CellHighlightInfo } from '../PredefinedConfig/Common/CellHighlightInfo';
9
9
  import { RowHighlightInfo } from '../PredefinedConfig/Common/RowHighlightInfo';
10
- import { Column, IRowNode, RowModelType } from '@ag-grid-community/core';
10
+ import { ColDef, ColGroupDef, Column, ColumnState, IRowNode, RowModelType } from '@ag-grid-community/core';
11
11
  import { GridCellRange } from '../PredefinedConfig/Selection/GridCellRange';
12
12
  import { RowsHighlightInfo } from '../PredefinedConfig/Common/RowsHighlightInfo';
13
13
  import { TransposeConfig } from '../PredefinedConfig/Common/TransposeConfig';
@@ -480,6 +480,10 @@ export interface GridApi {
480
480
  * Returns number of rows in Data Source
481
481
  */
482
482
  getRowCount(): number;
483
+ /**
484
+ * Returns number of rows in Data Source
485
+ */
486
+ getVisibleRowCount(): number;
483
487
  /**
484
488
  * Returns number of columns in Data Source
485
489
  */
@@ -494,9 +498,14 @@ export interface GridApi {
494
498
  destroy(): void;
495
499
  /**
496
500
  * Checks if given Grid Cell is editable
497
- * @param gridCell cell to check
501
+ * @param gridCell Cell to check
498
502
  */
499
503
  isCellEditable(gridCell: GridCell): boolean;
504
+ /**
505
+ * Checks if given Grid Cell has been edited (uses Data Change History)
506
+ * @param gridCell Cell to check
507
+ */
508
+ isCellEdited(gridCell: GridCell): boolean;
500
509
  /**
501
510
  * Checks if all of given Grid Cells are editable
502
511
  * @param gridCells cells to check
@@ -530,4 +539,46 @@ export interface GridApi {
530
539
  * Return all AG Grid columns
531
540
  */
532
541
  getAllAgGridColumns(): Column<any>[];
542
+ /**
543
+ * Updates the Column State for a given Column. Column State is stateful information and represents changing values of the grid. It will update the current Layout with the new state.
544
+ * @param columnState - the AG Grid ColumnState to set
545
+ */
546
+ updateAgGridColumnState(columnState: ColumnState): void;
547
+ /**
548
+ * Updates the Column State for a given Columns. Column State is stateful information and represents changing values of the grid. It will update the current Layout with the new state.
549
+ * @param columnStates - the AG Grid ColumnState to set
550
+ */
551
+ updateAgGridColumnStates(columnStates: ColumnState[]): void;
552
+ /**
553
+ * Sets the Column Definitions for the Grid
554
+ */
555
+ setAgGridColumnDefinitions(columnDefinitions: (ColDef | ColGroupDef)[]): void;
556
+ /**
557
+ * Updates the Column Definition for a given Column. The provided column properties are merged with the existing Column Definition.
558
+ * @param columnId - the ColumnId to update
559
+ * @param columnDefinition - the new Column Definition
560
+ */
561
+ updateAgGridColumnDefinition(columnDefinition: ColDefWithId): void;
562
+ /**
563
+ * Updates the Column Definitions for the given Columns. The provided column properties are merged with the existing Column Definitions.
564
+ * @param columnId - the ColumnId to update
565
+ * @param columnDefinition - the new Column Definition
566
+ */
567
+ updateAgGridColumnDefinitions(columnDefinitions: ColDefWithId[]): void;
568
+ /**
569
+ * Removes the Column Definition for a given Column.
570
+ * @param columnId - the ColumnId to remove
571
+ */
572
+ removeAgGridColumnDefinition(columnId: string): void;
573
+ /**
574
+ * Adds a Column Definition to the Grid
575
+ * @param columnDefinition - the new Column Definition
576
+ */
577
+ addAgGridColumnDefinition(columnDefinition: ColDefWithId): void;
533
578
  }
579
+ /**
580
+ * Column Definition with a mandatory `colId` property
581
+ */
582
+ export type ColDefWithId = Omit<ColDef, 'colId'> & {
583
+ colId: string;
584
+ };
@@ -30,6 +30,8 @@ export declare class AlertApiImpl extends ApiBase implements AlertApi {
30
30
  openAlertSettingsPanel(): void;
31
31
  editAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
32
32
  suspendAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
33
+ suspendAllAlertDefinition(): void;
34
+ unSuspendAllAlertDefinition(): void;
33
35
  unSuspendAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
34
36
  evaluateAlertDefinitions(alertDefinitions: AlertDefinition[]): void;
35
37
  findAlertDefinitions(criteria: AdaptableObjectLookupCriteria): AlertDefinition[];
@@ -156,6 +156,12 @@ export class AlertApiImpl extends ApiBase {
156
156
  this.dispatchAction(AlertRedux.AlertDefinitionSuspend(alertDefinition));
157
157
  return this.getAlertDefinitionById(alertDefinition.Uuid);
158
158
  }
159
+ suspendAllAlertDefinition() {
160
+ this.dispatchAction(AlertRedux.AlertDefinitionSuspendAll());
161
+ }
162
+ unSuspendAllAlertDefinition() {
163
+ this.dispatchAction(AlertRedux.AlertDefinitionUnSuspendAll());
164
+ }
159
165
  unSuspendAlertDefinition(alertDefinition) {
160
166
  this.dispatchAction(AlertRedux.AlertDefinitionUnSuspend(alertDefinition));
161
167
  return this.getAlertDefinitionById(alertDefinition.Uuid);
@@ -10,6 +10,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
10
10
  internalApi: ColumnInternalApi;
11
11
  constructor(adaptable: IAdaptable);
12
12
  getColumns(): AdaptableColumn[];
13
+ getStandardColumns(): AdaptableColumn[];
13
14
  getVisibleColumns(): AdaptableColumn[];
14
15
  selectColumn(columnId: string): void;
15
16
  selectColumns(columnIds: string[]): void;
@@ -69,9 +70,9 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
69
70
  getColumnTypes(): string[];
70
71
  getColumnsByColumnType(columnType: string): AdaptableColumn[];
71
72
  getRowGroupedColumns(): AdaptableColumn[];
73
+ getDistinctDisplayValuesForColumn(columnId: string): any[];
74
+ setColumnCaption(columnId: string, caption: string): void;
72
75
  updateColumnConfiguration(columnConfig: ColumnConfig): void;
73
76
  updateColumnConfigurations(columnConfigs: ColumnConfig[]): void;
74
77
  setColumnDefinitions(columnDefinitions: (ColDef | ColGroupDef)[]): void;
75
- getDistinctDisplayValuesForColumn(columnId: string): any[];
76
- setColumnCaption(columnId: string, caption: string): void;
77
78
  }
@@ -4,6 +4,7 @@ import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
4
4
  import { ColumnInternalApi } from '../Internal/ColumnInternalApi';
5
5
  import { createBaseContext } from '../../Utilities/ObjectFactory';
6
6
  import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
7
+ import { logDeprecationExternal } from '../../Utilities/logDeprecation';
7
8
  export function isAutoRowGroupColumn(columnId) {
8
9
  // put this here as there might be other indicators we are not aware of
9
10
  // perhaps with non auto groups ?
@@ -23,6 +24,12 @@ export class ColumnApiImpl extends ApiBase {
23
24
  var _a;
24
25
  return (_a = this.getAdaptableApi().gridApi.getGridState().Columns) !== null && _a !== void 0 ? _a : [];
25
26
  }
27
+ getStandardColumns() {
28
+ const cols = this.getAdaptableApi()
29
+ .gridApi.getGridState()
30
+ .Columns.filter((c) => !this.internalApi.isActionRowButtonColumn(c.columnId));
31
+ return cols !== null && cols !== void 0 ? cols : [];
32
+ }
26
33
  getVisibleColumns() {
27
34
  const layout = this.getAdaptableApi().layoutApi.getCurrentLayout();
28
35
  const visibleCols = layout.Columns.reduce((acc, colId) => {
@@ -363,40 +370,22 @@ export class ColumnApiImpl extends ApiBase {
363
370
  return this.getColumnWithColumnId(n);
364
371
  });
365
372
  }
366
- updateColumnConfiguration(columnConfig) {
367
- const columnExists = this.doesColumnExist(columnConfig.colId);
368
- if (!columnExists) {
369
- this.logWarn(`Column with id ${columnConfig.colId} does not exist, could NOT update configuration`);
370
- return;
371
- }
372
- const columnState = columnConfig;
373
- const agGridApi = this.adaptable.agGridAdapter.getAgGridApi();
374
- agGridApi.applyColumnState({
375
- state: [columnState],
376
- });
377
- }
378
- updateColumnConfigurations(columnConfigs) {
379
- const existingColumnConfigs = columnConfigs.filter((cc) => this.doesColumnExist(cc.colId));
380
- const notExistingColumnIds = columnConfigs
381
- .filter((cc) => !this.doesColumnExist(cc.colId))
382
- .map((cc) => cc.colId);
383
- notExistingColumnIds.forEach((colId) => {
384
- this.logWarn(`Column with id ${colId} does not exist, could NOT update configuration`);
385
- });
386
- const columnStates = existingColumnConfigs;
387
- const agGridApi = this.adaptable.agGridAdapter.getAgGridApi();
388
- agGridApi.applyColumnState({
389
- state: columnStates,
390
- });
391
- }
392
- setColumnDefinitions(columnDefinitions) {
393
- const agGridApi = this.adaptable.agGridAdapter.getAgGridApi();
394
- agGridApi.setGridOption('columnDefs', columnDefinitions);
395
- }
396
373
  getDistinctDisplayValuesForColumn(columnId) {
397
374
  return this.getAdaptableApi().gridApi.internalApi.getDistinctDisplayValuesForColumn(columnId);
398
375
  }
399
376
  setColumnCaption(columnId, caption) {
400
377
  return this.getAdaptableApi().layoutApi.setColumnCaption(columnId, caption);
401
378
  }
379
+ updateColumnConfiguration(columnConfig) {
380
+ logDeprecationExternal(this.adaptable.logger, 'ColumnApi', 'updateColumnConfiguration', 'GridApi', 'updateAgGridColumnState');
381
+ this.getGridApi().updateAgGridColumnState(columnConfig);
382
+ }
383
+ updateColumnConfigurations(columnConfigs) {
384
+ logDeprecationExternal(this.adaptable.logger, 'ColumnApi', 'updateColumnConfigurations', 'GridApi', 'updateAgGridColumnStates');
385
+ this.getGridApi().updateAgGridColumnStates(columnConfigs);
386
+ }
387
+ setColumnDefinitions(columnDefinitions) {
388
+ logDeprecationExternal(this.adaptable.logger, 'ColumnApi', 'setColumnDefinitions', 'GridApi', 'setColumnDefinitions');
389
+ this.getGridApi().setAgGridColumnDefinitions(columnDefinitions);
390
+ }
402
391
  }
@@ -25,5 +25,7 @@ export declare class CustomSortApiImpl extends ApiBase implements CustomSortApi
25
25
  deleteCustomSort(column: string): void;
26
26
  suspendCustomSort(customSort: CustomSort): CustomSort;
27
27
  unSuspendCustomSort(customSort: CustomSort): CustomSort;
28
+ suspendAllCustomSort(): void;
29
+ unSuspendAllCustomSort(): void;
28
30
  openCustomSortSettingsPanel(): void;
29
31
  }
@@ -60,6 +60,12 @@ export class CustomSortApiImpl extends ApiBase {
60
60
  this.dispatchAction(CustomSortRedux.CustomSortUnSuspend(customSort));
61
61
  return this.getCustomSortById(customSort.Uuid);
62
62
  }
63
+ suspendAllCustomSort() {
64
+ this.dispatchAction(CustomSortRedux.CustomSortSuspendAll());
65
+ }
66
+ unSuspendAllCustomSort() {
67
+ this.dispatchAction(CustomSortRedux.CustomSortUnSuspendAll());
68
+ }
63
69
  openCustomSortSettingsPanel() {
64
70
  this.showModulePopup(ModuleConstants.CustomSortModuleId);
65
71
  }
@@ -1,12 +1,14 @@
1
1
  import { DataChangeHistoryApi } from '../DataChangeHistoryApi';
2
2
  import { ApiBase } from './ApiBase';
3
3
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
4
+ import { GridCell } from '../../types';
4
5
  export declare class DataChangeHistoryApiImpl extends ApiBase implements DataChangeHistoryApi {
5
6
  getDataChangeHistoryMode(): 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
6
7
  activateDataChangeHistory(forceReset?: boolean): void;
7
8
  deactivateDataChangeHistory(): void;
8
9
  suspendDataChangeHistory(): void;
9
10
  getDataChangeHistoryLog(): CellDataChangedInfo[];
11
+ getDataChangeForGridCell(gridCell: GridCell): CellDataChangedInfo | undefined;
10
12
  addDataChangeHistoryEntry(dataChangeInfo: CellDataChangedInfo): void;
11
13
  undoDataChangeHistoryEntry(dataChangeInfo: CellDataChangedInfo): void;
12
14
  clearDataChangeHistoryEntry(dataChangeInfo: CellDataChangedInfo): void;
@@ -48,6 +48,11 @@ export class DataChangeHistoryApiImpl extends ApiBase {
48
48
  const changeLog = (_a = this.getAdaptableState().System.DataChangeHistory.logs) !== null && _a !== void 0 ? _a : {};
49
49
  return Object.values(changeLog);
50
50
  }
51
+ getDataChangeForGridCell(gridCell) {
52
+ const allChanges = this.getDataChangeHistoryLog();
53
+ return allChanges.find((c) => c.primaryKeyValue == gridCell.primaryKeyValue &&
54
+ c.column.columnId == gridCell.column.columnId);
55
+ }
51
56
  addDataChangeHistoryEntry(dataChangeInfo) {
52
57
  const uniqueKey = this.getDataChangeHistoryKey(dataChangeInfo);
53
58
  this.dispatchAction(SystemDataChangeHistoryAdd(dataChangeInfo, uniqueKey));
@@ -14,6 +14,7 @@ export declare class FlashingCellApiImpl extends ApiBase implements FlashingCell
14
14
  getFlashingCellDefinitions(config?: LayoutAssociatedObjectLoadConfig): FlashingCellDefinition[];
15
15
  getFlashingCellDefinitionById(id: FlashingCellDefinition['Uuid']): FlashingCellDefinition;
16
16
  getActiveFlashingCellDefinitions(): FlashingCellDefinition[];
17
+ getSuspendedFlashingCellDefinitions(): FlashingCellDefinition[];
17
18
  getFlashingCellFlashTarget(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition['FlashTarget'];
18
19
  showFlashingCell(flashingCellToShow: AdaptableFlashingCell): void;
19
20
  addFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
@@ -21,6 +22,8 @@ export declare class FlashingCellApiImpl extends ApiBase implements FlashingCell
21
22
  editFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
22
23
  suspendFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
23
24
  unSuspendFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
25
+ suspendAllFlashingCellDefinition(): void;
26
+ unSuspendAllFlashingCellDefinition(): void;
24
27
  addFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): FlashingCellDefinition[];
25
28
  editFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): FlashingCellDefinition[];
26
29
  getFlashingCellPredicateDefsForScope(scope: ColumnScope): AdaptablePredicateDef[];
@@ -24,6 +24,9 @@ export class FlashingCellApiImpl extends ApiBase {
24
24
  getActiveFlashingCellDefinitions() {
25
25
  return this.getFlashingCellDefinitions().filter((fc) => !fc.IsSuspended);
26
26
  }
27
+ getSuspendedFlashingCellDefinitions() {
28
+ return this.getFlashingCellDefinitions().filter((fc) => fc.IsSuspended);
29
+ }
27
30
  getFlashingCellFlashTarget(flashingCellDefinition) {
28
31
  var _a;
29
32
  return (_a = flashingCellDefinition.FlashTarget) !== null && _a !== void 0 ? _a : 'cell';
@@ -64,6 +67,12 @@ export class FlashingCellApiImpl extends ApiBase {
64
67
  this.dispatchAction(FlashingCellRedux.FlashingCellDefinitionUnSuspend(flashingCellDefinition));
65
68
  return this.getFlashingCellDefinitionById(flashingCellDefinition.Uuid);
66
69
  }
70
+ suspendAllFlashingCellDefinition() {
71
+ this.dispatchAction(FlashingCellRedux.FlashingCellDefinitionSuspendAll());
72
+ }
73
+ unSuspendAllFlashingCellDefinition() {
74
+ this.dispatchAction(FlashingCellRedux.FlashingCellDefinitionUnSuspendAll());
75
+ }
67
76
  addFlashingCellDefinitions(flashingCellDefinitions) {
68
77
  flashingCellDefinitions.forEach((fad) => {
69
78
  this.addFlashingCellDefinition(fad);
@@ -29,6 +29,8 @@ export declare class FormatColumnApiImpl extends ApiBase implements FormatColumn
29
29
  deleteAllFormatColumns(): void;
30
30
  suspendFormatColumn(formatColumn: FormatColumn): FormatColumn;
31
31
  unSuspendFormatColumn(formatColumn: FormatColumn): FormatColumn;
32
+ suspendAllFormatColumn(): void;
33
+ unSuspendAllFormatColumn(): void;
32
34
  getFormatColumnsForColumn(column: AdaptableColumn, config?: {
33
35
  includeSuspended?: boolean;
34
36
  }): FormatColumn[];
@@ -60,6 +60,12 @@ export class FormatColumnApiImpl extends ApiBase {
60
60
  this.dispatchAction(FormatColumnRedux.FormatColumnUnSuspend(formatColumn));
61
61
  return this.getFormatColumnById(formatColumn.Uuid);
62
62
  }
63
+ suspendAllFormatColumn() {
64
+ this.dispatchAction(FormatColumnRedux.FormatColumnSuspendAll());
65
+ }
66
+ unSuspendAllFormatColumn() {
67
+ this.dispatchAction(FormatColumnRedux.FormatColumnUnSuspendAll());
68
+ }
63
69
  getFormatColumnsForColumn(column, config) {
64
70
  const formatColumns = this.getFormatColumns().filter((formatColumn) => (config === null || config === void 0 ? void 0 : config.includeSuspended) || !formatColumn.IsSuspended);
65
71
  return this.internalApi.getFormatColumnWithColumnInScope(formatColumns, column);
@@ -1,5 +1,5 @@
1
1
  import { ApiBase } from './ApiBase';
2
- import { GridApi } from '../GridApi';
2
+ import { ColDefWithId, 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';
@@ -8,7 +8,7 @@ import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
8
8
  import { DataUpdateConfig } from '../../PredefinedConfig/Common/DataUpdateConfig';
9
9
  import { CellHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
10
10
  import { RowHighlightInfo } from '../../PredefinedConfig/Common/RowHighlightInfo';
11
- import { Column, IRowNode, RowModelType } from '@ag-grid-community/core';
11
+ import { ColDef, ColGroupDef, Column, ColumnState, IRowNode, RowModelType } from '@ag-grid-community/core';
12
12
  import { GridCellRange } from '../../PredefinedConfig/Selection/GridCellRange';
13
13
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
14
14
  import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
@@ -122,8 +122,10 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
122
122
  refreshRowNodes(rowNodes: IRowNode[]): void;
123
123
  refreshGroupRowNodes(): void;
124
124
  isCellEditable(gridCell: GridCell): boolean;
125
+ isCellEdited(gridCell: GridCell): boolean;
125
126
  isEveryCellEditable(gridCells: GridCell[]): boolean;
126
127
  getRowCount(): number;
128
+ getVisibleRowCount(): number;
127
129
  getRowsInViewport(): IRowNode[];
128
130
  getColumnCount(): number;
129
131
  getVisibleColumnCount(): number;
@@ -135,4 +137,11 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
135
137
  getAgGridRowModelType(): RowModelType;
136
138
  showTransposedView(transposeConfig?: TransposeConfig): void;
137
139
  getAllAgGridColumns(): Column<any>[];
140
+ updateAgGridColumnState(columnState: ColumnState): void;
141
+ updateAgGridColumnStates(columnStates: ColumnState[]): void;
142
+ setAgGridColumnDefinitions(columnDefinitions: (ColDef | ColGroupDef)[]): void;
143
+ updateAgGridColumnDefinition(columnDefinitionToBeUpdated: ColDefWithId): void;
144
+ updateAgGridColumnDefinitions(columnDefinitionsToBeUpdated: ColDefWithId[]): void;
145
+ removeAgGridColumnDefinition(columnId: string): void;
146
+ addAgGridColumnDefinition(newColumnDefinition: ColDefWithId): void;
138
147
  }