primevue-mirror/api-generator/components/paginator.js

117 lines
3.2 KiB
JavaScript
Raw Normal View History

const PaginatorProps = [
{
2022-09-14 14:26:41 +00:00
name: 'totalRecords',
type: 'number',
default: '0',
description: 'Number of total records.'
},
{
2022-09-14 14:26:41 +00:00
name: 'rows',
type: 'number',
default: '0',
description: 'Data count to display per page.'
},
{
2022-09-14 14:26:41 +00:00
name: 'first',
type: 'number',
default: '0',
description: 'Zero-relative number of the first row to be displayed.'
},
{
2022-09-14 14:26:41 +00:00
name: 'pageLinkSize',
type: 'number',
default: '5',
description: 'Number of page links to display.'
},
{
2022-09-14 14:26:41 +00:00
name: 'rowsPerPageOptions',
type: 'array',
default: 'null',
description: 'Array of integer values to display inside rows per page dropdown.'
},
{
2022-09-14 14:26:41 +00:00
name: 'template',
type: 'string',
default: 'FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown',
description: 'Template of the paginator.'
},
{
2022-09-14 14:26:41 +00:00
name: 'currentPageReportTemplate',
type: 'string',
default: '({currentPage} of {totalPages})',
description: 'Template of the current page report element. Available placeholders are {currentPage},{totalPages},{rows},{first},{last} and {totalRecords}'
},
{
2022-09-14 14:26:41 +00:00
name: 'alwaysShow',
type: 'boolean',
default: 'true',
description: 'Whether to show the paginator even there is only one page.'
}
];
const PaginatorEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'page',
description: 'Callback to invoke when page changes, the event object contains information about the new state.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event.page',
type: 'number',
description: 'New page number'
},
{
2022-09-14 14:26:41 +00:00
name: 'event.first',
type: 'number',
description: 'Index of first record'
},
{
2022-09-14 14:26:41 +00:00
name: 'event.rows',
type: 'number',
description: 'Number of rows to display in new page'
},
{
2022-09-14 14:26:41 +00:00
name: 'event.pageCount',
type: 'number',
description: 'Total number of pages'
}
]
}
];
const PaginatorSlots = [
{
2022-09-14 14:26:41 +00:00
name: 'left',
description: "Custom content for the component's left side."
},
{
2022-09-14 14:26:41 +00:00
name: 'right',
description: "Custom content for the component's right side."
},
{
name: 'firstpagelinkicon',
description: 'Custom first page link icon template.'
},
{
name: 'prevpagelinkicon',
description: 'Custom previous page link icon template.'
},
{
name: 'nextpagelinkicon',
description: 'Custom next page link icon template.'
},
{
name: 'lastpagelinkicon',
description: 'Custom last page link icon template.'
}
];
module.exports = {
paginator: {
2022-09-14 14:26:41 +00:00
name: 'Paginator',
description: 'Paginator is a generic component to display content in paged format.',
props: PaginatorProps,
events: PaginatorEvents,
slots: PaginatorSlots
}
};