From a8c947a2643b339992d621065843549802a18a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 20 Jun 2023 13:03:34 +0300 Subject: [PATCH] Refactor #3965 - For Paginator & PT name changes --- components/lib/paginator/BasePaginator.vue | 17 +++++++---- .../lib/paginator/JumpToPageDropdown.vue | 6 ++-- components/lib/paginator/JumpToPageInput.vue | 12 +++++++- components/lib/paginator/PageLinks.vue | 5 ++-- components/lib/paginator/Paginator.d.ts | 29 +++++++++++++++++-- components/lib/paginator/PrevPageLink.vue | 4 +-- .../lib/paginator/RowsPerPageDropdown.vue | 6 ++-- 7 files changed, 61 insertions(+), 18 deletions(-) diff --git a/components/lib/paginator/BasePaginator.vue b/components/lib/paginator/BasePaginator.vue index 9032829b6..58b092d19 100644 --- a/components/lib/paginator/BasePaginator.vue +++ b/components/lib/paginator/BasePaginator.vue @@ -61,13 +61,13 @@ const classes = { } ], firstPageIcon: 'p-paginator-icon', - prevPageButton: ({ instance }) => [ + previousPageButton: ({ instance }) => [ 'p-paginator-prev p-paginator-element p-link', { 'p-disabled': instance.$attrs.disabled } ], - prevPageIcon: 'p-paginator-icon', + previousPageIcon: 'p-paginator-icon', nextPageButton: ({ instance }) => [ 'p-paginator-next p-paginator-element p-link', { @@ -82,10 +82,17 @@ const classes = { } ], lastPageIcon: 'p-paginator-icon', + pages: 'p-paginator-pages', + pageButton: ({ props, pageLink }) => [ + 'p-paginator-page p-paginator-element p-link', + { + 'p-highlight': pageLink - 1 === props.page + } + ], current: 'p-paginator-current', - RPPDropdown: 'p-paginator-rpp-options', - JTPDropdown: 'p-paginator-page-options', - JTPInput: 'p-paginator-page-input' + rowPerPageDropdown: 'p-paginator-rpp-options', + jumpToPageDropdown: 'p-paginator-page-options', + jumpToPageInput: 'p-paginator-page-input' }; const { load: loadStyle } = useStyle(styles, { id: 'primevue_paginator_style', manual: true }); diff --git a/components/lib/paginator/JumpToPageDropdown.vue b/components/lib/paginator/JumpToPageDropdown.vue index 87a0860db..5369cf134 100644 --- a/components/lib/paginator/JumpToPageDropdown.vue +++ b/components/lib/paginator/JumpToPageDropdown.vue @@ -5,11 +5,11 @@ optionLabel="label" optionValue="value" @update:modelValue="onChange($event)" - :class="cx('JTPDropdown')" + :class="cx('jumpToPageDropdown')" :disabled="disabled" :unstyled="unstyled" - :pt="ptm('JTPDropdown')" - data-pc-section="jtpdropdown" + :pt="ptm('jumpTpPageDropdown')" + data-pc-section="jumptopagedropdown" > diff --git a/components/lib/paginator/JumpToPageInput.vue b/components/lib/paginator/JumpToPageInput.vue index 45e2db729..22161ec77 100644 --- a/components/lib/paginator/JumpToPageInput.vue +++ b/components/lib/paginator/JumpToPageInput.vue @@ -1,5 +1,15 @@