@adaptabletools/adaptable 18.0.0-canary.0 → 18.0.0-canary.10

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 (261) hide show
  1. package/agGrid.d.ts +4 -21
  2. package/agGrid.js +9 -26
  3. package/base.css +11 -3
  4. package/base.css.map +1 -1
  5. package/index.css +88 -70
  6. package/index.css.map +1 -1
  7. package/package.json +4 -5
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +61 -108
  9. package/src/AdaptableOptions/AdaptableOptions.d.ts +12 -6
  10. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
  11. package/src/AdaptableOptions/ColumnOptions.d.ts +4 -2
  12. package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
  13. package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/MenuOptions.js +1 -5
  15. package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +1 -1
  16. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
  17. package/src/Api/AdaptableApi.d.ts +5 -0
  18. package/src/Api/BulkUpdateApi.d.ts +0 -5
  19. package/src/Api/ConfigApi.d.ts +1 -1
  20. package/src/Api/Events/AdaptableReady.d.ts +3 -3
  21. package/src/Api/Events/GridDataChanged.d.ts +4 -4
  22. package/src/Api/GridApi.d.ts +18 -13
  23. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
  24. package/src/Api/Implementation/ActionColumnApiImpl.js +33 -0
  25. package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -0
  26. package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
  27. package/src/Api/Implementation/ApiBase.d.ts +2 -1
  28. package/src/Api/Implementation/ApiBase.js +4 -1
  29. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
  30. package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
  31. package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -0
  32. package/src/Api/Implementation/CommentsApiImpl.js +7 -1
  33. package/src/Api/Implementation/ConfigApiImpl.js +13 -5
  34. package/src/Api/Implementation/GridApiImpl.d.ts +4 -3
  35. package/src/Api/Implementation/GridApiImpl.js +33 -14
  36. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  37. package/src/Api/Implementation/LayoutApiImpl.js +15 -0
  38. package/src/Api/Implementation/NotesApiImpl.d.ts +6 -4
  39. package/src/Api/Implementation/NotesApiImpl.js +9 -8
  40. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
  41. package/src/Api/Implementation/OptionsApiImpl.js +12 -2
  42. package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
  43. package/src/Api/Implementation/ScopeApiImpl.js +20 -7
  44. package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
  45. package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
  46. package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
  47. package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
  48. package/src/Api/Internal/ActionRowInternalApi.js +106 -0
  49. package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
  50. package/src/Api/Internal/AdaptableInternalApi.js +10 -8
  51. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  52. package/src/Api/Internal/CalculatedColumnInternalApi.js +70 -0
  53. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
  54. package/src/Api/Internal/ColumnFilterInternalApi.js +11 -1
  55. package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
  56. package/src/Api/Internal/ColumnInternalApi.js +12 -0
  57. package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
  58. package/src/Api/Internal/CommentsInternalApi.js +14 -0
  59. package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
  60. package/src/Api/Internal/CustomSortInternalApi.js +32 -1
  61. package/src/Api/Internal/DataSetInternalApi.js +1 -1
  62. package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
  63. package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
  64. package/src/Api/Internal/FreeTextColumnInternalApi.js +59 -0
  65. package/src/Api/Internal/GridFilterInternalApi.js +1 -1
  66. package/src/Api/Internal/GridInternalApi.d.ts +21 -3
  67. package/src/Api/Internal/GridInternalApi.js +126 -7
  68. package/src/Api/Internal/NotesInternalApi.d.ts +4 -0
  69. package/src/Api/Internal/NotesInternalApi.js +14 -0
  70. package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
  71. package/src/Api/InteropioPluginApi.d.ts +2 -2
  72. package/src/Api/LayoutApi.d.ts +11 -0
  73. package/src/Api/OptionsApi.d.ts +5 -1
  74. package/src/Api/ScopeApi.d.ts +10 -0
  75. package/src/EnvVars.d.ts +3 -0
  76. package/src/EnvVars.js +4 -0
  77. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
  78. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  79. package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
  80. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
  81. package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
  82. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +8 -0
  83. package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
  84. package/src/PredefinedConfig/Common/RowSummary.js +1 -0
  85. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  86. package/src/PredefinedConfig/NotesState.d.ts +10 -20
  87. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
  88. package/src/PredefinedConfig/SystemState.d.ts +7 -0
  89. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
  90. package/src/Redux/ActionsReducers/LayoutRedux.js +20 -0
  91. package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
  92. package/src/Redux/ActionsReducers/NotesRedux.js +11 -10
  93. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  94. package/src/Redux/ActionsReducers/SystemRedux.js +13 -1
  95. package/src/Redux/Store/AdaptableStore.d.ts +4 -6
  96. package/src/Redux/Store/AdaptableStore.js +33 -50
  97. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
  98. package/src/Strategy/AdaptableModuleBase.d.ts +2 -3
  99. package/src/Strategy/AdaptableModuleBase.js +4 -7
  100. package/src/Strategy/AlertModule.d.ts +1 -2
  101. package/src/Strategy/AlertModule.js +2 -55
  102. package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
  103. package/src/Strategy/CalculatedColumnModule.js +5 -25
  104. package/src/Strategy/CellSummaryModule.d.ts +1 -0
  105. package/src/Strategy/CellSummaryModule.js +50 -21
  106. package/src/Strategy/ChartingModule.d.ts +0 -1
  107. package/src/Strategy/ChartingModule.js +2 -22
  108. package/src/Strategy/ColumnFilterModule.d.ts +1 -2
  109. package/src/Strategy/ColumnFilterModule.js +1 -64
  110. package/src/Strategy/CommentsModule.d.ts +1 -0
  111. package/src/Strategy/CommentsModule.js +5 -1
  112. package/src/Strategy/CustomSortModule.js +1 -1
  113. package/src/Strategy/DashboardModule.d.ts +1 -2
  114. package/src/Strategy/DashboardModule.js +1 -8
  115. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  116. package/src/Strategy/DataChangeHistoryModule.js +3 -1
  117. package/src/Strategy/DataSetModule.d.ts +1 -1
  118. package/src/Strategy/DataSetModule.js +1 -1
  119. package/src/Strategy/FlashingCellModule.d.ts +1 -2
  120. package/src/Strategy/FlashingCellModule.js +2 -15
  121. package/src/Strategy/FormatColumnModule.d.ts +0 -2
  122. package/src/Strategy/FormatColumnModule.js +0 -47
  123. package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
  124. package/src/Strategy/FreeTextColumnModule.js +0 -30
  125. package/src/Strategy/GridFilterModule.d.ts +0 -1
  126. package/src/Strategy/GridFilterModule.js +0 -37
  127. package/src/Strategy/Interface/IModule.d.ts +0 -1
  128. package/src/Strategy/LayoutModule.d.ts +8 -3
  129. package/src/Strategy/LayoutModule.js +108 -53
  130. package/src/Strategy/NamedQueryModule.d.ts +0 -1
  131. package/src/Strategy/NamedQueryModule.js +0 -19
  132. package/src/Strategy/NotesModule.js +3 -4
  133. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  134. package/src/Strategy/PlusMinusModule.js +1 -1
  135. package/src/Strategy/ScheduleModule.d.ts +1 -1
  136. package/src/Strategy/ScheduleModule.js +1 -1
  137. package/src/Strategy/ShortcutModule.d.ts +1 -1
  138. package/src/Strategy/ShortcutModule.js +1 -1
  139. package/src/Strategy/StyledColumnModule.d.ts +0 -1
  140. package/src/Strategy/StyledColumnModule.js +0 -21
  141. package/src/Strategy/TeamSharingModule.d.ts +1 -0
  142. package/src/Strategy/TeamSharingModule.js +5 -5
  143. package/src/Strategy/ToolPanelModule.d.ts +0 -1
  144. package/src/Strategy/ToolPanelModule.js +0 -23
  145. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  146. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  147. package/src/Utilities/Constants/GeneralConstants.js +1 -0
  148. package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
  149. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -1
  150. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +294 -0
  151. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
  152. package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
  153. package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
  154. package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
  155. package/src/Utilities/Helpers/AdaptableHelper.js +18 -58
  156. package/src/Utilities/Helpers/Helper.d.ts +2 -0
  157. package/src/Utilities/Helpers/Helper.js +4 -0
  158. package/src/Utilities/ObjectFactory.js +6 -6
  159. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +3 -2
  160. package/src/Utilities/Services/AggregatedScalarLiveValue.js +14 -9
  161. package/src/Utilities/Services/CellPopupService.js +0 -1
  162. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
  163. package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
  164. package/src/Utilities/Services/LicenseService/index.js +19 -7
  165. package/src/Utilities/Services/MetamodelService.d.ts +1 -1
  166. package/src/Utilities/Services/MetamodelService.js +6 -3
  167. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
  168. package/src/Utilities/Services/QueryLanguageService.js +2 -1
  169. package/src/Utilities/Services/RowEditService.d.ts +3 -2
  170. package/src/Utilities/Services/RowEditService.js +3 -1
  171. package/src/Utilities/Services/SummaryService.d.ts +19 -0
  172. package/src/Utilities/Services/SummaryService.js +29 -0
  173. package/src/View/AdaptableView.js +1 -3
  174. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
  175. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  176. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  177. package/src/View/CellSummary/CellSummaryPopup.js +1 -1
  178. package/src/View/Comments/CommentsPopup.js +12 -8
  179. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  180. package/src/View/Components/NewScopeComponent.js +34 -1
  181. package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
  182. package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
  183. package/src/View/Components/Popups/AdaptableToaster.js +1 -1
  184. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
  185. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  186. package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
  187. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  188. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  189. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -8
  190. package/src/View/GridFilter/GridFilterViewPanel.js +46 -8
  191. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
  192. package/src/View/Layout/TransposedPopup.d.ts +3 -0
  193. package/src/View/Layout/TransposedPopup.js +194 -0
  194. package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
  195. package/src/View/Notes/NotesPopup.js +9 -11
  196. package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
  197. package/src/View/Theme/ThemeSelector.js +3 -3
  198. package/src/agGrid/ActionColumnRenderer.js +7 -6
  199. package/src/agGrid/Adaptable.d.ts +3 -455
  200. package/src/agGrid/Adaptable.js +8 -5292
  201. package/src/agGrid/AdaptableAgGrid.d.ts +351 -0
  202. package/src/agGrid/AdaptableAgGrid.js +3936 -0
  203. package/src/agGrid/AdaptableLogger.js +77 -11
  204. package/src/agGrid/AgGridAdapter.d.ts +62 -0
  205. package/src/agGrid/AgGridAdapter.js +577 -0
  206. package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
  207. package/src/agGrid/AgGridColumnAdapter.js +824 -0
  208. package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
  209. package/src/agGrid/AgGridMenuAdapter.js +271 -0
  210. package/src/agGrid/AgGridOptionsService.d.ts +12 -0
  211. package/src/agGrid/AgGridOptionsService.js +54 -0
  212. package/src/agGrid/BadgeRenderer.js +1 -1
  213. package/src/agGrid/CheckboxRenderer.js +1 -1
  214. package/src/agGrid/FilterWrapper.d.ts +2 -2
  215. package/src/agGrid/FilterWrapper.js +1 -1
  216. package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
  217. package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
  218. package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +70 -9
  219. package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
  220. package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
  221. package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  222. package/src/components/Datepicker/index.d.ts +1 -1
  223. package/src/components/InfiniteTable/index.js +2 -2
  224. package/src/components/Input/index.d.ts +1 -1
  225. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  226. package/src/components/Modal/index.d.ts +1 -0
  227. package/src/components/Modal/index.js +4 -3
  228. package/src/components/Select/Select.d.ts +2 -0
  229. package/src/components/Select/Select.js +2 -2
  230. package/src/components/Textarea/index.d.ts +9 -0
  231. package/src/components/Textarea/index.js +50 -2
  232. package/src/components/icons/index.js +2 -0
  233. package/src/components/icons/rows.d.ts +3 -0
  234. package/src/components/icons/rows.js +4 -0
  235. package/src/env.js +2 -2
  236. package/src/metamodel/adaptable.metamodel.d.ts +74 -11
  237. package/src/metamodel/adaptable.metamodel.js +157 -34
  238. package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
  239. package/src/migration/AdaptableUpgradeHelper.js +48 -0
  240. package/src/migration/VersionUpgrade.d.ts +8 -0
  241. package/src/migration/VersionUpgrade.js +11 -0
  242. package/src/migration/VersionUpgrade17.d.ts +18 -0
  243. package/src/migration/VersionUpgrade17.js +342 -0
  244. package/src/migration/VersionUpgrade18.d.ts +5 -0
  245. package/src/migration/VersionUpgrade18.js +6 -0
  246. package/src/parser/src/types.d.ts +5 -0
  247. package/src/types.d.ts +7 -3
  248. package/tsconfig.esm.tsbuildinfo +1 -1
  249. package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
  250. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
  251. package/src/Utilities/Services/Interface/IRowEditService.js +0 -1
  252. package/src/View/Components/ScopeComponent.d.ts +0 -24
  253. package/src/View/Components/ScopeComponent.js +0 -133
  254. package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
  255. package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
  256. package/src/agGrid/agGridHelper.d.ts +0 -57
  257. package/src/agGrid/agGridHelper.js +0 -686
  258. package/src/agGrid/agGridMenuHelper.d.ts +0 -46
  259. package/src/agGrid/agGridMenuHelper.js +0 -668
  260. /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
  261. /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
