2023-02-28 08:29:30 +00:00
|
|
|
/**
|
2023-02-28 14:20:59 +00:00
|
|
|
*
|
|
|
|
* Column component defines various options to specify corresponding features.
|
|
|
|
* It is a helper component for DataTable and TreeTable.
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/datatable/)
|
|
|
|
*
|
2023-02-28 08:29:30 +00:00
|
|
|
* @module column
|
2023-02-28 14:48:13 +00:00
|
|
|
*
|
2023-02-28 08:29:30 +00:00
|
|
|
*/
|
2023-02-28 14:48:13 +00:00
|
|
|
|
2022-09-06 12:03:37 +00:00
|
|
|
import { VNode } from 'vue';
|
2023-07-06 11:17:08 +00:00
|
|
|
import { ComponentHooks } from '../basecomponent';
|
2023-12-05 07:06:55 +00:00
|
|
|
import { ButtonPassThroughOptions } from '../button';
|
2023-05-10 11:41:33 +00:00
|
|
|
import { DataTablePassThroughOptions } from '../datatable';
|
2023-05-09 14:57:31 +00:00
|
|
|
import { DropdownPassThroughOptionType } from '../dropdown';
|
2023-09-05 08:50:46 +00:00
|
|
|
import { PassThroughOptions } from '../passthrough';
|
2023-09-05 11:28:04 +00:00
|
|
|
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
2022-09-06 12:03:37 +00:00
|
|
|
import { VirtualScrollerLoaderOptions } from '../virtualscroller';
|
|
|
|
|
2023-07-11 22:42:43 +00:00
|
|
|
export declare type ColumnPassThroughOptionType = ColumnPassThroughAttributes | ((options: ColumnPassThroughMethodOptions) => ColumnPassThroughAttributes | string) | string | null | undefined;
|
2023-05-09 14:57:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) option method.
|
|
|
|
*/
|
|
|
|
export interface ColumnPassThroughMethodOptions {
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines instance.
|
|
|
|
*/
|
2023-07-06 12:01:33 +00:00
|
|
|
instance: any;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties.
|
|
|
|
*/
|
2023-05-09 14:57:31 +00:00
|
|
|
props: ColumnProps;
|
2023-12-10 21:41:17 +00:00
|
|
|
/**
|
|
|
|
* Defines valid attributes.
|
|
|
|
*/
|
|
|
|
attrs: any;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
2023-12-05 11:06:32 +00:00
|
|
|
* Defines parent options.
|
2023-09-05 06:50:04 +00:00
|
|
|
*/
|
2023-12-05 11:06:32 +00:00
|
|
|
parent: any;
|
2023-09-05 06:50:04 +00:00
|
|
|
/**
|
|
|
|
* Defines current options.
|
|
|
|
*/
|
2023-06-02 11:10:18 +00:00
|
|
|
context: ColumnContext;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Defines passthrough(pt) options in global config.
|
|
|
|
*/
|
|
|
|
global: object | undefined;
|
2023-05-09 14:57:31 +00:00
|
|
|
}
|
|
|
|
|
2023-12-05 07:06:55 +00:00
|
|
|
/**
|
|
|
|
* Custom shared passthrough(pt) option method.
|
|
|
|
*/
|
|
|
|
export interface ColumnSharedPassThroughMethodOptions {
|
|
|
|
/**
|
|
|
|
* Defines valid properties.
|
|
|
|
*/
|
|
|
|
props: ColumnProps;
|
|
|
|
/**
|
|
|
|
* Defines parent instance.
|
|
|
|
*/
|
|
|
|
parent: DataTablePassThroughOptions;
|
|
|
|
}
|
|
|
|
|
2023-02-28 14:48:13 +00:00
|
|
|
/**
|
|
|
|
* Filter model metadata.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface ColumnFilterModelType {
|
|
|
|
/**
|
|
|
|
* Value of filterModel.
|
|
|
|
*/
|
|
|
|
value: any;
|
|
|
|
/**
|
|
|
|
* Match mode of filterModel.
|
|
|
|
*/
|
|
|
|
matchMode: string;
|
|
|
|
}
|
|
|
|
|
2023-02-28 14:48:13 +00:00
|
|
|
/**
|
|
|
|
* Filter match modes for specific columns.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface ColumnFilterMatchModeOptions {
|
|
|
|
[key: string]: string;
|
|
|
|
}
|
|
|
|
|
2023-02-28 14:48:13 +00:00
|
|
|
/**
|
|
|
|
* Custom column loading metadata.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface ColumnLoadingOptions extends VirtualScrollerLoaderOptions {
|
|
|
|
/**
|
|
|
|
* Cell index
|
|
|
|
*/
|
|
|
|
cellIndex: number;
|
|
|
|
/**
|
|
|
|
* Whether the cell is first.
|
|
|
|
*/
|
|
|
|
cellFirst: boolean;
|
|
|
|
/**
|
|
|
|
* Whether the cell is last.
|
|
|
|
*/
|
|
|
|
cellLast: boolean;
|
|
|
|
/**
|
|
|
|
* Whether the cell is even.
|
|
|
|
*/
|
|
|
|
cellEven: boolean;
|
|
|
|
/**
|
|
|
|
* Whether the item is odd.
|
|
|
|
*/
|
|
|
|
cellOdd: boolean;
|
|
|
|
/**
|
|
|
|
* Column instance
|
|
|
|
*/
|
2023-10-05 12:48:38 +00:00
|
|
|
column: ColumnNode;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column field
|
|
|
|
*/
|
|
|
|
field: string;
|
|
|
|
}
|
|
|
|
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link ColumnProps.pt}
|
|
|
|
*/
|
|
|
|
export interface ColumnPassThroughOptions {
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the root's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
root?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the header cell's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
headerCell?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the column resizer's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
columnResizer?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the header content's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
headerContent?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the header title's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
headerTitle?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the sort's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
sort?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the sort badge's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
sortBadge?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the checkbox wrapper's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
headerCheckboxWrapper?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the header checkbox's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
headerCheckbox?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the header checkbox icon's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
headerCheckboxIcon?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the column filter's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
columnFilter?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter input's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterInput?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter menu button's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterMenuButton?: ColumnPassThroughOptionType;
|
2023-07-19 12:05:06 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter menu icon's DOM element.
|
2023-07-19 12:05:06 +00:00
|
|
|
*/
|
|
|
|
filterMenuIcon?: ColumnPassThroughOptionType;
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the header filter clear button's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
headerFilterClearButton?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter clear icon's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterClearIcon?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter overlay's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterOverlay?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter row items' DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterRowItems?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter row item's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterRowItem?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter separator's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterSeparator?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter operator's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterOperator?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Dropdown component.
|
2023-05-09 14:57:31 +00:00
|
|
|
* @see {@link DropdownPassThroughOptionType}
|
|
|
|
*/
|
2023-12-05 07:06:55 +00:00
|
|
|
filterOperatorDropdown?: DropdownPassThroughOptionType<ColumnSharedPassThroughMethodOptions>;
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter constraints' DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterConstraints?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter constraint's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterConstraint?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Dropdown component.
|
2023-05-09 14:57:31 +00:00
|
|
|
* @see {@link DropdownPassThroughOptionType}
|
|
|
|
*/
|
2023-12-05 07:06:55 +00:00
|
|
|
filterMatchModeDropdown?: DropdownPassThroughOptionType<ColumnSharedPassThroughMethodOptions>;
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter remove button container's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterRemove?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Button component.
|
2023-12-05 07:06:55 +00:00
|
|
|
* @see {@link ButtonPassThroughOptions}
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
2023-12-05 07:06:55 +00:00
|
|
|
filterRemoveButton?: ButtonPassThroughOptions<ColumnSharedPassThroughMethodOptions>;
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter add rule's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterAddRule?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Button component.
|
2023-12-05 07:06:55 +00:00
|
|
|
* @see {@link ButtonPassThroughOptions}
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
2023-12-05 07:06:55 +00:00
|
|
|
filterAddRuleButton?: ButtonPassThroughOptions<ColumnSharedPassThroughMethodOptions>;
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the filter buttonbar's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
filterButtonbar?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Button component.
|
2023-12-05 07:06:55 +00:00
|
|
|
* @see {@link ButtonPassThroughOptions}
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
2023-12-05 07:06:55 +00:00
|
|
|
filterClearButton?: ButtonPassThroughOptions<ColumnSharedPassThroughMethodOptions>;
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the Button component.
|
2023-12-05 07:06:55 +00:00
|
|
|
* @see {@link ButtonPassThroughOptions}
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
2023-12-05 07:06:55 +00:00
|
|
|
filterApplyButton?: ButtonPassThroughOptions<ColumnSharedPassThroughMethodOptions>;
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the body cell's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
bodyCell?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the rowgroup toggler's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
rowGroupToggler?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the rowgroup toggler icon's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
rowGroupTogglerIcon?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the column title's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
columnTitle?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the radiobutton wrapper's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
radiobuttonWrapper?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the radiobutton's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
radiobutton?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the radiobutton icon's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
radiobuttonIcon?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the checkbox wrapper's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
checkboxWrapper?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the checkbox's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
checkbox?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the checkbox icon's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
checkboxIcon?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the rowtoggler's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
rowToggler?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the rowtoggler icon's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
rowTogglerIcon?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the row editor init button's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
rowEditorInitButton?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the row editor init icon's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
rowEditorInitIcon?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the row editor save button's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
2023-06-05 13:26:08 +00:00
|
|
|
rowEditorSaveButton?: ColumnPassThroughOptionType;
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the row editor save icon's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
2023-06-05 13:26:08 +00:00
|
|
|
rowEditorSaveIcon?: ColumnPassThroughOptionType;
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the row editor cancel button's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
rowEditorCancelButton?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the row editor cancel icon's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
rowEditorCancelIcon?: ColumnPassThroughOptionType;
|
2023-06-05 13:26:08 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the footer cell's DOM element.
|
2023-06-05 13:26:08 +00:00
|
|
|
*/
|
|
|
|
footerCell?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the body cell content's DOM element.
|
2023-06-05 13:26:08 +00:00
|
|
|
*/
|
|
|
|
bodyCellContent?: ColumnPassThroughOptionType;
|
2023-05-09 14:57:31 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the hidden input wrapper's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
hiddenHeaderInputWrapper?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the hidden input's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
hiddenHeaderInput?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the hidden input wrapper's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
hiddenInputWrapper?: ColumnPassThroughOptionType;
|
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to the hidden input's DOM element.
|
2023-05-09 14:57:31 +00:00
|
|
|
*/
|
|
|
|
hiddenInput?: ColumnPassThroughOptionType;
|
2023-07-06 11:09:01 +00:00
|
|
|
/**
|
2023-11-07 06:16:39 +00:00
|
|
|
* Used to manage all lifecycle hooks.
|
2023-07-06 11:09:01 +00:00
|
|
|
* @see {@link BaseComponent.ComponentHooks}
|
|
|
|
*/
|
|
|
|
hooks?: ComponentHooks;
|
2023-05-09 14:57:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough attributes for each DOM elements
|
|
|
|
*/
|
|
|
|
export interface ColumnPassThroughAttributes {
|
|
|
|
[key: string]: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines current inline state in Column component.
|
|
|
|
*/
|
|
|
|
export interface ColumnState {
|
|
|
|
d_editing: boolean;
|
|
|
|
/**
|
|
|
|
* Current style of the body cell.
|
|
|
|
*/
|
|
|
|
styleObject: object;
|
|
|
|
/**
|
|
|
|
* Current filter overlay visible as a boolean.
|
|
|
|
*/
|
|
|
|
overlayVisible: boolean;
|
|
|
|
/**
|
|
|
|
* Current filter match mode.
|
|
|
|
*/
|
|
|
|
defaultMatchMode: string;
|
|
|
|
/**
|
|
|
|
* Current filter operator.
|
|
|
|
*/
|
|
|
|
defaultOperator: string;
|
|
|
|
/**
|
|
|
|
* Current focused state as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
focused: boolean;
|
|
|
|
/**
|
|
|
|
* Current style of the rowgroup header.
|
|
|
|
*/
|
|
|
|
rowGroupHeaderStyleObject: object;
|
|
|
|
}
|
|
|
|
|
2023-02-28 14:48:13 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties in Column component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface ColumnProps {
|
|
|
|
/**
|
|
|
|
* Identifier of a column if field property is not defined.
|
|
|
|
*/
|
|
|
|
columnKey?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Property represented by the column.
|
|
|
|
*/
|
2023-02-28 14:20:59 +00:00
|
|
|
field?: string | ((item: any) => string) | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Property name to use in sorting, defaults to field.
|
|
|
|
*/
|
2023-02-28 14:20:59 +00:00
|
|
|
sortField?: string | ((item: any) => string) | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Property name to use in filtering, defaults to field.
|
|
|
|
*/
|
2023-02-28 14:20:59 +00:00
|
|
|
filterField?: string | ((item: any) => string) | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Type of data. It's value is related to PrimeVue.filterMatchModeOptions config.
|
|
|
|
*/
|
|
|
|
dataType?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Defines if a column is sortable.
|
2023-03-10 14:00:58 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
sortable?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Header content of the column.
|
|
|
|
*/
|
|
|
|
header?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Footer content of the column.
|
|
|
|
*/
|
|
|
|
footer?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Inline style of header, body and footer cells.
|
|
|
|
*/
|
|
|
|
style?: any;
|
|
|
|
/**
|
|
|
|
* Style class of header, body and footer cells.
|
|
|
|
*/
|
|
|
|
class?: any;
|
|
|
|
/**
|
|
|
|
* Inline style of the column header.
|
|
|
|
*/
|
|
|
|
headerStyle?: any;
|
|
|
|
/**
|
|
|
|
* Style class of the column header.
|
|
|
|
*/
|
|
|
|
headerClass?: any;
|
|
|
|
/**
|
|
|
|
* Inline style of the column body.
|
|
|
|
*/
|
|
|
|
bodyStyle?: any;
|
|
|
|
/**
|
|
|
|
* Style class of the column body.
|
|
|
|
*/
|
|
|
|
bodyClass?: any;
|
|
|
|
/**
|
|
|
|
* Inline style of the column footer.
|
|
|
|
*/
|
|
|
|
footerStyle?: any;
|
|
|
|
/**
|
|
|
|
* Style class of the column footer.
|
|
|
|
*/
|
|
|
|
footerClass?: any;
|
|
|
|
/**
|
|
|
|
* Whether to display the filter overlay.
|
2023-02-28 14:20:59 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showFilterMenu?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* When enabled, match all and match any operator selector is displayed.
|
2023-02-28 14:20:59 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showFilterOperator?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Displays a button to clear the column filtering.
|
2023-02-28 14:20:59 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showClearButton?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Displays a button to apply the column filtering.
|
2023-02-28 14:20:59 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showApplyButton?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Whether to show the match modes selector.
|
2023-02-28 14:20:59 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showFilterMatchModes?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* When enabled, a button is displayed to add more rules.
|
2023-02-28 14:20:59 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
showAddButton?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* An array of label-value pairs to override the global match mode options.
|
|
|
|
*/
|
|
|
|
filterMatchModeOptions?: ColumnFilterMatchModeOptions[];
|
|
|
|
/**
|
|
|
|
* Maximum number of constraints for a column filter.
|
2023-02-28 14:20:59 +00:00
|
|
|
* @defaultValue 2
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
maxConstraints?: number | undefined;
|
|
|
|
/**
|
|
|
|
* Whether to exclude from global filtering or not.
|
2023-03-10 14:00:58 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
excludeGlobalFilter?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Inline style of the column filter header in row filter display.
|
|
|
|
*/
|
|
|
|
filterHeaderStyle?: any;
|
|
|
|
/**
|
|
|
|
* Style class of the column filter header in row filter display.
|
|
|
|
*/
|
|
|
|
filterHeaderClass?: any;
|
|
|
|
/**
|
|
|
|
* Inline style of the column filter overlay.
|
|
|
|
*/
|
|
|
|
filterMenuStyle?: any;
|
|
|
|
/**
|
|
|
|
* Style class of the column filter overlay.
|
|
|
|
*/
|
|
|
|
filterMenuClass?: any;
|
|
|
|
/**
|
2023-02-28 14:20:59 +00:00
|
|
|
* Defines column based selection mode.
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-02-28 14:20:59 +00:00
|
|
|
selectionMode?: 'single' | 'multiple' | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Displays an icon to toggle row expansion.
|
2023-03-10 14:00:58 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
expander?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Number of columns to span for grouping.
|
|
|
|
*/
|
|
|
|
colspan?: number | undefined;
|
|
|
|
/**
|
|
|
|
* Number of rows to span for grouping.
|
|
|
|
*/
|
|
|
|
rowspan?: number | undefined;
|
|
|
|
/**
|
|
|
|
* Whether this column displays an icon to reorder the rows.
|
2023-03-10 14:00:58 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
rowReorder?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Icon of the drag handle to reorder rows.
|
2023-04-18 07:37:05 +00:00
|
|
|
* @deprecated since v3.27.0. Use 'rowreordericon' slot.
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
rowReorderIcon?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Defines if the column itself can be reordered with dragging.
|
2023-03-10 14:00:58 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
reorderableColumn?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* When enabled, column displays row editor controls.
|
2023-03-10 14:00:58 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
rowEditor?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Whether the column is fixed in horizontal scrolling.
|
2023-03-10 14:00:58 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
frozen?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Position of a frozen column, valid values are left and right.
|
2023-02-28 14:20:59 +00:00
|
|
|
* @defaultValue left
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-02-28 14:20:59 +00:00
|
|
|
alignFrozen?: 'left' | 'right' | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Whether the column is included in data export.
|
2023-03-10 14:00:58 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
exportable?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Custom export header of the column to be exported as CSV.
|
|
|
|
*/
|
|
|
|
exportHeader?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Custom export footer of the column to be exported as CSV.
|
|
|
|
*/
|
|
|
|
exportFooter?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Defines the filtering algorithm to use when searching the options.
|
|
|
|
*/
|
|
|
|
filterMatchMode?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Whether the column is rendered.
|
2023-03-10 14:00:58 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
hidden?: boolean | undefined;
|
2023-05-17 14:23:12 +00:00
|
|
|
/**
|
2023-08-01 14:01:12 +00:00
|
|
|
* Used to pass attributes to DOM elements inside the component.
|
2023-05-17 14:23:12 +00:00
|
|
|
* @type {ColumnPassThroughOptions}
|
|
|
|
*/
|
2023-09-05 11:28:04 +00:00
|
|
|
pt?: PassThrough<ColumnPassThroughOptions>;
|
2023-09-05 08:50:46 +00:00
|
|
|
/**
|
|
|
|
* Used to configure passthrough(pt) options of the component.
|
|
|
|
* @type {PassThroughOptions}
|
|
|
|
*/
|
|
|
|
ptOptions?: PassThroughOptions;
|
2023-06-02 07:00:36 +00:00
|
|
|
/**
|
|
|
|
* When enabled, it removes component related styles in the core.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
unstyled?: boolean;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2023-06-02 11:10:18 +00:00
|
|
|
/**
|
|
|
|
* Defines current options in Column component.
|
|
|
|
*/
|
|
|
|
export interface ColumnContext {
|
|
|
|
/**
|
|
|
|
* Current index of the column.
|
|
|
|
*/
|
|
|
|
index: number;
|
|
|
|
/**
|
|
|
|
* Current checked state of row as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
checked: boolean;
|
|
|
|
/**
|
|
|
|
* Current focused state of row as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
focused: boolean;
|
|
|
|
/**
|
|
|
|
* Current disabled state of row as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
disabled: boolean;
|
2023-07-17 09:23:09 +00:00
|
|
|
/**
|
|
|
|
* Current sort state of the column as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
sorted: boolean;
|
|
|
|
/**
|
|
|
|
* Current frozen state of the column as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
frozen: boolean;
|
|
|
|
/**
|
|
|
|
* Current resizable state of the column as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
resizable: boolean;
|
2023-07-19 12:05:06 +00:00
|
|
|
/**
|
|
|
|
* Current size state of the table.
|
|
|
|
*/
|
|
|
|
size: string;
|
|
|
|
/**
|
|
|
|
* Current gridlines state of the table as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
showGridlines: boolean;
|
|
|
|
/**
|
|
|
|
* Current highlighted state of the filter row item as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
highlighted: boolean;
|
|
|
|
/**
|
|
|
|
* Current hidden state of the filter clear button of a column as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
hidden: boolean;
|
|
|
|
/**
|
|
|
|
* Current visible state of the filter menu of a column as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
overlayVisible: boolean;
|
|
|
|
/**
|
|
|
|
* Current active state of the filter menu of a column as a boolean.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
active: boolean;
|
2023-06-02 11:10:18 +00:00
|
|
|
}
|
|
|
|
|
2023-02-28 14:48:13 +00:00
|
|
|
/**
|
|
|
|
* Defines valid slots in Column component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface ColumnSlots {
|
|
|
|
/**
|
|
|
|
* Custom body template.
|
|
|
|
* @param {Object} scope - body slot's params.
|
|
|
|
*/
|
2023-02-28 08:29:30 +00:00
|
|
|
body(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Row data.
|
|
|
|
*/
|
|
|
|
data: any;
|
|
|
|
/**
|
|
|
|
* Row node data.
|
|
|
|
*/
|
|
|
|
node: any;
|
|
|
|
/**
|
|
|
|
* Column node.
|
|
|
|
*/
|
2023-10-05 12:48:38 +00:00
|
|
|
column: ColumnNode;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column field.
|
|
|
|
*/
|
|
|
|
field: string;
|
|
|
|
/**
|
|
|
|
* Row index.
|
|
|
|
*/
|
|
|
|
index: number;
|
|
|
|
/**
|
|
|
|
* Whether the row is frozen.
|
|
|
|
*/
|
|
|
|
frozenRow: boolean;
|
|
|
|
/**
|
|
|
|
* Callback function
|
2023-08-17 07:16:25 +00:00
|
|
|
* @param {Event} event - Browser event
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-08-17 07:16:25 +00:00
|
|
|
editorInitCallback: (event: Event) => void;
|
2023-02-28 08:29:30 +00:00
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom header template.
|
|
|
|
* @param {Object} scope - header slot's params.
|
|
|
|
*/
|
2023-02-28 08:29:30 +00:00
|
|
|
header(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column node.
|
|
|
|
*/
|
2023-10-05 12:48:38 +00:00
|
|
|
column: ColumnNode;
|
2023-02-28 08:29:30 +00:00
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom footer template.
|
|
|
|
* @param {Object} scope - footer slot's params.
|
|
|
|
*/
|
2023-02-28 08:29:30 +00:00
|
|
|
footer(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column node.
|
|
|
|
*/
|
2023-10-05 12:48:38 +00:00
|
|
|
column: ColumnNode;
|
2023-02-28 08:29:30 +00:00
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom editor template.
|
|
|
|
* @param {Object} scope - editor slot's params.
|
|
|
|
*/
|
2023-02-28 08:29:30 +00:00
|
|
|
editor(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Row data.
|
|
|
|
*/
|
|
|
|
data: any;
|
|
|
|
/**
|
|
|
|
* Column node.
|
|
|
|
*/
|
2023-10-05 12:48:38 +00:00
|
|
|
column: ColumnNode;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column field.
|
|
|
|
*/
|
|
|
|
field: string;
|
|
|
|
/**
|
|
|
|
* Row index.
|
|
|
|
*/
|
|
|
|
index: number;
|
|
|
|
/**
|
|
|
|
* Whether the row is frozen.
|
|
|
|
*/
|
|
|
|
frozenRow: boolean;
|
|
|
|
/**
|
|
|
|
* Callback function
|
2023-08-17 07:16:25 +00:00
|
|
|
* @param {Event} event - Browser event
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-08-17 07:16:25 +00:00
|
|
|
editorSaveCallback: (event: Event) => void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback function
|
2023-08-17 07:16:25 +00:00
|
|
|
* @param {Event} event - Browser event
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
2023-08-17 07:16:25 +00:00
|
|
|
editorCancelCallback: (event: Event) => void;
|
2023-02-28 08:29:30 +00:00
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom filter template.
|
|
|
|
* @param {Object} scope - filter slot's params.
|
|
|
|
*/
|
2023-02-28 08:29:30 +00:00
|
|
|
filter(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column field.
|
|
|
|
*/
|
|
|
|
field: string;
|
|
|
|
/**
|
|
|
|
* Filter metadata
|
|
|
|
* @see ColumnFilterModelType
|
|
|
|
*/
|
|
|
|
filterModel: ColumnFilterModelType;
|
|
|
|
/**
|
|
|
|
* Callback function
|
|
|
|
*/
|
2023-08-17 07:16:25 +00:00
|
|
|
filterCallback: () => void;
|
2023-09-21 13:21:59 +00:00
|
|
|
/**
|
|
|
|
* Callback function (closes the overlay)
|
|
|
|
*/
|
|
|
|
applyFilter: () => void;
|
2023-02-28 08:29:30 +00:00
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom filter header template.
|
|
|
|
* @param {Object} scope - filter header slot's params.
|
|
|
|
*/
|
2023-02-28 08:29:30 +00:00
|
|
|
filterheader(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column field.
|
|
|
|
*/
|
|
|
|
field: string;
|
|
|
|
/**
|
|
|
|
* Filter metadata
|
|
|
|
* @see ColumnFilterModelType
|
|
|
|
*/
|
|
|
|
filterModel: ColumnFilterModelType;
|
|
|
|
/**
|
|
|
|
* Callback function
|
|
|
|
*/
|
2023-08-17 07:16:25 +00:00
|
|
|
filterCallback: () => void;
|
2023-02-28 08:29:30 +00:00
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom filter footer template.
|
|
|
|
* @param {Object} scope - filter footer slot's params.
|
|
|
|
*/
|
2023-02-28 08:29:30 +00:00
|
|
|
filterfooter(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column field.
|
|
|
|
*/
|
|
|
|
field: string;
|
|
|
|
/**
|
|
|
|
* Filter metadata
|
|
|
|
* @see ColumnFilterModelType
|
|
|
|
*/
|
|
|
|
filterModel: ColumnFilterModelType;
|
|
|
|
/**
|
|
|
|
* Callback function
|
|
|
|
*/
|
2023-08-17 07:16:25 +00:00
|
|
|
filterCallback: () => void;
|
2023-02-28 08:29:30 +00:00
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom filter clear template.
|
|
|
|
* @param {Object} scope - filter clear slot's params.
|
|
|
|
*/
|
2023-02-28 08:29:30 +00:00
|
|
|
filterclear(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column field.
|
|
|
|
*/
|
|
|
|
field: string;
|
|
|
|
/**
|
|
|
|
* Filter metadata
|
|
|
|
* @see ColumnFilterModelType
|
|
|
|
*/
|
|
|
|
filterModel: ColumnFilterModelType;
|
|
|
|
/**
|
|
|
|
* Callback function
|
|
|
|
*/
|
2023-08-17 07:16:25 +00:00
|
|
|
filterCallback: () => void;
|
2023-02-28 08:29:30 +00:00
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom filter apply template.
|
|
|
|
* @param {Object} scope - filter apply slot's params.
|
|
|
|
*/
|
2023-02-28 08:29:30 +00:00
|
|
|
filterapply(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column field.
|
|
|
|
*/
|
|
|
|
field: string;
|
|
|
|
/**
|
|
|
|
* Filter metadata
|
|
|
|
* @see ColumnFilterModelType
|
|
|
|
*/
|
|
|
|
filterModel: ColumnFilterModelType;
|
|
|
|
/**
|
|
|
|
* Callback function
|
|
|
|
*/
|
2023-08-17 07:16:25 +00:00
|
|
|
filterCallback: () => void;
|
2023-02-28 08:29:30 +00:00
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Custom loading template.
|
|
|
|
* @param {Object} scope - loading slot's params.
|
|
|
|
*/
|
2023-02-28 08:29:30 +00:00
|
|
|
loading(scope: {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Row data.
|
|
|
|
*/
|
|
|
|
data: any;
|
|
|
|
/**
|
|
|
|
* Column node.
|
|
|
|
*/
|
2023-10-05 12:48:38 +00:00
|
|
|
column: ColumnNode;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Column field.
|
|
|
|
*/
|
|
|
|
field: string;
|
|
|
|
/**
|
|
|
|
* Row index.
|
|
|
|
*/
|
|
|
|
index: number;
|
|
|
|
/**
|
|
|
|
* Whether the row is frozen.
|
|
|
|
*/
|
|
|
|
frozenRow: boolean;
|
|
|
|
/**
|
|
|
|
* Loading options.
|
|
|
|
* @see ColumnLoadingOptions
|
|
|
|
*/
|
|
|
|
loadingOptions: ColumnLoadingOptions;
|
2023-02-28 08:29:30 +00:00
|
|
|
}): VNode[];
|
2023-04-13 14:42:33 +00:00
|
|
|
/**
|
|
|
|
* Custom row toggler icon template.
|
|
|
|
* @param {Object} scope - row toggler icon slot's params.
|
|
|
|
*/
|
|
|
|
rowtogglericon(scope: {
|
2023-09-06 11:26:20 +00:00
|
|
|
/**
|
|
|
|
* Style class of the row toggler icon.
|
|
|
|
*/
|
|
|
|
class: string;
|
2023-04-13 14:42:33 +00:00
|
|
|
/**
|
|
|
|
* Current row expanded state.
|
|
|
|
*/
|
|
|
|
rowExpanded: boolean;
|
|
|
|
}): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom row checkbox icon template.
|
|
|
|
* @param {Object} scope - header row icon slot's params.
|
|
|
|
*/
|
|
|
|
rowcheckboxicon(scope: {
|
|
|
|
/**
|
|
|
|
* Current check state.
|
|
|
|
*/
|
|
|
|
checked: boolean;
|
|
|
|
}): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom row editor init icon template.
|
|
|
|
*/
|
|
|
|
roweditoriniticon(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom row editor save icon template.
|
|
|
|
*/
|
|
|
|
roweditorsaveicon(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom row editor cancel icon template.
|
|
|
|
*/
|
|
|
|
roweditorcancelicon(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom filter icon template.
|
|
|
|
*/
|
|
|
|
filtericon(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom filter clear icon template.
|
|
|
|
*/
|
|
|
|
filterclearicon(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom filter remove icon template.
|
|
|
|
*/
|
|
|
|
filterremoveicon(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom filter add icon template.
|
|
|
|
*/
|
|
|
|
filteraddicon(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom sort icon template.
|
|
|
|
* @param {Object} scope - sort icon slot's params.
|
|
|
|
*/
|
|
|
|
sorticon(scope: {
|
2023-11-22 08:01:06 +00:00
|
|
|
/**
|
|
|
|
* Style class of the sort icon.
|
|
|
|
*/
|
|
|
|
class: string;
|
2023-04-13 14:42:33 +00:00
|
|
|
/**
|
|
|
|
* Current sort state.
|
|
|
|
*/
|
|
|
|
sorted: boolean;
|
|
|
|
/**
|
|
|
|
* Current sort order state.
|
|
|
|
*/
|
2023-06-18 16:45:26 +00:00
|
|
|
sortOrder: number;
|
2023-04-13 14:42:33 +00:00
|
|
|
}): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom header checkbox icon template.
|
|
|
|
* @param {Object} scope - header checkbox icon slot's params.
|
|
|
|
*/
|
|
|
|
headercheckboxicon(scope: {
|
|
|
|
/**
|
|
|
|
* Current check state.
|
|
|
|
*/
|
|
|
|
checked: boolean;
|
|
|
|
}): VNode[];
|
2023-04-18 07:37:05 +00:00
|
|
|
/**
|
|
|
|
* Custom row reorder icon template.
|
|
|
|
*/
|
|
|
|
rowreordericon(): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2023-02-28 08:29:30 +00:00
|
|
|
export interface ColumnEmits {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-02-28 14:20:59 +00:00
|
|
|
/**
|
|
|
|
* **PrimeVue - Column**
|
|
|
|
*
|
2023-05-09 14:57:31 +00:00
|
|
|
* _Column is a helper component for Column and TreeTable._
|
2023-02-28 14:20:59 +00:00
|
|
|
*
|
2023-05-09 14:57:31 +00:00
|
|
|
* [Live Demo](https://www.primevue.org/Column/)
|
2023-02-28 14:20:59 +00:00
|
|
|
* --- ---
|
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*/
|
2023-03-01 14:37:47 +00:00
|
|
|
declare class Column extends ClassComponent<ColumnProps, ColumnSlots, ColumnEmits> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-10-05 12:48:38 +00:00
|
|
|
export type ColumnNode = Column & { props: Column['$props'] };
|
|
|
|
|
2022-09-06 12:03:37 +00:00
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
Column: GlobalComponentConstructor<Column>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Column;
|