@adaptabletools/adaptable 18.0.0-canary.3 → 18.0.0-canary.5

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 (206) hide show
  1. package/agGrid.d.ts +4 -21
  2. package/agGrid.js +9 -26
  3. package/base.css +4 -1
  4. package/base.css.map +1 -1
  5. package/index.css +79 -68
  6. package/index.css.map +1 -1
  7. package/package.json +3 -4
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +55 -109
  9. package/src/AdaptableOptions/AdaptableOptions.d.ts +11 -5
  10. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
  11. package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
  12. package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
  13. package/src/AdaptableOptions/MenuOptions.js +1 -5
  14. package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +1 -1
  15. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
  16. package/src/Api/AdaptableApi.d.ts +5 -0
  17. package/src/Api/BulkUpdateApi.d.ts +0 -5
  18. package/src/Api/Events/AdaptableReady.d.ts +3 -3
  19. package/src/Api/Events/GridDataChanged.d.ts +4 -4
  20. package/src/Api/GridApi.d.ts +14 -13
  21. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
  22. package/src/Api/Implementation/ActionColumnApiImpl.js +33 -0
  23. package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -0
  24. package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
  25. package/src/Api/Implementation/ApiBase.d.ts +2 -1
  26. package/src/Api/Implementation/ApiBase.js +4 -1
  27. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
  28. package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
  29. package/src/Api/Implementation/CommentsApiImpl.js +2 -1
  30. package/src/Api/Implementation/ConfigApiImpl.js +8 -3
  31. package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
  32. package/src/Api/Implementation/GridApiImpl.js +20 -14
  33. package/src/Api/Implementation/LayoutApiImpl.d.ts +4 -0
  34. package/src/Api/Implementation/LayoutApiImpl.js +14 -0
  35. package/src/Api/Implementation/NotesApiImpl.d.ts +2 -4
  36. package/src/Api/Implementation/NotesApiImpl.js +4 -8
  37. package/src/Api/Implementation/OptionsApiImpl.d.ts +1 -1
  38. package/src/Api/Implementation/OptionsApiImpl.js +2 -2
  39. package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
  40. package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
  41. package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
  42. package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
  43. package/src/Api/Internal/ActionRowInternalApi.js +106 -0
  44. package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
  45. package/src/Api/Internal/AdaptableInternalApi.js +10 -8
  46. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  47. package/src/Api/Internal/CalculatedColumnInternalApi.js +70 -0
  48. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
  49. package/src/Api/Internal/ColumnFilterInternalApi.js +11 -1
  50. package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
  51. package/src/Api/Internal/ColumnInternalApi.js +12 -0
  52. package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
  53. package/src/Api/Internal/CustomSortInternalApi.js +32 -1
  54. package/src/Api/Internal/DataSetInternalApi.js +1 -1
  55. package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
  56. package/src/Api/Internal/FreeTextColumnInternalApi.js +59 -0
  57. package/src/Api/Internal/GridFilterInternalApi.js +1 -1
  58. package/src/Api/Internal/GridInternalApi.d.ts +21 -3
  59. package/src/Api/Internal/GridInternalApi.js +126 -7
  60. package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
  61. package/src/Api/InteropioPluginApi.d.ts +2 -2
  62. package/src/Api/LayoutApi.d.ts +8 -0
  63. package/src/Api/OptionsApi.d.ts +1 -1
  64. package/src/EnvVars.d.ts +3 -0
  65. package/src/EnvVars.js +4 -0
  66. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
  67. package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
  68. package/src/PredefinedConfig/NotesState.d.ts +10 -20
  69. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
  70. package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
  71. package/src/Redux/ActionsReducers/NotesRedux.js +8 -7
  72. package/src/Redux/Store/AdaptableStore.d.ts +4 -6
  73. package/src/Redux/Store/AdaptableStore.js +22 -50
  74. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +7 -1
  75. package/src/Strategy/AdaptableModuleBase.d.ts +2 -3
  76. package/src/Strategy/AdaptableModuleBase.js +4 -7
  77. package/src/Strategy/AlertModule.d.ts +1 -2
  78. package/src/Strategy/AlertModule.js +2 -55
  79. package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
  80. package/src/Strategy/CalculatedColumnModule.js +5 -25
  81. package/src/Strategy/ChartingModule.d.ts +0 -1
  82. package/src/Strategy/ChartingModule.js +2 -22
  83. package/src/Strategy/ColumnFilterModule.d.ts +1 -2
  84. package/src/Strategy/ColumnFilterModule.js +1 -64
  85. package/src/Strategy/CommentsModule.d.ts +1 -0
  86. package/src/Strategy/CommentsModule.js +2 -1
  87. package/src/Strategy/CustomSortModule.js +1 -1
  88. package/src/Strategy/DashboardModule.d.ts +1 -2
  89. package/src/Strategy/DashboardModule.js +1 -8
  90. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  91. package/src/Strategy/DataChangeHistoryModule.js +3 -1
  92. package/src/Strategy/DataSetModule.d.ts +1 -1
  93. package/src/Strategy/DataSetModule.js +1 -1
  94. package/src/Strategy/FlashingCellModule.d.ts +1 -2
  95. package/src/Strategy/FlashingCellModule.js +2 -15
  96. package/src/Strategy/FormatColumnModule.d.ts +0 -2
  97. package/src/Strategy/FormatColumnModule.js +0 -47
  98. package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
  99. package/src/Strategy/FreeTextColumnModule.js +0 -30
  100. package/src/Strategy/GridFilterModule.d.ts +0 -1
  101. package/src/Strategy/GridFilterModule.js +0 -37
  102. package/src/Strategy/Interface/IModule.d.ts +0 -1
  103. package/src/Strategy/LayoutModule.d.ts +1 -3
  104. package/src/Strategy/LayoutModule.js +6 -50
  105. package/src/Strategy/NamedQueryModule.d.ts +0 -1
  106. package/src/Strategy/NamedQueryModule.js +0 -19
  107. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  108. package/src/Strategy/PlusMinusModule.js +1 -1
  109. package/src/Strategy/ScheduleModule.d.ts +1 -1
  110. package/src/Strategy/ScheduleModule.js +1 -1
  111. package/src/Strategy/ShortcutModule.d.ts +1 -1
  112. package/src/Strategy/ShortcutModule.js +1 -1
  113. package/src/Strategy/StyledColumnModule.d.ts +0 -1
  114. package/src/Strategy/StyledColumnModule.js +0 -21
  115. package/src/Strategy/TeamSharingModule.d.ts +1 -0
  116. package/src/Strategy/TeamSharingModule.js +5 -5
  117. package/src/Strategy/ToolPanelModule.d.ts +0 -1
  118. package/src/Strategy/ToolPanelModule.js +0 -23
  119. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  120. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  121. package/src/Utilities/Constants/GeneralConstants.js +1 -0
  122. package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
  123. package/src/Utilities/Helpers/AdaptableHelper.d.ts +0 -3
  124. package/src/Utilities/Helpers/AdaptableHelper.js +0 -58
  125. package/src/Utilities/Helpers/Helper.d.ts +2 -0
  126. package/src/Utilities/Helpers/Helper.js +4 -0
  127. package/src/Utilities/Services/AggregatedScalarLiveValue.js +3 -1
  128. package/src/Utilities/Services/CellPopupService.js +0 -1
  129. package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
  130. package/src/Utilities/Services/LicenseService/index.js +10 -3
  131. package/src/Utilities/Services/MetamodelService.d.ts +1 -1
  132. package/src/Utilities/Services/MetamodelService.js +6 -3
  133. package/src/Utilities/Services/RowEditService.d.ts +3 -2
  134. package/src/Utilities/Services/RowEditService.js +3 -1
  135. package/src/View/AdaptableView.js +0 -2
  136. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
  137. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  138. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  139. package/src/View/CellSummary/CellSummaryPopup.js +1 -1
  140. package/src/View/Comments/CommentsPopup.js +12 -8
  141. package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
  142. package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
  143. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
  144. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  145. package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
  146. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  147. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  148. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  149. package/src/View/GridFilter/GridFilterViewPanel.js +6 -2
  150. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
  151. package/src/View/Layout/TransposedPopup.d.ts +3 -0
  152. package/src/View/Layout/TransposedPopup.js +193 -0
  153. package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
  154. package/src/View/Notes/NotesPopup.js +9 -11
  155. package/src/View/Theme/ThemeSelector.js +3 -3
  156. package/src/agGrid/ActionColumnRenderer.js +4 -4
  157. package/src/agGrid/Adaptable.d.ts +3 -455
  158. package/src/agGrid/Adaptable.js +8 -5292
  159. package/src/agGrid/AdaptableAgGrid.d.ts +336 -0
  160. package/src/agGrid/AdaptableAgGrid.js +3780 -0
  161. package/src/agGrid/AdaptableLogger.js +77 -11
  162. package/src/agGrid/AgGridAdapter.d.ts +54 -0
  163. package/src/agGrid/AgGridAdapter.js +549 -0
  164. package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
  165. package/src/agGrid/AgGridColumnAdapter.js +813 -0
  166. package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
  167. package/src/agGrid/AgGridMenuAdapter.js +271 -0
  168. package/src/agGrid/AgGridOptionsService.d.ts +11 -0
  169. package/src/agGrid/AgGridOptionsService.js +50 -0
  170. package/src/agGrid/BadgeRenderer.js +1 -1
  171. package/src/agGrid/CheckboxRenderer.js +1 -1
  172. package/src/agGrid/FilterWrapper.d.ts +2 -2
  173. package/src/agGrid/FilterWrapper.js +1 -1
  174. package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
  175. package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
  176. package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +70 -9
  177. package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
  178. package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
  179. package/src/components/Datepicker/index.d.ts +1 -1
  180. package/src/components/InfiniteTable/index.js +2 -2
  181. package/src/components/Modal/index.d.ts +1 -0
  182. package/src/components/Modal/index.js +4 -3
  183. package/src/components/Select/Select.d.ts +2 -0
  184. package/src/components/Select/Select.js +2 -2
  185. package/src/env.js +2 -2
  186. package/src/metamodel/adaptable.metamodel.d.ts +39 -11
  187. package/src/metamodel/adaptable.metamodel.js +73 -32
  188. package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
  189. package/src/migration/AdaptableUpgradeHelper.js +48 -0
  190. package/src/migration/VersionUpgrade.d.ts +8 -0
  191. package/src/migration/VersionUpgrade.js +11 -0
  192. package/src/migration/VersionUpgrade17.d.ts +18 -0
  193. package/src/migration/VersionUpgrade17.js +342 -0
  194. package/src/migration/VersionUpgrade18.d.ts +5 -0
  195. package/src/migration/VersionUpgrade18.js +6 -0
  196. package/src/types.d.ts +7 -3
  197. package/tsconfig.esm.tsbuildinfo +1 -1
  198. package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
  199. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
  200. package/src/Utilities/Services/Interface/IRowEditService.js +0 -1
  201. package/src/agGrid/agGridHelper.d.ts +0 -57
  202. package/src/agGrid/agGridHelper.js +0 -686
  203. package/src/agGrid/agGridMenuHelper.d.ts +0 -46
  204. package/src/agGrid/agGridMenuHelper.js +0 -668
  205. /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
  206. /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { Action } from 'redux';