@@ -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
  }
@@ -1,4 +1,8 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
+ import { CreateEmptyCalculatedColumn } from '../../Utilities/ObjectFactory';
3
+ import { AB_SPECIAL_COLUMN } from '../../Utilities/Constants/GeneralConstants';
4
+ import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
5
+ import StringExtensions from '../../Utilities/Extensions/StringExtensions';
2
6
  export class CalculatedColumnInternalApi extends ApiBase {
3
7
  /**
4
8
  * Returns all the references in the AdaptableState of the given CalculatedColumn
@@ -87,4 +91,70 @@ export class CalculatedColumnInternalApi extends ApiBase {
87
91
  };
88
92
  this.adaptable.api.eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
89
93
  }
94
+ getColDefsForCalculatedColumns() {
95
+ const defaultCalculatedColumnSettings = CreateEmptyCalculatedColumn().CalculatedColumnSettings;
96
+ return this.getCalculatedColumnApi()
97
+ .getCalculatedColumns()
98
+ .map((calculatedColumn) => {
99
+ const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
100
+ if (!calculatedColumnSettings.DataType) {
101
+ calculatedColumnSettings.DataType = this.getAdaptableApi()
102
+ .internalApi.getAdaptableInstance()
103
+ .CalculatedColumnExpressionService.getCalculatedColumnDataType(calculatedColumn.Query);
104
+ }
105
+ const columnTypes = [
106
+ AB_SPECIAL_COLUMN,
107
+ this.getGridApi().internalApi.getAgGridDataType(calculatedColumnSettings.DataType),
108
+ ];
109
+ if (ArrayExtensions.IsNotNullOrEmpty(calculatedColumnSettings.ColumnTypes)) {
110
+ columnTypes.push(...calculatedColumnSettings.ColumnTypes);
111
+ }
112
+ const isExternalEvaluation = !this.getExpressionApi().internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, this.getExpressionApi().getAdaptableQueryExpression(calculatedColumn.Query));
113
+ const valueGetter = (params) => {
114
+ var _a, _b;
115
+ if (isExternalEvaluation) {
116
+ return (_a = params.data) === null || _a === void 0 ? void 0 : _a[calculatedColumn.ColumnId];
117
+ }
118
+ // if the grid data is NOT client side, we can aggregate only simple scalar expression (which depend on row data, not on other rows)
119
+ if (this.getGridApi().getAgGridRowModelType() !== 'clientSide' &&
120
+ StringExtensions.IsNotNullOrEmpty(calculatedColumn.Query.AggregatedScalarExpression)) {
121
+ return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
122
+ }
123
+ return this.getAdaptableApi()
124
+ .internalApi.getAdaptableInstance()
125
+ .CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
126
+ };
127
+ const newColDef = {
128
+ headerName: calculatedColumn.FriendlyName
129
+ ? calculatedColumn.FriendlyName
130
+ : calculatedColumn.ColumnId,
131
+ colId: calculatedColumn.ColumnId,
132
+ hide: false,
133
+ editable: false,
134
+ width: calculatedColumnSettings.Width,
135
+ enableValue: calculatedColumnSettings.Aggregatable,
136
+ filter: calculatedColumnSettings.Filterable,
137
+ floatingFilter: calculatedColumnSettings.Filterable,
138
+ resizable: calculatedColumnSettings.Resizable,
139
+ enableRowGroup: calculatedColumnSettings.Groupable,
140
+ sortable: calculatedColumnSettings.Sortable,
141
+ enablePivot: calculatedColumnSettings.Pivotable,
142
+ suppressMenu: calculatedColumnSettings.SuppressMenu,
143
+ suppressMovable: calculatedColumnSettings.SuppressMovable,
144
+ type: columnTypes,
145
+ valueGetter,
146
+ };
147
+ if (calculatedColumnSettings.ShowToolTip != null &&
148
+ calculatedColumnSettings.ShowToolTip == true) {
149
+ newColDef.tooltipValueGetter = () => {
150
+ return this.getAdaptableApi().internalApi.getAdaptableQueryExpressionText(calculatedColumn.Query);
151
+ };
152
+ }
153
+ if (calculatedColumnSettings.HeaderToolTip) {
154
+ newColDef.headerTooltip = calculatedColumnSettings.HeaderToolTip;
155
+ }
156
+ this.getAdaptableApi().logInfo('Setting up Calculated Column: ' + calculatedColumn.ColumnId);
157
+ return newColDef;
158
+ });
159
+ }
90
160
  }
@@ -56,4 +56,5 @@ export declare class ColumnFilterInternalApi extends ApiBase {
56
56
  */
57
57
  areColumnFiltersDifferent(oldFilters: ColumnFilter[], newFilters: ColumnFilter[]): boolean;
58
58
  getPredicateDefShortcuts(predicateDef: AdaptablePredicateDef): string[];
59
+ getFilterValuesMaxNumberOfItems(column: AdaptableColumn): number | undefined;
59
60
  }
