bitboss-ui 2.0.104 → 2.0.106

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.
Files changed (174) hide show
  1. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +0 -1
  2. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +1 -7
  3. package/dist/components/BbAlert/BbAlert.vue.d.ts +0 -1
  4. package/dist/components/BbChip/BbChip.vue.d.ts +0 -1
  5. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +0 -1
  6. package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
  7. package/dist/components/BbTable/BbTable.vue.d.ts +2 -7
  8. package/dist/components/ListBox.vue.d.ts +0 -2
  9. package/dist/composables/useLocale.d.ts +1 -1
  10. package/dist/i18n/en.d.ts +45 -0
  11. package/dist/i18n/it.d.ts +45 -0
  12. package/dist/index100.js +9 -9
  13. package/dist/index111.js +109 -108
  14. package/dist/index119.js +1 -1
  15. package/dist/index121.js +55 -54
  16. package/dist/index123.js +1 -1
  17. package/dist/index125.js +14 -13
  18. package/dist/index127.js +1 -1
  19. package/dist/index128.js +1 -1
  20. package/dist/index129.js +1 -1
  21. package/dist/index13.js +23 -23
  22. package/dist/index132.js +2 -2
  23. package/dist/index133.js +2 -2
  24. package/dist/index15.js +36 -35
  25. package/dist/index17.js +3 -3
  26. package/dist/index19.js +63 -64
  27. package/dist/index206.js +85 -114
  28. package/dist/index208.js +25 -16
  29. package/dist/index209.js +16 -15
  30. package/dist/index21.js +110 -103
  31. package/dist/index210.js +48 -19
  32. package/dist/index211.js +15 -19
  33. package/dist/index212.js +3 -27
  34. package/dist/index213.js +12 -3
  35. package/dist/index214.js +16 -2
  36. package/dist/index215.js +2 -8
  37. package/dist/index216.js +4 -250
  38. package/dist/index217.js +2 -52
  39. package/dist/index218.js +6 -42
  40. package/dist/index219.js +3 -5
  41. package/dist/index220.js +41 -60
  42. package/dist/index221.js +6 -126
  43. package/dist/index222.js +7 -125
  44. package/dist/index223.js +12 -2
  45. package/dist/index224.js +13 -41
  46. package/dist/index225.js +51 -18
  47. package/dist/index227.js +12 -52
  48. package/dist/index228.js +7 -0
  49. package/dist/index229.js +16 -13
  50. package/dist/index23.js +127 -119
  51. package/dist/index230.js +16 -5
  52. package/dist/index231.js +19 -12
  53. package/dist/index232.js +14 -368
  54. package/dist/index233.js +19 -4
  55. package/dist/index234.js +27 -84
  56. package/dist/index235.js +4 -0
  57. package/dist/index236.js +249 -7
  58. package/dist/index237.js +51 -24
  59. package/dist/index238.js +44 -17
  60. package/dist/index239.js +5 -48
  61. package/dist/index240.js +60 -15
  62. package/dist/index241.js +19 -11
  63. package/dist/index242.js +4 -16
  64. package/dist/index243.js +126 -2
  65. package/dist/index244.js +125 -4
  66. package/dist/index245.js +2 -2
  67. package/dist/index246.js +5 -3
  68. package/dist/index247.js +369 -7
  69. package/dist/index248.js +115 -2
  70. package/dist/index249.js +3 -18
  71. package/dist/index25.js +44 -41
  72. package/dist/index250.js +2 -106
  73. package/dist/index251.js +20 -0
  74. package/dist/index252.js +53 -47
  75. package/dist/index254.js +100 -12
  76. package/dist/index256.js +12 -3
  77. package/dist/index258.js +2 -10
  78. package/dist/index259.js +9 -2
  79. package/dist/index260.js +2 -8
  80. package/dist/index261.js +3 -23
  81. package/dist/index262.js +14 -86
  82. package/dist/index263.js +11 -0
  83. package/dist/index264.js +27 -8
  84. package/dist/index265.js +4 -6
  85. package/dist/index266.js +430 -15
  86. package/dist/index267.js +2 -281
  87. package/dist/index268.js +88 -5
  88. package/dist/index269.js +7 -2
  89. package/dist/index27.js +1 -1
  90. package/dist/index270.js +11 -2
  91. package/dist/index271.js +3 -2
  92. package/dist/index273.js +7 -2
  93. package/dist/index274.js +200 -2
  94. package/dist/index275.js +281 -2
  95. package/dist/index276.js +6 -2
  96. package/dist/index277.js +2 -2
  97. package/dist/index278.js +2 -2
  98. package/dist/index279.js +2 -28
  99. package/dist/index280.js +2 -22
  100. package/dist/index282.js +2 -7
  101. package/dist/index283.js +2 -3
  102. package/dist/index284.js +2 -7
  103. package/dist/index285.js +2 -11
  104. package/dist/index286.js +2 -17
  105. package/dist/index287.js +2 -9
  106. package/dist/index288.js +22 -3
  107. package/dist/index29.js +2 -2
  108. package/dist/index290.js +6 -173
  109. package/dist/index291.js +23 -2
  110. package/dist/index292.js +88 -125
  111. package/dist/index294.js +176 -22
  112. package/dist/index295.js +4 -0
  113. package/dist/index296.js +126 -2
  114. package/dist/index297.js +22 -4
  115. package/dist/index299.js +7 -434
  116. package/dist/index300.js +6 -127
  117. package/dist/index301.js +15 -199
  118. package/dist/index302.js +8 -89
  119. package/dist/index303.js +224 -3
  120. package/dist/index304.js +436 -3
  121. package/dist/index305.js +126 -212
  122. package/dist/index306.js +3 -224
  123. package/dist/index307.js +3 -5
  124. package/dist/index308.js +214 -2
  125. package/dist/index309.js +21 -20
  126. package/dist/index31.js +2 -2
  127. package/dist/index310.js +2 -3
  128. package/dist/index311.js +5 -7
  129. package/dist/index312.js +4 -18
  130. package/dist/index313.js +7 -4
  131. package/dist/index314.js +6 -7
  132. package/dist/index315.js +19 -3
  133. package/dist/index316.js +53 -3
  134. package/dist/index317.js +52 -57
  135. package/dist/index318.js +7 -8
  136. package/dist/index319.js +32 -7
  137. package/dist/index320.js +3 -6
  138. package/dist/index321.js +3 -4
  139. package/dist/index322.js +2 -32
  140. package/dist/index323.js +3 -47
  141. package/dist/index324.js +58 -2
  142. package/dist/index325.js +47 -480
  143. package/dist/index326.js +4 -0
  144. package/dist/index327.js +470 -414
  145. package/dist/index329.js +424 -2
  146. package/dist/index33.js +45 -45
  147. package/dist/index331.js +4 -0
  148. package/dist/index35.js +56 -55
  149. package/dist/index37.js +166 -165
  150. package/dist/index39.js +3 -3
  151. package/dist/index41.js +2 -2
  152. package/dist/index43.js +70 -71
  153. package/dist/index45.js +7 -7
  154. package/dist/index47.js +2 -2
  155. package/dist/index49.js +2 -2
  156. package/dist/index53.js +28 -27
  157. package/dist/index55.js +1 -1
  158. package/dist/index57.js +2 -2
  159. package/dist/index61.js +32 -31
  160. package/dist/index75.js +3 -3
  161. package/dist/index77.js +87 -86
  162. package/dist/index79.js +2 -2
  163. package/dist/index81.js +1 -1
  164. package/dist/index84.js +45 -44
  165. package/dist/index86.js +67 -66
  166. package/dist/index88.js +69 -67
  167. package/package.json +1 -1
  168. package/dist/index207.js +0 -7
  169. package/dist/index226.js +0 -8
  170. package/dist/index255.js +0 -4
  171. package/dist/index293.js +0 -433
  172. package/dist/index298.js +0 -10
  173. /package/dist/{index272.js → index281.js} +0 -0
  174. /package/dist/{index328.js → index330.js} +0 -0
