@adaptabletools/adaptable 24.0.3 → 24.0.4
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 +7 -0
- package/src/Api/AdaptableApi.d.ts +12 -0
- package/src/Api/GridApi.d.ts +13 -3
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -8
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Internal/AlertInternalApi.d.ts +7 -0
- package/src/Api/Internal/AlertInternalApi.js +42 -9
- package/src/Strategy/FlashingCellModule.js +2 -1
- package/src/Utilities/Helpers/CellValueHelper.d.ts +20 -0
- package/src/Utilities/Helpers/CellValueHelper.js +35 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +25 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +160 -42
- package/src/Utilities/Services/DataService.js +10 -6
- package/src/Utilities/Services/FlashingCellService.d.ts +12 -0
- package/src/Utilities/Services/FlashingCellService.js +40 -3
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +5 -0
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +5 -0
- package/src/Utilities/Services/QueryLanguageService.d.ts +6 -0
- package/src/Utilities/Services/QueryLanguageService.js +29 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +80 -14
- package/src/agGrid/AdaptableAgGrid.js +468 -125
- package/src/agGrid/AgGridAdapter.d.ts +10 -1
- package/src/agGrid/AgGridAdapter.js +16 -0
- package/src/env.js +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgEvent, ColDef, ColGroupDef, Column, GridApi, GridOptions, IRowNode, ManagedGridOptionKey, ManagedGridOptions, Module } from 'ag-grid-enterprise';
|
|
1
|
+
import { AgEvent, CellValueChangedEvent, ColDef, ColGroupDef, Column, GridApi, GridOptions, IRowNode, ManagedGridOptionKey, ManagedGridOptions, Module } from 'ag-grid-enterprise';
|
|
2
2
|
import type { AgChartInstance, AgSparklineOptions } from 'ag-charts-types';
|
|
3
3
|
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
4
4
|
import { AdaptableColumn, AdaptableColumnGroup } from '../AdaptableState/Common/AdaptableColumn';
|
|
@@ -29,6 +29,10 @@ import { SelectedRowInfo } from '../AdaptableState/Selection/SelectedRowInfo';
|
|
|
29
29
|
*
|
|
30
30
|
* Row-node local events only fire on rendered rows. Off-screen updates are
|
|
31
31
|
* covered by grid `cellValueChanged` plus the `updateRows` old-data diff.
|
|
32
|
+
*
|
|
33
|
+
* The grid's own `cellValueChanged` goes through the same prototype, so it is passed on too
|
|
34
|
+
* (see AgGridAdapter.handleCellValueChangedDispatch): listeners added with `GridApi.addEventListener`
|
|
35
|
+
* receive it only in a later task.
|
|
32
36
|
*/
|
|
33
37
|
export type RowNodeEventType = 'dataChanged' | 'cellChanged';
|
|
34
38
|
export interface RowNodeEvent extends AgEvent<RowNodeEventType> {
|
|
@@ -61,6 +65,11 @@ export declare class AgGridAdapter {
|
|
|
61
65
|
* Called (for the grid managed by this adapter) whenever AG Grid dispatches a RowNode `cellChanged` / `dataChanged` event
|
|
62
66
|
*/
|
|
63
67
|
handleRowNodeEvent(event: RowNodeEvent): void;
|
|
68
|
+
/**
|
|
69
|
+
* see #local_event_service_monkey_patch
|
|
70
|
+
* Called synchronously whenever the grid managed by this adapter dispatches `cellValueChanged`
|
|
71
|
+
*/
|
|
72
|
+
handleCellValueChangedDispatch(event: CellValueChangedEvent): void;
|
|
64
73
|
setAgGridApi(gridApi: GridApi): void;
|
|
65
74
|
getAgGridApi(skipLogging?: boolean): GridApi | undefined;
|
|
66
75
|
monkeyPatchingGridOptionsUpdates(): void;
|
|
@@ -14,6 +14,10 @@ import { ONLY_AGG_FN_NAME, WEIGHTED_AVERAGE_AGG_FN_NAME, } from '../AdaptableSta
|
|
|
14
14
|
const DANGER_AG_GRID_BEANS_MAP = {};
|
|
15
15
|
const DANGER_AG_GRID_ADAPTERS_MAP = {};
|
|
16
16
|
const getColumnApiModule = () => ColumnApiModule;
|
|
17
|
+
const getAdapterForRowNode = (rowNode) => {
|
|
18
|
+
const gridId = rowNode?.beans?.context?.getId();
|
|
19
|
+
return gridId ? DANGER_AG_GRID_ADAPTERS_MAP[gridId] : undefined;
|
|
20
|
+
};
|
|
17
21
|
const PATCHED_LOCAL_EVENT_SERVICE_PROTOTYPES = new WeakSet();
|
|
18
22
|
const patchLocalEventServiceDispatchEvent = (beans) => {
|
|
19
23
|
const localEventServiceInstance = beans?.eventSvc?.globalSvc;
|
|
@@ -52,6 +56,15 @@ const patchLocalEventServiceDispatchEvent = (beans) => {
|
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
}
|
|
59
|
+
else if (event.type === 'cellValueChanged') {
|
|
60
|
+
const cellValueChangedEvent = event;
|
|
61
|
+
try {
|
|
62
|
+
getAdapterForRowNode(cellValueChangedEvent.node)?.handleCellValueChangedDispatch(cellValueChangedEvent);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
AdaptableLogger.consoleErrorBase('Adaptable cellValueChanged handler threw; AG Grid will still receive the event', error);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
55
68
|
LocalEventService_dispatchEvent.apply(this, arguments);
|
|
56
69
|
};
|
|
57
70
|
};
|
|
@@ -137,6 +150,9 @@ export class AgGridAdapter {
|
|
|
137
150
|
handleRowNodeEvent(event) {
|
|
138
151
|
this._adaptableInstance?.onAgGridRowNodeEvent(event);
|
|
139
152
|
}
|
|
153
|
+
handleCellValueChangedDispatch(event) {
|
|
154
|
+
this._adaptableInstance?.onAgGridCellValueChangedDispatch(event);
|
|
155
|
+
}
|
|
140
156
|
setAgGridApi(gridApi) {
|
|
141
157
|
this.DANGER_USE_GETTER_gridApi = gridApi;
|
|
142
158
|
}
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "24.0.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1795455639991 || Date.now(),
|
|
4
|
+
VERSION: "24.0.4" || '--current-version--',
|
|
5
5
|
};
|