@adaptabletools/adaptable 15.2.2 → 15.2.3

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 (36) hide show
  1. package/bundle.cjs.js +158 -158
  2. package/package.json +2 -2
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +10 -1
  6. package/src/AdaptableOptions/AlertOptions.d.ts +2 -3
  7. package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +4 -0
  8. package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
  9. package/src/Api/Glue42Api.d.ts +0 -38
  10. package/src/Api/IPushPullApi.d.ts +0 -30
  11. package/src/Api/Implementation/LayoutApiImpl.js +2 -2
  12. package/src/Api/Internal/AlertInternalApi.d.ts +3 -1
  13. package/src/Api/Internal/AlertInternalApi.js +30 -5
  14. package/src/Api/Internal/QueryLanguageInternalApi.d.ts +3 -1
  15. package/src/Api/Internal/QueryLanguageInternalApi.js +25 -1
  16. package/src/Api/OpenFinApi.d.ts +1 -15
  17. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +17 -2
  18. package/src/PredefinedConfig/Common/Menu.d.ts +4 -0
  19. package/src/PredefinedConfig/Common/Types.d.ts +1 -1
  20. package/src/PredefinedConfig/DashboardState.d.ts +8 -8
  21. package/src/Strategy/AlertModule.js +15 -12
  22. package/src/Strategy/ExportModule.d.ts +2 -0
  23. package/src/Strategy/ExportModule.js +64 -25
  24. package/src/Utilities/Helpers/FormatHelper.js +13 -1
  25. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +2 -2
  26. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +15 -4
  27. package/src/agGrid/Adaptable.js +10 -21
  28. package/src/agGrid/agGridMenuHelper.js +6 -0
  29. package/src/agGrid/attachAddaptableColumnTypes.d.ts +15 -0
  30. package/src/agGrid/attachAddaptableColumnTypes.js +21 -0
  31. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +30 -1
  32. package/src/components/Dashboard/DashboardManager.js +11 -5
  33. package/src/metamodel/adaptable.metamodel.d.ts +6 -0
  34. package/src/metamodel/adaptable.metamodel.js +1 -1
  35. package/version.d.ts +1 -1
  36. package/version.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "15.2.2",
3
+ "version": "15.2.3",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -56,6 +56,6 @@
56
56
  "uuid": "^3.3.2"
57
57
  },
58
58
  "peerDependencies": {
59
- "@ag-grid-community/core": ">=29.2.0"
59
+ "@ag-grid-community/core": ">=29.3.0"
60
60
  }
61
61
  }
@@ -1,2 +1,2 @@
1
- declare const _default: 1682423805441;
1
+ declare const _default: 1683893995240;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1682423805441;
3
+ exports.default = 1683893995240;
@@ -1,9 +1,10 @@
1
- import { AdaptablePredicateDef } from '../PredefinedConfig/Common/AdaptablePredicate';
1
+ import { AdaptablePredicate, AdaptablePredicateDef } from '../PredefinedConfig/Common/AdaptablePredicate';
2
2
  import { AdaptableQLModule } from '../PredefinedConfig/Common/Types';
3
3
  import { BaseContext } from '../PredefinedConfig/Common/BaseContext';
4
4
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
5
5
  import { ExpressionOptions } from './ExpressionOptions';
6
6
  import { PredicateOptions } from './PredicateOptions';
7
+ import { AdaptableObject } from '../types';
7
8
  /**
8
9
  * Options for managing AdapTableQL - the Adaptable Query Language which evaluates Predicates and Expressions
9
10
  */
@@ -49,10 +50,18 @@ export interface EvaluateExpressionExternallyContext<TData = any> extends BaseCo
49
50
  * Module where Expression is being evaluated
50
51
  */
51
52
  module: AdaptableQLModule;
53
+ /**
54
+ * The AdapTable Object which contains the Expression or Predicates
55
+ */
56
+ object?: AdaptableObject;
52
57
  /**
53
58
  * Expression to evaluate
54
59
  */
