@visactor/vtable-calendar 1.18.3-alpha.0 → 1.18.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.
@@ -29860,7 +29860,8 @@
29860
29860
  shadow: {
29861
29861
  width: 4,
29862
29862
  startColor: "rgba(00, 24, 47, 0.05)",
29863
- endColor: "rgba(00, 24, 47, 0)"
29863
+ endColor: "rgba(00, 24, 47, 0)",
29864
+ visible: "always"
29864
29865
  }
29865
29866
  },
29866
29867
  selectionStyle: {
@@ -29944,7 +29945,8 @@
29944
29945
  shadow: {
29945
29946
  width: 3,
29946
29947
  startColor: "#CBDCFE",
29947
- endColor: "#CBDCFE"
29948
+ endColor: "#CBDCFE",
29949
+ visible: "always"
29948
29950
  }
29949
29951
  },
29950
29952
  selectionStyle: {
@@ -30053,7 +30055,8 @@
30053
30055
  shadow: {
30054
30056
  width: 4,
30055
30057
  startColor: "rgba(00, 24, 47, 0.05)",
30056
- endColor: "rgba(00, 24, 47, 0)"
30058
+ endColor: "rgba(00, 24, 47, 0)",
30059
+ visible: "always"
30057
30060
  }
30058
30061
  },
30059
30062
  selectionStyle: {
@@ -30137,7 +30140,8 @@
30137
30140
  shadow: {
30138
30141
  width: 3,
30139
30142
  startColor: "rgba(225, 228, 232, 0.6)",
30140
- endColor: "rgba(225, 228, 232, 0.6)"
30143
+ endColor: "rgba(225, 228, 232, 0.6)",
30144
+ visible: "always"
30141
30145
  }
30142
30146
  },
30143
30147
  selectionStyle: {
@@ -30816,6 +30820,10 @@
30816
30820
  get endColor() {
30817
30821
  var _a, _b;
30818
30822
  return null !== (_b = null === (_a = frozenColumnLine.shadow) || void 0 === _a ? void 0 : _a.endColor) && void 0 !== _b ? _b : "rgba(00, 24, 47, 0)";
30823
+ },
30824
+ get visible() {
30825
+ var _a, _b;
30826
+ return null !== (_b = null === (_a = frozenColumnLine.shadow) || void 0 === _a ? void 0 : _a.visible) && void 0 !== _b ? _b : "always";
30819
30827
  }
30820
30828
  };
30821
30829
  },
@@ -37369,7 +37377,7 @@
37369
37377
 
37370
37378
  class TableComponent {
37371
37379
  constructor(table) {
37372
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
37380
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
37373
37381
  this.table = table;
37374
37382
  const theme = this.table.theme;
37375
37383
  this.createScrollBar();
@@ -37504,9 +37512,10 @@
37504
37512
  }), this.rowResizeLabel.appendChild(rowResizeLabelBack), this.rowResizeLabel.appendChild(rowResizeLabelText), this.cellMover = new CellMover(this.table);
37505
37513
  const shadowWidth = null === (_o = null === (_m = theme.frozenColumnLine) || void 0 === _m ? void 0 : _m.shadow) || void 0 === _o ? void 0 : _o.width,
37506
37514
  shadowStartColor = null === (_q = null === (_p = theme.frozenColumnLine) || void 0 === _p ? void 0 : _p.shadow) || void 0 === _q ? void 0 : _q.startColor,
37507
- shadowEndColor = null === (_s = null === (_r = theme.frozenColumnLine) || void 0 === _r ? void 0 : _r.shadow) || void 0 === _s ? void 0 : _s.endColor;
37515
+ shadowEndColor = null === (_s = null === (_r = theme.frozenColumnLine) || void 0 === _r ? void 0 : _r.shadow) || void 0 === _s ? void 0 : _s.endColor,
37516
+ visible = null === (_u = null === (_t = theme.frozenColumnLine) || void 0 === _t ? void 0 : _t.shadow) || void 0 === _u ? void 0 : _u.visible;
37508
37517
  this.frozenShadowLine = createRect({
37509
- visible: !0,
37518
+ visible: "always" === visible,
37510
37519
  pickable: !1,
37511
37520
  x: 0,
37512
37521
  y: 0,
@@ -37527,7 +37536,7 @@
37527
37536
  }]
37528
37537
  }
