bitboss-ui 2.1.115 → 2.1.116
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/ai/BbTab.md +7 -7
- package/dist/index109.js +9 -9
- package/dist/index110.js +18 -18
- package/dist/index118.js +1 -1
- package/dist/index124.js +72 -74
- package/dist/index126.js +13 -13
- package/dist/index134.js +1 -1
- package/dist/index136.js +5 -5
- package/dist/index138.js +1 -1
- package/dist/index14.js +1 -1
- package/dist/index140.js +2 -2
- package/dist/index144.js +1 -1
- package/dist/index146.js +2 -2
- package/dist/index16.js +3 -3
- package/dist/index18.js +3 -3
- package/dist/index20.js +9 -9
- package/dist/index22.js +14 -14
- package/dist/index221.js +2 -138
- package/dist/index222.js +138 -2
- package/dist/index224.js +1 -1
- package/dist/index225.js +1 -1
- package/dist/index226.js +4 -34
- package/dist/index227.js +13 -5
- package/dist/index228.js +20 -5
- package/dist/index229.js +2 -5
- package/dist/index230.js +2 -5
- package/dist/index231.js +3 -3
- package/dist/index232.js +86 -2
- package/dist/index234.js +30 -8
- package/dist/index235.js +17 -268
- package/dist/index236.js +49 -50
- package/dist/index237.js +18 -52
- package/dist/index238.js +3 -32
- package/dist/index239.js +12 -60
- package/dist/index24.js +10 -10
- package/dist/index240.js +18 -13
- package/dist/index241.js +7 -187
- package/dist/index242.js +34 -3
- package/dist/index243.js +10 -2
- package/dist/index244.js +3 -2
- package/dist/index245.js +4 -2
- package/dist/index246.js +12 -12
- package/dist/index247.js +135 -13
- package/dist/index249.js +22 -16
- package/dist/index250.js +5 -106
- package/dist/index251.js +7 -0
- package/dist/index252.js +5 -100
- package/dist/index253.js +7 -0
- package/dist/index254.js +5 -3
- package/dist/index255.js +5 -2
- package/dist/index256.js +3 -4
- package/dist/index257.js +25 -20
- package/dist/index258.js +3 -6
- package/dist/index259.js +12 -15
- package/dist/index26.js +3 -3
- package/dist/index260.js +5 -86
- package/dist/index261.js +4 -0
- package/dist/index262.js +6 -30
- package/dist/index263.js +268 -18
- package/dist/index264.js +52 -12
- package/dist/index265.js +52 -18
- package/dist/index266.js +32 -2
- package/dist/index267.js +60 -7
- package/dist/index268.js +8 -6
- package/dist/index269.js +2 -3
- package/dist/index270.js +2 -4
- package/dist/index271.js +4 -5
- package/dist/index272.js +9 -5
- package/dist/index273.js +53 -5
- package/dist/index274.js +11 -135
- package/dist/index275.js +20 -0
- package/dist/index276.js +12 -9
- package/dist/index277.js +31 -8
- package/dist/index279.js +107 -4
- package/dist/index28.js +1 -1
- package/dist/index280.js +6 -23
- package/dist/index281.js +19 -371
- package/dist/index282.js +9 -0
- package/dist/index283.js +7 -31
- package/dist/index284.js +23 -3
- package/dist/index285.js +106 -25
- package/dist/index287.js +99 -17
- package/dist/index289.js +2 -107
- package/dist/index290.js +7 -11
- package/dist/index291.js +7 -67
- package/dist/index292.js +5 -32
- package/dist/{index286.js → index293.js} +1 -1
- package/dist/index294.js +27 -5
- package/dist/index296.js +67 -3
- package/dist/index297.js +371 -7
- package/dist/index299.js +6 -5
- package/dist/index30.js +3 -3
- package/dist/index300.js +15 -20
- package/dist/index301.js +188 -28
- package/dist/index302.js +5 -0
- package/dist/index303.js +2 -7
- package/dist/index304.js +3 -2
- package/dist/index305.js +7 -280
- package/dist/index306.js +3 -2
- package/dist/index307.js +17 -16
- package/dist/index308.js +28 -2
- package/dist/index309.js +5 -16
- package/dist/index310.js +280 -2
- package/dist/index311.js +2 -27
- package/dist/index312.js +16 -2
- package/dist/index313.js +2 -2
- package/dist/index314.js +16 -2
- package/dist/index315.js +2 -2
- package/dist/index316.js +27 -2
- package/dist/index317.js +2 -28
- package/dist/index318.js +1 -1
- package/dist/index319.js +2 -7
- package/dist/index32.js +2 -2
- package/dist/index320.js +2 -719
- package/dist/index321.js +2 -366
- package/dist/index322.js +2 -57
- package/dist/index323.js +125 -4
- package/dist/index324.js +2 -3
- package/dist/index325.js +15 -17
- package/dist/index326.js +2 -3
- package/dist/index327.js +19 -3
- package/dist/index328.js +2 -3
- package/dist/index329.js +1 -1
- package/dist/index330.js +2 -125
- package/dist/index331.js +4 -2
- package/dist/index332.js +3 -14
- package/dist/index333.js +3 -2
- package/dist/index334.js +3 -19
- package/dist/index335.js +5 -2
- package/dist/index336.js +6 -5
- package/dist/index337.js +3 -5
- package/dist/index338.js +1 -1
- package/dist/index339.js +3 -4
- package/dist/index34.js +8 -8
- package/dist/index340.js +7 -2
- package/dist/index341.js +19 -3
- package/dist/index342.js +9 -3
- package/dist/index343.js +14 -5
- package/dist/index344.js +5 -7
- package/dist/index345.js +5 -17
- package/dist/index346.js +67 -9
- package/dist/index347.js +66 -14
- package/dist/index348.js +228 -5
- package/dist/index349.js +34 -6
- package/dist/index350.js +128 -66
- package/dist/index351.js +396 -65
- package/dist/index352.js +719 -35
- package/dist/index353.js +366 -129
- package/dist/index354.js +53 -394
- package/dist/index355.js +198 -91
- package/dist/index356.js +257 -226
- package/dist/index36.js +4 -4
- package/dist/index360.js +133 -199
- package/dist/index361.js +91 -257
- package/dist/index362.js +2 -134
- package/dist/index363.js +1 -1
- package/dist/index364.js +441 -2
- package/dist/index365.js +114 -427
- package/dist/index366.js +46 -127
- package/dist/index367.js +67 -44
- package/dist/index368.js +516 -66
- package/dist/index369.js +45 -515
- package/dist/index38.js +21 -21
- package/dist/index40.js +7 -7
- package/dist/index42.js +2 -2
- package/dist/index44.js +8 -8
- package/dist/index46.js +6 -6
- package/dist/index50.js +2 -2
- package/dist/index54.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index58.js +2 -2
- package/dist/index60.js +2 -2
- package/dist/index62.js +5 -5
- package/dist/index68.js +1 -1
- package/dist/index74.js +4 -4
- package/dist/index82.js +6 -6
- package/dist/index84.js +1 -1
- package/dist/index86.js +2 -2
- package/dist/index88.js +3 -3
- package/dist/index90.js +1 -1
- package/dist/index93.js +3 -3
- package/dist/index95.js +2 -2
- package/dist/index97.js +5 -5
- package/dist/index99.js +1 -1
- package/package.json +1 -1
- package/dist/index233.js +0 -8
- package/dist/index248.js +0 -53
- package/dist/index278.js +0 -25
- package/dist/index288.js +0 -14
- package/dist/index295.js +0 -12
- package/dist/index298.js +0 -55
- package/dist/index370.js +0 -52
package/dist/index252.js
CHANGED
|
@@ -1,102 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
__name: "CommaBox",
|
|
6
|
-
props: {
|
|
7
|
-
options: {}
|
|
8
|
-
},
|
|
9
|
-
emits: ["option:unselected"],
|
|
10
|
-
setup(m, { expose: h, emit: x }) {
|
|
11
|
-
const t = m, a = x, n = H(null), l = L(() => t.options.some((e) => !e.disabled)), u = (e = 1) => {
|
|
12
|
-
const s = i(n.value) ? -1 : n.value;
|
|
13
|
-
let o = (s + e) % t.options.length;
|
|
14
|
-
for (; t.options[o].disabled && o !== s; )
|
|
15
|
-
o = u(e + 1);
|
|
16
|
-
return o;
|
|
17
|
-
}, b = () => {
|
|
18
|
-
if (!l.value) return;
|
|
19
|
-
const e = u();
|
|
20
|
-
n.value = e;
|
|
21
|
-
}, c = (e = 1) => {
|
|
22
|
-
const s = i(n.value) ? 0 : n.value;
|
|
23
|
-
let o = (s - e + t.options.length) % t.options.length;
|
|
24
|
-
for (; t.options[o].disabled && o !== s; )
|
|
25
|
-
o = c(e + 1);
|
|
26
|
-
return o;
|
|
27
|
-
}, w = async () => {
|
|
28
|
-
if (!l.value) return;
|
|
29
|
-
const e = c();
|
|
30
|
-
n.value = e;
|
|
31
|
-
}, I = () => {
|
|
32
|
-
if (!l.value) return;
|
|
33
|
-
let e = 0;
|
|
34
|
-
for (; t.options[e].disabled; )
|
|
35
|
-
e++;
|
|
36
|
-
n.value = e;
|
|
37
|
-
}, g = () => {
|
|
38
|
-
if (!l.value) return;
|
|
39
|
-
let e = t.options.length - 1;
|
|
40
|
-
for (; t.options[e].disabled && e !== 0; )
|
|
41
|
-
e--;
|
|
42
|
-
n.value = e;
|
|
43
|
-
}, k = () => {
|
|
44
|
-
if (!l.value) return;
|
|
45
|
-
let e = 0;
|
|
46
|
-
for (; !t.options[e].selected && t.options.length !== e; )
|
|
47
|
-
e++;
|
|
48
|
-
n.value = e;
|
|
49
|
-
}, _ = () => {
|
|
50
|
-
if (!l.value) return;
|
|
51
|
-
let e = t.options.length - 1;
|
|
52
|
-
for (; t.options[e].selected && e !== 0; )
|
|
53
|
-
e--;
|
|
54
|
-
n.value = e;
|
|
55
|
-
}, C = (e) => {
|
|
56
|
-
if (!l.value) return;
|
|
57
|
-
const s = t.options.findIndex(
|
|
58
|
-
(o) => o.valueHash === e
|
|
59
|
-
);
|
|
60
|
-
s >= 0 && (n.value = s);
|
|
61
|
-
}, r = () => {
|
|
62
|
-
n.value = null;
|
|
63
|
-
}, y = () => {
|
|
64
|
-
if (i(n.value)) return;
|
|
65
|
-
const e = t.options[n.value];
|
|
66
|
-
e.selected && a("option:unselected", e);
|
|
67
|
-
}, B = () => i(n.value) ? void 0 : t.options[n.value];
|
|
68
|
-
return N(
|
|
69
|
-
() => t.options,
|
|
70
|
-
(e, s) => {
|
|
71
|
-
f(e) !== f(s) && r();
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
flush: "post"
|
|
75
|
-
}
|
|
76
|
-
), h({
|
|
77
|
-
focusNext: b,
|
|
78
|
-
focusPrevious: w,
|
|
79
|
-
focusFirst: I,
|
|
80
|
-
focusFirstSelected: k,
|
|
81
|
-
focusLast: g,
|
|
82
|
-
focusLastSelected: _,
|
|
83
|
-
blur: r,
|
|
84
|
-
confirmOption: y,
|
|
85
|
-
focusByHash: C,
|
|
86
|
-
getHighlighted: B
|
|
87
|
-
}), (e, s) => (v(!0), d(S, null, A(e.options, (o, p) => (v(), d("span", {
|
|
88
|
-
key: o.valueHash,
|
|
89
|
-
class: P({
|
|
90
|
-
"bb-commabox-item": !0,
|
|
91
|
-
"bb-commabox-item--focused": p === n.value,
|
|
92
|
-
"bb-commabox-item--has-comma": p !== e.options.length - 1
|
|
93
|
-
}),
|
|
94
|
-
clearable: !0,
|
|
95
|
-
text: o.text,
|
|
96
|
-
"onClick:clear": O((D) => a("option:unselected", o), ["stop"])
|
|
97
|
-
}, V(o.text), 43, z))), 128));
|
|
98
|
-
}
|
|
99
|
-
});
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./index336.js";
|
|
2
|
+
import { __require as e } from "./index325.js";
|
|
3
|
+
var o = e();
|
|
4
|
+
const m = /* @__PURE__ */ r(o);
|
|
100
5
|
export {
|
|
101
|
-
|
|
6
|
+
m as default
|
|
102
7
|
};
|
package/dist/index253.js
ADDED
package/dist/index254.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./index336.js";
|
|
2
|
+
import { __require as e } from "./index314.js";
|
|
3
|
+
var o = e();
|
|
4
|
+
const m = /* @__PURE__ */ r(o);
|
|
3
5
|
export {
|
|
4
|
-
|
|
6
|
+
m as default
|
|
5
7
|
};
|
package/dist/index255.js
CHANGED
package/dist/index256.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
1
|
+
import { isNil as r } from "./index269.js";
|
|
2
|
+
const e = (t) => r(t) ? !0 : Array.isArray(t) || typeof t == "string" ? t.length === 0 : t instanceof Map || t instanceof Set ? t.size === 0 : typeof t == "number" ? Number.isNaN(t) : typeof t == "boolean" || typeof t == "function" ? !1 : typeof t == "object" ? "length" in t && typeof t.length == "number" ? t.length === 0 : Object.keys(t).length === 0 : !1;
|
|
4
3
|
export {
|
|
5
|
-
e as
|
|
4
|
+
e as isEmpty
|
|
6
5
|
};
|
package/dist/index257.js
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
const a = new RegExp("\\p{Lu}", "u"), f = new RegExp("\\p{Ll}", "u"), R = new RegExp("\\p{N}", "u"), c = /\s/u, d = /[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u, A = new RegExp("\\p{Extended_Pictographic}", "u"), W = /* @__PURE__ */ new Set([
|
|
2
|
+
".",
|
|
3
|
+
",",
|
|
4
|
+
":",
|
|
5
|
+
";",
|
|
6
|
+
"!",
|
|
7
|
+
"|",
|
|
8
|
+
"'",
|
|
9
|
+
"`",
|
|
10
|
+
'"',
|
|
11
|
+
"(",
|
|
12
|
+
")",
|
|
13
|
+
"[",
|
|
14
|
+
"]",
|
|
15
|
+
"{",
|
|
16
|
+
"}"
|
|
17
|
+
]), _ = /* @__PURE__ */ new Set(["-", "_", "/", "\\", "+", "="]), m = /* @__PURE__ */ new Set(["i", "l", "I", "j", "t", "f", "r"]), p = /* @__PURE__ */ new Set(["W", "M", "w", "m", "@", "%", "&", "#"]), I = (t) => c.test(t) ? 0.42 : A.test(t) ? 1.95 : d.test(t) ? 1.8 : W.has(t) ? 0.48 : _.has(t) ? 0.66 : m.has(t) ? 0.72 : p.has(t) ? 1.28 : R.test(t) ? 0.92 : a.test(t) ? 1.08 : f.test(t) ? 0.9 : 1, C = (t, n) => {
|
|
18
|
+
const e = t, i = n.fontWidth * 2, s = n.fontWidth * 0.6, r = n.estimationBias ?? 1, E = Array.from(e).reduce((u, o) => u + I(o) * n.fontWidth, 0);
|
|
19
|
+
return Math.max(
|
|
20
|
+
i,
|
|
21
|
+
(E + s) * r
|
|
22
|
+
);
|
|
23
|
+
}, T = (t) => Math.max(10, t * 1.2);
|
|
20
24
|
export {
|
|
21
|
-
|
|
25
|
+
C as estimateBreadcrumbItemWidth,
|
|
26
|
+
T as estimateEllipsisWidth
|
|
22
27
|
};
|
package/dist/index258.js
CHANGED
package/dist/index259.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
if (t)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
r
|
|
9
|
-
|
|
10
|
-
);
|
|
11
|
-
if (i)
|
|
12
|
-
return i;
|
|
1
|
+
const c = (t, r) => {
|
|
2
|
+
if (typeof t == "string") {
|
|
3
|
+
const e = /^(\d+)([a-zA-Z%]+)?$/, n = t.match(e);
|
|
4
|
+
if (n) {
|
|
5
|
+
const [, o, a] = n;
|
|
6
|
+
return a ? t : o + "px";
|
|
7
|
+
} else if (t in r)
|
|
8
|
+
return r[t] + "px";
|
|
9
|
+
throw new Error(`Invalid size: ${t}`);
|
|
13
10
|
}
|
|
14
|
-
return t;
|
|
15
|
-
}
|
|
11
|
+
return t + "px";
|
|
12
|
+
};
|
|
16
13
|
export {
|
|
17
|
-
|
|
14
|
+
c as parseSize
|
|
18
15
|
};
|
package/dist/index26.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as I, mergeModels as M, useModel as W, computed as h, ref as g, watch as N, onMounted as P, createElementBlock as n, openBlock as r, withModifiers as F, normalizeStyle as O, normalizeClass as q, unref as y, createCommentVNode as f, Fragment as A, createElementVNode as a, renderSlot as s, createTextVNode as K, toDisplayString as T, nextTick as R } from "vue";
|
|
2
|
-
import { parseSize as U } from "./
|
|
2
|
+
import { parseSize as U } from "./index259.js";
|
|
3
3
|
import { useId as D } from "./index8.js";
|
|
4
|
-
import { useLocale as j } from "./
|
|
4
|
+
import { useLocale as j } from "./index227.js";
|
|
5
5
|
import { useMobile as G } from "./index9.js";
|
|
6
|
-
import { useUntil as J } from "./
|
|
6
|
+
import { useUntil as J } from "./index246.js";
|
|
7
7
|
import { wait as w } from "./index145.js";
|
|
8
8
|
import { _config as Q } from "./index4.js";
|
|
9
9
|
const X = ["aria-describedby", "aria-labelledby", "aria-live", "inert"], Y = {
|
package/dist/index260.js
CHANGED
|
@@ -1,88 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class: "bb-cr-container__loading-container"
|
|
6
|
-
}, $ = {
|
|
7
|
-
key: 1,
|
|
8
|
-
class: "bb-cr-container__no-data-container"
|
|
9
|
-
}, C = /* @__PURE__ */ p({
|
|
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: d } = g();
|
|
22
|
-
return (e, T) => (s(), n("span", {
|
|
23
|
-
ref: "container",
|
|
24
|
-
class: r(["bb-cr-container", {
|
|
25
|
-
"bb-cr-container--errors": e.hasErrors,
|
|
26
|
-
"bb-cr-container--horizontal": e.direction === "horizontal",
|
|
27
|
-
"bb-cr-container--vertical": e.direction === "vertical"
|
|
28
|
-
}])
|
|
29
|
-
}, [
|
|
30
|
-
o("span", k, [
|
|
31
|
-
t(e.$slots, "prepend"),
|
|
32
|
-
!e.options.length && e.loading ? (s(), n("span", y, [
|
|
33
|
-
t(e.$slots, "loading", {}, () => [
|
|
34
|
-
l(i(e.loadingText || b(d)("common.loadingText")), 1)
|
|
35
|
-
])
|
|
36
|
-
])) : e.options.length ? h("", !0) : (s(), n("span", $, [
|
|
37
|
-
t(e.$slots, "no-data", {}, () => [
|
|
38
|
-
l(i(e.noDataText || b(d)("common.noDataText")), 1)
|
|
39
|
-
])
|
|
40
|
-
])),
|
|
41
|
-
(s(!0), n(m, null, u(e.options, (a, c) => (s(), n(m, {
|
|
42
|
-
key: a?.valueHash || c
|
|
43
|
-
}, [
|
|
44
|
-
t(e.$slots, "option:prepend", {
|
|
45
|
-
id: a.valueHash,
|
|
46
|
-
checked: !!a.selected,
|
|
47
|
-
disabled: !!a.disabled,
|
|
48
|
-
item: a.item,
|
|
49
|
-
text: a.text
|
|
50
|
-
}),
|
|
51
|
-
o("label", {
|
|
52
|
-
class: r(["bb-cr-container-option", { "bb-base-radio-selected": a.selected }])
|
|
53
|
-
}, [
|
|
54
|
-
t(e.$slots, "input", {
|
|
55
|
-
index: c,
|
|
56
|
-
option: a
|
|
57
|
-
}),
|
|
58
|
-
o("span", {
|
|
59
|
-
class: r({
|
|
60
|
-
"bb-cr-container-option__text": !0,
|
|
61
|
-
"sr-only": e.hideLabel
|
|
62
|
-
})
|
|
63
|
-
}, [
|
|
64
|
-
t(e.$slots, "label", {
|
|
65
|
-
checked: !!a.selected,
|
|
66
|
-
item: a.item,
|
|
67
|
-
text: a.text
|
|
68
|
-
}, () => [
|
|
69
|
-
l(i(a.text), 1)
|
|
70
|
-
])
|
|
71
|
-
], 2)
|
|
72
|
-
], 2),
|
|
73
|
-
t(e.$slots, "option:append", {
|
|
74
|
-
id: a.valueHash,
|
|
75
|
-
checked: !!a.selected,
|
|
76
|
-
disabled: !!a.disabled,
|
|
77
|
-
item: a.item,
|
|
78
|
-
text: a.text
|
|
79
|
-
})
|
|
80
|
-
], 64))), 128)),
|
|
81
|
-
t(e.$slots, "append")
|
|
82
|
-
])
|
|
83
|
-
], 2));
|
|
84
|
-
}
|
|
85
|
-
});
|
|
1
|
+
import { getDefaultExportFromCjs as e } from "./index336.js";
|
|
2
|
+
import { __require as r } from "./index316.js";
|
|
3
|
+
var o = r();
|
|
4
|
+
const f = /* @__PURE__ */ e(o);
|
|
86
5
|
export {
|
|
87
|
-
|
|
6
|
+
f as default
|
|
88
7
|
};
|
package/dist/index261.js
ADDED
package/dist/index262.js
CHANGED
|
@@ -1,32 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const u = async (...i) => {
|
|
7
|
-
if (Array.isArray(e.value)) {
|
|
8
|
-
t.value = e.value;
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
if (typeof e.value != "function") return;
|
|
12
|
-
const f = ++a;
|
|
13
|
-
r.value++;
|
|
14
|
-
try {
|
|
15
|
-
const n = await e.value(...i);
|
|
16
|
-
f === a && (t.value = n);
|
|
17
|
-
} catch (n) {
|
|
18
|
-
console.error(n);
|
|
19
|
-
} finally {
|
|
20
|
-
r.value--;
|
|
21
|
-
}
|
|
22
|
-
}, l = m(u, o.debounce || 0);
|
|
23
|
-
return {
|
|
24
|
-
getter: u,
|
|
25
|
-
debouncedGetter: l,
|
|
26
|
-
items: t,
|
|
27
|
-
loading: s(() => r.value > 0)
|
|
28
|
-
};
|
|
29
|
-
};
|
|
1
|
+
function e(t, r) {
|
|
2
|
+
if (!/\d{4}-\d{2}-\d{2}/.test(t))
|
|
3
|
+
throw new Error(`${r} must be in the format YYYY-MM-DD`);
|
|
4
|
+
return t;
|
|
5
|
+
}
|
|
30
6
|
export {
|
|
31
|
-
|
|
7
|
+
e as validateDateFormat
|
|
32
8
|
};
|