beautiful-grid 1.0.15 → 1.0.16

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/README.md CHANGED
@@ -662,6 +662,7 @@ Cell range selection and clipboard copy/paste are enabled by default.
662
662
  rowKey='id'
663
663
  cellSelectionOptions={{
664
664
  enabled: true,
665
+ multiSelectFocusMode: 'first',
665
666
  clearOnEscape: true,
666
667
  clearOnOutsideClick: true,
667
668
  maxClipboardCells: 100000,
@@ -677,6 +678,7 @@ Cell range selection and clipboard copy/paste are enabled by default.
677
678
 
678
679
  - `Ctrl+C` / `Cmd+C`: Copies selected cells as Tab-separated (`\t`) values and CRLF (`\r\n`) lines, directly pasteable into Excel or Google Sheets.
679
680
  - `Ctrl+V` / `Cmd+V`: Pastes clipboard matrix starting from the focused cell across editable columns.
681
+ - `multiSelectFocusMode: 'last'` makes the last cell selected by a drag the active cell and the paste starting point. The default is `'first'` for backward compatibility.
680
682
  - Customize copied text on a per-column basis with `getClipboardText: ({ value, values }) => string`.
681
683
 
682
684
  ---
@@ -1118,7 +1120,7 @@ Below is a categorized reference of `<BGrid>` props. For exact TypeScript types,
1118
1120
  | `onChangeData` | `(index, columnIndex, item, column, meta) => void` | - | Callback fired after a cell edit commits. |
1119
1121
  | `onClick` | `(params: BGridClickParams<T>) => void` | - | Cell click callback. |
1120
1122
  | `cellNavigationOptions` | `BGridCellNavigationOptions` | - | Active cell focus, arrow key navigation, and repeat options. |
1121
- | `cellSelectionOptions` | `BGridCellSelectionOptions` | - | Range drag selection and clipboard copy/paste options. |
1123
+ | `cellSelectionOptions` | `BGridCellSelectionOptions` | - | Range drag selection, active-cell focus, and clipboard copy/paste options. |
1122
1124
 
1123
1125
  #### Additional Features & Overlays
1124
1126
 
@@ -386,7 +386,7 @@ function CellTextEditorGateway(_a) {
386
386
  event.preventDefault();
387
387
  void commit(event.shiftKey ? 'prev' : 'next');
388
388
  }
389
- }, onBlur: function (event) {
389
+ }, onBlur: function () {
390
390
  if (!cellEditSession || !isTextEditing)
391
391
  return;
392
392
  if (composingRef.current) {
@@ -80,7 +80,6 @@ function ColResizer(_a) {
80
80
  var setColumnResizing = (0, store_1.useAppStore)(function (s) { return s.setColumnResizing; });
81
81
  var endCellEdit = (0, store_1.useAppStore)(function (s) { return s.endCellEdit; });
82
82
  var disabled = (0, store_1.useAppStore)(function (s) { return s.disabled; });
83
- var columnsGroup = (0, store_1.useAppStore)(function (s) { return s.columnsGroup; });
84
83
  var onPointerDownResizerHandle = React.useCallback(function (evt, columnIndex) {
85
84
  var _a, _b;
86
85
  if (disabled)
@@ -48,7 +48,7 @@ var React = __importStar(require("react"));
48
48
  var shallow_1 = require("zustand/react/shallow");
49
49
  var store_1 = require("../store");
50
50
  var number_1 = require("../utils/number");
51
- function Pagination(props) {
51
+ function Pagination() {
52
52
  var _a;
53
53
  // [Selector Group 1] Pagination State - 페이지네이션 상태
54
54
  var _b = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
@@ -165,16 +165,17 @@ var LazyGridOptionalSurfaces = React.lazy(function () {
165
165
  function Table(props) {
166
166
  var _a;
167
167
  var _this = this;
168
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
168
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
169
169
  var store = (0, store_1.useAppStoreApi)();
170
170
  var cellSelectionOptions = props.cellSelectionOptions, onChangeData = props.onChangeData, sourceIndexByVisibleIndex = props.sourceIndexByVisibleIndex;
171
171
  var cellSelectionEnabled = (_b = cellSelectionOptions === null || cellSelectionOptions === void 0 ? void 0 : cellSelectionOptions.enabled) !== null && _b !== void 0 ? _b : true;
172
+ var multiSelectFocusMode = (_c = cellSelectionOptions === null || cellSelectionOptions === void 0 ? void 0 : cellSelectionOptions.multiSelectFocusMode) !== null && _c !== void 0 ? _c : 'first';
172
173
  var rowKeyRegistryState = (0, react_1.useRef)({
173
- sourceData: (_c = props.sourceData) !== null && _c !== void 0 ? _c : props.data,
174
+ sourceData: (_d = props.sourceData) !== null && _d !== void 0 ? _d : props.data,
174
175
  rowKey: props.rowKey,
175
176
  registry: (0, TableBody_1.createRowKeyRegistry)(),
176
177
  });
177
- var currentSourceData = (_d = props.sourceData) !== null && _d !== void 0 ? _d : props.data;
178
+ var currentSourceData = (_e = props.sourceData) !== null && _e !== void 0 ? _e : props.data;
178
179
  if (rowKeyRegistryState.current.sourceData !== currentSourceData ||
179
180
  rowKeyRegistryState.current.rowKey !== props.rowKey) {
180
181
  rowKeyRegistryState.current = {
@@ -185,7 +186,7 @@ function Table(props) {
185
186
  }
186
187
  var rowKeyRegistry = rowKeyRegistryState.current.registry;
187
188
  // [Selector Group 1] Layout & Dimensions - 레이아웃 차원
188
- var _9 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
189
+ var _10 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
189
190
  width: s.width,
190
191
  height: s.height,
191
192
  containerBorderWidth: s.containerBorderWidth,
@@ -193,31 +194,29 @@ function Table(props) {
193
194
  style: s.style,
194
195
  itemHeight: s.itemHeight,
195
196
  itemPadding: s.itemPadding,
196
- }); })), width = _9.width, height = _9.height, containerBorderWidth = _9.containerBorderWidth, className = _9.className, style = _9.style, itemHeight = _9.itemHeight, itemPadding = _9.itemPadding;
197
+ }); })), width = _10.width, height = _10.height, containerBorderWidth = _10.containerBorderWidth, className = _10.className, style = _10.style, itemHeight = _10.itemHeight, itemPadding = _10.itemPadding;
197
198
  // [Selector Group 2] Header, Footer, Summary - 헤더/푸터/요약
198
- var _10 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
199
+ var _11 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
199
200
  headerHeight: s.headerHeight,
200
- footerHeight: s.footerHeight,
201
201
  bottomBarHeight: s.bottomBarHeight,
202
202
  summaryHeight: s.summaryHeight,
203
- summaryRowHeight: s.summaryRowHeight,
204
- }); })), headerHeight = _10.headerHeight, footerHeight = _10.footerHeight, bottomBarHeight = _10.bottomBarHeight, summaryHeight = _10.summaryHeight, summaryRowHeight = _10.summaryRowHeight;
203
+ }); })), headerHeight = _11.headerHeight, bottomBarHeight = _11.bottomBarHeight, summaryHeight = _11.summaryHeight;
205
204
  // [Selector Group 3] Scroll State - 스크롤 상태
206
- var _11 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
205
+ var _12 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
207
206
  scrollLeft: s.scrollLeft,
208
207
  scrollTop: s.scrollTop,
209
- }); })), scrollLeft = _11.scrollLeft, scrollTop = _11.scrollTop;
208
+ }); })), scrollLeft = _12.scrollLeft, scrollTop = _12.scrollTop;
210
209
  // [Selector Group 4] Content, Columns, Data - 컨텐츠 관련
211
- var _12 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
210
+ var _13 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
212
211
  contentBodyHeight: s.contentBodyHeight,
213
212
  columns: s.columns,
214
213
  data: s.data,
215
214
  frozenColumnsWidth: s.frozenColumnsWidth,
216
215
  frozenRowCount: s.frozenRowCount,
217
216
  frozenRowsHeight: s.frozenRowsHeight,
218
- }); })), contentBodyHeight = _12.contentBodyHeight, columns = _12.columns, data = _12.data, frozenColumnsWidth = _12.frozenColumnsWidth, frozenRowCount = _12.frozenRowCount, frozenRowsHeight = _12.frozenRowsHeight;
217
+ }); })), contentBodyHeight = _13.contentBodyHeight, columns = _13.columns, data = _13.data, frozenColumnsWidth = _13.frozenColumnsWidth, frozenRowCount = _13.frozenRowCount, frozenRowsHeight = _13.frozenRowsHeight;
219
218
  // [Selector Group 4-1] Cell selection & navigation - 셀 선택 및 내비게이션
220
- var _13 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
219
+ var _14 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
221
220
  cellSelectionRange: s.cellSelectionRange,
222
221
  cellSelectionRanges: s.cellSelectionRanges,
223
222
  activeCell: s.activeCell,
@@ -226,9 +225,9 @@ function Table(props) {
226
225
  editItemIndex: s.editItemIndex,
227
226
  editable: s.editable,
228
227
  handleClick: s.handleClick,
229
- }); })), cellSelectionRange = _13.cellSelectionRange, cellSelectionRanges = _13.cellSelectionRanges, activeCell = _13.activeCell, activeCellHost = _13.activeCellHost, cellNavigationOptions = _13.cellNavigationOptions, editItemIndex = _13.editItemIndex, editable = _13.editable, handleClick = _13.handleClick;
228
+ }); })), cellSelectionRange = _14.cellSelectionRange, cellSelectionRanges = _14.cellSelectionRanges, activeCell = _14.activeCell, activeCellHost = _14.activeCellHost, cellNavigationOptions = _14.cellNavigationOptions, editItemIndex = _14.editItemIndex, editable = _14.editable, handleClick = _14.handleClick;
230
229
  // [Selector Group 5] State - 상태
