@ishibashi0112/spreadsheet-grid-core 1.5.0 → 1.6.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.
Files changed (74) hide show
  1. package/dist/controllers/columnHeaderDragController.cjs +1 -1
  2. package/dist/controllers/columnHeaderDragController.d.ts +11 -0
  3. package/dist/controllers/columnHeaderDragController.js +259 -210
  4. package/dist/controllers/pointerInteractionsController.cjs +1 -1
  5. package/dist/controllers/pointerInteractionsController.d.ts +1 -0
  6. package/dist/controllers/pointerInteractionsController.js +85 -38
  7. package/dist/controllers/rowEnterController.cjs +1 -1
  8. package/dist/controllers/rowEnterController.js +5 -3
  9. package/dist/controllers/scrollSyncController.cjs +1 -1
  10. package/dist/controllers/scrollSyncController.js +50 -45
  11. package/dist/engine/columnCommands.cjs +1 -1
  12. package/dist/engine/columnCommands.d.ts +4 -0
  13. package/dist/engine/columnCommands.js +47 -16
  14. package/dist/engine/columnLayout.cjs +1 -1
  15. package/dist/engine/columnLayout.d.ts +7 -1
  16. package/dist/engine/columnLayout.js +25 -22
  17. package/dist/engine/createGridEngine.cjs +1 -1
  18. package/dist/engine/createGridEngine.d.ts +2 -1
  19. package/dist/engine/createGridEngine.js +46 -36
  20. package/dist/engine/exportCommands.cjs +2 -2
  21. package/dist/engine/exportCommands.js +50 -38
  22. package/dist/engine/gridApi.cjs +2 -1
  23. package/dist/engine/gridApi.d.ts +2 -0
  24. package/dist/engine/gridApi.js +17 -7
  25. package/dist/engine/notifiers.cjs +1 -1
  26. package/dist/engine/notifiers.d.ts +13 -1
  27. package/dist/engine/notifiers.js +39 -19
  28. package/dist/engine/verticalLayout.cjs +1 -1
  29. package/dist/engine/verticalLayout.d.ts +1 -0
  30. package/dist/engine/verticalLayout.js +41 -41
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +4 -4
  34. package/dist/locales/en.cjs +1 -1
  35. package/dist/locales/en.js +5 -0
  36. package/dist/logic/columnGroupCells.cjs +1 -0
  37. package/dist/logic/columnGroupCells.d.ts +54 -0
  38. package/dist/logic/columnGroupCells.js +53 -0
  39. package/dist/logic/columnGroups.cjs +1 -0
  40. package/dist/logic/columnGroups.d.ts +46 -0
  41. package/dist/logic/columnGroups.js +335 -0
  42. package/dist/logic/domGuards.cjs +1 -1
  43. package/dist/logic/domGuards.d.ts +1 -1
  44. package/dist/logic/domGuards.js +5 -5
  45. package/dist/logic/exportCsv.cjs +2 -2
  46. package/dist/logic/exportCsv.d.ts +2 -1
  47. package/dist/logic/exportCsv.js +16 -13
  48. package/dist/logic/gridState.cjs +1 -1
  49. package/dist/logic/gridState.d.ts +8 -1
  50. package/dist/logic/gridState.js +14 -8
  51. package/dist/logic/localeTextFeatures.cjs +1 -1
  52. package/dist/logic/localeTextFeatures.d.ts +5 -0
  53. package/dist/logic/localeTextFeatures.js +10 -6
  54. package/dist/logic/localeTextPopups.cjs +1 -1
  55. package/dist/logic/localeTextPopups.d.ts +2 -0
  56. package/dist/logic/localeTextPopups.js +2 -0
  57. package/dist/logic/verticalGeometry.cjs +1 -1
  58. package/dist/logic/verticalGeometry.d.ts +1 -0
  59. package/dist/logic/verticalGeometry.js +10 -10
  60. package/dist/model/gridActions.cjs +1 -1
  61. package/dist/model/gridActions.d.ts +10 -0
  62. package/dist/model/gridActions.js +9 -0
  63. package/dist/model/gridReducer.cjs +1 -1
  64. package/dist/model/gridReducer.js +29 -2
  65. package/dist/model/gridStore.d.ts +1 -0
  66. package/dist/model/gridTypes.core.d.ts +149 -0
  67. package/dist/model/gridTypes.unbound.d.ts +2 -0
  68. package/dist/utils/browserLimits.cjs +1 -0
  69. package/dist/utils/browserLimits.d.ts +2 -0
  70. package/dist/utils/browserLimits.js +5 -0
  71. package/dist/utils/permissions.cjs +2 -2
  72. package/dist/utils/permissions.d.ts +1 -0
  73. package/dist/utils/permissions.js +6 -6
  74. package/package.json +1 -1
@@ -54,22 +54,30 @@ function _(e, n) {
54
54
  max: s
55
55
  };
56
56
  }
