@adaptabletools/adaptable-cjs 18.0.0-canary.24 → 18.0.0-canary.26
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 +4 -4
- 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 +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +2 -13
- 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/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/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 +1 -0
- 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/RowSummary.d.ts +1 -1
- package/src/PredefinedConfig/Common/RowSummary.js +4 -4
- package/src/Strategy/CellSummaryModule.js +54 -94
- package/src/Strategy/LayoutModule.js +5 -1
- 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/View/Layout/Wizard/LayoutWizard.js +2 -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 +19 -7
- package/src/agGrid/AgGridAdapter.d.ts +1 -2
- 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.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "18.0.0-canary.
|
|
3
|
+
"version": "18.0.0-canary.26",
|
|
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",
|
|
@@ -243,7 +243,7 @@ export interface IAdaptable {
|
|
|
243
243
|
getAgGridCurrentThemeName(): string;
|
|
244
244
|
applyAdaptableTheme(theme: AdaptableTheme | string): void;
|
|
245
245
|
setRowGroupColumns(columnIds: string[]): void;
|
|
246
|
-
|
|
246
|
+
getAllGridColumns(): Column<any>[];
|
|
247
247
|
clearRowGroupColumns(): void;
|
|
248
248
|
expandAllRowGroups(): void;
|
|
249
249
|
closeAllRowGroups(): void;
|
|
@@ -4,7 +4,7 @@ import { CommentThread, BaseContext, GridCell } from '../types';
|
|
|
4
4
|
*/
|
|
5
5
|
export interface CommentOptions<TData = any> {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Function to configure if a cell can contain Comments
|
|
8
8
|
*/
|
|
9
9
|
isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean;
|
|
10
10
|
/**
|
|
@@ -17,7 +17,7 @@ export interface CommentOptions<TData = any> {
|
|
|
17
17
|
*/
|
|
18
18
|
persistCommentThreads?(commentThreads: CommentThread[]): Promise<void>;
|
|
19
19
|
/**
|
|
20
|
-
* Format string for
|
|
20
|
+
* Format string for dates in Comments Popup
|
|
21
21
|
*
|
|
22
22
|
* @defaultValue 'dd-MM-yyyy HH:mm:ss'
|
|
23
23
|
*/
|
|
@@ -4,14 +4,14 @@ import { AdaptableColumn, AdaptableIcon, AdaptableModule, BaseContext } from '..
|
|
|
4
4
|
* Options for managing menus in AdapTable – provided using 2 collections
|
|
5
5
|
*/
|
|
6
6
|
export interface MenuOptions<TData = any> {
|
|
7
|
-
/**
|
|
8
|
-
* Customises Context Menu (default context menu items are available in provided context)
|
|
9
|
-
*/
|
|
10
|
-
customContextMenu?: (menuContext: CustomContextMenuContext<TData>) => CustomContextMenuItem[];
|
|
11
7
|
/**
|
|
12
8
|
* Customises Column Menu (default column menu items are available in the provided context)
|
|
13
9
|
*/
|
|
14
10
|
customColumnMenu?: (menuContext: CustomColumnMenuContext<TData>) => CustomColumnMenuItem[];
|
|
11
|
+
/**
|
|
12
|
+
* Customises Context Menu (default context menu items are available in provided context)
|
|
13
|
+
*/
|
|
14
|
+
customContextMenu?: (menuContext: CustomContextMenuContext<TData>) => CustomContextMenuItem[];
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Context info provided when building Custom Context Menus
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { DataUpdateConfig } from '../PredefinedConfig/Common/DataUpdateConfig';
|
|
|
7
7
|
import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
|
|
8
8
|
import { CellHighlightInfo } from '../PredefinedConfig/Common/CellHighlightInfo';
|
|
9
9
|
import { RowHighlightInfo } from '../PredefinedConfig/Common/RowHighlightInfo';
|
|
10
|
-
import { IRowNode, RowModelType } from '@ag-grid-community/core';
|
|
10
|
+
import { Column, IRowNode, RowModelType } from '@ag-grid-community/core';
|
|
11
11
|
import { GridCellRange } from '../PredefinedConfig/Selection/GridCellRange';
|
|
12
12
|
import { RowsHighlightInfo } from '../PredefinedConfig/Common/RowsHighlightInfo';
|
|
13
13
|
import { TransposeConfig } from '../PredefinedConfig/Common/TransposeConfig';
|
|
@@ -529,4 +529,5 @@ export interface GridApi {
|
|
|
529
529
|
* Opens a window with a transposed view of Grid
|
|
530
530
|
*/
|
|
531
531
|
showTransposedView(transposeConfig?: TransposeConfig): void;
|
|
532
|
+
getAllGridColumns(): Column<any>[];
|
|
532
533
|
}
|
|
@@ -12,17 +12,13 @@ class ActionRowApiImpl extends ApiBase_1.ApiBase {
|
|
|
12
12
|
getActionRowButtons() {
|
|
13
13
|
var actionRowButtons = this.getActionRowOptions().actionRowButtons;
|
|
14
14
|
if (typeof actionRowButtons === 'function') {
|
|
15
|
-
const context =
|
|
16
|
-
adaptableApi: this.getAdaptableApi(),
|
|
17
|
-
userName: this.getOptions().userName,
|
|
18
|
-
adaptableId: this.getOptions().adaptableId,
|
|
19
|
-
};
|
|
15
|
+
const context = this.getAdaptableApi().internalApi.buildBaseContext();
|
|
20
16
|
actionRowButtons = actionRowButtons(context);
|
|
21
17
|
}
|
|
22
18
|
return actionRowButtons !== null && actionRowButtons !== void 0 ? actionRowButtons : [];
|
|
23
19
|
}
|
|
24
20
|
displayEditActionRow(primaryKey) {
|
|
25
|
-
const rowNode = this.
|
|
21
|
+
const rowNode = this.getAdaptableApi().gridApi.getRowNodeForPrimaryKey(primaryKey);
|
|
26
22
|
if (!rowNode) {
|
|
27
23
|
this.logWarn(`Can NOT edit row: rowNode not found for primaryKey ${primaryKey}`);
|
|
28
24
|
}
|
|
@@ -44,7 +40,7 @@ class ActionRowApiImpl extends ApiBase_1.ApiBase {
|
|
|
44
40
|
}));
|
|
45
41
|
}
|
|
46
42
|
displayCloneActionRow(primaryKey) {
|
|
47
|
-
const rowNode = this.
|
|
43
|
+
const rowNode = this.getAdaptableApi().gridApi.getRowNodeForPrimaryKey(primaryKey);
|
|
48
44
|
if (!rowNode) {
|
|
49
45
|
this.logWarn(`Can NOT clone row: rowNode not found for primaryKey ${primaryKey}`);
|
|
50
46
|
}
|
|
@@ -47,13 +47,8 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
47
47
|
this.addUidToAdaptableObject(alertToShow);
|
|
48
48
|
this.dispatchAction(SystemRedux.SystemAlertAdd(alertToShow, this.getAlertOptions().maxAlertsInStore));
|
|
49
49
|
// 2. Publish the Alert Fired Event
|
|
50
|
-
const alertFiredInfo = {
|
|
51
|
-
|
|
52
|
-
alert: alertToShow,
|
|
53
|
-
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
54
|
-
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
55
|
-
};
|
|
56
|
-
const results = await this.adaptable.api.eventApi.emit('AlertFired', alertFiredInfo);
|
|
50
|
+
const alertFiredInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { alert: alertToShow });
|
|
51
|
+
const results = await this.getAdaptableApi().eventApi.emit('AlertFired', alertFiredInfo);
|
|
57
52
|
const showPopup = results.reduce((endResult, aResult) => {
|
|
58
53
|
return endResult && aResult !== false;
|
|
59
54
|
}, true);
|
|
@@ -110,13 +105,13 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
110
105
|
}
|
|
111
106
|
if (alertNode) {
|
|
112
107
|
if (alertProperties.HighlightRow) {
|
|
113
|
-
this.
|
|
108
|
+
this.getAdaptableApi().gridApi.refreshRowNodes([alertNode]);
|
|
114
109
|
setTimeout(() => {
|
|
115
110
|
this.dispatchAction(SystemRedux.SystemAlertRemoveRowHighlight(alertToShow));
|
|
116
111
|
}, this.adaptable.adaptableOptions.alertOptions.rowHighlightDuration);
|
|
117
112
|
}
|
|
118
113
|
if (alertProperties.HighlightCell) {
|
|
119
|
-
this.
|
|
114
|
+
this.getAdaptableApi().gridApi.refreshCells([alertNode], [alertToShow.cellDataChangedInfo.column.columnId]);
|
|
120
115
|
setTimeout(() => {
|
|
121
116
|
this.dispatchAction(SystemRedux.SystemAlertRemoveCellHighlight(alertToShow));
|
|
122
117
|
}, this.adaptable.adaptableOptions.alertOptions.cellHighlightDuration);
|
|
@@ -127,7 +122,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
127
122
|
else if (alertProperties.HighlightRow &&
|
|
128
123
|
(0, AdaptableAlert_1.isAdaptableRowChangedAlert)(alertToShow) &&
|
|
129
124
|
((_b = alertToShow.gridDataChangedInfo) === null || _b === void 0 ? void 0 : _b.rowTrigger) === 'Add') {
|
|
130
|
-
this.
|
|
125
|
+
this.getAdaptableApi().gridApi.refreshRowNodes(alertToShow.gridDataChangedInfo.rowNodes);
|
|
131
126
|
setTimeout(() => {
|
|
132
127
|
this.dispatchAction(SystemRedux.SystemAlertRemoveRowHighlight(alertToShow));
|
|
133
128
|
}, this.adaptable.adaptableOptions.alertOptions.rowHighlightDuration);
|
|
@@ -45,12 +45,7 @@ class CalendarApiImpl extends ApiBase_1.ApiBase {
|
|
|
45
45
|
const holidays = this.getCalendarOptions().holidays;
|
|
46
46
|
if (holidays) {
|
|
47
47
|
if (typeof holidays === 'function') {
|
|
48
|
-
|
|
49
|
-
userName: this.getOptions().userName,
|
|
50
|
-
adaptableId: this.getOptions().adaptableId,
|
|
51
|
-
adaptableApi: this.getAdaptableApi(),
|
|
52
|
-
};
|
|
53
|
-
return holidays(baseContext);
|
|
48
|
+
return holidays(this.getAdaptableApi().internalApi.buildBaseContext());
|
|
54
49
|
}
|
|
55
50
|
else {
|
|
56
51
|
return holidays;
|
|
@@ -60,7 +60,7 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
|
60
60
|
}
|
|
61
61
|
showChartDefinitionOnce(chartDefinition, container) {
|
|
62
62
|
var _a;
|
|
63
|
-
const chartRef = this.
|
|
63
|
+
const chartRef = this.getAdaptableApi().chartingApi.getChartRef((_a = chartDefinition === null || chartDefinition === void 0 ? void 0 : chartDefinition.Model) === null || _a === void 0 ? void 0 : _a.chartId);
|
|
64
64
|
if (chartRef) {
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
@@ -96,7 +96,7 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
|
96
96
|
}
|
|
97
97
|
getOpenChartContainer(chartDefinition) {
|
|
98
98
|
var _a, _b, _c;
|
|
99
|
-
const containerOptions = (_b = (_a = this.
|
|
99
|
+
const containerOptions = (_b = (_a = this.getAdaptableApi().optionsApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.chartingOptions) === null || _b === void 0 ? void 0 : _b.chartContainers;
|
|
100
100
|
if (!containerOptions || !containerOptions.length) {
|
|
101
101
|
return null;
|
|
102
102
|
}
|
|
@@ -159,7 +159,7 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
|
159
159
|
],
|
|
160
160
|
} }),
|
|
161
161
|
};
|
|
162
|
-
this.
|
|
162
|
+
this.getAdaptableApi().alertApi.showAdaptableAlert(alert);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
editExternalChartDefinition(chartDefinition) {
|
|
@@ -27,10 +27,10 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
27
27
|
}
|
|
28
28
|
getColumns() {
|
|
29
29
|
var _a;
|
|
30
|
-
return (_a = this.
|
|
30
|
+
return (_a = this.getAdaptableApi().gridApi.getGridState().Columns) !== null && _a !== void 0 ? _a : [];
|
|
31
31
|
}
|
|
32
32
|
getVisibleColumns() {
|
|
33
|
-
const layout = this.
|
|
33
|
+
const layout = this.getAdaptableApi().layoutApi.getCurrentLayout();
|
|
34
34
|
const visibleCols = layout.Columns.reduce((acc, colId) => {
|
|
35
35
|
acc[colId] = true;
|
|
36
36
|
return acc;
|
|
@@ -74,18 +74,18 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
74
74
|
return isAutoPivotColumn(columnId);
|
|
75
75
|
}
|
|
76
76
|
isCalculatedColumn(columnId) {
|
|
77
|
-
return (this.
|
|
77
|
+
return (this.getAdaptableApi().calculatedColumnApi
|
|
78
78
|
.getCalculatedColumns()
|
|
79
79
|
.find((cc) => cc.ColumnId == columnId) != null);
|
|
80
80
|
}
|
|
81
81
|
isFreeTextColumn(columnId) {
|
|
82
|
-
return (this.
|
|
82
|
+
return (this.getAdaptableApi().freeTextColumnApi
|
|
83
83
|
.getFreeTextColumns()
|
|
84
84
|
.find((cc) => cc.ColumnId == columnId) != null);
|
|
85
85
|
}
|
|
86
86
|
isActionColumn(columnId) {
|
|
87
87
|
var _a;
|
|
88
|
-
return (((_a = this.
|
|
88
|
+
return (((_a = this.getAdaptableApi().actionColumnApi
|
|
89
89
|
.getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((cc) => cc.columnId == columnId)) != null);
|
|
90
90
|
}
|
|
91
91
|
getColumnWithColumnId(columnId, logWarning) {
|
|
@@ -165,7 +165,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
165
165
|
}
|
|
166
166
|
let result = columnId + GeneralConstants.MISSING_COLUMN;
|
|
167
167
|
if (this.isAutoRowGroupColumn(columnId)) {
|
|
168
|
-
const currentLayout = this.
|
|
168
|
+
const currentLayout = this.getAdaptableApi().layoutApi.getCurrentLayout();
|
|
169
169
|
if (currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) {
|
|
170
170
|
result = `[Grouped column: ${currentLayout.RowGroupedColumns.join(', ')}]`;
|
|
171
171
|
}
|
|
@@ -18,7 +18,7 @@ class ColumnFilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
18
18
|
};
|
|
19
19
|
return this.getAdaptableApi()
|
|
20
20
|
.predicateApi.internalApi.getFilterPredicateDefs(scope)
|
|
21
|
-
.filter((predicate) => this.
|
|
21
|
+
.filter((predicate) => this.getAdaptableApi().scopeApi.isColumnInScope(column, predicate.columnScope));
|
|
22
22
|
}
|
|
23
23
|
getFilterPredicateDefsForColumnId(columnId) {
|
|
24
24
|
const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
|
|
@@ -35,11 +35,11 @@ class ColumnFilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
35
35
|
}
|
|
36
36
|
isQuickFilterVisible() {
|
|
37
37
|
return (this.isQuickFilterAvailable() &&
|
|
38
|
-
this.
|
|
38
|
+
this.getAdaptableApi().internalApi.getSystemState().IsQuickFilterVisible);
|
|
39
39
|
}
|
|
40
40
|
getColumnFilters() {
|
|
41
41
|
var _a;
|
|
42
|
-
const currentLayout = this.
|
|
42
|
+
const currentLayout = this.getAdaptableApi().layoutApi.getCurrentLayout();
|
|
43
43
|
return (_a = currentLayout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
|
|
44
44
|
}
|
|
45
45
|
getActiveColumnFilters() {
|
|
@@ -59,7 +59,7 @@ class ColumnFilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
59
59
|
}
|
|
60
60
|
getColumnFiltersForLayout(layoutName) {
|
|
61
61
|
var _a;
|
|
62
|
-
const layout = this.
|
|
62
|
+
const layout = this.getAdaptableApi().layoutApi.getLayoutByName(layoutName);
|
|
63
63
|
return (_a = layout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
|
|
64
64
|
}
|
|
65
65
|
setColumnFilters(columnFilters) {
|
|
@@ -68,7 +68,7 @@ class ColumnFilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
68
68
|
this.logWarn('Column Filter has no Predicate', columnFilter);
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
|
-
const isValidPredicate = this.
|
|
71
|
+
const isValidPredicate = this.getAdaptableApi().predicateApi.isValidPredicate(columnFilter.Predicate);
|
|
72
72
|
if (!isValidPredicate) {
|
|
73
73
|
this.logWarn('Column Filter Predicate is not valid', columnFilter);
|
|
74
74
|
}
|
|
@@ -122,10 +122,10 @@ class ColumnFilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
122
122
|
if (!filter || !filter.Predicate || !filter.Predicate.PredicateId) {
|
|
123
123
|
return false;
|
|
124
124
|
}
|
|
125
|
-
const predicateDef = this.
|
|
125
|
+
const predicateDef = this.getAdaptableApi().predicateApi.getPredicateDefById(filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId);
|
|
126
126
|
if (ArrayExtensions_1.default.IsNull(predicateDef.inputs) &&
|
|
127
127
|
// values predicates have no inputs in the definition
|
|
128
|
-
!this.
|
|
128
|
+
!this.getAdaptableApi().predicateApi.internalApi.hasPredicateValues(filter.Predicate)) {
|
|
129
129
|
return true;
|
|
130
130
|
}
|
|
131
131
|
const inputs = filter.Predicate.Inputs;
|
|
@@ -28,7 +28,7 @@ class CommentsApiImpl extends ApiBase_1.ApiBase {
|
|
|
28
28
|
addComment(commentText, address) {
|
|
29
29
|
this.dispatchAction(CommentRedux.CommentsAdd({
|
|
30
30
|
comment: commentText
|
|
31
|
-
? ObjectFactory_1.default.CreateAdaptableComment(commentText, this.
|
|
31
|
+
? ObjectFactory_1.default.CreateAdaptableComment(commentText, this.getAdaptableApi())
|
|
32
32
|
: null,
|
|
33
33
|
cellAddress: address,
|
|
34
34
|
}));
|
|
@@ -66,15 +66,9 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
66
66
|
flushCurrentState: false,
|
|
67
67
|
}).then(() => {
|
|
68
68
|
const newState = this.getPersistedState();
|
|
69
|
-
const stateReloadedInfo = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
adaptableStateKey: adaptableOptions.adaptableStateKey,
|
|
73
|
-
adaptableId: adaptableOptions.adaptableId,
|
|
74
|
-
adaptableApi: this.adaptable.api,
|
|
75
|
-
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
76
|
-
};
|
|
77
|
-
this.adaptable.api.eventApi.emit('AdaptableStateReloaded', stateReloadedInfo);
|
|
69
|
+
const stateReloadedInfo = Object.assign({ oldState,
|
|
70
|
+
newState, adaptableStateKey: adaptableOptions.adaptableStateKey }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
71
|
+
this.getAdaptableApi().eventApi.emit('AdaptableStateReloaded', stateReloadedInfo);
|
|
78
72
|
});
|
|
79
73
|
});
|
|
80
74
|
});
|
|
@@ -97,21 +91,21 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
97
91
|
});
|
|
98
92
|
}
|
|
99
93
|
getAdaptableSearchState() {
|
|
100
|
-
const gridFilter = this.
|
|
94
|
+
const gridFilter = this.getAdaptableApi().gridFilterApi.getCurrentGridFilterExpression();
|
|
101
95
|
const adaptableSearchState = {
|
|
102
|
-
dataSet: this.
|
|
96
|
+
dataSet: this.getAdaptableApi().dataSetApi.getCurrentDataSet(),
|
|
103
97
|
gridFilter: gridFilter,
|
|
104
98
|
gridFilterAST: gridFilter
|
|
105
|
-
? this.
|
|
99
|
+
? this.getAdaptableApi().expressionApi.getASTForExpression(gridFilter)
|
|
106
100
|
: null,
|
|
107
|
-
columnFilters: this.
|
|
101
|
+
columnFilters: this.getAdaptableApi().columnFilterApi.getColumnFilters(),
|
|
108
102
|
};
|
|
109
103
|
return adaptableSearchState;
|
|
110
104
|
}
|
|
111
105
|
getAdaptableSortState() {
|
|
112
106
|
const adaptableSortState = {
|
|
113
|
-
columnSorts: this.
|
|
114
|
-
customSorts: this.
|
|
107
|
+
columnSorts: this.getAdaptableApi().gridApi.getColumnSorts(),
|
|
108
|
+
customSorts: this.getAdaptableApi().customSortApi.getCustomSorts(),
|
|
115
109
|
};
|
|
116
110
|
return adaptableSortState;
|
|
117
111
|
}
|
|
@@ -120,7 +114,7 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
120
114
|
}
|
|
121
115
|
setAdaptableStateKey(adaptableStateKey, config) {
|
|
122
116
|
return new Promise((resolve, reject) => {
|
|
123
|
-
this.
|
|
117
|
+
this.getAdaptableApi().internalApi.executeWithProgressIndicator(`Initialising...`, () => {
|
|
124
118
|
const flushCurrentState = !config || config.flushCurrentState !== false;
|
|
125
119
|
// make sure we persist any "pending" changes to state - since stateOptions.debounceStateDelay can cause
|
|
126
120
|
// the state to be persisted with a delay, which we dont want in this case
|
|
@@ -145,7 +139,7 @@ class ConfigApiImpl extends ApiBase_1.ApiBase {
|
|
|
145
139
|
.then(() => {
|
|
146
140
|
this.adaptable.updateColumnModelAndRefreshGrid({ skipColDefsRefresh: true });
|
|
147
141
|
this.adaptable.setLayout();
|
|
148
|
-
this.
|
|
142
|
+
this.getAdaptableApi().userInterfaceApi.hideLoadingScreen();
|
|
149
143
|
})
|
|
150
144
|
.then(() => {
|
|
151
145
|
// resolve main(result) promise
|
|
@@ -24,12 +24,7 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
|
24
24
|
}
|
|
25
25
|
getCustomDashboardButtonByLabel(buttonLabel) {
|
|
26
26
|
const api = this.getAdaptableApi();
|
|
27
|
-
const dashboardContext = {
|
|
28
|
-
adaptableApi: api,
|
|
29
|
-
userName: this.getOptions().userName,
|
|
30
|
-
adaptableId: this.getOptions().adaptableId,
|
|
31
|
-
dashboardState: api.dashboardApi.getDashboardState(),
|
|
32
|
-
};
|
|
27
|
+
const dashboardContext = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { dashboardState: api.dashboardApi.getDashboardState() });
|
|
33
28
|
return this.getDashboardOptions().customDashboardButtons.find((cb) => {
|
|
34
29
|
api.internalApi.getLabelForButton(cb, dashboardContext) == buttonLabel;
|
|
35
30
|
});
|
|
@@ -48,13 +48,13 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
48
48
|
return currentDestination && this.getDestinationByName(currentDestination);
|
|
49
49
|
}
|
|
50
50
|
getAvailableSystemReports() {
|
|
51
|
-
return this.getExportOptions().systemReportNames.filter((s) => this.
|
|
51
|
+
return this.getExportOptions().systemReportNames.filter((s) => this.getAdaptableApi().internalApi.getReportService().IsSystemReportActive(s));
|
|
52
52
|
}
|
|
53
53
|
getAvailableExportDestinations() {
|
|
54
54
|
let systemDestinations = [];
|
|
55
55
|
this.getExportOptions().systemExportDestinations.forEach((exportDestination) => {
|
|
56
|
-
if (this.
|
|
57
|
-
.getReportService()
|
|
56
|
+
if (this.getAdaptableApi()
|
|
57
|
+
.internalApi.getReportService()
|
|
58
58
|
.IsSystemExportDestinationActive(exportDestination)) {
|
|
59
59
|
systemDestinations.push(exportDestination);
|
|
60
60
|
}
|
|
@@ -147,17 +147,12 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
147
147
|
this.logWarn(`Report '${reportName}' not found!`);
|
|
148
148
|
return undefined;
|
|
149
149
|
}
|
|
150
|
-
return this.
|
|
150
|
+
return this.getAdaptableApi().internalApi.getReportService().getReportData(report);
|
|
151
151
|
}
|
|
152
152
|
isColumnExportable(adaptableColumn) {
|
|
153
153
|
const isExportableFn = this.getExportOptions().isColumnExportable;
|
|
154
154
|
if (typeof isExportableFn === 'function') {
|
|
155
|
-
return isExportableFn({
|
|
156
|
-
adaptableApi: this.adaptable.api,
|
|
157
|
-
userName: this.getOptions().userName,
|
|
158
|
-
adaptableId: this.getOptions().adaptableId,
|
|
159
|
-
adaptableColumn,
|
|
160
|
-
});
|
|
155
|
+
return isExportableFn(Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { adaptableColumn }));
|
|
161
156
|
}
|
|
162
157
|
return true;
|
|
163
158
|
}
|
|
@@ -11,7 +11,7 @@ class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
|
11
11
|
this.internalApi = new ExpressionInternalApi_1.ExpressionInternalApi(adaptable);
|
|
12
12
|
}
|
|
13
13
|
isValidBooleanExpression(query, module, validationErrorMessage) {
|
|
14
|
-
const { isValid, errorMessage } = this.
|
|
14
|
+
const { isValid, errorMessage } = this.getAdaptableApi().internalApi
|
|
15
15
|
.getQueryLanguageService()
|
|
16
16
|
.validateBoolean(query, module, { force: true });
|
|
17
17
|
if (!isValid && validationErrorMessage) {
|
|
@@ -20,7 +20,7 @@ class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
|
20
20
|
return isValid;
|
|
21
21
|
}
|
|
22
22
|
isValidObservableExpression(expression, module, validationErrorMessage) {
|
|
23
|
-
const { isValid, errorMessage } = this.
|
|
23
|
+
const { isValid, errorMessage } = this.getAdaptableApi().internalApi
|
|
24
24
|
.getQueryLanguageService()
|
|
25
25
|
.validateObservable(expression, module);
|
|
26
26
|
if (!isValid && validationErrorMessage) {
|
|
@@ -29,7 +29,7 @@ class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
|
29
29
|
return isValid;
|
|
30
30
|
}
|
|
31
31
|
isValidAggregatedBooleanExpression(expression, module, validationErrorMessage) {
|
|
32
|
-
const { isValid, errorMessage } = this.
|
|
32
|
+
const { isValid, errorMessage } = this.getAdaptableApi().internalApi
|
|
33
33
|
.getQueryLanguageService()
|
|
34
34
|
.validateAggregatedBoolean(expression, module);
|
|
35
35
|
if (!isValid && validationErrorMessage) {
|
|
@@ -38,7 +38,7 @@ class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
|
38
38
|
return isValid;
|
|
39
39
|
}
|
|
40
40
|
isValidAggregatedScalarExpression(expression, module, validationErrorMessage) {
|
|
41
|
-
const { isValid, errorMessage } = this.
|
|
41
|
+
const { isValid, errorMessage } = this.getAdaptableApi().internalApi
|
|
42
42
|
.getQueryLanguageService()
|
|
43
43
|
.validateAggregatedScalar(expression, module);
|
|
44
44
|
if (!isValid && validationErrorMessage) {
|
|
@@ -51,11 +51,11 @@ class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
|
51
51
|
}
|
|
52
52
|
getColumnsFromExpression(expression) {
|
|
53
53
|
try {
|
|
54
|
-
const columnIds = this.
|
|
54
|
+
const columnIds = this.getAdaptableApi().internalApi
|
|
55
55
|
.getQueryLanguageService()
|
|
56
56
|
.getColumnsFromExpression(expression);
|
|
57
57
|
columnIds.forEach((columnId) => {
|
|
58
|
-
const calculatedColumn = this.
|
|
58
|
+
const calculatedColumn = this.getAdaptableApi().calculatedColumnApi.getCalculatedColumnForColumnId(columnId);
|
|
59
59
|
if (calculatedColumn) {
|
|
60
60
|
const transitiveColumnIds = this.getColumnsFromExpression(this.getAdaptableQueryExpression(calculatedColumn.Query));
|
|
61
61
|
columnIds.push(...transitiveColumnIds);
|
|
@@ -73,12 +73,7 @@ class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
|
73
73
|
isColumnQueryable(adaptableColumnBase) {
|
|
74
74
|
let queryableColumnFn = this.getExpressionOptions().isColumnQueryable;
|
|
75
75
|
if (queryableColumnFn) {
|
|
76
|
-
const queryableColumnContext = {
|
|
77
|
-
adaptableColumn: adaptableColumnBase,
|
|
78
|
-
adaptableApi: this.getAdaptableApi(),
|
|
79
|
-
userName: this.getOptions().userName,
|
|
80
|
-
adaptableId: this.getOptions().adaptableId,
|
|
81
|
-
};
|
|
76
|
+
const queryableColumnContext = Object.assign({ adaptableColumn: adaptableColumnBase }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
82
77
|
return queryableColumnFn(queryableColumnContext);
|
|
83
78
|
}
|
|
84
79
|
return true;
|
|
@@ -88,7 +83,7 @@ class ExpressionApiImpl extends ApiBase_1.ApiBase {
|
|
|
88
83
|
return ((_d = (_c = (_b = (_a = query.BooleanExpression) !== null && _a !== void 0 ? _a : query.ScalarExpression) !== null && _b !== void 0 ? _b : query.ObservableExpression) !== null && _c !== void 0 ? _c : query.AggregatedBooleanExpression) !== null && _d !== void 0 ? _d : query.AggregatedScalarExpression);
|
|
89
84
|
}
|
|
90
85
|
getAdaptableQueryExpressionWithColumnFriendlyNames(query) {
|
|
91
|
-
return this.
|
|
86
|
+
return this.getAdaptableApi().internalApi
|
|
92
87
|
.getQueryLanguageService()
|
|
93
88
|
.getExpressionWithColumnFriendlyNames(this.getAdaptableQueryExpression(query));
|
|
94
89
|
}
|
|
@@ -79,7 +79,7 @@ class Fdc3ApiImpl extends ApiBase_1.ApiBase {
|
|
|
79
79
|
return this.internalApi.isStandardIntentType(intentType);
|
|
80
80
|
}
|
|
81
81
|
getFdc3Service() {
|
|
82
|
-
return this.
|
|
82
|
+
return this.getAdaptableApi().internalApi.getFdc3Service();
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
exports.Fdc3ApiImpl = Fdc3ApiImpl;
|
|
@@ -34,13 +34,8 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
|
|
|
34
34
|
}
|
|
35
35
|
showFlashingCell(flashingCellToShow) {
|
|
36
36
|
this.addUidToAdaptableObject(flashingCellToShow);
|
|
37
|
-
const flashingCellFiredInfo = {
|
|
38
|
-
|
|
39
|
-
flashingCell: flashingCellToShow,
|
|
40
|
-
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
41
|
-
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
42
|
-
};
|
|
43
|
-
const results = this.adaptable.api.eventApi.emitSync('FlashingCellDisplayed', flashingCellFiredInfo);
|
|
37
|
+
const flashingCellFiredInfo = Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { flashingCell: flashingCellToShow });
|
|
38
|
+
const results = this.getAdaptableApi().eventApi.emitSync('FlashingCellDisplayed', flashingCellFiredInfo);
|
|
44
39
|
const shouldShow = results.reduce((endResult, aResult) => {
|
|
45
40
|
return endResult && aResult !== false;
|
|
46
41
|
}, true);
|
|
@@ -88,7 +83,7 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
|
|
|
88
83
|
getFlashingCellPredicateDefsForScope(scope) {
|
|
89
84
|
return this.getAdaptableApi()
|
|
90
85
|
.predicateApi.internalApi.getFlashingCellPredicateDefs(scope)
|
|
91
|
-
.filter((predicateDef) => this.
|
|
86
|
+
.filter((predicateDef) => this.getAdaptableApi().scopeApi.isScopeInScope(scope, predicateDef.columnScope));
|
|
92
87
|
}
|
|
93
88
|
clearAllFlashingCells() {
|
|
94
89
|
this.dispatchAction(SystemRedux.SystemFlashingCellDeleteAll());
|
|
@@ -69,7 +69,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
69
69
|
return this.internalApi.getFormatColumnWithColumnInScope(formatColumns, column);
|
|
70
70
|
}
|
|
71
71
|
getFormatColumnsForColumnId(columnId, config) {
|
|
72
|
-
const abColumn = this.
|
|
72
|
+
const abColumn = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
|
|
73
73
|
if (!abColumn) {
|
|
74
74
|
return [];
|
|
75
75
|
}
|
|
@@ -79,13 +79,13 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
79
79
|
this.showModulePopup(ModuleConstants.FormatColumnModuleId);
|
|
80
80
|
}
|
|
81
81
|
getFormatColumnsWithAllScope(formatColumns) {
|
|
82
|
-
return formatColumns.filter((fc) => this.
|
|
82
|
+
return formatColumns.filter((fc) => this.getAdaptableApi().scopeApi.scopeIsAll(fc.Scope));
|
|
83
83
|
}
|
|
84
84
|
getFormatColumnsWithDataTypeScope(formatColumns) {
|
|
85
|
-
return formatColumns.filter((fc) => this.
|
|
85
|
+
return formatColumns.filter((fc) => this.getAdaptableApi().scopeApi.scopeHasDataType(fc.Scope));
|
|
86
86
|
}
|
|
87
87
|
getFormatColumnsWithColumnScope(formatColumns) {
|
|
88
|
-
return formatColumns.filter((fc) => this.
|
|
88
|
+
return formatColumns.filter((fc) => this.getAdaptableApi().scopeApi.scopeHasColumns(fc.Scope));
|
|
89
89
|
}
|
|
90
90
|
hasCustomDisplayFormatter(formatColumn) {
|
|
91
91
|
var _a;
|
|
@@ -89,7 +89,7 @@ class FreeTextColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
89
89
|
}
|
|
90
90
|
getFreeTextColumnValueForRowNode(freeTextColumn, rowNode) {
|
|
91
91
|
try {
|
|
92
|
-
if (this.
|
|
92
|
+
if (this.getAdaptableApi().gridApi.isGroupRowNode(rowNode)) {
|
|
93
93
|
return null;
|
|
94
94
|
}
|
|
95
95
|
if (ArrayExtensions_1.default.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
|
}
|