@visactor/vtable 1.26.4-alpha.0 → 1.26.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/cjs/ListTable.d.ts +0 -1
- package/cjs/ListTable.js +4 -25
- package/cjs/ListTable.js.map +1 -1
- package/cjs/body-helper/style.js +1 -2
- package/cjs/core/BaseTable.js +3 -4
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/FouseInput.js +2 -1
- package/cjs/core/tableHelper.d.ts +0 -2
- package/cjs/core/tableHelper.js +8 -13
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/data/CachedDataSource.d.ts +0 -1
- package/cjs/data/CachedDataSource.js +0 -22
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/dataset/DataStatistics.js +1 -2
- package/cjs/dataset/flatDataToObject.js +2 -1
- package/cjs/event/helper.js +1 -1
- package/cjs/event/listener/table-group.js +52 -52
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/media-click.js +1 -1
- package/cjs/event/scroll.js +1 -1
- package/cjs/event/sparkline-event.js +1 -1
- package/cjs/event/util.js +1 -1
- package/cjs/header-helper/style.js +1 -2
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/plugins/index.js +1 -1
- package/cjs/plugins/interface.js +2 -1
- package/cjs/plugins/invert-highlight.js +1 -1
- package/cjs/plugins/list-tree-stick-cell.js +1 -1
- package/cjs/plugins/plugin-manager.js +1 -1
- package/cjs/scenegraph/component/custom.js +2 -2
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +5 -5
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +2 -3
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +94 -8
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +6 -9
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +13 -22
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +4 -4
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +3 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +227 -183
- package/dist/vtable.min.js +1 -1
- package/es/ListTable.d.ts +0 -1
- package/es/ListTable.js +6 -26
- package/es/ListTable.js.map +1 -1
- package/es/body-helper/style.js +1 -2
- package/es/core/BaseTable.js +2 -2
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/FouseInput.js +2 -1
- package/es/core/tableHelper.d.ts +0 -2
- package/es/core/tableHelper.js +7 -11
- package/es/core/tableHelper.js.map +1 -1
- package/es/data/CachedDataSource.d.ts +0 -1
- package/es/data/CachedDataSource.js +0 -22
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/dataset/DataStatistics.js +1 -2
- package/es/dataset/flatDataToObject.js +2 -1
- package/es/event/helper.js +1 -1
- package/es/event/listener/table-group.js +52 -52
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/media-click.js +1 -1
- package/es/event/scroll.js +1 -1
- package/es/event/sparkline-event.js +1 -1
- package/es/event/util.js +1 -1
- package/es/header-helper/style.js +1 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/plugins/index.js +1 -1
- package/es/plugins/interface.js +2 -1
- package/es/plugins/invert-highlight.js +1 -1
- package/es/plugins/list-tree-stick-cell.js +1 -1
- package/es/plugins/plugin-manager.js +1 -1
- package/es/scenegraph/component/custom.js +2 -2
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +5 -5
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +2 -3
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +92 -8
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +6 -9
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +1 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +1 -1
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/scenegraph.js +10 -22
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +4 -4
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/ts-types/base-table.d.ts +3 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
package/cjs/ListTable.d.ts
CHANGED
|
@@ -45,7 +45,6 @@ export declare class ListTable extends BaseTable implements ListTableAPI {
|
|
|
45
45
|
clearColWidthCache?: boolean;
|
|
46
46
|
clearRowHeightCache?: boolean;
|
|
47
47
|
}): Promise<unknown>;
|
|
48
|
-
private _refreshCurrentRecordsForOptionUpdate;
|
|
49
48
|
updatePagination(pagination: IPagination): void;
|
|
50
49
|
refreshHeader(): void;
|
|
51
50
|
refreshRowColCount(): void;
|
package/cjs/ListTable.js
CHANGED
|
@@ -368,10 +368,9 @@ class ListTable extends core_1.BaseTable {
|
|
|
368
368
|
clearRowHeightCache: !0
|
|
369
369
|
}) {
|
|
370
370
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
371
|
-
const internalProps = this.internalProps
|
|
372
|
-
if (this.pluginManager.removeOrAddPlugins(options.plugins), super.updateOption(options,
|
|
373
|
-
|
|
374
|
-
})), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode,
|
|
371
|
+
const internalProps = this.internalProps;
|
|
372
|
+
if (this.pluginManager.removeOrAddPlugins(options.plugins), super.updateOption(options, updateConfig),
|
|
373
|
+
internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode,
|
|
375
374
|
this.pagination = options.pagination, internalProps.sortState = options.sortState,
|
|
376
375
|
internalProps.dataConfig = this.internalProps.groupBy ? (0, group_helper_1.getGroupByDataConfig)(this.internalProps.groupBy, options.addRecordRule) : {
|
|
377
376
|
addRecordRule: options.addRecordRule
|
|
@@ -387,7 +386,7 @@ class ListTable extends core_1.BaseTable {
|
|
|
387
386
|
releaseObj instanceof data_1.DataSource ? releaseObj.updateColumns(this.internalProps.columns) : (null === (_g = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _g || _g.call(releaseObj),
|
|
388
387
|
internalProps.releaseList.splice(i, 1));
|
|
389
388
|
}
|
|
390
|
-
if (options.dataSource && this.dataSource !== options.dataSource ? this.dataSource = options.dataSource : options.records
|
|
389
|
+
if (options.dataSource && this.dataSource !== options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
|
|
391
390
|
sortState: options.sortState
|
|
392
391
|
}) : (this.refreshRowColCount(), this._resetFrozenColCount(), this.scenegraph.createSceneGraph(),
|
|
393
392
|
this.render()), options.title) {
|
|
@@ -404,26 +403,6 @@ class ListTable extends core_1.BaseTable {
|
|
|
404
403
|
setTimeout(resolve, 0);
|
|
405
404
|
}));
|
|
406
405
|
}
|
|
407
|
-
_refreshCurrentRecordsForOptionUpdate(records) {
|
|
408
|
-
var _a;
|
|
409
|
-
const dataSource = this.dataSource;
|
|
410
|
-
this.stateManager.endResizeIfResizing(), (0, chart_render_helper_1.clearChartRenderQueue)();
|
|
411
|
-
const oldHoverState = {
|
|
412
|
-
col: this.stateManager.hover.cellPos.col,
|
|
413
|
-
row: this.stateManager.hover.cellPos.row
|
|
414
|
-
};
|
|
415
|
-
this.scenegraph.clearCells(), this.internalProps.records = records, dataSource.refreshRecords(records, this.internalProps.dataConfig, this.pagination, this.internalProps.columns, (0,
|
|
416
|
-
tableHelper_1.getListTableRowHierarchyType)(this), (0, tableHelper_1.getHierarchyExpandLevel)(this)),
|
|
417
|
-
this.refreshRowColCount(), this.stateManager.initCheckedState(records), this.clearCellStyleCache(),
|
|
418
|
-
this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row),
|
|
419
|
-
this._updateSize();
|
|
420
|
-
(null !== (_a = this.options.componentLayoutOrder) && void 0 !== _a ? _a : [ "legend", "title" ]).forEach((component => {
|
|
421
|
-
var _a, _b;
|
|
422
|
-
"legend" === component ? null === (_a = this.internalProps.legends) || void 0 === _a || _a.forEach((legend => {
|
|
423
|
-
null == legend || legend.resize();
|
|
424
|
-
})) : "title" === component && (null === (_b = this.internalProps.title) || void 0 === _b || _b.resize());
|
|
425
|
-
})), this.scenegraph.resize(), this.render();
|
|
426
|
-
}
|
|
427
406
|
updatePagination(pagination) {
|
|
428
407
|
this.pagination && ("number" == typeof pagination.currentPage && pagination.currentPage >= 0 && (this.pagination.currentPage = pagination.currentPage),
|
|
429
408
|
pagination.perPageCount && (this.pagination.perPageCount = pagination.perPageCount || this.pagination.perPageCount),
|