bitboss-ui 2.1.9 → 2.1.11
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/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +2 -2
- package/dist/index.css +1 -1
- package/dist/index106.js +9 -9
- package/dist/index111.js +1 -1
- package/dist/index113.js +1 -1
- package/dist/index121.js +11 -11
- package/dist/index129.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index131.js +4 -4
- package/dist/index136.js +1 -1
- package/dist/index137.js +2 -2
- package/dist/index139.js +6 -6
- package/dist/index15.js +8 -8
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index206.js +138 -2
- package/dist/index208.js +2 -138
- package/dist/index209.js +12 -85
- package/dist/index21.js +16 -16
- package/dist/index210.js +15 -0
- package/dist/index211.js +9 -27
- package/dist/index212.js +2 -17
- package/dist/index213.js +4 -51
- package/dist/index214.js +2 -15
- package/dist/index215.js +66 -3
- package/dist/index217.js +13 -16
- package/dist/index218.js +183 -2
- package/dist/index219.js +5 -4
- package/dist/index220.js +5 -2
- package/dist/index221.js +5 -4
- package/dist/index222.js +5 -13
- package/dist/index223.js +5 -11
- package/dist/index224.js +5 -20
- package/dist/index225.js +2 -197
- package/dist/index226.js +4 -0
- package/dist/index227.js +2 -66
- package/dist/index228.js +22 -0
- package/dist/index229.js +113 -13
- package/dist/index23.js +155 -153
- package/dist/index231.js +6 -0
- package/dist/index232.js +196 -12
- package/dist/index234.js +84 -32
- package/dist/index236.js +29 -5
- package/dist/index237.js +17 -5
- package/dist/index238.js +51 -5
- package/dist/index239.js +15 -5
- package/dist/index240.js +3 -5
- package/dist/index241.js +12 -2
- package/dist/index242.js +16 -2
- package/dist/index243.js +10 -2
- package/dist/index244.js +2 -17
- package/dist/index245.js +2 -12
- package/dist/index246.js +9 -6
- package/dist/index247.js +23 -106
- package/dist/index248.js +11 -0
- package/dist/index249.js +7 -99
- package/dist/index25.js +3 -3
- package/dist/{index233.js → index250.js} +1 -1
- package/dist/index251.js +89 -211
- package/dist/index253.js +99 -176
- package/dist/index255.js +5 -4
- package/dist/index256.js +15 -7
- package/dist/index257.js +30 -246
- package/dist/index258.js +3 -52
- package/dist/index259.js +5 -44
- package/dist/index260.js +5 -5
- package/dist/index261.js +6 -58
- package/dist/index262.js +250 -2
- package/dist/index263.js +52 -7
- package/dist/index264.js +44 -7
- package/dist/index265.js +5 -9
- package/dist/index266.js +60 -23
- package/dist/index267.js +9 -10
- package/dist/index268.js +17 -2
- package/dist/index269.js +12 -3
- package/dist/index27.js +1 -1
- package/dist/index270.js +6 -6
- package/dist/index271.js +229 -15
- package/dist/index272.js +2 -9
- package/dist/index273.js +7 -8
- package/dist/index274.js +6 -8
- package/dist/index277.js +67 -5
- package/dist/index278.js +4 -7
- package/dist/index279.js +8 -67
- package/dist/index280.js +4 -3
- package/dist/index281.js +7 -17
- package/dist/index282.js +10 -27
- package/dist/index283.js +3 -4
- package/dist/index285.js +7 -3
- package/dist/{index284.js → index286.js} +1 -1
- package/dist/index287.js +3 -7
- package/dist/index288.js +4 -3
- package/dist/index289.js +280 -7
- package/dist/index29.js +4 -4
- package/dist/index290.js +2 -11
- package/dist/index291.js +124 -3
- package/dist/index292.js +2 -5
- package/dist/index293.js +15 -2
- package/dist/index294.js +2 -280
- package/dist/index295.js +16 -2
- package/dist/index296.js +2 -125
- package/dist/index297.js +16 -2
- package/dist/index298.js +2 -15
- package/dist/index299.js +19 -2
- package/dist/index300.js +2 -16
- package/dist/index301.js +3 -2
- package/dist/index302.js +17 -16
- package/dist/index303.js +28 -2
- package/dist/index304.js +5 -18
- package/dist/index305.js +5 -2
- package/dist/index306.js +3 -6
- package/dist/index307.js +1 -1
- package/dist/index308.js +718 -3
- package/dist/index309.js +366 -2
- package/dist/index31.js +2 -2
- package/dist/index310.js +57 -18
- package/dist/index311.js +2 -2
- package/dist/index312.js +5 -27
- package/dist/index313.js +19 -2
- package/dist/index314.js +2 -2
- package/dist/index315.js +27 -2
- package/dist/index316.js +2 -2
- package/dist/index317.js +1 -1
- package/dist/index318.js +1 -21
- package/dist/index319.js +4 -0
- package/dist/index320.js +2 -5
- package/dist/index321.js +22 -701
- package/dist/index323.js +2 -58
- package/dist/index324.js +1 -1
- package/dist/index325.js +1 -1
- package/dist/index326.js +1 -1
- package/dist/index328.js +128 -7
- package/dist/index329.js +368 -5
- package/dist/index33.js +8 -8
- package/dist/index330.js +57 -7
- package/dist/index331.js +57 -128
- package/dist/index332.js +7 -368
- package/dist/index333.js +6 -58
- package/dist/index334.js +7 -57
- package/dist/index335.js +86 -221
- package/dist/index336.js +227 -6
- package/dist/index337.js +6 -18
- package/dist/index338.js +17 -45
- package/dist/index340.js +46 -92
- package/dist/index346.js +97 -91
- package/dist/index347.js +28 -25
- package/dist/index35.js +4 -4
- package/dist/index37.js +230 -232
- package/dist/index39.js +8 -8
- package/dist/index41.js +2 -2
- package/dist/index43.js +8 -8
- package/dist/index45.js +8 -8
- package/dist/index47.js +2 -2
- package/dist/index49.js +3 -3
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +3 -3
- package/dist/index67.js +1 -1
- package/dist/index79.js +4 -4
- package/dist/index81.js +1 -1
- package/dist/index83.js +2 -2
- package/dist/index85.js +1 -1
- package/dist/index87.js +1 -1
- package/dist/index90.js +3 -3
- package/dist/index92.js +2 -2
- package/dist/index94.js +3 -3
- package/dist/index96.js +1 -1
- package/package.json +17 -17
- package/dist/index216.js +0 -14
- package/dist/index230.js +0 -115
- package/dist/index235.js +0 -7
- package/dist/index252.js +0 -4
- package/dist/index254.js +0 -7
- package/dist/index322.js +0 -356
package/dist/index37.js
CHANGED
@@ -1,40 +1,40 @@
|
|
1
|
-
import { defineComponent as Ge, ref as v, computed as h, toRef as L, createBlock as
|
1
|
+
import { defineComponent as Ge, ref as v, computed as h, toRef as L, createBlock as K, openBlock as y, normalizeClass as te, withCtx as s, createElementVNode as T, createElementBlock as O, createVNode as F, unref as g, renderSlot as p, createCommentVNode as le, withDirectives as Je, Fragment as ae, toDisplayString as Qe, withKeys as w, withModifiers as m, normalizeStyle as oe, vModelDynamic as Xe, mergeProps as ne, renderList as Ye, nextTick as j } from "vue";
|
2
2
|
/* empty css */
|
3
3
|
/* empty css */
|
4
4
|
import { useId as Ze } from "./index8.js";
|
5
5
|
import { useMobile as et } from "./index9.js";
|
6
6
|
import tt from "./index111.js";
|
7
7
|
/* empty css */
|
8
|
-
import { hash as lt } from "./
|
9
|
-
import { isEmpty as at } from "./
|
10
|
-
import { last as ot } from "./
|
11
|
-
import { matchAnyKey as ue } from "./
|
12
|
-
import { useArray as nt } from "./
|
13
|
-
import { useBaseOptions as ut } from "./
|
14
|
-
import { useCoherence as st } from "./
|
15
|
-
import { useHashedWatcher as se } from "./
|
16
|
-
import { useIndexById as ie } from "./
|
8
|
+
import { hash as lt } from "./index240.js";
|
9
|
+
import { isEmpty as at } from "./index226.js";
|
10
|
+
import { last as ot } from "./index227.js";
|
11
|
+
import { matchAnyKey as ue } from "./index268.js";
|
12
|
+
import { useArray as nt } from "./index269.js";
|
13
|
+
import { useBaseOptions as ut } from "./index238.js";
|
14
|
+
import { useCoherence as st } from "./index239.js";
|
15
|
+
import { useHashedWatcher as se } from "./index241.js";
|
16
|
+
import { useIndexById as ie } from "./index237.js";
|
17
17
|
import { useMounted as it, useIntersectionObserver as rt } from "./index137.js";
|
18
|
-
import { useItemsGetter as dt } from "./
|
19
|
-
import { useLocale as ct } from "./
|
20
|
-
import { usePrefill as pt } from "./
|
21
|
-
import { wait as
|
22
|
-
import { waitFor as mt } from "./
|
23
|
-
import { when as ft } from "./
|
24
|
-
import vt from "./
|
18
|
+
import { useItemsGetter as dt } from "./index236.js";
|
19
|
+
import { useLocale as ct } from "./index210.js";
|
20
|
+
import { usePrefill as pt } from "./index242.js";
|
21
|
+
import { wait as E } from "./index135.js";
|
22
|
+
import { waitFor as mt } from "./index270.js";
|
23
|
+
import { when as ft } from "./index213.js";
|
24
|
+
import vt from "./index251.js";
|
25
25
|
/* empty css */
|
26
|
-
import ht from "./
|
26
|
+
import ht from "./index253.js";
|
27
27
|
/* empty css */
|
28
|
-
import yt from "./
|
28
|
+
import yt from "./index215.js";
|
29
29
|
/* empty css */
|
30
|
-
import bt from "./
|
31
|
-
import gt from "./
|
30
|
+
import bt from "./index217.js";
|
31
|
+
import gt from "./index229.js";
|
32
32
|
/* empty css */
|
33
|
-
import wt from "./
|
34
|
-
const Bt = { class: "bb-base-select__input-container" },
|
33
|
+
import wt from "./index271.js";
|
34
|
+
const Bt = { class: "bb-base-select__inner-wrapper" }, Vt = { class: "bb-base-select__input-container" }, It = {
|
35
35
|
key: 1,
|
36
36
|
class: "bb-base-select__max-reached"
|
37
|
-
},
|
37
|
+
}, St = ["id", "aria-controls", "aria-describedby", "aria-expanded", "autocomplete", "autofocus", "disabled", "inputmode", "placeholder", "readonly", "required", "onKeydown"], ol = /* @__PURE__ */ Ge({
|
38
38
|
__name: "BaseSelect",
|
39
39
|
props: {
|
40
40
|
allowWriting: { type: [Boolean, String], default: !0 },
|
@@ -81,11 +81,11 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
81
81
|
const t = re, n = de;
|
82
82
|
if (t.multiple && !Array.isArray(t.modelValue))
|
83
83
|
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
84
|
-
const { t: ce } = ct(), pe = it(),
|
85
|
-
() => t.comma ?
|
84
|
+
const { t: ce } = ct(), pe = it(), x = v(null), $ = v(null), u = v(null), R = v(null), U = v(null), r = h(
|
85
|
+
() => t.comma ? R.value : U.value
|
86
86
|
), { isMobile: me } = et(), fe = h(
|
87
87
|
() => t.allowWriting === "not-mobile" && me.value ? "none" : void 0
|
88
|
-
),
|
88
|
+
), G = t.id || Ze().id.value;
|
89
89
|
rt(
|
90
90
|
// @ts-expect-error - wrong inferred type
|
91
91
|
$,
|
@@ -100,42 +100,42 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
100
100
|
zIndex: "10"
|
101
101
|
};
|
102
102
|
return $.value && (e.width = `${(l = $.value) == null ? void 0 : l.$el.clientWidth}px`), e;
|
103
|
-
}),
|
104
|
-
|
103
|
+
}), A = v(null), q = () => {
|
104
|
+
A.value instanceof HTMLInputElement && A.value.focus();
|
105
105
|
}, he = async (e) => {
|
106
|
-
n("focus", e),
|
106
|
+
n("focus", e), Ne(), document.addEventListener("click", D), document.addEventListener("focusin", D);
|
107
107
|
}, ye = () => {
|
108
|
-
t.prefill === "focus" && !He.value && !
|
108
|
+
t.prefill === "focus" && !He.value && !Q.value && Le();
|
109
109
|
}, be = async (e) => {
|
110
110
|
n("blur", e);
|
111
111
|
}, ge = (e) => n("change", e), we = (e) => {
|
112
112
|
var l;
|
113
|
-
n("input", e), a.value === "" && (t.multiple || n("update:modelValue", null)), (l = r.value) == null || l.blur(), W.value &&
|
113
|
+
n("input", e), a.value === "" && (t.multiple || n("update:modelValue", null)), (l = r.value) == null || l.blur(), W.value && k(), $e(a.value, !1, t.modelValue);
|
114
114
|
}, D = async (e) => {
|
115
115
|
var l, o;
|
116
|
-
if (e.target instanceof Node &&
|
117
|
-
C(),
|
116
|
+
if (e.target instanceof Node && x.value && !x.value.$el.contains(e.target) && !((o = (l = u.value) == null ? void 0 : l.$el) != null && o.contains(e.target))) {
|
117
|
+
C(), We(), document.removeEventListener("click", D), document.removeEventListener("focusin", D), await E(t.transitionDuration), b();
|
118
118
|
return;
|
119
119
|
}
|
120
120
|
}, B = h(() => !(t.readonly || t.disabled || H.value || !r.value && t.multiple && i.value.length <= t.maxSelectedLabels)), Be = async () => {
|
121
121
|
var e, l, o;
|
122
|
-
B.value && ((e = r.value) == null || e.blur(), c.value ? (l = u.value) == null || l.focusPrevious() : (await
|
122
|
+
B.value && ((e = r.value) == null || e.blur(), c.value ? (l = u.value) == null || l.focusPrevious() : (await k(), await E(t.transitionDuration), (o = u.value) == null || o.focusLastSelected()));
|
123
123
|
}, Ve = async () => {
|
124
124
|
var e, l, o;
|
125
|
-
B.value && ((e = r.value) == null || e.blur(), c.value ? (l = u.value) == null || l.focusNext() : (await
|
126
|
-
},
|
127
|
-
var o, d, f,
|
125
|
+
B.value && ((e = r.value) == null || e.blur(), c.value ? (l = u.value) == null || l.focusNext() : (await k(), await E(t.transitionDuration), (o = u.value) == null || o.focusFirstSelected()));
|
126
|
+
}, Ie = (e) => {
|
127
|
+
var o, d, f, I;
|
128
128
|
if (!B.value || !t.multiple || a.value || (e.preventDefault(), (o = u.value) == null || o.blur(), !i.value.length)) return;
|
129
129
|
(d = r.value) == null || d.focusPrevious();
|
130
130
|
const l = (f = r.value) == null ? void 0 : f.getHighlighted();
|
131
|
-
l && ((
|
132
|
-
},
|
133
|
-
var o, d, f,
|
131
|
+
l && ((I = u.value) == null || I.focusByHash(l.valueHash));
|
132
|
+
}, Se = (e) => {
|
133
|
+
var o, d, f, I;
|
134
134
|
if (!B.value || !t.multiple || a.value || (e.preventDefault(), (o = u.value) == null || o.blur(), !i.value.length)) return;
|
135
135
|
(d = r.value) == null || d.focusNext();
|
136
136
|
const l = (f = r.value) == null ? void 0 : f.getHighlighted();
|
137
|
-
l && ((
|
138
|
-
},
|
137
|
+
l && ((I = u.value) == null || I.focusByHash(l.valueHash));
|
138
|
+
}, ke = async () => {
|
139
139
|
var l, o;
|
140
140
|
if (!B.value)
|
141
141
|
return;
|
@@ -145,7 +145,7 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
145
145
|
return;
|
146
146
|
}
|
147
147
|
} else {
|
148
|
-
await
|
148
|
+
await k(), await E(t.transitionDuration), i.value.length && ((l = u.value) == null || l.focusFirstSelected());
|
149
149
|
return;
|
150
150
|
}
|
151
151
|
const e = a.value.trim();
|
@@ -154,20 +154,20 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
154
154
|
c.value && await C();
|
155
155
|
}, Oe = async () => {
|
156
156
|
var e, l;
|
157
|
-
!B.value || a.value || !i.value.length || ((e = r.value) != null && e.getHighlighted() && r.value.confirmOption(), await
|
157
|
+
!B.value || a.value || !i.value.length || ((e = r.value) != null && e.getHighlighted() && r.value.confirmOption(), await j(), (l = r.value) == null || l.focusPrevious());
|
158
158
|
}, a = v(""), {
|
159
|
-
getter:
|
159
|
+
getter: M,
|
160
160
|
debouncedGetter: $e,
|
161
161
|
items: De,
|
162
|
-
loading:
|
162
|
+
loading: J
|
163
163
|
} = dt({
|
164
164
|
items: L(t, "items"),
|
165
165
|
debounce: t.queryDebounceTime
|
166
|
-
}),
|
166
|
+
}), P = () => {
|
167
167
|
var e, l;
|
168
|
-
t.enforceCoherence && !
|
168
|
+
t.enforceCoherence && !Z.value && (t.multiple ? n("update:modelValue", Pe.value.coherent) : n("update:modelValue", null), (e = r.value) == null || e.blur(), (l = u.value) == null || l.blur());
|
169
169
|
}, {
|
170
|
-
hasPrefilled:
|
170
|
+
hasPrefilled: Q,
|
171
171
|
isPrefilling: He,
|
172
172
|
prefill: Le
|
173
173
|
} = pt({
|
@@ -175,37 +175,37 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
175
175
|
currentValue: t.modelValue,
|
176
176
|
multiple: t.multiple,
|
177
177
|
fn: async ({ prefill: e }) => {
|
178
|
-
await
|
178
|
+
await M(a.value, e, t.modelValue), t.stash && Y(...S.value.map((l) => l.item)), P(), b();
|
179
179
|
}
|
180
180
|
}), {
|
181
|
-
array:
|
182
|
-
add:
|
181
|
+
array: X,
|
182
|
+
add: Y,
|
183
183
|
remove: Te,
|
184
184
|
set: Fe
|
185
185
|
} = nt(), i = h(() => {
|
186
186
|
const e = Object.fromEntries(
|
187
|
-
Object.entries(
|
187
|
+
Object.entries(_.value).map(([l], o) => [l, o])
|
188
188
|
);
|
189
|
-
return
|
190
|
-
}), Ee = h(() => i.value.length ? "" : t.placeholder), { data:
|
189
|
+
return S.value.filter((l) => l.selected).sort((l, o) => e[l.valueHash] - e[o.valueHash]);
|
190
|
+
}), Ee = h(() => i.value.length ? "" : t.placeholder), { data: _, get: xe } = ie({
|
191
191
|
items: L(t, "modelValue")
|
192
|
-
}), { options:
|
192
|
+
}), { options: S } = ut({
|
193
193
|
disabled: L(t, "disabled"),
|
194
|
-
items: h(() => [...De.value, ...
|
194
|
+
items: h(() => [...De.value, ...X.value]),
|
195
195
|
itemText: t.itemText,
|
196
196
|
itemValue: t.itemValue,
|
197
197
|
max: t.max,
|
198
198
|
selectable: !0,
|
199
|
-
selectedIndexedByHash:
|
200
|
-
}), H = h(() => !!(
|
199
|
+
selectedIndexedByHash: _
|
200
|
+
}), H = h(() => !!(J.value || t.loading)), Ae = h(() => {
|
201
201
|
let e = [];
|
202
202
|
const l = i.value.some(
|
203
203
|
(d) => d.text === a.value
|
204
204
|
);
|
205
|
-
return (t.multiple && a.value || t.filterBy === "not_stashed" && a.value || a.value && !l && !t.multiple) && t.filterBy ? e =
|
205
|
+
return (t.multiple && a.value || t.filterBy === "not_stashed" && a.value || a.value && !l && !t.multiple) && t.filterBy ? e = S.value.filter((d) => {
|
206
206
|
let f = !1;
|
207
|
-
return typeof t.filterBy == "function" ? f = t.filterBy(d.value, d.item, a.value) : t.filterBy === "not_stashed" && a.value ? f = !new Set(
|
208
|
-
}) : e =
|
207
|
+
return typeof t.filterBy == "function" ? f = t.filterBy(d.value, d.item, a.value) : t.filterBy === "not_stashed" && a.value ? f = !new Set(X.value.map((Ue) => Ue.valueHash)).has(d.valueHash) : Array.isArray(t.filterBy) && t.filterBy.length && (f = f || ue(d.item, t.filterBy, a.value.trim())), f || ue(d, ["text"], a.value.trim());
|
208
|
+
}) : e = S.value, e;
|
209
209
|
}), b = () => {
|
210
210
|
if (t.multiple) {
|
211
211
|
a.value = "";
|
@@ -214,18 +214,18 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
214
214
|
let e;
|
215
215
|
i.value && (e = ot(i.value)), a.value = (e == null ? void 0 : e.text) || "";
|
216
216
|
}, qe = async (e) => {
|
217
|
-
t.multiple ? (n("update:modelValue", t.modelValue.concat(e.value)), t.stash &&
|
217
|
+
t.multiple ? (n("update:modelValue", t.modelValue.concat(e.value)), t.stash && Y(e.item), b()) : (t.stash && Fe(e.item), n("update:modelValue", e.value), await j(), b()), q(), t.multiple || C();
|
218
218
|
}, N = async (e) => {
|
219
219
|
if (Te((l) => l.valueHash !== e.valueHash), t.multiple) {
|
220
|
-
const l = { ...
|
220
|
+
const l = { ..._.value };
|
221
221
|
delete l[e.valueHash], n("update:modelValue", Object.values(l));
|
222
222
|
} else
|
223
|
-
n("update:modelValue", null), await
|
224
|
-
|
223
|
+
n("update:modelValue", null), await j(), b();
|
224
|
+
q();
|
225
225
|
}, { data: Me } = ie({
|
226
|
-
items:
|
226
|
+
items: S,
|
227
227
|
key: "valueHash"
|
228
|
-
}), { coherent:
|
228
|
+
}), { coherent: Z, status: Pe } = st({
|
229
229
|
modelValue: L(t, "modelValue"),
|
230
230
|
multiple: t.multiple,
|
231
231
|
iteratee: (e) => !!Me.value[lt(e)]
|
@@ -234,7 +234,7 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
234
234
|
se(
|
235
235
|
() => t.modelValue,
|
236
236
|
async () => {
|
237
|
-
V++,
|
237
|
+
V++, Z.value || (await M(a.value, !1, t.modelValue), P()), V === 1 && b(), V--;
|
238
238
|
},
|
239
239
|
{
|
240
240
|
debounce: t.modelValueDebounceTime
|
@@ -242,28 +242,28 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
242
242
|
), se(
|
243
243
|
() => [t.dependencies, t.items],
|
244
244
|
async () => {
|
245
|
-
|
245
|
+
Q.value && (V++, await M(a.value, !1, t.modelValue), V === 1 && (P(), b()), V--);
|
246
246
|
},
|
247
247
|
{
|
248
248
|
debounce: t.depsDebounceTime
|
249
249
|
}
|
250
250
|
);
|
251
|
-
const c = v(!1), W = v(!0),
|
252
|
-
|
251
|
+
const c = v(!1), W = v(!0), ee = v(!1), k = async () => {
|
252
|
+
ee.value = !0, await mt(() => !!u.value), W.value = !1, c.value = !0;
|
253
253
|
}, C = async () => {
|
254
254
|
var e;
|
255
255
|
c.value = !1, W.value = !0, (e = r.value) == null || e.blur();
|
256
|
-
},
|
257
|
-
|
258
|
-
},
|
259
|
-
|
260
|
-
},
|
261
|
-
e.preventDefault(), n("click", e), !(t.disabled || t.readonly) && (
|
262
|
-
},
|
256
|
+
}, _e = () => c.value ? C() : k(), z = v(!1), Ne = () => {
|
257
|
+
z.value = !0;
|
258
|
+
}, We = () => {
|
259
|
+
z.value = !1, n("inactive");
|
260
|
+
}, ze = (e) => {
|
261
|
+
e.preventDefault(), n("click", e), !(t.disabled || t.readonly) && (q(), _e());
|
262
|
+
}, Ke = ft(
|
263
263
|
(e) => typeof e != "string",
|
264
264
|
JSON.stringify
|
265
265
|
), je = h(() => [].concat(t.modelValue).map((e) => {
|
266
|
-
const l =
|
266
|
+
const l = Ke(e);
|
267
267
|
return {
|
268
268
|
disabled: t.disabled,
|
269
269
|
name: t.name,
|
@@ -274,12 +274,12 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
274
274
|
let e = null;
|
275
275
|
t.multiple && (e = []), n("update:modelValue", e);
|
276
276
|
};
|
277
|
-
return (e, l) => (y(),
|
277
|
+
return (e, l) => (y(), K(bt, {
|
278
278
|
ref_key: "outerContainer",
|
279
|
-
ref:
|
280
|
-
class:
|
279
|
+
ref: x,
|
280
|
+
class: te({
|
281
281
|
"bb-base-select": !0,
|
282
|
-
"bb-base-select--active":
|
282
|
+
"bb-base-select--active": z.value,
|
283
283
|
"bb-base-select--shown": c.value,
|
284
284
|
"bb-base-select--loading": H.value,
|
285
285
|
"bb-base-select--disabled": e.disabled,
|
@@ -287,7 +287,7 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
287
287
|
"bb-base-select--readonly": e.readonly,
|
288
288
|
"bb-base-select--compact": e.compact
|
289
289
|
}),
|
290
|
-
onClick:
|
290
|
+
onClick: ze
|
291
291
|
}, {
|
292
292
|
"prepend-outer": s(() => [
|
293
293
|
p(e.$slots, "prepend-outer", { query: a.value })
|
@@ -296,152 +296,150 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
296
296
|
p(e.$slots, "append-outer", { query: a.value })
|
297
297
|
]),
|
298
298
|
default: s(() => [
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
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
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
"onOption:unselected": N
|
380
|
-
}, null, 8, ["options"]))
|
381
|
-
], 64)) : e.multiple ? (y(), O("span", Vt, Qe(e.selectedLabelsFn ? e.selectedLabelsFn(i.value.length) : g(ce)("select.multipleMaxReached", i.value.length)), 1)) : j("", !0),
|
382
|
-
Je((y(), O("input", {
|
383
|
-
id: g(Q),
|
384
|
-
key: `${g(pe)}`,
|
385
|
-
ref_key: "input",
|
386
|
-
ref: x,
|
387
|
-
"onUpdate:modelValue": l[0] || (l[0] = (o) => a.value = o),
|
388
|
-
"aria-autocomplete": "list",
|
389
|
-
"aria-controls": z.value ? `${g(Q)}_listbox` : void 0,
|
390
|
-
"aria-describedby": e.ariaDescribedby,
|
391
|
-
"aria-expanded": c.value,
|
392
|
-
autocomplete: e.autocomplete,
|
393
|
-
autofocus: e.autofocus,
|
394
|
-
class: le("bb-base-select__text-input"),
|
395
|
-
disabled: e.disabled,
|
396
|
-
inputmode: fe.value,
|
397
|
-
placeholder: Ee.value,
|
398
|
-
readonly: e.readonly || !e.allowWriting,
|
399
|
-
required: e.required && (!e.multiple || !e.modelValue.length),
|
400
|
-
role: "combobox",
|
401
|
-
size: "1",
|
402
|
-
style: ae({ "--characters": a.value.length }),
|
403
|
-
type: "text",
|
404
|
-
onBlur: m(be, ["stop"]),
|
405
|
-
onChange: m(ge, ["stop"]),
|
406
|
-
onFocusOnce: m(ye, ["stop"]),
|
407
|
-
onFocus: m(he, ["stop"]),
|
408
|
-
onInput: m(we, ["stop"]),
|
409
|
-
onKeydown: [
|
410
|
-
w(m(Oe, ["stop"]), ["delete"]),
|
411
|
-
w(m(ke, ["stop"]), ["left"]),
|
412
|
-
w(m(Ve, ["stop", "prevent"]), ["down"]),
|
413
|
-
w(m(Se, ["stop", "prevent"]), ["enter"]),
|
414
|
-
w(m(Ce, ["stop", "prevent"]), ["esc"]),
|
415
|
-
w(m(Be, ["stop", "prevent"]), ["up"]),
|
416
|
-
w(m(Ie, ["stop"]), ["right"])
|
417
|
-
]
|
418
|
-
}, null, 44, kt)), [
|
419
|
-
[Xe, a.value]
|
299
|
+
T("div", Bt, [
|
300
|
+
F(yt, {
|
301
|
+
ref_key: "innerContainer",
|
302
|
+
ref: $,
|
303
|
+
"append:icon": t["append:icon"],
|
304
|
+
clearable: e.clearable && !g(at)(e.modelValue),
|
305
|
+
"prepend:icon": t["prepend:icon"],
|
306
|
+
"prevent-focus": !0,
|
307
|
+
"onClick:clear": Re
|
308
|
+
}, {
|
309
|
+
prepend: s(() => [
|
310
|
+
p(e.$slots, "prepend", { query: a.value })
|
311
|
+
]),
|
312
|
+
prefix: s(() => [
|
313
|
+
p(e.$slots, "prefix")
|
314
|
+
]),
|
315
|
+
append: s(() => [
|
316
|
+
p(e.$slots, "append", { query: a.value })
|
317
|
+
]),
|
318
|
+
suffix: s(() => [
|
319
|
+
p(e.$slots, "suffix")
|
320
|
+
]),
|
321
|
+
default: s(() => [
|
322
|
+
F(g(tt), { tag: "span" }, {
|
323
|
+
default: s(() => [
|
324
|
+
T("span", Vt, [
|
325
|
+
e.multiple && i.value.length <= e.maxSelectedLabels ? (y(), O(ae, { key: 0 }, [
|
326
|
+
e.comma ? (y(), K(ht, {
|
327
|
+
key: 0,
|
328
|
+
ref_key: "commaBox",
|
329
|
+
ref: R,
|
330
|
+
options: i.value,
|
331
|
+
"onOption:unselected": N
|
332
|
+
}, null, 8, ["options"])) : (y(), K(vt, {
|
333
|
+
key: 1,
|
334
|
+
ref_key: "chipsBox",
|
335
|
+
ref: U,
|
336
|
+
options: i.value,
|
337
|
+
"onOption:unselected": N
|
338
|
+
}, null, 8, ["options"]))
|
339
|
+
], 64)) : e.multiple ? (y(), O("span", It, Qe(e.selectedLabelsFn ? e.selectedLabelsFn(i.value.length) : g(ce)("select.multipleMaxReached", i.value.length)), 1)) : le("", !0),
|
340
|
+
Je((y(), O("input", {
|
341
|
+
id: g(G),
|
342
|
+
key: `${g(pe)}`,
|
343
|
+
ref_key: "input",
|
344
|
+
ref: A,
|
345
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => a.value = o),
|
346
|
+
"aria-autocomplete": "list",
|
347
|
+
"aria-controls": ee.value ? `${g(G)}_listbox` : void 0,
|
348
|
+
"aria-describedby": e.ariaDescribedby,
|
349
|
+
"aria-expanded": c.value,
|
350
|
+
autocomplete: e.autocomplete,
|
351
|
+
autofocus: e.autofocus,
|
352
|
+
class: te("bb-base-select__text-input"),
|
353
|
+
disabled: e.disabled,
|
354
|
+
inputmode: fe.value,
|
355
|
+
placeholder: Ee.value,
|
356
|
+
readonly: e.readonly || !e.allowWriting,
|
357
|
+
required: e.required && (!e.multiple || !e.modelValue.length),
|
358
|
+
role: "combobox",
|
359
|
+
size: "1",
|
360
|
+
style: oe({ "--characters": a.value.length }),
|
361
|
+
type: "text",
|
362
|
+
onBlur: m(be, ["stop"]),
|
363
|
+
onChange: m(ge, ["stop"]),
|
364
|
+
onFocusOnce: m(ye, ["stop"]),
|
365
|
+
onFocus: m(he, ["stop"]),
|
366
|
+
onInput: m(we, ["stop"]),
|
367
|
+
onKeydown: [
|
368
|
+
w(m(Oe, ["stop"]), ["delete"]),
|
369
|
+
w(m(Ie, ["stop"]), ["left"]),
|
370
|
+
w(m(Ve, ["stop", "prevent"]), ["down"]),
|
371
|
+
w(m(ke, ["stop", "prevent"]), ["enter"]),
|
372
|
+
w(m(Ce, ["stop", "prevent"]), ["esc"]),
|
373
|
+
w(m(Be, ["stop", "prevent"]), ["up"]),
|
374
|
+
w(m(Se, ["stop"]), ["right"])
|
375
|
+
]
|
376
|
+
}, null, 44, St)), [
|
377
|
+
[Xe, a.value]
|
378
|
+
])
|
420
379
|
])
|
421
|
-
])
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
],
|
440
|
-
])
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
380
|
+
]),
|
381
|
+
_: 1
|
382
|
+
}),
|
383
|
+
e.showChevron ? p(e.$slots, "chevron", {
|
384
|
+
key: 0,
|
385
|
+
loading: !!g(J),
|
386
|
+
shown: c.value
|
387
|
+
}, () => [
|
388
|
+
l[1] || (l[1] = T("svg", {
|
389
|
+
class: "bb-base-select__chevron",
|
390
|
+
viewBox: "0 0 24 24",
|
391
|
+
xmlns: "http://www.w3.org/2000/svg"
|
392
|
+
}, [
|
393
|
+
T("path", {
|
394
|
+
d: "M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z",
|
395
|
+
fill: "currentColor"
|
396
|
+
})
|
397
|
+
], -1))
|
398
|
+
]) : le("", !0)
|
399
|
+
]),
|
400
|
+
_: 3
|
401
|
+
}, 8, ["append:icon", "clearable", "prepend:icon"]),
|
402
|
+
F(gt, { "model-value": c.value }, {
|
403
|
+
default: s(() => [
|
404
|
+
F(wt, {
|
405
|
+
ref_key: "optionsContainer",
|
406
|
+
ref: u,
|
407
|
+
compact: e.compact,
|
408
|
+
loading: H.value,
|
409
|
+
"loading-text": e.loadingText,
|
410
|
+
multiple: e.multiple,
|
411
|
+
"no-data-text": e.noDataText,
|
412
|
+
open: c.value,
|
413
|
+
options: Ae.value,
|
414
|
+
style: oe(ve.value),
|
415
|
+
"onOption:selected": qe,
|
416
|
+
"onOption:unselected": N
|
417
|
+
}, {
|
418
|
+
"options:prepend": s(() => [
|
419
|
+
p(e.$slots, "options:prepend")
|
420
|
+
]),
|
421
|
+
loading: s(() => [
|
422
|
+
p(e.$slots, "loading", { query: a.value })
|
423
|
+
]),
|
424
|
+
"no-data": s(() => [
|
425
|
+
p(e.$slots, "no-data", { query: a.value })
|
426
|
+
]),
|
427
|
+
"options:append": s(() => [
|
428
|
+
p(e.$slots, "options:append")
|
429
|
+
]),
|
430
|
+
option: s((o) => [
|
431
|
+
p(e.$slots, "option", ne({
|
432
|
+
hasErrors: e.hasErrors,
|
433
|
+
loading: H.value
|
434
|
+
}, o))
|
435
|
+
]),
|
436
|
+
_: 3
|
437
|
+
}, 8, ["compact", "loading", "loading-text", "multiple", "no-data-text", "open", "options", "style"])
|
438
|
+
]),
|
439
|
+
_: 3
|
440
|
+
}, 8, ["model-value"])
|
441
|
+
]),
|
442
|
+
(y(!0), O(ae, null, Ye(je.value, (o) => (y(), O("input", ne({
|
445
443
|
key: o.value,
|
446
444
|
ref_for: !0
|
447
445
|
}, o), null, 16))), 128))
|
@@ -451,5 +449,5 @@ const Bt = { class: "bb-base-select__input-container" }, Vt = {
|
|
451
449
|
}
|
452
450
|
});
|
453
451
|
export {
|
454
|
-
|
452
|
+
ol as default
|
455
453
|
};
|