2
- import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
2
+ import { AdaptableVariant, IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
3
3
  import { AdaptableState } from '../../PredefinedConfig/AdaptableState';
4
4
  import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
5
5
  import { AdaptableObject } from '../../PredefinedConfig/Common/AdaptableObject';
@@ -20,6 +20,7 @@ export declare abstract class ApiBase {
20
20
  protected logSuccess(message: string, ...optionalParams: any[]): void;
21
21
  protected logWarn(message: string, ...optionalParams: any[]): void;
22
22
  protected logError(message: string, ...optionalParams: any[]): void;
23
+ protected getAdaptableVariant(): AdaptableVariant;
23
24
  /**
24
25
  * Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined
25
26
  *
@@ -21,6 +21,9 @@ export class ApiBase {
21
21
  logError(message, ...optionalParams) {
22
22
  this.adaptable.logger.error(message, ...optionalParams);
23
23
  }
24
+ getAdaptableVariant() {
25
+ return this.adaptable.variant;
26
+ }
24
27
  /**
25
28
  * Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined
26
29
  *
@@ -99,7 +102,7 @@ export class ApiBase {
99
102
  return this.getOptions().columnOptions;
100
103
  }
101
104
  getNotesOptions() {
102
- return this.getOptions().notesOptions;
105
+ return this.getOptions().noteOptions;
103
106
  }
104
107
  getCustomSortOptions() {
105
108
  return this.getOptions().customSortOptions;
@@ -6,5 +6,4 @@ export declare class BulkUpdateApiImpl extends ApiBase implements BulkUpdateApi
6
6
  openBulkUpdateSettingsPanel(): void;
7
7
  showBulkUpdatePopup(): void;
8
8
  applyBulkUpdate(cellUpdateRequests: CellUpdateRequest[]): void;
9
- setBulkUpdateValue(bulkUpdateValue: string): void;
10
9
  }
@@ -1,7 +1,6 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
3
3
  import * as BulkUpdateRedux from '../../Redux/ActionsReducers/BulkUpdateRedux';
4
- import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
5
4
  export class BulkUpdateApiImpl extends ApiBase {
6
5
  getBulkUpdateValue() {
7
6
  return this.getAdaptableState().System.BulkUpdateValue;
@@ -15,7 +14,4 @@ export class BulkUpdateApiImpl extends ApiBase {
15
14
  applyBulkUpdate(cellUpdateRequests) {
16
15
  this.dispatchAction(BulkUpdateRedux.BulkUpdateApply(cellUpdateRequests));
17
16
  }
18
- setBulkUpdateValue(bulkUpdateValue) {
19
- this.dispatchAction(SystemRedux.BulkUpdateChangeValue(bulkUpdateValue));
20
- }
21
17
  }
@@ -10,7 +10,8 @@ export class CommentsApiImpl extends ApiBase {
10
10
  return CommentRedux.GetCellCommentSelector(this.getAdaptableState().Comment, address);
11
11
  }
12
12
  getCommentThreads() {
13
- return this.getAdaptableState().Comment.CommentThreads;
13
+ var _a;
14
+ return (_a = this.getAdaptableState().Comment.CommentThreads) !== null && _a !== void 0 ? _a : [];
14
15
  }
15
16
  editComment(comment, address) {
16
17
  this.dispatchAction(CommentRedux.CommentsEdit({ comment, cellAddress: address }));
@@ -117,7 +117,6 @@ export class ConfigApiImpl extends ApiBase {
117
117
  setAdaptableStateKey(adaptableStateKey, config) {
118
118
  return new Promise((resolve, reject) => {
119
119
  this.adaptable.api.internalApi.executeWithProgressIndicator(`Initialising...`, () => {
120
- this.adaptable.adaptableOptions.adaptableStateKey = adaptableStateKey;
121
120
  const flushCurrentState = !config || config.flushCurrentState !== false;
122
121
  // make sure we persist any "pending" changes to state - since stateOptions.debounceStateDelay can cause
123
122
  // the state to be persisted with a delay, which we dont want in this case
@@ -125,14 +124,20 @@ export class ConfigApiImpl extends ApiBase {
125
124
  ? this.adaptable.adaptableStore.saveStateNow(this.adaptable)
126
125
  : Promise.resolve(true);
127
126
  flushStatePromise.then(() => {
127
+ this.adaptable.adaptableOptions.adaptableStateKey = adaptableStateKey;
128
128
  let predefinedConfig = config === null || config === void 0 ? void 0 : config.predefinedConfig;
129
129
  if (predefinedConfig) {
130
130
  predefinedConfig = initPredefinedConfigWithUuids(predefinedConfig);
131
131
  }
132
- const promise = this.adaptable.adaptableStore.loadStore(this.adaptable, adaptableStateKey, predefinedConfig);
132
+ const promise = this.adaptable.adaptableStore.loadStore({
133
+ adaptable: this.adaptable,
134
+ adaptableStateKey,
135
+ predefinedConfig,
136
+ });
133
137
  promise
134
138
  .then(() => {
135
- this.adaptable.prepareGrid();
139
+ this.adaptable.updateColumnModelAndRefreshGrid();
140
+ this.adaptable.setLayout();
136
141
  this.adaptable.api.userInterfaceApi.hideLoadingScreen();
137
142
  })
138
143
  .then(() => {
@@ -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, IRowNode, RowModelType } from '@ag-grid-community/core';
11
+ import { 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';
@@ -18,6 +18,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
18
18
  internalApi: GridInternalApi;
19
19
  constructor(adaptable: IAdaptable);
20
20
  getGridState(): GridState;
21
+ loadGridData(dataSource: any): void;
21
22
  resetGridData(dataSource: any[]): void;
22
23
  setInitialGridData(data: any): void;
23
24
  getGridData(): any[];
@@ -40,7 +41,6 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
40
41
  hideFilterForm(): void;
41
42
  applyGridFiltering(): void;
42
43
  clearGridFiltering(): void;
43
- getAgGridInstance(): GridOptions;
44
44
  getColumnSorts(): ColumnSort[];
45
45
  getColumnSortForColumn(columnId: string): ColumnSort | undefined;
46
46
  setAdaptableSorting(columnSorts: ColumnSort[]): void;
@@ -120,7 +120,6 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
120
120
  isCellEditable(gridCell: GridCell): boolean;
121
121
  isEveryCellEditable(gridCells: GridCell[]): boolean;
122
122
  getRowCount(): number;
123
- getVisibleRowCount(): number;
124
123
  getRowsInViewport(): IRowNode[];
125
124
  getColumnCount(): number;
126
125
  getVisibleColumnCount(): number;
@@ -130,4 +129,5 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
130
129
  getGridContainerElement(): HTMLElement | null;
131
130
  openGridInfoSettingsPanel(): void;
132
131
  getAgGridRowModelType(): RowModelType;
132
+ getVisibleRowCount(): number;
133
133
  }
@@ -4,6 +4,7 @@ import { SystemHighlightCellAdd, SystemHighlightCellDelete, SystemHighlightCellD
4
4
  import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
5
5
  import { GridInternalApi } from '../Internal/GridInternalApi';
6
6
  import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
7
+ import { logDeprecation } from '../../Utilities/logDeprecation';
7
8
  export class GridApiImpl extends ApiBase {
8
9
  constructor(adaptable) {
9
10
  super(adaptable);
@@ -12,13 +13,18 @@ export class GridApiImpl extends ApiBase {
12
13
  getGridState() {
13
14
  return this.getAdaptableState().Grid;
14
15
  }
15
- resetGridData(dataSource) {
16
+ loadGridData(dataSource) {
16
17
  this.adaptable.setGridData(dataSource);
17
18
  const allRowNodes = this.getAllRowNodes();
18
- this.internalApi.fireGridDataChangedEvent(dataSource, allRowNodes, 'Add');
19
+ this.internalApi.fireGridDataChangedEvent(dataSource, allRowNodes, 'Load');
20
+ }
21
+ resetGridData(dataSource) {
22
+ logDeprecation(this.adaptable.logger, 'GridApi', 'resetGridData', 'loadGridData');
23
+ this.loadGridData(dataSource);
19
24
  }
20
25
  setInitialGridData(data) {
21
- this.adaptable.setGridData(data);
26
+ logDeprecation(this.adaptable.logger, 'GridApi', 'setInitialGridData', 'loadGridData');
27
+ this.loadGridData(data);
22
28
  }
23
29
  getGridData() {
24
30
  return this.adaptable.getGridData();
@@ -114,9 +120,6 @@ export class GridApiImpl extends ApiBase {
114
120
  // slightly round the houses but we have to call ColumnFilterAPI as it does it properly
115
121
  this.adaptable.api.columnFilterApi.clearColumnFilters();
116
122
  }
117
- getAgGridInstance() {
118
- return this.adaptable.gridOptions;
119
- }
120
123
  getColumnSorts() {
121
124
  return this.getAdaptableState().Grid.ColumnSorts;
122
125
  }
@@ -271,7 +274,9 @@ export class GridApiImpl extends ApiBase {
271
274
  return this.adaptable.getFirstDisplayedRowNode();
272
275
  }
273
276
  getVisibleRowNodes(config) {
274
- return this.adaptable.getVisibleRowNodes();
277
+ const rowNodes = [];
278
+ this.adaptable.forAllVisibleRowNodesDo((rowNode) => rowNodes.push(rowNode), config);
279
+ return rowNodes;
275
280
  }
276
281
  getAllRowNodes(config) {
277
282
  return this.adaptable.getAllRowNodes(config);
@@ -330,10 +335,10 @@ export class GridApiImpl extends ApiBase {
330
335
  this.adaptable.expandRowGroupsForValues(columnValues);
331
336
  }
332
337
  isGridPivotable() {
333
- return this.adaptable.isGridPivotable();
338
+ return !this.getAdaptableApi().internalApi.isGridInTreeMode();
334
339
  }
335
340
  isGridGroupable() {
336
- return this.adaptable.isGridGroupable();
341
+ return !this.getAdaptableApi().internalApi.isGridInTreeMode();
337
342
  }
338
343
  isGridSelectable() {
339
344
  return this.adaptable.isGridSelectable();
@@ -349,7 +354,7 @@ export class GridApiImpl extends ApiBase {
349
354
  }
350
355
  redrawGrid() {
351
356
  this.adaptable.redrawBody();
352
- this.adaptable.redrawHeader();
357
+ this.adaptable.refreshHeader();
353
358
  }
354
359
  getGridCellsForRawValue(columnId, rawValue) {
355
360
  const gridCells = this.adaptable.getGridCellsForColumn(columnId);
@@ -452,7 +457,7 @@ export class GridApiImpl extends ApiBase {
452
457
  }
453
458
  refreshGroupRowNodes() {
454
459
  // see https://www.ag-grid.com/javascript-data-grid/client-side-row-stages/#refreshing-the-client-side-model
455
- this.getAgGridInstance().api.refreshClientSideRowModel('group');
460
+ this.getAdaptableApi().agGridApi.refreshClientSideRowModel('group');
456
461
  this.adaptable.updateRowGroupsExpandedState();
457
462
  }
458
463
  isCellEditable(gridCell) {
@@ -479,9 +484,6 @@ export class GridApiImpl extends ApiBase {
479
484
  getRowCount() {
480
485
  return this.adaptable.getRowCount();
481
486
  }
482
- getVisibleRowCount() {
483
- return this.adaptable.getVisibleRowCount();
484
- }
485
487
  getRowsInViewport() {
486
488
  return this.adaptable.getRowsInViewport();
487
489
  }
@@ -509,4 +511,8 @@ export class GridApiImpl extends ApiBase {
509
511
  getAgGridRowModelType() {
510
512
  return this.adaptable.getAgGridRowModelType();
511
513
  }
514
+ getVisibleRowCount() {
515
+ logDeprecation(this.adaptable.logger, 'GridApi', 'getVisibleRowCount', 'getRowCount');
516
+ return this.getRowCount();
517
+ }
512
518
  }
@@ -48,4 +48,8 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
48
48
  ColumnFilters: boolean;
49
49
  ColumnSorts: boolean;
50
50
  };
51
+ showTransposePopup(config: {
52
+ transposedColumnId: string;
53
+ hideTransposedColumn?: boolean;
54
+ }): void;
51
55
  }
@@ -9,6 +9,7 @@ import { createUuid } from '../../PredefinedConfig/Uuid';
9
9
  import { DEFAULT_LAYOUT } from '../../Utilities/Constants/GeneralConstants';
10
10
  import { PopupShowPrompt } from '../../Redux/ActionsReducers/PopupRedux';
11
11
  import { LayoutInternalApi } from '../Internal/LayoutInternalApi';
12
+ import { WINDOW_SHOW_TRANSPOSED_VIEW } from '../../View/Components/Popups/WindowPopups/windowFactory';
12
13
  export class LayoutApiImpl extends ApiBase {
13
14
  constructor(adaptable) {
14
15
  super(adaptable);
@@ -236,4 +237,17 @@ export class LayoutApiImpl extends ApiBase {
236
237
  }
237
238
  return layoutSupportedFeatures;
238
239
  }
240
+ showTransposePopup(config) {
241
+ const { transposedColumnId, hideTransposedColumn } = config;
242
+ this.adaptable.api.internalApi.showPopupWindow({
243
+ id: WINDOW_SHOW_TRANSPOSED_VIEW,
244
+ factoryId: WINDOW_SHOW_TRANSPOSED_VIEW,
245
+ title: 'Transpose View',
246
+ icon: 'grid',
247
+ popupProps: {
248
+ transposedColumnId,
249
+ hideTransposedColumn,
250
+ },
251
+ });
252
+ }
239
253
  }
@@ -1,6 +1,7 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { NotesApi } from '../NotesApi';
3
3
  import { AdaptableNote, AdaptableNotes, NotesState } from '../../PredefinedConfig/NotesState';
4
+ import { CellAddress } from '../../PredefinedConfig/CellAddress';
4
5
  export declare class NotesApiImpl extends ApiBase implements NotesApi {
5
6
  addNote(noteStr: string, primaryKeyValue: any, columnId: string): void;
6
7
  editNote(note: AdaptableNote): void;
@@ -8,9 +9,6 @@ export declare class NotesApiImpl extends ApiBase implements NotesApi {
8
9
  deleteNote(note: AdaptableNote): void;
9
10
  getNotesState(): NotesState;
10
11
  getAllNotes(): AdaptableNotes;
11
- getCellNotes(config: {
12
- PrimaryKeyValue: string | number;
13
- ColumnId: string;
14
- }): AdaptableNote[];
12
+ getCellNotes(address: CellAddress): AdaptableNote[];
15
13
  getNoteByUuid(uuid: string): AdaptableNote | undefined;
16
14
  }
@@ -3,13 +3,9 @@ import * as NotesRedux from '../../Redux/ActionsReducers/NotesRedux';
3
3
  export class NotesApiImpl extends ApiBase {
4
4
  addNote(noteStr, primaryKeyValue, columnId) {
5
5
  const note = {
6
- Value: noteStr,
6
+ Text: noteStr,
7
7
  PrimaryKeyValue: primaryKeyValue,
8
8
  ColumnId: columnId,
9
- AdaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
10
- Author: {
11
- UserName: this.adaptable.api.optionsApi.getUserName(),
12
- },
13
9
  Timestamp: Date.now(),
14
10
  };
15
11
  this.dispatchAction(NotesRedux.NotesAdd(note));
@@ -19,7 +15,7 @@ export class NotesApiImpl extends ApiBase {
19
15
  this.dispatchAction(NotesRedux.NotesEdit(note));
20
16
  }
21
17
  updateNoteText(noteStr, note) {
22
- this.editNote(Object.assign(Object.assign({}, note), { Value: noteStr }));
18
+ this.editNote(Object.assign(Object.assign({}, note), { Text: noteStr }));
23
19
  }
24
20
  deleteNote(note) {
25
21
  this.dispatchAction(NotesRedux.NotesDelete(note));
@@ -30,8 +26,8 @@ export class NotesApiImpl extends ApiBase {
30
26
  getAllNotes() {
31
27
  return this.getNotesState().Notes;
32
28
  }
33
- getCellNotes(config) {
34
- return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes, config);
29
+ getCellNotes(address) {
30
+ return NotesRedux.GetNotesSelector(this.getAdaptableState().Notes, address);
35
31
  }
36
32
  getNoteByUuid(uuid) {
37
33
  return this.getAllNotes().find((note) => note.Uuid === uuid);
@@ -5,7 +5,7 @@ import { CustomSortOptions } from '../../AdaptableOptions/CustomSortOptions';
5
5
  import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
6
6
  import { ExpressionOptions } from '../../AdaptableOptions/ExpressionOptions';
7
7
  import { ColumnFilterOptions } from '../../AdaptableOptions/ColumnFilterOptions';
8
- import { CommentsOptions } from '../../AdaptableOptions/CommentsOptions';
8
+ import { CommentsOptions } from '../../AdaptableOptions/CommentOptions';
9
9
  export declare class OptionsApiImpl extends ApiBase implements OptionsApi {
10
10
  getAdaptableId(): string;
11
11
  getAdaptableStateKey(): string;
@@ -37,10 +37,10 @@ export class OptionsApiImpl extends ApiBase {
37
37
  return this.getOptions().columnOptions;
38
38
  }
39
39
  getNotesOptions() {
40
- return this.getOptions().notesOptions;
40
+ return this.getOptions().noteOptions;
41
41
  }
42
42
  getCommentsOptions() {
43
- return this.getOptions().commentsOptions;
43
+ return this.getOptions().commentOptions;
44
44
  }
45
45
  getCustomSortOptions() {
46
46
  return this.getOptions().customSortOptions;
@@ -5,6 +5,5 @@ import { StatusPanelDef } from '@ag-grid-community/core';
5
5
  export declare class StatusBarApiImpl extends ApiBase implements StatusBarApi {
6
6
  getAdaptableStatusBars(): AdaptableStatusBar[];
7
7
  getAgGridStatusPanels(): StatusPanelDef[];
8
- getAgGridStatusBar(): StatusPanelDef[];
9
8
  setStatusBarPanels(statusPanels: AdaptableStatusBar[]): void;
10
9
  }
@@ -7,9 +7,6 @@ export class StatusBarApiImpl extends ApiBase {
7
7
  getAgGridStatusPanels() {
8
8
  return this.adaptable.getAgGridStatusPanels();
9
9
  }
10
- getAgGridStatusBar() {
11
- return this.adaptable.getAgGridStatusPanels();
12
- }
13
10
  setStatusBarPanels(statusPanels) {
14
11
  this.dispatchAction(StatusBarSetPanels(statusPanels));
15
12
  }
@@ -10,15 +10,15 @@ export class ToolPanelApiImpl extends ApiBase {
10
10
  this.showModulePopup(ModuleConstants.ToolPanelModuleId);
11
11
  }
12
12
  openAdapTableToolPanel() {
13
- let gridOptions = this.getGridApi().getAgGridInstance();
14
- if (gridOptions) {
15
- gridOptions.api.openToolPanel('adaptable');
13
+ const agGridApi = this.getAdaptableApi().agGridApi;
14
+ if (agGridApi) {
15
+ agGridApi.openToolPanel('adaptable');
16
16
  }
17
17
  }
18
18
  closeAdapTableToolPanel() {
19
- let gridOptions = this.getGridApi().getAgGridInstance();
20
- if (gridOptions) {
21
- gridOptions.api.closeToolPanel();
19
+ const agGridApi = this.getAdaptableApi().agGridApi;
20
+ if (agGridApi) {
21
+ agGridApi.closeToolPanel();
22
22
  }
23
23
  }
24
24
  getCustomToolPanels() {
@@ -1,7 +1,9 @@
1
- import { IRowNode } from '@ag-grid-community/core';
1
+ import { ColDef, IRowNode } from '@ag-grid-community/core';
2
2
  import { AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
3
3
  import { CreateActionRowFormContext, EditActionRowFormContext } from '../../AdaptableOptions/ActionRowOptions';
4
+ import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
4
5
  import { ApiBase } from '../Implementation/ApiBase';
6
+ import { ActionColumnContext } from '../../AdaptableOptions/ActionColumnOptions';
5
7
  export declare class ActionRowInternalApi extends ApiBase {
6
8
  buildRowEditForm(rowNode: IRowNode): AdaptableForm<EditActionRowFormContext>;
7
9
  buildRowCreateForm(clonedRowNode?: IRowNode): AdaptableForm<CreateActionRowFormContext>;
@@ -21,4 +23,6 @@ export declare class ActionRowInternalApi extends ApiBase {
21
23
  private buildFormFieldLabelContext;
22
24
  private getFieldTypeFromColumnType;
23
25
  private getFieldValueOptions;
26
+ getColDefsForActionRowColumns(): ColDef[];
27
+ getActionRowButtonDefs(): AdaptableButton<ActionColumnContext<any>>[];
24
28
  }
@@ -1,4 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
+ import { AB_SPECIAL_COLUMN, ADAPTABLE_ROW_ACTION_BUTTONS, } from '../../Utilities/Constants/GeneralConstants';
3
+ import UIHelper from '../../View/UIHelper';
4
+ import { ActionColumnRenderer, ReactActionColumnRenderer } from '../../agGrid/ActionColumnRenderer';
2
5
  export class ActionRowInternalApi extends ApiBase {
3
6
  buildRowEditForm(rowNode) {
4
7
  return this.buildActionRow('rowEdited', rowNode);
@@ -197,4 +200,107 @@ export class ActionRowInternalApi extends ApiBase {
197
200
  label: value,
198
201
  }));
199
202
  }
203
+ getColDefsForActionRowColumns() {
204
+ const actionButtons = this.getActionRowButtonDefs();
205
+ if (!actionButtons.length) {
206
+ return [];
207
+ }
208
+ return [
209
+ {
210
+ headerName: '',
211
+ colId: ADAPTABLE_ROW_ACTION_BUTTONS,
212
+ hide: false,
213
+ editable: false,
214
+ // 15px is the icon width + left&right padding + left&right border
215
+ width: Math.max(actionButtons.length * (UIHelper.getSimpleButtonPaddingWidth() * 2 + 15) + 2,
216
+ // If the width of the column is to small, the width will not be applied
217
+ // this triggers the setLayout an infinite loop because the width read from the grid is always different
218
+ 40),
219
+ resizable: false,
220
+ lockVisible: true,
221
+ suppressColumnsToolPanel: true,
222
+ suppressFiltersToolPanel: true,
223
+ suppressMenu: true,
224
+ suppressMovable: true,
225
+ filter: false,
226
+ sortable: false,
227
+ enableRowGroup: false,
228
+ pinned: this.getActionRowOptions().actionRowButtonOptions.position === 'pinnedRight'
229
+ ? 'right'
230
+ : 'left',
231
+ cellRenderer: this.getAdaptableVariant() === 'react' ? ReactActionColumnRenderer : ActionColumnRenderer,
232
+ cellClass: ADAPTABLE_ROW_ACTION_BUTTONS,
233
+ type: [AB_SPECIAL_COLUMN, 'abColDefObject'],
234
+ },
235
+ ];
236
+ }
237
+ getActionRowButtonDefs() {
238
+ const actionRowButtons = this.getActionRowApi().getActionRowButtons();
239
+ if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
240
+ return [];
241
+ }
242
+ const defaultActionRowButtonConfiguration = {
243
+ create: {
244
+ icon: {
245
+ name: 'add',
246
+ },
247
+ tooltip: 'Create',
248
+ onClick: () => {
249
+ this.getActionRowApi().displayCreateActionRow();
250
+ },
251
+ },
252
+ edit: {
253
+ icon: {
254
+ name: 'edit',
255
+ },
256
+ tooltip: 'Edit',
257
+ onClick: (button, context) => {
258
+ this.getActionRowApi().displayEditActionRow(context.primaryKeyValue);
259
+ },
260
+ },
261
+ clone: {
262
+ icon: {
263
+ name: 'clone',
264
+ },
265
+ tooltip: 'Clone',
266
+ onClick: (button, context) => {
267
+ this.getActionRowApi().displayCloneActionRow(context.primaryKeyValue);
268
+ },
269
+ },
270
+ delete: {
271
+ icon: {
272
+ name: 'delete',
273
+ },
274
+ tooltip: 'Delete',
275
+ onClick: (button, context) => {
276
+ var _a, _b;
277
+ const eventInfo = {
278
+ type: 'rowDeleted',
279
+ rowNode: context.rowNode,
280
+ adaptableApi: context.adaptableApi,
281
+ userName: context.userName,
282
+ adaptableId: context.adaptableId,
283
+ };
284
+ this.getEventApi().emit('ActionRowSubmitted', eventInfo);
285
+ (_b = (_a = this.getActionRowOptions().actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
286
+ },
287
+ },
288
+ };
289
+ const actionButtons = actionRowButtons
290
+ .map((actionRowButtonType) => {
291
+ var _a, _b;
292
+ const defaultButtonConfig = defaultActionRowButtonConfiguration[actionRowButtonType];
293
+ if (!defaultButtonConfig) {
294
+ // should NOT happen unless the user sent some invalid button type in the predefined config
295
+ return;
296
+ }
297
+ const customButtonConfig = (_b = (_a = this.getActionRowOptions().actionRowButtonOptions).customConfiguration) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { actionRowButtonType }));
298
+ if (!customButtonConfig) {
299
+ return defaultButtonConfig;
300
+ }
301
+ return Object.assign(Object.assign({}, defaultButtonConfig), customButtonConfig);
302
+ })
303
+ .filter(Boolean);
304
+ return actionButtons;
305
+ }
200
306
  }
@@ -24,9 +24,9 @@ import { AdaptableFrameworkComponent } from '../../AdaptableOptions/AdaptableFra
24
24
  import { IMetamodelService } from '../../Utilities/Services/Interface/IMetamodelService';
25
25
  import { IModuleCollection } from '../../Strategy/Interface/IModule';
26
26
  import { AdaptableObjectTag, AdaptableObjectWithScope } from '../../PredefinedConfig/Common/AdaptableObject';
27
- import { IRowEditService } from '../../Utilities/Services/Interface/IRowEditService';
28
27
  import { Fdc3Service } from '../../Utilities/Services/Fdc3Service';
29
28
  import { CellPopupService } from '../../Utilities/Services/CellPopupService';
29
+ import { RowEditService } from '../../Utilities/Services/RowEditService';
30
30
  export declare class AdaptableInternalApi extends ApiBase {
31
31
  getSystemState(): SystemState;
32
32
  showPopupConfirmation(confirmation: UIConfirmation): void;
@@ -46,8 +46,7 @@ export declare class AdaptableInternalApi extends ApiBase {
46
46
  setPivotModeOn(): void;
47
47
  setPivotModeOff(): void;
48
48
  isGridInPivotMode(): boolean;
49
- setTreeModeOn(): void;
50
- setTreeModeOff(): void;
49
+ setTreeMode(mode: boolean): void;
51
50
  isGridInTreeMode(): boolean;
52
51
  getToolbarTitle(): string;
53
52
  buildDataChangedInfo(config: Pick<CellDataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): CellDataChangedInfo;
@@ -65,7 +64,7 @@ export declare class AdaptableInternalApi extends ApiBase {
65
64
  getAlertService(): IAlertService;
66
65
  getTeamSharingService(): ITeamSharingService;
67
66
  getMetamodelService(): IMetamodelService;
68
- getRowEditService(): IRowEditService;
67
+ getRowEditService(): RowEditService;
69
68
  getFdc3Service(): Fdc3Service;
70
69
  getModules(): IModuleCollection;
71
70
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
@@ -47,11 +47,13 @@ export class AdaptableInternalApi extends ApiBase {
47
47
  isGridInPivotMode() {
48
48
  return this.getAdaptableState().Grid.IsGridInPivotMode;
49
49
  }
50
- setTreeModeOn() {
51
- this.dispatchAction(GridRedux.SetTreeModeOn());
52
- }
53
- setTreeModeOff() {
54
- this.dispatchAction(GridRedux.SetTreeModeOff());
50
+ setTreeMode(mode) {
51
+ if (!!mode) {
52
+ this.dispatchAction(GridRedux.SetTreeModeOn());
53
+ }
54
+ else {
55
+ this.dispatchAction(GridRedux.SetTreeModeOff());
56
+ }
55
57
  }
56
58
  isGridInTreeMode() {
57
59
  return this.getAdaptableState().Grid.IsGridInTreeMode;
@@ -219,13 +221,13 @@ export class AdaptableInternalApi extends ApiBase {
219
221
  frameworkComponent,
220
222
  componentType,
221
223
  });
222
- if (this.adaptable.isInitialised) {
224
+ if (this.adaptable.isReady) {
223
225
  createComponentFn();
224
226
  }
225
227
  else {
226
228
  // adaptable may not be initialized yet if the framework component is part of the initial render
227
229
  // AFL 2021.10.14 - not really sure if this is necessary anymore?! (see the other changes in this commit)
228
- waitForCondition(() => this.adaptable.isInitialised).then(() => {
230
+ waitForCondition(() => this.adaptable.isReady).then(() => {
229
231
  createComponentFn();
230
232
  });
231
233
  }
@@ -448,7 +450,7 @@ export class AdaptableInternalApi extends ApiBase {
448
450
  var _a;
449
451
  let actionColumn;
450
452
  if (colDef.colId == ADAPTABLE_ROW_ACTION_BUTTONS) {
451
- const actionButtons = this.adaptable.getActionRowButtonDefs();
453
+ const actionButtons = this.getActionRowApi().internalApi.getActionRowButtonDefs();
452
454
  actionColumn = {
453
455
  columnId: ADAPTABLE_ROW_ACTION_BUTTONS,
454
456
  actionColumnButton: actionButtons,
@@ -1,6 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { CalculatedColumn } from '../../PredefinedConfig/CalculatedColumnState';
3
3
  import { AdaptableColumn } from '../../types';
4
+ import { ColDef } from '@ag-grid-community/core';
4
5
  export declare class CalculatedColumnInternalApi extends ApiBase {
5
6
  /**
6
7
  * Returns all the references in the AdaptableState of the given CalculatedColumn
@@ -27,4 +28,5 @@ export declare class CalculatedColumnInternalApi extends ApiBase {
27
28
  isQuantileAggregatedExpression(input: string): boolean;
28
29
  getExpressionFromCalculatedColumn(calculatedColumn: CalculatedColumn): string;
29
30
  fireCalculatedColumnChangedEvent(trigger: string, calculatedColumn: CalculatedColumn): void;
31
+ getColDefsForCalculatedColumns(): ColDef[];
30
32
  }