@lazycatcloud/lzc-toolkit 0.0.53 → 0.0.54

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/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { unref as B, getCurrentScope as Ke, onScopeDispose as Qe, getCurrentInstance as Ue, onMounted as de, nextTick as fe, ref as w, watch as ne, shallowRef as qe, computed as S, onUnmounted as Oe, inject as F, provide as $, defineComponent as Z, h as Q, render as ae, openBlock as k, createBlock as De, Transition as Re, withCtx as Ce, createElementBlock as J, createElementVNode as M, withModifiers as Ye, normalizeClass as Ge, renderSlot as he, createCommentVNode as Xe, normalizeStyle as le, toDisplayString as Je, useSlots as Ze, withDirectives as et, vShow as tt, pushScopeId as nt, popScopeId as lt, toRef as ot, mergeProps as rt, normalizeProps as ge, guardReactiveProps as ye, Fragment as at, renderList as st } from "vue";
1
+ import { unref as B, getCurrentScope as Ke, onScopeDispose as Qe, getCurrentInstance as Ue, onMounted as fe, nextTick as pe, ref as E, watch as ne, shallowRef as qe, computed as S, onUnmounted as Oe, inject as F, provide as $, defineComponent as Z, h as Q, render as ae, openBlock as k, createBlock as De, Transition as Re, withCtx as Ce, createElementBlock as J, createElementVNode as M, withModifiers as Ye, normalizeClass as Ge, renderSlot as he, createCommentVNode as Xe, normalizeStyle as le, toDisplayString as Je, useSlots as Ze, withDirectives as et, vShow as tt, pushScopeId as nt, popScopeId as lt, toRef as ot, mergeProps as rt, normalizeProps as ge, guardReactiveProps as ye, Fragment as at, renderList as st } from "vue";
2
2
  var be;
3
3
  const Be = typeof window < "u";
4
4
  Be && ((be = window?.navigator) == null ? void 0 : be.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
@@ -30,12 +30,12 @@ function it(t, e = !0, n = !0) {
30
30
  o && (clearTimeout(o), o = void 0);
31
31
  };
32
32
  return (m) => {
33
- const p = se(t), d = Date.now() - l;
34
- if (r(), p <= 0)
33
+ const h = se(t), d = Date.now() - l;
34
+ if (r(), h <= 0)
35
35
  return l = Date.now(), m();
36
- d > p && (n || !a) ? (l = Date.now(), m()) : e && (o = setTimeout(() => {
36
+ d > h && (n || !a) ? (l = Date.now(), m()) : e && (o = setTimeout(() => {
37
37
  l = Date.now(), a = !0, r(), m();
38
- }, p - d)), !n && !o && (o = setTimeout(() => a = !0, p)), a = !1;
38
+ }, h)), !n && !o && (o = setTimeout(() => a = !0, h)), a = !1;
39
39
  };
40
40
  }
