@visactor/vtable 0.15.1 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +3 -2
- package/cjs/ListTable.js +21 -14
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +4 -3
- package/cjs/PivotChart.js +19 -20
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +9 -3
- package/cjs/PivotTable.js +117 -17
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/body-helper.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +4 -3
- package/cjs/core/BaseTable.js +2 -2
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/tableHelper.js +1 -1
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/data/DataSource.d.ts +1 -1
- package/cjs/data/DataSource.js +8 -12
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.js +2 -1
- package/cjs/dataset/dataset-pivot-table.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +3 -1
- package/cjs/dataset/dataset.js +35 -11
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/flatDataToObject.d.ts +3 -1
- package/cjs/dataset/flatDataToObject.js +27 -5
- package/cjs/dataset/flatDataToObject.js.map +1 -1
- package/cjs/dataset/statistics-helper.d.ts +1 -0
- package/cjs/dataset/statistics-helper.js +3 -0
- package/cjs/dataset/statistics-helper.js.map +1 -1
- package/cjs/event/listener/table-group.js +12 -2
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +9 -7
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +2 -2
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js +1 -4
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +11 -4
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +2 -2
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +0 -1
- package/cjs/scenegraph/scenegraph.js +4 -8
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/themes/ARCO.js +1 -2
- package/cjs/themes/BRIGHT.js +2 -1
- package/cjs/tools/util.d.ts +1 -1
- package/cjs/tools/util.js +12 -11
- package/cjs/tools/util.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +4 -3
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +6 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +4 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +516 -293
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +3 -2
- package/es/ListTable.js +21 -14
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +4 -3
- package/es/PivotChart.js +19 -22
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +9 -3
- package/es/PivotTable.js +103 -20
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/body-helper.js.map +1 -1
- package/es/core/BaseTable.d.ts +4 -3
- package/es/core/BaseTable.js +2 -2
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/tableHelper.js +1 -1
- package/es/core/tableHelper.js.map +1 -1
- package/es/data/DataSource.d.ts +1 -1
- package/es/data/DataSource.js +8 -12
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset-pivot-table.js +2 -1
- package/es/dataset/dataset-pivot-table.js.map +1 -1
- package/es/dataset/dataset.d.ts +3 -1
- package/es/dataset/dataset.js +36 -10
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/flatDataToObject.d.ts +3 -1
- package/es/dataset/flatDataToObject.js +27 -5
- package/es/dataset/flatDataToObject.js.map +1 -1
- package/es/dataset/statistics-helper.d.ts +1 -0
- package/es/dataset/statistics-helper.js +3 -0
- package/es/dataset/statistics-helper.js.map +1 -1
- package/es/event/listener/table-group.js +12 -1
- package/es/event/listener/table-group.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +9 -7
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +1 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +2 -2
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js +0 -5
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +11 -4
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +2 -2
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +0 -1
- package/es/scenegraph/scenegraph.js +5 -7
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/themes/ARCO.js +1 -2
- package/es/themes/BRIGHT.js +2 -1
- package/es/tools/util.d.ts +1 -1
- package/es/tools/util.js +6 -4
- package/es/tools/util.js.map +1 -1
- package/es/ts-types/base-table.d.ts +4 -3
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +6 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +4 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +2 -2
package/dist/vtable.js
CHANGED
|
@@ -434,8 +434,8 @@
|
|
|
434
434
|
const isNil$4 = value => null == value;
|
|
435
435
|
var isNil$5 = isNil$4;
|
|
436
436
|
|
|
437
|
-
const isValid$
|
|
438
|
-
var isValid$
|
|
437
|
+
const isValid$4 = value => null != value;
|
|
438
|
+
var isValid$5 = isValid$4;
|
|
439
439
|
|
|
440
440
|
const isObject$3 = value => {
|
|
441
441
|
const type = typeof value;
|
|
@@ -455,8 +455,8 @@
|
|
|
455
455
|
};
|
|
456
456
|
var isPlainObject$3 = isPlainObject$2;
|
|
457
457
|
|
|
458
|
-
const isUndefined
|
|
459
|
-
var isUndefined$
|
|
458
|
+
const isUndefined = value => void 0 === value;
|
|
459
|
+
var isUndefined$1 = isUndefined;
|
|
460
460
|
|
|
461
461
|
const isString$3 = function (value) {
|
|
462
462
|
let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
@@ -554,7 +554,7 @@
|
|
|
554
554
|
|
|
555
555
|
function cloneDeep$1(value) {
|
|
556
556
|
let result;
|
|
557
|
-
if (!isValid$
|
|
557
|
+
if (!isValid$5(value) || "object" != typeof value) return value;
|
|
558
558
|
const isArr = isArray$5(value),
|
|
559
559
|
length = value.length;
|
|
560
560
|
result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$4(value) || isNumber$7(value) || isString$4(value) ? value : isDate$3(value) ? new Date(+value) : void 0;
|
|
@@ -572,7 +572,7 @@
|
|
|
572
572
|
let shallowArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
573
573
|
if (source) {
|
|
574
574
|
if (target === source) return;
|
|
575
|
-
if (isValid$
|
|
575
|
+
if (isValid$5(source) && "object" == typeof source) {
|
|
576
576
|
const iterable = Object(source),
|
|
577
577
|
props = [];
|
|
578
578
|
for (const key in iterable) props.push(key);
|
|
@@ -582,7 +582,7 @@
|
|
|
582
582
|
propIndex = -1;
|
|
583
583
|
for (; length--;) {
|
|
584
584
|
const key = props[++propIndex];
|
|
585
|
-
isValid$
|
|
585
|
+
isValid$5(iterable[key]) && "object" == typeof iterable[key] ? baseMergeDeep$1(target, source, key, shallowArray) : assignMergeValue$1(target, key, iterable[key]);
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
}
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
}
|
|
690
690
|
|
|
691
691
|
function array$1(arr) {
|
|
692
|
-
return isValid$
|
|
692
|
+
return isValid$5(arr) ? isArray$5(arr) ? arr : [arr] : [];
|
|
693
693
|
}
|
|
694
694
|
function last(val) {
|
|
695
695
|
if (isArrayLike$3(val)) {
|
|
@@ -730,7 +730,7 @@
|
|
|
730
730
|
}
|
|
731
731
|
|
|
732
732
|
function range$1(start, stop, step) {
|
|
733
|
-
isValid$
|
|
733
|
+
isValid$5(stop) || (stop = start, start = 0), isValid$5(step) || (step = 1);
|
|
734
734
|
let i = -1;
|
|
735
735
|
const n = 0 | Math.max(0, Math.ceil((stop - start) / step)),
|
|
736
736
|
range = new Array(n);
|
|
@@ -1516,8 +1516,8 @@
|
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
1518
|
static parseColorString(value) {
|
|
1519
|
-
if (isValid$
|
|
1520
|
-
if (isValid$
|
|
1519
|
+
if (isValid$5(DEFAULT_COLORS_OPACITY$1[value])) return rgba$1(DEFAULT_COLORS_OPACITY$1[value]);
|
|
1520
|
+
if (isValid$5(DEFAULT_COLORS$1[value])) return rgb$1(DEFAULT_COLORS$1[value]);
|
|
1521
1521
|
const formatValue = `${value}`.trim().toLowerCase(),
|
|
1522
1522
|
isHex = REG_HEX$1.exec(formatValue);
|
|
1523
1523
|
if (isHex) {
|
|
@@ -1653,7 +1653,7 @@
|
|
|
1653
1653
|
};
|
|
1654
1654
|
let RGB$1 = class RGB {
|
|
1655
1655
|
constructor(r, g, b, opacity) {
|
|
1656
|
-
this.r = isNaN(+r) ? 255 : Math.max(0, Math.min(255, +r)), this.g = isNaN(+g) ? 255 : Math.max(0, Math.min(255, +g)), this.b = isNaN(+b) ? 255 : Math.max(0, Math.min(255, +b)), isValid$
|
|
1656
|
+
this.r = isNaN(+r) ? 255 : Math.max(0, Math.min(255, +r)), this.g = isNaN(+g) ? 255 : Math.max(0, Math.min(255, +g)), this.b = isNaN(+b) ? 255 : Math.max(0, Math.min(255, +b)), isValid$5(opacity) ? this.opacity = isNaN(+opacity) ? 1 : Math.max(0, Math.min(1, +opacity)) : this.opacity = 1;
|
|
1657
1657
|
}
|
|
1658
1658
|
formatHex() {
|
|
1659
1659
|
return `#${hex$1(this.r) + hex$1(this.g) + hex$1(this.b) + (1 === this.opacity ? "" : hex$1(255 * this.opacity))}`;
|
|
@@ -1837,13 +1837,13 @@
|
|
|
1837
1837
|
|
|
1838
1838
|
class TextMeasure {
|
|
1839
1839
|
constructor(option, textSpec) {
|
|
1840
|
-
this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid$
|
|
1840
|
+
this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid$5(option.specialCharSet) && (this.specialCharSet = option.specialCharSet), this._standardMethod = isValid$5(option.getTextBounds) ? this.fullMeasure.bind(this) : this.measureWithNaiveCanvas.bind(this);
|
|
1841
1841
|
}
|
|
1842
1842
|
initContext() {
|
|
1843
1843
|
if (this._notSupportCanvas) return !1;
|
|
1844
|
-
if (isNil$5(this._canvas) && (isValid$
|
|
1844
|
+
if (isNil$5(this._canvas) && (isValid$5(this._option.getCanvasForMeasure) && (this._canvas = this._option.getCanvasForMeasure()), isNil$5(this._canvas) && "undefined" != typeof window && void 0 !== window.document && isValid$5(globalThis.document) && (this._canvas = globalThis.document.createElement("canvas"))), isNil$5(this._context) && isValid$5(this._canvas)) {
|
|
1845
1845
|
const context = this._canvas.getContext("2d");
|
|
1846
|
-
isValid$
|
|
1846
|
+
isValid$5(context) && (context.save(), context.font = getContextFont$1(this.textSpec), this._contextSaved = !0, this._context = context);
|
|
1847
1847
|
}
|
|
1848
1848
|
return !isNil$5(this._context) || (this._notSupportCanvas = !0, !1);
|
|
1849
1849
|
}
|
|
@@ -1999,7 +1999,7 @@
|
|
|
1999
1999
|
};
|
|
2000
2000
|
if (isNil$5(text)) return defaultResult;
|
|
2001
2001
|
if (isArray$5(text)) {
|
|
2002
|
-
const textArr = text.filter(isValid$
|
|
2002
|
+
const textArr = text.filter(isValid$5).map(s => s.toString());
|
|
2003
2003
|
return 0 === textArr.length ? defaultResult : 1 === textArr.length ? processor(textArr[0]) : {
|
|
2004
2004
|
width: textArr.reduce((maxWidth, cur) => Math.max(maxWidth, processor(cur).width), 0),
|
|
2005
2005
|
height: textArr.length * ((null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize) + 1) + 1
|
|
@@ -2031,10 +2031,10 @@
|
|
|
2031
2031
|
return this._letterCharSize;
|
|
2032
2032
|
}
|
|
2033
2033
|
_measureSpecialChar(char) {
|
|
2034
|
-
return isValid$
|
|
2034
|
+
return isValid$5(this._specialCharSizeMap[char]) ? this._specialCharSizeMap[char] : this.specialCharSet.includes(char) ? (this._specialCharSizeMap[char] = this._standardMethod(char), this._specialCharSizeMap[char]) : null;
|
|
2035
2035
|
}
|
|
2036
2036
|
release() {
|
|
2037
|
-
isValid$
|
|
2037
|
+
isValid$5(this._canvas) && (this._canvas = null), isValid$5(this._context) && (this._contextSaved && (this._context.restore(), this._contextSaved = !1), this._context = null);
|
|
2038
2038
|
}
|
|
2039
2039
|
}
|
|
2040
2040
|
TextMeasure.ALPHABET_CHAR_SET = "abcdefghijklmnopqrstuvwxyz", TextMeasure.NUMBERS_CHAR_SET = "0123456789", TextMeasure.FULL_SIZE_CHAR = "字";
|
|
@@ -2134,7 +2134,7 @@
|
|
|
2134
2134
|
if (!list) {
|
|
2135
2135
|
return [];
|
|
2136
2136
|
}
|
|
2137
|
-
return list.map(listener => listener.call(this, event)).filter(r => isValid$
|
|
2137
|
+
return list.map(listener => listener.call(this, event)).filter(r => isValid$5(r));
|
|
2138
2138
|
}
|
|
2139
2139
|
release() {
|
|
2140
2140
|
delete this.listenersData;
|
|
@@ -2414,7 +2414,7 @@
|
|
|
2414
2414
|
if (!columnStyle) {
|
|
2415
2415
|
columnStyle = {};
|
|
2416
2416
|
}
|
|
2417
|
-
if (globalAutoWrapText && !isValid$
|
|
2417
|
+
if (globalAutoWrapText && !isValid$5(columnStyle.autoWrapText)) {
|
|
2418
2418
|
columnStyle.autoWrapText = true;
|
|
2419
2419
|
}
|
|
2420
2420
|
return new StyleClassDef((columnStyle ?? {}), (bodyStyle ?? {}));
|
|
@@ -2682,7 +2682,7 @@
|
|
|
2682
2682
|
if (!headerStyle) {
|
|
2683
2683
|
headerStyle = {};
|
|
2684
2684
|
}
|
|
2685
|
-
if (globalAutoWrapText && !isValid$
|
|
2685
|
+
if (globalAutoWrapText && !isValid$5(headerStyle.autoWrapText)) {
|
|
2686
2686
|
headerStyle.autoWrapText = true;
|
|
2687
2687
|
}
|
|
2688
2688
|
return new StyleClass(headerStyle ?? {}, (defaultHeaderStyle ?? {}));
|
|
@@ -2877,8 +2877,6 @@
|
|
|
2877
2877
|
const isString$2 = (v) => isIt$1(v, 'string');
|
|
2878
2878
|
const isNumber$5 = (v) => isIt$1(v, 'number');
|
|
2879
2879
|
const isBoolean$2 = (v) => isIt$1(v, 'boolean');
|
|
2880
|
-
const isUndefined = (v) => isIt$1(v, 'undefined');
|
|
2881
|
-
const isNull = (v) => isIt$1(v, 'null');
|
|
2882
2880
|
function ingoreNoneValueMerge(target, ...sources) {
|
|
2883
2881
|
if (!sources.length) {
|
|
2884
2882
|
return target || {};
|
|
@@ -2906,7 +2904,7 @@
|
|
|
2906
2904
|
if (typeof value === 'function') {
|
|
2907
2905
|
value = value();
|
|
2908
2906
|
}
|
|
2909
|
-
return isValid$
|
|
2907
|
+
return isValid$5(value) ? `${value}` : '';
|
|
2910
2908
|
}
|
|
2911
2909
|
function transpose(matrix) {
|
|
2912
2910
|
if (matrix?.length <= 0) {
|
|
@@ -2968,7 +2966,7 @@
|
|
|
2968
2966
|
'(?:\\s*,\\s*' +
|
|
2969
2967
|
'(0|1|0?\\.\\d+))?' +
|
|
2970
2968
|
'\\s*\\)$', 'i'));
|
|
2971
|
-
const alpha = !!rgb && isValid$
|
|
2969
|
+
const alpha = !!rgb && isValid$5(rgb[4]) ? rgb[4] : null;
|
|
2972
2970
|
const decimal = rgb
|
|
2973
2971
|
? [rgb[1], rgb[2], rgb[3]]
|
|
2974
2972
|
: color
|
|
@@ -2986,12 +2984,6 @@
|
|
|
2986
2984
|
pad(Math[isDarker ? 'max' : 'min'](parseInt(decimal[2], 10) + difference, isDarker ? 0 : 255).toString(16), 2)
|
|
2987
2985
|
].join('');
|
|
2988
2986
|
}
|
|
2989
|
-
function isValid$4(v) {
|
|
2990
|
-
if (isUndefined(v) || isNull(v)) {
|
|
2991
|
-
return false;
|
|
2992
|
-
}
|
|
2993
|
-
return true;
|
|
2994
|
-
}
|
|
2995
2987
|
function validToString(v) {
|
|
2996
2988
|
if (isString$2(v) || isNumber$5(v) || isBoolean$2(v)) {
|
|
2997
2989
|
return v.toString();
|
|
@@ -3031,6 +3023,10 @@
|
|
|
3031
3023
|
}
|
|
3032
3024
|
return result;
|
|
3033
3025
|
}
|
|
3026
|
+
function isAllDigits(str) {
|
|
3027
|
+
const pattern = /^-?\d+(\.\d+)?$/;
|
|
3028
|
+
return pattern.test(str);
|
|
3029
|
+
}
|
|
3034
3030
|
|
|
3035
3031
|
const isNode = typeof window === 'undefined' || typeof window.window === 'undefined';
|
|
3036
3032
|
let arrayFind;
|
|
@@ -3688,7 +3684,7 @@
|
|
|
3688
3684
|
return this._vals[key];
|
|
3689
3685
|
}
|
|
3690
3686
|
has(key) {
|
|
3691
|
-
return isValid$
|
|
3687
|
+
return isValid$5(this._vals[key]);
|
|
3692
3688
|
}
|
|
3693
3689
|
contain(value) {
|
|
3694
3690
|
return Object.values(this._vals).indexOf(value) >= 0;
|
|
@@ -9727,10 +9723,10 @@
|
|
|
9727
9723
|
const normalizedEvents = [];
|
|
9728
9724
|
if (this.supportsTouchEvents && event.changedTouches && event.changedTouches.length) for (let i = 0, li = event.changedTouches.length; i < li; i++) {
|
|
9729
9725
|
const touch = event.changedTouches[i];
|
|
9730
|
-
isUndefined$
|
|
9726
|
+
isUndefined$1(touch.button) && (touch.button = 0), isUndefined$1(touch.buttons) && (touch.buttons = 1), isUndefined$1(touch.isPrimary) && (touch.isPrimary = 1 === event.touches.length && "touchstart" === event.type), isUndefined$1(touch.width) && (touch.width = touch.radiusX || 1), isUndefined$1(touch.height) && (touch.height = touch.radiusY || 1), isUndefined$1(touch.tiltX) && (touch.tiltX = 0), isUndefined$1(touch.tiltY) && (touch.tiltY = 0), isUndefined$1(touch.pointerType) && (touch.pointerType = "touch"), isUndefined$1(touch.pointerId) && (touch.pointerId = touch.identifier || 0), isUndefined$1(touch.pressure) && (touch.pressure = touch.force || .5), isUndefined$1(touch.twist) && (touch.twist = 0), isUndefined$1(touch.tangentialPressure) && (touch.tangentialPressure = 0), isUndefined$1(touch.layerX) && (touch.layerX = touch.offsetX = touch.clientX), isUndefined$1(touch.layerY) && (touch.layerY = touch.offsetY = touch.clientY), touch.isNormalized = !0, touch.type = event.type, normalizedEvents.push(touch);
|
|
9731
9727
|
} else if (this.globalObj.supportsMouseEvents && (!(event instanceof MouseEvent) || this.supportsPointerEvents && event instanceof PointerEvent)) normalizedEvents.push(event);else {
|
|
9732
9728
|
const tempEvent = event;
|
|
9733
|
-
isUndefined$
|
|
9729
|
+
isUndefined$1(tempEvent.isPrimary) && (tempEvent.isPrimary = !0), isUndefined$1(tempEvent.width) && (tempEvent.width = 1), isUndefined$1(tempEvent.height) && (tempEvent.height = 1), isUndefined$1(tempEvent.tiltX) && (tempEvent.tiltX = 0), isUndefined$1(tempEvent.tiltY) && (tempEvent.tiltY = 0), isUndefined$1(tempEvent.pointerType) && (tempEvent.pointerType = "mouse"), isUndefined$1(tempEvent.pointerId) && (tempEvent.pointerId = 1), isUndefined$1(tempEvent.pressure) && (tempEvent.pressure = .5), isUndefined$1(tempEvent.twist) && (tempEvent.twist = 0), isUndefined$1(tempEvent.tangentialPressure) && (tempEvent.tangentialPressure = 0), tempEvent.isNormalized = !0, normalizedEvents.push(tempEvent);
|
|
9734
9730
|
}
|
|
9735
9731
|
return normalizedEvents;
|
|
9736
9732
|
}
|
|
@@ -26575,7 +26571,7 @@
|
|
|
26575
26571
|
if (tagWidth += symbolPlaceWidth, textX += symbolPlaceWidth, "rich" === type) {
|
|
26576
26572
|
const richTextAttrs = Object.assign(Object.assign({
|
|
26577
26573
|
textConfig: text,
|
|
26578
|
-
visible: isValid$
|
|
26574
|
+
visible: isValid$5(text) && !1 !== visible
|
|
26579
26575
|
}, textStyle), {
|
|
26580
26576
|
x: textX,
|
|
26581
26577
|
y: 0,
|
|
@@ -26600,7 +26596,7 @@
|
|
|
26600
26596
|
} else if ("html" === type) {
|
|
26601
26597
|
const richTextAttrs = Object.assign(Object.assign({
|
|
26602
26598
|
textConfig: [],
|
|
26603
|
-
visible: isValid$
|
|
26599
|
+
visible: isValid$5(text) && !1 !== visible,
|
|
26604
26600
|
html: Object.assign(Object.assign({
|
|
26605
26601
|
dom: text
|
|
26606
26602
|
}, DEFAULT_HTML_TEXT_SPEC), textStyle)
|
|
@@ -26626,7 +26622,7 @@
|
|
|
26626
26622
|
} else {
|
|
26627
26623
|
const textAttrs = Object.assign(Object.assign({
|
|
26628
26624
|
text: text,
|
|
26629
|
-
visible: isValid$
|
|
26625
|
+
visible: isValid$5(text) && !1 !== visible,
|
|
26630
26626
|
lineHeight: null == textStyle ? void 0 : textStyle.fontSize
|
|
26631
26627
|
}, textStyle), {
|
|
26632
26628
|
x: textX,
|
|
@@ -26644,7 +26640,7 @@
|
|
|
26644
26640
|
textAlign: textAlign,
|
|
26645
26641
|
textBaseline: textBaseline
|
|
26646
26642
|
} = textStyle;
|
|
26647
|
-
(isValid$
|
|
26643
|
+
(isValid$5(minWidth) || isValid$5(maxWidth)) && (isValid$5(minWidth) && tagWidth < minWidth && (tagWidth = minWidth), isValid$5(maxWidth) && tagWidth > maxWidth && (tagWidth = maxWidth, textShape.setAttribute("maxLineWidth", maxWidth - parsedPadding[1] - parsedPadding[2])));
|
|
26648
26644
|
let x = 0,
|
|
26649
26645
|
y = 0;
|
|
26650
26646
|
"center" === textAlign ? (x -= tagWidth / 2, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth / 2), group.setAttribute("x", -symbolPlaceWidth / 2)) : "right" === textAlign || "end" === textAlign ? (x -= tagWidth, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth), group.setAttribute("x", -parsedPadding[1] - symbolPlaceWidth)) : "left" !== textAlign && "start" !== textAlign || group.setAttribute("x", parsedPadding[3]), "middle" === textBaseline ? (y -= tagHeight / 2, symbol && symbol.setAttribute("y", 0)) : "bottom" === textBaseline ? (y -= tagHeight, symbol && symbol.setAttribute("y", -textHeight / 2), group.setAttribute("y", -parsedPadding[2])) : "top" === textBaseline && (group.setAttribute("y", parsedPadding[0]), symbol && symbol.setAttribute("y", textHeight / 2));
|
|
@@ -26723,7 +26719,7 @@
|
|
|
26723
26719
|
zIndex: 1
|
|
26724
26720
|
}, "group"),
|
|
26725
26721
|
maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3],
|
|
26726
|
-
titleVisible = isValid$
|
|
26722
|
+
titleVisible = isValid$5(title) && !1 !== visible,
|
|
26727
26723
|
titleAttrs = Object.assign(Object.assign({
|
|
26728
26724
|
text: isArray$5(title) ? title : [title],
|
|
26729
26725
|
visible: titleVisible
|
|
@@ -26741,7 +26737,7 @@
|
|
|
26741
26737
|
titleWidth = titleBounds.width();
|
|
26742
26738
|
let height = titleHeight + space;
|
|
26743
26739
|
titleVisible || (height = 0);
|
|
26744
|
-
const contentVisible = isValid$
|
|
26740
|
+
const contentVisible = isValid$5(content) && !1 !== visible,
|
|
26745
26741
|
contentAttrs = Object.assign(Object.assign({
|
|
26746
26742
|
text: isArray$5(content) ? content : [content],
|
|
26747
26743
|
visible: contentVisible
|
|
@@ -28187,7 +28183,7 @@
|
|
|
28187
28183
|
});
|
|
28188
28184
|
bgRect.name = AXIS_ELEMENT_NAME.axisLabelBackground, bgRect.id = this._getNodeId("axis-label-background"), labelContainer.insertBefore(bgRect, labelContainer.firstChild);
|
|
28189
28185
|
}
|
|
28190
|
-
if (isValid$
|
|
28186
|
+
if (isValid$5(this.attribute.label.containerAlign)) {
|
|
28191
28187
|
let start;
|
|
28192
28188
|
"left" === orient ? start = axisLabelContainerBounds.x2 : "right" === orient ? start = axisLabelContainerBounds.x1 : "top" === orient ? start = axisLabelContainerBounds.y2 : "bottom" === orient && (start = axisLabelContainerBounds.y1), alignAxisLabels(labelShapes, start, axisLabelContainerSize, orient, this.attribute.label.containerAlign);
|
|
28193
28189
|
}
|
|
@@ -28418,7 +28414,7 @@
|
|
|
28418
28414
|
};
|
|
28419
28415
|
shape && shape.visible && (tagAttrs.shape = Object.assign({
|
|
28420
28416
|
visible: !0
|
|
28421
|
-
}, shape.style), isValid$
|
|
28417
|
+
}, shape.style), isValid$5(shape.space) && (tagAttrs.space = shape.space)), background && background.visible && (tagAttrs.panel = Object.assign({
|
|
28422
28418
|
visible: !0
|
|
28423
28419
|
}, background.style));
|
|
28424
28420
|
const titleTag = new Tag$1(tagAttrs);
|
|
@@ -28537,7 +28533,7 @@
|
|
|
28537
28533
|
width: itemWidth,
|
|
28538
28534
|
height: itemHeight
|
|
28539
28535
|
} = item;
|
|
28540
|
-
isValid$
|
|
28536
|
+
isValid$5(maxItemWidth) ? isValid$5(itemWidth) ? this._itemWidthByUser = Math.min(maxItemWidth, itemWidth) : this._itemWidthByUser = maxItemWidth : isValid$5(itemWidth) && (this._itemWidthByUser = itemWidth), isValid$5(itemHeight) && (this._itemHeightByUser = itemHeight);
|
|
28541
28537
|
let doWrap = !1,
|
|
28542
28538
|
maxWidthInCol = 0,
|
|
28543
28539
|
startX = 0,
|
|
@@ -28549,10 +28545,10 @@
|
|
|
28549
28545
|
const itemGroup = this._renderEachItem(item, !!isEmpty(defaultSelected) || (null == defaultSelected ? void 0 : defaultSelected.includes(item.label)), index, legendItems),
|
|
28550
28546
|
itemWidth = itemGroup.attribute.width,
|
|
28551
28547
|
itemHeight = itemGroup.attribute.height;
|
|
28552
|
-
this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (maxPages = maxRow, isValid$
|
|
28548
|
+
this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (maxPages = maxRow, isValid$5(maxWidth) && (itemWidth >= maxWidth ? (doWrap = !0, index > 0 && (startX = 0, startY += itemHeight + spaceRow, pages += 1)) : maxWidth < startX + itemWidth && (doWrap = !0, startX = 0, startY += itemHeight + spaceRow, pages += 1)), index > 0 && itemGroup.setAttributes({
|
|
28553
28549
|
x: startX,
|
|
28554
28550
|
y: startY
|
|
28555
|
-
}), startX += spaceCol + itemWidth) : (maxPages = maxCol, isValid$
|
|
28551
|
+
}), startX += spaceCol + itemWidth) : (maxPages = maxCol, isValid$5(maxHeight) && maxHeight < startY + itemHeight && (doWrap = !0, startY = 0, startX += maxWidthInCol + spaceCol, maxWidthInCol = 0, pages += 1), index > 0 && itemGroup.setAttributes({
|
|
28556
28552
|
x: startX,
|
|
28557
28553
|
y: startY
|
|
28558
28554
|
}), startY += spaceRow + itemHeight), itemsContainer.add(itemGroup);
|
|
@@ -28645,7 +28641,7 @@
|
|
|
28645
28641
|
}));
|
|
28646
28642
|
this._appendDataToShape(labelShape, LEGEND_ELEMENT_NAME.itemLabel, item, itemGroup, null == labelAttr ? void 0 : labelAttr.state), labelShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), innerGroup.add(labelShape);
|
|
28647
28643
|
const labelSpace = get$5(labelAttr, "space", DEFAULT_LABEL_SPACE);
|
|
28648
|
-
if (isValid$
|
|
28644
|
+
if (isValid$5(value)) {
|
|
28649
28645
|
const valueSpace = get$5(valueAttr, "space", focus ? DEFAULT_VALUE_SPACE : 0),
|
|
28650
28646
|
valueShape = createText(Object.assign(Object.assign({
|
|
28651
28647
|
x: 0,
|
|
@@ -28673,7 +28669,7 @@
|
|
|
28673
28669
|
const innerGroupBounds = innerGroup.AABBBounds,
|
|
28674
28670
|
innerGroupWidth = innerGroupBounds.width(),
|
|
28675
28671
|
innerGroupHeight = innerGroupBounds.height(),
|
|
28676
|
-
itemGroupWidth = isValid$
|
|
28672
|
+
itemGroupWidth = isValid$5(this.attribute.item.width) ? this.attribute.item.width : innerGroupWidth + parsedPadding[1] + parsedPadding[3],
|
|
28677
28673
|
itemGroupHeight = this._itemHeightByUser || innerGroupHeight + parsedPadding[0] + parsedPadding[2];
|
|
28678
28674
|
return itemGroup.attribute.width = itemGroupWidth, itemGroup.attribute.height = itemGroupHeight, focusShape && focusShape.setAttribute("visible", !1), innerGroup.translateTo(-innerGroupBounds.x1 + parsedPadding[3], -innerGroupBounds.y1 + parsedPadding[0]), itemGroup;
|
|
28679
28675
|
}
|
|
@@ -28995,10 +28991,10 @@
|
|
|
28995
28991
|
this._rangeFactorStart = null, this._rangeFactorEnd = null;
|
|
28996
28992
|
}
|
|
28997
28993
|
_calculateWholeRange(range) {
|
|
28998
|
-
return this._wholeRange ? this._wholeRange : isValid$
|
|
28994
|
+
return this._wholeRange ? this._wholeRange : isValid$5(this._rangeFactorStart) && isValid$5(this._rangeFactorEnd) && 2 === range.length ? (this._wholeRange = calculateWholeRangeFromRangeFactor(range, [this._rangeFactorStart, this._rangeFactorEnd]), this._wholeRange) : range;
|
|
28999
28995
|
}
|
|
29000
28996
|
rangeFactor(_, slience, clear) {
|
|
29001
|
-
return _ ? (2 === _.length && _.every(r => r >= 0 && r <= 1) && (this._wholeRange = null, 0 === _[0] && 1 === _[1] ? (this._rangeFactorStart = null, this._rangeFactorEnd = null) : (this._rangeFactorStart = _[0], this._rangeFactorEnd = _[1])), this) : clear ? (this._wholeRange = null, this._rangeFactorStart = null, this._rangeFactorEnd = null, this) : isValid$
|
|
28997
|
+
return _ ? (2 === _.length && _.every(r => r >= 0 && r <= 1) && (this._wholeRange = null, 0 === _[0] && 1 === _[1] ? (this._rangeFactorStart = null, this._rangeFactorEnd = null) : (this._rangeFactorStart = _[0], this._rangeFactorEnd = _[1])), this) : clear ? (this._wholeRange = null, this._rangeFactorStart = null, this._rangeFactorEnd = null, this) : isValid$5(this._rangeFactorStart) && isValid$5(this._rangeFactorEnd) ? [this._rangeFactorStart, this._rangeFactorEnd] : null;
|
|
29002
28998
|
}
|
|
29003
28999
|
rangeFactorStart(_, slience) {
|
|
29004
29000
|
var _a;
|
|
@@ -29065,7 +29061,7 @@
|
|
|
29065
29061
|
}
|
|
29066
29062
|
calculateVisibleDomain(range) {
|
|
29067
29063
|
var _a;
|
|
29068
|
-
if (isValid$
|
|
29064
|
+
if (isValid$5(this._rangeFactorStart) && isValid$5(this._rangeFactorEnd) && 2 === range.length) {
|
|
29069
29065
|
return [this.invert(range[0]), this.invert(range[1])];
|
|
29070
29066
|
}
|
|
29071
29067
|
return null !== (_a = this._niceDomain) && void 0 !== _a ? _a : this._domain;
|
|
@@ -29333,7 +29329,7 @@
|
|
|
29333
29329
|
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
29334
29330
|
let options = arguments.length > 1 ? arguments[1] : undefined;
|
|
29335
29331
|
var _a;
|
|
29336
|
-
if (isValid$
|
|
29332
|
+
if (isValid$5(this._rangeFactorStart) && isValid$5(this._rangeFactorEnd) && (this._rangeFactorStart > 0 || this._rangeFactorEnd < 1) && 2 === this._range.length || !this._niceType) return this.d3Ticks(count, options);
|
|
29337
29333
|
const curNiceDomain = null !== (_a = this._niceDomain) && void 0 !== _a ? _a : this._domain,
|
|
29338
29334
|
originalDomain = this._domain,
|
|
29339
29335
|
start = curNiceDomain[0],
|
|
@@ -29507,7 +29503,7 @@
|
|
|
29507
29503
|
let currentPos, startHandlerPos, endHandlerPos, railLen;
|
|
29508
29504
|
this._isHorizontal ? (currentPos = e.viewX - this._rail.globalAABBBounds.x1, startHandlerPos = null == startHandler ? void 0 : startHandler.attribute.x, endHandlerPos = null == endHandler ? void 0 : endHandler.attribute.x, railLen = railWidth) : (currentPos = e.viewY - this._rail.globalAABBBounds.y1, startHandlerPos = null == startHandler ? void 0 : startHandler.attribute.y, endHandlerPos = null == endHandler ? void 0 : endHandler.attribute.y, railLen = railHeight);
|
|
29509
29505
|
const currentValue = currentPos / railLen * (max - min) + min;
|
|
29510
|
-
if (isValid$
|
|
29506
|
+
if (isValid$5(endHandlerPos)) {
|
|
29511
29507
|
const updateHandler = Math.abs(currentPos - startHandlerPos) > Math.abs(currentPos - endHandlerPos) ? endHandler : startHandler;
|
|
29512
29508
|
this._updateHandler(updateHandler, currentPos, currentValue);
|
|
29513
29509
|
} else this._updateHandler(startHandler, currentPos, currentValue);
|
|
@@ -29574,7 +29570,7 @@
|
|
|
29574
29570
|
text: startText.text,
|
|
29575
29571
|
lineHeight: null === (_a = startText.style) || void 0 === _a ? void 0 : _a.fontSize
|
|
29576
29572
|
}, startText.style)), startTextShape.name = SLIDER_ELEMENT_NAME.startText, innerView.add(startTextShape);
|
|
29577
|
-
const space = isValid$
|
|
29573
|
+
const space = isValid$5(startText.space) ? startText.space : 0;
|
|
29578
29574
|
startLen += (isHorizontal ? startTextShape.AABBBounds.width() : startTextShape.AABBBounds.height()) + space;
|
|
29579
29575
|
}
|
|
29580
29576
|
const mainContainer = createGroup({
|
|
@@ -29588,7 +29584,7 @@
|
|
|
29588
29584
|
});
|
|
29589
29585
|
let endTextShape;
|
|
29590
29586
|
if (railContainer.name = SLIDER_ELEMENT_NAME.railContainer, this._railContainer = railContainer, mainContainer.add(railContainer), this._renderRail(railContainer), startLen += isHorizontal ? railWidth : railHeight, endText && endText.visible) {
|
|
29591
|
-
const space = isValid$
|
|
29587
|
+
const space = isValid$5(endText.space) ? endText.space : 0;
|
|
29592
29588
|
endTextShape = createText(Object.assign({
|
|
29593
29589
|
x: isHorizontal ? startLen + space : railWidth / 2,
|
|
29594
29590
|
y: isHorizontal ? railHeight / 2 : startLen + space,
|
|
@@ -30180,7 +30176,7 @@
|
|
|
30180
30176
|
y: parsedPadding[0],
|
|
30181
30177
|
zIndex: 1
|
|
30182
30178
|
}, "group");
|
|
30183
|
-
if (!1 !== (null === (_a = this.attribute) || void 0 === _a ? void 0 : _a.visible) && !1 !== (null == textStyle ? void 0 : textStyle.visible)) if ("rich" === textType || isValid$
|
|
30179
|
+
if (!1 !== (null === (_a = this.attribute) || void 0 === _a ? void 0 : _a.visible) && !1 !== (null == textStyle ? void 0 : textStyle.visible)) if ("rich" === textType || isValid$5(textStyle.character)) {
|
|
30184
30180
|
const attr = Object.assign({
|
|
30185
30181
|
x: null !== (_b = textStyle.x) && void 0 !== _b ? _b : 0,
|
|
30186
30182
|
y: null !== (_c = textStyle.y) && void 0 !== _c ? _c : 0,
|
|
@@ -30209,7 +30205,7 @@
|
|
|
30209
30205
|
textConfig: []
|
|
30210
30206
|
}, textStyle);
|
|
30211
30207
|
this._mainTitle = group.createOrUpdateChild("mainTitle", attr, "richtext");
|
|
30212
|
-
} else isValid$
|
|
30208
|
+
} else isValid$5(text) && (this._mainTitle = group.createOrUpdateChild("mainTitle", Object.assign(Object.assign({
|
|
30213
30209
|
text: [text]
|
|
30214
30210
|
}, textStyle), {
|
|
30215
30211
|
maxLineWidth: null !== (_u = null == textStyle ? void 0 : textStyle.maxLineWidth) && void 0 !== _u ? _u : width,
|
|
@@ -30221,7 +30217,7 @@
|
|
|
30221
30217
|
}), "wrapText"));
|
|
30222
30218
|
const maintextHeight = this._mainTitle ? null === (_w = this._mainTitle) || void 0 === _w ? void 0 : _w.AABBBounds.height() : 0,
|
|
30223
30219
|
maintextWidth = this._mainTitle ? null === (_x = this._mainTitle) || void 0 === _x ? void 0 : _x.AABBBounds.width() : 0;
|
|
30224
|
-
if (!1 !== (null === (_y = this.attribute) || void 0 === _y ? void 0 : _y.visible) && !1 !== (null == subtextStyle ? void 0 : subtextStyle.visible)) if ("rich" === subtextType || isValid$
|
|
30220
|
+
if (!1 !== (null === (_y = this.attribute) || void 0 === _y ? void 0 : _y.visible) && !1 !== (null == subtextStyle ? void 0 : subtextStyle.visible)) if ("rich" === subtextType || isValid$5(subtextStyle.character)) {
|
|
30225
30221
|
const attr = Object.assign({
|
|
30226
30222
|
x: null !== (_z = subtextStyle.x) && void 0 !== _z ? _z : 0,
|
|
30227
30223
|
y: null !== (_0 = subtextStyle.y) && void 0 !== _0 ? _0 : 0,
|
|
@@ -30250,7 +30246,7 @@
|
|
|
30250
30246
|
textConfig: []
|
|
30251
30247
|
}, subtextStyle);
|
|
30252
30248
|
this._subTitle = group.createOrUpdateChild("subTitle", attr, "richtext");
|
|
30253
|
-
} else isValid$
|
|
30249
|
+
} else isValid$5(subtext) && (this._subTitle = group.createOrUpdateChild("subTitle", Object.assign(Object.assign({
|
|
30254
30250
|
text: [subtext]
|
|
30255
30251
|
}, subtextStyle), {
|
|
30256
30252
|
maxLineWidth: null !== (_16 = null == subtextStyle ? void 0 : subtextStyle.maxLineWidth) && void 0 !== _16 ? _16 : width,
|
|
@@ -30264,22 +30260,22 @@
|
|
|
30264
30260
|
subtextWidth = this._subTitle ? null === (_19 = this._subTitle) || void 0 === _19 ? void 0 : _19.AABBBounds.width() : 0;
|
|
30265
30261
|
let titleWidth = Math.max(maintextWidth, subtextWidth),
|
|
30266
30262
|
titleHeight = maintextHeight + (null !== (_20 = null == subtextStyle ? void 0 : subtextStyle.height) && void 0 !== _20 ? _20 : subtextHeight);
|
|
30267
|
-
if (isValid$
|
|
30263
|
+
if (isValid$5(width) && (titleWidth = width, null === (_21 = this._mainTitle) || void 0 === _21 || _21.setAttribute("maxLineWidth", width), null === (_22 = this._subTitle) || void 0 === _22 || _22.setAttribute("maxLineWidth", width)), isValid$5(height) && (titleHeight = height), isValid$5(minWidth) && titleWidth < minWidth && (titleWidth = minWidth), isValid$5(maxWidth) && (null === (_23 = this._mainTitle) || void 0 === _23 || _23.setAttribute("maxLineWidth", maxWidth), null === (_24 = this._subTitle) || void 0 === _24 || _24.setAttribute("maxLineWidth", maxWidth), null === (_25 = this._mainTitle) || void 0 === _25 || _25.setAttribute("maxWidth", maxWidth), null === (_26 = this._subTitle) || void 0 === _26 || _26.setAttribute("maxWidth", maxWidth), titleWidth > maxWidth && (titleWidth = maxWidth)), isValid$5(minHeight) && titleHeight < minHeight && (titleHeight = minHeight), isValid$5(maxHeight) && (null === (_27 = this._mainTitle) || void 0 === _27 || _27.setAttribute("maxHeight", maxHeight), null === (_28 = this._subTitle) || void 0 === _28 || _28.setAttribute("maxHeight", maxHeight - maintextHeight), titleHeight > maxHeight && (titleHeight = maxHeight)), group.attribute.width = titleWidth, group.attribute.height = titleHeight, group.attribute.boundsPadding = parsedPadding, isValid$5(align) || isValid$5(null == textStyle ? void 0 : textStyle.align)) {
|
|
30268
30264
|
const mainTitleAlign = (null == textStyle ? void 0 : textStyle.align) ? null == textStyle ? void 0 : textStyle.align : align,
|
|
30269
30265
|
mainTitleWidth = null !== (_29 = null == textStyle ? void 0 : textStyle.width) && void 0 !== _29 ? _29 : maintextWidth;
|
|
30270
30266
|
"left" === mainTitleAlign ? (null === (_30 = this._mainTitle) || void 0 === _30 || _30.setAttribute("x", 0), null === (_31 = this._mainTitle) || void 0 === _31 || _31.setAttribute("textAlign", "left")) : "center" === mainTitleAlign ? (null === (_32 = this._mainTitle) || void 0 === _32 || _32.setAttribute("x", mainTitleWidth / 2), null === (_33 = this._mainTitle) || void 0 === _33 || _33.setAttribute("textAlign", "center")) : "right" === mainTitleAlign && (null === (_34 = this._mainTitle) || void 0 === _34 || _34.setAttribute("x", mainTitleWidth), null === (_35 = this._mainTitle) || void 0 === _35 || _35.setAttribute("textAlign", "right"));
|
|
30271
30267
|
}
|
|
30272
|
-
if (isValid$
|
|
30268
|
+
if (isValid$5(verticalAlign) || isValid$5(null == textStyle ? void 0 : textStyle.verticalAlign)) {
|
|
30273
30269
|
const mainTitleVerticalAlign = (null == textStyle ? void 0 : textStyle.verticalAlign) ? null == textStyle ? void 0 : textStyle.verticalAlign : verticalAlign,
|
|
30274
30270
|
mainTitleHeight = (null == textStyle ? void 0 : textStyle.height) ? null == textStyle ? void 0 : textStyle.height : titleHeight;
|
|
30275
30271
|
"top" === mainTitleVerticalAlign ? (null === (_36 = this._mainTitle) || void 0 === _36 || _36.setAttribute("y", 0), null === (_37 = this._mainTitle) || void 0 === _37 || _37.setAttribute("textBaseline", "top")) : "middle" === mainTitleVerticalAlign ? (null === (_38 = this._mainTitle) || void 0 === _38 || _38.setAttribute("y", mainTitleHeight / 2), null === (_39 = this._mainTitle) || void 0 === _39 || _39.setAttribute("textBaseline", "middle")) : "bottom" === mainTitleVerticalAlign && (null === (_40 = this._mainTitle) || void 0 === _40 || _40.setAttribute("y", mainTitleHeight), null === (_41 = this._mainTitle) || void 0 === _41 || _41.setAttribute("textBaseline", "bottom"));
|
|
30276
30272
|
}
|
|
30277
|
-
if (isValid$
|
|
30273
|
+
if (isValid$5(align) || isValid$5(null == subtextStyle ? void 0 : subtextStyle.align)) {
|
|
30278
30274
|
const subTitleAlign = (null == subtextStyle ? void 0 : subtextStyle.align) ? null == subtextStyle ? void 0 : subtextStyle.align : align,
|
|
30279
30275
|
subTitleWidth = null !== (_42 = null == subtextStyle ? void 0 : subtextStyle.width) && void 0 !== _42 ? _42 : subtextWidth;
|
|
30280
30276
|
"left" === subTitleAlign ? (null === (_43 = this._subTitle) || void 0 === _43 || _43.setAttribute("x", 0), null === (_44 = this._subTitle) || void 0 === _44 || _44.setAttribute("textAlign", "left")) : "center" === subTitleAlign ? (null === (_45 = this._subTitle) || void 0 === _45 || _45.setAttribute("x", subTitleWidth / 2), null === (_46 = this._subTitle) || void 0 === _46 || _46.setAttribute("textAlign", "center")) : "right" === subTitleAlign && (null === (_47 = this._subTitle) || void 0 === _47 || _47.setAttribute("x", subTitleWidth), null === (_48 = this._subTitle) || void 0 === _48 || _48.setAttribute("textAlign", "right"));
|
|
30281
30277
|
}
|
|
30282
|
-
if (isValid$
|
|
30278
|
+
if (isValid$5(verticalAlign) || isValid$5(null == textStyle ? void 0 : textStyle.verticalAlign)) {
|
|
30283
30279
|
const subTitleVerticalAlign = (null == subtextStyle ? void 0 : subtextStyle.verticalAlign) ? null == subtextStyle ? void 0 : subtextStyle.verticalAlign : verticalAlign,
|
|
30284
30280
|
subTitleYStart = maintextHeight,
|
|
30285
30281
|
subTitleHeight = null !== (_49 = null == subtextStyle ? void 0 : subtextStyle.height) && void 0 !== _49 ? _49 : 0;
|
|
@@ -32603,7 +32599,7 @@
|
|
|
32603
32599
|
labelStyle: labelStyle
|
|
32604
32600
|
} = op;
|
|
32605
32601
|
let scaleTicks;
|
|
32606
|
-
if (isValid$
|
|
32602
|
+
if (isValid$5(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$5(forceTickCount)) scaleTicks = scale.forceTicks(forceTickCount);else if ("d3" === op.tickMode) {
|
|
32607
32603
|
const count = isFunction$1(tickCount) ? tickCount({
|
|
32608
32604
|
axisLength: rangeSize,
|
|
32609
32605
|
labelStyle: labelStyle
|
|
@@ -32678,7 +32674,7 @@
|
|
|
32678
32674
|
rangeSize = scale.calculateWholeRangeSize();
|
|
32679
32675
|
if (rangeSize < 2) return op.labelLastVisible ? convertDomainToTickData([domain[domain.length - 1]]) : convertDomainToTickData([domain[0]]);
|
|
32680
32676
|
let scaleTicks;
|
|
32681
|
-
if (isValid$
|
|
32677
|
+
if (isValid$5(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$5(forceTickCount)) scaleTicks = scale.forceTicks(forceTickCount);else if (isValid$5(tickCount)) {
|
|
32682
32678
|
const count = isFunction$1(tickCount) ? tickCount({
|
|
32683
32679
|
axisLength: rangeSize,
|
|
32684
32680
|
labelStyle: labelStyle
|
|
@@ -32782,7 +32778,7 @@
|
|
|
32782
32778
|
radius = null == getRadius ? void 0 : getRadius();
|
|
32783
32779
|
if (!radius) return convertDomainToTickData(scale.domain());
|
|
32784
32780
|
let scaleTicks;
|
|
32785
|
-
if (isValid$
|
|
32781
|
+
if (isValid$5(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$5(forceTickCount)) scaleTicks = scale.forceTicks(forceTickCount);else if (isValid$5(tickCount)) {
|
|
32786
32782
|
const range = scale.range(),
|
|
32787
32783
|
rangeSize = Math.abs(range[range.length - 1] - range[0]),
|
|
32788
32784
|
count = isFunction$1(tickCount) ? tickCount({
|
|
@@ -32898,10 +32894,10 @@
|
|
|
32898
32894
|
if (isNil$5(this.domain?.min) && isNil$5(this.domain?.max)) {
|
|
32899
32895
|
this.nice && this._scale.nice();
|
|
32900
32896
|
}
|
|
32901
|
-
else if (isValid$
|
|
32897
|
+
else if (isValid$5(this.domain?.min) && isNil$5(this.domain?.max)) {
|
|
32902
32898
|
this.nice && this._scale.niceMax();
|
|
32903
32899
|
}
|
|
32904
|
-
else if (isNil$5(this.domain?.min) && isValid$
|
|
32900
|
+
else if (isNil$5(this.domain?.min) && isValid$5(this.domain?.max)) {
|
|
32905
32901
|
this.nice && this._scale.niceMin();
|
|
32906
32902
|
}
|
|
32907
32903
|
}
|
|
@@ -32913,10 +32909,10 @@
|
|
|
32913
32909
|
if (isNil$5(this.domain?.min) && isNil$5(this.domain?.max)) {
|
|
32914
32910
|
this.nice && this._scale.nice(tickCount);
|
|
32915
32911
|
}
|
|
32916
|
-
else if (isValid$
|
|
32912
|
+
else if (isValid$5(this.domain?.min) && isNil$5(this.domain?.max)) {
|
|
32917
32913
|
this.nice && this._scale.niceMax(tickCount);
|
|
32918
32914
|
}
|
|
32919
|
-
else if (isNil$5(this.domain?.min) && isValid$
|
|
32915
|
+
else if (isNil$5(this.domain?.min) && isValid$5(this.domain?.max)) {
|
|
32920
32916
|
this.nice && this._scale.niceMin(tickCount);
|
|
32921
32917
|
}
|
|
32922
32918
|
else {
|
|
@@ -32947,10 +32943,10 @@
|
|
|
32947
32943
|
}
|
|
32948
32944
|
const domainMin = domain[0];
|
|
32949
32945
|
const domainMax = domain[domain.length - 1];
|
|
32950
|
-
if (isValid$
|
|
32946
|
+
if (isValid$5(this.expand.min)) {
|
|
32951
32947
|
domain[0] = domainMin - (domainMax - domainMin) * this.expand.min;
|
|
32952
32948
|
}
|
|
32953
|
-
if (isValid$
|
|
32949
|
+
if (isValid$5(this.expand.max)) {
|
|
32954
32950
|
domain[domain.length - 1] = domainMax + (domainMax - domainMin) * this.expand.max;
|
|
32955
32951
|
}
|
|
32956
32952
|
}
|
|
@@ -32988,10 +32984,10 @@
|
|
|
32988
32984
|
if (isNil$5(this.domain?.min) && isNil$5(this.domain?.max)) {
|
|
32989
32985
|
this._scale.nice(tickCount);
|
|
32990
32986
|
}
|
|
32991
|
-
else if (isValid$
|
|
32987
|
+
else if (isValid$5(this.domain?.min) && isNil$5(this.domain?.max)) {
|
|
32992
32988
|
this._scale.niceMax(tickCount);
|
|
32993
32989
|
}
|
|
32994
|
-
else if (isNil$5(this.domain?.min) && isValid$
|
|
32990
|
+
else if (isNil$5(this.domain?.min) && isValid$5(this.domain?.max)) {
|
|
32995
32991
|
this._scale.niceMin(tickCount);
|
|
32996
32992
|
}
|
|
32997
32993
|
else {
|
|
@@ -33036,8 +33032,8 @@
|
|
|
33036
33032
|
return;
|
|
33037
33033
|
}
|
|
33038
33034
|
const { min, max } = this.domain;
|
|
33039
|
-
isValid$
|
|
33040
|
-
isValid$
|
|
33035
|
+
isValid$5(min) && (domain[0] = min);
|
|
33036
|
+
isValid$5(max) && (domain[1] = max);
|
|
33041
33037
|
}
|
|
33042
33038
|
setZero(zero) {
|
|
33043
33039
|
if (this.zero !== zero) {
|
|
@@ -33474,7 +33470,7 @@
|
|
|
33474
33470
|
function isFieldAssessor(field) {
|
|
33475
33471
|
if (obj.isObject(field)) {
|
|
33476
33472
|
const a = field;
|
|
33477
|
-
if (isValid$
|
|
33473
|
+
if (isValid$5(a.get) && isValid$5(a.set)) {
|
|
33478
33474
|
return true;
|
|
33479
33475
|
}
|
|
33480
33476
|
}
|
|
@@ -33529,7 +33525,7 @@
|
|
|
33529
33525
|
return index;
|
|
33530
33526
|
}
|
|
33531
33527
|
const mapIndex = sortedIndexMap[index];
|
|
33532
|
-
return isValid$
|
|
33528
|
+
return isValid$5(mapIndex) ? mapIndex : index;
|
|
33533
33529
|
}
|
|
33534
33530
|
class DataSource extends EventTarget$2 {
|
|
33535
33531
|
_get;
|
|
@@ -33547,7 +33543,7 @@
|
|
|
33547
33543
|
return EVENT_TYPE;
|
|
33548
33544
|
}
|
|
33549
33545
|
treeDataHierarchyState = new Map();
|
|
33550
|
-
|
|
33546
|
+
beforeChangedRecordsMap = [];
|
|
33551
33547
|
constructor(obj, pagination, hierarchyExpandLevel) {
|
|
33552
33548
|
super();
|
|
33553
33549
|
this._get = obj?.get.bind(obj) || undefined;
|
|
@@ -33710,7 +33706,7 @@
|
|
|
33710
33706
|
this.lastOrder &&
|
|
33711
33707
|
this.lastOrder !== 'normal' &&
|
|
33712
33708
|
this.lastOrderField &&
|
|
33713
|
-
sort(index => isValid$
|
|
33709
|
+
sort(index => isValid$5(subNodeSortedIndexArray[index])
|
|
33714
33710
|
? subNodeSortedIndexArray[index]
|
|
33715
33711
|
: (subNodeSortedIndexArray[index] = index), (index, rel) => {
|
|
33716
33712
|
subNodeSortedIndexArray[index] = rel;
|
|
@@ -33737,12 +33733,12 @@
|
|
|
33737
33733
|
}
|
|
33738
33734
|
if (index >= 0) {
|
|
33739
33735
|
const dataIndex = this.getIndexKey(index);
|
|
33740
|
-
if (!this.
|
|
33736
|
+
if (!this.beforeChangedRecordsMap[dataIndex]) {
|
|
33741
33737
|
const originRecord = this.getOriginalRecord(dataIndex);
|
|
33742
|
-
this.
|
|
33738
|
+
this.beforeChangedRecordsMap[dataIndex] = cloneDeep$1(originRecord);
|
|
33743
33739
|
}
|
|
33744
33740
|
if (typeof field === 'string' || typeof field === 'number') {
|
|
33745
|
-
const beforeChangedValue = this.
|
|
33741
|
+
const beforeChangedValue = this.beforeChangedRecordsMap[dataIndex][field];
|
|
33746
33742
|
const record = this.getOriginalRecord(dataIndex);
|
|
33747
33743
|
if (typeof beforeChangedValue === 'number' && isAllDigits(value)) {
|
|
33748
33744
|
record[field] = parseFloat(value);
|
|
@@ -33788,7 +33784,7 @@
|
|
|
33788
33784
|
}
|
|
33789
33785
|
}
|
|
33790
33786
|
else {
|
|
33791
|
-
sort(index => (isValid$
|
|
33787
|
+
sort(index => (isValid$5(sortedIndexArray[index]) ? sortedIndexArray[index] : (sortedIndexArray[index] = index)), (index, rel) => {
|
|
33792
33788
|
sortedIndexArray[index] = rel;
|
|
33793
33789
|
}, this._sourceLength, orderFn, order, index => this.getOriginalField(index, field));
|
|
33794
33790
|
}
|
|
@@ -33875,8 +33871,8 @@
|
|
|
33875
33871
|
});
|
|
33876
33872
|
}
|
|
33877
33873
|
getRawRecord(dataIndex) {
|
|
33878
|
-
if (this.
|
|
33879
|
-
return this.
|
|
33874
|
+
if (this.beforeChangedRecordsMap?.[dataIndex]) {
|
|
33875
|
+
return this.beforeChangedRecordsMap[dataIndex];
|
|
33880
33876
|
}
|
|
33881
33877
|
return getValue(this._get(dataIndex), (val) => {
|
|
33882
33878
|
this.recordPromiseCallBack(dataIndex, val);
|
|
@@ -33920,10 +33916,6 @@
|
|
|
33920
33916
|
length: 0
|
|
33921
33917
|
});
|
|
33922
33918
|
}
|
|
33923
|
-
function isAllDigits(str) {
|
|
33924
|
-
const pattern = /^-?\d+(\.\d+)?$/;
|
|
33925
|
-
return pattern.test(str);
|
|
33926
|
-
}
|
|
33927
33919
|
|
|
33928
33920
|
function _setFieldCache(fCache, index, field, value) {
|
|
33929
33921
|
const recCache = fCache[index] || (fCache[index] = new Map());
|
|
@@ -34468,7 +34460,7 @@
|
|
|
34468
34460
|
_dealWithUpdateDataSource(table, () => {
|
|
34469
34461
|
const data = records;
|
|
34470
34462
|
table.internalProps.records = records;
|
|
34471
|
-
const newDataSource = (table.internalProps.dataSource = CachedDataSource.ofArray(data, table.pagination, table.options.hierarchyExpandLevel ?? (table.
|
|
34463
|
+
const newDataSource = (table.internalProps.dataSource = CachedDataSource.ofArray(data, table.pagination, table.options.hierarchyExpandLevel ?? (table._hasHierarchyTreeHeader?.() ? 1 : undefined)));
|
|
34472
34464
|
table.addReleaseObj(newDataSource);
|
|
34473
34465
|
});
|
|
34474
34466
|
}
|
|
@@ -34885,12 +34877,12 @@
|
|
|
34885
34877
|
}
|
|
34886
34878
|
}
|
|
34887
34879
|
const rect = element;
|
|
34888
|
-
if (isValid$
|
|
34880
|
+
if (isValid$5(rect.x)) {
|
|
34889
34881
|
rect.x = isString$4(rect.x)
|
|
34890
34882
|
? transformString(rect.x, width - borderLineWidths[1])
|
|
34891
34883
|
: Number(rect.x);
|
|
34892
34884
|
}
|
|
34893
|
-
if (isValid$
|
|
34885
|
+
if (isValid$5(rect.y)) {
|
|
34894
34886
|
rect.y = isString$4(rect.y)
|
|
34895
34887
|
? transformString(rect.y, height - borderLineWidths[2])
|
|
34896
34888
|
: Number(rect.y);
|
|
@@ -35492,7 +35484,7 @@
|
|
|
35492
35484
|
}
|
|
35493
35485
|
|
|
35494
35486
|
function getProp(name, cellStyle, col, row, _table) {
|
|
35495
|
-
const prop = cellStyle && isValid$
|
|
35487
|
+
const prop = cellStyle && isValid$5(cellStyle[name]) ? cellStyle[name] : null;
|
|
35496
35488
|
if (typeof prop === 'function') {
|
|
35497
35489
|
const arg = {
|
|
35498
35490
|
col,
|
|
@@ -35507,7 +35499,7 @@
|
|
|
35507
35499
|
return prop;
|
|
35508
35500
|
}
|
|
35509
35501
|
function getFunctionalProp(name, cellStyle, col, row, _table) {
|
|
35510
|
-
const prop = cellStyle && isValid$
|
|
35502
|
+
const prop = cellStyle && isValid$5(cellStyle[name]) ? cellStyle[name] : null;
|
|
35511
35503
|
if (typeof prop === 'function') {
|
|
35512
35504
|
const arg = {
|
|
35513
35505
|
col,
|
|
@@ -35526,7 +35518,7 @@
|
|
|
35526
35518
|
function createImageCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme) {
|
|
35527
35519
|
const headerStyle = table._getCellStyle(col, row);
|
|
35528
35520
|
const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
|
|
35529
|
-
if (isValid$
|
|
35521
|
+
if (isValid$5(functionalPadding)) {
|
|
35530
35522
|
padding = functionalPadding;
|
|
35531
35523
|
}
|
|
35532
35524
|
if (cellTheme?.text?.textAlign) {
|
|
@@ -36205,13 +36197,13 @@
|
|
|
36205
36197
|
for (let j = 0; j < values.length; j++) {
|
|
36206
36198
|
if (domain[i] == values[j]) {
|
|
36207
36199
|
const data = dataValue[j];
|
|
36208
|
-
if (!isValid$
|
|
36200
|
+
if (!isValid$5(data[xField]) || !isValid$5(data[yField])) {
|
|
36209
36201
|
break;
|
|
36210
36202
|
}
|
|
36211
36203
|
items.push({
|
|
36212
36204
|
x: left + xScale.scale(data[xField]),
|
|
36213
36205
|
y: bottom - yScale.scale(data[yField]),
|
|
36214
|
-
defined: isValid$
|
|
36206
|
+
defined: isValid$5(data[yField])
|
|
36215
36207
|
});
|
|
36216
36208
|
dataItems.push(data);
|
|
36217
36209
|
valid = true;
|
|
@@ -36234,7 +36226,7 @@
|
|
|
36234
36226
|
items.push({
|
|
36235
36227
|
x: left + xScale.scale(xField ? data[xField] : i),
|
|
36236
36228
|
y: bottom - yScale.scale(yField ? data[yField] : data),
|
|
36237
|
-
defined: isValid$
|
|
36229
|
+
defined: isValid$5(yField ? data[yField] : data),
|
|
36238
36230
|
rawData: data
|
|
36239
36231
|
});
|
|
36240
36232
|
dataItems.push(data);
|
|
@@ -36455,7 +36447,7 @@
|
|
|
36455
36447
|
const ClassType = registerCharts[chartModule];
|
|
36456
36448
|
const headerStyle = table._getCellStyle(col, row);
|
|
36457
36449
|
const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
|
|
36458
|
-
if (isValid$
|
|
36450
|
+
if (isValid$5(functionalPadding)) {
|
|
36459
36451
|
padding = functionalPadding;
|
|
36460
36452
|
}
|
|
36461
36453
|
if (!cellGroup) {
|
|
@@ -36708,7 +36700,7 @@
|
|
|
36708
36700
|
let absoluteLeftIconWidth = 0;
|
|
36709
36701
|
let absoluteRightIconWidth = 0;
|
|
36710
36702
|
if (!Array.isArray(icons) || icons.length === 0) {
|
|
36711
|
-
if (isValid$
|
|
36703
|
+
if (isValid$5(textStr)) {
|
|
36712
36704
|
const text = convertInternal(textStr).replace(/\r?\n/g, '\n').replace(/\r/g, '\n').split('\n');
|
|
36713
36705
|
const hierarchyOffset = getHierarchyOffset(cellGroup.col, cellGroup.row, table);
|
|
36714
36706
|
const attribute = {
|
|
@@ -37164,7 +37156,7 @@
|
|
|
37164
37156
|
function createCellGroup(table, value, columnGroup, xOrigin, yOrigin, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme) {
|
|
37165
37157
|
const headerStyle = table._getCellStyle(col, row);
|
|
37166
37158
|
const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
|
|
37167
|
-
if (isValid$
|
|
37159
|
+
if (isValid$5(functionalPadding)) {
|
|
37168
37160
|
padding = functionalPadding;
|
|
37169
37161
|
}
|
|
37170
37162
|
if (cellTheme?.text?.textAlign) {
|
|
@@ -37232,7 +37224,7 @@
|
|
|
37232
37224
|
function createVideoCellGroup(columnGroup, xOrigin, yOrigin, col, row, width, height, keepAspectRatio, imageAutoSizing, padding, textAlign, textBaseline, table, cellTheme) {
|
|
37233
37225
|
const headerStyle = table._getCellStyle(col, row);
|
|
37234
37226
|
const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);
|
|
37235
|
-
if (isValid$
|
|
37227
|
+
if (isValid$5(functionalPadding)) {
|
|
37236
37228
|
padding = functionalPadding;
|
|
37237
37229
|
}
|
|
37238
37230
|
if (cellTheme?.text?.textAlign) {
|
|
@@ -37612,7 +37604,7 @@
|
|
|
37612
37604
|
const define = cellLocation !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row);
|
|
37613
37605
|
let isMerge;
|
|
37614
37606
|
let range;
|
|
37615
|
-
if (cellLocation !== 'body' || define?.mergeCell) {
|
|
37607
|
+
if (cellLocation !== 'body' || define?.mergeCell || table.internalProps.customMergeCell) {
|
|
37616
37608
|
range = table.getCellRange(col, row);
|
|
37617
37609
|
isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;
|
|
37618
37610
|
}
|
|
@@ -37775,7 +37767,7 @@
|
|
|
37775
37767
|
let textAlign;
|
|
37776
37768
|
let textBaseline;
|
|
37777
37769
|
let y = 0;
|
|
37778
|
-
if (columnGroup.lastChild) {
|
|
37770
|
+
if (columnGroup.lastChild && columnGroup.lastChild.row === rowStart - 1) {
|
|
37779
37771
|
y = columnGroup.lastChild.attribute.y + columnGroup.lastChild.attribute.height;
|
|
37780
37772
|
}
|
|
37781
37773
|
else if (columnGroup.colHeight) {
|
|
@@ -37836,9 +37828,7 @@
|
|
|
37836
37828
|
if (isPromise$1(value)) {
|
|
37837
37829
|
dealPromiseData(value, table, createCell.bind(null, type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme));
|
|
37838
37830
|
columnGroup.updateColumnRowNumber(row);
|
|
37839
|
-
const height =
|
|
37840
|
-
? table.getRowHeight(row) / (range.end.row - range.start.row + 1)
|
|
37841
|
-
: table.getRowHeight(row);
|
|
37831
|
+
const height = table.getRowHeight(row);
|
|
37842
37832
|
columnGroup.updateColumnHeight(height);
|
|
37843
37833
|
y += height;
|
|
37844
37834
|
}
|
|
@@ -37952,10 +37942,10 @@
|
|
|
37952
37942
|
if (axisOption?.expand) {
|
|
37953
37943
|
const domainMin = min;
|
|
37954
37944
|
const domainMax = max;
|
|
37955
|
-
if (isValid$
|
|
37945
|
+
if (isValid$5(axisOption.expand.min)) {
|
|
37956
37946
|
min = domainMin - (domainMax - domainMin) * axisOption.expand.min;
|
|
37957
37947
|
}
|
|
37958
|
-
if (isValid$
|
|
37948
|
+
if (isValid$5(axisOption.expand.max)) {
|
|
37959
37949
|
max = domainMax + (domainMax - domainMin) * axisOption.expand.max;
|
|
37960
37950
|
}
|
|
37961
37951
|
}
|
|
@@ -37994,10 +37984,10 @@
|
|
|
37994
37984
|
if (isNil$5(axisOption.min) && isNil$5(axisOption.max)) {
|
|
37995
37985
|
scale.nice(tickCount);
|
|
37996
37986
|
}
|
|
37997
|
-
else if (isValid$
|
|
37987
|
+
else if (isValid$5(axisOption.min) && isNil$5(axisOption.max)) {
|
|
37998
37988
|
scale.niceMax(tickCount);
|
|
37999
37989
|
}
|
|
38000
|
-
else if (isNil$5(axisOption.min) && isValid$
|
|
37990
|
+
else if (isNil$5(axisOption.min) && isValid$5(axisOption.max)) {
|
|
38001
37991
|
scale.niceMin(tickCount);
|
|
38002
37992
|
}
|
|
38003
37993
|
}
|
|
@@ -38475,10 +38465,10 @@
|
|
|
38475
38465
|
if (axisOption) {
|
|
38476
38466
|
const { seriesIndex, seriesId } = axisOption;
|
|
38477
38467
|
let seriesIndice;
|
|
38478
|
-
if (isValid$
|
|
38468
|
+
if (isValid$5(seriesId) && isArray$5(spec.series)) {
|
|
38479
38469
|
seriesIndice = (isArray$5(seriesId) ? seriesId : [seriesId]).map(id => spec.series.findIndex((s) => s.id === id));
|
|
38480
38470
|
}
|
|
38481
|
-
else if (isValid$
|
|
38471
|
+
else if (isValid$5(seriesIndex) && isArray$5(spec.series)) {
|
|
38482
38472
|
seriesIndice = seriesIndex;
|
|
38483
38473
|
}
|
|
38484
38474
|
return {
|
|
@@ -40706,7 +40696,7 @@
|
|
|
40706
40696
|
let batchRenderChartCount = 5;
|
|
40707
40697
|
let isHandlingChartQueue = false;
|
|
40708
40698
|
function setBatchRenderChartCount(count) {
|
|
40709
|
-
if (isValid$
|
|
40699
|
+
if (isValid$5(count)) {
|
|
40710
40700
|
batchRenderChartCount = count;
|
|
40711
40701
|
}
|
|
40712
40702
|
}
|
|
@@ -40737,6 +40727,8 @@
|
|
|
40737
40727
|
y1: viewBox.y1 - chart.getRootNode().table.scrollTop,
|
|
40738
40728
|
y2: viewBox.y2 - chart.getRootNode().table.scrollTop
|
|
40739
40729
|
}, false, false);
|
|
40730
|
+
const table = chart.getRootNode().table;
|
|
40731
|
+
table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(chartInstance);
|
|
40740
40732
|
if (typeof dataId === 'string') {
|
|
40741
40733
|
chartInstance.updateDataSync(dataId, data ?? []);
|
|
40742
40734
|
}
|
|
@@ -40952,10 +40944,10 @@
|
|
|
40952
40944
|
function getCellHoverColor(cellGroup, table) {
|
|
40953
40945
|
let colorKey;
|
|
40954
40946
|
if (cellGroup.role === 'cell' &&
|
|
40955
|
-
isValid$
|
|
40956
|
-
isValid$
|
|
40957
|
-
isValid$
|
|
40958
|
-
isValid$
|
|
40947
|
+
isValid$5(cellGroup.mergeStartCol) &&
|
|
40948
|
+
isValid$5(cellGroup.mergeStartRow) &&
|
|
40949
|
+
isValid$5(cellGroup.mergeEndCol) &&
|
|
40950
|
+
isValid$5(cellGroup.mergeEndRow)) {
|
|
40959
40951
|
for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {
|
|
40960
40952
|
for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {
|
|
40961
40953
|
const key = isCellHover(table.stateManager, col, row);
|
|
@@ -42248,18 +42240,18 @@
|
|
|
42248
42240
|
}
|
|
42249
42241
|
function move(deltaRow, screenTopRow, screenTopY, y, proxy) {
|
|
42250
42242
|
if (deltaRow > 0) {
|
|
42251
|
-
moveCell(deltaRow, 'up', screenTopRow, screenTopY, proxy);
|
|
42243
|
+
moveCell(deltaRow, 'up', screenTopRow, screenTopY, y, proxy);
|
|
42252
42244
|
proxy.updateBody(y - proxy.deltaY);
|
|
42253
42245
|
}
|
|
42254
42246
|
else if (deltaRow < 0) {
|
|
42255
|
-
moveCell(-deltaRow, 'down', screenTopRow, screenTopY, proxy);
|
|
42247
|
+
moveCell(-deltaRow, 'down', screenTopRow, screenTopY, y, proxy);
|
|
42256
42248
|
proxy.updateBody(y - proxy.deltaY);
|
|
42257
42249
|
}
|
|
42258
42250
|
else {
|
|
42259
42251
|
proxy.updateBody(y - proxy.deltaY);
|
|
42260
42252
|
}
|
|
42261
42253
|
}
|
|
42262
|
-
async function moveCell(count, direction, screenTopRow, screenTopY, proxy) {
|
|
42254
|
+
async function moveCell(count, direction, screenTopRow, screenTopY, y, proxy) {
|
|
42263
42255
|
if (direction === 'up' && proxy.rowEnd + count > proxy.bodyBottomRow) {
|
|
42264
42256
|
count = proxy.bodyBottomRow - proxy.rowEnd;
|
|
42265
42257
|
}
|
|
@@ -42334,7 +42326,22 @@
|
|
|
42334
42326
|
updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
42335
42327
|
updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up');
|
|
42336
42328
|
}
|
|
42337
|
-
proxy.
|
|
42329
|
+
if (syncTopRow === proxy.bodyTopRow) {
|
|
42330
|
+
const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.bodyLeftCol, syncTopRow, true);
|
|
42331
|
+
const delaY = cellGroup.attribute.y - y;
|
|
42332
|
+
proxy.table.scenegraph.proxy.deltaY = delaY;
|
|
42333
|
+
}
|
|
42334
|
+
else if (syncBottomRow === proxy.bodyBottomRow) {
|
|
42335
|
+
const cellGroup = proxy.table.scenegraph.highPerformanceGetCell(proxy.bodyLeftCol, syncBottomRow, true);
|
|
42336
|
+
const delaY = cellGroup.attribute.y +
|
|
42337
|
+
cellGroup.attribute.height -
|
|
42338
|
+
(proxy.table.tableNoFrameHeight - proxy.table.getFrozenRowsHeight()) -
|
|
42339
|
+
y;
|
|
42340
|
+
proxy.table.scenegraph.proxy.deltaY = -delaY;
|
|
42341
|
+
}
|
|
42342
|
+
else {
|
|
42343
|
+
proxy.table.scenegraph.proxy.deltaY = 0;
|
|
42344
|
+
}
|
|
42338
42345
|
proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;
|
|
42339
42346
|
proxy.totalRow = Math.max(0, Math.min(proxy.table.rowCount - 1, direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count));
|
|
42340
42347
|
proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
|
|
@@ -43913,12 +43920,14 @@
|
|
|
43913
43920
|
scene.leftBottomCornerGroup.appendChild(column);
|
|
43914
43921
|
scene.leftBottomCornerGroup.setAttribute('width', scene.leftBottomCornerGroup.attribute.width + column.attribute.width);
|
|
43915
43922
|
scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width - column.attribute.width);
|
|
43916
|
-
|
|
43917
|
-
|
|
43918
|
-
|
|
43919
|
-
|
|
43923
|
+
if (scene.table.isPivotChart()) {
|
|
43924
|
+
column.forEachChildren((child) => {
|
|
43925
|
+
child.setAttributes({
|
|
43926
|
+
stroke: false,
|
|
43927
|
+
fill: false
|
|
43928
|
+
});
|
|
43920
43929
|
});
|
|
43921
|
-
}
|
|
43930
|
+
}
|
|
43922
43931
|
}
|
|
43923
43932
|
}
|
|
43924
43933
|
function moveColumnFromLeftBottomCornerToBottom(scene) {
|
|
@@ -43929,15 +43938,17 @@
|
|
|
43929
43938
|
insertBefore(scene.bottomFrozenGroup, column, scene.bottomFrozenGroup.firstChild);
|
|
43930
43939
|
scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width + column.attribute.width);
|
|
43931
43940
|
scene.leftBottomCornerGroup.setAttribute('width', scene.leftBottomCornerGroup.attribute.width - column.attribute.width);
|
|
43932
|
-
|
|
43933
|
-
|
|
43934
|
-
|
|
43935
|
-
|
|
43936
|
-
|
|
43937
|
-
|
|
43938
|
-
|
|
43941
|
+
if (scene.table.isPivotChart()) {
|
|
43942
|
+
column.forEachChildren((child) => {
|
|
43943
|
+
const cellStyle = scene.table._getCellStyle(child.col, child.row);
|
|
43944
|
+
const range = scene.table.getCellRange(child.col, child.row);
|
|
43945
|
+
const cellTheme = getStyleTheme(cellStyle, scene.table, range ? range.start.col : child.col, range ? range.start.row : child.row, getProp).theme;
|
|
43946
|
+
child.setAttributes({
|
|
43947
|
+
fill: cellTheme?.group?.fill ?? undefined,
|
|
43948
|
+
stroke: cellTheme?.group?.stroke ?? undefined
|
|
43949
|
+
});
|
|
43939
43950
|
});
|
|
43940
|
-
}
|
|
43951
|
+
}
|
|
43941
43952
|
}
|
|
43942
43953
|
}
|
|
43943
43954
|
function dealRightFrozen(distRightFrozenCol, scene) {
|
|
@@ -44238,33 +44249,6 @@
|
|
|
44238
44249
|
});
|
|
44239
44250
|
}
|
|
44240
44251
|
|
|
44241
|
-
function createCornerCell(cellGroup, frameTheme) {
|
|
44242
|
-
const { bgColor, borderColor, borderLineWidth, borderLineDash } = frameTheme;
|
|
44243
|
-
const rectAttributes = {
|
|
44244
|
-
x: 0,
|
|
44245
|
-
y: 0,
|
|
44246
|
-
width: 0,
|
|
44247
|
-
height: 0,
|
|
44248
|
-
visible: false,
|
|
44249
|
-
pickable: true,
|
|
44250
|
-
fill: bgColor
|
|
44251
|
-
};
|
|
44252
|
-
rectAttributes.stroke = getStroke(borderColor, undefined);
|
|
44253
|
-
rectAttributes.lineWidth = borderLineWidth;
|
|
44254
|
-
borderLineDash && (rectAttributes.lineDash = borderLineDash);
|
|
44255
|
-
rectAttributes.lineCap = 'square';
|
|
44256
|
-
if (Array.isArray(borderColor)) {
|
|
44257
|
-
rectAttributes.strokeArrayColor = getQuadProps(borderColor);
|
|
44258
|
-
}
|
|
44259
|
-
if (Array.isArray(borderLineWidth)) {
|
|
44260
|
-
rectAttributes.strokeArrayWidth = getQuadProps(borderLineWidth);
|
|
44261
|
-
rectAttributes.lineWidth = 1;
|
|
44262
|
-
}
|
|
44263
|
-
cellGroup.setAttributes(rectAttributes);
|
|
44264
|
-
cellGroup.role = 'corner-frozen';
|
|
44265
|
-
return cellGroup;
|
|
44266
|
-
}
|
|
44267
|
-
|
|
44268
44252
|
function initSceneGraph(scene) {
|
|
44269
44253
|
const width = scene.table.tableNoFrameWidth;
|
|
44270
44254
|
const height = scene.table.tableNoFrameHeight;
|
|
@@ -44300,11 +44284,6 @@
|
|
|
44300
44284
|
const leftBottomCornerGroup = createContainerGroup(0, 0);
|
|
44301
44285
|
leftBottomCornerGroup.role = 'corner-left-bottom-header';
|
|
44302
44286
|
scene.leftBottomCornerGroup = leftBottomCornerGroup;
|
|
44303
|
-
if (scene.table.isPivotChart()) {
|
|
44304
|
-
createCornerCell(rightTopCornerGroup, scene.table.theme.cornerRightTopCellStyle || scene.table.theme.cornerHeaderStyle);
|
|
44305
|
-
createCornerCell(leftBottomCornerGroup, scene.table.theme.cornerLeftBottomCellStyle || scene.table.theme.cornerHeaderStyle);
|
|
44306
|
-
createCornerCell(rightBottomCornerGroup, scene.table.theme.cornerRightBottomCellStyle || scene.table.theme.cornerHeaderStyle);
|
|
44307
|
-
}
|
|
44308
44287
|
scene.tableGroup.addChild(bodyGroup);
|
|
44309
44288
|
scene.tableGroup.addChild(rowHeaderGroup);
|
|
44310
44289
|
scene.tableGroup.addChild(bottomFrozenGroup);
|
|
@@ -44594,10 +44573,10 @@
|
|
|
44594
44573
|
}
|
|
44595
44574
|
function resetSortIcon(oldSortCol, oldSortRow, iconConfig, scene) {
|
|
44596
44575
|
const oldSortCell = scene.getCell(oldSortCol, oldSortRow);
|
|
44597
|
-
if (isValid$
|
|
44598
|
-
isValid$
|
|
44599
|
-
isValid$
|
|
44600
|
-
isValid$
|
|
44576
|
+
if (isValid$5(oldSortCell.mergeStartCol) &&
|
|
44577
|
+
isValid$5(oldSortCell.mergeStartRow) &&
|
|
44578
|
+
isValid$5(oldSortCell.mergeEndCol) &&
|
|
44579
|
+
isValid$5(oldSortCell.mergeEndRow)) {
|
|
44601
44580
|
for (let col = oldSortCell.mergeStartCol; col <= oldSortCell.mergeEndCol; col++) {
|
|
44602
44581
|
for (let row = oldSortCell.mergeStartRow; row <= oldSortCell.mergeEndRow; row++) {
|
|
44603
44582
|
let oldIconMark;
|
|
@@ -44692,10 +44671,10 @@
|
|
|
44692
44671
|
}
|
|
44693
44672
|
function updateCellRangeIcon(col, row, filter, dealer, scene) {
|
|
44694
44673
|
const cellGroup = scene.getCell(col, row);
|
|
44695
|
-
if (isValid$
|
|
44696
|
-
isValid$
|
|
44697
|
-
isValid$
|
|
44698
|
-
isValid$
|
|
44674
|
+
if (isValid$5(cellGroup.mergeStartCol) &&
|
|
44675
|
+
isValid$5(cellGroup.mergeStartRow) &&
|
|
44676
|
+
isValid$5(cellGroup.mergeEndCol) &&
|
|
44677
|
+
isValid$5(cellGroup.mergeEndRow)) {
|
|
44699
44678
|
for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {
|
|
44700
44679
|
for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {
|
|
44701
44680
|
updateCellGroupIcon(scene.getCell(col, row), filter, dealer);
|
|
@@ -44707,6 +44686,33 @@
|
|
|
44707
44686
|
}
|
|
44708
44687
|
}
|
|
44709
44688
|
|
|
44689
|
+
function createCornerCell(cellGroup, frameTheme) {
|
|
44690
|
+
const { bgColor, borderColor, borderLineWidth, borderLineDash } = frameTheme;
|
|
44691
|
+
const rectAttributes = {
|
|
44692
|
+
x: 0,
|
|
44693
|
+
y: 0,
|
|
44694
|
+
width: 0,
|
|
44695
|
+
height: 0,
|
|
44696
|
+
visible: false,
|
|
44697
|
+
pickable: true,
|
|
44698
|
+
fill: bgColor
|
|
44699
|
+
};
|
|
44700
|
+
rectAttributes.stroke = getStroke(borderColor, undefined);
|
|
44701
|
+
rectAttributes.lineWidth = borderLineWidth;
|
|
44702
|
+
borderLineDash && (rectAttributes.lineDash = borderLineDash);
|
|
44703
|
+
rectAttributes.lineCap = 'square';
|
|
44704
|
+
if (Array.isArray(borderColor)) {
|
|
44705
|
+
rectAttributes.strokeArrayColor = getQuadProps(borderColor);
|
|
44706
|
+
}
|
|
44707
|
+
if (Array.isArray(borderLineWidth)) {
|
|
44708
|
+
rectAttributes.strokeArrayWidth = getQuadProps(borderLineWidth);
|
|
44709
|
+
rectAttributes.lineWidth = 1;
|
|
44710
|
+
}
|
|
44711
|
+
cellGroup.setAttributes(rectAttributes);
|
|
44712
|
+
cellGroup.role = 'corner-frozen';
|
|
44713
|
+
return cellGroup;
|
|
44714
|
+
}
|
|
44715
|
+
|
|
44710
44716
|
loadPoptip();
|
|
44711
44717
|
container.load(splitModule);
|
|
44712
44718
|
container.load(textMeasureModule);
|
|
@@ -44936,6 +44942,11 @@
|
|
|
44936
44942
|
this.frozenRowCount = this.table.columnHeaderLevelCount;
|
|
44937
44943
|
this.proxy = new SceneProxy(this.table);
|
|
44938
44944
|
createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, undefined, true);
|
|
44945
|
+
if (this.table.isPivotChart()) {
|
|
44946
|
+
createCornerCell(this.rightTopCornerGroup, this.table.theme.cornerRightTopCellStyle || this.table.theme.cornerHeaderStyle || {});
|
|
44947
|
+
createCornerCell(this.leftBottomCornerGroup, this.table.theme.cornerLeftBottomCellStyle || this.table.theme.cornerHeaderStyle || {});
|
|
44948
|
+
createCornerCell(this.rightBottomCornerGroup, this.table.theme.cornerRightBottomCellStyle || this.table.theme.cornerHeaderStyle || {});
|
|
44949
|
+
}
|
|
44939
44950
|
this.proxy.createGroupForFirstScreen(this.cornerHeaderGroup, this.colHeaderGroup, this.rowHeaderGroup, this.rightFrozenGroup, this.bottomFrozenGroup, this.bodyGroup, 0, 0);
|
|
44940
44951
|
this.afterScenegraphCreated();
|
|
44941
44952
|
}
|
|
@@ -45767,14 +45778,6 @@
|
|
|
45767
45778
|
}
|
|
45768
45779
|
return 0;
|
|
45769
45780
|
}
|
|
45770
|
-
updateCellValue(col, row, value) {
|
|
45771
|
-
const cellGroup = this.getCell(col, row);
|
|
45772
|
-
const text = cellGroup.getChildByName('text', true);
|
|
45773
|
-
if (text) {
|
|
45774
|
-
const textAttributeStr = isArray$5(text.attribute.text) ? [value] : value;
|
|
45775
|
-
text.setAttribute('text', textAttributeStr);
|
|
45776
|
-
}
|
|
45777
|
-
}
|
|
45778
45781
|
}
|
|
45779
45782
|
|
|
45780
45783
|
function checkCellInSelect(col, row, cellRanges) {
|
|
@@ -45800,10 +45803,10 @@
|
|
|
45800
45803
|
|
|
45801
45804
|
function updateCell(scenegraph, col, row) {
|
|
45802
45805
|
const cellGroup = scenegraph.getCell(col, row);
|
|
45803
|
-
if (isValid$
|
|
45804
|
-
isValid$
|
|
45805
|
-
isValid$
|
|
45806
|
-
isValid$
|
|
45806
|
+
if (isValid$5(cellGroup.mergeStartCol) &&
|
|
45807
|
+
isValid$5(cellGroup.mergeStartRow) &&
|
|
45808
|
+
isValid$5(cellGroup.mergeEndCol) &&
|
|
45809
|
+
isValid$5(cellGroup.mergeEndRow)) {
|
|
45807
45810
|
for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {
|
|
45808
45811
|
for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {
|
|
45809
45812
|
const mergeCell = scenegraph.getCell(col, row);
|
|
@@ -47167,7 +47170,7 @@
|
|
|
47167
47170
|
row = cellAddress.row;
|
|
47168
47171
|
}
|
|
47169
47172
|
}
|
|
47170
|
-
if (isValid$
|
|
47173
|
+
if (isValid$5(col) && isValid$5(row) && this.table.isCellRangeEqual(colNow, rowNow, col, row)) {
|
|
47171
47174
|
const headerC = this.table._getHeaderLayoutMap(col ?? colNow, row ?? rowNow);
|
|
47172
47175
|
const dropDownMenu = headerC.dropDownMenu || this.table.globalDropDownMenu;
|
|
47173
47176
|
if (dropDownMenu) {
|
|
@@ -47278,13 +47281,13 @@
|
|
|
47278
47281
|
}
|
|
47279
47282
|
syncCheckedState(col, row, field, checked) {
|
|
47280
47283
|
if (this.table.isHeader(col, row)) {
|
|
47281
|
-
if (isValid$
|
|
47284
|
+
if (isValid$5(this.headerCheckedState[field])) {
|
|
47282
47285
|
return this.headerCheckedState[field];
|
|
47283
47286
|
}
|
|
47284
47287
|
else if (typeof checked === 'function') {
|
|
47285
47288
|
return undefined;
|
|
47286
47289
|
}
|
|
47287
|
-
else if (isValid$
|
|
47290
|
+
else if (isValid$5(checked)) {
|
|
47288
47291
|
this.headerCheckedState[field] = checked;
|
|
47289
47292
|
}
|
|
47290
47293
|
else if (this.checkedState?.length > 0) {
|
|
@@ -47296,7 +47299,7 @@
|
|
|
47296
47299
|
const recordIndex = this.table.getRecordIndexByCell(col, row);
|
|
47297
47300
|
if (recordIndex >= 0) {
|
|
47298
47301
|
const dataIndex = this.table.dataSource.getIndexKey(recordIndex);
|
|
47299
|
-
if (isValid$
|
|
47302
|
+
if (isValid$5(this.checkedState[dataIndex]?.[field])) {
|
|
47300
47303
|
return this.checkedState[dataIndex][field];
|
|
47301
47304
|
}
|
|
47302
47305
|
if (this.checkedState[dataIndex]) {
|
|
@@ -47700,8 +47703,8 @@
|
|
|
47700
47703
|
}
|
|
47701
47704
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEENTER_CELL)) {
|
|
47702
47705
|
if (cellGoup?.role === 'cell' &&
|
|
47703
|
-
isValid$
|
|
47704
|
-
isValid$
|
|
47706
|
+
isValid$5(cellGoup.col) &&
|
|
47707
|
+
isValid$5(cellGoup.row) &&
|
|
47705
47708
|
(cellGoup.col !== table.stateManager.hover.cellPos.col || cellGoup.row !== table.stateManager.hover.cellPos.row)) {
|
|
47706
47709
|
table.fireListeners(TABLE_EVENT_TYPE.MOUSEENTER_CELL, {
|
|
47707
47710
|
col: cellGoup.col,
|
|
@@ -48068,6 +48071,22 @@
|
|
|
48068
48071
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
48069
48072
|
const { col, row } = eventArgsSet.eventArgs;
|
|
48070
48073
|
const cellInfo = table.getCellInfo(col, row);
|
|
48074
|
+
const mergeRange = getCellMergeInfo(table, col, row);
|
|
48075
|
+
if (mergeRange) {
|
|
48076
|
+
for (let col = mergeRange.start.col; col <= mergeRange.end.col; col++) {
|
|
48077
|
+
for (let row = mergeRange.start.row; row <= mergeRange.end.row; row++) {
|
|
48078
|
+
const cellGroup = table.scenegraph.getCell(col, row);
|
|
48079
|
+
cellGroup.forEachChildren((checkbox) => {
|
|
48080
|
+
if (checkbox.name === 'checkbox') {
|
|
48081
|
+
checkbox.setAttributes({
|
|
48082
|
+
checked: e.target.attribute.checked,
|
|
48083
|
+
indeterminate: e.target.attribute.indeterminate
|
|
48084
|
+
});
|
|
48085
|
+
}
|
|
48086
|
+
});
|
|
48087
|
+
}
|
|
48088
|
+
}
|
|
48089
|
+
}
|
|
48071
48090
|
const cellsEvent = {
|
|
48072
48091
|
...cellInfo,
|
|
48073
48092
|
event: e.nativeEvent,
|
|
@@ -48326,7 +48345,7 @@
|
|
|
48326
48345
|
handler.on(table.getElement(), 'copy', (e) => {
|
|
48327
48346
|
if (table.keyboardOptions?.copySelected) {
|
|
48328
48347
|
const data = table.getCopyValue();
|
|
48329
|
-
if (isValid$
|
|
48348
|
+
if (isValid$5(data)) {
|
|
48330
48349
|
e.preventDefault();
|
|
48331
48350
|
if (browser.IE) {
|
|
48332
48351
|
window.clipboardData.setData('Text', data);
|
|
@@ -49260,7 +49279,7 @@
|
|
|
49260
49279
|
row = cellAddress.row;
|
|
49261
49280
|
}
|
|
49262
49281
|
}
|
|
49263
|
-
if (isValid$
|
|
49282
|
+
if (isValid$5(col) && isValid$5(row) && cellInRange(cellRange, col, row)) {
|
|
49264
49283
|
if (menuKeyCurrent === menuKey) {
|
|
49265
49284
|
return true;
|
|
49266
49285
|
}
|
|
@@ -51147,7 +51166,7 @@
|
|
|
51147
51166
|
attrs.pager = pager;
|
|
51148
51167
|
if (background.visible && !isEmpty(background.style)) {
|
|
51149
51168
|
merge$1(attrs, background.style);
|
|
51150
|
-
if (isValid$
|
|
51169
|
+
if (isValid$5(background.padding)) {
|
|
51151
51170
|
attrs.padding = background.padding;
|
|
51152
51171
|
}
|
|
51153
51172
|
}
|
|
@@ -51429,10 +51448,10 @@
|
|
|
51429
51448
|
if (!isEmpty(handler.style)) {
|
|
51430
51449
|
attrs.handlerStyle = transformToGraphic(handler.style);
|
|
51431
51450
|
}
|
|
51432
|
-
if (isValid$
|
|
51451
|
+
if (isValid$5(rail.width)) {
|
|
51433
51452
|
attrs.railWidth = rail.width;
|
|
51434
51453
|
}
|
|
51435
|
-
if (isValid$
|
|
51454
|
+
if (isValid$5(rail.height)) {
|
|
51436
51455
|
attrs.railHeight = rail.height;
|
|
51437
51456
|
}
|
|
51438
51457
|
if (!isEmpty(rail.style)) {
|
|
@@ -51449,7 +51468,7 @@
|
|
|
51449
51468
|
}
|
|
51450
51469
|
if (background.visible && !isEmpty(background.style)) {
|
|
51451
51470
|
merge$1(attrs, background.style);
|
|
51452
|
-
if (isValid$
|
|
51471
|
+
if (isValid$5(background.padding)) {
|
|
51453
51472
|
attrs.padding = background.padding;
|
|
51454
51473
|
}
|
|
51455
51474
|
}
|
|
@@ -51660,7 +51679,7 @@
|
|
|
51660
51679
|
return TABLE_EVENT_TYPE;
|
|
51661
51680
|
}
|
|
51662
51681
|
options;
|
|
51663
|
-
version = "0.15.
|
|
51682
|
+
version = "0.15.3";
|
|
51664
51683
|
pagination;
|
|
51665
51684
|
id = `VTable${Date.now()}`;
|
|
51666
51685
|
headerStyleCache;
|
|
@@ -53171,7 +53190,7 @@
|
|
|
53171
53190
|
col,
|
|
53172
53191
|
row,
|
|
53173
53192
|
table: this,
|
|
53174
|
-
value:
|
|
53193
|
+
value: customMerge.text,
|
|
53175
53194
|
dataValue: this.getCellOriginValue(col, row),
|
|
53176
53195
|
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
53177
53196
|
}, styleClass, this.options.autoWrapText);
|
|
@@ -53522,12 +53541,12 @@
|
|
|
53522
53541
|
}
|
|
53523
53542
|
scrollToCell(cellAddr) {
|
|
53524
53543
|
const drawRange = this.getDrawRange();
|
|
53525
|
-
if (isValid$
|
|
53544
|
+
if (isValid$5(cellAddr.col) && cellAddr.col >= this.frozenColCount) {
|
|
53526
53545
|
const frozenWidth = this.getFrozenColsWidth();
|
|
53527
53546
|
const left = this.getColsWidth(0, cellAddr.col - 1);
|
|
53528
53547
|
this.scrollLeft = Math.min(left - frozenWidth, this.getAllColsWidth() - drawRange.width);
|
|
53529
53548
|
}
|
|
53530
|
-
if (isValid$
|
|
53549
|
+
if (isValid$5(cellAddr.row) && cellAddr.row >= this.frozenRowCount) {
|
|
53531
53550
|
const frozenHeight = this.getFrozenRowsHeight();
|
|
53532
53551
|
const top = this.getRowsHeight(0, cellAddr.row - 1);
|
|
53533
53552
|
this.scrollTop = Math.min(top - frozenHeight, this.getAllRowsHeight() - drawRange.height);
|
|
@@ -54257,7 +54276,7 @@
|
|
|
54257
54276
|
return false;
|
|
54258
54277
|
}
|
|
54259
54278
|
isFrozenColumn(col, row) {
|
|
54260
|
-
if (isValid$
|
|
54279
|
+
if (isValid$5(row)) {
|
|
54261
54280
|
if (col < this.frozenColCount && row >= this.frozenRowCount && row < this.rowCount - this.bottomFrozenRowCount) {
|
|
54262
54281
|
return true;
|
|
54263
54282
|
}
|
|
@@ -54270,7 +54289,7 @@
|
|
|
54270
54289
|
return false;
|
|
54271
54290
|
}
|
|
54272
54291
|
isRightFrozenColumn(col, row) {
|
|
54273
|
-
if (isValid$
|
|
54292
|
+
if (isValid$5(row)) {
|
|
54274
54293
|
if (col >= this.colCount - this.rightFrozenColCount &&
|
|
54275
54294
|
row >= this.frozenRowCount &&
|
|
54276
54295
|
row < this.rowCount - this.bottomFrozenRowCount) {
|
|
@@ -54285,7 +54304,7 @@
|
|
|
54285
54304
|
return false;
|
|
54286
54305
|
}
|
|
54287
54306
|
isFrozenRow(col, row) {
|
|
54288
|
-
if (isValid$
|
|
54307
|
+
if (isValid$5(row)) {
|
|
54289
54308
|
if (row < this.frozenRowCount && col >= this.frozenColCount && col < this.colCount - this.rightFrozenColCount) {
|
|
54290
54309
|
return true;
|
|
54291
54310
|
}
|
|
@@ -54299,7 +54318,7 @@
|
|
|
54299
54318
|
return false;
|
|
54300
54319
|
}
|
|
54301
54320
|
isBottomFrozenRow(col, row) {
|
|
54302
|
-
if (isValid$
|
|
54321
|
+
if (isValid$5(row)) {
|
|
54303
54322
|
if (row >= this.rowCount - this.bottomFrozenRowCount &&
|
|
54304
54323
|
col >= this.frozenColCount &&
|
|
54305
54324
|
col < this.colCount - this.rightFrozenColCount) {
|
|
@@ -55526,7 +55545,7 @@
|
|
|
55526
55545
|
targetRecordIndex = i;
|
|
55527
55546
|
}
|
|
55528
55547
|
}
|
|
55529
|
-
if (isValid$
|
|
55548
|
+
if (isValid$5(targetRecordIndex)) {
|
|
55530
55549
|
break;
|
|
55531
55550
|
}
|
|
55532
55551
|
}
|
|
@@ -55542,29 +55561,29 @@
|
|
|
55542
55561
|
if (colObj) {
|
|
55543
55562
|
const layoutRange = layoutMap.getBodyLayoutRangeById(colObj.id);
|
|
55544
55563
|
let startRow;
|
|
55545
|
-
if (isValid$
|
|
55564
|
+
if (isValid$5(index)) {
|
|
55546
55565
|
startRow = layoutMap.getRecordStartRowByRecordIndex(index);
|
|
55547
55566
|
}
|
|
55548
55567
|
if (this.transpose) {
|
|
55549
55568
|
return {
|
|
55550
55569
|
start: {
|
|
55551
55570
|
row: layoutRange.start.row,
|
|
55552
|
-
col: isValid$
|
|
55571
|
+
col: isValid$5(startRow) ? startRow + layoutRange.start.col : undefined
|
|
55553
55572
|
},
|
|
55554
55573
|
end: {
|
|
55555
55574
|
row: layoutRange.end.row,
|
|
55556
|
-
col: isValid$
|
|
55575
|
+
col: isValid$5(startRow) ? startRow + layoutRange.end.col : undefined
|
|
55557
55576
|
}
|
|
55558
55577
|
};
|
|
55559
55578
|
}
|
|
55560
55579
|
return {
|
|
55561
55580
|
start: {
|
|
55562
55581
|
col: layoutRange.start.col,
|
|
55563
|
-
row: isValid$
|
|
55582
|
+
row: isValid$5(startRow) ? startRow + layoutRange.start.row : undefined
|
|
55564
55583
|
},
|
|
55565
55584
|
end: {
|
|
55566
55585
|
col: layoutRange.end.col,
|
|
55567
|
-
row: isValid$
|
|
55586
|
+
row: isValid$5(startRow) ? startRow + layoutRange.end.row : undefined
|
|
55568
55587
|
}
|
|
55569
55588
|
};
|
|
55570
55589
|
}
|
|
@@ -55581,6 +55600,7 @@
|
|
|
55581
55600
|
toggleHierarchyState(col, row) {
|
|
55582
55601
|
const hierarchyState = this.getHierarchyState(col, row);
|
|
55583
55602
|
if (hierarchyState === HierarchyState.expand) {
|
|
55603
|
+
this._refreshHierarchyState(col, row);
|
|
55584
55604
|
this.fireListeners(TABLE_EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, {
|
|
55585
55605
|
col: col,
|
|
55586
55606
|
row: row,
|
|
@@ -55588,13 +55608,19 @@
|
|
|
55588
55608
|
});
|
|
55589
55609
|
}
|
|
55590
55610
|
else if (hierarchyState === HierarchyState.collapse) {
|
|
55611
|
+
const record = this.getCellOriginRecord(col, row);
|
|
55612
|
+
if (Array.isArray(record.children)) {
|
|
55613
|
+
this._refreshHierarchyState(col, row);
|
|
55614
|
+
}
|
|
55591
55615
|
this.fireListeners(TABLE_EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, {
|
|
55592
55616
|
col: col,
|
|
55593
55617
|
row: row,
|
|
55594
55618
|
hierarchyState: HierarchyState.expand,
|
|
55595
|
-
originData:
|
|
55619
|
+
originData: record
|
|
55596
55620
|
});
|
|
55597
55621
|
}
|
|
55622
|
+
}
|
|
55623
|
+
_refreshHierarchyState(col, row) {
|
|
55598
55624
|
const index = this.getRecordIndexByCell(col, row);
|
|
55599
55625
|
const diffDataIndices = this.dataSource.toggleHierarchyState(index);
|
|
55600
55626
|
const diffPositions = this.internalProps.layoutMap.toggleHierarchyState(diffDataIndices);
|
|
@@ -55603,7 +55629,7 @@
|
|
|
55603
55629
|
this.scenegraph.updateHierarchyIcon(col, row);
|
|
55604
55630
|
this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions);
|
|
55605
55631
|
}
|
|
55606
|
-
|
|
55632
|
+
_hasHierarchyTreeHeader() {
|
|
55607
55633
|
return (this.options.columns ?? this.options.header)?.some((column, i) => column.tree);
|
|
55608
55634
|
}
|
|
55609
55635
|
getMenuInfo(col, row, type) {
|
|
@@ -55683,7 +55709,7 @@
|
|
|
55683
55709
|
if (this.stateManager.checkedState.length < this.rowCount - this.columnHeaderLevelCount) {
|
|
55684
55710
|
this.stateManager.initLeftRecordsCheckState(this.records);
|
|
55685
55711
|
}
|
|
55686
|
-
if (isValid$
|
|
55712
|
+
if (isValid$5(field)) {
|
|
55687
55713
|
return this.stateManager.checkedState.map(state => {
|
|
55688
55714
|
return state[field];
|
|
55689
55715
|
});
|
|
@@ -55694,7 +55720,7 @@
|
|
|
55694
55720
|
const define = this.getBodyColumnDefine(col, row);
|
|
55695
55721
|
const field = define?.field;
|
|
55696
55722
|
const cellType = define?.cellType;
|
|
55697
|
-
if (isValid$
|
|
55723
|
+
if (isValid$5(field) && cellType === 'checkbox') {
|
|
55698
55724
|
const dataIndex = this.dataSource.getIndexKey(this.getRecordIndexByCell(col, row));
|
|
55699
55725
|
return this.stateManager.checkedState[dataIndex][field];
|
|
55700
55726
|
}
|
|
@@ -55749,17 +55775,20 @@
|
|
|
55749
55775
|
}
|
|
55750
55776
|
this.render();
|
|
55751
55777
|
}
|
|
55752
|
-
|
|
55778
|
+
setRecordChildren(records, col, row) {
|
|
55779
|
+
const record = this.getCellOriginRecord(col, row);
|
|
55780
|
+
record.children = records;
|
|
55753
55781
|
const index = this.getRecordIndexByCell(col, row);
|
|
55754
55782
|
this.dataSource.setRecord(record, index);
|
|
55783
|
+
this._refreshHierarchyState(col, row);
|
|
55755
55784
|
}
|
|
55756
55785
|
startEditCell(col, row) {
|
|
55757
|
-
if (isValid$
|
|
55786
|
+
if (isValid$5(col) && isValid$5(row)) {
|
|
55758
55787
|
this.editorManager.startEditCell(col, row);
|
|
55759
55788
|
}
|
|
55760
55789
|
else if (this.stateManager.select?.cellPos) {
|
|
55761
55790
|
const { col, row } = this.stateManager.select.cellPos;
|
|
55762
|
-
if (isValid$
|
|
55791
|
+
if (isValid$5(col) && isValid$5(row)) {
|
|
55763
55792
|
this.editorManager.startEditCell(col, row);
|
|
55764
55793
|
}
|
|
55765
55794
|
}
|
|
@@ -55787,10 +55816,9 @@
|
|
|
55787
55816
|
}
|
|
55788
55817
|
changeCellValue(col, row, value) {
|
|
55789
55818
|
const recordIndex = this.getRecordIndexByCell(col, row);
|
|
55790
|
-
const { field
|
|
55819
|
+
const { field } = this.internalProps.layoutMap.getBody(col, row);
|
|
55791
55820
|
this.dataSource.changeFieldValue(value, recordIndex, field, col, row, this);
|
|
55792
|
-
|
|
55793
|
-
this.scenegraph.updateCellValue(col, row, cell_value);
|
|
55821
|
+
this.scenegraph.updateCellContent(col, row);
|
|
55794
55822
|
if (this.widthMode === 'adaptive' || (this.autoFillWidth && this.getAllColsWidth() <= this.tableNoFrameWidth)) {
|
|
55795
55823
|
if (this.internalProps._widthResizedColMap.size === 0) {
|
|
55796
55824
|
this.scenegraph.recalculateColWidths();
|
|
@@ -56359,7 +56387,7 @@
|
|
|
56359
56387
|
if (indicatorInfo.customRender) {
|
|
56360
56388
|
hd.customRender = indicatorInfo.customRender;
|
|
56361
56389
|
}
|
|
56362
|
-
if (!isValid$
|
|
56390
|
+
if (!isValid$5(this._indicators?.find(indicator => indicator.indicatorKey === indicatorInfo.indicatorKey))) {
|
|
56363
56391
|
this._indicators?.push({
|
|
56364
56392
|
id: ++sharedVar.seqId,
|
|
56365
56393
|
indicatorKey: indicatorInfo.indicatorKey,
|
|
@@ -56382,7 +56410,7 @@
|
|
|
56382
56410
|
}
|
|
56383
56411
|
}
|
|
56384
56412
|
else if (hd.indicatorKey) {
|
|
56385
|
-
if (!isValid$
|
|
56413
|
+
if (!isValid$5(this._indicators?.find(indicator => indicator.indicatorKey === hd.indicatorKey))) {
|
|
56386
56414
|
this._indicators?.push({
|
|
56387
56415
|
id: ++sharedVar.seqId,
|
|
56388
56416
|
indicatorKey: hd.indicatorKey,
|
|
@@ -56755,7 +56783,7 @@
|
|
|
56755
56783
|
return false;
|
|
56756
56784
|
}
|
|
56757
56785
|
isFrozenColumn(col, row) {
|
|
56758
|
-
if (isValid$
|
|
56786
|
+
if (isValid$5(row)) {
|
|
56759
56787
|
if (col < this.frozenColCount && row >= this.frozenRowCount && row < this.rowCount - this.bottomFrozenRowCount) {
|
|
56760
56788
|
return true;
|
|
56761
56789
|
}
|
|
@@ -56768,7 +56796,7 @@
|
|
|
56768
56796
|
return false;
|
|
56769
56797
|
}
|
|
56770
56798
|
isRightFrozenColumn(col, row) {
|
|
56771
|
-
if (isValid$
|
|
56799
|
+
if (isValid$5(row)) {
|
|
56772
56800
|
if (col >= this.colCount - this.rightFrozenColCount &&
|
|
56773
56801
|
row >= this.frozenRowCount &&
|
|
56774
56802
|
row < this.rowCount - this.bottomFrozenRowCount) {
|
|
@@ -56783,7 +56811,7 @@
|
|
|
56783
56811
|
return false;
|
|
56784
56812
|
}
|
|
56785
56813
|
isFrozenRow(col, row) {
|
|
56786
|
-
if (isValid$
|
|
56814
|
+
if (isValid$5(row)) {
|
|
56787
56815
|
if (row < this.frozenRowCount && col >= this.frozenColCount && col < this.colCount - this.rightFrozenColCount) {
|
|
56788
56816
|
return true;
|
|
56789
56817
|
}
|
|
@@ -56797,7 +56825,7 @@
|
|
|
56797
56825
|
return false;
|
|
56798
56826
|
}
|
|
56799
56827
|
isBottomFrozenRow(col, row) {
|
|
56800
|
-
if (isValid$
|
|
56828
|
+
if (isValid$5(row)) {
|
|
56801
56829
|
if (row >= this.rowCount - this.bottomFrozenRowCount &&
|
|
56802
56830
|
col >= this.frozenColCount &&
|
|
56803
56831
|
col < this.colCount - this.rightFrozenColCount) {
|
|
@@ -57382,8 +57410,8 @@
|
|
|
57382
57410
|
let isCol = false;
|
|
57383
57411
|
for (let j = 0; j < colArr.length; j++) {
|
|
57384
57412
|
const dimension = colArr[j];
|
|
57385
|
-
if (((isValid$
|
|
57386
|
-
(isValid$
|
|
57413
|
+
if (((isValid$5(highlightDimension.dimensionKey) && dimension.dimensionKey === highlightDimension.dimensionKey) ||
|
|
57414
|
+
(isValid$5(highlightDimension.indicatorKey) && dimension.indicatorKey === highlightDimension.indicatorKey)) &&
|
|
57387
57415
|
dimension.value === highlightDimension.value) {
|
|
57388
57416
|
colArr = dimension.children;
|
|
57389
57417
|
colDimension = dimension;
|
|
@@ -57396,8 +57424,8 @@
|
|
|
57396
57424
|
}
|
|
57397
57425
|
for (let k = 0; k < rowArr.length; k++) {
|
|
57398
57426
|
const dimension = rowArr[k];
|
|
57399
|
-
if (((isValid$
|
|
57400
|
-
(isValid$
|
|
57427
|
+
if (((isValid$5(highlightDimension.dimensionKey) && dimension.dimensionKey === highlightDimension.dimensionKey) ||
|
|
57428
|
+
(isValid$5(highlightDimension.indicatorKey) && dimension.indicatorKey === highlightDimension.indicatorKey)) &&
|
|
57401
57429
|
dimension.value === highlightDimension.value) {
|
|
57402
57430
|
rowArr = dimension.children;
|
|
57403
57431
|
rowDimension = dimension;
|
|
@@ -57499,7 +57527,7 @@
|
|
|
57499
57527
|
}
|
|
57500
57528
|
return false;
|
|
57501
57529
|
});
|
|
57502
|
-
if (isValid$
|
|
57530
|
+
if (isValid$5(col) && isValid$5(row)) {
|
|
57503
57531
|
return { col, row: row + this.columnHeaderLevelCount };
|
|
57504
57532
|
}
|
|
57505
57533
|
return undefined;
|
|
@@ -57655,10 +57683,10 @@
|
|
|
57655
57683
|
const colDimension = colHeaderPaths[i];
|
|
57656
57684
|
for (let j = 0; j < colArr.length; j++) {
|
|
57657
57685
|
const dimension = colArr[j];
|
|
57658
|
-
if ((!isValid$
|
|
57686
|
+
if ((!isValid$5(colDimension.indicatorKey) &&
|
|
57659
57687
|
dimension.dimensionKey === colDimension.dimensionKey &&
|
|
57660
57688
|
dimension.value === colDimension.value) ||
|
|
57661
|
-
(isValid$
|
|
57689
|
+
(isValid$5(colDimension.indicatorKey) && dimension.indicatorKey === colDimension.indicatorKey)) {
|
|
57662
57690
|
colArr = dimension.children;
|
|
57663
57691
|
if (needLowestLevel && !colArr) {
|
|
57664
57692
|
colDimensionFinded = dimension;
|
|
@@ -57702,10 +57730,10 @@
|
|
|
57702
57730
|
const rowDimension = rowHeaderPaths[i];
|
|
57703
57731
|
for (let j = 0; j < rowArr.length; j++) {
|
|
57704
57732
|
const dimension = rowArr[j];
|
|
57705
|
-
if (((!isValid$
|
|
57733
|
+
if (((!isValid$5(rowDimension.indicatorKey) &&
|
|
57706
57734
|
dimension.dimensionKey === rowDimension.dimensionKey &&
|
|
57707
57735
|
dimension.value === rowDimension.value) ||
|
|
57708
|
-
(isValid$
|
|
57736
|
+
(isValid$5(rowDimension.indicatorKey) && dimension.indicatorKey === rowDimension.indicatorKey)) &&
|
|
57709
57737
|
dimension.value === rowDimension.value) {
|
|
57710
57738
|
rowArr = dimension.children;
|
|
57711
57739
|
if (needLowestLevel && !rowArr) {
|
|
@@ -57721,7 +57749,7 @@
|
|
|
57721
57749
|
}
|
|
57722
57750
|
}
|
|
57723
57751
|
if (!forceBody && needLowestLevel) {
|
|
57724
|
-
if ((!rowDimensionFinded && !isValid$
|
|
57752
|
+
if ((!rowDimensionFinded && !isValid$5(row)) || !colDimensionFinded) {
|
|
57725
57753
|
return undefined;
|
|
57726
57754
|
}
|
|
57727
57755
|
}
|
|
@@ -57742,7 +57770,7 @@
|
|
|
57742
57770
|
col += startInTotal ?? 0;
|
|
57743
57771
|
defaultRow = this.columnHeaderTitle ? level + 1 : level;
|
|
57744
57772
|
}
|
|
57745
|
-
if (isValid$
|
|
57773
|
+
if (isValid$5(col) || isValid$5(row)) {
|
|
57746
57774
|
return { col: col ?? defaultCol, row: row ?? defaultRow };
|
|
57747
57775
|
}
|
|
57748
57776
|
return undefined;
|
|
@@ -57829,8 +57857,8 @@
|
|
|
57829
57857
|
this.clearCellRangeMap();
|
|
57830
57858
|
this.pagination = pagination;
|
|
57831
57859
|
if (this.rowHierarchyType === 'grid' &&
|
|
57832
|
-
isValid$
|
|
57833
|
-
isValid$
|
|
57860
|
+
isValid$5(this.pagination?.perPageCount) &&
|
|
57861
|
+
isValid$5(this.pagination?.currentPage)) {
|
|
57834
57862
|
this.pagination.perPageCount =
|
|
57835
57863
|
Math.ceil(this.pagination.perPageCount / this.indicatorKeys.length) * this.indicatorKeys.length;
|
|
57836
57864
|
const { perPageCount, currentPage } = this.pagination;
|
|
@@ -57869,8 +57897,8 @@
|
|
|
57869
57897
|
let isCol = false;
|
|
57870
57898
|
for (let j = 0; j < colArr.length; j++) {
|
|
57871
57899
|
const dimension = colArr[j];
|
|
57872
|
-
if (((isValid$
|
|
57873
|
-
(isValid$
|
|
57900
|
+
if (((isValid$5(highlightDimension.dimensionKey) && dimension.dimensionKey === highlightDimension.dimensionKey) ||
|
|
57901
|
+
(isValid$5(highlightDimension.indicatorKey) && dimension.indicatorKey === highlightDimension.indicatorKey)) &&
|
|
57874
57902
|
dimension.value === highlightDimension.value) {
|
|
57875
57903
|
colArr = dimension.children;
|
|
57876
57904
|
colDimension = dimension;
|
|
@@ -57883,8 +57911,8 @@
|
|
|
57883
57911
|
}
|
|
57884
57912
|
for (let k = 0; k < rowArr.length; k++) {
|
|
57885
57913
|
const dimension = rowArr[k];
|
|
57886
|
-
if (((isValid$
|
|
57887
|
-
(isValid$
|
|
57914
|
+
if (((isValid$5(highlightDimension.dimensionKey) && dimension.dimensionKey === highlightDimension.dimensionKey) ||
|
|
57915
|
+
(isValid$5(highlightDimension.indicatorKey) && dimension.indicatorKey === highlightDimension.indicatorKey)) &&
|
|
57888
57916
|
dimension.value === highlightDimension.value) {
|
|
57889
57917
|
rowArr = dimension.children;
|
|
57890
57918
|
rowDimension = dimension;
|
|
@@ -58194,6 +58222,7 @@
|
|
|
58194
58222
|
dataConfig;
|
|
58195
58223
|
records;
|
|
58196
58224
|
tree = {};
|
|
58225
|
+
changedTree = {};
|
|
58197
58226
|
colFlatKeys = {};
|
|
58198
58227
|
rowFlatKeys = {};
|
|
58199
58228
|
stringJoinChar = String.fromCharCode(0);
|
|
@@ -58278,7 +58307,7 @@
|
|
|
58278
58307
|
}
|
|
58279
58308
|
});
|
|
58280
58309
|
}
|
|
58281
|
-
getTreeNode(rowKey = [], colKey = [], indicator) {
|
|
58310
|
+
getTreeNode(rowKey = [], colKey = [], indicator, considerChangedValue = true) {
|
|
58282
58311
|
let flatRowKey;
|
|
58283
58312
|
let flatColKey;
|
|
58284
58313
|
if (typeof rowKey === 'string') {
|
|
@@ -58309,8 +58338,50 @@
|
|
|
58309
58338
|
isHasIndicator && colKey.push(indicator);
|
|
58310
58339
|
flatColKey = colKey.join(this.stringJoinChar);
|
|
58311
58340
|
}
|
|
58341
|
+
if (considerChangedValue && isValid$5(this.changedTree[flatRowKey]?.[flatColKey])) {
|
|
58342
|
+
return { value: this.changedTree[flatRowKey][flatColKey], record: this.tree?.[flatRowKey]?.[flatColKey]?.record };
|
|
58343
|
+
}
|
|
58312
58344
|
return this.tree?.[flatRowKey]?.[flatColKey] ?? undefined;
|
|
58313
58345
|
}
|
|
58346
|
+
changeTreeNodeValue(rowKey = [], colKey = [], indicator, newValue) {
|
|
58347
|
+
let flatRowKey;
|
|
58348
|
+
let flatColKey;
|
|
58349
|
+
if (typeof rowKey === 'string') {
|
|
58350
|
+
flatRowKey = rowKey;
|
|
58351
|
+
}
|
|
58352
|
+
else {
|
|
58353
|
+
let isHasIndicator = false;
|
|
58354
|
+
rowKey.map((key, i) => {
|
|
58355
|
+
if (key === indicator) {
|
|
58356
|
+
rowKey.splice(i, 1);
|
|
58357
|
+
isHasIndicator = true;
|
|
58358
|
+
}
|
|
58359
|
+
});
|
|
58360
|
+
isHasIndicator && rowKey.push(indicator);
|
|
58361
|
+
flatRowKey = rowKey.join(this.stringJoinChar);
|
|
58362
|
+
}
|
|
58363
|
+
if (typeof colKey === 'string') {
|
|
58364
|
+
flatColKey = colKey;
|
|
58365
|
+
}
|
|
58366
|
+
else {
|
|
58367
|
+
let isHasIndicator = false;
|
|
58368
|
+
colKey.map((key, i) => {
|
|
58369
|
+
if (key === indicator) {
|
|
58370
|
+
colKey.splice(i, 1);
|
|
58371
|
+
isHasIndicator = true;
|
|
58372
|
+
}
|
|
58373
|
+
});
|
|
58374
|
+
isHasIndicator && colKey.push(indicator);
|
|
58375
|
+
flatColKey = colKey.join(this.stringJoinChar);
|
|
58376
|
+
}
|
|
58377
|
+
if (this.changedTree[flatRowKey]) {
|
|
58378
|
+
this.changedTree[flatRowKey][flatColKey] = newValue;
|
|
58379
|
+
}
|
|
58380
|
+
else {
|
|
58381
|
+
this.changedTree[flatRowKey] = {};
|
|
58382
|
+
this.changedTree[flatRowKey][flatColKey] = newValue;
|
|
58383
|
+
}
|
|
58384
|
+
}
|
|
58314
58385
|
}
|
|
58315
58386
|
|
|
58316
58387
|
class Aggregator {
|
|
@@ -58328,6 +58399,9 @@
|
|
|
58328
58399
|
this.formatFun = formatFun;
|
|
58329
58400
|
this.isRecord = isRecord ?? this.isRecord;
|
|
58330
58401
|
}
|
|
58402
|
+
clearCacheValue() {
|
|
58403
|
+
this._formatedValue = undefined;
|
|
58404
|
+
}
|
|
58331
58405
|
formatValue(col, row, table) {
|
|
58332
58406
|
if (!this._formatedValue) {
|
|
58333
58407
|
if (this.formatFun) {
|
|
@@ -58661,6 +58735,7 @@
|
|
|
58661
58735
|
dataConfig;
|
|
58662
58736
|
records;
|
|
58663
58737
|
tree = {};
|
|
58738
|
+
changedTree = {};
|
|
58664
58739
|
colFlatKeys = {};
|
|
58665
58740
|
rowFlatKeys = {};
|
|
58666
58741
|
colKeys = [];
|
|
@@ -59123,9 +59198,8 @@
|
|
|
59123
59198
|
return indicatorKey === value.indicatorKey;
|
|
59124
59199
|
});
|
|
59125
59200
|
}
|
|
59126
|
-
getAggregator(rowKey = [], colKey = [], indicator) {
|
|
59201
|
+
getAggregator(rowKey = [], colKey = [], indicator, considerChangedValue = true) {
|
|
59127
59202
|
const indicatorIndex = this.indicatorKeys.indexOf(indicator);
|
|
59128
|
-
let agg;
|
|
59129
59203
|
let flatRowKey;
|
|
59130
59204
|
let flatColKey;
|
|
59131
59205
|
if (typeof rowKey === 'string') {
|
|
@@ -59140,8 +59214,26 @@
|
|
|
59140
59214
|
else {
|
|
59141
59215
|
flatColKey = colKey.join(this.stringJoinChar);
|
|
59142
59216
|
}
|
|
59143
|
-
|
|
59144
|
-
|
|
59217
|
+
const agg = this.tree[flatRowKey]?.[flatColKey]?.[indicatorIndex];
|
|
59218
|
+
if (considerChangedValue && isValid$5(this.changedTree[flatRowKey]?.[flatColKey]?.[indicatorIndex])) {
|
|
59219
|
+
const changeValue = this.changedTree[flatRowKey][flatColKey][indicatorIndex];
|
|
59220
|
+
if (agg) {
|
|
59221
|
+
return {
|
|
59222
|
+
value: () => {
|
|
59223
|
+
return changeValue;
|
|
59224
|
+
},
|
|
59225
|
+
formatValue: agg.formatValue,
|
|
59226
|
+
formatFun: agg.formatFun,
|
|
59227
|
+
records: agg.records,
|
|
59228
|
+
className: '',
|
|
59229
|
+
push() {
|
|
59230
|
+
},
|
|
59231
|
+
clearCacheValue() {
|
|
59232
|
+
},
|
|
59233
|
+
reset() {
|
|
59234
|
+
}
|
|
59235
|
+
};
|
|
59236
|
+
}
|
|
59145
59237
|
}
|
|
59146
59238
|
return agg
|
|
59147
59239
|
? agg
|
|
@@ -59155,6 +59247,8 @@
|
|
|
59155
59247
|
formatValue() {
|
|
59156
59248
|
return '';
|
|
59157
59249
|
},
|
|
59250
|
+
clearCacheValue() {
|
|
59251
|
+
},
|
|
59158
59252
|
reset() {
|
|
59159
59253
|
}
|
|
59160
59254
|
};
|
|
@@ -59614,6 +59708,35 @@
|
|
|
59614
59708
|
}
|
|
59615
59709
|
return customTree;
|
|
59616
59710
|
}
|
|
59711
|
+
changeTreeNodeValue(rowKey = [], colKey = [], indicator, newValue) {
|
|
59712
|
+
const indicatorIndex = this.indicatorKeys.indexOf(indicator);
|
|
59713
|
+
let flatRowKey;
|
|
59714
|
+
let flatColKey;
|
|
59715
|
+
if (typeof rowKey === 'string') {
|
|
59716
|
+
flatRowKey = rowKey;
|
|
59717
|
+
}
|
|
59718
|
+
else {
|
|
59719
|
+
flatRowKey = rowKey.join(this.stringJoinChar);
|
|
59720
|
+
}
|
|
59721
|
+
if (typeof colKey === 'string') {
|
|
59722
|
+
flatColKey = colKey;
|
|
59723
|
+
}
|
|
59724
|
+
else {
|
|
59725
|
+
flatColKey = colKey.join(this.stringJoinChar);
|
|
59726
|
+
}
|
|
59727
|
+
if (this.changedTree[flatRowKey]?.[flatColKey]) {
|
|
59728
|
+
this.changedTree[flatRowKey][flatColKey][indicatorIndex] = newValue;
|
|
59729
|
+
}
|
|
59730
|
+
else if (this.changedTree[flatRowKey]) {
|
|
59731
|
+
this.changedTree[flatRowKey][flatColKey] = [];
|
|
59732
|
+
this.changedTree[flatRowKey][flatColKey][indicatorIndex] = newValue;
|
|
59733
|
+
}
|
|
59734
|
+
else {
|
|
59735
|
+
this.changedTree[flatRowKey] = {};
|
|
59736
|
+
this.changedTree[flatRowKey][flatColKey] = [];
|
|
59737
|
+
this.changedTree[flatRowKey][flatColKey][indicatorIndex] = newValue;
|
|
59738
|
+
}
|
|
59739
|
+
}
|
|
59617
59740
|
}
|
|
59618
59741
|
function arraySortByAnotherArray(array, sortArray) {
|
|
59619
59742
|
return array.sort((a, b) => {
|
|
@@ -59631,6 +59754,7 @@
|
|
|
59631
59754
|
|
|
59632
59755
|
class PivotTable extends BaseTable {
|
|
59633
59756
|
pivotSortState;
|
|
59757
|
+
editorManager;
|
|
59634
59758
|
dataset;
|
|
59635
59759
|
flatDataToObjects;
|
|
59636
59760
|
constructor(container, options) {
|
|
@@ -59714,6 +59838,9 @@
|
|
|
59714
59838
|
if (options.pivotSortState) {
|
|
59715
59839
|
this.updatePivotSortState(options.pivotSortState);
|
|
59716
59840
|
}
|
|
59841
|
+
if (Env.mode !== 'node') {
|
|
59842
|
+
this.editorManager = new EditManeger(this);
|
|
59843
|
+
}
|
|
59717
59844
|
this.refreshHeader();
|
|
59718
59845
|
this.stateManager.initCheckedState(records);
|
|
59719
59846
|
this.scenegraph.createSceneGraph();
|
|
@@ -59937,23 +60064,6 @@
|
|
|
59937
60064
|
const { layoutMap } = this.internalProps;
|
|
59938
60065
|
return layoutMap.getBodyIndexByCol(col);
|
|
59939
60066
|
}
|
|
59940
|
-
getFieldData(field, col, row) {
|
|
59941
|
-
if (field === null || field === undefined) {
|
|
59942
|
-
return null;
|
|
59943
|
-
}
|
|
59944
|
-
const table = this;
|
|
59945
|
-
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
59946
|
-
return null;
|
|
59947
|
-
}
|
|
59948
|
-
const rowIndex = this.getBodyIndexByRow(row);
|
|
59949
|
-
const colIndex = this.getBodyIndexByCol(col);
|
|
59950
|
-
const dataValue = table.dataSource?.getField(rowIndex, colIndex, col, row, this);
|
|
59951
|
-
if (typeof field !== 'string') {
|
|
59952
|
-
const cellHeaderPaths = table.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
59953
|
-
return getField({ dataValue, ...cellHeaderPaths }, field, col, row, this, emptyFn);
|
|
59954
|
-
}
|
|
59955
|
-
return dataValue;
|
|
59956
|
-
}
|
|
59957
60067
|
getCellValue(col, row) {
|
|
59958
60068
|
const customMergeText = this.getCustomMergeValue(col, row);
|
|
59959
60069
|
if (customMergeText) {
|
|
@@ -60032,6 +60142,39 @@
|
|
|
60032
60142
|
const dataValue = this.records[rowIndex]?.[colIndex];
|
|
60033
60143
|
return dataValue;
|
|
60034
60144
|
}
|
|
60145
|
+
getCellRawValue(col, row) {
|
|
60146
|
+
const table = this;
|
|
60147
|
+
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
60148
|
+
const { title } = table.internalProps.layoutMap.getHeader(col, row);
|
|
60149
|
+
return typeof title === 'function' ? title() : title;
|
|
60150
|
+
}
|
|
60151
|
+
if (this.dataset) {
|
|
60152
|
+
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
60153
|
+
const colKeys = cellDimensionPath.colHeaderPaths.map((colPath) => {
|
|
60154
|
+
return colPath.indicatorKey ?? colPath.value;
|
|
60155
|
+
});
|
|
60156
|
+
const rowKeys = cellDimensionPath.rowHeaderPaths.map((rowPath) => {
|
|
60157
|
+
return rowPath.indicatorKey ?? rowPath.value;
|
|
60158
|
+
});
|
|
60159
|
+
const aggregator = this.dataset.getAggregator(!this.internalProps.layoutMap.indicatorsAsCol ? rowKeys.slice(0, -1) : rowKeys, this.internalProps.layoutMap.indicatorsAsCol ? colKeys.slice(0, -1) : colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row), false);
|
|
60160
|
+
return aggregator.value ? aggregator.value() : undefined;
|
|
60161
|
+
}
|
|
60162
|
+
else if (this.flatDataToObjects) {
|
|
60163
|
+
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
60164
|
+
const colKeys = cellDimensionPath.colHeaderPaths.map((colPath) => {
|
|
60165
|
+
return colPath.indicatorKey ?? colPath.value;
|
|
60166
|
+
});
|
|
60167
|
+
const rowKeys = cellDimensionPath.rowHeaderPaths.map((rowPath) => {
|
|
60168
|
+
return rowPath.indicatorKey ?? rowPath.value;
|
|
60169
|
+
});
|
|
60170
|
+
const treeNode = this.flatDataToObjects.getTreeNode(rowKeys, colKeys, this.internalProps.layoutMap.getBody(col, row).indicatorKey, false);
|
|
60171
|
+
return treeNode?.value;
|
|
60172
|
+
}
|
|
60173
|
+
const rowIndex = this.getBodyIndexByRow(row);
|
|
60174
|
+
const colIndex = this.getBodyIndexByCol(col);
|
|
60175
|
+
const dataValue = this.records[rowIndex]?.[colIndex];
|
|
60176
|
+
return dataValue;
|
|
60177
|
+
}
|
|
60035
60178
|
getCellOriginRecord(col, row) {
|
|
60036
60179
|
const table = this;
|
|
60037
60180
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
@@ -60056,7 +60199,7 @@
|
|
|
60056
60199
|
const rowKeys = cellDimensionPath.rowHeaderPaths.map((rowPath) => {
|
|
60057
60200
|
return rowPath.indicatorKey ?? rowPath.value;
|
|
60058
60201
|
});
|
|
60059
|
-
const treeNode = this.flatDataToObjects.getTreeNode(rowKeys, colKeys, this.internalProps.layoutMap.getBody(col, row).indicatorKey);
|
|
60202
|
+
const treeNode = this.flatDataToObjects.getTreeNode(rowKeys, colKeys, this.internalProps.layoutMap.getBody(col, row).indicatorKey, false);
|
|
60060
60203
|
return treeNode?.record;
|
|
60061
60204
|
}
|
|
60062
60205
|
const rowIndex = this.getBodyIndexByRow(row);
|
|
@@ -60064,6 +60207,9 @@
|
|
|
60064
60207
|
const dataValue = this.records[rowIndex]?.[colIndex];
|
|
60065
60208
|
return dataValue;
|
|
60066
60209
|
}
|
|
60210
|
+
getCellRawRecord(col, row) {
|
|
60211
|
+
return this.getCellOriginRecord(col, row);
|
|
60212
|
+
}
|
|
60067
60213
|
updateSortRules(sortRules) {
|
|
60068
60214
|
this.internalProps.dataConfig.sortRules = sortRules;
|
|
60069
60215
|
this.dataset.updateSortRules(sortRules);
|
|
@@ -60184,7 +60330,7 @@
|
|
|
60184
60330
|
const layoutMap = this.internalProps.layoutMap;
|
|
60185
60331
|
return layoutMap.getLayoutRowTreeCount();
|
|
60186
60332
|
}
|
|
60187
|
-
|
|
60333
|
+
_hasHierarchyTreeHeader() {
|
|
60188
60334
|
return this.internalProps.layoutMap.rowHierarchyType === 'tree';
|
|
60189
60335
|
}
|
|
60190
60336
|
getMenuInfo(col, row, type) {
|
|
@@ -60231,6 +60377,84 @@
|
|
|
60231
60377
|
this.scenegraph.resize();
|
|
60232
60378
|
}
|
|
60233
60379
|
}
|
|
60380
|
+
getEditor(col, row) {
|
|
60381
|
+
const define = this.getBodyColumnDefine(col, row);
|
|
60382
|
+
let editorDefine = define?.editor ?? this.options.editor;
|
|
60383
|
+
if (typeof editorDefine === 'function') {
|
|
60384
|
+
const arg = {
|
|
60385
|
+
col,
|
|
60386
|
+
row,
|
|
60387
|
+
dataValue: this.getCellOriginValue(col, row),
|
|
60388
|
+
value: this.getCellValue(col, row) || '',
|
|
60389
|
+
table: this
|
|
60390
|
+
};
|
|
60391
|
+
editorDefine = editorDefine(arg);
|
|
60392
|
+
}
|
|
60393
|
+
if (typeof editorDefine === 'string') {
|
|
60394
|
+
return get(editorDefine);
|
|
60395
|
+
}
|
|
60396
|
+
return editorDefine;
|
|
60397
|
+
}
|
|
60398
|
+
changeCellValue(col, row, value) {
|
|
60399
|
+
let newValue = value;
|
|
60400
|
+
const rawValue = this.getCellRawValue(col, row);
|
|
60401
|
+
if (typeof rawValue === 'number' && isAllDigits(value)) {
|
|
60402
|
+
newValue = parseFloat(value);
|
|
60403
|
+
}
|
|
60404
|
+
if (this.dataset) {
|
|
60405
|
+
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
60406
|
+
const colKeys = cellDimensionPath.colHeaderPaths.map((colPath) => {
|
|
60407
|
+
return colPath.indicatorKey ?? colPath.value;
|
|
60408
|
+
});
|
|
60409
|
+
const rowKeys = cellDimensionPath.rowHeaderPaths.map((rowPath) => {
|
|
60410
|
+
return rowPath.indicatorKey ?? rowPath.value;
|
|
60411
|
+
});
|
|
60412
|
+
this.dataset.changeTreeNodeValue(!this.internalProps.layoutMap.indicatorsAsCol ? rowKeys.slice(0, -1) : rowKeys, this.internalProps.layoutMap.indicatorsAsCol ? colKeys.slice(0, -1) : colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row), newValue);
|
|
60413
|
+
}
|
|
60414
|
+
else if (this.flatDataToObjects) {
|
|
60415
|
+
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
60416
|
+
const colKeys = cellDimensionPath.colHeaderPaths.map((colPath) => {
|
|
60417
|
+
return colPath.indicatorKey ?? colPath.value;
|
|
60418
|
+
});
|
|
60419
|
+
const rowKeys = cellDimensionPath.rowHeaderPaths.map((rowPath) => {
|
|
60420
|
+
return rowPath.indicatorKey ?? rowPath.value;
|
|
60421
|
+
});
|
|
60422
|
+
this.flatDataToObjects.changeTreeNodeValue(rowKeys, colKeys, this.internalProps.layoutMap.getBody(col, row).indicatorKey, newValue);
|
|
60423
|
+
}
|
|
60424
|
+
else {
|
|
60425
|
+
const rowIndex = this.getBodyIndexByRow(row);
|
|
60426
|
+
const colIndex = this.getBodyIndexByCol(col);
|
|
60427
|
+
this.records[rowIndex][colIndex] = newValue;
|
|
60428
|
+
}
|
|
60429
|
+
this.scenegraph.updateCellContent(col, row);
|
|
60430
|
+
if (this.widthMode === 'adaptive' || (this.autoFillWidth && this.getAllColsWidth() <= this.tableNoFrameWidth)) {
|
|
60431
|
+
if (this.internalProps._widthResizedColMap.size === 0) {
|
|
60432
|
+
this.scenegraph.recalculateColWidths();
|
|
60433
|
+
}
|
|
60434
|
+
}
|
|
60435
|
+
else if (!this.internalProps._widthResizedColMap.has(col)) {
|
|
60436
|
+
const oldWidth = this.getColWidth(col);
|
|
60437
|
+
const newWidth = computeColWidth(col, 0, this.rowCount - 1, this, false);
|
|
60438
|
+
if (newWidth !== oldWidth) {
|
|
60439
|
+
this.scenegraph.updateColWidth(col, newWidth - oldWidth);
|
|
60440
|
+
}
|
|
60441
|
+
}
|
|
60442
|
+
if (this.heightMode === 'adaptive' || (this.autoFillHeight && this.getAllRowsHeight() <= this.tableNoFrameHeight)) {
|
|
60443
|
+
this.scenegraph.recalculateRowHeights();
|
|
60444
|
+
}
|
|
60445
|
+
else if (this.heightMode === 'autoHeight') {
|
|
60446
|
+
const oldHeight = this.getRowHeight(row);
|
|
60447
|
+
const newHeight = computeRowHeight(row, 0, this.colCount - 1, this);
|
|
60448
|
+
this.scenegraph.updateRowHeight(row, newHeight - oldHeight);
|
|
60449
|
+
}
|
|
60450
|
+
this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
|
|
60451
|
+
col,
|
|
60452
|
+
row,
|
|
60453
|
+
rawValue: this.getCellRawValue(col, row),
|
|
60454
|
+
changedValue: newValue
|
|
60455
|
+
});
|
|
60456
|
+
this.scenegraph.updateNextFrame();
|
|
60457
|
+
}
|
|
60234
60458
|
}
|
|
60235
60459
|
|
|
60236
60460
|
class PivotChart extends BaseTable {
|
|
@@ -60468,23 +60692,6 @@
|
|
|
60468
60692
|
const { layoutMap } = this.internalProps;
|
|
60469
60693
|
return layoutMap.getBodyIndexByCol(col);
|
|
60470
60694
|
}
|
|
60471
|
-
getFieldData(field, col, row) {
|
|
60472
|
-
if (field === null || field === undefined) {
|
|
60473
|
-
return null;
|
|
60474
|
-
}
|
|
60475
|
-
const table = this;
|
|
60476
|
-
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
60477
|
-
return null;
|
|
60478
|
-
}
|
|
60479
|
-
const rowIndex = this.getBodyIndexByRow(row);
|
|
60480
|
-
const colIndex = this.getBodyIndexByCol(col);
|
|
60481
|
-
const dataValue = table.dataSource?.getField(rowIndex, colIndex, col, row, this);
|
|
60482
|
-
if (typeof field !== 'string') {
|
|
60483
|
-
const cellHeaderPaths = table.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
60484
|
-
return getField({ dataValue, ...cellHeaderPaths }, field, col, row, this, emptyFn);
|
|
60485
|
-
}
|
|
60486
|
-
return dataValue;
|
|
60487
|
-
}
|
|
60488
60695
|
getCellValue(col, row) {
|
|
60489
60696
|
const customMergeText = this.getCustomMergeValue(col, row);
|
|
60490
60697
|
if (customMergeText) {
|
|
@@ -60505,8 +60712,16 @@
|
|
|
60505
60712
|
const aggregator = this.dataset.getAggregator(!this.internalProps.layoutMap.indicatorsAsCol ? rowKeys.slice(0, -1) : rowKeys, this.internalProps.layoutMap.indicatorsAsCol ? colKeys.slice(0, -1) : colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row));
|
|
60506
60713
|
return aggregator.value ? aggregator.value() : undefined;
|
|
60507
60714
|
}
|
|
60508
|
-
const {
|
|
60509
|
-
|
|
60715
|
+
const { fieldFormat } = this.internalProps.layoutMap.getBody(col, row);
|
|
60716
|
+
const rowIndex = this.getBodyIndexByRow(row);
|
|
60717
|
+
const colIndex = this.getBodyIndexByCol(col);
|
|
60718
|
+
const dataValue = this.records[rowIndex]?.[colIndex];
|
|
60719
|
+
const cellHeaderPaths = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
60720
|
+
if (typeof fieldFormat === 'function') {
|
|
60721
|
+
const fieldResult = fieldFormat({ dataValue, ...cellHeaderPaths }, col, row, this);
|
|
60722
|
+
return fieldResult;
|
|
60723
|
+
}
|
|
60724
|
+
return dataValue;
|
|
60510
60725
|
}
|
|
60511
60726
|
getCellOriginValue(col, row) {
|
|
60512
60727
|
const table = this;
|
|
@@ -60525,8 +60740,13 @@
|
|
|
60525
60740
|
const aggregator = this.dataset.getAggregator(!this.internalProps.layoutMap.indicatorsAsCol ? rowKeys.slice(0, -1) : rowKeys, this.internalProps.layoutMap.indicatorsAsCol ? colKeys.slice(0, -1) : colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row));
|
|
60526
60741
|
return aggregator.value ? aggregator.value() : undefined;
|
|
60527
60742
|
}
|
|
60528
|
-
const
|
|
60529
|
-
|
|
60743
|
+
const rowIndex = this.getBodyIndexByRow(row);
|
|
60744
|
+
const colIndex = this.getBodyIndexByCol(col);
|
|
60745
|
+
const dataValue = this.records[rowIndex]?.[colIndex];
|
|
60746
|
+
return dataValue;
|
|
60747
|
+
}
|
|
60748
|
+
getCellRawValue(col, row) {
|
|
60749
|
+
return this.getCellOriginValue(col, row);
|
|
60530
60750
|
}
|
|
60531
60751
|
getCellOriginRecord(col, row) {
|
|
60532
60752
|
const table = this;
|
|
@@ -60546,6 +60766,9 @@
|
|
|
60546
60766
|
}
|
|
60547
60767
|
return undefined;
|
|
60548
60768
|
}
|
|
60769
|
+
getCellRawRecord(col, row) {
|
|
60770
|
+
return this.getCellOriginRecord(col, row);
|
|
60771
|
+
}
|
|
60549
60772
|
updateSortRules(sortRules) {
|
|
60550
60773
|
this.internalProps.dataConfig.sortRules = sortRules;
|
|
60551
60774
|
this.dataset.updateSortRules(sortRules);
|
|
@@ -60656,7 +60879,7 @@
|
|
|
60656
60879
|
getHierarchyState(col, row) {
|
|
60657
60880
|
return this._getHeaderLayoutMap(col, row)?.hierarchyState;
|
|
60658
60881
|
}
|
|
60659
|
-
|
|
60882
|
+
_hasHierarchyTreeHeader() {
|
|
60660
60883
|
return this.internalProps.layoutMap.rowHierarchyType === 'tree';
|
|
60661
60884
|
}
|
|
60662
60885
|
getMenuInfo(col, row, type) {
|
|
@@ -61550,7 +61773,7 @@
|
|
|
61550
61773
|
return new Tag$1(params ? params.attribute : {});
|
|
61551
61774
|
}
|
|
61552
61775
|
|
|
61553
|
-
const version = "0.15.
|
|
61776
|
+
const version = "0.15.3";
|
|
61554
61777
|
function getIcons() {
|
|
61555
61778
|
return get$2();
|
|
61556
61779
|
}
|