@visactor/vtable 0.17.9-alpha.4 → 0.17.9-alpha.5

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.
@@ -65,4 +65,5 @@ Object.defineProperty(exports, "__esModule", {
65
65
  fontSize: 12,
66
66
  fontFamily: "Arial,sans-serif"
67
67
  }
68
- };
68
+ };
69
+ //# sourceMappingURL=BRIGHT.js.map
@@ -84,5 +84,4 @@ Object.defineProperty(exports, "__esModule", {
84
84
  fontSize: 12,
85
85
  fontFamily: "Arial,sans-serif"
86
86
  }
87
- };
88
- //# sourceMappingURL=DARK.js.map
87
+ };
package/dist/vtable.js CHANGED
@@ -46333,7 +46333,7 @@
46333
46333
  if (!eventArgsSet?.eventArgs) {
46334
46334
  return;
46335
46335
  }
46336
- if (eventManager.touchSetTimeout || e.pointerType !== 'touch') {
46336
+ if (eventManager.touchSetTimeout) {
46337
46337
  if (e.pointerType === 'touch') {
46338
46338
  const eventArgsSet = getCellEventArgsSet(e);
46339
46339
  if (eventManager.touchSetTimeout) {
@@ -46343,34 +46343,34 @@
46343
46343
  eventManager.touchSetTimeout = undefined;
46344
46344
  }
46345
46345
  }
46346
- if (table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
46347
- const { col, row } = eventArgsSet.eventArgs;
46348
- const cellInfo = table.getCellInfo(col, row);
46349
- let icon;
46350
- let position;
46351
- if (eventArgsSet.eventArgs?.target) {
46352
- const iconInfo = getIconAndPositionFromTarget(eventArgsSet.eventArgs?.target);
46353
- if (iconInfo) {
46354
- icon = iconInfo.icon;
46355
- position = iconInfo.position;
46356
- }
46346
+ }
46347
+ if (!eventManager.touchMove && table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
46348
+ const { col, row } = eventArgsSet.eventArgs;
46349
+ const cellInfo = table.getCellInfo(col, row);
46350
+ let icon;
46351
+ let position;
46352
+ if (eventArgsSet.eventArgs?.target) {
46353
+ const iconInfo = getIconAndPositionFromTarget(eventArgsSet.eventArgs?.target);
46354
+ if (iconInfo) {
46355
+ icon = iconInfo.icon;
46356
+ position = iconInfo.position;
46357
46357
  }
46358
- const cellsEvent = {
46359
- ...cellInfo,
46360
- event: e.nativeEvent,
46361
- federatedEvent: e,
46362
- cells: [],
46363
- targetIcon: icon
46364
- ? {
46365
- name: icon.name,
46366
- position: position,
46367
- funcType: icon.attribute.funcType
46368
- }
46369
- : undefined,
46370
- target: eventArgsSet?.eventArgs?.target
46371
- };
46372
- table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
46373
46358
  }
46359
+ const cellsEvent = {
46360
+ ...cellInfo,
46361
+ event: e.nativeEvent,
46362
+ federatedEvent: e,
46363
+ cells: [],
46364
+ targetIcon: icon
46365
+ ? {
46366
+ name: icon.name,
46367
+ position: position,
46368
+ funcType: icon.attribute.funcType
46369
+ }
46370
+ : undefined,
46371
+ target: eventArgsSet?.eventArgs?.target
46372
+ };
46373
+ table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
46374
46374
  }
46375
46375
  });
46376
46376
  table.scenegraph.stage.addEventListener('pointerdown', (e) => {
@@ -46816,7 +46816,10 @@
46816
46816
  handler.on(table.getElement(), 'contextmenu', (e) => {
46817
46817
  e.preventDefault();
46818
46818
  });
46819
- handler.on(table.getContainer(), 'resize', () => {
46819
+ handler.on(table.getContainer(), 'resize', e => {
46820
+ if (e.width === 0 && e.height === 0) {
46821
+ return;
46822
+ }
46820
46823
  table.resize();
46821
46824
  });
46822
46825
  }
@@ -50159,7 +50162,7 @@
50159
50162
  return TABLE_EVENT_TYPE;
50160
50163
  }
50161
50164
  options;
50162
- version = "0.17.9-alpha.4";
50165
+ version = "0.17.9-alpha.5";
50163
50166
  pagination;
50164
50167
  id = `VTable${Date.now()}`;
50165
50168
  headerStyleCache;
@@ -56731,12 +56734,11 @@
56731
56734
  const rowDimension = rowHeaderPaths[i];
56732
56735
  for (let j = 0; j < rowArr.length; j++) {
56733
56736
  const dimension = rowArr[j];
56734
- if ((!isValid$1(rowDimension.indicatorKey) &&
56737
+ if (((!isValid$1(rowDimension.indicatorKey) &&
56735
56738
  dimension.dimensionKey === rowDimension.dimensionKey &&
56736
56739
  dimension.value === rowDimension.value) ||
56737
- (isValid$1(rowDimension.indicatorKey) &&
56738
- dimension.indicatorKey === rowDimension.indicatorKey &&
56739
- (!rowDimension.value || dimension.value === rowDimension.value))) {
56740
+ (isValid$1(rowDimension.indicatorKey) && dimension.indicatorKey === rowDimension.indicatorKey)) &&
56741
+ dimension.value === rowDimension.value) {
56740
56742
  rowArr = dimension.children;
56741
56743
  if (needLowestLevel && !rowArr) {
56742
56744
  rowDimensionFinded = dimension;
@@ -60271,55 +60273,6 @@
60271
60273
  }
60272
60274
  return null;
60273
60275
  }
60274
- getCellAddressByRecord(record) {
60275
- const rowHeaderPaths = [];
60276
- const colHeaderPaths = [];
60277
- const recordKeyMapToIndicatorKeys = {};
60278
- const indicatorRecordKeys = [];
60279
- this.dataset.dataConfig.aggregationRules.forEach(aggregationRule => {
60280
- if (typeof aggregationRule.field === 'string') {
60281
- recordKeyMapToIndicatorKeys[aggregationRule.field] = aggregationRule.indicatorKey;
60282
- indicatorRecordKeys.push(aggregationRule.field);
60283
- }
60284
- else {
60285
- for (let i = 0; i < aggregationRule.field.length; i++) {
60286
- recordKeyMapToIndicatorKeys[aggregationRule.field[i]] = aggregationRule.indicatorKey;
60287
- indicatorRecordKeys.push(aggregationRule.field[i]);
60288
- }
60289
- }
60290
- });
60291
- for (const key in record) {
60292
- if (this.dataset.rows.indexOf(key) >= 0) {
60293
- rowHeaderPaths.push({
60294
- dimensionKey: key,
60295
- value: record[key]
60296
- });
60297
- }
60298
- if (this.dataset.columns.indexOf(key) >= 0) {
60299
- colHeaderPaths.push({
60300
- dimensionKey: key,
60301
- value: record[key]
60302
- });
60303
- }
60304
- if (indicatorRecordKeys.indexOf(key) >= 0) {
60305
- if (this.dataset.indicatorsAsCol) {
60306
- colHeaderPaths.push({
60307
- indicatorKey: recordKeyMapToIndicatorKeys[key]
60308
- });
60309
- }
60310
- else {
60311
- rowHeaderPaths.push({
60312
- indicatorKey: recordKeyMapToIndicatorKeys[key]
60313
- });
60314
- }
60315
- }
60316
- }
60317
- return this.getCellAddressByHeaderPaths({
60318
- rowHeaderPaths,
60319
- colHeaderPaths,
60320
- cellLocation: 'body'
60321
- });
60322
- }
60323
60276
  getChartInstance(cellHeaderPaths) {
60324
60277
  const cellAddr = this.getCellAddressByHeaderPaths(cellHeaderPaths);
60325
60278
  if (cellAddr) {
@@ -60952,7 +60905,7 @@
60952
60905
  return new Tag$1(params ? params.attribute : {});
60953
60906
  }
60954
60907
 
60955
- const version = "0.17.9-alpha.4";
60908
+ const version = "0.17.9-alpha.5";
60956
60909
  function getIcons() {
60957
60910
  return get$2();
60958
60911
  }