@visactor/vtable 1.13.1-alpha.4 → 1.13.1

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.
Files changed (53) hide show
  1. package/cjs/ListTable.js +1 -1
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotTable.js +1 -1
  4. package/cjs/PivotTable.js.map +1 -1
  5. package/cjs/core/BaseTable.d.ts +3 -3
  6. package/cjs/core/BaseTable.js +3 -3
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/core/record-helper.js +1 -1
  9. package/cjs/core/record-helper.js.map +1 -1
  10. package/cjs/dataset/dataset-pivot-table.js +1 -2
  11. package/cjs/edit/edit-manager.d.ts +2 -2
  12. package/cjs/edit/edit-manager.js +7 -15
  13. package/cjs/edit/edit-manager.js.map +1 -1
  14. package/cjs/edit/editors.js +2 -1
  15. package/cjs/index.d.ts +1 -1
  16. package/cjs/index.js +1 -1
  17. package/cjs/index.js.map +1 -1
  18. package/cjs/plugins/custom-cell-style.d.ts +1 -1
  19. package/cjs/plugins/custom-cell-style.js +2 -1
  20. package/cjs/plugins/custom-cell-style.js.map +1 -1
  21. package/cjs/ts-types/base-table.d.ts +2 -2
  22. package/cjs/ts-types/base-table.js.map +1 -1
  23. package/cjs/ts-types/table-engine.d.ts +3 -3
  24. package/cjs/ts-types/table-engine.js.map +1 -1
  25. package/cjs/vrender.js.map +1 -1
  26. package/dist/vtable.js +28 -47
  27. package/dist/vtable.min.js +2 -2
  28. package/es/ListTable.js +2 -2
  29. package/es/ListTable.js.map +1 -1
  30. package/es/PivotTable.js +2 -2
  31. package/es/PivotTable.js.map +1 -1
  32. package/es/core/BaseTable.d.ts +3 -3
  33. package/es/core/BaseTable.js +3 -3
  34. package/es/core/BaseTable.js.map +1 -1
  35. package/es/core/record-helper.js +1 -1
  36. package/es/core/record-helper.js.map +1 -1
  37. package/es/dataset/dataset-pivot-table.js +1 -2
  38. package/es/edit/edit-manager.d.ts +2 -2
  39. package/es/edit/edit-manager.js +4 -12
  40. package/es/edit/edit-manager.js.map +1 -1
  41. package/es/edit/editors.js +2 -1
  42. package/es/index.d.ts +1 -1
  43. package/es/index.js +1 -1
  44. package/es/index.js.map +1 -1
  45. package/es/plugins/custom-cell-style.d.ts +1 -1
  46. package/es/plugins/custom-cell-style.js +2 -1
  47. package/es/plugins/custom-cell-style.js.map +1 -1
  48. package/es/ts-types/base-table.d.ts +2 -2
  49. package/es/ts-types/base-table.js.map +1 -1
  50. package/es/ts-types/table-engine.d.ts +3 -3
  51. package/es/ts-types/table-engine.js.map +1 -1
  52. package/es/vrender.js.map +1 -1
  53. package/package.json +8 -8
package/dist/vtable.js CHANGED
@@ -12229,7 +12229,10 @@
12229
12229
  const {
12230
12230
  context: context
12231
12231
  } = drawContext;
12232
- if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
12232
+ context.highPerformanceSave();
12233
+ const t1 = graphic.parent.globalTransMatrix,
12234
+ t2 = graphic.stage.window.getViewBoxTransform().clone().multiply(t1.a, t1.b, t1.c, t1.d, t1.e, t1.f);
12235
+ if (graphic.parent && context.setTransformFromMatrix(t2, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
12233
12236
  tempDirtyBounds.copy(drawContribution.dirtyBounds), tempBackupDirtyBounds.copy(drawContribution.backupDirtyBounds);
12234
12237
  const m = graphic.globalTransMatrix.getInverse();
12235
12238
  drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m), drawContribution.backupDirtyBounds.copy(drawContribution.dirtyBounds);
@@ -57992,7 +57995,7 @@
57992
57995
  });
57993
57996
  this.table.scenegraph.updateNextFrame();
57994
57997
  }
