@kanunilabs/pivotgrid-react 1.5.0 → 1.6.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.
Files changed (44) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.d.cts +19 -4
  4. package/dist/index.d.ts +19 -4
  5. package/dist/index.js +2 -2
  6. package/dist/styles.css +199 -15
  7. package/dist/themes/all.css +1064 -0
  8. package/dist/themes/amber.css +28 -0
  9. package/dist/themes/aubergine.css +32 -0
  10. package/dist/themes/azure.css +28 -0
  11. package/dist/themes/burgundy.css +32 -0
  12. package/dist/themes/charcoal.css +32 -0
  13. package/dist/themes/contrast-dark.css +32 -0
  14. package/dist/themes/contrast-light.css +28 -0
  15. package/dist/themes/coral.css +28 -0
  16. package/dist/themes/corporate.css +28 -0
  17. package/dist/themes/deep-sea.css +32 -0
  18. package/dist/themes/editorial.css +28 -0
  19. package/dist/themes/ember.css +32 -0
  20. package/dist/themes/emerald.css +28 -0
  21. package/dist/themes/forest.css +32 -0
  22. package/dist/themes/glacier.css +28 -0
  23. package/dist/themes/graphite.css +32 -0
  24. package/dist/themes/indigo-night.css +32 -0
  25. package/dist/themes/indigo.css +28 -0
  26. package/dist/themes/ivory.css +28 -0
  27. package/dist/themes/lagoon.css +28 -0
  28. package/dist/themes/linen.css +28 -0
  29. package/dist/themes/midnight.css +32 -0
  30. package/dist/themes/mist.css +28 -0
  31. package/dist/themes/monochrome.css +28 -0
  32. package/dist/themes/onyx.css +32 -0
  33. package/dist/themes/orchid.css +28 -0
  34. package/dist/themes/porcelain.css +28 -0
  35. package/dist/themes/rose.css +28 -0
  36. package/dist/themes/sandstone.css +28 -0
  37. package/dist/themes/slate-night.css +32 -0
  38. package/dist/themes/slate.css +28 -0
  39. package/dist/themes/steel.css +32 -0
  40. package/dist/themes/stone.css +28 -0
  41. package/dist/themes/taupe.css +28 -0
  42. package/dist/themes/teal.css +28 -0
  43. package/dist/themes/terminal.css +32 -0
  44. package/package.json +6 -4
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 { PivotField as PivotField$1, PivotCellTemplate as PivotCellTemplate$1, CellClickEvent as CellClickEvent$1, CellPreparedEvent as CellPreparedEvent$1, PivotGridRef as PivotGridRef$1, PivotRowTransaction, PivotTransactionResult, PivotController, PivotConditionRule as PivotConditionRule$1, PivotCell, PivotEngineResult, PivotControllerOptions, PivotLayoutState, PivotTheme, PivotStateStoringConfig, PivotToolbarConfig, PivotEngineRegistry, PivotLocale, PivotDictionary, PivotColumnWidthDefaults, FieldMoveEvent, ExportingEvent, ExportFormat, PivotReport, PivotArea, PivotNode, PivotControllerState } from '@kanunilabs/pivotgrid-core';
5
- export { CustomSummaryOptions, DropIntent, ExportingEvent, FieldMoveEvent, FilterCondition, FilterGroup, FilterOperator, PivotArea, PivotCell, PivotCellTextAccessor, PivotCellValueAccessor, PivotColumnWidthDefaults, PivotControllerCallbacks, PivotControllerOptions, PivotControllerState, PivotDataSource, PivotDictionary, PivotDragIntentState, PivotGroupInterval, PivotImportStatus, PivotLabelFilter, PivotLayoutProfile, PivotLayoutState, PivotLocale, PivotNode, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotSelectionMode, PivotSelectionRange, PivotSelectionState, PivotSelectionStats, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, PivotValueFilter, defaultPivotLayout } from '@kanunilabs/pivotgrid-core';
4
+ import { PivotField as PivotField$1, PivotCellTemplate as PivotCellTemplate$1, CellClickEvent as CellClickEvent$1, CellPreparedEvent as CellPreparedEvent$1, PivotGridRef as PivotGridRef$1, PivotRowTransaction, PivotTransactionResult, PivotController, PivotConditionRule as PivotConditionRule$1, PivotCell, PivotEngineResult, PivotControllerOptions, PivotLayoutState, PivotTheme, PivotStateStoringConfig, PivotToolbarConfig, PivotEngineRegistry, PivotLocale, PivotDictionary, PivotDensity, PivotColumnWidthDefaults, FieldMoveEvent, ExportingEvent, ExportFormat, PivotReport, PivotArea, PivotNode, PivotControllerState } from '@kanunilabs/pivotgrid-core';
5
+ export { CustomSummaryOptions, DropIntent, ExportingEvent, FieldMoveEvent, FilterCondition, FilterGroup, FilterOperator, PivotArea, PivotCell, PivotCellTextAccessor, PivotCellValueAccessor, PivotColumnWidthDefaults, PivotControllerCallbacks, PivotControllerOptions, PivotControllerState, PivotDataSource, PivotDensity, PivotDictionary, PivotDragIntentState, PivotGroupInterval, PivotImportStatus, PivotLabelFilter, PivotLayoutProfile, PivotLayoutState, PivotLocale, PivotNode, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotSelectionMode, PivotSelectionRange, PivotSelectionState, PivotSelectionStats, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, PivotValueFilter, defaultPivotLayout } from '@kanunilabs/pivotgrid-core';
6
6
  import * as _dnd_kit_core from '@dnd-kit/core';
