@adaptabletools/adaptable 24.0.3 → 24.0.5
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/Helpers/Layouts/LayoutHelper.d.ts +5 -0
- package/src/Utilities/Helpers/Layouts/LayoutHelper.js +33 -3
- 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 +81 -14
- package/src/agGrid/AdaptableAgGrid.js +523 -163
- package/src/agGrid/AgGridAdapter.d.ts +10 -1
- package/src/agGrid/AgGridAdapter.js +16 -0
- package/src/agGrid/AgGridOptionsService.js +5 -0
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.d.ts +51 -10
- package/src/layout-manager/src/index.js +334 -91
- package/src/layout-manager/src/isLayoutEqual.js +4 -0
- package/src/layout-manager/src/rowGroupExpansionMatcher.d.ts +116 -0
- package/src/layout-manager/src/rowGroupExpansionMatcher.js +240 -0
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/vendor/components/Resizable/index.d.ts.map +1 -1
- package/vendor/components/Resizable/index.js +22 -10
- package/vendor/components/Resizable/index.js.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
|
|
2
|
-
import { ChartRef, Column, GridApi, GridOptions, IRowNode, Module, RowModelType, StatusPanelDef } from 'ag-grid-enterprise';
|
|
2
|
+
import { CellValueChangedEvent, ChartRef, Column, GridApi, GridOptions, IRowNode, Module, RowModelType, StatusPanelDef } from 'ag-grid-enterprise';
|
|
3
3
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
4
4
|
import { AdaptableApi, DestroyConfig } from '../Api/AdaptableApi';
|
|
5
5
|
import { AdaptableVariant, GridRefreshScope, IAdaptable, NormalizeAdaptableStateOptions } from '../AdaptableInterfaces/IAdaptable';
|
|
@@ -97,11 +97,39 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
97
97
|
private ChartingService;
|
|
98
98
|
private isListeningToAgGridRowNodeEvents;
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
101
|
-
* `dataChanged` via the monkey-patch;
|
|
102
|
-
*
|
|
100
|
+
* Row node -> the data object last reported for it, for the rows of Adaptable API transactions.
|
|
101
|
+
* Rendered rows report `dataChanged` via the monkey-patch; rows that are not rendered do not, and
|
|
102
|
+
* are diffed against the stored object after the transaction (see `reportTrackedRowUpdates`).
|
|
103
|
+
* Cleared when no transaction is in progress or pending.
|
|
103
104
|
*/
|
|
104
|
-
private
|
|
105
|
+
private trackedRowData;
|
|
106
|
+
/** rows of async Adaptable API transactions whose callback has not run yet, with a count per row */
|
|
107
|
+
private pendingAsyncRowNodes;
|
|
108
|
+
private pendingAsyncTransactions;
|
|
109
|
+
private syncTransactionDepth;
|
|
110
|
+
/** a rendered row of an async flush asked for a re-filter; done once, in the callback */
|
|
111
|
+
private refilterAfterAsyncFlush;
|
|
112
|
+
/**
|
|
113
|
+
* Cell changes already reported, per row node and column id, with how many times: the async
|
|
114
|
+
* `cellValueChanged` AG Grid fires for the same edits skips them (see `onAgGridCellValueChanged`).
|
|
115
|
+
*/
|
|
116
|
+
private reportedCellChanges;
|
|
117
|
+
private isReportedCellChangesClearScheduled;
|
|
118
|
+
/**
|
|
119
|
+
* While `updateCell` runs: the `cellValueChanged` events AG Grid dispatched, and the cells a
|
|
120
|
+
* row-node `cellChanged` event reported
|
|
121
|
+
*/
|
|
122
|
+
private updateCellCapture;
|
|
123
|
+
private postEditBatch;
|
|
124
|
+
/** refreshes of pinned copies that wait for AG Grid to give the copy the new row data */
|
|
125
|
+
private pendingPinnedCopyRefreshes;
|
|
126
|
+
private dataBackedColumnsCache;
|
|
127
|
+
/** `getRowId` was installed by AdapTable, so a row id is the primary key value */
|
|
128
|
+
private isRowIdPrimaryKey;
|
|
129
|
+
private primaryKeyLookup;
|
|
130
|
+
private hasLoggedPrimaryKeyLookupFallback;
|
|
131
|
+
private hasWarnedSameObjectUpdate;
|
|
132
|
+
private rowGroupExpansionMatcherRef;
|
|
105
133
|
private debouncedSetSelectedRows;
|
|
106
134
|
private debouncedSetSelectedCells;
|
|
107
135
|
private agGridListenerKeydown;
|
|
@@ -233,14 +261,22 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
233
261
|
*/
|
|
234
262
|
onAgGridRowNodeEvent(event: RowNodeEvent): void;
|
|
235
263
|
/**
|
|
236
|
-
*
|
|
237
|
-
* `ValueService.setValue` for every row; the row-node event only exists
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
264
|
+
* Complement to row-node `cellChanged`. AG Grid fires this, after the edit, from
|
|
265
|
+
* `ValueService.setValue` for every row; the row-node event only exists when the node had a
|
|
266
|
+
* `LocalEventService` (a rendered row) at the time of the edit. The changes already reported
|
|
267
|
+
* (from a row-node event, or by `updateCell`) are skipped, so each edit is reported once even if
|
|
268
|
+
* the row has been rendered or removed from the DOM since.
|
|
241
269
|
*/
|
|
242
270
|
private onAgGridCellValueChanged;
|
|
243
|
-
|
|
271
|
+
/**
|
|
272
|
+
* see #local_event_service_monkey_patch (AgGridAdapter.ts)
|
|
273
|
+
*
|
|
274
|
+
* AG Grid's `cellValueChanged`, received while AG Grid dispatches it. Only recorded while
|
|
275
|
+
* `updateCell` runs, which reports the edits once `setDataValue` has returned.
|
|
276
|
+
*/
|
|
277
|
+
onAgGridCellValueChangedDispatch(event: CellValueChangedEvent): void;
|
|
278
|
+
private noteCellChangeReported;
|
|
279
|
+
private takeCellChangeReported;
|
|
244
280
|
private shouldAutoSizeLayout;
|
|
245
281
|
private autoSizeLayoutIfNeeded;
|
|
246
282
|
forPlugins(callback: (plugin: AdaptablePlugin) => any): void;
|
|
@@ -367,10 +403,14 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
367
403
|
*
|
|
368
404
|
* CSRM `applyTransaction({ update })` does not emit per-cell `cellValueChanged`.
|
|
369
405
|
* Rendered rows still fire row-node `dataChanged`; off-screen rows do not.
|
|
406
|
+
* Stores the data each updated row has before the transaction, unless a pending transaction
|
|
407
|
+
* already did; returns the rows found.
|
|
370
408
|
*/
|
|
371
|
-
private
|
|
372
|
-
|
|
373
|
-
private
|
|
409
|
+
private trackRowUpdates;
|
|
410
|
+
/** Reports each updated row whose data is not the data last reported for it */
|
|
411
|
+
private reportTrackedRowUpdates;
|
|
412
|
+
private releaseTrackedRows;
|
|
413
|
+
private warnSameObjectUpdate;
|
|
374
414
|
updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
375
415
|
addRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
376
416
|
addOrUpdateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<{
|
|
@@ -384,6 +424,15 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
384
424
|
}>;
|
|
385
425
|
deleteRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
386
426
|
getRowNodeForPrimaryKey(primaryKeyValue: any): any;
|
|
427
|
+
private readPrimaryKeyValue;
|
|
428
|
+
/**
|
|
429
|
+
* For rows whose id is not their primary key value (an application `getRowId`, tree data,
|
|
430
|
+
* the server-side row model): a map from primary key value to row node, built on a miss and
|
|
431
|
+
* rebuilt at most once per synchronous turn.
|
|
432
|
+
*/
|
|
433
|
+
private getRowNodeFromPrimaryKeyLookup;
|
|
434
|
+
/** The lookup is not rebuilt in the turn that built it, so the rows a transaction adds go in too */
|
|
435
|
+
private addToPrimaryKeyLookup;
|
|
387
436
|
hideColumn(columnId: string): void;
|
|
388
437
|
showColumn(columnId: string): void;
|
|
389
438
|
autoSizeColumn(columnId: string): void;
|
|
@@ -473,6 +522,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
473
522
|
getChartRef(chartId: string): ChartRef;
|
|
474
523
|
updateLayoutInManagerAfterStoreHasChanged(layout?: Layout): void;
|
|
475
524
|
private getActiveAdaptableAggFuncForCol;
|
|
525
|
+
private getDataBackedColumns;
|
|
476
526
|
private onRowDataChanged;
|
|
477
527
|
private onCellDataChanged;
|
|
478
528
|
private isUndoChange;
|
|
@@ -481,6 +531,19 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
481
531
|
*/
|
|
482
532
|
private performPostEditChecks;
|
|
483
533
|
private performPostEditChecksNow;
|
|
534
|
+
/**
|
|
535
|
+
* Runs `fn` with a post-edit batch open: the changes reported while it runs are re-filtered,
|
|
536
|
+
* refreshed column-wide and checked against the selection once, when `fn` returns, instead of
|
|
537
|
+
* once per row or cell. A nested call joins the open batch.
|
|
538
|
+
*/
|
|
539
|
+
runPostEditBatch<T>(fn: () => T): T;
|
|
540
|
+
private flushPostEditBatch;
|
|
541
|
+
private recordChangedCellForSelection;
|
|
542
|
+
/**
|
|
543
|
+
* Whether the row is rendered. Inside a post-edit batch the rendered rows are read once per
|
|
544
|
+
* batch. A pinned row is always rendered.
|
|
545
|
+
*/
|
|
546
|
+
isRowNodeRendered(rowNode: IRowNode): boolean;
|
|
484
547
|
/**
|
|
485
548
|
* Collect format / freetext / styled / observable / relative-styled columns
|
|
486
549
|
* into one scope. Edited-row-only ids stay in `columnIds`; `ALL_ROWS()`
|
|
@@ -492,6 +555,10 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
492
555
|
* AdapTable flashing is driven by `CellDataChanged`, not AG Grid cell flash.
|
|
493
556
|
*/
|
|
494
557
|
private applyPostEditRefresh;
|
|
558
|
+
private applyPendingPinnedCopyRefresh;
|
|
559
|
+
private refreshRenderedRows;
|
|
560
|
+
/** The row and its pinned copy, those of them that are rendered */
|
|
561
|
+
private getRenderedCopiesOfRow;
|
|
495
562
|
private checkStyledColumnComparisonChanges;
|
|
496
563
|
private checkFormatColumnPredicateStyleChanges;
|
|
497
564
|
private checkFreeTextColumnChanges;
|