@visactor/vtable 1.14.0 → 1.14.2

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 (63) hide show
  1. package/cjs/PivotTable.js +5 -4
  2. package/cjs/PivotTable.js.map +1 -1
  3. package/cjs/core/BaseTable.js +8 -7
  4. package/cjs/core/BaseTable.js.map +1 -1
  5. package/cjs/core/record-helper.js +7 -5
  6. package/cjs/core/record-helper.js.map +1 -1
  7. package/cjs/index.d.ts +1 -1
  8. package/cjs/index.js +1 -1
  9. package/cjs/index.js.map +1 -1
  10. package/cjs/layout/chart-helper/get-chart-spec.js +9 -2
  11. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  12. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +4 -4
  13. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  14. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +4 -4
  15. package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  16. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +2 -2
  17. package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  18. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +9 -1
  19. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  20. package/cjs/scenegraph/group-creater/progress/update-position/util.js +2 -2
  21. package/cjs/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
  22. package/cjs/scenegraph/layout/update-width.js +1 -2
  23. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  24. package/cjs/scenegraph/scenegraph.js +6 -3
  25. package/cjs/scenegraph/scenegraph.js.map +1 -1
  26. package/cjs/state/checkbox/checkbox.js +3 -3
  27. package/cjs/state/checkbox/checkbox.js.map +1 -1
  28. package/cjs/ts-types/base-table.d.ts +1 -0
  29. package/cjs/ts-types/base-table.js.map +1 -1
  30. package/cjs/vrender.js.map +1 -1
  31. package/dist/vtable.js +345 -221
  32. package/dist/vtable.min.js +2 -2
  33. package/es/PivotTable.js +5 -4
  34. package/es/PivotTable.js.map +1 -1
  35. package/es/core/BaseTable.js +8 -7
  36. package/es/core/BaseTable.js.map +1 -1
  37. package/es/core/record-helper.js +7 -5
  38. package/es/core/record-helper.js.map +1 -1
  39. package/es/index.d.ts +1 -1
  40. package/es/index.js +1 -1
  41. package/es/index.js.map +1 -1
  42. package/es/layout/chart-helper/get-chart-spec.js +9 -2
  43. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  44. package/es/scenegraph/graphic/contributions/group-contribution-render.js +4 -4
  45. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  46. package/es/scenegraph/graphic/contributions/rect-contribution-render.js +4 -4
  47. package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
  48. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +2 -2
  49. package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
  50. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +9 -1
  51. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
  52. package/es/scenegraph/group-creater/progress/update-position/util.js +2 -2
  53. package/es/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
  54. package/es/scenegraph/layout/update-width.js +1 -2
  55. package/es/scenegraph/layout/update-width.js.map +1 -1
  56. package/es/scenegraph/scenegraph.js +6 -3
  57. package/es/scenegraph/scenegraph.js.map +1 -1
  58. package/es/state/checkbox/checkbox.js +3 -2
  59. package/es/state/checkbox/checkbox.js.map +1 -1
  60. package/es/ts-types/base-table.d.ts +1 -0
  61. package/es/ts-types/base-table.js.map +1 -1
  62. package/es/vrender.js.map +1 -1
  63. package/package.json +7 -7
package/es/PivotTable.js CHANGED
@@ -786,7 +786,7 @@ export class PivotTable extends BaseTable {
786
786
  const oldHeight = this.getRowHeight(row), newHeight = computeRowHeight(row, 0, this.colCount - 1, this);
787
787
  this.scenegraph.updateRowHeight(row, newHeight - oldHeight);
788
788
  }
789
- this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
789
+ oldValue !== newValue && this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
790
790
  col: col,
791
791
  row: row,
792
792
  rawValue: rawValue,
@@ -818,13 +818,14 @@ export class PivotTable extends BaseTable {
818
818
  let newValue = value;
819
819
  const oldValue = oldValues[i][j], rawValue = beforeChangeValues[i][j];
820
820
  "number" == typeof rawValue && isAllDigits(value) && (newValue = parseFloat(value)),
821
- this._changeCellValueToDataSet(startCol + j, startRow + i, oldValue, newValue),
822
- this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
821
+ this._changeCellValueToDataSet(startCol + j, startRow + i, oldValue, newValue);
822
+ const changedValue = this.getCellOriginValue(startCol + j, startRow + i);
823
+ changedValue !== oldValue && this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
823
824
  col: startCol + j,
824
825
  row: startRow + i,
825
826
  rawValue: rawValue,
826
827
  currentValue: oldValue,
827
- changedValue: this.getCellOriginValue(startCol + j, startRow + i)
828
+ changedValue: changedValue
828
829
  });
829
830
  }
830
831
  pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);