@visactor/vtable-calendar 1.19.3-alpha.0 → 1.19.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.
@@ -49585,7 +49585,7 @@
49585
49585
  }
49586
49586
  });
49587
49587
  }), table.scenegraph.tableGroup.addEventListener("pointerup", e => {
49588
- var _a, _b, _c, _d;
49588
+ var _a, _b, _c, _d, _e, _f, _g, _h;
49589
49589
  if (0 === e.button) {
49590
49590
  if ("grabing" === stateManager.interactionState) {
49591
49591
  if (stateManager.updateInteractionState(InteractionState.default), stateManager.isResizeCol()) endResizeCol(table);else if (stateManager.isResizeRow()) endResizeRow(table);else if (stateManager.isMoveCol()) {
@@ -49608,14 +49608,42 @@
49608
49608
  }
49609
49609
  }
49610
49610
  } else stateManager.interactionState === InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.default);
49611
+ if (!table.eventManager.isDraging) {
49612
+ const eventArgsSet = getCellEventArgsSet(e);
49613
+ if (!eventManager.isTouchMove && 0 === e.button && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
49614
+ const {
49615
+ col: col,
49616
+ row: row
49617
+ } = eventArgsSet.eventArgs,
49618
+ cellInfo = table.getCellInfo(col, row);
49619
+ let icon, position;
49620
+ if (null === (_c = eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target) {
49621
+ const iconInfo = getIconAndPositionFromTarget(null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target);
49622
+ iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
49623
+ }
49624
+ const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
49625
+ event: e.nativeEvent,
49626
+ federatedEvent: e,
49627
+ cells: [],
49628
+ targetIcon: icon ? {
49629
+ name: icon.name,
49630
+ position: position,
49631
+ funcType: icon.attribute.funcType
49632
+ } : void 0,
49633
+ target: null === (_e = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _e ? void 0 : _e.target,
49634
+ mergeCellInfo: null === (_f = eventArgsSet.eventArgs) || void 0 === _f ? void 0 : _f.mergeInfo
49635
+ });
49636
+ table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
49637
+ }
49638
+ }
49611
49639
  if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL)) {
49612
49640
  const eventArgsSet = getCellEventArgsSet(e);
49613
49641
  eventArgsSet.eventArgs && table.fireListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL, {
49614
49642
  col: eventArgsSet.eventArgs.col,
49615
49643
  row: eventArgsSet.eventArgs.row,
49616
49644
  event: e.nativeEvent,
49617
- target: null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target,
49618
- mergeCellInfo: null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.mergeInfo
49645
+ target: null === (_g = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _g ? void 0 : _g.target,
49646
+ mergeCellInfo: null === (_h = eventArgsSet.eventArgs) || void 0 === _h ? void 0 : _h.mergeInfo
49619
49647
  });
49620
49648
  }
49621
49649
  setTimeout(() => {
@@ -49653,39 +49681,14 @@
49653
49681
  }
49654
49682
  }
49655
49683
  }), table.scenegraph.tableGroup.addEventListener("pointertap", e => {
49656
- var _a, _b, _c, _d, _e;
49684
+ var _a;
49657
49685
  if (table.stateManager.columnResize.resizing) return;
49658
49686
  const eventArgsSet = getCellEventArgsSet(e);
49659
- if (!eventManager.isTouchMove && 0 === e.button && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
49660
- const {
49661
- col: col,
49662
- row: row
49663
- } = eventArgsSet.eventArgs,
49664
- cellInfo = table.getCellInfo(col, row);
49665
- let icon, position;
49666
- if (null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) {
49667
- const iconInfo = getIconAndPositionFromTarget(null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target);
49668
- iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
49669
- }
49670
- const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
49671
- event: e.nativeEvent,
49672
- federatedEvent: e,
49673
- cells: [],
49674
- targetIcon: icon ? {
49675
- name: icon.name,
49676
- position: position,
49677
- funcType: icon.attribute.funcType
49678
- } : void 0,
49679
- target: null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target,
49680
- mergeCellInfo: null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.mergeInfo
49681
- });
49682
- table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
49683
- }
49684
49687
  if (!table.stateManager.columnResize.resizing && !table.stateManager.columnMove.moving && (eventManager.dealIconClick(e, eventArgsSet), (null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) && eventManager.touchSetTimeout && "touch" === e.pointerType)) {
49685
49688
  const eventArgsSet = getCellEventArgsSet(e);
49686
49689
  if (eventManager.touchSetTimeout) {
49687
49690
  clearTimeout(eventManager.touchSetTimeout);
49688
- const isHasSelected = !!(null === (_e = stateManager.select.ranges) || void 0 === _e ? void 0 : _e.length);
49691
+ const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
49689
49692
  eventManager.dealTableSelect(eventArgsSet), stateManager.endSelectCells(!0, isHasSelected), eventManager.touchSetTimeout = void 0;
49690
49693
  }
49691
49694
  }
@@ -53616,7 +53619,7 @@
53616
53619
  }
53617
53620
  constructor(container, options = {}) {
53618
53621
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
53619
- if (super(), this.showFrozenIcon = !0, this.version = "1.19.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");
53622
+ if (super(), this.showFrozenIcon = !0, this.version = "1.19.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");
53620
53623
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
53621
53624
  options: options,
53622
53625
  container: container