@visactor/vtable 0.17.9-alpha.1 → 0.17.9-alpha.3

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/vtable.js CHANGED
@@ -46816,10 +46816,7 @@
46816
46816
  handler.on(table.getElement(), 'contextmenu', (e) => {
46817
46817
  e.preventDefault();
46818
46818
  });
46819
- handler.on(table.getContainer(), 'resize', e => {
46820
- if (e.width === 0 && e.height === 0) {
46821
- return;
46822
- }
46819
+ handler.on(table.getContainer(), 'resize', () => {
46823
46820
  table.resize();
46824
46821
  });
46825
46822
  }
@@ -50162,7 +50159,7 @@
50162
50159
  return TABLE_EVENT_TYPE;
50163
50160
  }
50164
50161
  options;
50165
- version = "0.17.9-alpha.1";
50162
+ version = "0.17.9-alpha.3";
50166
50163
  pagination;
50167
50164
  id = `VTable${Date.now()}`;
50168
50165
  headerStyleCache;
@@ -50540,8 +50537,8 @@
50540
50537
  let heightP = 0;
50541
50538
  if (Env.mode === 'browser') {
50542
50539
  const element = this.getElement();
50543
- const width1 = (element.parentElement?.offsetWidth ?? 1) - 1;
50544
- const height1 = (element.parentElement?.offsetHeight ?? 1) - 1;
50540
+ const width1 = element.parentElement?.offsetWidth ?? 1 - 1;
50541
+ const height1 = element.parentElement?.offsetHeight ?? 1 - 1;
50545
50542
  element.style.width = (width1 && `${width1 - padding.left - padding.right}px`) || '0px';
50546
50543
  element.style.height = (height1 && `${height1 - padding.top - padding.bottom}px`) || '0px';
50547
50544
  const { canvas } = this.internalProps;
@@ -56734,11 +56731,12 @@
56734
56731
  const rowDimension = rowHeaderPaths[i];
56735
56732
  for (let j = 0; j < rowArr.length; j++) {
56736
56733
  const dimension = rowArr[j];
56737
- if (((!isValid$1(rowDimension.indicatorKey) &&
56734
+ if ((!isValid$1(rowDimension.indicatorKey) &&
56738
56735
  dimension.dimensionKey === rowDimension.dimensionKey &&
56739
56736
  dimension.value === rowDimension.value) ||
56740
- (isValid$1(rowDimension.indicatorKey) && dimension.indicatorKey === rowDimension.indicatorKey)) &&
56741
- dimension.value === rowDimension.value) {
56737
+ (isValid$1(rowDimension.indicatorKey) &&
56738
+ dimension.indicatorKey === rowDimension.indicatorKey &&
56739
+ (!rowDimension.value || dimension.value === rowDimension.value))) {
56742
56740
  rowArr = dimension.children;
56743
56741
  if (needLowestLevel && !rowArr) {
56744
56742
  rowDimensionFinded = dimension;
@@ -60273,6 +60271,42 @@
60273
60271
  }
60274
60272
  return null;
60275
60273
  }
60274
+ getCellAddressByRecord(record) {
60275
+ const rowHeaderPaths = [];
60276
+ const colHeaderPaths = [];
60277
+ for (const key in record) {
60278
+ if (this.dataset.rows.indexOf(key) >= 0) {
60279
+ rowHeaderPaths.push({
60280
+ dimensionKey: key,
60281
+ value: record[key]
60282
+ });
60283
+ }
60284
+ if (this.dataset.columns.indexOf(key) >= 0) {
60285
+ colHeaderPaths.push({
60286
+ dimensionKey: key,
60287
+ value: record[key]
60288
+ });
60289
+ }
60290
+ if (this.dataset.indicatorKeys.indexOf(key) >= 0) {
60291
+ if (this.dataset.indicatorsAsCol) {
60292
+ colHeaderPaths.push({
60293
+ indicatorKey: key,
60294
+ value: record[key]
60295
+ });
60296
+ }
60297
+ else {
60298
+ rowHeaderPaths.push({
60299
+ indicatorKey: key
60300
+ });
60301
+ }
60302
+ }
60303
+ }
60304
+ return this.getCellAddressByHeaderPaths({
60305
+ rowHeaderPaths,
60306
+ colHeaderPaths,
60307
+ cellLocation: 'body'
60308
+ });
60309
+ }
60276
60310
  getChartInstance(cellHeaderPaths) {
60277
60311
  const cellAddr = this.getCellAddressByHeaderPaths(cellHeaderPaths);
60278
60312
  if (cellAddr) {
@@ -60905,7 +60939,7 @@
60905
60939
  return new Tag$1(params ? params.attribute : {});
60906
60940
  }
60907
60941
 
60908
- const version = "0.17.9-alpha.1";
60942
+ const version = "0.17.9-alpha.3";
60909
60943
  function getIcons() {
60910
60944
  return get$2();
60911
60945
  }