From ca57a6520f8289cad909d1f89d48a0c0b84e402d 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: Mon, 8 May 2023 12:35:25 +0300 Subject: [PATCH] Refactor #3924 - For Paginator --- api-generator/components/paginator.js | 6 + components/lib/config/PrimeVue.d.ts | 2 + .../lib/paginator/CurrentPageReport.vue | 6 +- components/lib/paginator/FirstPageLink.vue | 15 +- .../lib/paginator/JumpToPageDropdown.vue | 4 +- components/lib/paginator/JumpToPageInput.vue | 4 +- components/lib/paginator/LastPageLink.vue | 15 +- components/lib/paginator/NextPageLink.vue | 15 +- components/lib/paginator/PageLinks.vue | 14 +- components/lib/paginator/Paginator.d.ts | 133 ++++++++++++++++++ components/lib/paginator/Paginator.vue | 35 +++-- components/lib/paginator/PrevPageLink.vue | 15 +- .../lib/paginator/RowsPerPageDropdown.vue | 4 +- 13 files changed, 242 insertions(+), 26 deletions(-) diff --git a/api-generator/components/paginator.js b/api-generator/components/paginator.js index 29f0246d1..75967020d 100644 --- a/api-generator/components/paginator.js +++ b/api-generator/components/paginator.js @@ -46,6 +46,12 @@ const PaginatorProps = [ type: 'boolean', default: 'true', description: 'Whether to show the paginator even there is only one page.' + }, + { + name: 'pt', + type: 'any', + default: 'null', + description: 'Uses to pass attributes to DOM elements inside the component.' } ]; diff --git a/components/lib/config/PrimeVue.d.ts b/components/lib/config/PrimeVue.d.ts index eb0c67a52..af86e280b 100644 --- a/components/lib/config/PrimeVue.d.ts +++ b/components/lib/config/PrimeVue.d.ts @@ -43,6 +43,7 @@ import { MenubarPassThroughOptions } from '../menubar'; import { MessagePassThroughOptions } from '../message'; import { MultiSelectPassThroughOptions } from '../multiselect'; import { OverlayPanelPassThroughOptions } from '../overlaypanel'; +import { PaginatorPassThroughOptions } from '../paginator'; import { PanelPassThroughOptions } from '../panel'; import { PanelMenuPassThroughOptions } from '../panelmenu'; import { PasswordPassThroughOptions } from '../password'; @@ -132,6 +133,7 @@ interface PrimeVuePTOptions { message?: MessagePassThroughOptions; multiselect?: MultiSelectPassThroughOptions; overlaypanel?: OverlayPanelPassThroughOptions; + paginator?: PaginatorPassThroughOptions; panel?: PanelPassThroughOptions; panelmenu?: PanelMenuPassThroughOptions; password?: PasswordPassThroughOptions; diff --git a/components/lib/paginator/CurrentPageReport.vue b/components/lib/paginator/CurrentPageReport.vue index 0210b76b0..ed4da044e 100755 --- a/components/lib/paginator/CurrentPageReport.vue +++ b/components/lib/paginator/CurrentPageReport.vue @@ -1,9 +1,13 @@ +