@kanunilabs/pivotgrid 1.3.0 → 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.
Files changed (45) hide show
  1. package/README.md +2 -2
  2. package/dist/index.cjs +3 -3
  3. package/dist/index.d.cts +22 -1
  4. package/dist/index.d.ts +22 -1
  5. package/dist/index.js +3 -3
  6. package/dist/pivotgrid.umd.js +8 -8
  7. package/dist/styles.css +249 -15
  8. package/dist/themes/all.css +1064 -0
  9. package/dist/themes/amber.css +28 -0
  10. package/dist/themes/aubergine.css +32 -0
  11. package/dist/themes/azure.css +28 -0
  12. package/dist/themes/burgundy.css +32 -0
  13. package/dist/themes/charcoal.css +32 -0
  14. package/dist/themes/contrast-dark.css +32 -0
  15. package/dist/themes/contrast-light.css +28 -0
  16. package/dist/themes/coral.css +28 -0
  17. package/dist/themes/corporate.css +28 -0
  18. package/dist/themes/deep-sea.css +32 -0
  19. package/dist/themes/editorial.css +28 -0
  20. package/dist/themes/ember.css +32 -0
  21. package/dist/themes/emerald.css +28 -0
  22. package/dist/themes/forest.css +32 -0
  23. package/dist/themes/glacier.css +28 -0
  24. package/dist/themes/graphite.css +32 -0
  25. package/dist/themes/indigo-night.css +32 -0
  26. package/dist/themes/indigo.css +28 -0
  27. package/dist/themes/ivory.css +28 -0
  28. package/dist/themes/lagoon.css +28 -0
  29. package/dist/themes/linen.css +28 -0
  30. package/dist/themes/midnight.css +32 -0
  31. package/dist/themes/mist.css +28 -0
  32. package/dist/themes/monochrome.css +28 -0
  33. package/dist/themes/onyx.css +32 -0
  34. package/dist/themes/orchid.css +28 -0
  35. package/dist/themes/porcelain.css +28 -0
  36. package/dist/themes/rose.css +28 -0
  37. package/dist/themes/sandstone.css +28 -0
  38. package/dist/themes/slate-night.css +32 -0
  39. package/dist/themes/slate.css +28 -0
  40. package/dist/themes/steel.css +32 -0
  41. package/dist/themes/stone.css +28 -0
  42. package/dist/themes/taupe.css +28 -0
  43. package/dist/themes/teal.css +28 -0
  44. package/dist/themes/terminal.css +32 -0
  45. package/package.json +6 -4
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { PivotField, PivotCell, PivotEngineResult, PivotControllerOptions, PivotLayoutState, PivotTheme, PivotColumnWidthDefaults, PivotLocale, PivotDictionary, PivotStateStoringConfig, PivotToolbarConfig, PivotController, PivotRowTransaction, PivotTransactionResult } from '@kanunilabs/pivotgrid-core';
1
+ import { PivotField, PivotCell, PivotEngineResult, PivotControllerOptions, PivotLayoutState, PivotTheme, PivotDensity, PivotColumnWidthDefaults, PivotLocale, PivotDictionary, PivotStateStoringConfig, PivotToolbarConfig, PivotController, PivotRowTransaction, PivotTransactionResult } from '@kanunilabs/pivotgrid-core';
2
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
  /**
@@ -178,6 +178,12 @@ interface PivotGridVanillaConfig<TRow = unknown> {
178
178
  layout?: PivotLayoutState;
179
179
  theme?: PivotTheme;
180
180
  striped?: boolean;
181
+ /**
182
+ * Row rhythm: `'compact'` (24px rows, one size smaller type), `'normal'`
183
+ * (28px, the default) or `'comfortable'` (36px). Change it later with
184
+ * `setDensity`.
185
+ */
186
+ density?: PivotDensity;
181
187
  /**
182
188
  * Starting widths in pixels: `{ rowHeader, data }` for every row-header
183
189
  * column and every data column. Defaults 150 and 95. A width the user drags
@@ -199,6 +205,17 @@ interface PivotGridVanillaConfig<TRow = unknown> {
199
205
  enabled: boolean;
200
206
  };
201
207
  disabled?: boolean;
208
+ /**
209
+ * A search box in the footer: shows only the row members whose caption
210
+ * contains the text, on top of the reader's own filters. Default false.
211
+ * `grid.setSearchText(text)` works either way.
212
+ */
213
+ search?: boolean;
214
+ /**
215
+ * Most column members drawn (default 1000); past it the grid says so and
216
+ * totals still count all the data. `0` or `Infinity` turns the cap off.
217
+ */
218
+ maxColumns?: number;
202
219
  /** Extra class on the root element. */
