Skip to content

Commit

Permalink
Import union types. Rollback undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
alexslavr committed Nov 4, 2024
1 parent 113f5c4 commit 9167343
Show file tree
Hide file tree
Showing 748 changed files with 6,895 additions and 6,290 deletions.
18 changes: 9 additions & 9 deletions packages/devextreme-angular/src/ui/accordion/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,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 @@ -189,10 +189,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i
*/
@Input()
get height(): (() => number | string) | number | string | undefined {
get height(): (() => number | string) | number | string {
return this._getOption('height');
}
set height(value: (() => number | string) | number | string | undefined) {
set height(value: (() => number | string) | number | string) {
this._setOption('height', value);
}

Expand All @@ -202,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 @@ -515,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 @@ -578,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 | string) | number | 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 Down
6 changes: 3 additions & 3 deletions packages/devextreme-angular/src/ui/action-sheet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,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 @@ -412,7 +412,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() hintChange: EventEmitter<string | undefined>;
@Output() hintChange: EventEmitter<string>;

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


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

import {
NestedOptionHost,
Expand Down Expand Up @@ -61,10 +62,10 @@ export class DxiActionSheetItemComponent extends CollectionNestedOption implemen
}

@Input()
get stylingMode(): "text" | "outlined" | "contained" {
get stylingMode(): ButtonStyle {
return this._getOption('stylingMode');
}
set stylingMode(value: "text" | "outlined" | "contained") {
set stylingMode(value: ButtonStyle) {
this._setOption('stylingMode', value);
}

Expand All @@ -85,10 +86,10 @@ export class DxiActionSheetItemComponent extends CollectionNestedOption implemen
}

@Input()
get type(): "danger" | "default" | "normal" | "success" {
get type(): ButtonType {
return this._getOption('type');
}
set type(value: "danger" | "default" | "normal" | "success") {
set type(value: ButtonType) {
this._setOption('type', value);
}

Expand Down
63 changes: 32 additions & 31 deletions packages/devextreme-angular/src/ui/autocomplete/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import {


import DataSource from 'devextreme/data/data_source';
import { TextEditorButton } from 'devextreme/common';
import { DropDownPredefinedButton } from 'devextreme/ui/drop_down_editor/ui.drop_down_editor';
import { TextEditorButton, LabelMode, SimplifiedSearchMode, EditorStyle, ValidationMessageMode, Mode, Position, ValidationStatus } from 'devextreme/common';
import { CollectionWidgetItem } from 'devextreme/ui/collection/ui.collection_widget.base';
import { DataSourceOptions } from 'devextreme/data/data_source';
import { Store } from 'devextreme/data/store';
Expand Down Expand Up @@ -118,10 +119,10 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
*/
@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 All @@ -144,10 +145,10 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
*/
@Input()
get buttons(): Array<"clear" | "dropDown" | TextEditorButton> | undefined {
get buttons(): Array<DropDownPredefinedButton | TextEditorButton> {
return this._getOption('buttons');
}
set buttons(value: Array<"clear" | "dropDown" | TextEditorButton> | undefined) {
set buttons(value: Array<DropDownPredefinedButton | TextEditorButton>) {
this._setOption('buttons', value);
}

Expand Down Expand Up @@ -196,10 +197,10 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
*/
@Input()
get displayValue(): string | undefined {
get displayValue(): string {
return this._getOption('displayValue');
}
set displayValue(value: string | undefined) {
set displayValue(value: string) {
this._setOption('displayValue', value);
}

Expand Down Expand Up @@ -300,10 +301,10 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
*/
@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 @@ -404,10 +405,10 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
*/
@Input()
get labelMode(): "static" | "floating" | "hidden" | "outside" {
get labelMode(): LabelMode {
return this._getOption('labelMode');
}
set labelMode(value: "static" | "floating" | "hidden" | "outside") {
set labelMode(value: LabelMode) {
this._setOption('labelMode', value);
}

Expand Down Expand Up @@ -547,10 +548,10 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
*/
@Input()
get searchMode(): "contains" | "startswith" {
get searchMode(): SimplifiedSearchMode {
return this._getOption('searchMode');
}
set searchMode(value: "contains" | "startswith") {
set searchMode(value: SimplifiedSearchMode) {
this._setOption('searchMode', value);
}

Expand Down Expand Up @@ -625,10 +626,10 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
*/
@Input()
get stylingMode(): "outlined" | "underlined" | "filled" {
get stylingMode(): EditorStyle {
return this._getOption('stylingMode');
}
set stylingMode(value: "outlined" | "underlined" | "filled") {
set stylingMode(value: EditorStyle) {
this._setOption('stylingMode', value);
}

Expand Down Expand Up @@ -703,10 +704,10 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
*/
@Input()
get validationMessageMode(): "always" | "auto" {
get validationMessageMode(): ValidationMessageMode {
return this._getOption('validationMessageMode');
}
set validationMessageMode(value: "always" | "auto") {
set validationMessageMode(value: ValidationMessageMode) {
this._setOption('validationMessageMode', value);
}

Expand All @@ -716,10 +717,10 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
*/
@Input()
get validationMessagePosition(): "bottom" | "left" | "right" | "top" | "auto" {
get validationMessagePosition(): Mode | Position {
return this._getOption('validationMessagePosition');
}
set validationMessagePosition(value: "bottom" | "left" | "right" | "top" | "auto") {
set validationMessagePosition(value: Mode | Position) {
this._setOption('validationMessagePosition', value);
}

Expand All @@ -729,10 +730,10 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
*/
@Input()
get validationStatus(): "valid" | "invalid" | "pending" {
get validationStatus(): ValidationStatus {
return this._getOption('validationStatus');
}
set validationStatus(value: "valid" | "invalid" | "pending") {
set validationStatus(value: ValidationStatus) {
this._setOption('validationStatus', value);
}

Expand Down Expand Up @@ -971,7 +972,7 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
* 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 All @@ -985,7 +986,7 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
@Output() buttonsChange: EventEmitter<Array<"clear" | "dropDown" | TextEditorButton> | undefined>;
@Output() buttonsChange: EventEmitter<Array<DropDownPredefinedButton | TextEditorButton>>;

/**
Expand Down Expand Up @@ -1013,7 +1014,7 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
@Output() displayValueChange: EventEmitter<string | undefined>;
@Output() displayValueChange: EventEmitter<string>;

/**
Expand Down Expand Up @@ -1069,7 +1070,7 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
* 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 Down Expand Up @@ -1125,7 +1126,7 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
@Output() labelModeChange: EventEmitter<"static" | "floating" | "hidden" | "outside">;
@Output() labelModeChange: EventEmitter<LabelMode>;

/**
Expand Down Expand Up @@ -1202,7 +1203,7 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
@Output() searchModeChange: EventEmitter<"contains" | "startswith">;
@Output() searchModeChange: EventEmitter<SimplifiedSearchMode>;

/**
Expand Down Expand Up @@ -1244,7 +1245,7 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
@Output() stylingModeChange: EventEmitter<"outlined" | "underlined" | "filled">;
@Output() stylingModeChange: EventEmitter<EditorStyle>;

/**
Expand Down Expand Up @@ -1286,21 +1287,21 @@ export class DxAutocompleteComponent extends DxComponent implements OnDestroy, C
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
@Output() validationMessageModeChange: EventEmitter<"always" | "auto">;
@Output() validationMessageModeChange: EventEmitter<ValidationMessageMode>;

/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
@Output() validationMessagePositionChange: EventEmitter<"bottom" | "left" | "right" | "top" | "auto">;
@Output() validationMessagePositionChange: EventEmitter<Mode | Position>;

/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
@Output() validationStatusChange: EventEmitter<"valid" | "invalid" | "pending">;
@Output() validationStatusChange: EventEmitter<ValidationStatus>;

/**
Expand Down
9 changes: 5 additions & 4 deletions packages/devextreme-angular/src/ui/autocomplete/nested/at.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {



import { HorizontalAlignment, VerticalAlignment } from 'devextreme/common';

import {
NestedOptionHost,
Expand All @@ -29,18 +30,18 @@ import { NestedOption } from 'devextreme-angular/core';
})
export class DxoAutocompleteAtComponent extends NestedOption implements OnDestroy, OnInit {
@Input()
get x(): "center" | "left" | "right" {
get x(): HorizontalAlignment {
return this._getOption('x');
}
set x(value: "center" | "left" | "right") {
set x(value: HorizontalAlignment) {
this._setOption('x', value);
}

@Input()
get y(): "bottom" | "center" | "top" {
get y(): VerticalAlignment {
return this._getOption('y');
}
set y(value: "bottom" | "center" | "top") {
set y(value: VerticalAlignment) {
this._setOption('y', value);
}

Expand Down
Loading

0 comments on commit 9167343

Please sign in to comment.