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

304 lines
7.9 KiB
JavaScript
Raw Normal View History

const ColumnProps = [
{
2022-09-14 14:26:41 +00:00
name: 'columnKey',
type: 'any',
default: 'null',
description: 'Identifier of a column if field property is not defined.'
},
{
2022-09-14 14:26:41 +00:00
name: 'field',
type: 'string',
default: 'null',
description: 'Property represented by the column.'
},
{
2022-09-14 14:26:41 +00:00
name: 'sortField',
type: 'string',
default: 'null',
description: 'Property name to use in sorting, defaults to field.'
},
{
2022-09-14 14:26:41 +00:00
name: 'filterField',
type: 'string',
default: 'null',
description: 'Property name to use in filtering, defaults to field.'
},
{
2022-09-14 14:26:41 +00:00
name: 'sortable',
type: 'any',
default: 'false',
description: 'Defines if a column is sortable.'
},
{
2022-09-14 14:26:41 +00:00
name: 'header',
type: 'any',
default: 'null',
description: 'Header content of the column.'
},
{
2022-09-14 14:26:41 +00:00
name: 'footer',
type: 'any',
default: 'null',
description: 'Footer content of the column.'
},
{
2022-09-14 14:26:41 +00:00
name: 'style',
type: 'object',
default: 'null',
description: 'Inline style of header, body and footer cells.'
},
{
2022-09-14 14:26:41 +00:00
name: 'class',
type: 'string',
default: 'null',
description: 'Style class of header, body and footer cells.'
},
{
2022-09-14 14:26:41 +00:00
name: 'headerStyle',
type: 'object',
default: 'null',
description: 'Inline style of the column header.'
},
{
2022-09-14 14:26:41 +00:00
name: 'headerClass',
type: 'string',
default: 'null',
description: 'Style class of the column header.'
},
{
2022-09-14 14:26:41 +00:00
name: 'bodyStyle',
type: 'object',
default: 'null',
description: 'Inline style of the column body.'
},
{
2022-09-14 14:26:41 +00:00
name: 'bodyClass',
type: 'string',
default: 'null',
description: 'Style class of the column body.'
},
{
2022-09-14 14:26:41 +00:00
name: 'footerStyle',
type: 'object',
default: 'null',
description: 'Inline style of the column footer.'
},
{
2022-09-14 14:26:41 +00:00
name: 'footerClass',
type: 'string',
default: 'null',
description: 'Style class of the footer body.'
},
{
2022-09-14 14:26:41 +00:00
name: 'showFilterMenu',
type: 'boolean',
default: 'true',
description: 'Whether to display the filter overlay.'
},
{
2022-09-14 14:26:41 +00:00
name: 'showFilterOperator',
type: 'boolean',
default: 'true',
description: 'When enabled, match all and match any operator selector is displayed.'
},
{
2022-09-14 14:26:41 +00:00
name: 'showClearButton',
type: 'boolean',
default: 'true',
description: 'Displays a button to clear the column filtering.'
},
{
2022-09-14 14:26:41 +00:00
name: 'showApplyButton',
type: 'boolean',
default: 'true',
description: 'Displays a button to apply the column filtering.'
},
{
2022-09-14 14:26:41 +00:00
name: 'showFilterMatchModes',
type: 'boolean',
default: 'true',
description: 'Whether to show the match modes selector.'
},
{
2022-09-14 14:26:41 +00:00
name: 'showAddButton',
type: 'boolean',
default: 'true',
description: 'When enabled, a button is displayed to add more rules.'
},
{
2022-09-14 14:26:41 +00:00
name: 'filterMatchModeOptions',
type: 'array',
default: 'null',
description: 'An array of label-value pairs to override the global match mode options.'
},
{
2022-09-14 14:26:41 +00:00
name: 'maxConstraints',
type: 'number',
default: '2',
description: 'Maximum number of constraints for a column filter.'
},
{
2022-09-14 14:26:41 +00:00
name: 'excludeGlobalFilter',
type: 'boolean',
default: 'false',
description: 'Whether to exclude from global filtering or not.'
},
{
2022-09-14 14:26:41 +00:00
name: 'filterHeaderStyle',
type: 'object',
default: 'null',
description: 'Inline style of the column filter header in row filter display.'
},
{
2022-09-14 14:26:41 +00:00
name: 'filterHeaderClass',
type: 'string',
default: 'null',
description: 'Style class of the column filter header in row filter display.'
},
{
2022-09-14 14:26:41 +00:00
name: 'filterMenuStyle',
type: 'object',
default: 'null',
description: 'Inline style of the column filter overlay.'
},
{
2022-09-14 14:26:41 +00:00
name: 'filterMenuClass',
type: 'string',
default: 'null',
description: 'Style class of the column filter overlay.'
},
{
2022-09-14 14:26:41 +00:00
name: 'selectionMode',
type: 'string',
default: 'null',
description: 'Defines column based selection mode, options are "single" and "multiple".'
},
{
2022-09-14 14:26:41 +00:00
name: 'expander',
type: 'boolean',
default: 'false',
description: 'Displays an icon to toggle row expansion.'
},
{
2022-09-14 14:26:41 +00:00
name: 'colspan',
type: 'number',
default: 'null',
description: 'Number of columns to span for grouping.'
},
{
2022-09-14 14:26:41 +00:00
name: 'rowspan',
type: 'number',
default: 'null',
description: 'Number of rows to span for grouping.'
},
{
2022-09-14 14:26:41 +00:00
name: 'rowReorder',
type: 'boolean',
default: 'false',
description: 'Whether this column displays an icon to reorder the rows.'
},
{
2022-09-14 14:26:41 +00:00
name: 'rowReorderIcon',
type: 'string',
default: 'pi pi-bars',
description: 'Icon of the drag handle to reorder rows.'
},
{
2022-09-14 14:26:41 +00:00
name: 'reorderableColumn',
type: 'boolean',
default: 'true',
description: 'Defines if the column itself can be reordered with dragging.'
},
{
2022-09-14 14:26:41 +00:00
name: 'rowEditor',
type: 'boolean',
default: 'false',
description: 'When enabled, column displays row editor controls.'
},
{
2022-09-14 14:26:41 +00:00
name: 'frozen',
type: 'boolean',
default: 'false',
description: 'Whether the column is fixed in horizontal scrolling.'
},
{
2022-09-14 14:26:41 +00:00
name: 'alignFrozen',
type: 'string',
default: 'left',
description: 'Position of a frozen column, valid values are left and right.'
},
{
2022-09-14 14:26:41 +00:00
name: 'exportable',
type: 'boolean',
default: 'true',
description: 'Whether the column is included in data export.'
},
{
2022-09-14 14:26:41 +00:00
name: 'exportHeader',
type: 'string',
default: 'null',
description: 'Custom export header of the column to be exported as CSV.'
},
{
2022-09-14 14:26:41 +00:00
name: 'exportFooter',
type: 'string',
default: 'null',
description: 'Custom export footer of the column to be exported as CSV.'
},
{
2022-09-14 14:26:41 +00:00
name: 'hidden',
type: 'boolean',
default: 'false',
description: 'Whether the column is rendered.'
}
];
const ColumnSlots = [
{
2022-09-14 14:26:41 +00:00
name: 'header',
description: "Custom content for the component's header"
},
{
2022-09-14 14:26:41 +00:00
name: 'body',
description: "Custom content for the component's body"
},
{
2022-09-14 14:26:41 +00:00
name: 'footer',
description: "Custom content for the component's footer"
},
{
2022-09-14 14:26:41 +00:00
name: 'editor',
description: 'Custom content for the editing cell'
},
{
2022-09-14 14:26:41 +00:00
name: 'filter',
description: 'Custom content for the filtering items'
},
{
2022-09-14 14:26:41 +00:00
name: 'filterheader',
description: "Custom content for the filter menu's header"
},
{
2022-09-14 14:26:41 +00:00
name: 'filterfooter',
description: "Custom content for the filter menu's footer"
},
{
2022-09-14 14:26:41 +00:00
name: 'filterclear',
description: "Custom content for the filter menu's clear section"
},
{
2022-09-14 14:26:41 +00:00
name: 'filterapply',
description: "Custom content for the filter menu's apply section"
}
];
module.exports = {
column: {
2022-09-14 14:26:41 +00:00
name: 'Column',
description: 'DataTable requires a value as an array of objects and columns defined with Column component.',
'doc-url': 'datatable',
props: ColumnProps,
slots: ColumnSlots
}
};