231
- var _14 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
230
+ var _15 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
232
231
  rowChecked: s.rowChecked,
233
232
  page: s.page,
234
233
  loading: s.loading,
@@ -239,8 +238,8 @@ function Table(props) {
239
238
  scrollbar: s.scrollbar,
240
239
  status: s.status,
241
240
  pagination: s.pagination,
242
- }); })), rowChecked = _14.rowChecked, page = _14.page, loading = _14.loading, spinning = _14.spinning, disabled = _14.disabled, showLineNumber = _14.showLineNumber, summary = _14.summary, scrollbar = _14.scrollbar, status = _14.status, pagination = _14.pagination;
243
- var _15 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
241
+ }); })), rowChecked = _15.rowChecked, page = _15.page, loading = _15.loading, spinning = _15.spinning, disabled = _15.disabled, showLineNumber = _15.showLineNumber, summary = _15.summary, scrollbar = _15.scrollbar, status = _15.status, pagination = _15.pagination;
242
+ var _16 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
244
243
  searchOpen: s.searchOpen,
245
244
  searchOptions: s.searchOptions,
246
245
  contextMenuOptions: s.contextMenuOptions,
@@ -249,9 +248,9 @@ function Table(props) {
249
248
  storeSourceIndexByVisibleIndex: s.sourceIndexByVisibleIndex,
250
249
  storeRowKey: s.rowKey,
251
250
  cellInteractionSession: s.cellInteractionSession,
252
- }); })), searchOpen = _15.searchOpen, searchOptions = _15.searchOptions, contextMenuOptions = _15.contextMenuOptions, activeSearchMatchIndex = _15.activeSearchMatchIndex, searchMatches = _15.searchMatches, storeSourceIndexByVisibleIndex = _15.storeSourceIndexByVisibleIndex, storeRowKey = _15.storeRowKey, cellInteractionSession = _15.cellInteractionSession;
251
+ }); })), searchOpen = _16.searchOpen, searchOptions = _16.searchOptions, contextMenuOptions = _16.contextMenuOptions, activeSearchMatchIndex = _16.activeSearchMatchIndex, searchMatches = _16.searchMatches, storeSourceIndexByVisibleIndex = _16.storeSourceIndexByVisibleIndex, storeRowKey = _16.storeRowKey, cellInteractionSession = _16.cellInteractionSession;
253
252
  // [Selector Group 6] State Setters - 차원 설정자
254
- var _16 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
253
+ var _17 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
255
254
  setHeight: s.setHeight,
256
255
  setWidth: s.setWidth,
257
256
  setContentBodyHeight: s.setContentBodyHeight,
@@ -266,9 +265,9 @@ function Table(props) {
266
265
  setLoading: s.setLoading,
267
266
  setSpinning: s.setSpinning,
268
267
  setDisabled: s.setDisabled,
269
- }); })), setHeight = _16.setHeight, setWidth = _16.setWidth, setContentBodyHeight = _16.setContentBodyHeight, setDisplayItemCount = _16.setDisplayItemCount, setHeaderHeight = _16.setHeaderHeight, setFooterHeight = _16.setFooterHeight, setBottomBarHeight = _16.setBottomBarHeight, setSummaryHeight = _16.setSummaryHeight, setSummaryRowHeight = _16.setSummaryRowHeight, setItemHeight = _16.setItemHeight, setItemPadding = _16.setItemPadding, setLoading = _16.setLoading, setSpinning = _16.setSpinning, setDisabled = _16.setDisabled;
268
+ }); })), setHeight = _17.setHeight, setWidth = _17.setWidth, setContentBodyHeight = _17.setContentBodyHeight, setDisplayItemCount = _17.setDisplayItemCount, setHeaderHeight = _17.setHeaderHeight, setFooterHeight = _17.setFooterHeight, setBottomBarHeight = _17.setBottomBarHeight, setSummaryHeight = _17.setSummaryHeight, setSummaryRowHeight = _17.setSummaryRowHeight, setItemHeight = _17.setItemHeight, setItemPadding = _17.setItemPadding, setLoading = _17.setLoading, setSpinning = _17.setSpinning, setDisabled = _17.setDisabled;
270
269
  // [Selector Group 7] Data & Column Setters - 데이터/열 설정자
271
- var _17 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
270
+ var _18 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
272
271
  setData: s.setData,
273
272
  setSourceData: s.setSourceData,
274
273
  setProcessedData: s.setProcessedData,
@@ -279,9 +278,9 @@ function Table(props) {
279
278
  setFrozenColumnIndex: s.setFrozenColumnIndex,
280
279
  setFrozenRowCount: s.setFrozenRowCount,
281
280
  setFrozenRowsHeight: s.setFrozenRowsHeight,
282
- }); })), setData = _17.setData, setSourceData = _17.setSourceData, setProcessedData = _17.setProcessedData, setColumns = _17.setColumns, setColumnsGroup = _17.setColumnsGroup, setColumnGroups = _17.setColumnGroups, setFrozenColumnsWidth = _17.setFrozenColumnsWidth, setFrozenColumnIndex = _17.setFrozenColumnIndex, setFrozenRowCount = _17.setFrozenRowCount, setFrozenRowsHeight = _17.setFrozenRowsHeight;
281
+ }); })), setData = _18.setData, setSourceData = _18.setSourceData, setProcessedData = _18.setProcessedData, setColumns = _18.setColumns, setColumnsGroup = _18.setColumnsGroup, setColumnGroups = _18.setColumnGroups, setFrozenColumnsWidth = _18.setFrozenColumnsWidth, setFrozenColumnIndex = _18.setFrozenColumnIndex, setFrozenRowCount = _18.setFrozenRowCount, setFrozenRowsHeight = _18.setFrozenRowsHeight;
283
282
  // [Selector Group 8] Row & Sort Setters - 행/정렬 설정자
284
- var _18 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
283
+ var _19 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
285
284
  setRowChecked: s.setRowChecked,
286
285
  setCheckedIndexesMap: s.setCheckedIndexesMap,
287
286
  setSort: s.setSort,
@@ -299,9 +298,9 @@ function Table(props) {
299
298
  requestSearchOpen: s.requestSearchOpen,
300
299
  openContextMenu: s.openContextMenu,
301
300
  commitCheckboxCell: s.commitCheckboxCell,
302
- }); })), setRowChecked = _18.setRowChecked, setCheckedIndexesMap = _18.setCheckedIndexesMap, setSort = _18.setSort, setSortParams = _18.setSortParams, setDataQuery = _18.setDataQuery, setDataControl = _18.setDataControl, setIcons = _18.setIcons, setColumnVisibilityState = _18.setColumnVisibilityState, setActiveToolbox = _18.setActiveToolbox, setRowKey = _18.setRowKey, setFocusedRowKey = _18.setFocusedRowKey, setEditItem = _18.setEditItem, setSearchOptions = _18.setSearchOptions, setContextMenuOptions = _18.setContextMenuOptions, requestSearchOpen = _18.requestSearchOpen, openContextMenu = _18.openContextMenu, commitCheckboxCell = _18.commitCheckboxCell;
301
+ }); })), setRowChecked = _19.setRowChecked, setCheckedIndexesMap = _19.setCheckedIndexesMap, setSort = _19.setSort, setSortParams = _19.setSortParams, setDataQuery = _19.setDataQuery, setDataControl = _19.setDataControl, setIcons = _19.setIcons, setColumnVisibilityState = _19.setColumnVisibilityState, setActiveToolbox = _19.setActiveToolbox, setRowKey = _19.setRowKey, setFocusedRowKey = _19.setFocusedRowKey, setEditItem = _19.setEditItem, setSearchOptions = _19.setSearchOptions, setContextMenuOptions = _19.setContextMenuOptions, requestSearchOpen = _19.requestSearchOpen, openContextMenu = _19.openContextMenu, commitCheckboxCell = _19.commitCheckboxCell;
303
302
  // [Selector Group 9] Pagination & Display Setters - 페이지/표시 설정자
304
- var _19 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
303
+ var _20 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
305
304
  setPage: s.setPage,
306
305
  setDisplayPaginationLength: s.setDisplayPaginationLength,
307
306
  setShowLineNumber: s.setShowLineNumber,
@@ -317,9 +316,9 @@ function Table(props) {
317
316
  setScrollbar: s.setScrollbar,
318
317
  setStatus: s.setStatus,
319
318
  setPagination: s.setPagination,
320
- }); })), setPage = _19.setPage, setDisplayPaginationLength = _19.setDisplayPaginationLength, setShowLineNumber = _19.setShowLineNumber, setMsg = _19.setMsg, setRowClassName = _19.setRowClassName, setCellMergeOptions = _19.setCellMergeOptions, setVariant = _19.setVariant, setSummary = _19.setSummary, setColumnSortable = _19.setColumnSortable, setReorder = _19.setReorder, setClassName = _19.setClassName, setStyle = _19.setStyle, setScrollbar = _19.setScrollbar, setStatus = _19.setStatus, setPagination = _19.setPagination;
319
+ }); })), setPage = _20.setPage, setDisplayPaginationLength = _20.setDisplayPaginationLength, setShowLineNumber = _20.setShowLineNumber, setMsg = _20.setMsg, setRowClassName = _20.setRowClassName, setCellMergeOptions = _20.setCellMergeOptions, setVariant = _20.setVariant, setSummary = _20.setSummary, setColumnSortable = _20.setColumnSortable, setReorder = _20.setReorder, setClassName = _20.setClassName, setStyle = _20.setStyle, setScrollbar = _20.setScrollbar, setStatus = _20.setStatus, setPagination = _20.setPagination;
321
320
  // [Selector Group 10] Edit & Event Setters - 편집/이벤트 설정자
322
- var _20 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
321
+ var _21 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
323
322
  setEditable: s.setEditable,
324
323
  setEditTrigger: s.setEditTrigger,
325
324
  setOnClick: s.setOnClick,
