@adaptabletools/adaptable 14.1.0 → 15.0.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/bundle.cjs.js +200 -215
  2. package/package.json +2 -2
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +42 -42
  6. package/src/AdaptableOptions/ActionOptions.d.ts +5 -5
  7. package/src/AdaptableOptions/ChartingOptions.d.ts +6 -0
  8. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  9. package/src/Api/ChartingApi.d.ts +12 -8
  10. package/src/Api/ColumnApi.d.ts +3 -3
  11. package/src/Api/DashboardApi.d.ts +4 -6
  12. package/src/Api/Events/ActionRowSubmitted.d.ts +4 -4
  13. package/src/Api/Events/ChartChanged.d.ts +30 -1
  14. package/src/Api/Events/DashboardChanged.d.ts +8 -0
  15. package/src/Api/Events/GridDataChanged.d.ts +2 -2
  16. package/src/Api/FilterApi.d.ts +2 -2
  17. package/src/Api/FinanceApi.d.ts +9 -9
  18. package/src/Api/FormatColumnApi.d.ts +6 -6
  19. package/src/Api/FreeTextColumnApi.d.ts +3 -3
  20. package/src/Api/GridApi.d.ts +28 -28
  21. package/src/Api/Implementation/ChartingApiImpl.d.ts +2 -0
  22. package/src/Api/Implementation/ChartingApiImpl.js +6 -0
  23. package/src/Api/Implementation/ColumnApiImpl.d.ts +3 -3
  24. package/src/Api/Implementation/DashboardApiImpl.d.ts +0 -1
  25. package/src/Api/Implementation/DashboardApiImpl.js +3 -18
  26. package/src/Api/Implementation/FilterApiImpl.d.ts +2 -2
  27. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -6
  28. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +3 -3
  29. package/src/Api/Implementation/GridApiImpl.d.ts +29 -29
  30. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +2 -0
  31. package/src/Api/Implementation/StyledColumnApiImpl.js +6 -0
  32. package/src/Api/Implementation/ThemeApiImpl.js +4 -1
  33. package/src/Api/Internal/ActionInternalApi.d.ts +3 -3
  34. package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -3
  35. package/src/Api/Internal/AlertInternalApi.d.ts +3 -3
  36. package/src/Api/Internal/DashboardInternalApi.d.ts +1 -0
  37. package/src/Api/Internal/DashboardInternalApi.js +28 -3
  38. package/src/Api/Internal/ExportInternalApi.d.ts +1 -0
  39. package/src/Api/Internal/ExportInternalApi.js +6 -0
  40. package/src/Api/Internal/FilterInternalApi.d.ts +2 -2
  41. package/src/Api/Internal/FormatColumnInternalApi.d.ts +7 -7
  42. package/src/Api/Internal/GridInternalApi.d.ts +4 -4
  43. package/src/Api/Internal/LayoutInternalApi.d.ts +1 -0
  44. package/src/Api/Internal/LayoutInternalApi.js +7 -0
  45. package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -3
  46. package/src/Api/StyledColumnApi.d.ts +10 -0
  47. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +3 -4
  48. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +2 -2
  49. package/src/PredefinedConfig/Common/CellDataChangedInfo.d.ts +2 -2
  50. package/src/PredefinedConfig/Common/Menu.d.ts +2 -2
  51. package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -2
  52. package/src/PredefinedConfig/Selection/GridRow.d.ts +2 -2
  53. package/src/Redux/ActionsReducers/AlertRedux.d.ts +14 -0
  54. package/src/Redux/ActionsReducers/AlertRedux.js +23 -1
  55. package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +14 -0
  56. package/src/Redux/ActionsReducers/CustomSortRedux.js +23 -1
  57. package/src/Redux/ActionsReducers/FlashingCellRedux.d.ts +15 -1
  58. package/src/Redux/ActionsReducers/FlashingCellRedux.js +23 -1
  59. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +14 -0
  60. package/src/Redux/ActionsReducers/FormatColumnRedux.js +26 -1
  61. package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -3
  62. package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +14 -0
  63. package/src/Redux/ActionsReducers/PlusMinusRedux.js +23 -1
  64. package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +70 -0
  65. package/src/Redux/ActionsReducers/ScheduleRedux.js +112 -2
  66. package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +14 -0
  67. package/src/Redux/ActionsReducers/ShortcutRedux.js +23 -1
  68. package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +14 -0
  69. package/src/Redux/ActionsReducers/StyledColumnRedux.js +23 -1
  70. package/src/Redux/ActionsReducers/utils.d.ts +2 -0
  71. package/src/Redux/ActionsReducers/utils.js +20 -2
  72. package/src/Redux/Store/AdaptableStore.js +45 -4
  73. package/src/Strategy/AlertModule.js +2 -0
  74. package/src/Strategy/CustomSortModule.d.ts +2 -0
  75. package/src/Strategy/CustomSortModule.js +2 -0
  76. package/src/Strategy/FlashingCellModule.js +2 -0
  77. package/src/Strategy/FormatColumnModule.js +2 -0
  78. package/src/Strategy/PlusMinusModule.js +2 -0
  79. package/src/Strategy/ShortcutModule.js +2 -0
  80. package/src/Strategy/StyledColumnModule.js +2 -0
  81. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  82. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -3
  83. package/src/Utilities/Interface/Preview.d.ts +2 -2
  84. package/src/Utilities/ObjectFactory.d.ts +2 -2
  85. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +2 -2
  86. package/src/Utilities/Services/AlertService.d.ts +2 -0
  87. package/src/Utilities/Services/AlertService.js +6 -0
  88. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -2
  89. package/src/Utilities/Services/Interface/IAlertService.d.ts +2 -0
  90. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +2 -2
  91. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +3 -3
  92. package/src/Utilities/Services/Interface/IReportService.d.ts +3 -3
  93. package/src/Utilities/Services/QueryLanguageService.d.ts +2 -2
  94. package/src/Utilities/Services/ReportService.d.ts +4 -4
  95. package/src/Utilities/license/hashing.js +1 -1
  96. package/src/Utilities/logDeprecation.d.ts +1 -1
  97. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +2 -2
  98. package/src/View/Charting/ShowChartButton.js +3 -2
  99. package/src/View/Charting/useChartingElements.js +6 -5
  100. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +22 -1
  101. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +2 -2
  102. package/src/View/Export/ExportSelector.js +1 -0
  103. package/src/View/Export/ExportViewPanel.js +1 -0
  104. package/src/View/Export/ReportExportDropdown.js +1 -0
  105. package/src/View/Theme/ThemePopup.d.ts +0 -3
  106. package/src/View/Theme/ThemePopup.js +1 -9
  107. package/src/View/Theme/ThemeViewPanel.js +4 -3
  108. package/src/agGrid/ActionColumnRenderer.js +1 -0
  109. package/src/agGrid/Adaptable.d.ts +41 -41
  110. package/src/agGrid/Adaptable.js +13 -11
  111. package/src/metamodel/adaptable.metamodel.d.ts +36 -0
  112. package/src/metamodel/adaptable.metamodel.js +1 -1
  113. package/src/types.d.ts +2 -2
  114. package/version.d.ts +1 -1
  115. package/version.js +1 -1
