@svgrid/grid-wc 2.6.2 → 2.7.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/{GridMenus-CU_-Ks4f.js → GridMenus-DE0zNY_3.js} +263 -242
- package/dist/{SvDateTimePicker-Ch1Vug8H.js → SvDateTimePicker-BpeEupA2.js} +81 -81
- package/dist/{SvGrid.helpers-CgUd39VT.js → SvGrid.helpers-BZPDBcza.js} +27 -11
- package/dist/{SvGridCellEditor-CBJUbAsR.js → SvGridCellEditor-_rqEaig7.js} +148 -140
- package/dist/{SvGridChart-BztTavvw.js → SvGridChart-yK5Zv85y.js} +158 -158
- package/dist/{SvGridChartPanel-Ca5HWIZ3.js → SvGridChartPanel-B38_VjXM.js} +52 -52
- package/dist/{SvGridChartView-AcWj_tcs.js → SvGridChartView-ScXTF6t-.js} +4 -4
- package/dist/{SvGridDropdown-BXqvR1cs.js → SvGridDropdown-DnAESFDu.js} +29 -29
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +358 -0
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -0
- package/dist/angular/package.json +25 -0
- package/dist/angular/types/svgrid-grid-wc-angular.d.ts +161 -0
- package/dist/{client-DoXxrq8q.js → client-DjwUji8D.js} +1 -1
- package/dist/column-resize-DvCRUrN3.js +101 -0
- package/dist/{dismissable-xj_k_fnZ.js → dismissable-Nx79OIVg.js} +36 -36
- package/dist/react/index.d.ts +313 -0
- package/dist/react/index.js +72 -0
- package/dist/row-resize-D-8s3cqT.js +94 -0
- package/dist/shadow/GridMenus-DE0zNY_3.js +1022 -0
- package/dist/shadow/SvDateTimePicker-BpeEupA2.js +1885 -0
- package/dist/shadow/SvGrid.helpers-BZPDBcza.js +125 -0
- package/dist/shadow/SvGridCellEditor-_rqEaig7.js +531 -0
- package/dist/shadow/SvGridChart-yK5Zv85y.js +1199 -0
- package/dist/shadow/SvGridChartPanel-B38_VjXM.js +584 -0
- package/dist/shadow/SvGridChartView-ScXTF6t-.js +50 -0
- package/dist/shadow/SvGridDropdown-DnAESFDu.js +256 -0
- package/dist/shadow/cell-formatting-C0OsDmi_.js +86 -0
- package/dist/shadow/chart-uvs3sFJA.js +1220 -0
- package/dist/shadow/client-DjwUji8D.js +2960 -0
- package/dist/shadow/column-resize-DvCRUrN3.js +101 -0
- package/dist/shadow/dismissable-Nx79OIVg.js +186 -0
- package/dist/shadow/editor-contract-peBDxir_.js +22 -0
- package/dist/shadow/editor-registry-DxGKqcvx.js +24 -0
- package/dist/shadow/export-format-C8kZGZfz.js +161 -0
- package/dist/shadow/popover-WsGlvtQv.js +69 -0
- package/dist/shadow/row-drag-touch-Ddaa-QeB.js +91 -0
- package/dist/shadow/row-resize-D-8s3cqT.js +94 -0
- package/dist/shadow/sv-grid-shadow-element.d.ts +246 -0
- package/dist/shadow/sv-grid-shadow-element.js +10067 -0
- package/dist/{svelte-virtualizer.svelte-CFoYP2Ls.js → shadow/svelte-virtualizer.svelte-DZ9UcyfT.js} +35 -30
- package/dist/shadow/validate-CgmAtX1A.js +75 -0
- package/dist/sv-grid-element.d.ts +246 -0
- package/dist/sv-grid-element.js +3619 -2692
- package/dist/svelte-virtualizer.svelte-DZ9UcyfT.js +527 -0
- package/dist/validate-CgmAtX1A.js +75 -0
- package/dist/vue/index.d.ts +147 -0
- package/dist/vue/index.js +72 -0
- package/package.json +71 -6
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
//#region ../grid/dist/row-resize.js
|
|
2
|
+
var e = "sv-grid-row-resize-handle";
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
let r = n, i = null;
|
|
5
|
+
function a(e) {
|
|
6
|
+
let t = e.querySelector("[data-svgrid-row]")?.dataset.svgridRow;
|
|
7
|
+
return t == null ? NaN : Number(t);
|
|
8
|
+
}
|
|
9
|
+
function o(e) {
|
|
10
|
+
if (!i) return;
|
|
11
|
+
let t = r.min ?? 20, n = r.max ?? 320, a = Math.max(t, Math.min(n, i.startHeight + (e.clientY - i.startY)));
|
|
12
|
+
i.trEl.style.height = `${Math.round(a)}px`, r.onResizeMove?.(i.rowIndex, Math.round(a));
|
|
13
|
+
}
|
|
14
|
+
function s(e) {
|
|
15
|
+
if (!i) return;
|
|
16
|
+
let t = r.min ?? 20, n = r.max ?? 320, a = Math.max(t, Math.min(n, i.startHeight + (e.clientY - i.startY)));
|
|
17
|
+
r.onResize(i.rowIndex, Math.round(a)), i.strip.classList.remove("is-resizing");
|
|
18
|
+
try {
|
|
19
|
+
i.trEl.releasePointerCapture(e.pointerId);
|
|
20
|
+
} catch {}
|
|
21
|
+
i = null, window.removeEventListener("pointermove", o), window.removeEventListener("pointerup", s), document.body.style.cursor = "";
|
|
22
|
+
}
|
|
23
|
+
function c(t) {
|
|
24
|
+
if (r.disabled) return;
|
|
25
|
+
let n = t.target;
|
|
26
|
+
if (!n?.classList.contains(e)) return;
|
|
27
|
+
let i = t.shiftKey ? 1 : 10, o = 0;
|
|
28
|
+
if (t.key === "ArrowUp") o = -i;
|
|
29
|
+
else if (t.key === "ArrowDown") o = i;
|
|
30
|
+
else return;
|
|
31
|
+
let s = n.closest("tr.sv-grid-row");
|
|
32
|
+
if (!s) return;
|
|
33
|
+
let c = a(s);
|
|
34
|
+
if (!Number.isFinite(c)) return;
|
|
35
|
+
t.preventDefault(), t.stopPropagation();
|
|
36
|
+
let l = r.min ?? 20, u = r.max ?? 320, d = Math.round(Math.max(l, Math.min(u, s.getBoundingClientRect().height + o)));
|
|
37
|
+
s.style.height = `${d}px`, r.onResizeMove?.(c, d), r.onResize(c, d);
|
|
38
|
+
}
|
|
39
|
+
function l(t) {
|
|
40
|
+
if (r.disabled) return;
|
|
41
|
+
let n = t.target;
|
|
42
|
+
if (!n?.classList.contains(e)) return;
|
|
43
|
+
let c = n.closest("tr.sv-grid-row");
|
|
44
|
+
if (!c) return;
|
|
45
|
+
let l = a(c);
|
|
46
|
+
if (Number.isFinite(l)) {
|
|
47
|
+
t.preventDefault(), t.stopPropagation(), n.classList.add("is-resizing"), i = {
|
|
48
|
+
rowIndex: l,
|
|
49
|
+
startY: t.clientY,
|
|
50
|
+
startHeight: c.getBoundingClientRect().height,
|
|
51
|
+
trEl: c,
|
|
52
|
+
strip: n
|
|
53
|
+
};
|
|
54
|
+
try {
|
|
55
|
+
c.setPointerCapture(t.pointerId);
|
|
56
|
+
} catch {}
|
|
57
|
+
document.body.style.cursor = "row-resize", window.addEventListener("pointermove", o), window.addEventListener("pointerup", s);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function u() {
|
|
61
|
+
if (r.disabled) {
|
|
62
|
+
d();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
let n = t.querySelectorAll("tr.sv-grid-row");
|
|
66
|
+
for (let t of n) {
|
|
67
|
+
if (t.classList.contains("sv-grid-header-row") || t.classList.contains("sv-grid-row-spacer")) continue;
|
|
68
|
+
let n = t.querySelector(".sv-grid-cell.sv-row-gutter, .sv-grid-cell.sv-grid-row-number-cell") ?? (r.anchor === "row" ? t.querySelector(".sv-grid-cell") : null);
|
|
69
|
+
if (!n || n.querySelector(`:scope > .${e}`)) continue;
|
|
70
|
+
getComputedStyle(n).position === "static" && (n.style.position = "relative"), n.style.overflow = "visible";
|
|
71
|
+
let i = document.createElement("div");
|
|
72
|
+
i.className = e, i.setAttribute("role", "separator"), i.setAttribute("aria-orientation", "horizontal"), i.setAttribute("aria-label", "Resize row"), i.tabIndex = 0, i.style.cssText = "position:absolute;left:0;right:0;bottom:0;height:5px;cursor:row-resize;user-select:none;z-index:60;pointer-events:auto;", n.appendChild(i);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function d() {
|
|
76
|
+
t.querySelectorAll(`.${e}`).forEach((e) => e.remove());
|
|
77
|
+
}
|
|
78
|
+
t.addEventListener("pointerdown", l, { capture: !0 }), t.addEventListener("keydown", c, { capture: !0 });
|
|
79
|
+
let f = new MutationObserver(() => u());
|
|
80
|
+
return f.observe(t, {
|
|
81
|
+
childList: !0,
|
|
82
|
+
subtree: !0
|
|
83
|
+
}), u(), {
|
|
84
|
+
update(e) {
|
|
85
|
+
let t = r.disabled;
|
|
86
|
+
r = e, t !== r.disabled && u();
|
|
87
|
+
},
|
|
88
|
+
destroy() {
|
|
89
|
+
t.removeEventListener("pointerdown", l, { capture: !0 }), t.removeEventListener("keydown", c, { capture: !0 }), window.removeEventListener("pointermove", o), window.removeEventListener("pointerup", s), f.disconnect(), d();
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { t as rowResize };
|