@@ -328,8 +327,8 @@ function Table(props) {
328
327
  setOnLoadMore: s.setOnLoadMore,
329
328
  setScroll: s.setScroll,
330
329
  setInitialized: s.setInitialized,
331
- }); })), setEditable = _20.setEditable, setEditTrigger = _20.setEditTrigger, setOnClick = _20.setOnClick, setOnChangeColumns = _20.setOnChangeColumns, setOnChangeData = _20.setOnChangeData, setOnLoadMore = _20.setOnLoadMore, setScroll = _20.setScroll, setInitialized = _20.setInitialized;
332
- var _21 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
330
+ }); })), setEditable = _21.setEditable, setEditTrigger = _21.setEditTrigger, setOnClick = _21.setOnClick, setOnChangeColumns = _21.setOnChangeColumns, setOnChangeData = _21.setOnChangeData, setOnLoadMore = _21.setOnLoadMore, setScroll = _21.setScroll, setInitialized = _21.setInitialized;
331
+ var _22 = (0, store_1.useAppStore)((0, shallow_1.useShallow)(function (s) { return ({
333
332
  setCellSelectionRanges: s.setCellSelectionRanges,
334
333
  setCellSelecting: s.setCellSelecting,
335
334
  clearCellSelection: s.clearCellSelection,
@@ -337,7 +336,7 @@ function Table(props) {
337
336
  moveActiveCell: s.moveActiveCell,
338
337
  setCellNavigationOptions: s.setCellNavigationOptions,
339
338
  syncActiveCellToBounds: s.syncActiveCellToBounds,
340
- }); })), setCellSelectionRanges = _21.setCellSelectionRanges, setCellSelecting = _21.setCellSelecting, clearCellSelection = _21.clearCellSelection, setActiveCell = _21.setActiveCell, moveActiveCell = _21.moveActiveCell, setCellNavigationOptions = _21.setCellNavigationOptions, syncActiveCellToBounds = _21.syncActiveCellToBounds;
339
+ }); })), setCellSelectionRanges = _22.setCellSelectionRanges, setCellSelecting = _22.setCellSelecting, clearCellSelection = _22.clearCellSelection, setActiveCell = _22.setActiveCell, moveActiveCell = _22.moveActiveCell, setCellNavigationOptions = _22.setCellNavigationOptions, syncActiveCellToBounds = _22.syncActiveCellToBounds;
341
340
  var trHeight = itemHeight + itemPadding * 2;
342
341
  var rowHeightMetrics = props.rowHeightMetrics;
343
342
  var variableRowOffsets = rowHeightMetrics.variable ? rowHeightMetrics.offsets : undefined;
@@ -362,7 +361,7 @@ function Table(props) {
362
361
  enabled: scrollbar.variant !== 'native',
363
362
  });
364
363
  }, [effectiveBodyHeight, logicalBodyContentHeight, scrollbar.variant]);
365
- var _22 = __read(React.useState(0), 2), virtualScrollBase = _22[0], setVirtualScrollBase = _22[1];
364
+ var _23 = __read(React.useState(0), 2), virtualScrollBase = _23[0], setVirtualScrollBase = _23[1];
366
365
  var virtualScrollBaseRef = (0, react_1.useRef)(0);
367
366
  var containerRef = (0, react_1.useRef)(null);
368
367
  var searchPopoverRef = (0, react_1.useRef)(null);
