@lazycatcloud/lzc-toolkit 0.0.17 → 0.0.18

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,65 +1,65 @@
1
- import { unref as m, getCurrentScope as ie, onScopeDispose as ce, getCurrentInstance as ue, onMounted as U, nextTick as de, ref as _, watch as $, shallowRef as fe, onUnmounted as ve, computed as w, inject as y, provide as b, defineComponent as R, openBlock as x, createBlock as pe, Transition as he, withCtx as ge, createElementBlock as I, createElementVNode as P, withModifiers as me, normalizeClass as be, renderSlot as D, createCommentVNode as ye, render as _e, h as E, normalizeStyle as T, toRef as we, normalizeProps as K, guardReactiveProps as j, Fragment as Oe, renderList as Se } from "vue";
1
+ import { unref as b, getCurrentScope as ce, onScopeDispose as ue, getCurrentInstance as de, onMounted as U, nextTick as fe, ref as _, watch as R, shallowRef as ve, onUnmounted as pe, computed as w, inject as y, provide as m, defineComponent as K, openBlock as x, createBlock as he, Transition as ge, withCtx as me, createElementBlock as I, createElementVNode as P, withModifiers as be, normalizeClass as ye, renderSlot as D, createCommentVNode as _e, render as we, h as A, normalizeStyle as T, toRef as Oe, normalizeProps as H, guardReactiveProps as j, Fragment as Se, renderList as xe } from "vue";
2
2
  var F;
3
3
  const C = typeof window < "u";
