@visactor/vtable 0.13.1-alpha.0 → 0.13.1

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.
Files changed (145) hide show
  1. package/cjs/ListTable.d.ts +5 -1
  2. package/cjs/ListTable.js +27 -7
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +6 -2
  5. package/cjs/PivotChart.js +33 -25
  6. package/cjs/PivotChart.js.map +1 -1
  7. package/cjs/PivotTable.d.ts +6 -2
  8. package/cjs/PivotTable.js +12 -8
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/core/BaseTable.d.ts +6 -2
  11. package/cjs/core/BaseTable.js +9 -6
  12. package/cjs/core/BaseTable.js.map +1 -1
  13. package/cjs/data/CachedDataSource.d.ts +2 -1
  14. package/cjs/data/CachedDataSource.js +2 -2
  15. package/cjs/data/CachedDataSource.js.map +1 -1
  16. package/cjs/data/DataSource.d.ts +5 -3
  17. package/cjs/data/DataSource.js +11 -8
  18. package/cjs/data/DataSource.js.map +1 -1
  19. package/cjs/dataset/statistics-helper.d.ts +2 -1
  20. package/cjs/dataset/statistics-helper.js +2 -2
  21. package/cjs/dataset/statistics-helper.js.map +1 -1
  22. package/cjs/event/listener/table-group.js +10 -0
  23. package/cjs/event/listener/table-group.js.map +1 -1
  24. package/cjs/header-helper/header-helper.d.ts +2 -2
  25. package/cjs/header-helper/header-helper.js +4 -1
  26. package/cjs/header-helper/header-helper.js.map +1 -1
  27. package/cjs/header-helper/style/CheckboxStyle.d.ts +7 -0
  28. package/cjs/header-helper/style/CheckboxStyle.js +24 -0
  29. package/cjs/header-helper/style/CheckboxStyle.js.map +1 -0
  30. package/cjs/index.d.ts +1 -1
  31. package/cjs/index.js +1 -1
  32. package/cjs/index.js.map +1 -1
  33. package/cjs/layout/pivot-header-layout.d.ts +3 -2
  34. package/cjs/layout/pivot-header-layout.js +4 -3
  35. package/cjs/layout/pivot-header-layout.js.map +1 -1
  36. package/cjs/layout/pivot-layout.js.map +1 -1
  37. package/cjs/layout/simple-header-layout.d.ts +1 -1
  38. package/cjs/layout/simple-header-layout.js +1 -1
  39. package/cjs/layout/simple-header-layout.js.map +1 -1
  40. package/cjs/scenegraph/component/custom.d.ts +0 -1
  41. package/cjs/scenegraph/component/custom.js +2 -14
  42. package/cjs/scenegraph/component/custom.js.map +1 -1
  43. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +31 -17
  44. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  45. package/cjs/scenegraph/layout/compute-col-width.js +3 -4
  46. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  47. package/cjs/scenegraph/layout/compute-row-height.js +2 -3
  48. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  49. package/cjs/scenegraph/scenegraph.d.ts +2 -0
  50. package/cjs/scenegraph/scenegraph.js +32 -0
  51. package/cjs/scenegraph/scenegraph.js.map +1 -1
  52. package/cjs/scenegraph/utils/get-hierarchy-offset.js +1 -1
  53. package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  54. package/cjs/state/state.d.ts +10 -0
  55. package/cjs/state/state.js +83 -1
  56. package/cjs/state/state.js.map +1 -1
  57. package/cjs/tools/get-data-path/index.js.map +1 -1
  58. package/cjs/ts-types/base-table.d.ts +5 -2
  59. package/cjs/ts-types/base-table.js.map +1 -1
  60. package/cjs/ts-types/column/type.d.ts +1 -1
  61. package/cjs/ts-types/column/type.js.map +1 -1
  62. package/cjs/ts-types/list-table/define/Composite-define.d.ts +2 -0
  63. package/cjs/ts-types/list-table/define/Composite-define.js.map +1 -1
  64. package/cjs/ts-types/list-table/define/checkbox-define.d.ts +7 -1
  65. package/cjs/ts-types/list-table/define/checkbox-define.js.map +1 -1
  66. package/cjs/ts-types/list-table/define/index.d.ts +2 -2
  67. package/cjs/ts-types/list-table/define/index.js.map +1 -1
  68. package/cjs/ts-types/list-table/layout-map/api.d.ts +2 -2
  69. package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
  70. package/cjs/ts-types/table-engine.d.ts +2 -2
  71. package/cjs/ts-types/table-engine.js.map +1 -1
  72. package/dist/vtable.js +873 -246
  73. package/dist/vtable.min.js +2 -2
  74. package/es/ListTable.d.ts +5 -1
  75. package/es/ListTable.js +27 -7
  76. package/es/ListTable.js.map +1 -1
  77. package/es/PivotChart.d.ts +6 -2
  78. package/es/PivotChart.js +33 -25
  79. package/es/PivotChart.js.map +1 -1
  80. package/es/PivotTable.d.ts +6 -2
  81. package/es/PivotTable.js +12 -8
  82. package/es/PivotTable.js.map +1 -1
  83. package/es/core/BaseTable.d.ts +6 -2
  84. package/es/core/BaseTable.js +9 -6
  85. package/es/core/BaseTable.js.map +1 -1
  86. package/es/data/CachedDataSource.d.ts +2 -1
  87. package/es/data/CachedDataSource.js +2 -2
  88. package/es/data/CachedDataSource.js.map +1 -1
  89. package/es/data/DataSource.d.ts +5 -3
  90. package/es/data/DataSource.js +11 -8
  91. package/es/data/DataSource.js.map +1 -1
  92. package/es/dataset/statistics-helper.d.ts +2 -1
  93. package/es/dataset/statistics-helper.js +2 -2
  94. package/es/dataset/statistics-helper.js.map +1 -1
  95. package/es/event/listener/table-group.js +10 -0
  96. package/es/event/listener/table-group.js.map +1 -1
  97. package/es/header-helper/header-helper.d.ts +2 -2
  98. package/es/header-helper/header-helper.js +5 -0
  99. package/es/header-helper/header-helper.js.map +1 -1
  100. package/es/header-helper/style/CheckboxStyle.d.ts +7 -0
  101. package/es/header-helper/style/CheckboxStyle.js +16 -0
  102. package/es/header-helper/style/CheckboxStyle.js.map +1 -0
  103. package/es/index.d.ts +1 -1
  104. package/es/index.js +1 -1
  105. package/es/index.js.map +1 -1
  106. package/es/layout/pivot-header-layout.d.ts +3 -2
  107. package/es/layout/pivot-header-layout.js +4 -3
  108. package/es/layout/pivot-header-layout.js.map +1 -1
  109. package/es/layout/pivot-layout.js.map +1 -1
  110. package/es/layout/simple-header-layout.d.ts +1 -1
  111. package/es/layout/simple-header-layout.js +1 -1
  112. package/es/layout/simple-header-layout.js.map +1 -1
  113. package/es/scenegraph/component/custom.d.ts +0 -1
  114. package/es/scenegraph/component/custom.js +0 -12
  115. package/es/scenegraph/component/custom.js.map +1 -1
  116. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +30 -15
  117. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  118. package/es/scenegraph/layout/compute-col-width.js +2 -5
  119. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  120. package/es/scenegraph/layout/compute-row-height.js +1 -4
  121. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  122. package/es/scenegraph/scenegraph.d.ts +2 -0
  123. package/es/scenegraph/scenegraph.js +32 -0
  124. package/es/scenegraph/scenegraph.js.map +1 -1
  125. package/es/scenegraph/utils/get-hierarchy-offset.js +1 -1
  126. package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
  127. package/es/state/state.d.ts +10 -0
  128. package/es/state/state.js +84 -2
  129. package/es/state/state.js.map +1 -1
  130. package/es/tools/get-data-path/index.js.map +1 -1
  131. package/es/ts-types/base-table.d.ts +5 -2
  132. package/es/ts-types/base-table.js.map +1 -1
  133. package/es/ts-types/column/type.d.ts +1 -1
  134. package/es/ts-types/column/type.js.map +1 -1
  135. package/es/ts-types/list-table/define/Composite-define.d.ts +2 -0
  136. package/es/ts-types/list-table/define/Composite-define.js.map +1 -1
  137. package/es/ts-types/list-table/define/checkbox-define.d.ts +7 -1
  138. package/es/ts-types/list-table/define/checkbox-define.js.map +1 -1
  139. package/es/ts-types/list-table/define/index.d.ts +2 -2
  140. package/es/ts-types/list-table/define/index.js.map +1 -1
  141. package/es/ts-types/list-table/layout-map/api.d.ts +2 -2
  142. package/es/ts-types/list-table/layout-map/api.js.map +1 -1
  143. package/es/ts-types/table-engine.d.ts +2 -2
  144. package/es/ts-types/table-engine.js.map +1 -1
  145. package/package.json +9 -7
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$7;
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$7 ? defaultStyle$7 : (defaultStyle$7 = new Style());
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$6;
2283
+ let defaultStyle$7;
2203
2284
  let ImageStyle$1 = class ImageStyle extends Style$1 {
2204
2285
  static get DEFAULT() {
2205
- return defaultStyle$6 ? defaultStyle$6 : (defaultStyle$6 = new ImageStyle());
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$5;
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$5 ? defaultStyle$5 : (defaultStyle$5 = new TextStyle());
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$4;
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$4 ? defaultStyle$4 : (defaultStyle$4 = new Style());
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$3;
2564
+ let defaultStyle$4;
2484
2565
  class TextHeaderStyle extends Style {
2485
2566
  _autoWrapText;
2486
2567
  _lineClamp;
2487
2568
  static get DEFAULT() {
2488
- return defaultStyle$3 ? defaultStyle$3 : (defaultStyle$3 = new TextHeaderStyle());
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$1N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1N([injectable(), __param$T(0, inject(ContributionProvider)), __param$T(0, named(EnvContribution)), __metadata$17("design:paramtypes", [Object])], DefaultGlobal);
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$1;
6716
+ var Direction$2;
6621
6717
  !function (Direction) {
6622
6718
  Direction[Direction.ROW = 1] = "ROW", Direction[Direction.COLUMN = 2] = "COLUMN";
6623
- }(Direction$1 || (Direction$1 = {}));
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$1.ROW ? abs(this.p0.x - this.p3.x) : direction === Direction$1.COLUMN ? abs(this.p0.y - this.p3.y) : 0;
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$1.ROW ? abs(this.p0.x - this.p1.x) : direction === Direction$1.COLUMN ? abs(this.p0.y - this.p1.y) : 0;
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$1.COLUMN) {
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$1.ROW) {
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$1.ROW : Direction$1.COLUMN);
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$1.ROW : Direction$1.COLUMN);
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$1.ROW : Direction$1.COLUMN);
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$1.ROW : Direction$1.COLUMN);
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$1.ROW : Direction$1.COLUMN);
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$1.ROW : Direction$1.COLUMN);
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$1.ROW : "y" === clipRangeByDimension ? this.direction = Direction$1.COLUMN : "auto" === clipRangeByDimension && (this.direction = cache.direction), this.curves = cache.curves;
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$1.COLUMN) {
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$1.ROW) {
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$1M = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1M([injectable()], ATextMeasure);
8160
+ ATextMeasure = __decorate$1N([injectable()], ATextMeasure);
8065
8161
 
8066
- var __decorate$1L = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1L([injectable()], DefaultTextMeasureContribution);
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$1K = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1K([injectable(), __param$S(0, inject(ContributionProvider)), __param$S(0, named(TextMeasureContribution)), __param$S(1, inject(VGlobal)), __metadata$16("design:paramtypes", [Object, Object])], DefaultGraphicUtil);
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$1K([injectable(), __metadata$16("design:paramtypes", [])], DefaultTransformUtil);
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.renderCount) === (null === (_d = this._prePointTargetCache) || void 0 === _d ? void 0 : _d.stageRenderCount) ? target = this._prePointTargetCache[cacheKey] : (target = this.pickTarget(e.canvasX, e.canvasY, e), e.pickParams || (this._prePointTargetCache = {
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 !== (_e = null == target ? void 0 : target.stage.renderCount) && void 0 !== _e ? _e : -1
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$1J = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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
- const layerMode = this.getRecommendedLayerType(options.layerMode),
11840
- layerHandler = this.getLayerHandler(layerMode),
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: options.canvasId ? "static" : 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$1J([injectable(), __param$R(0, inject(VGlobal)), __metadata$15("design:paramtypes", [Object])], DefaultLayerService);
11976
+ DefaultLayerService = __decorate$1K([injectable(), __param$R(0, inject(VGlobal)), __metadata$15("design:paramtypes", [Object])], DefaultLayerService);
11871
11977
 
11872
- var __decorate$1I = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1I([postConstruct(), __metadata$14("design:type", Function), __metadata$14("design:paramtypes", []), __metadata$14("design:returntype", void 0)], DefaultWindow.prototype, "postInit", null), DefaultWindow = __decorate$1I([injectable(), __param$Q(0, inject(VGlobal)), __metadata$14("design:paramtypes", [Object])], DefaultWindow);
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
- var __decorate$1H = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1H([injectable()], DefaultOuterBorderBoundsContribution);
15037
+ DefaultOuterBorderBoundsContribution = __decorate$1I([injectable()], DefaultOuterBorderBoundsContribution);
14819
15038
 
14820
- var __decorate$1G = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1G([injectable()], DefaultRectOuterBorderBoundsContribution);
15048
+ DefaultRectOuterBorderBoundsContribution = __decorate$1H([injectable()], DefaultRectOuterBorderBoundsContribution);
14830
15049
 
14831
- var __decorate$1F = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1F([injectable()], DefaultSymbolOuterBorderBoundsContribution);
15076
+ DefaultSymbolOuterBorderBoundsContribution = __decorate$1G([injectable()], DefaultSymbolOuterBorderBoundsContribution);
14858
15077
 
14859
- var __decorate$1E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1E([injectable()], DefaultCircleOuterBorderBoundsContribution);
15087
+ DefaultCircleOuterBorderBoundsContribution = __decorate$1F([injectable()], DefaultCircleOuterBorderBoundsContribution);
14869
15088
 
14870
- var __decorate$1D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1D([injectable()], DefaultArcOuterBorderBoundsContribution);
15098
+ DefaultArcOuterBorderBoundsContribution = __decorate$1E([injectable()], DefaultArcOuterBorderBoundsContribution);
14880
15099
 
14881
- var __decorate$1C = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1C([injectable()], DefaultPathOuterBorderBoundsContribution);
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$1B = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1B([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);
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$1A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1A([injectable()], BaseRender);
15962
+ BaseRender = __decorate$1B([injectable()], BaseRender);
15744
15963
 
15745
- var __decorate$1z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1z([injectable(), __param$O(0, inject(ContributionProvider)), __param$O(0, named(ArcRenderContribution)), __metadata$12("design:paramtypes", [Object])], DefaultCanvasArcRender);
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$1y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1y([injectable(), __param$N(0, inject(ContributionProvider)), __param$N(0, named(CircleRenderContribution)), __metadata$11("design:paramtypes", [Object])], DefaultCanvasCircleRender);
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$1.ROW : "y" === clipRangeByDimension ? direction = Direction$1.COLUMN : "auto" === clipRangeByDimension && (direction = segPath.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$1x = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1x([injectable()], DefaultCanvasLineRender);
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$1.ROW : Direction$1.COLUMN, Number.isFinite(xTotalLength) || (direction = Direction$1.COLUMN), Number.isFinite(yTotalLength) || (direction = Direction$1.ROW);
16285
- const totalDrawLength = percent * (direction === Direction$1.ROW ? xTotalLength : yTotalLength);
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$1w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1.ROW;
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$1.ROW : Direction$1.COLUMN, drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
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$1.ROW ? "x" : "y", {
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$1w([injectable(), __param$M(0, inject(ContributionProvider)), __param$M(0, named(AreaRenderContribution)), __metadata$10("design:paramtypes", [Object])], DefaultCanvasAreaRender);
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$1v = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1v([injectable(), __param$L(0, inject(ContributionProvider)), __param$L(0, named(PathRenderContribution)), __metadata$$("design:paramtypes", [Object])], DefaultCanvasPathRender);
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$1u = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1u([injectable(), __param$K(0, inject(ContributionProvider)), __param$K(0, named(RectRenderContribution)), __metadata$_("design:paramtypes", [Object])], DefaultCanvasRectRender);
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$1t = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1t([injectable(), __param$J(0, inject(ContributionProvider)), __param$J(0, named(SymbolRenderContribution)), __metadata$Z("design:paramtypes", [Object])], DefaultCanvasSymbolRender);
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$1s = undefined && undefined.__decorate || function (decorators, target, key, desc) {
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$1s([injectable(), __param$I(0, inject(ContributionProvider)), __param$I(0, named(TextRenderContribution)), __metadata$Y("design:paramtypes", [Object])], DefaultCanvasTextRender);
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
- return !!this.pickItem(graphic, point, null, params);
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._slider.addEventListener("pointermove", this._onSliderPointerMove, {
25769
+ }), vglobal.addEventListener("pointerup", this._onSliderPointerUp)) : (this.stage.addEventListener("pointermove", this._onSliderPointerMove, {
25517
25770
  capture: !0
25518
- }), this._slider.addEventListener("pointerup", this._onSliderPointerUp), this._slider.addEventListener("pointerupoutside", this._onSliderPointerUp));
25519
- }, this._onSliderPointerMove = e => {
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
- width: width,
25530
- height: height
25531
- } = this._getSliderRenderBounds();
25532
- "vertical" === direction ? (currentPos = e.clientY, delta = currentPos - this._prePos, currentScrollValue = delta / height) : (currentPos = e.clientX, delta = currentPos - this._prePos, currentScrollValue = delta / width), this.setScrollRange([preScrollRange[0] + currentScrollValue, preScrollRange[1] + currentScrollValue], !0), this._prePos = currentPos;
25533
- }, this._onSliderPointerUp = e => {
25534
- e.preventDefault(), "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onSliderPointerMove, {
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._slider.removeEventListener("pointermove", this._onSliderPointerMove, {
25804
+ }), vglobal.removeEventListener("pointerup", this._onSliderPointerUp)) : (this.stage.removeEventListener("pointermove", this._onSliderPointerMove, {
25537
25805
  capture: !0
25538
- }), this._slider.removeEventListener("pointerup", this._onSliderPointerUp), this._slider.removeEventListener("pointerupoutside", this._onSliderPointerUp));
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 || (this._rail && this._rail.addEventListener("pointerdown", this._onRailPointerDown), this._slider && this._slider.addEventListener("pointerdown", this._onSliderPointerDown));
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.poptip = e => {
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 (focusStartX += shapeSize / 2 + shapeSpace + labelShape.AABBBounds.width() + labelSpace, isValid$6(value)) {
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: focusStartX + labelSpace,
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 && valueShape.setAttributes({
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 && labelShape.setAttribute("maxLineWidth", this._itemWidthByUser - parsedPadding[1] - parsedPadding[3] - shapeSize - shapeSpace - focusSpace);
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._currentHandler.addEventListener("pointermove", this._onHandlerPointerMove, {
29773
+ }), vglobal.addEventListener("pointerup", this._onHandlerPointerUp)) : (this.stage.addEventListener("pointermove", this._onHandlerPointerMove, {
29489
29774
  capture: !0
29490
- }), this._currentHandler.addEventListener("pointerup", this._onHandlerPointerUp), this._currentHandler.addEventListener("pointerupoutside", this._onHandlerPointerUp));
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
- if (e.preventDefault(), this._currentHandler = null, "browser" === vglobal.env) vglobal.removeEventListener("pointermove", this._onHandlerPointerMove, {
29795
+ e.preventDefault(), this._currentHandler = null, "browser" === vglobal.env ? (vglobal.removeEventListener("pointermove", this._onHandlerPointerMove, {
29511
29796
  capture: !0
29512
- }), vglobal.removeEventListener("pointerup", this._onHandlerPointerUp);else {
29513
- const currentTarget = e.target;
29514
- currentTarget.removeEventListener("pointermove", this._onHandlerPointerMove, {
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._track.addEventListener("pointermove", this._onTrackPointerMove, {
29803
+ }), vglobal.addEventListener("pointerup", this._onTrackPointerUp)) : (this.stage.addEventListener("pointermove", this._onTrackPointerMove, {
29522
29804
  capture: !0
29523
- }), this._track.addEventListener("pointerup", this._onTrackPointerUp), this._track.addEventListener("pointerupoutside", this._onTrackPointerUp));
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._track.removeEventListener("pointermove", this._onTrackPointerMove, {
29844
+ }), vglobal.removeEventListener("pointerup", this._onTrackPointerUp)) : (this.stage.removeEventListener("pointermove", this._onTrackPointerMove, {
29563
29845
  capture: !0
29564
- }), this._track.removeEventListener("pointerup", this._onTrackPointerUp), this._track.removeEventListener("pointerupoutside", this._onTrackPointerUp));
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 : titleWidth;
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 svg = '<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>';
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)), this.attribute.checked && this.attribute.disabled ? this._box.setAttributes({
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
- }) : this.attribute.checked && this._box.setAttributes({
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._icon = new Image$3(merge$1({}, this.attribute.icon)), this.attribute.checked || this._icon.setAttribute("visible", !1), this.appendChild(this._icon);
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._icon.setAttributes({
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
- image: svg,
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
- getField(index, field) {
36827
- return this.getOriginalField(_getIndex(this.currentPagerIndexedData, index), field);
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.getRecordIndexByRow(col, row));
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
  }
@@ -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.getRecordIndexByRow(col, row));
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
- const globalChecked = getOrApply(checked, {
43962
- col,
43963
- row,
43964
- table,
43965
- context: null,
43966
- value,
43967
- dataValue
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
- const checkbox = new CheckBox({
43992
- x: 0,
43993
- y: 0,
43994
- text: testAttribute,
43995
- checked: isChecked ?? globalChecked ?? false,
43996
- disabled: isDisabled ?? globalDisable ?? false
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
  }
@@ -47115,6 +47408,68 @@
47115
47408
  updateChartState(datum) {
47116
47409
  this.table.isPivotChart() && updateChartState(this, datum);
47117
47410
  }
47411
+ updateCheckboxCellState(col, row, checked) {
47412
+ if (this.transpose) {
47413
+ this.bodyGroup.children?.forEach((columnGroup) => {
47414
+ columnGroup
47415
+ .getChildAt(row)
47416
+ .getChildren()
47417
+ .forEach((node) => {
47418
+ if (node.name === 'checkbox') {
47419
+ node.setAttribute('checked', checked);
47420
+ }
47421
+ });
47422
+ });
47423
+ }
47424
+ else {
47425
+ const columnGroup = this.getColGroup(col);
47426
+ columnGroup.children?.forEach((cellNode) => {
47427
+ cellNode.getChildren().find(node => {
47428
+ if (node.name === 'checkbox') {
47429
+ node.setAttribute('checked', checked);
47430
+ }
47431
+ });
47432
+ });
47433
+ }
47434
+ }
47435
+ updateHeaderCheckboxCellState(col, row, checked) {
47436
+ if (this.transpose) {
47437
+ this.rowHeaderGroup.children?.forEach((columnGroup) => {
47438
+ columnGroup
47439
+ .getChildAt(row)
47440
+ .getChildren()
47441
+ .forEach((node) => {
47442
+ if (node.name === 'checkbox') {
47443
+ if (checked === 'indeterminate') {
47444
+ node.setAttribute('indeterminate', true);
47445
+ node.setAttribute('checked', undefined);
47446
+ }
47447
+ else {
47448
+ node.setAttribute('indeterminate', undefined);
47449
+ node.setAttribute('checked', checked);
47450
+ }
47451
+ }
47452
+ });
47453
+ });
47454
+ }
47455
+ else {
47456
+ const columnGroup = this.getColGroup(col, true);
47457
+ columnGroup.children?.forEach((cellNode) => {
47458
+ cellNode.getChildren().find(node => {
47459
+ if (node.name === 'checkbox') {
47460
+ if (checked === 'indeterminate') {
47461
+ node.setAttribute('indeterminate', true);
47462
+ node.setAttribute('checked', undefined);
47463
+ }
47464
+ else {
47465
+ node.setAttribute('indeterminate', undefined);
47466
+ node.setAttribute('checked', checked);
47467
+ }
47468
+ }
47469
+ });
47470
+ });
47471
+ }
47472
+ }
47118
47473
  updateAutoColWidth(col) {
47119
47474
  this.table.internalProps._widthResizedColMap.delete(col);
47120
47475
  const oldWidth = this.table.getColWidth(col);
@@ -48602,6 +48957,10 @@
48602
48957
  _clearVerticalScrollBar;
48603
48958
  _clearHorizontalScrollBar;
48604
48959
  fastScrolling = false;
48960
+ checkedState = [];
48961
+ headerCheckedState = {};
48962
+ _checkboxCellTypeFields = [];
48963
+ _headerCheckFuncs = {};
48605
48964
  resetInteractionState = debounce(() => {
48606
48965
  this.updateInteractionState(InteractionState.default);
48607
48966
  }, 100);
@@ -49207,6 +49566,155 @@
49207
49566
  this.sparkLine.row = -1;
49208
49567
  }
49209
49568
  }
49569
+ setCheckedState(col, row, field, checked) {
49570
+ const recordIndex = this.table.getRecordIndexByCell(col, row);
49571
+ if (recordIndex >= 0) {
49572
+ const dataIndex = this.table.dataSource.getIndexKey(recordIndex);
49573
+ if (this.checkedState[dataIndex]) {
49574
+ this.checkedState[dataIndex][field] = checked;
49575
+ }
49576
+ else {
49577
+ this.checkedState[dataIndex] = {};
49578
+ this.checkedState[dataIndex][field] = checked;
49579
+ }
49580
+ }
49581
+ }
49582
+ setHeaderCheckedState(field, checked) {
49583
+ this.headerCheckedState[field] = checked;
49584
+ this.checkedState?.forEach(recordCheckState => {
49585
+ recordCheckState[field] = checked;
49586
+ });
49587
+ }
49588
+ syncCheckedState(col, row, field, checked) {
49589
+ if (this.table.isHeader(col, row)) {
49590
+ if (isValid$6(this.headerCheckedState[field])) {
49591
+ return this.headerCheckedState[field];
49592
+ }
49593
+ else if (typeof checked === 'function') {
49594
+ return undefined;
49595
+ }
49596
+ else if (isValid$6(checked)) {
49597
+ this.headerCheckedState[field] = checked;
49598
+ }
49599
+ else if (this.checkedState?.length > 0) {
49600
+ const isAllChecked = this.updateHeaderCheckedState(field);
49601
+ return isAllChecked;
49602
+ }
49603
+ return this.headerCheckedState[field];
49604
+ }
49605
+ const recordIndex = this.table.getRecordIndexByCell(col, row);
49606
+ if (recordIndex >= 0) {
49607
+ const dataIndex = this.table.dataSource.getIndexKey(recordIndex);
49608
+ if (isValid$6(this.checkedState[dataIndex]?.[field])) {
49609
+ return this.checkedState[dataIndex][field];
49610
+ }
49611
+ if (this.checkedState[dataIndex]) {
49612
+ this.checkedState[dataIndex][field] = checked;
49613
+ }
49614
+ else {
49615
+ this.checkedState[dataIndex] = {};
49616
+ this.checkedState[dataIndex][field] = checked;
49617
+ }
49618
+ }
49619
+ return checked;
49620
+ }
49621
+ initCheckedState(records) {
49622
+ let isNeedInitHeaderCheckedStateFromRecord = false;
49623
+ this._checkboxCellTypeFields = [];
49624
+ this._headerCheckFuncs = {};
49625
+ this.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
49626
+ if (hd.headerType === 'checkbox') {
49627
+ const headerChecked = hd.define.checked;
49628
+ if (headerChecked === undefined || headerChecked === null || typeof headerChecked === 'function') {
49629
+ isNeedInitHeaderCheckedStateFromRecord = true;
49630
+ if (typeof headerChecked === 'function') {
49631
+ this._headerCheckFuncs[hd.field] = headerChecked;
49632
+ }
49633
+ }
49634
+ else {
49635
+ this.headerCheckedState[hd.field] = headerChecked;
49636
+ }
49637
+ if (hd.define.cellType === 'checkbox' && !hd.fieldFormat) {
49638
+ this._checkboxCellTypeFields.push(hd.field);
49639
+ }
49640
+ }
49641
+ });
49642
+ if (isNeedInitHeaderCheckedStateFromRecord) {
49643
+ records.forEach((record, index) => {
49644
+ this._checkboxCellTypeFields.forEach(field => {
49645
+ const value = record[field];
49646
+ let isChecked;
49647
+ if (isObject$4(value)) {
49648
+ isChecked = value.checked;
49649
+ }
49650
+ else if (typeof value === 'boolean') {
49651
+ isChecked = value;
49652
+ }
49653
+ if (isChecked === undefined || isChecked === null) {
49654
+ const headerCheckFunc = this._headerCheckFuncs[field];
49655
+ if (headerCheckFunc) {
49656
+ const cellAddr = this.table.getCellAddrByFieldRecord(field, index);
49657
+ const globalChecked = getOrApply(headerCheckFunc, {
49658
+ col: cellAddr.col,
49659
+ row: cellAddr.row,
49660
+ table: this.table,
49661
+ context: null,
49662
+ value
49663
+ });
49664
+ isChecked = globalChecked;
49665
+ }
49666
+ }
49667
+ if (!this.checkedState[index]) {
49668
+ this.checkedState[index] = {};
49669
+ }
49670
+ this.checkedState[index][field] = isChecked;
49671
+ });
49672
+ });
49673
+ }
49674
+ }
49675
+ updateHeaderCheckedState(field) {
49676
+ const allChecked = this.checkedState.every((state) => {
49677
+ return state[field] === true;
49678
+ });
49679
+ if (allChecked) {
49680
+ this.headerCheckedState[field] = true;
49681
+ return allChecked;
49682
+ }
49683
+ const allUnChecked = this.checkedState.every((state) => {
49684
+ return state[field] === false;
49685
+ });
49686
+ if (allUnChecked) {
49687
+ this.headerCheckedState[field] = false;
49688
+ return false;
49689
+ }
49690
+ const hasChecked = this.checkedState.find((state) => {
49691
+ return state[field] === true;
49692
+ });
49693
+ if (hasChecked) {
49694
+ this.headerCheckedState[field] = 'indeterminate';
49695
+ return 'indeterminate';
49696
+ }
49697
+ return false;
49698
+ }
49699
+ initLeftRecordsCheckState(records) {
49700
+ for (let index = this.checkedState.length; index < records.length; index++) {
49701
+ const record = records[index];
49702
+ this._checkboxCellTypeFields.forEach(field => {
49703
+ const value = record[field];
49704
+ let isChecked;
49705
+ if (isObject$4(value)) {
49706
+ isChecked = value.checked;
49707
+ }
49708
+ else if (typeof value === 'boolean') {
49709
+ isChecked = value;
49710
+ }
49711
+ if (!this.checkedState[index]) {
49712
+ this.checkedState[index] = {};
49713
+ }
49714
+ this.checkedState[index][field] = isChecked;
49715
+ });
49716
+ }
49717
+ }
49210
49718
  }
49211
49719
 
49212
49720
  function bindMediaClick(table) {
@@ -49848,6 +50356,24 @@
49848
50356
  target: eventArgsSet?.eventArgs?.target,
49849
50357
  checked: e.detail.checked
49850
50358
  };
50359
+ if (table.isHeader(col, row)) {
50360
+ table.stateManeger.setHeaderCheckedState(cellInfo.field, e.detail.checked);
50361
+ const define = table.getBodyColumnDefine(col, row);
50362
+ if (define.cellType === 'checkbox') {
50363
+ table.scenegraph.updateCheckboxCellState(col, row, e.detail.checked);
50364
+ }
50365
+ }
50366
+ else {
50367
+ table.stateManeger.setCheckedState(col, row, cellInfo.field, e.detail.checked);
50368
+ const define = table.getBodyColumnDefine(col, row);
50369
+ if (define.headerType === 'checkbox') {
50370
+ const oldHeaderCheckedState = table.stateManeger.headerCheckedState[cellInfo.field];
50371
+ const newHeaderCheckedState = table.stateManeger.updateHeaderCheckedState(cellInfo.field);
50372
+ if (oldHeaderCheckedState !== newHeaderCheckedState) {
50373
+ table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
50374
+ }
50375
+ }
50376
+ }
49851
50377
  table.fireListeners(TABLE_EVENT_TYPE.CHECKBOX_STATE_CHANGE, cellsEvent);
49852
50378
  });
49853
50379
  }
@@ -50486,7 +51012,7 @@
50486
51012
  }
50487
51013
  }
50488
51014
 
50489
- let defaultStyle$2;
51015
+ let defaultStyle$3;
50490
51016
  const DEFAULT_BAR_COLOR = (args) => {
50491
51017
  const num = args.value;
50492
51018
  if (Number(num) > 80) {
@@ -50517,7 +51043,7 @@
50517
51043
  _barMarkPosition;
50518
51044
  _barRightToLeft;
50519
51045
  static get DEFAULT() {
50520
- return defaultStyle$2 ? defaultStyle$2 : (defaultStyle$2 = new ProgressBarStyle());
51046
+ return defaultStyle$3 ? defaultStyle$3 : (defaultStyle$3 = new ProgressBarStyle());
50521
51047
  }
50522
51048
  constructor(style = {}, bodyStyle = {}) {
50523
51049
  super(style, bodyStyle);
@@ -50655,10 +51181,10 @@
50655
51181
  ];
50656
51182
  const iconPropKeys = ICON_PROP_KEYS;
50657
51183
 
50658
- let defaultStyle$1;
50659
- class CheckboxStyle extends Style$1 {
51184
+ let defaultStyle$2;
51185
+ let CheckboxStyle$1 = class CheckboxStyle extends Style$1 {
50660
51186
  static get DEFAULT() {
50661
- return defaultStyle$1 ? defaultStyle$1 : (defaultStyle$1 = new CheckboxStyle());
51187
+ return defaultStyle$2 ? defaultStyle$2 : (defaultStyle$2 = new CheckboxStyle());
50662
51188
  }
50663
51189
  constructor(style = {}, bodyStyle = {}) {
50664
51190
  super(style, bodyStyle);
@@ -50666,7 +51192,7 @@
50666
51192
  clone() {
50667
51193
  return new CheckboxStyle(this, null);
50668
51194
  }
50669
- }
51195
+ };
50670
51196
 
50671
51197
  class BodyHelper {
50672
51198
  expandIcon;
@@ -50747,7 +51273,7 @@
50747
51273
  case 'progressbar':
50748
51274
  return ProgressBarStyle;
50749
51275
  case 'checkbox':
50750
- return CheckboxStyle;
51276
+ return CheckboxStyle$1;
50751
51277
  }
50752
51278
  }
50753
51279
  getCellIconFromRecordValue(icon, col, row) {
@@ -51386,10 +51912,10 @@
51386
51912
  return itemContainer;
51387
51913
  }
51388
51914
 
51389
- let defaultStyle;
51915
+ let defaultStyle$1;
51390
51916
  class ImageStyle extends Style {
51391
51917
  static get DEFAULT() {
51392
- return defaultStyle ? defaultStyle : (defaultStyle = new ImageStyle());
51918
+ return defaultStyle$1 ? defaultStyle$1 : (defaultStyle$1 = new ImageStyle());
51393
51919
  }
51394
51920
  constructor(style = {}, headerStyle = {}) {
51395
51921
  super(style, headerStyle);
@@ -51400,6 +51926,19 @@
51400
51926
  }
51401
51927
  }
51402
51928
 
51929
+ let defaultStyle;
51930
+ class CheckboxStyle extends Style {
51931
+ static get DEFAULT() {
51932
+ return defaultStyle ? defaultStyle : (defaultStyle = new CheckboxStyle());
51933
+ }
51934
+ constructor(style = {}, headerStyle = {}) {
51935
+ super(style, headerStyle);
51936
+ }
51937
+ clone() {
51938
+ return new CheckboxStyle(this);
51939
+ }
51940
+ }
51941
+
51403
51942
  class HeaderHelper {
51404
51943
  normalIcon;
51405
51944
  upIcon;
@@ -51688,6 +52227,8 @@
51688
52227
  return ImageStyle;
51689
52228
  case 'link':
51690
52229
  return TextHeaderStyle;
52230
+ case 'checkbox':
52231
+ return CheckboxStyle;
51691
52232
  }
51692
52233
  }
51693
52234
  }
@@ -53294,7 +53835,7 @@
53294
53835
  return TABLE_EVENT_TYPE;
53295
53836
  }
53296
53837
  options;
53297
- version = "0.13.1-alpha.0";
53838
+ version = "0.13.1";
53298
53839
  pagination;
53299
53840
  id = `VTable${Date.now()}`;
53300
53841
  headerStyleCache;
@@ -54668,11 +55209,14 @@
54668
55209
  getContext() {
54669
55210
  return this.internalProps.context;
54670
55211
  }
54671
- getRecordByRowCol(col, row) {
55212
+ getRecordByCell(col, row) {
54672
55213
  if (this.internalProps.layoutMap.isHeader(col, row)) {
54673
55214
  return undefined;
54674
55215
  }
54675
- return this.internalProps.dataSource?.get(this.getRecordIndexByRow(col, row));
55216
+ return this.internalProps.dataSource?.get(this.getRecordIndexByCell(col, row));
55217
+ }
55218
+ getRecordByRowCol(col, row) {
55219
+ return this.getRecordByCell(col, row);
54676
55220
  }
54677
55221
  getRecordStartRowByRecordIndex(index) {
54678
55222
  return this.internalProps.layoutMap.getRecordStartRowByRecordIndex(index);
@@ -54754,6 +55298,7 @@
54754
55298
  else {
54755
55299
  _setRecords(this, records);
54756
55300
  }
55301
+ this.stateManeger.initCheckedState(records);
54757
55302
  this.internalProps.frozenColCount = this.options.frozenColCount || this.rowHeaderLevelCount;
54758
55303
  this.scenegraph.createSceneGraph();
54759
55304
  if (this.internalProps.title && !this.internalProps.title.isReleased) {
@@ -54764,7 +55309,7 @@
54764
55309
  this.render();
54765
55310
  }
54766
55311
  setRecord(record, col, row) {
54767
- const index = this.getRecordIndexByRow(col, row);
55312
+ const index = this.getRecordIndexByCell(col, row);
54768
55313
  this.dataSource.setRecord(record, index);
54769
55314
  }
54770
55315
  setDropDownMenuHighlight(cells) {
@@ -54828,7 +55373,7 @@
54828
55373
  if (table.internalProps.layoutMap.isHeader(col, row)) {
54829
55374
  return false;
54830
55375
  }
54831
- const index = table.getRecordIndexByRow(col, row);
55376
+ const index = table.getRecordIndexByCell(col, row);
54832
55377
  return table.internalProps.dataSource.hasField(index, field);
54833
55378
  }
54834
55379
  _getCellStyle(col, row) {
@@ -56157,7 +56702,7 @@
56157
56702
  range1.start.row === range2.start.row &&
56158
56703
  range1.end.row === range2.end.row);
56159
56704
  }
56160
- getRecordIndexByRow(col, row) {
56705
+ getRecordIndexByCell(col, row) {
56161
56706
  if (this.transpose) {
56162
56707
  if (col < this.headerLevelCount) {
56163
56708
  return -1;
@@ -56663,13 +57208,33 @@
56663
57208
  const { field } = table.internalProps.layoutMap.getBody(col, row);
56664
57209
  return table.getFieldData(field, col, row);
56665
57210
  }
56666
- getRecordIndexByRow(col, row) {
57211
+ getRecordIndexByCell(col, row) {
56667
57212
  const { layoutMap } = this.internalProps;
56668
- return layoutMap.getRecordIndexByRow(col, row);
57213
+ return layoutMap.getRecordIndexByCell(col, row);
57214
+ }
57215
+ getTableIndexByRecordIndex(recordIndex) {
57216
+ if (this.transpose) {
57217
+ return this.dataSource.getTableIndex(recordIndex) + this.rowHeaderLevelCount;
57218
+ }
57219
+ return this.dataSource.getTableIndex(recordIndex) + this.columnHeaderLevelCount;
57220
+ }
57221
+ getTableIndexByField(field) {
57222
+ const colObj = this.internalProps.layoutMap.columnObjects.find((col) => col.field === field);
57223
+ const layoutRange = this.internalProps.layoutMap.getBodyLayoutRangeById(colObj.id);
57224
+ if (this.transpose) {
57225
+ return layoutRange.start.row;
57226
+ }
57227
+ return layoutRange.start.col;
57228
+ }
57229
+ getCellAddrByFieldRecord(field, recordIndex) {
57230
+ if (this.transpose) {
57231
+ return { col: this.getTableIndexByRecordIndex(recordIndex), row: this.getTableIndexByField(field) };
57232
+ }
57233
+ return { col: this.getTableIndexByField(field), row: this.getTableIndexByRecordIndex(recordIndex) };
56669
57234
  }
56670
57235
  getCellOriginRecord(col, row) {
56671
57236
  const table = this;
56672
- const index = table.getRecordIndexByRow(col, row);
57237
+ const index = table.getRecordIndexByCell(col, row);
56673
57238
  if (index > -1) {
56674
57239
  return table.dataSource.get(index);
56675
57240
  }
@@ -56795,8 +57360,8 @@
56795
57360
  if (table.internalProps.layoutMap.isHeader(col, row)) {
56796
57361
  return null;
56797
57362
  }
56798
- const index = table.getRecordIndexByRow(col, row);
56799
- return table.internalProps.dataSource.getField(index, field);
57363
+ const index = table.getRecordIndexByCell(col, row);
57364
+ return table.internalProps.dataSource.getField(index, field, col, row, this);
56800
57365
  }
56801
57366
  moveHeaderPosition(source, target) {
56802
57367
  const moveContext = this.internalProps.layoutMap.moveHeaderPosition(source, target);
@@ -56902,7 +57467,7 @@
56902
57467
  if (!define.tree) {
56903
57468
  return HierarchyState.none;
56904
57469
  }
56905
- const index = this.getRecordIndexByRow(col, row);
57470
+ const index = this.getRecordIndexByCell(col, row);
56906
57471
  return this.dataSource.getHierarchyState(index);
56907
57472
  }
56908
57473
  toggleHierarchyState(col, row) {
@@ -56922,7 +57487,7 @@
56922
57487
  originData: this.getCellOriginRecord(col, row)
56923
57488
  });
56924
57489
  }
56925
- const index = this.getRecordIndexByRow(col, row);
57490
+ const index = this.getRecordIndexByCell(col, row);
56926
57491
  const diffDataIndices = this.dataSource.toggleHierarchyState(index);
56927
57492
  const diffPositions = this.internalProps.layoutMap.toggleHierarchyState(diffDataIndices);
56928
57493
  this.refreshRowColCount();
@@ -57006,6 +57571,17 @@
57006
57571
  }
57007
57572
  this.stateManeger.updateSortState(sortState);
57008
57573
  }
57574
+ getCheckboxState(field) {
57575
+ if (this.stateManeger.checkedState.length < this.rowCount - this.columnHeaderLevelCount) {
57576
+ this.stateManeger.initLeftRecordsCheckState(this.records);
57577
+ }
57578
+ if (isValid$6(field)) {
57579
+ return this.stateManeger.checkedState.map(state => {
57580
+ return state[field];
57581
+ });
57582
+ }
57583
+ return this.stateManeger.checkedState;
57584
+ }
57009
57585
  }
57010
57586
 
57011
57587
  class DimensionTree {
@@ -58252,7 +58828,7 @@
58252
58828
  range1.start.row === range2.start.row &&
58253
58829
  range1.end.row === range2.end.row);
58254
58830
  }
58255
- getRecordIndexByRow(row) {
58831
+ getBodyIndexByRow(row) {
58256
58832
  if (row < this.columnHeaderLevelCount) {
58257
58833
  return -1;
58258
58834
  }
@@ -58261,7 +58837,7 @@
58261
58837
  }
58262
58838
  return row - this.columnHeaderLevelCount;
58263
58839
  }
58264
- getRecordIndexByCol(col) {
58840
+ getBodyIndexByCol(col) {
58265
58841
  if (col < this.rowHeaderLevelCount) {
58266
58842
  return -1;
58267
58843
  }
@@ -58273,12 +58849,15 @@
58273
58849
  getRecordStartRowByRecordIndex(index) {
58274
58850
  return this.columnHeaderLevelCount + index;
58275
58851
  }
58852
+ getRecordIndexByCell(col, row) {
58853
+ return undefined;
58854
+ }
58276
58855
  getCellHeaderPathsWidthTreeNode(col, row) {
58277
58856
  if (this._CellHeaderPathMap.has(`${col}-${row}`)) {
58278
58857
  return this._CellHeaderPathMap.get(`${col}-${row}`);
58279
58858
  }
58280
- const recordCol = this.getRecordIndexByCol(col);
58281
- const recordRow = this.getRecordIndexByRow(row) + this.currentPageStartIndex;
58859
+ const recordCol = this.getBodyIndexByCol(col);
58860
+ const recordRow = this.getBodyIndexByRow(row) + this.currentPageStartIndex;
58282
58861
  let colPath;
58283
58862
  let rowPath;
58284
58863
  if (row >= 0 && recordCol >= 0) {
@@ -59387,10 +59966,10 @@
59387
59966
  this.formatFun = formatFun;
59388
59967
  this.isRecord = isRecord ?? this.isRecord;
59389
59968
  }
59390
- formatValue() {
59969
+ formatValue(col, row, table) {
59391
59970
  if (!this._formatedValue) {
59392
59971
  if (this.formatFun) {
59393
- this._formatedValue = this.formatFun(this.value());
59972
+ this._formatedValue = this.formatFun(this.value(), col, row, table);
59394
59973
  }
59395
59974
  else {
59396
59975
  this._formatedValue = this.value();
@@ -61179,13 +61758,25 @@
61179
61758
  });
61180
61759
  }
61181
61760
  }
61182
- getRecordIndexByRow(row) {
61761
+ getRecordIndexByCell(col, row) {
61762
+ return undefined;
61763
+ }
61764
+ getTableIndexByRecordIndex(recordIndex) {
61765
+ return undefined;
61766
+ }
61767
+ getTableIndexByField(field) {
61768
+ return undefined;
61769
+ }
61770
+ getCellAddrByFieldRecord(field, recordIndex) {
61771
+ return undefined;
61772
+ }
61773
+ getBodyIndexByRow(row) {
61183
61774
  const { layoutMap } = this.internalProps;
61184
- return layoutMap.getRecordIndexByRow(row);
61775
+ return layoutMap.getBodyIndexByRow(row);
61185
61776
  }
61186
- getRecordIndexByCol(col) {
61777
+ getBodyIndexByCol(col) {
61187
61778
  const { layoutMap } = this.internalProps;
61188
- return layoutMap.getRecordIndexByCol(col);
61779
+ return layoutMap.getBodyIndexByCol(col);
61189
61780
  }
61190
61781
  getFieldData(field, col, row) {
61191
61782
  if (field === null || field === undefined) {
@@ -61195,12 +61786,12 @@
61195
61786
  if (table.internalProps.layoutMap.isHeader(col, row)) {
61196
61787
  return null;
61197
61788
  }
61198
- const rowIndex = this.getRecordIndexByRow(row);
61199
- const colIndex = this.getRecordIndexByCol(col);
61200
- const dataValue = table.dataSource?.getField(rowIndex, colIndex);
61789
+ const rowIndex = this.getBodyIndexByRow(row);
61790
+ const colIndex = this.getBodyIndexByCol(col);
61791
+ const dataValue = table.dataSource?.getField(rowIndex, colIndex, col, row, this);
61201
61792
  if (typeof field !== 'string') {
61202
61793
  const cellHeaderPaths = table.internalProps.layoutMap.getCellHeaderPaths(col, row);
61203
- return getField({ dataValue, ...cellHeaderPaths }, field, emptyFn);
61794
+ return getField({ dataValue, ...cellHeaderPaths }, field, col, row, this, emptyFn);
61204
61795
  }
61205
61796
  return dataValue;
61206
61797
  }
@@ -61218,7 +61809,7 @@
61218
61809
  return rowPath.indicatorKey ?? rowPath.value;
61219
61810
  });
61220
61811
  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() : '';
61812
+ return aggregator.formatValue ? aggregator.formatValue(col, row, this) : '';
61222
61813
  }
61223
61814
  else if (this.flatDataToObjects) {
61224
61815
  const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
@@ -61230,7 +61821,9 @@
61230
61821
  });
61231
61822
  const valueNode = this.flatDataToObjects.getTreeNode(rowKeys, colKeys, this.internalProps.layoutMap.getBody(col, row).indicatorKey);
61232
61823
  const { fieldFormat } = this.internalProps.layoutMap.getBody(col, row);
61233
- return typeof fieldFormat === 'function' ? fieldFormat(valueNode?.record) : valueNode?.value ?? '';
61824
+ return typeof fieldFormat === 'function'
61825
+ ? fieldFormat(valueNode?.record, col, row, this)
61826
+ : valueNode?.value ?? '';
61234
61827
  }
61235
61828
  const { field, fieldFormat } = this.internalProps.layoutMap.getBody(col, row);
61236
61829
  return this.getFieldData(fieldFormat || field, col, row);
@@ -61650,13 +62243,25 @@
61650
62243
  });
61651
62244
  }
61652
62245
  }
