@ishibashi0112/spreadsheet-grid-core 0.41.1 → 0.42.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/asyncSelectOptionsSource.d.ts +2 -2
- package/dist/controllers/autoHeightMeasurer.d.ts +3 -3
- package/dist/controllers/clipboardController.cjs +2 -2
- package/dist/controllers/clipboardController.d.ts +5 -3
- package/dist/controllers/clipboardController.js +60 -57
- package/dist/controllers/columnAutosizeRunner.d.ts +2 -2
- package/dist/controllers/columnHeaderDragController.d.ts +2 -2
- package/dist/controllers/columnMenuController.cjs +1 -1
- package/dist/controllers/columnMenuController.d.ts +2 -2
- package/dist/controllers/columnMenuController.js +60 -60
- package/dist/controllers/contextMenuController.cjs +1 -1
- package/dist/controllers/contextMenuController.d.ts +2 -2
- package/dist/controllers/contextMenuController.js +32 -32
- package/dist/controllers/editController.cjs +1 -1
- package/dist/controllers/editController.d.ts +5 -3
- package/dist/controllers/editController.js +97 -51
- package/dist/controllers/filterPopoverController.cjs +1 -1
- package/dist/controllers/filterPopoverController.d.ts +5 -5
- package/dist/controllers/filterPopoverController.js +78 -78
- package/dist/controllers/globalFilteredOrder.d.ts +2 -2
- package/dist/controllers/historyController.d.ts +2 -2
- package/dist/controllers/keyboardController.cjs +1 -1
- package/dist/controllers/keyboardController.d.ts +2 -2
- package/dist/controllers/keyboardController.js +2 -0
- package/dist/controllers/pointerInteractionsController.d.ts +4 -4
- package/dist/controllers/popoverSupport.cjs +1 -1
- package/dist/controllers/popoverSupport.d.ts +2 -1
- package/dist/controllers/popoverSupport.js +3 -3
- package/dist/controllers/rowDragController.d.ts +2 -2
- package/dist/controllers/scrollSyncController.d.ts +2 -2
- package/dist/controllers/selectOptionsCollector.d.ts +2 -2
- package/dist/controllers/serverSideRowModel.cjs +1 -1
- package/dist/controllers/serverSideRowModel.d.ts +2 -2
- package/dist/controllers/serverSideRowModel.js +5 -3
- package/dist/controllers/toolPanelController.cjs +1 -1
- package/dist/controllers/toolPanelController.d.ts +1 -1
- package/dist/controllers/toolPanelController.js +53 -53
- package/dist/controllers/tooltipController.d.ts +1 -1
- package/dist/controllers/viewportSyncController.d.ts +2 -2
- package/dist/engine/columnCommands.cjs +1 -1
- package/dist/engine/columnCommands.d.ts +4 -4
- package/dist/engine/columnCommands.js +2 -2
- package/dist/engine/columnLayout.d.ts +2 -2
- package/dist/engine/createGridEngine.cjs +1 -1
- package/dist/engine/createGridEngine.d.ts +14 -14
- package/dist/engine/createGridEngine.js +1 -1
- package/dist/engine/filterPopoverCommands.d.ts +7 -7
- package/dist/engine/gridApi.cjs +1 -1
- package/dist/engine/gridApi.d.ts +10 -8
- package/dist/engine/gridApi.js +115 -79
- package/dist/engine/notifiers.d.ts +1 -1
- package/dist/engine/rowPipeline.cjs +1 -1
- package/dist/engine/rowPipeline.d.ts +5 -5
- package/dist/engine/rowPipeline.js +1 -1
- package/dist/engine/rowSelectionCommands.d.ts +2 -2
- package/dist/engine/verticalLayout.d.ts +5 -5
- package/dist/index.d.ts +8 -8
- package/dist/logic/aggregation.d.ts +1 -1
- package/dist/logic/autoSizeOnData.d.ts +1 -1
- package/dist/logic/clearCells.d.ts +2 -2
- package/dist/logic/columnAutosize.d.ts +1 -1
- package/dist/logic/columnFlex.d.ts +1 -1
- package/dist/logic/columnReset.d.ts +1 -1
- package/dist/logic/columnWidthState.cjs +1 -0
- package/dist/logic/columnWidthState.d.ts +2 -0
- package/dist/logic/columnWidthState.js +30 -0
- package/dist/logic/contextMenuTarget.d.ts +1 -1
- package/dist/logic/dateFilterCondition.d.ts +2 -2
- package/dist/logic/dateFilterPresets.d.ts +1 -1
- package/dist/logic/detailRow.d.ts +2 -2
- package/dist/logic/domGuards.cjs +1 -1
- package/dist/logic/domGuards.js +1 -1
- package/dist/logic/editorValues.d.ts +1 -1
- package/dist/logic/exportCsv.d.ts +1 -1
- package/dist/logic/exportData.d.ts +2 -2
- package/dist/logic/exportScope.d.ts +1 -1
- package/dist/logic/filterSummary.d.ts +2 -2
- package/dist/logic/filtering.d.ts +2 -2
- package/dist/logic/geometry.d.ts +1 -1
- package/dist/logic/gridState.cjs +1 -1
- package/dist/logic/gridState.d.ts +1 -1
- package/dist/logic/gridState.js +59 -44
- package/dist/logic/grouping.d.ts +3 -3
- package/dist/logic/inferFilterType.d.ts +1 -1
- package/dist/logic/labelRows.d.ts +2 -2
- package/dist/logic/numberFilterCondition.d.ts +1 -1
- package/dist/logic/rowHeightStore.d.ts +2 -2
- package/dist/logic/rowReorder.d.ts +1 -1
- package/dist/logic/rowSelection.d.ts +1 -1
- package/dist/logic/scrollHint.d.ts +1 -1
- package/dist/logic/scrollTargets.d.ts +1 -1
- package/dist/logic/selectEditorState.d.ts +1 -1
- package/dist/logic/serverSideEdits.d.ts +1 -1
- package/dist/logic/serverSideQuery.d.ts +1 -1
- package/dist/logic/sorting.cjs +1 -1
- package/dist/logic/sorting.d.ts +3 -2
- package/dist/logic/sorting.js +81 -50
- package/dist/logic/textFilterCondition.d.ts +1 -1
- package/dist/logic/theme.d.ts +1 -1
- package/dist/logic/validation.d.ts +1 -1
- package/dist/logic/valueFormatters.cjs +1 -1
- package/dist/logic/valueFormatters.d.ts +1 -1
- package/dist/logic/valueFormatters.js +12 -9
- package/dist/model/gridActions.cjs +1 -1
- package/dist/model/gridActions.d.ts +10 -1
- package/dist/model/gridActions.js +9 -0
- package/dist/model/gridReducer.cjs +1 -1
- package/dist/model/gridReducer.d.ts +3 -3
- package/dist/model/gridReducer.js +178 -110
- package/dist/model/gridSelectors.d.ts +3 -3
- package/dist/model/gridStore.d.ts +2 -2
- package/dist/model/gridTypes.core.d.ts +47 -9
- package/dist/model/gridTypes.unbound.d.ts +2 -2
- package/dist/utils/clipboard.cjs +6 -5
- package/dist/utils/clipboard.d.ts +4 -2
- package/dist/utils/clipboard.js +52 -17
- package/dist/utils/permissions.d.ts +1 -1
- package/package.json +4 -3
package/dist/engine/gridApi.js
CHANGED
|
@@ -12,22 +12,22 @@ import { serializeRowsToCsv as w } from "../logic/exportCsv.js";
|
|
|
12
12
|
import { buildGridExportData as T } from "../logic/exportData.js";
|
|
13
13
|
import { normalizeExportScope as E } from "../logic/exportScope.js";
|
|
14
14
|
//#region src/engine/gridApi.ts
|
|
15
|
-
var D = () => {
|
|
16
|
-
let
|
|
15
|
+
var D = 1e3, O = () => {
|
|
16
|
+
let O = null, k = null, A = (e, t, n = "auto") => {
|
|
17
17
|
let r = Math.max(e.scrollHeight - e.clientHeight, 0), i = Math.max(e.scrollWidth - e.clientWidth, 0), a = Math.min(Math.max(t.top, 0), r), o = Math.min(Math.max(t.left, 0), i);
|
|
18
|
-
(Math.round(a) !== Math.round(e.scrollTop) || Math.round(o) !== Math.round(e.scrollLeft)) &&
|
|
18
|
+
(Math.round(a) !== Math.round(e.scrollTop) || Math.round(o) !== Math.round(e.scrollLeft)) && O?.markApiScroll(), e.scrollTo({
|
|
19
19
|
top: a,
|
|
20
20
|
left: o,
|
|
21
21
|
behavior: n
|
|
22
22
|
});
|
|
23
|
-
},
|
|
24
|
-
let n =
|
|
25
|
-
!n || !r ||
|
|
23
|
+
}, j = (e, t) => {
|
|
24
|
+
let n = O?.scrollContainerRef.current ?? null, r = O;
|
|
25
|
+
!n || !r || A(n, {
|
|
26
26
|
top: e === null ? n.scrollTop : u(e, r.verticalScaleFactor),
|
|
27
27
|
left: t === null ? n.scrollLeft : t
|
|
28
28
|
});
|
|
29
|
-
},
|
|
30
|
-
let n =
|
|
29
|
+
}, M = (e, t) => {
|
|
30
|
+
let n = O?.scrollContainerRef.current ?? null, r = O;
|
|
31
31
|
if (!n || !r || r.viewRowCount === 0) return null;
|
|
32
32
|
let i = Math.min(Math.max(e, 0), r.viewRowCount - 1);
|
|
33
33
|
return C({
|
|
@@ -38,8 +38,8 @@ var D = () => {
|
|
|
38
38
|
currentScrollTop: d(n.scrollTop, r.verticalScaleFactor),
|
|
39
39
|
align: t
|
|
40
40
|
});
|
|
41
|
-
},
|
|
42
|
-
let n =
|
|
41
|
+
}, N = (e, t) => {
|
|
42
|
+
let n = O?.scrollContainerRef.current ?? null, r = O;
|
|
43
43
|
if (!n || !r) return null;
|
|
44
44
|
let i = a(r.paneLayout, e);
|
|
45
45
|
return !i || i.pane !== "center" ? null : S({
|
|
@@ -51,10 +51,16 @@ var D = () => {
|
|
|
51
51
|
currentScrollLeft: n.scrollLeft,
|
|
52
52
|
align: t
|
|
53
53
|
});
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
let
|
|
54
|
+
}, P = (e, t, n) => {
|
|
55
|
+
j(M(e, n), N(t, n));
|
|
56
|
+
}, F = (e) => {
|
|
57
|
+
let t = O;
|
|
58
|
+
return t ? {
|
|
59
|
+
row: Math.min(Math.max(e.row, 0), Math.max(t.viewRowCount - 1, 0)),
|
|
60
|
+
col: Math.min(Math.max(e.col, 0), Math.max(t.orderedColumns.length - 1, 0))
|
|
61
|
+
} : e;
|
|
62
|
+
}, I = (e, t = !1) => {
|
|
63
|
+
let n = O;
|
|
58
64
|
if (!n) return null;
|
|
59
65
|
let r = (e) => n.rowModel.getRow(e), i = n.labelRowExport, a = (e) => {
|
|
60
66
|
if (!i) return [];
|
|
@@ -139,26 +145,26 @@ var D = () => {
|
|
|
139
145
|
isRowIncluded: d,
|
|
140
146
|
getLabelLine: l
|
|
141
147
|
};
|
|
142
|
-
},
|
|
143
|
-
let t =
|
|
148
|
+
}, L = (e) => e.filter((e) => !r(e.key)), R = (e) => {
|
|
149
|
+
let t = I(e?.scope ?? "view", e?.includeLabelRows === !0);
|
|
144
150
|
return t ? w({
|
|
145
151
|
getRow: t.getRow,
|
|
146
152
|
startRow: t.startRow,
|
|
147
153
|
endRow: t.endRow,
|
|
148
|
-
columns:
|
|
154
|
+
columns: L(t.columns),
|
|
149
155
|
delimiter: e?.delimiter,
|
|
150
156
|
includeHeaders: e?.includeHeaders,
|
|
151
157
|
bom: e?.bom,
|
|
152
158
|
isRowIncluded: t.isRowIncluded,
|
|
153
159
|
getLabelLine: t.getLabelLine
|
|
154
160
|
}) : e?.bom ? "" : "";
|
|
155
|
-
},
|
|
156
|
-
let t =
|
|
161
|
+
}, z = (e) => {
|
|
162
|
+
let t = I(e?.scope ?? "view", e?.includeLabelRows === !0);
|
|
157
163
|
return t ? T({
|
|
158
164
|
getRow: t.getRow,
|
|
159
165
|
startRow: t.startRow,
|
|
160
166
|
endRow: t.endRow,
|
|
161
|
-
columns:
|
|
167
|
+
columns: L(t.columns),
|
|
162
168
|
isRowIncluded: t.isRowIncluded,
|
|
163
169
|
getLabelLine: t.getLabelLine
|
|
164
170
|
}) : {
|
|
@@ -168,76 +174,96 @@ var D = () => {
|
|
|
168
174
|
};
|
|
169
175
|
return {
|
|
170
176
|
update: (e) => {
|
|
171
|
-
|
|
177
|
+
let t = O?.physicalBodyHeight;
|
|
178
|
+
if (O = e, k === null || t === e.physicalBodyHeight) return;
|
|
179
|
+
let n = e.scrollContainerRef.current;
|
|
180
|
+
if (!n || !e.measuredRowHeights || Date.now() > k.until || n.scrollTop < k.pinnedTop - 1) {
|
|
181
|
+
k = null;
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
A(n, {
|
|
185
|
+
top: Math.max(e.headerHeight + e.physicalBodyHeight - n.clientHeight, 0),
|
|
186
|
+
left: n.scrollLeft
|
|
187
|
+
}), k = {
|
|
188
|
+
...k,
|
|
189
|
+
pinnedTop: n.scrollTop
|
|
190
|
+
};
|
|
172
191
|
},
|
|
173
192
|
handle: {
|
|
174
|
-
scrollToRow: (e, t) =>
|
|
175
|
-
scrollToCell: (e, t, n) =>
|
|
193
|
+
scrollToRow: (e, t) => j(M(e, t?.align ?? "auto"), null),
|
|
194
|
+
scrollToCell: (e, t, n) => P(e, t, n?.align ?? "auto"),
|
|
176
195
|
scrollToTop: () => {
|
|
177
|
-
let e =
|
|
178
|
-
e &&
|
|
196
|
+
let e = O?.scrollContainerRef.current ?? null;
|
|
197
|
+
e && A(e, {
|
|
179
198
|
top: 0,
|
|
180
199
|
left: e.scrollLeft
|
|
181
200
|
});
|
|
182
201
|
},
|
|
183
202
|
scrollToBottom: () => {
|
|
184
|
-
let e =
|
|
185
|
-
!e || !t ||
|
|
203
|
+
let e = O?.scrollContainerRef.current ?? null, t = O;
|
|
204
|
+
!e || !t || (A(e, {
|
|
186
205
|
top: Math.max(t.headerHeight + t.physicalBodyHeight - e.clientHeight, 0),
|
|
187
206
|
left: e.scrollLeft
|
|
188
|
-
})
|
|
207
|
+
}), k = t.measuredRowHeights ? {
|
|
208
|
+
pinnedTop: e.scrollTop,
|
|
209
|
+
until: Date.now() + D
|
|
210
|
+
} : null);
|
|
189
211
|
},
|
|
190
212
|
getScrollPosition: () => {
|
|
191
|
-
let e =
|
|
213
|
+
let e = O?.scrollContainerRef.current ?? null;
|
|
192
214
|
return e ? {
|
|
193
215
|
top: e.scrollTop,
|
|
194
216
|
left: e.scrollLeft
|
|
195
217
|
} : null;
|
|
196
218
|
},
|
|
197
219
|
setScrollPosition: (e, t) => {
|
|
198
|
-
let n =
|
|
199
|
-
n &&
|
|
220
|
+
let n = O?.scrollContainerRef.current ?? null;
|
|
221
|
+
n && A(n, {
|
|
200
222
|
top: e.top ?? n.scrollTop,
|
|
201
223
|
left: e.left ?? n.scrollLeft
|
|
202
224
|
}, t?.behavior ?? "auto");
|
|
203
225
|
},
|
|
204
226
|
getVisibleRowRange: () => {
|
|
205
|
-
let e =
|
|
227
|
+
let e = O;
|
|
206
228
|
return !e || e.windowLastRow < e.windowFirstRow ? null : {
|
|
207
229
|
startIndex: e.windowFirstRow,
|
|
208
230
|
endIndex: e.windowLastRow + 1
|
|
209
231
|
};
|
|
210
232
|
},
|
|
211
233
|
getActiveCell: () => {
|
|
212
|
-
let e =
|
|
234
|
+
let e = O?.uiState.activeCell;
|
|
213
235
|
return e ? {
|
|
214
236
|
row: e.row,
|
|
215
237
|
col: e.col
|
|
216
238
|
} : null;
|
|
217
239
|
},
|
|
218
240
|
setActiveCell: (e, t) => {
|
|
219
|
-
let n =
|
|
220
|
-
|
|
241
|
+
let n = O;
|
|
242
|
+
if (!n) return;
|
|
243
|
+
let r = e ? F(e) : null;
|
|
244
|
+
n.dispatch(i.activateCell(r)), r && t?.scrollIntoView && P(r.row, r.col, "auto");
|
|
221
245
|
},
|
|
222
|
-
getSelection: () =>
|
|
246
|
+
getSelection: () => O?.uiState.selection ?? null,
|
|
223
247
|
selectCell: (e, t, n) => {
|
|
224
|
-
let r =
|
|
248
|
+
let r = O;
|
|
225
249
|
if (!r) return;
|
|
226
|
-
let a = {
|
|
250
|
+
let a = F({
|
|
227
251
|
row: e,
|
|
228
252
|
col: t
|
|
229
|
-
};
|
|
230
|
-
r.dispatch(i.startSelection(a)), r.dispatch(i.endSelection()), n?.scrollIntoView &&
|
|
253
|
+
});
|
|
254
|
+
r.dispatch(i.startSelection(a)), r.dispatch(i.endSelection()), n?.scrollIntoView && P(a.row, a.col, "auto");
|
|
231
255
|
},
|
|
232
256
|
selectRange: (e, t) => {
|
|
233
|
-
let n =
|
|
234
|
-
|
|
257
|
+
let n = O;
|
|
258
|
+
if (!n) return;
|
|
259
|
+
let r = F(e.start), a = F(e.end);
|
|
260
|
+
n.dispatch(i.startSelection(r)), n.dispatch(i.updateSelection(a)), n.dispatch(i.endSelection()), t?.scrollIntoView && P(a.row, a.col, "auto");
|
|
235
261
|
},
|
|
236
262
|
clearSelection: () => {
|
|
237
|
-
|
|
263
|
+
O?.dispatch(i.clearSelection());
|
|
238
264
|
},
|
|
239
265
|
getSelectedRows: () => {
|
|
240
|
-
let e =
|
|
266
|
+
let e = O;
|
|
241
267
|
if (!e) return [];
|
|
242
268
|
let t = e.uiState.selection;
|
|
243
269
|
if (!t) return [];
|
|
@@ -254,41 +280,41 @@ var D = () => {
|
|
|
254
280
|
} else for (let t = 0; t < e.viewRowCount; t += 1) r(t);
|
|
255
281
|
return n;
|
|
256
282
|
},
|
|
257
|
-
exportCsv: (e) =>
|
|
283
|
+
exportCsv: (e) => R(e),
|
|
258
284
|
downloadCsv: (e, t) => {
|
|
259
285
|
if (typeof document > "u") return;
|
|
260
|
-
let n =
|
|
286
|
+
let n = R({
|
|
261
287
|
...t,
|
|
262
288
|
bom: t?.bom ?? !0
|
|
263
289
|
}), r = new Blob([n], { type: "text/csv;charset=utf-8;" }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
264
290
|
a.href = i, a.download = e ?? "export.csv", document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(i);
|
|
265
291
|
},
|
|
266
|
-
getExportData: (e) =>
|
|
292
|
+
getExportData: (e) => z(e),
|
|
267
293
|
getState: () => {
|
|
268
|
-
let e =
|
|
294
|
+
let e = O;
|
|
269
295
|
return e ? y(e.uiState.columnWidths, e.uiState.filters, e.uiState.sort, b(e.columns)) : y({}, {
|
|
270
296
|
globalText: "",
|
|
271
297
|
columnFilters: {}
|
|
272
298
|
}, [], []);
|
|
273
299
|
},
|
|
274
300
|
applyState: (e) => {
|
|
275
|
-
let t =
|
|
301
|
+
let t = O;
|
|
276
302
|
if (!t) return;
|
|
277
303
|
let n = x(e);
|
|
278
304
|
t.onColumnsChange && n.columns && t.onColumnsChange(v(t.columns, n.columns, n.columnWidths)), t.dispatch(i.resetColumnWidths(n.columnWidths)), t.dispatch(i.setAllFilters(n.filters)), t.dispatch(i.setSort(n.sort));
|
|
279
305
|
},
|
|
280
306
|
getRowSelection: () => {
|
|
281
|
-
let e =
|
|
307
|
+
let e = O;
|
|
282
308
|
return e ? g(e.uiState.rowSelection) : {
|
|
283
309
|
type: "include",
|
|
284
310
|
rowKeys: []
|
|
285
311
|
};
|
|
286
312
|
},
|
|
287
313
|
setRowSelection: (e) => {
|
|
288
|
-
|
|
314
|
+
O?.commitRowSelection(h(e));
|
|
289
315
|
},
|
|
290
316
|
getSelectedRowKeys: () => {
|
|
291
|
-
let e =
|
|
317
|
+
let e = O;
|
|
292
318
|
if (!e) return [];
|
|
293
319
|
let t = e.uiState.rowSelection;
|
|
294
320
|
if (t.mode === "include") return Array.from(t.keys);
|
|
@@ -301,7 +327,7 @@ var D = () => {
|
|
|
301
327
|
return n;
|
|
302
328
|
},
|
|
303
329
|
getSelectedRowData: () => {
|
|
304
|
-
let e =
|
|
330
|
+
let e = O;
|
|
305
331
|
if (!e) return [];
|
|
306
332
|
let t = e.uiState.rowSelection, n = [], r = e.rowModel.getRowCount();
|
|
307
333
|
for (let i = 0; i < r; i += 1) {
|
|
@@ -311,46 +337,46 @@ var D = () => {
|
|
|
311
337
|
return n;
|
|
312
338
|
},
|
|
313
339
|
getSelectedRowCount: () => {
|
|
314
|
-
let e =
|
|
340
|
+
let e = O;
|
|
315
341
|
return e ? p(e.uiState.rowSelection, e.leafRowCount) : 0;
|
|
316
342
|
},
|
|
317
343
|
isRowSelected: (e) => {
|
|
318
|
-
let t =
|
|
344
|
+
let t = O;
|
|
319
345
|
return t ? m(t.uiState.rowSelection, e) : !1;
|
|
320
346
|
},
|
|
321
347
|
selectAllRows: () => {
|
|
322
|
-
|
|
348
|
+
O?.commitRowSelection(_());
|
|
323
349
|
},
|
|
324
350
|
clearRowSelection: () => {
|
|
325
|
-
|
|
351
|
+
O?.commitRowSelection(f());
|
|
326
352
|
},
|
|
327
353
|
undo: () => {
|
|
328
|
-
|
|
354
|
+
O?.undoRows();
|
|
329
355
|
},
|
|
330
356
|
redo: () => {
|
|
331
|
-
|
|
357
|
+
O?.redoRows();
|
|
332
358
|
},
|
|
333
|
-
canUndo: () =>
|
|
334
|
-
canRedo: () =>
|
|
359
|
+
canUndo: () => O?.canUndoRows() ?? !1,
|
|
360
|
+
canRedo: () => O?.canRedoRows() ?? !1,
|
|
335
361
|
clearUndoHistory: () => {
|
|
336
|
-
|
|
362
|
+
O?.clearUndoHistory();
|
|
337
363
|
},
|
|
338
364
|
setGroupCollapsed: (e, t) => {
|
|
339
|
-
|
|
365
|
+
O?.dispatch(i.setGroupCollapsed(e, t));
|
|
340
366
|
},
|
|
341
367
|
expandAllGroups: () => {
|
|
342
|
-
|
|
368
|
+
O?.dispatch(i.setCollapsedGroupKeys(/* @__PURE__ */ new Set()));
|
|
343
369
|
},
|
|
344
370
|
collapseAllGroups: () => {
|
|
345
|
-
let t =
|
|
371
|
+
let t = O;
|
|
346
372
|
!t || !t.groupTree || t.dispatch(i.setCollapsedGroupKeys(new Set(e(t.groupTree))));
|
|
347
373
|
},
|
|
348
374
|
getGroupRows: () => {
|
|
349
|
-
let e =
|
|
375
|
+
let e = O;
|
|
350
376
|
return e?.groupTree ? t(e.groupTree) : [];
|
|
351
377
|
},
|
|
352
378
|
setDetailRowExpanded: (e, t) => {
|
|
353
|
-
let r =
|
|
379
|
+
let r = O;
|
|
354
380
|
if (!(!r || !r.detailRowEnabled)) {
|
|
355
381
|
if (t && r.detailIsExpandable) {
|
|
356
382
|
let t = n(r.rowModel, e, r.detailIndexCacheRef.current, !r.isServerSide);
|
|
@@ -366,22 +392,22 @@ var D = () => {
|
|
|
366
392
|
}
|
|
367
393
|
},
|
|
368
394
|
getExpandedDetailRowKeys: () => {
|
|
369
|
-
let e =
|
|
395
|
+
let e = O;
|
|
370
396
|
return e && e.detailRowEnabled ? Array.from(e.uiState.expandedDetailRowKeys) : [];
|
|
371
397
|
},
|
|
372
398
|
collapseAllDetailRows: () => {
|
|
373
|
-
let e =
|
|
399
|
+
let e = O;
|
|
374
400
|
!e || !e.detailRowEnabled || e.dispatch(i.setExpandedDetailRowKeys(/* @__PURE__ */ new Set()));
|
|
375
401
|
},
|
|
376
402
|
moveRow: (e, t) => {
|
|
377
|
-
|
|
403
|
+
O?.moveRowByKey(e, t);
|
|
378
404
|
},
|
|
379
405
|
getInvalidCells: () => {
|
|
380
|
-
let e =
|
|
406
|
+
let e = O;
|
|
381
407
|
return e ? e.isServerSide ? (console.warn("[SpreadsheetGrid] getInvalidCells は serverSide モードでは利用できません(空配列を返します)。"), []) : l(e.rows, e.columns, e.resolvedRowKeyGetter) : [];
|
|
382
408
|
},
|
|
383
409
|
refreshServerSide: () => {
|
|
384
|
-
let e =
|
|
410
|
+
let e = O;
|
|
385
411
|
if (e) {
|
|
386
412
|
if (!e.isServerSide) {
|
|
387
413
|
console.warn("[SpreadsheetGrid] refreshServerSide は clientSide(rows)モードでは何もしません(dataSource 指定時のみ有効です)。");
|
|
@@ -390,19 +416,29 @@ var D = () => {
|
|
|
390
416
|
e.serverSideRefresh();
|
|
391
417
|
}
|
|
392
418
|
},
|
|
419
|
+
retryServerSideLoads: () => {
|
|
420
|
+
let e = O;
|
|
421
|
+
if (e) {
|
|
422
|
+
if (!e.isServerSide) {
|
|
423
|
+
console.warn("[SpreadsheetGrid] retryServerSideLoads は clientSide(rows)モードでは何もしません(dataSource 指定時のみ有効です)。");
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
e.serverSideRetryFailed();
|
|
427
|
+
}
|
|
428
|
+
},
|
|
393
429
|
openFilterManager: () => {
|
|
394
|
-
|
|
430
|
+
O?.openToolPanel("filter");
|
|
395
431
|
},
|
|
396
432
|
closeFilterManager: () => {
|
|
397
|
-
let e =
|
|
433
|
+
let e = O;
|
|
398
434
|
e && e.activeToolPanelTab === "filter" && e.closeToolPanel();
|
|
399
435
|
}
|
|
400
436
|
},
|
|
401
|
-
applyScroll:
|
|
402
|
-
verticalTargetFor:
|
|
403
|
-
horizontalTargetFor:
|
|
404
|
-
scrollToCellInternal:
|
|
437
|
+
applyScroll: j,
|
|
438
|
+
verticalTargetFor: M,
|
|
439
|
+
horizontalTargetFor: N,
|
|
440
|
+
scrollToCellInternal: P
|
|
405
441
|
};
|
|
406
442
|
};
|
|
407
443
|
//#endregion
|
|
408
|
-
export {
|
|
444
|
+
export { O as createGridApi };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GridColumn, GridFilterState, GridRowKey, GridSortState, GridState, GridUiState } from '../model/gridTypes.unbound';
|
|
1
|
+
import type { GridColumn, GridFilterState, GridRowKey, GridSortState, GridState, GridUiState } from '../model/gridTypes.unbound.js';
|
|
2
2
|
export type HoverRowNotifierArgs = {
|
|
3
3
|
enableRowHover: boolean;
|
|
4
4
|
isHoverControlled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("../logic/sorting.cjs"),n=require("../logic/grouping.cjs"),r=require("../logic/rowReorder.cjs"),i=require("../logic/labelRows.cjs"),a=require("../logic/filtering.cjs"),o=require("./memo.cjs"),s=require("../logic/serverSideQuery.cjs");var c={},l={},u=[],d=`\0`,f=()=>{let f=o.createMemo(e=>a.createSourceOrder(e)),p=o.createMemo((e,t)=>t?i.resolveLabelRowLayout(e,t):null),m=o.createMemo((e,t)=>i.createLabelFreeOrder(e,t)),h=o.createMemo((e,t)=>{let n=[];for(let r of e)a.columnFilterUsesNumericKey(t[r.key])&&n.push(r.key);return n.join(d)}),g=o.createMemo((t,n,r)=>{let i=new Map;if(r.length===0)return i;let o=new Set(r.split(d)),s=t.length;for(let r of n){if(!o.has(r.key))continue;let n=new Float64Array(s);for(let i=0;i<s;i+=1)n[i]=a.coerceNumberFilterCellValue(e.getCellValue(t[i],r));i.set(r.key,n)}return i}),_=o.createMemo((e,t,n,r,i)=>a.filterOrderByColumns(e,t,n,r,i)),v=o.createMemo((e,n,r,i)=>t.sortOrder(e,n,r,i)),y=o.createMemo((e,t,n)=>e&&r.isIdentityOrder(t,n)),b=o.createMemo((e,t,n)=>e&&i.isSameOrder(t,n)),x=o.createMemo((e,t,r,i,a)=>e?n.buildGroupTree(t,r,i,a):null),S=o.createMemo((e,t)=>e?n.flattenGroupTree(e,t):null),C=o.createMemo((e,t,n,r,a,o,s)=>e&&s?i.buildLabelDisplay({rows:t,order:n,layout:e,sortMode:r,keepEmptySections:a,sortActive:o,getLabel:s}):null),w=o.createMemo((e,t,r,a,o)=>{if(t)return i.createLabelRowModel(t,a,o);if(e){let{displayOrder:t,groups:r}=e;return{getRowCount:()=>t.length,getRow:e=>a[t[e]],getSourceIndex:e=>{let n=t[e];return n>=0?n:void 0},getRowKey:e=>{let i=t[e];return n.isGroupOrderValue(i)?n.groupRowKey(r[n.groupIndexOfOrderValue(i)]):o(a[i],i)},getGroupRow:e=>{let i=t[e];return n.isGroupOrderValue(i)?r[n.groupIndexOfOrderValue(i)]:void 0}}}return{getRowCount:()=>r.length,getRow:e=>a[r[e]],getSourceIndex:e=>r[e],getRowKey:e=>o(a[r[e]],r[e])}}),T=o.createMemo((e,t,n,r,i,a,o)=>e?s.buildServerSideQuery({globalText:t?n:``,columnFilters:r?i:l,sort:a?o:u}):c),E=o.createMemo((e,t)=>e?s.serializeServerSideQuery(t):``),D=o.createMemo((e,t)=>({query:e,queryKey:t}));return{resolveLabelRowLayout:(e,t)=>p(e,t),resolveBaseOrder:(e,t)=>t?m(t,e):f(e),resolveOrder:e=>{let{rows:t,
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("../logic/sorting.cjs"),n=require("../logic/grouping.cjs"),r=require("../logic/rowReorder.cjs"),i=require("../logic/labelRows.cjs"),a=require("../logic/filtering.cjs"),o=require("./memo.cjs"),s=require("../logic/serverSideQuery.cjs");var c={},l={},u=[],d=`\0`,f=()=>{let f=o.createMemo(e=>a.createSourceOrder(e)),p=o.createMemo((e,t)=>t?i.resolveLabelRowLayout(e,t):null),m=o.createMemo((e,t)=>i.createLabelFreeOrder(e,t)),h=o.createMemo((e,t)=>{let n=[];for(let r of e)a.columnFilterUsesNumericKey(t[r.key])&&n.push(r.key);return n.join(d)}),g=o.createMemo((t,n,r)=>{let i=new Map;if(r.length===0)return i;let o=new Set(r.split(d)),s=t.length;for(let r of n){if(!o.has(r.key))continue;let n=new Float64Array(s);for(let i=0;i<s;i+=1)n[i]=a.coerceNumberFilterCellValue(e.getCellValue(t[i],r));i.set(r.key,n)}return i}),_=o.createMemo((e,t,n,r,i)=>a.filterOrderByColumns(e,t,n,r,i)),v=o.createMemo((e,n,r,i)=>t.sortOrder(e,n,r,i)),y=o.createMemo((e,t,n)=>e&&r.isIdentityOrder(t,n)),b=o.createMemo((e,t,n)=>e&&i.isSameOrder(t,n)),x=o.createMemo((e,t,r,i,a)=>e?n.buildGroupTree(t,r,i,a):null),S=o.createMemo((e,t)=>e?n.flattenGroupTree(e,t):null),C=o.createMemo((e,t,n,r,a,o,s)=>e&&s?i.buildLabelDisplay({rows:t,order:n,layout:e,sortMode:r,keepEmptySections:a,sortActive:o,getLabel:s}):null),w=o.createMemo((e,t,r,a,o)=>{if(t)return i.createLabelRowModel(t,a,o);if(e){let{displayOrder:t,groups:r}=e;return{getRowCount:()=>t.length,getRow:e=>a[t[e]],getSourceIndex:e=>{let n=t[e];return n>=0?n:void 0},getRowKey:e=>{let i=t[e];return n.isGroupOrderValue(i)?n.groupRowKey(r[n.groupIndexOfOrderValue(i)]):o(a[i],i)},getGroupRow:e=>{let i=t[e];return n.isGroupOrderValue(i)?r[n.groupIndexOfOrderValue(i)]:void 0}}}return{getRowCount:()=>r.length,getRow:e=>a[r[e]],getSourceIndex:e=>r[e],getRowKey:e=>o(a[r[e]],r[e])}}),T=o.createMemo((e,t,n,r,i,a,o)=>e?s.buildServerSideQuery({globalText:t?n:``,columnFilters:r?i:l,sort:a?o:u}):c),E=o.createMemo((e,t)=>e?s.serializeServerSideQuery(t):``),D=o.createMemo((e,t)=>({query:e,queryKey:t}));return{resolveLabelRowLayout:(e,t)=>p(e,t),resolveBaseOrder:(e,t)=>t?m(t,e):f(e),resolveOrder:e=>{let{rows:t,filterSortColumns:n,globalFilteredOrder:i,rowDragAvailable:a,labelLayout:o}=e,s=e.manualFiltering?l:e.columnFilters,c=e.manualSorting?u:e.sort,d=h(n,s),f=g(t,n,d),p=_(t,i,n,s,f),x=v(t,p,n,c),S=o?b(a,x,m(o,t.length)):y(a,x,t.length);return{order:x,orderIsIdentity:S,rowDragOperable:r.isRowDragOperable(a,S)}},resolveClientSideRowModel:e=>{let{rows:t,order:n,rowGroupingActive:r,groupColumns:i,aggColumns:a,collapsedGroupKeys:o,rowKeyGetter:s,labelLayout:c,labelSortMode:l=`section`,keepEmptySections:u=!1,sortActive:d=!1,getLabel:f}=e,p=x(r,t,n,i,a),m=S(p,o),h=C(r?null:c??null,t,n,l,u,d,f);return{groupTree:p,groupedDisplay:m,labelDisplay:h,rowModel:w(m,h,n,t,s)}},resolveServerSideQuery:e=>{let{isServerSide:t,globalFilterEnabled:n,globalText:r,columnFilterEnabled:i,columnFilters:a,sortingEnabled:o,sort:s}=e,c=T(t,n,r,i,a,o,s);return D(c,E(t,c))}}};exports.createRowPipelineResolver=f;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ColumnFilterValue, GridColumn, GridRowKey, GridSortState, LabelRowSortMode, RowModel, ServerSideQuery } from '../model/gridTypes.unbound';
|
|
2
|
-
import { type RowOrder } from '../logic/filtering';
|
|
3
|
-
import { type GroupTree, type GroupedDisplay } from '../logic/grouping';
|
|
4
|
-
import { type LabelDisplay, type LabelRowLayout } from '../logic/labelRows';
|
|
1
|
+
import type { ColumnFilterValue, GridColumn, GridRowKey, GridSortState, LabelRowSortMode, RowModel, ServerSideQuery } from '../model/gridTypes.unbound.js';
|
|
2
|
+
import { type RowOrder } from '../logic/filtering.js';
|
|
3
|
+
import { type GroupTree, type GroupedDisplay } from '../logic/grouping.js';
|
|
4
|
+
import { type LabelDisplay, type LabelRowLayout } from '../logic/labelRows.js';
|
|
5
5
|
export type RowOrderInputs<T> = {
|
|
6
6
|
rows: T[];
|
|
7
7
|
labelLayout?: LabelRowLayout | null;
|
|
8
|
-
|
|
8
|
+
filterSortColumns: GridColumn<T>[];
|
|
9
9
|
columnFilters: Record<string, ColumnFilterValue>;
|
|
10
10
|
globalFilteredOrder: RowOrder;
|
|
11
11
|
sort: GridSortState;
|
|
@@ -70,7 +70,7 @@ var x = {}, S = {}, C = [], w = "\0", T = () => {
|
|
|
70
70
|
resolveLabelRowLayout: (e, t) => E(e, t),
|
|
71
71
|
resolveBaseOrder: (e, t) => t ? D(t, e) : T(e),
|
|
72
72
|
resolveOrder: (e) => {
|
|
73
|
-
let { rows: t,
|
|
73
|
+
let { rows: t, filterSortColumns: n, globalFilteredOrder: r, rowDragAvailable: i, labelLayout: a } = e, o = e.manualFiltering ? S : e.columnFilters, s = e.manualSorting ? C : e.sort, l = O(n, o), u = k(t, n, l), d = A(t, r, n, o, u), f = j(t, d, n, s), p = a ? N(i, f, D(a, t.length)) : M(i, f, t.length);
|
|
74
74
|
return {
|
|
75
75
|
order: f,
|
|
76
76
|
orderIsIdentity: p,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RowModel, RowSelectionModel, RowSelectionState } from '../model/gridTypes.unbound';
|
|
2
|
-
import { type GridUiAction } from '../model/gridActions';
|
|
1
|
+
import type { RowModel, RowSelectionModel, RowSelectionState } from '../model/gridTypes.unbound.js';
|
|
2
|
+
import { type GridUiAction } from '../model/gridActions.js';
|
|
3
3
|
export type RowSelectionCommandsArgs<T> = {
|
|
4
4
|
rowModel: RowModel<T>;
|
|
5
5
|
rowSelectionState: RowSelectionState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { GridColumn, GridRowKey, RowModel } from '../model/gridTypes.unbound';
|
|
2
|
-
import { type DetailRowExtra, type RowMetrics, type VerticalGeometry, type VerticalRow } from '../logic/verticalGeometry';
|
|
3
|
-
import { type RowHeightStore } from '../logic/rowHeightStore';
|
|
4
|
-
import { resolveDetailRowExtras, type DetailIndexCache } from '../logic/detailRow';
|
|
5
|
-
import type { LabelDisplay } from '../logic/labelRows';
|
|
1
|
+
import type { GridColumn, GridRowKey, RowModel } from '../model/gridTypes.unbound.js';
|
|
2
|
+
import { type DetailRowExtra, type RowMetrics, type VerticalGeometry, type VerticalRow } from '../logic/verticalGeometry.js';
|
|
3
|
+
import { type RowHeightStore } from '../logic/rowHeightStore.js';
|
|
4
|
+
import { resolveDetailRowExtras, type DetailIndexCache } from '../logic/detailRow.js';
|
|
5
|
+
import type { LabelDisplay } from '../logic/labelRows.js';
|
|
6
6
|
type ReadonlyRef<V> = {
|
|
7
7
|
readonly current: V;
|
|
8
8
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type * from './model/gridTypes.core';
|
|
2
|
-
export { createGridEngine } from './engine/createGridEngine';
|
|
3
|
-
export type { GridEngine, GridEngineInit } from './engine/createGridEngine';
|
|
4
|
-
export { createGridStore } from './model/gridStore';
|
|
5
|
-
export type { GridStore, GridViewState, GridViewStatePatch } from './model/gridStore';
|
|
6
|
-
export { gridActions } from './model/gridActions';
|
|
7
|
-
export type { GridUiAction } from './model/gridActions';
|
|
8
|
-
export { numberFormatter } from './logic/valueFormatters';
|
|
1
|
+
export type * from './model/gridTypes.core.js';
|
|
2
|
+
export { createGridEngine } from './engine/createGridEngine.js';
|
|
3
|
+
export type { GridEngine, GridEngineInit } from './engine/createGridEngine.js';
|
|
4
|
+
export { createGridStore } from './model/gridStore.js';
|
|
5
|
+
export type { GridStore, GridViewState, GridViewStatePatch } from './model/gridStore.js';
|
|
6
|
+
export { gridActions } from './model/gridActions.js';
|
|
7
|
+
export type { GridUiAction } from './model/gridActions.js';
|
|
8
|
+
export { numberFormatter } from './logic/valueFormatters.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GridAggFuncName } from '../model/gridTypes.unbound';
|
|
1
|
+
import type { GridAggFuncName } from '../model/gridTypes.unbound.js';
|
|
2
2
|
export declare const BUILTIN_AGG_FUNC_NAMES: readonly GridAggFuncName[];
|
|
3
3
|
export declare const isBuiltinAggFuncName: (value: unknown) => value is GridAggFuncName;
|
|
4
4
|
export type BuiltinAggAccumulator = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CellCoord, GridColumn, GridSelection } from '../model/gridTypes.unbound';
|
|
2
|
-
import type { ServerSideCellEditInput } from './serverSideEdits';
|
|
1
|
+
import type { CellCoord, GridColumn, GridSelection } from '../model/gridTypes.unbound.js';
|
|
2
|
+
import type { ServerSideCellEditInput } from './serverSideEdits.js';
|
|
3
3
|
type ClearTarget = {
|
|
4
4
|
startRow: number;
|
|
5
5
|
endRow: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GridColumn } from '../model/gridTypes.unbound';
|
|
1
|
+
import type { GridColumn } from '../model/gridTypes.unbound.js';
|
|
2
2
|
export declare const DEFAULT_FLEX_MIN_WIDTH = 50;
|
|
3
3
|
export declare const isFlexingColumn: <T>(column: GridColumn<T>) => boolean;
|
|
4
4
|
export declare const computeCenterFlexWidths: <T>(centerColumns: GridColumn<T>[], columnWidths: Record<string, number>, availableWidth: number) => Record<string, number>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./columnFlex.cjs");var t=(t,n,r)=>{let i=Object.keys(t);if(i.length===0)return t;let a=new Map;for(let e of n??[])a.set(e.key,e);let o=new Map;for(let e of r)o.set(e.key,e);let s=!1,c={};for(let n of i){let r=t[n],i=o.get(n);if(i===void 0){s=!0;continue}let l=a.get(n);if(l!==void 0){let t=e.isFlexingColumn(l)!==e.isFlexingColumn(i)||(l.flex??void 0)!==(i.flex??void 0),n=l.width!==i.width&&i.width!==r;if(t||n){s=!0;continue}}c[n]=r}return s?c:t};exports.reconcileColumnWidths=t;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { isFlexingColumn as e } from "./columnFlex.js";
|
|
2
|
+
//#region src/logic/columnWidthState.ts
|
|
3
|
+
var t = (t, n, r) => {
|
|
4
|
+
let i = Object.keys(t);
|
|
5
|
+
if (i.length === 0) return t;
|
|
6
|
+
let a = /* @__PURE__ */ new Map();
|
|
7
|
+
for (let e of n ?? []) a.set(e.key, e);
|
|
8
|
+
let o = /* @__PURE__ */ new Map();
|
|
9
|
+
for (let e of r) o.set(e.key, e);
|
|
10
|
+
let s = !1, c = {};
|
|
11
|
+
for (let n of i) {
|
|
12
|
+
let r = t[n], i = o.get(n);
|
|
13
|
+
if (i === void 0) {
|
|
14
|
+
s = !0;
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
let l = a.get(n);
|
|
18
|
+
if (l !== void 0) {
|
|
19
|
+
let t = e(l) !== e(i) || (l.flex ?? void 0) !== (i.flex ?? void 0), n = l.width !== i.width && i.width !== r;
|
|
20
|
+
if (t || n) {
|
|
21
|
+
s = !0;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
c[n] = r;
|
|
26
|
+
}
|
|
27
|
+
return s ? c : t;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { t as reconcileColumnWidths };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GridColumn, GridSelection } from '../model/gridTypes.unbound';
|
|
1
|
+
import type { GridColumn, GridSelection } from '../model/gridTypes.unbound.js';
|
|
2
2
|
export declare const resolveContextMenuColIndex: <T>(orderedColumns: GridColumn<T>[], columnKey: string) => number;
|
|
3
3
|
export declare const isContextMenuCellSelected: (selection: GridSelection, rowIndex: number, colIndex: number) => boolean;
|
|
4
4
|
export declare const isContextMenuRowSelected: (selection: GridSelection, rowIndex: number) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DateFilterPreset, ParsedDateFilter } from '../model/gridTypes.unbound';
|
|
2
|
-
import { type NormalizedDateFilterPreset } from './dateFilterPresets';
|
|
1
|
+
import type { DateFilterPreset, ParsedDateFilter } from '../model/gridTypes.unbound.js';
|
|
2
|
+
import { type NormalizedDateFilterPreset } from './dateFilterPresets.js';
|
|
3
3
|
export type DateFilterOperator = 'range' | 'onOrAfter' | 'onOrBefore' | 'equals' | 'notEquals' | 'blank' | 'notBlank';
|
|
4
4
|
export type DateFilterConditionDraft = {
|
|
5
5
|
operator: DateFilterOperator;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DateFilterPreset, DateFilterPresetOption, DateFilterPresetRange } from '../model/gridTypes.unbound';
|
|
1
|
+
import type { DateFilterPreset, DateFilterPresetOption, DateFilterPresetRange } from '../model/gridTypes.unbound.js';
|
|
2
2
|
export type NormalizedDateFilterPreset = {
|
|
3
3
|
id: string;
|
|
4
4
|
label: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GridRowKey, RowModel } from '../model/gridTypes.unbound';
|
|
2
|
-
import type { DetailRowExtra, RowMetrics } from './verticalGeometry';
|
|
1
|
+
import type { GridRowKey, RowModel } from '../model/gridTypes.unbound.js';
|
|
2
|
+
import type { DetailRowExtra, RowMetrics } from './verticalGeometry.js';
|
|
3
3
|
export declare const DETAIL_TOGGLE_COLUMN_KEY = "__ssg_detail_toggle__";
|
|
4
4
|
export declare const DETAIL_TOGGLE_COLUMN_WIDTH = 28;
|
|
5
5
|
export declare const DEFAULT_DETAIL_ROW_HEIGHT = 200;
|
package/dist/logic/domGuards.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=e=>e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey,t=e=>e instanceof HTMLElement?e.closest(`input, textarea, select, button, [contenteditable="
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=e=>e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey,t=e=>e instanceof HTMLElement?e.closest(`input, textarea, select, button, [contenteditable]:not([contenteditable="false"])`)!==null:!1;exports.isPrintableKey=e,exports.shouldIgnoreGridKeydown=t;
|
package/dist/logic/domGuards.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/logic/domGuards.ts
|
|
2
|
-
var e = (e) => e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey, t = (e) => e instanceof HTMLElement ? e.closest("input, textarea, select, button, [contenteditable=\"
|
|
2
|
+
var e = (e) => e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey, t = (e) => e instanceof HTMLElement ? e.closest("input, textarea, select, button, [contenteditable]:not([contenteditable=\"false\"])") !== null : !1;
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as isPrintableKey, t as shouldIgnoreGridKeydown };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GridColumn } from '../model/gridTypes.unbound';
|
|
1
|
+
import type { GridColumn } from '../model/gridTypes.unbound.js';
|
|
2
2
|
export declare const toDateInputValue: (value: unknown) => string;
|
|
3
3
|
export declare const resolveCellParser: <T>(column: GridColumn<T>) => ((raw: string, row: T) => unknown);
|
|
4
4
|
export declare const parseCommittedValue: <T>(column: GridColumn<T>, committedValue: unknown, row: T) => unknown;
|