primevue 3.32.2 → 3.34.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.d.ts +21 -2
- package/accordion/accordion.cjs.js +3 -3
- package/accordion/accordion.esm.js +3 -3
- package/accordion/accordion.js +3 -3
- package/accordiontab/AccordionTab.d.ts +24 -2
- package/autocomplete/AutoComplete.d.ts +24 -2
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/autocomplete.cjs.js +5 -5
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +5 -5
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +5 -5
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +21 -2
- package/avatargroup/AvatarGroup.d.ts +8 -2
- package/badge/Badge.d.ts +18 -2
- package/badgedirective/BadgeDirective.d.ts +12 -2
- package/badgedirective/badgedirective.cjs.js +3 -3
- package/badgedirective/badgedirective.esm.js +3 -3
- package/badgedirective/badgedirective.js +3 -3
- package/basecomponent/BaseComponent.vue +20 -22
- package/basecomponent/basecomponent.cjs.js +41 -28
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +41 -28
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +41 -28
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +42 -25
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +42 -25
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +42 -25
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BlockUI.d.ts +21 -2
- package/breadcrumb/Breadcrumb.d.ts +47 -2
- package/breadcrumb/Breadcrumb.vue +7 -2
- package/breadcrumb/BreadcrumbItem.vue +28 -3
- package/breadcrumb/breadcrumb.cjs.js +35 -8
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +36 -9
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +35 -8
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +24 -2
- package/button/button.cjs.js +1 -1
- package/button/button.esm.js +1 -1
- package/button/button.js +1 -1
- package/calendar/Calendar.d.ts +26 -4
- package/calendar/Calendar.vue +63 -29
- package/calendar/calendar.cjs.js +137 -51
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +137 -51
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +137 -51
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +8 -2
- package/carousel/Carousel.d.ts +24 -2
- package/carousel/Carousel.vue +22 -2
- package/carousel/carousel.cjs.js +9 -5
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +9 -5
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +9 -5
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +21 -2
- package/cascadeselect/cascadeselect.cjs.js +3 -3
- package/cascadeselect/cascadeselect.esm.js +3 -3
- package/cascadeselect/cascadeselect.js +3 -3
- package/chart/Chart.d.ts +18 -2
- package/chart/chart.cjs.js +3 -3
- package/chart/chart.esm.js +3 -3
- package/chart/chart.js +3 -3
- package/checkbox/Checkbox.d.ts +24 -2
- package/checkbox/checkbox.cjs.js +3 -3
- package/checkbox/checkbox.esm.js +3 -3
- package/checkbox/checkbox.js +3 -3
- package/chip/Chip.d.ts +21 -2
- package/chips/Chips.d.ts +21 -2
- package/chips/chips.cjs.js +3 -3
- package/chips/chips.esm.js +3 -3
- package/chips/chips.js +3 -3
- package/colorpicker/ColorPicker.d.ts +21 -2
- package/column/Column.d.ts +24 -2
- package/columngroup/ColumnGroup.d.ts +24 -2
- package/config/PrimeVue.d.ts +93 -92
- package/config/config.cjs.js +4 -3
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +4 -3
- package/config/config.esm.min.js +1 -1
- package/config/config.js +4 -3
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +21 -2
- package/confirmpopup/ConfirmPopup.d.ts +21 -2
- package/confirmpopup/confirmpopup.cjs.js +3 -3
- package/confirmpopup/confirmpopup.esm.js +3 -3
- package/confirmpopup/confirmpopup.js +3 -3
- package/contextmenu/ContextMenu.d.ts +54 -2
- package/contextmenu/ContextMenu.vue +13 -7
- package/contextmenu/ContextMenuSub.vue +34 -2
- package/contextmenu/contextmenu.cjs.js +41 -14
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +42 -15
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +41 -14
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +256 -147
- package/core/core.min.js +12 -12
- package/datatable/BodyCell.vue +14 -4
- package/datatable/DataTable.d.ts +41 -3
- package/datatable/DataTable.vue +6 -3
- package/datatable/TableBody.vue +7 -8
- package/datatable/datatable.cjs.js +63 -57
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +63 -57
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +63 -57
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +21 -2
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +21 -2
- package/deferredcontent/DeferredContent.d.ts +21 -2
- package/dialog/Dialog.d.ts +21 -2
- package/dialog/Dialog.vue +2 -2
- package/dialog/dialog.cjs.js +7 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +8 -6
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +7 -5
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +18 -2
- package/dock/Dock.d.ts +46 -2
- package/dock/Dock.vue +5 -0
- package/dock/DockSub.vue +20 -1
- package/dock/dock.cjs.js +21 -2
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +22 -3
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +21 -2
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +24 -2
- package/dropdown/dropdown.cjs.js +6 -6
- package/dropdown/dropdown.esm.js +6 -6
- package/dropdown/dropdown.js +6 -6
- package/editor/Editor.d.ts +22 -2
- package/editor/editor.cjs.js +3 -3
- package/editor/editor.esm.js +3 -3
- package/editor/editor.js +3 -3
- package/fieldset/Fieldset.d.ts +21 -2
- package/fieldset/fieldset.cjs.js +4 -4
- package/fieldset/fieldset.esm.js +4 -4
- package/fieldset/fieldset.js +4 -4
- package/fileupload/FileContent.vue +8 -6
- package/fileupload/FileUpload.d.ts +21 -2
- package/fileupload/FileUpload.vue +9 -7
- package/fileupload/fileupload.cjs.js +17 -13
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +17 -13
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +17 -13
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +8 -2
- package/galleria/Galleria.d.ts +24 -2
- package/galleria/galleria.cjs.js +9 -9
- package/galleria/galleria.esm.js +9 -9
- package/galleria/galleria.js +9 -9
- package/image/Image.d.ts +21 -2
- package/image/image.cjs.js +3 -3
- package/image/image.esm.js +3 -3
- package/image/image.js +3 -3
- package/inlinemessage/InlineMessage.d.ts +21 -2
- package/inplace/Inplace.d.ts +21 -2
- package/inplace/inplace.cjs.js +3 -3
- package/inplace/inplace.esm.js +3 -3
- package/inplace/inplace.js +3 -3
- package/inputmask/InputMask.d.ts +21 -2
- package/inputmask/InputMask.vue +3 -1
- package/inputmask/inputmask.cjs.js +2 -1
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +2 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +2 -1
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +21 -2
- package/inputnumber/inputnumber.cjs.js +6 -6
- package/inputnumber/inputnumber.esm.js +6 -6
- package/inputnumber/inputnumber.js +6 -6
- package/inputswitch/InputSwitch.d.ts +21 -2
- package/inputswitch/inputswitch.cjs.js +3 -3
- package/inputswitch/inputswitch.esm.js +3 -3
- package/inputswitch/inputswitch.js +3 -3
- package/inputtext/InputText.d.ts +21 -2
- package/knob/Knob.d.ts +21 -2
- package/listbox/Listbox.d.ts +24 -2
- package/listbox/listbox.cjs.js +3 -3
- package/listbox/listbox.esm.js +3 -3
- package/listbox/listbox.js +3 -3
- package/megamenu/MegaMenu.d.ts +58 -2
- package/megamenu/MegaMenu.vue +6 -30
- package/megamenu/MegaMenuSub.vue +34 -3
- package/megamenu/megamenu.cjs.js +36 -39
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +37 -40
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +36 -39
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +60 -2
- package/menu/Menu.vue +6 -1
- package/menu/Menuitem.vue +26 -1
- package/menu/menu.cjs.js +29 -7
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +30 -8
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +29 -7
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +62 -2
- package/menubar/Menubar.vue +6 -0
- package/menubar/MenubarSub.vue +32 -1
- package/menubar/menubar.cjs.js +34 -6
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +35 -7
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +34 -6
- package/menubar/menubar.min.js +1 -1
- package/menuitem/MenuItem.d.ts +1 -0
- package/message/Message.d.ts +21 -2
- package/message/message.cjs.js +3 -3
- package/message/message.esm.js +3 -3
- package/message/message.js +3 -3
- package/multiselect/MultiSelect.d.ts +24 -2
- package/multiselect/multiselect.cjs.js +6 -6
- package/multiselect/multiselect.esm.js +6 -6
- package/multiselect/multiselect.js +6 -6
- package/orderlist/OrderList.d.ts +24 -2
- package/orderlist/OrderList.vue +7 -5
- package/orderlist/orderlist.cjs.js +10 -8
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +10 -8
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +10 -8
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +24 -2
- package/organizationchart/organizationchart.cjs.js +4 -4
- package/organizationchart/organizationchart.esm.js +4 -4
- package/organizationchart/organizationchart.js +4 -4
- package/overlaypanel/OverlayPanel.d.ts +21 -2
- package/overlaypanel/overlaypanel.cjs.js +3 -3
- package/overlaypanel/overlaypanel.esm.js +3 -3
- package/overlaypanel/overlaypanel.js +3 -3
- package/package.json +1 -1
- package/paginator/FirstPageLink.vue +1 -1
- package/paginator/JumpToPageDropdown.vue +1 -0
- package/paginator/LastPageLink.vue +1 -1
- package/paginator/NextPageLink.vue +1 -1
- package/paginator/Paginator.d.ts +24 -2
- package/paginator/PrevPageLink.vue +1 -1
- package/paginator/RowsPerPageDropdown.vue +1 -0
- package/paginator/paginator.cjs.js +19 -9
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +19 -9
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +19 -9
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +21 -2
- package/panel/panel.cjs.js +3 -3
- package/panel/panel.esm.js +3 -3
- package/panel/panel.js +3 -3
- package/panelmenu/PanelMenu.d.ts +58 -2
- package/panelmenu/PanelMenu.vue +6 -0
- package/panelmenu/PanelMenuList.vue +1 -0
- package/panelmenu/PanelMenuSub.vue +33 -1
- package/panelmenu/panelmenu.cjs.js +41 -12
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +42 -13
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +41 -12
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +15 -9
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.d.ts +4 -4
- package/passthrough/index.esm.js +15 -9
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +15 -9
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +3 -3
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +3 -3
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +3 -3
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/Password.d.ts +21 -2
- package/password/password.cjs.js +3 -3
- package/password/password.esm.js +3 -3
- package/password/password.js +3 -3
- package/picklist/PickList.d.ts +24 -2
- package/picklist/PickList.vue +8 -5
- package/picklist/picklist.cjs.js +10 -8
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +10 -8
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +10 -8
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +18 -2
- package/progressspinner/ProgressSpinner.d.ts +18 -2
- package/radiobutton/RadioButton.d.ts +21 -2
- package/radiobutton/radiobutton.cjs.js +3 -3
- package/radiobutton/radiobutton.esm.js +3 -3
- package/radiobutton/radiobutton.js +3 -3
- package/rating/Rating.d.ts +24 -2
- package/ripple/Ripple.d.ts +8 -2
- package/row/Row.d.ts +16 -0
- package/scrollpanel/ScrollPanel.d.ts +21 -2
- package/scrolltop/ScrollTop.d.ts +21 -2
- package/selectbutton/SelectButton.d.ts +24 -2
- package/sidebar/Sidebar.d.ts +21 -2
- package/sidebar/sidebar.cjs.js +3 -3
- package/sidebar/sidebar.esm.js +3 -3
- package/sidebar/sidebar.js +3 -3
- package/skeleton/Skeleton.d.ts +18 -2
- package/slider/Slider.d.ts +18 -2
- package/speeddial/SpeedDial.d.ts +24 -2
- package/speeddial/speeddial.cjs.js +4 -4
- package/speeddial/speeddial.esm.js +4 -4
- package/speeddial/speeddial.js +4 -4
- package/splitbutton/SplitButton.d.ts +35 -2
- package/splitbutton/SplitButton.vue +6 -2
- package/splitbutton/splitbutton.cjs.js +17 -9
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +18 -10
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +17 -9
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +24 -2
- package/splitterpanel/SplitterPanel.d.ts +21 -2
- package/steps/Steps.d.ts +51 -2
- package/steps/Steps.vue +31 -1
- package/steps/steps.cjs.js +31 -3
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +31 -3
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +32 -4
- package/steps/steps.min.js +1 -1
- package/styleclass/StyleClass.d.ts +8 -2
- package/tabmenu/TabMenu.d.ts +50 -2
- package/tabmenu/TabMenu.vue +27 -1
- package/tabmenu/tabmenu.cjs.js +26 -3
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +26 -3
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +27 -4
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +24 -2
- package/tabview/TabView.d.ts +8 -2
- package/tabview/tabview.cjs.js +3 -3
- package/tabview/tabview.esm.js +3 -3
- package/tabview/tabview.js +3 -3
- package/tag/Tag.d.ts +18 -2
- package/terminal/Terminal.d.ts +21 -2
- package/textarea/Textarea.d.ts +21 -2
- package/tieredmenu/TieredMenu.d.ts +58 -2
- package/tieredmenu/TieredMenu.vue +6 -0
- package/tieredmenu/TieredMenuSub.vue +33 -1
- package/tieredmenu/tieredmenu.cjs.js +35 -7
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +36 -8
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +35 -7
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +21 -2
- package/toast/Toast.d.ts +21 -2
- package/toast/toast.cjs.js +7 -7
- package/toast/toast.esm.js +7 -7
- package/toast/toast.js +7 -7
- package/togglebutton/ToggleButton.d.ts +24 -2
- package/togglebutton/ToggleButton.vue +4 -4
- package/togglebutton/togglebutton.cjs.js +7 -7
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +7 -7
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +7 -7
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +18 -2
- package/tooltip/Tooltip.d.ts +12 -2
- package/tooltip/tooltip.cjs.js +2 -2
- package/tooltip/tooltip.esm.js +2 -2
- package/tooltip/tooltip.js +2 -2
- package/tree/Tree.d.ts +24 -2
- package/tree/Tree.vue +1 -1
- package/tree/tree.cjs.js +7 -7
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +7 -7
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +7 -7
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +21 -2
- package/treeselect/treeselect.cjs.js +6 -6
- package/treeselect/treeselect.esm.js +6 -6
- package/treeselect/treeselect.js +6 -6
- package/treetable/BodyCell.vue +1 -1
- package/treetable/TreeTable.d.ts +24 -2
- package/treetable/TreeTableRow.vue +1 -1
- package/treetable/treetable.cjs.js +22 -20
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +22 -20
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +22 -20
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +24 -2
- package/tristatecheckbox/tristatecheckbox.cjs.js +3 -3
- package/tristatecheckbox/tristatecheckbox.esm.js +3 -3
- package/tristatecheckbox/tristatecheckbox.js +3 -3
- package/ts-helpers.d.ts +2 -2
- package/utils/utils.cjs.js +30 -20
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +30 -20
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +30 -20
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +1 -1
- package/virtualscroller/BaseVirtualScroller.vue +3 -3
- package/virtualscroller/VirtualScroller.d.ts +21 -2
- package/virtualscroller/virtualscroller.cjs.js +6 -6
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +6 -6
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +6 -6
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +13 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/icons/chevrondown"),t=require("primevue/icons/chevronleft"),n=require("primevue/icons/chevronright"),i=require("primevue/icons/chevronup"),r=require("primevue/ripple"),o=require("primevue/utils"),a=require("primevue/basecomponent"),s=require("primevue/usestyle"),l=require("vue");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(e),d=c(t),h=c(n),m=c(i),p=c(r),f=c(a),v=s.useStyle("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n",{name:"carousel",manual:!0});function g(e){return S(e)||I(e)||y(e)||b()}function b(){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 y(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function I(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function S(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var _={name:"Carousel",extends:{name:"BaseCarousel",extends:f.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}},css:{classes:{root:function(e){var t=e.instance;return["p-carousel p-component",{"p-carousel-vertical":t.isVertical(),"p-carousel-horizontal":!t.isVertical()}]},header:"p-carousel-header",content:"p-carousel-content",container:"p-carousel-container",previousButton:function(e){return["p-carousel-prev p-link",{"p-disabled":e.instance.backwardIsDisabled}]},previousButtonIcon:"p-carousel-next-icon",itemsContent:"p-carousel-items-content",itemsContainer:"p-carousel-items-container",itemCloned:function(e){var t=e.index,n=e.value,i=e.d_numVisible;return["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*e.totalShiftedItems===n.length+i,"p-carousel-item-start":0===t,"p-carousel-item-end":n.slice(-1*i).length-1===t}]},item:function(e){var t=e.instance,n=e.index;return["p-carousel-item",{"p-carousel-item-active":t.firstIndex()<=n&&t.lastIndex()>=n,"p-carousel-item-start":t.firstIndex()===n,"p-carousel-item-end":t.lastIndex()===n}]},nextButton:function(e){return["p-carousel-next p-link",{"p-disabled":e.instance.forwardIsDisabled}]},nextButtonIcon:"p-carousel-prev-icon",indicators:"p-carousel-indicators p-reset",indicator:function(e){return["p-carousel-indicator",{"p-highlight":e.instance.d_page===e.index}]},indicatorButton:"p-link",footer:"p-carousel-footer"},loadStyle:v.load},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(e){this.d_page=e},circular:function(e){this.d_circular=e},numVisible:function(e,t){this.d_numVisible=e,this.d_oldNumVisible=t},numScroll:function(e,t){this.d_oldNumScroll=t,this.d_numScroll=e},value:function(e){this.d_oldValue=e}},mounted:function(){var e=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var t=this.totalShiftedItems;0===this.d_page?t=-1*this.d_numVisible:0===t&&(t=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),t!==this.totalShiftedItems&&(this.totalShiftedItems=t,e=!0)}!e&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var e=this.isCircular(),t=!1,n=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 i=this.d_page;0!==this.totalIndicators&&i>=this.totalIndicators&&(this.$emit("update:page",i=this.totalIndicators-1),this.d_page=i,t=!0),n=i*this.d_numScroll*-1,e&&(n-=this.d_numVisible),i===this.totalIndicators-1&&this.remainingItems>0?(n+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,n!==this.totalShiftedItems&&(this.totalShiftedItems=n,t=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)")}e&&(0===this.d_page?n=-1*this.d_numVisible:0===n&&(n=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),n!==this.totalShiftedItems&&(this.totalShiftedItems=n,t=!0)),!t&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(e){return{context:{highlighted:e===this.d_page}}},step:function(e,t){var n=this.totalShiftedItems,i=this.isCircular();null!=t?(n=this.d_numScroll*t*-1,i&&(n-=this.d_numVisible),this.isRemainingItemsAdded=!1):(n+=this.d_numScroll*e,this.isRemainingItemsAdded&&(n+=this.remainingItems-this.d_numScroll*e,this.isRemainingItemsAdded=!1),t=Math.abs(Math.floor((i?n+this.d_numVisible:n)/this.d_numScroll)));i&&this.d_page===this.totalIndicators-1&&-1===e?(n=-1*(this.value.length+this.d_numVisible),t=0):i&&0===this.d_page&&1===e?(n=0,t=this.totalIndicators-1):t===this.totalIndicators-1&&this.remainingItems>0&&(n+=-1*this.remainingItems-this.d_numScroll*e,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(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=n,this.$emit("update:page",t),this.d_page=t},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var e=window.innerWidth,t={numVisible:this.numVisible,numScroll:this.numScroll},n=0;n<this.responsiveOptions.length;n++){var i=this.responsiveOptions[n];parseInt(i.breakpoint,10)>=e&&(t=i)}if(this.d_numScroll!==t.numScroll){var r=this.d_page;r=parseInt(r*this.d_numScroll/t.numScroll),this.totalShiftedItems=t.numScroll*r*-1,this.isCircular()&&(this.totalShiftedItems-=t.numVisible),this.d_numScroll=t.numScroll,this.$emit("update:page",r),this.d_page=r}this.d_numVisible!==t.numVisible&&(this.d_numVisible=t.numVisible)}},navBackward:function(e,t){(this.d_circular||0!==this.d_page)&&this.step(1,t),this.allowAutoplay=!1,e.cancelable&&e.preventDefault()},navForward:function(e,t){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,t),this.allowAutoplay=!1,e.cancelable&&e.preventDefault()},onIndicatorClick:function(e,t){var n=this.d_page;t>n?this.navForward(e,t):t<n&&this.navBackward(e,t)},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(e){var t=e.changedTouches[0];this.startPos={x:t.pageX,y:t.pageY}},onTouchMove:function(e){e.cancelable&&e.preventDefault()},onTouchEnd:function(e){var t=e.changedTouches[0];this.isVertical()?this.changePageOnTouch(e,t.pageY-this.startPos.y):this.changePageOnTouch(e,t.pageX-this.startPos.x)},changePageOnTouch:function(e,t){Math.abs(t)>this.swipeThreshold&&(t<0?this.navForward(e):this.navBackward(e))},onIndicatorKeydown:function(e){switch(e.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":e.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var e=g(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t+1===e.length?e.length-1:t+1)},onLeftKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e-1<=0?0:e-1)},onHomeKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,0)},onEndKey:function(){var e=g(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]r')),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,e.length-1)},onTabKey:function(){var e=g(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),t=e.findIndex((function(e){return!0===o.DomHandler.getAttribute(e,"data-p-highlight")})),n=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),i=e.findIndex((function(e){return e===n.parentElement}));e[i].children[0].tabIndex="-1",e[t].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var e=g(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),t=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return e.findIndex((function(e){return e===t.parentElement}))},changedFocusedIndicator:function(e,t){var n=g(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));n[e].children[0].tabIndex="-1",n[t].children[0].tabIndex="0",n[t].children[0].focus()},bindDocumentListeners:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(t){e.calculatePosition(t)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var e=this;this.interval=setInterval((function(){e.step(-1,e.d_page===e.totalIndicators-1?0:e.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var e;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",o.DomHandler.setAttribute(this.carouselStyle,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.body.appendChild(this.carouselStyle));var t="\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 n=g(this.responsiveOptions),i=new Intl.Collator(void 0,{numeric:!0}).compare;n.sort((function(e,t){var n=e.breakpoint,r=t.breakpoint;return-1*(null==n&&null!=r?-1:null!=n&&null==r?1:null==n&&null==r?0:"string"==typeof n&&"string"==typeof r?i(n,r):n<r?-1:n>r?1:0)}));for(var r=0;r<n.length;r++){var a=n[r];t+="\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=t},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(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,e):void 0},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):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:u.default,ChevronLeftIcon:d.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return(t=B(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e){var t=P(e,"string");return"symbol"===C(t)?t:String(t)}function P(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==C(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var $=["aria-live"],A=["disabled","aria-label"],D=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],N=["disabled","aria-label"],O=["data-p-highlight"],L=["tabindex","aria-label","aria-current","onClick"];_.render=function(e,t,n,i,r,o){var a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:e.cx("root"),role:"region"},e.ptm("root")),[e.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[l.renderSlot(e.$slots,"header")],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:[e.cx("content"),e.contentClass]},e.ptm("content")),[l.createElementVNode("div",l.mergeProps({class:[e.cx("container"),e.containerClass],"aria-live":r.allowAutoplay?"polite":"off"},e.ptm("container")),[e.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,type:"button",class:e.cx("previousButton"),disabled:o.backwardIsDisabled,"aria-label":o.ariaPrevButtonLabel,onClick:t[0]||(t[0]=function(){return o.navBackward&&o.navBackward.apply(o,arguments)})},V(V({},e.prevButtonProps),e.ptm("previousButton"))),[l.renderSlot(e.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:e.cx("previousButtonIcon")},e.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,A)),[[a]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:e.cx("itemsContent"),style:[{height:o.isVertical()?e.verticalViewPortHeight:"auto"}],onTouchend:t[2]||(t[2]=function(){return o.onTouchEnd&&o.onTouchEnd.apply(o,arguments)}),onTouchstart:t[3]||(t[3]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onTouchmove:t[4]||(t[4]=function(){return o.onTouchMove&&o.onTouchMove.apply(o,arguments)})},e.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:e.cx("itemsContainer"),onTransitionend:t[1]||(t[1]=function(){return o.onTransitionEnd&&o.onTransitionEnd.apply(o,arguments)})},e.ptm("itemsContainer")),[o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(e.value.slice(-1*r.d_numVisible),(function(t,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_scloned",class:e.cx("itemCloned",{index:n,value:e.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},e.ptm("itemCloned"),{"data-p-carousel-item-active":-1*r.totalShiftedItems===e.value.length+r.d_numVisible,"data-p-carousel-item-start":0===n,"data-p-carousel-item-end":e.value.slice(-1*r.d_numVisible).length-1===n}),[l.renderSlot(e.$slots,"item",{data:t,index:n})],16,D)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.value,(function(t,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n,class:e.cx("item",{index:n}),role:"group","aria-hidden":o.firstIndex()>n||o.lastIndex()<n||void 0,"aria-label":o.ariaSlideNumber(n),"aria-roledescription":o.ariaSlideLabel},e.ptm("item"),{"data-p-carousel-item-active":o.firstIndex()<=n&&o.lastIndex()>=n,"data-p-carousel-item-start":o.firstIndex()===n,"data-p-carousel-item-end":o.lastIndex()===n}),[l.renderSlot(e.$slots,"item",{data:t,index:n})],16,E)})),128)),o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(e.value.slice(0,r.d_numVisible),(function(t,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_fcloned",class:e.cx("itemCloned",{index:n,value:e.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},e.ptm("itemCloned")),[l.renderSlot(e.$slots,"item",{data:t,index:n})],16)})),128)):l.createCommentVNode("",!0)],16)],16),e.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,type:"button",class:e.cx("nextButton"),disabled:o.forwardIsDisabled,"aria-label":o.ariaNextButtonLabel,onClick:t[5]||(t[5]=function(){return o.navForward&&o.navForward.apply(o,arguments)})},V(V({},e.nextButtonProps),e.ptm("nextButton"))),[l.renderSlot(e.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:e.cx("nextButtonIcon")},e.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,N)),[[a]]):l.createCommentVNode("",!0)],16,$),o.totalIndicators>=0&&e.showIndicators?(l.openBlock(),l.createElementBlock("ul",l.mergeProps({key:0,ref:"indicatorContent",class:[e.cx("indicators"),e.indicatorsContentClass],onKeydown:t[6]||(t[6]=function(){return o.onIndicatorKeydown&&o.onIndicatorKeydown.apply(o,arguments)})},e.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.totalIndicators,(function(t,n){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+n.toString(),class:e.cx("indicator",{index:n})},e.ptm("indicator",o.getIndicatorPTOptions(n)),{"data-p-highlight":r.d_page===n}),[l.createElementVNode("button",l.mergeProps({class:e.cx("indicatorButton"),type:"button",tabindex:r.d_page===n?"0":"-1","aria-label":o.ariaPageLabel(n+1),"aria-current":r.d_page===n?"page":void 0,onClick:function(e){return o.onIndicatorClick(e,n)}},e.ptm("indicatorButton",o.getIndicatorPTOptions(n))),null,16,L)],16,O)})),128))],16)):l.createCommentVNode("",!0)],16),e.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:e.cx("footer")},e.ptm("footer")),[l.renderSlot(e.$slots,"footer")],16)):l.createCommentVNode("",!0)],16)},module.exports=_;
|
|
1
|
+
"use strict";var e=require("primevue/icons/chevrondown"),t=require("primevue/icons/chevronleft"),n=require("primevue/icons/chevronright"),i=require("primevue/icons/chevronup"),r=require("primevue/ripple"),o=require("primevue/utils"),a=require("primevue/basecomponent"),s=require("primevue/usestyle"),l=require("vue");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(e),d=c(t),h=c(n),m=c(i),p=c(r),f=c(a),v=s.useStyle("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n",{name:"carousel",manual:!0});function g(e){return S(e)||I(e)||y(e)||b()}function b(){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 y(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function I(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function S(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var _={name:"Carousel",extends:{name:"BaseCarousel",extends:f.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}},css:{classes:{root:function(e){var t=e.instance;return["p-carousel p-component",{"p-carousel-vertical":t.isVertical(),"p-carousel-horizontal":!t.isVertical()}]},header:"p-carousel-header",content:"p-carousel-content",container:"p-carousel-container",previousButton:function(e){return["p-carousel-prev p-link",{"p-disabled":e.instance.backwardIsDisabled}]},previousButtonIcon:"p-carousel-next-icon",itemsContent:"p-carousel-items-content",itemsContainer:"p-carousel-items-container",itemCloned:function(e){var t=e.index,n=e.value,i=e.d_numVisible;return["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*e.totalShiftedItems===n.length+i,"p-carousel-item-start":0===t,"p-carousel-item-end":n.slice(-1*i).length-1===t}]},item:function(e){var t=e.instance,n=e.index;return["p-carousel-item",{"p-carousel-item-active":t.firstIndex()<=n&&t.lastIndex()>=n,"p-carousel-item-start":t.firstIndex()===n,"p-carousel-item-end":t.lastIndex()===n}]},nextButton:function(e){return["p-carousel-next p-link",{"p-disabled":e.instance.forwardIsDisabled}]},nextButtonIcon:"p-carousel-prev-icon",indicators:"p-carousel-indicators p-reset",indicator:function(e){return["p-carousel-indicator",{"p-highlight":e.instance.d_page===e.index}]},indicatorButton:"p-link",footer:"p-carousel-footer"},loadStyle:v.load},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(e){this.d_page=e},circular:function(e){this.d_circular=e},numVisible:function(e,t){this.d_numVisible=e,this.d_oldNumVisible=t},numScroll:function(e,t){this.d_oldNumScroll=t,this.d_numScroll=e},value:function(e){this.d_oldValue=e}},mounted:function(){var e=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var t=this.totalShiftedItems;0===this.d_page?t=-1*this.d_numVisible:0===t&&(t=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),t!==this.totalShiftedItems&&(this.totalShiftedItems=t,e=!0)}!e&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var e=this.isCircular(),t=!1,n=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 i=this.d_page;0!==this.totalIndicators&&i>=this.totalIndicators&&(this.$emit("update:page",i=this.totalIndicators-1),this.d_page=i,t=!0),n=i*this.d_numScroll*-1,e&&(n-=this.d_numVisible),i===this.totalIndicators-1&&this.remainingItems>0?(n+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,n!==this.totalShiftedItems&&(this.totalShiftedItems=n,t=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)")}e&&(0===this.d_page?n=-1*this.d_numVisible:0===n&&(n=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),n!==this.totalShiftedItems&&(this.totalShiftedItems=n,t=!0)),!t&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(e){return{context:{highlighted:e===this.d_page}}},step:function(e,t){var n=this.totalShiftedItems,i=this.isCircular();null!=t?(n=this.d_numScroll*t*-1,i&&(n-=this.d_numVisible),this.isRemainingItemsAdded=!1):(n+=this.d_numScroll*e,this.isRemainingItemsAdded&&(n+=this.remainingItems-this.d_numScroll*e,this.isRemainingItemsAdded=!1),t=Math.abs(Math.floor((i?n+this.d_numVisible:n)/this.d_numScroll)));i&&this.d_page===this.totalIndicators-1&&-1===e?(n=-1*(this.value.length+this.d_numVisible),t=0):i&&0===this.d_page&&1===e?(n=0,t=this.totalIndicators-1):t===this.totalIndicators-1&&this.remainingItems>0&&(n+=-1*this.remainingItems-this.d_numScroll*e,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(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=n,this.$emit("update:page",t),this.d_page=t},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var e=window.innerWidth,t={numVisible:this.numVisible,numScroll:this.numScroll},n=0;n<this.responsiveOptions.length;n++){var i=this.responsiveOptions[n];parseInt(i.breakpoint,10)>=e&&(t=i)}if(this.d_numScroll!==t.numScroll){var r=this.d_page;r=parseInt(r*this.d_numScroll/t.numScroll),this.totalShiftedItems=t.numScroll*r*-1,this.isCircular()&&(this.totalShiftedItems-=t.numVisible),this.d_numScroll=t.numScroll,this.$emit("update:page",r),this.d_page=r}this.d_numVisible!==t.numVisible&&(this.d_numVisible=t.numVisible)}},navBackward:function(e,t){(this.d_circular||0!==this.d_page)&&this.step(1,t),this.allowAutoplay=!1,e.cancelable&&e.preventDefault()},navForward:function(e,t){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,t),this.allowAutoplay=!1,e.cancelable&&e.preventDefault()},onIndicatorClick:function(e,t){var n=this.d_page;t>n?this.navForward(e,t):t<n&&this.navBackward(e,t)},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(e){var t=e.changedTouches[0];this.startPos={x:t.pageX,y:t.pageY}},onTouchMove:function(e){e.cancelable&&e.preventDefault()},onTouchEnd:function(e){var t=e.changedTouches[0];this.isVertical()?this.changePageOnTouch(e,t.pageY-this.startPos.y):this.changePageOnTouch(e,t.pageX-this.startPos.x)},changePageOnTouch:function(e,t){Math.abs(t)>this.swipeThreshold&&(t<0?this.navForward(e):this.navBackward(e))},onIndicatorKeydown:function(e){switch(e.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),e.preventDefault();break;case"End":this.onEndKey(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":e.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var e=g(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t+1===e.length?e.length-1:t+1)},onLeftKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e-1<=0?0:e-1)},onHomeKey:function(){var e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,0)},onEndKey:function(){var e=g(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]r')),t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,e.length-1)},onTabKey:function(){var e=g(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),t=e.findIndex((function(e){return!0===o.DomHandler.getAttribute(e,"data-p-highlight")})),n=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),i=e.findIndex((function(e){return e===n.parentElement}));e[i].children[0].tabIndex="-1",e[t].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var e=g(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),t=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return e.findIndex((function(e){return e===t.parentElement}))},changedFocusedIndicator:function(e,t){var n=g(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));n[e].children[0].tabIndex="-1",n[t].children[0].tabIndex="0",n[t].children[0].focus()},bindDocumentListeners:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(t){e.calculatePosition(t)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var e=this;this.interval=setInterval((function(){e.step(-1,e.d_page===e.totalIndicators-1?0:e.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var e;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",o.DomHandler.setAttribute(this.carouselStyle,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.body.appendChild(this.carouselStyle));var t="\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 n=g(this.responsiveOptions),i=new Intl.Collator(void 0,{numeric:!0}).compare;n.sort((function(e,t){var n=e.breakpoint,r=t.breakpoint;return-1*(null==n&&null!=r?-1:null!=n&&null==r?1:null==n&&null==r?0:"string"==typeof n&&"string"==typeof r?i(n,r):n<r?-1:n>r?1:0)}));for(var r=0;r<n.length;r++){var a=n[r];t+="\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=t},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(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,e):void 0},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):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:u.default,ChevronLeftIcon:d.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return(t=B(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e){var t=P(e,"string");return"symbol"===C(t)?t:String(t)}function P(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==C(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var $=["aria-live"],A=["disabled","aria-label"],D=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],N=["disabled","aria-label"],O=["data-p-highlight"],L=["tabindex","aria-label","aria-current","onClick"];_.render=function(e,t,n,i,r,o){var a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:e.cx("root"),role:"region"},e.ptm("root")),[e.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[l.renderSlot(e.$slots,"header")],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:[e.cx("content"),e.contentClass]},e.ptm("content")),[l.createElementVNode("div",l.mergeProps({class:[e.cx("container"),e.containerClass],"aria-live":r.allowAutoplay?"polite":"off"},e.ptm("container")),[e.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,type:"button",class:e.cx("previousButton"),disabled:o.backwardIsDisabled,"aria-label":o.ariaPrevButtonLabel,onClick:t[0]||(t[0]=function(){return o.navBackward&&o.navBackward.apply(o,arguments)})},V(V({},e.prevButtonProps),e.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(e.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:e.cx("previousButtonIcon")},e.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,A)),[[a]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:e.cx("itemsContent"),style:[{height:o.isVertical()?e.verticalViewPortHeight:"auto"}],onTouchend:t[2]||(t[2]=function(){return o.onTouchEnd&&o.onTouchEnd.apply(o,arguments)}),onTouchstart:t[3]||(t[3]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onTouchmove:t[4]||(t[4]=function(){return o.onTouchMove&&o.onTouchMove.apply(o,arguments)})},e.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:e.cx("itemsContainer"),onTransitionend:t[1]||(t[1]=function(){return o.onTransitionEnd&&o.onTransitionEnd.apply(o,arguments)})},e.ptm("itemsContainer")),[o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(e.value.slice(-1*r.d_numVisible),(function(t,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_scloned",class:e.cx("itemCloned",{index:n,value:e.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},e.ptm("itemCloned"),{"data-p-carousel-item-active":-1*r.totalShiftedItems===e.value.length+r.d_numVisible,"data-p-carousel-item-start":0===n,"data-p-carousel-item-end":e.value.slice(-1*r.d_numVisible).length-1===n}),[l.renderSlot(e.$slots,"item",{data:t,index:n})],16,D)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.value,(function(t,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n,class:e.cx("item",{index:n}),role:"group","aria-hidden":o.firstIndex()>n||o.lastIndex()<n||void 0,"aria-label":o.ariaSlideNumber(n),"aria-roledescription":o.ariaSlideLabel},e.ptm("item"),{"data-p-carousel-item-active":o.firstIndex()<=n&&o.lastIndex()>=n,"data-p-carousel-item-start":o.firstIndex()===n,"data-p-carousel-item-end":o.lastIndex()===n}),[l.renderSlot(e.$slots,"item",{data:t,index:n})],16,E)})),128)),o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(e.value.slice(0,r.d_numVisible),(function(t,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_fcloned",class:e.cx("itemCloned",{index:n,value:e.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},e.ptm("itemCloned")),[l.renderSlot(e.$slots,"item",{data:t,index:n})],16)})),128)):l.createCommentVNode("",!0)],16)],16),e.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,type:"button",class:e.cx("nextButton"),disabled:o.forwardIsDisabled,"aria-label":o.ariaNextButtonLabel,onClick:t[5]||(t[5]=function(){return o.navForward&&o.navForward.apply(o,arguments)})},V(V({},e.nextButtonProps),e.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(e.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:e.cx("nextButtonIcon")},e.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,N)),[[a]]):l.createCommentVNode("",!0)],16,$),o.totalIndicators>=0&&e.showIndicators?(l.openBlock(),l.createElementBlock("ul",l.mergeProps({key:0,ref:"indicatorContent",class:[e.cx("indicators"),e.indicatorsContentClass],onKeydown:t[6]||(t[6]=function(){return o.onIndicatorKeydown&&o.onIndicatorKeydown.apply(o,arguments)})},e.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.totalIndicators,(function(t,n){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+n.toString(),class:e.cx("indicator",{index:n})},e.ptm("indicator",o.getIndicatorPTOptions(n)),{"data-p-highlight":r.d_page===n}),[l.createElementVNode("button",l.mergeProps({class:e.cx("indicatorButton"),type:"button",tabindex:r.d_page===n?"0":"-1","aria-label":o.ariaPageLabel(n+1),"aria-current":r.d_page===n?"page":void 0,onClick:function(e){return o.onIndicatorClick(e,n)}},e.ptm("indicatorButton",o.getIndicatorPTOptions(n))),null,16,L)],16,O)})),128))],16)):l.createCommentVNode("",!0)],16),e.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:e.cx("footer")},e.ptm("footer")),[l.renderSlot(e.$slots,"footer")],16)):l.createCommentVNode("",!0)],16)},module.exports=_;
|
package/carousel/carousel.esm.js
CHANGED
|
@@ -592,9 +592,9 @@ var script = {
|
|
|
592
592
|
}
|
|
593
593
|
};
|
|
594
594
|
|
|
595
|
-
function _typeof(
|
|
596
|
-
function ownKeys(
|
|
597
|
-
function _objectSpread(
|
|
595
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
596
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
597
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
598
598
|
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; }
|
|
599
599
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
600
600
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -627,7 +627,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
627
627
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
628
628
|
return $options.navBackward && $options.navBackward.apply($options, arguments);
|
|
629
629
|
})
|
|
630
|
-
}, _objectSpread(_objectSpread({}, _ctx.prevButtonProps), _ctx.ptm('previousButton'))
|
|
630
|
+
}, _objectSpread(_objectSpread({}, _ctx.prevButtonProps), _ctx.ptm('previousButton')), {
|
|
631
|
+
"data-pc-group-section": "navigator"
|
|
632
|
+
}), [renderSlot(_ctx.$slots, "previousicon", {}, function () {
|
|
631
633
|
return [(openBlock(), createBlock(resolveDynamicComponent($options.isVertical() ? 'ChevronUpIcon' : 'ChevronLeftIcon'), mergeProps({
|
|
632
634
|
"class": _ctx.cx('previousButtonIcon')
|
|
633
635
|
}, _ctx.ptm('previousButtonIcon')), null, 16, ["class"]))];
|
|
@@ -712,7 +714,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
712
714
|
onClick: _cache[5] || (_cache[5] = function () {
|
|
713
715
|
return $options.navForward && $options.navForward.apply($options, arguments);
|
|
714
716
|
})
|
|
715
|
-
}, _objectSpread(_objectSpread({}, _ctx.nextButtonProps), _ctx.ptm('nextButton'))
|
|
717
|
+
}, _objectSpread(_objectSpread({}, _ctx.nextButtonProps), _ctx.ptm('nextButton')), {
|
|
718
|
+
"data-pc-group-section": "navigator"
|
|
719
|
+
}), [renderSlot(_ctx.$slots, "nexticon", {}, function () {
|
|
716
720
|
return [(openBlock(), createBlock(resolveDynamicComponent($options.isVertical() ? 'ChevronDownIcon' : 'ChevronRightIcon'), mergeProps({
|
|
717
721
|
"class": _ctx.cx('nextButtonIcon')
|
|
718
722
|
}, _ctx.ptm('nextButtonIcon')), null, 16, ["class"]))];
|
|
@@ -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 o,UniqueComponentId as r}from"primevue/utils";import s from"primevue/basecomponent";import{useStyle as l}from"primevue/usestyle";import{resolveDirective as c,openBlock as u,createElementBlock as d,mergeProps as h,renderSlot as p,createCommentVNode as m,createElementVNode as f,withDirectives as v,createBlock as b,resolveDynamicComponent as g,Fragment as y,renderList as I}from"vue";var x=l("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n",{name:"carousel",manual:!0});function S(t){return V(t)||C(t)||w(t)||_()}function _(){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 k={name:"Carousel",extends:{name:"BaseCarousel",extends:s,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}},css:{classes:{root:function(t){var e=t.instance;return["p-carousel p-component",{"p-carousel-vertical":e.isVertical(),"p-carousel-horizontal":!e.isVertical()}]},header:"p-carousel-header",content:"p-carousel-content",container:"p-carousel-container",previousButton:function(t){return["p-carousel-prev p-link",{"p-disabled":t.instance.backwardIsDisabled}]},previousButtonIcon:"p-carousel-next-icon",itemsContent:"p-carousel-items-content",itemsContainer:"p-carousel-items-container",itemCloned:function(t){var e=t.index,i=t.value,n=t.d_numVisible;return["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*t.totalShiftedItems===i.length+n,"p-carousel-item-start":0===e,"p-carousel-item-end":i.slice(-1*n).length-1===e}]},item:function(t){var e=t.instance,i=t.index;return["p-carousel-item",{"p-carousel-item-active":e.firstIndex()<=i&&e.lastIndex()>=i,"p-carousel-item-start":e.firstIndex()===i,"p-carousel-item-end":e.lastIndex()===i}]},nextButton:function(t){return["p-carousel-next p-link",{"p-disabled":t.instance.forwardIsDisabled}]},nextButtonIcon:"p-carousel-prev-icon",indicators:"p-carousel-indicators p-reset",indicator:function(t){return["p-carousel-indicator",{"p-highlight":t.instance.d_page===t.index}]},indicatorButton:"p-link",footer:"p-carousel-footer"},loadStyle:x.load},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){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.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&&o.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":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=S(o.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(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]r')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===o.getAttribute(t,"data-p-highlight")})),i=o.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(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=o.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(o.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.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=new Intl.Collator(void 0,{numeric:!0}).compare;i.sort((function(t,e){var i=t.breakpoint,a=e.breakpoint;return-1*(null==i&&null!=a?-1:null!=i&&null==a?1:null==i&&null==a?0:"string"==typeof i&&"string"==typeof a?n(i,a):i<a?-1:i>a?1:0)}));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 A(t){return A="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},A(t)}function P(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?P(Object(i),!0).forEach((function(e){B(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function B(t,e,i){return(e=T(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function T(t){var e=L(t,"string");return"symbol"===A(e)?e:String(e)}function L(t,e){if("object"!==A(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==A(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var D=["aria-live"],N=["disabled","aria-label"],j=["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"],F=["data-p-highlight"],K=["tabindex","aria-label","aria-current","onClick"];k.render=function(t,e,i,n,a,o){var r=c("ripple");return u(),d("div",h({class:t.cx("root"),role:"region"},t.ptm("root")),[t.$slots.header?(u(),d("div",h({key:0,class:t.cx("header")},t.ptm("header")),[p(t.$slots,"header")],16)):m("",!0),f("div",h({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[f("div",h({class:[t.cx("container"),t.containerClass],"aria-live":a.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?v((u(),d("button",h({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)})},O(O({},t.prevButtonProps),t.ptm("previousButton"))),[p(t.$slots,"previousicon",{},(function(){return[(u(),b(g(o.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),h({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,N)),[[r]]):m("",!0),f("div",h({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")),[f("div",h({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()?(u(!0),d(y,{key:0},I(t.value.slice(-1*a.d_numVisible),(function(e,i){return u(),d("div",h({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,j)})),128)):m("",!0),(u(!0),d(y,null,I(t.value,(function(e,i){return u(),d("div",h({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}),[p(t.$slots,"item",{data:e,index:i})],16,R)})),128)),o.isCircular()?(u(!0),d(y,{key:1},I(t.value.slice(0,a.d_numVisible),(function(e,i){return u(),d("div",h({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)):m("",!0)],16)],16),t.showNavigators?v((u(),d("button",h({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)})},O(O({},t.nextButtonProps),t.ptm("nextButton"))),[p(t.$slots,"nexticon",{},(function(){return[(u(),b(g(o.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),h({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,E)),[[r]]):m("",!0)],16,D),o.totalIndicators>=0&&t.showIndicators?(u(),d("ul",h({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")),[(u(!0),d(y,null,I(o.totalIndicators,(function(e,i){return u(),d("li",h({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",o.getIndicatorPTOptions(i)),{"data-p-highlight":a.d_page===i}),[f("button",h({class:t.cx("indicatorButton"),type:"button",tabindex:a.d_page===i?"0":"-1","aria-label":o.ariaPageLabel(i+1),"aria-current":a.d_page===i?"page":void 0,onClick:function(t){return o.onIndicatorClick(t,i)}},t.ptm("indicatorButton",o.getIndicatorPTOptions(i))),null,16,K)],16,F)})),128))],16)):m("",!0)],16),t.$slots.footer?(u(),d("div",h({key:1,class:t.cx("footer")},t.ptm("footer")),[p(t.$slots,"footer")],16)):m("",!0)],16)};export{k 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 o,UniqueComponentId as r}from"primevue/utils";import s from"primevue/basecomponent";import{useStyle as l}from"primevue/usestyle";import{resolveDirective as c,openBlock as u,createElementBlock as d,mergeProps as h,renderSlot as p,createCommentVNode as m,createElementVNode as f,withDirectives as v,createBlock as b,resolveDynamicComponent as g,Fragment as y,renderList as I}from"vue";var x=l("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n",{name:"carousel",manual:!0});function S(t){return V(t)||C(t)||w(t)||_()}function _(){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 k={name:"Carousel",extends:{name:"BaseCarousel",extends:s,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}},css:{classes:{root:function(t){var e=t.instance;return["p-carousel p-component",{"p-carousel-vertical":e.isVertical(),"p-carousel-horizontal":!e.isVertical()}]},header:"p-carousel-header",content:"p-carousel-content",container:"p-carousel-container",previousButton:function(t){return["p-carousel-prev p-link",{"p-disabled":t.instance.backwardIsDisabled}]},previousButtonIcon:"p-carousel-next-icon",itemsContent:"p-carousel-items-content",itemsContainer:"p-carousel-items-container",itemCloned:function(t){var e=t.index,i=t.value,n=t.d_numVisible;return["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*t.totalShiftedItems===i.length+n,"p-carousel-item-start":0===e,"p-carousel-item-end":i.slice(-1*n).length-1===e}]},item:function(t){var e=t.instance,i=t.index;return["p-carousel-item",{"p-carousel-item-active":e.firstIndex()<=i&&e.lastIndex()>=i,"p-carousel-item-start":e.firstIndex()===i,"p-carousel-item-end":e.lastIndex()===i}]},nextButton:function(t){return["p-carousel-next p-link",{"p-disabled":t.instance.forwardIsDisabled}]},nextButtonIcon:"p-carousel-prev-icon",indicators:"p-carousel-indicators p-reset",indicator:function(t){return["p-carousel-indicator",{"p-highlight":t.instance.d_page===t.index}]},indicatorButton:"p-link",footer:"p-carousel-footer"},loadStyle:x.load},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){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.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&&o.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":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=S(o.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(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]r')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=S(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===o.getAttribute(t,"data-p-highlight")})),i=o.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(o.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=o.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(o.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.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=new Intl.Collator(void 0,{numeric:!0}).compare;i.sort((function(t,e){var i=t.breakpoint,a=e.breakpoint;return-1*(null==i&&null!=a?-1:null!=i&&null==a?1:null==i&&null==a?0:"string"==typeof i&&"string"==typeof a?n(i,a):i<a?-1:i>a?1:0)}));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 A(t){return A="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},A(t)}function P(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?P(Object(i),!0).forEach((function(e){B(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function B(t,e,i){return(e=T(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function T(t){var e=L(t,"string");return"symbol"===A(e)?e:String(e)}function L(t,e){if("object"!==A(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==A(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var D=["aria-live"],N=["disabled","aria-label"],j=["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"],F=["data-p-highlight"],K=["tabindex","aria-label","aria-current","onClick"];k.render=function(t,e,i,n,a,o){var r=c("ripple");return u(),d("div",h({class:t.cx("root"),role:"region"},t.ptm("root")),[t.$slots.header?(u(),d("div",h({key:0,class:t.cx("header")},t.ptm("header")),[p(t.$slots,"header")],16)):m("",!0),f("div",h({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[f("div",h({class:[t.cx("container"),t.containerClass],"aria-live":a.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?v((u(),d("button",h({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)})},O(O({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[p(t.$slots,"previousicon",{},(function(){return[(u(),b(g(o.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),h({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,N)),[[r]]):m("",!0),f("div",h({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")),[f("div",h({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()?(u(!0),d(y,{key:0},I(t.value.slice(-1*a.d_numVisible),(function(e,i){return u(),d("div",h({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,j)})),128)):m("",!0),(u(!0),d(y,null,I(t.value,(function(e,i){return u(),d("div",h({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}),[p(t.$slots,"item",{data:e,index:i})],16,R)})),128)),o.isCircular()?(u(!0),d(y,{key:1},I(t.value.slice(0,a.d_numVisible),(function(e,i){return u(),d("div",h({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)):m("",!0)],16)],16),t.showNavigators?v((u(),d("button",h({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)})},O(O({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[p(t.$slots,"nexticon",{},(function(){return[(u(),b(g(o.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),h({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,E)),[[r]]):m("",!0)],16,D),o.totalIndicators>=0&&t.showIndicators?(u(),d("ul",h({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")),[(u(!0),d(y,null,I(o.totalIndicators,(function(e,i){return u(),d("li",h({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",o.getIndicatorPTOptions(i)),{"data-p-highlight":a.d_page===i}),[f("button",h({class:t.cx("indicatorButton"),type:"button",tabindex:a.d_page===i?"0":"-1","aria-label":o.ariaPageLabel(i+1),"aria-current":a.d_page===i?"page":void 0,onClick:function(t){return o.onIndicatorClick(t,i)}},t.ptm("indicatorButton",o.getIndicatorPTOptions(i))),null,16,K)],16,F)})),128))],16)):m("",!0)],16),t.$slots.footer?(u(),d("div",h({key:1,class:t.cx("footer")},t.ptm("footer")),[p(t.$slots,"footer")],16)):m("",!0)],16)};export{k as default};
|
package/carousel/carousel.js
CHANGED
|
@@ -595,9 +595,9 @@ this.primevue.carousel = (function (ChevronDownIcon, ChevronLeftIcon, ChevronRig
|
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
597
|
|
|
598
|
-
function _typeof(
|
|
599
|
-
function ownKeys(
|
|
600
|
-
function _objectSpread(
|
|
598
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
599
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
600
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
601
601
|
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; }
|
|
602
602
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
603
603
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -630,7 +630,9 @@ this.primevue.carousel = (function (ChevronDownIcon, ChevronLeftIcon, ChevronRig
|
|
|
630
630
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
631
631
|
return $options.navBackward && $options.navBackward.apply($options, arguments);
|
|
632
632
|
})
|
|
633
|
-
}, _objectSpread(_objectSpread({}, _ctx.prevButtonProps), _ctx.ptm('previousButton'))
|
|
633
|
+
}, _objectSpread(_objectSpread({}, _ctx.prevButtonProps), _ctx.ptm('previousButton')), {
|
|
634
|
+
"data-pc-group-section": "navigator"
|
|
635
|
+
}), [vue.renderSlot(_ctx.$slots, "previousicon", {}, function () {
|
|
634
636
|
return [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($options.isVertical() ? 'ChevronUpIcon' : 'ChevronLeftIcon'), vue.mergeProps({
|
|
635
637
|
"class": _ctx.cx('previousButtonIcon')
|
|
636
638
|
}, _ctx.ptm('previousButtonIcon')), null, 16, ["class"]))];
|
|
@@ -715,7 +717,9 @@ this.primevue.carousel = (function (ChevronDownIcon, ChevronLeftIcon, ChevronRig
|
|
|
715
717
|
onClick: _cache[5] || (_cache[5] = function () {
|
|
716
718
|
return $options.navForward && $options.navForward.apply($options, arguments);
|
|
717
719
|
})
|
|
718
|
-
}, _objectSpread(_objectSpread({}, _ctx.nextButtonProps), _ctx.ptm('nextButton'))
|
|
720
|
+
}, _objectSpread(_objectSpread({}, _ctx.nextButtonProps), _ctx.ptm('nextButton')), {
|
|
721
|
+
"data-pc-group-section": "navigator"
|
|
722
|
+
}), [vue.renderSlot(_ctx.$slots, "nexticon", {}, function () {
|
|
719
723
|
return [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($options.isVertical() ? 'ChevronDownIcon' : 'ChevronRightIcon'), vue.mergeProps({
|
|
720
724
|
"class": _ctx.cx('nextButtonIcon')
|
|
721
725
|
}, _ctx.ptm('nextButtonIcon')), null, 16, ["class"]))];
|
package/carousel/carousel.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.carousel=function(t,e,n,i,o,r,a,s,l){"use strict";function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=c(t),d=c(e),h=c(n),m=c(i),p=c(o),f=c(a),v=s.useStyle("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n",{name:"carousel",manual:!0});function g(t){return S(t)||I(t)||y(t)||b()}function b(){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 y(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}function I(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function S(t){if(Array.isArray(t))return x(t)}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var _={name:"Carousel",extends:{name:"BaseCarousel",extends:f.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}},css:{classes:{root:function(t){var e=t.instance;return["p-carousel p-component",{"p-carousel-vertical":e.isVertical(),"p-carousel-horizontal":!e.isVertical()}]},header:"p-carousel-header",content:"p-carousel-content",container:"p-carousel-container",previousButton:function(t){return["p-carousel-prev p-link",{"p-disabled":t.instance.backwardIsDisabled}]},previousButtonIcon:"p-carousel-next-icon",itemsContent:"p-carousel-items-content",itemsContainer:"p-carousel-items-container",itemCloned:function(t){var e=t.index,n=t.value,i=t.d_numVisible;return["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*t.totalShiftedItems===n.length+i,"p-carousel-item-start":0===e,"p-carousel-item-end":n.slice(-1*i).length-1===e}]},item:function(t){var e=t.instance,n=t.index;return["p-carousel-item",{"p-carousel-item-active":e.firstIndex()<=n&&e.lastIndex()>=n,"p-carousel-item-start":e.firstIndex()===n,"p-carousel-item-end":e.lastIndex()===n}]},nextButton:function(t){return["p-carousel-next p-link",{"p-disabled":t.instance.forwardIsDisabled}]},nextButtonIcon:"p-carousel-prev-icon",indicators:"p-carousel-indicators p-reset",indicator:function(t){return["p-carousel-indicator",{"p-highlight":t.instance.d_page===t.index}]},indicatorButton:"p-link",footer:"p-carousel-footer"},loadStyle:v.load},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){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,n=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 i=this.d_page;0!==this.totalIndicators&&i>=this.totalIndicators&&(this.$emit("update:page",i=this.totalIndicators-1),this.d_page=i,e=!0),n=i*this.d_numScroll*-1,t&&(n-=this.d_numVisible),i===this.totalIndicators-1&&this.remainingItems>0?(n+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,n!==this.totalShiftedItems&&(this.totalShiftedItems=n,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(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)")}t&&(0===this.d_page?n=-1*this.d_numVisible:0===n&&(n=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),n!==this.totalShiftedItems&&(this.totalShiftedItems=n,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 n=this.totalShiftedItems,i=this.isCircular();null!=e?(n=this.d_numScroll*e*-1,i&&(n-=this.d_numVisible),this.isRemainingItemsAdded=!1):(n+=this.d_numScroll*t,this.isRemainingItemsAdded&&(n+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((i?n+this.d_numVisible:n)/this.d_numScroll)));i&&this.d_page===this.totalIndicators-1&&-1===t?(n=-1*(this.value.length+this.d_numVisible),e=0):i&&0===this.d_page&&1===t?(n=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(n+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&r.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=n,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},n=0;n<this.responsiveOptions.length;n++){var i=this.responsiveOptions[n];parseInt(i.breakpoint,10)>=t&&(e=i)}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 n=this.d_page;e>n?this.navForward(t,e):e<n&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&r.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":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=g(r.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=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]r')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===r.DomHandler.getAttribute(t,"data-p-highlight")})),n=r.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),i=t.findIndex((function(t){return t===n.parentElement}));t[i].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=r.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 n=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));n[t].children[0].tabIndex="-1",n[e].children[0].tabIndex="0",n[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",r.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 n=g(this.responsiveOptions),i=new Intl.Collator(void 0,{numeric:!0}).compare;n.sort((function(t,e){var n=t.breakpoint,o=e.breakpoint;return-1*(null==n&&null!=o?-1:null!=n&&null==o?1:null==n&&null==o?0:"string"==typeof n&&"string"==typeof o?i(n,o):n<o?-1:n>o?1:0)}));for(var o=0;o<n.length;o++){var a=n[o];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 r.UniqueComponentId()}},components:{ChevronRightIcon:h.default,ChevronDownIcon:u.default,ChevronLeftIcon:d.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function C(t){return C="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},C(t)}function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function k(t,e,n){return(e=B(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(t){var e=P(t,"string");return"symbol"===C(e)?e:String(e)}function P(t,e){if("object"!==C(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==C(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var $=["aria-live"],A=["disabled","aria-label"],D=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],N=["disabled","aria-label"],O=["data-p-highlight"],L=["tabindex","aria-label","aria-current","onClick"];return _.render=function(t,e,n,i,o,r){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":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:r.backwardIsDisabled,"aria-label":r.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return r.navBackward&&r.navBackward.apply(r,arguments)})},w(w({},t.prevButtonProps),t.ptm("previousButton"))),[l.renderSlot(t.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,A)),[[a]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:t.cx("itemsContent"),style:[{height:r.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return r.onTouchEnd&&r.onTouchEnd.apply(r,arguments)}),onTouchstart:e[3]||(e[3]=function(){return r.onTouchStart&&r.onTouchStart.apply(r,arguments)}),onTouchmove:e[4]||(e[4]=function(){return r.onTouchMove&&r.onTouchMove.apply(r,arguments)})},t.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return r.onTransitionEnd&&r.onTransitionEnd.apply(r,arguments)})},t.ptm("itemsContainer")),[r.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(t.value.slice(-1*o.d_numVisible),(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_scloned",class:t.cx("itemCloned",{index:n,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===n,"data-p-carousel-item-end":t.value.slice(-1*o.d_numVisible).length-1===n}),[l.renderSlot(t.$slots,"item",{data:e,index:n})],16,D)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n,class:t.cx("item",{index:n}),role:"group","aria-hidden":r.firstIndex()>n||r.lastIndex()<n||void 0,"aria-label":r.ariaSlideNumber(n),"aria-roledescription":r.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":r.firstIndex()<=n&&r.lastIndex()>=n,"data-p-carousel-item-start":r.firstIndex()===n,"data-p-carousel-item-end":r.lastIndex()===n}),[l.renderSlot(t.$slots,"item",{data:e,index:n})],16,E)})),128)),r.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(t.value.slice(0,o.d_numVisible),(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_fcloned",class:t.cx("itemCloned",{index:n,value:t.value,totalShiftedItems:o.totalShiftedItems,d_numVisible:o.d_numVisible})},t.ptm("itemCloned")),[l.renderSlot(t.$slots,"item",{data:e,index:n})],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:r.forwardIsDisabled,"aria-label":r.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return r.navForward&&r.navForward.apply(r,arguments)})},w(w({},t.nextButtonProps),t.ptm("nextButton"))),[l.renderSlot(t.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,N)),[[a]]):l.createCommentVNode("",!0)],16,$),r.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 r.onIndicatorKeydown&&r.onIndicatorKeydown.apply(r,arguments)})},t.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.totalIndicators,(function(e,n){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+n.toString(),class:t.cx("indicator",{index:n})},t.ptm("indicator",r.getIndicatorPTOptions(n)),{"data-p-highlight":o.d_page===n}),[l.createElementVNode("button",l.mergeProps({class:t.cx("indicatorButton"),type:"button",tabindex:o.d_page===n?"0":"-1","aria-label":r.ariaPageLabel(n+1),"aria-current":o.d_page===n?"page":void 0,onClick:function(t){return r.onIndicatorClick(t,n)}},t.ptm("indicatorButton",r.getIndicatorPTOptions(n))),null,16,L)],16,O)})),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)},_}(primevue.icons.chevrondown,primevue.icons.chevronleft,primevue.icons.chevronright,primevue.icons.chevronup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.carousel=function(t,e,n,i,o,r,a,s,l){"use strict";function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=c(t),d=c(e),h=c(n),m=c(i),p=c(o),f=c(a),v=s.useStyle("\n.p-carousel {\n display: flex;\n flex-direction: column;\n}\n\n.p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n.p-carousel-prev,\n.p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-carousel-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n}\n\n.p-carousel-items-container {\n display: flex;\n flex-direction: row;\n}\n\n.p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Vertical */\n.p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n}\n\n.p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n}\n\n/* Keyboard Support */\n.p-items-hidden .p-carousel-item {\n visibility: hidden;\n}\n\n.p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n}\n",{name:"carousel",manual:!0});function g(t){return S(t)||I(t)||y(t)||b()}function b(){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 y(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}function I(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function S(t){if(Array.isArray(t))return x(t)}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var _={name:"Carousel",extends:{name:"BaseCarousel",extends:f.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}},css:{classes:{root:function(t){var e=t.instance;return["p-carousel p-component",{"p-carousel-vertical":e.isVertical(),"p-carousel-horizontal":!e.isVertical()}]},header:"p-carousel-header",content:"p-carousel-content",container:"p-carousel-container",previousButton:function(t){return["p-carousel-prev p-link",{"p-disabled":t.instance.backwardIsDisabled}]},previousButtonIcon:"p-carousel-next-icon",itemsContent:"p-carousel-items-content",itemsContainer:"p-carousel-items-container",itemCloned:function(t){var e=t.index,n=t.value,i=t.d_numVisible;return["p-carousel-item p-carousel-item-cloned",{"p-carousel-item-active":-1*t.totalShiftedItems===n.length+i,"p-carousel-item-start":0===e,"p-carousel-item-end":n.slice(-1*i).length-1===e}]},item:function(t){var e=t.instance,n=t.index;return["p-carousel-item",{"p-carousel-item-active":e.firstIndex()<=n&&e.lastIndex()>=n,"p-carousel-item-start":e.firstIndex()===n,"p-carousel-item-end":e.lastIndex()===n}]},nextButton:function(t){return["p-carousel-next p-link",{"p-disabled":t.instance.forwardIsDisabled}]},nextButtonIcon:"p-carousel-prev-icon",indicators:"p-carousel-indicators p-reset",indicator:function(t){return["p-carousel-indicator",{"p-highlight":t.instance.d_page===t.index}]},indicatorButton:"p-link",footer:"p-carousel-footer"},loadStyle:v.load},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){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,n=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 i=this.d_page;0!==this.totalIndicators&&i>=this.totalIndicators&&(this.$emit("update:page",i=this.totalIndicators-1),this.d_page=i,e=!0),n=i*this.d_numScroll*-1,t&&(n-=this.d_numVisible),i===this.totalIndicators-1&&this.remainingItems>0?(n+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,n!==this.totalShiftedItems&&(this.totalShiftedItems=n,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(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)")}t&&(0===this.d_page?n=-1*this.d_numVisible:0===n&&(n=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),n!==this.totalShiftedItems&&(this.totalShiftedItems=n,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 n=this.totalShiftedItems,i=this.isCircular();null!=e?(n=this.d_numScroll*e*-1,i&&(n-=this.d_numVisible),this.isRemainingItemsAdded=!1):(n+=this.d_numScroll*t,this.isRemainingItemsAdded&&(n+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((i?n+this.d_numVisible:n)/this.d_numScroll)));i&&this.d_page===this.totalIndicators-1&&-1===t?(n=-1*(this.value.length+this.d_numVisible),e=0):i&&0===this.d_page&&1===t?(n=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(n+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&r.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(n*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=n,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},n=0;n<this.responsiveOptions.length;n++){var i=this.responsiveOptions[n];parseInt(i.breakpoint,10)>=t&&(e=i)}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 n=this.d_page;e>n?this.navForward(t,e):e<n&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&r.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":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=g(r.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=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]r')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===r.DomHandler.getAttribute(t,"data-p-highlight")})),n=r.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),i=t.findIndex((function(t){return t===n.parentElement}));t[i].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=r.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 n=g(r.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));n[t].children[0].tabIndex="-1",n[e].children[0].tabIndex="0",n[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",r.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 n=g(this.responsiveOptions),i=new Intl.Collator(void 0,{numeric:!0}).compare;n.sort((function(t,e){var n=t.breakpoint,o=e.breakpoint;return-1*(null==n&&null!=o?-1:null!=n&&null==o?1:null==n&&null==o?0:"string"==typeof n&&"string"==typeof o?i(n,o):n<o?-1:n>o?1:0)}));for(var o=0;o<n.length;o++){var a=n[o];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 r.UniqueComponentId()}},components:{ChevronRightIcon:h.default,ChevronDownIcon:u.default,ChevronLeftIcon:d.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function C(t){return C="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},C(t)}function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function k(t,e,n){return(e=B(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(t){var e=P(t,"string");return"symbol"===C(e)?e:String(e)}function P(t,e){if("object"!==C(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==C(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var $=["aria-live"],A=["disabled","aria-label"],D=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],N=["disabled","aria-label"],O=["data-p-highlight"],L=["tabindex","aria-label","aria-current","onClick"];return _.render=function(t,e,n,i,o,r){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":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:r.backwardIsDisabled,"aria-label":r.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return r.navBackward&&r.navBackward.apply(r,arguments)})},w(w({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,A)),[[a]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:t.cx("itemsContent"),style:[{height:r.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return r.onTouchEnd&&r.onTouchEnd.apply(r,arguments)}),onTouchstart:e[3]||(e[3]=function(){return r.onTouchStart&&r.onTouchStart.apply(r,arguments)}),onTouchmove:e[4]||(e[4]=function(){return r.onTouchMove&&r.onTouchMove.apply(r,arguments)})},t.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return r.onTransitionEnd&&r.onTransitionEnd.apply(r,arguments)})},t.ptm("itemsContainer")),[r.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(t.value.slice(-1*o.d_numVisible),(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_scloned",class:t.cx("itemCloned",{index:n,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===n,"data-p-carousel-item-end":t.value.slice(-1*o.d_numVisible).length-1===n}),[l.renderSlot(t.$slots,"item",{data:e,index:n})],16,D)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n,class:t.cx("item",{index:n}),role:"group","aria-hidden":r.firstIndex()>n||r.lastIndex()<n||void 0,"aria-label":r.ariaSlideNumber(n),"aria-roledescription":r.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":r.firstIndex()<=n&&r.lastIndex()>=n,"data-p-carousel-item-start":r.firstIndex()===n,"data-p-carousel-item-end":r.lastIndex()===n}),[l.renderSlot(t.$slots,"item",{data:e,index:n})],16,E)})),128)),r.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(t.value.slice(0,o.d_numVisible),(function(e,n){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:n+"_fcloned",class:t.cx("itemCloned",{index:n,value:t.value,totalShiftedItems:o.totalShiftedItems,d_numVisible:o.d_numVisible})},t.ptm("itemCloned")),[l.renderSlot(t.$slots,"item",{data:e,index:n})],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:r.forwardIsDisabled,"aria-label":r.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return r.navForward&&r.navForward.apply(r,arguments)})},w(w({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,N)),[[a]]):l.createCommentVNode("",!0)],16,$),r.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 r.onIndicatorKeydown&&r.onIndicatorKeydown.apply(r,arguments)})},t.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.totalIndicators,(function(e,n){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+n.toString(),class:t.cx("indicator",{index:n})},t.ptm("indicator",r.getIndicatorPTOptions(n)),{"data-p-highlight":o.d_page===n}),[l.createElementVNode("button",l.mergeProps({class:t.cx("indicatorButton"),type:"button",tabindex:o.d_page===n?"0":"-1","aria-label":r.ariaPageLabel(n+1),"aria-current":o.d_page===n?"page":void 0,onClick:function(t){return r.onIndicatorClick(t,n)}},t.ptm("indicatorButton",r.getIndicatorPTOptions(n))),null,16,L)],16,O)})),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)},_}(primevue.icons.chevrondown,primevue.icons.chevronleft,primevue.icons.chevronright,primevue.icons.chevronup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { HTMLAttributes, InputHTMLAttributes, TransitionProps, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
|
-
import {
|
|
12
|
+
import { PassThroughOptions } from '../passthrough';
|
|
13
|
+
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
|
13
14
|
|
|
14
15
|
export declare type CascadeSelectPassThroughOptionType = CascadeSelectPassThroughAttributes | ((options: CascadeSelectPassThroughMethodOptions) => CascadeSelectPassThroughAttributes | string) | string | null | undefined;
|
|
15
16
|
|
|
@@ -19,9 +20,22 @@ export declare type CascadeSelectPassThroughTransitionType = TransitionProps | (
|
|
|
19
20
|
* Custom passthrough(pt) option method.
|
|
20
21
|
*/
|
|
21
22
|
export interface CascadeSelectPassThroughMethodOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Defines instance.
|
|
25
|
+
*/
|
|
22
26
|
instance: any;
|
|
27
|
+
/**
|
|
28
|
+
* Defines valid properties.
|
|
29
|
+
*/
|
|
23
30
|
props: CascadeSelectProps;
|
|
31
|
+
/**
|
|
32
|
+
* Defines current inline state.
|
|
33
|
+
*/
|
|
24
34
|
state: CascadeSelectState;
|
|
35
|
+
/**
|
|
36
|
+
* Defines passthrough(pt) options in global config.
|
|
37
|
+
*/
|
|
38
|
+
global: object | undefined;
|
|
25
39
|
}
|
|
26
40
|
|
|
27
41
|
/**
|
|
@@ -325,7 +339,12 @@ export interface CascadeSelectProps {
|
|
|
325
339
|
* Used to pass attributes to DOM elements inside the component.
|
|
326
340
|
* @type {CascadeSelectPassThroughOptions}
|
|
327
341
|
*/
|
|
328
|
-
pt?:
|
|
342
|
+
pt?: PassThrough<CascadeSelectPassThroughOptions>;
|
|
343
|
+
/**
|
|
344
|
+
* Used to configure passthrough(pt) options of the component.
|
|
345
|
+
* @type {PassThroughOptions}
|
|
346
|
+
*/
|
|
347
|
+
ptOptions?: PassThroughOptions;
|
|
329
348
|
/**
|
|
330
349
|
* When enabled, it removes component related styles in the core.
|
|
331
350
|
* @defaultValue false
|
|
@@ -1051,9 +1051,9 @@ var script = {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
};
|
|
1053
1053
|
|
|
1054
|
-
function _typeof(
|
|
1055
|
-
function ownKeys(
|
|
1056
|
-
function _objectSpread(
|
|
1054
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1055
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1056
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1057
1057
|
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; }
|
|
1058
1058
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
1059
1059
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -1039,9 +1039,9 @@ var script = {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
};
|
|
1041
1041
|
|
|
1042
|
-
function _typeof(
|
|
1043
|
-
function ownKeys(
|
|
1044
|
-
function _objectSpread(
|
|
1042
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1043
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1044
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1045
1045
|
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; }
|
|
1046
1046
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
1047
1047
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -1042,9 +1042,9 @@ this.primevue.cascadeselect = (function (AngleRightIcon, ChevronDownIcon, Spinne
|
|
|
1042
1042
|
}
|
|
1043
1043
|
};
|
|
1044
1044
|
|
|
1045
|
-
function _typeof(
|
|
1046
|
-
function ownKeys(
|
|
1047
|
-
function _objectSpread(
|
|
1045
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1046
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1047
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1048
1048
|
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; }
|
|
1049
1049
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
1050
1050
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
package/chart/Chart.d.ts
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { CanvasHTMLAttributes } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
|
-
import {
|
|
12
|
+
import { PassThroughOptions } from '../passthrough';
|
|
13
|
+
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
|
13
14
|
|
|
14
15
|
export declare type ChartPassThroughOptionType = ChartPassThroughAttributes | ((options: ChartPassThroughMethodOptions) => ChartPassThroughAttributes | string) | string | null | undefined;
|
|
15
16
|
|
|
@@ -17,8 +18,18 @@ export declare type ChartPassThroughOptionType = ChartPassThroughAttributes | ((
|
|
|
17
18
|
* Custom passthrough(pt) option method.
|
|
18
19
|
*/
|
|
19
20
|
export interface ChartPassThroughMethodOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Defines instance.
|
|
23
|
+
*/
|
|
20
24
|
instance: any;
|
|
25
|
+
/**
|
|
26
|
+
* Defines valid properties.
|
|
27
|
+
*/
|
|
21
28
|
props: ChartProps;
|
|
29
|
+
/**
|
|
30
|
+
* Defines passthrough(pt) options in global config.
|
|
31
|
+
*/
|
|
32
|
+
global: object | undefined;
|
|
22
33
|
}
|
|
23
34
|
|
|
24
35
|
/**
|
|
@@ -105,7 +116,12 @@ export interface ChartProps {
|
|
|
105
116
|
* Used to pass attributes to DOM elements inside the component.
|
|
106
117
|
* @type {ChartPassThroughOptions}
|
|
107
118
|
*/
|
|
108
|
-
pt?:
|
|
119
|
+
pt?: PassThrough<ChartPassThroughOptions>;
|
|
120
|
+
/**
|
|
121
|
+
* Used to configure passthrough(pt) options of the component.
|
|
122
|
+
* @type {PassThroughOptions}
|
|
123
|
+
*/
|
|
124
|
+
ptOptions?: PassThroughOptions;
|
|
109
125
|
/**
|
|
110
126
|
* When enabled, it removes component related styles in the core.
|
|
111
127
|
* @defaultValue false
|