@visactor/vtable-calendar 1.14.4-alpha.2 → 1.14.4-alpha.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/dist/vtable-calendar.js
CHANGED
|
@@ -30011,7 +30011,7 @@
|
|
|
30011
30011
|
return _getIndex(this.currentPagerIndexedData, index);
|
|
30012
30012
|
}
|
|
30013
30013
|
getTableIndex(colOrRow) {
|
|
30014
|
-
return Array.isArray(colOrRow) ? this.currentPagerIndexedData.findIndex(value => arrayEqual(value, colOrRow)) : this.currentPagerIndexedData.findIndex(value => value === colOrRow);
|
|
30014
|
+
return Array.isArray(colOrRow) ? "tree" === this.rowHierarchyType ? this.currentPagerIndexedData.findIndex(value => arrayEqual(value, colOrRow)) : this.currentPagerIndexedData.findIndex(value => value === colOrRow[0]) : this.currentPagerIndexedData.findIndex(value => value === colOrRow);
|
|
30015
30015
|
}
|
|
30016
30016
|
getField(index, field, col, row, table) {
|
|
30017
30017
|
return this.getOriginalField(_getIndex(this.currentPagerIndexedData, index), field, col, row, table);
|
|
@@ -37028,7 +37028,7 @@
|
|
|
37028
37028
|
|
|
37029
37029
|
function computeColsWidth(table, colStart, colEnd, update) {
|
|
37030
37030
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
37031
|
-
table.internalProps.columnWidthConfig && table._parseColumnWidthConfig(table.internalProps.columnWidthConfig),
|
|
37031
|
+
table.internalProps.columnWidthConfig && table._parseColumnWidthConfig(table.internalProps.columnWidthConfig), colStart = null != colStart ? colStart : 0, colEnd = null != colEnd ? colEnd : table.colCount - 1, 0 === colStart && colEnd === table.colCount - 1 && table._clearColRangeWidthsMap();
|
|
37032
37032
|
const layoutMap = table.internalProps.layoutMap;
|
|
37033
37033
|
table.isPivotTable() && (layoutMap.enableUseGetBodyCache(), layoutMap.enableUseHeaderPathCache());
|
|
37034
37034
|
const oldColWidths = [],
|
|
@@ -46637,7 +46637,7 @@
|
|
|
46637
46637
|
constructor(container) {
|
|
46638
46638
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46639
46639
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46640
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.14.4-alpha.
|
|
46640
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.14.4-alpha.3", 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");
|
|
46641
46641
|
const {
|
|
46642
46642
|
frozenColCount = 0,
|
|
46643
46643
|
frozenRowCount: frozenRowCount,
|
|
@@ -49857,17 +49857,6 @@
|
|
|
49857
49857
|
columnDefine: cur
|
|
49858
49858
|
}), pre), []);
|
|
49859
49859
|
}
|
|
49860
|
-
getColumnByKey(key) {
|
|
49861
|
-
var _a;
|
|
49862
|
-
let col;
|
|
49863
|
-
return {
|
|
49864
|
-
columnDefine: null === (_a = this.columnObjects) || void 0 === _a ? void 0 : _a.find((columnData, index) => {
|
|
49865
|
-
var _a;
|
|
49866
|
-
return (null === (_a = columnData.define) || void 0 === _a ? void 0 : _a.key) === key && (col = index, !0);
|
|
49867
|
-
}),
|
|
49868
|
-
col: col
|
|
49869
|
-
};
|
|
49870
|
-
}
|
|
49871
49860
|
getColumnDefine(col, row) {
|
|
49872
49861
|
if (col >= 0) return col < this.leftRowSeriesNumberColumnCount ? this.leftRowSeriesNumberColumn[col].define : this.transpose ? this._columns[row].define : this._columns[col - this.leftRowSeriesNumberColumnCount].define;
|
|
49873
49862
|
}
|
|
@@ -50487,7 +50476,7 @@
|
|
|
50487
50476
|
var _a, _b, _c, _d, _e, _f;
|
|
50488
50477
|
"node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), super(container, options), this.showHeader = !0;
|
|
50489
50478
|
const internalProps = this.internalProps;
|
|
50490
|
-
if (internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_b = null !== (_a = options.enableTreeNodeMerge) && void 0 !== _a ? _a : isValid$1(options.groupBy)) && void 0 !== _b && _b, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, this.
|
|
50479
|
+
if (internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_b = null !== (_a = options.enableTreeNodeMerge) && void 0 !== _a ? _a : isValid$1(options.groupBy)) && void 0 !== _b && _b, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d, "node" !== Env.mode && (this.editorManager = new EditManager(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? _setDataSource(this, options.dataSource) : options.records ? this.setRecords(options.records, {
|
|
50491
50480
|
sortState: internalProps.sortState
|
|
50492
50481
|
}) : this.setRecords([]), options.title) {
|
|
50493
50482
|
const Title = Factory.getComponent("title");
|
|
@@ -50700,7 +50689,7 @@
|
|
|
50700
50689
|
updateOption(options) {
|
|
50701
50690
|
var _a, _b, _c, _d, _e, _f;
|
|
50702
50691
|
const internalProps = this.internalProps;
|
|
50703
|
-
if (super.updateOption(options), internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, this.showHeader = null === (_a = options.showHeader) || void 0 === _a || _a, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_c = null !== (_b = options.enableTreeNodeMerge) && void 0 !== _b ? _b : isValid$1(options.groupBy)) && void 0 !== _c && _c, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1,
|
|
50692
|
+
if (super.updateOption(options), internalProps.frozenColDragHeaderMode = options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = options.groupBy ? getGroupByDataConfig(options.groupBy) : {}, this.showHeader = null === (_a = options.showHeader) || void 0 === _a || _a, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_c = null !== (_b = options.enableTreeNodeMerge) && void 0 !== _b ? _b : isValid$1(options.groupBy)) && void 0 !== _c && _c, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_d = options.transpose) && void 0 !== _d && _d, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
|
|
50704
50693
|
var _a;
|
|
50705
50694
|
return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
|
|
50706
50695
|
}), internalProps.releaseList = null), options.dataSource ? _setDataSource(this, options.dataSource) : options.records ? this.setRecords(options.records, {
|
|
@@ -51081,20 +51070,6 @@
|
|
|
51081
51070
|
getBodyRowIndexByRecordIndex(index) {
|
|
51082
51071
|
return Array.isArray(index) && 1 === index.length && (index = index[0]), this.dataSource.getTableIndex(index);
|
|
51083
51072
|
}
|
|
51084
|
-
_parseColumnWidthConfig(columnWidthConfig) {
|
|
51085
|
-
for (let i = 0; i < (null == columnWidthConfig ? void 0 : columnWidthConfig.length); i++) {
|
|
51086
|
-
const item = columnWidthConfig[i],
|
|
51087
|
-
key = item.key,
|
|
51088
|
-
width = item.width,
|
|
51089
|
-
columnData = this.internalProps.layoutMap.getColumnByKey(key);
|
|
51090
|
-
if (columnData.columnDefine) {
|
|
51091
|
-
const {
|
|
51092
|
-
col: col
|
|
51093
|
-
} = columnData;
|
|
51094
|
-
this.internalProps._widthResizedColMap.has(col) || (this._setColWidth(col, width), this.internalProps._widthResizedColMap.add(col));
|
|
51095
|
-
}
|
|
51096
|
-
}
|
|
51097
|
-
}
|
|
51098
51073
|
}
|
|
51099
51074
|
|
|
51100
51075
|
function isXAxis(orient) {
|