@kanunilabs/pivotgrid-react 1.8.8 → 1.8.10

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
@@ -1,8 +1,8 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { Component, ErrorInfo } from 'react';
3
3
  import * as _kanunilabs_pivotgrid_core from '@kanunilabs/pivotgrid-core';
4
- import { PivotEngineResult, PivotLayoutState, PivotColumnWidthDefaults, PivotField as PivotField$1, PivotCellTemplate as PivotCellTemplate$1, CellClickEvent as CellClickEvent$1, CellPreparedEvent as CellPreparedEvent$1, PivotGridRef as PivotGridRef$1, PivotRowTransaction, PivotTransactionResult, PivotController, PersistedPivotState, PivotConditionRule as PivotConditionRule$1, PivotCell, PivotControllerOptions, PivotTheme, PivotStateStoringConfig, PivotToolbarConfig, PivotEngineRegistry, PivotLocale, PivotDictionary, PivotDensity, FieldMoveEvent, ExportingEvent, ExportOptions, ExportFormat, PivotReport, PivotArea, PivotNode, PivotControllerState } from '@kanunilabs/pivotgrid-core';
5
- export { CustomSummaryOptions, DropIntent, ExportingEvent, FieldMoveEvent, FilterCondition, FilterGroup, FilterOperator, PersistedPivotFilters, PersistedPivotState, PivotArea, PivotCell, PivotCellTextAccessor, PivotCellValueAccessor, PivotColumnWidthDefaults, PivotControllerCallbacks, PivotControllerOptions, PivotControllerState, PivotDataSource, PivotDensity, PivotDictionary, PivotDragIntentState, PivotGroupInterval, PivotLabelFilter, PivotLayoutProfile, PivotLayoutState, PivotLocale, PivotNode, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotSelectionMode, PivotSelectionRange, PivotSelectionState, PivotSelectionStats, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, PivotValueFilter, defaultPivotLayout, mergePersistedState, splitPersistedState } from '@kanunilabs/pivotgrid-core';
4
+ import { PivotEngineResult, PivotLayoutState, PivotColumnWidthDefaults, PivotCopyInfo, PivotCopyError, PivotCopyErrorReason, PivotField as PivotField$1, PivotCellTemplate as PivotCellTemplate$1, CellClickEvent as CellClickEvent$1, CellPreparedEvent as CellPreparedEvent$1, PivotGridRef as PivotGridRef$1, PivotRowTransaction, PivotTransactionResult, PivotController, PersistedPivotState, PivotConditionRule as PivotConditionRule$1, PivotCell, PivotControllerOptions, PivotTheme, PivotStateStoringConfig, PivotToolbarConfig, PivotEngineRegistry, PivotLocale, PivotDictionary, PivotDensity, FieldMoveEvent, ExportingEvent, ExportOptions, ExportFormat, PivotReport, PivotArea, PivotNode, PivotControllerState } from '@kanunilabs/pivotgrid-core';
5
+ export { CustomSummaryOptions, DropIntent, ExportingEvent, FieldMoveEvent, FilterCondition, FilterGroup, FilterOperator, PersistedPivotFilters, PersistedPivotState, PivotArea, PivotCell, PivotCellTextAccessor, PivotCellValueAccessor, PivotColumnWidthDefaults, PivotControllerCallbacks, PivotControllerOptions, PivotControllerState, PivotDataSource, PivotDensity, PivotDictionary, PivotDragIntentState, PivotGroupInterval, PivotLabelFilter, PivotLayoutProfile, PivotLayoutState, PivotLocale, PivotNode, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotSelectionMode, PivotSelectionRange, PivotSelectionState, PivotSelectionStats, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, PivotValueFilter, PivotVirtualizationOptions, defaultPivotLayout, mergePersistedState, splitPersistedState } from '@kanunilabs/pivotgrid-core';
6
6
  import * as _dnd_kit_core from '@dnd-kit/core';
7
7
  import { UniqueIdentifier, DroppableContainer, ClientRect, Announcements, DragStartEvent, DragMoveEvent, DragOverEvent, DragEndEvent } from '@dnd-kit/core';
8
8
 
