@visactor/vtable-calendar 1.14.0 → 1.14.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.
- package/dist/vtable-calendar.js +12 -11
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +2 -2
package/dist/vtable-calendar.js
CHANGED
|
@@ -41651,7 +41651,7 @@
|
|
|
41651
41651
|
table: table
|
|
41652
41652
|
} = state;
|
|
41653
41653
|
let source, target;
|
|
41654
|
-
if (table.internalProps.transpose ? (sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = table.getRecordShowIndexByCell(targetIndex, 0)) : (source = table.getRecordIndexByCell(0, sourceIndex), target = table.getRecordIndexByCell(0, targetIndex)), isNumber$2(source) && isNumber$2(target)) {
|
|
41654
|
+
if (table.internalProps.transpose ? (sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = table.getRecordShowIndexByCell(targetIndex, 0)) : (source = table.isPivotTable() ? void 0 : table.getRecordIndexByCell(0, sourceIndex), target = table.isPivotTable() ? void 0 : table.getRecordIndexByCell(0, targetIndex)), isNumber$2(source) && isNumber$2(target)) {
|
|
41655
41655
|
if (sourceIndex > targetIndex) {
|
|
41656
41656
|
const sourceRecord = checkedState.get(sourceIndex.toString());
|
|
41657
41657
|
for (let i = sourceIndex; i > targetIndex; i--) checkedState.set(i.toString(), checkedState.get((i - 1).toString()));
|
|
@@ -46481,7 +46481,7 @@
|
|
|
46481
46481
|
constructor(container) {
|
|
46482
46482
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46483
46483
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46484
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.14.
|
|
46484
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.14.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
46485
46485
|
const {
|
|
46486
46486
|
frozenColCount = 0,
|
|
46487
46487
|
frozenRowCount: frozenRowCount,
|
|
@@ -46786,15 +46786,13 @@
|
|
|
46786
46786
|
heightWithoutPadding = 0;
|
|
46787
46787
|
if (this.canvasSizeSeted) widthWithoutPadding = this.canvasWidth, heightWithoutPadding = this.canvasHeight;else if (element.parentElement) {
|
|
46788
46788
|
const computedStyle = element.parentElement.style || window.getComputedStyle(element.parentElement);
|
|
46789
|
-
widthWithoutPadding = element.parentElement.offsetWidth - parseInt(computedStyle.paddingLeft || "0px", 10) - parseInt(computedStyle.paddingRight || "0px", 10), heightWithoutPadding = element.parentElement.offsetHeight - parseInt(computedStyle.paddingTop || "0px", 10) - parseInt(computedStyle.paddingBottom || "0px", 20);
|
|
46789
|
+
widthWithoutPadding = element.parentElement.offsetWidth - parseInt(computedStyle.paddingLeft || "0px", 10) - parseInt(computedStyle.paddingRight || "0px", 10), heightWithoutPadding = element.parentElement.offsetHeight - parseInt(computedStyle.paddingTop || "0px", 10) - parseInt(computedStyle.paddingBottom || "0px", 20), widthWithoutPadding = (null != widthWithoutPadding ? widthWithoutPadding : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), heightWithoutPadding = (null != heightWithoutPadding ? heightWithoutPadding : 1) - (this.options.tableSizeAntiJitter ? 1 : 0);
|
|
46790
46790
|
}
|
|
46791
|
-
|
|
46792
|
-
height1 = null != heightWithoutPadding ? heightWithoutPadding : 0;
|
|
46793
|
-
element.style.width = width1 && width1 - padding.left - padding.right + "px" || "0px", element.style.height = height1 && height1 - padding.top - padding.bottom + "px" || "0px";
|
|
46791
|
+
element.style.width = widthWithoutPadding && widthWithoutPadding - padding.left - padding.right + "px" || "0px", element.style.height = heightWithoutPadding && heightWithoutPadding - padding.top - padding.bottom + "px" || "0px";
|
|
46794
46792
|
const {
|
|
46795
46793
|
canvas: canvas
|
|
46796
46794
|
} = this.internalProps;
|
|
46797
|
-
widthP = null !== (_c = null === (_b = canvas.parentElement) || void 0 === _b ? void 0 : _b.offsetWidth) && void 0 !== _c ? _c : 0, heightP = null !== (_e = null === (_d = canvas.parentElement) || void 0 === _d ? void 0 : _d.offsetHeight) && void 0 !== _e ? _e : 0, (null === (_f = null == this ? void 0 : this.scenegraph) || void 0 === _f ? void 0 : _f.stage) ? this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "", canvas.style.height = "", canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`, canvas.style.height = `${heightP}px`);
|
|
46795
|
+
widthP = (null !== (_c = null === (_b = canvas.parentElement) || void 0 === _b ? void 0 : _b.offsetWidth) && void 0 !== _c ? _c : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), heightP = (null !== (_e = null === (_d = canvas.parentElement) || void 0 === _d ? void 0 : _d.offsetHeight) && void 0 !== _e ? _e : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), (null === (_f = null == this ? void 0 : this.scenegraph) || void 0 === _f ? void 0 : _f.stage) ? this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "", canvas.style.height = "", canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`, canvas.style.height = `${heightP}px`);
|
|
46798
46796
|
} else "node" === Env.mode && (widthP = this.canvasWidth - 1, heightP = this.canvasHeight - 1);
|
|
46799
46797
|
const width = Math.floor(widthP - getVerticalScrollBarSize(this.getTheme().scrollStyle)),
|
|
46800
46798
|
height = Math.floor(heightP - getHorizontalScrollBarSize(this.getTheme().scrollStyle));
|
|
@@ -49857,12 +49855,13 @@
|
|
|
49857
49855
|
newHeight = computeRowHeight(row, 0, table.colCount - 1, table);
|
|
49858
49856
|
table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
|
|
49859
49857
|
}
|
|
49860
|
-
table.
|
|
49858
|
+
const changedValue = table.getCellOriginValue(col, row);
|
|
49859
|
+
oldValue !== changedValue && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
|
|
49861
49860
|
col: col,
|
|
49862
49861
|
row: row,
|
|
49863
49862
|
rawValue: beforeChangeValue,
|
|
49864
49863
|
currentValue: oldValue,
|
|
49865
|
-
changedValue:
|
|
49864
|
+
changedValue: changedValue
|
|
49866
49865
|
}), table.scenegraph.updateNextFrame();
|
|
49867
49866
|
}
|
|
49868
49867
|
}
|
|
@@ -49908,12 +49907,14 @@
|
|
|
49908
49907
|
} = table.internalProps.layoutMap.getBody(startCol + j, startRow + i),
|
|
49909
49908
|
beforeChangeValue = beforeChangeValues[i][j],
|
|
49910
49909
|
oldValue = oldValues[i][j];
|
|
49911
|
-
table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value, recordIndex, field, startCol + j, startRow + i, table)
|
|
49910
|
+
table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value, recordIndex, field, startCol + j, startRow + i, table);
|
|
49911
|
+
const changedValue = table.getCellOriginValue(startCol + j, startRow + i);
|
|
49912
|
+
oldValue !== changedValue && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
|
|
49912
49913
|
col: startCol + j,
|
|
49913
49914
|
row: startRow + i,
|
|
49914
49915
|
rawValue: beforeChangeValue,
|
|
49915
49916
|
currentValue: oldValue,
|
|
49916
|
-
changedValue:
|
|
49917
|
+
changedValue: changedValue
|
|
49917
49918
|
});
|
|
49918
49919
|
}
|
|
49919
49920
|
}
|