55
60
  expression?: string;
61
+ /**
62
+ * Any Predicates to evaluate
63
+ */
64
+ predicates?: AdaptablePredicate[];
56
65
  /**
57
66
  * Columns contained in Expression
58
67
  */
@@ -103,12 +103,11 @@ export interface AlertMessageContext<TData = any> {
103
103
  */
104
104
  alertDefinition: AlertDefinition;
105
105
  /**
106
- * Data change that might have triggered the Alert
106
+ * Cell Data change that might have triggered the Alert
107
107
  */
108
108
  cellDataChangedInfo?: CellDataChangedInfo<TData>;
109
109
  /**
110
- * When alert is triggered by a Grid Data Change
111
- * e.g. Row Added, Row Removed
110
+ * Grid Data change that might have triggered the Alert (i.e. RowAdded / RowRemoved)
112
111
  */
113
112
  gridDataChangedInfo?: GridDataChangedInfo<TData>;
114
113
  }
@@ -1,3 +1,4 @@
1
+ import { IRowNode } from '@ag-grid-community/core';
1
2
  import { AdaptableOptions, BaseContext } from '../types';
2
3
  /**
3
4
  * Plugin Options used when creating a Master / Detail grid - passed into the plugin as the only argument.
@@ -16,4 +17,7 @@ export interface MasterDetailPluginOptions {
16
17
  * Context passed to Detail Grids when using Master Detail Plugin
17
18
  */
18
19
  export interface DetailInitContext extends BaseContext {
20
+ rowNode: IRowNode;
21
+ data: IRowNode['data'];
22
+ primaryKeyValue: unknown;
19
23
  }
