@kanunilabs/pivotgrid 1.6.0 → 1.6.2

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/dist/index.cjs +3 -3
  2. package/dist/index.d.cts +17 -1
  3. package/dist/index.d.ts +17 -1
  4. package/dist/index.js +3 -3
  5. package/dist/pivotgrid.umd.js +11 -11
  6. package/dist/styles.css +108 -17
  7. package/dist/themes/all.css +72 -0
  8. package/dist/themes/amber.css +2 -0
  9. package/dist/themes/aubergine.css +2 -0
  10. package/dist/themes/azure.css +2 -0
  11. package/dist/themes/burgundy.css +2 -0
  12. package/dist/themes/charcoal.css +2 -0
  13. package/dist/themes/contrast-dark.css +2 -0
  14. package/dist/themes/contrast-light.css +2 -0
  15. package/dist/themes/coral.css +2 -0
  16. package/dist/themes/corporate.css +2 -0
  17. package/dist/themes/deep-sea.css +2 -0
  18. package/dist/themes/editorial.css +2 -0
  19. package/dist/themes/ember.css +2 -0
  20. package/dist/themes/emerald.css +2 -0
  21. package/dist/themes/forest.css +2 -0
  22. package/dist/themes/glacier.css +2 -0
  23. package/dist/themes/graphite.css +2 -0
  24. package/dist/themes/indigo-night.css +2 -0
  25. package/dist/themes/indigo.css +2 -0
  26. package/dist/themes/ivory.css +2 -0
  27. package/dist/themes/lagoon.css +2 -0
  28. package/dist/themes/linen.css +2 -0
  29. package/dist/themes/midnight.css +2 -0
  30. package/dist/themes/mist.css +2 -0
  31. package/dist/themes/monochrome.css +2 -0
  32. package/dist/themes/onyx.css +2 -0
  33. package/dist/themes/orchid.css +2 -0
  34. package/dist/themes/porcelain.css +2 -0
  35. package/dist/themes/rose.css +2 -0
  36. package/dist/themes/sandstone.css +2 -0
  37. package/dist/themes/slate-night.css +2 -0
  38. package/dist/themes/slate.css +2 -0
  39. package/dist/themes/steel.css +2 -0
  40. package/dist/themes/stone.css +2 -0
  41. package/dist/themes/taupe.css +2 -0
  42. package/dist/themes/teal.css +2 -0
  43. package/dist/themes/terminal.css +2 -0
  44. package/package.json +3 -3
