@adaptabletools/adaptable 24.0.2 → 24.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/devtools.d.ts +506 -5
- package/devtools.js +11 -1
- package/index.css +15 -5
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -1
- package/src/AdaptableOptions/DataImportOptions.d.ts +1 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +2 -10
- package/src/AdaptableState/Common/RowSummary.d.ts +2 -0
- package/src/AdaptableState/LayoutState.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +25 -3
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -0
- package/src/Api/Internal/ExportInternalApi.js +39 -3
- package/src/Api/Internal/LayoutInternalApi.d.ts +11 -1
- package/src/Api/Internal/LayoutInternalApi.js +34 -3
- package/src/Api/Internal/NoteInternalApi.d.ts +12 -0
- package/src/Api/Internal/NoteInternalApi.js +11 -0
- package/src/EnvVars.d.ts +1 -0
- package/src/EnvVars.js +1 -0
- package/src/Redux/Store/AdaptableStore.js +4 -7
- package/src/Strategy/FlashingCellModule.js +2 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +15 -0
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +7 -0
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +17 -1
- package/src/Utilities/Services/QueryLanguageService.d.ts +11 -1
- package/src/Utilities/Services/QueryLanguageService.js +46 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +2 -0
- package/src/Utilities/Services/RowSummaryService.js +6 -1
- package/src/Utilities/license/instanceLicense.d.ts +12 -0
- package/src/Utilities/license/instanceLicense.js +10 -0
- package/src/Utilities/license/licenseStatus.d.ts +26 -0
- package/src/Utilities/license/licenseStatus.js +72 -0
- package/src/View/Components/CellPopup/index.js +15 -10
- package/src/View/GridInfo/GridInfoPopup.js +6 -1
- package/src/View/Layout/TransposedPopup.js +1 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +3 -5
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +10 -24
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +5 -1
- package/src/View/ObjectItemViews/Layout/aggregationSummaryHelpers.d.ts +5 -1
- package/src/View/ObjectItemViews/Layout/aggregationSummaryHelpers.js +6 -3
- package/src/agGrid/AdaptableAgGrid.d.ts +7 -3
- package/src/agGrid/AdaptableAgGrid.js +122 -47
- package/src/agGrid/AdaptableFilterHandler.d.ts +2 -0
- package/src/agGrid/AdaptableFilterHandler.js +34 -0
- package/src/agGrid/AgGridAdapter.d.ts +9 -0
- package/src/agGrid/AgGridAdapter.js +23 -12
- package/src/agGrid/AgGridColumnAdapter.d.ts +2 -0
- package/src/agGrid/AgGridColumnAdapter.js +124 -78
- package/src/agGrid/AgGridExportAdapter.d.ts +5 -0
- package/src/agGrid/AgGridExportAdapter.js +31 -0
- package/src/agGrid/AgGridMenuAdapter.js +1 -1
- package/src/agGrid/applyGlobalGridOptions.d.ts +9 -0
- package/src/agGrid/applyGlobalGridOptions.js +36 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +22 -0
- package/src/agGrid/columnMinMaxCache.d.ts +33 -0
- package/src/agGrid/columnMinMaxCache.js +50 -0
- package/src/devTools/PerfStore.d.ts +218 -0
- package/src/devTools/PerfStore.js +717 -0
- package/src/devTools/index.d.ts +33 -0
- package/src/devTools/index.js +132 -56
- package/src/devTools/logBuffer.d.ts +17 -0
- package/src/devTools/logBuffer.js +33 -0
- package/src/devTools/memoryInfo.d.ts +15 -0
- package/src/devTools/memoryInfo.js +229 -0
- package/src/devTools/memoryRoots.d.ts +41 -0
- package/src/devTools/memoryRoots.js +136 -0
- package/src/devTools/perfContext.d.ts +5 -0
- package/src/devTools/perfContext.js +155 -0
- package/src/devTools/perfInstrumentation.d.ts +13 -0
- package/src/devTools/perfInstrumentation.js +78 -0
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +3 -1
- package/src/layout-manager/src/expandAllRowGroups.d.ts +6 -0
- package/src/layout-manager/src/expandAllRowGroups.js +13 -0
- package/src/layout-manager/src/index.js +18 -10
- package/src/setupDevTools.js +560 -106
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/vendor/components/Combobox/index.js +1 -1
- package/vendor/components/Combobox/index.js.map +1 -1
- package/vendor/components/Radio/index.d.ts.map +1 -1
- package/vendor/components/Radio/index.js +1 -1
- package/vendor/components/Radio/index.js.map +1 -1
- package/vendor/components/Resizable/index.d.ts +14 -9
- package/vendor/components/Resizable/index.d.ts.map +1 -1
- package/vendor/components/Resizable/index.js +23 -0
- package/vendor/components/Resizable/index.js.map +1 -1
- package/vendor/components/Resizable/resizableUtils.d.ts +24 -13
- package/vendor/components/Resizable/resizableUtils.d.ts.map +1 -1
- package/vendor/components/Resizable/resizableUtils.js +13 -3
- package/vendor/components/Resizable/resizableUtils.js.map +1 -1
- package/vendor/components/index.css +12 -5
- package/vendor/components/ui/combobox.js +1 -1
- package/vendor/components/ui/combobox.js.map +1 -1
- package/vendor/components/ui/input.js +1 -1
- package/vendor/components/ui/input.js.map +1 -1
- package/vendor/components/ui/select.js +1 -1
- package/vendor/components/ui/select.js.map +1 -1
- package/vendor/components/ui/textarea.js +1 -1
- package/vendor/components/ui/textarea.js.map +1 -1
- package/vendor/components/ui/tooltip.d.ts.map +1 -1
- package/vendor/components/ui/tooltip.js +3 -1
- package/vendor/components/ui/tooltip.js.map +1 -1
|
@@ -345,11 +345,11 @@ export interface ProcessExportContext extends BaseExportContext {
|
|
|
345
345
|
*/
|
|
346
346
|
getReportColumns: () => ReportColumn[];
|
|
347
347
|
/**
|
|
348
|
-
* Converts the Report Data to Excel format
|
|
348
|
+
* Converts the Report Data to Excel format, using `excelSheetName`, `skipColumnHeaders` and AG Grid's `defaultExcelExportParams`
|
|
349
349
|
*/
|
|
350
350
|
convertToExcel: (reportData: ReportData) => Blob;
|
|
351
351
|
/**
|
|
352
|
-
* Converts the Report Data to CSV format
|
|
352
|
+
* Converts the Report Data to CSV format, using `csvSeparator`, `skipColumnHeaders` and AG Grid's `defaultCsvExportParams`
|
|
353
353
|
*/
|
|
354
354
|
convertToCsv: (reportData: ReportData) => string;
|
|
355
355
|
}
|
|
@@ -77,10 +77,7 @@ export interface NumberFormatterOptions extends BaseFormatterOptions {
|
|
|
77
77
|
*/
|
|
78
78
|
Multiplier?: number;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
* - omitted / undefined, or `'0'` — use normal formatting (e.g. `0`, `0.00`)
|
|
82
|
-
* - `''` — show a blank cell (user cleared the default `0` in the wizard)
|
|
83
|
-
* - any other string — show that text (e.g. `-`, `—`)
|
|
80
|
+
* What to show when numeric value is zero (after multiplier & rounding)
|
|
84
81
|
*/
|
|
85
82
|
ZeroDisplay?: string;
|
|
86
83
|
/**
|
|
@@ -112,12 +109,7 @@ export interface NumberFormatterOptions extends BaseFormatterOptions {
|
|
|
112
109
|
*/
|
|
113
110
|
Empty?: boolean;
|
|
114
111
|
/**
|
|
115
|
-
* Numeric notation to use when rendering the value
|
|
116
|
-
*
|
|
117
|
-
* - `'standard'` (default) — renders the number normally.
|
|
118
|
-
* - `'scientific'` — renders the number in scientific notation
|
|
119
|
-
* (e.g. `1.23e+5`). When set, `IntegerSeparator` is ignored
|
|
120
|
-
* and `FractionDigits` controls the number of mantissa digits.
|
|
112
|
+
* Numeric notation to use when rendering the value - standard or scientific
|
|
121
113
|
*/
|
|
122
114
|
Notation?: 'standard' | 'scientific';
|
|
123
115
|
}
|
|
@@ -21,6 +21,8 @@ export type RowSummaryPosition = 'Top' | 'Bottom';
|
|
|
21
21
|
* A pinned row of column summaries in a table layout.
|
|
22
22
|
*
|
|
23
23
|
* `ColumnsMap` is required: each key is a column id and each value is a summary name such as `'SUM'` or `'AVG'`. `Position` is `'Top'` or `'Bottom'`; omit it to pin the row to the bottom. `IncludeOnlyFilteredRows` defaults to true, so the summary uses the rows that pass the current filter. Suspend with `IsSuspended`. Requires AG Grid `PinnedRowModule`.
|
|
24
|
+
*
|
|
25
|
+
* Row Summaries are not displayed while the Layout's `GrandTotalRow` is `'pinnedTop'` or `'pinnedBottom'`, or when AG Grid `enableRowPinning` is set.
|
|
24
26
|
*/
|
|
25
27
|
export interface RowSummary extends SuspendableObject {
|
|
26
28
|
/**
|
|
@@ -196,7 +196,7 @@ export interface PivotLayout extends LayoutBase {
|
|
|
196
196
|
*/
|
|
197
197
|
PivotColumnTotal?: PivotTotalPosition;
|
|
198
198
|
/**
|
|
199
|
-
* Ordered list of Pivot Result Columns; set to `true` to track current display order, or provide custom list
|
|
199
|
+
* Ordered list of Pivot Result Columns; set to `true` to track current display order, or provide custom list (with the Server-Side Row Model it is replaced by the order in which the datasource supplies the columns)
|
|
200
200
|
*/
|
|
201
201
|
PivotResultColumnsOrder?: string[] | boolean;
|
|
202
202
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as InternalRedux from '../../Redux/ActionsReducers/InternalRedux';
|
|
2
|
+
import { getPerfRecorder } from '../../devTools/PerfStore';
|
|
2
3
|
import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
|
|
3
4
|
import * as AlertRedux from '../../Redux/ActionsReducers/AlertRedux';
|
|
4
5
|
import { ApiBase } from './ApiBase';
|
|
@@ -45,6 +46,7 @@ export class AlertApiImpl extends ApiBase {
|
|
|
45
46
|
batchedAlerts = [];
|
|
46
47
|
async displayAdaptableAlert(alertToShow) {
|
|
47
48
|
this.addUidToAdaptableObject(alertToShow);
|
|
49
|
+
getPerfRecorder(this.getAdaptableApi().optionsApi.getAdaptableId())?.count('alertsFired');
|
|
48
50
|
this.getEventApi().internalApi.fireAlertFiredEvent(alertToShow);
|
|
49
51
|
this.applyPerChangeAlertEffects(alertToShow);
|
|
50
52
|
if (this.canConsolidateAlert(alertToShow)) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
+
import { getPerfRecorder } from '../../devTools/PerfStore';
|
|
2
3
|
import { expressionContainsAstNodeType, getCalculatedColumnType, isPerRowCalculatedColumnType, supportsCompactExpressionEditor, } from '../../AdaptableState/CalculatedColumnState';
|
|
3
4
|
import { CreateEmptyCalculatedColumn, CreateInternalAlertDefinitionForMessages, } from '../../Utilities/ObjectFactory';
|
|
4
5
|
import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
|
|
@@ -186,6 +187,15 @@ export class CalculatedColumnInternalApi extends ApiBase {
|
|
|
186
187
|
columnTypes.push(...calculatedColumnSettings.ColumnTypes);
|
|
187
188
|
}
|
|
188
189
|
const isExternalEvaluation = !this.getExpressionApi().internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, calculatedColumn.Expression);
|
|
190
|
+
const adaptableId = this.getAdaptableApi().optionsApi.getAdaptableId();
|
|
191
|
+
const perfKey = `calculatedColumn:${calculatedColumn.ColumnId}`;
|
|
192
|
+
const describePerf = () => ({
|
|
193
|
+
module: 'CalculatedColumn',
|
|
194
|
+
objectId: calculatedColumn.Uuid,
|
|
195
|
+
objectName: calculatedColumn.FriendlyName || calculatedColumn.ColumnId,
|
|
196
|
+
columnId: calculatedColumn.ColumnId,
|
|
197
|
+
expression: calculatedColumn.Expression,
|
|
198
|
+
});
|
|
189
199
|
const valueGetter = (params) => {
|
|
190
200
|
if (isExternalEvaluation) {
|
|
191
201
|
return params.data?.[calculatedColumn.ColumnId];
|
|
@@ -193,9 +203,21 @@ export class CalculatedColumnInternalApi extends ApiBase {
|
|
|
193
203
|
if (this.getGridApi().getAgGridRowModelType() !== 'clientSide' && isAggregated) {
|
|
194
204
|
return params.data?.[calculatedColumn.ColumnId];
|
|
195
205
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
.
|
|
206
|
+
const recorder = getPerfRecorder(adaptableId);
|
|
207
|
+
if (!recorder) {
|
|
208
|
+
return this.getAdaptableInternalApi()
|
|
209
|
+
.getCalculatedColumnExpressionService()
|
|
210
|
+
.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
211
|
+
}
|
|
212
|
+
const start = performance.now();
|
|
213
|
+
try {
|
|
214
|
+
return this.getAdaptableInternalApi()
|
|
215
|
+
.getCalculatedColumnExpressionService()
|
|
216
|
+
.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
217
|
+
}
|
|
218
|
+
finally {
|
|
219
|
+
recorder.add('calculatedColumn', perfKey, start, describePerf);
|
|
220
|
+
}
|
|
199
221
|
};
|
|
200
222
|
const newColDef = {
|
|
201
223
|
headerName: calculatedColumn.FriendlyName
|
|
@@ -8,6 +8,21 @@ import { DateFormatter } from '../../Utilities/Helpers/DisplayFormatHelper';
|
|
|
8
8
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
9
9
|
import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
|
|
10
10
|
import { SystemExportBegin, SystemExportEnd } from '../../Redux/ActionsReducers/InternalRedux';
|
|
11
|
+
const ADAPTABLE_EXPORT_PARAMS = [
|
|
12
|
+
'columnKeys',
|
|
13
|
+
'exportedRows',
|
|
14
|
+
'shouldRowBeSkipped',
|
|
15
|
+
'skipRowGroups',
|
|
16
|
+
'rowGroupExpandState',
|
|
17
|
+
'fileName',
|
|
18
|
+
'skipColumnHeaders',
|
|
19
|
+
'getCustomContentBelowRow',
|
|
20
|
+
'processCellCallback',
|
|
21
|
+
'processRowGroupCallback',
|
|
22
|
+
'sheetName',
|
|
23
|
+
'processNoteCallback',
|
|
24
|
+
'columnSeparator',
|
|
25
|
+
];
|
|
11
26
|
export class ExportInternalApi extends ApiBase {
|
|
12
27
|
getAllAvailableReportNames() {
|
|
13
28
|
return this.getExportApi()
|
|
@@ -341,7 +356,8 @@ export class ExportInternalApi extends ApiBase {
|
|
|
341
356
|
}
|
|
342
357
|
buildExcelConverter(reportName, reportFormat, exportDestination) {
|
|
343
358
|
return (reportData) => {
|
|
344
|
-
|
|
359
|
+
const excelParams = this.buildExcelExportParams(reportName, reportFormat, exportDestination);
|
|
360
|
+
return this.executeGridExport(reportData, reportName, reportFormat, exportDestination, (gridApi, exportParams) => gridApi.getDataAsExcel({ ...exportParams, ...excelParams }));
|
|
345
361
|
};
|
|
346
362
|
}
|
|
347
363
|
buildCsvConverter(reportName, reportFormat, exportDestination) {
|
|
@@ -366,6 +382,8 @@ export class ExportInternalApi extends ApiBase {
|
|
|
366
382
|
theme: this.getAgGridApi().getGridOption('theme'),
|
|
367
383
|
dataTypeDefinitions: this.getAgGridApi().getGridOption('dataTypeDefinitions'),
|
|
368
384
|
columnTypes: this.getAgGridApi().getGridOption('columnTypes'),
|
|
385
|
+
defaultExcelExportParams: this.getDefaultExportParams('defaultExcelExportParams'),
|
|
386
|
+
defaultCsvExportParams: this.getDefaultExportParams('defaultCsvExportParams'),
|
|
369
387
|
};
|
|
370
388
|
const gridParams = {
|
|
371
389
|
modules: this.getAdaptableApi()
|
|
@@ -395,11 +413,29 @@ export class ExportInternalApi extends ApiBase {
|
|
|
395
413
|
}
|
|
396
414
|
}
|
|
397
415
|
}
|
|
416
|
+
getDefaultExportParams(propertyName) {
|
|
417
|
+
const defaultExportParams = this.getAgGridApi().getGridOption(propertyName);
|
|
418
|
+
if (!defaultExportParams) {
|
|
419
|
+
return undefined;
|
|
420
|
+
}
|
|
421
|
+
const exportParams = { ...defaultExportParams };
|
|
422
|
+
ADAPTABLE_EXPORT_PARAMS.forEach((key) => delete exportParams[key]);
|
|
423
|
+
return exportParams;
|
|
424
|
+
}
|
|
425
|
+
buildExcelExportParams(reportName, reportFormat, exportDestination) {
|
|
426
|
+
const exportOptions = this.getAdaptableApi().optionsApi.getExportOptions();
|
|
427
|
+
const baseExportContext = this.buildBaseExportContext(reportName, reportFormat, exportDestination);
|
|
428
|
+
return {
|
|
429
|
+
sheetName: resolveValueOrFunction(exportOptions.excelSheetName, baseExportContext),
|
|
430
|
+
skipColumnHeaders: resolveValueOrFunction(exportOptions.skipColumnHeaders, baseExportContext),
|
|
431
|
+
};
|
|
432
|
+
}
|
|
398
433
|
buildCsvExportParams(reportName, reportFormat, exportDestination) {
|
|
399
434
|
const exportOptions = this.getAdaptableApi().optionsApi.getExportOptions();
|
|
400
|
-
const
|
|
435
|
+
const baseExportContext = this.buildBaseExportContext(reportName, reportFormat, exportDestination);
|
|
401
436
|
return {
|
|
402
|
-
columnSeparator: csvSeparator,
|
|
437
|
+
columnSeparator: resolveValueOrFunction(exportOptions.csvSeparator, baseExportContext),
|
|
438
|
+
skipColumnHeaders: resolveValueOrFunction(exportOptions.skipColumnHeaders, baseExportContext),
|
|
403
439
|
};
|
|
404
440
|
}
|
|
405
441
|
}
|
|
@@ -2,6 +2,7 @@ import { PivotLayoutCreationDefaultProperties, TableLayoutCreationDefaultPropert
|
|
|
2
2
|
import { Layout, LayoutBase } from '../../AdaptableState/LayoutState';
|
|
3
3
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
4
4
|
import { LayoutExtension, LayoutExtensionObject, LayoutExtensionModule } from '../../types';
|
|
5
|
+
export type RowSummariesSkippedReason = 'rowPinning' | 'pinnedGrandTotalRow';
|
|
5
6
|
export declare class LayoutInternalApi extends ApiBase {
|
|
6
7
|
/**
|
|
7
8
|
* Compares 2 Layouts for equality
|
|
@@ -41,8 +42,17 @@ export declare class LayoutInternalApi extends ApiBase {
|
|
|
41
42
|
isLayoutExtensionsUIEnabled(): boolean;
|
|
42
43
|
showLayoutNonExtendedObjects(): boolean;
|
|
43
44
|
isLayoutGrouped(layout?: Layout): boolean;
|
|
45
|
+
private lastRowSummariesSkippedWarning;
|
|
46
|
+
/**
|
|
47
|
+
* Row Summaries are rendered as AG Grid pinned row data, which AG Grid does not render
|
|
48
|
+
* when manual row pinning is enabled or the Grand Total Row is pinned.
|
|
49
|
+
* Returns why the Row Summaries of the Layout cannot be displayed, if they cannot.
|
|
50
|
+
*/
|
|
51
|
+
getRowSummariesSkippedReason(layout?: Layout): RowSummariesSkippedReason | undefined;
|
|
44
52
|
setupRowSummaries(): void;
|
|
45
|
-
refreshLayout(
|
|
53
|
+
refreshLayout(config?: {
|
|
54
|
+
columnsChanged?: boolean;
|
|
55
|
+
}): void;
|
|
46
56
|
getChangedColumnSorts(oldSorts: LayoutBase['ColumnSorts'], newSorts: LayoutBase['ColumnSorts']): string[];
|
|
47
57
|
buildInitialLayout(providedLayout: Partial<Layout> & {
|
|
48
58
|
Name: string;
|
|
@@ -79,12 +79,44 @@ export class LayoutInternalApi extends ApiBase {
|
|
|
79
79
|
}
|
|
80
80
|
return (layout?.RowGroupedColumns?.length || layout?.PivotGroupedColumns?.length) > 0;
|
|
81
81
|
}
|
|
82
|
+
lastRowSummariesSkippedWarning;
|
|
83
|
+
getRowSummariesSkippedReason(layout) {
|
|
84
|
+
if (!layout) {
|
|
85
|
+
layout = this.getLayoutApi().getCurrentLayout();
|
|
86
|
+
}
|
|
87
|
+
if (this._adaptable.agGridAdapter.getGridOption('enableRowPinning')) {
|
|
88
|
+
return 'rowPinning';
|
|
89
|
+
}
|
|
90
|
+
if (layout?.GrandTotalRow === 'pinnedTop' || layout?.GrandTotalRow === 'pinnedBottom') {
|
|
91
|
+
return 'pinnedGrandTotalRow';
|
|
92
|
+
}
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
82
95
|
setupRowSummaries() {
|
|
83
96
|
if (!this.getAdaptableApi().internalApi.getAgGridModulesAdapter().isAgGridModuleRegistered('PinnedRowModule')) {
|
|
84
97
|
this.getAdaptableApi().consoleError('Layout Row Summaries require the AG Grid "PinnedRowModule". Please register this module.');
|
|
85
98
|
return;
|
|
86
99
|
}
|
|
87
100
|
const rowSummaries = this.getAdaptableState().Internal?.RowSummary?.rowSummaries ?? [];
|
|
101
|
+
const agGridAdapter = this.getAdaptableInternalApi().getAgGridAdapter();
|
|
102
|
+
const skippedReason = this.getRowSummariesSkippedReason();
|
|
103
|
+
let warning;
|
|
104
|
+
if (skippedReason && rowSummaries.length) {
|
|
105
|
+
const layout = this.getLayoutApi().getCurrentLayout();
|
|
106
|
+
const cause = skippedReason === 'rowPinning'
|
|
107
|
+
? 'AG Grid Row Pinning (enableRowPinning) is enabled'
|
|
108
|
+
: `the Layout pins the Grand Total Row (GrandTotalRow: '${layout.GrandTotalRow}')`;
|
|
109
|
+
warning = `Row Summaries of Layout '${layout.Name}' are not displayed, because ${cause}.`;
|
|
110
|
+
if (warning !== this.lastRowSummariesSkippedWarning) {
|
|
111
|
+
this.getAdaptableApi().consoleWarn(warning);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
this.lastRowSummariesSkippedWarning = warning;
|
|
115
|
+
if (skippedReason) {
|
|
116
|
+
agGridAdapter.setGridOption('pinnedTopRowData', undefined);
|
|
117
|
+
agGridAdapter.setGridOption('pinnedBottomRowData', undefined);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
88
120
|
const { top, bottom } = rowSummaries.reduce((acc, summaryRow) => {
|
|
89
121
|
const row = summaryRow.RowData;
|
|
90
122
|
if (summaryRow.Position === 'Bottom' || !summaryRow.Position) {
|
|
@@ -95,12 +127,11 @@ export class LayoutInternalApi extends ApiBase {
|
|
|
95
127
|
}
|
|
96
128
|
return acc;
|
|
97
129
|
}, { top: [], bottom: [] });
|
|
98
|
-
const agGridAdapter = this.getAdaptableInternalApi().getAgGridAdapter();
|
|
99
130
|
agGridAdapter.setGridOption('pinnedTopRowData', top);
|
|
100
131
|
agGridAdapter.setGridOption('pinnedBottomRowData', bottom);
|
|
101
132
|
}
|
|
102
|
-
refreshLayout() {
|
|
103
|
-
this._adaptable.refreshLayout();
|
|
133
|
+
refreshLayout(config) {
|
|
134
|
+
this._adaptable.refreshLayout(config);
|
|
104
135
|
}
|
|
105
136
|
getChangedColumnSorts(oldSorts, newSorts) {
|
|
106
137
|
if (ArrayExtensions.IsNullOrEmpty(oldSorts) && ArrayExtensions.IsNullOrEmpty(newSorts)) {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
|
+
import { AdaptableNote } from '../../AdaptableState/NoteState';
|
|
3
|
+
import { AdaptableMessageType } from '../../AdaptableState/Common/AdaptableMessageType';
|
|
2
4
|
export declare class NoteInternalApi extends ApiBase {
|
|
3
5
|
areNotesSupported(): boolean;
|
|
4
6
|
getNotesDateFormat(): string;
|
|
@@ -9,4 +11,14 @@ export declare class NoteInternalApi extends ApiBase {
|
|
|
9
11
|
* Note State); this is true when the required AG Grid `NotesModule` is registered.
|
|
10
12
|
*/
|
|
11
13
|
isAgGridNotesActive(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Type of the Note, falling back to the configured default Note type (which itself defaults to 'Info'),
|
|
16
|
+
* so untyped notes are treated the same way `addNote` stamps new notes.
|
|
17
|
+
*/
|
|
18
|
+
getNoteType(note: AdaptableNote): AdaptableMessageType;
|
|
19
|
+
getDefaultNoteType(): AdaptableMessageType;
|
|
20
|
+
/**
|
|
21
|
+
* Whether any Note in State has a type other than the default Note type
|
|
22
|
+
*/
|
|
23
|
+
hasNonDefaultNoteTypes(): boolean;
|
|
12
24
|
}
|
|
@@ -13,4 +13,15 @@ export class NoteInternalApi extends ApiBase {
|
|
|
13
13
|
isAgGridNotesActive() {
|
|
14
14
|
return this.getAdaptableApi().internalApi.getAgGridModulesAdapter().isAgGridModuleRegistered('NotesModule');
|
|
15
15
|
}
|
|
16
|
+
getNoteType(note) {
|
|
17
|
+
return note.NoteType ?? this.getDefaultNoteType();
|
|
18
|
+
}
|
|
19
|
+
getDefaultNoteType() {
|
|
20
|
+
return this.getNoteOptions()?.defaultNoteType ?? 'Info';
|
|
21
|
+
}
|
|
22
|
+
hasNonDefaultNoteTypes() {
|
|
23
|
+
const notes = this.getAdaptableApi().noteApi.getAllNotes() ?? [];
|
|
24
|
+
const defaultNoteType = this.getDefaultNoteType();
|
|
25
|
+
return notes.some((note) => this.getNoteType(note) !== defaultNoteType);
|
|
26
|
+
}
|
|
16
27
|
}
|
package/src/EnvVars.d.ts
CHANGED
package/src/EnvVars.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import env from './env';
|
|
2
2
|
export const ADAPTABLE_VERSION = env.VERSION;
|
|
3
3
|
export const ADAPTABLE_PUBLISH_TIMESTAMP = env.PUBLISH_TIMESTAMP;
|
|
4
|
+
export const ADAPTABLE_PUBLISH_DATE = Number(ADAPTABLE_PUBLISH_TIMESTAMP);
|
|
4
5
|
export const INFINITE_TABLE_LICENSE_KEY = env.NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY;
|
|
@@ -44,7 +44,7 @@ import * as TeamSharingRedux from '../ActionsReducers/TeamSharingRedux';
|
|
|
44
44
|
import * as ThemeRedux from '../ActionsReducers/ThemeRedux';
|
|
45
45
|
import * as ToolPanelRedux from '../ActionsReducers/ToolPanelRedux';
|
|
46
46
|
import * as UserInterfaceRedux from '../ActionsReducers/UserInterfaceRedux';
|
|
47
|
-
import {
|
|
47
|
+
import { getMarker, shouldTimeOperations } from '../../devTools';
|
|
48
48
|
import { isAdaptableSharedEntity, isCustomSharedEntity, } from '../../AdaptableState/TeamSharingState';
|
|
49
49
|
const INIT_STATE = 'INIT_STATE';
|
|
50
50
|
const LOAD_STATE = 'LOAD_STATE';
|
|
@@ -284,11 +284,8 @@ function createDevToolsActionMarkerMiddleware(adaptable) {
|
|
|
284
284
|
if (!adaptableId) {
|
|
285
285
|
return null;
|
|
286
286
|
}
|
|
287
|
-
if (!areAdaptableProfileTracksEnabled(adaptableId)) {
|
|
288
|
-
return null;
|
|
289
|
-
}
|
|
290
287
|
return (middlewareAPI) => (next) => (action) => {
|
|
291
|
-
if (!isTrackableReduxAction(action)) {
|
|
288
|
+
if (!shouldTimeOperations(adaptableId) || !isTrackableReduxAction(action)) {
|
|
292
289
|
return next(action);
|
|
293
290
|
}
|
|
294
291
|
const previousState = middlewareAPI.getState();
|
|
@@ -623,7 +620,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
623
620
|
if (module) {
|
|
624
621
|
module.checkListenToCellDataChanged();
|
|
625
622
|
}
|
|
626
|
-
adaptable.api.layoutApi.internalApi.refreshLayout();
|
|
623
|
+
adaptable.api.layoutApi.internalApi.refreshLayout({ columnsChanged: true });
|
|
627
624
|
return returnAction;
|
|
628
625
|
}
|
|
629
626
|
case CalculatedColumnRedux.CALCULATED_COLUMN_ADD:
|
|
@@ -657,7 +654,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
657
654
|
if (module) {
|
|
658
655
|
module.checkListenToCellDataChanged();
|
|
659
656
|
}
|
|
660
|
-
adaptable.api.layoutApi.internalApi.refreshLayout();
|
|
657
|
+
adaptable.api.layoutApi.internalApi.refreshLayout({ columnsChanged: true });
|
|
661
658
|
adaptable.api.internalApi.getLiveRefreshService().syncFromState();
|
|
662
659
|
if (action.type === CalculatedColumnRedux.CALCULATED_COLUMN_EDIT) {
|
|
663
660
|
adaptable.api.calculatedColumnApi.internalApi.syncFormulaTraceWithCalculatedColumn(calculatedColumn);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getPerfRecorder } from '../devTools/PerfStore';
|
|
1
2
|
import * as FlashingCellRedux from '../Redux/ActionsReducers/FlashingCellRedux';
|
|
2
3
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
3
4
|
import { ArrayExtensions } from '../Utilities/Extensions/ArrayExtensions';
|
|
@@ -61,6 +62,7 @@ export class FlashingCellModule extends AdaptableModuleBase {
|
|
|
61
62
|
}
|
|
62
63
|
const relevantFlashingCellDefinitions = this.getFlashingCellDefinitionsForDataChange(activeFlashingCellDefinitions, cellDataChangedInfo);
|
|
63
64
|
if (ArrayExtensions.IsNotNullOrEmpty(relevantFlashingCellDefinitions)) {
|
|
65
|
+
getPerfRecorder(this.api.optionsApi.getAdaptableId())?.count('flashes');
|
|
64
66
|
this.showFlashingCellsForDefinitions(cellDataChangedInfo, relevantFlashingCellDefinitions);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
@@ -24,6 +24,7 @@ export declare class CalculatedColumnExpressionService implements ICalculatedCol
|
|
|
24
24
|
inferCalculatedColumnTypes(calculatedColumn: Pick<CalculatedColumn, 'Type' | 'Expression'>): InferredCalculatedColumnTypes;
|
|
25
25
|
getLiveRefreshTarget(calculatedColumn: CalculatedColumn): LiveRefreshTarget | undefined;
|
|
26
26
|
getObservableCalculatedColumnsAffectedByColumn(columnId: string): ObservableCalculatedColumnRefresh[];
|
|
27
|
+
getAggregatedCalculatedColumnsAffectedByColumn(columnId: string): string[];
|
|
27
28
|
isCalculatedColumnQueryValid(calculatedColumn: Pick<CalculatedColumn, 'Type' | 'Expression'>, calculatedColumnId?: string): boolean;
|
|
28
29
|
evaluateCalculatedColumnQuery(calculatedColumn: CalculatedColumn, rowNode: IRowNode): any;
|
|
29
30
|
bindAggregatedCalculatedColumn(calculatedColumn: CalculatedColumn): void;
|
|
@@ -120,6 +120,21 @@ export class CalculatedColumnExpressionService {
|
|
|
120
120
|
}
|
|
121
121
|
return affected;
|
|
122
122
|
}
|
|
123
|
+
getAggregatedCalculatedColumnsAffectedByColumn(columnId) {
|
|
124
|
+
const queryLanguageService = this.adaptableApi.internalApi.getQueryLanguageService();
|
|
125
|
+
const affected = [];
|
|
126
|
+
for (const calculatedColumn of this.adaptableApi.calculatedColumnApi.getCalculatedColumns()) {
|
|
127
|
+
const query = this.resolveCalculatedColumnQuery(calculatedColumn);
|
|
128
|
+
if (!query.text || query.kind !== 'aggregated') {
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const dependencies = queryLanguageService.getExpressionDependencies(query.text, CalculatedColumnModuleId);
|
|
132
|
+
if (dependencies?.anyColumn || dependencies?.columns.includes(columnId)) {
|
|
133
|
+
affected.push(calculatedColumn.ColumnId);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return affected;
|
|
137
|
+
}
|
|
123
138
|
isCalculatedColumnQueryValid(calculatedColumn, calculatedColumnId) {
|
|
124
139
|
const query = this.resolveCalculatedColumnQuery(calculatedColumn);
|
|
125
140
|
if (!query.text) {
|
|
@@ -46,6 +46,13 @@ export interface ICalculatedColumnExpressionService extends IAdaptableService {
|
|
|
46
46
|
* contains the change — separate from derived `CellDataChanged` events.
|
|
47
47
|
*/
|
|
48
48
|
getObservableCalculatedColumnsAffectedByColumn(columnId: string): ObservableCalculatedColumnRefresh[];
|
|
49
|
+
/**
|
|
50
|
+
* Aggregated Calculated Columns that read `columnId` (or `ANY_COL()`).
|
|
51
|
+
* Used after a cell change to force-refresh the edited row: the aggregation
|
|
52
|
+
* store only notifies when the scalar or group values move, so a per-row
|
|
53
|
+
* (window) result changing on the edited row would otherwise stay stale.
|
|
54
|
+
*/
|
|
55
|
+
getAggregatedCalculatedColumnsAffectedByColumn(columnId: string): string[];
|
|
49
56
|
bindAggregatedCalculatedColumn(calculatedColumn: CalculatedColumn): void;
|
|
50
57
|
unbindAggregatedCalculatedColumn(calculatedColumn: CalculatedColumn): void;
|
|
51
58
|
buildSyntheticCellDataChangedInfosForCalcColumns(cellDataChangedInfo: CellDataChangedInfo): CellDataChangedInfo[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAdaptableService } from './IAdaptableService';
|
|
2
2
|
import { Column } from 'ag-grid-enterprise';
|
|
3
3
|
import type { AggregationCallableName, AggregationCatalogue, AqlHost, CompiledValueExpression, QueryLanguageValidationResult, ScalarFunctionName, ValueExecutionResult } from "../../../../vendor/aql/index.js";
|
|
4
|
-
import type { Clock, ComputedValueStore, HistoryStore } from "../../../../vendor/aql/store/index.js";
|
|
4
|
+
import type { Clock, ComputedValueStore, HistoryStats, HistoryStore } from "../../../../vendor/aql/store/index.js";
|
|
5
5
|
import type { ExpressionKind, ResolvedExpression } from '../../../AdaptableState/Common/AdaptableQuery';
|
|
6
6
|
import { CellDataChangedInfo } from '../../../AdaptableState/Common/CellDataChangedInfo';
|
|
7
7
|
import { AdaptableModule } from '../../../AdaptableState/Common/Types';
|
|
@@ -28,6 +28,20 @@ export type QueryLanguageAggregatedComputeContext = {
|
|
|
28
28
|
host?: AqlHost;
|
|
29
29
|
getColumnValue?: (rowRef: unknown, columnId: string) => unknown;
|
|
30
30
|
};
|
|
31
|
+
export type QueryLanguageServiceDiagnostics = {
|
|
32
|
+
validationCache: number;
|
|
33
|
+
expressionKindCache: number;
|
|
34
|
+
dependenciesCache: number;
|
|
35
|
+
engineCache: number;
|
|
36
|
+
rowEvaluatorCache: number;
|
|
37
|
+
rowEvaluatorCacheLimit: number;
|
|
38
|
+
/** Prepared evaluators dropped because the cache was full (each is prepared again when next used) */
|
|
39
|
+
rowEvaluatorEvictions: number;
|
|
40
|
+
canonicalTextCache: number;
|
|
41
|
+
canonicalTextCacheLimit: number;
|
|
42
|
+
/** `undefined` while no observable expression created the history store */
|
|
43
|
+
history?: HistoryStats;
|
|
44
|
+
};
|
|
31
45
|
export interface IQueryLanguageService extends IAdaptableService {
|
|
32
46
|
/**
|
|
33
47
|
* Infers the evaluation kind of an expression from its text:
|
|
@@ -119,6 +133,8 @@ export interface IQueryLanguageService extends IAdaptableService {
|
|
|
119
133
|
* `expressionOptions.maxTimeframeSize` / `maxHistoryPerCell`.
|
|
120
134
|
*/
|
|
121
135
|
getHistoryStore(): HistoryStore;
|
|
136
|
+
/** Cache sizes and history-store counters (AdapTable DevTools memory inventory) */
|
|
137
|
+
getDiagnostics(): QueryLanguageServiceDiagnostics;
|
|
122
138
|
/**
|
|
123
139
|
* What an expression's value depends on: aggregations, the row, per-cell
|
|
124
140
|
* history (`observable`), window expiry (`windowed`) or the clock (`time`).
|
|
@@ -3,7 +3,7 @@ import { type Clock, type ComputedValueStore, type HistoryStore } from "../../..
|
|
|
3
3
|
import { AdaptableApi, AggregatedExpressionEvaluationValue } from '../../../types';
|
|
4
4
|
import { type ExpressionKind, type ResolvedExpression } from '../../AdaptableState/Common/AdaptableQuery';
|
|
5
5
|
import { AdaptableModule } from '../../AdaptableState/Common/Types';
|
|
6
|
-
import { IQueryLanguageService, ModuleExpressionFunctionsMap, QueryLanguageAggregatedComputeContext, QueryLanguageRowEvalContext } from './Interface/IQueryLanguageService';
|
|
6
|
+
import { IQueryLanguageService, ModuleExpressionFunctionsMap, QueryLanguageAggregatedComputeContext, QueryLanguageRowEvalContext, QueryLanguageServiceDiagnostics } from './Interface/IQueryLanguageService';
|
|
7
7
|
export declare class QueryLanguageService implements IQueryLanguageService {
|
|
8
8
|
private adaptableApi;
|
|
9
9
|
private validationCache;
|
|
@@ -13,6 +13,8 @@ export declare class QueryLanguageService implements IQueryLanguageService {
|
|
|
13
13
|
private engineCache;
|
|
14
14
|
private hostEngineCache;
|
|
15
15
|
private rowEvaluatorCache;
|
|
16
|
+
/** For DevTools: how often the cache above was full (see `getDiagnostics`) */
|
|
17
|
+
private rowEvaluatorEvictions;
|
|
16
18
|
private hostRowEvaluatorCache;
|
|
17
19
|
private canonicalTextCache;
|
|
18
20
|
private functionsGeneration;
|
|
@@ -27,6 +29,11 @@ export declare class QueryLanguageService implements IQueryLanguageService {
|
|
|
27
29
|
private hostEventUnsubscribers;
|
|
28
30
|
constructor(adaptableApi: AdaptableApi);
|
|
29
31
|
destroy(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Cache sizes and history-store counters for AdapTable DevTools (memory inventory).
|
|
34
|
+
* Does not create the history store when nothing uses it yet.
|
|
35
|
+
*/
|
|
36
|
+
getDiagnostics(): QueryLanguageServiceDiagnostics;
|
|
30
37
|
/**
|
|
31
38
|
* Cache/store key text: greenfield pretty-print (stored text is already
|
|
32
39
|
* migrated). Memoized — canonicalization is a raw parse + normalize +
|
|
@@ -127,6 +134,9 @@ export declare class QueryLanguageService implements IQueryLanguageService {
|
|
|
127
134
|
private getHostRowEvaluatorCache;
|
|
128
135
|
private getFirstRowRef;
|
|
129
136
|
evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: any, evalContext?: QueryLanguageRowEvalContext): any;
|
|
137
|
+
private perfAdaptableId?;
|
|
138
|
+
/** Read once: the hot path must not call the options API on every evaluation */
|
|
139
|
+
private getAdaptableIdForPerf;
|
|
130
140
|
evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: unknown, evalContext?: QueryLanguageRowEvalContext): any;
|
|
131
141
|
prepareBooleanRowEvaluator(expression: string, module: AdaptableModule): (rowNode: unknown) => any;
|
|
132
142
|
executeValueExpression(expression: string, module: AdaptableModule, evalContext?: QueryLanguageRowEvalContext): ValueExecutionResult;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getPerfRecorder } from '../../devTools/PerfStore';
|
|
2
|
+
import { recordExpressionEvaluation } from '../../devTools/perfInstrumentation';
|
|
1
3
|
import { acquireObservableSlots, canonicalizeExpression, createAggregationCatalogue, createAqlEngine, DEFAULT_ROW_SET_KIND, ExpressionEvaluationError, findDependencyCycle, getNodesFromExpression, hostGetFirstRowRef, mapDataTypeToStaticType, parse, validateAqlExpression, validateExpressionTypes, } from "../../../vendor/aql/index.js";
|
|
2
4
|
import { createComputedValueStore, createHistoryStore, createSystemClock, } from "../../../vendor/aql/store/index.js";
|
|
3
5
|
import { inferExpressionKindFromText, } from '../../AdaptableState/Common/AdaptableQuery';
|
|
@@ -54,6 +56,7 @@ export class QueryLanguageService {
|
|
|
54
56
|
engineCache = new Map();
|
|
55
57
|
hostEngineCache = new WeakMap();
|
|
56
58
|
rowEvaluatorCache = new Map();
|
|
59
|
+
rowEvaluatorEvictions = 0;
|
|
57
60
|
hostRowEvaluatorCache = new WeakMap();
|
|
58
61
|
canonicalTextCache = new Map();
|
|
59
62
|
functionsGeneration = 0;
|
|
@@ -90,6 +93,20 @@ export class QueryLanguageService {
|
|
|
90
93
|
this.aggregationCatalogueCache.clear();
|
|
91
94
|
this.engineCache.clear();
|
|
92
95
|
}
|
|
96
|
+
getDiagnostics() {
|
|
97
|
+
return {
|
|
98
|
+
validationCache: this.validationCache.size,
|
|
99
|
+
expressionKindCache: this.expressionKindCache.size,
|
|
100
|
+
dependenciesCache: this.dependenciesCache.size,
|
|
101
|
+
engineCache: this.engineCache.size,
|
|
102
|
+
rowEvaluatorCache: this.rowEvaluatorCache.size,
|
|
103
|
+
rowEvaluatorCacheLimit: ROW_EVALUATOR_CACHE_SIZE,
|
|
104
|
+
rowEvaluatorEvictions: this.rowEvaluatorEvictions,
|
|
105
|
+
canonicalTextCache: this.canonicalTextCache.size,
|
|
106
|
+
canonicalTextCacheLimit: CANONICAL_TEXT_CACHE_SIZE,
|
|
107
|
+
history: this._historyStore ? this._historyStore.stats() : undefined,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
93
110
|
toCacheExpression(expression) {
|
|
94
111
|
const cached = this.canonicalTextCache.get(expression);
|
|
95
112
|
if (cached !== undefined) {
|
|
@@ -352,6 +369,7 @@ export class QueryLanguageService {
|
|
|
352
369
|
const oldestKey = cache.keys().next().value;
|
|
353
370
|
if (oldestKey !== undefined) {
|
|
354
371
|
cache.delete(oldestKey);
|
|
372
|
+
this.rowEvaluatorEvictions++;
|
|
355
373
|
this.releaseObservableSeries(oldestKey);
|
|
356
374
|
}
|
|
357
375
|
}
|
|
@@ -417,19 +435,46 @@ export class QueryLanguageService {
|
|
|
417
435
|
this.adaptableApi.logError('QueryLanguageService.evaluateBooleanExpression was called with an undefined expression');
|
|
418
436
|
return false;
|
|
419
437
|
}
|
|
420
|
-
|
|
438
|
+
const recorder = getPerfRecorder(this.getAdaptableIdForPerf());
|
|
439
|
+
const start = recorder ? performance.now() : 0;
|
|
440
|
+
const result = this.getPreparedRowEvaluator(expression, module, evalContext?.host)(rowNode, this.toPerRowConfig({
|
|
421
441
|
rowNode,
|
|
422
442
|
dataChangedEvent: evalContext?.dataChangedEvent,
|
|
423
443
|
pivotResultColumn: evalContext?.pivotResultColumn,
|
|
424
444
|
columnScope: evalContext?.columnScope,
|
|
425
445
|
cellValueOverride: evalContext?.cellValueOverride,
|
|
426
446
|
}));
|
|
447
|
+
if (recorder) {
|
|
448
|
+
recordExpressionEvaluation(recorder, this.adaptableApi, module, expression, start);
|
|
449
|
+
}
|
|
450
|
+
return result;
|
|
451
|
+
}
|
|
452
|
+
perfAdaptableId;
|
|
453
|
+
getAdaptableIdForPerf() {
|
|
454
|
+
if (this.perfAdaptableId === undefined) {
|
|
455
|
+
try {
|
|
456
|
+
this.perfAdaptableId = this.adaptableApi.optionsApi.getAdaptableId();
|
|
457
|
+
}
|
|
458
|
+
catch {
|
|
459
|
+
return undefined;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
return this.perfAdaptableId;
|
|
427
463
|
}
|
|
428
464
|
evaluateScalarExpression(expression, module, rowNode, evalContext) {
|
|
429
465
|
return this.evaluateBooleanExpression(expression, module, rowNode, evalContext);
|
|
430
466
|
}
|
|
431
467
|
prepareBooleanRowEvaluator(expression, module) {
|
|
432
468
|
const evaluator = this.getPreparedRowEvaluator(expression, module);
|
|
469
|
+
const recorder = getPerfRecorder(this.getAdaptableIdForPerf());
|
|
470
|
+
if (recorder) {
|
|
471
|
+
return (rowNode) => {
|
|
472
|
+
const start = performance.now();
|
|
473
|
+
const result = evaluator(rowNode);
|
|
474
|
+
recordExpressionEvaluation(recorder, this.adaptableApi, module, expression, start);
|
|
475
|
+
return result;
|
|
476
|
+
};
|
|
477
|
+
}
|
|
433
478
|
return (rowNode) => evaluator(rowNode);
|
|
434
479
|
}
|
|
435
480
|
executeValueExpression(expression, module, evalContext) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AdaptableApi, TableLayout } from '../../types';
|
|
2
|
+
import type { RowSummariesSkippedReason } from '../../Api/Internal/LayoutInternalApi';
|
|
2
3
|
/**
|
|
3
4
|
* Row Summary cells are computed-value store nodes with an explicit
|
|
4
5
|
* rowSetSpec (`visible` when IncludeOnlyFilteredRows, else `all`).
|
|
@@ -9,6 +10,7 @@ export declare class RowSummaryService {
|
|
|
9
10
|
private nodeHandles;
|
|
10
11
|
private isEvaluating;
|
|
11
12
|
previousRowSummaries: any;
|
|
13
|
+
previousSkippedReason: RowSummariesSkippedReason | undefined;
|
|
12
14
|
previousLayout: TableLayout | null;
|
|
13
15
|
constructor(api: AdaptableApi);
|
|
14
16
|
onAdaptableReady(): void;
|