4
4
  C && ((F = window?.navigator) == null ? void 0 : F.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
5
- function xe(e) {
6
- return typeof e == "function" ? e() : m(e);
7
- }
8
5
  function Ie(e) {
9
- return e;
6
+ return typeof e == "function" ? e() : b(e);
10
7
  }
11
8
  function Ce(e) {
12
- return ie() ? (ce(e), !0) : !1;
9
+ return e;
10
+ }
11
+ function Pe(e) {
12
+ return ce() ? (ue(e), !0) : !1;
13
13
  }
14
- function Pe(e, t = !0) {
15
- ue() ? U(e) : t ? e() : de(e);
14
+ function Ee(e, t = !0) {
15
+ de() ? U(e) : t ? e() : fe(e);
16
16
  }
17
17
  function W(e) {
18
18
  var t;
19
- const n = xe(e);
19
+ const n = Ie(e);
20
20
  return (t = n?.$el) != null ? t : n;
21
21
  }
22
- const Ee = C ? window : void 0;
22
+ const Ae = C ? window : void 0;
23
23
  C && window.document;
24
24
  C && window.navigator;
25
25
  C && window.location;
26
26
  function Te(e, t = !1) {
27
27
  const n = _(), o = () => n.value = Boolean(e());
28
- return o(), Pe(o, t), n;
28
+ return o(), Ee(o, t), n;
29
29
  }
30
- const A = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, B = "__vueuse_ssr_handlers__";
31
- A[B] = A[B] || {};
32
- A[B];
33
- var N = Object.getOwnPropertySymbols, Ae = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable, $e = (e, t) => {
30
+ const B = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, $ = "__vueuse_ssr_handlers__";
31
+ B[$] = B[$] || {};
32
+ B[$];
33
+ var N = Object.getOwnPropertySymbols, Be = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable, Re = (e, t) => {
34
34
  var n = {};
35
35
  for (var o in e)
36
- Ae.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
36
+ Be.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
37
37
  if (e != null && N)
38
38
  for (var o of N(e))
39
- t.indexOf(o) < 0 && Be.call(e, o) && (n[o] = e[o]);
39
+ t.indexOf(o) < 0 && $e.call(e, o) && (n[o] = e[o]);
40
40
  return n;
41
41
  };
42
- function Re(e, t, n = {}) {
43
- const o = n, { window: s = Ee } = o, a = $e(o, ["window"]);
42
+ function Ke(e, t, n = {}) {
43
+ const o = n, { window: s = Ae } = o, a = Re(o, ["window"]);
44
44
  let l;
45
45
  const i = Te(() => s && "ResizeObserver" in s), r = () => {
46
46
  l && (l.disconnect(), l = void 0);
47
- }, u = $(() => W(e), (S) => {
47
+ }, u = R(() => W(e), (S) => {
48
48
  r(), i.value && s && S && (l = new ResizeObserver(t), l.observe(S, a));
49
49
  }, { immediate: !0, flush: "post" }), O = () => {
50
50
  r(), u();
51
51
  };
52
- return Ce(O), {
52
+ return Pe(O), {
53
53
  isSupported: i,
54
54
  stop: O
55
55
  };
56
56
  }
57
57
  function ke(e, t = { width: 0, height: 0 }, n = {}) {
58
58
  const { box: o = "content-box" } = n, s = _(t.width), a = _(t.height);
59
- return Re(e, ([l]) => {
59
+ return Ke(e, ([l]) => {
60
60
  const i = o === "border-box" ? l.borderBoxSize : o === "content-box" ? l.contentBoxSize : l.devicePixelContentBoxSize;
61
61
  i ? (s.value = i.reduce((r, { inlineSize: u }) => r + u, 0), a.value = i.reduce((r, { blockSize: u }) => r + u, 0)) : (s.value = l.contentRect.width, a.value = l.contentRect.height);
62
- }, n), $(() => W(e), (l) => {
62
+ }, n), R(() => W(e), (l) => {
63
63
  s.value = l ? t.width : 0, a.value = l ? t.height : 0;
64
64
  }), {
65
65
  width: s,
@@ -70,15 +70,15 @@ var Q;
70
70
  (function(e) {
71
71
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
72
72
  })(Q || (Q = {}));
73
- var ze = Object.defineProperty, L = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Ke = Object.prototype.propertyIsEnumerable, V = (e, t, n) => t in e ? ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, je = (e, t) => {
73
+ var ze = Object.defineProperty, L = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, je = Object.prototype.propertyIsEnumerable, V = (e, t, n) => t in e ? ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Fe = (e, t) => {
74
74
  for (var n in t || (t = {}))
75
75
  He.call(t, n) && V(e, n, t[n]);
76
76
  if (L)
77
77
  for (var n of L(t))
78
- Ke.call(t, n) && V(e, n, t[n]);
78
+ je.call(t, n) && V(e, n, t[n]);
79
79
  return e;
80
80
  };
81
- const Fe = {
81
+ const Ne = {
82
82
  easeInSine: [0.12, 0, 0.39, 0],
83
83
  easeOutSine: [0.61, 1, 0.88, 1],
84
84
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -104,26 +104,30 @@ const Fe = {
104
104
  easeOutBack: [0.34, 1.56, 0.64, 1],
105
105
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
106
106
  };
107
- je({
108
- linear: Ie
109
- }, Fe);
110
- function Ne(e, t) {
111
- const n = _(), o = ke(n), s = _([]), a = _(0), l = fe(e), i = _({ start: 0, end: 10 }), { itemHeight: r, overscan: u = 5 } = t, O = (c) => {
112
- const { start: h = 0 } = i.value;
107
+ Fe({
108
+ linear: Ce
109
+ }, Ne);
110
+ function Qe(e, t) {
111
+ const n = _(), o = ke(n), s = _([]), a = _(0), l = ve(e), i = _({ start: 0, end: 10 }), { itemHeight: r, overscan: u = 5 } = t, O = (c) => {
112
+ const { start: g = 0 } = i.value;
113
113
  let v = 0, p = 0;
114
- for (let g = h; g < l.value.length; g++)
115
- if (v += r(g), v >= c) {
116
- p = g;
114
+ for (let h = g; h < l.value.length; h++) {
115
+ const E = r(h);
116
+ if (v += E, v >= c) {
117
+ p = h;
117
118
  break;
118
119
  }
119
- return p - h;
120
+ }
121
+ return p - g;
120
122
  }, S = (c) => {
121
- let h = 0, v = 0;
122
- for (let p = 0; p < l.value.length; p++)
123
- if (h += r(p), h >= c) {
123
+ let g = 0, v = 0;
124
+ for (let p = 0; p < l.value.length; p++) {
125
+ const h = r(p);
126
+ if (g += h, g >= c) {
124
127
  v = p;
125
128
  break;
126
129
  }
130
+ }
127
131
  return v;
128
132
  };
129
133
  let d;
@@ -132,71 +136,72 @@ function Ne(e, t) {
132
136
  }, k = () => {
133
137
  const c = n.value;
134
138
  if (c) {
135
- const h = S(c.scrollTop), v = O(c.clientHeight), p = h - u, g = h + v + u;
139
+ const g = S(c.scrollTop), v = O(c.clientHeight), p = g - u, h = g + v + u;
136
140
  i.value = {
137
141
  start: p < 0 ? 0 : p,
138
- end: g > l.value.length ? l.value.length : g
139
- }, s.value = l.value.slice(i.value.start, i.value.end).map((H, ae) => ({
140
- data: H,
141
- index: ae + i.value.start
142
+ end: h > l.value.length ? l.value.length : h
143
+ }, s.value = l.value.slice(i.value.start, i.value.end).map((E, ie) => ({
144
+ data: E,
145
+ index: ie + i.value.start
142
146
  }));
143
147
  }
144
148
  };
145
149
  U(() => {
146
- }), ve(() => {
150
+ }), pe(() => {
147
151
  cancelAnimationFrame(d);
148
- }), $(
152
+ }), R(
149
153
  [o.width, o.height, l],
150
154
  () => {
151
155
  f();
152
156
  },
153
157
  { deep: !0 }
154
158
  );
155
- const z = w(() => typeof r == "number" ? l.value.length * r : l.value.reduce((c, h, v) => c + r(v), 0)), te = (c) => typeof r == "number" ? c * r : l.value.slice(0, c).reduce((v, p, g) => v + r(g), 0), ne = (c) => {
159
+ const z = w(() => typeof r == "number" ? l.value.length * r : l.value.reduce((c, g, v) => c + r(v), 0)), ne = (c) => typeof r == "number" ? c * r : l.value.slice(0, c).reduce((v, p, h) => v + r(h), 0), oe = (c) => {
156
160
  n.value && (n.value.scrollTop = c, k());
157
- }, oe = w(() => te(i.value.start)), le = w(() => ({
161
+ }, le = w(() => ne(i.value.start)), se = w(() => ({
158
162
  style: {
159
163
  width: "100%",
160
164
  height: `${z.value}px`
161
165
  }
162
- })), se = w(() => ({
166
+ })), re = w(() => ({
163
167
  style: {
164
- transform: `translate3d(0, ${oe.value}px, 0)`,
168
+ transform: `translate3d(0, ${le.value}px, 0)`,
165
169
  "will-change": "transform"
166
170
  }
167
- })), re = { overflowY: "auto" };
171
+ })), ae = { overflowY: "auto" };
168
172
  return {
169
173
  list: s,
170
174
  totalHeight: z,
171
175
  clientHeight: o.height,
172
- scrollTo: ne,
176
+ scrollTo: oe,
173
177
  scrollTop: a,
174
178
  containerProps: {
175
179
  ref: n,
176
180
  onScroll: (c) => {
177
181
  c.target && (a.value = c.target.scrollTop), f();
178
182
  },
179
- style: re
183
+ style: ae
180
184
  },
181
- wrapperProps: le,
182
- innerProps: se
185
+ wrapperProps: se,
186
+ innerProps: re
183
187
  };
184
188
  }
185
- const M = Symbol(), q = Symbol(), G = Symbol(), Y = Symbol(), J = Symbol(), X = Symbol(), Z = Symbol(), ee = Symbol();
186
- function Me() {
187
- const e = y(M), t = y(q), n = y(G), o = y(Y), s = y(J), a = y(X), l = y(Z), i = y(ee);
189
+ const M = Symbol(), q = Symbol(), G = Symbol(), Y = Symbol(), J = Symbol(), X = Symbol(), Z = Symbol(), ee = Symbol(), te = Symbol();
190
+ function qe() {
191
+ const e = y(M), t = y(q), n = y(G), o = y(Y), s = y(J), a = y(Z), l = y(ee), i = y(te), r = y(X);
188
192
  return {
189
193
  toggleAll: e,
190
194
  toggle: t,
191
195
  isSelected: n,
196
+ isAllSelected: l,
192
197
  selected: o,
193
198
  select: s,
194
199
  unselect: a,
195
- isAllSelected: l,
200
+ selectAll: r,
196
201
  unselectAll: i
197
202
  };
198
203
  }
199
- function qe(e, t) {
204
+ function Ge(e, t) {
200
205
  const n = _({}), o = w(() => e.value.filter((d) => n.value[d[t]])), s = w(() => o.value.length != 0 && Object.keys(n.value).length == e.value.length);
201
206
  function a() {
202
207
  e.value.forEach((d) => {
@@ -227,7 +232,7 @@ function qe(e, t) {
227
232
  function S() {
228
233
  s.value ? l() : a();
229
234
  }
230
- return b(M, S), b(q, O), b(G, u), b(Y, o), b(J, i), b(X, r), b(Z, s), b(ee, l), {
235
+ return m(M, S), m(q, O), m(G, u), m(Y, o), m(J, i), m(Z, r), m(ee, s), m(te, l), m(X, a), {
231
236
  selected: o,
232
237
  select: i,
233
238
  selectAll: a,
@@ -239,7 +244,7 @@ function qe(e, t) {
239
244
  isAllSelected: s
240
245
  };
241
246
  }
242
- const Qe = Symbol(), Le = /* @__PURE__ */ R({
247
+ const Le = Symbol(), Ve = /* @__PURE__ */ K({
243
248
  __name: "Dialog",
244
249
  props: {
245
250
  visiable: { type: Boolean, default: !1 },
@@ -251,32 +256,32 @@ const Qe = Symbol(), Le = /* @__PURE__ */ R({
251
256
  const n = e, o = () => {
252
257
  n.closeOnClickOverlay && t("update:visiable", !1);
253
258
  };
254
- return b(Qe, () => t("update:visiable", !1)), (s, a) => (x(), pe(he, { name: "modal" }, {
255
- default: ge(() => [
259
+ return m(Le, () => t("update:visiable", !1)), (s, a) => (x(), he(ge, { name: "modal" }, {
260
+ default: me(() => [
256
261
  e.visiable ? (x(), I("div", {
257
262
  key: 0,
258
263
  onClick: o,
259
264
  class: "modal absolute inset-0 bottom-0 z-50 flex bg-stone-900 bg-opacity-50"
260
265
  }, [
261
266
  P("div", {
262
- onClick: a[0] || (a[0] = me(() => {
267
+ onClick: a[0] || (a[0] = be(() => {
263
268
  }, ["stop"])),
264
- class: be(["dialog m-auto flex flex-col", e.dialogClass])
269
+ class: ye(["dialog m-auto flex flex-col", e.dialogClass])
265
270
  }, [
266
271
  D(s.$slots, "default")
267
272
  ], 2)
268
- ])) : ye("", !0)
273
+ ])) : _e("", !0)
269
274
  ]),
270
275
  _: 3
271
276
  }));
272
277
  }
273
278
  });
274
- function Ge(e) {
279
+ function Ye(e) {
275
280
  function t(n, o) {
276
281
  const s = document.createElement("div"), a = {
277
282
  setup() {
278
- return () => E(
279
- Le,
283
+ return () => A(
284
+ Ve,
280
285
  {
281
286
  visiable: !0,
282
287
  "onUpdate:visiable": () => {
@@ -285,12 +290,12 @@ function Ge(e) {
285
290
  ...e
286
291
  },
287
292
  {
288
- default: () => E(n, o)
293
+ default: () => A(n, o)
289
294
  }
290
295
  );
291
296
  }
292
297
  };
293
- return document.body.appendChild(s), _e(E(a), s), {
298
+ return document.body.appendChild(s), we(A(a), s), {
294
299
  close: () => s?.remove()
295
300
  };
296
301
  }
@@ -298,7 +303,7 @@ function Ge(e) {
298
303
  create: t
299
304
  };
300
305
  }
301
- const Ve = ["xlink:href", "fill", "color"], Ye = /* @__PURE__ */ R({
306
+ const Ue = ["xlink:href", "fill", "color"], Je = /* @__PURE__ */ K({
302
307
  __name: "SvgIcon",
303
308
  props: {
304
309
  prefix: { default: "icon" },
@@ -314,38 +319,38 @@ const Ve = ["xlink:href", "fill", "color"], Ye = /* @__PURE__ */ R({
314
319
  }));
315
320
  return (s, a) => (x(), I("svg", {
316
321
  "aria-hidden": "",
317
- style: T(m(o))
322
+ style: T(b(o))
318
323
  }, [
319
324
  P("use", {
320
- "xlink:href": m(n),
325
+ "xlink:href": b(n),
321
326
  fill: e.color,
322
327
  color: e.color
323
- }, null, 8, Ve)
328
+ }, null, 8, Ue)
324
329
  ], 4));
325
330
  }
326
- }), Ue = /* @__PURE__ */ R({
331
+ }), De = /* @__PURE__ */ K({
327
332
  __name: "VirtualList",
328
333
  props: {
329
334
  data: null,
330
335
  itemHeight: null
331
336
  },
332
337
  setup(e) {
333
- const t = e, { list: n, containerProps: o, wrapperProps: s, innerProps: a } = Ne(
334
- we(t, "data"),
338
+ const t = e, { list: n, containerProps: o, wrapperProps: s, innerProps: a } = Qe(
339
+ Oe(t, "data"),
335
340
  {
336
341
  itemHeight: (l) => t.itemHeight(0),
337
342
  overscan: 10
338
343
  }
339
344
  );
340
345
  return (l, i) => (x(), I("div", {
341
- ref: m(o).ref,
342
- onScrollPassive: i[0] || (i[0] = (...r) => m(o).onScroll && m(o).onScroll(...r)),
346
+ ref: b(o).ref,
347
+ onScrollPassive: i[0] || (i[0] = (...r) => b(o).onScroll && b(o).onScroll(...r)),
343
348
  class: "hiddenScorllBar-firefox hiddenScorllBar h-full overflow-hidden",
344
- style: T(m(o).style)
349
+ style: T(b(o).style)
345
350
  }, [
346
- P("div", K(j(m(s))), [
347
- P("div", K(j(m(a))), [
348
- (x(!0), I(Oe, null, Se(m(n), ({ index: r, data: u }) => (x(), I("div", {
351
+ P("div", H(j(b(s))), [
352
+ P("div", H(j(b(a))), [
353
+ (x(!0), I(Se, null, xe(b(n), ({ index: r, data: u }) => (x(), I("div", {
349
354
  key: r,
350
355
  style: T({
351
356
  height: `${e.itemHeight(u)}px`,
@@ -362,26 +367,27 @@ const Ve = ["xlink:href", "fill", "color"], Ye = /* @__PURE__ */ R({
362
367
  ], 36));
363
368
  }
364
369
  });
365
- const De = (e, t) => {
370
+ const We = (e, t) => {
366
371
  const n = e.__vccOpts || e;
367
372
  for (const [o, s] of t)
368
373
  n[o] = s;
369
374
  return n;
370
- }, Je = /* @__PURE__ */ De(Ue, [["__scopeId", "data-v-b9b7f6cb"]]);
375
+ }, Xe = /* @__PURE__ */ We(De, [["__scopeId", "data-v-b9b7f6cb"]]);
371
376
  export {
372
- Ye as SvgIcon,
373
- Je as VirtualList,
377
+ Je as SvgIcon,
378
+ Xe as VirtualList,
374
379
  Y as allSelectedKey,
375
- Qe as closeDialogKey,
376
- Ge as dialogController,
377
- Z as isAllSelectedKey,
380
+ Le as closeDialogKey,
381
+ Ye as dialogController,
382
+ ee as isAllSelectedKey,
378
383
  G as isSelectedKey,
384
+ X as selectAllKey,
379
385
  J as selectKey,
380
386
  M as toggleAllKey,
381
387
  q as toggleKey,
382
- ee as unselectAllKey,
383
- X as unselectKey,
384
- qe as useSelectable,
385
- Me as useSelectableInjectors,
386
- Ne as useVirtualList
388
+ te as unselectAllKey,
389
+ Z as unselectKey,
390
+ Ge as useSelectable,
391
+ qe as useSelectableInjectors,
392
+ Qe as useVirtualList
387
393
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(c,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(c=typeof globalThis<"u"?globalThis:c||self,e(c.ui={},c.Vue))})(this,function(c,e){"use strict";var K;const O=typeof window<"u";O&&((K=window?.navigator)==null?void 0:K.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Q(t){return typeof t=="function"?t():e.unref(t)}function M(t){return t}function D(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function U(t,n=!0){e.getCurrentInstance()?e.onMounted(t):n?t():e.nextTick(t)}function x(t){var n;const o=Q(t);return(n=o?.$el)!=null?n:o}const W=O?window:void 0;O&&window.document,O&&window.navigator,O&&window.location;function q(t,n=!1){const o=e.ref(),l=()=>o.value=Boolean(t());return l(),U(l,n),o}const S=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},v="__vueuse_ssr_handlers__";S[v]=S[v]||{},S[v];var A=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,J=(t,n)=>{var o={};for(var l in t)G.call(t,l)&&n.indexOf(l)<0&&(o[l]=t[l]);if(t!=null&&A)for(var l of A(t))n.indexOf(l)<0&&Y.call(t,l)&&(o[l]=t[l]);return o};function X(t,n,o={}){const l=o,{window:s=W}=l,a=J(l,["window"]);let r;const d=q(()=>s&&"ResizeObserver"in s),i=()=>{r&&(r.disconnect(),r=void 0)},f=e.watch(()=>x(t),w=>{i(),d.value&&s&&w&&(r=new ResizeObserver(n),r.observe(w,a))},{immediate:!0,flush:"post"}),_=()=>{i(),f()};return D(_),{isSupported:d,stop:_}}function Z(t,n={width:0,height:0},o={}){const{box:l="content-box"}=o,s=e.ref(n.width),a=e.ref(n.height);return X(t,([r])=>{const d=l==="border-box"?r.borderBoxSize:l==="content-box"?r.contentBoxSize:r.devicePixelContentBoxSize;d?(s.value=d.reduce((i,{inlineSize:f})=>i+f,0),a.value=d.reduce((i,{blockSize:f})=>i+f,0)):(s.value=r.contentRect.width,a.value=r.contentRect.height)},o),e.watch(()=>x(t),r=>{s.value=r?n.width:0,a.value=r?n.height:0}),{width:s,height:a}}var R;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(R||(R={}));var ee=Object.defineProperty,V=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,$=(t,n,o)=>n in t?ee(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,oe=(t,n)=>{for(var o in n||(n={}))te.call(n,o)&&$(t,o,n[o]);if(V)for(var o of V(n))ne.call(n,o)&&$(t,o,n[o]);return t};oe({linear:M},{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 z(t,n){const o=e.ref(),l=Z(o),s=e.ref([]),a=e.ref(0),r=e.shallowRef(t),d=e.ref({start:0,end:10}),{itemHeight:i,overscan:f=5}=n,_=u=>{const{start:y=0}=d.value;let g=0,m=0;for(let b=y;b<r.value.length;b++)if(g+=i(b),g>=u){m=b;break}return m-y},w=u=>{let y=0,g=0;for(let m=0;m<r.value.length;m++)if(y+=i(m),y>=u){g=m;break}return g};let p;const h=()=>{cancelAnimationFrame(p),p=requestAnimationFrame(H)},H=()=>{const u=o.value;if(u){const y=w(u.scrollTop),g=_(u.clientHeight),m=y-f,b=y+g+f;d.value={start:m<0?0:m,end:b>r.value.length?r.value.length:b},s.value=r.value.slice(d.value.start,d.value.end).map((F,be)=>({data:F,index:be+d.value.start}))}};e.onMounted(()=>{}),e.onUnmounted(()=>{cancelAnimationFrame(p)}),e.watch([l.width,l.height,r],()=>{h()},{deep:!0});const L=e.computed(()=>typeof i=="number"?r.value.length*i:r.value.reduce((u,y,g)=>u+i(g),0)),fe=u=>typeof i=="number"?u*i:r.value.slice(0,u).reduce((g,m,b)=>g+i(b),0),pe=u=>{o.value&&(o.value.scrollTop=u,H())},he=e.computed(()=>fe(d.value.start)),ge=e.computed(()=>({style:{width:"100%",height:`${L.value}px`}})),me=e.computed(()=>({style:{transform:`translate3d(0, ${he.value}px, 0)`,"will-change":"transform"}})),ye={overflowY:"auto"};return{list:s,totalHeight:L,clientHeight:l.height,scrollTo:pe,scrollTop:a,containerProps:{ref:o,onScroll:u=>{u.target&&(a.value=u.target.scrollTop),h()},style:ye},wrapperProps:ge,innerProps:me}}const I=Symbol(),P=Symbol(),C=Symbol(),E=Symbol(),B=Symbol(),T=Symbol(),j=Symbol(),k=Symbol();function le(){const t=e.inject(I),n=e.inject(P),o=e.inject(C),l=e.inject(E),s=e.inject(B),a=e.inject(T),r=e.inject(j),d=e.inject(k);return{toggleAll:t,toggle:n,isSelected:o,selected:l,select:s,unselect:a,isAllSelected:r,unselectAll:d}}function re(t,n){const o=e.ref({}),l=e.computed(()=>t.value.filter(p=>o.value[p[n]])),s=e.computed(()=>l.value.length!=0&&Object.keys(o.value).length==t.value.length);function a(){t.value.forEach(p=>{o.value[p[n]]=!0})}function r(){o.value={}}function d(p){p.forEach(h=>{o.value[h[n]]||(o.value[h[n]]=!0)})}function i(p){p.forEach(h=>{o.value[h[n]]&&delete o.value[h[n]]})}function f(p){return!!o.value[p[n]]}function _(p){p.forEach(h=>{f(h)?delete o.value[h[n]]:o.value[h[n]]=!0})}function w(){s.value?r():a()}return e.provide(I,w),e.provide(P,_),e.provide(C,f),e.provide(E,l),e.provide(B,d),e.provide(T,i),e.provide(j,s),e.provide(k,r),{selected:l,select:d,selectAll:a,unselect:i,unselectAll:r,toggle:_,toggleAll:w,isSelected:f,isAllSelected:s}}const N=Symbol(),se=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(t,{emit:n}){const o=t,l=()=>{o.closeOnClickOverlay&&n("update:visiable",!1)};return e.provide(N,()=>n("update:visiable",!1)),(s,a)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l,class:"modal absolute inset-0 bottom-0 z-50 flex bg-stone-900 bg-opacity-50"},[e.createElementVNode("div",{onClick:a[0]||(a[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["dialog m-auto flex flex-col",t.dialogClass])},[e.renderSlot(s.$slots,"default")],2)])):e.createCommentVNode("",!0)]),_:3}))}});function ie(t){function n(o,l){const s=document.createElement("div"),a={setup(){return()=>e.h(se,{visiable:!0,"onUpdate:visiable":()=>{s?.remove()},...t},{default:()=>e.h(o,l)})}};return document.body.appendChild(s),e.render(e.h(a),s),{close:()=>s?.remove()}}return{create:n}}const ae=["xlink:href","fill","color"],ce=e.defineComponent({__name:"SvgIcon",props:{prefix:{default:"icon"},name:null,color:{default:"#FFF"},width:{default:16},height:{default:16}},setup(t){const n=t,o=e.computed(()=>`#${n.prefix}-${n.name}`),l=e.computed(()=>({width:n.width,height:n.height}));return(s,a)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(l))},[e.createElementVNode("use",{"xlink:href":e.unref(o),fill:t.color,color:t.color},null,8,ae)],4))}}),de=e.defineComponent({__name:"VirtualList",props:{data:null,itemHeight:null},setup(t){const n=t,{list:o,containerProps:l,wrapperProps:s,innerProps:a}=z(e.toRef(n,"data"),{itemHeight:r=>n.itemHeight(0),overscan:10});return(r,d)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(l).ref,onScrollPassive:d[0]||(d[0]=(...i)=>e.unref(l).onScroll&&e.unref(l).onScroll(...i)),class:"hiddenScorllBar-firefox hiddenScorllBar h-full overflow-hidden",style:e.normalizeStyle(e.unref(l).style)},[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(s))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(a))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),({index:i,data:f})=>(e.openBlock(),e.createElementBlock("div",{key:i,style:e.normalizeStyle({height:`${t.itemHeight(f)}px`,display:"flex"})},[e.renderSlot(r.$slots,"default",{data:f,index:i},void 0,!0)],4))),128))],16)],16)],36))}}),we="",ue=((t,n)=>{const o=t.__vccOpts||t;for(const[l,s]of n)o[l]=s;return o})(de,[["__scopeId","data-v-b9b7f6cb"]]);c.SvgIcon=ce,c.VirtualList=ue,c.allSelectedKey=E,c.closeDialogKey=N,c.dialogController=ie,c.isAllSelectedKey=j,c.isSelectedKey=C,c.selectKey=B,c.toggleAllKey=I,c.toggleKey=P,c.unselectAllKey=k,c.unselectKey=T,c.useSelectable=re,c.useSelectableInjectors=le,c.useVirtualList=z,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(a,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(a=typeof globalThis<"u"?globalThis:a||self,e(a.ui={},a.Vue))})(this,function(a,e){"use strict";var x;const S=typeof window<"u";S&&((x=window?.navigator)==null?void 0:x.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function M(t){return typeof t=="function"?t():e.unref(t)}function D(t){return t}function U(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function W(t,n=!0){e.getCurrentInstance()?e.onMounted(t):n?t():e.nextTick(t)}function R(t){var n;const o=M(t);return(n=o?.$el)!=null?n:o}const q=S?window:void 0;S&&window.document,S&&window.navigator,S&&window.location;function G(t,n=!1){const o=e.ref(),l=()=>o.value=Boolean(t());return l(),W(l,n),o}const O=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},v="__vueuse_ssr_handlers__";O[v]=O[v]||{},O[v];var V=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,X=(t,n)=>{var o={};for(var l in t)Y.call(t,l)&&n.indexOf(l)<0&&(o[l]=t[l]);if(t!=null&&V)for(var l of V(t))n.indexOf(l)<0&&J.call(t,l)&&(o[l]=t[l]);return o};function Z(t,n,o={}){const l=o,{window:s=q}=l,c=X(l,["window"]);let r;const d=G(()=>s&&"ResizeObserver"in s),i=()=>{r&&(r.disconnect(),r=void 0)},f=e.watch(()=>R(t),w=>{i(),d.value&&s&&w&&(r=new ResizeObserver(n),r.observe(w,c))},{immediate:!0,flush:"post"}),_=()=>{i(),f()};return U(_),{isSupported:d,stop:_}}function ee(t,n={width:0,height:0},o={}){const{box:l="content-box"}=o,s=e.ref(n.width),c=e.ref(n.height);return Z(t,([r])=>{const d=l==="border-box"?r.borderBoxSize:l==="content-box"?r.contentBoxSize:r.devicePixelContentBoxSize;d?(s.value=d.reduce((i,{inlineSize:f})=>i+f,0),c.value=d.reduce((i,{blockSize:f})=>i+f,0)):(s.value=r.contentRect.width,c.value=r.contentRect.height)},o),e.watch(()=>R(t),r=>{s.value=r?n.width:0,c.value=r?n.height:0}),{width:s,height:c}}var $;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})($||($={}));var te=Object.defineProperty,z=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,N=(t,n,o)=>n in t?te(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,le=(t,n)=>{for(var o in n||(n={}))ne.call(n,o)&&N(t,o,n[o]);if(z)for(var o of z(n))oe.call(n,o)&&N(t,o,n[o]);return t};le({linear:D},{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 H(t,n){const o=e.ref(),l=ee(o),s=e.ref([]),c=e.ref(0),r=e.shallowRef(t),d=e.ref({start:0,end:10}),{itemHeight:i,overscan:f=5}=n,_=u=>{const{start:b=0}=d.value;let g=0,m=0;for(let y=b;y<r.value.length;y++){const k=i(y);if(g+=k,g>=u){m=y;break}}return m-b},w=u=>{let b=0,g=0;for(let m=0;m<r.value.length;m++){const y=i(m);if(b+=y,b>=u){g=m;break}}return g};let p;const h=()=>{cancelAnimationFrame(p),p=requestAnimationFrame(F)},F=()=>{const u=o.value;if(u){const b=w(u.scrollTop),g=_(u.clientHeight),m=b-f,y=b+g+f;d.value={start:m<0?0:m,end:y>r.value.length?r.value.length:y},s.value=r.value.slice(d.value.start,d.value.end).map((k,_e)=>({data:k,index:_e+d.value.start}))}};e.onMounted(()=>{}),e.onUnmounted(()=>{cancelAnimationFrame(p)}),e.watch([l.width,l.height,r],()=>{h()},{deep:!0});const Q=e.computed(()=>typeof i=="number"?r.value.length*i:r.value.reduce((u,b,g)=>u+i(g),0)),pe=u=>typeof i=="number"?u*i:r.value.slice(0,u).reduce((g,m,y)=>g+i(y),0),he=u=>{o.value&&(o.value.scrollTop=u,F())},ge=e.computed(()=>pe(d.value.start)),me=e.computed(()=>({style:{width:"100%",height:`${Q.value}px`}})),ye=e.computed(()=>({style:{transform:`translate3d(0, ${ge.value}px, 0)`,"will-change":"transform"}})),be={overflowY:"auto"};return{list:s,totalHeight:Q,clientHeight:l.height,scrollTo:he,scrollTop:c,containerProps:{ref:o,onScroll:u=>{u.target&&(c.value=u.target.scrollTop),h()},style:be},wrapperProps:me,innerProps:ye}}const I=Symbol(),P=Symbol(),C=Symbol(),E=Symbol(),B=Symbol(),A=Symbol(),K=Symbol(),j=Symbol(),T=Symbol();function re(){const t=e.inject(I),n=e.inject(P),o=e.inject(C),l=e.inject(E),s=e.inject(B),c=e.inject(K),r=e.inject(j),d=e.inject(T),i=e.inject(A);return{toggleAll:t,toggle:n,isSelected:o,isAllSelected:r,selected:l,select:s,unselect:c,selectAll:i,unselectAll:d}}function se(t,n){const o=e.ref({}),l=e.computed(()=>t.value.filter(p=>o.value[p[n]])),s=e.computed(()=>l.value.length!=0&&Object.keys(o.value).length==t.value.length);function c(){t.value.forEach(p=>{o.value[p[n]]=!0})}function r(){o.value={}}function d(p){p.forEach(h=>{o.value[h[n]]||(o.value[h[n]]=!0)})}function i(p){p.forEach(h=>{o.value[h[n]]&&delete o.value[h[n]]})}function f(p){return!!o.value[p[n]]}function _(p){p.forEach(h=>{f(h)?delete o.value[h[n]]:o.value[h[n]]=!0})}function w(){s.value?r():c()}return e.provide(I,w),e.provide(P,_),e.provide(C,f),e.provide(E,l),e.provide(B,d),e.provide(K,i),e.provide(j,s),e.provide(T,r),e.provide(A,c),{selected:l,select:d,selectAll:c,unselect:i,unselectAll:r,toggle:_,toggleAll:w,isSelected:f,isAllSelected:s}}const L=Symbol(),ie=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(t,{emit:n}){const o=t,l=()=>{o.closeOnClickOverlay&&n("update:visiable",!1)};return e.provide(L,()=>n("update:visiable",!1)),(s,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l,class:"modal absolute inset-0 bottom-0 z-50 flex bg-stone-900 bg-opacity-50"},[e.createElementVNode("div",{onClick:c[0]||(c[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["dialog m-auto flex flex-col",t.dialogClass])},[e.renderSlot(s.$slots,"default")],2)])):e.createCommentVNode("",!0)]),_:3}))}});function ce(t){function n(o,l){const s=document.createElement("div"),c={setup(){return()=>e.h(ie,{visiable:!0,"onUpdate:visiable":()=>{s?.remove()},...t},{default:()=>e.h(o,l)})}};return document.body.appendChild(s),e.render(e.h(c),s),{close:()=>s?.remove()}}return{create:n}}const ae=["xlink:href","fill","color"],de=e.defineComponent({__name:"SvgIcon",props:{prefix:{default:"icon"},name:null,color:{default:"#FFF"},width:{default:16},height:{default:16}},setup(t){const n=t,o=e.computed(()=>`#${n.prefix}-${n.name}`),l=e.computed(()=>({width:n.width,height:n.height}));return(s,c)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(l))},[e.createElementVNode("use",{"xlink:href":e.unref(o),fill:t.color,color:t.color},null,8,ae)],4))}}),ue=e.defineComponent({__name:"VirtualList",props:{data:null,itemHeight:null},setup(t){const n=t,{list:o,containerProps:l,wrapperProps:s,innerProps:c}=H(e.toRef(n,"data"),{itemHeight:r=>n.itemHeight(0),overscan:10});return(r,d)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(l).ref,onScrollPassive:d[0]||(d[0]=(...i)=>e.unref(l).onScroll&&e.unref(l).onScroll(...i)),class:"hiddenScorllBar-firefox hiddenScorllBar h-full overflow-hidden",style:e.normalizeStyle(e.unref(l).style)},[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(s))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(c))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),({index:i,data:f})=>(e.openBlock(),e.createElementBlock("div",{key:i,style:e.normalizeStyle({height:`${t.itemHeight(f)}px`,display:"flex"})},[e.renderSlot(r.$slots,"default",{data:f,index:i},void 0,!0)],4))),128))],16)],16)],36))}}),Se="",fe=((t,n)=>{const o=t.__vccOpts||t;for(const[l,s]of n)o[l]=s;return o})(ue,[["__scopeId","data-v-b9b7f6cb"]]);a.SvgIcon=de,a.VirtualList=fe,a.allSelectedKey=E,a.closeDialogKey=L,a.dialogController=ce,a.isAllSelectedKey=j,a.isSelectedKey=C,a.selectAllKey=A,a.selectKey=B,a.toggleAllKey=I,a.toggleKey=P,a.unselectAllKey=T,a.unselectKey=K,a.useSelectable=se,a.useSelectableInjectors=re,a.useVirtualList=H,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -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, {}>> | null;
31
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
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;
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
- }> & {
44
+ }, {}, string> & {
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, {}>> | 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;
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;
60
60
  };
61
61
  $forceUpdate: () => void;
62
62
  $nextTick: typeof import("vue").nextTick;
63
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
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;
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
- }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
84
+ }, {}, string> & 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
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
91
- declare type __VLS_TypePropsToRuntimeProps<T> = {
90
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
91
+ 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 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
96
96
  required: true;
97
97
  };
98
98
  };
99
- declare type __VLS_WithDefaults<P, D> = {
99
+ 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
- declare type DialogControllerOptions = Omit<DialogProps, "visiable">;
12
+ 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;
@@ -27,8 +27,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
27
27
  height: number;
28
28
  }>;
29
29
  export default _default;
30
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
31
- declare type __VLS_TypePropsToRuntimeProps<T> = {
30
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
31
+ type __VLS_TypePropsToRuntimeProps<T> = {
32
32
  [K in keyof T]-?: {} extends Pick<T, K> ? {
33
33
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
34
34
  } : {
@@ -36,7 +36,7 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
36
36
  required: true;
37
37
  };
38
38
  };
39
- declare type __VLS_WithDefaults<P, D> = {
39
+ type __VLS_WithDefaults<P, D> = {
40
40
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
41
41
  default: D[K];
42
42
  } : P[K];
@@ -4,10 +4,11 @@ export declare function useSelectableInjectors(): {
4
4
  toggleAll: (() => void) | undefined;
5
5
  toggle: ((a: any[]) => void) | undefined;
6
6
  isSelected: ((a: any) => boolean) | undefined;
7
+ isAllSelected: ComputedRef<boolean> | undefined;
7
8
  selected: ComputedRef<any[]> | undefined;
8
9
  select: ((a: any) => void) | undefined;
9
10
  unselect: ((a: any) => void) | undefined;
10
- isAllSelected: ComputedRef<boolean> | undefined;
11
+ selectAll: ((a: any) => void) | undefined;
11
12
  unselectAll: (() => void) | undefined;
12
13
  };
13
14
  export declare function useSelectable<T extends Record<K, string | number>, K extends keyof T>(data: Ref<Array<T>>, key: K): {
@@ -4,6 +4,7 @@ export declare const toggleKey: InjectionKey<(a: Array<any>) => void>;
4
4
  export declare const isSelectedKey: InjectionKey<(a: any) => boolean>;
5
5
  export declare const allSelectedKey: InjectionKey<ComputedRef<any[]>>;
6
6
  export declare const selectKey: InjectionKey<(a: any) => void>;
7
+ export declare const selectAllKey: InjectionKey<(a: any) => void>;
7
8
  export declare const unselectKey: InjectionKey<(a: any) => void>;
8
9
  export declare const isAllSelectedKey: InjectionKey<ComputedRef<boolean>>;
9
10
  export declare const unselectAllKey: InjectionKey<() => void>;
@@ -15,14 +15,14 @@ declare const _default: {
15
15
  $slots: Readonly<{
16
16
  [name: string]: import("vue").Slot | undefined;
17
17
  }>;
18
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
19
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
18
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
19
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
20
20
  $emit: (event: string, ...args: any[]) => void;
21
21
  $el: any;
22
22
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
23
23
  data: any;
24
24
  itemHeight: (a: number) => number;
25
- }>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}> & {
25
+ }>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & {
26
26
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
27
27
  created?: ((() => void) | (() => void)[]) | undefined;
28
28
  beforeMount?: ((() => void) | (() => void)[]) | undefined;
@@ -37,22 +37,22 @@ declare const _default: {
37
37
  unmounted?: ((() => void) | (() => void)[]) | undefined;
38
38
  renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
39
39
  renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
40
- 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;
40
+ 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;
41
41
  };
42
42
  $forceUpdate: () => void;
43
43
  $nextTick: typeof import("vue").nextTick;
44
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
44
+ $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;
45
45
  } & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
46
46
  data: any;
47
47
  itemHeight: (a: number) => number;
48
- }>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
48
+ }>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
49
49
  __isFragment?: undefined;
50
50
  __isTeleport?: undefined;
51
51
  __isSuspense?: undefined;
52
52
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
53
53
  data: any;
54
54
  itemHeight: (a: number) => number;
55
- }>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
55
+ }>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
56
56
  $slots: {
57
57
  default: (_: {
58
58
  data: any;
@@ -61,8 +61,8 @@ declare const _default: {
61
61
  };
62
62
  });
63
63
  export default _default;
64
- declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
65
- declare type __VLS_TypePropsToRuntimeProps<T> = {
64
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
65
+ type __VLS_TypePropsToRuntimeProps<T> = {
66
66
  [K in keyof T]-?: {} extends Pick<T, K> ? {
67
67
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
68
68
  } : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazycatcloud/lzc-toolkit",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "lazycat ui toolkits",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",