package/dist/index.d.cts CHANGED
@@ -177,10 +177,19 @@ interface PivotGridVanillaConfig<TRow = unknown> {
177
177
  /** Controlled layout — same semantics as the React `layout` prop. */
178
178
  layout?: PivotLayoutState;
179
179
  theme?: PivotTheme;
180
+ /**
181
+ * A colour scheme by id — one of the 36 packaged ones (`'nord'`,
182
+ * `'graphite'`…, with `@kanunilabs/pivotgrid/themes/<id>.css` loaded after
183
+ * `styles.css`) or your own from the Theme Builder. The same name as the
184
+ * DataGrid's `palette`, so one value colours both. Wins over `theme.id`.
185
+ */
186
+ palette?: string;
187
+ /** The built-in dark look (the DataGrid's dark palette). A `palette` decides its own mode and wins. */
188
+ dark?: boolean;
180
189
  striped?: boolean;
181
190
  /**
182
191
  * Row rhythm: `'compact'` (24px rows, one size smaller type), `'normal'`
183
- * (28px, the default) or `'comfortable'` (36px). Change it later with
192
+ * (28px, the default), `'comfortable'` (36px) or `'touch'` (45px rows and headers, every target 44px, for a touch screen). Change it later with
184
193
  * `setDensity`.
185
194
  */
186
195
  density?: PivotDensity;
@@ -260,6 +269,8 @@ interface PivotGridVanillaConfig<TRow = unknown> {
260
269
  onBeforePivotCalculate?: () => void;
261
270
  onAfterPivotCalculate?: PivotControllerOptions<TRow>['onAfterPivotCalculate'];
262
271
  onExporting?: PivotControllerOptions<TRow>['onExporting'];
272
+ /** Before a styled Excel export gives way to the plain .xls one; `false` cancels (B.23). */
273
+ onLargeExport?: PivotControllerOptions<TRow>['onLargeExport'];
263
274
  onError?: (error: Error) => void;
264
275
  onChartStateLoaded?: PivotControllerOptions<TRow>['onChartStateLoaded'];
265
276
  }
@@ -288,6 +299,11 @@ interface PivotGridApi<TRow = unknown> {
288
299
  setLocale(locale: PivotLocale, dictionary?: Partial<PivotDictionary>, rtl?: boolean): void;
289
300
  /** Switch the row rhythm (`compact` / `normal` / `comfortable`) and repaint. */
290
301
  setDensity(density: PivotDensity | undefined): void;
302
+ /** Open or close the field chooser from the app (B.28). */
303
+ openFieldChooser(): void;
304
+ closeFieldChooser(): void;
305
+ /** Every field's filter off in one change; the prefilter stays (B.28). */
306
+ clearAllFilters(): void;
291
307
  /** Quick search over the row members; `''` clears it. See `PivotController.setSearchText`. */
292
308
  setSearchText(text: string): void;
293
309
  }
package/dist/index.d.ts CHANGED
@@ -177,10 +177,19 @@ interface PivotGridVanillaConfig<TRow = unknown> {
177
177
  /** Controlled layout — same semantics as the React `layout` prop. */
178
178
  layout?: PivotLayoutState;
179
179
  theme?: PivotTheme;
180
+ /**
181
+ * A colour scheme by id — one of the 36 packaged ones (`'nord'`,
182
+ * `'graphite'`…, with `@kanunilabs/pivotgrid/themes/<id>.css` loaded after
183
+ * `styles.css`) or your own from the Theme Builder. The same name as the
184
+ * DataGrid's `palette`, so one value colours both. Wins over `theme.id`.
185
+ */
186
+ palette?: string;
187
+ /** The built-in dark look (the DataGrid's dark palette). A `palette` decides its own mode and wins. */
188
+ dark?: boolean;
180
189
  striped?: boolean;
181
190
  /**
182
191
  * Row rhythm: `'compact'` (24px rows, one size smaller type), `'normal'`
183
- * (28px, the default) or `'comfortable'` (36px). Change it later with
192
+ * (28px, the default), `'comfortable'` (36px) or `'touch'` (45px rows and headers, every target 44px, for a touch screen). Change it later with
184
193
  * `setDensity`.
185
194
  */
186
195
  density?: PivotDensity;
@@ -260,6 +269,8 @@ interface PivotGridVanillaConfig<TRow = unknown> {
260
269
  onBeforePivotCalculate?: () => void;
261
270
  onAfterPivotCalculate?: PivotControllerOptions<TRow>['onAfterPivotCalculate'];
262
271
  onExporting?: PivotControllerOptions<TRow>['onExporting'];
272
+ /** Before a styled Excel export gives way to the plain .xls one; `false` cancels (B.23). */
273
+ onLargeExport?: PivotControllerOptions<TRow>['onLargeExport'];
263
274
  onError?: (error: Error) => void;
264
275
  onChartStateLoaded?: PivotControllerOptions<TRow>['onChartStateLoaded'];
265
276
  }
@@ -288,6 +299,11 @@ interface PivotGridApi<TRow = unknown> {
288
299
  setLocale(locale: PivotLocale, dictionary?: Partial<PivotDictionary>, rtl?: boolean): void;
289
300
  /** Switch the row rhythm (`compact` / `normal` / `comfortable`) and repaint. */
290
301
  setDensity(density: PivotDensity | undefined): void;
302
+ /** Open or close the field chooser from the app (B.28). */
303
+ openFieldChooser(): void;
304
+ closeFieldChooser(): void;
305
+ /** Every field's filter off in one change; the prefilter stays (B.28). */
306
+ clearAllFilters(): void;
291
307
  /** Quick search over the row members; `''` clears it. See `PivotController.setSearchText`. */
292
308
  setSearchText(text: string): void;
293
309
  }