@kanunilabs/pivotgrid-react 1.4.2 → 1.5.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.cjs +2 -2
- package/dist/index.d.cts +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ 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
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, PivotLayoutProfile, PivotLayoutState, PivotLocale, PivotNode, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotSelectionMode, PivotSelectionRange, PivotSelectionState, PivotSelectionStats, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, defaultPivotLayout } 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';
|
|
6
6
|
import * as _dnd_kit_core from '@dnd-kit/core';
|
|
7
7
|
import { DragMoveEvent, DragEndEvent } from '@dnd-kit/core';
|
|
8
8
|
|
|
@@ -24,6 +24,14 @@ interface PivotGridRef extends PivotGridRef$1 {
|
|
|
24
24
|
* pivot follows asynchronously.
|
|
25
25
|
*/
|
|
26
26
|
applyTransaction: (transaction: PivotRowTransaction<any>) => PivotTransactionResult;
|
|
27
|
+
/**
|
|
28
|
+
* Queue a transaction; queued ones are merged and applied together after
|
|
29
|
+
* the `asyncTransactionWait` prop's milliseconds (default 50) — for a feed
|
|
30
|
+
* that ticks many times a second. The callback runs when its batch landed.
|
|
31
|
+
*/
|
|
32
|
+
applyTransactionAsync: (transaction: PivotRowTransaction<any>, callback?: () => void) => void;
|
|
33
|
+
/** Apply the queued transactions now. */
|
|
34
|
+
flushAsyncTransactions: () => void;
|
|
27
35
|
/**
|
|
28
36
|
* The controller behind the grid — for the calls that take one, such as the
|
|
29
37
|
* Enterprise AI layout functions (`getPivotAiSchema(ref.current.getController())`).
|
|
@@ -112,6 +120,8 @@ interface BasePivotGridProps<TRow> {
|
|
|
112
120
|
* object identity.
|
|
113
121
|
*/
|
|
114
122
|
rowKey?: PivotControllerOptions<TRow>['rowKey'];
|
|
123
|
+
/** How long `ref.applyTransactionAsync` collects transactions before applying them together. Default 50 ms. */
|
|
124
|
+
asyncTransactionWait?: number;
|
|
115
125
|
/** Initial field configuration (Uncontrolled mode). */
|
|
116
126
|
initialFields?: PivotField<TRow>[];
|
|
117
127
|
/** Controlled field configuration. If provided, component acts as controlled. */
|
|
@@ -374,6 +384,8 @@ interface PivotHeaderFilterPopupProps {
|
|
|
374
384
|
* existing direct consumer keeps compiling; BasePivotGrid always passes it.
|
|
375
385
|
*/
|
|
376
386
|
gridId?: string;
|
|
387
|
+
/** The value / label filter dialog (G-PIV-03): a footer button for row and column fields. */
|
|
388
|
+
onConditionFilter?: () => void;
|
|
377
389
|
}
|
|
378
390
|
declare const PivotHeaderFilterPopup: React__default.FC<PivotHeaderFilterPopupProps>;
|
|
379
391
|
|
|
@@ -399,8 +411,10 @@ interface PivotContextMenuProps {
|
|
|
399
411
|
icon?: any;
|
|
400
412
|
}[];
|
|
401
413
|
onEditCalculatedField?: () => void;
|
|
414
|
+
/** The value / label filter dialog (G-PIV-03); the item shows for row and column fields. */
|
|
415
|
+
onConditionFilter?: () => void;
|
|
402
416
|
}
|
|
403
|
-
declare function PivotContextMenu({ x, y, field, colPath, rowFields, onClose, onSort, onSortBySummary, onClearAllSorting, onHide, onSettings, onMoveField, onMoveToArea, onShowFieldChooser, customContextMenuItems, onEditCalculatedField }: PivotContextMenuProps): React$1.JSX.Element;
|
|
417
|
+
declare function PivotContextMenu({ x, y, field, colPath, rowFields, onClose, onSort, onSortBySummary, onClearAllSorting, onHide, onSettings, onMoveField, onMoveToArea, onShowFieldChooser, customContextMenuItems, onEditCalculatedField, onConditionFilter }: PivotContextMenuProps): React$1.JSX.Element;
|
|
404
418
|
|
|
405
419
|
interface NodeContextMenuState {
|
|
406
420
|
x: number;
|
|
@@ -516,6 +530,8 @@ declare function usePivotContextMenu(): {
|
|
|
516
530
|
setChooserOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
517
531
|
settingsFieldId: string | null;
|
|
518
532
|
setSettingsFieldId: React$1.Dispatch<React$1.SetStateAction<string | null>>;
|
|
533
|
+
conditionFieldId: string | null;
|
|
534
|
+
setConditionFieldId: React$1.Dispatch<React$1.SetStateAction<string | null>>;
|
|
519
535
|
contextMenu: {
|
|
520
536
|
x: number;
|
|
521
537
|
y: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ 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
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, PivotLayoutProfile, PivotLayoutState, PivotLocale, PivotNode, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotSelectionMode, PivotSelectionRange, PivotSelectionState, PivotSelectionStats, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, defaultPivotLayout } 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';
|
|
6
6
|
import * as _dnd_kit_core from '@dnd-kit/core';
|
|
7
7
|
import { DragMoveEvent, DragEndEvent } from '@dnd-kit/core';
|
|
8
8
|
|
|
@@ -24,6 +24,14 @@ interface PivotGridRef extends PivotGridRef$1 {
|
|
|
24
24
|
* pivot follows asynchronously.
|
|
25
25
|
*/
|
|
26
26
|
applyTransaction: (transaction: PivotRowTransaction<any>) => PivotTransactionResult;
|
|
27
|
+
/**
|
|
28
|
+
* Queue a transaction; queued ones are merged and applied together after
|
|
29
|
+
* the `asyncTransactionWait` prop's milliseconds (default 50) — for a feed
|
|
30
|
+
* that ticks many times a second. The callback runs when its batch landed.
|
|
31
|
+
*/
|
|
32
|
+
applyTransactionAsync: (transaction: PivotRowTransaction<any>, callback?: () => void) => void;
|
|
33
|
+
/** Apply the queued transactions now. */
|
|
34
|
+
flushAsyncTransactions: () => void;
|
|
27
35
|
/**
|
|
28
36
|
* The controller behind the grid — for the calls that take one, such as the
|
|
29
37
|
* Enterprise AI layout functions (`getPivotAiSchema(ref.current.getController())`).
|
|
@@ -112,6 +120,8 @@ interface BasePivotGridProps<TRow> {
|
|
|
112
120
|
* object identity.
|
|
113
121
|
*/
|
|
114
122
|
rowKey?: PivotControllerOptions<TRow>['rowKey'];
|
|
123
|
+
/** How long `ref.applyTransactionAsync` collects transactions before applying them together. Default 50 ms. */
|
|
124
|
+
asyncTransactionWait?: number;
|
|
115
125
|
/** Initial field configuration (Uncontrolled mode). */
|
|
116
126
|
initialFields?: PivotField<TRow>[];
|
|
117
127
|
/** Controlled field configuration. If provided, component acts as controlled. */
|
|
@@ -374,6 +384,8 @@ interface PivotHeaderFilterPopupProps {
|
|
|
374
384
|
* existing direct consumer keeps compiling; BasePivotGrid always passes it.
|
|
375
385
|
*/
|
|
376
386
|
gridId?: string;
|
|
387
|
+
/** The value / label filter dialog (G-PIV-03): a footer button for row and column fields. */
|
|
388
|
+
onConditionFilter?: () => void;
|
|
377
389
|
}
|
|
378
390
|
declare const PivotHeaderFilterPopup: React__default.FC<PivotHeaderFilterPopupProps>;
|
|
379
391
|
|
|
@@ -399,8 +411,10 @@ interface PivotContextMenuProps {
|
|
|
399
411
|
icon?: any;
|
|
400
412
|
}[];
|
|
401
413
|
onEditCalculatedField?: () => void;
|
|
414
|
+
/** The value / label filter dialog (G-PIV-03); the item shows for row and column fields. */
|
|
415
|
+
onConditionFilter?: () => void;
|
|
402
416
|
}
|
|
403
|
-
declare function PivotContextMenu({ x, y, field, colPath, rowFields, onClose, onSort, onSortBySummary, onClearAllSorting, onHide, onSettings, onMoveField, onMoveToArea, onShowFieldChooser, customContextMenuItems, onEditCalculatedField }: PivotContextMenuProps): React$1.JSX.Element;
|
|
417
|
+
declare function PivotContextMenu({ x, y, field, colPath, rowFields, onClose, onSort, onSortBySummary, onClearAllSorting, onHide, onSettings, onMoveField, onMoveToArea, onShowFieldChooser, customContextMenuItems, onEditCalculatedField, onConditionFilter }: PivotContextMenuProps): React$1.JSX.Element;
|
|
404
418
|
|
|
405
419
|
interface NodeContextMenuState {
|
|
406
420
|
x: number;
|
|
@@ -516,6 +530,8 @@ declare function usePivotContextMenu(): {
|
|
|
516
530
|
setChooserOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
|
|
517
531
|
settingsFieldId: string | null;
|
|
518
532
|
setSettingsFieldId: React$1.Dispatch<React$1.SetStateAction<string | null>>;
|
|
533
|
+
conditionFieldId: string | null;
|
|
534
|
+
setConditionFieldId: React$1.Dispatch<React$1.SetStateAction<string | null>>;
|
|
519
535
|
contextMenu: {
|
|
520
536
|
x: number;
|
|
521
537
|
y: number;
|