@ishibashi0112/spreadsheet-grid-core 1.8.0 → 1.10.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 -1
- package/dist/controllers/activeRowFollowController.d.ts +1 -0
- package/dist/controllers/activeRowFollowController.js +33 -24
- package/dist/controllers/changeTracker.cjs +1 -1
- package/dist/controllers/changeTracker.d.ts +6 -0
- package/dist/controllers/changeTracker.js +338 -160
- package/dist/controllers/clipboardController.cjs +2 -1
- package/dist/controllers/clipboardController.d.ts +5 -1
- package/dist/controllers/clipboardController.js +217 -91
- package/dist/controllers/columnAutosizeRunner.cjs +1 -1
- package/dist/controllers/columnAutosizeRunner.d.ts +3 -1
- package/dist/controllers/columnAutosizeRunner.js +12 -11
- package/dist/controllers/editController.cjs +1 -1
- package/dist/controllers/editController.js +231 -159
- package/dist/controllers/fillHandleController.cjs +1 -1
- package/dist/controllers/fillHandleController.js +114 -113
- package/dist/controllers/findController.cjs +1 -1
- package/dist/controllers/findController.d.ts +3 -1
- package/dist/controllers/findController.js +80 -75
- package/dist/controllers/historyController.cjs +1 -1
- package/dist/controllers/historyController.d.ts +25 -1
- package/dist/controllers/historyController.js +115 -64
- package/dist/controllers/keyboardController.cjs +1 -1
- package/dist/controllers/keyboardController.d.ts +5 -0
- package/dist/controllers/keyboardController.js +154 -140
- package/dist/controllers/rowDragController.cjs +1 -1
- package/dist/controllers/rowDragController.d.ts +1 -0
- package/dist/controllers/rowDragController.js +1 -0
- package/dist/engine/cellCommands.cjs +1 -1
- package/dist/engine/cellCommands.js +81 -62
- package/dist/engine/columnLayout.cjs +1 -1
- package/dist/engine/columnLayout.d.ts +1 -0
- package/dist/engine/columnLayout.js +10 -10
- package/dist/engine/createGridEngine.cjs +1 -1
- package/dist/engine/createGridEngine.d.ts +6 -1
- package/dist/engine/createGridEngine.js +58 -50
- package/dist/engine/excelShortcutCommands.cjs +1 -0
- package/dist/engine/excelShortcutCommands.d.ts +29 -0
- package/dist/engine/excelShortcutCommands.js +256 -0
- package/dist/engine/exportCommands.cjs +2 -2
- package/dist/engine/exportCommands.js +82 -34
- package/dist/engine/features.cjs +1 -1
- package/dist/engine/features.d.ts +21 -0
- package/dist/engine/features.js +23 -2
- package/dist/engine/fullFeatures.cjs +1 -1
- package/dist/engine/fullFeatures.js +24 -10
- package/dist/engine/gridApi.cjs +10 -9
- package/dist/engine/gridApi.d.ts +21 -2
- package/dist/engine/gridApi.js +239 -101
- package/dist/engine/memo.cjs +1 -1
- package/dist/engine/memo.d.ts +1 -1
- package/dist/engine/memo.js +12 -11
- package/dist/engine/newRowController.cjs +1 -0
- package/dist/engine/newRowController.d.ts +31 -0
- package/dist/engine/newRowController.js +157 -0
- package/dist/engine/notifiers.cjs +1 -1
- package/dist/engine/notifiers.d.ts +9 -1
- package/dist/engine/notifiers.js +23 -8
- package/dist/engine/rowPipeline.cjs +1 -1
- package/dist/engine/rowPipeline.d.ts +29 -2
- package/dist/engine/rowPipeline.js +76 -50
- package/dist/engine/treeStage.cjs +1 -0
- package/dist/engine/treeStage.d.ts +46 -0
- package/dist/engine/treeStage.js +171 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/locales/en.cjs +1 -1
- package/dist/locales/en.js +12 -0
- package/dist/logic/cellPlacement.cjs +1 -1
- package/dist/logic/cellPlacement.d.ts +1 -1
- package/dist/logic/cellPlacement.js +1 -1
- package/dist/logic/changeTracking.cjs +1 -1
- package/dist/logic/changeTracking.d.ts +26 -1
- package/dist/logic/changeTracking.js +139 -32
- package/dist/logic/clearCells.cjs +1 -1
- package/dist/logic/clearCells.d.ts +4 -2
- package/dist/logic/clearCells.js +24 -24
- package/dist/logic/columnAutosize.cjs +1 -1
- package/dist/logic/columnAutosize.d.ts +4 -1
- package/dist/logic/columnAutosize.js +89 -72
- package/dist/logic/conditionalFormat.cjs +1 -1
- package/dist/logic/conditionalFormat.js +8 -5
- package/dist/logic/editorKeys.cjs +1 -1
- package/dist/logic/editorKeys.d.ts +9 -1
- package/dist/logic/editorKeys.js +23 -17
- package/dist/logic/excelShortcuts.cjs +1 -0
- package/dist/logic/excelShortcuts.d.ts +13 -0
- package/dist/logic/excelShortcuts.js +36 -0
- package/dist/logic/exportCsv.cjs +2 -2
- package/dist/logic/exportCsv.d.ts +11 -1
- package/dist/logic/exportCsv.js +30 -22
- package/dist/logic/exportData.cjs +1 -1
- package/dist/logic/exportData.d.ts +3 -2
- package/dist/logic/exportData.js +40 -28
- package/dist/logic/featureWarnings.cjs +1 -1
- package/dist/logic/featureWarnings.js +16 -6
- package/dist/logic/fillHandle.cjs +1 -1
- package/dist/logic/fillHandle.js +1 -1
- package/dist/logic/find.cjs +1 -1
- package/dist/logic/find.d.ts +1 -1
- package/dist/logic/find.js +11 -9
- package/dist/logic/gridState.cjs +1 -1
- package/dist/logic/gridState.d.ts +3 -2
- package/dist/logic/gridState.js +6 -6
- package/dist/logic/imeInput.cjs +1 -1
- package/dist/logic/imeInput.js +22 -21
- package/dist/logic/localeTextFeatures.cjs +1 -1
- package/dist/logic/localeTextFeatures.d.ts +16 -0
- package/dist/logic/localeTextFeatures.js +22 -8
- package/dist/logic/newRow.cjs +1 -0
- package/dist/logic/newRow.d.ts +9 -0
- package/dist/logic/newRow.js +69 -0
- package/dist/logic/selectionAggregates.cjs +1 -1
- package/dist/logic/selectionAggregates.js +3 -2
- package/dist/logic/sorting.cjs +1 -1
- package/dist/logic/sorting.d.ts +1 -1
- package/dist/logic/sorting.js +32 -32
- package/dist/logic/treeData.cjs +7 -0
- package/dist/logic/treeData.d.ts +83 -0
- package/dist/logic/treeData.js +438 -0
- package/dist/logic/validation.cjs +1 -1
- package/dist/logic/validation.d.ts +1 -1
- package/dist/logic/validation.js +10 -9
- package/dist/model/gridActions.cjs +1 -1
- package/dist/model/gridActions.d.ts +15 -0
- package/dist/model/gridActions.js +15 -0
- package/dist/model/gridReducer.cjs +1 -1
- package/dist/model/gridReducer.js +175 -156
- package/dist/model/gridStore.cjs +1 -1
- package/dist/model/gridStore.d.ts +17 -1
- package/dist/model/gridStore.js +4 -4
- package/dist/model/gridTypes.core.d.ts +325 -25
- package/dist/model/gridTypes.unbound.d.ts +1 -0
- package/dist/utils/clipboard.cjs +1 -1
- package/dist/utils/clipboard.d.ts +1 -1
- package/dist/utils/clipboard.js +13 -10
- package/dist/utils/permissions.cjs +1 -1
- package/dist/utils/permissions.d.ts +2 -2
- package/dist/utils/permissions.js +1 -1
- package/package.json +1 -1
|
@@ -5,114 +5,125 @@ import { findViewRowIndexByKey as o, isFocusInsideDetailCard as s, resolveFirstD
|
|
|
5
5
|
import { clamp as l } from "../logic/geometry.js";
|
|
6
6
|
import { isUnchangedEditorCommit as u, parseCommittedValue as d, writeRowsCell as f } from "../logic/editorValues.js";
|
|
7
7
|
import { decideCellWrite as p } from "../logic/validation.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { NEW_ROW_KEY as m, isNewRowAt as h, resolveEditRow as g, resolveFirstEditableColIndex as _ } from "../logic/newRow.js";
|
|
9
|
+
import { readLiveUiState as v } from "./liveUiState.js";
|
|
10
|
+
import { resolveSelectFillRow as y, toFillRowColumn as b } from "../logic/selectFillRow.js";
|
|
10
11
|
//#region src/controllers/editController.ts
|
|
11
|
-
var
|
|
12
|
+
var x = (e, t) => t.activeCell !== e.activeCell || t.selection !== e.selection, S = (e) => {
|
|
12
13
|
if (s(e)) return !1;
|
|
13
14
|
let t = e.ownerDocument, n = a(e);
|
|
14
15
|
return n === null || n === t.body || n === t.documentElement || e.contains(n);
|
|
15
|
-
},
|
|
16
|
+
}, C = (e) => {
|
|
16
17
|
let t = e.ownerDocument, n = a(e);
|
|
17
18
|
return n === null || n === t.body || n === t.documentElement;
|
|
18
|
-
},
|
|
19
|
+
}, w = (e) => {
|
|
19
20
|
if (e === null) return !1;
|
|
20
21
|
let t = a(e);
|
|
21
22
|
return t !== null && t !== e && e.contains(t) && typeof t.closest == "function" && t.closest(".ssg-cell-editor") !== null && !s(e);
|
|
22
|
-
},
|
|
23
|
+
}, T = (e, t, n, r, a) => e.map((e, o) => o === t ? {
|
|
23
24
|
...i(e, n, r),
|
|
24
25
|
...a
|
|
25
|
-
} : e),
|
|
26
|
+
} : e), E = (e, t) => e === null ? [] : Object.keys(e).map((n) => ({
|
|
26
27
|
viewIndex: t,
|
|
27
|
-
column:
|
|
28
|
+
column: b(n),
|
|
28
29
|
value: e[n]
|
|
29
|
-
})),
|
|
30
|
-
let
|
|
30
|
+
})), D = () => {
|
|
31
|
+
let a = null, s = null, b = null, D = null, O = !1, k = !1, A = null, j = null, M = null, N = (e, t) => {
|
|
31
32
|
let n = e.visibleColumns[t.col];
|
|
32
|
-
return !n || t.row < 0 || t.row >= e.rowModel.getRowCount()
|
|
33
|
+
return !n || t.row < 0 || t.row >= e.rowModel.getRowCount() ? null : h(e.rowModel, t.row) ? {
|
|
34
|
+
rowKey: m,
|
|
35
|
+
columnKey: n.key
|
|
36
|
+
} : e.rowModel.getRow(t.row) === void 0 ? null : {
|
|
33
37
|
rowKey: e.rowModel.getRowKey(t.row),
|
|
34
38
|
columnKey: n.key
|
|
35
39
|
};
|
|
36
|
-
},
|
|
40
|
+
}, P = (e, t) => {
|
|
37
41
|
let n = e.visibleColumns.findIndex((e) => e.key === t.columnKey);
|
|
38
42
|
if (n < 0) return null;
|
|
43
|
+
if (Object.is(t.rowKey, "__ssg_new_row__")) {
|
|
44
|
+
let t = e.rowModel.newRow;
|
|
45
|
+
return t === void 0 ? null : {
|
|
46
|
+
row: t.index,
|
|
47
|
+
col: n
|
|
48
|
+
};
|
|
49
|
+
}
|
|
39
50
|
let r = e.rowModel.getRowCount();
|
|
40
51
|
for (let i = 0; i < r; i += 1) if (e.rowModel.getRow(i) !== void 0 && Object.is(e.rowModel.getRowKey(i), t.rowKey)) return {
|
|
41
52
|
row: i,
|
|
42
53
|
col: n
|
|
43
54
|
};
|
|
44
55
|
return null;
|
|
45
|
-
},
|
|
46
|
-
|
|
56
|
+
}, F = (t) => {
|
|
57
|
+
a = t;
|
|
47
58
|
let n = t.uiState.editingCell;
|
|
48
59
|
if (!n) {
|
|
49
|
-
|
|
60
|
+
s = null, A = null;
|
|
50
61
|
return;
|
|
51
62
|
}
|
|
52
|
-
let r =
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
...
|
|
63
|
+
let r = N(t, n);
|
|
64
|
+
if (s !== null && r !== null && Object.is(r.rowKey, s.rowKey) && r.columnKey === s.columnKey) {
|
|
65
|
+
s = {
|
|
66
|
+
...s,
|
|
56
67
|
cell: n
|
|
57
68
|
};
|
|
58
69
|
return;
|
|
59
70
|
}
|
|
60
|
-
let
|
|
61
|
-
if (
|
|
62
|
-
|
|
71
|
+
let i = s !== null && s.cell.row === n.row && s.cell.col === n.col;
|
|
72
|
+
if (s === null || !i) {
|
|
73
|
+
s = r ? {
|
|
63
74
|
...r,
|
|
64
75
|
cell: n
|
|
65
|
-
} : null,
|
|
76
|
+
} : null, b !== null && (b.superseded = !0, b = null, t.editorActionGuardRef.current = !1);
|
|
66
77
|
return;
|
|
67
78
|
}
|
|
68
|
-
let
|
|
69
|
-
if (
|
|
70
|
-
...
|
|
71
|
-
cell:
|
|
72
|
-
}, t.dispatch(e.retargetEdit(
|
|
79
|
+
let o = P(t, s);
|
|
80
|
+
if (o) s = {
|
|
81
|
+
...s,
|
|
82
|
+
cell: o
|
|
83
|
+
}, t.dispatch(e.retargetEdit(o, t.rowModel.getRowCount()));
|
|
73
84
|
else {
|
|
74
|
-
let e =
|
|
75
|
-
|
|
85
|
+
let e = s;
|
|
86
|
+
s = null, I(t, e);
|
|
76
87
|
}
|
|
77
|
-
},
|
|
88
|
+
}, I = (t, n) => {
|
|
78
89
|
if (t.editorActionGuardRef.current) {
|
|
79
90
|
t.dispatch(e.stopEdit());
|
|
80
91
|
return;
|
|
81
92
|
}
|
|
82
|
-
|
|
83
|
-
let r =
|
|
84
|
-
|
|
93
|
+
D = n, O = !1;
|
|
94
|
+
let r = A;
|
|
95
|
+
A = null, k = !0;
|
|
85
96
|
let i;
|
|
86
97
|
try {
|
|
87
|
-
r !== null && (r(),
|
|
98
|
+
r !== null && (r(), D = null), i = U();
|
|
88
99
|
} finally {
|
|
89
|
-
|
|
100
|
+
k = !1, D = null;
|
|
90
101
|
}
|
|
91
102
|
let a = t.gridRootRef.current;
|
|
92
|
-
if (!i && a !== null && a.isConnected &&
|
|
93
|
-
|
|
103
|
+
if (!i && a !== null && a.isConnected && C(a) && (a.focus({ preventScroll: !0 }), i = !0), O && t.editorActionGuardRef.current) {
|
|
104
|
+
O = !1;
|
|
94
105
|
return;
|
|
95
106
|
}
|
|
96
|
-
|
|
97
|
-
},
|
|
107
|
+
O = !1, t.editorActionGuardRef.current = !0, t.dispatch(e.stopEdit()), H(null, null, void 0, i);
|
|
108
|
+
}, L = (e, t) => {
|
|
98
109
|
let { rows: n, rowKeyGetter: r } = e;
|
|
99
110
|
for (let e = 0; e < n.length; e += 1) {
|
|
100
111
|
let i = n[e];
|
|
101
112
|
if (i !== void 0 && Object.is(r ? r(i, e) : e, t)) return e;
|
|
102
113
|
}
|
|
103
114
|
return -1;
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
if (
|
|
110
|
-
let n =
|
|
111
|
-
!n || !
|
|
112
|
-
readOnly:
|
|
113
|
-
canEditCell:
|
|
114
|
-
},
|
|
115
|
-
},
|
|
115
|
+
}, R = (t) => {
|
|
116
|
+
a !== null && (a.dispatch(e.startSelection(t)), a.dispatch(e.endSelection()), a.dispatch(e.activateCell(t)));
|
|
117
|
+
}, z = (t, n) => {
|
|
118
|
+
a !== null && (a.setEditorInitialValue(n), a.dispatch(e.startEdit(t)));
|
|
119
|
+
}, B = (e, t) => {
|
|
120
|
+
if (a === null) return;
|
|
121
|
+
let n = g(a.rowModel, e.row), i = a.visibleColumns[e.col];
|
|
122
|
+
!n || !i || i.editor?.type === "checkbox" || !r({
|
|
123
|
+
readOnly: a.readOnly,
|
|
124
|
+
canEditCell: a.canEditCell
|
|
125
|
+
}, a.rowModel, e.row, e.col, n, i) || z(e, t);
|
|
126
|
+
}, V = (e, t, n) => {
|
|
116
127
|
let r = e.getRowCount(), i = l(t, 0, Math.max(r - 1, 0)), { getLabelRow: a } = e;
|
|
117
128
|
if (a && n !== void 0 && i !== n) {
|
|
118
129
|
let e = i > n ? 1 : -1;
|
|
@@ -120,132 +131,193 @@ var _ = (e, t) => t.activeCell !== e.activeCell || t.selection !== e.selection,
|
|
|
120
131
|
(i < 0 || i >= r) && (i = l(n, 0, Math.max(r - 1, 0)));
|
|
121
132
|
}
|
|
122
133
|
return i;
|
|
123
|
-
},
|
|
124
|
-
let
|
|
125
|
-
if (
|
|
126
|
-
let
|
|
127
|
-
|
|
128
|
-
let
|
|
129
|
-
if (
|
|
130
|
-
if (
|
|
131
|
-
|
|
134
|
+
}, H = (e, t = null, n, r = !1, i, s) => {
|
|
135
|
+
let c = a;
|
|
136
|
+
if (c === null) return;
|
|
137
|
+
let u = !1, d = { superseded: !1 };
|
|
138
|
+
b = d;
|
|
139
|
+
let f = c.uiState.editingCell, p = (r) => {
|
|
140
|
+
if (u) return;
|
|
141
|
+
if (d.superseded) {
|
|
142
|
+
u = !0;
|
|
132
143
|
return;
|
|
133
144
|
}
|
|
134
|
-
let
|
|
135
|
-
if (
|
|
136
|
-
|
|
145
|
+
let p = a === null ? null : a.getUiState?.() ?? null;
|
|
146
|
+
if (p !== null && p.editingCell !== null && p.editingCell !== f) {
|
|
147
|
+
u = !0, b === d && (b = null), c.editorActionGuardRef.current = !1;
|
|
137
148
|
return;
|
|
138
149
|
}
|
|
139
|
-
if (!r && (
|
|
140
|
-
|
|
141
|
-
let
|
|
142
|
-
if (
|
|
143
|
-
let t =
|
|
144
|
-
row: r >= 0 ? r :
|
|
150
|
+
if (!r && (a === null || a.uiState.editingCell !== null)) return;
|
|
151
|
+
u = !0, b === d && (b = null);
|
|
152
|
+
let m = c.gridRootRef.current;
|
|
153
|
+
if (m !== null && S(m) && m.focus(), e !== null && a !== null && !(t !== null && x(t, a.uiState))) {
|
|
154
|
+
let t = a.visibleColumns.length, r = i === void 0 ? -1 : Object.is(i, "__ssg_new_row__") ? a.rowModel.newRow?.index ?? -1 : o(a.rowModel, i, /* @__PURE__ */ new Map()), u = {
|
|
155
|
+
row: r >= 0 ? r : V(a.rowModel, e.row, n),
|
|
145
156
|
col: l(e.col, 0, Math.max(t - 1, 0))
|
|
146
157
|
};
|
|
147
|
-
|
|
158
|
+
R(u), c.editorActionGuardRef.current = !1, s !== void 0 && s !== "" && B(u, s);
|
|
148
159
|
return;
|
|
149
160
|
}
|
|
150
|
-
|
|
161
|
+
c.editorActionGuardRef.current = !1;
|
|
151
162
|
};
|
|
152
|
-
r && queueMicrotask(() =>
|
|
153
|
-
},
|
|
154
|
-
let e =
|
|
155
|
-
return
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
if (
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
r && queueMicrotask(() => p(!1)), requestAnimationFrame(() => p(!0));
|
|
164
|
+
}, U = () => {
|
|
165
|
+
let e = a?.gridRootRef.current ?? null;
|
|
166
|
+
return w(e) ? (e.focus({ preventScroll: !0 }), !0) : !1;
|
|
167
|
+
}, W = (e, t, n, r, i) => i === void 0 ? null : y(t, n, e.rowModel.getRowKey(r), i, e.columns ?? e.visibleColumns, e.localeTexts), G = (n, a, o, s, c, l, f) => {
|
|
168
|
+
let { rowModel: h, visibleColumns: g, uiState: v, dispatch: b, editorActionGuardRef: x } = n, S = h.newRow, C = g[a.col], w = S?.ensureRow();
|
|
169
|
+
if (!S || !C || !w) return b(e.stopEdit()), { status: "noop" };
|
|
170
|
+
if (!r({
|
|
171
|
+
readOnly: n.readOnly,
|
|
172
|
+
canEditCell: n.canEditCell
|
|
173
|
+
}, h, a.row, a.col, w, C)) return x.current = !0, b(e.stopEdit()), H(null), { status: "noop" };
|
|
174
|
+
if (!u(C, t(w, C), s)) {
|
|
175
|
+
let e = d(C, s, w), t = p(C, w, e, n.localeTexts);
|
|
176
|
+
if (t.action === "reject") return {
|
|
177
|
+
status: "rejected",
|
|
178
|
+
message: t.message
|
|
179
|
+
};
|
|
180
|
+
let r = l === void 0 ? null : y(C, w, n.rowModel.getRowKey(a.row) ?? "__ssg_new_row__", l, n.columns ?? g, n.localeTexts), o = r === null ? i(w, C, e) : {
|
|
181
|
+
...i(w, C, e),
|
|
182
|
+
...r
|
|
183
|
+
};
|
|
184
|
+
S.writeRow(o);
|
|
185
|
+
}
|
|
186
|
+
let T = c === "right" && (o.col > g.length - 1 || !(() => {
|
|
187
|
+
let e = S.peekRow() ?? w;
|
|
188
|
+
for (let t = a.col + 1; t < g.length; t += 1) {
|
|
189
|
+
let i = g[t];
|
|
190
|
+
if (i !== void 0 && r({
|
|
191
|
+
readOnly: n.readOnly,
|
|
192
|
+
canEditCell: n.canEditCell
|
|
193
|
+
}, h, a.row, t, e, i)) return !0;
|
|
194
|
+
}
|
|
195
|
+
return !1;
|
|
196
|
+
})()), E = o, D = o.row === a.row ? m : void 0;
|
|
197
|
+
if ((c === "down" || T) && S.hasDraft()) {
|
|
198
|
+
S.commit();
|
|
199
|
+
let e = _(g, n.readOnly);
|
|
200
|
+
E = {
|
|
201
|
+
row: a.row,
|
|
202
|
+
col: T && e >= 0 ? e : a.col
|
|
203
|
+
}, D = m;
|
|
204
|
+
} else c === "down" && (D = m);
|
|
205
|
+
x.current = !0;
|
|
206
|
+
let O = U();
|
|
207
|
+
return H(E, c === void 0 ? {
|
|
208
|
+
activeCell: v.activeCell,
|
|
209
|
+
selection: v.selection
|
|
210
|
+
} : null, a.row, O, D, c === void 0 ? void 0 : f), b(e.stopEdit()), { status: "committed" };
|
|
211
|
+
}, K = (n, i, o, s) => {
|
|
212
|
+
if (a === null) return { status: "noop" };
|
|
213
|
+
let { uiState: l, visibleColumns: m, rowModel: g, rows: _, applyServerSideCellEdits: v, onRowsChange: y, dispatch: b, editorActionGuardRef: x } = a;
|
|
214
|
+
if (x.current || !l.editingCell) return { status: "noop" };
|
|
215
|
+
if (k) {
|
|
216
|
+
let e = D;
|
|
217
|
+
return D = null, e === null ? { status: "noop" } : Y(a, e, n, !0, o);
|
|
163
218
|
}
|
|
164
|
-
let
|
|
165
|
-
row:
|
|
166
|
-
col:
|
|
167
|
-
} :
|
|
168
|
-
row:
|
|
169
|
-
col:
|
|
170
|
-
} :
|
|
171
|
-
row:
|
|
172
|
-
col:
|
|
173
|
-
} :
|
|
174
|
-
row:
|
|
175
|
-
col: Math.max(
|
|
176
|
-
} :
|
|
177
|
-
if (
|
|
219
|
+
let S = l.editingCell, C = i === "down" ? {
|
|
220
|
+
row: S.row + 1,
|
|
221
|
+
col: S.col
|
|
222
|
+
} : i === "up" ? {
|
|
223
|
+
row: S.row - 1,
|
|
224
|
+
col: S.col
|
|
225
|
+
} : i === "right" ? {
|
|
226
|
+
row: S.row,
|
|
227
|
+
col: S.col + 1
|
|
228
|
+
} : i === "left" ? {
|
|
229
|
+
row: S.row,
|
|
230
|
+
col: Math.max(S.col - 1, c(m))
|
|
231
|
+
} : S;
|
|
232
|
+
if (h(g, S.row)) return G(a, S, C, n, i, o, s);
|
|
233
|
+
let w = m[S.col], O = g.getSourceIndex(S.row), A = v ? g.getRow(S.row) : _[O];
|
|
234
|
+
if (!w || !A) return b(e.stopEdit()), { status: "noop" };
|
|
178
235
|
if (!r({
|
|
179
|
-
readOnly:
|
|
180
|
-
canEditCell:
|
|
181
|
-
},
|
|
182
|
-
let
|
|
183
|
-
if (!
|
|
184
|
-
let e = d(
|
|
236
|
+
readOnly: a.readOnly,
|
|
237
|
+
canEditCell: a.canEditCell
|
|
238
|
+
}, g, S.row, S.col, A, w)) return x.current = !0, b(e.stopEdit()), H(null), { status: "noop" };
|
|
239
|
+
let j = u(w, t(A, w), n);
|
|
240
|
+
if (!j && v) {
|
|
241
|
+
let e = d(w, n, A), t = p(w, A, e, a.localeTexts);
|
|
185
242
|
if (t.action === "reject") return {
|
|
186
243
|
status: "rejected",
|
|
187
244
|
message: t.message
|
|
188
245
|
};
|
|
189
|
-
let r =
|
|
246
|
+
let r = W(a, w, A, S.row, o);
|
|
190
247
|
v([{
|
|
191
|
-
viewIndex:
|
|
192
|
-
column:
|
|
248
|
+
viewIndex: S.row,
|
|
249
|
+
column: w,
|
|
193
250
|
value: e
|
|
194
|
-
}, ...
|
|
195
|
-
} else if (!
|
|
196
|
-
let e = d(
|
|
251
|
+
}, ...E(r, S.row)]);
|
|
252
|
+
} else if (!j && y) {
|
|
253
|
+
let e = d(w, n, A), t = p(w, A, e, a.localeTexts);
|
|
197
254
|
if (t.action === "reject") return {
|
|
198
255
|
status: "rejected",
|
|
199
256
|
message: t.message
|
|
200
257
|
};
|
|
201
|
-
let r =
|
|
202
|
-
y(r === null ? f(_, O,
|
|
258
|
+
let r = W(a, w, A, S.row, o);
|
|
259
|
+
y(r === null ? f(_, O, w, e) : T(_, O, w, e, r));
|
|
203
260
|
}
|
|
204
|
-
|
|
205
|
-
let
|
|
206
|
-
if (
|
|
207
|
-
let e =
|
|
208
|
-
(
|
|
261
|
+
x.current = !0;
|
|
262
|
+
let M = U(), N;
|
|
263
|
+
if (a.followsRow === !0) {
|
|
264
|
+
let e = V(g, C.row, S.row);
|
|
265
|
+
(g.getRow(e) != null || g.getLabelRow?.(e) !== void 0) && (N = g.getRowKey(e));
|
|
209
266
|
}
|
|
210
|
-
return
|
|
267
|
+
return H(C, i === void 0 ? {
|
|
211
268
|
activeCell: l.activeCell,
|
|
212
269
|
selection: l.selection
|
|
213
|
-
} : null,
|
|
214
|
-
},
|
|
215
|
-
if (
|
|
216
|
-
|
|
217
|
-
let t =
|
|
218
|
-
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
},
|
|
222
|
-
let
|
|
223
|
-
if (
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
270
|
+
} : null, S.row, M, N, i === void 0 ? void 0 : s), b(e.stopEdit()), { status: "committed" };
|
|
271
|
+
}, q = () => {
|
|
272
|
+
if (a === null || a.editorActionGuardRef.current) return;
|
|
273
|
+
O = !0, D = null, a.editorActionGuardRef.current = !0;
|
|
274
|
+
let t = U();
|
|
275
|
+
a.dispatch(e.stopEdit()), H(null, null, void 0, t);
|
|
276
|
+
}, J = (e) => {
|
|
277
|
+
A = e;
|
|
278
|
+
}, Y = (e, a, o, s, c) => {
|
|
279
|
+
let l = e.visibleColumns.find((e) => e.key === a.columnKey), m = s ? null : v(e).editingCell, h = m && N(e, m);
|
|
280
|
+
if (l === void 0 || h && Object.is(h.rowKey, a.rowKey) && h.columnKey === a.columnKey) return { status: "noop" };
|
|
281
|
+
if (Object.is(a.rowKey, "__ssg_new_row__")) {
|
|
282
|
+
let n = e.rowModel.newRow, a = n?.peekRow();
|
|
283
|
+
if (!n || a === void 0) return { status: "noop" };
|
|
284
|
+
let c = e.visibleColumns.indexOf(l);
|
|
285
|
+
if (!r({
|
|
286
|
+
readOnly: e.readOnly,
|
|
287
|
+
canEditCell: e.canEditCell
|
|
288
|
+
}, e.rowModel, n.index, c, a, l)) return { status: "noop" };
|
|
289
|
+
if (u(l, t(a, l), o)) return { status: "committed" };
|
|
290
|
+
let f = d(l, o, a), m = p(l, a, f, e.localeTexts);
|
|
291
|
+
return m.action === "reject" ? s ? { status: "noop" } : {
|
|
292
|
+
status: "rejected",
|
|
293
|
+
message: m.message
|
|
294
|
+
} : (n.writeRow(i(a, l, f)), { status: "committed" });
|
|
295
|
+
}
|
|
296
|
+
let g = P(e, a), _, b = -1, x = M !== null && M.from === e.rows ? M.rows : e.rows;
|
|
297
|
+
e.applyServerSideCellEdits === void 0 ? e.onRowsChange !== void 0 && (b = L(e, a.rowKey), _ = b < 0 ? void 0 : x[b]) : _ = g === null ? void 0 : e.rowModel.getRow(g.row);
|
|
298
|
+
let S = g ?? a.cell;
|
|
227
299
|
if (_ === void 0 || !n({
|
|
228
300
|
readOnly: e.readOnly,
|
|
229
301
|
canEditCell: e.canEditCell
|
|
230
|
-
},
|
|
231
|
-
sourceRowIndex:
|
|
232
|
-
rowKey:
|
|
302
|
+
}, S.row, S.col, _, l, {
|
|
303
|
+
sourceRowIndex: b >= 0 ? b : e.rowModel.getSourceIndex(S.row),
|
|
304
|
+
rowKey: a.rowKey
|
|
233
305
|
})) return { status: "noop" };
|
|
234
|
-
if (u(
|
|
235
|
-
let C = d(
|
|
236
|
-
if (w.action === "reject") return
|
|
306
|
+
if (u(l, t(_, l), o)) return { status: "committed" };
|
|
307
|
+
let C = d(l, o, _), w = p(l, _, C, e.localeTexts);
|
|
308
|
+
if (w.action === "reject") return s ? { status: "noop" } : {
|
|
237
309
|
status: "rejected",
|
|
238
310
|
message: w.message
|
|
239
311
|
};
|
|
240
|
-
let
|
|
312
|
+
let D = c === void 0 ? null : y(l, _, a.rowKey, c, e.columns ?? e.visibleColumns, e.localeTexts);
|
|
241
313
|
if (e.applyServerSideCellEdits !== void 0 && g !== null) e.applyServerSideCellEdits([{
|
|
242
314
|
viewIndex: g.row,
|
|
243
|
-
column:
|
|
315
|
+
column: l,
|
|
244
316
|
value: C
|
|
245
|
-
}, ...
|
|
246
|
-
else if (e.onRowsChange !== void 0 &&
|
|
247
|
-
let t =
|
|
248
|
-
|
|
317
|
+
}, ...E(D, g.row)]);
|
|
318
|
+
else if (e.onRowsChange !== void 0 && b >= 0) {
|
|
319
|
+
let t = D === null ? f(x, b, l, C) : T(x, b, l, C, D);
|
|
320
|
+
M = {
|
|
249
321
|
from: e.rows,
|
|
250
322
|
rows: t
|
|
251
323
|
}, e.onRowsChange(t);
|
|
@@ -253,34 +325,34 @@ var _ = (e, t) => t.activeCell !== e.activeCell || t.selection !== e.selection,
|
|
|
253
325
|
return { status: "committed" };
|
|
254
326
|
};
|
|
255
327
|
return {
|
|
256
|
-
update:
|
|
257
|
-
activateSingleCell:
|
|
258
|
-
startEditWithValue:
|
|
259
|
-
commitEdit:
|
|
260
|
-
cancelEdit:
|
|
261
|
-
registerDraftFlush:
|
|
328
|
+
update: F,
|
|
329
|
+
activateSingleCell: R,
|
|
330
|
+
startEditWithValue: z,
|
|
331
|
+
commitEdit: K,
|
|
332
|
+
cancelEdit: q,
|
|
333
|
+
registerDraftFlush: J,
|
|
262
334
|
endEditLeftOpen: () => {
|
|
263
|
-
let t =
|
|
335
|
+
let t = a;
|
|
264
336
|
if (t === null || t.editorActionGuardRef.current) return;
|
|
265
|
-
let n =
|
|
337
|
+
let n = v(t).editingCell;
|
|
266
338
|
if (n === null || t.visibleColumns[n.col]?.editor?.type !== "custom") return;
|
|
267
|
-
let r =
|
|
268
|
-
if (r !== null &&
|
|
339
|
+
let r = s ?? N(t, n), i = j;
|
|
340
|
+
if (r !== null && i !== null) {
|
|
269
341
|
let e = {
|
|
270
342
|
...r,
|
|
271
343
|
cell: n
|
|
272
344
|
}, t = !1;
|
|
273
|
-
|
|
345
|
+
i((n) => t || a === null ? { status: "noop" } : (t = !0, Y(a, e, n)));
|
|
274
346
|
}
|
|
275
|
-
t.editorActionGuardRef.current = !0, t.dispatch(e.stopEdit()),
|
|
347
|
+
t.editorActionGuardRef.current = !0, t.dispatch(e.stopEdit()), H(null);
|
|
276
348
|
},
|
|
277
|
-
registerLateCommitReceiver: (e) => (
|
|
278
|
-
|
|
349
|
+
registerLateCommitReceiver: (e) => (j = e, () => {
|
|
350
|
+
j === e && (j = null);
|
|
279
351
|
}),
|
|
280
352
|
dispose: () => {
|
|
281
|
-
|
|
353
|
+
a = null, j = null;
|
|
282
354
|
}
|
|
283
355
|
};
|
|
284
356
|
};
|
|
285
357
|
//#endregion
|
|
286
|
-
export {
|
|
358
|
+
export { D as createEditController };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../model/gridActions.cjs"),t=require("../utils/permissions.cjs"),n=require("../utils/shadowDom.cjs"),r=require("../logic/valueStore.cjs"),i=require("../logic/
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../model/gridActions.cjs"),t=require("../utils/permissions.cjs"),n=require("../utils/shadowDom.cjs"),r=require("../logic/valueStore.cjs"),i=require("../logic/newRow.cjs"),a=require("../logic/autoScrollGeometry.cjs"),o=require("../logic/elementScale.cjs"),s=require("./escapeClaimController.cjs"),c=require("./popoverSupport.cjs"),l=require("../logic/fillHandle.cjs");var u=168,d=84,f=106,p=()=>typeof matchMedia==`function`&&matchMedia(`(pointer: coarse)`).matches?f:d,m=8,h={status:`idle`},g=(e,t,n)=>{if(e.valueFormatter)try{return e.valueFormatter({value:n,row:t,column:e})}catch{return String(n??``)}return String(n??``)},_=(e,t)=>e===t||e.length===t.length&&e.every((e,n)=>e.key===t[n].key),v=500,y=6,b=2,x=e=>{let t=e.currentTarget;if(!(t instanceof Element))return!0;let n=t.getBoundingClientRect();return e.clientX>=n.left-b&&e.clientX<=n.right+b&&e.clientY>=n.top-b&&e.clientY<=n.bottom+b},S=(e,t)=>e===t||e!==void 0&&t!==void 0&&e.length===t.length&&e.every((e,n)=>Object.is(e,t[n])),C=(e,t)=>Object.is(e,t)||e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime(),w=(e,t)=>e.length===t.length&&e.every((e,n)=>e.viewIndex===t[n].viewIndex&&e.column.key===t[n].column.key&&C(e.value,t[n].value)),T=()=>{let d=null,f=r.createValueStore(h),b=r.createValueStore(null),C={current:null},T={current:null},E=null,D=null,O=null,k=e=>e?`toggled`:`auto`,A=e=>(n,r,i,a)=>t.isViewCellEditable({readOnly:e.readOnly,canEditCell:e.canEditCell},e.rowModel,n,r,i,a),j=()=>{if(O===null||d===null)return;let e=f.getSnapshot();if(e.status===`dragging`&&e.toggled===O.toggled&&(e.target===O.target||e.target!==null&&O.target!==null&&e.target.direction===O.target.direction&&l.isSameFillRange(e.target.range,O.target.range)))return;let t=null;if(O.target!==null){let e=l.previewFillValue({rowModel:d.rowModel,columns:d.columns,source:O.source,target:O.target,request:k(O.toggled),canWriteCell:A(d),getFillValue:d.getFillValue});t=e&&g(e.column,e.row,e.value)||null}f.setSnapshot({status:`dragging`,source:O.source,target:O.target,toggled:O.toggled,previewText:t})},M=()=>{if(O===null||d===null)return;let e=l.resolveFillColumnBounds(d.columns),t=d.hitTest(O.pointer.x,O.pointer.y);e===null||t===null||(O.target=l.resolveFillTarget(O.source,t,i.getSelectableRowCount(d.rowModel),e),j())},N=()=>{if(O===null||d===null)return;let e=O;e.rafId=requestAnimationFrame(N);let t=d.scrollContainerRef.current;if(!t)return;if(!e.armed){if(!a.hasPointerLeftActivationRadius(e.origin,e.pointer,6))return;e.armed=!0}let n=t.getBoundingClientRect(),r=o.resolveElementScale(t,n),i=a.resolveScrollContentBox({rectLeft:n.left,rectTop:n.top,clientLeft:t.clientLeft,clientTop:t.clientTop,clientWidth:t.clientWidth,clientHeight:t.clientHeight,scale:r}),s=a.computeNextScrollPosition(t.scrollTop,a.resolveAutoScrollAxisDirection(e.pointer.y,a.resolveTopAutoScrollStart(i.top,(d.stickyTopHeight??0)*r.y,24),i.bottom-(d.footerHeight??0),24),18,t.scrollHeight-t.clientHeight),c=a.computeNextScrollPosition(t.scrollLeft,a.resolveAutoScrollAxisDirection(e.pointer.x,i.left,i.right,24),18,t.scrollWidth-t.clientWidth);(s!==t.scrollTop||c!==t.scrollLeft)&&(t.scrollTo({top:s,left:c,behavior:`auto`}),M())},P=(e,t)=>{let n=O;if(n!==null){if(O=null,n.cleanup(),n.rafId!==null&&cancelAnimationFrame(n.rafId),b.setSnapshot(null),f.setSnapshot(h),e&&n.target!==null){D=null,L(n.source,n.target,k(n.toggled),n.activeCell);return}D=e&&t!==void 0&&n.onSquare?{time:t,x:n.origin.x,y:n.origin.y}:null}},F=(t,n)=>{if(d===null)return;let{dispatch:r}=d;r(e.gridActions.startSelection({row:t.startRow,col:t.startCol})),r(e.gridActions.updateSelection({row:t.endRow,col:t.endCol})),r(e.gridActions.endSelection()),r(e.gridActions.activateCell(n??{row:t.startRow,col:t.startCol}))},I=(e,t)=>{let n=[];for(let r=t.startRow;r<=t.endRow;r+=1)n.push(e.getRowKey(r));return n},L=(e,t,n,r)=>{if(d===null||!d.enabled)return;let i=d,a=l.buildFillEdits({rowModel:i.rowModel,columns:i.columns,source:e,target:t,request:n,canWriteCell:A(i),getFillValue:i.getFillValue});if(a.edits.length===0)return;let o=l.unionFillRange(e,t),s=null,c=[],u=null;if(i.isServerSide){if(!i.applyServerSideCellEdits)return;u=I(i.rowModel,o),i.applyServerSideCellEdits(a.edits)}else{if(!i.applyRowsChange)return;let e=l.applyFillEditsToRows(i.rows,i.rowModel,a.edits);if(e===i.rows)return;s=i.rows,c.push(e),i.applyRowsChange(e)}E={source:e,target:t,range:o,previousSource:e,selectionConfirmed:!1,columns:i.columns,viewKey:i.viewKey,request:n,edits:a.edits,baseRows:s,baseRowModel:i.isServerSide?null:i.rowModel,emittedRows:c,rowKeys:u},F(o,r),f.setSnapshot({status:`filled`,range:o,kind:a.kind,seriesAvailable:a.seriesAvailable,menu:null})},R=c.createPopoverWindowBindings({onScroll:e=>{e.target instanceof Node&&C.current?.contains(e.target)||B(!1)},onResize:()=>B(!1),isInside:e=>C.current?.contains(e)===!0||T.current?.contains(e)===!0,onOutsidePointerDown:e=>B(d!==null&&c.isInsideGridRoot(d.gridRootRef,e)),getGridRoot:()=>d?.gridRootRef.current??null,onGridHidden:()=>B(!1),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),B(!0))}}),z=e=>{let t=f.getSnapshot();t.status!==`filled`||t.menu===e||f.setSnapshot({...t,menu:e})},B=e=>{R.detach(),z(null),e&&d!==null&&c.restoreGridFocus(d.gridRootRef)},V=()=>{let e=typeof document<`u`&&C.current?.contains(n.getActiveElement(C.current))===!0;E=null,R.detach(),f.getSnapshot().status===`filled`&&f.setSnapshot(h),e&&d!==null&&c.restoreGridFocus(d.gridRootRef)},H=e=>{let t=f.getSnapshot();if(t.status!==`filled`)return;if(t.menu!==null){B(!0);return}let n=Math.min(e.left,window.innerWidth-u-m);n=Math.max(m,n);let r=e.bottom+4,i=p();r+i>window.innerHeight-m&&(r=Math.max(m,e.top-4-i)),z({top:r,left:n}),R.attach()},U=(e,t)=>{let n=t.rowKeys;if(n===null)return!1;for(let r=0;r<n.length;r+=1)if(e.getRowKey(t.range.startRow+r)!==n[r])return!1;return!0},W=e=>{let n=f.getSnapshot(),r=E;if(B(!0),d===null||r===null||n.status!==`filled`||r.request===e)return;let i=d;if(i.isServerSide){if(!i.applyServerSideCellEdits||!U(i.rowModel,r)){V();return}let t=l.buildFillEdits({rowModel:i.rowModel,columns:r.columns,source:r.source,target:r.target,request:e,canWriteCell:A(i),getFillValue:i.getFillValue});r.request=e,t.edits.length>0&&!w(t.edits,r.edits)&&i.applyServerSideCellEdits(t.edits),r.edits=t.edits,f.setSnapshot({...n,kind:t.kind,menu:null});return}if(!i.amendRowsChange||r.baseRows===null||r.baseRowModel===null){V();return}let a=r.baseRowModel,o=l.buildFillEdits({rowModel:a,columns:r.columns,source:r.source,target:r.target,request:e,canWriteCell:(e,n,r,o)=>t.isViewCellEditable({readOnly:i.readOnly,canEditCell:i.canEditCell},a,e,n,r,o),getFillValue:i.getFillValue});if(r.request=e,!w(o.edits,r.edits)){let e=l.applyFillEditsToRows(r.baseRows,a,o.edits);r.emittedRows.push(e),r.edits=o.edits,i.amendRowsChange(e)}f.setSnapshot({...n,kind:o.kind,menu:null})},G=(e,t)=>{if(e?.type!==`cell`)return!1;let{start:n,end:r}=e.range;return l.isSameFillRange(t,{startRow:Math.min(n.row,r.row),endRow:Math.max(n.row,r.row),startCol:Math.min(n.col,r.col),endCol:Math.max(n.col,r.col)})},K=e=>{let t=E;if(t!==null){if(!e.enabled||e.editing||!_(e.columns,t.columns)||!S(e.viewKey,t.viewKey)){V();return}if(!e.isServerSide&&e.rows!==t.baseRows&&!t.emittedRows.includes(e.rows)){V();return}if(G(e.selection,t.range)){t.selectionConfirmed=!0;return}!t.selectionConfirmed&&G(e.selection,t.previousSource)||V()}},q=e=>{if(d===null||e.button!==0||(e.preventDefault(),O!==null||!d.enabled||d.editing))return;let t=l.resolveFillSource(d.selection,d.activeCell,i.getSelectableRowCount(d.rowModel),d.columns.length);if(t===null)return;let n=D;D=null;let r=x(e);if(n!==null&&r&&e.timeStamp-n.time<=v&&Math.abs(e.clientX-n.x)<=y&&Math.abs(e.clientY-n.y)<=y){d.gridRootRef.current?.focus({preventScroll:!0}),J();return}V(),d.gridRootRef.current?.focus({preventScroll:!0});let a=e.pointerId,o=e=>{O===null||e.pointerId!==a||(O.pointer={x:e.clientX,y:e.clientY},O.toggled=e.ctrlKey||e.metaKey,b.setSnapshot(O.pointer),M())},c=e=>{O===null||e.pointerId!==a||(O.toggled=e.ctrlKey||e.metaKey,P(!0,e.timeStamp))},u=e=>{e.pointerId===a&&P(!1)},f=e=>{if(O===null)return;if(e.preventDefault(),e.stopPropagation(),e.type===`keydown`&&e.key===`Escape`){P(!1);return}let t=e.ctrlKey||e.metaKey;t!==O.toggled&&(O.toggled=t,j())},p=()=>P(!1);window.addEventListener(`pointermove`,o),window.addEventListener(`pointerup`,c),window.addEventListener(`pointercancel`,u),window.addEventListener(`keydown`,f,!0),window.addEventListener(`keyup`,f,!0),window.addEventListener(`blur`,p);let m=s.beginEscapeCancelableDrag(),h={x:e.clientX,y:e.clientY};O={pointerId:a,source:t,activeCell:d.activeCell,origin:h,onSquare:r,pointer:h,toggled:e.ctrlKey||e.metaKey,target:null,armed:!1,rafId:null,cleanup:()=>{window.removeEventListener(`pointermove`,o),window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,u),window.removeEventListener(`keydown`,f,!0),window.removeEventListener(`keyup`,f,!0),window.removeEventListener(`blur`,p),m()}},b.setSnapshot(h),j(),O.rafId=requestAnimationFrame(N)},J=()=>{if(d===null||O!==null||!d.enabled||d.editing)return;let e=l.resolveFillSource(d.selection,d.activeCell,i.getSelectableRowCount(d.rowModel),d.columns.length);if(e===null)return;let t=l.resolveFillDoubleClickTarget(e,d.rowModel,d.columns);t!==null&&(V(),L(e,t,`auto`,d.activeCell))};return{update:e=>{d=e,O!==null&&(!e.enabled||e.editing)&&P(!1),K(e)},subscribe:f.subscribe,getSnapshot:f.getSnapshot,subscribePointer:b.subscribe,getPointerSnapshot:b.getSnapshot,handlePointerDown:q,handleDoubleClick:J,toggleMenu:H,closeMenu:()=>B(!0),chooseKind:W,menuPanel:C,chipElement:T,dispose:()=>{P(!1),R.detach(),E=null}}};exports.createFillHandleController=T;
|