@qikdev/vue-ui 0.3.15 → 0.3.16

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.
package/dist/lib.es.js CHANGED
@@ -4,7 +4,7 @@ var Uh = (e, t, n) => t in e ? Rh(e, t, { enumerable: !0, configurable: !0, writ
4
4
  var ie = (e, t, n) => Uh(e, typeof t != "symbol" ? t + "" : t, n);
5
5
  import { reactive as Gt, defineComponent as Fl, ref as vt, toRefs as of, onMounted as Al, onBeforeUnmount as jh, watch as cr, computed as Fn, createElementBlock as h, openBlock as o, createCommentVNode as _, renderSlot as z, normalizeClass as $, useSlots as qh, provide as Mr, resolveComponent as y, createVNode as c, Fragment as D, createBlock as k, unref as gt, withCtx as f, renderList as A, toDisplayString as b, createTextVNode as O, withDirectives as Z, vShow as ci, withModifiers as B, createElementVNode as T, h as dl, mergeProps as mt, toHandlers as kt, normalizeStyle as Ge, resolveDirective as uf, resolveDynamicComponent as Vt, vModelSelect as Dt, pushScopeId as je, popScopeId as qe, getCurrentScope as Bh, onScopeDispose as zh, getCurrentInstance as Wh, Teleport as df, Transition as Hh, withKeys as we, vModelText as be, TransitionGroup as Gh, nextTick as cf, vModelDynamic as Sn, normalizeProps as ff, guardReactiveProps as Yh } from "vue";
6
6
  import { EventDispatcher as mf } from "@qikdev/sdk";
7
- const Jh = "0.3.15";
7
+ const Jh = "0.3.16";
8
8
  class yn extends Error {
9
9
  }
10
10
  class Kh extends yn {
@@ -7849,11 +7849,12 @@ const Y1 = /* @__PURE__ */ M(H1, [["render", G1], ["__scopeId", "data-v-e196f762
7849
7849
  lastSelectedIndex: null,
7850
7850
  lastSelectAction: null,
7851
7851
  dragging: !1,
7852
- dragMode: null
7852
+ dragMode: null,
7853
+ dragStart: null
7853
7854
  };
7854
7855
  },
7855
7856
  beforeUnmount() {
7856
- window.removeEventListener("mouseup", this.endDrag);
7857
+ window.removeEventListener("mouseup", this.endDrag), window.removeEventListener("mousemove", this.checkDragStart);
7857
7858
  },
7858
7859
  computed: {
7859
7860
  groupedRows() {
@@ -7966,7 +7967,7 @@ const Y1 = /* @__PURE__ */ M(H1, [["render", G1], ["__scopeId", "data-v-e196f762
7966
7967
  this.lastSelectAction === "deselect" ? this.deselectRange(this.lastSelectedIndex, t) : this.selectRange(this.lastSelectedIndex, t), this.lastSelectedIndex = t;
7967
7968
  return;
7968
7969
  }
7969
- s === "select" ? this.$emit("select:multiple", [e]) : this.$emit("deselect:multiple", [e]), this.lastSelectedIndex = t, this.lastSelectAction = s, this.dragging = !0, this.dragMode = s, window.addEventListener("mouseup", this.endDrag, { once: !0 });
7970
+ s === "select" ? this.$emit("select:multiple", [e]) : this.$emit("deselect:multiple", [e]), this.lastSelectedIndex = t, this.lastSelectAction = s, this.dragMode = s, this.dragStart = { x: n.clientX, y: n.clientY }, window.addEventListener("mousemove", this.checkDragStart), window.addEventListener("mouseup", this.endDrag, { once: !0 });
7970
7971
  },
7971
7972
  mouseenterSelect(e, t) {
7972
7973
  if (!this.dragging)
@@ -7974,8 +7975,13 @@ const Y1 = /* @__PURE__ */ M(H1, [["render", G1], ["__scopeId", "data-v-e196f762
7974
7975
  const n = this.isSelected(e);
7975
7976
  this.dragMode === "select" && !n ? this.$emit("select:multiple", [e]) : this.dragMode === "deselect" && n && this.$emit("deselect:multiple", [e]);
7976
7977
  },
7978
+ checkDragStart(e) {
7979
+ if (!this.dragStart) return;
7980
+ const t = e.clientX - this.dragStart.x, n = e.clientY - this.dragStart.y;
7981
+ t * t + n * n >= 9 && (this.dragging = !0, window.removeEventListener("mousemove", this.checkDragStart));
7982
+ },
7977
7983
  endDrag() {
7978
- this.dragging && (this.dragging = !1, this.dragMode = null, window.removeEventListener("mouseup", this.endDrag));
7984
+ this.dragging = !1, this.dragMode = null, this.dragStart = null, window.removeEventListener("mouseup", this.endDrag), window.removeEventListener("mousemove", this.checkDragStart);
7979
7985
  }
7980
7986
  }
7981
7987
  }, Z1 = {
@@ -8119,7 +8125,7 @@ function nb(e, t, n, r, s, i) {
8119
8125
  ], 512)
8120
8126
  ], 34);
8121
8127
  }
8122
- const ib = /* @__PURE__ */ M(K1, [["render", nb], ["__scopeId", "data-v-c1fe12b7"]]);
8128
+ const ib = /* @__PURE__ */ M(K1, [["render", nb], ["__scopeId", "data-v-ba74a660"]]);
8123
8129
  var Vi = { exports: {} }, Wu;
8124
8130
  function rb() {
8125
8131
  if (Wu) return Vi.exports;