@@ -9,7 +9,7 @@ import { CellHighlightInfo } from '../PredefinedConfig/Common/CellHighlightInfo'
9
9
  import { RowHighlightInfo } from '../PredefinedConfig/Common/RowHighlightInfo';
10
10
  import { AdaptableModule } from '../PredefinedConfig/Common/Types';
11
11
  import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
12
- import { GridOptions, RowNode } from '@ag-grid-community/core';
12
+ import { GridOptions, IRowNode } from '@ag-grid-community/core';
13
13
  import { GridCellRange } from '../PredefinedConfig/Selection/GridCellRange';
14
14
  import { RowsHighlightInfo } from '../PredefinedConfig/Common/RowsHighlightInfo';
15
15
  /**
@@ -43,19 +43,19 @@ export interface GridApi {
43
43
  * @param dataRows rows which have been updated - send whole row and Adaptable will take care of the rest
44
44
  * @param config batch option and callback function to run post update
45
45
  */
46
- updateGridData(dataRows: any[], config?: DataUpdateConfig): Promise<RowNode[]>;
46
+ updateGridData(dataRows: any[], config?: DataUpdateConfig): Promise<IRowNode[]>;
47
47
  /**
48
48
  * Adds rows to Adaptable (and AG Grid)
49
49
  * @param dataRows rows to add; ensure all 'mandatory' fields are included and Primary Key is unique
50
50
  * @param config batch option and callback function to run post addition
51
51
  */
52
- addGridData(dataRows: any[], config?: DataUpdateConfig): Promise<RowNode[]>;
52
+ addGridData(dataRows: any[], config?: DataUpdateConfig): Promise<IRowNode[]>;
53
53
  /**
54
54
  * Deletes rows from Adaptable (and AG Grid)
55
55
  * @param dataRows rows which should be deleted
56
56
  * @param config batch option and callback function to run post deletion
57
57
  */
58
- deleteGridData(dataRows: any[], config?: DataUpdateConfig): Promise<RowNode[]>;
58
+ deleteGridData(dataRows: any[], config?: DataUpdateConfig): Promise<IRowNode[]>;
59
59
  /**
60
60
  * Updates cell in Adaptable (first performs Cell & Server Validation)
61
61
  * @param columnId column to update
@@ -130,19 +130,19 @@ export interface GridApi {
130
130
  * @param rowNode Node to Select
131
131
  * @param clearSelection Whether to clear current selection in grid
132
132
  */
133
- selectNode(rowNode: RowNode, clearSelection: boolean): void;
133
+ selectNode(rowNode: IRowNode, clearSelection: boolean): void;
134
134
  /**
135
135
  * Selects the AG Grid Row Nodes in AdapTable
136
136
  * @param rowNodes Nodes to Select
137
137
  * @param clearSelection Whether to clear current selection in grid
138
138
  */
139
- selectNodes(rowNodes: RowNode[], clearSelection: boolean): void;
139
+ selectNodes(rowNodes: IRowNode[], clearSelection: boolean): void;
140
140
  /**
141
141
  * Deselects the AG Grid Row Node in AdapTable
142
142
  * @param rowNode Node to DeSelect
143
143
  * @param clearSelection Whether to clear current selection in grid
144
144
  */
145
- deSelectNode(rowNode: RowNode, clearSelection: boolean): void;
145
+ deSelectNode(rowNode: IRowNode, clearSelection: boolean): void;
146
146
  /**
147
147
  * Selects a Column in AG Grid
148
148
  * @param columnId Id of Column to Select
@@ -158,7 +158,7 @@ export interface GridApi {
158
158
  * @param rowNodes Nodes to DeSelect
159
159
  * @param clearSelection Whether to clear current selection in grid
160
160
  */
161
- deSelectNodes(rowNodes: RowNode[], clearSelection: boolean): void;
161
+ deSelectNodes(rowNodes: IRowNode[], clearSelection: boolean): void;
162
162
  /**
163
163
  * Selects Row with given Primary Key Value
164
164
  * @param primaryKeyValue Primary Key Value of Row to select
@@ -200,54 +200,54 @@ export interface GridApi {
200
200
  /**
201
201
  * Retrieves the first Row Node in AdapTable
202
202
  */
203
- getFirstRowNode(): RowNode;
203
+ getFirstRowNode(): IRowNode;
204
204
  /**
205
205
  * Retrieves the first Displayed Row Node in AdapTable
206
206
  */
