@visactor/vtable-calendar 1.27.0-alpha.1 → 1.27.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9401,10 +9401,18 @@
9401
9401
  setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context, ignorePriority) {
9402
9402
  if (!params) return;
9403
9403
  const keys = Object.keys(params);
9404
- this.captureTransientFromAttrsBeforePreventAnimate(params, keys, context), this.visitTrackedAnimates(animate => {
9404
+ this.captureTransientFromAttrsBeforePreventAnimate(params, keys, context), this.syncFinalAttributesFromUpdateContext(context), this.visitTrackedAnimates(animate => {
9405
9405
  (animate.priority !== 1 / 0 || ignorePriority) && animate.preventAttrs(keys);
9406
9406
  }), this.applyTransientAttributes(params, forceUpdateTag, context);
9407
9407
  }
9408
+ syncFinalAttributesFromUpdateContext(context) {
9409
+ var _a;
9410
+ const updateType = null == context ? void 0 : context.type;
9411
+ if (updateType === AttributeUpdateType.STATE || null != updateType && updateType >= AttributeUpdateType.ANIMATE_BIND && updateType <= AttributeUpdateType.ANIMATE_END) return;
9412
+ const finalAttrs = null === (_a = this.context) || void 0 === _a ? void 0 : _a.finalAttrs,
9413
+ setFinalAttributes = this.setFinalAttributes;
9414
+ finalAttrs && "function" == typeof setFinalAttributes && setFinalAttributes.call(this, finalAttrs);
9415
+ }
9408
9416
  captureTransientFromAttrsBeforePreventAnimate(params, keys, context) {
9409
9417
  var _a, _b;
9410
9418
  const graphicContext = this.context,
@@ -21158,7 +21166,7 @@
21158
21166
  };
21159
21167
  }
21160
21168
 
21161
- var __rest$6 = undefined && undefined.__rest || function (s, e) {
21169
+ var __rest$8 = undefined && undefined.__rest || function (s, e) {
21162
21170
  var t = {};
21163
21171
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
21164
21172
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -21256,7 +21264,7 @@
21256
21264
  {
21257
21265
  textConfig = []
21258
21266
  } = _a,
21259
- rest = __rest$6(_a, ["textConfig"]);
21267
+ rest = __rest$8(_a, ["textConfig"]);
21260
21268
  if ("Backspace" === ev.type && !textConfig.length) return;
21261
21269
  let str = ev.data;
21262
21270
  this.isComposing || "Backspace" === ev.type || str || (str = "\n"), this.selectionStartCursorIdx > this.cursorIndex && ([this.cursorIndex, this.selectionStartCursorIdx] = [this.selectionStartCursorIdx, this.cursorIndex]);
@@ -25652,188 +25660,6 @@
25652
25660
  }
25653
25661
  loadBrowserEnv.__loaded = !1;
25654
25662
 
25655
- class NodeWindowHandlerContribution extends BaseWindowHandlerContribution {
25656
- get container() {
25657
- return null;
25658
- }
25659
- constructor(global = application.global) {
25660
- super(), this.global = global, this.type = "node";
25661
- }
25662
- getTitle() {
25663
- return "";
25664
- }
25665
- getWH() {
25666
- return {
25667
- width: this.canvas.displayWidth,
25668
- height: this.canvas.displayHeight
25669
- };
25670
- }
25671
- getXY() {
25672
- return {
25673
- x: 0,
25674
- y: 0
25675
- };
25676
- }
25677
- createWindow(params) {
25678
- params.canvas ? this.createWindowByCanvas(params) : this.createWindowByConfig(params);
25679
- }
25680
- createWindowByConfig(params) {
25681
- const nativeCanvas = this.global.createCanvas({
25682
- width: params.width,
25683
- height: params.height
25684
- }),
25685
- options = {
25686
- width: params.width,
25687
- height: params.height,
25688
- dpr: params.dpr,
25689
- nativeCanvas: nativeCanvas,
25690
- id: Generator.GenAutoIncrementId().toString(),
25691
- canvasControled: !0
25692
- };
25693
- this.canvas = new NodeCanvas(options);
25694
- }
25695
- createWindowByCanvas(params) {
25696
- var _a;
25697
- const canvas = params.canvas,
25698
- dpr = null !== (_a = params.dpr) && void 0 !== _a ? _a : 1;
25699
- let width = params.width,
25700
- height = params.height;
25701
- null != width && null != height && params.canvasControled || (width = canvas.width / dpr, height = canvas.height / dpr), this.canvas = new NodeCanvas({
25702
- width: width,
25703
- height: height,
25704
- dpr: dpr,
25705
- nativeCanvas: canvas,
25706
- canvasControled: params.canvasControled
25707
- });
25708
- }
25709
- releaseWindow() {
25710
- this.canvas.release();
25711
- }
25712
- resizeWindow(width, height) {
25713
- this.canvas.resize(width, height);
25714
- }
25715
- setDpr(dpr) {
25716
- this.canvas.dpr = dpr;
25717
- }
25718
- getContext() {
25719
- return this.canvas.getContext();
25720
- }
25721
- getNativeHandler() {
25722
- return this.canvas;
25723
- }
25724
- getDpr() {
25725
- return this.canvas.dpr;
25726
- }
25727
- getImageBuffer(type = "image/png") {
25728
- return this.canvas.nativeCanvas.toBuffer(type);
25729
- }
25730
- addEventListener(type, listener, options) {}
25731
- dispatchEvent(event) {
25732
- return !0;
25733
- }
25734
- removeEventListener(type, listener, options) {}
25735
- getStyle() {}
25736
- setStyle(style) {}
25737
- getBoundingClientRect() {
25738
- return null;
25739
- }
25740
- clearViewBox(color) {}
25741
- }
25742
- NodeWindowHandlerContribution.env = "node";
25743
- function bindNodeWindowContribution(container) {
25744
- var _a, _b;
25745
- (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, NodeWindowHandlerContribution)) || container.bind(NodeWindowHandlerContribution).toSelf(), (null === (_b = container.getNamed) || void 0 === _b ? void 0 : _b.call(container, WindowHandlerContribution, NodeWindowHandlerContribution.env)) || container.bind(WindowHandlerContribution).toService(NodeWindowHandlerContribution).whenTargetNamed(NodeWindowHandlerContribution.env);
25746
- }
25747
-
25748
- class NodeEnvContribution extends BaseEnvContribution {
25749
- constructor() {
25750
- super(...arguments), this.type = "node", this._lastTime = 0, this.supportEvent = !1;
25751
- }
25752
- configure(service, pkg) {
25753
- service.env === this.type && (service.setActiveEnvContribution(this), this.pkg = pkg);
25754
- }
25755
- getDynamicCanvasCount() {
25756
- return 0;
25757
- }
25758
- getStaticCanvasCount() {
25759
- return 999;
25760
- }
25761
- loadJson(url) {
25762
- const jsonPromise = fetch(url).then(data => data.json());
25763
- return jsonPromise.then(json => ({
25764
- data: json,
25765
- state: "success"
25766
- })).catch(() => ({
25767
- data: null,
25768
- state: "fail"
25769
- })), jsonPromise;
25770
- }
25771
- loadArrayBuffer(url) {
25772
- return fetch(url).then(data => data.arrayBuffer()).then(arrayBuffer => ({
25773
- data: arrayBuffer,
25774
- loadState: "success"
25775
- })).catch(() => ({
25776
- data: null,
25777
- loadState: "fail"
25778
- }));
25779
- }
25780
- loadImage(url) {
25781
- const {
25782
- loadImage: loadImage
25783
- } = this.pkg;
25784
- return loadImage ? loadImage(url).then(image => ({
25785
- loadState: image ? "success" : "fail",
25786
- data: image
25787
- })).catch(() => ({
25788
- loadState: "fail",
25789
- data: null
25790
- })) : Promise.reject(new Error("node-canvas loadImage could not be found!"));
25791
- }
25792
- loadSvg(svgStr) {
25793
- const Resvg = this.pkg.Resvg;
25794
- if (!Resvg) return Promise.reject(new Error("@resvg/resvg-js svgParser could not be found!"));
25795
- const pngData = new Resvg(svgStr).render().asPng();
25796
- return this.loadImage(pngData);
25797
- }
25798
- createCanvas(params) {
25799
- return this.pkg.createCanvas(params.width, params.height);
25800
- }
25801
- releaseCanvas(canvas) {}
25802
- getDevicePixelRatio() {
25803
- return 1;
25804
- }
25805
- getRequestAnimationFrame() {
25806
- return function (callback) {
25807
- return rafBasedSto.call(callback);
25808
- };
25809
- }
25810
- getCancelAnimationFrame() {
25811
- return h => {
25812
- rafBasedSto.clear(h);
25813
- };
25814
- }
25815
- addEventListener(type, listener, options) {}
25816
- removeEventListener(type, listener, options) {}
25817
- getElementById(str) {
25818
- return null;
25819
- }
25820
- getRootElement() {
25821
- return null;
25822
- }
25823
- dispatchEvent(event) {}
25824
- release(...params) {}
25825
- createOffscreenCanvas(params) {}
25826
- }
25827
-
25828
- function bindNodeEnv(container) {
25829
- var _a, _b;
25830
- (null === (_b = (_a = container).isBound) || void 0 === _b ? void 0 : _b.call(_a, NodeEnvContribution)) || (container.bind(NodeEnvContribution).toSelf().inSingletonScope(), container.bind(EnvContribution).toService(NodeEnvContribution));
25831
- }
25832
- function loadNodeEnv(container = getLegacyBindingContext(), loadPicker = !0) {
25833
- loadNodeEnv.__loaded || (loadNodeEnv.__loaded = !0, bindNodeEnv(container), bindNodeCanvasModules(container), bindNodeWindowContribution(container));
25834
- }
25835
- loadNodeEnv.__loaded = !1;
25836
-
25837
25663
  class DefaultMathPickerService extends DefaultPickService {
25838
25664
  constructor(contributions, pickItemInterceptorContributions, pickServiceInterceptorContributions) {
25839
25665
  super(pickItemInterceptorContributions, pickServiceInterceptorContributions), this.contributions = contributions, this.pickItemInterceptorContributions = pickItemInterceptorContributions, this.pickServiceInterceptorContributions = pickServiceInterceptorContributions, this.global.hooks.onSetEnv.tap("math-picker-service", (lastEnv, env, global) => {
@@ -26017,6 +25843,195 @@
26017
25843
  bindMathPickerContribution(c), bindMathPicker(c), bindArcMathPickerContribution(c), bindAreaMathPickerContribution(c), bindCircleMathPickerContribution(c), bindGlyphMathPickerContribution(c), bindImageMathPickerContribution(c), bindLineMathPickerContribution(c), bindPolygonMathPickerContribution(c), bindPathMathPickerContribution(c), bindRectMathPickerContribution(c), bindRichTextMathPickerContribution(c), bindSymbolMathPickerContribution(c), bindTextMathPickerContribution(c);
26018
25844
  }
26019
25845
 
25846
+ class NodeWindowHandlerContribution extends BaseWindowHandlerContribution {
25847
+ get container() {
25848
+ return null;
25849
+ }
25850
+ constructor(global = application.global) {
25851
+ super(), this.global = global, this.type = "node";
25852
+ }
25853
+ getTitle() {
25854
+ return "";
25855
+ }
25856
+ getWH() {
25857
+ return {
25858
+ width: this.canvas.displayWidth,
25859
+ height: this.canvas.displayHeight
25860
+ };
25861
+ }
25862
+ getXY() {
25863
+ return {
25864
+ x: 0,
25865
+ y: 0
25866
+ };
25867
+ }
25868
+ createWindow(params) {
25869
+ params.canvas ? this.createWindowByCanvas(params) : this.createWindowByConfig(params);
25870
+ }
25871
+ createWindowByConfig(params) {
25872
+ const nativeCanvas = this.global.createCanvas({
25873
+ width: params.width,
25874
+ height: params.height
25875
+ }),
25876
+ options = {
25877
+ width: params.width,
25878
+ height: params.height,
25879
+ dpr: params.dpr,
25880
+ nativeCanvas: nativeCanvas,
25881
+ id: Generator.GenAutoIncrementId().toString(),
25882
+ canvasControled: !0
25883
+ };
25884
+ this.canvas = new NodeCanvas(options);
25885
+ }
25886
+ createWindowByCanvas(params) {
25887
+ var _a;
25888
+ const canvas = params.canvas,
25889
+ dpr = null !== (_a = params.dpr) && void 0 !== _a ? _a : 1;
25890
+ let width = params.width,
25891
+ height = params.height;
25892
+ null != width && null != height && params.canvasControled || (width = canvas.width / dpr, height = canvas.height / dpr), this.canvas = new NodeCanvas({
25893
+ width: width,
25894
+ height: height,
25895
+ dpr: dpr,
25896
+ nativeCanvas: canvas,
25897
+ canvasControled: params.canvasControled
25898
+ });
25899
+ }
25900
+ releaseWindow() {
25901
+ this.canvas.release();
25902
+ }
25903
+ resizeWindow(width, height) {
25904
+ this.canvas.resize(width, height);
25905
+ }
25906
+ setDpr(dpr) {
25907
+ this.canvas.dpr = dpr;
25908
+ }
25909
+ getContext() {
25910
+ return this.canvas.getContext();
25911
+ }
25912
+ getNativeHandler() {
25913
+ return this.canvas;
25914
+ }
25915
+ getDpr() {
25916
+ return this.canvas.dpr;
25917
+ }
25918
+ getImageBuffer(type = "image/png") {
25919
+ return this.canvas.nativeCanvas.toBuffer(type);
25920
+ }
25921
+ addEventListener(type, listener, options) {}
25922
+ dispatchEvent(event) {
25923
+ return !0;
25924
+ }
25925
+ removeEventListener(type, listener, options) {}
25926
+ getStyle() {}
25927
+ setStyle(style) {}
25928
+ getBoundingClientRect() {
25929
+ return null;
25930
+ }
25931
+ clearViewBox(color) {}
25932
+ }
25933
+ NodeWindowHandlerContribution.env = "node";
25934
+ function bindNodeWindowContribution(container) {
25935
+ var _a, _b;
25936
+ (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, NodeWindowHandlerContribution)) || container.bind(NodeWindowHandlerContribution).toSelf(), (null === (_b = container.getNamed) || void 0 === _b ? void 0 : _b.call(container, WindowHandlerContribution, NodeWindowHandlerContribution.env)) || container.bind(WindowHandlerContribution).toService(NodeWindowHandlerContribution).whenTargetNamed(NodeWindowHandlerContribution.env);
25937
+ }
25938
+
25939
+ class NodeEnvContribution extends BaseEnvContribution {
25940
+ constructor() {
25941
+ super(...arguments), this.type = "node", this._lastTime = 0, this.supportEvent = !1;
25942
+ }
25943
+ configure(service, pkg) {
25944
+ service.env === this.type && (service.setActiveEnvContribution(this), this.pkg = pkg);
25945
+ }
25946
+ getNodePackage(feature, requiredKey) {
25947
+ if (!this.pkg || requiredKey && "function" != typeof this.pkg[requiredKey]) throw new Error(`Node env requires node-canvas package before ${feature}. Use vglobal.setEnv('node', CanvasPkg) before createNodeVRenderApp(), or createNodeVRenderApp({ envParams: CanvasPkg }).`);
25948
+ return this.pkg;
25949
+ }
25950
+ getDynamicCanvasCount() {
25951
+ return 0;
25952
+ }
25953
+ getStaticCanvasCount() {
25954
+ return 999;
25955
+ }
25956
+ loadJson(url) {
25957
+ const jsonPromise = fetch(url).then(data => data.json());
25958
+ return jsonPromise.then(json => ({
25959
+ data: json,
25960
+ state: "success"
25961
+ })).catch(() => ({
25962
+ data: null,
25963
+ state: "fail"
25964
+ })), jsonPromise;
25965
+ }
25966
+ loadArrayBuffer(url) {
25967
+ return fetch(url).then(data => data.arrayBuffer()).then(arrayBuffer => ({
25968
+ data: arrayBuffer,
25969
+ loadState: "success"
25970
+ })).catch(() => ({
25971
+ data: null,
25972
+ loadState: "fail"
25973
+ }));
25974
+ }
25975
+ loadImage(url) {
25976
+ const {
25977
+ loadImage: loadImage
25978
+ } = this.getNodePackage("loadImage", "loadImage");
25979
+ return loadImage ? loadImage(url).then(image => ({
25980
+ loadState: image ? "success" : "fail",
25981
+ data: image
25982
+ })).catch(() => ({
25983
+ loadState: "fail",
25984
+ data: null
25985
+ })) : Promise.reject(new Error("node-canvas loadImage could not be found!"));
25986
+ }
25987
+ loadSvg(svgStr) {
25988
+ const Resvg = this.getNodePackage("loadSvg").Resvg;
25989
+ if (!Resvg) return Promise.reject(new Error("@resvg/resvg-js svgParser could not be found!"));
25990
+ const pngData = new Resvg(svgStr).render().asPng();
25991
+ return this.loadImage(pngData);
25992
+ }
25993
+ createCanvas(params) {
25994
+ const {
25995
+ createCanvas: createCanvas
25996
+ } = this.getNodePackage("createCanvas", "createCanvas");
25997
+ return createCanvas(params.width, params.height);
25998
+ }
25999
+ releaseCanvas(canvas) {}
26000
+ getDevicePixelRatio() {
26001
+ return 1;
26002
+ }
26003
+ getRequestAnimationFrame() {
26004
+ return function (callback) {
26005
+ return rafBasedSto.call(callback);
26006
+ };
26007
+ }
26008
+ getCancelAnimationFrame() {
26009
+ return h => {
26010
+ rafBasedSto.clear(h);
26011
+ };
26012
+ }
26013
+ addEventListener(type, listener, options) {}
26014
+ removeEventListener(type, listener, options) {}
26015
+ getElementById(str) {
26016
+ return null;
26017
+ }
26018
+ getRootElement() {
26019
+ return null;
26020
+ }
26021
+ dispatchEvent(event) {}
26022
+ release(...params) {}
26023
+ createOffscreenCanvas(params) {}
26024
+ }
26025
+
26026
+ function bindNodeEnv(container) {
26027
+ var _a, _b;
26028
+ (null === (_b = (_a = container).isBound) || void 0 === _b ? void 0 : _b.call(_a, NodeEnvContribution)) || (container.bind(NodeEnvContribution).toSelf().inSingletonScope(), container.bind(EnvContribution).toService(NodeEnvContribution));
26029
+ }
26030
+ function loadNodeEnv(container = getLegacyBindingContext(), loadPicker = !0) {
26031
+ loadNodeEnv.__loaded || (loadNodeEnv.__loaded = !0, bindNodeEnv(container), bindNodeCanvasModules(container), bindNodeWindowContribution(container));
26032
+ }
26033
+ loadNodeEnv.__loaded = !1;
26034
+
26020
26035
  var lib$1 = {};
26021
26036
 
26022
26037
  var gif = {};
@@ -26808,17 +26823,46 @@
26808
26823
  });
26809
26824
  }), bindGifImageRenderContribution(bindingContext), refreshRuntimeInstallerContributions();
