@kanunilabs/pivotgrid 1.1.0 → 1.2.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.
- package/README.md +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +3 -3
- package/dist/pivotgrid.umd.js +11 -11
- package/dist/styles.css +3 -0
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PivotField, PivotCell, PivotEngineResult, PivotLayoutState, PivotTheme, PivotColumnWidthDefaults, PivotLocale, PivotDictionary, PivotStateStoringConfig, PivotToolbarConfig,
|
|
2
|
-
export { ExportFormat, ExportOptions, FilterCondition, FilterGroup, FilterOperator, PivotArea, PivotController, PivotControllerOptions, PivotControllerState, PivotDictionary, PivotEngineResult, PivotField, PivotGroupInterval, PivotLayoutState, PivotLocale, PivotPrefilter, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, defaultPivotLayout, getAdvancedExporter, registerAdvancedExporter } from '@kanunilabs/pivotgrid-core';
|
|
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';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A themed portal host: carries the grid root's classes, inline theme vars,
|
|
@@ -78,6 +78,18 @@ interface ChartSeriesDef {
|
|
|
78
78
|
name: string;
|
|
79
79
|
color: string;
|
|
80
80
|
yAxisId?: string;
|
|
81
|
+
/**
|
|
82
|
+
* The data field this series measures — so a chart can print its values
|
|
83
|
+
* with that field's own `format`. Set by the built-in transformers.
|
|
84
|
+
*/
|
|
85
|
+
fieldId?: string;
|
|
86
|
+
/**
|
|
87
|
+
* The column path this series belongs to ('' for a pivot without column
|
|
88
|
+
* fields) and its label. Series of the same group are the same column cut
|
|
89
|
+
* of different measures — what an X-Y chart pairs as x, y and size.
|
|
90
|
+
*/
|
|
91
|
+
seriesKey?: string;
|
|
92
|
+
seriesLabel?: string;
|
|
81
93
|
}
|
|
82
94
|
interface ChartSyncResult {
|
|
83
95
|
chartData: unknown[];
|
|
@@ -155,6 +167,8 @@ declare function resolveI18n(locale?: PivotLocale, dictionary?: Partial<PivotDic
|
|
|
155
167
|
interface PivotGridVanillaConfig<TRow = unknown> {
|
|
156
168
|
gridId?: string;
|
|
157
169
|
data: TRow[];
|
|
170
|
+
/** What identifies a row for `applyTransaction` — a field name or a function. */
|
|
171
|
+
rowKey?: PivotControllerOptions<TRow>['rowKey'];
|
|
158
172
|
initialFields?: PivotField<TRow>[];
|
|
159
173
|
/** Controlled fields — same semantics as the React `fields` prop. */
|
|
160
174
|
fields?: PivotField<TRow>[];
|
|
@@ -177,6 +191,8 @@ interface PivotGridVanillaConfig<TRow = unknown> {
|
|
|
177
191
|
workerUrl?: string | URL;
|
|
178
192
|
previewImport?: boolean;
|
|
179
193
|
registry?: PivotControllerOptions<TRow>['registry'];
|
|
194
|
+
/** Server-side pivot (Enterprise): the server aggregates; `data` is not read. */
|
|
195
|
+
serverSource?: PivotControllerOptions<TRow>['serverSource'];
|
|
180
196
|
keyboardNavigation?: {
|
|
181
197
|
enabled: boolean;
|
|
182
198
|
};
|
|
@@ -234,7 +250,13 @@ interface PivotGridApi<TRow = unknown> {
|
|
|
234
250
|
controller: PivotController<TRow>;
|
|
235
251
|
element: HTMLElement;
|
|
236
252
|
destroy(): void;
|
|
253
|
+
/** Replace every row (a full rebuild). */
|
|
237
254
|
setData(data: TRow[]): void;
|
|
255
|
+
/**
|
|
256
|
+
* Add, update and remove rows without rebuilding (live updates) — see
|
|
257
|
+
* `PivotController.applyTransaction`. Rows are matched by the `rowKey` option.
|
|
258
|
+
*/
|
|
259
|
+
applyTransaction(transaction: PivotRowTransaction<TRow>): PivotTransactionResult;
|
|
238
260
|
setFields(fields: PivotField<TRow>[]): void;
|
|
239
261
|
setLocale(locale: PivotLocale, dictionary?: Partial<PivotDictionary>, rtl?: boolean): void;
|
|
240
262
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PivotField, PivotCell, PivotEngineResult, PivotLayoutState, PivotTheme, PivotColumnWidthDefaults, PivotLocale, PivotDictionary, PivotStateStoringConfig, PivotToolbarConfig,
|
|
2
|
-
export { ExportFormat, ExportOptions, FilterCondition, FilterGroup, FilterOperator, PivotArea, PivotController, PivotControllerOptions, PivotControllerState, PivotDictionary, PivotEngineResult, PivotField, PivotGroupInterval, PivotLayoutState, PivotLocale, PivotPrefilter, PivotStateStoringConfig, PivotSummaryDisplayMode, PivotSummaryType, PivotTheme, PivotToolbarConfig, defaultPivotLayout, getAdvancedExporter, registerAdvancedExporter } from '@kanunilabs/pivotgrid-core';
|
|
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';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A themed portal host: carries the grid root's classes, inline theme vars,
|
|
@@ -78,6 +78,18 @@ interface ChartSeriesDef {
|
|
|
78
78
|
name: string;
|
|
79
79
|
color: string;
|
|
80
80
|
yAxisId?: string;
|
|
81
|
+
/**
|
|
82
|
+
* The data field this series measures — so a chart can print its values
|
|
83
|
+
* with that field's own `format`. Set by the built-in transformers.
|
|
84
|
+
*/
|
|
85
|
+
fieldId?: string;
|
|
86
|
+
/**
|
|
87
|
+
* The column path this series belongs to ('' for a pivot without column
|
|
88
|
+
* fields) and its label. Series of the same group are the same column cut
|
|
89
|
+
* of different measures — what an X-Y chart pairs as x, y and size.
|
|
90
|
+
*/
|
|
91
|
+
seriesKey?: string;
|
|
92
|
+
seriesLabel?: string;
|
|
81
93
|
}
|
|
82
94
|
interface ChartSyncResult {
|
|
83
95
|
chartData: unknown[];
|
|
@@ -155,6 +167,8 @@ declare function resolveI18n(locale?: PivotLocale, dictionary?: Partial<PivotDic
|
|
|
155
167
|
interface PivotGridVanillaConfig<TRow = unknown> {
|
|
156
168
|
gridId?: string;
|
|
157
169
|
data: TRow[];
|
|
170
|
+
/** What identifies a row for `applyTransaction` — a field name or a function. */
|
|
171
|
+
rowKey?: PivotControllerOptions<TRow>['rowKey'];
|
|
158
172
|
initialFields?: PivotField<TRow>[];
|
|
159
173
|
/** Controlled fields — same semantics as the React `fields` prop. */
|
|
160
174
|
fields?: PivotField<TRow>[];
|
|
@@ -177,6 +191,8 @@ interface PivotGridVanillaConfig<TRow = unknown> {
|
|
|
177
191
|
workerUrl?: string | URL;
|
|
178
192
|
previewImport?: boolean;
|
|
179
193
|
registry?: PivotControllerOptions<TRow>['registry'];
|
|
194
|
+
/** Server-side pivot (Enterprise): the server aggregates; `data` is not read. */
|
|
195
|
+
serverSource?: PivotControllerOptions<TRow>['serverSource'];
|
|
180
196
|
keyboardNavigation?: {
|
|
181
197
|
enabled: boolean;
|
|
182
198
|
};
|
|
@@ -234,7 +250,13 @@ interface PivotGridApi<TRow = unknown> {
|
|
|
234
250
|
controller: PivotController<TRow>;
|
|
235
251
|
element: HTMLElement;
|
|
236
252
|
destroy(): void;
|
|
253
|
+
/** Replace every row (a full rebuild). */
|
|
237
254
|
setData(data: TRow[]): void;
|
|
255
|
+
/**
|
|
256
|
+
* Add, update and remove rows without rebuilding (live updates) — see
|
|
257
|
+
* `PivotController.applyTransaction`. Rows are matched by the `rowKey` option.
|
|
258
|
+
*/
|
|
259
|
+
applyTransaction(transaction: PivotRowTransaction<TRow>): PivotTransactionResult;
|
|
238
260
|
setFields(fields: PivotField<TRow>[]): void;
|
|
239
261
|
setLocale(locale: PivotLocale, dictionary?: Partial<PivotDictionary>, rtl?: boolean): void;
|
|
240
262
|
}
|