207
- getFirstDisplayedRowNode(): RowNode;
207
+ getFirstDisplayedRowNode(): IRowNode;
208
208
  /**
209
209
  * Retrieves all filtered Row Nodes currently in the Grid (i.e. after applying the current filter)
210
210
  */
211
- getVisibleRowNodes(): RowNode[];
211
+ getVisibleRowNodes(): IRowNode[];
212
212
  /**
213
213
  * Retrieves all Row Nodes currently in the Grid (by default excluding the group rows)
214
214
  * @param config - configuration
215
215
  */
216
216
  getAllRowNodes(config?: {
217
217
  includeGroupRows?: boolean;
218
- filterFn?: (rowNode: RowNode) => boolean;
219
- }): RowNode[];
218
+ filterFn?: (rowNode: IRowNode) => boolean;
219
+ }): IRowNode[];
220
220
  /**
221
221
  * Retrieves Row Nodes that contain given Primary Keys
222
222
  * @param primaryKeyValues Primary Kev Values to look up
223
223
  */
224
- getRowNodesForPrimaryKeys(primaryKeyValues: any[]): RowNode[];
224
+ getRowNodesForPrimaryKeys(primaryKeyValues: any[]): IRowNode[];
225
225
  /**
226
226
  * Retrieves Row Node that contains given Primary Key
227
227
  * @param primaryKeyValue Primary Key Value to look up
228
228
  */
229
- getRowNodeForPrimaryKey(primaryKeyValue: any): RowNode;
229
+ getRowNodeForPrimaryKey(primaryKeyValue: any): IRowNode;
230
230
  /**
231
231
  * Retrieves the displayed RowNode at the given index
232
232
  * @param rowIndex row index
233
233
  */
234
- getRowNodeForIndex(rowIndex: number): RowNode | undefined;
234
+ getRowNodeForIndex(rowIndex: number): IRowNode | undefined;
235
235
  /**
236
236
  * Returns the Primary Kev Value for a given Row Node
237
237
  * @param rowNode rowNode to look up
238
238
  */
239
- getPrimaryKeyValueForRowNode(rowNode: RowNode): any;
239
+ getPrimaryKeyValueForRowNode(rowNode: IRowNode): any;
240
240
  /**
241
241
  * Returns the Primary Kev Values for a given Row Node collection
242
242
  * @param rowNode rowNodes to look up
243
243
  */
244
- getPrimaryKeyValuesForRowNodes(rowNodes: RowNode[]): any[];
244
+ getPrimaryKeyValuesForRowNodes(rowNodes: IRowNode[]): any[];
245
245
  /**
246
246
  * Retrieves Cell in given Row and Column
247
247
  * @param rowNode Row to use
248
248
  * @param columnId ColumnId to lookup
249
249
  */
250
- getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
250
+ getGridCellFromRowNode(rowNode: IRowNode, columnId: string): GridCell | undefined;
251
251
  /**
252
252
  * Retrieves Display Value for a given cell
253
253
  * @param primaryKeyValue (unique) value in Primary Key Column
@@ -271,26 +271,26 @@ export interface GridApi {
271
271
  * @param rowNode Row to use
272
272
  * @param columnId ColumnId to lookup
273
273
  */
274
- getRawValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
274
+ getRawValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
275
275
  /**
276
276
  * Retrieves Formatted Value for a given Raw Value in given Column
277
277
  * @param columnId ColumnId to lookup
278
278
  * @param rawValue Raw Value
279
279
  * @param rowNode Node containig the Column
280
280
  */
281
- getDisplayValueFromRawValue(rowNode: RowNode, columnId: string, rawValue: any): string | undefined;
281
+ getDisplayValueFromRawValue(rowNode: IRowNode, columnId: string, rawValue: any): string | undefined;
282
282
  /**
283
283
  * Retrieves Display Value for Cell in given Row and Column
284
284
  * @param rowNode Row to use
285
285
  * @param columnId ColumnId to lookup
286
286
  */
287
- getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
287
+ getDisplayValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
288
288
  /**
289
289
  * Retrieves Normalised Value for Cell in given Row and Column
290
290
  * @param rowNode Row to use
291
291
  * @param columnId ColumnId to lookup
292
292
  */
293
- getNormalisedValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
293
+ getNormalisedValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
294
294
  /**
295
295
  * Sets the grid to Row Group
296
296
  * @param columnIds ColumnIds to row group
@@ -337,7 +337,7 @@ export interface GridApi {
337
337
  * Whether given Row Node is a Row Group
338
338
  * @param rowNode Node to check
339
339
  */
340
- isGroupRowNode(rowNode: RowNode): boolean;
340
+ isGroupRowNode(rowNode: IRowNode): boolean;
341
341
  /**
342
342
  * Whether Quick Filter is available in the Grid
343
343
  */
