@visactor/vtable-calendar 1.19.10-alpha.4 → 1.19.10-alpha.6

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.
@@ -1285,11 +1285,11 @@
1285
1285
  const isValidNumber$2 = value => isNumber$6(value) && Number.isFinite(value);
1286
1286
  var isValidNumber$3 = isValidNumber$2;
1287
1287
 
1288
- const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
1289
- var isValidUrl$1 = isValidUrl;
1288
+ const isValidUrl$2 = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
1289
+ var isValidUrl$3 = isValidUrl$2;
1290
1290
 
1291
- const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
1292
- var isBase64$1 = isBase64;
1291
+ const isBase64$2 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
1292
+ var isBase64$3 = isBase64$2;
1293
1293
 
1294
1294
  const getType$2 = value => ({}).toString.call(value).replace(/^\[object /, "").replace(/]$/, "");
1295
1295
  var getType$3 = getType$2;
@@ -9709,7 +9709,7 @@
9709
9709
  data: "init",
9710
9710
  state: null
9711
9711
  };
9712
- this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : isObject$9(image) ? (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background) : cache.state = "fail";
9712
+ this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$3(image) || image.includes("/") || isBase64$3(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : isObject$9(image) ? (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background) : cache.state = "fail";
9713
9713
  }
9714
9714
  setShadowGraphic(graphic) {
9715
9715
  if (graphic) {
@@ -32868,7 +32868,7 @@
32868
32868
  }(IconPosition || (IconPosition = {}));
32869
32869
  var IconFuncTypeEnum;
32870
32870
  !function (IconFuncTypeEnum) {
32871
- IconFuncTypeEnum.frozen = "frozen", IconFuncTypeEnum.sort = "sort", IconFuncTypeEnum.dropDown = "dropDown", IconFuncTypeEnum.dropDownState = "dropDownState", IconFuncTypeEnum.play = "play", IconFuncTypeEnum.damagePic = "damagePic", IconFuncTypeEnum.expand = "expand", IconFuncTypeEnum.collapse = "collapse", IconFuncTypeEnum.drillDown = "drillDown", IconFuncTypeEnum.drillUp = "drillUp", IconFuncTypeEnum.dragReorder = "dragReorder";
32871
+ IconFuncTypeEnum.frozen = "frozen", IconFuncTypeEnum.sort = "sort", IconFuncTypeEnum.dropDown = "dropDown", IconFuncTypeEnum.dropDownState = "dropDownState", IconFuncTypeEnum.play = "play", IconFuncTypeEnum.damagePic = "damagePic", IconFuncTypeEnum.imageDamagePic = "imageDamagePic", IconFuncTypeEnum.videoDamagePic = "videoDamagePic", IconFuncTypeEnum.expand = "expand", IconFuncTypeEnum.collapse = "collapse", IconFuncTypeEnum.drillDown = "drillDown", IconFuncTypeEnum.drillUp = "drillUp", IconFuncTypeEnum.dragReorder = "dragReorder";
32872
32872
  }(IconFuncTypeEnum || (IconFuncTypeEnum = {}));
32873
32873
  var InternalIconName;
32874
32874
  !function (InternalIconName) {
@@ -32934,6 +32934,12 @@
32934
32934
  const isValidNumber = value => isNumber$4(value) && Number.isFinite(value);
32935
32935
  var isValidNumber$1 = isValidNumber;
32936
32936
 
32937
+ const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
32938
+ var isValidUrl$1 = isValidUrl;
32939
+
32940
+ const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
32941
+ var isBase64$1 = isBase64;
32942
+
32937
32943
  const getType = value => ({}).toString.call(value).replace(/^\[object /, "").replace(/]$/, "");
32938
32944
  var getType$1 = getType;
32939
32945
 
@@ -40823,7 +40829,7 @@
40823
40829
  image: value,
40824
40830
  cursor: "pointer"
40825
40831
  });
