bitboss-ui 2.1.16 → 2.1.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.css +1 -1
- package/dist/index106.js +9 -9
- package/dist/index111.js +1 -1
- package/dist/index121.js +10 -10
- package/dist/index13.js +1 -1
- package/dist/index131.js +4 -4
- package/dist/index133.js +1 -1
- package/dist/index139.js +2 -2
- package/dist/index15.js +8 -8
- package/dist/index19.js +8 -8
- package/dist/index21.js +16 -16
- package/dist/index212.js +5 -4
- package/dist/index213.js +5 -13
- package/dist/index214.js +5 -11
- package/dist/index215.js +5 -20
- package/dist/index216.js +5 -197
- package/dist/index217.js +7 -0
- package/dist/index218.js +2 -72
- package/dist/index219.js +4 -0
- package/dist/index220.js +2 -13
- package/dist/index221.js +12 -113
- package/dist/index222.js +13 -0
- package/dist/index223.js +20 -5
- package/dist/index224.js +72 -5
- package/dist/index226.js +13 -5
- package/dist/index227.js +114 -5
- package/dist/index229.js +86 -5
- package/dist/index23.js +15 -15
- package/dist/index231.js +29 -2
- package/dist/index232.js +16 -8
- package/dist/index233.js +17 -250
- package/dist/index234.js +49 -50
- package/dist/index235.js +15 -44
- package/dist/index236.js +3 -5
- package/dist/index237.js +12 -60
- package/dist/index238.js +33 -12
- package/dist/index239.js +2 -86
- package/dist/index241.js +6 -28
- package/dist/index242.js +7 -17
- package/dist/index243.js +181 -49
- package/dist/index244.js +106 -15
- package/dist/index246.js +100 -16
- package/dist/index248.js +4 -34
- package/dist/index249.js +197 -2
- package/dist/index25.js +3 -3
- package/dist/index251.js +3 -7
- package/dist/index252.js +5 -3
- package/dist/index253.js +5 -5
- package/dist/index254.js +8 -2
- package/dist/index255.js +250 -2
- package/dist/index256.js +50 -181
- package/dist/index257.js +39 -101
- package/dist/index258.js +7 -0
- package/dist/index259.js +55 -95
- package/dist/index260.js +15 -0
- package/dist/index261.js +1 -1
- package/dist/index264.js +45 -47
- package/dist/index267.js +6 -9
- package/dist/index268.js +16 -23
- package/dist/index269.js +9 -3
- package/dist/index27.js +1 -1
- package/dist/index270.js +9 -6
- package/dist/index271.js +23 -16
- package/dist/index272.js +3 -9
- package/dist/index273.js +2 -9
- package/dist/index274.js +9 -8
- package/dist/index275.js +8 -5
- package/dist/index276.js +1 -1
- package/dist/index277.js +5 -2
- package/dist/index278.js +7 -4
- package/dist/index279.js +5 -8
- package/dist/index281.js +280 -3
- package/dist/index282.js +2 -3
- package/dist/index283.js +127 -0
- package/dist/index284.js +2 -7
- package/dist/index285.js +15 -3
- package/dist/index286.js +2 -7
- package/dist/index287.js +15 -10
- package/dist/index288.js +2 -280
- package/dist/index289.js +16 -2
- package/dist/index29.js +3 -3
- package/dist/index290.js +2 -16
- package/dist/index291.js +19 -2
- package/dist/index292.js +2 -16
- package/dist/index293.js +3 -2
- package/dist/index295.js +7 -2
- package/dist/index296.js +3 -15
- package/dist/index297.js +7 -2
- package/dist/index298.js +10 -18
- package/dist/index299.js +4 -2
- package/dist/index300.js +3 -27
- package/dist/index301.js +17 -2
- package/dist/index302.js +28 -2
- package/dist/index303.js +6 -2
- package/dist/index304.js +1 -1
- package/dist/index305.js +3 -2
- package/dist/index306.js +3 -28
- package/dist/index307.js +3 -22
- package/dist/index308.js +7 -0
- package/dist/index309.js +18 -3
- package/dist/index310.js +2 -3
- package/dist/index311.js +27 -17
- package/dist/index312.js +2 -6
- package/dist/index313.js +1 -1
- package/dist/index314.js +2 -5
- package/dist/index315.js +2 -125
- package/dist/index316.js +2 -2
- package/dist/index317.js +22 -3
- package/dist/index320.js +718 -5
- package/dist/index321.js +363 -715
- package/dist/index322.js +58 -366
- package/dist/index323.js +5 -58
- package/dist/index325.js +32 -7
- package/dist/index326.js +28 -6
- package/dist/index328.js +227 -6
- package/dist/index329.js +57 -18
- package/dist/index33.js +8 -8
- package/dist/index330.js +33 -33
- package/dist/index331.js +8 -58
- package/dist/index332.js +5 -6
- package/dist/index333.js +7 -32
- package/dist/index334.js +47 -28
- package/dist/index335.js +9 -0
- package/dist/index336.js +2 -2
- package/dist/index337.js +3 -3
- package/dist/index338.js +6 -227
- package/dist/index339.js +17 -45
- package/dist/index340.js +1 -1
- package/dist/index342.js +1 -1
- package/dist/index343.js +483 -124
- package/dist/index344.js +120 -427
- package/dist/index345.js +48 -125
- package/dist/index346.js +421 -473
- package/dist/index347.js +125 -48
- package/dist/index35.js +2 -2
- package/dist/index37.js +15 -15
- package/dist/index39.js +6 -6
- package/dist/index43.js +8 -8
- package/dist/index45.js +8 -8
- package/dist/index47.js +2 -2
- package/dist/index49.js +3 -3
- package/dist/index53.js +1 -1
- package/dist/index57.js +1 -1
- package/dist/index61.js +1 -1
- package/dist/index67.js +1 -1
- package/dist/index79.js +4 -4
- package/dist/index81.js +1 -1
- package/dist/index83.js +2 -2
- package/dist/index87.js +1 -1
- package/dist/index90.js +3 -3
- package/dist/index92.js +2 -2
- package/dist/index94.js +3 -3
- package/package.json +2 -2
- package/dist/index225.js +0 -7
- package/dist/index228.js +0 -7
- package/dist/index230.js +0 -5
- package/dist/index245.js +0 -14
- package/dist/index250.js +0 -9
- package/dist/index294.js +0 -21
- package/dist/index318.js +0 -5
- package/dist/index327.js +0 -10
- /package/dist/{index247.js → index240.js} +0 -0
package/dist/index224.js
CHANGED
@@ -1,7 +1,74 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
import { defineComponent as y, ref as C, createElementBlock as v, openBlock as i, withModifiers as B, normalizeClass as h, unref as n, renderSlot as o, createBlock as s, createCommentVNode as l, createVNode as t, createElementVNode as m } from "vue";
|
2
|
+
/* empty css */
|
3
|
+
/* empty css */
|
4
|
+
import u from "./index85.js";
|
5
|
+
/* empty css */
|
6
|
+
import I from "./index113.js";
|
7
|
+
/* empty css */
|
8
|
+
import E from "./index325.js";
|
9
|
+
import N from "./index326.js";
|
10
|
+
/* empty css */
|
11
|
+
import { noop as d } from "./index266.js";
|
12
|
+
const V = { class: "bb-common-input-inner-container__prefix" }, w = { class: "bb-common-input-inner-container__suffix" }, G = /* @__PURE__ */ y({
|
13
|
+
__name: "CommonInputInnerContainer",
|
14
|
+
props: {
|
15
|
+
"append:icon": {},
|
16
|
+
clearable: { type: Boolean },
|
17
|
+
"prepend:icon": {},
|
18
|
+
preventFocus: { type: Boolean }
|
19
|
+
},
|
20
|
+
emits: ["click:clear"],
|
21
|
+
setup(f, { emit: b }) {
|
22
|
+
const p = f, _ = b, r = C(), a = () => {
|
23
|
+
var e;
|
24
|
+
!r.value || p.preventFocus || (e = r.value.querySelector("input,textarea")) == null || e.focus();
|
25
|
+
}, $ = () => {
|
26
|
+
_("click:clear"), a();
|
27
|
+
};
|
28
|
+
return (e, c) => (i(), v("span", {
|
29
|
+
ref_key: "container",
|
30
|
+
ref: r,
|
31
|
+
class: h(["bb-common-input-inner-container", {
|
32
|
+
"bb-common-input-inner-container--clearable": p.clearable
|
33
|
+
}]),
|
34
|
+
onClick: a,
|
35
|
+
onPointerdown: c[0] || (c[0] = B(
|
36
|
+
//@ts-ignore
|
37
|
+
(...k) => n(d) && n(d)(...k),
|
38
|
+
["prevent"]
|
39
|
+
))
|
40
|
+
}, [
|
41
|
+
o(e.$slots, "prepend", {}, () => [
|
42
|
+
m("span", V, [
|
43
|
+
o(e.$slots, "prefix")
|
44
|
+
])
|
45
|
+
]),
|
46
|
+
e.$props["prepend:icon"] ? (i(), s(n(u), {
|
47
|
+
key: 0,
|
48
|
+
class: "bb-common-input-inner-container__prepend-icon",
|
49
|
+
type: e.$props["prepend:icon"]
|
50
|
+
}, null, 8, ["type"])) : l("", !0),
|
51
|
+
o(e.$slots, "default"),
|
52
|
+
t(N, {
|
53
|
+
"aria-hidden": !e.clearable,
|
54
|
+
tabindex: e.clearable ? 0 : -1,
|
55
|
+
onClick: $
|
56
|
+
}, null, 8, ["aria-hidden", "tabindex"]),
|
57
|
+
e.$props["append:icon"] ? (i(), s(n(u), {
|
58
|
+
key: 1,
|
59
|
+
class: "bb-common-input-inner-container__append-icon",
|
60
|
+
type: e.$props["append:icon"]
|
61
|
+
}, null, 8, ["type"])) : l("", !0),
|
62
|
+
t(E),
|
63
|
+
t(n(I)),
|
64
|
+
o(e.$slots, "append", {}, () => [
|
65
|
+
m("span", w, [
|
66
|
+
o(e.$slots, "suffix")
|
67
|
+
])
|
68
|
+
])
|
69
|
+
], 34));
|
70
|
+
}
|
71
|
+
});
|
5
72
|
export {
|
6
|
-
|
73
|
+
G as default
|
7
74
|
};
|
package/dist/index226.js
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
const
|
1
|
+
import { createElementBlock as t, openBlock as n, renderSlot as e } from "vue";
|
2
|
+
/* empty css */
|
3
|
+
import r from "./index295.js";
|
4
|
+
const s = {}, c = { class: "bb-common-input-outer-container" };
|
5
|
+
function p(o, a) {
|
6
|
+
return n(), t("span", c, [
|
7
|
+
e(o.$slots, "prepend-outer"),
|
8
|
+
e(o.$slots, "default"),
|
9
|
+
e(o.$slots, "append-outer")
|
10
|
+
]);
|
11
|
+
}
|
12
|
+
const i = /* @__PURE__ */ r(s, [["render", p]]);
|
5
13
|
export {
|
6
|
-
|
14
|
+
i as default
|
7
15
|
};
|
package/dist/index227.js
CHANGED
@@ -1,7 +1,116 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
1
|
+
import { defineComponent as P, mergeModels as D, useModel as V, ref as r, watch as A, onMounted as x, computed as S, createBlock as b, openBlock as v, resolveDynamicComponent as g, normalizeStyle as z, normalizeClass as E, unref as l, withCtx as w, renderSlot as y, createCommentVNode as N, mergeProps as h, createElementVNode as C } from "vue";
|
2
|
+
import { wait as F } from "./index135.js";
|
3
|
+
import { useFloating as U, arrow as j } from "./index336.js";
|
4
|
+
import { flip as q, offset as G, shift as H, hide as I, autoUpdate as J } from "./index337.js";
|
5
|
+
const K = { class: "bb-common-popover__bubble" }, W = /* @__PURE__ */ P({
|
6
|
+
__name: "CommonPopover",
|
7
|
+
props: /* @__PURE__ */ D({
|
8
|
+
arrowPadding: {},
|
9
|
+
offset: {},
|
10
|
+
block: { type: Boolean },
|
11
|
+
padding: { default: 0 },
|
12
|
+
placement: {},
|
13
|
+
transitionDuration: { default: 250 },
|
14
|
+
containerAttributes: {},
|
15
|
+
dialog: { type: Boolean },
|
16
|
+
renderContent: { type: Boolean, default: !0 },
|
17
|
+
tag: { default: "span" },
|
18
|
+
flip: { type: Boolean, default: !0 }
|
19
|
+
}, {
|
20
|
+
modelValue: { type: Boolean, default: !1 },
|
21
|
+
modelModifiers: {}
|
22
|
+
}),
|
23
|
+
emits: ["update:modelValue"],
|
24
|
+
setup(s) {
|
25
|
+
const o = s, a = V(s, "modelValue"), i = r(), t = r(), p = r(), { floatingStyles: k, placement: _, middlewareData: n, update: B } = U(
|
26
|
+
i,
|
27
|
+
t,
|
28
|
+
{
|
29
|
+
placement: o.placement,
|
30
|
+
whileElementsMounted: J,
|
31
|
+
middleware: [
|
32
|
+
...o.flip ? [q()] : [],
|
33
|
+
G(o.offset),
|
34
|
+
H({ padding: o.padding }),
|
35
|
+
I(),
|
36
|
+
j({
|
37
|
+
element: p,
|
38
|
+
padding: o.arrowPadding
|
39
|
+
})
|
40
|
+
],
|
41
|
+
strategy: "fixed"
|
42
|
+
}
|
43
|
+
), d = (e) => {
|
44
|
+
e ? (B(), o.dialog ? t.value.showModal() : t.value.showPopover()) : F(o.transitionDuration).then(() => {
|
45
|
+
t.value && (o.dialog ? t.value.close() : t.value.hidePopover());
|
46
|
+
});
|
47
|
+
};
|
48
|
+
A(a, d, { flush: "post" }), x(() => {
|
49
|
+
a.value && d(a.value);
|
50
|
+
});
|
51
|
+
const M = S(() => {
|
52
|
+
if (n.value.arrow) {
|
53
|
+
const { x: e, y: u } = n.value.arrow;
|
54
|
+
return {
|
55
|
+
style: {
|
56
|
+
left: `${e}px`,
|
57
|
+
top: `${u}px`
|
58
|
+
}
|
59
|
+
};
|
60
|
+
}
|
61
|
+
}), $ = () => {
|
62
|
+
a.value = !1;
|
63
|
+
};
|
64
|
+
return (e, u) => (v(), b(g(e.dialog ? "div" : e.tag), {
|
65
|
+
ref_key: "wrapper",
|
66
|
+
ref: i,
|
67
|
+
class: E(["bb-common-popover", {
|
68
|
+
"bb-common-popover--open": a.value && !!t.value,
|
69
|
+
"bb-common-popover--block": o.block,
|
70
|
+
[`bb-common-popover--${l(_)}`]: !0
|
71
|
+
}]),
|
72
|
+
style: z({
|
73
|
+
"--transition-duration": `${o.transitionDuration}ms`
|
74
|
+
})
|
75
|
+
}, {
|
76
|
+
default: w(() => {
|
77
|
+
var m, f, c;
|
78
|
+
return [
|
79
|
+
y(e.$slots, "activator"),
|
80
|
+
e.renderContent ? (v(), b(g(e.dialog ? "dialog" : e.tag), h({
|
81
|
+
key: 0,
|
82
|
+
ref_key: "content",
|
83
|
+
ref: t,
|
84
|
+
class: ["bb-common-popover__bubble-container", {
|
85
|
+
"bb-common-popover__bubble-container--open": a.value && !!t.value
|
86
|
+
}],
|
87
|
+
popover: "manual",
|
88
|
+
style: {
|
89
|
+
...((m = e.containerAttributes) == null ? void 0 : m.style) ?? {},
|
90
|
+
...l(k),
|
91
|
+
"--arrow-offset-x": Math.round(((c = (f = l(n)) == null ? void 0 : f.arrow) == null ? void 0 : c.x) ?? 0) + "px",
|
92
|
+
"--page-padding": `${e.padding}px`
|
93
|
+
},
|
94
|
+
tabindex: a.value ? void 0 : -1
|
95
|
+
}, e.containerAttributes, { onClose: l($) }), {
|
96
|
+
default: w(() => [
|
97
|
+
C("span", h({
|
98
|
+
ref_key: "bubblearrow",
|
99
|
+
ref: p,
|
100
|
+
class: "bb-common-popover__arrow"
|
101
|
+
}, M.value), null, 16),
|
102
|
+
C("span", K, [
|
103
|
+
y(e.$slots, "default")
|
104
|
+
])
|
105
|
+
]),
|
106
|
+
_: 3
|
107
|
+
}, 16, ["class", "style", "tabindex", "onClose"])) : N("", !0)
|
108
|
+
];
|
109
|
+
}),
|
110
|
+
_: 3
|
111
|
+
}, 8, ["class", "style"]));
|
112
|
+
}
|
113
|
+
});
|
5
114
|
export {
|
6
|
-
|
115
|
+
W as default
|
7
116
|
};
|
package/dist/index229.js
CHANGED
@@ -1,7 +1,88 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
1
|
+
import { defineComponent as h, createElementBlock as n, openBlock as s, normalizeClass as r, createElementVNode as l, renderSlot as t, createCommentVNode as p, createTextVNode as o, toDisplayString as d, unref as b, Fragment as m, renderList as u } from "vue";
|
2
|
+
import { useLocale as g } from "./index221.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) => (s(), n("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 ? (s(), n("span", y, [
|
33
|
+
t(a.$slots, "loading", {}, () => [
|
34
|
+
o(d(a.loadingText || b(i)("common.loadingText")), 1)
|
35
|
+
])
|
36
|
+
])) : a.options.length ? p("", !0) : (s(), n("span", $, [
|
37
|
+
t(a.$slots, "no-data", {}, () => [
|
38
|
+
o(d(a.noDataText || b(i)("common.noDataText")), 1)
|
39
|
+
])
|
40
|
+
])),
|
41
|
+
(s(!0), n(m, null, u(a.options, (e, c) => (s(), n(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));
|
84
|
+
}
|
85
|
+
});
|
5
86
|
export {
|
6
|
-
|
87
|
+
C as default
|
7
88
|
};
|
package/dist/index23.js
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
import { defineComponent as K, watchEffect as Q, ref as i, computed as g, watch as D, createBlock as C, openBlock as Y, normalizeClass as w, withCtx as s, createElementVNode as n, createVNode as B, createCommentVNode as X, unref as r, withDirectives as x, mergeProps as S, withModifiers as ee, toDisplayString as E, renderSlot as c } from "vue";
|
2
2
|
import { _config as te } from "./index4.js";
|
3
|
-
import o from "./
|
4
|
-
import ae from "./
|
5
|
-
import oe from "./
|
6
|
-
import ne from "./
|
7
|
-
import re from "./
|
8
|
-
import le from "./
|
9
|
-
import { identity as ie } from "./
|
10
|
-
import { isEmpty as se } from "./
|
11
|
-
import { last as de } from "./
|
3
|
+
import o from "./index212.js";
|
4
|
+
import ae from "./index213.js";
|
5
|
+
import oe from "./index214.js";
|
6
|
+
import ne from "./index215.js";
|
7
|
+
import re from "./index216.js";
|
8
|
+
import le from "./index217.js";
|
9
|
+
import { identity as ie } from "./index218.js";
|
10
|
+
import { isEmpty as se } from "./index219.js";
|
11
|
+
import { last as de } from "./index220.js";
|
12
12
|
import { useId as ue } from "./index8.js";
|
13
|
-
import { useLocale as pe } from "./
|
13
|
+
import { useLocale as pe } from "./index221.js";
|
14
14
|
import { useMobile as ce } from "./index9.js";
|
15
|
-
import { useUntil as me } from "./
|
16
|
-
import { vMaska as fe } from "./
|
15
|
+
import { useUntil as me } from "./index222.js";
|
16
|
+
import { vMaska as fe } from "./index223.js";
|
17
17
|
import be from "./index21.js";
|
18
18
|
/* empty css */
|
19
|
-
import ke from "./
|
19
|
+
import ke from "./index224.js";
|
20
20
|
/* empty css */
|
21
|
-
import ge from "./
|
22
|
-
import ye from "./
|
21
|
+
import ge from "./index226.js";
|
22
|
+
import ye from "./index227.js";
|
23
23
|
/* empty css */
|
24
24
|
const ve = { class: "bb-base-date-picker-input__inner-wrapper" }, Ve = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "value"], he = ["aria-label", "disabled"], Me = ["id"], De = ["inert"], Ze = /* @__PURE__ */ K({
|
25
25
|
__name: "BaseDatePickerInput",
|
package/dist/index231.js
CHANGED
@@ -1,4 +1,31 @@
|
|
1
|
-
|
1
|
+
import { ref as a, computed as s, unref as v } from "vue";
|
2
|
+
import { useDebounceFn as f } from "./index206.js";
|
3
|
+
const p = (u) => {
|
4
|
+
const e = a(0), r = s(() => v(u.items)), t = a([]), n = async (...l) => {
|
5
|
+
if (Array.isArray(r.value))
|
6
|
+
t.value = r.value;
|
7
|
+
else if (typeof r.value == "function") {
|
8
|
+
const i = ++e.value;
|
9
|
+
try {
|
10
|
+
const o = await r.value(...l);
|
11
|
+
if (i < e.value) {
|
12
|
+
e.value--;
|
13
|
+
return;
|
14
|
+
} else
|
15
|
+
t.value = o;
|
16
|
+
} catch (o) {
|
17
|
+
console.error(o);
|
18
|
+
}
|
19
|
+
e.value--;
|
20
|
+
}
|
21
|
+
}, c = f(n, u.debounce || 0);
|
22
|
+
return {
|
23
|
+
getter: n,
|
24
|
+
debouncedGetter: c,
|
25
|
+
items: t,
|
26
|
+
loading: s(() => !!e.value)
|
27
|
+
};
|
28
|
+
};
|
2
29
|
export {
|
3
|
-
|
30
|
+
p as useItemsGetter
|
4
31
|
};
|
package/dist/index232.js
CHANGED
@@ -1,10 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
import { isNotNil as n } from "./index140.js";
|
2
|
+
import { ref as t, onServerPrefetch as u, onBeforeMount as c } from "vue";
|
3
|
+
const h = ({
|
4
|
+
fn: i,
|
5
|
+
onStart: s,
|
6
|
+
multiple: f,
|
7
|
+
currentValue: o
|
8
|
+
}) => {
|
9
|
+
const a = s || !f && n(o) || f && !!o.length, e = t(!1), l = t(!1), r = async () => {
|
10
|
+
e.value = !0, await i({ prefill: !0 }), e.value = !1, l.value = !0;
|
11
|
+
};
|
12
|
+
return a && (u(r), c(async () => {
|
13
|
+
l.value || await r();
|
14
|
+
})), { isPrefilling: e, hasPrefilled: l, prefill: r };
|
15
|
+
};
|
8
16
|
export {
|
9
|
-
|
17
|
+
h as usePrefill
|
10
18
|
};
|