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