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: Generate angular using IMD #28211

Closed
wants to merge 15 commits into from
Closed
  •  
  •  
  •  
55 changes: 28 additions & 27 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 @@ -71,10 +72,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i

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

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 {
return this._getOption('height');
}
set height(value: number | Function | string | undefined) {
set height(value: (() => number | string) | number | string) {
this._setOption('height', value);
}

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

*/
@Input()
get hint(): string | undefined {
get hint(): string {
return this._getOption('hint');
}
set hint(value: string | undefined) {
set hint(value: string) {
this._setOption('hint', 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 @@ -279,10 +280,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i

*/
@Input()
get keyExpr(): Function | string {
get keyExpr(): (() => void) | string {
return this._getOption('keyExpr');
}
set keyExpr(value: Function | string) {
set keyExpr(value: (() => void) | string) {
this._setOption('keyExpr', 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 {
return this._getOption('width');
}
set width(value: number | Function | string | undefined) {
set width(value: (() => number | string) | number | string) {
this._setOption('width', value);
}

Expand Down Expand Up @@ -514,7 +515,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() accessKeyChange: EventEmitter<string | undefined>;
@Output() accessKeyChange: EventEmitter<string>;

/**

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,14 +578,14 @@ 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>;

/**

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

*/
@Output() hintChange: EventEmitter<string | undefined>;
@Output() hintChange: EventEmitter<string>;

/**

Expand All @@ -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 All @@ -626,7 +627,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() keyExprChange: EventEmitter<Function | string>;
@Output() keyExprChange: EventEmitter<(() => void) | 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>;



Expand Down
51 changes: 25 additions & 26 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 {
return this._getOption('height');
}
set height(value: number | Function | string | undefined) {
set height(value: (() => number | string) | number | string) {
this._setOption('height', value);
}

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

*/
@Input()
get hint(): string | undefined {
get hint(): string {
return this._getOption('hint');
}
set hint(value: string | undefined) {
set hint(value: string) {
this._setOption('hint', 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 {
return this._getOption('width');
}
set width(value: number | Function | string | undefined) {
set width(value: (() => number | string) | number | string) {
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,21 +398,21 @@ 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>;

/**

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

*/
@Output() hintChange: EventEmitter<string | undefined>;
@Output() hintChange: EventEmitter<string>;

/**

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



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