Fixed #1695 - Update all .d.ts files for events and slots

pull/1711/head
Tuğçe Küçükoğlu 2021-10-25 10:06:40 +03:00
parent e8b012ff80
commit 56285f087c
33 changed files with 478 additions and 101 deletions

View File

@ -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;
};
}

View File

@ -4,8 +4,15 @@ interface BreadcrumbProps {
exact?: boolean;
}
interface BreadcrumbItemSlotInterface {
item: any;
}
declare class Breadcrumb {
$props: BreadcrumbProps;
$slots: {
item: BreadcrumbItemSlotInterface
}
}
export default Breadcrumb;

View File

@ -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[];
};
}

View File

@ -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[];
}

View File

@ -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[];
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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;
};
}

View File

@ -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[];
}

View File

@ -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;
}
}

View File

@ -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[];
}
}

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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[];
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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[];
}

View File

@ -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;
}
}

View File

@ -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[];
};
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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[];
}
}

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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[];
}

View File

@ -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;
}
}
}
export default VirtualScroller;