@@ -4,19 +4,19 @@ import { AdaptablePredicateDef, AdaptableScope, BaseContext, PredicateModuleScop
4
4
  */
5
5
  export interface PredicateOptions {
6
6
  /**
7
- * Which System Filter Predicates are available - List or Function
7
+ * Which System Filter Predicates are available
8
8
  */
9
9
  systemFilterPredicates?: SystemFilterPredicateIds | ((context: SystemPredicatesContext) => SystemFilterPredicateIds);
10
10
  /**
11
- * Which System Alert Predicates are available - List or Function
11
+ * Which System Alert Predicates are available
12
12
  */
13
13
  systemAlertPredicates?: SystemAlertPredicateIds | ((context: SystemPredicatesContext) => SystemAlertPredicateIds);
14
14
  /**
15
- * Which System Format Column Predicates are available - List or Function
15
+ * Which System Format Column Predicates are available
16
16
  */
17
17
  systemFormatColumnPredicates?: SystemFormatColumnPredicateIds | ((context: SystemPredicatesContext) => SystemFormatColumnPredicateIds);
18
18
  /**
19
- * Which System Flashing Cell Predicates are available - List or Function
19
+ * Which System Flashing Cell Predicates are available
20
20
  */
21
21
  systemFlashingCellPredicates?: SystemFlashingCellPredicateIds | ((context: SystemPredicatesContext) => SystemFlashingCellPredicateIds);
22
22
  }
@@ -31,42 +31,10 @@ export interface Glue42Api {
31
31
  * Logs out the currently logged in User from Glue42
32
32
  */
33
33
  logoutFromGlue42(): void;
34
- /**
35
- * Sets an Error Message returned from Glue42 if login fails
36
- *
37
- * For internal use only
38
- *
39
- * @param loginErrorMessage errorMessage to display
40
- */
41
- setGlue42LoginErrorMessage(loginErrorMessage: string): void;
42
34
  /**
43
35
  * Retrieves the current Live Report
44
36
  */
45
37
  getCurrentLiveGlue42Report(): Glue42Report | undefined;
46
- /**
47
- * Sets Glue42 Availability On
48
- *
49
- * For internal use only
50
- */
51
- setGlue42AvailableOn(): void;
52
- /**
53
- * Sets Glue42 Availability Off
54
- *
55
- * For internal use only
56
- */
57
- setGlue42AvailableOff(): void;
58
- /**
59
- * Sets Glue42 Running On
60
- *
61
- * For internal use only
62
- */
63
- setGlue42RunningOn(): void;
64
- /**
65
- * Sets Glue42 Running Off
66
- *
67
- * For internal use only
68
- */
69
- setGlue42RunningOff(): void;
70
38
  /**
71
39
  * Retrieves all the Glue42 Schedules in from the Schedule section of AdapTable State
72
40
  */
@@ -86,12 +54,6 @@ export interface Glue42Api {
86
54
  *
87
55
  */
88
56
  stopLiveData(): void;
89
- /**
90
- * Clears all Gluee42 Internal State
91
- *
92
- * For internal use only
93
- */
94
- clearGlue42InternalState(): void;
95
57
  /**
96
58
  * Starts a Snapshot as opposed to a Live report
97
59
  *
@@ -119,44 +119,18 @@ export interface IPushPullApi {
119
119
  * @param password password to send to ipushpull
120
120
  */
121
121
  loginToIPushPull(userName: string, password: string): void;
122
- /**
123
- * Internal AdapTable method used to manage domains
124
- */
125
- retrieveIPushPullDomainsFromIPushPull(): void;
126
122
  /**
127
123
  * Logs out the current user from ipushpull (changes ipushpull toolbar to show Login button)
128
124
  */
129
125
  logoutFromIPushPull(): void;
130
- /**
131
- * Internal method which displays given message in ipushpull login page
132
- *
133
- * @param message login error message to show
134
- */
135
- setIPushPullLoginErrorMessage(message: string): void;
136
126
  /**
137
127
  * Gets ipushpull schedules ie. reports set to run at particular times
138
128
  */
139
129
  getIPushPullSchedules(): IPushPullSchedule[];
140
- /**
141
- * Internal method which sets ipushpull is available
142
- */
143
- setIPushPullAvailableOn(): void;
144
- /**
145
- * Internal method which sets ipushpull is unavailable
146
- */
147
- setIPushPullAvailableOff(): void;
148
130
  /**
149
131
  * Checks if an ipushpull instance has been provided by the user
150
132
  */
151
133
  isIPushPullAvailable(): boolean | undefined;
152
- /**
153
- * Internal method which sets ipushpull is running
154
- */
155
- setIPushPullRunningOn(): void;
156
- /**
157
- * Internal method which sets ipushpull is not running
158
- */
159
- setIPushPullRunningOff(): void;
160
134
  /**
161
135
  * Checks to see if ipushpull is running (i.e. a user has successfully logged in)
162
136
  */
@@ -169,8 +143,4 @@ export interface IPushPullApi {
169
143
  * Whether to display System Reports in ipushpull toolbar
170
144
  */
171
145
  includeSystemReports(): boolean;
172
- /**
173
- * Internal method which clears out ipushpull State
174
- */
175
- clearIPushPullInternalState(): void;
176
146
  }
@@ -19,7 +19,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
19
19
  super(adaptable);
20
20
  this.shouldAutoSaveLayout = (layout) => {
21
21
  var _a;
22
- let autoSave = (_a = this.adaptable.adaptableOptions.layoutOptions) === null || _a === void 0 ? void 0 : _a.autoSaveLayouts;
22
+ let autoSave = (_a = this.getLayoutOptions()) === null || _a === void 0 ? void 0 : _a.autoSaveLayouts;
23
23
  if (layout && layout.AutoSave != null) {
24
24
  autoSave = layout.AutoSave;
25
25
  }
@@ -92,7 +92,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
92
92
  saveCurrentLayout() {
93
93
  var _a;
94
94
  let currentLayout = this.getCurrentLayout();
95
- if (!((_a = this.adaptable.adaptableOptions.layoutOptions) === null || _a === void 0 ? void 0 : _a.autoSaveLayouts)) {
95
+ if (!((_a = this.getLayoutOptions()) === null || _a === void 0 ? void 0 : _a.autoSaveLayouts)) {
96
96
  currentLayout = this.getAdaptableState().Grid.CurrentLayout || currentLayout;
97
97
  }
98
98
  if (currentLayout) {
@@ -1,7 +1,7 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { AdaptableForm, AdaptableFormData } from '../../PredefinedConfig/Common/AdaptableForm';
3
3
  import { AlertFormContext } from '../../AdaptableOptions/AlertOptions';
4
- import { AdaptableAlertAction, AlertButton, AlertButtonForm, AlertDefinition } from '../../PredefinedConfig/AlertState';
4
+ import { AdaptableAlertAction, AlertButton, AlertButtonForm, AlertDefinition, AlertRule } from '../../PredefinedConfig/AlertState';
5
5
  import { AdaptableAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert } from '../../PredefinedConfig/Common/AdaptableAlert';
6
6
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
7
7
  import { GridDataChangedInfo } from '../Events/GridDataChanged';
@@ -12,6 +12,7 @@ import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
12
12
  import { ButtonStyle } from '../../PredefinedConfig/Common/ButtonStyle';
13
13
  import { IRowNode } from '@ag-grid-community/core';
14
14
  export declare class AlertInternalApi extends ApiBase {
15
+ getExpressionForAlertRule(alertRule: AlertRule): string | undefined;
15
16
  /**
16
17
  * Retrieves the Adaptable Form with the given name
17
18
  * @param name name of the Form
@@ -145,4 +146,5 @@ export declare class AlertInternalApi extends ApiBase {
145
146
  private isAlertPredicateTriggered;
146
147
  isAlertDefinitionForRowChangeEvent(alertDefinition: AlertDefinition): boolean;
147
148
  showAlertForDefinitions(cellDataChangedInfo: CellDataChangedInfo, alertDefinitions?: AlertDefinition[]): void;
149
+ shouldFireAlertOnClient(alertDefinition: AlertDefinition): boolean;
148
150
  }
@@ -9,6 +9,17 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exten
9
9
  const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
10
10
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
11
11
  class AlertInternalApi extends ApiBase_1.ApiBase {
12
+ getExpressionForAlertRule(alertRule) {
13
+ var expression;
14
+ expression = alertRule.BooleanExpression
15
+ ? alertRule.BooleanExpression
16
+ : alertRule.AggregatedBooleanExpression
17
+ ? alertRule.AggregatedBooleanExpression
18
+ : alertRule.ObservableExpression
19
+ ? alertRule.ObservableExpression
20
+ : undefined;
21
+ return expression;
22
+ }
12
23
  /**
13
24
  * Retrieves the Adaptable Form with the given name
14
25
  * @param name name of the Form
@@ -317,7 +328,6 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
317
328
  }
318
329
  getAdaptableFormFromAlertForm(alertForm, context, defaultMessageType) {
319
330
  var _a, _b;
320
- const api = this.adaptable.api;
321
331
  let adaptableAlertForm;
322
332
  let isActionForm = false;
323
333
  if (typeof alertForm === 'string') {
@@ -327,7 +337,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
327
337
  else {
328
338
  adaptableAlertForm = Object.assign(Object.assign({}, alertForm), { buttons: (alertForm.Buttons || []).map((alertButton) => {
329
339
  return Object.assign(Object.assign({}, alertButton), { onClick: () => {
330
- api.alertApi.internalApi.executeAlertButton(alertButton, context);
340
+ this.executeAlertButton(alertButton, context);
331
341
  } });
332
342
  }) });
333
343
  isActionForm = true;
@@ -408,7 +418,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
408
418
  return (_c = (_b = (_a = alertDefinition === null || alertDefinition === void 0 ? void 0 : alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.some) === null || _c === void 0 ? void 0 : _c.call(_b, (predicate) => predicate.PredicateId === removedRowPredicate);
409
419
  }
410
420
  getAlertDefinitionsForCellDataChange(dataChangedEvent) {
411
- const allActiveNonReactiveDefinitions = this.getAdaptableApi().alertApi.internalApi.getActiveNonReactiveAlertDefinitions();
421
+ const allActiveNonReactiveDefinitions = this.getActiveNonReactiveAlertDefinitions();
412
422
  let relatedAlertDefinitions = allActiveNonReactiveDefinitions
413
423
  .filter((v) => this.getAdaptableApi().scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
414
424
  .filter((alertDefinition) => !(0, AdaptableQuery_1.isReactiveQuery)(alertDefinition.Rule));
@@ -476,9 +486,24 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
476
486
  }
477
487
  showAlertForDefinitions(cellDataChangedInfo, alertDefinitions = []) {
478
488
  alertDefinitions.forEach((alertDefinition) => {
479
- const alert = ObjectFactory_1.default.CreateCellChangedAlert(this.getAdaptableApi().alertApi.internalApi.getAlertMessageHeader(alertDefinition, cellDataChangedInfo), this.getAdaptableApi().alertApi.internalApi.getAlertDescription(alertDefinition, cellDataChangedInfo), alertDefinition, cellDataChangedInfo);
480
- this.getAdaptableApi().alertApi.showAdaptableAlert(alert);
489
+ if (this.shouldFireAlertOnClient(alertDefinition)) {
490
+ const alert = ObjectFactory_1.default.CreateCellChangedAlert(this.getAlertMessageHeader(alertDefinition, cellDataChangedInfo), this.getAlertDescription(alertDefinition, cellDataChangedInfo), alertDefinition, cellDataChangedInfo);
491
+ this.getAdaptableApi().alertApi.showAdaptableAlert(alert);
492
+ }
481
493
  });
482
494
  }
495
+ shouldFireAlertOnClient(alertDefinition) {
496
+ const rule = alertDefinition.Rule;
497
+ if (rule) {
498
+ if (rule.Predicates) {
499
+ return this.getAdaptableApi().queryLanguageApi.internalApi.evaluatePredicatesInAdaptableQL('Alert', alertDefinition, alertDefinition.Rule.Predicates);
500
+ }
501
+ else {
502
+ var expression = this.getExpressionForAlertRule(rule);
503
+ return this.getAdaptableApi().queryLanguageApi.internalApi.evaluateExpressionInAdaptableQL('Alert', alertDefinition, expression);
504
+ }
505
+ }
506
+ return true;
507
+ }
483
508
  }
484
509
  exports.AlertInternalApi = AlertInternalApi;
@@ -1,5 +1,6 @@
1
1
  import { ApiBase } from '../Implementation/ApiBase';
2
2
  import { AdaptableQLModule } from '../../PredefinedConfig/Common/Types';
3
+ import { AdaptableObject, AdaptablePredicate } from '../../types';
3
4
  export declare class QueryLanguageInternalApi extends ApiBase {
4
5
  /**
5
6
  * Checks if a column is referenced in a given Expression
@@ -7,5 +8,6 @@ export declare class QueryLanguageInternalApi extends ApiBase {
7
8
  * @param expression Expression to Lookup
8
9
  */
9
10
  isColumnReferencedInExpression(columnId: string, expression: string): boolean;
10
- evaluateExpressionInAdaptableQL(module: AdaptableQLModule, expression?: string): boolean;
11
+ evaluateExpressionInAdaptableQL(module: AdaptableQLModule, object?: AdaptableObject, expression?: string): boolean;
12
+ evaluatePredicatesInAdaptableQL(module: AdaptableQLModule, object?: AdaptableObject, predicates?: AdaptablePredicate[]): boolean;
11
13
  }
@@ -12,7 +12,7 @@ class QueryLanguageInternalApi extends ApiBase_1.ApiBase {
12
12
  const colIds = this.getQueryLanguageApi().getColumnsFromExpression(expression);
13
13
  return colIds.some((c) => c === columnId);
14
14
  }
15
- evaluateExpressionInAdaptableQL(module, expression) {
15
+ evaluateExpressionInAdaptableQL(module, object, expression) {
16
16
  var _a;
17
17
  const evaluateExpressionExternallyFn = (_a = this.getAdaptableQLOptions()) === null || _a === void 0 ? void 0 : _a.evaluateAdaptableQLExternally;
18
18
  if (typeof evaluateExpressionExternallyFn !== 'function') {
@@ -22,6 +22,9 @@ class QueryLanguageInternalApi extends ApiBase_1.ApiBase {
22
22
  adaptableApi: this.getAdaptableApi(),
23
23
  module,
24
24
  };
25
+ if (object) {
26
+ context.object = object;
27
+ }
25
28
  if (expression) {
26
29
  context.expression = expression;
27
30
  context.referencedColumns = this.getAdaptableApi()
@@ -30,5 +33,26 @@ class QueryLanguageInternalApi extends ApiBase_1.ApiBase {
30
33
  }
31
34
  return !evaluateExpressionExternallyFn(context);
32
35
  }
36
+ evaluatePredicatesInAdaptableQL(module, object, predicates) {
37
+ var _a;
38
+ const evaluateExpressionExternallyFn = (_a = this.getAdaptableQLOptions()) === null || _a === void 0 ? void 0 : _a.evaluateAdaptableQLExternally;
39
+ if (typeof evaluateExpressionExternallyFn !== 'function') {
40
+ return true;
41
+ }
42
+ const context = {
43
+ adaptableApi: this.getAdaptableApi(),
44
+ module,
45
+ };
46
+ if (object) {
47
+ context.object = object;
48
+ }
49
+ if (predicates) {
50
+ context.predicates = predicates;
51
+ // need to find a way to get the columns in the predicates
52
+ // cand do later
53
+ // this.getAdaptableApi().scopeApi.getColumnsForScope();
54
+ }
55
+ return !evaluateExpressionExternallyFn(context);
56
+ }
33
57
  }
34
58
  exports.QueryLanguageInternalApi = QueryLanguageInternalApi;
@@ -1,8 +1,6 @@
1
- import { OpenFinState, OpenFinReport, OpenFinSchedule } from '../PredefinedConfig/OpenFinState';
1
+ import { OpenFinReport, OpenFinSchedule, OpenFinState } from '../PredefinedConfig/OpenFinState';
2
2
  import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
3
3
  import { OpenFinPluginOptions } from '../AdaptableOptions/OpenFinPluginOptions';
4
- import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
5
- import { AlertOptions } from '../AdaptableOptions/AlertOptions';
6
4
  /**
7
5
  * Provides run-time access to the OpenFin Plugin
8
6
  */
@@ -41,14 +39,6 @@ export interface OpenFinApi {
41
39
  * Retrieves the OpenFin currently sending live data to Excel
42
40
  */
43
41
  getCurrentLiveOpenFinReport(): OpenFinReport | undefined;
44
- /**
45
- * Gets the Notification section from Adaptable Options
46
- */
47
- getNotificationsOptions(): NotificationsOptions;
48
- /**
49
- * Gets the Alert section from Adaptable Options
50
- */
51
- getAlertOptions(): AlertOptions;
52
42
  /**
53
43
  * Retrieves all Schedules that send data to Excel via OpenFin
54
44
  */
@@ -62,8 +52,4 @@ export interface OpenFinApi {
62
52
  * Stops live data; data will no longer be sent from AdapTable to Excel
63
53
  */
64
54
  stopLiveData(): void;
65
- /**
66
- * Clears any objects in internal OpenFin state created by AdapTable
67
- */
68
- clearOpenFinInternalState(): void;
69
55
  }
@@ -43,8 +43,7 @@ export interface NumberFormatterOptions extends BaseFormatterOptions {
43
43
  */
44
44
  Suffix?: string;
45
45
  /**
46
- * Replaces the value. Usefull when in combination with a Condition
47
- * e.g. replace null/undefiend with '-'
46
+ * Replaces cell value with supplied value
48
47
  */
49
48
  Content?: string | number;
50
49
  /**
@@ -59,6 +58,22 @@ export interface NumberFormatterOptions extends BaseFormatterOptions {
59
58
  * Truncates a number
60
59
  */
61
60
  Truncate?: boolean;
61
+ /**
62
+ * Returns absolute value of a number
63
+ */
64
+ Abs?: boolean;
65
+ /**
66
+ * Returns smallest integer > number
67
+ */
68
+ Ceiling?: boolean;
69
+ /**
70
+ * Returns largest intger < number
71
+ */
72
+ Floor?: boolean;
73
+ /**
74
+ * Rounds a Number
75
+ */
76
+ Round?: boolean;
62
77
  }
63
78
  /**
64
79
  * Formatter Options for Date Columns - contains a single `Pattern` property
@@ -113,6 +113,10 @@ export interface ContextMenuContext<TData = any> extends BaseContext {
113
113
  * Whether the clicked cell is the only selected cell
114
114
  */
115
115
  isSingleSelectedCell: boolean;
116
+ /**
117
+ * Whether cell that was clicked is in a Row that is currently selected
118
+ */
119
+ isSelectedRow: boolean;
116
120
  /**
117
121
  * Current AG Grid row node
118
122
  */
@@ -47,7 +47,7 @@ export declare type AdaptableQLModules = AdaptableQLModule[];
47
47
  /**
48
48
  * Modules which leverage AdapTableQL; can be used to set remote evaluation
49
49
  */
50
- export declare type AdaptableQLModule = 'CalculatedColumn' | 'Filter' | 'Query';
50
+ export declare type AdaptableQLModule = 'Alert' | 'CalculatedColumn' | 'Filter' | 'Query';
51
51
  /**
52
52
  * Column Types recognised by AdapTable; to be set in GridOptions
53
53
  */
@@ -11,40 +11,40 @@ export interface DashboardState extends ConfigState {
11
11
  */
12
12
  Tabs?: DashboardTab[];
13
13
  /**
14
- * The index of the Active Tab (in Tabs collection)
14
+ * Index of Active Tab (in Tabs collection)
15
15
  */
16
16
  ActiveTabIndex?: number;
17
17
  /**
18
- * Whether Dashboard is collapsed; if true, header is visible (but not tabs' contents)
18
+ * Is Dashboard collapsed; if true, header is visible (but not Tabs' contents)
19
19
  * @defaultValue false
20
20
  */
21
21
  IsCollapsed?: boolean;
22
22
  /**
23
- * Whether Dashboard is floating; if true, appears in draggable, minmised form (double-click to revert to default position)
23
+ * Is Dashboard floating; if true, appears in draggable, minmised form (double-click to revert to default position)
24
24
  * @defaultValue false
25
25
  */
26
26
  IsFloating?: boolean;
27
27
  /**
28
- * Alternative way of showing Expanded Dashboard where headers section is to left of Toolbars
28
+ * Alternative way of rendering Dashboard, with headers section to left of Toolbars
29
29
  * @defaultValue false
30
30
  */
31
31
  IsInline?: boolean;
32
32
  /**
33
- * Whether Dashboard is completely hidden - can be made visible again in Column menu and toolpanel
33
+ * Whether Dashboard is completely hidden - can be made visible again in Column Menu and Tool Panel
34
34
  * @defaultValue false
35
35
  */
36
36
  IsHidden?: boolean;
37
37
  /**
38
- * Position of Dashboard when in 'floating mode'
38
+ * Position of Dashboard when in Floating mode
39
39
  */
40
40
  FloatingPosition?: AdaptableCoordinate;
41
41
  /**
42
- * Module Buttons which open screen in Settings Panel for associated AdapTable Module
42
+ * Buttons which open the Settings Panel screen for associated AdapTable Module
43
43
  * @defaultValue ['SettingsPanel']
44
44
  */
45
45
  ModuleButtons?: AdaptableModuleButtons;
46
46
  /**
47
- * Title to display in Dashboard Header
47
+ * Title displayed in Dashboard Header
48
48
  * @defaultValue `adaptableId` in Adaptable Options
49
49
  */
50
50
  DashboardTitle?: string;
@@ -149,11 +149,12 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
149
149
  }
150
150
  handleCellDataChanged(cellDataChangedInfo) {
151
151
  const alertDefinitions = this.api.alertApi.internalApi.getAlertDefinitionsForCellDataChange(cellDataChangedInfo);
152
- if (alertDefinitions === null || alertDefinitions === void 0 ? void 0 : alertDefinitions.length) {
152
+ if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(alertDefinitions)) {
153
153
  this.api.alertApi.internalApi.showAlertForDefinitions(cellDataChangedInfo, alertDefinitions);
154
154
  }
155
155
  }
156
156
  handleGridDataChanged(gridDataChangedInfo) {
157
+ const internalAlertApi = this.api.alertApi.internalApi;
157
158
  const alertDefinitions = this.getAlertDefinitionsForGridDataChange(gridDataChangedInfo);
158
159
  const rowAdded = gridDataChangedInfo.rowTrigger === 'Add';
159
160
  const numberOfChangedRows = gridDataChangedInfo.rowNodes.length;
@@ -163,17 +164,19 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
163
164
  ? `${numberOfChangedRows} rows were ${actionName.toLowerCase()}`
164
165
  : `${numberOfChangedRows} row was ${actionName.toLowerCase()}`;
165
166
  alertDefinitions === null || alertDefinitions === void 0 ? void 0 : alertDefinitions.forEach((alertDefinition) => {
166
- const customMessage = this.api.alertApi.internalApi.getCustomAlertDescription(alertDefinition, {
167
- gridDataChangedInfo,
168
- });
169
- const customHeader = this.api.alertApi.internalApi.getCustomAlertMessageHeader(alertDefinition, {
170
- gridDataChangedInfo,
171
- });
172
- const alertMessage = alertDefinition.MessageText
173
- ? alertDefinition.MessageText
174
- : customMessage !== null && customMessage !== void 0 ? customMessage : defaultMessage;
175
- const alert = ObjectFactory_1.default.CreateRowChangedAlert(customHeader !== null && customHeader !== void 0 ? customHeader : alertHeader, alertMessage, alertDefinition, gridDataChangedInfo);
176
- this.api.alertApi.showAdaptableAlert(alert);
167
+ if (internalAlertApi.shouldFireAlertOnClient(alertDefinition)) {
168
+ const customMessage = internalAlertApi.getCustomAlertDescription(alertDefinition, {
169
+ gridDataChangedInfo,
170
+ });
171
+ const customHeader = internalAlertApi.getCustomAlertMessageHeader(alertDefinition, {
172
+ gridDataChangedInfo,
173
+ });
174
+ const alertMessage = alertDefinition.MessageText
175
+ ? alertDefinition.MessageText
176
+ : customMessage !== null && customMessage !== void 0 ? customMessage : defaultMessage;
177
+ const alert = ObjectFactory_1.default.CreateRowChangedAlert(customHeader !== null && customHeader !== void 0 ? customHeader : alertHeader, alertMessage, alertDefinition, gridDataChangedInfo);
178
+ this.api.alertApi.showAdaptableAlert(alert);
179
+ }
177
180
  });
178
181
  }
179
182
  handleReactiveAlertTriggered(reactiveAlertInfo) {
@@ -13,6 +13,8 @@ export declare class ExportModule extends AdaptableModuleBase implements IExport
13
13
  getExplicitlyReferencedColumnIds(report: Report): string[];
14
14
  getReferencedNamedQueryNames(report: Report): string[];
15
15
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
16
+ private buildReportMenuItems;
17
+ private buildExportMenuItem;
16
18
  export(report: Report, exportDestination: ExportDestination | string): Promise<void>;
17
19
  private preProcessExport;
18
20
  private isCustomDestination;