@freegridjs/core 1.9.2 → 1.9.4
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/cdn/freegrid.css +542 -525
- package/dist/cdn/freegrid.esm.js +23 -23
- package/dist/cdn/freegrid.min.js +26 -26
- package/dist/index.d.ts +3 -3
- package/dist/index.js +583 -245
- package/dist/locales/de.d.ts +1 -1
- package/dist/locales/de.js +2 -0
- package/dist/locales/en.d.ts +1 -1
- package/dist/locales/en.js +2 -0
- package/dist/locales/es.d.ts +1 -1
- package/dist/locales/es.js +2 -0
- package/dist/locales/fr.d.ts +1 -1
- package/dist/locales/fr.js +2 -0
- package/dist/locales/id.d.ts +1 -1
- package/dist/locales/id.js +2 -0
- package/dist/locales/it.d.ts +1 -1
- package/dist/locales/it.js +2 -0
- package/dist/locales/ja.d.ts +1 -1
- package/dist/locales/ja.js +2 -0
- package/dist/locales/ko.d.ts +1 -1
- package/dist/locales/ko.js +2 -0
- package/dist/locales/pt-BR.d.ts +1 -1
- package/dist/locales/pt-BR.js +2 -0
- package/dist/locales/ru.d.ts +1 -1
- package/dist/locales/ru.js +2 -0
- package/dist/locales/th.d.ts +1 -1
- package/dist/locales/th.js +2 -0
- package/dist/locales/vi.d.ts +1 -1
- package/dist/locales/vi.js +2 -0
- package/dist/locales/zh-CN.d.ts +1 -1
- package/dist/locales/zh-CN.js +2 -0
- package/dist/locales/zh-TW.d.ts +1 -1
- package/dist/locales/zh-TW.js +2 -0
- package/dist/styles.css +542 -525
- package/dist/{types-Du3F8mqD.d.ts → types-CIOv3MoN.d.ts} +50 -1
- package/package.json +1 -1
|
@@ -152,6 +152,8 @@ interface ColumnDef {
|
|
|
152
152
|
validate?: (value: unknown, row: Row) => true | string;
|
|
153
153
|
/** Merge consecutive rows with the same value into one tall cell (or decide with a function). */
|
|
154
154
|
merge?: boolean | ((a: unknown, b: unknown, rowA: Row, rowB: Row) => boolean);
|
|
155
|
+
/** Where the text of a vertically merged cell sits: 'top' (default), 'middle' or 'bottom' of the part of the block in view. */
|
|
156
|
+
mergeAlign?: 'top' | 'middle' | 'bottom';
|
|
155
157
|
/** Let a long header label wrap onto more lines. */
|
|
156
158
|
wrapHeaderText?: boolean;
|
|
157
159
|
/** Rows this cell covers downwards (1 = itself). Takes precedence over `merge`. */
|
|
@@ -404,6 +406,9 @@ interface Messages {
|
|
|
404
406
|
style: string;
|
|
405
407
|
wholeRow: string;
|
|
406
408
|
count: string;
|
|
409
|
+
/** Alignment picker label and its choices ('none' keeps the column's alignment). */
|
|
410
|
+
align: string;
|
|
411
|
+
aligns: Record<'none' | 'left' | 'center' | 'right', string>;
|
|
407
412
|
types: Record<ConditionalFormatType, string>;
|
|
408
413
|
ops: {
|
|
409
414
|
notBetween: string;
|
|
@@ -561,6 +566,8 @@ interface CellStyle {
|
|
|
561
566
|
bold?: boolean;
|
|
562
567
|
italic?: boolean;
|
|
563
568
|
strike?: boolean;
|
|
569
|
+
/** Horizontal alignment of matching cells, over the column's own align (other values are ignored). */
|
|
570
|
+
align?: 'left' | 'center' | 'right';
|
|
564
571
|
}
|
|
565
572
|
type ConditionalFormatType = 'value' | 'formula' | 'top' | 'bottom' | 'aboveAverage' | 'belowAverage' | 'duplicate' | 'unique' | 'dataBar' | 'colorScale' | 'iconSet';
|
|
566
573
|
type ConditionalOp = 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'notBetween' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'blank' | 'notBlank';
|
|
@@ -833,6 +840,21 @@ interface GridOptions {
|
|
|
833
840
|
overflowTooltip?: boolean;
|
|
834
841
|
/** Boxes under the header that filter as you type: text contains; numbers >10, <=5, 10~20; dates >2026-01-01; a list for set columns. */
|
|
835
842
|
filterRow?: boolean;
|
|
843
|
+
/**
|
|
844
|
+
* With `merge` columns, sorting only reorders rows inside each merged block; the blocks stay where they are.
|
|
845
|
+
* Blocks come from the merge columns that are not being sorted by (the smallest block wins when merges nest).
|
|
846
|
+
* Ignored with a datasource and while rows are grouped, pivoted or shown as a tree. Default false.
|
|
847
|
+
*/
|
|
848
|
+
sortWithinMerges?: boolean;
|
|
849
|
+
/**
|
|
850
|
+
* Where the checkboxes go when `merge` columns are shown (needs `rowSelection`). 'rows' (default): one per row.
|
|
851
|
+
* A number n: one checkbox per block of the n-th merge column, counting the shown columns with `merge` from the left
|
|
852
|
+
* (system columns and `rowSpan` columns do not count). Blocks nest: a level-2 block ends wherever the first or the
|
|
853
|
+
* second merge column starts a new merged cell. The checkbox is drawn merged over its block and checks every row of it;
|
|
854
|
+
* Shift checks the blocks in between. A number above the count of merge columns uses the last one.
|
|
855
|
+
* Ignored (one checkbox per row) with a datasource and while rows are grouped, pivoted or shown as a tree.
|
|
856
|
+
*/
|
|
857
|
+
mergeSelection?: 'rows' | number;
|
|
836
858
|
/** A pinned column numbering the data rows 1, 2, 3… (continues across pages). Click a number to select the row. */
|
|
837
859
|
rowNumbers?: boolean | {
|
|
838
860
|
width?: number;
|
|
@@ -1058,6 +1080,15 @@ interface GridEvents {
|
|
|
1058
1080
|
cancel(): void;
|
|
1059
1081
|
};
|
|
1060
1082
|
}
|
|
1083
|
+
/** One checked merged block from getSelectedGroups(). */
|
|
1084
|
+
interface MergeSelectionGroup {
|
|
1085
|
+
/** The mergeSelection level the block belongs to. */
|
|
1086
|
+
level: number;
|
|
1087
|
+
/** Field → value of merge columns 1..level for the block. */
|
|
1088
|
+
values: Record<string, unknown>;
|
|
1089
|
+
/** Selected rows of the block in display order (every row of the block that passes the filters for getSelectedGroupsAllRows()). */
|
|
1090
|
+
rows: Row[];
|
|
1091
|
+
}
|
|
1061
1092
|
interface GridApi {
|
|
1062
1093
|
/** Replace all rows. The scroll position stays unless `scrollToTop` is set. */
|
|
1063
1094
|
setData(rows: Row[], options?: {
|
|
@@ -1112,6 +1143,24 @@ interface GridApi {
|
|
|
1112
1143
|
getXlsxSheet(options?: ExportOptions): XlsxSheet;
|
|
1113
1144
|
setDensity(density: 'compact' | 'normal' | 'comfortable'): void;
|
|
1114
1145
|
getDensity(): 'compact' | 'normal' | 'comfortable';
|
|
1146
|
+
/** Turn `sortWithinMerges` on or off; the rows are sorted again at once. */
|
|
1147
|
+
setSortWithinMerges(on: boolean): void;
|
|
1148
|
+
getSortWithinMerges(): boolean;
|
|
1149
|
+
/** Change `mergeSelection`: 'rows' for one checkbox per row, or the merge level whose blocks get one checkbox. The selected rows stay selected. */
|
|
1150
|
+
setMergeSelection(level: 'rows' | number): void;
|
|
1151
|
+
getMergeSelection(): 'rows' | number;
|
|
1152
|
+
/**
|
|
1153
|
+
* The selected rows by merged block of the `mergeSelection` level, in display order: one entry per block holding
|
|
1154
|
+
* selected rows, with the values of merge columns 1..level (by field, or column id without a field) and the block's
|
|
1155
|
+
* selected rows that pass the filters (for a checked block, all of its selectable rows). [] while mergeSelection is
|
|
1156
|
+
* 'rows' or block checkboxes do not apply.
|
|
1157
|
+
*/
|
|
1158
|
+
getSelectedGroups(): MergeSelectionGroup[];
|
|
1159
|
+
/**
|
|
1160
|
+
* Like getSelectedGroups(), but `rows` lists every row of each block that passes the filters, selected or not — for
|
|
1161
|
+
* example to act on a whole company when only some of its rows were ticked. [] while mergeSelection is 'rows'.
|
|
1162
|
+
*/
|
|
1163
|
+
getSelectedGroupsAllRows(): MergeSelectionGroup[];
|
|
1115
1164
|
/** Show the 'loading' or 'noRows' overlay yourself (for example while your own request runs); null goes back to automatic. */
|
|
1116
1165
|
showOverlay(kind: 'loading' | 'noRows' | null): void;
|
|
1117
1166
|
/** Print the rows as a table (current sort and filters, group rows and summary rows) on the paper you choose. */
|
|
@@ -1252,4 +1301,4 @@ interface GridApi {
|
|
|
1252
1301
|
destroy(): void;
|
|
1253
1302
|
}
|
|
1254
1303
|
|
|
1255
|
-
export { type
|
|
1304
|
+
export { type SavedGridState as $, type AdvancedFilter as A, type EditorSpec as B, type CellEvent as C, type Datasource as D, type ExportOptions as E, type FilterModel as F, type GridOptions as G, type FilterOp as H, type FilterType as I, type GridEvents as J, type GridRange as K, type LocalePack as L, type InvalidCell as M, type JsonExportOptions as N, type KeyAction as O, type MergeSelectionGroup as P, type Messages as Q, type Row as R, type NumberFilterModel as S, type NumberOp as T, type PdfOptions as U, type PivotConfig as V, type PrintOptions as W, type Region as X, type RowDragOptions as Y, type RowDropParams as Z, type RowDropPosition as _, type GridApi as a, type SavedStatePart as a0, type ScrollPosition as a1, type SelectOption as a2, type ServerParams as a3, type SetFilterModel as a4, type SortDir as a5, type SortItem as a6, type SpanParams as a7, type SummaryCell as a8, type SummaryOptions as a9, type SummaryRowDef as aa, type TextFilterModel as ab, type TextOp as ac, type TransactionResult as ad, type XlsxCell as ae, type XlsxSheet as af, readXlsx as ag, writeXlsx as ah, type RowTransaction as b, type AdvancedFilterCondition as c, type Aggregator as d, type AssistantAction as e, type AssistantColumn as f, type AssistantOptions as g, type AssistantRequest as h, type AssistantResult as i, type CellParams as j, type CellStyle as k, type ChartHandle as l, type ChartOptions as m, type ColumnDef as n, type ColumnState as o, type ColumnType as p, type CombinedFilterModel as q, type ConditionalFormat as r, type ConditionalFormatType as s, type ConditionalOp as t, type ContextMenuItem as u, type ContextMenuParams as v, type CustomEditor as w, type DateFilterModel as x, type DateOp as y, type EditorParams as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@freegridjs/core",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
4
4
|
"description": "FreeGrid — a fast data grid for the web: virtual scrolling, grouping, pivot, charts, Excel export, 7 languages. Free core; paid features free with a personal key.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|