@adaptabletools/adaptable 18.0.0-canary.25 → 18.0.0-canary.27
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.
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/CommentOptions.d.ts +2 -2
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -23
- package/src/AdaptableOptions/MenuOptions.js +1 -96
- package/src/Api/GridApi.d.ts +2 -1
- package/src/Api/Implementation/ActionRowApiImpl.js +3 -7
- package/src/Api/Implementation/AlertApiImpl.js +5 -10
- package/src/Api/Implementation/CalendarApiImpl.js +1 -6
- package/src/Api/Implementation/ChartingApiImpl.js +3 -3
- package/src/Api/Implementation/ColumnApiImpl.js +6 -6
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/CommentsApiImpl.js +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +11 -17
- package/src/Api/Implementation/DashboardApiImpl.js +1 -6
- package/src/Api/Implementation/ExportApiImpl.js +5 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +8 -13
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -8
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -1
- package/src/Api/Implementation/GridApiImpl.js +11 -8
- package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -7
- package/src/Api/Implementation/LayoutApiImpl.js +0 -15
- package/src/Api/Implementation/PredicateApiImpl.js +2 -2
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.js +10 -10
- package/src/Api/Implementation/TeamSharingApiImpl.js +3 -15
- package/src/Api/Implementation/ThemeApiImpl.js +2 -7
- package/src/Api/Implementation/UserInterfaceApiImpl.js +4 -13
- package/src/Api/Internal/ActionRowInternalApi.js +7 -45
- package/src/Api/Internal/AdaptableInternalApi.js +2 -12
- package/src/Api/Internal/AlertInternalApi.js +4 -17
- package/src/Api/Internal/CalculatedColumnInternalApi.js +7 -14
- package/src/Api/Internal/ChartingInternalApi.js +13 -13
- package/src/Api/Internal/ColumnFilterInternalApi.js +18 -36
- package/src/Api/Internal/CommentsInternalApi.d.ts +1 -1
- package/src/Api/Internal/CommentsInternalApi.js +1 -1
- package/src/Api/Internal/CustomSortInternalApi.js +1 -1
- package/src/Api/Internal/DashboardInternalApi.js +4 -10
- package/src/Api/Internal/DataImportInternalApi.js +3 -9
- package/src/Api/Internal/DataSetInternalApi.js +2 -7
- package/src/Api/Internal/ExportInternalApi.js +4 -4
- package/src/Api/Internal/ExpressionInternalApi.js +2 -12
- package/src/Api/Internal/Fdc3InternalApi.js +1 -10
- package/src/Api/Internal/FormatColumnInternalApi.js +11 -20
- package/src/Api/Internal/FreeTextColumnInternalApi.js +1 -1
- package/src/Api/Internal/GridFilterInternalApi.js +2 -8
- package/src/Api/Internal/GridInternalApi.js +13 -40
- package/src/Api/Internal/LayoutInternalApi.d.ts +1 -0
- package/src/Api/Internal/LayoutInternalApi.js +10 -19
- package/src/Api/Internal/NoteInternalApi.d.ts +1 -1
- package/src/Api/Internal/NoteInternalApi.js +1 -1
- package/src/Api/Internal/PredicateInternalApi.js +5 -40
- package/src/Api/Internal/ScheduleInternalApi.js +1 -6
- package/src/Api/Internal/StyledColumnInternalApi.js +5 -5
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -7
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -7
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
- package/src/Api/LayoutApi.d.ts +0 -11
- package/src/PredefinedConfig/Common/CellSummary.d.ts +5 -14
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -0
- package/src/PredefinedConfig/Common/Enums.js +2 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +4 -4
- package/src/PredefinedConfig/Common/Menu.js +17 -18
- package/src/PredefinedConfig/Common/RowSummary.d.ts +1 -1
- package/src/PredefinedConfig/Common/RowSummary.js +4 -4
- package/src/Strategy/AdaptableModuleBase.d.ts +3 -4
- package/src/Strategy/AdaptableModuleBase.js +5 -9
- package/src/Strategy/AlertModule.d.ts +1 -1
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/BulkUpdateModule.js +3 -2
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -2
- package/src/Strategy/CalculatedColumnModule.js +2 -2
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.js +56 -96
- package/src/Strategy/ColumnFilterModule.d.ts +2 -2
- package/src/Strategy/ColumnFilterModule.js +17 -42
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/ColumnInfoModule.js +2 -2
- package/src/Strategy/CommentModule.d.ts +1 -2
- package/src/Strategy/CommentModule.js +29 -30
- package/src/Strategy/CustomSortModule.d.ts +1 -1
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.d.ts +2 -2
- package/src/Strategy/DashboardModule.js +3 -14
- package/src/Strategy/DataImportModule.d.ts +3 -3
- package/src/Strategy/DataImportModule.js +3 -3
- package/src/Strategy/ExportModule.d.ts +1 -2
- package/src/Strategy/ExportModule.js +12 -41
- package/src/Strategy/Fdc3Module.d.ts +1 -1
- package/src/Strategy/Fdc3Module.js +1 -14
- package/src/Strategy/FlashingCellModule.d.ts +2 -2
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/FormatColumnModule.d.ts +1 -1
- package/src/Strategy/FormatColumnModule.js +28 -47
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/GridInfoModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +3 -3
- package/src/Strategy/LayoutModule.d.ts +4 -4
- package/src/Strategy/LayoutModule.js +51 -72
- package/src/Strategy/NoteModule.d.ts +1 -2
- package/src/Strategy/NoteModule.js +28 -30
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.d.ts +3 -3
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +3 -2
- package/src/Strategy/StyledColumnModule.d.ts +1 -1
- package/src/Strategy/StyledColumnModule.js +10 -9
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/SystemStatusModule.js +4 -3
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +19 -19
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
- package/src/Utilities/ObjectFactory.js +2 -0
- package/src/Utilities/Services/ModuleService.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -0
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +17 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +5 -5
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
- package/src/agGrid/AdaptableAgGrid.js +1 -1
- package/src/agGrid/AgGridAdapter.d.ts +1 -2
- package/src/agGrid/AgGridColumnAdapter.js +2 -2
- package/src/agGrid/AgGridMenuAdapter.d.ts +18 -8
- package/src/agGrid/AgGridMenuAdapter.js +240 -51
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +8 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -30,13 +30,8 @@ export class FlashingCellApiImpl extends ApiBase {
|
|
|
30
30
|
}
|
|
31
31
|
showFlashingCell(flashingCellToShow) {
|
|
32
32
|
this.addUidToAdaptableObject(flashingCellToShow);
|
|
33
|
-
const flashingCellFiredInfo = {
|
|
34
|
-
|
|
35
|
-
flashingCell: flashingCellToShow,
|
|
36
|
-
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
37
|
-
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
38
|
-
};
|
|
39
|
-
const results = this.adaptable.api.eventApi.emitSync('FlashingCellDisplayed', flashingCellFiredInfo);
|
|
33
|
+
const flashingCellFiredInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { flashingCell: flashingCellToShow });
|
|
34
|
+
const results = this.getAdaptableApi().eventApi.emitSync('FlashingCellDisplayed', flashingCellFiredInfo);
|
|
40
35
|
const shouldShow = results.reduce((endResult, aResult) => {
|
|
41
36
|
return endResult && aResult !== false;
|
|
42
37
|
}, true);
|
|
@@ -84,7 +79,7 @@ export class FlashingCellApiImpl extends ApiBase {
|
|
|
84
79
|
getFlashingCellPredicateDefsForScope(scope) {
|
|
85
80
|
return this.getAdaptableApi()
|
|
86
81
|
.predicateApi.internalApi.getFlashingCellPredicateDefs(scope)
|
|
87
|
-
.filter((predicateDef) => this.
|
|
82
|
+
.filter((predicateDef) => this.getAdaptableApi().scopeApi.isScopeInScope(scope, predicateDef.columnScope));
|
|
88
83
|
}
|
|
89
84
|
clearAllFlashingCells() {
|
|
90
85
|
this.dispatchAction(SystemRedux.SystemFlashingCellDeleteAll());
|
|
@@ -65,7 +65,7 @@ export class FormatColumnApiImpl extends ApiBase {
|
|
|
65
65
|
return this.internalApi.getFormatColumnWithColumnInScope(formatColumns, column);
|
|
66
66
|
}
|
|
67
67
|
getFormatColumnsForColumnId(columnId, config) {
|
|
68
|
-
const abColumn = this.
|
|
68
|
+
const abColumn = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
|
|
69
69
|
if (!abColumn) {
|
|
70
70
|
return [];
|
|
71
71
|
}
|
|
@@ -75,13 +75,13 @@ export class FormatColumnApiImpl extends ApiBase {
|
|
|
75
75
|
this.showModulePopup(ModuleConstants.FormatColumnModuleId);
|
|
76
76
|
}
|
|
77
77
|
getFormatColumnsWithAllScope(formatColumns) {
|
|
78
|
-
return formatColumns.filter((fc) => this.
|
|
78
|
+
return formatColumns.filter((fc) => this.getAdaptableApi().scopeApi.scopeIsAll(fc.Scope));
|
|
79
79
|
}
|
|
80
80
|
getFormatColumnsWithDataTypeScope(formatColumns) {
|
|
81
|
-
return formatColumns.filter((fc) => this.
|
|
81
|
+
return formatColumns.filter((fc) => this.getAdaptableApi().scopeApi.scopeHasDataType(fc.Scope));
|
|
82
82
|
}
|
|
83
83
|
getFormatColumnsWithColumnScope(formatColumns) {
|
|
84
|
-
return formatColumns.filter((fc) => this.
|
|
84
|
+
return formatColumns.filter((fc) => this.getAdaptableApi().scopeApi.scopeHasColumns(fc.Scope));
|
|
85
85
|
}
|
|
86
86
|
hasCustomDisplayFormatter(formatColumn) {
|
|
87
87
|
var _a;
|
|
@@ -85,7 +85,7 @@ export class FreeTextColumnApiImpl extends ApiBase {
|
|
|
85
85
|
}
|
|
86
86
|
getFreeTextColumnValueForRowNode(freeTextColumn, rowNode) {
|
|
87
87
|
try {
|
|
88
|
-
if (this.
|
|
88
|
+
if (this.getAdaptableApi().gridApi.isGroupRowNode(rowNode)) {
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
91
|
if (ArrayExtensions.IsNotNullOrEmpty(freeTextColumn.FreeTextStoredValues)) {
|
|
@@ -8,7 +8,7 @@ import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
|
8
8
|
import { DataUpdateConfig } from '../../PredefinedConfig/Common/DataUpdateConfig';
|
|
9
9
|
import { CellHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
|
|
10
10
|
import { RowHighlightInfo } from '../../PredefinedConfig/Common/RowHighlightInfo';
|
|
11
|
-
import { IRowNode, RowModelType } from '@ag-grid-community/core';
|
|
11
|
+
import { Column, IRowNode, RowModelType } from '@ag-grid-community/core';
|
|
12
12
|
import { GridCellRange } from '../../PredefinedConfig/Selection/GridCellRange';
|
|
13
13
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
14
14
|
import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
|
|
@@ -134,4 +134,5 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
134
134
|
getAgGridRowModelType(): RowModelType;
|
|
135
135
|
getVisibleRowCount(): number;
|
|
136
136
|
showTransposedView(transposeConfig?: TransposeConfig): void;
|
|
137
|
+
getAllGridColumns(): Column<any>[];
|
|
137
138
|
}
|
|
@@ -67,7 +67,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
67
67
|
}
|
|
68
68
|
undoCellEdit(cellDataChangedInfo) {
|
|
69
69
|
// for the reason of this hacky solution see the comments in DataService
|
|
70
|
-
this.
|
|
70
|
+
this.getAdaptableApi().internalApi.getDataService().logUndoChange(cellDataChangedInfo);
|
|
71
71
|
const cellUpdateRequest = {
|
|
72
72
|
columnId: cellDataChangedInfo.column.columnId,
|
|
73
73
|
newValue: cellDataChangedInfo.oldValue,
|
|
@@ -87,7 +87,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
87
87
|
}
|
|
88
88
|
setCellValue(cellUpdateRequest) {
|
|
89
89
|
var _a;
|
|
90
|
-
const abColumn = this.
|
|
90
|
+
const abColumn = this.getAdaptableApi().columnApi.getColumnWithColumnId(cellUpdateRequest.columnId);
|
|
91
91
|
if (!abColumn) {
|
|
92
92
|
this.logWarn(`setCellValue() - column not found for columnId: ${cellUpdateRequest.columnId}`);
|
|
93
93
|
return;
|
|
@@ -128,7 +128,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
128
128
|
}
|
|
129
129
|
clearGridFiltering() {
|
|
130
130
|
// slightly round the houses but we have to call ColumnFilterAPI as it does it properly
|
|
131
|
-
this.
|
|
131
|
+
this.getAdaptableApi().columnFilterApi.clearColumnFilters();
|
|
132
132
|
}
|
|
133
133
|
getColumnSorts() {
|
|
134
134
|
return this.getAdaptableState().Grid.ColumnSorts;
|
|
@@ -215,7 +215,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
215
215
|
}
|
|
216
216
|
selectCellRangeByQuery(query, gridCellRange, clearSelection) {
|
|
217
217
|
const filteredRowNodes = [];
|
|
218
|
-
const isRowNodeInQuery = (rowNode) => this.
|
|
218
|
+
const isRowNodeInQuery = (rowNode) => this.getAdaptableApi().internalApi
|
|
219
219
|
.getQueryLanguageService()
|
|
220
220
|
.evaluateBooleanExpression(query, 'GridInfo', rowNode);
|
|
221
221
|
if (gridCellRange) {
|
|
@@ -239,7 +239,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
239
239
|
/**
|
|
240
240
|
* Select all rows and all columns
|
|
241
241
|
*/
|
|
242
|
-
const currentLayout = this.
|
|
242
|
+
const currentLayout = this.getAdaptableApi().layoutApi.getCurrentLayout();
|
|
243
243
|
preapredGridCellRange = {
|
|
244
244
|
columnIds: currentLayout.Columns,
|
|
245
245
|
};
|
|
@@ -275,7 +275,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
275
275
|
this.selectColumns([columnId]);
|
|
276
276
|
}
|
|
277
277
|
selectColumns(columnIds) {
|
|
278
|
-
this.
|
|
278
|
+
this.getAdaptableApi().columnApi.selectColumns(columnIds);
|
|
279
279
|
}
|
|
280
280
|
getFirstRowNode() {
|
|
281
281
|
return this.adaptable.getFirstRowNode();
|
|
@@ -308,7 +308,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
308
308
|
}
|
|
309
309
|
getNormalisedValueFromRowNode(rowNode, columnId) {
|
|
310
310
|
const rawValue = this.adaptable.getRawValueFromRowNode(rowNode, columnId);
|
|
311
|
-
const abColumn = this.
|
|
311
|
+
const abColumn = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
|
|
312
312
|
return this.adaptable.getNormalisedValueFromRawValue(rawValue, abColumn);
|
|
313
313
|
}
|
|
314
314
|
getRowNodesForPrimaryKeys(primaryKeyValues) {
|
|
@@ -535,7 +535,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
535
535
|
const visibleColumns = (_c = transposeConfig.visibleColumns) !== null && _c !== void 0 ? _c : false;
|
|
536
536
|
const visibleRows = (_d = transposeConfig.visibleRows) !== null && _d !== void 0 ? _d : false;
|
|
537
537
|
const autosize = (_e = transposeConfig.autosize) !== null && _e !== void 0 ? _e : true;
|
|
538
|
-
this.
|
|
538
|
+
this.getAdaptableApi().internalApi.showPopupWindow({
|
|
539
539
|
id: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
540
540
|
factoryId: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
541
541
|
title: 'Transposed View',
|
|
@@ -549,4 +549,7 @@ export class GridApiImpl extends ApiBase {
|
|
|
549
549
|
},
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
|
+
getAllGridColumns() {
|
|
553
|
+
return this.adaptable.getAllGridColumns();
|
|
554
|
+
}
|
|
552
555
|
}
|
|
@@ -45,11 +45,4 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
45
45
|
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
46
46
|
addColumnToLayout(columnId: string, layoutName: string): void;
|
|
47
47
|
addColumnToCurrentLayout(columnId: string): void;
|
|
48
|
-
getLayoutSupportedFeatures(): {
|
|
49
|
-
RowGroupedColumns: boolean;
|
|
50
|
-
AggregationColumns: boolean;
|
|
51
|
-
PivotColumns: boolean;
|
|
52
|
-
ColumnFilters: boolean;
|
|
53
|
-
ColumnSorts: boolean;
|
|
54
|
-
};
|
|
55
48
|
}
|
|
@@ -242,19 +242,4 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
242
242
|
addColumnToCurrentLayout(columnId) {
|
|
243
243
|
this.addColumnToLayout(columnId, this.getCurrentLayoutName());
|
|
244
244
|
}
|
|
245
|
-
getLayoutSupportedFeatures() {
|
|
246
|
-
const layoutSupportedFeatures = {
|
|
247
|
-
RowGroupedColumns: true,
|
|
248
|
-
AggregationColumns: true,
|
|
249
|
-
PivotColumns: true,
|
|
250
|
-
ColumnFilters: true,
|
|
251
|
-
ColumnSorts: true,
|
|
252
|
-
};
|
|
253
|
-
if (this.getGridApi().getAgGridRowModelType() === 'viewport') {
|
|
254
|
-
layoutSupportedFeatures.RowGroupedColumns = false;
|
|
255
|
-
layoutSupportedFeatures.AggregationColumns = false;
|
|
256
|
-
layoutSupportedFeatures.PivotColumns = false;
|
|
257
|
-
}
|
|
258
|
-
return layoutSupportedFeatures;
|
|
259
|
-
}
|
|
260
245
|
}
|
|
@@ -71,9 +71,9 @@ export class PredicateApiImpl extends ApiBase {
|
|
|
71
71
|
if (!predicate.ColumnId) {
|
|
72
72
|
return this.handlePredicate(predicate, context, defaultReturn);
|
|
73
73
|
}
|
|
74
|
-
const paramsForColumn = Object.assign(Object.assign({}, context), { column: this.
|
|
74
|
+
const paramsForColumn = Object.assign(Object.assign({}, context), { column: this.getAdaptableApi().columnApi.getColumnWithColumnId(predicate.ColumnId),
|
|
75
75
|
// value: params?.node?.data?.[predicate.ColumnId],
|
|
76
|
-
value: this.
|
|
76
|
+
value: this.getAdaptableApi().gridApi.getRawValueFromRowNode(context.node, predicate.ColumnId) });
|
|
77
77
|
if ('oldValue' in paramsForColumn) {
|
|
78
78
|
delete paramsForColumn.oldValue;
|
|
79
79
|
}
|
|
@@ -52,7 +52,7 @@ export class ScheduleApiImpl extends ApiBase {
|
|
|
52
52
|
}
|
|
53
53
|
getReportSchedules(config) {
|
|
54
54
|
var _a;
|
|
55
|
-
return ((_a = this.handleLayoutAssociatedObjects(this.
|
|
55
|
+
return ((_a = this.handleLayoutAssociatedObjects(this.getAdaptableApi().exportApi.getReportSchedules(), 'Schedule', config)) !== null && _a !== void 0 ? _a : []);
|
|
56
56
|
}
|
|
57
57
|
getActiveReportSchedules() {
|
|
58
58
|
return this.getReportSchedules().filter((schedule) => !schedule.IsSuspended);
|
|
@@ -81,7 +81,7 @@ export class ScheduleApiImpl extends ApiBase {
|
|
|
81
81
|
}
|
|
82
82
|
getIPushPullSchedules(config) {
|
|
83
83
|
var _a;
|
|
84
|
-
const ippApi = this.
|
|
84
|
+
const ippApi = this.getAdaptableApi().pluginsApi.getipushpullPluginApi();
|
|
85
85
|
return ((_a = this.handleLayoutAssociatedObjects(ippApi === null || ippApi === void 0 ? void 0 : ippApi.getIPushPullSchedules(), 'Schedule', config)) !== null && _a !== void 0 ? _a : []);
|
|
86
86
|
}
|
|
87
87
|
getActiveIPushPullSchedules() {
|
|
@@ -111,7 +111,7 @@ export class ScheduleApiImpl extends ApiBase {
|
|
|
111
111
|
}
|
|
112
112
|
getOpenFinSchedules(config) {
|
|
113
113
|
var _a;
|
|
114
|
-
const openFinApi = this.
|
|
114
|
+
const openFinApi = this.getAdaptableApi().pluginsApi.getOpenFinPluginApi();
|
|
115
115
|
return ((_a = this.handleLayoutAssociatedObjects(openFinApi === null || openFinApi === void 0 ? void 0 : openFinApi.getOpenFinSchedules(), 'Schedule', config)) !== null && _a !== void 0 ? _a : []);
|
|
116
116
|
}
|
|
117
117
|
getActiveOpenFinSchedules() {
|
|
@@ -163,10 +163,10 @@ export class ScheduleApiImpl extends ApiBase {
|
|
|
163
163
|
}
|
|
164
164
|
else if (scheduleType == 'Report') {
|
|
165
165
|
const reportSchedule = schedule;
|
|
166
|
-
this.
|
|
166
|
+
this.getAdaptableApi().exportApi.runReport(reportSchedule.ReportName, reportSchedule.ExportDestination);
|
|
167
167
|
}
|
|
168
168
|
else if (scheduleType == 'ipushpull') {
|
|
169
|
-
const ippApi = this.
|
|
169
|
+
const ippApi = this.getAdaptableApi().pluginsApi.getipushpullPluginApi();
|
|
170
170
|
const iPushPullSchedule = schedule;
|
|
171
171
|
if (iPushPullSchedule.Transmission == 'Snapshot') {
|
|
172
172
|
ippApi.sendSnapshot(iPushPullSchedule.IPushPullReport);
|
|
@@ -176,7 +176,7 @@ export class ScheduleApiImpl extends ApiBase {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
else if (scheduleType == 'OpenFin') {
|
|
179
|
-
const openFinApi = this.
|
|
179
|
+
const openFinApi = this.getAdaptableApi().pluginsApi.getOpenFinPluginApi();
|
|
180
180
|
const openFinSchedule = schedule;
|
|
181
181
|
openFinApi.startLiveData(openFinSchedule.OpenFinReport);
|
|
182
182
|
}
|
|
@@ -26,7 +26,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
26
26
|
if (scope == undefined) {
|
|
27
27
|
return [];
|
|
28
28
|
}
|
|
29
|
-
const columns = this.
|
|
29
|
+
const columns = this.getAdaptableApi().columnApi.getColumns();
|
|
30
30
|
if ('All' in scope) {
|
|
31
31
|
return columns;
|
|
32
32
|
}
|
|
@@ -53,7 +53,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
53
53
|
if ('ColumnIds' in scope) {
|
|
54
54
|
return ((scope.ColumnIds.length > 1 ? 'Columns' : 'Column') +
|
|
55
55
|
': ' +
|
|
56
|
-
this.
|
|
56
|
+
this.getAdaptableApi().columnApi
|
|
57
57
|
.getFriendlyNamesForColumnIds(scope.ColumnIds)
|
|
58
58
|
.map((c) => {
|
|
59
59
|
return '"' + c + '"';
|
|
@@ -96,7 +96,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
96
96
|
!this.scopeIsAll(scope) &&
|
|
97
97
|
'ColumnIds' in scope &&
|
|
98
98
|
scope.ColumnIds.length == 1 &&
|
|
99
|
-
this.
|
|
99
|
+
this.getAdaptableApi().columnApi.hasNumberDataType(scope.ColumnIds[0]));
|
|
100
100
|
}
|
|
101
101
|
isSingleBooleanColumnScope(scope) {
|
|
102
102
|
return (this.scopeHasColumns(scope) &&
|
|
@@ -104,7 +104,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
104
104
|
!this.scopeIsAll(scope) &&
|
|
105
105
|
'ColumnIds' in scope &&
|
|
106
106
|
scope.ColumnIds.length == 1 &&
|
|
107
|
-
this.
|
|
107
|
+
this.getAdaptableApi().columnApi.hasBooleanDataType(scope.ColumnIds[0]));
|
|
108
108
|
}
|
|
109
109
|
areAllBooleanColumnsInScope(scope) {
|
|
110
110
|
return (this.scopeHasColumns(scope) &&
|
|
@@ -112,7 +112,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
112
112
|
!this.scopeIsAll(scope) &&
|
|
113
113
|
'ColumnIds' in scope &&
|
|
114
114
|
scope.ColumnIds.length &&
|
|
115
|
-
scope.ColumnIds.every((columnId) => this.
|
|
115
|
+
scope.ColumnIds.every((columnId) => this.getAdaptableApi().columnApi.hasBooleanDataType(columnId)));
|
|
116
116
|
}
|
|
117
117
|
isColumnInScopeColumns(column, scope) {
|
|
118
118
|
return this.scopeHasColumns(scope) && this.isColumnInScope(column, scope);
|
|
@@ -120,7 +120,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
120
120
|
isPrimaryKeyColumnInScopeColumns(scope) {
|
|
121
121
|
return ('ColumnIds' in scope &&
|
|
122
122
|
scope.ColumnIds.length == 1 &&
|
|
123
|
-
scope.ColumnIds.find((c) => c == this.
|
|
123
|
+
scope.ColumnIds.find((c) => c == this.getAdaptableApi().optionsApi.getPrimaryKey()) != null);
|
|
124
124
|
}
|
|
125
125
|
getScopeToString(scope) {
|
|
126
126
|
if ('All' in scope) {
|
|
@@ -135,7 +135,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
135
135
|
if ('ColumnIds' in scope) {
|
|
136
136
|
let text = scope.ColumnIds.length == 1 ? 'Column: ' : 'Columns: ';
|
|
137
137
|
return (text +
|
|
138
|
-
this.
|
|
138
|
+
this.getAdaptableApi().columnApi
|
|
139
139
|
.getFriendlyNamesForColumnIds(scope.ColumnIds)
|
|
140
140
|
.map((c) => {
|
|
141
141
|
return '"' + c + '"';
|
|
@@ -253,7 +253,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
253
253
|
'DataTypes' in b &&
|
|
254
254
|
a.ColumnIds.every((columnId) => {
|
|
255
255
|
var _a;
|
|
256
|
-
return b.DataTypes.includes((_a = this.
|
|
256
|
+
return b.DataTypes.includes((_a = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId)) === null || _a === void 0 ? void 0 : _a.dataType);
|
|
257
257
|
})) {
|
|
258
258
|
return true;
|
|
259
259
|
}
|
|
@@ -265,7 +265,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
265
265
|
// check if each colum in a has column types in b
|
|
266
266
|
if ('ColumnIds' in a && 'ColumnTypes' in b) {
|
|
267
267
|
const inScope = a.ColumnIds.every((columnId) => {
|
|
268
|
-
const column = this.
|
|
268
|
+
const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
|
|
269
269
|
// check if at least one column-type is in scope
|
|
270
270
|
return column.columnTypes.some((columnColumnType) => b.ColumnTypes.includes(columnColumnType));
|
|
271
271
|
});
|
|
@@ -276,7 +276,7 @@ export class ScopeApiImpl extends ApiBase {
|
|
|
276
276
|
return false;
|
|
277
277
|
}
|
|
278
278
|
createCellColorRangesForScope(scope) {
|
|
279
|
-
let distinctColumnsValues = this.
|
|
279
|
+
let distinctColumnsValues = this.getAdaptableApi().gridApi.internalApi.getDistinctRawValuesForColumn(this.getAdaptableApi().scopeApi.getSingleColumnInScope(scope));
|
|
280
280
|
let minValue = Math.min(...distinctColumnsValues);
|
|
281
281
|
let maxValue = Math.max(...distinctColumnsValues);
|
|
282
282
|
const ranges = [];
|
|
@@ -15,11 +15,7 @@ export class TeamSharingApiImpl extends ApiBase {
|
|
|
15
15
|
return [];
|
|
16
16
|
}
|
|
17
17
|
const teamSharingOptions = this.adaptable.adaptableOptions.teamSharingOptions;
|
|
18
|
-
const sharedEntitiesContext =
|
|
19
|
-
adaptableId: this.adaptable.adaptableOptions.adaptableId,
|
|
20
|
-
userName: this.adaptable.adaptableOptions.userName,
|
|
21
|
-
adaptableApi: this.getAdaptableApi(),
|
|
22
|
-
};
|
|
18
|
+
const sharedEntitiesContext = this.getAdaptableApi().internalApi.buildBaseContext();
|
|
23
19
|
let loadedSharedEntities = await teamSharingOptions.loadSharedEntities(sharedEntitiesContext);
|
|
24
20
|
// with v15 we introduced 2 types of SharedEntity: AdaptableSharedEntity (basically the old one) and the new CustomSharedEntity
|
|
25
21
|
// for backwards compatibility, we add default the 'EntityType' property to 'adaptableEntity'
|
|
@@ -40,11 +36,7 @@ export class TeamSharingApiImpl extends ApiBase {
|
|
|
40
36
|
return false;
|
|
41
37
|
}
|
|
42
38
|
const teamSharingOptions = this.adaptable.adaptableOptions.teamSharingOptions;
|
|
43
|
-
const sharedEntitiesContext =
|
|
44
|
-
adaptableId: this.adaptable.adaptableOptions.adaptableId,
|
|
45
|
-
userName: this.adaptable.adaptableOptions.userName,
|
|
46
|
-
adaptableApi: this.getAdaptableApi(),
|
|
47
|
-
};
|
|
39
|
+
const sharedEntitiesContext = this.getAdaptableApi().internalApi.buildBaseContext();
|
|
48
40
|
const sharedEntitiesAfterCustomisation = teamSharingOptions.saveSharedEntities(sharedEntities, sharedEntitiesContext);
|
|
49
41
|
await teamSharingOptions.persistSharedEntities(sharedEntitiesAfterCustomisation, sharedEntitiesContext);
|
|
50
42
|
return true;
|
|
@@ -100,11 +92,7 @@ export class TeamSharingApiImpl extends ApiBase {
|
|
|
100
92
|
this.logError(`Could NOT import custom shared entity because 'TeamSharingOptions.handleCustomSharedEntityImport(...)' is NOT defined!`, sharedEntity);
|
|
101
93
|
return;
|
|
102
94
|
}
|
|
103
|
-
customSharedEntityImportHandler(sharedEntity,
|
|
104
|
-
adaptableApi: this.getAdaptableApi(),
|
|
105
|
-
adaptableId: this.adaptable.adaptableOptions.adaptableId,
|
|
106
|
-
userName: this.adaptable.adaptableOptions.userName,
|
|
107
|
-
});
|
|
95
|
+
customSharedEntityImportHandler(sharedEntity, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
108
96
|
}
|
|
109
97
|
}
|
|
110
98
|
getTeamSharingState() {
|
|
@@ -57,13 +57,8 @@ export class ThemeApiImpl extends ApiBase {
|
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
this.adaptable.applyAdaptableTheme(currentTheme);
|
|
60
|
-
let themeChangedInfo = {
|
|
61
|
-
|
|
62
|
-
theme: currentTheme,
|
|
63
|
-
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
64
|
-
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
65
|
-
};
|
|
66
|
-
this.adaptable.api.eventApi.emit('ThemeChanged', themeChangedInfo);
|
|
60
|
+
let themeChangedInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { theme: currentTheme });
|
|
61
|
+
this.getAdaptableApi().eventApi.emit('ThemeChanged', themeChangedInfo);
|
|
67
62
|
}
|
|
68
63
|
getUserThemes() {
|
|
69
64
|
var _a;
|
|
@@ -53,7 +53,7 @@ export class UserInterfaceApiImpl extends ApiBase {
|
|
|
53
53
|
}
|
|
54
54
|
permittedValuesItem = permittedValues.find((permittedValue) => {
|
|
55
55
|
return ('All' in permittedValue.scope &&
|
|
56
|
-
this.
|
|
56
|
+
this.getAdaptableApi().scopeApi.isColumnInScope(column, permittedValue.scope));
|
|
57
57
|
});
|
|
58
58
|
if (permittedValuesItem) {
|
|
59
59
|
return permittedValuesItem;
|
|
@@ -73,12 +73,7 @@ export class UserInterfaceApiImpl extends ApiBase {
|
|
|
73
73
|
// first do the function then get hardcoded items
|
|
74
74
|
if (permittedValues != null && typeof permittedValues === 'function') {
|
|
75
75
|
if (column) {
|
|
76
|
-
const permittedValuesParams = {
|
|
77
|
-
adaptableApi: this.getAdaptableApi(),
|
|
78
|
-
userName: this.getOptions().userName,
|
|
79
|
-
adaptableId: this.getOptions().adaptableId,
|
|
80
|
-
column: column,
|
|
81
|
-
};
|
|
76
|
+
const permittedValuesParams = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { column: column });
|
|
82
77
|
return permittedValues(permittedValuesParams);
|
|
83
78
|
}
|
|
84
79
|
}
|
|
@@ -140,7 +135,7 @@ export class UserInterfaceApiImpl extends ApiBase {
|
|
|
140
135
|
if (!editLookUpItem || !gridCell || !gridCell.column) {
|
|
141
136
|
return undefined;
|
|
142
137
|
}
|
|
143
|
-
return this.
|
|
138
|
+
return this.getAdaptableApi().gridApi.internalApi.getEditLookUpValuesForColumn(editLookUpItem, gridCell.column, gridCell);
|
|
144
139
|
}
|
|
145
140
|
getEditableCellStyle() {
|
|
146
141
|
return this.getUserInterfaceOptions().editableCellStyle;
|
|
@@ -151,11 +146,7 @@ export class UserInterfaceApiImpl extends ApiBase {
|
|
|
151
146
|
getAdaptableObjectTags() {
|
|
152
147
|
const objectTags = this.getUserInterfaceOptions().objectTags;
|
|
153
148
|
if (objectTags != null && typeof objectTags === 'function') {
|
|
154
|
-
return objectTags(
|
|
155
|
-
adaptableApi: this.adaptable.api,
|
|
156
|
-
userName: this.getOptions().userName,
|
|
157
|
-
adaptableId: this.getOptions().adaptableId,
|
|
158
|
-
});
|
|
149
|
+
return objectTags(this.getAdaptableApi().internalApi.buildBaseContext());
|
|
159
150
|
}
|
|
160
151
|
else {
|
|
161
152
|
let arr = objectTags;
|
|
@@ -42,13 +42,7 @@ export class ActionRowInternalApi extends ApiBase {
|
|
|
42
42
|
: this.actionRowFormOptions.formDescription;
|
|
43
43
|
}
|
|
44
44
|
buildFormParamContext(type, rowNode) {
|
|
45
|
-
return {
|
|
46
|
-
rowNode,
|
|
47
|
-
adaptableApi: this.getAdaptableApi(),
|
|
48
|
-
userName: this.getOptions().userName,
|
|
49
|
-
adaptableId: this.getOptions().adaptableId,
|
|
50
|
-
type: type,
|
|
51
|
-
};
|
|
45
|
+
return Object.assign(Object.assign({ rowNode }, this.getAdaptableApi().internalApi.buildBaseContext()), { type: type });
|
|
52
46
|
}
|
|
53
47
|
buildActionRowFields(actionRowType, rowNode) {
|
|
54
48
|
const relevantColumns = this.getAdaptableApi()
|
|
@@ -64,13 +58,8 @@ export class ActionRowInternalApi extends ApiBase {
|
|
|
64
58
|
showColumnInActionRowForm(adaptableColumn, actionRowType) {
|
|
65
59
|
const showColumnFn = this.getActionRowOptions().actionRowFormOptions.showColumninActionRowForm;
|
|
66
60
|
if (typeof showColumnFn === 'function') {
|
|
67
|
-
return showColumnFn({
|
|
68
|
-
|
|
69
|
-
userName: this.getOptions().userName,
|
|
70
|
-
adaptableId: this.getOptions().adaptableId,
|
|
71
|
-
adaptableColumn,
|
|
72
|
-
actionRowType,
|
|
73
|
-
});
|
|
61
|
+
return showColumnFn(Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { adaptableColumn,
|
|
62
|
+
actionRowType }));
|
|
74
63
|
}
|
|
75
64
|
return true;
|
|
76
65
|
}
|
|
@@ -98,22 +87,7 @@ export class ActionRowInternalApi extends ApiBase {
|
|
|
98
87
|
// textOutput should not be saved, their values are set to display values
|
|
99
88
|
// we need to filter out the textOutput fields and add the primaryKey
|
|
100
89
|
const eventInfo = type === 'rowCreated'
|
|
101
|
-
? {
|
|
102
|
-
type: 'rowCreated',
|
|
103
|
-
formData: this.prepareCreateData(formFields, context),
|
|
104
|
-
adaptableApi: context.adaptableApi,
|
|
105
|
-
userName: this.getOptions().userName,
|
|
106
|
-
adaptableId: this.getOptions().adaptableId,
|
|
107
|
-
clonedRowNode: rowNode,
|
|
108
|
-
}
|
|
109
|
-
: {
|
|
110
|
-
type: 'rowEdited',
|
|
111
|
-
formData: this.prepareEditData(formFields, context),
|
|
112
|
-
rowNode: rowNode,
|
|
113
|
-
adaptableApi: context.adaptableApi,
|
|
114
|
-
userName: this.getOptions().userName,
|
|
115
|
-
adaptableId: this.getOptions().adaptableId,
|
|
116
|
-
};
|
|
90
|
+
? Object.assign(Object.assign({ type: 'rowCreated', formData: this.prepareCreateData(formFields, context) }, this.getAdaptableApi().internalApi.buildBaseContext()), { clonedRowNode: rowNode }) : Object.assign({ type: 'rowEdited', formData: this.prepareEditData(formFields, context), rowNode: rowNode }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
117
91
|
this.getAdaptableApi().eventApi.emit('ActionRowSubmitted', eventInfo);
|
|
118
92
|
(_b = (_a = this.actionRowFormOptions) === null || _a === void 0 ? void 0 : _a.onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
119
93
|
},
|
|
@@ -175,14 +149,8 @@ export class ActionRowInternalApi extends ApiBase {
|
|
|
175
149
|
return customFieldLabel !== null && customFieldLabel !== void 0 ? customFieldLabel : column.friendlyName;
|
|
176
150
|
}
|
|
177
151
|
buildFormFieldLabelContext(type, column, rowNode) {
|
|
178
|
-
return {
|
|
179
|
-
|
|
180
|
-
column,
|
|
181
|
-
adaptableApi: this.getAdaptableApi(),
|
|
182
|
-
userName: this.getOptions().userName,
|
|
183
|
-
adaptableId: this.getOptions().adaptableId,
|
|
184
|
-
type: type,
|
|
185
|
-
};
|
|
152
|
+
return Object.assign(Object.assign({ rowNode,
|
|
153
|
+
column }, this.getAdaptableApi().internalApi.buildBaseContext()), { type: type });
|
|
186
154
|
}
|
|
187
155
|
getFieldTypeFromColumnType(column) {
|
|
188
156
|
switch (column.dataType) {
|
|
@@ -285,13 +253,7 @@ export class ActionRowInternalApi extends ApiBase {
|
|
|
285
253
|
tooltip: 'Delete',
|
|
286
254
|
onClick: (button, context) => {
|
|
287
255
|
var _a, _b;
|
|
288
|
-
const eventInfo = {
|
|
289
|
-
type: 'rowDeleted',
|
|
290
|
-
rowNode: context.rowNode,
|
|
291
|
-
adaptableApi: context.adaptableApi,
|
|
292
|
-
userName: context.userName,
|
|
293
|
-
adaptableId: context.adaptableId,
|
|
294
|
-
};
|
|
256
|
+
const eventInfo = Object.assign({ type: 'rowDeleted', rowNode: context.rowNode }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
295
257
|
this.getEventApi().emit('ActionRowSubmitted', eventInfo);
|
|
296
258
|
(_b = (_a = this.getActionRowOptions().actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
297
259
|
},
|
|
@@ -294,11 +294,7 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
294
294
|
if (typeof this.adaptable.adaptableOptions.userInterfaceOptions.objectTags === 'function') {
|
|
295
295
|
// sanitize the provided tags, just to be sure that the user does NOT break the UI
|
|
296
296
|
return this.adaptable.adaptableOptions.userInterfaceOptions
|
|
297
|
-
.objectTags(
|
|
298
|
-
adaptableApi: this.adaptable.api,
|
|
299
|
-
userName: this.getOptions().userName,
|
|
300
|
-
adaptableId: this.getOptions().adaptableId,
|
|
301
|
-
})
|
|
297
|
+
.objectTags(this.buildBaseContext())
|
|
302
298
|
.filter((tag) => typeof tag === 'string');
|
|
303
299
|
}
|
|
304
300
|
}
|
|
@@ -315,13 +311,7 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
315
311
|
}
|
|
316
312
|
if (typeof this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions
|
|
317
313
|
.autoGenerateTagsForLayouts === 'function') {
|
|
318
|
-
const autoGenerateTagsForLayoutsContext = {
|
|
319
|
-
layouts: this.adaptable.api.layoutApi.getLayouts(),
|
|
320
|
-
objectTags: this.getAdaptableApi().userInterfaceApi.getAdaptableObjectTags(),
|
|
321
|
-
adaptableApi: this.adaptable.api,
|
|
322
|
-
userName: this.getOptions().userName,
|
|
323
|
-
adaptableId: this.getOptions().adaptableId,
|
|
324
|
-
};
|
|
314
|
+
const autoGenerateTagsForLayoutsContext = Object.assign({ layouts: this.adaptable.api.layoutApi.getLayouts(), objectTags: this.getAdaptableApi().userInterfaceApi.getAdaptableObjectTags() }, this.buildBaseContext());
|
|
325
315
|
const customGeneratedTags = this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
|
|
326
316
|
// sanitize the provided tags, just to be sure that the user does NOT break the UI
|
|
327
317
|
return customGeneratedTags.filter((tag) => typeof tag === 'string');
|
|
@@ -80,12 +80,7 @@ export class AlertInternalApi extends ApiBase {
|
|
|
80
80
|
*/
|
|
81
81
|
publishAlertFiredEvent(alertToFire) {
|
|
82
82
|
const adaptableApi = this.getAdaptableApi();
|
|
83
|
-
const alertFiredInfo = {
|
|
84
|
-
adaptableApi: adaptableApi,
|
|
85
|
-
alert: alertToFire,
|
|
86
|
-
userName: adaptableApi.optionsApi.getUserName(),
|
|
87
|
-
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
88
|
-
};
|
|
83
|
+
const alertFiredInfo = Object.assign({ alert: alertToFire }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
89
84
|
this.getEventApi().emit('AlertFired', alertFiredInfo);
|
|
90
85
|
}
|
|
91
86
|
/**
|
|
@@ -295,7 +290,7 @@ export class AlertInternalApi extends ApiBase {
|
|
|
295
290
|
var _a, _b, _c, _d;
|
|
296
291
|
let ruleDescription = ((_b = (_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length)
|
|
297
292
|
? (_d = (_c = alertDefinition.Rule) === null || _c === void 0 ? void 0 : _c.Predicates) === null || _d === void 0 ? void 0 : _d.map((predicate) => this.getPredicateApi().predicateToString(predicate)).join(' AND ')
|
|
298
|
-
: this.
|
|
293
|
+
: this.getAdaptableApi().internalApi.getAdaptableQueryExpressionText(alertDefinition.Rule);
|
|
299
294
|
return ruleDescription;
|
|
300
295
|
}
|
|
301
296
|
/**
|
|
@@ -472,17 +467,9 @@ export class AlertInternalApi extends ApiBase {
|
|
|
472
467
|
isAlertPredicateTriggered(alert, dataChangedEvent, defaultNoPredicateReturn = false) {
|
|
473
468
|
var _a;
|
|
474
469
|
const adapatableApi = this.getAdaptableApi();
|
|
475
|
-
const predicateDefHandlerContext = {
|
|
476
|
-
value: dataChangedEvent.newValue,
|
|
477
|
-
oldValue: dataChangedEvent.oldValue,
|
|
470
|
+
const predicateDefHandlerContext = Object.assign({ value: dataChangedEvent.newValue, oldValue: dataChangedEvent.oldValue,
|
|
478
471
|
// TODO send real display value
|
|
479
|
-
displayValue: null,
|
|
480
|
-
node: dataChangedEvent.rowNode,
|
|
481
|
-
column: dataChangedEvent.column,
|
|
482
|
-
adaptableApi: adapatableApi,
|
|
483
|
-
userName: adapatableApi.optionsApi.getUserName(),
|
|
484
|
-
adaptableId: adapatableApi.optionsApi.getAdaptableId(),
|
|
485
|
-
};
|
|
472
|
+
displayValue: null, node: dataChangedEvent.rowNode, column: dataChangedEvent.column }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
486
473
|
return this.getAdaptableApi().predicateApi.handleColumnPredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, defaultNoPredicateReturn);
|
|
487
474
|
}
|
|
488
475
|
isAlertDefinitionForRowChangeEvent(alertDefinition) {
|