@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/cjs/PivotTable.js CHANGED
@@ -787,7 +787,7 @@ class PivotTable extends BaseTable_1.BaseTable {
787
787
  const oldHeight = this.getRowHeight(row), newHeight = (0, compute_row_height_1.computeRowHeight)(row, 0, this.colCount - 1, this);
788
788
  this.scenegraph.updateRowHeight(row, newHeight - oldHeight);
789
789
  }
790
- this.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
790
+ oldValue !== newValue && this.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
791
791
  col: col,
792
792
  row: row,
793
793
  rawValue: rawValue,
@@ -819,13 +819,14 @@ class PivotTable extends BaseTable_1.BaseTable {
819
819
  let newValue = value;
820
820
  const oldValue = oldValues[i][j], rawValue = beforeChangeValues[i][j];
821
821
  "number" == typeof rawValue && (0, util_1.isAllDigits)(value) && (newValue = parseFloat(value)),
822
- this._changeCellValueToDataSet(startCol + j, startRow + i, oldValue, newValue),
823
- this.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
822
+ this._changeCellValueToDataSet(startCol + j, startRow + i, oldValue, newValue);
823
+ const changedValue = this.getCellOriginValue(startCol + j, startRow + i);
824
+ changedValue !== oldValue && this.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
824
825
  col: startCol + j,
825
826
  row: startRow + i,
826
827
  rawValue: rawValue,
827
828
  currentValue: oldValue,
828
- changedValue: this.getCellOriginValue(startCol + j, startRow + i)
829
+ changedValue: changedValue
829
830
  });
830
831
  }
831
832
  pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);