@kanunilabs/pivotgrid-core 1.11.7 → 1.11.8

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
@@ -1200,6 +1200,12 @@ interface PivotEngineResult {
1200
1200
  shown: number;
1201
1201
  total: number;
1202
1202
  };
1203
+ /**
1204
+ * For a field grouped by its format (B.89): each member's smallest raw
1205
+ * value, by member text, per field id - the order the sort uses, so "9,5"
1206
+ * comes before "18,2". Main thread only; absent when no field groups so.
1207
+ */
1208
+ memberOrder?: ReadonlyMap<string, ReadonlyMap<string, number>>;
1203
1209
  }
1204
1210
  interface FieldDistinctEntry {
1205
1211
  rawStr: string;
@@ -1967,6 +1973,29 @@ interface PivotField<TRow = any, TCellTemplate = PivotCellTemplate, TStyle = any
1967
1973
  calculateSummaryExpression?: string | ((cellValues: Record<string, number>) => number);
1968
1974
  /** Intl format options or custom formatter for cell display values. */
1969
1975
  format?: Intl.NumberFormatOptions | Intl.DateTimeFormatOptions | ((value: number) => string);
1976
+ /**
1977
+ * Group a row or column field by the text its `format` writes (Tekax B.89).
1978
+ * Default `false`: members are the raw values and their headers show them
1979
+ * raw ("18.23").
1980
+ *
1981
+ * With `true`, a number is grouped by its formatted text in the grid's
1982
+ * `locale` — the same text the header filter list shows — so 18.21 and 18.24
1983
+ * under a one-decimal format are ONE member, "18,2" in `tr-TR`, with every
1984
+ * measure summed over both. The header, exports, charts, `cellClick` /
1985
+ * `getCellRecords` (and so the drill-down), the path keys (`expandedPaths`,
1986
+ * `sortBySummaryPath`) and a member's `value` all carry that text. Members
1987
+ * sort by their smallest raw value, not alphabetically. The field's filter
1988
+ * stays a set of raw values (a list row ticks every raw value under it); to
1989
+ * filter to one member in code use `controller.memberFilterValues`.
1990
+ *
1991
+ * No effect without a `format`, with a `groupInterval` (which groups
1992
+ * already), on a date field, in the Values area, or with a `serverSource`:
1993
+ * the browser ignores it there and the server groups. Your own
1994
+ * `serverSource.compute` sees the flag on the field objects; the request
1995
+ * `pivotServerSource` sends does not carry it. Text and blank
1996
+ * values keep their raw key.
1997
+ */
1998
+ groupByFormat?: boolean;
1970
1999
  /** Conditional formatting rules evaluated per cell. */
1971
2000
  conditionalFormatting?: PivotConditionRule<TStyle>[];
1972
2001
  /** Custom cell render function. */
@@ -3089,6 +3118,14 @@ declare class PivotController<TRow> {
3089
3118
  * An empty path is that axis's grand total. No event is fired.
3090
3119
  */
3091
3120
  getCellRecords(rowPath: string[], colPath: string[]): TRow[];
3121
+ /**
3122
+ * The filter values that keep exactly one member of a row or column field:
3123
+ * `new Set([member])`, or, for a field grouped by its format (B.89), every
3124
+ * raw value whose text is `member` — a filter names raw values. For
3125
+ * `applyFilter(fieldId, controller.memberFilterValues(fieldId, member), 'include')`
3126
+ * from a chart category or a header.
3127
+ */
3128
+ memberFilterValues(fieldId: string, member: unknown): Set<unknown>;
3092
3129
  /**
3093
3130
  * The fields in `area`, in order. For `'data'` this is what the ENGINE
3094
3131
  * computes: helper fields (`helper: true`, B.21) come last, after every shown
@@ -3312,6 +3349,12 @@ declare class PivotEngineService<TRow> {
3312
3349
  * filter needs a column of its own (`filterColumnId`), encoded by reconfigure.
3313
3350
  */
3314
3351
  private unplacedFilteredFieldIds;
3352
+ /**
3353
+ * The row or column fields as the encoder takes them: a field grouped by its
3354
+ * format (B.89) is marked with the grid's locale, so its members are the
3355
+ * formatted texts. Every other field is passed as it is.
3356
+ */
3357
+ private axisFields;
3315
3358
  private createStructuralFieldsHash;
3316
3359
  private createFieldsHash;
3317
3360
  private createFilterHash;
@@ -3571,6 +3614,16 @@ declare function executePostAggregationPhase<TRow>(engineResult: PivotEngineResu
3571
3614
  declare function executeSummaryDisplayModesPhase<TRow>(engineResult: PivotEngineResult, dataFields: PivotField<TRow>[]): void;
3572
3615
 
3573
3616
  declare function extractGroupValue<TRow>(row: TRow, field: PivotField<TRow>): PivotValue;
3617
+ /** True when `field` groups its members by their formatted text. */
3618
+ declare function groupsByFormat(field: Pick<PivotField, 'groupByFormat' | 'format' | 'groupInterval' | 'dataType'>): boolean;
3619
+ /** The group key of a value already read by `extractGroupValue`: the formatted text of a number, else the raw key. */
3620
+ declare function formattedGroupKey(value: PivotValue, field: Pick<PivotField, 'format'>, locale: string): string;
3621
+ /**
3622
+ * The key a source row sits under for a row or column field — what a path
3623
+ * member names. `String(extractGroupValue(row))`, or its formatted text when
3624
+ * the field groups by format (`locale`: the grid's).
3625
+ */
3626
+ declare function groupKeyOf<TRow>(row: TRow, field: PivotField<TRow>, locale: string): string;
3574
3627
 
3575
3628
  /** The key of the member path `parts` (`[]` is the root, ""). Assumes no member value starts with or contains `|`. */
3576
3629
  declare function pathKey(parts: readonly unknown[]): string;
@@ -4189,4 +4242,4 @@ declare function rollupInMemory<TRow>(rows: readonly TRow[], request: PivotServe
4189
4242
  /** Every value of a field in rows held in memory — the reference `loadFieldValues`. */
4190
4243
  declare function fieldValuesInMemory<TRow>(rows: readonly TRow[], field: PivotServerField): unknown[];
4191
4244
 
4192
- 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 HeaderFilterGroup, 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, formatHeaderFilterLabel, formatHeaderValue, fr, funnelMarks, funnelStages, getAdvancedExporter, getCellVal, getFieldDistinctValues, getPivotAiSchema, getPivotAiState, getRecordsForCells, getSummaryTable, getVisibleColLeaves, getVisibleColSlots, getVisibleLeafCount, getVisibleMaxDepth, grandTotalHeaderShown, grandTotalShown, groupHeaderFilterOptions, headerFilterGroupTick, 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, setHeaderFilterGroups, setKeysIn, shownFields, sortPivotTree, splitPersistedState, squarify, stackSeries, subtotalFor, summaryTypeLabel, sunburstMarks, testSafeFormula, toCssPixels, toggleHeaderFilterGroup, toggleKeyIn, tr, treemapMarks, trendColumnPaths, trendShape, watchShortPivot, waterfallDomain, waterfallMarks, waterfallSteps, windowStartFor, withoutCollapsed, zhCN };
4245
+ 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 HeaderFilterGroup, 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, formatHeaderFilterLabel, formatHeaderValue, formattedGroupKey, fr, funnelMarks, funnelStages, getAdvancedExporter, getCellVal, getFieldDistinctValues, getPivotAiSchema, getPivotAiState, getRecordsForCells, getSummaryTable, getVisibleColLeaves, getVisibleColSlots, getVisibleLeafCount, getVisibleMaxDepth, grandTotalHeaderShown, grandTotalShown, groupHeaderFilterOptions, groupKeyOf, groupsByFormat, headerFilterGroupTick, 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, setHeaderFilterGroups, setKeysIn, shownFields, sortPivotTree, splitPersistedState, squarify, stackSeries, subtotalFor, summaryTypeLabel, sunburstMarks, testSafeFormula, toCssPixels, toggleHeaderFilterGroup, toggleKeyIn, tr, treemapMarks, trendColumnPaths, trendShape, watchShortPivot, waterfallDomain, waterfallMarks, waterfallSteps, windowStartFor, withoutCollapsed, zhCN };
package/dist/index.d.ts CHANGED
@@ -1200,6 +1200,12 @@ interface PivotEngineResult {
1200
1200
  shown: number;
1201
1201
  total: number;
1202
1202
  };
1203
+ /**
1204
+ * For a field grouped by its format (B.89): each member's smallest raw
1205
+ * value, by member text, per field id - the order the sort uses, so "9,5"
1206
+ * comes before "18,2". Main thread only; absent when no field groups so.
1207
+ */
1208
+ memberOrder?: ReadonlyMap<string, ReadonlyMap<string, number>>;
1203
1209
  }
1204
1210
  interface FieldDistinctEntry {
1205
1211
  rawStr: string;
@@ -1967,6 +1973,29 @@ interface PivotField<TRow = any, TCellTemplate = PivotCellTemplate, TStyle = any
1967
1973
  calculateSummaryExpression?: string | ((cellValues: Record<string, number>) => number);
1968
1974
  /** Intl format options or custom formatter for cell display values. */
1969
1975
  format?: Intl.NumberFormatOptions | Intl.DateTimeFormatOptions | ((value: number) => string);
1976
+ /**
1977
+ * Group a row or column field by the text its `format` writes (Tekax B.89).
1978
+ * Default `false`: members are the raw values and their headers show them
1979
+ * raw ("18.23").
1980
+ *
1981
+ * With `true`, a number is grouped by its formatted text in the grid's
1982
+ * `locale` — the same text the header filter list shows — so 18.21 and 18.24
1983
+ * under a one-decimal format are ONE member, "18,2" in `tr-TR`, with every
1984
+ * measure summed over both. The header, exports, charts, `cellClick` /
1985
+ * `getCellRecords` (and so the drill-down), the path keys (`expandedPaths`,
1986
+ * `sortBySummaryPath`) and a member's `value` all carry that text. Members
1987
+ * sort by their smallest raw value, not alphabetically. The field's filter
1988
+ * stays a set of raw values (a list row ticks every raw value under it); to
1989
+ * filter to one member in code use `controller.memberFilterValues`.
1990
+ *
1991
+ * No effect without a `format`, with a `groupInterval` (which groups
1992
+ * already), on a date field, in the Values area, or with a `serverSource`:
1993
+ * the browser ignores it there and the server groups. Your own
1994
+ * `serverSource.compute` sees the flag on the field objects; the request
1995
+ * `pivotServerSource` sends does not carry it. Text and blank
1996
+ * values keep their raw key.
1997
+ */
1998
+ groupByFormat?: boolean;
1970
1999
  /** Conditional formatting rules evaluated per cell. */
1971
2000
  conditionalFormatting?: PivotConditionRule<TStyle>[];
1972
2001
  /** Custom cell render function. */
@@ -3089,6 +3118,14 @@ declare class PivotController<TRow> {
3089
3118
  * An empty path is that axis's grand total. No event is fired.
3090
3119
  */
3091
3120
  getCellRecords(rowPath: string[], colPath: string[]): TRow[];
3121
+ /**
3122
+ * The filter values that keep exactly one member of a row or column field:
3123
+ * `new Set([member])`, or, for a field grouped by its format (B.89), every
3124
+ * raw value whose text is `member` — a filter names raw values. For
3125
+ * `applyFilter(fieldId, controller.memberFilterValues(fieldId, member), 'include')`
3126
+ * from a chart category or a header.
3127
+ */
3128
+ memberFilterValues(fieldId: string, member: unknown): Set<unknown>;
3092
3129
  /**
3093
3130
  * The fields in `area`, in order. For `'data'` this is what the ENGINE
3094
3131
  * computes: helper fields (`helper: true`, B.21) come last, after every shown
@@ -3312,6 +3349,12 @@ declare class PivotEngineService<TRow> {
3312
3349
  * filter needs a column of its own (`filterColumnId`), encoded by reconfigure.
3313
3350
  */
3314
3351
  private unplacedFilteredFieldIds;
3352
+ /**
3353
+ * The row or column fields as the encoder takes them: a field grouped by its
3354
+ * format (B.89) is marked with the grid's locale, so its members are the
3355
+ * formatted texts. Every other field is passed as it is.
3356
+ */
3357
+ private axisFields;
3315
3358
  private createStructuralFieldsHash;
3316
3359
  private createFieldsHash;
3317
3360
  private createFilterHash;
@@ -3571,6 +3614,16 @@ declare function executePostAggregationPhase<TRow>(engineResult: PivotEngineResu
3571
3614
  declare function executeSummaryDisplayModesPhase<TRow>(engineResult: PivotEngineResult, dataFields: PivotField<TRow>[]): void;
3572
3615
 
3573
3616
  declare function extractGroupValue<TRow>(row: TRow, field: PivotField<TRow>): PivotValue;
3617
+ /** True when `field` groups its members by their formatted text. */
3618
+ declare function groupsByFormat(field: Pick<PivotField, 'groupByFormat' | 'format' | 'groupInterval' | 'dataType'>): boolean;
3619
+ /** The group key of a value already read by `extractGroupValue`: the formatted text of a number, else the raw key. */
3620
+ declare function formattedGroupKey(value: PivotValue, field: Pick<PivotField, 'format'>, locale: string): string;
3621
+ /**
3622
+ * The key a source row sits under for a row or column field — what a path
3623
+ * member names. `String(extractGroupValue(row))`, or its formatted text when
3624
+ * the field groups by format (`locale`: the grid's).
3625
+ */
3626
+ declare function groupKeyOf<TRow>(row: TRow, field: PivotField<TRow>, locale: string): string;
3574
3627
 
3575
3628
  /** The key of the member path `parts` (`[]` is the root, ""). Assumes no member value starts with or contains `|`. */
3576
3629
  declare function pathKey(parts: readonly unknown[]): string;
@@ -4189,4 +4242,4 @@ declare function rollupInMemory<TRow>(rows: readonly TRow[], request: PivotServe
4189
4242
  /** Every value of a field in rows held in memory — the reference `loadFieldValues`. */
4190
4243
  declare function fieldValuesInMemory<TRow>(rows: readonly TRow[], field: PivotServerField): unknown[];
4191
4244
 
4192
- 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 HeaderFilterGroup, 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, formatHeaderFilterLabel, formatHeaderValue, fr, funnelMarks, funnelStages, getAdvancedExporter, getCellVal, getFieldDistinctValues, getPivotAiSchema, getPivotAiState, getRecordsForCells, getSummaryTable, getVisibleColLeaves, getVisibleColSlots, getVisibleLeafCount, getVisibleMaxDepth, grandTotalHeaderShown, grandTotalShown, groupHeaderFilterOptions, headerFilterGroupTick, 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, setHeaderFilterGroups, setKeysIn, shownFields, sortPivotTree, splitPersistedState, squarify, stackSeries, subtotalFor, summaryTypeLabel, sunburstMarks, testSafeFormula, toCssPixels, toggleHeaderFilterGroup, toggleKeyIn, tr, treemapMarks, trendColumnPaths, trendShape, watchShortPivot, waterfallDomain, waterfallMarks, waterfallSteps, windowStartFor, withoutCollapsed, zhCN };
4245
+ 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 HeaderFilterGroup, 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, formatHeaderFilterLabel, formatHeaderValue, formattedGroupKey, fr, funnelMarks, funnelStages, getAdvancedExporter, getCellVal, getFieldDistinctValues, getPivotAiSchema, getPivotAiState, getRecordsForCells, getSummaryTable, getVisibleColLeaves, getVisibleColSlots, getVisibleLeafCount, getVisibleMaxDepth, grandTotalHeaderShown, grandTotalShown, groupHeaderFilterOptions, groupKeyOf, groupsByFormat, headerFilterGroupTick, 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, setHeaderFilterGroups, setKeysIn, shownFields, sortPivotTree, splitPersistedState, squarify, stackSeries, subtotalFor, summaryTypeLabel, sunburstMarks, testSafeFormula, toCssPixels, toggleHeaderFilterGroup, toggleKeyIn, tr, treemapMarks, trendColumnPaths, trendShape, watchShortPivot, waterfallDomain, waterfallMarks, waterfallSteps, windowStartFor, withoutCollapsed, zhCN };