61653
- getRecordIndexByRow(row) {
62246
+ getRecordIndexByCell(col, row) {
62247
+ return undefined;
62248
+ }
62249
+ getTableIndexByRecordIndex(recordIndex) {
62250
+ return undefined;
62251
+ }
62252
+ getTableIndexByField(field) {
62253
+ return undefined;
62254
+ }
62255
+ getCellAddrByFieldRecord(field, recordIndex) {
62256
+ return undefined;
62257
+ }
62258
+ getBodyIndexByRow(row) {
61654
62259
  const { layoutMap } = this.internalProps;
61655
- return layoutMap.getRecordIndexByRow(row);
62260
+ return layoutMap.getBodyIndexByRow(row);
61656
62261
  }
61657
- getRecordIndexByCol(col) {
62262
+ getBodyIndexByCol(col) {
61658
62263
  const { layoutMap } = this.internalProps;
61659
- return layoutMap.getRecordIndexByCol(col);
62264
+ return layoutMap.getBodyIndexByCol(col);
61660
62265
  }
61661
62266
  getFieldData(field, col, row) {
61662
62267
  if (field === null || field === undefined) {
@@ -61666,12 +62271,12 @@
61666
62271
  if (table.internalProps.layoutMap.isHeader(col, row)) {
61667
62272
  return null;
61668
62273
  }
61669
- const rowIndex = this.getRecordIndexByRow(row);
61670
- const colIndex = this.getRecordIndexByCol(col);
61671
- const dataValue = table.dataSource?.getField(rowIndex, colIndex);
62274
+ const rowIndex = this.getBodyIndexByRow(row);
62275
+ const colIndex = this.getBodyIndexByCol(col);
62276
+ const dataValue = table.dataSource?.getField(rowIndex, colIndex, col, row, this);
61672
62277
  if (typeof field !== 'string') {
61673
62278
  const cellHeaderPaths = table.internalProps.layoutMap.getCellHeaderPaths(col, row);
61674
- return getField({ dataValue, ...cellHeaderPaths }, field, emptyFn);
62279
+ return getField({ dataValue, ...cellHeaderPaths }, field, col, row, this, emptyFn);
61675
62280
  }
61676
62281
  return dataValue;
61677
62282
  }
@@ -61856,12 +62461,16 @@
61856
62461
  return result;
61857
62462
  }
61858
62463
  _generateCollectValuesConfig(columnKeys, rowKeys) {
61859
- const option = this.options;
62464
+ const indicators = this.internalProps.indicators;
61860
62465
  const collectValuesBy = {};
61861
- for (let i = 0, len = option.indicators?.length; i < len; i++) {
61862
- if (typeof option.indicators[i] !== 'string' && option.indicators[i].chartSpec) {
61863
- if (option.indicatorsAsCol === false) {
61864
- const indicatorDefine = option.indicators[i];
62466
+ for (let i = 0, len = indicators?.length; i < len; i++) {
62467
+ if (typeof indicators[i] !== 'string' && indicators[i].chartSpec) {
62468
+ if (this.options.indicatorsAsCol === false) {
62469
+ const indicatorDefine = indicators[i];
62470
+ indicatorDefine.chartSpec?.stack !== false &&
62471
+ (indicatorDefine.chartSpec?.type === 'bar' ||
62472
+ indicatorDefine.chartSpec?.type === 'area') &&
62473
+ (indicatorDefine.chartSpec.stack = true);
61865
62474
  collectValuesBy[indicatorDefine.indicatorKey] = {
61866
62475
  by: rowKeys,
61867
62476
  range: true,
@@ -61881,6 +62490,9 @@
61881
62490
  : undefined
61882
62491
  };
61883
62492
  const yField = chartSeries.yField;
62493
+ chartSeries.stack !== false &&
62494
+ (chartSeries.type === 'bar' || chartSeries.type === 'area') &&
62495
+ (chartSeries.stack = true);
61884
62496
  collectValuesBy[yField] = {
61885
62497
  by: rowKeys,
61886
62498
  range: chartSeries.direction !== 'horizontal',
@@ -61904,10 +62516,14 @@
61904
62516
  ? indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
61905
62517
  : undefined
61906
62518
  };
62519
+ indicatorDefine.chartSpec?.stack !== false &&
62520
+ (indicatorDefine.chartSpec?.type === 'bar' ||
62521
+ indicatorDefine.chartSpec?.type === 'area') &&
62522
+ (indicatorDefine.chartSpec.stack = true);
61907
62523
  const yField = indicatorDefine.chartSpec.yField;
61908
62524
  collectValuesBy[yField] = {
61909
62525
  by: rowKeys,
61910
- range: option.indicators[i].chartSpec.direction !== 'horizontal',
62526
+ range: indicators[i].chartSpec.direction !== 'horizontal',
61911
62527
  sumBy: indicatorDefine.chartSpec.stack !== false &&
61912
62528
  columnKeys.concat(indicatorDefine.chartSpec?.xField),
61913
62529
  sortBy: indicatorDefine.chartSpec.direction === 'horizontal'
@@ -61917,7 +62533,11 @@
61917
62533
  }
61918
62534
  }
61919
62535
  else {
61920
- const indicatorDefine = option.indicators[i];
62536
+ const indicatorDefine = indicators[i];
62537
+ indicatorDefine.chartSpec?.stack !== false &&
62538
+ (indicatorDefine.chartSpec?.type === 'bar' ||
62539
+ indicatorDefine.chartSpec?.type === 'area') &&
62540
+ (indicatorDefine.chartSpec.stack = true);
61921
62541
  collectValuesBy[indicatorDefine.indicatorKey] = {
61922
62542
  by: columnKeys,
61923
62543
  range: true,
@@ -61937,6 +62557,9 @@
61937
62557
  : undefined
61938
62558
  };
61939
62559
  const xField = chartSeries.xField;
62560
+ chartSeries.stack !== false &&
62561
+ (chartSeries.type === 'bar' || chartSeries.type === 'area') &&
62562
+ (chartSeries.stack = true);
61940
62563
  collectValuesBy[xField] = {
61941
62564
  by: columnKeys,
61942
62565
  range: chartSeries.direction === 'horizontal',
@@ -61960,10 +62583,14 @@
61960
62583
  ? indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
61961
62584
  : undefined
61962
62585
  };
62586
+ indicatorDefine.chartSpec?.stack !== false &&
62587
+ (indicatorDefine.chartSpec?.type === 'bar' ||
62588
+ indicatorDefine.chartSpec?.type === 'area') &&
62589
+ (indicatorDefine.chartSpec.stack = true);
61963
62590
  const xField = indicatorDefine.chartSpec.xField;
61964
62591
  collectValuesBy[xField] = {
61965
62592
  by: columnKeys,
61966
- range: option.indicators[i].chartSpec.direction === 'horizontal',
62593
+ range: indicators[i].chartSpec.direction === 'horizontal',
61967
62594
  sumBy: indicatorDefine.chartSpec.stack !== false &&
61968
62595
  rowKeys.concat(indicatorDefine.chartSpec?.yField),
61969
62596
  sortBy: indicatorDefine.chartSpec.direction !== 'horizontal'
@@ -63055,7 +63682,7 @@
63055
63682
  return new Tag(params ? params.attribute : {});
63056
63683
  }
63057
63684
 
63058
- const version = "0.13.1-alpha.0";
63685
+ const version = "0.13.1";
63059
63686
  function getIcons() {
63060
63687
  return get$1();
63061
63688
  }