@@ -64,6 +64,12 @@ interface PivotGridBodyProps {
64
64
  multiSelect?: boolean;
65
65
  /** Every change of the selected data cells (B.25). */
66
66
  onSelectionChange?: (event: PivotSelectionChangeEvent) => void;
67
+ /** Ctrl/Cmd+C copied the selected cells (B.99). */
68
+ onCopy?: (event: PivotCopyInfo) => void;
69
+ /** A Ctrl/Cmd+C did not reach the clipboard (B.99). */
70
+ onCopyError?: (error: PivotCopyError, info: {
71
+ reason: PivotCopyErrorReason;
72
+ }) => void;
67
73
  /** Filled by the body: the selected cells on request (B.25). */
68
74
  selectionApiRef?: React.MutableRefObject<{
69
75
  getSelectedCells(): PivotSelectedCell[];
@@ -82,7 +88,7 @@ interface PivotGridBodyProps {
82
88
  */
83
89
  rowHeight?: number;
84
90
  }
85
- declare function PivotGridBody({ engineResult, isBuilding, buildProgress, rowFields, colFields: _colFields, dataFields, layout, expandedPaths, allExpanded, onToggleExpand, onExpandPaths, onCollapsePaths, expandedColPaths, allColExpanded, onToggleColExpand, onExpandColPaths, onCollapseColPaths, onCellClick, onContextMenu, onFilterClick, onRemoveField, onSort, onMoveField, onGlobalContextMenu, columnWidths, defaultColumnWidths, onColumnWidthsChange, onSelectionStatsChange, multiSelect, onSelectionChange, selectionApiRef, registry, keyboardNavigation, onCellPrepared, renderNodeContextMenu, rowHeight }: PivotGridBodyProps): React$1.JSX.Element;
91
+ declare function PivotGridBody({ engineResult, isBuilding, buildProgress, rowFields, colFields: _colFields, dataFields, layout, expandedPaths, allExpanded, onToggleExpand, onExpandPaths, onCollapsePaths, expandedColPaths, allColExpanded, onToggleColExpand, onExpandColPaths, onCollapseColPaths, onCellClick, onContextMenu, onFilterClick, onRemoveField, onSort, onMoveField, onGlobalContextMenu, columnWidths, defaultColumnWidths, onColumnWidthsChange, onSelectionStatsChange, multiSelect, onSelectionChange, onCopy, onCopyError, selectionApiRef, registry, keyboardNavigation, onCellPrepared, renderNodeContextMenu, rowHeight }: PivotGridBodyProps): React$1.JSX.Element;
86
92
 
87
93
  /** The imperative handle a `ref` on the grid receives. */
88
94
  interface PivotGridRef extends PivotGridRef$1 {
@@ -185,6 +191,11 @@ interface PivotChartIntegrationOptions {
185
191
  maxSeries?: number;
186
192
  dataFieldsDisplayMode?: 'singleAxis' | 'splitAxes';
187
193
  processCell?: (cell: PivotCell) => boolean;
194
+ /**
195
+ * What a blank row/column value is called in the chart (B.94). The grid fills
196
+ * it from its dictionary's `blanks` ('' allowed) unless you set it here.
197
+ */
198
+ blanksText?: string;
188
199
  transformer?: (engineResult: PivotEngineResult, fields: PivotField[], expandedPaths: Set<string>, locale: string, options: any) => ChartSyncResult;
189
200
  }
190
201
  interface ChartSeriesDef {
@@ -363,6 +374,19 @@ interface BasePivotGridProps<TRow> {
363
374
  * long press adds one and a drag grows it.
364
375
  */
365
376
  onSelectionChange?: (event: PivotSelectionChangeEvent) => void;
377
+ /**
378
+ * Ctrl/Cmd+C copied the selected cells (B.99): the tab-separated `text`, the same cells as an `html` table, and the
379
+ * size. The copy goes through the browser's own copy event, so it works on a plain-HTTP page too.
380
+ */
381
+ onCopy?: (event: PivotCopyInfo) => void;
382
+ /**
383
+ * A Ctrl/Cmd+C did not reach the clipboard (B.99): `reason` is `'insecure-context'` (no clipboard on a plain-HTTP
384
+ * page and no copy event), `'permission-denied'` (the browser refused), `'empty-selection'` (the focus was in the
385
+ * grid with nothing selected) or `'unsupported'`. Show the user something; the grid does not.
386
+ */
387
+ onCopyError?: (error: PivotCopyError, info: {
388
+ reason: PivotCopyErrorReason;
389
+ }) => void;
366
390
  /**
367
391
  * Asked before a styled Excel export gives way to the plain .xls one (over
368
392
  * 100,000 list rows or 150,000 pivot cells); return `false` to cancel (B.23).
@@ -511,8 +535,10 @@ interface PivotAreaStripsProps {
511
535
  collapsed?: boolean;
512
536
  /** The strip's collapse button; without it there is no button. */
513
537
  onToggleCollapsed?: () => void;
538
+ /** `layout.areaHeaders.filter` (B.104): `false` draws no title row. */
539
+ showHeader?: boolean;
514
540
  }
515
- declare function PivotAreaStrips({ filterFields, onRemoveField, onFilterClick, onContextMenu, onSort, onGlobalContextMenu, onMoveField, maxRows, collapsed, collapsedRows, onToggleCollapsed, }: PivotAreaStripsProps): React__default.JSX.Element;
541
+ declare function PivotAreaStrips({ filterFields, onRemoveField, onFilterClick, onContextMenu, onSort, onGlobalContextMenu, onMoveField, maxRows, collapsed, collapsedRows, onToggleCollapsed, showHeader, }: PivotAreaStripsProps): React__default.JSX.Element;
516
542
 
517
543
  interface PivotFieldListProps {
518
544
  area: string;
@@ -553,6 +579,8 @@ interface PivotHeaderFilterPopupProps {
553
579
  gridId?: string;
554
580
  /** The value / label filter dialog (G-PIV-03): a footer button for row and column fields. */
555
581
  onConditionFilter?: () => void;
582
+ /** `layout.filterPopupSearch` (B.90): `false` leaves out the search box and the type-ahead. Default `true`. */
583
+ showSearch?: boolean;
556
584
  }
557
585
  declare const PivotHeaderFilterPopup: React__default.FC<PivotHeaderFilterPopupProps>;
558
586
 
@@ -828,6 +856,11 @@ interface PivotLocalizationContextProps {
828
856
  dictionary: PivotDictionary;
829
857
  t: (key: keyof PivotDictionary | string) => string;
830
858
  rtl: boolean;
859
+ /**
860
+ * The language's own `blanks` text, never ''. When an app shows blanks as ''
861
+ * (B.94) a list row still needs a name a screen reader can say.
862
+ */
863
+ defaultBlanks: string;
831
864
  }
832
865
  interface PivotConfigProviderProps {
833
866
  children: React__default.ReactNode;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { Component, ErrorInfo } from 'react';
3
3
  import * as _kanunilabs_pivotgrid_core from '@kanunilabs/pivotgrid-core';
4
- import { PivotEngineResult, PivotLayoutState, PivotColumnWidthDefaults, PivotField as PivotField$1, PivotCellTemplate as PivotCellTemplate$1, CellClickEvent as CellClickEvent$1, CellPreparedEvent as CellPreparedEvent$1, PivotGridRef as PivotGridRef$1, PivotRowTransaction, PivotTransactionResult, PivotController, PersistedPivotState, PivotConditionRule as PivotConditionRule$1, PivotCell, PivotControllerOptions, PivotTheme, PivotStateStoringConfig, PivotToolbarConfig, PivotEngineRegistry, PivotLocale, PivotDictionary, PivotDensity, FieldMoveEvent, ExportingEvent, ExportOptions, ExportFormat, PivotReport, PivotArea, PivotNode, PivotControllerState } from '@kanunilabs/pivotgrid-core';
5
- export { CustomSummaryOptions, DropIntent, ExportingEvent, FieldMoveEvent, FilterCondition, FilterGroup, FilterOperator, PersistedPivotFilters, PersistedPivotState, PivotArea, PivotCell, PivotCellTextAccessor, PivotCellValueAccessor, PivotColumnWidthDefaults, PivotControllerCallbacks, PivotControllerOptions, PivotControllerState, PivotDataSource, PivotDensity, PivotDictionary, PivotDragIntentState, PivotGroupInterval, PivotLabelFilter, PivotLayoutProfile, PivotLayoutState, PivotLocale, PivotNode, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotSelectionMode, PivotSelectionRange, PivotSelectionState, PivotSelectionStats, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, PivotValueFilter, defaultPivotLayout, mergePersistedState, splitPersistedState } from '@kanunilabs/pivotgrid-core';
4
+ import { PivotEngineResult, PivotLayoutState, PivotColumnWidthDefaults, PivotCopyInfo, PivotCopyError, PivotCopyErrorReason, PivotField as PivotField$1, PivotCellTemplate as PivotCellTemplate$1, CellClickEvent as CellClickEvent$1, CellPreparedEvent as CellPreparedEvent$1, PivotGridRef as PivotGridRef$1, PivotRowTransaction, PivotTransactionResult, PivotController, PersistedPivotState, PivotConditionRule as PivotConditionRule$1, PivotCell, PivotControllerOptions, PivotTheme, PivotStateStoringConfig, PivotToolbarConfig, PivotEngineRegistry, PivotLocale, PivotDictionary, PivotDensity, FieldMoveEvent, ExportingEvent, ExportOptions, ExportFormat, PivotReport, PivotArea, PivotNode, PivotControllerState } from '@kanunilabs/pivotgrid-core';
5
+ export { CustomSummaryOptions, DropIntent, ExportingEvent, FieldMoveEvent, FilterCondition, FilterGroup, FilterOperator, PersistedPivotFilters, PersistedPivotState, PivotArea, PivotCell, PivotCellTextAccessor, PivotCellValueAccessor, PivotColumnWidthDefaults, PivotControllerCallbacks, PivotControllerOptions, PivotControllerState, PivotDataSource, PivotDensity, PivotDictionary, PivotDragIntentState, PivotGroupInterval, PivotLabelFilter, PivotLayoutProfile, PivotLayoutState, PivotLocale, PivotNode, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotSelectionMode, PivotSelectionRange, PivotSelectionState, PivotSelectionStats, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, PivotValueFilter, PivotVirtualizationOptions, defaultPivotLayout, mergePersistedState, splitPersistedState } from '@kanunilabs/pivotgrid-core';
6
6
  import * as _dnd_kit_core from '@dnd-kit/core';
7
7
  import { UniqueIdentifier, DroppableContainer, ClientRect, Announcements, DragStartEvent, DragMoveEvent, DragOverEvent, DragEndEvent } from '@dnd-kit/core';
8
8
 
@@ -64,6 +64,12 @@ interface PivotGridBodyProps {
64
64
  multiSelect?: boolean;
65
65
  /** Every change of the selected data cells (B.25). */
66
66
  onSelectionChange?: (event: PivotSelectionChangeEvent) => void;
67
+ /** Ctrl/Cmd+C copied the selected cells (B.99). */
68
+ onCopy?: (event: PivotCopyInfo) => void;
69
+ /** A Ctrl/Cmd+C did not reach the clipboard (B.99). */
70
+ onCopyError?: (error: PivotCopyError, info: {
71
+ reason: PivotCopyErrorReason;
72
+ }) => void;
67
73
  /** Filled by the body: the selected cells on request (B.25). */
68
74
  selectionApiRef?: React.MutableRefObject<{
69
75
  getSelectedCells(): PivotSelectedCell[];
@@ -82,7 +88,7 @@ interface PivotGridBodyProps {
82
88
  */
83
89
  rowHeight?: number;
84
90
  }
85
- declare function PivotGridBody({ engineResult, isBuilding, buildProgress, rowFields, colFields: _colFields, dataFields, layout, expandedPaths, allExpanded, onToggleExpand, onExpandPaths, onCollapsePaths, expandedColPaths, allColExpanded, onToggleColExpand, onExpandColPaths, onCollapseColPaths, onCellClick, onContextMenu, onFilterClick, onRemoveField, onSort, onMoveField, onGlobalContextMenu, columnWidths, defaultColumnWidths, onColumnWidthsChange, onSelectionStatsChange, multiSelect, onSelectionChange, selectionApiRef, registry, keyboardNavigation, onCellPrepared, renderNodeContextMenu, rowHeight }: PivotGridBodyProps): React$1.JSX.Element;
91
+ declare function PivotGridBody({ engineResult, isBuilding, buildProgress, rowFields, colFields: _colFields, dataFields, layout, expandedPaths, allExpanded, onToggleExpand, onExpandPaths, onCollapsePaths, expandedColPaths, allColExpanded, onToggleColExpand, onExpandColPaths, onCollapseColPaths, onCellClick, onContextMenu, onFilterClick, onRemoveField, onSort, onMoveField, onGlobalContextMenu, columnWidths, defaultColumnWidths, onColumnWidthsChange, onSelectionStatsChange, multiSelect, onSelectionChange, onCopy, onCopyError, selectionApiRef, registry, keyboardNavigation, onCellPrepared, renderNodeContextMenu, rowHeight }: PivotGridBodyProps): React$1.JSX.Element;
86
92
 
87
93
  /** The imperative handle a `ref` on the grid receives. */
88
94
  interface PivotGridRef extends PivotGridRef$1 {
@@ -185,6 +191,11 @@ interface PivotChartIntegrationOptions {
185
191
  maxSeries?: number;
186
192
  dataFieldsDisplayMode?: 'singleAxis' | 'splitAxes';
187
193
  processCell?: (cell: PivotCell) => boolean;
194
+ /**
195
+ * What a blank row/column value is called in the chart (B.94). The grid fills
196
+ * it from its dictionary's `blanks` ('' allowed) unless you set it here.
197
+ */
198
+ blanksText?: string;
188
199
  transformer?: (engineResult: PivotEngineResult, fields: PivotField[], expandedPaths: Set<string>, locale: string, options: any) => ChartSyncResult;
189
200
  }
190
201
  interface ChartSeriesDef {
@@ -363,6 +374,19 @@ interface BasePivotGridProps<TRow> {
363
374
  * long press adds one and a drag grows it.
364
375
  */
365
376
  onSelectionChange?: (event: PivotSelectionChangeEvent) => void;
377
+ /**
378
+ * Ctrl/Cmd+C copied the selected cells (B.99): the tab-separated `text`, the same cells as an `html` table, and the
379
+ * size. The copy goes through the browser's own copy event, so it works on a plain-HTTP page too.
380
+ */
381
+ onCopy?: (event: PivotCopyInfo) => void;
382
+ /**
383
+ * A Ctrl/Cmd+C did not reach the clipboard (B.99): `reason` is `'insecure-context'` (no clipboard on a plain-HTTP
384
+ * page and no copy event), `'permission-denied'` (the browser refused), `'empty-selection'` (the focus was in the
385
+ * grid with nothing selected) or `'unsupported'`. Show the user something; the grid does not.
386
+ */
387
+ onCopyError?: (error: PivotCopyError, info: {
388
+ reason: PivotCopyErrorReason;
389
+ }) => void;
366
390
  /**
367
391
  * Asked before a styled Excel export gives way to the plain .xls one (over
368
392
  * 100,000 list rows or 150,000 pivot cells); return `false` to cancel (B.23).
@@ -511,8 +535,10 @@ interface PivotAreaStripsProps {
511
535
  collapsed?: boolean;
512
536
  /** The strip's collapse button; without it there is no button. */
513
537
  onToggleCollapsed?: () => void;
538
+ /** `layout.areaHeaders.filter` (B.104): `false` draws no title row. */
539
+ showHeader?: boolean;
514
540
  }
515
- declare function PivotAreaStrips({ filterFields, onRemoveField, onFilterClick, onContextMenu, onSort, onGlobalContextMenu, onMoveField, maxRows, collapsed, collapsedRows, onToggleCollapsed, }: PivotAreaStripsProps): React__default.JSX.Element;
541
+ declare function PivotAreaStrips({ filterFields, onRemoveField, onFilterClick, onContextMenu, onSort, onGlobalContextMenu, onMoveField, maxRows, collapsed, collapsedRows, onToggleCollapsed, showHeader, }: PivotAreaStripsProps): React__default.JSX.Element;
516
542
 
517
543
  interface PivotFieldListProps {
518
544
  area: string;
@@ -553,6 +579,8 @@ interface PivotHeaderFilterPopupProps {
553
579
  gridId?: string;
554
580
  /** The value / label filter dialog (G-PIV-03): a footer button for row and column fields. */
555
581
  onConditionFilter?: () => void;
582
+ /** `layout.filterPopupSearch` (B.90): `false` leaves out the search box and the type-ahead. Default `true`. */
583
+ showSearch?: boolean;
556
584
  }
557
585
  declare const PivotHeaderFilterPopup: React__default.FC<PivotHeaderFilterPopupProps>;
558
586
 
@@ -828,6 +856,11 @@ interface PivotLocalizationContextProps {
828
856
  dictionary: PivotDictionary;
829
857
  t: (key: keyof PivotDictionary | string) => string;
830
858
  rtl: boolean;
859
+ /**
860
+ * The language's own `blanks` text, never ''. When an app shows blanks as ''
861
+ * (B.94) a list row still needs a name a screen reader can say.
862
+ */
863
+ defaultBlanks: string;
831
864
  }
832
865
  interface PivotConfigProviderProps {
833
866
  children: React__default.ReactNode;