57995
- arrangeCustomCellStyle(cellPos, customStyleId, forceFastUpdate) {
57998
+ arrangeCustomCellStyle(cellPos, customStyleId) {
57996
57999
  const index = this.customCellStyleArrangement.findIndex(style => {
57997
58000
  if (style.cellPosition.range && cellPos.range) {
57998
58001
  return (style.cellPosition.range.start.col === cellPos.range.start.col &&
@@ -58025,6 +58028,7 @@
58025
58028
  this.customCellStyleArrangement.splice(index, 1);
58026
58029
  }
58027
58030
  const style = this.getCustomCellStyleOption(customStyleId)?.style;
58031
+ let forceFastUpdate;
58028
58032
  if (style) {
58029
58033
  forceFastUpdate = true;
58030
58034
  for (const key in style) {
@@ -58336,7 +58340,7 @@
58336
58340
  return TABLE_EVENT_TYPE;
58337
58341
  }
58338
58342
  options;
58339
- version = "1.13.1-alpha.4";
58343
+ version = "1.13.1";
58340
58344
  pagination;
58341
58345
  id = `VTable${Date.now()}`;
58342
58346
  headerStyleCache;
@@ -60900,8 +60904,8 @@
60900
60904
  registerCustomCellStyle(customStyleId, customStyle) {
60901
60905
  this.customCellStylePlugin?.registerCustomCellStyle(customStyleId, customStyle);
60902
60906
  }
60903
- arrangeCustomCellStyle(cellPos, customStyleId, forceFastUpdate) {
60904
- this.customCellStylePlugin?.arrangeCustomCellStyle(cellPos, customStyleId, forceFastUpdate);
60907
+ arrangeCustomCellStyle(cellPos, customStyleId) {
60908
+ this.customCellStylePlugin?.arrangeCustomCellStyle(cellPos, customStyleId);
60905
60909
  }
60906
60910
  isSeriesNumber(col, row) {
60907
60911
  return this.internalProps.layoutMap.isSeriesNumber(col, row);
@@ -63401,7 +63405,7 @@
63401
63405
  }
63402
63406
  }
63403
63407
 
63404
- class EditManager {
63408
+ class EditManeger {
63405
63409
  table;
63406
63410
  editingEditor;
63407
63411
  isValidatingValue = false;
@@ -63496,14 +63500,19 @@
63496
63500
  if (!this.editingEditor.getValue) ;
63497
63501
  if (this.editingEditor.validateValue) {
63498
63502
  this.isValidatingValue = true;
63499
- const newValue = this.editingEditor.getValue();
63500
- const oldValue = this.table.getCellOriginValue(this.editCell.col, this.editCell.row);
63501
- const maybePromiseOrValue = this.editingEditor.validateValue?.(newValue, oldValue, this.editCell, this.table);
63503
+ const maybePromiseOrValue = this.editingEditor.validateValue?.();
63502
63504
  if (isPromise(maybePromiseOrValue)) {
63503
63505
  return new Promise((resolve, reject) => {
63504
63506
  maybePromiseOrValue
63505
63507
  .then(result => {
63506
- dealWithValidateValue(result, this, oldValue, resolve);
63508
+ if (result) {
63509
+ this.doExit();
63510
+ resolve(true);
63511
+ }
63512
+ else {
63513
+ this.isValidatingValue = false;
63514
+ resolve(false);
63515
+ }
63507
63516
  })
63508
63517
  .catch((err) => {
63509
63518
  this.isValidatingValue = false;
@@ -63511,7 +63520,11 @@
63511
63520
  });
63512
63521
  });
63513
63522
  }
63514
- return dealWithValidateValue(maybePromiseOrValue, this, oldValue);
63523
+ else if (maybePromiseOrValue) {
63524
+ this.doExit();
63525
+ return true;
63526
+ }
63527
+ return false;
63515
63528
  }
63516
63529
  this.doExit();
63517
63530
  return true;
@@ -63542,35 +63555,6 @@
63542
63555
  }
63543
63556
  }
63544
63557
  }
63545
- function dealWithValidateValue(validateValue, editManager, oldValue, resolve) {
63546
- editManager.isValidatingValue = false;
63547
- if (validateValue === 'validate-return') {
63548
- editManager.doExit();
63549
- resolve?.(true);
63550
- return true;
63551
- }
63552
- else if (validateValue === 'invalidate-return') {
63553
- editManager.editingEditor.setValue(oldValue);
63554
- editManager.doExit();
63555
- resolve?.(true);
63556
- return true;
63557
- }
63558
- else if (validateValue === 'validate-not-return') {
63559
- resolve?.(false);
63560
- return false;
63561
- }
63562
- else if (validateValue === 'invalidate-not-return') {
63563
- resolve?.(false);
63564
- return false;
63565
- }
63566
- else if (validateValue === true) {
63567
- editManager.doExit();
63568
- resolve?.(true);
63569
- return true;
63570
- }
63571
- resolve?.(false);
63572
- return false;
63573
- }
63574
63558
 
63575
63559
  function getGroupByDataConfig(groupByOption) {
63576
63560
  if (isString$2(groupByOption)) {
@@ -63711,10 +63695,7 @@
63711
63695
  isCanChange = true;
63712
63696
  }
63713
63697
  else {
63714
- isCanChange =
63715
- maybePromiseOrValue === true ||
63716
- maybePromiseOrValue === 'validate-return' ||
63717
- maybePromiseOrValue === 'invalidate-return';
63698
+ isCanChange = maybePromiseOrValue;
63718
63699
  }
63719
63700
  }
63720
63701
  }
@@ -64352,7 +64333,7 @@
64352
64333
  this.showHeader = options.showHeader ?? true;
64353
64334
  this.transpose = options.transpose ?? false;
64354
64335
  if (Env.mode !== 'node') {
64355
- this.editorManager = new EditManager(this);
64336
+ this.editorManager = new EditManeger(this);
64356
64337
  }
64357
64338
  this.refreshHeader();
64358
64339
  this.internalProps.useOneRowHeightFillAll = false;
@@ -75797,7 +75778,7 @@
75797
75778
  this.pivotSortState = options.pivotSortState;
75798
75779
  }
75799
75780
  if (Env.mode !== 'node') {
75800
- this.editorManager = new EditManager(this);
75781
+ this.editorManager = new EditManeger(this);
75801
75782
  }
75802
75783
  this.refreshHeader();
75803
75784
  this.internalProps.useOneRowHeightFillAll = false;
@@ -78833,7 +78814,7 @@
78833
78814
  }
78834
78815
 
78835
78816
  registerForVrender();
78836
- const version = "1.13.1-alpha.4";
78817
+ const version = "1.13.1";
78837
78818
  function getIcons() {
78838
78819
  return get$2();
78839
78820
  }