bitboss-ui 0.2.57 → 0.2.59
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/BaseSelect/BaseSelect.vue.d.ts +89 -159
- package/dist/components/BbSelect/BbSelect.vue.d.ts +0 -7
- package/dist/index101.js +3 -3
- package/dist/index103.js +2 -2
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index111.js +4 -4
- package/dist/index113.js +1 -1
- package/dist/index116.js +1 -1
- package/dist/index117.js +1 -1
- package/dist/index118.js +1 -1
- package/dist/index119.js +1 -1
- package/dist/index121.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index131.js +2 -2
- package/dist/index15.js +8 -8
- package/dist/index17.js +9 -9
- package/dist/index19.js +3 -3
- package/dist/index196.js +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +4 -368
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +2 -134
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +10 -5
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +3 -19
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +35 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +6 -2
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +226 -165
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +368 -23
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +126 -365
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +295 -2
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +19 -4
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -3
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +2 -3
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.js +174 -3
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +23 -35
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +373 -6
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +16 -2
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +16 -10
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +17 -13
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +26 -13
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +8 -20
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +2 -29
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +3 -8
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +3 -2
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +112 -226
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +2 -6
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +8 -16
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +6 -9
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +16 -120
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +3 -78
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +78 -5
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +160 -2
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +1 -297
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +1 -1
- package/dist/index230.js +69 -2
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +2 -2
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +5 -117
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +428 -99
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +88 -3
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +12 -221
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +200 -258
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +6 -2
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +2 -435
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +2 -89
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +2 -200
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +117 -2
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +106 -2
- package/dist/index242.js.map +1 -1
- package/dist/index245.js +2 -69
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +2 -5
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +221 -12
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +257 -159
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +4 -1
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index253.js +3 -2
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +1 -1
- package/dist/index255.js +2 -3
- package/dist/index255.js.map +1 -1
- package/dist/index29.js +3 -3
- package/dist/index31.js +335 -322
- package/dist/index31.js.map +1 -1
- package/dist/index33.js +2 -2
- package/dist/index35.js +2 -2
- package/dist/index47.js +1 -1
- package/dist/index49.js +1 -1
- package/dist/index65.js +5 -5
- package/dist/index69.js +2 -2
- package/dist/index72.js +1 -1
- package/dist/index75.js +1 -1
- package/dist/index77.js +1 -1
- package/dist/index79.js +4 -4
- package/dist/index8.js +55 -55
- package/dist/index8.js.map +1 -1
- package/dist/index81.js +1 -1
- package/dist/index91.js +5 -7
- package/dist/index91.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index256.js +0 -5
- package/dist/index256.js.map +0 -1
package/dist/index31.js
CHANGED
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
import { defineComponent as Ie, ref as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as Ie, ref as m, computed as y, watch as Y, openBlock as p, createElementBlock as h, normalizeClass as x, renderSlot as b, createElementVNode as V, Fragment as $, renderList as j, toDisplayString as D, createBlock as ae, withModifiers as B, withCtx as ne, createTextVNode as Z, createCommentVNode as ue, withDirectives as Ne, vModelDynamic as $e, createVNode as oe, mergeProps as De, Teleport as Le, normalizeStyle as Fe, nextTick as ie } from "vue";
|
|
2
|
+
import Ae from "./index115.js";
|
|
3
3
|
import "./index158.js";
|
|
4
|
-
import
|
|
4
|
+
import Me from "./index119.js";
|
|
5
5
|
import "./index185.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, al = ["id", "aria-selected"], nl = { class: "bb-base-select-option__content" }, ul = { class: "bb-base-select-option__text" }, sl = { class: "bb-base-select__chevron" }, il = /* @__PURE__ */ w("svg", {
|
|
6
|
+
import { useFloating as Je } from "./index221.js";
|
|
7
|
+
import { clamp as qe } from "./index198.js";
|
|
8
|
+
import { deepEqual as se } from "./index123.js";
|
|
9
|
+
import { head as G } from "./index222.js";
|
|
10
|
+
import { isNotNil as E } from "./index124.js";
|
|
11
|
+
import { last as ze } from "./index209.js";
|
|
12
|
+
import { useItemText as He } from "./index125.js";
|
|
13
|
+
import { useItemValue as je } from "./index126.js";
|
|
14
|
+
import { wait as X } from "./index122.js";
|
|
15
|
+
import { waitFor as Pe } from "./index202.js";
|
|
16
|
+
import { when as Qe } from "./index197.js";
|
|
17
|
+
import We from "./index116.js";
|
|
18
|
+
import "./index160.js";
|
|
19
|
+
import { autoUpdate as Ue, flip as Ke, shift as Re } from "./index204.js";
|
|
20
|
+
import { offset as Ye } from "./index212.js";
|
|
21
|
+
const Ze = { class: "bb-base-select__input-container" }, Ge = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "aria-controls", "readonly"], Xe = { class: "bb-base-select__chevron" }, el = /* @__PURE__ */ V("svg", {
|
|
23
22
|
fill: "none",
|
|
24
23
|
viewBox: "0 0 16 8",
|
|
25
24
|
xmlns: "http://www.w3.org/2000/svg"
|
|
26
25
|
}, [
|
|
27
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ V("path", {
|
|
28
27
|
"clip-rule": "evenodd",
|
|
29
28
|
d: "M0.851779 0.225802C0.90403 0.173418 0.966103 0.131858 1.03444 0.1035C1.10278 0.0751431 1.17604 0.0605469 1.25003 0.0605469C1.32402 0.0605469 1.39728 0.0751431 1.46562 0.1035C1.53396 0.131858 1.59603 0.173418 1.64828 0.225802L8.00003 6.57868L14.3518 0.225802C14.4041 0.173503 14.4662 0.132017 14.5345 0.103713C14.6028 0.0754093 14.6761 0.0608414 14.75 0.0608414C14.824 0.0608414 14.8972 0.0754093 14.9656 0.103713C15.0339 0.132017 15.096 0.173503 15.1483 0.225802C15.2006 0.278101 15.2421 0.340189 15.2704 0.408521C15.2987 0.476852 15.3132 0.55009 15.3132 0.624052C15.3132 0.698014 15.2987 0.771252 15.2704 0.839584C15.2421 0.907916 15.2006 0.970003 15.1483 1.0223L8.39828 7.7723C8.34603 7.82469 8.28395 7.86625 8.21562 7.8946C8.14728 7.92296 8.07402 7.93756 8.00003 7.93756C7.92604 7.93756 7.85278 7.92296 7.78444 7.8946C7.7161 7.86625 7.65403 7.82469 7.60178 7.7723L0.851779 1.0223C0.799395 0.970051 0.757835 0.907978 0.729477 0.83964C0.70112 0.771302 0.686523 0.69804 0.686523 0.624052C0.686523 0.550064 0.70112 0.476803 0.729477 0.408464C0.757835 0.340126 0.799395 0.278053 0.851779 0.225802Z",
|
|
30
29
|
fill: "currentColor",
|
|
31
30
|
"fill-rule": "evenodd"
|
|
32
31
|
})
|
|
33
|
-
], -1),
|
|
32
|
+
], -1), ll = ["id"], tl = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "bb-base-select__loading-container"
|
|
35
|
+
}, al = {
|
|
36
|
+
key: 1,
|
|
37
|
+
class: "bb-base-select__no-data-container"
|
|
38
|
+
}, nl = ["id", "aria-selected"], ul = { class: "bb-base-select-option__content" }, ol = { class: "bb-base-select-option__text" }, Tl = /* @__PURE__ */ Ie({
|
|
34
39
|
__name: "BaseSelect",
|
|
35
40
|
props: {
|
|
36
41
|
allowWriting: { type: Boolean, default: !0 },
|
|
@@ -66,96 +71,82 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
66
71
|
updateOnAnimationFrame: { type: Boolean, default: !1 }
|
|
67
72
|
},
|
|
68
73
|
emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue"],
|
|
69
|
-
setup(re, { emit:
|
|
70
|
-
const l = re,
|
|
74
|
+
setup(re, { emit: de }) {
|
|
75
|
+
const l = re, c = de;
|
|
71
76
|
if (l.multiple && !Array.isArray(l.modelValue))
|
|
72
77
|
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
));
|
|
87
|
-
}), $e(() => {
|
|
88
|
-
te();
|
|
89
|
-
});
|
|
90
|
-
const ae = f([]), v = f([]), V = f([]), { getItemText: ve } = Ke(), { getItemValue: me } = Ye(), pe = g(() => ae.value.map((e) => {
|
|
91
|
-
const a = ve(e, l.itemText), t = me(e, l.itemValue);
|
|
92
|
-
if (t === void 0)
|
|
78
|
+
const L = m(null), J = m(null), k = m(null), { floatingStyles: ce } = Je(J, k, {
|
|
79
|
+
placement: "bottom",
|
|
80
|
+
whileElementsMounted: Ue,
|
|
81
|
+
middleware: [Ke(), Ye(), Re()]
|
|
82
|
+
}), fe = y(() => {
|
|
83
|
+
const e = {
|
|
84
|
+
...ce.value,
|
|
85
|
+
transitionDuration: `${l.transitionDuration}ms`
|
|
86
|
+
};
|
|
87
|
+
return J.value && (e.width = `${J.value.clientWidth}px`), e;
|
|
88
|
+
}), S = m(null), o = m(""), ve = y(() => s.value.length ? "" : l.placeholder), d = m(0), ee = m([]), f = m([]), _ = m([]), { getItemText: me } = He(), { getItemValue: pe } = je(), be = y(() => ee.value.map((e, a) => {
|
|
89
|
+
const t = me(e, l.itemText), n = pe(e, l.itemValue);
|
|
90
|
+
if (n === void 0)
|
|
93
91
|
throw new Error(
|
|
94
92
|
'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(e) + " please check itemValue property is correct."
|
|
95
93
|
);
|
|
96
|
-
const
|
|
94
|
+
const u = JSON.stringify(n);
|
|
97
95
|
return {
|
|
98
96
|
disabled: !!e.disabled,
|
|
99
|
-
id: "option_" +
|
|
100
|
-
jsonValue:
|
|
97
|
+
id: "option_" + u.replace(/\W/g, "_"),
|
|
98
|
+
jsonValue: u,
|
|
101
99
|
manual: !1,
|
|
102
100
|
original: e,
|
|
103
|
-
text:
|
|
104
|
-
value:
|
|
101
|
+
text: t,
|
|
102
|
+
value: n
|
|
105
103
|
};
|
|
106
|
-
})),
|
|
107
|
-
let e =
|
|
108
|
-
(n,
|
|
104
|
+
})), O = y(() => {
|
|
105
|
+
let e = be.value.reduce(
|
|
106
|
+
(n, u) => (n[u.id] = u, n),
|
|
109
107
|
{}
|
|
110
108
|
);
|
|
111
|
-
const a =
|
|
112
|
-
(n,
|
|
109
|
+
const a = _.value.reduce(
|
|
110
|
+
(n, u) => (n[u.id] || (n[u.id] = u), n),
|
|
113
111
|
e
|
|
114
|
-
), t =
|
|
115
|
-
(n,
|
|
112
|
+
), t = f.value.reduce(
|
|
113
|
+
(n, u) => (n[u.id] || (n[u.id] = u), n),
|
|
116
114
|
a
|
|
117
115
|
);
|
|
118
|
-
return Object.values(t).map(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
);
|
|
125
|
-
}), S = g(() => {
|
|
116
|
+
return Object.values(t).map((n, u) => ({
|
|
117
|
+
...n,
|
|
118
|
+
selected: E(he.value.get(n.value)),
|
|
119
|
+
index: u
|
|
120
|
+
}));
|
|
121
|
+
}), g = y(() => {
|
|
126
122
|
let e = [];
|
|
127
|
-
return
|
|
128
|
-
(a) => a.text === u.value
|
|
129
|
-
) ? e = T.value.filter((a) => {
|
|
123
|
+
return o.value && !s.value.some((a) => a.text === o.value) ? e = O.value.filter((a) => {
|
|
130
124
|
let t = !1;
|
|
131
125
|
if (l.filterBy) {
|
|
132
126
|
if (typeof l.filterBy == "function")
|
|
133
127
|
t = l.filterBy(a.value, a.original);
|
|
134
128
|
else if (l.filterBy.length) {
|
|
135
129
|
const n = [].concat(l.filterBy);
|
|
136
|
-
for (let
|
|
137
|
-
const
|
|
138
|
-
t = t || a.original[
|
|
130
|
+
for (let u = 0; u < n.length; u++) {
|
|
131
|
+
const T = n[u];
|
|
132
|
+
t = t || a.original[T] && a.original[T].toLowerCase().includes(o.value.toLowerCase());
|
|
139
133
|
}
|
|
140
134
|
}
|
|
141
135
|
} else
|
|
142
136
|
return !0;
|
|
143
|
-
return t || a.text.toLowerCase().includes(
|
|
144
|
-
}) : e =
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}));
|
|
148
|
-
}), z = g(
|
|
149
|
-
() => T.value.reduce(
|
|
137
|
+
return t || a.text.toLowerCase().includes(o.value.toLowerCase());
|
|
138
|
+
}) : e = O.value, e;
|
|
139
|
+
}), q = y(
|
|
140
|
+
() => O.value.reduce(
|
|
150
141
|
(e, a) => ({
|
|
151
142
|
...e,
|
|
152
143
|
[a.id]: a
|
|
153
144
|
}),
|
|
154
145
|
{}
|
|
155
146
|
)
|
|
156
|
-
),
|
|
147
|
+
), v = y(() => {
|
|
157
148
|
if (l.matchStrategy === "string") {
|
|
158
|
-
let e =
|
|
149
|
+
let e = O.value.reduce(
|
|
159
150
|
(a, t) => (a[t.jsonValue] = t, a),
|
|
160
151
|
{}
|
|
161
152
|
);
|
|
@@ -163,19 +154,19 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
163
154
|
get: (a) => e[JSON.stringify(a)]
|
|
164
155
|
};
|
|
165
156
|
} else if (l.matchStrategy === "equality") {
|
|
166
|
-
let e =
|
|
157
|
+
let e = O.value.map((a) => [
|
|
167
158
|
a.value,
|
|
168
159
|
a
|
|
169
160
|
]);
|
|
170
161
|
return {
|
|
171
162
|
get: (a) => {
|
|
172
163
|
var t;
|
|
173
|
-
return (t = e.find((n) =>
|
|
164
|
+
return (t = e.find((n) => se(n[0], a))) == null ? void 0 : t[1];
|
|
174
165
|
}
|
|
175
166
|
};
|
|
176
167
|
} else
|
|
177
168
|
throw new Error("No match strategy has been defined");
|
|
178
|
-
}),
|
|
169
|
+
}), he = y(() => {
|
|
179
170
|
if (l.matchStrategy === "string") {
|
|
180
171
|
let e = {};
|
|
181
172
|
return [].concat(l.modelValue).forEach((a, t) => {
|
|
@@ -184,32 +175,32 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
184
175
|
get: (a) => e[JSON.stringify(a)]
|
|
185
176
|
};
|
|
186
177
|
} else if (l.matchStrategy === "equality") {
|
|
187
|
-
const e = [].concat(l.modelValue).filter(
|
|
178
|
+
const e = [].concat(l.modelValue).filter(E).map((a, t) => [a, t]);
|
|
188
179
|
return {
|
|
189
180
|
get: (a) => {
|
|
190
181
|
var t;
|
|
191
|
-
return (t = e.find((n) =>
|
|
182
|
+
return (t = e.find((n) => se(n[0], a))) == null ? void 0 : t[1];
|
|
192
183
|
}
|
|
193
184
|
};
|
|
194
185
|
} else
|
|
195
186
|
throw new Error("No match strategy has been defined");
|
|
196
|
-
}),
|
|
197
|
-
const t =
|
|
187
|
+
}), s = y(() => [].concat(l.modelValue).reduce((e, a) => {
|
|
188
|
+
const t = v.value.get(a);
|
|
198
189
|
return t && e.push(t), e;
|
|
199
|
-
}, [])),
|
|
190
|
+
}, [])), F = (e) => {
|
|
200
191
|
let a;
|
|
201
|
-
l.multiple ? (e.selected ? (e.manual && (
|
|
192
|
+
r.value = e.index, l.multiple ? (e.selected ? (e.manual && (_.value = _.value.filter(
|
|
202
193
|
(t) => t.id !== e.id
|
|
203
194
|
)), a = l.modelValue.filter(
|
|
204
195
|
(t) => JSON.stringify(t) !== e.jsonValue
|
|
205
|
-
), l.stash && (
|
|
196
|
+
), l.stash && (f.value = f.value.filter((t) => t.id !== e.id))) : (a = l.modelValue.concat(e.value), l.stash && (f.value = f.value.concat(e))), l.resetQueryOnOptionSelected && (o.value = "")) : e.selected ? (e.manual && (_.value = _.value.filter(
|
|
206
197
|
(t) => t.id !== e.id
|
|
207
|
-
)), a = null, l.stash && (
|
|
208
|
-
},
|
|
198
|
+
)), a = null, l.stash && (f.value = []), o.value = "") : (a = e.value, l.stash && (f.value = [e]), o.value = e.text), c("update:modelValue", a);
|
|
199
|
+
}, I = async ({ prefill: e = !1 }) => {
|
|
209
200
|
let a = [];
|
|
210
|
-
Array.isArray(l.items) ? a = l.items : typeof l.items == "function" && (
|
|
211
|
-
},
|
|
212
|
-
const e =
|
|
201
|
+
Array.isArray(l.items) ? a = l.items : typeof l.items == "function" && (d.value++, a = await l.items(o.value, e, l.modelValue), d.value--), ee.value = a;
|
|
202
|
+
}, ye = () => {
|
|
203
|
+
const e = o.value, a = o.value, t = JSON.stringify(a), n = {
|
|
213
204
|
text: e,
|
|
214
205
|
value: a,
|
|
215
206
|
jsonValue: t,
|
|
@@ -218,144 +209,154 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
218
209
|
manual: !0,
|
|
219
210
|
disabled: !1
|
|
220
211
|
};
|
|
221
|
-
|
|
222
|
-
},
|
|
223
|
-
let
|
|
224
|
-
|
|
212
|
+
_.value = _.value.concat(n), o.value = "";
|
|
213
|
+
}, z = l.prefill === !0 || !l.multiple && E(l.modelValue) || l.multiple && !!l.modelValue.length;
|
|
214
|
+
let P;
|
|
215
|
+
Y(
|
|
225
216
|
() => l.modelValue,
|
|
226
217
|
(e, a) => {
|
|
227
|
-
|
|
218
|
+
P && clearTimeout(P), P = setTimeout(
|
|
228
219
|
async () => {
|
|
229
220
|
if (l.multiple) {
|
|
230
221
|
if (!Array.isArray(l.modelValue))
|
|
231
222
|
throw new Error("props.modelValue is not an array.");
|
|
232
223
|
let t = l.modelValue.every(
|
|
233
|
-
(n) =>
|
|
224
|
+
(n) => v.value.get(n)
|
|
234
225
|
);
|
|
235
|
-
if ((!t || a === void 0) && (await
|
|
236
|
-
(n) =>
|
|
226
|
+
if ((!t || a === void 0) && (await I({ prefill: !0 }), t = l.modelValue.every(
|
|
227
|
+
(n) => v.value.get(n)
|
|
237
228
|
)), t)
|
|
238
|
-
l.stash && (
|
|
239
|
-
(n) =>
|
|
229
|
+
l.stash && (f.value = l.modelValue.map(
|
|
230
|
+
(n) => v.value.get(n)
|
|
240
231
|
));
|
|
241
232
|
else {
|
|
242
233
|
let n = [];
|
|
243
|
-
const
|
|
244
|
-
let M =
|
|
234
|
+
const u = e.filter((T) => {
|
|
235
|
+
let M = v.value.get(T);
|
|
245
236
|
return M && n.push(M), M;
|
|
246
237
|
});
|
|
247
|
-
l.stash && (
|
|
238
|
+
l.stash && (f.value = n), l.enforceCoherence && c("update:modelValue", u);
|
|
248
239
|
}
|
|
249
240
|
} else {
|
|
250
|
-
let t =
|
|
251
|
-
if (!t &&
|
|
252
|
-
const n =
|
|
253
|
-
|
|
241
|
+
let t = v.value.get(l.modelValue);
|
|
242
|
+
if (!t && E(l.modelValue) || a === void 0) {
|
|
243
|
+
const n = o.value;
|
|
244
|
+
o.value = "", await I({ prefill: !0 }), o.value = n;
|
|
254
245
|
}
|
|
255
|
-
t =
|
|
246
|
+
t = v.value.get(l.modelValue), t ? (o.value = t.text, l.stash && (f.value = [t])) : l.enforceCoherence && E(e) ? (o.value = "", l.stash && (f.value = []), c("update:modelValue", null)) : o.value = "";
|
|
256
247
|
}
|
|
257
248
|
},
|
|
258
|
-
|
|
249
|
+
z ? 0 : l.modelValueDebounceTime
|
|
259
250
|
);
|
|
260
251
|
},
|
|
261
252
|
// Prefill when asked or when items are static
|
|
262
|
-
{ immediate:
|
|
263
|
-
),
|
|
253
|
+
{ immediate: z, deep: !0 }
|
|
254
|
+
), Y(
|
|
264
255
|
() => l.items,
|
|
265
256
|
async (e, a) => {
|
|
266
257
|
if (typeof e == "function" || // Circumvent arrays defined in the template by the parent
|
|
267
258
|
JSON.stringify(e) !== JSON.stringify(a))
|
|
268
|
-
if (await
|
|
259
|
+
if (await I({ prefill: !1 }), l.multiple) {
|
|
269
260
|
if (!l.modelValue.every(
|
|
270
|
-
(n) =>
|
|
261
|
+
(n) => v.value.get(n)
|
|
271
262
|
) && l.enforceCoherence) {
|
|
272
|
-
const n = l.modelValue.filter((
|
|
273
|
-
|
|
263
|
+
const n = l.modelValue.filter((u) => v.value.get(u));
|
|
264
|
+
c("update:modelValue", n);
|
|
274
265
|
}
|
|
275
266
|
} else
|
|
276
|
-
!
|
|
267
|
+
!v.value.get(l.modelValue) && l.enforceCoherence && E(l.modelValue) && c("update:modelValue", null), r.value = null;
|
|
277
268
|
}
|
|
278
269
|
);
|
|
279
|
-
let
|
|
280
|
-
|
|
270
|
+
let Q;
|
|
271
|
+
Y(
|
|
281
272
|
() => l.dependencies,
|
|
282
273
|
(e, a) => {
|
|
283
|
-
!
|
|
274
|
+
!z && l.prefill === "focus" && U || JSON.stringify(e) !== JSON.stringify(a) && (Q && clearTimeout(Q), Q = setTimeout(async () => {
|
|
284
275
|
if (JSON.stringify(e) !== JSON.stringify(a)) {
|
|
285
|
-
l.enforceCoherence && l.stash && (
|
|
286
|
-
let t =
|
|
287
|
-
if (
|
|
288
|
-
!
|
|
276
|
+
l.enforceCoherence && l.stash && (f.value = []);
|
|
277
|
+
let t = o.value;
|
|
278
|
+
if (o.value = "", await I({ prefill: !0 }), o.value = t, !l.multiple)
|
|
279
|
+
!v.value.get(l.modelValue) && l.enforceCoherence && E(l.modelValue) && (o.value = "", l.stash && (f.value = []), c("update:modelValue", null));
|
|
289
280
|
else if (!l.modelValue.every(
|
|
290
|
-
(
|
|
281
|
+
(u) => v.value.get(u)
|
|
291
282
|
) && l.enforceCoherence) {
|
|
292
|
-
let
|
|
293
|
-
const
|
|
294
|
-
let
|
|
295
|
-
return
|
|
283
|
+
let u = [];
|
|
284
|
+
const T = l.modelValue.filter((M) => {
|
|
285
|
+
let R = v.value.get(M);
|
|
286
|
+
return R && u.push(R), R;
|
|
296
287
|
});
|
|
297
|
-
l.stash && (
|
|
288
|
+
l.stash && (f.value = u), c("update:modelValue", T);
|
|
298
289
|
}
|
|
299
290
|
}
|
|
300
291
|
}, l.depsDebounceTime));
|
|
301
292
|
},
|
|
302
293
|
{ deep: !0 }
|
|
303
294
|
);
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
r.value && (r.value.style.left = `${e.x}px`, r.value.style.top = `${e.y}px`, r.value.style.width = `${(a = N.value) == null ? void 0 : a.offsetWidth}px`);
|
|
311
|
-
});
|
|
312
|
-
}, C = f(!1), W = f(!1), R = f(!1), K = f(!0), D = async () => {
|
|
313
|
-
K.value = !1, W.value = !0, await q(l.transitionDuration), W.value = !1, C.value = !0;
|
|
314
|
-
}, J = async () => {
|
|
315
|
-
C.value = !1, R.value = !0, await q(l.transitionDuration), R.value = !1, K.value = !0;
|
|
316
|
-
}, P = f(!1);
|
|
317
|
-
let Y = !0;
|
|
295
|
+
const w = m(!1), W = m(!0), N = async () => {
|
|
296
|
+
W.value = !1, w.value = !0;
|
|
297
|
+
}, A = async () => {
|
|
298
|
+
w.value = !1, W.value = !0;
|
|
299
|
+
}, H = m(!1);
|
|
300
|
+
let U = !0;
|
|
318
301
|
const ge = async (e) => {
|
|
319
|
-
|
|
320
|
-
},
|
|
321
|
-
if (e.target instanceof Node &&
|
|
322
|
-
|
|
302
|
+
c("focus", e), H.value = !0, document.addEventListener("click", te), document.addEventListener("focusin", le), S.value instanceof HTMLInputElement && S.value.select(), l.prefill === "focus" && U && !z && (await I({ prefill: !0 }), U = !1);
|
|
303
|
+
}, le = (e) => {
|
|
304
|
+
if (e.target instanceof Node && L.value && k.value && !L.value.contains(e.target) && !k.value.contains(e.target)) {
|
|
305
|
+
A(), c("inactive"), document.removeEventListener("focusin", le), H.value = !1, l.multiple && X(500).then(() => {
|
|
306
|
+
o.value = "";
|
|
307
|
+
});
|
|
323
308
|
return;
|
|
324
309
|
}
|
|
325
|
-
},
|
|
326
|
-
if (
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
310
|
+
}, Ve = async (e) => {
|
|
311
|
+
if (c("blur", e), !l.multiple) {
|
|
312
|
+
let a = !1;
|
|
313
|
+
const t = l.modelValue;
|
|
314
|
+
if (await Promise.race([
|
|
315
|
+
X(250),
|
|
316
|
+
Pe(() => t !== l.modelValue).then(() => {
|
|
317
|
+
a = !0;
|
|
318
|
+
})
|
|
319
|
+
]), !a) {
|
|
320
|
+
const n = v.value.get(l.modelValue);
|
|
321
|
+
n && (o.value = n.text);
|
|
331
322
|
}
|
|
332
323
|
}
|
|
333
|
-
},
|
|
334
|
-
|
|
335
|
-
},
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
324
|
+
}, we = (e) => c("change", e), Ce = (e) => {
|
|
325
|
+
c("input", e), o.value === "" && (l.multiple || c("update:modelValue", null)), typeof l.items == "function" && Se();
|
|
326
|
+
}, r = m(null), C = y(() => {
|
|
327
|
+
if (r.value === null || !g.value.length)
|
|
328
|
+
return null;
|
|
329
|
+
let e = r.value >= 0 ? r.value : g.value.length - 1;
|
|
330
|
+
const a = 0, t = g.value.length - 1;
|
|
331
|
+
return qe(e % g.value.length, a, t);
|
|
332
|
+
}), i = m(null), ke = () => {
|
|
333
|
+
r.value !== null ? r.value++ : r.value = 0, ie().then(() => {
|
|
334
|
+
var e;
|
|
335
|
+
if (C.value !== null) {
|
|
336
|
+
const a = (e = k.value) == null ? void 0 : e.querySelector(
|
|
337
|
+
`#${O.value[C.value].id}`
|
|
338
|
+
);
|
|
339
|
+
a instanceof HTMLElement && a.scrollIntoView({
|
|
340
|
+
behavior: "smooth",
|
|
341
|
+
block: "nearest",
|
|
342
|
+
inline: "start"
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}, _e = () => {
|
|
347
|
+
r.value !== null ? r.value-- : r.value = O.value.length - 1, ie().then(() => {
|
|
348
|
+
var e;
|
|
349
|
+
if (C.value !== null) {
|
|
350
|
+
const a = (e = k.value) == null ? void 0 : e.querySelector(
|
|
351
|
+
`#${O.value[C.value].id}`
|
|
352
|
+
);
|
|
353
|
+
a instanceof HTMLElement && a.scrollIntoView({
|
|
354
|
+
behavior: "smooth",
|
|
355
|
+
block: "nearest",
|
|
356
|
+
inline: "start"
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
});
|
|
359
360
|
}, Oe = async (e) => {
|
|
360
361
|
var a, t;
|
|
361
362
|
if (l.readonly || l.disabled) {
|
|
@@ -365,61 +366,61 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
365
366
|
switch (e.key) {
|
|
366
367
|
case "ArrowUp":
|
|
367
368
|
{
|
|
368
|
-
if (e.preventDefault(),
|
|
369
|
+
if (e.preventDefault(), d.value)
|
|
369
370
|
return;
|
|
370
|
-
i.value = null,
|
|
371
|
+
i.value = null, w.value ? _e() : (s.value.length && (r.value = G(s.value).index), await N());
|
|
371
372
|
}
|
|
372
373
|
break;
|
|
373
374
|
case "ArrowDown":
|
|
374
375
|
{
|
|
375
|
-
if (e.preventDefault(),
|
|
376
|
+
if (e.preventDefault(), d.value)
|
|
376
377
|
return;
|
|
377
|
-
i.value = null,
|
|
378
|
+
i.value = null, w.value ? ke() : (s.value.length && (r.value = G(s.value).index), await N());
|
|
378
379
|
}
|
|
379
380
|
break;
|
|
380
381
|
case "ArrowLeft":
|
|
381
382
|
{
|
|
382
|
-
if (
|
|
383
|
+
if (d.value)
|
|
383
384
|
return;
|
|
384
|
-
if (!
|
|
385
|
-
let n =
|
|
385
|
+
if (!o.value && s.value.length && (i.value === null ? i.value = s.value.length - 1 : i.value > 0 ? i.value-- : i.value = null, i.value !== null)) {
|
|
386
|
+
let n = s.value[i.value], u = (a = k.value) == null ? void 0 : a.querySelector(
|
|
386
387
|
`#${n.id}`
|
|
387
388
|
);
|
|
388
|
-
|
|
389
|
+
u && (u.scrollIntoView({
|
|
389
390
|
behavior: "smooth",
|
|
390
391
|
block: "nearest",
|
|
391
392
|
inline: "start"
|
|
392
|
-
}),
|
|
393
|
+
}), r.value = q.value[s.value[i.value].id].index);
|
|
393
394
|
}
|
|
394
395
|
}
|
|
395
396
|
break;
|
|
396
397
|
case "ArrowRight":
|
|
397
398
|
{
|
|
398
|
-
if (
|
|
399
|
+
if (d.value)
|
|
399
400
|
return;
|
|
400
|
-
if (!
|
|
401
|
-
let n =
|
|
401
|
+
if (!o.value && s.value.length && (i.value === null ? i.value = 0 : i.value < s.value.length - 1 ? i.value++ : i.value = null, i.value !== null)) {
|
|
402
|
+
let n = s.value[i.value], u = (t = k.value) == null ? void 0 : t.querySelector(
|
|
402
403
|
`#${n.id}`
|
|
403
404
|
);
|
|
404
|
-
|
|
405
|
+
u && (u.scrollIntoView({
|
|
405
406
|
behavior: "smooth",
|
|
406
407
|
block: "nearest",
|
|
407
408
|
inline: "start"
|
|
408
|
-
}),
|
|
409
|
+
}), r.value = q.value[s.value[i.value].id].index);
|
|
409
410
|
}
|
|
410
411
|
}
|
|
411
412
|
break;
|
|
412
413
|
case "Enter":
|
|
413
414
|
{
|
|
414
|
-
if (e.preventDefault(),
|
|
415
|
+
if (e.preventDefault(), d.value)
|
|
415
416
|
return;
|
|
416
|
-
if (!
|
|
417
|
-
|
|
418
|
-
else if (
|
|
419
|
-
if (
|
|
417
|
+
if (!w.value)
|
|
418
|
+
g.value.length && s.value.length && (r.value = G(s.value).index), await N();
|
|
419
|
+
else if (C.value !== null) {
|
|
420
|
+
if (g.value[C.value].disabled)
|
|
420
421
|
return;
|
|
421
|
-
l.multiple || await
|
|
422
|
-
|
|
422
|
+
l.multiple || await A(), F(
|
|
423
|
+
g.value[C.value]
|
|
423
424
|
);
|
|
424
425
|
} else if (l.addOptions) {
|
|
425
426
|
if (l.itemText || l.itemValue) {
|
|
@@ -428,67 +429,69 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
428
429
|
);
|
|
429
430
|
return;
|
|
430
431
|
}
|
|
431
|
-
|
|
432
|
-
const n =
|
|
433
|
-
|
|
432
|
+
ye();
|
|
433
|
+
const n = ze(_.value);
|
|
434
|
+
F(q.value[n.id]);
|
|
434
435
|
}
|
|
435
436
|
}
|
|
436
437
|
break;
|
|
437
438
|
case "Tab":
|
|
438
439
|
case "Escape":
|
|
439
|
-
|
|
440
|
+
w.value && await A(), c("inactive"), i.value = null, r.value = null;
|
|
440
441
|
break;
|
|
441
442
|
case "Shift":
|
|
442
|
-
if (
|
|
443
|
+
if (d.value)
|
|
443
444
|
return;
|
|
444
445
|
break;
|
|
445
446
|
case "Backspace":
|
|
446
447
|
{
|
|
447
|
-
if (
|
|
448
|
+
if (d.value)
|
|
448
449
|
return;
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
),
|
|
450
|
+
o.value || s.value.length && (i.value === null ? i.value = s.value.length - 1 : (F(
|
|
451
|
+
s.value[i.value]
|
|
452
|
+
), s.value.length ? i.value = Math.max(
|
|
452
453
|
Math.min(
|
|
453
454
|
i.value,
|
|
454
|
-
|
|
455
|
+
s.value.length - 2
|
|
455
456
|
),
|
|
456
457
|
0
|
|
457
|
-
) : i.value = null)), await
|
|
458
|
+
) : i.value = null)), await N();
|
|
458
459
|
}
|
|
459
460
|
break;
|
|
460
461
|
default:
|
|
461
|
-
i.value = null,
|
|
462
|
+
i.value = null, r.value = null, await N();
|
|
462
463
|
break;
|
|
463
464
|
}
|
|
464
465
|
};
|
|
465
|
-
let
|
|
466
|
-
const
|
|
467
|
-
|
|
466
|
+
let K;
|
|
467
|
+
const Se = () => {
|
|
468
|
+
K && clearTimeout(K), K = setTimeout(async () => {
|
|
468
469
|
try {
|
|
469
|
-
await
|
|
470
|
+
await I({ prefill: !1 });
|
|
470
471
|
} catch (e) {
|
|
471
472
|
console.error(e);
|
|
472
473
|
}
|
|
473
474
|
}, l.queryDebounceTime);
|
|
474
|
-
},
|
|
475
|
-
|
|
475
|
+
}, Te = (e) => {
|
|
476
|
+
c("click", e), !(l.disabled || l.readonly) && (S.value instanceof HTMLElement && S.value.focus(), N());
|
|
476
477
|
}, xe = (e) => {
|
|
477
478
|
if (e.currentTarget instanceof HTMLElement && e.currentTarget.classList.contains("bb-base-select-option")) {
|
|
478
|
-
const a =
|
|
479
|
+
const a = q.value[e.currentTarget.id];
|
|
479
480
|
if (a.disabled)
|
|
480
481
|
return;
|
|
481
|
-
|
|
482
|
+
F(a), S.value instanceof HTMLInputElement && S.value.focus(), l.multiple || A();
|
|
482
483
|
}
|
|
483
|
-
},
|
|
484
|
-
if (e.target instanceof Node &&
|
|
485
|
-
|
|
484
|
+
}, te = (e) => {
|
|
485
|
+
if (e.target instanceof Node && L.value && !L.value.contains(e.target)) {
|
|
486
|
+
A(), c("inactive"), document.removeEventListener("click", te), H.value = !1, l.multiple && X(500).then(() => {
|
|
487
|
+
o.value = "";
|
|
488
|
+
});
|
|
486
489
|
return;
|
|
487
490
|
}
|
|
488
|
-
}, Be =
|
|
491
|
+
}, Be = Qe(
|
|
489
492
|
(e) => typeof e != "string",
|
|
490
493
|
JSON.stringify
|
|
491
|
-
), Ee =
|
|
494
|
+
), Ee = y(() => [].concat(l.modelValue).map((e) => {
|
|
492
495
|
const a = Be(e);
|
|
493
496
|
return {
|
|
494
497
|
disabled: l.disabled,
|
|
@@ -497,182 +500,192 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
|
|
|
497
500
|
value: a
|
|
498
501
|
};
|
|
499
502
|
}));
|
|
500
|
-
return (e, a) => (p(), h("
|
|
503
|
+
return (e, a) => (p(), h("div", {
|
|
501
504
|
ref_key: "outerContainer",
|
|
502
|
-
ref:
|
|
503
|
-
class:
|
|
505
|
+
ref: L,
|
|
506
|
+
class: x({
|
|
504
507
|
"bb-base-select": !0,
|
|
505
|
-
"bb-base-select--active":
|
|
506
|
-
"bb-base-select--loading":
|
|
508
|
+
"bb-base-select--active": H.value,
|
|
509
|
+
"bb-base-select--loading": d.value,
|
|
507
510
|
"bb-base-select--disabled": e.disabled,
|
|
508
511
|
"bb-base-select--errors": e.hasErrors,
|
|
509
512
|
"bb-base-select--readonly": e.readonly
|
|
510
513
|
}),
|
|
511
|
-
onClick:
|
|
514
|
+
onClick: Te
|
|
512
515
|
}, [
|
|
513
516
|
b(e.$slots, "prepend-outer"),
|
|
514
|
-
|
|
517
|
+
V("span", {
|
|
515
518
|
ref_key: "innerContainer",
|
|
516
|
-
ref:
|
|
519
|
+
ref: J,
|
|
517
520
|
class: "bb-base-select__inner-container"
|
|
518
521
|
}, [
|
|
519
522
|
b(e.$slots, "prepend"),
|
|
520
|
-
|
|
521
|
-
e.multiple ? (p(), h(
|
|
522
|
-
e.comma ? (p(!0), h(
|
|
523
|
+
V("span", Ze, [
|
|
524
|
+
e.multiple ? (p(), h($, { key: 0 }, [
|
|
525
|
+
e.comma ? (p(!0), h($, { key: 0 }, j(s.value, (t, n) => (p(), h("span", {
|
|
523
526
|
key: t.id,
|
|
524
|
-
class:
|
|
527
|
+
class: x({
|
|
525
528
|
"bb-base-select__selected": !0,
|
|
526
529
|
"bb-base-select__selected--comma": !0,
|
|
527
530
|
"bb-base-select__selected--focused": n === i.value
|
|
528
531
|
})
|
|
529
|
-
},
|
|
532
|
+
}, D(t.text) + D(n < s.value.length - 1 ? "," : ""), 3))), 128)) : (p(!0), h($, { key: 1 }, j(s.value, (t, n) => (p(), ae(Ae, {
|
|
530
533
|
key: t.id,
|
|
531
|
-
class:
|
|
534
|
+
class: x({
|
|
532
535
|
"bb-base-select__selected": !0,
|
|
533
536
|
"bb-base-select__selected--chip": !0,
|
|
534
537
|
"bb-base-select__selected--focused": n === i.value
|
|
535
538
|
}),
|
|
536
539
|
clearable: !0,
|
|
537
540
|
text: t.text,
|
|
538
|
-
"onClick:clear":
|
|
541
|
+
"onClick:clear": B((u) => F(t), ["stop"])
|
|
539
542
|
}, {
|
|
540
|
-
default:
|
|
543
|
+
default: ne(() => [
|
|
541
544
|
b(e.$slots, "chip", {
|
|
542
545
|
disabled: t.disabled,
|
|
543
546
|
hasErrors: e.hasErrors,
|
|
544
547
|
index: t.index,
|
|
545
548
|
item: t.original,
|
|
546
|
-
loading: !!
|
|
549
|
+
loading: !!d.value,
|
|
547
550
|
manual: t.manual,
|
|
548
551
|
selected: t.selected,
|
|
549
552
|
text: t.text,
|
|
550
553
|
value: t.value
|
|
551
554
|
}, () => [
|
|
552
|
-
|
|
555
|
+
Z(D(t.text), 1)
|
|
553
556
|
])
|
|
554
557
|
]),
|
|
555
558
|
_: 2
|
|
556
559
|
}, 1032, ["class", "text", "onClick:clear"]))), 128))
|
|
557
|
-
], 64)) :
|
|
558
|
-
|
|
560
|
+
], 64)) : ue("", !0),
|
|
561
|
+
Ne(V("input", {
|
|
559
562
|
id: e.id,
|
|
560
563
|
ref_key: "input",
|
|
561
|
-
ref:
|
|
562
|
-
"onUpdate:modelValue": a[0] || (a[0] = (t) =>
|
|
564
|
+
ref: S,
|
|
565
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => o.value = t),
|
|
563
566
|
autocomplete: e.autocomplete,
|
|
564
567
|
autofocus: e.autofocus,
|
|
565
|
-
class:
|
|
568
|
+
class: x("bb-base-select__text-input"),
|
|
566
569
|
disabled: e.disabled,
|
|
567
|
-
placeholder:
|
|
570
|
+
placeholder: ve.value,
|
|
571
|
+
role: "combobox",
|
|
572
|
+
"aria-controls": `${e.id}_listbox`,
|
|
573
|
+
"aria-autocomplete": "list",
|
|
568
574
|
readonly: e.readonly || !e.allowWriting,
|
|
569
575
|
type: "text",
|
|
570
|
-
onBlur:
|
|
571
|
-
onChange:
|
|
572
|
-
onFocus:
|
|
573
|
-
onInput:
|
|
574
|
-
onKeydown:
|
|
575
|
-
}, null, 40,
|
|
576
|
-
[
|
|
577
|
-
])
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
576
|
+
onBlur: B(Ve, ["stop"]),
|
|
577
|
+
onChange: B(we, ["stop"]),
|
|
578
|
+
onFocus: B(ge, ["stop"]),
|
|
579
|
+
onInput: B(Ce, ["stop"]),
|
|
580
|
+
onKeydown: B(Oe, ["stop"])
|
|
581
|
+
}, null, 40, Ge), [
|
|
582
|
+
[$e, o.value]
|
|
583
|
+
])
|
|
584
|
+
]),
|
|
585
|
+
V("span", Xe, [
|
|
586
|
+
b(e.$slots, "chevron", {
|
|
587
|
+
loading: !!d.value,
|
|
588
|
+
shown: w.value
|
|
589
|
+
}, () => [
|
|
590
|
+
el
|
|
591
|
+
])
|
|
592
|
+
]),
|
|
593
|
+
d.value ? (p(), h("span", {
|
|
594
|
+
key: 1,
|
|
595
|
+
class: x({
|
|
596
|
+
"bb-base-select__spinner": !0,
|
|
597
|
+
"bb-base-select__spinner--loading": d.value
|
|
598
|
+
})
|
|
599
|
+
}, [
|
|
600
|
+
b(e.$slots, "spinner", {
|
|
601
|
+
loading: !!d.value
|
|
602
|
+
}, () => [
|
|
603
|
+
oe(Me, { size: "sm" })
|
|
604
|
+
])
|
|
605
|
+
], 2)) : b(e.$slots, "append", { key: 0 })
|
|
606
|
+
], 512),
|
|
607
|
+
b(e.$slots, "append-outer"),
|
|
608
|
+
(p(!0), h($, null, j(Ee.value, (t) => (p(), h("input", De({
|
|
609
|
+
key: t.value
|
|
610
|
+
}, t), null, 16))), 128)),
|
|
611
|
+
(p(), ae(Le, { to: "body" }, [
|
|
612
|
+
V("span", {
|
|
613
|
+
ref_key: "optionsContainer",
|
|
614
|
+
ref: k,
|
|
615
|
+
class: x({
|
|
616
|
+
"bb-base-select__options-container": !0,
|
|
617
|
+
"bb-base-select__options-container--shown": w.value,
|
|
618
|
+
"bb-base-select__options-container--hidden": W.value
|
|
619
|
+
}),
|
|
620
|
+
id: `${e.id}_listbox`,
|
|
621
|
+
role: "listbox",
|
|
622
|
+
tabindex: -1,
|
|
623
|
+
style: Fe(fe.value)
|
|
624
|
+
}, [
|
|
625
|
+
oe(We, {
|
|
626
|
+
modelValue: w.value,
|
|
627
|
+
"transition-duration": e.transitionDuration
|
|
628
|
+
}, {
|
|
629
|
+
default: ne(() => [
|
|
593
630
|
b(e.$slots, "options:prepend"),
|
|
594
|
-
!
|
|
595
|
-
b(e.$slots, "loading", { query:
|
|
596
|
-
|
|
631
|
+
!g.value.length && d.value ? (p(), h("span", tl, [
|
|
632
|
+
b(e.$slots, "loading", { query: o.value }, () => [
|
|
633
|
+
Z(D(e.loadingText), 1)
|
|
597
634
|
])
|
|
598
|
-
])) :
|
|
599
|
-
b(e.$slots, "no-data", { query:
|
|
600
|
-
|
|
635
|
+
])) : g.value.length ? ue("", !0) : (p(), h("span", al, [
|
|
636
|
+
b(e.$slots, "no-data", { query: o.value }, () => [
|
|
637
|
+
Z(D(e.noDataText), 1)
|
|
601
638
|
])
|
|
602
639
|
])),
|
|
603
|
-
(p(!0), h(
|
|
640
|
+
(p(!0), h($, null, j(g.value, (t, n) => (p(), h($, {
|
|
604
641
|
key: t.id
|
|
605
642
|
}, [
|
|
606
643
|
b(e.$slots, "option:prepend", {
|
|
607
644
|
item: t.original
|
|
608
645
|
}),
|
|
609
|
-
|
|
646
|
+
V("span", {
|
|
610
647
|
id: t.id,
|
|
611
648
|
"aria-selected": t.selected,
|
|
612
|
-
class:
|
|
649
|
+
class: x({
|
|
613
650
|
"bb-base-select-option": !0,
|
|
614
651
|
"bb-base-select-option--selected": t.selected,
|
|
615
|
-
"bb-base-select-option--focused":
|
|
652
|
+
"bb-base-select-option--focused": C.value === n,
|
|
616
653
|
"bb-base-select-option--disabled": t.disabled
|
|
617
654
|
}),
|
|
618
655
|
role: "option",
|
|
619
|
-
onClick:
|
|
656
|
+
onClick: B(xe, ["stop"])
|
|
620
657
|
}, [
|
|
621
658
|
b(e.$slots, "option", {
|
|
622
659
|
disabled: t.disabled,
|
|
623
|
-
focused:
|
|
660
|
+
focused: C.value === n,
|
|
624
661
|
hasErrors: e.hasErrors,
|
|
625
662
|
index: t.index,
|
|
626
663
|
item: t.original,
|
|
627
|
-
loading: !!
|
|
664
|
+
loading: !!d.value,
|
|
628
665
|
manual: t.manual,
|
|
629
666
|
selected: t.selected,
|
|
630
667
|
text: t.text,
|
|
631
668
|
value: t.value
|
|
632
669
|
}, () => [
|
|
633
|
-
|
|
634
|
-
|
|
670
|
+
V("span", ul, [
|
|
671
|
+
V("span", ol, D(t.text), 1)
|
|
635
672
|
])
|
|
636
673
|
])
|
|
637
|
-
], 10,
|
|
674
|
+
], 10, nl),
|
|
638
675
|
b(e.$slots, "option:append", {
|
|
639
676
|
item: t.original
|
|
640
677
|
})
|
|
641
678
|
], 64))), 128)),
|
|
642
679
|
b(e.$slots, "options:append")
|
|
643
|
-
],
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
loading: !!c.value,
|
|
649
|
-
shown: C.value
|
|
650
|
-
}, () => [
|
|
651
|
-
il
|
|
652
|
-
])
|
|
653
|
-
]),
|
|
654
|
-
c.value ? (p(), h("span", {
|
|
655
|
-
key: 1,
|
|
656
|
-
class: B({
|
|
657
|
-
"bb-base-select__spinner": !0,
|
|
658
|
-
"bb-base-select__spinner--loading": c.value
|
|
659
|
-
})
|
|
660
|
-
}, [
|
|
661
|
-
b(e.$slots, "spinner", {
|
|
662
|
-
loading: !!c.value
|
|
663
|
-
}, () => [
|
|
664
|
-
Me(He, { size: "sm" })
|
|
665
|
-
])
|
|
666
|
-
], 2)) : b(e.$slots, "append", { key: 0 })
|
|
667
|
-
], 512),
|
|
668
|
-
b(e.$slots, "append-outer"),
|
|
669
|
-
(p(!0), h(L, null, j(Ee.value, (t) => (p(), h("input", qe({
|
|
670
|
-
key: t.value
|
|
671
|
-
}, t), null, 16))), 128))
|
|
680
|
+
]),
|
|
681
|
+
_: 3
|
|
682
|
+
}, 8, ["modelValue", "transition-duration"])
|
|
683
|
+
], 14, ll)
|
|
684
|
+
]))
|
|
672
685
|
], 2));
|
|
673
686
|
}
|
|
674
687
|
});
|
|
675
688
|
export {
|
|
676
|
-
|
|
689
|
+
Tl as default
|
|
677
690
|
};
|
|
678
691
|
//# sourceMappingURL=index31.js.map
|