@@ -492,7 +491,7 @@ function Table(props) {
492
491
  }, [
493
492
  data.length,
494
493
  frozenRowCount,
495
- (_e = props.reorder) === null || _e === void 0 ? void 0 : _e.enabled,
494
+ (_f = props.reorder) === null || _f === void 0 ? void 0 : _f.enabled,
496
495
  scrollOverscanRows,
497
496
  scrollTop,
498
497
  scrollableBodyHeight,
@@ -681,7 +680,7 @@ function Table(props) {
681
680
  var latestCommittedScrollRef = (0, react_1.useRef)({ top: scrollTop, left: scrollLeft });
682
681
  var scrollPropsRef = (0, react_1.useRef)({ top: props.scrollTop, left: props.scrollLeft });
683
682
  var syncedDataPropRef = (0, react_1.useRef)(props.data);
684
- var _23 = __read(React.useState(null), 2), rowScrollRequest = _23[0], setRowScrollRequest = _23[1];
683
+ var _24 = __read(React.useState(null), 2), rowScrollRequest = _24[0], setRowScrollRequest = _24[1];
685
684
  var sourceColumnsRef = (0, react_1.useRef)(props.sourceColumns);
686
685
  sourceColumnsRef.current = props.sourceColumns;
687
686
  var getCurrentExportData = (0, react_1.useCallback)(function (options) {
@@ -732,7 +731,7 @@ function Table(props) {
732
731
  var selectionMetricsRef = (0, react_1.useRef)({
733
732
  columns: columns,
734
733
  dataLength: data.length,
735
- frozenColumnIndex: (_f = props.frozenColumnIndex) !== null && _f !== void 0 ? _f : 0,
734
+ frozenColumnIndex: (_g = props.frozenColumnIndex) !== null && _g !== void 0 ? _g : 0,
736
735
  frozenRowCount: frozenRowCount,
737
736
  frozenColumnsWidth: frozenColumnsWidth !== null && frozenColumnsWidth !== void 0 ? frozenColumnsWidth : 0,
738
737
  frozenRowsHeight: frozenRowsHeight,
@@ -921,6 +920,12 @@ function Table(props) {
921
920
  var logicalCell = (0, utils_1.resolveLogicalCell)(data, props.cellMergeOptions, cellPosition);
922
921
  return __assign(__assign({}, logicalCell.cell), { rowSpan: logicalCell.rowIndexes.length });
923
922
  }, [data, props.cellMergeOptions]);
923
+ var focusLastSelectedCell = (0, react_1.useCallback)(function (cellPosition, hostCell) {
924
+ if (hostCell === void 0) { hostCell = cellPosition; }
925
+ if (multiSelectFocusMode !== 'last')
926
+ return;
927
+ setActiveCell({ rowIndex: cellPosition.rowIndex, columnIndex: cellPosition.columnIndex }, { rowIndex: hostCell.rowIndex, columnIndex: hostCell.columnIndex });
928
+ }, [multiSelectFocusMode, setActiveCell]);
924
929
  var updateAxisSelectionByTarget = (0, react_1.useCallback)(function (target) {
925
930
  var dragState = axisSelectionDragRef.current;
926
931
  if (!dragState)
@@ -953,6 +958,7 @@ function Table(props) {
953
958
  var physicalCellPosition = getCellPosition(target, containerRef.current);
954
959
  var cellPosition = physicalCellPosition ? toLogicalCellPosition(physicalCellPosition) : undefined;
955
960
  if (cellSelectionEnabled && cellSelectionDragRef.current && cellPosition) {
961
+ focusLastSelectedCell(cellPosition, physicalCellPosition !== null && physicalCellPosition !== void 0 ? physicalCellPosition : cellPosition);
956
962
  setCellSelectionRanges(updateSelectionDragRange(cellSelectionDragRef.current, getRangeFromDrag(cellSelectionDragRef.current, cellPosition)));
957
963
  }
958
964
  var targetGrid = target === null || target === void 0 ? void 0 : target.closest('[role="grid"], [role="treegrid"]');
@@ -978,6 +984,7 @@ function Table(props) {
978
984
  cellSelectionEnabled,
979
985
  clearHoveredRow,
980
986
  disabled,
987
+ focusLastSelectedCell,
981
988
  setCellSelectionRanges,
982
989
  setHoveredRows,
983
990
  toLogicalCellPosition,
@@ -1129,8 +1136,9 @@ function Table(props) {
1129
1136
  if (!cellPosition)
1130
1137
  return;
1131
1138
  var logicalCellPosition = toLogicalCellPosition(cellPosition);
1139
+ focusLastSelectedCell(logicalCellPosition, cellPosition);
1132
1140
  setCellSelectionRanges(updateSelectionDragRange(dragState, getRangeFromDrag(dragState, logicalCellPosition)));
1133
- }, [setCellSelectionRanges, toLogicalCellPosition]);
1141
+ }, [focusLastSelectedCell, setCellSelectionRanges, toLogicalCellPosition]);
1134
1142
  var runSelectionAutoScroll = (0, react_1.useCallback)(function () {
1135
1143
  selectionAutoScrollRafRef.current = null;
1136
1144
  var dragState = cellSelectionDragRef.current;
@@ -1642,7 +1650,7 @@ function Table(props) {
1642
1650
  setFrozenColumnIndex((_d = props.frozenColumnIndex) !== null && _d !== void 0 ? _d : 0);
1643
1651
  }, [
1644
1652
  props.frozenColumnIndex,
1645
- (_g = props.reorder) === null || _g === void 0 ? void 0 : _g.enabled,
1653
+ (_h = props.reorder) === null || _h === void 0 ? void 0 : _h.enabled,
1646
1654
  showLineNumber,
1647
1655
  rowChecked,
1648
1656
  itemHeight,
@@ -1660,7 +1668,7 @@ function Table(props) {
1660
1668
  setFrozenRowsHeight((_d = rowHeightMetrics.offsets[nextFrozenRowCount]) !== null && _d !== void 0 ? _d : nextFrozenRowCount * trHeight);
1661
1669
  }, [
1662
1670
  data.length,
1663
- (_h = props.data) === null || _h === void 0 ? void 0 : _h.length,
1671
+ (_j = props.data) === null || _j === void 0 ? void 0 : _j.length,
1664
1672
  props.frozenRowCount,
1665
1673
  rowHeightMetrics,
1666
1674
  setFrozenRowCount,
@@ -1757,23 +1765,23 @@ function Table(props) {
1757
1765
  }
1758
1766
  }, [
1759
1767
  props.page,
1760
- (_j = props.page) === null || _j === void 0 ? void 0 : _j.currentPage,
1761
- (_k = props.page) === null || _k === void 0 ? void 0 : _k.loading,
1762
- (_l = props.page) === null || _l === void 0 ? void 0 : _l.pageSize,
1763
- (_m = props.page) === null || _m === void 0 ? void 0 : _m.totalPages,
1764
- (_o = props.page) === null || _o === void 0 ? void 0 : _o.totalElements,
1765
- (_p = props.page) === null || _p === void 0 ? void 0 : _p.onChange,
1766
- (_q = props.page) === null || _q === void 0 ? void 0 : _q.displayPaginationLength,
1768
+ (_k = props.page) === null || _k === void 0 ? void 0 : _k.currentPage,
1769
+ (_l = props.page) === null || _l === void 0 ? void 0 : _l.loading,
1770
+ (_m = props.page) === null || _m === void 0 ? void 0 : _m.pageSize,
1771
+ (_o = props.page) === null || _o === void 0 ? void 0 : _o.totalPages,
1772
+ (_p = props.page) === null || _p === void 0 ? void 0 : _p.totalElements,
1773
+ (_q = props.page) === null || _q === void 0 ? void 0 : _q.onChange,
1774
+ (_r = props.page) === null || _r === void 0 ? void 0 : _r.displayPaginationLength,
1767
1775
  setPage,
1768
1776
  setDisplayPaginationLength,
1769
1777
  ]);
1770
- var previousPageRef = (0, react_1.useRef)((_r = props.page) === null || _r === void 0 ? void 0 : _r.currentPage);
1778
+ var previousPageRef = (0, react_1.useRef)((_s = props.page) === null || _s === void 0 ? void 0 : _s.currentPage);
1771
1779
  (0, react_1.useEffect)(function () {
1772
1780
  var _a, _b;
1773
1781
  if (previousPageRef.current !== ((_a = props.page) === null || _a === void 0 ? void 0 : _a.currentPage))
1774
1782
  resetScrollPosition('top');
1775
1783
  previousPageRef.current = (_b = props.page) === null || _b === void 0 ? void 0 : _b.currentPage;
1776
- }, [resetScrollPosition, (_s = props.page) === null || _s === void 0 ? void 0 : _s.currentPage]);
1784
+ }, [resetScrollPosition, (_t = props.page) === null || _t === void 0 ? void 0 : _t.currentPage]);
1777
1785
  // [Group 8] Row key & selection
1778
1786
  (0, react_1.useEffect)(function () {
1779
1787
  setRowKey(props.rowKey);
@@ -1849,10 +1857,10 @@ function Table(props) {
1849
1857
  }, [
1850
1858
  columns.length,
1851
1859
  data.length,
1852
- (_u = (_t = props.cellNavigationOptions) === null || _t === void 0 ? void 0 : _t.activeCell) === null || _u === void 0 ? void 0 : _u.columnIndex,
1853
- (_w = (_v = props.cellNavigationOptions) === null || _v === void 0 ? void 0 : _v.activeCell) === null || _w === void 0 ? void 0 : _w.rowIndex,
1854
- (_y = (_x = props.cellNavigationOptions) === null || _x === void 0 ? void 0 : _x.defaultActiveCell) === null || _y === void 0 ? void 0 : _y.columnIndex,
1855
- (_0 = (_z = props.cellNavigationOptions) === null || _z === void 0 ? void 0 : _z.defaultActiveCell) === null || _0 === void 0 ? void 0 : _0.rowIndex,
1860
+ (_v = (_u = props.cellNavigationOptions) === null || _u === void 0 ? void 0 : _u.activeCell) === null || _v === void 0 ? void 0 : _v.columnIndex,
1861
+ (_x = (_w = props.cellNavigationOptions) === null || _w === void 0 ? void 0 : _w.activeCell) === null || _x === void 0 ? void 0 : _x.rowIndex,
1862
+ (_z = (_y = props.cellNavigationOptions) === null || _y === void 0 ? void 0 : _y.defaultActiveCell) === null || _z === void 0 ? void 0 : _z.columnIndex,
1863
+ (_1 = (_0 = props.cellNavigationOptions) === null || _0 === void 0 ? void 0 : _0.defaultActiveCell) === null || _1 === void 0 ? void 0 : _1.rowIndex,
1856
1864
  disabled,
1857
1865
  syncActiveCellToBounds,
1858
1866
  ]);
@@ -1987,8 +1995,8 @@ function Table(props) {
1987
1995
  endCellSelectionDrag();
1988
1996
  clearCellSelection();
1989
1997
  }, [cellSelectionEnabled, clearCellSelection, endCellSelectionDrag]);
1990
- var clearCellSelectionOnEscape = (_2 = (_1 = props.cellSelectionOptions) === null || _1 === void 0 ? void 0 : _1.clearOnEscape) !== null && _2 !== void 0 ? _2 : true;
1991
- var clearCellSelectionOnOutsideClick = (_4 = (_3 = props.cellSelectionOptions) === null || _3 === void 0 ? void 0 : _3.clearOnOutsideClick) !== null && _4 !== void 0 ? _4 : true;
1998
+ var clearCellSelectionOnEscape = (_3 = (_2 = props.cellSelectionOptions) === null || _2 === void 0 ? void 0 : _2.clearOnEscape) !== null && _3 !== void 0 ? _3 : true;
1999
+ var clearCellSelectionOnOutsideClick = (_5 = (_4 = props.cellSelectionOptions) === null || _4 === void 0 ? void 0 : _4.clearOnOutsideClick) !== null && _5 !== void 0 ? _5 : true;
1992
2000
  var keyboardRuntimeRef = (0, react_1.useRef)({
1993
2001
  activeCell: activeCell,
1994
2002
  cellInteractionSession: cellInteractionSession,
@@ -2007,7 +2015,7 @@ function Table(props) {
2007
2015
  editable: editable,
2008
2016
  editItemIndex: editItemIndex,
2009
2017
  endCellSelectionDrag: endCellSelectionDrag,
2010
- frozenColumnIndex: (_5 = props.frozenColumnIndex) !== null && _5 !== void 0 ? _5 : 0,
2018
+ frozenColumnIndex: (_6 = props.frozenColumnIndex) !== null && _6 !== void 0 ? _6 : 0,
2011
2019
  frozenRowCount: frozenRowCount,
2012
2020
  height: height,
2013
2021
  handleClick: handleClick,
@@ -2042,7 +2050,7 @@ function Table(props) {
2042
2050
  editable: editable,
2043
2051
  editItemIndex: editItemIndex,
2044
2052
  endCellSelectionDrag: endCellSelectionDrag,
2045
- frozenColumnIndex: (_6 = props.frozenColumnIndex) !== null && _6 !== void 0 ? _6 : 0,
2053
+ frozenColumnIndex: (_7 = props.frozenColumnIndex) !== null && _7 !== void 0 ? _7 : 0,
2046
2054
  frozenRowCount: frozenRowCount,
2047
2055
  height: height,
2048
2056
  handleClick: handleClick,
@@ -2493,7 +2501,7 @@ function Table(props) {
2493
2501
  if (gateway instanceof HTMLInputElement) {
2494
2502
  gateway.focus({ preventScroll: true });
2495
2503
  }
2496
- }, "data-scroll-variant": scrollbar.variant, "data-vertical-scrollbar": scrollbar.variant !== 'native' && scrollbar.vertical.visible ? 'visible' : 'hidden', "data-bgrid-cell-selection-enabled": cellSelectionEnabled ? 'true' : 'false', "data-bgrid-frozen-columns": ((_7 = props.frozenColumnIndex) !== null && _7 !== void 0 ? _7 : 0) > 0 ? 'true' : 'false', "data-bgrid-disabled": disabled ? 'true' : undefined, "data-bgrid-variable-row-height": rowHeightMetrics.variable ? 'true' : undefined },
2504
+ }, "data-scroll-variant": scrollbar.variant, "data-vertical-scrollbar": scrollbar.variant !== 'native' && scrollbar.vertical.visible ? 'visible' : 'hidden', "data-bgrid-cell-selection-enabled": cellSelectionEnabled ? 'true' : 'false', "data-bgrid-frozen-columns": ((_8 = props.frozenColumnIndex) !== null && _8 !== void 0 ? _8 : 0) > 0 ? 'true' : 'false', "data-bgrid-disabled": disabled ? 'true' : undefined, "data-bgrid-variable-row-height": rowHeightMetrics.variable ? 'true' : undefined },
2497
2505
  scrollbar.variant !== 'native' && scrollbar.vertical.visible && (React.createElement("div", { className: 'bgrid-vertical-scrollbar-gutter', "aria-hidden": 'true' })),
2498
2506
  scrollbar.variant !== 'native' && scrollbar.vertical.visible && (React.createElement("div", { className: 'bgrid-vertical-scrollbar-area', style: {
2499
2507
  top: 0,
@@ -2567,7 +2575,7 @@ function Table(props) {
2567
2575
  React.createElement(Summary, { style: { left: frozenColumnsWidth }, role: 'rfdg-summary' },
2568
2576
  React.createElement(TableSummary_1.TableSummary, { position: 'bottom' })))))),
2569
2577
  React.createElement(BodyViewport, { ref: bodyContainerRef, style: { top: stickyTopHeight, height: contentBodyHeight }, "data-last": !page ? 'true' : undefined },
2570
- ((_8 = rowReorderController.preview) === null || _8 === void 0 ? void 0 : _8.visible) && (React.createElement("div", { className: 'bgrid-row-reorder-preview', "data-bgrid-row-reorder-phase": rowReorderController.preview.phase, "aria-hidden": 'true' }, rowReorderController.preview.text)),
2578
+ ((_9 = rowReorderController.preview) === null || _9 === void 0 ? void 0 : _9.visible) && (React.createElement("div", { className: 'bgrid-row-reorder-preview', "data-bgrid-row-reorder-phase": rowReorderController.preview.phase, "aria-hidden": 'true' }, rowReorderController.preview.text)),
2571
2579
  React.createElement(Loading_1.default, { active: !!spinning, size: 'small' })),
2572
2580
  React.createElement("div", { className: 'bgrid-visually-hidden', role: 'status', "aria-live": 'polite', "aria-atomic": 'true' }, rowReorderController.announcement),
2573
2581
  React.createElement(CellTextEditorGateway_1.CellTextEditorGateway, { containerRef: containerRef }),
@@ -58,11 +58,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
58
58
  return (mod && mod.__esModule) ? mod : { "default": mod };
59
59
  };
60
60
  Object.defineProperty(exports, "__esModule", { value: true });
61
- exports.getVisibleColumnRange = getVisibleColumnRange;
62
61
  exports.createRowKeyRegistry = createRowKeyRegistry;
63
- exports.BodyTable = BodyTable;
64
- exports.TableBodyTr = TableBodyTr;
65
- exports.NoDataTr = NoDataTr;
66
62
  var React = __importStar(require("react"));
67
63
  var shallow_1 = require("zustand/react/shallow");
68
64
  var store_1 = require("../store");
@@ -305,17 +301,6 @@ function TableBody(_a) {
305
301
  React.createElement("td", { className: 'bgrid-empty-cell', colSpan: columns.slice(frozenColumnIndex).length }, msg.emptyList),
306
302
  React.createElement("td", { "data-none": true }))) : null))))));
307
303
  }
