@ishibashi0112/spreadsheet-grid-core 1.0.2 → 1.2.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/activeRowFollowController.cjs +1 -0
- package/dist/controllers/activeRowFollowController.d.ts +18 -0
- package/dist/controllers/activeRowFollowController.js +68 -0
- package/dist/controllers/autoHeightMeasurer.cjs +1 -1
- package/dist/controllers/autoHeightMeasurer.js +17 -17
- package/dist/controllers/clipboardController.cjs +1 -1
- package/dist/controllers/clipboardController.d.ts +4 -0
- package/dist/controllers/clipboardController.js +82 -54
- package/dist/controllers/columnAutosizeRunner.cjs +1 -1
- package/dist/controllers/columnAutosizeRunner.d.ts +1 -0
- package/dist/controllers/columnAutosizeRunner.js +17 -16
- package/dist/controllers/columnHeaderDragController.cjs +1 -1
- package/dist/controllers/columnHeaderDragController.js +169 -168
- package/dist/controllers/columnMenuController.cjs +1 -1
- package/dist/controllers/columnMenuController.js +71 -69
- package/dist/controllers/contextMenuController.cjs +1 -1
- package/dist/controllers/contextMenuController.d.ts +5 -1
- package/dist/controllers/contextMenuController.js +62 -40
- package/dist/controllers/editController.cjs +1 -1
- package/dist/controllers/editController.d.ts +1 -0
- package/dist/controllers/editController.js +106 -99
- package/dist/controllers/fillHandleController.cjs +1 -1
- package/dist/controllers/fillHandleController.d.ts +1 -0
- package/dist/controllers/fillHandleController.js +157 -157
- package/dist/controllers/filterPopoverController.cjs +1 -1
- package/dist/controllers/filterPopoverController.js +6 -6
- package/dist/controllers/findController.cjs +1 -1
- package/dist/controllers/findController.d.ts +1 -0
- package/dist/controllers/findController.js +16 -15
- package/dist/controllers/historyController.cjs +1 -1
- package/dist/controllers/historyController.d.ts +6 -0
- package/dist/controllers/historyController.js +79 -37
- package/dist/controllers/imeInputController.cjs +1 -1
- package/dist/controllers/imeInputController.js +65 -54
- package/dist/controllers/keyboardController.cjs +1 -1
- package/dist/controllers/keyboardController.d.ts +1 -0
- package/dist/controllers/keyboardController.js +46 -42
- package/dist/controllers/pointerInteractionsController.cjs +1 -1
- package/dist/controllers/pointerInteractionsController.d.ts +1 -0
- package/dist/controllers/pointerInteractionsController.js +172 -172
- package/dist/controllers/popoverSupport.cjs +1 -1
- package/dist/controllers/popoverSupport.d.ts +1 -0
- package/dist/controllers/popoverSupport.js +9 -4
- package/dist/controllers/rowDragController.cjs +1 -1
- package/dist/controllers/rowDragController.d.ts +2 -0
- package/dist/controllers/rowDragController.js +160 -146
- package/dist/controllers/scrollSyncController.cjs +1 -1
- package/dist/controllers/scrollSyncController.js +45 -43
- package/dist/controllers/serverSideRowModel.cjs +1 -1
- package/dist/controllers/serverSideRowModel.js +19 -19
- package/dist/controllers/toolPanelController.cjs +1 -1
- package/dist/controllers/toolPanelController.js +26 -14
- package/dist/controllers/tooltipController.cjs +1 -1
- package/dist/controllers/tooltipController.js +74 -72
- package/dist/controllers/viewportSyncController.cjs +1 -1
- package/dist/controllers/viewportSyncController.d.ts +4 -1
- package/dist/controllers/viewportSyncController.js +66 -28
- package/dist/engine/columnCommands.cjs +1 -1
- package/dist/engine/columnCommands.js +113 -113
- package/dist/engine/createGridEngine.cjs +3 -3
- package/dist/engine/createGridEngine.d.ts +2 -0
- package/dist/engine/createGridEngine.js +72 -70
- package/dist/engine/exportCommands.cjs +1 -1
- package/dist/engine/exportCommands.js +18 -9
- package/dist/engine/fullFeatures.cjs +1 -1
- package/dist/engine/fullFeatures.js +6 -6
- package/dist/engine/gridApi.cjs +6 -6
- package/dist/engine/gridApi.d.ts +8 -2
- package/dist/engine/gridApi.js +197 -187
- package/dist/engine/notifiers.cjs +1 -1
- package/dist/engine/notifiers.d.ts +4 -0
- package/dist/engine/notifiers.js +7 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +7 -6
- package/dist/locales/en.cjs +1 -1
- package/dist/locales/en.js +5 -0
- package/dist/logic/autoScrollGeometry.cjs +1 -1
- package/dist/logic/autoScrollGeometry.d.ts +2 -0
- package/dist/logic/autoScrollGeometry.js +3 -3
- package/dist/logic/editorValues.cjs +1 -1
- package/dist/logic/editorValues.js +37 -34
- package/dist/logic/exportCsv.cjs +3 -3
- package/dist/logic/exportCsv.d.ts +4 -1
- package/dist/logic/exportCsv.js +22 -20
- package/dist/logic/exportData.cjs +1 -1
- package/dist/logic/exportData.d.ts +4 -1
- package/dist/logic/exportData.js +40 -36
- package/dist/logic/filtering.cjs +1 -1
- package/dist/logic/filtering.d.ts +2 -1
- package/dist/logic/filtering.js +16 -3
- package/dist/logic/geometry.cjs +1 -1
- package/dist/logic/geometry.d.ts +2 -0
- package/dist/logic/geometry.js +41 -20
- package/dist/logic/gridState.cjs +1 -1
- package/dist/logic/gridState.d.ts +3 -2
- package/dist/logic/gridState.js +32 -23
- package/dist/logic/groupExport.cjs +1 -1
- package/dist/logic/groupExport.js +28 -27
- package/dist/logic/grouping.cjs +1 -1
- package/dist/logic/grouping.d.ts +1 -0
- package/dist/logic/grouping.js +52 -41
- package/dist/logic/historyRebase.cjs +1 -0
- package/dist/logic/historyRebase.d.ts +5 -0
- package/dist/logic/historyRebase.js +36 -0
- package/dist/logic/imeInput.cjs +1 -1
- package/dist/logic/imeInput.js +6 -4
- package/dist/logic/localeTextFeatures.cjs +1 -1
- package/dist/logic/localeTextFeatures.d.ts +8 -0
- package/dist/logic/localeTextFeatures.js +11 -5
- package/dist/logic/localeTextPopups.cjs +1 -1
- package/dist/logic/localeTextPopups.d.ts +1 -0
- package/dist/logic/localeTextPopups.js +1 -0
- package/dist/logic/pasteFill.cjs +1 -0
- package/dist/logic/pasteFill.d.ts +2 -0
- package/dist/logic/pasteFill.js +25 -0
- package/dist/logic/selectEditorState.cjs +1 -1
- package/dist/logic/selectEditorState.d.ts +4 -1
- package/dist/logic/selectEditorState.js +14 -14
- package/dist/logic/selectLabels.cjs +1 -0
- package/dist/logic/selectLabels.d.ts +3 -0
- package/dist/logic/selectLabels.js +41 -0
- package/dist/logic/selectionAggregates.cjs +1 -1
- package/dist/logic/selectionAggregates.js +2 -3
- package/dist/logic/validation.cjs +1 -1
- package/dist/logic/validation.d.ts +1 -1
- package/dist/logic/validation.js +21 -21
- package/dist/logic/valueParsers.cjs +1 -0
- package/dist/logic/valueParsers.d.ts +14 -0
- package/dist/logic/valueParsers.js +23 -0
- package/dist/model/gridActions.cjs +1 -1
- package/dist/model/gridActions.d.ts +13 -0
- package/dist/model/gridActions.js +11 -0
- package/dist/model/gridReducer.cjs +1 -1
- package/dist/model/gridReducer.js +128 -65
- package/dist/model/gridTypes.core.d.ts +345 -43
- package/dist/utils/clipboard.cjs +4 -4
- package/dist/utils/clipboard.d.ts +14 -2
- package/dist/utils/clipboard.js +101 -49
- package/dist/utils/gridVisibleBand.cjs +1 -0
- package/dist/utils/gridVisibleBand.d.ts +4 -0
- package/dist/utils/gridVisibleBand.js +24 -0
- package/dist/utils/popupContainer.cjs +1 -0
- package/dist/utils/popupContainer.d.ts +8 -0
- package/dist/utils/popupContainer.js +60 -0
- package/dist/utils/scrollBottom.cjs +1 -0
- package/dist/utils/scrollBottom.d.ts +1 -0
- package/dist/utils/scrollBottom.js +4 -0
- package/dist/utils/topAlignedInput.cjs +1 -0
- package/dist/utils/topAlignedInput.d.ts +3 -0
- package/dist/utils/topAlignedInput.js +23 -0
- package/package.json +1 -1
|
@@ -5,8 +5,9 @@ import { resolveElementScale as l } from "../logic/elementScale.js";
|
|
|
5
5
|
import { beginEscapeCancelableDrag as u } from "./escapeClaimController.js";
|
|
6
6
|
import { applySlotToElement as d } from "../logic/slotDom.js";
|
|
7
7
|
import { syncPortalTokens as f } from "../utils/portalTokens.js";
|
|
8
|
+
import { appendToPopupContainer as p, getPopupContainerFor as m } from "../utils/popupContainer.js";
|
|
8
9
|
//#region src/controllers/columnHeaderDragController.ts
|
|
9
|
-
function
|
|
10
|
+
function h(e, t, n, i) {
|
|
10
11
|
let a = e.find((e) => e.key === t);
|
|
11
12
|
if (!a) return null;
|
|
12
13
|
let o = r(a), s = {
|
|
@@ -29,7 +30,7 @@ function p(e, t, n, i) {
|
|
|
29
30
|
...s.right
|
|
30
31
|
];
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function g(e, n, i, a) {
|
|
33
34
|
let o = e.filter((e) => r(e) === i && e.visible !== !1).map((e) => e.key), { entries: s } = n;
|
|
34
35
|
for (let e = Math.max(a, 0); e < s.length; e += 1) {
|
|
35
36
|
let n = s[e].column.key;
|
|
@@ -39,7 +40,7 @@ function m(e, n, i, a) {
|
|
|
39
40
|
}
|
|
40
41
|
return o.length;
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
+
function _(e, n) {
|
|
43
44
|
let i = new Map(e.map((e) => [e.key, r(e)])), { entries: a } = n, o = 0;
|
|
44
45
|
for (; o < a.length;) {
|
|
45
46
|
let e = a[o].column.key;
|
|
@@ -53,22 +54,22 @@ function h(e, n) {
|
|
|
53
54
|
max: s
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
|
-
var
|
|
57
|
+
var v = (e) => {
|
|
57
58
|
let n = 0;
|
|
58
59
|
for (; n < e.entries.length && t(e.entries[n].column.key);) n += 1;
|
|
59
60
|
return n;
|
|
60
|
-
},
|
|
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 = [
|
|
61
62
|
"data-ssg-col-key",
|
|
62
63
|
"data-ssg-tooltip",
|
|
63
64
|
"data-autoheight-cell",
|
|
64
65
|
"id",
|
|
65
66
|
"tabindex"
|
|
66
|
-
],
|
|
67
|
+
], Se = 180, Ce = 400, S = (t) => {
|
|
67
68
|
let n = [];
|
|
68
69
|
return t.querySelectorAll("[data-ssg-col-key]").forEach((r) => {
|
|
69
70
|
e(t, r) || n.push(r);
|
|
70
71
|
}), n;
|
|
71
|
-
},
|
|
72
|
+
}, we = (t) => {
|
|
72
73
|
if (!t) return null;
|
|
73
74
|
let n = /* @__PURE__ */ new Map();
|
|
74
75
|
return t.querySelectorAll("[data-ssg-col-key]").forEach((r) => {
|
|
@@ -76,23 +77,23 @@ var g = (e) => {
|
|
|
76
77
|
let i = r.dataset.ssgColKey;
|
|
77
78
|
i && !n.has(i) && n.set(i, r.getBoundingClientRect().left);
|
|
78
79
|
}), n;
|
|
79
|
-
},
|
|
80
|
+
}, Te = (e) => {
|
|
80
81
|
let t = getComputedStyle(e).transform, n = /^matrix(3d)?\(([^)]*)\)$/.exec(t);
|
|
81
82
|
if (n === null) return 0;
|
|
82
83
|
let r = Number(n[2].split(",")[n[1] === "3d" ? 12 : 4]);
|
|
83
84
|
return Number.isFinite(r) ? r : 0;
|
|
84
|
-
},
|
|
85
|
-
let t = null,
|
|
85
|
+
}, C = () => {
|
|
86
|
+
let t = null, y = null, C = null, w = null, T = {
|
|
86
87
|
x: 0,
|
|
87
88
|
y: 0
|
|
88
|
-
},
|
|
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 = () => ({
|
|
89
90
|
left: t?.leftIndicatorRef.current ?? null,
|
|
90
91
|
center: t?.centerIndicatorRef.current ?? null,
|
|
91
92
|
right: t?.rightIndicatorRef.current ?? null
|
|
92
|
-
}),
|
|
93
|
-
for (let e of Object.values(
|
|
94
|
-
},
|
|
95
|
-
if (
|
|
93
|
+
}), G = () => {
|
|
94
|
+
for (let e of Object.values(W())) e && (e.style.display = "none");
|
|
95
|
+
}, Oe = (e) => {
|
|
96
|
+
if (N) return;
|
|
96
97
|
let n = document.createElement("div");
|
|
97
98
|
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 = [
|
|
98
99
|
"position:fixed",
|
|
@@ -120,35 +121,35 @@ var g = (e) => {
|
|
|
120
121
|
let r = document.createElement("span");
|
|
121
122
|
r.style.cssText = "display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex:none";
|
|
122
123
|
let i = document.createElement("span");
|
|
123
|
-
i.textContent = e, n.appendChild(r), n.appendChild(i),
|
|
124
|
-
},
|
|
125
|
-
let t =
|
|
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;
|
|
126
127
|
if (!t) return;
|
|
127
|
-
t.style.transform = "translate(" + (
|
|
128
|
+
t.style.transform = "translate(" + (T.x + ne) + "px," + (T.y + re) + "px)";
|
|
128
129
|
let n = e ?? "out";
|
|
129
|
-
if (
|
|
130
|
-
|
|
131
|
-
let r =
|
|
132
|
-
n === "out" ? (t.style.opacity =
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
},
|
|
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) => {
|
|
136
137
|
if (t === null) return null;
|
|
137
138
|
let { paneLayout: a, leftPaneScrollRef: o, rightPaneScrollRef: s, bodyScrollRef: c, scrollContainerRef: l, leftLeadingWidth: u, centerLeadingWidth: d, rightLeadingWidth: f } = t, p = l.current;
|
|
138
139
|
if (p) {
|
|
139
140
|
let t = p.getBoundingClientRect();
|
|
140
141
|
if (e < t.left || e > t.right || r < t.top || r > t.bottom) return null;
|
|
141
142
|
}
|
|
142
|
-
let m = o.current,
|
|
143
|
-
if (m && a.left.entries.length === 0 && e <= m.getBoundingClientRect().left + Math.max(u,
|
|
143
|
+
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 {
|
|
144
145
|
pane: "left",
|
|
145
146
|
slot: 0,
|
|
146
|
-
leftPx: u > 0 ? u :
|
|
147
|
+
leftPx: u > 0 ? u : te
|
|
147
148
|
};
|
|
148
149
|
if (m && a.left.entries.length > 0) {
|
|
149
150
|
let t = m.getBoundingClientRect();
|
|
150
151
|
if (e < t.right) {
|
|
151
|
-
let r = (e - t.left) /
|
|
152
|
+
let r = (e - t.left) / D - u, o = Math.max(n(a.left, r), v(a.left));
|
|
152
153
|
return {
|
|
153
154
|
pane: "left",
|
|
154
155
|
slot: o,
|
|
@@ -156,15 +157,15 @@ var g = (e) => {
|
|
|
156
157
|
};
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
|
-
if (
|
|
160
|
+
if (h && a.right.entries.length === 0 && e >= h.getBoundingClientRect().left - ee * D) return {
|
|
160
161
|
pane: "right",
|
|
161
162
|
slot: 0,
|
|
162
163
|
leftPx: -2
|
|
163
164
|
};
|
|
164
|
-
if (
|
|
165
|
-
let t =
|
|
165
|
+
if (h && a.right.entries.length > 0) {
|
|
166
|
+
let t = h.getBoundingClientRect();
|
|
166
167
|
if (e >= t.left) {
|
|
167
|
-
let r = (e - t.left) /
|
|
168
|
+
let r = (e - t.left) / D - f, o = Math.max(n(a.right, r), v(a.right));
|
|
168
169
|
return {
|
|
169
170
|
pane: "right",
|
|
170
171
|
slot: o,
|
|
@@ -172,9 +173,9 @@ var g = (e) => {
|
|
|
172
173
|
};
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
|
-
let
|
|
176
|
-
if (
|
|
177
|
-
let r =
|
|
176
|
+
let g = c.current;
|
|
177
|
+
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);
|
|
178
179
|
return {
|
|
179
180
|
pane: "center",
|
|
180
181
|
slot: c,
|
|
@@ -182,8 +183,8 @@ var g = (e) => {
|
|
|
182
183
|
};
|
|
183
184
|
}
|
|
184
185
|
return null;
|
|
185
|
-
},
|
|
186
|
-
let t =
|
|
186
|
+
}, je = (e) => {
|
|
187
|
+
let t = W();
|
|
187
188
|
for (let n of [
|
|
188
189
|
"left",
|
|
189
190
|
"center",
|
|
@@ -192,14 +193,14 @@ var g = (e) => {
|
|
|
192
193
|
let r = t[n];
|
|
193
194
|
r && (n === e.pane ? (r.style.left = `${e.leftPx}px`, r.style.display = "block") : r.style.display = "none");
|
|
194
195
|
}
|
|
195
|
-
},
|
|
196
|
-
let n =
|
|
197
|
-
n !== void 0 &&
|
|
196
|
+
}, Me = (e, t) => {
|
|
197
|
+
let n = R?.get(t);
|
|
198
|
+
n !== void 0 && R?.delete(t), e.set(t, n ?? {
|
|
198
199
|
zIndex: t.style.zIndex,
|
|
199
200
|
visibility: t.style.visibility
|
|
200
201
|
});
|
|
201
|
-
},
|
|
202
|
-
let r = [], i =
|
|
202
|
+
}, q = (e, n) => {
|
|
203
|
+
let r = [], i = L, a = y, o = I;
|
|
203
204
|
if (!i || a === null || o === null || t === null) return r;
|
|
204
205
|
let s = t.scrollContainerRef.current;
|
|
205
206
|
if (!s) return r;
|
|
@@ -207,44 +208,44 @@ var g = (e) => {
|
|
|
207
208
|
if (l < 0) return r;
|
|
208
209
|
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();
|
|
209
210
|
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);
|
|
210
|
-
let p = o === "center" ? s.scrollLeft -
|
|
211
|
-
|
|
212
|
-
for (let e of
|
|
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)) {
|
|
213
214
|
let t = e.dataset.ssgColKey;
|
|
214
215
|
if (t === void 0) continue;
|
|
215
216
|
g.add(e);
|
|
216
|
-
let o = h !== null && !h.has(e) ? "none" :
|
|
217
|
+
let o = h !== null && !h.has(e) ? "none" : pe;
|
|
217
218
|
if (t === a) {
|
|
218
|
-
r.push(e), i.has(e) || (
|
|
219
|
+
r.push(e), i.has(e) || (Me(i, e), e.style.zIndex = me, e.style.willChange = "transform");
|
|
219
220
|
let t = i.get(e);
|
|
220
|
-
n === "follow" ? (e.style.visibility = t?.visibility ?? "", e.setAttribute(
|
|
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)");
|
|
221
222
|
continue;
|
|
222
223
|
}
|
|
223
224
|
let s = f.get(t) ?? 0;
|
|
224
225
|
if (s === 0 && !i.has(e)) continue;
|
|
225
|
-
i.has(e) ||
|
|
226
|
+
i.has(e) || Me(i, e);
|
|
226
227
|
let c = `translateX(${s}px)`;
|
|
227
228
|
e.style.transform !== c && (e.style.transition = o, e.style.transform = c);
|
|
228
229
|
}
|
|
229
230
|
return r;
|
|
230
|
-
},
|
|
231
|
+
}, J = (e) => {
|
|
231
232
|
e.forEach((e, t) => {
|
|
232
|
-
t.style.transition = "", t.style.transform = "", t.style.willChange = "", t.style.zIndex = e.zIndex, t.style.visibility = e.visibility, t.removeAttribute(
|
|
233
|
+
t.style.transition = "", t.style.transform = "", t.style.willChange = "", t.style.zIndex = e.zIndex, t.style.visibility = e.visibility, t.removeAttribute(x);
|
|
233
234
|
});
|
|
234
|
-
},
|
|
235
|
+
}, Ne = (e) => {
|
|
235
236
|
let t = (e) => {
|
|
236
|
-
for (let t of
|
|
237
|
+
for (let t of xe) e.removeAttribute(t);
|
|
237
238
|
};
|
|
238
239
|
t(e), e.querySelectorAll("*").forEach(t), e.querySelectorAll(".ssg-header-actions").forEach((e) => e.remove());
|
|
239
|
-
},
|
|
240
|
-
let r =
|
|
240
|
+
}, Pe = (e, t, n) => {
|
|
241
|
+
let r = B;
|
|
241
242
|
if (r === null) {
|
|
242
243
|
let e = document.createElement("div");
|
|
243
|
-
e.className =
|
|
244
|
+
e.className = ge, e.setAttribute("aria-hidden", "true"), e.setAttribute("inert", "");
|
|
244
245
|
let n = document.createElement("div");
|
|
245
246
|
n.style.cssText = "position:absolute;top:0;left:0;height:100%;will-change:transform";
|
|
246
247
|
let i = document.createElement("div");
|
|
247
|
-
i.className =
|
|
248
|
+
i.className = ye, i.style.cssText = "position:absolute;display:none", e.append(n, i), t.appendChild(e), r = {
|
|
248
249
|
layer: e,
|
|
249
250
|
column: n,
|
|
250
251
|
guide: i,
|
|
@@ -254,129 +255,129 @@ var g = (e) => {
|
|
|
254
255
|
columnWidth: 0,
|
|
255
256
|
scrollTop: 0,
|
|
256
257
|
cellCount: 0
|
|
257
|
-
},
|
|
258
|
+
}, B = r;
|
|
258
259
|
}
|
|
259
|
-
let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + e.clientLeft *
|
|
260
|
+
let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + e.clientLeft * D, s = a.top + e.clientTop * D;
|
|
260
261
|
r.layer.style.cssText = [
|
|
261
262
|
"position:absolute",
|
|
262
|
-
`left:${(o - i.left) /
|
|
263
|
-
`top:${(s - i.top) /
|
|
263
|
+
`left:${(o - i.left) / D - t.clientLeft + t.scrollLeft}px`,
|
|
264
|
+
`top:${(s - i.top) / D - t.clientTop + t.scrollTop}px`,
|
|
264
265
|
`width:${e.clientWidth}px`,
|
|
265
266
|
`height:${e.clientHeight}px`,
|
|
266
267
|
"overflow:hidden",
|
|
267
268
|
"pointer-events:none",
|
|
268
|
-
`z-index:${
|
|
269
|
+
`z-index:${he}`
|
|
269
270
|
].join(";");
|
|
270
271
|
let c = [], l = [], u = 0;
|
|
271
272
|
for (let e of n) {
|
|
272
273
|
let t = e.getBoundingClientRect(), n = {
|
|
273
|
-
top: (t.top - s) /
|
|
274
|
-
width: t.width /
|
|
275
|
-
height: t.height /
|
|
274
|
+
top: (t.top - s) / D,
|
|
275
|
+
width: t.width / D,
|
|
276
|
+
height: t.height / D
|
|
276
277
|
}, r = e.cloneNode(!0);
|
|
277
|
-
|
|
278
|
+
Ne(r), r.setAttribute(x, "live");
|
|
278
279
|
let i = r.style;
|
|
279
|
-
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(
|
|
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);
|
|
280
281
|
}
|
|
281
282
|
let d = null;
|
|
282
|
-
for (let e of l) e.style.zIndex = "1", d === null && (d = document.createElement("span"), d.className =
|
|
283
|
+
for (let e of l) e.style.zIndex = "1", d === null && (d = document.createElement("span"), d.className = _e, e.insertBefore(d, e.firstChild));
|
|
283
284
|
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;
|
|
284
|
-
},
|
|
285
|
+
}, Fe = (e) => {
|
|
285
286
|
let n = t?.scrollContainerRef.current ?? null, r = n?.parentElement ?? null;
|
|
286
|
-
return !n || !r ? null : e.length === 0 ||
|
|
287
|
-
},
|
|
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) => {
|
|
288
289
|
if (t === null) return !1;
|
|
289
290
|
let n = t.leftPaneScrollRef.current;
|
|
290
291
|
if (n) {
|
|
291
292
|
let r = n.getBoundingClientRect();
|
|
292
|
-
if (e < (t.paneLayout.left.entries.length > 0 ? r.right : r.left + t.leftLeadingWidth *
|
|
293
|
+
if (e < (t.paneLayout.left.entries.length > 0 ? r.right : r.left + t.leftLeadingWidth * D) - .5) return !0;
|
|
293
294
|
}
|
|
294
295
|
let r = t.rightPaneScrollRef.current;
|
|
295
296
|
return !!(r && t.paneLayout.right.entries.length > 0 && e > r.getBoundingClientRect().left + .5);
|
|
296
|
-
},
|
|
297
|
-
let r = e.guide, i = t === null ? null :
|
|
297
|
+
}, Le = (e, t, n) => {
|
|
298
|
+
let r = e.guide, i = t === null ? null : W()[t];
|
|
298
299
|
if (!i || i.style.display !== "block") {
|
|
299
300
|
r.style.display = "none";
|
|
300
301
|
return;
|
|
301
302
|
}
|
|
302
303
|
let a = i.getBoundingClientRect();
|
|
303
|
-
if (t === "center" &&
|
|
304
|
+
if (t === "center" && Ie(a.left + a.width / 2)) {
|
|
304
305
|
r.style.display = "none";
|
|
305
306
|
return;
|
|
306
307
|
}
|
|
307
|
-
r.style.left = `${(a.left - n.left) /
|
|
308
|
-
},
|
|
309
|
-
let n = e.layer.getBoundingClientRect(), r = Math.max(e.layerWidth - e.columnWidth, 0), i = Math.min(Math.max((
|
|
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);
|
|
310
311
|
e.column.style.transition = "none", e.column.style.transform = `translateX(${i}px)`;
|
|
311
312
|
let a = t === null ? "none" : t === "center" ? "move" : "pin";
|
|
312
|
-
e.badge !== null && e.badgeKind !== a && (e.badgeKind = a, e.badge.innerHTML = a === "none" ? "" : a === "move" ?
|
|
313
|
-
},
|
|
314
|
-
|
|
315
|
-
},
|
|
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) => {
|
|
316
317
|
let r = e.layer.getBoundingClientRect();
|
|
317
|
-
e.column.style.transition = `transform ${n}ms ${
|
|
318
|
-
},
|
|
319
|
-
let e =
|
|
320
|
-
if (
|
|
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";
|
|
319
|
+
}, X = () => {
|
|
320
|
+
let e = H;
|
|
321
|
+
if (H = null, e !== null) {
|
|
321
322
|
e.timer !== null && window.clearTimeout(e.timer);
|
|
322
323
|
for (let [t, n] of e.hiddenCells) t.style.visibility = n;
|
|
323
324
|
e.float.layer.remove();
|
|
324
325
|
}
|
|
325
|
-
},
|
|
326
|
-
let e =
|
|
326
|
+
}, Be = () => {
|
|
327
|
+
let e = H;
|
|
327
328
|
if (e === null || e.key === null) return;
|
|
328
329
|
let n = e.key;
|
|
329
330
|
if (e.pane !== null && !t?.paneLayout[e.pane].entries.some((e) => e.column.key === n)) return;
|
|
330
331
|
e.key = null;
|
|
331
|
-
let r = t?.scrollContainerRef.current ?? null, i = r ?
|
|
332
|
+
let r = t?.scrollContainerRef.current ?? null, i = r ? S(r).filter((e) => e.dataset.ssgColKey === n) : [];
|
|
332
333
|
if (i.length === 0) {
|
|
333
|
-
|
|
334
|
+
X();
|
|
334
335
|
return;
|
|
335
336
|
}
|
|
336
337
|
let a = i[0].getBoundingClientRect().left;
|
|
337
338
|
for (let t of i) e.hiddenCells.push([t, t.style.visibility]), t.style.visibility = "hidden";
|
|
338
|
-
|
|
339
|
-
},
|
|
340
|
-
let e =
|
|
341
|
-
if (
|
|
342
|
-
e && (
|
|
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 = {
|
|
343
344
|
pane: e.pane,
|
|
344
345
|
slot: e.slot
|
|
345
346
|
});
|
|
346
|
-
let n =
|
|
347
|
-
if (n !== null && n.pane !==
|
|
348
|
-
if (e &&
|
|
349
|
-
let e =
|
|
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"));
|
|
350
351
|
if (e !== null) {
|
|
351
|
-
|
|
352
|
+
K(), Re(e, n.pane);
|
|
352
353
|
return;
|
|
353
354
|
}
|
|
354
355
|
}
|
|
355
|
-
|
|
356
|
+
Y(), Oe(z), ke(n.pane), q(null, "rest");
|
|
356
357
|
return;
|
|
357
358
|
}
|
|
358
|
-
if (
|
|
359
|
-
|
|
359
|
+
if (K(), G(), q(n === null ? null : n.slot, "follow").length === 0 && B !== null) {
|
|
360
|
+
Re(B, null);
|
|
360
361
|
return;
|
|
361
362
|
}
|
|
362
|
-
|
|
363
|
+
Y();
|
|
363
364
|
return;
|
|
364
365
|
}
|
|
365
|
-
if (
|
|
366
|
-
|
|
366
|
+
if (ke(e ? e.pane : null), !e) {
|
|
367
|
+
C = null, G();
|
|
367
368
|
return;
|
|
368
369
|
}
|
|
369
|
-
|
|
370
|
+
C = {
|
|
370
371
|
pane: e.pane,
|
|
371
372
|
slot: e.slot
|
|
372
|
-
},
|
|
373
|
-
},
|
|
374
|
-
if (
|
|
375
|
-
|
|
373
|
+
}, je(e);
|
|
374
|
+
}, Ve = () => {
|
|
375
|
+
if (y === null) {
|
|
376
|
+
j = null;
|
|
376
377
|
return;
|
|
377
378
|
}
|
|
378
379
|
let e = t?.scrollContainerRef.current ?? null;
|
|
379
|
-
if (e && (
|
|
380
|
+
if (e && (O || (!E || o(E, T, 6)) && (O = !0), O)) {
|
|
380
381
|
let t = e.getBoundingClientRect(), n = c({
|
|
381
382
|
rectLeft: t.left,
|
|
382
383
|
rectTop: t.top,
|
|
@@ -385,23 +386,23 @@ var g = (e) => {
|
|
|
385
386
|
clientWidth: e.clientWidth,
|
|
386
387
|
clientHeight: e.clientHeight,
|
|
387
388
|
scale: l(e, t)
|
|
388
|
-
}), r = s(
|
|
389
|
+
}), r = s(T.x, n.left, n.right, 24), i = a(e.scrollLeft, r, 18, e.scrollWidth - e.clientWidth);
|
|
389
390
|
i !== e.scrollLeft && e.scrollTo({
|
|
390
391
|
left: i,
|
|
391
392
|
behavior: "auto"
|
|
392
393
|
});
|
|
393
394
|
}
|
|
394
|
-
|
|
395
|
-
},
|
|
396
|
-
|
|
397
|
-
let n =
|
|
398
|
-
|
|
399
|
-
let a =
|
|
400
|
-
|
|
401
|
-
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 ?
|
|
402
|
-
if (
|
|
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) {
|
|
403
404
|
a.forEach((e, t) => {
|
|
404
|
-
t.isConnected && (t.style.transition =
|
|
405
|
+
t.isConnected && (t.style.transition = pe, t.style.transform = "translateX(0px)");
|
|
405
406
|
});
|
|
406
407
|
let e = null;
|
|
407
408
|
if (l !== null) {
|
|
@@ -410,35 +411,35 @@ var g = (e) => {
|
|
|
410
411
|
t = e;
|
|
411
412
|
break;
|
|
412
413
|
}
|
|
413
|
-
t === null ? l.layer.remove() : (
|
|
414
|
+
t === null ? l.layer.remove() : (ze(l, t.getBoundingClientRect().left, fe), e = {
|
|
414
415
|
float: l,
|
|
415
416
|
key: null,
|
|
416
417
|
pane: null,
|
|
417
418
|
timer: null,
|
|
418
419
|
hiddenCells: []
|
|
419
|
-
},
|
|
420
|
+
}, H = e);
|
|
420
421
|
}
|
|
421
|
-
|
|
422
|
-
|
|
422
|
+
R = a, window.setTimeout(() => {
|
|
423
|
+
J(a), R === a && (R = null), e !== null && H === e && X();
|
|
423
424
|
}, 200);
|
|
424
425
|
} else l !== null && !c && l.layer.remove();
|
|
425
426
|
if (!c || !n || !i || t === null) return;
|
|
426
|
-
let { columns: u, applyColumnOrderAndPin: d, scrollContainerRef: f } = t,
|
|
427
|
-
|
|
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 = {
|
|
428
429
|
float: l,
|
|
429
430
|
key: n,
|
|
430
431
|
pane: i.pane,
|
|
431
|
-
timer: window.setTimeout(
|
|
432
|
+
timer: window.setTimeout(X, Ce),
|
|
432
433
|
hiddenCells: []
|
|
433
434
|
});
|
|
434
|
-
let _ = /* @__PURE__ */ new Map([[n, i.pane === "center" ? void 0 : i.pane]]), v =
|
|
435
|
+
let _ = /* @__PURE__ */ new Map([[n, i.pane === "center" ? void 0 : i.pane]]), v = w;
|
|
435
436
|
d(c, _), v !== null && requestAnimationFrame(() => {
|
|
436
|
-
|
|
437
|
+
w === v && (w = null);
|
|
437
438
|
});
|
|
438
|
-
},
|
|
439
|
-
|
|
440
|
-
let n =
|
|
441
|
-
if (
|
|
439
|
+
}, He = () => {
|
|
440
|
+
Be();
|
|
441
|
+
let n = w;
|
|
442
|
+
if (w = null, !n) return;
|
|
442
443
|
let r = t?.scrollContainerRef.current ?? null;
|
|
443
444
|
if (!r) return;
|
|
444
445
|
let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
@@ -453,24 +454,24 @@ var g = (e) => {
|
|
|
453
454
|
if (i.forEach((e, t) => {
|
|
454
455
|
let r = n.get(t), i = a.get(t);
|
|
455
456
|
if (r === void 0 || i === void 0) return;
|
|
456
|
-
let s = (r - i) /
|
|
457
|
+
let s = (r - i) / D;
|
|
457
458
|
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);
|
|
458
459
|
}), o.length === 0) return;
|
|
459
460
|
r.getBoundingClientRect();
|
|
460
|
-
for (let e of o) e.style.transition = `transform ${
|
|
461
|
-
|
|
461
|
+
for (let e of o) e.style.transition = `transform ${ue}ms ${b}`, e.style.transform = "translateX(0)";
|
|
462
|
+
$();
|
|
462
463
|
let s = () => {
|
|
463
464
|
for (let e of o) e.style.transition = "", e.style.transform = "", e.style.willChange = "";
|
|
464
465
|
}, c = {
|
|
465
466
|
run: s,
|
|
466
467
|
timer: window.setTimeout(() => {
|
|
467
|
-
|
|
468
|
+
M === c && (M = null), s();
|
|
468
469
|
}, 280)
|
|
469
470
|
};
|
|
470
|
-
|
|
471
|
-
},
|
|
472
|
-
let e =
|
|
473
|
-
|
|
471
|
+
M = c;
|
|
472
|
+
}, $ = () => {
|
|
473
|
+
let e = M;
|
|
474
|
+
M = null, e !== null && (window.clearTimeout(e.timer), e.run());
|
|
474
475
|
};
|
|
475
476
|
return {
|
|
476
477
|
update: (e) => {
|
|
@@ -478,58 +479,58 @@ var g = (e) => {
|
|
|
478
479
|
},
|
|
479
480
|
onColumnDragHandlePointerDown: (e, n) => {
|
|
480
481
|
if (t === null || !t.enabled || n.button !== 0) return;
|
|
481
|
-
if (n.stopPropagation(), n.preventDefault(),
|
|
482
|
-
if (n.pointerId !==
|
|
483
|
-
|
|
482
|
+
if (n.stopPropagation(), n.preventDefault(), y !== null) {
|
|
483
|
+
if (n.pointerId !== A) return;
|
|
484
|
+
k?.(), Q(!1);
|
|
484
485
|
}
|
|
485
|
-
if (
|
|
486
|
+
if ($(), X(), Y(), R?.forEach((e, t) => {
|
|
486
487
|
t.style.visibility = e.visibility;
|
|
487
|
-
}),
|
|
488
|
+
}), y = e.key, A = n.pointerId, C = null, U = null, T = {
|
|
488
489
|
x: n.clientX,
|
|
489
490
|
y: n.clientY
|
|
490
|
-
},
|
|
491
|
+
}, E = {
|
|
491
492
|
x: n.clientX,
|
|
492
493
|
y: n.clientY
|
|
493
|
-
},
|
|
494
|
+
}, D = l(t.scrollContainerRef.current).x, O = !1, document.body.style.cursor = "grabbing", z = e.title || e.key, De()) {
|
|
494
495
|
let i = t.scrollContainerRef.current;
|
|
495
|
-
|
|
496
|
-
let a = i ?
|
|
497
|
-
|
|
498
|
-
} else
|
|
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);
|
|
499
500
|
let i = n.currentTarget, a = n.pointerId;
|
|
500
501
|
try {
|
|
501
502
|
i.setPointerCapture(a);
|
|
502
503
|
} catch {}
|
|
503
504
|
let o = (e) => {
|
|
504
|
-
e.pointerId === a && (
|
|
505
|
+
e.pointerId === a && (T = {
|
|
505
506
|
x: e.clientX,
|
|
506
507
|
y: e.clientY
|
|
507
|
-
},
|
|
508
|
+
}, Z());
|
|
508
509
|
}, s = u(), c = () => {
|
|
509
|
-
window.removeEventListener("pointermove", o), window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), window.removeEventListener("keydown", p, !0), window.removeEventListener("blur", m), s(),
|
|
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;
|
|
510
511
|
try {
|
|
511
512
|
i.releasePointerCapture(a);
|
|
512
513
|
} catch {}
|
|
513
514
|
};
|
|
514
515
|
function d(e) {
|
|
515
|
-
e.pointerId === a && (c(),
|
|
516
|
+
e.pointerId === a && (c(), Q(!0));
|
|
516
517
|
}
|
|
517
518
|
function f(e) {
|
|
518
|
-
e.pointerId === a && (c(),
|
|
519
|
+
e.pointerId === a && (c(), Q(!1));
|
|
519
520
|
}
|
|
520
521
|
function p(e) {
|
|
521
|
-
e.key === "Escape" && (c(),
|
|
522
|
+
e.key === "Escape" && (c(), Q(!1));
|
|
522
523
|
}
|
|
523
524
|
function m() {
|
|
524
|
-
c(),
|
|
525
|
+
c(), Q(!1);
|
|
525
526
|
}
|
|
526
|
-
window.addEventListener("pointermove", o), window.addEventListener("pointerup", d), window.addEventListener("pointercancel", f), window.addEventListener("keydown", p, !0), window.addEventListener("blur", m),
|
|
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);
|
|
527
528
|
},
|
|
528
|
-
applyReorderSettle:
|
|
529
|
+
applyReorderSettle: He,
|
|
529
530
|
dispose: () => {
|
|
530
|
-
|
|
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();
|
|
531
532
|
}
|
|
532
533
|
};
|
|
533
534
|
};
|
|
534
535
|
//#endregion
|
|
535
|
-
export {
|
|
536
|
+
export { h as computeHeaderReorderedKeys, C as createColumnHeaderDragController, _ as resolveCenterDropSlotRange, g as resolveConsumerDropSlot };
|