@visactor/vtable-calendar 1.16.0-alpha.1 → 1.16.0
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 +49 -22
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
package/dist/vtable-calendar.js
CHANGED
|
@@ -33220,6 +33220,7 @@
|
|
|
33220
33220
|
lineClamp: lineClamp,
|
|
33221
33221
|
wordBreak: "break-word",
|
|
33222
33222
|
heightLimit: !1 === (null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.limitContentHeight) || autoRowHeight && !(null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.multilinesForXTable) ? -1 : cellHeight - Math.floor(padding[0] + padding[2]),
|
|
33223
|
+
pickable: !1,
|
|
33223
33224
|
dx: ("left" === textAlign ? hierarchyOffset : 0) + _contentOffset,
|
|
33224
33225
|
whiteSpace: !1 === (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.limitContentHeight) || 1 !== text.length || autoWrapText ? "normal" : "no-wrap",
|
|
33225
33226
|
keepCenterInLine: !0
|
|
@@ -33676,8 +33677,16 @@
|
|
|
33676
33677
|
if ("text" === type || "link" === type || customResult) {
|
|
33677
33678
|
if ("link" === type) {
|
|
33678
33679
|
const cellValue = value,
|
|
33680
|
+
cellOriginValue = table.getCellOriginValue(col, row),
|
|
33679
33681
|
headerStyle = table._getCellStyle(col, row);
|
|
33680
|
-
"link" === type && ("templateLink" in define && define.templateLink || !("linkDetect" in define) || !define.linkDetect
|
|
33682
|
+
"link" === type && ("templateLink" in define && define.templateLink || !("linkDetect" in define) || !getOrApply(define.linkDetect, {
|
|
33683
|
+
col: col,
|
|
33684
|
+
row: row,
|
|
33685
|
+
table: table,
|
|
33686
|
+
value: cellValue,
|
|
33687
|
+
dataValue: cellOriginValue,
|
|
33688
|
+
cellHeaderPaths: void 0
|
|
33689
|
+
}) || regUrl.test(cellValue)) && (cellTheme ? (cellTheme.text.fill = getProp("linkColor", headerStyle, col, row, table), cellTheme.group.cursor = "pointer") : cellTheme = {
|
|
33681
33690
|
text: {
|
|
33682
33691
|
fill: getProp("linkColor", headerStyle, col, row, table)
|
|
33683
33692
|
},
|
|
@@ -34117,12 +34126,20 @@
|
|
|
34117
34126
|
class FastTextMeasureContribution extends DefaultTextMeasureContribution {
|
|
34118
34127
|
_fastMeasure(text, options) {
|
|
34119
34128
|
const {
|
|
34120
|
-
|
|
34121
|
-
|
|
34122
|
-
|
|
34123
|
-
|
|
34124
|
-
|
|
34125
|
-
|
|
34129
|
+
fontSize: fontSize,
|
|
34130
|
+
fontFamily = "Arial,sans-serif",
|
|
34131
|
+
fontWeight = "normal",
|
|
34132
|
+
fontStyle = "normal"
|
|
34133
|
+
} = options,
|
|
34134
|
+
textMeasure = getFastTextMeasure(fontSize, fontWeight, fontFamily, fontStyle).measure(text, textMeasureMode);
|
|
34135
|
+
if (!isValid$3(textMeasure.fontBoundingBoxAscent) && !isValid$3(textMeasure.fontBoundingBoxDescent)) {
|
|
34136
|
+
const {
|
|
34137
|
+
ascent: ascent,
|
|
34138
|
+
descent: descent
|
|
34139
|
+
} = this.measureTextBoundADscentEstimate(options);
|
|
34140
|
+
textMeasure.fontBoundingBoxAscent = ascent, textMeasure.fontBoundingBoxDescent = descent;
|
|
34141
|
+
}
|
|
34142
|
+
return textMeasure;
|
|
34126
34143
|
}
|
|
34127
34144
|
measureTextWidth(text, options) {
|
|
34128
34145
|
return this._fastMeasure(text, options).width;
|
|
@@ -40950,15 +40967,10 @@
|
|
|
40950
40967
|
this.isPivot || (this.table.transpose ? this.proxy.sortCellHorizontal() : this.proxy.sortCellVertical());
|
|
40951
40968
|
}
|
|
40952
40969
|
getCellOverflowText(col, row) {
|
|
40953
|
-
var _a, _b;
|
|
40954
40970
|
const text = this.getCell(col, row).getChildByName("text", !0);
|
|
40955
40971
|
if (text && "text" === text.type) {
|
|
40956
40972
|
if (text.attribute.moreThanMaxCharacters) return this.table.getCellValue(col, row);
|
|
40957
|
-
|
|
40958
|
-
let cacheStr = "";
|
|
40959
|
-
if (isString$4(text.cache.clipedText) ? cacheStr = text.cache.clipedText : null === (_b = null === (_a = text.cache.layoutData) || void 0 === _a ? void 0 : _a.lines) || void 0 === _b || _b.forEach(line => {
|
|
40960
|
-
cacheStr += line.str;
|
|
40961
|
-
}), cacheStr !== textAttributeStr) return this.table.getCellValue(col, row);
|
|
40973
|
+
if (text.cliped) return this.table.getCellValue(col, row);
|
|
40962
40974
|
} else if (text && "richtext" === text.type) {
|
|
40963
40975
|
const richtext = text;
|
|
40964
40976
|
if (richtext.attribute.ellipsis && richtext._frameCache && richtext.attribute.height < richtext._frameCache.actualHeight) {
|
|
@@ -41935,7 +41947,7 @@
|
|
|
41935
41947
|
if (state._checkboxCellTypeFields = [], state._headerCheckFuncs = {}, state.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
|
|
41936
41948
|
if ("checkbox" === hd.headerType) {
|
|
41937
41949
|
const headerChecked = hd.define.checked;
|
|
41938
|
-
null == headerChecked || "function" == typeof headerChecked ? (isNeedInitHeaderCheckedStateFromRecord = !0, "function" == typeof headerChecked && (state._headerCheckFuncs[hd.field] = headerChecked)) : state.headerCheckedState[hd.field] = headerChecked, "checkbox" !== hd.define.cellType || hd.fieldFormat || state._checkboxCellTypeFields.push(hd.field);
|
|
41950
|
+
null == headerChecked || "function" == typeof headerChecked ? (isNeedInitHeaderCheckedStateFromRecord = !0, "function" == typeof headerChecked && (state._headerCheckFuncs[hd.field] = headerChecked)) : state.headerCheckedState[hd.field] = headerChecked, "checkbox" !== hd.define.cellType && !isFunction$5(hd.define.cellType) || hd.fieldFormat || state._checkboxCellTypeFields.push(hd.field);
|
|
41939
41951
|
}
|
|
41940
41952
|
}), 1 === state.table.leftRowSeriesNumberCount) state.headerCheckedState._vtable_rowSeries_number = !1, state._checkboxCellTypeFields.push("_vtable_rowSeries_number"), isNeedInitHeaderCheckedStateFromRecord = !0;else if (state.table.leftRowSeriesNumberCount > 1) {
|
|
41941
41953
|
for (let i = 0; i < state.table.leftRowSeriesNumberCount; i++) state.headerCheckedState[`_vtable_rowSeries_number_${i}`] = !1, state._checkboxCellTypeFields.push(`_vtable_rowSeries_number_${i}`);
|
|
@@ -42868,13 +42880,28 @@
|
|
|
42868
42880
|
cellValue = table.getCellValue(col, row),
|
|
42869
42881
|
cellOriginValue = table.getCellOriginValue(col, row);
|
|
42870
42882
|
if ("link" === cellType) {
|
|
42871
|
-
|
|
42872
|
-
|
|
42873
|
-
|
|
42874
|
-
|
|
42875
|
-
|
|
42883
|
+
let linkJump = getOrApply(columnDefine.linkJump, {
|
|
42884
|
+
col: col,
|
|
42885
|
+
row: row,
|
|
42886
|
+
table: table,
|
|
42887
|
+
value: cellValue,
|
|
42888
|
+
dataValue: cellOriginValue,
|
|
42889
|
+
cellHeaderPaths: void 0
|
|
42890
|
+
});
|
|
42891
|
+
if (linkJump = !1 !== linkJump, !linkJump) return;
|
|
42892
|
+
const templateLink = columnDefine.templateLink;
|
|
42893
|
+
let url,
|
|
42894
|
+
linkDetect = getOrApply(columnDefine.linkDetect, {
|
|
42895
|
+
col: col,
|
|
42896
|
+
row: row,
|
|
42897
|
+
table: table,
|
|
42898
|
+
value: cellValue,
|
|
42899
|
+
dataValue: cellOriginValue,
|
|
42900
|
+
cellHeaderPaths: void 0
|
|
42901
|
+
});
|
|
42902
|
+
if (linkDetect = !1 !== linkDetect, templateLink) {
|
|
42876
42903
|
const rowData = table.getCellOriginRecord(col, row);
|
|
42877
|
-
if (rowData.vtableMerge) return;
|
|
42904
|
+
if (rowData && rowData.vtableMerge) return;
|
|
42878
42905
|
const data = Object.assign({
|
|
42879
42906
|
__value: cellValue,
|
|
42880
42907
|
__dataValue: cellOriginValue
|
|
@@ -46924,7 +46951,7 @@
|
|
|
46924
46951
|
constructor(container) {
|
|
46925
46952
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46926
46953
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
46927
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.16.0
|
|
46954
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.16.0", 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");
|
|
46928
46955
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
46929
46956
|
const {
|
|
46930
46957
|
frozenColCount = 0,
|
|
@@ -50309,7 +50336,7 @@
|
|
|
50309
50336
|
if (this.leftRowSeriesNumberColumnCount > 0 && col >= 0 && col < this.leftRowSeriesNumberColumnCount) {
|
|
50310
50337
|
if (this.transpose) return;
|
|
50311
50338
|
if (row < this.headerLevelCount) return Object.assign({}, this.leftRowSeriesNumberColumn[col], {
|
|
50312
|
-
style: this._table.internalProps.rowSeriesNumber.headerStyle
|
|
50339
|
+
style: Object.assign({}, this._table.transpose ? this._table.internalProps.theme.rowHeaderStyle : this._table.internalProps.theme.headerStyle, this._table.internalProps.rowSeriesNumber.headerStyle)
|
|
50313
50340
|
});
|
|
50314
50341
|
}
|
|
50315
50342
|
if (this.rightRowSeriesNumberColumnCount > 0 && col >= this.colCount - this.rightRowSeriesNumberColumnCount && row < this.headerLevelCount) {
|