@visactor/vtable 1.26.2-none → 1.26.3-alpha.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/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/EventHandler.js +1 -1
- package/cjs/event/EventTarget.js +1 -1
- package/cjs/event/drill.js +1 -1
- package/cjs/event/event.js +1 -1
- package/cjs/event/helper.js +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 +2 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +0 -1
- package/cjs/plugins/index.js +1 -1
- package/cjs/plugins/interface.js +1 -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/table-component.js +41 -50
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.d.ts +1 -0
- package/cjs/scenegraph/component/util.js +9 -1
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +6 -4
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/state.js +16 -16
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/ARCO.js +1 -1
- package/cjs/themes/BRIGHT.js +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +82 -80
- package/dist/vtable.min.js +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/EventHandler.js +1 -1
- package/es/event/EventTarget.js +1 -1
- package/es/event/drill.js +1 -1
- package/es/event/event.js +1 -1
- package/es/event/helper.js +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 +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +1 -2
- package/es/plugins/index.js +1 -1
- package/es/plugins/interface.js +1 -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/table-component.js +41 -51
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.d.ts +1 -0
- package/es/scenegraph/component/util.js +6 -0
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/scenegraph.js +6 -4
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/state.js +16 -14
- package/es/state/state.js.map +1 -1
- package/es/themes/ARCO.js +1 -1
- package/es/themes/BRIGHT.js +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
package/cjs/state/state.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.StateManager = void 0;
|
|
6
6
|
|
|
7
|
-
const menu_1 = require("../scenegraph/component/menu"), ts_types_1 = require("../ts-types"), ts_types_2 = require("../ts-types"), check_in_select_1 = require("./common/check-in-select"), update_position_1 = require("./hover/update-position"), frozen_1 = require("./frozen"), sort_1 = require("./sort"), update_position_2 = require("./select/update-position"), helper_1 = require("../tools/helper"), PIVOT_TABLE_EVENT_TYPE_1 = require("../ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE"), TABLE_EVENT_TYPE_1 = require("../core/TABLE_EVENT_TYPE"), vutils_1 = require("@visactor/vutils"), drill_1 = require("./drill"), spark_line_1 = require("./spark-line"), cell_move_1 = require("./cell-move"), icon_1 = require("../scenegraph/utils/icon"), debounce_1 = require("../tools/debounce"), update_resize_column_1 = require("./resize/update-resize-column"), radio_1 = require("./radio/radio"), checkbox_1 = require("./checkbox/checkbox"), update_resize_row_1 = require("./resize/update-resize-row"), delete_select_border_1 = require("../scenegraph/select/delete-select-border"),
|
|
7
|
+
const menu_1 = require("../scenegraph/component/menu"), ts_types_1 = require("../ts-types"), ts_types_2 = require("../ts-types"), check_in_select_1 = require("./common/check-in-select"), update_position_1 = require("./hover/update-position"), frozen_1 = require("./frozen"), sort_1 = require("./sort"), update_position_2 = require("./select/update-position"), helper_1 = require("../tools/helper"), PIVOT_TABLE_EVENT_TYPE_1 = require("../ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE"), TABLE_EVENT_TYPE_1 = require("../core/TABLE_EVENT_TYPE"), vutils_1 = require("@visactor/vutils"), drill_1 = require("./drill"), spark_line_1 = require("./spark-line"), cell_move_1 = require("./cell-move"), icon_1 = require("../scenegraph/utils/icon"), util_1 = require("../scenegraph/component/util"), debounce_1 = require("../tools/debounce"), update_resize_column_1 = require("./resize/update-resize-column"), radio_1 = require("./radio/radio"), checkbox_1 = require("./checkbox/checkbox"), update_resize_row_1 = require("./resize/update-resize-row"), delete_select_border_1 = require("../scenegraph/select/delete-select-border"), util_2 = require("../tools/util"), custom_select_1 = require("./select/custom-select"), merge_range_1 = require("../tools/merge-range");
|
|
8
8
|
|
|
9
9
|
class StateManager {
|
|
10
10
|
constructor(table) {
|
|
@@ -490,8 +490,8 @@ class StateManager {
|
|
|
490
490
|
}), oldVerticalBarPos !== this.scroll.verticalBarPos && this.checkVerticalScrollBarEnd();
|
|
491
491
|
}
|
|
492
492
|
updateHorizontalScrollBar(xRatio) {
|
|
493
|
-
var _a, _b, _c, _d
|
|
494
|
-
const
|
|
493
|
+
var _a, _b, _c, _d;
|
|
494
|
+
const oldHorizontalBarPos = this.scroll.horizontalBarPos, scrollRange = (0, util_1.getBodyHorizontalScrollRange)(this.table);
|
|
495
495
|
let horizontalBarPos = Math.ceil(xRatio * scrollRange);
|
|
496
496
|
(0, vutils_1.isValid)(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
|
|
497
497
|
const dx = horizontalBarPos - this.table.scenegraph.proxy.deltaX - oldHorizontalBarPos;
|
|
@@ -499,8 +499,8 @@ class StateManager {
|
|
|
499
499
|
event: void 0,
|
|
500
500
|
scrollTop: this.scroll.verticalBarPos,
|
|
501
501
|
scrollLeft: horizontalBarPos - this.table.scenegraph.proxy.deltaX,
|
|
502
|
-
scrollHeight: null === (
|
|
503
|
-
scrollWidth: null === (
|
|
502
|
+
scrollHeight: null === (_a = this.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
|
|
503
|
+
scrollWidth: null === (_b = this.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.width,
|
|
504
504
|
viewHeight: this.table.tableNoFrameHeight,
|
|
505
505
|
viewWidth: this.table.tableNoFrameWidth,
|
|
506
506
|
scrollDirection: "horizontal",
|
|
@@ -515,8 +515,8 @@ class StateManager {
|
|
|
515
515
|
event: void 0,
|
|
516
516
|
scrollTop: this.scroll.verticalBarPos,
|
|
517
517
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
518
|
-
scrollHeight: null === (
|
|
519
|
-
scrollWidth: null === (
|
|
518
|
+
scrollHeight: null === (_c = this.table.theme.scrollStyle) || void 0 === _c ? void 0 : _c.width,
|
|
519
|
+
scrollWidth: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
|
|
520
520
|
viewHeight: this.table.tableNoFrameHeight,
|
|
521
521
|
viewWidth: this.table.tableNoFrameWidth,
|
|
522
522
|
scrollDirection: "horizontal",
|
|
@@ -569,13 +569,13 @@ class StateManager {
|
|
|
569
569
|
}), oldVerticalBarPos !== top && triggerEvent && this.checkVerticalScrollBarEnd();
|
|
570
570
|
}
|
|
571
571
|
setScrollLeft(left, event, triggerEvent = !0) {
|
|
572
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
572
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
573
573
|
if (!this.table || !this.table.scenegraph) return;
|
|
574
574
|
this.table.scrollLeft;
|
|
575
|
-
const
|
|
575
|
+
const scrollRange = (0, util_1.getBodyHorizontalScrollRange)(this.table), sizeTolerance = (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0;
|
|
576
576
|
left = Math.max(0, Math.min(left, scrollRange - sizeTolerance)), left = Math.ceil(left);
|
|
577
577
|
const oldHorizontalBarPos = this.scroll.horizontalBarPos, xRatio = scrollRange ? left / scrollRange : 0;
|
|
578
|
-
if ((oldHorizontalBarPos !== left || !0 === (null === (
|
|
578
|
+
if ((oldHorizontalBarPos !== left || !0 === (null === (_c = null === (_b = this.table.options) || void 0 === _b ? void 0 : _b.customConfig) || void 0 === _c ? void 0 : _c.scrollEventAlwaysTrigger)) && triggerEvent) {
|
|
579
579
|
let horizontalBarPos = left;
|
|
580
580
|
(0, vutils_1.isValid)(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
|
|
581
581
|
const dx = horizontalBarPos - oldHorizontalBarPos;
|
|
@@ -583,8 +583,8 @@ class StateManager {
|
|
|
583
583
|
event: null == event ? void 0 : event.nativeEvent,
|
|
584
584
|
scrollTop: this.scroll.verticalBarPos,
|
|
585
585
|
scrollLeft: horizontalBarPos,
|
|
586
|
-
scrollHeight: null === (
|
|
587
|
-
scrollWidth: null === (
|
|
586
|
+
scrollHeight: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
|
|
587
|
+
scrollWidth: null === (_e = this.table.theme.scrollStyle) || void 0 === _e ? void 0 : _e.width,
|
|
588
588
|
viewHeight: this.table.tableNoFrameHeight,
|
|
589
589
|
viewWidth: this.table.tableNoFrameWidth,
|
|
590
590
|
scrollDirection: "horizontal",
|
|
@@ -603,8 +603,8 @@ class StateManager {
|
|
|
603
603
|
event: null == event ? void 0 : event.nativeEvent,
|
|
604
604
|
scrollTop: this.scroll.verticalBarPos,
|
|
605
605
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
606
|
-
scrollHeight: null === (
|
|
607
|
-
scrollWidth: null === (
|
|
606
|
+
scrollHeight: null === (_f = this.table.theme.scrollStyle) || void 0 === _f ? void 0 : _f.width,
|
|
607
|
+
scrollWidth: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
|
|
608
608
|
viewHeight: this.table.tableNoFrameHeight,
|
|
609
609
|
viewWidth: this.table.tableNoFrameWidth,
|
|
610
610
|
scrollDirection: "horizontal",
|
|
@@ -778,7 +778,7 @@ class StateManager {
|
|
|
778
778
|
this.sort[index].col = cellAddress.col, this.sort[index].row = cellAddress.row;
|
|
779
779
|
const cellGroup = this.table.scenegraph.getCell(this.sort[index].col, this.sort[index].row);
|
|
780
780
|
let iconMark;
|
|
781
|
-
(0,
|
|
781
|
+
(0, util_2.traverseObject)(cellGroup, "children", (mark => "sort" === mark.attribute.funcType && (iconMark = mark,
|
|
782
782
|
!0))), this.table.scenegraph.updateSortIcon({
|
|
783
783
|
col: this.sort[index].col,
|
|
784
784
|
row: this.sort[index].row,
|
|
@@ -870,4 +870,4 @@ class StateManager {
|
|
|
870
870
|
}
|
|
871
871
|
|
|
872
872
|
exports.StateManager = StateManager;
|
|
873
|
-
//# sourceMappingURL=state.js.map
|
|
873
|
+
//# sourceMappingURL=state.js.map
|