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