@gooddata/sdk-ui-pivot 11.52.0-alpha.5 → 11.52.0-alpha.7
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/esm/CorePivotTable.d.ts +8 -146
- package/esm/CorePivotTable.d.ts.map +1 -1
- package/esm/CorePivotTable.js +661 -496
- package/esm/PivotTable.d.ts.map +1 -1
- package/esm/PivotTable.js +2 -4
- package/esm/impl/gridOptions.d.ts +2 -3
- package/esm/impl/gridOptions.d.ts.map +1 -1
- package/esm/impl/privateTypes.d.ts +9 -1
- package/esm/impl/privateTypes.d.ts.map +1 -1
- package/esm/impl/tableFacade.d.ts +2 -3
- package/esm/impl/tableFacade.d.ts.map +1 -1
- package/esm/impl/tableFacadeInitializer.d.ts +2 -3
- package/esm/impl/tableFacadeInitializer.d.ts.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/next/context/PivotTablePropsContext.d.ts +2 -3
- package/esm/next/context/PivotTablePropsContext.d.ts.map +1 -1
- package/esm/next/index.d.ts +1 -1
- package/esm/next/index.d.ts.map +1 -1
- package/esm/next/types/conditionalFormatting.d.ts +14 -0
- package/esm/next/types/conditionalFormatting.d.ts.map +1 -1
- package/esm/next/types/public.d.ts +4 -4
- package/esm/publicTypes.d.ts +1 -2
- package/esm/publicTypes.d.ts.map +1 -1
- package/esm/sdk-ui-pivot.d.ts +19 -6
- package/package.json +13 -13
package/esm/CorePivotTable.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { Component } from "react";
|
|
2
1
|
import { type ICorePivotTableProps } from "./publicTypes.js";
|
|
3
|
-
import { type ICorePivotTableState } from "./tableState.js";
|
|
4
2
|
/**
|
|
5
|
-
* This
|
|
3
|
+
* This component implements pivot table using the community version of ag-grid.
|
|
6
4
|
*
|
|
7
5
|
* Bear in mind that this is not a typical, standard React component implementation; the main reason
|
|
8
6
|
* behind that is that while ag-grid comes with a React component the ag-grid itself is not a React component
|
|
@@ -12,10 +10,14 @@ import { type ICorePivotTableState } from "./tableState.js";
|
|
|
12
10
|
* Instead of looking at this implementation as a typical React component, look at it like a adapter between
|
|
13
11
|
* React and ag-grid which is used to render data obtained using GD executions.
|
|
14
12
|
*
|
|
15
|
-
* The code in this
|
|
13
|
+
* The code in this component is built to reflect the adapter nature of the integration. The responsibility of this
|
|
16
14
|
* component is to correctly handle the component lifecycle and orchestrate integration of React and ag-grid, React
|
|
17
15
|
* and GoodData, React and GoodData and ag-grid.
|
|
18
16
|
*
|
|
17
|
+
* Note on the implementation: because the table is driven imperatively, all the non-react state lives in refs and
|
|
18
|
+
* all the functions that the table hands over to its sub-components are stable for the entire lifetime of the
|
|
19
|
+
* component; they read the current props, state and internal state through refs.
|
|
20
|
+
*
|
|
19
21
|
* Lifecycle
|
|
20
22
|
* ---------
|
|
21
23
|
*
|
|
@@ -42,7 +44,7 @@ import { type ICorePivotTableState } from "./tableState.js";
|
|
|
42
44
|
* prepared execution, add the extra settings and re-drive the execution. Once done, it will update the internal
|
|
43
45
|
* state and ping ag-grid API to re-render the table.
|
|
44
46
|
*
|
|
45
|
-
* In case the client changes props (say modifying the prepared execution) the
|
|
47
|
+
* In case the client changes props (say modifying the prepared execution) the update effect will determine
|
|
46
48
|
* whether the full reinitialization is in order. If so the entire existing ag-grid and all our internal state
|
|
47
49
|
* is thrown out and table is initialized from scratch.
|
|
48
50
|
*
|
|
@@ -108,147 +110,7 @@ import { type ICorePivotTableState } from "./tableState.js";
|
|
|
108
110
|
*
|
|
109
111
|
* @internal
|
|
110
112
|
*/
|
|
111
|
-
export declare
|
|
112
|
-
static defaultProps: Pick<ICorePivotTableProps, "ErrorComponent" | "LoadingComponent" | "afterRender" | "config" | "drillableItems" | "locale" | "onColumnResized" | "onDataView" | "onDrill" | "onError" | "onExportReady" | "onLoadingChanged" | "pageSize" | "pushData">;
|
|
113
|
-
private readonly errorMap;
|
|
114
|
-
private containerRef;
|
|
115
|
-
private pivotTableId;
|
|
116
|
-
private internal;
|
|
117
|
-
private boundAgGridCallbacks;
|
|
118
|
-
private gridEventHandlers;
|
|
119
|
-
private dataRenderHandlers;
|
|
120
|
-
private scrollEventHandlers;
|
|
121
|
-
private resizeEventHandlers;
|
|
122
|
-
private sortingEventHandlers;
|
|
123
|
-
private aggregationEventHandlers;
|
|
124
|
-
private dataLoadingEventHandlers;
|
|
125
|
-
private configAccessors;
|
|
126
|
-
private configDelegates;
|
|
127
|
-
private stickyRowManager;
|
|
128
|
-
private heightCalculationManager;
|
|
129
|
-
private executionAbortManager;
|
|
130
|
-
private componentUpdateAnalyzer;
|
|
131
|
-
constructor(props: ICorePivotTableProps);
|
|
132
|
-
/**
|
|
133
|
-
* Starts initialization of table that will show results of the provided prepared execution. If there is
|
|
134
|
-
* already an initialization in progress for the table, this will abandon the previous initialization
|
|
135
|
-
* and start a new one.
|
|
136
|
-
*
|
|
137
|
-
* During the initialization the code drives the execution and obtains the first page of data. Once that
|
|
138
|
-
* is done, the initializer will construct the {@link TableFacade} with all the essential non-react
|
|
139
|
-
* table & data state in it.
|
|
140
|
-
*
|
|
141
|
-
* After the initializer completes this, the table facade and the table itself is ready to render the
|
|
142
|
-
* ag-grid component.
|
|
143
|
-
*
|
|
144
|
-
* @param execution - prepared execution to drive
|
|
145
|
-
*/
|
|
146
|
-
private initialize;
|
|
147
|
-
/**
|
|
148
|
-
* Completely re-initializes the table in order to show data for the provided prepared execution. At this point
|
|
149
|
-
* code has determined that the table layout for the other prepared execution differs from what is currently
|
|
150
|
-
* shown and the only reasonable thing to do is to throw everything away and start from scratch.
|
|
151
|
-
*
|
|
152
|
-
* This will reset all React state and non-react state and start table initialization process.
|
|
153
|
-
*/
|
|
154
|
-
private reinitialize;
|
|
155
|
-
componentDidMount(): void;
|
|
156
|
-
componentWillUnmount(): void;
|
|
157
|
-
componentDidUpdate(prevProps: ICorePivotTableProps): void;
|
|
158
|
-
private stopEventWhenResizeHeader;
|
|
159
|
-
private setContainerRef;
|
|
160
|
-
private renderLoading;
|
|
161
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
162
|
-
private initializeEventHandlers;
|
|
163
|
-
private onGridReady;
|
|
164
|
-
private onFirstDataRendered;
|
|
165
|
-
private onModelUpdated;
|
|
166
|
-
private onGridColumnsChanged;
|
|
167
|
-
private onGridSizeChanged;
|
|
168
|
-
private onGridColumnResized;
|
|
169
|
-
private onSortChanged;
|
|
170
|
-
private onPinnedRowDataChanged;
|
|
171
|
-
private onBodyScroll;
|
|
172
|
-
private onContainerMouseDown;
|
|
173
|
-
private onPageLoaded;
|
|
174
|
-
/**
|
|
175
|
-
* This will be called when user changes sorts or adds totals. This means complete re-execution with
|
|
176
|
-
* new sorts or totals. Loading indicators will be shown instead of all rendered rows thanks to the
|
|
177
|
-
* LoadingRenderer used in all cells of the left-most column.
|
|
178
|
-
*
|
|
179
|
-
* The table must take care to remove the sticky (top-pinned) row - it is treated differently by
|
|
180
|
-
* ag-grid and will be literally sticking there on its own with the loading indicators.
|
|
181
|
-
*
|
|
182
|
-
* Once transformation finishes - indicated by call to onPageLoaded, table can re-instance the sticky row.
|
|
183
|
-
*
|
|
184
|
-
* @param newExecution - the new execution which is being run and will be used to populate the table
|
|
185
|
-
*/
|
|
186
|
-
private onExecutionTransformed;
|
|
187
|
-
private onMenuAggregationClick;
|
|
188
|
-
private onLoadingChanged;
|
|
189
|
-
private onError;
|
|
190
|
-
private growToFit;
|
|
191
|
-
private autoresizeColumns;
|
|
192
|
-
private shouldAutoResizeColumns;
|
|
193
|
-
private startWatchingTableRendered;
|
|
194
|
-
private stopWatchingTableRendered;
|
|
195
|
-
private updateStickyRow;
|
|
196
|
-
private updateStickyRowContent;
|
|
197
|
-
private updateDesiredHeight;
|
|
198
|
-
private initializeConfigAccessors;
|
|
199
|
-
private getLastSortedColId;
|
|
200
|
-
private setLastSortedColId;
|
|
201
|
-
private getColumnTotals;
|
|
202
|
-
private getRowTotals;
|
|
203
|
-
private getExecutionDefinition;
|
|
204
|
-
private getGroupRows;
|
|
205
|
-
private getMeasureGroupDimension;
|
|
206
|
-
private getColumnHeadersPosition;
|
|
207
|
-
private getMenuConfig;
|
|
208
|
-
private getDefaultWidth;
|
|
209
|
-
private isColumnAutoresizeEnabled;
|
|
210
|
-
private isGrowToFitEnabled;
|
|
211
|
-
private getColumnWidths;
|
|
212
|
-
private hasColumnWidths;
|
|
213
|
-
private getDefaultWidthFromProps;
|
|
214
|
-
/**
|
|
215
|
-
* All pushData calls done by the table must go through this guard.
|
|
216
|
-
*
|
|
217
|
-
* TODO: The guard should ensure a 'disconnect' between push data handling and the calling function processing.
|
|
218
|
-
* When the pushData is handled by the application, it MAY (and in our case it DOES) trigger processing that
|
|
219
|
-
* lands back in the table. This opens additional set of invariants to check / be prepared for in order to
|
|
220
|
-
* optimize the renders and re-renders.
|
|
221
|
-
*/
|
|
222
|
-
private pushDataGuard;
|
|
223
|
-
/**
|
|
224
|
-
* Wraps the provided callback function with a guard that checks whether the current table state is the same
|
|
225
|
-
* as the state snapshot at the time of callback creation. If the state differs, the wrapped function WILL NOT
|
|
226
|
-
* be called.
|
|
227
|
-
*
|
|
228
|
-
* @param callback - function to wrap with state guard
|
|
229
|
-
*/
|
|
230
|
-
private stateBoundCallback;
|
|
231
|
-
/**
|
|
232
|
-
* All callback functions that the table passes to ag-grid must be bound to the current internal state of the table. The
|
|
233
|
-
* callback functions MUST be noop if the internal state at the time of call is different from the internal state
|
|
234
|
-
* at the time of creation.
|
|
235
|
-
*
|
|
236
|
-
* This is essential to prevent errors stemming for racy behavior triggered by ag-grid. ag-grid often triggers
|
|
237
|
-
* event callbacks using setTimeout(). It can happen, that once the event is actually processed the ag-grid table
|
|
238
|
-
* which caused it is unmounted. Doing anything with the unmounted table's gridApi leads to errors.
|
|
239
|
-
*
|
|
240
|
-
* Without this, table may trigger ag-grid errors such as this:
|
|
241
|
-
*
|
|
242
|
-
* https://github.com/ag-grid/ag-grid/issues/3457
|
|
243
|
-
*
|
|
244
|
-
* or this:
|
|
245
|
-
*
|
|
246
|
-
* https://github.com/ag-grid/ag-grid/issues/3334
|
|
247
|
-
*/
|
|
248
|
-
private createBoundAgGridCallbacks;
|
|
249
|
-
private getTableMethods;
|
|
250
|
-
private getResizingConfig;
|
|
251
|
-
}
|
|
113
|
+
export declare function CorePivotTableAgImpl(props: ICorePivotTableProps): import("react/jsx-runtime").JSX.Element;
|
|
252
114
|
/**
|
|
253
115
|
* @internal
|
|
254
116
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorePivotTable.d.ts","sourceRoot":"","sources":["../src/CorePivotTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CorePivotTable.d.ts","sourceRoot":"","sources":["../src/CorePivotTable.tsx"],"names":[],"mappings":"AAyEA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AA2E7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8GG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,2CA29B/D;AAID;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,oBAAoB,2CAQzD"}
|