bitboss-ui 3.0.0-beta.75 → 3.0.0-beta.76
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/README.md +5 -5
- package/bin/cli.mjs +16 -10
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +1 -1
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbColorInput.md +1 -1
- package/dist/ai/BbColorPalette.md +1 -1
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +1 -1
- package/dist/ai/BbDatePickerInput.md +1 -1
- package/dist/ai/BbDialog.md +3 -2
- package/dist/ai/BbDropdown.md +23 -21
- package/dist/ai/BbDropdownButton.md +13 -11
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbSelect.md +153 -43
- package/dist/ai/BbSelectPopover.md +115 -9
- package/dist/ai/BbTable.md +1 -1
- package/dist/ai/BbTimePicker.md +1 -1
- package/dist/ai/BbTimePickerInput.md +1 -1
- package/dist/ai/GroupedListBox.md +2 -2
- package/dist/ai/ListBox.md +3 -2
- package/dist/ai/changelog.json +153 -7
- package/dist/ai/components.json +12 -12
- package/dist/ai/guides/agent-contract.md +1 -1
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/icons-policy.md +32 -11
- package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
- package/dist/ai/guides/migration/adoption-checklist.md +1 -1
- package/dist/ai/guides/migration/components/bb-icon.md +4 -4
- package/dist/ai/guides/migration/v2-to-v3.md +48 -19
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdown.json +19 -17
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -9
- package/dist/ai/manifest/components/BbDropdownButton.json +12 -10
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelect.json +44 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -6
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +4 -1
- package/dist/ai/manifest/components/BbTable.tree.json +5 -1
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/onboarding.md +1 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/onboarding.md +1 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAvatar.md +9 -2
- package/dist/ai/source/BbBadge.md +6 -2
- package/dist/ai/source/BbBreadcrumbs.md +5 -2
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +10 -6
- package/dist/ai/source/BbColorPalette.md +5 -2
- package/dist/ai/source/BbDatePickerInput.md +7 -2
- package/dist/ai/source/BbDropdown.md +91 -66
- package/dist/ai/source/BbDropdownButton.md +36 -19
- package/dist/ai/source/BbDropdownGroup.md +91 -66
- package/dist/ai/source/BbGallery.md +6 -5
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +130 -106
- package/dist/ai/source/BbSelectPopover.md +128 -21
- package/dist/ai/source/BbTable.md +42 -9
- package/dist/ai/source/BbTimePickerInput.md +6 -2
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +7 -2
- package/dist/ai/source/GroupedListBox.md +22 -3
- package/dist/ai/source/ListBox.md +7 -1
- package/dist/ai/source/WarningIcon.md +4 -3
- package/dist/assets/svgs/close.svg_raw.js +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +48 -47
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -59
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +128 -127
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +500 -499
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +175 -174
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +263 -262
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +318 -312
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +47 -46
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +36 -20
- package/dist/components/BbDropdown/types.d.ts +51 -53
- package/dist/components/BbDropdown/types.js +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +1 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +74 -59
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +111 -63
- package/dist/components/BbDropdownButton/types.d.ts +12 -10
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +204 -203
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
- package/dist/components/BbSelect/BbSelect.vue.d.ts +30 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +201 -184
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +101 -105
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +6 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +617 -585
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +22 -13
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1092 -1090
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +225 -224
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +76 -75
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +69 -68
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +166 -165
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/llms-full.txt +477 -187
- package/dist/llms-medium.txt +25 -24
- package/dist/llms.txt +1 -1
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +4 -4
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +319 -306
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +73 -12
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -38,33 +38,35 @@ import { useUntil as ze } from "../../composables/useUntil.js";
|
|
|
38
38
|
import { useClosingInert as Be } from "../../composables/useClosingInert.js";
|
|
39
39
|
import { wait as Ve } from "../../utilities/functions/wait.js";
|
|
40
40
|
import { useOpenModel as He } from "../../composables/useOpenModel.js";
|
|
41
|
-
import Ue from "
|
|
42
|
-
import We from "../
|
|
43
|
-
import Ge from "../
|
|
44
|
-
import Ke from "../
|
|
45
|
-
import qe from "../
|
|
46
|
-
import Je from "../
|
|
47
|
-
import Ye from "../
|
|
48
|
-
import Xe from "
|
|
49
|
-
import Ze from "
|
|
50
|
-
import
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import it from "
|
|
41
|
+
import { useOwnModel as Ue } from "../../composables/useOwnModel.js";
|
|
42
|
+
import We from "../BbBadge/BbBadge.vue.js";
|
|
43
|
+
import Ge from "../BbIcon/BbIcon.vue.js";
|
|
44
|
+
import Ke from "../BbOffCanvas/BbOffCanvas.vue.js";
|
|
45
|
+
import qe from "../ClearableButton/ClearableButton.vue.js";
|
|
46
|
+
import Je from "../CommonPopover/CommonPopover.vue.js";
|
|
47
|
+
import Ye from "../ErrorIcon/ErrorIcon.vue.js";
|
|
48
|
+
import Xe from "../WarningIcon/WarningIcon.vue.js";
|
|
49
|
+
import Ze from "../../assets/svgs/search.svg_raw.js";
|
|
50
|
+
import Qe from "../ListBox/ListBox.vue.js";
|
|
51
|
+
import { waitFor as $e } from "../../utilities/functions/waitFor.js";
|
|
52
|
+
import { BB_SELECT_POPOVER_PT as et } from "./types.js";
|
|
53
|
+
import { BB_OFF_CANVAS_PT as tt } from "../BbOffCanvas/types.js";
|
|
54
|
+
import { usePassthrough as nt } from "../../composables/usePassthrough.js";
|
|
55
|
+
import { withoutClass as rt, withoutPt as it } from "../../utils/passthrough.js";
|
|
56
|
+
import at from "../BbSmoothHeight/BbSmoothHeight.vue.js";
|
|
56
57
|
import { transitions as u } from "../../utilities/misc/transitions.js";
|
|
57
|
-
import { removedPropsFor as
|
|
58
|
-
import { warnRemovedAttrs as
|
|
59
|
-
import { hasVnodeListener as
|
|
60
|
-
import { runRetry as
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
58
|
+
import { removedPropsFor as ot } from "../../deprecation/removedProps.js";
|
|
59
|
+
import { warnRemovedAttrs as st } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
60
|
+
import { hasVnodeListener as ct } from "../../utilities/functions/hasVnodeListener.js";
|
|
61
|
+
import { runRetry as lt } from "../../utils/loadRetry.js";
|
|
62
|
+
import { useInternalIcon as ut } from "../../composables/useInternalIcon.js";
|
|
63
|
+
import { Fragment as dt, computed as d, createBlock as ft, createCommentVNode as pt, createElementBlock as f, createElementVNode as mt, createSlots as ht, createTextVNode as gt, createVNode as p, defineComponent as _t, getCurrentInstance as vt, guardReactiveProps as m, mergeProps as h, nextTick as yt, normalizeProps as g, onBeforeMount as bt, onBeforeUnmount as xt, onDeactivated as St, openBlock as _, ref as v, renderList as Ct, renderSlot as y, shallowRef as wt, toDisplayString as Tt, toRef as b, unref as x, vModelText as Et, watch as S, withCtx as C, withDirectives as Dt, withKeys as Ot, withModifiers as w } from "vue";
|
|
64
|
+
import { createReusableTemplate as kt, useDebounceFn as At, useElementSize as jt, useIntersectionObserver as Mt } from "@vueuse/core";
|
|
63
65
|
// src/components/BbSelectPopover/BbSelectPopover.vue?vue&type=script&setup=true&lang.ts
|
|
64
|
-
var
|
|
66
|
+
var Nt = {
|
|
65
67
|
key: 0,
|
|
66
68
|
class: "bb-select-popover__search-container"
|
|
67
|
-
},
|
|
69
|
+
}, Pt = [
|
|
68
70
|
"id",
|
|
69
71
|
"aria-activedescendant",
|
|
70
72
|
"aria-controls",
|
|
@@ -75,11 +77,11 @@ var jt = {
|
|
|
75
77
|
"inputmode",
|
|
76
78
|
"placeholder",
|
|
77
79
|
"tabindex"
|
|
78
|
-
],
|
|
80
|
+
], Ft = ["id"], It = {
|
|
79
81
|
key: 2,
|
|
80
82
|
"aria-hidden": "true",
|
|
81
83
|
class: "bb-select-popover__search-strip"
|
|
82
|
-
},
|
|
84
|
+
}, Lt = [
|
|
83
85
|
"aria-activedescendant",
|
|
84
86
|
"aria-controls",
|
|
85
87
|
"aria-describedby",
|
|
@@ -87,10 +89,10 @@ var jt = {
|
|
|
87
89
|
"aria-invalid",
|
|
88
90
|
"aria-label",
|
|
89
91
|
"onKeydown"
|
|
90
|
-
],
|
|
92
|
+
], Rt = {
|
|
91
93
|
key: 0,
|
|
92
94
|
class: "bb-select-popover__sheet-selection"
|
|
93
|
-
},
|
|
95
|
+
}, zt = { class: "bb-select-popover__sheet-chips" }, Bt = ["inert"], Vt = ["inert"], Ht = "__bb-create__", T = /*@__PURE__*/ _t({
|
|
94
96
|
__name: "BbSelectPopover",
|
|
95
97
|
props: {
|
|
96
98
|
"pt:root": {},
|
|
@@ -105,6 +107,9 @@ var jt = {
|
|
|
105
107
|
"pt:clear:open": {},
|
|
106
108
|
"pt:list": {},
|
|
107
109
|
"pt:list:open": {},
|
|
110
|
+
"pt:groupHeader": {},
|
|
111
|
+
"pt:groupHeader:disabled": {},
|
|
112
|
+
"pt:groupHeader:open": {},
|
|
108
113
|
"pt:option": {},
|
|
109
114
|
"pt:option:selected": {},
|
|
110
115
|
"pt:option:disabled": {},
|
|
@@ -130,6 +135,7 @@ var jt = {
|
|
|
130
135
|
"pt:footer": {},
|
|
131
136
|
"pt:footer:open": {},
|
|
132
137
|
open: { type: Boolean },
|
|
138
|
+
query: {},
|
|
133
139
|
pt: {},
|
|
134
140
|
activator: {},
|
|
135
141
|
adaptive: {
|
|
@@ -206,6 +212,7 @@ var jt = {
|
|
|
206
212
|
"shown",
|
|
207
213
|
"hide",
|
|
208
214
|
"update:open",
|
|
215
|
+
"update:query",
|
|
209
216
|
"hidden",
|
|
210
217
|
"blur",
|
|
211
218
|
"change",
|
|
@@ -217,164 +224,166 @@ var jt = {
|
|
|
217
224
|
"update:modelValue",
|
|
218
225
|
"option:add"
|
|
219
226
|
],
|
|
220
|
-
setup(u, { emit:
|
|
221
|
-
let T = u, E =
|
|
227
|
+
setup(u, { emit: _t }) {
|
|
228
|
+
let T = u, E = _t, Ut = ut("search", Ze), Wt = Fe(null, "popoverOffset"), D = nt({
|
|
222
229
|
component: "BbSelectPopover",
|
|
223
230
|
props: T,
|
|
224
|
-
parts:
|
|
225
|
-
states:
|
|
226
|
-
active: { open: () =>
|
|
227
|
-
facts: (e) => ({ known:
|
|
228
|
-
}),
|
|
229
|
-
process.env.NODE_ENV !== "production" &&
|
|
230
|
-
let [
|
|
231
|
-
|
|
231
|
+
parts: et.parts,
|
|
232
|
+
states: et.states,
|
|
233
|
+
active: { open: () => Y.value },
|
|
234
|
+
facts: (e) => ({ known: I(e) })
|
|
235
|
+
}), Gt = Ne();
|
|
236
|
+
process.env.NODE_ENV !== "production" && st("BbSelectPopover", ot("BbSelectPopover"));
|
|
237
|
+
let [Kt, qt] = kt(), [Jt, Yt] = kt();
|
|
238
|
+
bt(() => {
|
|
232
239
|
T.multiple && !Array.isArray(T.modelValue) && ie().throw(`BbSelectPopover: \`multiple\` requires an array modelValue, received ${T.modelValue === null ? "null" : typeof T.modelValue}. Seed it with \`[]\` for an empty selection — \`null\`/\`undefined\` are not accepted, because a multi-select with no array has no way to express "nothing selected" separately from "not ready".`);
|
|
233
240
|
});
|
|
234
|
-
let O = v(), k = v(null),
|
|
241
|
+
let O = v(), k = v(null), Xt = v(null), Zt = v(null), Qt = v(null), $t = v(), en = d(() => {
|
|
235
242
|
if (T.anchor) {
|
|
236
243
|
let e = i(T.anchor);
|
|
237
244
|
if (e) return e;
|
|
238
245
|
}
|
|
239
246
|
return O.value;
|
|
240
|
-
}), { width:
|
|
247
|
+
}), { width: tn } = jt(() => r(en.value), {
|
|
241
248
|
width: 0,
|
|
242
249
|
height: 0
|
|
243
|
-
}, { box: "border-box" }),
|
|
250
|
+
}, { box: "border-box" }), nn = d(() => T.activator != null), rn = (e) => {
|
|
244
251
|
let t = i(e);
|
|
245
252
|
t && (O.value = t);
|
|
246
253
|
};
|
|
247
254
|
S(() => T.activator, (t, n) => {
|
|
248
255
|
let r = O.value;
|
|
249
|
-
t ? O.value = i(t) ?? void 0 : n && (O.value = void 0), r && !O.value &&
|
|
250
|
-
inPanel: (e) => !!
|
|
256
|
+
t ? O.value = i(t) ?? void 0 : n && (O.value = void 0), r && !O.value && Y.value && e({
|
|
257
|
+
inPanel: (e) => !!Qt.value?.$el.contains(e) || !!document.getElementById(`${j}_listbox`)?.closest("dialog")?.contains(e),
|
|
251
258
|
close: $,
|
|
252
259
|
activator: () => O.value
|
|
253
260
|
});
|
|
254
261
|
}, { immediate: !0 });
|
|
255
|
-
let { isMobile:
|
|
256
|
-
if (
|
|
257
|
-
let e =
|
|
258
|
-
return !(e > 0) ||
|
|
259
|
-
},
|
|
260
|
-
let e =
|
|
261
|
-
return e === "auto" ? !
|
|
262
|
-
}),
|
|
262
|
+
let { isMobile: an } = Ae(), on = d(() => T.disableWriting ?? "auto"), sn = Fe(null, "autoDisableWritingThreshold"), cn = vt(), ln = () => {
|
|
263
|
+
if (on.value !== "auto" || !Array.isArray(T.items)) return !1;
|
|
264
|
+
let e = sn() ?? 6;
|
|
265
|
+
return !(e > 0) || ct(cn, "option:add") ? !1 : T.items.length < e;
|
|
266
|
+
}, un = v(ln()), A = d(() => {
|
|
267
|
+
let e = on.value;
|
|
268
|
+
return e === "auto" ? !un.value : e === "mobile" ? !an.value : e === "desktop" ? an.value : !e;
|
|
269
|
+
}), dn = d(() => on.value === "mobile" && an.value || on.value === "desktop" && !an.value ? "none" : void 0), { t: fn } = ke(), pn = d(() => T.searchInputAriaLabel ?? fn("select.searchLabel").value), mn = d(() => !!T.clearable && (N.value.length > 0 || (T.multiple ? Array.isArray(T.modelValue) && T.modelValue.length > 0 : !ae(T.modelValue)))), hn = pe().id.value, j = T.id || hn, gn = d(() => T.ariaInvalid ?? !!T.hasErrors ? "true" : void 0), _n = d(() => {
|
|
263
270
|
let e = T.ariaDescribedby, t = Array.isArray(e) ? e.map((e) => e.trim()).filter(Boolean) : typeof e == "string" && e.trim() ? [e.trim()] : [];
|
|
264
|
-
return
|
|
265
|
-
}),
|
|
266
|
-
if (
|
|
267
|
-
|
|
271
|
+
return Y.value && F.value !== null && !q.value && t.push(`${j}_listbox_failed`), Y.value && or.value && A.value && t.push(`${j}_search_hint`), t.length ? t.join(" ") : void 0;
|
|
272
|
+
}), vn = !1, { resume: yn, pause: bn } = Mt(() => r(O.value), async ([{ intersectionRatio: e }]) => {
|
|
273
|
+
if (vn) {
|
|
274
|
+
vn = !1;
|
|
268
275
|
return;
|
|
269
276
|
}
|
|
270
|
-
if (e >= .99 || !
|
|
277
|
+
if (e >= .99 || !Y.value) return;
|
|
271
278
|
let t = O.value;
|
|
272
|
-
t && await l(t) ||
|
|
279
|
+
t && await l(t) || Y.value && await $();
|
|
273
280
|
}, {
|
|
274
281
|
threshold: [0, 1],
|
|
275
282
|
immediate: !1
|
|
276
|
-
}),
|
|
283
|
+
}), xn = d(() => {
|
|
277
284
|
if (T.width === "auto") return "auto";
|
|
278
|
-
if (T.width == null || T.width === "") return
|
|
285
|
+
if (T.width == null || T.width === "") return tn.value ? `${tn.value}px` : "320px";
|
|
279
286
|
try {
|
|
280
287
|
let { value: e, unit: t } = ce(T.width);
|
|
281
|
-
return t === "%" ?
|
|
288
|
+
return t === "%" ? tn.value ? `${tn.value * (e / 100)}px` : "320px" : `${e}${t}`;
|
|
282
289
|
} catch {
|
|
283
|
-
return typeof T.width == "string" ? T.width.trim() :
|
|
290
|
+
return typeof T.width == "string" ? T.width.trim() : tn.value ? `${tn.value}px` : "320px";
|
|
284
291
|
}
|
|
285
|
-
}),
|
|
292
|
+
}), Sn = d(() => h({ class: "bb-select-popover__panel" }, X.value ? {} : D.panel ?? {})), Cn = d(() => h({
|
|
286
293
|
class: ["bb-select-popover bb-select-popover--sheet", {
|
|
287
|
-
"bb-select-popover--errors":
|
|
288
|
-
"bb-select-popover--warnings":
|
|
289
|
-
"bb-select-popover--loading":
|
|
290
|
-
"bb-select-popover--reloading":
|
|
291
|
-
"bb-select-popover--clearable-active":
|
|
294
|
+
"bb-select-popover--errors": Li.value,
|
|
295
|
+
"bb-select-popover--warnings": Ri.value,
|
|
296
|
+
"bb-select-popover--loading": q.value,
|
|
297
|
+
"bb-select-popover--reloading": Fi.value,
|
|
298
|
+
"bb-select-popover--clearable-active": mn.value
|
|
292
299
|
}],
|
|
293
300
|
tabindex: -1
|
|
294
|
-
},
|
|
301
|
+
}, Sn.value)), wn = d(() => ({ "--w": xn.value })), M = () => {
|
|
295
302
|
O.value?.focus();
|
|
296
|
-
}, Sn = () => {
|
|
297
|
-
qt.value instanceof HTMLInputElement && qt.value.focus();
|
|
298
|
-
}, Cn = () => {
|
|
299
|
-
Jt.value instanceof HTMLButtonElement && Jt.value.focus();
|
|
300
|
-
}, wn = () => {
|
|
301
|
-
A.value ? Sn() : Cn();
|
|
302
303
|
}, Tn = () => {
|
|
304
|
+
Xt.value instanceof HTMLInputElement && Xt.value.focus();
|
|
305
|
+
}, En = () => {
|
|
306
|
+
Zt.value instanceof HTMLButtonElement && Zt.value.focus();
|
|
307
|
+
}, Dn = () => {
|
|
308
|
+
A.value ? Tn() : En();
|
|
309
|
+
}, On = () => {
|
|
303
310
|
let e = document.activeElement;
|
|
304
|
-
return e ===
|
|
305
|
-
}, En = (e) => {
|
|
306
|
-
E("focus", e), Ma();
|
|
307
|
-
}, Dn = (e) => {
|
|
308
|
-
E("blur", e), Ia();
|
|
309
|
-
}, On = (e) => {
|
|
310
|
-
E("change", e);
|
|
311
|
+
return e === Xt.value || !!O.value?.contains(e);
|
|
311
312
|
}, kn = (e) => {
|
|
312
|
-
|
|
313
|
+
E("focus", e), Ba();
|
|
313
314
|
}, An = (e) => {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
315
|
+
E("blur", e), Wa();
|
|
316
|
+
}, jn = (e) => {
|
|
317
|
+
E("change", e);
|
|
318
|
+
}, Mn = (e) => {
|
|
319
|
+
Ba();
|
|
320
|
+
}, Nn = (e) => {
|
|
321
|
+
E("input", e), Pn(!1);
|
|
322
|
+
}, Pn = (e) => {
|
|
323
|
+
if (or.value && !cr) return;
|
|
324
|
+
cr = P.value, qr();
|
|
325
|
+
let t = Br, n = () => (t = Br, [
|
|
318
326
|
P.value,
|
|
319
327
|
"search",
|
|
320
328
|
T.modelValue
|
|
321
|
-
])
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
329
|
+
]);
|
|
330
|
+
e && Cr(), Promise.resolve(e ? ur(...n()) : dr(n)).then((e) => Hi(t, "search", e));
|
|
331
|
+
}, Fn = (e) => {
|
|
332
|
+
$t.value = e;
|
|
333
|
+
}, In = async (e) => {
|
|
325
334
|
let t = e.target instanceof Element ? e.target : e.target instanceof Text ? e.target.parentElement : null;
|
|
326
335
|
if (!t) return;
|
|
327
|
-
let n =
|
|
328
|
-
if (n || r || e.type === "focusin" &&
|
|
336
|
+
let n = en.value?.contains(t), r = !!t.closest(".bb-common-popover");
|
|
337
|
+
if (n || r || e.type === "focusin" && en.value && t.contains(en.value)) return;
|
|
329
338
|
let i = t instanceof HTMLLabelElement ? t : t.closest("label");
|
|
330
|
-
i?.control &&
|
|
331
|
-
},
|
|
339
|
+
i?.control && en.value?.contains(i.control) || (await $(), Va());
|
|
340
|
+
}, Ln = d(() => !(T.readonly || T.disabled || q.value && !mr.value.length)), Rn = new AbortController(), zn = async () => $e(() => !!k.value, {
|
|
332
341
|
interval: 100,
|
|
333
|
-
signal:
|
|
334
|
-
}),
|
|
335
|
-
let e =
|
|
342
|
+
signal: Rn.signal
|
|
343
|
+
}), Bn = () => {
|
|
344
|
+
let e = ji.value[0];
|
|
336
345
|
e?.valueHash ? k.value?.focusByHash(e.valueHash) : k.value?.focusFirstSelected();
|
|
337
|
-
},
|
|
338
|
-
let e =
|
|
346
|
+
}, Vn = () => {
|
|
347
|
+
let e = ji.value[ji.value.length - 1];
|
|
339
348
|
e?.valueHash ? k.value?.focusByHash(e.valueHash) : k.value?.focusLastSelected();
|
|
340
|
-
},
|
|
349
|
+
}, Hn = null, Un = (e) => {
|
|
341
350
|
let t = (async () => {
|
|
342
|
-
await
|
|
351
|
+
await ja({ focusPopoverContent: !1 }), await zn(), await Ve(T.transitionDuration), e();
|
|
343
352
|
})();
|
|
344
|
-
|
|
353
|
+
Hn = t;
|
|
345
354
|
let n = () => {
|
|
346
|
-
|
|
355
|
+
Hn === t && (Hn = null);
|
|
347
356
|
};
|
|
348
357
|
return t.then(n, n), t;
|
|
349
|
-
},
|
|
350
|
-
for (;
|
|
351
|
-
},
|
|
352
|
-
|
|
353
|
-
},
|
|
354
|
-
|
|
355
|
-
},
|
|
356
|
-
|
|
357
|
-
},
|
|
358
|
-
candidates: () => (T.groupBy ?
|
|
359
|
-
getTokens: (e) => [Le(String(e.text ?? ""),
|
|
358
|
+
}, Wn = async () => {
|
|
359
|
+
for (; Hn;) await Hn.catch(() => void 0);
|
|
360
|
+
}, Gn = async () => {
|
|
361
|
+
Ln.value && (await Wn(), Y.value ? (Q(), k.value?.focusPrevious()) : await Un(Vn));
|
|
362
|
+
}, Kn = async () => {
|
|
363
|
+
Ln.value && (await Wn(), Y.value ? (Q(), k.value?.focusNext()) : await Un(Bn));
|
|
364
|
+
}, qn = async (e) => {
|
|
365
|
+
Ln.value && (await Wn(), Y.value || await Un(() => void 0), Q(), e === "first" ? k.value?.focusFirst() : k.value?.focusLast());
|
|
366
|
+
}, Jn = () => qn("first"), Yn = () => qn("last"), Xn = Re({
|
|
367
|
+
candidates: () => (T.groupBy ? fa.value.flatMap((e) => e.options) : J.value).filter((e) => !e.disabled),
|
|
368
|
+
getTokens: (e) => [Le(String(e.text ?? ""), Gt.locale)],
|
|
360
369
|
getCurrent: () => k.value?.getHighlighted() ?? void 0,
|
|
361
370
|
onMatch: (e) => {
|
|
362
|
-
|
|
371
|
+
Q(), k.value?.focusByHash(e.valueHash);
|
|
363
372
|
},
|
|
364
|
-
locale: () =>
|
|
365
|
-
}),
|
|
366
|
-
e.preventDefault(), await
|
|
367
|
-
let t =
|
|
373
|
+
locale: () => Gt.locale
|
|
374
|
+
}), Zn = async (e) => {
|
|
375
|
+
e.preventDefault(), await Wn();
|
|
376
|
+
let t = Xt.value;
|
|
368
377
|
if (!(t instanceof HTMLInputElement) || document.activeElement !== t) return;
|
|
369
378
|
let n = t.value.length;
|
|
370
379
|
t.setRangeText(e.key, t.selectionStart ?? n, t.selectionEnd ?? n, "end"), t.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
371
|
-
},
|
|
372
|
-
Ie(e) && (A.value ?
|
|
373
|
-
},
|
|
374
|
-
if (!
|
|
375
|
-
if (await
|
|
376
|
-
await
|
|
377
|
-
|
|
380
|
+
}, Qn = async (e) => {
|
|
381
|
+
Ie(e) && (A.value ? Hn && await Zn(e) : Ln.value && (e.preventDefault(), Y.value || (await ja({ focusPopoverContent: !1 }), await zn(), await Ve(T.transitionDuration)), Xn.onKeydown(e)));
|
|
382
|
+
}, $n = async () => {
|
|
383
|
+
if (!Ln.value) return;
|
|
384
|
+
if (await Wn(), !Y.value) {
|
|
385
|
+
await Un(() => {
|
|
386
|
+
ji.value.length ? Bn() : A.value ? Tn() : En();
|
|
378
387
|
});
|
|
379
388
|
return;
|
|
380
389
|
}
|
|
@@ -382,64 +391,64 @@ var jt = {
|
|
|
382
391
|
k.value.confirmOption();
|
|
383
392
|
return;
|
|
384
393
|
}
|
|
385
|
-
if (!A.value ||
|
|
394
|
+
if (!A.value || or.value) return;
|
|
386
395
|
let e = N.value.trim();
|
|
387
|
-
|
|
388
|
-
},
|
|
396
|
+
Yr(e) || er(e);
|
|
397
|
+
}, er = (e) => {
|
|
389
398
|
E("option:add", e), N.value = "";
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
},
|
|
393
|
-
ArrowDown: () =>
|
|
394
|
-
ArrowUp: () =>
|
|
395
|
-
Down: () =>
|
|
396
|
-
Enter: () =>
|
|
397
|
-
Esc: () =>
|
|
398
|
-
Escape: () =>
|
|
399
|
-
Up: () =>
|
|
400
|
-
},
|
|
399
|
+
}, tr = async () => {
|
|
400
|
+
Y.value && (await $(), M());
|
|
401
|
+
}, nr = {
|
|
402
|
+
ArrowDown: () => Kn(),
|
|
403
|
+
ArrowUp: () => Gn(),
|
|
404
|
+
Down: () => Kn(),
|
|
405
|
+
Enter: () => $n(),
|
|
406
|
+
Esc: () => tr(),
|
|
407
|
+
Escape: () => tr(),
|
|
408
|
+
Up: () => Gn()
|
|
409
|
+
}, rr = (e) => {
|
|
401
410
|
if (n(e)) return;
|
|
402
|
-
let t =
|
|
411
|
+
let t = nr[e.key];
|
|
403
412
|
t && (e.stopPropagation(), e.preventDefault(), t());
|
|
404
|
-
},
|
|
405
|
-
|
|
406
|
-
}, N = v(""),
|
|
413
|
+
}, ir = Symbol("bb-select-popover-escape"), ar = (e) => {
|
|
414
|
+
Y.value && e.key === "Escape" && he(ir) && (e.stopImmediatePropagation(), e.preventDefault(), tr());
|
|
415
|
+
}, N = v(""), or = d(() => T.minQueryLength > 0 && [...N.value.trim()].length < T.minQueryLength), P = d(() => or.value ? "" : N.value), sr = d(() => T.minQueryLength > 1 ? fn("select.searchMinLength", T.minQueryLength).value : fn("select.searchToStart").value), cr = "";
|
|
407
416
|
S(N, (e) => {
|
|
408
|
-
e || (
|
|
417
|
+
e || (cr = "");
|
|
409
418
|
}, { flush: "sync" });
|
|
410
|
-
let
|
|
419
|
+
let lr = v(!1), { getter: ur, debouncedGetter: dr, clientReproducible: fr, hydratedFromSsr: pr, items: mr, loading: hr, error: F, ssrMarker: gr, startedArgs: _r, settledArgs: vr, settledCount: yr, inFlight: br, failedArgs: xr, discard: Sr, discardScheduled: Cr } = ye({
|
|
411
420
|
items: b(T, "items"),
|
|
412
421
|
debounce: T.queryDebounceTime,
|
|
413
422
|
marker: !0
|
|
414
|
-
}), { array:
|
|
423
|
+
}), { array: wr, add: Tr, remove: Er, set: Dr } = le(), Or = d(() => T.multiple ? !!T.modelValue?.length : !ae(T.modelValue)), { getOptionValue: kr } = ee(), { getOptionText: Ar } = te(), jr = Oe();
|
|
415
424
|
De(null);
|
|
416
|
-
let
|
|
417
|
-
let e = Te(
|
|
425
|
+
let Mr = () => T.knownItems === void 0 ? jr?.rows() : T.knownItems, Nr = /* @__PURE__ */ new WeakSet(), I = (e) => typeof e == "object" && !!e && Nr.has(e), Pr = /* @__PURE__ */ new Map(), L = d(() => {
|
|
426
|
+
let e = Te(Mr()), t = /* @__PURE__ */ new Map();
|
|
418
427
|
for (let [n, r] of e) {
|
|
419
|
-
let i = s(r), a =
|
|
428
|
+
let i = s(r), a = Pr.get(n), o = a?.contents === i ? a.row : r;
|
|
420
429
|
e.set(n, o), t.set(n, {
|
|
421
430
|
row: o,
|
|
422
431
|
contents: i
|
|
423
|
-
}),
|
|
432
|
+
}), Nr.add(o);
|
|
424
433
|
}
|
|
425
|
-
return
|
|
426
|
-
}),
|
|
427
|
-
alreadyLoaded:
|
|
428
|
-
clientReproducible:
|
|
429
|
-
trigger: d(() => Array.isArray(T.items) || T.prefill === !0 || T.enforceCoherence &&
|
|
434
|
+
return Pr = t, e;
|
|
435
|
+
}), Fr = (e) => s(I(e) ? e.value : kr(e, T.itemValue)), Ir = d(() => s([...L.value.values()])), Lr = d(() => L.value.size > 0), Rr = d(() => Mr() != null), zr = d(() => Ee(L.value, T.modelValue, T.multiple)), R = v("none"), Br = 0, Vr = d(() => R.value === "none" && zr.value), Hr = d(() => T.prefill === !1 && !Array.isArray(T.items) && A.value && (!Or.value || zr.value)), Ur = d(() => F.value === null ? Hr.value && !P.value ? sr.value : T.emptyText : T.failedText || fn("common.failedText").value), { hasPrefilled: z, isPrefilling: Wr, canLoad: Gr, prefill: Kr, markPrefilled: qr } = Me({
|
|
436
|
+
alreadyLoaded: pr,
|
|
437
|
+
clientReproducible: fr,
|
|
438
|
+
trigger: d(() => Array.isArray(T.items) || T.prefill === !0 || T.enforceCoherence && Or.value && !Vr.value || T.prefill === "interaction" && lr.value),
|
|
430
439
|
currentValue: void 0,
|
|
431
440
|
multiple: !1,
|
|
432
441
|
fn: async () => {
|
|
433
|
-
await
|
|
442
|
+
await Ui(P.value, "initial", T.modelValue) === "applied" && (T.stash && Tr(...G.value.filter((e) => e.selected).map((e) => e.item)), Ai());
|
|
434
443
|
}
|
|
435
|
-
}),
|
|
444
|
+
}), Jr = d(() => T.multiple ? [].concat(T.modelValue) : [T.modelValue]), { data: B, get: Yr } = ve({ items: Jr }), V = wt(/* @__PURE__ */ new Map()), H = /* @__PURE__ */ new Map(), Xr = /* @__PURE__ */ new Map(), Zr = d(() => !!T.stash || Lr.value), Qr = d(() => {
|
|
436
445
|
let e = /* @__PURE__ */ new Map();
|
|
437
|
-
for (let t of
|
|
438
|
-
let n = s(
|
|
446
|
+
for (let t of wr.value) {
|
|
447
|
+
let n = s(kr(t, T.itemValue));
|
|
439
448
|
e.has(n) || e.set(n, t);
|
|
440
449
|
}
|
|
441
450
|
return e;
|
|
442
|
-
}),
|
|
451
|
+
}), $r = d(() => zr.value || Gr.value || lr.value), ei = (e) => V.value.get(e) ?? ($r.value ? L.value.get(e) : void 0) ?? Qr.value.get(e), ti = {
|
|
443
452
|
disabled: b(() => T.disabled),
|
|
444
453
|
itemText: T.itemText,
|
|
445
454
|
itemProps: b(() => T.itemProps),
|
|
@@ -447,331 +456,331 @@ var jt = {
|
|
|
447
456
|
optionDefaults: !0,
|
|
448
457
|
max: b(() => T.max),
|
|
449
458
|
selectable: b(() => T.selectable),
|
|
450
|
-
selectedIndexedByHash:
|
|
451
|
-
},
|
|
452
|
-
...
|
|
453
|
-
items:
|
|
454
|
-
}),
|
|
459
|
+
selectedIndexedByHash: B
|
|
460
|
+
}, ni = ue({
|
|
461
|
+
...ti,
|
|
462
|
+
items: mr
|
|
463
|
+
}), ri = d(() => {
|
|
455
464
|
let e = /* @__PURE__ */ new Map();
|
|
456
|
-
return
|
|
465
|
+
return ni.baseOptions.value.forEach((t, n) => {
|
|
457
466
|
e.has(t.valueHash) || e.set(t.valueHash, n);
|
|
458
467
|
}), e;
|
|
459
|
-
}),
|
|
468
|
+
}), U = d(() => {
|
|
460
469
|
let e = /* @__PURE__ */ new Map();
|
|
461
|
-
for (let t of
|
|
470
|
+
for (let t of ni.baseOptions.value) e.has(t.valueHash) || e.set(t.valueHash, t.item);
|
|
462
471
|
return e;
|
|
463
|
-
}),
|
|
472
|
+
}), ii = (e) => {
|
|
464
473
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
465
|
-
for (let r of
|
|
474
|
+
for (let r of Jr.value) {
|
|
466
475
|
let i = s(r);
|
|
467
476
|
if (n.has(i)) continue;
|
|
468
477
|
n.add(i);
|
|
469
|
-
let a =
|
|
478
|
+
let a = ei(i);
|
|
470
479
|
a === void 0 || e().has(i) || t.push(a);
|
|
471
480
|
}
|
|
472
481
|
return t;
|
|
473
|
-
},
|
|
474
|
-
let t =
|
|
475
|
-
return t.length ? e && e.length === t.length && e.every((e, n) => e === t[n]) ? e : t :
|
|
476
|
-
}),
|
|
477
|
-
let t =
|
|
478
|
-
if (e && typeof T.items == "function") for (let e of
|
|
482
|
+
}, ai = /* @__PURE__ */ new Map(), oi = [], si = v(!1), ci = (e, t) => t.length ? e && e.length === t.length && e.every((e, n) => e === t[n]) ? e : t : oi, li = d((e) => ci(e, ii(() => ai))), ui = d((e) => {
|
|
483
|
+
let t = ii(() => U.value);
|
|
484
|
+
return t.length ? e && e.length === t.length && e.every((e, n) => e === t[n]) ? e : t : oi;
|
|
485
|
+
}), W = wt([]), di = [], fi = ({ keepSticky: e = !0 } = {}) => {
|
|
486
|
+
let t = Z.value ? ii(() => ai) : ui.value, n = [], r = /* @__PURE__ */ new Set(), i = B.value;
|
|
487
|
+
if (e && typeof T.items == "function") for (let e of di) {
|
|
479
488
|
if (i[e] === void 0) continue;
|
|
480
|
-
let t =
|
|
489
|
+
let t = U.value.get(e) ?? ei(e);
|
|
481
490
|
t !== void 0 && (n.push({
|
|
482
491
|
valueHash: e,
|
|
483
492
|
row: t
|
|
484
493
|
}), r.add(e));
|
|
485
494
|
}
|
|
486
495
|
for (let e of t) {
|
|
487
|
-
let t =
|
|
496
|
+
let t = Fr(e);
|
|
488
497
|
r.has(t) || (r.add(t), n.push({
|
|
489
498
|
valueHash: t,
|
|
490
499
|
row: e
|
|
491
500
|
}));
|
|
492
501
|
}
|
|
493
|
-
|
|
494
|
-
},
|
|
495
|
-
let e =
|
|
496
|
-
if (
|
|
497
|
-
let t = new Set(
|
|
498
|
-
|
|
499
|
-
},
|
|
500
|
-
let t =
|
|
501
|
-
t.length !==
|
|
502
|
-
},
|
|
503
|
-
let t = [...
|
|
504
|
-
for (let { valueHash: e, row: n } of
|
|
505
|
-
return
|
|
506
|
-
}),
|
|
507
|
-
...
|
|
508
|
-
itemValue: (e) =>
|
|
509
|
-
itemText: (e) =>
|
|
502
|
+
W.value = n, Z.value ? pi = !0 : di = typeof T.items == "function" ? n.map(({ valueHash: e }) => e) : [];
|
|
503
|
+
}, pi = !1, mi = () => {
|
|
504
|
+
let e = vr();
|
|
505
|
+
if (F.value !== null || e?.[0] || e?.[1] === "search") return;
|
|
506
|
+
let t = new Set(di);
|
|
507
|
+
W.value = W.value.filter(({ valueHash: e }) => L.value.has(e) || t.has(e) || K.has(e) || !U.value.has(e)), typeof T.items == "function" && (di = W.value.map(({ valueHash: e }) => e));
|
|
508
|
+
}, hi = (e) => {
|
|
509
|
+
let t = W.value.filter(({ valueHash: t }) => e.has(t) || U.value.has(t));
|
|
510
|
+
t.length !== W.value.length && (W.value = t);
|
|
511
|
+
}, gi = d((e) => {
|
|
512
|
+
let t = [...li.value];
|
|
513
|
+
for (let { valueHash: e, row: n } of W.value) ri.value.has(e) || t.push(ei(e) ?? n);
|
|
514
|
+
return ci(e, t);
|
|
515
|
+
}), _i = ue({
|
|
516
|
+
...ti,
|
|
517
|
+
itemValue: (e) => I(e) ? e.value : kr(e, T.itemValue),
|
|
518
|
+
itemText: (e) => I(e) ? e.label : Ar(e, T.itemText),
|
|
510
519
|
itemProps: d(() => {
|
|
511
520
|
if (!T.itemProps) return T.itemProps;
|
|
512
521
|
let { all: e } = ne(T.itemProps);
|
|
513
|
-
return (t) =>
|
|
522
|
+
return (t) => I(t) ? {} : e(t);
|
|
514
523
|
}),
|
|
515
524
|
selectable: d(() => {
|
|
516
525
|
let e = T.selectable;
|
|
517
|
-
return typeof e == "function" ? (t) =>
|
|
526
|
+
return typeof e == "function" ? (t) => I(t) || e(t) : e;
|
|
518
527
|
}),
|
|
519
|
-
items:
|
|
520
|
-
}),
|
|
521
|
-
let e =
|
|
522
|
-
if (!t.length && !(n &&
|
|
523
|
-
let r =
|
|
528
|
+
items: gi
|
|
529
|
+
}), vi = d(() => new Set(li.value.map(Fr))), G = d(() => {
|
|
530
|
+
let e = ni.options.value, t = _i.options.value, n = si.value && !P.value;
|
|
531
|
+
if (!t.length && !(n && W.value.length)) return e;
|
|
532
|
+
let r = ri.value;
|
|
524
533
|
if (!n) {
|
|
525
|
-
let n = t.filter((e) => !r.has(e.valueHash) &&
|
|
534
|
+
let n = t.filter((e) => !r.has(e.valueHash) && vi.value.has(e.valueHash));
|
|
526
535
|
return n.length ? [...e, ...n] : e;
|
|
527
536
|
}
|
|
528
|
-
let i = new Map(t.map((e) => [e.valueHash, e])), a = [], o = /* @__PURE__ */ new Set(), s = !
|
|
529
|
-
for (let { valueHash: t } of
|
|
537
|
+
let i = new Map(t.map((e) => [e.valueHash, e])), a = [], o = /* @__PURE__ */ new Set(), s = !Z.value;
|
|
538
|
+
for (let { valueHash: t } of W.value) {
|
|
530
539
|
let n = r.get(t);
|
|
531
540
|
if (n !== void 0 && s) continue;
|
|
532
541
|
let c = n === void 0 ? i.get(t) : e[n];
|
|
533
542
|
c && !o.has(t) && (a.push(c), o.add(t));
|
|
534
543
|
}
|
|
535
|
-
for (let e of t) r.has(e.valueHash) || o.has(e.valueHash) ||
|
|
544
|
+
for (let e of t) r.has(e.valueHash) || o.has(e.valueHash) || vi.value.has(e.valueHash) && (a.push(e), o.add(e.valueHash));
|
|
536
545
|
return a.length ? [...a, ...e.filter((e) => !o.has(e.valueHash))] : e;
|
|
537
|
-
}),
|
|
538
|
-
if (!
|
|
539
|
-
let e =
|
|
540
|
-
|
|
541
|
-
},
|
|
542
|
-
if (!
|
|
543
|
-
let t = new Set(
|
|
546
|
+
}), K = /* @__PURE__ */ new Set(), yi = () => {
|
|
547
|
+
if (!di.length) return;
|
|
548
|
+
let e = B.value;
|
|
549
|
+
di = di.filter((t) => e[t] !== void 0);
|
|
550
|
+
}, bi = () => !P.value, xi = (e) => {
|
|
551
|
+
if (!Y.value || !bi()) return;
|
|
552
|
+
let t = new Set(J.value.map((e) => e.valueHash));
|
|
544
553
|
for (let n of e) {
|
|
545
554
|
let e = s(n);
|
|
546
|
-
t.has(e) && (
|
|
555
|
+
t.has(e) && (K.add(e), Si(e));
|
|
547
556
|
}
|
|
548
|
-
},
|
|
549
|
-
let t = new Set(
|
|
550
|
-
if (t.has(e) ||
|
|
557
|
+
}, Si = (e) => {
|
|
558
|
+
let t = new Set(W.value.map((e) => e.valueHash));
|
|
559
|
+
if (t.has(e) || U.value.has(e)) return;
|
|
551
560
|
let n = [];
|
|
552
|
-
for (let r of
|
|
553
|
-
let i =
|
|
561
|
+
for (let r of ui.value) {
|
|
562
|
+
let i = Fr(r);
|
|
554
563
|
if (!t.has(i) && (n.push({
|
|
555
564
|
valueHash: i,
|
|
556
565
|
row: r
|
|
557
566
|
}), i === e)) {
|
|
558
|
-
|
|
567
|
+
W.value = [...W.value, ...n];
|
|
559
568
|
return;
|
|
560
569
|
}
|
|
561
570
|
}
|
|
562
571
|
};
|
|
563
|
-
|
|
564
|
-
let
|
|
572
|
+
jr && (jr.userUnpick = xi, jr.isKnown = I);
|
|
573
|
+
let Ci = (e) => ({
|
|
565
574
|
...e,
|
|
566
|
-
loading:
|
|
567
|
-
known:
|
|
575
|
+
loading: q.value,
|
|
576
|
+
known: I(e.item)
|
|
568
577
|
});
|
|
569
|
-
S(
|
|
570
|
-
if (
|
|
571
|
-
let t =
|
|
572
|
-
t.length !==
|
|
578
|
+
S(B, (e) => {
|
|
579
|
+
if (Y.value || yi(), W.value.length) {
|
|
580
|
+
let t = W.value.filter(({ valueHash: t }) => e[t] !== void 0 || K.has(t));
|
|
581
|
+
t.length !== W.value.length && (W.value = t);
|
|
573
582
|
}
|
|
574
|
-
for (let t of [...
|
|
575
|
-
if (
|
|
583
|
+
for (let t of [...H.keys()]) e[t] === void 0 && !L.value.has(t) && H.delete(t);
|
|
584
|
+
if (V.value.size) {
|
|
576
585
|
let t = null;
|
|
577
|
-
for (let n of
|
|
578
|
-
t && (
|
|
586
|
+
for (let n of V.value.keys()) e[n] !== void 0 || L.value.has(n) || (t ??= new Map(V.value), t.delete(n));
|
|
587
|
+
t && (V.value = t);
|
|
579
588
|
}
|
|
580
|
-
T.stash &&
|
|
589
|
+
T.stash && wr.value.length && Er((t) => e[s(kr(t, T.itemValue))] !== void 0);
|
|
581
590
|
});
|
|
582
|
-
let { data:
|
|
583
|
-
items:
|
|
591
|
+
let { data: wi } = ve({
|
|
592
|
+
items: G,
|
|
584
593
|
key: "valueHash"
|
|
585
594
|
});
|
|
586
|
-
S(() =>
|
|
595
|
+
S(() => Zr.value && (Lr.value || wr.value.length) ? wi.value : null, (e) => {
|
|
587
596
|
if (!e) return;
|
|
588
|
-
let t =
|
|
597
|
+
let t = Lr.value ? [.../* @__PURE__ */ new Set([...Object.keys(B.value), ...L.value.keys()])] : [...Qr.value.keys()], n = null;
|
|
589
598
|
for (let r of t) {
|
|
590
599
|
let t = e[r]?.item;
|
|
591
600
|
if (t === void 0) continue;
|
|
592
|
-
let i =
|
|
593
|
-
if (t !==
|
|
594
|
-
let e =
|
|
595
|
-
if (e?.rows ===
|
|
596
|
-
|
|
601
|
+
let i = V.value.get(r);
|
|
602
|
+
if (t !== L.value.get(r) && t !== Qr.value.get(r) && t !== i) {
|
|
603
|
+
let e = Xr.get(r);
|
|
604
|
+
if (e?.rows === mr.value && e.row === t) continue;
|
|
605
|
+
Xr.delete(r), H.set(r, t);
|
|
597
606
|
continue;
|
|
598
607
|
}
|
|
599
|
-
let a =
|
|
600
|
-
a !== void 0 && a !== i && (n ??= new Map(
|
|
608
|
+
let a = H.get(r);
|
|
609
|
+
a !== void 0 && a !== i && (n ??= new Map(V.value), n.set(r, a));
|
|
601
610
|
}
|
|
602
|
-
n && (
|
|
611
|
+
n && (V.value = n);
|
|
603
612
|
});
|
|
604
|
-
let { coherent:
|
|
613
|
+
let { coherent: Ti } = de({
|
|
605
614
|
modelValue: b(() => T.modelValue),
|
|
606
615
|
multiple: !!T.multiple,
|
|
607
|
-
iteratee: (e) => !!
|
|
608
|
-
}),
|
|
616
|
+
iteratee: (e) => !!wi.value[s(e)]
|
|
617
|
+
}), Ei = d(() => new Set(mr.value.map((e) => s(kr(e, T.itemValue))))), { coherent: Di, coherentValue: Oi } = de({
|
|
609
618
|
modelValue: b(() => T.modelValue),
|
|
610
619
|
multiple: !!T.multiple,
|
|
611
620
|
iteratee: (e) => {
|
|
612
621
|
let t = s(e);
|
|
613
|
-
return
|
|
622
|
+
return Ei.value.has(t) || typeof T.items == "function" && R.value !== "revoked" && L.value.has(t);
|
|
614
623
|
}
|
|
615
|
-
}),
|
|
616
|
-
if (!T.enforceCoherence ||
|
|
624
|
+
}), ki, Ai = () => {
|
|
625
|
+
if (!T.enforceCoherence || Di.value) return !1;
|
|
617
626
|
let e = s(T.modelValue);
|
|
618
|
-
if (e ===
|
|
619
|
-
|
|
620
|
-
|
|
627
|
+
if (e === ki) return !1;
|
|
628
|
+
ki = e, yt(() => {
|
|
629
|
+
ki === e && (ki = void 0);
|
|
621
630
|
});
|
|
622
|
-
let t =
|
|
623
|
-
return
|
|
624
|
-
},
|
|
631
|
+
let t = Oi.value;
|
|
632
|
+
return hi(new Set((T.multiple ? [].concat(t) : [t]).map((e) => s(e)))), E("update:modelValue", t), !0;
|
|
633
|
+
}, ji = d(() => Jr.value.map((e) => wi.value[s(e)]).filter(Boolean)), Mi = d(() => F.value === null ? ji.value : Jr.value.map((e) => {
|
|
625
634
|
let t = s(e);
|
|
626
|
-
return
|
|
635
|
+
return wi.value[t] ?? {
|
|
627
636
|
value: e,
|
|
628
637
|
valueHash: t,
|
|
629
638
|
text: c(e),
|
|
630
639
|
unresolved: !0
|
|
631
640
|
};
|
|
632
|
-
})),
|
|
641
|
+
})), Ni = (e) => ({
|
|
633
642
|
item: e.item,
|
|
634
643
|
text: e.text,
|
|
635
644
|
value: e.value,
|
|
636
645
|
selected: e.selected ?? !0,
|
|
637
646
|
disabled: e.disabled ?? !1
|
|
638
|
-
}),
|
|
639
|
-
function
|
|
640
|
-
return !T.enforceCoherence ||
|
|
647
|
+
}), Pi = d(() => ji.value.map(Ni)), q = d(() => !!(hr.value || T.loading)), Fi = d(() => q.value && !Z.value && !Ii.value && G.value.length > 0), Ii = d(() => q.value && J.value.length > 0 && (Z.value || Lr.value && !mr.value.length)), Li = d(() => !!T.hasErrors), Ri = d(() => !!T.hasWarnings && !Li.value), zi = d(() => Mi.value.map((e) => e.text).filter(Boolean).join(", ") || ""), Bi = wt(/* @__PURE__ */ new Set());
|
|
648
|
+
function Vi() {
|
|
649
|
+
return !T.enforceCoherence || R.value === "none" || !Lr.value || typeof T.items != "function" ? !1 : Jr.value.some((e) => {
|
|
641
650
|
let t = s(e);
|
|
642
|
-
return
|
|
651
|
+
return L.value.has(t) && !Bi.value.has(t);
|
|
643
652
|
});
|
|
644
653
|
}
|
|
645
|
-
let
|
|
646
|
-
if (n === "applied" && e ===
|
|
647
|
-
if (typeof T.items == "function" && (
|
|
648
|
-
let e = new Set(
|
|
649
|
-
for (let t of
|
|
650
|
-
|
|
654
|
+
let Hi = (e, t, n) => {
|
|
655
|
+
if (n === "applied" && e === Br) {
|
|
656
|
+
if (typeof T.items == "function" && (Rr.value || R.value !== "none")) {
|
|
657
|
+
let e = new Set(Bi.value);
|
|
658
|
+
for (let t of U.value.keys()) e.add(t);
|
|
659
|
+
Bi.value = e;
|
|
651
660
|
}
|
|
652
|
-
t !== "search" &&
|
|
661
|
+
t !== "search" && R.value === "pending" && (R.value = "revoked", hi(new Set(Object.keys(B.value))));
|
|
653
662
|
}
|
|
654
663
|
};
|
|
655
|
-
async function
|
|
656
|
-
let r =
|
|
657
|
-
return
|
|
664
|
+
async function Ui(e, t, n) {
|
|
665
|
+
let r = Br, i = await ur(e, t, n);
|
|
666
|
+
return Hi(r, t, i), i;
|
|
658
667
|
}
|
|
659
|
-
let
|
|
660
|
-
let e =
|
|
668
|
+
let Wi = () => {
|
|
669
|
+
let e = xr();
|
|
661
670
|
if (!e) return;
|
|
662
671
|
let [t, n] = e;
|
|
663
|
-
|
|
664
|
-
e === "applied" && n !== "search" &&
|
|
672
|
+
Ui(t ?? "", n, T.modelValue).then((e) => {
|
|
673
|
+
e === "applied" && n !== "search" && Ai();
|
|
665
674
|
});
|
|
666
|
-
},
|
|
667
|
-
function
|
|
668
|
-
|
|
675
|
+
}, Gi = () => A.value ? Xt.value : Zt.value;
|
|
676
|
+
function Ki() {
|
|
677
|
+
qi = !1, Ea = !1, pi && (pi = !1, mi()), Z.value = !1;
|
|
669
678
|
}
|
|
670
|
-
let
|
|
671
|
-
if (!
|
|
672
|
-
if (
|
|
673
|
-
|
|
679
|
+
let qi = !1, Ji = !1, Yi = () => {
|
|
680
|
+
if (!Or.value || Ti.value) return;
|
|
681
|
+
if (br()) {
|
|
682
|
+
_r()?.[1] === "search" && (Ji = !0);
|
|
674
683
|
return;
|
|
675
684
|
}
|
|
676
|
-
let e =
|
|
677
|
-
e === "initial" &&
|
|
678
|
-
e === "applied" &&
|
|
685
|
+
let e = z.value ? "model" : "initial";
|
|
686
|
+
e === "initial" && qr(), Ui(P.value, e, T.modelValue).then((e) => {
|
|
687
|
+
e === "applied" && Ai();
|
|
679
688
|
});
|
|
680
|
-
},
|
|
681
|
-
S(
|
|
682
|
-
|
|
689
|
+
}, Xi = At(Yi, T.depsDebounceTime);
|
|
690
|
+
S(yr, () => {
|
|
691
|
+
Ji && (Ji = !1, Yi());
|
|
683
692
|
});
|
|
684
|
-
let
|
|
685
|
-
if (typeof T.items != "function" || (
|
|
693
|
+
let Zi = () => {
|
|
694
|
+
if (typeof T.items != "function" || (Z.value = !0, fi(), Hr.value && !P.value)) return;
|
|
686
695
|
let e = P.value ? "search" : "initial";
|
|
687
|
-
|
|
688
|
-
t === "applied" && e !== "search" &&
|
|
696
|
+
Ui(P.value, e, T.modelValue).then((t) => {
|
|
697
|
+
t === "applied" && e !== "search" && Ai();
|
|
689
698
|
});
|
|
690
|
-
},
|
|
699
|
+
}, Qi = () => new Map([...L.value].map(([e, t]) => [e, s(t)])), $i = Qi(), ea = /* @__PURE__ */ new WeakMap(), ta = 0, na = (e) => typeof e == "function" ? e : Array.isArray(e) ? (ea.has(e) || ea.set(e, ++ta), `array:${ea.get(e)}`) : e, ra = d(() => s([T.dependencies, na(T.items)])), ia = d(() => s(T.modelValue)), aa, oa;
|
|
691
700
|
S([
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
701
|
+
ra,
|
|
702
|
+
Ir,
|
|
703
|
+
ia
|
|
695
704
|
], ([e, t, n], [r, i, a]) => {
|
|
696
705
|
let o = e !== r, s = t !== i, c = n !== a;
|
|
697
706
|
if (s) {
|
|
698
|
-
let e =
|
|
699
|
-
if (
|
|
707
|
+
let e = Qi();
|
|
708
|
+
if (V.value.size || H.size) {
|
|
700
709
|
let t = null;
|
|
701
710
|
for (let [n, r] of e) {
|
|
702
|
-
if (
|
|
703
|
-
|
|
704
|
-
let e =
|
|
705
|
-
e !== void 0 &&
|
|
706
|
-
rows:
|
|
711
|
+
if ($i.get(n) === r) continue;
|
|
712
|
+
H.delete(n);
|
|
713
|
+
let e = U.value.get(n);
|
|
714
|
+
e !== void 0 && Xr.set(n, {
|
|
715
|
+
rows: mr.value,
|
|
707
716
|
row: e
|
|
708
|
-
}),
|
|
717
|
+
}), V.value.has(n) && (t ??= new Map(V.value), t.delete(n));
|
|
709
718
|
}
|
|
710
|
-
t && (
|
|
719
|
+
t && (V.value = t);
|
|
711
720
|
}
|
|
712
|
-
if (
|
|
713
|
-
let t =
|
|
714
|
-
for (let r of
|
|
715
|
-
n && (
|
|
721
|
+
if (V.value.size || H.size) {
|
|
722
|
+
let t = B.value, n = null;
|
|
723
|
+
for (let r of $i.keys()) e.has(r) || t[r] !== void 0 || (H.delete(r), V.value.has(r) && (n ??= new Map(V.value), n.delete(r)));
|
|
724
|
+
n && (V.value = n);
|
|
716
725
|
}
|
|
717
|
-
|
|
726
|
+
$i = e;
|
|
718
727
|
}
|
|
719
|
-
if (o && Array.isArray(T.items) &&
|
|
720
|
-
if (
|
|
721
|
-
let t =
|
|
722
|
-
|
|
723
|
-
} else o ? (
|
|
728
|
+
if (o && Array.isArray(T.items) && Ki(), o && s && c && zr.value) {
|
|
729
|
+
if (R.value = "none", Bi.value = /* @__PURE__ */ new Set(), Br++, aa = e, typeof T.items != "function") return;
|
|
730
|
+
let t = z.value || br();
|
|
731
|
+
Sr(), Y.value ? Zi() : t && (qi = !0);
|
|
732
|
+
} else o ? (R.value = "pending", Bi.value = /* @__PURE__ */ new Set(), Br++, aa = void 0, c && (oa = n)) : (c && (oa = void 0), s && !c && !zr.value && Xi());
|
|
724
733
|
}, { flush: "pre" }), fe(() => T.modelValue, async () => {
|
|
725
|
-
if (!
|
|
726
|
-
let e =
|
|
727
|
-
if (Array.isArray(T.items) && T.enforceCoherence &&
|
|
734
|
+
if (!Gr.value) return;
|
|
735
|
+
let e = Vi() && ia.value !== oa;
|
|
736
|
+
if (Array.isArray(T.items) && T.enforceCoherence && Lr.value && Jr.value.some((e) => {
|
|
728
737
|
let t = s(e);
|
|
729
|
-
return
|
|
730
|
-
}) || !
|
|
731
|
-
let e =
|
|
732
|
-
if (e === "initial" &&
|
|
733
|
-
|
|
738
|
+
return L.value.has(t) && !U.value.has(t);
|
|
739
|
+
}) || !Ti.value || e) {
|
|
740
|
+
let e = z.value ? "model" : "initial";
|
|
741
|
+
if (e === "initial" && qr(), await Ui(P.value, e, T.modelValue) !== "applied") return;
|
|
742
|
+
Ai() && k.value?.blur();
|
|
734
743
|
}
|
|
735
744
|
}, { debounce: T.modelValueDebounceTime }), fe(() => [T.dependencies, T.items], async () => {
|
|
736
|
-
if (
|
|
737
|
-
let e =
|
|
738
|
-
if (!
|
|
739
|
-
let t =
|
|
740
|
-
|
|
745
|
+
if (ra.value === aa && typeof T.items == "function") return;
|
|
746
|
+
let e = Rr.value && T.enforceCoherence && Or.value;
|
|
747
|
+
if (!Gr.value && !e) return;
|
|
748
|
+
let t = z.value || Rr.value ? "dependencies" : "initial";
|
|
749
|
+
z.value || qr(), await Ui(P.value, t, T.modelValue) === "applied" && (hi(new Set(Object.keys(B.value))), Ai() && k.value?.blur());
|
|
741
750
|
}, { debounce: T.depsDebounceTime });
|
|
742
|
-
let
|
|
743
|
-
if (e.create) return
|
|
744
|
-
let t =
|
|
745
|
-
if (!T.multiple) for (let e of Object.keys(
|
|
746
|
-
|
|
747
|
-
},
|
|
748
|
-
let t =
|
|
751
|
+
let sa = async (e) => {
|
|
752
|
+
if (e.create) return er(e.create.query);
|
|
753
|
+
let t = On();
|
|
754
|
+
if (!T.multiple) for (let e of Object.keys(B.value)) K.add(e);
|
|
755
|
+
K.delete(e.valueHash), T.multiple ? (E("update:modelValue", [...T.modelValue, e.value]), T.stash && Tr(e.item)) : (T.stash && Dr(e.item), E("update:modelValue", e.value), await yt()), T.multiple && A.value && Y.value ? t && Tn() : M(), T.multiple || $();
|
|
756
|
+
}, ca = async (e) => {
|
|
757
|
+
let t = On();
|
|
749
758
|
if (!T.multiple) {
|
|
750
|
-
|
|
759
|
+
Sa?.() && Ga(), M(), $();
|
|
751
760
|
return;
|
|
752
761
|
}
|
|
753
|
-
|
|
754
|
-
let n = { ...
|
|
755
|
-
delete n[e.valueHash], E("update:modelValue", Object.values(n)), A.value &&
|
|
756
|
-
},
|
|
762
|
+
bi() && (K.add(e.valueHash), Si(e.valueHash));
|
|
763
|
+
let n = { ...B.value };
|
|
764
|
+
delete n[e.valueHash], E("update:modelValue", Object.values(n)), A.value && Y.value ? t && Tn() : M();
|
|
765
|
+
}, la = d(() => {
|
|
757
766
|
let e = re(T.itemProps, "description");
|
|
758
|
-
return e === void 0 ?
|
|
759
|
-
}),
|
|
760
|
-
if (
|
|
761
|
-
if (!
|
|
762
|
-
let e = new Set(
|
|
763
|
-
return
|
|
767
|
+
return e === void 0 ? G.value.some((e) => e.description !== void 0) : e;
|
|
768
|
+
}), J = d(() => {
|
|
769
|
+
if (Z.value) {
|
|
770
|
+
if (!W.value.length) return [];
|
|
771
|
+
let e = new Set(W.value.map(({ valueHash: e }) => e));
|
|
772
|
+
return G.value.filter((t) => e.has(t.valueHash));
|
|
764
773
|
}
|
|
765
|
-
if (!P.value || !T.multiple &&
|
|
774
|
+
if (!P.value || !T.multiple && ji.value.some((e) => e.text === P.value) || T.filterBy === !1) return G.value;
|
|
766
775
|
let e = T.filterBy;
|
|
767
|
-
return Array.isArray(e) && e.length ? se(
|
|
768
|
-
}),
|
|
769
|
-
if (ae(T.groupBy)) return
|
|
770
|
-
if (!
|
|
771
|
-
},
|
|
772
|
-
let e = P.value ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([...
|
|
773
|
-
return
|
|
774
|
-
let a = r.get(i.valueHash) ?? Infinity, o =
|
|
776
|
+
return Array.isArray(e) && e.length ? se(G.value, (t) => oe(t.item, e), P.value) : se(G.value, (e) => oe(e, e.description == null ? ["text"] : ["text", "description"]), P.value);
|
|
777
|
+
}), ua = Symbol("default"), da = (e) => {
|
|
778
|
+
if (ae(T.groupBy)) return ua;
|
|
779
|
+
if (!I(e.item)) return typeof T.groupBy == "function" ? T.groupBy(e.item) : o(e.item, T.groupBy);
|
|
780
|
+
}, fa = d(() => {
|
|
781
|
+
let e = P.value ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([...W.value.map(({ valueHash: e }) => e).filter((e) => Z.value || !ri.value.has(e)), ...si.value ? ui.value.map(Fr) : []]), t = [], n = {}, r = new Map(G.value.map((e, t) => [e.valueHash, t]));
|
|
782
|
+
return J.value.forEach((i) => {
|
|
783
|
+
let a = r.get(i.valueHash) ?? Infinity, o = da(i), c = s(o), l = n[c];
|
|
775
784
|
l || (l = n[c] = {
|
|
776
785
|
id: c,
|
|
777
786
|
data: o ?? null,
|
|
@@ -787,342 +796,365 @@ var jt = {
|
|
|
787
796
|
data: t,
|
|
788
797
|
options: [...r, ...n]
|
|
789
798
|
})).filter((e) => e.options.length);
|
|
790
|
-
}),
|
|
791
|
-
if (!A.value ||
|
|
799
|
+
}), pa = d(() => {
|
|
800
|
+
if (!A.value || or.value || q.value || F.value !== null || !ct(cn, "option:add")) return null;
|
|
792
801
|
let e = N.value.trim();
|
|
793
|
-
if (!e ||
|
|
802
|
+
if (!e || Yr(e)) return null;
|
|
794
803
|
let t = e.toLocaleLowerCase();
|
|
795
|
-
if (
|
|
796
|
-
let [n = "", r = ""] =
|
|
804
|
+
if (J.value.some((e) => e.text.trim().toLocaleLowerCase() === t)) return null;
|
|
805
|
+
let [n = "", r = ""] = fn("select.createOption", "\0").value.split("\0");
|
|
797
806
|
return {
|
|
798
807
|
text: `${n}${e}${r}`,
|
|
799
808
|
value: void 0,
|
|
800
809
|
item: void 0,
|
|
801
|
-
valueHash:
|
|
810
|
+
valueHash: Ht,
|
|
802
811
|
create: {
|
|
803
812
|
before: n,
|
|
804
813
|
query: e,
|
|
805
814
|
after: r
|
|
806
815
|
}
|
|
807
816
|
};
|
|
808
|
-
}),
|
|
809
|
-
id:
|
|
817
|
+
}), ma = d(() => pa.value ? [...J.value, pa.value] : J.value), ha = d(() => pa.value ? [...fa.value, {
|
|
818
|
+
id: Ht,
|
|
810
819
|
data: null,
|
|
811
|
-
options: [
|
|
812
|
-
}] :
|
|
813
|
-
S(
|
|
814
|
-
let
|
|
820
|
+
options: [pa.value]
|
|
821
|
+
}] : fa.value), Y = v(!1);
|
|
822
|
+
S(Y, (e) => si.value = e, { flush: "sync" });
|
|
823
|
+
let ga = ze(Y), _a = Be(Y, () => T.transitionDuration), va = Pe("BbSelectPopover", T, {
|
|
815
824
|
adaptive: !0,
|
|
816
825
|
compact: !1
|
|
817
|
-
}),
|
|
826
|
+
}), ya = () => va.adaptive && an.value ? "canvas" : "popover", ba = v(ya()), X = d(() => ba.value === "canvas");
|
|
818
827
|
S([
|
|
819
|
-
() =>
|
|
820
|
-
|
|
821
|
-
|
|
828
|
+
() => va.adaptive,
|
|
829
|
+
an,
|
|
830
|
+
Y
|
|
822
831
|
], () => {
|
|
823
|
-
|
|
824
|
-
}), je(
|
|
825
|
-
let
|
|
832
|
+
Y.value || (ba.value = ya());
|
|
833
|
+
}), je(X);
|
|
834
|
+
let xa = Se();
|
|
826
835
|
xe(null);
|
|
827
|
-
let
|
|
836
|
+
let Sa = we();
|
|
828
837
|
Ce(null), me({
|
|
829
|
-
active: () =>
|
|
830
|
-
input: () =>
|
|
838
|
+
active: () => Y.value && X.value,
|
|
839
|
+
input: () => Xt.value
|
|
831
840
|
});
|
|
832
|
-
let
|
|
841
|
+
let Ca = {
|
|
833
842
|
onShow: () => E("show"),
|
|
834
843
|
onShown: () => E("shown"),
|
|
835
844
|
onHide: () => E("hide"),
|
|
836
845
|
onHidden: () => E("hidden")
|
|
837
|
-
},
|
|
838
|
-
...
|
|
846
|
+
}, wa = {
|
|
847
|
+
...Ca,
|
|
839
848
|
onHidden: () => {
|
|
840
|
-
|
|
849
|
+
Na(), E("hidden");
|
|
841
850
|
}
|
|
842
|
-
},
|
|
851
|
+
}, Ta = d(() => ({
|
|
843
852
|
side: "bottom",
|
|
844
853
|
size: "auto",
|
|
845
854
|
draggable: !0,
|
|
846
855
|
focusTarget: ".bb-select-popover--sheet",
|
|
847
856
|
hideClose: !0,
|
|
848
857
|
transitionDuration: T.transitionDuration,
|
|
849
|
-
...T.offCanvasProps?.title ? {} : { "aria-label":
|
|
850
|
-
...
|
|
851
|
-
})),
|
|
852
|
-
S(
|
|
853
|
-
|
|
854
|
-
let e =
|
|
855
|
-
|
|
858
|
+
...T.offCanvasProps?.title ? {} : { "aria-label": Xa.value },
|
|
859
|
+
...it(T.offCanvasProps)
|
|
860
|
+
})), Ea = !1, Z = v(!1);
|
|
861
|
+
S(yr, () => {
|
|
862
|
+
Z.value = !1, pi && (pi = !1, mi());
|
|
863
|
+
let e = vr();
|
|
864
|
+
Da && Y.value && !P.value && e?.[0] === "" && F.value === null && (Da = !1, fi({ keepSticky: !1 }));
|
|
856
865
|
});
|
|
857
|
-
let
|
|
866
|
+
let Da = !1;
|
|
858
867
|
S(P, (e, t) => {
|
|
859
|
-
|
|
868
|
+
Y.value && t && !e && (Da = !0);
|
|
860
869
|
}), S(P, () => {
|
|
861
|
-
|
|
870
|
+
Oa = !1, Y.value && k.value?.scrollToTop();
|
|
862
871
|
}, { flush: "post" });
|
|
863
|
-
let
|
|
864
|
-
|
|
872
|
+
let Oa = !1, Q = () => {
|
|
873
|
+
Oa = !1;
|
|
865
874
|
};
|
|
866
|
-
S(
|
|
867
|
-
|
|
875
|
+
S(yr, async () => {
|
|
876
|
+
Oa && Y.value && !P.value && vr()?.[0] === "" && (Oa = !1, await yt(), Y.value && k.value?.scrollToSelected());
|
|
868
877
|
}, { flush: "post" });
|
|
869
|
-
let
|
|
870
|
-
if (
|
|
878
|
+
let ka = () => {
|
|
879
|
+
if (Cr(), typeof T.items != "function") return;
|
|
871
880
|
let e = (e) => !!e?.[0];
|
|
872
|
-
(e(
|
|
873
|
-
},
|
|
874
|
-
if (!
|
|
875
|
-
let
|
|
876
|
-
|
|
877
|
-
e === "applied" &&
|
|
881
|
+
(e(vr()) || br() && e(_r())) && (Ea = !0, Sr());
|
|
882
|
+
}, Aa = (e = !1) => {
|
|
883
|
+
if (!Ea && !qi) return;
|
|
884
|
+
let t = qi ? "initial" : "reopen";
|
|
885
|
+
Ea = !1, qi = !1, qr(), Z.value = !0, Hr.value || e || Ui("", t, T.modelValue).then((e) => {
|
|
886
|
+
e === "applied" && Ai();
|
|
878
887
|
});
|
|
879
|
-
},
|
|
880
|
-
if (T.disabled || T.readonly
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
888
|
+
}, ja = async ({ focusPopoverContent: e = !0 } = {}) => {
|
|
889
|
+
if (T.disabled || T.readonly) return Ra();
|
|
890
|
+
if (Y.value) return;
|
|
891
|
+
ba.value = ya(), un.value = ln(), lr.value = !0, La(), N.value && !A.value && Ra();
|
|
892
|
+
let t = !!P.value;
|
|
893
|
+
Aa(t), fi(), Oa = typeof T.items == "function" && !Hr.value && (Z.value || br() || !z.value), Y.value = !0;
|
|
894
|
+
let n = !t && !z.value && !Wr.value && !Hr.value ? Kr() : void 0;
|
|
895
|
+
t && Pn(!0), await Ma(e), await n;
|
|
896
|
+
}, Ma = async (e) => {
|
|
897
|
+
await yt(), Y.value && (X.value || (vn = !0, yn(), ge(ir, { element: () => {
|
|
886
898
|
let e = k.value?.$el;
|
|
887
899
|
return e instanceof Element ? e.closest(".bb-common-popover") : null;
|
|
888
|
-
} }), document.addEventListener("click",
|
|
900
|
+
} }), document.addEventListener("click", In, { capture: !0 }), document.addEventListener("focusin", In, { capture: !0 }), document.addEventListener("keydown", ar, { capture: !0 }), e && (await Ve(0), Y.value && (A.value ? Tn() : En()))));
|
|
889
901
|
}, $ = async () => {
|
|
890
|
-
|
|
891
|
-
},
|
|
892
|
-
k.value?.blur(),
|
|
893
|
-
},
|
|
902
|
+
Y.value && (Y.value = !1, k.value?.blur(), $t.value = void 0, N.value = "", Oa = !1, ka(), W.value = [], K.clear(), Da = !1, pi = !1, yi(), X.value || (Qt.value?.$el.contains(document.activeElement) && O.value?.focus({ preventScroll: !0 }), bn(), _e(ir), document.removeEventListener("click", In, { capture: !0 }), document.removeEventListener("focusin", In, { capture: !0 }), document.removeEventListener("keydown", ar, { capture: !0 })));
|
|
903
|
+
}, Na = () => {
|
|
904
|
+
k.value?.blur(), $t.value = void 0, Oa = !1, ka(), W.value = [], K.clear(), Da = !1, pi = !1, yi(), Va(), M();
|
|
905
|
+
}, Pa = () => Y.value ? $() : ja();
|
|
894
906
|
He(T, E, {
|
|
895
|
-
isOpen: () =>
|
|
896
|
-
open:
|
|
907
|
+
isOpen: () => Y.value,
|
|
908
|
+
open: ja,
|
|
897
909
|
close: $
|
|
898
910
|
});
|
|
899
|
-
let
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
911
|
+
let { model: Fa, set: Ia } = Ue(T, "query", E, () => "");
|
|
912
|
+
S(N, (e) => {
|
|
913
|
+
e !== Fa.value && Ia(e);
|
|
914
|
+
}, { flush: "sync" });
|
|
915
|
+
let La = () => {
|
|
916
|
+
Fa.value !== N.value && (N.value = Fa.value);
|
|
917
|
+
}, Ra = () => {
|
|
918
|
+
N.value ? N.value = "" : Fa.value && Ia("");
|
|
919
|
+
};
|
|
920
|
+
S(Fa, (e) => {
|
|
921
|
+
if (e !== N.value) {
|
|
922
|
+
if (T.disabled || T.readonly) return Ra();
|
|
923
|
+
if (N.value = e, Y.value) {
|
|
924
|
+
if (!A.value) return Ra();
|
|
925
|
+
Pn(!0);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
}), S(Y, (e) => {
|
|
929
|
+
!e && N.value && (N.value = "");
|
|
930
|
+
}, { flush: "sync" });
|
|
931
|
+
let za = v(!1), Ba = () => {
|
|
932
|
+
za.value || (za.value = !0, E("active"));
|
|
933
|
+
}, Va = () => {
|
|
934
|
+
za.value && (za.value = !1, E("inactive"));
|
|
935
|
+
}, Ha = (e) => {
|
|
904
936
|
if (!(e instanceof Node)) return !1;
|
|
905
937
|
let t = !!O.value?.contains(e), n = k.value?.$el, r = n instanceof Element && !!n.closest(".bb-common-popover")?.contains(e);
|
|
906
938
|
return t || r;
|
|
907
|
-
},
|
|
908
|
-
clearTimeout(
|
|
909
|
-
|
|
939
|
+
}, Ua, Wa = () => {
|
|
940
|
+
clearTimeout(Ua), Ua = setTimeout(() => {
|
|
941
|
+
Y.value || Ha(document.activeElement) ? Ba() : Va();
|
|
910
942
|
}, 0);
|
|
911
|
-
},
|
|
912
|
-
|
|
913
|
-
},
|
|
914
|
-
N.value = "",
|
|
915
|
-
},
|
|
943
|
+
}, Ga = () => {
|
|
944
|
+
xi(Jr.value), E("update:modelValue", T.multiple ? [] : null);
|
|
945
|
+
}, Ka = () => {
|
|
946
|
+
N.value = "", Ga();
|
|
947
|
+
}, qa = d(() => !q.value && (T.groupBy ? fa.value.every((e) => !e.options.length) : !J.value.length)), Ja = d(() => ({
|
|
916
948
|
close: $,
|
|
917
|
-
clear:
|
|
918
|
-
empty:
|
|
919
|
-
focus:
|
|
949
|
+
clear: Ga,
|
|
950
|
+
empty: qa.value,
|
|
951
|
+
focus: Dn,
|
|
920
952
|
query: N.value,
|
|
921
|
-
selectedOptions:
|
|
953
|
+
selectedOptions: Pi.value,
|
|
922
954
|
titleId: `${j}_title`
|
|
923
|
-
})),
|
|
924
|
-
S(
|
|
925
|
-
e && (
|
|
955
|
+
})), Ya = null, Xa = v();
|
|
956
|
+
S(Y, (e) => {
|
|
957
|
+
e && (Xa.value = a(O.value));
|
|
926
958
|
}, {
|
|
927
959
|
immediate: !0,
|
|
928
960
|
flush: "sync"
|
|
929
961
|
});
|
|
930
|
-
let
|
|
962
|
+
let Za = d(() => {
|
|
931
963
|
let e = O.value;
|
|
932
964
|
return e ? e.hasAttribute("aria-label") || e.hasAttribute("aria-labelledby") : !1;
|
|
933
|
-
}),
|
|
965
|
+
}), Qa = d(() => fn("select.triggerLabel").value), $a = v(), eo = v();
|
|
934
966
|
return S(O, (e) => {
|
|
935
|
-
if (
|
|
967
|
+
if (Ya &&= (Ya(), null), !e) return;
|
|
936
968
|
e.setAttribute("role", "combobox"), e.setAttribute("aria-haspopup", "listbox");
|
|
937
969
|
let t = !e.id;
|
|
938
970
|
t && (e.id = `${j}_activator`);
|
|
939
|
-
let n =
|
|
940
|
-
E("click", e), T.disabled || (e.preventDefault(), T.readonly ? M() :
|
|
971
|
+
let n = Za.value, r = async (e) => {
|
|
972
|
+
E("click", e), T.disabled || (e.preventDefault(), T.readonly ? M() : Y.value ? (await $(), M()) : await ja());
|
|
941
973
|
}, i = (e) => {
|
|
942
|
-
T.readonly && !T.disabled && (e.preventDefault(),
|
|
974
|
+
T.readonly && !T.disabled && (e.preventDefault(), Ba(), M());
|
|
943
975
|
}, a = (e) => {
|
|
944
976
|
switch (e.key) {
|
|
945
977
|
case "ArrowDown":
|
|
946
|
-
e.preventDefault(),
|
|
978
|
+
e.preventDefault(), Kn();
|
|
947
979
|
break;
|
|
948
980
|
case "ArrowUp":
|
|
949
|
-
e.preventDefault(),
|
|
981
|
+
e.preventDefault(), Gn();
|
|
950
982
|
break;
|
|
951
983
|
case "Home":
|
|
952
|
-
e.preventDefault(),
|
|
984
|
+
e.preventDefault(), Jn();
|
|
953
985
|
break;
|
|
954
986
|
case "End":
|
|
955
|
-
e.preventDefault(),
|
|
987
|
+
e.preventDefault(), Yn();
|
|
956
988
|
break;
|
|
957
989
|
default:
|
|
958
|
-
|
|
990
|
+
Qn(e);
|
|
959
991
|
break;
|
|
960
992
|
case "Enter":
|
|
961
|
-
e.preventDefault(),
|
|
993
|
+
e.preventDefault(), $n();
|
|
962
994
|
break;
|
|
963
|
-
case "Escape":
|
|
995
|
+
case "Escape": Y.value && (e.preventDefault(), tr());
|
|
964
996
|
}
|
|
965
997
|
}, o = (e) => {
|
|
966
|
-
E("focus", e),
|
|
998
|
+
E("focus", e), Ba();
|
|
967
999
|
}, s = (e) => {
|
|
968
|
-
E("blur", e),
|
|
1000
|
+
E("blur", e), Wa();
|
|
969
1001
|
};
|
|
970
|
-
e.addEventListener("click", r), e.addEventListener("pointerdown", i), e.addEventListener("keydown", a), e.addEventListener("focus", o), e.addEventListener("blur", s),
|
|
1002
|
+
e.addEventListener("click", r), e.addEventListener("pointerdown", i), e.addEventListener("keydown", a), e.addEventListener("focus", o), e.addEventListener("blur", s), Ya = () => {
|
|
971
1003
|
e.removeEventListener("click", r), e.removeEventListener("pointerdown", i), e.removeEventListener("keydown", a), e.removeEventListener("focus", o), e.removeEventListener("blur", s), e.removeAttribute("role"), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls"), e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedby"), e.removeAttribute("aria-activedescendant"), n || e.removeAttribute("aria-label"), t && e.removeAttribute("id");
|
|
972
1004
|
};
|
|
973
1005
|
}, { immediate: !0 }), S([
|
|
974
1006
|
O,
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1007
|
+
Y,
|
|
1008
|
+
ga,
|
|
1009
|
+
gn,
|
|
1010
|
+
_n,
|
|
1011
|
+
$t,
|
|
1012
|
+
Za,
|
|
1013
|
+
Qa
|
|
982
1014
|
], ([e, t, n, r, i, a, o, s]) => {
|
|
983
|
-
e && (e.setAttribute("aria-expanded", String(t)), o || e.setAttribute("aria-label", s),
|
|
984
|
-
}, { immediate: !0 }),
|
|
985
|
-
clearTimeout(
|
|
986
|
-
}),
|
|
1015
|
+
e && (e.setAttribute("aria-expanded", String(t)), o || e.setAttribute("aria-label", s), $a.value = e.getAttribute("aria-labelledby") ?? void 0, eo.value = e.getAttribute("aria-label") ?? void 0, r == null ? e.removeAttribute("aria-invalid") : e.setAttribute("aria-invalid", r), n ? e.setAttribute("aria-controls", `${j}_listbox`) : e.removeAttribute("aria-controls"), i == null ? e.removeAttribute("aria-describedby") : e.setAttribute("aria-describedby", i), t && a ? e.setAttribute("aria-activedescendant", a) : e.removeAttribute("aria-activedescendant"));
|
|
1016
|
+
}, { immediate: !0 }), xt(() => {
|
|
1017
|
+
clearTimeout(Ua), Ya?.(), Rn.abort(), _e(ir), document.removeEventListener("click", In, { capture: !0 }), document.removeEventListener("focusin", In, { capture: !0 }), document.removeEventListener("keydown", ar, { capture: !0 });
|
|
1018
|
+
}), St(() => {
|
|
987
1019
|
$();
|
|
988
|
-
}), (e, n) => (_(), f(
|
|
989
|
-
p(x(be), { value: x(
|
|
990
|
-
|
|
991
|
-
props: { ref:
|
|
992
|
-
shown:
|
|
1020
|
+
}), (e, n) => (_(), f(dt, null, [
|
|
1021
|
+
p(x(be), { value: x(gr) }, null, 8, ["value"]),
|
|
1022
|
+
nn.value ? pt("", !0) : y(e.$slots, "activator", g(m({
|
|
1023
|
+
props: { ref: rn },
|
|
1024
|
+
shown: Y.value,
|
|
993
1025
|
disabled: u.disabled,
|
|
994
1026
|
readonly: u.readonly,
|
|
995
|
-
loading:
|
|
1027
|
+
loading: q.value,
|
|
996
1028
|
query: N.value,
|
|
997
|
-
selectedOptions:
|
|
998
|
-
text:
|
|
999
|
-
clear:
|
|
1000
|
-
focus:
|
|
1001
|
-
open:
|
|
1029
|
+
selectedOptions: Pi.value,
|
|
1030
|
+
text: zi.value,
|
|
1031
|
+
clear: Ga,
|
|
1032
|
+
focus: Dn,
|
|
1033
|
+
open: ja,
|
|
1002
1034
|
close: $,
|
|
1003
|
-
toggle:
|
|
1035
|
+
toggle: Pa
|
|
1004
1036
|
})), void 0, void 0, 0),
|
|
1005
|
-
p(x(
|
|
1006
|
-
default: C(() => [A.value ? (_(), f("div",
|
|
1007
|
-
|
|
1037
|
+
p(x(Kt), null, {
|
|
1038
|
+
default: C(() => [A.value ? (_(), f("div", Nt, [
|
|
1039
|
+
Dt(mt("input", h({
|
|
1008
1040
|
id: `${x(j)}_search`,
|
|
1009
1041
|
ref_key: "searchInput",
|
|
1010
|
-
ref:
|
|
1042
|
+
ref: Xt,
|
|
1011
1043
|
"onUpdate:modelValue": n[0] ||= (e) => N.value = e,
|
|
1012
|
-
"aria-activedescendant":
|
|
1013
|
-
"aria-controls": x(
|
|
1014
|
-
"aria-describedby":
|
|
1015
|
-
"aria-invalid":
|
|
1016
|
-
"aria-label":
|
|
1044
|
+
"aria-activedescendant": $t.value,
|
|
1045
|
+
"aria-controls": x(ga) ? `${x(j)}_listbox` : void 0,
|
|
1046
|
+
"aria-describedby": _n.value,
|
|
1047
|
+
"aria-invalid": gn.value,
|
|
1048
|
+
"aria-label": pn.value,
|
|
1017
1049
|
autocomplete: u.autocomplete,
|
|
1018
1050
|
class: "bb-select-popover__input",
|
|
1019
|
-
inputmode:
|
|
1020
|
-
placeholder:
|
|
1051
|
+
inputmode: dn.value,
|
|
1052
|
+
placeholder: pn.value,
|
|
1021
1053
|
role: "searchbox",
|
|
1022
|
-
tabindex:
|
|
1054
|
+
tabindex: Y.value ? 0 : -1,
|
|
1023
1055
|
type: "text",
|
|
1024
|
-
onBlur: w(
|
|
1025
|
-
onChange: w(
|
|
1026
|
-
onFocus: w(
|
|
1027
|
-
onInput: w(
|
|
1028
|
-
onKeydown:
|
|
1029
|
-
}, x(D).input), null, 16,
|
|
1030
|
-
|
|
1056
|
+
onBlur: w(An, ["stop"]),
|
|
1057
|
+
onChange: w(jn, ["stop"]),
|
|
1058
|
+
onFocus: w(kn, ["stop"]),
|
|
1059
|
+
onInput: w(Nn, ["stop"]),
|
|
1060
|
+
onKeydown: rr
|
|
1061
|
+
}, x(D).input), null, 16, Pt), [[Et, N.value]]),
|
|
1062
|
+
Y.value && or.value ? (_(), f("span", {
|
|
1031
1063
|
key: 0,
|
|
1032
1064
|
id: `${x(j)}_search_hint`,
|
|
1033
1065
|
class: "bb-sr-only"
|
|
1034
|
-
},
|
|
1035
|
-
p(
|
|
1066
|
+
}, Tt(sr.value), 9, Ft)) : pt("", !0),
|
|
1067
|
+
p(Ye, {
|
|
1036
1068
|
"aria-hidden": "true",
|
|
1037
1069
|
class: "bb-select-popover__search-error-icon",
|
|
1038
1070
|
focusable: "false"
|
|
1039
1071
|
}),
|
|
1040
|
-
p(
|
|
1072
|
+
p(Xe, {
|
|
1041
1073
|
"aria-hidden": "true",
|
|
1042
1074
|
class: "bb-select-popover__search-warning-icon",
|
|
1043
1075
|
focusable: "false"
|
|
1044
1076
|
}),
|
|
1045
|
-
p(
|
|
1077
|
+
p(Ge, {
|
|
1046
1078
|
"aria-hidden": "true",
|
|
1047
1079
|
class: "bb-select-popover__search-icon",
|
|
1048
1080
|
focusable: "false",
|
|
1049
|
-
icon: x(
|
|
1081
|
+
icon: x(Ut)
|
|
1050
1082
|
}, null, 8, ["icon"]),
|
|
1051
|
-
u.clearable ? (_(),
|
|
1083
|
+
u.clearable ? (_(), ft(qe, h({
|
|
1052
1084
|
key: 1,
|
|
1053
1085
|
class: "bb-select-popover__clear",
|
|
1054
|
-
tabindex:
|
|
1055
|
-
onClick: w(
|
|
1086
|
+
tabindex: mn.value && Y.value ? 0 : -1,
|
|
1087
|
+
onClick: w(Ka, ["stop"]),
|
|
1056
1088
|
onMousedown: n[1] ||= w(() => {}, ["prevent"])
|
|
1057
|
-
}, x(D).clear), null, 16, ["tabindex"])) :
|
|
1058
|
-
|
|
1089
|
+
}, x(D).clear), null, 16, ["tabindex"])) : pt("", !0),
|
|
1090
|
+
Fi.value ? (_(), f("div", It)) : pt("", !0)
|
|
1059
1091
|
])) : (_(), f("button", {
|
|
1060
1092
|
key: 1,
|
|
1061
1093
|
ref_key: "popoverFocusProxy",
|
|
1062
|
-
ref:
|
|
1063
|
-
"aria-activedescendant":
|
|
1094
|
+
ref: Zt,
|
|
1095
|
+
"aria-activedescendant": $t.value,
|
|
1064
1096
|
"aria-controls": `${x(j)}_listbox`,
|
|
1065
|
-
"aria-describedby":
|
|
1066
|
-
"aria-expanded":
|
|
1067
|
-
"aria-invalid":
|
|
1068
|
-
"aria-label":
|
|
1097
|
+
"aria-describedby": _n.value,
|
|
1098
|
+
"aria-expanded": Y.value,
|
|
1099
|
+
"aria-invalid": gn.value,
|
|
1100
|
+
"aria-label": pn.value,
|
|
1069
1101
|
class: "bb-select-popover__focus-proxy bb-sr-only",
|
|
1070
1102
|
role: "combobox",
|
|
1071
1103
|
tabindex: "-1",
|
|
1072
1104
|
type: "button",
|
|
1073
|
-
onFocus:
|
|
1105
|
+
onFocus: Mn,
|
|
1074
1106
|
onKeydown: [
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1107
|
+
Qn,
|
|
1108
|
+
Ot(w(Kn, ["stop", "prevent"]), ["down"]),
|
|
1109
|
+
Ot(w(Yn, ["stop", "prevent"]), ["end"]),
|
|
1110
|
+
Ot(w($n, ["stop", "prevent"]), ["enter"]),
|
|
1111
|
+
Ot(w(tr, ["stop", "prevent"]), ["esc"]),
|
|
1112
|
+
Ot(w(Jn, ["stop", "prevent"]), ["home"]),
|
|
1113
|
+
Ot(w(Gn, ["stop", "prevent"]), ["up"])
|
|
1082
1114
|
]
|
|
1083
|
-
}, null, 40,
|
|
1115
|
+
}, null, 40, Lt))]),
|
|
1084
1116
|
_: 1
|
|
1085
1117
|
}),
|
|
1086
|
-
p(x(
|
|
1087
|
-
default: C(() => [p(
|
|
1118
|
+
p(x(Jt), null, {
|
|
1119
|
+
default: C(() => [p(Qe, {
|
|
1088
1120
|
id: `${x(j)}_listbox`,
|
|
1089
1121
|
ref_key: "optionsContainer",
|
|
1090
1122
|
ref: k,
|
|
1091
|
-
compact: x(
|
|
1092
|
-
described:
|
|
1093
|
-
"empty-text":
|
|
1094
|
-
"failed-text": x(
|
|
1095
|
-
groups: u.groupBy ?
|
|
1123
|
+
compact: x(va).compact,
|
|
1124
|
+
described: la.value,
|
|
1125
|
+
"empty-text": Ur.value,
|
|
1126
|
+
"failed-text": x(F) === null ? void 0 : Ur.value,
|
|
1127
|
+
groups: u.groupBy ? ha.value : void 0,
|
|
1096
1128
|
"header-height": u.headerHeight,
|
|
1097
|
-
"list-label":
|
|
1098
|
-
"list-labelledby":
|
|
1099
|
-
loading:
|
|
1100
|
-
"loading-below":
|
|
1129
|
+
"list-label": X.value ? Xa.value : eo.value,
|
|
1130
|
+
"list-labelledby": X.value ? void 0 : $a.value,
|
|
1131
|
+
loading: q.value,
|
|
1132
|
+
"loading-below": Ii.value,
|
|
1101
1133
|
"loading-text": u.loadingText,
|
|
1102
1134
|
multiple: u.multiple,
|
|
1103
|
-
open:
|
|
1135
|
+
open: Y.value,
|
|
1104
1136
|
"option-height": u.itemHeight,
|
|
1105
|
-
options: u.groupBy ? void 0 :
|
|
1137
|
+
options: u.groupBy ? void 0 : ma.value,
|
|
1106
1138
|
passthrough: x(D),
|
|
1107
|
-
"onFocused:change":
|
|
1108
|
-
"onOption:selected":
|
|
1109
|
-
"onOption:unselected":
|
|
1110
|
-
onPointerdown:
|
|
1111
|
-
onRetry: n[2] ||= (e) => x(
|
|
1112
|
-
onTouchmovePassive:
|
|
1113
|
-
onWheelPassive:
|
|
1114
|
-
},
|
|
1139
|
+
"onFocused:change": Fn,
|
|
1140
|
+
"onOption:selected": sa,
|
|
1141
|
+
"onOption:unselected": ca,
|
|
1142
|
+
onPointerdown: Q,
|
|
1143
|
+
onRetry: n[2] ||= (e) => x(lt)(e, Wi, Gi),
|
|
1144
|
+
onTouchmovePassive: Q,
|
|
1145
|
+
onWheelPassive: Q
|
|
1146
|
+
}, ht({
|
|
1115
1147
|
loading: C(() => [y(e.$slots, "loading", { query: N.value })]),
|
|
1116
1148
|
empty: C(() => [y(e.$slots, "empty", {
|
|
1117
1149
|
close: $,
|
|
1118
|
-
focus:
|
|
1150
|
+
focus: Dn,
|
|
1119
1151
|
query: N.value
|
|
1120
1152
|
})]),
|
|
1121
1153
|
group: C((t) => [y(e.$slots, "group", g(m(t)))]),
|
|
1122
1154
|
_: 2
|
|
1123
1155
|
}, [e.$slots.option ? {
|
|
1124
1156
|
name: "option",
|
|
1125
|
-
fn: C((t) => [y(e.$slots, "option", g(m(
|
|
1157
|
+
fn: C((t) => [y(e.$slots, "option", g(m(Ci(t))))]),
|
|
1126
1158
|
key: "0"
|
|
1127
1159
|
} : void 0]), 1032, [
|
|
1128
1160
|
"id",
|
|
@@ -1145,35 +1177,35 @@ var jt = {
|
|
|
1145
1177
|
])]),
|
|
1146
1178
|
_: 3
|
|
1147
1179
|
}),
|
|
1148
|
-
|
|
1180
|
+
X.value ? (_(), ft(Ke, h({
|
|
1149
1181
|
key: 1,
|
|
1150
|
-
modelValue:
|
|
1151
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
1182
|
+
modelValue: Y.value,
|
|
1183
|
+
"onUpdate:modelValue": n[4] ||= (e) => Y.value = e,
|
|
1152
1184
|
class: "bb-select-popover__sheet",
|
|
1153
1185
|
pt: x(D).forward({
|
|
1154
1186
|
header: "header",
|
|
1155
1187
|
footer: "footer",
|
|
1156
1188
|
panel: "root",
|
|
1157
1189
|
sheet: "root"
|
|
1158
|
-
}, x(
|
|
1159
|
-
}, h(
|
|
1160
|
-
default: C(() => [
|
|
1161
|
-
u.multiple &&
|
|
1190
|
+
}, x(tt).states, () => u.offCanvasProps?.pt)
|
|
1191
|
+
}, h(Ta.value, wa, x(t)(x(rt)(e.$attrs)))), ht({
|
|
1192
|
+
default: C(() => [mt("div", g(m(Cn.value)), [
|
|
1193
|
+
u.multiple && Mi.value.length ? (_(), f("div", Rt, [mt("div", zt, [(_(!0), f(dt, null, Ct(Mi.value, (e) => (_(), ft(We, h({
|
|
1162
1194
|
key: e.valueHash,
|
|
1163
1195
|
class: "bb-select-popover__sheet-chip",
|
|
1164
1196
|
clearable: !u.disabled && !u.readonly,
|
|
1165
1197
|
size: "xl",
|
|
1166
1198
|
variant: "secondary"
|
|
1167
|
-
}, { ref_for: !0 }, e.unresolved ? void 0 : x(
|
|
1168
|
-
"onClick:clear": (t) =>
|
|
1199
|
+
}, { ref_for: !0 }, e.unresolved ? void 0 : x(xa)?.(e.item), {
|
|
1200
|
+
"onClick:clear": (t) => ca(e),
|
|
1169
1201
|
onMousedown: n[3] ||= w(() => {}, ["prevent"])
|
|
1170
1202
|
}), {
|
|
1171
|
-
default: C(() => [
|
|
1203
|
+
default: C(() => [gt(Tt(e.text), 1)]),
|
|
1172
1204
|
_: 2
|
|
1173
|
-
}, 1040, ["clearable", "onClick:clear"]))), 128))])])) :
|
|
1174
|
-
p(x(
|
|
1175
|
-
p(
|
|
1176
|
-
default: C(() => [p(x(
|
|
1205
|
+
}, 1040, ["clearable", "onClick:clear"]))), 128))])])) : pt("", !0),
|
|
1206
|
+
p(x(qt)),
|
|
1207
|
+
p(at, null, {
|
|
1208
|
+
default: C(() => [p(x(Yt))]),
|
|
1177
1209
|
_: 1
|
|
1178
1210
|
})
|
|
1179
1211
|
], 16)]),
|
|
@@ -1181,54 +1213,54 @@ var jt = {
|
|
|
1181
1213
|
}, [e.$slots.header ? {
|
|
1182
1214
|
name: "header",
|
|
1183
1215
|
fn: C(({ titleId: t }) => [y(e.$slots, "header", g(m({
|
|
1184
|
-
...
|
|
1216
|
+
...Ja.value,
|
|
1185
1217
|
titleId: t
|
|
1186
1218
|
})))]),
|
|
1187
1219
|
key: "0"
|
|
1188
1220
|
} : void 0, e.$slots.footer ? {
|
|
1189
1221
|
name: "footer",
|
|
1190
|
-
fn: C(() => [y(e.$slots, "footer", g(m(
|
|
1222
|
+
fn: C(() => [y(e.$slots, "footer", g(m(Ja.value)))]),
|
|
1191
1223
|
key: "1"
|
|
1192
|
-
} : void 0]), 1040, ["modelValue", "pt"])) : (_(),
|
|
1224
|
+
} : void 0]), 1040, ["modelValue", "pt"])) : (_(), ft(Je, h({
|
|
1193
1225
|
key: 2,
|
|
1194
1226
|
ref_key: "popoverSurface",
|
|
1195
|
-
ref:
|
|
1196
|
-
modelValue:
|
|
1197
|
-
"onUpdate:modelValue": n[5] ||= (e) =>
|
|
1198
|
-
anchor:
|
|
1199
|
-
"aria-hidden": x(
|
|
1227
|
+
ref: Qt,
|
|
1228
|
+
modelValue: Y.value,
|
|
1229
|
+
"onUpdate:modelValue": n[5] ||= (e) => Y.value = e,
|
|
1230
|
+
anchor: en.value,
|
|
1231
|
+
"aria-hidden": x(_a) || void 0,
|
|
1200
1232
|
boundary: u.boundary,
|
|
1201
|
-
"bubble-attrs":
|
|
1233
|
+
"bubble-attrs": Sn.value,
|
|
1202
1234
|
class: ["bb-select-popover", {
|
|
1203
|
-
"bb-select-popover--errors":
|
|
1204
|
-
"bb-select-popover--warnings":
|
|
1205
|
-
"bb-select-popover--loading":
|
|
1206
|
-
"bb-select-popover--reloading":
|
|
1207
|
-
"bb-select-popover--clearable-active":
|
|
1208
|
-
"bb-select-popover--compact": x(
|
|
1235
|
+
"bb-select-popover--errors": Li.value,
|
|
1236
|
+
"bb-select-popover--warnings": Ri.value,
|
|
1237
|
+
"bb-select-popover--loading": q.value,
|
|
1238
|
+
"bb-select-popover--reloading": Fi.value,
|
|
1239
|
+
"bb-select-popover--clearable-active": mn.value,
|
|
1240
|
+
"bb-select-popover--compact": x(va).compact
|
|
1209
1241
|
}],
|
|
1210
1242
|
"disable-flip": u.disableFlip,
|
|
1211
1243
|
"hide-arrow": "",
|
|
1212
|
-
offset: u.offset ?? x(
|
|
1244
|
+
offset: u.offset ?? x(Wt)() ?? 4,
|
|
1213
1245
|
padding: u.padding,
|
|
1214
1246
|
placement: u.placement,
|
|
1215
|
-
style:
|
|
1247
|
+
style: wn.value,
|
|
1216
1248
|
tag: "span",
|
|
1217
1249
|
"transition-duration": u.transitionDuration
|
|
1218
|
-
}, h(
|
|
1250
|
+
}, h(Ca, e.$attrs, x(D).root)), {
|
|
1219
1251
|
default: C(() => [
|
|
1220
1252
|
e.$slots.header ? (_(), f("div", h({
|
|
1221
1253
|
key: 0,
|
|
1222
1254
|
class: "bb-select-popover__header",
|
|
1223
|
-
inert: x(
|
|
1224
|
-
}, x(D).header), [y(e.$slots, "header", g(m(
|
|
1225
|
-
p(x(
|
|
1226
|
-
p(x(
|
|
1255
|
+
inert: x(_a)
|
|
1256
|
+
}, x(D).header), [y(e.$slots, "header", g(m(Ja.value)))], 16, Bt)) : pt("", !0),
|
|
1257
|
+
p(x(qt)),
|
|
1258
|
+
p(x(Yt)),
|
|
1227
1259
|
e.$slots.footer ? (_(), f("div", h({
|
|
1228
1260
|
key: 1,
|
|
1229
1261
|
class: "bb-select-popover__footer",
|
|
1230
|
-
inert: x(
|
|
1231
|
-
}, x(D).footer), [y(e.$slots, "footer", g(m(
|
|
1262
|
+
inert: x(_a)
|
|
1263
|
+
}, x(D).footer), [y(e.$slots, "footer", g(m(Ja.value)))], 16, Vt)) : pt("", !0)
|
|
1232
1264
|
]),
|
|
1233
1265
|
_: 3
|
|
1234
1266
|
}, 16, [
|