308
- function LineNumberTd(_a) {
309
- var bordered = _a.bordered, rowStatus = _a.rowStatus, rowIndex = _a.rowIndex, active = _a.active, className = _a.className, children = _a.children, rest = __rest(_a, ["bordered", "rowStatus", "rowIndex", "active", "className", "children"]);
310
- return (React.createElement("td", __assign({ className: [
311
- 'bgrid-line-number-cell',
312
- bordered ? 'bordered' : '',
313
- active ? 'bgrid-row-axis-active' : '',
314
- className !== null && className !== void 0 ? className : '',
315
- ]
316
- .filter(Boolean)
317
- .join(' '), "data-bgrid-row-status": rowStatus, "data-bgrid-axis-selectable": 'true', "data-bgrid-row-axis-active": active ? 'true' : undefined, "data-row-index": rowIndex }, rest), children));
318
- }
319
304
  function getRowStatusLabel(status) {
320
305
  if (status === types_1.BGridDataItemStatus.new)
321
306
  return 'I';
@@ -335,13 +320,6 @@ function BodyTable(_a) {
335
320
  .filter(Boolean)
336
321
  .join(' ') }, rest), children));
337
322
  }
338
- function TableBodyTr(_a) {
339
- var _b;
340
- var itemHeight = _a.itemHeight, itemPadding = _a.itemPadding, rowHeight = _a.rowHeight, active = _a.active, editable = _a.editable, odd = _a.odd, hasOnClick = _a.hasOnClick, className = _a.className, children = _a.children, style = _a.style, rest = __rest(_a, ["itemHeight", "itemPadding", "rowHeight", "active", "editable", "odd", "hasOnClick", "className", "children", "style"]);
341
- var clickable = !editable && hasOnClick;
342
- var rowClassName = ['bgrid-body-row', active ? 'bgrid-row-active' : '', className !== null && className !== void 0 ? className : ''].filter(Boolean).join(' ');
343
- return (React.createElement("tr", __assign({ className: rowClassName, "data-odd": odd ? 'true' : undefined, "data-clickable": clickable ? 'true' : undefined, style: __assign((_b = {}, _b['--bgrid-item-line-height'] = "".concat(itemHeight, "px"), _b['--bgrid-item-cell-height'] = "".concat(rowHeight !== null && rowHeight !== void 0 ? rowHeight : itemHeight + itemPadding * 2, "px"), _b), style) }, rest), children));
344
- }
345
323
  function NoDataTr(_a) {
346
324
  var _b;
347
325
  var children = _a.children, className = _a.className, itemHeight = _a.itemHeight, itemPadding = _a.itemPadding, style = _a.style, rest = __rest(_a, ["children", "className", "itemHeight", "itemPadding", "style"]);
@@ -94,7 +94,7 @@ var TreeContext_1 = require("./TreeContext");
94
94
  function TableBodyCellItemInner(_a) {
95
95
  var _this = this;
96
96
  var _b, _c, _d, _e;
97
- var ri = _a.ri, columnIndex = _a.columnIndex, column = _a.column, canonicalIndex = _a.canonicalIndex, canonicalItem = _a.canonicalItem, valueByRowKey = _a.valueByRowKey, editable = _a.editable, disabled = _a.disabled, editTrigger = _a.editTrigger, rowSpan = _a.rowSpan, isMerged = _a.isMerged, tdEditable = _a.tdEditable, cellEditable = _a.cellEditable, isLogicalEditing = _a.isLogicalEditing, isCheckboxEditor = _a.isCheckboxEditor, isSearchMatch = _a.isSearchMatch, isCurrentSearchMatch = _a.isCurrentSearchMatch, cellInteractionSession = _a.cellInteractionSession, handleClick = _a.handleClick, setEditItem = _a.setEditItem, setItemValue = _a.setItemValue, handleMoveEditFocus = _a.handleMoveEditFocus;
97
+ var ri = _a.ri, columnIndex = _a.columnIndex, column = _a.column, canonicalIndex = _a.canonicalIndex, canonicalItem = _a.canonicalItem, valueByRowKey = _a.valueByRowKey, editTrigger = _a.editTrigger, rowSpan = _a.rowSpan, isMerged = _a.isMerged, tdEditable = _a.tdEditable, cellEditable = _a.cellEditable, isLogicalEditing = _a.isLogicalEditing, isCheckboxEditor = _a.isCheckboxEditor, isSearchMatch = _a.isSearchMatch, isCurrentSearchMatch = _a.isCurrentSearchMatch, cellInteractionSession = _a.cellInteractionSession, handleClick = _a.handleClick, setEditItem = _a.setEditItem, setItemValue = _a.setItemValue, handleMoveEditFocus = _a.handleMoveEditFocus;
98
98
  var resolvedEditTrigger = (_c = (_b = column.editTrigger) !== null && _b !== void 0 ? _b : editTrigger) !== null && _c !== void 0 ? _c : 'dblclick';
99
99
  var edited = (0, utils_1.isCellEdited)(canonicalItem, column);
100
100
  var valueChanged = (0, utils_1.isCellValueChanged)(canonicalItem, column);
@@ -167,7 +167,7 @@ function TableBodyRowInner(_a) {
167
167
  var _b, _c;
168
168
  var _this = this;
169
169
  var _d;
170
- var item = _a.item, data = _a.data, ri = _a.ri, sourceIndex = _a.sourceIndex, columns = _a.columns, startCIdx = _a.startCIdx, endCIdx = _a.endCIdx, frozenColumnIndex = _a.frozenColumnIndex, isLeftRegion = _a.isLeftRegion, showLineNumber = _a.showLineNumber, hasRowChecked = _a.hasRowChecked, isRadio = _a.isRadio, checked = _a.checked, rowCheckedDisabled = _a.rowCheckedDisabled, rowStatus = _a.rowStatus, active = _a.active, className = _a.className, resolvedRowHeight = _a.resolvedRowHeight, itemHeight = _a.itemHeight, itemPadding = _a.itemPadding, editable = _a.editable, disabled = _a.disabled, editTrigger = _a.editTrigger, hasOnClick = _a.hasOnClick, cellMergeOptions = _a.cellMergeOptions, mergeColumns = _a.mergeColumns, odd = _a.odd, variant = _a.variant, rowReorderEnabled = _a.rowReorderEnabled, rowReorderRole = _a.rowReorderRole, rowReorderPhase = _a.rowReorderPhase, rowReorderDirection = _a.rowReorderDirection, rowReorderOffset = _a.rowReorderOffset, reorder = _a.reorder, reorderingInfo = _a.reorderingInfo, searchMatchTokens = _a.searchMatchTokens, currentSearchToken = _a.currentSearchToken, isRowEditing = _a.isRowEditing, cellInteractionSession = _a.cellInteractionSession, handleClick = _a.handleClick, setEditItem = _a.setEditItem, setItemValue = _a.setItemValue, handleMoveEditFocus = _a.handleMoveEditFocus, handleChangeChecked = _a.handleChangeChecked, handleChangeCheckedRadio = _a.handleChangeCheckedRadio, getRowSpan = _a.getRowSpan, onRowReorderPointerDown = _a.onRowReorderPointerDown, onRowReorderKeyDown = _a.onRowReorderKeyDown;
170
+ var item = _a.item, data = _a.data, ri = _a.ri, columns = _a.columns, startCIdx = _a.startCIdx, endCIdx = _a.endCIdx, frozenColumnIndex = _a.frozenColumnIndex, isLeftRegion = _a.isLeftRegion, showLineNumber = _a.showLineNumber, hasRowChecked = _a.hasRowChecked, isRadio = _a.isRadio, checked = _a.checked, rowCheckedDisabled = _a.rowCheckedDisabled, rowStatus = _a.rowStatus, active = _a.active, className = _a.className, resolvedRowHeight = _a.resolvedRowHeight, itemHeight = _a.itemHeight, editable = _a.editable, disabled = _a.disabled, editTrigger = _a.editTrigger, hasOnClick = _a.hasOnClick, cellMergeOptions = _a.cellMergeOptions, mergeColumns = _a.mergeColumns, odd = _a.odd, variant = _a.variant, rowReorderEnabled = _a.rowReorderEnabled, rowReorderRole = _a.rowReorderRole, rowReorderPhase = _a.rowReorderPhase, rowReorderDirection = _a.rowReorderDirection, rowReorderOffset = _a.rowReorderOffset, reorder = _a.reorder, reorderingInfo = _a.reorderingInfo, searchMatchTokens = _a.searchMatchTokens, currentSearchToken = _a.currentSearchToken, isRowEditing = _a.isRowEditing, cellInteractionSession = _a.cellInteractionSession, handleClick = _a.handleClick, setEditItem = _a.setEditItem, setItemValue = _a.setItemValue, handleMoveEditFocus = _a.handleMoveEditFocus, handleChangeChecked = _a.handleChangeChecked, handleChangeCheckedRadio = _a.handleChangeCheckedRadio, getRowSpan = _a.getRowSpan, onRowReorderPointerDown = _a.onRowReorderPointerDown, onRowReorderKeyDown = _a.onRowReorderKeyDown;
171
171
  var tree = (0, TreeContext_1.useTreeContext)();
172
172
  var treeRowKey = tree === null || tree === void 0 ? void 0 : tree.getRowKey(item.values);
173
173
  var treeMeta = treeRowKey === undefined ? undefined : tree === null || tree === void 0 ? void 0 : tree.metaByRowKey.get(treeRowKey);
@@ -238,7 +238,7 @@ function TableBodyRowInner(_a) {
238
238
  var isSearchMatch = searchMatchTokens.has(searchToken);
239
239
  var isCurrentSearchMatch = currentSearchToken === searchToken;
240
240
  var valueByRowKey = (0, utils_1.getCellValueByRowKey)(column.key, canonicalItem.values);
241
- return (React.createElement(TableBodyCellItem, { key: columnIndex, ri: ri, columnIndex: columnIndex, column: column, canonicalIndex: canonicalIndex, canonicalItem: canonicalItem, valueByRowKey: valueByRowKey, isLeftRegion: isLeftRegion, editable: editable, disabled: disabled, editTrigger: editTrigger, rowSpan: rowSpan, isMerged: Boolean(mergeColumns === null || mergeColumns === void 0 ? void 0 : mergeColumns[columnIndex]), tdEditable: tdEditable, cellEditable: cellEditable, isLogicalEditing: isLogicalEditing, isCheckboxEditor: isCheckboxEditor, isSearchMatch: isSearchMatch, isCurrentSearchMatch: isCurrentSearchMatch, cellInteractionSession: isRowEditing ? cellInteractionSession : undefined, handleClick: handleClick, setEditItem: setEditItem, setItemValue: setItemValue, handleMoveEditFocus: handleMoveEditFocus }));
241
+ return (React.createElement(TableBodyCellItem, { key: columnIndex, ri: ri, columnIndex: columnIndex, column: column, canonicalIndex: canonicalIndex, canonicalItem: canonicalItem, valueByRowKey: valueByRowKey, isLeftRegion: isLeftRegion, editTrigger: editTrigger, rowSpan: rowSpan, isMerged: Boolean(mergeColumns === null || mergeColumns === void 0 ? void 0 : mergeColumns[columnIndex]), tdEditable: tdEditable, cellEditable: cellEditable, isLogicalEditing: isLogicalEditing, isCheckboxEditor: isCheckboxEditor, isSearchMatch: isSearchMatch, isCurrentSearchMatch: isCurrentSearchMatch, cellInteractionSession: isRowEditing ? cellInteractionSession : undefined, handleClick: handleClick, setEditItem: setEditItem, setItemValue: setItemValue, handleMoveEditFocus: handleMoveEditFocus }));
242
242
  }),
243
243
  !isLeftRegion && React.createElement("td", { "data-none": true, onClick: function () { return handleClick(ri, -1); } })));
