Refactor #3965 - For Paginator & PT name changes
parent
ae400bbac9
commit
a8c947a264
|
@ -61,13 +61,13 @@ const classes = {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
firstPageIcon: 'p-paginator-icon',
|
firstPageIcon: 'p-paginator-icon',
|
||||||
prevPageButton: ({ instance }) => [
|
previousPageButton: ({ instance }) => [
|
||||||
'p-paginator-prev p-paginator-element p-link',
|
'p-paginator-prev p-paginator-element p-link',
|
||||||
{
|
{
|
||||||
'p-disabled': instance.$attrs.disabled
|
'p-disabled': instance.$attrs.disabled
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
prevPageIcon: 'p-paginator-icon',
|
previousPageIcon: 'p-paginator-icon',
|
||||||
nextPageButton: ({ instance }) => [
|
nextPageButton: ({ instance }) => [
|
||||||
'p-paginator-next p-paginator-element p-link',
|
'p-paginator-next p-paginator-element p-link',
|
||||||
{
|
{
|
||||||
|
@ -82,10 +82,17 @@ const classes = {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
lastPageIcon: 'p-paginator-icon',
|
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',
|
current: 'p-paginator-current',
|
||||||
RPPDropdown: 'p-paginator-rpp-options',
|
rowPerPageDropdown: 'p-paginator-rpp-options',
|
||||||
JTPDropdown: 'p-paginator-page-options',
|
jumpToPageDropdown: 'p-paginator-page-options',
|
||||||
JTPInput: 'p-paginator-page-input'
|
jumpToPageInput: 'p-paginator-page-input'
|
||||||
};
|
};
|
||||||
|
|
||||||
const { load: loadStyle } = useStyle(styles, { id: 'primevue_paginator_style', manual: true });
|
const { load: loadStyle } = useStyle(styles, { id: 'primevue_paginator_style', manual: true });
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
optionLabel="label"
|
optionLabel="label"
|
||||||
optionValue="value"
|
optionValue="value"
|
||||||
@update:modelValue="onChange($event)"
|
@update:modelValue="onChange($event)"
|
||||||
:class="cx('JTPDropdown')"
|
:class="cx('jumpToPageDropdown')"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:unstyled="unstyled"
|
:unstyled="unstyled"
|
||||||
:pt="ptm('JTPDropdown')"
|
:pt="ptm('jumpTpPageDropdown')"
|
||||||
data-pc-section="jtpdropdown"
|
data-pc-section="jumptopagedropdown"
|
||||||
></JTPDropdown>
|
></JTPDropdown>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<JTPInput ref="jtpInput" :modelValue="d_page" :class="cx('JTPInput')" :aria-label="inputArialabel" :disabled="disabled" @update:modelValue="onChange" :unstyled="unstyled" :pt="ptm('JTPInput')" data-pc-section="jtpinput"></JTPInput>
|
<JTPInput
|
||||||
|
ref="jtpInput"
|
||||||
|
:modelValue="d_page"
|
||||||
|
:class="cx('jumpToPageInput')"
|
||||||
|
:aria-label="inputArialabel"
|
||||||
|
:disabled="disabled"
|
||||||
|
@update:modelValue="onChange"
|
||||||
|
:unstyled="unstyled"
|
||||||
|
:pt="ptm('jumpToPageInput')"
|
||||||
|
data-pc-section="jumptopageinput"
|
||||||
|
></JTPInput>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<span class="p-paginator-pages" v-bind="ptm('pages')">
|
<span :class="cx('pages')" v-bind="ptm('pages')">
|
||||||
<button
|
<button
|
||||||
v-for="pageLink of value"
|
v-for="pageLink of value"
|
||||||
:key="pageLink"
|
:key="pageLink"
|
||||||
v-ripple
|
v-ripple
|
||||||
:class="['p-paginator-page p-paginator-element p-link', { 'p-highlight': pageLink - 1 === page }]"
|
:class="cx('pageButton', { pageLink })"
|
||||||
type="button"
|
type="button"
|
||||||
:aria-label="ariaPageLabel(pageLink)"
|
:aria-label="ariaPageLabel(pageLink)"
|
||||||
:aria-current="pageLink - 1 === page ? 'page' : undefined"
|
:aria-current="pageLink - 1 === page ? 'page' : undefined"
|
||||||
@click="onPageLinkClick($event, pageLink)"
|
@click="onPageLinkClick($event, pageLink)"
|
||||||
v-bind="getPTOptions(pageLink - 1, 'pageButton')"
|
v-bind="getPTOptions(pageLink - 1, 'pageButton')"
|
||||||
|
:data-p-highlight="pageLink - 1 === page"
|
||||||
>
|
>
|
||||||
{{ pageLink }}
|
{{ pageLink }}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -50,12 +50,22 @@ export interface PaginatorPassThroughOptions {
|
||||||
firstPageIcon?: PaginatorPassThroughOptionType;
|
firstPageIcon?: PaginatorPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Uses to pass attributes to the prev page button's DOM element.
|
* Uses to pass attributes to the prev page button's DOM element.
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
prevPageButton?: PaginatorPassThroughOptionType;
|
prevPageButton?: PaginatorPassThroughOptionType;
|
||||||
|
/**
|
||||||
|
* Uses to pass attributes to the prev page button's DOM element.
|
||||||
|
*/
|
||||||
|
previousPageButton?: PaginatorPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Uses to pass attributes to the prev page icon's DOM element.
|
* Uses to pass attributes to the prev page icon's DOM element.
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
prevPageIcon?: PaginatorPassThroughOptionType;
|
prevPageIcon?: PaginatorPassThroughOptionType;
|
||||||
|
/**
|
||||||
|
* Uses to pass attributes to the prev page icon's DOM element.
|
||||||
|
*/
|
||||||
|
previousPageIcon?: PaginatorPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Uses to pass attributes to the next page button's DOM element.
|
* Uses to pass attributes to the next page button's DOM element.
|
||||||
*/
|
*/
|
||||||
|
@ -86,19 +96,34 @@ export interface PaginatorPassThroughOptions {
|
||||||
current?: PaginatorPassThroughOptionType;
|
current?: PaginatorPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Uses to pass attributes to the Dropdown component.
|
* Uses to pass attributes to the Dropdown component.
|
||||||
* @see {@link DropdownPassThroughOptionType}
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
RPPDropdown?: DropdownPassThroughOptionType;
|
RPPDropdown?: DropdownPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Uses to pass attributes to the Dropdown component.
|
* Uses to pass attributes to the Dropdown component.
|
||||||
* @see {@link DropdownPassThroughOptionType}
|
* @see {@link DropdownPassThroughOptionType}
|
||||||
*/
|
*/
|
||||||
|
rowPerPageDropdown?: DropdownPassThroughOptionType;
|
||||||
|
/**
|
||||||
|
* Uses to pass attributes to the Dropdown component.
|
||||||
|
* deprecated
|
||||||
|
*/
|
||||||
JTPDropdown?: DropdownPassThroughOptionType;
|
JTPDropdown?: DropdownPassThroughOptionType;
|
||||||
|
/**
|
||||||
|
* Uses to pass attributes to the Dropdown component.
|
||||||
|
* @see {@link DropdownPassThroughOptionType}
|
||||||
|
*/
|
||||||
|
jumpToPageDropdown?: DropdownPassThroughOptionType;
|
||||||
|
/**
|
||||||
|
* Uses to pass attributes to the Dropdown component.
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
JTPInput?: InputNumberPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Uses to pass attributes to the Dropdown component.
|
* Uses to pass attributes to the Dropdown component.
|
||||||
* @see {@link InputNumberPassThroughOptionType}
|
* @see {@link InputNumberPassThroughOptionType}
|
||||||
*/
|
*/
|
||||||
JTPInput?: InputNumberPassThroughOptionType;
|
jumpToPageInput?: InputNumberPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Uses to pass attributes to the end's DOM element.
|
* Uses to pass attributes to the end's DOM element.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<button v-ripple :class="cx('prevPageButton')" type="button" v-bind="getPTOptions('prevPageButton')">
|
<button v-ripple :class="cx('previousPageButton')" type="button" v-bind="getPTOptions('previousPageButton')">
|
||||||
<component :is="template || 'AngleLeftIcon'" :class="cx('prevPageIcon')" v-bind="getPTOptions('prevPageIcon')" />
|
<component :is="template || 'AngleLeftIcon'" :class="cx('previousPageIcon')" v-bind="getPTOptions('previousPageIcon')" />
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
optionLabel="label"
|
optionLabel="label"
|
||||||
optionValue="value"
|
optionValue="value"
|
||||||
@update:modelValue="onChange($event)"
|
@update:modelValue="onChange($event)"
|
||||||
:class="cx('RPPDropdown')"
|
:class="cx('rowPerPageDropdown')"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:unstyled="unstyled"
|
:unstyled="unstyled"
|
||||||
:pt="ptm('RPPDropdown')"
|
:pt="ptm('rowPerPageDropdown')"
|
||||||
data-pc-section="rppdropdown"
|
data-pc-section="rowperpagedropdown"
|
||||||
></RPPDropdown>
|
></RPPDropdown>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue