@adaptabletools/adaptable 11.1.15 → 11.1.16

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 (146) hide show
  1. package/base.css +2 -0
  2. package/bundle.cjs.js +94 -94
  3. package/index.css +3 -0
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableOptions/AlertOptions.d.ts +8 -2
  8. package/src/AdaptableOptions/DashboardOptions.d.ts +4 -3
  9. package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/FilterOptions.d.ts +5 -4
  11. package/src/AdaptableOptions/LayoutOptions.d.ts +56 -10
  12. package/src/AdaptableOptions/ToolPanelOptions.d.ts +4 -3
  13. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +18 -16
  14. package/src/Api/AdaptableApi.d.ts +10 -0
  15. package/src/Api/ConfigApi.d.ts +3 -3
  16. package/src/Api/EventApi.d.ts +1 -0
  17. package/src/Api/Events/LayoutChanged.d.ts +1 -1
  18. package/src/Api/ExportApi.d.ts +16 -0
  19. package/src/Api/FinanceApi.d.ts +104 -3
  20. package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -0
  21. package/src/Api/Implementation/AdaptableApiImpl.js +53 -0
  22. package/src/Api/Implementation/AlertApiImpl.js +5 -5
  23. package/src/Api/Implementation/ApiBase.js +3 -0
  24. package/src/Api/Implementation/ConditionalStyleApiImpl.js +3 -3
  25. package/src/Api/Implementation/ConfigApiImpl.js +5 -1
  26. package/src/Api/Implementation/CustomSortApiImpl.js +4 -4
  27. package/src/Api/Implementation/EventApiImpl.d.ts +1 -0
  28. package/src/Api/Implementation/EventApiImpl.js +3 -0
  29. package/src/Api/Implementation/ExportApiImpl.d.ts +3 -0
  30. package/src/Api/Implementation/ExportApiImpl.js +10 -0
  31. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -1
  32. package/src/Api/Implementation/FlashingCellApiImpl.js +7 -6
  33. package/src/Api/Implementation/FormatColumnApiImpl.js +5 -5
  34. package/src/Api/Implementation/InternalApiImpl.d.ts +11 -5
  35. package/src/Api/Implementation/InternalApiImpl.js +65 -3
  36. package/src/Api/Implementation/PlusMinusApiImpl.js +4 -7
  37. package/src/Api/Implementation/ScheduleApiImpl.d.ts +2 -1
  38. package/src/Api/Implementation/ScheduleApiImpl.js +15 -7
  39. package/src/Api/Implementation/ShortcutApiImpl.js +3 -3
  40. package/src/Api/InternalApi.d.ts +11 -7
  41. package/src/Api/LayoutApi.d.ts +4 -6
  42. package/src/Api/ScheduleApi.d.ts +5 -1
  43. package/src/PredefinedConfig/AlertState.d.ts +3 -3
  44. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +2 -5
  45. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +4 -3
  46. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +18 -1
  47. package/src/PredefinedConfig/Common/AdaptablePredicate.js +9 -0
  48. package/src/PredefinedConfig/Common/BaseContext.d.ts +10 -0
  49. package/src/PredefinedConfig/Common/BaseContext.js +2 -0
  50. package/src/PredefinedConfig/Common/CellSummary.d.ts +3 -3
  51. package/src/PredefinedConfig/Common/FDC3Context.d.ts +9 -9
  52. package/src/PredefinedConfig/Common/Menu.d.ts +4 -13
  53. package/src/PredefinedConfig/DataSourceState.d.ts +2 -2
  54. package/src/PredefinedConfig/FilterState.d.ts +1 -1
  55. package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -5
  56. package/src/Redux/Store/AdaptableStore.d.ts +1 -0
  57. package/src/Redux/Store/AdaptableStore.js +6 -1
  58. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +1 -0
  59. package/src/Strategy/AlertModule.js +3 -0
  60. package/src/Strategy/CalculatedColumnModule.d.ts +3 -17
  61. package/src/Strategy/CalculatedColumnModule.js +2 -0
  62. package/src/Strategy/ConditionalStyleModule.js +4 -1
  63. package/src/Strategy/CustomSortModule.js +2 -0
  64. package/src/Strategy/DataSourceModule.js +2 -0
  65. package/src/Strategy/ExportModule.d.ts +5 -3
  66. package/src/Strategy/ExportModule.js +10 -0
  67. package/src/Strategy/FlashingCellModule.js +2 -0
  68. package/src/Strategy/FormatColumnModule.js +2 -0
  69. package/src/Strategy/FreeTextColumnModule.js +2 -0
  70. package/src/Strategy/Interface/IModule.d.ts +5 -3
  71. package/src/Strategy/Interface/IScheduleModule.d.ts +1 -1
  72. package/src/Strategy/LayoutModule.d.ts +2 -1
  73. package/src/Strategy/LayoutModule.js +35 -2
  74. package/src/Strategy/PlusMinusModule.js +7 -4
  75. package/src/Strategy/QueryModule.d.ts +2 -8
  76. package/src/Strategy/QueryModule.js +2 -0
  77. package/src/Strategy/ScheduleModule.d.ts +4 -3
  78. package/src/Strategy/ScheduleModule.js +4 -2
  79. package/src/Strategy/ShortcutModule.js +6 -1
  80. package/src/Strategy/StatusBarModule.d.ts +2 -1
  81. package/src/Strategy/StatusBarModule.js +2 -3
  82. package/src/Strategy/Utilities/getObjectTagsViewItems.d.ts +4 -0
  83. package/src/Strategy/Utilities/getObjectTagsViewItems.js +13 -0
  84. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
  85. package/src/Utilities/Emitter.d.ts +1 -0
  86. package/src/Utilities/Emitter.js +9 -0
  87. package/src/Utilities/Extensions/TypeExtensions.d.ts +2 -0
  88. package/src/Utilities/Interface/MessagePopups.d.ts +3 -3
  89. package/src/Utilities/ObjectFactory.d.ts +2 -2
  90. package/src/Utilities/Services/AlertService.js +1 -1
  91. package/src/Utilities/Services/DataService.js +1 -1
  92. package/src/Utilities/Services/Interface/IModuleService.d.ts +1 -1
  93. package/src/Utilities/Services/ModuleService.d.ts +1 -1
  94. package/src/Utilities/Services/ModuleService.js +1 -0
  95. package/src/View/Alert/AlertStatusSubPanel.js +2 -1
  96. package/src/View/Alert/Wizard/AlertWizard.js +9 -0
  97. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +9 -0
  98. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -0
  99. package/src/View/Components/FilterForm/FilterForm.js +1 -1
  100. package/src/View/Components/FilterForm/QuickFilterForm.js +11 -7
  101. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  102. package/src/View/Components/Popups/AdaptableToaster.js +3 -1
  103. package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +3 -3
  104. package/src/View/Components/TagValueSelector/index.d.ts +13 -0
  105. package/src/View/Components/TagValueSelector/index.js +22 -0
  106. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +9 -0
  107. package/src/View/CustomSort/Wizard/CustomSortWizard.js +9 -0
  108. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +1 -1
  109. package/src/View/DataSource/Wizard/DataSourceWizard.js +10 -0
  110. package/src/View/Export/ExportSelector.d.ts +4 -0
  111. package/src/View/Export/ExportSelector.js +75 -0
  112. package/src/View/Export/ExportViewPanel.js +6 -7
  113. package/src/View/Export/ReportExportDropdown.d.ts +2 -5
  114. package/src/View/Export/Wizard/NewReportWizard.js +9 -0
  115. package/src/View/Export/constants.d.ts +2 -0
  116. package/src/View/Export/constants.js +5 -0
  117. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +9 -0
  118. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +9 -0
  119. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +9 -0
  120. package/src/View/GridInfo/GridOptionsComponent.d.ts +0 -1
  121. package/src/View/GridInfo/GridOptionsComponent.js +0 -1
  122. package/src/View/Layout/LayoutCloneButton.d.ts +6 -0
  123. package/src/View/Layout/LayoutCloneButton.js +15 -0
  124. package/src/View/Layout/LayoutRadioSelector.d.ts +2 -1
  125. package/src/View/Layout/LayoutRadioSelector.js +1 -1
  126. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -1
  127. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
  128. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +9 -0
  129. package/src/View/Query/Wizard/NamedQueryWizard.js +9 -0
  130. package/src/View/Schedule/Wizard/ScheduleWizard.js +10 -0
  131. package/src/View/Shortcut/Wizard/ShortcutWizard.js +10 -0
  132. package/src/View/StatusBar/StatusBarPopup.js +1 -1
  133. package/src/View/Wizard/ObjectTagsWizardSection.d.ts +8 -0
  134. package/src/View/Wizard/ObjectTagsWizardSection.js +22 -0
  135. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
  136. package/src/View/Wizard/OnePageAdaptableWizard.js +12 -5
  137. package/src/agGrid/Adaptable.d.ts +12 -0
  138. package/src/agGrid/Adaptable.js +80 -45
  139. package/src/agGrid/createAgStatusPanelComponent.js +1 -0
  140. package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +8 -7
  141. package/src/components/ExpressionEditor/index.js +5 -2
  142. package/src/metamodel/adaptable.metamodel.d.ts +44 -2
  143. package/src/metamodel/adaptable.metamodel.js +222 -21
  144. package/src/types.d.ts +6 -5
  145. package/version.d.ts +1 -1
  146. package/version.js +1 -1
