@ishibashi0112/spreadsheet-grid-core 1.5.1 → 1.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/controllers/columnHeaderDragController.cjs +1 -1
- package/dist/controllers/columnHeaderDragController.d.ts +11 -0
- package/dist/controllers/columnHeaderDragController.js +259 -210
- package/dist/controllers/editController.cjs +1 -1
- package/dist/controllers/editController.d.ts +3 -2
- package/dist/controllers/editController.js +171 -152
- package/dist/controllers/pointerInteractionsController.cjs +1 -1
- package/dist/controllers/pointerInteractionsController.d.ts +1 -0
- package/dist/controllers/pointerInteractionsController.js +85 -38
- package/dist/controllers/searchSelectEditorController.cjs +1 -0
- package/dist/controllers/searchSelectEditorController.d.ts +48 -0
- package/dist/controllers/searchSelectEditorController.js +188 -0
- package/dist/engine/columnCommands.cjs +1 -1
- package/dist/engine/columnCommands.d.ts +4 -0
- package/dist/engine/columnCommands.js +47 -16
- package/dist/engine/columnLayout.cjs +1 -1
- package/dist/engine/columnLayout.d.ts +7 -1
- package/dist/engine/columnLayout.js +25 -22
- package/dist/engine/createGridEngine.cjs +1 -1
- package/dist/engine/createGridEngine.d.ts +2 -1
- package/dist/engine/createGridEngine.js +46 -36
- package/dist/engine/exportCommands.cjs +2 -2
- package/dist/engine/exportCommands.js +50 -38
- package/dist/engine/gridApi.cjs +2 -1
- package/dist/engine/gridApi.d.ts +2 -0
- package/dist/engine/gridApi.js +17 -7
- package/dist/engine/notifiers.cjs +1 -1
- package/dist/engine/notifiers.d.ts +13 -1
- package/dist/engine/notifiers.js +39 -19
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/locales/en.cjs +1 -1
- package/dist/locales/en.js +8 -0
- package/dist/logic/columnGroupCells.cjs +1 -0
- package/dist/logic/columnGroupCells.d.ts +54 -0
- package/dist/logic/columnGroupCells.js +53 -0
- package/dist/logic/columnGroups.cjs +1 -0
- package/dist/logic/columnGroups.d.ts +46 -0
- package/dist/logic/columnGroups.js +335 -0
- package/dist/logic/domGuards.cjs +1 -1
- package/dist/logic/domGuards.d.ts +1 -1
- package/dist/logic/domGuards.js +5 -5
- package/dist/logic/exportCsv.cjs +2 -2
- package/dist/logic/exportCsv.d.ts +2 -1
- package/dist/logic/exportCsv.js +16 -13
- package/dist/logic/fillHandle.cjs +1 -1
- package/dist/logic/fillHandle.js +54 -51
- package/dist/logic/gridState.cjs +1 -1
- package/dist/logic/gridState.d.ts +8 -1
- package/dist/logic/gridState.js +14 -8
- package/dist/logic/imeInput.cjs +1 -1
- package/dist/logic/imeInput.js +14 -13
- package/dist/logic/localeTextFeatures.cjs +1 -1
- package/dist/logic/localeTextFeatures.d.ts +10 -0
- package/dist/logic/localeTextFeatures.js +14 -6
- package/dist/logic/localeTextPopups.cjs +1 -1
- package/dist/logic/localeTextPopups.d.ts +2 -0
- package/dist/logic/localeTextPopups.js +2 -0
- package/dist/logic/selectEditorState.cjs +1 -1
- package/dist/logic/selectEditorState.d.ts +16 -1
- package/dist/logic/selectEditorState.js +30 -21
- package/dist/logic/selectFillRow.cjs +1 -0
- package/dist/logic/selectFillRow.d.ts +4 -0
- package/dist/logic/selectFillRow.js +25 -0
- package/dist/logic/selectLabels.cjs +1 -1
- package/dist/logic/selectLabels.js +25 -22
- package/dist/logic/selectSearch.cjs +1 -0
- package/dist/logic/selectSearch.d.ts +27 -0
- package/dist/logic/selectSearch.js +102 -0
- package/dist/model/gridActions.cjs +1 -1
- package/dist/model/gridActions.d.ts +10 -0
- package/dist/model/gridActions.js +9 -0
- package/dist/model/gridReducer.cjs +1 -1
- package/dist/model/gridReducer.js +29 -2
- package/dist/model/gridTypes.core.d.ts +218 -6
- package/dist/model/gridTypes.unbound.d.ts +3 -0
- package/dist/utils/editorVisibleBounds.cjs +1 -1
- package/dist/utils/editorVisibleBounds.d.ts +4 -0
- package/dist/utils/editorVisibleBounds.js +12 -2
- package/dist/utils/overflowTitle.cjs +1 -0
- package/dist/utils/overflowTitle.d.ts +1 -0
- package/dist/utils/overflowTitle.js +7 -0
- 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
|
-
},
|
|
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
|
-
],
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
86
|
-
let t = null,
|
|
93
|
+
}, E = () => {
|
|
94
|
+
let t = null, S = null, E = null, D = null, O = {
|
|
87
95
|
x: 0,
|
|
88
96
|
y: 0
|
|
89
|
-
},
|
|
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
|
-
}),
|
|
94
|
-
for (let e of Object.values(
|
|
95
|
-
},
|
|
96
|
-
if (
|
|
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),
|
|
125
|
-
},
|
|
126
|
-
let t =
|
|
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(" + (
|
|
151
|
+
t.style.transform = "translate(" + (O.x + te) + "px," + (O.y + x) + "px)";
|
|
129
152
|
let n = e ?? "out";
|
|
130
|
-
if (
|
|
131
|
-
|
|
132
|
-
let r =
|
|
133
|
-
n === "out" ? (t.style.opacity =
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
},
|
|
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,
|
|
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 :
|
|
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) /
|
|
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
|
-
|
|
156
|
-
leftPx: u + i(a.left,
|
|
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 -
|
|
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) /
|
|
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
|
-
|
|
172
|
-
leftPx: f + i(a.right,
|
|
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) /
|
|
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
|
-
|
|
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
|
-
},
|
|
187
|
-
let t =
|
|
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
|
-
},
|
|
197
|
-
let n =
|
|
198
|
-
n !== void 0 &&
|
|
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
|
-
},
|
|
203
|
-
let r = [], 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 -
|
|
212
|
-
|
|
213
|
-
for (let e of
|
|
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" :
|
|
240
|
+
let o = h !== null && !h.has(e) ? "none" : de;
|
|
218
241
|
if (t === a) {
|
|
219
|
-
r.push(e), i.has(e) || (
|
|
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(
|
|
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) ||
|
|
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
|
-
},
|
|
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(
|
|
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
|
-
},
|
|
258
|
+
}, Ie = (e) => {
|
|
236
259
|
let t = (e) => {
|
|
237
|
-
for (let t of
|
|
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
|
-
},
|
|
241
|
-
let r =
|
|
263
|
+
}, Le = (e, t, n) => {
|
|
264
|
+
let r = U;
|
|
242
265
|
if (r === null) {
|
|
243
266
|
let e = document.createElement("div");
|
|
244
|
-
e.className =
|
|
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 =
|
|
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
|
-
},
|
|
281
|
+
}, U = r;
|
|
259
282
|
}
|
|
260
|
-
let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + e.clientLeft *
|
|
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) /
|
|
264
|
-
`top:${(s - i.top) /
|
|
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:${
|
|
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) /
|
|
275
|
-
width: t.width /
|
|
276
|
-
height: t.height /
|
|
297
|
+
top: (t.top - s) / A,
|
|
298
|
+
width: t.width / A,
|
|
299
|
+
height: t.height / A
|
|
277
300
|
}, r = e.cloneNode(!0);
|
|
278
|
-
|
|
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(
|
|
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 =
|
|
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
|
-
},
|
|
308
|
+
}, Re = (e) => {
|
|
286
309
|
let n = t?.scrollContainerRef.current ?? null, r = n?.parentElement ?? null;
|
|
287
|
-
return !n || !r ? null : e.length === 0 ||
|
|
288
|
-
},
|
|
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 *
|
|
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
|
-
},
|
|
298
|
-
let r = e.guide, i = t === null ? null :
|
|
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" &&
|
|
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) /
|
|
309
|
-
},
|
|
310
|
-
let n = e.layer.getBoundingClientRect(), r = Math.max(e.layerWidth - e.columnWidth, 0), i = Math.min(Math.max((
|
|
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" ?
|
|
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
|
-
|
|
321
|
-
|
|
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
|
-
},
|
|
327
|
-
let e =
|
|
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 ?
|
|
355
|
+
let r = t?.scrollContainerRef.current ?? null, i = r ? T(r).filter((e) => e.dataset.ssgColKey === n) : [];
|
|
333
356
|
if (i.length === 0) {
|
|
334
|
-
|
|
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
|
-
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
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
|
-
|
|
377
|
+
Y(), Ve(e, n.pane);
|
|
353
378
|
return;
|
|
354
379
|
}
|
|
355
380
|
}
|
|
356
|
-
|
|
381
|
+
X(), ke(H), Ae(n.pane), Pe(null, "rest");
|
|
357
382
|
return;
|
|
358
383
|
}
|
|
359
|
-
if (
|
|
360
|
-
|
|
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
|
-
|
|
388
|
+
X();
|
|
364
389
|
return;
|
|
365
390
|
}
|
|
366
|
-
if (
|
|
367
|
-
|
|
391
|
+
if (Ae(e ? e.pane : null), !e) {
|
|
392
|
+
E = null, Oe();
|
|
368
393
|
return;
|
|
369
394
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
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 && (
|
|
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(
|
|
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
|
-
|
|
396
|
-
},
|
|
397
|
-
|
|
398
|
-
let n =
|
|
399
|
-
|
|
400
|
-
let
|
|
401
|
-
|
|
402
|
-
let
|
|
403
|
-
if (
|
|
404
|
-
|
|
405
|
-
|
|
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 (
|
|
435
|
+
if (f !== null) {
|
|
409
436
|
let t = null;
|
|
410
|
-
for (let e of
|
|
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 ?
|
|
415
|
-
float:
|
|
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
|
-
},
|
|
447
|
+
}, W = e);
|
|
421
448
|
}
|
|
422
|
-
|
|
423
|
-
|
|
449
|
+
V = s, window.setTimeout(() => {
|
|
450
|
+
Fe(s), V === s && (V = null), e !== null && W === e && Z();
|
|
424
451
|
}, 200);
|
|
425
|
-
} else
|
|
426
|
-
if (!
|
|
427
|
-
let { columns:
|
|
428
|
-
|
|
429
|
-
float:
|
|
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(
|
|
459
|
+
timer: window.setTimeout(Z, xe),
|
|
433
460
|
hiddenCells: []
|
|
434
461
|
});
|
|
435
|
-
let
|
|
436
|
-
d
|
|
437
|
-
|
|
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
|
-
},
|
|
440
|
-
|
|
441
|
-
let n =
|
|
442
|
-
if (
|
|
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) /
|
|
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 ${
|
|
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
|
-
|
|
495
|
+
F === c && (F = null), s();
|
|
469
496
|
}, 280)
|
|
470
497
|
};
|
|
471
|
-
|
|
472
|
-
},
|
|
473
|
-
let e =
|
|
474
|
-
|
|
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,
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
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:
|
|
578
|
+
applyReorderSettle: Ke,
|
|
530
579
|
dispose: () => {
|
|
531
|
-
|
|
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,
|
|
585
|
+
export { h as computeHeaderReorderedKeys, E as createColumnHeaderDragController, _ as resolveCenterDropSlotRange, ee as resolveConsumerDropAnchorKey, g as resolveConsumerDropSlot };
|