From 2d343263b4adf7632a8698a2c3dc2215c44f3568 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 1 Mar 2023 13:04:32 +0000 Subject: [PATCH] PanelMenu d.ts updated --- components/panelmenu/PanelMenu.d.ts | 70 ++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 21 deletions(-) diff --git a/components/panelmenu/PanelMenu.d.ts b/components/panelmenu/PanelMenu.d.ts index d08a31036..d4146e87d 100755 --- a/components/panelmenu/PanelMenu.d.ts +++ b/components/panelmenu/PanelMenu.d.ts @@ -1,11 +1,28 @@ +/** + * + * PanelMenu is a hybrid of Accordion and Tree components. + * + * [Live Demo](https://www.primevue.org/panelmenu/) + * + * @module panelmenu + * + */ import { VNode } from 'vue'; import { MenuItem } from '../menuitem'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; +/** + * Custom expanded keys metadata. + * @see {@link PanelMenuProps.expandedKeys} + */ export interface PanelMenuExpandedKeys { [key: string]: any; } +/** + * Custom panel open event. + * @see {@link PanelMenuEmits['panel-open']} + */ export interface PanelMenuPanelOpenEvent { /** * Browser mouse event. @@ -19,10 +36,15 @@ export interface PanelMenuPanelOpenEvent { } /** + * Custom panel close event. + * @see {@link PanelMenuEmits['panel-close']} * @extends {PanelMenuPanelOpenEvent} */ export interface PanelMenuPanelCloseEvent extends PanelMenuPanelOpenEvent {} +/** + * Defines valid properties in PanelMenu component. + */ export interface PanelMenuProps { /** * An array of menuitems. @@ -30,11 +52,12 @@ export interface PanelMenuProps { model?: MenuItem[] | undefined; /** * A map of keys to represent the expansion state in controlled mode. - * @see PanelMenuExpandedKeys + * @type {PanelMenuExpandedKeys} */ expandedKeys?: PanelMenuExpandedKeys; /** * Whether to apply 'router-link-active-exact' class if route exactly matches the item path. + * @defaultValue true */ exact?: boolean | undefined; /** @@ -43,37 +66,55 @@ export interface PanelMenuProps { tabindex?: number | string | undefined; } +/** + * Defines valid slots in PanelMenu component. + */ export interface PanelMenuSlots { /** * Custom content for each item. * @param {Object} scope - item slot's params. */ - item: (scope: { + item(scope: { /** * Menuitem instance */ item: MenuItem; - }) => VNode[]; + }): VNode[]; } -export declare type PanelMenuEmits = { +/** + * Defines valid emits in PanelMenu component. + */ +export interface PanelMenuEmits { /** * Emitted when the expandedKeys changes. * @param {*} value - New value. */ - 'update:expandedKeys': (value: any) => void; + 'update:expandedKeys'(value: any): void; /** * Callback to invoke when a panel gets expanded. * @param {PanelMenuPanelOpenEvent} event - Custom panel open event. */ - 'panel-open': (event: PanelMenuPanelOpenEvent) => void; + 'panel-open'(event: PanelMenuPanelOpenEvent): void; /** * Callback to invoke when an active panel is collapsed by clicking on the header. * @param {PanelMenuPanelCloseEvent} event - Custom panel close event. */ - 'panel-close': (event: PanelMenuPanelCloseEvent) => void; -}; + 'panel-close'(event: PanelMenuPanelCloseEvent): void; +} +/** + * **PrimeVue - PanelMenu** + * + * _PanelMenu is a hybrid of Accordion and Tree components._ + * + * [Live Demo](https://www.primevue.org/panelmenu/) + * --- --- + * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) + * + * @group Component + * + */ declare class PanelMenu extends ClassComponent {} declare module '@vue/runtime-core' { @@ -82,17 +123,4 @@ declare module '@vue/runtime-core' { } } -/** - * - * PanelMenu is a hybrid of Accordion and Tree components. - * - * Helper API: - * - * - [MenuItem](https://www.primefaces.org/primevue/menumodel) - * - * Demos: - * - * - [PanelMenu](https://www.primefaces.org/primevue/panelmenu) - * - */ export default PanelMenu;