From 56285f087c4f6d4c79c916d749e27d293c607fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 25 Oct 2021 10:06:40 +0300 Subject: [PATCH] Fixed #1695 - Update all .d.ts files for events and slots --- src/components/autocomplete/AutoComplete.d.ts | 52 +++++++++++++--- src/components/breadcrumb/Breadcrumb.d.ts | 7 +++ src/components/calendar/Calendar.d.ts | 6 +- src/components/carousel/Carousel.d.ts | 7 ++- .../cascadeselect/CascadeSelect.d.ts | 13 +++- src/components/chips/Chips.d.ts | 6 +- src/components/column/Column.d.ts | 53 ++++++++++++---- src/components/contextmenu/ContextMenu.d.ts | 6 +- src/components/datatable/DataTable.d.ts | 35 +++++++++-- src/components/dataview/DataView.d.ts | 9 ++- src/components/dock/Dock.d.ts | 12 +++- src/components/dropdown/Dropdown.d.ts | 54 ++++++++++++++--- src/components/fileupload/FileUpload.d.ts | 5 ++ src/components/galleria/Galleria.d.ts | 24 ++++++-- src/components/listbox/Listbox.d.ts | 45 +++++++++++--- src/components/megamenu/MegaMenu.d.ts | 6 +- src/components/menu/Menu.d.ts | 6 +- src/components/menubar/Menubar.d.ts | 6 +- src/components/multiselect/MultiSelect.d.ts | 60 ++++++++++++++++--- src/components/orderlist/OrderList.d.ts | 7 ++- src/components/paginator/Paginator.d.ts | 14 +++-- src/components/panelmenu/PanelMenu.d.ts | 8 ++- src/components/picklist/PickList.d.ts | 7 ++- src/components/selectbutton/SelectButton.d.ts | 9 ++- src/components/speeddial/SpeedDial.d.ts | 6 +- src/components/steps/Steps.d.ts | 8 ++- src/components/tabmenu/TabMenu.d.ts | 8 ++- src/components/tieredmenu/TieredMenu.d.ts | 8 ++- src/components/timeline/Timeline.d.ts | 11 +++- src/components/toast/Toast.d.ts | 7 +++ src/components/tree/Tree.d.ts | 6 +- src/components/treeselect/TreeSelect.d.ts | 23 ++++++- .../virtualscroller/VirtualScroller.d.ts | 45 ++++++++++++-- 33 files changed, 478 insertions(+), 101 deletions(-) diff --git a/src/components/autocomplete/AutoComplete.d.ts b/src/components/autocomplete/AutoComplete.d.ts index ade331931f..39eef08fef 100755 --- a/src/components/autocomplete/AutoComplete.d.ts +++ b/src/components/autocomplete/AutoComplete.d.ts @@ -1,5 +1,4 @@ -import { VNode } from 'vue'; -import { VirtualScrollerProps } from '../virtualscroller'; +import VirtualScrollerProps from '../virtualscroller'; interface AutoCompleteProps { modelValue?: any; @@ -25,6 +24,41 @@ interface AutoCompleteProps { virtualScrollerOptions?: VirtualScrollerProps; } +interface AutoCompleteItemSlotInterface { + item: any; + index: number; +} + +interface AutoCompleteOptionGroupInterface { + item: any; + index: number; +} + +interface AutoCompleteHeaderInterface { + value: any; + suggestions: any; +} + +interface AutoCompleteFooterInterface { + value: any; + suggestions: any; +} + +interface AutoCompleteChipInterface { + value: any; +} + +interface AutoCompleteContentInterface { + items: any; + styleClass: string; + contentRef: string; + getItemOptions: any; +} + +interface AutoCompleteLoaderInterface { + options: any[]; +} + declare class AutoComplete { $props: AutoCompleteProps; $emit(eventName: 'update:modelValue', value: any): this; @@ -34,13 +68,13 @@ declare class AutoComplete { $emit(eventName: 'complete', e: {originalEvent: Event, query: string}): this; $emit(eventName: 'clear'): this; $slots: { - item: VNode[]; - optiongroup: VNode[]; - header: VNode[]; - footer: VNode[]; - chip: VNode[]; - content: VNode[]; - loader: VNode[]; + item: AutoCompleteItemSlotInterface; + optiongroup: AutoCompleteOptionGroupInterface; + header: AutoCompleteHeaderInterface; + footer: AutoCompleteFooterInterface; + chip: AutoCompleteChipInterface; + content: AutoCompleteContentInterface; + loader: AutoCompleteLoaderInterface; }; } diff --git a/src/components/breadcrumb/Breadcrumb.d.ts b/src/components/breadcrumb/Breadcrumb.d.ts index 76cbaaee70..a724b25293 100755 --- a/src/components/breadcrumb/Breadcrumb.d.ts +++ b/src/components/breadcrumb/Breadcrumb.d.ts @@ -4,8 +4,15 @@ interface BreadcrumbProps { exact?: boolean; } +interface BreadcrumbItemSlotInterface { + item: any; +} + declare class Breadcrumb { $props: BreadcrumbProps; + $slots: { + item: BreadcrumbItemSlotInterface + } } export default Breadcrumb; diff --git a/src/components/calendar/Calendar.d.ts b/src/components/calendar/Calendar.d.ts index 1f561db712..202469637d 100755 --- a/src/components/calendar/Calendar.d.ts +++ b/src/components/calendar/Calendar.d.ts @@ -45,6 +45,10 @@ interface CalendarProps { keepInvalid?: boolean; } +interface CalendarDateSlotInterface { + date: any; +} + declare class Calendar { $props: CalendarProps; $emit(eventName: 'update:modelValue', value: Date | Date[]): this; @@ -57,7 +61,7 @@ declare class Calendar { $emit(eventName: 'clear-click', event: Event): this; $slots: { header: VNode[]; - date: VNode[]; + date: CalendarDateSlotInterface; footer: VNode[]; }; } diff --git a/src/components/carousel/Carousel.d.ts b/src/components/carousel/Carousel.d.ts index 5f2a3fb437..fb844bcce5 100755 --- a/src/components/carousel/Carousel.d.ts +++ b/src/components/carousel/Carousel.d.ts @@ -15,11 +15,16 @@ interface CarouselProps { autoplayInterval?: number; } +interface CarouselItemSlotInterface { + data: any; + index: number; +} + declare class Carousel { $props: CarouselProps; $emit(eventName: 'update:page', value: number): this; $slots: { - item: VNode[]; + item: CarouselItemSlotInterface; header: VNode[]; footer: VNode[]; } diff --git a/src/components/cascadeselect/CascadeSelect.d.ts b/src/components/cascadeselect/CascadeSelect.d.ts index 27a6da871e..e7189e6d95 100644 --- a/src/components/cascadeselect/CascadeSelect.d.ts +++ b/src/components/cascadeselect/CascadeSelect.d.ts @@ -19,6 +19,15 @@ interface CascadeSelectProps { loadingIcon?: string; } +interface CascadeSelectOptionSlotInterface { + option: any; +} + +interface CascadeSelectValueSlotInterface { + value: any; + placeholder: string; +} + declare class CascadeSelect { $props: CascadeSelectProps; $emit(eventName: 'update:modelValue', value: string): this; @@ -29,8 +38,8 @@ declare class CascadeSelect { $emit(eventName: 'show'): this; $emit(eventName: 'hide'): this; $slot: { - option: VNode[]; - value: VNode[]; + option: CascadeSelectOptionSlotInterface; + value: CascadeSelectValueSlotInterface; indicator: VNode[]; } } diff --git a/src/components/chips/Chips.d.ts b/src/components/chips/Chips.d.ts index 5991446334..6fc0ecdd1f 100755 --- a/src/components/chips/Chips.d.ts +++ b/src/components/chips/Chips.d.ts @@ -10,13 +10,17 @@ interface ChipsProps { style?: any; } +interface ChipsChipSlotInterface { + value: any; +} + declare class Chips { $props: ChipsProps; $emit(eventName: 'update:modelValue', value: any[]): this; $emit(eventName: 'add', e: { originalEvent: Event, value: any }): this; $emit(eventName: 'remove', e: { originalEvent: Event, value: any }): this; $slots: { - chip: VNode[]; + chip: ChipsChipSlotInterface; } } diff --git a/src/components/column/Column.d.ts b/src/components/column/Column.d.ts index 2f394efdf5..399c2a0303 100755 --- a/src/components/column/Column.d.ts +++ b/src/components/column/Column.d.ts @@ -1,5 +1,3 @@ -import { VNode } from 'vue'; - interface ColumnProps { columnKey?: any; field?: string | ((item: any) => any); @@ -45,18 +43,51 @@ interface ColumnProps { hidden?: boolean; } +interface ColumnBodySlotInterface { + data: any; + column: any; + field: string; + index: number; + frozenRow: boolean; +} + +interface ColumnHeaderSlotInterface { + column: any; +} + +interface ColumnFooterSlotInterface { + column: any; +} + +interface ColumnEditorSlotInterface { + data: any; + column: any; + field: string; + index: number; + frozenRow: boolean; +} + +interface ColumnFilterSlotInterface { + field: string; + filterModel: { + value: any; + matchMode: string; + }; + filterCallback: any; +} + declare class Column { $props: ColumnProps; $slots: { - body: VNode[]; - header: VNode[]; - footer: VNode[]; - editor: VNode[]; - filter: VNode[]; - filterheader: VNode[]; - filterfooter: VNode[]; - filterclear: VNode[]; - filterapply: VNode[]; + body: ColumnBodySlotInterface; + header: ColumnHeaderSlotInterface; + footer: ColumnFooterSlotInterface; + editor: ColumnEditorSlotInterface; + filter: ColumnFilterSlotInterface; + filterheader: ColumnFilterSlotInterface; + filterfooter: ColumnFilterSlotInterface; + filterclear: ColumnFilterSlotInterface; + filterapply: ColumnFilterSlotInterface; } } diff --git a/src/components/contextmenu/ContextMenu.d.ts b/src/components/contextmenu/ContextMenu.d.ts index 1f3fff4abc..2e45a08bfd 100755 --- a/src/components/contextmenu/ContextMenu.d.ts +++ b/src/components/contextmenu/ContextMenu.d.ts @@ -9,10 +9,14 @@ interface ContextMenuProps { exact?: boolean; } +interface ContextMenuItemSlotInterface { + item: object; +} + declare class ContextMenu { $props: ContextMenuProps; $slots: { - item: VNode[]; + item: ContextMenuItemSlotInterface; } toggle(event: Event): void; show(event: Event, target?: any): void; diff --git a/src/components/datatable/DataTable.d.ts b/src/components/datatable/DataTable.d.ts index 611ac10429..5b7323238d 100755 --- a/src/components/datatable/DataTable.d.ts +++ b/src/components/datatable/DataTable.d.ts @@ -63,6 +63,29 @@ interface DataTableProps { stripedRows?: boolean; } +interface DataTableHeaderSlotInterface { + column: any; +} + +interface DataTableFooterSlotInterface { + column: any; +} + +interface DataTableGroupHeaderSlotInterface { + data: any; + index: number; +} + +interface DataTableGroupFooterSlotInterface { + data: any; + index: number; +} + +interface DataTableExpansionSlotInterface { + data: any; + index: number; +} + declare class DataTable { $props: DataTableProps; @@ -104,16 +127,18 @@ declare class DataTable { $emit(eventName: 'state-restore', value: any[]): this; $emit(eventName: 'state-save', value: any[]): this; + exportCSV(options?: any): void; + $slots: { - header: VNode[]; + header: DataTableHeaderSlotInterface; + footer: DataTableFooterSlotInterface; paginatorLeft: VNode[]; paginatorRight: VNode[]; empty: VNode[]; - footer: VNode[]; - groupheader: VNode[]; - groupfooter: VNode[]; + groupheader: DataTableGroupHeaderSlotInterface; + groupfooter: DataTableGroupFooterSlotInterface; loading: VNode[]; - expansion: VNode[]; + expansion: DataTableExpansionSlotInterface; }; } diff --git a/src/components/dataview/DataView.d.ts b/src/components/dataview/DataView.d.ts index ac66aeb36f..979972abb6 100755 --- a/src/components/dataview/DataView.d.ts +++ b/src/components/dataview/DataView.d.ts @@ -18,6 +18,11 @@ interface DataViewProps { lazy?: boolean; } +interface DataViewSlotInterface { + data: any; + index: number; +} + declare class DataView { $props: DataViewProps; $emit(eventName: 'update:first', value: number): this; @@ -27,8 +32,8 @@ declare class DataView { header: VNode[]; paginatorLeft: VNode[]; paginatorRight: VNode[]; - list: VNode[]; - grid: VNode[]; + list: DataViewSlotInterface; + grid: DataViewSlotInterface; empty: VNode[]; footer: VNode[]; } diff --git a/src/components/dock/Dock.d.ts b/src/components/dock/Dock.d.ts index cef2af843e..b5caba9833 100644 --- a/src/components/dock/Dock.d.ts +++ b/src/components/dock/Dock.d.ts @@ -9,11 +9,19 @@ interface DockProps { tooltipOptions?: any; } +interface DockItemSlotInterface { + item: any; +} + +interface DockIconSlotInterface { + item: any; +} + declare class Dock { $props: DockProps; $slots: { - 'item': VNode[]; - 'icon': VNode[]; + item: DockItemSlotInterface; + icon: DockIconSlotInterface; } } diff --git a/src/components/dropdown/Dropdown.d.ts b/src/components/dropdown/Dropdown.d.ts index 079ab91450..55f48a341d 100755 --- a/src/components/dropdown/Dropdown.d.ts +++ b/src/components/dropdown/Dropdown.d.ts @@ -1,5 +1,5 @@ import { VNode } from 'vue'; -import { VirtualScrollerProps } from '../virtualscroller'; +import VirtualScrollerProps from '../virtualscroller'; interface DropdownProps { modelValue?: any; @@ -32,6 +32,42 @@ interface DropdownProps { virtualScrollerOptions?: VirtualScrollerProps; } +interface DropdownValueSlotInterface { + value: any; + placeholder: string; +} + +interface DropdownHeaderSlotInterface { + value: any; + options: any[]; +} + +interface DropdownFooterSlotInterface { + value: any; + options: any[]; +} + +interface DropdownOptionSlotInterface { + option: any; + index: number; +} + +interface DropdownOptionGroupSlotInterface { + option: any; + index: number; +} + +interface DropdownContentInterface { + items: any; + styleClass: string; + contentRef: string; + getItemOptions: any; +} + +interface DropdownLoaderInterface { + options: any[]; +} + declare class Dropdown { $props: DropdownProps; $emit(eventName: 'update:modelValue', value: any): this; @@ -43,16 +79,18 @@ declare class Dropdown { $emit(eventName: 'focus', e: Event): this; $emit(eventName: 'blur', e: Event): this; $emit(eventName: 'filter', e: { originalEvent: Event, value: string }): this; + show(): void; + hide(): void; $slot: { - value: VNode[]; - header: VNode[]; - footer: VNode[]; - option: VNode[]; - optiongroup: VNode[]; + value: DropdownValueSlotInterface; + header: DropdownHeaderSlotInterface; + footer: DropdownFooterSlotInterface; + option: DropdownOptionSlotInterface; + optiongroup: DropdownOptionGroupSlotInterface; emptyfilter: VNode[]; empty: VNode[]; - content: VNode[]; - loader: VNode[]; + content: DropdownContentInterface; + loader: DropdownLoaderInterface; indicator: VNode[]; } } diff --git a/src/components/fileupload/FileUpload.d.ts b/src/components/fileupload/FileUpload.d.ts index 1fb1e8c874..7afc380551 100755 --- a/src/components/fileupload/FileUpload.d.ts +++ b/src/components/fileupload/FileUpload.d.ts @@ -1,3 +1,5 @@ +import { VNode } from 'vue'; + interface FileUploadProps { name?: string; url?: string; @@ -34,6 +36,9 @@ declare class FileUpload { $emit(eventName: 'before-send', e: { xhr: XMLHttpRequest, formData: any }): this; $emit(eventName: 'clear'): this; $emit(eventName: 'remove', e: { file: File, files: File[] }): this; + $slots: { + empty: VNode[]; + } } export default FileUpload; diff --git a/src/components/galleria/Galleria.d.ts b/src/components/galleria/Galleria.d.ts index 3dabf09356..6e5c2c2205 100755 --- a/src/components/galleria/Galleria.d.ts +++ b/src/components/galleria/Galleria.d.ts @@ -27,6 +27,22 @@ interface GalleriaProps { containerClass?: string; } +interface GalleriaItemSlotInterface { + item: any; +} + +interface GalleriaCaptionSlotInterface { + item: any; +} + +interface GalleriaIndicatorlotInterface { + index: number; +} + +interface GalleriaThumbnailSlotInterface { + item: any; +} + declare class Galleria { $props: GalleriaProps; $emit(eventName: 'update:activeIndex', value: number): this; @@ -34,10 +50,10 @@ declare class Galleria { $slots: { header: VNode[]; footer: VNode[]; - item: VNode[]; - caption: VNode[]; - indicator: VNode[]; - thumbnail: VNode[]; + item: GalleriaItemSlotInterface; + caption: GalleriaCaptionSlotInterface; + indicator: GalleriaIndicatorlotInterface; + thumbnail: GalleriaThumbnailSlotInterface; } } diff --git a/src/components/listbox/Listbox.d.ts b/src/components/listbox/Listbox.d.ts index 22ec4eec43..594eb1710c 100755 --- a/src/components/listbox/Listbox.d.ts +++ b/src/components/listbox/Listbox.d.ts @@ -1,5 +1,5 @@ import { VNode } from 'vue'; -import { VirtualScrollerProps } from '../virtualscroller'; +import VirtualScrollerProps from '../virtualscroller'; interface ListboxProps { modelValue?: any; @@ -24,20 +24,51 @@ interface ListboxProps { virtualScrollerOptions?: VirtualScrollerProps; } +interface ListboxHeaderSlotInterface { + value: any; + options: any[]; +} + +interface ListboxFooterSlotInterface { + value: any; + options: any[]; +} + +interface ListboxOptionSlotInterface { + option: any; + index: number; +} + +interface ListboxOptionGroupSlotInterface { + option: any; + index: number; +} + +interface ListboxContentInterface { + items: any; + styleClass: string; + contentRef: string; + getItemOptions: any; +} + +interface ListboxLoaderSlotInterface { + options: any[]; +} + declare class Listbox { $props: ListboxProps; $emit(eventName: 'update:modelValue', value: any): this; $emit(eventName: 'change', e: { originalEvent: Event, value: any }): this; $emit(eventName: 'filter', e: { originalEvent: Event, value: string }): this; $slots: { - header: VNode[]; - footer: VNode[]; - option: VNode[]; - optiongroup: VNode[]; + header: ListboxHeaderSlotInterface; + footer: ListboxFooterSlotInterface; + option: ListboxOptionSlotInterface; + optiongroup: ListboxOptionGroupSlotInterface; emptyfilter: VNode[]; empty: VNode[]; - content: VNode[]; - loader: VNode[]; + content: ListboxContentInterface; + loader: ListboxLoaderSlotInterface; } } diff --git a/src/components/megamenu/MegaMenu.d.ts b/src/components/megamenu/MegaMenu.d.ts index b36c0f1b9b..8cbe26d017 100755 --- a/src/components/megamenu/MegaMenu.d.ts +++ b/src/components/megamenu/MegaMenu.d.ts @@ -6,12 +6,16 @@ interface MegaMenuProps { exact?: boolean; } +interface MegaMenuItemSlotInterface { + item: any; +} + declare class MegaMenu { $props: MegaMenuProps; $slots: { start: VNode[]; end: VNode[]; - item: VNode[]; + item: MegaMenuItemSlotInterface; } } diff --git a/src/components/menu/Menu.d.ts b/src/components/menu/Menu.d.ts index 2ee9605d70..dad186a747 100755 --- a/src/components/menu/Menu.d.ts +++ b/src/components/menu/Menu.d.ts @@ -9,13 +9,17 @@ interface MenuProps { exact?: boolean; } +interface MenuItemSlotInterface { + item: any; +} + declare class Menu { $props: MenuProps; toggle(event: Event): void; show(event: Event, target?: any): void; hide(): void; $slots: { - item: VNode[]; + item: MenuItemSlotInterface; } } diff --git a/src/components/menubar/Menubar.d.ts b/src/components/menubar/Menubar.d.ts index f443f01ced..86f3cc16a0 100755 --- a/src/components/menubar/Menubar.d.ts +++ b/src/components/menubar/Menubar.d.ts @@ -5,12 +5,16 @@ interface MenubarProps { exact?: boolean; } +interface MenubarItemSlotInterface { + item: any; +} + declare class Menubar { $props: MenubarProps; $slots: { start: VNode[]; end: VNode[]; - item: VNode[]; + item: MenubarItemSlotInterface; } } diff --git a/src/components/multiselect/MultiSelect.d.ts b/src/components/multiselect/MultiSelect.d.ts index 6995134ba1..f55f2052e8 100755 --- a/src/components/multiselect/MultiSelect.d.ts +++ b/src/components/multiselect/MultiSelect.d.ts @@ -1,5 +1,5 @@ import { VNode } from 'vue'; -import { VirtualScrollerProps } from '../virtualscroller'; +import VirtualScrollerProps from '../virtualscroller'; interface MultiSelectProps { modelValue?: any; @@ -36,6 +36,46 @@ interface MultiSelectProps { selectAll?: boolean; } +interface MultiSelectValueSlotInterface { + value: any; + placeholder: string; +} + +interface MultiSelectHeaderSlotInterface { + value: any; + options: any[]; +} + +interface MultiSelectFooterSlotInterface { + value: any; + options: any[]; +} + +interface MultiSelectOptionSlotInterface { + option: any; + index: number; +} + +interface MultiSelectOptionGroupSlotInterface { + option: any; + index: number; +} + +interface MultiSelectChipSlotContent { + value: any; +} + +interface MultiSelectContentInterface { + items: any; + styleClass: string; + contentRef: string; + getItemOptions: any; +} + +interface MultiSelectLoaderSlotInterface { + options: any[]; +} + declare class MultiSelect { $props: MultiSelectProps; $emit(eventName: 'update:modelValue', value: any): this; @@ -46,17 +86,19 @@ declare class MultiSelect { $emit(eventName: 'hide'): this; $emit(eventName: 'filter', e: { originalEvent: Event, value: string }): this; $emit(eventName: 'selectall-change', e: { originalEvent: Event, checked: boolean }): this; + show(): void; + hide(): void; $slots: { - value: VNode[]; - header: VNode[]; - footer: VNode[]; + value: MultiSelectValueSlotInterface; + header: MultiSelectHeaderSlotInterface; + footer: MultiSelectFooterSlotInterface; emptyfilter: VNode[]; empty: VNode[]; - option: VNode[]; - optiongroup: VNode[]; - chip: VNode[]; - content: VNode[]; - loader: VNode[]; + option: MultiSelectOptionSlotInterface; + optiongroup: MultiSelectOptionGroupSlotInterface; + chip: MultiSelectChipSlotContent; + content: MultiSelectContentInterface; + loader: MultiSelectLoaderSlotInterface; indicator: VNode[]; } } diff --git a/src/components/orderlist/OrderList.d.ts b/src/components/orderlist/OrderList.d.ts index e8acd93d3a..a7a2c834a4 100755 --- a/src/components/orderlist/OrderList.d.ts +++ b/src/components/orderlist/OrderList.d.ts @@ -10,6 +10,11 @@ interface OrderListProps { breakpoint?: string; } +interface OrderListItemSlotInterface { + item: any; + index: number; +} + declare class OrderList { $props: OrderListProps; $emit(eventName: 'update:modelValue', value: any[]): this; @@ -18,7 +23,7 @@ declare class OrderList { $emit(eventName: 'selection-change', e: { originalEvent: Event, value: any[]}): this; $slots: { header: VNode[]; - item: VNode[]; + item: OrderListItemSlotInterface; } } diff --git a/src/components/paginator/Paginator.d.ts b/src/components/paginator/Paginator.d.ts index c7317f96f4..c70b22719d 100755 --- a/src/components/paginator/Paginator.d.ts +++ b/src/components/paginator/Paginator.d.ts @@ -1,5 +1,3 @@ -import { VNode } from 'vue'; - export interface PageState { first: number, rows: number, @@ -18,14 +16,22 @@ interface PaginatorProps { alwaysShow?: boolean; } +interface PaginatorSlotInterface { + currentState: { + page: number; + first: number; + rows: number; + } +} + declare class Paginator { $props: PaginatorProps; $emit(eventName: 'update:first', value: number): this; $emit(eventName: 'update:rows', value: number): this; $emit(eventName: 'page', event: PageState): this; $slots: { - left: VNode[]; - right: VNode[]; + left: PaginatorSlotInterface; + right: PaginatorSlotInterface; } } diff --git a/src/components/panelmenu/PanelMenu.d.ts b/src/components/panelmenu/PanelMenu.d.ts index fb541939e7..f8f6ed3cc8 100755 --- a/src/components/panelmenu/PanelMenu.d.ts +++ b/src/components/panelmenu/PanelMenu.d.ts @@ -1,16 +1,18 @@ -import { VNode } from 'vue'; - interface PanelMenuProps { model?: any[]; expandedKeys?: any; exact?: boolean; } +interface PanelMenuItemSlotInterface { + item: any; +} + declare class PanelMenu { $props: PanelMenuProps; $emit(eventName: 'update:expandedKeys', value: any): this; $slots: { - item: VNode[]; + item: PanelMenuItemSlotInterface; } } diff --git a/src/components/picklist/PickList.d.ts b/src/components/picklist/PickList.d.ts index 98b16af798..b2051e152d 100755 --- a/src/components/picklist/PickList.d.ts +++ b/src/components/picklist/PickList.d.ts @@ -10,6 +10,11 @@ interface PickListProps { breakpoint?: string; } +interface PickListItemSlotInterface { + item: any; + index: number; +} + declare class PickList { $props: PickListProps; $emit(eventName: 'update:modelValue', value: any[]): this; @@ -22,7 +27,7 @@ declare class PickList { $emit(eventName: 'move-all-tou-source', e: { originalEvent: Event, items: [] }): this; $slots: { header: VNode[]; - item: VNode[]; + item: PickListItemSlotInterface; sourceHeader: VNode[]; targetHeader: VNode[]; } diff --git a/src/components/selectbutton/SelectButton.d.ts b/src/components/selectbutton/SelectButton.d.ts index 76e1361343..06a9c9c90b 100755 --- a/src/components/selectbutton/SelectButton.d.ts +++ b/src/components/selectbutton/SelectButton.d.ts @@ -1,5 +1,3 @@ -import { VNode } from 'vue'; - interface SelectButtonProps { modelValue?: any; options?: any[]; @@ -12,13 +10,18 @@ interface SelectButtonProps { ariaLabelledBy?: string; } +interface SelectButtonOptionSlotInterface { + option: any; + index: number; +} + declare class SelectButton { $props: SelectButtonProps; $emit(eventName: 'update:modelValue', value: any): this; $emit(eventName: 'focus', event: Event): this; $emit(eventName: 'blur', event: Event): this; $slots: { - option: VNode[]; + option: SelectButtonOptionSlotInterface; } } diff --git a/src/components/speeddial/SpeedDial.d.ts b/src/components/speeddial/SpeedDial.d.ts index 776540d89b..1e07249438 100644 --- a/src/components/speeddial/SpeedDial.d.ts +++ b/src/components/speeddial/SpeedDial.d.ts @@ -21,13 +21,17 @@ interface SpeedDialProps { tooltipOptions?: any; } +interface SpeedDialItemSlotInterface { + item: any; +} + declare class SpeedDial { $props: SpeedDialProps; $emit(eventName: 'click', event: Event): this; $emit(eventName: 'show'): this; $emit(eventName: 'hide'): this; $slots: { - item: VNode[]; + item: SpeedDialItemSlotInterface; button: VNode[]; }; } diff --git a/src/components/steps/Steps.d.ts b/src/components/steps/Steps.d.ts index 83dad3368d..a8c6508df2 100755 --- a/src/components/steps/Steps.d.ts +++ b/src/components/steps/Steps.d.ts @@ -1,5 +1,3 @@ -import { VNode } from 'vue'; - interface StepsProps { id?: string; model?: any[]; @@ -7,10 +5,14 @@ interface StepsProps { exact?: boolean; } +interface StepsItemSlotInterface { + item: any; +} + declare class Steps { $props: StepsProps; $slots: { - item: VNode[]; + item: StepsItemSlotInterface; } } diff --git a/src/components/tabmenu/TabMenu.d.ts b/src/components/tabmenu/TabMenu.d.ts index a33d7aaa5d..91b0a034da 100755 --- a/src/components/tabmenu/TabMenu.d.ts +++ b/src/components/tabmenu/TabMenu.d.ts @@ -1,15 +1,17 @@ -import { VNode } from 'vue'; - interface TabMenuProps { model?: any[]; exact?: boolean; activeIndex?: number; } +interface TabMenuItemSlotInterface { + item: any; +} + declare class TabMenu { $props: TabMenuProps; $slots: { - item: VNode[]; + item: TabMenuItemSlotInterface; } } diff --git a/src/components/tieredmenu/TieredMenu.d.ts b/src/components/tieredmenu/TieredMenu.d.ts index cb5724f910..bf1e7e7c40 100755 --- a/src/components/tieredmenu/TieredMenu.d.ts +++ b/src/components/tieredmenu/TieredMenu.d.ts @@ -1,5 +1,3 @@ -import { VNode } from 'vue'; - interface TieredMenuProps { popup?: boolean; model?: any[]; @@ -9,13 +7,17 @@ interface TieredMenuProps { exact?: boolean; } +interface TieredMenuItemSlotInterface { + item: any; +} + declare class TieredMenu { $props: TieredMenuProps; toggle(event: Event): void; show(event: Event, target?: any): void; hide(): void; $slots: { - item: VNode[]; + item: TieredMenuItemSlotInterface; } } diff --git a/src/components/timeline/Timeline.d.ts b/src/components/timeline/Timeline.d.ts index c76e133c01..4a5ee2874d 100644 --- a/src/components/timeline/Timeline.d.ts +++ b/src/components/timeline/Timeline.d.ts @@ -7,12 +7,17 @@ interface TimelineProps { dataKey?: string; } +interface TimelineSlotInterface { + item: any; + index: number; +} + declare class Timeline { $props: TimelineProps; $slots: { - content: VNode[]; - opposite: VNode[]; - marker: VNode[]; + content: TimelineSlotInterface; + opposite: TimelineSlotInterface; + marker: TimelineSlotInterface; connector: VNode[]; } } diff --git a/src/components/toast/Toast.d.ts b/src/components/toast/Toast.d.ts index 91c1b13d78..728e938848 100755 --- a/src/components/toast/Toast.d.ts +++ b/src/components/toast/Toast.d.ts @@ -6,8 +6,15 @@ interface ToastProps { breakpoints?: {[key: string]: string}; } +interface ToastMessageSlotInterface { + message: any; +} + declare class Toast { $props: ToastProps; + $slots: { + message: ToastMessageSlotInterface; + } } export default Toast; diff --git a/src/components/tree/Tree.d.ts b/src/components/tree/Tree.d.ts index aeb13aa708..b0b3b8916f 100755 --- a/src/components/tree/Tree.d.ts +++ b/src/components/tree/Tree.d.ts @@ -16,6 +16,10 @@ interface TreeProps { scrollHeight?: string; } +interface TreeSlotInterface{ + node: any; +} + declare class Tree { $props: TreeProps; $emit(eventName: 'update:expandedKeys', value: any): this; @@ -25,7 +29,7 @@ declare class Tree { $emit(eventName: 'node-expand', node: any): this; $emit(eventName: 'node-collapse', node: any): this; $slots: { - [key: string]: VNode[]; + [key: string]: TreeSlotInterface; } } diff --git a/src/components/treeselect/TreeSelect.d.ts b/src/components/treeselect/TreeSelect.d.ts index 41806f6573..5b3c0c36a0 100644 --- a/src/components/treeselect/TreeSelect.d.ts +++ b/src/components/treeselect/TreeSelect.d.ts @@ -17,6 +17,21 @@ interface TreeSelectProps { metaKeySelection?: boolean; } +interface TreeSelectValueSlotInterface { + value: any; + placeholder: string; +} + +interface TreeSelectHeaderSlotInterface { + value: any; + options: any[]; +} + +interface TreeSelectFooterSlotInterface { + value: any; + options: any[]; +} + declare class TreeSelect { $props: TreeSelectProps; $emit(eventName: 'update:modelValue', value: any): this; @@ -29,10 +44,12 @@ declare class TreeSelect { $emit(eventName: 'node-unselect', node: any): this; $emit(eventName: 'node-expand', node: any): this; $emit(eventName: 'node-collapse', node: any): this; + show(): void; + hide(): void; $slots: { - value: VNode[]; - header: VNode[]; - footer: VNode[]; + value: TreeSelectValueSlotInterface; + header: TreeSelectHeaderSlotInterface; + footer: TreeSelectFooterSlotInterface; empty: VNode[]; indicator: VNode[]; } diff --git a/src/components/virtualscroller/VirtualScroller.d.ts b/src/components/virtualscroller/VirtualScroller.d.ts index 3a05f90ac6..acc1ab6354 100644 --- a/src/components/virtualscroller/VirtualScroller.d.ts +++ b/src/components/virtualscroller/VirtualScroller.d.ts @@ -1,5 +1,3 @@ -import { VNode } from 'vue'; - interface VirtualScrollerProps { items?: any[]|any[][]; itemSize?: number|any[]; @@ -24,6 +22,39 @@ interface VirtualScrollerRangeMethodInterface { } } +interface VirtualScrollerGetItemOptionsInterface { + index: number; + count: number; + first: number; + last: number; + even: number; + odd: number; +} + +interface VirtualScrollerGetLoaderOptionsInterface { + loading: boolean; + first: number; + last: number; + even: number; + odd: number; +} + +interface VirtualScrollerContentSlotInterface { + contentRef: string; + styleClass: string; + items: any[]; + getItemOptions: VirtualScrollerGetItemOptionsInterface; +} + +interface VirtualScrollerItemSlotInterface { + item: any; + options: VirtualScrollerGetItemOptionsInterface; +} + +interface VirtualScrollerLoaderSlotInterface { + options: VirtualScrollerGetLoaderOptionsInterface; +} + declare class VirtualScroller { $props: VirtualScrollerProps; scrollTo(options?: ScrollToOptions): void; @@ -34,8 +65,10 @@ declare class VirtualScroller { $emit(eventName: 'scroll-index-change', value: { first: number, last: number }): this; $emit(eventName: 'lazy-load', value: { first: number, last: number }): this; $slots: { - content: VNode[]; - items: VNode[]; - loader: VNode[]; + content: VirtualScrollerContentSlotInterface; + item: VirtualScrollerItemSlotInterface; + loader: VirtualScrollerLoaderSlotInterface; } -} \ No newline at end of file +} + +export default VirtualScroller; \ No newline at end of file