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