40826
- return image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, keepAspectRatio || imageAutoSizing ? image.resources && image.resources.has(image.attribute.image) && "success" === image.resources.get(image.attribute.image).state ? (image.setAttribute("opacity", 0), setTimeout(() => {
40832
+ if (image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, keepAspectRatio || imageAutoSizing ? image.resources && image.resources.has(image.attribute.image) && "success" === image.resources.get(image.attribute.image).state ? (image.setAttribute("opacity", 0), setTimeout(() => {
40827
40833
  image.setAttribute("opacity", 1), updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), table.scenegraph.updateNextFrame();
40828
40834
  }, 0)) : image.successCallback = () => {
40829
40835
  updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), table.scenegraph.updateNextFrame();
@@ -40831,8 +40837,12 @@
40831
40837
  updateImageCellContentWhileResize(cellGroup, col, row, 0, 0, table);
40832
40838
  }, image.failCallback = () => {
40833
40839
  const regedIcons = get$2();
40834
- image.image = regedIcons.damage_pic.svg;
40835
- }, cellGroup.appendChild(image), cellGroup;
40840
+ image.image = regedIcons.image_damage_pic ? regedIcons.image_damage_pic.svg : regedIcons.damage_pic.svg;
40841
+ }, "string" == typeof value && !(value.startsWith("<svg") || isValidUrl$1(value) || value.includes("/") || isBase64$1(value))) {
40842
+ const regedIcons = get$2();
40843
+ image.image = regedIcons.image_damage_pic ? regedIcons.image_damage_pic.svg : regedIcons.damage_pic.svg;
40844
+ }
40845
+ return cellGroup.appendChild(image), cellGroup;
40836
40846
  }
40837
40847
  function _adjustWidthHeight(col, row, width, height, scene, padding, cellGroup) {
40838
40848
  let needInvalidate = !1,
@@ -40976,7 +40986,7 @@
40976
40986
  }
40977
40987
  function isDamagePic(image) {
40978
40988
  const regedIcons = get$2();
40979
- return image.attribute.image === regedIcons.damage_pic.svg;
40989
+ return image.attribute.image === regedIcons.damage_pic.svg || regedIcons.image_damage_pic && image.attribute.image === regedIcons.image_damage_pic.svg || regedIcons.video_damage_pic && image.attribute.image === regedIcons.video_damage_pic.svg;
40980
40990
  }
40981
40991
 
40982
40992
  function dealPromiseData(dataPromise, tabel, callback) {
@@ -55145,7 +55155,7 @@
55145
55155
  }
55146
55156
  constructor(container, options = {}) {
55147
55157
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
55148
- if (super(), this.showFrozenIcon = !0, this.version = "1.19.10-alpha.4", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
55158
+ if (super(), this.showFrozenIcon = !0, this.version = "1.19.10-alpha.6", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
55149
55159
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
55150
55160
  options: options,
55151
55161
  container: container
@@ -64786,7 +64796,8 @@
64786
64796
  });
64787
64797
  playIcon.name = "play-icon", cellGroup.appendChild(playIcon), table.scenegraph.updateNextFrame();
64788
64798
  }), video.onerror = () => {
64789
- image.image = regedIcons.damage_pic.svg;
64799
+ const regedIcons = get$2();
64800
+ image.image = regedIcons.video_damage_pic ? regedIcons.video_damage_pic.svg : regedIcons.damage_pic.svg;
64790
64801
  }, video.src = value, video.setAttribute("preload", "auto");
64791
64802
  const image = createImage({
64792
64803
  x: padding[3],
@@ -64796,7 +64807,9 @@
64796
64807
  image: video,
64797
64808
  cursor: "pointer"
64798
64809
  });
64799
- return image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image), cellGroup;
64810
+ return image.name = "image", image.keepAspectRatio = keepAspectRatio, image.textAlign = textAlign, image.textBaseline = textBaseline, cellGroup.appendChild(image), image.successCallback = () => {
64811
+ isDamagePic(image) && (updateAutoSizingAndKeepAspectRatio(imageAutoSizing, keepAspectRatio, padding, textAlign, textBaseline, image, cellGroup, table), table.scenegraph.updateNextFrame());
64812
+ }, cellGroup;
64800
64813
  }
64801
64814
 
64802
64815
  function createMark(marked, cellGroup, table) {