primevue 3.28.0 → 3.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/autocomplete/AutoComplete.d.ts +153 -1
- package/autocomplete/AutoComplete.vue +46 -17
- package/autocomplete/autocomplete.cjs.js +80 -74
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +80 -75
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +81 -76
- package/autocomplete/autocomplete.min.js +1 -1
- package/basecomponent/BaseComponent.vue +19 -5
- package/basecomponent/basecomponent.cjs.js +19 -5
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +19 -5
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +20 -7
- package/basecomponent/basecomponent.min.js +1 -1
- package/calendar/Calendar.d.ts +269 -0
- package/calendar/Calendar.vue +75 -59
- package/calendar/calendar.cjs.js +223 -259
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +223 -260
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +224 -261
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.d.ts +154 -0
- package/carousel/Carousel.vue +27 -14
- package/carousel/carousel.cjs.js +64 -65
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +64 -66
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +65 -67
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +133 -0
- package/cascadeselect/CascadeSelect.vue +15 -12
- package/cascadeselect/CascadeSelectSub.vue +7 -3
- package/cascadeselect/cascadeselect.cjs.js +63 -66
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +63 -67
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +64 -68
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/checkbox/Checkbox.d.ts +60 -0
- package/checkbox/Checkbox.vue +7 -5
- package/checkbox/checkbox.cjs.js +17 -15
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +17 -16
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +18 -17
- package/checkbox/checkbox.min.js +1 -1
- package/chips/Chips.d.ts +80 -0
- package/chips/Chips.vue +9 -5
- package/chips/chips.cjs.js +23 -24
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +23 -25
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +24 -26
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +76 -0
- package/colorpicker/ColorPicker.vue +11 -9
- package/colorpicker/colorpicker.cjs.js +28 -27
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +28 -28
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +29 -29
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +303 -2
- package/column/Column.vue +3 -0
- package/column/column.cjs.js +7 -0
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +3 -0
- package/column/column.esm.min.js +1 -1
- package/column/column.js +7 -2
- package/column/column.min.js +1 -1
- package/columngroup/ColumnGroup.d.ts +34 -0
- package/columngroup/ColumnGroup.vue +3 -0
- package/columngroup/columngroup.cjs.js +7 -0
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +3 -0
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +7 -2
- package/columngroup/columngroup.min.js +1 -1
- package/config/PrimeVue.d.ts +163 -2
- package/confirmdialog/ConfirmDialog.d.ts +14 -7
- package/contextmenu/ContextMenu.d.ts +1 -1
- package/core/core.js +448 -331
- package/core/core.min.js +9 -9
- package/datatable/BodyCell.vue +29 -13
- package/datatable/ColumnFilter.vue +49 -20
- package/datatable/DataTable.d.ts +188 -1
- package/datatable/DataTable.vue +25 -14
- package/datatable/FooterCell.vue +15 -1
- package/datatable/HeaderCell.vue +31 -6
- package/datatable/HeaderCheckbox.vue +35 -5
- package/datatable/RowCheckbox.vue +36 -5
- package/datatable/RowRadioButton.vue +26 -6
- package/datatable/TableBody.vue +41 -11
- package/datatable/TableFooter.vue +31 -5
- package/datatable/TableHeader.vue +53 -6
- package/datatable/datatable.cjs.js +559 -376
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +559 -377
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +560 -378
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +72 -0
- package/dataview/DataView.vue +13 -8
- package/dataview/dataview.cjs.js +33 -37
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +33 -38
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +33 -38
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +65 -0
- package/dataviewlayoutoptions/DataViewLayoutOptions.vue +7 -5
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +19 -17
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -18
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +20 -19
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/dialog/Dialog.d.ts +6 -4
- package/dialog/Dialog.vue +2 -3
- package/dialog/dialog.cjs.js +4 -5
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +4 -5
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +4 -5
- package/dialog/dialog.min.js +1 -1
- package/dropdown/Dropdown.d.ts +162 -1
- package/dropdown/Dropdown.vue +44 -25
- package/dropdown/dropdown.cjs.js +97 -93
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +97 -94
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +98 -95
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.d.ts +67 -0
- package/editor/Editor.vue +35 -33
- package/editor/editor.cjs.js +88 -73
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +85 -74
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +89 -75
- package/editor/editor.min.js +1 -1
- package/fileupload/FileUpload.d.ts +23 -23
- package/fileupload/FileUpload.vue +3 -3
- package/fileupload/fileupload.cjs.js +4 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +4 -4
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/Galleria.d.ts +196 -0
- package/galleria/Galleria.vue +5 -3
- package/galleria/GalleriaContent.vue +10 -6
- package/galleria/GalleriaItem.vue +12 -9
- package/galleria/GalleriaThumbnails.vue +46 -9
- package/galleria/galleria.cjs.js +106 -104
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +106 -105
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +107 -106
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +170 -0
- package/image/Image.vue +49 -21
- package/image/image.cjs.js +94 -59
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +94 -60
- package/image/image.esm.min.js +1 -1
- package/image/image.js +95 -61
- package/image/image.min.js +1 -1
- package/inputmask/InputMask.d.ts +25 -0
- package/inputmask/InputMask.vue +3 -1
- package/inputmask/inputmask.cjs.js +9 -3
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +6 -4
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +10 -5
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +69 -0
- package/inputnumber/InputNumber.vue +13 -11
- package/inputnumber/inputnumber.cjs.js +19 -28
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +19 -29
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +20 -30
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +51 -0
- package/inputswitch/InputSwitch.vue +7 -4
- package/inputswitch/inputswitch.cjs.js +15 -11
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +12 -12
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +16 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.d.ts +25 -0
- package/inputtext/InputText.vue +4 -1
- package/inputtext/inputtext.cjs.js +9 -3
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +6 -4
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +10 -5
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +78 -0
- package/knob/Knob.vue +8 -4
- package/knob/knob.cjs.js +17 -13
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +14 -14
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +18 -15
- package/knob/knob.min.js +1 -1
- package/listbox/Listbox.d.ts +137 -1
- package/listbox/Listbox.vue +28 -15
- package/listbox/listbox.cjs.js +83 -78
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +83 -79
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +84 -80
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +5 -5
- package/menu/Menu.d.ts +4 -4
- package/menubar/Menubar.d.ts +1 -1
- package/multiselect/MultiSelect.d.ts +223 -1
- package/multiselect/MultiSelect.vue +72 -41
- package/multiselect/multiselect.cjs.js +156 -151
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +156 -152
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +157 -153
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +94 -0
- package/orderlist/OrderList.vue +38 -18
- package/orderlist/orderlist.cjs.js +50 -36
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +50 -37
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +51 -38
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +129 -0
- package/organizationchart/OrganizationChart.vue +14 -2
- package/organizationchart/OrganizationChartNode.vue +37 -16
- package/organizationchart/organizationchart.cjs.js +77 -61
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +77 -62
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +78 -63
- package/organizationchart/organizationchart.min.js +1 -1
- package/package.json +1 -1
- package/paginator/CurrentPageReport.vue +5 -1
- package/paginator/FirstPageLink.vue +13 -2
- package/paginator/JumpToPageDropdown.vue +3 -1
- package/paginator/JumpToPageInput.vue +3 -1
- package/paginator/LastPageLink.vue +13 -2
- package/paginator/NextPageLink.vue +13 -2
- package/paginator/PageLinks.vue +12 -2
- package/paginator/Paginator.d.ts +133 -0
- package/paginator/Paginator.vue +23 -12
- package/paginator/PrevPageLink.vue +13 -2
- package/paginator/RowsPerPageDropdown.vue +3 -1
- package/paginator/paginator.cjs.js +135 -76
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +135 -77
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +136 -78
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +4 -8
- package/password/Password.d.ts +104 -0
- package/password/Password.vue +11 -9
- package/password/password.cjs.js +26 -28
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +26 -29
- package/password/password.esm.min.js +1 -1
- package/password/password.js +27 -30
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +160 -0
- package/picklist/PickList.vue +46 -34
- package/picklist/picklist.cjs.js +111 -85
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +111 -86
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +112 -87
- package/picklist/picklist.min.js +1 -1
- package/radiobutton/RadioButton.d.ts +55 -0
- package/radiobutton/RadioButton.vue +7 -5
- package/radiobutton/radiobutton.cjs.js +19 -16
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +16 -17
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +20 -18
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +96 -0
- package/rating/Rating.vue +32 -9
- package/rating/rating.cjs.js +41 -34
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +41 -35
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +42 -36
- package/rating/rating.min.js +1 -1
- package/row/Row.d.ts +29 -0
- package/row/Row.vue +3 -0
- package/row/row.cjs.js +7 -0
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +3 -0
- package/row/row.esm.min.js +1 -1
- package/row/row.js +7 -2
- package/row/row.min.js +1 -1
- package/selectbutton/SelectButton.d.ts +68 -0
- package/selectbutton/SelectButton.vue +13 -2
- package/selectbutton/selectbutton.cjs.js +20 -10
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +20 -11
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +21 -12
- package/selectbutton/selectbutton.min.js +1 -1
- package/slider/Slider.d.ts +48 -0
- package/slider/Slider.vue +7 -2
- package/slider/slider.cjs.js +22 -16
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +19 -17
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +23 -18
- package/slider/slider.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +0 -4
- package/splitbutton/SplitButton.vue +2 -2
- package/splitbutton/splitbutton.cjs.js +7 -6
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +7 -6
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +7 -6
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +3 -3
- package/textarea/Textarea.d.ts +32 -0
- package/textarea/Textarea.vue +4 -1
- package/textarea/textarea.cjs.js +9 -3
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +6 -4
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +10 -5
- package/textarea/textarea.min.js +1 -1
- package/timeline/Timeline.d.ts +49 -0
- package/timeline/Timeline.vue +9 -7
- package/timeline/timeline.cjs.js +19 -21
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +16 -22
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +20 -23
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.d.ts +4 -0
- package/toast/Toast.vue +1 -1
- package/toast/toast.cjs.js +3 -3
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +3 -3
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +3 -3
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +59 -0
- package/togglebutton/ToggleButton.vue +7 -5
- package/togglebutton/togglebutton.cjs.js +15 -14
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +15 -15
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +16 -16
- package/togglebutton/togglebutton.min.js +1 -1
- package/tooltip/Tooltip.d.ts +10 -0
- package/tooltip/tooltip.cjs.js +51 -9
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +52 -10
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +51 -9
- package/tooltip/tooltip.min.js +1 -1
- package/tree/Tree.d.ts +137 -0
- package/tree/Tree.vue +12 -9
- package/tree/TreeNode.vue +23 -10
- package/tree/tree.cjs.js +85 -79
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +85 -80
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +86 -81
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +103 -1
- package/treeselect/TreeSelect.vue +15 -12
- package/treeselect/treeselect.cjs.js +37 -39
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +37 -40
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +38 -41
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +38 -10
- package/treetable/FooterCell.vue +15 -1
- package/treetable/HeaderCell.vue +28 -5
- package/treetable/TreeTable.d.ts +162 -0
- package/treetable/TreeTable.vue +25 -19
- package/treetable/TreeTableRow.vue +5 -0
- package/treetable/treetable.cjs.js +205 -158
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +205 -159
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +206 -160
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +93 -0
- package/tristatecheckbox/TriStateCheckbox.vue +19 -8
- package/tristatecheckbox/tristatecheckbox.cjs.js +31 -22
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +31 -23
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +32 -24
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +3 -1
- package/vetur-attributes.json +180 -0
- package/vetur-tags.json +94 -39
- package/virtualscroller/VirtualScroller.d.ts +97 -0
- package/virtualscroller/VirtualScroller.vue +7 -5
- package/virtualscroller/virtualscroller.cjs.js +22 -19
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +22 -20
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +23 -21
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +467 -3
- package/datatable/TableLoadingBody.vue +0 -25
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import BaseComponent from 'primevue/basecomponent';
|
|
1
2
|
import { UniqueComponentId } from 'primevue/utils';
|
|
2
|
-
import { openBlock, createElementBlock, toDisplayString, resolveDirective, withDirectives,
|
|
3
|
+
import { openBlock, createElementBlock, mergeProps, toDisplayString, resolveDirective, withDirectives, createBlock, resolveDynamicComponent, resolveComponent, Fragment, renderList, createTextVNode, normalizeProps, renderSlot, createCommentVNode } from 'vue';
|
|
3
4
|
import AngleDoubleLeftIcon from 'primevue/icons/angledoubleleft';
|
|
4
5
|
import Ripple from 'primevue/ripple';
|
|
5
6
|
import Dropdown from 'primevue/dropdown';
|
|
@@ -10,6 +11,7 @@ import AngleLeftIcon from 'primevue/icons/angleleft';
|
|
|
10
11
|
|
|
11
12
|
var script$9 = {
|
|
12
13
|
name: 'CurrentPageReport',
|
|
14
|
+
extends: BaseComponent,
|
|
13
15
|
props: {
|
|
14
16
|
pageCount: {
|
|
15
17
|
type: Number,
|
|
@@ -55,22 +57,30 @@ var script$9 = {
|
|
|
55
57
|
}
|
|
56
58
|
};
|
|
57
59
|
|
|
58
|
-
const _hoisted_1$2 = { class: "p-paginator-current" };
|
|
59
|
-
|
|
60
60
|
function render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
61
|
-
return (openBlock(), createElementBlock("span",
|
|
61
|
+
return (openBlock(), createElementBlock("span", mergeProps({ class: "p-paginator-current" }, _ctx.ptm('current')), toDisplayString($options.text), 17))
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
script$9.render = render$9;
|
|
65
65
|
|
|
66
66
|
var script$8 = {
|
|
67
67
|
name: 'FirstPageLink',
|
|
68
|
+
extends: BaseComponent,
|
|
68
69
|
props: {
|
|
69
70
|
template: {
|
|
70
71
|
type: Function,
|
|
71
72
|
default: null
|
|
72
73
|
}
|
|
73
74
|
},
|
|
75
|
+
methods: {
|
|
76
|
+
getPTOptions(key) {
|
|
77
|
+
return this.ptm(key, {
|
|
78
|
+
context: {
|
|
79
|
+
disabled: this.$attrs.disabled
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
},
|
|
74
84
|
computed: {
|
|
75
85
|
containerClass() {
|
|
76
86
|
return [
|
|
@@ -92,12 +102,12 @@ var script$8 = {
|
|
|
92
102
|
function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
93
103
|
const _directive_ripple = resolveDirective("ripple");
|
|
94
104
|
|
|
95
|
-
return withDirectives((openBlock(), createElementBlock("button", {
|
|
96
|
-
class:
|
|
105
|
+
return withDirectives((openBlock(), createElementBlock("button", mergeProps({
|
|
106
|
+
class: $options.containerClass,
|
|
97
107
|
type: "button"
|
|
98
|
-
}, [
|
|
99
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.template || 'AngleDoubleLeftIcon'), { class: "p-paginator-icon" }))
|
|
100
|
-
],
|
|
108
|
+
}, $options.getPTOptions('firstPageButton')), [
|
|
109
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.template || 'AngleDoubleLeftIcon'), mergeProps({ class: "p-paginator-icon" }, $options.getPTOptions('firstPageIcon')), null, 16))
|
|
110
|
+
], 16)), [
|
|
101
111
|
[_directive_ripple]
|
|
102
112
|
])
|
|
103
113
|
}
|
|
@@ -106,6 +116,7 @@ script$8.render = render$8;
|
|
|
106
116
|
|
|
107
117
|
var script$7 = {
|
|
108
118
|
name: 'JumpToPageDropdown',
|
|
119
|
+
extends: BaseComponent,
|
|
109
120
|
emits: ['page-change'],
|
|
110
121
|
props: {
|
|
111
122
|
page: Number,
|
|
@@ -143,14 +154,16 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
143
154
|
optionValue: "value",
|
|
144
155
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ($options.onChange($event))),
|
|
145
156
|
class: "p-paginator-page-options",
|
|
146
|
-
disabled: $props.disabled
|
|
147
|
-
|
|
157
|
+
disabled: $props.disabled,
|
|
158
|
+
pt: _ctx.ptm('JTPDropdown')
|
|
159
|
+
}, null, 8, ["modelValue", "options", "disabled", "pt"]))
|
|
148
160
|
}
|
|
149
161
|
|
|
150
162
|
script$7.render = render$7;
|
|
151
163
|
|
|
152
164
|
var script$6 = {
|
|
153
165
|
name: 'JumpToPageInput',
|
|
166
|
+
extends: BaseComponent,
|
|
154
167
|
inheritAttrs: false,
|
|
155
168
|
emits: ['page-change'],
|
|
156
169
|
props: {
|
|
@@ -195,20 +208,31 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
195
208
|
class: "p-paginator-page-input",
|
|
196
209
|
"aria-label": $options.inputArialabel,
|
|
197
210
|
disabled: $props.disabled,
|
|
198
|
-
"onUpdate:modelValue": $options.onChange
|
|
199
|
-
|
|
211
|
+
"onUpdate:modelValue": $options.onChange,
|
|
212
|
+
pt: _ctx.ptm('JTPInput')
|
|
213
|
+
}, null, 8, ["modelValue", "aria-label", "disabled", "onUpdate:modelValue", "pt"]))
|
|
200
214
|
}
|
|
201
215
|
|
|
202
216
|
script$6.render = render$6;
|
|
203
217
|
|
|
204
218
|
var script$5 = {
|
|
205
219
|
name: 'LastPageLink',
|
|
220
|
+
extends: BaseComponent,
|
|
206
221
|
props: {
|
|
207
222
|
template: {
|
|
208
223
|
type: Function,
|
|
209
224
|
default: null
|
|
210
225
|
}
|
|
211
226
|
},
|
|
227
|
+
methods: {
|
|
228
|
+
getPTOptions(key) {
|
|
229
|
+
return this.ptm(key, {
|
|
230
|
+
context: {
|
|
231
|
+
disabled: this.$attrs.disabled
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
},
|
|
212
236
|
computed: {
|
|
213
237
|
containerClass() {
|
|
214
238
|
return [
|
|
@@ -230,12 +254,12 @@ var script$5 = {
|
|
|
230
254
|
function render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
231
255
|
const _directive_ripple = resolveDirective("ripple");
|
|
232
256
|
|
|
233
|
-
return withDirectives((openBlock(), createElementBlock("button", {
|
|
234
|
-
class:
|
|
257
|
+
return withDirectives((openBlock(), createElementBlock("button", mergeProps({
|
|
258
|
+
class: $options.containerClass,
|
|
235
259
|
type: "button"
|
|
236
|
-
}, [
|
|
237
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.template || 'AngleDoubleRightIcon'), { class: "p-paginator-icon" }))
|
|
238
|
-
],
|
|
260
|
+
}, $options.getPTOptions('lastPageButton')), [
|
|
261
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.template || 'AngleDoubleRightIcon'), mergeProps({ class: "p-paginator-icon" }, $options.getPTOptions('lastPageIcon')), null, 16))
|
|
262
|
+
], 16)), [
|
|
239
263
|
[_directive_ripple]
|
|
240
264
|
])
|
|
241
265
|
}
|
|
@@ -244,12 +268,22 @@ script$5.render = render$5;
|
|
|
244
268
|
|
|
245
269
|
var script$4 = {
|
|
246
270
|
name: 'NextPageLink',
|
|
271
|
+
extends: BaseComponent,
|
|
247
272
|
props: {
|
|
248
273
|
template: {
|
|
249
274
|
type: Function,
|
|
250
275
|
default: null
|
|
251
276
|
}
|
|
252
277
|
},
|
|
278
|
+
methods: {
|
|
279
|
+
getPTOptions(key) {
|
|
280
|
+
return this.ptm(key, {
|
|
281
|
+
context: {
|
|
282
|
+
disabled: this.$attrs.disabled
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
},
|
|
253
287
|
computed: {
|
|
254
288
|
containerClass() {
|
|
255
289
|
return [
|
|
@@ -271,12 +305,12 @@ var script$4 = {
|
|
|
271
305
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
272
306
|
const _directive_ripple = resolveDirective("ripple");
|
|
273
307
|
|
|
274
|
-
return withDirectives((openBlock(), createElementBlock("button", {
|
|
275
|
-
class:
|
|
308
|
+
return withDirectives((openBlock(), createElementBlock("button", mergeProps({
|
|
309
|
+
class: $options.containerClass,
|
|
276
310
|
type: "button"
|
|
277
|
-
}, [
|
|
278
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.template || 'AngleRightIcon'), { class: "p-paginator-icon" }))
|
|
279
|
-
],
|
|
311
|
+
}, $options.getPTOptions('nextPageButton')), [
|
|
312
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.template || 'AngleRightIcon'), mergeProps({ class: "p-paginator-icon" }, $options.getPTOptions('nextPageIcon')), null, 16))
|
|
313
|
+
], 16)), [
|
|
280
314
|
[_directive_ripple]
|
|
281
315
|
])
|
|
282
316
|
}
|
|
@@ -285,6 +319,7 @@ script$4.render = render$4;
|
|
|
285
319
|
|
|
286
320
|
var script$3 = {
|
|
287
321
|
name: 'PageLinks',
|
|
322
|
+
extends: BaseComponent,
|
|
288
323
|
inheritAttrs: false,
|
|
289
324
|
emits: ['click'],
|
|
290
325
|
props: {
|
|
@@ -292,6 +327,13 @@ var script$3 = {
|
|
|
292
327
|
page: Number
|
|
293
328
|
},
|
|
294
329
|
methods: {
|
|
330
|
+
getPTOptions(pageLink, key) {
|
|
331
|
+
return this.ptm(key, {
|
|
332
|
+
context: {
|
|
333
|
+
active: pageLink === this.page
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
},
|
|
295
337
|
onPageLinkClick(event, pageLink) {
|
|
296
338
|
this.$emit('click', {
|
|
297
339
|
originalEvent: event,
|
|
@@ -302,46 +344,54 @@ var script$3 = {
|
|
|
302
344
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g, value) : undefined;
|
|
303
345
|
}
|
|
304
346
|
},
|
|
305
|
-
computed: {},
|
|
306
347
|
directives: {
|
|
307
348
|
ripple: Ripple
|
|
308
349
|
}
|
|
309
350
|
};
|
|
310
351
|
|
|
311
|
-
const _hoisted_1
|
|
312
|
-
const _hoisted_2$1 = ["aria-label", "aria-current", "onClick"];
|
|
352
|
+
const _hoisted_1 = ["aria-label", "aria-current", "onClick"];
|
|
313
353
|
|
|
314
354
|
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
315
355
|
const _directive_ripple = resolveDirective("ripple");
|
|
316
356
|
|
|
317
|
-
return (openBlock(), createElementBlock("span",
|
|
357
|
+
return (openBlock(), createElementBlock("span", mergeProps({ class: "p-paginator-pages" }, _ctx.ptm('pages')), [
|
|
318
358
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.value, (pageLink) => {
|
|
319
|
-
return withDirectives((openBlock(), createElementBlock("button", {
|
|
359
|
+
return withDirectives((openBlock(), createElementBlock("button", mergeProps({
|
|
320
360
|
key: pageLink,
|
|
321
|
-
class:
|
|
361
|
+
class: ['p-paginator-page p-paginator-element p-link', { 'p-highlight': pageLink - 1 === $props.page }],
|
|
322
362
|
type: "button",
|
|
323
363
|
"aria-label": $options.ariaPageLabel(pageLink),
|
|
324
364
|
"aria-current": pageLink - 1 === $props.page ? 'page' : undefined,
|
|
325
365
|
onClick: $event => ($options.onPageLinkClick($event, pageLink))
|
|
326
|
-
}, [
|
|
366
|
+
}, $options.getPTOptions(pageLink - 1, 'pageButton')), [
|
|
327
367
|
createTextVNode(toDisplayString(pageLink), 1)
|
|
328
|
-
],
|
|
368
|
+
], 16, _hoisted_1)), [
|
|
329
369
|
[_directive_ripple]
|
|
330
370
|
])
|
|
331
371
|
}), 128))
|
|
332
|
-
]))
|
|
372
|
+
], 16))
|
|
333
373
|
}
|
|
334
374
|
|
|
335
375
|
script$3.render = render$3;
|
|
336
376
|
|
|
337
377
|
var script$2 = {
|
|
338
378
|
name: 'PrevPageLink',
|
|
379
|
+
extends: BaseComponent,
|
|
339
380
|
props: {
|
|
340
381
|
template: {
|
|
341
382
|
type: Function,
|
|
342
383
|
default: null
|
|
343
384
|
}
|
|
344
385
|
},
|
|
386
|
+
methods: {
|
|
387
|
+
getPTOptions(key) {
|
|
388
|
+
return this.ptm(key, {
|
|
389
|
+
context: {
|
|
390
|
+
disabled: this.$attrs.disabled
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
},
|
|
345
395
|
computed: {
|
|
346
396
|
containerClass() {
|
|
347
397
|
return [
|
|
@@ -363,12 +413,12 @@ var script$2 = {
|
|
|
363
413
|
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
364
414
|
const _directive_ripple = resolveDirective("ripple");
|
|
365
415
|
|
|
366
|
-
return withDirectives((openBlock(), createElementBlock("button", {
|
|
367
|
-
class:
|
|
416
|
+
return withDirectives((openBlock(), createElementBlock("button", mergeProps({
|
|
417
|
+
class: $options.containerClass,
|
|
368
418
|
type: "button"
|
|
369
|
-
}, [
|
|
370
|
-
(openBlock(), createBlock(resolveDynamicComponent($props.template || 'AngleLeftIcon'), { class: "p-paginator-icon" }))
|
|
371
|
-
],
|
|
419
|
+
}, $options.getPTOptions('prevPageButton')), [
|
|
420
|
+
(openBlock(), createBlock(resolveDynamicComponent($props.template || 'AngleLeftIcon'), mergeProps({ class: "p-paginator-icon" }, $options.getPTOptions('prevPageIcon')), null, 16))
|
|
421
|
+
], 16)), [
|
|
372
422
|
[_directive_ripple]
|
|
373
423
|
])
|
|
374
424
|
}
|
|
@@ -377,6 +427,7 @@ script$2.render = render$2;
|
|
|
377
427
|
|
|
378
428
|
var script$1 = {
|
|
379
429
|
name: 'RowsPerPageDropdown',
|
|
430
|
+
extends: BaseComponent,
|
|
380
431
|
emits: ['rows-change'],
|
|
381
432
|
props: {
|
|
382
433
|
options: Array,
|
|
@@ -416,14 +467,16 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
416
467
|
optionValue: "value",
|
|
417
468
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ($options.onChange($event))),
|
|
418
469
|
class: "p-paginator-rpp-options",
|
|
419
|
-
disabled: $props.disabled
|
|
420
|
-
|
|
470
|
+
disabled: $props.disabled,
|
|
471
|
+
pt: _ctx.ptm('RPPDropdown')
|
|
472
|
+
}, null, 8, ["modelValue", "options", "disabled", "pt"]))
|
|
421
473
|
}
|
|
422
474
|
|
|
423
475
|
script$1.render = render$1;
|
|
424
476
|
|
|
425
477
|
var script = {
|
|
426
478
|
name: 'Paginator',
|
|
479
|
+
extends: BaseComponent,
|
|
427
480
|
emits: ['update:first', 'update:rows', 'page'],
|
|
428
481
|
props: {
|
|
429
482
|
totalRecords: {
|
|
@@ -696,16 +749,6 @@ var script = {
|
|
|
696
749
|
}
|
|
697
750
|
};
|
|
698
751
|
|
|
699
|
-
const _hoisted_1 = { key: 0 };
|
|
700
|
-
const _hoisted_2 = {
|
|
701
|
-
key: 0,
|
|
702
|
-
class: "p-paginator-left-content"
|
|
703
|
-
};
|
|
704
|
-
const _hoisted_3 = {
|
|
705
|
-
key: 1,
|
|
706
|
-
class: "p-paginator-right-content"
|
|
707
|
-
};
|
|
708
|
-
|
|
709
752
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
710
753
|
const _component_FirstPageLink = resolveComponent("FirstPageLink");
|
|
711
754
|
const _component_PrevPageLink = resolveComponent("PrevPageLink");
|
|
@@ -718,18 +761,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
718
761
|
const _component_JumpToPageInput = resolveComponent("JumpToPageInput");
|
|
719
762
|
|
|
720
763
|
return ($props.alwaysShow ? true : $options.pageLinks && $options.pageLinks.length > 1)
|
|
721
|
-
? (openBlock(), createElementBlock("nav",
|
|
764
|
+
? (openBlock(), createElementBlock("nav", normalizeProps(mergeProps({ key: 0 }, _ctx.ptm('root'))), [
|
|
722
765
|
(openBlock(true), createElementBlock(Fragment, null, renderList($options.templateItems, (value, key) => {
|
|
723
|
-
return (openBlock(), createElementBlock("div", {
|
|
766
|
+
return (openBlock(), createElementBlock("div", mergeProps({
|
|
724
767
|
key: key,
|
|
725
768
|
ref_for: true,
|
|
726
769
|
ref: "paginator",
|
|
727
|
-
class:
|
|
728
|
-
}, [
|
|
770
|
+
class: ["p-paginator p-component", $options.getPaginatorClasses(key)]
|
|
771
|
+
}, _ctx.ptm('paginator')), [
|
|
729
772
|
(_ctx.$slots.start)
|
|
730
|
-
? (openBlock(), createElementBlock("div",
|
|
773
|
+
? (openBlock(), createElementBlock("div", mergeProps({
|
|
774
|
+
key: 0,
|
|
775
|
+
class: "p-paginator-left-content"
|
|
776
|
+
}, _ctx.ptm('left')), [
|
|
731
777
|
renderSlot(_ctx.$slots, "start", { state: $options.currentState })
|
|
732
|
-
]))
|
|
778
|
+
], 16))
|
|
733
779
|
: createCommentVNode("", true),
|
|
734
780
|
(openBlock(true), createElementBlock(Fragment, null, renderList(value, (item) => {
|
|
735
781
|
return (openBlock(), createElementBlock(Fragment, { key: item }, [
|
|
@@ -739,40 +785,45 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
739
785
|
"aria-label": $options.getAriaLabel('firstPageLabel'),
|
|
740
786
|
template: _ctx.$slots.firstpagelinkicon,
|
|
741
787
|
onClick: _cache[0] || (_cache[0] = $event => ($options.changePageToFirst($event))),
|
|
742
|
-
disabled: $options.isFirstPage || $options.empty
|
|
743
|
-
|
|
788
|
+
disabled: $options.isFirstPage || $options.empty,
|
|
789
|
+
pt: _ctx.pt
|
|
790
|
+
}, null, 8, ["aria-label", "template", "disabled", "pt"]))
|
|
744
791
|
: (item === 'PrevPageLink')
|
|
745
792
|
? (openBlock(), createBlock(_component_PrevPageLink, {
|
|
746
793
|
key: 1,
|
|
747
794
|
"aria-label": $options.getAriaLabel('prevPageLabel'),
|
|
748
795
|
template: _ctx.$slots.prevpagelinkicon,
|
|
749
796
|
onClick: _cache[1] || (_cache[1] = $event => ($options.changePageToPrev($event))),
|
|
750
|
-
disabled: $options.isFirstPage || $options.empty
|
|
751
|
-
|
|
797
|
+
disabled: $options.isFirstPage || $options.empty,
|
|
798
|
+
pt: _ctx.pt
|
|
799
|
+
}, null, 8, ["aria-label", "template", "disabled", "pt"]))
|
|
752
800
|
: (item === 'NextPageLink')
|
|
753
801
|
? (openBlock(), createBlock(_component_NextPageLink, {
|
|
754
802
|
key: 2,
|
|
755
803
|
"aria-label": $options.getAriaLabel('nextPageLabel'),
|
|
756
804
|
template: _ctx.$slots.nextpagelinkicon,
|
|
757
805
|
onClick: _cache[2] || (_cache[2] = $event => ($options.changePageToNext($event))),
|
|
758
|
-
disabled: $options.isLastPage || $options.empty
|
|
759
|
-
|
|
806
|
+
disabled: $options.isLastPage || $options.empty,
|
|
807
|
+
pt: _ctx.pt
|
|
808
|
+
}, null, 8, ["aria-label", "template", "disabled", "pt"]))
|
|
760
809
|
: (item === 'LastPageLink')
|
|
761
810
|
? (openBlock(), createBlock(_component_LastPageLink, {
|
|
762
811
|
key: 3,
|
|
763
812
|
"aria-label": $options.getAriaLabel('lastPageLabel'),
|
|
764
813
|
template: _ctx.$slots.lastpagelinkicon,
|
|
765
814
|
onClick: _cache[3] || (_cache[3] = $event => ($options.changePageToLast($event))),
|
|
766
|
-
disabled: $options.isLastPage || $options.empty
|
|
767
|
-
|
|
815
|
+
disabled: $options.isLastPage || $options.empty,
|
|
816
|
+
pt: _ctx.pt
|
|
817
|
+
}, null, 8, ["aria-label", "template", "disabled", "pt"]))
|
|
768
818
|
: (item === 'PageLinks')
|
|
769
819
|
? (openBlock(), createBlock(_component_PageLinks, {
|
|
770
820
|
key: 4,
|
|
771
821
|
"aria-label": $options.getAriaLabel('pageLabel'),
|
|
772
822
|
value: $options.pageLinks,
|
|
773
823
|
page: $options.page,
|
|
774
|
-
onClick: _cache[4] || (_cache[4] = $event => ($options.changePageLink($event)))
|
|
775
|
-
|
|
824
|
+
onClick: _cache[4] || (_cache[4] = $event => ($options.changePageLink($event))),
|
|
825
|
+
pt: _ctx.pt
|
|
826
|
+
}, null, 8, ["aria-label", "value", "page", "pt"]))
|
|
776
827
|
: (item === 'CurrentPageReport')
|
|
777
828
|
? (openBlock(), createBlock(_component_CurrentPageReport, {
|
|
778
829
|
key: 5,
|
|
@@ -783,8 +834,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
783
834
|
pageCount: $options.pageCount,
|
|
784
835
|
first: $data.d_first,
|
|
785
836
|
rows: $data.d_rows,
|
|
786
|
-
totalRecords: $props.totalRecords
|
|
787
|
-
|
|
837
|
+
totalRecords: $props.totalRecords,
|
|
838
|
+
pt: _ctx.pt
|
|
839
|
+
}, null, 8, ["template", "currentPage", "page", "pageCount", "first", "rows", "totalRecords", "pt"]))
|
|
788
840
|
: (item === 'RowsPerPageDropdown' && $props.rowsPerPageOptions)
|
|
789
841
|
? (openBlock(), createBlock(_component_RowsPerPageDropdown, {
|
|
790
842
|
key: 6,
|
|
@@ -792,8 +844,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
792
844
|
rows: $data.d_rows,
|
|
793
845
|
options: $props.rowsPerPageOptions,
|
|
794
846
|
onRowsChange: _cache[5] || (_cache[5] = $event => ($options.onRowChange($event))),
|
|
795
|
-
disabled: $options.empty
|
|
796
|
-
|
|
847
|
+
disabled: $options.empty,
|
|
848
|
+
pt: _ctx.pt
|
|
849
|
+
}, null, 8, ["aria-label", "rows", "options", "disabled", "pt"]))
|
|
797
850
|
: (item === 'JumpToPageDropdown')
|
|
798
851
|
? (openBlock(), createBlock(_component_JumpToPageDropdown, {
|
|
799
852
|
key: 7,
|
|
@@ -801,26 +854,31 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
801
854
|
page: $options.page,
|
|
802
855
|
pageCount: $options.pageCount,
|
|
803
856
|
onPageChange: _cache[6] || (_cache[6] = $event => ($options.changePage($event))),
|
|
804
|
-
disabled: $options.empty
|
|
805
|
-
|
|
857
|
+
disabled: $options.empty,
|
|
858
|
+
pt: _ctx.pt
|
|
859
|
+
}, null, 8, ["aria-label", "page", "pageCount", "disabled", "pt"]))
|
|
806
860
|
: (item === 'JumpToPageInput')
|
|
807
861
|
? (openBlock(), createBlock(_component_JumpToPageInput, {
|
|
808
862
|
key: 8,
|
|
809
863
|
page: $options.currentPage,
|
|
810
864
|
onPageChange: _cache[7] || (_cache[7] = $event => ($options.changePage($event))),
|
|
811
|
-
disabled: $options.empty
|
|
812
|
-
|
|
865
|
+
disabled: $options.empty,
|
|
866
|
+
pt: _ctx.pt
|
|
867
|
+
}, null, 8, ["page", "disabled", "pt"]))
|
|
813
868
|
: createCommentVNode("", true)
|
|
814
869
|
], 64))
|
|
815
870
|
}), 128)),
|
|
816
871
|
(_ctx.$slots.end)
|
|
817
|
-
? (openBlock(), createElementBlock("div",
|
|
872
|
+
? (openBlock(), createElementBlock("div", mergeProps({
|
|
873
|
+
key: 1,
|
|
874
|
+
class: "p-paginator-right-content"
|
|
875
|
+
}, _ctx.ptm('end')), [
|
|
818
876
|
renderSlot(_ctx.$slots, "end", { state: $options.currentState })
|
|
819
|
-
]))
|
|
877
|
+
], 16))
|
|
820
878
|
: createCommentVNode("", true)
|
|
821
|
-
],
|
|
879
|
+
], 16))
|
|
822
880
|
}), 128))
|
|
823
|
-
]))
|
|
881
|
+
], 16))
|
|
824
882
|
: createCommentVNode("", true)
|
|
825
883
|
}
|
|
826
884
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{UniqueComponentId as e}from"primevue/utils";import{openBlock as t,createElementBlock as a,toDisplayString as n,resolveDirective as i,withDirectives as r,normalizeClass as o,createBlock as s,resolveDynamicComponent as p,resolveComponent as l,Fragment as g,renderList as u,createTextVNode as d,renderSlot as c,createCommentVNode as h}from"vue";import m from"primevue/icons/angledoubleleft";import P from"primevue/ripple";import f from"primevue/dropdown";import b from"primevue/inputnumber";import k from"primevue/icons/angledoubleright";import L from"primevue/icons/angleright";import y from"primevue/icons/angleleft";var v={name:"CurrentPageReport",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 w={class:"p-paginator-current"};v.render=function(e,i,r,o,s,p){return t(),a("span",w,n(p.text),1)};var C={name:"FirstPageLink",props:{template:{type:Function,default:null}},computed:{containerClass(){return["p-paginator-first p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},components:{AngleDoubleLeftIcon:m},directives:{ripple:P}};C.render=function(e,n,l,g,u,d){const c=i("ripple");return r((t(),a("button",{class:o(d.containerClass),type:"button"},[(t(),s(p(l.template||"AngleDoubleLeftIcon"),{class:"p-paginator-icon"}))],2)),[[c]])};var $={name:"JumpToPageDropdown",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:f}};$.render=function(e,a,n,i,r,o){const p=l("JTPDropdown");return t(),s(p,{modelValue:n.page,options:o.pageOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":a[0]||(a[0]=e=>o.onChange(e)),class:"p-paginator-page-options",disabled:n.disabled},null,8,["modelValue","options","disabled"])};var R={name:"JumpToPageInput",inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},data(){return{d_page:this.page}},watch:{page(e){this.d_page=e}},methods:{onChange(e){e!==this.page&&(this.d_page=e,this.$emit("page-change",e-1))}},computed:{inputArialabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.jumpToPageInputLabel:void 0}},components:{JTPInput:b}};R.render=function(e,a,n,i,r,o){const p=l("JTPInput");return t(),s(p,{ref:"jtpInput",modelValue:r.d_page,class:"p-paginator-page-input","aria-label":o.inputArialabel,disabled:n.disabled,"onUpdate:modelValue":o.onChange},null,8,["modelValue","aria-label","disabled","onUpdate:modelValue"])};var x={name:"LastPageLink",props:{template:{type:Function,default:null}},computed:{containerClass(){return["p-paginator-last p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},components:{AngleDoubleRightIcon:k},directives:{ripple:P}};x.render=function(e,n,l,g,u,d){const c=i("ripple");return r((t(),a("button",{class:o(d.containerClass),type:"button"},[(t(),s(p(l.template||"AngleDoubleRightIcon"),{class:"p-paginator-icon"}))],2)),[[c]])};var T={name:"NextPageLink",props:{template:{type:Function,default:null}},computed:{containerClass(){return["p-paginator-next p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},components:{AngleRightIcon:L},directives:{ripple:P}};T.render=function(e,n,l,g,u,d){const c=i("ripple");return r((t(),a("button",{class:o(d.containerClass),type:"button"},[(t(),s(p(l.template||"AngleRightIcon"),{class:"p-paginator-icon"}))],2)),[[c]])};var A={name:"PageLinks",inheritAttrs:!1,emits:["click"],props:{value:Array,page:Number},methods:{onPageLinkClick(e,t){this.$emit("click",{originalEvent:e,value:t})},ariaPageLabel(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},computed:{},directives:{ripple:P}};const N={class:"p-paginator-pages"},_=["aria-label","aria-current","onClick"];A.render=function(e,s,p,l,c,h){const m=i("ripple");return t(),a("span",N,[(t(!0),a(g,null,u(p.value,(e=>r((t(),a("button",{key:e,class:o(["p-paginator-page p-paginator-element p-link",{"p-highlight":e-1===p.page}]),type:"button","aria-label":h.ariaPageLabel(e),"aria-current":e-1===p.page?"page":void 0,onClick:t=>h.onPageLinkClick(t,e)},[d(n(e),1)],10,_)),[[m]]))),128))])};var D={name:"PrevPageLink",props:{template:{type:Function,default:null}},computed:{containerClass(){return["p-paginator-prev p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},components:{AngleLeftIcon:y},directives:{ripple:P}};D.render=function(e,n,l,g,u,d){const c=i("ripple");return r((t(),a("button",{class:o(d.containerClass),type:"button"},[(t(),s(p(l.template||"AngleLeftIcon"),{class:"p-paginator-icon"}))],2)),[[c]])};var S={name:"RowsPerPageDropdown",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:f}};S.render=function(e,a,n,i,r,o){const p=l("RPPDropdown");return t(),s(p,{modelValue:n.rows,options:o.rowsOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":a[0]||(a[0]=e=>o.onChange(e)),class:"p-paginator-rpp-options",disabled:n.disabled},null,8,["modelValue","options","disabled"])};var I={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:[Object,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)}},mounted(){this.setPaginatorAttribute(),this.createStyle()},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)},createStyle(){if(this.hasBreakpoints()){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";const t=Object.keys(this.template),a={};t.sort(((e,t)=>parseInt(e)-parseInt(t))).forEach((e=>{a[e]=this.template[e]}));for(const[t,[n]]of Object.entries(Object.entries(a))){const i=Object.entries(a)[t-1]?`and (min-width:${Object.keys(a)[t-1]})`:"";e+="default"===n?`\n @media screen ${i} {\n .paginator[${this.attributeSelector}],\n .p-paginator-default{\n display: flex !important;\n }\n }\n `:`\n .paginator[${this.attributeSelector}], .p-paginator-${n} {\n display: none !important;\n }\n @media screen ${i} and (max-width: ${n}) {\n .paginator[${this.attributeSelector}], .p-paginator-${n} {\n display: flex !important;\n }\n .paginator[${this.attributeSelector}],\n .p-paginator-default{\n display: none !important;\n }\n }\n `}this.styleElement.innerHTML=e}},hasBreakpoints(){return"object"==typeof this.template},getPaginatorClasses(e){return[{"p-paginator-default":!this.hasBreakpoints(),[`p-paginator-${e}`]:this.hasBreakpoints()}]},setPaginatorAttribute(){this.$refs.paginator&&this.$refs.paginator.length>=0&&[...this.$refs.paginator].forEach((e=>{e.setAttribute(this.attributeSelector,"")}))},getAriaLabel(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria[e]:void 0}},computed:{templateItems(){let e={};if(this.hasBreakpoints()){e=this.template,e.default||(e.default="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown");for(const t in e)e[t]=this.template[t].split(" ").map((e=>e.trim()));return e}return e.default=this.template.split(" ").map((e=>e.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},attributeSelector:()=>e()},components:{CurrentPageReport:v,FirstPageLink:C,LastPageLink:x,NextPageLink:T,PageLinks:A,PrevPageLink:D,RowsPerPageDropdown:S,JumpToPageDropdown:$,JumpToPageInput:R}};const F={key:0},B={key:0,class:"p-paginator-left-content"},O={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-default {\n display: flex;\n}\n.p-paginator {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n}\n.p-paginator-left-content {\n margin-right: auto;\n}\n.p-paginator-right-content {\n margin-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: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\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"),I.render=function(e,n,i,r,p,d){const m=l("FirstPageLink"),P=l("PrevPageLink"),f=l("NextPageLink"),b=l("LastPageLink"),k=l("PageLinks"),L=l("CurrentPageReport"),y=l("RowsPerPageDropdown"),v=l("JumpToPageDropdown"),w=l("JumpToPageInput");return i.alwaysShow||d.pageLinks&&d.pageLinks.length>1?(t(),a("nav",F,[(t(!0),a(g,null,u(d.templateItems,((r,l)=>(t(),a("div",{key:l,ref_for:!0,ref:"paginator",class:o(["p-paginator p-component",d.getPaginatorClasses(l)])},[e.$slots.start?(t(),a("div",B,[c(e.$slots,"start",{state:d.currentState})])):h("",!0),(t(!0),a(g,null,u(r,(r=>(t(),a(g,{key:r},["FirstPageLink"===r?(t(),s(m,{key:0,"aria-label":d.getAriaLabel("firstPageLabel"),template:e.$slots.firstpagelinkicon,onClick:n[0]||(n[0]=e=>d.changePageToFirst(e)),disabled:d.isFirstPage||d.empty},null,8,["aria-label","template","disabled"])):"PrevPageLink"===r?(t(),s(P,{key:1,"aria-label":d.getAriaLabel("prevPageLabel"),template:e.$slots.prevpagelinkicon,onClick:n[1]||(n[1]=e=>d.changePageToPrev(e)),disabled:d.isFirstPage||d.empty},null,8,["aria-label","template","disabled"])):"NextPageLink"===r?(t(),s(f,{key:2,"aria-label":d.getAriaLabel("nextPageLabel"),template:e.$slots.nextpagelinkicon,onClick:n[2]||(n[2]=e=>d.changePageToNext(e)),disabled:d.isLastPage||d.empty},null,8,["aria-label","template","disabled"])):"LastPageLink"===r?(t(),s(b,{key:3,"aria-label":d.getAriaLabel("lastPageLabel"),template:e.$slots.lastpagelinkicon,onClick:n[3]||(n[3]=e=>d.changePageToLast(e)),disabled:d.isLastPage||d.empty},null,8,["aria-label","template","disabled"])):"PageLinks"===r?(t(),s(k,{key:4,"aria-label":d.getAriaLabel("pageLabel"),value:d.pageLinks,page:d.page,onClick:n[4]||(n[4]=e=>d.changePageLink(e))},null,8,["aria-label","value","page"])):"CurrentPageReport"===r?(t(),s(L,{key:5,"aria-live":"polite",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"===r&&i.rowsPerPageOptions?(t(),s(y,{key:6,"aria-label":d.getAriaLabel("rowsPerPageLabel"),rows:p.d_rows,options:i.rowsPerPageOptions,onRowsChange:n[5]||(n[5]=e=>d.onRowChange(e)),disabled:d.empty},null,8,["aria-label","rows","options","disabled"])):"JumpToPageDropdown"===r?(t(),s(v,{key:7,"aria-label":d.getAriaLabel("jumpToPageDropdownLabel"),page:d.page,pageCount:d.pageCount,onPageChange:n[6]||(n[6]=e=>d.changePage(e)),disabled:d.empty},null,8,["aria-label","page","pageCount","disabled"])):"JumpToPageInput"===r?(t(),s(w,{key:8,page:d.currentPage,onPageChange:n[7]||(n[7]=e=>d.changePage(e)),disabled:d.empty},null,8,["page","disabled"])):h("",!0)],64)))),128)),e.$slots.end?(t(),a("div",O,[c(e.$slots,"end",{state:d.currentState})])):h("",!0)],2)))),128))])):h("",!0)};export{I as default};
|
|
1
|
+
import e from"primevue/basecomponent";import{UniqueComponentId as t}from"primevue/utils";import{openBlock as a,createElementBlock as n,mergeProps as i,toDisplayString as r,resolveDirective as s,withDirectives as o,createBlock as p,resolveDynamicComponent as l,resolveComponent as g,Fragment as u,renderList as d,createTextVNode as c,normalizeProps as m,renderSlot as h,createCommentVNode as P}from"vue";import b from"primevue/icons/angledoubleleft";import f from"primevue/ripple";import k from"primevue/dropdown";import L from"primevue/inputnumber";import v from"primevue/icons/angledoubleright";import y from"primevue/icons/angleright";import w from"primevue/icons/angleleft";var C={name:"CurrentPageReport",extends:e,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)}}};C.render=function(e,t,s,o,p,l){return a(),n("span",i({class:"p-paginator-current"},e.ptm("current")),r(l.text),17)};var x={name:"FirstPageLink",extends:e,props:{template:{type:Function,default:null}},methods:{getPTOptions(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},computed:{containerClass(){return["p-paginator-first p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},components:{AngleDoubleLeftIcon:b},directives:{ripple:f}};x.render=function(e,t,r,g,u,d){const c=s("ripple");return o((a(),n("button",i({class:d.containerClass,type:"button"},d.getPTOptions("firstPageButton")),[(a(),p(l(r.template||"AngleDoubleLeftIcon"),i({class:"p-paginator-icon"},d.getPTOptions("firstPageIcon")),null,16))],16)),[[c]])};var T={name:"JumpToPageDropdown",extends:e,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:k}};T.render=function(e,t,n,i,r,s){const o=g("JTPDropdown");return a(),p(o,{modelValue:n.page,options:s.pageOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":t[0]||(t[0]=e=>s.onChange(e)),class:"p-paginator-page-options",disabled:n.disabled,pt:e.ptm("JTPDropdown")},null,8,["modelValue","options","disabled","pt"])};var $={name:"JumpToPageInput",extends:e,inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},data(){return{d_page:this.page}},watch:{page(e){this.d_page=e}},methods:{onChange(e){e!==this.page&&(this.d_page=e,this.$emit("page-change",e-1))}},computed:{inputArialabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.jumpToPageInputLabel:void 0}},components:{JTPInput:L}};$.render=function(e,t,n,i,r,s){const o=g("JTPInput");return a(),p(o,{ref:"jtpInput",modelValue:r.d_page,class:"p-paginator-page-input","aria-label":s.inputArialabel,disabled:n.disabled,"onUpdate:modelValue":s.onChange,pt:e.ptm("JTPInput")},null,8,["modelValue","aria-label","disabled","onUpdate:modelValue","pt"])};var R={name:"LastPageLink",extends:e,props:{template:{type:Function,default:null}},methods:{getPTOptions(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},computed:{containerClass(){return["p-paginator-last p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},components:{AngleDoubleRightIcon:v},directives:{ripple:f}};R.render=function(e,t,r,g,u,d){const c=s("ripple");return o((a(),n("button",i({class:d.containerClass,type:"button"},d.getPTOptions("lastPageButton")),[(a(),p(l(r.template||"AngleDoubleRightIcon"),i({class:"p-paginator-icon"},d.getPTOptions("lastPageIcon")),null,16))],16)),[[c]])};var A={name:"NextPageLink",extends:e,props:{template:{type:Function,default:null}},methods:{getPTOptions(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},computed:{containerClass(){return["p-paginator-next p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},components:{AngleRightIcon:y},directives:{ripple:f}};A.render=function(e,t,r,g,u,d){const c=s("ripple");return o((a(),n("button",i({class:d.containerClass,type:"button"},d.getPTOptions("nextPageButton")),[(a(),p(l(r.template||"AngleRightIcon"),i({class:"p-paginator-icon"},d.getPTOptions("nextPageIcon")),null,16))],16)),[[c]])};var O={name:"PageLinks",extends:e,inheritAttrs:!1,emits:["click"],props:{value:Array,page:Number},methods:{getPTOptions(e,t){return this.ptm(t,{context:{active:e===this.page}})},onPageLinkClick(e,t){this.$emit("click",{originalEvent:e,value:t})},ariaPageLabel(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},directives:{ripple:f}};const D=["aria-label","aria-current","onClick"];O.render=function(e,t,p,l,g,m){const h=s("ripple");return a(),n("span",i({class:"p-paginator-pages"},e.ptm("pages")),[(a(!0),n(u,null,d(p.value,(e=>o((a(),n("button",i({key:e,class:["p-paginator-page p-paginator-element p-link",{"p-highlight":e-1===p.page}],type:"button","aria-label":m.ariaPageLabel(e),"aria-current":e-1===p.page?"page":void 0,onClick:t=>m.onPageLinkClick(t,e)},m.getPTOptions(e-1,"pageButton")),[c(r(e),1)],16,D)),[[h]]))),128))],16)};var N={name:"PrevPageLink",extends:e,props:{template:{type:Function,default:null}},methods:{getPTOptions(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},computed:{containerClass(){return["p-paginator-prev p-paginator-element p-link",{"p-disabled":this.$attrs.disabled}]}},components:{AngleLeftIcon:w},directives:{ripple:f}};N.render=function(e,t,r,g,u,d){const c=s("ripple");return o((a(),n("button",i({class:d.containerClass,type:"button"},d.getPTOptions("prevPageButton")),[(a(),p(l(r.template||"AngleLeftIcon"),i({class:"p-paginator-icon"},d.getPTOptions("prevPageIcon")),null,16))],16)),[[c]])};var I={name:"RowsPerPageDropdown",extends:e,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:k}};I.render=function(e,t,n,i,r,s){const o=g("RPPDropdown");return a(),p(o,{modelValue:n.rows,options:s.rowsOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":t[0]||(t[0]=e=>s.onChange(e)),class:"p-paginator-rpp-options",disabled:n.disabled,pt:e.ptm("RPPDropdown")},null,8,["modelValue","options","disabled","pt"])};var _={name:"Paginator",extends:e,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:[Object,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)}},mounted(){this.setPaginatorAttribute(),this.createStyle()},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)},createStyle(){if(this.hasBreakpoints()){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";const t=Object.keys(this.template),a={};t.sort(((e,t)=>parseInt(e)-parseInt(t))).forEach((e=>{a[e]=this.template[e]}));for(const[t,[n]]of Object.entries(Object.entries(a))){const i=Object.entries(a)[t-1]?`and (min-width:${Object.keys(a)[t-1]})`:"";e+="default"===n?`\n @media screen ${i} {\n .paginator[${this.attributeSelector}],\n .p-paginator-default{\n display: flex !important;\n }\n }\n `:`\n .paginator[${this.attributeSelector}], .p-paginator-${n} {\n display: none !important;\n }\n @media screen ${i} and (max-width: ${n}) {\n .paginator[${this.attributeSelector}], .p-paginator-${n} {\n display: flex !important;\n }\n .paginator[${this.attributeSelector}],\n .p-paginator-default{\n display: none !important;\n }\n }\n `}this.styleElement.innerHTML=e}},hasBreakpoints(){return"object"==typeof this.template},getPaginatorClasses(e){return[{"p-paginator-default":!this.hasBreakpoints(),[`p-paginator-${e}`]:this.hasBreakpoints()}]},setPaginatorAttribute(){this.$refs.paginator&&this.$refs.paginator.length>=0&&[...this.$refs.paginator].forEach((e=>{e.setAttribute(this.attributeSelector,"")}))},getAriaLabel(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria[e]:void 0}},computed:{templateItems(){let e={};if(this.hasBreakpoints()){e=this.template,e.default||(e.default="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown");for(const t in e)e[t]=this.template[t].split(" ").map((e=>e.trim()));return e}return e.default=this.template.split(" ").map((e=>e.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},attributeSelector:()=>t()},components:{CurrentPageReport:C,FirstPageLink:x,LastPageLink:R,NextPageLink:A,PageLinks:O,PrevPageLink:N,RowsPerPageDropdown:I,JumpToPageDropdown:T,JumpToPageInput:$}};!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-default {\n display: flex;\n}\n.p-paginator {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n}\n.p-paginator-left-content {\n margin-right: auto;\n}\n.p-paginator-right-content {\n margin-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: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\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"),_.render=function(e,t,r,s,o,l){const c=g("FirstPageLink"),b=g("PrevPageLink"),f=g("NextPageLink"),k=g("LastPageLink"),L=g("PageLinks"),v=g("CurrentPageReport"),y=g("RowsPerPageDropdown"),w=g("JumpToPageDropdown"),C=g("JumpToPageInput");return r.alwaysShow||l.pageLinks&&l.pageLinks.length>1?(a(),n("nav",m(i({key:0},e.ptm("root"))),[(a(!0),n(u,null,d(l.templateItems,((s,g)=>(a(),n("div",i({key:g,ref_for:!0,ref:"paginator",class:["p-paginator p-component",l.getPaginatorClasses(g)]},e.ptm("paginator")),[e.$slots.start?(a(),n("div",i({key:0,class:"p-paginator-left-content"},e.ptm("left")),[h(e.$slots,"start",{state:l.currentState})],16)):P("",!0),(a(!0),n(u,null,d(s,(i=>(a(),n(u,{key:i},["FirstPageLink"===i?(a(),p(c,{key:0,"aria-label":l.getAriaLabel("firstPageLabel"),template:e.$slots.firstpagelinkicon,onClick:t[0]||(t[0]=e=>l.changePageToFirst(e)),disabled:l.isFirstPage||l.empty,pt:e.pt},null,8,["aria-label","template","disabled","pt"])):"PrevPageLink"===i?(a(),p(b,{key:1,"aria-label":l.getAriaLabel("prevPageLabel"),template:e.$slots.prevpagelinkicon,onClick:t[1]||(t[1]=e=>l.changePageToPrev(e)),disabled:l.isFirstPage||l.empty,pt:e.pt},null,8,["aria-label","template","disabled","pt"])):"NextPageLink"===i?(a(),p(f,{key:2,"aria-label":l.getAriaLabel("nextPageLabel"),template:e.$slots.nextpagelinkicon,onClick:t[2]||(t[2]=e=>l.changePageToNext(e)),disabled:l.isLastPage||l.empty,pt:e.pt},null,8,["aria-label","template","disabled","pt"])):"LastPageLink"===i?(a(),p(k,{key:3,"aria-label":l.getAriaLabel("lastPageLabel"),template:e.$slots.lastpagelinkicon,onClick:t[3]||(t[3]=e=>l.changePageToLast(e)),disabled:l.isLastPage||l.empty,pt:e.pt},null,8,["aria-label","template","disabled","pt"])):"PageLinks"===i?(a(),p(L,{key:4,"aria-label":l.getAriaLabel("pageLabel"),value:l.pageLinks,page:l.page,onClick:t[4]||(t[4]=e=>l.changePageLink(e)),pt:e.pt},null,8,["aria-label","value","page","pt"])):"CurrentPageReport"===i?(a(),p(v,{key:5,"aria-live":"polite",template:r.currentPageReportTemplate,currentPage:l.currentPage,page:l.page,pageCount:l.pageCount,first:o.d_first,rows:o.d_rows,totalRecords:r.totalRecords,pt:e.pt},null,8,["template","currentPage","page","pageCount","first","rows","totalRecords","pt"])):"RowsPerPageDropdown"===i&&r.rowsPerPageOptions?(a(),p(y,{key:6,"aria-label":l.getAriaLabel("rowsPerPageLabel"),rows:o.d_rows,options:r.rowsPerPageOptions,onRowsChange:t[5]||(t[5]=e=>l.onRowChange(e)),disabled:l.empty,pt:e.pt},null,8,["aria-label","rows","options","disabled","pt"])):"JumpToPageDropdown"===i?(a(),p(w,{key:7,"aria-label":l.getAriaLabel("jumpToPageDropdownLabel"),page:l.page,pageCount:l.pageCount,onPageChange:t[6]||(t[6]=e=>l.changePage(e)),disabled:l.empty,pt:e.pt},null,8,["aria-label","page","pageCount","disabled","pt"])):"JumpToPageInput"===i?(a(),p(C,{key:8,page:l.currentPage,onPageChange:t[7]||(t[7]=e=>l.changePage(e)),disabled:l.empty,pt:e.pt},null,8,["page","disabled","pt"])):P("",!0)],64)))),128)),e.$slots.end?(a(),n("div",i({key:1,class:"p-paginator-right-content"},e.ptm("end")),[h(e.$slots,"end",{state:l.currentState})],16)):P("",!0)],16)))),128))],16)):P("",!0)};export{_ as default};
|