bitboss-ui 2.0.34 → 2.0.36
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/index104.js +109 -106
- package/dist/index106.js +5 -5
- package/dist/index114.js +1 -1
- package/dist/index116.js +5 -5
- package/dist/index118.js +1 -1
- package/dist/index121.js +4 -4
- package/dist/index122.js +1 -1
- package/dist/index123.js +1 -1
- package/dist/index124.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index128.js +2 -2
- package/dist/index13.js +1 -1
- package/dist/index15.js +3 -3
- package/dist/index17.js +2 -2
- package/dist/index19.js +14 -14
- package/dist/index198.js +2 -2
- package/dist/index199.js +116 -4
- package/dist/index200.js +8 -2
- package/dist/index201.js +43 -5
- package/dist/index203.js +13 -16
- package/dist/index204.js +156 -17
- package/dist/index205.js +84 -19
- package/dist/index207.js +2 -3
- package/dist/index208.js +4 -2
- package/dist/index209.js +2 -8
- package/dist/index21.js +14 -14
- package/dist/index210.js +3 -249
- package/dist/index211.js +35 -52
- package/dist/index212.js +5 -43
- package/dist/index213.js +7 -5
- package/dist/index214.js +125 -48
- package/dist/index215.js +5 -126
- package/dist/index216.js +2 -2
- package/dist/index217.js +19 -2
- package/dist/index218.js +16 -35
- package/dist/index219.js +14 -172
- package/dist/index220.js +2 -6
- package/dist/index221.js +2 -43
- package/dist/index222.js +176 -0
- package/dist/index223.js +4 -12
- package/dist/index224.js +369 -5
- package/dist/index225.js +17 -367
- package/dist/index226.js +27 -2
- package/dist/index227.js +3 -3
- package/dist/index228.js +249 -7
- package/dist/index229.js +51 -115
- package/dist/index23.js +5 -5
- package/dist/index230.js +44 -3
- package/dist/index231.js +5 -158
- package/dist/index232.js +42 -77
- package/dist/index233.js +5 -0
- package/dist/index234.js +106 -2
- package/dist/index236.js +99 -17
- package/dist/index238.js +4 -0
- package/dist/index239.js +17 -99
- package/dist/index240.js +4 -0
- package/dist/index243.js +3 -4
- package/dist/index244.js +9 -281
- package/dist/index245.js +23 -6
- package/dist/index246.js +6 -2
- package/dist/index247.js +16 -2
- package/dist/index248.js +9 -2
- package/dist/index249.js +3 -2
- package/dist/index25.js +1 -1
- package/dist/index251.js +7 -2
- package/dist/index252.js +3 -2
- package/dist/index253.js +12 -2
- package/dist/index254.js +9 -2
- package/dist/index255.js +9 -2
- package/dist/index256.js +14 -25
- package/dist/index257.js +4 -22
- package/dist/index258.js +433 -0
- package/dist/index259.js +88 -6
- package/dist/index260.js +281 -2
- package/dist/index261.js +5 -125
- package/dist/index262.js +2 -431
- package/dist/index263.js +2 -3
- package/dist/index265.js +2 -22
- package/dist/index266.js +4 -0
- package/dist/index267.js +119 -82
- package/dist/index268.js +22 -9
- package/dist/index27.js +3 -3
- package/dist/index270.js +198 -7
- package/dist/index271.js +436 -23
- package/dist/index272.js +127 -6
- package/dist/index273.js +2 -16
- package/dist/index274.js +2 -200
- package/dist/index275.js +2 -436
- package/dist/index276.js +2 -127
- package/dist/index277.js +2 -224
- package/dist/index278.js +2 -3
- package/dist/index279.js +28 -12
- package/dist/index280.js +21 -8
- package/dist/index282.js +224 -17
- package/dist/index283.js +2 -34
- package/dist/index284.js +1 -1
- package/dist/index285.js +211 -3
- package/dist/index286.js +60 -205
- package/dist/index287.js +5 -2
- package/dist/index288.js +2 -7
- package/dist/index289.js +78 -18
- package/dist/index29.js +2 -2
- package/dist/index292.js +4 -5
- package/dist/index293.js +4 -66
- package/dist/index294.js +57 -77
- package/dist/index295.js +37 -0
- package/dist/index296.js +11 -4
- package/dist/index297.js +2 -4
- package/dist/index298.js +6 -58
- package/dist/index299.js +18 -10
- package/dist/index300.js +49 -0
- package/dist/index301.js +6 -46
- package/dist/index302.js +480 -2
- package/dist/index31.js +2 -2
- package/dist/index33.js +3 -3
- package/dist/index35.js +13 -13
- package/dist/index37.js +4 -4
- package/dist/index39.js +2 -2
- package/dist/index41.js +2 -2
- package/dist/index43.js +6 -6
- package/dist/index45.js +2 -2
- package/dist/index47.js +2 -2
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index71.js +3 -3
- package/dist/index75.js +2 -2
- package/dist/index77.js +1 -1
- package/dist/index80.js +2 -2
- package/dist/index82.js +1 -1
- package/dist/index84.js +3 -3
- package/dist/index86.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index202.js +0 -18
- package/dist/index206.js +0 -29
- package/dist/index235.js +0 -4
- package/dist/index237.js +0 -108
- package/dist/index269.js +0 -5
- package/dist/index281.js +0 -11
- package/dist/index290.js +0 -9
- package/dist/index303.js +0 -482
- /package/dist/{index250.js → index264.js} +0 -0
package/dist/index229.js
CHANGED
@@ -1,118 +1,54 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
import { defineComponent as p, ref as b, watch as _, computed as m, openBlock as d, createElementBlock as c, normalizeClass as u, createElementVNode as t, createVNode as h, withCtx as f, toDisplayString as o } from "vue";
|
2
|
+
import k from "./index231.js";
|
3
|
+
const y = { class: "bb-base-date-picker__year-container" }, v = {
|
4
|
+
"aria-live": "polite",
|
5
|
+
class: "bb-base-date-picker__selected-day-label"
|
6
|
+
}, B = { class: "bb-base-date-picker__weekday" }, D = { class: "bb-base-date-picker__monthday" }, M = { class: "bb-base-date-picker__month-button" }, C = /* @__PURE__ */ p({
|
7
|
+
__name: "BaseDatePickerHeader",
|
8
|
+
props: {
|
9
|
+
cursor: {},
|
10
|
+
disabled: { type: Boolean },
|
11
|
+
hidden: { type: Boolean }
|
12
|
+
},
|
13
|
+
emits: ["mode:year", "mode:month"],
|
14
|
+
setup(n) {
|
15
|
+
const s = n, r = b("top"), l = (e, a) => {
|
16
|
+
e && a && (r.value = e.isBefore(a) ? "top" : "bottom");
|
17
|
+
};
|
18
|
+
_(
|
19
|
+
() => s.cursor,
|
20
|
+
(e, a) => {
|
21
|
+
l(e, a);
|
22
|
+
}
|
23
|
+
);
|
24
|
+
const i = m(() => s.cursor.format("YYYY"));
|
25
|
+
return (e, a) => (d(), c("div", {
|
26
|
+
class: u(["bb-base-date-picker__header", { "bb-base-date-picker__header--hidden": e.hidden }])
|
27
|
+
}, [
|
28
|
+
t("div", y, [
|
29
|
+
h(k, {
|
30
|
+
direction: r.value,
|
31
|
+
duration: 500,
|
32
|
+
gap: 30
|
33
|
+
}, {
|
34
|
+
default: f(() => [
|
35
|
+
(d(), c("span", {
|
36
|
+
key: i.value,
|
37
|
+
"aria-live": "polite",
|
38
|
+
class: "bb-base-date-picker__year-button"
|
39
|
+
}, o(i.value), 1))
|
40
|
+
]),
|
41
|
+
_: 1
|
42
|
+
}, 8, ["direction"])
|
43
|
+
]),
|
44
|
+
t("div", v, [
|
45
|
+
t("span", B, o(e.cursor.format("ddd")) + ", ", 1),
|
46
|
+
t("span", D, o(e.cursor.format("DD")), 1),
|
47
|
+
t("span", M, o(e.cursor.format("MMMM")), 1)
|
48
|
+
])
|
49
|
+
], 2));
|
17
50
|
}
|
18
|
-
|
19
|
-
}
|
20
|
-
const R = (t) => t();
|
21
|
-
function k(t, r = {}) {
|
22
|
-
let e, n, o = p;
|
23
|
-
const i = (l) => {
|
24
|
-
clearTimeout(l), o(), o = p;
|
25
|
-
};
|
26
|
-
return (l) => {
|
27
|
-
const c = d(t), u = d(r.maxWait);
|
28
|
-
return e && i(e), c <= 0 || u !== void 0 && u <= 0 ? (n && (i(n), n = null), Promise.resolve(l())) : new Promise((a, w) => {
|
29
|
-
o = r.rejectOnCancel ? w : a, u && !n && (n = setTimeout(() => {
|
30
|
-
e && i(e), n = null, a(l());
|
31
|
-
}, u)), e = setTimeout(() => {
|
32
|
-
n && i(n), n = null, a(l());
|
33
|
-
}, c);
|
34
|
-
});
|
35
|
-
};
|
36
|
-
}
|
37
|
-
function b(...t) {
|
38
|
-
let r = 0, e, n = !0, o = p, i, s, l, c, u;
|
39
|
-
!x(t[0]) && typeof t[0] == "object" ? { delay: s, trailing: l = !0, leading: c = !0, rejectOnCancel: u = !1 } = t[0] : [s, l = !0, c = !0, u = !1] = t;
|
40
|
-
const a = () => {
|
41
|
-
e && (clearTimeout(e), e = void 0, o(), o = p);
|
42
|
-
};
|
43
|
-
return (g) => {
|
44
|
-
const f = d(s), T = Date.now() - r, m = () => i = g();
|
45
|
-
return a(), f <= 0 ? (r = Date.now(), m()) : (T > f && (c || !n) ? (r = Date.now(), m()) : l && (i = new Promise((y, j) => {
|
46
|
-
o = u ? j : y, e = setTimeout(() => {
|
47
|
-
r = Date.now(), n = !0, y(m()), a();
|
48
|
-
}, Math.max(0, f - T));
|
49
|
-
})), !c && !e && (e = setTimeout(() => n = !0, f)), n = !1, i);
|
50
|
-
};
|
51
|
-
}
|
52
|
-
function v(t) {
|
53
|
-
return P();
|
54
|
-
}
|
55
|
-
function N(t, r = 200, e = {}) {
|
56
|
-
return h(
|
57
|
-
k(r, e),
|
58
|
-
t
|
59
|
-
);
|
60
|
-
}
|
61
|
-
function _(t, r = 200, e = !1, n = !0, o = !1) {
|
62
|
-
return h(
|
63
|
-
b(r, e, n, o),
|
64
|
-
t
|
65
|
-
);
|
66
|
-
}
|
67
|
-
function G(t, r, e = {}) {
|
68
|
-
const {
|
69
|
-
eventFilter: n = R,
|
70
|
-
...o
|
71
|
-
} = e;
|
72
|
-
return S(
|
73
|
-
t,
|
74
|
-
h(
|
75
|
-
n,
|
76
|
-
r
|
77
|
-
),
|
78
|
-
o
|
79
|
-
);
|
80
|
-
}
|
81
|
-
function q(t, r = !0, e) {
|
82
|
-
v() ? C(t, e) : r ? t() : W(t);
|
83
|
-
}
|
84
|
-
function z(t, r, e = {}) {
|
85
|
-
const {
|
86
|
-
throttle: n = 0,
|
87
|
-
trailing: o = !0,
|
88
|
-
leading: i = !0,
|
89
|
-
...s
|
90
|
-
} = e;
|
91
|
-
return G(
|
92
|
-
t,
|
93
|
-
r,
|
94
|
-
{
|
95
|
-
...s,
|
96
|
-
eventFilter: b(n, o, i)
|
97
|
-
}
|
98
|
-
);
|
99
|
-
}
|
51
|
+
});
|
100
52
|
export {
|
101
|
-
|
102
|
-
h as createFilterWrapper,
|
103
|
-
k as debounceFilter,
|
104
|
-
v as getLifeCycleTarget,
|
105
|
-
A as isClient,
|
106
|
-
I as isObject,
|
107
|
-
p as noop,
|
108
|
-
E as notNullish,
|
109
|
-
b as throttleFilter,
|
110
|
-
z as throttledWatch,
|
111
|
-
d as toValue,
|
112
|
-
q as tryOnMounted,
|
113
|
-
V as tryOnScopeDispose,
|
114
|
-
N as useDebounceFn,
|
115
|
-
_ as useThrottleFn,
|
116
|
-
z as watchThrottled,
|
117
|
-
G as watchWithFilter
|
53
|
+
C as default
|
118
54
|
};
|
package/dist/index23.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as ae, ref as o, getCurrentInstance as se, computed as m, nextTick as N, useAttrs as ne, onMounted as ie, onBeforeUnmount as F, watch as re, openBlock as _, createBlock as ue, Teleport as de, createElementVNode as a, mergeProps as G, createElementBlock as T, renderSlot as u, createTextVNode as ce, toDisplayString as P, createCommentVNode as z } from "vue";
|
2
|
-
import { throttle as ve } from "./
|
3
|
-
import { useFocusTrap as fe } from "./
|
2
|
+
import { throttle as ve } from "./index210.js";
|
3
|
+
import { useFocusTrap as fe } from "./index211.js";
|
4
4
|
import { useId as K } from "./index8.js";
|
5
5
|
import { wait as H } from "./index127.js";
|
6
|
-
import { waitFor as be } from "./
|
7
|
-
import { useModalsState as k } from "./
|
8
|
-
import { useLogger as pe } from "./
|
6
|
+
import { waitFor as be } from "./index212.js";
|
7
|
+
import { useModalsState as k } from "./index213.js";
|
8
|
+
import { useLogger as pe } from "./index200.js";
|
9
9
|
const me = { class: "bb-base-dialog-close" }, ge = ["aria-label"], ye = /* @__PURE__ */ a("span", { class: "bb-base-dialog-close__icon" }, [
|
10
10
|
/* @__PURE__ */ a("svg", {
|
11
11
|
"aria-hidden": "true",
|
package/dist/index230.js
CHANGED
@@ -1,5 +1,46 @@
|
|
1
|
-
import
|
2
|
-
|
1
|
+
import { defineComponent as _, computed as a, openBlock as o, createElementBlock as c, createElementVNode as p, Fragment as b, renderList as h, createBlock as k, normalizeClass as f, withCtx as y, createTextVNode as x, toDisplayString as B } from "vue";
|
2
|
+
import C from "./index13.js";
|
3
|
+
/* empty css */
|
4
|
+
const M = { class: "bb-base-date-picker__button-menu bb-base-date-picker__month-selector" }, v = { class: "content" }, E = /* @__PURE__ */ _({
|
5
|
+
__name: "BaseDatePickerMonthSelector",
|
6
|
+
props: {
|
7
|
+
cursor: {},
|
8
|
+
disabled: { type: Boolean }
|
9
|
+
},
|
10
|
+
emits: ["update:month"],
|
11
|
+
setup(l, { emit: d }) {
|
12
|
+
const s = l, m = d, i = a(() => s.cursor.month()), u = a(
|
13
|
+
() => new Array(12).fill(0).map((r, t) => {
|
14
|
+
const n = s.cursor.clone().startOf("year").add(t, "month");
|
15
|
+
return {
|
16
|
+
text: n.format("MMMM"),
|
17
|
+
key: n.unix(),
|
18
|
+
selected: n.month() === i.value,
|
19
|
+
handler: () => m("update:month", t)
|
20
|
+
};
|
21
|
+
})
|
22
|
+
);
|
23
|
+
return (r, t) => (o(), c("div", M, [
|
24
|
+
p("div", v, [
|
25
|
+
(o(!0), c(b, null, h(u.value, (e) => (o(), k(C, {
|
26
|
+
key: e.key,
|
27
|
+
class: f({
|
28
|
+
content__btn: !0,
|
29
|
+
"content__btn--selected": e.selected
|
30
|
+
}),
|
31
|
+
disabled: r.disabled,
|
32
|
+
type: "button",
|
33
|
+
onClick: e.handler
|
34
|
+
}, {
|
35
|
+
default: y(() => [
|
36
|
+
x(B(e.text), 1)
|
37
|
+
]),
|
38
|
+
_: 2
|
39
|
+
}, 1032, ["class", "disabled", "onClick"]))), 128))
|
40
|
+
])
|
41
|
+
]));
|
42
|
+
}
|
43
|
+
});
|
3
44
|
export {
|
4
|
-
|
45
|
+
E as default
|
5
46
|
};
|
package/dist/index231.js
CHANGED
@@ -1,160 +1,7 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
import
|
4
|
-
|
5
|
-
import { useItemValue as ee } from "./index281.js";
|
6
|
-
import { useItemText as te } from "./index282.js";
|
7
|
-
import { hash as v } from "./index207.js";
|
8
|
-
import { isNotNil as q } from "./index130.js";
|
9
|
-
import { waitFor as le } from "./index220.js";
|
10
|
-
import { isNil as oe } from "./index125.js";
|
11
|
-
const he = (l) => {
|
12
|
-
const i = a(""), F = a(), u = (e) => {
|
13
|
-
F.value = e, l.emit("update:modelValue", e);
|
14
|
-
}, d = a([]), {
|
15
|
-
array: k,
|
16
|
-
add: E,
|
17
|
-
remove: P,
|
18
|
-
set: y
|
19
|
-
} = Q(), {
|
20
|
-
array: S,
|
21
|
-
add: j,
|
22
|
-
remove: J
|
23
|
-
} = Q(), { getItemText: L } = te(), { getItemValue: U } = ee(), O = (e) => {
|
24
|
-
const t = !!(l.disabled.value || e.disabled), o = L(e, l.itemText), n = U(e, l.itemValue);
|
25
|
-
if (n === void 0)
|
26
|
-
throw new Error(
|
27
|
-
'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(e) + " please check itemValue property is correct."
|
28
|
-
);
|
29
|
-
const X = v(n);
|
30
|
-
return {
|
31
|
-
item: e,
|
32
|
-
text: o,
|
33
|
-
value: n,
|
34
|
-
valueHash: X,
|
35
|
-
disabled: t,
|
36
|
-
selected: !1
|
37
|
-
};
|
38
|
-
}, T = (e) => (e.selected = q(b.value[e.valueHash]), e), V = r(() => {
|
39
|
-
const e = [].concat(
|
40
|
-
d.value.map((t) => T(O(t))),
|
41
|
-
S.value.map(T),
|
42
|
-
k.value.map(T)
|
43
|
-
);
|
44
|
-
return $(e, (t) => t.valueHash);
|
45
|
-
}), z = (e) => {
|
46
|
-
l.multiple ? (u(l.modelValue.value.concat(e.value)), l.stash && E(e), l.resetQueryOnOptionSelected && s()) : (l.stash && y(e), u(e.value), N(() => s()));
|
47
|
-
}, G = async (e) => {
|
48
|
-
if (J((t) => t.valueHash !== e.valueHash), P((t) => t.valueHash !== e.valueHash), l.multiple) {
|
49
|
-
const t = { ...b.value };
|
50
|
-
delete t[e.valueHash], u(Object.values(t));
|
51
|
-
} else
|
52
|
-
u(null), await N(), s();
|
53
|
-
}, b = r(() => {
|
54
|
-
const e = {}, t = [].concat(l.modelValue.value);
|
55
|
-
for (let o = 0; o < t.length; o++) {
|
56
|
-
const n = t[o];
|
57
|
-
e[v(n)] = n;
|
58
|
-
}
|
59
|
-
return e;
|
60
|
-
}), g = async ({ prefill: e = !1 }) => {
|
61
|
-
let t = [];
|
62
|
-
if (Array.isArray(l.items.value))
|
63
|
-
t = l.items.value;
|
64
|
-
else if (typeof l.items.value == "function") {
|
65
|
-
const o = ++c.value;
|
66
|
-
try {
|
67
|
-
t = await l.items.value(
|
68
|
-
i.value,
|
69
|
-
e,
|
70
|
-
l.modelValue.value
|
71
|
-
), o < c.value && (await le(() => o === c.value), t = d.value);
|
72
|
-
} catch (n) {
|
73
|
-
console.error(n);
|
74
|
-
}
|
75
|
-
c.value--;
|
76
|
-
}
|
77
|
-
d.value = t;
|
78
|
-
}, B = r(() => {
|
79
|
-
const e = {};
|
80
|
-
for (let t = 0; t < V.value.length; t++) {
|
81
|
-
const o = V.value[t], { valueHash: n } = o;
|
82
|
-
e[n] = o;
|
83
|
-
}
|
84
|
-
return {
|
85
|
-
get: (t) => e[v(t)]
|
86
|
-
};
|
87
|
-
}), f = r(() => [].concat(l.modelValue.value).reduce((e, t) => {
|
88
|
-
const o = B.value.get(t);
|
89
|
-
return o && e.push(o), e;
|
90
|
-
}, [])), C = (e) => q(B.value.get(e)), s = () => {
|
91
|
-
if (l.multiple) {
|
92
|
-
i.value = "";
|
93
|
-
return;
|
94
|
-
}
|
95
|
-
let e;
|
96
|
-
f.value && (e = _(f.value)), i.value = (e == null ? void 0 : e.text) || "";
|
97
|
-
}, K = () => {
|
98
|
-
const e = i.value.trim(), t = O(e);
|
99
|
-
j(t), s();
|
100
|
-
}, c = a(0), M = r(() => [].concat(l.modelValue.value).reduce(
|
101
|
-
(e, t) => (C(t) ? e.coherent.push(t) : e.incoherent.push(t), e),
|
102
|
-
{ coherent: [], incoherent: [] }
|
103
|
-
)), A = r(() => l.multiple && !l.modelValue.value.length || !l.multiple && oe(l.modelValue.value) ? !0 : !M.value.incoherent.length), R = () => {
|
104
|
-
l.enforceCoherence && !A.value && (l.multiple ? u(M.value.coherent) : u(null));
|
105
|
-
}, p = a(!1), I = a(!1), m = async () => {
|
106
|
-
I.value = !0, await g({ prefill: !0 }), R(), s(), p.value = !0, I.value = !1;
|
107
|
-
};
|
108
|
-
Y(async () => {
|
109
|
-
l.prefill && (await m(), l.stash && y(...f.value));
|
110
|
-
});
|
111
|
-
let h;
|
112
|
-
const W = () => {
|
113
|
-
h && clearTimeout(h), h = setTimeout(async () => {
|
114
|
-
try {
|
115
|
-
await g({ prefill: !1 });
|
116
|
-
} catch (e) {
|
117
|
-
console.error(e);
|
118
|
-
}
|
119
|
-
}, l.queryDebounceTime);
|
120
|
-
};
|
121
|
-
Z(() => clearTimeout(h));
|
122
|
-
let x;
|
123
|
-
H(
|
124
|
-
() => l.modelValue.value,
|
125
|
-
() => {
|
126
|
-
A.value || (x && clearTimeout(x), x = setTimeout(async () => {
|
127
|
-
m();
|
128
|
-
}, l.modelValueDebounceTime));
|
129
|
-
}
|
130
|
-
);
|
131
|
-
let w;
|
132
|
-
const D = async (e, t) => {
|
133
|
-
v(t) !== v(e) && p.value && (w && clearTimeout(w), w = setTimeout(async () => {
|
134
|
-
await m();
|
135
|
-
}, l.depsDebounceTime));
|
136
|
-
};
|
137
|
-
return H(() => l.items.value, D), H(() => l.dependencies.value, D), {
|
138
|
-
addCurrentQueryToManualItems: K,
|
139
|
-
alignQueryToState: s,
|
140
|
-
getOptions: g,
|
141
|
-
hasPrefilled: p,
|
142
|
-
innerLoading: c,
|
143
|
-
isPrefilling: I,
|
144
|
-
manualItems: S,
|
145
|
-
options: V,
|
146
|
-
prefillItems: m,
|
147
|
-
query: i,
|
148
|
-
searchByQuery: W,
|
149
|
-
selectedOptions: f,
|
150
|
-
selectOption: z,
|
151
|
-
setStash: y,
|
152
|
-
unselectOption: G,
|
153
|
-
updateModelValue: u,
|
154
|
-
valueIsSelected: C,
|
155
|
-
internalItems: d
|
156
|
-
};
|
157
|
-
};
|
1
|
+
import o from "./index280.js";
|
2
|
+
/* empty css */
|
3
|
+
import t from "./index251.js";
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8c6b13bd"]]);
|
158
5
|
export {
|
159
|
-
|
6
|
+
m as default
|
160
7
|
};
|
package/dist/index232.js
CHANGED
@@ -1,86 +1,51 @@
|
|
1
|
-
import { defineComponent as b,
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
},
|
6
|
-
|
7
|
-
class: "bb-cr-container__no-data-container"
|
8
|
-
}, f = /* @__PURE__ */ b({
|
9
|
-
__name: "OptionsContainer",
|
1
|
+
import { defineComponent as p, ref as _, computed as b, onMounted as f, openBlock as n, createElementBlock as o, createElementVNode as k, Fragment as y, renderList as h, unref as g, createBlock as v, normalizeClass as x, withCtx as B, createTextVNode as C, toDisplayString as E } from "vue";
|
2
|
+
import { range as w } from "./index301.js";
|
3
|
+
import D from "./index13.js";
|
4
|
+
/* empty css */
|
5
|
+
const S = { class: "content" }, c = 100, V = /* @__PURE__ */ p({
|
6
|
+
__name: "BaseDatePickerYearSelector",
|
10
7
|
props: {
|
11
|
-
|
12
|
-
|
13
|
-
hideLabel: { type: Boolean },
|
14
|
-
loadingText: {},
|
15
|
-
loading: { type: Boolean },
|
16
|
-
noDataText: {},
|
17
|
-
options: {}
|
8
|
+
cursor: {},
|
9
|
+
disabled: { type: Boolean }
|
18
10
|
},
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
11
|
+
emits: ["update:year"],
|
12
|
+
setup(s, { emit: l }) {
|
13
|
+
const i = s, d = l, r = _(), u = b(() => i.cursor.year()), a = (/* @__PURE__ */ new Date()).getFullYear() - c / 2, m = w(a, a + c).map((e) => ({
|
14
|
+
text: e,
|
15
|
+
key: e,
|
16
|
+
selected: e === u.value,
|
17
|
+
handler: () => d("update:year", e)
|
18
|
+
}));
|
19
|
+
return f(() => {
|
20
|
+
if (!r.value) return;
|
21
|
+
const e = r.value.querySelector(
|
22
|
+
".content__btn--selected"
|
23
|
+
);
|
24
|
+
e && (e.parentElement.scrollTop = e.offsetTop - e.parentElement.clientHeight / 2 + 16);
|
25
|
+
}), (e, T) => (n(), o("div", {
|
26
|
+
ref_key: "container",
|
27
|
+
ref: r,
|
28
|
+
class: "bb-base-date-picker__button-menu bb-base-date-picker__year-selector scrollbar-border"
|
27
29
|
}, [
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
])) : a.options.length ? h("", !0) : (s(), n("span", g, [
|
35
|
-
t(a.$slots, "no-data", {}, () => [
|
36
|
-
o(d(a.noDataText), 1)
|
37
|
-
])
|
38
|
-
])),
|
39
|
-
(s(!0), n(c, null, m(a.options, (e, i) => (s(), n(c, {
|
40
|
-
key: (e == null ? void 0 : e.id) || i
|
41
|
-
}, [
|
42
|
-
t(a.$slots, "option:prepend", {
|
43
|
-
id: e.valueHash,
|
44
|
-
checked: !!e.selected,
|
45
|
-
disabled: !!e.disabled,
|
46
|
-
item: e.item,
|
47
|
-
text: e.text
|
30
|
+
k("div", S, [
|
31
|
+
(n(!0), o(y, null, h(g(m), (t) => (n(), v(D, {
|
32
|
+
key: t.key,
|
33
|
+
class: x({
|
34
|
+
content__btn: !0,
|
35
|
+
"content__btn--selected": t.selected
|
48
36
|
}),
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
class: r({
|
58
|
-
"bb-cr-container-option__text": !0,
|
59
|
-
"sr-only": a.hideLabel
|
60
|
-
})
|
61
|
-
}, [
|
62
|
-
t(a.$slots, "label", {
|
63
|
-
checked: !!e.selected,
|
64
|
-
item: e.item,
|
65
|
-
text: e.text
|
66
|
-
}, () => [
|
67
|
-
o(d(e.text), 1)
|
68
|
-
])
|
69
|
-
], 2)
|
70
|
-
], 2),
|
71
|
-
t(a.$slots, "option:append", {
|
72
|
-
id: e.valueHash,
|
73
|
-
checked: !!e.selected,
|
74
|
-
disabled: !!e.disabled,
|
75
|
-
item: e.item,
|
76
|
-
text: e.text
|
77
|
-
})
|
78
|
-
], 64))), 128)),
|
79
|
-
t(a.$slots, "append")
|
37
|
+
disabled: e.disabled,
|
38
|
+
onClick: t.handler
|
39
|
+
}, {
|
40
|
+
default: B(() => [
|
41
|
+
C(E(t.text), 1)
|
42
|
+
]),
|
43
|
+
_: 2
|
44
|
+
}, 1032, ["class", "disabled", "onClick"]))), 128))
|
80
45
|
])
|
81
|
-
],
|
46
|
+
], 512));
|
82
47
|
}
|
83
48
|
});
|
84
49
|
export {
|
85
|
-
|
50
|
+
V as default
|
86
51
|
};
|
package/dist/index233.js
ADDED
package/dist/index234.js
CHANGED
@@ -1,4 +1,108 @@
|
|
1
|
-
|
1
|
+
import { defineComponent as y, ref as F, computed as H, watch as N, openBlock as p, createElementBlock as L, Fragment as S, renderList as V, createBlock as A, normalizeClass as O, withModifiers as P, withCtx as $, createTextVNode as z, toDisplayString as D } from "vue";
|
2
|
+
import { hash as d } from "./index227.js";
|
3
|
+
import { isNil as l } from "./index125.js";
|
4
|
+
import E from "./index120.js";
|
5
|
+
/* empty css */
|
6
|
+
const K = /* @__PURE__ */ y({
|
7
|
+
__name: "ChipsBox",
|
8
|
+
props: {
|
9
|
+
options: {}
|
10
|
+
},
|
11
|
+
emits: ["option:unselected"],
|
12
|
+
setup(f, { expose: v, emit: h }) {
|
13
|
+
const t = f, u = h, n = F(null), i = H(() => t.options.some((e) => !e.disabled)), a = (e = 1) => {
|
14
|
+
const s = l(n.value) ? -1 : n.value;
|
15
|
+
let o = (s + e) % t.options.length;
|
16
|
+
for (; t.options[o].disabled && o !== s; )
|
17
|
+
o = a(e + 1);
|
18
|
+
return o;
|
19
|
+
}, x = () => {
|
20
|
+
if (!i.value) return;
|
21
|
+
const e = a();
|
22
|
+
n.value = e;
|
23
|
+
}, c = (e = 1) => {
|
24
|
+
const s = l(n.value) ? 0 : n.value;
|
25
|
+
let o = (s - e + t.options.length) % t.options.length;
|
26
|
+
for (; t.options[o].disabled && o !== s; )
|
27
|
+
o = c(e + 1);
|
28
|
+
return o;
|
29
|
+
}, m = async () => {
|
30
|
+
if (!i.value) return;
|
31
|
+
const e = c();
|
32
|
+
n.value = e;
|
33
|
+
}, w = () => {
|
34
|
+
if (!i.value) return;
|
35
|
+
let e = 0;
|
36
|
+
for (; t.options[e].disabled; )
|
37
|
+
e++;
|
38
|
+
n.value = e;
|
39
|
+
}, b = () => {
|
40
|
+
if (!i.value) return;
|
41
|
+
let e = t.options.length - 1;
|
42
|
+
for (; t.options[e].disabled && e !== 0; )
|
43
|
+
e--;
|
44
|
+
n.value = e;
|
45
|
+
}, I = () => {
|
46
|
+
if (!i.value) return;
|
47
|
+
let e = 0;
|
48
|
+
for (; !t.options[e].selected && t.options.length !== e; )
|
49
|
+
e++;
|
50
|
+
n.value = e;
|
51
|
+
}, g = () => {
|
52
|
+
if (!i.value) return;
|
53
|
+
let e = t.options.length - 1;
|
54
|
+
for (; t.options[e].selected && e !== 0; )
|
55
|
+
e--;
|
56
|
+
n.value = e;
|
57
|
+
}, _ = (e) => {
|
58
|
+
if (!i.value) return;
|
59
|
+
const s = t.options.findIndex(
|
60
|
+
(o) => o.valueHash === e
|
61
|
+
);
|
62
|
+
s >= 0 && (n.value = s);
|
63
|
+
}, r = () => {
|
64
|
+
n.value = null;
|
65
|
+
}, k = () => {
|
66
|
+
if (l(n.value)) return;
|
67
|
+
const e = t.options[n.value];
|
68
|
+
e.selected && u("option:unselected", e);
|
69
|
+
}, C = () => l(n.value) ? void 0 : t.options[n.value];
|
70
|
+
return N(
|
71
|
+
() => t.options,
|
72
|
+
(e, s) => {
|
73
|
+
d(e) !== d(s) && r();
|
74
|
+
},
|
75
|
+
{
|
76
|
+
flush: "post"
|
77
|
+
}
|
78
|
+
), v({
|
79
|
+
focusNext: x,
|
80
|
+
focusPrevious: m,
|
81
|
+
focusFirst: w,
|
82
|
+
focusFirstSelected: I,
|
83
|
+
focusLast: b,
|
84
|
+
focusLastSelected: g,
|
85
|
+
blur: r,
|
86
|
+
confirmOption: k,
|
87
|
+
focusByHash: _,
|
88
|
+
getHighlighted: C
|
89
|
+
}), (e, s) => (p(!0), L(S, null, V(e.options, (o, B) => (p(), A(E, {
|
90
|
+
key: o.valueHash,
|
91
|
+
class: O({
|
92
|
+
"bb-chipsbox-item": !0,
|
93
|
+
"bb-chipsbox-item--focused": B === n.value
|
94
|
+
}),
|
95
|
+
clearable: !0,
|
96
|
+
text: o.text,
|
97
|
+
"onClick:clear": P((M) => u("option:unselected", o), ["stop"])
|
98
|
+
}, {
|
99
|
+
default: $(() => [
|
100
|
+
z(D(o.text), 1)
|
101
|
+
]),
|
102
|
+
_: 2
|
103
|
+
}, 1032, ["class", "text", "onClick:clear"]))), 128));
|
104
|
+
}
|
105
|
+
});
|
2
106
|
export {
|
3
|
-
|
107
|
+
K as default
|
4
108
|
};
|