57
+ function ee(e, n, i, a, o) {
58
+ let s = new Set(e.filter((e) => r(e) === i && e.visible !== !1).map((e) => e.key)), { entries: c } = n;
59
+ for (let e = Math.max(a, 0); e < c.length; e += 1) {
60
+ let n = c[e].column.key;
61
+ if (!(t(n) || o.has(n) || !s.has(n))) return n;
62
+ }
63
+ return null;
64
+ }
57
65
  var v = (e) => {
58
66
  let n = 0;
59
67
  for (; n < e.entries.length && t(e.entries[n].column.key);) n += 1;
60
68
  return n;
61
- }, ee = 32, te = 2, ne = 14, re = 12, y = 14, ie = (e) => "<svg viewBox=\"0 0 24 24\" width=\"" + e + "\" height=\"" + e + "\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"5 9 2 12 5 15\"/><polyline points=\"9 5 12 2 15 5\"/><polyline points=\"15 19 12 22 9 19\"/><polyline points=\"19 9 22 12 19 15\"/><line x1=\"2\" y1=\"12\" x2=\"22\" y2=\"12\"/><line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"22\"/></svg>", ae = (e) => "<svg viewBox=\"0 0 24 24\" width=\"" + e + "\" height=\"" + e + "\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"12\" y1=\"17\" x2=\"12\" y2=\"22\"/><path d=\"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z\"/></svg>", oe = ie(y), se = ae(y), ce = "<svg viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"4.9\" y1=\"4.9\" x2=\"19.1\" y2=\"19.1\"/></svg>", le = "0.5", ue = 200, b = "cubic-bezier(0.2, 0.7, 0.3, 1)", de = (e) => e?.closest(".ssg-motion-off") != null, fe = 160, pe = `transform ${fe}ms ${b}`, x = "data-ssg-col-dragging", me = "4", he = "9", ge = "ssg-col-drag-float", _e = "ssg-col-drag-pin", ve = 12, ye = "ssg-col-drop-indicator", be = "ssg-header-cell", xe = [
69
+ }, y = 32, b = 2, te = 14, x = 12, S = 14, ne = (e) => "<svg viewBox=\"0 0 24 24\" width=\"" + e + "\" height=\"" + e + "\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"5 9 2 12 5 15\"/><polyline points=\"9 5 12 2 15 5\"/><polyline points=\"15 19 12 22 9 19\"/><polyline points=\"19 9 22 12 19 15\"/><line x1=\"2\" y1=\"12\" x2=\"22\" y2=\"12\"/><line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"22\"/></svg>", re = (e) => "<svg viewBox=\"0 0 24 24\" width=\"" + e + "\" height=\"" + e + "\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"12\" y1=\"17\" x2=\"12\" y2=\"22\"/><path d=\"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z\"/></svg>", ie = ne(S), ae = re(S), oe = "<svg viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"4.9\" y1=\"4.9\" x2=\"19.1\" y2=\"19.1\"/></svg>", se = "0.5", ce = 200, C = "cubic-bezier(0.2, 0.7, 0.3, 1)", le = (e) => e?.closest(".ssg-motion-off") != null, ue = 160, de = `transform ${ue}ms ${C}`, w = "data-ssg-col-dragging", fe = "4", pe = "9", me = "ssg-col-drag-float", he = "ssg-col-drag-pin", ge = 12, _e = "ssg-col-drop-indicator", ve = "ssg-header-cell", ye = [
62
70
  "data-ssg-col-key",
63
71
  "data-ssg-tooltip",
64
72
  "data-autoheight-cell",
65
73
  "id",
66
74
  "tabindex"
67
- ], Se = 180, Ce = 400, S = (t) => {
75
+ ], be = 180, xe = 400, T = (t) => {
68
76
  let n = [];
69
77
  return t.querySelectorAll("[data-ssg-col-key]").forEach((r) => {
70
78
  e(t, r) || n.push(r);
71
79
  }), n;
72
- }, we = (t) => {
80
+ }, Se = (t) => {
73
81
  if (!t) return null;
74
82
  let n = /* @__PURE__ */ new Map();
75
83
  return t.querySelectorAll("[data-ssg-col-key]").forEach((r) => {
@@ -77,23 +85,38 @@ var v = (e) => {
77
85
  let i = r.dataset.ssgColKey;
78
86
  i && !n.has(i) && n.set(i, r.getBoundingClientRect().left);
79
87
  }), n;
80
- }, Te = (e) => {
88
+ }, Ce = (e) => {
81
89
  let t = getComputedStyle(e).transform, n = /^matrix(3d)?\(([^)]*)\)$/.exec(t);
82
90
  if (n === null) return 0;
83
91
  let r = Number(n[2].split(",")[n[1] === "3d" ? 12 : 4]);
84
92
  return Number.isFinite(r) ? r : 0;
85
- }, C = () => {
86
- let t = null, y = null, C = null, w = null, T = {
93
+ }, E = () => {
94
+ let t = null, S = null, E = null, D = null, O = {
87
95
  x: 0,
88
96
  y: 0
89
- }, E = null, D = 1, O = !1, k = null, A = null, j = null, M = null, N = null, P = null, F = null, I = null, Ee = 0, L = null, R = null, z = "", B = null, V = 0, H = null, U = null, De = () => t?.motion === "live", W = () => ({
97
+ }, k = null, A = 1, j = !1, M = null, N = null, P = null, F = null, I = null, L = null, R = null, z = null, we = 0, B = null, V = null, H = "", U = null, Te = 0, W = null, G = null, K = null, q = null, Ee = () => t?.motion === "live" && q === null, J = (e, n, i, a, o) => {
98
+ let s = t?.columnGroups;
99
+ if (!s || K === null || t === null) return { slot: i };
100
+ let c = n.entries.map((e) => e.column.key), l = -1, u = -1;
101
+ if (c.forEach((e, t) => {
102
+ K?.keys.has(e) && (l < 0 && (l = t), u = t);
103
+ }), l >= 0 && i >= l && i <= u + 1) return {
104
+ slot: i,
105
+ noOp: !0
106
+ };
107
+ let d = t.columns.filter((t) => r(t) === e).map((e) => e.key), f = s.resolveColumnGroupDropPlacement(s.tree, K, c, i, a, o, d);
108
+ return f === null ? null : {
109
+ slot: f.slot,
110
+ anchorKey: f.anchorKey
111
+ };
112
+ }, De = () => ({
90
113
  left: t?.leftIndicatorRef.current ?? null,
91
114
  center: t?.centerIndicatorRef.current ?? null,
92
115
  right: t?.rightIndicatorRef.current ?? null
93
- }), G = () => {
94
- for (let e of Object.values(W())) e && (e.style.display = "none");
95
- }, Oe = (e) => {
96
- if (N) return;
116
+ }), Oe = () => {
117
+ for (let e of Object.values(De())) e && (e.style.display = "none");
118
+ }, ke = (e) => {
119
+ if (I) return;
97
120
  let n = document.createElement("div");
98
121
  n.setAttribute("data-grid-drag-ghost", ""), t?.scrollContainerRef.current?.closest(".ssg-theme-dark") != null && n.classList.add("ssg-theme-dark"), t?.scrollContainerRef.current?.closest(".ssg-theme-class") != null && n.classList.add("ssg-theme-class"), t?.scrollContainerRef.current?.closest(".ssg-motion-off") != null && n.classList.add("ssg-motion-off"), n.style.cssText = [
99
122
  "position:fixed",
@@ -121,19 +144,19 @@ var v = (e) => {
121
144
  let r = document.createElement("span");
122
145
  r.style.cssText = "display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex:none";
123
146
  let i = document.createElement("span");
124
- i.textContent = e, n.appendChild(r), n.appendChild(i), p(n, m(t?.scrollContainerRef.current)), f(t?.scrollContainerRef.current, n), N = n, P = r, F = null;
125
- }, ke = (e) => {
126
- let t = N;
147
+ i.textContent = e, n.appendChild(r), n.appendChild(i), p(n, m(t?.scrollContainerRef.current)), f(t?.scrollContainerRef.current, n), I = n, L = r, R = null;
148
+ }, Ae = (e) => {
149
+ let t = I;
127
150
  if (!t) return;
128
- t.style.transform = "translate(" + (T.x + ne) + "px," + (T.y + re) + "px)";
151
+ t.style.transform = "translate(" + (O.x + te) + "px," + (O.y + x) + "px)";
129
152
  let n = e ?? "out";
130
- if (F === n) return;
131
- F = n;
132
- let r = P;
133
- n === "out" ? (t.style.opacity = le, r && (r.innerHTML = ce)) : (t.style.opacity = "1", r && (r.innerHTML = n === "center" ? oe : se));
134
- }, K = () => {
135
- N && N.parentNode && N.parentNode.removeChild(N), N = null, P = null, F = null;
136
- }, Ae = (e, r) => {
153
+ if (R === n) return;
154
+ R = n;
155
+ let r = L;
156
+ n === "out" ? (t.style.opacity = se, r && (r.innerHTML = oe)) : (t.style.opacity = "1", r && (r.innerHTML = n === "center" ? ie : ae));
157
+ }, Y = () => {
158
+ I && I.parentNode && I.parentNode.removeChild(I), I = null, L = null, R = null;
159
+ }, je = (e, r) => {
137
160
  if (t === null) return null;
138
161
  let { paneLayout: a, leftPaneScrollRef: o, rightPaneScrollRef: s, bodyScrollRef: c, scrollContainerRef: l, leftLeadingWidth: u, centerLeadingWidth: d, rightLeadingWidth: f } = t, p = l.current;
139
162
  if (p) {
@@ -141,23 +164,23 @@ var v = (e) => {
141
164
  if (e < t.left || e > t.right || r < t.top || r > t.bottom) return null;
142
165
  }
143
166
  let m = o.current, h = s.current;
144
- if (m && a.left.entries.length === 0 && e <= m.getBoundingClientRect().left + Math.max(u, ee) * D) return {
167
+ if (m && a.left.entries.length === 0 && e <= m.getBoundingClientRect().left + Math.max(u, y) * A) return {
145
168
  pane: "left",
146
169
  slot: 0,
147
- leftPx: u > 0 ? u : te
170
+ leftPx: u > 0 ? u : b
148
171
  };
149
172
  if (m && a.left.entries.length > 0) {
150
173
  let t = m.getBoundingClientRect();
151
174
  if (e < t.right) {
152
- let r = (e - t.left) / D - u, o = Math.max(n(a.left, r), v(a.left));
153
- return {
175
+ let r = (e - t.left) / A - u, o = v(a.left), s = J("left", a.left, Math.max(n(a.left, r), o), o, a.left.entries.length);
176
+ return s === null ? null : {
154
177
  pane: "left",
155
- slot: o,
156
- leftPx: u + i(a.left, o)
178
+ ...s,
179
+ leftPx: u + i(a.left, s.slot)
157
180
  };
158
181
  }
159
182
  }
160
- if (h && a.right.entries.length === 0 && e >= h.getBoundingClientRect().left - ee * D) return {
183
+ if (h && a.right.entries.length === 0 && e >= h.getBoundingClientRect().left - y * A) return {
161
184
  pane: "right",
162
185
  slot: 0,
163
186
  leftPx: -2
@@ -165,26 +188,26 @@ var v = (e) => {
165
188
  if (h && a.right.entries.length > 0) {
166
189
  let t = h.getBoundingClientRect();
167
190
  if (e >= t.left) {
168
- let r = (e - t.left) / D - f, o = Math.max(n(a.right, r), v(a.right));
169
- return {
191
+ let r = (e - t.left) / A - f, o = v(a.right), s = J("right", a.right, Math.max(n(a.right, r), o), o, a.right.entries.length);
192
+ return s === null ? null : {
170
193
  pane: "right",
171
- slot: o,
172
- leftPx: f + i(a.right, o)
194
+ ...s,
195
+ leftPx: f + i(a.right, s.slot)
173
196
  };
174
197
  }
175
198
  }
176
199
  let g = c.current;
177
200
  if (g && a.center.entries.length > 0) {
178
- let r = g.getBoundingClientRect(), o = g.scrollLeft + (e - r.left) / D - d, s = _(t.columns, a.center), c = Math.min(Math.max(n(a.center, Math.max(o, 0)), s.min), s.max);
179
- return {
201
+ let r = g.getBoundingClientRect(), o = g.scrollLeft + (e - r.left) / A - d, s = _(t.columns, a.center), c = J("center", a.center, Math.min(Math.max(n(a.center, Math.max(o, 0)), s.min), s.max), s.min, s.max);
202
+ return c === null ? null : {
180
203
  pane: "center",
181
- slot: c,
182
- leftPx: d + i(a.center, c)
204
+ ...c,
205
+ leftPx: d + i(a.center, c.slot)
183
206
  };
184
207
  }
185
208
  return null;
186
- }, je = (e) => {
187
- let t = W();
209
+ }, Me = (e) => {
210
+ let t = De();
188
211
  for (let n of [
189
212
  "left",
190
213
  "center",
@@ -193,14 +216,14 @@ var v = (e) => {
193
216
  let r = t[n];
194
217
  r && (n === e.pane ? (r.style.left = `${e.leftPx}px`, r.style.display = "block") : r.style.display = "none");
195
218
  }
196
- }, Me = (e, t) => {
197
- let n = R?.get(t);
198
- n !== void 0 && R?.delete(t), e.set(t, n ?? {
219
+ }, Ne = (e, t) => {
220
+ let n = V?.get(t);
221
+ n !== void 0 && V?.delete(t), e.set(t, n ?? {
199
222
  zIndex: t.style.zIndex,
200
223
  visibility: t.style.visibility
201
224
  });
202
- }, q = (e, n) => {
203
- let r = [], i = L, a = y, o = I;
225
+ }, Pe = (e, n) => {
226
+ let r = [], i = B, a = S, o = z;
204
227
  if (!i || a === null || o === null || t === null) return r;
205
228
  let s = t.scrollContainerRef.current;
206
229
  if (!s) return r;
@@ -208,44 +231,44 @@ var v = (e) => {
208
231
  if (l < 0) return r;
209
232
  let u = c[l].paneLocalSize, d = n === "lift-out" ? c.length - 1 : n === "rest" || e === null ? l : e > l ? e - 1 : e, f = /* @__PURE__ */ new Map();
210
233
  for (let e = Math.min(l, d); e <= Math.max(l, d); e += 1) e !== l && f.set(c[e].column.key, e > l ? -u : u);
211
- let p = o === "center" ? s.scrollLeft - Ee : 0, m = (E ? (T.x - E.x) / D : 0) + p, h = U, g = /* @__PURE__ */ new WeakSet();
212
- U = g;
213
- for (let e of S(s)) {
234
+ let p = o === "center" ? s.scrollLeft - we : 0, m = (k ? (O.x - k.x) / A : 0) + p, h = G, g = /* @__PURE__ */ new WeakSet();
235
+ G = g;
236
+ for (let e of T(s)) {
214
237
  let t = e.dataset.ssgColKey;
215
238
  if (t === void 0) continue;
216
239
  g.add(e);
217
- let o = h !== null && !h.has(e) ? "none" : pe;
240
+ let o = h !== null && !h.has(e) ? "none" : de;
218
241
  if (t === a) {
219
- r.push(e), i.has(e) || (Me(i, e), e.style.zIndex = me, e.style.willChange = "transform");
242
+ r.push(e), i.has(e) || (Ne(i, e), e.style.zIndex = fe, e.style.willChange = "transform");
220
243
  let t = i.get(e);
221
- n === "follow" ? (e.style.visibility = t?.visibility ?? "", e.setAttribute(x, "live"), e.style.transition = "none", e.style.transform = `translateX(${m}px)`) : n === "lift-out" ? (e.style.visibility = "hidden", e.removeAttribute(x), e.style.transition = "none", e.style.transform = "translateX(0px)") : (e.style.visibility = t?.visibility ?? "", e.removeAttribute(x), e.style.transition = o, e.style.transform = "translateX(0px)");
244
+ n === "follow" ? (e.style.visibility = t?.visibility ?? "", e.setAttribute(w, "live"), e.style.transition = "none", e.style.transform = `translateX(${m}px)`) : n === "lift-out" ? (e.style.visibility = "hidden", e.removeAttribute(w), e.style.transition = "none", e.style.transform = "translateX(0px)") : (e.style.visibility = t?.visibility ?? "", e.removeAttribute(w), e.style.transition = o, e.style.transform = "translateX(0px)");
222
245
  continue;
223
246
  }
224
247
  let s = f.get(t) ?? 0;
225
248
  if (s === 0 && !i.has(e)) continue;
226
- i.has(e) || Me(i, e);
249
+ i.has(e) || Ne(i, e);
227
250
  let c = `translateX(${s}px)`;
228
251
  e.style.transform !== c && (e.style.transition = o, e.style.transform = c);
229
252
  }
230
253
  return r;
231
- }, J = (e) => {
254
+ }, Fe = (e) => {
232
255
  e.forEach((e, t) => {
233
- t.style.transition = "", t.style.transform = "", t.style.willChange = "", t.style.zIndex = e.zIndex, t.style.visibility = e.visibility, t.removeAttribute(x);
256
+ t.style.transition = "", t.style.transform = "", t.style.willChange = "", t.style.zIndex = e.zIndex, t.style.visibility = e.visibility, t.removeAttribute(w);
234
257
  });
235
- }, Ne = (e) => {
258
+ }, Ie = (e) => {
236
259
  let t = (e) => {
237
- for (let t of xe) e.removeAttribute(t);
260
+ for (let t of ye) e.removeAttribute(t);
238
261
  };
239
262
  t(e), e.querySelectorAll("*").forEach(t), e.querySelectorAll(".ssg-header-actions").forEach((e) => e.remove());
240
- }, Pe = (e, t, n) => {
241
- let r = B;
263
+ }, Le = (e, t, n) => {
264
+ let r = U;
242
265
  if (r === null) {
243
266
  let e = document.createElement("div");
244
- e.className = ge, e.setAttribute("aria-hidden", "true"), e.setAttribute("inert", "");
267
+ e.className = me, e.setAttribute("aria-hidden", "true"), e.setAttribute("inert", "");
245
268
  let n = document.createElement("div");
246
269
  n.style.cssText = "position:absolute;top:0;left:0;height:100%;will-change:transform";
247
270
  let i = document.createElement("div");
248
- i.className = ye, i.style.cssText = "position:absolute;display:none", e.append(n, i), t.appendChild(e), r = {
271
+ i.className = _e, i.style.cssText = "position:absolute;display:none", e.append(n, i), t.appendChild(e), r = {
249
272
  layer: e,
250
273
  column: n,
251
274
  guide: i,
@@ -255,129 +278,128 @@ var v = (e) => {
255
278
  columnWidth: 0,
256
279
  scrollTop: 0,
257
280
  cellCount: 0
258
- }, B = r;
281
+ }, U = r;
259
282
  }
260
- let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + e.clientLeft * D, s = a.top + e.clientTop * D;
283
+ let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + e.clientLeft * A, s = a.top + e.clientTop * A;
261
284
  r.layer.style.cssText = [
262
285
  "position:absolute",
263
- `left:${(o - i.left) / D - t.clientLeft + t.scrollLeft}px`,
264
- `top:${(s - i.top) / D - t.clientTop + t.scrollTop}px`,
286
+ `left:${(o - i.left) / A - t.clientLeft + t.scrollLeft}px`,
287
+ `top:${(s - i.top) / A - t.clientTop + t.scrollTop}px`,
265
288
  `width:${e.clientWidth}px`,
266
289
  `height:${e.clientHeight}px`,
267
290
  "overflow:hidden",
268
291
  "pointer-events:none",
269
- `z-index:${he}`
292
+ `z-index:${pe}`
270
293
  ].join(";");
271
294
  let c = [], l = [], u = 0;
272
295
  for (let e of n) {
273
296
  let t = e.getBoundingClientRect(), n = {
274
- top: (t.top - s) / D,
275
- width: t.width / D,
276
- height: t.height / D
297
+ top: (t.top - s) / A,
298
+ width: t.width / A,
299
+ height: t.height / A
277
300
  }, r = e.cloneNode(!0);
278
- Ne(r), r.setAttribute(x, "live");
301
+ Ie(r), r.setAttribute(w, "live");
279
302
  let i = r.style;
280
- i.position = "absolute", i.left = "0px", i.top = `${n.top}px`, i.width = `${n.width}px`, i.minWidth = `${n.width}px`, i.height = `${n.height}px`, i.transform = "", i.transition = "", i.visibility = "", i.willChange = "", i.zIndex = "", u = Math.max(u, n.width), (r.classList.contains(be) ? l : c).push(r);
303
+ i.position = "absolute", i.left = "0px", i.top = `${n.top}px`, i.width = `${n.width}px`, i.minWidth = `${n.width}px`, i.height = `${n.height}px`, i.transform = "", i.transition = "", i.visibility = "", i.willChange = "", i.zIndex = "", u = Math.max(u, n.width), (r.classList.contains(ve) ? l : c).push(r);
281
304
  }
282
305
  let d = null;
283
- for (let e of l) e.style.zIndex = "1", d === null && (d = document.createElement("span"), d.className = _e, e.insertBefore(d, e.firstChild));
306
+ for (let e of l) e.style.zIndex = "1", d === null && (d = document.createElement("span"), d.className = he, e.insertBefore(d, e.firstChild));
284
307
  return r.column.replaceChildren(...c, ...l), r.column.style.width = `${u}px`, r.badge = d, r.badgeKind = null, r.layerWidth = e.clientWidth, r.columnWidth = u, r.scrollTop = e.scrollTop, r.cellCount = n.length, r;
285
- }, Fe = (e) => {
308
+ }, Re = (e) => {
286
309
  let n = t?.scrollContainerRef.current ?? null, r = n?.parentElement ?? null;
287
- return !n || !r ? null : e.length === 0 || B !== null && B.scrollTop === n.scrollTop && B.cellCount === e.length ? B : Pe(n, r, e);
288
- }, Ie = (e) => {
310
+ return !n || !r ? null : e.length === 0 || U !== null && U.scrollTop === n.scrollTop && U.cellCount === e.length ? U : Le(n, r, e);
311
+ }, ze = (e) => {
289
312
  if (t === null) return !1;
290
313
  let n = t.leftPaneScrollRef.current;
291
314
  if (n) {
292
315
  let r = n.getBoundingClientRect();
293
- if (e < (t.paneLayout.left.entries.length > 0 ? r.right : r.left + t.leftLeadingWidth * D) - .5) return !0;
316
+ if (e < (t.paneLayout.left.entries.length > 0 ? r.right : r.left + t.leftLeadingWidth * A) - .5) return !0;
294
317
  }
295
318
  let r = t.rightPaneScrollRef.current;
296
319
  return !!(r && t.paneLayout.right.entries.length > 0 && e > r.getBoundingClientRect().left + .5);
297
- }, Le = (e, t, n) => {
298
- let r = e.guide, i = t === null ? null : W()[t];
320
+ }, Be = (e, t, n) => {
321
+ let r = e.guide, i = t === null ? null : De()[t];
299
322
  if (!i || i.style.display !== "block") {
300
323
  r.style.display = "none";
301
324
  return;
302
325
  }
303
326
  let a = i.getBoundingClientRect();
304
- if (t === "center" && Ie(a.left + a.width / 2)) {
327
+ if (t === "center" && ze(a.left + a.width / 2)) {
305
328
  r.style.display = "none";
306
329
  return;
307
330
  }
308
- r.style.left = `${(a.left - n.left) / D}px`, r.style.top = `${(a.top - n.top) / D}px`, r.style.height = `${a.height / D}px`, r.style.display = "block";
309
- }, Re = (e, t) => {
310
- let n = e.layer.getBoundingClientRect(), r = Math.max(e.layerWidth - e.columnWidth, 0), i = Math.min(Math.max((T.x - V - n.left) / D, 0), r);
331
+ r.style.left = `${(a.left - n.left) / A}px`, r.style.top = `${(a.top - n.top) / A}px`, r.style.height = `${a.height / A}px`, r.style.display = "block";
332
+ }, Ve = (e, t) => {
333
+ let n = e.layer.getBoundingClientRect(), r = Math.max(e.layerWidth - e.columnWidth, 0), i = Math.min(Math.max((O.x - Te - n.left) / A, 0), r);
311
334
  e.column.style.transition = "none", e.column.style.transform = `translateX(${i}px)`;
312
335
  let a = t === null ? "none" : t === "center" ? "move" : "pin";
313
- e.badge !== null && e.badgeKind !== a && (e.badgeKind = a, e.badge.innerHTML = a === "none" ? "" : a === "move" ? ie(ve) : ae(ve), e.badge.style.display = a === "none" ? "none" : ""), Le(e, t, n);
314
- }, Y = () => {
315
- B?.layer.remove(), B = null;
316
- }, ze = (e, t, n) => {
317
- let r = e.layer.getBoundingClientRect();
318
- e.column.style.transition = `transform ${n}ms ${b}`, e.column.style.transform = `translateX(${(t - r.left) / D}px)`, e.badge?.remove(), e.guide.style.display = "none";
336
+ e.badge !== null && e.badgeKind !== a && (e.badgeKind = a, e.badge.innerHTML = a === "none" ? "" : a === "move" ? ne(ge) : re(ge), e.badge.style.display = a === "none" ? "none" : ""), Be(e, t, n);
319
337
  }, X = () => {
320
- let e = H;
321
- if (H = null, e !== null) {
338
+ U?.layer.remove(), U = null;
339
+ }, He = (e, t, n) => {
340
+ let r = e.layer.getBoundingClientRect();
341
+ e.column.style.transition = `transform ${n}ms ${C}`, e.column.style.transform = `translateX(${(t - r.left) / A}px)`, e.badge?.remove(), e.guide.style.display = "none";
342
+ }, Z = () => {
343
+ let e = W;
344
+ if (W = null, e !== null) {
322
345
  e.timer !== null && window.clearTimeout(e.timer);
323
346
  for (let [t, n] of e.hiddenCells) t.style.visibility = n;
324
347
  e.float.layer.remove();
325
348
  }
326
- }, Be = () => {
327
- let e = H;
349
+ }, Ue = () => {
350
+ let e = W;
328
351
  if (e === null || e.key === null) return;
329
352
  let n = e.key;
330
353
  if (e.pane !== null && !t?.paneLayout[e.pane].entries.some((e) => e.column.key === n)) return;
331
354
  e.key = null;
332
- let r = t?.scrollContainerRef.current ?? null, i = r ? S(r).filter((e) => e.dataset.ssgColKey === n) : [];
355
+ let r = t?.scrollContainerRef.current ?? null, i = r ? T(r).filter((e) => e.dataset.ssgColKey === n) : [];
333
356
  if (i.length === 0) {
334
- X();
357
+ Z();
335
358
  return;
336
359
  }
337
360
  let a = i[0].getBoundingClientRect().left;
338
361
  for (let t of i) e.hiddenCells.push([t, t.style.visibility]), t.style.visibility = "hidden";
339
- ze(e.float, a, Se), e.timer !== null && window.clearTimeout(e.timer), e.timer = window.setTimeout(X, 220);
340
- }, Z = () => {
341
- let e = Ae(T.x, T.y);
342
- if (De()) {
343
- e && (C = {
344
- pane: e.pane,
345
- slot: e.slot
346
- });
347
- let n = C;
348
- if (n !== null && n.pane !== I) {
349
- if (e && je(e), (t?.scrollContainerRef.current ?? null)?.parentElement != null) {
350
- let e = Fe(q(null, "lift-out"));
362
+ He(e.float, a, be), e.timer !== null && window.clearTimeout(e.timer), e.timer = window.setTimeout(Z, 220);
363
+ }, We = (e) => ({
364
+ pane: e.pane,
365
+ slot: e.slot,
366
+ anchorKey: e.anchorKey,
367
+ noOp: e.noOp
368
+ }), Q = () => {
369
+ let e = je(O.x, O.y);
370
+ if (Ee()) {
371
+ e && (E = We(e));
372
+ let n = E;
373
+ if (n !== null && n.pane !== z) {
374
+ if (e && Me(e), (t?.scrollContainerRef.current ?? null)?.parentElement != null) {
375
+ let e = Re(Pe(null, "lift-out"));
351
376
  if (e !== null) {
352
- K(), Re(e, n.pane);
377
+ Y(), Ve(e, n.pane);
353
378
  return;
354
379
  }
355
380
  }
356
- Y(), Oe(z), ke(n.pane), q(null, "rest");
381
+ X(), ke(H), Ae(n.pane), Pe(null, "rest");
357
382
  return;
358
383
  }
359
- if (K(), G(), q(n === null ? null : n.slot, "follow").length === 0 && B !== null) {
360
- Re(B, null);
384
+ if (Y(), Oe(), Pe(n === null ? null : n.slot, "follow").length === 0 && U !== null) {
385
+ Ve(U, null);
361
386
  return;
362
387
  }
363
- Y();
388
+ X();
364
389
  return;
365
390
  }
366
- if (ke(e ? e.pane : null), !e) {
367
- C = null, G();
391
+ if (Ae(e ? e.pane : null), !e) {
392
+ E = null, Oe();
368
393
  return;
369
394
  }
370
- C = {
371
- pane: e.pane,
372
- slot: e.slot
373
- }, je(e);
374
- }, Ve = () => {
375
- if (y === null) {
376
- j = null;
395
+ E = We(e), Me(e);
396
+ }, Ge = () => {
397
+ if (S === null) {
398
+ P = null;
377
399
  return;
378
400
  }
379
401
  let e = t?.scrollContainerRef.current ?? null;
380
- if (e && (O || (!E || o(E, T, 6)) && (O = !0), O)) {
402
+ if (e && (j || (!k || o(k, O, 6)) && (j = !0), j)) {
381
403
  let t = e.getBoundingClientRect(), n = c({
382
404
  rectLeft: t.left,
383
405
  rectTop: t.top,
@@ -386,60 +408,65 @@ var v = (e) => {
386
408
  clientWidth: e.clientWidth,
387
409
  clientHeight: e.clientHeight,
388
410
  scale: l(e, t)
389
- }), r = s(T.x, n.left, n.right, 24), i = a(e.scrollLeft, r, 18, e.scrollWidth - e.clientWidth);
411
+ }), r = s(O.x, n.left, n.right, 24), i = a(e.scrollLeft, r, 18, e.scrollWidth - e.clientWidth);
390
412
  i !== e.scrollLeft && e.scrollTo({
391
413
  left: i,
392
414
  behavior: "auto"
393
415
  });
394
416
  }
395
- Z(), j = requestAnimationFrame(Ve);
396
- }, Q = (e) => {
397
- j !== null && (cancelAnimationFrame(j), j = null), document.body.style.cursor = "", G(), K();
398
- let n = y, i = C;
399
- y = null, A = null, U = null, C = null, E = null;
400
- let a = L;
401
- L = null, I = null;
402
- let o = n !== null && i !== null && t !== null ? t.paneLayout[i.pane].entries.findIndex((e) => e.column.key === n) : -1, s = i !== null && o >= 0 && (i.slot === o || i.slot === o + 1), c = e && n && i && t !== null && !s ? h(t.columns, n, i.pane, g(t.columns, t.paneLayout[i.pane], i.pane, i.slot)) : null, l = B;
403
- if (B = null, a && !c) {
404
- a.forEach((e, t) => {
405
- t.isConnected && (t.style.transition = pe, t.style.transform = "translateX(0px)");
417
+ Q(), P = requestAnimationFrame(Ge);
418
+ }, $ = (e) => {
419
+ P !== null && (cancelAnimationFrame(P), P = null), document.body.style.cursor = "", Oe(), Y();
420
+ let n = S, i = E, a = q, o = K;
421
+ q = null, K = null, S = null, N = null, G = null, E = null, k = null;
422
+ let s = B;
423
+ B = null, z = null;
424
+ let c = n !== null && i !== null && t !== null ? t.paneLayout[i.pane].entries.findIndex((e) => e.column.key === n) : -1, l = i !== null && (i.noOp === !0 || c >= 0 && (i.slot === c || i.slot === c + 1)), u = t?.columnGroups, d = null;
425
+ if (e && i && t !== null && !l) if (u && o !== null && (a !== null || i.anchorKey !== void 0)) {
426
+ let e = i.anchorKey === void 0 ? ee(t.columns, t.paneLayout[i.pane], i.pane, i.slot, o.keys) : i.anchorKey;
427
+ d = u.computeColumnBlockReorderedKeys(t.columns, o.keys, i.pane, e);
428
+ } else a === null && n && (d = h(t.columns, n, i.pane, g(t.columns, t.paneLayout[i.pane], i.pane, i.slot)));
429
+ let f = U;
430
+ if (U = null, s && !d) {
431
+ s.forEach((e, t) => {
432
+ t.isConnected && (t.style.transition = de, t.style.transform = "translateX(0px)");
406
433
  });
407
434
  let e = null;
408
- if (l !== null) {
435
+ if (f !== null) {
409
436
  let t = null;
410
- for (let e of a.keys()) if (e.isConnected && e.dataset.ssgColKey === n) {
437
+ for (let e of s.keys()) if (e.isConnected && e.dataset.ssgColKey === n) {
411
438
  t = e;
412
439
  break;
413
440
  }
414
- t === null ? l.layer.remove() : (ze(l, t.getBoundingClientRect().left, fe), e = {
415
- float: l,
441
+ t === null ? f.layer.remove() : (He(f, t.getBoundingClientRect().left, ue), e = {
442
+ float: f,
416
443
  key: null,
417
444
  pane: null,
418
445
  timer: null,
419
446
  hiddenCells: []
420
- }, H = e);
447
+ }, W = e);
421
448
  }
422
- R = a, window.setTimeout(() => {
423
- J(a), R === a && (R = null), e !== null && H === e && X();
449
+ V = s, window.setTimeout(() => {
450
+ Fe(s), V === s && (V = null), e !== null && W === e && Z();
424
451
  }, 200);
425
- } else l !== null && !c && l.layer.remove();
426
- if (!c || !n || !i || t === null) return;
427
- let { columns: u, applyColumnOrderAndPin: d, scrollContainerRef: f } = t, p = u.find((e) => e.key === n), m = p ? r(p) : null;
428
- w = m !== null && m === i.pane && !de(f.current) ? we(f.current) : null, a && J(a), l !== null && (l.badge?.remove(), l.guide.style.display = "none", H = {
429
- float: l,
452
+ } else f !== null && !d && f.layer.remove();
453
+ if (!d || !n || !i || t === null) return;
454
+ let { columns: p, applyColumnOrderAndPin: m, scrollContainerRef: _ } = t, v = p.find((e) => e.key === n), y = a === null ? v ? r(v) : null : a.pane;
455
+ D = y !== null && y === i.pane && !le(_.current) ? Se(_.current) : null, s && Fe(s), f !== null && (f.badge?.remove(), f.guide.style.display = "none", W = {
456
+ float: f,
430
457
  key: n,
431
458
  pane: i.pane,
432
- timer: window.setTimeout(X, Ce),
459
+ timer: window.setTimeout(Z, xe),
433
460
  hiddenCells: []
434
461
  });
435
- let _ = /* @__PURE__ */ new Map([[n, i.pane === "center" ? void 0 : i.pane]]), v = w;
436
- d(c, _), v !== null && requestAnimationFrame(() => {
437
- w === v && (w = null);
462
+ let b = i.pane === "center" ? void 0 : i.pane, te = new Map(a !== null && o !== null ? [...o.keys].map((e) => [e, b]) : [[n, b]]), x = D;
463
+ m(d, te), x !== null && requestAnimationFrame(() => {
464
+ D === x && (D = null);
438
465
  });
439
- }, He = () => {
440
- Be();
441
- let n = w;
442
- if (w = null, !n) return;
466
+ }, Ke = () => {
467
+ Ue();
468
+ let n = D;
469
+ if (D = null, !n) return;
443
470
  let r = t?.scrollContainerRef.current ?? null;
444
471
  if (!r) return;
445
472
  let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
@@ -454,83 +481,105 @@ var v = (e) => {
454
481
  if (i.forEach((e, t) => {
455
482
  let r = n.get(t), i = a.get(t);
456
483
  if (r === void 0 || i === void 0) return;
457
- let s = (r - i) / D;
484
+ let s = (r - i) / A;
458
485
  if (!(Math.abs(s) < .5)) for (let t of e) t.style.transition = "none", t.style.transform = `translateX(${s}px)`, t.style.willChange = "transform", o.push(t);
459
486
  }), o.length === 0) return;
460
487
  r.getBoundingClientRect();
461
- for (let e of o) e.style.transition = `transform ${ue}ms ${b}`, e.style.transform = "translateX(0)";
462
- $();
488
+ for (let e of o) e.style.transition = `transform ${ce}ms ${C}`, e.style.transform = "translateX(0)";
489
+ qe();
463
490
  let s = () => {
464
491
  for (let e of o) e.style.transition = "", e.style.transform = "", e.style.willChange = "";
465
492
  }, c = {
466
493
  run: s,
467
494
  timer: window.setTimeout(() => {
468
- M === c && (M = null), s();
495
+ F === c && (F = null), s();
469
496
  }, 280)
470
497
  };
471
- M = c;
472
- }, $ = () => {
473
- let e = M;
474
- M = null, e !== null && (window.clearTimeout(e.timer), e.run());
498
+ F = c;
499
+ }, qe = () => {
500
+ let e = F;
501
+ F = null, e !== null && (window.clearTimeout(e.timer), e.run());
502
+ }, Je = (e, n, i) => {
503
+ if (t === null || !t.enabled || n.button !== 0) return;
504
+ if (n.stopPropagation(), n.preventDefault(), S !== null) {
505
+ if (n.pointerId !== N) return;
506
+ M?.(), $(!1);
507
+ }
508
+ qe(), Z(), X(), V?.forEach((e, t) => {
509
+ t.style.visibility = e.visibility;
510
+ }), S = e.key;
511
+ let a = t.columnGroups;
512
+ if (q = i === null ? null : {
513
+ groupKey: i.groupKey,
514
+ pane: i.pane
515
+ }, K = i === null ? a ? a.resolveColumnDragItem(a.tree, e.key) : null : i.item, N = n.pointerId, E = null, G = null, O = {
516
+ x: n.clientX,
517
+ y: n.clientY
518
+ }, k = {
519
+ x: n.clientX,
520
+ y: n.clientY
521
+ }, A = l(t.scrollContainerRef.current).x, j = !1, document.body.style.cursor = "grabbing", H = e.title || e.key, Ee()) {
522
+ let i = t.scrollContainerRef.current;
523
+ z = r(e), we = i?.scrollLeft ?? 0, B = /* @__PURE__ */ new Map();
524
+ let a = i ? T(i).find((t) => t.dataset.ssgColKey === e.key) : void 0;
525
+ Te = a ? n.clientX - (a.getBoundingClientRect().left - Ce(a) * A) : (t.paneLayout[z].entries.find((t) => t.column.key === e.key)?.paneLocalSize ?? 0) / 2 * A;
526
+ } else ke(H);
527
+ let o = n.currentTarget, s = n.pointerId;
528
+ try {
529
+ o.setPointerCapture(s);
530
+ } catch {}
531
+ let c = (e) => {
532
+ e.pointerId === s && (O = {
533
+ x: e.clientX,
534
+ y: e.clientY
535
+ }, Q());
536
+ }, d = u(), f = () => {
537
+ window.removeEventListener("pointermove", c), window.removeEventListener("pointerup", p), window.removeEventListener("pointercancel", m), window.removeEventListener("keydown", h, !0), window.removeEventListener("blur", g), d(), M = null;
538
+ try {
539
+ o.releasePointerCapture(s);
540
+ } catch {}
541
+ };
542
+ function p(e) {
543
+ e.pointerId === s && (f(), $(!0));
544
+ }
545
+ function m(e) {
546
+ e.pointerId === s && (f(), $(!1));
547
+ }
548
+ function h(e) {
549
+ e.key === "Escape" && (f(), $(!1));
550
+ }
551
+ function g() {
552
+ f(), $(!1);
553
+ }
554
+ window.addEventListener("pointermove", c), window.addEventListener("pointerup", p), window.addEventListener("pointercancel", m), window.addEventListener("keydown", h, !0), window.addEventListener("blur", g), M = f, Q(), P = requestAnimationFrame(Ge);
475
555
  };
476
556
  return {
477
557
  update: (e) => {
478
558
  t = e;
479
559
  },
480
- onColumnDragHandlePointerDown: (e, n) => {
481
- if (t === null || !t.enabled || n.button !== 0) return;
482
- if (n.stopPropagation(), n.preventDefault(), y !== null) {
483
- if (n.pointerId !== A) return;
484
- k?.(), Q(!1);
485
- }
486
- if ($(), X(), Y(), R?.forEach((e, t) => {
487
- t.style.visibility = e.visibility;
488
- }), y = e.key, A = n.pointerId, C = null, U = null, T = {
489
- x: n.clientX,
490
- y: n.clientY
491
- }, E = {
492
- x: n.clientX,
493
- y: n.clientY
494
- }, D = l(t.scrollContainerRef.current).x, O = !1, document.body.style.cursor = "grabbing", z = e.title || e.key, De()) {
495
- let i = t.scrollContainerRef.current;
496
- I = r(e), Ee = i?.scrollLeft ?? 0, L = /* @__PURE__ */ new Map();
497
- let a = i ? S(i).find((t) => t.dataset.ssgColKey === e.key) : void 0;
498
- V = a ? n.clientX - (a.getBoundingClientRect().left - Te(a) * D) : (t.paneLayout[I].entries.find((t) => t.column.key === e.key)?.paneLocalSize ?? 0) / 2 * D;
499
- } else Oe(z);
500
- let i = n.currentTarget, a = n.pointerId;
501
- try {
502
- i.setPointerCapture(a);
503
- } catch {}
504
- let o = (e) => {
505
- e.pointerId === a && (T = {
506
- x: e.clientX,
507
- y: e.clientY
508
- }, Z());
509
- }, s = u(), c = () => {
510
- window.removeEventListener("pointermove", o), window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), window.removeEventListener("keydown", p, !0), window.removeEventListener("blur", m), s(), k = null;
511
- try {
512
- i.releasePointerCapture(a);
513
- } catch {}
514
- };
515
- function d(e) {
516
- e.pointerId === a && (c(), Q(!0));
517
- }
518
- function f(e) {
519
- e.pointerId === a && (c(), Q(!1));
520
- }
521
- function p(e) {
522
- e.key === "Escape" && (c(), Q(!1));
523
- }
524
- function m() {
525
- c(), Q(!1);
526
- }
527
- window.addEventListener("pointermove", o), window.addEventListener("pointerup", d), window.addEventListener("pointercancel", f), window.addEventListener("keydown", p, !0), window.addEventListener("blur", m), k = c, Z(), j = requestAnimationFrame(Ve);
560
+ onColumnDragHandlePointerDown: (e, t) => {
561
+ Je(e, t, null);
562
+ },
563
+ onColumnGroupDragHandlePointerDown: (e, n, r) => {
564
+ let i = t?.columnGroups;
565
+ if (t === null || !t.enabled || !i) return;
566
+ let a = i.resolveColumnGroupDragItem(i.tree, e, t.columns, n), o = a === null ? void 0 : t.columns.find((e) => a.keys.has(e.key));
567
+ if (a === null || o === void 0) return;
568
+ let s = i.tree.groups.get(e)?.title || e;
569
+ Je({
570
+ ...o,
571
+ title: s
572
+ }, r, {
573
+ groupKey: e,
574
+ pane: n,
575
+ item: a
576
+ });
528
577
  },
529
- applyReorderSettle: He,
578
+ applyReorderSettle: Ke,
530
579
  dispose: () => {
531
- k?.(), k = null, j !== null && (cancelAnimationFrame(j), j = null), y = null, A = null, C = null, document.body.style.cursor = "", K(), L && J(L), L = null, I = null, Y(), X();
580
+ M?.(), M = null, P !== null && (cancelAnimationFrame(P), P = null), S = null, N = null, E = null, q = null, K = null, document.body.style.cursor = "", Y(), B && Fe(B), B = null, z = null, X(), Z();
532
581
  }
533
582
  };
534
583
  };
535
584
  //#endregion
536
- export { h as computeHeaderReorderedKeys, C as createColumnHeaderDragController, _ as resolveCenterDropSlotRange, g as resolveConsumerDropSlot };
585
+ export { h as computeHeaderReorderedKeys, E as createColumnHeaderDragController, _ as resolveCenterDropSlotRange, ee as resolveConsumerDropAnchorKey, g as resolveConsumerDropSlot };