@vuu-ui/vuu-table 0.6.14-debug → 0.6.15-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/cjs/index.js CHANGED
@@ -19498,9 +19498,11 @@ var ArrayBackedMovingWindow = class {
19498
19498
  return this.internalData.slice(startOffset, endOffset);
19499
19499
  }
19500
19500
  clear() {
19501
+ var _a;
19502
+ (_a = log.debug) == null ? void 0 : _a.call(log, "clear");
19501
19503
  this.internalData.length = 0;
19502
19504
  this.rowsWithinRange = 0;
19503
- this.rowCount = 0;
19505
+ this.setRowCount(0);
19504
19506
  }
19505
19507
  // used only for debugging
19506
19508
  getCurrentDataRange() {
@@ -19773,13 +19775,16 @@ var Viewport = class {
19773
19775
  range.to
19774
19776
  );
19775
19777
  let debounceRequest;
19778
+ const maxRange = this.dataWindow.rowCount || void 0;
19776
19779
  const serverRequest = serverDataRequired && !this.rangeRequestAlreadyPending(range) ? {
19777
19780
  type,
19778
19781
  viewPortId: this.serverViewportId,
19779
- ...getFullRange(range, this.bufferSize, this.dataWindow.rowCount)
19782
+ ...getFullRange(range, this.bufferSize, maxRange)
19780
19783
  } : null;
19781
19784
  if (serverRequest) {
19782
- debug3 == null ? void 0 : debug3(\`range server request: \${serverRequest}\`);
19785
+ debugEnabled3 && (debug3 == null ? void 0 : debug3(
19786
+ \`create CHANGE_VP_RANGE: [\${serverRequest.from} - \${serverRequest.to}]\`
19787
+ ));
19783
19788
  this.awaitOperation(requestId, { type });
19784
19789
  const pendingRequest = this.pendingRangeRequests.at(-1);
19785
19790
  if (pendingRequest) {
@@ -21957,8 +21962,8 @@ var RemoteDataSource = class extends import_vuu_utils13.EventEmitter {
21957
21962
  }
21958
21963
  // Build the config structure in advance of any get requests and on every change.
21959
21964
  // We do not build config on the fly in the getter as we want to avoid creating a
21960
- // new strucutre on each request - the object is 'stable' in React terminology.
21961
- refreshConfig() {
21965
+ // new structure on each request - the object is 'stable' in React terminology.
21966
+ refreshConfig(confirmed) {
21962
21967
  const { aggregations, columns, filter, groupBy, sort, visualLink } = this;
21963
21968
  const hasAggregations = aggregations.length > 0;
21964
21969
  const hasColumns = columns.length > 0;
@@ -21974,10 +21979,11 @@ var RemoteDataSource = class extends import_vuu_utils13.EventEmitter {
21974
21979
  hasGroupBy && (result.groupBy = groupBy);
21975
21980
  hasSort && (result.sort = sort);
21976
21981
  hasVisualLink && (result.visualLink = visualLink);
21977
- return __privateSet(this, _config, result);
21982
+ __privateSet(this, _config, result);
21978
21983
  } else {
21979
- return __privateSet(this, _config, void 0);
21984
+ __privateSet(this, _config, void 0);
21980
21985
  }
21986
+ this.emit("config", __privateGet(this, _config), confirmed);
21981
21987
  }
21982
21988
  get config() {
21983
21989
  return __privateGet(this, _config);
@@ -22030,8 +22036,7 @@ var RemoteDataSource = class extends import_vuu_utils13.EventEmitter {
22030
22036
  this.server.send(message);
22031
22037
  }
22032
22038
  }
22033
- const newConfig = this.refreshConfig();
22034
- this.emit("config", newConfig, false);
22039
+ this.refreshConfig();
22035
22040
  }
22036
22041
  get aggregations() {
22037
22042
  return __privateGet(this, _aggregations3);
@@ -22047,7 +22052,6 @@ var RemoteDataSource = class extends import_vuu_utils13.EventEmitter {
22047
22052
  });
22048
22053
  }
22049
22054
  this.refreshConfig();
22050
- this.emit("config", { aggregations }, false);
22051
22055
  }
22052
22056
  get sort() {
22053
22057
  return __privateGet(this, _sort3);
@@ -22065,7 +22069,6 @@ var RemoteDataSource = class extends import_vuu_utils13.EventEmitter {
22065
22069
  }
22066
22070
  }
22067
22071
  this.refreshConfig();
22068
- this.emit("config", { sort }, false);
22069
22072
  }
22070
22073
  get filter() {
22071
22074
  return __privateGet(this, _filter4);
@@ -22083,7 +22086,6 @@ var RemoteDataSource = class extends import_vuu_utils13.EventEmitter {
22083
22086
  }
22084
22087
  }
22085
22088
  this.refreshConfig();
22086
- this.emit("config", { filter }, false);
22087
22089
  }
22088
22090
  get groupBy() {
22089
22091
  return __privateGet(this, _groupBy3);
@@ -22156,7 +22158,6 @@ var RemoteDataSource = class extends import_vuu_utils13.EventEmitter {
22156
22158
  }
22157
22159
  }
22158
22160
  this.refreshConfig();
22159
- this.emit("config", { visualLink }, false);
22160
22161
  }
22161
22162
  setConfigPending(config) {
22162
22163
  const pendingConfig = this.configChangePending;
@@ -23483,6 +23484,11 @@ function updateTableConfig(state, { columns, confirmed, filter, groupBy, sort })
23483
23484
  ...state,
23484
23485
  columns: (0, import_vuu_utils21.applyFilterToColumns)(result.columns, filter)
23485
23486
  };
23487
+ } else if (result.columns.some(import_vuu_utils21.isFilteredColumn)) {
23488
+ result = {
23489
+ ...state,
23490
+ columns: (0, import_vuu_utils21.stripFilterFromColumns)(result.columns)
23491
+ };
23486
23492
  }
23487
23493
  return result;
23488
23494
  }