@freegridjs/core 1.0.0 → 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.
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const de: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var de = {
72
72
  clearFilters: "Alle Filter entfernen",
73
73
  exportCsv: "Als CSV exportieren",
74
74
  exportExcel: "Nach Excel exportieren",
75
+ print: "Drucken\u2026",
75
76
  pivot: "Pivot",
76
77
  pivotMode: "Pivot-Modus",
77
78
  pivotRows: "Zeilengruppen",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const en: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var en = {
72
72
  clearFilters: "Clear all filters",
73
73
  exportCsv: "Export CSV",
74
74
  exportExcel: "Export Excel",
75
+ print: "Print\u2026",
75
76
  pivot: "Pivot",
76
77
  pivotMode: "Pivot mode",
77
78
  pivotRows: "Row groups",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const es: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var es = {
72
72
  clearFilters: "Quitar todos los filtros",
73
73
  exportCsv: "Exportar CSV",
74
74
  exportExcel: "Exportar a Excel",
75
+ print: "Imprimir\u2026",
75
76
  pivot: "Tabla din\xE1mica",
76
77
  pivotMode: "Modo tabla din\xE1mica",
77
78
  pivotRows: "Grupos de filas",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const fr: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var fr = {
72
72
  clearFilters: "Effacer tous les filtres",
73
73
  exportCsv: "Exporter en CSV",
74
74
  exportExcel: "Exporter vers Excel",
75
+ print: "Imprimer\u2026",
75
76
  pivot: "Tableau crois\xE9",
76
77
  pivotMode: "Mode tableau crois\xE9",
77
78
  pivotRows: "Groupes de lignes",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const id: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var id = {
72
72
  clearFilters: "Hapus semua filter",
73
73
  exportCsv: "Ekspor CSV",
74
74
  exportExcel: "Ekspor Excel",
75
+ print: "Cetak\u2026",
75
76
  pivot: "Pivot",
76
77
  pivotMode: "Mode pivot",
77
78
  pivotRows: "Grup baris",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const it: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var it = {
72
72
  clearFilters: "Rimuovi tutti i filtri",
73
73
  exportCsv: "Esporta CSV",
74
74
  exportExcel: "Esporta Excel",
75
+ print: "Stampa\u2026",
75
76
  pivot: "Pivot",
76
77
  pivotMode: "Modalit\xE0 pivot",
77
78
  pivotRows: "Gruppi di righe",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const ja: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var ja = {
72
72
  clearFilters: "\u3059\u3079\u3066\u306E\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u89E3\u9664",
73
73
  exportCsv: "CSV \u306B\u66F8\u304D\u51FA\u3059",
74
74
  exportExcel: "Excel \u306B\u66F8\u304D\u51FA\u3059",
75
+ print: "\u5370\u5237\u2026",
75
76
  pivot: "\u30D4\u30DC\u30C3\u30C8",
76
77
  pivotMode: "\u30D4\u30DC\u30C3\u30C8\u30E2\u30FC\u30C9",
77
78
  pivotRows: "\u884C\u30B0\u30EB\u30FC\u30D7",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const ko: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var ko = {
72
72
  clearFilters: "\uD544\uD130 \uBAA8\uB450 \uC9C0\uC6B0\uAE30",
73
73
  exportCsv: "CSV\uB85C \uB0B4\uBCF4\uB0B4\uAE30",
74
74
  exportExcel: "\uC5D1\uC140\uB85C \uB0B4\uBCF4\uB0B4\uAE30",
75
+ print: "\uC778\uC1C4\u2026",
75
76
  pivot: "\uD53C\uBC97",
76
77
  pivotMode: "\uD53C\uBC97 \uBAA8\uB4DC",
77
78
  pivotRows: "\uD589 \uADF8\uB8F9",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const ptBR: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var ptBR = {
72
72
  clearFilters: "Limpar todos os filtros",
73
73
  exportCsv: "Exportar CSV",
74
74
  exportExcel: "Exportar Excel",
75
+ print: "Imprimir\u2026",
75
76
  pivot: "Piv\xF4",
76
77
  pivotMode: "Modo piv\xF4",
77
78
  pivotRows: "Grupos de linhas",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const ru: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var ru = {
72
72
  clearFilters: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0432\u0441\u0435 \u0444\u0438\u043B\u044C\u0442\u0440\u044B",
73
73
  exportCsv: "\u042D\u043A\u0441\u043F\u043E\u0440\u0442 \u0432 CSV",
74
74
  exportExcel: "\u042D\u043A\u0441\u043F\u043E\u0440\u0442 \u0432 Excel",
75
+ print: "\u041F\u0435\u0447\u0430\u0442\u044C\u2026",
75
76
  pivot: "\u0421\u0432\u043E\u0434\u043D\u0430\u044F",
76
77
  pivotMode: "\u0420\u0435\u0436\u0438\u043C \u0441\u0432\u043E\u0434\u043D\u043E\u0439 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",
77
78
  pivotRows: "\u0413\u0440\u0443\u043F\u043F\u044B \u0441\u0442\u0440\u043E\u043A",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const th: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var th = {
72
72
  clearFilters: "\u0E25\u0E49\u0E32\u0E07\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
73
73
  exportCsv: "\u0E2A\u0E48\u0E07\u0E2D\u0E2D\u0E01 CSV",
74
74
  exportExcel: "\u0E2A\u0E48\u0E07\u0E2D\u0E2D\u0E01 Excel",
75
+ print: "\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u2026",
75
76
  pivot: "Pivot",
76
77
  pivotMode: "\u0E42\u0E2B\u0E21\u0E14 Pivot",
77
78
  pivotRows: "\u0E01\u0E25\u0E38\u0E48\u0E21\u0E41\u0E16\u0E27",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const vi: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var vi = {
72
72
  clearFilters: "X\xF3a t\u1EA5t c\u1EA3 b\u1ED9 l\u1ECDc",
73
73
  exportCsv: "Xu\u1EA5t CSV",
74
74
  exportExcel: "Xu\u1EA5t Excel",
75
+ print: "In\u2026",
75
76
  pivot: "Pivot",
76
77
  pivotMode: "Ch\u1EBF \u0111\u1ED9 pivot",
77
78
  pivotRows: "Nh\xF3m d\xF2ng",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const zhCN: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var zhCN = {
72
72
  clearFilters: "\u6E05\u9664\u6240\u6709\u7B5B\u9009",
73
73
  exportCsv: "\u5BFC\u51FA CSV",
74
74
  exportExcel: "\u5BFC\u51FA Excel",
75
+ print: "\u6253\u5370\u2026",
75
76
  pivot: "\u6570\u636E\u900F\u89C6",
76
77
  pivotMode: "\u900F\u89C6\u6A21\u5F0F",
77
78
  pivotRows: "\u884C\u5206\u7EC4",
@@ -1,4 +1,4 @@
1
- import { L as LocalePack } from '../types-D9gm8TyF.js';
1
+ import { L as LocalePack } from '../types-BDvXVuCe.js';
2
2
 
3
3
  declare const zhTW: LocalePack;
4
4
 
@@ -72,6 +72,7 @@ var zhTW = {
72
72
  clearFilters: "\u6E05\u9664\u6240\u6709\u7BE9\u9078",
73
73
  exportCsv: "\u532F\u51FA CSV",
74
74
  exportExcel: "\u532F\u51FA Excel",
75
+ print: "\u5217\u5370\u2026",
75
76
  pivot: "\u6A1E\u7D10\u5206\u6790",
76
77
  pivotMode: "\u6A1E\u7D10\u5206\u6790\u6A21\u5F0F",
77
78
  pivotRows: "\u5217\u7FA4\u7D44",
@@ -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. */
@@ -898,7 +922,14 @@ interface GridApi {
898
922
  newValue: unknown;
899
923
  }[];
900
924
  hasChanges(): boolean;
901
- commitChanges(): void;
925
+ /**
926
+ * Accept the changes as the new baseline. With `saved`, only those: each row is baselined at the values
927
+ * that were saved (edits made since stay changes) and the deleted rows are forgotten.
928
+ */
929
+ commitChanges(saved?: {
930
+ rows: Map<Row, Row>;
931
+ deleted: Row[];
932
+ }): void;
902
933
  revertChanges(): void;
903
934
  undo(): void;
904
935
  redo(): void;
@@ -958,4 +989,4 @@ interface GridApi {
958
989
  destroy(): void;
959
990
  }
960
991
 
961
- 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.0",
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",