@svgrid/grid-wc 3.0.2 → 3.0.3

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.
Files changed (57) hide show
  1. package/README.md +4 -1
  2. package/dist/GridMenus-DMkf7UMn.js +1086 -0
  3. package/dist/{SvChartMenu-CBMKm7Xb.js → SvChartMenu-DkSyLWYH.js} +2 -2
  4. package/dist/{shadow/SvDateTimePicker-CnLlqNDQ.js → SvDateTimePicker-Czin1Ead.js} +1 -1
  5. package/dist/{shadow/SvGridCellEditor-B005dmV1.js → SvGridCellEditor-DhXEIlyE.js} +1 -1
  6. package/dist/{SvGridChart-4TcL9Rj2.js → SvGridChart-BMdCbrqb.js} +5 -5
  7. package/dist/{SvGridChartBuilder-C4OL4XYx.js → SvGridChartBuilder-Chp_MD1B.js} +121 -120
  8. package/dist/{shadow/SvGridChartPanel-CfHA8Ioq.js → SvGridChartPanel-BIV2O2Lp.js} +6 -6
  9. package/dist/{SvGridChartView-Ci-9_EJ0.js → SvGridChartView-DyhkumD-.js} +2 -2
  10. package/dist/{SvGridDropdown-BlA6iw9m.js → SvGridDropdown-BwPpGwLz.js} +140 -140
  11. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +37 -3
  12. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
  13. package/dist/angular/types/svgrid-grid-wc-angular.d.ts +16 -1
  14. package/dist/{shadow/cell-formatting-Eypm-id0.js → cell-formatting-CBfgahv1.js} +1 -1
  15. package/dist/chart/{SvChartMenu-C-sbGNk8.js → SvChartMenu-DslxOgPN.js} +5 -1
  16. package/dist/chart/{chart-summary-B86RFA3M.js → chart-summary-6Xu2JoNC.js} +1 -1
  17. package/dist/chart/{chart-trend-DP6DSsBa.js → chart-trend-7fxtAqEl.js} +1 -1
  18. package/dist/chart/sv-chart-element.js +3 -3
  19. package/dist/{chart-DoqdUoGg.js → chart-D_LKA1fr.js} +1 -1
  20. package/dist/{chart-export-pdf-BirUdchl.js → chart-export-pdf-9OCvhzr0.js} +1 -1
  21. package/dist/{shadow/chart-summary-BP9i-v8M.js → chart-summary-v3Lhe8YD.js} +1 -1
  22. package/dist/{shadow/dismissable-DvhBKm3q.js → dismissable-CQ6XFXsk.js} +5 -1
  23. package/dist/{export-format-uGayRKWM.js → export-format-CAi1mp-1.js} +1 -1
  24. package/dist/{shadow/focus-trap-DvlOlOGM.js → focus-trap-Dbb2tJxb.js} +1 -1
  25. package/dist/react/index.d.ts +44 -0
  26. package/dist/react/index.js +5 -1
  27. package/dist/{row-resize-Cf8qPLbi.js → row-resize-limG_N1z.js} +41 -32
  28. package/dist/shadow/GridMenus-DMkf7UMn.js +1086 -0
  29. package/dist/shadow/{SvChartMenu-CBMKm7Xb.js → SvChartMenu-DkSyLWYH.js} +2 -2
  30. package/dist/{SvDateTimePicker-CnLlqNDQ.js → shadow/SvDateTimePicker-Czin1Ead.js} +1 -1
  31. package/dist/{SvGridCellEditor-B005dmV1.js → shadow/SvGridCellEditor-DhXEIlyE.js} +1 -1
  32. package/dist/shadow/{SvGridChart-4TcL9Rj2.js → SvGridChart-BMdCbrqb.js} +5 -5
  33. package/dist/shadow/{SvGridChartBuilder-C4OL4XYx.js → SvGridChartBuilder-Chp_MD1B.js} +121 -120
  34. package/dist/{SvGridChartPanel-CfHA8Ioq.js → shadow/SvGridChartPanel-BIV2O2Lp.js} +6 -6
  35. package/dist/shadow/{SvGridChartView-Ci-9_EJ0.js → SvGridChartView-DyhkumD-.js} +2 -2
  36. package/dist/shadow/{SvGridDropdown-BlA6iw9m.js → SvGridDropdown-BwPpGwLz.js} +140 -140
  37. package/dist/{cell-formatting-Eypm-id0.js → shadow/cell-formatting-CBfgahv1.js} +1 -1
  38. package/dist/shadow/{chart-DoqdUoGg.js → chart-D_LKA1fr.js} +1 -1
  39. package/dist/shadow/{chart-export-pdf-BirUdchl.js → chart-export-pdf-9OCvhzr0.js} +1 -1
  40. package/dist/{chart-summary-BP9i-v8M.js → shadow/chart-summary-v3Lhe8YD.js} +1 -1
  41. package/dist/{dismissable-DvhBKm3q.js → shadow/dismissable-CQ6XFXsk.js} +5 -1
  42. package/dist/shadow/{export-format-DhdZREP1.js → export-format-mnW_rVBZ.js} +1 -1
  43. package/dist/{focus-trap-DvlOlOGM.js → shadow/focus-trap-Dbb2tJxb.js} +1 -1
  44. package/dist/shadow/{row-resize-Cf8qPLbi.js → row-resize-limG_N1z.js} +41 -32
  45. package/dist/shadow/sv-grid-shadow-element.d.ts +26 -0
  46. package/dist/shadow/sv-grid-shadow-element.js +3479 -2627
  47. package/dist/shadow/validate-BqDthkNr.js +88 -0
  48. package/dist/sv-grid-element.d.ts +26 -0
  49. package/dist/sv-grid-element.js +3464 -2612
  50. package/dist/validate-BqDthkNr.js +88 -0
  51. package/dist/vue/index.d.ts +17 -2
  52. package/dist/vue/index.js +1 -25
  53. package/package.json +3 -3
  54. package/dist/GridMenus-B1mC1aPp.js +0 -1077
  55. package/dist/shadow/GridMenus-B1mC1aPp.js +0 -1077
  56. package/dist/shadow/validate-CgmAtX1A.js +0 -75
  57. package/dist/validate-CgmAtX1A.js +0 -75