244
244
  }
@@ -36,7 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  var React = __importStar(require("react"));
37
37
  var store_1 = require("../store");
38
38
  var utils_1 = require("../utils");
39
- function TableColGroupFrozen(props) {
39
+ function TableColGroupFrozen() {
40
40
  var frozenColumnIndex = (0, store_1.useAppStore)(function (s) { return s.frozenColumnIndex; });
41
41
  var data = (0, store_1.useAppStore)(function (s) { return s.data; });
42
42
  var checkboxHeight = (0, store_1.useAppStore)(function (s) { return Math.min(15, s.itemHeight); });
@@ -1465,7 +1465,7 @@ function AppStoreProvider(_a) {
1465
1465
  var columns = __spreadArray([], __read(get().columns), false);
1466
1466
  var columnMap = [];
1467
1467
  if (trLevel === 0) {
1468
- get().columns.forEach(function (c, i) {
1468
+ get().columns.forEach(function (_, i) {
1469
1469
  var cg = columnsGroup.find(function (cg) {
1470
1470
  return cg.groupStartIndex <= i && cg.groupEndIndex >= i;
1471
1471
  });
@@ -202,7 +202,7 @@ function getPivotCellContext(item, key) {
202
202
  });
203
203
  }
204
204
  function createRowFieldValues(fields, values) {
205
- return fields.reduce(function (acc, field, index) {
205
+ return fields.reduce(function (acc, _, index) {
206
206
  acc[getPivotRowKey(index)] = values[index];
207
207
  return acc;
208
208
  }, {});
@@ -52,6 +52,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
52
52
  exports.useForceUpdate = useForceUpdate;
53
53
  var React = __importStar(require("react"));
54
54
  function useForceUpdate() {
55
- var _a = __read(React.useState(0), 2), value = _a[0], setValue = _a[1]; // integer state
55
+ var _a = __read(React.useState(0), 2), setValue = _a[1]; // integer state
56
56
  return function () { return setValue(function (value) { return ++value; }); }; // update the state to force render
57
57
  }
@@ -267,7 +267,7 @@ export function CellTextEditorGateway({ containerRef }) {
267
267
  event.preventDefault();
268
268
  void commit(event.shiftKey ? 'prev' : 'next');
269
269
  }
270
- }, onBlur: event => {
270
+ }, onBlur: () => {
271
271
  if (!cellEditSession || !isTextEditing)
272
272
  return;
273
273
  if (composingRef.current) {
@@ -6,7 +6,6 @@ function ColResizer({ container, columnIndex, hideHandle, bordered, frozenBounda
6
6
  const setColumnResizing = useAppStore(s => s.setColumnResizing);
7
7
  const endCellEdit = useAppStore(s => s.endCellEdit);
8
8
  const disabled = useAppStore(s => s.disabled);
9
- const columnsGroup = useAppStore(s => s.columnsGroup);
10
9
  const onPointerDownResizerHandle = React.useCallback((evt, columnIndex) => {
11
10
  if (disabled)
12
11
  return;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { useShallow } from 'zustand/react/shallow';
3
3
  import { useAppStore } from '../store';
4
4
  import { toMoney } from '../utils/number';
5
- function Pagination(props) {
5
+ function Pagination() {
6
6
  // [Selector Group 1] Pagination State - 페이지네이션 상태
7
7
  const { page, displayPaginationLength, disabled } = useAppStore(useShallow(s => ({
8
8
  page: s.page,
@@ -32,6 +32,7 @@ function Table(props) {
32
32
  const store = useAppStoreApi();
33
33
  const { cellSelectionOptions, onChangeData, sourceIndexByVisibleIndex } = props;
34
34
  const cellSelectionEnabled = cellSelectionOptions?.enabled ?? true;
35
+ const multiSelectFocusMode = cellSelectionOptions?.multiSelectFocusMode ?? 'first';
35
36
  const rowKeyRegistryState = useRef({
36
37
  sourceData: props.sourceData ?? props.data,
37
38
  rowKey: props.rowKey,
@@ -58,12 +59,10 @@ function Table(props) {
58
59
  itemPadding: s.itemPadding,
59
60
  })));
60
61
  // [Selector Group 2] Header, Footer, Summary - 헤더/푸터/요약
61
- const { headerHeight, footerHeight, bottomBarHeight, summaryHeight, summaryRowHeight } = useAppStore(useShallow(s => ({
62
+ const { headerHeight, bottomBarHeight, summaryHeight } = useAppStore(useShallow(s => ({
62
63
  headerHeight: s.headerHeight,
63
- footerHeight: s.footerHeight,
64
64
  bottomBarHeight: s.bottomBarHeight,
65
65
  summaryHeight: s.summaryHeight,
66
- summaryRowHeight: s.summaryRowHeight,
67
66
  })));
68
67
  // [Selector Group 3] Scroll State - 스크롤 상태
69
68
  const { scrollLeft, scrollTop } = useAppStore(useShallow(s => ({
@@ -762,6 +761,11 @@ function Table(props) {
762
761
  rowSpan: logicalCell.rowIndexes.length,
763
762
  };
764
763
  }, [data, props.cellMergeOptions]);
764
+ const focusLastSelectedCell = useCallback((cellPosition, hostCell = cellPosition) => {
765
+ if (multiSelectFocusMode !== 'last')
766
+ return;
767
+ setActiveCell({ rowIndex: cellPosition.rowIndex, columnIndex: cellPosition.columnIndex }, { rowIndex: hostCell.rowIndex, columnIndex: hostCell.columnIndex });
768
+ }, [multiSelectFocusMode, setActiveCell]);
765
769
  const updateAxisSelectionByTarget = useCallback((target) => {
766
770
  const dragState = axisSelectionDragRef.current;
767
771
  if (!dragState)
@@ -793,6 +797,7 @@ function Table(props) {
793
797
  const physicalCellPosition = getCellPosition(target, containerRef.current);
794
798
  const cellPosition = physicalCellPosition ? toLogicalCellPosition(physicalCellPosition) : undefined;
795
799
  if (cellSelectionEnabled && cellSelectionDragRef.current && cellPosition) {
800
+ focusLastSelectedCell(cellPosition, physicalCellPosition ?? cellPosition);
796
801
  setCellSelectionRanges(updateSelectionDragRange(cellSelectionDragRef.current, getRangeFromDrag(cellSelectionDragRef.current, cellPosition)));
797
802
  }
798
803
  const targetGrid = target?.closest('[role="grid"], [role="treegrid"]');
@@ -818,6 +823,7 @@ function Table(props) {
818
823
  cellSelectionEnabled,
819
824
  clearHoveredRow,
820
825
  disabled,
826
+ focusLastSelectedCell,
821
827
  setCellSelectionRanges,
822
828
  setHoveredRows,
823
829
  toLogicalCellPosition,
@@ -968,8 +974,9 @@ function Table(props) {
968
974
  if (!cellPosition)
969
975
  return;
970
976
  const logicalCellPosition = toLogicalCellPosition(cellPosition);
977
+ focusLastSelectedCell(logicalCellPosition, cellPosition);
971
978
  setCellSelectionRanges(updateSelectionDragRange(dragState, getRangeFromDrag(dragState, logicalCellPosition)));
972
- }, [setCellSelectionRanges, toLogicalCellPosition]);
979
+ }, [focusLastSelectedCell, setCellSelectionRanges, toLogicalCellPosition]);
973
980
  const runSelectionAutoScroll = useCallback(() => {
974
981
  selectionAutoScrollRafRef.current = null;
975
982
  const dragState = cellSelectionDragRef.current;
@@ -7,7 +7,7 @@ import { getCellValueByRowKey, getRowReorderOffset, getRowReorderRole, useBodyDa
7
7
  import { TableBodyRow } from './TableBodyRow';
8
8
  import { MasterDetailRow } from './MasterDetailCell';
9
9
  import { BGridDataItemStatus } from '../types';
10
- export function getVisibleColumnRange(columns, firstScrollableColumnIndex, scrollLeft, viewportWidth) {
10
+ function getVisibleColumnRange(columns, firstScrollableColumnIndex, scrollLeft, viewportWidth) {
11
11
  const lastColumnIndex = columns.length - 1;
12
12
  if (firstScrollableColumnIndex > lastColumnIndex) {
13
13
  return {
@@ -236,16 +236,6 @@ function TableBody({ rowKeyRegistry, region = 'main', rowRange, style, role, qua
236
236
  React.createElement("td", { className: 'bgrid-empty-cell', colSpan: columns.slice(frozenColumnIndex).length }, msg.emptyList),
237
237
  React.createElement("td", { "data-none": true }))) : null))))));
238
238
  }
239
- function LineNumberTd({ bordered, rowStatus, rowIndex, active, className, children, ...rest }) {
240
- return (React.createElement("td", { className: [
241
- 'bgrid-line-number-cell',
242
- bordered ? 'bordered' : '',
243
- active ? 'bgrid-row-axis-active' : '',
244
- className ?? '',
245
- ]
246
- .filter(Boolean)
247
- .join(' '), "data-bgrid-row-status": rowStatus, "data-bgrid-axis-selectable": 'true', "data-bgrid-row-axis-active": active ? 'true' : undefined, "data-row-index": rowIndex, ...rest }, children));
248
- }
249
239
  function getRowStatusLabel(status) {
250
240
  if (status === BGridDataItemStatus.new)
251
241
  return 'I';
@@ -255,7 +245,7 @@ function getRowStatusLabel(status) {
255
245
  return 'D';
256
246
  return undefined;
257
247
  }
258
- export function BodyTable({ variant, className, children, ...rest }) {
248
+ function BodyTable({ variant, className, children, ...rest }) {
259
249
  return (React.createElement("table", { className: [
260
250
  'bgrid-body-table',
261
251
  variant === 'vertical-bordered' ? 'bgrid-body-vertical-bordered' : '',
@@ -264,16 +254,7 @@ export function BodyTable({ variant, className, children, ...rest }) {
264
254
  .filter(Boolean)
265
255
  .join(' '), ...rest }, children));
266
256
  }
267
- export function TableBodyTr({ itemHeight, itemPadding, rowHeight, active, editable, odd, hasOnClick, className, children, style, ...rest }) {
268
- const clickable = !editable && hasOnClick;
269
- const rowClassName = ['bgrid-body-row', active ? 'bgrid-row-active' : '', className ?? ''].filter(Boolean).join(' ');
270
- return (React.createElement("tr", { className: rowClassName, "data-odd": odd ? 'true' : undefined, "data-clickable": clickable ? 'true' : undefined, style: {
271
- ['--bgrid-item-line-height']: `${itemHeight}px`,
272
- ['--bgrid-item-cell-height']: `${rowHeight ?? itemHeight + itemPadding * 2}px`,
273
- ...style,
274
- }, ...rest }, children));
275
- }
276
- export function NoDataTr({ children, className, itemHeight, itemPadding, style, ...rest }) {
257
+ function NoDataTr({ children, className, itemHeight, itemPadding, style, ...rest }) {
277
258
  return (React.createElement("tr", { className: ['bgrid-empty-row', className ?? ''].filter(Boolean).join(' '), style: {
278
259
  ['--bgrid-item-line-height']: `${itemHeight}px`,
279
260
  ['--bgrid-item-cell-height']: `${itemHeight + itemPadding * 2}px`,
@@ -5,7 +5,7 @@ import { TableBodyCell } from './TableBodyCell';
5
5
  import RowSelector from './RowSelector';
6
6
  import { GripVertical } from './GripVertical';
7
7
  import { useTreeContext } from './TreeContext';
8
- function TableBodyCellItemInner({ ri, columnIndex, column, canonicalIndex, canonicalItem, valueByRowKey, editable, disabled, editTrigger, rowSpan, isMerged, tdEditable, cellEditable, isLogicalEditing, isCheckboxEditor, isSearchMatch, isCurrentSearchMatch, cellInteractionSession, handleClick, setEditItem, setItemValue, handleMoveEditFocus, }) {
8
+ function TableBodyCellItemInner({ ri, columnIndex, column, canonicalIndex, canonicalItem, valueByRowKey, editTrigger, rowSpan, isMerged, tdEditable, cellEditable, isLogicalEditing, isCheckboxEditor, isSearchMatch, isCurrentSearchMatch, cellInteractionSession, handleClick, setEditItem, setItemValue, handleMoveEditFocus, }) {
9
9
  const resolvedEditTrigger = column.editTrigger ?? editTrigger ?? 'dblclick';
10
10
  const edited = isCellEdited(canonicalItem, column);
11
11
  const valueChanged = isCellValueChanged(canonicalItem, column);
@@ -55,7 +55,7 @@ function TableBodyCellItemInner({ ri, columnIndex, column, canonicalIndex, canon
55
55
  React.createElement(TableBodyCell, { index: canonicalIndex, hostIndex: ri, columnIndex: columnIndex, column: column, item: canonicalItem, valueByRowKey: valueByRowKey, handleSave: handleSave, handleCancel: handleCancel, handleMove: handleMove, editable: tdEditable, cellEditable: cellEditable, interactionEditing: isLogicalEditing, editSession: tdEditable && cellInteractionSession?.kind === 'editor' ? cellInteractionSession : undefined })));
56
56
  }
57
57
  const TableBodyCellItem = React.memo(TableBodyCellItemInner);
58
- function TableBodyRowInner({ item, data, ri, sourceIndex, columns, startCIdx, endCIdx, frozenColumnIndex, isLeftRegion, showLineNumber, hasRowChecked, isRadio, checked, rowCheckedDisabled, rowStatus, active, className, resolvedRowHeight, itemHeight, itemPadding, editable, disabled, editTrigger, hasOnClick, cellMergeOptions, mergeColumns, odd, variant, rowReorderEnabled, rowReorderRole, rowReorderPhase, rowReorderDirection, rowReorderOffset, reorder, reorderingInfo, searchMatchTokens, currentSearchToken, isRowEditing, cellInteractionSession, handleClick, setEditItem, setItemValue, handleMoveEditFocus, handleChangeChecked, handleChangeCheckedRadio, getRowSpan, onRowReorderPointerDown, onRowReorderKeyDown, }) {
58
+ function TableBodyRowInner({ item, data, ri, columns, startCIdx, endCIdx, frozenColumnIndex, isLeftRegion, showLineNumber, hasRowChecked, isRadio, checked, rowCheckedDisabled, rowStatus, active, className, resolvedRowHeight, itemHeight, editable, disabled, editTrigger, hasOnClick, cellMergeOptions, mergeColumns, odd, variant, rowReorderEnabled, rowReorderRole, rowReorderPhase, rowReorderDirection, rowReorderOffset, reorder, reorderingInfo, searchMatchTokens, currentSearchToken, isRowEditing, cellInteractionSession, handleClick, setEditItem, setItemValue, handleMoveEditFocus, handleChangeChecked, handleChangeCheckedRadio, getRowSpan, onRowReorderPointerDown, onRowReorderKeyDown, }) {
59
59
  const tree = useTreeContext();
60
60
  const treeRowKey = tree?.getRowKey(item.values);
61
61
  const treeMeta = treeRowKey === undefined ? undefined : tree?.metaByRowKey.get(treeRowKey);
@@ -118,7 +118,7 @@ function TableBodyRowInner({ item, data, ri, sourceIndex, columns, startCIdx, en
118
118
  const isSearchMatch = searchMatchTokens.has(searchToken);
119
119
  const isCurrentSearchMatch = currentSearchToken === searchToken;
120
120
  const valueByRowKey = getCellValueByRowKey(column.key, canonicalItem.values);
121
- return (React.createElement(TableBodyCellItem, { key: columnIndex, ri: ri, columnIndex: columnIndex, column: column, canonicalIndex: canonicalIndex, canonicalItem: canonicalItem, valueByRowKey: valueByRowKey, isLeftRegion: isLeftRegion, editable: editable, disabled: disabled, editTrigger: editTrigger, rowSpan: rowSpan, isMerged: Boolean(mergeColumns?.[columnIndex]), tdEditable: tdEditable, cellEditable: cellEditable, isLogicalEditing: isLogicalEditing, isCheckboxEditor: isCheckboxEditor, isSearchMatch: isSearchMatch, isCurrentSearchMatch: isCurrentSearchMatch, cellInteractionSession: isRowEditing ? cellInteractionSession : undefined, handleClick: handleClick, setEditItem: setEditItem, setItemValue: setItemValue, handleMoveEditFocus: handleMoveEditFocus }));
121
+ return (React.createElement(TableBodyCellItem, { key: columnIndex, ri: ri, columnIndex: columnIndex, column: column, canonicalIndex: canonicalIndex, canonicalItem: canonicalItem, valueByRowKey: valueByRowKey, isLeftRegion: isLeftRegion, editTrigger: editTrigger, rowSpan: rowSpan, isMerged: Boolean(mergeColumns?.[columnIndex]), tdEditable: tdEditable, cellEditable: cellEditable, isLogicalEditing: isLogicalEditing, isCheckboxEditor: isCheckboxEditor, isSearchMatch: isSearchMatch, isCurrentSearchMatch: isCurrentSearchMatch, cellInteractionSession: isRowEditing ? cellInteractionSession : undefined, handleClick: handleClick, setEditItem: setEditItem, setItemValue: setItemValue, handleMoveEditFocus: handleMoveEditFocus }));
122
122
  }),
123
123
  !isLeftRegion && React.createElement("td", { "data-none": true, onClick: () => handleClick(ri, -1) })));
124
124
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useAppStore } from '../store';
3
3
  import { getLineNumberWidth } from '../utils';
4
- function TableColGroupFrozen(props) {
4
+ function TableColGroupFrozen() {
5
5
  const frozenColumnIndex = useAppStore(s => s.frozenColumnIndex);
6
6
  const data = useAppStore(s => s.data);
7
7
  const checkboxHeight = useAppStore(s => Math.min(15, s.itemHeight));
@@ -1274,7 +1274,7 @@ export function AppStoreProvider({ children, initialState }) {
1274
1274
  const columns = [...get().columns];
1275
1275
  const columnMap = [];
1276
1276
  if (trLevel === 0) {
1277
- get().columns.forEach((c, i) => {
1277
+ get().columns.forEach((_, i) => {
1278
1278
  const cg = columnsGroup.find(cg => {
1279
1279
  return cg.groupStartIndex <= i && cg.groupEndIndex >= i;
1280
1280
  });
@@ -160,7 +160,7 @@ function getPivotCellContext(item, key) {
160
160
  });
161
161
  }
162
162
  function createRowFieldValues(fields, values) {
163
- return fields.reduce((acc, field, index) => {
163
+ return fields.reduce((acc, _, index) => {
164
164
  acc[getPivotRowKey(index)] = values[index];
165
165
  return acc;
166
166
  }, {});
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
2
  export function useForceUpdate() {
3
- const [value, setValue] = React.useState(0); // integer state
3
+ const [, setValue] = React.useState(0); // integer state
4
4
  return () => setValue(value => ++value); // update the state to force render
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beautiful-grid",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "A beautiful, powerful, open-source React Data Grid.",
5
5
  "homepage": "https://bgrid.axisj.com",
6
6
  "bugs": {
package/style.css CHANGED
@@ -2576,14 +2576,12 @@
2576
2576
  max-width: 100%;
2577
2577
  }
2578
2578
 
2579
- .bgrid-detail-frozen-row,
2580
- .bgrid-detail-spacer-row {
2579
+ .bgrid-detail-frozen-row {
2581
2580
  pointer-events: none;
2582
2581
  max-height: none !important;
2583
2582
  }
2584
2583
 
2585
- .bgrid-body-table > tbody > tr.bgrid-detail-frozen-row > td,
2586
- .bgrid-body-table > tbody > tr.bgrid-detail-spacer-row > td {
2584
+ .bgrid-body-table > tbody > tr.bgrid-detail-frozen-row > td {
2587
2585
  padding: 0 !important;
2588
2586
  margin: 0 !important;
2589
2587
  border-top: none !important;
@@ -1,5 +1,3 @@
1
1
  import * as React from 'react';
2
- interface Props {
3
- }
4
- declare function Pagination(props: Props): React.JSX.Element | null;
2
+ declare function Pagination(): React.JSX.Element | null;
5
3
  export default Pagination;
@@ -1,16 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { type BGridRowHeightMetrics } from '../utils';
3
- import { AppModelColumn, BGridProps } from '../types';
4
- export type BGridBodyRegion = 'left' | 'main';
3
+ type BGridBodyRegion = 'left' | 'main';
5
4
  export interface BGridBodyRowRange {
6
5
  startRowIndex: number;
7
6
  endRowIndex: number;
8
7
  }
9
- export interface BGridVisibleColumnRange {
10
- startColumnIndex: number;
11
- endColumnIndex: number;
12
- }
13
- export declare function getVisibleColumnRange(columns: Pick<AppModelColumn<any>, 'left' | 'width'>[], firstScrollableColumnIndex: number, scrollLeft: number, viewportWidth: number): BGridVisibleColumnRange;
14
8
  export interface RowKeyRegistry {
15
9
  firstSourceIndexByValue: Map<string, number>;
16
10
  warnedDuplicateValues: Set<string>;
@@ -32,24 +26,5 @@ interface Props {
32
26
  viewportWidth?: number;
33
27
  }
34
28
  declare function TableBody({ rowKeyRegistry, region, rowRange, style, role, quadrant, allowRowReorder, onRowReorderPointerDown, onRowReorderKeyDown, rowHeightMetrics, viewportWidth, }: Props): React.JSX.Element;
35
- interface BodyTableProps extends React.TableHTMLAttributes<HTMLTableElement> {
36
- variant: BGridProps<any>['variant'];
37
- }
38
- export declare function BodyTable({ variant, className, children, ...rest }: BodyTableProps): React.JSX.Element;
39
- interface TableBodyTrProps extends React.HTMLAttributes<HTMLTableRowElement> {
40
- itemHeight: number;
41
- itemPadding: number;
42
- rowHeight?: number;
43
- active?: boolean;
44
- editable?: boolean;
45
- odd?: boolean;
46
- hasOnClick?: boolean;
47
- }
48
- export declare function TableBodyTr({ itemHeight, itemPadding, rowHeight, active, editable, odd, hasOnClick, className, children, style, ...rest }: TableBodyTrProps): React.JSX.Element;
49
- interface NoDataTrProps extends React.HTMLAttributes<HTMLTableRowElement> {
50
- itemHeight: number;
51
- itemPadding: number;
52
- }
53
- export declare function NoDataTr({ children, className, itemHeight, itemPadding, style, ...rest }: NoDataTrProps): React.JSX.Element;
54
29
  declare const _default: React.MemoExoticComponent<typeof TableBody>;
55
30
  export default _default;
@@ -51,6 +51,6 @@ export interface TableBodyRowProps<T> {
51
51
  onRowReorderPointerDown?: (event: React.PointerEvent<HTMLButtonElement>, rowIndex: number) => void;
52
52
  onRowReorderKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>, rowIndex: number) => void;
53
53
  }
54
- declare function TableBodyRowInner<T>({ item, data, ri, sourceIndex, columns, startCIdx, endCIdx, frozenColumnIndex, isLeftRegion, showLineNumber, hasRowChecked, isRadio, checked, rowCheckedDisabled, rowStatus, active, className, resolvedRowHeight, itemHeight, itemPadding, editable, disabled, editTrigger, hasOnClick, cellMergeOptions, mergeColumns, odd, variant, rowReorderEnabled, rowReorderRole, rowReorderPhase, rowReorderDirection, rowReorderOffset, reorder, reorderingInfo, searchMatchTokens, currentSearchToken, isRowEditing, cellInteractionSession, handleClick, setEditItem, setItemValue, handleMoveEditFocus, handleChangeChecked, handleChangeCheckedRadio, getRowSpan, onRowReorderPointerDown, onRowReorderKeyDown, }: TableBodyRowProps<T>): React.JSX.Element;
54
+ declare function TableBodyRowInner<T>({ item, data, ri, columns, startCIdx, endCIdx, frozenColumnIndex, isLeftRegion, showLineNumber, hasRowChecked, isRadio, checked, rowCheckedDisabled, rowStatus, active, className, resolvedRowHeight, itemHeight, editable, disabled, editTrigger, hasOnClick, cellMergeOptions, mergeColumns, odd, variant, rowReorderEnabled, rowReorderRole, rowReorderPhase, rowReorderDirection, rowReorderOffset, reorder, reorderingInfo, searchMatchTokens, currentSearchToken, isRowEditing, cellInteractionSession, handleClick, setEditItem, setItemValue, handleMoveEditFocus, handleChangeChecked, handleChangeCheckedRadio, getRowSpan, onRowReorderPointerDown, onRowReorderKeyDown, }: TableBodyRowProps<T>): React.JSX.Element;
55
55
  export declare const TableBodyRow: typeof TableBodyRowInner;
56
56
  export {};
@@ -1,6 +1,4 @@
1
1
  import * as React from 'react';
2
- interface Props {
3
- }
4
- declare function TableColGroupFrozen(props: Props): React.JSX.Element;
2
+ declare function TableColGroupFrozen(): React.JSX.Element;
5
3
  declare const _default: React.MemoExoticComponent<typeof TableColGroupFrozen>;
6
4
  export default _default;
@@ -3,7 +3,7 @@ import { BGridProps } from '../types';
3
3
  interface Props {
4
4
  position: NonNullable<BGridProps<any>['summary']>['position'];
5
5
  }
6
- export declare function TableSummary<T>({ position }: Props): React.JSX.Element;
6
+ export declare function TableSummary({ position }: Props): React.JSX.Element;
7
7
  interface SummaryTableProps extends React.TableHTMLAttributes<HTMLTableElement> {
8
8
  summaryHeight: number;
9
9
  variant: BGridProps<any>['variant'];
package/types/types.d.ts CHANGED
@@ -901,6 +901,8 @@ export interface BGridProps<T> {
901
901
  };
902
902
  cellSelectionOptions?: {
903
903
  enabled?: boolean;
904
+ /** Controls which cell remains active after a multi-cell selection. */
905
+ multiSelectFocusMode?: 'first' | 'last';
904
906
  clearOnEscape?: boolean;
905
907
  clearOnOutsideClick?: boolean;
906
908
  maxClipboardCells?: number;