7
7
  import { DragMoveEvent, DragEndEvent } from '@dnd-kit/core';
8
8
 
@@ -148,7 +148,10 @@ interface BasePivotGridProps<TRow> {
148
148
  serverSource?: PivotControllerOptions<TRow>['serverSource'];
149
149
  /** The plugin registry containing custom functions and formatters. */
150
150
  registry?: PivotEngineRegistry;
151
- /** Locale for the grid (tr, en, ar). Defaults to tr. */
151
+ /**
152
+ * Interface language: 'en', 'tr', 'ar', 'de', 'fr', 'es', 'it', 'pt', 'ru', 'zh-CN', 'ja' or 'ko'.
153
+ * Defaults to 'en'. Also sets the number formatting, and right-to-left for 'ar' (see `rtl`).
154
+ */
152
155
  locale?: PivotLocale;
153
156
  /** Right-to-Left (RTL) mode. Defaults to false (except for 'ar'). */
154
157
  rtl?: boolean;
@@ -156,6 +159,12 @@ interface BasePivotGridProps<TRow> {
156
159
  dictionary?: Partial<PivotDictionary>;
157
160
  /** Apply zebra striping to the data rows. */
158
161
  striped?: boolean;
162
+ /**
163
+ * Row rhythm: `'compact'` (24px rows, one size smaller type), `'normal'`
164
+ * (28px, the default) or `'comfortable'` (36px). Changing it repaints in
165
+ * place, without re-running the pivot engine.
166
+ */
167
+ density?: PivotDensity;
159
168
  /**
160
169
  * Starting widths in pixels: `{ rowHeader, data }` for every row-header
161
170
  * column and every data column. Defaults 150 and 95. A width the user drags
@@ -283,8 +292,14 @@ interface PivotGridBodyProps {
283
292
  onCellPrepared?: (e: CellPreparedEvent<any>) => void;
284
293
  disabled?: boolean;
285
294
  renderNodeContextMenu?: (props: any) => React.ReactNode;
295
+ /**
296
+ * Body row height in px — the grid's `density` resolved (`pivotRowHeight`).
297
+ * The virtualizer, spacers and keyboard scrolling all run on it; the
298
+ * stylesheet's density class sets the matching line heights. Default 28.
299
+ */
300
+ rowHeight?: number;
286
301
  }
287
- 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, registry, keyboardNavigation, onCellPrepared, renderNodeContextMenu }: PivotGridBodyProps): React$1.JSX.Element;
302
+ 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, registry, keyboardNavigation, onCellPrepared, renderNodeContextMenu, rowHeight }: PivotGridBodyProps): React$1.JSX.Element;
288
303
 
