primevue 3.8.0 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/accordion/Accordion.vue +1 -1
- package/accordion/accordion.cjs.js +1 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +1 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +1 -1
- package/accordion/accordion.min.js +1 -1
- package/api/Api.d.ts +73 -32
- package/api/api.cjs.js +66 -32
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +66 -32
- package/api/api.esm.min.js +1 -1
- package/api/api.js +66 -32
- package/api/api.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +43 -9
- package/autocomplete/AutoComplete.vue +16 -9
- package/autocomplete/autocomplete.cjs.js +19 -11
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +19 -11
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +19 -11
- package/autocomplete/autocomplete.min.js +1 -1
- package/blockui/BlockUI.vue +1 -1
- package/blockui/blockui.cjs.js +5 -7
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +6 -8
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +5 -7
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +7 -0
- package/breadcrumb/BreadcrumbItem.vue +5 -2
- package/breadcrumb/breadcrumb.cjs.js +5 -2
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +5 -2
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +5 -2
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/Calendar.d.ts +11 -1
- package/calendar/Calendar.vue +362 -67
- package/calendar/calendar.cjs.js +459 -168
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +461 -170
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +459 -168
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.d.ts +6 -1
- package/carousel/Carousel.vue +2 -2
- package/carousel/carousel.cjs.js +6 -6
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +6 -6
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +6 -6
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +19 -6
- package/chart/Chart.vue +9 -2
- package/chart/chart.cjs.js +9 -2
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +9 -2
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +9 -2
- package/chart/chart.min.js +1 -1
- package/chips/Chips.d.ts +5 -1
- package/colorpicker/ColorPicker.d.ts +3 -0
- package/colorpicker/ColorPicker.vue +6 -1
- package/colorpicker/colorpicker.cjs.js +6 -1
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +6 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +6 -1
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +42 -11
- package/confirmdialog/ConfirmDialog.vue +8 -2
- package/confirmdialog/confirmdialog.cjs.js +11 -4
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +11 -4
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +11 -4
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +7 -0
- package/confirmpopup/ConfirmPopup.vue +7 -4
- package/confirmpopup/confirmpopup.cjs.js +13 -5
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +14 -6
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +13 -5
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +5 -1
- package/contextmenu/ContextMenuSub.vue +8 -5
- package/contextmenu/contextmenu.cjs.js +8 -5
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +8 -5
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +8 -5
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +138 -68
- package/core/core.min.js +13 -12
- package/datatable/BodyCell.vue +1 -0
- package/datatable/ColumnFilter.vue +17 -6
- package/datatable/DataTable.d.ts +37 -9
- package/datatable/DataTable.vue +44 -23
- package/datatable/TableBody.vue +6 -2
- package/datatable/TableFooter.vue +17 -2
- package/datatable/TableHeader.vue +17 -2
- package/datatable/datatable.cjs.js +203 -126
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +203 -126
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +203 -126
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +9 -4
- package/dataview/DataView.vue +8 -8
- package/dataview/dataview.cjs.js +12 -12
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +12 -12
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +12 -12
- package/dataview/dataview.min.js +1 -1
- package/dialog/Dialog.vue +6 -1
- package/dialog/dialog.cjs.js +4 -2
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +4 -2
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +4 -2
- package/dialog/dialog.min.js +1 -1
- package/dock/Dock.d.ts +10 -1
- package/dock/Dock.vue +1 -1
- package/dock/DockSub.vue +13 -8
- package/dock/dock.cjs.js +24 -10
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +20 -10
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +25 -12
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +56 -13
- package/dropdown/Dropdown.vue +1 -0
- package/dropdown/dropdown.cjs.js +1 -0
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +1 -0
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +1 -0
- package/dropdown/dropdown.min.js +1 -1
- package/fileupload/FileUpload.d.ts +5 -0
- package/galleria/Galleria.d.ts +20 -4
- package/inplace/Inplace.d.ts +1 -0
- package/inplace/Inplace.vue +12 -1
- package/inplace/inplace.cjs.js +13 -2
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +13 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +13 -2
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +1 -1
- package/inputnumber/InputNumber.vue +19 -3
- package/inputnumber/inputnumber.cjs.js +19 -3
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +19 -3
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +19 -3
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputtext/InputText.d.ts +1 -1
- package/inputtext/InputText.vue +1 -1
- package/inputtext/inputtext.cjs.js +2 -2
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +3 -3
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +2 -2
- package/inputtext/inputtext.min.js +1 -1
- package/listbox/Listbox.d.ts +48 -12
- package/megamenu/MegaMenu.d.ts +5 -1
- package/megamenu/MegaMenu.vue +11 -8
- package/megamenu/megamenu.cjs.js +11 -8
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +11 -8
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +11 -8
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +5 -1
- package/menu/Menu.vue +6 -3
- package/menu/Menuitem.vue +5 -2
- package/menu/menu.cjs.js +11 -5
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +11 -5
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +11 -5
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +5 -1
- package/menubar/Menubar.vue +1 -0
- package/menubar/MenubarSub.vue +8 -5
- package/menubar/menubar.cjs.js +9 -6
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +9 -6
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +9 -6
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +1 -0
- package/message/Message.vue +6 -2
- package/message/message.cjs.js +6 -2
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +6 -2
- package/message/message.esm.min.js +1 -1
- package/message/message.js +6 -2
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +61 -14
- package/orderlist/OrderList.d.ts +8 -1
- package/orderlist/OrderList.vue +2 -0
- package/orderlist/orderlist.cjs.js +3 -1
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +3 -1
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +3 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.vue +1 -0
- package/organizationchart/organizationchart.cjs.js +1 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +1 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/package.json +5 -1
- package/paginator/Paginator.d.ts +10 -4
- package/paginator/Paginator.vue +4 -4
- package/paginator/paginator.cjs.js +4 -4
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +4 -4
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +4 -4
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +1 -0
- package/panel/Panel.vue +1 -1
- package/panelmenu/PanelMenu.d.ts +5 -3
- package/panelmenu/PanelMenu.vue +6 -3
- package/panelmenu/PanelMenuSub.vue +8 -5
- package/panelmenu/panelmenu.cjs.js +14 -8
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +14 -8
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +14 -8
- package/panelmenu/panelmenu.min.js +1 -1
- package/picklist/PickList.d.ts +14 -3
- package/picklist/PickList.vue +10 -4
- package/picklist/picklist.cjs.js +13 -7
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +13 -7
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +13 -7
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.vue +13 -12
- package/progressbar/progressbar.cjs.js +13 -12
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +14 -13
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +13 -12
- package/progressbar/progressbar.min.js +1 -1
- package/rating/Rating.vue +1 -1
- package/rating/rating.cjs.js +1 -1
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +1 -1
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +1 -1
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +5 -0
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +56 -15
- package/resources/themes/arya-green/theme.css +56 -15
- package/resources/themes/arya-orange/theme.css +56 -15
- package/resources/themes/arya-purple/theme.css +56 -15
- package/resources/themes/bootstrap4-dark-blue/theme.css +53 -19
- package/resources/themes/bootstrap4-dark-purple/theme.css +53 -19
- package/resources/themes/bootstrap4-light-blue/theme.css +53 -19
- package/resources/themes/bootstrap4-light-purple/theme.css +53 -19
- package/resources/themes/fluent-light/theme.css +56 -15
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5414 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5414 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5414 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5414 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5414 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5414 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5414 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5414 -0
- package/resources/themes/luna-amber/theme.css +53 -19
- package/resources/themes/luna-blue/theme.css +53 -19
- package/resources/themes/luna-green/theme.css +53 -19
- package/resources/themes/luna-pink/theme.css +53 -19
- package/resources/themes/md-dark-deeppurple/theme.css +244 -47
- package/resources/themes/md-dark-indigo/theme.css +244 -47
- package/resources/themes/md-light-deeppurple/theme.css +244 -47
- package/resources/themes/md-light-indigo/theme.css +244 -47
- package/resources/themes/mdc-dark-deeppurple/theme.css +244 -47
- package/resources/themes/mdc-dark-indigo/theme.css +244 -47
- package/resources/themes/mdc-light-deeppurple/theme.css +244 -47
- package/resources/themes/mdc-light-indigo/theme.css +244 -47
- package/resources/themes/nova/theme.css +53 -19
- package/resources/themes/nova-accent/theme.css +53 -19
- package/resources/themes/nova-alt/theme.css +53 -19
- package/resources/themes/nova-vue/theme.css +53 -19
- package/resources/themes/rhea/theme.css +53 -19
- package/resources/themes/saga-blue/theme.css +56 -15
- package/resources/themes/saga-green/theme.css +56 -15
- package/resources/themes/saga-orange/theme.css +56 -15
- package/resources/themes/saga-purple/theme.css +56 -15
- package/resources/themes/tailwind-light/theme.css +67 -18
- package/resources/themes/vela-blue/theme.css +56 -15
- package/resources/themes/vela-green/theme.css +56 -15
- package/resources/themes/vela-orange/theme.css +56 -15
- package/resources/themes/vela-purple/theme.css +56 -15
- package/selectbutton/SelectButton.d.ts +13 -5
- package/selectbutton/SelectButton.vue +8 -2
- package/selectbutton/selectbutton.cjs.js +14 -9
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +14 -9
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +14 -9
- package/selectbutton/selectbutton.min.js +1 -1
- package/speeddial/SpeedDial.d.ts +5 -1
- package/steps/Steps.d.ts +5 -3
- package/steps/Steps.vue +5 -2
- package/steps/steps.cjs.js +5 -2
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +5 -2
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +5 -2
- package/steps/steps.min.js +1 -1
- package/tabmenu/TabMenu.d.ts +5 -3
- package/tabmenu/TabMenu.vue +6 -3
- package/tabmenu/tabmenu.cjs.js +6 -3
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +6 -3
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +6 -3
- package/tabmenu/tabmenu.min.js +1 -1
- package/terminalservice/TerminalService.d.ts +9 -6
- package/tieredmenu/TieredMenu.d.ts +5 -3
- package/tieredmenu/TieredMenuSub.vue +7 -4
- package/tieredmenu/tieredmenu.cjs.js +7 -4
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +7 -4
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +7 -4
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +8 -3
- package/toast/Toast.d.ts +7 -0
- package/toolbar/Toolbar.vue +2 -2
- package/toolbar/toolbar.cjs.js +2 -2
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +2 -2
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +2 -2
- package/toolbar/toolbar.min.js +1 -1
- package/tree/Tree.d.ts +5 -1
- package/tree/TreeNode.vue +4 -1
- package/tree/tree.cjs.js +4 -1
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +4 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +4 -1
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +20 -3
- package/treeselect/TreeSelect.vue +9 -0
- package/treeselect/treeselect.cjs.js +9 -0
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +9 -0
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +9 -0
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/TreeTable.d.ts +2 -2
- package/treetable/TreeTable.vue +10 -10
- package/treetable/TreeTableRow.vue +2 -2
- package/treetable/treetable.cjs.js +15 -15
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +15 -15
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +15 -15
- package/treetable/treetable.min.js +1 -1
- package/vetur-attributes.json +20 -0
- package/vetur-tags.json +8 -3
- package/virtualscroller/VirtualScroller.d.ts +52 -6
- package/virtualscroller/VirtualScroller.vue +1 -1
- package/virtualscroller/virtualscroller.cjs.js +1 -1
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +1 -1
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +178 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primevue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"homepage": "https://www.primefaces.org/primevue",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,5 +24,9 @@
|
|
|
24
24
|
"vetur": {
|
|
25
25
|
"tags": "./vetur-tags.json",
|
|
26
26
|
"attributes": "./vetur-attributes.json"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"vue": "^3.0.0",
|
|
30
|
+
"primeicons": "^5.0.0"
|
|
27
31
|
}
|
|
28
32
|
}
|
package/paginator/Paginator.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { VNode } from 'vue';
|
|
2
|
-
|
|
3
1
|
export interface PageState {
|
|
4
2
|
first: number,
|
|
5
3
|
rows: number,
|
|
@@ -18,14 +16,22 @@ interface PaginatorProps {
|
|
|
18
16
|
alwaysShow?: boolean;
|
|
19
17
|
}
|
|
20
18
|
|
|
19
|
+
interface PaginatorSlotInterface {
|
|
20
|
+
currentState: {
|
|
21
|
+
page: number;
|
|
22
|
+
first: number;
|
|
23
|
+
rows: number;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
declare class Paginator {
|
|
22
28
|
$props: PaginatorProps;
|
|
23
29
|
$emit(eventName: 'update:first', value: number): this;
|
|
24
30
|
$emit(eventName: 'update:rows', value: number): this;
|
|
25
31
|
$emit(eventName: 'page', event: PageState): this;
|
|
26
32
|
$slots: {
|
|
27
|
-
left:
|
|
28
|
-
right:
|
|
33
|
+
left: PaginatorSlotInterface;
|
|
34
|
+
right: PaginatorSlotInterface;
|
|
29
35
|
}
|
|
30
36
|
}
|
|
31
37
|
|
package/paginator/Paginator.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="p-paginator p-component" v-if="alwaysShow ? true : (pageLinks && pageLinks.length > 1)">
|
|
3
|
-
<div class="p-paginator-left-content" v-if="$slots.
|
|
4
|
-
<slot name="
|
|
3
|
+
<div class="p-paginator-left-content" v-if="$slots.start">
|
|
4
|
+
<slot name="start" :state="currentState"></slot>
|
|
5
5
|
</div>
|
|
6
6
|
<template v-for="item of templateItems" :key="item">
|
|
7
7
|
<FirstPageLink v-if="item === 'FirstPageLink'" @click="changePageToFirst($event)" :disabled="isFirstPage || empty" />
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
@page-change="changePage($event)" :disabled="empty"/>
|
|
18
18
|
<JumpToPageInput v-else-if="item === 'JumpToPageInput'" :page="currentPage" @page-change="changePage($event)" :disabled="empty"/>
|
|
19
19
|
</template>
|
|
20
|
-
<div class="p-paginator-right-content" v-if="$slots.
|
|
21
|
-
<slot name="
|
|
20
|
+
<div class="p-paginator-right-content" v-if="$slots.end">
|
|
21
|
+
<slot name="end" :state="currentState"></slot>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
@@ -561,9 +561,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
561
561
|
|
|
562
562
|
return ($props.alwaysShow ? true : ($options.pageLinks && $options.pageLinks.length > 1))
|
|
563
563
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
|
|
564
|
-
(_ctx.$slots.
|
|
564
|
+
(_ctx.$slots.start)
|
|
565
565
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_2, [
|
|
566
|
-
vue.renderSlot(_ctx.$slots, "
|
|
566
|
+
vue.renderSlot(_ctx.$slots, "start", { state: $options.currentState })
|
|
567
567
|
]))
|
|
568
568
|
: vue.createCommentVNode("", true),
|
|
569
569
|
(vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($options.templateItems, (item) => {
|
|
@@ -636,9 +636,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
636
636
|
: vue.createCommentVNode("", true)
|
|
637
637
|
], 64))
|
|
638
638
|
}), 128)),
|
|
639
|
-
(_ctx.$slots.
|
|
639
|
+
(_ctx.$slots.end)
|
|
640
640
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_3, [
|
|
641
|
-
vue.renderSlot(_ctx.$slots, "
|
|
641
|
+
vue.renderSlot(_ctx.$slots, "end", { state: $options.currentState })
|
|
642
642
|
]))
|
|
643
643
|
: vue.createCommentVNode("", true)
|
|
644
644
|
]))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("vue"),t=require("primevue/ripple"),n=require("primevue/dropdown"),a=require("primevue/inputnumber");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(t),i=o(n),s=o(a),p={name:"CurrentPageReport",inheritAttrs:!1,props:{pageCount:{type:Number,default:0},currentPage:{type:Number,default:0},page:{type:Number,default:0},first:{type:Number,default:0},rows:{type:Number,default:0},totalRecords:{type:Number,default:0},template:{type:String,default:"({currentPage} of {totalPages})"}},computed:{text(){return this.template.replace("{currentPage}",this.currentPage).replace("{totalPages}",this.pageCount).replace("{first}",this.pageCount>0?this.first+1:0).replace("{last}",Math.min(this.first+this.rows,this.totalRecords)).replace("{rows}",this.rows).replace("{totalRecords}",this.totalRecords)}}};const l={class:"p-paginator-current"};p.render=function(t,n,a,o,r,i){return e.openBlock(),e.createBlock("span",l,e.toDisplayString(i.text),1)};var c={name:"FirstPageLink",computed:{containerClass(){return["p-paginator-first p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const g=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-double-left"},null,-1);c.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[g],2)),[[s]])};var u={name:"LastPageLink",computed:{containerClass(){return["p-paginator-last p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const d=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-double-right"},null,-1);u.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[d],2)),[[s]])};var h={name:"NextPageLink",computed:{containerClass(){return["p-paginator-next p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const m=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-right"},null,-1);h.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[m],2)),[[s]])};var k={name:"PageLinks",inheritAttrs:!1,emits:["click"],props:{value:Array,page:Number},methods:{onPageLinkClick(e,t){this.$emit("click",{originalEvent:e,value:t})}},directives:{ripple:r.default}};const P={class:"p-paginator-pages"};k.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.openBlock(),e.createBlock("span",P,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.value,(t=>e.withDirectives((e.openBlock(),e.createBlock("button",{key:t,class:["p-paginator-page p-paginator-element p-link",{"p-highlight":t-1===a.page}],type:"button",onClick:e=>i.onPageLinkClick(e,t)},[e.createTextVNode(e.toDisplayString(t),1)],10,["onClick"])),[[s]]))),128))])};var f={name:"PrevPageLink",computed:{containerClass(){return["p-paginator-prev p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const b=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-left"},null,-1);f.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[b],2)),[[s]])};var v={name:"RowsPerPageDropdown",inheritAttrs:!1,emits:["rows-change"],props:{options:Array,rows:Number,disabled:Boolean},methods:{onChange(e){this.$emit("rows-change",e)}},computed:{rowsOptions(){let e=[];if(this.options)for(let t=0;t<this.options.length;t++)e.push({label:String(this.options[t]),value:this.options[t]});return e}},components:{RPPDropdown:i.default}};v.render=function(t,n,a,o,r,i){const s=e.resolveComponent("RPPDropdown");return e.openBlock(),e.createBlock(s,{modelValue:a.rows,options:i.rowsOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-rpp-options",disabled:a.disabled},null,8,["modelValue","options","disabled"])};var w={name:"JumpToPageDropdown",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e)}},computed:{pageOptions(){let e=[];for(let t=0;t<this.pageCount;t++)e.push({label:String(t+1),value:t});return e}},components:{JTPDropdown:i.default}};w.render=function(t,n,a,o,r,i){const s=e.resolveComponent("JTPDropdown");return e.openBlock(),e.createBlock(s,{modelValue:a.page,options:i.pageOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-page-options",disabled:a.disabled},null,8,["modelValue","options","disabled"])};var C={name:"JumpToPageInput",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e-1)}},components:{JTPInput:s.default}};C.render=function(t,n,a,o,r,i){const s=e.resolveComponent("JTPInput");return e.openBlock(),e.createBlock(s,{modelValue:a.page,"onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-page-input",disabled:a.disabled},null,8,["modelValue","disabled"])};var y={name:"Paginator",emits:["update:first","update:rows","page"],props:{totalRecords:{type:Number,default:0},rows:{type:Number,default:0},first:{type:Number,default:0},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},template:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},currentPageReportTemplate:{type:null,default:"({currentPage} of {totalPages})"},alwaysShow:{type:Boolean,default:!0}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(e){this.d_first=e},rows(e){this.d_rows=e},totalRecords(e){this.page>0&&e&&this.d_first>=e&&this.changePage(this.pageCount-1)}},methods:{changePage(e){const t=this.pageCount;if(e>=0&&e<t){this.d_first=this.d_rows*e;const n={page:e,first:this.d_first,rows:this.d_rows,pageCount:t};this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",n)}},changePageToFirst(e){this.isFirstPage||this.changePage(0),e.preventDefault()},changePageToPrev(e){this.changePage(this.page-1),e.preventDefault()},changePageLink(e){this.changePage(e.value-1),e.originalEvent.preventDefault()},changePageToNext(e){this.changePage(this.page+1),e.preventDefault()},changePageToLast(e){this.isLastPage||this.changePage(this.pageCount-1),e.preventDefault()},onRowChange(e){this.d_rows=e,this.changePage(this.page)}},computed:{templateItems(){let e=[];return this.template.split(" ").map((t=>{e.push(t.trim())})),e},page(){return Math.floor(this.d_first/this.d_rows)},pageCount(){return Math.ceil(this.totalRecords/this.d_rows)},isFirstPage(){return 0===this.page},isLastPage(){return this.page===this.pageCount-1},calculatePageLinkBoundaries(){const e=this.pageCount,t=Math.min(this.pageLinkSize,e);let n=Math.max(0,Math.ceil(this.page-t/2)),a=Math.min(e-1,n+t-1);const o=this.pageLinkSize-(a-n+1);return n=Math.max(0,n-o),[n,a]},pageLinks(){let e=[],t=this.calculatePageLinkBoundaries,n=t[0],a=t[1];for(var o=n;o<=a;o++)e.push(o+1);return e},currentState(){return{page:this.page,first:this.d_first,rows:this.d_rows}},empty(){return 0===this.pageCount},currentPage(){return this.pageCount>0?this.page+1:0}},components:{CurrentPageReport:p,FirstPageLink:c,LastPageLink:u,NextPageLink:h,PageLinks:k,PrevPageLink:f,RowsPerPageDropdown:v,JumpToPageDropdown:w,JumpToPageInput:C}};const B={key:0,class:"p-paginator p-component"},L={key:0,class:"p-paginator-left-content"},x={key:1,class:"p-paginator-right-content"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-paginator {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-paginator-left-content {\n\tmargin-right: auto;\n}\n.p-paginator-right-content {\n\tmargin-left: auto;\n}\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev,\n.p-paginator-current {\n cursor: pointer;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n line-height: 1;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n position: relative;\n}\n.p-paginator-element:focus {\n z-index: 1;\n position: relative;\n}\n"),y.render=function(t,n,a,o,r,i){const s=e.resolveComponent("FirstPageLink"),p=e.resolveComponent("PrevPageLink"),l=e.resolveComponent("NextPageLink"),c=e.resolveComponent("LastPageLink"),g=e.resolveComponent("PageLinks"),u=e.resolveComponent("CurrentPageReport"),d=e.resolveComponent("RowsPerPageDropdown"),h=e.resolveComponent("JumpToPageDropdown"),m=e.resolveComponent("JumpToPageInput");return a.alwaysShow||i.pageLinks&&i.pageLinks.length>1?(e.openBlock(),e.createBlock("div",B,[t.$slots.left?(e.openBlock(),e.createBlock("div",L,[e.renderSlot(t.$slots,"left",{state:i.currentState})])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(i.templateItems,(t=>(e.openBlock(),e.createBlock(e.Fragment,{key:t},["FirstPageLink"===t?(e.openBlock(),e.createBlock(s,{key:0,onClick:n[1]||(n[1]=e=>i.changePageToFirst(e)),disabled:i.isFirstPage||i.empty},null,8,["disabled"])):"PrevPageLink"===t?(e.openBlock(),e.createBlock(p,{key:1,onClick:n[2]||(n[2]=e=>i.changePageToPrev(e)),disabled:i.isFirstPage||i.empty},null,8,["disabled"])):"NextPageLink"===t?(e.openBlock(),e.createBlock(l,{key:2,onClick:n[3]||(n[3]=e=>i.changePageToNext(e)),disabled:i.isLastPage||i.empty},null,8,["disabled"])):"LastPageLink"===t?(e.openBlock(),e.createBlock(c,{key:3,onClick:n[4]||(n[4]=e=>i.changePageToLast(e)),disabled:i.isLastPage||i.empty},null,8,["disabled"])):"PageLinks"===t?(e.openBlock(),e.createBlock(g,{key:4,value:i.pageLinks,page:i.page,onClick:n[5]||(n[5]=e=>i.changePageLink(e))},null,8,["value","page"])):"CurrentPageReport"===t?(e.openBlock(),e.createBlock(u,{key:5,template:a.currentPageReportTemplate,currentPage:i.currentPage,page:i.page,pageCount:i.pageCount,first:r.d_first,rows:r.d_rows,totalRecords:a.totalRecords},null,8,["template","currentPage","page","pageCount","first","rows","totalRecords"])):"RowsPerPageDropdown"===t&&a.rowsPerPageOptions?(e.openBlock(),e.createBlock(d,{key:6,rows:r.d_rows,options:a.rowsPerPageOptions,onRowsChange:n[6]||(n[6]=e=>i.onRowChange(e)),disabled:i.empty},null,8,["rows","options","disabled"])):"JumpToPageDropdown"===t?(e.openBlock(),e.createBlock(h,{key:7,page:i.page,pageCount:i.pageCount,onPageChange:n[7]||(n[7]=e=>i.changePage(e)),disabled:i.empty},null,8,["page","pageCount","disabled"])):"JumpToPageInput"===t?(e.openBlock(),e.createBlock(m,{key:8,page:i.currentPage,onPageChange:n[8]||(n[8]=e=>i.changePage(e)),disabled:i.empty},null,8,["page","disabled"])):e.createCommentVNode("",!0)],64)))),128)),t.$slots.right?(e.openBlock(),e.createBlock("div",x,[e.renderSlot(t.$slots,"right",{state:i.currentState})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)},module.exports=y;
|
|
1
|
+
"use strict";var e=require("vue"),t=require("primevue/ripple"),n=require("primevue/dropdown"),a=require("primevue/inputnumber");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(t),i=o(n),s=o(a),p={name:"CurrentPageReport",inheritAttrs:!1,props:{pageCount:{type:Number,default:0},currentPage:{type:Number,default:0},page:{type:Number,default:0},first:{type:Number,default:0},rows:{type:Number,default:0},totalRecords:{type:Number,default:0},template:{type:String,default:"({currentPage} of {totalPages})"}},computed:{text(){return this.template.replace("{currentPage}",this.currentPage).replace("{totalPages}",this.pageCount).replace("{first}",this.pageCount>0?this.first+1:0).replace("{last}",Math.min(this.first+this.rows,this.totalRecords)).replace("{rows}",this.rows).replace("{totalRecords}",this.totalRecords)}}};const l={class:"p-paginator-current"};p.render=function(t,n,a,o,r,i){return e.openBlock(),e.createBlock("span",l,e.toDisplayString(i.text),1)};var c={name:"FirstPageLink",computed:{containerClass(){return["p-paginator-first p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const g=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-double-left"},null,-1);c.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[g],2)),[[s]])};var u={name:"LastPageLink",computed:{containerClass(){return["p-paginator-last p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const d=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-double-right"},null,-1);u.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[d],2)),[[s]])};var h={name:"NextPageLink",computed:{containerClass(){return["p-paginator-next p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const m=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-right"},null,-1);h.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[m],2)),[[s]])};var k={name:"PageLinks",inheritAttrs:!1,emits:["click"],props:{value:Array,page:Number},methods:{onPageLinkClick(e,t){this.$emit("click",{originalEvent:e,value:t})}},directives:{ripple:r.default}};const P={class:"p-paginator-pages"};k.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.openBlock(),e.createBlock("span",P,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.value,(t=>e.withDirectives((e.openBlock(),e.createBlock("button",{key:t,class:["p-paginator-page p-paginator-element p-link",{"p-highlight":t-1===a.page}],type:"button",onClick:e=>i.onPageLinkClick(e,t)},[e.createTextVNode(e.toDisplayString(t),1)],10,["onClick"])),[[s]]))),128))])};var f={name:"PrevPageLink",computed:{containerClass(){return["p-paginator-prev p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const b=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-left"},null,-1);f.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[b],2)),[[s]])};var v={name:"RowsPerPageDropdown",inheritAttrs:!1,emits:["rows-change"],props:{options:Array,rows:Number,disabled:Boolean},methods:{onChange(e){this.$emit("rows-change",e)}},computed:{rowsOptions(){let e=[];if(this.options)for(let t=0;t<this.options.length;t++)e.push({label:String(this.options[t]),value:this.options[t]});return e}},components:{RPPDropdown:i.default}};v.render=function(t,n,a,o,r,i){const s=e.resolveComponent("RPPDropdown");return e.openBlock(),e.createBlock(s,{modelValue:a.rows,options:i.rowsOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-rpp-options",disabled:a.disabled},null,8,["modelValue","options","disabled"])};var w={name:"JumpToPageDropdown",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e)}},computed:{pageOptions(){let e=[];for(let t=0;t<this.pageCount;t++)e.push({label:String(t+1),value:t});return e}},components:{JTPDropdown:i.default}};w.render=function(t,n,a,o,r,i){const s=e.resolveComponent("JTPDropdown");return e.openBlock(),e.createBlock(s,{modelValue:a.page,options:i.pageOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-page-options",disabled:a.disabled},null,8,["modelValue","options","disabled"])};var C={name:"JumpToPageInput",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e-1)}},components:{JTPInput:s.default}};C.render=function(t,n,a,o,r,i){const s=e.resolveComponent("JTPInput");return e.openBlock(),e.createBlock(s,{modelValue:a.page,"onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-page-input",disabled:a.disabled},null,8,["modelValue","disabled"])};var y={name:"Paginator",emits:["update:first","update:rows","page"],props:{totalRecords:{type:Number,default:0},rows:{type:Number,default:0},first:{type:Number,default:0},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},template:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},currentPageReportTemplate:{type:null,default:"({currentPage} of {totalPages})"},alwaysShow:{type:Boolean,default:!0}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(e){this.d_first=e},rows(e){this.d_rows=e},totalRecords(e){this.page>0&&e&&this.d_first>=e&&this.changePage(this.pageCount-1)}},methods:{changePage(e){const t=this.pageCount;if(e>=0&&e<t){this.d_first=this.d_rows*e;const n={page:e,first:this.d_first,rows:this.d_rows,pageCount:t};this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",n)}},changePageToFirst(e){this.isFirstPage||this.changePage(0),e.preventDefault()},changePageToPrev(e){this.changePage(this.page-1),e.preventDefault()},changePageLink(e){this.changePage(e.value-1),e.originalEvent.preventDefault()},changePageToNext(e){this.changePage(this.page+1),e.preventDefault()},changePageToLast(e){this.isLastPage||this.changePage(this.pageCount-1),e.preventDefault()},onRowChange(e){this.d_rows=e,this.changePage(this.page)}},computed:{templateItems(){let e=[];return this.template.split(" ").map((t=>{e.push(t.trim())})),e},page(){return Math.floor(this.d_first/this.d_rows)},pageCount(){return Math.ceil(this.totalRecords/this.d_rows)},isFirstPage(){return 0===this.page},isLastPage(){return this.page===this.pageCount-1},calculatePageLinkBoundaries(){const e=this.pageCount,t=Math.min(this.pageLinkSize,e);let n=Math.max(0,Math.ceil(this.page-t/2)),a=Math.min(e-1,n+t-1);const o=this.pageLinkSize-(a-n+1);return n=Math.max(0,n-o),[n,a]},pageLinks(){let e=[],t=this.calculatePageLinkBoundaries,n=t[0],a=t[1];for(var o=n;o<=a;o++)e.push(o+1);return e},currentState(){return{page:this.page,first:this.d_first,rows:this.d_rows}},empty(){return 0===this.pageCount},currentPage(){return this.pageCount>0?this.page+1:0}},components:{CurrentPageReport:p,FirstPageLink:c,LastPageLink:u,NextPageLink:h,PageLinks:k,PrevPageLink:f,RowsPerPageDropdown:v,JumpToPageDropdown:w,JumpToPageInput:C}};const B={key:0,class:"p-paginator p-component"},L={key:0,class:"p-paginator-left-content"},x={key:1,class:"p-paginator-right-content"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-paginator {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-paginator-left-content {\n\tmargin-right: auto;\n}\n.p-paginator-right-content {\n\tmargin-left: auto;\n}\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev,\n.p-paginator-current {\n cursor: pointer;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n line-height: 1;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n position: relative;\n}\n.p-paginator-element:focus {\n z-index: 1;\n position: relative;\n}\n"),y.render=function(t,n,a,o,r,i){const s=e.resolveComponent("FirstPageLink"),p=e.resolveComponent("PrevPageLink"),l=e.resolveComponent("NextPageLink"),c=e.resolveComponent("LastPageLink"),g=e.resolveComponent("PageLinks"),u=e.resolveComponent("CurrentPageReport"),d=e.resolveComponent("RowsPerPageDropdown"),h=e.resolveComponent("JumpToPageDropdown"),m=e.resolveComponent("JumpToPageInput");return a.alwaysShow||i.pageLinks&&i.pageLinks.length>1?(e.openBlock(),e.createBlock("div",B,[t.$slots.start?(e.openBlock(),e.createBlock("div",L,[e.renderSlot(t.$slots,"start",{state:i.currentState})])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(i.templateItems,(t=>(e.openBlock(),e.createBlock(e.Fragment,{key:t},["FirstPageLink"===t?(e.openBlock(),e.createBlock(s,{key:0,onClick:n[1]||(n[1]=e=>i.changePageToFirst(e)),disabled:i.isFirstPage||i.empty},null,8,["disabled"])):"PrevPageLink"===t?(e.openBlock(),e.createBlock(p,{key:1,onClick:n[2]||(n[2]=e=>i.changePageToPrev(e)),disabled:i.isFirstPage||i.empty},null,8,["disabled"])):"NextPageLink"===t?(e.openBlock(),e.createBlock(l,{key:2,onClick:n[3]||(n[3]=e=>i.changePageToNext(e)),disabled:i.isLastPage||i.empty},null,8,["disabled"])):"LastPageLink"===t?(e.openBlock(),e.createBlock(c,{key:3,onClick:n[4]||(n[4]=e=>i.changePageToLast(e)),disabled:i.isLastPage||i.empty},null,8,["disabled"])):"PageLinks"===t?(e.openBlock(),e.createBlock(g,{key:4,value:i.pageLinks,page:i.page,onClick:n[5]||(n[5]=e=>i.changePageLink(e))},null,8,["value","page"])):"CurrentPageReport"===t?(e.openBlock(),e.createBlock(u,{key:5,template:a.currentPageReportTemplate,currentPage:i.currentPage,page:i.page,pageCount:i.pageCount,first:r.d_first,rows:r.d_rows,totalRecords:a.totalRecords},null,8,["template","currentPage","page","pageCount","first","rows","totalRecords"])):"RowsPerPageDropdown"===t&&a.rowsPerPageOptions?(e.openBlock(),e.createBlock(d,{key:6,rows:r.d_rows,options:a.rowsPerPageOptions,onRowsChange:n[6]||(n[6]=e=>i.onRowChange(e)),disabled:i.empty},null,8,["rows","options","disabled"])):"JumpToPageDropdown"===t?(e.openBlock(),e.createBlock(h,{key:7,page:i.page,pageCount:i.pageCount,onPageChange:n[7]||(n[7]=e=>i.changePage(e)),disabled:i.empty},null,8,["page","pageCount","disabled"])):"JumpToPageInput"===t?(e.openBlock(),e.createBlock(m,{key:8,page:i.currentPage,onPageChange:n[8]||(n[8]=e=>i.changePage(e)),disabled:i.empty},null,8,["page","disabled"])):e.createCommentVNode("",!0)],64)))),128)),t.$slots.end?(e.openBlock(),e.createBlock("div",x,[e.renderSlot(t.$slots,"end",{state:i.currentState})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)},module.exports=y;
|
|
@@ -553,9 +553,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
553
553
|
|
|
554
554
|
return ($props.alwaysShow ? true : ($options.pageLinks && $options.pageLinks.length > 1))
|
|
555
555
|
? (openBlock(), createBlock("div", _hoisted_1, [
|
|
556
|
-
(_ctx.$slots.
|
|
556
|
+
(_ctx.$slots.start)
|
|
557
557
|
? (openBlock(), createBlock("div", _hoisted_2, [
|
|
558
|
-
renderSlot(_ctx.$slots, "
|
|
558
|
+
renderSlot(_ctx.$slots, "start", { state: $options.currentState })
|
|
559
559
|
]))
|
|
560
560
|
: createCommentVNode("", true),
|
|
561
561
|
(openBlock(true), createBlock(Fragment, null, renderList($options.templateItems, (item) => {
|
|
@@ -628,9 +628,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
628
628
|
: createCommentVNode("", true)
|
|
629
629
|
], 64))
|
|
630
630
|
}), 128)),
|
|
631
|
-
(_ctx.$slots.
|
|
631
|
+
(_ctx.$slots.end)
|
|
632
632
|
? (openBlock(), createBlock("div", _hoisted_3, [
|
|
633
|
-
renderSlot(_ctx.$slots, "
|
|
633
|
+
renderSlot(_ctx.$slots, "end", { state: $options.currentState })
|
|
634
634
|
]))
|
|
635
635
|
: createCommentVNode("", true)
|
|
636
636
|
]))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{openBlock as e,createBlock as t,toDisplayString as a,resolveDirective as n,withDirectives as i,createVNode as r,Fragment as s,renderList as o,createTextVNode as p,resolveComponent as l,renderSlot as g,createCommentVNode as u}from"vue";import d from"primevue/ripple";import c from"primevue/dropdown";import h from"primevue/inputnumber";var m={name:"CurrentPageReport",inheritAttrs:!1,props:{pageCount:{type:Number,default:0},currentPage:{type:Number,default:0},page:{type:Number,default:0},first:{type:Number,default:0},rows:{type:Number,default:0},totalRecords:{type:Number,default:0},template:{type:String,default:"({currentPage} of {totalPages})"}},computed:{text(){return this.template.replace("{currentPage}",this.currentPage).replace("{totalPages}",this.pageCount).replace("{first}",this.pageCount>0?this.first+1:0).replace("{last}",Math.min(this.first+this.rows,this.totalRecords)).replace("{rows}",this.rows).replace("{totalRecords}",this.totalRecords)}}};const P={class:"p-paginator-current"};m.render=function(n,i,r,s,o,p){return e(),t("span",P,a(p.text),1)};var f={name:"FirstPageLink",computed:{containerClass(){return["p-paginator-first p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:d}};const b=r("span",{class:"p-paginator-icon pi pi-angle-double-left"},null,-1);f.render=function(a,r,s,o,p,l){const g=n("ripple");return i((e(),t("button",{class:l.containerClass,type:"button"},[b],2)),[[g]])};var k={name:"LastPageLink",computed:{containerClass(){return["p-paginator-last p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:d}};const w=r("span",{class:"p-paginator-icon pi pi-angle-double-right"},null,-1);k.render=function(a,r,s,o,p,l){const g=n("ripple");return i((e(),t("button",{class:l.containerClass,type:"button"},[w],2)),[[g]])};var y={name:"NextPageLink",computed:{containerClass(){return["p-paginator-next p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:d}};const C=r("span",{class:"p-paginator-icon pi pi-angle-right"},null,-1);y.render=function(a,r,s,o,p,l){const g=n("ripple");return i((e(),t("button",{class:l.containerClass,type:"button"},[C],2)),[[g]])};var v={name:"PageLinks",inheritAttrs:!1,emits:["click"],props:{value:Array,page:Number},methods:{onPageLinkClick(e,t){this.$emit("click",{originalEvent:e,value:t})}},directives:{ripple:d}};const L={class:"p-paginator-pages"};v.render=function(r,l,g,u,d,c){const h=n("ripple");return e(),t("span",L,[(e(!0),t(s,null,o(g.value,(n=>i((e(),t("button",{key:n,class:["p-paginator-page p-paginator-element p-link",{"p-highlight":n-1===g.page}],type:"button",onClick:e=>c.onPageLinkClick(e,n)},[p(a(n),1)],10,["onClick"])),[[h]]))),128))])};var x={name:"PrevPageLink",computed:{containerClass(){return["p-paginator-prev p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:d}};const R=r("span",{class:"p-paginator-icon pi pi-angle-left"},null,-1);x.render=function(a,r,s,o,p,l){const g=n("ripple");return i((e(),t("button",{class:l.containerClass,type:"button"},[R],2)),[[g]])};var N={name:"RowsPerPageDropdown",inheritAttrs:!1,emits:["rows-change"],props:{options:Array,rows:Number,disabled:Boolean},methods:{onChange(e){this.$emit("rows-change",e)}},computed:{rowsOptions(){let e=[];if(this.options)for(let t=0;t<this.options.length;t++)e.push({label:String(this.options[t]),value:this.options[t]});return e}},components:{RPPDropdown:c}};N.render=function(a,n,i,r,s,o){const p=l("RPPDropdown");return e(),t(p,{modelValue:i.rows,options:o.rowsOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>o.onChange(e)),class:"p-paginator-rpp-options",disabled:i.disabled},null,8,["modelValue","options","disabled"])};var T={name:"JumpToPageDropdown",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e)}},computed:{pageOptions(){let e=[];for(let t=0;t<this.pageCount;t++)e.push({label:String(t+1),value:t});return e}},components:{JTPDropdown:c}};T.render=function(a,n,i,r,s,o){const p=l("JTPDropdown");return e(),t(p,{modelValue:i.page,options:o.pageOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>o.onChange(e)),class:"p-paginator-page-options",disabled:i.disabled},null,8,["modelValue","options","disabled"])};var _={name:"JumpToPageInput",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e-1)}},components:{JTPInput:h}};_.render=function(a,n,i,r,s,o){const p=l("JTPInput");return e(),t(p,{modelValue:i.page,"onUpdate:modelValue":n[1]||(n[1]=e=>o.onChange(e)),class:"p-paginator-page-input",disabled:i.disabled},null,8,["modelValue","disabled"])};var D={name:"Paginator",emits:["update:first","update:rows","page"],props:{totalRecords:{type:Number,default:0},rows:{type:Number,default:0},first:{type:Number,default:0},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},template:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},currentPageReportTemplate:{type:null,default:"({currentPage} of {totalPages})"},alwaysShow:{type:Boolean,default:!0}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(e){this.d_first=e},rows(e){this.d_rows=e},totalRecords(e){this.page>0&&e&&this.d_first>=e&&this.changePage(this.pageCount-1)}},methods:{changePage(e){const t=this.pageCount;if(e>=0&&e<t){this.d_first=this.d_rows*e;const a={page:e,first:this.d_first,rows:this.d_rows,pageCount:t};this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",a)}},changePageToFirst(e){this.isFirstPage||this.changePage(0),e.preventDefault()},changePageToPrev(e){this.changePage(this.page-1),e.preventDefault()},changePageLink(e){this.changePage(e.value-1),e.originalEvent.preventDefault()},changePageToNext(e){this.changePage(this.page+1),e.preventDefault()},changePageToLast(e){this.isLastPage||this.changePage(this.pageCount-1),e.preventDefault()},onRowChange(e){this.d_rows=e,this.changePage(this.page)}},computed:{templateItems(){let e=[];return this.template.split(" ").map((t=>{e.push(t.trim())})),e},page(){return Math.floor(this.d_first/this.d_rows)},pageCount(){return Math.ceil(this.totalRecords/this.d_rows)},isFirstPage(){return 0===this.page},isLastPage(){return this.page===this.pageCount-1},calculatePageLinkBoundaries(){const e=this.pageCount,t=Math.min(this.pageLinkSize,e);let a=Math.max(0,Math.ceil(this.page-t/2)),n=Math.min(e-1,a+t-1);const i=this.pageLinkSize-(n-a+1);return a=Math.max(0,a-i),[a,n]},pageLinks(){let e=[],t=this.calculatePageLinkBoundaries,a=t[0],n=t[1];for(var i=a;i<=n;i++)e.push(i+1);return e},currentState(){return{page:this.page,first:this.d_first,rows:this.d_rows}},empty(){return 0===this.pageCount},currentPage(){return this.pageCount>0?this.page+1:0}},components:{CurrentPageReport:m,FirstPageLink:f,LastPageLink:k,NextPageLink:y,PageLinks:v,PrevPageLink:x,RowsPerPageDropdown:N,JumpToPageDropdown:T,JumpToPageInput:_}};const $={key:0,class:"p-paginator p-component"},S={key:0,class:"p-paginator-left-content"},J={key:1,class:"p-paginator-right-content"};!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===a&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-paginator {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-paginator-left-content {\n\tmargin-right: auto;\n}\n.p-paginator-right-content {\n\tmargin-left: auto;\n}\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev,\n.p-paginator-current {\n cursor: pointer;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n line-height: 1;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n position: relative;\n}\n.p-paginator-element:focus {\n z-index: 1;\n position: relative;\n}\n"),D.render=function(a,n,i,r,p,d){const c=l("FirstPageLink"),h=l("PrevPageLink"),m=l("NextPageLink"),P=l("LastPageLink"),f=l("PageLinks"),b=l("CurrentPageReport"),k=l("RowsPerPageDropdown"),w=l("JumpToPageDropdown"),y=l("JumpToPageInput");return i.alwaysShow||d.pageLinks&&d.pageLinks.length>1?(e(),t("div",$,[a.$slots.left?(e(),t("div",S,[g(a.$slots,"left",{state:d.currentState})])):u("",!0),(e(!0),t(s,null,o(d.templateItems,(a=>(e(),t(s,{key:a},["FirstPageLink"===a?(e(),t(c,{key:0,onClick:n[1]||(n[1]=e=>d.changePageToFirst(e)),disabled:d.isFirstPage||d.empty},null,8,["disabled"])):"PrevPageLink"===a?(e(),t(h,{key:1,onClick:n[2]||(n[2]=e=>d.changePageToPrev(e)),disabled:d.isFirstPage||d.empty},null,8,["disabled"])):"NextPageLink"===a?(e(),t(m,{key:2,onClick:n[3]||(n[3]=e=>d.changePageToNext(e)),disabled:d.isLastPage||d.empty},null,8,["disabled"])):"LastPageLink"===a?(e(),t(P,{key:3,onClick:n[4]||(n[4]=e=>d.changePageToLast(e)),disabled:d.isLastPage||d.empty},null,8,["disabled"])):"PageLinks"===a?(e(),t(f,{key:4,value:d.pageLinks,page:d.page,onClick:n[5]||(n[5]=e=>d.changePageLink(e))},null,8,["value","page"])):"CurrentPageReport"===a?(e(),t(b,{key:5,template:i.currentPageReportTemplate,currentPage:d.currentPage,page:d.page,pageCount:d.pageCount,first:p.d_first,rows:p.d_rows,totalRecords:i.totalRecords},null,8,["template","currentPage","page","pageCount","first","rows","totalRecords"])):"RowsPerPageDropdown"===a&&i.rowsPerPageOptions?(e(),t(k,{key:6,rows:p.d_rows,options:i.rowsPerPageOptions,onRowsChange:n[6]||(n[6]=e=>d.onRowChange(e)),disabled:d.empty},null,8,["rows","options","disabled"])):"JumpToPageDropdown"===a?(e(),t(w,{key:7,page:d.page,pageCount:d.pageCount,onPageChange:n[7]||(n[7]=e=>d.changePage(e)),disabled:d.empty},null,8,["page","pageCount","disabled"])):"JumpToPageInput"===a?(e(),t(y,{key:8,page:d.currentPage,onPageChange:n[8]||(n[8]=e=>d.changePage(e)),disabled:d.empty},null,8,["page","disabled"])):u("",!0)],64)))),128)),a.$slots.right?(e(),t("div",J,[g(a.$slots,"right",{state:d.currentState})])):u("",!0)])):u("",!0)};export default D;
|
|
1
|
+
import{openBlock as e,createBlock as t,toDisplayString as a,resolveDirective as n,withDirectives as i,createVNode as r,Fragment as s,renderList as o,createTextVNode as p,resolveComponent as l,renderSlot as g,createCommentVNode as u}from"vue";import d from"primevue/ripple";import c from"primevue/dropdown";import h from"primevue/inputnumber";var m={name:"CurrentPageReport",inheritAttrs:!1,props:{pageCount:{type:Number,default:0},currentPage:{type:Number,default:0},page:{type:Number,default:0},first:{type:Number,default:0},rows:{type:Number,default:0},totalRecords:{type:Number,default:0},template:{type:String,default:"({currentPage} of {totalPages})"}},computed:{text(){return this.template.replace("{currentPage}",this.currentPage).replace("{totalPages}",this.pageCount).replace("{first}",this.pageCount>0?this.first+1:0).replace("{last}",Math.min(this.first+this.rows,this.totalRecords)).replace("{rows}",this.rows).replace("{totalRecords}",this.totalRecords)}}};const P={class:"p-paginator-current"};m.render=function(n,i,r,s,o,p){return e(),t("span",P,a(p.text),1)};var f={name:"FirstPageLink",computed:{containerClass(){return["p-paginator-first p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:d}};const b=r("span",{class:"p-paginator-icon pi pi-angle-double-left"},null,-1);f.render=function(a,r,s,o,p,l){const g=n("ripple");return i((e(),t("button",{class:l.containerClass,type:"button"},[b],2)),[[g]])};var k={name:"LastPageLink",computed:{containerClass(){return["p-paginator-last p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:d}};const w=r("span",{class:"p-paginator-icon pi pi-angle-double-right"},null,-1);k.render=function(a,r,s,o,p,l){const g=n("ripple");return i((e(),t("button",{class:l.containerClass,type:"button"},[w],2)),[[g]])};var y={name:"NextPageLink",computed:{containerClass(){return["p-paginator-next p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:d}};const C=r("span",{class:"p-paginator-icon pi pi-angle-right"},null,-1);y.render=function(a,r,s,o,p,l){const g=n("ripple");return i((e(),t("button",{class:l.containerClass,type:"button"},[C],2)),[[g]])};var v={name:"PageLinks",inheritAttrs:!1,emits:["click"],props:{value:Array,page:Number},methods:{onPageLinkClick(e,t){this.$emit("click",{originalEvent:e,value:t})}},directives:{ripple:d}};const L={class:"p-paginator-pages"};v.render=function(r,l,g,u,d,c){const h=n("ripple");return e(),t("span",L,[(e(!0),t(s,null,o(g.value,(n=>i((e(),t("button",{key:n,class:["p-paginator-page p-paginator-element p-link",{"p-highlight":n-1===g.page}],type:"button",onClick:e=>c.onPageLinkClick(e,n)},[p(a(n),1)],10,["onClick"])),[[h]]))),128))])};var x={name:"PrevPageLink",computed:{containerClass(){return["p-paginator-prev p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:d}};const R=r("span",{class:"p-paginator-icon pi pi-angle-left"},null,-1);x.render=function(a,r,s,o,p,l){const g=n("ripple");return i((e(),t("button",{class:l.containerClass,type:"button"},[R],2)),[[g]])};var N={name:"RowsPerPageDropdown",inheritAttrs:!1,emits:["rows-change"],props:{options:Array,rows:Number,disabled:Boolean},methods:{onChange(e){this.$emit("rows-change",e)}},computed:{rowsOptions(){let e=[];if(this.options)for(let t=0;t<this.options.length;t++)e.push({label:String(this.options[t]),value:this.options[t]});return e}},components:{RPPDropdown:c}};N.render=function(a,n,i,r,s,o){const p=l("RPPDropdown");return e(),t(p,{modelValue:i.rows,options:o.rowsOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>o.onChange(e)),class:"p-paginator-rpp-options",disabled:i.disabled},null,8,["modelValue","options","disabled"])};var T={name:"JumpToPageDropdown",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e)}},computed:{pageOptions(){let e=[];for(let t=0;t<this.pageCount;t++)e.push({label:String(t+1),value:t});return e}},components:{JTPDropdown:c}};T.render=function(a,n,i,r,s,o){const p=l("JTPDropdown");return e(),t(p,{modelValue:i.page,options:o.pageOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>o.onChange(e)),class:"p-paginator-page-options",disabled:i.disabled},null,8,["modelValue","options","disabled"])};var _={name:"JumpToPageInput",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e-1)}},components:{JTPInput:h}};_.render=function(a,n,i,r,s,o){const p=l("JTPInput");return e(),t(p,{modelValue:i.page,"onUpdate:modelValue":n[1]||(n[1]=e=>o.onChange(e)),class:"p-paginator-page-input",disabled:i.disabled},null,8,["modelValue","disabled"])};var D={name:"Paginator",emits:["update:first","update:rows","page"],props:{totalRecords:{type:Number,default:0},rows:{type:Number,default:0},first:{type:Number,default:0},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},template:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},currentPageReportTemplate:{type:null,default:"({currentPage} of {totalPages})"},alwaysShow:{type:Boolean,default:!0}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(e){this.d_first=e},rows(e){this.d_rows=e},totalRecords(e){this.page>0&&e&&this.d_first>=e&&this.changePage(this.pageCount-1)}},methods:{changePage(e){const t=this.pageCount;if(e>=0&&e<t){this.d_first=this.d_rows*e;const a={page:e,first:this.d_first,rows:this.d_rows,pageCount:t};this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",a)}},changePageToFirst(e){this.isFirstPage||this.changePage(0),e.preventDefault()},changePageToPrev(e){this.changePage(this.page-1),e.preventDefault()},changePageLink(e){this.changePage(e.value-1),e.originalEvent.preventDefault()},changePageToNext(e){this.changePage(this.page+1),e.preventDefault()},changePageToLast(e){this.isLastPage||this.changePage(this.pageCount-1),e.preventDefault()},onRowChange(e){this.d_rows=e,this.changePage(this.page)}},computed:{templateItems(){let e=[];return this.template.split(" ").map((t=>{e.push(t.trim())})),e},page(){return Math.floor(this.d_first/this.d_rows)},pageCount(){return Math.ceil(this.totalRecords/this.d_rows)},isFirstPage(){return 0===this.page},isLastPage(){return this.page===this.pageCount-1},calculatePageLinkBoundaries(){const e=this.pageCount,t=Math.min(this.pageLinkSize,e);let a=Math.max(0,Math.ceil(this.page-t/2)),n=Math.min(e-1,a+t-1);const i=this.pageLinkSize-(n-a+1);return a=Math.max(0,a-i),[a,n]},pageLinks(){let e=[],t=this.calculatePageLinkBoundaries,a=t[0],n=t[1];for(var i=a;i<=n;i++)e.push(i+1);return e},currentState(){return{page:this.page,first:this.d_first,rows:this.d_rows}},empty(){return 0===this.pageCount},currentPage(){return this.pageCount>0?this.page+1:0}},components:{CurrentPageReport:m,FirstPageLink:f,LastPageLink:k,NextPageLink:y,PageLinks:v,PrevPageLink:x,RowsPerPageDropdown:N,JumpToPageDropdown:T,JumpToPageInput:_}};const $={key:0,class:"p-paginator p-component"},S={key:0,class:"p-paginator-left-content"},J={key:1,class:"p-paginator-right-content"};!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===a&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-paginator {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-paginator-left-content {\n\tmargin-right: auto;\n}\n.p-paginator-right-content {\n\tmargin-left: auto;\n}\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev,\n.p-paginator-current {\n cursor: pointer;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n line-height: 1;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n position: relative;\n}\n.p-paginator-element:focus {\n z-index: 1;\n position: relative;\n}\n"),D.render=function(a,n,i,r,p,d){const c=l("FirstPageLink"),h=l("PrevPageLink"),m=l("NextPageLink"),P=l("LastPageLink"),f=l("PageLinks"),b=l("CurrentPageReport"),k=l("RowsPerPageDropdown"),w=l("JumpToPageDropdown"),y=l("JumpToPageInput");return i.alwaysShow||d.pageLinks&&d.pageLinks.length>1?(e(),t("div",$,[a.$slots.start?(e(),t("div",S,[g(a.$slots,"start",{state:d.currentState})])):u("",!0),(e(!0),t(s,null,o(d.templateItems,(a=>(e(),t(s,{key:a},["FirstPageLink"===a?(e(),t(c,{key:0,onClick:n[1]||(n[1]=e=>d.changePageToFirst(e)),disabled:d.isFirstPage||d.empty},null,8,["disabled"])):"PrevPageLink"===a?(e(),t(h,{key:1,onClick:n[2]||(n[2]=e=>d.changePageToPrev(e)),disabled:d.isFirstPage||d.empty},null,8,["disabled"])):"NextPageLink"===a?(e(),t(m,{key:2,onClick:n[3]||(n[3]=e=>d.changePageToNext(e)),disabled:d.isLastPage||d.empty},null,8,["disabled"])):"LastPageLink"===a?(e(),t(P,{key:3,onClick:n[4]||(n[4]=e=>d.changePageToLast(e)),disabled:d.isLastPage||d.empty},null,8,["disabled"])):"PageLinks"===a?(e(),t(f,{key:4,value:d.pageLinks,page:d.page,onClick:n[5]||(n[5]=e=>d.changePageLink(e))},null,8,["value","page"])):"CurrentPageReport"===a?(e(),t(b,{key:5,template:i.currentPageReportTemplate,currentPage:d.currentPage,page:d.page,pageCount:d.pageCount,first:p.d_first,rows:p.d_rows,totalRecords:i.totalRecords},null,8,["template","currentPage","page","pageCount","first","rows","totalRecords"])):"RowsPerPageDropdown"===a&&i.rowsPerPageOptions?(e(),t(k,{key:6,rows:p.d_rows,options:i.rowsPerPageOptions,onRowsChange:n[6]||(n[6]=e=>d.onRowChange(e)),disabled:d.empty},null,8,["rows","options","disabled"])):"JumpToPageDropdown"===a?(e(),t(w,{key:7,page:d.page,pageCount:d.pageCount,onPageChange:n[7]||(n[7]=e=>d.changePage(e)),disabled:d.empty},null,8,["page","pageCount","disabled"])):"JumpToPageInput"===a?(e(),t(y,{key:8,page:d.currentPage,onPageChange:n[8]||(n[8]=e=>d.changePage(e)),disabled:d.empty},null,8,["page","disabled"])):u("",!0)],64)))),128)),a.$slots.end?(e(),t("div",J,[g(a.$slots,"end",{state:d.currentState})])):u("",!0)])):u("",!0)};export default D;
|
package/paginator/paginator.js
CHANGED
|
@@ -558,9 +558,9 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
558
558
|
|
|
559
559
|
return ($props.alwaysShow ? true : ($options.pageLinks && $options.pageLinks.length > 1))
|
|
560
560
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
|
|
561
|
-
(_ctx.$slots.
|
|
561
|
+
(_ctx.$slots.start)
|
|
562
562
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_2, [
|
|
563
|
-
vue.renderSlot(_ctx.$slots, "
|
|
563
|
+
vue.renderSlot(_ctx.$slots, "start", { state: $options.currentState })
|
|
564
564
|
]))
|
|
565
565
|
: vue.createCommentVNode("", true),
|
|
566
566
|
(vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($options.templateItems, (item) => {
|
|
@@ -633,9 +633,9 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
633
633
|
: vue.createCommentVNode("", true)
|
|
634
634
|
], 64))
|
|
635
635
|
}), 128)),
|
|
636
|
-
(_ctx.$slots.
|
|
636
|
+
(_ctx.$slots.end)
|
|
637
637
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_3, [
|
|
638
|
-
vue.renderSlot(_ctx.$slots, "
|
|
638
|
+
vue.renderSlot(_ctx.$slots, "end", { state: $options.currentState })
|
|
639
639
|
]))
|
|
640
640
|
: vue.createCommentVNode("", true)
|
|
641
641
|
]))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.paginator=function(e,t,n,a){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(t),i=o(n),s=o(a),p={name:"CurrentPageReport",inheritAttrs:!1,props:{pageCount:{type:Number,default:0},currentPage:{type:Number,default:0},page:{type:Number,default:0},first:{type:Number,default:0},rows:{type:Number,default:0},totalRecords:{type:Number,default:0},template:{type:String,default:"({currentPage} of {totalPages})"}},computed:{text(){return this.template.replace("{currentPage}",this.currentPage).replace("{totalPages}",this.pageCount).replace("{first}",this.pageCount>0?this.first+1:0).replace("{last}",Math.min(this.first+this.rows,this.totalRecords)).replace("{rows}",this.rows).replace("{totalRecords}",this.totalRecords)}}};const l={class:"p-paginator-current"};p.render=function(t,n,a,o,r,i){return e.openBlock(),e.createBlock("span",l,e.toDisplayString(i.text),1)};var c={name:"FirstPageLink",computed:{containerClass(){return["p-paginator-first p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const g=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-double-left"},null,-1);c.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[g],2)),[[s]])};var u={name:"LastPageLink",computed:{containerClass(){return["p-paginator-last p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const d=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-double-right"},null,-1);u.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[d],2)),[[s]])};var h={name:"NextPageLink",computed:{containerClass(){return["p-paginator-next p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const m=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-right"},null,-1);h.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[m],2)),[[s]])};var k={name:"PageLinks",inheritAttrs:!1,emits:["click"],props:{value:Array,page:Number},methods:{onPageLinkClick(e,t){this.$emit("click",{originalEvent:e,value:t})}},directives:{ripple:r.default}};const P={class:"p-paginator-pages"};k.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.openBlock(),e.createBlock("span",P,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.value,(t=>e.withDirectives((e.openBlock(),e.createBlock("button",{key:t,class:["p-paginator-page p-paginator-element p-link",{"p-highlight":t-1===a.page}],type:"button",onClick:e=>i.onPageLinkClick(e,t)},[e.createTextVNode(e.toDisplayString(t),1)],10,["onClick"])),[[s]]))),128))])};var f={name:"PrevPageLink",computed:{containerClass(){return["p-paginator-prev p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const b=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-left"},null,-1);f.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[b],2)),[[s]])};var v={name:"RowsPerPageDropdown",inheritAttrs:!1,emits:["rows-change"],props:{options:Array,rows:Number,disabled:Boolean},methods:{onChange(e){this.$emit("rows-change",e)}},computed:{rowsOptions(){let e=[];if(this.options)for(let t=0;t<this.options.length;t++)e.push({label:String(this.options[t]),value:this.options[t]});return e}},components:{RPPDropdown:i.default}};v.render=function(t,n,a,o,r,i){const s=e.resolveComponent("RPPDropdown");return e.openBlock(),e.createBlock(s,{modelValue:a.rows,options:i.rowsOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-rpp-options",disabled:a.disabled},null,8,["modelValue","options","disabled"])};var w={name:"JumpToPageDropdown",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e)}},computed:{pageOptions(){let e=[];for(let t=0;t<this.pageCount;t++)e.push({label:String(t+1),value:t});return e}},components:{JTPDropdown:i.default}};w.render=function(t,n,a,o,r,i){const s=e.resolveComponent("JTPDropdown");return e.openBlock(),e.createBlock(s,{modelValue:a.page,options:i.pageOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-page-options",disabled:a.disabled},null,8,["modelValue","options","disabled"])};var C={name:"JumpToPageInput",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e-1)}},components:{JTPInput:s.default}};C.render=function(t,n,a,o,r,i){const s=e.resolveComponent("JTPInput");return e.openBlock(),e.createBlock(s,{modelValue:a.page,"onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-page-input",disabled:a.disabled},null,8,["modelValue","disabled"])};var y={name:"Paginator",emits:["update:first","update:rows","page"],props:{totalRecords:{type:Number,default:0},rows:{type:Number,default:0},first:{type:Number,default:0},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},template:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},currentPageReportTemplate:{type:null,default:"({currentPage} of {totalPages})"},alwaysShow:{type:Boolean,default:!0}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(e){this.d_first=e},rows(e){this.d_rows=e},totalRecords(e){this.page>0&&e&&this.d_first>=e&&this.changePage(this.pageCount-1)}},methods:{changePage(e){const t=this.pageCount;if(e>=0&&e<t){this.d_first=this.d_rows*e;const n={page:e,first:this.d_first,rows:this.d_rows,pageCount:t};this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",n)}},changePageToFirst(e){this.isFirstPage||this.changePage(0),e.preventDefault()},changePageToPrev(e){this.changePage(this.page-1),e.preventDefault()},changePageLink(e){this.changePage(e.value-1),e.originalEvent.preventDefault()},changePageToNext(e){this.changePage(this.page+1),e.preventDefault()},changePageToLast(e){this.isLastPage||this.changePage(this.pageCount-1),e.preventDefault()},onRowChange(e){this.d_rows=e,this.changePage(this.page)}},computed:{templateItems(){let e=[];return this.template.split(" ").map((t=>{e.push(t.trim())})),e},page(){return Math.floor(this.d_first/this.d_rows)},pageCount(){return Math.ceil(this.totalRecords/this.d_rows)},isFirstPage(){return 0===this.page},isLastPage(){return this.page===this.pageCount-1},calculatePageLinkBoundaries(){const e=this.pageCount,t=Math.min(this.pageLinkSize,e);let n=Math.max(0,Math.ceil(this.page-t/2)),a=Math.min(e-1,n+t-1);const o=this.pageLinkSize-(a-n+1);return n=Math.max(0,n-o),[n,a]},pageLinks(){let e=[],t=this.calculatePageLinkBoundaries,n=t[0],a=t[1];for(var o=n;o<=a;o++)e.push(o+1);return e},currentState(){return{page:this.page,first:this.d_first,rows:this.d_rows}},empty(){return 0===this.pageCount},currentPage(){return this.pageCount>0?this.page+1:0}},components:{CurrentPageReport:p,FirstPageLink:c,LastPageLink:u,NextPageLink:h,PageLinks:k,PrevPageLink:f,RowsPerPageDropdown:v,JumpToPageDropdown:w,JumpToPageInput:C}};const B={key:0,class:"p-paginator p-component"},L={key:0,class:"p-paginator-left-content"},x={key:1,class:"p-paginator-right-content"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-paginator {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-paginator-left-content {\n\tmargin-right: auto;\n}\n.p-paginator-right-content {\n\tmargin-left: auto;\n}\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev,\n.p-paginator-current {\n cursor: pointer;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n line-height: 1;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n position: relative;\n}\n.p-paginator-element:focus {\n z-index: 1;\n position: relative;\n}\n"),y.render=function(t,n,a,o,r,i){const s=e.resolveComponent("FirstPageLink"),p=e.resolveComponent("PrevPageLink"),l=e.resolveComponent("NextPageLink"),c=e.resolveComponent("LastPageLink"),g=e.resolveComponent("PageLinks"),u=e.resolveComponent("CurrentPageReport"),d=e.resolveComponent("RowsPerPageDropdown"),h=e.resolveComponent("JumpToPageDropdown"),m=e.resolveComponent("JumpToPageInput");return a.alwaysShow||i.pageLinks&&i.pageLinks.length>1?(e.openBlock(),e.createBlock("div",B,[t.$slots.left?(e.openBlock(),e.createBlock("div",L,[e.renderSlot(t.$slots,"left",{state:i.currentState})])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(i.templateItems,(t=>(e.openBlock(),e.createBlock(e.Fragment,{key:t},["FirstPageLink"===t?(e.openBlock(),e.createBlock(s,{key:0,onClick:n[1]||(n[1]=e=>i.changePageToFirst(e)),disabled:i.isFirstPage||i.empty},null,8,["disabled"])):"PrevPageLink"===t?(e.openBlock(),e.createBlock(p,{key:1,onClick:n[2]||(n[2]=e=>i.changePageToPrev(e)),disabled:i.isFirstPage||i.empty},null,8,["disabled"])):"NextPageLink"===t?(e.openBlock(),e.createBlock(l,{key:2,onClick:n[3]||(n[3]=e=>i.changePageToNext(e)),disabled:i.isLastPage||i.empty},null,8,["disabled"])):"LastPageLink"===t?(e.openBlock(),e.createBlock(c,{key:3,onClick:n[4]||(n[4]=e=>i.changePageToLast(e)),disabled:i.isLastPage||i.empty},null,8,["disabled"])):"PageLinks"===t?(e.openBlock(),e.createBlock(g,{key:4,value:i.pageLinks,page:i.page,onClick:n[5]||(n[5]=e=>i.changePageLink(e))},null,8,["value","page"])):"CurrentPageReport"===t?(e.openBlock(),e.createBlock(u,{key:5,template:a.currentPageReportTemplate,currentPage:i.currentPage,page:i.page,pageCount:i.pageCount,first:r.d_first,rows:r.d_rows,totalRecords:a.totalRecords},null,8,["template","currentPage","page","pageCount","first","rows","totalRecords"])):"RowsPerPageDropdown"===t&&a.rowsPerPageOptions?(e.openBlock(),e.createBlock(d,{key:6,rows:r.d_rows,options:a.rowsPerPageOptions,onRowsChange:n[6]||(n[6]=e=>i.onRowChange(e)),disabled:i.empty},null,8,["rows","options","disabled"])):"JumpToPageDropdown"===t?(e.openBlock(),e.createBlock(h,{key:7,page:i.page,pageCount:i.pageCount,onPageChange:n[7]||(n[7]=e=>i.changePage(e)),disabled:i.empty},null,8,["page","pageCount","disabled"])):"JumpToPageInput"===t?(e.openBlock(),e.createBlock(m,{key:8,page:i.currentPage,onPageChange:n[8]||(n[8]=e=>i.changePage(e)),disabled:i.empty},null,8,["page","disabled"])):e.createCommentVNode("",!0)],64)))),128)),t.$slots.right?(e.openBlock(),e.createBlock("div",x,[e.renderSlot(t.$slots,"right",{state:i.currentState})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)},y}(Vue,primevue.ripple,primevue.dropdown,primevue.inputnumber);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.paginator=function(e,t,n,a){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(t),i=o(n),s=o(a),p={name:"CurrentPageReport",inheritAttrs:!1,props:{pageCount:{type:Number,default:0},currentPage:{type:Number,default:0},page:{type:Number,default:0},first:{type:Number,default:0},rows:{type:Number,default:0},totalRecords:{type:Number,default:0},template:{type:String,default:"({currentPage} of {totalPages})"}},computed:{text(){return this.template.replace("{currentPage}",this.currentPage).replace("{totalPages}",this.pageCount).replace("{first}",this.pageCount>0?this.first+1:0).replace("{last}",Math.min(this.first+this.rows,this.totalRecords)).replace("{rows}",this.rows).replace("{totalRecords}",this.totalRecords)}}};const l={class:"p-paginator-current"};p.render=function(t,n,a,o,r,i){return e.openBlock(),e.createBlock("span",l,e.toDisplayString(i.text),1)};var c={name:"FirstPageLink",computed:{containerClass(){return["p-paginator-first p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const g=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-double-left"},null,-1);c.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[g],2)),[[s]])};var u={name:"LastPageLink",computed:{containerClass(){return["p-paginator-last p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const d=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-double-right"},null,-1);u.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[d],2)),[[s]])};var h={name:"NextPageLink",computed:{containerClass(){return["p-paginator-next p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const m=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-right"},null,-1);h.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[m],2)),[[s]])};var k={name:"PageLinks",inheritAttrs:!1,emits:["click"],props:{value:Array,page:Number},methods:{onPageLinkClick(e,t){this.$emit("click",{originalEvent:e,value:t})}},directives:{ripple:r.default}};const P={class:"p-paginator-pages"};k.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.openBlock(),e.createBlock("span",P,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.value,(t=>e.withDirectives((e.openBlock(),e.createBlock("button",{key:t,class:["p-paginator-page p-paginator-element p-link",{"p-highlight":t-1===a.page}],type:"button",onClick:e=>i.onPageLinkClick(e,t)},[e.createTextVNode(e.toDisplayString(t),1)],10,["onClick"])),[[s]]))),128))])};var f={name:"PrevPageLink",computed:{containerClass(){return["p-paginator-prev p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},directives:{ripple:r.default}};const b=e.createVNode("span",{class:"p-paginator-icon pi pi-angle-left"},null,-1);f.render=function(t,n,a,o,r,i){const s=e.resolveDirective("ripple");return e.withDirectives((e.openBlock(),e.createBlock("button",{class:i.containerClass,type:"button"},[b],2)),[[s]])};var v={name:"RowsPerPageDropdown",inheritAttrs:!1,emits:["rows-change"],props:{options:Array,rows:Number,disabled:Boolean},methods:{onChange(e){this.$emit("rows-change",e)}},computed:{rowsOptions(){let e=[];if(this.options)for(let t=0;t<this.options.length;t++)e.push({label:String(this.options[t]),value:this.options[t]});return e}},components:{RPPDropdown:i.default}};v.render=function(t,n,a,o,r,i){const s=e.resolveComponent("RPPDropdown");return e.openBlock(),e.createBlock(s,{modelValue:a.rows,options:i.rowsOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-rpp-options",disabled:a.disabled},null,8,["modelValue","options","disabled"])};var w={name:"JumpToPageDropdown",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e)}},computed:{pageOptions(){let e=[];for(let t=0;t<this.pageCount;t++)e.push({label:String(t+1),value:t});return e}},components:{JTPDropdown:i.default}};w.render=function(t,n,a,o,r,i){const s=e.resolveComponent("JTPDropdown");return e.openBlock(),e.createBlock(s,{modelValue:a.page,options:i.pageOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-page-options",disabled:a.disabled},null,8,["modelValue","options","disabled"])};var C={name:"JumpToPageInput",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},methods:{onChange(e){this.$emit("page-change",e-1)}},components:{JTPInput:s.default}};C.render=function(t,n,a,o,r,i){const s=e.resolveComponent("JTPInput");return e.openBlock(),e.createBlock(s,{modelValue:a.page,"onUpdate:modelValue":n[1]||(n[1]=e=>i.onChange(e)),class:"p-paginator-page-input",disabled:a.disabled},null,8,["modelValue","disabled"])};var y={name:"Paginator",emits:["update:first","update:rows","page"],props:{totalRecords:{type:Number,default:0},rows:{type:Number,default:0},first:{type:Number,default:0},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},template:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},currentPageReportTemplate:{type:null,default:"({currentPage} of {totalPages})"},alwaysShow:{type:Boolean,default:!0}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(e){this.d_first=e},rows(e){this.d_rows=e},totalRecords(e){this.page>0&&e&&this.d_first>=e&&this.changePage(this.pageCount-1)}},methods:{changePage(e){const t=this.pageCount;if(e>=0&&e<t){this.d_first=this.d_rows*e;const n={page:e,first:this.d_first,rows:this.d_rows,pageCount:t};this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",n)}},changePageToFirst(e){this.isFirstPage||this.changePage(0),e.preventDefault()},changePageToPrev(e){this.changePage(this.page-1),e.preventDefault()},changePageLink(e){this.changePage(e.value-1),e.originalEvent.preventDefault()},changePageToNext(e){this.changePage(this.page+1),e.preventDefault()},changePageToLast(e){this.isLastPage||this.changePage(this.pageCount-1),e.preventDefault()},onRowChange(e){this.d_rows=e,this.changePage(this.page)}},computed:{templateItems(){let e=[];return this.template.split(" ").map((t=>{e.push(t.trim())})),e},page(){return Math.floor(this.d_first/this.d_rows)},pageCount(){return Math.ceil(this.totalRecords/this.d_rows)},isFirstPage(){return 0===this.page},isLastPage(){return this.page===this.pageCount-1},calculatePageLinkBoundaries(){const e=this.pageCount,t=Math.min(this.pageLinkSize,e);let n=Math.max(0,Math.ceil(this.page-t/2)),a=Math.min(e-1,n+t-1);const o=this.pageLinkSize-(a-n+1);return n=Math.max(0,n-o),[n,a]},pageLinks(){let e=[],t=this.calculatePageLinkBoundaries,n=t[0],a=t[1];for(var o=n;o<=a;o++)e.push(o+1);return e},currentState(){return{page:this.page,first:this.d_first,rows:this.d_rows}},empty(){return 0===this.pageCount},currentPage(){return this.pageCount>0?this.page+1:0}},components:{CurrentPageReport:p,FirstPageLink:c,LastPageLink:u,NextPageLink:h,PageLinks:k,PrevPageLink:f,RowsPerPageDropdown:v,JumpToPageDropdown:w,JumpToPageInput:C}};const B={key:0,class:"p-paginator p-component"},L={key:0,class:"p-paginator-left-content"},x={key:1,class:"p-paginator-right-content"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-paginator {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-paginator-left-content {\n\tmargin-right: auto;\n}\n.p-paginator-right-content {\n\tmargin-left: auto;\n}\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev,\n.p-paginator-current {\n cursor: pointer;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n line-height: 1;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n position: relative;\n}\n.p-paginator-element:focus {\n z-index: 1;\n position: relative;\n}\n"),y.render=function(t,n,a,o,r,i){const s=e.resolveComponent("FirstPageLink"),p=e.resolveComponent("PrevPageLink"),l=e.resolveComponent("NextPageLink"),c=e.resolveComponent("LastPageLink"),g=e.resolveComponent("PageLinks"),u=e.resolveComponent("CurrentPageReport"),d=e.resolveComponent("RowsPerPageDropdown"),h=e.resolveComponent("JumpToPageDropdown"),m=e.resolveComponent("JumpToPageInput");return a.alwaysShow||i.pageLinks&&i.pageLinks.length>1?(e.openBlock(),e.createBlock("div",B,[t.$slots.start?(e.openBlock(),e.createBlock("div",L,[e.renderSlot(t.$slots,"start",{state:i.currentState})])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(i.templateItems,(t=>(e.openBlock(),e.createBlock(e.Fragment,{key:t},["FirstPageLink"===t?(e.openBlock(),e.createBlock(s,{key:0,onClick:n[1]||(n[1]=e=>i.changePageToFirst(e)),disabled:i.isFirstPage||i.empty},null,8,["disabled"])):"PrevPageLink"===t?(e.openBlock(),e.createBlock(p,{key:1,onClick:n[2]||(n[2]=e=>i.changePageToPrev(e)),disabled:i.isFirstPage||i.empty},null,8,["disabled"])):"NextPageLink"===t?(e.openBlock(),e.createBlock(l,{key:2,onClick:n[3]||(n[3]=e=>i.changePageToNext(e)),disabled:i.isLastPage||i.empty},null,8,["disabled"])):"LastPageLink"===t?(e.openBlock(),e.createBlock(c,{key:3,onClick:n[4]||(n[4]=e=>i.changePageToLast(e)),disabled:i.isLastPage||i.empty},null,8,["disabled"])):"PageLinks"===t?(e.openBlock(),e.createBlock(g,{key:4,value:i.pageLinks,page:i.page,onClick:n[5]||(n[5]=e=>i.changePageLink(e))},null,8,["value","page"])):"CurrentPageReport"===t?(e.openBlock(),e.createBlock(u,{key:5,template:a.currentPageReportTemplate,currentPage:i.currentPage,page:i.page,pageCount:i.pageCount,first:r.d_first,rows:r.d_rows,totalRecords:a.totalRecords},null,8,["template","currentPage","page","pageCount","first","rows","totalRecords"])):"RowsPerPageDropdown"===t&&a.rowsPerPageOptions?(e.openBlock(),e.createBlock(d,{key:6,rows:r.d_rows,options:a.rowsPerPageOptions,onRowsChange:n[6]||(n[6]=e=>i.onRowChange(e)),disabled:i.empty},null,8,["rows","options","disabled"])):"JumpToPageDropdown"===t?(e.openBlock(),e.createBlock(h,{key:7,page:i.page,pageCount:i.pageCount,onPageChange:n[7]||(n[7]=e=>i.changePage(e)),disabled:i.empty},null,8,["page","pageCount","disabled"])):"JumpToPageInput"===t?(e.openBlock(),e.createBlock(m,{key:8,page:i.currentPage,onPageChange:n[8]||(n[8]=e=>i.changePage(e)),disabled:i.empty},null,8,["page","disabled"])):e.createCommentVNode("",!0)],64)))),128)),t.$slots.end?(e.openBlock(),e.createBlock("div",x,[e.renderSlot(t.$slots,"end",{state:i.currentState})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)},y}(Vue,primevue.ripple,primevue.dropdown,primevue.inputnumber);
|
package/panel/Panel.d.ts
CHANGED
package/panel/Panel.vue
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<span class="p-panel-title" v-if="header" :id="ariaId + '_header'">{{header}}</span>
|
|
6
6
|
</slot>
|
|
7
7
|
<div class="p-panel-icons">
|
|
8
|
-
|
|
8
|
+
<slot name="icons"></slot>
|
|
9
9
|
<button v-if="toggleable" class="p-panel-header-icon p-panel-toggler p-link" @click="toggle" type="button"
|
|
10
10
|
:id="ariaId + '_header'" :aria-controls="ariaId + '_content'" :aria-expanded="!d_collapsed" v-ripple>
|
|
11
11
|
<span :class="{'pi pi-minus': !d_collapsed, 'pi pi-plus': d_collapsed}"></span>
|
package/panelmenu/PanelMenu.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { VNode } from 'vue';
|
|
2
|
-
|
|
3
1
|
interface PanelMenuProps {
|
|
4
2
|
model?: any[];
|
|
5
3
|
expandedKeys?: any;
|
|
6
4
|
exact?: boolean;
|
|
7
5
|
}
|
|
8
6
|
|
|
7
|
+
interface PanelMenuItemSlotInterface {
|
|
8
|
+
item: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
9
11
|
declare class PanelMenu {
|
|
10
12
|
$props: PanelMenuProps;
|
|
11
13
|
$emit(eventName: 'update:expandedKeys', value: any): this;
|
|
12
14
|
$slots: {
|
|
13
|
-
item:
|
|
15
|
+
item: PanelMenuItemSlotInterface;
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
|
package/panelmenu/PanelMenu.vue
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="p-panelmenu p-component">
|
|
3
|
-
<template v-for="(item, index) of model" :key="item
|
|
3
|
+
<template v-for="(item, index) of model" :key="label(item) + '_' + index">
|
|
4
4
|
<div v-if="visible(item)" :class="getPanelClass(item)" :style="item.style">
|
|
5
5
|
<div :class="getHeaderClass(item)" :style="item.style">
|
|
6
6
|
<template v-if="!$slots.item">
|
|
7
7
|
<router-link v-if="item.to && !disabled(item)" :to="item.to" custom v-slot="{navigate, href, isActive, isExactActive}">
|
|
8
8
|
<a :href="href" :class="getHeaderLinkClass(item, {isActive, isExactActive})" @click="onItemClick($event, item, navigate)" role="treeitem">
|
|
9
9
|
<span v-if="item.icon" :class="getPanelIcon(item)"></span>
|
|
10
|
-
<span class="p-menuitem-text">{{item
|
|
10
|
+
<span class="p-menuitem-text">{{label(item)}}</span>
|
|
11
11
|
</a>
|
|
12
12
|
</router-link>
|
|
13
13
|
<a v-else :href="item.url" :class="getHeaderLinkClass(item)" @click="onItemClick($event, item)" :tabindex="disabled(item) ? null : '0'"
|
|
14
14
|
:aria-expanded="isActive(item)" :id="ariaId +'_header'" :aria-controls="ariaId +'_content'">
|
|
15
15
|
<span v-if="item.items" :class="getPanelToggleIcon(item)"></span>
|
|
16
16
|
<span v-if="item.icon" :class="getPanelIcon(item)"></span>
|
|
17
|
-
<span class="p-menuitem-text">{{item
|
|
17
|
+
<span class="p-menuitem-text">{{label(item)}}</span>
|
|
18
18
|
</a>
|
|
19
19
|
</template>
|
|
20
20
|
<component v-else :is="$slots.item" :item="item"></component>
|
|
@@ -128,6 +128,9 @@ export default {
|
|
|
128
128
|
},
|
|
129
129
|
disabled(item) {
|
|
130
130
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
131
|
+
},
|
|
132
|
+
label(item) {
|
|
133
|
+
return (typeof item.label === 'function' ? item.label() : item.label);
|
|
131
134
|
}
|
|
132
135
|
},
|
|
133
136
|
components: {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ul class="p-submenu-list" role="tree">
|
|
3
|
-
<template v-for="(item, i) of model" :key="item
|
|
3
|
+
<template v-for="(item, i) of model" :key="label(item) + i.toString()">
|
|
4
4
|
<li role="none" :class="getItemClass(item)" :style="item.style" v-if="visible(item) && !item.separator">
|
|
5
5
|
<template v-if="!template">
|
|
6
6
|
<router-link v-if="item.to && !disabled(item)" :to="item.to" custom v-slot="{navigate, href, isActive:isRouterActive, isExactActive}">
|
|
7
7
|
<a :href="href" :class="linkClass(item, {isRouterActive, isExactActive})" @click="onItemClick($event, item, navigate)" role="treeitem" :aria-expanded="isActive(item)">
|
|
8
8
|
<span :class="['p-menuitem-icon', item.icon]"></span>
|
|
9
|
-
<span class="p-menuitem-text">{{item
|
|
9
|
+
<span class="p-menuitem-text">{{label(item)}}</span>
|
|
10
10
|
</a>
|
|
11
11
|
</router-link>
|
|
12
12
|
<a v-else :href="item.url" :class="linkClass(item)" :target="item.target" @click="onItemClick($event, item)"
|
|
13
13
|
role="treeitem" :aria-expanded="isActive(item)" :tabindex="disabled(item) ? null : '0'">
|
|
14
14
|
<span :class="getSubmenuIcon(item)" v-if="item.items"></span>
|
|
15
15
|
<span :class="['p-menuitem-icon', item.icon]"></span>
|
|
16
|
-
<span class="p-menuitem-text">{{item
|
|
16
|
+
<span class="p-menuitem-text">{{label(item)}}</span>
|
|
17
17
|
</a>
|
|
18
18
|
</template>
|
|
19
19
|
<component v-else :is="template" :item="item"></component>
|
|
20
20
|
<transition name="p-toggleable-content">
|
|
21
21
|
<div class="p-toggleable-content" v-show="isActive(item)">
|
|
22
|
-
<PanelMenuSub :model="item.items" v-if="visible(item) && item.items" :key="item
|
|
22
|
+
<PanelMenuSub :model="item.items" v-if="visible(item) && item.items" :key="label(item) + '_sub_'" :template="template"
|
|
23
23
|
:expandedKeys="expandedKeys" @item-toggle="$emit('item-toggle', $event)" :exact="exact"/>
|
|
24
24
|
</div>
|
|
25
25
|
</transition>
|
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
default: null
|
|
40
40
|
},
|
|
41
41
|
template: {
|
|
42
|
-
type:
|
|
42
|
+
type: Function,
|
|
43
43
|
default: null
|
|
44
44
|
},
|
|
45
45
|
expandedKeys: {
|
|
@@ -107,6 +107,9 @@ export default {
|
|
|
107
107
|
},
|
|
108
108
|
disabled(item) {
|
|
109
109
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
110
|
+
},
|
|
111
|
+
label(item) {
|
|
112
|
+
return (typeof item.label === 'function' ? item.label() : item.label);
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
115
|
}
|
|
@@ -12,7 +12,7 @@ var script$1 = {
|
|
|
12
12
|
default: null
|
|
13
13
|
},
|
|
14
14
|
template: {
|
|
15
|
-
type:
|
|
15
|
+
type: Function,
|
|
16
16
|
default: null
|
|
17
17
|
},
|
|
18
18
|
expandedKeys: {
|
|
@@ -80,6 +80,9 @@ var script$1 = {
|
|
|
80
80
|
},
|
|
81
81
|
disabled(item) {
|
|
82
82
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
83
|
+
},
|
|
84
|
+
label(item) {
|
|
85
|
+
return (typeof item.label === 'function' ? item.label() : item.label);
|
|
83
86
|
}
|
|
84
87
|
}
|
|
85
88
|
};
|
|
@@ -99,7 +102,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
99
102
|
return (vue.openBlock(), vue.createBlock("ul", _hoisted_1$1, [
|
|
100
103
|
(vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($props.model, (item, i) => {
|
|
101
104
|
return (vue.openBlock(), vue.createBlock(vue.Fragment, {
|
|
102
|
-
key:
|
|
105
|
+
key: $options.label(item) + i.toString()
|
|
103
106
|
}, [
|
|
104
107
|
($options.visible(item) && !item.separator)
|
|
105
108
|
? (vue.openBlock(), vue.createBlock("li", {
|
|
@@ -127,7 +130,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
127
130
|
vue.createVNode("span", {
|
|
128
131
|
class: ['p-menuitem-icon', item.icon]
|
|
129
132
|
}, null, 2),
|
|
130
|
-
vue.createVNode("span", _hoisted_2$1, vue.toDisplayString(
|
|
133
|
+
vue.createVNode("span", _hoisted_2$1, vue.toDisplayString($options.label(item)), 1)
|
|
131
134
|
], 10, ["href", "onClick", "aria-expanded"])
|
|
132
135
|
]),
|
|
133
136
|
_: 2
|
|
@@ -151,7 +154,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
151
154
|
vue.createVNode("span", {
|
|
152
155
|
class: ['p-menuitem-icon', item.icon]
|
|
153
156
|
}, null, 2),
|
|
154
|
-
vue.createVNode("span", _hoisted_3$1, vue.toDisplayString(
|
|
157
|
+
vue.createVNode("span", _hoisted_3$1, vue.toDisplayString($options.label(item)), 1)
|
|
155
158
|
], 10, ["href", "target", "onClick", "aria-expanded", "tabindex"]))
|
|
156
159
|
], 64))
|
|
157
160
|
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.template), {
|
|
@@ -164,7 +167,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
164
167
|
($options.visible(item) && item.items)
|
|
165
168
|
? (vue.openBlock(), vue.createBlock(_component_PanelMenuSub, {
|
|
166
169
|
model: item.items,
|
|
167
|
-
key:
|
|
170
|
+
key: $options.label(item) + '_sub_',
|
|
168
171
|
template: $props.template,
|
|
169
172
|
expandedKeys: $props.expandedKeys,
|
|
170
173
|
onItemToggle: _cache[1] || (_cache[1] = $event => (_ctx.$emit('item-toggle', $event))),
|
|
@@ -284,6 +287,9 @@ var script = {
|
|
|
284
287
|
},
|
|
285
288
|
disabled(item) {
|
|
286
289
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
290
|
+
},
|
|
291
|
+
label(item) {
|
|
292
|
+
return (typeof item.label === 'function' ? item.label() : item.label);
|
|
287
293
|
}
|
|
288
294
|
},
|
|
289
295
|
components: {
|
|
@@ -311,7 +317,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
311
317
|
return (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
|
|
312
318
|
(vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($props.model, (item, index) => {
|
|
313
319
|
return (vue.openBlock(), vue.createBlock(vue.Fragment, {
|
|
314
|
-
key:
|
|
320
|
+
key: $options.label(item) + '_' + index
|
|
315
321
|
}, [
|
|
316
322
|
($options.visible(item))
|
|
317
323
|
? (vue.openBlock(), vue.createBlock("div", {
|
|
@@ -344,7 +350,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
344
350
|
class: $options.getPanelIcon(item)
|
|
345
351
|
}, null, 2))
|
|
346
352
|
: vue.createCommentVNode("", true),
|
|
347
|
-
vue.createVNode("span", _hoisted_2, vue.toDisplayString(
|
|
353
|
+
vue.createVNode("span", _hoisted_2, vue.toDisplayString($options.label(item)), 1)
|
|
348
354
|
], 10, ["href", "onClick"])
|
|
349
355
|
]),
|
|
350
356
|
_: 2
|
|
@@ -371,7 +377,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
371
377
|
class: $options.getPanelIcon(item)
|
|
372
378
|
}, null, 2))
|
|
373
379
|
: vue.createCommentVNode("", true),
|
|
374
|
-
vue.createVNode("span", _hoisted_3, vue.toDisplayString(
|
|
380
|
+
vue.createVNode("span", _hoisted_3, vue.toDisplayString($options.label(item)), 1)
|
|
375
381
|
], 10, ["href", "onClick", "tabindex", "aria-expanded", "id", "aria-controls"]))
|
|
376
382
|
], 64))
|
|
377
383
|
: (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.$slots.item), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("vue"),t=require("primevue/utils"),n={name:"PanelMenuSub",emits:["item-toggle"],props:{model:{type:null,default:null},template:{type:
|
|
1
|
+
"use strict";var e=require("vue"),t=require("primevue/utils"),n={name:"PanelMenuSub",emits:["item-toggle"],props:{model:{type:null,default:null},template:{type:Function,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.$emit("item-toggle",{item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},getItemClass:e=>["p-menuitem",e.className],linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getSubmenuIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi pi-fw",{"pi-angle-right":!t,"pi-angle-down":t}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label}};const l={class:"p-submenu-list",role:"tree"},a={class:"p-menuitem-text"},i={class:"p-menuitem-text"},o={class:"p-toggleable-content"};n.render=function(t,n,s,c,r,d){const m=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub",!0);return e.openBlock(),e.createBlock("ul",l,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.model,((l,c)=>(e.openBlock(),e.createBlock(e.Fragment,{key:d.label(l)+c.toString()},[d.visible(l)&&!l.separator?(e.openBlock(),e.createBlock("li",{key:0,role:"none",class:d.getItemClass(l),style:l.style},[s.template?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.template),{key:1,item:l},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[l.to&&!d.disabled(l)?(e.openBlock(),e.createBlock(m,{key:0,to:l.to,custom:""},{default:e.withCtx((({navigate:t,href:n,isActive:i,isExactActive:o})=>[e.createVNode("a",{href:n,class:d.linkClass(l,{isRouterActive:i,isExactActive:o}),onClick:e=>d.onItemClick(e,l,t),role:"treeitem","aria-expanded":d.isActive(l)},[e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",a,e.toDisplayString(d.label(l)),1)],10,["href","onClick","aria-expanded"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:l.url,class:d.linkClass(l),target:l.target,onClick:e=>d.onItemClick(e,l),role:"treeitem","aria-expanded":d.isActive(l),tabindex:d.disabled(l)?null:"0"},[l.items?(e.openBlock(),e.createBlock("span",{key:0,class:d.getSubmenuIcon(l)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",i,e.toDisplayString(d.label(l)),1)],10,["href","target","onClick","aria-expanded","tabindex"]))],64)),e.createVNode(e.Transition,{name:"p-toggleable-content"},{default:e.withCtx((()=>[e.withDirectives(e.createVNode("div",o,[d.visible(l)&&l.items?(e.openBlock(),e.createBlock(p,{model:l.items,key:d.label(l)+"_sub_",template:s.template,expandedKeys:s.expandedKeys,onItemToggle:n[1]||(n[1]=e=>t.$emit("item-toggle",e)),exact:s.exact},null,8,["model","template","expandedKeys","exact"])):e.createCommentVNode("",!0)],512),[[e.vShow,d.isActive(l)]])])),_:2},1024)],6)):e.createCommentVNode("",!0),d.visible(l)&&l.separator?(e.openBlock(),e.createBlock("li",{class:["p-menu-separator",l.class],style:l.style,key:"separator"+c.toString()},null,6)):e.createCommentVNode("",!0)],64)))),128))])};var s={name:"PanelMenu",emits:["update:expandedKeys"],props:{model:{type:Array,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.updateExpandedKeys({item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},updateExpandedKeys(e){if(this.expandedKeys){let t=e.item,n={...this.expandedKeys};e.expanded?n[t.key]=!0:delete n[t.key],this.$emit("update:expandedKeys",n)}},getPanelClass:e=>["p-panelmenu-panel",e.class],getPanelToggleIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi",{"pi-chevron-right":!t," pi-chevron-down":t}]},getPanelIcon:e=>["p-menuitem-icon",e.icon],getHeaderLinkClass(e,t){return["p-panelmenu-header-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getHeaderClass(e){return["p-component p-panelmenu-header",{"p-highlight":this.isActive(e),"p-disabled":this.disabled(e)}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},components:{PanelMenuSub:n},computed:{ariaId:()=>t.UniqueComponentId()}};const c={class:"p-panelmenu p-component"},r={class:"p-menuitem-text"},d={class:"p-menuitem-text"},m={key:0,class:"p-panelmenu-content"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-panelmenu .p-panelmenu-header-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n position: relative;\n text-decoration: none;\n}\n.p-panelmenu .p-panelmenu-header-link:focus {\n z-index: 1;\n}\n.p-panelmenu .p-submenu-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-panelmenu .p-menuitem-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n text-decoration: none;\n}\n.p-panelmenu .p-menuitem-text {\n line-height: 1;\n}\n"),s.render=function(t,n,l,a,i,o){const s=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub");return e.openBlock(),e.createBlock("div",c,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(l.model,((n,a)=>(e.openBlock(),e.createBlock(e.Fragment,{key:o.label(n)+"_"+a},[o.visible(n)?(e.openBlock(),e.createBlock("div",{key:0,class:o.getPanelClass(n),style:n.style},[e.createVNode("div",{class:o.getHeaderClass(n),style:n.style},[t.$slots.item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.$slots.item),{key:1,item:n},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[n.to&&!o.disabled(n)?(e.openBlock(),e.createBlock(s,{key:0,to:n.to,custom:""},{default:e.withCtx((({navigate:t,href:l,isActive:a,isExactActive:i})=>[e.createVNode("a",{href:l,class:o.getHeaderLinkClass(n,{isActive:a,isExactActive:i}),onClick:e=>o.onItemClick(e,n,t),role:"treeitem"},[n.icon?(e.openBlock(),e.createBlock("span",{key:0,class:o.getPanelIcon(n)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",r,e.toDisplayString(o.label(n)),1)],10,["href","onClick"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:n.url,class:o.getHeaderLinkClass(n),onClick:e=>o.onItemClick(e,n),tabindex:o.disabled(n)?null:"0","aria-expanded":o.isActive(n),id:o.ariaId+"_header","aria-controls":o.ariaId+"_content"},[n.items?(e.openBlock(),e.createBlock("span",{key:0,class:o.getPanelToggleIcon(n)},null,2)):e.createCommentVNode("",!0),n.icon?(e.openBlock(),e.createBlock("span",{key:1,class:o.getPanelIcon(n)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",d,e.toDisplayString(o.label(n)),1)],10,["href","onClick","tabindex","aria-expanded","id","aria-controls"]))],64))],6),e.createVNode(e.Transition,{name:"p-toggleable-content"},{default:e.withCtx((()=>[e.withDirectives(e.createVNode("div",{class:"p-toggleable-content",role:"region",id:o.ariaId+"_content","aria-labelledby":o.ariaId+"_header"},[n.items?(e.openBlock(),e.createBlock("div",m,[e.createVNode(p,{model:n.items,class:"p-panelmenu-root-submenu",template:t.$slots.item,expandedKeys:l.expandedKeys,onItemToggle:o.updateExpandedKeys,exact:l.exact},null,8,["model","template","expandedKeys","onItemToggle","exact"])])):e.createCommentVNode("",!0)],8,["id","aria-labelledby"]),[[e.vShow,o.isActive(n)]])])),_:2},1024)],6)):e.createCommentVNode("",!0)],64)))),128))])},module.exports=s;
|