@kanunilabs/pivotgrid-core 1.7.2 → 1.8.0

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.d.cts CHANGED
@@ -61,6 +61,9 @@ interface PivotDictionary {
61
61
  columnFilter: string;
62
62
  percentOfColumnTotal: string;
63
63
  percentOfRowTotal: string;
64
+ /** Display modes with the same names (share of the parent group on that axis). */
65
+ percentOfParentRowTotal: string;
66
+ percentOfParentColumnTotal: string;
64
67
  percentDifference: string;
65
68
  filterField: string;
66
69
  removeFromArea: string;
@@ -96,18 +99,14 @@ interface PivotDictionary {
96
99
  year: string;
97
100
  quarter: string;
98
101
  month: string;
102
+ /** The ISO week date grouping (`groupInterval: 'week'`). */
103
+ week: string;
99
104
  day: string;
100
105
  and: string;
101
106
  or: string;
102
107
  noConditionsAdded: string;
103
108
  calculatedMeasureDesigner: string;
104
- createFormulasWithoutCode: string;
105
- measureName: string;
106
109
  format: string;
107
- numericStandard: string;
108
- numericDecimal: string;
109
- currencyTRY: string;
110
- currencyUSD: string;
111
110
  percent: string;
112
111
  expand: string;
113
112
  collapse: string;
@@ -147,6 +146,11 @@ interface PivotDictionary {
147
146
  opEndsWith: string;
148
147
  opIsBlank: string;
149
148
  opIsNotBlank: string;
149
+ /** Value filter `between` / `notBetween` (G-PIV-03); `opBetween` is the DataGrid's own string. */
150
+ opBetween: string;
151
+ opNotBetween: string;
152
+ /** The field menu item and dialog title for value / label filters (G-PIV-03). */
153
+ conditionFilter: string;
150
154
  /** Prefilter builder chrome (#210) — shared with DataGrid. */
151
155
  builderCombine: string;
152
156
  builderAddCondition: string;
@@ -155,24 +159,8 @@ interface PivotDictionary {
155
159
  builderRemoveCondition: string;
156
160
  builderEmpty: string;
157
161
  builderValuePlaceholder: string;
158
- /** Drill-down modal (#212); the pager/CSV five are shared with DataGrid. */
159
- exportCsv: string;
160
- pagerPage: string;
161
- pagerOf: string;
162
- pagerPrevious: string;
163
- pagerNext: string;
164
- drillDown: string;
165
- /** `Label: {count}` — no plural engine, so no locale is ever ungrammatical. */
166
- drillDownRecords: string;
167
162
  /** PDF export header (#215). */
168
163
  exportGeneratedOn: string;
169
- /** Designer level tiles and live formula verdict (#220). */
170
- calcRowLevelHint: string;
171
- calcSummaryLevelHint: string;
172
- formulaValid: string;
173
- calcFieldsHint: string;
174
- /** `Uses: {fields}` — the captions the formula references. */
175
- formulaUses: string;
176
164
  showFieldList: string;
177
165
  /**
178
166
  * License watermark reasons (1.3.0) — the badge shows the product name and
@@ -335,6 +323,23 @@ declare function stackSeries(series: ReadonlyArray<ArrayLike<number>>, mode: Exc
335
323
 
336
324
  /** Where the legend sits around the plot, or `'none'` to hide it. */
337
325
  type ChartLegendPosition = 'top' | 'bottom' | 'left' | 'right' | 'none';
326
+ /**
327
+ * The chart's text — tick labels, axis titles, data labels, the legend. Every
328
+ * field left out keeps what the theme draws (rival analysis §E.3 #46).
329
+ */
330
+ interface ChartFont {
331
+ family?: string;
332
+ /** Tick-label size in px (6–32); titles draw one larger, data labels one smaller. */
333
+ size?: number;
334
+ /** Any CSS colour. */
335
+ color?: string;
336
+ bold?: boolean;
337
+ italic?: boolean;
338
+ }
339
+ /** Category-axis label angle: the chart's own rule, or a fixed one. */
340
+ type ChartLabelAngle = 'auto' | 0 | 45 | 90;
341
+ /** Grid lines behind the plot: one per value tick, plus one per category, or none. */
342
+ type ChartGridLines = 'value' | 'both' | 'none';
338
343
  interface ChartFormat {
339
344
  /** Shown above the chart, and written into an exported image. */
340
345
  title?: string;
@@ -353,7 +358,32 @@ interface ChartFormat {
353
358
  * left out. It does not apply to a stacked layout, whose segments add up.
354
359
  */
355
360
  valueScale?: 'linear' | 'log';
361
+ /** Text styling (§E.3 #46). */
362
+ font?: ChartFont;
363
+ /** Category labels: `'auto'` (default — the chart's own slant) or 0, 45, 90 degrees (§E.3 #40). */
364
+ labelAngle?: ChartLabelAngle;
365
+ /** Default `'value'`. */
366
+ gridLines?: ChartGridLines;
367
+ /** Dashed grid lines (the default); `false` draws them solid. */
368
+ gridDashed?: boolean;
369
+ /** Series line width in px, 1–6 (default 2) — lines, area outlines, radar (§E.3 #41). */
370
+ lineWidth?: number;
371
+ /** Dashed series lines. Default `false`. */
372
+ lineDashed?: boolean;
373
+ /** Opacity of area, radar and bubble fills, 0.05–1. Default: the chart's own. */
374
+ fillOpacity?: number;
375
+ /**
376
+ * How a date axis grouped by calendar prints its categories (rival analysis,
377
+ * charts §E.1 #21): a preset, written in the reader's language by the
378
+ * browser. Absent: the grouping's own labels ("2026-03", "2026-Q1").
379
+ */
380
+ dateFormat?: ChartDateFormat;
356
381
  }
382
+ /**
383
+ * The date presets an axis offers. Each is an `Intl.DateTimeFormat` shape, so
384
+ * month and day names come out in the chart's locale with nothing to translate.
385
+ */
386
+ type ChartDateFormat = 'iso' | 'numeric' | 'dayMonth' | 'dayMonthYear' | 'long' | 'weekday' | 'month' | 'monthYear' | 'monthYearLong' | 'monthNumeric' | 'year';
357
387
  /**
358
388
  * Value-axis ticks for a log scale: every power of ten from just below `min`
359
389
  * to just above `max` (both > 0). With fewer than two decades the 2 and 5
@@ -600,12 +630,177 @@ interface SunburstInput {
600
630
  * what is that made". Zero, negative and missing leaves take no angle.
601
631
  */
602
632
  declare function sunburstMarks(input: SunburstInput): ChartMark[];
633
+ /** One bar of a histogram: the values from `from` up to (not including) `to` — the last bar includes `to`. */
634
+ interface HistogramBin {
635
+ from: number;
636
+ to: number;
637
+ count: number;
638
+ }
639
+ /**
640
+ * `values` counted into bins of one round width — 1, 2 or 5 × 10ⁿ, the width
641
+ * that gives about `binCount` bins — so the edges read as 0, 500, 1,000
642
+ * rather than 0, 473.2, 946.4. The bins start at the multiple of that width at
643
+ * or below the smallest value; the last one closes on the largest. Values
644
+ * that are not finite numbers (blanks) are left out. Every value equal: one bin.
645
+ */
646
+ declare function histogramBins(values: ArrayLike<number>, binCount?: number): HistogramBin[];
647
+ /**
648
+ * The first series as a histogram — how many categories fall in each band of
649
+ * its values ("how many products sold between 1,000 and 2,000"). Bars touch,
650
+ * as bands of one axis do; the edges are labelled under the axis, every other
651
+ * one when they would crowd; each bar's tooltip says its band and count.
652
+ * The bars carry no category: one bar is many categories, so it neither
653
+ * cross-filters nor takes the keyboard's category focus.
654
+ */
655
+ declare function histogramMarks(input: ShapeChartInput & {
656
+ binCount?: number;
657
+ countLabel?: string;
658
+ }): ChartMark[];
603
659
  /** The chart types laid out here. */
604
- declare const SHAPE_CHART_TYPES: readonly ["waterfall", "funnel", "treemap", "heatmap", "rangeBar", "sunburst"];
660
+ declare const SHAPE_CHART_TYPES: readonly ["waterfall", "funnel", "treemap", "heatmap", "rangeBar", "sunburst", "histogram"];
605
661
  type ShapeChartType = (typeof SHAPE_CHART_TYPES)[number];
606
662
 
663
+ interface ChartStyleDefaults {
664
+ /** Tick-label size, px. */
665
+ tick: number;
666
+ /** Data-label size, px. */
667
+ label: number;
668
+ /** Axis-title size, px. */
669
+ title: number;
670
+ /** The renderer's own category-label slant, in degrees (negative = up to the right). */
671
+ angle: number;
672
+ /** Area fill opacity, unstacked / stacked. */
673
+ fill: number;
674
+ stackedFill: number;
675
+ }
676
+ interface ChartStyle {
677
+ tickSize: number;
678
+ labelSize: number;
679
+ titleSize: number;
680
+ /** Undefined: the theme's. */
681
+ fontFamily: string | undefined;
682
+ /** Undefined: the theme's colour for that text. */
683
+ textColor: string | undefined;
684
+ fontWeight: 'bold' | undefined;
685
+ fontStyle: 'italic' | undefined;
686
+ /** Category-label rotation in degrees, as SVG `rotate()` takes it (0 = flat). */
687
+ labelAngle: number;
688
+ /** Grid lines at the value ticks / at the categories. */
689
+ valueGrid: boolean;
690
+ categoryGrid: boolean;
691
+ /** `stroke-dasharray` for grid lines; undefined = solid. */
692
+ gridDash: string | undefined;
693
+ lineWidth: number;
694
+ /** `stroke-dasharray` for series lines; undefined = solid. */
695
+ lineDash: string | undefined;
696
+ /** Fill opacity for an area (stacked or not). */
697
+ areaOpacity(stacked: boolean): number;
698
+ /** Fill opacity for a mark whose renderer default is `base` (radar, bubble). */
699
+ fillOpacity(base: number): number;
700
+ }
701
+ declare function resolveChartStyle(format: ChartFormat | undefined, defaults: ChartStyleDefaults): ChartStyle;
702
+
703
+ interface FrameRect {
704
+ x: number;
705
+ y: number;
706
+ width: number;
707
+ height: number;
708
+ }
709
+ interface FrameSize {
710
+ width: number;
711
+ height: number;
712
+ }
713
+ /** Where a window first appears: the preferred size, centred in the container. */
714
+ declare function centredFrame(bounds: FrameSize, preferred: FrameSize, min?: FrameSize): FrameRect;
715
+ /** A saved rectangle, read defensively (it came from storage, not from us). */
716
+ declare function readFrameRect(value: unknown): FrameRect | null;
717
+ interface FloatingFrameOptions {
718
+ /** The window element. Positioned absolutely inside the container. */
719
+ frame: HTMLElement;
720
+ /**
721
+ * Pressing here moves the window — its title bar. Controls inside it
722
+ * (buttons, fields, labels) keep their own clicks; only the bar itself and
723
+ * the move grip start a move.
724
+ */
725
+ dragHandle: HTMLElement;
726
+ /** A focusable grip INSIDE `dragHandle`: pointer drags move the window, arrow keys too. */
727
+ moveGrip?: HTMLElement;
728
+ /** The bottom-right grip: pointer drags and arrow keys resize. */
729
+ resizeGrip: HTMLElement;
730
+ /** The container's size now. */
731
+ bounds(): FrameSize;
732
+ min?: FrameSize;
733
+ /** Every step of a gesture, after the frame's style was updated. */
734
+ onMove?(rect: FrameRect): void;
735
+ /** Once per finished gesture: pointer released, or one arrow-key step. */
736
+ onCommit?(rect: FrameRect): void;
737
+ /**
738
+ * The stacking layer windows start above: higher than everything the grid
739
+ * itself stacks (sticky headers, overlays), lower than its popups and its
740
+ * fullscreen. Default 20 (the DataGrid's layers stop there); the PivotGrid's
741
+ * sticky headers go to 61 and its status layer to 70, so it passes 80 —
742
+ * at 21 a PivotGrid window slid UNDER the column header, which then took
743
+ * the clicks meant for the window's toolbar.
744
+ */
745
+ layer?: number;
746
+ }
747
+ interface FloatingFrame {
748
+ get(): FrameRect;
749
+ /** Place the window (kept inside the container). Reports nothing. */
750
+ set(rect: FrameRect): void;
751
+ /**
752
+ * Pull the window back inside a container that changed size. Reports a
753
+ * commit when the window had to move or shrink.
754
+ */
755
+ refit(): void;
756
+ dispose(): void;
757
+ }
758
+ declare function attachFloatingFrame(initial: FrameRect, options: FloatingFrameOptions): FloatingFrame;
759
+
760
+ /** `chart-2`, `chart-3`… — the first not in `taken` (the panel itself is chart 1). */
761
+ declare function nextChartWindowId(taken: ReadonlySet<string>): string;
762
+ /**
763
+ * Where a new chart window opens: a step down and to the right of the window
764
+ * it was copied from (`anchor`), or centred over the grid when it came from the
765
+ * docked panel — never exactly on top, where it would look as if nothing
766
+ * happened. The step grows with the windows already open (and wraps), so a
767
+ * row of copies fans out instead of stacking. The frame keeps it in the grid.
768
+ */
769
+ declare function chartWindowFrame(grid: FrameSize, anchor: FrameRect | null, openCount: number): FrameRect;
770
+
771
+ type ChartCategoryKeyAction =
772
+ /** Move the focus to this category (by its index in the chart's model). */
773
+ {
774
+ kind: 'focus';
775
+ index: number;
776
+ }
777
+ /** Do what a click on this category does. */
778
+ | {
779
+ kind: 'pick';
780
+ index: number;
781
+ additive: boolean;
782
+ };
783
+ /**
784
+ * What a key does to the focused category, or null when the key is not the
785
+ * chart's (leave it to the browser). `focus` is null before the first move;
786
+ * the first arrow, Home/End, Enter or Space then lands on a category instead
787
+ * of acting on nothing. Up/Down step too, for a horizontal bar chart.
788
+ */
789
+ declare function chartCategoryKey(event: {
790
+ key: string;
791
+ ctrlKey?: boolean;
792
+ metaKey?: boolean;
793
+ altKey?: boolean;
794
+ }, focus: number | null, total: number): ChartCategoryKeyAction | null;
795
+ /**
796
+ * The window start that keeps `index` in view, for a zoomed chart showing
797
+ * `count` of `total` categories from `start` — the focus walks off the edge
798
+ * and the view follows it, one category at a time.
799
+ */
800
+ declare function windowStartFor(index: number, start: number, count: number, total: number): number;
801
+
607
802
  type DateFormatContext = 'grid' | 'chart' | 'export';
608
- type DateGranularity = 'year' | 'quarter' | 'month' | 'day' | 'dayOfWeek' | string | number;
803
+ type DateGranularity = 'year' | 'quarter' | 'month' | 'week' | 'day' | 'dayOfWeek' | string | number;
609
804
  declare class DateFormatter {
610
805
  private static intlCache;
611
806
  private static stringCache;
@@ -986,7 +1181,15 @@ interface FieldDistinctEntry {
986
1181
  rawStr: string;
987
1182
  rawVal: PivotValue;
988
1183
  }
989
- /** Set the active grid context for subsequent init/compute calls. */
1184
+ /**
1185
+ * Set the grid the engine entry points use when they are not given one.
1186
+ *
1187
+ * Read only at a call's START: every entry point takes the grid as a
1188
+ * parameter that defaults to this, and keeps it across its own `await`s.
1189
+ * Reading the global again after an `await` read whichever grid had run in
1190
+ * the meantime — on a page with several PivotGrids one then drove another's
1191
+ * worker (engineGridIsolation.test.ts). Callers that know their grid pass it.
1192
+ */
990
1193
  declare function setActiveEngineGrid(gridId: string): void;
991
1194
  /**
992
1195
  * Release a grid's worker when the grid unmounts. Termination is deferred by
@@ -1015,6 +1218,8 @@ declare function initPivotEngineAsync<TRow>(data: TRow[], rowFields: PivotField<
1015
1218
  * follow-up filter request.
1016
1219
  */
1017
1220
  filterState?: InitFilterState;
1221
+ /** The grid this init is for; defaults to the active grid at the call. */
1222
+ gridId?: string;
1018
1223
  }): Promise<{
1019
1224
  filtersApplied: boolean;
1020
1225
  }>;
@@ -1034,13 +1239,13 @@ declare function reconfigurePivotEngineAsync<TRow>(data: TRow[], rowFields: Pivo
1034
1239
  prefilterState?: {
1035
1240
  fields: PivotField<TRow>[];
1036
1241
  prefilter?: PivotPrefilter;
1037
- }): Promise<boolean>;
1242
+ }, gridId?: string): Promise<boolean>;
1038
1243
  /**
1039
1244
  * Send filter specs to the worker. Converts field.filterValues to
1040
1245
  * dictionary-encoded integer IDs so the worker can do fast integer
1041
1246
  * set lookups on columnar data instead of string comparisons.
1042
1247
  */
1043
- declare function filterPivotEngineAsync(fields: PivotField<any>[], prefilter?: PivotPrefilter): Promise<void>;
1248
+ declare function filterPivotEngineAsync(fields: PivotField<any>[], prefilter?: PivotPrefilter, gridId?: string): Promise<void>;
1044
1249
  /**
1045
1250
  * Live update (G-PIV-02): a resolved transaction, in positions of the array
1046
1251
  * the engine holds. See controller/rowTransaction.ts.
@@ -1052,7 +1257,7 @@ interface EngineRowChange<TRow> {
1052
1257
  removeIndex: number[];
1053
1258
  addRows: TRow[];
1054
1259
  }
1055
- declare function computePivotMatrixAsync(expandedPaths: string[], expandedColPaths: string[]): Promise<PivotEngineResult>;
1260
+ declare function computePivotMatrixAsync(expandedPaths: string[], expandedColPaths: string[], gridId?: string): Promise<PivotEngineResult>;
1056
1261
  /**
1057
1262
  * Cached distinct values for a header filter.
1058
1263
  *
@@ -1450,14 +1655,26 @@ interface PivotTransactionResult {
1450
1655
  type PivotArea = 'row' | 'column' | 'data' | 'filter' | 'chooser';
1451
1656
  /** Aggregation function applied to data fields in worker pre-aggregation. */
1452
1657
  type PivotSummaryType = 'sum' | 'count' | 'avg' | 'min' | 'max' | 'distinct' | 'custom';
1453
- /** Post-aggregation display transformation applied after cell values are computed. */
1454
- type PivotSummaryDisplayMode = 'absolute' | 'percentOfTotal' | 'percentOfColumnTotal' | 'percentOfRowTotal' | 'runningTotal' | 'difference' | 'percentDifference';
1455
1658
  /**
1456
- * Date grouping interval. `'numeric'` and `'custom'` are accepted for
1457
- * compatibility and have no effect (the grid reports them): numeric bins are
1458
- * set with a number on {@link PivotField.groupInterval}.
1659
+ * Post-aggregation display transformation applied after cell values are computed.
1660
+ *
1661
+ * - `percentOfRowTotal` / `percentOfColumnTotal`: the cell's share of its row's
1662
+ * (or column's) GRAND total.
1663
+ * - `percentOfParentRowTotal`: the share of the parent row group in the same
1664
+ * column — Berlin of Germany. A top-level row's parent is the grand total
1665
+ * row; the grand total row is 100%.
1666
+ * - `percentOfParentColumnTotal`: the same on the column axis, in the same row.
1667
+ *
1668
+ * A zero or missing divisor shows 0.
1669
+ */
1670
+ type PivotSummaryDisplayMode = 'absolute' | 'percentOfTotal' | 'percentOfColumnTotal' | 'percentOfRowTotal' | 'percentOfParentRowTotal' | 'percentOfParentColumnTotal' | 'runningTotal' | 'difference' | 'percentDifference';
1671
+ /**
1672
+ * Date grouping interval. `'week'` is the ISO 8601 week, labelled with its
1673
+ * week-year (`"2026-W53"`; weeks start on Monday). `'numeric'` and `'custom'`
1674
+ * are accepted for compatibility and have no effect (the grid reports them):
1675
+ * numeric bins are set with a number on {@link PivotField.groupInterval}.
1459
1676
  */
1460
- type PivotGroupInterval = 'year' | 'quarter' | 'month' | 'day' | 'numeric' | 'custom';
1677
+ type PivotGroupInterval = 'year' | 'quarter' | 'month' | 'week' | 'day' | 'numeric' | 'custom';
1461
1678
  /** Supported UI locale identifiers. */
1462
1679
  type PivotLocale = 'tr' | 'en' | 'ar' | 'de' | 'fr' | 'es' | 'it' | 'pt' | 'ru' | 'zh-CN' | 'ja' | 'ko';
1463
1680
  /** Union of all value types a pivot cell, node, or filter can hold. */
@@ -1575,9 +1792,11 @@ interface PivotField<TRow = any, TCellTemplate = PivotCellTemplate, TStyle = any
1575
1792
  /** Custom cell render function. */
1576
1793
  cellTemplate?: TCellTemplate;
1577
1794
  /**
1578
- * Grouping interval: `'year' | 'quarter' | 'month' | 'day'` for a date
1579
- * field, or a bin width as a number for a number field (`100` → 0–99,
1580
- * 100–199, …). `'numeric'` and `'custom'` have no effect.
1795
+ * Grouping interval: `'year' | 'quarter' | 'month' | 'week' | 'day'` for a
1796
+ * date field, or a bin width as a number for a number field (`100` → 0–99,
1797
+ * 100–199, …). `'week'` is the ISO 8601 week, Monday first, keyed by its
1798
+ * week-year: 2027-01-01 groups under `"2026-W53"`. Dates are read as local
1799
+ * calendar dates. `'numeric'` and `'custom'` have no effect.
1581
1800
  */
1582
1801
  groupInterval?: PivotGroupInterval | number;
1583
1802
  /** Active filter values for header filter (include/exclude mode). */
@@ -1598,6 +1817,36 @@ interface PivotField<TRow = any, TCellTemplate = PivotCellTemplate, TStyle = any
1598
1817
  topNShowOthers?: boolean;
1599
1818
  /** Custom caption for the "Others" row when topN is active. */
1600
1819
  topNOthersCaption?: string;
1820
+ /**
1821
+ * Keep only the members of this row or column field whose TOTAL for a data
1822
+ * field passes a condition — "regions selling over 1 million". Applied per
1823
+ * level after the sort and before `topN`; the totals keep counting every
1824
+ * member, as with `topN`. Tests the summary value, before any
1825
+ * `summaryDisplayMode`.
1826
+ */
1827
+ valueFilter?: PivotValueFilter;
1828
+ /**
1829
+ * Keep only the members whose CAPTION passes a condition — "cities starting
1830
+ * with A". Compares the member's value as text, case-insensitively unless
1831
+ * `caseSensitive`; a blank member reads as empty text.
1832
+ */
1833
+ labelFilter?: PivotLabelFilter;
1834
+ }
1835
+ /** A condition on a member's total — `PivotField.valueFilter`. */
1836
+ interface PivotValueFilter {
1837
+ /** The id of the data field whose total is tested. */
1838
+ dataField: string;
1839
+ operator: '>' | '>=' | '<' | '<=' | '=' | '!=' | 'between' | 'notBetween';
1840
+ value: number;
1841
+ /** The other bound, for `between` and `notBetween` (inclusive, either order). */
1842
+ value2?: number;
1843
+ }
1844
+ /** A condition on a member's caption — `PivotField.labelFilter`. */
1845
+ interface PivotLabelFilter {
1846
+ operator: 'equals' | 'notEquals' | 'contains' | 'notContains' | 'startsWith' | 'endsWith';
1847
+ value: string;
1848
+ /** Default false: "an" matches "Ankara". Lowercased in the grid's locale, so Turkish İ matches i. */
1849
+ caseSensitive?: boolean;
1601
1850
  }
1602
1851
  /** Controls pivot grid layout, totals visibility, and structural options. */
1603
1852
  interface PivotLayoutState {
@@ -1859,6 +2108,8 @@ interface PivotControllerOptions<TRow = any> extends PivotControllerCallbacks<TR
1859
2108
  * that is in `data` (mutated in place) and a remove cannot name a bare key.
1860
2109
  */
1861
2110
  rowKey?: PivotRowKeyResolver<TRow>;
2111
+ /** How long `applyTransactionAsync` collects transactions before applying them together. Default 50 ms. */
2112
+ asyncTransactionWait?: number;
1862
2113
  }
1863
2114
  /**
1864
2115
  * Starting widths, in pixels, for every column of a kind — the renderer's
@@ -1967,19 +2218,52 @@ interface PivotChartState {
1967
2218
  format: ChartFormat;
1968
2219
  /** Series switched off in the legend, by series key (a chart series' `dataKey`). */
1969
2220
  hiddenSeries: string[];
2221
+ /**
2222
+ * Where the panel is: floating over the grid at this rectangle (px, relative
2223
+ * to the grid), or docked when absent — absent rather than `null`, so a
2224
+ * docked panel's state reads as it did before windows existed (rival
2225
+ * analysis, charts §E.1 #9). Read by the Enterprise panel, which owns it.
2226
+ */
2227
+ floating?: FrameRect | null;
2228
+ /** Categories and series swapped (§E.1 #13); absent when not. Read by the Enterprise panel. */
2229
+ switched?: boolean;
2230
+ /** Unlinked from the pivot (§E.1 #8): the chart keeps its data. Absent while linked. */
2231
+ unlinked?: boolean;
2232
+ /** About how many bars a histogram cuts its values into (§E.1 #18); absent means 10. Read by the Enterprise panel. */
2233
+ bins?: number;
1970
2234
  }
