@visactor/vtable 1.17.7-alpha.0 → 1.17.7
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 +2 -0
- package/cjs/ListTable.js +5 -3
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +3 -5
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +2 -4
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style.d.ts +1 -1
- package/cjs/body-helper/style.js.map +1 -1
- package/cjs/chartModule.d.ts +3 -0
- package/cjs/chartModule.js +7 -3
- package/cjs/chartModule.js.map +1 -1
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElement.js +12 -7
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElementStyle.js +1 -1
- package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +3 -1
- package/cjs/core/BaseTable.js +20 -15
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +3 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +3 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/tableHelper.js +13 -10
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/data/DataSource.js +5 -1
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/edit/edit-manager.d.ts +1 -0
- package/cjs/edit/edit-manager.js +6 -4
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/listener/container-dom.js +21 -14
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/header-helper/style.d.ts +1 -1
- package/cjs/header-helper/style.js.map +1 -1
- package/cjs/icons.d.ts +3 -0
- package/cjs/icons.js +3 -3
- package/cjs/icons.js.map +1 -1
- package/cjs/index.d.ts +4 -2
- package/cjs/index.js +6 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +5 -2
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +2 -2
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/custom-cell-style.js +1 -1
- package/cjs/plugins/index.d.ts +3 -0
- package/cjs/plugins/index.js +24 -0
- package/cjs/plugins/index.js.map +1 -0
- package/cjs/plugins/interface.d.ts +9 -0
- package/cjs/plugins/interface.js +6 -0
- package/cjs/plugins/interface.js.map +1 -0
- package/cjs/plugins/plugin-manager.d.ts +13 -0
- package/cjs/plugins/plugin-manager.js +48 -0
- package/cjs/plugins/plugin-manager.js.map +1 -0
- package/cjs/register.js +4 -4
- package/cjs/register.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +2 -2
- package/cjs/scenegraph/graphic/chart.js +1 -1
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/index.js +4 -2
- package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/picker-interceptor.d.ts +8 -0
- package/cjs/scenegraph/graphic/contributions/picker-interceptor.js +42 -0
- package/cjs/scenegraph/graphic/contributions/picker-interceptor.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/vchart-graphic-picker.d.ts +6 -0
- package/cjs/scenegraph/graphic/contributions/vchart-graphic-picker.js +25 -0
- package/cjs/scenegraph/graphic/contributions/vchart-graphic-picker.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +5 -3
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-col.js +2 -1
- package/cjs/scenegraph/layout/update-col.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +2 -1
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +2 -1
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.d.ts +2 -0
- package/cjs/scenegraph/stick-text/index.js +10 -6
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/state/hover/update-position.js +3 -1
- package/cjs/state/hover/update-position.js.map +1 -1
- package/cjs/themes/{theme.js → theme-define.js} +5 -1
- package/cjs/themes/theme-define.js.map +1 -0
- package/cjs/{plugins → themes}/themes.d.ts +1 -1
- package/cjs/themes/themes.js.map +1 -0
- package/cjs/themes.d.ts +1 -1
- package/cjs/themes.js +9 -8
- package/cjs/themes.js.map +1 -1
- package/cjs/tools/cell-range.js +2 -1
- package/cjs/tools/cell-range.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +4 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +13 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/index.d.ts +1 -0
- package/cjs/ts-types/index.js +1 -1
- package/cjs/ts-types/index.js.map +1 -1
- package/cjs/ts-types/menu.d.ts +1 -0
- package/cjs/ts-types/menu.js.map +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +1 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +10964 -9307
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +2 -0
- package/es/ListTable.js +5 -3
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +2 -6
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +2 -4
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style.d.ts +1 -1
- package/es/body-helper/style.js.map +1 -1
- package/es/chartModule.d.ts +3 -0
- package/es/chartModule.js +2 -2
- package/es/chartModule.js.map +1 -1
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElement.js +12 -7
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElementStyle.js +1 -1
- package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
- package/es/core/BaseTable.d.ts +3 -1
- package/es/core/BaseTable.js +17 -12
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +3 -0
- package/es/core/TABLE_EVENT_TYPE.js +3 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/tableHelper.js +13 -10
- package/es/core/tableHelper.js.map +1 -1
- package/es/data/DataSource.js +5 -1
- package/es/data/DataSource.js.map +1 -1
- package/es/edit/edit-manager.d.ts +1 -0
- package/es/edit/edit-manager.js +6 -4
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/listener/container-dom.js +20 -14
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/header-helper/style.d.ts +1 -1
- package/es/header-helper/style.js.map +1 -1
- package/es/icons.d.ts +3 -0
- package/es/icons.js +3 -1
- package/es/icons.js.map +1 -1
- package/es/index.d.ts +4 -2
- package/es/index.js +4 -2
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +5 -2
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +2 -2
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/custom-cell-style.js +1 -1
- package/es/plugins/index.d.ts +3 -0
- package/es/plugins/index.js +4 -0
- package/es/plugins/index.js.map +1 -0
- package/es/plugins/interface.d.ts +9 -0
- package/es/plugins/interface.js +2 -0
- package/es/plugins/interface.js.map +1 -0
- package/es/plugins/plugin-manager.d.ts +13 -0
- package/es/plugins/plugin-manager.js +40 -0
- package/es/plugins/plugin-manager.js.map +1 -0
- package/es/register.js +3 -3
- package/es/register.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +2 -2
- package/es/scenegraph/graphic/chart.js +2 -2
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/index.js +5 -2
- package/es/scenegraph/graphic/contributions/index.js.map +1 -1
- package/es/scenegraph/graphic/contributions/picker-interceptor.d.ts +8 -0
- package/es/scenegraph/graphic/contributions/picker-interceptor.js +37 -0
- package/es/scenegraph/graphic/contributions/picker-interceptor.js.map +1 -0
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/vchart-graphic-picker.d.ts +6 -0
- package/es/scenegraph/graphic/contributions/vchart-graphic-picker.js +23 -0
- package/es/scenegraph/graphic/contributions/vchart-graphic-picker.js.map +1 -0
- package/es/scenegraph/group-creater/cell-type/image-cell.js +5 -3
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/layout/update-col.js +3 -0
- package/es/scenegraph/layout/update-col.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +3 -0
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +2 -1
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/scenegraph/stick-text/index.d.ts +2 -0
- package/es/scenegraph/stick-text/index.js +7 -4
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/state/hover/update-position.js +3 -1
- package/es/state/hover/update-position.js.map +1 -1
- package/es/themes/{theme.js → theme-define.js} +5 -1
- package/es/themes/theme-define.js.map +1 -0
- package/es/{plugins → themes}/themes.d.ts +1 -1
- package/es/themes/themes.js.map +1 -0
- package/es/themes.d.ts +1 -1
- package/es/themes.js +2 -2
- package/es/themes.js.map +1 -1
- package/es/tools/cell-range.js +2 -1
- package/es/tools/cell-range.js.map +1 -1
- package/es/ts-types/base-table.d.ts +4 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +13 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/index.d.ts +1 -0
- package/es/ts-types/index.js +2 -0
- package/es/ts-types/index.js.map +1 -1
- package/es/ts-types/menu.d.ts +1 -0
- package/es/ts-types/menu.js.map +1 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +1 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +8 -8
- package/cjs/plugins/chartModules.d.ts +0 -3
- package/cjs/plugins/chartModules.js +0 -6
- package/cjs/plugins/chartModules.js.map +0 -1
- package/cjs/plugins/icons.d.ts +0 -12
- package/cjs/plugins/icons.js +0 -26
- package/cjs/plugins/icons.js.map +0 -1
- package/cjs/plugins/themes.js.map +0 -1
- package/cjs/scenegraph/component/menu.d.ts +0 -41
- package/cjs/scenegraph/utils/text-measure.d.ts +0 -38
- package/cjs/themes/theme.js.map +0 -1
- package/es/plugins/chartModules.d.ts +0 -3
- package/es/plugins/chartModules.js +0 -2
- package/es/plugins/chartModules.js.map +0 -1
- package/es/plugins/icons.d.ts +0 -12
- package/es/plugins/icons.js +0 -22
- package/es/plugins/icons.js.map +0 -1
- package/es/plugins/themes.js.map +0 -1
- package/es/scenegraph/component/menu.d.ts +0 -41
- package/es/scenegraph/utils/text-measure.d.ts +0 -38
- package/es/themes/theme.js.map +0 -1
- /package/cjs/themes/{theme.d.ts → theme-define.d.ts} +0 -0
- /package/cjs/{plugins → themes}/themes.js +0 -0
- /package/es/themes/{theme.d.ts → theme-define.d.ts} +0 -0
- /package/es/{plugins → themes}/themes.js +0 -0
package/cjs/core/BaseTable.js
CHANGED
|
@@ -33,7 +33,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
33
33
|
value: !0
|
|
34
34
|
}), exports.BaseTable = void 0;
|
|
35
35
|
|
|
36
|
-
const columnStyleContents = __importStar(require("../body-helper/style")), style_1 = require("./style"), style = __importStar(require("../tools/style")), ts_types_1 = require("../ts-types"), helper_1 = require("../tools/helper"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), EventHandler_1 = require("../event/EventHandler"), EventTarget_1 = require("../event/EventTarget"), NumberMap_1 = require("../tools/NumberMap"), Rect_1 = require("../tools/Rect"), util_1 = require("../tools/util"), themes_1 = __importDefault(require("../themes")), env_1 = require("../tools/env"), scenegraph_1 = require("../scenegraph/scenegraph"), state_1 = require("../state/state"), event_1 = require("../event/event"), body_helper_1 = require("../body-helper/body-helper"), header_helper_1 = require("../header-helper/header-helper"), vutils_1 = require("@visactor/vutils"), text_measure_1 = require("../scenegraph/utils/text-measure"), get_prop_1 = require("../scenegraph/utils/get-prop"),
|
|
36
|
+
const columnStyleContents = __importStar(require("../body-helper/style")), style_1 = require("./style"), style = __importStar(require("../tools/style")), ts_types_1 = require("../ts-types"), helper_1 = require("../tools/helper"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), EventHandler_1 = require("../event/EventHandler"), EventTarget_1 = require("../event/EventTarget"), NumberMap_1 = require("../tools/NumberMap"), Rect_1 = require("../tools/Rect"), util_1 = require("../tools/util"), themes_1 = __importDefault(require("../themes")), env_1 = require("../tools/env"), scenegraph_1 = require("../scenegraph/scenegraph"), state_1 = require("../state/state"), event_1 = require("../event/event"), body_helper_1 = require("../body-helper/body-helper"), header_helper_1 = require("../header-helper/header-helper"), vutils_1 = require("@visactor/vutils"), text_measure_1 = require("../scenegraph/utils/text-measure"), get_prop_1 = require("../scenegraph/utils/get-prop"), tableHelper_1 = require("./tableHelper"), FouseInput_1 = require("./FouseInput"), pixel_ratio_1 = require("../tools/pixel-ratio"), chart_render_helper_1 = require("../scenegraph/graphic/contributions/chart-render-helper"), row_height_map_1 = require("../layout/row-height-map"), row_series_number_helper_1 = require("./row-series-number-helper"), update_select_border_1 = require("../scenegraph/select/update-select-border"), react_custom_layout_1 = require("../components/react/react-custom-layout"), layout_helper_1 = require("../layout/layout-helper"), factory_1 = require("./factory"), get_cell_position_1 = require("./utils/get-cell-position"), style_helper_1 = require("./style-helper"), frozen_react_1 = require("../scenegraph/layout/frozen-react"), icons_1 = require("../icons"), animation_1 = require("./animation"), check_in_select_1 = require("../state/common/check-in-select"), is_cell_select_highlight_1 = require("../state/select/is-cell-select-highlight"), get_custom_merge_cell_func_1 = require("./utils/get-custom-merge-cell-func"), vrender_1 = require("./../vrender"), plugin_manager_1 = require("../plugins/plugin-manager"), {toBoxArray: toBoxArray} = helper_1.style, {isTouchEvent: isTouchEvent} = helper_1.event, rangeReg = /^\$(\d+)\$(\d+)$/;
|
|
37
37
|
|
|
38
38
|
(0, style_1.importStyle)();
|
|
39
39
|
|
|
@@ -43,9 +43,14 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
43
43
|
}
|
|
44
44
|
constructor(container, options = {}) {
|
|
45
45
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
46
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.17.7
|
|
46
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.17.7", this.id = `VTable${Date.now()}`,
|
|
47
47
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
48
|
-
|
|
48
|
+
"node" === env_1.Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
|
|
49
|
+
container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
50
|
+
this.pluginManager = new plugin_manager_1.PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
51
|
+
options: options,
|
|
52
|
+
container: container
|
|
53
|
+
}), container = options.container && options.container instanceof HTMLElement ? options.container : container,
|
|
49
54
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vrender_1.vglobal.isImageAnonymous = !1);
|
|
50
55
|
const {frozenColCount: frozenColCount = 0, unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth, frozenRowCount: frozenRowCount, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, widthAdaptiveMode: widthAdaptiveMode = "only-body", heightAdaptiveMode: heightAdaptiveMode = "only-body", keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", resize: resize, dragHeaderMode: dragHeaderMode, dragOrder: dragOrder, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = pixel_ratio_1.defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
|
|
51
56
|
this.container = container, this.options = options, this._widthMode = widthMode,
|
|
@@ -96,7 +101,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
96
101
|
return "node" === env_1.Env.mode ? that.canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
|
|
97
102
|
}
|
|
98
103
|
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes_1.default.of(null !== (_h = options.theme) && void 0 !== _h ? _h : themes_1.default.DEFAULT),
|
|
99
|
-
internalProps.theme.isPivot = this.isPivotTable(), (0,
|
|
104
|
+
internalProps.theme.isPivot = this.isPivotTable(), (0, icons_1.setIconColor)(internalProps.theme.functionalIconsStyle),
|
|
100
105
|
container ? (clearDOM && (container.innerHTML = ""), container.appendChild(internalProps.element),
|
|
101
106
|
this._updateSize()) : this._updateSize(), internalProps.bodyHelper = new body_helper_1.BodyHelper(this),
|
|
102
107
|
internalProps.headerHelper = new header_helper_1.HeaderHelper(this), internalProps.rowSeriesNumberHelper = new row_series_number_helper_1.RowSeriesNumberHelper(this),
|
|
@@ -450,6 +455,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
450
455
|
this.tableNoFrameWidth = width - ((null !== (_y = lineWidths[1]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[1]) && void 0 !== _z ? _z : 0)) - ((null !== (_0 = lineWidths[3]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[3]) && void 0 !== _1 ? _1 : 0)),
|
|
451
456
|
this.tableNoFrameHeight = height - ((null !== (_2 = lineWidths[0]) && void 0 !== _2 ? _2 : 0) + (null !== (_3 = shadowWidths[0]) && void 0 !== _3 ? _3 : 0)) - ((null !== (_4 = lineWidths[2]) && void 0 !== _4 ? _4 : 0) + (null !== (_5 = shadowWidths[2]) && void 0 !== _5 ? _5 : 0)));
|
|
452
457
|
}
|
|
458
|
+
this._clearColRangeWidthsMap(), this._clearRowRangeHeightsMap();
|
|
453
459
|
}
|
|
454
460
|
updateViewBox(newViewBox) {
|
|
455
461
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
@@ -658,13 +664,13 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
658
664
|
getCellsRect(startCol, startRow, endCol, endRow) {
|
|
659
665
|
var _a, _b, _c, _d, _e, _f;
|
|
660
666
|
let absoluteLeft = this.getColsWidth(0, startCol - 1) || 0, width = this.getColsWidth(startCol, endCol);
|
|
661
|
-
const scrollLeft = this.scrollLeft;
|
|
662
|
-
this.isLeftFrozenColumn(startCol) && this.isRightFrozenColumn(endCol) ? width = this.tableNoFrameWidth - (null !== (_a = this.getColsWidth(startCol + 1, this.colCount - 1)) && void 0 !== _a ? _a : 0) - absoluteLeft : this.isLeftFrozenColumn(startCol) && !this.isLeftFrozenColumn(endCol) ? width = Math.max(width - scrollLeft, this.getColsWidth(startCol, this.frozenColCount - 1)) : !this.isRightFrozenColumn(startCol) && this.isRightFrozenColumn(endCol) ? (absoluteLeft = Math.min(absoluteLeft - scrollLeft,
|
|
663
|
-
width =
|
|
667
|
+
const scrollLeft = this.scrollLeft, tableWidth = Math.min(this.tableNoFrameWidth, this.getAllColsWidth()), tableHeight = Math.min(this.tableNoFrameHeight, this.getAllRowsHeight());
|
|
668
|
+
this.isLeftFrozenColumn(startCol) && this.isRightFrozenColumn(endCol) ? width = this.tableNoFrameWidth - (null !== (_a = this.getColsWidth(startCol + 1, this.colCount - 1)) && void 0 !== _a ? _a : 0) - absoluteLeft : this.isLeftFrozenColumn(startCol) && !this.isLeftFrozenColumn(endCol) ? width = Math.max(width - scrollLeft, this.getColsWidth(startCol, this.frozenColCount - 1)) : !this.isRightFrozenColumn(startCol) && this.isRightFrozenColumn(endCol) ? (absoluteLeft = Math.min(absoluteLeft - scrollLeft, tableWidth - this.getRightFrozenColsWidth()),
|
|
669
|
+
width = tableWidth - (null !== (_b = this.getColsWidth(startCol + 1, this.colCount - 1)) && void 0 !== _b ? _b : 0) - absoluteLeft) : this.isRightFrozenColumn(startCol) && (absoluteLeft = tableWidth - (null !== (_c = this.getColsWidth(startCol, this.colCount - 1)) && void 0 !== _c ? _c : 0));
|
|
664
670
|
let absoluteTop = this.getRowsHeight(0, startRow - 1), height = this.getRowsHeight(startRow, endRow);
|
|
665
671
|
const scrollTop = this.scrollTop;
|
|
666
|
-
return this.isTopFrozenRow(startRow) && this.isBottomFrozenRow(endRow) ? height = this.tableNoFrameHeight - (null !== (_d = this.getRowsHeight(startRow + 1, this.rowCount - 1)) && void 0 !== _d ? _d : 0) - absoluteTop : this.isTopFrozenRow(startRow) && !this.isTopFrozenRow(endRow) ? height = Math.max(height - scrollTop, this.getRowsHeight(startRow, this.frozenRowCount - 1)) : !this.isBottomFrozenRow(startRow) && this.isBottomFrozenRow(endRow) ? (absoluteTop = Math.min(absoluteTop - scrollTop,
|
|
667
|
-
height =
|
|
672
|
+
return this.isTopFrozenRow(startRow) && this.isBottomFrozenRow(endRow) ? height = this.tableNoFrameHeight - (null !== (_d = this.getRowsHeight(startRow + 1, this.rowCount - 1)) && void 0 !== _d ? _d : 0) - absoluteTop : this.isTopFrozenRow(startRow) && !this.isTopFrozenRow(endRow) ? height = Math.max(height - scrollTop, this.getRowsHeight(startRow, this.frozenRowCount - 1)) : !this.isBottomFrozenRow(startRow) && this.isBottomFrozenRow(endRow) ? (absoluteTop = Math.min(absoluteTop - scrollTop, tableHeight - this.getBottomFrozenRowsHeight()),
|
|
673
|
+
height = tableHeight - (null !== (_e = this.getRowsHeight(startRow + 1, this.rowCount - 1)) && void 0 !== _e ? _e : 0) - absoluteTop) : this.isBottomFrozenRow(startRow) && (absoluteTop = tableHeight - (null !== (_f = this.getRowsHeight(startRow, this.rowCount - 1)) && void 0 !== _f ? _f : 0)),
|
|
668
674
|
new Rect_1.Rect(Math.round(absoluteLeft), Math.round(absoluteTop), Math.round(width), Math.round(height));
|
|
669
675
|
}
|
|
670
676
|
getCellsRectWidth(startCol, startRow, endCol, endRow) {
|
|
@@ -829,8 +835,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
829
835
|
if (this.isReleased) return;
|
|
830
836
|
null === (_b = null === (_a = internalProps.tooltipHandler) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a),
|
|
831
837
|
null === (_d = null === (_c = internalProps.menuHandler) || void 0 === _c ? void 0 : _c.release) || void 0 === _d || _d.call(_c),
|
|
832
|
-
|
|
833
|
-
null === (_g = null === (_f = internalProps.handler) || void 0 === _f ? void 0 : _f.release) || void 0 === _g || _g.call(_f),
|
|
838
|
+
null === (_e = super.release) || void 0 === _e || _e.call(this), null === (_g = null === (_f = internalProps.handler) || void 0 === _f ? void 0 : _f.release) || void 0 === _g || _g.call(_f),
|
|
834
839
|
this.eventManager.release(), null === (_j = null === (_h = internalProps.focusControl) || void 0 === _h ? void 0 : _h.release) || void 0 === _j || _j.call(_h),
|
|
835
840
|
null === (_k = internalProps.legends) || void 0 === _k || _k.forEach((legend => {
|
|
836
841
|
null == legend || legend.release();
|
|
@@ -845,7 +850,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
845
850
|
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element),
|
|
846
851
|
null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p),
|
|
847
852
|
this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_r = this.reactCustomLayout) || void 0 === _r || _r.clearCache(),
|
|
848
|
-
(0, chart_render_helper_1.clearChartRenderQueue)();
|
|
853
|
+
this.pluginManager.release(), (0, chart_render_helper_1.clearChartRenderQueue)();
|
|
849
854
|
}
|
|
850
855
|
fireListeners(type, event) {
|
|
851
856
|
return super.fireListeners(type, event);
|
|
@@ -883,7 +888,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
883
888
|
internalProps._widthResizedColMap = new Set, internalProps._heightResizedRowMap = new Set,
|
|
884
889
|
this.colWidthsMap = new NumberMap_1.NumberMap, this.colContentWidthsMap = new NumberMap_1.NumberMap,
|
|
885
890
|
this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes_1.default.of(null !== (_f = options.theme) && void 0 !== _f ? _f : themes_1.default.DEFAULT),
|
|
886
|
-
internalProps.theme.isPivot = this.isPivotTable(), (0,
|
|
891
|
+
internalProps.theme.isPivot = this.isPivotTable(), (0, icons_1.setIconColor)(internalProps.theme.functionalIconsStyle),
|
|
887
892
|
this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText,
|
|
888
893
|
internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_g = options.allowFrozenColCount) && void 0 !== _g ? _g : 0,
|
|
889
894
|
internalProps.limitMaxAutoWidth = null !== (_h = options.limitMaxAutoWidth) && void 0 !== _h ? _h : 450,
|
|
@@ -1071,7 +1076,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1071
1076
|
set theme(theme) {
|
|
1072
1077
|
this.internalProps.theme = themes_1.default.of(null != theme ? theme : themes_1.default.DEFAULT),
|
|
1073
1078
|
this.internalProps.theme.isPivot = this.isPivotTable(), this.options.theme = theme,
|
|
1074
|
-
(0,
|
|
1079
|
+
(0, icons_1.setIconColor)(this.internalProps.theme.functionalIconsStyle);
|
|
1075
1080
|
}
|
|
1076
1081
|
updateTheme(theme) {
|
|
1077
1082
|
const oldHoverState = {
|
|
@@ -1079,7 +1084,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1079
1084
|
row: this.stateManager.hover.cellPos.row
|
|
1080
1085
|
};
|
|
1081
1086
|
this.internalProps.theme = themes_1.default.of(null != theme ? theme : themes_1.default.DEFAULT),
|
|
1082
|
-
this.internalProps.theme.isPivot = this.isPivotTable(), (0,
|
|
1087
|
+
this.internalProps.theme.isPivot = this.isPivotTable(), (0, icons_1.setIconColor)(this.internalProps.theme.functionalIconsStyle),
|
|
1083
1088
|
this.options.theme = theme, this.scenegraph.updateComponent(), this.scenegraph.updateStageBackground(),
|
|
1084
1089
|
this.scenegraph.clearCells(), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(),
|
|
1085
1090
|
this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.render();
|