@freegridjs/core 1.0.1 → 1.1.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.
@@ -353,6 +353,7 @@ interface Messages {
353
353
  clearFilters: string;
354
354
  exportCsv: string;
355
355
  exportExcel: string;
356
+ print: string;
356
357
  pivot: string;
357
358
  pivotMode: string;
358
359
  pivotRows: string;
@@ -460,6 +461,33 @@ interface ExportOptions {
460
461
  /** xlsx: carry column align and the text color, background and bold of `cellClass` into the file. Default true. */
461
462
  styles?: boolean;
462
463
  }
464
+ /** print() and getPrintHtml(): the export options plus how the page looks. */
465
+ interface PrintOptions extends ExportOptions {
466
+ /** Heading above the table; also the document title. */
467
+ title?: string;
468
+ /** A line under the title, such as the period or the filters used. */
469
+ subtitle?: string;
470
+ /** Text at the bottom left of every page. */
471
+ footer?: string;
472
+ /** Default 'A4'. */
473
+ paper?: 'A4' | 'A3' | 'A5' | 'B4' | 'B5' | 'letter' | 'legal';
474
+ /** 'auto' (default) turns the page sideways when the columns are too wide for portrait. */
475
+ orientation?: 'portrait' | 'landscape' | 'auto';
476
+ /** Scale the columns to the page width, keeping their proportions. Default true. */
477
+ fitToWidth?: boolean;
478
+ /** Print group rows with their counts and totals (every group, open or not). Default true. */
479
+ groups?: boolean;
480
+ /** Print the summary rows. Default true. */
481
+ summary?: boolean;
482
+ /** Shade every other row. Default true. */
483
+ striped?: boolean;
484
+ /** "1 / 3" at the bottom right of every page. Default true. */
485
+ pageNumbers?: boolean;
486
+ /** The print date and time at the top right. Default true. */
487
+ printedAt?: boolean;
488
+ /** A row number column. Default: when the grid shows row numbers. */
489
+ rowNumbers?: boolean;
490
+ }
463
491
  interface PivotConfig {
464
492
  /** Row fields; every field but the last becomes a group level. */
465
493
  rows: string[];
@@ -831,14 +859,10 @@ interface GridApi {
831
859
  getDensity(): 'compact' | 'normal' | 'comfortable';
832
860
  /** Show the 'loading' or 'noRows' overlay yourself (for example while your own request runs); null goes back to automatic. */
833
861
  showOverlay(kind: 'loading' | 'noRows' | null): void;
834
- /** Print the rows as a table (current sort and filters; same options as the exports, plus a title). */
835
- print(options?: ExportOptions & {
836
- title?: string;
837
- }): void;
862
+ /** Print the rows as a table (current sort and filters, group rows and summary rows) on the paper you choose. */
863
+ print(options?: PrintOptions): void;
838
864
  /** The HTML page print() would print. */
839
- getPrintHtml(options?: ExportOptions & {
840
- title?: string;
841
- }): string;
865
+ getPrintHtml(options?: PrintOptions): string;
842
866
  /** Check every editable cell against required, unique and validate. Empty when all rows are valid. */
843
867
  validate(): InvalidCell[];
844
868
  /** Scroll offsets of the rows area in px. */
@@ -965,4 +989,4 @@ interface GridApi {
965
989
  destroy(): void;
966
990
  }
967
991
 
968
- export { type TextOp as $, type AdvancedFilter as A, type RowTransaction as B, type CellEvent as C, type Datasource as D, type ExportOptions as E, type FilterModel as F, type GridOptions as G, type SavedStatePart as H, type InvalidCell as I, type ScrollPosition as J, type KeyAction as K, type LocalePack as L, type Messages as M, type NumberFilterModel as N, type SelectOption as O, type PivotConfig as P, type ServerParams as Q, type Row as R, type SavedGridState as S, type SetFilterModel as T, type SortDir as U, type SortItem as V, type SpanParams as W, type SummaryCell as X, type SummaryOptions as Y, type SummaryRowDef as Z, type TextFilterModel as _, type GridApi as a, type TransactionResult as a0, type XlsxCell as a1, type XlsxSheet as a2, readXlsx as a3, writeXlsx as a4, type AdvancedFilterCondition as b, type Aggregator as c, type CellParams as d, type ChartHandle as e, type ChartOptions as f, type ColumnDef as g, type ColumnState as h, type ColumnType as i, type CombinedFilterModel as j, type ContextMenuItem as k, type ContextMenuParams as l, type CustomEditor as m, type DateFilterModel as n, type DateOp as o, type EditorParams as p, type EditorSpec as q, type FilterOp as r, type FilterType as s, type GridEvents as t, type GridRange as u, type NumberOp as v, type Region as w, type RowDragOptions as x, type RowDropParams as y, type RowDropPosition as z };
992
+ export { type TextFilterModel as $, type AdvancedFilter as A, type RowDropPosition as B, type CellEvent as C, type Datasource as D, type ExportOptions as E, type FilterModel as F, type GridOptions as G, type RowTransaction as H, type InvalidCell as I, type SavedStatePart as J, type KeyAction as K, type LocalePack as L, type Messages as M, type NumberFilterModel as N, type ScrollPosition as O, type PivotConfig as P, type SelectOption as Q, type Row as R, type SavedGridState as S, type ServerParams as T, type SetFilterModel as U, type SortDir as V, type SortItem as W, type SpanParams as X, type SummaryCell as Y, type SummaryOptions as Z, type SummaryRowDef as _, type GridApi as a, type TextOp as a0, type TransactionResult as a1, type XlsxCell as a2, type XlsxSheet as a3, readXlsx as a4, writeXlsx as a5, type AdvancedFilterCondition as b, type Aggregator as c, type CellParams as d, type ChartHandle as e, type ChartOptions as f, type ColumnDef as g, type ColumnState as h, type ColumnType as i, type CombinedFilterModel as j, type ContextMenuItem as k, type ContextMenuParams as l, type CustomEditor as m, type DateFilterModel as n, type DateOp as o, type EditorParams as p, type EditorSpec as q, type FilterOp as r, type FilterType as s, type GridEvents as t, type GridRange as u, type NumberOp as v, type PrintOptions as w, type Region as x, type RowDragOptions as y, type RowDropParams as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freegridjs/core",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "FreeGrid — a fast data grid for the web (free for personal use): virtual scrolling, grouping, pivot, charts, Excel export, 7 languages.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",