203
220
  className?: string;
204
221
  /**
@@ -269,6 +286,10 @@ interface PivotGridApi<TRow = unknown> {
269
286
  flushAsyncTransactions(): void;
270
287
  setFields(fields: PivotField<TRow>[]): void;
271
288
  setLocale(locale: PivotLocale, dictionary?: Partial<PivotDictionary>, rtl?: boolean): void;
289
+ /** Switch the row rhythm (`compact` / `normal` / `comfortable`) and repaint. */
290
+ setDensity(density: PivotDensity | undefined): void;
291
+ /** Quick search over the row members; `''` clears it. See `PivotController.setSearchText`. */
292
+ setSearchText(text: string): void;
272
293
  }
273
294
  declare function createPivotGrid<TRow = unknown>(container: HTMLElement, config: PivotGridVanillaConfig<TRow>): PivotGridApi<TRow>;
274
295
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PivotField, PivotCell, PivotEngineResult, PivotControllerOptions, PivotLayoutState, PivotTheme, PivotColumnWidthDefaults, PivotLocale, PivotDictionary, PivotStateStoringConfig, PivotToolbarConfig, PivotController, PivotRowTransaction, PivotTransactionResult } from '@kanunilabs/pivotgrid-core';
1
+ import { PivotField, PivotCell, PivotEngineResult, PivotControllerOptions, PivotLayoutState, PivotTheme, PivotDensity, PivotColumnWidthDefaults, PivotLocale, PivotDictionary, PivotStateStoringConfig, PivotToolbarConfig, PivotController, PivotRowTransaction, PivotTransactionResult } from '@kanunilabs/pivotgrid-core';
2
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
  /**
@@ -178,6 +178,12 @@ interface PivotGridVanillaConfig<TRow = unknown> {
178
178
  layout?: PivotLayoutState;
179
179
  theme?: PivotTheme;
180
180
  striped?: boolean;
181
+ /**
182
+ * Row rhythm: `'compact'` (24px rows, one size smaller type), `'normal'`
183
+ * (28px, the default) or `'comfortable'` (36px). Change it later with
184
+ * `setDensity`.
185
+ */
186
+ density?: PivotDensity;
181
187
  /**
182
188
  * Starting widths in pixels: `{ rowHeader, data }` for every row-header
183
189
  * column and every data column. Defaults 150 and 95. A width the user drags
@@ -199,6 +205,17 @@ interface PivotGridVanillaConfig<TRow = unknown> {
199
205
  enabled: boolean;
200
206
  };
201
207
  disabled?: boolean;
208
+ /**
209
+ * A search box in the footer: shows only the row members whose caption
210
+ * contains the text, on top of the reader's own filters. Default false.
211
+ * `grid.setSearchText(text)` works either way.
212
+ */
213
+ search?: boolean;
214
+ /**
215
+ * Most column members drawn (default 1000); past it the grid says so and
216
+ * totals still count all the data. `0` or `Infinity` turns the cap off.
217
+ */
218
+ maxColumns?: number;
202
219
  /** Extra class on the root element. */
203
220
  className?: string;
204
221
  /**
@@ -269,6 +286,10 @@ interface PivotGridApi<TRow = unknown> {
269
286
  flushAsyncTransactions(): void;
270
287
  setFields(fields: PivotField<TRow>[]): void;
271
288
  setLocale(locale: PivotLocale, dictionary?: Partial<PivotDictionary>, rtl?: boolean): void;
289
+ /** Switch the row rhythm (`compact` / `normal` / `comfortable`) and repaint. */
290
+ setDensity(density: PivotDensity | undefined): void;
291
+ /** Quick search over the row members; `''` clears it. See `PivotController.setSearchText`. */
292
+ setSearchText(text: string): void;
272
293
  }
273
294
  declare function createPivotGrid<TRow = unknown>(container: HTMLElement, config: PivotGridVanillaConfig<TRow>): PivotGridApi<TRow>;
274
295