289
304
  interface PivotFooterProps {
290
305
  onToggleFieldChooser: () => void;
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 { PivotField as PivotField$1, PivotCellTemplate as PivotCellTemplate$1, CellClickEvent as CellClickEvent$1, CellPreparedEvent as CellPreparedEvent$1, PivotGridRef as PivotGridRef$1, PivotRowTransaction, PivotTransactionResult, PivotController, PivotConditionRule as PivotConditionRule$1, PivotCell, PivotEngineResult, PivotControllerOptions, PivotLayoutState, PivotTheme, PivotStateStoringConfig, PivotToolbarConfig, PivotEngineRegistry, PivotLocale, PivotDictionary, PivotColumnWidthDefaults, FieldMoveEvent, ExportingEvent, ExportFormat, PivotReport, PivotArea, PivotNode, PivotControllerState } from '@kanunilabs/pivotgrid-core';
5
- export { CustomSummaryOptions, DropIntent, ExportingEvent, FieldMoveEvent, FilterCondition, FilterGroup, FilterOperator, PivotArea, PivotCell, PivotCellTextAccessor, PivotCellValueAccessor, PivotColumnWidthDefaults, PivotControllerCallbacks, PivotControllerOptions, PivotControllerState, PivotDataSource, PivotDictionary, PivotDragIntentState, PivotGroupInterval, PivotImportStatus, PivotLabelFilter, PivotLayoutProfile, PivotLayoutState, PivotLocale, PivotNode, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotSelectionMode, PivotSelectionRange, PivotSelectionState, PivotSelectionStats, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, PivotValueFilter, defaultPivotLayout } from '@kanunilabs/pivotgrid-core';
4
+ import { PivotField as PivotField$1, PivotCellTemplate as PivotCellTemplate$1, CellClickEvent as CellClickEvent$1, CellPreparedEvent as CellPreparedEvent$1, PivotGridRef as PivotGridRef$1, PivotRowTransaction, PivotTransactionResult, PivotController, PivotConditionRule as PivotConditionRule$1, PivotCell, PivotEngineResult, PivotControllerOptions, PivotLayoutState, PivotTheme, PivotStateStoringConfig, PivotToolbarConfig, PivotEngineRegistry, PivotLocale, PivotDictionary, PivotDensity, PivotColumnWidthDefaults, FieldMoveEvent, ExportingEvent, ExportFormat, PivotReport, PivotArea, PivotNode, PivotControllerState } from '@kanunilabs/pivotgrid-core';
5
+ export { CustomSummaryOptions, DropIntent, ExportingEvent, FieldMoveEvent, FilterCondition, FilterGroup, FilterOperator, PivotArea, PivotCell, PivotCellTextAccessor, PivotCellValueAccessor, PivotColumnWidthDefaults, PivotControllerCallbacks, PivotControllerOptions, PivotControllerState, PivotDataSource, PivotDensity, PivotDictionary, PivotDragIntentState, PivotGroupInterval, PivotImportStatus, PivotLabelFilter, PivotLayoutProfile, PivotLayoutState, PivotLocale, PivotNode, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotSelectionMode, PivotSelectionRange, PivotSelectionState, PivotSelectionStats, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, PivotValueFilter, defaultPivotLayout } from '@kanunilabs/pivotgrid-core';
6
6
  import * as _dnd_kit_core from '@dnd-kit/core';
7
7
  import { DragMoveEvent, DragEndEvent } from '@dnd-kit/core';
8
8
 
@@ -148,7 +148,10 @@ interface BasePivotGridProps<TRow> {
148
148
  serverSource?: PivotControllerOptions<TRow>['serverSource'];
149
149
  /** The plugin registry containing custom functions and formatters. */
150
150
  registry?: PivotEngineRegistry;
151
- /** Locale for the grid (tr, en, ar). Defaults to tr. */
151
+ /**
152
+ * Interface language: 'en', 'tr', 'ar', 'de', 'fr', 'es', 'it', 'pt', 'ru', 'zh-CN', 'ja' or 'ko'.
153
+ * Defaults to 'en'. Also sets the number formatting, and right-to-left for 'ar' (see `rtl`).
154
+ */
152
155
  locale?: PivotLocale;
153
156
  /** Right-to-Left (RTL) mode. Defaults to false (except for 'ar'). */
154
157
  rtl?: boolean;
@@ -156,6 +159,12 @@ interface BasePivotGridProps<TRow> {
156
159
  dictionary?: Partial<PivotDictionary>;
157
160
  /** Apply zebra striping to the data rows. */
158
161
  striped?: boolean;
162
+ /**
163
+ * Row rhythm: `'compact'` (24px rows, one size smaller type), `'normal'`
164
+ * (28px, the default) or `'comfortable'` (36px). Changing it repaints in
165
+ * place, without re-running the pivot engine.
166
+ */
167
+ density?: PivotDensity;
159
168
  /**
160
169
  * Starting widths in pixels: `{ rowHeader, data }` for every row-header
161
170
  * column and every data column. Defaults 150 and 95. A width the user drags
@@ -283,8 +292,14 @@ interface PivotGridBodyProps {
283
292
  onCellPrepared?: (e: CellPreparedEvent<any>) => void;
284
293
  disabled?: boolean;
285
294
  renderNodeContextMenu?: (props: any) => React.ReactNode;
295
+ /**
296
+ * Body row height in px — the grid's `density` resolved (`pivotRowHeight`).
297
+ * The virtualizer, spacers and keyboard scrolling all run on it; the
298
+ * stylesheet's density class sets the matching line heights. Default 28.
299
+ */
300
+ rowHeight?: number;
286
301
  }
287
- 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, registry, keyboardNavigation, onCellPrepared, renderNodeContextMenu }: PivotGridBodyProps): React$1.JSX.Element;
302
+ 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, registry, keyboardNavigation, onCellPrepared, renderNodeContextMenu, rowHeight }: PivotGridBodyProps): React$1.JSX.Element;
288
303
 
289
304
  interface PivotFooterProps {
290
305
  onToggleFieldChooser: () => void;