Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: regenerate angular using imd metadata #28332

Draft
wants to merge 6 commits into
base: 24_2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 19 additions & 18 deletions packages/devextreme-angular/src/ui/accordion/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ import {

export { ExplicitTypes } from 'devextreme/ui/accordion';

import { Store } from 'devextreme/data';
import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source';
import { ContentReadyEvent, DisposingEvent, dxAccordionItem, InitializedEvent, ItemClickEvent, ItemContextMenuEvent, ItemHoldEvent, ItemRenderedEvent, ItemTitleClickEvent, OptionChangedEvent, SelectionChangedEvent } from 'devextreme/ui/accordion';
import DataSource from 'devextreme/data/data_source';
import { dxAccordionItem, ContentReadyEvent, DisposingEvent, InitializedEvent, ItemClickEvent, ItemContextMenuEvent, ItemHoldEvent, ItemRenderedEvent, ItemTitleClickEvent, OptionChangedEvent, SelectionChangedEvent } from 'devextreme/ui/accordion';
import { DataSourceOptions } from 'devextreme/data/data_source';
import { Store } from 'devextreme/data/store';

import DxAccordion from 'devextreme/ui/accordion';

Expand Down Expand Up @@ -123,10 +124,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i

*/
@Input()
get dataSource(): Store | DataSource | DataSourceOptions | null | string | Array<dxAccordionItem | string | any> {
get dataSource(): Array<any | dxAccordionItem | string> | DataSource | DataSourceOptions | null | Store | string {
return this._getOption('dataSource');
}
set dataSource(value: Store | DataSource | DataSourceOptions | null | string | Array<dxAccordionItem | string | any>) {
set dataSource(value: Array<any | dxAccordionItem | string> | DataSource | DataSourceOptions | null | Store | string) {
this._setOption('dataSource', value);
}

Expand Down Expand Up @@ -162,10 +163,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i

*/
@Input()
get elementAttr(): any {
get elementAttr(): Record<string, any> {
return this._getOption('elementAttr');
}
set elementAttr(value: any) {
set elementAttr(value: Record<string, any>) {
this._setOption('elementAttr', value);
}

Expand All @@ -188,10 +189,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i

*/
@Input()
get height(): number | Function | string | undefined {
get height(): (() => number | string) | number | string | undefined {
return this._getOption('height');
}
set height(value: number | Function | string | undefined) {
set height(value: (() => number | string) | number | string | undefined) {
this._setOption('height', value);
}

Expand Down Expand Up @@ -240,10 +241,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i

*/
@Input()
get items(): Array<string | any | { disabled?: boolean, html?: string, icon?: string, template?: any, text?: string, title?: string, titleTemplate?: any, visible?: boolean }> {
get items(): Array<any | dxAccordionItem | string> {
return this._getOption('items');
}
set items(value: Array<string | any | { disabled?: boolean, html?: string, icon?: string, template?: any, text?: string, title?: string, titleTemplate?: any, visible?: boolean }>) {
set items(value: Array<any | dxAccordionItem | string>) {
this._setOption('items', value);
}

Expand Down Expand Up @@ -422,10 +423,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i

*/
@Input()
get width(): number | Function | string | undefined {
get width(): (() => number | string) | number | string | undefined {
return this._getOption('width');
}
set width(value: number | Function | string | undefined) {
set width(value: (() => number | string) | number | string | undefined) {
this._setOption('width', value);
}

Expand Down Expand Up @@ -542,7 +543,7 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i
* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() dataSourceChange: EventEmitter<Store | DataSource | DataSourceOptions | null | string | Array<dxAccordionItem | string | any>>;
@Output() dataSourceChange: EventEmitter<Array<any | dxAccordionItem | string> | DataSource | DataSourceOptions | null | Store | string>;

/**

Expand All @@ -563,7 +564,7 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i
* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() elementAttrChange: EventEmitter<any>;
@Output() elementAttrChange: EventEmitter<Record<string, any>>;

/**

Expand All @@ -577,7 +578,7 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i
* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() heightChange: EventEmitter<number | Function | string | undefined>;
@Output() heightChange: EventEmitter<(() => number | string) | number | string | undefined>;

/**

Expand Down Expand Up @@ -605,7 +606,7 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i
* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() itemsChange: EventEmitter<Array<string | any | { disabled?: boolean, html?: string, icon?: string, template?: any, text?: string, title?: string, titleTemplate?: any, visible?: boolean }>>;
@Output() itemsChange: EventEmitter<Array<any | dxAccordionItem | string>>;

/**

Expand Down Expand Up @@ -703,7 +704,7 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i
* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() widthChange: EventEmitter<number | Function | string | undefined>;
@Output() widthChange: EventEmitter<(() => number | string) | number | string | undefined>;



Expand Down
45 changes: 22 additions & 23 deletions packages/devextreme-angular/src/ui/action-sheet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ import {

export { ExplicitTypes } from 'devextreme/ui/action_sheet';

import { ButtonStyle, ButtonType } from 'devextreme/common';
import { UserDefinedElement } from 'devextreme/core/element';
import { Store } from 'devextreme/data';
import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source';
import { CancelClickEvent, ContentReadyEvent, DisposingEvent, dxActionSheetItem, InitializedEvent, ItemClickEvent, ItemContextMenuEvent, ItemHoldEvent, ItemRenderedEvent, OptionChangedEvent } from 'devextreme/ui/action_sheet';
import DataSource from 'devextreme/data/data_source';
import { dxActionSheetItem, CancelClickEvent, ContentReadyEvent, DisposingEvent, InitializedEvent, ItemClickEvent, ItemContextMenuEvent, ItemHoldEvent, ItemRenderedEvent, OptionChangedEvent } from 'devextreme/ui/action_sheet';
import { DataSourceOptions } from 'devextreme/data/data_source';
import { Store } from 'devextreme/data/store';

import DxActionSheet from 'devextreme/ui/action_sheet';

Expand Down Expand Up @@ -86,10 +85,10 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent

*/
@Input()
get dataSource(): Store | DataSource | DataSourceOptions | null | string | Array<dxActionSheetItem | string | any> {
get dataSource(): Array<any | dxActionSheetItem | string> | DataSource | DataSourceOptions | null | Store | string {
return this._getOption('dataSource');
}
set dataSource(value: Store | DataSource | DataSourceOptions | null | string | Array<dxActionSheetItem | string | any>) {
set dataSource(value: Array<any | dxActionSheetItem | string> | DataSource | DataSourceOptions | null | Store | string) {
this._setOption('dataSource', value);
}

Expand All @@ -112,10 +111,10 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent

*/
@Input()
get elementAttr(): any {
get elementAttr(): Record<string, any> {
return this._getOption('elementAttr');
}
set elementAttr(value: any) {
set elementAttr(value: Record<string, any>) {
this._setOption('elementAttr', value);
}

Expand All @@ -125,10 +124,10 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent

*/
@Input()
get height(): number | Function | string | undefined {
get height(): (() => number | string) | number | string | undefined {
return this._getOption('height');
}
set height(value: number | Function | string | undefined) {
set height(value: (() => number | string) | number | string | undefined) {
this._setOption('height', value);
}

Expand Down Expand Up @@ -177,10 +176,10 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent

*/
@Input()
get items(): Array<string | any | { disabled?: boolean, icon?: string, onClick?: Function, stylingMode?: ButtonStyle, template?: any, text?: string, type?: ButtonType }> {
get items(): Array<any | dxActionSheetItem | string> {
return this._getOption('items');
}
set items(value: Array<string | any | { disabled?: boolean, icon?: string, onClick?: Function, stylingMode?: ButtonStyle, template?: any, text?: string, type?: ButtonType }>) {
set items(value: Array<any | dxActionSheetItem | string>) {
this._setOption('items', value);
}

Expand Down Expand Up @@ -242,10 +241,10 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent

*/
@Input()
get target(): UserDefinedElement | string {
get target(): any | string {
return this._getOption('target');
}
set target(value: UserDefinedElement | string) {
set target(value: any | string) {
this._setOption('target', value);
}

Expand Down Expand Up @@ -294,10 +293,10 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent

*/
@Input()
get width(): number | Function | string | undefined {
get width(): (() => number | string) | number | string | undefined {
return this._getOption('width');
}
set width(value: number | Function | string | undefined) {
set width(value: (() => number | string) | number | string | undefined) {
this._setOption('width', value);
}

Expand Down Expand Up @@ -385,7 +384,7 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent
* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() dataSourceChange: EventEmitter<Store | DataSource | DataSourceOptions | null | string | Array<dxActionSheetItem | string | any>>;
@Output() dataSourceChange: EventEmitter<Array<any | dxActionSheetItem | string> | DataSource | DataSourceOptions | null | Store | string>;

/**

Expand All @@ -399,14 +398,14 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent
* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() elementAttrChange: EventEmitter<any>;
@Output() elementAttrChange: EventEmitter<Record<string, any>>;

/**

* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() heightChange: EventEmitter<number | Function | string | undefined>;
@Output() heightChange: EventEmitter<(() => number | string) | number | string | undefined>;

/**

Expand Down Expand Up @@ -434,7 +433,7 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent
* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() itemsChange: EventEmitter<Array<string | any | { disabled?: boolean, icon?: string, onClick?: Function, stylingMode?: ButtonStyle, template?: any, text?: string, type?: ButtonType }>>;
@Output() itemsChange: EventEmitter<Array<any | dxActionSheetItem | string>>;

/**

Expand Down Expand Up @@ -469,7 +468,7 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent
* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() targetChange: EventEmitter<UserDefinedElement | string>;
@Output() targetChange: EventEmitter<any | string>;

/**

Expand Down Expand Up @@ -497,7 +496,7 @@ export class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent
* This member supports the internal infrastructure and is not intended to be used directly from your code.

*/
@Output() widthChange: EventEmitter<number | Function | string | undefined>;
@Output() widthChange: EventEmitter<(() => number | string) | number | string | undefined>;



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
import { DOCUMENT } from '@angular/common';


import { NativeEventInfo } from 'devextreme/events/index';
import { ButtonStyle, ButtonType } from 'devextreme/common';

import {
Expand Down Expand Up @@ -53,10 +54,10 @@ export class DxiActionSheetItemComponent extends CollectionNestedOption implemen
}

@Input()
get onClick(): Function {
get onClick(): ((e: NativeEventInfo<any>) => void) {
return this._getOption('onClick');
}
set onClick(value: Function) {
set onClick(value: ((e: NativeEventInfo<any>) => void)) {
this._setOption('onClick', value);
}

Expand Down
Loading
Loading