@@ -36,9 +36,9 @@ function useOnePageWizardContext() {
36
36
  exports.useOnePageWizardContext = useOnePageWizardContext;
37
37
  exports.OnePageAdaptableWizard = (props) => {
38
38
  var _a, _b;
39
+ const { api } = AdaptableContext_1.useAdaptable();
39
40
  const dispatch = react_redux_1.useDispatch();
40
41
  const saveNamedQuery = React.useCallback((namedQuery) => dispatch(QueryRedux.NamedQueryAdd(namedQuery)), []);
41
- const { api } = AdaptableContext_1.useAdaptable();
42
42
  let defaultCurrentIndex = 0;
43
43
  if (props.defaultCurrentSectionName) {
44
44
  const candidate = props.sections.findIndex((section) => section !== '-' && section.title === props.defaultCurrentSectionName);
@@ -62,7 +62,7 @@ exports.OnePageAdaptableWizard = (props) => {
62
62
  (_a = props.onFinish) === null || _a === void 0 ? void 0 : _a.call(props, props.data);
63
63
  };
64
64
  const renderSection = (index) => {
65
- const section = props.sections[index];
65
+ const section = visibleSections[index];
66
66
  if (section === '-') {
67
67
  return React.createElement(React.Fragment, { key: index });
68
68
  }
@@ -92,7 +92,6 @@ exports.OnePageAdaptableWizard = (props) => {
92
92
  node.style.height = `${activeElement.offsetHeight}px`;
93
93
  node.style.width = `${activeElement.offsetWidth}px`;
94
94
  }, [currentSection, width]);
95
- useKeyboardNavigation_1.useKeyboardNavigation(setCurrentSection, props.sections);
96
95
  let navIndex = 0;
97
96
  const dialogRef = react_1.useRef(null);
98
97
  let invalidCount = 0;
@@ -100,12 +99,19 @@ exports.OnePageAdaptableWizard = (props) => {
100
99
  const contextValue = {
101
100
  data: props.data,
102
101
  api,
102
+ //visible sections is updated below, as this is a chicken-egg problem
103
103
  sections: props.sections,
104
104
  setCurrentSection,
105
105
  namedQuery,
106
106
  moduleInfo: props.moduleInfo,
107
107
  };
108
- const validSectionsMap = props.sections.reduce((acc, section, index) => {
108
+ const visibleSections = React.useMemo(() => {
109
+ return props.sections.filter((section) => section === '-' ||
110
+ section.isVisible == undefined ||
111
+ section.isVisible(props.data, api, contextValue));
112
+ }, [props.sections]);
113
+ contextValue.sections = visibleSections;
114
+ const validSectionsMap = visibleSections.reduce((acc, section, index) => {
109
115
  if (section === '-') {
110
116
  acc.set(index, true);
111
117
  return acc;
@@ -120,6 +126,7 @@ exports.OnePageAdaptableWizard = (props) => {
120
126
  acc.set(index, valid);
121
127
  return acc;
122
128
  }, new Map());
129
+ useKeyboardNavigation_1.useKeyboardNavigation(setCurrentSection, visibleSections);
123
130
  const canFinish = !invalidCount;
124
131
  return (React.createElement(NamedQueryContext_1.NamedQueryContext.Provider, { value: { namedQuery, setNamedQuery } },
125
132
  React.createElement(exports.OnePageAdaptableWizardContext.Provider, { value: contextValue },
@@ -150,7 +157,7 @@ exports.OnePageAdaptableWizard = (props) => {
150
157
  : '', style: Object.assign({ height: '100%', width: '90vw', maxWidth: 1000 }, props.style) },
151
158
  React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "stretch", flex: 1, style: { overflow: 'auto' } },
152
159
  React.createElement(rebass_1.Flex, { flexDirection: "column", padding: 3, className: "ab-OnePageWizard__section-title-container", ref: sizeOwnerRef, style: { overflow: 'auto', position: 'relative', flex: 'none' } },
153
- props.sections.map((section, index) => {
160
+ visibleSections.map((section, index) => {
154
161
  if (section === '-') {
155
162
  return (React.createElement(rebass_1.Box, { as: "hr", mt: 2, className: "ab-OnePageWizard__section-separator", key: `${index}-`, style: {
156
163
  width: '100%',
@@ -82,6 +82,18 @@ export declare class Adaptable implements IAdaptable {
82
82
  private _adaptableReady;
83
83
  isDestroyed: boolean;
84
84
  private agGridModules;
85
+ private listenerKeydown;
86
+ private listenerFirstDataRendered;
87
+ private listenerPivotModeChanged;
88
+ private listenerPivotChanged;
89
+ private listenerColumnRowGroupChanged;
90
+ private listenerColumnResized;
91
+ private listenerRangeSelectionChanged;
92
+ private listenerSortChanged;
93
+ private listenerModelUpdated;
94
+ private listenerGlobalSetRowSelection;
95
+ private listenerGlobalColumnEventsThatTriggerStateChange;
96
+ private listenerGlobalColumnEventsThatTriggerAutoLayoutSave;
85
97
  static init(adaptableOptions: AdaptableOptions): Promise<AdaptableApi>;
86
98
  /**
87
99
  * Lazy static constructor for Adaptable
@@ -149,31 +149,31 @@ class Adaptable {
149
149
  };
150
150
  // debounced methods
151
151
  this.debouncedSetColumnIntoStore = debounce_1.default(() => {
152
- if (!this.gridOptions.api) {
152
+ if (this.isDestroyed || !this.gridOptions.api) {
153
153
  return;
154
154
  }
155
155
  this.updateColumnsIntoStore();
156
156
  }, GeneralConstants_1.HALF_SECOND);
157
157
  this.debouncedSaveGridLayout = debounce_1.default(() => {
158
- if (!this.gridOptions.api) {
158
+ if (this.isDestroyed || !this.gridOptions.api) {
159
159
  return;
160
160
  }
161
161
  this.updateLayoutFromGrid();
162
162
  }, GeneralConstants_1.HALF_SECOND);
163
163
  this.debouncedSetSelectedCells = debounce_1.default(() => {
164
- if (!this.gridOptions.api) {
164
+ if (this.isDestroyed || !this.gridOptions.api) {
165
165
  return;
166
166
  }
167
167
  this.setSelectedCells();
168
168
  }, 250);
169
169
  this.debouncedSetSelectedRows = debounce_1.default(() => {
170
- if (!this.gridOptions.api) {
170
+ if (this.isDestroyed || !this.gridOptions.api) {
171
171
  return;
172
172
  }
173
173
  this.setSelectedRows();
174
174
  }, GeneralConstants_1.HALF_SECOND);
175
175
  this.debouncedFilterGrid = debounce_1.default((callback = () => { }) => {
176
- if (!this.gridOptions.api) {
176
+ if (this.isDestroyed || !this.gridOptions.api) {
177
177
  return;
178
178
  }
179
179
  this.applyGridFiltering();
@@ -647,8 +647,10 @@ class Adaptable {
647
647
  createStatusBars() {
648
648
  var _a, _b;
649
649
  const statusBarOptions = Object.assign({}, this.gridOptions.statusBar);
650
+ const adaptableStatusPanelKeys = [];
650
651
  const statusPanels = (_b = ((_a = statusBarOptions === null || statusBarOptions === void 0 ? void 0 : statusBarOptions.statusPanels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.map((statusPanel) => {
651
652
  if (statusPanel.statusPanel === StatusBarState_1.ADAPTABLE_STATUS_PANEL) {
653
+ adaptableStatusPanelKeys.push(statusPanel.key);
652
654
  const context = {
653
655
  Key: statusPanel.key,
654
656
  };
@@ -660,7 +662,9 @@ class Adaptable {
660
662
  this.gridOptions.statusBar = statusBarOptions;
661
663
  const statusBarModule = this.ModuleService.getModuleById(ModuleConstants.StatusBarModuleId);
662
664
  this.api.eventApi.on('AdaptableReady', () => {
663
- statusBarModule.syncStateWithOptions();
665
+ const adaptableStatusPanels = statusPanels.filter((statusPanel) => adaptableStatusPanelKeys.includes(statusPanel.key));
666
+ // need to add only the adaptable panels
667
+ statusBarModule.syncStateWithOptions(adaptableStatusPanels);
664
668
  });
665
669
  }
666
670
  getAgGridStatusPanels() {
@@ -2299,8 +2303,30 @@ class Adaptable {
2299
2303
  return this.gridOptions.api.getDisplayedRowAtIndex(firstDisplayedRowIndex);
2300
2304
  }
2301
2305
  destroy(config) {
2302
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
2306
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
2303
2307
  if (this.gridOptions && this.gridOptions.api) {
2308
+ this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_FIRST_DATA_RENDERED, this.listenerFirstDataRendered);
2309
+ this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.listenerPivotModeChanged);
2310
+ this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_CHANGED, this.listenerPivotChanged);
2311
+ this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.listenerColumnRowGroupChanged);
2312
+ this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_RANGE_SELECTION_CHANGED, this.listenerRangeSelectionChanged);
2313
+ this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_COLUMN_RESIZED, this.listenerColumnResized);
2314
+ this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_SORT_CHANGED, this.listenerSortChanged);
2315
+ this.gridOptions.api.removeEventListener(all_modules_1.Events.EVENT_MODEL_UPDATED, this.listenerModelUpdated);
2316
+ this.gridOptions.api.removeGlobalListener(this.listenerGlobalSetRowSelection);
2317
+ this.gridOptions.api.removeGlobalListener(this.listenerGlobalColumnEventsThatTriggerStateChange);
2318
+ this.gridOptions.api.removeGlobalListener(this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave);
2319
+ this.listenerFirstDataRendered = null;
2320
+ this.listenerPivotModeChanged = null;
2321
+ this.listenerPivotChanged = null;
2322
+ this.listenerColumnRowGroupChanged = null;
2323
+ this.listenerRangeSelectionChanged = null;
2324
+ this.listenerColumnResized = null;
2325
+ this.listenerGlobalSetRowSelection = null;
2326
+ this.listenerSortChanged = null;
2327
+ this.listenerModelUpdated = null;
2328
+ this.listenerGlobalColumnEventsThatTriggerStateChange = null;
2329
+ this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = null;
2304
2330
  this.gridOptions.api.__adaptable = null;
2305
2331
  this.gridOptions.api.setColumnDefs = GridApi_setColumnDefs;
2306
2332
  this.gridOptions.getRowStyle = null;
@@ -2310,11 +2336,17 @@ class Adaptable {
2310
2336
  this.gridOptions.api.destroy();
2311
2337
  }
2312
2338
  }
2339
+ const gridContainerElement = this.getAgGridContainerElement();
2340
+ if (gridContainerElement) {
2341
+ gridContainerElement.removeEventListener('keydown', this.listenerKeydown);
2342
+ this.listenerKeydown = null;
2343
+ }
2344
+ this.api.internalDestroySelf();
2313
2345
  this.colDefPropertyCache = null;
2314
2346
  this.gridOptionsPropertyCache = null;
2315
2347
  this.currentColumnDefs = null;
2316
2348
  this.rowListeners = null;
2317
- this.emitter.clearListeners();
2349
+ this.emitter.destroy();
2318
2350
  this.emitter = null;
2319
2351
  this._adaptableReady = false;
2320
2352
  Adaptable.dismissInstance(this);
@@ -2325,17 +2357,23 @@ class Adaptable {
2325
2357
  if (abContainerElement != null) {
2326
2358
  ReactDOM.unmountComponentAtNode(abContainerElement);
2327
2359
  }
2328
- (_a = this.CalculatedColumnExpressionService) === null || _a === void 0 ? void 0 : _a.destroy();
2329
- (_b = this.DataService) === null || _b === void 0 ? void 0 : _b.destroy();
2330
- (_c = this.EntitlementService) === null || _c === void 0 ? void 0 : _c.destroy();
2331
- (_d = this.ReportService) === null || _d === void 0 ? void 0 : _d.destroy();
2332
- (_e = this.ModuleService) === null || _e === void 0 ? void 0 : _e.destroy();
2333
- (_f = this.ValidationService) === null || _f === void 0 ? void 0 : _f.destroy();
2334
- (_g = this.QueryLanguageService) === null || _g === void 0 ? void 0 : _g.destroy();
2335
- (_h = this.AlertService) === null || _h === void 0 ? void 0 : _h.destroy();
2336
- (_j = this.TeamSharingService) === null || _j === void 0 ? void 0 : _j.destroy();
2337
- (_k = this.MetamodelService) === null || _k === void 0 ? void 0 : _k.destroy();
2338
- (_l = this.LicenseService) === null || _l === void 0 ? void 0 : _l.destroy();
2360
+ this.gridContainerElement = null;
2361
+ this.abContainerElement = null;
2362
+ (_a = this.adaptableStore) === null || _a === void 0 ? void 0 : _a.destroy();
2363
+ this.adaptableStore = null;
2364
+ this.gridOptions = null;
2365
+ this.adaptableOptions = null;
2366
+ (_b = this.CalculatedColumnExpressionService) === null || _b === void 0 ? void 0 : _b.destroy();
2367
+ (_c = this.DataService) === null || _c === void 0 ? void 0 : _c.destroy();
2368
+ (_d = this.EntitlementService) === null || _d === void 0 ? void 0 : _d.destroy();
2369
+ (_e = this.ReportService) === null || _e === void 0 ? void 0 : _e.destroy();
2370
+ (_f = this.ModuleService) === null || _f === void 0 ? void 0 : _f.destroy();
2371
+ (_g = this.ValidationService) === null || _g === void 0 ? void 0 : _g.destroy();
2372
+ (_h = this.QueryLanguageService) === null || _h === void 0 ? void 0 : _h.destroy();
2373
+ (_j = this.AlertService) === null || _j === void 0 ? void 0 : _j.destroy();
2374
+ (_k = this.TeamSharingService) === null || _k === void 0 ? void 0 : _k.destroy();
2375
+ (_l = this.MetamodelService) === null || _l === void 0 ? void 0 : _l.destroy();
2376
+ (_m = this.LicenseService) === null || _m === void 0 ? void 0 : _m.destroy();
2339
2377
  this.isDestroyed = true;
2340
2378
  }
2341
2379
  // really really need to do this properly but as a temp fix lets create a default style for when no data
@@ -2430,7 +2468,7 @@ class Adaptable {
2430
2468
  }
2431
2469
  const gridContainerElement = this.getAgGridContainerElement();
2432
2470
  if (gridContainerElement) {
2433
- gridContainerElement.addEventListener('keydown', (event) => this._emit('KeyDown', event));
2471
+ gridContainerElement.addEventListener('keydown', (this.listenerKeydown = (event) => this._emit('KeyDown', event)));
2434
2472
  }
2435
2473
  /*********************
2436
2474
  * AG Grid EVENTS
@@ -2450,28 +2488,28 @@ class Adaptable {
2450
2488
  all_modules_1.Events.EVENT_COLUMN_VISIBLE,
2451
2489
  all_modules_1.Events.EVENT_NEW_COLUMNS_LOADED,
2452
2490
  ];
2453
- this.gridOptions.api.addGlobalListener((type) => {
2491
+ this.gridOptions.api.addGlobalListener((this.listenerGlobalColumnEventsThatTriggerStateChange = (type) => {
2454
2492
  if (columnEventsThatTriggersStateChange.indexOf(type) > -1) {
2455
2493
  this.debouncedSetColumnIntoStore();
2456
2494
  this.debouncedFilterGrid();
2457
2495
  }
2458
- });
2496
+ }));
2459
2497
  /**
2460
2498
  * Use Case: initial data has been displayed in grid
2461
2499
  * Action1: Set the Layout
2462
2500
  * Action2: Ensure that we have set column data types
2463
2501
  * Note: Deals with scenario where the data is provided to AdapTable after grid has been setup
2464
2502
  */
2465
- this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_FIRST_DATA_RENDERED, () => {
2503
+ this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_FIRST_DATA_RENDERED, (this.listenerFirstDataRendered = () => {
2466
2504
  this.checkColumnsDataTypeSet();
2467
2505
  this.setLayout();
2468
- });
2506
+ }));
2469
2507
  /**
2470
2508
  * Use Case: Entered or Left Pivot Mode
2471
2509
  * Action 1: Autosize pivot columns when entering pivot mode (if autosize pivot in Layout is true)
2472
2510
  * Action 2: Set pivot mode on / off in api as necessary
2473
2511
  */
2474
- this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, (params) => {
2512
+ this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, (this.listenerPivotModeChanged = (params) => {
2475
2513
  if (params.type == 'columnPivotModeChanged' &&
2476
2514
  params.columnApi != null &&
2477
2515
  params.columnApi.columnController != null &&
@@ -2484,12 +2522,12 @@ class Adaptable {
2484
2522
  else {
2485
2523
  this.api.internalApi.setPivotModeOff();
2486
2524
  }
2487
- });
2525
+ }));
2488
2526
  /**
2489
2527
  * Use Case: A pivot column has changed
2490
2528
  * Action: Autosize pivot columns (if autosize pivot in Layout is true)
2491
2529
  */
2492
- this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_CHANGED, (params) => {
2530
+ this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_CHANGED, (this.listenerPivotChanged = (params) => {
2493
2531
  if (params.type == 'columnPivotChanged' &&
2494
2532
  params.columnApi != null &&
2495
2533
  params.columnApi.columnController != null &&
@@ -2498,7 +2536,7 @@ class Adaptable {
2498
2536
  this.gridOptions.columnApi.autoSizeAllColumns();
2499
2537
  }
2500
2538
  }
2501
- });
2539
+ }));
2502
2540
  /**
2503
2541
  * Use Case: Things have changed in the grid that require the Layout to be saved
2504
2542
  * Action: Save the Layout (on a debounce)
@@ -2513,16 +2551,16 @@ class Adaptable {
2513
2551
  all_modules_1.Events.EVENT_ROW_GROUP_OPENED,
2514
2552
  all_modules_1.Events.EVENT_COLUMN_VALUE_CHANGED,
2515
2553
  ];
2516
- this.gridOptions.api.addGlobalListener((type) => {
2554
+ this.gridOptions.api.addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
2517
2555
  if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
2518
2556
  this.debouncedSaveGridLayout();
2519
2557
  }
2520
- });
2558
+ }));
2521
2559
  /**
2522
2560
  * Use Case: A visible Column has become row grouped and 'hideColumnWhenGrouped' is true
2523
2561
  * Action: Make the column invisible
2524
2562
  */
2525
- this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGED, (params) => {
2563
+ this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGED, (this.listenerColumnRowGroupChanged = (params) => {
2526
2564
  if (this.api.internalApi.isGridInPivotMode()) {
2527
2565
  return;
2528
2566
  }
@@ -2534,17 +2572,17 @@ class Adaptable {
2534
2572
  }
2535
2573
  });
2536
2574
  }
2537
- });
2575
+ }));
2538
2576
  /**
2539
2577
  * Use Case: A Column has finished being resized
2540
2578
  * Action 1: Save the Layout (on a debounce)
2541
2579
  * Action 2: Emit the internal ColumnResized event - used by Sparkline Column (in Charts)
2542
2580
  */
2543
- this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_RESIZED, (params) => {
2581
+ this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_RESIZED, (this.listenerColumnResized = (params) => {
2544
2582
  if (params.finished == true && params.type == 'columnResized' && params.column) {
2545
2583
  this.debouncedSaveGridLayout();
2546
2584
  }
2547
- });
2585
+ }));
2548
2586
  /**
2549
2587
  * Use Case: Row Selection has changed
2550
2588
  * Action: Set Selected Rows (on a debeounce)
@@ -2554,35 +2592,35 @@ class Adaptable {
2554
2592
  all_modules_1.Events.EVENT_SELECTION_CHANGED,
2555
2593
  all_modules_1.Events.EVENT_ROW_SELECTED,
2556
2594
  ];
2557
- this.gridOptions.api.addGlobalListener((type) => {
2595
+ this.gridOptions.api.addGlobalListener((this.listenerGlobalSetRowSelection = (type) => {
2558
2596
  if (ArrayExtensions_1.ArrayExtensions.ContainsItem(columnEventsThatTriggerSetRowSelection, type)) {
2559
2597
  this.debouncedSetSelectedRows();
2560
2598
  }
2561
- });
2599
+ }));
2562
2600
  /**
2563
2601
  * Use Case: User has selected a range of cells
2564
2602
  * Action: Set Selected Cells (on a debounce)
2565
2603
  */
2566
- this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_RANGE_SELECTION_CHANGED, (params) => {
2604
+ this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_RANGE_SELECTION_CHANGED, (this.listenerRangeSelectionChanged = (params) => {
2567
2605
  if (params.finished == true) {
2568
2606
  this.debouncedSetSelectedCells();
2569
2607
  }
2570
- });
2608
+ }));
2571
2609
  /**
2572
2610
  * Use Case: Sort has changed in the Grid
2573
2611
  * Action1: Update AdapTable Sort Info
2574
2612
  * Action2: Set Selected Cells (on a debounce)
2575
2613
  */
2576
- this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_SORT_CHANGED, (params) => {
2614
+ this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_SORT_CHANGED, (this.listenerSortChanged = () => {
2577
2615
  this.onSortChanged();
2578
2616
  this.debouncedSetSelectedCells();
2579
- });
2617
+ }));
2580
2618
  const showGroupingTotalsAsHeader = this.adaptableOptions.generalOptions.showGroupingTotalsAsHeader;
2581
2619
  /**
2582
2620
  * Use Case: Model has updated
2583
2621
  * Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
2584
2622
  */
2585
- this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_MODEL_UPDATED, (params) => {
2623
+ this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_MODEL_UPDATED, (this.listenerModelUpdated = (params) => {
2586
2624
  if (showGroupingTotalsAsHeader) {
2587
2625
  if (params && params.api) {
2588
2626
  const pinnedData = params.api.getPinnedTopRow(0);
@@ -2596,7 +2634,7 @@ class Adaptable {
2596
2634
  }
2597
2635
  }
2598
2636
  }
2599
- });
2637
+ }));
2600
2638
  /**
2601
2639
  * Row and Cell listeners created in 2020
2602
2640
  * These have supplanted many of the events we previously had and simplified things
@@ -3147,9 +3185,6 @@ class Adaptable {
3147
3185
  }
3148
3186
  const valueSetter = (params) => {
3149
3187
  var _a;
3150
- if (preventEditAlertsForColumn.length) {
3151
- return false;
3152
- }
3153
3188
  const field = params.column.getColDef().field;
3154
3189
  if (noValidations) {
3155
3190
  //TODO also consider the case when userValueSetter is a string
@@ -10,6 +10,7 @@ exports.createAgStatusPanelComponent = (component, adaptable, context) => {
10
10
  init(params) {
11
11
  this.params = params;
12
12
  this.eGui = document.createElement('div');
13
+ this.eGui.classList.add('ab-StatusBar');
13
14
  this.render();
14
15
  }
15
16
  render() {
@@ -1,25 +1,26 @@
1
1
  /// <reference types="react" />
2
2
  import { AdaptableFormData, AdaptableForm } from '../../PredefinedConfig/Common/AdaptableForm';
3
3
  import { SimpleButtonProps } from '../SimpleButton';
4
+ import { BaseContext } from '../../types';
4
5
  import { AdaptableApi } from '../../Api/AdaptableApi';
5
- import { AdaptableButton, ButtonContext } from '../../PredefinedConfig/Common/AdaptableButton';
6
+ import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
6
7
  interface AdaptableFormComponentProps {
7
- formDef: AdaptableForm<ButtonContext>;
8
+ formDef: AdaptableForm<BaseContext>;
8
9
  data: AdaptableFormData;
9
10
  onChange: (data: AdaptableFormData) => void;
10
- onButtonClick?: (button: AdaptableButton<ButtonContext>) => void;
11
+ onButtonClick?: (button: AdaptableButton<BaseContext>) => void;
11
12
  displayTitle: boolean;
12
13
  api: AdaptableApi;
13
- context?: ButtonContext;
14
+ context?: BaseContext;
14
15
  focusFirstButton?: boolean;
15
16
  }
16
17
  export declare function AdaptableFormComponentButtons({ formDef, onClick, defaultTone, disabledButtons, api, context, focusFirstButton, }: {
17
18
  disabledButtons?: boolean[];
18
19
  defaultTone: SimpleButtonProps['tone'];
19
- onClick: (button: AdaptableButton<ButtonContext>) => void;
20
- formDef: AdaptableForm<ButtonContext>;
20
+ onClick: (button: AdaptableButton<BaseContext>) => void;
21
+ formDef: AdaptableForm<BaseContext>;
21
22
  api: AdaptableApi;
22
- context: ButtonContext;
23
+ context: BaseContext;
23
24
  focusFirstButton?: boolean;
24
25
  }): JSX.Element;
25
26
  export declare function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displayTitle, api, context, focusFirstButton, }: AdaptableFormComponentProps): JSX.Element;
@@ -168,8 +168,11 @@ const renderQueryHints = (type) => {
168
168
  }
169
169
  if (type === 'aggregatedScalar') {
170
170
  examples.push({
171
- code: 'TODO',
172
- description: 'TODO',
171
+ code: 'AVG([stargazers_count], GROUP_BY([language]))',
172
+ description: 'Average popularity (number of stars) of all the Github repositories, grouped by programming language',
173
+ }, {
174
+ code: 'CUMUL( SUM([PnL]), OVER([TradeDate]))',
175
+ description: "The cumulative sum of all 'PnL' columns in the order given by the 'TradeDate' column",
173
176
  });
174
177
  }
175
178
  return examples.length ? (React.createElement(rebass_1.Box, { "data-name": "expression-hints", my: 2, p: 2, style: {
@@ -793,6 +793,14 @@ export declare const ADAPTABLE_METAMODEL: {
793
793
  isOptional: boolean;
794
794
  gridInfo: string;
795
795
  defaultValue: string;
796
+ } | {
797
+ name: string;
798
+ kind: string;
799
+ description: string;
800
+ uiLabel: string;
801
+ isOptional: boolean;
802
+ defaultValue: string;
803
+ gridInfo?: undefined;
796
804
  })[];
797
805
  };
798
806
  AlertProperties: {
@@ -889,7 +897,7 @@ export declare const ADAPTABLE_METAMODEL: {
889
897
  isOptional: boolean;
890
898
  }[];
891
899
  };
892
- BaseMenuContext: {
900
+ BaseContext: {
893
901
  name: string;
894
902
  kind: string;
895
903
  description: string;
@@ -1109,7 +1117,7 @@ export declare const ADAPTABLE_METAMODEL: {
1109
1117
  uiLabel: string;
1110
1118
  }[];
1111
1119
  };
1112
- CellSummaryOperationParams: {
1120
+ CellSummaryOperationContext: {
1113
1121
  name: string;
1114
1122
  kind: string;
1115
1123
  description: string;
@@ -2837,6 +2845,11 @@ export declare const ADAPTABLE_METAMODEL: {
2837
2845
  kind: string;
2838
2846
  description: string;
2839
2847
  };
2848
+ IsObjectAvailableInLayoutContext: {
2849
+ name: string;
2850
+ kind: string;
2851
+ description: string;
2852
+ };
2840
2853
  Layout: {
2841
2854
  name: string;
2842
2855
  kind: string;
@@ -2866,6 +2879,11 @@ export declare const ADAPTABLE_METAMODEL: {
2866
2879
  uiLabel: string;
2867
2880
  }[];
2868
2881
  };
2882
+ LayoutAssociatedObject: {
2883
+ name: string;
2884
+ kind: string;
2885
+ description: string;
2886
+ };
2869
2887
  LayoutChangedInfo: {
2870
2888
  name: string;
2871
2889
  kind: string;
@@ -2889,6 +2907,15 @@ export declare const ADAPTABLE_METAMODEL: {
2889
2907
  kind: string;
2890
2908
  description: string;
2891
2909
  properties: ({
2910
+ name: string;
2911
+ kind: string;
2912
+ description: string;
2913
+ uiLabel: string;
2914
+ isOptional: boolean;
2915
+ gridInfo?: undefined;
2916
+ defaultValue?: undefined;
2917
+ reference?: undefined;
2918
+ } | {
2892
2919
  name: string;
2893
2920
  kind: string;
2894
2921
  description: string;
@@ -2896,12 +2923,14 @@ export declare const ADAPTABLE_METAMODEL: {
2896
2923
  isOptional: boolean;
2897
2924
  gridInfo: string;
2898
2925
  defaultValue: string;
2926
+ reference?: undefined;
2899
2927
  } | {
2900
2928
  name: string;
2901
2929
  kind: string;
2902
2930
  description: string;
2903
2931
  uiLabel: string;
2904
2932
  isOptional: boolean;
2933
+ reference: string;
2905
2934
  gridInfo?: undefined;
2906
2935
  defaultValue?: undefined;
2907
2936
  })[];
@@ -2918,6 +2947,19 @@ export declare const ADAPTABLE_METAMODEL: {
2918
2947
  isOptional: boolean;
2919
2948
  }[];
2920
2949
  };
2950
+ LayoutViewOptions: {
2951
+ name: string;
2952
+ kind: string;
2953
+ description: string;
2954
+ properties: {
2955
+ name: string;
2956
+ kind: string;
2957
+ description: string;
2958
+ uiLabel: string;
2959
+ isOptional: boolean;
2960
+ defaultValue: string;
2961
+ }[];
2962
+ };
2921
2963
  LiveDataChangedInfo: {
2922
2964
  name: string;
2923
2965
  kind: string;