1971
2235
  /** Which part of the state a `chartChanged` event moved. */
1972
- type PivotChartChange = 'type' | 'stacking' | 'format' | 'hiddenSeries';
2236
+ type PivotChartChange = 'type' | 'stacking' | 'format' | 'hiddenSeries'
2237
+ /** Docked or floating, or the floating window moved or resized. */
2238
+ | 'placement'
2239
+ /** Categories and series swapped, or back. */
2240
+ | 'switched'
2241
+ /** Unlinked from the pivot, or linked again. */
2242
+ | 'linked'
2243
+ /** A histogram's bin count. */
2244
+ | 'bins';
1973
2245
  interface PivotChartOpenedEvent {
1974
2246
  state: PivotChartState;
2247
+ /** An extra chart window's id (`'chart-2'`…, §E.1 #10); absent for the grid's own panel. */
2248
+ chartId?: string;
1975
2249
  }
1976
2250
  interface PivotChartChangedEvent {
1977
2251
  state: PivotChartState;
1978
2252
  changes: PivotChartChange[];
2253
+ chartId?: string;
1979
2254
  }
1980
2255
  interface PivotChartClosedEvent {
1981
2256
  state: PivotChartState;
2257
+ chartId?: string;
1982
2258
  }
2259
+ /** A window as a saved report keeps it: its state, with its id. */
2260
+ type PivotChartWindowState = PivotChartState & {
2261
+ id: string;
2262
+ };
2263
+ /** The chart's part of a saved report: the panel's state and its extra windows. */
2264
+ type PivotChartReportPart = PivotChartState & {
2265
+ windows?: PivotChartWindowState[];
2266
+ };
1983
2267
  /**
1984
2268
  * Read a saved chart state defensively — it came from storage, a report or an
1985
2269
  * older build. Fields of the wrong kind fall back to their defaults; `null`
@@ -2035,6 +2319,12 @@ declare class PivotStateStore<TRow> {
2035
2319
  setImportPreview(importPreview: PivotControllerState<TRow>['importPreview']): void;
2036
2320
  private createInitialSnapshot;
2037
2321
  private schedulePersist;
2322
+ /**
2323
+ * Write a pending save NOW. The controller calls it on dispose: the write
2324
+ * waits for an idle moment (up to a second), so a change made just before
2325
+ * the grid went away — a route change in a single-page app — was lost.
2326
+ */
2327
+ flush(): void;
2038
2328
  private persist;
