@kanunilabs/pivotgrid-core 1.11.4 → 1.11.6
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/dist/index.cjs +12 -11
- package/dist/index.d.cts +246 -6
- package/dist/index.d.ts +246 -6
- package/dist/index.js +12 -11
- package/dist/pivot.worker.cjs +1 -1
- package/dist/pivot.worker.js +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1387,6 +1387,34 @@ declare const ROW_HEADER_MIN_DATA_STRIP = 160;
|
|
|
1387
1387
|
declare const ROW_HEADER_MAX_PINNED_FRACTION = 0.6;
|
|
1388
1388
|
/** However tight it gets, a row-header column stays wide enough to read. */
|
|
1389
1389
|
declare const ROW_HEADER_MIN_COL_WIDTH = 56;
|
|
1390
|
+
/**
|
|
1391
|
+
* Whether the row-header block stops being pinned (B.64 addendum): the whole
|
|
1392
|
+
* table then scrolls sideways as one. `'unpin'` always; otherwise whenever the
|
|
1393
|
+
* columns, each at its floor, cannot leave the data its minimum strip. Then no
|
|
1394
|
+
* squeeze can help: the block would fill the viewport and the data would be
|
|
1395
|
+
* out of reach. `viewport <= 0` is "not measured" and never unpins.
|
|
1396
|
+
*/
|
|
1397
|
+
declare function rowHeadersUnpinned(columnCount: number, viewport: number, mode?: string): boolean;
|
|
1398
|
+
/**
|
|
1399
|
+
* The font weight a cell is PAINTED with (B.83). `onCellPrepared` is given the plain number it was always given
|
|
1400
|
+
* (600 for a total, 500 for a column header...); when the hook leaves it as it was, the cell is painted with the
|
|
1401
|
+
* theme variable that defaults to that number (`var(--pivot-font-weight-total, 600)`), so the variable can restyle it.
|
|
1402
|
+
* A weight the hook set is painted as set.
|
|
1403
|
+
*/
|
|
1404
|
+
declare function paintedFontWeight<T>(weight: T, plain: number, variable: string): T | string;
|
|
1405
|
+
/**
|
|
1406
|
+
* Whether the row-header cell of column `depth` in row `index` closes its group: the next row does not carry the
|
|
1407
|
+
* same group in that column (B.79 / B.81). A subtotal deeper than `depth` is still inside the group; the group's own
|
|
1408
|
+
* subtotal, a shallower one, the grand total or another group ends it. Each row of the tree layout is its own group.
|
|
1409
|
+
* Read by `layout.rowHeaderGroupLines` and the cells' `data-group-end` in both renderers.
|
|
1410
|
+
*/
|
|
1411
|
+
declare function rowHeaderGroupEnd(rows: ReadonlyArray<{
|
|
1412
|
+
flatRow: Pick<FlatRow, 'depth' | 'isSubtotal'> & {
|
|
1413
|
+
pathValues: readonly unknown[];
|
|
1414
|
+
} | null;
|
|
1415
|
+
dfIndex: number;
|
|
1416
|
+
isGrandTotal: boolean;
|
|
1417
|
+
}>, index: number, depth: number, tree: boolean): boolean;
|
|
1390
1418
|
interface RowHeaderLayout {
|
|
1391
1419
|
/** Widths as PAINTED, one per row-header column. */
|
|
1392
1420
|
widths: number[];
|
|
@@ -1519,7 +1547,13 @@ interface ColHeaderCell {
|
|
|
1519
1547
|
declare function buildColumnHeaders(colTree: PivotNode[], dataFields: PivotField[], layout: PivotLayoutState, expandedColPaths: Set<string>, allExpanded?: boolean, labels?: {
|
|
1520
1548
|
grandTotal?: string;
|
|
1521
1549
|
subTotal?: string;
|
|
1522
|
-
}): ColHeaderCell[][];
|
|
1550
|
+
}, colFieldCount?: number): ColHeaderCell[][];
|
|
1551
|
+
/**
|
|
1552
|
+
* Whether the pivot has the "Grand Total" row over its measure headers
|
|
1553
|
+
* (`layout.showGrandTotalHeader`, B.69): only while no field is in the column
|
|
1554
|
+
* area, since with one the grand-total column carries its own heading.
|
|
1555
|
+
*/
|
|
1556
|
+
declare function grandTotalHeaderShown(layout: Pick<PivotLayoutState, 'showGrandTotalHeader'>, colCount: number, dataFieldCount: number): boolean;
|
|
1523
1557
|
/**
|
|
1524
1558
|
* A flattened row for rendering. Each row represents either:
|
|
1525
1559
|
* - A leaf data row (values at each depth level column)
|
|
@@ -1648,6 +1682,14 @@ interface ExportOptions {
|
|
|
1648
1682
|
* when the call gives none.
|
|
1649
1683
|
*/
|
|
1650
1684
|
onLargeExport?: (info: LargeExportInfo) => boolean | void | Promise<boolean | void>;
|
|
1685
|
+
/**
|
|
1686
|
+
* The words the document contains (the grand-total and subtotal labels, the
|
|
1687
|
+
* sheet names). The grid hands in its own dictionary, locale and the app's
|
|
1688
|
+
* overrides together, so a file says what the screen says (B.68). Omitted
|
|
1689
|
+
* (a controller used without a renderer), the built-in dictionary of
|
|
1690
|
+
* `locale` is used, and English for print and clipboard.
|
|
1691
|
+
*/
|
|
1692
|
+
dictionary?: Partial<PivotDictionary>;
|
|
1651
1693
|
}
|
|
1652
1694
|
/** What {@link ExportOptions.onLargeExport} is told. */
|
|
1653
1695
|
interface LargeExportInfo {
|
|
@@ -2044,6 +2086,90 @@ interface PivotLayoutState {
|
|
|
2044
2086
|
* like every other member. A view setting, as above.
|
|
2045
2087
|
*/
|
|
2046
2088
|
filterAreaCollapsed?: boolean;
|
|
2089
|
+
/**
|
|
2090
|
+
* What the row-header block does when its columns do not fit (B.64).
|
|
2091
|
+
* `'shrink'` (default): the block is held to 60% of the width and every
|
|
2092
|
+
* column is squeezed to fit, down to 56px each. `'scroll'`: each column
|
|
2093
|
+
* keeps its width. React: the block stays pinned, is held to 60% of the
|
|
2094
|
+
* width, and scrolls sideways inside itself (touch, trackpad or Shift+wheel;
|
|
2095
|
+
* its scrollbar is hidden so the rows stay aligned with the data). Plain JS:
|
|
2096
|
+
* the row headers are not pinned; the whole table scrolls sideways. A view
|
|
2097
|
+
* setting.
|
|
2098
|
+
*
|
|
2099
|
+
* `'unpin'`: the row headers are never pinned; the whole table (headers and
|
|
2100
|
+
* data) scrolls sideways as one, each column at its width. Plain JS already
|
|
2101
|
+
* scrolls the whole table, so there `'scroll'` and `'unpin'` behave alike.
|
|
2102
|
+
*
|
|
2103
|
+
* Whatever the value, the block lets go of its pin by itself when its
|
|
2104
|
+
* columns, each at the 56px floor, cannot leave the data 160px (columns x 56
|
|
2105
|
+
* + 160 > the pivot's width): squeezing cannot help then, and the data would
|
|
2106
|
+
* be out of reach. Otherwise `'shrink'` and `'scroll'` act as described.
|
|
2107
|
+
*/
|
|
2108
|
+
rowHeaderOverflow?: 'shrink' | 'scroll' | 'unpin';
|
|
2109
|
+
/**
|
|
2110
|
+
* How many rows of chips the COLLAPSED filter strip shows (B.63). Default 1.
|
|
2111
|
+
* 0 leaves only the strip's header: its name, how many of its fields filter,
|
|
2112
|
+
* and the button that opens it. A view setting; the app's, not saved by the
|
|
2113
|
+
* collapse button.
|
|
2114
|
+
*/
|
|
2115
|
+
filterAreaCollapsedRows?: number;
|
|
2116
|
+
/**
|
|
2117
|
+
* Show the summary-type badge ("Sum") on the chips of the data area (B.62).
|
|
2118
|
+
* Default `true`; `false` hides it (the chip's accessible name still says it).
|
|
2119
|
+
* A view setting.
|
|
2120
|
+
*/
|
|
2121
|
+
showSummaryBadge?: boolean;
|
|
2122
|
+
/**
|
|
2123
|
+
* The widest a field chip's caption grows, in px (B.62). Default 120. `'none'`
|
|
2124
|
+
* lets the caption keep its whole text; `'auto'` sizes the chip to its caption,
|
|
2125
|
+
* up to 280px. A cut caption shows its whole text as a tooltip. A view setting.
|
|
2126
|
+
*/
|
|
2127
|
+
chipMaxWidth?: number | 'none' | 'auto';
|
|
2128
|
+
/**
|
|
2129
|
+
* Show the remove (x) button on a field chip (B.62 addendum). Default `true`;
|
|
2130
|
+
* `false` hides it (a field still leaves by dragging it to the field list, by
|
|
2131
|
+
* Delete on the focused chip, or from the chip's menu). A view setting. The
|
|
2132
|
+
* gap between a chip's caption and its filter icon is the CSS variable
|
|
2133
|
+
* `--pivot-chip-filter-gap` (default 4px), set on the pivot or above it.
|
|
2134
|
+
*/
|
|
2135
|
+
showChipRemove?: boolean;
|
|
2136
|
+
/**
|
|
2137
|
+
* With no field in the column area, put a "Grand Total" heading (the
|
|
2138
|
+
* dictionary's `grandTotal`) over the measure headers (B.69). Default `false`.
|
|
2139
|
+
* Ignored while a column field exists: the grand-total column has its own
|
|
2140
|
+
* heading then. The Excel, PDF, print and clipboard exports carry the row too.
|
|
2141
|
+
* A view setting.
|
|
2142
|
+
*/
|
|
2143
|
+
showGrandTotalHeader?: boolean;
|
|
2144
|
+
/**
|
|
2145
|
+
* The scrollbars inside the pivot (B.70). `'thin'` (default) is the
|
|
2146
|
+
* stylesheet's slim, rounded bar. `'native'` leaves them to the browser: on
|
|
2147
|
+
* Windows the classic wide bar with arrows. Needs the stylesheet of this
|
|
2148
|
+
* release or later. A view setting.
|
|
2149
|
+
*/
|
|
2150
|
+
scrollbarStyle?: 'thin' | 'native';
|
|
2151
|
+
/**
|
|
2152
|
+
* What happens to text that does not fit (B.82): the field chips (every strip, the field list, the drag
|
|
2153
|
+
* ghost) and the row-header values, "Total: ..." included. `'ellipsis'` (default) ends it with "...";
|
|
2154
|
+
* `'clip'` cuts it off at the edge. Number cells never change. A cut row-header value carries its whole
|
|
2155
|
+
* text as a tooltip in `'clip'` mode. A view setting.
|
|
2156
|
+
*/
|
|
2157
|
+
textOverflow?: 'ellipsis' | 'clip';
|
|
2158
|
+
/**
|
|
2159
|
+
* A line at the bottom of every row-header group, in every row-header column (B.79 / B.81): where a group spanning
|
|
2160
|
+
* several rows ends, and between two subtotal rows in a row, where the row-header block drew no line. The data cells
|
|
2161
|
+
* do not change, and neither does the row height (the line is the same 1px bottom border a one-row group already
|
|
2162
|
+
* has). Default `false` (today's look). The cells say where a group starts and ends in either case
|
|
2163
|
+
* (`data-group-start`, `data-group-end`). A view setting.
|
|
2164
|
+
*/
|
|
2165
|
+
rowHeaderGroupLines?: boolean;
|
|
2166
|
+
/**
|
|
2167
|
+
* What the Values and Columns zones above the table do when their chips do not fit on one line (B.74). `'wrap'`
|
|
2168
|
+
* (default) starts a new line, as before; `'scroll'` keeps one line and scrolls it sideways (a quick swipe on
|
|
2169
|
+
* touch). Dragging a chip to the zone's edge scrolls it, like the field list. The filter strip keeps its own
|
|
2170
|
+
* rows (`filterAreaMaxRows`). A view setting.
|
|
2171
|
+
*/
|
|
2172
|
+
areaChipOverflow?: 'wrap' | 'scroll';
|
|
2047
2173
|
/** Chart integration type when rendering in chart mode. */
|
|
2048
2174
|
chartType?: string;
|
|
2049
2175
|
}
|
|
@@ -2231,6 +2357,11 @@ interface PivotControllerCallbacks<TRow = any> {
|
|
|
2231
2357
|
onExporting?: (e: ExportingEvent) => void;
|
|
2232
2358
|
/** Before a styled Excel export gives way to the plain one; `false` cancels (B.23). See `ExportOptions.onLargeExport`. */
|
|
2233
2359
|
onLargeExport?: ExportOptions['onLargeExport'];
|
|
2360
|
+
/**
|
|
2361
|
+
* The grid's resolved dictionary (the locale's words and the app's overrides).
|
|
2362
|
+
* The renderers set it; exports take the words of the file from it (B.68).
|
|
2363
|
+
*/
|
|
2364
|
+
dictionary?: Partial<PivotDictionary>;
|
|
2234
2365
|
/**
|
|
2235
2366
|
* `isComputing` changed: true when a change starts computing, false when its
|
|
2236
2367
|
* result is shown (B.31). `exportData` waits for false before it writes.
|
|
@@ -2842,8 +2973,8 @@ declare class PivotController<TRow> {
|
|
|
2842
2973
|
* The open paths are sent to the worker on every computation and saved with
|
|
2843
2974
|
* the state, so above `EXPAND_ALL_PATH_CAP` (5,000) groups — or when that
|
|
2844
2975
|
* computation fails (reported to `onError`) — the grid opens everything
|
|
2845
|
-
* with the `'*'` sentinel instead.
|
|
2846
|
-
*
|
|
2976
|
+
* with the `'*'` sentinel instead. A single branch can still be closed then:
|
|
2977
|
+
* the closed ones are saved as entries beside the `'*'` (B.65).
|
|
2847
2978
|
*/
|
|
2848
2979
|
expandAll(options?: {
|
|
2849
2980
|
allLevels?: boolean;
|
|
@@ -2912,6 +3043,8 @@ declare class PivotController<TRow> {
|
|
|
2912
3043
|
* is asking; the controller can.
|
|
2913
3044
|
*/
|
|
2914
3045
|
private static readonly ENTERPRISE_FORMATS;
|
|
3046
|
+
/** The formats the free core writes itself. */
|
|
3047
|
+
private static readonly BUILT_IN_FORMATS;
|
|
2915
3048
|
/**
|
|
2916
3049
|
* Write the pivot in `format`. A change still computing (and any queued
|
|
2917
3050
|
* `applyTransactionAsync` batch) is waited for first, so the file holds the
|
|
@@ -3398,6 +3531,30 @@ declare function extractGroupValue<TRow>(row: TRow, field: PivotField<TRow>): Pi
|
|
|
3398
3531
|
declare function pathKey(parts: readonly unknown[]): string;
|
|
3399
3532
|
/** The member path a `pathKey` names (the root, "", is `[]`). Assumes no member value starts with or contains `|`. */
|
|
3400
3533
|
declare function pathParts(key: string): string[];
|
|
3534
|
+
/** Marks a closed branch inside a set that has `'*'`. Built, not written, so no editor turns it into text. */
|
|
3535
|
+
declare const COLLAPSED_PREFIX: string;
|
|
3536
|
+
/** The entry that says the branch `key` is closed. */
|
|
3537
|
+
declare function collapsedKey(key: string): string;
|
|
3538
|
+
/** Is `entry` a closed-branch entry (rather than an open path or `'*'`)? */
|
|
3539
|
+
declare function isCollapsedKey(entry: string): boolean;
|
|
3540
|
+
/** The branch a closed-branch entry names. */
|
|
3541
|
+
declare function collapsedKeyPath(entry: string): string;
|
|
3542
|
+
/** Is the node `key` open? `all` is "the set has '*'". */
|
|
3543
|
+
declare function isKeyExpanded(set: ReadonlySet<string>, all: boolean, key: string): boolean;
|
|
3544
|
+
/**
|
|
3545
|
+
* The set after one branch is flipped: with `'*'` it adds or removes the
|
|
3546
|
+
* branch's closed entry, otherwise it adds or removes its open path. A copy.
|
|
3547
|
+
*/
|
|
3548
|
+
declare function toggleKeyIn(set: ReadonlySet<string>, key: string): Set<string>;
|
|
3549
|
+
/** `keys` opened (true) or closed (false) in `set`, by the same rule. A copy. */
|
|
3550
|
+
declare function setKeysIn(set: ReadonlySet<string>, keys: readonly string[], open: boolean): Set<string>;
|
|
3551
|
+
/**
|
|
3552
|
+
* `set` without its closed-branch entries (the set itself when it has none).
|
|
3553
|
+
* For readers that take the members as paths: a server source, a custom
|
|
3554
|
+
* exporter, a snapshot. Under '*' they get "everything open" and the closing
|
|
3555
|
+
* is the grid's own, on screen and in its own exports.
|
|
3556
|
+
*/
|
|
3557
|
+
declare function withoutCollapsed(set: ReadonlySet<string>): Set<string>;
|
|
3401
3558
|
|
|
3402
3559
|
interface DimensionFieldInfo {
|
|
3403
3560
|
dataType?: string;
|
|
@@ -3446,8 +3603,12 @@ declare function computedFields<T extends {
|
|
|
3446
3603
|
/** The strip content's gap between chip rows and its vertical padding (CSS `.kanuni-pivot-area-content`). */
|
|
3447
3604
|
declare const FILTER_AREA_ROW_GAP = 4;
|
|
3448
3605
|
declare const FILTER_AREA_PADDING = 8;
|
|
3449
|
-
/**
|
|
3450
|
-
|
|
3606
|
+
/**
|
|
3607
|
+
* The rows the strip may show, or null for no limit. 0 (only when collapsed,
|
|
3608
|
+
* `layout.filterAreaCollapsedRows: 0`, B.63) means no chips at all: the strip's
|
|
3609
|
+
* header alone.
|
|
3610
|
+
*/
|
|
3611
|
+
declare function filterAreaRows(layout: Pick<PivotLayoutState, 'filterAreaMaxRows' | 'filterAreaCollapsed' | 'filterAreaCollapsedRows'>): number | null;
|
|
3451
3612
|
/** The strip content's max height in px for `rows` rows of `chipHeight` px chips. */
|
|
3452
3613
|
declare function filterAreaMaxHeight(rows: number, chipHeight: number): number;
|
|
3453
3614
|
/** How many filter-area fields filter something (shown on the collapsed strip). */
|
|
@@ -3459,6 +3620,46 @@ declare function countFilteredFields(fields: readonly {
|
|
|
3459
3620
|
labelFilter?: unknown;
|
|
3460
3621
|
}[]): number;
|
|
3461
3622
|
|
|
3623
|
+
/** The narrowest and the widest a column is made, in Excel's character units. */
|
|
3624
|
+
declare const EXCEL_MIN_COLUMN_WIDTH = 8;
|
|
3625
|
+
declare const EXCEL_MAX_COLUMN_WIDTH = 60;
|
|
3626
|
+
/** How many rows are measured. */
|
|
3627
|
+
declare const EXCEL_WIDTH_SAMPLE_ROWS = 1000;
|
|
3628
|
+
/** The width of a text in character units: full-width letters count twice. */
|
|
3629
|
+
declare function excelTextLength(text: string): number;
|
|
3630
|
+
/**
|
|
3631
|
+
* How long a value looks once Excel has formatted it, given the cell's number
|
|
3632
|
+
* format when known. A number is measured with the format's own decimals
|
|
3633
|
+
* (grouped, two by default), a date by its format (`dd/mm/yyyy` by default,
|
|
3634
|
+
* at least 18 when the format shows the time). A custom format is otherwise
|
|
3635
|
+
* not parsed, which can be a few characters off and is why the result carries
|
|
3636
|
+
* padding. A text is measured by its FIRST line: a wrapped cell shows that much
|
|
3637
|
+
* per row.
|
|
3638
|
+
*/
|
|
3639
|
+
declare function excelValueLength(value: unknown, numFmt?: string): number;
|
|
3640
|
+
/** Measures columns row by row; `widths()` gives the Excel width of each. */
|
|
3641
|
+
declare class ExcelWidthTracker {
|
|
3642
|
+
private readonly headers;
|
|
3643
|
+
private readonly numFmts;
|
|
3644
|
+
private readonly longest;
|
|
3645
|
+
private seen;
|
|
3646
|
+
/** `numFmts[i]` is column i's Excel number format, when the writer sets one. */
|
|
3647
|
+
constructor(headers: readonly string[], numFmts?: readonly (string | undefined)[]);
|
|
3648
|
+
/** Feed one data row; rows past the sample are ignored. */
|
|
3649
|
+
add(values: readonly unknown[]): void;
|
|
3650
|
+
widths(): number[];
|
|
3651
|
+
}
|
|
3652
|
+
|
|
3653
|
+
/** What `chipMaxWidth: 'auto'` stops at. */
|
|
3654
|
+
declare const CHIP_AUTO_MAX_WIDTH = 280;
|
|
3655
|
+
interface PivotChipView {
|
|
3656
|
+
/** Classes (space separated) to add to the pivot's root, or '' for none. */
|
|
3657
|
+
className: string;
|
|
3658
|
+
/** CSS variables for the pivot's root; empty when everything is at its default. */
|
|
3659
|
+
style: Record<string, string>;
|
|
3660
|
+
}
|
|
3661
|
+
declare function pivotChipView(layout: Pick<PivotLayoutState, 'showSummaryBadge' | 'chipMaxWidth' | 'showChipRemove' | 'scrollbarStyle' | 'textOverflow' | 'areaChipOverflow'>): PivotChipView;
|
|
3662
|
+
|
|
3462
3663
|
/** What the helper needs of the controller. */
|
|
3463
3664
|
interface FocusKeeperController {
|
|
3464
3665
|
subscribe(listener: () => void): () => void;
|
|
@@ -3466,6 +3667,14 @@ interface FocusKeeperController {
|
|
|
3466
3667
|
}
|
|
3467
3668
|
declare function keepFocusAcross(root: HTMLElement | null | undefined, controller: FocusKeeperController, run: () => boolean): boolean;
|
|
3468
3669
|
|
|
3670
|
+
/**
|
|
3671
|
+
* Below this height (CSS px) the header parts of a narrow pivot take one chip row each. The full-size parts
|
|
3672
|
+
* (30% strip, 88px zones, two header rows) leave the data under 200px below about 490px.
|
|
3673
|
+
*/
|
|
3674
|
+
declare const SHORT_PIVOT_HEIGHT = 480;
|
|
3675
|
+
/** Keep `data-pivot-short` on `wrapper` while it is shorter than SHORT_PIVOT_HEIGHT. Returns the unbind function. */
|
|
3676
|
+
declare function watchShortPivot(wrapper: HTMLElement): () => void;
|
|
3677
|
+
|
|
3469
3678
|
interface PopupViewport {
|
|
3470
3679
|
left: number;
|
|
3471
3680
|
top: number;
|
|
@@ -3479,6 +3688,13 @@ interface PopupPlacement {
|
|
|
3479
3688
|
}
|
|
3480
3689
|
/** The part of the layout viewport the user sees, in `position: fixed` coordinates. */
|
|
3481
3690
|
declare function popupViewport(win?: Window): PopupViewport;
|
|
3691
|
+
/**
|
|
3692
|
+
* How many times the page's CSS `zoom` paints this element's lengths (B.71). A
|
|
3693
|
+
* zoomed subtree multiplies every length in it, `vw` and `vh` too, so a window
|
|
3694
|
+
* sized in viewport pixels runs off the screen. Painted width / layout width of
|
|
3695
|
+
* a box with no transform of its own; 1 when there is none (or no layout).
|
|
3696
|
+
*/
|
|
3697
|
+
declare function cssZoomOf(el: Element | null | undefined): number;
|
|
3482
3698
|
/**
|
|
3483
3699
|
* `anchor` is where the popup would start (its top-left in LTR). `size` its
|
|
3484
3700
|
* natural size (offsetWidth/offsetHeight: a transform does not count). `altX`
|
|
@@ -3497,6 +3713,28 @@ declare function placePopup(anchor: {
|
|
|
3497
3713
|
viewport?: PopupViewport;
|
|
3498
3714
|
}): PopupPlacement;
|
|
3499
3715
|
|
|
3716
|
+
/**
|
|
3717
|
+
* B.75 / B.76: where the resize guide line goes, in the coordinates of the positioned `host` it is a child of.
|
|
3718
|
+
*
|
|
3719
|
+
* Two traps, both measured in a real Chrome: (1) the host can be the thing that scrolls sideways (row headers
|
|
3720
|
+
* unpinned), and an absolutely positioned child scrolls with the content, so the viewport offset needs
|
|
3721
|
+
* `scrollLeft` added (negative in RTL, which is the right sign); (2) under CSS `zoom` the pointer and
|
|
3722
|
+
* `getBoundingClientRect()` are painted pixels while `transform` and widths are the element's own CSS pixels,
|
|
3723
|
+
* so the offset is divided by the zoom (`cssZoomOf`).
|
|
3724
|
+
*/
|
|
3725
|
+
declare function resizeLineX(clientX: number, host: HTMLElement): number;
|
|
3726
|
+
/** A pointer distance (painted pixels) as the CSS pixels the column widths are kept in. */
|
|
3727
|
+
declare function toCssPixels(distance: number, el: HTMLElement): number;
|
|
3728
|
+
/**
|
|
3729
|
+
* B.77: the width a column needs for what is on screen, in CSS pixels, or 0 when nothing can be measured.
|
|
3730
|
+
*
|
|
3731
|
+
* `cells` are clones' sources (the header cell and the rendered body cells of one column). Each is copied into a
|
|
3732
|
+
* hidden auto-layout table inside `root` (so the pivot's own CSS applies: padding, indent, sort arrow, expander,
|
|
3733
|
+
* font) with its fixed width, truncation and position taken off; the table's width is the widest cell's natural
|
|
3734
|
+
* width. Cells the virtual window has not rendered are not measured. One measurement per call, not per cell.
|
|
3735
|
+
*/
|
|
3736
|
+
declare function measureFitWidth(cells: Element[], root: HTMLElement): number;
|
|
3737
|
+
|
|
3500
3738
|
interface PivotSummaryColumn {
|
|
3501
3739
|
/** The field's id — the key of this column in every row. */
|
|
3502
3740
|
id: string;
|
|
@@ -3632,6 +3870,8 @@ interface AdvancedExportRequest {
|
|
|
3632
3870
|
onProgress?: (percent: number) => void;
|
|
3633
3871
|
/** Asked before the plain-file fallback (B.23); `false` cancels. */
|
|
3634
3872
|
onLargeExport?: ExportOptions['onLargeExport'];
|
|
3873
|
+
/** The grid's own dictionary (B.68): the words of the file come from it, over the built-in ones of `locale`. */
|
|
3874
|
+
dictionary?: Partial<PivotDictionary>;
|
|
3635
3875
|
}
|
|
3636
3876
|
type AdvancedExporter = (req: AdvancedExportRequest) => Promise<void>;
|
|
3637
3877
|
/** Called by the Enterprise package to enable Excel/PDF export. */
|
|
@@ -3904,4 +4144,4 @@ declare function rollupInMemory<TRow>(rows: readonly TRow[], request: PivotServe
|
|
|
3904
4144
|
/** Every value of a field in rows held in memory — the reference `loadFieldValues`. */
|
|
3905
4145
|
declare function fieldValuesInMemory<TRow>(rows: readonly TRow[], field: PivotServerField): unknown[];
|
|
3906
4146
|
|
|
3907
|
-
export { type AdvancedExportRequest, type AdvancedExporter, CHART_LEGEND_POSITIONS, CHART_PALETTE_NAMES, type CalculatedFieldTextKey, type CellClickEvent, type CellPath, type CellPreparedEvent, type ChartCategoryKeyAction, type ChartFont, type ChartFormat, type ChartGridLines, type ChartImageRequest, type ChartKeyTextKey, type ChartLabelAngle, type ChartLegendPosition, type ChartMark, type ChartPaletteName, type ChartStacking, type ChartStyle, type ChartStyleDefaults, type ColHeaderCell, type ColumnSlot, type ColumnSlotOptions, type ConditionalVisual, type CustomSummaryOptions, DEFAULT_DATA_COLUMN_WIDTH, DEFAULT_ROW_HEADER_WIDTH, type DateFormatContext, DateFormatter, type DateGranularity, type DimensionFieldInfo, type DrillDownTextKey, type DropIntent, type ExportFormat, type ExportOptions, ExportStreamController, type ExportingEvent, FILTER_AREA_PADDING, FILTER_AREA_ROW_GAP, FastTrie, type FieldDistinctEntry, type FieldMoveEvent, type FilterCondition, type FilterGroup, type FilterOperator, type FlatCellMatrix, FlatPivotEngine, type FlatRow, type FloatingFrame, type FrameRect, type FrameSize, type FunnelStage, type HeaderFilterOption, type HeaderFilterState, type HeaderFilterWrite, type HistogramBin, type LargeExportInfo, MAX_C, type MarkTone, PIVOT_AI_FEATURES, PIVOT_LICENSE_TEXT, PIVOT_STATE_VERSION, type PersistedPivotFilters, type PersistedPivotState, type PivotAiApplyResult, type PivotAiCondition, type PivotAiFeature, type PivotAiFieldOptions, type PivotAiFilter, type PivotAiOptions, type PivotAiSort, type PivotAiState, type PivotAiTotals, type PivotAiValue, type PivotArea, type PivotCell, PivotCellAggregator, type PivotCellTemplate, type PivotCellTextAccessor, type PivotCellValueAccessor, type PivotChartChange, type PivotChartChangedEvent, type PivotChartClosedEvent, type PivotChartOpenedEvent, type PivotChartReportPart, type PivotChartState, type PivotChartWindowState, type PivotColumnWidthDefaults, type PivotConditionRule, PivotController, type PivotControllerCallbacks, type PivotControllerEvents, type PivotControllerOptions, type PivotControllerState, type PivotDataSource, type PivotDensity, type PivotDictionary, type PivotDragIntentState, PivotEngineRegistry, type PivotEngineResult, PivotEngineService, type PivotEngineServiceConfig, PivotEventEmitter, type PivotEventHandler, type PivotEventMap, PivotExportService, type PivotField, PivotFieldService, type PivotGridRef, type PivotGroupInterval, type PivotLabelFilter, type PivotLayoutProfile, type PivotLayoutState, type PivotLocale, type PivotNode, type PivotPlugin, type PivotPrefilter, type PivotReport, PivotReportManager, PivotReportService, type PivotReportState, type PivotRowKey, type PivotRowKeyResolver, type PivotRowSparkline, type PivotRowTransaction, type PivotSelectionMode, PivotSelectionModel, type PivotSelectionRange, type PivotSelectionState, type PivotSelectionStats, type PivotServerCell, type PivotServerField, type PivotServerInput, type PivotServerRequest, type PivotServerResponse, type PivotServerSource, type PivotServerSourceOptions, type PivotServerValue, type PivotStateListener, type PivotStateSession, PivotStateStore, type PivotStateStoringConfig, type PivotSummaryColumn, type PivotSummaryDisplayMode, type PivotSummaryTable, type PivotSummaryTableOptions, type PivotSummaryType, type PivotTheme, type PivotToolbarConfig, type PivotTransactionResult, type PivotValue, type PivotValueFilter, type PopupPlacement, type PopupViewport, type PrefilterConditionSpec, type PrefilterGroupSpec, ROW_HEADER_MAX_PINNED_FRACTION, ROW_HEADER_MIN_COL_WIDTH, ROW_HEADER_MIN_DATA_STRIP, type ReportStatePart, type RowHeaderLayout, SHAPE_CHART_TYPES, type ShapeChartInput, type ShapeChartType, type StackedSegment, type TreemapCell, type TrendShape, type ValueRange, type WaterfallStep, type WorkerComputeRequest, type WorkerFilterRequest, type WorkerFilterSpec, type WorkerInitRequest, type WorkerResponse, type WorkerTransactionRequest, type XYPair, type XYPairInput, applyPivotAiState, ar, attachFloatingFrame, bindPivotScrollMemory, buildCellLookup, buildColPathsList, buildColumnHeaders, buildEngineResult, buildPivotAOA, buildRowLabelCells, calculatedFieldText, cellHash, cellHashCol, cellHashRow, centredFrame, chartCategoryKey, chartKeyText, chartPalette, chartWindowFrame, clearFormatCache, collatorFor, columnSlotOptions, compileSafeFormula, computeFieldRanges, computePivotMatrixAsync, computeRowHeaderWidths, computedFields, conditionRuleToExcelStyle, countFilteredFields, cssColorToRgb, de, defaultPivotLayout, destroyEngineWorker, diffPivotChartState, drillDownText, en, es, escapeXmlText, executePostAggregationPhase, executeSummaryDisplayModesPhase, exportPivotData, extractGroupValue, fieldNeedsRange, fieldValuesInMemory, filterAreaMaxHeight, filterAreaRows, filterEmptySummaryTree, filterPivotEngineAsync, filterRecords, filterRecordsAsync, flattenExportRows, flattenRowTree, flattenRowTreeTabular, flattenRowTreeTree, formatCellValue, formatCellValueCached, formatDimensionValue, formatHeaderValue, fr, funnelMarks, funnelStages, getAdvancedExporter, getCellVal, getFieldDistinctValues, getPivotAiSchema, getPivotAiState, getRecordsForCells, getSummaryTable, getVisibleColLeaves, getVisibleColSlots, getVisibleLeafCount, getVisibleMaxDepth, grandTotalShown, headerFilterShown, headerFilterWrite, heatColor, heatTextColor, heatmapMarks, histogramBins, histogramMarks, initPivotEngineAsync, intlFormatToExcelNumFmt, invertRowHeaderWidth, it, ja, keepFieldGroups, keepFocusAcross, ko, logAxisTicks, mergePersistedState, nextChartWindowId, nextLiveText, pairSeriesForXY, parseColor, pathKey, pathParts, percentAxisTicks, percentModeExcelNumFmt, percentModeText, pivotChangeAnnouncement, pivotDensityClass, pivotLicenseText, pivotRowHeight, pivotRowTrend, pivotSchemeTheme, pivotServerSource, placePopup, popupViewport, pt, rangeBarMarks, rangeRatio, readChartFormat, readFrameRect, readPivotChartState, reconfigurePivotEngineAsync, registerAdvancedExporter, resolveChartPalette, resolveChartStyle, resolveColPath, resolveColumnWidthDefaults, resolveConditionalVisual, rollupInMemory, ru, scaleColor, serverRequestFor, setActiveEngineGrid, shownFields, sortPivotTree, splitPersistedState, squarify, stackSeries, subtotalFor, summaryTypeLabel, sunburstMarks, testSafeFormula, tr, treemapMarks, trendColumnPaths, trendShape, waterfallDomain, waterfallMarks, waterfallSteps, windowStartFor, zhCN };
|
|
4147
|
+
export { type AdvancedExportRequest, type AdvancedExporter, CHART_LEGEND_POSITIONS, CHART_PALETTE_NAMES, CHIP_AUTO_MAX_WIDTH, COLLAPSED_PREFIX, type CalculatedFieldTextKey, type CellClickEvent, type CellPath, type CellPreparedEvent, type ChartCategoryKeyAction, type ChartFont, type ChartFormat, type ChartGridLines, type ChartImageRequest, type ChartKeyTextKey, type ChartLabelAngle, type ChartLegendPosition, type ChartMark, type ChartPaletteName, type ChartStacking, type ChartStyle, type ChartStyleDefaults, type ColHeaderCell, type ColumnSlot, type ColumnSlotOptions, type ConditionalVisual, type CustomSummaryOptions, DEFAULT_DATA_COLUMN_WIDTH, DEFAULT_ROW_HEADER_WIDTH, type DateFormatContext, DateFormatter, type DateGranularity, type DimensionFieldInfo, type DrillDownTextKey, type DropIntent, EXCEL_MAX_COLUMN_WIDTH, EXCEL_MIN_COLUMN_WIDTH, EXCEL_WIDTH_SAMPLE_ROWS, ExcelWidthTracker, type ExportFormat, type ExportOptions, ExportStreamController, type ExportingEvent, FILTER_AREA_PADDING, FILTER_AREA_ROW_GAP, FastTrie, type FieldDistinctEntry, type FieldMoveEvent, type FilterCondition, type FilterGroup, type FilterOperator, type FlatCellMatrix, FlatPivotEngine, type FlatRow, type FloatingFrame, type FrameRect, type FrameSize, type FunnelStage, type HeaderFilterOption, type HeaderFilterState, type HeaderFilterWrite, type HistogramBin, type LargeExportInfo, MAX_C, type MarkTone, PIVOT_AI_FEATURES, PIVOT_LICENSE_TEXT, PIVOT_STATE_VERSION, type PersistedPivotFilters, type PersistedPivotState, type PivotAiApplyResult, type PivotAiCondition, type PivotAiFeature, type PivotAiFieldOptions, type PivotAiFilter, type PivotAiOptions, type PivotAiSort, type PivotAiState, type PivotAiTotals, type PivotAiValue, type PivotArea, type PivotCell, PivotCellAggregator, type PivotCellTemplate, type PivotCellTextAccessor, type PivotCellValueAccessor, type PivotChartChange, type PivotChartChangedEvent, type PivotChartClosedEvent, type PivotChartOpenedEvent, type PivotChartReportPart, type PivotChartState, type PivotChartWindowState, type PivotChipView, type PivotColumnWidthDefaults, type PivotConditionRule, PivotController, type PivotControllerCallbacks, type PivotControllerEvents, type PivotControllerOptions, type PivotControllerState, type PivotDataSource, type PivotDensity, type PivotDictionary, type PivotDragIntentState, PivotEngineRegistry, type PivotEngineResult, PivotEngineService, type PivotEngineServiceConfig, PivotEventEmitter, type PivotEventHandler, type PivotEventMap, PivotExportService, type PivotField, PivotFieldService, type PivotGridRef, type PivotGroupInterval, type PivotLabelFilter, type PivotLayoutProfile, type PivotLayoutState, type PivotLocale, type PivotNode, type PivotPlugin, type PivotPrefilter, type PivotReport, PivotReportManager, PivotReportService, type PivotReportState, type PivotRowKey, type PivotRowKeyResolver, type PivotRowSparkline, type PivotRowTransaction, type PivotSelectionMode, PivotSelectionModel, type PivotSelectionRange, type PivotSelectionState, type PivotSelectionStats, type PivotServerCell, type PivotServerField, type PivotServerInput, type PivotServerRequest, type PivotServerResponse, type PivotServerSource, type PivotServerSourceOptions, type PivotServerValue, type PivotStateListener, type PivotStateSession, PivotStateStore, type PivotStateStoringConfig, type PivotSummaryColumn, type PivotSummaryDisplayMode, type PivotSummaryTable, type PivotSummaryTableOptions, type PivotSummaryType, type PivotTheme, type PivotToolbarConfig, type PivotTransactionResult, type PivotValue, type PivotValueFilter, type PopupPlacement, type PopupViewport, type PrefilterConditionSpec, type PrefilterGroupSpec, ROW_HEADER_MAX_PINNED_FRACTION, ROW_HEADER_MIN_COL_WIDTH, ROW_HEADER_MIN_DATA_STRIP, type ReportStatePart, type RowHeaderLayout, SHAPE_CHART_TYPES, SHORT_PIVOT_HEIGHT, type ShapeChartInput, type ShapeChartType, type StackedSegment, type TreemapCell, type TrendShape, type ValueRange, type WaterfallStep, type WorkerComputeRequest, type WorkerFilterRequest, type WorkerFilterSpec, type WorkerInitRequest, type WorkerResponse, type WorkerTransactionRequest, type XYPair, type XYPairInput, applyPivotAiState, ar, attachFloatingFrame, bindPivotScrollMemory, buildCellLookup, buildColPathsList, buildColumnHeaders, buildEngineResult, buildPivotAOA, buildRowLabelCells, calculatedFieldText, cellHash, cellHashCol, cellHashRow, centredFrame, chartCategoryKey, chartKeyText, chartPalette, chartWindowFrame, clearFormatCache, collapsedKey, collapsedKeyPath, collatorFor, columnSlotOptions, compileSafeFormula, computeFieldRanges, computePivotMatrixAsync, computeRowHeaderWidths, computedFields, conditionRuleToExcelStyle, countFilteredFields, cssColorToRgb, cssZoomOf, de, defaultPivotLayout, destroyEngineWorker, diffPivotChartState, drillDownText, en, es, escapeXmlText, excelTextLength, excelValueLength, executePostAggregationPhase, executeSummaryDisplayModesPhase, exportPivotData, extractGroupValue, fieldNeedsRange, fieldValuesInMemory, filterAreaMaxHeight, filterAreaRows, filterEmptySummaryTree, filterPivotEngineAsync, filterRecords, filterRecordsAsync, flattenExportRows, flattenRowTree, flattenRowTreeTabular, flattenRowTreeTree, formatCellValue, formatCellValueCached, formatDimensionValue, formatHeaderValue, fr, funnelMarks, funnelStages, getAdvancedExporter, getCellVal, getFieldDistinctValues, getPivotAiSchema, getPivotAiState, getRecordsForCells, getSummaryTable, getVisibleColLeaves, getVisibleColSlots, getVisibleLeafCount, getVisibleMaxDepth, grandTotalHeaderShown, grandTotalShown, headerFilterShown, headerFilterWrite, heatColor, heatTextColor, heatmapMarks, histogramBins, histogramMarks, initPivotEngineAsync, intlFormatToExcelNumFmt, invertRowHeaderWidth, isCollapsedKey, isKeyExpanded, it, ja, keepFieldGroups, keepFocusAcross, ko, logAxisTicks, measureFitWidth, mergePersistedState, nextChartWindowId, nextLiveText, paintedFontWeight, pairSeriesForXY, parseColor, pathKey, pathParts, percentAxisTicks, percentModeExcelNumFmt, percentModeText, pivotChangeAnnouncement, pivotChipView, pivotDensityClass, pivotLicenseText, pivotRowHeight, pivotRowTrend, pivotSchemeTheme, pivotServerSource, placePopup, popupViewport, pt, rangeBarMarks, rangeRatio, readChartFormat, readFrameRect, readPivotChartState, reconfigurePivotEngineAsync, registerAdvancedExporter, resizeLineX, resolveChartPalette, resolveChartStyle, resolveColPath, resolveColumnWidthDefaults, resolveConditionalVisual, rollupInMemory, rowHeaderGroupEnd, rowHeadersUnpinned, ru, scaleColor, serverRequestFor, setActiveEngineGrid, setKeysIn, shownFields, sortPivotTree, splitPersistedState, squarify, stackSeries, subtotalFor, summaryTypeLabel, sunburstMarks, testSafeFormula, toCssPixels, toggleKeyIn, tr, treemapMarks, trendColumnPaths, trendShape, watchShortPivot, waterfallDomain, waterfallMarks, waterfallSteps, windowStartFor, withoutCollapsed, zhCN };
|