41
41
  function ct(t) {
@@ -51,7 +51,7 @@ function Se(t, e = 200, n = !1, l = !0) {
51
51
  return Ie(it(e, n, l), t);
52
52
  }
53
53
  function dt(t, e = !0) {
54
- Ue() ? de(t) : e ? t() : fe(t);
54
+ Ue() ? fe(t) : e ? t() : pe(t);
55
55
  }
56
56
  function He(t) {
57
57
  var e;
@@ -59,31 +59,31 @@ function He(t) {
59
59
  return (e = n?.$el) != null ? e : n;
60
60
  }
61
61
  const ft = Be ? window : void 0;
62
- function ht(t, e = !1) {
63
- const n = w(), l = () => n.value = Boolean(t());
62
+ function pt(t, e = !1) {
63
+ const n = E(), l = () => n.value = Boolean(t());
64
64
  return l(), dt(l, e), n;
65
65
  }
66
- const ce = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ve = "__vueuse_ssr_handlers__";
67
- ce[ve] = ce[ve] || {};
68
- ce[ve];
69
- var Ee = Object.getOwnPropertySymbols, pt = Object.prototype.hasOwnProperty, mt = Object.prototype.propertyIsEnumerable, gt = (t, e) => {
66
+ const ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, de = "__vueuse_ssr_handlers__";
67
+ ve[de] = ve[de] || {};
68
+ ve[de];
69
+ var _e = Object.getOwnPropertySymbols, ht = Object.prototype.hasOwnProperty, mt = Object.prototype.propertyIsEnumerable, gt = (t, e) => {
70
70
  var n = {};
71
71
  for (var l in t)
72
- pt.call(t, l) && e.indexOf(l) < 0 && (n[l] = t[l]);
73
- if (t != null && Ee)
74
- for (var l of Ee(t))
72
+ ht.call(t, l) && e.indexOf(l) < 0 && (n[l] = t[l]);
73
+ if (t != null && _e)
74
+ for (var l of _e(t))
75
75
  e.indexOf(l) < 0 && mt.call(t, l) && (n[l] = t[l]);
76
76
  return n;
77
77
  };
78
78
  function yt(t, e, n = {}) {
79
79
  const l = n, { window: o = ft } = l, a = gt(l, ["window"]);
80
80
  let r;
81
- const i = ht(() => o && "ResizeObserver" in o), m = () => {
81
+ const i = pt(() => o && "ResizeObserver" in o), m = () => {
82
82
  r && (r.disconnect(), r = void 0);
83
- }, p = ne(() => He(t), (c) => {
83
+ }, h = ne(() => He(t), (c) => {
84
84
  m(), i.value && o && c && (r = new ResizeObserver(e), r.observe(c, a));
85
85
  }, { immediate: !0, flush: "post" }), d = () => {
86
- m(), p();
86
+ m(), h();
87
87
  };
88
88
  return vt(d), {
89
89
  isSupported: i,
@@ -91,10 +91,10 @@ function yt(t, e, n = {}) {
91
91
  };
92
92
  }
93
93
  function bt(t, e = { width: 0, height: 0 }, n = {}) {
94
- const { box: l = "content-box" } = n, o = w(e.width), a = w(e.height);
94
+ const { box: l = "content-box" } = n, o = E(e.width), a = E(e.height);
95
95
  return yt(t, ([r]) => {
96
96
  const i = l === "border-box" ? r.borderBoxSize : l === "content-box" ? r.contentBoxSize : r.devicePixelContentBoxSize;
97
- i ? (o.value = i.reduce((m, { inlineSize: p }) => m + p, 0), a.value = i.reduce((m, { blockSize: p }) => m + p, 0)) : (o.value = r.contentRect.width, a.value = r.contentRect.height);
97
+ i ? (o.value = i.reduce((m, { inlineSize: h }) => m + h, 0), a.value = i.reduce((m, { blockSize: h }) => m + h, 0)) : (o.value = r.contentRect.width, a.value = r.contentRect.height);
98
98
  }, n), ne(() => He(t), (r) => {
99
99
  o.value = r ? e.width : 0, a.value = r ? e.height : 0;
100
100
  }), {
@@ -102,16 +102,16 @@ function bt(t, e = { width: 0, height: 0 }, n = {}) {
102
102
  height: a
103
103
  };
104
104
  }
105
- var we;
105
+ var Ee;
106
106
  (function(t) {
107
107
  t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
108
- })(we || (we = {}));
109
- var St = Object.defineProperty, _e = Object.getOwnPropertySymbols, Et = Object.prototype.hasOwnProperty, wt = Object.prototype.propertyIsEnumerable, xe = (t, e, n) => e in t ? St(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, _t = (t, e) => {
108
+ })(Ee || (Ee = {}));
109
+ var St = Object.defineProperty, we = Object.getOwnPropertySymbols, _t = Object.prototype.hasOwnProperty, Et = Object.prototype.propertyIsEnumerable, xe = (t, e, n) => e in t ? St(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, wt = (t, e) => {
110
110
  for (var n in e || (e = {}))
111
- Et.call(e, n) && xe(t, n, e[n]);
112
- if (_e)
113
- for (var n of _e(e))
114
- wt.call(e, n) && xe(t, n, e[n]);
111
+ _t.call(e, n) && xe(t, n, e[n]);
112
+ if (we)
113
+ for (var n of we(e))
114
+ Et.call(e, n) && xe(t, n, e[n]);
115
115
  return t;
116
116
  };
117
117
  const xt = {
@@ -140,23 +140,23 @@ const xt = {
140
140
  easeOutBack: [0.34, 1.56, 0.64, 1],
141
141
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
142
142
  };
143
- _t({
143
+ wt({
144
144
  linear: ct
145
145
  }, xt);
146
146
  function Tt(t, e) {
147
- const { scrollEndHook: n, itemHeight: l, overscan: o = 5 } = e, a = w(null), r = bt(a), i = w(!0), m = Le(ee, 100);
148
- let p;
149
- const d = qe(t), c = w(0), s = w({ start: 0, end: 10 });
147
+ const { scrollEndHook: n, itemHeight: l, overscan: o = 5 } = e, a = E(null), r = bt(a), i = E(!0), m = Le(ee, 100);
148
+ let h;
149
+ const d = qe(t), c = E(0), s = E({ start: 0, end: 10 });
150
150
  let u = 0;
151
- const b = w([]), _ = S(() => {
151
+ const b = E([]), w = S(() => {
152
152
  let { sum: f, height: y } = { sum: 0, height: 0 };
153
153
  return d.value.map((I, C) => (typeof l == "number" ? y = l : y = l(C), f += y, { height: y, sum: f }));
154
- }), E = S(() => V(s.value.start)), g = S(() => typeof l == "number" ? _.value.length * l : _.value[_.value.length - 1]?.sum || 0), D = S(() => {
154
+ }), _ = S(() => V(s.value.start)), g = S(() => typeof l == "number" ? w.value.length * l : w.value[w.value.length - 1]?.sum || 0), D = S(() => {
155
155
  let f = b.value.length - o, y = Math.max(f - u, 0);
156
156
  return b.value.slice(y, f);
157
157
  });
158
- de(() => {
159
- }), Oe(() => cancelAnimationFrame(p)), ne(
158
+ fe(() => {
159
+ }), Oe(() => cancelAnimationFrame(h)), ne(
160
160
  [r.width, r.height, d],
161
161
  ([f, y]) => {
162
162
  (f || y) && U();
@@ -172,11 +172,11 @@ function Tt(t, e) {
172
172
  i.value = !0, n?.();
173
173
  }
174
174
  function U() {
175
- cancelAnimationFrame(p), p = requestAnimationFrame(N);
175
+ cancelAnimationFrame(h), h = requestAnimationFrame(N);
176
176
  }
177
177
  function N() {
178
178
  if (a.value) {
179
- c.value = a.value.scrollTop, u = W();
179
+ c.value = a.value.scrollTop, u = z();
180
180
  let f = A(c.value), y = f + u + o;
181
181
  f = f - o, f = f < 0 ? 0 : f, y = y > d.value.length ? d.value.length : y, s.value = { start: f, end: y }, b.value = d.value.slice(f, y).map((I, C) => ({
182
182
  data: I,
@@ -185,27 +185,27 @@ function Tt(t, e) {
185
185
  }
186
186
  }
187
187
  function A(f) {
188
- let y = 0, I = _.value.length - 1, C = -1;
188
+ let y = 0, I = w.value.length - 1, C = -1;
189
189
  for (; y <= I; ) {
190
190
  const O = Math.floor((y + I) / 2);
191
- _.value[O].sum >= f ? (C = O, I = O - 1) : y = O + 1;
191
+ w.value[O].sum >= f ? (C = O, I = O - 1) : y = O + 1;
192
192
  }
193
193
  return Math.max(0, C);
194
194
  }
195
- function W() {
195
+ function z() {
196
196
  let f = 0, y = 0, I = H();
197
- for (let C = I; C < _.value.length && (f++, y += _.value[C].height, !(y >= r.height.value)); C++)
197
+ for (let C = I; C < w.value.length && (f++, y += w.value[C].height, !(y >= r.height.value)); C++)
198
198
  ;
199
199
  return f;
200
200
  }
201
201
  function V(f) {
202
202
  if (typeof l == "number")
203
203
  return f * l;
204
- let y = _.value[f];
204
+ let y = w.value[f];
205
205
  return y ? y.sum - y.height : 0;
206
206
  }
207
207
  function j(f) {
208
- return _.value[f] || { sum: 0, height: 0 };
208
+ return w.value[f] || { sum: 0, height: 0 };
209
209
  }
210
210
  function H() {
211
211
  let f = s.value.start;
@@ -225,7 +225,7 @@ function Tt(t, e) {
225
225
  }
226
226
  })), K = S(() => ({
227
227
  style: {
228
- transform: `translate3d(0, ${E.value}px, 0)`,
228
+ transform: `translate3d(0, ${_.value}px, 0)`,
229
229
  "will-change": "transform"
230
230
  }
231
231
  })), Y = {
@@ -252,7 +252,7 @@ function Tt(t, e) {
252
252
  innerProps: K
253
253
  };
254
254
  }
255
- const $e = Symbol(), Ae = Symbol(), Pe = Symbol(), Fe = Symbol(), Me = Symbol(), We = Symbol(), ze = Symbol(), ke = Symbol(), Ne = Symbol();
255
+ const $e = Symbol(), Ae = Symbol(), Pe = Symbol(), Fe = Symbol(), Me = Symbol(), ze = Symbol(), We = Symbol(), ke = Symbol(), Ne = Symbol();
256
256
  function Wt() {
257
257
  const { voidFn: t, boolFn: e, boolRef: n, arrayRef: l } = {
258
258
  voidFn: (u) => {
@@ -260,21 +260,21 @@ function Wt() {
260
260
  boolFn: (u) => !1,
261
261
  boolRef: S(() => !1),
262
262
  arrayRef: S(() => [])
263
- }, o = F(Fe, l), a = F(Pe, e), r = F(ke, n), i = F(Ae, t), m = F($e, t), p = F(Me, t), d = F(We, t), c = F(ze, t), s = F(Ne, t);
263
+ }, o = F(Fe, l), a = F(Pe, e), r = F(ke, n), i = F(Ae, t), m = F($e, t), h = F(Me, t), d = F(ze, t), c = F(We, t), s = F(Ne, t);
264
264
  return {
265
265
  selected: o,
266
266
  isSelected: a,
267
267
  isAllSelected: r,
268
268
  toggle: i,
269
269
  toggleAll: m,
270
- select: p,
270
+ select: h,
271
271
  selectAll: d,
272
272
  unselect: c,
273
273
  unselectAll: s
274
274
  };
275
275
  }
276
- function zt(t, e) {
277
- const n = w({}), l = S(() => t.value.filter((s) => n.value[s[e]])), o = S(() => l.value.length != 0 && Object.keys(n.value).length == t.value.length);
276
+ function kt(t, e) {
277
+ const n = E({}), l = S(() => t.value.filter((s) => n.value[s[e]])), o = S(() => l.value.length != 0 && Object.keys(n.value).length == t.value.length);
278
278
  function a() {
279
279
  t.value.forEach((s) => {
280
280
  n.value[s[e]] = !0;
@@ -293,18 +293,18 @@ function zt(t, e) {
293
293
  n.value[u[e]] && delete n.value[u[e]];
294
294
  });
295
295
  }
296
- function p(s) {
296
+ function h(s) {
297
297
  return !!n.value[s[e]];
298
298
  }
299
299
  function d(s) {
300
300
  s.forEach((u) => {
301
- p(u) ? delete n.value[u[e]] : n.value[u[e]] = !0;
301
+ h(u) ? delete n.value[u[e]] : n.value[u[e]] = !0;
302
302
  });
303
303
  }
304
304
  function c() {
305
305
  o.value ? r() : a();
306
306
  }
307
- return $($e, c), $(Ae, d), $(Pe, p), $(Fe, l), $(Me, i), $(We, a), $(ze, m), $(ke, o), $(Ne, r), {
307
+ return $($e, c), $(Ae, d), $(Pe, h), $(Fe, l), $(Me, i), $(ze, a), $(We, m), $(ke, o), $(Ne, r), {
308
308
  selected: l,
309
309
  select: i,
310
310
  selectAll: a,
@@ -312,11 +312,11 @@ function zt(t, e) {
312
312
  unselectAll: r,
313
313
  toggle: d,
314
314
  toggleAll: c,
315
- isSelected: p,
315
+ isSelected: h,
316
316
  isAllSelected: o
317
317
  };
318
318
  }
319
- function ie(t) {
319
+ function ce(t) {
320
320
  return () => {
321
321
  console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`);
322
322
  };
@@ -328,84 +328,84 @@ function Ve({
328
328
  getSelectMap: l = () => ({})
329
329
  }) {
330
330
  const {
331
- select: o = ie("\u9009\u62E9"),
332
- unselect: a = ie("\u53D6\u6D88\u9009\u62E9"),
333
- unselectAll: r = ie("\u53D6\u6D88\u5168\u9009")
331
+ select: o = ce("\u9009\u62E9"),
332
+ unselect: a = ce("\u53D6\u6D88\u9009\u62E9"),
333
+ unselectAll: r = ce("\u53D6\u6D88\u5168\u9009")
334
334
  } = l();
335
335
  let i = {};
336
336
  const m = S(
337
- () => Se(e === "colum" ? z : oe, 50)
338
- ), p = /* @__PURE__ */ new Set(), d = w(!0), c = w(), s = w(!1), u = w({ x: 0, y: 0 }), b = w({ x: 0, y: 0, scrollTop: 0 }), _ = new ResizeObserver(
339
- (v) => E.value = v[0].target.getBoundingClientRect()
340
- ), E = w({}), g = w({
337
+ () => Se(e === "colum" ? W : oe, 50)
338
+ ), h = /* @__PURE__ */ new Set(), d = E(!0), c = E(), s = E(!1), u = E({ x: 0, y: 0 }), b = E({ x: 0, y: 0, scrollTop: 0 }), w = new ResizeObserver(
339
+ (v) => _.value = v[0].target.getBoundingClientRect()
340
+ ), _ = E({}), g = E({
341
341
  top: 0,
342
342
  height: 0,
343
343
  sync(v = !1) {
344
344
  g.value.top = c.value?.scrollTop || 0, v && (g.value.height = c.value?.scrollHeight || 0);
345
345
  }
346
346
  }), D = S(() => s.value ? {
347
- left: Math.min(u.value.x, b.value.x) - E.value.left,
348
- top: Math.min(u.value.y, b.value.y) - E.value.top,
347
+ left: Math.min(u.value.x, b.value.x) - _.value.left,
348
+ top: Math.min(u.value.y, b.value.y) - _.value.top,
349
349
  width: Math.abs(u.value.x - b.value.x),
350
350
  height: Math.abs(u.value.y - b.value.y)
351
351
  } : { left: 0, top: 0, width: 0, height: 0 }), { margin: L = 50, startSpeed: ee = 30, maxSpeed: U = 30 } = n;
352
352
  let N;
353
- const A = L, W = ee, V = U, j = (v) => v ** 1;
353
+ const A = L, z = ee, V = U, j = (v) => v ** 1;
354
354
  let H = 0;
355
355
  function q(v) {
356
356
  if (cancelAnimationFrame(N), H = te(v), H = Math.max(
357
357
  Math.min(H, V),
358
358
  -V
359
359
  ), H !== 0) {
360
- const h = c.value;
361
- if (!h || !s.value)
360
+ const p = c.value;
361
+ if (!p || !s.value)
362
362
  return;
363
- const R = g.value.height - E.value.height;
363
+ const R = g.value.height - _.value.height;
364
364
  let x = g.value.top + Number(H);
365
- x = Math.min(Math.max(0, x), R), h.scrollTop = x, Y(), N = requestAnimationFrame(() => q(v));
365
+ x = Math.min(Math.max(0, x), R), p.scrollTop = x, Y(), N = requestAnimationFrame(() => q(v));
366
366
  }
367
367
  }
368
368
  function te(v) {
369
369
  if (c.value) {
370
- const R = E.value, x = R.bottom - v;
370
+ const R = _.value, x = R.bottom - v;
371
371
  if (x < A)
372
- return W * j(1 - x / A);
372
+ return z * j(1 - x / A);
373
373
  const P = v - R.top;
374
374
  if (P < A)
375
- return -W * j(1 - P / A);
375
+ return -z * j(1 - P / A);
376
376
  }
377
377
  return 0;
378
378
  }
379
379
  function K(v) {
380
- const h = { ...D.value, right: 0, bottom: 0 };
381
- return h.left += E.value.left, h.top += E.value.top - g.value.top, h.right = h.width + h.left, h.bottom = h.height + h.top, h.left < v.right && h.right > v.left && h.top < v.bottom && h.bottom > v.top;
380
+ const p = { ...D.value, right: 0, bottom: 0 };
381
+ return p.left += _.value.left, p.top += _.value.top - g.value.top, p.right = p.width + p.left, p.bottom = p.height + p.top, p.left < v.right && p.right > v.left && p.top < v.bottom && p.bottom > v.top;
382
382
  }
383
383
  function Y() {
384
384
  g.value.sync();
385
- const { top: v, height: h } = g.value;
385
+ const { top: v, height: p } = g.value;
386
386
  b.value.y = Math.min(
387
- h + E.value.top,
387
+ p + _.value.top,
388
388
  b.value.y + v - b.value.scrollTop
389
389
  ), b.value.scrollTop = v;
390
390
  }
391
- function f(v, h, R = "dynamic-styles") {
391
+ function f(v, p, R = "dynamic-styles") {
392
392
  let x = document.getElementById(R);
393
393
  x || (x = document.createElement("style"), x.id = R, document.head.appendChild(x));
394
- const P = x.sheet.cssRules, X = P.length, je = `${v} { ${h} }`;
395
- for (let ue = 0; ue < X; ue++) {
396
- const me = P[ue];
397
- if (me.selectorText === v && me.style.cssText === h)
394
+ const P = x.sheet.cssRules, X = P.length, je = `${v} { ${p} }`;
395
+ for (let ie = 0; ie < X; ie++) {
396
+ const me = P[ie];
397
+ if (me.selectorText === v && me.style.cssText === p)
398
398
  return;
399
399
  }
400
400
  x.sheet.insertRule(je, X);
401
401
  }
402
- function y(v, h) {
403
- d.value = !0, s.value = !0, g.value.height ? g.value.sync() : g.value.sync(!0), u.value.x = v, u.value.y = h + g.value.top, b.value.x = u.value.x, b.value.y = u.value.y, c.value?.classList.add("disable-scroll-behavior"), p.clear();
402
+ function y(v, p) {
403
+ d.value = !0, s.value = !0, g.value.height ? g.value.sync() : g.value.sync(!0), u.value.x = v, u.value.y = p + g.value.top, b.value.x = u.value.x, b.value.y = u.value.y, c.value?.classList.add("disable-scroll-behavior"), h.clear();
404
404
  }
405
- function I(v, h, R) {
406
- !s.value || (d.value && e === "colum" && !T() && (r(), d.value = !1), R?.(), q(h), b.value.x = Math.max(v, E.value.left), b.value.y = Math.min(
407
- h + g.value.top,
408
- g.value.height + E.value.top
405
+ function I(v, p, R) {
406
+ !s.value || (d.value && e === "colum" && !T() && (r(), d.value = !1), R?.(), q(p), b.value.x = Math.max(v, _.value.left), b.value.y = Math.min(
407
+ p + g.value.top,
408
+ g.value.height + _.value.top
409
409
  ), b.value.scrollTop = g.value.top, m.value());
410
410
  }
411
411
  function C() {
@@ -417,29 +417,29 @@ function Ve({
417
417
  function T() {
418
418
  if (!s.value)
419
419
  return !1;
420
- const { width: v, height: h } = D.value;
421
- return !(Math.max(v, h) > 5);
420
+ const { width: v, height: p } = D.value;
421
+ return !(Math.max(v, p) > 5);
422
422
  }
423
423
  function G() {
424
424
  T() && r();
425
425
  }
426
- function z() {
426
+ function W() {
427
427
  T() || c.value?.querySelectorAll(`[${t}]`).forEach((v) => {
428
428
  i[`${t}`] = v.getAttribute(`${t}`), K(v.getBoundingClientRect()) ? o([i]) : a([i]);
429
429
  });
430
430
  }
431
431
  function oe() {
432
432
  const v = [];
433
- let h = null, R = 0;
433
+ let p = null, R = 0;
434
434
  c.value?.querySelectorAll(`[${t}]`).forEach((x, P) => {
435
435
  const X = x.getAttribute(`${t}`);
436
- v.push(X), K(x.getBoundingClientRect()) ? (h === null && (h = P), h = Math.min(h, P), R = Math.max(R, P)) : (i[`${t}`] = X, p.has(X) && a([i]));
436
+ v.push(X), K(x.getBoundingClientRect()) ? (p === null && (p = P), p = Math.min(p, P), R = Math.max(R, P)) : (i[`${t}`] = X, h.has(X) && a([i]));
437
437
  });
438
- for (let x = h; x < R + 1; x++)
439
- i[`${t}`] = v[x], o([i]), p.add(v[x]);
438
+ for (let x = p; x < R + 1; x++)
439
+ i[`${t}`] = v[x], o([i]), h.add(v[x]);
440
440
  }
441
441
  function re(v) {
442
- return !v?.value || (c.value = v.value, !c?.value) ? !1 : (_.observe(c.value), f(
442
+ return !v?.value || (c.value = v.value, !c?.value) ? !1 : (w.observe(c.value), f(
443
443
  ".disable-scroll-behavior",
444
444
  "scroll-behavior: unset !important;"
445
445
  ), !0);
@@ -456,17 +456,17 @@ function Ve({
456
456
  selectRange: D,
457
457
  isPressing: s,
458
458
  containerEl: c,
459
- observer: _
459
+ observer: w
460
460
  };
461
461
  }
462
- function kt(t) {
462
+ function Nt(t) {
463
463
  const e = Ve(t), { observer: n, selectRange: l } = e, {
464
464
  onScroll: o,
465
465
  dragStart: a,
466
466
  dragMove: r,
467
467
  dragEnd: i,
468
468
  cancelSelectAllBySingleClick: m
469
- } = e, p = S(() => ({
469
+ } = e, h = S(() => ({
470
470
  left: `${l.value.left}px`,
471
471
  top: `${l.value.top}px`,
472
472
  width: `${l.value.width}px`,
@@ -476,22 +476,22 @@ function kt(t) {
476
476
  return Q("div", {
477
477
  id: "selectBoxEl",
478
478
  class: "absolute z-50 bg-blue-200 opacity-50",
479
- style: p.value
479
+ style: h.value
480
480
  });
481
481
  }
482
482
  });
483
- function c(E) {
484
- E.button === 0 && a(E.x, E.y);
483
+ function c(_) {
484
+ _.button === 0 && a(_.x, _.y);
485
485
  }
486
- function s(E) {
487
- r(E.x, E.y);
486
+ function s(_) {
487
+ r(_.x, _.y);
488
488
  }
489
- function u(E) {
490
- E.composedPath().some((D) => D?.getAttribute?.(t.attribute)) || m(), i();
489
+ function u(_) {
490
+ _.composedPath().some((D) => D?.getAttribute?.(t.attribute)) || m(), i();
491
491
  }
492
- function b(E) {
492
+ function b(_) {
493
493
  try {
494
- if (!e.init(E))
494
+ if (!e.init(_))
495
495
  throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
496
496
  if (!e.containerEl?.value)
497
497
  return !1;
@@ -500,12 +500,12 @@ function kt(t) {
500
500
  console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", g);
501
501
  }
502
502
  }
503
- function _() {
503
+ function w() {
504
504
  n.disconnect(), e.containerEl.value?.removeEventListener("scroll", o), e.containerEl.value?.removeEventListener("mousedown", c), window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", u);
505
505
  }
506
- return { init: b, unMount: _ };
506
+ return { init: b, unMount: w };
507
507
  }
508
- function Nt(t, e, n = 600) {
508
+ function Vt(t, e, n = 600) {
509
509
  const l = Ve({
510
510
  ...t,
511
511
  selectWay: "row",
@@ -513,7 +513,7 @@ function Nt(t, e, n = 600) {
513
513
  startSpeed: 5,
514
514
  maxSpeed: 5
515
515
  }
516
- }), { observer: o } = l, { onScroll: a, dragStart: r, dragMove: i, dragEnd: m, selectFn: p } = l;
516
+ }), { observer: o } = l, { onScroll: a, dragStart: r, dragMove: i, dragEnd: m, selectFn: h } = l;
517
517
  let d;
518
518
  function c() {
519
519
  clearTimeout(d);
@@ -521,7 +521,7 @@ function Nt(t, e, n = 600) {
521
521
  function s(g) {
522
522
  c(), d = setTimeout(() => {
523
523
  const { clientX: D, clientY: L } = g.targetTouches[0];
524
- r(D, L), e?.(), p.value(), g.preventDefault();
524
+ r(D, L), e?.(), h.value(), g.preventDefault();
525
525
  }, n);
526
526
  }
527
527
  function u(g) {
@@ -532,7 +532,7 @@ function Nt(t, e, n = 600) {
532
532
  function b() {
533
533
  c(), m();
534
534
  }
535
- function _(g) {
535
+ function w(g) {
536
536
  try {
537
537
  if (!l.init(g))
538
538
  throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
@@ -543,10 +543,10 @@ function Nt(t, e, n = 600) {
543
543
  console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", D);
544
544
  }
545
545
  }
546
- function E() {
546
+ function _() {
547
547
  o.disconnect(), l.containerEl.value?.removeEventListener("scroll", a), l.containerEl.value?.removeEventListener("touchstart", s), l.containerEl.value?.removeEventListener("touchmove", u), window.removeEventListener("touchcancel", b), window.removeEventListener("touchEnd", b);
548
548
  }
549
- return { init: _, unMount: E };
549
+ return { init: w, unMount: _ };
550
550
  }
551
551
  const Ot = Symbol(), Dt = /* @__PURE__ */ Z({
552
552
  __name: "Dialog",
@@ -580,13 +580,13 @@ const Ot = Symbol(), Dt = /* @__PURE__ */ Z({
580
580
  }));
581
581
  }
582
582
  });
583
- const pe = (t, e) => {
583
+ const ue = (t, e) => {
584
584
  const n = t.__vccOpts || t;
585
585
  for (const [l, o] of e)
586
586
  n[l] = o;
587
587
  return n;
588
- }, Rt = /* @__PURE__ */ pe(Dt, [["__scopeId", "data-v-415900d3"]]);
589
- function Vt(t) {
588
+ }, Rt = /* @__PURE__ */ ue(Dt, [["__scopeId", "data-v-415900d3"]]);
589
+ function jt(t) {
590
590
  function e(n, l) {
591
591
  const o = document.createElement("div"), a = {
592
592
  setup() {
@@ -620,7 +620,7 @@ const Ct = /* @__PURE__ */ Z({
620
620
  position: null
621
621
  },
622
622
  setup(t) {
623
- const e = t, n = w(), l = w(), o = w(), a = S(() => {
623
+ const e = t, n = E(), l = E(), o = E(), a = S(() => {
624
624
  switch (e.position) {
625
625
  case "top":
626
626
  return 10;
@@ -644,9 +644,9 @@ const Ct = /* @__PURE__ */ Z({
644
644
  color: "white",
645
645
  fontSize: "14px"
646
646
  }));
647
- return fe(() => {
647
+ return pe(() => {
648
648
  l.value = n.value.offsetWidth / 2, o.value = n.value.offsetHeight / 2;
649
- }), (m, p) => (k(), J("div", {
649
+ }), (m, h) => (k(), J("div", {
650
650
  id: "toastWrapper",
651
651
  ref_key: "toastWrapper",
652
652
  ref: n,
@@ -660,19 +660,20 @@ const Ct = /* @__PURE__ */ Z({
660
660
  ], 4)
661
661
  ], 4));
662
662
  }
663
- }), Te = {
663
+ });
664
+ const Bt = /* @__PURE__ */ ue(Ct, [["__scopeId", "data-v-15ab4094"]]), Te = {
664
665
  message: "\u61D2\u732B\u4E91 Yes!!!",
665
666
  position: "middle",
666
667
  duration: 1500
667
668
  };
668
- class jt {
669
+ class Kt {
669
670
  options;
670
671
  container;
671
672
  constructor(e) {
672
673
  this.options = e, this.container = document.createElement("div");
673
674
  }
674
675
  present() {
675
- const e = Q(Q(Ct), { ...Te, ...this.options });
676
+ const e = Q(Q(Bt), { ...Te, ...this.options });
676
677
  ae(e, this.container), document.body.insertBefore(this.container, document.body.firstChild);
677
678
  const n = this.options.duration || Te.duration;
678
679
  setTimeout(() => {
@@ -680,12 +681,17 @@ class jt {
680
681
  }, n);
681
682
  }
682
683
  dismiss() {
683
- this.container && (this.container.querySelector("#toastWrapper")?.classList.add("animate-toastAnimation"), setTimeout(() => {
684
- this.container && (ae(null, this.container), document.body.removeChild(this.container));
685
- }, 500));
684
+ if (this.container) {
685
+ const e = this.container.querySelector(
686
+ "#toastWrapper"
687
+ );
688
+ e.style.opacity = "0", e.style.transition = "opacity 0.4s ease-in", setTimeout(() => {
689
+ this.container && (ae(null, this.container), document.body.removeChild(this.container));
690
+ }, 500);
691
+ }
686
692
  }
687
693
  }
688
- const Bt = ["xlink:href", "fill", "color"], Kt = /* @__PURE__ */ Z({
694
+ const It = ["xlink:href", "fill", "color"], Qt = /* @__PURE__ */ Z({
689
695
  __name: "SvgIcon",
690
696
  props: {
691
697
  name: null,
@@ -708,27 +714,27 @@ const Bt = ["xlink:href", "fill", "color"], Kt = /* @__PURE__ */ Z({
708
714
  "xlink:href": B(n),
709
715
  fill: t.color,
710
716
  color: t.color
711
- }, null, 8, Bt)
717
+ }, null, 8, It)
712
718
  ], 4));
713
719
  }
714
720
  });
715
- function It(t) {
721
+ function Lt(t) {
716
722
  const {
717
723
  containerEl: e,
718
724
  sliderEl: n,
719
725
  autoHeight: l,
720
726
  performance: o = {},
721
727
  maxHeightRatio: a = 0.9
722
- } = t, r = w(!0), i = Le(V, 100);
723
- let m, p = "";
724
- const d = w(0), c = w(0), s = w(0), u = w({
728
+ } = t, r = E(!0), i = Le(V, 100);
729
+ let m, h = "";
730
+ const d = E(0), c = E(0), s = E(0), u = E({
725
731
  top: 0,
726
732
  scrollTop: 0,
727
733
  scrollHeight: 0,
728
734
  clientHeight: 0
729
- }), b = w({
735
+ }), b = E({
730
736
  clientHeight: 0
731
- }), _ = S(() => !!c.value), E = S(() => u.value.scrollHeight > u.value.clientHeight), g = S(() => u.value.clientHeight - b.value.clientHeight), D = S(() => u.value.scrollHeight - u.value.clientHeight), L = S(() => Math.max(
737
+ }), w = S(() => !!c.value), _ = S(() => u.value.scrollHeight > u.value.clientHeight), g = S(() => u.value.clientHeight - b.value.clientHeight), D = S(() => u.value.scrollHeight - u.value.clientHeight), L = S(() => Math.max(
732
738
  u.value.clientHeight / u.value.scrollHeight,
733
739
  0.05
734
740
  )), ee = S(() => L.value > a ? 0 : L.value * u.value.clientHeight), U = S(() => ({
@@ -737,19 +743,19 @@ function It(t) {
737
743
  height: l ? `${ee.value}px` : void 0
738
744
  }));
739
745
  function N(O) {
740
- W(), c.value = O.clientY - n.value.getBoundingClientRect().top || 1, p = getComputedStyle(e.value).scrollBehavior, p === "smooth" && (e.value.style.scrollBehavior = "unset");
746
+ z(), c.value = O.clientY - n.value.getBoundingClientRect().top || 1, h = getComputedStyle(e.value).scrollBehavior, h === "smooth" && (e.value.style.scrollBehavior = "unset");
741
747
  }
742
748
  function A() {
743
- e.value.style.scrollBehavior = p, c.value = 0, i();
749
+ e.value.style.scrollBehavior = h, c.value = 0, i();
744
750
  }
745
- function W() {
751
+ function z() {
746
752
  r.value = !1;
747
753
  }
748
754
  function V() {
749
- _.value || (r.value = !0);
755
+ w.value || (r.value = !0);
750
756
  }
751
757
  function j(O) {
752
- if (!_.value)
758
+ if (!w.value)
753
759
  return;
754
760
  let T = O.clientY - u.value.top - c.value;
755
761
  T < 0 ? s.value = 0 : T >= g.value ? s.value = g.value : s.value = T, e.value.scrollTo({
@@ -757,7 +763,7 @@ function It(t) {
757
763
  });
758
764
  }
759
765
  function H() {
760
- _.value || q();
766
+ w.value || q();
761
767
  }
762
768
  function q() {
763
769
  cancelAnimationFrame(m), m = requestAnimationFrame(te);
@@ -778,20 +784,20 @@ function It(t) {
778
784
  u.value.top = e.value?.getBoundingClientRect().top ?? 0, u.value.scrollHeight = e.value?.scrollHeight ?? 0, u.value.clientHeight = e.value?.clientHeight ?? 0;
779
785
  }
780
786
  function y() {
781
- W(), setTimeout(() => {
787
+ z(), setTimeout(() => {
782
788
  b.value.clientHeight = n.value?.clientHeight ?? 0, V();
783
789
  }, 150);
784
790
  }
785
791
  function I(O, T, G = "dynamic-styles") {
786
- let z = document.getElementById(G);
787
- z || (z = document.createElement("style"), z.id = G, document.head.appendChild(z));
788
- const oe = z.sheet.cssRules, re = oe.length, v = `${O} { ${T} }`;
789
- for (let h = 0; h < re; h++) {
790
- const R = oe[h];
792
+ let W = document.getElementById(G);
793
+ W || (W = document.createElement("style"), W.id = G, document.head.appendChild(W));
794
+ const oe = W.sheet.cssRules, re = oe.length, v = `${O} { ${T} }`;
795
+ for (let p = 0; p < re; p++) {
796
+ const R = oe[p];
791
797
  if (R.selectorText === O && R.style.cssText === T)
792
798
  return;
793
799
  }
794
- z.sheet.insertRule(v, re);
800
+ W.sheet.insertRule(v, re);
795
801
  }
796
802
  function C() {
797
803
  e.value && n.value ? (I(
@@ -808,19 +814,19 @@ function It(t) {
808
814
  }, 100), y()) : console.error("useScrollBar:", "\u521D\u59CB\u5316\u5931\u8D25!", { containerEl: e, sliderEl: n });
809
815
  }
810
816
  return ne(d, () => {
811
- W(), i();
817
+ z(), i();
812
818
  }), {
813
819
  isScrollEnd: r,
814
- isDragSlider: _,
820
+ isDragSlider: w,
815
821
  offsetTop: s,
816
822
  scrollTop: d,
817
- scrollable: E,
823
+ scrollable: _,
818
824
  sliderPos: U,
819
825
  init: C,
820
826
  modifySliderEventListener: K
821
827
  };
822
828
  }
823
- const Lt = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Ht = /* @__PURE__ */ Lt(() => /* @__PURE__ */ M("div", { class: "default-slider" }, null, -1)), $t = /* @__PURE__ */ Z({
829
+ const Ht = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), $t = /* @__PURE__ */ Ht(() => /* @__PURE__ */ M("div", { class: "default-slider" }, null, -1)), At = /* @__PURE__ */ Z({
824
830
  __name: "ScrollBar",
825
831
  props: {
826
832
  containerEl: null,
@@ -829,14 +835,14 @@ const Lt = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Ht = /* @__PURE__ *
829
835
  performance: null
830
836
  },
831
837
  setup(t, { expose: e }) {
832
- const n = t, l = !!Ze().default, o = w(null), a = S(() => n.containerEl), r = It({
838
+ const n = t, l = !!Ze().default, o = E(null), a = S(() => n.containerEl), r = Lt({
833
839
  containerEl: a,
834
840
  sliderEl: o,
835
841
  autoHeight: l ? n.autoHeight : !0,
836
842
  performance: n.performance
837
- }), { scrollable: i, isScrollEnd: m, sliderPos: p } = r, d = w(!1), c = n.autoHide ? S(() => d.value || !m.value) : S(() => i.value);
838
- de(() => {
839
- fe(() => {
843
+ }), { scrollable: i, isScrollEnd: m, sliderPos: h } = r, d = E(!1), c = n.autoHide ? S(() => d.value || !m.value) : S(() => i.value);
844
+ fe(() => {
845
+ pe(() => {
840
846
  r.init();
841
847
  });
842
848
  }), Oe(() => {
@@ -848,7 +854,7 @@ const Lt = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Ht = /* @__PURE__ *
848
854
  function u() {
849
855
  d.value = !1;
850
856
  }
851
- return e({ uScrollBarReturn: r }), (b, _) => (k(), De(Re, null, {
857
+ return e({ uScrollBarReturn: r }), (b, w) => (k(), De(Re, null, {
852
858
  default: Ce(() => [
853
859
  et(M("div", {
854
860
  ref_key: "sliderRef",
@@ -856,10 +862,10 @@ const Lt = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Ht = /* @__PURE__ *
856
862
  class: "slider-wrapper",
857
863
  onMouseenter: s,
858
864
  onMouseleave: u,
859
- style: le(B(p))
865
+ style: le(B(h))
860
866
  }, [
861
867
  he(b.$slots, "default", {}, () => [
862
- Ht
868
+ $t
863
869
  ], !0)
864
870
  ], 36), [
865
871
  [tt, B(c)]
@@ -869,10 +875,10 @@ const Lt = (t) => (nt("data-v-edec7292"), t = t(), lt(), t), Ht = /* @__PURE__ *
869
875
  }));
870
876
  }
871
877
  });
872
- const Qt = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-edec7292"]]), At = { class: "virtualListWrapper" }, Pt = {
878
+ const Ut = /* @__PURE__ */ ue(At, [["__scopeId", "data-v-edec7292"]]), Pt = { class: "virtualListWrapper" }, Ft = {
873
879
  inheritAttrs: !1
874
- }, Ft = /* @__PURE__ */ Z({
875
- ...Pt,
880
+ }, Mt = /* @__PURE__ */ Z({
881
+ ...Ft,
876
882
  __name: "VirtualList",
877
883
  props: {
878
884
  data: null,
@@ -887,10 +893,10 @@ const Qt = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-edec7292"]]), At = { cl
887
893
  scrollEndHook: () => {
888
894
  n("scrollEnd");
889
895
  }
890
- }), { list: a, containerProps: r, wrapperProps: i, innerProps: m, getItemHeightData: p } = o;
896
+ }), { list: a, containerProps: r, wrapperProps: i, innerProps: m, getItemHeightData: h } = o;
891
897
  return e({
892
898
  vListReturn: o
893
- }), (d, c) => (k(), J("div", At, [
899
+ }), (d, c) => (k(), J("div", Pt, [
894
900
  M("div", rt({
895
901
  onScrollPassive: c[0] || (c[0] = (...s) => B(r).onScroll && B(r).onScroll(...s)),
896
902
  ref: B(r).ref,
@@ -901,7 +907,7 @@ const Qt = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-edec7292"]]), At = { cl
901
907
  (k(!0), J(at, null, st(B(a), ({ index: s, data: u }) => (k(), J("div", {
902
908
  key: s,
903
909
  style: le({
904
- height: `${B(p)(s).height}px`,
910
+ height: `${B(h)(s).height}px`,
905
911
  display: "flex"
906
912
  })
907
913
  }, [
@@ -916,27 +922,27 @@ const Qt = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-edec7292"]]), At = { cl
916
922
  ]));
917
923
  }
918
924
  });
919
- const Ut = /* @__PURE__ */ pe(Ft, [["__scopeId", "data-v-4ba97cce"]]);
925
+ const qt = /* @__PURE__ */ ue(Mt, [["__scopeId", "data-v-4ba97cce"]]);
920
926
  export {
921
- Qt as ScrollBar,
922
- Kt as SvgIcon,
923
- jt as ToastCreator,
924
- Ut as VirtualList,
927
+ Ut as ScrollBar,
928
+ Qt as SvgIcon,
929
+ Kt as ToastCreator,
930
+ qt as VirtualList,
925
931
  Fe as allSelectedKey,
926
932
  Ot as closeDialogKey,
927
- Vt as dialogController,
933
+ jt as dialogController,
928
934
  ke as isAllSelectedKey,
929
935
  Pe as isSelectedKey,
930
- We as selectAllKey,
936
+ ze as selectAllKey,
931
937
  Me as selectKey,
932
938
  $e as toggleAllKey,
933
939
  Ae as toggleKey,
934
940
  Ne as unselectAllKey,
935
- ze as unselectKey,
941
+ We as unselectKey,
936
942
  Ve as useDragSelect,
937
- Nt as useDragSelectByMobile,
938
- kt as useDragSelectByPc,
939
- zt as useSelectable,
943
+ Vt as useDragSelectByMobile,
944
+ Nt as useDragSelectByPc,
945
+ kt as useSelectable,
940
946
  Wt as useSelectableInjectors,
941
947
  Tt as useVirtualList
942
948
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.ui={},b.Vue))})(this,function(b,e){"use strict";var fe;const pe=typeof window<"u";pe&&((fe=window?.navigator)==null?void 0:fe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Q(n){return typeof n=="function"?n():e.unref(n)}function he(n,t){function o(...l){n(()=>t.apply(this,l),{fn:t,thisArg:this,args:l})}return o}function Be(n,t={}){let o,l;return i=>{const a=Q(n),u=Q(t.maxWait);if(o&&clearTimeout(o),a<=0||u!==void 0&&u<=0)return l&&(clearTimeout(l),l=null),i();u&&!l&&(l=setTimeout(()=>{o&&clearTimeout(o),l=null,i()},u)),o=setTimeout(()=>{l&&clearTimeout(l),l=null,i()},a)}}function Oe(n,t=!0,o=!0){let l=0,r,i=!0;const a=()=>{r&&(clearTimeout(r),r=void 0)};return g=>{const v=Q(n),p=Date.now()-l;if(a(),v<=0)return l=Date.now(),g();p>v&&(o||!i)?(l=Date.now(),g()):t&&(r=setTimeout(()=>{l=Date.now(),i=!0,a(),g()},v-p)),!o&&!r&&(r=setTimeout(()=>i=!0,v)),i=!1}}function Ce(n){return n}function De(n){return e.getCurrentScope()?(e.onScopeDispose(n),!0):!1}function me(n,t=200,o={}){return he(Be(t,o),n)}function ve(n,t=200,o=!1,l=!0){return he(Oe(t,o,l),n)}function Re(n,t=!0){e.getCurrentInstance()?e.onMounted(n):t?n():e.nextTick(n)}function ge(n){var t;const o=Q(n);return(t=o?.$el)!=null?t:o}const Ie=pe?window:void 0;function Le(n,t=!1){const o=e.ref(),l=()=>o.value=Boolean(n());return l(),Re(l,t),o}const X=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},J="__vueuse_ssr_handlers__";X[J]=X[J]||{},X[J];var ye=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Pe=(n,t)=>{var o={};for(var l in n)Ae.call(n,l)&&t.indexOf(l)<0&&(o[l]=n[l]);if(n!=null&&ye)for(var l of ye(n))t.indexOf(l)<0&&He.call(n,l)&&(o[l]=n[l]);return o};function Me(n,t,o={}){const l=o,{window:r=Ie}=l,i=Pe(l,["window"]);let a;const u=Le(()=>r&&"ResizeObserver"in r),g=()=>{a&&(a.disconnect(),a=void 0)},v=e.watch(()=>ge(n),d=>{g(),u.value&&r&&d&&(a=new ResizeObserver(t),a.observe(d,i))},{immediate:!0,flush:"post"}),p=()=>{g(),v()};return De(p),{isSupported:u,stop:p}}function $e(n,t={width:0,height:0},o={}){const{box:l="content-box"}=o,r=e.ref(t.width),i=e.ref(t.height);return Me(n,([a])=>{const u=l==="border-box"?a.borderBoxSize:l==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;u?(r.value=u.reduce((g,{inlineSize:v})=>g+v,0),i.value=u.reduce((g,{blockSize:v})=>g+v,0)):(r.value=a.contentRect.width,i.value=a.contentRect.height)},o),e.watch(()=>ge(n),a=>{r.value=a?t.width:0,i.value=a?t.height:0}),{width:r,height:i}}var Se;(function(n){n.UP="UP",n.RIGHT="RIGHT",n.DOWN="DOWN",n.LEFT="LEFT",n.NONE="NONE"})(Se||(Se={}));var Fe=Object.defineProperty,Ee=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,be=(n,t,o)=>t in n?Fe(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o,je=(n,t)=>{for(var o in t||(t={}))ke.call(t,o)&&be(n,o,t[o]);if(Ee)for(var o of Ee(t))Ve.call(t,o)&&be(n,o,t[o]);return n};je({linear:Ce},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function we(n,t){const{scrollEndHook:o,itemHeight:l,overscan:r=5}=t,i=e.ref(null),a=$e(i),u=e.ref(!0),g=me(U,100);let v;const p=e.shallowRef(n),d=e.ref(0),s=e.ref({start:0,end:10});let c=0;const E=e.ref([]),_=e.computed(()=>{let{sum:h,height:S}={sum:0,height:0};return p.value.map((R,D)=>(typeof l=="number"?S=l:S=l(D),h+=S,{height:S,sum:h}))}),w=e.computed(()=>F(s.value.start)),y=e.computed(()=>typeof l=="number"?_.value.length*l:_.value[_.value.length-1]?.sum||0),O=e.computed(()=>{let h=E.value.length-r,S=Math.max(h-c,0);return E.value.slice(S,h)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(v)),e.watch([a.width,a.height,p],([h,S])=>{(h||S)&&j()},{deep:!0}),e.watch(d,()=>{I(),g()});function I(){u.value=!1}function U(){u.value=!0,o?.()}function j(){cancelAnimationFrame(v),v=requestAnimationFrame($)}function $(){if(i.value){d.value=i.value.scrollTop,c=P();let h=A(d.value),S=h+c+r;h=h-r,h=h<0?0:h,S=S>p.value.length?p.value.length:S,s.value={start:h,end:S},E.value=p.value.slice(h,S).map((R,D)=>({data:R,index:D+h}))}}function A(h){let S=0,R=_.value.length-1,D=-1;for(;S<=R;){const B=Math.floor((S+R)/2);_.value[B].sum>=h?(D=B,R=B-1):S=B+1}return Math.max(0,D)}function P(){let h=0,S=0,R=L();for(let D=R;D<_.value.length&&(h++,S+=_.value[D].height,!(S>=a.height.value));D++);return h}function F(h){if(typeof l=="number")return h*l;let S=_.value[h];return S?S.sum-S.height:0}function k(h){return _.value[h]||{sum:0,height:0}}function L(){let h=s.value.start;return h>=r&&(h+=r),h}function K(h){if(i.value){const S=k(h);i.value.scrollTop=S.sum-S.height,$()}}const q=e.computed(()=>({style:{width:"100%",height:`${y.value}px`,pointerEvents:u.value?void 0:"none"}})),V=e.computed(()=>({style:{transform:`translate3d(0, ${w.value}px, 0)`,"will-change":"transform"}})),N={overflowY:"auto"};return{list:E,visiableList:O,getItemHeightData:k,getoffsetTopIndex:A,totalHeight:y,clientHeight:a.height,scrollTo:K,scrollTop:d,isScrollEnd:u,containerProps:{ref:i,onScroll:()=>{j()},style:N},wrapperProps:q,innerProps:V}}const Z=Symbol(),ee=Symbol(),te=Symbol(),ne=Symbol(),oe=Symbol(),le=Symbol(),re=Symbol(),ae=Symbol(),ie=Symbol();function Ke(){const{voidFn:n,boolFn:t,boolRef:o,arrayRef:l}={voidFn:c=>{},boolFn:c=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(ne,l),i=e.inject(te,t),a=e.inject(ae,o),u=e.inject(ee,n),g=e.inject(Z,n),v=e.inject(oe,n),p=e.inject(le,n),d=e.inject(re,n),s=e.inject(ie,n);return{selected:r,isSelected:i,isAllSelected:a,toggle:u,toggleAll:g,select:v,selectAll:p,unselect:d,unselectAll:s}}function Ne(n,t){const o=e.ref({}),l=e.computed(()=>n.value.filter(s=>o.value[s[t]])),r=e.computed(()=>l.value.length!=0&&Object.keys(o.value).length==n.value.length);function i(){n.value.forEach(s=>{o.value[s[t]]=!0})}function a(){o.value={}}function u(s){s.forEach(c=>{o.value[c[t]]||(o.value[c[t]]=!0)})}function g(s){s.forEach(c=>{o.value[c[t]]&&delete o.value[c[t]]})}function v(s){return!!o.value[s[t]]}function p(s){s.forEach(c=>{v(c)?delete o.value[c[t]]:o.value[c[t]]=!0})}function d(){r.value?a():i()}return e.provide(Z,d),e.provide(ee,p),e.provide(te,v),e.provide(ne,l),e.provide(oe,u),e.provide(le,i),e.provide(re,g),e.provide(ae,r),e.provide(ie,a),{selected:l,select:u,selectAll:i,unselect:g,unselectAll:a,toggle:p,toggleAll:d,isSelected:v,isAllSelected:r}}function se(n){return()=>{console.debug(`\u9ED8\u8BA4${n}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function ce({attribute:n,selectWay:t="colum",scrollOptions:o={},getSelectMap:l=()=>({})}){const{select:r=se("\u9009\u62E9"),unselect:i=se("\u53D6\u6D88\u9009\u62E9"),unselectAll:a=se("\u53D6\u6D88\u5168\u9009")}=l();let u={};const g=e.computed(()=>ve(t==="colum"?M:Y,50)),v=new Set,p=e.ref(!0),d=e.ref(),s=e.ref(!1),c=e.ref({x:0,y:0}),E=e.ref({x:0,y:0,scrollTop:0}),_=new ResizeObserver(f=>w.value=f[0].target.getBoundingClientRect()),w=e.ref({}),y=e.ref({top:0,height:0,sync(f=!1){y.value.top=d.value?.scrollTop||0,f&&(y.value.height=d.value?.scrollHeight||0)}}),O=e.computed(()=>s.value?{left:Math.min(c.value.x,E.value.x)-w.value.left,top:Math.min(c.value.y,E.value.y)-w.value.top,width:Math.abs(c.value.x-E.value.x),height:Math.abs(c.value.y-E.value.y)}:{left:0,top:0,width:0,height:0}),{margin:I=50,startSpeed:U=30,maxSpeed:j=30}=o;let $;const A=I,P=U,F=j,k=f=>f**1;let L=0;function K(f){if(cancelAnimationFrame($),L=q(f),L=Math.max(Math.min(L,F),-F),L!==0){const m=d.value;if(!m||!s.value)return;const C=y.value.height-w.value.height;let T=y.value.top+Number(L);T=Math.min(Math.max(0,T),C),m.scrollTop=T,N(),$=requestAnimationFrame(()=>K(f))}}function q(f){if(d.value){const C=w.value,T=C.bottom-f;if(T<A)return P*k(1-T/A);const H=f-C.top;if(H<A)return-P*k(1-H/A)}return 0}function V(f){const m={...O.value,right:0,bottom:0};return m.left+=w.value.left,m.top+=w.value.top-y.value.top,m.right=m.width+m.left,m.bottom=m.height+m.top,m.left<f.right&&m.right>f.left&&m.top<f.bottom&&m.bottom>f.top}function N(){y.value.sync();const{top:f,height:m}=y.value;E.value.y=Math.min(m+w.value.top,E.value.y+f-E.value.scrollTop),E.value.scrollTop=f}function h(f,m,C="dynamic-styles"){let T=document.getElementById(C);T||(T=document.createElement("style"),T.id=C,document.head.appendChild(T));const H=T.sheet.cssRules,W=H.length,it=`${f} { ${m} }`;for(let de=0;de<W;de++){const xe=H[de];if(xe.selectorText===f&&xe.style.cssText===m)return}T.sheet.insertRule(it,W)}function S(f,m){p.value=!0,s.value=!0,y.value.height?y.value.sync():y.value.sync(!0),c.value.x=f,c.value.y=m+y.value.top,E.value.x=c.value.x,E.value.y=c.value.y,d.value?.classList.add("disable-scroll-behavior"),v.clear()}function R(f,m,C){!s.value||(p.value&&t==="colum"&&!x()&&(a(),p.value=!1),C?.(),K(m),E.value.x=Math.max(f,w.value.left),E.value.y=Math.min(m+y.value.top,y.value.height+w.value.top),E.value.scrollTop=y.value.top,g.value())}function D(){s.value=!1,d.value?.classList.remove("disable-scroll-behavior")}function B(){!s.value||(L||N(),g.value())}function x(){if(!s.value)return!1;const{width:f,height:m}=O.value;return!(Math.max(f,m)>5)}function z(){x()&&a()}function M(){x()||d.value?.querySelectorAll(`[${n}]`).forEach(f=>{u[`${n}`]=f.getAttribute(`${n}`),V(f.getBoundingClientRect())?r([u]):i([u])})}function Y(){const f=[];let m=null,C=0;d.value?.querySelectorAll(`[${n}]`).forEach((T,H)=>{const W=T.getAttribute(`${n}`);f.push(W),V(T.getBoundingClientRect())?(m===null&&(m=H),m=Math.min(m,H),C=Math.max(C,H)):(u[`${n}`]=W,v.has(W)&&i([u]))});for(let T=m;T<C+1;T++)u[`${n}`]=f[T],r([u]),v.add(f[T])}function G(f){return!f?.value||(d.value=f.value,!d?.value)?!1:(_.observe(d.value),h(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:G,dragStart:S,dragMove:R,dragEnd:D,onScroll:B,isSingleClick:x,cancelSelectAllBySingleClick:z,selectFn:g,selectRange:O,isPressing:s,containerEl:d,observer:_}}function ze(n){const t=ce(n),{observer:o,selectRange:l}=t,{onScroll:r,dragStart:i,dragMove:a,dragEnd:u,cancelSelectAllBySingleClick:g}=t,v=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),p=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"absolute z-50 bg-blue-200 opacity-50",style:v.value})}});function d(w){w.button===0&&i(w.x,w.y)}function s(w){a(w.x,w.y)}function c(w){w.composedPath().some(O=>O?.getAttribute?.(n.attribute))||g(),u()}function E(w){try{if(!t.init(w))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!t.containerEl?.value)return!1;e.render(e.h(p),t.containerEl.value),t.containerEl.value?.addEventListener("scroll",r),t.containerEl.value?.addEventListener("mousedown",d),window.addEventListener("mousemove",s),window.addEventListener("mouseup",c)}catch(y){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",y)}}function _(){o.disconnect(),t.containerEl.value?.removeEventListener("scroll",r),t.containerEl.value?.removeEventListener("mousedown",d),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",c)}return{init:E,unMount:_}}function We(n,t,o=600){const l=ce({...n,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:r}=l,{onScroll:i,dragStart:a,dragMove:u,dragEnd:g,selectFn:v}=l;let p;function d(){clearTimeout(p)}function s(y){d(),p=setTimeout(()=>{const{clientX:O,clientY:I}=y.targetTouches[0];a(O,I),t?.(),v.value(),y.preventDefault()},o)}function c(y){d();const{clientX:O,clientY:I}=y.targetTouches[0];u(O,I,()=>y.preventDefault())}function E(){d(),g()}function _(y){try{if(!l.init(y))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!l.containerEl?.value)return!1;l.containerEl.value?.addEventListener("scroll",i),l.containerEl.value?.addEventListener("touchstart",s),l.containerEl.value?.addEventListener("touchmove",c),window.addEventListener("touchcancel",E),window.addEventListener("touchend",E)}catch(O){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",O)}}function w(){r.disconnect(),l.containerEl.value?.removeEventListener("scroll",i),l.containerEl.value?.removeEventListener("touchstart",s),l.containerEl.value?.removeEventListener("touchmove",c),window.removeEventListener("touchcancel",E),window.removeEventListener("touchEnd",E)}return{init:_,unMount:w}}const _e=Symbol(),Ue=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(n,{emit:t}){const o=n,l=()=>{o.closeOnClickOverlay&&t("update:visiable",!1)};return e.provide(_e,()=>t("update:visiable",!1)),(r,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[n.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l,class:"modal"},[e.createElementVNode("div",{onClick:i[0]||(i[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["dialog",n.dialogClass])},[e.renderSlot(r.$slots,"default",{},void 0,!0)],2)])):e.createCommentVNode("",!0)]),_:3}))}}),ct="",ue=(n,t)=>{const o=n.__vccOpts||n;for(const[l,r]of t)o[l]=r;return o},qe=ue(Ue,[["__scopeId","data-v-415900d3"]]);function Qe(n){function t(o,l){const r=document.createElement("div"),i={setup(){return()=>e.h(qe,{visiable:!0,"onUpdate:visiable":()=>{r?.remove()},...n},{default:()=>e.h(o,l)})}};return document.body.appendChild(r),e.render(e.h(i),r),{close:()=>r?.remove()}}return{create:t}}const Ye=e.defineComponent({__name:"Toast",props:{message:null,position:null},setup(n){const t=n,o=e.ref(),l=e.ref(),r=e.ref(),i=e.computed(()=>{switch(t.position){case"top":return 10;case"middle":return 50;case"bottom":return 85}}),a=e.computed(()=>({position:"absolute",borderRadius:"10px",backgroundColor:"rgba(0, 0, 0, 0.8)",padding:"14px 19px",top:`calc(${i.value}% - ${r.value}px)`,left:`calc(50% - ${l.value}px)`})),u=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));return e.nextTick(()=>{l.value=o.value.offsetWidth/2,r.value=o.value.offsetHeight/2}),(g,v)=>(e.openBlock(),e.createElementBlock("div",{id:"toastWrapper",ref_key:"toastWrapper",ref:o,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(u))},[e.createElementVNode("span",null,e.toDisplayString(n.message),1)],4)],4))}}),Te={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500};class Ge{options;container;constructor(t){this.options=t,this.container=document.createElement("div")}present(){const t=e.h(e.h(Ye),{...Te,...this.options});e.render(t,this.container),document.body.insertBefore(this.container,document.body.firstChild);const o=this.options.duration||Te.duration;setTimeout(()=>{this.dismiss()},o)}dismiss(){this.container&&(this.container.querySelector("#toastWrapper")?.classList.add("animate-toastAnimation"),setTimeout(()=>{this.container&&(e.render(null,this.container),document.body.removeChild(this.container))},500))}}const Xe=["xlink:href","fill","color"],Je=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(n){const t=n,o=e.computed(()=>`#${t.prefix}-${t.name}`),l=e.computed(()=>({width:`${t.width??t.height}px`,height:`${t.height??t.width}px`,aspectRatio:t.width&&t.height?void 0:"1/1"}));return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(l))},[e.createElementVNode("use",{"xlink:href":e.unref(o),fill:n.color,color:n.color},null,8,Xe)],4))}});function Ze(n){const{containerEl:t,sliderEl:o,autoHeight:l,performance:r={},maxHeightRatio:i=.9}=n,a=e.ref(!0),u=me(F,100);let g,v="";const p=e.ref(0),d=e.ref(0),s=e.ref(0),c=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),E=e.ref({clientHeight:0}),_=e.computed(()=>!!d.value),w=e.computed(()=>c.value.scrollHeight>c.value.clientHeight),y=e.computed(()=>c.value.clientHeight-E.value.clientHeight),O=e.computed(()=>c.value.scrollHeight-c.value.clientHeight),I=e.computed(()=>Math.max(c.value.clientHeight/c.value.scrollHeight,.05)),U=e.computed(()=>I.value>i?0:I.value*c.value.clientHeight),j=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${s.value}px,0)`,height:l?`${U.value}px`:void 0}));function $(B){P(),d.value=B.clientY-o.value.getBoundingClientRect().top||1,v=getComputedStyle(t.value).scrollBehavior,v==="smooth"&&(t.value.style.scrollBehavior="unset")}function A(){t.value.style.scrollBehavior=v,d.value=0,u()}function P(){a.value=!1}function F(){_.value||(a.value=!0)}function k(B){if(!_.value)return;let x=B.clientY-c.value.top-d.value;x<0?s.value=0:x>=y.value?s.value=y.value:s.value=x,t.value.scrollTo({top:s.value/y.value*O.value})}function L(){_.value||K()}function K(){cancelAnimationFrame(g),g=requestAnimationFrame(q)}function q(){t.value&&(p.value=r.scrollTop?.value??t.value.scrollTop,s.value=p.value/O.value*y.value)}function V(B){let x="addEventListener";B==="add"?x="addEventListener":x="removeEventListener",o.value?.[x]("pointerdown",$,{passive:!0}),window[x]("pointermove",k,{passive:!0}),window[x]("pointerup",A,{passive:!0})}const N=new MutationObserver(B=>{B.map(z=>z.oldValue).join().includes("height")&&h()});function h(){c.value.top=t.value?.getBoundingClientRect().top??0,c.value.scrollHeight=t.value?.scrollHeight??0,c.value.clientHeight=t.value?.clientHeight??0}function S(){P(),setTimeout(()=>{E.value.clientHeight=o.value?.clientHeight??0,F()},150)}function R(B,x,z="dynamic-styles"){let M=document.getElementById(z);M||(M=document.createElement("style"),M.id=z,document.head.appendChild(M));const Y=M.sheet.cssRules,G=Y.length,f=`${B} { ${x} }`;for(let m=0;m<G;m++){const C=Y[m];if(C.selectorText===B&&C.style.cssText===x)return}M.sheet.insertRule(f,G)}function D(){t.value&&o.value?(R(".hide-scrollbar","scrollbar-width: none; -ms-overflow-style: none;"),R(".hide-scrollbar::-webkit-scrollbar","display: none"),t.value.addEventListener("scroll",L,{passive:!0}),V("add"),N.observe(t.value,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),setTimeout(()=>{h()},100),S()):console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:t,sliderEl:o})}return e.watch(p,()=>{P(),u()}),{isScrollEnd:a,isDragSlider:_,offsetTop:s,scrollTop:p,scrollable:w,sliderPos:j,init:D,modifySliderEventListener:V}}const et=(n=>(e.pushScopeId("data-v-edec7292"),n=n(),e.popScopeId(),n))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),tt=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},performance:null},setup(n,{expose:t}){const o=n,l=!!e.useSlots().default,r=e.ref(null),i=e.computed(()=>o.containerEl),a=Ze({containerEl:i,sliderEl:r,autoHeight:l?o.autoHeight:!0,performance:o.performance}),{scrollable:u,isScrollEnd:g,sliderPos:v}=a,p=e.ref(!1),d=o.autoHide?e.computed(()=>p.value||!g.value):e.computed(()=>u.value);e.onMounted(()=>{e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")});function s(){p.value=!0}function c(){p.value=!1}return t({uScrollBarReturn:a}),(E,_)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:r,class:"slider-wrapper",onMouseenter:s,onMouseleave:c,style:e.normalizeStyle(e.unref(v))},[e.renderSlot(E.$slots,"default",{},()=>[et],!0)],36),[[e.vShow,e.unref(d)]])]),_:3}))}}),dt="",nt=ue(tt,[["__scopeId","data-v-edec7292"]]),ot={class:"virtualListWrapper"},lt={inheritAttrs:!1},rt=e.defineComponent({...lt,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10}},emits:["scrollEnd"],setup(n,{expose:t,emit:o}){const l=n,r=we(e.toRef(l,"data"),{itemHeight:p=>l.itemHeight(l.data[p]),overscan:l.overscan,scrollEndHook:()=>{o("scrollEnd")}}),{list:i,containerProps:a,wrapperProps:u,innerProps:g,getItemHeightData:v}=r;return t({vListReturn:r}),(p,d)=>(e.openBlock(),e.createElementBlock("div",ot,[e.createElementVNode("div",e.mergeProps({onScrollPassive:d[0]||(d[0]=(...s)=>e.unref(a).onScroll&&e.unref(a).onScroll(...s)),ref:e.unref(a).ref,class:"virtualList"},p.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(u))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(g))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),({index:s,data:c})=>(e.openBlock(),e.createElementBlock("div",{key:s,style:e.normalizeStyle({height:`${e.unref(v)(s).height}px`,display:"flex"})},[e.renderSlot(p.$slots,"default",{data:c,index:s},void 0,!0)],4))),128))],16)],16)],16)]))}}),ft="",at=ue(rt,[["__scopeId","data-v-4ba97cce"]]);b.ScrollBar=nt,b.SvgIcon=Je,b.ToastCreator=Ge,b.VirtualList=at,b.allSelectedKey=ne,b.closeDialogKey=_e,b.dialogController=Qe,b.isAllSelectedKey=ae,b.isSelectedKey=te,b.selectAllKey=le,b.selectKey=oe,b.toggleAllKey=Z,b.toggleKey=ee,b.unselectAllKey=ie,b.unselectKey=re,b.useDragSelect=ce,b.useDragSelectByMobile=We,b.useDragSelectByPc=ze,b.useSelectable=Ne,b.useSelectableInjectors=Ke,b.useVirtualList=we,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E.ui={},E.Vue))})(this,function(E,e){"use strict";var fe;const pe=typeof window<"u";pe&&((fe=window?.navigator)==null?void 0:fe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Q(n){return typeof n=="function"?n():e.unref(n)}function he(n,t){function o(...l){n(()=>t.apply(this,l),{fn:t,thisArg:this,args:l})}return o}function Be(n,t={}){let o,l;return i=>{const a=Q(n),u=Q(t.maxWait);if(o&&clearTimeout(o),a<=0||u!==void 0&&u<=0)return l&&(clearTimeout(l),l=null),i();u&&!l&&(l=setTimeout(()=>{o&&clearTimeout(o),l=null,i()},u)),o=setTimeout(()=>{l&&clearTimeout(l),l=null,i()},a)}}function Oe(n,t=!0,o=!0){let l=0,r,i=!0;const a=()=>{r&&(clearTimeout(r),r=void 0)};return g=>{const v=Q(n),p=Date.now()-l;if(a(),v<=0)return l=Date.now(),g();p>v&&(o||!i)?(l=Date.now(),g()):t&&(r=setTimeout(()=>{l=Date.now(),i=!0,a(),g()},v)),!o&&!r&&(r=setTimeout(()=>i=!0,v)),i=!1}}function Ce(n){return n}function De(n){return e.getCurrentScope()?(e.onScopeDispose(n),!0):!1}function me(n,t=200,o={}){return he(Be(t,o),n)}function ve(n,t=200,o=!1,l=!0){return he(Oe(t,o,l),n)}function Re(n,t=!0){e.getCurrentInstance()?e.onMounted(n):t?n():e.nextTick(n)}function ge(n){var t;const o=Q(n);return(t=o?.$el)!=null?t:o}const Ie=pe?window:void 0;function Le(n,t=!1){const o=e.ref(),l=()=>o.value=Boolean(n());return l(),Re(l,t),o}const J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Z="__vueuse_ssr_handlers__";J[Z]=J[Z]||{},J[Z];var ye=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,Pe=(n,t)=>{var o={};for(var l in n)He.call(n,l)&&t.indexOf(l)<0&&(o[l]=n[l]);if(n!=null&&ye)for(var l of ye(n))t.indexOf(l)<0&&Ae.call(n,l)&&(o[l]=n[l]);return o};function Me(n,t,o={}){const l=o,{window:r=Ie}=l,i=Pe(l,["window"]);let a;const u=Le(()=>r&&"ResizeObserver"in r),g=()=>{a&&(a.disconnect(),a=void 0)},v=e.watch(()=>ge(n),d=>{g(),u.value&&r&&d&&(a=new ResizeObserver(t),a.observe(d,i))},{immediate:!0,flush:"post"}),p=()=>{g(),v()};return De(p),{isSupported:u,stop:p}}function $e(n,t={width:0,height:0},o={}){const{box:l="content-box"}=o,r=e.ref(t.width),i=e.ref(t.height);return Me(n,([a])=>{const u=l==="border-box"?a.borderBoxSize:l==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;u?(r.value=u.reduce((g,{inlineSize:v})=>g+v,0),i.value=u.reduce((g,{blockSize:v})=>g+v,0)):(r.value=a.contentRect.width,i.value=a.contentRect.height)},o),e.watch(()=>ge(n),a=>{r.value=a?t.width:0,i.value=a?t.height:0}),{width:r,height:i}}var Se;(function(n){n.UP="UP",n.RIGHT="RIGHT",n.DOWN="DOWN",n.LEFT="LEFT",n.NONE="NONE"})(Se||(Se={}));var Fe=Object.defineProperty,be=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,Ee=(n,t,o)=>t in n?Fe(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o,je=(n,t)=>{for(var o in t||(t={}))ke.call(t,o)&&Ee(n,o,t[o]);if(be)for(var o of be(t))Ve.call(t,o)&&Ee(n,o,t[o]);return n};je({linear:Ce},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function _e(n,t){const{scrollEndHook:o,itemHeight:l,overscan:r=5}=t,i=e.ref(null),a=$e(i),u=e.ref(!0),g=me(U,100);let v;const p=e.shallowRef(n),d=e.ref(0),s=e.ref({start:0,end:10});let c=0;const b=e.ref([]),w=e.computed(()=>{let{sum:h,height:S}={sum:0,height:0};return p.value.map((R,D)=>(typeof l=="number"?S=l:S=l(D),h+=S,{height:S,sum:h}))}),_=e.computed(()=>F(s.value.start)),y=e.computed(()=>typeof l=="number"?w.value.length*l:w.value[w.value.length-1]?.sum||0),O=e.computed(()=>{let h=b.value.length-r,S=Math.max(h-c,0);return b.value.slice(S,h)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(v)),e.watch([a.width,a.height,p],([h,S])=>{(h||S)&&j()},{deep:!0}),e.watch(d,()=>{I(),g()});function I(){u.value=!1}function U(){u.value=!0,o?.()}function j(){cancelAnimationFrame(v),v=requestAnimationFrame($)}function $(){if(i.value){d.value=i.value.scrollTop,c=P();let h=H(d.value),S=h+c+r;h=h-r,h=h<0?0:h,S=S>p.value.length?p.value.length:S,s.value={start:h,end:S},b.value=p.value.slice(h,S).map((R,D)=>({data:R,index:D+h}))}}function H(h){let S=0,R=w.value.length-1,D=-1;for(;S<=R;){const B=Math.floor((S+R)/2);w.value[B].sum>=h?(D=B,R=B-1):S=B+1}return Math.max(0,D)}function P(){let h=0,S=0,R=L();for(let D=R;D<w.value.length&&(h++,S+=w.value[D].height,!(S>=a.height.value));D++);return h}function F(h){if(typeof l=="number")return h*l;let S=w.value[h];return S?S.sum-S.height:0}function k(h){return w.value[h]||{sum:0,height:0}}function L(){let h=s.value.start;return h>=r&&(h+=r),h}function K(h){if(i.value){const S=k(h);i.value.scrollTop=S.sum-S.height,$()}}const q=e.computed(()=>({style:{width:"100%",height:`${y.value}px`,pointerEvents:u.value?void 0:"none"}})),V=e.computed(()=>({style:{transform:`translate3d(0, ${_.value}px, 0)`,"will-change":"transform"}})),N={overflowY:"auto"};return{list:b,visiableList:O,getItemHeightData:k,getoffsetTopIndex:H,totalHeight:y,clientHeight:a.height,scrollTo:K,scrollTop:d,isScrollEnd:u,containerProps:{ref:i,onScroll:()=>{j()},style:N},wrapperProps:q,innerProps:V}}const ee=Symbol(),te=Symbol(),ne=Symbol(),oe=Symbol(),le=Symbol(),re=Symbol(),ae=Symbol(),ie=Symbol(),se=Symbol();function Ke(){const{voidFn:n,boolFn:t,boolRef:o,arrayRef:l}={voidFn:c=>{},boolFn:c=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(oe,l),i=e.inject(ne,t),a=e.inject(ie,o),u=e.inject(te,n),g=e.inject(ee,n),v=e.inject(le,n),p=e.inject(re,n),d=e.inject(ae,n),s=e.inject(se,n);return{selected:r,isSelected:i,isAllSelected:a,toggle:u,toggleAll:g,select:v,selectAll:p,unselect:d,unselectAll:s}}function Ne(n,t){const o=e.ref({}),l=e.computed(()=>n.value.filter(s=>o.value[s[t]])),r=e.computed(()=>l.value.length!=0&&Object.keys(o.value).length==n.value.length);function i(){n.value.forEach(s=>{o.value[s[t]]=!0})}function a(){o.value={}}function u(s){s.forEach(c=>{o.value[c[t]]||(o.value[c[t]]=!0)})}function g(s){s.forEach(c=>{o.value[c[t]]&&delete o.value[c[t]]})}function v(s){return!!o.value[s[t]]}function p(s){s.forEach(c=>{v(c)?delete o.value[c[t]]:o.value[c[t]]=!0})}function d(){r.value?a():i()}return e.provide(ee,d),e.provide(te,p),e.provide(ne,v),e.provide(oe,l),e.provide(le,u),e.provide(re,i),e.provide(ae,g),e.provide(ie,r),e.provide(se,a),{selected:l,select:u,selectAll:i,unselect:g,unselectAll:a,toggle:p,toggleAll:d,isSelected:v,isAllSelected:r}}function ce(n){return()=>{console.debug(`\u9ED8\u8BA4${n}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function ue({attribute:n,selectWay:t="colum",scrollOptions:o={},getSelectMap:l=()=>({})}){const{select:r=ce("\u9009\u62E9"),unselect:i=ce("\u53D6\u6D88\u9009\u62E9"),unselectAll:a=ce("\u53D6\u6D88\u5168\u9009")}=l();let u={};const g=e.computed(()=>ve(t==="colum"?M:G,50)),v=new Set,p=e.ref(!0),d=e.ref(),s=e.ref(!1),c=e.ref({x:0,y:0}),b=e.ref({x:0,y:0,scrollTop:0}),w=new ResizeObserver(f=>_.value=f[0].target.getBoundingClientRect()),_=e.ref({}),y=e.ref({top:0,height:0,sync(f=!1){y.value.top=d.value?.scrollTop||0,f&&(y.value.height=d.value?.scrollHeight||0)}}),O=e.computed(()=>s.value?{left:Math.min(c.value.x,b.value.x)-_.value.left,top:Math.min(c.value.y,b.value.y)-_.value.top,width:Math.abs(c.value.x-b.value.x),height:Math.abs(c.value.y-b.value.y)}:{left:0,top:0,width:0,height:0}),{margin:I=50,startSpeed:U=30,maxSpeed:j=30}=o;let $;const H=I,P=U,F=j,k=f=>f**1;let L=0;function K(f){if(cancelAnimationFrame($),L=q(f),L=Math.max(Math.min(L,F),-F),L!==0){const m=d.value;if(!m||!s.value)return;const C=y.value.height-_.value.height;let T=y.value.top+Number(L);T=Math.min(Math.max(0,T),C),m.scrollTop=T,N(),$=requestAnimationFrame(()=>K(f))}}function q(f){if(d.value){const C=_.value,T=C.bottom-f;if(T<H)return P*k(1-T/H);const A=f-C.top;if(A<H)return-P*k(1-A/H)}return 0}function V(f){const m={...O.value,right:0,bottom:0};return m.left+=_.value.left,m.top+=_.value.top-y.value.top,m.right=m.width+m.left,m.bottom=m.height+m.top,m.left<f.right&&m.right>f.left&&m.top<f.bottom&&m.bottom>f.top}function N(){y.value.sync();const{top:f,height:m}=y.value;b.value.y=Math.min(m+_.value.top,b.value.y+f-b.value.scrollTop),b.value.scrollTop=f}function h(f,m,C="dynamic-styles"){let T=document.getElementById(C);T||(T=document.createElement("style"),T.id=C,document.head.appendChild(T));const A=T.sheet.cssRules,W=A.length,st=`${f} { ${m} }`;for(let de=0;de<W;de++){const xe=A[de];if(xe.selectorText===f&&xe.style.cssText===m)return}T.sheet.insertRule(st,W)}function S(f,m){p.value=!0,s.value=!0,y.value.height?y.value.sync():y.value.sync(!0),c.value.x=f,c.value.y=m+y.value.top,b.value.x=c.value.x,b.value.y=c.value.y,d.value?.classList.add("disable-scroll-behavior"),v.clear()}function R(f,m,C){!s.value||(p.value&&t==="colum"&&!x()&&(a(),p.value=!1),C?.(),K(m),b.value.x=Math.max(f,_.value.left),b.value.y=Math.min(m+y.value.top,y.value.height+_.value.top),b.value.scrollTop=y.value.top,g.value())}function D(){s.value=!1,d.value?.classList.remove("disable-scroll-behavior")}function B(){!s.value||(L||N(),g.value())}function x(){if(!s.value)return!1;const{width:f,height:m}=O.value;return!(Math.max(f,m)>5)}function z(){x()&&a()}function M(){x()||d.value?.querySelectorAll(`[${n}]`).forEach(f=>{u[`${n}`]=f.getAttribute(`${n}`),V(f.getBoundingClientRect())?r([u]):i([u])})}function G(){const f=[];let m=null,C=0;d.value?.querySelectorAll(`[${n}]`).forEach((T,A)=>{const W=T.getAttribute(`${n}`);f.push(W),V(T.getBoundingClientRect())?(m===null&&(m=A),m=Math.min(m,A),C=Math.max(C,A)):(u[`${n}`]=W,v.has(W)&&i([u]))});for(let T=m;T<C+1;T++)u[`${n}`]=f[T],r([u]),v.add(f[T])}function X(f){return!f?.value||(d.value=f.value,!d?.value)?!1:(w.observe(d.value),h(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:X,dragStart:S,dragMove:R,dragEnd:D,onScroll:B,isSingleClick:x,cancelSelectAllBySingleClick:z,selectFn:g,selectRange:O,isPressing:s,containerEl:d,observer:w}}function ze(n){const t=ue(n),{observer:o,selectRange:l}=t,{onScroll:r,dragStart:i,dragMove:a,dragEnd:u,cancelSelectAllBySingleClick:g}=t,v=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),p=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"absolute z-50 bg-blue-200 opacity-50",style:v.value})}});function d(_){_.button===0&&i(_.x,_.y)}function s(_){a(_.x,_.y)}function c(_){_.composedPath().some(O=>O?.getAttribute?.(n.attribute))||g(),u()}function b(_){try{if(!t.init(_))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!t.containerEl?.value)return!1;e.render(e.h(p),t.containerEl.value),t.containerEl.value?.addEventListener("scroll",r),t.containerEl.value?.addEventListener("mousedown",d),window.addEventListener("mousemove",s),window.addEventListener("mouseup",c)}catch(y){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",y)}}function w(){o.disconnect(),t.containerEl.value?.removeEventListener("scroll",r),t.containerEl.value?.removeEventListener("mousedown",d),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",c)}return{init:b,unMount:w}}function We(n,t,o=600){const l=ue({...n,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:r}=l,{onScroll:i,dragStart:a,dragMove:u,dragEnd:g,selectFn:v}=l;let p;function d(){clearTimeout(p)}function s(y){d(),p=setTimeout(()=>{const{clientX:O,clientY:I}=y.targetTouches[0];a(O,I),t?.(),v.value(),y.preventDefault()},o)}function c(y){d();const{clientX:O,clientY:I}=y.targetTouches[0];u(O,I,()=>y.preventDefault())}function b(){d(),g()}function w(y){try{if(!l.init(y))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!l.containerEl?.value)return!1;l.containerEl.value?.addEventListener("scroll",i),l.containerEl.value?.addEventListener("touchstart",s),l.containerEl.value?.addEventListener("touchmove",c),window.addEventListener("touchcancel",b),window.addEventListener("touchend",b)}catch(O){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",O)}}function _(){r.disconnect(),l.containerEl.value?.removeEventListener("scroll",i),l.containerEl.value?.removeEventListener("touchstart",s),l.containerEl.value?.removeEventListener("touchmove",c),window.removeEventListener("touchcancel",b),window.removeEventListener("touchEnd",b)}return{init:w,unMount:_}}const we=Symbol(),Ue=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(n,{emit:t}){const o=n,l=()=>{o.closeOnClickOverlay&&t("update:visiable",!1)};return e.provide(we,()=>t("update:visiable",!1)),(r,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[n.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l,class:"modal"},[e.createElementVNode("div",{onClick:i[0]||(i[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["dialog",n.dialogClass])},[e.renderSlot(r.$slots,"default",{},void 0,!0)],2)])):e.createCommentVNode("",!0)]),_:3}))}}),ut="",Y=(n,t)=>{const o=n.__vccOpts||n;for(const[l,r]of t)o[l]=r;return o},qe=Y(Ue,[["__scopeId","data-v-415900d3"]]);function Qe(n){function t(o,l){const r=document.createElement("div"),i={setup(){return()=>e.h(qe,{visiable:!0,"onUpdate:visiable":()=>{r?.remove()},...n},{default:()=>e.h(o,l)})}};return document.body.appendChild(r),e.render(e.h(i),r),{close:()=>r?.remove()}}return{create:t}}const Ye=e.defineComponent({__name:"Toast",props:{message:null,position:null},setup(n){const t=n,o=e.ref(),l=e.ref(),r=e.ref(),i=e.computed(()=>{switch(t.position){case"top":return 10;case"middle":return 50;case"bottom":return 85}}),a=e.computed(()=>({position:"absolute",borderRadius:"10px",backgroundColor:"rgba(0, 0, 0, 0.8)",padding:"14px 19px",top:`calc(${i.value}% - ${r.value}px)`,left:`calc(50% - ${l.value}px)`})),u=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));return e.nextTick(()=>{l.value=o.value.offsetWidth/2,r.value=o.value.offsetHeight/2}),(g,v)=>(e.openBlock(),e.createElementBlock("div",{id:"toastWrapper",ref_key:"toastWrapper",ref:o,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(u))},[e.createElementVNode("span",null,e.toDisplayString(n.message),1)],4)],4))}}),dt="",Ge=Y(Ye,[["__scopeId","data-v-15ab4094"]]),Te={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500};class Xe{options;container;constructor(t){this.options=t,this.container=document.createElement("div")}present(){const t=e.h(e.h(Ge),{...Te,...this.options});e.render(t,this.container),document.body.insertBefore(this.container,document.body.firstChild);const o=this.options.duration||Te.duration;setTimeout(()=>{this.dismiss()},o)}dismiss(){if(this.container){const t=this.container.querySelector("#toastWrapper");t.style.opacity="0",t.style.transition="opacity 0.4s ease-in",setTimeout(()=>{this.container&&(e.render(null,this.container),document.body.removeChild(this.container))},500)}}}const Je=["xlink:href","fill","color"],Ze=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(n){const t=n,o=e.computed(()=>`#${t.prefix}-${t.name}`),l=e.computed(()=>({width:`${t.width??t.height}px`,height:`${t.height??t.width}px`,aspectRatio:t.width&&t.height?void 0:"1/1"}));return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(l))},[e.createElementVNode("use",{"xlink:href":e.unref(o),fill:n.color,color:n.color},null,8,Je)],4))}});function et(n){const{containerEl:t,sliderEl:o,autoHeight:l,performance:r={},maxHeightRatio:i=.9}=n,a=e.ref(!0),u=me(F,100);let g,v="";const p=e.ref(0),d=e.ref(0),s=e.ref(0),c=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),b=e.ref({clientHeight:0}),w=e.computed(()=>!!d.value),_=e.computed(()=>c.value.scrollHeight>c.value.clientHeight),y=e.computed(()=>c.value.clientHeight-b.value.clientHeight),O=e.computed(()=>c.value.scrollHeight-c.value.clientHeight),I=e.computed(()=>Math.max(c.value.clientHeight/c.value.scrollHeight,.05)),U=e.computed(()=>I.value>i?0:I.value*c.value.clientHeight),j=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${s.value}px,0)`,height:l?`${U.value}px`:void 0}));function $(B){P(),d.value=B.clientY-o.value.getBoundingClientRect().top||1,v=getComputedStyle(t.value).scrollBehavior,v==="smooth"&&(t.value.style.scrollBehavior="unset")}function H(){t.value.style.scrollBehavior=v,d.value=0,u()}function P(){a.value=!1}function F(){w.value||(a.value=!0)}function k(B){if(!w.value)return;let x=B.clientY-c.value.top-d.value;x<0?s.value=0:x>=y.value?s.value=y.value:s.value=x,t.value.scrollTo({top:s.value/y.value*O.value})}function L(){w.value||K()}function K(){cancelAnimationFrame(g),g=requestAnimationFrame(q)}function q(){t.value&&(p.value=r.scrollTop?.value??t.value.scrollTop,s.value=p.value/O.value*y.value)}function V(B){let x="addEventListener";B==="add"?x="addEventListener":x="removeEventListener",o.value?.[x]("pointerdown",$,{passive:!0}),window[x]("pointermove",k,{passive:!0}),window[x]("pointerup",H,{passive:!0})}const N=new MutationObserver(B=>{B.map(z=>z.oldValue).join().includes("height")&&h()});function h(){c.value.top=t.value?.getBoundingClientRect().top??0,c.value.scrollHeight=t.value?.scrollHeight??0,c.value.clientHeight=t.value?.clientHeight??0}function S(){P(),setTimeout(()=>{b.value.clientHeight=o.value?.clientHeight??0,F()},150)}function R(B,x,z="dynamic-styles"){let M=document.getElementById(z);M||(M=document.createElement("style"),M.id=z,document.head.appendChild(M));const G=M.sheet.cssRules,X=G.length,f=`${B} { ${x} }`;for(let m=0;m<X;m++){const C=G[m];if(C.selectorText===B&&C.style.cssText===x)return}M.sheet.insertRule(f,X)}function D(){t.value&&o.value?(R(".hide-scrollbar","scrollbar-width: none; -ms-overflow-style: none;"),R(".hide-scrollbar::-webkit-scrollbar","display: none"),t.value.addEventListener("scroll",L,{passive:!0}),V("add"),N.observe(t.value,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),setTimeout(()=>{h()},100),S()):console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:t,sliderEl:o})}return e.watch(p,()=>{P(),u()}),{isScrollEnd:a,isDragSlider:w,offsetTop:s,scrollTop:p,scrollable:_,sliderPos:j,init:D,modifySliderEventListener:V}}const tt=(n=>(e.pushScopeId("data-v-edec7292"),n=n(),e.popScopeId(),n))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),nt=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},performance:null},setup(n,{expose:t}){const o=n,l=!!e.useSlots().default,r=e.ref(null),i=e.computed(()=>o.containerEl),a=et({containerEl:i,sliderEl:r,autoHeight:l?o.autoHeight:!0,performance:o.performance}),{scrollable:u,isScrollEnd:g,sliderPos:v}=a,p=e.ref(!1),d=o.autoHide?e.computed(()=>p.value||!g.value):e.computed(()=>u.value);e.onMounted(()=>{e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")});function s(){p.value=!0}function c(){p.value=!1}return t({uScrollBarReturn:a}),(b,w)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:r,class:"slider-wrapper",onMouseenter:s,onMouseleave:c,style:e.normalizeStyle(e.unref(v))},[e.renderSlot(b.$slots,"default",{},()=>[tt],!0)],36),[[e.vShow,e.unref(d)]])]),_:3}))}}),pt="",ot=Y(nt,[["__scopeId","data-v-edec7292"]]),lt={class:"virtualListWrapper"},rt={inheritAttrs:!1},at=e.defineComponent({...rt,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10}},emits:["scrollEnd"],setup(n,{expose:t,emit:o}){const l=n,r=_e(e.toRef(l,"data"),{itemHeight:p=>l.itemHeight(l.data[p]),overscan:l.overscan,scrollEndHook:()=>{o("scrollEnd")}}),{list:i,containerProps:a,wrapperProps:u,innerProps:g,getItemHeightData:v}=r;return t({vListReturn:r}),(p,d)=>(e.openBlock(),e.createElementBlock("div",lt,[e.createElementVNode("div",e.mergeProps({onScrollPassive:d[0]||(d[0]=(...s)=>e.unref(a).onScroll&&e.unref(a).onScroll(...s)),ref:e.unref(a).ref,class:"virtualList"},p.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(u))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(g))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),({index:s,data:c})=>(e.openBlock(),e.createElementBlock("div",{key:s,style:e.normalizeStyle({height:`${e.unref(v)(s).height}px`,display:"flex"})},[e.renderSlot(p.$slots,"default",{data:c,index:s},void 0,!0)],4))),128))],16)],16)],16)]))}}),ht="",it=Y(at,[["__scopeId","data-v-4ba97cce"]]);E.ScrollBar=ot,E.SvgIcon=Ze,E.ToastCreator=Xe,E.VirtualList=it,E.allSelectedKey=oe,E.closeDialogKey=we,E.dialogController=Qe,E.isAllSelectedKey=ie,E.isSelectedKey=ne,E.selectAllKey=re,E.selectKey=le,E.toggleAllKey=ee,E.toggleKey=te,E.unselectAllKey=se,E.unselectKey=ae,E.useDragSelect=ue,E.useDragSelectByMobile=We,E.useDragSelectByPc=ze,E.useSelectable=Ne,E.useSelectableInjectors=Ke,E.useVirtualList=_e,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .modal[data-v-415900d3]{position:absolute;inset:0;display:flex;z-index:999;background-color:#1c191780}.dialog[data-v-415900d3]{margin:auto;display:flex;flex-direction:column}.v-leave-active[data-v-edec7292]{transition:all .15s ease-out;transition-delay:.9s}.v-leave-to[data-v-edec7292]{opacity:0}.slider-wrapper[data-v-edec7292]{z-index:100;position:absolute;right:0;touch-action:none}.default-slider[data-v-edec7292]{width:6px;height:100%;background-color:#0003;border-radius:3px;margin-right:3px}.virtualList[data-v-4ba97cce]{width:100%;height:100%;position:absolute;overflow-y:auto;scroll-behavior:smooth;user-select:none}.virtualListWrapper[data-v-4ba97cce]{width:100%;height:100%;position:relative}
1
+ .modal[data-v-415900d3]{position:absolute;inset:0;display:flex;z-index:999;background-color:#1c191780}.dialog[data-v-415900d3]{margin:auto;display:flex;flex-direction:column}@keyframes slide-15ab4094{0%{opacity:1}to{opacity:0}}.animate-toastAnimation[data-v-15ab4094]{animation:slide-15ab4094 .3s linear}.v-leave-active[data-v-edec7292]{transition:all .15s ease-out;transition-delay:.9s}.v-leave-to[data-v-edec7292]{opacity:0}.slider-wrapper[data-v-edec7292]{z-index:100;position:absolute;right:0;touch-action:none}.default-slider[data-v-edec7292]{width:6px;height:100%;background-color:#0003;border-radius:3px;margin-right:3px}.virtualList[data-v-4ba97cce]{width:100%;height:100%;position:absolute;overflow-y:auto;scroll-behavior:smooth;user-select:none}.virtualListWrapper[data-v-4ba97cce]{width:100%;height:100%;position:relative}
@@ -27,8 +27,8 @@ declare const _default: {
27
27
  $slots: Readonly<{
28
28
  [name: string]: import("vue").Slot | undefined;
29
29
  }>;
30
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
31
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
30
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
31
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
32
32
  $emit: (event: "update:visiable", ...args: any[]) => void;
33
33
  $el: any;
34
34
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DialogProps>, {
@@ -41,7 +41,7 @@ declare const _default: {
41
41
  visiable: boolean;
42
42
  closeOnClickOverlay: boolean;
43
43
  dialogClass: string | object | string[];
44
- }, {}, string> & {
44
+ }> & {
45
45
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
46
46
  created?: ((() => void) | (() => void)[]) | undefined;
47
47
  beforeMount?: ((() => void) | (() => void)[]) | undefined;
@@ -56,18 +56,18 @@ declare const _default: {
56
56
  unmounted?: ((() => void) | (() => void)[]) | undefined;
57
57
  renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
58
58
  renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
59
- errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
59
+ errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
60
60
  };
61
61
  $forceUpdate: () => void;
62
62
  $nextTick: typeof import("vue").nextTick;
63
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
63
+ $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
64
64
  } & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DialogProps>, {
65
65
  visiable: boolean;
66
66
  closeOnClickOverlay: boolean;
67
67
  dialogClass: string;
68
68
  }>>> & {
69
69
  "onUpdate:visiable"?: ((...args: any[]) => any) | undefined;
70
- } & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
70
+ } & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
71
71
  __isFragment?: undefined;
72
72
  __isTeleport?: undefined;
73
73
  __isSuspense?: undefined;
@@ -81,14 +81,14 @@ declare const _default: {
81
81
  visiable: boolean;
82
82
  closeOnClickOverlay: boolean;
83
83
  dialogClass: string | object | string[];
84
- }, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
84
+ }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
85
85
  $slots: {
86
86
  default: (_: {}) => any;
87
87
  };
88
88
  });
89
89
  export default _default;
90
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
91
- type __VLS_TypePropsToRuntimeProps<T> = {
90
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
91
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
92
92
  [K in keyof T]-?: {} extends Pick<T, K> ? {
93
93
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
94
94
  } : {
@@ -96,7 +96,7 @@ type __VLS_TypePropsToRuntimeProps<T> = {
96
96
  required: true;
97
97
  };
98
98
  };
99
- type __VLS_WithDefaults<P, D> = {
99
+ declare type __VLS_WithDefaults<P, D> = {
100
100
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
101
101
  default: D[K];
102
102
  } : P[K];
@@ -9,7 +9,7 @@ interface Constructor<P = any> {
9
9
  $props: P;
10
10
  };
11
11
  }
12
- type DialogControllerOptions = Omit<DialogProps, "visiable">;
12
+ declare type DialogControllerOptions = Omit<DialogProps, "visiable">;
13
13
  export declare function dialogController(dialogProps?: DialogControllerOptions): {
14
14
  create: <P>(component: Constructor<P>, componentProps?: (VNodeProps & P) | undefined) => {
15
15
  close: () => void;
@@ -21,8 +21,8 @@ declare const _default: {
21
21
  $slots: Readonly<{
22
22
  [name: string]: import("vue").Slot | undefined;
23
23
  }>;
24
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
25
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
24
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
25
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
26
26
  $emit: (event: string, ...args: any[]) => void;
27
27
  $el: any;
28
28
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>>, {
@@ -36,7 +36,7 @@ declare const _default: {
36
36
  init: () => void;
37
37
  modifySliderEventListener: (action: "add" | "remove") => void;
38
38
  };
39
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & {
39
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}> & {
40
40
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
41
41
  created?: ((() => void) | (() => void)[]) | undefined;
42
42
  beforeMount?: ((() => void) | (() => void)[]) | undefined;
@@ -51,11 +51,11 @@ declare const _default: {
51
51
  unmounted?: ((() => void) | (() => void)[]) | undefined;
52
52
  renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
53
53
  renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
54
- errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
54
+ errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
55
55
  };
56
56
  $forceUpdate: () => void;
57
57
  $nextTick: typeof nextTick;
58
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
58
+ $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
59
59
  } & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>> & import("vue").ShallowUnwrapRef<{
60
60
  uScrollBarReturn: {
61
61
  isScrollEnd: Ref<boolean>;
@@ -67,7 +67,7 @@ declare const _default: {
67
67
  init: () => void;
68
68
  modifySliderEventListener: (action: "add" | "remove") => void;
69
69
  };
70
- }> & {} & import("vue").ComponentCustomProperties & {};
70
+ }> & {} & import("vue").ComponentCustomProperties;
71
71
  __isFragment?: undefined;
72
72
  __isTeleport?: undefined;
73
73
  __isSuspense?: undefined;
@@ -82,14 +82,14 @@ declare const _default: {
82
82
  init: () => void;
83
83
  modifySliderEventListener: (action: "add" | "remove") => void;
84
84
  };
85
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
85
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
86
86
  $slots: {
87
87
  default: (_: {}) => any;
88
88
  };
89
89
  });
90
90
  export default _default;
91
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
92
- type __VLS_TypePropsToRuntimeProps<T> = {
91
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
92
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
93
93
  [K in keyof T]-?: {} extends Pick<T, K> ? {
94
94
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
95
95
  } : {
@@ -97,7 +97,7 @@ type __VLS_TypePropsToRuntimeProps<T> = {
97
97
  required: true;
98
98
  };
99
99
  };
100
- type __VLS_WithDefaults<P, D> = {
100
+ declare type __VLS_WithDefaults<P, D> = {
101
101
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
102
102
  default: D[K];
103
103
  } : P[K];
@@ -1,5 +1,5 @@
1
1
  import type { Ref } from "vue";
2
- export type ScrollBarOptions = {
2
+ export declare type ScrollBarOptions = {
3
3
  containerEl: Ref<HTMLElement | null>;
4
4
  sliderEl: Ref<HTMLElement | null>;
5
5
  autoHeight?: boolean;
@@ -21,8 +21,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
21
21
  color: string;
22
22
  }>;
23
23
  export default _default;
24
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
- type __VLS_TypePropsToRuntimeProps<T> = {
24
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
26
26
  [K in keyof T]-?: {} extends Pick<T, K> ? {
27
27
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
28
28
  } : {
@@ -30,7 +30,7 @@ type __VLS_TypePropsToRuntimeProps<T> = {
30
30
  required: true;
31
31
  };
32
32
  };
33
- type __VLS_WithDefaults<P, D> = {
33
+ declare type __VLS_WithDefaults<P, D> = {
34
34
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
35
35
  default: D[K];
36
36
  } : P[K];
@@ -6,8 +6,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
6
6
  position: "top" | "middle" | "bottom";
7
7
  }>>>, {}>;
8
8
  export default _default;
9
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
- type __VLS_TypePropsToRuntimeProps<T> = {
9
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
11
11
  [K in keyof T]-?: {} extends Pick<T, K> ? {
12
12
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
13
13
  } : {
@@ -13,7 +13,7 @@ interface DragOptions {
13
13
  unselectAll?: () => void;
14
14
  };
15
15
  }
16
- type ContainsRefType = Ref<HTMLElement | null | undefined>;
16
+ declare type ContainsRefType = Ref<HTMLElement | null | undefined>;
17
17
  export declare function useDragSelect({ attribute, selectWay, scrollOptions, getSelectMap, }: DragOptions): {
18
18
  init: (_containerEl: ContainsRefType) => boolean;
19
19
  dragStart: (x: number, y: number) => void;
@@ -22,8 +22,8 @@ declare const _default: {
22
22
  $slots: Readonly<{
23
23
  [name: string]: import("vue").Slot | undefined;
24
24
  }>;
25
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
26
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
25
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
26
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
27
27
  $emit: (event: "scrollEnd") => void;
28
28
  $el: any;
29
29
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -67,7 +67,7 @@ declare const _default: {
67
67
  scrollEnd: () => void;
68
68
  }, string, {
69
69
  overscan: number;
70
- }, {}, string> & {
70
+ }> & {
71
71
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
72
72
  created?: ((() => void) | (() => void)[]) | undefined;
73
73
  beforeMount?: ((() => void) | (() => void)[]) | undefined;
@@ -82,11 +82,11 @@ declare const _default: {
82
82
  unmounted?: ((() => void) | (() => void)[]) | undefined;
83
83
  renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
84
84
  renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
85
- errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
85
+ errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
86
86
  };
87
87
  $forceUpdate: () => void;
88
88
  $nextTick: typeof import("vue").nextTick;
89
- $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
89
+ $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
90
90
  } & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
91
91
  data: any[];
92
92
  itemHeight: (d: any) => number;
@@ -124,7 +124,7 @@ declare const _default: {
124
124
  };
125
125
  }>;
126
126
  };
127
- }> & {} & import("vue").ComponentCustomProperties & {};
127
+ }> & {} & import("vue").ComponentCustomProperties;
128
128
  __isFragment?: undefined;
129
129
  __isTeleport?: undefined;
130
130
  __isSuspense?: undefined;
@@ -169,7 +169,7 @@ declare const _default: {
169
169
  scrollEnd: () => void;
170
170
  }, string, {
171
171
  overscan: number;
172
- }, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
172
+ }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
173
173
  $slots: {
174
174
  default: (_: {
175
175
  data: any;
@@ -178,8 +178,8 @@ declare const _default: {
178
178
  };
179
179
  });
180
180
  export default _default;
181
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
182
- type __VLS_TypePropsToRuntimeProps<T> = {
181
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
182
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
183
183
  [K in keyof T]-?: {} extends Pick<T, K> ? {
184
184
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
185
185
  } : {
@@ -187,7 +187,7 @@ type __VLS_TypePropsToRuntimeProps<T> = {
187
187
  required: true;
188
188
  };
189
189
  };
190
- type __VLS_WithDefaults<P, D> = {
190
+ declare type __VLS_WithDefaults<P, D> = {
191
191
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
192
192
  default: D[K];
193
193
  } : P[K];
@@ -46,4 +46,4 @@ export declare function useVirtualList<T = any>(list: Ref<T[]>, options: UseVirt
46
46
  };
47
47
  }>;
48
48
  };
49
- export type UseVirtualListReturn = ReturnType<typeof useVirtualList>;
49
+ export declare type UseVirtualListReturn = ReturnType<typeof useVirtualList>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazycatcloud/lzc-toolkit",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "description": "lazycat ui toolkits",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",
@@ -32,4 +32,4 @@
32
32
  "vue": "^3.2.39",
33
33
  "vue-tsc": "^0.40.13"
34
34
  }
35
- }
35
+ }