@visactor/vtable-calendar 1.14.4-alpha.3 → 1.14.4-alpha.4
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) ?
|
|
30014
|
+
return Array.isArray(colOrRow) ? this.currentPagerIndexedData.findIndex(value => arrayEqual(value, colOrRow)) : 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), colStart = null != colStart ? colStart : 0, colEnd = null != colEnd ? colEnd : table.colCount - 1, 0 === colStart && colEnd === table.colCount - 1 && table._clearColRangeWidthsMap();
|
|
37031
|
+
table.internalProps.columnWidthConfig && table._parseColumnWidthConfig(table.internalProps.columnWidthConfig), table.isPivotTable() && table.internalProps.columnWidthConfigForRowHeader && table._parseColumnWidthConfigForRowHeader(table.internalProps.columnWidthConfigForRowHeader), 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.4", 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,6 +49857,17 @@
|
|
|
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
|
+
}
|
|
49860
49871
|
getColumnDefine(col, row) {
|
|
49861
49872
|
if (col >= 0) return col < this.leftRowSeriesNumberColumnCount ? this.leftRowSeriesNumberColumn[col].define : this.transpose ? this._columns[row].define : this._columns[col - this.leftRowSeriesNumberColumnCount].define;
|
|
49862
49873
|
}
|
|
@@ -50476,7 +50487,7 @@
|
|
|
50476
50487
|
var _a, _b, _c, _d, _e, _f;
|
|
50477
50488
|
"node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), super(container, options), this.showHeader = !0;
|
|
50478
50489
|
const internalProps = this.internalProps;
|
|
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, {
|
|
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.internalProps.columnWidthConfig = options.columnWidthConfig, 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, {
|
|
50480
50491
|
sortState: internalProps.sortState
|
|
50481
50492
|
}) : this.setRecords([]), options.title) {
|
|
50482
50493
|
const Title = Factory.getComponent("title");
|
|
@@ -50689,7 +50700,7 @@
|
|
|
50689
50700
|
updateOption(options) {
|
|
50690
50701
|
var _a, _b, _c, _d, _e, _f;
|
|
50691
50702
|
const internalProps = this.internalProps;
|
|
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 => {
|
|
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, this.internalProps.columnWidthConfig = options.columnWidthConfig, internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
|
|
50693
50704
|
var _a;
|
|
50694
50705
|
return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
|
|
50695
50706
|
}), internalProps.releaseList = null), options.dataSource ? _setDataSource(this, options.dataSource) : options.records ? this.setRecords(options.records, {
|
|
@@ -51070,6 +51081,20 @@
|
|
|
51070
51081
|
getBodyRowIndexByRecordIndex(index) {
|
|
51071
51082
|
return Array.isArray(index) && 1 === index.length && (index = index[0]), this.dataSource.getTableIndex(index);
|
|
51072
51083
|
}
|
|
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
|
+
}
|
|
51073
51098
|
}
|
|
51074
51099
|
|
|
51075
51100
|
function isXAxis(orient) {
|