@adaptabletools/adaptable 13.0.7 → 13.0.9

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 (60) hide show
  1. package/bundle.cjs.js +186 -186
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +9 -205
  6. package/src/AdaptableOptions/ExpressionOptions.d.ts +204 -0
  7. package/src/AdaptableOptions/ExpressionOptions.js +2 -0
  8. package/src/AdaptableOptions/FilterOptions.d.ts +4 -13
  9. package/src/AdaptableOptions/PredicateOptions.d.ts +32 -0
  10. package/src/AdaptableOptions/PredicateOptions.js +2 -0
  11. package/src/Api/AdaptableApi.d.ts +5 -0
  12. package/src/Api/AlertApi.d.ts +0 -4
  13. package/src/Api/EntitlementApi.d.ts +31 -0
  14. package/src/Api/EntitlementApi.js +2 -0
  15. package/src/Api/FilterApi.d.ts +1 -5
  16. package/src/Api/FinanceApi.d.ts +17 -9
  17. package/src/Api/FlashingCellApi.d.ts +4 -4
  18. package/src/Api/FormatColumnApi.d.ts +0 -4
  19. package/src/Api/GridApi.d.ts +1 -1
  20. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
  21. package/src/Api/Implementation/AlertApiImpl.d.ts +0 -1
  22. package/src/Api/Implementation/AlertApiImpl.js +3 -4
  23. package/src/Api/Implementation/ApiBase.d.ts +2 -1
  24. package/src/Api/Implementation/EntitlementApiImpl.d.ts +11 -0
  25. package/src/Api/Implementation/EntitlementApiImpl.js +25 -0
  26. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -3
  27. package/src/Api/Implementation/FilterApiImpl.js +4 -20
  28. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -1
  29. package/src/Api/Implementation/FlashingCellApiImpl.js +7 -4
  30. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -2
  31. package/src/Api/Implementation/FormatColumnApiImpl.js +5 -5
  32. package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
  33. package/src/Api/Implementation/PredicateApiImpl.d.ts +10 -2
  34. package/src/Api/Implementation/PredicateApiImpl.js +83 -0
  35. package/src/Api/InternalApi.d.ts +2 -2
  36. package/src/Api/PredicateApi.d.ts +18 -2
  37. package/src/PredefinedConfig/AlertState.d.ts +8 -1
  38. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +5 -2
  39. package/src/PredefinedConfig/Common/AdaptablePredicate.js +4 -1
  40. package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
  41. package/src/PredefinedConfig/Common/FDC3Context.d.ts +1 -0
  42. package/src/PredefinedConfig/FlashingCellState.d.ts +8 -1
  43. package/src/PredefinedConfig/FormatColumnState.d.ts +8 -1
  44. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +7 -1
  45. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  46. package/src/Utilities/Helpers/AdaptableHelper.js +1 -0
  47. package/src/View/ColorPicker.d.ts +1 -1
  48. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  49. package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
  50. package/src/agGrid/Adaptable.d.ts +1 -0
  51. package/src/agGrid/Adaptable.js +16 -8
  52. package/src/components/Datepicker/index.d.ts +1 -1
  53. package/src/components/Input/index.d.ts +1 -1
  54. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  55. package/src/components/SizedContainer/index.d.ts +1 -1
  56. package/src/metamodel/adaptable.metamodel.d.ts +50 -8
  57. package/src/metamodel/adaptable.metamodel.js +1 -1
  58. package/src/types.d.ts +10 -7
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
@@ -1,6 +1,6 @@
1
1
  import { RowNode } from '@ag-grid-community/core';
2
2
  import { ContactColumn, ContactIntent, CountryColumn, CustomFDC3Column, CustomFDC3Intent, FDC3Intent, FinancePluginOptions, InstrumentColumn, InstrumentIntent, OrganizationColumn, PositionColumn, PositionIntent } from '../AdaptableOptions/FinancePluginOptions';
3
- import { ContactContext, ContactListContext, CountryContext, FDC3Context, InstrumentContext, InstrumentListContext, OrganizationContext, PortfolioContext, PositionContext } from '../types';
3
+ import { ContactContext, ContactListContext, ContextData, CountryContext, FDC3Context, InstrumentContext, InstrumentListContext, OrganizationContext, PortfolioContext, PositionContext } from '../types';
4
4
  /**
5
5
  * Provides run-time access to the Finance Plugin
6
6
  */
