@visactor/vtable 1.11.2 → 1.11.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/cjs/ListTable.js +15 -12
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +6 -6
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +13 -11
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/react/react-custom-layout.d.ts +5 -1
- package/cjs/components/react/react-custom-layout.js +19 -5
- package/cjs/components/react/react-custom-layout.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -1
- package/cjs/core/BaseTable.js +6 -5
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/record-helper.js +5 -3
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/event/event.js +3 -3
- package/cjs/event/event.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/plugins/custom-cell-style.js +2 -2
- package/cjs/plugins/custom-cell-style.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +46 -22
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -1
- package/cjs/scenegraph/scenegraph.js +6 -1
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/checkbox/checkbox.js +2 -2
- package/cjs/state/checkbox/checkbox.js.map +1 -1
- package/cjs/state/select/is-cell-select-highlight.js +4 -4
- package/cjs/state/select/is-cell-select-highlight.js.map +1 -1
- package/cjs/state/select/update-position.js +5 -5
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/state.js +1 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +1 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +172 -75
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +15 -12
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +6 -6
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +13 -11
- package/es/PivotTable.js.map +1 -1
- package/es/components/react/react-custom-layout.d.ts +5 -1
- package/es/components/react/react-custom-layout.js +19 -5
- package/es/components/react/react-custom-layout.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -1
- package/es/core/BaseTable.js +5 -4
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/record-helper.js +5 -3
- package/es/core/record-helper.js.map +1 -1
- package/es/event/event.js +3 -3
- package/es/event/event.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/plugins/custom-cell-style.js +2 -2
- package/es/plugins/custom-cell-style.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +46 -22
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -1
- package/es/scenegraph/scenegraph.js +6 -1
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/checkbox/checkbox.js +2 -2
- package/es/state/checkbox/checkbox.js.map +1 -1
- package/es/state/select/is-cell-select-highlight.js +4 -4
- package/es/state/select/is-cell-select-highlight.js.map +1 -1
- package/es/state/select/update-position.js +5 -5
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/state.js +1 -1
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +1 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +1 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
package/cjs/PivotTable.js
CHANGED
|
@@ -33,7 +33,7 @@ const ts_types_1 = require("./ts-types"), pivot_header_layout_1 = require("./lay
|
|
|
33
33
|
|
|
34
34
|
class PivotTable extends BaseTable_1.BaseTable {
|
|
35
35
|
constructor(container, options) {
|
|
36
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
36
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
37
37
|
if ("node" === env_1.Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
|
|
38
38
|
container = container.container ? container.container : null), super(container, options),
|
|
39
39
|
this.layoutNodeId = {
|
|
@@ -81,9 +81,9 @@ class PivotTable extends BaseTable_1.BaseTable {
|
|
|
81
81
|
const Title = factory_1.Factory.getComponent("title");
|
|
82
82
|
this.internalProps.title = new Title(options.title, this), this.scenegraph.resize();
|
|
83
83
|
}
|
|
84
|
-
if (this.options.emptyTip) if (this.internalProps.emptyTip) this.internalProps.emptyTip.resetVisible(); else {
|
|
84
|
+
if (this.options.emptyTip) if (this.internalProps.emptyTip) null === (_s = this.internalProps.emptyTip) || void 0 === _s || _s.resetVisible(); else {
|
|
85
85
|
const EmptyTip = factory_1.Factory.getComponent("emptyTip");
|
|
86
|
-
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
|
|
86
|
+
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_t = this.internalProps.emptyTip) || void 0 === _t || _t.resetVisible();
|
|
87
87
|
}
|
|
88
88
|
setTimeout((() => {
|
|
89
89
|
this.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
@@ -118,7 +118,7 @@ class PivotTable extends BaseTable_1.BaseTable {
|
|
|
118
118
|
return ifCan;
|
|
119
119
|
}
|
|
120
120
|
updateOption(options) {
|
|
121
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
121
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
122
122
|
const internalProps = this.internalProps;
|
|
123
123
|
if (super.updateOption(options), this.layoutNodeId = {
|
|
124
124
|
seqId: 0
|
|
@@ -176,9 +176,9 @@ class PivotTable extends BaseTable_1.BaseTable {
|
|
|
176
176
|
const Title = factory_1.Factory.getComponent("title");
|
|
177
177
|
this.internalProps.title = new Title(options.title, this), this.scenegraph.resize();
|
|
178
178
|
}
|
|
179
|
-
if (this.options.emptyTip) if (this.internalProps.emptyTip) this.internalProps.emptyTip.resetVisible(); else {
|
|
179
|
+
if (this.options.emptyTip) if (this.internalProps.emptyTip) null === (_u = this.internalProps.emptyTip) || void 0 === _u || _u.resetVisible(); else {
|
|
180
180
|
const EmptyTip = factory_1.Factory.getComponent("emptyTip");
|
|
181
|
-
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
|
|
181
|
+
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_v = this.internalProps.emptyTip) || void 0 === _v || _v.resetVisible();
|
|
182
182
|
}
|
|
183
183
|
return new Promise((resolve => {
|
|
184
184
|
setTimeout(resolve, 0);
|
|
@@ -519,8 +519,10 @@ class PivotTable extends BaseTable_1.BaseTable {
|
|
|
519
519
|
_parseColumnWidthConfig(columnWidthConfig) {
|
|
520
520
|
for (let i = 0; i < (null == columnWidthConfig ? void 0 : columnWidthConfig.length); i++) {
|
|
521
521
|
const item = columnWidthConfig[i], dimensions = item.dimensions, width = item.width, cell = this.getCellAddressByHeaderPaths(dimensions);
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
if (cell.col >= this.rowHeaderLevelCount) {
|
|
523
|
+
this.getCellHeaderPaths(cell.col, this.columnHeaderLevelCount - 1).colHeaderPaths.length === dimensions.length && cell && !this.internalProps._widthResizedColMap.has(cell.col) && (this._setColWidth(cell.col, width),
|
|
524
|
+
this.internalProps._widthResizedColMap.add(cell.col));
|
|
525
|
+
}
|
|
524
526
|
}
|
|
525
527
|
}
|
|
526
528
|
updatePivotSortState(pivotSortStateConfig) {
|
|
@@ -675,7 +677,7 @@ class PivotTable extends BaseTable_1.BaseTable {
|
|
|
675
677
|
};
|
|
676
678
|
}
|
|
677
679
|
setRecords(records) {
|
|
678
|
-
var _a, _b, _c, _d, _e;
|
|
680
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
679
681
|
const oldHoverState = {
|
|
680
682
|
col: this.stateManager.hover.cellPos.col,
|
|
681
683
|
row: this.stateManager.hover.cellPos.row
|
|
@@ -700,9 +702,9 @@ class PivotTable extends BaseTable_1.BaseTable {
|
|
|
700
702
|
this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row),
|
|
701
703
|
this.internalProps.title && !this.internalProps.title.isReleased && (this._updateSize(),
|
|
702
704
|
this.internalProps.title.resize(), this.scenegraph.resize()), this.eventManager.updateEventBinder(),
|
|
703
|
-
this.options.emptyTip) if (this.internalProps.emptyTip) this.internalProps.emptyTip.resetVisible(); else {
|
|
705
|
+
this.options.emptyTip) if (this.internalProps.emptyTip) null === (_f = this.internalProps.emptyTip) || void 0 === _f || _f.resetVisible(); else {
|
|
704
706
|
const EmptyTip = factory_1.Factory.getComponent("emptyTip");
|
|
705
|
-
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), this.internalProps.emptyTip.resetVisible();
|
|
707
|
+
this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_g = this.internalProps.emptyTip) || void 0 === _g || _g.resetVisible();
|
|
706
708
|
}
|
|
707
709
|
}
|
|
708
710
|
startEditCell(col, row, value) {
|