@visactor/vtable 0.13.1-alpha.0 → 0.13.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +5 -1
- package/cjs/ListTable.js +27 -7
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +6 -2
- package/cjs/PivotChart.js +33 -25
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +6 -2
- package/cjs/PivotTable.js +12 -8
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +7 -2
- package/cjs/core/BaseTable.js +13 -6
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/data/CachedDataSource.d.ts +2 -1
- package/cjs/data/CachedDataSource.js +2 -2
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/data/DataSource.d.ts +5 -3
- package/cjs/data/DataSource.js +11 -8
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/statistics-helper.d.ts +2 -1
- package/cjs/dataset/statistics-helper.js +2 -2
- package/cjs/dataset/statistics-helper.js.map +1 -1
- package/cjs/event/listener/table-group.js +11 -1
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/header-helper/header-helper.d.ts +2 -2
- package/cjs/header-helper/header-helper.js +4 -1
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/header-helper/style/CheckboxStyle.d.ts +7 -0
- package/cjs/header-helper/style/CheckboxStyle.js +24 -0
- package/cjs/header-helper/style/CheckboxStyle.js.map +1 -0
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +3 -2
- package/cjs/layout/pivot-header-layout.js +4 -3
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +1 -1
- package/cjs/layout/simple-header-layout.js +1 -1
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/custom.d.ts +0 -1
- package/cjs/scenegraph/component/custom.js +2 -14
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +3 -2
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +31 -17
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +1 -0
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/sort-horizontal.js +8 -5
- package/cjs/scenegraph/group-creater/progress/update-position/sort-horizontal.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js +17 -2
- package/cjs/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +4 -5
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +2 -3
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +2 -0
- package/cjs/scenegraph/scenegraph.js +36 -4
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/get-hierarchy-offset.js +1 -1
- package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
- package/cjs/state/state.d.ts +10 -0
- package/cjs/state/state.js +83 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/BRIGHT.js +2 -1
- package/cjs/themes/DARK.js +1 -2
- package/cjs/tools/get-data-path/index.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +6 -2
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/type.d.ts +1 -1
- package/cjs/ts-types/column/type.js.map +1 -1
- package/cjs/ts-types/icon.d.ts +2 -1
- package/cjs/ts-types/icon.js.map +1 -1
- package/cjs/ts-types/list-table/define/Composite-define.d.ts +2 -0
- package/cjs/ts-types/list-table/define/Composite-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/checkbox-define.d.ts +7 -1
- package/cjs/ts-types/list-table/define/checkbox-define.js.map +1 -1
- package/cjs/ts-types/list-table/define/index.d.ts +2 -2
- package/cjs/ts-types/list-table/define/index.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +2 -2
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +2 -2
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +924 -265
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +5 -1
- package/es/ListTable.js +27 -7
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +6 -2
- package/es/PivotChart.js +33 -25
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +6 -2
- package/es/PivotTable.js +12 -8
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +7 -2
- package/es/core/BaseTable.js +13 -6
- package/es/core/BaseTable.js.map +1 -1
- package/es/data/CachedDataSource.d.ts +2 -1
- package/es/data/CachedDataSource.js +2 -2
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/data/DataSource.d.ts +5 -3
- package/es/data/DataSource.js +11 -8
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/statistics-helper.d.ts +2 -1
- package/es/dataset/statistics-helper.js +2 -2
- package/es/dataset/statistics-helper.js.map +1 -1
- package/es/event/listener/table-group.js +11 -1
- package/es/event/listener/table-group.js.map +1 -1
- package/es/header-helper/header-helper.d.ts +2 -2
- package/es/header-helper/header-helper.js +5 -0
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/header-helper/style/CheckboxStyle.d.ts +7 -0
- package/es/header-helper/style/CheckboxStyle.js +16 -0
- package/es/header-helper/style/CheckboxStyle.js.map +1 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +3 -2
- package/es/layout/pivot-header-layout.js +4 -3
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +1 -1
- package/es/layout/simple-header-layout.js +1 -1
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/component/custom.d.ts +0 -1
- package/es/scenegraph/component/custom.js +0 -12
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +3 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +30 -15
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +1 -0
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/sort-horizontal.js +8 -5
- package/es/scenegraph/group-creater/progress/update-position/sort-horizontal.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js +17 -2
- package/es/scenegraph/group-creater/progress/update-position/sort-vertical.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +3 -6
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +1 -4
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +2 -0
- package/es/scenegraph/scenegraph.js +36 -4
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/get-hierarchy-offset.js +1 -1
- package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
- package/es/state/state.d.ts +10 -0
- package/es/state/state.js +84 -2
- package/es/state/state.js.map +1 -1
- package/es/themes/BRIGHT.js +2 -1
- package/es/themes/DARK.js +1 -2
- package/es/tools/get-data-path/index.js.map +1 -1
- package/es/ts-types/base-table.d.ts +6 -2
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/type.d.ts +1 -1
- package/es/ts-types/column/type.js.map +1 -1
- package/es/ts-types/icon.d.ts +2 -1
- package/es/ts-types/icon.js.map +1 -1
- package/es/ts-types/list-table/define/Composite-define.d.ts +2 -0
- package/es/ts-types/list-table/define/Composite-define.js.map +1 -1
- package/es/ts-types/list-table/define/checkbox-define.d.ts +7 -1
- package/es/ts-types/list-table/define/checkbox-define.js.map +1 -1
- package/es/ts-types/list-table/define/index.d.ts +2 -2
- package/es/ts-types/list-table/define/index.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +2 -2
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +2 -2
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +7 -5
package/dist/vtable.js
CHANGED
|
@@ -738,6 +738,87 @@
|
|
|
738
738
|
};
|
|
739
739
|
var clampRange$1 = clampRange;
|
|
740
740
|
|
|
741
|
+
let hasRaf = !1;
|
|
742
|
+
try {
|
|
743
|
+
hasRaf = "function" == typeof requestAnimationFrame && "function" == typeof cancelAnimationFrame;
|
|
744
|
+
} catch (err) {
|
|
745
|
+
hasRaf = !1;
|
|
746
|
+
}
|
|
747
|
+
function debounce$1(func, wait, options) {
|
|
748
|
+
let lastArgs,
|
|
749
|
+
lastThis,
|
|
750
|
+
maxWait,
|
|
751
|
+
result,
|
|
752
|
+
timerId,
|
|
753
|
+
lastCallTime,
|
|
754
|
+
lastInvokeTime = 0,
|
|
755
|
+
leading = !1,
|
|
756
|
+
maxing = !1,
|
|
757
|
+
trailing = !0;
|
|
758
|
+
const useRAF = !wait && 0 !== wait && hasRaf;
|
|
759
|
+
if ("function" != typeof func) throw new TypeError("Expected a function");
|
|
760
|
+
function invokeFunc(time) {
|
|
761
|
+
const args = lastArgs,
|
|
762
|
+
thisArg = lastThis;
|
|
763
|
+
return lastArgs = lastThis = void 0, lastInvokeTime = time, result = func.apply(thisArg, args), result;
|
|
764
|
+
}
|
|
765
|
+
function startTimer(pendingFunc, wait) {
|
|
766
|
+
return useRAF ? (cancelAnimationFrame(timerId), requestAnimationFrame(pendingFunc)) : setTimeout(pendingFunc, wait);
|
|
767
|
+
}
|
|
768
|
+
function shouldInvoke(time) {
|
|
769
|
+
const timeSinceLastCall = time - lastCallTime;
|
|
770
|
+
return void 0 === lastCallTime || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && time - lastInvokeTime >= maxWait;
|
|
771
|
+
}
|
|
772
|
+
function timerExpired() {
|
|
773
|
+
const time = Date.now();
|
|
774
|
+
if (shouldInvoke(time)) return trailingEdge(time);
|
|
775
|
+
timerId = startTimer(timerExpired, function (time) {
|
|
776
|
+
const timeSinceLastInvoke = time - lastInvokeTime,
|
|
777
|
+
timeWaiting = wait - (time - lastCallTime);
|
|
778
|
+
return maxing ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
779
|
+
}(time));
|
|
780
|
+
}
|
|
781
|
+
function trailingEdge(time) {
|
|
782
|
+
return timerId = void 0, trailing && lastArgs ? invokeFunc(time) : (lastArgs = lastThis = void 0, result);
|
|
783
|
+
}
|
|
784
|
+
function debounced() {
|
|
785
|
+
const time = Date.now(),
|
|
786
|
+
isInvoking = shouldInvoke(time);
|
|
787
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
788
|
+
args[_key] = arguments[_key];
|
|
789
|
+
}
|
|
790
|
+
if (lastArgs = args, lastThis = this, lastCallTime = time, isInvoking) {
|
|
791
|
+
if (void 0 === timerId) return function (time) {
|
|
792
|
+
return lastInvokeTime = time, timerId = startTimer(timerExpired, wait), leading ? invokeFunc(time) : result;
|
|
793
|
+
}(lastCallTime);
|
|
794
|
+
if (maxing) return timerId = startTimer(timerExpired, wait), invokeFunc(lastCallTime);
|
|
795
|
+
}
|
|
796
|
+
return void 0 === timerId && (timerId = startTimer(timerExpired, wait)), result;
|
|
797
|
+
}
|
|
798
|
+
return wait = +wait || 0, isObject$4(options) && (leading = !!options.leading, maxing = "maxWait" in options, maxing && (maxWait = Math.max(isValidNumber$1(options.maxWait) ? options.maxWait : 0, wait)), trailing = "trailing" in options ? !!options.trailing : trailing), debounced.cancel = function () {
|
|
799
|
+
void 0 !== timerId && function (id) {
|
|
800
|
+
if (useRAF) return cancelAnimationFrame(id);
|
|
801
|
+
clearTimeout(id);
|
|
802
|
+
}(timerId), lastInvokeTime = 0, lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
803
|
+
}, debounced.flush = function () {
|
|
804
|
+
return void 0 === timerId ? result : trailingEdge(Date.now());
|
|
805
|
+
}, debounced.pending = function () {
|
|
806
|
+
return void 0 !== timerId;
|
|
807
|
+
}, debounced;
|
|
808
|
+
}
|
|
809
|
+
hasRaf = !1;
|
|
810
|
+
|
|
811
|
+
function throttle$1(func, wait, options) {
|
|
812
|
+
let leading = !0,
|
|
813
|
+
trailing = !0;
|
|
814
|
+
if ("function" != typeof func) throw new TypeError("Expected a function");
|
|
815
|
+
return isObject$4(options) && (leading = "leading" in options ? !!options.leading : leading, trailing = "trailing" in options ? !!options.trailing : trailing), debounce$1(func, wait, {
|
|
816
|
+
leading: leading,
|
|
817
|
+
trailing: trailing,
|
|
818
|
+
maxWait: wait
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
|
|
741
822
|
const epsilon = 1e-12;
|
|
742
823
|
const pi = Math.PI;
|
|
743
824
|
const halfPi$1 = pi / 2;
|
|
@@ -1979,7 +2060,7 @@
|
|
|
1979
2060
|
}
|
|
1980
2061
|
};
|
|
1981
2062
|
|
|
1982
|
-
let defaultStyle$
|
|
2063
|
+
let defaultStyle$8;
|
|
1983
2064
|
const STYLE_EVENT_TYPE = {
|
|
1984
2065
|
CHANGE_STYLE: 'change_style'
|
|
1985
2066
|
};
|
|
@@ -2014,7 +2095,7 @@
|
|
|
2014
2095
|
return STYLE_EVENT_TYPE;
|
|
2015
2096
|
}
|
|
2016
2097
|
static get DEFAULT() {
|
|
2017
|
-
return defaultStyle$
|
|
2098
|
+
return defaultStyle$8 ? defaultStyle$8 : (defaultStyle$8 = new Style());
|
|
2018
2099
|
}
|
|
2019
2100
|
constructor(style = {}, bodyStyle = {}) {
|
|
2020
2101
|
super();
|
|
@@ -2199,10 +2280,10 @@
|
|
|
2199
2280
|
}
|
|
2200
2281
|
};
|
|
2201
2282
|
|
|
2202
|
-
let defaultStyle$
|
|
2283
|
+
let defaultStyle$7;
|
|
2203
2284
|
let ImageStyle$1 = class ImageStyle extends Style$1 {
|
|
2204
2285
|
static get DEFAULT() {
|
|
2205
|
-
return defaultStyle$
|
|
2286
|
+
return defaultStyle$7 ? defaultStyle$7 : (defaultStyle$7 = new ImageStyle());
|
|
2206
2287
|
}
|
|
2207
2288
|
constructor(style = {}, bodyStyle = {}) {
|
|
2208
2289
|
super(style, bodyStyle);
|
|
@@ -2212,12 +2293,12 @@
|
|
|
2212
2293
|
}
|
|
2213
2294
|
};
|
|
2214
2295
|
|
|
2215
|
-
let defaultStyle$
|
|
2296
|
+
let defaultStyle$6;
|
|
2216
2297
|
class TextStyle extends Style$1 {
|
|
2217
2298
|
_autoWrapText;
|
|
2218
2299
|
_lineClamp;
|
|
2219
2300
|
static get DEFAULT() {
|
|
2220
|
-
return defaultStyle$
|
|
2301
|
+
return defaultStyle$6 ? defaultStyle$6 : (defaultStyle$6 = new TextStyle());
|
|
2221
2302
|
}
|
|
2222
2303
|
constructor(style = {}, bodyStyle = {}) {
|
|
2223
2304
|
super(style, bodyStyle);
|
|
@@ -2260,7 +2341,7 @@
|
|
|
2260
2341
|
return StyleClassDef.DEFAULT;
|
|
2261
2342
|
}
|
|
2262
2343
|
|
|
2263
|
-
let defaultStyle$
|
|
2344
|
+
let defaultStyle$5;
|
|
2264
2345
|
const EVENT_TYPE$1 = {
|
|
2265
2346
|
CHANGE_STYLE: 'change_style'
|
|
2266
2347
|
};
|
|
@@ -2295,7 +2376,7 @@
|
|
|
2295
2376
|
return EVENT_TYPE$1;
|
|
2296
2377
|
}
|
|
2297
2378
|
static get DEFAULT() {
|
|
2298
|
-
return defaultStyle$
|
|
2379
|
+
return defaultStyle$5 ? defaultStyle$5 : (defaultStyle$5 = new Style());
|
|
2299
2380
|
}
|
|
2300
2381
|
constructor(style = {}, headerStyle = {}) {
|
|
2301
2382
|
super();
|
|
@@ -2480,12 +2561,12 @@
|
|
|
2480
2561
|
}
|
|
2481
2562
|
}
|
|
2482
2563
|
|
|
2483
|
-
let defaultStyle$
|
|
2564
|
+
let defaultStyle$4;
|
|
2484
2565
|
class TextHeaderStyle extends Style {
|
|
2485
2566
|
_autoWrapText;
|
|
2486
2567
|
_lineClamp;
|
|
2487
2568
|
static get DEFAULT() {
|
|
2488
|
-
return defaultStyle$
|
|
2569
|
+
return defaultStyle$4 ? defaultStyle$4 : (defaultStyle$4 = new TextHeaderStyle());
|
|
2489
2570
|
}
|
|
2490
2571
|
constructor(style = {}, headerStyle = null) {
|
|
2491
2572
|
super(style, headerStyle);
|
|
@@ -6313,7 +6394,7 @@
|
|
|
6313
6394
|
const EnvContribution = Symbol.for("EnvContribution");
|
|
6314
6395
|
const VGlobal = Symbol.for("VGlobal");
|
|
6315
6396
|
|
|
6316
|
-
var __decorate$
|
|
6397
|
+
var __decorate$1O = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
6317
6398
|
var d,
|
|
6318
6399
|
c = arguments.length,
|
|
6319
6400
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -6338,18 +6419,33 @@
|
|
|
6338
6419
|
get supportEvent() {
|
|
6339
6420
|
return this._env || this.setEnv("browser"), this.envContribution.supportEvent;
|
|
6340
6421
|
}
|
|
6422
|
+
set supportEvent(support) {
|
|
6423
|
+
this._env || this.setEnv("browser"), this.envContribution.supportEvent = support;
|
|
6424
|
+
}
|
|
6341
6425
|
get supportsTouchEvents() {
|
|
6342
6426
|
return this._env || this.setEnv("browser"), this.envContribution.supportsTouchEvents;
|
|
6343
6427
|
}
|
|
6428
|
+
set supportsTouchEvents(support) {
|
|
6429
|
+
this._env || this.setEnv("browser"), this.envContribution.supportsTouchEvents = support;
|
|
6430
|
+
}
|
|
6344
6431
|
get supportsPointerEvents() {
|
|
6345
6432
|
return this._env || this.setEnv("browser"), this.envContribution.supportsPointerEvents;
|
|
6346
6433
|
}
|
|
6434
|
+
set supportsPointerEvents(support) {
|
|
6435
|
+
this._env || this.setEnv("browser"), this.envContribution.supportsPointerEvents = support;
|
|
6436
|
+
}
|
|
6347
6437
|
get supportsMouseEvents() {
|
|
6348
6438
|
return this._env || this.setEnv("browser"), this.envContribution.supportsMouseEvents;
|
|
6349
6439
|
}
|
|
6440
|
+
set supportsMouseEvents(support) {
|
|
6441
|
+
this._env || this.setEnv("browser"), this.envContribution.supportsMouseEvents = support;
|
|
6442
|
+
}
|
|
6350
6443
|
get applyStyles() {
|
|
6351
6444
|
return this._env || this.setEnv("browser"), this.envContribution.applyStyles;
|
|
6352
6445
|
}
|
|
6446
|
+
set applyStyles(support) {
|
|
6447
|
+
this._env || this.setEnv("browser"), this.envContribution.applyStyles = support;
|
|
6448
|
+
}
|
|
6353
6449
|
constructor(contributions) {
|
|
6354
6450
|
this.contributions = contributions, this.hooks = {
|
|
6355
6451
|
onSetEnv: new SyncHook(["lastEnv", "env", "global"])
|
|
@@ -6465,7 +6561,7 @@
|
|
|
6465
6561
|
return this._env || this.setEnv("browser"), this.envContribution.getElementTopLeft(dom, baseWindow);
|
|
6466
6562
|
}
|
|
6467
6563
|
};
|
|
6468
|
-
DefaultGlobal = __decorate$
|
|
6564
|
+
DefaultGlobal = __decorate$1O([injectable(), __param$T(0, inject(ContributionProvider)), __param$T(0, named(EnvContribution)), __metadata$17("design:paramtypes", [Object])], DefaultGlobal);
|
|
6469
6565
|
|
|
6470
6566
|
const circleThreshold$1 = tau - 1e-8;
|
|
6471
6567
|
let BoundsContext$1 = class BoundsContext {
|
|
@@ -6617,10 +6713,10 @@
|
|
|
6617
6713
|
!function (AnimateStepType) {
|
|
6618
6714
|
AnimateStepType.wait = "wait", AnimateStepType.from = "from", AnimateStepType.to = "to", AnimateStepType.customAnimate = "customAnimate";
|
|
6619
6715
|
}(AnimateStepType$1 || (AnimateStepType$1 = {}));
|
|
6620
|
-
var Direction$
|
|
6716
|
+
var Direction$2;
|
|
6621
6717
|
!function (Direction) {
|
|
6622
6718
|
Direction[Direction.ROW = 1] = "ROW", Direction[Direction.COLUMN = 2] = "COLUMN";
|
|
6623
|
-
}(Direction$
|
|
6719
|
+
}(Direction$2 || (Direction$2 = {}));
|
|
6624
6720
|
var CurveTypeEnum$1;
|
|
6625
6721
|
!function (CurveTypeEnum) {
|
|
6626
6722
|
CurveTypeEnum[CurveTypeEnum.CubicBezierCurve = 0] = "CubicBezierCurve", CurveTypeEnum[CurveTypeEnum.QuadraticBezierCurve = 1] = "QuadraticBezierCurve", CurveTypeEnum[CurveTypeEnum.ArcCurve = 2] = "ArcCurve", CurveTypeEnum[CurveTypeEnum.LineCurve = 3] = "LineCurve", CurveTypeEnum[CurveTypeEnum.EllipseCurve = 4] = "EllipseCurve", CurveTypeEnum[CurveTypeEnum.MoveCurve = 5] = "MoveCurve";
|
|
@@ -6790,7 +6886,7 @@
|
|
|
6790
6886
|
return this._validPoint() ? cubicLength$1(this.p0, this.p1, this.p2, this.p3) : 60;
|
|
6791
6887
|
}
|
|
6792
6888
|
calcProjLength(direction) {
|
|
6793
|
-
return direction === Direction$
|
|
6889
|
+
return direction === Direction$2.ROW ? abs(this.p0.x - this.p3.x) : direction === Direction$2.COLUMN ? abs(this.p0.y - this.p3.y) : 0;
|
|
6794
6890
|
}
|
|
6795
6891
|
getAngleAt(t) {
|
|
6796
6892
|
const minT = max(t - .01, 0),
|
|
@@ -6827,7 +6923,7 @@
|
|
|
6827
6923
|
return this._validPoint() ? PointService.distancePP(this.p0, this.p1) : 60;
|
|
6828
6924
|
}
|
|
6829
6925
|
calcProjLength(direction) {
|
|
6830
|
-
return direction === Direction$
|
|
6926
|
+
return direction === Direction$2.ROW ? abs(this.p0.x - this.p1.x) : direction === Direction$2.COLUMN ? abs(this.p0.y - this.p1.y) : 0;
|
|
6831
6927
|
}
|
|
6832
6928
|
};
|
|
6833
6929
|
|
|
@@ -6884,14 +6980,14 @@
|
|
|
6884
6980
|
}
|
|
6885
6981
|
getLength(direction) {
|
|
6886
6982
|
var _a, _b;
|
|
6887
|
-
if (direction === Direction$
|
|
6983
|
+
if (direction === Direction$2.COLUMN) {
|
|
6888
6984
|
if (!this.curves.length) return 0;
|
|
6889
6985
|
const sc = this.curves[0],
|
|
6890
6986
|
ec = this.curves[this.curves.length - 1],
|
|
6891
6987
|
endP = null !== (_a = ec.p3) && void 0 !== _a ? _a : ec.p1;
|
|
6892
6988
|
return abs(sc.p0.y - endP.y);
|
|
6893
6989
|
}
|
|
6894
|
-
if (direction === Direction$
|
|
6990
|
+
if (direction === Direction$2.ROW) {
|
|
6895
6991
|
if (!this.curves.length) return 0;
|
|
6896
6992
|
const sc = this.curves[0],
|
|
6897
6993
|
ec = this.curves[this.curves.length - 1],
|
|
@@ -6962,7 +7058,7 @@
|
|
|
6962
7058
|
startPoint: startPoint
|
|
6963
7059
|
} = params;
|
|
6964
7060
|
if (points.length < 2 - Number(!!startPoint)) return null;
|
|
6965
|
-
const segContext = new SegContext$1("linear", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$
|
|
7061
|
+
const segContext = new SegContext$1("linear", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
|
|
6966
7062
|
return genLinearTypeSegments$1(new Linear$1(segContext, startPoint), points), segContext;
|
|
6967
7063
|
}
|
|
6968
7064
|
function genLinearTypeSegments$1(path, points) {
|
|
@@ -7019,7 +7115,7 @@
|
|
|
7019
7115
|
} = params;
|
|
7020
7116
|
if (points.length < 2 - Number(!!startPoint)) return null;
|
|
7021
7117
|
if (points.length < 3 - Number(!!startPoint)) return genLinearSegments$1(points, params);
|
|
7022
|
-
const segContext = new SegContext$1("basis", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$
|
|
7118
|
+
const segContext = new SegContext$1("basis", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
|
|
7023
7119
|
return genBasisTypeSegments$1(new Basis$1(segContext, startPoint), points), segContext;
|
|
7024
7120
|
}
|
|
7025
7121
|
|
|
@@ -7062,10 +7158,10 @@
|
|
|
7062
7158
|
lineEnd() {
|
|
7063
7159
|
switch (this._point) {
|
|
7064
7160
|
case 2:
|
|
7065
|
-
this.context.lineTo(this._x1, this._y1, !1 !== this._lastDefined2, this.lastPoint1);
|
|
7161
|
+
this.context.lineTo(this._x1, this._y1, !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
|
|
7066
7162
|
break;
|
|
7067
7163
|
case 3:
|
|
7068
|
-
point$4(this, this._t0, slope2$1(this, this._t0), !1 !== this._lastDefined2, this.lastPoint1);
|
|
7164
|
+
point$4(this, this._t0, slope2$1(this, this._t0), !1 !== this._lastDefined1 && !1 !== this._lastDefined2, this.lastPoint1);
|
|
7069
7165
|
}
|
|
7070
7166
|
(this._line || 0 !== this._line && 1 === this._point) && this.context.closePath(), this._line = 1 - this._line;
|
|
7071
7167
|
}
|
|
@@ -7117,7 +7213,7 @@
|
|
|
7117
7213
|
} = params;
|
|
7118
7214
|
if (points.length < 2 - Number(!!startPoint)) return null;
|
|
7119
7215
|
if (points.length < 3 - Number(!!startPoint)) return genLinearSegments$1(points, params);
|
|
7120
|
-
const segContext = new SegContext$1("monotoneX", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$
|
|
7216
|
+
const segContext = new SegContext$1("monotoneX", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
|
|
7121
7217
|
return genMonotpneXTypeSegments$1(new MonotoneX$1(segContext, startPoint), points), segContext;
|
|
7122
7218
|
}
|
|
7123
7219
|
function genMonotpneYTypeSegments$1(path, points) {
|
|
@@ -7131,7 +7227,7 @@
|
|
|
7131
7227
|
} = params;
|
|
7132
7228
|
if (points.length < 2 - Number(!!startPoint)) return null;
|
|
7133
7229
|
if (points.length < 3 - Number(!!startPoint)) return genLinearSegments$1(points, params);
|
|
7134
|
-
const segContext = new ReflectSegContext$1("monotoneY", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$
|
|
7230
|
+
const segContext = new ReflectSegContext$1("monotoneY", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
|
|
7135
7231
|
return genMonotpneYTypeSegments$1(new MonotoneY$1(segContext, startPoint), points), segContext;
|
|
7136
7232
|
}
|
|
7137
7233
|
|
|
@@ -7181,7 +7277,7 @@
|
|
|
7181
7277
|
startPoint: startPoint
|
|
7182
7278
|
} = params;
|
|
7183
7279
|
if (points.length < 2 - Number(!!startPoint)) return null;
|
|
7184
|
-
const segContext = new SegContext$1("step", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$
|
|
7280
|
+
const segContext = new SegContext$1("step", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
|
|
7185
7281
|
return genStepTypeSegments$1(new Step$3(segContext, t, startPoint), points), segContext;
|
|
7186
7282
|
}
|
|
7187
7283
|
function genStepTypeSegments$1(path, points) {
|
|
@@ -7229,7 +7325,7 @@
|
|
|
7229
7325
|
startPoint: startPoint
|
|
7230
7326
|
} = params;
|
|
7231
7327
|
if (points.length < 2 - Number(!!startPoint)) return null;
|
|
7232
|
-
const segContext = new SegContext$1("linear", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$
|
|
7328
|
+
const segContext = new SegContext$1("linear", null != direction ? direction : abs(points[points.length - 1].x - points[0].x) > abs(points[points.length - 1].y - points[0].y) ? Direction$2.ROW : Direction$2.COLUMN);
|
|
7233
7329
|
return genLinearClosedTypeSegments$1(new LinearClosed$1(segContext, startPoint), points), segContext;
|
|
7234
7330
|
}
|
|
7235
7331
|
function genLinearClosedTypeSegments$1(path, points) {
|
|
@@ -7328,7 +7424,7 @@
|
|
|
7328
7424
|
} = line.attribute;
|
|
7329
7425
|
if (!points) return;
|
|
7330
7426
|
const cache = calcLineCache$2(points, curveType);
|
|
7331
|
-
"x" === clipRangeByDimension ? this.direction = Direction$
|
|
7427
|
+
"x" === clipRangeByDimension ? this.direction = Direction$2.ROW : "y" === clipRangeByDimension ? this.direction = Direction$2.COLUMN : "auto" === clipRangeByDimension && (this.direction = cache.direction), this.curves = cache.curves;
|
|
7332
7428
|
}
|
|
7333
7429
|
fromCustomPath2D(path, x, y, sX, sY) {
|
|
7334
7430
|
return this.clear(), this._runCommandList(path.commandList, x, y, sX, sY), this._updateBounds(), this;
|
|
@@ -7490,13 +7586,13 @@
|
|
|
7490
7586
|
this.commandList = [], this._boundsContext = null, this._ctx = null;
|
|
7491
7587
|
}
|
|
7492
7588
|
getLength() {
|
|
7493
|
-
if (this.direction === Direction$
|
|
7589
|
+
if (this.direction === Direction$2.COLUMN) {
|
|
7494
7590
|
if (!this.curves.length) return 0;
|
|
7495
7591
|
const sc = this.curves[0],
|
|
7496
7592
|
ec = this.curves[this.curves.length - 1];
|
|
7497
7593
|
return abs(sc.p0.y - ec.p1.y);
|
|
7498
7594
|
}
|
|
7499
|
-
if (this.direction === Direction$
|
|
7595
|
+
if (this.direction === Direction$2.ROW) {
|
|
7500
7596
|
if (!this.curves.length) return 0;
|
|
7501
7597
|
const sc = this.curves[0],
|
|
7502
7598
|
ec = this.curves[this.curves.length - 1];
|
|
@@ -7881,7 +7977,7 @@
|
|
|
7881
7977
|
return "number" != typeof measurement.actualBoundingBoxAscent || "number" != typeof measurement.actualBoundingBoxDescent ? (result.width = Math.floor(measurement.width), result.height = character.fontSize || 0, result.ascent = result.height, result.descent = 0) : (result.width = Math.floor(measurement.width), result.height = Math.floor(measurement.actualBoundingBoxAscent + measurement.actualBoundingBoxDescent), result.ascent = Math.floor(measurement.actualBoundingBoxAscent), result.descent = result.height - result.ascent), result;
|
|
7882
7978
|
}
|
|
7883
7979
|
|
|
7884
|
-
var __decorate$
|
|
7980
|
+
var __decorate$1N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
7885
7981
|
var d,
|
|
7886
7982
|
c = arguments.length,
|
|
7887
7983
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -8061,9 +8157,9 @@
|
|
|
8061
8157
|
return data.str += suffix, data.width += suffixWidth, data;
|
|
8062
8158
|
}
|
|
8063
8159
|
};
|
|
8064
|
-
ATextMeasure = __decorate$
|
|
8160
|
+
ATextMeasure = __decorate$1N([injectable()], ATextMeasure);
|
|
8065
8161
|
|
|
8066
|
-
var __decorate$
|
|
8162
|
+
var __decorate$1M = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
8067
8163
|
var d,
|
|
8068
8164
|
c = arguments.length,
|
|
8069
8165
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -8072,7 +8168,7 @@
|
|
|
8072
8168
|
};
|
|
8073
8169
|
const TextMeasureContribution = Symbol.for("TextMeasureContribution");
|
|
8074
8170
|
let DefaultTextMeasureContribution = class extends ATextMeasure {};
|
|
8075
|
-
DefaultTextMeasureContribution = __decorate$
|
|
8171
|
+
DefaultTextMeasureContribution = __decorate$1M([injectable()], DefaultTextMeasureContribution);
|
|
8076
8172
|
|
|
8077
8173
|
const container = new Container$2();
|
|
8078
8174
|
|
|
@@ -8444,7 +8540,7 @@
|
|
|
8444
8540
|
return containPath(commands, lineWidth, !0, x, y);
|
|
8445
8541
|
}
|
|
8446
8542
|
|
|
8447
|
-
var __decorate$
|
|
8543
|
+
var __decorate$1L = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
8448
8544
|
var d,
|
|
8449
8545
|
c = arguments.length,
|
|
8450
8546
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -8507,7 +8603,7 @@
|
|
|
8507
8603
|
}, null != option ? option : {}), textSpec);
|
|
8508
8604
|
}
|
|
8509
8605
|
};
|
|
8510
|
-
DefaultGraphicUtil = __decorate$
|
|
8606
|
+
DefaultGraphicUtil = __decorate$1L([injectable(), __param$S(0, inject(ContributionProvider)), __param$S(0, named(TextMeasureContribution)), __param$S(1, inject(VGlobal)), __metadata$16("design:paramtypes", [Object, Object])], DefaultGraphicUtil);
|
|
8511
8607
|
var TransformMode;
|
|
8512
8608
|
!function (TransformMode) {
|
|
8513
8609
|
TransformMode[TransformMode.transform = 0] = "transform", TransformMode[TransformMode.matrix = 1] = "matrix";
|
|
@@ -8565,7 +8661,7 @@
|
|
|
8565
8661
|
return this;
|
|
8566
8662
|
}
|
|
8567
8663
|
};
|
|
8568
|
-
DefaultTransformUtil = __decorate$
|
|
8664
|
+
DefaultTransformUtil = __decorate$1L([injectable(), __metadata$16("design:paramtypes", [])], DefaultTransformUtil);
|
|
8569
8665
|
|
|
8570
8666
|
const defaultThemeObj$1 = {
|
|
8571
8667
|
arc: DefaultArcAttribute$1,
|
|
@@ -9293,14 +9389,14 @@
|
|
|
9293
9389
|
e.propagationStopped = !1, e.propagationImmediatelyStopped = !1, this.propagate(e, type), this.dispatch.emit(type || e.type, e);
|
|
9294
9390
|
}
|
|
9295
9391
|
mapEvent(e) {
|
|
9296
|
-
var _a, _b, _c, _d, _e;
|
|
9392
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
9297
9393
|
if (!this.rootTarget) return;
|
|
9298
9394
|
const mappers = this.mappingTable[e.type];
|
|
9299
9395
|
let target;
|
|
9300
9396
|
const cacheKey = `${e.canvasX}-${e.canvasY}`;
|
|
9301
|
-
if ((null === (_a = this._prePointTargetCache) || void 0 === _a ? void 0 : _a[cacheKey]) && (null === (_c = null === (_b = this._prePointTargetCache) || void 0 === _b ? void 0 : _b[cacheKey]) || void 0 === _c ? void 0 : _c.stage
|
|
9397
|
+
if ((null === (_a = this._prePointTargetCache) || void 0 === _a ? void 0 : _a[cacheKey]) && (null === (_c = null === (_b = this._prePointTargetCache) || void 0 === _b ? void 0 : _b[cacheKey]) || void 0 === _c ? void 0 : _c.stage) && (null === (_e = null === (_d = this._prePointTargetCache) || void 0 === _d ? void 0 : _d[cacheKey]) || void 0 === _e ? void 0 : _e.stage.renderCount) === (null === (_f = this._prePointTargetCache) || void 0 === _f ? void 0 : _f.stageRenderCount) ? target = this._prePointTargetCache[cacheKey] : (target = this.pickTarget(e.canvasX, e.canvasY, e), e.pickParams || (this._prePointTargetCache = {
|
|
9302
9398
|
[cacheKey]: target,
|
|
9303
|
-
stageRenderCount: null !== (
|
|
9399
|
+
stageRenderCount: null !== (_g = null == target ? void 0 : target.stage.renderCount) && void 0 !== _g ? _g : -1
|
|
9304
9400
|
})), mappers) for (let i = 0, j = mappers.length; i < j; i++) mappers[i].fn(e, target);
|
|
9305
9401
|
}
|
|
9306
9402
|
propagate(e, type) {
|
|
@@ -10389,6 +10485,11 @@
|
|
|
10389
10485
|
RafBasedSTO.TimeOut = 1e3 / 60;
|
|
10390
10486
|
const rafBasedSto = new RafBasedSTO();
|
|
10391
10487
|
|
|
10488
|
+
var Direction$1;
|
|
10489
|
+
!function (Direction) {
|
|
10490
|
+
Direction[Direction.LEFT_TO_RIGHT = 0] = "LEFT_TO_RIGHT", Direction[Direction.RIGHT_TO_LEFT = 1] = "RIGHT_TO_LEFT", Direction[Direction.TOP_TO_BOTTOM = 2] = "TOP_TO_BOTTOM", Direction[Direction.BOTTOM_TO_TOP = 3] = "BOTTOM_TO_TOP", Direction[Direction.STROKE = 4] = "STROKE";
|
|
10491
|
+
}(Direction$1 || (Direction$1 = {}));
|
|
10492
|
+
|
|
10392
10493
|
const {
|
|
10393
10494
|
Color: Color$2
|
|
10394
10495
|
} = ColorUtil$1;
|
|
@@ -10519,6 +10620,10 @@
|
|
|
10519
10620
|
return ColorStore$1.Get(fromColor, ColorType$1.Color255, _fromColorRGB$1), ColorStore$1.Get(toColor, ColorType$1.Color255, _toColorRGB$1), `rgba(${Math.round(_fromColorRGB$1[0] + (_toColorRGB$1[0] - _fromColorRGB$1[0]) * ratio)},${Math.round(_fromColorRGB$1[1] + (_toColorRGB$1[1] - _fromColorRGB$1[1]) * ratio)},${Math.round(_fromColorRGB$1[2] + (_toColorRGB$1[2] - _fromColorRGB$1[2]) * ratio)},${_fromColorRGB$1[3] + (_toColorRGB$1[3] - _fromColorRGB$1[3]) * ratio})`;
|
|
10520
10621
|
}
|
|
10521
10622
|
|
|
10623
|
+
Object.keys(DEFAULT_COLORS$1).forEach(k => {
|
|
10624
|
+
DEFAULT_COLORS$1[k];
|
|
10625
|
+
});
|
|
10626
|
+
|
|
10522
10627
|
let ResourceLoader$1 = class ResourceLoader {
|
|
10523
10628
|
static GetImage(url, mark) {
|
|
10524
10629
|
var _a;
|
|
@@ -11799,7 +11904,7 @@
|
|
|
11799
11904
|
const DynamicLayerHandlerContribution = Symbol.for("DynamicLayerHandlerContribution");
|
|
11800
11905
|
const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
|
|
11801
11906
|
|
|
11802
|
-
var __decorate$
|
|
11907
|
+
var __decorate$1K = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
11803
11908
|
var d,
|
|
11804
11909
|
c = arguments.length,
|
|
11805
11910
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -11836,12 +11941,13 @@
|
|
|
11836
11941
|
main: !1
|
|
11837
11942
|
};
|
|
11838
11943
|
this.tryInit();
|
|
11839
|
-
|
|
11840
|
-
|
|
11944
|
+
let layerMode = this.getRecommendedLayerType(options.layerMode);
|
|
11945
|
+
layerMode = options.canvasId ? "static" : layerMode;
|
|
11946
|
+
const layerHandler = this.getLayerHandler(layerMode),
|
|
11841
11947
|
layer = new Layer(stage, this.global, stage.window, Object.assign(Object.assign({
|
|
11842
11948
|
main: !1
|
|
11843
11949
|
}, options), {
|
|
11844
|
-
layerMode:
|
|
11950
|
+
layerMode: layerMode,
|
|
11845
11951
|
canvasId: options.canvasId,
|
|
11846
11952
|
layerHandler: layerHandler
|
|
11847
11953
|
})),
|
|
@@ -11867,9 +11973,9 @@
|
|
|
11867
11973
|
return "browser" === this.global.env ? 10 : 0;
|
|
11868
11974
|
}
|
|
11869
11975
|
};
|
|
11870
|
-
DefaultLayerService = __decorate$
|
|
11976
|
+
DefaultLayerService = __decorate$1K([injectable(), __param$R(0, inject(VGlobal)), __metadata$15("design:paramtypes", [Object])], DefaultLayerService);
|
|
11871
11977
|
|
|
11872
|
-
var __decorate$
|
|
11978
|
+
var __decorate$1J = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
11873
11979
|
var d,
|
|
11874
11980
|
c = arguments.length,
|
|
11875
11981
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -11982,7 +12088,7 @@
|
|
|
11982
12088
|
return this._handler.getTopLeft(baseWindow);
|
|
11983
12089
|
}
|
|
11984
12090
|
};
|
|
11985
|
-
__decorate$
|
|
12091
|
+
__decorate$1J([postConstruct(), __metadata$14("design:type", Function), __metadata$14("design:paramtypes", []), __metadata$14("design:returntype", void 0)], DefaultWindow.prototype, "postInit", null), DefaultWindow = __decorate$1J([injectable(), __param$Q(0, inject(VGlobal)), __metadata$14("design:paramtypes", [Object])], DefaultWindow);
|
|
11986
12092
|
|
|
11987
12093
|
var coreModule = new ContainerModule(bind => {
|
|
11988
12094
|
bind(DefaultGlobal).toSelf().inSingletonScope(), bind(VGlobal).toService(DefaultGlobal), bind(DefaultWindow).to(DefaultWindow), bind(VWindow).toService(DefaultWindow), bind(DefaultGraphicUtil).toSelf().inSingletonScope(), bind(GraphicUtil).toService(DefaultGraphicUtil), bind(DefaultTransformUtil).toSelf().inSingletonScope(), bind(TransformUtil).toService(DefaultTransformUtil), bind(DefaultLayerService).toSelf().inSingletonScope(), bind(LayerService).toService(DefaultLayerService);
|
|
@@ -14735,6 +14841,29 @@
|
|
|
14735
14841
|
cap: 1
|
|
14736
14842
|
}, NOWORK_ANIMATE_ATTR$1);
|
|
14737
14843
|
|
|
14844
|
+
class Arc3d extends Arc {
|
|
14845
|
+
constructor(params) {
|
|
14846
|
+
super(params), this.type = "arc3d", this.numberType = ARC3D_NUMBER_TYPE;
|
|
14847
|
+
}
|
|
14848
|
+
doUpdateAABBBounds() {
|
|
14849
|
+
const polygonTheme = getTheme$1(this).arc;
|
|
14850
|
+
this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
|
|
14851
|
+
const attribute = this.attribute,
|
|
14852
|
+
bounds = application$1.graphicService.updateArc3dAABBBounds(attribute, getTheme$1(this).polygon, this._AABBBounds, this),
|
|
14853
|
+
{
|
|
14854
|
+
boundsPadding = polygonTheme.boundsPadding
|
|
14855
|
+
} = attribute,
|
|
14856
|
+
paddingArray = parsePadding$1(boundsPadding);
|
|
14857
|
+
return paddingArray && bounds.expand(paddingArray), this.clearUpdateBoundTag(), this._AABBBounds;
|
|
14858
|
+
}
|
|
14859
|
+
getNoWorkAnimateAttr() {
|
|
14860
|
+
return Arc3d.NOWORK_ANIMATE_ATTR;
|
|
14861
|
+
}
|
|
14862
|
+
}
|
|
14863
|
+
Arc3d.NOWORK_ANIMATE_ATTR = Object.assign({
|
|
14864
|
+
cap: 1
|
|
14865
|
+
}, NOWORK_ANIMATE_ATTR$1);
|
|
14866
|
+
|
|
14738
14867
|
const POLYGON_UPDATE_TAG_KEY = ["points", "cornerRadius", ...GRAPHIC_UPDATE_TAG_KEY$1];
|
|
14739
14868
|
class Polygon extends Graphic$1 {
|
|
14740
14869
|
constructor(params) {
|
|
@@ -14791,7 +14920,97 @@
|
|
|
14791
14920
|
}
|
|
14792
14921
|
Polygon.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR$1;
|
|
14793
14922
|
|
|
14794
|
-
|
|
14923
|
+
class Pyramid3d extends Polygon {
|
|
14924
|
+
constructor(params) {
|
|
14925
|
+
super(params), this.type = "pyramid3d", this.numberType = PYRAMID3D_NUMBER_TYPE;
|
|
14926
|
+
}
|
|
14927
|
+
doUpdateAABBBounds() {
|
|
14928
|
+
const polygonTheme = getTheme$1(this).polygon;
|
|
14929
|
+
this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
|
|
14930
|
+
const attribute = this.attribute,
|
|
14931
|
+
bounds = application$1.graphicService.updatePyramid3dAABBBounds(attribute, getTheme$1(this).polygon, this._AABBBounds, this),
|
|
14932
|
+
{
|
|
14933
|
+
boundsPadding = polygonTheme.boundsPadding
|
|
14934
|
+
} = attribute,
|
|
14935
|
+
paddingArray = parsePadding$1(boundsPadding);
|
|
14936
|
+
return paddingArray && bounds.expand(paddingArray), this.clearUpdateBoundTag(), this._AABBBounds;
|
|
14937
|
+
}
|
|
14938
|
+
findFace() {
|
|
14939
|
+
const {
|
|
14940
|
+
points: points
|
|
14941
|
+
} = this.attribute,
|
|
14942
|
+
kList = points.map((p, i) => {
|
|
14943
|
+
const p1 = 3 === i ? points[0] : points[i + 1],
|
|
14944
|
+
dx = p.x - p1.x;
|
|
14945
|
+
return 0 === dx ? 0 : (p.y - p1.y) / dx;
|
|
14946
|
+
}),
|
|
14947
|
+
pointsMap = points.map(p => ({
|
|
14948
|
+
p: p,
|
|
14949
|
+
d: 0
|
|
14950
|
+
}));
|
|
14951
|
+
let find = !1,
|
|
14952
|
+
maxD = 0;
|
|
14953
|
+
for (let i = 0; i < kList.length - 1; i++) {
|
|
14954
|
+
for (let j = i + 1; j < kList.length; j++) {
|
|
14955
|
+
if (kList[i] === kList[j]) {
|
|
14956
|
+
find = !0;
|
|
14957
|
+
const d1 = PointService.distancePP(pointsMap[i].p, pointsMap[i + 1].p);
|
|
14958
|
+
pointsMap[i].d = d1, pointsMap[i + 1].d = d1, maxD = max(maxD, d1);
|
|
14959
|
+
const d2 = PointService.distancePP(pointsMap[j].p, pointsMap[j + 1].p);
|
|
14960
|
+
pointsMap[j].d = d2, pointsMap[j + 1].d = d2, maxD = max(maxD, d2);
|
|
14961
|
+
}
|
|
14962
|
+
if (find) break;
|
|
14963
|
+
}
|
|
14964
|
+
if (find) break;
|
|
14965
|
+
}
|
|
14966
|
+
for (let i = points.length - 1; i >= 0; i--) {
|
|
14967
|
+
const p = points[i];
|
|
14968
|
+
pointsMap.unshift({
|
|
14969
|
+
p: p,
|
|
14970
|
+
d: 0
|
|
14971
|
+
});
|
|
14972
|
+
}
|
|
14973
|
+
for (let i = 0; i < points.length; i++) {
|
|
14974
|
+
const delta = (maxD - pointsMap[i + points.length].d) / 2;
|
|
14975
|
+
pointsMap[i].d += delta, pointsMap[i + points.length].d += delta;
|
|
14976
|
+
}
|
|
14977
|
+
const faces = {
|
|
14978
|
+
polygons: [],
|
|
14979
|
+
vertices: [],
|
|
14980
|
+
edges: []
|
|
14981
|
+
};
|
|
14982
|
+
return pointsMap.forEach(p => {
|
|
14983
|
+
faces.vertices.push([p.p.x, p.p.y, p.d]);
|
|
14984
|
+
}), faces.polygons.push({
|
|
14985
|
+
polygon: [0, 4, 5, 1],
|
|
14986
|
+
normal: [0, -1, 0]
|
|
14987
|
+
}), faces.polygons.push({
|
|
14988
|
+
polygon: [7, 6, 2, 3],
|
|
14989
|
+
normal: [0, 1, 0]
|
|
14990
|
+
}), faces.polygons.push({
|
|
14991
|
+
polygon: [0, 4, 7, 3],
|
|
14992
|
+
normal: [-1, 0, 0]
|
|
14993
|
+
}), faces.polygons.push({
|
|
14994
|
+
polygon: [1, 5, 6, 2],
|
|
14995
|
+
normal: [1, 0, 0]
|
|
14996
|
+
}), faces.polygons.push({
|
|
14997
|
+
polygon: [0, 1, 2, 3],
|
|
14998
|
+
normal: [0, 0, -1]
|
|
14999
|
+
}), faces.polygons.push({
|
|
15000
|
+
polygon: [4, 5, 6, 7],
|
|
15001
|
+
normal: [0, 0, 1]
|
|
15002
|
+
}), faces.edges = [[0, 1], [1, 2], [2, 3], [3, 0], [4, 5], [5, 6], [6, 7], [7, 4], [0, 4], [3, 7], [1, 5], [2, 6]], faces;
|
|
15003
|
+
}
|
|
15004
|
+
_isValid() {
|
|
15005
|
+
return super._isValid() && 4 === this.attribute.points.length;
|
|
15006
|
+
}
|
|
15007
|
+
getNoWorkAnimateAttr() {
|
|
15008
|
+
return Pyramid3d.NOWORK_ANIMATE_ATTR;
|
|
15009
|
+
}
|
|
15010
|
+
}
|
|
15011
|
+
Pyramid3d.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR$1;
|
|
15012
|
+
|
|
15013
|
+
var __decorate$1I = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14795
15014
|
var d,
|
|
14796
15015
|
c = arguments.length,
|
|
14797
15016
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -14815,9 +15034,9 @@
|
|
|
14815
15034
|
return aabbBounds;
|
|
14816
15035
|
}
|
|
14817
15036
|
};
|
|
14818
|
-
DefaultOuterBorderBoundsContribution = __decorate$
|
|
15037
|
+
DefaultOuterBorderBoundsContribution = __decorate$1I([injectable()], DefaultOuterBorderBoundsContribution);
|
|
14819
15038
|
|
|
14820
|
-
var __decorate$
|
|
15039
|
+
var __decorate$1H = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14821
15040
|
var d,
|
|
14822
15041
|
c = arguments.length,
|
|
14823
15042
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -14826,9 +15045,9 @@
|
|
|
14826
15045
|
};
|
|
14827
15046
|
const RectBoundsContribution = Symbol.for("RectBoundsContribution");
|
|
14828
15047
|
let DefaultRectOuterBorderBoundsContribution = class extends DefaultOuterBorderBoundsContribution {};
|
|
14829
|
-
DefaultRectOuterBorderBoundsContribution = __decorate$
|
|
15048
|
+
DefaultRectOuterBorderBoundsContribution = __decorate$1H([injectable()], DefaultRectOuterBorderBoundsContribution);
|
|
14830
15049
|
|
|
14831
|
-
var __decorate$
|
|
15050
|
+
var __decorate$1G = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14832
15051
|
var d,
|
|
14833
15052
|
c = arguments.length,
|
|
14834
15053
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -14854,9 +15073,9 @@
|
|
|
14854
15073
|
return aabbBounds;
|
|
14855
15074
|
}
|
|
14856
15075
|
};
|
|
14857
|
-
DefaultSymbolOuterBorderBoundsContribution = __decorate$
|
|
15076
|
+
DefaultSymbolOuterBorderBoundsContribution = __decorate$1G([injectable()], DefaultSymbolOuterBorderBoundsContribution);
|
|
14858
15077
|
|
|
14859
|
-
var __decorate$
|
|
15078
|
+
var __decorate$1F = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14860
15079
|
var d,
|
|
14861
15080
|
c = arguments.length,
|
|
14862
15081
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -14865,9 +15084,9 @@
|
|
|
14865
15084
|
};
|
|
14866
15085
|
const CircleBoundsContribution = Symbol.for("CircleBoundsContribution");
|
|
14867
15086
|
let DefaultCircleOuterBorderBoundsContribution = class extends DefaultOuterBorderBoundsContribution {};
|
|
14868
|
-
DefaultCircleOuterBorderBoundsContribution = __decorate$
|
|
15087
|
+
DefaultCircleOuterBorderBoundsContribution = __decorate$1F([injectable()], DefaultCircleOuterBorderBoundsContribution);
|
|
14869
15088
|
|
|
14870
|
-
var __decorate$
|
|
15089
|
+
var __decorate$1E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14871
15090
|
var d,
|
|
14872
15091
|
c = arguments.length,
|
|
14873
15092
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -14876,9 +15095,9 @@
|
|
|
14876
15095
|
};
|
|
14877
15096
|
const ArcBoundsContribution = Symbol.for("ArcBoundsContribution");
|
|
14878
15097
|
let DefaultArcOuterBorderBoundsContribution = class extends DefaultOuterBorderBoundsContribution {};
|
|
14879
|
-
DefaultArcOuterBorderBoundsContribution = __decorate$
|
|
15098
|
+
DefaultArcOuterBorderBoundsContribution = __decorate$1E([injectable()], DefaultArcOuterBorderBoundsContribution);
|
|
14880
15099
|
|
|
14881
|
-
var __decorate$
|
|
15100
|
+
var __decorate$1D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14882
15101
|
var d,
|
|
14883
15102
|
c = arguments.length,
|
|
14884
15103
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -14887,7 +15106,7 @@
|
|
|
14887
15106
|
};
|
|
14888
15107
|
const PathBoundsContribution = Symbol.for("PathBoundsContribution");
|
|
14889
15108
|
let DefaultPathOuterBorderBoundsContribution = class extends DefaultOuterBorderBoundsContribution {};
|
|
14890
|
-
DefaultPathOuterBorderBoundsContribution = __decorate$
|
|
15109
|
+
DefaultPathOuterBorderBoundsContribution = __decorate$1D([injectable()], DefaultPathOuterBorderBoundsContribution);
|
|
14891
15110
|
|
|
14892
15111
|
function createMat4() {
|
|
14893
15112
|
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
@@ -14947,7 +15166,7 @@
|
|
|
14947
15166
|
const matrixAllocate = new DefaultMatrixAllocate();
|
|
14948
15167
|
const mat4Allocate = new DefaultMat4Allocate();
|
|
14949
15168
|
|
|
14950
|
-
var __decorate$
|
|
15169
|
+
var __decorate$1C = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
14951
15170
|
var d,
|
|
14952
15171
|
c = arguments.length,
|
|
14953
15172
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -15498,7 +15717,7 @@
|
|
|
15498
15717
|
this.combindShadowAABBBounds(aabbBounds, graphic), transformBoundsWithMatrix(aabbBounds, aabbBounds, graphic.transMatrix);
|
|
15499
15718
|
}
|
|
15500
15719
|
};
|
|
15501
|
-
DefaultGraphicService = __decorate$
|
|
15720
|
+
DefaultGraphicService = __decorate$1C([injectable(), __param$P(0, inject(GraphicCreator)), __param$P(1, inject(ContributionProvider)), __param$P(1, named(RectBoundsContribution)), __param$P(2, inject(ContributionProvider)), __param$P(2, named(SymbolBoundsContribution)), __param$P(3, inject(ContributionProvider)), __param$P(3, named(CircleBoundsContribution)), __param$P(4, inject(ContributionProvider)), __param$P(4, named(ArcBoundsContribution)), __param$P(5, inject(ContributionProvider)), __param$P(5, named(PathBoundsContribution)), __metadata$13("design:paramtypes", [Object, Object, Object, Object, Object, Object])], DefaultGraphicService);
|
|
15502
15721
|
|
|
15503
15722
|
class ShadowRoot extends Group$1 {
|
|
15504
15723
|
constructor(graphic) {
|
|
@@ -15606,7 +15825,7 @@
|
|
|
15606
15825
|
}
|
|
15607
15826
|
createRichText$1({});
|
|
15608
15827
|
|
|
15609
|
-
var __decorate$
|
|
15828
|
+
var __decorate$1B = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
15610
15829
|
var d,
|
|
15611
15830
|
c = arguments.length,
|
|
15612
15831
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -15740,9 +15959,9 @@
|
|
|
15740
15959
|
this.z = z, drawPathProxy(graphic, context, x, y, drawContext, params) || (this.drawShape(graphic, context, x, y, drawContext, params), this.z = 0, context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix), context.highPerformanceRestore();
|
|
15741
15960
|
}
|
|
15742
15961
|
};
|
|
15743
|
-
BaseRender = __decorate$
|
|
15962
|
+
BaseRender = __decorate$1B([injectable()], BaseRender);
|
|
15744
15963
|
|
|
15745
|
-
var __decorate$
|
|
15964
|
+
var __decorate$1A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
15746
15965
|
var d,
|
|
15747
15966
|
c = arguments.length,
|
|
15748
15967
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -15908,9 +16127,9 @@
|
|
|
15908
16127
|
this._draw(arc, arcAttribute, !1, drawContext, params);
|
|
15909
16128
|
}
|
|
15910
16129
|
};
|
|
15911
|
-
DefaultCanvasArcRender = __decorate$
|
|
16130
|
+
DefaultCanvasArcRender = __decorate$1A([injectable(), __param$O(0, inject(ContributionProvider)), __param$O(0, named(ArcRenderContribution)), __metadata$12("design:paramtypes", [Object])], DefaultCanvasArcRender);
|
|
15912
16131
|
|
|
15913
|
-
var __decorate$
|
|
16132
|
+
var __decorate$1z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
15914
16133
|
var d,
|
|
15915
16134
|
c = arguments.length,
|
|
15916
16135
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -15953,7 +16172,7 @@
|
|
|
15953
16172
|
this._draw(circle, circleAttribute, !1, drawContext, params);
|
|
15954
16173
|
}
|
|
15955
16174
|
};
|
|
15956
|
-
DefaultCanvasCircleRender = __decorate$
|
|
16175
|
+
DefaultCanvasCircleRender = __decorate$1z([injectable(), __param$N(0, inject(ContributionProvider)), __param$N(0, named(CircleRenderContribution)), __metadata$11("design:paramtypes", [Object])], DefaultCanvasCircleRender);
|
|
15957
16176
|
|
|
15958
16177
|
function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
|
|
15959
16178
|
var _a;
|
|
@@ -16003,7 +16222,7 @@
|
|
|
16003
16222
|
}
|
|
16004
16223
|
if (percent <= 0) return;
|
|
16005
16224
|
let direction;
|
|
16006
|
-
"x" === clipRangeByDimension ? direction = Direction$
|
|
16225
|
+
"x" === clipRangeByDimension ? direction = Direction$2.ROW : "y" === clipRangeByDimension ? direction = Direction$2.COLUMN : "auto" === clipRangeByDimension && (direction = segPath.direction);
|
|
16007
16226
|
const totalDrawLength = percent * segPath.tryUpdateLength(direction);
|
|
16008
16227
|
let drawedLengthUntilLast = 0,
|
|
16009
16228
|
defined0 = !0,
|
|
@@ -16091,7 +16310,7 @@
|
|
|
16091
16310
|
}
|
|
16092
16311
|
}
|
|
16093
16312
|
|
|
16094
|
-
var __decorate$
|
|
16313
|
+
var __decorate$1y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
16095
16314
|
var d,
|
|
16096
16315
|
c = arguments.length,
|
|
16097
16316
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -16225,7 +16444,7 @@
|
|
|
16225
16444
|
} else this.drawSegmentItem(context, line.cache, !!fill, !!stroke, fillOpacity, strokeOpacity, line.attribute, lineAttribute, clipRange, clipRangeByDimension, x, y, line, fillCb, strokeCb);
|
|
16226
16445
|
}
|
|
16227
16446
|
};
|
|
16228
|
-
DefaultCanvasLineRender = __decorate$
|
|
16447
|
+
DefaultCanvasLineRender = __decorate$1y([injectable()], DefaultCanvasLineRender);
|
|
16229
16448
|
|
|
16230
16449
|
function drawAreaSegments(path, segPath, percent, params) {
|
|
16231
16450
|
var _a;
|
|
@@ -16281,8 +16500,8 @@
|
|
|
16281
16500
|
endP = null !== (_a = topCurves[topCurves.length - 1].p3) && void 0 !== _a ? _a : topCurves[topCurves.length - 1].p1,
|
|
16282
16501
|
xTotalLength = abs(endP.x - topCurves[0].p0.x),
|
|
16283
16502
|
yTotalLength = abs(endP.y - topCurves[0].p0.y);
|
|
16284
|
-
direction = null != direction ? direction : xTotalLength > yTotalLength ? Direction$
|
|
16285
|
-
const totalDrawLength = percent * (direction === Direction$
|
|
16503
|
+
direction = null != direction ? direction : xTotalLength > yTotalLength ? Direction$2.ROW : Direction$2.COLUMN, Number.isFinite(xTotalLength) || (direction = Direction$2.COLUMN), Number.isFinite(yTotalLength) || (direction = Direction$2.ROW);
|
|
16504
|
+
const totalDrawLength = percent * (direction === Direction$2.ROW ? xTotalLength : yTotalLength);
|
|
16286
16505
|
let drawedLengthUntilLast = 0,
|
|
16287
16506
|
lastDefined = !0;
|
|
16288
16507
|
const topList = [],
|
|
@@ -16365,7 +16584,7 @@
|
|
|
16365
16584
|
}
|
|
16366
16585
|
}
|
|
16367
16586
|
|
|
16368
|
-
var __decorate$
|
|
16587
|
+
var __decorate$1x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
16369
16588
|
var d,
|
|
16370
16589
|
c = arguments.length,
|
|
16371
16590
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -16536,12 +16755,12 @@
|
|
|
16536
16755
|
} = area.attribute;
|
|
16537
16756
|
let endP,
|
|
16538
16757
|
startP,
|
|
16539
|
-
direction = Direction$
|
|
16758
|
+
direction = Direction$2.ROW;
|
|
16540
16759
|
if (segments) {
|
|
16541
16760
|
const endSeg = segments[segments.length - 1];
|
|
16542
16761
|
startP = segments[0].points[0], endP = endSeg.points[endSeg.points.length - 1];
|
|
16543
16762
|
} else startP = points[0], endP = points[points.length - 1];
|
|
16544
|
-
direction = abs(endP.x - startP.x) > abs(endP.y - startP.y) ? Direction$
|
|
16763
|
+
direction = abs(endP.x - startP.x) > abs(endP.y - startP.y) ? Direction$2.ROW : Direction$2.COLUMN, drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
|
|
16545
16764
|
offsetX: offsetX,
|
|
16546
16765
|
offsetY: offsetY,
|
|
16547
16766
|
offsetZ: offsetZ,
|
|
@@ -16563,7 +16782,7 @@
|
|
|
16563
16782
|
const {
|
|
16564
16783
|
stroke = defaultAttribute && defaultAttribute[1] && defaultAttribute[1].stroke
|
|
16565
16784
|
} = attribute;
|
|
16566
|
-
isArray$5(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction$
|
|
16785
|
+
isArray$5(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction$2.ROW ? "x" : "y", {
|
|
16567
16786
|
offsetX: offsetX,
|
|
16568
16787
|
offsetY: offsetY,
|
|
16569
16788
|
offsetZ: offsetZ,
|
|
@@ -16576,9 +16795,9 @@
|
|
|
16576
16795
|
return !1;
|
|
16577
16796
|
}
|
|
16578
16797
|
};
|
|
16579
|
-
DefaultCanvasAreaRender = __decorate$
|
|
16798
|
+
DefaultCanvasAreaRender = __decorate$1x([injectable(), __param$M(0, inject(ContributionProvider)), __param$M(0, named(AreaRenderContribution)), __metadata$10("design:paramtypes", [Object])], DefaultCanvasAreaRender);
|
|
16580
16799
|
|
|
16581
|
-
var __decorate$
|
|
16800
|
+
var __decorate$1w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
16582
16801
|
var d,
|
|
16583
16802
|
c = arguments.length,
|
|
16584
16803
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -16624,7 +16843,7 @@
|
|
|
16624
16843
|
this._draw(path, pathAttribute, !1, drawContext, params);
|
|
16625
16844
|
}
|
|
16626
16845
|
};
|
|
16627
|
-
DefaultCanvasPathRender = __decorate$
|
|
16846
|
+
DefaultCanvasPathRender = __decorate$1w([injectable(), __param$L(0, inject(ContributionProvider)), __param$L(0, named(PathRenderContribution)), __metadata$$("design:paramtypes", [Object])], DefaultCanvasPathRender);
|
|
16628
16847
|
|
|
16629
16848
|
const halfPi = pi / 2;
|
|
16630
16849
|
function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
@@ -16681,7 +16900,7 @@
|
|
|
16681
16900
|
return path.closePath(), path;
|
|
16682
16901
|
}
|
|
16683
16902
|
|
|
16684
|
-
var __decorate$
|
|
16903
|
+
var __decorate$1v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
16685
16904
|
var d,
|
|
16686
16905
|
c = arguments.length,
|
|
16687
16906
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -16736,9 +16955,9 @@
|
|
|
16736
16955
|
this._draw(rect, rectAttribute, !1, drawContext, params);
|
|
16737
16956
|
}
|
|
16738
16957
|
};
|
|
16739
|
-
DefaultCanvasRectRender = __decorate$
|
|
16958
|
+
DefaultCanvasRectRender = __decorate$1v([injectable(), __param$K(0, inject(ContributionProvider)), __param$K(0, named(RectRenderContribution)), __metadata$_("design:paramtypes", [Object])], DefaultCanvasRectRender);
|
|
16740
16959
|
|
|
16741
|
-
var __decorate$
|
|
16960
|
+
var __decorate$1u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
16742
16961
|
var d,
|
|
16743
16962
|
c = arguments.length,
|
|
16744
16963
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -16797,9 +17016,9 @@
|
|
|
16797
17016
|
this._draw(symbol, symbolAttribute, !1, drawContext, params);
|
|
16798
17017
|
}
|
|
16799
17018
|
};
|
|
16800
|
-
DefaultCanvasSymbolRender = __decorate$
|
|
17019
|
+
DefaultCanvasSymbolRender = __decorate$1u([injectable(), __param$J(0, inject(ContributionProvider)), __param$J(0, named(SymbolRenderContribution)), __metadata$Z("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
|
|
16801
17020
|
|
|
16802
|
-
var __decorate$
|
|
17021
|
+
var __decorate$1t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
16803
17022
|
var d,
|
|
16804
17023
|
c = arguments.length,
|
|
16805
17024
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17007,7 +17226,17 @@
|
|
|
17007
17226
|
}
|
|
17008
17227
|
}
|
|
17009
17228
|
};
|
|
17010
|
-
DefaultCanvasTextRender = __decorate$
|
|
17229
|
+
DefaultCanvasTextRender = __decorate$1t([injectable(), __param$I(0, inject(ContributionProvider)), __param$I(0, named(TextRenderContribution)), __metadata$Y("design:paramtypes", [Object])], DefaultCanvasTextRender);
|
|
17230
|
+
|
|
17231
|
+
var __decorate$1s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17232
|
+
var d,
|
|
17233
|
+
c = arguments.length,
|
|
17234
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
17235
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
17236
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17237
|
+
};
|
|
17238
|
+
let AbstractGraphicRender = class {};
|
|
17239
|
+
AbstractGraphicRender = __decorate$1s([injectable()], AbstractGraphicRender);
|
|
17011
17240
|
|
|
17012
17241
|
function drawPolygon(path, points, x, y) {
|
|
17013
17242
|
path.moveTo(points[0].x + x, points[0].y + y);
|
|
@@ -20443,7 +20672,10 @@
|
|
|
20443
20672
|
canvasControled: !1 !== params.canvasControled,
|
|
20444
20673
|
title: params.title || "",
|
|
20445
20674
|
canvas: params.canvas
|
|
20446
|
-
}), this._viewBox = new AABBBounds(), params.viewBox ? this._viewBox.setValue(params.viewBox.x1, params.viewBox.y1, params.viewBox.x2, params.viewBox.y2) : this._viewBox.setValue(0, 0, this.width, this.height), this.state = "normal", this.renderCount = 0, this._subView = !(this._viewBox.width() === this.width && this._viewBox.height() === this.height), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig$1.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
|
|
20675
|
+
}), this._viewBox = new AABBBounds(), params.viewBox ? this._viewBox.setValue(params.viewBox.x1, params.viewBox.y1, params.viewBox.x2, params.viewBox.y2) : this._viewBox.setValue(0, 0, this.width, this.height), this.state = "normal", this.renderCount = 0, this._subView = !(this._viewBox.width() === this.width && this._viewBox.height() === this.height), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig$1.BACKGROUND, this.appendChild(this.layerService.createLayer(this, params.canvas && isString$3(params.canvas) ? {
|
|
20676
|
+
main: !0,
|
|
20677
|
+
canvasId: params.canvas
|
|
20678
|
+
} : {
|
|
20447
20679
|
main: !0
|
|
20448
20680
|
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, this.global.supportEvent && (this.eventSystem = new EventSystem({
|
|
20449
20681
|
targetElement: this.window,
|
|
@@ -20616,7 +20848,8 @@
|
|
|
20616
20848
|
createLayer(canvasId, layerMode) {
|
|
20617
20849
|
const layer = this.layerService.createLayer(this, {
|
|
20618
20850
|
main: !1,
|
|
20619
|
-
layerMode: layerMode
|
|
20851
|
+
layerMode: layerMode,
|
|
20852
|
+
canvasId: canvasId
|
|
20620
20853
|
});
|
|
20621
20854
|
return this.appendChild(layer), layer;
|
|
20622
20855
|
}
|
|
@@ -20795,6 +21028,11 @@
|
|
|
20795
21028
|
return new Stage(params);
|
|
20796
21029
|
}
|
|
20797
21030
|
|
|
21031
|
+
var params;
|
|
21032
|
+
!function (params) {
|
|
21033
|
+
params[params.W = 1] = "W", params[params.H = 2] = "H", params[params.WH = 3] = "WH";
|
|
21034
|
+
}(params || (params = {}));
|
|
21035
|
+
|
|
20798
21036
|
var __decorate$Y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
20799
21037
|
var d,
|
|
20800
21038
|
c = arguments.length,
|
|
@@ -21275,7 +21513,11 @@
|
|
|
21275
21513
|
return result;
|
|
21276
21514
|
}
|
|
21277
21515
|
containsPoint(graphic, point, params) {
|
|
21278
|
-
|
|
21516
|
+
var _a;
|
|
21517
|
+
return !!(null === (_a = this.pickItem(graphic, point, null, null != params ? params : {
|
|
21518
|
+
pickContext: this.pickContext,
|
|
21519
|
+
pickerService: this
|
|
21520
|
+
})) || void 0 === _a ? void 0 : _a.graphic);
|
|
21279
21521
|
}
|
|
21280
21522
|
pickGroup(group, point, parentMatrix, params) {
|
|
21281
21523
|
let result = {
|
|
@@ -21949,7 +22191,8 @@
|
|
|
21949
22191
|
getBoundingClientRect: () => ({
|
|
21950
22192
|
height: domref.height,
|
|
21951
22193
|
width: domref.width
|
|
21952
|
-
})
|
|
22194
|
+
}),
|
|
22195
|
+
nativeCanvas: _canvas
|
|
21953
22196
|
};
|
|
21954
22197
|
canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas);
|
|
21955
22198
|
});
|
|
@@ -24646,6 +24889,10 @@
|
|
|
24646
24889
|
init() {
|
|
24647
24890
|
this._context = new LynxContext2d(this, this._dpr);
|
|
24648
24891
|
}
|
|
24892
|
+
resize(width, height) {
|
|
24893
|
+
this._pixelWidth = width * this._dpr, this._pixelHeight = height * this._dpr, this._displayWidth = width, this._displayHeight = height, this._nativeCanvas.width = this._pixelWidth, this._nativeCanvas.height = this._pixelHeight, this._nativeCanvas.nativeCanvas && (this._nativeCanvas.nativeCanvas.width = this._pixelWidth, this._nativeCanvas.nativeCanvas.height = this._pixelHeight);
|
|
24894
|
+
this._context.dpr = this._dpr;
|
|
24895
|
+
}
|
|
24649
24896
|
release() {}
|
|
24650
24897
|
};
|
|
24651
24898
|
LynxCanvas.env = "lynx", LynxCanvas = __decorate$d([injectable(), __metadata$8("design:paramtypes", [Object])], LynxCanvas);
|
|
@@ -24745,7 +24992,9 @@
|
|
|
24745
24992
|
});
|
|
24746
24993
|
}
|
|
24747
24994
|
releaseWindow() {}
|
|
24748
|
-
resizeWindow(width, height) {
|
|
24995
|
+
resizeWindow(width, height) {
|
|
24996
|
+
this.canvas.resize(width, height);
|
|
24997
|
+
}
|
|
24749
24998
|
setDpr(dpr) {
|
|
24750
24999
|
this.canvas.dpr = dpr;
|
|
24751
25000
|
}
|
|
@@ -25479,6 +25728,10 @@
|
|
|
25479
25728
|
}
|
|
25480
25729
|
}
|
|
25481
25730
|
|
|
25731
|
+
const delayMap = {
|
|
25732
|
+
debounce: debounce$1,
|
|
25733
|
+
throttle: throttle$1
|
|
25734
|
+
};
|
|
25482
25735
|
class ScrollBar extends AbstractComponent {
|
|
25483
25736
|
constructor(attributes) {
|
|
25484
25737
|
super(merge$1({}, ScrollBar.defaultAttributes, attributes)), this.name = "scrollbar", this._onRailPointerDown = e => {
|
|
@@ -25513,29 +25766,44 @@
|
|
|
25513
25766
|
} = this.attribute;
|
|
25514
25767
|
this._prePos = "horizontal" === direction ? e.clientX : e.clientY, "browser" === vglobal.env ? (vglobal.addEventListener("pointermove", this._onSliderPointerMove, {
|
|
25515
25768
|
capture: !0
|
|
25516
|
-
}), vglobal.addEventListener("pointerup", this._onSliderPointerUp)) : (this.
|
|
25769
|
+
}), vglobal.addEventListener("pointerup", this._onSliderPointerUp)) : (this.stage.addEventListener("pointermove", this._onSliderPointerMove, {
|
|
25517
25770
|
capture: !0
|
|
25518
|
-
}), this.
|
|
25519
|
-
}, this.
|
|
25520
|
-
e.stopPropagation();
|
|
25771
|
+
}), this.stage.addEventListener("pointerup", this._onSliderPointerUp), this.stage.addEventListener("pointerupoutside", this._onSliderPointerUp));
|
|
25772
|
+
}, this._computeScrollValue = e => {
|
|
25521
25773
|
const {
|
|
25522
25774
|
direction: direction
|
|
25523
25775
|
} = this.attribute;
|
|
25524
25776
|
let currentScrollValue,
|
|
25525
25777
|
currentPos,
|
|
25526
25778
|
delta = 0;
|
|
25779
|
+
const {
|
|
25780
|
+
width: width,
|
|
25781
|
+
height: height
|
|
25782
|
+
} = this._getSliderRenderBounds();
|
|
25783
|
+
return "vertical" === direction ? (currentPos = e.clientY, delta = currentPos - this._prePos, currentScrollValue = delta / height) : (currentPos = e.clientX, delta = currentPos - this._prePos, currentScrollValue = delta / width), [currentPos, currentScrollValue];
|
|
25784
|
+
}, this._onSliderPointerMove = delayMap[this.attribute.delayType](e => {
|
|
25785
|
+
e.stopPropagation();
|
|
25527
25786
|
const preScrollRange = this.getScrollRange(),
|
|
25528
|
-
|
|
25529
|
-
|
|
25530
|
-
|
|
25531
|
-
|
|
25532
|
-
|
|
25533
|
-
|
|
25534
|
-
|
|
25787
|
+
[currentPos, currentScrollValue] = this._computeScrollValue(e);
|
|
25788
|
+
this.setScrollRange([preScrollRange[0] + currentScrollValue, preScrollRange[1] + currentScrollValue], !0), this._prePos = currentPos;
|
|
25789
|
+
}, this.attribute.delayTime), this._onSliderPointerUp = e => {
|
|
25790
|
+
e.preventDefault();
|
|
25791
|
+
const {
|
|
25792
|
+
realTime = !0,
|
|
25793
|
+
range: preRange,
|
|
25794
|
+
limitRange = [0, 1]
|
|
25795
|
+
} = this.attribute,
|
|
25796
|
+
preScrollRange = this.getScrollRange(),
|
|
25797
|
+
[currentPos, currentScrollValue] = this._computeScrollValue(e),
|
|
25798
|
+
range = [preScrollRange[0] + currentScrollValue, preScrollRange[1] + currentScrollValue];
|
|
25799
|
+
realTime || this._onChange({
|
|
25800
|
+
pre: preRange,
|
|
25801
|
+
value: clampRange$1(range, limitRange[0], limitRange[1])
|
|
25802
|
+
}), "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onSliderPointerMove, {
|
|
25535
25803
|
capture: !0
|
|
25536
|
-
}), vglobal.removeEventListener("pointerup", this._onSliderPointerUp)) : (this.
|
|
25804
|
+
}), vglobal.removeEventListener("pointerup", this._onSliderPointerUp)) : (this.stage.removeEventListener("pointermove", this._onSliderPointerMove, {
|
|
25537
25805
|
capture: !0
|
|
25538
|
-
}), this.
|
|
25806
|
+
}), this.stage.removeEventListener("pointerup", this._onSliderPointerUp), this.stage.removeEventListener("pointerupoutside", this._onSliderPointerUp));
|
|
25539
25807
|
};
|
|
25540
25808
|
}
|
|
25541
25809
|
setScrollRange(range) {
|
|
@@ -25544,14 +25812,15 @@
|
|
|
25544
25812
|
const {
|
|
25545
25813
|
direction = "horizontal",
|
|
25546
25814
|
limitRange = [0, 1],
|
|
25547
|
-
range: preRange
|
|
25815
|
+
range: preRange,
|
|
25816
|
+
realTime = !0
|
|
25548
25817
|
} = this.attribute,
|
|
25549
25818
|
currScrollRange = clampRange$1(range, limitRange[0], limitRange[1]);
|
|
25550
25819
|
if (render) {
|
|
25551
25820
|
const sliderPos = this._getSliderPos(currScrollRange);
|
|
25552
25821
|
this._slider && ("horizontal" === direction ? this._slider.setAttribute("x", sliderPos[0], !0) : this._slider.setAttribute("y", sliderPos[0], !0), (null === (_a = this.stage) || void 0 === _a ? void 0 : _a.autoRender) || null === (_b = this.stage) || void 0 === _b || _b.renderNextFrame());
|
|
25553
25822
|
}
|
|
25554
|
-
this.attribute.range = currScrollRange, this._onChange({
|
|
25823
|
+
this.attribute.range = currScrollRange, realTime && this._onChange({
|
|
25555
25824
|
pre: preRange,
|
|
25556
25825
|
value: currScrollRange
|
|
25557
25826
|
});
|
|
@@ -25560,7 +25829,12 @@
|
|
|
25560
25829
|
return this.attribute.range;
|
|
25561
25830
|
}
|
|
25562
25831
|
bindEvents() {
|
|
25563
|
-
this.attribute.disableTriggerEvent
|
|
25832
|
+
if (this.attribute.disableTriggerEvent) return;
|
|
25833
|
+
const {
|
|
25834
|
+
delayType = "throttle",
|
|
25835
|
+
delayTime = 0
|
|
25836
|
+
} = this.attribute;
|
|
25837
|
+
this._rail && this._rail.addEventListener("pointerdown", delayMap[delayType](this._onRailPointerDown, delayTime)), this._slider && this._slider.addEventListener("pointerdown", this._onSliderPointerDown);
|
|
25564
25838
|
}
|
|
25565
25839
|
render() {
|
|
25566
25840
|
this._reset();
|
|
@@ -25690,7 +25964,10 @@
|
|
|
25690
25964
|
fill: "rgba(0, 0, 0, .0)"
|
|
25691
25965
|
},
|
|
25692
25966
|
padding: 2,
|
|
25693
|
-
scrollRange: [0, 1]
|
|
25967
|
+
scrollRange: [0, 1],
|
|
25968
|
+
delayType: "throttle",
|
|
25969
|
+
delayTime: 0,
|
|
25970
|
+
realTime: !0
|
|
25694
25971
|
};
|
|
25695
25972
|
|
|
25696
25973
|
function traverseGroup(group, cb) {
|
|
@@ -26236,7 +26513,12 @@
|
|
|
26236
26513
|
PopTipPlugin = __decorate$1([injectable()], PopTipPlugin);
|
|
26237
26514
|
let PopTipForClipedTextPlugin = class {
|
|
26238
26515
|
constructor() {
|
|
26239
|
-
this.name = "poptipForText", this.activeEvent = "onRegister", this._uid = Generator$1.GenAutoIncrementId(), this.key = this.name + this._uid, this.
|
|
26516
|
+
this.name = "poptipForText", this.activeEvent = "onRegister", this._uid = Generator$1.GenAutoIncrementId(), this.key = this.name + this._uid, this.pointerlave = e => {
|
|
26517
|
+
const {
|
|
26518
|
+
stage: stage
|
|
26519
|
+
} = this.pluginService;
|
|
26520
|
+
e.target === stage && this.unpoptip(e);
|
|
26521
|
+
}, this.poptip = e => {
|
|
26240
26522
|
const graphic = e.target;
|
|
26241
26523
|
if ("text" !== graphic.type || !graphic.cliped || graphic.isContainer || !graphic.attribute) return void this.unpoptip(e);
|
|
26242
26524
|
if (graphic === this.activeGraphic) return;
|
|
@@ -26253,7 +26535,7 @@
|
|
|
26253
26535
|
const {
|
|
26254
26536
|
stage: stage
|
|
26255
26537
|
} = this.pluginService;
|
|
26256
|
-
stage.addEventListener("pointerover", this.poptip);
|
|
26538
|
+
stage.addEventListener("pointerover", this.poptip), stage.addEventListener("pointerleave", this.pointerlave);
|
|
26257
26539
|
}
|
|
26258
26540
|
setActiveGraphic(graphic, rerender) {
|
|
26259
26541
|
this.activeGraphic = graphic, this.pluginService.stage.renderNextFrame();
|
|
@@ -26262,7 +26544,7 @@
|
|
|
26262
26544
|
const {
|
|
26263
26545
|
stage: stage
|
|
26264
26546
|
} = this.pluginService;
|
|
26265
|
-
stage.removeEventListener("pointerover", this.poptip);
|
|
26547
|
+
stage.removeEventListener("pointerover", this.poptip), stage.removeEventListener("pointerleave", this.pointerlave);
|
|
26266
26548
|
}
|
|
26267
26549
|
};
|
|
26268
26550
|
PopTipForClipedTextPlugin = __decorate$1([injectable()], PopTipForClipedTextPlugin);
|
|
@@ -26816,11 +27098,14 @@
|
|
|
26816
27098
|
value: tickDatum.rawValue,
|
|
26817
27099
|
index: tickDatum.index,
|
|
26818
27100
|
layer: layer
|
|
26819
|
-
})), Object.assign(Object.assign(Object.assign({}, point), {
|
|
27101
|
+
})), Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, text, textStyle)), {
|
|
26820
27102
|
text: text,
|
|
26821
27103
|
lineHeight: null == textStyle ? void 0 : textStyle.fontSize
|
|
26822
27104
|
}), textStyle);
|
|
26823
27105
|
}
|
|
27106
|
+
getLabelPosition(point, vector, text, style) {
|
|
27107
|
+
return point;
|
|
27108
|
+
}
|
|
26824
27109
|
_transformItems(items) {
|
|
26825
27110
|
const data = [];
|
|
26826
27111
|
return items.forEach(item => {
|
|
@@ -27828,10 +28113,10 @@
|
|
|
27828
28113
|
}));
|
|
27829
28114
|
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);
|
|
27830
28115
|
const labelSpace = get$4(labelAttr, "space", DEFAULT_LABEL_SPACE);
|
|
27831
|
-
if (
|
|
28116
|
+
if (isValid$6(value)) {
|
|
27832
28117
|
const valueSpace = get$4(valueAttr, "space", focus ? DEFAULT_VALUE_SPACE : 0),
|
|
27833
28118
|
valueShape = createText$1(Object.assign(Object.assign({
|
|
27834
|
-
x:
|
|
28119
|
+
x: 0,
|
|
27835
28120
|
y: 0,
|
|
27836
28121
|
textAlign: "start",
|
|
27837
28122
|
textBaseline: "middle",
|
|
@@ -27845,13 +28130,13 @@
|
|
|
27845
28130
|
labelBounds = labelShape.AABBBounds,
|
|
27846
28131
|
valueWidth = valueBounds.width(),
|
|
27847
28132
|
labelWidth = labelBounds.width();
|
|
27848
|
-
labelWidth > layoutWidth ? (layoutWidth - valueWidth) / labelWidth > .4 ? labelShape.setAttribute("maxLineWidth", layoutWidth - valueWidth) : (valueShape.setAttribute("maxLineWidth", .5 * layoutWidth), labelShape.setAttribute("maxLineWidth", .5 * layoutWidth)) : valueShape.setAttribute("maxLineWidth", layoutWidth - labelWidth), valueAttr.alignRight
|
|
28133
|
+
labelWidth > layoutWidth ? (layoutWidth - valueWidth) / labelWidth > .4 ? labelShape.setAttribute("maxLineWidth", layoutWidth - valueWidth) : (valueShape.setAttribute("maxLineWidth", .5 * layoutWidth), labelShape.setAttribute("maxLineWidth", .5 * layoutWidth)) : valueShape.setAttribute("maxLineWidth", layoutWidth - labelWidth), valueAttr.alignRight ? valueShape.setAttributes({
|
|
27849
28134
|
textAlign: "right",
|
|
27850
28135
|
x: this._itemWidthByUser - shapeSize / 2 - parsedPadding[1] - parsedPadding[3] - focusSpace - valueSpace
|
|
27851
|
-
});
|
|
27852
|
-
}
|
|
28136
|
+
}) : valueShape.setAttribute("x", labelShape.AABBBounds.x2 + valueSpace);
|
|
28137
|
+
} else valueShape.setAttribute("x", labelShape.AABBBounds.x2 + valueSpace);
|
|
27853
28138
|
focusStartX = valueShape.AABBBounds.x2 + valueSpace, innerGroup.add(valueShape);
|
|
27854
|
-
} else this._itemWidthByUser
|
|
28139
|
+
} else this._itemWidthByUser ? (labelShape.setAttribute("maxLineWidth", this._itemWidthByUser - parsedPadding[1] - parsedPadding[3] - shapeSize - shapeSpace - focusSpace), focusStartX = labelShape.AABBBounds.x2 + labelSpace) : focusStartX = labelShape.AABBBounds.x2 + labelSpace;
|
|
27855
28140
|
focusShape && (focusShape.setAttribute("x", focusStartX), innerGroup.add(focusShape));
|
|
27856
28141
|
const innerGroupBounds = innerGroup.AABBBounds,
|
|
27857
28142
|
innerGroupWidth = innerGroupBounds.width(),
|
|
@@ -29485,9 +29770,9 @@
|
|
|
29485
29770
|
super(merge$1({}, Slider.defaultAttributes, attributes)), this.name = "slider", this._isHorizontal = !0, this._startHandler = null, this._endHandler = null, this._startHandlerText = null, this._endHandlerText = null, this._currentHandler = null, this._currentValue = {}, this._onHandlerPointerdown = e => {
|
|
29486
29771
|
e.stopPropagation(), this._currentHandler = e.target, this._prePos = this._isHorizontal ? e.clientX : e.clientY, "browser" === vglobal.env ? (vglobal.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
29487
29772
|
capture: !0
|
|
29488
|
-
}), vglobal.addEventListener("pointerup", this._onHandlerPointerUp)) : (this.
|
|
29773
|
+
}), vglobal.addEventListener("pointerup", this._onHandlerPointerUp)) : (this.stage.addEventListener("pointermove", this._onHandlerPointerMove, {
|
|
29489
29774
|
capture: !0
|
|
29490
|
-
}), this.
|
|
29775
|
+
}), this.stage.addEventListener("pointerup", this._onHandlerPointerUp), this.stage.addEventListener("pointerupoutside", this._onHandlerPointerUp));
|
|
29491
29776
|
}, this._onHandlerPointerMove = e => {
|
|
29492
29777
|
var _a, _b;
|
|
29493
29778
|
e.stopPropagation();
|
|
@@ -29507,20 +29792,17 @@
|
|
|
29507
29792
|
currentValue = newPos / railLen * (max - min) + min;
|
|
29508
29793
|
"text" === this._currentHandler.type ? this._updateHandlerText(this._currentHandler, newPos, currentValue) : this._updateHandler(this._currentHandler, newPos, currentValue), this._updateTrack(), this._prePos = currentPos, this._dispatchChangeEvent();
|
|
29509
29794
|
}, this._onHandlerPointerUp = e => {
|
|
29510
|
-
|
|
29795
|
+
e.preventDefault(), this._currentHandler = null, "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
29511
29796
|
capture: !0
|
|
29512
|
-
}), vglobal.removeEventListener("pointerup", this._onHandlerPointerUp)
|
|
29513
|
-
|
|
29514
|
-
|
|
29515
|
-
capture: !0
|
|
29516
|
-
}), currentTarget.removeEventListener("pointerup", this._onHandlerPointerUp), currentTarget.removeEventListener("pointerupoutside", this._onHandlerPointerUp);
|
|
29517
|
-
}
|
|
29797
|
+
}), vglobal.removeEventListener("pointerup", this._onHandlerPointerUp)) : (this.stage.removeEventListener("pointermove", this._onHandlerPointerMove, {
|
|
29798
|
+
capture: !0
|
|
29799
|
+
}), this.stage.removeEventListener("pointerup", this._onHandlerPointerUp), this.stage.removeEventListener("pointerupoutside", this._onHandlerPointerUp));
|
|
29518
29800
|
}, this._onTrackPointerdown = e => {
|
|
29519
29801
|
e.stopPropagation(), this._prePos = this._isHorizontal ? e.clientX : e.clientY, "browser" === vglobal.env ? (vglobal.addEventListener("pointermove", this._onTrackPointerMove, {
|
|
29520
29802
|
capture: !0
|
|
29521
|
-
}), vglobal.addEventListener("pointerup", this._onTrackPointerUp)) : (this.
|
|
29803
|
+
}), vglobal.addEventListener("pointerup", this._onTrackPointerUp)) : (this.stage.addEventListener("pointermove", this._onTrackPointerMove, {
|
|
29522
29804
|
capture: !0
|
|
29523
|
-
}), this.
|
|
29805
|
+
}), this.stage.addEventListener("pointerup", this._onTrackPointerUp), this.stage.addEventListener("pointerupoutside", this._onTrackPointerUp));
|
|
29524
29806
|
}, this._onTrackPointerMove = e => {
|
|
29525
29807
|
e.stopPropagation();
|
|
29526
29808
|
const {
|
|
@@ -29559,9 +29841,9 @@
|
|
|
29559
29841
|
}, this._onTrackPointerUp = e => {
|
|
29560
29842
|
e.preventDefault(), "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onTrackPointerMove, {
|
|
29561
29843
|
capture: !0
|
|
29562
|
-
}), vglobal.removeEventListener("pointerup", this._onTrackPointerUp)) : (this.
|
|
29844
|
+
}), vglobal.removeEventListener("pointerup", this._onTrackPointerUp)) : (this.stage.removeEventListener("pointermove", this._onTrackPointerMove, {
|
|
29563
29845
|
capture: !0
|
|
29564
|
-
}), this.
|
|
29846
|
+
}), this.stage.removeEventListener("pointerup", this._onTrackPointerUp), this.stage.removeEventListener("pointerupoutside", this._onTrackPointerUp));
|
|
29565
29847
|
}, this._onRailPointerDown = e => {
|
|
29566
29848
|
e.stopPropagation();
|
|
29567
29849
|
const {
|
|
@@ -30306,7 +30588,7 @@
|
|
|
30306
30588
|
}
|
|
30307
30589
|
if (isValid$6(verticalAlign) || isValid$6(null == textStyle ? void 0 : textStyle.verticalAlign)) {
|
|
30308
30590
|
const mainTitleVerticalAlign = (null == textStyle ? void 0 : textStyle.verticalAlign) ? null == textStyle ? void 0 : textStyle.verticalAlign : verticalAlign,
|
|
30309
|
-
mainTitleHeight = (null == textStyle ? void 0 : textStyle.height) ? null == textStyle ? void 0 : textStyle.height :
|
|
30591
|
+
mainTitleHeight = (null == textStyle ? void 0 : textStyle.height) ? null == textStyle ? void 0 : textStyle.height : titleHeight;
|
|
30310
30592
|
"top" === mainTitleVerticalAlign ? (null === (_18 = this._mainTitle) || void 0 === _18 || _18.setAttribute("y", 0), null === (_19 = this._mainTitle) || void 0 === _19 || _19.setAttribute("textBaseline", "top")) : "middle" === mainTitleVerticalAlign ? (null === (_20 = this._mainTitle) || void 0 === _20 || _20.setAttribute("y", mainTitleHeight / 2), null === (_21 = this._mainTitle) || void 0 === _21 || _21.setAttribute("textBaseline", "middle")) : "bottom" === mainTitleVerticalAlign && (null === (_22 = this._mainTitle) || void 0 === _22 || _22.setAttribute("y", mainTitleHeight), null === (_23 = this._mainTitle) || void 0 === _23 || _23.setAttribute("textBaseline", "bottom"));
|
|
30311
30593
|
}
|
|
30312
30594
|
if (isValid$6(align) || isValid$6(null == subtextStyle ? void 0 : subtextStyle.align)) {
|
|
@@ -30341,7 +30623,8 @@
|
|
|
30341
30623
|
}
|
|
30342
30624
|
};
|
|
30343
30625
|
|
|
30344
|
-
const
|
|
30626
|
+
const checkSvg = '<svg width="200" height="200" viewBox="0 0 1024 1024" fill="#fff" xmlns="http://www.w3.org/2000/svg"><path d="M877.44815445 206.10060629a64.72691371 64.72691371 0 0 0-95.14856334 4.01306852L380.73381888 685.46812814 235.22771741 533.48933518a64.72691371 64.72691371 0 0 0-92.43003222-1.03563036l-45.82665557 45.82665443a64.72691371 64.72691371 0 0 0-0.90617629 90.61767965l239.61903446 250.10479331a64.72691371 64.72691371 0 0 0 71.19960405 15.14609778 64.33855261 64.33855261 0 0 0 35.08198741-21.23042702l36.24707186-42.71976334 40.5190474-40.77795556-3.36579926-3.49525333 411.40426297-486.74638962a64.72691371 64.72691371 0 0 0-3.88361443-87.64024149l-45.3088404-45.43829334z"></path></svg>',
|
|
30627
|
+
indeterminateSvg = '<svg width="200" height="200" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5" d="M5 12h14"/></svg>';
|
|
30345
30628
|
class CheckBox extends AbstractComponent {
|
|
30346
30629
|
constructor(attributes) {
|
|
30347
30630
|
super(merge$1({}, CheckBox.defaultAttributes, attributes)), this.renderGroup(), this.onBeforeAttributeUpdate = (val, attributes, key) => {
|
|
@@ -30352,16 +30635,22 @@
|
|
|
30352
30635
|
this.removeAllChild(), this.renderBox(), this.renderIcon(), this.renderText(), this.layout();
|
|
30353
30636
|
}
|
|
30354
30637
|
renderBox() {
|
|
30355
|
-
this._box = new Rect$1(merge$1({}, this.attribute.box))
|
|
30638
|
+
this._box = new Rect$1(merge$1({}, this.attribute.box));
|
|
30639
|
+
const isCheckedOrIndeterminate = this.attribute.checked || this.attribute.indeterminate;
|
|
30640
|
+
isCheckedOrIndeterminate && this.attribute.disabled ? this._box.setAttributes({
|
|
30356
30641
|
fill: this.attribute.box.disableCheckedFill,
|
|
30357
30642
|
stroke: this.attribute.box.disableCheckedStroke
|
|
30358
|
-
}) :
|
|
30643
|
+
}) : isCheckedOrIndeterminate && this._box.setAttributes({
|
|
30359
30644
|
fill: this.attribute.box.checkedFill,
|
|
30360
30645
|
stroke: this.attribute.box.checkedStroke
|
|
30361
30646
|
}), this.appendChild(this._box);
|
|
30362
30647
|
}
|
|
30363
30648
|
renderIcon() {
|
|
30364
|
-
this.
|
|
30649
|
+
this._checkIcon = new Image$3(merge$1({
|
|
30650
|
+
image: this.attribute.icon.checkIconImage
|
|
30651
|
+
}, this.attribute.icon)), this.appendChild(this._checkIcon), this._indeterminateIcon = new Image$3(merge$1({
|
|
30652
|
+
image: this.attribute.icon.indeterminateIconImage
|
|
30653
|
+
}, this.attribute.icon)), this.appendChild(this._indeterminateIcon), this.attribute.checked ? (this._checkIcon.setAttribute("visible", !0), this._indeterminateIcon.setAttribute("visible", !1)) : this.attribute.indeterminate ? (this._checkIcon.setAttribute("visible", !1), this._indeterminateIcon.setAttribute("visible", !0)) : (this._checkIcon.setAttribute("visible", !1), this._indeterminateIcon.setAttribute("visible", !1));
|
|
30365
30654
|
}
|
|
30366
30655
|
renderText() {
|
|
30367
30656
|
this._text = new WrapText(merge$1({}, this.attribute.text)), this.attribute.disabled && this._text.setAttribute("fill", this.attribute.text.disableFill), this.appendChild(this._text);
|
|
@@ -30386,7 +30675,10 @@
|
|
|
30386
30675
|
this._box.setAttributes({
|
|
30387
30676
|
x: boxX,
|
|
30388
30677
|
y: boxY
|
|
30389
|
-
}), this.
|
|
30678
|
+
}), this._checkIcon.setAttributes({
|
|
30679
|
+
x: iconX,
|
|
30680
|
+
y: iconY
|
|
30681
|
+
}), this._indeterminateIcon.setAttributes({
|
|
30390
30682
|
x: iconX,
|
|
30391
30683
|
y: iconY
|
|
30392
30684
|
}), this._text.setAttributes({
|
|
@@ -30397,7 +30689,7 @@
|
|
|
30397
30689
|
handleClick() {
|
|
30398
30690
|
var _a;
|
|
30399
30691
|
if (this.attribute.disabled) return;
|
|
30400
|
-
this.attribute.checked ? this.setAttribute("checked", !1) : this.setAttribute("checked", !0);
|
|
30692
|
+
this.attribute.checked ? (this.setAttribute("checked", !1), this.setAttribute("indeterminate", !1)) : (this.setAttribute("checked", !0), this.setAttribute("indeterminate", !1));
|
|
30401
30693
|
const changeEvent = new CustomEvent$1("checkbox_state_change", {
|
|
30402
30694
|
eventType: "checkbox_state_change",
|
|
30403
30695
|
checked: this.attribute.checked
|
|
@@ -30409,6 +30701,7 @@
|
|
|
30409
30701
|
interactive: !0,
|
|
30410
30702
|
disabled: !1,
|
|
30411
30703
|
checked: !1,
|
|
30704
|
+
indeterminate: !1,
|
|
30412
30705
|
cursor: "pointer",
|
|
30413
30706
|
disableCursor: "not-allowed",
|
|
30414
30707
|
spaceBetweenTextAndIcon: 8,
|
|
@@ -30421,7 +30714,8 @@
|
|
|
30421
30714
|
pickable: !1
|
|
30422
30715
|
},
|
|
30423
30716
|
icon: {
|
|
30424
|
-
|
|
30717
|
+
checkIconImage: checkSvg,
|
|
30718
|
+
indeterminateIconImage: indeterminateSvg,
|
|
30425
30719
|
width: 10,
|
|
30426
30720
|
height: 10,
|
|
30427
30721
|
pickable: !1
|
|
@@ -36670,12 +36964,12 @@
|
|
|
36670
36964
|
}
|
|
36671
36965
|
return maybePromiseOrValue;
|
|
36672
36966
|
}
|
|
36673
|
-
function getField(record, field, promiseCallBack) {
|
|
36967
|
+
function getField(record, field, col, row, table, promiseCallBack) {
|
|
36674
36968
|
if (record === null) {
|
|
36675
36969
|
return undefined;
|
|
36676
36970
|
}
|
|
36677
36971
|
if (isPromise$1(record)) {
|
|
36678
|
-
return record.then((r) => getField(r, field, promiseCallBack));
|
|
36972
|
+
return record.then((r) => getField(r, field, col, row, table, promiseCallBack));
|
|
36679
36973
|
}
|
|
36680
36974
|
const fieldGet = isFieldAssessor(field) ? field.get : field;
|
|
36681
36975
|
if (fieldGet in record) {
|
|
@@ -36683,7 +36977,7 @@
|
|
|
36683
36977
|
return getValue(fieldResult, promiseCallBack);
|
|
36684
36978
|
}
|
|
36685
36979
|
if (typeof fieldGet === 'function') {
|
|
36686
|
-
const fieldResult = fieldGet(record);
|
|
36980
|
+
const fieldResult = fieldGet(record, col, row, table);
|
|
36687
36981
|
return getValue(fieldResult, promiseCallBack);
|
|
36688
36982
|
}
|
|
36689
36983
|
if (Array.isArray(fieldGet)) {
|
|
@@ -36695,7 +36989,7 @@
|
|
|
36695
36989
|
const fieldResult = record[fieldGet];
|
|
36696
36990
|
return getValue(fieldResult, promiseCallBack);
|
|
36697
36991
|
}
|
|
36698
|
-
const fieldResult = applyChainSafe(record, (val, name) => getField(val, name, emptyFn), ...fieldArray);
|
|
36992
|
+
const fieldResult = applyChainSafe(record, (val, name) => getField(val, name, col, row, table, emptyFn), ...fieldArray);
|
|
36699
36993
|
return getValue(fieldResult, promiseCallBack);
|
|
36700
36994
|
}
|
|
36701
36995
|
function _getIndex(sortedIndexMap, index) {
|
|
@@ -36823,8 +37117,11 @@
|
|
|
36823
37117
|
getIndexKey(index) {
|
|
36824
37118
|
return _getIndex(this.currentPagerIndexedData, index);
|
|
36825
37119
|
}
|
|
36826
|
-
|
|
36827
|
-
return this.
|
|
37120
|
+
getTableIndex(colOrRow) {
|
|
37121
|
+
return this.currentPagerIndexedData.findIndex(value => value === colOrRow);
|
|
37122
|
+
}
|
|
37123
|
+
getField(index, field, col, row, table) {
|
|
37124
|
+
return this.getOriginalField(_getIndex(this.currentPagerIndexedData, index), field, col, row, table);
|
|
36828
37125
|
}
|
|
36829
37126
|
hasField(index, field) {
|
|
36830
37127
|
return this.hasOriginalField(_getIndex(this.currentPagerIndexedData, index), field);
|
|
@@ -37016,12 +37313,12 @@
|
|
|
37016
37313
|
this.recordPromiseCallBack(index, val);
|
|
37017
37314
|
});
|
|
37018
37315
|
}
|
|
37019
|
-
getOriginalField(index, field) {
|
|
37316
|
+
getOriginalField(index, field, col, row, table) {
|
|
37020
37317
|
if (field === null) {
|
|
37021
37318
|
return undefined;
|
|
37022
37319
|
}
|
|
37023
37320
|
const record = this.getOriginalRecord(index);
|
|
37024
|
-
return getField(record, field, (val) => {
|
|
37321
|
+
return getField(record, field, col, row, table, (val) => {
|
|
37025
37322
|
this.fieldPromiseCallBack(index, field, val);
|
|
37026
37323
|
});
|
|
37027
37324
|
}
|
|
@@ -37079,7 +37376,7 @@
|
|
|
37079
37376
|
}
|
|
37080
37377
|
return super.getOriginalRecord(index);
|
|
37081
37378
|
}
|
|
37082
|
-
getOriginalField(index, field) {
|
|
37379
|
+
getOriginalField(index, field, col, row, table) {
|
|
37083
37380
|
const rowCache = this._fieldCache && this._fieldCache[index];
|
|
37084
37381
|
if (rowCache) {
|
|
37085
37382
|
const cache = rowCache.get(field);
|
|
@@ -37087,7 +37384,7 @@
|
|
|
37087
37384
|
return cache;
|
|
37088
37385
|
}
|
|
37089
37386
|
}
|
|
37090
|
-
return super.getOriginalField(index, field);
|
|
37387
|
+
return super.getOriginalField(index, field, col, row, table);
|
|
37091
37388
|
}
|
|
37092
37389
|
clearCache() {
|
|
37093
37390
|
if (this._recordCache) {
|
|
@@ -37991,9 +38288,6 @@
|
|
|
37991
38288
|
table
|
|
37992
38289
|
};
|
|
37993
38290
|
const customRenderObj = customLayout(arg);
|
|
37994
|
-
if (customRenderObj.rootContainer) {
|
|
37995
|
-
customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer);
|
|
37996
|
-
}
|
|
37997
38291
|
if (customRenderObj.rootContainer instanceof Group$1) {
|
|
37998
38292
|
elementsGroup = customRenderObj.rootContainer;
|
|
37999
38293
|
elementsGroup.name = 'custom-container';
|
|
@@ -38242,23 +38536,6 @@
|
|
|
38242
38536
|
}
|
|
38243
38537
|
return parseInt(str, 10);
|
|
38244
38538
|
}
|
|
38245
|
-
function decodeReactDom(dom) {
|
|
38246
|
-
if (!dom.$$typeof) {
|
|
38247
|
-
return dom;
|
|
38248
|
-
}
|
|
38249
|
-
const type = dom.type;
|
|
38250
|
-
const { attribute, children } = dom.props;
|
|
38251
|
-
const g = type({ attribute });
|
|
38252
|
-
g.id = attribute.id;
|
|
38253
|
-
g.name = attribute.name;
|
|
38254
|
-
children &&
|
|
38255
|
-
children.length &&
|
|
38256
|
-
children.forEach((item) => {
|
|
38257
|
-
const c = decodeReactDom(item);
|
|
38258
|
-
g.add(c);
|
|
38259
|
-
});
|
|
38260
|
-
return g;
|
|
38261
|
-
}
|
|
38262
38539
|
|
|
38263
38540
|
const icons = {};
|
|
38264
38541
|
class IconCache {
|
|
@@ -39594,7 +39871,7 @@
|
|
|
39594
39871
|
else {
|
|
39595
39872
|
const define = table.getBodyColumnDefine(col, row);
|
|
39596
39873
|
if (define?.tree) {
|
|
39597
|
-
const indexArr = table.dataSource.getIndexKey(table.
|
|
39874
|
+
const indexArr = table.dataSource.getIndexKey(table.getRecordIndexByCell(col, row));
|
|
39598
39875
|
cellHierarchyIndent =
|
|
39599
39876
|
Array.isArray(indexArr) && table.getHierarchyState(col, row) !== HierarchyState.none
|
|
39600
39877
|
? (indexArr.length - 1) * (layoutMap.hierarchyIndent ?? 0)
|
|
@@ -40956,9 +41233,6 @@
|
|
|
40956
41233
|
};
|
|
40957
41234
|
if (customLayout) {
|
|
40958
41235
|
const customLayoutObj = customLayout(arg);
|
|
40959
|
-
if (customLayoutObj.rootContainer) {
|
|
40960
|
-
customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
|
|
40961
|
-
}
|
|
40962
41236
|
if (customLayoutObj.rootContainer instanceof Group$1) {
|
|
40963
41237
|
height = customLayoutObj.rootContainer.AABBBounds.height() ?? 0;
|
|
40964
41238
|
}
|
|
@@ -43519,7 +43793,7 @@
|
|
|
43519
43793
|
? table._getHeaderLayoutMap(col, row)?.headerType
|
|
43520
43794
|
: table.getBodyColumnType(col, row);
|
|
43521
43795
|
if (cellType !== 'text' && cellType !== 'link' && cellType !== 'progressbar') {
|
|
43522
|
-
maxWidth = Math.max(maxWidth, table.
|
|
43796
|
+
maxWidth = Math.max(maxWidth, table.getColWidthDefinedNumber(col) || 0);
|
|
43523
43797
|
continue;
|
|
43524
43798
|
}
|
|
43525
43799
|
let cellHierarchyIndent = 0;
|
|
@@ -43536,7 +43810,7 @@
|
|
|
43536
43810
|
else {
|
|
43537
43811
|
const define = table.getBodyColumnDefine(col, row);
|
|
43538
43812
|
if (define?.tree) {
|
|
43539
|
-
const indexArr = table.dataSource.getIndexKey(table.
|
|
43813
|
+
const indexArr = table.dataSource.getIndexKey(table.getRecordIndexByCell(col, row));
|
|
43540
43814
|
cellHierarchyIndent =
|
|
43541
43815
|
Array.isArray(indexArr) && table.getHierarchyState(col, row) !== HierarchyState.none
|
|
43542
43816
|
? (indexArr.length - 1) * (layoutMap.hierarchyIndent ?? 0)
|
|
@@ -43576,9 +43850,6 @@
|
|
|
43576
43850
|
};
|
|
43577
43851
|
if (customLayout) {
|
|
43578
43852
|
const customLayoutObj = customLayout(arg);
|
|
43579
|
-
if (customLayoutObj.rootContainer) {
|
|
43580
|
-
customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
|
|
43581
|
-
}
|
|
43582
43853
|
if (customLayoutObj.rootContainer instanceof Group$1) {
|
|
43583
43854
|
width = customLayoutObj.rootContainer.AABBBounds.width() ?? 0;
|
|
43584
43855
|
}
|
|
@@ -43947,25 +44218,33 @@
|
|
|
43947
44218
|
const dataValue = table.getCellOriginValue(col, row);
|
|
43948
44219
|
let isChecked;
|
|
43949
44220
|
let isDisabled;
|
|
43950
|
-
let text = value;
|
|
44221
|
+
let text = value ?? '';
|
|
43951
44222
|
if (isObject$4(value)) {
|
|
43952
44223
|
isChecked = value.checked;
|
|
43953
44224
|
isDisabled = value.disable;
|
|
43954
44225
|
text = value.text;
|
|
43955
44226
|
}
|
|
44227
|
+
else if (typeof value === 'boolean') {
|
|
44228
|
+
isChecked = value;
|
|
44229
|
+
text = '';
|
|
44230
|
+
}
|
|
44231
|
+
isChecked = table.stateManeger.syncCheckedState(col, row, define.field, isChecked);
|
|
43956
44232
|
const hierarchyOffset = getHierarchyOffset(col, row, table);
|
|
43957
44233
|
const cellStyle = table._getCellStyle(col, row);
|
|
43958
44234
|
const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
43959
44235
|
const { lineClamp } = cellStyle;
|
|
43960
44236
|
const { checked, disable } = define;
|
|
43961
|
-
|
|
43962
|
-
|
|
43963
|
-
|
|
43964
|
-
|
|
43965
|
-
|
|
43966
|
-
|
|
43967
|
-
|
|
43968
|
-
|
|
44237
|
+
if (isChecked === undefined || isChecked === null || typeof isChecked === 'function') {
|
|
44238
|
+
const globalChecked = getOrApply(checked, {
|
|
44239
|
+
col,
|
|
44240
|
+
row,
|
|
44241
|
+
table,
|
|
44242
|
+
context: null,
|
|
44243
|
+
value,
|
|
44244
|
+
dataValue
|
|
44245
|
+
});
|
|
44246
|
+
isChecked = table.stateManeger.syncCheckedState(col, row, define.field, globalChecked);
|
|
44247
|
+
}
|
|
43969
44248
|
const globalDisable = getOrApply(disable, {
|
|
43970
44249
|
col,
|
|
43971
44250
|
row,
|
|
@@ -43988,13 +44267,27 @@
|
|
|
43988
44267
|
dx: hierarchyOffset
|
|
43989
44268
|
};
|
|
43990
44269
|
const testAttribute = cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute;
|
|
43991
|
-
|
|
43992
|
-
|
|
43993
|
-
|
|
43994
|
-
|
|
43995
|
-
|
|
43996
|
-
|
|
43997
|
-
|
|
44270
|
+
let checkbox;
|
|
44271
|
+
if (isChecked === 'indeterminate') {
|
|
44272
|
+
checkbox = new CheckBox({
|
|
44273
|
+
x: 0,
|
|
44274
|
+
y: 0,
|
|
44275
|
+
text: testAttribute,
|
|
44276
|
+
checked: undefined,
|
|
44277
|
+
indeterminate: true,
|
|
44278
|
+
disabled: isDisabled ?? globalDisable ?? false
|
|
44279
|
+
});
|
|
44280
|
+
}
|
|
44281
|
+
else {
|
|
44282
|
+
checkbox = new CheckBox({
|
|
44283
|
+
x: 0,
|
|
44284
|
+
y: 0,
|
|
44285
|
+
text: testAttribute,
|
|
44286
|
+
checked: isChecked,
|
|
44287
|
+
indeterminate: undefined,
|
|
44288
|
+
disabled: isDisabled ?? globalDisable ?? false
|
|
44289
|
+
});
|
|
44290
|
+
}
|
|
43998
44291
|
checkbox.name = 'checkbox';
|
|
43999
44292
|
return checkbox;
|
|
44000
44293
|
}
|
|
@@ -44202,8 +44495,11 @@
|
|
|
44202
44495
|
return newCellGroup;
|
|
44203
44496
|
}
|
|
44204
44497
|
function updateCellContent(type, define, table, col, row, bgColorFunc, cellWidth, cellHeight, oldCellGroup, padding, textAlign, textBaseline, mayHaveIcon, isMerge, range, addNew, cellTheme) {
|
|
44498
|
+
if (oldCellGroup.row !== row || oldCellGroup.col !== col) {
|
|
44499
|
+
return null;
|
|
44500
|
+
}
|
|
44205
44501
|
const newCellGroup = createCell(type, define, table, col, row, table.getColWidth(col), cellWidth, cellHeight, addNew ? table.scenegraph.getColGroup(col) : oldCellGroup.parent, addNew ? 0 : table.scenegraph.getCellGroupY(row), padding, textAlign, textBaseline, mayHaveIcon, isMerge, range, cellTheme);
|
|
44206
|
-
if (!addNew) {
|
|
44502
|
+
if (!addNew && oldCellGroup.parent) {
|
|
44207
44503
|
oldCellGroup.parent.insertAfter(newCellGroup, oldCellGroup);
|
|
44208
44504
|
oldCellGroup.parent.removeChild(oldCellGroup);
|
|
44209
44505
|
if (table.scenegraph?.proxy.cellCache.get(col)) {
|
|
@@ -44967,14 +45263,27 @@
|
|
|
44967
45263
|
proxy.updateCellGroupContent(cellGroup);
|
|
44968
45264
|
}
|
|
44969
45265
|
}
|
|
45266
|
+
proxy.table.scenegraph.updateNextFrame();
|
|
44970
45267
|
}
|
|
44971
45268
|
|
|
44972
45269
|
async function sortVertical(proxy) {
|
|
45270
|
+
for (let col = 0; col < proxy.table.frozenColCount; col++) {
|
|
45271
|
+
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
45272
|
+
colGroup?.forEachChildren((cellGroup, index) => {
|
|
45273
|
+
cellGroup.needUpdate = true;
|
|
45274
|
+
});
|
|
45275
|
+
}
|
|
45276
|
+
for (let col = proxy.table.colCount - proxy.table.rightFrozenColCount; col < proxy.table.colCount; col++) {
|
|
45277
|
+
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
45278
|
+
colGroup?.forEachChildren((cellGroup, index) => {
|
|
45279
|
+
cellGroup.needUpdate = true;
|
|
45280
|
+
});
|
|
45281
|
+
}
|
|
44973
45282
|
for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {
|
|
44974
|
-
|
|
44975
|
-
|
|
45283
|
+
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
45284
|
+
colGroup?.forEachChildren((cellGroup, index) => {
|
|
44976
45285
|
cellGroup.needUpdate = true;
|
|
44977
|
-
}
|
|
45286
|
+
});
|
|
44978
45287
|
}
|
|
44979
45288
|
let syncTopRow;
|
|
44980
45289
|
let syncBottomRow;
|
|
@@ -45000,13 +45309,22 @@
|
|
|
45000
45309
|
}
|
|
45001
45310
|
|
|
45002
45311
|
async function sortHorizontal(proxy) {
|
|
45003
|
-
|
|
45004
|
-
|
|
45005
|
-
|
|
45006
|
-
|
|
45007
|
-
|
|
45008
|
-
|
|
45009
|
-
|
|
45312
|
+
proxy.table.scenegraph.bottomFrozenGroup.forEachChildren((colGroup, index) => {
|
|
45313
|
+
if (colGroup.type === 'group') {
|
|
45314
|
+
colGroup.needUpdate = true;
|
|
45315
|
+
colGroup?.forEachChildren((cellGroup) => {
|
|
45316
|
+
cellGroup.needUpdate = true;
|
|
45317
|
+
});
|
|
45318
|
+
}
|
|
45319
|
+
});
|
|
45320
|
+
proxy.table.scenegraph.bodyGroup.forEachChildren((colGroup, index) => {
|
|
45321
|
+
if (colGroup.type === 'group') {
|
|
45322
|
+
colGroup.needUpdate = true;
|
|
45323
|
+
colGroup?.forEachChildren((cellGroup) => {
|
|
45324
|
+
cellGroup.needUpdate = true;
|
|
45325
|
+
});
|
|
45326
|
+
}
|
|
45327
|
+
});
|
|
45010
45328
|
const syncLeftCol = Math.max(proxy.bodyLeftCol, proxy.screenLeftCol - proxy.screenColCount * 1);
|
|
45011
45329
|
const syncRightCol = Math.min(proxy.bodyRightCol, proxy.screenLeftCol + proxy.screenColCount * 2);
|
|
45012
45330
|
computeColsWidth(proxy.table, syncLeftCol, syncRightCol);
|
|
@@ -47115,6 +47433,68 @@
|
|
|
47115
47433
|
updateChartState(datum) {
|
|
47116
47434
|
this.table.isPivotChart() && updateChartState(this, datum);
|
|
47117
47435
|
}
|
|
47436
|
+
updateCheckboxCellState(col, row, checked) {
|
|
47437
|
+
if (this.transpose) {
|
|
47438
|
+
this.bodyGroup.children?.forEach((columnGroup) => {
|
|
47439
|
+
columnGroup
|
|
47440
|
+
.getChildAt(row)
|
|
47441
|
+
.getChildren()
|
|
47442
|
+
.forEach((node) => {
|
|
47443
|
+
if (node.name === 'checkbox') {
|
|
47444
|
+
node.setAttribute('checked', checked);
|
|
47445
|
+
}
|
|
47446
|
+
});
|
|
47447
|
+
});
|
|
47448
|
+
}
|
|
47449
|
+
else {
|
|
47450
|
+
const columnGroup = this.getColGroup(col);
|
|
47451
|
+
columnGroup.children?.forEach((cellNode) => {
|
|
47452
|
+
cellNode.getChildren().find(node => {
|
|
47453
|
+
if (node.name === 'checkbox') {
|
|
47454
|
+
node.setAttribute('checked', checked);
|
|
47455
|
+
}
|
|
47456
|
+
});
|
|
47457
|
+
});
|
|
47458
|
+
}
|
|
47459
|
+
}
|
|
47460
|
+
updateHeaderCheckboxCellState(col, row, checked) {
|
|
47461
|
+
if (this.transpose) {
|
|
47462
|
+
this.rowHeaderGroup.children?.forEach((columnGroup) => {
|
|
47463
|
+
columnGroup
|
|
47464
|
+
.getChildAt(row)
|
|
47465
|
+
.getChildren()
|
|
47466
|
+
.forEach((node) => {
|
|
47467
|
+
if (node.name === 'checkbox') {
|
|
47468
|
+
if (checked === 'indeterminate') {
|
|
47469
|
+
node.setAttribute('indeterminate', true);
|
|
47470
|
+
node.setAttribute('checked', undefined);
|
|
47471
|
+
}
|
|
47472
|
+
else {
|
|
47473
|
+
node.setAttribute('indeterminate', undefined);
|
|
47474
|
+
node.setAttribute('checked', checked);
|
|
47475
|
+
}
|
|
47476
|
+
}
|
|
47477
|
+
});
|
|
47478
|
+
});
|
|
47479
|
+
}
|
|
47480
|
+
else {
|
|
47481
|
+
const columnGroup = this.getColGroup(col, true);
|
|
47482
|
+
columnGroup.children?.forEach((cellNode) => {
|
|
47483
|
+
cellNode.getChildren().find(node => {
|
|
47484
|
+
if (node.name === 'checkbox') {
|
|
47485
|
+
if (checked === 'indeterminate') {
|
|
47486
|
+
node.setAttribute('indeterminate', true);
|
|
47487
|
+
node.setAttribute('checked', undefined);
|
|
47488
|
+
}
|
|
47489
|
+
else {
|
|
47490
|
+
node.setAttribute('indeterminate', undefined);
|
|
47491
|
+
node.setAttribute('checked', checked);
|
|
47492
|
+
}
|
|
47493
|
+
}
|
|
47494
|
+
});
|
|
47495
|
+
});
|
|
47496
|
+
}
|
|
47497
|
+
}
|
|
47118
47498
|
updateAutoColWidth(col) {
|
|
47119
47499
|
this.table.internalProps._widthResizedColMap.delete(col);
|
|
47120
47500
|
const oldWidth = this.table.getColWidth(col);
|
|
@@ -47130,16 +47510,17 @@
|
|
|
47130
47510
|
computeRowsHeight(this.table, 0, this.table.rowCount - 1, true, true);
|
|
47131
47511
|
}
|
|
47132
47512
|
resize() {
|
|
47133
|
-
if (this.table.
|
|
47134
|
-
if (this.table.
|
|
47513
|
+
if (this.table.widthMode === 'adaptive' || this.table.autoFillWidth) {
|
|
47514
|
+
if (this.table.internalProps._widthResizedColMap.size === 0) {
|
|
47135
47515
|
this.recalculateColWidths();
|
|
47136
47516
|
}
|
|
47137
|
-
|
|
47138
|
-
this.
|
|
47517
|
+
else {
|
|
47518
|
+
this.dealWidthMode();
|
|
47139
47519
|
}
|
|
47140
47520
|
}
|
|
47141
|
-
this.
|
|
47142
|
-
|
|
47521
|
+
if (this.table.heightMode === 'adaptive' || this.table.autoFillHeight) {
|
|
47522
|
+
this.recalculateRowHeights();
|
|
47523
|
+
}
|
|
47143
47524
|
this.resetFrozen();
|
|
47144
47525
|
this.updateTableSize();
|
|
47145
47526
|
this.updateBorderSizeAndPosition();
|
|
@@ -48602,6 +48983,10 @@
|
|
|
48602
48983
|
_clearVerticalScrollBar;
|
|
48603
48984
|
_clearHorizontalScrollBar;
|
|
48604
48985
|
fastScrolling = false;
|
|
48986
|
+
checkedState = [];
|
|
48987
|
+
headerCheckedState = {};
|
|
48988
|
+
_checkboxCellTypeFields = [];
|
|
48989
|
+
_headerCheckFuncs = {};
|
|
48605
48990
|
resetInteractionState = debounce(() => {
|
|
48606
48991
|
this.updateInteractionState(InteractionState.default);
|
|
48607
48992
|
}, 100);
|
|
@@ -49207,6 +49592,155 @@
|
|
|
49207
49592
|
this.sparkLine.row = -1;
|
|
49208
49593
|
}
|
|
49209
49594
|
}
|
|
49595
|
+
setCheckedState(col, row, field, checked) {
|
|
49596
|
+
const recordIndex = this.table.getRecordIndexByCell(col, row);
|
|
49597
|
+
if (recordIndex >= 0) {
|
|
49598
|
+
const dataIndex = this.table.dataSource.getIndexKey(recordIndex);
|
|
49599
|
+
if (this.checkedState[dataIndex]) {
|
|
49600
|
+
this.checkedState[dataIndex][field] = checked;
|
|
49601
|
+
}
|
|
49602
|
+
else {
|
|
49603
|
+
this.checkedState[dataIndex] = {};
|
|
49604
|
+
this.checkedState[dataIndex][field] = checked;
|
|
49605
|
+
}
|
|
49606
|
+
}
|
|
49607
|
+
}
|
|
49608
|
+
setHeaderCheckedState(field, checked) {
|
|
49609
|
+
this.headerCheckedState[field] = checked;
|
|
49610
|
+
this.checkedState?.forEach(recordCheckState => {
|
|
49611
|
+
recordCheckState[field] = checked;
|
|
49612
|
+
});
|
|
49613
|
+
}
|
|
49614
|
+
syncCheckedState(col, row, field, checked) {
|
|
49615
|
+
if (this.table.isHeader(col, row)) {
|
|
49616
|
+
if (isValid$6(this.headerCheckedState[field])) {
|
|
49617
|
+
return this.headerCheckedState[field];
|
|
49618
|
+
}
|
|
49619
|
+
else if (typeof checked === 'function') {
|
|
49620
|
+
return undefined;
|
|
49621
|
+
}
|
|
49622
|
+
else if (isValid$6(checked)) {
|
|
49623
|
+
this.headerCheckedState[field] = checked;
|
|
49624
|
+
}
|
|
49625
|
+
else if (this.checkedState?.length > 0) {
|
|
49626
|
+
const isAllChecked = this.updateHeaderCheckedState(field);
|
|
49627
|
+
return isAllChecked;
|
|
49628
|
+
}
|
|
49629
|
+
return this.headerCheckedState[field];
|
|
49630
|
+
}
|
|
49631
|
+
const recordIndex = this.table.getRecordIndexByCell(col, row);
|
|
49632
|
+
if (recordIndex >= 0) {
|
|
49633
|
+
const dataIndex = this.table.dataSource.getIndexKey(recordIndex);
|
|
49634
|
+
if (isValid$6(this.checkedState[dataIndex]?.[field])) {
|
|
49635
|
+
return this.checkedState[dataIndex][field];
|
|
49636
|
+
}
|
|
49637
|
+
if (this.checkedState[dataIndex]) {
|
|
49638
|
+
this.checkedState[dataIndex][field] = checked;
|
|
49639
|
+
}
|
|
49640
|
+
else {
|
|
49641
|
+
this.checkedState[dataIndex] = {};
|
|
49642
|
+
this.checkedState[dataIndex][field] = checked;
|
|
49643
|
+
}
|
|
49644
|
+
}
|
|
49645
|
+
return checked;
|
|
49646
|
+
}
|
|
49647
|
+
initCheckedState(records) {
|
|
49648
|
+
let isNeedInitHeaderCheckedStateFromRecord = false;
|
|
49649
|
+
this._checkboxCellTypeFields = [];
|
|
49650
|
+
this._headerCheckFuncs = {};
|
|
49651
|
+
this.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
|
|
49652
|
+
if (hd.headerType === 'checkbox') {
|
|
49653
|
+
const headerChecked = hd.define.checked;
|
|
49654
|
+
if (headerChecked === undefined || headerChecked === null || typeof headerChecked === 'function') {
|
|
49655
|
+
isNeedInitHeaderCheckedStateFromRecord = true;
|
|
49656
|
+
if (typeof headerChecked === 'function') {
|
|
49657
|
+
this._headerCheckFuncs[hd.field] = headerChecked;
|
|
49658
|
+
}
|
|
49659
|
+
}
|
|
49660
|
+
else {
|
|
49661
|
+
this.headerCheckedState[hd.field] = headerChecked;
|
|
49662
|
+
}
|
|
49663
|
+
if (hd.define.cellType === 'checkbox' && !hd.fieldFormat) {
|
|
49664
|
+
this._checkboxCellTypeFields.push(hd.field);
|
|
49665
|
+
}
|
|
49666
|
+
}
|
|
49667
|
+
});
|
|
49668
|
+
if (isNeedInitHeaderCheckedStateFromRecord) {
|
|
49669
|
+
records.forEach((record, index) => {
|
|
49670
|
+
this._checkboxCellTypeFields.forEach(field => {
|
|
49671
|
+
const value = record[field];
|
|
49672
|
+
let isChecked;
|
|
49673
|
+
if (isObject$4(value)) {
|
|
49674
|
+
isChecked = value.checked;
|
|
49675
|
+
}
|
|
49676
|
+
else if (typeof value === 'boolean') {
|
|
49677
|
+
isChecked = value;
|
|
49678
|
+
}
|
|
49679
|
+
if (isChecked === undefined || isChecked === null) {
|
|
49680
|
+
const headerCheckFunc = this._headerCheckFuncs[field];
|
|
49681
|
+
if (headerCheckFunc) {
|
|
49682
|
+
const cellAddr = this.table.getCellAddrByFieldRecord(field, index);
|
|
49683
|
+
const globalChecked = getOrApply(headerCheckFunc, {
|
|
49684
|
+
col: cellAddr.col,
|
|
49685
|
+
row: cellAddr.row,
|
|
49686
|
+
table: this.table,
|
|
49687
|
+
context: null,
|
|
49688
|
+
value
|
|
49689
|
+
});
|
|
49690
|
+
isChecked = globalChecked;
|
|
49691
|
+
}
|
|
49692
|
+
}
|
|
49693
|
+
if (!this.checkedState[index]) {
|
|
49694
|
+
this.checkedState[index] = {};
|
|
49695
|
+
}
|
|
49696
|
+
this.checkedState[index][field] = isChecked;
|
|
49697
|
+
});
|
|
49698
|
+
});
|
|
49699
|
+
}
|
|
49700
|
+
}
|
|
49701
|
+
updateHeaderCheckedState(field) {
|
|
49702
|
+
const allChecked = this.checkedState.every((state) => {
|
|
49703
|
+
return state[field] === true;
|
|
49704
|
+
});
|
|
49705
|
+
if (allChecked) {
|
|
49706
|
+
this.headerCheckedState[field] = true;
|
|
49707
|
+
return allChecked;
|
|
49708
|
+
}
|
|
49709
|
+
const allUnChecked = this.checkedState.every((state) => {
|
|
49710
|
+
return state[field] === false;
|
|
49711
|
+
});
|
|
49712
|
+
if (allUnChecked) {
|
|
49713
|
+
this.headerCheckedState[field] = false;
|
|
49714
|
+
return false;
|
|
49715
|
+
}
|
|
49716
|
+
const hasChecked = this.checkedState.find((state) => {
|
|
49717
|
+
return state[field] === true;
|
|
49718
|
+
});
|
|
49719
|
+
if (hasChecked) {
|
|
49720
|
+
this.headerCheckedState[field] = 'indeterminate';
|
|
49721
|
+
return 'indeterminate';
|
|
49722
|
+
}
|
|
49723
|
+
return false;
|
|
49724
|
+
}
|
|
49725
|
+
initLeftRecordsCheckState(records) {
|
|
49726
|
+
for (let index = this.checkedState.length; index < records.length; index++) {
|
|
49727
|
+
const record = records[index];
|
|
49728
|
+
this._checkboxCellTypeFields.forEach(field => {
|
|
49729
|
+
const value = record[field];
|
|
49730
|
+
let isChecked;
|
|
49731
|
+
if (isObject$4(value)) {
|
|
49732
|
+
isChecked = value.checked;
|
|
49733
|
+
}
|
|
49734
|
+
else if (typeof value === 'boolean') {
|
|
49735
|
+
isChecked = value;
|
|
49736
|
+
}
|
|
49737
|
+
if (!this.checkedState[index]) {
|
|
49738
|
+
this.checkedState[index] = {};
|
|
49739
|
+
}
|
|
49740
|
+
this.checkedState[index][field] = isChecked;
|
|
49741
|
+
});
|
|
49742
|
+
}
|
|
49743
|
+
}
|
|
49210
49744
|
}
|
|
49211
49745
|
|
|
49212
49746
|
function bindMediaClick(table) {
|
|
@@ -49537,7 +50071,9 @@
|
|
|
49537
50071
|
table.scenegraph.tableGroup.addEventListener('pointerover', (e) => {
|
|
49538
50072
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
49539
50073
|
const cellGoup = eventArgsSet?.eventArgs?.target;
|
|
49540
|
-
if (
|
|
50074
|
+
if (cellGoup &&
|
|
50075
|
+
table.hasListeners(TABLE_EVENT_TYPE.MOUSEOVER_CHART_SYMBOL) &&
|
|
50076
|
+
cellGoup.type === 'symbol') {
|
|
49541
50077
|
const cellGroup = e.composedPath().find(p => p.roll === 'cell');
|
|
49542
50078
|
if (cellGroup) {
|
|
49543
50079
|
const { col, row } = cellGroup;
|
|
@@ -49848,6 +50384,24 @@
|
|
|
49848
50384
|
target: eventArgsSet?.eventArgs?.target,
|
|
49849
50385
|
checked: e.detail.checked
|
|
49850
50386
|
};
|
|
50387
|
+
if (table.isHeader(col, row)) {
|
|
50388
|
+
table.stateManeger.setHeaderCheckedState(cellInfo.field, e.detail.checked);
|
|
50389
|
+
const define = table.getBodyColumnDefine(col, row);
|
|
50390
|
+
if (define.cellType === 'checkbox') {
|
|
50391
|
+
table.scenegraph.updateCheckboxCellState(col, row, e.detail.checked);
|
|
50392
|
+
}
|
|
50393
|
+
}
|
|
50394
|
+
else {
|
|
50395
|
+
table.stateManeger.setCheckedState(col, row, cellInfo.field, e.detail.checked);
|
|
50396
|
+
const define = table.getBodyColumnDefine(col, row);
|
|
50397
|
+
if (define.headerType === 'checkbox') {
|
|
50398
|
+
const oldHeaderCheckedState = table.stateManeger.headerCheckedState[cellInfo.field];
|
|
50399
|
+
const newHeaderCheckedState = table.stateManeger.updateHeaderCheckedState(cellInfo.field);
|
|
50400
|
+
if (oldHeaderCheckedState !== newHeaderCheckedState) {
|
|
50401
|
+
table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
50402
|
+
}
|
|
50403
|
+
}
|
|
50404
|
+
}
|
|
49851
50405
|
table.fireListeners(TABLE_EVENT_TYPE.CHECKBOX_STATE_CHANGE, cellsEvent);
|
|
49852
50406
|
});
|
|
49853
50407
|
}
|
|
@@ -50486,7 +51040,7 @@
|
|
|
50486
51040
|
}
|
|
50487
51041
|
}
|
|
50488
51042
|
|
|
50489
|
-
let defaultStyle$
|
|
51043
|
+
let defaultStyle$3;
|
|
50490
51044
|
const DEFAULT_BAR_COLOR = (args) => {
|
|
50491
51045
|
const num = args.value;
|
|
50492
51046
|
if (Number(num) > 80) {
|
|
@@ -50517,7 +51071,7 @@
|
|
|
50517
51071
|
_barMarkPosition;
|
|
50518
51072
|
_barRightToLeft;
|
|
50519
51073
|
static get DEFAULT() {
|
|
50520
|
-
return defaultStyle$
|
|
51074
|
+
return defaultStyle$3 ? defaultStyle$3 : (defaultStyle$3 = new ProgressBarStyle());
|
|
50521
51075
|
}
|
|
50522
51076
|
constructor(style = {}, bodyStyle = {}) {
|
|
50523
51077
|
super(style, bodyStyle);
|
|
@@ -50655,10 +51209,10 @@
|
|
|
50655
51209
|
];
|
|
50656
51210
|
const iconPropKeys = ICON_PROP_KEYS;
|
|
50657
51211
|
|
|
50658
|
-
let defaultStyle$
|
|
50659
|
-
class CheckboxStyle extends Style$1 {
|
|
51212
|
+
let defaultStyle$2;
|
|
51213
|
+
let CheckboxStyle$1 = class CheckboxStyle extends Style$1 {
|
|
50660
51214
|
static get DEFAULT() {
|
|
50661
|
-
return defaultStyle$
|
|
51215
|
+
return defaultStyle$2 ? defaultStyle$2 : (defaultStyle$2 = new CheckboxStyle());
|
|
50662
51216
|
}
|
|
50663
51217
|
constructor(style = {}, bodyStyle = {}) {
|
|
50664
51218
|
super(style, bodyStyle);
|
|
@@ -50666,7 +51220,7 @@
|
|
|
50666
51220
|
clone() {
|
|
50667
51221
|
return new CheckboxStyle(this, null);
|
|
50668
51222
|
}
|
|
50669
|
-
}
|
|
51223
|
+
};
|
|
50670
51224
|
|
|
50671
51225
|
class BodyHelper {
|
|
50672
51226
|
expandIcon;
|
|
@@ -50747,7 +51301,7 @@
|
|
|
50747
51301
|
case 'progressbar':
|
|
50748
51302
|
return ProgressBarStyle;
|
|
50749
51303
|
case 'checkbox':
|
|
50750
|
-
return CheckboxStyle;
|
|
51304
|
+
return CheckboxStyle$1;
|
|
50751
51305
|
}
|
|
50752
51306
|
}
|
|
50753
51307
|
getCellIconFromRecordValue(icon, col, row) {
|
|
@@ -51386,10 +51940,10 @@
|
|
|
51386
51940
|
return itemContainer;
|
|
51387
51941
|
}
|
|
51388
51942
|
|
|
51389
|
-
let defaultStyle;
|
|
51943
|
+
let defaultStyle$1;
|
|
51390
51944
|
class ImageStyle extends Style {
|
|
51391
51945
|
static get DEFAULT() {
|
|
51392
|
-
return defaultStyle ? defaultStyle : (defaultStyle = new ImageStyle());
|
|
51946
|
+
return defaultStyle$1 ? defaultStyle$1 : (defaultStyle$1 = new ImageStyle());
|
|
51393
51947
|
}
|
|
51394
51948
|
constructor(style = {}, headerStyle = {}) {
|
|
51395
51949
|
super(style, headerStyle);
|
|
@@ -51400,6 +51954,19 @@
|
|
|
51400
51954
|
}
|
|
51401
51955
|
}
|
|
51402
51956
|
|
|
51957
|
+
let defaultStyle;
|
|
51958
|
+
class CheckboxStyle extends Style {
|
|
51959
|
+
static get DEFAULT() {
|
|
51960
|
+
return defaultStyle ? defaultStyle : (defaultStyle = new CheckboxStyle());
|
|
51961
|
+
}
|
|
51962
|
+
constructor(style = {}, headerStyle = {}) {
|
|
51963
|
+
super(style, headerStyle);
|
|
51964
|
+
}
|
|
51965
|
+
clone() {
|
|
51966
|
+
return new CheckboxStyle(this);
|
|
51967
|
+
}
|
|
51968
|
+
}
|
|
51969
|
+
|
|
51403
51970
|
class HeaderHelper {
|
|
51404
51971
|
normalIcon;
|
|
51405
51972
|
upIcon;
|
|
@@ -51688,6 +52255,8 @@
|
|
|
51688
52255
|
return ImageStyle;
|
|
51689
52256
|
case 'link':
|
|
51690
52257
|
return TextHeaderStyle;
|
|
52258
|
+
case 'checkbox':
|
|
52259
|
+
return CheckboxStyle;
|
|
51691
52260
|
}
|
|
51692
52261
|
}
|
|
51693
52262
|
}
|
|
@@ -53294,7 +53863,7 @@
|
|
|
53294
53863
|
return TABLE_EVENT_TYPE;
|
|
53295
53864
|
}
|
|
53296
53865
|
options;
|
|
53297
|
-
version = "0.13.
|
|
53866
|
+
version = "0.13.2-alpha.0";
|
|
53298
53867
|
pagination;
|
|
53299
53868
|
id = `VTable${Date.now()}`;
|
|
53300
53869
|
headerStyleCache;
|
|
@@ -53820,6 +54389,10 @@
|
|
|
53820
54389
|
}
|
|
53821
54390
|
return this.defaultColWidth;
|
|
53822
54391
|
}
|
|
54392
|
+
getColWidthDefinedNumber(col) {
|
|
54393
|
+
const width = this.getColWidthDefined(col);
|
|
54394
|
+
return this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
|
|
54395
|
+
}
|
|
53823
54396
|
getColWidth(col) {
|
|
53824
54397
|
const width = this.colWidthsMap.get(col) ?? this.defaultColWidth;
|
|
53825
54398
|
if ((this.widthMode === 'adaptive' && typeof width === 'number') ||
|
|
@@ -54668,11 +55241,14 @@
|
|
|
54668
55241
|
getContext() {
|
|
54669
55242
|
return this.internalProps.context;
|
|
54670
55243
|
}
|
|
54671
|
-
|
|
55244
|
+
getRecordByCell(col, row) {
|
|
54672
55245
|
if (this.internalProps.layoutMap.isHeader(col, row)) {
|
|
54673
55246
|
return undefined;
|
|
54674
55247
|
}
|
|
54675
|
-
return this.internalProps.dataSource?.get(this.
|
|
55248
|
+
return this.internalProps.dataSource?.get(this.getRecordIndexByCell(col, row));
|
|
55249
|
+
}
|
|
55250
|
+
getRecordByRowCol(col, row) {
|
|
55251
|
+
return this.getRecordByCell(col, row);
|
|
54676
55252
|
}
|
|
54677
55253
|
getRecordStartRowByRecordIndex(index) {
|
|
54678
55254
|
return this.internalProps.layoutMap.getRecordStartRowByRecordIndex(index);
|
|
@@ -54754,6 +55330,7 @@
|
|
|
54754
55330
|
else {
|
|
54755
55331
|
_setRecords(this, records);
|
|
54756
55332
|
}
|
|
55333
|
+
this.stateManeger.initCheckedState(records);
|
|
54757
55334
|
this.internalProps.frozenColCount = this.options.frozenColCount || this.rowHeaderLevelCount;
|
|
54758
55335
|
this.scenegraph.createSceneGraph();
|
|
54759
55336
|
if (this.internalProps.title && !this.internalProps.title.isReleased) {
|
|
@@ -54764,7 +55341,7 @@
|
|
|
54764
55341
|
this.render();
|
|
54765
55342
|
}
|
|
54766
55343
|
setRecord(record, col, row) {
|
|
54767
|
-
const index = this.
|
|
55344
|
+
const index = this.getRecordIndexByCell(col, row);
|
|
54768
55345
|
this.dataSource.setRecord(record, index);
|
|
54769
55346
|
}
|
|
54770
55347
|
setDropDownMenuHighlight(cells) {
|
|
@@ -54828,7 +55405,7 @@
|
|
|
54828
55405
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
54829
55406
|
return false;
|
|
54830
55407
|
}
|
|
54831
|
-
const index = table.
|
|
55408
|
+
const index = table.getRecordIndexByCell(col, row);
|
|
54832
55409
|
return table.internalProps.dataSource.hasField(index, field);
|
|
54833
55410
|
}
|
|
54834
55411
|
_getCellStyle(col, row) {
|
|
@@ -56157,7 +56734,7 @@
|
|
|
56157
56734
|
range1.start.row === range2.start.row &&
|
|
56158
56735
|
range1.end.row === range2.end.row);
|
|
56159
56736
|
}
|
|
56160
|
-
|
|
56737
|
+
getRecordIndexByCell(col, row) {
|
|
56161
56738
|
if (this.transpose) {
|
|
56162
56739
|
if (col < this.headerLevelCount) {
|
|
56163
56740
|
return -1;
|
|
@@ -56663,13 +57240,33 @@
|
|
|
56663
57240
|
const { field } = table.internalProps.layoutMap.getBody(col, row);
|
|
56664
57241
|
return table.getFieldData(field, col, row);
|
|
56665
57242
|
}
|
|
56666
|
-
|
|
57243
|
+
getRecordIndexByCell(col, row) {
|
|
56667
57244
|
const { layoutMap } = this.internalProps;
|
|
56668
|
-
return layoutMap.
|
|
57245
|
+
return layoutMap.getRecordIndexByCell(col, row);
|
|
57246
|
+
}
|
|
57247
|
+
getTableIndexByRecordIndex(recordIndex) {
|
|
57248
|
+
if (this.transpose) {
|
|
57249
|
+
return this.dataSource.getTableIndex(recordIndex) + this.rowHeaderLevelCount;
|
|
57250
|
+
}
|
|
57251
|
+
return this.dataSource.getTableIndex(recordIndex) + this.columnHeaderLevelCount;
|
|
57252
|
+
}
|
|
57253
|
+
getTableIndexByField(field) {
|
|
57254
|
+
const colObj = this.internalProps.layoutMap.columnObjects.find((col) => col.field === field);
|
|
57255
|
+
const layoutRange = this.internalProps.layoutMap.getBodyLayoutRangeById(colObj.id);
|
|
57256
|
+
if (this.transpose) {
|
|
57257
|
+
return layoutRange.start.row;
|
|
57258
|
+
}
|
|
57259
|
+
return layoutRange.start.col;
|
|
57260
|
+
}
|
|
57261
|
+
getCellAddrByFieldRecord(field, recordIndex) {
|
|
57262
|
+
if (this.transpose) {
|
|
57263
|
+
return { col: this.getTableIndexByRecordIndex(recordIndex), row: this.getTableIndexByField(field) };
|
|
57264
|
+
}
|
|
57265
|
+
return { col: this.getTableIndexByField(field), row: this.getTableIndexByRecordIndex(recordIndex) };
|
|
56669
57266
|
}
|
|
56670
57267
|
getCellOriginRecord(col, row) {
|
|
56671
57268
|
const table = this;
|
|
56672
|
-
const index = table.
|
|
57269
|
+
const index = table.getRecordIndexByCell(col, row);
|
|
56673
57270
|
if (index > -1) {
|
|
56674
57271
|
return table.dataSource.get(index);
|
|
56675
57272
|
}
|
|
@@ -56795,8 +57392,8 @@
|
|
|
56795
57392
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
56796
57393
|
return null;
|
|
56797
57394
|
}
|
|
56798
|
-
const index = table.
|
|
56799
|
-
return table.internalProps.dataSource.getField(index, field);
|
|
57395
|
+
const index = table.getRecordIndexByCell(col, row);
|
|
57396
|
+
return table.internalProps.dataSource.getField(index, field, col, row, this);
|
|
56800
57397
|
}
|
|
56801
57398
|
moveHeaderPosition(source, target) {
|
|
56802
57399
|
const moveContext = this.internalProps.layoutMap.moveHeaderPosition(source, target);
|
|
@@ -56902,7 +57499,7 @@
|
|
|
56902
57499
|
if (!define.tree) {
|
|
56903
57500
|
return HierarchyState.none;
|
|
56904
57501
|
}
|
|
56905
|
-
const index = this.
|
|
57502
|
+
const index = this.getRecordIndexByCell(col, row);
|
|
56906
57503
|
return this.dataSource.getHierarchyState(index);
|
|
56907
57504
|
}
|
|
56908
57505
|
toggleHierarchyState(col, row) {
|
|
@@ -56922,7 +57519,7 @@
|
|
|
56922
57519
|
originData: this.getCellOriginRecord(col, row)
|
|
56923
57520
|
});
|
|
56924
57521
|
}
|
|
56925
|
-
const index = this.
|
|
57522
|
+
const index = this.getRecordIndexByCell(col, row);
|
|
56926
57523
|
const diffDataIndices = this.dataSource.toggleHierarchyState(index);
|
|
56927
57524
|
const diffPositions = this.internalProps.layoutMap.toggleHierarchyState(diffDataIndices);
|
|
56928
57525
|
this.refreshRowColCount();
|
|
@@ -57006,6 +57603,17 @@
|
|
|
57006
57603
|
}
|
|
57007
57604
|
this.stateManeger.updateSortState(sortState);
|
|
57008
57605
|
}
|
|
57606
|
+
getCheckboxState(field) {
|
|
57607
|
+
if (this.stateManeger.checkedState.length < this.rowCount - this.columnHeaderLevelCount) {
|
|
57608
|
+
this.stateManeger.initLeftRecordsCheckState(this.records);
|
|
57609
|
+
}
|
|
57610
|
+
if (isValid$6(field)) {
|
|
57611
|
+
return this.stateManeger.checkedState.map(state => {
|
|
57612
|
+
return state[field];
|
|
57613
|
+
});
|
|
57614
|
+
}
|
|
57615
|
+
return this.stateManeger.checkedState;
|
|
57616
|
+
}
|
|
57009
57617
|
}
|
|
57010
57618
|
|
|
57011
57619
|
class DimensionTree {
|
|
@@ -58252,7 +58860,7 @@
|
|
|
58252
58860
|
range1.start.row === range2.start.row &&
|
|
58253
58861
|
range1.end.row === range2.end.row);
|
|
58254
58862
|
}
|
|
58255
|
-
|
|
58863
|
+
getBodyIndexByRow(row) {
|
|
58256
58864
|
if (row < this.columnHeaderLevelCount) {
|
|
58257
58865
|
return -1;
|
|
58258
58866
|
}
|
|
@@ -58261,7 +58869,7 @@
|
|
|
58261
58869
|
}
|
|
58262
58870
|
return row - this.columnHeaderLevelCount;
|
|
58263
58871
|
}
|
|
58264
|
-
|
|
58872
|
+
getBodyIndexByCol(col) {
|
|
58265
58873
|
if (col < this.rowHeaderLevelCount) {
|
|
58266
58874
|
return -1;
|
|
58267
58875
|
}
|
|
@@ -58273,12 +58881,15 @@
|
|
|
58273
58881
|
getRecordStartRowByRecordIndex(index) {
|
|
58274
58882
|
return this.columnHeaderLevelCount + index;
|
|
58275
58883
|
}
|
|
58884
|
+
getRecordIndexByCell(col, row) {
|
|
58885
|
+
return undefined;
|
|
58886
|
+
}
|
|
58276
58887
|
getCellHeaderPathsWidthTreeNode(col, row) {
|
|
58277
58888
|
if (this._CellHeaderPathMap.has(`${col}-${row}`)) {
|
|
58278
58889
|
return this._CellHeaderPathMap.get(`${col}-${row}`);
|
|
58279
58890
|
}
|
|
58280
|
-
const recordCol = this.
|
|
58281
|
-
const recordRow = this.
|
|
58891
|
+
const recordCol = this.getBodyIndexByCol(col);
|
|
58892
|
+
const recordRow = this.getBodyIndexByRow(row) + this.currentPageStartIndex;
|
|
58282
58893
|
let colPath;
|
|
58283
58894
|
let rowPath;
|
|
58284
58895
|
if (row >= 0 && recordCol >= 0) {
|
|
@@ -59387,10 +59998,10 @@
|
|
|
59387
59998
|
this.formatFun = formatFun;
|
|
59388
59999
|
this.isRecord = isRecord ?? this.isRecord;
|
|
59389
60000
|
}
|
|
59390
|
-
formatValue() {
|
|
60001
|
+
formatValue(col, row, table) {
|
|
59391
60002
|
if (!this._formatedValue) {
|
|
59392
60003
|
if (this.formatFun) {
|
|
59393
|
-
this._formatedValue = this.formatFun(this.value());
|
|
60004
|
+
this._formatedValue = this.formatFun(this.value(), col, row, table);
|
|
59394
60005
|
}
|
|
59395
60006
|
else {
|
|
59396
60007
|
this._formatedValue = this.value();
|
|
@@ -61179,13 +61790,25 @@
|
|
|
61179
61790
|
});
|
|
61180
61791
|
}
|
|
61181
61792
|
}
|
|
61182
|
-
|
|
61793
|
+
getRecordIndexByCell(col, row) {
|
|
61794
|
+
return undefined;
|
|
61795
|
+
}
|
|
61796
|
+
getTableIndexByRecordIndex(recordIndex) {
|
|
61797
|
+
return undefined;
|
|
61798
|
+
}
|
|
61799
|
+
getTableIndexByField(field) {
|
|
61800
|
+
return undefined;
|
|
61801
|
+
}
|
|
61802
|
+
getCellAddrByFieldRecord(field, recordIndex) {
|
|
61803
|
+
return undefined;
|
|
61804
|
+
}
|
|
61805
|
+
getBodyIndexByRow(row) {
|
|
61183
61806
|
const { layoutMap } = this.internalProps;
|
|
61184
|
-
return layoutMap.
|
|
61807
|
+
return layoutMap.getBodyIndexByRow(row);
|
|
61185
61808
|
}
|
|
61186
|
-
|
|
61809
|
+
getBodyIndexByCol(col) {
|
|
61187
61810
|
const { layoutMap } = this.internalProps;
|
|
61188
|
-
return layoutMap.
|
|
61811
|
+
return layoutMap.getBodyIndexByCol(col);
|
|
61189
61812
|
}
|
|
61190
61813
|
getFieldData(field, col, row) {
|
|
61191
61814
|
if (field === null || field === undefined) {
|
|
@@ -61195,12 +61818,12 @@
|
|
|
61195
61818
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
61196
61819
|
return null;
|
|
61197
61820
|
}
|
|
61198
|
-
const rowIndex = this.
|
|
61199
|
-
const colIndex = this.
|
|
61200
|
-
const dataValue = table.dataSource?.getField(rowIndex, colIndex);
|
|
61821
|
+
const rowIndex = this.getBodyIndexByRow(row);
|
|
61822
|
+
const colIndex = this.getBodyIndexByCol(col);
|
|
61823
|
+
const dataValue = table.dataSource?.getField(rowIndex, colIndex, col, row, this);
|
|
61201
61824
|
if (typeof field !== 'string') {
|
|
61202
61825
|
const cellHeaderPaths = table.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
61203
|
-
return getField({ dataValue, ...cellHeaderPaths }, field, emptyFn);
|
|
61826
|
+
return getField({ dataValue, ...cellHeaderPaths }, field, col, row, this, emptyFn);
|
|
61204
61827
|
}
|
|
61205
61828
|
return dataValue;
|
|
61206
61829
|
}
|
|
@@ -61218,7 +61841,7 @@
|
|
|
61218
61841
|
return rowPath.indicatorKey ?? rowPath.value;
|
|
61219
61842
|
});
|
|
61220
61843
|
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));
|
|
61221
|
-
return aggregator.formatValue ? aggregator.formatValue() : '';
|
|
61844
|
+
return aggregator.formatValue ? aggregator.formatValue(col, row, this) : '';
|
|
61222
61845
|
}
|
|
61223
61846
|
else if (this.flatDataToObjects) {
|
|
61224
61847
|
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
@@ -61230,7 +61853,9 @@
|
|
|
61230
61853
|
});
|
|
61231
61854
|
const valueNode = this.flatDataToObjects.getTreeNode(rowKeys, colKeys, this.internalProps.layoutMap.getBody(col, row).indicatorKey);
|
|
61232
61855
|
const { fieldFormat } = this.internalProps.layoutMap.getBody(col, row);
|
|
61233
|
-
return typeof fieldFormat === 'function'
|
|
61856
|
+
return typeof fieldFormat === 'function'
|
|
61857
|
+
? fieldFormat(valueNode?.record, col, row, this)
|
|
61858
|
+
: valueNode?.value ?? '';
|
|
61234
61859
|
}
|
|
61235
61860
|
const { field, fieldFormat } = this.internalProps.layoutMap.getBody(col, row);
|
|
61236
61861
|
return this.getFieldData(fieldFormat || field, col, row);
|
|
@@ -61650,13 +62275,25 @@
|
|
|
61650
62275
|
});
|
|
61651
62276
|
}
|
|
61652
62277
|
}
|
|
61653
|
-
|
|
62278
|
+
getRecordIndexByCell(col, row) {
|
|
62279
|
+
return undefined;
|
|
62280
|
+
}
|
|
62281
|
+
getTableIndexByRecordIndex(recordIndex) {
|
|
62282
|
+
return undefined;
|
|
62283
|
+
}
|
|
62284
|
+
getTableIndexByField(field) {
|
|
62285
|
+
return undefined;
|
|
62286
|
+
}
|
|
62287
|
+
getCellAddrByFieldRecord(field, recordIndex) {
|
|
62288
|
+
return undefined;
|
|
62289
|
+
}
|
|
62290
|
+
getBodyIndexByRow(row) {
|
|
61654
62291
|
const { layoutMap } = this.internalProps;
|
|
61655
|
-
return layoutMap.
|
|
62292
|
+
return layoutMap.getBodyIndexByRow(row);
|
|
61656
62293
|
}
|
|
61657
|
-
|
|
62294
|
+
getBodyIndexByCol(col) {
|
|
61658
62295
|
const { layoutMap } = this.internalProps;
|
|
61659
|
-
return layoutMap.
|
|
62296
|
+
return layoutMap.getBodyIndexByCol(col);
|
|
61660
62297
|
}
|
|
61661
62298
|
getFieldData(field, col, row) {
|
|
61662
62299
|
if (field === null || field === undefined) {
|
|
@@ -61666,12 +62303,12 @@
|
|
|
61666
62303
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
61667
62304
|
return null;
|
|
61668
62305
|
}
|
|
61669
|
-
const rowIndex = this.
|
|
61670
|
-
const colIndex = this.
|
|
61671
|
-
const dataValue = table.dataSource?.getField(rowIndex, colIndex);
|
|
62306
|
+
const rowIndex = this.getBodyIndexByRow(row);
|
|
62307
|
+
const colIndex = this.getBodyIndexByCol(col);
|
|
62308
|
+
const dataValue = table.dataSource?.getField(rowIndex, colIndex, col, row, this);
|
|
61672
62309
|
if (typeof field !== 'string') {
|
|
61673
62310
|
const cellHeaderPaths = table.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
61674
|
-
return getField({ dataValue, ...cellHeaderPaths }, field, emptyFn);
|
|
62311
|
+
return getField({ dataValue, ...cellHeaderPaths }, field, col, row, this, emptyFn);
|
|
61675
62312
|
}
|
|
61676
62313
|
return dataValue;
|
|
61677
62314
|
}
|
|
@@ -61856,12 +62493,16 @@
|
|
|
61856
62493
|
return result;
|
|
61857
62494
|
}
|
|
61858
62495
|
_generateCollectValuesConfig(columnKeys, rowKeys) {
|
|
61859
|
-
const
|
|
62496
|
+
const indicators = this.internalProps.indicators;
|
|
61860
62497
|
const collectValuesBy = {};
|
|
61861
|
-
for (let i = 0, len =
|
|
61862
|
-
if (typeof
|
|
61863
|
-
if (
|
|
61864
|
-
const indicatorDefine =
|
|
62498
|
+
for (let i = 0, len = indicators?.length; i < len; i++) {
|
|
62499
|
+
if (typeof indicators[i] !== 'string' && indicators[i].chartSpec) {
|
|
62500
|
+
if (this.options.indicatorsAsCol === false) {
|
|
62501
|
+
const indicatorDefine = indicators[i];
|
|
62502
|
+
indicatorDefine.chartSpec?.stack !== false &&
|
|
62503
|
+
(indicatorDefine.chartSpec?.type === 'bar' ||
|
|
62504
|
+
indicatorDefine.chartSpec?.type === 'area') &&
|
|
62505
|
+
(indicatorDefine.chartSpec.stack = true);
|
|
61865
62506
|
collectValuesBy[indicatorDefine.indicatorKey] = {
|
|
61866
62507
|
by: rowKeys,
|
|
61867
62508
|
range: true,
|
|
@@ -61881,6 +62522,9 @@
|
|
|
61881
62522
|
: undefined
|
|
61882
62523
|
};
|
|
61883
62524
|
const yField = chartSeries.yField;
|
|
62525
|
+
chartSeries.stack !== false &&
|
|
62526
|
+
(chartSeries.type === 'bar' || chartSeries.type === 'area') &&
|
|
62527
|
+
(chartSeries.stack = true);
|
|
61884
62528
|
collectValuesBy[yField] = {
|
|
61885
62529
|
by: rowKeys,
|
|
61886
62530
|
range: chartSeries.direction !== 'horizontal',
|
|
@@ -61904,10 +62548,14 @@
|
|
|
61904
62548
|
? indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
|
|
61905
62549
|
: undefined
|
|
61906
62550
|
};
|
|
62551
|
+
indicatorDefine.chartSpec?.stack !== false &&
|
|
62552
|
+
(indicatorDefine.chartSpec?.type === 'bar' ||
|
|
62553
|
+
indicatorDefine.chartSpec?.type === 'area') &&
|
|
62554
|
+
(indicatorDefine.chartSpec.stack = true);
|
|
61907
62555
|
const yField = indicatorDefine.chartSpec.yField;
|
|
61908
62556
|
collectValuesBy[yField] = {
|
|
61909
62557
|
by: rowKeys,
|
|
61910
|
-
range:
|
|
62558
|
+
range: indicators[i].chartSpec.direction !== 'horizontal',
|
|
61911
62559
|
sumBy: indicatorDefine.chartSpec.stack !== false &&
|
|
61912
62560
|
columnKeys.concat(indicatorDefine.chartSpec?.xField),
|
|
61913
62561
|
sortBy: indicatorDefine.chartSpec.direction === 'horizontal'
|
|
@@ -61917,7 +62565,11 @@
|
|
|
61917
62565
|
}
|
|
61918
62566
|
}
|
|
61919
62567
|
else {
|
|
61920
|
-
const indicatorDefine =
|
|
62568
|
+
const indicatorDefine = indicators[i];
|
|
62569
|
+
indicatorDefine.chartSpec?.stack !== false &&
|
|
62570
|
+
(indicatorDefine.chartSpec?.type === 'bar' ||
|
|
62571
|
+
indicatorDefine.chartSpec?.type === 'area') &&
|
|
62572
|
+
(indicatorDefine.chartSpec.stack = true);
|
|
61921
62573
|
collectValuesBy[indicatorDefine.indicatorKey] = {
|
|
61922
62574
|
by: columnKeys,
|
|
61923
62575
|
range: true,
|
|
@@ -61937,6 +62589,9 @@
|
|
|
61937
62589
|
: undefined
|
|
61938
62590
|
};
|
|
61939
62591
|
const xField = chartSeries.xField;
|
|
62592
|
+
chartSeries.stack !== false &&
|
|
62593
|
+
(chartSeries.type === 'bar' || chartSeries.type === 'area') &&
|
|
62594
|
+
(chartSeries.stack = true);
|
|
61940
62595
|
collectValuesBy[xField] = {
|
|
61941
62596
|
by: columnKeys,
|
|
61942
62597
|
range: chartSeries.direction === 'horizontal',
|
|
@@ -61960,10 +62615,14 @@
|
|
|
61960
62615
|
? indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
|
|
61961
62616
|
: undefined
|
|
61962
62617
|
};
|
|
62618
|
+
indicatorDefine.chartSpec?.stack !== false &&
|
|
62619
|
+
(indicatorDefine.chartSpec?.type === 'bar' ||
|
|
62620
|
+
indicatorDefine.chartSpec?.type === 'area') &&
|
|
62621
|
+
(indicatorDefine.chartSpec.stack = true);
|
|
61963
62622
|
const xField = indicatorDefine.chartSpec.xField;
|
|
61964
62623
|
collectValuesBy[xField] = {
|
|
61965
62624
|
by: columnKeys,
|
|
61966
|
-
range:
|
|
62625
|
+
range: indicators[i].chartSpec.direction === 'horizontal',
|
|
61967
62626
|
sumBy: indicatorDefine.chartSpec.stack !== false &&
|
|
61968
62627
|
rowKeys.concat(indicatorDefine.chartSpec?.yField),
|
|
61969
62628
|
sortBy: indicatorDefine.chartSpec.direction !== 'horizontal'
|
|
@@ -63055,7 +63714,7 @@
|
|
|
63055
63714
|
return new Tag(params ? params.attribute : {});
|
|
63056
63715
|
}
|
|
63057
63716
|
|
|
63058
|
-
const version = "0.13.
|
|
63717
|
+
const version = "0.13.2-alpha.0";
|
|
63059
63718
|
function getIcons() {
|
|
63060
63719
|
return get$1();
|
|
63061
63720
|
}
|