@kanunilabs/pivotgrid-react 1.7.0 → 1.8.1

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 (43) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.cts +25 -2
  3. package/dist/index.d.ts +25 -2
  4. package/dist/index.js +2 -2
  5. package/dist/styles.css +49 -2
  6. package/dist/themes/all.css +72 -0
  7. package/dist/themes/amber.css +2 -0
  8. package/dist/themes/aubergine.css +2 -0
  9. package/dist/themes/azure.css +2 -0
  10. package/dist/themes/burgundy.css +2 -0
  11. package/dist/themes/charcoal.css +2 -0
  12. package/dist/themes/contrast-dark.css +2 -0
  13. package/dist/themes/contrast-light.css +2 -0
  14. package/dist/themes/coral.css +2 -0
  15. package/dist/themes/corporate.css +2 -0
  16. package/dist/themes/deep-sea.css +2 -0
  17. package/dist/themes/editorial.css +2 -0
  18. package/dist/themes/ember.css +2 -0
  19. package/dist/themes/emerald.css +2 -0
  20. package/dist/themes/forest.css +2 -0
  21. package/dist/themes/glacier.css +2 -0
  22. package/dist/themes/graphite.css +2 -0
  23. package/dist/themes/indigo-night.css +2 -0
  24. package/dist/themes/indigo.css +2 -0
  25. package/dist/themes/ivory.css +2 -0
  26. package/dist/themes/lagoon.css +2 -0
  27. package/dist/themes/linen.css +2 -0
  28. package/dist/themes/midnight.css +2 -0
  29. package/dist/themes/mist.css +2 -0
  30. package/dist/themes/monochrome.css +2 -0
  31. package/dist/themes/onyx.css +2 -0
  32. package/dist/themes/orchid.css +2 -0
  33. package/dist/themes/porcelain.css +2 -0
  34. package/dist/themes/rose.css +2 -0
  35. package/dist/themes/sandstone.css +2 -0
  36. package/dist/themes/slate-night.css +2 -0
  37. package/dist/themes/slate.css +2 -0
  38. package/dist/themes/steel.css +2 -0
  39. package/dist/themes/stone.css +2 -0
  40. package/dist/themes/taupe.css +2 -0
  41. package/dist/themes/teal.css +2 -0
  42. package/dist/themes/terminal.css +2 -0
  43. package/package.json +2 -2
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, 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';
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, PersistedPivotState, 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, PersistedPivotState, 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
 
@@ -44,6 +44,20 @@ interface PivotGridRef extends PivotGridRef$1 {
44
44
  * The vanilla grid hands out the same object as `api.controller`.
45
45
  */
46
46
  getController: () => PivotController<any>;
47
+ /**
48
+ * Everything the reader arranged, as versioned plain JSON — what
49
+ * `stateStoring` saves. Keep it anywhere (a tab cache, IndexedDB, a server)
50
+ * and hand it back to `applyPersistedState`.
51
+ */
52
+ getPersistedState: (options?: {
53
+ include?: readonly 'scroll'[];
54
+ }) => PersistedPivotState;
55
+ /**
56
+ * Put a `getPersistedState` snapshot back: fields, areas, sorting, filters,
57
+ * open members, totals, calculated fields, chart type, column widths. False,
58
+ * and nothing changed, when it cannot be read (another `version`).
59
+ */
60
+ applyPersistedState: (state: unknown) => boolean;
47
61
  }
48
62
  type PivotCellTemplate = (props: Parameters<PivotCellTemplate$1>[0]) => React$1.ReactNode;
49
63
  type PivotConditionRule = PivotConditionRule$1<React$1.CSSProperties>;
@@ -136,6 +150,15 @@ interface BasePivotGridProps<TRow> {
136
150
  layout?: PivotLayoutState;
137
151
  /** Custom theme configuration. */
138
152
  theme?: PivotTheme;
153
+ /**
154
+ * A colour scheme by id — one of the 36 packaged ones (`'nord'`,
155
+ * `'graphite'`…, with `@kanunilabs/pivotgrid-react/themes/<id>.css` imported
156
+ * after `styles.css`) or your own from the Theme Builder. The same name as the
157
+ * DataGrid's `palette`, so one value colours both. Wins over `theme.id`.
158
+ */
159
+ palette?: string;
160
+ /** The built-in dark look (the DataGrid's dark palette). A `palette` decides its own mode and wins. */
161
+ dark?: boolean;
139
162
  /** Callback fired when the refresh button is clicked. */
140
163
  onRefresh?: () => void;
141
164
  /** Callback fired when data is imported via the UI. */
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, 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';
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, PersistedPivotState, 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, PersistedPivotState, 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
 
@@ -44,6 +44,20 @@ interface PivotGridRef extends PivotGridRef$1 {
44
44
  * The vanilla grid hands out the same object as `api.controller`.
45
45
  */
46
46
  getController: () => PivotController<any>;
47
+ /**
48
+ * Everything the reader arranged, as versioned plain JSON — what
49
+ * `stateStoring` saves. Keep it anywhere (a tab cache, IndexedDB, a server)
50
+ * and hand it back to `applyPersistedState`.
51
+ */
52
+ getPersistedState: (options?: {
53
+ include?: readonly 'scroll'[];
54
+ }) => PersistedPivotState;
55
+ /**
56
+ * Put a `getPersistedState` snapshot back: fields, areas, sorting, filters,
57
+ * open members, totals, calculated fields, chart type, column widths. False,
58
+ * and nothing changed, when it cannot be read (another `version`).
59
+ */
60
+ applyPersistedState: (state: unknown) => boolean;
47
61
  }
48
62
  type PivotCellTemplate = (props: Parameters<PivotCellTemplate$1>[0]) => React$1.ReactNode;
49
63
  type PivotConditionRule = PivotConditionRule$1<React$1.CSSProperties>;
@@ -136,6 +150,15 @@ interface BasePivotGridProps<TRow> {
136
150
  layout?: PivotLayoutState;
137
151
  /** Custom theme configuration. */
138
152
  theme?: PivotTheme;
153
+ /**
154
+ * A colour scheme by id — one of the 36 packaged ones (`'nord'`,
155
+ * `'graphite'`…, with `@kanunilabs/pivotgrid-react/themes/<id>.css` imported
156
+ * after `styles.css`) or your own from the Theme Builder. The same name as the
157
+ * DataGrid's `palette`, so one value colours both. Wins over `theme.id`.
158
+ */
159
+ palette?: string;
160
+ /** The built-in dark look (the DataGrid's dark palette). A `palette` decides its own mode and wins. */
161
+ dark?: boolean;
139
162
  /** Callback fired when the refresh button is clicked. */
140
163
  onRefresh?: () => void;
141
164
  /** Callback fired when data is imported via the UI. */