@freegridjs/core 1.9.1 → 1.9.2
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 +525 -525
- package/dist/cdn/freegrid.esm.js +5 -5
- package/dist/cdn/freegrid.min.js +5 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -1
- package/dist/styles.css +525 -525
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { default as en } from './locales/en.js';
|
|
|
5
5
|
declare function createGrid(host: HTMLElement, options: GridOptions): GridApi;
|
|
6
6
|
|
|
7
7
|
/** FreeGrid version (kept in sync with releases.json by scripts/release.mjs). */
|
|
8
|
-
declare const version = "1.9.
|
|
8
|
+
declare const version = "1.9.2";
|
|
9
9
|
|
|
10
10
|
interface LicenseInfo {
|
|
11
11
|
/** Licensed domains; each also covers every subdomain below it (`*.example.com` means the same as `example.com`). */
|
package/dist/index.js
CHANGED
|
@@ -2271,6 +2271,24 @@ var Renderer = class {
|
|
|
2271
2271
|
else this.paintRow(row.el, node, i, cols, isSel, focusCol, hits, spans, range.first);
|
|
2272
2272
|
}
|
|
2273
2273
|
}
|
|
2274
|
+
if (spans.size) this.stickMergedText(top);
|
|
2275
|
+
}
|
|
2276
|
+
/**
|
|
2277
|
+
* A vertically merged cell taller than the view keeps its text in sight: the text moves down to the top of the
|
|
2278
|
+
* visible part of the block and stops in the block's last row. Runs on every scroll, also for rows not repainted.
|
|
2279
|
+
*/
|
|
2280
|
+
stickMergedText(viewTop) {
|
|
2281
|
+
for (const r of REGIONS3) {
|
|
2282
|
+
for (const row of this.painted[r].values()) {
|
|
2283
|
+
for (const c of row.el.querySelectorAll(".fg-cell-merged")) {
|
|
2284
|
+
const blockTop = Number(c.dataset.mergeTop);
|
|
2285
|
+
const last = Number(c.dataset.mergeLast);
|
|
2286
|
+
if (!Number.isFinite(blockTop) || !Number.isFinite(last)) continue;
|
|
2287
|
+
const shift = `${Math.round(Math.min(last, Math.max(0, viewTop - blockTop)))}px`;
|
|
2288
|
+
if (c.style.getPropertyValue("--fg-merge-shift") !== shift) c.style.setProperty("--fg-merge-shift", shift);
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2274
2292
|
}
|
|
2275
2293
|
/**
|
|
2276
2294
|
* Same row, only the column window moved: drop the cells that left and paint the ones that came in.
|
|
@@ -2349,9 +2367,16 @@ var Renderer = class {
|
|
|
2349
2367
|
cellEl.style.top = `${-(this.rowTop(i) - this.rowTop(s.start[i]))}px`;
|
|
2350
2368
|
cellEl.style.height = `${this.rowTop(s.end[i]) + this.rowH(s.end[i]) - this.rowTop(s.start[i])}px`;
|
|
2351
2369
|
cellEl.style.bottom = "auto";
|
|
2370
|
+
cellEl.dataset.mergeTop = String(this.rowTop(s.start[i]));
|
|
2371
|
+
cellEl.dataset.mergeLast = String(this.rowTop(s.end[i]) - this.rowTop(s.start[i]));
|
|
2352
2372
|
drawsMerge = true;
|
|
2353
2373
|
} else cellEl.classList.add("fg-cell-merge-hidden");
|
|
2354
2374
|
}
|
|
2375
|
+
if (!cellEl.classList.contains("fg-cell-merged") && cellEl.dataset.mergeTop !== void 0) {
|
|
2376
|
+
delete cellEl.dataset.mergeTop;
|
|
2377
|
+
delete cellEl.dataset.mergeLast;
|
|
2378
|
+
cellEl.style.removeProperty("--fg-merge-shift");
|
|
2379
|
+
}
|
|
2355
2380
|
if (!isSystemCol(col.id) && bounds.some((b) => col.index >= b.c1 && col.index <= b.c2)) cellEl.classList.add("fg-cell-range");
|
|
2356
2381
|
});
|
|
2357
2382
|
rowEl.style.zIndex = drawsMerge ? "1" : "";
|
|
@@ -7644,7 +7669,7 @@ var PAID_FEATURES = {
|
|
|
7644
7669
|
};
|
|
7645
7670
|
|
|
7646
7671
|
// src/version.ts
|
|
7647
|
-
var version = "1.9.
|
|
7672
|
+
var version = "1.9.2";
|
|
7648
7673
|
|
|
7649
7674
|
// src/license.ts
|
|
7650
7675
|
var PUBLIC_KEY = { kty: "EC", crv: "P-256", x: "sUTKkglZmk-HMKPNub8p7AeLBKesHCU8irIkw9rJlbE", y: "j0U_aKRDR7iApY9UpaD3hUemhBLZJwDv9-QiT_hUyw8" };
|