package/dist/index19.js CHANGED
@@ -1,17 +1,16 @@
1
- import { defineComponent as z, ref as B, toRef as d, openBlock as G, createBlock as R, unref as u, withCtx as s, renderSlot as l, normalizeProps as b, guardReactiveProps as v, createVNode as W, mergeProps as w } from "vue";
2
- import K from "./index17.js";
1
+ import { defineComponent as j, ref as k, toRef as d, openBlock as z, createBlock as G, unref as B, withCtx as s, renderSlot as l, normalizeProps as h, guardReactiveProps as b, createVNode as R, mergeProps as T } from "vue";
2
+ import W from "./index17.js";
3
3
  /* empty css */
4
- import N from "./index234.js";
4
+ import K from "./index206.js";
5
5
  /* empty css */
6
- import { useLocale as U } from "./index236.js";
7
- import { useItemsGetter as q } from "./index237.js";
8
- import { useIndexById as C } from "./index238.js";
9
- import { useBaseOptions as J } from "./index239.js";
10
- import { useCoherence as Q } from "./index240.js";
11
- import { hash as X } from "./index213.js";
12
- import { useHashedWatcher as E } from "./index241.js";
13
- import { usePrefill as Y } from "./index242.js";
14
- const me = /* @__PURE__ */ z({
6
+ import { useItemsGetter as N } from "./index208.js";
7
+ import { useIndexById as w } from "./index209.js";
8
+ import { useBaseOptions as U } from "./index210.js";
9
+ import { useCoherence as q } from "./index211.js";
10
+ import { hash as J } from "./index212.js";
11
+ import { useHashedWatcher as C } from "./index213.js";
12
+ import { usePrefill as Q } from "./index214.js";
13
+ const de = /* @__PURE__ */ j({
15
14
  __name: "BaseCheckboxGroup",
16
15
  props: {
17
16
  ariaDescribedby: {},
@@ -37,98 +36,98 @@ const me = /* @__PURE__ */ z({
37
36
  readonly: { type: Boolean }
38
37
  },
39
38
  emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
40
- setup(L, { emit: D }) {
41
- const o = L, a = D;
39
+ setup(E, { emit: L }) {
40
+ const o = E, a = L;
42
41
  if (!Array.isArray(o.modelValue))
43
42
  throw new Error("Model value must be an array in checkbox group.");
44
- const { t: y } = U(), g = B(), i = B(!1), {
45
- getter: c,
46
- items: I,
47
- loading: $
48
- } = q({
43
+ const v = k(), i = k(!1), {
44
+ getter: u,
45
+ items: D,
46
+ loading: I
47
+ } = N({
49
48
  items: d(o, "items"),
50
49
  debounce: 0
51
- }), m = () => {
52
- o.enforceCoherence && !T.value && a("update:modelValue", F.value.coherent);
53
- }, { hasPrefilled: x } = Y({
50
+ }), c = () => {
51
+ o.enforceCoherence && !V.value && a("update:modelValue", P.value.coherent);
52
+ }, { hasPrefilled: $ } = Q({
54
53
  onStart: !0,
55
54
  currentValue: o.modelValue,
56
55
  multiple: !0,
57
56
  fn: async ({ prefill: e }) => {
58
- await c(e, o.modelValue), m();
57
+ await u(e, o.modelValue), c();
59
58
  }
60
- }), { data: V } = C({
59
+ }), { data: y } = w({
61
60
  items: d(o, "modelValue")
62
- }), { options: k } = J({
61
+ }), { options: g } = U({
63
62
  disabled: d(o, "disabled"),
64
- items: I,
63
+ items: D,
65
64
  itemText: o.itemText,
66
65
  itemValue: o.itemValue,
67
66
  max: o.max,
68
67
  selectable: !0,
69
- selectedIndexedByHash: V
68
+ selectedIndexedByHash: y
70
69
  }), H = async (e) => {
71
70
  a("update:modelValue", o.modelValue.concat(e.value));
72
- }, M = async (e) => {
73
- const t = { ...V.value };
71
+ }, x = async (e) => {
72
+ const t = { ...y.value };
74
73
  delete t[e.valueHash], a("update:modelValue", Object.values(t));
75
- }, { data: P } = C({
76
- items: k,
74
+ }, { data: M } = w({
75
+ items: g,
77
76
  key: "valueHash"
78
- }), { coherent: T, status: F } = Q({
77
+ }), { coherent: V, status: P } = q({
79
78
  modelValue: d(o, "modelValue"),
80
79
  multiple: !0,
81
- iteratee: (e) => !!P.value[X(e)]
80
+ iteratee: (e) => !!M.value[J(e)]
82
81
  });
83
82
  let r = 0;
84
- E(
83
+ C(
85
84
  () => o.modelValue,
86
85
  async () => {
87
- r++, T.value || (await c(!1, o.modelValue), m()), r--;
86
+ r++, V.value || (await u(!1, o.modelValue), c()), r--;
88
87
  },
89
88
  {
90
89
  debounce: o.modelValueDebounceTime
91
90
  }
92
- ), E(
91
+ ), C(
93
92
  () => [o.dependencies, o.items],
94
93
  async () => {
95
- x.value && (r++, await c(!1, o.modelValue), r === 1 && m(), r--);
94
+ $.value && (r++, await u(!1, o.modelValue), r === 1 && c(), r--);
96
95
  },
97
96
  {
98
97
  debounce: o.depsDebounceTime
99
98
  }
100
99
  );
101
- const O = (e) => {
100
+ const F = (e) => {
102
101
  if (o.id)
103
102
  return [o.id, e.valueHash].filter(Boolean).join("-");
104
- }, S = (e, t) => {
105
- a("change", e), t.selected ? M(t) : H(t);
106
- }, A = {
103
+ }, O = (e, t) => {
104
+ a("change", e), t.selected ? x(t) : H(t);
105
+ }, S = {
107
106
  onBlur: (e) => a("blur", e),
108
107
  onClick: (e) => a("click", e),
109
108
  onFocus: (e) => {
110
- a("focus", e), i.value || (document.addEventListener("focusin", p, { passive: !0 }), document.addEventListener("click", f, { passive: !0 }), i.value = !0);
109
+ a("focus", e), i.value || (document.addEventListener("focusin", m, { passive: !0 }), document.addEventListener("click", p, { passive: !0 }), i.value = !0);
111
110
  },
112
111
  onInput: (e) => a("input", e),
113
112
  onKeydown: (e) => a("keydown", e),
114
113
  onMousedown: (e) => a("mousedown", e),
115
114
  onMouseup: (e) => a("mouseup", e)
116
- }, p = (e) => {
115
+ }, m = (e) => {
117
116
  var t;
118
- e.target instanceof HTMLElement && ((t = g.value) != null && t.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", p), document.removeEventListener("click", f)));
119
- }, f = (e) => {
117
+ e.target instanceof HTMLElement && ((t = v.value) != null && t.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", m), document.removeEventListener("click", p)));
118
+ }, p = (e) => {
120
119
  var t;
121
- e.target instanceof HTMLElement && ((t = g.value) != null && t.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", p), document.removeEventListener("click", f)));
120
+ e.target instanceof HTMLElement && ((t = v.value) != null && t.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", m), document.removeEventListener("click", p)));
122
121
  };
123
- return (e, t) => (G(), R(N, {
122
+ return (e, t) => (z(), G(K, {
124
123
  class: "bb-base-checkbox-group",
125
124
  direction: e.direction,
126
125
  "has-errors": e.hasErrors,
127
126
  "hide-label": e.hideLabel,
128
- loading: !!u($),
129
- "loading-text": e.loadingText || u(y)("common.loadingText"),
130
- "no-data-text": e.noDataText || u(y)("common.noDataText"),
131
- options: u(k)
127
+ loading: !!B(I),
128
+ "loading-text": e.loadingText,
129
+ "no-data-text": e.noDataText,
130
+ options: B(g)
132
131
  }, {
133
132
  prepend: s(() => [
134
133
  l(e.$slots, "prepend")
@@ -140,16 +139,16 @@ const me = /* @__PURE__ */ z({
140
139
  l(e.$slots, "no-data")
141
140
  ]),
142
141
  label: s((n) => [
143
- l(e.$slots, "label", b(v(n)))
142
+ l(e.$slots, "label", h(b(n)))
144
143
  ]),
145
144
  "option:prepend": s((n) => [
146
- l(e.$slots, "option:prepend", b(v(n)))
145
+ l(e.$slots, "option:prepend", h(b(n)))
147
146
  ]),
148
- input: s(({ option: n, index: j }) => [
149
- W(K, w({
150
- id: O(n),
147
+ input: s(({ option: n, index: A }) => [
148
+ R(W, T({
149
+ id: F(n),
151
150
  "aria-describedby": e.ariaDescribedby,
152
- autofocus: e.autofocus && !j,
151
+ autofocus: e.autofocus && !A,
153
152
  checked: n.selected,
154
153
  color: e.color,
155
154
  disabled: n.disabled,
@@ -157,20 +156,20 @@ const me = /* @__PURE__ */ z({
157
156
  name: e.name,
158
157
  readonly: e.readonly,
159
158
  "true-value": n.value
160
- }, A, {
161
- onChange: (h) => S(h, n)
159
+ }, S, {
160
+ onChange: (f) => O(f, n)
162
161
  }), {
163
- icon: s((h) => [
164
- l(e.$slots, "icon", w({
162
+ icon: s((f) => [
163
+ l(e.$slots, "icon", T({
165
164
  item: n.item,
166
165
  text: n.text
167
- }, h))
166
+ }, f))
168
167
  ]),
169
168
  _: 2
170
169
  }, 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "has-errors", "name", "readonly", "true-value", "onChange"])
171
170
  ]),
172
171
  "option:append": s((n) => [
173
- l(e.$slots, "option:append", b(v(n)))
172
+ l(e.$slots, "option:append", h(b(n)))
174
173
  ]),
175
174
  append: s(() => [
176
175
  l(e.$slots, "append")
@@ -180,5 +179,5 @@ const me = /* @__PURE__ */ z({
180
179
  }
181
180
  });
182
181
  export {
183
- me as default
182
+ de as default
184
183
  };
package/dist/index206.js CHANGED
@@ -1,117 +1,88 @@
1
- import { getCurrentScope as F, onScopeDispose as O, unref as g, onMounted as x, nextTick as S, isRef as W, getCurrentInstance as C, watch as P } from "vue";
2
- function V(e) {
3
- return F() ? (O(e), !0) : !1;
4
- }
5
- function m(e) {
6
- return typeof e == "function" ? e() : g(e);
7
- }
8
- const A = typeof window < "u" && typeof document < "u";
9
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
10
- const E = (e) => e != null, v = Object.prototype.toString, I = (e) => v.call(e) === "[object Object]", p = () => {
11
- };
12
- function h(e, o) {
13
- function t(...n) {
14
- return new Promise((r, i) => {
15
- Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(r).catch(i);
16
- });
1
+ import { defineComponent as h, openBlock as n, createElementBlock as s, normalizeClass as r, createElementVNode as l, renderSlot as t, createTextVNode as o, toDisplayString as d, unref as b, createCommentVNode as p, Fragment as m, renderList as u } from "vue";
2
+ import { useLocale as g } from "./index224.js";
3
+ const k = { class: "bb-cr-container__container" }, y = {
4
+ key: 0,
5
+ class: "bb-cr-container__loading-container"
6
+ }, $ = {
7
+ key: 1,
8
+ class: "bb-cr-container__no-data-container"
9
+ }, C = /* @__PURE__ */ h({
10
+ __name: "OptionsContainer",
11
+ props: {
12
+ direction: {},
13
+ hasErrors: { type: Boolean },
14
+ hideLabel: { type: Boolean },
15
+ loadingText: {},
16
+ loading: { type: Boolean },
17
+ noDataText: {},
18
+ options: {}
19
+ },
20
+ setup(f) {
21
+ const { t: i } = g();
22
+ return (a, T) => (n(), s("span", {
23
+ ref: "container",
24
+ class: r(["bb-cr-container", {
25
+ "bb-cr-container--errors": a.hasErrors,
26
+ "bb-cr-container--horizontal": a.direction === "horizontal",
27
+ "bb-cr-container--vertical": a.direction === "vertical"
28
+ }])
29
+ }, [
30
+ l("span", k, [
31
+ t(a.$slots, "prepend"),
32
+ !a.options.length && a.loading ? (n(), s("span", y, [
33
+ t(a.$slots, "loading", {}, () => [
34
+ o(d(a.loadingText || b(i)("common.loadingText")), 1)
35
+ ])
36
+ ])) : a.options.length ? p("", !0) : (n(), s("span", $, [
37
+ t(a.$slots, "no-data", {}, () => [
38
+ o(d(a.noDataText || b(i)("common.noDataText")), 1)
39
+ ])
40
+ ])),
41
+ (n(!0), s(m, null, u(a.options, (e, c) => (n(), s(m, {
42
+ key: (e == null ? void 0 : e.valueHash) || c
43
+ }, [
44
+ t(a.$slots, "option:prepend", {
45
+ id: e.valueHash,
46
+ checked: !!e.selected,
47
+ disabled: !!e.disabled,
48
+ item: e.item,
49
+ text: e.text
50
+ }),
51
+ l("label", {
52
+ class: r(["bb-cr-container-option", { "bb-base-radio-selected": e.selected }])
53
+ }, [
54
+ t(a.$slots, "input", {
55
+ index: c,
56
+ option: e
57
+ }),
58
+ l("span", {
59
+ class: r({
60
+ "bb-cr-container-option__text": !0,
61
+ "sr-only": a.hideLabel
62
+ })
63
+ }, [
64
+ t(a.$slots, "label", {
65
+ checked: !!e.selected,
66
+ item: e.item,
67
+ text: e.text
68
+ }, () => [
69
+ o(d(e.text), 1)
70
+ ])
71
+ ], 2)
72
+ ], 2),
73
+ t(a.$slots, "option:append", {
74
+ id: e.valueHash,
75
+ checked: !!e.selected,
76
+ disabled: !!e.disabled,
77
+ item: e.item,
78
+ text: e.text
79
+ })
80
+ ], 64))), 128)),
81
+ t(a.$slots, "append")
82
+ ])
83
+ ], 2));
17
84
  }
18
- return t;
19
- }
20
- const M = (e) => e();
21
- function T(e, o = {}) {
22
- let t, n, r = p;
23
- const i = (c) => {
24
- clearTimeout(c), r(), r = p;
25
- };
26
- return (c) => {
27
- const l = m(e), u = m(o.maxWait);
28
- return t && i(t), l <= 0 || u !== void 0 && u <= 0 ? (n && (i(n), n = null), Promise.resolve(c())) : new Promise((s, w) => {
29
- r = o.rejectOnCancel ? w : s, u && !n && (n = setTimeout(() => {
30
- t && i(t), n = null, s(c());
31
- }, u)), t = setTimeout(() => {
32
- n && i(n), n = null, s(c());
33
- }, l);
34
- });
35
- };
36
- }
37
- function R(...e) {
38
- let o = 0, t, n = !0, r = p, i, a, c, l, u;
39
- !W(e[0]) && typeof e[0] == "object" ? { delay: a, trailing: c = !0, leading: l = !0, rejectOnCancel: u = !1 } = e[0] : [a, c = !0, l = !0, u = !1] = e;
40
- const s = () => {
41
- t && (clearTimeout(t), t = void 0, r(), r = p);
42
- };
43
- return (j) => {
44
- const f = m(a), b = Date.now() - o, d = () => i = j();
45
- return s(), f <= 0 ? (o = Date.now(), d()) : (b > f && (l || !n) ? (o = Date.now(), d()) : c && (i = new Promise((y, D) => {
46
- r = u ? D : y, t = setTimeout(() => {
47
- o = Date.now(), n = !0, y(d()), s();
48
- }, Math.max(0, f - b));
49
- })), !l && !t && (t = setTimeout(() => n = !0, f)), n = !1, i);
50
- };
51
- }
52
- function k(e) {
53
- return C();
54
- }
55
- function N(e, o = 200, t = {}) {
56
- return h(
57
- T(o, t),
58
- e
59
- );
60
- }
61
- function _(e, o = 200, t = !1, n = !0, r = !1) {
62
- return h(
63
- R(o, t, n, r),
64
- e
65
- );
66
- }
67
- function G(e, o, t = {}) {
68
- const {
69
- eventFilter: n = M,
70
- ...r
71
- } = t;
72
- return P(
73
- e,
74
- h(
75
- n,
76
- o
77
- ),
78
- r
79
- );
80
- }
81
- function q(e, o = !0, t) {
82
- k() ? x(e, t) : o ? e() : S(e);
83
- }
84
- function z(e, o, t = {}) {
85
- const {
86
- debounce: n = 0,
87
- maxWait: r = void 0,
88
- ...i
89
- } = t;
90
- return G(
91
- e,
92
- o,
93
- {
94
- ...i,
95
- eventFilter: T(n, { maxWait: r })
96
- }
97
- );
98
- }
85
+ });
99
86
  export {
100
- M as bypassFilter,
101
- h as createFilterWrapper,
102
- T as debounceFilter,
103
- z as debouncedWatch,
104
- k as getLifeCycleTarget,
105
- A as isClient,
106
- I as isObject,
107
- p as noop,
108
- E as notNullish,
109
- R as throttleFilter,
110
- m as toValue,
111
- q as tryOnMounted,
112
- V as tryOnScopeDispose,
113
- N as useDebounceFn,
114
- _ as useThrottleFn,
115
- z as watchDebounced,
116
- G as watchWithFilter
87
+ C as default
117
88
  };
package/dist/index208.js CHANGED
@@ -1,18 +1,27 @@
1
- import { getDefaultExportFromCjs as f, commonjsGlobal as n } from "./index268.js";
2
- import { __module as e } from "./index270.js";
3
- (function(s, a) {
4
- (function(i, t) {
5
- s.exports = t();
6
- })(n, function() {
7
- return function(i, t) {
8
- t.prototype.isSameOrAfter = function(r, o) {
9
- return this.isSame(r, o) || this.isAfter(r, o);
10
- };
11
- };
12
- });
13
- })(e);
14
- var m = e.exports;
15
- const c = /* @__PURE__ */ f(m);
1
+ import { ref as n, computed as a, unref as v } from "vue";
2
+ import { useDebounceFn as f } from "./index248.js";
3
+ const p = (o) => {
4
+ const e = n(0), r = a(() => v(o.items)), t = n([]), u = async (...s) => {
5
+ if (Array.isArray(r.value))
6
+ t.value = r.value;
7
+ else if (typeof r.value == "function") {
8
+ const l = ++e.value;
9
+ try {
10
+ if (t.value = await r.value(...s), l < e.value)
11
+ return;
12
+ } catch (i) {
13
+ console.error(i);
14
+ }
15
+ e.value--;
16
+ }
17
+ }, c = f(u, o.debounce || 0);
18
+ return {
19
+ getter: u,
20
+ debouncedGetter: c,
21
+ items: t,
22
+ loading: a(() => !!e.value)
23
+ };
24
+ };
16
25
  export {
17
- c as default
26
+ p as useItemsGetter
18
27
  };
package/dist/index209.js CHANGED
@@ -1,18 +1,19 @@
1
- import { getDefaultExportFromCjs as i, commonjsGlobal as n } from "./index268.js";
2
- import { __module as t } from "./index271.js";
3
- (function(s, a) {
4
- (function(f, o) {
5
- s.exports = o();
6
- })(n, function() {
7
- return function(f, o) {
8
- o.prototype.isSameOrBefore = function(e, r) {
9
- return this.isSame(e, r) || this.isBefore(e, r);
10
- };
11
- };
1
+ import { computed as i, unref as m } from "vue";
2
+ import { hash as s } from "./index212.js";
3
+ const p = ({ items: a, key: r }) => {
4
+ const n = i(() => {
5
+ const t = {}, c = new Array().concat(m(a));
6
+ for (let e = 0; e < c.length; e++) {
7
+ const o = c[e], u = r ? String(o[r]) : s(o);
8
+ t[u] = o;
9
+ }
10
+ return t;
12
11
  });
13
- })(t);
14
- var m = t.exports;
15
- const c = /* @__PURE__ */ i(m);
12
+ return {
13
+ data: n,
14
+ get: (t) => r ? n.value[String(t[r])] : n.value[s(t)]
15
+ };
16
+ };
16
17
  export {
17
- c as default
18
+ p as useIndexById
18
19
  };