primevue 3.48.0 → 3.49.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/accordion/Accordion.vue +2 -1
- package/accordion/accordion.cjs.js +2 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +2 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +2 -1
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.vue +2 -1
- package/accordiontab/accordiontab.cjs.js +2 -1
- package/accordiontab/accordiontab.cjs.min.js +1 -1
- package/accordiontab/accordiontab.esm.js +2 -1
- package/accordiontab/accordiontab.esm.min.js +1 -1
- package/accordiontab/accordiontab.js +2 -1
- package/accordiontab/accordiontab.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +2 -2
- package/autocomplete/AutoComplete.vue +4 -1
- package/autocomplete/autocomplete.cjs.js +6 -3
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +6 -3
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +6 -3
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.vue +2 -1
- package/avatar/avatar.cjs.js +2 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +2 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +2 -1
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +37 -5
- package/avatargroup/AvatarGroup.vue +3 -2
- package/avatargroup/avatargroup.cjs.js +3 -2
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -2
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +3 -2
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/Badge.d.ts +2 -2
- package/badge/Badge.vue +3 -2
- package/badge/badge.cjs.js +3 -2
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +3 -2
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +3 -2
- package/badge/badge.min.js +1 -1
- package/basecomponent/BaseComponent.vue +36 -1
- package/basecomponent/basecomponent.cjs.js +58 -1
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +58 -1
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +58 -1
- package/basecomponent/basecomponent.min.js +1 -1
- package/blockui/BlockUI.vue +2 -1
- package/blockui/blockui.cjs.js +2 -1
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +2 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +2 -1
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.vue +4 -3
- package/breadcrumb/breadcrumb.cjs.js +2 -1
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +2 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +2 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +3 -3
- package/button/Button.vue +5 -2
- package/button/button.cjs.js +5 -3
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +5 -3
- package/button/button.esm.min.js +1 -1
- package/button/button.js +5 -3
- package/button/button.min.js +1 -1
- package/buttongroup/BaseButtonGroup.vue +15 -0
- package/buttongroup/ButtonGroup.d.ts +113 -0
- package/buttongroup/ButtonGroup.vue +15 -0
- package/buttongroup/buttongroup.cjs.js +38 -0
- package/buttongroup/buttongroup.cjs.min.js +1 -0
- package/buttongroup/buttongroup.esm.js +31 -0
- package/buttongroup/buttongroup.esm.min.js +1 -0
- package/buttongroup/buttongroup.js +38 -0
- package/buttongroup/buttongroup.min.js +1 -0
- package/buttongroup/package.json +9 -0
- package/buttongroup/style/ButtonGroupStyle.d.ts +3 -0
- package/buttongroup/style/buttongroupstyle.cjs.js +17 -0
- package/buttongroup/style/buttongroupstyle.cjs.min.js +1 -0
- package/buttongroup/style/buttongroupstyle.esm.js +11 -0
- package/buttongroup/style/buttongroupstyle.esm.min.js +1 -0
- package/buttongroup/style/buttongroupstyle.js +20 -0
- package/buttongroup/style/buttongroupstyle.min.js +1 -0
- package/buttongroup/style/package.json +6 -0
- package/calendar/Calendar.d.ts +2 -2
- package/calendar/Calendar.vue +9 -3
- package/calendar/calendar.cjs.js +10 -4
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +10 -4
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +10 -4
- package/calendar/calendar.min.js +1 -1
- package/calendar/style/calendarstyle.cjs.js +2 -2
- package/calendar/style/calendarstyle.cjs.min.js +1 -1
- package/calendar/style/calendarstyle.esm.js +2 -2
- package/calendar/style/calendarstyle.esm.min.js +1 -1
- package/calendar/style/calendarstyle.js +2 -2
- package/calendar/style/calendarstyle.min.js +1 -1
- package/card/Card.d.ts +23 -1
- package/card/Card.vue +3 -2
- package/card/card.cjs.js +3 -2
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +3 -2
- package/card/card.esm.min.js +1 -1
- package/card/card.js +3 -2
- package/card/card.min.js +1 -1
- package/carousel/Carousel.vue +2 -1
- package/carousel/carousel.cjs.js +2 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +2 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +2 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +2 -2
- package/cascadeselect/CascadeSelect.vue +18 -5
- package/cascadeselect/cascadeselect.cjs.js +32 -12
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +32 -12
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +32 -12
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.vue +2 -1
- package/chart/chart.cjs.js +2 -1
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +2 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +2 -1
- package/chart/chart.min.js +1 -1
- package/checkbox/Checkbox.vue +5 -1
- package/checkbox/checkbox.cjs.js +5 -2
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +5 -2
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +5 -2
- package/checkbox/checkbox.min.js +1 -1
- package/chip/Chip.vue +2 -1
- package/chip/chip.cjs.js +2 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +2 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +2 -1
- package/chip/chip.min.js +1 -1
- package/chips/Chips.vue +3 -1
- package/chips/chips.cjs.js +4 -2
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +4 -2
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +4 -2
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +2 -2
- package/colorpicker/ColorPicker.vue +3 -2
- package/colorpicker/colorpicker.cjs.js +3 -2
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +3 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +3 -2
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.vue +1 -0
- package/column/column.cjs.js +1 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +1 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +1 -0
- package/column/column.min.js +1 -1
- package/columngroup/ColumnGroup.vue +1 -0
- package/columngroup/columngroup.cjs.js +1 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +1 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +1 -0
- package/columngroup/columngroup.min.js +1 -1
- package/config/PrimeVue.d.ts +1 -1
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +1 -7
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +1 -7
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +1 -7
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +2 -2
- package/contextmenu/ContextMenu.vue +7 -1
- package/contextmenu/ContextMenuSub.vue +13 -3
- package/contextmenu/contextmenu.cjs.js +25 -12
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +25 -12
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +25 -12
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +223 -99
- package/core/core.min.js +23 -21
- package/datatable/BaseDataTable.vue +4 -4
- package/datatable/BodyCell.vue +0 -3
- package/datatable/DataTable.d.ts +6 -6
- package/datatable/DataTable.vue +5 -3
- package/datatable/datatable.cjs.js +8 -10
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +8 -10
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +8 -10
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.vue +2 -1
- package/dataview/dataview.cjs.js +2 -1
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +2 -1
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +2 -1
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +2 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.cjs.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.cjs.min.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.esm.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.esm.min.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.js +1 -1
- package/dataviewlayoutoptions/style/dataviewlayoutoptionsstyle.min.js +1 -1
- package/deferredcontent/DeferredContent.vue +2 -1
- package/deferredcontent/deferredcontent.cjs.js +2 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +2 -1
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +2 -1
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/Dialog.d.ts +2 -2
- package/dialog/Dialog.vue +2 -2
- package/dialog/dialog.cjs.js +2 -2
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +2 -2
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +2 -2
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.vue +3 -2
- package/divider/divider.cjs.js +3 -2
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +3 -2
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +3 -2
- package/divider/divider.min.js +1 -1
- package/dock/Dock.vue +2 -1
- package/dock/dock.cjs.js +2 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +2 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +2 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +3 -3
- package/dropdown/Dropdown.vue +5 -1
- package/dropdown/dropdown.cjs.js +15 -9
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +15 -9
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +15 -9
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.vue +2 -1
- package/editor/editor.cjs.js +2 -1
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +2 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -1
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.vue +2 -1
- package/fieldset/fieldset.cjs.js +2 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +2 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +2 -1
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.vue +8 -5
- package/fileupload/fileupload.cjs.js +9 -8
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +9 -8
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +9 -8
- package/fileupload/fileupload.min.js +1 -1
- package/floatlabel/FloatLabel.d.ts +0 -4
- package/floatlabel/FloatLabel.vue +3 -2
- package/floatlabel/floatlabel.cjs.js +3 -2
- package/floatlabel/floatlabel.cjs.min.js +1 -1
- package/floatlabel/floatlabel.esm.js +3 -2
- package/floatlabel/floatlabel.esm.min.js +1 -1
- package/floatlabel/floatlabel.js +3 -2
- package/floatlabel/floatlabel.min.js +1 -1
- package/galleria/GalleriaContent.vue +1 -1
- package/galleria/GalleriaThumbnails.vue +12 -3
- package/galleria/galleria.cjs.js +5 -5
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +5 -5
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +5 -5
- package/galleria/galleria.min.js +1 -1
- package/iconfield/IconField.vue +4 -3
- package/iconfield/iconfield.cjs.js +3 -2
- package/iconfield/iconfield.cjs.min.js +1 -1
- package/iconfield/iconfield.esm.js +3 -2
- package/iconfield/iconfield.esm.min.js +1 -1
- package/iconfield/iconfield.js +3 -2
- package/iconfield/iconfield.min.js +1 -1
- package/iconfield/style/iconfieldstyle.cjs.js +3 -3
- package/iconfield/style/iconfieldstyle.cjs.min.js +1 -1
- package/iconfield/style/iconfieldstyle.esm.js +3 -3
- package/iconfield/style/iconfieldstyle.esm.min.js +1 -1
- package/iconfield/style/iconfieldstyle.js +3 -3
- package/iconfield/style/iconfieldstyle.min.js +1 -1
- package/image/Image.vue +1 -1
- package/image/image.cjs.js +1 -1
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +1 -1
- package/image/image.esm.min.js +1 -1
- package/image/image.js +1 -1
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +2 -2
- package/inlinemessage/InlineMessage.vue +2 -1
- package/inlinemessage/inlinemessage.cjs.js +2 -1
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +2 -1
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +2 -1
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/Inplace.vue +2 -1
- package/inplace/inplace.cjs.js +2 -1
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +2 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -1
- package/inplace/inplace.min.js +1 -1
- package/inputgroup/InputGroup.vue +3 -2
- package/inputgroup/inputgroup.cjs.js +3 -2
- package/inputgroup/inputgroup.cjs.min.js +1 -1
- package/inputgroup/inputgroup.esm.js +3 -2
- package/inputgroup/inputgroup.esm.min.js +1 -1
- package/inputgroup/inputgroup.js +3 -2
- package/inputgroup/inputgroup.min.js +1 -1
- package/inputgroupaddon/InputGroupAddon.vue +3 -2
- package/inputgroupaddon/inputgroupaddon.cjs.js +3 -2
- package/inputgroupaddon/inputgroupaddon.cjs.min.js +1 -1
- package/inputgroupaddon/inputgroupaddon.esm.js +3 -2
- package/inputgroupaddon/inputgroupaddon.esm.min.js +1 -1
- package/inputgroupaddon/inputgroupaddon.js +3 -2
- package/inputgroupaddon/inputgroupaddon.min.js +1 -1
- package/inputicon/BaseInputIcon.vue +3 -0
- package/inputicon/InputIcon.vue +10 -2
- package/inputicon/inputicon.cjs.js +13 -2
- package/inputicon/inputicon.cjs.min.js +1 -1
- package/inputicon/inputicon.esm.js +14 -3
- package/inputicon/inputicon.esm.min.js +1 -1
- package/inputicon/inputicon.js +13 -2
- package/inputicon/inputicon.min.js +1 -1
- package/inputicon/style/inputiconstyle.cjs.js +13 -1
- package/inputicon/style/inputiconstyle.cjs.min.js +1 -1
- package/inputicon/style/inputiconstyle.esm.js +9 -1
- package/inputicon/style/inputiconstyle.esm.min.js +1 -1
- package/inputicon/style/inputiconstyle.js +15 -5
- package/inputicon/style/inputiconstyle.min.js +1 -1
- package/inputmask/InputMask.vue +2 -1
- package/inputmask/inputmask.cjs.js +4 -2
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +4 -2
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +4 -2
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.vue +3 -1
- package/inputnumber/inputnumber.cjs.js +4 -2
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +4 -2
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +4 -2
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/BaseInputOtp.vue +53 -0
- package/inputotp/InputOtp.d.ts +275 -0
- package/inputotp/InputOtp.vue +201 -0
- package/inputotp/inputotp.cjs.js +265 -0
- package/inputotp/inputotp.cjs.min.js +1 -0
- package/inputotp/inputotp.esm.js +257 -0
- package/inputotp/inputotp.esm.min.js +1 -0
- package/inputotp/inputotp.js +264 -0
- package/inputotp/inputotp.min.js +1 -0
- package/inputotp/package.json +9 -0
- package/inputotp/style/InputOtpStyle.d.ts +3 -0
- package/inputotp/style/inputotpstyle.cjs.js +18 -0
- package/inputotp/style/inputotpstyle.cjs.min.js +1 -0
- package/inputotp/style/inputotpstyle.esm.js +12 -0
- package/inputotp/style/inputotpstyle.esm.min.js +1 -0
- package/inputotp/style/inputotpstyle.js +21 -0
- package/inputotp/style/inputotpstyle.min.js +1 -0
- package/inputotp/style/package.json +6 -0
- package/inputswitch/InputSwitch.d.ts +0 -16
- package/inputswitch/InputSwitch.vue +5 -1
- package/inputswitch/inputswitch.cjs.js +5 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +5 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +5 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.vue +5 -2
- package/inputtext/inputtext.cjs.js +5 -2
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +5 -2
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +5 -2
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.vue +2 -1
- package/knob/knob.cjs.js +2 -1
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +2 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +2 -1
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +2 -2
- package/listbox/Listbox.vue +2 -3
- package/listbox/listbox.cjs.js +2 -2
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +2 -2
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +2 -2
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.vue +2 -1
- package/megamenu/MegaMenuSub.vue +1 -1
- package/megamenu/megamenu.cjs.js +3 -2
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +3 -2
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +3 -2
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +2 -2
- package/menu/Menu.vue +18 -11
- package/menu/Menuitem.vue +6 -3
- package/menu/menu.cjs.js +23 -18
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +23 -18
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +23 -18
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.vue +19 -6
- package/menubar/MenubarSub.vue +7 -3
- package/menubar/menubar.cjs.js +41 -18
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +41 -18
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +41 -18
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +2 -2
- package/message/Message.vue +2 -1
- package/message/message.cjs.js +2 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -1
- package/message/message.min.js +1 -1
- package/metergroup/MeterGroup.vue +3 -2
- package/metergroup/metergroup.cjs.js +5 -3
- package/metergroup/metergroup.cjs.min.js +1 -1
- package/metergroup/metergroup.esm.js +5 -3
- package/metergroup/metergroup.esm.min.js +1 -1
- package/metergroup/metergroup.js +5 -3
- package/metergroup/metergroup.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +3 -3
- package/multiselect/MultiSelect.vue +4 -1
- package/multiselect/multiselect.cjs.js +15 -10
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +15 -10
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +15 -10
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.vue +2 -1
- package/orderlist/orderlist.cjs.js +2 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +2 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +2 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.vue +2 -1
- package/organizationchart/organizationchart.cjs.js +2 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +2 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +2 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +2 -2
- package/overlaypanel/OverlayPanel.vue +1 -1
- package/overlaypanel/overlaypanel.cjs.js +1 -7
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +1 -7
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +1 -7
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/Paginator.vue +2 -1
- package/paginator/paginator.cjs.js +2 -1
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +2 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +2 -1
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.vue +2 -1
- package/panel/panel.cjs.js +2 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +2 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +2 -1
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.vue +2 -1
- package/panelmenu/PanelMenuList.vue +6 -0
- package/panelmenu/PanelMenuSub.vue +7 -3
- package/panelmenu/panelmenu.cjs.js +24 -5
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +24 -5
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +24 -5
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.d.ts +2 -2
- package/password/Password.vue +10 -4
- package/password/password.cjs.js +9 -4
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +9 -4
- package/password/password.esm.min.js +1 -1
- package/password/password.js +9 -4
- package/password/password.min.js +1 -1
- package/password/style/passwordstyle.cjs.js +4 -3
- package/password/style/passwordstyle.cjs.min.js +1 -1
- package/password/style/passwordstyle.esm.js +4 -3
- package/password/style/passwordstyle.esm.min.js +1 -1
- package/password/style/passwordstyle.js +4 -3
- package/password/style/passwordstyle.min.js +1 -1
- package/picklist/PickList.vue +2 -1
- package/picklist/picklist.cjs.js +2 -1
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +2 -1
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +2 -1
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.d.ts +2 -2
- package/progressbar/ProgressBar.vue +2 -1
- package/progressbar/progressbar.cjs.js +2 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +2 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +2 -1
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.vue +2 -1
- package/progressspinner/progressspinner.cjs.js +2 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +2 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +2 -1
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/RadioButton.vue +5 -1
- package/radiobutton/radiobutton.cjs.js +5 -2
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +5 -2
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +5 -2
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.vue +2 -1
- package/rating/rating.cjs.js +2 -1
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +2 -1
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +2 -1
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +346 -119
- package/resources/themes/arya-green/theme.css +346 -119
- package/resources/themes/arya-orange/theme.css +346 -119
- package/resources/themes/arya-purple/theme.css +346 -119
- package/resources/themes/aura-dark-amber/theme.css +379 -134
- package/resources/themes/aura-dark-blue/theme.css +379 -134
- package/resources/themes/aura-dark-cyan/theme.css +379 -134
- package/resources/themes/aura-dark-green/theme.css +379 -134
- package/resources/themes/aura-dark-indigo/theme.css +379 -134
- package/resources/themes/aura-dark-lime/theme.css +379 -134
- package/resources/themes/aura-dark-noir/theme.css +379 -134
- package/resources/themes/aura-dark-pink/theme.css +379 -134
- package/resources/themes/aura-dark-purple/theme.css +379 -134
- package/resources/themes/aura-dark-teal/theme.css +379 -134
- package/resources/themes/aura-light-amber/theme.css +379 -137
- package/resources/themes/aura-light-blue/theme.css +379 -137
- package/resources/themes/aura-light-cyan/theme.css +379 -137
- package/resources/themes/aura-light-green/theme.css +379 -137
- package/resources/themes/aura-light-indigo/theme.css +379 -137
- package/resources/themes/aura-light-lime/theme.css +379 -137
- package/resources/themes/aura-light-noir/theme.css +379 -137
- package/resources/themes/aura-light-pink/theme.css +379 -137
- package/resources/themes/aura-light-purple/theme.css +379 -137
- package/resources/themes/aura-light-teal/theme.css +379 -137
- package/resources/themes/bootstrap4-dark-blue/theme.css +356 -129
- package/resources/themes/bootstrap4-dark-purple/theme.css +356 -129
- package/resources/themes/bootstrap4-light-blue/theme.css +356 -129
- package/resources/themes/bootstrap4-light-purple/theme.css +356 -129
- package/resources/themes/fluent-light/theme.css +340 -119
- package/resources/themes/lara-dark-amber/theme.css +365 -129
- package/resources/themes/lara-dark-blue/theme.css +365 -129
- package/resources/themes/lara-dark-cyan/theme.css +365 -129
- package/resources/themes/lara-dark-green/theme.css +365 -129
- package/resources/themes/lara-dark-indigo/theme.css +365 -129
- package/resources/themes/lara-dark-pink/theme.css +365 -129
- package/resources/themes/lara-dark-purple/theme.css +365 -129
- package/resources/themes/lara-dark-teal/theme.css +365 -129
- package/resources/themes/lara-light-amber/theme.css +361 -129
- package/resources/themes/lara-light-blue/theme.css +361 -129
- package/resources/themes/lara-light-cyan/theme.css +361 -129
- package/resources/themes/lara-light-green/theme.css +361 -129
- package/resources/themes/lara-light-indigo/theme.css +361 -129
- package/resources/themes/lara-light-pink/theme.css +361 -129
- package/resources/themes/lara-light-purple/theme.css +361 -129
- package/resources/themes/lara-light-teal/theme.css +361 -129
- package/resources/themes/luna-amber/theme.css +346 -119
- package/resources/themes/luna-blue/theme.css +346 -119
- package/resources/themes/luna-green/theme.css +346 -119
- package/resources/themes/luna-pink/theme.css +346 -119
- package/resources/themes/md-dark-deeppurple/theme.css +431 -185
- package/resources/themes/md-dark-indigo/theme.css +431 -185
- package/resources/themes/md-light-deeppurple/theme.css +431 -185
- package/resources/themes/md-light-indigo/theme.css +431 -185
- package/resources/themes/mdc-dark-deeppurple/theme.css +431 -185
- package/resources/themes/mdc-dark-indigo/theme.css +431 -185
- package/resources/themes/mdc-light-deeppurple/theme.css +431 -185
- package/resources/themes/mdc-light-indigo/theme.css +431 -185
- package/resources/themes/mira/theme.css +346 -119
- package/resources/themes/nano/theme.css +346 -119
- package/resources/themes/nova/theme.css +346 -119
- package/resources/themes/nova-accent/theme.css +346 -119
- package/resources/themes/nova-alt/theme.css +346 -119
- package/resources/themes/nova-vue/theme.css +346 -119
- package/resources/themes/rhea/theme.css +346 -119
- package/resources/themes/saga-blue/theme.css +346 -119
- package/resources/themes/saga-green/theme.css +346 -119
- package/resources/themes/saga-orange/theme.css +346 -119
- package/resources/themes/saga-purple/theme.css +346 -119
- package/resources/themes/soho-dark/theme.css +356 -129
- package/resources/themes/soho-light/theme.css +356 -129
- package/resources/themes/tailwind-light/theme.css +346 -119
- package/resources/themes/vela-blue/theme.css +346 -119
- package/resources/themes/vela-green/theme.css +346 -119
- package/resources/themes/vela-orange/theme.css +346 -119
- package/resources/themes/vela-purple/theme.css +346 -119
- package/resources/themes/viva-dark/theme.css +357 -130
- package/resources/themes/viva-light/theme.css +357 -130
- package/scrollpanel/ScrollPanel.vue +2 -1
- package/scrollpanel/scrollpanel.cjs.js +2 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +2 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +2 -1
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/ScrollTop.vue +2 -1
- package/scrolltop/scrolltop.cjs.js +2 -1
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +2 -1
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +2 -1
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/SelectButton.vue +44 -17
- package/selectbutton/selectbutton.cjs.js +41 -18
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +41 -18
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +41 -18
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.cjs.js +1 -1
- package/selectbutton/style/selectbuttonstyle.cjs.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.esm.js +1 -1
- package/selectbutton/style/selectbuttonstyle.esm.min.js +1 -1
- package/selectbutton/style/selectbuttonstyle.js +1 -1
- package/selectbutton/style/selectbuttonstyle.min.js +1 -1
- package/sidebar/Sidebar.vue +1 -1
- package/sidebar/sidebar.cjs.js +1 -7
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +1 -7
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +1 -7
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.vue +2 -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/slider/Slider.vue +2 -1
- package/slider/slider.cjs.js +2 -1
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +2 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +2 -1
- package/slider/slider.min.js +1 -1
- package/speeddial/SpeedDial.vue +2 -1
- package/speeddial/speeddial.cjs.js +2 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +2 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +2 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +3 -3
- package/splitbutton/SplitButton.vue +2 -1
- package/splitbutton/splitbutton.cjs.js +4 -3
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +4 -3
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +4 -3
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.vue +16 -13
- package/splitter/splitter.cjs.js +17 -14
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +17 -14
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +17 -14
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.vue +10 -2
- package/splitterpanel/splitterpanel.cjs.js +10 -2
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +10 -2
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +10 -2
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/stepper/BaseStepper.vue +4 -0
- package/stepper/Stepper.d.ts +197 -0
- package/stepper/Stepper.vue +162 -129
- package/stepper/StepperContent.vue +47 -0
- package/stepper/StepperHeader.vue +41 -0
- package/stepper/StepperSeparator.vue +23 -0
- package/stepper/package.json +9 -0
- package/stepper/stepper.cjs.js +347 -129
- package/stepper/stepper.cjs.min.js +1 -1
- package/stepper/stepper.esm.js +348 -130
- package/stepper/stepper.esm.min.js +1 -1
- package/stepper/stepper.js +347 -129
- package/stepper/stepper.min.js +1 -1
- package/stepper/style/StepperStyle.d.ts +3 -0
- package/stepper/style/package.json +6 -0
- package/stepper/style/stepperstyle.cjs.js +25 -19
- package/stepper/style/stepperstyle.cjs.min.js +1 -1
- package/stepper/style/stepperstyle.esm.js +25 -19
- package/stepper/style/stepperstyle.esm.min.js +1 -1
- package/stepper/style/stepperstyle.js +25 -19
- package/stepper/style/stepperstyle.min.js +1 -1
- package/stepperpanel/BaseStepperPanel.vue +18 -0
- package/stepperpanel/StepperPanel.d.ts +286 -0
- package/stepperpanel/StepperPanel.vue +12 -0
- package/stepperpanel/package.json +9 -0
- package/{step/step.cjs.js → stepperpanel/stepperpanel.cjs.js} +11 -11
- package/stepperpanel/stepperpanel.cjs.min.js +1 -0
- package/{step/step.esm.js → stepperpanel/stepperpanel.esm.js} +10 -10
- package/stepperpanel/stepperpanel.esm.min.js +1 -0
- package/{step/step.js → stepperpanel/stepperpanel.js} +12 -12
- package/stepperpanel/stepperpanel.min.js +1 -0
- package/stepperpanel/style/StepperPanelStyle.d.ts +3 -0
- package/stepperpanel/style/package.json +6 -0
- package/stepperpanel/style/stepperpanelstyle.cjs.js +5 -0
- package/stepperpanel/style/stepperpanelstyle.esm.js +3 -0
- package/stepperpanel/style/stepperpanelstyle.js +10 -0
- package/stepperpanel/style/stepperpanelstyle.min.js +1 -0
- package/steps/Steps.vue +2 -1
- package/steps/steps.cjs.js +2 -1
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +2 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +2 -1
- package/steps/steps.min.js +1 -1
- package/styleclass/StyleClass.d.ts +2 -2
- package/tabmenu/TabMenu.vue +3 -2
- package/tabmenu/tabmenu.cjs.js +3 -2
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +3 -2
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +3 -2
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +1 -1
- package/tabview/TabView.d.ts +31 -1
- package/tabview/TabView.vue +4 -3
- package/tabview/tabview.cjs.js +4 -3
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +4 -3
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +4 -3
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +2 -2
- package/tag/Tag.vue +3 -2
- package/tag/tag.cjs.js +3 -2
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +3 -2
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +3 -2
- package/tag/tag.min.js +1 -1
- package/terminal/Terminal.vue +2 -1
- package/terminal/terminal.cjs.js +2 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +2 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +2 -1
- package/terminal/terminal.min.js +1 -1
- package/textarea/Textarea.vue +2 -1
- package/textarea/textarea.cjs.js +4 -2
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +4 -2
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +4 -2
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +2 -2
- package/tieredmenu/TieredMenu.vue +11 -4
- package/tieredmenu/TieredMenuSub.vue +13 -3
- package/tieredmenu/tieredmenu.cjs.js +31 -22
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +31 -22
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +31 -22
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.vue +2 -1
- package/timeline/timeline.cjs.js +2 -1
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +2 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +2 -1
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.vue +1 -1
- package/toast/toast.cjs.js +1 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +1 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +1 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.vue +5 -1
- package/togglebutton/togglebutton.cjs.js +5 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +5 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +5 -2
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.vue +3 -2
- package/toolbar/toolbar.cjs.js +3 -2
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -2
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +3 -2
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +6 -7
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +6 -7
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +6 -7
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +2 -2
- package/tree/Tree.vue +2 -1
- package/tree/tree.cjs.js +2 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +2 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +2 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +2 -2
- package/treeselect/TreeSelect.vue +2 -1
- package/treeselect/treeselect.cjs.js +2 -1
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +2 -1
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +2 -1
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/TreeTable.d.ts +4 -4
- package/treetable/TreeTable.vue +2 -1
- package/treetable/treetable.cjs.js +2 -1
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +2 -1
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +2 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.vue +5 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +5 -2
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +5 -2
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +5 -2
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +2 -0
- package/vetur-attributes.json +36 -0
- package/vetur-tags.json +14 -0
- package/virtualscroller/VirtualScroller.vue +17 -10
- package/virtualscroller/virtualscroller.cjs.js +23 -16
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +23 -16
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +23 -16
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +119 -1
- package/step/BaseStep.vue +0 -18
- package/step/Step.vue +0 -12
- package/step/step.cjs.min.js +0 -1
- package/step/step.esm.min.js +0 -1
- package/step/step.min.js +0 -1
- package/step/style/stepstyle.cjs.js +0 -5
- package/step/style/stepstyle.esm.js +0 -3
- package/step/style/stepstyle.js +0 -10
- package/step/style/stepstyle.min.js +0 -1
- /package/{step/style/stepstyle.cjs.min.js → stepperpanel/style/stepperpanelstyle.cjs.min.js} +0 -0
- /package/{step/style/stepstyle.esm.min.js → stepperpanel/style/stepperpanelstyle.esm.min.js} +0 -0
package/card/card.esm.js
CHANGED
|
@@ -10,13 +10,14 @@ var script$1 = {
|
|
|
10
10
|
|
|
11
11
|
var script = {
|
|
12
12
|
name: 'Card',
|
|
13
|
-
"extends": script$1
|
|
13
|
+
"extends": script$1,
|
|
14
|
+
inheritAttrs: false
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
17
18
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
18
19
|
"class": _ctx.cx('root')
|
|
19
|
-
}, _ctx.
|
|
20
|
+
}, _ctx.ptmi('root')), [_ctx.$slots.header ? (openBlock(), createElementBlock("div", mergeProps({
|
|
20
21
|
key: 0,
|
|
21
22
|
"class": _ctx.cx('header')
|
|
22
23
|
}, _ctx.ptm('header')), [renderSlot(_ctx.$slots, "header")], 16)) : createCommentVNode("", true), createElementVNode("div", mergeProps({
|
package/card/card.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/basecomponent";import e from"primevue/card/style";import{openBlock as s,createElementBlock as o,mergeProps as l,renderSlot as
|
|
1
|
+
import t from"primevue/basecomponent";import e from"primevue/card/style";import{openBlock as s,createElementBlock as o,mergeProps as l,renderSlot as i,createCommentVNode as r,createElementVNode as a}from"vue";var c={name:"Card",extends:{name:"BaseCard",extends:t,style:e},inheritAttrs:!1};c.render=function(t,e,c,d,m,n){return s(),o("div",l({class:t.cx("root")},t.ptmi("root")),[t.$slots.header?(s(),o("div",l({key:0,class:t.cx("header")},t.ptm("header")),[i(t.$slots,"header")],16)):r("",!0),a("div",l({class:t.cx("body")},t.ptm("body")),[t.$slots.title||t.$slots.subtitle?(s(),o("div",l({key:0,class:t.cx("caption")},t.ptm("caption")),[t.$slots.title?(s(),o("div",l({key:0,class:t.cx("title")},t.ptm("title")),[i(t.$slots,"title")],16)):r("",!0),t.$slots.subtitle?(s(),o("div",l({key:1,class:t.cx("subtitle")},t.ptm("subtitle")),[i(t.$slots,"subtitle")],16)):r("",!0)],16)):r("",!0),a("div",l({class:t.cx("content")},t.ptm("content")),[i(t.$slots,"content")],16),t.$slots.footer?(s(),o("div",l({key:1,class:t.cx("footer")},t.ptm("footer")),[i(t.$slots,"footer")],16)):r("",!0)],16)],16)};export{c as default};
|
package/card/card.js
CHANGED
|
@@ -15,13 +15,14 @@ this.primevue.card = (function (BaseComponent, CardStyle, vue) {
|
|
|
15
15
|
|
|
16
16
|
var script = {
|
|
17
17
|
name: 'Card',
|
|
18
|
-
"extends": script$1
|
|
18
|
+
"extends": script$1,
|
|
19
|
+
inheritAttrs: false
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
22
23
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
23
24
|
"class": _ctx.cx('root')
|
|
24
|
-
}, _ctx.
|
|
25
|
+
}, _ctx.ptmi('root')), [_ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
25
26
|
key: 0,
|
|
26
27
|
"class": _ctx.cx('header')
|
|
27
28
|
}, _ctx.ptm('header')), [vue.renderSlot(_ctx.$slots, "header")], 16)) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
package/card/card.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.card=function(e,t,o){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s={name:"Card",extends:{name:"BaseCard",extends:r(e).default,style:r(t).default}};return s.render=function(e,t,r,s,l,c){return o.openBlock(),o.createElementBlock("div",o.mergeProps({class:e.cx("root")},e.
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.card=function(e,t,o){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s={name:"Card",extends:{name:"BaseCard",extends:r(e).default,style:r(t).default},inheritAttrs:!1};return s.render=function(e,t,r,s,l,c){return o.openBlock(),o.createElementBlock("div",o.mergeProps({class:e.cx("root")},e.ptmi("root")),[e.$slots.header?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[o.renderSlot(e.$slots,"header")],16)):o.createCommentVNode("",!0),o.createElementVNode("div",o.mergeProps({class:e.cx("body")},e.ptm("body")),[e.$slots.title||e.$slots.subtitle?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,class:e.cx("caption")},e.ptm("caption")),[e.$slots.title?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,class:e.cx("title")},e.ptm("title")),[o.renderSlot(e.$slots,"title")],16)):o.createCommentVNode("",!0),e.$slots.subtitle?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:1,class:e.cx("subtitle")},e.ptm("subtitle")),[o.renderSlot(e.$slots,"subtitle")],16)):o.createCommentVNode("",!0)],16)):o.createCommentVNode("",!0),o.createElementVNode("div",o.mergeProps({class:e.cx("content")},e.ptm("content")),[o.renderSlot(e.$slots,"content")],16),e.$slots.footer?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:1,class:e.cx("footer")},e.ptm("footer")),[o.renderSlot(e.$slots,"footer")],16)):o.createCommentVNode("",!0)],16)],16)},s}(primevue.basecomponent,primevue.card.style,Vue);
|
package/carousel/Carousel.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="cx('root')" role="region" v-bind="
|
|
2
|
+
<div :class="cx('root')" role="region" v-bind="ptmi('root')">
|
|
3
3
|
<div v-if="$slots.header" :class="cx('header')" v-bind="ptm('header')">
|
|
4
4
|
<slot name="header"></slot>
|
|
5
5
|
</div>
|
|
@@ -107,6 +107,7 @@ import BaseCarousel from './BaseCarousel.vue';
|
|
|
107
107
|
export default {
|
|
108
108
|
name: 'Carousel',
|
|
109
109
|
extends: BaseCarousel,
|
|
110
|
+
inheritAttrs: false,
|
|
110
111
|
emits: ['update:page'],
|
|
111
112
|
isRemainingItemsAdded: false,
|
|
112
113
|
data() {
|
package/carousel/carousel.cjs.js
CHANGED
|
@@ -91,6 +91,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
91
91
|
var script = {
|
|
92
92
|
name: 'Carousel',
|
|
93
93
|
"extends": script$1,
|
|
94
|
+
inheritAttrs: false,
|
|
94
95
|
emits: ['update:page'],
|
|
95
96
|
isRemainingItemsAdded: false,
|
|
96
97
|
data: function data() {
|
|
@@ -558,7 +559,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
558
559
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
559
560
|
"class": _ctx.cx('root'),
|
|
560
561
|
role: "region"
|
|
561
|
-
}, _ctx.
|
|
562
|
+
}, _ctx.ptmi('root')), [_ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
562
563
|
key: 0,
|
|
563
564
|
"class": _ctx.cx('header')
|
|
564
565
|
}, _ctx.ptm('header')), [vue.renderSlot(_ctx.$slots, "header")], 16)) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("primevue/icons/chevrondown"),e=require("primevue/icons/chevronleft"),i=require("primevue/icons/chevronright"),n=require("primevue/icons/chevronup"),r=require("primevue/ripple"),o=require("primevue/utils"),a=require("primevue/basecomponent"),s=require("primevue/carousel/style"),l=require("vue");function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=c(t),u=c(e),h=c(i),m=c(n),p=c(r);function f(t){return y(t)||b(t)||g(t)||v()}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(t,e){if(t){if("string"==typeof t)return I(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?I(t,e):void 0}}function b(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function y(t){if(Array.isArray(t))return I(t)}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var S={name:"Carousel",extends:{name:"BaseCarousel",extends:c(a).default,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}},style:c(s).default,provide:function(){return{$parentInstance:this}}},emits:["update:page"],isRemainingItemsAdded:!1,data:function(){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:function(t){t>this.d_page?this.navForward({},t):t<this.d_page&&this.navBackward({},t),this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!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;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===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,e=!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, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(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,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&o.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var r=this.d_page;r=parseInt(r*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*r*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",r),this.d_page=r}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&o.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, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===o.DomHandler.getAttribute(t,"data-p-highlight")})),i=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",o.DomHandler.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=f(this.responsiveOptions),n=o.ObjectUtils.localeComparator();i.sort((function(t,e){return o.ObjectUtils.sort(t.breakpoint,e.breakpoint,-1,n)}));for(var r=0;r<i.length;r++){var a=i[r];e+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return o.UniqueComponentId()}},components:{ChevronRightIcon:h.default,ChevronDownIcon:d.default,ChevronLeftIcon:u.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function C(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function V(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?C(Object(i),!0).forEach((function(e){x(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):C(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function x(t,e,i){var n;return(e="symbol"==_(n=k(e,"string"))?n:String(n))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function k(t,e){if("object"!=_(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var w=["aria-live"],B=["disabled","aria-label"],P=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],$=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],A=["disabled","aria-label"],D=["data-p-highlight"],E=["tabindex","aria-label","aria-current","onClick"];S.render=function(t,e,i,n,r,o){var a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:t.cx("root"),role:"region"},t.ptm("root")),[t.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[l.renderSlot(t.$slots,"header")],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[l.createElementVNode("div",l.mergeProps({class:[t.cx("container"),t.containerClass],"aria-live":r.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,type:"button",class:t.cx("previousButton"),disabled:o.backwardIsDisabled,"aria-label":o.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return o.navBackward&&o.navBackward.apply(o,arguments)})},V(V({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,B)),[[a]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:t.cx("itemsContent"),style:[{height:o.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return o.onTouchEnd&&o.onTouchEnd.apply(o,arguments)}),onTouchstart:e[3]||(e[3]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onTouchmove:e[4]||(e[4]=function(){return o.onTouchMove&&o.onTouchMove.apply(o,arguments)})},t.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return o.onTransitionEnd&&o.onTransitionEnd.apply(o,arguments)})},t.ptm("itemsContainer")),[o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(t.value.slice(-1*r.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*r.totalShiftedItems===t.value.length+r.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*r.d_numVisible).length-1===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,P)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":o.firstIndex()>i||o.lastIndex()<i||void 0,"aria-label":o.ariaSlideNumber(i),"aria-roledescription":o.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":o.firstIndex()<=i&&o.lastIndex()>=i,"data-p-carousel-item-start":o.firstIndex()===i,"data-p-carousel-item-end":o.lastIndex()===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,$)})),128)),o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(t.value.slice(0,r.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},t.ptm("itemCloned")),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16)})),128)):l.createCommentVNode("",!0)],16)],16),t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,type:"button",class:t.cx("nextButton"),disabled:o.forwardIsDisabled,"aria-label":o.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return o.navForward&&o.navForward.apply(o,arguments)})},V(V({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,A)),[[a]]):l.createCommentVNode("",!0)],16,w),o.totalIndicators>=0&&t.showIndicators?(l.openBlock(),l.createElementBlock("ul",l.mergeProps({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return o.onIndicatorKeydown&&o.onIndicatorKeydown.apply(o,arguments)})},t.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.totalIndicators,(function(e,i){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",o.getIndicatorPTOptions(i)),{"data-p-highlight":r.d_page===i}),[l.createElementVNode("button",l.mergeProps({class:t.cx("indicatorButton"),type:"button",tabindex:r.d_page===i?"0":"-1","aria-label":o.ariaPageLabel(i+1),"aria-current":r.d_page===i?"page":void 0,onClick:function(t){return o.onIndicatorClick(t,i)}},t.ptm("indicatorButton",o.getIndicatorPTOptions(i))),null,16,E)],16,D)})),128))],16)):l.createCommentVNode("",!0)],16),t.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:t.cx("footer")},t.ptm("footer")),[l.renderSlot(t.$slots,"footer")],16)):l.createCommentVNode("",!0)],16)},module.exports=S;
|
|
1
|
+
"use strict";var t=require("primevue/icons/chevrondown"),e=require("primevue/icons/chevronleft"),i=require("primevue/icons/chevronright"),n=require("primevue/icons/chevronup"),r=require("primevue/ripple"),o=require("primevue/utils"),a=require("primevue/basecomponent"),s=require("primevue/carousel/style"),l=require("vue");function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=c(t),u=c(e),h=c(i),m=c(n),p=c(r);function f(t){return y(t)||b(t)||g(t)||v()}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(t,e){if(t){if("string"==typeof t)return I(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?I(t,e):void 0}}function b(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function y(t){if(Array.isArray(t))return I(t)}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var S={name:"Carousel",extends:{name:"BaseCarousel",extends:c(a).default,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}},style:c(s).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:page"],isRemainingItemsAdded:!1,data:function(){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:function(t){t>this.d_page?this.navForward({},t):t<this.d_page&&this.navBackward({},t),this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!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;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===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,e=!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, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(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,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&o.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var r=this.d_page;r=parseInt(r*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*r*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",r),this.d_page=r}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&o.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, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===o.DomHandler.getAttribute(t,"data-p-highlight")})),i=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",o.DomHandler.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=f(this.responsiveOptions),n=o.ObjectUtils.localeComparator();i.sort((function(t,e){return o.ObjectUtils.sort(t.breakpoint,e.breakpoint,-1,n)}));for(var r=0;r<i.length;r++){var a=i[r];e+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return o.UniqueComponentId()}},components:{ChevronRightIcon:h.default,ChevronDownIcon:d.default,ChevronLeftIcon:u.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function C(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function V(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?C(Object(i),!0).forEach((function(e){x(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):C(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function x(t,e,i){var n;return(e="symbol"==_(n=k(e,"string"))?n:String(n))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function k(t,e){if("object"!=_(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var w=["aria-live"],B=["disabled","aria-label"],P=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],$=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],A=["disabled","aria-label"],D=["data-p-highlight"],E=["tabindex","aria-label","aria-current","onClick"];S.render=function(t,e,i,n,r,o){var a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:t.cx("root"),role:"region"},t.ptmi("root")),[t.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[l.renderSlot(t.$slots,"header")],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[l.createElementVNode("div",l.mergeProps({class:[t.cx("container"),t.containerClass],"aria-live":r.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,type:"button",class:t.cx("previousButton"),disabled:o.backwardIsDisabled,"aria-label":o.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return o.navBackward&&o.navBackward.apply(o,arguments)})},V(V({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,B)),[[a]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:t.cx("itemsContent"),style:[{height:o.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return o.onTouchEnd&&o.onTouchEnd.apply(o,arguments)}),onTouchstart:e[3]||(e[3]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onTouchmove:e[4]||(e[4]=function(){return o.onTouchMove&&o.onTouchMove.apply(o,arguments)})},t.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return o.onTransitionEnd&&o.onTransitionEnd.apply(o,arguments)})},t.ptm("itemsContainer")),[o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(t.value.slice(-1*r.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*r.totalShiftedItems===t.value.length+r.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*r.d_numVisible).length-1===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,P)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":o.firstIndex()>i||o.lastIndex()<i||void 0,"aria-label":o.ariaSlideNumber(i),"aria-roledescription":o.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":o.firstIndex()<=i&&o.lastIndex()>=i,"data-p-carousel-item-start":o.firstIndex()===i,"data-p-carousel-item-end":o.lastIndex()===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,$)})),128)),o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(t.value.slice(0,r.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},t.ptm("itemCloned")),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16)})),128)):l.createCommentVNode("",!0)],16)],16),t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,type:"button",class:t.cx("nextButton"),disabled:o.forwardIsDisabled,"aria-label":o.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return o.navForward&&o.navForward.apply(o,arguments)})},V(V({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,A)),[[a]]):l.createCommentVNode("",!0)],16,w),o.totalIndicators>=0&&t.showIndicators?(l.openBlock(),l.createElementBlock("ul",l.mergeProps({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return o.onIndicatorKeydown&&o.onIndicatorKeydown.apply(o,arguments)})},t.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.totalIndicators,(function(e,i){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",o.getIndicatorPTOptions(i)),{"data-p-highlight":r.d_page===i}),[l.createElementVNode("button",l.mergeProps({class:t.cx("indicatorButton"),type:"button",tabindex:r.d_page===i?"0":"-1","aria-label":o.ariaPageLabel(i+1),"aria-current":r.d_page===i?"page":void 0,onClick:function(t){return o.onIndicatorClick(t,i)}},t.ptm("indicatorButton",o.getIndicatorPTOptions(i))),null,16,E)],16,D)})),128))],16)):l.createCommentVNode("",!0)],16),t.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:t.cx("footer")},t.ptm("footer")),[l.renderSlot(t.$slots,"footer")],16)):l.createCommentVNode("",!0)],16)},module.exports=S;
|
package/carousel/carousel.esm.js
CHANGED
|
@@ -79,6 +79,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
79
79
|
var script = {
|
|
80
80
|
name: 'Carousel',
|
|
81
81
|
"extends": script$1,
|
|
82
|
+
inheritAttrs: false,
|
|
82
83
|
emits: ['update:page'],
|
|
83
84
|
isRemainingItemsAdded: false,
|
|
84
85
|
data: function data() {
|
|
@@ -546,7 +547,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
546
547
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
547
548
|
"class": _ctx.cx('root'),
|
|
548
549
|
role: "region"
|
|
549
|
-
}, _ctx.
|
|
550
|
+
}, _ctx.ptmi('root')), [_ctx.$slots.header ? (openBlock(), createElementBlock("div", mergeProps({
|
|
550
551
|
key: 0,
|
|
551
552
|
"class": _ctx.cx('header')
|
|
552
553
|
}, _ctx.ptm('header')), [renderSlot(_ctx.$slots, "header")], 16)) : createCommentVNode("", true), createElementVNode("div", mergeProps({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/icons/chevrondown";import e from"primevue/icons/chevronleft";import i from"primevue/icons/chevronright";import n from"primevue/icons/chevronup";import a from"primevue/ripple";import{DomHandler as s,ObjectUtils as o,UniqueComponentId as r}from"primevue/utils";import l from"primevue/basecomponent";import c from"primevue/carousel/style";import{resolveDirective as u,openBlock as d,createElementBlock as h,mergeProps as m,renderSlot as p,createCommentVNode as f,createElementVNode as v,withDirectives as b,createBlock as g,resolveDynamicComponent as y,Fragment as I,renderList as _}from"vue";function S(t){return V(t)||C(t)||w(t)||x()}function x(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w(t,e){if(t){if("string"==typeof t)return $(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$(t,e):void 0}}function C(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function V(t){if(Array.isArray(t))return $(t)}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var A={name:"Carousel",extends:{name:"BaseCarousel",extends:l,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}},style:c,provide:function(){return{$parentInstance:this}}},emits:["update:page"],isRemainingItemsAdded:!1,data:function(){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:function(t){t>this.d_page?this.navForward({},t):t<this.d_page&&this.navBackward({},t),this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!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;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===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,e=!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, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(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,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&s.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var a=this.d_page;a=parseInt(a*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*a*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",a),this.d_page=a}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&s.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, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===s.getAttribute(t,"data-p-highlight")})),i=s.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=s.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",s.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=S(this.responsiveOptions),n=o.localeComparator();i.sort((function(t,e){return o.sort(t.breakpoint,e.breakpoint,-1,n)}));for(var a=0;a<i.length;a++){var r=i[a];e+="\n @media screen and (max-width: ".concat(r.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/r.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return r()}},components:{ChevronRightIcon:i,ChevronDownIcon:t,ChevronLeftIcon:e,ChevronUpIcon:n},directives:{ripple:a}};function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function k(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function O(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?k(Object(i),!0).forEach((function(e){T(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function T(t,e,i){var n;return(e="symbol"==P(n=L(e,"string"))?n:String(n))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function L(t,e){if("object"!=P(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var B=["aria-live"],D=["disabled","aria-label"],N=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],R=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["disabled","aria-label"],j=["data-p-highlight"],F=["tabindex","aria-label","aria-current","onClick"];A.render=function(t,e,i,n,a,s){var o=u("ripple");return d(),h("div",m({class:t.cx("root"),role:"region"},t.ptm("root")),[t.$slots.header?(d(),h("div",m({key:0,class:t.cx("header")},t.ptm("header")),[p(t.$slots,"header")],16)):f("",!0),v("div",m({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[v("div",m({class:[t.cx("container"),t.containerClass],"aria-live":a.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?b((d(),h("button",m({key:0,type:"button",class:t.cx("previousButton"),disabled:s.backwardIsDisabled,"aria-label":s.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return s.navBackward&&s.navBackward.apply(s,arguments)})},O(O({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[p(t.$slots,"previousicon",{},(function(){return[(d(),g(y(s.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),m({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,D)),[[o]]):f("",!0),v("div",m({class:t.cx("itemsContent"),style:[{height:s.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return s.onTouchEnd&&s.onTouchEnd.apply(s,arguments)}),onTouchstart:e[3]||(e[3]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onTouchmove:e[4]||(e[4]=function(){return s.onTouchMove&&s.onTouchMove.apply(s,arguments)})},t.ptm("itemsContent")),[v("div",m({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return s.onTransitionEnd&&s.onTransitionEnd.apply(s,arguments)})},t.ptm("itemsContainer")),[s.isCircular()?(d(!0),h(I,{key:0},_(t.value.slice(-1*a.d_numVisible),(function(e,i){return d(),h("div",m({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*a.totalShiftedItems===t.value.length+a.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*a.d_numVisible).length-1===i}),[p(t.$slots,"item",{data:e,index:i})],16,N)})),128)):f("",!0),(d(!0),h(I,null,_(t.value,(function(e,i){return d(),h("div",m({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":s.firstIndex()>i||s.lastIndex()<i||void 0,"aria-label":s.ariaSlideNumber(i),"aria-roledescription":s.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":s.firstIndex()<=i&&s.lastIndex()>=i,"data-p-carousel-item-start":s.firstIndex()===i,"data-p-carousel-item-end":s.lastIndex()===i}),[p(t.$slots,"item",{data:e,index:i})],16,R)})),128)),s.isCircular()?(d(!0),h(I,{key:1},_(t.value.slice(0,a.d_numVisible),(function(e,i){return d(),h("div",m({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned")),[p(t.$slots,"item",{data:e,index:i})],16)})),128)):f("",!0)],16)],16),t.showNavigators?b((d(),h("button",m({key:1,type:"button",class:t.cx("nextButton"),disabled:s.forwardIsDisabled,"aria-label":s.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return s.navForward&&s.navForward.apply(s,arguments)})},O(O({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[p(t.$slots,"nexticon",{},(function(){return[(d(),g(y(s.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),m({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,E)),[[o]]):f("",!0)],16,B),s.totalIndicators>=0&&t.showIndicators?(d(),h("ul",m({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return s.onIndicatorKeydown&&s.onIndicatorKeydown.apply(s,arguments)})},t.ptm("indicators")),[(d(!0),h(I,null,_(s.totalIndicators,(function(e,i){return d(),h("li",m({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",s.getIndicatorPTOptions(i)),{"data-p-highlight":a.d_page===i}),[v("button",m({class:t.cx("indicatorButton"),type:"button",tabindex:a.d_page===i?"0":"-1","aria-label":s.ariaPageLabel(i+1),"aria-current":a.d_page===i?"page":void 0,onClick:function(t){return s.onIndicatorClick(t,i)}},t.ptm("indicatorButton",s.getIndicatorPTOptions(i))),null,16,F)],16,j)})),128))],16)):f("",!0)],16),t.$slots.footer?(d(),h("div",m({key:1,class:t.cx("footer")},t.ptm("footer")),[p(t.$slots,"footer")],16)):f("",!0)],16)};export{A as default};
|
|
1
|
+
import t from"primevue/icons/chevrondown";import e from"primevue/icons/chevronleft";import i from"primevue/icons/chevronright";import n from"primevue/icons/chevronup";import a from"primevue/ripple";import{DomHandler as s,ObjectUtils as o,UniqueComponentId as r}from"primevue/utils";import l from"primevue/basecomponent";import c from"primevue/carousel/style";import{resolveDirective as u,openBlock as d,createElementBlock as h,mergeProps as m,renderSlot as p,createCommentVNode as f,createElementVNode as v,withDirectives as b,createBlock as g,resolveDynamicComponent as y,Fragment as I,renderList as _}from"vue";function S(t){return V(t)||C(t)||w(t)||x()}function x(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w(t,e){if(t){if("string"==typeof t)return $(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$(t,e):void 0}}function C(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function V(t){if(Array.isArray(t))return $(t)}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var A={name:"Carousel",extends:{name:"BaseCarousel",extends:l,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}},style:c,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:page"],isRemainingItemsAdded:!1,data:function(){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:function(t){t>this.d_page?this.navForward({},t):t<this.d_page&&this.navBackward({},t),this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!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;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===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,e=!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, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(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,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&s.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var a=this.d_page;a=parseInt(a*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*a*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",a),this.d_page=a}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&s.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, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===s.getAttribute(t,"data-p-highlight")})),i=s.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=s.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",s.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=S(this.responsiveOptions),n=o.localeComparator();i.sort((function(t,e){return o.sort(t.breakpoint,e.breakpoint,-1,n)}));for(var a=0;a<i.length;a++){var r=i[a];e+="\n @media screen and (max-width: ".concat(r.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/r.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return r()}},components:{ChevronRightIcon:i,ChevronDownIcon:t,ChevronLeftIcon:e,ChevronUpIcon:n},directives:{ripple:a}};function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function k(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function O(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?k(Object(i),!0).forEach((function(e){T(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function T(t,e,i){var n;return(e="symbol"==P(n=L(e,"string"))?n:String(n))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function L(t,e){if("object"!=P(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var B=["aria-live"],D=["disabled","aria-label"],N=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],R=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["disabled","aria-label"],j=["data-p-highlight"],F=["tabindex","aria-label","aria-current","onClick"];A.render=function(t,e,i,n,a,s){var o=u("ripple");return d(),h("div",m({class:t.cx("root"),role:"region"},t.ptmi("root")),[t.$slots.header?(d(),h("div",m({key:0,class:t.cx("header")},t.ptm("header")),[p(t.$slots,"header")],16)):f("",!0),v("div",m({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[v("div",m({class:[t.cx("container"),t.containerClass],"aria-live":a.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?b((d(),h("button",m({key:0,type:"button",class:t.cx("previousButton"),disabled:s.backwardIsDisabled,"aria-label":s.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return s.navBackward&&s.navBackward.apply(s,arguments)})},O(O({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[p(t.$slots,"previousicon",{},(function(){return[(d(),g(y(s.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),m({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,D)),[[o]]):f("",!0),v("div",m({class:t.cx("itemsContent"),style:[{height:s.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return s.onTouchEnd&&s.onTouchEnd.apply(s,arguments)}),onTouchstart:e[3]||(e[3]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onTouchmove:e[4]||(e[4]=function(){return s.onTouchMove&&s.onTouchMove.apply(s,arguments)})},t.ptm("itemsContent")),[v("div",m({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return s.onTransitionEnd&&s.onTransitionEnd.apply(s,arguments)})},t.ptm("itemsContainer")),[s.isCircular()?(d(!0),h(I,{key:0},_(t.value.slice(-1*a.d_numVisible),(function(e,i){return d(),h("div",m({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*a.totalShiftedItems===t.value.length+a.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*a.d_numVisible).length-1===i}),[p(t.$slots,"item",{data:e,index:i})],16,N)})),128)):f("",!0),(d(!0),h(I,null,_(t.value,(function(e,i){return d(),h("div",m({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":s.firstIndex()>i||s.lastIndex()<i||void 0,"aria-label":s.ariaSlideNumber(i),"aria-roledescription":s.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":s.firstIndex()<=i&&s.lastIndex()>=i,"data-p-carousel-item-start":s.firstIndex()===i,"data-p-carousel-item-end":s.lastIndex()===i}),[p(t.$slots,"item",{data:e,index:i})],16,R)})),128)),s.isCircular()?(d(!0),h(I,{key:1},_(t.value.slice(0,a.d_numVisible),(function(e,i){return d(),h("div",m({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned")),[p(t.$slots,"item",{data:e,index:i})],16)})),128)):f("",!0)],16)],16),t.showNavigators?b((d(),h("button",m({key:1,type:"button",class:t.cx("nextButton"),disabled:s.forwardIsDisabled,"aria-label":s.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return s.navForward&&s.navForward.apply(s,arguments)})},O(O({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[p(t.$slots,"nexticon",{},(function(){return[(d(),g(y(s.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),m({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,E)),[[o]]):f("",!0)],16,B),s.totalIndicators>=0&&t.showIndicators?(d(),h("ul",m({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return s.onIndicatorKeydown&&s.onIndicatorKeydown.apply(s,arguments)})},t.ptm("indicators")),[(d(!0),h(I,null,_(s.totalIndicators,(function(e,i){return d(),h("li",m({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",s.getIndicatorPTOptions(i)),{"data-p-highlight":a.d_page===i}),[v("button",m({class:t.cx("indicatorButton"),type:"button",tabindex:a.d_page===i?"0":"-1","aria-label":s.ariaPageLabel(i+1),"aria-current":a.d_page===i?"page":void 0,onClick:function(t){return s.onIndicatorClick(t,i)}},t.ptm("indicatorButton",s.getIndicatorPTOptions(i))),null,16,F)],16,j)})),128))],16)):f("",!0)],16),t.$slots.footer?(d(),h("div",m({key:1,class:t.cx("footer")},t.ptm("footer")),[p(t.$slots,"footer")],16)):f("",!0)],16)};export{A as default};
|
package/carousel/carousel.js
CHANGED
|
@@ -83,6 +83,7 @@ this.primevue.carousel = (function (ChevronDownIcon, ChevronLeftIcon, ChevronRig
|
|
|
83
83
|
var script = {
|
|
84
84
|
name: 'Carousel',
|
|
85
85
|
"extends": script$1,
|
|
86
|
+
inheritAttrs: false,
|
|
86
87
|
emits: ['update:page'],
|
|
87
88
|
isRemainingItemsAdded: false,
|
|
88
89
|
data: function data() {
|
|
@@ -550,7 +551,7 @@ this.primevue.carousel = (function (ChevronDownIcon, ChevronLeftIcon, ChevronRig
|
|
|
550
551
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
551
552
|
"class": _ctx.cx('root'),
|
|
552
553
|
role: "region"
|
|
553
|
-
}, _ctx.
|
|
554
|
+
}, _ctx.ptmi('root')), [_ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
554
555
|
key: 0,
|
|
555
556
|
"class": _ctx.cx('header')
|
|
556
557
|
}, _ctx.ptm('header')), [vue.renderSlot(_ctx.$slots, "header")], 16)) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
package/carousel/carousel.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.carousel=function(t,e,i,n,o,a,r,s,l){"use strict";function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=c(t),u=c(e),h=c(i),m=c(n),p=c(o);function f(t){return y(t)||b(t)||g(t)||v()}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(t,e){if(t){if("string"==typeof t)return I(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?I(t,e):void 0}}function b(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function y(t){if(Array.isArray(t))return I(t)}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var S={name:"Carousel",extends:{name:"BaseCarousel",extends:c(r).default,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}},style:c(s).default,provide:function(){return{$parentInstance:this}}},emits:["update:page"],isRemainingItemsAdded:!1,data:function(){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:function(t){t>this.d_page?this.navForward({},t):t<this.d_page&&this.navBackward({},t),this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!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;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===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,e=!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, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(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,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var o=this.d_page;o=parseInt(o*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*o*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",o),this.d_page=o}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&a.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, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=f(a.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=f(a.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=f(a.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===a.DomHandler.getAttribute(t,"data-p-highlight")})),i=a.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=f(a.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=a.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=f(a.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",a.DomHandler.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=f(this.responsiveOptions),n=a.ObjectUtils.localeComparator();i.sort((function(t,e){return a.ObjectUtils.sort(t.breakpoint,e.breakpoint,-1,n)}));for(var o=0;o<i.length;o++){var r=i[o];e+="\n @media screen and (max-width: ".concat(r.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/r.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return a.UniqueComponentId()}},components:{ChevronRightIcon:h.default,ChevronDownIcon:d.default,ChevronLeftIcon:u.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function C(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function V(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?C(Object(i),!0).forEach((function(e){x(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):C(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function x(t,e,i){var n;return(e="symbol"==_(n=k(e,"string"))?n:String(n))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function k(t,e){if("object"!=_(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var w=["aria-live"],B=["disabled","aria-label"],P=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],$=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],A=["disabled","aria-label"],D=["data-p-highlight"],E=["tabindex","aria-label","aria-current","onClick"];return S.render=function(t,e,i,n,o,a){var r=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:t.cx("root"),role:"region"},t.ptm("root")),[t.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[l.renderSlot(t.$slots,"header")],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[l.createElementVNode("div",l.mergeProps({class:[t.cx("container"),t.containerClass],"aria-live":o.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,type:"button",class:t.cx("previousButton"),disabled:a.backwardIsDisabled,"aria-label":a.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return a.navBackward&&a.navBackward.apply(a,arguments)})},V(V({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,B)),[[r]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:t.cx("itemsContent"),style:[{height:a.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return a.onTouchEnd&&a.onTouchEnd.apply(a,arguments)}),onTouchstart:e[3]||(e[3]=function(){return a.onTouchStart&&a.onTouchStart.apply(a,arguments)}),onTouchmove:e[4]||(e[4]=function(){return a.onTouchMove&&a.onTouchMove.apply(a,arguments)})},t.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return a.onTransitionEnd&&a.onTransitionEnd.apply(a,arguments)})},t.ptm("itemsContainer")),[a.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(t.value.slice(-1*o.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:o.totalShiftedItems,d_numVisible:o.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*o.totalShiftedItems===t.value.length+o.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*o.d_numVisible).length-1===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,P)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":a.firstIndex()>i||a.lastIndex()<i||void 0,"aria-label":a.ariaSlideNumber(i),"aria-roledescription":a.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":a.firstIndex()<=i&&a.lastIndex()>=i,"data-p-carousel-item-start":a.firstIndex()===i,"data-p-carousel-item-end":a.lastIndex()===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,$)})),128)),a.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(t.value.slice(0,o.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:o.totalShiftedItems,d_numVisible:o.d_numVisible})},t.ptm("itemCloned")),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16)})),128)):l.createCommentVNode("",!0)],16)],16),t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,type:"button",class:t.cx("nextButton"),disabled:a.forwardIsDisabled,"aria-label":a.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return a.navForward&&a.navForward.apply(a,arguments)})},V(V({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,A)),[[r]]):l.createCommentVNode("",!0)],16,w),a.totalIndicators>=0&&t.showIndicators?(l.openBlock(),l.createElementBlock("ul",l.mergeProps({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return a.onIndicatorKeydown&&a.onIndicatorKeydown.apply(a,arguments)})},t.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.totalIndicators,(function(e,i){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",a.getIndicatorPTOptions(i)),{"data-p-highlight":o.d_page===i}),[l.createElementVNode("button",l.mergeProps({class:t.cx("indicatorButton"),type:"button",tabindex:o.d_page===i?"0":"-1","aria-label":a.ariaPageLabel(i+1),"aria-current":o.d_page===i?"page":void 0,onClick:function(t){return a.onIndicatorClick(t,i)}},t.ptm("indicatorButton",a.getIndicatorPTOptions(i))),null,16,E)],16,D)})),128))],16)):l.createCommentVNode("",!0)],16),t.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:t.cx("footer")},t.ptm("footer")),[l.renderSlot(t.$slots,"footer")],16)):l.createCommentVNode("",!0)],16)},S}(primevue.icons.chevrondown,primevue.icons.chevronleft,primevue.icons.chevronright,primevue.icons.chevronup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.carousel.style,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.carousel=function(t,e,i,n,o,a,r,s,l){"use strict";function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=c(t),u=c(e),h=c(i),m=c(n),p=c(o);function f(t){return y(t)||b(t)||g(t)||v()}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(t,e){if(t){if("string"==typeof t)return I(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?I(t,e):void 0}}function b(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function y(t){if(Array.isArray(t))return I(t)}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var S={name:"Carousel",extends:{name:"BaseCarousel",extends:c(r).default,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}},style:c(s).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:page"],isRemainingItemsAdded:!1,data:function(){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:function(t){t>this.d_page?this.navForward({},t):t<this.d_page&&this.navBackward({},t),this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!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;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===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,e=!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, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(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,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&a.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var o=this.d_page;o=parseInt(o*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*o*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",o),this.d_page=o}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&a.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, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=f(a.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=f(a.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=f(a.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===a.DomHandler.getAttribute(t,"data-p-highlight")})),i=a.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=f(a.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=a.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=f(a.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",a.DomHandler.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=f(this.responsiveOptions),n=a.ObjectUtils.localeComparator();i.sort((function(t,e){return a.ObjectUtils.sort(t.breakpoint,e.breakpoint,-1,n)}));for(var o=0;o<i.length;o++){var r=i[o];e+="\n @media screen and (max-width: ".concat(r.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/r.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return a.UniqueComponentId()}},components:{ChevronRightIcon:h.default,ChevronDownIcon:d.default,ChevronLeftIcon:u.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function C(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function V(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?C(Object(i),!0).forEach((function(e){x(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):C(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function x(t,e,i){var n;return(e="symbol"==_(n=k(e,"string"))?n:String(n))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function k(t,e){if("object"!=_(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var w=["aria-live"],B=["disabled","aria-label"],P=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],$=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],A=["disabled","aria-label"],D=["data-p-highlight"],E=["tabindex","aria-label","aria-current","onClick"];return S.render=function(t,e,i,n,o,a){var r=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:t.cx("root"),role:"region"},t.ptmi("root")),[t.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[l.renderSlot(t.$slots,"header")],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[l.createElementVNode("div",l.mergeProps({class:[t.cx("container"),t.containerClass],"aria-live":o.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,type:"button",class:t.cx("previousButton"),disabled:a.backwardIsDisabled,"aria-label":a.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return a.navBackward&&a.navBackward.apply(a,arguments)})},V(V({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,B)),[[r]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:t.cx("itemsContent"),style:[{height:a.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return a.onTouchEnd&&a.onTouchEnd.apply(a,arguments)}),onTouchstart:e[3]||(e[3]=function(){return a.onTouchStart&&a.onTouchStart.apply(a,arguments)}),onTouchmove:e[4]||(e[4]=function(){return a.onTouchMove&&a.onTouchMove.apply(a,arguments)})},t.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return a.onTransitionEnd&&a.onTransitionEnd.apply(a,arguments)})},t.ptm("itemsContainer")),[a.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(t.value.slice(-1*o.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:o.totalShiftedItems,d_numVisible:o.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*o.totalShiftedItems===t.value.length+o.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*o.d_numVisible).length-1===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,P)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":a.firstIndex()>i||a.lastIndex()<i||void 0,"aria-label":a.ariaSlideNumber(i),"aria-roledescription":a.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":a.firstIndex()<=i&&a.lastIndex()>=i,"data-p-carousel-item-start":a.firstIndex()===i,"data-p-carousel-item-end":a.lastIndex()===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,$)})),128)),a.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(t.value.slice(0,o.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:o.totalShiftedItems,d_numVisible:o.d_numVisible})},t.ptm("itemCloned")),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16)})),128)):l.createCommentVNode("",!0)],16)],16),t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,type:"button",class:t.cx("nextButton"),disabled:a.forwardIsDisabled,"aria-label":a.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return a.navForward&&a.navForward.apply(a,arguments)})},V(V({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,A)),[[r]]):l.createCommentVNode("",!0)],16,w),a.totalIndicators>=0&&t.showIndicators?(l.openBlock(),l.createElementBlock("ul",l.mergeProps({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return a.onIndicatorKeydown&&a.onIndicatorKeydown.apply(a,arguments)})},t.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.totalIndicators,(function(e,i){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",a.getIndicatorPTOptions(i)),{"data-p-highlight":o.d_page===i}),[l.createElementVNode("button",l.mergeProps({class:t.cx("indicatorButton"),type:"button",tabindex:o.d_page===i?"0":"-1","aria-label":a.ariaPageLabel(i+1),"aria-current":o.d_page===i?"page":void 0,onClick:function(t){return a.onIndicatorClick(t,i)}},t.ptm("indicatorButton",a.getIndicatorPTOptions(i))),null,16,E)],16,D)})),128))],16)):l.createCommentVNode("",!0)],16),t.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:t.cx("footer")},t.ptm("footer")),[l.renderSlot(t.$slots,"footer")],16)):l.createCommentVNode("",!0)],16)},S}(primevue.icons.chevrondown,primevue.icons.chevronleft,primevue.icons.chevronright,primevue.icons.chevronup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.carousel.style,Vue);
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { HTMLAttributes, InputHTMLAttributes, TransitionProps, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { PassThroughOptions } from '../passthrough';
|
|
13
|
-
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
|
13
|
+
import { ClassComponent, GlobalComponentConstructor, PassThrough, HintedString } from '../ts-helpers';
|
|
14
14
|
|
|
15
15
|
export declare type CascadeSelectPassThroughOptionType = CascadeSelectPassThroughAttributes | ((options: CascadeSelectPassThroughMethodOptions) => CascadeSelectPassThroughAttributes | string) | string | null | undefined;
|
|
16
16
|
|
|
@@ -322,7 +322,7 @@ export interface CascadeSelectProps {
|
|
|
322
322
|
* A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are 'body' for document body and 'self' for the element itself.
|
|
323
323
|
* @defaultValue body
|
|
324
324
|
*/
|
|
325
|
-
appendTo?: 'body' | 'self' |
|
|
325
|
+
appendTo?: HintedString<'body' | 'self'> | undefined | HTMLElement;
|
|
326
326
|
/**
|
|
327
327
|
* Whether the dropdown is in loading state.
|
|
328
328
|
* @defaultValue false
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div ref="container" :class="cx('root')" :style="sx('root')" @click="onContainerClick($event)" v-bind="
|
|
2
|
+
<div ref="container" :class="cx('root')" :style="sx('root')" @click="onContainerClick($event)" v-bind="ptmi('root')">
|
|
3
3
|
<div class="p-hidden-accessible" v-bind="ptm('hiddenInputWrapper')" :data-p-hidden-accessible="true">
|
|
4
4
|
<input
|
|
5
5
|
ref="focusInput"
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
:aria-expanded="overlayVisible"
|
|
19
19
|
:aria-controls="id + '_tree'"
|
|
20
20
|
:aria-activedescendant="focused ? focusedOptionId : undefined"
|
|
21
|
+
:aria-invalid="invalid || undefined"
|
|
21
22
|
@focus="onFocus"
|
|
22
23
|
@blur="onBlur"
|
|
23
24
|
@keydown="onKeyDown"
|
|
@@ -89,6 +90,7 @@ import CascadeSelectSub from './CascadeSelectSub.vue';
|
|
|
89
90
|
export default {
|
|
90
91
|
name: 'CascadeSelect',
|
|
91
92
|
extends: BaseCascadeSelect,
|
|
93
|
+
inheritAttrs: false,
|
|
92
94
|
emits: ['update:modelValue', 'change', 'focus', 'blur', 'click', 'group-change', 'before-show', 'before-hide', 'hide', 'show'],
|
|
93
95
|
outsideClickListener: null,
|
|
94
96
|
scrollHandler: null,
|
|
@@ -282,13 +284,24 @@ export default {
|
|
|
282
284
|
|
|
283
285
|
const { index, level, parentKey, children } = processedOption;
|
|
284
286
|
const grouped = ObjectUtils.isNotEmpty(children);
|
|
287
|
+
const root = ObjectUtils.isEmpty(processedOption.parent);
|
|
288
|
+
const selected = this.isSelected(processedOption);
|
|
285
289
|
|
|
286
|
-
|
|
290
|
+
if (selected) {
|
|
291
|
+
const { index, key, level, parentKey } = processedOption;
|
|
287
292
|
|
|
288
|
-
|
|
293
|
+
this.focusedOptionInfo = { index, level, parentKey };
|
|
294
|
+
this.activeOptionPath = this.activeOptionPath.filter((p) => key !== p.key && key.startsWith(p.key));
|
|
295
|
+
|
|
296
|
+
this.dirty = !root;
|
|
297
|
+
} else {
|
|
298
|
+
const activeOptionPath = this.activeOptionPath.filter((p) => p.parentKey !== parentKey);
|
|
289
299
|
|
|
290
|
-
|
|
291
|
-
|
|
300
|
+
activeOptionPath.push(processedOption);
|
|
301
|
+
|
|
302
|
+
this.focusedOptionInfo = { index, level, parentKey };
|
|
303
|
+
this.activeOptionPath = activeOptionPath;
|
|
304
|
+
}
|
|
292
305
|
|
|
293
306
|
grouped ? this.onOptionGroupSelect(originalEvent, processedOption) : this.onOptionSelect(originalEvent, processedOption, isHide);
|
|
294
307
|
isFocus && DomHandler.focus(this.$refs.focusInput);
|
|
@@ -355,6 +355,7 @@ script$1.render = render$1;
|
|
|
355
355
|
var script = {
|
|
356
356
|
name: 'CascadeSelect',
|
|
357
357
|
"extends": script$2,
|
|
358
|
+
inheritAttrs: false,
|
|
358
359
|
emits: ['update:modelValue', 'change', 'focus', 'blur', 'click', 'group-change', 'before-show', 'before-hide', 'hide', 'show'],
|
|
359
360
|
outsideClickListener: null,
|
|
360
361
|
scrollHandler: null,
|
|
@@ -549,16 +550,34 @@ var script = {
|
|
|
549
550
|
parentKey = processedOption.parentKey,
|
|
550
551
|
children = processedOption.children;
|
|
551
552
|
var grouped = utils.ObjectUtils.isNotEmpty(children);
|
|
552
|
-
var
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
553
|
+
var root = utils.ObjectUtils.isEmpty(processedOption.parent);
|
|
554
|
+
var selected = this.isSelected(processedOption);
|
|
555
|
+
if (selected) {
|
|
556
|
+
var _index = processedOption.index,
|
|
557
|
+
key = processedOption.key,
|
|
558
|
+
_level = processedOption.level,
|
|
559
|
+
_parentKey = processedOption.parentKey;
|
|
560
|
+
this.focusedOptionInfo = {
|
|
561
|
+
index: _index,
|
|
562
|
+
level: _level,
|
|
563
|
+
parentKey: _parentKey
|
|
564
|
+
};
|
|
565
|
+
this.activeOptionPath = this.activeOptionPath.filter(function (p) {
|
|
566
|
+
return key !== p.key && key.startsWith(p.key);
|
|
567
|
+
});
|
|
568
|
+
this.dirty = !root;
|
|
569
|
+
} else {
|
|
570
|
+
var activeOptionPath = this.activeOptionPath.filter(function (p) {
|
|
571
|
+
return p.parentKey !== parentKey;
|
|
572
|
+
});
|
|
573
|
+
activeOptionPath.push(processedOption);
|
|
574
|
+
this.focusedOptionInfo = {
|
|
575
|
+
index: index,
|
|
576
|
+
level: level,
|
|
577
|
+
parentKey: parentKey
|
|
578
|
+
};
|
|
579
|
+
this.activeOptionPath = activeOptionPath;
|
|
580
|
+
}
|
|
562
581
|
grouped ? this.onOptionGroupSelect(originalEvent, processedOption) : this.onOptionSelect(originalEvent, processedOption, isHide);
|
|
563
582
|
isFocus && utils.DomHandler.focus(this.$refs.focusInput);
|
|
564
583
|
},
|
|
@@ -1073,7 +1092,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
1073
1092
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1074
1093
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
1075
1094
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1076
|
-
var _hoisted_1 = ["id", "disabled", "placeholder", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant"];
|
|
1095
|
+
var _hoisted_1 = ["id", "disabled", "placeholder", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"];
|
|
1077
1096
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1078
1097
|
var _component_SpinnerIcon = vue.resolveComponent("SpinnerIcon");
|
|
1079
1098
|
var _component_CascadeSelectSub = vue.resolveComponent("CascadeSelectSub");
|
|
@@ -1085,7 +1104,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1085
1104
|
onClick: _cache[5] || (_cache[5] = function ($event) {
|
|
1086
1105
|
return $options.onContainerClick($event);
|
|
1087
1106
|
})
|
|
1088
|
-
}, _ctx.
|
|
1107
|
+
}, _ctx.ptmi('root')), [vue.createElementVNode("div", vue.mergeProps({
|
|
1089
1108
|
"class": "p-hidden-accessible"
|
|
1090
1109
|
}, _ctx.ptm('hiddenInputWrapper'), {
|
|
1091
1110
|
"data-p-hidden-accessible": true
|
|
@@ -1106,6 +1125,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1106
1125
|
"aria-expanded": $data.overlayVisible,
|
|
1107
1126
|
"aria-controls": $data.id + '_tree',
|
|
1108
1127
|
"aria-activedescendant": $data.focused ? $options.focusedOptionId : undefined,
|
|
1128
|
+
"aria-invalid": _ctx.invalid || undefined,
|
|
1109
1129
|
onFocus: _cache[0] || (_cache[0] = function () {
|
|
1110
1130
|
return $options.onFocus && $options.onFocus.apply($options, arguments);
|
|
1111
1131
|
}),
|