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