@visactor/vtable-calendar 1.19.0-alpha.0 → 1.19.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/dist/vtable-calendar.js +197 -102
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -591,22 +591,22 @@
|
|
|
591
591
|
class Application {}
|
|
592
592
|
const application = new Application();
|
|
593
593
|
|
|
594
|
+
let idx = 0;
|
|
594
595
|
class PerformanceRAF {
|
|
595
596
|
constructor() {
|
|
596
|
-
this.nextAnimationFrameCbs =
|
|
597
|
+
this.nextAnimationFrameCbs = new Map(), this._rafHandle = null, this.runAnimationFrame = time => {
|
|
597
598
|
this._rafHandle = null;
|
|
598
599
|
const cbs = this.nextAnimationFrameCbs;
|
|
599
|
-
this.nextAnimationFrameCbs =
|
|
600
|
-
for (let i = 0; i < cbs.length; i++) cbs[i] && cbs[i](time);
|
|
600
|
+
this.nextAnimationFrameCbs = new Map(), cbs.forEach(cb => cb(time));
|
|
601
601
|
}, this.tryRunAnimationFrameNextFrame = () => {
|
|
602
|
-
null === this._rafHandle && 0 !== this.nextAnimationFrameCbs.
|
|
602
|
+
null === this._rafHandle && 0 !== this.nextAnimationFrameCbs.size && (this._rafHandle = application.global.getRequestAnimationFrame()(this.runAnimationFrame));
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
605
|
addAnimationFrameCb(callback) {
|
|
606
|
-
return this.nextAnimationFrameCbs.
|
|
606
|
+
return this.nextAnimationFrameCbs.set(++idx, callback), this.tryRunAnimationFrameNextFrame(), idx;
|
|
607
607
|
}
|
|
608
608
|
removeAnimationFrameCb(index) {
|
|
609
|
-
return
|
|
609
|
+
return !!this.nextAnimationFrameCbs.has(index) && (this.nextAnimationFrameCbs.delete(index), !0);
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
612
|
|
|
@@ -15029,8 +15029,10 @@
|
|
|
15029
15029
|
DefaultCanvasTextRender = __decorate$S([injectable(), __param$r(0, inject(ContributionProvider)), __param$r(0, named(TextRenderContribution)), __metadata$B("design:paramtypes", [Object])], DefaultCanvasTextRender);
|
|
15030
15030
|
|
|
15031
15031
|
function drawPolygon(path, points, x, y) {
|
|
15032
|
-
|
|
15033
|
-
|
|
15032
|
+
if (points && points.length) {
|
|
15033
|
+
path.moveTo(points[0].x + x, points[0].y + y);
|
|
15034
|
+
for (let i = 1; i < points.length; i++) path.lineTo(points[i].x + x, points[i].y + y);
|
|
15035
|
+
}
|
|
15034
15036
|
}
|
|
15035
15037
|
function drawRoundedPolygon(path, points, x, y, cornerRadius, closePath = !0) {
|
|
15036
15038
|
var _a;
|
|
@@ -17943,6 +17945,18 @@
|
|
|
17943
17945
|
const changeEvent = new CustomEvent(eventName, details);
|
|
17944
17946
|
changeEvent.manager = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventSystem.manager, this.dispatchEvent(changeEvent);
|
|
17945
17947
|
}
|
|
17948
|
+
eventPosToStagePos(e) {
|
|
17949
|
+
var _a, _b;
|
|
17950
|
+
const result = {
|
|
17951
|
+
x: 0,
|
|
17952
|
+
y: 0
|
|
17953
|
+
},
|
|
17954
|
+
stagePoints = null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventPointTransform(e)) && void 0 !== _b ? _b : {
|
|
17955
|
+
x: 0,
|
|
17956
|
+
y: 0
|
|
17957
|
+
};
|
|
17958
|
+
return this.globalTransMatrix.transformPoint(stagePoints, result), result;
|
|
17959
|
+
}
|
|
17946
17960
|
}
|
|
17947
17961
|
|
|
17948
17962
|
const MathPickerContribution = Symbol.for("MathPickerContribution");
|
|
@@ -22894,7 +22908,7 @@
|
|
|
22894
22908
|
var _a;
|
|
22895
22909
|
if ("group" !== el.type && el.id) {
|
|
22896
22910
|
const oldEl = prevInnerView[el.id];
|
|
22897
|
-
if (el.
|
|
22911
|
+
if (el.setFinalAttributes(el.attribute), oldEl) {
|
|
22898
22912
|
oldEl.release();
|
|
22899
22913
|
const oldAttrs = oldEl.attribute,
|
|
22900
22914
|
finalAttrs = el.getFinalAttribute(),
|
|
@@ -23404,6 +23418,10 @@
|
|
|
23404
23418
|
target.attribute.x = interpolateNumber$1(from, to, ratio), target.addUpdateBoundTag(), target.addUpdatePositionTag();
|
|
23405
23419
|
}, this.y = (key, from, to, ratio, step, target) => {
|
|
23406
23420
|
target.attribute.y = interpolateNumber$1(from, to, ratio), target.addUpdateBoundTag(), target.addUpdatePositionTag();
|
|
23421
|
+
}, this.dx = (key, from, to, ratio, step, target) => {
|
|
23422
|
+
target.attribute.dx = interpolateNumber$1(from, to, ratio), target.addUpdateBoundTag(), target.addUpdatePositionTag();
|
|
23423
|
+
}, this.dy = (key, from, to, ratio, step, target) => {
|
|
23424
|
+
target.attribute.dy = interpolateNumber$1(from, to, ratio), target.addUpdateBoundTag(), target.addUpdatePositionTag();
|
|
23407
23425
|
}, this.angle = (key, from, to, ratio, step, target) => {
|
|
23408
23426
|
target.attribute.angle = interpolateNumber$1(from, to, ratio), target.addUpdateBoundTag(), target.addUpdatePositionTag();
|
|
23409
23427
|
}, this.scaleX = (key, from, to, ratio, step, target) => {
|
|
@@ -23452,9 +23470,10 @@
|
|
|
23452
23470
|
function noop() {}
|
|
23453
23471
|
class Step {
|
|
23454
23472
|
constructor(type, props, duration, easing) {
|
|
23473
|
+
var _a;
|
|
23455
23474
|
this._startTime = 0, this._hasFirstRun = !1, this._syncAttributeUpdate = () => {
|
|
23456
23475
|
this.target.setAttributes(this.target.attribute);
|
|
23457
|
-
}, this.type = type, this.props = props, this.duration = duration, this.easing = easing ? "function" == typeof easing ? easing : Easing[easing] : Easing.linear, "wait" === type && (this.onUpdate = noop), this.id = Generator.GenAutoIncrementId(), this.syncAttributeUpdate = noop;
|
|
23476
|
+
}, this.type = type, this.props = props, this.duration = duration, this.easing = easing ? "function" == typeof easing ? easing : null !== (_a = Easing[easing]) && void 0 !== _a ? _a : Easing.linear : Easing.linear, "wait" === type && (this.onUpdate = noop), this.id = Generator.GenAutoIncrementId(), this.syncAttributeUpdate = noop;
|
|
23458
23477
|
}
|
|
23459
23478
|
bind(target, animate) {
|
|
23460
23479
|
this.target = target, this.animate = animate, this.onBind(), this.syncAttributeUpdate();
|
|
@@ -24119,7 +24138,10 @@
|
|
|
24119
24138
|
_handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
|
|
24120
24139
|
var _a, _b, _c, _d;
|
|
24121
24140
|
if (custom && customType) {
|
|
24122
|
-
const customParams = this.resolveValue(customParameters, graphic, {
|
|
24141
|
+
const customParams = this.resolveValue(customParameters, graphic, {
|
|
24142
|
+
width: graphic.stage.width,
|
|
24143
|
+
height: graphic.stage.height
|
|
24144
|
+
}),
|
|
24123
24145
|
objOptions = isFunction$7(options) ? options.call(null, null !== (_b = customParams && (null === (_a = customParams.data) || void 0 === _a ? void 0 : _a[0])) && void 0 !== _b ? _b : null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, customParams) : options;
|
|
24124
24146
|
customParams.options = objOptions, customParams.controlOptions = controlOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
|
|
24125
24147
|
} else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
|
|
@@ -24799,7 +24821,7 @@
|
|
|
24799
24821
|
const MIN_TICK_GAP = 12;
|
|
24800
24822
|
const calculateFlushPos = (basePosition, size, rangePosition, otherEnd) => rangePosition < basePosition ? Math.max(basePosition - size / 2, rangePosition) : rangePosition > basePosition ? Math.min(basePosition - size / 2, rangePosition - size) : rangePosition < otherEnd ? rangePosition : rangePosition - size;
|
|
24801
24823
|
const getCartesianLabelBounds = (scale, domain, op) => {
|
|
24802
|
-
var _a;
|
|
24824
|
+
var _a, _b, _c;
|
|
24803
24825
|
const {
|
|
24804
24826
|
labelStyle: labelStyle,
|
|
24805
24827
|
axisOrientType: axisOrientType,
|
|
@@ -24815,27 +24837,32 @@
|
|
|
24815
24837
|
scaleY = 0;
|
|
24816
24838
|
isHorizontal || (isVertical ? (scaleX = 0, scaleY = 1) : startAngle && (scaleX = Math.cos(startAngle), scaleY = -Math.sin(startAngle)));
|
|
24817
24839
|
const textMeasure = initTextMeasure(labelStyle),
|
|
24818
|
-
range = scale.range()
|
|
24819
|
-
|
|
24820
|
-
|
|
24821
|
-
|
|
24822
|
-
|
|
24823
|
-
|
|
24824
|
-
|
|
24825
|
-
|
|
24826
|
-
|
|
24827
|
-
|
|
24828
|
-
|
|
24829
|
-
|
|
24830
|
-
|
|
24831
|
-
|
|
24832
|
-
|
|
24833
|
-
|
|
24834
|
-
|
|
24835
|
-
|
|
24836
|
-
|
|
24837
|
-
|
|
24838
|
-
|
|
24840
|
+
range = scale.range();
|
|
24841
|
+
let labelBoundsList = [];
|
|
24842
|
+
for (let i = 0; i < domain.length; i++) {
|
|
24843
|
+
const v = domain[i],
|
|
24844
|
+
str = labelFormatter ? labelFormatter(v) : `${v}`;
|
|
24845
|
+
if (isPlainObject$5(str)) {
|
|
24846
|
+
labelBoundsList = void 0;
|
|
24847
|
+
break;
|
|
24848
|
+
}
|
|
24849
|
+
const {
|
|
24850
|
+
width: width,
|
|
24851
|
+
height: height
|
|
24852
|
+
} = textMeasure.quickMeasure(str),
|
|
24853
|
+
textWidth = Math.max(width, 12),
|
|
24854
|
+
textHeight = Math.max(height, 12),
|
|
24855
|
+
pos = scale.scale(v),
|
|
24856
|
+
baseTextX = scaleX * pos,
|
|
24857
|
+
baseTextY = scaleY * pos;
|
|
24858
|
+
let align,
|
|
24859
|
+
baseline,
|
|
24860
|
+
textX = baseTextX,
|
|
24861
|
+
textY = baseTextY;
|
|
24862
|
+
labelFlush && isHorizontal && 0 === i ? textX = calculateFlushPos(baseTextX, textWidth, range[0], range[range.length - 1]) : labelFlush && isHorizontal && i === domain.length - 1 ? textX = calculateFlushPos(baseTextX, textWidth, range[range.length - 1], range[0]) : align = null !== (_b = labelStyle.textAlign) && void 0 !== _b ? _b : "center", "right" === align ? textX -= textWidth : "center" === align && (textX -= textWidth / 2), labelFlush && isVertical && 0 === i ? textY = calculateFlushPos(baseTextY, textHeight, range[0], range[range.length - 1]) : labelFlush && isVertical && i === domain.length - 1 ? textY = calculateFlushPos(baseTextY, textHeight, range[range.length - 1], range[0]) : baseline = null !== (_c = labelStyle.textBaseline) && void 0 !== _c ? _c : "middle", "bottom" === baseline ? textY -= textHeight : "middle" === baseline && (textY -= textHeight / 2);
|
|
24863
|
+
const bounds = new AABBBounds$1().set(textX, textY, textX + textWidth, textY + textHeight);
|
|
24864
|
+
labelAngle && bounds.rotate(labelAngle, baseTextX, baseTextY), labelBoundsList.push(bounds);
|
|
24865
|
+
}
|
|
24839
24866
|
return labelBoundsList;
|
|
24840
24867
|
};
|
|
24841
24868
|
const isAxisHorizontal = axisOrientType => ["bottom", "top", "z"].includes(axisOrientType);
|
|
@@ -25332,7 +25359,7 @@
|
|
|
25332
25359
|
}
|
|
25333
25360
|
}
|
|
25334
25361
|
const continuousTicks = (scale, op) => {
|
|
25335
|
-
var _a, _b;
|
|
25362
|
+
var _a, _b, _c, _d;
|
|
25336
25363
|
if (!isContinuous(scale.type)) return convertDomainToTickData(scale.domain());
|
|
25337
25364
|
const range = scale.range(),
|
|
25338
25365
|
rangeSize = Math.abs(range[range.length - 1] - range[0]);
|
|
@@ -25384,23 +25411,25 @@
|
|
|
25384
25411
|
step = Math.floor(scaleTicks.length * MIN_FONT_SIZE / rangeSize);
|
|
25385
25412
|
scaleTicks.forEach((tick, index) => {
|
|
25386
25413
|
index % step != 0 && index !== scaleTicks.length - 1 || samplingScaleTicks.push(tick);
|
|
25387
|
-
}), items = getCartesianLabelBounds(scale, samplingScaleTicks, op).map((bounds, i) => ({
|
|
25414
|
+
}), items = null === (_c = getCartesianLabelBounds(scale, samplingScaleTicks, op)) || void 0 === _c ? void 0 : _c.map((bounds, i) => ({
|
|
25388
25415
|
AABBBounds: bounds,
|
|
25389
25416
|
value: samplingScaleTicks[i]
|
|
25390
25417
|
}));
|
|
25391
|
-
} else items = getCartesianLabelBounds(scale, scaleTicks, op).map((bounds, i) => ({
|
|
25418
|
+
} else items = null === (_d = getCartesianLabelBounds(scale, scaleTicks, op)) || void 0 === _d ? void 0 : _d.map((bounds, i) => ({
|
|
25392
25419
|
AABBBounds: bounds,
|
|
25393
25420
|
value: scaleTicks[i]
|
|
25394
25421
|
}));
|
|
25395
|
-
|
|
25396
|
-
|
|
25397
|
-
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25402
|
-
|
|
25403
|
-
|
|
25422
|
+
if (items) {
|
|
25423
|
+
const firstSourceItem = items[0],
|
|
25424
|
+
lastSourceItem = last$1(items),
|
|
25425
|
+
samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
|
|
25426
|
+
for (; items.length >= 3 && hasOverlap(items, labelGap);) items = samplingMethod(items, labelGap);
|
|
25427
|
+
const checkFirst = op.labelFirstVisible;
|
|
25428
|
+
let checkLast = op.labelLastVisible;
|
|
25429
|
+
textIntersect(firstSourceItem, lastSourceItem, labelGap) && items.includes(lastSourceItem) && items.length > 1 && checkFirst && checkLast && (items.splice(items.indexOf(lastSourceItem), 1), checkLast = !1), forceItemVisible(firstSourceItem, items, checkFirst, item => textIntersect(item, firstSourceItem, labelGap)), forceItemVisible(lastSourceItem, items, checkLast, item => textIntersect(item, lastSourceItem, labelGap) || !(!checkFirst || item === firstSourceItem) && textIntersect(item, firstSourceItem, labelGap), !0);
|
|
25430
|
+
const ticks = items.map(item => item.value);
|
|
25431
|
+
ticks.length < 3 && labelFlush && (ticks.length > 1 && ticks.pop(), last$1(ticks) !== last$1(scaleTicks) && ticks.push(last$1(scaleTicks))), scaleTicks = ticks;
|
|
25432
|
+
}
|
|
25404
25433
|
}
|
|
25405
25434
|
return convertDomainToTickData(scaleTicks);
|
|
25406
25435
|
};
|
|
@@ -25414,7 +25443,10 @@
|
|
|
25414
25443
|
}
|
|
25415
25444
|
};
|
|
25416
25445
|
|
|
25417
|
-
const getOneDimensionalLabelBounds = (scale, domain, op, isHorizontal) =>
|
|
25446
|
+
const getOneDimensionalLabelBounds = (scale, domain, op, isHorizontal) => {
|
|
25447
|
+
const labelBoundsList = getCartesianLabelBounds(scale, domain, op);
|
|
25448
|
+
return labelBoundsList && labelBoundsList.map(bounds => isHorizontal ? [bounds.x1, bounds.x2, bounds.width()] : [bounds.y1, bounds.y2, bounds.height()]);
|
|
25449
|
+
},
|
|
25418
25450
|
boundsOverlap = (prevBounds, nextBounds, gap = 0) => Math.max(prevBounds[0], nextBounds[0]) - gap / 2 <= Math.min(prevBounds[1], nextBounds[1]) + gap / 2;
|
|
25419
25451
|
const boundsDistance = (prevBounds, nextBounds) => prevBounds[1] < nextBounds[0] ? nextBounds[0] - prevBounds[1] : nextBounds[1] < prevBounds[0] ? prevBounds[0] - nextBounds[1] : 0;
|
|
25420
25452
|
const linearDiscreteTicks = (scale, op) => {
|
|
@@ -25445,23 +25477,27 @@
|
|
|
25445
25477
|
rangeStart = minInArray$1(range),
|
|
25446
25478
|
rangeEnd = maxInArray$1(range);
|
|
25447
25479
|
if (domain.length <= rangeSize / fontSize) {
|
|
25448
|
-
const
|
|
25449
|
-
|
|
25450
|
-
minBoundsLength = Math.min(...labelBoundsList.map(bounds => bounds[2])),
|
|
25451
|
-
|
|
25452
|
-
|
|
25480
|
+
const labelBoundsList = getOneDimensionalLabelBounds(scale, domain, op, isHorizontal);
|
|
25481
|
+
if (labelBoundsList) {
|
|
25482
|
+
const minBoundsLength = Math.min(...labelBoundsList.map(bounds => bounds[2])),
|
|
25483
|
+
incrementUnit = (rangeEnd - rangeStart) / domain.length,
|
|
25484
|
+
stepResult = getStep$1(domain, labelBoundsList, labelGap, op.labelLastVisible, Math.floor(minBoundsLength / incrementUnit), !1);
|
|
25485
|
+
scaleTicks = scale.stepTicks(stepResult.step), op.labelLastVisible && (stepResult.delCount && (scaleTicks = scaleTicks.slice(0, scaleTicks.length - stepResult.delCount)), scaleTicks.push(domain[domain.length - 1]));
|
|
25486
|
+
}
|
|
25453
25487
|
} else {
|
|
25454
25488
|
const tempDomain = [domain[0], domain[Math.floor(domain.length / 2)], domain[domain.length - 1]],
|
|
25455
25489
|
tempList = getOneDimensionalLabelBounds(scale, tempDomain, op, isHorizontal);
|
|
25456
|
-
|
|
25457
|
-
|
|
25458
|
-
|
|
25459
|
-
|
|
25460
|
-
|
|
25461
|
-
|
|
25490
|
+
if (tempList) {
|
|
25491
|
+
let maxBounds = null;
|
|
25492
|
+
tempList.forEach(current => {
|
|
25493
|
+
maxBounds ? maxBounds[2] < current[2] && (maxBounds = current) : maxBounds = current;
|
|
25494
|
+
});
|
|
25495
|
+
const step = rangeEnd - rangeStart - labelGap > 0 ? Math.ceil(domain.length * (labelGap + maxBounds[2]) / (rangeEnd - rangeStart - labelGap)) : domain.length - 1;
|
|
25496
|
+
scaleTicks = scale.stepTicks(step), !op.labelLastVisible || scaleTicks.length && scaleTicks[scaleTicks.length - 1] === domain[domain.length - 1] || (scaleTicks.length && Math.abs(scale.scale(scaleTicks[scaleTicks.length - 1]) - scale.scale(domain[domain.length - 1])) < maxBounds[2] && (scaleTicks = scaleTicks.slice(0, -1)), scaleTicks.push(domain[domain.length - 1]));
|
|
25497
|
+
}
|
|
25462
25498
|
}
|
|
25463
|
-
}
|
|
25464
|
-
return convertDomainToTickData(scaleTicks);
|
|
25499
|
+
}
|
|
25500
|
+
return isNil$5(scaleTicks) && (scaleTicks = scale.domain()), convertDomainToTickData(scaleTicks);
|
|
25465
25501
|
};
|
|
25466
25502
|
const getStep$1 = (domain, labelBoundsList, labelGap, labelLastVisible, defaultStep, areAllBoundsSame) => {
|
|
25467
25503
|
let resultDelCount = 0,
|
|
@@ -32416,7 +32452,7 @@
|
|
|
32416
32452
|
var _a, _b, _c;
|
|
32417
32453
|
this.lastFilterRules = this.dataConfig.filterRules, this.dataConfig.filterRules = filterRules, this._source = this.processRecords(null !== (_b = null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSourceObj), this._sourceLength = (null === (_c = this._source) || void 0 === _c ? void 0 : _c.length) || 0, this.sortedIndexMap.clear(), this.currentIndexedData = Array.from({
|
|
32418
32454
|
length: this._sourceLength
|
|
32419
|
-
}, (_, i) => i), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength);
|
|
32455
|
+
}, (_, i) => i), "tree" === this.rowHierarchyType && this.initTreeHierarchyState(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength);
|
|
32420
32456
|
}
|
|
32421
32457
|
updateFilterRules(filterRules) {
|
|
32422
32458
|
var _a, _b, _c;
|
|
@@ -36561,7 +36597,7 @@
|
|
|
36561
36597
|
}
|
|
36562
36598
|
}
|
|
36563
36599
|
const newCellGroup = createCell(type, value, define, table, col, row, table.getColWidth(col), cellWidth, cellHeight, addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent, addNew ? 0 : table.scenegraph.getCellGroupY(row), padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult);
|
|
36564
|
-
return !addNew && oldCellGroup.parent && (oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup), oldCellGroup.parent.removeChild(oldCellGroup), (null === (_a = table.scenegraph) || void 0 === _a ? void 0 : _a.proxy.cellCache.get(col)) && (null === (_b = table.scenegraph) || void 0 === _b || _b.proxy.cellCache.set(col, newCellGroup))), newCellGroup;
|
|
36600
|
+
return !addNew && oldCellGroup.parent && (oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup), oldCellGroup.parent.removeChild(oldCellGroup), oldCellGroup.release(!0), (null === (_a = table.scenegraph) || void 0 === _a ? void 0 : _a.proxy.cellCache.get(col)) && (null === (_b = table.scenegraph) || void 0 === _b || _b.proxy.cellCache.set(col, newCellGroup))), newCellGroup;
|
|
36565
36601
|
}
|
|
36566
36602
|
function canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, table) {
|
|
36567
36603
|
var _a;
|
|
@@ -40458,7 +40494,7 @@
|
|
|
40458
40494
|
}
|
|
40459
40495
|
|
|
40460
40496
|
function createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin, proxy) {
|
|
40461
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
40497
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
40462
40498
|
const {
|
|
40463
40499
|
table: table
|
|
40464
40500
|
} = proxy,
|
|
@@ -40468,10 +40504,10 @@
|
|
|
40468
40504
|
rightBottomCornerGroup: rightBottomCornerGroup
|
|
40469
40505
|
} = table.scenegraph;
|
|
40470
40506
|
let distCol, distRow, distColForCompute, distRowForCompute;
|
|
40471
|
-
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && table.colCount - table.rightFrozenColCount <= table.colCount - 1 && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && table.rowCount - table.bottomFrozenRowCount <= table.rowCount - 1 && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
|
|
40507
|
+
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight(table.columnHeaderLevelCount)) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, "auto" === table.options.canvasHeight || (null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.forceComputeAllRowHeight) ? table.rowCount - 1 : null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && table.colCount - table.rightFrozenColCount <= table.colCount - 1 && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && table.rowCount - table.bottomFrozenRowCount <= table.rowCount - 1 && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
|
|
40472
40508
|
x: table.getFrozenColsWidth(),
|
|
40473
40509
|
y: table.getFrozenRowsHeight()
|
|
40474
|
-
}), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, Math.min(table.frozenColCount - 1, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount - 1), table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (
|
|
40510
|
+
}), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, Math.min(table.frozenColCount - 1, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount - 1), table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_e = null !== (_c = null === (_b = bodyGroup.firstChild) || void 0 === _b ? void 0 : _b.rowNumber) && void 0 !== _c ? _c : null === (_d = rowHeaderGroup.firstChild) || void 0 === _d ? void 0 : _d.rowNumber) && void 0 !== _e ? _e : proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = null !== (_o = null !== (_l = null !== (_j = null !== (_g = null === (_f = bodyGroup.lastChild) || void 0 === _f ? void 0 : _f.col) && void 0 !== _g ? _g : null === (_h = colHeaderGroup.lastChild) || void 0 === _h ? void 0 : _h.col) && void 0 !== _j ? _j : null === (_k = rowHeaderGroup.lastChild) || void 0 === _k ? void 0 : _k.col) && void 0 !== _l ? _l : null === (_m = cornerHeaderGroup.lastChild) || void 0 === _m ? void 0 : _m.col) && void 0 !== _o ? _o : proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2), proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
|
|
40475
40511
|
}
|
|
40476
40512
|
|
|
40477
40513
|
function getFirstChild(containerGroup) {
|
|
@@ -43452,19 +43488,24 @@
|
|
|
43452
43488
|
table.internalProps.useOneRowHeightFillAll = !1, "adaptive" === table.heightMode || table.autoFillHeight ? computeRowsHeight(this.table, 0, this.table.rowCount - 1, !0, !0) : (table.frozenRowCount > 0 && computeRowsHeight(this.table, 0, table.frozenRowCount - 1, !0, !0), table.bottomFrozenRowCount > 0 && computeRowsHeight(this.table, table.bottomFrozenRowCount, table.rowCount - 1, !0, !0), computeRowsHeight(table, this.proxy.rowStart, this.proxy.rowEnd, !0, !0));
|
|
43453
43489
|
}
|
|
43454
43490
|
resize() {
|
|
43455
|
-
|
|
43491
|
+
var _a, _b;
|
|
43492
|
+
this.proxy.resize(), ("adaptive" === this.table.widthMode || this.table.autoFillWidth) && (0 === this.table.internalProps._widthResizedColMap.size ? this.recalculateColWidths() : this.dealWidthMode()), "adaptive" === this.table.heightMode ? 0 === this.table.internalProps._heightResizedRowMap.size ? this.recalculateRowHeights() : this.dealHeightMode() : this.table.autoFillHeight && this.dealHeightMode(), this.resetFrozen(), this.updateTableSize(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), ("adaptive" === this.table.widthMode || "adaptive" === this.table.heightMode || this.table.autoFillWidth || this.table.autoFillHeight || (null === (_a = this.table.containerFit) || void 0 === _a ? void 0 : _a.width) || (null === (_b = this.table.containerFit) || void 0 === _b ? void 0 : _b.height)) && this.updateChartSizeForResizeColWidth(-1), this.proxy.progress(), this.updateNextFrame();
|
|
43456
43493
|
}
|
|
43457
43494
|
updateTableSize() {
|
|
43458
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
43459
|
-
|
|
43495
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
43496
|
+
const contentWidth = Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, this.bottomFrozenGroup.attribute.width, 0) + Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, this.leftBottomCornerGroup.attribute.width, 0) + Math.max(this.rightTopCornerGroup.attribute.width, this.rightFrozenGroup.attribute.width, this.rightBottomCornerGroup.attribute.width, 0),
|
|
43497
|
+
contentHeight = Math.max(this.colHeaderGroup.attribute.height, this.cornerHeaderGroup.attribute.height, this.rightTopCornerGroup.attribute.height, 0) + Math.max(this.rowHeaderGroup.attribute.height, this.bodyGroup.attribute.height, this.rightFrozenGroup.attribute.height, 0) + Math.max(this.leftBottomCornerGroup.attribute.height, this.bottomFrozenGroup.attribute.height, this.rightBottomCornerGroup.attribute.height, 0);
|
|
43498
|
+
let tableWidth = contentWidth,
|
|
43499
|
+
tableHeight = contentHeight;
|
|
43500
|
+
if (tableWidth = (null === (_a = this.table.containerFit) || void 0 === _a ? void 0 : _a.width) ? this.table.tableNoFrameWidth : Math.min(this.table.tableNoFrameWidth, contentWidth), tableHeight = (null === (_b = this.table.containerFit) || void 0 === _b ? void 0 : _b.height) ? this.table.tableNoFrameHeight : Math.min(this.table.tableNoFrameHeight, contentHeight), this.tableGroup.setAttributes({
|
|
43460
43501
|
x: this.table.tableX,
|
|
43461
43502
|
y: this.table.tableY,
|
|
43462
|
-
width:
|
|
43463
|
-
height:
|
|
43503
|
+
width: tableWidth,
|
|
43504
|
+
height: tableHeight
|
|
43464
43505
|
}), this.tableGroup.border) {
|
|
43465
|
-
const rectAttributes = null === (
|
|
43506
|
+
const rectAttributes = null === (_c = this.tableGroup.border) || void 0 === _c ? void 0 : _c.attribute;
|
|
43466
43507
|
let borderTop, borderRight, borderBottom, borderLeft;
|
|
43467
|
-
(null == rectAttributes ? void 0 : rectAttributes.strokeArrayWidth) ? (borderTop = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[0] : null !== (
|
|
43508
|
+
(null == rectAttributes ? void 0 : rectAttributes.strokeArrayWidth) ? (borderTop = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[0] : null !== (_d = rectAttributes.lineWidth) && void 0 !== _d ? _d : 0, borderRight = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[1] : null !== (_e = rectAttributes.lineWidth) && void 0 !== _e ? _e : 0, borderBottom = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[2] : null !== (_f = rectAttributes.lineWidth) && void 0 !== _f ? _f : 0, borderLeft = rectAttributes.strokeArrayWidth ? rectAttributes.strokeArrayWidth[3] : null !== (_g = rectAttributes.lineWidth) && void 0 !== _g ? _g : 0) : (borderTop = null !== (_h = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _h ? _h : 0, borderRight = null !== (_j = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _j ? _j : 0, borderBottom = null !== (_k = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _k ? _k : 0, borderLeft = null !== (_l = null == rectAttributes ? void 0 : rectAttributes.lineWidth) && void 0 !== _l ? _l : 0), "rect" === this.tableGroup.border.type ? (null === (_m = this.table.theme.frameStyle) || void 0 === _m ? void 0 : _m.innerBorder) ? this.tableGroup.border.setAttributes({
|
|
43468
43509
|
x: this.table.tableX + borderLeft / 2,
|
|
43469
43510
|
y: this.table.tableY + borderTop / 2,
|
|
43470
43511
|
width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
|
|
@@ -43474,12 +43515,12 @@
|
|
|
43474
43515
|
y: this.table.tableY - borderTop / 2,
|
|
43475
43516
|
width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
|
|
43476
43517
|
height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
|
|
43477
|
-
}) : "group" === this.tableGroup.border.type && ((null === (
|
|
43518
|
+
}) : "group" === this.tableGroup.border.type && ((null === (_o = this.table.theme.frameStyle) || void 0 === _o ? void 0 : _o.innerBorder) ? (this.tableGroup.border.setAttributes({
|
|
43478
43519
|
x: this.table.tableX + borderLeft / 2,
|
|
43479
43520
|
y: this.table.tableY + borderTop / 2,
|
|
43480
43521
|
width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
|
|
43481
43522
|
height: this.tableGroup.attribute.height - borderTop / 2 - borderBottom / 2
|
|
43482
|
-
}), null === (
|
|
43523
|
+
}), null === (_p = this.tableGroup.border.firstChild) || void 0 === _p || _p.setAttributes({
|
|
43483
43524
|
x: 0,
|
|
43484
43525
|
y: 0,
|
|
43485
43526
|
width: this.tableGroup.attribute.width - borderLeft / 2 - borderRight / 2,
|
|
@@ -43489,7 +43530,7 @@
|
|
|
43489
43530
|
y: this.table.tableY - borderTop / 2,
|
|
43490
43531
|
width: this.tableGroup.attribute.width + borderLeft / 2 + borderRight / 2,
|
|
43491
43532
|
height: this.tableGroup.attribute.height + borderTop / 2 + borderBottom / 2
|
|
43492
|
-
}), null === (
|
|
43533
|
+
}), null === (_q = this.tableGroup.border.firstChild) || void 0 === _q || _q.setAttributes({
|
|
43493
43534
|
x: borderLeft / 2,
|
|
43494
43535
|
y: borderTop / 2,
|
|
43495
43536
|
width: this.tableGroup.attribute.width,
|
|
@@ -45989,7 +46030,7 @@
|
|
|
45989
46030
|
}
|
|
45990
46031
|
|
|
45991
46032
|
function handleWhell(event, state, isWheelEvent = !0) {
|
|
45992
|
-
var _a;
|
|
46033
|
+
var _a, _b, _c;
|
|
45993
46034
|
let {
|
|
45994
46035
|
deltaX: deltaX,
|
|
45995
46036
|
deltaY: deltaY
|
|
@@ -45999,7 +46040,9 @@
|
|
|
45999
46040
|
horizontal: 1,
|
|
46000
46041
|
vertical: 1
|
|
46001
46042
|
});
|
|
46002
|
-
(optimizedDeltaX || optimizedDeltaY) && state.interactionState !== InteractionState.scrolling && state.updateInteractionState(InteractionState.scrolling)
|
|
46043
|
+
(optimizedDeltaX || optimizedDeltaY) && state.interactionState !== InteractionState.scrolling && state.updateInteractionState(InteractionState.scrolling);
|
|
46044
|
+
const autoHide = "scrolling" === (null === (_b = null === (_a = state.table.options.theme) || void 0 === _a ? void 0 : _a.scrollStyle) || void 0 === _b ? void 0 : _b.visible);
|
|
46045
|
+
optimizedDeltaX && (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(autoHide)), optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(autoHide)), isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll), (null === (_c = event.nativeEvent) || void 0 === _c ? void 0 : _c.cancelable) && ("none" === state.table.internalProps.overscrollBehavior || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, state)) && event.nativeEvent.preventDefault();
|
|
46003
46046
|
}
|
|
46004
46047
|
function optimizeScrollXY(x, y, ratio) {
|
|
46005
46048
|
var _a, _b;
|
|
@@ -46300,7 +46343,7 @@
|
|
|
46300
46343
|
});
|
|
46301
46344
|
}
|
|
46302
46345
|
setTimeout(() => {
|
|
46303
|
-
eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.isDraging = !1, eventManager.touchMovePoints = [];
|
|
46346
|
+
eventManager.isDown = !1, eventManager.isTouchdown = !1, eventManager.isTouchMove = !1, eventManager.isDraging = !1, eventManager.touchMovePoints = [];
|
|
46304
46347
|
}, 0);
|
|
46305
46348
|
}
|
|
46306
46349
|
}), table.scenegraph.tableGroup.addEventListener("rightdown", e => {
|
|
@@ -46988,6 +47031,7 @@
|
|
|
46988
47031
|
!1 !== isCompleteEdit && (stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover());
|
|
46989
47032
|
});
|
|
46990
47033
|
}
|
|
47034
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
46991
47035
|
};
|
|
46992
47036
|
eventManager.globalEventListeners.push({
|
|
46993
47037
|
name: "pointerup",
|
|
@@ -47433,8 +47477,12 @@
|
|
|
47433
47477
|
ranges = table.getSelectedCellRanges();
|
|
47434
47478
|
let cellInRange = !1;
|
|
47435
47479
|
if (ranges.length > 0) for (let i = 0; i < ranges.length; i++) {
|
|
47436
|
-
const range = ranges[i]
|
|
47437
|
-
|
|
47480
|
+
const range = ranges[i],
|
|
47481
|
+
startCol = range.start.col,
|
|
47482
|
+
endCol = range.end.col,
|
|
47483
|
+
startRow = range.start.row,
|
|
47484
|
+
endRow = range.end.row;
|
|
47485
|
+
if (col >= startCol && col <= endCol && row >= startRow && row <= endRow || col >= endCol && col <= startCol && row >= endRow && row <= startRow || col >= startCol && col <= endCol && row >= endRow && row <= startRow || col >= endCol && col <= startCol && row >= startRow && row <= endRow) {
|
|
47438
47486
|
cellInRange = !0;
|
|
47439
47487
|
break;
|
|
47440
47488
|
}
|
|
@@ -48145,22 +48193,28 @@
|
|
|
48145
48193
|
element = null !== (_a = table.internalProps.menu.parentElement) && void 0 !== _a ? _a : table.getElement(),
|
|
48146
48194
|
{
|
|
48147
48195
|
width: containerWidth,
|
|
48196
|
+
height: containerHeight,
|
|
48148
48197
|
left: containerLeft,
|
|
48149
48198
|
top: containerTop
|
|
48150
48199
|
} = element.getBoundingClientRect(),
|
|
48151
48200
|
{
|
|
48152
48201
|
x: rootLeft,
|
|
48153
48202
|
y: rootTop,
|
|
48154
|
-
width: rootWidth
|
|
48203
|
+
width: rootWidth,
|
|
48204
|
+
height: rootHeight
|
|
48155
48205
|
} = rootElement.getBoundingClientRect();
|
|
48156
48206
|
if (secondElement) {
|
|
48157
48207
|
secondElement.parentElement !== element && element.appendChild(secondElement), secondElement.style.left = "0px";
|
|
48158
48208
|
const maxWidth = .8 * containerWidth;
|
|
48159
48209
|
secondElement.style.maxWidth = `${maxWidth}px`;
|
|
48160
48210
|
const secondElementWidth = secondElement.clientWidth,
|
|
48161
|
-
|
|
48211
|
+
secondElementHeight = secondElement.clientHeight,
|
|
48162
48212
|
secondElementLeft = x - containerLeft;
|
|
48163
|
-
|
|
48213
|
+
let topStyle = y - 4 - containerTop;
|
|
48214
|
+
if (topStyle + secondElementHeight > containerHeight) {
|
|
48215
|
+
topStyle = topStyle - secondElementHeight + secondElement.firstElementChild.clientHeight + 4;
|
|
48216
|
+
}
|
|
48217
|
+
secondElement.style.top = `${topStyle}px`;
|
|
48164
48218
|
let leftStyle = secondElementLeft;
|
|
48165
48219
|
return leftStyle + secondElementWidth > containerWidth ? leftStyle = leftStyle - secondElementWidth - rootWidth : leftStyle += 4, secondElement.style.left = `${leftStyle}px`, !0;
|
|
48166
48220
|
}
|
|
@@ -50268,8 +50322,8 @@
|
|
|
50268
50322
|
return TABLE_EVENT_TYPE;
|
|
50269
50323
|
}
|
|
50270
50324
|
constructor(container, options = {}) {
|
|
50271
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
50272
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.19.0
|
|
50325
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
50326
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.19.0", 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");
|
|
50273
50327
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
50274
50328
|
options: options,
|
|
50275
50329
|
container: container
|
|
@@ -50286,6 +50340,10 @@
|
|
|
50286
50340
|
heightMode = "standard",
|
|
50287
50341
|
autoFillWidth = !1,
|
|
50288
50342
|
autoFillHeight = !1,
|
|
50343
|
+
containerFit = {
|
|
50344
|
+
width: !1,
|
|
50345
|
+
height: !1
|
|
50346
|
+
},
|
|
50289
50347
|
widthAdaptiveMode = "only-body",
|
|
50290
50348
|
heightAdaptiveMode = "only-body",
|
|
50291
50349
|
keyboardOptions: keyboardOptions,
|
|
@@ -50316,14 +50374,23 @@
|
|
|
50316
50374
|
limitMinHeight: limitMinHeight,
|
|
50317
50375
|
clearDOM = !0
|
|
50318
50376
|
} = options;
|
|
50319
|
-
this.container = container, this.options = options, this._widthMode = widthMode, this._heightMode = heightMode, this._widthAdaptiveMode = widthAdaptiveMode, this._heightAdaptiveMode = heightAdaptiveMode, this._autoFillWidth = autoFillWidth, this._autoFillHeight = autoFillHeight,
|
|
50377
|
+
this.container = container, this.options = options, this._widthMode = widthMode, this._heightMode = heightMode, this._widthAdaptiveMode = widthAdaptiveMode, this._heightAdaptiveMode = heightAdaptiveMode, this._autoFillWidth = autoFillWidth, this._autoFillHeight = autoFillHeight, void 0 !== containerFit && (this._containerFit = "boolean" == typeof containerFit ? {
|
|
50378
|
+
width: containerFit,
|
|
50379
|
+
height: containerFit
|
|
50380
|
+
} : containerFit && "object" == typeof containerFit ? {
|
|
50381
|
+
width: null === (_b = containerFit.width) || void 0 === _b || _b,
|
|
50382
|
+
height: null === (_c = containerFit.height) || void 0 === _c || _c
|
|
50383
|
+
} : {
|
|
50384
|
+
width: !1,
|
|
50385
|
+
height: !1
|
|
50386
|
+
}), this.customRender = customRender, this.padding = {
|
|
50320
50387
|
top: 0,
|
|
50321
50388
|
right: 0,
|
|
50322
50389
|
left: 0,
|
|
50323
50390
|
bottom: 0
|
|
50324
|
-
}, 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 !== (
|
|
50391
|
+
}, 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";
|
|
50325
50392
|
const internalProps = this.internalProps = {};
|
|
50326
|
-
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 === (
|
|
50393
|
+
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 = enableCheckboxCascade, 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._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 = {};
|
|
50327
50394
|
const that = this;
|
|
50328
50395
|
if (internalProps.calcWidthContext = {
|
|
50329
50396
|
_: internalProps,
|
|
@@ -50331,7 +50398,7 @@
|
|
|
50331
50398
|
var _a;
|
|
50332
50399
|
return "node" === Env.mode ? that.canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
|
|
50333
50400
|
}
|
|
50334
|
-
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (
|
|
50401
|
+
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_k = options.theme) && void 0 !== _k ? _k : 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 !== (_l = options.allowFrozenColCount) && void 0 !== _l ? _l : 0, internalProps.limitMaxAutoWidth = null !== (_m = options.limitMaxAutoWidth) && void 0 !== _m ? _m : 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) {
|
|
50335
50402
|
internalProps.legends = [];
|
|
50336
50403
|
const createLegend = Factory.getFunction("createLegend");
|
|
50337
50404
|
if (Array.isArray(options.legends)) {
|
|
@@ -50357,7 +50424,7 @@
|
|
|
50357
50424
|
}
|
|
50358
50425
|
if (internalProps.menu = Object.assign({
|
|
50359
50426
|
renderMode: "html"
|
|
50360
|
-
}, options.menu), Array.isArray(null === (
|
|
50427
|
+
}, options.menu), Array.isArray(null === (_o = options.menu) || void 0 === _o ? void 0 : _o.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_p = options.menu) || void 0 === _p ? void 0 : _p.dropDownMenuHighlight), (Array.isArray(null === (_q = options.menu) || void 0 === _q ? void 0 : _q.defaultHeaderMenuItems) || "function" == typeof (null === (_r = options.menu) || void 0 === _r ? void 0 : _r.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems), "html" === internalProps.menu.renderMode) {
|
|
50361
50428
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
50362
50429
|
internalProps.menuHandler = new MenuHandler(this);
|
|
50363
50430
|
}
|
|
@@ -50365,7 +50432,7 @@
|
|
|
50365
50432
|
changedCells: new Map()
|
|
50366
50433
|
}, internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell);
|
|
50367
50434
|
const CustomCellStylePlugin = Factory.getComponent("customCellStylePlugin");
|
|
50368
|
-
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (
|
|
50435
|
+
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_s = options.customCellStyle) && void 0 !== _s ? _s : [], null !== (_t = options.customCellStyleArrangement) && void 0 !== _t ? _t : [])), this._adjustCanvasSizeByOption();
|
|
50369
50436
|
}
|
|
50370
50437
|
_adjustCanvasSizeByOption() {
|
|
50371
50438
|
"auto" !== this.options.canvasHeight && "auto" !== this.options.canvasWidth || setTimeout(() => {
|
|
@@ -51112,7 +51179,7 @@
|
|
|
51112
51179
|
return super.fireListeners(type, event);
|
|
51113
51180
|
}
|
|
51114
51181
|
updateOption(options) {
|
|
51115
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
51182
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
51116
51183
|
null === (_a = this.editorManager) || void 0 === _a || _a.cancelEdit(), this.options = options, this._hasAutoImageColumn = void 0;
|
|
51117
51184
|
const {
|
|
51118
51185
|
frozenColCount = 0,
|
|
@@ -51141,6 +51208,7 @@
|
|
|
51141
51208
|
heightMode: heightMode,
|
|
51142
51209
|
autoFillWidth: autoFillWidth,
|
|
51143
51210
|
autoFillHeight: autoFillHeight,
|
|
51211
|
+
containerFit: containerFit,
|
|
51144
51212
|
widthAdaptiveMode: widthAdaptiveMode,
|
|
51145
51213
|
heightAdaptiveMode: heightAdaptiveMode,
|
|
51146
51214
|
customRender: customRender,
|
|
@@ -51152,11 +51220,20 @@
|
|
|
51152
51220
|
limitMinWidth: limitMinWidth,
|
|
51153
51221
|
limitMinHeight: limitMinHeight
|
|
51154
51222
|
} = options;
|
|
51155
|
-
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), 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))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight,
|
|
51223
|
+
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), 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))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight, void 0 !== containerFit && (this._containerFit = "boolean" == typeof containerFit ? {
|
|
51224
|
+
width: containerFit,
|
|
51225
|
+
height: containerFit
|
|
51226
|
+
} : containerFit && "object" == typeof containerFit ? {
|
|
51227
|
+
width: null === (_b = containerFit.width) || void 0 === _b || _b,
|
|
51228
|
+
height: null === (_c = containerFit.height) || void 0 === _c || _c
|
|
51229
|
+
} : {
|
|
51230
|
+
width: !1,
|
|
51231
|
+
height: !1
|
|
51232
|
+
}), this.customRender = customRender, this.canvasWidth = isNumber$4(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$4(canvasHeight) ? canvasHeight : void 0;
|
|
51156
51233
|
const internalProps = this.internalProps;
|
|
51157
|
-
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (
|
|
51234
|
+
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 = enableCheckboxCascade, internalProps.columnResizeMode = null !== (_e = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _e ? _e : columnResizeMode, internalProps.rowResizeMode = null !== (_f = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _f ? _f : rowResizeMode, internalProps.dragHeaderMode = null !== (_h = null !== (_g = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _g ? _g : dragHeaderMode) && void 0 !== _h ? _h : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, 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 !== (_j = options.theme) && void 0 !== _j ? _j : 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 !== (_k = options.allowFrozenColCount) && void 0 !== _k ? _k : 0, internalProps.limitMaxAutoWidth = null !== (_l = options.limitMaxAutoWidth) && void 0 !== _l ? _l : 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 === (_m = internalProps.legends) || void 0 === _m || _m.forEach(legend => {
|
|
51158
51235
|
null == legend || legend.release();
|
|
51159
|
-
}), null === (
|
|
51236
|
+
}), null === (_o = internalProps.title) || void 0 === _o || _o.release(), internalProps.title = null, null === (_p = internalProps.emptyTip) || void 0 === _p || _p.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), clearChartRenderQueue(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
|
|
51160
51237
|
internalProps.legends = [];
|
|
51161
51238
|
const createLegend = Factory.getFunction("createLegend");
|
|
51162
51239
|
if (Array.isArray(options.legends)) {
|
|
@@ -51182,11 +51259,11 @@
|
|
|
51182
51259
|
}
|
|
51183
51260
|
if (internalProps.menu = Object.assign({
|
|
51184
51261
|
renderMode: "html"
|
|
51185
|
-
}, options.menu), Array.isArray(null === (
|
|
51262
|
+
}, options.menu), Array.isArray(null === (_q = options.menu) || void 0 === _q ? void 0 : _q.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_r = options.menu) || void 0 === _r ? void 0 : _r.dropDownMenuHighlight), (Array.isArray(null === (_s = options.menu) || void 0 === _s ? void 0 : _s.defaultHeaderMenuItems) || "function" == typeof (null === (_t = options.menu) || void 0 === _t ? void 0 : _t.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems), "html" === internalProps.menu.renderMode && !internalProps.menuHandler) {
|
|
51186
51263
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
51187
51264
|
internalProps.menuHandler = new MenuHandler(this);
|
|
51188
51265
|
}
|
|
51189
|
-
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (
|
|
51266
|
+
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(), internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell), null === (_u = this.customCellStylePlugin) || void 0 === _u || _u.updateCustomCell(null !== (_v = options.customCellStyle) && void 0 !== _v ? _v : [], null !== (_w = options.customCellStyleArrangement) && void 0 !== _w ? _w : []), this._adjustCanvasSizeByOption();
|
|
51190
51267
|
}
|
|
51191
51268
|
renderWithRecreateCells() {
|
|
51192
51269
|
this.internalProps.stick.changedCells.clear();
|
|
@@ -52026,9 +52103,11 @@
|
|
|
52026
52103
|
this.render();
|
|
52027
52104
|
const stage = this.scenegraph.stage;
|
|
52028
52105
|
if (stage) {
|
|
52029
|
-
|
|
52106
|
+
let contentWidth = this.tableX + this.getAllColsWidth(),
|
|
52030
52107
|
contentHeight = this.tableY + this.getAllRowsHeight();
|
|
52031
|
-
if (
|
|
52108
|
+
if (this.internalProps.legends && this.internalProps.legends.forEach(legend => {
|
|
52109
|
+
"right" === legend.orient ? contentWidth = Math.max(contentWidth, legend.legendComponent.globalAABBBounds.x2) : "bottom" === legend.orient && (contentHeight = Math.max(contentHeight, legend.legendComponent.globalAABBBounds.y2));
|
|
52110
|
+
}), this.internalProps.title && ("right" === this.internalProps.title._titleOption.orient ? contentWidth = Math.max(contentWidth, this.internalProps.title.getComponentGraphic().globalAABBBounds.x2) : "bottom" === this.internalProps.title._titleOption.orient && (contentHeight = Math.max(contentHeight, this.internalProps.title.getComponentGraphic().globalAABBBounds.y2))), contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
|
|
52032
52111
|
stage.render();
|
|
52033
52112
|
return stage.window.getImageBuffer(type);
|
|
52034
52113
|
}
|
|
@@ -52180,6 +52259,22 @@
|
|
|
52180
52259
|
checkHasColumnAutoWidth() {
|
|
52181
52260
|
return checkHasColumnAutoWidth(this);
|
|
52182
52261
|
}
|
|
52262
|
+
get containerFit() {
|
|
52263
|
+
return this._containerFit;
|
|
52264
|
+
}
|
|
52265
|
+
set containerFit(containerFit) {
|
|
52266
|
+
var _a, _b;
|
|
52267
|
+
this._containerFit = "boolean" == typeof containerFit ? {
|
|
52268
|
+
width: containerFit,
|
|
52269
|
+
height: containerFit
|
|
52270
|
+
} : containerFit && "object" == typeof containerFit ? {
|
|
52271
|
+
width: null === (_a = containerFit.width) || void 0 === _a || _a,
|
|
52272
|
+
height: null === (_b = containerFit.height) || void 0 === _b || _b
|
|
52273
|
+
} : {
|
|
52274
|
+
width: !1,
|
|
52275
|
+
height: !1
|
|
52276
|
+
};
|
|
52277
|
+
}
|
|
52183
52278
|
}
|
|
52184
52279
|
|
|
52185
52280
|
const chartTypes = {};
|
|
@@ -53572,7 +53667,7 @@
|
|
|
53572
53667
|
}, null !== (_b = this.columnHierarchyType) && void 0 !== _b ? _b : null, "grid-tree" === this.columnHierarchyType ? this.columnExpandLevel : void 0), this._headerObjectsIncludeHided = this._addHeaders(0, columns, []), this._headerObjects = this._headerObjectsIncludeHided.filter(col => !0 !== col.define.hide), this._headerObjectMap = this._headerObjects.reduce((o, e) => (o[e.id] = e, o), {}), this.rowHierarchyType = checkHasTreeDefine(this) ? "tree" : "grid", this._hasAggregation = checkHasAggregation(this), this._hasAggregationOnBottomCount = checkHasAggregationOnBottom(this), this._hasAggregationOnTopCount = checkHasAggregationOnTop(this), this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
|
|
53573
53668
|
}
|
|
53574
53669
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
53575
|
-
var _a;
|
|
53670
|
+
var _a, _b;
|
|
53576
53671
|
rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map((seriesNumber, index) => {
|
|
53577
53672
|
var _a, _b;
|
|
53578
53673
|
return {
|
|
@@ -53602,7 +53697,7 @@
|
|
|
53602
53697
|
style: rowSeriesNumber.style,
|
|
53603
53698
|
width: rowSeriesNumber.width,
|
|
53604
53699
|
format: rowSeriesNumber.format,
|
|
53605
|
-
field: rowSeriesNumber.field,
|
|
53700
|
+
field: null !== (_b = rowSeriesNumber.field) && void 0 !== _b ? _b : "_vtable_rowSeries_number",
|
|
53606
53701
|
icon: rowSeriesNumber.icon,
|
|
53607
53702
|
headerIcon: rowSeriesNumber.headerIcon,
|
|
53608
53703
|
isChildNode: !1
|
|
@@ -54993,14 +55088,14 @@
|
|
|
54993
55088
|
get recordsCount() {
|
|
54994
55089
|
return this.dataSource.records.length;
|
|
54995
55090
|
}
|
|
54996
|
-
updateColumns(columns) {
|
|
55091
|
+
updateColumns(columns, options) {
|
|
54997
55092
|
var _a, _b, _c, _d;
|
|
54998
55093
|
this.scenegraph.clearCells();
|
|
54999
55094
|
const oldHoverState = {
|
|
55000
55095
|
col: this.stateManager.hover.cellPos.col,
|
|
55001
55096
|
row: this.stateManager.hover.cellPos.row
|
|
55002
55097
|
};
|
|
55003
|
-
this.internalProps.columns = cloneDeepSpec(columns, ["children"]), generateAggregationForColumn(this), this.options.columns = columns, this.internalProps.headerHelper.setTableColumnsEditor(), this._hasAutoImageColumn = void 0, this.refreshHeader(), null === (_b = (_a = this.dataSource).updateColumns) || void 0 === _b || _b.call(_a, this.internalProps.columns), this.records && checkHasAggregationOnColumnDefine(columns) && this.dataSource.processRecords(null !== (_d = null === (_c = this.dataSource.dataSourceObj) || void 0 === _c ? void 0 : _c.records) && void 0 !== _d ? _d : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
|
|
55098
|
+
this.internalProps.columns = cloneDeepSpec(columns, ["children"]), generateAggregationForColumn(this), (null == options ? void 0 : options.clearColWidthCache) && this.internalProps._widthResizedColMap.clear(), this.options.columns = columns, this.internalProps.headerHelper.setTableColumnsEditor(), this._hasAutoImageColumn = void 0, this.refreshHeader(), null === (_b = (_a = this.dataSource).updateColumns) || void 0 === _b || _b.call(_a, this.internalProps.columns), this.records && checkHasAggregationOnColumnDefine(columns) && this.dataSource.processRecords(null !== (_d = null === (_c = this.dataSource.dataSourceObj) || void 0 === _c ? void 0 : _c.records) && void 0 !== _d ? _d : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
|
|
55004
55099
|
}
|
|
55005
55100
|
addColumn(column) {
|
|
55006
55101
|
const columns = this.options.columns;
|