@freegridjs/core 0.1.0 → 0.7.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/dist/index.d.ts CHANGED
@@ -1,10 +1,82 @@
1
- import { G as GridOptions, a as GridApi, L as LocalePack } from './types-vxZQWo_S.js';
2
- export { A as Aggregator, C as CellEvent, b as CellParams, c as ColumnDef, d as ColumnState, e as ColumnType, D as DateFilterModel, f as DateOp, F as FilterModel, g as FilterOp, h as FilterType, i as GridEvents, M as Messages, N as NumberFilterModel, j as NumberOp, R as Region, k as Row, S as SetFilterModel, l as SortDir, m as SortItem, n as SummaryCell, o as SummaryOptions, p as SummaryRowDef, T as TextFilterModel, q as TextOp } from './types-vxZQWo_S.js';
1
+ import { G as GridOptions, a as GridApi, L as LocalePack } from './types-CusLVNhk.js';
2
+ export { A as Aggregator, C as CellEvent, b as CellParams, c as ChartHandle, d as ChartOptions, e as ColumnDef, f as ColumnState, g as ColumnType, h as ContextMenuItem, i as ContextMenuParams, j as CustomEditor, D as Datasource, k as DateFilterModel, l as DateOp, E as EditorParams, m as EditorSpec, n as ExportOptions, F as FilterModel, o as FilterOp, p as FilterType, q as GridEvents, r as GridRange, K as KeyAction, M as Messages, N as NumberFilterModel, s as NumberOp, P as PivotConfig, R as Region, t as Row, S as SelectOption, u as ServerParams, v as SetFilterModel, w as SortDir, x as SortItem, y as SummaryCell, z as SummaryOptions, B as SummaryRowDef, T as TextFilterModel, H as TextOp } from './types-CusLVNhk.js';
3
3
  export { default as en } from './locales/en.js';
4
4
 
5
5
  declare function createGrid(host: HTMLElement, options: GridOptions): GridApi;
6
6
 
7
+ /** FreeGrid version (kept in sync with releases.json by scripts/release.mjs). */
8
+ declare const version = "0.7.1";
9
+
10
+ interface LicenseInfo {
11
+ /** Licensed domains; each also covers its subdomains. */
12
+ domains: string[];
13
+ company: string;
14
+ /** Last valid day, YYYY-MM-DD. */
15
+ expires: string;
16
+ issued: string;
17
+ }
18
+ type LicenseResult = {
19
+ ok: true;
20
+ info: LicenseInfo;
21
+ } | {
22
+ ok: false;
23
+ reason: 'format' | 'signature' | 'expired' | 'domain' | 'unsupported';
24
+ info?: LicenseInfo;
25
+ };
26
+ /** Check a key's signature, expiry and domain. */
27
+ declare function verifyLicense(key: string, host: string, opts?: {
28
+ publicKey?: JsonWebKey;
29
+ now?: Date;
30
+ }): Promise<LicenseResult>;
31
+ /** Set the license key once for every grid on the page. */
32
+ declare function setLicenseKey(key: string): void;
33
+
34
+ /** A cell value, optionally with an Excel number format and bold text. */
35
+ type XlsxValue = string | number | boolean | Date | null | undefined;
36
+ type XlsxCell = XlsxValue | {
37
+ v: XlsxValue;
38
+ fmt?: string;
39
+ bold?: boolean;
40
+ };
41
+ interface XlsxSheet {
42
+ name?: string;
43
+ rows: XlsxCell[][];
44
+ /** Column widths in characters. */
45
+ widths?: number[];
46
+ /** Ranges like "A1:C1". */
47
+ merges?: string[];
48
+ /** Rows frozen at the top (also the AutoFilter row when `autoFilter` is set). */
49
+ freezeRows?: number;
50
+ autoFilter?: boolean;
51
+ }
52
+ /** Build an .xlsx workbook (stored zip) from rows of values. */
53
+ declare function writeXlsx(sheets: XlsxSheet[]): Uint8Array;
54
+ interface ReadSheet {
55
+ name: string;
56
+ rows: XlsxValue[][];
57
+ }
58
+ /** Read every sheet of an .xlsx file. Dates come back as Date, numbers as number, booleans as boolean. */
59
+ declare function readXlsx(input: ArrayBuffer | Uint8Array): Promise<ReadSheet[]>;
60
+
61
+ declare function parseCsv(text: string, sep?: string): string[][];
62
+
63
+ /** Dependency-free SVG charts: grouped or stacked bars, lines, areas and pies. */
64
+ type ChartType = 'bar' | 'stackedBar' | 'line' | 'area' | 'pie';
65
+ interface ChartSpec {
66
+ type: ChartType;
67
+ categories: string[];
68
+ series: {
69
+ name: string;
70
+ values: (number | null)[];
71
+ }[];
72
+ title?: string;
73
+ /** Locale for number formatting. */
74
+ locale?: string;
75
+ }
76
+ /** Draw (or redraw) a chart into `el`. */
77
+ declare function renderChart(el: HTMLElement, spec: ChartSpec): void;
78
+
7
79
  declare function registerLocale(pack: LocalePack): void;
8
80
  declare function resolveLocale(input?: string | Partial<LocalePack>, navLangs?: readonly string[]): LocalePack;
9
81
 
10
- export { GridApi, GridOptions, LocalePack, createGrid, registerLocale, resolveLocale };
82
+ export { type ChartSpec, type ChartType, GridApi, GridOptions, type LicenseInfo, LocalePack, type XlsxCell, type XlsxSheet, createGrid, parseCsv, readXlsx, registerLocale, renderChart, resolveLocale, setLicenseKey, verifyLicense, version, writeXlsx };