buefy 1.0.0 → 1.0.2
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/LICENSE.md +21 -0
- package/README.md +242 -0
- package/dist/buefy.css +15895 -0
- package/dist/buefy.d.ts +11706 -0
- package/dist/buefy.esm.js +21082 -0
- package/dist/buefy.esm.min.js +2 -0
- package/dist/buefy.js +21227 -0
- package/dist/buefy.min.css +1 -0
- package/dist/buefy.min.js +2 -0
- package/dist/cjs/Autocomplete-BMmOsPiK.js +864 -0
- package/dist/cjs/Button-Cq7yqI8p.js +118 -0
- package/dist/cjs/CheckRadioMixin-CDu0SN3g.js +58 -0
- package/dist/cjs/Checkbox-GPzAMQqM.js +85 -0
- package/dist/cjs/CompatFallthroughMixin-hhK0Gkhr.js +48 -0
- package/dist/cjs/Datepicker-B-9ReBe6.js +2120 -0
- package/dist/cjs/Dropdown-DtpKU9qf.js +470 -0
- package/dist/cjs/DropdownItem-IMOKyRGV.js +110 -0
- package/dist/cjs/Field-19ZCJFF8.js +405 -0
- package/dist/cjs/FormElementMixin-DavX4iOv.js +170 -0
- package/dist/cjs/Icon-lsDKE2wQ.js +184 -0
- package/dist/cjs/Image-CocPwU3n.js +356 -0
- package/dist/cjs/InjectedChildMixin-CUKn09dB.js +150 -0
- package/dist/cjs/Input-BcloGeZ3.js +350 -0
- package/dist/cjs/Loading-GqqqjipO.js +145 -0
- package/dist/cjs/MessageMixin-bGuuzfev.js +136 -0
- package/dist/cjs/Modal-CYpSQe2Q.js +315 -0
- package/dist/cjs/NoticeMixin--3RjH43z.js +163 -0
- package/dist/cjs/Pagination-D1MVdiLp.js +547 -0
- package/dist/cjs/Progress-DT9Qc8Id.js +177 -0
- package/dist/cjs/Select-DayPKwCY.js +147 -0
- package/dist/cjs/SlotComponent-BruGdRW3.js +41 -0
- package/dist/cjs/TabbedChildMixin-B3JUUwcf.js +211 -0
- package/dist/cjs/Tag-BprnwJJ1.js +167 -0
- package/dist/cjs/Timepicker-CDZ3V-2J.js +283 -0
- package/dist/cjs/TimepickerMixin-C9WVvcUL.js +666 -0
- package/dist/cjs/Tooltip-Cgighv0j.js +393 -0
- package/dist/cjs/_plugin-vue_export-helper-Die8u8yB.js +11 -0
- package/dist/cjs/autocomplete.js +23 -0
- package/dist/cjs/breadcrumb.js +107 -0
- package/dist/cjs/button.js +20 -0
- package/dist/cjs/carousel.js +825 -0
- package/dist/cjs/checkbox.js +88 -0
- package/dist/cjs/clockpicker.js +668 -0
- package/dist/cjs/collapse.js +99 -0
- package/dist/cjs/colorpicker.js +25 -0
- package/dist/cjs/config-DR826Ki2.js +103 -0
- package/dist/cjs/config.js +18 -0
- package/dist/cjs/datepicker.js +28 -0
- package/dist/cjs/datetimepicker.js +483 -0
- package/dist/cjs/dialog.js +506 -0
- package/dist/cjs/dropdown.js +23 -0
- package/dist/cjs/field.js +19 -0
- package/dist/cjs/helpers.js +276 -0
- package/dist/cjs/icon.js +19 -0
- package/dist/cjs/image.js +19 -0
- package/dist/cjs/index-DiQy3SCb.js +1942 -0
- package/dist/cjs/index.js +274 -0
- package/dist/cjs/input.js +22 -0
- package/dist/cjs/loading.js +87 -0
- package/dist/cjs/menu.js +340 -0
- package/dist/cjs/message.js +119 -0
- package/dist/cjs/modal.js +103 -0
- package/dist/cjs/navbar.js +572 -0
- package/dist/cjs/notification.js +281 -0
- package/dist/cjs/numberinput.js +386 -0
- package/dist/cjs/pagination.js +22 -0
- package/dist/cjs/plugins-DbyYGVpp.js +16 -0
- package/dist/cjs/progress.js +91 -0
- package/dist/cjs/radio.js +137 -0
- package/dist/cjs/rate.js +197 -0
- package/dist/cjs/select.js +22 -0
- package/dist/cjs/sidebar.js +309 -0
- package/dist/cjs/skeleton.js +78 -0
- package/dist/cjs/slider.js +699 -0
- package/dist/cjs/snackbar.js +224 -0
- package/dist/cjs/ssr-DVRFTu_P.js +8 -0
- package/dist/cjs/steps.js +347 -0
- package/dist/cjs/switch.js +161 -0
- package/dist/cjs/table.js +2391 -0
- package/dist/cjs/tabs.js +258 -0
- package/dist/cjs/tag.js +44 -0
- package/dist/cjs/taginput.js +425 -0
- package/dist/cjs/timepicker.js +29 -0
- package/dist/cjs/toast.js +162 -0
- package/dist/cjs/tooltip.js +19 -0
- package/dist/cjs/trapFocus-BlX6xykt.js +53 -0
- package/dist/cjs/upload.js +195 -0
- package/dist/components/autocomplete/index.js +1647 -0
- package/dist/components/autocomplete/index.min.js +2 -0
- package/dist/components/breadcrumb/index.js +173 -0
- package/dist/components/breadcrumb/index.min.js +2 -0
- package/dist/components/button/index.js +334 -0
- package/dist/components/button/index.min.js +2 -0
- package/dist/components/carousel/index.js +1534 -0
- package/dist/components/carousel/index.min.js +2 -0
- package/dist/components/checkbox/index.js +236 -0
- package/dist/components/checkbox/index.min.js +2 -0
- package/dist/components/clockpicker/index.js +2636 -0
- package/dist/components/clockpicker/index.min.js +2 -0
- package/dist/components/collapse/index.js +111 -0
- package/dist/components/collapse/index.min.js +2 -0
- package/dist/components/colorpicker/index.js +4251 -0
- package/dist/components/colorpicker/index.min.js +2 -0
- package/dist/components/datepicker/index.js +4110 -0
- package/dist/components/datepicker/index.min.js +2 -0
- package/dist/components/datetimepicker/index.js +5479 -0
- package/dist/components/datetimepicker/index.min.js +2 -0
- package/dist/components/dialog/index.js +1202 -0
- package/dist/components/dialog/index.min.js +2 -0
- package/dist/components/dropdown/index.js +680 -0
- package/dist/components/dropdown/index.min.js +2 -0
- package/dist/components/field/index.js +439 -0
- package/dist/components/field/index.min.js +2 -0
- package/dist/components/icon/index.js +212 -0
- package/dist/components/icon/index.min.js +2 -0
- package/dist/components/image/index.js +396 -0
- package/dist/components/image/index.min.js +2 -0
- package/dist/components/input/index.js +764 -0
- package/dist/components/input/index.min.js +2 -0
- package/dist/components/loading/index.js +280 -0
- package/dist/components/loading/index.min.js +2 -0
- package/dist/components/menu/index.js +586 -0
- package/dist/components/menu/index.min.js +2 -0
- package/dist/components/message/index.js +611 -0
- package/dist/components/message/index.min.js +2 -0
- package/dist/components/modal/index.js +516 -0
- package/dist/components/modal/index.min.js +2 -0
- package/dist/components/navbar/index.js +634 -0
- package/dist/components/navbar/index.min.js +2 -0
- package/dist/components/notification/index.js +976 -0
- package/dist/components/notification/index.min.js +2 -0
- package/dist/components/numberinput/index.js +1128 -0
- package/dist/components/numberinput/index.min.js +2 -0
- package/dist/components/pagination/index.js +764 -0
- package/dist/components/pagination/index.min.js +2 -0
- package/dist/components/progress/index.js +280 -0
- package/dist/components/progress/index.min.js +2 -0
- package/dist/components/radio/index.js +208 -0
- package/dist/components/radio/index.min.js +2 -0
- package/dist/components/rate/index.js +391 -0
- package/dist/components/rate/index.min.js +2 -0
- package/dist/components/select/index.js +560 -0
- package/dist/components/select/index.min.js +2 -0
- package/dist/components/sidebar/index.js +337 -0
- package/dist/components/sidebar/index.min.js +2 -0
- package/dist/components/skeleton/index.js +87 -0
- package/dist/components/skeleton/index.min.js +2 -0
- package/dist/components/slider/index.js +1171 -0
- package/dist/components/slider/index.min.js +2 -0
- package/dist/components/snackbar/index.js +439 -0
- package/dist/components/snackbar/index.min.js +2 -0
- package/dist/components/steps/index.js +925 -0
- package/dist/components/steps/index.min.js +2 -0
- package/dist/components/switch/index.js +182 -0
- package/dist/components/switch/index.min.js +2 -0
- package/dist/components/table/index.js +4208 -0
- package/dist/components/table/index.min.js +2 -0
- package/dist/components/tabs/index.js +837 -0
- package/dist/components/tabs/index.min.js +2 -0
- package/dist/components/tag/index.js +396 -0
- package/dist/components/tag/index.min.js +2 -0
- package/dist/components/taginput/index.js +2209 -0
- package/dist/components/taginput/index.min.js +2 -0
- package/dist/components/timepicker/index.js +2906 -0
- package/dist/components/timepicker/index.min.js +2 -0
- package/dist/components/toast/index.js +377 -0
- package/dist/components/toast/index.min.js +2 -0
- package/dist/components/tooltip/index.js +445 -0
- package/dist/components/tooltip/index.min.js +2 -0
- package/dist/components/upload/index.js +426 -0
- package/dist/components/upload/index.min.js +2 -0
- package/dist/esm/Autocomplete-CjbTh9D8.js +862 -0
- package/dist/esm/Button-DyUYShTZ.js +116 -0
- package/dist/esm/CheckRadioMixin-DSD_rjC8.js +56 -0
- package/dist/esm/Checkbox-KUMz0sfA.js +83 -0
- package/dist/esm/CompatFallthroughMixin-C8LPuwDr.js +46 -0
- package/dist/esm/Datepicker-Bl8Wfdkn.js +2118 -0
- package/dist/esm/Dropdown-CGTYVyoL.js +467 -0
- package/dist/esm/DropdownItem-Cn3nM0A3.js +108 -0
- package/dist/esm/Field-B7bX_uUg.js +403 -0
- package/dist/esm/FormElementMixin-Dd_wkBN5.js +168 -0
- package/dist/esm/Icon-DPyGDeRK.js +182 -0
- package/dist/esm/Image-DhX-4hlV.js +354 -0
- package/dist/esm/InjectedChildMixin-D2K-FwuO.js +145 -0
- package/dist/esm/Input-C4L520az.js +348 -0
- package/dist/esm/Loading-tuQoo6TU.js +143 -0
- package/dist/esm/MessageMixin-CQ7LIdvq.js +134 -0
- package/dist/esm/Modal-tfvyhxw_.js +313 -0
- package/dist/esm/NoticeMixin-ByNlva3T.js +161 -0
- package/dist/esm/Pagination-B-LAJQay.js +543 -0
- package/dist/esm/Progress-BPGTVZgr.js +174 -0
- package/dist/esm/Select-bl4qUzij.js +145 -0
- package/dist/esm/SlotComponent-BwNpVnfH.js +39 -0
- package/dist/esm/TabbedChildMixin-C4i6WP9j.js +208 -0
- package/dist/esm/Tag-jS5Bcj6N.js +165 -0
- package/dist/esm/Timepicker-DnkqnOBT.js +281 -0
- package/dist/esm/TimepickerMixin-Bikh6_Fg.js +664 -0
- package/dist/esm/Tooltip-CtDSXAqa.js +391 -0
- package/dist/esm/_plugin-vue_export-helper-OJRSZE6i.js +9 -0
- package/dist/esm/autocomplete.js +18 -0
- package/dist/esm/breadcrumb.js +101 -0
- package/dist/esm/button.js +15 -0
- package/dist/esm/carousel.js +818 -0
- package/dist/esm/checkbox.js +82 -0
- package/dist/esm/clockpicker.js +663 -0
- package/dist/esm/collapse.js +94 -0
- package/dist/esm/colorpicker.js +16 -0
- package/dist/esm/config-CKuo-p6e.js +100 -0
- package/dist/esm/config.js +14 -0
- package/dist/esm/datepicker.js +23 -0
- package/dist/esm/datetimepicker.js +478 -0
- package/dist/esm/dialog.js +500 -0
- package/dist/esm/dropdown.js +17 -0
- package/dist/esm/field.js +14 -0
- package/dist/esm/helpers.js +247 -0
- package/dist/esm/icon.js +14 -0
- package/dist/esm/image.js +14 -0
- package/dist/esm/index-CQegEsxK.js +1938 -0
- package/dist/esm/index.js +164 -0
- package/dist/esm/input.js +17 -0
- package/dist/esm/loading.js +81 -0
- package/dist/esm/menu.js +333 -0
- package/dist/esm/message.js +114 -0
- package/dist/esm/modal.js +97 -0
- package/dist/esm/navbar.js +565 -0
- package/dist/esm/notification.js +275 -0
- package/dist/esm/numberinput.js +381 -0
- package/dist/esm/pagination.js +16 -0
- package/dist/esm/plugins-B172kuKE.js +13 -0
- package/dist/esm/progress.js +85 -0
- package/dist/esm/radio.js +131 -0
- package/dist/esm/rate.js +192 -0
- package/dist/esm/select.js +17 -0
- package/dist/esm/sidebar.js +304 -0
- package/dist/esm/skeleton.js +73 -0
- package/dist/esm/slider.js +693 -0
- package/dist/esm/snackbar.js +218 -0
- package/dist/esm/ssr-C7yEpGLm.js +5 -0
- package/dist/esm/steps.js +341 -0
- package/dist/esm/switch.js +156 -0
- package/dist/esm/table.js +2385 -0
- package/dist/esm/tabs.js +252 -0
- package/dist/esm/tag.js +38 -0
- package/dist/esm/taginput.js +420 -0
- package/dist/esm/timepicker.js +24 -0
- package/dist/esm/toast.js +156 -0
- package/dist/esm/tooltip.js +14 -0
- package/dist/esm/trapFocus-KHP_kCNE.js +51 -0
- package/dist/esm/upload.js +190 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +73 -6
- package/src/components/autocomplete/Autocomplete.spec.ts +783 -0
- package/src/components/autocomplete/Autocomplete.vue +966 -0
- package/src/components/autocomplete/__snapshots__/Autocomplete.spec.ts.snap +21 -0
- package/src/components/autocomplete/index.ts +16 -0
- package/src/components/breadcrumb/Breadcrumb.spec.ts +65 -0
- package/src/components/breadcrumb/Breadcrumb.vue +42 -0
- package/src/components/breadcrumb/BreadcrumbItem.spec.ts +74 -0
- package/src/components/breadcrumb/BreadcrumbItem.vue +34 -0
- package/src/components/breadcrumb/__snapshots__/Breadcrumb.spec.ts.snap +7 -0
- package/src/components/breadcrumb/__snapshots__/BreadcrumbItem.spec.ts.snap +3 -0
- package/src/components/breadcrumb/index.ts +19 -0
- package/src/components/button/Button.spec.ts +117 -0
- package/src/components/button/Button.vue +112 -0
- package/src/components/button/__snapshots__/Button.spec.ts.snap +9 -0
- package/src/components/button/index.ts +16 -0
- package/src/components/carousel/Carousel.spec.ts +304 -0
- package/src/components/carousel/Carousel.vue +389 -0
- package/src/components/carousel/CarouselItem.spec.ts +105 -0
- package/src/components/carousel/CarouselItem.vue +38 -0
- package/src/components/carousel/CarouselList.spec.ts +172 -0
- package/src/components/carousel/CarouselList.vue +364 -0
- package/src/components/carousel/__snapshots__/Carousel.spec.ts.snap +19 -0
- package/src/components/carousel/__snapshots__/CarouselItem.spec.ts.snap +7 -0
- package/src/components/carousel/__snapshots__/CarouselList.spec.ts.snap +36 -0
- package/src/components/carousel/index.ts +23 -0
- package/src/components/carousel/types.ts +17 -0
- package/src/components/checkbox/Checkbox.spec.ts +40 -0
- package/src/components/checkbox/Checkbox.vue +63 -0
- package/src/components/checkbox/CheckboxButton.spec.ts +46 -0
- package/src/components/checkbox/CheckboxButton.vue +59 -0
- package/src/components/checkbox/__snapshots__/Checkbox.spec.ts.snap +9 -0
- package/src/components/checkbox/__snapshots__/CheckboxButton.spec.ts.snap +3 -0
- package/src/components/checkbox/index.ts +20 -0
- package/src/components/clockpicker/Clockpicker.spec.ts +161 -0
- package/src/components/clockpicker/Clockpicker.vue +311 -0
- package/src/components/clockpicker/ClockpickerFace.spec.ts +99 -0
- package/src/components/clockpicker/ClockpickerFace.vue +272 -0
- package/src/components/clockpicker/__snapshots__/Clockpicker.spec.ts.snap +36 -0
- package/src/components/clockpicker/__snapshots__/ClockpickerFace.spec.ts.snap +9 -0
- package/src/components/clockpicker/index.ts +16 -0
- package/src/components/collapse/Collapse.spec.ts +106 -0
- package/src/components/collapse/Collapse.vue +98 -0
- package/src/components/collapse/__snapshots__/Collapse.spec.ts.snap +10 -0
- package/src/components/collapse/index.ts +16 -0
- package/src/components/colorpicker/Colorpicker.spec.ts +22 -0
- package/src/components/colorpicker/Colorpicker.vue +416 -0
- package/src/components/colorpicker/ColorpickerAlphaSlider.spec.ts +17 -0
- package/src/components/colorpicker/ColorpickerAlphaSlider.vue +205 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.spec.ts +23 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +380 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.spec.ts +23 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +456 -0
- package/src/components/colorpicker/__snapshots__/Colorpicker.spec.ts.snap +77 -0
- package/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.ts.snap +9 -0
- package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.ts.snap +12 -0
- package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.ts.snap +36 -0
- package/src/components/colorpicker/index.ts +16 -0
- package/src/components/datepicker/Datepicker.spec.ts +482 -0
- package/src/components/datepicker/Datepicker.vue +908 -0
- package/src/components/datepicker/DatepickerMonth.spec.ts +346 -0
- package/src/components/datepicker/DatepickerMonth.vue +444 -0
- package/src/components/datepicker/DatepickerTable.spec.ts +290 -0
- package/src/components/datepicker/DatepickerTable.vue +398 -0
- package/src/components/datepicker/DatepickerTableRow.spec.ts +300 -0
- package/src/components/datepicker/DatepickerTableRow.vue +416 -0
- package/src/components/datepicker/__snapshots__/Datepicker.spec.ts.snap +54 -0
- package/src/components/datepicker/__snapshots__/DatepickerMonth.spec.ts.snap +33 -0
- package/src/components/datepicker/__snapshots__/DatepickerTable.spec.ts.snap +16 -0
- package/src/components/datepicker/__snapshots__/DatepickerTableRow.spec.ts.snap +23 -0
- package/src/components/datepicker/index.ts +17 -0
- package/src/components/datepicker/types.ts +41 -0
- package/src/components/datetimepicker/Datetimepicker.spec.ts +132 -0
- package/src/components/datetimepicker/Datetimepicker.vue +491 -0
- package/src/components/datetimepicker/index.ts +16 -0
- package/src/components/dialog/Dialog.spec.ts +108 -0
- package/src/components/dialog/Dialog.vue +300 -0
- package/src/components/dialog/index.ts +169 -0
- package/src/components/dropdown/Dropdown.spec.ts +229 -0
- package/src/components/dropdown/Dropdown.vue +491 -0
- package/src/components/dropdown/DropdownItem.spec.ts +78 -0
- package/src/components/dropdown/DropdownItem.vue +112 -0
- package/src/components/dropdown/__snapshots__/Dropdown.spec.ts.snap +15 -0
- package/src/components/dropdown/__snapshots__/DropdownItem.spec.ts.snap +3 -0
- package/src/components/dropdown/index.ts +20 -0
- package/src/components/field/Field.spec.ts +324 -0
- package/src/components/field/Field.vue +316 -0
- package/src/components/field/FieldBody.spec.ts +96 -0
- package/src/components/field/FieldBody.vue +74 -0
- package/src/components/field/__snapshots__/Field.spec.ts.snap +8 -0
- package/src/components/field/__snapshots__/FieldBody.spec.ts.snap +3 -0
- package/src/components/field/index.ts +16 -0
- package/src/components/icon/Icon.spec.ts +142 -0
- package/src/components/icon/Icon.vue +120 -0
- package/src/components/icon/__snapshots__/Icon.spec.ts.snap +3 -0
- package/src/components/icon/index.ts +17 -0
- package/src/components/image/Image.spec.ts +218 -0
- package/src/components/image/Image.vue +358 -0
- package/src/components/image/__snapshots__/Image.spec.ts.snap +37 -0
- package/src/components/image/index.ts +16 -0
- package/src/components/index.ts +179 -0
- package/src/components/input/Input.spec.ts +396 -0
- package/src/components/input/Input.vue +335 -0
- package/src/components/input/__snapshots__/Input.spec.ts.snap +9 -0
- package/src/components/input/index.ts +17 -0
- package/src/components/loading/Loading.spec.ts +151 -0
- package/src/components/loading/Loading.vue +135 -0
- package/src/components/loading/__snapshots__/Loading.spec.ts.snap +10 -0
- package/src/components/loading/index.ts +91 -0
- package/src/components/menu/Menu.spec.ts +21 -0
- package/src/components/menu/Menu.vue +31 -0
- package/src/components/menu/MenuItem.spec.ts +92 -0
- package/src/components/menu/MenuItem.vue +168 -0
- package/src/components/menu/MenuItemContainerMixin.ts +72 -0
- package/src/components/menu/MenuList.spec.ts +35 -0
- package/src/components/menu/MenuList.vue +47 -0
- package/src/components/menu/__snapshots__/Menu.spec.ts.snap +3 -0
- package/src/components/menu/__snapshots__/MenuItem.spec.ts.snap +9 -0
- package/src/components/menu/__snapshots__/MenuList.spec.ts.snap +8 -0
- package/src/components/menu/index.ts +25 -0
- package/src/components/message/Message.spec.ts +30 -0
- package/src/components/message/Message.vue +73 -0
- package/src/components/message/__snapshots__/Message.spec.ts.snap +11 -0
- package/src/components/message/index.ts +15 -0
- package/src/components/modal/Modal.spec.ts +167 -0
- package/src/components/modal/Modal.vue +335 -0
- package/src/components/modal/__snapshots__/Modal.spec.ts.snap +10 -0
- package/src/components/modal/index.ts +107 -0
- package/src/components/navbar/NavBar.spec.ts +78 -0
- package/src/components/navbar/NavBarBurger.spec.ts +30 -0
- package/src/components/navbar/NavBarItem.spec.ts +92 -0
- package/src/components/navbar/Navbar.vue +274 -0
- package/src/components/navbar/NavbarBurger.vue +29 -0
- package/src/components/navbar/NavbarDropdown.spec.ts +84 -0
- package/src/components/navbar/NavbarDropdown.vue +115 -0
- package/src/components/navbar/NavbarItem.vue +97 -0
- package/src/components/navbar/__snapshots__/NavBar.spec.ts.snap +11 -0
- package/src/components/navbar/__snapshots__/NavBarBurger.spec.ts.snap +3 -0
- package/src/components/navbar/__snapshots__/NavBarItem.spec.ts.snap +3 -0
- package/src/components/navbar/__snapshots__/NavbarDropdown.spec.ts.snap +7 -0
- package/src/components/navbar/index.ts +22 -0
- package/src/components/notification/Notification.spec.ts +21 -0
- package/src/components/notification/Notification.vue +77 -0
- package/src/components/notification/NotificationNotice.vue +76 -0
- package/src/components/notification/__snapshots__/Notification.spec.ts.snap +10 -0
- package/src/components/notification/index.ts +121 -0
- package/src/components/numberinput/Numberinput.spec.ts +445 -0
- package/src/components/numberinput/Numberinput.vue +372 -0
- package/src/components/numberinput/index.ts +16 -0
- package/src/components/pagination/Pagination.spec.ts +94 -0
- package/src/components/pagination/Pagination.vue +434 -0
- package/src/components/pagination/PaginationButton.spec.ts +42 -0
- package/src/components/pagination/PaginationButton.vue +59 -0
- package/src/components/pagination/__snapshots__/Pagination.spec.ts.snap +22 -0
- package/src/components/pagination/__snapshots__/PaginationButton.spec.ts.snap +3 -0
- package/src/components/pagination/index.ts +19 -0
- package/src/components/pagination/types.ts +11 -0
- package/src/components/progress/Progress.spec.ts +81 -0
- package/src/components/progress/Progress.vue +168 -0
- package/src/components/progress/ProgressBar.spec.ts +45 -0
- package/src/components/progress/ProgressBar.vue +74 -0
- package/src/components/progress/__snapshots__/Progress.spec.ts.snap +7 -0
- package/src/components/progress/__snapshots__/ProgressBar.spec.ts.snap +7 -0
- package/src/components/progress/index.ts +18 -0
- package/src/components/radio/Radio.spec.ts +40 -0
- package/src/components/radio/Radio.vue +35 -0
- package/src/components/radio/RadioButton.spec.ts +40 -0
- package/src/components/radio/RadioButton.vue +69 -0
- package/src/components/radio/__snapshots__/Radio.spec.ts.snap +3 -0
- package/src/components/radio/__snapshots__/RadioButton.spec.ts.snap +3 -0
- package/src/components/radio/index.ts +18 -0
- package/src/components/rate/Rate.spec.ts +90 -0
- package/src/components/rate/Rate.vue +158 -0
- package/src/components/rate/index.ts +15 -0
- package/src/components/select/Select.spec.ts +74 -0
- package/src/components/select/Select.vue +118 -0
- package/src/components/select/__snapshots__/Select.spec.ts.snap +7 -0
- package/src/components/select/index.ts +16 -0
- package/src/components/sidebar/Sidebar.spec.ts +107 -0
- package/src/components/sidebar/Sidebar.vue +316 -0
- package/src/components/sidebar/__snapshots__/Sidebar.spec.ts.snap +25 -0
- package/src/components/sidebar/index.ts +16 -0
- package/src/components/skeleton/Skeleton.spec.ts +16 -0
- package/src/components/skeleton/Skeleton.vue +98 -0
- package/src/components/skeleton/__snapshots__/Skeleton.spec.ts.snap +7 -0
- package/src/components/skeleton/index.ts +18 -0
- package/src/components/slider/Slider.spec.ts +115 -0
- package/src/components/slider/Slider.vue +374 -0
- package/src/components/slider/SliderThumb.spec.ts +176 -0
- package/src/components/slider/SliderThumb.vue +251 -0
- package/src/components/slider/SliderTick.spec.ts +33 -0
- package/src/components/slider/SliderTick.vue +50 -0
- package/src/components/slider/__snapshots__/Slider.spec.ts.snap +12 -0
- package/src/components/slider/__snapshots__/SliderThumb.spec.ts.snap +16 -0
- package/src/components/slider/__snapshots__/SliderTick.spec.ts.snap +7 -0
- package/src/components/slider/index.ts +19 -0
- package/src/components/slider/types.ts +34 -0
- package/src/components/snackbar/Snackbar.spec.ts +35 -0
- package/src/components/snackbar/Snackbar.vue +88 -0
- package/src/components/snackbar/__snapshots__/Snackbar.spec.ts.snap +12 -0
- package/src/components/snackbar/index.ts +118 -0
- package/src/components/steps/StepItem.spec.ts +114 -0
- package/src/components/steps/StepItem.vue +26 -0
- package/src/components/steps/Steps.spec.ts +125 -0
- package/src/components/steps/Steps.vue +273 -0
- package/src/components/steps/__snapshots__/StepItem.spec.ts.snap +7 -0
- package/src/components/steps/__snapshots__/Steps.spec.ts.snap +40 -0
- package/src/components/steps/index.ts +19 -0
- package/src/components/switch/Switch.spec.ts +74 -0
- package/src/components/switch/Switch.vue +146 -0
- package/src/components/switch/__snapshots__/Switch.spec.ts.snap +3 -0
- package/src/components/switch/index.ts +16 -0
- package/src/components/table/Table.spec.ts +622 -0
- package/src/components/table/Table.vue +1770 -0
- package/src/components/table/TableColumn.spec.ts +85 -0
- package/src/components/table/TableColumn.vue +140 -0
- package/src/components/table/TableMobileSort.spec.ts +47 -0
- package/src/components/table/TableMobileSort.vue +236 -0
- package/src/components/table/TablePagination.vue +86 -0
- package/src/components/table/__snapshots__/Table.spec.ts.snap +24 -0
- package/src/components/table/__snapshots__/TableMobileSort.spec.ts.snap +12 -0
- package/src/components/table/index.ts +32 -0
- package/src/components/table/mockTableColumn.ts +110 -0
- package/src/components/table/types.ts +110 -0
- package/src/components/tabs/TabItem.spec.ts +203 -0
- package/src/components/tabs/TabItem.vue +19 -0
- package/src/components/tabs/Tabs.spec.ts +122 -0
- package/src/components/tabs/Tabs.vue +204 -0
- package/src/components/tabs/__snapshots__/TabItem.spec.ts.snap +7 -0
- package/src/components/tabs/__snapshots__/Tabs.spec.ts.snap +33 -0
- package/src/components/tabs/index.ts +19 -0
- package/src/components/tag/Tag.spec.ts +32 -0
- package/src/components/tag/Tag.vue +132 -0
- package/src/components/tag/Taglist.spec.ts +21 -0
- package/src/components/tag/Taglist.vue +16 -0
- package/src/components/tag/__snapshots__/Tag.spec.ts.snap +6 -0
- package/src/components/tag/__snapshots__/Taglist.spec.ts.snap +3 -0
- package/src/components/tag/index.ts +19 -0
- package/src/components/taginput/Taginput.spec.ts +132 -0
- package/src/components/taginput/Taginput.vue +415 -0
- package/src/components/taginput/__snapshots__/Taginput.spec.ts.snap +10 -0
- package/src/components/taginput/index.ts +16 -0
- package/src/components/timepicker/Timepicker.spec.ts +108 -0
- package/src/components/timepicker/Timepicker.vue +183 -0
- package/src/components/timepicker/__snapshots__/Timepicker.spec.ts.snap +41 -0
- package/src/components/timepicker/index.ts +17 -0
- package/src/components/toast/Toast.spec.ts +74 -0
- package/src/components/toast/Toast.vue +46 -0
- package/src/components/toast/__snapshots__/Toast.spec.ts.snap +10 -0
- package/src/components/toast/index.ts +120 -0
- package/src/components/tooltip/Tooltip.spec.ts +64 -0
- package/src/components/tooltip/Tooltip.vue +393 -0
- package/src/components/tooltip/__snapshots__/Tooltip.spec.ts.snap +12 -0
- package/src/components/tooltip/index.ts +16 -0
- package/src/components/upload/Upload.spec.ts +62 -0
- package/src/components/upload/Upload.vue +188 -0
- package/src/components/upload/__snapshots__/Upload.spec.ts.snap +3 -0
- package/src/components/upload/index.ts +15 -0
- package/src/directives/clickOutside.ts +113 -0
- package/src/directives/trapFocus.ts +61 -0
- package/src/index.ts +43 -0
- package/src/scss/buefy-build.scss +6 -0
- package/src/scss/buefy.scss +39 -0
- package/src/scss/components/_autocomplete.scss +39 -0
- package/src/scss/components/_carousel.scss +204 -0
- package/src/scss/components/_checkbox.scss +106 -0
- package/src/scss/components/_clockpicker.scss +283 -0
- package/src/scss/components/_collapse.scss +9 -0
- package/src/scss/components/_colorpicker.scss +283 -0
- package/src/scss/components/_datepicker.scss +220 -0
- package/src/scss/components/_dialog.scss +54 -0
- package/src/scss/components/_dropdown.scss +143 -0
- package/src/scss/components/_form.scss +309 -0
- package/src/scss/components/_icon.scss +16 -0
- package/src/scss/components/_image.scss +20 -0
- package/src/scss/components/_loading.scss +45 -0
- package/src/scss/components/_menu.scss +11 -0
- package/src/scss/components/_message.scss +16 -0
- package/src/scss/components/_modal.scss +37 -0
- package/src/scss/components/_navbar.scss +22 -0
- package/src/scss/components/_notices.scss +144 -0
- package/src/scss/components/_notification.scss +8 -0
- package/src/scss/components/_numberinput.scss +33 -0
- package/src/scss/components/_pagination.scss +63 -0
- package/src/scss/components/_progress.scss +105 -0
- package/src/scss/components/_radio.scss +123 -0
- package/src/scss/components/_rate.scss +72 -0
- package/src/scss/components/_select.scss +38 -0
- package/src/scss/components/_sidebar.scss +107 -0
- package/src/scss/components/_skeleton.scss +66 -0
- package/src/scss/components/_slider.scss +162 -0
- package/src/scss/components/_steps.scss +491 -0
- package/src/scss/components/_switch.scss +214 -0
- package/src/scss/components/_table.scss +322 -0
- package/src/scss/components/_tabs.scss +197 -0
- package/src/scss/components/_tag.scss +36 -0
- package/src/scss/components/_taginput.scss +73 -0
- package/src/scss/components/_timepicker.scss +73 -0
- package/src/scss/components/_tooltip.scss +192 -0
- package/src/scss/components/_upload.scss +62 -0
- package/src/scss/utils/_all.scss +4 -0
- package/src/scss/utils/_animations.scss +183 -0
- package/src/scss/utils/_functions.scss +49 -0
- package/src/scss/utils/_helpers.scss +6 -0
- package/src/scss/utils/_variables-ext.scss +2 -0
- package/src/scss/utils/_variables.scss +16 -0
- package/src/utils/CheckRadioMixin.spec.ts +28 -0
- package/src/utils/CheckRadioMixin.ts +61 -0
- package/src/utils/CompatFallthroughMixin.ts +34 -0
- package/src/utils/ConfigComponent.ts +12 -0
- package/src/utils/FormElementMixin.spec.ts +41 -0
- package/src/utils/FormElementMixin.ts +206 -0
- package/src/utils/InjectedChildMixin.ts +139 -0
- package/src/utils/MessageMixin.spec.ts +51 -0
- package/src/utils/MessageMixin.ts +138 -0
- package/src/utils/NoticeMixin.spec.ts +55 -0
- package/src/utils/NoticeMixin.ts +181 -0
- package/src/utils/ProvideInjectTypes.ts +20 -0
- package/src/utils/ProviderParentMixin.ts +105 -0
- package/src/utils/SlotComponent.spec.ts +55 -0
- package/src/utils/SlotComponent.ts +38 -0
- package/src/utils/TabbedChildMixin.ts +96 -0
- package/src/utils/TabbedMixin.ts +166 -0
- package/src/utils/TabbedTypes.ts +33 -0
- package/src/utils/TimepickerMixin.spec.ts +75 -0
- package/src/utils/TimepickerMixin.ts +767 -0
- package/src/utils/color.spec.ts +55 -0
- package/src/utils/color.ts +507 -0
- package/src/utils/config.spec.ts +11 -0
- package/src/utils/config.ts +619 -0
- package/src/utils/debounce.spec.ts +52 -0
- package/src/utils/debounce.ts +20 -0
- package/src/utils/helpers.spec.ts +257 -0
- package/src/utils/helpers.ts +527 -0
- package/src/utils/icons.ts +73 -0
- package/src/utils/plugins.ts +20 -0
- package/src/utils/ssr.ts +6 -0
- package/src/utils/vue-augmentation.ts +35 -0
|
@@ -0,0 +1,1647 @@
|
|
|
1
|
+
/*! Buefy v1.0.2 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
(function (global, factory) {
|
|
3
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
4
|
+
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Autocomplete = {}, global.Vue));
|
|
6
|
+
})(this, (function (exports, vue) { 'use strict';
|
|
7
|
+
|
|
8
|
+
function getValueByPath(obj, path) {
|
|
9
|
+
return path.split(".").reduce((o, i) => o ? o[i] : null, obj);
|
|
10
|
+
}
|
|
11
|
+
function removeElement(el) {
|
|
12
|
+
if (typeof el.remove !== "undefined") {
|
|
13
|
+
el.remove();
|
|
14
|
+
} else if (typeof el.parentNode !== "undefined" && el.parentNode !== null) {
|
|
15
|
+
el.parentNode.removeChild(el);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function createAbsoluteElement(el) {
|
|
19
|
+
const root = document.createElement("div");
|
|
20
|
+
root.style.position = "absolute";
|
|
21
|
+
root.style.left = "0px";
|
|
22
|
+
root.style.top = "0px";
|
|
23
|
+
root.style.width = "100%";
|
|
24
|
+
const wrapper = document.createElement("div");
|
|
25
|
+
root.appendChild(wrapper);
|
|
26
|
+
wrapper.appendChild(el);
|
|
27
|
+
document.body.appendChild(root);
|
|
28
|
+
return root;
|
|
29
|
+
}
|
|
30
|
+
function toCssWidth(width) {
|
|
31
|
+
return width === void 0 ? null : isNaN(+width) ? `${width}` : width + "px";
|
|
32
|
+
}
|
|
33
|
+
function isCustomElement(vm) {
|
|
34
|
+
return vm.$root != null && "shadowRoot" in vm.$root.$options;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let config = {
|
|
38
|
+
defaultIconPack: "mdi",
|
|
39
|
+
defaultIconComponent: null,
|
|
40
|
+
defaultLocale: void 0,
|
|
41
|
+
defaultInputAutocomplete: "on",
|
|
42
|
+
defaultInputHasCounter: true,
|
|
43
|
+
defaultCompatFallthrough: true,
|
|
44
|
+
defaultUseHtml5Validation: true,
|
|
45
|
+
defaultStatusIcon: true};
|
|
46
|
+
|
|
47
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
48
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
49
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
50
|
+
var __objRest = (source, exclude) => {
|
|
51
|
+
var target = {};
|
|
52
|
+
for (var prop in source)
|
|
53
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
54
|
+
target[prop] = source[prop];
|
|
55
|
+
if (source != null && __getOwnPropSymbols)
|
|
56
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
57
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
58
|
+
target[prop] = source[prop];
|
|
59
|
+
}
|
|
60
|
+
return target;
|
|
61
|
+
};
|
|
62
|
+
var CompatFallthroughMixin = vue.defineComponent({
|
|
63
|
+
inheritAttrs: false,
|
|
64
|
+
props: {
|
|
65
|
+
compatFallthrough: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: () => config.defaultCompatFallthrough
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
computed: {
|
|
71
|
+
rootAttrs() {
|
|
72
|
+
return this.compatFallthrough ? {
|
|
73
|
+
class: this.$attrs.class,
|
|
74
|
+
style: this.$attrs.style,
|
|
75
|
+
id: this.$attrs.id
|
|
76
|
+
} : {};
|
|
77
|
+
},
|
|
78
|
+
fallthroughAttrs() {
|
|
79
|
+
if (this.compatFallthrough) {
|
|
80
|
+
const _a = this.$attrs, { style: _1, class: _2, id: _3 } = _a, rest = __objRest(_a, ["style", "class", "id"]);
|
|
81
|
+
return rest;
|
|
82
|
+
} else {
|
|
83
|
+
return this.$attrs;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
var _export_sfc = (sfc, props) => {
|
|
90
|
+
const target = sfc.__vccOpts || sfc;
|
|
91
|
+
for (const [key, val] of props) {
|
|
92
|
+
target[key] = val;
|
|
93
|
+
}
|
|
94
|
+
return target;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const FormElementMixin = vue.defineComponent({
|
|
98
|
+
props: {
|
|
99
|
+
size: String,
|
|
100
|
+
expanded: Boolean,
|
|
101
|
+
loading: Boolean,
|
|
102
|
+
rounded: Boolean,
|
|
103
|
+
icon: String,
|
|
104
|
+
iconPack: String,
|
|
105
|
+
maxlength: [Number, String],
|
|
106
|
+
useHtml5Validation: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: () => config.defaultUseHtml5Validation
|
|
109
|
+
},
|
|
110
|
+
validationMessage: String,
|
|
111
|
+
locale: {
|
|
112
|
+
type: [String, Array],
|
|
113
|
+
default: () => {
|
|
114
|
+
return config.defaultLocale;
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
statusIcon: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: () => {
|
|
120
|
+
return config.defaultStatusIcon;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
emits: {
|
|
125
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
126
|
+
blur: (event) => true,
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
128
|
+
focus: (event) => true
|
|
129
|
+
},
|
|
130
|
+
data() {
|
|
131
|
+
return {
|
|
132
|
+
isValid: true,
|
|
133
|
+
isFocused: false,
|
|
134
|
+
newIconPack: this.iconPack || config.defaultIconPack,
|
|
135
|
+
// host component must override this
|
|
136
|
+
_elementRef: ""
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
computed: {
|
|
140
|
+
/*
|
|
141
|
+
* Find parent Field, max 3 levels deep.
|
|
142
|
+
*/
|
|
143
|
+
parentField() {
|
|
144
|
+
let parent = this.$parent;
|
|
145
|
+
for (let i = 0; i < 3; i++) {
|
|
146
|
+
if (parent && !parent.$data._isField) {
|
|
147
|
+
parent = parent.$parent;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return parent;
|
|
151
|
+
},
|
|
152
|
+
/*
|
|
153
|
+
* Get the type prop from parent if it's a Field.
|
|
154
|
+
*/
|
|
155
|
+
statusType() {
|
|
156
|
+
const { newType } = this.parentField || {};
|
|
157
|
+
if (!newType) return;
|
|
158
|
+
if (typeof newType === "string") {
|
|
159
|
+
return newType;
|
|
160
|
+
} else {
|
|
161
|
+
for (const key in newType) {
|
|
162
|
+
if (newType[key]) {
|
|
163
|
+
return key;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return void 0;
|
|
168
|
+
},
|
|
169
|
+
/*
|
|
170
|
+
* Get the message prop from parent if it's a Field.
|
|
171
|
+
*/
|
|
172
|
+
statusMessage() {
|
|
173
|
+
if (!this.parentField) return;
|
|
174
|
+
return this.parentField.newMessage || this.parentField.$slots.message;
|
|
175
|
+
},
|
|
176
|
+
/*
|
|
177
|
+
* Fix icon size for inputs, large was too big
|
|
178
|
+
*/
|
|
179
|
+
iconSize() {
|
|
180
|
+
switch (this.size) {
|
|
181
|
+
case "is-small":
|
|
182
|
+
return this.size;
|
|
183
|
+
case "is-medium":
|
|
184
|
+
return;
|
|
185
|
+
case "is-large":
|
|
186
|
+
return this.newIconPack === "mdi" ? "is-medium" : "";
|
|
187
|
+
}
|
|
188
|
+
return void 0;
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
methods: {
|
|
192
|
+
/*
|
|
193
|
+
* Focus method that work dynamically depending on the component.
|
|
194
|
+
*/
|
|
195
|
+
focus() {
|
|
196
|
+
const el = this.getElement();
|
|
197
|
+
if (el === void 0) return;
|
|
198
|
+
this.$nextTick(() => {
|
|
199
|
+
if (el) el.focus();
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
onBlur($event) {
|
|
203
|
+
this.isFocused = false;
|
|
204
|
+
this.$emit("blur", $event);
|
|
205
|
+
this.checkHtml5Validity();
|
|
206
|
+
},
|
|
207
|
+
onFocus($event) {
|
|
208
|
+
this.isFocused = true;
|
|
209
|
+
this.$emit("focus", $event);
|
|
210
|
+
},
|
|
211
|
+
getElement() {
|
|
212
|
+
let el = this.$refs[this.$data._elementRef];
|
|
213
|
+
while (el != null && typeof el === "object" && "$refs" in el) {
|
|
214
|
+
const form = el;
|
|
215
|
+
el = form.$refs[form.$data._elementRef];
|
|
216
|
+
}
|
|
217
|
+
return el;
|
|
218
|
+
},
|
|
219
|
+
setInvalid() {
|
|
220
|
+
const type = "is-danger";
|
|
221
|
+
const message = this.validationMessage || this.getElement().validationMessage;
|
|
222
|
+
this.setValidity(type, message);
|
|
223
|
+
},
|
|
224
|
+
setValidity(type, message) {
|
|
225
|
+
this.$nextTick(() => {
|
|
226
|
+
if (this.parentField) {
|
|
227
|
+
if (!this.parentField.type) {
|
|
228
|
+
this.parentField.newType = type;
|
|
229
|
+
}
|
|
230
|
+
if (!this.parentField.message) {
|
|
231
|
+
this.parentField.newMessage = message;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
},
|
|
236
|
+
/*
|
|
237
|
+
* Check HTML5 validation, set isValid property.
|
|
238
|
+
* If validation fail, send 'is-danger' type,
|
|
239
|
+
* and error message to parent if it's a Field.
|
|
240
|
+
*/
|
|
241
|
+
checkHtml5Validity() {
|
|
242
|
+
if (!this.useHtml5Validation) {
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
const el = this.getElement();
|
|
246
|
+
if (el == null) {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
if (!el.checkValidity()) {
|
|
250
|
+
this.setInvalid();
|
|
251
|
+
this.isValid = false;
|
|
252
|
+
} else {
|
|
253
|
+
this.setValidity(null, null);
|
|
254
|
+
this.isValid = true;
|
|
255
|
+
}
|
|
256
|
+
return this.isValid;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
const mdiIcons = {
|
|
262
|
+
sizes: {
|
|
263
|
+
default: "mdi-24px",
|
|
264
|
+
"is-small": null,
|
|
265
|
+
"is-medium": "mdi-36px",
|
|
266
|
+
"is-large": "mdi-48px"
|
|
267
|
+
},
|
|
268
|
+
iconPrefix: "mdi-"
|
|
269
|
+
};
|
|
270
|
+
const faIcons = () => {
|
|
271
|
+
const faIconPrefix = "fa-";
|
|
272
|
+
return {
|
|
273
|
+
sizes: {
|
|
274
|
+
default: null,
|
|
275
|
+
"is-small": null,
|
|
276
|
+
"is-medium": faIconPrefix + "lg",
|
|
277
|
+
"is-large": faIconPrefix + "2x"
|
|
278
|
+
},
|
|
279
|
+
iconPrefix: faIconPrefix,
|
|
280
|
+
internalIcons: {
|
|
281
|
+
information: "info-circle",
|
|
282
|
+
alert: "exclamation-triangle",
|
|
283
|
+
"alert-circle": "exclamation-circle",
|
|
284
|
+
"chevron-right": "angle-right",
|
|
285
|
+
"chevron-left": "angle-left",
|
|
286
|
+
"chevron-down": "angle-down",
|
|
287
|
+
"eye-off": "eye-slash",
|
|
288
|
+
"menu-down": "caret-down",
|
|
289
|
+
"menu-up": "caret-up",
|
|
290
|
+
"close-circle": "times-circle"
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
const getIcons = () => {
|
|
295
|
+
let icons = {
|
|
296
|
+
mdi: mdiIcons,
|
|
297
|
+
fa: faIcons(),
|
|
298
|
+
fas: faIcons(),
|
|
299
|
+
far: faIcons(),
|
|
300
|
+
fad: faIcons(),
|
|
301
|
+
fab: faIcons(),
|
|
302
|
+
fal: faIcons(),
|
|
303
|
+
"fa-solid": faIcons(),
|
|
304
|
+
"fa-regular": faIcons(),
|
|
305
|
+
"fa-light": faIcons(),
|
|
306
|
+
"fa-thin": faIcons(),
|
|
307
|
+
"fa-duotone": faIcons(),
|
|
308
|
+
"fa-brands": faIcons()
|
|
309
|
+
};
|
|
310
|
+
return icons;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
var _sfc_main$2 = vue.defineComponent({
|
|
314
|
+
name: "BIcon",
|
|
315
|
+
props: {
|
|
316
|
+
type: [String, Object],
|
|
317
|
+
component: String,
|
|
318
|
+
pack: String,
|
|
319
|
+
icon: {
|
|
320
|
+
type: String,
|
|
321
|
+
required: true
|
|
322
|
+
},
|
|
323
|
+
size: String,
|
|
324
|
+
customSize: String,
|
|
325
|
+
customClass: String,
|
|
326
|
+
both: Boolean
|
|
327
|
+
// This is used internally to show both MDI and FA icon
|
|
328
|
+
},
|
|
329
|
+
computed: {
|
|
330
|
+
iconConfig() {
|
|
331
|
+
const allIcons = getIcons();
|
|
332
|
+
return allIcons[this.newPack];
|
|
333
|
+
},
|
|
334
|
+
iconPrefix() {
|
|
335
|
+
if (this.iconConfig && this.iconConfig.iconPrefix) {
|
|
336
|
+
return this.iconConfig.iconPrefix;
|
|
337
|
+
}
|
|
338
|
+
return "";
|
|
339
|
+
},
|
|
340
|
+
/*
|
|
341
|
+
* Internal icon name based on the pack.
|
|
342
|
+
* If pack is 'fa', gets the equivalent FA icon name of the MDI,
|
|
343
|
+
* internal icons are always MDI.
|
|
344
|
+
*/
|
|
345
|
+
newIcon() {
|
|
346
|
+
return `${this.iconPrefix}${this.getEquivalentIconOf(this.icon)}`;
|
|
347
|
+
},
|
|
348
|
+
newPack() {
|
|
349
|
+
return this.pack || config.defaultIconPack;
|
|
350
|
+
},
|
|
351
|
+
newType() {
|
|
352
|
+
if (!this.type) return;
|
|
353
|
+
let splitType = [];
|
|
354
|
+
if (typeof this.type === "string") {
|
|
355
|
+
splitType = this.type.split("-");
|
|
356
|
+
} else {
|
|
357
|
+
for (const key in this.type) {
|
|
358
|
+
if (this.type[key]) {
|
|
359
|
+
splitType = key.split("-");
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
if (splitType.length <= 1) return;
|
|
365
|
+
const [, ...type] = splitType;
|
|
366
|
+
return `has-text-${type.join("-")}`;
|
|
367
|
+
},
|
|
368
|
+
newCustomSize() {
|
|
369
|
+
return this.customSize || this.customSizeByPack;
|
|
370
|
+
},
|
|
371
|
+
customSizeByPack() {
|
|
372
|
+
if (this.iconConfig && this.iconConfig.sizes) {
|
|
373
|
+
if (this.size && this.iconConfig.sizes[this.size] !== void 0) {
|
|
374
|
+
return this.iconConfig.sizes[this.size];
|
|
375
|
+
} else if (this.iconConfig.sizes.default) {
|
|
376
|
+
return this.iconConfig.sizes.default;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
return null;
|
|
380
|
+
},
|
|
381
|
+
useIconComponent() {
|
|
382
|
+
return this.component || config.defaultIconComponent;
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
methods: {
|
|
386
|
+
/*
|
|
387
|
+
* Equivalent icon name of the MDI.
|
|
388
|
+
*/
|
|
389
|
+
getEquivalentIconOf(value) {
|
|
390
|
+
if (!this.both) {
|
|
391
|
+
return value;
|
|
392
|
+
}
|
|
393
|
+
if (this.iconConfig == null) {
|
|
394
|
+
return value;
|
|
395
|
+
}
|
|
396
|
+
const maybeInternal = this.iconConfig;
|
|
397
|
+
if (maybeInternal && maybeInternal.internalIcons && maybeInternal.internalIcons[value]) {
|
|
398
|
+
return maybeInternal.internalIcons[value];
|
|
399
|
+
}
|
|
400
|
+
return value;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
406
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
407
|
+
"span",
|
|
408
|
+
{
|
|
409
|
+
class: vue.normalizeClass(["icon", [_ctx.newType, _ctx.size]])
|
|
410
|
+
},
|
|
411
|
+
[
|
|
412
|
+
!_ctx.useIconComponent ? (vue.openBlock(), vue.createElementBlock(
|
|
413
|
+
"i",
|
|
414
|
+
{
|
|
415
|
+
key: 0,
|
|
416
|
+
class: vue.normalizeClass([_ctx.newPack, _ctx.newIcon, _ctx.newCustomSize, _ctx.customClass])
|
|
417
|
+
},
|
|
418
|
+
null,
|
|
419
|
+
2
|
|
420
|
+
/* CLASS */
|
|
421
|
+
)) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.useIconComponent), {
|
|
422
|
+
key: 1,
|
|
423
|
+
icon: [_ctx.newPack, _ctx.newIcon],
|
|
424
|
+
size: _ctx.newCustomSize,
|
|
425
|
+
class: vue.normalizeClass([_ctx.customClass])
|
|
426
|
+
}, null, 8, ["icon", "size", "class"]))
|
|
427
|
+
],
|
|
428
|
+
2
|
|
429
|
+
/* CLASS */
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
var BIcon = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
433
|
+
|
|
434
|
+
var _sfc_main$1 = vue.defineComponent({
|
|
435
|
+
name: "BInput",
|
|
436
|
+
components: { BIcon },
|
|
437
|
+
mixins: [CompatFallthroughMixin, FormElementMixin],
|
|
438
|
+
props: {
|
|
439
|
+
modelValue: {
|
|
440
|
+
type: [Number, String]
|
|
441
|
+
},
|
|
442
|
+
type: {
|
|
443
|
+
type: String,
|
|
444
|
+
default: "text"
|
|
445
|
+
},
|
|
446
|
+
lazy: {
|
|
447
|
+
type: Boolean,
|
|
448
|
+
default: false
|
|
449
|
+
},
|
|
450
|
+
passwordReveal: Boolean,
|
|
451
|
+
iconClickable: Boolean,
|
|
452
|
+
hasCounter: {
|
|
453
|
+
type: Boolean,
|
|
454
|
+
default: () => config.defaultInputHasCounter
|
|
455
|
+
},
|
|
456
|
+
customClass: {
|
|
457
|
+
type: String,
|
|
458
|
+
default: ""
|
|
459
|
+
},
|
|
460
|
+
iconRight: String,
|
|
461
|
+
iconRightClickable: Boolean,
|
|
462
|
+
iconRightType: String,
|
|
463
|
+
// Native options to use in HTML5 validation
|
|
464
|
+
autocomplete: String
|
|
465
|
+
},
|
|
466
|
+
emits: {
|
|
467
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
468
|
+
"icon-click": (event) => true,
|
|
469
|
+
"icon-right-click": (event) => true,
|
|
470
|
+
"update:modelValue": (value) => true
|
|
471
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
472
|
+
},
|
|
473
|
+
data() {
|
|
474
|
+
return {
|
|
475
|
+
newValue: this.modelValue,
|
|
476
|
+
newType: this.type,
|
|
477
|
+
newAutocomplete: this.autocomplete || config.defaultInputAutocomplete,
|
|
478
|
+
isPasswordVisible: false,
|
|
479
|
+
_elementRef: this.type === "textarea" ? "textarea" : "input"
|
|
480
|
+
};
|
|
481
|
+
},
|
|
482
|
+
computed: {
|
|
483
|
+
computedValue: {
|
|
484
|
+
get() {
|
|
485
|
+
return this.newValue;
|
|
486
|
+
},
|
|
487
|
+
set(value) {
|
|
488
|
+
this.newValue = value;
|
|
489
|
+
this.$emit("update:modelValue", value);
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
rootClasses() {
|
|
493
|
+
return [
|
|
494
|
+
this.iconPosition,
|
|
495
|
+
this.size,
|
|
496
|
+
{
|
|
497
|
+
"is-expanded": this.expanded,
|
|
498
|
+
"is-loading": this.loading,
|
|
499
|
+
"is-clearfix": !this.hasMessage
|
|
500
|
+
}
|
|
501
|
+
];
|
|
502
|
+
},
|
|
503
|
+
inputClasses() {
|
|
504
|
+
return [
|
|
505
|
+
this.statusType,
|
|
506
|
+
this.size,
|
|
507
|
+
{ "is-rounded": this.rounded }
|
|
508
|
+
];
|
|
509
|
+
},
|
|
510
|
+
hasIconRight() {
|
|
511
|
+
return this.passwordReveal || this.loading || this.statusIcon && this.statusTypeIcon || this.iconRight;
|
|
512
|
+
},
|
|
513
|
+
rightIcon() {
|
|
514
|
+
if (this.passwordReveal) {
|
|
515
|
+
return this.passwordVisibleIcon;
|
|
516
|
+
} else if (this.iconRight) {
|
|
517
|
+
return this.iconRight;
|
|
518
|
+
}
|
|
519
|
+
return this.statusTypeIcon;
|
|
520
|
+
},
|
|
521
|
+
rightIconType() {
|
|
522
|
+
if (this.passwordReveal) {
|
|
523
|
+
return "is-primary";
|
|
524
|
+
} else if (this.iconRight) {
|
|
525
|
+
return this.iconRightType || void 0;
|
|
526
|
+
}
|
|
527
|
+
return this.statusType;
|
|
528
|
+
},
|
|
529
|
+
/*
|
|
530
|
+
* Position of the icon or if it's both sides.
|
|
531
|
+
*/
|
|
532
|
+
iconPosition() {
|
|
533
|
+
let iconClasses = "";
|
|
534
|
+
if (this.icon) {
|
|
535
|
+
iconClasses += "has-icons-left ";
|
|
536
|
+
}
|
|
537
|
+
if (this.hasIconRight) {
|
|
538
|
+
iconClasses += "has-icons-right";
|
|
539
|
+
}
|
|
540
|
+
return iconClasses;
|
|
541
|
+
},
|
|
542
|
+
/*
|
|
543
|
+
* Icon name (MDI) based on the type.
|
|
544
|
+
*/
|
|
545
|
+
statusTypeIcon() {
|
|
546
|
+
switch (this.statusType) {
|
|
547
|
+
case "is-success":
|
|
548
|
+
return "check";
|
|
549
|
+
case "is-danger":
|
|
550
|
+
return "alert-circle";
|
|
551
|
+
case "is-info":
|
|
552
|
+
return "information";
|
|
553
|
+
case "is-warning":
|
|
554
|
+
return "alert";
|
|
555
|
+
default:
|
|
556
|
+
return void 0;
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
/*
|
|
560
|
+
* Check if have any message prop from parent if it's a Field.
|
|
561
|
+
*/
|
|
562
|
+
hasMessage() {
|
|
563
|
+
return !!this.statusMessage;
|
|
564
|
+
},
|
|
565
|
+
/*
|
|
566
|
+
* Current password-reveal icon name.
|
|
567
|
+
*/
|
|
568
|
+
passwordVisibleIcon() {
|
|
569
|
+
return !this.isPasswordVisible ? "eye" : "eye-off";
|
|
570
|
+
},
|
|
571
|
+
/*
|
|
572
|
+
* Get value length
|
|
573
|
+
*/
|
|
574
|
+
valueLength() {
|
|
575
|
+
if (typeof this.computedValue === "string") {
|
|
576
|
+
return Array.from(this.computedValue).length;
|
|
577
|
+
} else if (typeof this.computedValue === "number") {
|
|
578
|
+
return this.computedValue.toString().length;
|
|
579
|
+
}
|
|
580
|
+
return 0;
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
watch: {
|
|
584
|
+
/*
|
|
585
|
+
* When v-model is changed:
|
|
586
|
+
* 1. Set internal value.
|
|
587
|
+
* 2. Validate it if the value came from outside;
|
|
588
|
+
* i.e., not equal to computedValue
|
|
589
|
+
*/
|
|
590
|
+
modelValue(value) {
|
|
591
|
+
const fromOutside = this.computedValue != value;
|
|
592
|
+
this.newValue = value;
|
|
593
|
+
if (fromOutside) {
|
|
594
|
+
this.$nextTick(() => {
|
|
595
|
+
!this.isValid && this.checkHtml5Validity();
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
type(type) {
|
|
600
|
+
this.newType = type;
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
methods: {
|
|
604
|
+
/*
|
|
605
|
+
* Toggle the visibility of a password-reveal input
|
|
606
|
+
* by changing the type and focus the input right away.
|
|
607
|
+
*/
|
|
608
|
+
togglePasswordVisibility() {
|
|
609
|
+
this.isPasswordVisible = !this.isPasswordVisible;
|
|
610
|
+
this.newType = this.isPasswordVisible ? "text" : "password";
|
|
611
|
+
this.$nextTick(() => {
|
|
612
|
+
this.focus();
|
|
613
|
+
});
|
|
614
|
+
},
|
|
615
|
+
iconClick(emit, event) {
|
|
616
|
+
this.$emit(emit, event);
|
|
617
|
+
this.$nextTick(() => {
|
|
618
|
+
this.focus();
|
|
619
|
+
});
|
|
620
|
+
},
|
|
621
|
+
rightIconClick(event) {
|
|
622
|
+
if (this.passwordReveal) {
|
|
623
|
+
this.togglePasswordVisibility();
|
|
624
|
+
} else if (this.iconRightClickable) {
|
|
625
|
+
this.iconClick("icon-right-click", event);
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
onInput() {
|
|
629
|
+
if (!this.lazy) {
|
|
630
|
+
this.revalidate();
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
onChange() {
|
|
634
|
+
if (this.lazy) {
|
|
635
|
+
this.revalidate();
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
revalidate() {
|
|
639
|
+
!this.isValid && this.checkHtml5Validity();
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
});
|
|
643
|
+
|
|
644
|
+
const _hoisted_1$1 = ["type", "autocomplete", "maxlength"];
|
|
645
|
+
const _hoisted_2$1 = ["maxlength"];
|
|
646
|
+
const _hoisted_3$1 = ["type", "autocomplete", "maxlength"];
|
|
647
|
+
const _hoisted_4$1 = ["maxlength"];
|
|
648
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
649
|
+
const _component_b_icon = vue.resolveComponent("b-icon");
|
|
650
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
651
|
+
"div",
|
|
652
|
+
vue.mergeProps({
|
|
653
|
+
class: ["control", _ctx.rootClasses]
|
|
654
|
+
}, _ctx.rootAttrs),
|
|
655
|
+
[
|
|
656
|
+
_ctx.lazy ? (vue.openBlock(), vue.createElementBlock(
|
|
657
|
+
vue.Fragment,
|
|
658
|
+
{ key: 0 },
|
|
659
|
+
[
|
|
660
|
+
_ctx.type !== "textarea" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
|
|
661
|
+
key: 0,
|
|
662
|
+
ref: "input",
|
|
663
|
+
class: ["input", [_ctx.inputClasses, _ctx.customClass]],
|
|
664
|
+
type: _ctx.newType,
|
|
665
|
+
autocomplete: _ctx.newAutocomplete,
|
|
666
|
+
maxlength: _ctx.maxlength,
|
|
667
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.computedValue = $event)
|
|
668
|
+
}, _ctx.fallthroughAttrs, {
|
|
669
|
+
onInput: _cache[1] || (_cache[1] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
|
|
670
|
+
onChange: _cache[2] || (_cache[2] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
|
|
671
|
+
onBlur: _cache[3] || (_cache[3] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
|
|
672
|
+
onFocus: _cache[4] || (_cache[4] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
|
|
673
|
+
}), null, 16, _hoisted_1$1)), [
|
|
674
|
+
[
|
|
675
|
+
vue.vModelDynamic,
|
|
676
|
+
_ctx.computedValue,
|
|
677
|
+
void 0,
|
|
678
|
+
{ lazy: true }
|
|
679
|
+
]
|
|
680
|
+
]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", vue.mergeProps({
|
|
681
|
+
key: 1,
|
|
682
|
+
ref: "textarea",
|
|
683
|
+
class: ["textarea", [_ctx.inputClasses, _ctx.customClass]],
|
|
684
|
+
maxlength: _ctx.maxlength,
|
|
685
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.computedValue = $event)
|
|
686
|
+
}, _ctx.fallthroughAttrs, {
|
|
687
|
+
onInput: _cache[6] || (_cache[6] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
|
|
688
|
+
onChange: _cache[7] || (_cache[7] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
|
|
689
|
+
onBlur: _cache[8] || (_cache[8] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
|
|
690
|
+
onFocus: _cache[9] || (_cache[9] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
|
|
691
|
+
}), null, 16, _hoisted_2$1)), [
|
|
692
|
+
[
|
|
693
|
+
vue.vModelText,
|
|
694
|
+
_ctx.computedValue,
|
|
695
|
+
void 0,
|
|
696
|
+
{ lazy: true }
|
|
697
|
+
]
|
|
698
|
+
])
|
|
699
|
+
],
|
|
700
|
+
64
|
|
701
|
+
/* STABLE_FRAGMENT */
|
|
702
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
703
|
+
vue.Fragment,
|
|
704
|
+
{ key: 1 },
|
|
705
|
+
[
|
|
706
|
+
_ctx.type !== "textarea" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
|
|
707
|
+
key: 0,
|
|
708
|
+
ref: "input",
|
|
709
|
+
class: ["input", [_ctx.inputClasses, _ctx.customClass]],
|
|
710
|
+
type: _ctx.newType,
|
|
711
|
+
autocomplete: _ctx.newAutocomplete,
|
|
712
|
+
maxlength: _ctx.maxlength,
|
|
713
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => _ctx.computedValue = $event)
|
|
714
|
+
}, _ctx.fallthroughAttrs, {
|
|
715
|
+
onInput: _cache[11] || (_cache[11] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
|
|
716
|
+
onChange: _cache[12] || (_cache[12] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
|
|
717
|
+
onBlur: _cache[13] || (_cache[13] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
|
|
718
|
+
onFocus: _cache[14] || (_cache[14] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
|
|
719
|
+
}), null, 16, _hoisted_3$1)), [
|
|
720
|
+
[vue.vModelDynamic, _ctx.computedValue]
|
|
721
|
+
]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", vue.mergeProps({
|
|
722
|
+
key: 1,
|
|
723
|
+
ref: "textarea",
|
|
724
|
+
class: ["textarea", [_ctx.inputClasses, _ctx.customClass]],
|
|
725
|
+
maxlength: _ctx.maxlength,
|
|
726
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.computedValue = $event)
|
|
727
|
+
}, _ctx.fallthroughAttrs, {
|
|
728
|
+
onInput: _cache[16] || (_cache[16] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
|
|
729
|
+
onChange: _cache[17] || (_cache[17] = (...args) => _ctx.onChange && _ctx.onChange(...args)),
|
|
730
|
+
onBlur: _cache[18] || (_cache[18] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
|
|
731
|
+
onFocus: _cache[19] || (_cache[19] = (...args) => _ctx.onFocus && _ctx.onFocus(...args))
|
|
732
|
+
}), null, 16, _hoisted_4$1)), [
|
|
733
|
+
[vue.vModelText, _ctx.computedValue]
|
|
734
|
+
])
|
|
735
|
+
],
|
|
736
|
+
64
|
|
737
|
+
/* STABLE_FRAGMENT */
|
|
738
|
+
)),
|
|
739
|
+
_ctx.icon ? (vue.openBlock(), vue.createBlock(_component_b_icon, {
|
|
740
|
+
key: 2,
|
|
741
|
+
class: vue.normalizeClass(["is-left", { "is-clickable": _ctx.iconClickable }]),
|
|
742
|
+
icon: _ctx.icon,
|
|
743
|
+
pack: _ctx.iconPack,
|
|
744
|
+
size: _ctx.iconSize,
|
|
745
|
+
onClick: _cache[20] || (_cache[20] = ($event) => _ctx.iconClick("icon-click", $event))
|
|
746
|
+
}, null, 8, ["class", "icon", "pack", "size"])) : vue.createCommentVNode("v-if", true),
|
|
747
|
+
!_ctx.loading && _ctx.hasIconRight && _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_b_icon, {
|
|
748
|
+
key: 3,
|
|
749
|
+
class: vue.normalizeClass(["is-right", { "is-clickable": _ctx.passwordReveal || _ctx.iconRightClickable }]),
|
|
750
|
+
icon: _ctx.rightIcon,
|
|
751
|
+
pack: _ctx.iconPack,
|
|
752
|
+
size: _ctx.iconSize,
|
|
753
|
+
type: _ctx.rightIconType,
|
|
754
|
+
both: "",
|
|
755
|
+
onClick: _ctx.rightIconClick
|
|
756
|
+
}, null, 8, ["class", "icon", "pack", "size", "type", "onClick"])) : vue.createCommentVNode("v-if", true),
|
|
757
|
+
_ctx.maxlength && _ctx.hasCounter && _ctx.type !== "number" ? (vue.openBlock(), vue.createElementBlock(
|
|
758
|
+
"small",
|
|
759
|
+
{
|
|
760
|
+
key: 4,
|
|
761
|
+
class: vue.normalizeClass(["help counter", { "is-invisible": !_ctx.isFocused }])
|
|
762
|
+
},
|
|
763
|
+
vue.toDisplayString(_ctx.valueLength) + " / " + vue.toDisplayString(_ctx.maxlength),
|
|
764
|
+
3
|
|
765
|
+
/* TEXT, CLASS */
|
|
766
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
767
|
+
],
|
|
768
|
+
16
|
|
769
|
+
/* FULL_PROPS */
|
|
770
|
+
);
|
|
771
|
+
}
|
|
772
|
+
var BInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
773
|
+
|
|
774
|
+
var _sfc_main = vue.defineComponent({
|
|
775
|
+
name: "BAutocomplete",
|
|
776
|
+
components: { BInput },
|
|
777
|
+
mixins: [CompatFallthroughMixin, FormElementMixin],
|
|
778
|
+
props: {
|
|
779
|
+
modelValue: [Number, String, null],
|
|
780
|
+
data: {
|
|
781
|
+
type: Array,
|
|
782
|
+
default: () => []
|
|
783
|
+
},
|
|
784
|
+
field: {
|
|
785
|
+
type: String,
|
|
786
|
+
default: "value"
|
|
787
|
+
},
|
|
788
|
+
keepFirst: Boolean,
|
|
789
|
+
clearOnSelect: Boolean,
|
|
790
|
+
openOnFocus: Boolean,
|
|
791
|
+
customFormatter: {
|
|
792
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
793
|
+
type: Function
|
|
794
|
+
},
|
|
795
|
+
checkInfiniteScroll: Boolean,
|
|
796
|
+
keepOpen: Boolean,
|
|
797
|
+
selectOnClickOutside: Boolean,
|
|
798
|
+
clearable: Boolean,
|
|
799
|
+
maxHeight: [String, Number],
|
|
800
|
+
dropdownPosition: {
|
|
801
|
+
type: String,
|
|
802
|
+
default: "auto"
|
|
803
|
+
},
|
|
804
|
+
groupField: String,
|
|
805
|
+
groupOptions: String,
|
|
806
|
+
iconRight: String,
|
|
807
|
+
iconRightClickable: Boolean,
|
|
808
|
+
appendToBody: Boolean,
|
|
809
|
+
type: {
|
|
810
|
+
type: String,
|
|
811
|
+
default: "text"
|
|
812
|
+
},
|
|
813
|
+
confirmKeys: {
|
|
814
|
+
type: Array,
|
|
815
|
+
default: () => ["Tab", "Enter"]
|
|
816
|
+
},
|
|
817
|
+
selectableHeader: Boolean,
|
|
818
|
+
selectableFooter: Boolean,
|
|
819
|
+
// Native options to use in HTML5 validation
|
|
820
|
+
autocomplete: String
|
|
821
|
+
},
|
|
822
|
+
emits: {
|
|
823
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */
|
|
824
|
+
active: (active) => true,
|
|
825
|
+
blur: (event) => true,
|
|
826
|
+
focus: (event) => true,
|
|
827
|
+
"icon-click": (event) => true,
|
|
828
|
+
"icon-right-click": (event) => true,
|
|
829
|
+
"infinite-scroll": () => true,
|
|
830
|
+
select: (selected, event) => true,
|
|
831
|
+
"select-footer": (event) => true,
|
|
832
|
+
"select-header": (event) => true,
|
|
833
|
+
typing: (value) => true,
|
|
834
|
+
"update:modelValue": (value) => true
|
|
835
|
+
/* eslint-enable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */
|
|
836
|
+
},
|
|
837
|
+
data() {
|
|
838
|
+
return {
|
|
839
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
840
|
+
selected: null,
|
|
841
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
842
|
+
hovered: null,
|
|
843
|
+
headerHovered: null,
|
|
844
|
+
footerHovered: null,
|
|
845
|
+
isActive: false,
|
|
846
|
+
newValue: this.modelValue,
|
|
847
|
+
newAutocomplete: this.autocomplete || "off",
|
|
848
|
+
ariaAutocomplete: this.keepFirst ? "both" : "list",
|
|
849
|
+
isListInViewportVertically: true,
|
|
850
|
+
hasFocus: false,
|
|
851
|
+
style: {},
|
|
852
|
+
_isAutocomplete: true,
|
|
853
|
+
_elementRef: "input",
|
|
854
|
+
_bodyEl: void 0,
|
|
855
|
+
// Used to append to body
|
|
856
|
+
timeOutID: void 0
|
|
857
|
+
};
|
|
858
|
+
},
|
|
859
|
+
computed: {
|
|
860
|
+
computedData() {
|
|
861
|
+
const { groupField, groupOptions } = this;
|
|
862
|
+
if (groupField) {
|
|
863
|
+
if (groupOptions) {
|
|
864
|
+
const newData = [];
|
|
865
|
+
this.data.forEach((option) => {
|
|
866
|
+
const group = getValueByPath(option, groupField);
|
|
867
|
+
const items = getValueByPath(option, groupOptions);
|
|
868
|
+
newData.push({ group, items });
|
|
869
|
+
});
|
|
870
|
+
return newData;
|
|
871
|
+
} else {
|
|
872
|
+
const tmp = {};
|
|
873
|
+
this.data.forEach((option) => {
|
|
874
|
+
const group = getValueByPath(option, groupField);
|
|
875
|
+
if (!tmp[group]) tmp[group] = [];
|
|
876
|
+
tmp[group].push(option);
|
|
877
|
+
});
|
|
878
|
+
const newData = [];
|
|
879
|
+
Object.keys(tmp).forEach((group) => {
|
|
880
|
+
newData.push({ group, items: tmp[group] });
|
|
881
|
+
});
|
|
882
|
+
return newData;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
return [{ items: this.data }];
|
|
886
|
+
},
|
|
887
|
+
isEmpty() {
|
|
888
|
+
if (!this.computedData) return true;
|
|
889
|
+
return !this.computedData.some(
|
|
890
|
+
(element) => element.items && element.items.length
|
|
891
|
+
);
|
|
892
|
+
},
|
|
893
|
+
/*
|
|
894
|
+
* White-listed items to not close when clicked.
|
|
895
|
+
* Add input, dropdown and all children.
|
|
896
|
+
*/
|
|
897
|
+
whiteList() {
|
|
898
|
+
var _a;
|
|
899
|
+
this.computedData;
|
|
900
|
+
const whiteList = [];
|
|
901
|
+
whiteList.push(this.$refs.input.$el.querySelector("input"));
|
|
902
|
+
whiteList.push(this.$refs.dropdown);
|
|
903
|
+
if (this.$refs.dropdown != null) {
|
|
904
|
+
const children = this.$refs.dropdown.querySelectorAll("*");
|
|
905
|
+
for (const child of children) {
|
|
906
|
+
whiteList.push(child);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
if (((_a = this.$parent) == null ? void 0 : _a.$data)._isTaginput) {
|
|
910
|
+
whiteList.push(this.$parent.$el);
|
|
911
|
+
const tagInputChildren = this.$parent.$el.querySelectorAll("*");
|
|
912
|
+
for (const tagInputChild of tagInputChildren) {
|
|
913
|
+
whiteList.push(tagInputChild);
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
return whiteList;
|
|
917
|
+
},
|
|
918
|
+
/*
|
|
919
|
+
* Check if exists default slot
|
|
920
|
+
*/
|
|
921
|
+
hasDefaultSlot() {
|
|
922
|
+
return !!this.$slots.default;
|
|
923
|
+
},
|
|
924
|
+
/*
|
|
925
|
+
* Check if exists group slot
|
|
926
|
+
*/
|
|
927
|
+
hasGroupSlot() {
|
|
928
|
+
return !!this.$slots.group;
|
|
929
|
+
},
|
|
930
|
+
/*
|
|
931
|
+
* Check if exists "empty" slot
|
|
932
|
+
*/
|
|
933
|
+
hasEmptySlot() {
|
|
934
|
+
return !!this.$slots.empty;
|
|
935
|
+
},
|
|
936
|
+
/*
|
|
937
|
+
* Check if exists "header" slot
|
|
938
|
+
*/
|
|
939
|
+
hasHeaderSlot() {
|
|
940
|
+
return !!this.$slots.header;
|
|
941
|
+
},
|
|
942
|
+
/*
|
|
943
|
+
* Check if exists "footer" slot
|
|
944
|
+
*/
|
|
945
|
+
hasFooterSlot() {
|
|
946
|
+
return !!this.$slots.footer;
|
|
947
|
+
},
|
|
948
|
+
/*
|
|
949
|
+
* Apply dropdownPosition property
|
|
950
|
+
*/
|
|
951
|
+
isOpenedTop() {
|
|
952
|
+
return this.dropdownPosition === "top" || this.dropdownPosition === "auto" && !this.isListInViewportVertically;
|
|
953
|
+
},
|
|
954
|
+
newIconRight() {
|
|
955
|
+
if (this.clearable && this.newValue) {
|
|
956
|
+
return "close-circle";
|
|
957
|
+
}
|
|
958
|
+
return this.iconRight;
|
|
959
|
+
},
|
|
960
|
+
newIconRightClickable() {
|
|
961
|
+
if (this.clearable) {
|
|
962
|
+
return true;
|
|
963
|
+
}
|
|
964
|
+
return this.iconRightClickable;
|
|
965
|
+
},
|
|
966
|
+
contentStyle() {
|
|
967
|
+
return {
|
|
968
|
+
maxHeight: toCssWidth(this.maxHeight) || void 0
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
watch: {
|
|
973
|
+
/*
|
|
974
|
+
* When dropdown is toggled, check the visibility to know when
|
|
975
|
+
* to open upwards.
|
|
976
|
+
*/
|
|
977
|
+
isActive(active) {
|
|
978
|
+
if (this.dropdownPosition === "auto") {
|
|
979
|
+
if (active) {
|
|
980
|
+
this.calcDropdownInViewportVertical();
|
|
981
|
+
} else {
|
|
982
|
+
this.timeOutID = setTimeout(() => {
|
|
983
|
+
this.calcDropdownInViewportVertical();
|
|
984
|
+
}, 100);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
this.$nextTick(() => {
|
|
988
|
+
this.$emit("active", active);
|
|
989
|
+
});
|
|
990
|
+
},
|
|
991
|
+
/*
|
|
992
|
+
* When checkInfiniteScroll property changes scroll event should be removed or added
|
|
993
|
+
*/
|
|
994
|
+
checkInfiniteScroll(checkInfiniteScroll) {
|
|
995
|
+
if (!this.$refs.dropdown) return;
|
|
996
|
+
const list = this.$refs.dropdown.querySelector(
|
|
997
|
+
".dropdown-content"
|
|
998
|
+
);
|
|
999
|
+
if (!list) return;
|
|
1000
|
+
if (checkInfiniteScroll === true) {
|
|
1001
|
+
list.addEventListener(
|
|
1002
|
+
"scroll",
|
|
1003
|
+
this.checkIfReachedTheEndOfScroll
|
|
1004
|
+
);
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
list.removeEventListener(
|
|
1008
|
+
"scroll",
|
|
1009
|
+
this.checkIfReachedTheEndOfScroll
|
|
1010
|
+
);
|
|
1011
|
+
},
|
|
1012
|
+
/*
|
|
1013
|
+
* When updating input's value
|
|
1014
|
+
* 1. Emit changes
|
|
1015
|
+
* 2. If value isn't the same as selected, set null
|
|
1016
|
+
* 3. Close dropdown if value is clear or else open it
|
|
1017
|
+
*/
|
|
1018
|
+
newValue(value) {
|
|
1019
|
+
this.$emit("update:modelValue", value);
|
|
1020
|
+
const currentValue = this.getValue(this.selected);
|
|
1021
|
+
if (currentValue !== void 0 && currentValue !== null && currentValue !== value) {
|
|
1022
|
+
this.setSelected(null, false);
|
|
1023
|
+
}
|
|
1024
|
+
if (this.hasFocus && (!this.openOnFocus || value !== "")) {
|
|
1025
|
+
this.isActive = value !== "" && value !== void 0 && value !== null;
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
/*
|
|
1029
|
+
* When v-model is changed:
|
|
1030
|
+
* 1. Update internal value.
|
|
1031
|
+
* 2. If it's invalid, validate again.
|
|
1032
|
+
*/
|
|
1033
|
+
modelValue(value) {
|
|
1034
|
+
this.newValue = value;
|
|
1035
|
+
},
|
|
1036
|
+
keepFirst(value) {
|
|
1037
|
+
this.ariaAutocomplete = value ? "both" : "list";
|
|
1038
|
+
},
|
|
1039
|
+
/*
|
|
1040
|
+
* Select first option if "keep-first
|
|
1041
|
+
*/
|
|
1042
|
+
data() {
|
|
1043
|
+
if (this.keepFirst) {
|
|
1044
|
+
this.$nextTick(() => {
|
|
1045
|
+
if (this.isActive) {
|
|
1046
|
+
this.selectFirstOption(this.computedData);
|
|
1047
|
+
} else {
|
|
1048
|
+
this.setHovered(null);
|
|
1049
|
+
}
|
|
1050
|
+
});
|
|
1051
|
+
} else {
|
|
1052
|
+
if (this.hovered) {
|
|
1053
|
+
const hoveredValue = this.getValue(this.hovered);
|
|
1054
|
+
const data = this.computedData.map((d) => d.items).reduce((a, b) => [...a, ...b], []);
|
|
1055
|
+
if (!data.some((d) => this.getValue(d) === hoveredValue)) {
|
|
1056
|
+
this.setHovered(null);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
},
|
|
1061
|
+
/*
|
|
1062
|
+
* When appendToBody property changes, handle the transition properly
|
|
1063
|
+
*/
|
|
1064
|
+
appendToBody(newValue, oldValue) {
|
|
1065
|
+
if (newValue && !oldValue) {
|
|
1066
|
+
if (this.isActive && this.$refs.dropdown && !this.$data._bodyEl) {
|
|
1067
|
+
this.$data._bodyEl = createAbsoluteElement(
|
|
1068
|
+
this.$refs.dropdown
|
|
1069
|
+
);
|
|
1070
|
+
this.updateAppendToBody();
|
|
1071
|
+
}
|
|
1072
|
+
} else if (!newValue && oldValue) {
|
|
1073
|
+
if (this.$data._bodyEl) {
|
|
1074
|
+
removeElement(this.$data._bodyEl);
|
|
1075
|
+
this.$data._bodyEl = void 0;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
methods: {
|
|
1081
|
+
/*
|
|
1082
|
+
* Set which option is currently hovered.
|
|
1083
|
+
*/
|
|
1084
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1085
|
+
setHovered(option) {
|
|
1086
|
+
if (option === void 0) return;
|
|
1087
|
+
this.hovered = option;
|
|
1088
|
+
},
|
|
1089
|
+
/*
|
|
1090
|
+
* Set which option is currently selected, update v-model,
|
|
1091
|
+
* update input value and close dropdown.
|
|
1092
|
+
*/
|
|
1093
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1094
|
+
setSelected(option, closeDropdown = true, event) {
|
|
1095
|
+
if (option === void 0) return;
|
|
1096
|
+
this.selected = option;
|
|
1097
|
+
this.$emit("select", this.selected, event);
|
|
1098
|
+
if (this.selected !== null) {
|
|
1099
|
+
if (this.clearOnSelect) {
|
|
1100
|
+
this.newValue = "";
|
|
1101
|
+
} else {
|
|
1102
|
+
this.newValue = this.getValue(this.selected);
|
|
1103
|
+
}
|
|
1104
|
+
this.setHovered(null);
|
|
1105
|
+
}
|
|
1106
|
+
closeDropdown && this.$nextTick(() => {
|
|
1107
|
+
this.isActive = false;
|
|
1108
|
+
});
|
|
1109
|
+
this.checkValidity();
|
|
1110
|
+
},
|
|
1111
|
+
/*
|
|
1112
|
+
* Select first option
|
|
1113
|
+
*/
|
|
1114
|
+
selectFirstOption(computedData) {
|
|
1115
|
+
this.$nextTick(() => {
|
|
1116
|
+
const nonEmptyElements = computedData.filter(
|
|
1117
|
+
(element) => element.items && element.items.length
|
|
1118
|
+
);
|
|
1119
|
+
if (nonEmptyElements.length) {
|
|
1120
|
+
const option = nonEmptyElements[0].items[0];
|
|
1121
|
+
this.setHovered(option);
|
|
1122
|
+
} else {
|
|
1123
|
+
this.setHovered(null);
|
|
1124
|
+
}
|
|
1125
|
+
});
|
|
1126
|
+
},
|
|
1127
|
+
/*
|
|
1128
|
+
* Find index of hovered item in data array by comparing display values
|
|
1129
|
+
* instead of object references. This fixes the bug with computed data
|
|
1130
|
+
* where proxy objects cause indexOf to fail.
|
|
1131
|
+
*/
|
|
1132
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1133
|
+
findHoveredIndex(data) {
|
|
1134
|
+
if (this.hovered === null || this.hovered === void 0) {
|
|
1135
|
+
return -1;
|
|
1136
|
+
}
|
|
1137
|
+
const exactIndex = data.indexOf(this.hovered);
|
|
1138
|
+
if (exactIndex !== -1) {
|
|
1139
|
+
return exactIndex;
|
|
1140
|
+
}
|
|
1141
|
+
const hoveredValue = this.getValue(this.hovered);
|
|
1142
|
+
if (hoveredValue === null || hoveredValue === void 0) {
|
|
1143
|
+
return -1;
|
|
1144
|
+
}
|
|
1145
|
+
return data.findIndex((item) => {
|
|
1146
|
+
if (item === null || item === void 0) {
|
|
1147
|
+
return hoveredValue === null || hoveredValue === void 0;
|
|
1148
|
+
}
|
|
1149
|
+
return this.getValue(item) === hoveredValue;
|
|
1150
|
+
});
|
|
1151
|
+
},
|
|
1152
|
+
keydown(event) {
|
|
1153
|
+
const { key } = event;
|
|
1154
|
+
if (key === "Enter") event.preventDefault();
|
|
1155
|
+
if (key === "Escape" || key === "Tab") {
|
|
1156
|
+
this.isActive = false;
|
|
1157
|
+
}
|
|
1158
|
+
if (this.confirmKeys.indexOf(key) >= 0) {
|
|
1159
|
+
if (key === ",") event.preventDefault();
|
|
1160
|
+
const closeDropdown = !this.keepOpen || key === "Tab";
|
|
1161
|
+
if (this.hovered === null) {
|
|
1162
|
+
this.checkIfHeaderOrFooterSelected(
|
|
1163
|
+
event,
|
|
1164
|
+
null,
|
|
1165
|
+
closeDropdown
|
|
1166
|
+
);
|
|
1167
|
+
return;
|
|
1168
|
+
}
|
|
1169
|
+
this.setSelected(this.hovered, closeDropdown, event);
|
|
1170
|
+
}
|
|
1171
|
+
},
|
|
1172
|
+
selectHeaderOrFoterByClick(event, origin) {
|
|
1173
|
+
this.checkIfHeaderOrFooterSelected(event, { origin });
|
|
1174
|
+
},
|
|
1175
|
+
/*
|
|
1176
|
+
* Check if header or footer was selected.
|
|
1177
|
+
*/
|
|
1178
|
+
checkIfHeaderOrFooterSelected(event, triggerClick, closeDropdown = true) {
|
|
1179
|
+
if (this.selectableHeader && (this.headerHovered || triggerClick && triggerClick.origin === "header")) {
|
|
1180
|
+
this.$emit("select-header", event);
|
|
1181
|
+
this.headerHovered = false;
|
|
1182
|
+
if (triggerClick) this.setHovered(null);
|
|
1183
|
+
if (closeDropdown) this.isActive = false;
|
|
1184
|
+
}
|
|
1185
|
+
if (this.selectableFooter && (this.footerHovered || triggerClick && triggerClick.origin === "footer")) {
|
|
1186
|
+
this.$emit("select-footer", event);
|
|
1187
|
+
this.footerHovered = false;
|
|
1188
|
+
if (triggerClick) this.setHovered(null);
|
|
1189
|
+
if (closeDropdown) this.isActive = false;
|
|
1190
|
+
}
|
|
1191
|
+
},
|
|
1192
|
+
/*
|
|
1193
|
+
* Close dropdown if clicked outside.
|
|
1194
|
+
*/
|
|
1195
|
+
clickedOutside(event) {
|
|
1196
|
+
const target = isCustomElement(this) ? event.composedPath()[0] : event.target;
|
|
1197
|
+
if (!this.hasFocus && this.whiteList.indexOf(target) < 0) {
|
|
1198
|
+
if (this.keepFirst && this.hovered && this.selectOnClickOutside) {
|
|
1199
|
+
this.setSelected(this.hovered, true);
|
|
1200
|
+
} else {
|
|
1201
|
+
this.isActive = false;
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
},
|
|
1205
|
+
/*
|
|
1206
|
+
* Return display text for the input.
|
|
1207
|
+
* If object, get value from path, or else just the value.
|
|
1208
|
+
*/
|
|
1209
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1210
|
+
getValue(option) {
|
|
1211
|
+
if (option === null) return;
|
|
1212
|
+
if (typeof this.customFormatter !== "undefined") {
|
|
1213
|
+
return this.customFormatter(option);
|
|
1214
|
+
}
|
|
1215
|
+
return typeof option === "object" ? getValueByPath(option, this.field) : option;
|
|
1216
|
+
},
|
|
1217
|
+
/*
|
|
1218
|
+
* Check if the scroll list inside the dropdown
|
|
1219
|
+
* reached it's end.
|
|
1220
|
+
*/
|
|
1221
|
+
checkIfReachedTheEndOfScroll() {
|
|
1222
|
+
const list = this.$refs.dropdown.querySelector(
|
|
1223
|
+
".dropdown-content"
|
|
1224
|
+
);
|
|
1225
|
+
const footerHeight = this.hasFooterSlot ? list.querySelectorAll("div.dropdown-footer")[0].clientHeight : 0;
|
|
1226
|
+
if (list.clientHeight !== list.scrollHeight && list.scrollTop + list.parentElement.clientHeight + footerHeight >= list.scrollHeight) {
|
|
1227
|
+
this.$emit("infinite-scroll");
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
/*
|
|
1231
|
+
* Calculate if the dropdown is vertically visible when activated,
|
|
1232
|
+
* otherwise it is openened upwards.
|
|
1233
|
+
*/
|
|
1234
|
+
calcDropdownInViewportVertical() {
|
|
1235
|
+
this.$nextTick(() => {
|
|
1236
|
+
var _a;
|
|
1237
|
+
if (this.$refs.dropdown == null) return;
|
|
1238
|
+
const rect = this.$refs.dropdown.getBoundingClientRect();
|
|
1239
|
+
this.isListInViewportVertically = rect.top >= 0 && rect.bottom <= ((window == null ? void 0 : window.innerHeight) || ((_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.clientHeight));
|
|
1240
|
+
if (this.appendToBody) {
|
|
1241
|
+
this.updateAppendToBody();
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
},
|
|
1245
|
+
/*
|
|
1246
|
+
* Arrows keys listener.
|
|
1247
|
+
* If dropdown is active, set hovered option, or else just open.
|
|
1248
|
+
*/
|
|
1249
|
+
keyArrows(direction) {
|
|
1250
|
+
const sum = direction === "down" ? 1 : -1;
|
|
1251
|
+
if (this.isActive) {
|
|
1252
|
+
const data = this.computedData.map((d) => d.items).reduce((a, b) => [...a, ...b], []);
|
|
1253
|
+
if (this.hasHeaderSlot && this.selectableHeader) {
|
|
1254
|
+
data.unshift(void 0);
|
|
1255
|
+
}
|
|
1256
|
+
if (this.hasFooterSlot && this.selectableFooter) {
|
|
1257
|
+
data.push(void 0);
|
|
1258
|
+
}
|
|
1259
|
+
let index;
|
|
1260
|
+
if (this.headerHovered) {
|
|
1261
|
+
index = 0 + sum;
|
|
1262
|
+
} else if (this.footerHovered) {
|
|
1263
|
+
index = data.length - 1 + sum;
|
|
1264
|
+
} else {
|
|
1265
|
+
index = this.findHoveredIndex(data) + sum;
|
|
1266
|
+
}
|
|
1267
|
+
index = index > data.length - 1 ? data.length - 1 : index;
|
|
1268
|
+
index = index < 0 ? 0 : index;
|
|
1269
|
+
this.footerHovered = false;
|
|
1270
|
+
this.headerHovered = false;
|
|
1271
|
+
this.setHovered(data[index] !== void 0 ? data[index] : null);
|
|
1272
|
+
if (this.hasFooterSlot && this.selectableFooter && index === data.length - 1) {
|
|
1273
|
+
this.footerHovered = true;
|
|
1274
|
+
}
|
|
1275
|
+
if (this.hasHeaderSlot && this.selectableHeader && index === 0) {
|
|
1276
|
+
this.headerHovered = true;
|
|
1277
|
+
}
|
|
1278
|
+
const list = this.$refs.dropdown.querySelector(
|
|
1279
|
+
".dropdown-content"
|
|
1280
|
+
);
|
|
1281
|
+
let querySelectorText = "a.dropdown-item:not(.is-disabled)";
|
|
1282
|
+
if (this.hasHeaderSlot && this.selectableHeader) {
|
|
1283
|
+
querySelectorText += ",div.dropdown-header";
|
|
1284
|
+
}
|
|
1285
|
+
if (this.hasFooterSlot && this.selectableFooter) {
|
|
1286
|
+
querySelectorText += ",div.dropdown-footer";
|
|
1287
|
+
}
|
|
1288
|
+
const element = list.querySelectorAll(querySelectorText)[index];
|
|
1289
|
+
if (!element) return;
|
|
1290
|
+
const visMin = list.scrollTop;
|
|
1291
|
+
const visMax = list.scrollTop + list.clientHeight - element.clientHeight;
|
|
1292
|
+
if (element.offsetTop < visMin) {
|
|
1293
|
+
list.scrollTop = element.offsetTop;
|
|
1294
|
+
} else if (element.offsetTop >= visMax) {
|
|
1295
|
+
list.scrollTop = element.offsetTop - list.clientHeight + element.clientHeight;
|
|
1296
|
+
}
|
|
1297
|
+
} else {
|
|
1298
|
+
this.isActive = true;
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
1301
|
+
/*
|
|
1302
|
+
* Focus listener.
|
|
1303
|
+
* If value is the same as selected, select all text.
|
|
1304
|
+
*/
|
|
1305
|
+
focused(event) {
|
|
1306
|
+
if (this.getValue(this.selected) === this.newValue) {
|
|
1307
|
+
this.$el.querySelector("input").select();
|
|
1308
|
+
}
|
|
1309
|
+
if (this.openOnFocus) {
|
|
1310
|
+
this.isActive = true;
|
|
1311
|
+
if (this.keepFirst) {
|
|
1312
|
+
this.selectFirstOption(this.computedData);
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
this.hasFocus = true;
|
|
1316
|
+
this.$emit("focus", event);
|
|
1317
|
+
},
|
|
1318
|
+
/*
|
|
1319
|
+
* Blur listener.
|
|
1320
|
+
*/
|
|
1321
|
+
onBlur(event) {
|
|
1322
|
+
this.hasFocus = false;
|
|
1323
|
+
this.$emit("blur", event);
|
|
1324
|
+
},
|
|
1325
|
+
onInput() {
|
|
1326
|
+
const currentValue = this.getValue(this.selected);
|
|
1327
|
+
if (currentValue !== void 0 && currentValue !== null && currentValue === this.newValue) {
|
|
1328
|
+
return;
|
|
1329
|
+
}
|
|
1330
|
+
this.$emit("typing", this.newValue);
|
|
1331
|
+
this.checkValidity();
|
|
1332
|
+
},
|
|
1333
|
+
rightIconClick(event) {
|
|
1334
|
+
if (this.clearable) {
|
|
1335
|
+
this.newValue = "";
|
|
1336
|
+
this.setSelected(null, false);
|
|
1337
|
+
if (this.openOnFocus) {
|
|
1338
|
+
this.$refs.input.$el.focus();
|
|
1339
|
+
}
|
|
1340
|
+
} else {
|
|
1341
|
+
this.$emit("icon-right-click", event);
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
checkValidity() {
|
|
1345
|
+
if (this.useHtml5Validation) {
|
|
1346
|
+
this.$nextTick(() => {
|
|
1347
|
+
this.checkHtml5Validity();
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
updateAppendToBody() {
|
|
1352
|
+
const dropdownMenu = this.$refs.dropdown;
|
|
1353
|
+
const trigger = this.$parent.$data._isTaginput ? this.$parent.$el : this.$refs.input.$el;
|
|
1354
|
+
if (dropdownMenu && trigger) {
|
|
1355
|
+
if (!this.$data._bodyEl) {
|
|
1356
|
+
this.$data._bodyEl = createAbsoluteElement(dropdownMenu);
|
|
1357
|
+
}
|
|
1358
|
+
const root = this.$data._bodyEl;
|
|
1359
|
+
root.classList.forEach((item) => root.classList.remove(item));
|
|
1360
|
+
root.classList.add("autocomplete");
|
|
1361
|
+
root.classList.add("control");
|
|
1362
|
+
if (this.expanded) {
|
|
1363
|
+
root.classList.add("is-expanded");
|
|
1364
|
+
}
|
|
1365
|
+
const rect = trigger.getBoundingClientRect();
|
|
1366
|
+
let top = rect.top + window.scrollY;
|
|
1367
|
+
const left = rect.left + window.scrollX;
|
|
1368
|
+
if (!this.isOpenedTop) {
|
|
1369
|
+
top += trigger.clientHeight;
|
|
1370
|
+
} else {
|
|
1371
|
+
top -= dropdownMenu.clientHeight;
|
|
1372
|
+
}
|
|
1373
|
+
this.style = {
|
|
1374
|
+
position: "absolute",
|
|
1375
|
+
top: `${top}px`,
|
|
1376
|
+
left: `${left}px`,
|
|
1377
|
+
width: `${trigger.clientWidth}px`,
|
|
1378
|
+
maxWidth: `${trigger.clientWidth}px`,
|
|
1379
|
+
zIndex: "99"
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
created() {
|
|
1385
|
+
if (typeof window !== "undefined") {
|
|
1386
|
+
document.addEventListener("click", this.clickedOutside);
|
|
1387
|
+
if (this.dropdownPosition === "auto") {
|
|
1388
|
+
window.addEventListener(
|
|
1389
|
+
"resize",
|
|
1390
|
+
this.calcDropdownInViewportVertical
|
|
1391
|
+
);
|
|
1392
|
+
}
|
|
1393
|
+
if (this.appendToBody) {
|
|
1394
|
+
window.addEventListener(
|
|
1395
|
+
"scroll",
|
|
1396
|
+
this.calcDropdownInViewportVertical
|
|
1397
|
+
);
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
mounted() {
|
|
1402
|
+
if (this.checkInfiniteScroll && this.$refs.dropdown && this.$refs.dropdown.querySelector(".dropdown-content")) {
|
|
1403
|
+
const list = this.$refs.dropdown.querySelector(
|
|
1404
|
+
".dropdown-content"
|
|
1405
|
+
);
|
|
1406
|
+
list.addEventListener("scroll", this.checkIfReachedTheEndOfScroll);
|
|
1407
|
+
}
|
|
1408
|
+
if (this.appendToBody) {
|
|
1409
|
+
this.$data._bodyEl = createAbsoluteElement(
|
|
1410
|
+
this.$refs.dropdown
|
|
1411
|
+
);
|
|
1412
|
+
this.updateAppendToBody();
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1415
|
+
beforeUnmount() {
|
|
1416
|
+
if (typeof window !== "undefined") {
|
|
1417
|
+
document.removeEventListener("click", this.clickedOutside);
|
|
1418
|
+
if (this.dropdownPosition === "auto") {
|
|
1419
|
+
window.removeEventListener(
|
|
1420
|
+
"resize",
|
|
1421
|
+
this.calcDropdownInViewportVertical
|
|
1422
|
+
);
|
|
1423
|
+
}
|
|
1424
|
+
if (this.appendToBody) {
|
|
1425
|
+
window.removeEventListener(
|
|
1426
|
+
"scroll",
|
|
1427
|
+
this.calcDropdownInViewportVertical
|
|
1428
|
+
);
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
if (this.checkInfiniteScroll && this.$refs.dropdown && this.$refs.dropdown.querySelector(".dropdown-content")) {
|
|
1432
|
+
const list = this.$refs.dropdown.querySelector(
|
|
1433
|
+
".dropdown-content"
|
|
1434
|
+
);
|
|
1435
|
+
list.removeEventListener(
|
|
1436
|
+
"scroll",
|
|
1437
|
+
this.checkIfReachedTheEndOfScroll
|
|
1438
|
+
);
|
|
1439
|
+
}
|
|
1440
|
+
if (this.appendToBody && this.$data._bodyEl) {
|
|
1441
|
+
removeElement(this.$data._bodyEl);
|
|
1442
|
+
}
|
|
1443
|
+
clearTimeout(this.timeOutID);
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
|
|
1447
|
+
const _hoisted_1 = {
|
|
1448
|
+
key: 1,
|
|
1449
|
+
class: "has-text-weight-bold"
|
|
1450
|
+
};
|
|
1451
|
+
const _hoisted_2 = ["onClick"];
|
|
1452
|
+
const _hoisted_3 = { key: 1 };
|
|
1453
|
+
const _hoisted_4 = {
|
|
1454
|
+
key: 1,
|
|
1455
|
+
class: "dropdown-item is-disabled"
|
|
1456
|
+
};
|
|
1457
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1458
|
+
const _component_b_input = vue.resolveComponent("b-input");
|
|
1459
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
1460
|
+
"div",
|
|
1461
|
+
vue.mergeProps({
|
|
1462
|
+
class: ["autocomplete control", { "is-expanded": _ctx.expanded }]
|
|
1463
|
+
}, _ctx.rootAttrs),
|
|
1464
|
+
[
|
|
1465
|
+
vue.createVNode(_component_b_input, vue.mergeProps({
|
|
1466
|
+
modelValue: _ctx.newValue,
|
|
1467
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.newValue = $event),
|
|
1468
|
+
ref: "input",
|
|
1469
|
+
type: _ctx.type,
|
|
1470
|
+
size: _ctx.size,
|
|
1471
|
+
loading: _ctx.loading,
|
|
1472
|
+
rounded: _ctx.rounded,
|
|
1473
|
+
icon: _ctx.icon,
|
|
1474
|
+
"icon-right": _ctx.newIconRight,
|
|
1475
|
+
"icon-right-clickable": _ctx.newIconRightClickable,
|
|
1476
|
+
"icon-pack": _ctx.iconPack,
|
|
1477
|
+
maxlength: _ctx.maxlength,
|
|
1478
|
+
autocomplete: _ctx.newAutocomplete,
|
|
1479
|
+
"use-html5-validation": false,
|
|
1480
|
+
"aria-autocomplete": _ctx.ariaAutocomplete
|
|
1481
|
+
}, _ctx.fallthroughAttrs, {
|
|
1482
|
+
"onUpdate:modelValue": _ctx.onInput,
|
|
1483
|
+
onFocus: _ctx.focused,
|
|
1484
|
+
onBlur: _ctx.onBlur,
|
|
1485
|
+
onKeydown: [
|
|
1486
|
+
_ctx.keydown,
|
|
1487
|
+
_cache[1] || (_cache[1] = vue.withKeys(vue.withModifiers(($event) => _ctx.keyArrows("up"), ["prevent"]), ["up"])),
|
|
1488
|
+
_cache[2] || (_cache[2] = vue.withKeys(vue.withModifiers(($event) => _ctx.keyArrows("down"), ["prevent"]), ["down"]))
|
|
1489
|
+
],
|
|
1490
|
+
onIconRightClick: _ctx.rightIconClick,
|
|
1491
|
+
onIconClick: _cache[3] || (_cache[3] = (event) => _ctx.$emit("icon-click", event))
|
|
1492
|
+
}), null, 16, ["modelValue", "type", "size", "loading", "rounded", "icon", "icon-right", "icon-right-clickable", "icon-pack", "maxlength", "autocomplete", "aria-autocomplete", "onUpdate:modelValue", "onFocus", "onBlur", "onKeydown", "onIconRightClick"]),
|
|
1493
|
+
vue.createVNode(vue.Transition, {
|
|
1494
|
+
name: "fade",
|
|
1495
|
+
persisted: ""
|
|
1496
|
+
}, {
|
|
1497
|
+
default: vue.withCtx(() => [
|
|
1498
|
+
vue.withDirectives(vue.createElementVNode(
|
|
1499
|
+
"div",
|
|
1500
|
+
{
|
|
1501
|
+
class: vue.normalizeClass(["dropdown-menu", { "is-opened-top": _ctx.isOpenedTop && !_ctx.appendToBody }]),
|
|
1502
|
+
style: vue.normalizeStyle(_ctx.style),
|
|
1503
|
+
ref: "dropdown"
|
|
1504
|
+
},
|
|
1505
|
+
[
|
|
1506
|
+
vue.withDirectives(vue.createElementVNode(
|
|
1507
|
+
"div",
|
|
1508
|
+
{
|
|
1509
|
+
class: "dropdown-content",
|
|
1510
|
+
style: vue.normalizeStyle(_ctx.contentStyle)
|
|
1511
|
+
},
|
|
1512
|
+
[
|
|
1513
|
+
_ctx.hasHeaderSlot ? (vue.openBlock(), vue.createElementBlock(
|
|
1514
|
+
"div",
|
|
1515
|
+
{
|
|
1516
|
+
key: 0,
|
|
1517
|
+
class: vue.normalizeClass(["dropdown-item dropdown-header", { "is-hovered": _ctx.headerHovered }]),
|
|
1518
|
+
role: "button",
|
|
1519
|
+
tabindex: "0",
|
|
1520
|
+
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.selectHeaderOrFoterByClick($event, "header"))
|
|
1521
|
+
},
|
|
1522
|
+
[
|
|
1523
|
+
vue.renderSlot(_ctx.$slots, "header")
|
|
1524
|
+
],
|
|
1525
|
+
2
|
|
1526
|
+
/* CLASS */
|
|
1527
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
1528
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
1529
|
+
vue.Fragment,
|
|
1530
|
+
null,
|
|
1531
|
+
vue.renderList(_ctx.computedData, (element, groupindex) => {
|
|
1532
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
1533
|
+
vue.Fragment,
|
|
1534
|
+
null,
|
|
1535
|
+
[
|
|
1536
|
+
element.group ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1537
|
+
key: groupindex + "group",
|
|
1538
|
+
class: "dropdown-item"
|
|
1539
|
+
}, [
|
|
1540
|
+
_ctx.hasGroupSlot ? vue.renderSlot(_ctx.$slots, "group", {
|
|
1541
|
+
key: 0,
|
|
1542
|
+
group: element.group,
|
|
1543
|
+
index: groupindex
|
|
1544
|
+
}) : (vue.openBlock(), vue.createElementBlock(
|
|
1545
|
+
"span",
|
|
1546
|
+
_hoisted_1,
|
|
1547
|
+
vue.toDisplayString(element.group),
|
|
1548
|
+
1
|
|
1549
|
+
/* TEXT */
|
|
1550
|
+
))
|
|
1551
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
1552
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
1553
|
+
vue.Fragment,
|
|
1554
|
+
null,
|
|
1555
|
+
vue.renderList(element.items, (option, index) => {
|
|
1556
|
+
return vue.openBlock(), vue.createElementBlock("a", {
|
|
1557
|
+
key: groupindex + ":" + index,
|
|
1558
|
+
class: vue.normalizeClass(["dropdown-item", { "is-hovered": option === _ctx.hovered }]),
|
|
1559
|
+
role: "button",
|
|
1560
|
+
tabindex: "0",
|
|
1561
|
+
onClick: vue.withModifiers(($event) => _ctx.setSelected(option, !_ctx.keepOpen, $event), ["stop"])
|
|
1562
|
+
}, [
|
|
1563
|
+
_ctx.hasDefaultSlot ? vue.renderSlot(_ctx.$slots, "default", {
|
|
1564
|
+
key: 0,
|
|
1565
|
+
option,
|
|
1566
|
+
index
|
|
1567
|
+
}) : (vue.openBlock(), vue.createElementBlock(
|
|
1568
|
+
"span",
|
|
1569
|
+
_hoisted_3,
|
|
1570
|
+
vue.toDisplayString(_ctx.getValue(option)),
|
|
1571
|
+
1
|
|
1572
|
+
/* TEXT */
|
|
1573
|
+
))
|
|
1574
|
+
], 10, _hoisted_2);
|
|
1575
|
+
}),
|
|
1576
|
+
128
|
|
1577
|
+
/* KEYED_FRAGMENT */
|
|
1578
|
+
))
|
|
1579
|
+
],
|
|
1580
|
+
64
|
|
1581
|
+
/* STABLE_FRAGMENT */
|
|
1582
|
+
);
|
|
1583
|
+
}),
|
|
1584
|
+
256
|
|
1585
|
+
/* UNKEYED_FRAGMENT */
|
|
1586
|
+
)),
|
|
1587
|
+
_ctx.isEmpty && _ctx.hasEmptySlot ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
|
|
1588
|
+
vue.renderSlot(_ctx.$slots, "empty")
|
|
1589
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
1590
|
+
_ctx.hasFooterSlot ? (vue.openBlock(), vue.createElementBlock(
|
|
1591
|
+
"div",
|
|
1592
|
+
{
|
|
1593
|
+
key: 2,
|
|
1594
|
+
class: vue.normalizeClass(["dropdown-item dropdown-footer", { "is-hovered": _ctx.footerHovered }]),
|
|
1595
|
+
role: "button",
|
|
1596
|
+
tabindex: "0",
|
|
1597
|
+
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.selectHeaderOrFoterByClick($event, "footer"))
|
|
1598
|
+
},
|
|
1599
|
+
[
|
|
1600
|
+
vue.renderSlot(_ctx.$slots, "footer")
|
|
1601
|
+
],
|
|
1602
|
+
2
|
|
1603
|
+
/* CLASS */
|
|
1604
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
1605
|
+
],
|
|
1606
|
+
4
|
|
1607
|
+
/* STYLE */
|
|
1608
|
+
), [
|
|
1609
|
+
[vue.vShow, _ctx.isActive]
|
|
1610
|
+
])
|
|
1611
|
+
],
|
|
1612
|
+
6
|
|
1613
|
+
/* CLASS, STYLE */
|
|
1614
|
+
), [
|
|
1615
|
+
[vue.vShow, _ctx.isActive && (!_ctx.isEmpty || _ctx.hasEmptySlot || _ctx.hasHeaderSlot || _ctx.hasFooterSlot)]
|
|
1616
|
+
])
|
|
1617
|
+
]),
|
|
1618
|
+
_: 3
|
|
1619
|
+
/* FORWARDED */
|
|
1620
|
+
})
|
|
1621
|
+
],
|
|
1622
|
+
16
|
|
1623
|
+
/* FULL_PROPS */
|
|
1624
|
+
);
|
|
1625
|
+
}
|
|
1626
|
+
var Autocomplete = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
1627
|
+
|
|
1628
|
+
const registerComponent = (Vue, component, name) => {
|
|
1629
|
+
const componentName = component.name;
|
|
1630
|
+
if (componentName == null) {
|
|
1631
|
+
throw new Error("Buefy.registerComponent: missing component name");
|
|
1632
|
+
}
|
|
1633
|
+
Vue.component(componentName, component);
|
|
1634
|
+
};
|
|
1635
|
+
|
|
1636
|
+
const Plugin = {
|
|
1637
|
+
install(Vue) {
|
|
1638
|
+
registerComponent(Vue, Autocomplete);
|
|
1639
|
+
}
|
|
1640
|
+
};
|
|
1641
|
+
|
|
1642
|
+
exports.BAutocomplete = Autocomplete;
|
|
1643
|
+
exports.default = Plugin;
|
|
1644
|
+
|
|
1645
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1646
|
+
|
|
1647
|
+
}));
|