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