primevue 3.19.0 → 3.21.0
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/api/Api.d.ts +22 -0
- package/autocomplete/AutoComplete.d.ts +5 -1
- package/autocomplete/AutoComplete.vue +9 -5
- package/autocomplete/autocomplete.cjs.js +10 -6
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +10 -6
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +10 -6
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +8 -0
- package/avatar/Avatar.vue +9 -1
- package/avatar/avatar.cjs.js +17 -6
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +17 -6
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +17 -6
- package/avatar/avatar.min.js +1 -1
- package/blockui/BlockUI.vue +8 -1
- package/blockui/blockui.cjs.js +14 -4
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +15 -5
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +14 -4
- package/blockui/blockui.min.js +1 -1
- package/calendar/Calendar.vue +5 -0
- package/calendar/calendar.cjs.js +5 -0
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +5 -0
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +5 -0
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.d.ts +9 -1
- package/carousel/Carousel.vue +131 -9
- package/carousel/carousel.cjs.js +142 -29
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +143 -30
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +143 -30
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.vue +4 -4
- package/cascadeselect/cascadeselect.cjs.js +3 -3
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +3 -3
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +3 -3
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.d.ts +5 -0
- package/chart/Chart.vue +5 -1
- package/chart/chart.cjs.js +6 -2
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +7 -3
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +6 -2
- package/chart/chart.min.js +1 -1
- package/chip/Chip.vue +7 -2
- package/chip/chip.cjs.js +14 -7
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +15 -8
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +14 -7
- package/chip/chip.min.js +1 -1
- package/colorpicker/ColorPicker.vue +5 -7
- package/colorpicker/colorpicker.cjs.js +5 -7
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +5 -7
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +6 -8
- package/colorpicker/colorpicker.min.js +1 -1
- package/config/PrimeVue.d.ts +38 -0
- package/config/config.cjs.js +39 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +39 -1
- package/config/config.esm.min.js +1 -1
- package/config/config.js +39 -1
- package/config/config.min.js +1 -1
- package/core/core.js +453 -198
- package/core/core.min.js +12 -12
- package/datatable/BodyCell.vue +39 -14
- package/datatable/ColumnFilter.vue +67 -41
- package/datatable/DataTable.d.ts +9 -1
- package/datatable/DataTable.vue +162 -25
- package/datatable/HeaderCell.vue +12 -6
- package/datatable/HeaderCheckbox.vue +17 -14
- package/datatable/RowCheckbox.vue +28 -13
- package/datatable/RowRadioButton.vue +11 -3
- package/datatable/TableBody.vue +25 -7
- package/datatable/TableFooter.vue +1 -1
- package/datatable/TableHeader.vue +9 -3
- package/datatable/TableLoadingBody.vue +1 -1
- package/datatable/datatable.cjs.js +539 -268
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +538 -268
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +538 -268
- package/datatable/datatable.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +23 -3
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +40 -11
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +40 -11
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +40 -11
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.vue +12 -7
- package/dialog/dialog.cjs.js +14 -9
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +14 -9
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +14 -9
- package/dialog/dialog.min.js +1 -1
- package/dropdown/Dropdown.vue +13 -16
- package/dropdown/dropdown.cjs.js +13 -16
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +13 -16
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +13 -16
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/Fieldset.d.ts +1 -1
- package/fieldset/Fieldset.vue +21 -3
- package/fieldset/fieldset.cjs.js +12 -6
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +13 -7
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +13 -7
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.d.ts +51 -1
- package/fileupload/FileUpload.vue +2 -2
- package/fileupload/fileupload.cjs.js +2 -2
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +2 -2
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +2 -2
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/focustrap.cjs.js +86 -64
- package/focustrap/focustrap.cjs.min.js +1 -1
- package/focustrap/focustrap.esm.js +85 -63
- package/focustrap/focustrap.esm.min.js +1 -1
- package/focustrap/focustrap.js +86 -64
- package/focustrap/focustrap.min.js +1 -1
- package/galleria/Galleria.d.ts +15 -3
- package/galleria/Galleria.vue +36 -6
- package/galleria/GalleriaContent.vue +11 -7
- package/galleria/GalleriaItem.vue +36 -6
- package/galleria/GalleriaThumbnails.vue +108 -4
- package/galleria/galleria.cjs.js +258 -122
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +257 -122
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +258 -123
- package/galleria/galleria.min.js +1 -1
- package/image/Image.vue +71 -13
- package/image/image.cjs.js +112 -39
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +112 -40
- package/image/image.esm.min.js +1 -1
- package/image/image.js +112 -40
- package/image/image.min.js +1 -1
- package/inplace/Inplace.d.ts +9 -1
- package/inplace/Inplace.vue +17 -3
- package/inplace/inplace.cjs.js +25 -7
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +26 -8
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +25 -7
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/InputNumber.vue +11 -20
- package/inputnumber/inputnumber.cjs.js +11 -20
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +11 -20
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +11 -20
- package/inputnumber/inputnumber.min.js +1 -1
- package/listbox/Listbox.vue +7 -7
- package/listbox/listbox.cjs.js +7 -7
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +7 -7
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +8 -8
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.vue +10 -1
- package/megamenu/megamenu.cjs.js +10 -1
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +10 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +10 -1
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.vue +8 -2
- package/menu/menu.cjs.js +8 -2
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +8 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +8 -2
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.vue +7 -2
- package/menubar/menubar.cjs.js +7 -2
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +7 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +7 -2
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +5 -1
- package/message/Message.vue +9 -2
- package/message/message.cjs.js +17 -6
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +18 -7
- package/message/message.esm.min.js +1 -1
- package/message/message.js +17 -6
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.vue +33 -32
- package/multiselect/multiselect.cjs.js +33 -32
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +34 -33
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +33 -32
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +33 -1
- package/orderlist/OrderList.vue +258 -63
- package/orderlist/orderlist.cjs.js +270 -68
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +271 -69
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +271 -69
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChartNode.vue +7 -1
- package/organizationchart/organizationchart.cjs.js +7 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +8 -2
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +7 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +0 -5
- package/overlaypanel/OverlayPanel.vue +4 -5
- package/overlaypanel/overlaypanel.cjs.js +4 -5
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +4 -5
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +4 -5
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/CurrentPageReport.vue +0 -1
- package/paginator/JumpToPageDropdown.vue +0 -1
- package/paginator/JumpToPageInput.vue +6 -1
- package/paginator/PageLinks.vue +16 -1
- package/paginator/Paginator.vue +23 -10
- package/paginator/RowsPerPageDropdown.vue +0 -1
- package/paginator/paginator.cjs.js +35 -15
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +35 -15
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +35 -15
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +2 -2
- package/panel/Panel.vue +10 -3
- package/panel/panel.cjs.js +12 -6
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +13 -7
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +13 -7
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenuList.vue +57 -0
- package/panelmenu/panelmenu.cjs.js +70 -0
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +70 -0
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +70 -0
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.vue +5 -0
- package/password/password.cjs.js +1 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +1 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +1 -1
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +45 -1
- package/picklist/PickList.vue +296 -58
- package/picklist/picklist.cjs.js +340 -88
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +341 -89
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +341 -89
- package/picklist/picklist.min.js +1 -1
- package/progressspinner/ProgressSpinner.vue +1 -1
- package/progressspinner/progressspinner.cjs.js +1 -2
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +1 -2
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +1 -2
- package/progressspinner/progressspinner.min.js +1 -1
- package/resources/primevue.css +2 -6
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +31 -13
- package/resources/themes/arya-green/theme.css +31 -13
- package/resources/themes/arya-orange/theme.css +31 -13
- package/resources/themes/arya-purple/theme.css +31 -13
- package/resources/themes/bootstrap4-dark-blue/theme.css +31 -13
- package/resources/themes/bootstrap4-dark-purple/theme.css +31 -13
- package/resources/themes/bootstrap4-light-blue/theme.css +31 -13
- package/resources/themes/bootstrap4-light-purple/theme.css +31 -13
- package/resources/themes/fluent-light/theme.css +31 -13
- package/resources/themes/lara-dark-blue/theme.css +35 -13
- package/resources/themes/lara-dark-indigo/theme.css +35 -13
- package/resources/themes/lara-dark-purple/theme.css +35 -13
- package/resources/themes/lara-dark-teal/theme.css +35 -13
- package/resources/themes/lara-light-blue/theme.css +35 -13
- package/resources/themes/lara-light-indigo/theme.css +35 -13
- package/resources/themes/lara-light-purple/theme.css +35 -13
- package/resources/themes/lara-light-teal/theme.css +35 -13
- package/resources/themes/luna-amber/theme.css +31 -13
- package/resources/themes/luna-blue/theme.css +31 -13
- package/resources/themes/luna-green/theme.css +31 -13
- package/resources/themes/luna-pink/theme.css +31 -13
- package/resources/themes/md-dark-deeppurple/theme.css +55 -19
- package/resources/themes/md-dark-indigo/theme.css +55 -19
- package/resources/themes/md-light-deeppurple/theme.css +55 -19
- package/resources/themes/md-light-indigo/theme.css +55 -19
- package/resources/themes/mdc-dark-deeppurple/theme.css +55 -19
- package/resources/themes/mdc-dark-indigo/theme.css +55 -19
- package/resources/themes/mdc-light-deeppurple/theme.css +55 -19
- package/resources/themes/mdc-light-indigo/theme.css +55 -19
- package/resources/themes/nova/theme.css +31 -13
- package/resources/themes/nova-accent/theme.css +31 -13
- package/resources/themes/nova-alt/theme.css +31 -13
- package/resources/themes/nova-vue/theme.css +31 -13
- package/resources/themes/rhea/theme.css +31 -13
- package/resources/themes/saga-blue/theme.css +31 -13
- package/resources/themes/saga-green/theme.css +31 -13
- package/resources/themes/saga-orange/theme.css +31 -13
- package/resources/themes/saga-purple/theme.css +31 -13
- package/resources/themes/tailwind-light/theme.css +35 -13
- package/resources/themes/vela-blue/theme.css +31 -13
- package/resources/themes/vela-green/theme.css +31 -13
- package/resources/themes/vela-orange/theme.css +31 -13
- package/resources/themes/vela-purple/theme.css +31 -13
- package/ripple/ripple.cjs.js +1 -0
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +1 -0
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +1 -0
- package/ripple/ripple.min.js +1 -1
- package/scrolltop/ScrollTop.vue +4 -1
- package/scrolltop/scrolltop.cjs.js +8 -2
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +8 -2
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +8 -2
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.vue +1 -1
- package/selectbutton/selectbutton.cjs.js +1 -1
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +1 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -2
- package/selectbutton/selectbutton.min.js +1 -1
- package/skeleton/Skeleton.vue +1 -1
- package/skeleton/skeleton.cjs.js +2 -1
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +2 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +2 -1
- package/skeleton/skeleton.min.js +1 -1
- package/speeddial/SpeedDial.d.ts +19 -1
- package/speeddial/SpeedDial.vue +250 -7
- package/speeddial/speeddial.cjs.js +254 -13
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +255 -14
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +254 -13
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +16 -4
- package/splitbutton/SplitButton.vue +49 -8
- package/splitbutton/splitbutton.cjs.js +49 -16
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +49 -16
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +49 -16
- package/splitbutton/splitbutton.min.js +1 -1
- package/tabmenu/TabMenu.vue +2 -14
- package/tabmenu/tabmenu.cjs.js +12 -11
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +12 -11
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +12 -11
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/TabView.vue +8 -2
- package/tabview/tabview.cjs.js +8 -2
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +8 -2
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +8 -2
- package/tabview/tabview.min.js +1 -1
- package/terminal/Terminal.vue +2 -2
- package/terminal/terminal.cjs.js +5 -2
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +5 -2
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +5 -2
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/TieredMenu.vue +13 -3
- package/tieredmenu/tieredmenu.cjs.js +13 -3
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +13 -3
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +13 -3
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/Toast.d.ts +5 -1
- package/toast/Toast.vue +5 -0
- package/toast/ToastMessage.vue +36 -8
- package/toast/toast.cjs.js +48 -12
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +49 -13
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +48 -12
- package/toast/toast.min.js +1 -1
- package/toolbar/Toolbar.d.ts +6 -0
- package/toolbar/Toolbar.vue +12 -2
- package/toolbar/toolbar.cjs.js +7 -3
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +7 -3
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +7 -3
- package/toolbar/toolbar.min.js +1 -1
- package/tree/Tree.d.ts +8 -0
- package/tree/Tree.vue +10 -2
- package/tree/TreeNode.vue +174 -37
- package/tree/tree.cjs.js +192 -58
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +192 -58
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +192 -58
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.vue +40 -26
- package/treeselect/treeselect.cjs.js +45 -29
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +43 -27
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +44 -28
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +4 -4
- package/treetable/HeaderCell.vue +4 -2
- package/treetable/TreeTable.d.ts +4 -0
- package/treetable/TreeTable.vue +43 -17
- package/treetable/TreeTableRow.vue +200 -59
- package/treetable/treetable.cjs.js +797 -620
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +794 -617
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +794 -617
- package/treetable/treetable.min.js +1 -1
- package/utils/utils.cjs.js +26 -6
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +26 -6
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +26 -6
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +174 -10
- package/vetur-tags.json +58 -17
- package/web-types.json +465 -19
- package/galleria/GalleriaItemSlot.vue +0 -53
|
@@ -113,6 +113,10 @@ this.primevue.autocomplete = (function (Button, OverlayEventBus, Portal, Ripple,
|
|
|
113
113
|
type: String,
|
|
114
114
|
default: 'pi pi-chevron-down'
|
|
115
115
|
},
|
|
116
|
+
dropdownClass: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: null
|
|
119
|
+
},
|
|
116
120
|
loadingIcon: {
|
|
117
121
|
type: String,
|
|
118
122
|
default: 'pi pi-spinner'
|
|
@@ -365,7 +369,7 @@ this.primevue.autocomplete = (function (Button, OverlayEventBus, Portal, Ripple,
|
|
|
365
369
|
let valid = false;
|
|
366
370
|
|
|
367
371
|
if (this.visibleOptions) {
|
|
368
|
-
const matchedValue = this.visibleOptions.find((option) => this.isOptionMatched(option,
|
|
372
|
+
const matchedValue = this.visibleOptions.find((option) => this.isOptionMatched(option, this.$refs.focusInput.value || ''));
|
|
369
373
|
|
|
370
374
|
if (matchedValue !== undefined) {
|
|
371
375
|
valid = true;
|
|
@@ -1054,12 +1058,12 @@ this.primevue.autocomplete = (function (Button, OverlayEventBus, Portal, Ripple,
|
|
|
1054
1058
|
ref: "dropdownButton",
|
|
1055
1059
|
type: "button",
|
|
1056
1060
|
icon: $props.dropdownIcon,
|
|
1057
|
-
class:
|
|
1061
|
+
class: vue.normalizeClass(['p-autocomplete-dropdown', $props.dropdownClass]),
|
|
1058
1062
|
tabindex: "-1",
|
|
1059
1063
|
disabled: $props.disabled,
|
|
1060
1064
|
"aria-hidden": "true",
|
|
1061
1065
|
onClick: $options.onDropdownClick
|
|
1062
|
-
}, null, 8, ["icon", "disabled", "onClick"]))
|
|
1066
|
+
}, null, 8, ["icon", "class", "disabled", "onClick"]))
|
|
1063
1067
|
: vue.createCommentVNode("", true),
|
|
1064
1068
|
vue.createElementVNode("span", _hoisted_8, vue.toDisplayString($options.searchResultMessageText), 1),
|
|
1065
1069
|
vue.createVNode(_component_Portal, { appendTo: $props.appendTo }, {
|
|
@@ -1153,8 +1157,7 @@ this.primevue.autocomplete = (function (Button, OverlayEventBus, Portal, Ripple,
|
|
|
1153
1157
|
])
|
|
1154
1158
|
], 64))
|
|
1155
1159
|
}), 128))
|
|
1156
|
-
], 14, _hoisted_9)
|
|
1157
|
-
vue.createElementVNode("span", _hoisted_12, vue.toDisplayString($options.selectedMessageText), 1)
|
|
1160
|
+
], 14, _hoisted_9)
|
|
1158
1161
|
]),
|
|
1159
1162
|
_: 2
|
|
1160
1163
|
}, [
|
|
@@ -1171,7 +1174,8 @@ this.primevue.autocomplete = (function (Button, OverlayEventBus, Portal, Ripple,
|
|
|
1171
1174
|
vue.renderSlot(_ctx.$slots, "footer", {
|
|
1172
1175
|
value: $props.modelValue,
|
|
1173
1176
|
suggestions: $options.visibleOptions
|
|
1174
|
-
})
|
|
1177
|
+
}),
|
|
1178
|
+
vue.createElementVNode("span", _hoisted_12, vue.toDisplayString($options.selectedMessageText), 1)
|
|
1175
1179
|
], 16))
|
|
1176
1180
|
: vue.createCommentVNode("", true)
|
|
1177
1181
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.autocomplete=function(e,t,i,n,o,l,s){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(e),d=a(t),p=a(i),u=a(n),c=a(l),h={name:"AutoComplete",emits:["update:modelValue","change","focus","blur","item-select","item-unselect","dropdown-click","clear","complete","before-show","before-hide","show","hide"],props:{modelValue:null,suggestions:{type:Array,default:null},field:{type:[String,Function],default:null},optionLabel:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},dropdown:{type:Boolean,default:!1},dropdownMode:{type:String,default:"blank"},autoHighlight:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},dataKey:{type:String,default:null},minLength:{type:Number,default:1},delay:{type:Number,default:300},appendTo:{type:String,default:"body"},forceSelection:{type:Boolean,default:!1},completeOnFocus:{type:Boolean,default:!1},inputId:{type:String,default:null},inputStyle:{type:null,default:null},inputClass:{type:String,default:null},inputProps:{type:null,default:null},panelStyle:{type:null,default:null},panelClass:{type:String,default:null},panelProps:{type:null,default:null},dropdownIcon:{type:String,default:"pi pi-chevron-down"},loadingIcon:{type:String,default:"pi pi-spinner"},removeTokenIcon:{type:String,default:"pi pi-times-circle"},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,searchTimeout:null,focusOnHover:!1,dirty:!1,data:()=>({focused:!1,focusedOptionIndex:-1,focusedMultipleOptionIndex:-1,overlayVisible:!1,searching:!1}),watch:{suggestions(){this.searching&&(o.ObjectUtils.isNotEmpty(this.suggestions)?this.show():this.hide(),this.focusedOptionIndex=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.searching=!1),this.autoUpdateModel()}},mounted(){this.autoUpdateModel()},updated(){this.overlayVisible&&this.alignOverlay()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(o.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.field||this.optionLabel?o.ObjectUtils.resolveFieldData(e,this.field||this.optionLabel):e},getOptionValue:e=>e,getOptionRenderKey(e,t){return(this.dataKey?o.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},isOptionDisabled(e){return!!this.optionDisabled&&o.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((e=>this.isOptionGroup(e))).length:e)+1},show(e){this.$emit("before-show"),this.dirty=!0,this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&o.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.dirty=e,this.overlayVisible=!1,this.focusedOptionIndex=-1,e&&o.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e)},onBlur(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e)}},onInput(e){this.searchTimeout&&clearTimeout(this.searchTimeout);let t=e.target.value;this.multiple||this.updateModel(e,t),0===t.length?(this.hide(),this.$emit("clear")):t.length>=this.minLength?(this.focusedOptionIndex=-1,this.searchTimeout=setTimeout((()=>{this.search(e,t,"input")}),this.delay)):this.hide()},onChange(e){if(this.forceSelection){let t=!1;if(this.visibleOptions){const i=this.visibleOptions.find((t=>this.isOptionMatched(t,e.target.value)));void 0!==i&&(t=!0,!this.isSelected(i)&&this.onOptionSelect(e,i))}t||(this.$refs.focusInput.value="",this.$emit("clear"),!this.multiple&&this.updateModel(e,null))}},onMultipleContainerFocus(){this.focused=!0},onMultipleContainerBlur(){this.focusedMultipleOptionIndex=-1,this.focused=!1},onMultipleContainerKeyDown(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e)}},onContainerClick(e){this.disabled||this.searching||this.isInputClicked(e)||this.isDropdownClicked(e)||this.overlay&&this.overlay.contains(e.target)||o.DomHandler.focus(this.$refs.focusInput)},onDropdownClick(e){let t;this.overlayVisible?this.hide(!0):(o.DomHandler.focus(this.$refs.focusInput),t=this.$refs.focusInput.value,"blank"===this.dropdownMode?this.search(e,"","dropdown"):"current"===this.dropdownMode&&this.search(e,t,"dropdown")),this.$emit("dropdown-click",{originalEvent:e,query:t})},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t);this.multiple?(this.$refs.focusInput.value="",this.isSelected(t)||this.updateModel(e,[...this.modelValue||[],n])):this.updateModel(e,n),this.$emit("item-select",{originalEvent:e,value:t}),i&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOverlayClick(e){d.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){if(!this.overlayVisible)return;const t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey(e){if(this.overlayVisible)if(e.altKey)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowLeftKey(e){const t=e.currentTarget;this.focusedOptionIndex=-1,this.multiple&&(o.ObjectUtils.isEmpty(t.value)&&this.hasSelectedOption?(o.DomHandler.focus(this.$refs.multiContainer),this.focusedMultipleOptionIndex=this.modelValue.length):e.stopPropagation())},onArrowRightKey(e){this.focusedOptionIndex=-1,this.multiple&&e.stopPropagation()},onHomeKey(e){const t=e.currentTarget.value.length;e.shiftKey?e.currentTarget.setSelectionRange(0,t):e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1,e.preventDefault()},onEndKey(e){const t=e.currentTarget,i=t.value.length;e.shiftKey?e.currentTarget.setSelectionRange(0,i):t.setSelectionRange(i,i),this.focusedOptionIndex=-1,e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e){-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide()},onBackspaceKey(e){if(this.multiple){if(o.ObjectUtils.isNotEmpty(this.modelValue)&&!this.$refs.focusInput.value){const t=this.modelValue[this.modelValue.length-1],i=this.modelValue.slice(0,-1);this.$emit("update:modelValue",i),this.$emit("item-unselect",{originalEvent:e,value:t})}e.stopPropagation()}},onArrowLeftKeyOnMultiple(){this.focusedMultipleOptionIndex=this.focusedMultipleOptionIndex<1?0:this.focusedMultipleOptionIndex-1},onArrowRightKeyOnMultiple(){this.focusedMultipleOptionIndex++,this.focusedMultipleOptionIndex>this.modelValue.length-1&&(this.focusedMultipleOptionIndex=-1,o.DomHandler.focus(this.$refs.focusInput))},onBackspaceKeyOnMultiple(e){-1!==this.focusedMultipleOptionIndex&&this.removeOption(e,this.focusedMultipleOptionIndex)},onOverlayEnter(e){o.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay()},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){o.ZIndexUtils.clear(e)},alignOverlay(){let e=this.multiple?this.$refs.multiContainer:this.$refs.focusInput;"self"===this.appendTo?o.DomHandler.relativePosition(this.overlay,e):(this.overlay.style.minWidth=o.DomHandler.getOuterWidth(e)+"px",o.DomHandler.absolutePosition(this.overlay,e))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&this.isOutsideClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new o.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!o.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!this.overlay.contains(e.target)&&!this.isInputClicked(e)&&!this.isDropdownClicked(e)},isInputClicked(e){return this.multiple?e.target===this.$refs.multiContainer||this.$refs.multiContainer.contains(e.target):e.target===this.$refs.focusInput},isDropdownClicked(e){return!!this.$refs.dropdownButton&&(e.target===this.$refs.dropdownButton||this.$refs.dropdownButton.$el.contains(e.target))},isOptionMatched(e,t){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===t.toLocaleLowerCase(this.searchLocale)},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return o.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return o.ObjectUtils.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?o.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e))):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},search(e,t,i){null!=t&&("input"===i&&0===t.trim().length||(this.searching=!0,this.$emit("complete",{originalEvent:e,query:t})))},removeOption(e,t){const i=this.modelValue[t],n=this.modelValue.filter(((e,i)=>i!==t)).map((e=>this.getOptionValue(e)));this.updateModel(e,n),this.$emit("item-unselect",{originalEvent:e,value:i}),this.dirty=!0,o.DomHandler.focus(this.$refs.focusInput)},changeFocusedOptionIndex(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=o.DomHandler.findSingle(this.list,`li[id="${t}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)}),0)},autoUpdateModel(){(this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce(((e,t,i)=>{e.push({optionGroup:t,group:!0,index:i});const n=this.getOptionGroupChildren(t);return n&&n.forEach((t=>e.push(t))),e}),[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-autocomplete p-component p-inputwrapper",{"p-disabled":this.disabled,"p-focus":this.focused,"p-autocomplete-dd":this.dropdown,"p-autocomplete-multiple":this.multiple,"p-inputwrapper-filled":this.modelValue||o.ObjectUtils.isNotEmpty(this.inputValue),"p-inputwrapper-focus":this.focused,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-autocomplete-input p-inputtext p-component",this.inputClass,{"p-autocomplete-dd-input":this.dropdown}]},multiContainerClass:()=>["p-autocomplete-multiple-container p-component p-inputtext"],panelStyleClass(){return["p-autocomplete-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},loadingIconClass(){return["p-autocomplete-loader pi-spin",this.loadingIcon]},visibleOptions(){return this.optionGroupLabel?this.flatOptions(this.suggestions):this.suggestions||[]},inputValue(){if(this.modelValue){if("object"==typeof this.modelValue){const e=this.getOptionLabel(this.modelValue);return null!=e?e:this.modelValue}return this.modelValue}return""},hasSelectedOption(){return o.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey(){return this.dataKey},searchResultMessageText(){return o.ObjectUtils.isNotEmpty(this.visibleOptions)&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},id(){return this.$attrs.id||o.UniqueComponentId()},focusedOptionId(){return-1!==this.focusedOptionIndex?`${this.id}_${this.focusedOptionIndex}`:null},focusedMultipleOptionId(){return-1!==this.focusedMultipleOptionIndex?`${this.id}_multiple_option_${this.focusedMultipleOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter((e=>!this.isOptionGroup(e))).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},components:{Button:r.default,VirtualScroller:c.default,Portal:p.default},directives:{ripple:u.default}};const f=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],m=["aria-activedescendant"],y=["id","aria-label","aria-setsize","aria-posinset"],b={class:"p-autocomplete-token-label"},g=["onClick"],O={class:"p-autocomplete-input-token",role:"option"},v=["id","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],x={role:"status","aria-live":"polite",class:"p-hidden-accessible"},I=["id"],w=["id"],k=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"],S={role:"status","aria-live":"polite",class:"p-hidden-accessible"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-autocomplete {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n position: relative;\n}\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-autocomplete-dd .p-autocomplete-input {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 1%;\n}\n.p-autocomplete-dd .p-autocomplete-input,\n.p-autocomplete-dd .p-autocomplete-multiple-container {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-autocomplete-dd .p-autocomplete-dropdown {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0px;\n}\n.p-autocomplete .p-autocomplete-panel {\n min-width: 100%;\n}\n.p-autocomplete-panel {\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n}\n.p-autocomplete-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-autocomplete-item {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-autocomplete-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-autocomplete-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-autocomplete-token-icon {\n cursor: pointer;\n}\n.p-autocomplete-input-token {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-autocomplete-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n.p-fluid .p-autocomplete {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-fluid .p-autocomplete-dd .p-autocomplete-input {\n width: 1%;\n}\n"),h.render=function(e,t,i,n,o,l){const a=s.resolveComponent("Button"),r=s.resolveComponent("VirtualScroller"),d=s.resolveComponent("Portal"),p=s.resolveDirective("ripple");return s.openBlock(),s.createElementBlock("div",{ref:"container",class:s.normalizeClass(l.containerClass),onClick:t[15]||(t[15]=(...e)=>l.onContainerClick&&l.onContainerClick(...e))},[i.multiple?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("input",s.mergeProps({key:0,ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:l.inputStyleClass,value:l.inputValue,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":l.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>l.onFocus&&l.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>l.onBlur&&l.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>l.onKeyDown&&l.onKeyDown(...e)),onInput:t[3]||(t[3]=(...e)=>l.onInput&&l.onInput(...e)),onChange:t[4]||(t[4]=(...e)=>l.onChange&&l.onChange(...e))},i.inputProps),null,16,f)),i.multiple?(s.openBlock(),s.createElementBlock("ul",{key:1,ref:"multiContainer",class:s.normalizeClass(l.multiContainerClass),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-activedescendant":o.focused?l.focusedMultipleOptionId:void 0,onFocus:t[10]||(t[10]=(...e)=>l.onMultipleContainerFocus&&l.onMultipleContainerFocus(...e)),onBlur:t[11]||(t[11]=(...e)=>l.onMultipleContainerBlur&&l.onMultipleContainerBlur(...e)),onKeydown:t[12]||(t[12]=(...e)=>l.onMultipleContainerKeyDown&&l.onMultipleContainerKeyDown(...e))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.modelValue,((t,n)=>(s.openBlock(),s.createElementBlock("li",{key:n,id:l.id+"_multiple_option_"+n,class:s.normalizeClass(["p-autocomplete-token",{"p-focus":o.focusedMultipleOptionIndex===n}]),role:"option","aria-label":l.getOptionLabel(t),"aria-selected":!0,"aria-setsize":i.modelValue.length,"aria-posinset":n+1},[s.renderSlot(e.$slots,"chip",{value:t},(()=>[s.createElementVNode("span",b,s.toDisplayString(l.getOptionLabel(t)),1)])),s.createElementVNode("span",{class:s.normalizeClass(["p-autocomplete-token-icon",i.removeTokenIcon]),onClick:e=>l.removeOption(e,n),"aria-hidden":"true"},null,10,g)],10,y)))),128)),s.createElementVNode("li",O,[s.createElementVNode("input",s.mergeProps({ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:i.inputClass,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":l.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[5]||(t[5]=(...e)=>l.onFocus&&l.onFocus(...e)),onBlur:t[6]||(t[6]=(...e)=>l.onBlur&&l.onBlur(...e)),onKeydown:t[7]||(t[7]=(...e)=>l.onKeyDown&&l.onKeyDown(...e)),onInput:t[8]||(t[8]=(...e)=>l.onInput&&l.onInput(...e)),onChange:t[9]||(t[9]=(...e)=>l.onChange&&l.onChange(...e))},i.inputProps),null,16,v)])],42,m)):s.createCommentVNode("",!0),o.searching?(s.openBlock(),s.createElementBlock("i",{key:2,class:s.normalizeClass(l.loadingIconClass),"aria-hidden":"true"},null,2)):s.createCommentVNode("",!0),i.dropdown?(s.openBlock(),s.createBlock(a,{key:3,ref:"dropdownButton",type:"button",icon:i.dropdownIcon,class:"p-autocomplete-dropdown",tabindex:"-1",disabled:i.disabled,"aria-hidden":"true",onClick:l.onDropdownClick},null,8,["icon","disabled","onClick"])):s.createCommentVNode("",!0),s.createElementVNode("span",x,s.toDisplayString(l.searchResultMessageText),1),s.createVNode(d,{appendTo:i.appendTo},{default:s.withCtx((()=>[s.createVNode(s.Transition,{name:"p-connected-overlay",onEnter:l.onOverlayEnter,onAfterEnter:l.onOverlayAfterEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},{default:s.withCtx((()=>[o.overlayVisible?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,ref:l.overlayRef,class:l.panelStyleClass,style:{...i.panelStyle,"max-height":l.virtualScrollerDisabled?i.scrollHeight:""},onClick:t[13]||(t[13]=(...e)=>l.onOverlayClick&&l.onOverlayClick(...e)),onKeydown:t[14]||(t[14]=(...e)=>l.onOverlayKeyDown&&l.onOverlayKeyDown(...e))},i.panelProps),[s.renderSlot(e.$slots,"header",{value:i.modelValue,suggestions:l.visibleOptions}),s.createVNode(r,s.mergeProps({ref:l.virtualScrollerRef},i.virtualScrollerOptions,{style:{height:i.scrollHeight},items:l.visibleOptions,tabindex:-1,disabled:l.virtualScrollerDisabled}),s.createSlots({content:s.withCtx((({styleClass:t,contentRef:i,items:n,getItemOptions:a,contentStyle:r,itemSize:d})=>[s.createElementVNode("ul",{ref:e=>l.listRef(e,i),id:l.id+"_list",class:s.normalizeClass(["p-autocomplete-items",t]),style:s.normalizeStyle(r),role:"listbox"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n,((t,i)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:l.getOptionRenderKey(t,l.getOptionIndex(i,a))},[l.isOptionGroup(t)?(s.openBlock(),s.createElementBlock("li",{key:0,id:l.id+"_"+l.getOptionIndex(i,a),style:s.normalizeStyle({height:d?d+"px":void 0}),class:"p-autocomplete-item-group",role:"option"},[s.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,item:t.optionGroup,index:l.getOptionIndex(i,a)},(()=>[s.createTextVNode(s.toDisplayString(l.getOptionGroupLabel(t.optionGroup)),1)]))],12,w)):s.withDirectives((s.openBlock(),s.createElementBlock("li",{key:1,id:l.id+"_"+l.getOptionIndex(i,a),style:s.normalizeStyle({height:d?d+"px":void 0}),class:s.normalizeClass(["p-autocomplete-item",{"p-highlight":l.isSelected(t),"p-focus":o.focusedOptionIndex===l.getOptionIndex(i,a),"p-disabled":l.isOptionDisabled(t)}]),role:"option","aria-label":l.getOptionLabel(t),"aria-selected":l.isSelected(t),"aria-disabled":l.isOptionDisabled(t),"aria-setsize":l.ariaSetSize,"aria-posinset":l.getAriaPosInset(l.getOptionIndex(i,a)),onClick:e=>l.onOptionSelect(e,t),onMousemove:e=>l.onOptionMouseMove(e,l.getOptionIndex(i,a))},[e.$slots.option?s.renderSlot(e.$slots,"option",{key:0,option:t,index:l.getOptionIndex(i,a)},(()=>[s.createTextVNode(s.toDisplayString(l.getOptionLabel(t)),1)])):s.renderSlot(e.$slots,"item",{key:1,item:t,index:l.getOptionIndex(i,a)},(()=>[s.createTextVNode(s.toDisplayString(l.getOptionLabel(t)),1)]))],46,k)),[[p]])],64)))),128))],14,I),s.createElementVNode("span",S,s.toDisplayString(l.selectedMessageText),1)])),_:2},[e.$slots.loader?{name:"loader",fn:s.withCtx((({options:t})=>[s.renderSlot(e.$slots,"loader",{options:t})])),key:"0"}:void 0]),1040,["style","items","disabled"]),s.renderSlot(e.$slots,"footer",{value:i.modelValue,suggestions:l.visibleOptions})],16)):s.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],2)},h}(primevue.button,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.autocomplete=function(e,t,i,n,o,l,s){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(e),d=a(t),p=a(i),u=a(n),c=a(l),h={name:"AutoComplete",emits:["update:modelValue","change","focus","blur","item-select","item-unselect","dropdown-click","clear","complete","before-show","before-hide","show","hide"],props:{modelValue:null,suggestions:{type:Array,default:null},field:{type:[String,Function],default:null},optionLabel:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},dropdown:{type:Boolean,default:!1},dropdownMode:{type:String,default:"blank"},autoHighlight:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},dataKey:{type:String,default:null},minLength:{type:Number,default:1},delay:{type:Number,default:300},appendTo:{type:String,default:"body"},forceSelection:{type:Boolean,default:!1},completeOnFocus:{type:Boolean,default:!1},inputId:{type:String,default:null},inputStyle:{type:null,default:null},inputClass:{type:String,default:null},inputProps:{type:null,default:null},panelStyle:{type:null,default:null},panelClass:{type:String,default:null},panelProps:{type:null,default:null},dropdownIcon:{type:String,default:"pi pi-chevron-down"},dropdownClass:{type:String,default:null},loadingIcon:{type:String,default:"pi pi-spinner"},removeTokenIcon:{type:String,default:"pi pi-times-circle"},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,searchTimeout:null,focusOnHover:!1,dirty:!1,data:()=>({focused:!1,focusedOptionIndex:-1,focusedMultipleOptionIndex:-1,overlayVisible:!1,searching:!1}),watch:{suggestions(){this.searching&&(o.ObjectUtils.isNotEmpty(this.suggestions)?this.show():this.hide(),this.focusedOptionIndex=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.searching=!1),this.autoUpdateModel()}},mounted(){this.autoUpdateModel()},updated(){this.overlayVisible&&this.alignOverlay()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(o.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.field||this.optionLabel?o.ObjectUtils.resolveFieldData(e,this.field||this.optionLabel):e},getOptionValue:e=>e,getOptionRenderKey(e,t){return(this.dataKey?o.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},isOptionDisabled(e){return!!this.optionDisabled&&o.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return o.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((e=>this.isOptionGroup(e))).length:e)+1},show(e){this.$emit("before-show"),this.dirty=!0,this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&o.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.dirty=e,this.overlayVisible=!1,this.focusedOptionIndex=-1,e&&o.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e)},onBlur(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e)}},onInput(e){this.searchTimeout&&clearTimeout(this.searchTimeout);let t=e.target.value;this.multiple||this.updateModel(e,t),0===t.length?(this.hide(),this.$emit("clear")):t.length>=this.minLength?(this.focusedOptionIndex=-1,this.searchTimeout=setTimeout((()=>{this.search(e,t,"input")}),this.delay)):this.hide()},onChange(e){if(this.forceSelection){let t=!1;if(this.visibleOptions){const i=this.visibleOptions.find((e=>this.isOptionMatched(e,this.$refs.focusInput.value||"")));void 0!==i&&(t=!0,!this.isSelected(i)&&this.onOptionSelect(e,i))}t||(this.$refs.focusInput.value="",this.$emit("clear"),!this.multiple&&this.updateModel(e,null))}},onMultipleContainerFocus(){this.focused=!0},onMultipleContainerBlur(){this.focusedMultipleOptionIndex=-1,this.focused=!1},onMultipleContainerKeyDown(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e)}},onContainerClick(e){this.disabled||this.searching||this.isInputClicked(e)||this.isDropdownClicked(e)||this.overlay&&this.overlay.contains(e.target)||o.DomHandler.focus(this.$refs.focusInput)},onDropdownClick(e){let t;this.overlayVisible?this.hide(!0):(o.DomHandler.focus(this.$refs.focusInput),t=this.$refs.focusInput.value,"blank"===this.dropdownMode?this.search(e,"","dropdown"):"current"===this.dropdownMode&&this.search(e,t,"dropdown")),this.$emit("dropdown-click",{originalEvent:e,query:t})},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t);this.multiple?(this.$refs.focusInput.value="",this.isSelected(t)||this.updateModel(e,[...this.modelValue||[],n])):this.updateModel(e,n),this.$emit("item-select",{originalEvent:e,value:t}),i&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOverlayClick(e){d.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){if(!this.overlayVisible)return;const t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey(e){if(this.overlayVisible)if(e.altKey)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowLeftKey(e){const t=e.currentTarget;this.focusedOptionIndex=-1,this.multiple&&(o.ObjectUtils.isEmpty(t.value)&&this.hasSelectedOption?(o.DomHandler.focus(this.$refs.multiContainer),this.focusedMultipleOptionIndex=this.modelValue.length):e.stopPropagation())},onArrowRightKey(e){this.focusedOptionIndex=-1,this.multiple&&e.stopPropagation()},onHomeKey(e){const t=e.currentTarget.value.length;e.shiftKey?e.currentTarget.setSelectionRange(0,t):e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1,e.preventDefault()},onEndKey(e){const t=e.currentTarget,i=t.value.length;e.shiftKey?e.currentTarget.setSelectionRange(0,i):t.setSelectionRange(i,i),this.focusedOptionIndex=-1,e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e){-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide()},onBackspaceKey(e){if(this.multiple){if(o.ObjectUtils.isNotEmpty(this.modelValue)&&!this.$refs.focusInput.value){const t=this.modelValue[this.modelValue.length-1],i=this.modelValue.slice(0,-1);this.$emit("update:modelValue",i),this.$emit("item-unselect",{originalEvent:e,value:t})}e.stopPropagation()}},onArrowLeftKeyOnMultiple(){this.focusedMultipleOptionIndex=this.focusedMultipleOptionIndex<1?0:this.focusedMultipleOptionIndex-1},onArrowRightKeyOnMultiple(){this.focusedMultipleOptionIndex++,this.focusedMultipleOptionIndex>this.modelValue.length-1&&(this.focusedMultipleOptionIndex=-1,o.DomHandler.focus(this.$refs.focusInput))},onBackspaceKeyOnMultiple(e){-1!==this.focusedMultipleOptionIndex&&this.removeOption(e,this.focusedMultipleOptionIndex)},onOverlayEnter(e){o.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay()},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){o.ZIndexUtils.clear(e)},alignOverlay(){let e=this.multiple?this.$refs.multiContainer:this.$refs.focusInput;"self"===this.appendTo?o.DomHandler.relativePosition(this.overlay,e):(this.overlay.style.minWidth=o.DomHandler.getOuterWidth(e)+"px",o.DomHandler.absolutePosition(this.overlay,e))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&this.isOutsideClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new o.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!o.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!this.overlay.contains(e.target)&&!this.isInputClicked(e)&&!this.isDropdownClicked(e)},isInputClicked(e){return this.multiple?e.target===this.$refs.multiContainer||this.$refs.multiContainer.contains(e.target):e.target===this.$refs.focusInput},isDropdownClicked(e){return!!this.$refs.dropdownButton&&(e.target===this.$refs.dropdownButton||this.$refs.dropdownButton.$el.contains(e.target))},isOptionMatched(e,t){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===t.toLocaleLowerCase(this.searchLocale)},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return o.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return o.ObjectUtils.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?o.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e))):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},search(e,t,i){null!=t&&("input"===i&&0===t.trim().length||(this.searching=!0,this.$emit("complete",{originalEvent:e,query:t})))},removeOption(e,t){const i=this.modelValue[t],n=this.modelValue.filter(((e,i)=>i!==t)).map((e=>this.getOptionValue(e)));this.updateModel(e,n),this.$emit("item-unselect",{originalEvent:e,value:i}),this.dirty=!0,o.DomHandler.focus(this.$refs.focusInput)},changeFocusedOptionIndex(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=o.DomHandler.findSingle(this.list,`li[id="${t}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)}),0)},autoUpdateModel(){(this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce(((e,t,i)=>{e.push({optionGroup:t,group:!0,index:i});const n=this.getOptionGroupChildren(t);return n&&n.forEach((t=>e.push(t))),e}),[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-autocomplete p-component p-inputwrapper",{"p-disabled":this.disabled,"p-focus":this.focused,"p-autocomplete-dd":this.dropdown,"p-autocomplete-multiple":this.multiple,"p-inputwrapper-filled":this.modelValue||o.ObjectUtils.isNotEmpty(this.inputValue),"p-inputwrapper-focus":this.focused,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-autocomplete-input p-inputtext p-component",this.inputClass,{"p-autocomplete-dd-input":this.dropdown}]},multiContainerClass:()=>["p-autocomplete-multiple-container p-component p-inputtext"],panelStyleClass(){return["p-autocomplete-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},loadingIconClass(){return["p-autocomplete-loader pi-spin",this.loadingIcon]},visibleOptions(){return this.optionGroupLabel?this.flatOptions(this.suggestions):this.suggestions||[]},inputValue(){if(this.modelValue){if("object"==typeof this.modelValue){const e=this.getOptionLabel(this.modelValue);return null!=e?e:this.modelValue}return this.modelValue}return""},hasSelectedOption(){return o.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey(){return this.dataKey},searchResultMessageText(){return o.ObjectUtils.isNotEmpty(this.visibleOptions)&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},id(){return this.$attrs.id||o.UniqueComponentId()},focusedOptionId(){return-1!==this.focusedOptionIndex?`${this.id}_${this.focusedOptionIndex}`:null},focusedMultipleOptionId(){return-1!==this.focusedMultipleOptionIndex?`${this.id}_multiple_option_${this.focusedMultipleOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter((e=>!this.isOptionGroup(e))).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},components:{Button:r.default,VirtualScroller:c.default,Portal:p.default},directives:{ripple:u.default}};const f=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],m=["aria-activedescendant"],y=["id","aria-label","aria-setsize","aria-posinset"],b={class:"p-autocomplete-token-label"},g=["onClick"],O={class:"p-autocomplete-input-token",role:"option"},v=["id","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],x={role:"status","aria-live":"polite",class:"p-hidden-accessible"},I=["id"],w=["id"],k=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"],S={role:"status","aria-live":"polite",class:"p-hidden-accessible"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-autocomplete {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n position: relative;\n}\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-autocomplete-dd .p-autocomplete-input {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 1%;\n}\n.p-autocomplete-dd .p-autocomplete-input,\n.p-autocomplete-dd .p-autocomplete-multiple-container {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.p-autocomplete-dd .p-autocomplete-dropdown {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0px;\n}\n.p-autocomplete .p-autocomplete-panel {\n min-width: 100%;\n}\n.p-autocomplete-panel {\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n}\n.p-autocomplete-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-autocomplete-item {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-autocomplete-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-autocomplete-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-autocomplete-token-icon {\n cursor: pointer;\n}\n.p-autocomplete-input-token {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-autocomplete-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n.p-fluid .p-autocomplete {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-fluid .p-autocomplete-dd .p-autocomplete-input {\n width: 1%;\n}\n"),h.render=function(e,t,i,n,o,l){const a=s.resolveComponent("Button"),r=s.resolveComponent("VirtualScroller"),d=s.resolveComponent("Portal"),p=s.resolveDirective("ripple");return s.openBlock(),s.createElementBlock("div",{ref:"container",class:s.normalizeClass(l.containerClass),onClick:t[15]||(t[15]=(...e)=>l.onContainerClick&&l.onContainerClick(...e))},[i.multiple?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("input",s.mergeProps({key:0,ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:l.inputStyleClass,value:l.inputValue,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":l.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>l.onFocus&&l.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>l.onBlur&&l.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>l.onKeyDown&&l.onKeyDown(...e)),onInput:t[3]||(t[3]=(...e)=>l.onInput&&l.onInput(...e)),onChange:t[4]||(t[4]=(...e)=>l.onChange&&l.onChange(...e))},i.inputProps),null,16,f)),i.multiple?(s.openBlock(),s.createElementBlock("ul",{key:1,ref:"multiContainer",class:s.normalizeClass(l.multiContainerClass),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-activedescendant":o.focused?l.focusedMultipleOptionId:void 0,onFocus:t[10]||(t[10]=(...e)=>l.onMultipleContainerFocus&&l.onMultipleContainerFocus(...e)),onBlur:t[11]||(t[11]=(...e)=>l.onMultipleContainerBlur&&l.onMultipleContainerBlur(...e)),onKeydown:t[12]||(t[12]=(...e)=>l.onMultipleContainerKeyDown&&l.onMultipleContainerKeyDown(...e))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.modelValue,((t,n)=>(s.openBlock(),s.createElementBlock("li",{key:n,id:l.id+"_multiple_option_"+n,class:s.normalizeClass(["p-autocomplete-token",{"p-focus":o.focusedMultipleOptionIndex===n}]),role:"option","aria-label":l.getOptionLabel(t),"aria-selected":!0,"aria-setsize":i.modelValue.length,"aria-posinset":n+1},[s.renderSlot(e.$slots,"chip",{value:t},(()=>[s.createElementVNode("span",b,s.toDisplayString(l.getOptionLabel(t)),1)])),s.createElementVNode("span",{class:s.normalizeClass(["p-autocomplete-token-icon",i.removeTokenIcon]),onClick:e=>l.removeOption(e,n),"aria-hidden":"true"},null,10,g)],10,y)))),128)),s.createElementVNode("li",O,[s.createElementVNode("input",s.mergeProps({ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:i.inputClass,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,disabled:i.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":l.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[5]||(t[5]=(...e)=>l.onFocus&&l.onFocus(...e)),onBlur:t[6]||(t[6]=(...e)=>l.onBlur&&l.onBlur(...e)),onKeydown:t[7]||(t[7]=(...e)=>l.onKeyDown&&l.onKeyDown(...e)),onInput:t[8]||(t[8]=(...e)=>l.onInput&&l.onInput(...e)),onChange:t[9]||(t[9]=(...e)=>l.onChange&&l.onChange(...e))},i.inputProps),null,16,v)])],42,m)):s.createCommentVNode("",!0),o.searching?(s.openBlock(),s.createElementBlock("i",{key:2,class:s.normalizeClass(l.loadingIconClass),"aria-hidden":"true"},null,2)):s.createCommentVNode("",!0),i.dropdown?(s.openBlock(),s.createBlock(a,{key:3,ref:"dropdownButton",type:"button",icon:i.dropdownIcon,class:s.normalizeClass(["p-autocomplete-dropdown",i.dropdownClass]),tabindex:"-1",disabled:i.disabled,"aria-hidden":"true",onClick:l.onDropdownClick},null,8,["icon","class","disabled","onClick"])):s.createCommentVNode("",!0),s.createElementVNode("span",x,s.toDisplayString(l.searchResultMessageText),1),s.createVNode(d,{appendTo:i.appendTo},{default:s.withCtx((()=>[s.createVNode(s.Transition,{name:"p-connected-overlay",onEnter:l.onOverlayEnter,onAfterEnter:l.onOverlayAfterEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},{default:s.withCtx((()=>[o.overlayVisible?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,ref:l.overlayRef,class:l.panelStyleClass,style:{...i.panelStyle,"max-height":l.virtualScrollerDisabled?i.scrollHeight:""},onClick:t[13]||(t[13]=(...e)=>l.onOverlayClick&&l.onOverlayClick(...e)),onKeydown:t[14]||(t[14]=(...e)=>l.onOverlayKeyDown&&l.onOverlayKeyDown(...e))},i.panelProps),[s.renderSlot(e.$slots,"header",{value:i.modelValue,suggestions:l.visibleOptions}),s.createVNode(r,s.mergeProps({ref:l.virtualScrollerRef},i.virtualScrollerOptions,{style:{height:i.scrollHeight},items:l.visibleOptions,tabindex:-1,disabled:l.virtualScrollerDisabled}),s.createSlots({content:s.withCtx((({styleClass:t,contentRef:i,items:n,getItemOptions:a,contentStyle:r,itemSize:d})=>[s.createElementVNode("ul",{ref:e=>l.listRef(e,i),id:l.id+"_list",class:s.normalizeClass(["p-autocomplete-items",t]),style:s.normalizeStyle(r),role:"listbox"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n,((t,i)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:l.getOptionRenderKey(t,l.getOptionIndex(i,a))},[l.isOptionGroup(t)?(s.openBlock(),s.createElementBlock("li",{key:0,id:l.id+"_"+l.getOptionIndex(i,a),style:s.normalizeStyle({height:d?d+"px":void 0}),class:"p-autocomplete-item-group",role:"option"},[s.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,item:t.optionGroup,index:l.getOptionIndex(i,a)},(()=>[s.createTextVNode(s.toDisplayString(l.getOptionGroupLabel(t.optionGroup)),1)]))],12,w)):s.withDirectives((s.openBlock(),s.createElementBlock("li",{key:1,id:l.id+"_"+l.getOptionIndex(i,a),style:s.normalizeStyle({height:d?d+"px":void 0}),class:s.normalizeClass(["p-autocomplete-item",{"p-highlight":l.isSelected(t),"p-focus":o.focusedOptionIndex===l.getOptionIndex(i,a),"p-disabled":l.isOptionDisabled(t)}]),role:"option","aria-label":l.getOptionLabel(t),"aria-selected":l.isSelected(t),"aria-disabled":l.isOptionDisabled(t),"aria-setsize":l.ariaSetSize,"aria-posinset":l.getAriaPosInset(l.getOptionIndex(i,a)),onClick:e=>l.onOptionSelect(e,t),onMousemove:e=>l.onOptionMouseMove(e,l.getOptionIndex(i,a))},[e.$slots.option?s.renderSlot(e.$slots,"option",{key:0,option:t,index:l.getOptionIndex(i,a)},(()=>[s.createTextVNode(s.toDisplayString(l.getOptionLabel(t)),1)])):s.renderSlot(e.$slots,"item",{key:1,item:t,index:l.getOptionIndex(i,a)},(()=>[s.createTextVNode(s.toDisplayString(l.getOptionLabel(t)),1)]))],46,k)),[[p]])],64)))),128))],14,I)])),_:2},[e.$slots.loader?{name:"loader",fn:s.withCtx((({options:t})=>[s.renderSlot(e.$slots,"loader",{options:t})])),key:"0"}:void 0]),1040,["style","items","disabled"]),s.renderSlot(e.$slots,"footer",{value:i.modelValue,suggestions:l.visibleOptions}),s.createElementVNode("span",S,s.toDisplayString(l.selectedMessageText),1)],16)):s.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],2)},h}(primevue.button,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,Vue);
|
package/avatar/Avatar.d.ts
CHANGED
|
@@ -30,6 +30,14 @@ export interface AvatarProps {
|
|
|
30
30
|
* Default value is 'square'.
|
|
31
31
|
*/
|
|
32
32
|
shape?: AvatarShapeType;
|
|
33
|
+
/**
|
|
34
|
+
* Establishes a string value that labels the component.
|
|
35
|
+
*/
|
|
36
|
+
'aria-label'?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
|
39
|
+
*/
|
|
40
|
+
'aria-labelledby'?: string | undefined;
|
|
33
41
|
}
|
|
34
42
|
|
|
35
43
|
export interface AvatarSlots {
|
package/avatar/Avatar.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="containerClass">
|
|
2
|
+
<div :class="containerClass" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel">
|
|
3
3
|
<slot>
|
|
4
4
|
<span v-if="label" class="p-avatar-text">{{ label }}</span>
|
|
5
5
|
<span v-else-if="icon" :class="iconClass"></span>
|
|
@@ -32,6 +32,14 @@ export default {
|
|
|
32
32
|
shape: {
|
|
33
33
|
type: String,
|
|
34
34
|
default: 'square'
|
|
35
|
+
},
|
|
36
|
+
'aria-labelledby': {
|
|
37
|
+
type: String,
|
|
38
|
+
default: null
|
|
39
|
+
},
|
|
40
|
+
'aria-label': {
|
|
41
|
+
type: String,
|
|
42
|
+
default: null
|
|
35
43
|
}
|
|
36
44
|
},
|
|
37
45
|
methods: {
|
package/avatar/avatar.cjs.js
CHANGED
|
@@ -25,6 +25,14 @@ var script = {
|
|
|
25
25
|
shape: {
|
|
26
26
|
type: String,
|
|
27
27
|
default: 'square'
|
|
28
|
+
},
|
|
29
|
+
'aria-labelledby': {
|
|
30
|
+
type: String,
|
|
31
|
+
default: null
|
|
32
|
+
},
|
|
33
|
+
'aria-label': {
|
|
34
|
+
type: String,
|
|
35
|
+
default: null
|
|
28
36
|
}
|
|
29
37
|
},
|
|
30
38
|
methods: {
|
|
@@ -50,19 +58,22 @@ var script = {
|
|
|
50
58
|
}
|
|
51
59
|
};
|
|
52
60
|
|
|
53
|
-
const _hoisted_1 =
|
|
61
|
+
const _hoisted_1 = ["aria-labelledby", "aria-label"];
|
|
62
|
+
const _hoisted_2 = {
|
|
54
63
|
key: 0,
|
|
55
64
|
class: "p-avatar-text"
|
|
56
65
|
};
|
|
57
|
-
const
|
|
66
|
+
const _hoisted_3 = ["src"];
|
|
58
67
|
|
|
59
68
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
60
69
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
61
|
-
class: vue.normalizeClass($options.containerClass)
|
|
70
|
+
class: vue.normalizeClass($options.containerClass),
|
|
71
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
72
|
+
"aria-label": _ctx.ariaLabel
|
|
62
73
|
}, [
|
|
63
74
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
64
75
|
($props.label)
|
|
65
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
76
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString($props.label), 1))
|
|
66
77
|
: ($props.icon)
|
|
67
78
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
68
79
|
key: 1,
|
|
@@ -73,10 +84,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
73
84
|
key: 2,
|
|
74
85
|
src: $props.image,
|
|
75
86
|
onError: _cache[0] || (_cache[0] = (...args) => ($options.onError && $options.onError(...args)))
|
|
76
|
-
}, null, 40,
|
|
87
|
+
}, null, 40, _hoisted_3))
|
|
77
88
|
: vue.createCommentVNode("", true)
|
|
78
89
|
])
|
|
79
|
-
],
|
|
90
|
+
], 10, _hoisted_1))
|
|
80
91
|
}
|
|
81
92
|
|
|
82
93
|
function styleInject(css, ref) {
|
package/avatar/avatar.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("vue"),
|
|
1
|
+
"use strict";var e=require("vue"),a={name:"Avatar",emits:["error"],props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},size:{type:String,default:"normal"},shape:{type:String,default:"square"},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onError(){this.$emit("error")}},computed:{containerClass(){return["p-avatar p-component",{"p-avatar-image":null!=this.image,"p-avatar-circle":"circle"===this.shape,"p-avatar-lg":"large"===this.size,"p-avatar-xl":"xlarge"===this.size}]},iconClass(){return["p-avatar-icon",this.icon]}}};const t=["aria-labelledby","aria-label"],n={key:0,class:"p-avatar-text"},r=["src"];!function(e,a){void 0===a&&(a={});var t=a.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("\n.p-avatar {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n}\n.p-avatar.p-avatar-image {\n background-color: transparent;\n}\n.p-avatar.p-avatar-circle {\n border-radius: 50%;\n}\n.p-avatar-circle img {\n border-radius: 50%;\n}\n.p-avatar .p-avatar-icon {\n font-size: 1rem;\n}\n.p-avatar img {\n width: 100%;\n height: 100%;\n}\n"),a.render=function(a,l,i,o,s,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.containerClass),"aria-labelledby":a.ariaLabelledby,"aria-label":a.ariaLabel},[e.renderSlot(a.$slots,"default",{},(()=>[i.label?(e.openBlock(),e.createElementBlock("span",n,e.toDisplayString(i.label),1)):i.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(c.iconClass)},null,2)):i.image?(e.openBlock(),e.createElementBlock("img",{key:2,src:i.image,onError:l[0]||(l[0]=(...e)=>c.onError&&c.onError(...e))},null,40,r)):e.createCommentVNode("",!0)]))],10,t)},module.exports=a;
|
package/avatar/avatar.esm.js
CHANGED
|
@@ -23,6 +23,14 @@ var script = {
|
|
|
23
23
|
shape: {
|
|
24
24
|
type: String,
|
|
25
25
|
default: 'square'
|
|
26
|
+
},
|
|
27
|
+
'aria-labelledby': {
|
|
28
|
+
type: String,
|
|
29
|
+
default: null
|
|
30
|
+
},
|
|
31
|
+
'aria-label': {
|
|
32
|
+
type: String,
|
|
33
|
+
default: null
|
|
26
34
|
}
|
|
27
35
|
},
|
|
28
36
|
methods: {
|
|
@@ -48,19 +56,22 @@ var script = {
|
|
|
48
56
|
}
|
|
49
57
|
};
|
|
50
58
|
|
|
51
|
-
const _hoisted_1 =
|
|
59
|
+
const _hoisted_1 = ["aria-labelledby", "aria-label"];
|
|
60
|
+
const _hoisted_2 = {
|
|
52
61
|
key: 0,
|
|
53
62
|
class: "p-avatar-text"
|
|
54
63
|
};
|
|
55
|
-
const
|
|
64
|
+
const _hoisted_3 = ["src"];
|
|
56
65
|
|
|
57
66
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
58
67
|
return (openBlock(), createElementBlock("div", {
|
|
59
|
-
class: normalizeClass($options.containerClass)
|
|
68
|
+
class: normalizeClass($options.containerClass),
|
|
69
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
70
|
+
"aria-label": _ctx.ariaLabel
|
|
60
71
|
}, [
|
|
61
72
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
62
73
|
($props.label)
|
|
63
|
-
? (openBlock(), createElementBlock("span",
|
|
74
|
+
? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString($props.label), 1))
|
|
64
75
|
: ($props.icon)
|
|
65
76
|
? (openBlock(), createElementBlock("span", {
|
|
66
77
|
key: 1,
|
|
@@ -71,10 +82,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
71
82
|
key: 2,
|
|
72
83
|
src: $props.image,
|
|
73
84
|
onError: _cache[0] || (_cache[0] = (...args) => ($options.onError && $options.onError(...args)))
|
|
74
|
-
}, null, 40,
|
|
85
|
+
}, null, 40, _hoisted_3))
|
|
75
86
|
: createCommentVNode("", true)
|
|
76
87
|
])
|
|
77
|
-
],
|
|
88
|
+
], 10, _hoisted_1))
|
|
78
89
|
}
|
|
79
90
|
|
|
80
91
|
function styleInject(css, ref) {
|
package/avatar/avatar.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{openBlock as e,createElementBlock as a,normalizeClass as
|
|
1
|
+
import{openBlock as e,createElementBlock as a,normalizeClass as t,renderSlot as n,toDisplayString as r,createCommentVNode as l}from"vue";var i={name:"Avatar",emits:["error"],props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},size:{type:String,default:"normal"},shape:{type:String,default:"square"},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onError(){this.$emit("error")}},computed:{containerClass(){return["p-avatar p-component",{"p-avatar-image":null!=this.image,"p-avatar-circle":"circle"===this.shape,"p-avatar-lg":"large"===this.size,"p-avatar-xl":"xlarge"===this.size}]},iconClass(){return["p-avatar-icon",this.icon]}}};const s=["aria-labelledby","aria-label"],o={key:0,class:"p-avatar-text"},c=["src"];!function(e,a){void 0===a&&(a={});var t=a.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("\n.p-avatar {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n}\n.p-avatar.p-avatar-image {\n background-color: transparent;\n}\n.p-avatar.p-avatar-circle {\n border-radius: 50%;\n}\n.p-avatar-circle img {\n border-radius: 50%;\n}\n.p-avatar .p-avatar-icon {\n font-size: 1rem;\n}\n.p-avatar img {\n width: 100%;\n height: 100%;\n}\n"),i.render=function(i,p,d,u,m,g){return e(),a("div",{class:t(g.containerClass),"aria-labelledby":i.ariaLabelledby,"aria-label":i.ariaLabel},[n(i.$slots,"default",{},(()=>[d.label?(e(),a("span",o,r(d.label),1)):d.icon?(e(),a("span",{key:1,class:t(g.iconClass)},null,2)):d.image?(e(),a("img",{key:2,src:d.image,onError:p[0]||(p[0]=(...e)=>g.onError&&g.onError(...e))},null,40,c)):l("",!0)]))],10,s)};export{i as default};
|
package/avatar/avatar.js
CHANGED
|
@@ -25,6 +25,14 @@ this.primevue.avatar = (function (vue) {
|
|
|
25
25
|
shape: {
|
|
26
26
|
type: String,
|
|
27
27
|
default: 'square'
|
|
28
|
+
},
|
|
29
|
+
'aria-labelledby': {
|
|
30
|
+
type: String,
|
|
31
|
+
default: null
|
|
32
|
+
},
|
|
33
|
+
'aria-label': {
|
|
34
|
+
type: String,
|
|
35
|
+
default: null
|
|
28
36
|
}
|
|
29
37
|
},
|
|
30
38
|
methods: {
|
|
@@ -50,19 +58,22 @@ this.primevue.avatar = (function (vue) {
|
|
|
50
58
|
}
|
|
51
59
|
};
|
|
52
60
|
|
|
53
|
-
const _hoisted_1 =
|
|
61
|
+
const _hoisted_1 = ["aria-labelledby", "aria-label"];
|
|
62
|
+
const _hoisted_2 = {
|
|
54
63
|
key: 0,
|
|
55
64
|
class: "p-avatar-text"
|
|
56
65
|
};
|
|
57
|
-
const
|
|
66
|
+
const _hoisted_3 = ["src"];
|
|
58
67
|
|
|
59
68
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
60
69
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
61
|
-
class: vue.normalizeClass($options.containerClass)
|
|
70
|
+
class: vue.normalizeClass($options.containerClass),
|
|
71
|
+
"aria-labelledby": _ctx.ariaLabelledby,
|
|
72
|
+
"aria-label": _ctx.ariaLabel
|
|
62
73
|
}, [
|
|
63
74
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
64
75
|
($props.label)
|
|
65
|
-
? (vue.openBlock(), vue.createElementBlock("span",
|
|
76
|
+
? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString($props.label), 1))
|
|
66
77
|
: ($props.icon)
|
|
67
78
|
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
68
79
|
key: 1,
|
|
@@ -73,10 +84,10 @@ this.primevue.avatar = (function (vue) {
|
|
|
73
84
|
key: 2,
|
|
74
85
|
src: $props.image,
|
|
75
86
|
onError: _cache[0] || (_cache[0] = (...args) => ($options.onError && $options.onError(...args)))
|
|
76
|
-
}, null, 40,
|
|
87
|
+
}, null, 40, _hoisted_3))
|
|
77
88
|
: vue.createCommentVNode("", true)
|
|
78
89
|
])
|
|
79
|
-
],
|
|
90
|
+
], 10, _hoisted_1))
|
|
80
91
|
}
|
|
81
92
|
|
|
82
93
|
function styleInject(css, ref) {
|
package/avatar/avatar.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.avatar=function(e){"use strict";var
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.avatar=function(e){"use strict";var a={name:"Avatar",emits:["error"],props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},size:{type:String,default:"normal"},shape:{type:String,default:"square"},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onError(){this.$emit("error")}},computed:{containerClass(){return["p-avatar p-component",{"p-avatar-image":null!=this.image,"p-avatar-circle":"circle"===this.shape,"p-avatar-lg":"large"===this.size,"p-avatar-xl":"xlarge"===this.size}]},iconClass(){return["p-avatar-icon",this.icon]}}};const t=["aria-labelledby","aria-label"],n={key:0,class:"p-avatar-text"},r=["src"];return function(e,a){void 0===a&&(a={});var t=a.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("\n.p-avatar {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n}\n.p-avatar.p-avatar-image {\n background-color: transparent;\n}\n.p-avatar.p-avatar-circle {\n border-radius: 50%;\n}\n.p-avatar-circle img {\n border-radius: 50%;\n}\n.p-avatar .p-avatar-icon {\n font-size: 1rem;\n}\n.p-avatar img {\n width: 100%;\n height: 100%;\n}\n"),a.render=function(a,l,i,s,o,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.containerClass),"aria-labelledby":a.ariaLabelledby,"aria-label":a.ariaLabel},[e.renderSlot(a.$slots,"default",{},(()=>[i.label?(e.openBlock(),e.createElementBlock("span",n,e.toDisplayString(i.label),1)):i.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(c.iconClass)},null,2)):i.image?(e.openBlock(),e.createElementBlock("img",{key:2,src:i.image,onError:l[0]||(l[0]=(...e)=>c.onError&&c.onError(...e))},null,40,r)):e.createCommentVNode("",!0)]))],10,t)},a}(Vue);
|
package/blockui/BlockUI.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div ref="container" class="p-blockui-container"
|
|
2
|
+
<div ref="container" class="p-blockui-container" :aria-busy="isBlocked">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
@@ -29,6 +29,11 @@ export default {
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
mask: null,
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
isBlocked: false
|
|
35
|
+
};
|
|
36
|
+
},
|
|
32
37
|
watch: {
|
|
33
38
|
blocked(newValue) {
|
|
34
39
|
if (newValue === true) this.block();
|
|
@@ -61,6 +66,7 @@ export default {
|
|
|
61
66
|
ZIndexUtils.set('modal', this.mask, this.baseZIndex + this.$primevue.config.zIndex.modal);
|
|
62
67
|
}
|
|
63
68
|
|
|
69
|
+
this.isBlocked = true;
|
|
64
70
|
this.$emit('block');
|
|
65
71
|
},
|
|
66
72
|
unblock() {
|
|
@@ -79,6 +85,7 @@ export default {
|
|
|
79
85
|
this.$refs.container.removeChild(this.mask);
|
|
80
86
|
}
|
|
81
87
|
|
|
88
|
+
this.isBlocked = false;
|
|
82
89
|
this.$emit('unblock');
|
|
83
90
|
}
|
|
84
91
|
}
|
package/blockui/blockui.cjs.js
CHANGED
|
@@ -25,6 +25,11 @@ var script = {
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
mask: null,
|
|
28
|
+
data() {
|
|
29
|
+
return {
|
|
30
|
+
isBlocked: false
|
|
31
|
+
};
|
|
32
|
+
},
|
|
28
33
|
watch: {
|
|
29
34
|
blocked(newValue) {
|
|
30
35
|
if (newValue === true) this.block();
|
|
@@ -57,6 +62,7 @@ var script = {
|
|
|
57
62
|
utils.ZIndexUtils.set('modal', this.mask, this.baseZIndex + this.$primevue.config.zIndex.modal);
|
|
58
63
|
}
|
|
59
64
|
|
|
65
|
+
this.isBlocked = true;
|
|
60
66
|
this.$emit('block');
|
|
61
67
|
},
|
|
62
68
|
unblock() {
|
|
@@ -75,18 +81,22 @@ var script = {
|
|
|
75
81
|
this.$refs.container.removeChild(this.mask);
|
|
76
82
|
}
|
|
77
83
|
|
|
84
|
+
this.isBlocked = false;
|
|
78
85
|
this.$emit('unblock');
|
|
79
86
|
}
|
|
80
87
|
}
|
|
81
88
|
};
|
|
82
89
|
|
|
90
|
+
const _hoisted_1 = ["aria-busy"];
|
|
91
|
+
|
|
83
92
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
84
|
-
return (vue.openBlock(), vue.createElementBlock("div",
|
|
93
|
+
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
85
94
|
ref: "container",
|
|
86
|
-
class: "p-blockui-container"
|
|
87
|
-
|
|
95
|
+
class: "p-blockui-container",
|
|
96
|
+
"aria-busy": $data.isBlocked
|
|
97
|
+
}, [
|
|
88
98
|
vue.renderSlot(_ctx.$slots, "default")
|
|
89
|
-
],
|
|
99
|
+
], 8, _hoisted_1))
|
|
90
100
|
}
|
|
91
101
|
|
|
92
102
|
function styleInject(css, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),t=require("vue"),o={name:"BlockUI",emits:["block","unblock"],props:{blocked:{type:Boolean,default:!1},fullScreen:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0}},mask:null,watch:{blocked(e){!0===e?this.block():this.unblock()}},mounted(){this.blocked&&this.block()},methods:{block(){let t="p-blockui p-component-overlay p-component-overlay-enter";this.fullScreen?(t+=" p-blockui-document",this.mask=document.createElement("div"),this.mask.setAttribute("class",t),document.body.appendChild(this.mask),e.DomHandler.addClass(document.body,"p-overflow-hidden"),document.activeElement.blur()):(this.mask=document.createElement("div"),this.mask.setAttribute("class",t),this.$refs.container.appendChild(this.mask)),this.autoZIndex&&e.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal),this.$emit("block")},unblock(){e.DomHandler.addClass(this.mask,"p-component-overlay-leave"),this.mask.addEventListener("animationend",(()=>{this.removeMask()}))},removeMask(){e.ZIndexUtils.clear(this.mask),this.fullScreen?(document.body.removeChild(this.mask),e.DomHandler.removeClass(document.body,"p-overflow-hidden")):this.$refs.container.removeChild(this.mask),this.$emit("unblock")}}};!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===o&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-blockui-container {\n position: relative;\n}\n.p-blockui {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.p-blockui.p-component-overlay {\n position: absolute;\n}\n.p-blockui-document.p-component-overlay {\n position: fixed;\n}\n"),o.render=function(e,o,
|
|
1
|
+
"use strict";var e=require("primevue/utils"),t=require("vue"),o={name:"BlockUI",emits:["block","unblock"],props:{blocked:{type:Boolean,default:!1},fullScreen:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0}},mask:null,data:()=>({isBlocked:!1}),watch:{blocked(e){!0===e?this.block():this.unblock()}},mounted(){this.blocked&&this.block()},methods:{block(){let t="p-blockui p-component-overlay p-component-overlay-enter";this.fullScreen?(t+=" p-blockui-document",this.mask=document.createElement("div"),this.mask.setAttribute("class",t),document.body.appendChild(this.mask),e.DomHandler.addClass(document.body,"p-overflow-hidden"),document.activeElement.blur()):(this.mask=document.createElement("div"),this.mask.setAttribute("class",t),this.$refs.container.appendChild(this.mask)),this.autoZIndex&&e.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal),this.isBlocked=!0,this.$emit("block")},unblock(){e.DomHandler.addClass(this.mask,"p-component-overlay-leave"),this.mask.addEventListener("animationend",(()=>{this.removeMask()}))},removeMask(){e.ZIndexUtils.clear(this.mask),this.fullScreen?(document.body.removeChild(this.mask),e.DomHandler.removeClass(document.body,"p-overflow-hidden")):this.$refs.container.removeChild(this.mask),this.isBlocked=!1,this.$emit("unblock")}}};const n=["aria-busy"];!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===o&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}("\n.p-blockui-container {\n position: relative;\n}\n.p-blockui {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.p-blockui.p-component-overlay {\n position: absolute;\n}\n.p-blockui-document.p-component-overlay {\n position: fixed;\n}\n"),o.render=function(e,o,s,i,l,a){return t.openBlock(),t.createElementBlock("div",{ref:"container",class:"p-blockui-container","aria-busy":l.isBlocked},[t.renderSlot(e.$slots,"default")],8,n)},module.exports=o;
|
package/blockui/blockui.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DomHandler, ZIndexUtils } from 'primevue/utils';
|
|
2
|
-
import { openBlock, createElementBlock,
|
|
2
|
+
import { openBlock, createElementBlock, renderSlot } from 'vue';
|
|
3
3
|
|
|
4
4
|
var script = {
|
|
5
5
|
name: 'BlockUI',
|
|
@@ -23,6 +23,11 @@ var script = {
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
mask: null,
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
isBlocked: false
|
|
29
|
+
};
|
|
30
|
+
},
|
|
26
31
|
watch: {
|
|
27
32
|
blocked(newValue) {
|
|
28
33
|
if (newValue === true) this.block();
|
|
@@ -55,6 +60,7 @@ var script = {
|
|
|
55
60
|
ZIndexUtils.set('modal', this.mask, this.baseZIndex + this.$primevue.config.zIndex.modal);
|
|
56
61
|
}
|
|
57
62
|
|
|
63
|
+
this.isBlocked = true;
|
|
58
64
|
this.$emit('block');
|
|
59
65
|
},
|
|
60
66
|
unblock() {
|
|
@@ -73,18 +79,22 @@ var script = {
|
|
|
73
79
|
this.$refs.container.removeChild(this.mask);
|
|
74
80
|
}
|
|
75
81
|
|
|
82
|
+
this.isBlocked = false;
|
|
76
83
|
this.$emit('unblock');
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
86
|
};
|
|
80
87
|
|
|
88
|
+
const _hoisted_1 = ["aria-busy"];
|
|
89
|
+
|
|
81
90
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
82
|
-
return (openBlock(), createElementBlock("div",
|
|
91
|
+
return (openBlock(), createElementBlock("div", {
|
|
83
92
|
ref: "container",
|
|
84
|
-
class: "p-blockui-container"
|
|
85
|
-
|
|
93
|
+
class: "p-blockui-container",
|
|
94
|
+
"aria-busy": $data.isBlocked
|
|
95
|
+
}, [
|
|
86
96
|
renderSlot(_ctx.$slots, "default")
|
|
87
|
-
],
|
|
97
|
+
], 8, _hoisted_1))
|
|
88
98
|
}
|
|
89
99
|
|
|
90
100
|
function styleInject(css, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DomHandler as e,ZIndexUtils as t}from"primevue/utils";import{openBlock as o,createElementBlock as n,
|
|
1
|
+
import{DomHandler as e,ZIndexUtils as t}from"primevue/utils";import{openBlock as o,createElementBlock as n,renderSlot as i}from"vue";var s={name:"BlockUI",emits:["block","unblock"],props:{blocked:{type:Boolean,default:!1},fullScreen:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0}},mask:null,data:()=>({isBlocked:!1}),watch:{blocked(e){!0===e?this.block():this.unblock()}},mounted(){this.blocked&&this.block()},methods:{block(){let o="p-blockui p-component-overlay p-component-overlay-enter";this.fullScreen?(o+=" p-blockui-document",this.mask=document.createElement("div"),this.mask.setAttribute("class",o),document.body.appendChild(this.mask),e.addClass(document.body,"p-overflow-hidden"),document.activeElement.blur()):(this.mask=document.createElement("div"),this.mask.setAttribute("class",o),this.$refs.container.appendChild(this.mask)),this.autoZIndex&&t.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal),this.isBlocked=!0,this.$emit("block")},unblock(){e.addClass(this.mask,"p-component-overlay-leave"),this.mask.addEventListener("animationend",(()=>{this.removeMask()}))},removeMask(){t.clear(this.mask),this.fullScreen?(document.body.removeChild(this.mask),e.removeClass(document.body,"p-overflow-hidden")):this.$refs.container.removeChild(this.mask),this.isBlocked=!1,this.$emit("unblock")}}};const l=["aria-busy"];!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-blockui-container {\n position: relative;\n}\n.p-blockui {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.p-blockui.p-component-overlay {\n position: absolute;\n}\n.p-blockui-document.p-component-overlay {\n position: fixed;\n}\n"),s.render=function(e,t,s,a,d,c){return o(),n("div",{ref:"container",class:"p-blockui-container","aria-busy":d.isBlocked},[i(e.$slots,"default")],8,l)};export{s as default};
|