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