@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
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import type { DevToolsHeapSample, DevToolsHotPathKind, DevToolsMemoryInventorySample, DevToolsMemoryItem, DevToolsMemoryRecordingPoint, DevToolsHotPathStat, DevToolsPerfCursor, DevToolsPerfData, DevToolsPerfDetail, DevToolsPerfLabelStats, DevToolsPerfMeasure, DevToolsTickingStats } from '../../devtools';
|
|
2
|
+
export declare class RingBuffer<T extends {
|
|
3
|
+
seq: number;
|
|
4
|
+
}> {
|
|
5
|
+
private readonly max;
|
|
6
|
+
private items;
|
|
7
|
+
private lastSeq;
|
|
8
|
+
constructor(max: number);
|
|
9
|
+
push(item: Omit<T, 'seq'>): T;
|
|
10
|
+
/** Entries with `seq` greater than `cursor` (all entries for `0`) */
|
|
11
|
+
since(cursor?: number): T[];
|
|
12
|
+
/** Keeps only the entries `keep` returns true for; `seq` keeps increasing */
|
|
13
|
+
retain(keep: (item: T) => boolean): void;
|
|
14
|
+
all(): readonly T[];
|
|
15
|
+
get seq(): number;
|
|
16
|
+
get size(): number;
|
|
17
|
+
/** Empties the buffer; `seq` keeps increasing so cursors held by readers stay valid */
|
|
18
|
+
clear(): void;
|
|
19
|
+
}
|
|
20
|
+
type TickingCounterName = 'cellChanges' | 'rowTransactions' | 'flashes' | 'alertsFired' | 'refiltersFromDataChange';
|
|
21
|
+
/** Data change counters, plus per-second buckets for the recent rates. */
|
|
22
|
+
declare class TickingCounters {
|
|
23
|
+
totals: Record<TickingCounterName, number>;
|
|
24
|
+
/** Ring of per-second buckets, keyed by `Math.floor(now / 1000)` */
|
|
25
|
+
private buckets;
|
|
26
|
+
add(name: TickingCounterName, amount: number): void;
|
|
27
|
+
snapshot(durationSec: number): DevToolsTickingStats;
|
|
28
|
+
hasData(): boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Collects per-cell / per-row costs while a recording runs. Hot paths get it with
|
|
32
|
+
* `getPerfRecorder(adaptableId)` (or a cached reference) and do nothing when it is `null`:
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* const recorder = this.adaptable.perfRecorder;
|
|
36
|
+
* const start = recorder ? performance.now() : 0;
|
|
37
|
+
* // ... the work ...
|
|
38
|
+
* recorder?.add('cellStyle', `cellStyle:${columnId}`, start, () => ({ columnId }));
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare class PerfRecorder {
|
|
42
|
+
private readonly store;
|
|
43
|
+
constructor(store: PerfStore);
|
|
44
|
+
/**
|
|
45
|
+
* Adds one call of `kind` that started at `start` (a `performance.now()` value).
|
|
46
|
+
* `describe` runs only the first time `key` is seen.
|
|
47
|
+
*/
|
|
48
|
+
add(kind: DevToolsHotPathKind, key: string, start: number, describe?: () => Omit<DevToolsHotPathStat, 'key' | 'kind' | 'count' | 'totalMs' | 'maxMs'>): void;
|
|
49
|
+
count(name: TickingCounterName, amount?: number): void;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The memory part of a recording: the JS heap at every sample (merged into wider points as the
|
|
53
|
+
* recording grows, so hours fit in {@link MAX_RECORDING_HEAP_POINTS}) and the memory inventory
|
|
54
|
+
* (the size of AdapTable's structures) about every {@link INVENTORY_SAMPLE_INTERVAL_MS}. The
|
|
55
|
+
* recording that owns it decides when it starts and stops.
|
|
56
|
+
*/
|
|
57
|
+
export declare class MemoryRecording {
|
|
58
|
+
private readonly readInventory;
|
|
59
|
+
/** Width of each heap point */
|
|
60
|
+
intervalMs: number;
|
|
61
|
+
/** When the last heap reading was added: readers pass it back as their cursor */
|
|
62
|
+
heapAt: number;
|
|
63
|
+
/** When the inventory was last read */
|
|
64
|
+
inventoryAt: number;
|
|
65
|
+
/** The last inventory read in full, so DevTools can show it without reading it again */
|
|
66
|
+
lastItems?: {
|
|
67
|
+
timestamp: number;
|
|
68
|
+
items: DevToolsMemoryItem[];
|
|
69
|
+
};
|
|
70
|
+
/** What reading the inventory cost: it is DevTools' own work inside the recording */
|
|
71
|
+
readonly inventoryReads: {
|
|
72
|
+
count: number;
|
|
73
|
+
totalMs: number;
|
|
74
|
+
maxMs: number;
|
|
75
|
+
};
|
|
76
|
+
/** The last reads (epoch ms), to name them in a long frame they are part of */
|
|
77
|
+
readonly recentInventoryReads: {
|
|
78
|
+
timestamp: number;
|
|
79
|
+
duration: number;
|
|
80
|
+
}[];
|
|
81
|
+
private heap;
|
|
82
|
+
private inventory;
|
|
83
|
+
private nextInventoryAt;
|
|
84
|
+
constructor(readInventory: () => DevToolsMemoryItem[]);
|
|
85
|
+
/** One sampler tick; `force` reads the inventory whatever its schedule (start and stop) */
|
|
86
|
+
sample(heap: DevToolsHeapSample | undefined, now: number, force?: boolean): void;
|
|
87
|
+
private addHeapSample;
|
|
88
|
+
/** Merges neighbouring points: half as many points, twice as wide */
|
|
89
|
+
private compactHeap;
|
|
90
|
+
private sampleInventory;
|
|
91
|
+
/** Copies: the last point changes in place while its interval lasts */
|
|
92
|
+
heapPoints(): DevToolsMemoryRecordingPoint[];
|
|
93
|
+
inventorySamples(): DevToolsMemoryInventorySample[];
|
|
94
|
+
get heapSize(): number;
|
|
95
|
+
get inventorySize(): number;
|
|
96
|
+
}
|
|
97
|
+
export type PerfRecordingOptions = {
|
|
98
|
+
/** Time every cell callback, expression, filter and data change (default `true`) */
|
|
99
|
+
hotPaths?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Checked every 2 s; the recording stops once it returns true (a recording started from the
|
|
102
|
+
* DevTools panel stops when the panel is gone, so a forgotten one does not keep adding overhead,
|
|
103
|
+
* unless it was asked to keep recording)
|
|
104
|
+
*/
|
|
105
|
+
stopWhen?: () => boolean;
|
|
106
|
+
/**
|
|
107
|
+
* While it returns true, operations are not written as Chrome Performance panel tracks: nobody
|
|
108
|
+
* can record them with DevTools closed, and the browser keeps every entry
|
|
109
|
+
*/
|
|
110
|
+
pauseTracksWhen?: () => boolean;
|
|
111
|
+
/** Started by a Record and reload request, at page load */
|
|
112
|
+
onLoad?: boolean;
|
|
113
|
+
};
|
|
114
|
+
export declare class PerfStore {
|
|
115
|
+
readonly adaptableId: string;
|
|
116
|
+
readonly measures: RingBuffer<DevToolsPerfMeasure>;
|
|
117
|
+
readonly hotPaths: Map<string, DevToolsHotPathStat>;
|
|
118
|
+
ticking: TickingCounters;
|
|
119
|
+
private labelStats;
|
|
120
|
+
/** A recording runs */
|
|
121
|
+
recording: boolean;
|
|
122
|
+
recordingStartedAt?: number;
|
|
123
|
+
recordingStoppedAt?: number;
|
|
124
|
+
/** The current or last recording includes Hot Paths */
|
|
125
|
+
recordingHotPaths: boolean;
|
|
126
|
+
/** The current or last recording was started by Record and reload */
|
|
127
|
+
recordingOnLoad: boolean;
|
|
128
|
+
/** Not `null` only while a recording with Hot Paths runs */
|
|
129
|
+
recorder: PerfRecorder | null;
|
|
130
|
+
recordingStopReason?: 'devtools-closed';
|
|
131
|
+
/** Checked on every sampler tick; the recording stops once it returns true */
|
|
132
|
+
private stopRecordingWhen?;
|
|
133
|
+
private pauseTracksWhen?;
|
|
134
|
+
/** The memory part of the current or last recording */
|
|
135
|
+
memory: MemoryRecording | null;
|
|
136
|
+
/**
|
|
137
|
+
* Every long frame of the recording: only the newest {@link MAX_LONG_FRAMES} are kept in full,
|
|
138
|
+
* so a long run needs its own totals
|
|
139
|
+
*/
|
|
140
|
+
longFrameTotals: {
|
|
141
|
+
count: number;
|
|
142
|
+
slowestMs: number;
|
|
143
|
+
};
|
|
144
|
+
constructor(adaptableId: string);
|
|
145
|
+
addMeasure(params: {
|
|
146
|
+
track: string;
|
|
147
|
+
label: string;
|
|
148
|
+
/** `performance.now()` value */
|
|
149
|
+
start: number;
|
|
150
|
+
duration: number;
|
|
151
|
+
details?: DevToolsPerfDetail[];
|
|
152
|
+
tooltip?: string;
|
|
153
|
+
}): void;
|
|
154
|
+
getLabelStats(): DevToolsPerfLabelStats[];
|
|
155
|
+
/** Whether the running recording stops by itself (when DevTools closes) */
|
|
156
|
+
get recordingStopsWithDevTools(): boolean;
|
|
157
|
+
/** Whether the recording writes Chrome Performance panel tracks right now */
|
|
158
|
+
get writesTracks(): boolean;
|
|
159
|
+
/** A new memory part, with its first heap reading and the inventory baseline */
|
|
160
|
+
private createMemory;
|
|
161
|
+
/** Starts a recording; the previous recording's results are dropped. */
|
|
162
|
+
startRecording(options?: PerfRecordingOptions): void;
|
|
163
|
+
stopRecording(reason?: 'devtools-closed'): void;
|
|
164
|
+
/**
|
|
165
|
+
* Changes whether a running recording stops by itself ("Keep recording when DevTools closes"
|
|
166
|
+
* can be ticked while it runs)
|
|
167
|
+
*/
|
|
168
|
+
setStopWhen(stopWhen: (() => boolean) | undefined): void;
|
|
169
|
+
/** Called on every sampler tick */
|
|
170
|
+
checkRecordingStop(): void;
|
|
171
|
+
/** Drops the recording results; a running recording starts over */
|
|
172
|
+
clearRecording(): void;
|
|
173
|
+
/** Everything a recording collects; the initialisation timings stay */
|
|
174
|
+
private dropRecordingResults;
|
|
175
|
+
getData(cursor?: Partial<DevToolsPerfCursor>, profileTracksEnabled?: boolean): DevToolsPerfData;
|
|
176
|
+
/** Number of entries kept, for the memory inventory */
|
|
177
|
+
getBufferSizes(): {
|
|
178
|
+
measures: number;
|
|
179
|
+
labelStats: number;
|
|
180
|
+
hotPaths: number;
|
|
181
|
+
heapPoints: number;
|
|
182
|
+
inventorySamples: number;
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Called when the recording of an instance starts or stops, whatever started or stopped it (the
|
|
187
|
+
* panel, the in-page API, DevTools closing); `setupDevTools` tells the panel.
|
|
188
|
+
*/
|
|
189
|
+
export declare function onRecordingChange(listener: ((adaptableId: string) => void) | null): void;
|
|
190
|
+
/**
|
|
191
|
+
* How a recording reads the memory inventory of an instance (see `buildMemoryInfo`). It throws
|
|
192
|
+
* while the instance is not registered yet; the recording then tries again at its next tick.
|
|
193
|
+
*/
|
|
194
|
+
export declare function setInventoryReader(reader: ((adaptableId: string) => DevToolsMemoryItem[]) | null): void;
|
|
195
|
+
export declare function setRecordOnLoadRequest(request: Omit<PerfRecordingOptions, 'onLoad'> | null): void;
|
|
196
|
+
/** Created on first use: initialisation timings arrive before the instance registers */
|
|
197
|
+
export declare function getPerfStore(adaptableId: string): PerfStore;
|
|
198
|
+
export declare function hasPerfStore(adaptableId: string): boolean;
|
|
199
|
+
export declare function deletePerfStore(adaptableId: string): void;
|
|
200
|
+
/** Whether a recording runs for the instance and writes Chrome Performance panel tracks now */
|
|
201
|
+
export declare function isRecordingTracks(adaptableId: string | undefined): boolean;
|
|
202
|
+
/** Whether a recording runs for the instance */
|
|
203
|
+
export declare function isRecordingPerformance(adaptableId: string | undefined): boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Whether an operation timing (a `DevToolsMarker` ending) is kept: initialisation always,
|
|
206
|
+
* the others only while a Performance recording runs.
|
|
207
|
+
*/
|
|
208
|
+
export declare function shouldKeepOperation(adaptableId: string, track: string): boolean;
|
|
209
|
+
/** `null` unless a recording with Hot Paths runs for the instance */
|
|
210
|
+
export declare function getPerfRecorder(adaptableId: string | undefined): PerfRecorder | null;
|
|
211
|
+
export declare function isPerfRecording(adaptableId: string | undefined): boolean;
|
|
212
|
+
export declare function supportsMemory(): boolean;
|
|
213
|
+
export declare function readHeap(): DevToolsHeapSample | undefined;
|
|
214
|
+
export declare function supportsLongAnimationFrames(): boolean;
|
|
215
|
+
export declare function getPageBufferSizes(): {
|
|
216
|
+
longFrames: number;
|
|
217
|
+
};
|
|
218
|
+
export {};
|