diff --git a/packages/primevue/src/organizationchart/OrganizationChart.d.ts b/packages/primevue/src/organizationchart/OrganizationChart.d.ts index 767a631d07..055be382a1 100755 --- a/packages/primevue/src/organizationchart/OrganizationChart.d.ts +++ b/packages/primevue/src/organizationchart/OrganizationChart.d.ts @@ -10,7 +10,7 @@ import type { DefineComponent, DesignToken, EmitFn, HintedString, PassThrough } from '@primevue/core'; import type { ComponentHooks } from '@primevue/core/basecomponent'; import type { PassThroughOptions } from 'primevue/passthrough'; -import { VNode } from 'vue'; +import { AllowedComponentProps, ComponentCustomProps, VNode, VNodeProps } from 'vue'; export declare type OrganizationChartPassThroughOptionType = OrganizationChartPassThroughAttributes | ((options: OrganizationChartPassThroughMethodOptions) => OrganizationChartPassThroughAttributes | string) | string | null | undefined; @@ -231,11 +231,11 @@ export interface OrganizationChartContext { /** * Defines valid properties in OrganizationChart component. */ -export interface OrganizationChartProps { +export interface OrganizationChartProps { /** * Value of the component. */ - value?: OrganizationChartNode; + value?: T; /** * A map instance of key-value pairs to represented the selected nodes. */ @@ -277,7 +277,7 @@ export interface OrganizationChartProps { /** * Defines valid slots in OrganizationChart component. */ -export interface OrganizationChartSlots { +export interface OrganizationChartSlots { /** * Custom content template. */ @@ -285,13 +285,13 @@ export interface OrganizationChartSlots { /** * Current node */ - node: any; + node: T; }): VNode[]; /** * Dynamic content template. * @todo */ - [key: string]: (node: any) => VNode[]; + [key: string]: (node: T) => VNode[]; /** * @deprecated since v4.0. Use 'toggleicon' slot instead. * Custom toggler icon template. @@ -365,11 +365,19 @@ export declare type OrganizationChartEmits = EmitFn; +declare const OrganizationChart: { + new ( + props: OrganizationChartProps + ): { + $props: OrganizationChartProps & VNodeProps & AllowedComponentProps & ComponentCustomProps; + $slots: OrganizationChartSlots; + $emit: EmitFn; + }; +}; declare module 'vue' { export interface GlobalComponents { - OrganizationChart: DefineComponent; + OrganizationChart: typeof OrganizationChart; } } diff --git a/packages/primevue/src/tree/Tree.d.ts b/packages/primevue/src/tree/Tree.d.ts index 78369a9928..c6fd144a33 100755 --- a/packages/primevue/src/tree/Tree.d.ts +++ b/packages/primevue/src/tree/Tree.d.ts @@ -14,7 +14,7 @@ import type { InputIconPassThroughOptions } from 'primevue/inputicon'; import type { InputTextPassThroughOptions } from 'primevue/inputtext'; import type { PassThroughOptions } from 'primevue/passthrough'; import type { TreeNode } from 'primevue/treenode'; -import { VNode } from 'vue'; +import { AllowedComponentProps, ComponentCustomProps, VNode, VNodeProps } from 'vue'; export declare type TreePassThroughOptionType = TreePassThroughAttributes | ((options: TreePassThroughMethodOptions) => TreePassThroughAttributes | string) | string | null | undefined; @@ -324,11 +324,11 @@ export interface TreeContext { /** * Defines valid properties in Tree component. */ -export interface TreeProps { +export interface TreeProps { /** * An array of treenodes. */ - value?: TreeNode[] | undefined; + value?: T[] | undefined; /** * A map of keys to represent the expansion state in controlled mode. */ @@ -370,7 +370,7 @@ export interface TreeProps { * When filtering is enabled, filterBy decides which field or fields (comma separated) to search against. A callable taking a TreeNode can be provided instead of a list of field names. * @defaultValue label */ - filterBy?: string | ((node: TreeNode) => string) | undefined; + filterBy?: string | ((node: T) => string) | undefined; /** * Mode for filtering. * @defaultValue lenient @@ -450,7 +450,7 @@ export interface TreeProps { /** * Defines valid slots in Tree component. */ -export interface TreeSlots { +export interface TreeSlots { /** * Default content slot. */ @@ -458,7 +458,7 @@ export interface TreeSlots { /** * Tree node instance */ - node: TreeNode; + node: T; /** * Selection state */ @@ -508,7 +508,7 @@ export interface TreeSlots { /** * Tree node instance */ - node: TreeNode; + node: T; /** * Expanded state of the node */ @@ -523,7 +523,7 @@ export interface TreeSlots { /** * Tree node instance */ - node: TreeNode; + node: T; /** * Expanded state of the node */ @@ -537,7 +537,7 @@ export interface TreeSlots { /** * Tree node instance */ - node: TreeNode; + node: T; /** * Expanded state of the node */ @@ -551,7 +551,7 @@ export interface TreeSlots { /** * Tree node instance */ - node: TreeNode; + node: T; /** * Style class of the icon. */ @@ -615,7 +615,7 @@ export interface TreeSlots { * Optional slots. * @todo */ - [key: string]: (node: any) => VNode[]; + [key: string]: (node: T) => VNode[]; } /** @@ -703,11 +703,19 @@ export declare type TreeEmits = EmitFn; * @group Component * */ -declare const Tree: DefineComponent; +declare const Tree: { + new ( + props: TreeProps + ): { + $props: TreeProps & VNodeProps & AllowedComponentProps & ComponentCustomProps; + $slots: TreeSlots; + $emit: EmitFn; + }; +}; declare module 'vue' { export interface GlobalComponents { - Tree: DefineComponent; + Tree: typeof Tree; } } diff --git a/packages/primevue/src/treeselect/TreeSelect.d.ts b/packages/primevue/src/treeselect/TreeSelect.d.ts index 7c04d94389..c3f9ab19d2 100644 --- a/packages/primevue/src/treeselect/TreeSelect.d.ts +++ b/packages/primevue/src/treeselect/TreeSelect.d.ts @@ -13,7 +13,7 @@ import type { ChipPassThroughOptions } from 'primevue/chip'; import type { PassThroughOptions } from 'primevue/passthrough'; import type { TreeExpandedKeys, TreePassThroughOptions } from 'primevue/tree'; import type { TreeNode } from 'primevue/treenode'; -import { InputHTMLAttributes, TransitionProps, VNode } from 'vue'; +import { AllowedComponentProps, ComponentCustomProps, InputHTMLAttributes, TransitionProps, VNode, VNodeProps } from 'vue'; export declare type TreeSelectPassThroughOptionType = TreeSelectPassThroughAttributes | ((options: TreeSelectPassThroughMethodOptions) => TreeSelectPassThroughAttributes | string) | string | null | undefined; @@ -172,15 +172,15 @@ export interface TreeSelectState { /** * Defines valid properties in TreeSelect component. */ -export interface TreeSelectProps { +export interface TreeSelectProps { /** * Value of the component. */ - modelValue?: TreeNode | any; + modelValue?: T | any; /** * The default value for the input when not controlled by `modelValue`. */ - defaultValue?: TreeNode | any; + defaultValue?: T | any; /** * The name attribute for the element, typically used in form submissions. */ @@ -188,7 +188,7 @@ export interface TreeSelectProps { /** * An array of treenodes. */ - options?: TreeNode[] | undefined; + options?: T[] | undefined; /** * A map of keys to represent the expansion state in controlled mode. */ @@ -264,7 +264,7 @@ export interface TreeSelectProps { * When filtering is enabled, filterBy decides which field or fields (comma separated) to search against. A callable taking a TreeNode can be provided instead of a list of field names. * @defaultValue label */ - filterBy?: string | ((node: TreeNode) => string) | undefined; + filterBy?: string | ((node: T) => string) | undefined; /** * Mode for filtering. * @defaultValue lenient @@ -366,7 +366,7 @@ export interface TreeSelectProps { /** * Defines valid slots in TreeSelect component. */ -export interface TreeSelectSlots { +export interface TreeSelectSlots { /** * Custom value template. * @param {Object} scope - value slot's params. @@ -375,7 +375,7 @@ export interface TreeSelectSlots { /** * Selected value */ - value: TreeNode | any; + value: T | any; /** * Placeholder */ @@ -389,7 +389,7 @@ export interface TreeSelectSlots { /** * Current node */ - node: TreeNode | any; + node: T; /** * Selection state */ @@ -407,11 +407,11 @@ export interface TreeSelectSlots { /** * Selected value */ - value: TreeNode | any; + value: T | any; /** * An array of treenodes. */ - options: TreeNode[]; + options: T[]; }): VNode[]; /** * Custom footer template. @@ -421,11 +421,11 @@ export interface TreeSelectSlots { /** * Selected value */ - value: TreeNode | any; + value: T | any; /** * An array of treenodes. */ - options: TreeNode[]; + options: T[]; }): VNode[]; /** * Custom empty template. @@ -461,11 +461,11 @@ export interface TreeSelectSlots { /** * Node instance */ - node: TreeNode | any; + node: T; /** * Expanded state of the node */ - expanded: TreeNode[]; + expanded: T[]; }): VNode[]; /** * Custom item toggle icon template. @@ -475,11 +475,11 @@ export interface TreeSelectSlots { /** * Node instance */ - node: TreeNode | any; + node: T; /** * Expanded state of the node */ - expanded: TreeNode[]; + expanded: T[]; }): VNode[]; /** * Custom item checkbox icon template. @@ -599,11 +599,19 @@ export interface TreeSelectMethods { * @group Component * */ -declare const TreeSelect: DefineComponent; +declare const TreeSelect: { + new ( + props: TreeSelectProps + ): { + $props: TreeSelectProps & VNodeProps & AllowedComponentProps & ComponentCustomProps; + $slots: TreeSelectSlots; + $emit: EmitFn; + } & TreeSelectMethods; +}; declare module 'vue' { export interface GlobalComponents { - TreeSelect: DefineComponent; + TreeSelect: typeof TreeSelect; } }