primevue 3.7.2 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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/Breadcrumb.vue +4 -0
- package/breadcrumb/BreadcrumbItem.vue +5 -2
- package/breadcrumb/breadcrumb.cjs.js +6 -3
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +6 -3
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +6 -3
- 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/confirmationservice/ConfirmationService.d.ts +3 -2
- 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 +7644 -0
- package/core/core.min.js +47 -0
- package/datatable/BodyCell.vue +37 -17
- package/datatable/ColumnFilter.vue +17 -6
- package/datatable/DataTable.d.ts +37 -9
- package/datatable/DataTable.vue +90 -48
- package/datatable/FooterCell.vue +2 -2
- package/datatable/HeaderCell.vue +2 -2
- package/datatable/TableBody.vue +15 -6
- package/datatable/TableFooter.vue +17 -2
- package/datatable/TableHeader.vue +17 -2
- package/datatable/datatable.cjs.js +321 -197
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +321 -197
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +321 -197
- 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/inputswitch/InputSwitch.vue +6 -3
- package/inputswitch/inputswitch.cjs.js +6 -3
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +6 -3
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +6 -3
- package/inputswitch/inputswitch.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/MenubarSub.vue +8 -5
- package/menubar/menubar.cjs.js +8 -5
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +8 -5
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +8 -5
- 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/overlaypanel/OverlayPanel.vue +1 -0
- package/overlaypanel/overlaypanel.cjs.js +1 -0
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +1 -0
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +1 -0
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +5 -1
- package/paginator/CurrentPageReport.vue +5 -1
- package/paginator/JumpToPageInput.vue +1 -1
- package/paginator/Paginator.d.ts +10 -4
- package/paginator/Paginator.vue +10 -7
- package/paginator/paginator.cjs.js +16 -8
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +16 -8
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +16 -8
- 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 +57 -16
- package/resources/themes/arya-green/theme.css +57 -16
- package/resources/themes/arya-orange/theme.css +57 -16
- package/resources/themes/arya-purple/theme.css +57 -16
- package/resources/themes/bootstrap4-dark-blue/theme.css +54 -20
- package/resources/themes/bootstrap4-dark-purple/theme.css +54 -20
- package/resources/themes/bootstrap4-light-blue/theme.css +54 -20
- package/resources/themes/bootstrap4-light-purple/theme.css +54 -20
- package/resources/themes/fluent-light/theme.css +57 -16
- 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 +54 -20
- package/resources/themes/luna-blue/theme.css +54 -20
- package/resources/themes/luna-green/theme.css +54 -20
- package/resources/themes/luna-pink/theme.css +54 -20
- package/resources/themes/md-dark-deeppurple/theme.css +245 -48
- package/resources/themes/md-dark-indigo/theme.css +245 -48
- package/resources/themes/md-light-deeppurple/theme.css +245 -48
- package/resources/themes/md-light-indigo/theme.css +245 -48
- package/resources/themes/mdc-dark-deeppurple/theme.css +245 -48
- package/resources/themes/mdc-dark-indigo/theme.css +245 -48
- package/resources/themes/mdc-light-deeppurple/theme.css +245 -48
- package/resources/themes/mdc-light-indigo/theme.css +245 -48
- package/resources/themes/nova/theme.css +54 -20
- package/resources/themes/nova-accent/theme.css +54 -20
- package/resources/themes/nova-alt/theme.css +54 -20
- package/resources/themes/nova-vue/theme.css +54 -20
- package/resources/themes/rhea/theme.css +54 -20
- package/resources/themes/saga-blue/theme.css +57 -16
- package/resources/themes/saga-green/theme.css +57 -16
- package/resources/themes/saga-orange/theme.css +57 -16
- package/resources/themes/saga-purple/theme.css +57 -16
- package/resources/themes/tailwind-light/theme.css +68 -19
- package/resources/themes/vela-blue/theme.css +57 -16
- package/resources/themes/vela-green/theme.css +57 -16
- package/resources/themes/vela-orange/theme.css +57 -16
- package/resources/themes/vela-purple/theme.css +57 -16
- 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/speeddial/SpeedDial.vue +2 -1
- package/speeddial/speeddial.cjs.js +2 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +2 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +2 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitter/Splitter.vue +5 -3
- package/splitter/splitter.cjs.js +4 -2
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +5 -3
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +4 -2
- package/splitter/splitter.min.js +1 -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 +10 -3
- package/tabmenu/tabmenu.cjs.js +7 -4
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +7 -4
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +7 -4
- package/tabmenu/tabmenu.min.js +1 -1
- package/terminal/terminal.js +1 -1
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/TerminalService.d.ts +9 -6
- package/tieredmenu/TieredMenu.d.ts +5 -3
- package/tieredmenu/TieredMenuSub.vue +8 -5
- package/tieredmenu/tieredmenu.cjs.js +8 -5
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +8 -5
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +8 -5
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +8 -3
- package/toast/Toast.d.ts +7 -0
- package/toastservice/ToastService.d.ts +3 -2
- package/tooltip/tooltip.cjs.js +5 -1
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +5 -1
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +5 -1
- package/tooltip/tooltip.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/BodyCell.vue +2 -3
- package/treetable/FooterCell.vue +2 -2
- package/treetable/HeaderCell.vue +2 -2
- package/treetable/TreeTable.d.ts +2 -2
- package/treetable/TreeTable.vue +10 -10
- package/treetable/TreeTableRow.vue +2 -2
- package/treetable/treetable.cjs.js +18 -18
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +19 -19
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +18 -18
- package/treetable/treetable.min.js +1 -1
- package/utils/Utils.d.ts +80 -0
- package/utils/package.json +3 -2
- package/utils/utils.cjs.js +126 -108
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +126 -108
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +126 -108
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +24 -0
- package/vetur-tags.json +9 -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 +228 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.overlaypanel=function(e,t,n,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(t),s={name:"OverlayPanel",inheritAttrs:!1,props:{dismissable:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!1},appendTo:{type:String,default:"body"},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},ariaCloseLabel:{type:String,default:"close"},breakpoints:{type:Object,default:null}},data:()=>({visible:!1}),selfClick:!1,target:null,eventTarget:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,styleElement:null,overlayEventListener:null,beforeUnmount(){this.dismissable&&this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.destroyStyle(),this.unbindResizeListener(),this.target=null,this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.overlayEventListener&&(r.default.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null),this.container=null},mounted(){this.breakpoints&&this.createStyle()},methods:{toggle(e,t){this.visible?this.hide():this.show(e,t)},show(e,t){this.visible=!0,this.eventTarget=e.currentTarget,this.target=t||e.currentTarget},hide(){this.visible=!1},onContentClick(){this.selfClick=!0},onEnter(t){this.container.setAttribute(this.attributeSelector,""),this.alignOverlay(),this.dismissable&&this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.autoZIndex&&e.ZIndexUtils.set("overlay",t,this.baseZIndex+this.$primevue.config.zIndex.overlay),this.overlayEventListener=e=>{this.container.contains(e.target)&&(this.selfClick=!0)},r.default.on("overlay-click",this.overlayEventListener),this.$emit("show")},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),r.default.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null,this.$emit("hide")},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},alignOverlay(){e.DomHandler.absolutePosition(this.container,this.target);const t=e.DomHandler.getOffset(this.container),n=e.DomHandler.getOffset(this.target);let i=0;t.left<n.left&&(i=n.left-t.left),this.container.style.setProperty("--overlayArrowLeft",`${i}px`),t.top<n.top&&e.DomHandler.addClass(this.container,"p-overlaypanel-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{!this.visible||this.selfClick||this.isTargetClicked(e)||(this.visible=!1),this.selfClick=!1},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null,this.selfClick=!1)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new e.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&!e.DomHandler.isAndroid()&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(e){return this.eventTarget&&(this.eventTarget===e.target||this.eventTarget.contains(e.target))},containerRef(e){this.container=e},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let t in this.breakpoints)e+=`\n @media screen and (max-width: ${t}) {\n .p-overlaypanel[${this.attributeSelector}] {\n width: ${this.breakpoints[t]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},onOverlayClick(e){r.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-overlaypanel p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},attributeSelector:()=>e.UniqueComponentId()},directives:{ripple:l(n).default}};const o=i.createVNode("span",{class:"p-overlaypanel-close-icon pi pi-times"},null,-1);return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}('\n.p-overlaypanel {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-overlaypanel-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n.p-overlaypanel-close {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n/* Animation */\n.p-overlaypanel-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-overlaypanel-leave-to {\n opacity: 0;\n}\n.p-overlaypanel-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-overlaypanel-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-overlaypanel:after, .p-overlaypanel:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-overlaypanel:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-overlaypanel:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-overlaypanel-flipped:after, .p-overlaypanel-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-overlaypanel.p-overlaypanel-flipped:after {\n border-bottom-color: transparent;\n}\n.p-overlaypanel.p-overlaypanel-flipped:before {\n border-bottom-color: transparent\n}\n'),s.render=function(e,t,n,l,r,s){const a=i.resolveDirective("ripple");return i.openBlock(),i.createBlock(i.Teleport,{to:n.appendTo},[i.createVNode(i.Transition,{name:"p-overlaypanel",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:i.withCtx((()=>[r.visible?(i.openBlock(),i.createBlock("div",i.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[4]||(t[4]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[i.createVNode("div",{class:"p-overlaypanel-content",onClick:t[1]||(t[1]=(...e)=>s.onContentClick&&s.onContentClick(...e)),onMousedown:t[2]||(t[2]=(...e)=>s.onContentClick&&s.onContentClick(...e))},[i.renderSlot(e.$slots,"default")],32),n.showCloseIcon?i.withDirectives((i.openBlock(),i.createBlock("button",{key:0,class:"p-overlaypanel-close p-link",onClick:t[3]||(t[3]=(...e)=>s.hide&&s.hide(...e)),"aria-label":n.ariaCloseLabel,type:"button"},[o],8,["aria-label"])),[[a]]):i.createCommentVNode("",!0)],16)):i.createCommentVNode("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])],8,["to"])},s}(primevue.utils,primevue.overlayeventbus,primevue.ripple,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.overlaypanel=function(e,t,n,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(t),s={name:"OverlayPanel",inheritAttrs:!1,props:{dismissable:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!1},appendTo:{type:String,default:"body"},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},ariaCloseLabel:{type:String,default:"close"},breakpoints:{type:Object,default:null}},emits:["show","hide"],data:()=>({visible:!1}),selfClick:!1,target:null,eventTarget:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,styleElement:null,overlayEventListener:null,beforeUnmount(){this.dismissable&&this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.destroyStyle(),this.unbindResizeListener(),this.target=null,this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.overlayEventListener&&(r.default.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null),this.container=null},mounted(){this.breakpoints&&this.createStyle()},methods:{toggle(e,t){this.visible?this.hide():this.show(e,t)},show(e,t){this.visible=!0,this.eventTarget=e.currentTarget,this.target=t||e.currentTarget},hide(){this.visible=!1},onContentClick(){this.selfClick=!0},onEnter(t){this.container.setAttribute(this.attributeSelector,""),this.alignOverlay(),this.dismissable&&this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.autoZIndex&&e.ZIndexUtils.set("overlay",t,this.baseZIndex+this.$primevue.config.zIndex.overlay),this.overlayEventListener=e=>{this.container.contains(e.target)&&(this.selfClick=!0)},r.default.on("overlay-click",this.overlayEventListener),this.$emit("show")},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),r.default.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null,this.$emit("hide")},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},alignOverlay(){e.DomHandler.absolutePosition(this.container,this.target);const t=e.DomHandler.getOffset(this.container),n=e.DomHandler.getOffset(this.target);let i=0;t.left<n.left&&(i=n.left-t.left),this.container.style.setProperty("--overlayArrowLeft",`${i}px`),t.top<n.top&&e.DomHandler.addClass(this.container,"p-overlaypanel-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{!this.visible||this.selfClick||this.isTargetClicked(e)||(this.visible=!1),this.selfClick=!1},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null,this.selfClick=!1)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new e.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&!e.DomHandler.isAndroid()&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(e){return this.eventTarget&&(this.eventTarget===e.target||this.eventTarget.contains(e.target))},containerRef(e){this.container=e},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let t in this.breakpoints)e+=`\n @media screen and (max-width: ${t}) {\n .p-overlaypanel[${this.attributeSelector}] {\n width: ${this.breakpoints[t]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},onOverlayClick(e){r.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-overlaypanel p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},attributeSelector:()=>e.UniqueComponentId()},directives:{ripple:l(n).default}};const o=i.createVNode("span",{class:"p-overlaypanel-close-icon pi pi-times"},null,-1);return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}('\n.p-overlaypanel {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-overlaypanel-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n.p-overlaypanel-close {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n/* Animation */\n.p-overlaypanel-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-overlaypanel-leave-to {\n opacity: 0;\n}\n.p-overlaypanel-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-overlaypanel-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-overlaypanel:after, .p-overlaypanel:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-overlaypanel:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-overlaypanel:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-overlaypanel-flipped:after, .p-overlaypanel-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-overlaypanel.p-overlaypanel-flipped:after {\n border-bottom-color: transparent;\n}\n.p-overlaypanel.p-overlaypanel-flipped:before {\n border-bottom-color: transparent\n}\n'),s.render=function(e,t,n,l,r,s){const a=i.resolveDirective("ripple");return i.openBlock(),i.createBlock(i.Teleport,{to:n.appendTo},[i.createVNode(i.Transition,{name:"p-overlaypanel",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:i.withCtx((()=>[r.visible?(i.openBlock(),i.createBlock("div",i.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[4]||(t[4]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[i.createVNode("div",{class:"p-overlaypanel-content",onClick:t[1]||(t[1]=(...e)=>s.onContentClick&&s.onContentClick(...e)),onMousedown:t[2]||(t[2]=(...e)=>s.onContentClick&&s.onContentClick(...e))},[i.renderSlot(e.$slots,"default")],32),n.showCloseIcon?i.withDirectives((i.openBlock(),i.createBlock("button",{key:0,class:"p-overlaypanel-close p-link",onClick:t[3]||(t[3]=(...e)=>s.hide&&s.hide(...e)),"aria-label":n.ariaCloseLabel,type:"button"},[o],8,["aria-label"])),[[a]]):i.createCommentVNode("",!0)],16)):i.createCommentVNode("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])],8,["to"])},s}(primevue.utils,primevue.overlayeventbus,primevue.ripple,Vue);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primevue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
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
|
}
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
type: Number,
|
|
11
11
|
default: 0
|
|
12
12
|
},
|
|
13
|
+
currentPage: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
},
|
|
13
17
|
page: {
|
|
14
18
|
type: Number,
|
|
15
19
|
default: 0
|
|
@@ -34,7 +38,7 @@
|
|
|
34
38
|
computed: {
|
|
35
39
|
text() {
|
|
36
40
|
let text = this.template
|
|
37
|
-
.replace("{currentPage}", this.
|
|
41
|
+
.replace("{currentPage}", this.currentPage)
|
|
38
42
|
.replace("{totalPages}", this.pageCount)
|
|
39
43
|
.replace("{first}", this.pageCount > 0 ? this.first + 1 : 0)
|
|
40
44
|
.replace("{last}", Math.min(this.first + this.rows, this.totalRecords))
|
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" />
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
<NextPageLink v-else-if="item === 'NextPageLink'" @click="changePageToNext($event)" :disabled="isLastPage || empty" />
|
|
10
10
|
<LastPageLink v-else-if="item === 'LastPageLink'" @click="changePageToLast($event)" :disabled="isLastPage || empty" />
|
|
11
11
|
<PageLinks v-else-if="item === 'PageLinks'" :value="pageLinks" :page="page" @click="changePageLink($event)" />
|
|
12
|
-
<CurrentPageReport v-else-if="item === 'CurrentPageReport'" :template="currentPageReportTemplate"
|
|
12
|
+
<CurrentPageReport v-else-if="item === 'CurrentPageReport'" :template="currentPageReportTemplate" :currentPage="currentPage"
|
|
13
13
|
:page="page" :pageCount="pageCount" :first="d_first" :rows="d_rows" :totalRecords="totalRecords" />
|
|
14
14
|
<RowsPerPageDropdown v-else-if="item === 'RowsPerPageDropdown' && rowsPerPageOptions" :rows="d_rows"
|
|
15
15
|
:options="rowsPerPageOptions" @rows-change="onRowChange($event)" :disabled="empty"/>
|
|
16
|
-
<JumpToPageDropdown v-else-if="item === 'JumpToPageDropdown'" :page="page" :pageCount="pageCount"
|
|
16
|
+
<JumpToPageDropdown v-else-if="item === 'JumpToPageDropdown'" :page="page" :pageCount="pageCount"
|
|
17
17
|
@page-change="changePage($event)" :disabled="empty"/>
|
|
18
|
-
<JumpToPageInput v-else-if="item === 'JumpToPageInput'" :page="
|
|
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>
|
|
@@ -194,6 +194,9 @@ export default {
|
|
|
194
194
|
},
|
|
195
195
|
empty() {
|
|
196
196
|
return this.pageCount === 0;
|
|
197
|
+
},
|
|
198
|
+
currentPage() {
|
|
199
|
+
return this.pageCount > 0 ? this.page + 1 : 0;
|
|
197
200
|
}
|
|
198
201
|
},
|
|
199
202
|
components: {
|
|
@@ -19,6 +19,10 @@ var script$9 = {
|
|
|
19
19
|
type: Number,
|
|
20
20
|
default: 0
|
|
21
21
|
},
|
|
22
|
+
currentPage: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0
|
|
25
|
+
},
|
|
22
26
|
page: {
|
|
23
27
|
type: Number,
|
|
24
28
|
default: 0
|
|
@@ -43,7 +47,7 @@ var script$9 = {
|
|
|
43
47
|
computed: {
|
|
44
48
|
text() {
|
|
45
49
|
let text = this.template
|
|
46
|
-
.replace("{currentPage}", this.
|
|
50
|
+
.replace("{currentPage}", this.currentPage)
|
|
47
51
|
.replace("{totalPages}", this.pageCount)
|
|
48
52
|
.replace("{first}", this.pageCount > 0 ? this.first + 1 : 0)
|
|
49
53
|
.replace("{last}", Math.min(this.first + this.rows, this.totalRecords))
|
|
@@ -332,7 +336,7 @@ var script$1 = {
|
|
|
332
336
|
},
|
|
333
337
|
methods: {
|
|
334
338
|
onChange(value) {
|
|
335
|
-
this.$emit('page-change', value);
|
|
339
|
+
this.$emit('page-change', value - 1);
|
|
336
340
|
}
|
|
337
341
|
},
|
|
338
342
|
components: {
|
|
@@ -513,6 +517,9 @@ var script = {
|
|
|
513
517
|
},
|
|
514
518
|
empty() {
|
|
515
519
|
return this.pageCount === 0;
|
|
520
|
+
},
|
|
521
|
+
currentPage() {
|
|
522
|
+
return this.pageCount > 0 ? this.page + 1 : 0;
|
|
516
523
|
}
|
|
517
524
|
},
|
|
518
525
|
components: {
|
|
@@ -554,9 +561,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
554
561
|
|
|
555
562
|
return ($props.alwaysShow ? true : ($options.pageLinks && $options.pageLinks.length > 1))
|
|
556
563
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
|
|
557
|
-
(_ctx.$slots.
|
|
564
|
+
(_ctx.$slots.start)
|
|
558
565
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_2, [
|
|
559
|
-
vue.renderSlot(_ctx.$slots, "
|
|
566
|
+
vue.renderSlot(_ctx.$slots, "start", { state: $options.currentState })
|
|
560
567
|
]))
|
|
561
568
|
: vue.createCommentVNode("", true),
|
|
562
569
|
(vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($options.templateItems, (item) => {
|
|
@@ -596,12 +603,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
596
603
|
? (vue.openBlock(), vue.createBlock(_component_CurrentPageReport, {
|
|
597
604
|
key: 5,
|
|
598
605
|
template: $props.currentPageReportTemplate,
|
|
606
|
+
currentPage: $options.currentPage,
|
|
599
607
|
page: $options.page,
|
|
600
608
|
pageCount: $options.pageCount,
|
|
601
609
|
first: $data.d_first,
|
|
602
610
|
rows: $data.d_rows,
|
|
603
611
|
totalRecords: $props.totalRecords
|
|
604
|
-
}, null, 8, ["template", "page", "pageCount", "first", "rows", "totalRecords"]))
|
|
612
|
+
}, null, 8, ["template", "currentPage", "page", "pageCount", "first", "rows", "totalRecords"]))
|
|
605
613
|
: (item === 'RowsPerPageDropdown' && $props.rowsPerPageOptions)
|
|
606
614
|
? (vue.openBlock(), vue.createBlock(_component_RowsPerPageDropdown, {
|
|
607
615
|
key: 6,
|
|
@@ -621,16 +629,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
621
629
|
: (item === 'JumpToPageInput')
|
|
622
630
|
? (vue.openBlock(), vue.createBlock(_component_JumpToPageInput, {
|
|
623
631
|
key: 8,
|
|
624
|
-
page: $options.
|
|
632
|
+
page: $options.currentPage,
|
|
625
633
|
onPageChange: _cache[8] || (_cache[8] = $event => ($options.changePage($event))),
|
|
626
634
|
disabled: $options.empty
|
|
627
635
|
}, null, 8, ["page", "disabled"]))
|
|
628
636
|
: vue.createCommentVNode("", true)
|
|
629
637
|
], 64))
|
|
630
638
|
}), 128)),
|
|
631
|
-
(_ctx.$slots.
|
|
639
|
+
(_ctx.$slots.end)
|
|
632
640
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_3, [
|
|
633
|
-
vue.renderSlot(_ctx.$slots, "
|
|
641
|
+
vue.renderSlot(_ctx.$slots, "end", { state: $options.currentState })
|
|
634
642
|
]))
|
|
635
643
|
: vue.createCommentVNode("", true)
|
|
636
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},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.pageCount>0?this.page+1:0).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)}},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}},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,page:i.page,pageCount:i.pageCount,first:r.d_first,rows:r.d_rows,totalRecords:a.totalRecords},null,8,["template","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.page,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;
|
|
@@ -11,6 +11,10 @@ var script$9 = {
|
|
|
11
11
|
type: Number,
|
|
12
12
|
default: 0
|
|
13
13
|
},
|
|
14
|
+
currentPage: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 0
|
|
17
|
+
},
|
|
14
18
|
page: {
|
|
15
19
|
type: Number,
|
|
16
20
|
default: 0
|
|
@@ -35,7 +39,7 @@ var script$9 = {
|
|
|
35
39
|
computed: {
|
|
36
40
|
text() {
|
|
37
41
|
let text = this.template
|
|
38
|
-
.replace("{currentPage}", this.
|
|
42
|
+
.replace("{currentPage}", this.currentPage)
|
|
39
43
|
.replace("{totalPages}", this.pageCount)
|
|
40
44
|
.replace("{first}", this.pageCount > 0 ? this.first + 1 : 0)
|
|
41
45
|
.replace("{last}", Math.min(this.first + this.rows, this.totalRecords))
|
|
@@ -324,7 +328,7 @@ var script$1 = {
|
|
|
324
328
|
},
|
|
325
329
|
methods: {
|
|
326
330
|
onChange(value) {
|
|
327
|
-
this.$emit('page-change', value);
|
|
331
|
+
this.$emit('page-change', value - 1);
|
|
328
332
|
}
|
|
329
333
|
},
|
|
330
334
|
components: {
|
|
@@ -505,6 +509,9 @@ var script = {
|
|
|
505
509
|
},
|
|
506
510
|
empty() {
|
|
507
511
|
return this.pageCount === 0;
|
|
512
|
+
},
|
|
513
|
+
currentPage() {
|
|
514
|
+
return this.pageCount > 0 ? this.page + 1 : 0;
|
|
508
515
|
}
|
|
509
516
|
},
|
|
510
517
|
components: {
|
|
@@ -546,9 +553,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
546
553
|
|
|
547
554
|
return ($props.alwaysShow ? true : ($options.pageLinks && $options.pageLinks.length > 1))
|
|
548
555
|
? (openBlock(), createBlock("div", _hoisted_1, [
|
|
549
|
-
(_ctx.$slots.
|
|
556
|
+
(_ctx.$slots.start)
|
|
550
557
|
? (openBlock(), createBlock("div", _hoisted_2, [
|
|
551
|
-
renderSlot(_ctx.$slots, "
|
|
558
|
+
renderSlot(_ctx.$slots, "start", { state: $options.currentState })
|
|
552
559
|
]))
|
|
553
560
|
: createCommentVNode("", true),
|
|
554
561
|
(openBlock(true), createBlock(Fragment, null, renderList($options.templateItems, (item) => {
|
|
@@ -588,12 +595,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
588
595
|
? (openBlock(), createBlock(_component_CurrentPageReport, {
|
|
589
596
|
key: 5,
|
|
590
597
|
template: $props.currentPageReportTemplate,
|
|
598
|
+
currentPage: $options.currentPage,
|
|
591
599
|
page: $options.page,
|
|
592
600
|
pageCount: $options.pageCount,
|
|
593
601
|
first: $data.d_first,
|
|
594
602
|
rows: $data.d_rows,
|
|
595
603
|
totalRecords: $props.totalRecords
|
|
596
|
-
}, null, 8, ["template", "page", "pageCount", "first", "rows", "totalRecords"]))
|
|
604
|
+
}, null, 8, ["template", "currentPage", "page", "pageCount", "first", "rows", "totalRecords"]))
|
|
597
605
|
: (item === 'RowsPerPageDropdown' && $props.rowsPerPageOptions)
|
|
598
606
|
? (openBlock(), createBlock(_component_RowsPerPageDropdown, {
|
|
599
607
|
key: 6,
|
|
@@ -613,16 +621,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
613
621
|
: (item === 'JumpToPageInput')
|
|
614
622
|
? (openBlock(), createBlock(_component_JumpToPageInput, {
|
|
615
623
|
key: 8,
|
|
616
|
-
page: $options.
|
|
624
|
+
page: $options.currentPage,
|
|
617
625
|
onPageChange: _cache[8] || (_cache[8] = $event => ($options.changePage($event))),
|
|
618
626
|
disabled: $options.empty
|
|
619
627
|
}, null, 8, ["page", "disabled"]))
|
|
620
628
|
: createCommentVNode("", true)
|
|
621
629
|
], 64))
|
|
622
630
|
}), 128)),
|
|
623
|
-
(_ctx.$slots.
|
|
631
|
+
(_ctx.$slots.end)
|
|
624
632
|
? (openBlock(), createBlock("div", _hoisted_3, [
|
|
625
|
-
renderSlot(_ctx.$slots, "
|
|
633
|
+
renderSlot(_ctx.$slots, "end", { state: $options.currentState })
|
|
626
634
|
]))
|
|
627
635
|
: createCommentVNode("", true)
|
|
628
636
|
]))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{openBlock as e,createBlock as t,toDisplayString as a,resolveDirective as n,withDirectives as i,createVNode as s,Fragment as r,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},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.pageCount>0?this.page+1:0).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,s,r,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=s("span",{class:"p-paginator-icon pi pi-angle-double-left"},null,-1);f.render=function(a,s,r,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=s("span",{class:"p-paginator-icon pi pi-angle-double-right"},null,-1);k.render=function(a,s,r,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=s("span",{class:"p-paginator-icon pi pi-angle-right"},null,-1);y.render=function(a,s,r,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(s,l,g,u,d,c){const h=n("ripple");return e(),t("span",L,[(e(!0),t(r,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=s("span",{class:"p-paginator-icon pi pi-angle-left"},null,-1);x.render=function(a,s,r,o,p,l){const g=n("ripple");return i((e(),t("button",{class:l.containerClass,type:"button"},[R],2)),[[g]])};var T={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}};T.render=function(a,n,i,s,r,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 N={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}};N.render=function(a,n,i,s,r,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)}},components:{JTPInput:h}};_.render=function(a,n,i,s,r,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}},components:{CurrentPageReport:m,FirstPageLink:f,LastPageLink:k,NextPageLink:y,PageLinks:v,PrevPageLink:x,RowsPerPageDropdown:T,JumpToPageDropdown:N,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,s,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(r,null,o(d.templateItems,(a=>(e(),t(r,{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,page:d.page,pageCount:d.pageCount,first:p.d_first,rows:p.d_rows,totalRecords:i.totalRecords},null,8,["template","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.page,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
|
@@ -16,6 +16,10 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
16
16
|
type: Number,
|
|
17
17
|
default: 0
|
|
18
18
|
},
|
|
19
|
+
currentPage: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 0
|
|
22
|
+
},
|
|
19
23
|
page: {
|
|
20
24
|
type: Number,
|
|
21
25
|
default: 0
|
|
@@ -40,7 +44,7 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
40
44
|
computed: {
|
|
41
45
|
text() {
|
|
42
46
|
let text = this.template
|
|
43
|
-
.replace("{currentPage}", this.
|
|
47
|
+
.replace("{currentPage}", this.currentPage)
|
|
44
48
|
.replace("{totalPages}", this.pageCount)
|
|
45
49
|
.replace("{first}", this.pageCount > 0 ? this.first + 1 : 0)
|
|
46
50
|
.replace("{last}", Math.min(this.first + this.rows, this.totalRecords))
|
|
@@ -329,7 +333,7 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
329
333
|
},
|
|
330
334
|
methods: {
|
|
331
335
|
onChange(value) {
|
|
332
|
-
this.$emit('page-change', value);
|
|
336
|
+
this.$emit('page-change', value - 1);
|
|
333
337
|
}
|
|
334
338
|
},
|
|
335
339
|
components: {
|
|
@@ -510,6 +514,9 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
510
514
|
},
|
|
511
515
|
empty() {
|
|
512
516
|
return this.pageCount === 0;
|
|
517
|
+
},
|
|
518
|
+
currentPage() {
|
|
519
|
+
return this.pageCount > 0 ? this.page + 1 : 0;
|
|
513
520
|
}
|
|
514
521
|
},
|
|
515
522
|
components: {
|
|
@@ -551,9 +558,9 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
551
558
|
|
|
552
559
|
return ($props.alwaysShow ? true : ($options.pageLinks && $options.pageLinks.length > 1))
|
|
553
560
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_1, [
|
|
554
|
-
(_ctx.$slots.
|
|
561
|
+
(_ctx.$slots.start)
|
|
555
562
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_2, [
|
|
556
|
-
vue.renderSlot(_ctx.$slots, "
|
|
563
|
+
vue.renderSlot(_ctx.$slots, "start", { state: $options.currentState })
|
|
557
564
|
]))
|
|
558
565
|
: vue.createCommentVNode("", true),
|
|
559
566
|
(vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($options.templateItems, (item) => {
|
|
@@ -593,12 +600,13 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
593
600
|
? (vue.openBlock(), vue.createBlock(_component_CurrentPageReport, {
|
|
594
601
|
key: 5,
|
|
595
602
|
template: $props.currentPageReportTemplate,
|
|
603
|
+
currentPage: $options.currentPage,
|
|
596
604
|
page: $options.page,
|
|
597
605
|
pageCount: $options.pageCount,
|
|
598
606
|
first: $data.d_first,
|
|
599
607
|
rows: $data.d_rows,
|
|
600
608
|
totalRecords: $props.totalRecords
|
|
601
|
-
}, null, 8, ["template", "page", "pageCount", "first", "rows", "totalRecords"]))
|
|
609
|
+
}, null, 8, ["template", "currentPage", "page", "pageCount", "first", "rows", "totalRecords"]))
|
|
602
610
|
: (item === 'RowsPerPageDropdown' && $props.rowsPerPageOptions)
|
|
603
611
|
? (vue.openBlock(), vue.createBlock(_component_RowsPerPageDropdown, {
|
|
604
612
|
key: 6,
|
|
@@ -618,16 +626,16 @@ this.primevue.paginator = (function (vue, Ripple, Dropdown, InputNumber) {
|
|
|
618
626
|
: (item === 'JumpToPageInput')
|
|
619
627
|
? (vue.openBlock(), vue.createBlock(_component_JumpToPageInput, {
|
|
620
628
|
key: 8,
|
|
621
|
-
page: $options.
|
|
629
|
+
page: $options.currentPage,
|
|
622
630
|
onPageChange: _cache[8] || (_cache[8] = $event => ($options.changePage($event))),
|
|
623
631
|
disabled: $options.empty
|
|
624
632
|
}, null, 8, ["page", "disabled"]))
|
|
625
633
|
: vue.createCommentVNode("", true)
|
|
626
634
|
], 64))
|
|
627
635
|
}), 128)),
|
|
628
|
-
(_ctx.$slots.
|
|
636
|
+
(_ctx.$slots.end)
|
|
629
637
|
? (vue.openBlock(), vue.createBlock("div", _hoisted_3, [
|
|
630
|
-
vue.renderSlot(_ctx.$slots, "
|
|
638
|
+
vue.renderSlot(_ctx.$slots, "end", { state: $options.currentState })
|
|
631
639
|
]))
|
|
632
640
|
: vue.createCommentVNode("", true)
|
|
633
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},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.pageCount>0?this.page+1:0).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)}},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}},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,page:i.page,pageCount:i.pageCount,first:r.d_first,rows:r.d_rows,totalRecords:a.totalRecords},null,8,["template","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.page,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);
|