Skip to content

Commit

Permalink
Generate angular using imd metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
alexslavr committed Nov 11, 2024
1 parent b2a6fce commit a5a267e
Show file tree
Hide file tree
Showing 610 changed files with 9,877 additions and 40,178 deletions.
43 changes: 22 additions & 21 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 @@ -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 | 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 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 | 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

0 comments on commit a5a267e

Please sign in to comment.