@@ -406,7 +406,7 @@ export interface GridApi {
406
406
  * @param rowNodes agGrid RowNodes which contain cells to refresh
407
407
  * @param columnIds ColumnIds which contain cells to refresh
408
408
  */
409
- refreshCells(rowNodes: RowNode[], columnIds: string[]): void;
409
+ refreshCells(rowNodes: IRowNode[], columnIds: string[]): void;
410
410
  /**
411
411
  * Forces a re-render of the row with the given primary key value
412
412
  * @param primaryKey row primary key
@@ -416,12 +416,12 @@ export interface GridApi {
416
416
  * Forces a re-render of the given row
417
417
  * @param rowNode ag-grid row
418
418
  */
419
- refreshRowNode(rowNode: RowNode): void;
419
+ refreshRowNode(rowNode: IRowNode): void;
420
420
  /**
421
421
  * Forces a re-render of the given rows
422
422
  * @param rowNodes ag-grid rows
423
423
  */
424
- refreshRowNodes(rowNodes: RowNode[]): void;
424
+ refreshRowNodes(rowNodes: IRowNode[]): void;
425
425
  /**
426
426
  * Returns number of rows in Data Source
427
427
  */
@@ -499,7 +499,7 @@ export interface GridApi {
499
499
  /**
500
500
  * @deprecated internal method, will be removed in next major release
501
501
  */
502
- fireGridDataChangedEvent(dataRows: any[], rowNodes: RowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
502
+ fireGridDataChangedEvent(dataRows: any[], rowNodes: IRowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
503
503
  /**
504
504
  * @deprecated use `openGridInfoSettingsPanel()` instead
505
505
  */
@@ -30,4 +30,6 @@ export declare class ChartingApiImpl extends ApiBase implements ChartingApi {
30
30
  }[];
31
31
  };
32
32
  getOpenChartContainer(chartDefinition: ChartDefinition): ChartContainer | null;
33
+ setChartReadOnly(chartDefinition: ChartDefinition): void;
34
+ setChartEditable(chartDefinition: ChartDefinition): void;
33
35
  }
@@ -110,5 +110,11 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
110
110
  return containerElement.contains(chartRef.chartElement);
111
111
  })) !== null && _c !== void 0 ? _c : null);
112
112
  }
113
+ setChartReadOnly(chartDefinition) {
114
+ this.dispatchAction(ChartingRedux.ChartingEditChart(Object.assign(Object.assign({}, chartDefinition), { IsReadOnly: true })));
115
+ }
116
+ setChartEditable(chartDefinition) {
117
+ this.dispatchAction(ChartingRedux.ChartingEditChart(Object.assign(Object.assign({}, chartDefinition), { IsReadOnly: false })));
118
+ }
113
119
  }
114
120
  exports.ChartingApiImpl = ChartingApiImpl;
@@ -2,7 +2,7 @@ import { ApiBase } from './ApiBase';
2
2
  import { AdaptableColumn, AdaptableColumnDataType } from '../../PredefinedConfig/Common/AdaptableColumn';
3
3
  import { ColumnApi } from '../ColumnApi';
4
4
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
5
- import { Column, RowNode } from '@ag-grid-community/core';
5
+ import { Column, IRowNode } from '@ag-grid-community/core';
6
6
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
7
7
  import { ColumnInternalApi } from '../Internal/ColumnInternalApi';
8
8
  export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
@@ -82,8 +82,8 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
82
82
  getDistinctCustomSortDisplayValuesForColumn(columnId: string): Promise<any[]>;
83
83
  getDistinctBulkUpdateDisplayValuesForColumn(columnId: string, selectedGridCells: GridCell[]): Promise<any[]>;
84
84
  getDistinctVisibleDisplayValuesForColumn(columnId: string): any[];
85
- getDistinctRawValuesForColumn(columnId: string, skipRowNode?: RowNode): any[];
86
- getUnsortedDistinctRawValuesForColumn(columnId: string, skipRowNode?: RowNode): any[];
85
+ getDistinctRawValuesForColumn(columnId: string, skipRowNode?: IRowNode): any[];
86
+ getUnsortedDistinctRawValuesForColumn(columnId: string, skipRowNode?: IRowNode): any[];
87
87
  getDistinctVisibleRawValuesForColumn(columnId: string): any[];
88
88
  getPrimaryKeyColumn(): AdaptableColumn;
89
89
  getAllColumnFriendlyNames(): string[];
@@ -38,7 +38,6 @@ export declare class DashboardApiImpl extends ApiBase implements DashboardApi {
38
38
  showDashboardPopup(): void;
39
39
  openDashboardSettingsPanel(): void;
40
40
  hasCustomToolbarChanged(dashboardChangedInfo: DashboardChangedInfo, customToolbarName: string): 'hidden' | 'visible' | 'none';
41
- private isToolbarInActiveTab;
42
41
  isDashboardCollapsed(): boolean;
43
42
  isDashboardExpanded(): boolean;
44
43
  isDashboardFloating(): boolean;
@@ -126,8 +126,9 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
126
126
  this.showModulePopup(ModuleConstants.DashboardModuleId);
127
127
  }
128
128
  hasCustomToolbarChanged(dashboardChangedInfo, customToolbarName) {
129
- const visibleInNewState = this.isToolbarInActiveTab(customToolbarName, dashboardChangedInfo.newDashboardState);
130
- const visibleInOldState = this.isToolbarInActiveTab(customToolbarName, dashboardChangedInfo.oldDashboardState);
129
+ (0, logDeprecation_1.logDeprecation)('DashboardApi', 'hasCustomToolbarChanged', null, 'Use instead the information provided in the DashboardChanged event.');
130
+ const visibleInNewState = this.internalApi.isToolbarInActiveTab(customToolbarName, dashboardChangedInfo.newDashboardState);
131
+ const visibleInOldState = this.internalApi.isToolbarInActiveTab(customToolbarName, dashboardChangedInfo.oldDashboardState);
131
132
  if (visibleInNewState && !visibleInOldState) {
132
133
  return 'visible';
133
134
  }
@@ -136,22 +137,6 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
136
137
  }
137
138
  return 'none';
138
139
  }
139
- isToolbarInActiveTab(toolbarName, dashboardState) {
140
- var _a;
141
- if (!dashboardState) {
142
- return false;
143
- }
144
- const tabIndex = dashboardState.ActiveTabIndex;
145
- if (tabIndex != undefined) {
146
- if ((dashboardState === null || dashboardState === void 0 ? void 0 : dashboardState.Tabs) && ((_a = dashboardState === null || dashboardState === void 0 ? void 0 : dashboardState.Tabs) === null || _a === void 0 ? void 0 : _a.length) > 0) {
147
- const newTab = dashboardState === null || dashboardState === void 0 ? void 0 : dashboardState.Tabs[tabIndex];
148
- if (newTab && newTab.Toolbars) {
149
- return newTab.Toolbars.find((c) => c == toolbarName) != undefined;
150
- }
151
- }
152
- }
153
- return false;
154
- }
155
140
  isDashboardCollapsed() {
156
141
  return this.getDashboardState().IsCollapsed;
157
142
  }
