@vuu-ui/vuu-table 0.6.15-debug → 0.6.16-debug

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/esm/index.js CHANGED
@@ -1493,7 +1493,9 @@ var useTableColumnResize = ({
1493
1493
  const handleResizeEnd = useCallback12(() => {
1494
1494
  if (onResize) {
1495
1495
  onResize("end", name2, widthRef.current);
1496
- isResizing.current = false;
1496
+ setTimeout(() => {
1497
+ isResizing.current = false;
1498
+ }, 100);
1497
1499
  }
1498
1500
  }, [name2, onResize]);
1499
1501
  return {
@@ -18396,10 +18398,10 @@ var LRParser = class extends Parser {
18396
18398
  if (config.props)
18397
18399
  copy.nodeSet = this.nodeSet.extend(...config.props);
18398
18400
  if (config.top) {
18399
- let info = this.topRules[config.top];
18400
- if (!info)
18401
+ let info2 = this.topRules[config.top];
18402
+ if (!info2)
18401
18403
  throw new RangeError(`Invalid top rule name ${config.top}`);
18402
- copy.top = info;
18404
+ copy.top = info2;
18403
18405
  }
18404
18406
  if (config.tokenizers)
18405
18407
  copy.tokenizers = this.tokenizers.map((t2) => {
@@ -20198,10 +20200,11 @@ var ServerProxy = class {
20198
20200
  type: REMOVE_VP,
20199
20201
  viewPortId: serverViewportId
20200
20202
  });
20203
+ } else {
20204
+ error3(
20205
+ \`failed to unsubscribe client viewport \${clientViewportId}, viewport not found\`
20206
+ );
20201
20207
  }
20202
- error3(
20203
- \`failed to unsubscribe client viewport \${clientViewportId}, viewport not found\`
20204
- );
20205
20208
  }
20206
20209
  getViewportForClient(clientViewportId, throws = true) {
20207
20210
  const serverViewportId = this.mapClientToServerViewport.get(clientViewportId);
@@ -22344,7 +22347,8 @@ import {
22344
22347
  getColumnPinStyle as getColumnPinStyle2,
22345
22348
  isGroupColumn as isGroupColumn2,
22346
22349
  metadataKeys as metadataKeys9,
22347
- notHidden as notHidden2
22350
+ notHidden as notHidden2,
22351
+ visibleColumnAtIndex
22348
22352
  } from "@vuu-ui/vuu-utils";
22349
22353
  import { useCallback as useCallback25, useMemo as useMemo9 } from "react";
22350
22354
 
@@ -22437,7 +22441,7 @@ var RowBasedTable = ({
22437
22441
  ".vuuTable-headerCell"
22438
22442
  );
22439
22443
  const colIdx = parseInt((_a2 = headerCell == null ? void 0 : headerCell.dataset.idx) != null ? _a2 : "-1");
22440
- const column = columns[colIdx];
22444
+ const column = visibleColumnAtIndex(columns, colIdx);
22441
22445
  const isAdditive = evt.shiftKey;
22442
22446
  column && onSort(column, isAdditive);
22443
22447
  },
@@ -23255,11 +23259,13 @@ import {
23255
23259
  isGroupColumn as isGroupColumn3,
23256
23260
  isPinned,
23257
23261
  isTypeDescriptor,
23262
+ logger,
23258
23263
  metadataKeys as metadataKeys12,
23259
23264
  sortPinnedColumns,
23260
23265
  stripFilterFromColumns
23261
23266
  } from "@vuu-ui/vuu-utils";
23262
23267
  import { useReducer } from "react";
23268
+ var { info } = logger("useTableModel");
23263
23269
  var DEFAULT_COLUMN_WIDTH = 100;
23264
23270
  var KEY_OFFSET = metadataKeys12.count;
23265
23271
  var columnWithoutDataType = ({ serverDataType }) => serverDataType === void 0;
@@ -23281,6 +23287,7 @@ var getDataType = (column, columnNames, dataTypes) => {
23281
23287
  var numericTypes = ["int", "long", "double"];
23282
23288
  var getDefaultAlignment = (serverDataType) => serverDataType === void 0 ? void 0 : numericTypes.includes(serverDataType) ? "right" : "left";
23283
23289
  var columnReducer = (state, action) => {
23290
+ info == null ? void 0 : info(`GridModelReducer ${action.type}`);
23284
23291
  switch (action.type) {
23285
23292
  case "init":
23286
23293
  return init(action);
@@ -23323,9 +23330,10 @@ function init({ dataSourceConfig, tableConfig }) {
23323
23330
  headings: getTableHeadings(maybePinnedColumns)
23324
23331
  };
23325
23332
  if (dataSourceConfig) {
23333
+ const { columns: columns2, ...rest } = dataSourceConfig;
23326
23334
  return updateTableConfig(state, {
23327
23335
  type: "tableConfig",
23328
- ...dataSourceConfig
23336
+ ...rest
23329
23337
  });
23330
23338
  } else {
23331
23339
  return state;