26810
26825
  }
26811
- function installBrowserEnvToApp(app) {
26826
+ function createForcedEnvParams(envParams) {
26827
+ if (null != envParams && ("object" == typeof envParams || "function" == typeof envParams)) {
26828
+ const forcedEnvParams = Object.create(envParams);
26829
+ return forcedEnvParams.force = !0, forcedEnvParams;
26830
+ }
26831
+ return {
26832
+ force: !0
26833
+ };
26834
+ }
26835
+ function activateRuntimeEnv(env, {
26836
+ envParams: envParams,
26837
+ force = !1
26838
+ } = {}) {
26839
+ getRuntimeInstallerGlobal().setEnv(env, force ? createForcedEnvParams(envParams) : envParams);
26840
+ }
26841
+ function installRuntimeEnvToApp(app, env, {
26842
+ bindEnv: bindEnv,
26843
+ bindCanvasModules: bindCanvasModules,
26844
+ bindWindowContribution: bindWindowContribution
26845
+ }, envParams) {
26812
26846
  configureRuntimeApplicationForApp(app);
26813
26847
  const bindingContext = getRuntimeInstallerBindingContext();
26814
- bindBrowserEnv(bindingContext), bindBrowserCanvasModules(bindingContext), bindBrowserWindowContribution(bindingContext), refreshRuntimeInstallerContributions(), getRuntimeInstallerGlobal().setEnv("browser", {
26848
+ bindEnv(bindingContext), bindCanvasModules(bindingContext), bindWindowContribution(bindingContext), refreshRuntimeInstallerContributions(), activateRuntimeEnv(env, {
26849
+ envParams: envParams,
26815
26850
  force: !0
26816
26851
  });
26817
26852
  }
26818
- function installNodeEnvToApp(app) {
26819
- configureRuntimeApplicationForApp(app);
26820
- const bindingContext = getRuntimeInstallerBindingContext();
26821
- bindNodeEnv(bindingContext), bindNodeCanvasModules(bindingContext), bindNodeWindowContribution(bindingContext), refreshRuntimeInstallerContributions();
26853
+ function installBrowserEnvToApp(app, envParams) {
26854
+ installRuntimeEnvToApp(app, "browser", {
26855
+ bindEnv: bindBrowserEnv,
26856
+ bindCanvasModules: bindBrowserCanvasModules,
26857
+ bindWindowContribution: bindBrowserWindowContribution
26858
+ }, envParams);
26859
+ }
26860
+ function installNodeEnvToApp(app, envParams) {
26861
+ installRuntimeEnvToApp(app, "node", {
26862
+ bindEnv: bindNodeEnv,
26863
+ bindCanvasModules: bindNodeCanvasModules,
26864
+ bindWindowContribution: bindNodeWindowContribution
26865
+ }, envParams);
26822
26866
  }
26823
26867
  function installDefaultGraphicsToApp(app) {
26824
26868
  configureRuntimeApplicationForApp(app), ensureDefaultGraphicsInstalled(), installRuntimeDrawContributionsToApp(app), installRuntimeGraphicRenderersToApp(app);
@@ -27737,7 +27781,7 @@
27737
27781
  registerGroup(), registerRect(), registerSymbol(), registerRichtext(), registerText();
27738
27782
  }
27739
27783
 
27740
- var __rest$5 = undefined && undefined.__rest || function (s, e) {
27784
+ var __rest$7 = undefined && undefined.__rest || function (s, e) {
27741
27785
  var t = {};
27742
27786
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
27743
27787
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -27791,7 +27835,7 @@
27791
27835
  const {
27792
27836
  visible: shapeVisible
27793
27837
  } = shape,
27794
- shapeStyle = __rest$5(shape, ["visible"]);
27838
+ shapeStyle = __rest$7(shape, ["visible"]);
27795
27839
  if (isBoolean$2(shapeVisible)) {
27796
27840
  const size = (null == shapeStyle ? void 0 : shapeStyle.size) || 10,
27797
27841
  maxSize = isNumber$3(size) ? size : Math.max(size[0], size[1]);
@@ -27892,7 +27936,7 @@
27892
27936
  const {
27893
27937
  visible: bgVisible
27894
27938
  } = panel,
27895
- backgroundStyle = __rest$5(panel, ["visible"]);
27939
+ backgroundStyle = __rest$7(panel, ["visible"]);
27896
27940
  if (visible && isBoolean$2(bgVisible)) {
27897
27941
  const bgRect = this.createOrUpdateChild("tag-panel", Object.assign(Object.assign({}, backgroundStyle), {
27898
27942
  visible: bgVisible && !!text,
@@ -27974,7 +28018,7 @@
27974
28018
  merge(theme$1.poptip, DEFAULT_THEME, defaultPoptipTheme);
27975
28019
  }
27976
28020
 
27977
- var __rest$4 = undefined && undefined.__rest || function (s, e) {
28021
+ var __rest$6 = undefined && undefined.__rest || function (s, e) {
27978
28022
  var t = {};
27979
28023
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
27980
28024
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -28083,7 +28127,7 @@
28083
28127
  visible: bgVisible,
28084
28128
  square: square
28085
28129
  } = panel,
28086
- backgroundStyle = __rest$4(panel, ["visible", "square"]);
28130
+ backgroundStyle = __rest$6(panel, ["visible", "square"]);
28087
28131
  if (square) {
28088
28132
  const maxWH = max$1(popTipWidth, poptipHeight);
28089
28133
  popTipWidth = maxWH;
@@ -30746,7 +30790,7 @@
30746
30790
  AnimateExecutor.builtInAnimateMap[name] = animate;
30747
30791
  }
30748
30792
  constructor(target) {
30749
- this._animates = [], this._startCallbacks = [], this._endCallbacks = [], this._started = !1, this._activeCount = 0, this._target = target;
30793
+ this._animates = [], this._startCallbacks = [], this._endCallbacks = [], this._started = !1, this._activeCount = 0, this._activeConfigList = null, this._target = target;
30750
30794
  }
30751
30795
  get started() {
30752
30796
  return this._started;
@@ -30855,7 +30899,15 @@
30855
30899
  return parsedParams;
30856
30900
  }
30857
30901
  execute(params) {
30858
- Array.isArray(params) ? params.forEach(param => this._execute(param)) : this._execute(params);
30902
+ if (Array.isArray(params)) {
30903
+ const prevConfigList = this._activeConfigList;
30904
+ this._activeConfigList = params;
30905
+ try {
30906
+ params.forEach(param => this._execute(param));
30907
+ } finally {
30908
+ this._activeConfigList = prevConfigList;
30909
+ }
30910
+ } else this._execute(params);
30859
30911
  }
30860
30912
  _execute(params) {
30861
30913
  if (params.selfOnly) return this._executeItem(params, this._target, 0, 1);
@@ -30881,6 +30933,7 @@
30881
30933
  }
30882
30934
  executeTypeConfigItem(params, graphic, index, count) {
30883
30935
  var _a, _b, _c, _d, _e, _f, _g, _h;
30936
+ this.syncFinalAttrsFromContext(graphic);
30884
30937
  const {
30885
30938
  type = "fromTo",
30886
30939
  channel: channel,
@@ -30911,7 +30964,7 @@
30911
30964
  props = params.to,
30912
30965
  from = params.from;
30913
30966
  const commitAttrOutChannel = this.shouldCommitAttrOutChannel(type);
30914
- props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
30967
+ props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
30915
30968
  let totalDelay = 0;
30916
30969
  oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
30917
30970
  const delayAfterValue = isFunction$3(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
@@ -30933,6 +30986,7 @@
30933
30986
  }
30934
30987
  executeTimelineItem(params, graphic, index, count) {
30935
30988
  var _a, _b, _c, _d;
30989
+ this.syncFinalAttrsFromContext(graphic);
30936
30990
  const {
30937
30991
  timeSlices: timeSlices,
30938
30992
  startTime = 0,
@@ -30975,7 +31029,7 @@
30975
31029
  props = effect.to,
30976
31030
  from = effect.from;
30977
31031
  const commitAttrOutChannel = this.shouldCommitAttrOutChannel(type);
30978
- props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel)), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel)), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel);
31032
+ props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel);
30979
31033
  const custom = null !== (_a = effect.custom) && void 0 !== _a ? _a : AnimateExecutor.builtInAnimateMap[type],
30980
31034
  customType = effect.custom ? effect.customType : getCustomType(custom);
30981
31035
  this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
@@ -30996,7 +31050,7 @@
30996
31050
  const customAnimate = new CustomAnimateConstructor(from, props, duration, easing, customParams);
30997
31051
  animate.play(customAnimate);
30998
31052
  }
30999
- createPropsFromChannel(channel, graphic, includeAttrOutChannel = !0) {
31053
+ createPropsFromChannel(channel, graphic, includeAttrOutChannel = !0, excludedAttrOutKeys) {
31000
31054
  var _a;
31001
31055
  const props = {};
31002
31056
  let from = null;
@@ -31017,7 +31071,7 @@
31017
31071
  }), diffAttrs && attrOutChannel) for (const key in diffAttrs) {
31018
31072
  const value = diffAttrs[key];
31019
31073
  if (void 0 === value) continue;
31020
- props.hasOwnProperty(key) || !!(null == from ? void 0 : from.hasOwnProperty(key)) || (attrOutChannel[key] = value, hasAttrs = !0);
31074
+ props.hasOwnProperty(key) || !!(null == from ? void 0 : from.hasOwnProperty(key)) || (null == excludedAttrOutKeys ? void 0 : excludedAttrOutKeys[key]) || (attrOutChannel[key] = value, hasAttrs = !0);
31021
31075
  }
31022
31076
  return {
31023
31077
  from: from,
@@ -31029,8 +31083,78 @@
31029
31083
  var _a, _b;
31030
31084
  return void 0 === value ? defaultValue : "function" == typeof value && graphic ? value(null === (_b = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.data) || void 0 === _b ? void 0 : _b[0], graphic, {}) : value;
31031
31085
  }
31086
+ getAttrOutChannelExcludedKeys(graphic) {
31087
+ var _a;
31088
+ const configList = this._activeConfigList,
31089
+ diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
31090
+ if (!configList || configList.length <= 1 || !diffAttrs) return null;
31091
+ let excludedKeys = null;
31092
+ for (let i = 0; i < configList.length; i++) excludedKeys = this.collectAnimatedDiffKeys(configList[i], graphic, diffAttrs, excludedKeys);
31093
+ return excludedKeys;
31094
+ }
31095
+ collectAnimatedDiffKeys(config, graphic, diffAttrs, keys) {
31096
+ if ("timeSlices" in config) {
31097
+ const slices = Array.isArray(config.timeSlices) ? config.timeSlices : [config.timeSlices];
31098
+ for (let i = 0; i < slices.length; i++) {
31099
+ const effects = Array.isArray(slices[i].effects) ? slices[i].effects : [slices[i].effects];
31100
+ for (let j = 0; j < effects.length; j++) keys = this.collectAnimatedDiffKeysFromEffect(effects[j], graphic, diffAttrs, keys);
31101
+ }
31102
+ return keys;
31103
+ }
31104
+ return this.collectAnimatedDiffKeysFromEffect(config, graphic, diffAttrs, keys);
31105
+ }
31106
+ collectAnimatedDiffKeysFromEffect(effect, graphic, diffAttrs, keys) {
31107
+ var _a;
31108
+ if ("update" === (null !== (_a = effect.type) && void 0 !== _a ? _a : "fromTo")) {
31109
+ const options = this.resolveValue(effect.options, graphic, void 0),
31110
+ excludeChannels = null == options ? void 0 : options.excludeChannels;
31111
+ for (const key in diffAttrs) Object.prototype.hasOwnProperty.call(diffAttrs, key) && void 0 !== diffAttrs[key] && !this.includesChannel(excludeChannels, key) && (null != keys || (keys = {}), keys[key] = !0);
31112
+ return keys;
31113
+ }
31114
+ return keys = this.collectExplicitAnimatedKeys(effect.to, diffAttrs, keys), keys = this.collectExplicitAnimatedKeys(effect.from, diffAttrs, keys), this.collectChannelAnimatedKeys(effect.channel, diffAttrs, keys);
31115
+ }
31116
+ collectExplicitAnimatedKeys(attrs, diffAttrs, keys) {
31117
+ if (!attrs) return keys;
31118
+ for (const key in attrs) Object.prototype.hasOwnProperty.call(attrs, key) && Object.prototype.hasOwnProperty.call(diffAttrs, key) && void 0 !== diffAttrs[key] && (null != keys || (keys = {}), keys[key] = !0);
31119
+ return keys;
31120
+ }
31121
+ collectChannelAnimatedKeys(channel, diffAttrs, keys) {
31122
+ if (!channel) return keys;
31123
+ if (Array.isArray(channel)) {
31124
+ for (let i = 0; i < channel.length; i++) {
31125
+ const key = channel[i];
31126
+ Object.prototype.hasOwnProperty.call(diffAttrs, key) && void 0 !== diffAttrs[key] && (null != keys || (keys = {}), keys[key] = !0);
31127
+ }
31128
+ return keys;
31129
+ }
31130
+ for (const key in channel) if (Object.prototype.hasOwnProperty.call(channel, key) && Object.prototype.hasOwnProperty.call(diffAttrs, key) && void 0 !== diffAttrs[key]) {
31131
+ const config = channel[key];
31132
+ void 0 === config.to && void 0 === config.from || (null != keys || (keys = {}), keys[key] = !0);
31133
+ }
31134
+ return keys;
31135
+ }
31136
+ includesChannel(channels, key) {
31137
+ if (!(null == channels ? void 0 : channels.length)) return !1;
31138
+ for (let i = 0; i < channels.length; i++) if (channels[i] === key) return !0;
31139
+ return !1;
31140
+ }
31141
+ syncFinalAttrsFromContext(graphic) {
31142
+ var _a;
31143
+ const finalAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.finalAttrs,
31144
+ setFinalAttributes = graphic.setFinalAttributes;
31145
+ finalAttrs && "function" == typeof setFinalAttributes && setFinalAttributes.call(graphic, finalAttrs);
31146
+ }
31032
31147
  executeItem(params, graphic, index = 0, count = 1) {
31033
- return Array.isArray(params) ? params.map(param => this._executeItem(param, graphic, index, count)).filter(Boolean) : [this._executeItem(params, graphic, index, count)].filter(Boolean);
31148
+ if (Array.isArray(params)) {
31149
+ const prevConfigList = this._activeConfigList;
31150
+ this._activeConfigList = params;
31151
+ try {
31152
+ return params.map(param => this._executeItem(param, graphic, index, count)).filter(Boolean);
31153
+ } finally {
31154
+ this._activeConfigList = prevConfigList;
31155
+ }
31156
+ }
31157
+ return [this._executeItem(params, graphic, index, count)].filter(Boolean);
31034
31158
  }
31035
31159
  _executeItem(params, graphic, index = 0, count = 1) {
31036
31160
  if (!graphic) return null;
@@ -31324,9 +31448,7 @@
31324
31448
  return this.initAnimateExecutor(), this._animateExecutor.execute(config), this;
31325
31449
  }
31326
31450
  executeAnimations(configs) {
31327
- return this.initAnimateExecutor(), configs.forEach(config => {
31328
- this._animateExecutor.execute(config);
31329
- }), this;
31451
+ return this.initAnimateExecutor(), this._animateExecutor.execute(configs), this;
31330
31452
  }
31331
31453
  getFinalAttribute() {
31332
31454
  return this.finalAttribute;
@@ -31549,8 +31671,9 @@
31549
31671
  return commitAttrs;
31550
31672
  }
31551
31673
  function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
31674
+ var _a, _b;
31552
31675
  const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
31553
- return !!commitAttrs && (target.setAttributes(commitAttrs, !1, {
31676
+ return !!commitAttrs && (null === (_b = (_a = target).setFinalAttributes) || void 0 === _b || _b.call(_a, commitAttrs), target.setAttributes(commitAttrs, !1, {
31554
31677
  type: AttributeUpdateType.ANIMATE_END
31555
31678
  }), !0);
31556
31679
  }
@@ -35669,7 +35792,7 @@
35669
35792
  loadBasicAxis(), registerRect();
35670
35793
  }
35671
35794
 
35672
- var __rest$3 = undefined && undefined.__rest || function (s, e) {
35795
+ var __rest$5 = undefined && undefined.__rest || function (s, e) {
35673
35796
  var t = {};
35674
35797
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
35675
35798
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -35776,7 +35899,7 @@
35776
35899
  style: style,
35777
35900
  state: state
35778
35901
  } = _a,
35779
- restLineAttrs = __rest$3(_a, ["startSymbol", "endSymbol", "style", "state"]),
35902
+ restLineAttrs = __rest$5(_a, ["startSymbol", "endSymbol", "style", "state"]),
35780
35903
  lineAttrs = Object.assign({
35781
35904
  startSymbol: startSymbol,
35782
35905
  endSymbol: endSymbol,
@@ -35817,7 +35940,7 @@
35817
35940
  state = {},
35818
35941
  maxWidth: maxWidth
35819
35942
  } = _d,
35820
- restAttrs = __rest$3(_d, ["position", "space", "textStyle", "autoRotate", "shape", "background", "state", "maxWidth"]);
35943
+ restAttrs = __rest$5(_d, ["position", "space", "textStyle", "autoRotate", "shape", "background", "state", "maxWidth"]);
35821
35944
  let percent = .5;
35822
35945
  "start" === position ? percent = 0 : "end" === position && (percent = 1);
35823
35946
  const {
@@ -35919,7 +36042,7 @@
35919
36042
  text: textContent = "",
35920
36043
  maxWidth: maxWidth
35921
36044
  } = _c,
35922
- restAttrs = __rest$3(_c, ["position", "space", "autoRotate", "textStyle", "background", "formatMethod", "text", "maxWidth"]),
36045
+ restAttrs = __rest$5(_c, ["position", "space", "autoRotate", "textStyle", "background", "formatMethod", "text", "maxWidth"]),
35923
36046
  point = this.getTickCoord(0);
35924
36047
  "bottom" === orient || "top" === orient ? point.x = position : point.y = position;
35925
36048
  let tickLength = 0;
@@ -37782,7 +37905,7 @@
37782
37905
  loadBaseLegend(), loadSliderComponent(), registerPath();
37783
37906
  }
37784
37907
 
37785
- var __rest$2 = undefined && undefined.__rest || function (s, e) {
37908
+ var __rest$4 = undefined && undefined.__rest || function (s, e) {
37786
37909
  var t = {};
37787
37910
  for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
37788
37911
  if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
@@ -38301,7 +38424,7 @@
38301
38424
  space: pagerSpace = DEFAULT_PAGER_SPACE,
38302
38425
  defaultCurrent = 1
38303
38426
  } = pager,
38304
- compStyle = __rest$2(pager, ["space", "defaultCurrent"]),
38427
+ compStyle = __rest$4(pager, ["space", "defaultCurrent"]),
38305
38428
  {
38306
38429
  isHorizontal: isHorizontal
38307
38430
  } = this._itemContext,
@@ -38371,7 +38494,7 @@
38371
38494
  space: pagerSpace = DEFAULT_PAGER_SPACE,
38372
38495
  defaultCurrent = 1
38373
38496
  } = pager,
38374
- compStyle = __rest$2(pager, ["space", "defaultCurrent"]),
38497
+ compStyle = __rest$4(pager, ["space", "defaultCurrent"]),
38375
38498
  {
38376
38499
  isHorizontal: isHorizontal
38377
38500
  } = this._itemContext,
@@ -40173,6 +40296,8 @@
40173
40296
  };
40174
40297
 
40175
40298
  const BOOTSTRAP_STATE = Symbol.for("vrender.bootstrap.state"),
40299
+ installBrowserEnvToAppWithParams = installBrowserEnvToApp,
40300
+ installNodeEnvToAppWithParams = installNodeEnvToApp,
40176
40301
  pluginRegistrations = [registerFlexLayoutPlugin, registerViewTransform3dPlugin, registerHtmlAttributePlugin, registerReactAttributePlugin, registerDirectionalLight, registerOrthoCamera],
40177
40302
  animationRegistrations = [registerCustomAnimate, registerAnimate],
40178
40303
  legacyGraphicRegistrations = [registerArc, registerArc3d, registerArea, registerCircle, registerGlyph, registerGifImage, registerGroup, registerImage, registerLine, registerPath, registerPolygon, registerPyramid3d, registerRect, registerRect3d, registerRichtext, registerShadowRoot, registerSymbol, registerText, registerWrapText, registerStar];
@@ -40212,25 +40337,66 @@
40212
40337
  seen.has(key) || (seen.add(key), app.registry.picker.register(key, picker));
40213
40338
  });
40214
40339
  }
40215
- function bootstrapVRenderBrowserApp(app) {
40216
- return ensureBootstrap(app, "browser") ? (installBrowserEnvToApp(app), installDefaultGraphicsToApp(app), installBrowserPickersToApp(app), loadBrowserEnv(), legacyGraphicRegistrations.forEach(register => register()), syncLegacyRenderersToApp$1(app), syncLegacyPickersToApp(app, CanvasPickerContribution), registerDefaultPipeline(), app) : app;
40340
+ function bootstrapVRenderBrowserApp(app, envParams) {
40341
+ return ensureBootstrap(app, "browser") ? (void 0 === envParams ? installBrowserEnvToApp(app) : installBrowserEnvToAppWithParams(app, envParams), installDefaultGraphicsToApp(app), installBrowserPickersToApp(app), loadBrowserEnv(), legacyGraphicRegistrations.forEach(register => register()), syncLegacyRenderersToApp$1(app), syncLegacyPickersToApp(app, CanvasPickerContribution), registerDefaultPipeline(), app) : app;
40342
+ }
40343
+ function resolveNodeEnvParams(envParams) {
40344
+ return null != envParams ? envParams : "node" === (null == vglobal ? void 0 : vglobal.env) ? vglobal.envParams : void 0;
40217
40345
  }
40218
- function bootstrapVRenderNodeApp(app) {
40219
- return ensureBootstrap(app, "node") ? (installNodeEnvToApp(app), installDefaultGraphicsToApp(app), installNodePickersToApp(app), loadNodeEnv(), legacyGraphicRegistrations.forEach(register => register()), syncLegacyRenderersToApp$1(app), syncLegacyPickersToApp(app, MathPickerContribution), registerDefaultPipeline(), app) : app;
40346
+ function bootstrapVRenderNodeApp(app, envParams) {
40347
+ if (!ensureBootstrap(app, "node")) return app;
40348
+ const resolvedEnvParams = resolveNodeEnvParams(envParams);
40349
+ return void 0 === resolvedEnvParams ? installNodeEnvToApp(app) : installNodeEnvToAppWithParams(app, resolvedEnvParams), installDefaultGraphicsToApp(app), installNodePickersToApp(app), loadNodeEnv(), legacyGraphicRegistrations.forEach(register => register()), syncLegacyRenderersToApp$1(app), syncLegacyPickersToApp(app, MathPickerContribution), registerDefaultPipeline(), app;
40220
40350
  }
40221
40351
 
40352
+ var __rest$3 = undefined && undefined.__rest || function (s, e) {
40353
+ var t = {};
40354
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
40355
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
40356
+ var i = 0;
40357
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
40358
+ }
40359
+ return t;
40360
+ };
40222
40361
  const {
40223
40362
  createBrowserApp: createBrowserApp
40224
40363
  } = VRenderCore;
40225
40364
  function createBrowserVRenderApp(options = {}) {
40226
- return bootstrapVRenderBrowserApp(createBrowserApp(options));
40365
+ const {
40366
+ envParams: envParams
40367
+ } = options,
40368
+ entryOptions = __rest$3(options, ["envParams"]);
40369
+ return bootstrapVRenderBrowserApp(createBrowserApp(entryOptions), envParams);
40227
40370
  }
40228
40371
 
40372
+ undefined && undefined.__rest || function (s, e) {
40373
+ var t = {};
40374
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
40375
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
40376
+ var i = 0;
40377
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
40378
+ }
40379
+ return t;
40380
+ };
40381
+
40382
+ var __rest$2 = undefined && undefined.__rest || function (s, e) {
40383
+ var t = {};
40384
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
40385
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
40386
+ var i = 0;
40387
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
40388
+ }
40389
+ return t;
40390
+ };
40229
40391
  const {
40230
40392
  createNodeApp: createNodeApp
40231
40393
  } = VRenderCore;
40232
40394
  function createNodeVRenderApp(options = {}) {
40233
- return bootstrapVRenderNodeApp(createNodeApp(options));
40395
+ const {
40396
+ envParams: envParams
40397
+ } = options,
40398
+ entryOptions = __rest$2(options, ["envParams"]);
40399
+ return bootstrapVRenderNodeApp(createNodeApp(entryOptions), envParams);
40234
40400
  }
40235
40401
 
40236
40402
  class Env {