@@ -13,50 +13,58 @@ export interface FinanceApi {
13
13
  * Creates FDC3 Instrument Context
14
14
  * @param instrumentColumn Instrument Column to create Context For
15
15
  * @param rowNode Row Node to use for Context Data
16
+ * @param data custom Context Data
16
17
  */
17
- createFDC3InstrumentContext(instrumentColumn: InstrumentColumn, rowNode: RowNode): InstrumentContext;
18
+ createFDC3InstrumentContext(instrumentColumn: InstrumentColumn, rowNode: RowNode, data?: ContextData): InstrumentContext;
18
19
  /**
19
20
  * Creates FDC3 Instrumentlist Context
20
21
  * @param instrumentColumn Instrument Column to create Context For
21
22
  * @param rowNode Row Nodes to use for Context Data
23
+ * @param data custom Context Data
22
24
  */
23
- createFDC3InstrumentListContext(instrumentColumn: InstrumentColumn, rowNodes: RowNode[]): InstrumentListContext;
25
+ createFDC3InstrumentListContext(instrumentColumn: InstrumentColumn, rowNodes: RowNode[], data?: ContextData): InstrumentListContext;
24
26
  /**
25
27
  * Creates FDC3 Position Context
26
28
  * @param instrumentColumn Position Column to create Context For
27
29
  * @param rowNode Row Node to use for Context Data
30
+ * @param data custom Context Data
28
31
  */
29
- createFDC3PositionContext(positionColumn: PositionColumn, rowNode: RowNode): PositionContext;
32
+ createFDC3PositionContext(positionColumn: PositionColumn, rowNode: RowNode, data?: ContextData): PositionContext;
30
33
  /**
31
34
  * Creates FDC3 Portfolio Context
32
35
  * @param instrumentColumn Position Column to create Context For
33
36
  * @param rowNode Row Nodes to use for Context Data
37
+ * @param data custom Context Data
34
38
  */
35
- createFDC3PortfolioContext(positionColumn: PositionColumn, rowNodes: RowNode[]): PortfolioContext;
39
+ createFDC3PortfolioContext(positionColumn: PositionColumn, rowNodes: RowNode[], data?: ContextData): PortfolioContext;
36
40
  /**
37
41
  * Creates FDC3 Contact Context
38
42
  * @param instrumentColumn Contact Column to create Context For
39
43
  * @param rowNode Row Node to use for Context Data
44
+ * @param data custom Context Data
40
45
  */
41
- createFDC3ContactContext(contactColumn: ContactColumn, rowNode: RowNode): ContactContext;
46
+ createFDC3ContactContext(contactColumn: ContactColumn, rowNode: RowNode, data?: ContextData): ContactContext;
42
47
  /**
43
48
  * Creates FDC3 Contact List Context
44
49
  * @param instrumentColumn Contact Column to create Context For
45
50
  * @param rowNode Row Nodes to use for Context Data
51
+ * @param data custom Context Data
46
52
  */
47
- createFDC3ContactListContext(contactColumn: ContactColumn, rowNodes: RowNode[]): ContactListContext;
53
+ createFDC3ContactListContext(contactColumn: ContactColumn, rowNodes: RowNode[], data?: ContextData): ContactListContext;
48
54
  /**
49
55
  * Creates FDC3 Organization Context
50
56
  * @param instrumentColumn Organization Column to create Context For
51
57
  * @param rowNode Row Node to use for Context Data
58
+ * @param data custom Context Data
52
59
  */
53
- createFDC3OrganizationContext(organizationColumn: OrganizationColumn, rowNode: RowNode): OrganizationContext;
60
+ createFDC3OrganizationContext(organizationColumn: OrganizationColumn, rowNode: RowNode, data?: ContextData): OrganizationContext;
54
61
  /**
55
62
  * Creates FDC3 Country Context
56
63
  * @param instrumentColumn Country Column to create Context For
57
64
  * @param rowNode Row Node to use for Context Data
65
+ * @param data custom Context Data
58
66
  */
59
- createFDC3CountryContext(countryColumn: CountryColumn, rowNode: RowNode): CountryContext;
67
+ createFDC3CountryContext(countryColumn: CountryColumn, rowNode: RowNode, data?: ContextData): CountryContext;
60
68
  /**
61
69
  * Gets Instrument Column with given Id
62
70
  * @param instrumentColumnId Column to Look
@@ -83,10 +83,6 @@ export interface FlashingCellApi {
83
83
  * @returns flashing cell definition
84
84
  */
85
85
  unSuspendFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
86
- /**
87
- * Retrieves all Predicate Defs with Module Scope of Flashing Cell
88
- */
89
- getFlashingCellPredicateDefs(): AdaptablePredicateDef[];
90
86
  /**
91
87
  * Retrieves all Predicate Defs that match given Scope
92
88
  * @param scope the Scope to check
@@ -96,4 +92,8 @@ export interface FlashingCellApi {
96
92
  * Clears all Cells and Rows which have been flashed (primarily used if duration is 'Always')
97
93
  */
98
94
  clearGridFlashing(): void;
95
+ /**
96
+ * Are there any cells/rows currently being flashed
97
+ */
98
+ areCellsCurrentlyFlashed(): boolean;
99
99
  }
