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