@freegridjs/core 1.9.4 → 1.10.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.
- package/dist/cdn/freegrid.css +27 -8
- package/dist/cdn/freegrid.esm.js +23 -23
- package/dist/cdn/freegrid.min.js +24 -24
- package/dist/index.d.ts +3 -3
- package/dist/index.js +456 -80
- 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 +27 -8
- package/dist/{types-CIOv3MoN.d.ts → types-D5xV-gww.d.ts} +22 -1
- package/package.json +1 -1
package/dist/locales/de.d.ts
CHANGED
package/dist/locales/de.js
CHANGED
package/dist/locales/en.d.ts
CHANGED
package/dist/locales/en.js
CHANGED
package/dist/locales/es.d.ts
CHANGED
package/dist/locales/es.js
CHANGED
package/dist/locales/fr.d.ts
CHANGED
package/dist/locales/fr.js
CHANGED
package/dist/locales/id.d.ts
CHANGED
package/dist/locales/id.js
CHANGED
package/dist/locales/it.d.ts
CHANGED
package/dist/locales/it.js
CHANGED
package/dist/locales/ja.d.ts
CHANGED
package/dist/locales/ja.js
CHANGED
|
@@ -6,6 +6,8 @@ var ja = {
|
|
|
6
6
|
apply: "\u9069\u7528",
|
|
7
7
|
reset: "\u30EA\u30BB\u30C3\u30C8",
|
|
8
8
|
selectAll: "(\u3059\u3079\u3066\u9078\u629E)",
|
|
9
|
+
setSelected: "({n} \u4EF6\u9078\u629E)",
|
|
10
|
+
noAggregate: "\u96C6\u8A08\u3057\u306A\u3044",
|
|
9
11
|
search: "\u691C\u7D22\u2026",
|
|
10
12
|
blanks: "(\u7A7A\u767D)",
|
|
11
13
|
value: "\u5024",
|
package/dist/locales/ko.d.ts
CHANGED
package/dist/locales/ko.js
CHANGED
|
@@ -6,6 +6,8 @@ var ko = {
|
|
|
6
6
|
apply: "\uC801\uC6A9",
|
|
7
7
|
reset: "\uCD08\uAE30\uD654",
|
|
8
8
|
selectAll: "(\uC804\uCCB4 \uC120\uD0DD)",
|
|
9
|
+
setSelected: "({n}\uAC1C \uC120\uD0DD\uB428)",
|
|
10
|
+
noAggregate: "\uC9D1\uACC4 \uC548 \uD568",
|
|
9
11
|
search: "\uAC80\uC0C9\u2026",
|
|
10
12
|
blanks: "(\uBE48 \uAC12)",
|
|
11
13
|
value: "\uAC12",
|
package/dist/locales/pt-BR.d.ts
CHANGED
package/dist/locales/pt-BR.js
CHANGED
package/dist/locales/ru.d.ts
CHANGED
package/dist/locales/ru.js
CHANGED
|
@@ -6,6 +6,8 @@ var ru = {
|
|
|
6
6
|
apply: "\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C",
|
|
7
7
|
reset: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C",
|
|
8
8
|
selectAll: "(\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435)",
|
|
9
|
+
setSelected: "(\u0432\u044B\u0431\u0440\u0430\u043D\u043E: {n})",
|
|
10
|
+
noAggregate: "\u0411\u0435\u0437 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F",
|
|
9
11
|
search: "\u041F\u043E\u0438\u0441\u043A\u2026",
|
|
10
12
|
blanks: "(\u041F\u0443\u0441\u0442\u044B\u0435)",
|
|
11
13
|
value: "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435",
|
package/dist/locales/th.d.ts
CHANGED
package/dist/locales/th.js
CHANGED
|
@@ -6,6 +6,8 @@ var th = {
|
|
|
6
6
|
apply: "\u0E43\u0E0A\u0E49",
|
|
7
7
|
reset: "\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15",
|
|
8
8
|
selectAll: "(\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14)",
|
|
9
|
+
setSelected: "(\u0E40\u0E25\u0E37\u0E2D\u0E01 {n} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23)",
|
|
10
|
+
noAggregate: "\u0E44\u0E21\u0E48\u0E23\u0E27\u0E21\u0E04\u0E48\u0E32",
|
|
9
11
|
search: "\u0E04\u0E49\u0E19\u0E2B\u0E32\u2026",
|
|
10
12
|
blanks: "(\u0E27\u0E48\u0E32\u0E07)",
|
|
11
13
|
value: "\u0E04\u0E48\u0E32",
|
package/dist/locales/vi.d.ts
CHANGED
package/dist/locales/vi.js
CHANGED
|
@@ -6,6 +6,8 @@ var vi = {
|
|
|
6
6
|
apply: "\xC1p d\u1EE5ng",
|
|
7
7
|
reset: "\u0110\u1EB7t l\u1EA1i",
|
|
8
8
|
selectAll: "(Ch\u1ECDn t\u1EA5t c\u1EA3)",
|
|
9
|
+
setSelected: "(\u0111\xE3 ch\u1ECDn {n})",
|
|
10
|
+
noAggregate: "Kh\xF4ng t\u1ED5ng h\u1EE3p",
|
|
9
11
|
search: "T\xECm\u2026",
|
|
10
12
|
blanks: "(Tr\u1ED1ng)",
|
|
11
13
|
value: "Gi\xE1 tr\u1ECB",
|
package/dist/locales/zh-CN.d.ts
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.d.ts
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/styles.css
CHANGED
|
@@ -101,7 +101,8 @@
|
|
|
101
101
|
.fg-summary-label { color: var(--fg-muted); }
|
|
102
102
|
.fg-overlay { position: absolute; left: 0; right: 0; bottom: 0; display: grid; place-items: center; color: var(--fg-muted); pointer-events: none; }
|
|
103
103
|
.fg-menu {
|
|
104
|
-
|
|
104
|
+
/* border-box: the max-height set from the window size includes padding and border */
|
|
105
|
+
position: fixed; z-index: 10000; box-sizing: border-box; width: 262px; max-width: calc(100vw - 8px); padding: 6px; border-radius: 10px; overflow: auto; overscroll-behavior: contain;
|
|
105
106
|
font: var(--fg-font-size)/1.4 var(--fg-font); color: var(--fg-fg); background: var(--fg-popup-bg);
|
|
106
107
|
border: 1px solid var(--fg-border); box-shadow: var(--fg-shadow);
|
|
107
108
|
}
|
|
@@ -133,7 +134,7 @@
|
|
|
133
134
|
.fg-btn-primary { background: var(--fg-accent); border-color: var(--fg-accent); color: var(--fg-accent-fg); }
|
|
134
135
|
.fg-btn-primary:hover { background: var(--fg-accent); filter: brightness(1.08); }
|
|
135
136
|
.fg-sidebar { display: flex; flex: none; border-left: 1px solid var(--fg-border); background: var(--fg-header-bg); }
|
|
136
|
-
.fg-sidebar-panel { width: 240px; display: flex; flex-direction: column; border-right: 1px solid var(--fg-border); background: var(--fg-bg); }
|
|
137
|
+
.fg-sidebar-panel { width: min(240px, 50vw); display: flex; flex-direction: column; border-right: 1px solid var(--fg-border); background: var(--fg-bg); }
|
|
137
138
|
.fg-sidebar-tabs { width: 28px; display: flex; flex-direction: column; }
|
|
138
139
|
.fg-sidebar-tab {
|
|
139
140
|
writing-mode: vertical-rl; padding: 12px 0; border: 0; background: none; color: var(--fg-header-fg);
|
|
@@ -151,7 +152,7 @@
|
|
|
151
152
|
}
|
|
152
153
|
.fg-sidebar-open .fg-sidebar-tab:focus-visible { outline: 2px solid var(--fg-accent); outline-offset: -2px; }
|
|
153
154
|
.fg-chooser { display: flex; flex-direction: column; gap: 6px; padding: 8px; min-height: 0; flex: 1; }
|
|
154
|
-
.fg-chooser-dialog { width:
|
|
155
|
+
.fg-chooser-dialog { width: 294px; }
|
|
155
156
|
.fg-chooser-dialog .fg-chooser { max-height: 420px; }
|
|
156
157
|
.fg-chooser-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 0 0; }
|
|
157
158
|
.fg-chooser-close { width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--fg-muted); font-size: 18px; cursor: pointer; }
|
|
@@ -235,7 +236,7 @@
|
|
|
235
236
|
/* ── cell ranges, context menu, toast ───────────────────────────────── */
|
|
236
237
|
.fg-cell-range { background: var(--fg-range-bg, color-mix(in srgb, var(--fg-accent) 13%, transparent)); }
|
|
237
238
|
.fg-range-dragging, .fg-range-dragging * { user-select: none; cursor: cell; }
|
|
238
|
-
.fg-context-menu { width:
|
|
239
|
+
.fg-context-menu { width: 250px; }
|
|
239
240
|
.fg-cm-item { display: flex; align-items: center; gap: 12px; width: 100%; }
|
|
240
241
|
.fg-cm-item:disabled { opacity: .45; cursor: default; background: none; }
|
|
241
242
|
.fg-cm-label { flex: 1; }
|
|
@@ -410,9 +411,9 @@ textarea.fg-editor-control { padding-top: 8px; resize: none; }
|
|
|
410
411
|
.fg-free-badge {
|
|
411
412
|
position: absolute; right: 22px; bottom: 22px; z-index: 30; display: inline-flex; align-items: center; gap: 6px;
|
|
412
413
|
padding: 4px 10px 4px 6px; border-radius: 999px; background: rgba(255, 255, 255, .92); border: 1px solid rgba(14, 23, 38, .15);
|
|
413
|
-
box-shadow: 0 2px 8px rgba(14, 23, 38, .12); color: #0E1726; font: 600 11px/1.2 var(--fg-font); text-decoration: none; opacity: .
|
|
414
|
+
box-shadow: 0 2px 8px rgba(14, 23, 38, .12); color: #0E1726; font: 600 11px/1.2 var(--fg-font); text-decoration: none; opacity: .45;
|
|
415
|
+
pointer-events: none; user-select: none;
|
|
414
416
|
}
|
|
415
|
-
.fg-free-badge:hover { opacity: 1; }
|
|
416
417
|
.fg-free-badge svg { flex: none; }
|
|
417
418
|
|
|
418
419
|
/* column spans */
|
|
@@ -495,6 +496,24 @@ textarea.fg-editor-control { padding-top: 8px; resize: none; }
|
|
|
495
496
|
.fg-filter-join { display: flex; gap: 14px; padding: 2px 2px 0; font-size: .92em; color: var(--fg-muted); }
|
|
496
497
|
.fg-filter-join label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
|
|
497
498
|
|
|
499
|
+
/* advanced filter builder: one condition per line (column, operator, value, ×) */
|
|
500
|
+
.fg-filter-builder { width: 520px; display: flex; flex-direction: column; gap: 8px; }
|
|
501
|
+
.fg-filter-builder .fg-filter-join { padding: 0 4px; }
|
|
502
|
+
.fg-fb-list { display: flex; flex-direction: column; border-top: 1px solid var(--fg-border); border-bottom: 1px solid var(--fg-border); max-height: 50vh; overflow: auto; }
|
|
503
|
+
.fg-fb-list:empty { display: none; }
|
|
504
|
+
.fg-fb-row { display: flex; align-items: center; gap: 6px; padding: 6px 2px; }
|
|
505
|
+
.fg-fb-row + .fg-fb-row { border-top: 1px dashed var(--fg-border); }
|
|
506
|
+
.fg-fb-row > select, .fg-fb-row > input { flex: 1 1 0; min-width: 0; }
|
|
507
|
+
.fg-fb-row > .fg-fb-col, .fg-fb-row > .fg-fb-value { flex-grow: 1.3; }
|
|
508
|
+
.fg-fb-remove { flex: none; }
|
|
509
|
+
.fg-fb-group-label { flex: 1; min-width: 0; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-muted); }
|
|
510
|
+
.fg-fb-add { align-self: flex-start; }
|
|
511
|
+
@media (max-width: 560px) {
|
|
512
|
+
/* narrow screens: the column on its own line, operator and value under it */
|
|
513
|
+
.fg-fb-row { flex-wrap: wrap; }
|
|
514
|
+
.fg-fb-row > .fg-fb-col { flex-basis: calc(100% - 32px); }
|
|
515
|
+
}
|
|
516
|
+
|
|
498
517
|
/* autoHeight: grow with the rows */
|
|
499
518
|
.fg-root.fg-auto-height { height: auto; }
|
|
500
519
|
.fg-auto-height .fg-main, .fg-auto-height .fg-grid { flex: none; }
|
|
@@ -512,7 +531,7 @@ textarea.fg-editor-control { padding-top: 8px; resize: none; }
|
|
|
512
531
|
/* conditional formats */
|
|
513
532
|
.fg-cf-bar { background-image: linear-gradient(to right, transparent var(--fg-bar-from), color-mix(in srgb, var(--fg-bar-color) 38%, transparent) var(--fg-bar-from), color-mix(in srgb, var(--fg-bar-color) 38%, transparent) var(--fg-bar-to), transparent var(--fg-bar-to)); background-repeat: no-repeat; background-size: 100% 70%; background-position: 0 50%; }
|
|
514
533
|
.fg-cf-icon { display: inline-block; margin-inline-end: 6px; font-size: .9em; line-height: 1; }
|
|
515
|
-
.fg-cf-dialog { width:
|
|
534
|
+
.fg-cf-dialog { width: 354px; }
|
|
516
535
|
.fg-cf-list { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }
|
|
517
536
|
.fg-cf-rule { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border: 1px solid var(--fg-border); border-radius: 6px; }
|
|
518
537
|
.fg-cf-rule-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
@@ -525,7 +544,7 @@ textarea.fg-editor-control { padding-top: 8px; resize: none; }
|
|
|
525
544
|
.fg-cf-empty { color: var(--fg-muted); padding: 4px 0; }
|
|
526
545
|
|
|
527
546
|
/* AI assistant */
|
|
528
|
-
.fg-ai-panel { width:
|
|
547
|
+
.fg-ai-panel { width: 374px; display: flex; flex-direction: column; gap: 8px; }
|
|
529
548
|
.fg-ai-log { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
|
|
530
549
|
.fg-ai-log:empty { display: none; }
|
|
531
550
|
.fg-ai-msg { padding: 7px 10px; border-radius: 10px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 92%; }
|
|
@@ -283,7 +283,7 @@ type EditorSpec = {
|
|
|
283
283
|
| {
|
|
284
284
|
type: 'datetime';
|
|
285
285
|
} | ((params: EditorParams) => CustomEditor);
|
|
286
|
-
type KeyAction = 'edit' | 'clear' | 'undo' | 'redo' | 'copy' | 'cut' | 'paste' | 'selectAll' | 'find' | 'none';
|
|
286
|
+
type KeyAction = 'edit' | 'clear' | 'undo' | 'redo' | 'copy' | 'cut' | 'paste' | 'selectAll' | 'find' | 'columnMenu' | 'none';
|
|
287
287
|
interface ColumnState {
|
|
288
288
|
colId: string;
|
|
289
289
|
width: number;
|
|
@@ -296,6 +296,10 @@ interface Messages {
|
|
|
296
296
|
apply: string;
|
|
297
297
|
reset: string;
|
|
298
298
|
selectAll: string;
|
|
299
|
+
/** Filter row list when a set filter passes more than one value: '({n} selected)'. */
|
|
300
|
+
setSelected: string;
|
|
301
|
+
/** Column menu with rollup: the entry that removes a column's aggregate. */
|
|
302
|
+
noAggregate: string;
|
|
299
303
|
search: string;
|
|
300
304
|
blanks: string;
|
|
301
305
|
value: string;
|
|
@@ -757,6 +761,14 @@ interface GridOptions {
|
|
|
757
761
|
fontSize?: number;
|
|
758
762
|
/** CSS font-family list (default: the theme's system font stack). */
|
|
759
763
|
fontFamily?: string;
|
|
764
|
+
/** Space in px on the left and right inside every cell and header cell (default: the theme's, 12 at normal density). Wins over `density`. */
|
|
765
|
+
cellPadding?: number;
|
|
766
|
+
/**
|
|
767
|
+
* Merge rows that agree on every shown column without an `aggFunc`; columns with an `aggFunc` show the
|
|
768
|
+
* aggregate of the merged rows. Hiding, showing, adding or removing columns merges the rows again. Merged rows
|
|
769
|
+
* cannot be edited. Change it later with setRollup; set a column's aggregate with setColumnAggFunc.
|
|
770
|
+
*/
|
|
771
|
+
rollup?: boolean;
|
|
760
772
|
/** Dock a Columns panel on the right. `{ open: true }` starts expanded. */
|
|
761
773
|
sideBar?: boolean | {
|
|
762
774
|
open?: boolean;
|
|
@@ -1185,6 +1197,15 @@ interface GridApi {
|
|
|
1185
1197
|
size?: number;
|
|
1186
1198
|
family?: string | null;
|
|
1187
1199
|
}): void;
|
|
1200
|
+
/** Left and right space inside every cell and header cell, in px; `null` goes back to the theme / density value. */
|
|
1201
|
+
setCellPadding(px: number | null): void;
|
|
1202
|
+
/** The cell padding in use, in px. */
|
|
1203
|
+
getCellPadding(): number;
|
|
1204
|
+
/** Turn the `rollup` option on or off: rows merged by the shown columns without an aggFunc. */
|
|
1205
|
+
setRollup(on: boolean): void;
|
|
1206
|
+
getRollup(): boolean;
|
|
1207
|
+
/** Set a column's aggregate (group rows, rollup); null removes it, so with rollup the rows merge by that column. */
|
|
1208
|
+
setColumnAggFunc(colId: string, aggFunc: Aggregator | null): void;
|
|
1188
1209
|
setColumnVisible(colId: string, visible: boolean): void;
|
|
1189
1210
|
autoSizeColumns(colIds?: string[]): void;
|
|
1190
1211
|
resetColumnState(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@freegridjs/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
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",
|