37529
37538
  }), this.rightFrozenShadowLine = createRect({
37530
- visible: !0,
37539
+ visible: "always" === visible,
37531
37540
  pickable: !1,
37532
37541
  x: 0,
37533
37542
  y: 0,
@@ -37784,28 +37793,40 @@
37784
37793
  this.cellMover.update(backX, lineX, backY, lineY);
37785
37794
  }
37786
37795
  setFrozenColumnShadow(col, isRightFrozen) {
37787
- if (col < 0) this.frozenShadowLine.setAttributes({
37788
- visible: !1
37789
- });else {
37790
- const colX = getColX(col, this.table, isRightFrozen);
37791
- this.frozenShadowLine.setAttributes({
37792
- visible: !0,
37793
- x: colX,
37794
- height: this.table.getDrawRange().height
37795
- });
37796
- }
37796
+ var _a, _b;
37797
+ const colX = getColX(col, this.table, isRightFrozen);
37798
+ col < 0 || "always" !== (null === (_b = null === (_a = this.table.theme.frozenColumnLine) || void 0 === _a ? void 0 : _a.shadow) || void 0 === _b ? void 0 : _b.visible) ? this.frozenShadowLine.setAttributes({
37799
+ visible: !1,
37800
+ x: colX,
37801
+ height: this.table.getDrawRange().height
37802
+ }) : this.frozenShadowLine.setAttributes({
37803
+ visible: !0,
37804
+ x: colX,
37805
+ height: this.table.getDrawRange().height
37806
+ });
37797
37807
  }
37798
37808
  setRightFrozenColumnShadow(col) {
37799
- if (col >= this.table.colCount) this.rightFrozenShadowLine.setAttributes({
37800
- visible: !1
37801
- });else {
37802
- const colX = getColX(col, this.table, !0);
37803
- this.rightFrozenShadowLine.setAttributes({
37804
- visible: !0,
37805
- x: colX - this.rightFrozenShadowLine.attribute.width,
37806
- height: this.table.getDrawRange().height
37807
- });
37808
- }
37809
+ var _a, _b;
37810
+ const colX = getColX(col, this.table, !0);
37811
+ col >= this.table.colCount || "always" !== (null === (_b = null === (_a = this.table.theme.frozenColumnLine) || void 0 === _a ? void 0 : _a.shadow) || void 0 === _b ? void 0 : _b.visible) ? this.rightFrozenShadowLine.setAttributes({
37812
+ visible: !1,
37813
+ x: colX - this.rightFrozenShadowLine.attribute.width,
37814
+ height: this.table.getDrawRange().height
37815
+ }) : this.rightFrozenShadowLine.setAttributes({
37816
+ visible: !0,
37817
+ x: colX - this.rightFrozenShadowLine.attribute.width,
37818
+ height: this.table.getDrawRange().height
37819
+ });
37820
+ }
37821
+ hideFrozenColumnShadow() {
37822
+ var _a, _b, _c, _d, _e;
37823
+ const visible1 = null === (_b = null === (_a = this.table.theme.frozenColumnLine) || void 0 === _a ? void 0 : _a.shadow) || void 0 === _b ? void 0 : _b.visible;
37824
+ "scrolling" === (null !== (_e = null === (_d = null === (_c = this.table.theme.frozenColumnLine) || void 0 === _c ? void 0 : _c.shadow) || void 0 === _d ? void 0 : _d.visible) && void 0 !== _e ? _e : visible1) && (this.frozenShadowLine.setAttribute("visible", !1), this.rightFrozenShadowLine.setAttribute("visible", !1), this.table.scenegraph.updateNextFrame());
37825
+ }
37826
+ showFrozenColumnShadow() {
37827
+ var _a, _b, _c, _d, _e;
37828
+ const visible1 = null === (_b = null === (_a = this.table.theme.frozenColumnLine) || void 0 === _a ? void 0 : _a.shadow) || void 0 === _b ? void 0 : _b.visible;
37829
+ "scrolling" === (null !== (_e = null === (_d = null === (_c = this.table.theme.frozenColumnLine) || void 0 === _c ? void 0 : _c.shadow) || void 0 === _d ? void 0 : _d.visible) && void 0 !== _e ? _e : visible1) && (this.frozenShadowLine.setAttribute("visible", !0), this.rightFrozenShadowLine.setAttribute("visible", !0), this.table.scenegraph.updateNextFrame());
37809
37830
  }
37810
37831
  hideVerticalScrollBar() {
37811
37832
  var _a;
@@ -44943,9 +44964,10 @@
44943
44964
  this.table.scenegraph.component.hideHorizontalScrollBar();
44944
44965
  }
44945
44966
  showHorizontalScrollBar(autoHide) {
44946
- this.table.scenegraph.component.showHorizontalScrollBar(), autoHide && (clearTimeout(this._clearHorizontalScrollBar), this._clearHorizontalScrollBar = setTimeout(() => {
44947
- var _a;
44948
- null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.hideHorizontalScrollBar();
44967
+ var _a;
44968
+ this.table.scenegraph.component.showHorizontalScrollBar(), null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.showFrozenColumnShadow(), autoHide && (clearTimeout(this._clearHorizontalScrollBar), this._clearHorizontalScrollBar = setTimeout(() => {
44969
+ var _a, _b;
44970
+ null === (_a = this.table.scenegraph) || void 0 === _a || _a.component.hideFrozenColumnShadow(), null === (_b = this.table.scenegraph) || void 0 === _b || _b.component.hideHorizontalScrollBar();
44949
44971
  }, 1e3));
44950
44972
  }
44951
44973
  triggerContextMenu(col, row, x, y) {
@@ -46349,7 +46371,12 @@
46349
46371
  const table = eventManager.table,
46350
46372
  stateManager = table.stateManager,
46351
46373
  scenegraph = table.scenegraph;
46352
- eventManager.touchMovePoints = [], table.scenegraph.tableGroup.addEventListener("touchstart", e => {
46374
+ if (!1 === vglobal.envContribution.supportsTouchEvents) return;
46375
+ vglobal.addEventListener("contextmenu", e => {
46376
+ e.stopPropagation(), e.preventDefault();
46377
+ }, {
46378
+ capture: !0
46379
+ }), eventManager.touchMovePoints = [], table.scenegraph.tableGroup.addEventListener("touchstart", e => {
46353
46380
  var _a, _b, _c, _d, _e, _f, _g, _h;
46354
46381
  if (e.target.isChildOf(scenegraph.component.vScrollBar) || e.target.isChildOf(scenegraph.component.vScrollBar)) return;
46355
46382
  eventManager.isTouchdown = !0;
@@ -49548,7 +49575,7 @@
49548
49575
  constructor(container) {
49549
49576
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
49550
49577
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
49551
- if (super(), this.showFrozenIcon = !0, this.version = "1.18.3-alpha.0", 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");
49578
+ if (super(), this.showFrozenIcon = !0, this.version = "1.18.3", 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");
49552
49579
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
49553
49580
  options: options,
49554
49581
  container: container
@@ -53667,7 +53694,7 @@
53667
53694
  bindEvent() {
53668
53695
  const table = this.table,
53669
53696
  doubleClickEventId = table.on(TABLE_EVENT_TYPE.DBLCLICK_CELL, e => {
53670
- var _a;
53697
+ var _a, _b, _c;
53671
53698
  const {
53672
53699
  editCellTrigger = "doubleclick"
53673
53700
  } = table.options;
@@ -53678,13 +53705,15 @@
53678
53705
  } = e,
53679
53706
  eventArgsSet = getCellEventArgsSet(e.federatedEvent),
53680
53707
  resizeCol = table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.targetCell);
53681
- table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0 || (this.beginTriggerEditCellMode = "doubleclick", this.startEditCell(col, row));
53708
+ table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0 || (null === (_c = null === (_b = e.target) || void 0 === _b ? void 0 : _b.attribute) || void 0 === _c ? void 0 : _c.funcType) || (this.beginTriggerEditCellMode = "doubleclick", this.startEditCell(col, row));
53682
53709
  }),
53683
53710
  clickEventId = table.on(TABLE_EVENT_TYPE.CLICK_CELL, e => {
53711
+ var _a, _b;
53684
53712
  const {
53685
53713
  editCellTrigger = "doubleclick"
53686
53714
  } = table.options;
53687
53715
  if ("click" === editCellTrigger || Array.isArray(editCellTrigger) && editCellTrigger.includes("click")) {
53716
+ if (null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.funcType) return;
53688
53717
  this.beginTriggerEditCellMode = "click";
53689
53718
  const {
53690
53719
  col: col,