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.
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +0 -1
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +1 -7
- package/dist/components/BbAlert/BbAlert.vue.d.ts +0 -1
- package/dist/components/BbChip/BbChip.vue.d.ts +0 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +0 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +2 -7
- package/dist/components/ListBox.vue.d.ts +0 -2
- package/dist/composables/useLocale.d.ts +1 -1
- package/dist/i18n/en.d.ts +45 -0
- package/dist/i18n/it.d.ts +45 -0
- package/dist/index100.js +9 -9
- package/dist/index111.js +109 -108
- package/dist/index119.js +1 -1
- package/dist/index121.js +55 -54
- package/dist/index123.js +1 -1
- package/dist/index125.js +14 -13
- package/dist/index127.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index129.js +1 -1
- package/dist/index13.js +23 -23
- package/dist/index132.js +2 -2
- package/dist/index133.js +2 -2
- package/dist/index15.js +36 -35
- package/dist/index17.js +3 -3
- package/dist/index19.js +63 -64
- package/dist/index206.js +85 -114
- package/dist/index208.js +25 -16
- package/dist/index209.js +16 -15
- package/dist/index21.js +110 -103
- package/dist/index210.js +48 -19
- package/dist/index211.js +15 -19
- package/dist/index212.js +3 -27
- package/dist/index213.js +12 -3
- package/dist/index214.js +16 -2
- package/dist/index215.js +2 -8
- package/dist/index216.js +4 -250
- package/dist/index217.js +2 -52
- package/dist/index218.js +6 -42
- package/dist/index219.js +3 -5
- package/dist/index220.js +41 -60
- package/dist/index221.js +6 -126
- package/dist/index222.js +7 -125
- package/dist/index223.js +12 -2
- package/dist/index224.js +13 -41
- package/dist/index225.js +51 -18
- package/dist/index227.js +12 -52
- package/dist/index228.js +7 -0
- package/dist/index229.js +16 -13
- package/dist/index23.js +127 -119
- package/dist/index230.js +16 -5
- package/dist/index231.js +19 -12
- package/dist/index232.js +14 -368
- package/dist/index233.js +19 -4
- package/dist/index234.js +27 -84
- package/dist/index235.js +4 -0
- package/dist/index236.js +249 -7
- package/dist/index237.js +51 -24
- package/dist/index238.js +44 -17
- package/dist/index239.js +5 -48
- package/dist/index240.js +60 -15
- package/dist/index241.js +19 -11
- package/dist/index242.js +4 -16
- package/dist/index243.js +126 -2
- package/dist/index244.js +125 -4
- package/dist/index245.js +2 -2
- package/dist/index246.js +5 -3
- package/dist/index247.js +369 -7
- package/dist/index248.js +115 -2
- package/dist/index249.js +3 -18
- package/dist/index25.js +44 -41
- package/dist/index250.js +2 -106
- package/dist/index251.js +20 -0
- package/dist/index252.js +53 -47
- package/dist/index254.js +100 -12
- package/dist/index256.js +12 -3
- package/dist/index258.js +2 -10
- package/dist/index259.js +9 -2
- package/dist/index260.js +2 -8
- package/dist/index261.js +3 -23
- package/dist/index262.js +14 -86
- package/dist/index263.js +11 -0
- package/dist/index264.js +27 -8
- package/dist/index265.js +4 -6
- package/dist/index266.js +430 -15
- package/dist/index267.js +2 -281
- package/dist/index268.js +88 -5
- package/dist/index269.js +7 -2
- package/dist/index27.js +1 -1
- package/dist/index270.js +11 -2
- package/dist/index271.js +3 -2
- package/dist/index273.js +7 -2
- package/dist/index274.js +200 -2
- package/dist/index275.js +281 -2
- package/dist/index276.js +6 -2
- package/dist/index277.js +2 -2
- package/dist/index278.js +2 -2
- package/dist/index279.js +2 -28
- package/dist/index280.js +2 -22
- package/dist/index282.js +2 -7
- package/dist/index283.js +2 -3
- package/dist/index284.js +2 -7
- package/dist/index285.js +2 -11
- package/dist/index286.js +2 -17
- package/dist/index287.js +2 -9
- package/dist/index288.js +22 -3
- package/dist/index29.js +2 -2
- package/dist/index290.js +6 -173
- package/dist/index291.js +23 -2
- package/dist/index292.js +88 -125
- package/dist/index294.js +176 -22
- package/dist/index295.js +4 -0
- package/dist/index296.js +126 -2
- package/dist/index297.js +22 -4
- package/dist/index299.js +7 -434
- package/dist/index300.js +6 -127
- package/dist/index301.js +15 -199
- package/dist/index302.js +8 -89
- package/dist/index303.js +224 -3
- package/dist/index304.js +436 -3
- package/dist/index305.js +126 -212
- package/dist/index306.js +3 -224
- package/dist/index307.js +3 -5
- package/dist/index308.js +214 -2
- package/dist/index309.js +21 -20
- package/dist/index31.js +2 -2
- package/dist/index310.js +2 -3
- package/dist/index311.js +5 -7
- package/dist/index312.js +4 -18
- package/dist/index313.js +7 -4
- package/dist/index314.js +6 -7
- package/dist/index315.js +19 -3
- package/dist/index316.js +53 -3
- package/dist/index317.js +52 -57
- package/dist/index318.js +7 -8
- package/dist/index319.js +32 -7
- package/dist/index320.js +3 -6
- package/dist/index321.js +3 -4
- package/dist/index322.js +2 -32
- package/dist/index323.js +3 -47
- package/dist/index324.js +58 -2
- package/dist/index325.js +47 -480
- package/dist/index326.js +4 -0
- package/dist/index327.js +470 -414
- package/dist/index329.js +424 -2
- package/dist/index33.js +45 -45
- package/dist/index331.js +4 -0
- package/dist/index35.js +56 -55
- package/dist/index37.js +166 -165
- package/dist/index39.js +3 -3
- package/dist/index41.js +2 -2
- package/dist/index43.js +70 -71
- package/dist/index45.js +7 -7
- package/dist/index47.js +2 -2
- package/dist/index49.js +2 -2
- package/dist/index53.js +28 -27
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +32 -31
- package/dist/index75.js +3 -3
- package/dist/index77.js +87 -86
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index84.js +45 -44
- package/dist/index86.js +67 -66
- package/dist/index88.js +69 -67
- package/package.json +1 -1
- package/dist/index207.js +0 -7
- package/dist/index226.js +0 -8
- package/dist/index255.js +0 -4
- package/dist/index293.js +0 -433
- package/dist/index298.js +0 -10
- /package/dist/{index272.js → index281.js} +0 -0
- /package/dist/{index328.js → index330.js} +0 -0
package/dist/index19.js
CHANGED
@@ -1,17 +1,16 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import
|
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
|
4
|
+
import K from "./index206.js";
|
5
5
|
/* empty css */
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
|
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(
|
41
|
-
const o =
|
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
|
45
|
-
getter:
|
46
|
-
items:
|
47
|
-
loading:
|
48
|
-
} =
|
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
|
-
}),
|
52
|
-
o.enforceCoherence && !
|
53
|
-
}, { hasPrefilled:
|
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
|
57
|
+
await u(e, o.modelValue), c();
|
59
58
|
}
|
60
|
-
}), { data:
|
59
|
+
}), { data: y } = w({
|
61
60
|
items: d(o, "modelValue")
|
62
|
-
}), { options:
|
61
|
+
}), { options: g } = U({
|
63
62
|
disabled: d(o, "disabled"),
|
64
|
-
items:
|
63
|
+
items: D,
|
65
64
|
itemText: o.itemText,
|
66
65
|
itemValue: o.itemValue,
|
67
66
|
max: o.max,
|
68
67
|
selectable: !0,
|
69
|
-
selectedIndexedByHash:
|
68
|
+
selectedIndexedByHash: y
|
70
69
|
}), H = async (e) => {
|
71
70
|
a("update:modelValue", o.modelValue.concat(e.value));
|
72
|
-
},
|
73
|
-
const t = { ...
|
71
|
+
}, x = async (e) => {
|
72
|
+
const t = { ...y.value };
|
74
73
|
delete t[e.valueHash], a("update:modelValue", Object.values(t));
|
75
|
-
}, { data:
|
76
|
-
items:
|
74
|
+
}, { data: M } = w({
|
75
|
+
items: g,
|
77
76
|
key: "valueHash"
|
78
|
-
}), { coherent:
|
77
|
+
}), { coherent: V, status: P } = q({
|
79
78
|
modelValue: d(o, "modelValue"),
|
80
79
|
multiple: !0,
|
81
|
-
iteratee: (e) => !!
|
80
|
+
iteratee: (e) => !!M.value[J(e)]
|
82
81
|
});
|
83
82
|
let r = 0;
|
84
|
-
|
83
|
+
C(
|
85
84
|
() => o.modelValue,
|
86
85
|
async () => {
|
87
|
-
r++,
|
86
|
+
r++, V.value || (await u(!1, o.modelValue), c()), r--;
|
88
87
|
},
|
89
88
|
{
|
90
89
|
debounce: o.modelValueDebounceTime
|
91
90
|
}
|
92
|
-
),
|
91
|
+
), C(
|
93
92
|
() => [o.dependencies, o.items],
|
94
93
|
async () => {
|
95
|
-
|
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
|
100
|
+
const F = (e) => {
|
102
101
|
if (o.id)
|
103
102
|
return [o.id, e.valueHash].filter(Boolean).join("-");
|
104
|
-
},
|
105
|
-
a("change", e), t.selected ?
|
106
|
-
},
|
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",
|
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
|
-
},
|
115
|
+
}, m = (e) => {
|
117
116
|
var t;
|
118
|
-
e.target instanceof HTMLElement && ((t =
|
119
|
-
},
|
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 =
|
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) => (
|
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: !!
|
129
|
-
"loading-text": e.loadingText
|
130
|
-
"no-data-text": e.noDataText
|
131
|
-
options:
|
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(
|
142
|
+
l(e.$slots, "label", h(b(n)))
|
144
143
|
]),
|
145
144
|
"option:prepend": s((n) => [
|
146
|
-
l(e.$slots, "option:prepend", b(
|
145
|
+
l(e.$slots, "option:prepend", h(b(n)))
|
147
146
|
]),
|
148
|
-
input: s(({ option: n, index:
|
149
|
-
W
|
150
|
-
id:
|
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 && !
|
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
|
-
},
|
161
|
-
onChange: (
|
159
|
+
}, S, {
|
160
|
+
onChange: (f) => O(f, n)
|
162
161
|
}), {
|
163
|
-
icon: s((
|
164
|
-
l(e.$slots, "icon",
|
162
|
+
icon: s((f) => [
|
163
|
+
l(e.$slots, "icon", T({
|
165
164
|
item: n.item,
|
166
165
|
text: n.text
|
167
|
-
},
|
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(
|
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
|
-
|
182
|
+
de as default
|
184
183
|
};
|
package/dist/index206.js
CHANGED
@@ -1,117 +1,88 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
-
|
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
|
-
|
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 {
|
2
|
-
import {
|
3
|
-
(
|
4
|
-
(
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
-
|
26
|
+
p as useItemsGetter
|
18
27
|
};
|
package/dist/index209.js
CHANGED
@@ -1,18 +1,19 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
(
|
4
|
-
(
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
|
14
|
-
|
15
|
-
|
12
|
+
return {
|
13
|
+
data: n,
|
14
|
+
get: (t) => r ? n.value[String(t[r])] : n.value[s(t)]
|
15
|
+
};
|
16
|
+
};
|
16
17
|
export {
|
17
|
-
|
18
|
+
p as useIndexById
|
18
19
|
};
|