primevue 3.20.0 → 3.22.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/README.md +3 -15
- package/accordion/accordion.cjs.js +1 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +1 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +1 -1
- package/accordion/accordion.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +9 -1
- package/autocomplete/AutoComplete.vue +41 -22
- package/autocomplete/autocomplete.cjs.js +53 -25
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +53 -25
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +53 -25
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +1 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +1 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +1 -1
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +1 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +1 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +1 -1
- package/avatargroup/avatargroup.min.js +1 -1
- package/badgedirective/badgedirective.cjs.js +1 -1
- package/badgedirective/badgedirective.cjs.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +1 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +1 -1
- package/badgedirective/badgedirective.min.js +1 -1
- package/breadcrumb/Breadcrumb.vue +1 -1
- package/breadcrumb/breadcrumb.cjs.js +2 -3
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +2 -3
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +2 -3
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/Calendar.d.ts +1 -1
- package/calendar/Calendar.vue +3 -2
- package/calendar/calendar.cjs.js +4 -3
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +4 -3
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +4 -3
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.d.ts +9 -1
- package/carousel/Carousel.vue +144 -19
- package/carousel/carousel.cjs.js +159 -45
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +160 -46
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +160 -46
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.vue +9 -4
- package/cascadeselect/cascadeselect.cjs.js +9 -4
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +9 -4
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +9 -4
- 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/checkbox/Checkbox.vue +1 -3
- package/checkbox/checkbox.cjs.js +3 -4
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +4 -5
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +3 -4
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +1 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +1 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +1 -1
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +1 -1
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -1
- package/chips/chips.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 +37 -0
- package/config/config.cjs.js +38 -1
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +38 -1
- package/config/config.esm.min.js +1 -1
- package/config/config.js +38 -1
- package/config/config.min.js +1 -1
- package/confirmationservice/ConfirmationService.d.ts +1 -1
- package/confirmdialog/ConfirmDialog.vue +1 -1
- package/confirmdialog/confirmdialog.cjs.js +6 -3
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +7 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +6 -3
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.vue +11 -10
- package/confirmpopup/confirmpopup.cjs.js +15 -13
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +15 -13
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +15 -13
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenuSub.vue +3 -5
- package/contextmenu/contextmenu.cjs.js +4 -6
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +4 -6
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +4 -6
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +537 -261
- package/core/core.min.js +13 -13
- package/datatable/BodyCell.vue +39 -14
- package/datatable/ColumnFilter.vue +67 -41
- package/datatable/DataTable.d.ts +11 -3
- 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 +540 -269
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +539 -269
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +539 -269
- 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.vue +12 -7
- package/dialog/dialog.cjs.js +15 -10
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +15 -10
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +15 -10
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +1 -1
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +1 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -1
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +1 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +1 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.vue +24 -16
- package/dropdown/dropdown.cjs.js +25 -17
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +25 -17
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +25 -17
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.vue +7 -1
- package/editor/editor.cjs.js +35 -6
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +35 -6
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +35 -6
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.vue +1 -1
- package/fieldset/fieldset.cjs.js +2 -2
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +2 -2
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +3 -3
- 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 +3 -3
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +3 -3
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +3 -3
- 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 +259 -123
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +258 -123
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +259 -124
- package/galleria/galleria.min.js +1 -1
- package/image/Image.vue +71 -13
- package/image/image.cjs.js +113 -40
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +113 -41
- package/image/image.esm.min.js +1 -1
- package/image/image.js +113 -41
- package/image/image.min.js +1 -1
- package/inlinemessage/inlinemessage.cjs.js +1 -1
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +1 -1
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +1 -1
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/inplace.cjs.js +1 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +1 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +1 -1
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/InputNumber.vue +11 -20
- package/inputnumber/inputnumber.cjs.js +12 -21
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +12 -21
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +12 -21
- package/inputnumber/inputnumber.min.js +1 -1
- package/knob/knob.cjs.js +1 -1
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +1 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +1 -1
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.vue +12 -8
- package/listbox/listbox.cjs.js +13 -9
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +13 -9
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +14 -10
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.vue +10 -1
- package/megamenu/MegaMenuSub.vue +3 -5
- package/megamenu/megamenu.cjs.js +14 -7
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +14 -7
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +14 -7
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.vue +8 -2
- package/menu/menu.cjs.js +9 -3
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +9 -3
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +9 -3
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.vue +7 -2
- package/menubar/MenubarSub.vue +3 -5
- package/menubar/menubar.cjs.js +11 -8
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +11 -8
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +11 -8
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +5 -1
- package/message/Message.vue +15 -5
- package/message/message.cjs.js +24 -10
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +25 -11
- package/message/message.esm.min.js +1 -1
- package/message/message.js +24 -10
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.vue +53 -36
- package/multiselect/multiselect.cjs.js +54 -37
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +55 -38
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +54 -37
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +33 -1
- package/orderlist/OrderList.vue +265 -63
- package/orderlist/orderlist.cjs.js +280 -70
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +281 -71
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +281 -71
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChartNode.vue +7 -1
- package/organizationchart/organizationchart.cjs.js +8 -2
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +9 -3
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +8 -2
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +1 -1
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +1 -1
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +1 -1
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +2 -2
- package/paginator/CurrentPageReport.vue +0 -1
- package/paginator/JumpToPageDropdown.vue +0 -1
- package/paginator/JumpToPageInput.vue +19 -4
- package/paginator/PageLinks.vue +16 -1
- package/paginator/Paginator.vue +24 -11
- package/paginator/RowsPerPageDropdown.vue +0 -1
- package/paginator/paginator.cjs.js +51 -20
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +51 -20
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +51 -20
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.vue +2 -2
- package/panel/panel.cjs.js +3 -3
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -3
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +4 -4
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.vue +4 -4
- package/panelmenu/PanelMenuList.vue +57 -0
- package/panelmenu/PanelMenuSub.vue +3 -5
- package/panelmenu/panelmenu.cjs.js +78 -10
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +78 -10
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +78 -10
- 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 +305 -58
- package/picklist/picklist.cjs.js +350 -89
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +351 -90
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +351 -90
- package/picklist/picklist.min.js +1 -1
- package/progressbar/progressbar.cjs.js +1 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +1 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +1 -1
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.vue +0 -47
- package/progressspinner/progressspinner.cjs.js +1 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +1 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +1 -1
- package/progressspinner/progressspinner.min.js +1 -1
- package/rating/Rating.d.ts +1 -0
- package/rating/rating.cjs.js +1 -1
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +1 -1
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +1 -1
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +2 -6
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +77 -14
- package/resources/themes/arya-green/theme.css +77 -14
- package/resources/themes/arya-orange/theme.css +77 -14
- package/resources/themes/arya-purple/theme.css +77 -14
- package/resources/themes/bootstrap4-dark-blue/theme.css +77 -14
- package/resources/themes/bootstrap4-dark-purple/theme.css +77 -14
- package/resources/themes/bootstrap4-light-blue/theme.css +77 -14
- package/resources/themes/bootstrap4-light-purple/theme.css +77 -14
- package/resources/themes/fluent-light/theme.css +77 -14
- package/resources/themes/lara-dark-blue/theme.css +81 -14
- package/resources/themes/lara-dark-indigo/theme.css +81 -14
- package/resources/themes/lara-dark-purple/theme.css +81 -14
- package/resources/themes/lara-dark-teal/theme.css +81 -14
- package/resources/themes/lara-light-blue/theme.css +81 -14
- package/resources/themes/lara-light-indigo/theme.css +81 -14
- package/resources/themes/lara-light-purple/theme.css +81 -14
- package/resources/themes/lara-light-teal/theme.css +81 -14
- package/resources/themes/luna-amber/theme.css +77 -14
- package/resources/themes/luna-blue/theme.css +77 -14
- package/resources/themes/luna-green/theme.css +77 -14
- package/resources/themes/luna-pink/theme.css +77 -14
- package/resources/themes/md-dark-deeppurple/theme.css +101 -20
- package/resources/themes/md-dark-indigo/theme.css +101 -20
- package/resources/themes/md-light-deeppurple/theme.css +101 -20
- package/resources/themes/md-light-indigo/theme.css +101 -20
- package/resources/themes/mdc-dark-deeppurple/theme.css +101 -20
- package/resources/themes/mdc-dark-indigo/theme.css +101 -20
- package/resources/themes/mdc-light-deeppurple/theme.css +101 -20
- package/resources/themes/mdc-light-indigo/theme.css +101 -20
- package/resources/themes/nova/theme.css +77 -14
- package/resources/themes/nova-accent/theme.css +77 -14
- package/resources/themes/nova-alt/theme.css +77 -14
- package/resources/themes/nova-vue/theme.css +77 -14
- package/resources/themes/rhea/theme.css +77 -14
- package/resources/themes/saga-blue/theme.css +77 -14
- package/resources/themes/saga-green/theme.css +77 -14
- package/resources/themes/saga-orange/theme.css +77 -14
- package/resources/themes/saga-purple/theme.css +77 -14
- package/resources/themes/tailwind-light/theme.css +81 -14
- package/resources/themes/vela-blue/theme.css +77 -14
- package/resources/themes/vela-green/theme.css +77 -14
- package/resources/themes/vela-orange/theme.css +77 -14
- package/resources/themes/vela-purple/theme.css +77 -14
- package/scrollpanel/scrollpanel.cjs.js +1 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +1 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +1 -1
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +1 -1
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +1 -1
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +1 -1
- 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/sidebar/Sidebar.d.ts +4 -0
- package/sidebar/Sidebar.vue +210 -142
- package/sidebar/sidebar.cjs.js +146 -121
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +147 -122
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +146 -121
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +1 -1
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +1 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +1 -1
- package/skeleton/skeleton.min.js +1 -1
- package/slider/slider.cjs.js +1 -1
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +1 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +1 -1
- package/slider/slider.min.js +1 -1
- package/speeddial/SpeedDial.d.ts +19 -1
- package/speeddial/SpeedDial.vue +254 -7
- package/speeddial/speeddial.cjs.js +255 -14
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +256 -15
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +255 -14
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +20 -4
- package/splitbutton/SplitButton.vue +56 -8
- package/splitbutton/splitbutton.cjs.js +57 -17
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +57 -17
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +57 -17
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.vue +1 -1
- package/splitter/splitter.cjs.js +1 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +1 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +1 -1
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +1 -1
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +1 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +1 -1
- package/steps/steps.min.js +1 -1
- package/tabmenu/TabMenu.vue +4 -16
- package/tabmenu/tabmenu.cjs.js +19 -16
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +19 -16
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +19 -16
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/TabView.vue +2 -2
- package/tabview/tabview.cjs.js +3 -3
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +3 -3
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +3 -3
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +1 -1
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +1 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +1 -1
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +1 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +1 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +1 -1
- package/terminal/terminal.min.js +1 -1
- package/tieredmenu/TieredMenu.vue +13 -3
- package/tieredmenu/TieredMenuSub.vue +3 -5
- package/tieredmenu/tieredmenu.cjs.js +17 -9
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +17 -9
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +17 -9
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +1 -1
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +1 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +1 -1
- package/timeline/timeline.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 +49 -13
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +50 -14
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +49 -13
- 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 +193 -59
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +193 -59
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +193 -59
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.vue +40 -26
- package/treeselect/treeselect.cjs.js +46 -30
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +44 -28
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +45 -29
- 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 +798 -621
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +795 -618
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +795 -618
- package/treetable/treetable.min.js +1 -1
- package/utils/utils.cjs.js +67 -47
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +67 -47
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +67 -47
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +35 -283
- package/vetur-tags.json +26 -89
- package/virtualscroller/virtualscroller.cjs.js +1 -1
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +1 -1
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +94 -998
- package/galleria/GalleriaItemSlot.vue +0 -53
package/carousel/carousel.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var utils = require('primevue/utils');
|
|
4
3
|
var Ripple = require('primevue/ripple');
|
|
4
|
+
var utils = require('primevue/utils');
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -52,11 +52,19 @@ var script = {
|
|
|
52
52
|
showIndicators: {
|
|
53
53
|
type: Boolean,
|
|
54
54
|
default: true
|
|
55
|
+
},
|
|
56
|
+
prevButtonProps: {
|
|
57
|
+
type: null,
|
|
58
|
+
default: null
|
|
59
|
+
},
|
|
60
|
+
nextButtonProps: {
|
|
61
|
+
type: null,
|
|
62
|
+
default: null
|
|
55
63
|
}
|
|
56
64
|
},
|
|
65
|
+
isRemainingItemsAdded: false,
|
|
57
66
|
data() {
|
|
58
67
|
return {
|
|
59
|
-
id: utils.UniqueComponentId(),
|
|
60
68
|
remainingItems: 0,
|
|
61
69
|
d_numVisible: this.numVisible,
|
|
62
70
|
d_numScroll: this.numScroll,
|
|
@@ -70,7 +78,6 @@ var script = {
|
|
|
70
78
|
swipeThreshold: 20
|
|
71
79
|
};
|
|
72
80
|
},
|
|
73
|
-
isRemainingItemsAdded: false,
|
|
74
81
|
watch: {
|
|
75
82
|
page(newValue) {
|
|
76
83
|
this.d_page = newValue;
|
|
@@ -93,6 +100,7 @@ var script = {
|
|
|
93
100
|
mounted() {
|
|
94
101
|
let stateChanged = false;
|
|
95
102
|
|
|
103
|
+
this.$el.setAttribute(this.attributeSelector, '');
|
|
96
104
|
this.createStyle();
|
|
97
105
|
this.calculatePosition();
|
|
98
106
|
|
|
@@ -364,6 +372,81 @@ var script = {
|
|
|
364
372
|
}
|
|
365
373
|
}
|
|
366
374
|
},
|
|
375
|
+
onIndicatorKeydown(event) {
|
|
376
|
+
switch (event.code) {
|
|
377
|
+
case 'ArrowRight':
|
|
378
|
+
this.onRightKey();
|
|
379
|
+
break;
|
|
380
|
+
|
|
381
|
+
case 'ArrowLeft':
|
|
382
|
+
this.onLeftKey();
|
|
383
|
+
break;
|
|
384
|
+
|
|
385
|
+
case 'Home':
|
|
386
|
+
this.onHomeKey();
|
|
387
|
+
event.preventDefault();
|
|
388
|
+
break;
|
|
389
|
+
|
|
390
|
+
case 'End':
|
|
391
|
+
this.onEndKey();
|
|
392
|
+
event.preventDefault();
|
|
393
|
+
break;
|
|
394
|
+
|
|
395
|
+
case 'ArrowUp':
|
|
396
|
+
case 'ArrowDown':
|
|
397
|
+
event.preventDefault();
|
|
398
|
+
break;
|
|
399
|
+
|
|
400
|
+
case 'Tab':
|
|
401
|
+
this.onTabKey();
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
onRightKey() {
|
|
406
|
+
const indicators = [...utils.DomHandler.find(this.$refs.indicatorContent, '.p-carousel-indicator')];
|
|
407
|
+
const activeIndex = this.findFocusedIndicatorIndex();
|
|
408
|
+
|
|
409
|
+
this.changedFocusedIndicator(activeIndex, activeIndex + 1 === indicators.length ? indicators.length - 1 : activeIndex + 1);
|
|
410
|
+
},
|
|
411
|
+
onLeftKey() {
|
|
412
|
+
const activeIndex = this.findFocusedIndicatorIndex();
|
|
413
|
+
|
|
414
|
+
this.changedFocusedIndicator(activeIndex, activeIndex - 1 <= 0 ? 0 : activeIndex - 1);
|
|
415
|
+
},
|
|
416
|
+
onHomeKey() {
|
|
417
|
+
const activeIndex = this.findFocusedIndicatorIndex();
|
|
418
|
+
|
|
419
|
+
this.changedFocusedIndicator(activeIndex, 0);
|
|
420
|
+
},
|
|
421
|
+
onEndKey() {
|
|
422
|
+
const indicators = [...utils.DomHandler.find(this.$refs.indicatorContent, '.p-carousel-indicator')];
|
|
423
|
+
const activeIndex = this.findFocusedIndicatorIndex();
|
|
424
|
+
|
|
425
|
+
this.changedFocusedIndicator(activeIndex, indicators.length - 1);
|
|
426
|
+
},
|
|
427
|
+
onTabKey() {
|
|
428
|
+
const indicators = [...utils.DomHandler.find(this.$refs.indicatorContent, '.p-carousel-indicator')];
|
|
429
|
+
const highlightedIndex = indicators.findIndex((ind) => utils.DomHandler.hasClass(ind, 'p-highlight'));
|
|
430
|
+
|
|
431
|
+
const activeIndicator = utils.DomHandler.findSingle(this.$refs.indicatorContent, '.p-carousel-indicator > button[tabindex="0"]');
|
|
432
|
+
const activeIndex = indicators.findIndex((ind) => ind === activeIndicator.parentElement);
|
|
433
|
+
|
|
434
|
+
indicators[activeIndex].children[0].tabIndex = '-1';
|
|
435
|
+
indicators[highlightedIndex].children[0].tabIndex = '0';
|
|
436
|
+
},
|
|
437
|
+
findFocusedIndicatorIndex() {
|
|
438
|
+
const indicators = [...utils.DomHandler.find(this.$refs.indicatorContent, '.p-carousel-indicator')];
|
|
439
|
+
const activeIndicator = utils.DomHandler.findSingle(this.$refs.indicatorContent, '.p-carousel-indicator > button[tabindex="0"]');
|
|
440
|
+
|
|
441
|
+
return indicators.findIndex((ind) => ind === activeIndicator.parentElement);
|
|
442
|
+
},
|
|
443
|
+
changedFocusedIndicator(prevInd, nextInd) {
|
|
444
|
+
const indicators = [...utils.DomHandler.find(this.$refs.indicatorContent, '.p-carousel-indicator')];
|
|
445
|
+
|
|
446
|
+
indicators[prevInd].children[0].tabIndex = '-1';
|
|
447
|
+
indicators[nextInd].children[0].tabIndex = '0';
|
|
448
|
+
indicators[nextInd].children[0].focus();
|
|
449
|
+
},
|
|
367
450
|
bindDocumentListeners() {
|
|
368
451
|
if (!this.documentResizeListener) {
|
|
369
452
|
this.documentResizeListener = (e) => {
|
|
@@ -401,10 +484,10 @@ var script = {
|
|
|
401
484
|
}
|
|
402
485
|
|
|
403
486
|
let innerHTML = `
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
487
|
+
.p-carousel[${this.attributeSelector}] .p-carousel-item {
|
|
488
|
+
flex: 1 0 ${100 / this.d_numVisible}%
|
|
489
|
+
}
|
|
490
|
+
`;
|
|
408
491
|
|
|
409
492
|
if (this.responsiveOptions) {
|
|
410
493
|
let _responsiveOptions = [...this.responsiveOptions];
|
|
@@ -427,12 +510,12 @@ var script = {
|
|
|
427
510
|
let res = _responsiveOptions[i];
|
|
428
511
|
|
|
429
512
|
innerHTML += `
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
513
|
+
@media screen and (max-width: ${res.breakpoint}) {
|
|
514
|
+
.p-carousel[${this.attributeSelector}] .p-carousel-item {
|
|
515
|
+
flex: 1 0 ${100 / res.numVisible}%
|
|
516
|
+
}
|
|
433
517
|
}
|
|
434
|
-
|
|
435
|
-
`;
|
|
518
|
+
`;
|
|
436
519
|
}
|
|
437
520
|
}
|
|
438
521
|
|
|
@@ -452,6 +535,12 @@ var script = {
|
|
|
452
535
|
},
|
|
453
536
|
lastIndex() {
|
|
454
537
|
return this.firstIndex() + this.d_numVisible - 1;
|
|
538
|
+
},
|
|
539
|
+
ariaSlideNumber(value) {
|
|
540
|
+
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g, value) : undefined;
|
|
541
|
+
},
|
|
542
|
+
ariaPageLabel(value) {
|
|
543
|
+
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g, value) : undefined;
|
|
455
544
|
}
|
|
456
545
|
},
|
|
457
546
|
computed: {
|
|
@@ -472,6 +561,18 @@ var script = {
|
|
|
472
561
|
},
|
|
473
562
|
indicatorsContentClasses() {
|
|
474
563
|
return ['p-carousel-indicators p-reset', this.indicatorsContentClass];
|
|
564
|
+
},
|
|
565
|
+
ariaSlideLabel() {
|
|
566
|
+
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.slide : undefined;
|
|
567
|
+
},
|
|
568
|
+
ariaPrevButtonLabel() {
|
|
569
|
+
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.prevPageLabel : undefined;
|
|
570
|
+
},
|
|
571
|
+
ariaNextButtonLabel() {
|
|
572
|
+
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.nextPageLabel : undefined;
|
|
573
|
+
},
|
|
574
|
+
attributeSelector() {
|
|
575
|
+
return utils.UniqueComponentId();
|
|
475
576
|
}
|
|
476
577
|
},
|
|
477
578
|
directives: {
|
|
@@ -479,15 +580,16 @@ var script = {
|
|
|
479
580
|
}
|
|
480
581
|
};
|
|
481
582
|
|
|
482
|
-
const _hoisted_1 =
|
|
483
|
-
const _hoisted_2 = {
|
|
583
|
+
const _hoisted_1 = {
|
|
484
584
|
key: 0,
|
|
485
585
|
class: "p-carousel-header"
|
|
486
586
|
};
|
|
487
|
-
const
|
|
488
|
-
const
|
|
489
|
-
const
|
|
490
|
-
const
|
|
587
|
+
const _hoisted_2 = ["aria-live"];
|
|
588
|
+
const _hoisted_3 = ["disabled", "aria-label"];
|
|
589
|
+
const _hoisted_4 = ["aria-hidden", "aria-label", "aria-roledescription"];
|
|
590
|
+
const _hoisted_5 = ["disabled", "aria-label"];
|
|
591
|
+
const _hoisted_6 = ["tabindex", "aria-label", "aria-current", "onClick"];
|
|
592
|
+
const _hoisted_7 = {
|
|
491
593
|
key: 1,
|
|
492
594
|
class: "p-carousel-footer"
|
|
493
595
|
};
|
|
@@ -496,11 +598,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
496
598
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
497
599
|
|
|
498
600
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
499
|
-
|
|
500
|
-
|
|
601
|
+
class: vue.normalizeClass(['p-carousel p-component', { 'p-carousel-vertical': $options.isVertical(), 'p-carousel-horizontal': !$options.isVertical() }]),
|
|
602
|
+
role: "region"
|
|
501
603
|
}, [
|
|
502
604
|
(_ctx.$slots.header)
|
|
503
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
605
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
504
606
|
vue.renderSlot(_ctx.$slots, "header")
|
|
505
607
|
]))
|
|
506
608
|
: vue.createCommentVNode("", true),
|
|
@@ -508,20 +610,22 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
508
610
|
class: vue.normalizeClass($options.contentClasses)
|
|
509
611
|
}, [
|
|
510
612
|
vue.createElementVNode("div", {
|
|
511
|
-
class: vue.normalizeClass($options.containerClasses)
|
|
613
|
+
class: vue.normalizeClass($options.containerClasses),
|
|
614
|
+
"aria-live": $data.allowAutoplay ? 'polite' : 'off'
|
|
512
615
|
}, [
|
|
513
616
|
($props.showNavigators)
|
|
514
|
-
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
617
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
|
|
515
618
|
key: 0,
|
|
516
|
-
|
|
619
|
+
type: "button",
|
|
620
|
+
class: ['p-carousel-prev p-link', { 'p-disabled': $options.backwardIsDisabled }],
|
|
517
621
|
disabled: $options.backwardIsDisabled,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
}, [
|
|
622
|
+
"aria-label": $options.ariaPrevButtonLabel,
|
|
623
|
+
onClick: _cache[0] || (_cache[0] = (...args) => ($options.navBackward && $options.navBackward(...args)))
|
|
624
|
+
}, $props.prevButtonProps), [
|
|
521
625
|
vue.createElementVNode("span", {
|
|
522
626
|
class: vue.normalizeClass(['p-carousel-prev-icon pi', { 'pi-chevron-left': !$options.isVertical(), 'pi-chevron-up': $options.isVertical() }])
|
|
523
627
|
}, null, 2)
|
|
524
|
-
],
|
|
628
|
+
], 16, _hoisted_3)), [
|
|
525
629
|
[_directive_ripple]
|
|
526
630
|
])
|
|
527
631
|
: vue.createCommentVNode("", true),
|
|
@@ -556,13 +660,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
556
660
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($props.value, (item, index) => {
|
|
557
661
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
558
662
|
key: index,
|
|
559
|
-
class: vue.normalizeClass(['p-carousel-item', { 'p-carousel-item-active': $options.firstIndex() <= index && $options.lastIndex() >= index, 'p-carousel-item-start': $options.firstIndex() === index, 'p-carousel-item-end': $options.lastIndex() === index }])
|
|
663
|
+
class: vue.normalizeClass(['p-carousel-item', { 'p-carousel-item-active': $options.firstIndex() <= index && $options.lastIndex() >= index, 'p-carousel-item-start': $options.firstIndex() === index, 'p-carousel-item-end': $options.lastIndex() === index }]),
|
|
664
|
+
role: "group",
|
|
665
|
+
"aria-hidden": $options.firstIndex() > index || $options.lastIndex() < index ? true : undefined,
|
|
666
|
+
"aria-label": $options.ariaSlideNumber(index),
|
|
667
|
+
"aria-roledescription": $options.ariaSlideLabel
|
|
560
668
|
}, [
|
|
561
669
|
vue.renderSlot(_ctx.$slots, "item", {
|
|
562
670
|
data: item,
|
|
563
671
|
index: index
|
|
564
672
|
})
|
|
565
|
-
],
|
|
673
|
+
], 10, _hoisted_4))
|
|
566
674
|
}), 128)),
|
|
567
675
|
($options.isCircular())
|
|
568
676
|
? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList($props.value.slice(0, $data.d_numVisible), (item, index) => {
|
|
@@ -580,25 +688,28 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
580
688
|
], 544)
|
|
581
689
|
], 36),
|
|
582
690
|
($props.showNavigators)
|
|
583
|
-
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
|
|
691
|
+
? vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
|
|
584
692
|
key: 1,
|
|
585
|
-
|
|
693
|
+
type: "button",
|
|
694
|
+
class: ['p-carousel-next p-link', { 'p-disabled': $options.forwardIsDisabled }],
|
|
586
695
|
disabled: $options.forwardIsDisabled,
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
}, [
|
|
696
|
+
"aria-label": $options.ariaNextButtonLabel,
|
|
697
|
+
onClick: _cache[5] || (_cache[5] = (...args) => ($options.navForward && $options.navForward(...args)))
|
|
698
|
+
}, $props.nextButtonProps), [
|
|
590
699
|
vue.createElementVNode("span", {
|
|
591
700
|
class: vue.normalizeClass(['p-carousel-prev-icon pi', { 'pi-chevron-right': !$options.isVertical(), 'pi-chevron-down': $options.isVertical() }])
|
|
592
701
|
}, null, 2)
|
|
593
|
-
],
|
|
702
|
+
], 16, _hoisted_5)), [
|
|
594
703
|
[_directive_ripple]
|
|
595
704
|
])
|
|
596
705
|
: vue.createCommentVNode("", true)
|
|
597
|
-
],
|
|
706
|
+
], 10, _hoisted_2),
|
|
598
707
|
($options.totalIndicators >= 0 && $props.showIndicators)
|
|
599
708
|
? (vue.openBlock(), vue.createElementBlock("ul", {
|
|
600
709
|
key: 0,
|
|
601
|
-
|
|
710
|
+
ref: "indicatorContent",
|
|
711
|
+
class: vue.normalizeClass($options.indicatorsContentClasses),
|
|
712
|
+
onKeydown: _cache[6] || (_cache[6] = (...args) => ($options.onIndicatorKeydown && $options.onIndicatorKeydown(...args)))
|
|
602
713
|
}, [
|
|
603
714
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.totalIndicators, (indicator, i) => {
|
|
604
715
|
return (vue.openBlock(), vue.createElementBlock("li", {
|
|
@@ -607,20 +718,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
607
718
|
}, [
|
|
608
719
|
vue.createElementVNode("button", {
|
|
609
720
|
class: "p-link",
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
721
|
+
type: "button",
|
|
722
|
+
tabindex: $data.d_page === i ? '0' : '-1',
|
|
723
|
+
"aria-label": $options.ariaPageLabel(i + 1),
|
|
724
|
+
"aria-current": $data.d_page === i ? 'page' : undefined,
|
|
725
|
+
onClick: $event => ($options.onIndicatorClick($event, i))
|
|
726
|
+
}, null, 8, _hoisted_6)
|
|
613
727
|
], 2))
|
|
614
728
|
}), 128))
|
|
615
|
-
],
|
|
729
|
+
], 34))
|
|
616
730
|
: vue.createCommentVNode("", true)
|
|
617
731
|
], 2),
|
|
618
732
|
(_ctx.$slots.footer)
|
|
619
|
-
? (vue.openBlock(), vue.createElementBlock("div",
|
|
733
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
620
734
|
vue.renderSlot(_ctx.$slots, "footer")
|
|
621
735
|
]))
|
|
622
736
|
: vue.createCommentVNode("", true)
|
|
623
|
-
],
|
|
737
|
+
], 2))
|
|
624
738
|
}
|
|
625
739
|
|
|
626
740
|
function styleInject(css, ref) {
|
|
@@ -650,7 +764,7 @@ function styleInject(css, ref) {
|
|
|
650
764
|
}
|
|
651
765
|
}
|
|
652
766
|
|
|
653
|
-
var css_248z = "\n.p-carousel {\n display:
|
|
767
|
+
var css_248z = "\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n";
|
|
654
768
|
styleInject(css_248z);
|
|
655
769
|
|
|
656
770
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),i=require("vue");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"Carousel",emits:["update:page"],props:{value:null,page:{type:Number,default:0},numVisible:{type:Number,default:1},numScroll:{type:Number,default:1},responsiveOptions:Array,orientation:{type:String,default:"horizontal"},verticalViewPortHeight:{type:String,default:"300px"},contentClass:String,containerClass:String,indicatorsContentClass:String,circular:{type:Boolean,default:!1},autoplayInterval:{type:Number,default:0},showNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0}},data(){return{id:e.UniqueComponentId(),remainingItems:0,d_numVisible:this.numVisible,d_numScroll:this.numScroll,d_oldNumScroll:0,d_oldNumVisible:0,d_oldValue:null,d_page:this.page,totalShiftedItems:this.page*this.numScroll*-1,allowAutoplay:!!this.autoplayInterval,d_circular:this.circular||this.allowAutoplay,swipeThreshold:20}},isRemainingItemsAdded:!1,watch:{page(e){this.d_page=e},circular(e){this.d_circular=e},numVisible(e,t){this.d_numVisible=e,this.d_oldNumVisible=t},numScroll(e,t){this.d_oldNumScroll=t,this.d_numScroll=e},value(e){this.d_oldValue=e}},mounted(){let e=!1;if(this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){let t=this.totalShiftedItems;0===this.d_page?t=-1*this.d_numVisible:0===t&&(t=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),t!==this.totalShiftedItems&&(this.totalShiftedItems=t,e=!0)}!e&&this.isAutoplay()&&this.startAutoplay()},updated(){const e=this.isCircular();let t=!1,i=this.totalShiftedItems;if(this.autoplayInterval&&this.stopAutoplay(),this.d_oldNumScroll!==this.d_numScroll||this.d_oldNumVisible!==this.d_numVisible||this.d_oldValue.length!==this.value.length){this.remainingItems=(this.value.length-this.d_numVisible)%this.d_numScroll;let s=this.d_page;0!==this.totalIndicators&&s>=this.totalIndicators&&(s=this.totalIndicators-1,this.$emit("update:page",s),this.d_page=s,t=!0),i=s*this.d_numScroll*-1,e&&(i-=this.d_numVisible),s===this.totalIndicators-1&&this.remainingItems>0?(i+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,i!==this.totalShiftedItems&&(this.totalShiftedItems=i,t=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?`translate3d(0, ${i*(100/this.d_numVisible)}%, 0)`:`translate3d(${i*(100/this.d_numVisible)}%, 0, 0)`}e&&(0===this.d_page?i=-1*this.d_numVisible:0===i&&(i=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),i!==this.totalShiftedItems&&(this.totalShiftedItems=i,t=!0)),!t&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{step(t,i){let s=this.totalShiftedItems;const n=this.isCircular();if(null!=i)s=this.d_numScroll*i*-1,n&&(s-=this.d_numVisible),this.isRemainingItemsAdded=!1;else{s+=this.d_numScroll*t,this.isRemainingItemsAdded&&(s+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1);let e=n?s+this.d_numVisible:s;i=Math.abs(Math.floor(e/this.d_numScroll))}n&&this.d_page===this.totalIndicators-1&&-1===t?(s=-1*(this.value.length+this.d_numVisible),i=0):n&&0===this.d_page&&1===t?(s=0,i=this.totalIndicators-1):i===this.totalIndicators-1&&this.remainingItems>0&&(s+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(e.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?`translate3d(0, ${s*(100/this.d_numVisible)}%, 0)`:`translate3d(${s*(100/this.d_numVisible)}%, 0, 0)`,this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=s,this.$emit("update:page",i),this.d_page=i},calculatePosition(){if(this.$refs.itemsContainer&&this.responsiveOptions){let e=window.innerWidth,t={numVisible:this.numVisible,numScroll:this.numScroll};for(let i=0;i<this.responsiveOptions.length;i++){let s=this.responsiveOptions[i];parseInt(s.breakpoint,10)>=e&&(t=s)}if(this.d_numScroll!==t.numScroll){let e=this.d_page;e=parseInt(e*this.d_numScroll/t.numScroll),this.totalShiftedItems=t.numScroll*e*-1,this.isCircular()&&(this.totalShiftedItems-=t.numVisible),this.d_numScroll=t.numScroll,this.$emit("update:page",e),this.d_page=e}this.d_numVisible!==t.numVisible&&(this.d_numVisible=t.numVisible)}},navBackward(e,t){(this.d_circular||0!==this.d_page)&&this.step(1,t),this.allowAutoplay=!1,e.cancelable&&e.preventDefault()},navForward(e,t){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,t),this.allowAutoplay=!1,e.cancelable&&e.preventDefault()},onIndicatorClick(e,t){let i=this.d_page;t>i?this.navForward(e,t):t<i&&this.navBackward(e,t)},onTransitionEnd(){this.$refs.itemsContainer&&(e.DomHandler.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="",0!==this.d_page&&this.d_page!==this.totalIndicators-1||!this.isCircular()||(this.$refs.itemsContainer.style.transform=this.isVertical()?`translate3d(0, ${this.totalShiftedItems*(100/this.d_numVisible)}%, 0)`:`translate3d(${this.totalShiftedItems*(100/this.d_numVisible)}%, 0, 0)`))},onTouchStart(e){let t=e.changedTouches[0];this.startPos={x:t.pageX,y:t.pageY}},onTouchMove(e){e.cancelable&&e.preventDefault()},onTouchEnd(e){let t=e.changedTouches[0];this.isVertical()?this.changePageOnTouch(e,t.pageY-this.startPos.y):this.changePageOnTouch(e,t.pageX-this.startPos.x)},changePageOnTouch(e,t){Math.abs(t)>this.swipeThreshold&&(t<0?this.navForward(e):this.navBackward(e))},bindDocumentListeners(){this.documentResizeListener||(this.documentResizeListener=e=>{this.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay(){this.interval=setInterval((()=>{this.d_page===this.totalIndicators-1?this.step(-1,0):this.step(-1,this.d_page+1)}),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)},createStyle(){this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",document.body.appendChild(this.carouselStyle));let e=`\n #${this.id} .p-carousel-item {\n flex: 1 0 ${100/this.d_numVisible}%\n }\n `;if(this.responsiveOptions){let t=[...this.responsiveOptions];t.sort(((e,t)=>{const i=e.breakpoint,s=t.breakpoint;let n=null;return n=null==i&&null!=s?-1:null!=i&&null==s?1:null==i&&null==s?0:"string"==typeof i&&"string"==typeof s?i.localeCompare(s,void 0,{numeric:!0}):i<s?-1:i>s?1:0,-1*n}));for(let i=0;i<t.length;i++){let s=t[i];e+=`\n @media screen and (max-width: ${s.breakpoint}) {\n #${this.id} .p-carousel-item {\n flex: 1 0 ${100/s.numVisible}%\n }\n }\n `}}this.carouselStyle.innerHTML=e},isVertical(){return"vertical"===this.orientation},isCircular(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay(){return this.autoplayInterval&&this.allowAutoplay},firstIndex(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex(){return this.firstIndex()+this.d_numVisible-1}},computed:{totalIndicators(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},containerClasses(){return["p-carousel-container",this.containerClass]},contentClasses(){return["p-carousel-content ",this.contentClass]},indicatorsContentClasses(){return["p-carousel-indicators p-reset",this.indicatorsContentClass]}},directives:{ripple:s(t).default}};const l=["id"],a={key:0,class:"p-carousel-header"},o=["disabled"],r=["disabled"],c=["onClick"],d={key:1,class:"p-carousel-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-carousel {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-carousel-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n overflow: auto;\n}\n.p-carousel-prev,\n.p-carousel-next {\n -ms-flex-item-align: center;\n align-self: center;\n -webkit-box-flex: 0;\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n.p-carousel-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n.p-carousel-items-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-carousel-indicators {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-carousel-indicator > button {\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 -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-carousel-vertical .p-carousel-items-container {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n"),n.render=function(e,t,s,n,h,u){const m=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",{id:h.id,class:i.normalizeClass(["p-carousel p-component",{"p-carousel-vertical":u.isVertical(),"p-carousel-horizontal":!u.isVertical()}])},[e.$slots.header?(i.openBlock(),i.createElementBlock("div",a,[i.renderSlot(e.$slots,"header")])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(u.contentClasses)},[i.createElementVNode("div",{class:i.normalizeClass(u.containerClasses)},[s.showNavigators?i.withDirectives((i.openBlock(),i.createElementBlock("button",{key:0,class:i.normalizeClass(["p-carousel-prev p-link",{"p-disabled":u.backwardIsDisabled}]),disabled:u.backwardIsDisabled,onClick:t[0]||(t[0]=(...e)=>u.navBackward&&u.navBackward(...e)),type:"button"},[i.createElementVNode("span",{class:i.normalizeClass(["p-carousel-prev-icon pi",{"pi-chevron-left":!u.isVertical(),"pi-chevron-up":u.isVertical()}])},null,2)],10,o)),[[m]]):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"p-carousel-items-content",style:i.normalizeStyle([{height:u.isVertical()?s.verticalViewPortHeight:"auto"}]),onTouchend:t[2]||(t[2]=(...e)=>u.onTouchEnd&&u.onTouchEnd(...e)),onTouchstart:t[3]||(t[3]=(...e)=>u.onTouchStart&&u.onTouchStart(...e)),onTouchmove:t[4]||(t[4]=(...e)=>u.onTouchMove&&u.onTouchMove(...e))},[i.createElementVNode("div",{ref:"itemsContainer",class:"p-carousel-items-container",onTransitionend:t[1]||(t[1]=(...e)=>u.onTransitionEnd&&u.onTransitionEnd(...e))},[u.isCircular()?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(s.value.slice(-1*h.d_numVisible),((t,n)=>(i.openBlock(),i.createElementBlock("div",{key:n+"_scloned",class:i.normalizeClass(["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*h.totalShiftedItems===s.value.length+h.d_numVisible,"p-carousel-item-start":0===n,"p-carousel-item-end":s.value.slice(-1*h.d_numVisible).length-1===n}])},[i.renderSlot(e.$slots,"item",{data:t,index:n})],2)))),128)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,((t,s)=>(i.openBlock(),i.createElementBlock("div",{key:s,class:i.normalizeClass(["p-carousel-item",{"p-carousel-item-active":u.firstIndex()<=s&&u.lastIndex()>=s,"p-carousel-item-start":u.firstIndex()===s,"p-carousel-item-end":u.lastIndex()===s}])},[i.renderSlot(e.$slots,"item",{data:t,index:s})],2)))),128)),u.isCircular()?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(s.value.slice(0,h.d_numVisible),((t,n)=>(i.openBlock(),i.createElementBlock("div",{key:n+"_fcloned",class:i.normalizeClass(["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":0===h.totalShiftedItems,"p-carousel-item-start":0===n,"p-carousel-item-end":s.value.slice(0,h.d_numVisible).length-1===n}])},[i.renderSlot(e.$slots,"item",{data:t,index:n})],2)))),128)):i.createCommentVNode("",!0)],544)],36),s.showNavigators?i.withDirectives((i.openBlock(),i.createElementBlock("button",{key:1,class:i.normalizeClass(["p-carousel-next p-link",{"p-disabled":u.forwardIsDisabled}]),disabled:u.forwardIsDisabled,onClick:t[5]||(t[5]=(...e)=>u.navForward&&u.navForward(...e)),type:"button"},[i.createElementVNode("span",{class:i.normalizeClass(["p-carousel-prev-icon pi",{"pi-chevron-right":!u.isVertical(),"pi-chevron-down":u.isVertical()}])},null,2)],10,r)),[[m]]):i.createCommentVNode("",!0)],2),u.totalIndicators>=0&&s.showIndicators?(i.openBlock(),i.createElementBlock("ul",{key:0,class:i.normalizeClass(u.indicatorsContentClasses)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.totalIndicators,((e,t)=>(i.openBlock(),i.createElementBlock("li",{key:"p-carousel-indicator-"+t.toString(),class:i.normalizeClass(["p-carousel-indicator",{"p-highlight":h.d_page===t}])},[i.createElementVNode("button",{class:"p-link",onClick:e=>u.onIndicatorClick(e,t),type:"button"},null,8,c)],2)))),128))],2)):i.createCommentVNode("",!0)],2),e.$slots.footer?(i.openBlock(),i.createElementBlock("div",d,[i.renderSlot(e.$slots,"footer")])):i.createCommentVNode("",!0)],10,l)},module.exports=n;
|
|
1
|
+
"use strict";var e=require("primevue/ripple"),t=require("primevue/utils"),i=require("vue");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"Carousel",emits:["update:page"],props:{value:null,page:{type:Number,default:0},numVisible:{type:Number,default:1},numScroll:{type:Number,default:1},responsiveOptions:Array,orientation:{type:String,default:"horizontal"},verticalViewPortHeight:{type:String,default:"300px"},contentClass:String,containerClass:String,indicatorsContentClass:String,circular:{type:Boolean,default:!1},autoplayInterval:{type:Number,default:0},showNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},isRemainingItemsAdded:!1,data(){return{remainingItems:0,d_numVisible:this.numVisible,d_numScroll:this.numScroll,d_oldNumScroll:0,d_oldNumVisible:0,d_oldValue:null,d_page:this.page,totalShiftedItems:this.page*this.numScroll*-1,allowAutoplay:!!this.autoplayInterval,d_circular:this.circular||this.allowAutoplay,swipeThreshold:20}},watch:{page(e){this.d_page=e},circular(e){this.d_circular=e},numVisible(e,t){this.d_numVisible=e,this.d_oldNumVisible=t},numScroll(e,t){this.d_oldNumScroll=t,this.d_numScroll=e},value(e){this.d_oldValue=e}},mounted(){let e=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){let t=this.totalShiftedItems;0===this.d_page?t=-1*this.d_numVisible:0===t&&(t=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),t!==this.totalShiftedItems&&(this.totalShiftedItems=t,e=!0)}!e&&this.isAutoplay()&&this.startAutoplay()},updated(){const e=this.isCircular();let t=!1,i=this.totalShiftedItems;if(this.autoplayInterval&&this.stopAutoplay(),this.d_oldNumScroll!==this.d_numScroll||this.d_oldNumVisible!==this.d_numVisible||this.d_oldValue.length!==this.value.length){this.remainingItems=(this.value.length-this.d_numVisible)%this.d_numScroll;let s=this.d_page;0!==this.totalIndicators&&s>=this.totalIndicators&&(s=this.totalIndicators-1,this.$emit("update:page",s),this.d_page=s,t=!0),i=s*this.d_numScroll*-1,e&&(i-=this.d_numVisible),s===this.totalIndicators-1&&this.remainingItems>0?(i+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,i!==this.totalShiftedItems&&(this.totalShiftedItems=i,t=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?`translate3d(0, ${i*(100/this.d_numVisible)}%, 0)`:`translate3d(${i*(100/this.d_numVisible)}%, 0, 0)`}e&&(0===this.d_page?i=-1*this.d_numVisible:0===i&&(i=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),i!==this.totalShiftedItems&&(this.totalShiftedItems=i,t=!0)),!t&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{step(e,i){let s=this.totalShiftedItems;const n=this.isCircular();if(null!=i)s=this.d_numScroll*i*-1,n&&(s-=this.d_numVisible),this.isRemainingItemsAdded=!1;else{s+=this.d_numScroll*e,this.isRemainingItemsAdded&&(s+=this.remainingItems-this.d_numScroll*e,this.isRemainingItemsAdded=!1);let t=n?s+this.d_numVisible:s;i=Math.abs(Math.floor(t/this.d_numScroll))}n&&this.d_page===this.totalIndicators-1&&-1===e?(s=-1*(this.value.length+this.d_numVisible),i=0):n&&0===this.d_page&&1===e?(s=0,i=this.totalIndicators-1):i===this.totalIndicators-1&&this.remainingItems>0&&(s+=-1*this.remainingItems-this.d_numScroll*e,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(t.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?`translate3d(0, ${s*(100/this.d_numVisible)}%, 0)`:`translate3d(${s*(100/this.d_numVisible)}%, 0, 0)`,this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=s,this.$emit("update:page",i),this.d_page=i},calculatePosition(){if(this.$refs.itemsContainer&&this.responsiveOptions){let e=window.innerWidth,t={numVisible:this.numVisible,numScroll:this.numScroll};for(let i=0;i<this.responsiveOptions.length;i++){let s=this.responsiveOptions[i];parseInt(s.breakpoint,10)>=e&&(t=s)}if(this.d_numScroll!==t.numScroll){let e=this.d_page;e=parseInt(e*this.d_numScroll/t.numScroll),this.totalShiftedItems=t.numScroll*e*-1,this.isCircular()&&(this.totalShiftedItems-=t.numVisible),this.d_numScroll=t.numScroll,this.$emit("update:page",e),this.d_page=e}this.d_numVisible!==t.numVisible&&(this.d_numVisible=t.numVisible)}},navBackward(e,t){(this.d_circular||0!==this.d_page)&&this.step(1,t),this.allowAutoplay=!1,e.cancelable&&e.preventDefault()},navForward(e,t){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,t),this.allowAutoplay=!1,e.cancelable&&e.preventDefault()},onIndicatorClick(e,t){let i=this.d_page;t>i?this.navForward(e,t):t<i&&this.navBackward(e,t)},onTransitionEnd(){this.$refs.itemsContainer&&(t.DomHandler.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="",0!==this.d_page&&this.d_page!==this.totalIndicators-1||!this.isCircular()||(this.$refs.itemsContainer.style.transform=this.isVertical()?`translate3d(0, ${this.totalShiftedItems*(100/this.d_numVisible)}%, 0)`:`translate3d(${this.totalShiftedItems*(100/this.d_numVisible)}%, 0, 0)`))},onTouchStart(e){let t=e.changedTouches[0];this.startPos={x:t.pageX,y:t.pageY}},onTouchMove(e){e.cancelable&&e.preventDefault()},onTouchEnd(e){let t=e.changedTouches[0];this.isVertical()?this.changePageOnTouch(e,t.pageY-this.startPos.y):this.changePageOnTouch(e,t.pageX-this.startPos.x)},changePageOnTouch(e,t){Math.abs(t)>this.swipeThreshold&&(t<0?this.navForward(e):this.navBackward(e))},onIndicatorKeydown(e){switch(e.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":e.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey(){const e=[...t.DomHandler.find(this.$refs.indicatorContent,".p-carousel-indicator")],i=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(i,i+1===e.length?e.length-1:i+1)},onLeftKey(){const e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e-1<=0?0:e-1)},onHomeKey(){const e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,0)},onEndKey(){const e=[...t.DomHandler.find(this.$refs.indicatorContent,".p-carousel-indicator")],i=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(i,e.length-1)},onTabKey(){const e=[...t.DomHandler.find(this.$refs.indicatorContent,".p-carousel-indicator")],i=e.findIndex((e=>t.DomHandler.hasClass(e,"p-highlight"))),s=t.DomHandler.findSingle(this.$refs.indicatorContent,'.p-carousel-indicator > button[tabindex="0"]'),n=e.findIndex((e=>e===s.parentElement));e[n].children[0].tabIndex="-1",e[i].children[0].tabIndex="0"},findFocusedIndicatorIndex(){const e=[...t.DomHandler.find(this.$refs.indicatorContent,".p-carousel-indicator")],i=t.DomHandler.findSingle(this.$refs.indicatorContent,'.p-carousel-indicator > button[tabindex="0"]');return e.findIndex((e=>e===i.parentElement))},changedFocusedIndicator(e,i){const s=[...t.DomHandler.find(this.$refs.indicatorContent,".p-carousel-indicator")];s[e].children[0].tabIndex="-1",s[i].children[0].tabIndex="0",s[i].children[0].focus()},bindDocumentListeners(){this.documentResizeListener||(this.documentResizeListener=e=>{this.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay(){this.interval=setInterval((()=>{this.d_page===this.totalIndicators-1?this.step(-1,0):this.step(-1,this.d_page+1)}),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)},createStyle(){this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",document.body.appendChild(this.carouselStyle));let e=`\n .p-carousel[${this.attributeSelector}] .p-carousel-item {\n flex: 1 0 ${100/this.d_numVisible}%\n }\n `;if(this.responsiveOptions){let t=[...this.responsiveOptions];t.sort(((e,t)=>{const i=e.breakpoint,s=t.breakpoint;let n=null;return n=null==i&&null!=s?-1:null!=i&&null==s?1:null==i&&null==s?0:"string"==typeof i&&"string"==typeof s?i.localeCompare(s,void 0,{numeric:!0}):i<s?-1:i>s?1:0,-1*n}));for(let i=0;i<t.length;i++){let s=t[i];e+=`\n @media screen and (max-width: ${s.breakpoint}) {\n .p-carousel[${this.attributeSelector}] .p-carousel-item {\n flex: 1 0 ${100/s.numVisible}%\n }\n }\n `}}this.carouselStyle.innerHTML=e},isVertical(){return"vertical"===this.orientation},isCircular(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay(){return this.autoplayInterval&&this.allowAutoplay},firstIndex(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,e):void 0},ariaPageLabel(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},computed:{totalIndicators(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},containerClasses(){return["p-carousel-container",this.containerClass]},contentClasses(){return["p-carousel-content ",this.contentClass]},indicatorsContentClasses(){return["p-carousel-indicators p-reset",this.indicatorsContentClass]},ariaSlideLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:()=>t.UniqueComponentId()},directives:{ripple:s(e).default}};const a={key:0,class:"p-carousel-header"},l=["aria-live"],o=["disabled","aria-label"],r=["aria-hidden","aria-label","aria-roledescription"],d=["disabled","aria-label"],c=["tabindex","aria-label","aria-current","onClick"],h={key:1,class:"p-carousel-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n"),n.render=function(e,t,s,n,u,m){const p=i.resolveDirective("ripple");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["p-carousel p-component",{"p-carousel-vertical":m.isVertical(),"p-carousel-horizontal":!m.isVertical()}]),role:"region"},[e.$slots.header?(i.openBlock(),i.createElementBlock("div",a,[i.renderSlot(e.$slots,"header")])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(m.contentClasses)},[i.createElementVNode("div",{class:i.normalizeClass(m.containerClasses),"aria-live":u.allowAutoplay?"polite":"off"},[s.showNavigators?i.withDirectives((i.openBlock(),i.createElementBlock("button",i.mergeProps({key:0,type:"button",class:["p-carousel-prev p-link",{"p-disabled":m.backwardIsDisabled}],disabled:m.backwardIsDisabled,"aria-label":m.ariaPrevButtonLabel,onClick:t[0]||(t[0]=(...e)=>m.navBackward&&m.navBackward(...e))},s.prevButtonProps),[i.createElementVNode("span",{class:i.normalizeClass(["p-carousel-prev-icon pi",{"pi-chevron-left":!m.isVertical(),"pi-chevron-up":m.isVertical()}])},null,2)],16,o)),[[p]]):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"p-carousel-items-content",style:i.normalizeStyle([{height:m.isVertical()?s.verticalViewPortHeight:"auto"}]),onTouchend:t[2]||(t[2]=(...e)=>m.onTouchEnd&&m.onTouchEnd(...e)),onTouchstart:t[3]||(t[3]=(...e)=>m.onTouchStart&&m.onTouchStart(...e)),onTouchmove:t[4]||(t[4]=(...e)=>m.onTouchMove&&m.onTouchMove(...e))},[i.createElementVNode("div",{ref:"itemsContainer",class:"p-carousel-items-container",onTransitionend:t[1]||(t[1]=(...e)=>m.onTransitionEnd&&m.onTransitionEnd(...e))},[m.isCircular()?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(s.value.slice(-1*u.d_numVisible),((t,n)=>(i.openBlock(),i.createElementBlock("div",{key:n+"_scloned",class:i.normalizeClass(["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*u.totalShiftedItems===s.value.length+u.d_numVisible,"p-carousel-item-start":0===n,"p-carousel-item-end":s.value.slice(-1*u.d_numVisible).length-1===n}])},[i.renderSlot(e.$slots,"item",{data:t,index:n})],2)))),128)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,((t,s)=>(i.openBlock(),i.createElementBlock("div",{key:s,class:i.normalizeClass(["p-carousel-item",{"p-carousel-item-active":m.firstIndex()<=s&&m.lastIndex()>=s,"p-carousel-item-start":m.firstIndex()===s,"p-carousel-item-end":m.lastIndex()===s}]),role:"group","aria-hidden":m.firstIndex()>s||m.lastIndex()<s||void 0,"aria-label":m.ariaSlideNumber(s),"aria-roledescription":m.ariaSlideLabel},[i.renderSlot(e.$slots,"item",{data:t,index:s})],10,r)))),128)),m.isCircular()?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(s.value.slice(0,u.d_numVisible),((t,n)=>(i.openBlock(),i.createElementBlock("div",{key:n+"_fcloned",class:i.normalizeClass(["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":0===u.totalShiftedItems,"p-carousel-item-start":0===n,"p-carousel-item-end":s.value.slice(0,u.d_numVisible).length-1===n}])},[i.renderSlot(e.$slots,"item",{data:t,index:n})],2)))),128)):i.createCommentVNode("",!0)],544)],36),s.showNavigators?i.withDirectives((i.openBlock(),i.createElementBlock("button",i.mergeProps({key:1,type:"button",class:["p-carousel-next p-link",{"p-disabled":m.forwardIsDisabled}],disabled:m.forwardIsDisabled,"aria-label":m.ariaNextButtonLabel,onClick:t[5]||(t[5]=(...e)=>m.navForward&&m.navForward(...e))},s.nextButtonProps),[i.createElementVNode("span",{class:i.normalizeClass(["p-carousel-prev-icon pi",{"pi-chevron-right":!m.isVertical(),"pi-chevron-down":m.isVertical()}])},null,2)],16,d)),[[p]]):i.createCommentVNode("",!0)],10,l),m.totalIndicators>=0&&s.showIndicators?(i.openBlock(),i.createElementBlock("ul",{key:0,ref:"indicatorContent",class:i.normalizeClass(m.indicatorsContentClasses),onKeydown:t[6]||(t[6]=(...e)=>m.onIndicatorKeydown&&m.onIndicatorKeydown(...e))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.totalIndicators,((e,t)=>(i.openBlock(),i.createElementBlock("li",{key:"p-carousel-indicator-"+t.toString(),class:i.normalizeClass(["p-carousel-indicator",{"p-highlight":u.d_page===t}])},[i.createElementVNode("button",{class:"p-link",type:"button",tabindex:u.d_page===t?"0":"-1","aria-label":m.ariaPageLabel(t+1),"aria-current":u.d_page===t?"page":void 0,onClick:e=>m.onIndicatorClick(e,t)},null,8,c)],2)))),128))],34)):i.createCommentVNode("",!0)],2),e.$slots.footer?(i.openBlock(),i.createElementBlock("div",h,[i.renderSlot(e.$slots,"footer")])):i.createCommentVNode("",!0)],2)},module.exports=n;
|