@visactor/vtable-calendar 1.19.4-alpha.2 → 1.19.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 +40 -28
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
package/dist/vtable-calendar.js
CHANGED
|
@@ -16200,7 +16200,7 @@
|
|
|
16200
16200
|
return data || this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
16201
16201
|
}
|
|
16202
16202
|
clearScreen(renderService, context, drawContext) {
|
|
16203
|
-
var _a, _b;
|
|
16203
|
+
var _a, _b, _c;
|
|
16204
16204
|
const {
|
|
16205
16205
|
clear: clear,
|
|
16206
16206
|
viewBox: viewBox
|
|
@@ -16208,9 +16208,9 @@
|
|
|
16208
16208
|
width = viewBox.width(),
|
|
16209
16209
|
height = viewBox.height();
|
|
16210
16210
|
if (clear) {
|
|
16211
|
-
context.clearRect(0, 0, width, height);
|
|
16212
|
-
const stage = null === (
|
|
16213
|
-
if (stage && (context.globalAlpha = null !== (
|
|
16211
|
+
context.clearRect(0, 0, width, height), (null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage) && renderService.drawParams.stage.hooks.afterClearRect.call(renderService.drawParams);
|
|
16212
|
+
const stage = null === (_b = renderService.drawParams) || void 0 === _b ? void 0 : _b.stage;
|
|
16213
|
+
if (stage && (context.globalAlpha = null !== (_c = stage.attribute.opacity) && void 0 !== _c ? _c : 1), stage && stage.backgroundImg && stage.resources) {
|
|
16214
16214
|
const res = stage.resources.get(clear);
|
|
16215
16215
|
res && "success" === res.state && res.data && context.drawImage(res.data, 0, 0, width, height);
|
|
16216
16216
|
} else context.fillStyle = createColor(context, clear, {
|
|
@@ -16745,6 +16745,8 @@
|
|
|
16745
16745
|
this._beforeRender && this._beforeRender(stage);
|
|
16746
16746
|
}, this.afterClearScreen = drawParams => {
|
|
16747
16747
|
this._afterClearScreen && this._afterClearScreen(drawParams);
|
|
16748
|
+
}, this.afterClearRect = drawParams => {
|
|
16749
|
+
this._afterClearRect && this._afterClearRect(drawParams);
|
|
16748
16750
|
}, this.afterRender = stage => {
|
|
16749
16751
|
this.renderCount++, this._afterRender && this._afterRender(stage), this._afterNextRenderCbs && this._afterNextRenderCbs.forEach(cb => cb(stage)), this._afterNextRenderCbs = null, this.tickedBeforeRender = !1;
|
|
16750
16752
|
}, this.afterTickCb = () => {
|
|
@@ -16752,7 +16754,8 @@
|
|
|
16752
16754
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
16753
16755
|
beforeRender: new SyncHook(["stage"]),
|
|
16754
16756
|
afterRender: new SyncHook(["stage"]),
|
|
16755
|
-
afterClearScreen: new SyncHook(["stage"])
|
|
16757
|
+
afterClearScreen: new SyncHook(["stage"]),
|
|
16758
|
+
afterClearRect: new SyncHook(["stage"])
|
|
16756
16759
|
}, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
|
|
16757
16760
|
width: params.width,
|
|
16758
16761
|
height: params.height,
|
|
@@ -16764,7 +16767,7 @@
|
|
|
16764
16767
|
canvas: params.canvas
|
|
16765
16768
|
}), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
|
|
16766
16769
|
main: !0
|
|
16767
|
-
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
16770
|
+
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this.hooks.afterClearScreen.tap("constructor", this.afterClearScreen), this.hooks.afterClearRect.tap("constructor", this.afterClearRect), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this._afterClearScreen = params.afterClearScreen, this._afterClearRect = params.afterClearRect, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
16768
16771
|
tickRenderMode: "effect"
|
|
16769
16772
|
}), this.optmize(params.optimize), params.background && isString$6(this._background) && this._background.includes("/") && this.setAttributes({
|
|
16770
16773
|
background: this._background
|
|
@@ -42248,13 +42251,15 @@
|
|
|
42248
42251
|
afterRender(stage) {
|
|
42249
42252
|
stage.window.getContext().inuse = !1, stage.needRender = !1, chartStage.resumeRender();
|
|
42250
42253
|
},
|
|
42251
|
-
|
|
42252
|
-
|
|
42253
|
-
|
|
42254
|
-
|
|
42255
|
-
|
|
42256
|
-
|
|
42257
|
-
|
|
42254
|
+
renderHooks: {
|
|
42255
|
+
afterClearRect(drawParams) {
|
|
42256
|
+
const {
|
|
42257
|
+
context: context,
|
|
42258
|
+
layer: layer,
|
|
42259
|
+
viewBox: viewBox
|
|
42260
|
+
} = drawParams;
|
|
42261
|
+
layer.main && drawParams.clear && (context.beginPath(), context.fillStyle = hoverColor, context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1), context.fill());
|
|
42262
|
+
}
|
|
42258
42263
|
}
|
|
42259
42264
|
}));
|
|
42260
42265
|
const chartStage = this.activeChartInstance.getStage(),
|
|
@@ -50812,9 +50817,11 @@
|
|
|
50812
50817
|
});
|
|
50813
50818
|
}
|
|
50814
50819
|
|
|
50815
|
-
function
|
|
50820
|
+
function bindDropdownMenuEvent(table) {
|
|
50816
50821
|
table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, () => {
|
|
50817
50822
|
table.stateManager.hideMenu();
|
|
50823
|
+
}), table.on(TABLE_EVENT_TYPE.SCROLL, () => {
|
|
50824
|
+
table.stateManager.hideMenu();
|
|
50818
50825
|
});
|
|
50819
50826
|
}
|
|
50820
50827
|
|
|
@@ -50887,7 +50894,7 @@
|
|
|
50887
50894
|
}, 0);
|
|
50888
50895
|
}
|
|
50889
50896
|
bindSelfEvent() {
|
|
50890
|
-
this.table.isReleased || (bindIconClickEvent(this.table),
|
|
50897
|
+
this.table.isReleased || (bindIconClickEvent(this.table), bindDropdownMenuEvent(this.table), this.updateEventBinder(), bindMediaClick(this.table), bindDBClickAutoColumnWidthEvent(this.table), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table), bindGroupCheckboxTreeChange(this.table), bindHeaderCheckboxChange(this.table), bindButtonClickEvent(this.table), rightButtonClickEvent(this.table));
|
|
50891
50898
|
}
|
|
50892
50899
|
dealTableHover(eventArgsSet) {
|
|
50893
50900
|
if (!eventArgsSet) return void this.table.stateManager.updateHoverPos(-1, -1);
|
|
@@ -53709,8 +53716,8 @@
|
|
|
53709
53716
|
return TABLE_EVENT_TYPE;
|
|
53710
53717
|
}
|
|
53711
53718
|
constructor(container, options = {}) {
|
|
53712
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
53713
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.19.4
|
|
53719
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
53720
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.19.4", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
53714
53721
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
53715
53722
|
options: options,
|
|
53716
53723
|
container: container
|
|
@@ -53784,7 +53791,7 @@
|
|
|
53784
53791
|
bottom: 0
|
|
53785
53792
|
}, padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), (isValid$3(canvasHeight) || isValid$3(canvasWidth)) && (this.canvasSizeSeted = !0), this.tableNoFrameWidth = 0, this.tableNoFrameHeight = 0, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0, this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal";
|
|
53786
53793
|
const internalProps = this.internalProps = {};
|
|
53787
|
-
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? ("node" !== Env.mode && (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$4(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_f = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _f || _f, internalProps.columnResizeMode = null !== (_g = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _g ? _g : columnResizeMode, internalProps.rowResizeMode = null !== (_h = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _h ? _h : rowResizeMode, internalProps.dragHeaderMode = null !== (_k = null !== (_j = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _j ? _j : dragHeaderMode) && void 0 !== _k ? _k : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.groupBy = null !== (_l = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _l ? _l : groupBy, internalProps.
|
|
53794
|
+
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? ("node" !== Env.mode && (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$4(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_f = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _f || _f, internalProps.columnResizeMode = null !== (_g = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _g ? _g : columnResizeMode, internalProps.rowResizeMode = null !== (_h = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _h ? _h : rowResizeMode, internalProps.dragHeaderMode = null !== (_k = null !== (_j = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _j ? _j : dragHeaderMode) && void 0 !== _k ? _k : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.groupBy = null !== (_l = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _l ? _l : groupBy, internalProps.groupTitleCheckbox = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCheckbox) && void 0 !== _m ? _m : !!(null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox), internalProps.groupTitleFieldFormat = null !== (_o = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _o ? _o : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_p = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _p ? _p : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_q = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _q ? _q : enableTreeStickCell, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {};
|
|
53788
53795
|
const that = this;
|
|
53789
53796
|
if (internalProps.calcWidthContext = {
|
|
53790
53797
|
_: internalProps,
|
|
@@ -53792,7 +53799,7 @@
|
|
|
53792
53799
|
var _a;
|
|
53793
53800
|
return "node" === Env.mode ? that.canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
|
|
53794
53801
|
}
|
|
53795
|
-
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (
|
|
53802
|
+
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_r = options.theme) && void 0 !== _r ? _r : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), container ? (clearDOM && (container.innerHTML = ""), container.appendChild(internalProps.element), this._updateSize()) : this._updateSize(), internalProps.bodyHelper = new BodyHelper(this), internalProps.headerHelper = new HeaderHelper(this), internalProps.rowSeriesNumberHelper = new RowSeriesNumberHelper(this), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_s = options.allowFrozenColCount) && void 0 !== _s ? _s : 0, internalProps.limitMaxAutoWidth = null !== (_t = options.limitMaxAutoWidth) && void 0 !== _t ? _t : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, this.scenegraph = new Scenegraph(this), this.stateManager = new StateManager(this), this.eventManager = new EventManager(this), this.animationManager = new TableAnimationManager(this), options.legends) {
|
|
53796
53803
|
internalProps.legends = [];
|
|
53797
53804
|
const createLegend = Factory.getFunction("createLegend");
|
|
53798
53805
|
if (Array.isArray(options.legends)) {
|
|
@@ -53818,7 +53825,7 @@
|
|
|
53818
53825
|
}
|
|
53819
53826
|
if (internalProps.menu = Object.assign({
|
|
53820
53827
|
renderMode: "html"
|
|
53821
|
-
}, options.menu), Array.isArray(null === (
|
|
53828
|
+
}, options.menu), Array.isArray(null === (_u = options.menu) || void 0 === _u ? void 0 : _u.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_v = options.menu) || void 0 === _v ? void 0 : _v.dropDownMenuHighlight), (Array.isArray(null === (_w = options.menu) || void 0 === _w ? void 0 : _w.defaultHeaderMenuItems) || "function" == typeof (null === (_x = options.menu) || void 0 === _x ? void 0 : _x.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems), "html" === internalProps.menu.renderMode) {
|
|
53822
53829
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
53823
53830
|
internalProps.menuHandler = new MenuHandler(this);
|
|
53824
53831
|
}
|
|
@@ -53826,7 +53833,7 @@
|
|
|
53826
53833
|
changedCells: new Map()
|
|
53827
53834
|
}, internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell);
|
|
53828
53835
|
const CustomCellStylePlugin = Factory.getComponent("customCellStylePlugin");
|
|
53829
|
-
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (
|
|
53836
|
+
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_y = options.customCellStyle) && void 0 !== _y ? _y : [], null !== (_z = options.customCellStyleArrangement) && void 0 !== _z ? _z : [])), this._adjustCanvasSizeByOption();
|
|
53830
53837
|
}
|
|
53831
53838
|
_adjustCanvasSizeByOption() {
|
|
53832
53839
|
"auto" !== this.options.canvasHeight && "auto" !== this.options.canvasWidth || setTimeout(() => {
|
|
@@ -54662,7 +54669,7 @@
|
|
|
54662
54669
|
height: !1
|
|
54663
54670
|
}), this.customRender = customRender, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0;
|
|
54664
54671
|
const internalProps = this.internalProps;
|
|
54665
|
-
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_e = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _e || _e, internalProps.columnResizeMode = null !== (_f = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _f ? _f : columnResizeMode, internalProps.rowResizeMode = null !== (_g = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _g ? _g : rowResizeMode, internalProps.dragHeaderMode = null !== (_j = null !== (_h = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _h ? _h : dragHeaderMode) && void 0 !== _j ? _j : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps.groupBy = null !== (_k = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _k ? _k : groupBy, internalProps.
|
|
54672
|
+
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal", internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_e = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _e || _e, internalProps.columnResizeMode = null !== (_f = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _f ? _f : columnResizeMode, internalProps.rowResizeMode = null !== (_g = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _g ? _g : rowResizeMode, internalProps.dragHeaderMode = null !== (_j = null !== (_h = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _h ? _h : dragHeaderMode) && void 0 !== _j ? _j : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps.groupBy = null !== (_k = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _k ? _k : groupBy, internalProps.groupTitleCheckbox = null == groupConfig ? void 0 : groupConfig.titleCheckbox, internalProps.groupTitleFieldFormat = null !== (_l = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _l ? _l : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _m ? _m : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_o = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _o ? _o : enableTreeStickCell, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_p = options.theme) && void 0 !== _p ? _p : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_q = options.allowFrozenColCount) && void 0 !== _q ? _q : 0, internalProps.limitMaxAutoWidth = null !== (_r = options.limitMaxAutoWidth) && void 0 !== _r ? _r : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_s = internalProps.legends) || void 0 === _s || _s.forEach(legend => {
|
|
54666
54673
|
null == legend || legend.release();
|
|
54667
54674
|
}), null === (_t = internalProps.title) || void 0 === _t || _t.release(), internalProps.title = null, null === (_u = internalProps.emptyTip) || void 0 === _u || _u.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), clearChartRenderQueue(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
|
|
54668
54675
|
internalProps.legends = [];
|
|
@@ -57028,7 +57035,7 @@
|
|
|
57028
57035
|
function getTreeTitleMerge(col, row, cellRange, layout) {
|
|
57029
57036
|
if ("tree" !== layout.rowHierarchyType) return;
|
|
57030
57037
|
const cellRecord = layout._table.getCellRawRecord(col, row);
|
|
57031
|
-
layout._table.internalProps.
|
|
57038
|
+
layout._table.internalProps.groupTitleCheckbox && layout._table.internalProps.rowSeriesNumber ? (null == cellRecord ? void 0 : cellRecord.vtableMerge) && col >= layout.leftRowSeriesNumberColumnCount && (cellRange.start.col = layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row) : (null == cellRecord ? void 0 : cellRecord.vtableMerge) && (cellRange.start.col = layout.rowHeaderLevelCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row);
|
|
57032
57039
|
}
|
|
57033
57040
|
function getCellRangeTranspose(col, row, layout) {
|
|
57034
57041
|
var _a, _b, _c, _d;
|
|
@@ -58609,6 +58616,7 @@
|
|
|
58609
58616
|
this.internalProps.transpose !== transpose && (this.internalProps.transpose = transpose, this.internalProps.layoutMap && (this.internalProps.layoutMap.transpose = transpose, this.refreshRowColCount(), this._resetFrozenColCount(), this.renderAsync()));
|
|
58610
58617
|
}
|
|
58611
58618
|
getCellValue(col, row, skipCustomMerge) {
|
|
58619
|
+
var _a;
|
|
58612
58620
|
if (-1 === col || -1 === row) return null;
|
|
58613
58621
|
if (!skipCustomMerge) {
|
|
58614
58622
|
const customMergeText = this.getCustomMergeValue(col, row);
|
|
@@ -58627,7 +58635,11 @@
|
|
|
58627
58635
|
const record = table.getCellRawRecord(col, row);
|
|
58628
58636
|
if (null == record ? void 0 : record.vtableMerge) return "";
|
|
58629
58637
|
table.internalProps.layoutMap.isAggregation(col, row) || (value = this.dataSource.getGroupSeriesNumber(row - this.columnHeaderLevelCount));
|
|
58630
|
-
} else
|
|
58638
|
+
} else {
|
|
58639
|
+
const define = table.getBodyColumnDefine(col, row),
|
|
58640
|
+
checkboxSeriesNumberStyle = table.getFieldData(define.field, col, row);
|
|
58641
|
+
value = "string" == typeof checkboxSeriesNumberStyle ? checkboxSeriesNumberStyle : (null == checkboxSeriesNumberStyle ? void 0 : checkboxSeriesNumberStyle.text) ? null !== (_a = checkboxSeriesNumberStyle.text) && void 0 !== _a ? _a : "" : row - this.columnHeaderLevelCount + 1;
|
|
58642
|
+
}
|
|
58631
58643
|
const {
|
|
58632
58644
|
format: format
|
|
58633
58645
|
} = table.internalProps.layoutMap.getSeriesNumberBody(col, row);
|
|
@@ -62457,7 +62469,7 @@
|
|
|
62457
62469
|
return width -= padding[1] + padding[3] + iconWidth, height -= padding[0] + padding[2], "center" === textAlign ? checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth + (width - checkboxComponent.AABBBounds.width()) / 2) : "right" === textAlign ? checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth + width - checkboxComponent.AABBBounds.width()) : checkboxComponent.setAttribute("x", padding[3] + cellLeftIconWidth), "middle" === textBaseline ? checkboxComponent.setAttribute("y", padding[0] + (height - checkboxComponent.AABBBounds.height()) / 2) : "bottom" === textBaseline ? checkboxComponent.setAttribute("y", padding[0] + height - checkboxComponent.AABBBounds.height()) : checkboxComponent.setAttribute("y", padding[0]), cellGroup;
|
|
62458
62470
|
}
|
|
62459
62471
|
function createCheckbox(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table, isCheckboxTree) {
|
|
62460
|
-
var _a, _b, _c, _d
|
|
62472
|
+
var _a, _b, _c, _d;
|
|
62461
62473
|
const style = table._getCellStyle(col, row),
|
|
62462
62474
|
size = getProp("size", style, col, row, table),
|
|
62463
62475
|
spaceBetweenTextAndIcon = getProp("spaceBetweenTextAndIcon", style, col, row, table),
|
|
@@ -62477,12 +62489,12 @@
|
|
|
62477
62489
|
text = null !== (_a = value) && void 0 !== _a ? _a : "";
|
|
62478
62490
|
if (isObject$7(value) ? (isChecked = value.checked, isDisabled = value.disable, text = null !== (_b = value.text) && void 0 !== _b ? _b : "") : "boolean" == typeof value && (isChecked = value, text = ""), table.internalProps.layoutMap.isSeriesNumber(col, row)) {
|
|
62479
62491
|
const checkboxSeriesNumberStyle = table.getFieldData(define.field, col, row);
|
|
62480
|
-
checkboxSeriesNumberStyle && (isChecked = checkboxSeriesNumberStyle.checked, isDisabled = checkboxSeriesNumberStyle.disable
|
|
62492
|
+
checkboxSeriesNumberStyle && ("string" == typeof checkboxSeriesNumberStyle || ("object" == typeof checkboxSeriesNumberStyle ? (isChecked = checkboxSeriesNumberStyle.checked, isDisabled = checkboxSeriesNumberStyle.disable) : "boolean" == typeof checkboxSeriesNumberStyle && (isChecked = checkboxSeriesNumberStyle)));
|
|
62481
62493
|
}
|
|
62482
62494
|
isChecked = table.stateManager.syncCheckedState(col, row, define.field, isChecked);
|
|
62483
62495
|
const hierarchyOffset = getHierarchyOffset(col, row, table),
|
|
62484
62496
|
cellStyle = table._getCellStyle(col, row),
|
|
62485
|
-
autoWrapText = null !== (
|
|
62497
|
+
autoWrapText = null !== (_c = cellStyle.autoWrapText) && void 0 !== _c ? _c : table.internalProps.autoWrapText,
|
|
62486
62498
|
{
|
|
62487
62499
|
lineClamp: lineClamp
|
|
62488
62500
|
} = cellStyle,
|
|
@@ -62538,7 +62550,7 @@
|
|
|
62538
62550
|
},
|
|
62539
62551
|
dx: isCheckboxTree ? hierarchyOffset : 0,
|
|
62540
62552
|
spaceBetweenTextAndIcon: spaceBetweenTextAndIcon,
|
|
62541
|
-
disabled: null !== (
|
|
62553
|
+
disabled: null !== (_d = null != isDisabled ? isDisabled : globalDisable) && void 0 !== _d && _d
|
|
62542
62554
|
};
|
|
62543
62555
|
"indeterminate" === isChecked ? (checkboxAttributes.checked = void 0, checkboxAttributes.indeterminate = !0) : (checkboxAttributes.checked = isChecked, checkboxAttributes.indeterminate = void 0), defaultFill && (checkboxAttributes.box.fill = defaultFill), defaultStroke && (checkboxAttributes.box.stroke = defaultStroke), disableFill && (checkboxAttributes.box.disableFill = disableFill), checkedFill && (checkboxAttributes.box.checkedFill = checkedFill), checkedStroke && (checkboxAttributes.box.checkedStroke = checkedStroke), disableCheckedFill && (checkboxAttributes.box.disableCheckedFill = disableCheckedFill), disableCheckedStroke && (checkboxAttributes.box.disableCheckedStroke = disableCheckedStroke), checkIconImage && (checkboxAttributes.icon.checkIconImage = checkIconImage), indeterminateIconImage && (checkboxAttributes.icon.indeterminateIconImage = indeterminateIconImage);
|
|
62544
62556
|
const checkbox = new CheckBox(checkboxAttributes);
|