@kanunilabs/pivotgrid 1.2.2 → 1.3.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.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PivotField, PivotCell, PivotEngineResult, PivotControllerOptions, PivotLayoutState, PivotTheme, PivotColumnWidthDefaults, PivotLocale, PivotDictionary, PivotStateStoringConfig, PivotToolbarConfig, PivotController, PivotRowTransaction, PivotTransactionResult } from '@kanunilabs/pivotgrid-core';
2
- export { ExportFormat, ExportOptions, FilterCondition, FilterGroup, FilterOperator, PivotArea, PivotController, PivotControllerOptions, PivotControllerState, PivotDictionary, PivotEngineResult, PivotField, PivotGroupInterval, PivotLayoutState, PivotLocale, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, defaultPivotLayout, getAdvancedExporter, registerAdvancedExporter } from '@kanunilabs/pivotgrid-core';
2
+ export { ExportFormat, ExportOptions, FilterCondition, FilterGroup, FilterOperator, PivotArea, PivotController, PivotControllerOptions, PivotControllerState, PivotDictionary, PivotEngineResult, PivotField, PivotGroupInterval, PivotLabelFilter, PivotLayoutState, PivotLocale, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, PivotValueFilter, defaultPivotLayout, getAdvancedExporter, registerAdvancedExporter } from '@kanunilabs/pivotgrid-core';
3
3
 
4
4
  /**
5
5
  * A themed portal host: carries the grid root's classes, inline theme vars,
@@ -169,6 +169,8 @@ interface PivotGridVanillaConfig<TRow = unknown> {
169
169
  data: TRow[];
170
170
  /** What identifies a row for `applyTransaction` — a field name or a function. */
171
171
  rowKey?: PivotControllerOptions<TRow>['rowKey'];
172
+ /** How long `applyTransactionAsync` collects transactions before applying them together. Default 50 ms. */
173
+ asyncTransactionWait?: number;
172
174
  initialFields?: PivotField<TRow>[];
173
175
  /** Controlled fields — same semantics as the React `fields` prop. */
174
176
  fields?: PivotField<TRow>[];
@@ -257,6 +259,14 @@ interface PivotGridApi<TRow = unknown> {
257
259
  * `PivotController.applyTransaction`. Rows are matched by the `rowKey` option.
258
260
  */
259
261
  applyTransaction(transaction: PivotRowTransaction<TRow>): PivotTransactionResult;
262
+ /**
263
+ * Queue a transaction; queued ones are merged and applied together after
264
+ * `asyncTransactionWait` ms — for a feed that ticks many times a second.
265
+ * See `PivotController.applyTransactionAsync`.
266
+ */
267
+ applyTransactionAsync(transaction: PivotRowTransaction<TRow>, callback?: () => void): void;
268
+ /** Apply the queued transactions now. */
269
+ flushAsyncTransactions(): void;
260
270
  setFields(fields: PivotField<TRow>[]): void;
261
271
  setLocale(locale: PivotLocale, dictionary?: Partial<PivotDictionary>, rtl?: boolean): void;
262
272
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PivotField, PivotCell, PivotEngineResult, PivotControllerOptions, PivotLayoutState, PivotTheme, PivotColumnWidthDefaults, PivotLocale, PivotDictionary, PivotStateStoringConfig, PivotToolbarConfig, PivotController, PivotRowTransaction, PivotTransactionResult } from '@kanunilabs/pivotgrid-core';
2
- export { ExportFormat, ExportOptions, FilterCondition, FilterGroup, FilterOperator, PivotArea, PivotController, PivotControllerOptions, PivotControllerState, PivotDictionary, PivotEngineResult, PivotField, PivotGroupInterval, PivotLayoutState, PivotLocale, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, defaultPivotLayout, getAdvancedExporter, registerAdvancedExporter } from '@kanunilabs/pivotgrid-core';
2
+ export { ExportFormat, ExportOptions, FilterCondition, FilterGroup, FilterOperator, PivotArea, PivotController, PivotControllerOptions, PivotControllerState, PivotDictionary, PivotEngineResult, PivotField, PivotGroupInterval, PivotLabelFilter, PivotLayoutState, PivotLocale, PivotPrefilter, PivotRowKey, PivotRowKeyResolver, PivotRowTransaction, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, PivotTransactionResult, PivotValueFilter, defaultPivotLayout, getAdvancedExporter, registerAdvancedExporter } from '@kanunilabs/pivotgrid-core';
3
3
 
4
4
  /**
5
5
  * A themed portal host: carries the grid root's classes, inline theme vars,
@@ -169,6 +169,8 @@ interface PivotGridVanillaConfig<TRow = unknown> {
169
169
  data: TRow[];
170
170
  /** What identifies a row for `applyTransaction` — a field name or a function. */
171
171
  rowKey?: PivotControllerOptions<TRow>['rowKey'];
172
+ /** How long `applyTransactionAsync` collects transactions before applying them together. Default 50 ms. */
173
+ asyncTransactionWait?: number;
172
174
  initialFields?: PivotField<TRow>[];
173
175
  /** Controlled fields — same semantics as the React `fields` prop. */
174
176
  fields?: PivotField<TRow>[];
@@ -257,6 +259,14 @@ interface PivotGridApi<TRow = unknown> {
257
259
  * `PivotController.applyTransaction`. Rows are matched by the `rowKey` option.
258
260
  */
259
261
  applyTransaction(transaction: PivotRowTransaction<TRow>): PivotTransactionResult;
262
+ /**
263
+ * Queue a transaction; queued ones are merged and applied together after
264
+ * `asyncTransactionWait` ms — for a feed that ticks many times a second.
265
+ * See `PivotController.applyTransactionAsync`.
266
+ */
267
+ applyTransactionAsync(transaction: PivotRowTransaction<TRow>, callback?: () => void): void;
268
+ /** Apply the queued transactions now. */
269
+ flushAsyncTransactions(): void;
260
270
  setFields(fields: PivotField<TRow>[]): void;
261
271
  setLocale(locale: PivotLocale, dictionary?: Partial<PivotDictionary>, rtl?: boolean): void;
262
272
  }