@@ -5,7 +5,7 @@ import { FilterApi } from '../FilterApi';
5
5
  import { AdaptablePredicateDef, ColumnFilterDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
6
6
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
7
7
  import { ColumnFilter, GridCell } from '../../types';
8
- import { RowNode } from '@ag-grid-community/core';
8
+ import { IRowNode } from '@ag-grid-community/core';
9
9
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
10
10
  import { FilterInternalApi } from '../Internal/FilterInternalApi';
11
11
  export declare class FilterApiImpl extends ApiBase implements FilterApi {
@@ -37,7 +37,7 @@ export declare class FilterApiImpl extends ApiBase implements FilterApi {
37
37
  createEqualityColumnFilterForCell(gridCell: GridCell): ColumnFilter | null;
38
38
  columnFilterToString(columnFilter: ColumnFilter): string;
39
39
  columnFiltersToString(columnFilters: ColumnFilter[]): string;
40
- evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
40
+ evaluateColumnFilter(columnFilter: ColumnFilter, node: IRowNode): boolean;
41
41
  private getColumnFilterById;
42
42
  /**
43
43
  * Checks if a filter is applied. It is applied when:
@@ -3,7 +3,7 @@ import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
3
3
  import { FormatColumnApi } from '../FormatColumnApi';
4
4
  import { FormatColumn, FormatColumnState } from '../../PredefinedConfig/FormatColumnState';
5
5
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
6
- import { RowNode } from '@ag-grid-community/core';
6
+ import { IRowNode } from '@ag-grid-community/core';
7
7
  import { StringFormatterOptions } from '../../types';
8
8
  import { AdaptableObjectLookupCriteria, AdaptablePredicateDef, AdaptableScope, DateFormatterOptions, NumberFormatterOptions } from '../../../types';
9
9
  import { FormatColumnInternalApi } from '../Internal/FormatColumnInternalApi';
@@ -57,17 +57,17 @@ export declare class FormatColumnApiImpl extends ApiBase implements FormatColumn
57
57
  getFormatColumnsWithAllScope(formatColumns: FormatColumn[]): FormatColumn[] | undefined;
58
58
  getFormatColumnsWithDataTypeScope(formatColumns: FormatColumn[]): FormatColumn[] | undefined;
59
59
  getFormatColumnsWithColumnScope(formatColumns: FormatColumn[]): FormatColumn[] | undefined;
60
- getNumberFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: NumberFormatterOptions): string;
61
- getStringFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: StringFormatterOptions): string;
62
- getDateFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: DateFormatterOptions): string;
60
+ getNumberFormattedValue(value: any, node: IRowNode, abColumn: AdaptableColumn, options: NumberFormatterOptions): string;
61
+ getStringFormattedValue(value: any, node: IRowNode, abColumn: AdaptableColumn, options: StringFormatterOptions): string;
62
+ getDateFormattedValue(value: any, node: IRowNode, abColumn: AdaptableColumn, options: DateFormatterOptions): string;
63
63
  hasCustomDisplayFormatter(formatColumn: FormatColumn): boolean;
64
64
  getFormatColumnDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
65
65
  getFormatColumnsRelevantForColumn(formatColumns: FormatColumn[], column: AdaptableColumn, params: {
66
- node: RowNode;
66
+ node: IRowNode;
67
67
  value: any;
68
68
  }): FormatColumn[];
69
69
  isFormatColumnRelevantForColumn(formatColumn: FormatColumn, column: AdaptableColumn, params: {
70
- node: RowNode;
70
+ node: IRowNode;
71
71
  value: any;
72
72
  }): boolean;
73
73
  getFormatColumnsWithExpression(): FormatColumn[] | undefined;
@@ -2,7 +2,7 @@ import { ApiBase } from './ApiBase';
2
2
  import { FreeTextColumnApi } from '../FreeTextColumnApi';
3
3
  import { FreeTextColumn, FreeTextColumnState, FreeTextStoredValue } from '../../PredefinedConfig/FreeTextColumnState';
4
4
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
5
- import { RowNode } from '@ag-grid-community/core';
5
+ import { IRowNode } from '@ag-grid-community/core';
6
6
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
7
7
  import { FreeTextColumnInternalApi } from '../Internal/FreeTextColumnInternalApi';
8
8
  export declare class FreeTextColumnApiImpl extends ApiBase implements FreeTextColumnApi {
@@ -22,8 +22,8 @@ export declare class FreeTextColumnApiImpl extends ApiBase implements FreeTextCo
22
22
  deleteFreeTextColumn(columnId: string): void;
23
23
  showFreeTextColumnPopup(): void;
24
24
  openFreeTextColumnSettingsPanel(): void;
25
- getFreeTextColumnValueFromRowNode(freeTextColumn: FreeTextColumn, rowNode: RowNode): any;
26
- getFreeTextColumnValueForRowNode(freeTextColumn: FreeTextColumn, rowNode: RowNode): any;
25
+ getFreeTextColumnValueFromRowNode(freeTextColumn: FreeTextColumn, rowNode: IRowNode): any;
26
+ getFreeTextColumnValueForRowNode(freeTextColumn: FreeTextColumn, rowNode: IRowNode): any;
27
27
  checkFreeTextColumnForDataChange(cellDataChangedInfo: CellDataChangedInfo): void;
28
28
  getFreeTextColumnModuleReferences(freeTextColumn: FreeTextColumn): string[];
29
29
  }
@@ -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 { GridOptions, RowNode } from '@ag-grid-community/core';
11
+ import { GridOptions, IRowNode } from '@ag-grid-community/core';
12
12
  import { GridCellRange } from '../../PredefinedConfig/Selection/GridCellRange';
13
13
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
14
14
  import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
@@ -24,10 +24,10 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
24
24
  getGridData(): any[];
25
25
  getFilteredData(): any[];
26
26
  loadGridData(dataSource: any): void;
27
- updateGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
28
- addGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode<any>[]>;
27
+ updateGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
28
+ addGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode<any>[]>;
29
29
  undoCellEdit(cellDataChangedInfo: CellDataChangedInfo): boolean;
30
- deleteGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<RowNode[]>;
30
+ deleteGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
31
31
  setCellValue(columnId: string, newValue: any, primaryKeyValue: any): void;
32
32
  setCellsValue(gridCells: {
33
33
  columnId: any;
@@ -56,34 +56,34 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
56
56
  private clearColumnSorts;
57
57
  selectRow(primaryKeyValue: any, clearSelection: boolean): void;
58
58
  selectRows(primaryKeyValues: any[], clearSelection: boolean): void;
59
- selectNode(rowNode: RowNode, clearSelection: boolean): void;
60
- selectNodes(rowNodes: RowNode[], clearSelection: boolean): void;
59
+ selectNode(rowNode: IRowNode, clearSelection: boolean): void;
60
+ selectNodes(rowNodes: IRowNode[], clearSelection: boolean): void;
61
61
  deSelectRow(primaryKeyValue: any, clearSelection: boolean): void;
62
62
  deSelectRows(primaryKeyValues: any[], clearSelection: boolean): void;
63
- deSelectNode(rowNode: RowNode, clearSelection: boolean): void;
64
- deSelectNodes(rowNodes: RowNode[], clearSelection: boolean): void;
63
+ deSelectNode(rowNode: IRowNode, clearSelection: boolean): void;
64
+ deSelectNodes(rowNodes: IRowNode[], clearSelection: boolean): void;
65
65
  private getSelectionStartEndNodes;
66
66
  selectCellRange(gridCellRange: GridCellRange, clearSelection?: boolean): void;
67
67
  selectCellRangeByQuery(query: string, gridCellRange?: GridCellRange, clearSelection?: boolean): void;
68
68
  selectColumn(columnId: string): void;
69
69
  selectColumns(columnIds: string[]): void;
70
- getFirstRowNode(): RowNode;
71
- getFirstDisplayedRowNode(): RowNode;
72
- getVisibleRowNodes(): RowNode[];
70
+ getFirstRowNode(): IRowNode;
71
+ getFirstDisplayedRowNode(): IRowNode;
72
+ getVisibleRowNodes(): IRowNode[];
73
73
  getAllRowNodes(config: {
74
74
  includeGroupRows?: boolean;
75
- filterFn?: (rowNode: RowNode) => boolean;
76
- }): RowNode[];
77
- getGridCellFromRowNode(rowNode: RowNode, columnId: string): GridCell | undefined;
78
- getRawValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
79
- getDisplayValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
80
- getDisplayValueFromRawValue(rowNode: RowNode, columnId: string, rawValue: any): string | undefined;
81
- getNormalisedValueFromRowNode(rowNode: RowNode, columnId: string): any | undefined;
82
- getRowNodesForPrimaryKeys(primaryKeyValues: any[]): RowNode[];
83
- getRowNodeForPrimaryKey(primaryKeyValue: any): RowNode;
84
- getPrimaryKeyValueForRowNode(rowNode: RowNode): any;
85
- getRowNodeForIndex(index: number): RowNode<any>;
86
- getPrimaryKeyValuesForRowNodes(rowNodes: RowNode[]): any[];
75
+ filterFn?: (rowNode: IRowNode) => boolean;
76
+ }): IRowNode[];
77
+ getGridCellFromRowNode(rowNode: IRowNode, columnId: string): GridCell | undefined;
78
+ getRawValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
79
+ getDisplayValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
80
+ getDisplayValueFromRawValue(rowNode: IRowNode, columnId: string, rawValue: any): string | undefined;
81
+ getNormalisedValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
82
+ getRowNodesForPrimaryKeys(primaryKeyValues: any[]): IRowNode[];
83
+ getRowNodeForPrimaryKey(primaryKeyValue: any): IRowNode;
84
+ getPrimaryKeyValueForRowNode(rowNode: IRowNode): any;
85
+ getRowNodeForIndex(index: number): IRowNode<any>;
86
+ getPrimaryKeyValuesForRowNodes(rowNodes: IRowNode[]): any[];
87
87
  setRowGroupColumns(columnIds: string[]): void;
88
88
  clearRowGroupColumns(): void;
89
89
  expandAllRowGroups(): void;
@@ -95,12 +95,12 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
95
95
  isGridGroupable(): boolean;
96
96
  isGridSelectable(): boolean;
97
97
  isGridRowGrouped(): boolean;
98
- isGroupRowNode(rowNode: RowNode): boolean;
98
+ isGroupRowNode(rowNode: IRowNode): boolean;
99
99
  isQuickFilterAvailable(): boolean;
100
100
  redrawGrid(): void;
101
101
  fireGridSortedEvent(): void;
102
102
  fireCellChangedEvent(cellDataChangedInfo: CellDataChangedInfo): void;
103
- fireGridDataChangedEvent(dataRows: any[], rowNodes: RowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
103
+ fireGridDataChangedEvent(dataRows: any[], rowNodes: IRowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
104
104
  jumpToRow(primaryKeyValue: any): void;
105
105
  jumpToColumn(columnId: string): void;
106
106
  jumpToCell(primaryKeyValue: any, columnId: string): void;
@@ -112,16 +112,16 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
112
112
  unHighlightRow(primaryKeyValue: RowHighlightInfo['primaryKeyValue']): void;
113
113
  unHighlightRows(primaryKeyValues: RowsHighlightInfo['primaryKeyValues']): void;
114
114
  unHighlightAllRows(): void;
115
- refreshCells(rowNodes: RowNode[], columnIds: string[]): void;
115
+ refreshCells(rowNodes: IRowNode[], columnIds: string[]): void;
116
116
  refreshRowByPrimaryKey(primaryKey: any): void;
117
- refreshRowNode(rowNode: RowNode): void;
118
- refreshRowNodes(rowNodes: RowNode[]): void;
117
+ refreshRowNode(rowNode: IRowNode): void;
118
+ refreshRowNodes(rowNodes: IRowNode[]): void;
119
119
  isCellEditable(gridCell: GridCell): boolean;
120
120
  areCellsEditable(gridCells: GridCell[]): boolean;
121
121
  isEveryCellEditable(gridCells: GridCell[]): boolean;
122
122
  getRowCount(): number;
123
123
  getVisibleRowCount(): number;
124
- getRowsInViewport(): RowNode[];
124
+ getRowsInViewport(): IRowNode[];
125
125
  getColumnCount(): number;
126
126
  getVisibleColumnCount(): number;
127
127
  getEntitlementAccessLevelForModule(adaptableModule: AdaptableModule): AccessLevel;
@@ -29,4 +29,6 @@ export declare class StyledColumnApiImpl extends ApiBase implements StyledColumn
29
29
  hasPercentBarStyle(columnId: string): boolean;
30
30
  hasGradientStyle(columnId: string): boolean;
31
31
  canDisplaySparklines(): boolean;
32
+ suspendStyledColumn(styledColumn: StyledColumn): void;
33
+ unSuspendStyledColumn(styledColumn: StyledColumn): void;
32
34
  }
@@ -101,5 +101,11 @@ class StyledColumnApiImpl extends ApiBase_1.ApiBase {
101
101
  canDisplaySparklines() {
102
102
  return this.adaptable.canDisplaySparklines();
103
103
  }
104
+ suspendStyledColumn(styledColumn) {
105
+ this.dispatchAction(StyledColumnRedux.StyledColumnSuspend(styledColumn));
106
+ }
107
+ unSuspendStyledColumn(styledColumn) {
108
+ this.dispatchAction(StyledColumnRedux.StyledColumnUnSuspend(styledColumn));
109
+ }
104
110
  }
105
111
  exports.StyledColumnApiImpl = StyledColumnApiImpl;
@@ -6,6 +6,7 @@ const ThemeRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/The
6
6
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
7
7
  const ApiBase_1 = require("./ApiBase");
8
8
  const logDeprecation_1 = require("../../Utilities/logDeprecation");
9
+ const themes_1 = require("../../themes");
9
10
  class ThemeApiImpl extends ApiBase_1.ApiBase {
10
11
  getThemeState() {
11
12
  return this.getAdaptableState().Theme;
@@ -36,10 +37,12 @@ class ThemeApiImpl extends ApiBase_1.ApiBase {
36
37
  var _a;
37
38
  const themes = (_a = this.getAdaptableState().Theme.SystemThemes) !== null && _a !== void 0 ? _a : [];
38
39
  return themes.map((theme) => {
40
+ var _a, _b;
39
41
  if (typeof theme === 'string') {
42
+ const description = (_b = (_a = themes_1.StaticThemes.find((staticTheme) => staticTheme.Name === theme)) === null || _a === void 0 ? void 0 : _a.Description) !== null && _b !== void 0 ? _b : theme;
40
43
  return {
41
44
  Name: theme,
42
- Description: theme,
45
+ Description: description,
43
46
  };
44
47
  }
45
48
  return theme;
@@ -1,10 +1,10 @@
1
- import { RowNode } from '@ag-grid-community/core';
1
+ import { IRowNode } from '@ag-grid-community/core';
2
2
  import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
3
3
  import { CreateActionRowFormContext, EditActionRowFormContext } from '../../AdaptableOptions/ActionOptions';
4
4
  import { ApiBase } from '../Implementation/ApiBase';
5
5
  export declare class ActionInternalApi extends ApiBase {
6
- buildRowEditForm(rowNode: RowNode): AdaptableForm<EditActionRowFormContext>;
7
- buildRowCreateForm(clonedRowNode?: RowNode): AdaptableForm<CreateActionRowFormContext>;
6
+ buildRowEditForm(rowNode: IRowNode): AdaptableForm<EditActionRowFormContext>;
7
+ buildRowCreateForm(clonedRowNode?: IRowNode): AdaptableForm<CreateActionRowFormContext>;
8
8
  private get actionRowFormOptions();
9
9
  private get adaptableInstance();
10
10
  private buildActionRow;
@@ -17,7 +17,7 @@ import { IDataService } from '../../Utilities/Services/Interface/IDataService';
17
17
  import { IEntitlementService } from '../../Utilities/Services/Interface/IEntitlementService';
18
18
  import { IQueryLanguageService } from '../../Utilities/Services/Interface/IQueryLanguageService';
19
19
  import { IAlertService } from '../../Utilities/Services/Interface/IAlertService';
20
- import { RowNode } from '@ag-grid-community/core';
20
+ import { IRowNode } from '@ag-grid-community/core';
21
21
  import { ITeamSharingService } from '../../Utilities/Services/Interface/ITeamSharingService';
22
22
  import { ButtonStyle } from '../../PredefinedConfig/Common/ButtonStyle';
23
23
  import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
@@ -77,8 +77,8 @@ export declare class AdaptableInternalApi extends ApiBase {
77
77
  getRowEditService(): IRowEditService;
78
78
  getModules(): IModuleCollection;
79
79
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
80
- forAllRowNodesDo(func: (rowNode: RowNode) => void): void;
81
- forAllVisibleRowNodesDo(func: (rowNode: RowNode) => void): void;
80
+ forAllRowNodesDo(func: (rowNode: IRowNode) => void): void;
81
+ forAllVisibleRowNodesDo(func: (rowNode: IRowNode) => void): void;
82
82
  getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
83
83
  getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
84
84
  getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
@@ -10,7 +10,7 @@ import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePr
10
10
  import { AdaptableMessageType } from '../../PredefinedConfig/Common/AdaptableMessageType';
11
11
  import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
12
12
  import { ButtonStyle } from '../../PredefinedConfig/Common/ButtonStyle';
13
- import { RowNode } from '@ag-grid-community/core';
13
+ import { IRowNode } from '@ag-grid-community/core';
14
14
  export declare class AlertInternalApi extends ApiBase {
15
15
  /**
16
16
  * Retrieves the Adaptable Form with the given name
@@ -136,8 +136,8 @@ export declare class AlertInternalApi extends ApiBase {
136
136
  getAdaptableAlerts(): AdaptableAlert[];
137
137
  getAdaptableCellChangedAlerts(): AdaptableCellChangedAlert[];
138
138
  getAdaptableRowChangedAlerts(): AdaptableRowChangedAlert[];
139
- getAdaptableAlertWithHighlightCell(columnId: string, rowNode: RowNode): AdaptableAlert | undefined;
140
- getAdaptableAlertWithHighlightRow(rowNode: RowNode): AdaptableAlert | undefined;
139
+ getAdaptableAlertWithHighlightCell(columnId: string, rowNode: IRowNode): AdaptableAlert | undefined;
140
+ getAdaptableAlertWithHighlightRow(rowNode: IRowNode): AdaptableAlert | undefined;
141
141
  isAlertDefinitionForAddedRowChangeEvent(alertDefinition: AlertDefinition): boolean;
142
142
  isAlertDefinitionForRemovedRowChangeEvent(alertDefinition: AlertDefinition): boolean;
143
143
  getAlertDefinitionsForCellDataChange(dataChangedEvent: CellDataChangedInfo): AlertDefinition[];
@@ -5,4 +5,5 @@ export declare class DashboardInternalApi extends ApiBase {
5
5
  * Fires Dashboard Changed Event
6
6
  */
7
7
  fireDashboardChangedEvent(trigger: string, oldDashboardState: DashboardState, newDashboardState: DashboardState): void;
8
+ isToolbarInActiveTab(toolbarName: string, dashboardState: DashboardState): boolean;
8
9
  }
@@ -9,18 +9,43 @@ class DashboardInternalApi extends ApiBase_1.ApiBase {
9
9
  * Fires Dashboard Changed Event
10
10
  */
11
11
  fireDashboardChangedEvent(trigger, oldDashboardState, newDashboardState) {
12
- // it's called synchronously by DASHBOARD_SET_ACTIVE_TAB & DASHBOARD_SET_IS_COLLAPSED,
13
- // both firing the same events, thus this function being called twice;
14
- // so we debounced to only get the latest call
12
+ const isToolbarStateChangedToVisible = (toolbarName) => {
13
+ const visibleInNewState = this.isToolbarInActiveTab(toolbarName, newDashboardState);
14
+ const visibleInOldState = this.isToolbarInActiveTab(toolbarName, oldDashboardState);
15
+ return visibleInNewState && !visibleInOldState;
16
+ };
17
+ const isToolbarStateChangedToHidden = (toolbarName) => {
18
+ const visibleInNewState = this.isToolbarInActiveTab(toolbarName, newDashboardState);
19
+ const visibleInOldState = this.isToolbarInActiveTab(toolbarName, oldDashboardState);
20
+ return visibleInOldState && !visibleInNewState;
21
+ };
15
22
  const dashboardChangedInfo = {
16
23
  adaptableApi: this.adaptable.api,
17
24
  actionName: trigger,
18
25
  oldDashboardState,
19
26
  newDashboardState,
27
+ isToolbarStateChangedToVisible,
28
+ isToolbarStateChangedToHidden,
20
29
  };
21
30
  if (!(0, isEqual_1.default)(oldDashboardState, newDashboardState)) {
22
31
  this.adaptable.api.eventApi.emitSync('DashboardChanged', dashboardChangedInfo);
23
32
  }
24
33
  }
34
+ isToolbarInActiveTab(toolbarName, dashboardState) {
35
+ var _a;
36
+ if (!dashboardState) {
37
+ return false;
38
+ }
39
+ const tabIndex = dashboardState.ActiveTabIndex;
40
+ if (tabIndex != undefined) {
41
+ if ((dashboardState === null || dashboardState === void 0 ? void 0 : dashboardState.Tabs) && ((_a = dashboardState === null || dashboardState === void 0 ? void 0 : dashboardState.Tabs) === null || _a === void 0 ? void 0 : _a.length) > 0) {
42
+ const newTab = dashboardState === null || dashboardState === void 0 ? void 0 : dashboardState.Tabs[tabIndex];
43
+ if (newTab && newTab.Toolbars) {
44
+ return newTab.Toolbars.find((c) => c == toolbarName) != undefined;
45
+ }
46
+ }
47
+ }
48
+ return false;
49
+ }
25
50
  }
26
51
  exports.DashboardInternalApi = DashboardInternalApi;
@@ -16,4 +16,5 @@ export declare class ExportInternalApi extends ApiBase {
16
16
  isVisualDataExportInProgress(): boolean;
17
17
  isDateCellExportedAsFormattedValue(): boolean;
18
18
  getCellExportFormatType(columnDataType: AdaptableColumnDataType): DataFormatType;
19
+ isDestinationEnabled(destination: string): boolean;
19
20
  }