@@ -2,25 +2,29 @@
2
2
  var e = "sv-grid-row-resize-handle";
3
3
  function t(t, n) {
4
4
  let r = n, i = null, a = null;
5
- function o(e) {
5
+ function o(e, t) {
6
+ let n = r.min ?? 20, i = r.max ?? 320;
7
+ e.setAttribute("aria-valuemin", String(n)), e.setAttribute("aria-valuemax", String(i)), e.setAttribute("aria-valuenow", String(Math.round(Math.max(n, Math.min(i, t || n)))));
8
+ }
9
+ function s(e) {
6
10
  let t = e.querySelector("[data-svgrid-row]")?.dataset.svgridRow;
7
11
  return t == null ? NaN : Number(t);
8
12
  }
9
- function s(e) {
13
+ function c(e) {
10
14
  if (!i) return;
11
15
  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));
16
+ i.trEl.style.height = `${Math.round(a)}px`, o(i.strip, a), r.onResizeMove?.(i.rowIndex, Math.round(a));
13
17
  }
14
- function c(e) {
18
+ function l(e) {
15
19
  if (!i) return;
16
20
  let t = r.min ?? 20, n = r.max ?? 320, a = Math.max(t, Math.min(n, i.startHeight + (e.clientY - i.startY)));
17
21
  r.onResize(i.rowIndex, Math.round(a)), i.strip.classList.remove("is-resizing");
18
22
  try {
19
23
  i.trEl.releasePointerCapture(e.pointerId);
20
24
  } catch {}
21
- i = null, window.removeEventListener("pointermove", s), window.removeEventListener("pointerup", c), document.body.style.cursor = "";
25
+ i = null, window.removeEventListener("pointermove", c), window.removeEventListener("pointerup", l), document.body.style.cursor = "";
22
26
  }
23
- function l(t) {
27
+ function u(t) {
24
28
  if (r.disabled) return;
25
29
  let n = t.target;
26
30
  if (!n?.classList.contains(e)) return;
@@ -28,21 +32,21 @@ function t(t, n) {
28
32
  if (t.key === "ArrowUp") a = -i;
29
33
  else if (t.key === "ArrowDown") a = i;
30
34
  else return;
31
- let s = n.closest("tr.sv-grid-row");
32
- if (!s) return;
33
- let c = o(s);
34
- if (!Number.isFinite(c)) return;
35
+ let c = n.closest("tr.sv-grid-row");
36
+ if (!c) return;
37
+ let l = s(c);
38
+ if (!Number.isFinite(l)) return;
35
39
  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 + a)));
37
- s.style.height = `${d}px`, r.onResizeMove?.(c, d), r.onResize(c, d);
40
+ let u = r.min ?? 20, d = r.max ?? 320, f = Math.round(Math.max(u, Math.min(d, c.getBoundingClientRect().height + a)));
41
+ c.style.height = `${f}px`, o(n, f), r.onResizeMove?.(l, f), r.onResize(l, f);
38
42
  }
39
- function u(t) {
43
+ function d(t) {
40
44
  if (r.disabled) return;
41
45
  let n = t.target;
42
46
  if (!n?.classList.contains(e)) return;
43
- let l = n.closest("tr.sv-grid-row");
44
- if (!l) return;
45
- let u = o(l);
47
+ let o = n.closest("tr.sv-grid-row");
48
+ if (!o) return;
49
+ let u = s(o);
46
50
  if (!Number.isFinite(u)) return;
47
51
  t.preventDefault(), t.stopPropagation();
48
52
  let d = t.timeStamp, f = a !== null && a.rowIndex === u && d - a.at < 400;
@@ -56,45 +60,50 @@ function t(t, n) {
56
60
  n.classList.add("is-resizing"), i = {
57
61
  rowIndex: u,
58
62
  startY: t.clientY,
59
- startHeight: l.getBoundingClientRect().height,
60
- trEl: l,
63
+ startHeight: o.getBoundingClientRect().height,
64
+ trEl: o,
61
65
  strip: n
62
66
  };
63
67
  try {
64
- l.setPointerCapture(t.pointerId);
68
+ o.setPointerCapture(t.pointerId);
65
69
  } catch {}
66
- document.body.style.cursor = "row-resize", window.addEventListener("pointermove", s), window.addEventListener("pointerup", c);
70
+ document.body.style.cursor = "row-resize", window.addEventListener("pointermove", c), window.addEventListener("pointerup", l);
67
71
  }
68
- function d() {
72
+ function f() {
69
73
  if (r.disabled) {
70
- f();
74
+ p();
71
75
  return;
72
76
  }
73
77
  let n = t.querySelectorAll("tr.sv-grid-row");
74
78
  for (let t of n) {
75
79
  if (t.classList.contains("sv-grid-header-row") || t.classList.contains("sv-grid-row-spacer")) continue;
76
80
  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);
77
- if (!n || n.querySelector(`:scope > .${e}`)) continue;
81
+ if (!n) continue;
82
+ let i = n.querySelector(`:scope > .${e}`);
83
+ if (i) {
84
+ o(i, t.getBoundingClientRect().height);
85
+ continue;
86
+ }
78
87
  getComputedStyle(n).position === "static" && (n.style.position = "relative"), n.style.overflow = "visible";
79
- let i = document.createElement("div");
80
- 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);
88
+ let a = document.createElement("div");
89
+ a.className = e, a.setAttribute("role", "separator"), a.setAttribute("aria-orientation", "horizontal"), a.setAttribute("aria-label", "Resize row"), a.tabIndex = 0, o(a, t.getBoundingClientRect().height), a.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(a);
81
90
  }
82
91
  }
83
- function f() {
92
+ function p() {
84
93
  t.querySelectorAll(`.${e}`).forEach((e) => e.remove());
85
94
  }
86
- t.addEventListener("pointerdown", u, { capture: !0 }), t.addEventListener("keydown", l, { capture: !0 });
87
- let p = new MutationObserver(() => d());
88
- return p.observe(t, {
95
+ t.addEventListener("pointerdown", d, { capture: !0 }), t.addEventListener("keydown", u, { capture: !0 });
96
+ let m = new MutationObserver(() => f());
97
+ return m.observe(t, {
89
98
  childList: !0,
90
99
  subtree: !0
91
- }), d(), {
100
+ }), f(), {
92
101
  update(e) {
93
102
  let t = r.disabled;
94
- r = e, t !== r.disabled && d();
103
+ r = e, t !== r.disabled && f();
95
104
  },
96
105
  destroy() {
97
- t.removeEventListener("pointerdown", u, { capture: !0 }), t.removeEventListener("keydown", l, { capture: !0 }), window.removeEventListener("pointermove", s), window.removeEventListener("pointerup", c), p.disconnect(), f();
106
+ t.removeEventListener("pointerdown", d, { capture: !0 }), t.removeEventListener("keydown", u, { capture: !0 }), window.removeEventListener("pointermove", c), window.removeEventListener("pointerup", l), m.disconnect(), p();
98
107
  }
99
108
  };
100
109
  }