2039
2329
  }
2040
2330
 
@@ -2086,6 +2376,7 @@ declare class PivotController<TRow> {
2086
2376
  private readonly reportParts;
2087
2377
  private pendingReportParts;
2088
2378
  private readonly chartReporter;
2379
+ private readonly windowReporters;
2089
2380
  private options;
2090
2381
  private reportService;
2091
2382
  private engineService;
@@ -2094,6 +2385,10 @@ declare class PivotController<TRow> {
2094
2385
  /** Full row set of a parsed import awaiting preview commit (kept out of observable state). */
2095
2386
  private pendingImportRows;
2096
2387
  private disposed;
2388
+ /** `applyTransactionAsync`: the batch waiting for its window, and who to tell. */
2389
+ private asyncQueue;
2390
+ private asyncCallbacks;
2391
+ private asyncTimer;
2097
2392
  /**
2098
2393
  * The array the application last handed in. After a transaction the
2099
2394
  * controller's rows are a NEW array; a binding that re-sends every option
@@ -2112,7 +2407,7 @@ declare class PivotController<TRow> {
2112
2407
  * convenient: the same state twice is one event, and edits while the panel
2113
2408
  * is closed arrive with the next `chartOpened`.
2114
2409
  */
2115
- reportChartState(state: PivotChartState): void;
2410
+ reportChartState(state: PivotChartState, chartId?: string): void;
2116
2411
  /**
2117
2412
  * Keep a piece of state owned outside the core inside saved reports — the
2118
2413
  * Enterprise chart panel keeps its chart this way. Order-independent: the
@@ -2142,6 +2437,22 @@ declare class PivotController<TRow> {
2142
2437
  * the recomputed pivot follows (listen for `engineCompleted`).
2143
2438
  */
2144
2439
  applyTransaction(transaction: PivotRowTransaction<TRow>): PivotTransactionResult;
2440
+ private applyNow;
2441
+ /**
2442
+ * Queue a transaction for a feed that ticks faster than anyone can look.
2443
+ * Every `applyTransaction` scans the rows for the keys it names and sends
2444
+ * the worker a message; a hundred ticks in a moment is a hundred of each for
2445
+ * one picture. Queued ones are merged and applied together after
2446
+ * `asyncTransactionWait` ms (default 50), or at once on
2447
+ * `flushAsyncTransactions()`. The callback runs when its batch has been
2448
+ * applied. A synchronous `applyTransaction` or `setData` applies the queue
2449
+ * first; `dispose` drops it.
2450
+ */
2451
+ applyTransactionAsync(transaction: PivotRowTransaction<TRow>, callback?: () => void): void;
2452
+ /** Apply the queued transactions now, as one. */
2453
+ flushAsyncTransactions(): void;
2454
+ /** How many transactions are waiting to be applied. */
2455
+ getPendingAsyncTransactionCount(): number;
2145
2456
  updateField(updatedField: PivotField<TRow>): void;
2146
2457
  deleteField(fieldId: string): void;
2147
2458
  changeFieldArea(fieldId: string, area: PivotArea): void;
@@ -2587,6 +2898,32 @@ interface DimensionFieldInfo {
2587
2898
  }
2588
2899
  declare function formatDimensionValue(value: unknown, field: DimensionFieldInfo | undefined, context: DateFormatContext, locale: string): string;
2589
2900
 
2901
+ type AnnounceKey = 'sortAsc' | 'sortDesc' | 'clearSort' | 'columnFilter';
2902
+ /** The announcement for the first field whose sort or filter changed; null when none did. */
2903
+ declare function pivotChangeAnnouncement(prev: readonly PivotField<any>[], next: readonly PivotField<any>[], t: (key: AnnounceKey) => string): string | null;
2904
+ /**
2905
+ * Text for a polite live region. An identical message twice in a row is not
2906
+ * re-read by screen readers, so a repeat gets a trailing no-break space.
2907
+ */
2908
+ declare function nextLiveText(current: string, message: string): string;
2909
+
2910
+ /** The text of a percent-mode value whose field has no format; null for every other case. */
2911
+ declare function percentModeText(value: number, field: PivotField<any> | undefined, locale: string): string | null;
2912
+ /** The Excel number format for the same case — the value stays 0-100, so the sign is literal. */
2913
+ declare function percentModeExcelNumFmt(field: PivotField<any> | undefined): string | undefined;
2914
+
2915
+ type CalculatedFieldTextKey = 'createFormulasWithoutCode' | 'measureName' | 'numericStandard' | 'numericDecimal' | 'currencyTRY' | 'currencyUSD' | 'measureNamePlaceholder' | 'customFormat' | 'customPrefix' | 'customSuffix' | 'minFraction' | 'maxFraction' | 'calculationLevel' | 'calcRowLevel' | 'calcSummaryLevel' | 'noFieldsFound' | 'deleteCalcField' | 'formulaPlaceholder' | 'saveAndAdd' | 'measureNameEmpty' | 'formulaEmpty' | 'formulaError' | 'calcRowLevelHint' | 'calcSummaryLevelHint' | 'formulaValid' | 'calcFieldsHint' | 'formulaUses';
2916
+ /** The designer's text for `key` in `locale` (`tr-TR` → `tr`, `zh` → `zh-CN`), or undefined. */
2917
+ declare function calculatedFieldText(locale: string | undefined, key: string): string | undefined;
2918
+
2919
+ type DrillDownTextKey = 'exportCsv' | 'pagerPage' | 'pagerOf' | 'pagerPrevious' | 'pagerNext' | 'drillDown' | 'drillDownRecords';
2920
+ /** The caption for `key` in `locale` (`tr-TR` → `tr`, `zh` → `zh-CN`), or undefined. */
2921
+ declare function drillDownText(locale: string | undefined, key: string): string | undefined;
2922
+
2923
+ type ChartKeyTextKey = 'chartCanvasHintPick' | 'chartCategoryFocus' | 'chartCategoryFiltered';
2924
+ /** The text for `key` in `locale` (`tr-TR` → `tr`, `zh` → `zh-CN`), English when the language is unknown. */
2925
+ declare function chartKeyText(locale: string | undefined, key: ChartKeyTextKey): string;
2926
+
2590
2927
  declare class ExportStreamController {
2591
2928
  private worker;
2592
2929
  private static sharedWorker;
@@ -3015,6 +3352,26 @@ interface PivotAiSort {
3015
3352
  /** Keep only the first N after sorting (needs `byValueField`). */
3016
3353
  top: number | null;
3017
3354
  }
3355
+ /**
3356
+ * A condition on the members of a row or column field (`valueFilter` /
3357
+ * `labelFilter`): by their TOTAL — "regions over 1 million" — or by their
3358
+ * CAPTION — "cities starting with A". Applied after the sort and before `top`.
3359
+ */
3360
+ type PivotAiCondition = {
3361
+ fieldId: string;
3362
+ kind: 'value';
3363
+ /** The measure whose total is tested (one of the values). */
3364
+ dataField: string;
3365
+ operator: PivotValueFilter['operator'];
3366
+ value: number;
3367
+ /** The other bound, for between / notBetween; null otherwise. */
3368
+ value2: number | null;
3369
+ } | {
3370
+ fieldId: string;
3371
+ kind: 'label';
3372
+ operator: PivotLabelFilter['operator'];
3373
+ text: string;
3374
+ };
3018
3375
  interface PivotAiTotals {
3019
3376
  grandTotalRow: boolean;
3020
3377
  grandTotalColumn: boolean;
@@ -3032,6 +3389,8 @@ interface PivotAiState {
3032
3389
  values?: PivotAiValue[];
3033
3390
  /** Every value filter; [] clears them. */
3034
3391
  filters?: PivotAiFilter[];
3392
+ /** Every condition on a field's members by total or caption; [] clears them. */
3393
+ conditions?: PivotAiCondition[];
3035
3394
  /** Every dimension sort; a dimension not listed keeps its data order. */
3036
3395
  sort?: PivotAiSort[];
3037
3396
  totals?: PivotAiTotals;
@@ -3155,4 +3514,4 @@ declare function rollupInMemory<TRow>(rows: readonly TRow[], request: PivotServe
3155
3514
  /** Every value of a field in rows held in memory — the reference `loadFieldValues`. */
3156
3515
  declare function fieldValuesInMemory<TRow>(rows: readonly TRow[], field: PivotServerField): unknown[];
3157
3516
 
3158
- export { type AdvancedExportRequest, type AdvancedExporter, CHART_LEGEND_POSITIONS, type CellClickEvent, type CellPreparedEvent, type CellType, type ChartFormat, type ChartImageRequest, type ChartLegendPosition, type ChartMark, type ChartStacking, type ColHeaderCell, type ColumnSlot, type ColumnSlotOptions, type ConditionalVisual, type CsvParseProgress, CsvReader, type CustomSummaryOptions, DEFAULT_DATA_COLUMN_WIDTH, DEFAULT_ROW_HEADER_WIDTH, DataNormalizer, type DateFormatContext, DateFormatter, type DateGranularity, type DimensionFieldInfo, type DropIntent, type ExportFormat, type ExportOptions, ExportStreamController, type ExportingEvent, FastTrie, type FieldDistinctEntry, type FieldMoveEvent, type FilterCondition, type FilterGroup, type FilterOperator, type FlatCellMatrix, FlatPivotEngine, type FlatRow, type FunnelStage, type IFileReader, type ImportFormat, ImportManager, type ImportManagerOptions, type ImportProgress, type ImportResult, type ImportSnapshot, ImportStreamController, type ImportWorkerKind, type ImportWorkerResult, MAX_C, type MarkTone, PIVOT_AI_FEATURES, type ParseFileOptions, type PivotAiApplyResult, 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 PivotChartState, type PivotColumnWidthDefaults, type PivotConditionRule, PivotController, type PivotControllerCallbacks, type PivotControllerEvents, type PivotControllerOptions, type PivotControllerState, type PivotDataSource, type PivotDictionary, type PivotDragIntentState, PivotEngineRegistry, type PivotEngineResult, PivotEngineService, type PivotEngineServiceConfig, PivotEventEmitter, type PivotEventHandler, type PivotEventMap, PivotExportService, type PivotField, PivotFieldService, type PivotGridRef, type PivotGroupInterval, type PivotImportField, type PivotImportLabels, type PivotImportPreviewState, type PivotImportStatus, 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, PivotStateStore, type PivotStateStoringConfig, type PivotSummaryDisplayMode, type PivotSummaryType, type PivotTheme, type PivotToolbarConfig, type PivotTransactionResult, type PivotValue, type PrefilterConditionSpec, type PrefilterGroupSpec, type ProcessFileStreamingOptions, type ProcessFromUrlOptions, 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 ValidationResult, type ValueRange, type WaterfallStep, type WorkerComputeRequest, type WorkerFilterRequest, type WorkerFilterSpec, type WorkerInitRequest, type WorkerResponse, type WorkerTransactionRequest, type XYPair, type XYPairInput, XmlReader, applyPivotAiState, ar, buildCellLookup, buildColPathsList, buildColumnHeaders, buildEngineResult, buildPivotAOA, buildRowLabelCells, cellHash, cellHashCol, cellHashRow, chartPalette, classifyValue, clearFormatCache, coerceRecords, coerceValue, collatorFor, compileSafeFormula, computeFieldRanges, computePivotMatrixAsync, computeRowHeaderWidths, conditionRuleToExcelStyle, cssColorToRgb, de, dedupeHeaders, defaultPivotLayout, destroyEngineWorker, detectDelimiter, diffPivotChartState, en, es, escapeXmlText, executePostAggregationPhase, executeSummaryDisplayModesPhase, exportPivotData, extractGroupValue, fieldNeedsRange, fieldValuesInMemory, filterEmptySummaryTree, filterPivotEngineAsync, filterRecords, filterRecordsAsync, flattenExportRows, flattenRowTree, flattenRowTreeTabular, flattenRowTreeTree, formatCellValue, formatCellValueCached, formatDimensionValue, formatHeaderValue, fr, funnelMarks, funnelStages, getAdvancedExporter, getCellVal, getFieldDistinctValues, getPivotAiSchema, getPivotAiState, getVisibleColLeaves, getVisibleColSlots, getVisibleLeafCount, getVisibleMaxDepth, heatColor, heatTextColor, heatmapMarks, inferColumnType, initPivotEngineAsync, intlFormatToExcelNumFmt, invertRowHeaderWidth, it, ja, ko, logAxisTicks, pairSeriesForXY, parseBoolean, parseColor, parseCsvToRows, parseDelimited, parseFlexibleDate, parseLocaleNumber, percentAxisTicks, pivotRowTrend, pivotServerSource, pt, rangeBarMarks, rangeRatio, readChartFormat, readPivotChartState, reconfigurePivotEngineAsync, registerAdvancedExporter, resolveColPath, resolveColumnWidthDefaults, resolveConditionalVisual, rollupInMemory, ru, safeKey, sanitizeRows, scaleColor, serverRequestFor, setActiveEngineGrid, sortPivotTree, squarify, stackSeries, stripBom, sunburstMarks, testSafeFormula, tr, treemapMarks, trendColumnPaths, trendShape, waterfallDomain, waterfallMarks, waterfallSteps, zhCN };
3517
+ export { type AdvancedExportRequest, type AdvancedExporter, CHART_LEGEND_POSITIONS, type CalculatedFieldTextKey, type CellClickEvent, type CellPreparedEvent, type CellType, type ChartCategoryKeyAction, type ChartFont, type ChartFormat, type ChartGridLines, type ChartImageRequest, type ChartKeyTextKey, type ChartLabelAngle, type ChartLegendPosition, type ChartMark, type ChartStacking, type ChartStyle, type ChartStyleDefaults, type ColHeaderCell, type ColumnSlot, type ColumnSlotOptions, type ConditionalVisual, type CsvParseProgress, CsvReader, type CustomSummaryOptions, DEFAULT_DATA_COLUMN_WIDTH, DEFAULT_ROW_HEADER_WIDTH, DataNormalizer, type DateFormatContext, DateFormatter, type DateGranularity, type DimensionFieldInfo, type DrillDownTextKey, type DropIntent, type ExportFormat, type ExportOptions, ExportStreamController, type ExportingEvent, 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 HistogramBin, type IFileReader, type ImportFormat, ImportManager, type ImportManagerOptions, type ImportProgress, type ImportResult, type ImportSnapshot, ImportStreamController, type ImportWorkerKind, type ImportWorkerResult, MAX_C, type MarkTone, PIVOT_AI_FEATURES, type ParseFileOptions, 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 PivotDictionary, type PivotDragIntentState, PivotEngineRegistry, type PivotEngineResult, PivotEngineService, type PivotEngineServiceConfig, PivotEventEmitter, type PivotEventHandler, type PivotEventMap, PivotExportService, type PivotField, PivotFieldService, type PivotGridRef, type PivotGroupInterval, type PivotImportField, type PivotImportLabels, type PivotImportPreviewState, type PivotImportStatus, 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, PivotStateStore, type PivotStateStoringConfig, type PivotSummaryDisplayMode, type PivotSummaryType, type PivotTheme, type PivotToolbarConfig, type PivotTransactionResult, type PivotValue, type PivotValueFilter, type PrefilterConditionSpec, type PrefilterGroupSpec, type ProcessFileStreamingOptions, type ProcessFromUrlOptions, 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 ValidationResult, type ValueRange, type WaterfallStep, type WorkerComputeRequest, type WorkerFilterRequest, type WorkerFilterSpec, type WorkerInitRequest, type WorkerResponse, type WorkerTransactionRequest, type XYPair, type XYPairInput, XmlReader, applyPivotAiState, ar, attachFloatingFrame, buildCellLookup, buildColPathsList, buildColumnHeaders, buildEngineResult, buildPivotAOA, buildRowLabelCells, calculatedFieldText, cellHash, cellHashCol, cellHashRow, centredFrame, chartCategoryKey, chartKeyText, chartPalette, chartWindowFrame, classifyValue, clearFormatCache, coerceRecords, coerceValue, collatorFor, compileSafeFormula, computeFieldRanges, computePivotMatrixAsync, computeRowHeaderWidths, conditionRuleToExcelStyle, cssColorToRgb, de, dedupeHeaders, defaultPivotLayout, destroyEngineWorker, detectDelimiter, diffPivotChartState, drillDownText, en, es, escapeXmlText, executePostAggregationPhase, executeSummaryDisplayModesPhase, exportPivotData, extractGroupValue, fieldNeedsRange, fieldValuesInMemory, filterEmptySummaryTree, filterPivotEngineAsync, filterRecords, filterRecordsAsync, flattenExportRows, flattenRowTree, flattenRowTreeTabular, flattenRowTreeTree, formatCellValue, formatCellValueCached, formatDimensionValue, formatHeaderValue, fr, funnelMarks, funnelStages, getAdvancedExporter, getCellVal, getFieldDistinctValues, getPivotAiSchema, getPivotAiState, getVisibleColLeaves, getVisibleColSlots, getVisibleLeafCount, getVisibleMaxDepth, heatColor, heatTextColor, heatmapMarks, histogramBins, histogramMarks, inferColumnType, initPivotEngineAsync, intlFormatToExcelNumFmt, invertRowHeaderWidth, it, ja, ko, logAxisTicks, nextChartWindowId, nextLiveText, pairSeriesForXY, parseBoolean, parseColor, parseCsvToRows, parseDelimited, parseFlexibleDate, parseLocaleNumber, percentAxisTicks, percentModeExcelNumFmt, percentModeText, pivotChangeAnnouncement, pivotRowTrend, pivotServerSource, pt, rangeBarMarks, rangeRatio, readChartFormat, readFrameRect, readPivotChartState, reconfigurePivotEngineAsync, registerAdvancedExporter, resolveChartStyle, resolveColPath, resolveColumnWidthDefaults, resolveConditionalVisual, rollupInMemory, ru, safeKey, sanitizeRows, scaleColor, serverRequestFor, setActiveEngineGrid, sortPivotTree, squarify, stackSeries, stripBom, sunburstMarks, testSafeFormula, tr, treemapMarks, trendColumnPaths, trendShape, waterfallDomain, waterfallMarks, waterfallSteps, windowStartFor, zhCN };