Column typing updeted

pull/3689/head
Tuğçe Küçükoğlu 2023-02-28 17:48:13 +03:00
parent fac9ede556
commit d439d5677b
2 changed files with 79 additions and 57 deletions

View File

@ -6,11 +6,16 @@
* [Live Demo](https://www.primevue.org/datatable/) * [Live Demo](https://www.primevue.org/datatable/)
* *
* @module column * @module column
*
*/ */
import { VNode } from 'vue'; import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
import { VirtualScrollerLoaderOptions } from '../virtualscroller'; import { VirtualScrollerLoaderOptions } from '../virtualscroller';
/**
* Filter model metadata.
*/
export interface ColumnFilterModelType { export interface ColumnFilterModelType {
/** /**
* Value of filterModel. * Value of filterModel.
@ -22,10 +27,17 @@ export interface ColumnFilterModelType {
matchMode: string; matchMode: string;
} }
/**
* Filter match modes for specific columns.
*/
export interface ColumnFilterMatchModeOptions { export interface ColumnFilterMatchModeOptions {
[key: string]: string; [key: string]: string;
} }
/**
* Custom column loading metadata.
* @see {@link VirtualScrollerLoaderOptions}
*/
export interface ColumnLoadingOptions extends VirtualScrollerLoaderOptions { export interface ColumnLoadingOptions extends VirtualScrollerLoaderOptions {
/** /**
* Cell index * Cell index
@ -57,6 +69,9 @@ export interface ColumnLoadingOptions extends VirtualScrollerLoaderOptions {
field: string; field: string;
} }
/**
* Defines valid properties in Column component.
*/
export interface ColumnProps { export interface ColumnProps {
/** /**
* Identifier of a column if field property is not defined. * Identifier of a column if field property is not defined.
@ -245,6 +260,9 @@ export interface ColumnProps {
hidden?: boolean | undefined; hidden?: boolean | undefined;
} }
/**
* Defines valid slots in Column component.
*/
export interface ColumnSlots { export interface ColumnSlots {
/** /**
* Custom body template. * Custom body template.
@ -469,7 +487,7 @@ export interface ColumnEmits {}
* *
* _Column is a helper component for DataTable and TreeTable._ * _Column is a helper component for DataTable and TreeTable._
* *
* [Live Demo](https://www.primevue.org/column/) * [Live Demo](https://www.primevue.org/datatable/)
* --- --- * --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png) * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
* *

View File

@ -3400,9 +3400,9 @@
"name": "appendTo", "name": "appendTo",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "CalendarAppendToType", "type": "string | HTMLElement",
"default": "", "default": "body",
"description": "A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are 'body' for document body and 'self' for the element itself." "description": "A valid query selector or an HTMLElement to specify where the overlay gets attached."
}, },
{ {
"name": "aria-label", "name": "aria-label",
@ -3496,9 +3496,9 @@
"name": "hourFormat", "name": "hourFormat",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "CalendarHourFormatType", "type": "\"12\" | \"24\"",
"default": "", "default": "",
"description": "Specifies 12 or 24 hour format." "description": "Specifies hour format."
}, },
{ {
"name": "icon", "name": "icon",
@ -3600,8 +3600,8 @@
"name": "modelValue", "name": "modelValue",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "CalendarValueType", "type": "null | string | string[] | Date | Date[]",
"default": "", "default": "null",
"description": "Value of the component." "description": "Value of the component."
}, },
{ {
@ -3696,9 +3696,9 @@
"name": "selectionMode", "name": "selectionMode",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "CalendarSelectionModeType", "type": "\"multiple\" | \"range\" | \"single\"",
"default": "", "default": "single",
"description": "Defines the quantity of the selection, valid values are 'single', 'multiple' and 'range'." "description": "Defines the quantity of the selection."
}, },
{ {
"name": "shortYearCutoff", "name": "shortYearCutoff",
@ -3816,9 +3816,9 @@
"name": "view", "name": "view",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "CalendarViewType", "type": "\"month\" | \"year\" | \"date\"",
"default": "", "default": "date",
"description": "Type of view to display, valid values are 'date', 'month' and 'year'." "description": "Type of view to display."
}, },
{ {
"name": "yearNavigator", "name": "yearNavigator",
@ -3928,7 +3928,17 @@
} }
} }
}, },
"card/Card": { "card": {
"description": "Card is a flexible container component.\n\n[Live Demo](https://www.primevue.org/card/)",
"components": {
"Card": {
"description": "Card is a flexible container component.",
"methods": {
"description": "Defines methods that can be accessed by the component's reference.",
"values": []
}
}
},
"interfaces": { "interfaces": {
"description": "Defines the custom interfaces used by the module.", "description": "Defines the custom interfaces used by the module.",
"eventDescription": "Defines the custom events used by the component's emit.", "eventDescription": "Defines the custom events used by the component's emit.",
@ -3944,52 +3954,45 @@
}, },
"CardSlots": { "CardSlots": {
"relatedProp": "", "relatedProp": "",
"props": [ "props": [],
"methods": [
{ {
"name": "content", "name": "content",
"optional": false, "parameters": [],
"readonly": false, "returnType": "VNode<RendererNode, RendererElement, Object>[]",
"type": "Function", "description": "Custom content template."
"default": ""
}, },
{ {
"name": "footer", "name": "footer",
"optional": false, "parameters": [],
"readonly": false, "returnType": "VNode<RendererNode, RendererElement, Object>[]",
"type": "Function", "description": "Custom footer template."
"default": ""
}, },
{ {
"name": "header", "name": "header",
"optional": false, "parameters": [],
"readonly": false, "returnType": "VNode<RendererNode, RendererElement, Object>[]",
"type": "Function", "description": "Custom header template."
"default": ""
}, },
{ {
"name": "subtitle", "name": "subtitle",
"optional": false, "parameters": [],
"readonly": false, "returnType": "VNode<RendererNode, RendererElement, Object>[]",
"type": "Function", "description": "Custom subtitle template."
"default": ""
}, },
{ {
"name": "title", "name": "title",
"optional": false, "parameters": [],
"readonly": false, "returnType": "VNode<RendererNode, RendererElement, Object>[]",
"type": "Function", "description": "Custom title template."
"default": ""
} }
], ]
"methods": [] },
}
}
},
"types": {
"description": "Defines the custom types used by the module.",
"values": {
"CardEmits": { "CardEmits": {
"values": "{}" "description": "",
"relatedProp": "",
"props": [],
"methods": []
} }
} }
} }
@ -5280,6 +5283,7 @@
"methods": [] "methods": []
}, },
"ColumnFilterMatchModeOptions": { "ColumnFilterMatchModeOptions": {
"description": "Filter match modes for specific columns.",
"relatedProp": "", "relatedProp": "",
"props": [ "props": [
{ {
@ -5292,6 +5296,7 @@
"methods": [] "methods": []
}, },
"ColumnFilterModelType": { "ColumnFilterModelType": {
"description": "Filter model metadata.",
"relatedProp": "", "relatedProp": "",
"props": [ "props": [
{ {
@ -5314,8 +5319,8 @@
"methods": [] "methods": []
}, },
"ColumnLoadingOptions": { "ColumnLoadingOptions": {
"description": "", "description": "Custom column loading metadata.",
"relatedProp": "", "relatedProp": "VirtualScrollerLoaderOptions",
"props": [ "props": [
{ {
"name": "cellEven", "name": "cellEven",
@ -5426,6 +5431,7 @@
"extendedTypes": "VirtualScrollerLoaderOptions" "extendedTypes": "VirtualScrollerLoaderOptions"
}, },
"ColumnProps": { "ColumnProps": {
"description": "Defines valid properties in Column component.",
"relatedProp": "", "relatedProp": "",
"props": [ "props": [
{ {
@ -5784,6 +5790,7 @@
"methods": [] "methods": []
}, },
"ColumnSlots": { "ColumnSlots": {
"description": "Defines valid slots in Column component.",
"relatedProp": "", "relatedProp": "",
"props": [], "props": [],
"methods": [ "methods": [
@ -5950,15 +5957,12 @@
"relatedProp": "", "relatedProp": "",
"props": [], "props": [],
"methods": [] "methods": []
} },
}
},
"types": {
"description": "Defines the custom types used by the module.",
"values": {
"ColumnGroupEmits": { "ColumnGroupEmits": {
"values": "{}", "description": "",
"description": "" "relatedProp": "",
"props": [],
"methods": []
} }
} }
} }
@ -7724,7 +7728,7 @@
"extendedTypes": "DataTableSortEvent" "extendedTypes": "DataTableSortEvent"
}, },
"DataTableProps": { "DataTableProps": {
"description": "Defines valid properties in Datatable component.", "description": "Defines valid properties in DataTable component.",
"relatedProp": "", "relatedProp": "",
"props": [ "props": [
{ {
@ -8463,7 +8467,7 @@
"extendedTypes": "DataTableRowSelectEvent" "extendedTypes": "DataTableRowSelectEvent"
}, },
"DataTableSlots": { "DataTableSlots": {
"description": "Defines valid slots in Datatable component.", "description": "Defines valid slots in DataTable component.",
"relatedProp": "", "relatedProp": "",
"props": [], "props": [],
"methods": [ "methods": [