@@ -177,10 +177,6 @@ export interface FormatColumnApi {
177
177
  * @param formatColumn Format Column
178
178
  */
179
179
  hasCustomDisplayFormatter(formatColumn: FormatColumn): boolean;
180
- /**
181
- * Returns all Predicates usable in Format Columns
182
- */
183
- getFormatColumnPredicateDefs(): AdaptablePredicateDef[];
184
180
  /**
185
181
  * Returns all Predicates appropriate for the given Scope
186
182
  * @param scope Scope to check
@@ -24,7 +24,7 @@ export interface GridApi {
24
24
  * Repopulates grid with given data
25
25
  * @param data any data from any datasource that is suitable for AG Grid
26
26
  */
27
- setGridData(data: any): void;
27
+ setGridData(data: any[]): void;
28
28
  /**
29
29
  * Retrieves all data from the grid
30
30
  */
@@ -10,6 +10,7 @@ import { CustomSortApi } from '../CustomSortApi';
10
10
  import { DashboardApi } from '../DashboardApi';
11
11
  import { ToolPanelApi } from '../ToolPanelApi';
12
12
  import { DataSetApi } from '../DataSetApi';
13
+ import { EntitlementApi } from '../EntitlementApi';
13
14
  import { EventApi } from '../EventApi';
14
15
  import { PluginsApi } from '../PluginsApi';
15
16
  import { ExportApi } from '../ExportApi';
@@ -56,6 +57,7 @@ export declare class AdaptableApiImpl implements AdaptableApi {
56
57
  customSortApi: CustomSortApi;
57
58
  dashboardApi: DashboardApi;
58
59
  dataSetApi: DataSetApi;
60
+ entitlementApi: EntitlementApi;
59
61
  eventApi: EventApi;
60
62
  exportApi: ExportApi;
61
63
  formatColumnApi: FormatColumnApi;
@@ -37,7 +37,6 @@ export declare class AlertApiImpl extends ApiBase implements AlertApi {
37
37
  showAlertWarning(alertHeader: string, alertMessage: string, alertProperties?: AlertProperties): void;
38
38
  showAlertError(alertHeader: string, alertMessage: string, alertProperties?: AlertProperties): void;
39
39
  showAlertPopup(): void;
40
- getAlertPredicateDefs(): AdaptablePredicateDef[];
41
40
  getAlertPredicateDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
42
41
  editAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
43
42
  suspendAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
@@ -279,11 +279,10 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
279
279
  showAlertPopup() {
280
280
  this.showModulePopup(ModuleConstants.AlertModuleId);
281
281
  }
282
- getAlertPredicateDefs() {
283
- return this.adaptable.api.predicateApi.getPredicateDefsByModuleScope('alert');
284
- }
285
282
  getAlertPredicateDefsForScope(scope) {
286
- return this.getAlertPredicateDefs().filter((predicateDef) => this.adaptable.api.scopeApi.isScopeInScope(scope, predicateDef.columnScope));
283
+ return this.getAdaptableApi()
284
+ .predicateApi.getAlertPredicateDefs()
285
+ .filter((predicateDef) => this.adaptable.api.scopeApi.isScopeInScope(scope, predicateDef.columnScope));
287
286
  }
288
287
  editAlertDefinition(alertDefinition) {
289
288
  this.dispatchAction(AlertRedux.AlertDefinitionEdit(alertDefinition));
@@ -11,7 +11,8 @@ import { ActionOptions, ContainerOptions, DashboardOptions, EditOptions, FilterO
11
11
  import { NotificationsOptions } from '../../AdaptableOptions/NotificationsOptions';
12
12
  import { ToolPanelOptions } from '../../AdaptableOptions/ToolPanelOptions';
13
13
  import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
14
- import { AdaptableQLOptions, ExpressionOptions } from '../../AdaptableOptions/AdaptableQLOptions';
14
+ import { AdaptableQLOptions } from '../../AdaptableOptions/AdaptableQLOptions';
15
+ import { ExpressionOptions } from '../../AdaptableOptions/ExpressionOptions';
15
16
  import { AlertOptions } from '../../AdaptableOptions/AlertOptions';
16
17
  import { ColumnOptions } from '../../AdaptableOptions/ColumnOptions';
17
18
  export declare abstract class ApiBase {
@@ -0,0 +1,11 @@
1
+ import { ApiBase } from './ApiBase';
2
+ import { EntitlementApi } from '../EntitlementApi';
3
+ import { AdaptableModule, AccessLevel, AdaptableObject } from '../../types';
4
+ export declare class EntitlementApiImpl extends ApiBase implements EntitlementApi {
5
+ private getEntitlementService;
6
+ getEntitlementAccessLevelForModule(adaptableModule: AdaptableModule): AccessLevel;
7
+ isObjectReadonly(object: AdaptableObject): boolean;
8
+ isModuleHiddenEntitlement(adaptableModule: AdaptableModule): boolean;
9
+ isModuleFullEntitlement(adaptableModule: AdaptableModule): boolean;
10
+ isModuleReadOnlyEntitlement(adaptableModule: AdaptableModule): boolean;
11
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntitlementApiImpl = void 0;
4
+ const ApiBase_1 = require("./ApiBase");
5
+ class EntitlementApiImpl extends ApiBase_1.ApiBase {
6
+ getEntitlementService() {
7
+ return this.getAdaptableApi().internalApi.getEntitlementService();
8
+ }
9
+ getEntitlementAccessLevelForModule(adaptableModule) {
10
+ return this.getEntitlementService().getEntitlementAccessLevelForModule(adaptableModule);
11
+ }
12
+ isObjectReadonly(object) {
13
+ return object.IsReadOnly;
14
+ }
15
+ isModuleHiddenEntitlement(adaptableModule) {
16
+ return this.getEntitlementService().isModuleHiddenEntitlement(adaptableModule);
17
+ }
18
+ isModuleFullEntitlement(adaptableModule) {
19
+ return this.getEntitlementService().isModuleFullEntitlement(adaptableModule);
20
+ }
21
+ isModuleReadOnlyEntitlement(adaptableModule) {
22
+ return this.getEntitlementService().isModuleReadOnlyEntitlement(adaptableModule);
23
+ }
24
+ }
25
+ exports.EntitlementApiImpl = EntitlementApiImpl;
@@ -4,14 +4,12 @@ import { ApiBase } from './ApiBase';
4
4
  import { FilterApi } from '../FilterApi';
5
5
  import { AdaptablePredicateDef, ColumnFilterDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
6
6
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
7
- import { ColumnFilter, GridCell, SystemFilterPredicateIds } from '../../types';
7
+ import { ColumnFilter, GridCell } from '../../types';
8
8
  import { RowNode } from '@ag-grid-community/core';
9
9
  export declare class FilterApiImpl extends ApiBase implements FilterApi {
10
- getAllSystemFilterIds(): SystemFilterPredicateIds;
11
10
  findPredicateDefByShortcut(shortcut: string, column: AdaptableColumn): AdaptablePredicateDef;
12
11
  getFilterPredicateDefsForColumn(column: AdaptableColumn): AdaptablePredicateDef[];
13
12
  getFilterPredicateDefsForColumnId(columnId: string): AdaptablePredicateDef[] | undefined;
14
- private getAllFilterPredicates;
15
13
  showQuickFilterBar(): void;
16
14
  hideQuickFilterBar(): void;
17
15
  isQuickFilterAvailable(): boolean;
@@ -9,34 +9,18 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exte
9
9
  const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
10
10
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
11
11
  class FilterApiImpl extends ApiBase_1.ApiBase {
12
- getAllSystemFilterIds() {
13
- const systemFilters = this.getFilterOptions().systemFilters;
14
- if (typeof systemFilters === 'function') {
15
- const systemFiltersPredicateContext = {
16
- adaptableApi: this.adaptable.api,
17
- systemFiltersPredicateDefs: this.adaptable.api.predicateApi.getSystemPredicateDefs(),
18
- };
19
- return systemFilters(systemFiltersPredicateContext);
20
- }
21
- return systemFilters;
22
- }
23
12
  findPredicateDefByShortcut(shortcut, column) {
24
13
  return this.getFilterPredicateDefsForColumn(column).find((i) => { var _a; return (_a = i.shortcuts) === null || _a === void 0 ? void 0 : _a.includes(shortcut); });
25
14
  }
26
15
  getFilterPredicateDefsForColumn(column) {
27
- return this.getAllFilterPredicates().filter((predicate) => this.adaptable.api.scopeApi.isColumnInScope(column, predicate.columnScope));
16
+ return this.getAdaptableApi()
17
+ .predicateApi.getFilterPredicateDefs()
18
+ .filter((predicate) => this.adaptable.api.scopeApi.isColumnInScope(column, predicate.columnScope));
28
19
  }
29
20
  getFilterPredicateDefsForColumnId(columnId) {
30
- const column = this.adaptable.api.columnApi.getColumnFromId(columnId);
21
+ const column = this.getAdaptableApi().columnApi.getColumnFromId(columnId);
31
22
  return column ? this.getFilterPredicateDefsForColumn(column) : undefined;
32
23
  }
33
- getAllFilterPredicates() {
34
- var _a;
35
- return [
36
- ...(_a = this.getAllSystemFilterIds()) === null || _a === void 0 ? void 0 : _a.map((predicateId) => this.adaptable.api.predicateApi.getPredicateDefById(predicateId)),
37
- ...this.adaptable.api.predicateApi.getCustomPredicateDefs(),
38
- ].filter((predicateDef) => predicateDef.moduleScope.includes('filter'));
39
- }
40
24
  showQuickFilterBar() {
41
25
  this.dispatchAction(SystemRedux.SystemQuickFilterBarShow());
42
26
  }
@@ -19,7 +19,7 @@ export declare class FlashingCellApiImpl extends ApiBase implements FlashingCell
19
19
  unSuspendFlashingCellDefinition(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
20
20
  addFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): FlashingCellDefinition[];
21
21
  editFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): FlashingCellDefinition[];
22
- getFlashingCellPredicateDefs(): AdaptablePredicateDef[];
23
22
  getFlashingCellPredicateDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
24
23
  clearGridFlashing(): void;
24
+ areCellsCurrentlyFlashed(): boolean;
25
25
  }
@@ -103,15 +103,18 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
103
103
  });
104
104
  return flashingCellDefinitions === null || flashingCellDefinitions === void 0 ? void 0 : flashingCellDefinitions.map((flashingCell) => this.getFlashingCellDefinitionById(flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.Uuid));
105
105
  }
106
- getFlashingCellPredicateDefs() {
107
- return this.adaptable.api.predicateApi.getPredicateDefsByModuleScope('flashingcell');
108
- }
109
106
  getFlashingCellPredicateDefsForScope(scope) {
110
- return this.getFlashingCellPredicateDefs().filter((predicateDef) => this.adaptable.api.scopeApi.isScopeInScope(scope, predicateDef.columnScope));
107
+ return this.getAdaptableApi()
108
+ .predicateApi.getFlashingCellPredicateDefs()
109
+ .filter((predicateDef) => this.adaptable.api.scopeApi.isScopeInScope(scope, predicateDef.columnScope));
111
110
  }
112
111
  clearGridFlashing() {
113
112
  const currentFlashingCells = this.getAdaptableState().System.AdaptableFlashingCells;
114
113
  this.dispatchAction(SystemRedux.SystemFlashingCellDeleteAll());
115
114
  }
115
+ areCellsCurrentlyFlashed() {
116
+ const currentFlashingCells = this.getAdaptableState().System.AdaptableFlashingCells;
117
+ return currentFlashingCells.keys != null;
118
+ }
116
119
  }
117
120
  exports.FlashingCellApiImpl = FlashingCellApiImpl;
@@ -1,7 +1,7 @@
1
1
  import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
2
2
  import { ApiBase, LayoutAssociatedObjectLoadConfig } from './ApiBase';
3
3
  import { FormatColumnApi } from '../FormatColumnApi';
4
- import { FormatColumnState, FormatColumn } from '../../PredefinedConfig/FormatColumnState';
4
+ import { FormatColumn, FormatColumnState } from '../../PredefinedConfig/FormatColumnState';
5
5
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
6
6
  import { RowNode } from '@ag-grid-community/core';
7
7
  import { AdaptableFormat } from '../../types';
@@ -54,7 +54,6 @@ export declare class FormatColumnApiImpl extends ApiBase implements FormatColumn
54
54
  getStringFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
55
55
  getDateFormattedValue(value: any, node: RowNode, abColumn: AdaptableColumn, options: AdaptableFormat['Options']): string;
56
56
  hasCustomDisplayFormatter(formatColumn: FormatColumn): boolean;
57
- getFormatColumnPredicateDefs(): AdaptablePredicateDef[];
58
57
  getFormatColumnDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
59
58
  getFormatColumnsRelevantForColumn(formatColumns: FormatColumn[], column: AdaptableColumn, params: {
60
59
  node: RowNode;
@@ -9,6 +9,7 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exten
9
9
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
10
10
  const FormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/FormatHelper"));
11
11
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
12
+ const Helper_1 = require("../../Utilities/Helpers/Helper");
12
13
  class FormatColumnApiImpl extends ApiBase_1.ApiBase {
13
14
  getFormatColumnState() {
14
15
  return this.getAdaptableState().FormatColumn;
@@ -169,7 +170,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
169
170
  }, customDisplayFormatterContext);
170
171
  }
171
172
  getNumberFormattedValue(value, node, abColumn, options) {
172
- if (!value) {
173
+ if (Helper_1.Helper.objectNotExists(value)) {
173
174
  return undefined;
174
175
  }
175
176
  const preparedValue = this.applyCustomFormatters(value, node, abColumn, options);
@@ -202,11 +203,10 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
202
203
  }
203
204
  return true;
204
205
  }
205
- getFormatColumnPredicateDefs() {
206
- return this.adaptable.api.predicateApi.getPredicateDefsByModuleScope('formatColumn');
207
- }
208
206
  getFormatColumnDefsForScope(scope) {
209
- return this.getFormatColumnPredicateDefs().filter((predicateDef) => this.adaptable.api.scopeApi.isScopeInScope(scope, predicateDef.columnScope));
207
+ return this.getAdaptableApi()
208
+ .predicateApi.getFormatColumnPredicateDefs()
209
+ .filter((predicateDef) => this.adaptable.api.scopeApi.isScopeInScope(scope, predicateDef.columnScope));
210
210
  }
211
211
  getFormatColumnsRelevantForColumn(formatColumns, column, params) {
212
212
  return formatColumns.filter((formatColumn) => this.isFormatColumnRelevantForColumn(formatColumn, column, params));
@@ -16,7 +16,7 @@ import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightIn
16
16
  import { AccessLevel } from '../../PredefinedConfig/Common/Entitlement';
17
17
  export declare class GridApiImpl extends ApiBase implements GridApi {
18
18
  getGridState(): GridState;
19
- setGridData(dataSource: any): void;
19
+ setGridData(dataSource: any[]): void;
20
20
  getGridData(): any[];
21
21
  getFilteredData(): any[];
22
22
  loadGridData(dataSource: any): void;
@@ -1,12 +1,12 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { PredicateApi } from '../PredicateApi';
3
- import { AdaptablePredicateDef, AdaptablePredicate, PredicateDefHandlerParams, ModuleScope } from '../../PredefinedConfig/Common/AdaptablePredicate';
3
+ import { AdaptablePredicateDef, AdaptablePredicate, PredicateDefHandlerParams, PredicateModuleScope } from '../../PredefinedConfig/Common/AdaptablePredicate';
4
4
  import { AdaptableColumnDataType, SystemFilterPredicateId } from '../../types';
5
5
  export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
6
6
  getPredicateDefs(): AdaptablePredicateDef[];
7
7
  getSystemPredicateDefs(): AdaptablePredicateDef[];
8
8
  getCustomPredicateDefs(): AdaptablePredicateDef[];
9
- getPredicateDefsByModuleScope(moduleScope: ModuleScope): AdaptablePredicateDef[];
9
+ getPredicateDefsByModuleScope(moduleScope: PredicateModuleScope): AdaptablePredicateDef[];
10
10
  getPredicateDefById(predicateId: string): AdaptablePredicateDef;
11
11
  getSystemPredicateDefById(predicateId: string): AdaptablePredicateDef;
12
12
  getCustomPredicateDefById(predicateId: string): AdaptablePredicateDef;
@@ -15,4 +15,12 @@ export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
15
15
  handlePredicate(predicate: AdaptablePredicate | undefined, params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
16
16
  getEqualityPredicateForDataType(dataType: AdaptableColumnDataType): SystemFilterPredicateId;
17
17
  hasPredicateValues(predicate: AdaptablePredicate): boolean;
18
+ private getSystemFilterPredicateIds;
19
+ getFilterPredicateDefs(): AdaptablePredicateDef[];
20
+ private getSystemAlertPredicateIds;
21
+ getAlertPredicateDefs(): AdaptablePredicateDef[];
22
+ private getSystemFormatColumnPredicateIds;
23
+ getFormatColumnPredicateDefs(): AdaptablePredicateDef[];
24
+ private getSystemFlashingCellPredicateIds;
25
+ getFlashingCellPredicateDefs(): AdaptablePredicateDef[];
18
26
  }
@@ -103,5 +103,88 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
103
103
  hasPredicateValues(predicate) {
104
104
  return (predicate === null || predicate === void 0 ? void 0 : predicate.PredicateId) === 'Values' || (predicate === null || predicate === void 0 ? void 0 : predicate.PredicateId) === 'ExcludeValues';
105
105
  }
106
+ getSystemFilterPredicateIds() {
107
+ // for now we still need to get the old ones in case they have been provided
108
+ // however they have been deprectated and they are not populated by AdapTable
109
+ const oldSystemFilterPredicates = this.getFilterOptions().systemFilters;
110
+ if (oldSystemFilterPredicates) {
111
+ return oldSystemFilterPredicates;
112
+ }
113
+ // if old list not provided use the new property in Predicate Options
114
+ const systemFilterPredicates = this.getAdaptableQLOptions().predicateOptions.systemFilterPredicates;
115
+ if (typeof systemFilterPredicates === 'function') {
116
+ const systemPredicateContext = {
117
+ adaptableApi: this.adaptable.api,
118
+ systemPredicateDefs: this.getSystemPredicateDefs().filter((p) => p.moduleScope.includes('filter')),
119
+ moduleScope: 'filter',
120
+ };
121
+ return systemFilterPredicates(systemPredicateContext);
122
+ }
123
+ return systemFilterPredicates;
124
+ }
125
+ getFilterPredicateDefs() {
126
+ var _a;
127
+ return [
128
+ ...(_a = this.getSystemFilterPredicateIds()) === null || _a === void 0 ? void 0 : _a.map((predicateId) => this.getPredicateDefById(predicateId)),
129
+ ...this.getCustomPredicateDefs(),
130
+ ].filter((predicateDef) => predicateDef.moduleScope.includes('filter'));
131
+ }
132
+ getSystemAlertPredicateIds() {
133
+ const systemAlertPredicates = this.getAdaptableQLOptions().predicateOptions.systemAlertPredicates;
134
+ if (typeof systemAlertPredicates === 'function') {
135
+ const systemPredicateContext = {
136
+ adaptableApi: this.adaptable.api,
137
+ systemPredicateDefs: this.getSystemPredicateDefs().filter((p) => p.moduleScope.includes('alert')),
138
+ moduleScope: 'alert',
139
+ };
140
+ return systemAlertPredicates(systemPredicateContext);
141
+ }
142
+ return systemAlertPredicates;
143
+ }
144
+ getAlertPredicateDefs() {
145
+ var _a;
146
+ return [
147
+ ...(_a = this.getSystemAlertPredicateIds()) === null || _a === void 0 ? void 0 : _a.map((predicateId) => this.getPredicateDefById(predicateId)),
148
+ ...this.getCustomPredicateDefs(),
149
+ ].filter((predicateDef) => predicateDef.moduleScope.includes('alert'));
150
+ }
151
+ getSystemFormatColumnPredicateIds() {
152
+ const systemFormatColumnPredicates = this.getAdaptableQLOptions().predicateOptions.systemFormatColumnPredicates;
153
+ if (typeof systemFormatColumnPredicates === 'function') {
154
+ const systemPredicateContext = {
155
+ adaptableApi: this.adaptable.api,
156
+ systemPredicateDefs: this.getSystemPredicateDefs().filter((p) => p.moduleScope.includes('formatColumn')),
157
+ moduleScope: 'formatColumn',
158
+ };
159
+ return systemFormatColumnPredicates(systemPredicateContext);
160
+ }
161
+ return systemFormatColumnPredicates;
162
+ }
163
+ getFormatColumnPredicateDefs() {
164
+ var _a;
165
+ return [
166
+ ...(_a = this.getSystemFormatColumnPredicateIds()) === null || _a === void 0 ? void 0 : _a.map((predicateId) => this.getPredicateDefById(predicateId)),
167
+ ...this.getCustomPredicateDefs(),
168
+ ].filter((predicateDef) => predicateDef.moduleScope.includes('formatColumn'));
169
+ }
170
+ getSystemFlashingCellPredicateIds() {
171
+ const systemFlashingCellPredicates = this.getAdaptableQLOptions().predicateOptions.systemFlashingCellPredicates;
172
+ if (typeof systemFlashingCellPredicates === 'function') {
173
+ const systemPredicateContext = {
174
+ adaptableApi: this.adaptable.api,
175
+ systemPredicateDefs: this.getSystemPredicateDefs().filter((p) => p.moduleScope.includes('flashingcell')),
176
+ moduleScope: 'flashingcell',
177
+ };
178
+ return systemFlashingCellPredicates(systemPredicateContext);
179
+ }
180
+ return systemFlashingCellPredicates;
181
+ }
182
+ getFlashingCellPredicateDefs() {
183
+ var _a;
184
+ return [
185
+ ...(_a = this.getSystemFlashingCellPredicateIds()) === null || _a === void 0 ? void 0 : _a.map((predicateId) => this.getPredicateDefById(predicateId)),
186
+ ...this.getCustomPredicateDefs(),
187
+ ].filter((predicateDef) => predicateDef.moduleScope.includes('flashingcell'));
188
+ }
106
189
  }
107
190
  exports.PredicateApiImpl = PredicateApiImpl;
@@ -31,7 +31,7 @@ import { AdaptableForm } from '../PredefinedConfig/Common/AdaptableForm';
31
31
  import { AlertButtonForm } from '../PredefinedConfig/AlertState';
32
32
  import { AdaptableFrameworkComponent } from '../AdaptableOptions/AdaptableFrameworkComponent';
33
33
  import { IMetamodelService } from '../Utilities/Services/Interface/IMetamodelService';
34
- import { RowNode } from '@ag-grid-community/core';
34
+ import { GridOptions, RowNode } from '@ag-grid-community/core';
35
35
  import { IModuleCollection } from '../Strategy/Interface/IModule';
36
36
  import { AdaptableObjectTag } from '../PredefinedConfig/Common/AdaptableObject';
37
37
  import { IRowEditService } from '../Utilities/Services/Interface/IRowEditService';
@@ -88,7 +88,7 @@ export interface InternalApi {
88
88
  updateCurrentDraftLayout(layout: Layout): void;
89
89
  getPrimaryKey(): any;
90
90
  getAdaptableInstance(): IAdaptable;
91
- getAgGridInstance(): any;
91
+ getAgGridInstance(): GridOptions;
92
92
  getPredefinedConfig(): any;
93
93
  getState(): AdaptableState;
94
94
  getAdaptableOptions(): AdaptableOptions;
@@ -1,5 +1,5 @@
1
1
  import { AdaptableColumnDataType, SystemFilterPredicateId } from '../../types';
2
- import { AdaptablePredicateDef, AdaptablePredicate, PredicateDefHandlerParams, ModuleScope } from '../PredefinedConfig/Common/AdaptablePredicate';
2
+ import { AdaptablePredicateDef, AdaptablePredicate, PredicateDefHandlerParams, PredicateModuleScope } from '../PredefinedConfig/Common/AdaptablePredicate';
3
3
  /**
4
4
  * Functions which manage the Predicate object in AdapTable
5
5
  */
@@ -20,7 +20,7 @@ export interface PredicateApi {
20
20
  * Retrieves all Predicate Definitions for given Module Scope
21
21
  * @param moduleScope Module Scope to use
22
22
  */
23
- getPredicateDefsByModuleScope(moduleScope: ModuleScope): AdaptablePredicateDef[];
23
+ getPredicateDefsByModuleScope(moduleScope: PredicateModuleScope): AdaptablePredicateDef[];
24
24
  /**
25
25
  * Gets the Predicate Definition for a given Id
26
26
  * @param predicateId Id of Predicate Definition
@@ -64,4 +64,20 @@ export interface PredicateApi {
64
64
  * @param predicate
65
65
  */
66
66
  hasPredicateValues(predicate: AdaptablePredicate): boolean;
67
+ /**
68
+ * Get all Filter Predicate Definitions - System and Custom
69
+ */
70
+ getFilterPredicateDefs(): AdaptablePredicateDef[];
71
+ /**
72
+ * Get all Alert Predicate Definitions - System and Custom
73
+ */
74
+ getAlertPredicateDefs(): AdaptablePredicateDef[];
75
+ /**
76
+ * Get all Format Column Predicate Definitions - System and Custom
77
+ */
78
+ getFormatColumnPredicateDefs(): AdaptablePredicateDef[];
79
+ /**
80
+ * Get all Flashing Cell Predicate Definitions - System and Custom
81
+ */
82
+ getFlashingCellPredicateDefs(): AdaptablePredicateDef[];
67
83
  }
@@ -126,4 +126,11 @@ export interface AlertProperties {
126
126
  */
127
127
  PreventEdit?: boolean;
128
128
  }
129
- export declare type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False' | 'PercentChange' | 'PrimaryKeyDuplicate' | 'ExistingValuesOnly' | 'NoDuplicateValues' | 'IsNumeric' | 'IsNotNumeric' | 'AddedRow' | 'RemovedRow' | 'Any';
129
+ /**
130
+ * Array containing all System Alert Predicates
131
+ */
132
+ export declare type SystemAlertPredicateIds = SystemAlertPredicateId[];
133
+ /**
134
+ * List of System Predicates available for Alerts
135
+ */
136
+ export declare type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | 'PrimaryKeyDuplicate' | 'ExistingValuesOnly' | 'NoDuplicateValues' | 'IsNumeric' | 'IsNotNumeric' | 'AddedRow' | 'RemovedRow' | 'Any';
@@ -34,7 +34,7 @@ export interface AdaptablePredicateDef {
34
34
  /**
35
35
  * Modules where the Predicate can run
36
36
  */
37
- moduleScope: ModuleScope[];
37
+ moduleScope: PredicateModuleScope[];
38
38
  /**
39
39
  * Inputs the Predicate can take
40
40
  */
@@ -103,12 +103,15 @@ export interface PredicateDefHandlerParams {
103
103
  export interface PredicateDefToStringParams {
104
104
  inputs: any[];
105
105
  }
106
- export declare type ModuleScope = 'filter' | 'alert' | 'flashingcell' | 'formatColumn';
106
+ export declare type PredicateModuleScope = 'filter' | 'alert' | 'flashingcell' | 'formatColumn';
107
107
  /**
108
108
  * Array of Predicate Defs which are shipped by AdapTable
109
109
  */
110
110
  export declare const SystemPredicateDefs: AdaptablePredicateDef[];
111
111
  export declare const SystemFilterPredicateIds: string[];
112
+ export declare const SystemAlertPredicateIds: string[];
113
+ export declare const SystemFormatColumnPredicateIds: string[];
114
+ export declare const SystemFlashingCellPredicateIds: string[];
112
115
  export interface ColumnFilterDef {
113
116
  dataType: AdaptableColumnDataType;
114
117
  predicate: AdaptablePredicateDef;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SystemFilterPredicateIds = exports.SystemPredicateDefs = void 0;
3
+ exports.SystemFlashingCellPredicateIds = exports.SystemFormatColumnPredicateIds = exports.SystemAlertPredicateIds = exports.SystemFilterPredicateIds = exports.SystemPredicateDefs = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
6
6
  const isToday_1 = tslib_1.__importDefault(require("date-fns/isToday"));
@@ -603,3 +603,6 @@ exports.SystemPredicateDefs = [
603
603
  },
604
604
  ];
605
605
  exports.SystemFilterPredicateIds = exports.SystemPredicateDefs.filter((p) => p.moduleScope.includes('filter')).map((p) => p.id);
606
+ exports.SystemAlertPredicateIds = exports.SystemPredicateDefs.filter((p) => p.moduleScope.includes('alert')).map((p) => p.id);
607
+ exports.SystemFormatColumnPredicateIds = exports.SystemPredicateDefs.filter((p) => p.moduleScope.includes('formatColumn')).map((p) => p.id);
608
+ exports.SystemFlashingCellPredicateIds = exports.SystemPredicateDefs.filter((p) => p.moduleScope.includes('flashingcell')).map((p) => p.id);
@@ -24,6 +24,6 @@ export interface ColumnFilterPredicate extends AdaptablePredicate {
24
24
  */
25
25
  export declare type SystemFilterPredicateIds = SystemFilterPredicateId[];
26
26
  /**
27
- * List of all the Filter Predicates shipped by AdapTable
27
+ * List of System Predicates available for Filters
28
28
  */
29
- export declare type SystemFilterPredicateId = 'Values' | 'ExcludeValues' | 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'InRange' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False' | 'BooleanToggle';
29
+ export declare type SystemFilterPredicateId = 'Values' | 'ExcludeValues' | 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'InRange' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'BooleanToggle';
@@ -241,3 +241,4 @@ export declare type FDC3ContextType = 'fdc3.instrument' | 'fdc3.instrumentList'
241
241
  export interface CustomFDC3Context extends FDC3Context {
242
242
  type: any;
243
243
  }
244
+ export declare type ContextData = Record<string, unknown>;
@@ -65,4 +65,11 @@ export interface FlashingCellDefinition extends SuspendableObject {
65
65
  */
66
66
  FlashDuration?: number | 'always';
67
67
  }
68
- export declare type SystemFlashingCellPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False' | 'PercentChange' | 'IsNumeric' | 'IsNotNumeric' | 'Any';
68
+ /**
69
+ * Array containing all System Flashing Cell Predicates
70
+ */
71
+ export declare type SystemFlashingCellPredicateIds = SystemFlashingCellPredicateId[];
72
+ /**
73
+ * List of System Predicates available for Flashing Cells
74
+ */
75
+ export declare type SystemFlashingCellPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | 'IsNumeric' | 'IsNotNumeric' | 'Any';