@@ -171,7 +171,7 @@ export class ColumnFilterInternalApi extends ApiBase {
171
171
  * Fires Column Filter Applied Event - typically used to enable filtering on the server
172
172
  */
173
173
  fireColumnFilterAppliedEvent() {
174
- if (this.adaptable.isLive) {
174
+ if (this.adaptable.isReady) {
175
175
  const adaptableApi = this.getAdaptableApi();
176
176
  const columnFilterAppliedInfo = {
177
177
  columnFilters: this.getColumnFilterApi().getColumnFilters(),
@@ -202,4 +202,14 @@ export class ColumnFilterInternalApi extends ApiBase {
202
202
  }
203
203
  return predicateShortcuts;
204
204
  }
205
+ getFilterValuesMaxNumberOfItems(column) {
206
+ const maxFilterValues = this.getColumnFilterOptions().valuesFilterOptions.maxFilterValuesToDisplay;
207
+ if (typeof maxFilterValues === 'function') {
208
+ const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { column: column });
209
+ return maxFilterValues(columnFilterContext);
210
+ }
211
+ else {
212
+ return maxFilterValues;
213
+ }
214
+ }
205
215
  }
@@ -1,5 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
- import { Column } from '@ag-grid-community/core';
2
+ import { Column, IRowNode } from '@ag-grid-community/core';
3
+ import { CustomSort } from '../../PredefinedConfig/CustomSortState';
4
+ import { ColumnValuesComparer } from '../../AdaptableOptions/CustomSortOptions';
3
5
  export declare class ColumnInternalApi extends ApiBase {
4
6
  /**
5
7
  * Retrieves 'ColumnType' property for a given Column
@@ -24,4 +26,5 @@ export declare class ColumnInternalApi extends ApiBase {
24
26
  */
25
27
  getAgGridColumnForAdaptableColumn(columnId: string): Column;
26
28
  isActionRowButtonColumn(columnId: string): boolean;
29
+ getActiveColumnComparator(columnId: string, customSort?: CustomSort, customSortComparer?: ColumnValuesComparer): (valueA: any, valueB: any, nodeA?: IRowNode, nodeB?: IRowNode, isInverted?: boolean) => number | undefined;
27
30
  }
@@ -39,4 +39,16 @@ export class ColumnInternalApi extends ApiBase {
39
39
  isActionRowButtonColumn(columnId) {
40
40
  return columnId === ADAPTABLE_ROW_ACTION_BUTTONS;
41
41
  }
42
+ getActiveColumnComparator(columnId, customSort, customSortComparer) {
43
+ if ((!customSort || (customSort === null || customSort === void 0 ? void 0 : customSort.IsSuspended)) && !customSortComparer) {
44
+ // defaults to AG-Grid column definition comparator if no CustomSort is defined&active
45
+ const colDefComparator = this.adaptable.agGridColumnAdapter.getUserColDefProperty(columnId, 'comparator');
46
+ return colDefComparator;
47
+ }
48
+ // CustomSort Comparer function takes precedence over CustomSort SortedValues
49
+ const comparerFunction = customSortComparer
50
+ ? customSortComparer.comparer
51
+ : this.getCustomSortApi().internalApi.getDefaultCustomSortComparer(customSort.ColumnId, customSort.SortedValues);
52
+ return comparerFunction;
53
+ }
42
54
  }
@@ -0,0 +1,4 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export declare class CommentsInternalApi extends ApiBase {
3
+ areCommentsAvailable(): boolean;
4
+ }
@@ -0,0 +1,14 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ export class CommentsInternalApi extends ApiBase {
3
+ areCommentsAvailable() {
4
+ var _a;
5
+ const currentLayout = this.getLayoutApi().getCurrentLayout();
6
+ if (currentLayout.EnablePivot) {
7
+ return false;
8
+ }
9
+ if ((_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) {
10
+ return false;
11
+ }
12
+ return true;
13
+ }
14
+ }
@@ -1,6 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
- import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
3
2
  import { ColumnValuesComparer } from '../../AdaptableOptions/CustomSortOptions';
3
+ import { AdaptableComparerFunction } from '../../PredefinedConfig/Common/AdaptableComparerFunction';
4
4
  export declare class CustomSortInternalApi extends ApiBase {
5
- getCustomSortComparer(column: AdaptableColumn): ColumnValuesComparer | undefined;
5
+ getCustomSortComparer(columnId: string): ColumnValuesComparer | undefined;
6
+ getDefaultCustomSortComparer(columnId: string, columnValues: any[]): AdaptableComparerFunction;
6
7
  }
@@ -1,7 +1,38 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  export class CustomSortInternalApi extends ApiBase {
3
- getCustomSortComparer(column) {
3
+ getCustomSortComparer(columnId) {
4
4
  var _a;
5
+ const column = this.getColumnApi().getColumnWithColumnId(columnId);
5
6
  return (_a = this.getCustomSortOptions().customSortComparers) === null || _a === void 0 ? void 0 : _a.find((csc) => this.adaptable.api.scopeApi.isColumnInScope(column, csc.scope));
6
7
  }
8
+ getDefaultCustomSortComparer(columnId, columnValues) {
9
+ // have to return a function that may not have access to this
10
+ const adaptable = this.adaptable;
11
+ return function compareItemsOfCustomSort(valueA, valueB, nodeA, nodeB) {
12
+ var _a, _b;
13
+ let firstElementValueString = (_a = (nodeA && adaptable.getDisplayValueFromRowNode(nodeA, columnId))) !== null && _a !== void 0 ? _a : valueA;
14
+ let secondElementValueString = (_b = (nodeB && adaptable.getDisplayValueFromRowNode(nodeB, columnId))) !== null && _b !== void 0 ? _b : valueB;
15
+ let indexFirstElement = columnValues.indexOf(firstElementValueString);
16
+ let containsFirstElement = indexFirstElement >= 0;
17
+ let indexSecondElement = columnValues.indexOf(secondElementValueString);
18
+ let containsSecondElement = indexSecondElement >= 0;
19
+ //if none of the element are in the list we jsut return normal compare
20
+ if (!containsFirstElement && !containsSecondElement) {
21
+ if (valueA == valueB) {
22
+ return 0;
23
+ }
24
+ return valueA < valueB ? -1 : 1;
25
+ }
26
+ //if first item not in the list make sure we put it after the second item
27
+ if (!containsFirstElement) {
28
+ return 1;
29
+ }
30
+ //if second item not in the list make sure we put it after the first item
31
+ if (!containsSecondElement) {
32
+ return -1;
33
+ }
34
+ //return the comparison from the list if the two items are in the list
35
+ return indexFirstElement - indexSecondElement;
36
+ };
37
+ }
7
38
  }
@@ -5,7 +5,7 @@ export class DataSetInternalApi extends ApiBase {
5
5
  * @param dataSet Data Set which has been selected
6
6
  */
7
7
  fireDataSetSelectedEvent(dataSet) {
8
- if (this.adaptable.isLive) {
8
+ if (this.adaptable.isReady) {
9
9
  const dataSetSelectedInfo = {
10
10
  adaptableApi: this.adaptable.api,
11
11
  dataSet,
@@ -69,8 +69,9 @@ export class FormatColumnInternalApi extends ApiBase {
69
69
  // this.getFormatColumnsWithColumnScope(formatColumns)
70
70
  (this.adaptable.api.scopeApi.scopeHasColumns(fc.Scope) ||
71
71
  // this.getFormatColumnsWithDataTypeScope(formatColumns)
72
- this.adaptable.api.scopeApi.scopeHasDataType(fc.Scope) || // this.getFormatColumnsWithAllScope(formatColumns)
73
- this.adaptable.api.scopeApi.scopeIsAll(fc.Scope))
72
+ this.adaptable.api.scopeApi.scopeHasDataType(fc.Scope) ||
73
+ // this.getFormatColumnsWithAllScope(formatColumns)
74
+ this.adaptable.api.scopeApi.scopeIsAll(fc.Scope) || this.adaptable.api.scopeApi.scopeHasColumnType(fc.Scope))
74
75
  );
75
76
  });
76
77
  }
@@ -1,6 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
3
3
  import { FreeTextColumn } from '../../PredefinedConfig/FreeTextColumnState';
4
+ import { ColDef } from '@ag-grid-community/core';
4
5
  export declare class FreeTextColumnInternalApi extends ApiBase {
5
6
  /**
6
7
  * Checks if a User Edit was in a Free Text Column
@@ -12,4 +13,5 @@ export declare class FreeTextColumnInternalApi extends ApiBase {
12
13
  * @param freeTextColumn FreeTextColumn to be checked
13
14
  */
14
15
  getFreeTextColumnModuleReferences(freeTextColumn: FreeTextColumn): string[];
16
+ getColDefsForFreeTextColumns(): ColDef<any, any>[];
15
17
  }
@@ -1,4 +1,9 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
+ import { CreateEmptyFreeTextColumn } from '../../Utilities/ObjectFactory';
3
+ import { AdaptableNumberEditor } from '../../agGrid/editors/AdaptableNumberEditor';
4
+ import { AdaptableDateEditor } from '../../agGrid/editors/AdaptableDateEditor';
5
+ import { AB_SPECIAL_COLUMN } from '../../Utilities/Constants/GeneralConstants';
6
+ import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
2
7
  export class FreeTextColumnInternalApi extends ApiBase {
3
8
  /**
4
9
  * Checks if a User Edit was in a Free Text Column
@@ -37,4 +42,58 @@ export class FreeTextColumnInternalApi extends ApiBase {
37
42
  });
38
43
  return references;
39
44
  }
45
+ getColDefsForFreeTextColumns() {
46
+ const defaultFreeTextColumnSettings = CreateEmptyFreeTextColumn().FreeTextColumnSettings;
47
+ return this.getFreeTextColumnApi()
48
+ .getFreeTextColumns()
49
+ .map((freeTextColumn) => {
50
+ var _a;
51
+ const freeTextColumnSettings = Object.assign(Object.assign({}, defaultFreeTextColumnSettings), freeTextColumn.FreeTextColumnSettings);
52
+ const dataTypeEditor = freeTextColumnSettings.DataType === 'Number'
53
+ ? AdaptableNumberEditor
54
+ : freeTextColumnSettings.DataType === 'Date'
55
+ ? AdaptableDateEditor
56
+ : null;
57
+ const columnTypes = [
58
+ AB_SPECIAL_COLUMN,
59
+ this.getGridApi().internalApi.getAgGridDataType(freeTextColumnSettings.DataType),
60
+ ];
61
+ if (ArrayExtensions.IsNotNullOrEmpty((_a = freeTextColumn === null || freeTextColumn === void 0 ? void 0 : freeTextColumn.FreeTextColumnSettings) === null || _a === void 0 ? void 0 : _a.ColumnTypes)) {
62
+ columnTypes.push(...freeTextColumn.FreeTextColumnSettings.ColumnTypes);
63
+ }
64
+ const newColDef = {
65
+ headerName: freeTextColumn.FriendlyName || freeTextColumn.ColumnId,
66
+ colId: freeTextColumn.ColumnId,
67
+ editable: true,
68
+ hide: false,
69
+ width: freeTextColumnSettings.Width,
70
+ enableValue: freeTextColumnSettings.Aggregatable,
71
+ filter: freeTextColumnSettings.Filterable,
72
+ floatingFilter: freeTextColumnSettings.Filterable,
73
+ resizable: freeTextColumnSettings.Resizable,
74
+ enableRowGroup: freeTextColumnSettings.Groupable,
75
+ sortable: freeTextColumnSettings.Sortable,
76
+ enablePivot: freeTextColumnSettings.Pivotable,
77
+ suppressMenu: freeTextColumnSettings.SuppressMenu,
78
+ suppressMovable: freeTextColumnSettings.SuppressMovable,
79
+ cellEditor: dataTypeEditor !== null && dataTypeEditor !== void 0 ? dataTypeEditor : (freeTextColumn.TextEditor && freeTextColumn.TextEditor == 'Large'
80
+ ? 'agLargeTextCellEditor'
81
+ : 'agTextCellEditor'),
82
+ type: columnTypes,
83
+ valueSetter: (params) => {
84
+ return (params.data[freeTextColumn.ColumnId] = params.newValue);
85
+ },
86
+ // use a Boolean Cell Data Type if the Free Text Column is boolean
87
+ cellDataType: freeTextColumnSettings.DataType && freeTextColumnSettings.DataType == 'Boolean'
88
+ ? 'boolean'
89
+ : undefined,
90
+ valueGetter: (params) => this.getFreeTextColumnApi().getFreeTextColumnValueForRowNode(freeTextColumn, params.node),
91
+ };
92
+ if (freeTextColumnSettings.HeaderToolTip) {
93
+ newColDef.headerTooltip = freeTextColumnSettings.HeaderToolTip;
94
+ }
95
+ this.getAdaptableApi().logInfo('Setting up FreeText Column: ' + freeTextColumn.ColumnId);
96
+ return newColDef;
97
+ });
98
+ }
40
99
  }
@@ -1,7 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  export class GridFilterInternalApi extends ApiBase {
3
3
  fireGridFilterAppliedEvent() {
4
- if (this.adaptable.isLive) {
4
+ if (this.adaptable.isReady) {
5
5
  const currentGridFilter = this.getGridFilterApi().getCurrentGridFilter();
6
6
  const adaptableApi = this.getAdaptableApi();
7
7
  const gridFilterAppliedInfo = {
@@ -1,12 +1,15 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
3
- import { IRowNode } from '@ag-grid-community/core';
3
+ import { IRowNode, RowClassParams } from '@ag-grid-community/core';
4
+ import { GridDataChangeTrigger } from '../Events/GridDataChanged';
4
5
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
5
- import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
6
+ import { AdaptableColumn, AdaptableColumnDataType } from '../../PredefinedConfig/Common/AdaptableColumn';
6
7
  import { SelectedCellInfo } from '../../PredefinedConfig/Selection/SelectedCellInfo';
7
8
  import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInfo';
8
9
  import { AdaptableMenuItem } from '../../PredefinedConfig/Common/Menu';
9
10
  import { EditLookUpPermittedValues } from '../../AdaptableOptions/UserInterfaceOptions';
11
+ import { DistinctValuesParams } from '../../AdaptableInterfaces/IAdaptable';
12
+ import { AdaptableColumnType } from '../../PredefinedConfig/Common/Types';
10
13
  export declare class GridInternalApi extends ApiBase {
11
14
  /**
12
15
  * Fires Grid Sorted Event
@@ -19,7 +22,7 @@ export declare class GridInternalApi extends ApiBase {
19
22
  /**
20
23
  * Fires Grid Data Changed Event - when a row has changed in AG Grid
21
24
  */
22
- fireGridDataChangedEvent(dataRows: any[], rowNodes: IRowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
25
+ fireGridDataChangedEvent(dataRows: any[], rowNodes: IRowNode[], rowTrigger: GridDataChangeTrigger): void;
23
26
  /**
24
27
  * Gets all distinct display values in the Column with the given ColumnId
25
28
  * @param columnId Column to check
@@ -39,17 +42,23 @@ export declare class GridInternalApi extends ApiBase {
39
42
  }[];
40
43
  suppressClientSideFilter: boolean;
41
44
  }>;
45
+ getDistinctFilterListValuesForColumn(column: AdaptableColumn, filter: string, distinctValuesParams: DistinctValuesParams): Promise<{
46
+ suppressClientSideFilter?: boolean;
47
+ gridCells: GridCell[];
48
+ }>;
42
49
  /**
43
50
  * Gets all distinct Custom Sort values for the Column with the given ColumnId
44
51
  * @param columnId Column to check
45
52
  */
46
53
  getDistinctCustomSortDisplayValuesForColumn(columnId: string): Promise<any[]>;
54
+ getDistinctCustomSortValuesForColumn(column: AdaptableColumn, distinctValuesParams: DistinctValuesParams): Promise<GridCell<any>[]>;
47
55
  /**
48
56
  * Gets all distinct Bulk Update values for the Column with the given ColumnId
49
57
  * @param columnId Column to check
50
58
  * @param selectedGridCells Selected grid cells
51
59
  */
52
60
  getDistinctBulkUpdateDisplayValuesForColumn(columnId: string, selectedGridCells: GridCell[]): Promise<any[]>;
61
+ getDistinctBulkUpdateValuesForColumn(column: AdaptableColumn, selectedGridCells: GridCell[], distinctValuesParams: DistinctValuesParams): Promise<GridCell<any>[]>;
53
62
  /**
54
63
  * Gets all distinct visible (after current filters are applied) display values in the Column with the given ColumnId
55
64
  * @param columnId Column to check
@@ -78,4 +87,13 @@ export declare class GridInternalApi extends ApiBase {
78
87
  setSelectedRows(selectedRowInfo: SelectedRowInfo): void;
79
88
  buildStandaloneColumnHeader(column: AdaptableColumn): AdaptableMenuItem[];
80
89
  getEditLookUpValuesForColumn(editLookUpItem: EditLookUpPermittedValues, column: AdaptableColumn, gridCell?: GridCell): any[] | undefined;
90
+ getAgGridDataType(dataType: AdaptableColumnDataType): AdaptableColumnType;
91
+ getRowHighlightStyle(params: RowClassParams): {
92
+ [cssProperty: string]: string;
93
+ };
94
+ getAlertRowStyle(params: RowClassParams): {
95
+ [cssProperty: string]: string;
96
+ };
97
+ getAlertRowClass(params: RowClassParams): string | null;
98
+ getRowHighlightClass(params: RowClassParams): string | null;
81
99
  }