devextreme-angular
Version:
DevExtreme UI and Visualization Components for Angular
1 lines • 77.6 kB
Source Map (JSON)
{"version":3,"file":"devextreme-angular-ui-select-box.mjs","sources":["../../../dist/ui/select-box/index.ts","../../../dist/ui/select-box/devextreme-angular-ui-select-box.ts"],"sourcesContent":["/*!\n * devextreme-angular\n * Version: 26.1.3\n * Build date: Wed Jun 10 2026\n *\n * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED\n *\n * This software may be modified and distributed under the terms\n * of the MIT license. See the LICENSE file in the root of the project for details.\n *\n * https://github.com/DevExpress/DevExtreme\n */\n\n/* tslint:disable:max-line-length */\n\n\nimport {\n TransferState,\n Component,\n NgModule,\n ElementRef,\n NgZone,\n PLATFORM_ID,\n Inject,\n\n Input,\n Output,\n OnDestroy,\n EventEmitter,\n forwardRef,\n HostListener,\n OnChanges,\n DoCheck,\n SimpleChanges,\n ContentChildren,\n QueryList\n} from '@angular/core';\n\n\nimport type { DropDownPredefinedButton, FieldAddons } from 'devextreme/ui/drop_down_editor/ui.drop_down_editor';\nimport type { TextEditorButton, LabelMode, SimplifiedSearchMode, EditorStyle, ValidationMessageMode, Mode, Position, ValidationStatus } from 'devextreme/common';\nimport type { CollectionWidgetItem } from 'devextreme/ui/collection/ui.collection_widget.base';\nimport type { default as DataSource, DataSourceOptions } from 'devextreme/data/data_source';\nimport type { Store } from 'devextreme/data/store';\nimport type { dxPopupOptions } from 'devextreme/ui/popup';\nimport type { ChangeEvent, ClosedEvent, ContentReadyEvent, CopyEvent, CustomItemCreatingEvent, CutEvent, DisposingEvent, EnterKeyEvent, FocusInEvent, FocusOutEvent, InitializedEvent, InputEvent, ItemClickEvent, KeyDownEvent, KeyUpEvent, OpenedEvent, OptionChangedEvent, PasteEvent, SelectionChangedEvent, ValueChangedEvent } from 'devextreme/ui/select_box';\n\nimport DxSelectBox from 'devextreme/ui/select_box';\n\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR\n} from '@angular/forms';\n\nimport {\n DxComponent,\n DxTemplateHost,\n DxIntegrationModule,\n DxTemplateModule,\n NestedOptionHost,\n IterableDifferHelper,\n WatcherHelper,\n CollectionNestedOption,\n} from 'devextreme-angular/core';\n\nimport { DxiButtonModule } from 'devextreme-angular/ui/nested';\nimport { DxoOptionsModule } from 'devextreme-angular/ui/nested';\nimport { DxoDropDownOptionsModule } from 'devextreme-angular/ui/nested';\nimport { DxoAnimationModule } from 'devextreme-angular/ui/nested';\nimport { DxoHideModule } from 'devextreme-angular/ui/nested';\nimport { DxoFromModule } from 'devextreme-angular/ui/nested';\nimport { DxoPositionModule } from 'devextreme-angular/ui/nested';\nimport { DxoAtModule } from 'devextreme-angular/ui/nested';\nimport { DxoBoundaryOffsetModule } from 'devextreme-angular/ui/nested';\nimport { DxoCollisionModule } from 'devextreme-angular/ui/nested';\nimport { DxoMyModule } from 'devextreme-angular/ui/nested';\nimport { DxoOffsetModule } from 'devextreme-angular/ui/nested';\nimport { DxoToModule } from 'devextreme-angular/ui/nested';\nimport { DxoShowModule } from 'devextreme-angular/ui/nested';\nimport { DxiItemModule } from 'devextreme-angular/ui/nested';\n\nimport { DxoSelectBoxAnimationModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxAtModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxBoundaryOffsetModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxiSelectBoxButtonModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxCollisionModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxDropDownOptionsModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxFieldAddonsModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxFromModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxHideModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxiSelectBoxItemModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxMyModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxOffsetModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxOptionsModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxPositionModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxShowModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxoSelectBoxToModule } from 'devextreme-angular/ui/select-box/nested';\nimport { DxiSelectBoxToolbarItemModule } from 'devextreme-angular/ui/select-box/nested';\nimport { \n PROPERTY_TOKEN_buttons,\n PROPERTY_TOKEN_items,\n PROPERTY_TOKEN_toolbarItems,\n } from 'devextreme-angular/core/tokens';\n\n\n\nconst CUSTOM_VALUE_ACCESSOR_PROVIDER = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DxSelectBoxComponent),\n multi: true\n};\n/**\n * The SelectBox UI component is an editor that allows an end user to select an item from a drop-down list.\n\n */\n@Component({\n selector: 'dx-select-box',\n template: '',\n host: { ngSkipHydration: 'true' },\n imports: [ DxIntegrationModule ],\n providers: [\n DxTemplateHost,\n WatcherHelper,\n CUSTOM_VALUE_ACCESSOR_PROVIDER,\n NestedOptionHost,\n IterableDifferHelper\n ]\n})\nexport class DxSelectBoxComponent extends DxComponent implements OnDestroy, ControlValueAccessor, OnChanges, DoCheck {\n\n @ContentChildren(PROPERTY_TOKEN_buttons)\n set _buttonsContentChildren(value: QueryList<CollectionNestedOption>) {\n this.setChildren('buttons', value);\n }\n\n @ContentChildren(PROPERTY_TOKEN_items)\n set _itemsContentChildren(value: QueryList<CollectionNestedOption>) {\n this.setChildren('items', value);\n }\n\n @ContentChildren(PROPERTY_TOKEN_toolbarItems)\n set _toolbarItemsContentChildren(value: QueryList<CollectionNestedOption>) {\n this.setChildren('toolbarItems', value);\n }\n\n instance: DxSelectBox = null;\n\n /**\n * Specifies whether the UI component allows a user to enter a custom value. Requires the onCustomItemCreating handler implementation.\n \n */\n @Input()\n get acceptCustomValue(): boolean {\n return this._getOption('acceptCustomValue');\n }\n set acceptCustomValue(value: boolean) {\n this._setOption('acceptCustomValue', value);\n }\n\n\n /**\n * Specifies the shortcut key that sets focus on the UI component.\n \n */\n @Input()\n get accessKey(): string | undefined {\n return this._getOption('accessKey');\n }\n set accessKey(value: string | undefined) {\n this._setOption('accessKey', value);\n }\n\n\n /**\n * Specifies whether the UI component changes its visual state as a result of user interaction.\n \n */\n @Input()\n get activeStateEnabled(): boolean {\n return this._getOption('activeStateEnabled');\n }\n set activeStateEnabled(value: boolean) {\n this._setOption('activeStateEnabled', value);\n }\n\n\n /**\n * Allows you to add custom buttons to the input text field.\n \n */\n @Input()\n get buttons(): Array<DropDownPredefinedButton | TextEditorButton> {\n return this._getOption('buttons');\n }\n set buttons(value: Array<DropDownPredefinedButton | TextEditorButton>) {\n this._setOption('buttons', value);\n }\n\n\n /**\n * Specifies the DOM event after which the custom item should be created. Applies only if acceptCustomValue is enabled.\n \n */\n @Input()\n get customItemCreateEvent(): string {\n return this._getOption('customItemCreateEvent');\n }\n set customItemCreateEvent(value: string) {\n this._setOption('customItemCreateEvent', value);\n }\n\n\n /**\n * Binds the UI component to data.\n \n */\n @Input()\n get dataSource(): Array<any | CollectionWidgetItem> | DataSource | DataSourceOptions | null | Store | string {\n return this._getOption('dataSource');\n }\n set dataSource(value: Array<any | CollectionWidgetItem> | DataSource | DataSourceOptions | null | Store | string) {\n this._setOption('dataSource', value);\n }\n\n\n /**\n * Specifies whether to render the drop-down field's content when it is displayed. If false, the content is rendered immediately.\n \n */\n @Input()\n get deferRendering(): boolean {\n return this._getOption('deferRendering');\n }\n set deferRendering(value: boolean) {\n this._setOption('deferRendering', value);\n }\n\n\n /**\n * Specifies whether the UI component responds to user interaction.\n \n */\n @Input()\n get disabled(): boolean {\n return this._getOption('disabled');\n }\n set disabled(value: boolean) {\n this._setOption('disabled', value);\n }\n\n\n /**\n * Specifies the data field whose values should be displayed.\n \n */\n @Input()\n get displayExpr(): ((item: any) => string) | string | undefined {\n return this._getOption('displayExpr');\n }\n set displayExpr(value: ((item: any) => string) | string | undefined) {\n this._setOption('displayExpr', value);\n }\n\n\n /**\n * Returns the value currently displayed by the UI component.\n \n */\n @Input()\n get displayValue(): string | undefined {\n return this._getOption('displayValue');\n }\n set displayValue(value: string | undefined) {\n this._setOption('displayValue', value);\n }\n\n\n /**\n * Specifies a custom template for the drop-down button.\n \n */\n @Input()\n get dropDownButtonTemplate(): any {\n return this._getOption('dropDownButtonTemplate');\n }\n set dropDownButtonTemplate(value: any) {\n this._setOption('dropDownButtonTemplate', value);\n }\n\n\n /**\n * Configures the drop-down field which holds the content.\n \n */\n @Input()\n get dropDownOptions(): dxPopupOptions<any> {\n return this._getOption('dropDownOptions');\n }\n set dropDownOptions(value: dxPopupOptions<any>) {\n this._setOption('dropDownOptions', value);\n }\n\n\n /**\n * Specifies the global attributes to be attached to the UI component's container element.\n \n */\n @Input()\n get elementAttr(): Record<string, any> {\n return this._getOption('elementAttr');\n }\n set elementAttr(value: Record<string, any>) {\n this._setOption('elementAttr', value);\n }\n\n\n /**\n * Specifies widget input field addons.\n \n */\n @Input()\n get fieldAddons(): FieldAddons | null {\n return this._getOption('fieldAddons');\n }\n set fieldAddons(value: FieldAddons | null) {\n this._setOption('fieldAddons', value);\n }\n\n\n /**\n * Specifies a custom template for the text field. Must contain the TextBox UI component.\n \n * @deprecated Use the fieldAddons option instead.\n \n */\n @Input()\n get fieldTemplate(): any {\n return this._getOption('fieldTemplate');\n }\n set fieldTemplate(value: any) {\n this._setOption('fieldTemplate', value);\n }\n\n\n /**\n * Specifies whether the UI component can be focused using keyboard navigation.\n \n */\n @Input()\n get focusStateEnabled(): boolean {\n return this._getOption('focusStateEnabled');\n }\n set focusStateEnabled(value: boolean) {\n this._setOption('focusStateEnabled', value);\n }\n\n\n /**\n * Specifies whether data items should be grouped.\n \n */\n @Input()\n get grouped(): boolean {\n return this._getOption('grouped');\n }\n set grouped(value: boolean) {\n this._setOption('grouped', value);\n }\n\n\n /**\n * Specifies a custom template for group captions.\n \n */\n @Input()\n get groupTemplate(): any {\n return this._getOption('groupTemplate');\n }\n set groupTemplate(value: any) {\n this._setOption('groupTemplate', value);\n }\n\n\n /**\n * Specifies the UI component's height.\n \n */\n @Input()\n get height(): number | string | undefined {\n return this._getOption('height');\n }\n set height(value: number | string | undefined) {\n this._setOption('height', value);\n }\n\n\n /**\n * Specifies text for a hint that appears when a user pauses on the UI component.\n \n */\n @Input()\n get hint(): string | undefined {\n return this._getOption('hint');\n }\n set hint(value: string | undefined) {\n this._setOption('hint', value);\n }\n\n\n /**\n * Specifies whether the UI component changes its state when a user pauses on it.\n \n */\n @Input()\n get hoverStateEnabled(): boolean {\n return this._getOption('hoverStateEnabled');\n }\n set hoverStateEnabled(value: boolean) {\n this._setOption('hoverStateEnabled', value);\n }\n\n\n /**\n * Specifies the attributes to be passed on to the underlying HTML element.\n \n */\n @Input()\n get inputAttr(): any {\n return this._getOption('inputAttr');\n }\n set inputAttr(value: any) {\n this._setOption('inputAttr', value);\n }\n\n\n /**\n * Specifies whether the component's current value differs from the initial value.\n \n */\n @Input()\n get isDirty(): boolean {\n return this._getOption('isDirty');\n }\n set isDirty(value: boolean) {\n this._setOption('isDirty', value);\n }\n\n\n /**\n * Specifies or indicates whether the editor's value is valid.\n \n */\n @Input()\n get isValid(): boolean {\n return this._getOption('isValid');\n }\n set isValid(value: boolean) {\n this._setOption('isValid', value);\n }\n\n\n /**\n * An array of items displayed by the UI component.\n \n */\n @Input()\n get items(): Array<any | CollectionWidgetItem> {\n return this._getOption('items');\n }\n set items(value: Array<any | CollectionWidgetItem>) {\n this._setOption('items', value);\n }\n\n\n /**\n * Specifies a custom template for items.\n \n */\n @Input()\n get itemTemplate(): any {\n return this._getOption('itemTemplate');\n }\n set itemTemplate(value: any) {\n this._setOption('itemTemplate', value);\n }\n\n\n /**\n * Specifies a text string used to annotate the editor's value.\n \n */\n @Input()\n get label(): string {\n return this._getOption('label');\n }\n set label(value: string) {\n this._setOption('label', value);\n }\n\n\n /**\n * Specifies the label's display mode.\n \n */\n @Input()\n get labelMode(): LabelMode {\n return this._getOption('labelMode');\n }\n set labelMode(value: LabelMode) {\n this._setOption('labelMode', value);\n }\n\n\n /**\n * Specifies the maximum number of characters you can enter into the textbox.\n \n */\n @Input()\n get maxLength(): number | string {\n return this._getOption('maxLength');\n }\n set maxLength(value: number | string) {\n this._setOption('maxLength', value);\n }\n\n\n /**\n * The minimum number of characters that must be entered into the text box to begin a search. Applies only if searchEnabled is true.\n \n */\n @Input()\n get minSearchLength(): number {\n return this._getOption('minSearchLength');\n }\n set minSearchLength(value: number) {\n this._setOption('minSearchLength', value);\n }\n\n\n /**\n * The value to be assigned to the `name` attribute of the underlying HTML element.\n \n */\n @Input()\n get name(): string {\n return this._getOption('name');\n }\n set name(value: string) {\n this._setOption('name', value);\n }\n\n\n /**\n * Specifies the text or HTML markup displayed by the UI component if the item collection is empty.\n \n */\n @Input()\n get noDataText(): string {\n return this._getOption('noDataText');\n }\n set noDataText(value: string) {\n this._setOption('noDataText', value);\n }\n\n\n /**\n * Specifies whether or not the drop-down editor is displayed.\n \n */\n @Input()\n get opened(): boolean {\n return this._getOption('opened');\n }\n set opened(value: boolean) {\n this._setOption('opened', value);\n }\n\n\n /**\n * Specifies whether a user can open the drop-down list by clicking a text field.\n \n */\n @Input()\n get openOnFieldClick(): boolean {\n return this._getOption('openOnFieldClick');\n }\n set openOnFieldClick(value: boolean) {\n this._setOption('openOnFieldClick', value);\n }\n\n\n /**\n * The text that is provided as a hint in the select box editor.\n \n */\n @Input()\n get placeholder(): string {\n return this._getOption('placeholder');\n }\n set placeholder(value: string) {\n this._setOption('placeholder', value);\n }\n\n\n /**\n * Specifies whether the editor is read-only.\n \n */\n @Input()\n get readOnly(): boolean {\n return this._getOption('readOnly');\n }\n set readOnly(value: boolean) {\n this._setOption('readOnly', value);\n }\n\n\n /**\n * Switches the UI component to a right-to-left representation.\n \n */\n @Input()\n get rtlEnabled(): boolean {\n return this._getOption('rtlEnabled');\n }\n set rtlEnabled(value: boolean) {\n this._setOption('rtlEnabled', value);\n }\n\n\n /**\n * Specifies whether to allow search operations.\n \n */\n @Input()\n get searchEnabled(): boolean {\n return this._getOption('searchEnabled');\n }\n set searchEnabled(value: boolean) {\n this._setOption('searchEnabled', value);\n }\n\n\n /**\n * Specifies the name of a data source item field or an expression whose value is compared to the search criterion.\n \n */\n @Input()\n get searchExpr(): Array<Function | string> | Function | string {\n return this._getOption('searchExpr');\n }\n set searchExpr(value: Array<Function | string> | Function | string) {\n this._setOption('searchExpr', value);\n }\n\n\n /**\n * Specifies a comparison operation used to search UI component items.\n \n */\n @Input()\n get searchMode(): SimplifiedSearchMode {\n return this._getOption('searchMode');\n }\n set searchMode(value: SimplifiedSearchMode) {\n this._setOption('searchMode', value);\n }\n\n\n /**\n * Specifies the time delay, in milliseconds, after the last character has been typed in, before a search is executed.\n \n */\n @Input()\n get searchTimeout(): number {\n return this._getOption('searchTimeout');\n }\n set searchTimeout(value: number) {\n this._setOption('searchTimeout', value);\n }\n\n\n /**\n * Gets the currently selected item.\n \n */\n @Input()\n get selectedItem(): any {\n return this._getOption('selectedItem');\n }\n set selectedItem(value: any) {\n this._setOption('selectedItem', value);\n }\n\n\n /**\n * Specifies whether to display the Clear button in the UI component.\n \n */\n @Input()\n get showClearButton(): boolean {\n return this._getOption('showClearButton');\n }\n set showClearButton(value: boolean) {\n this._setOption('showClearButton', value);\n }\n\n\n /**\n * Specifies whether or not the UI component displays unfiltered values until a user types a number of characters exceeding the minSearchLength property value.\n \n */\n @Input()\n get showDataBeforeSearch(): boolean {\n return this._getOption('showDataBeforeSearch');\n }\n set showDataBeforeSearch(value: boolean) {\n this._setOption('showDataBeforeSearch', value);\n }\n\n\n /**\n * Specifies whether the drop-down button is visible.\n \n */\n @Input()\n get showDropDownButton(): boolean {\n return this._getOption('showDropDownButton');\n }\n set showDropDownButton(value: boolean) {\n this._setOption('showDropDownButton', value);\n }\n\n\n /**\n * Specifies whether or not to display selection controls.\n \n */\n @Input()\n get showSelectionControls(): boolean {\n return this._getOption('showSelectionControls');\n }\n set showSelectionControls(value: boolean) {\n this._setOption('showSelectionControls', value);\n }\n\n\n /**\n * Specifies whether or not the UI component checks the inner text for spelling mistakes.\n \n */\n @Input()\n get spellcheck(): boolean {\n return this._getOption('spellcheck');\n }\n set spellcheck(value: boolean) {\n this._setOption('spellcheck', value);\n }\n\n\n /**\n * Specifies how the UI component's text field is styled.\n \n */\n @Input()\n get stylingMode(): EditorStyle {\n return this._getOption('stylingMode');\n }\n set stylingMode(value: EditorStyle) {\n this._setOption('stylingMode', value);\n }\n\n\n /**\n * Specifies the number of the element when the Tab key is used for navigating.\n \n */\n @Input()\n get tabIndex(): number {\n return this._getOption('tabIndex');\n }\n set tabIndex(value: number) {\n this._setOption('tabIndex', value);\n }\n\n\n /**\n * The read-only property that holds the text displayed by the UI component input element.\n \n */\n @Input()\n get text(): string {\n return this._getOption('text');\n }\n set text(value: string) {\n this._setOption('text', value);\n }\n\n\n /**\n * Specifies whether the widget uses item's text a title attribute.\n \n */\n @Input()\n get useItemTextAsTitle(): boolean {\n return this._getOption('useItemTextAsTitle');\n }\n set useItemTextAsTitle(value: boolean) {\n this._setOption('useItemTextAsTitle', value);\n }\n\n\n /**\n * Information on the broken validation rule. Contains the first item from the validationErrors array.\n \n */\n @Input()\n get validationError(): any {\n return this._getOption('validationError');\n }\n set validationError(value: any) {\n this._setOption('validationError', value);\n }\n\n\n /**\n * An array of validation errors.\n \n */\n @Input()\n get validationErrors(): Array<any> {\n return this._getOption('validationErrors');\n }\n set validationErrors(value: Array<any>) {\n this._setOption('validationErrors', value);\n }\n\n\n /**\n * Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed.\n \n */\n @Input()\n get validationMessageMode(): ValidationMessageMode {\n return this._getOption('validationMessageMode');\n }\n set validationMessageMode(value: ValidationMessageMode) {\n this._setOption('validationMessageMode', value);\n }\n\n\n /**\n * Specifies the position of a validation message relative to the component. The validation message describes the validation rules that this component's value does not satisfy.\n \n */\n @Input()\n get validationMessagePosition(): Mode | Position {\n return this._getOption('validationMessagePosition');\n }\n set validationMessagePosition(value: Mode | Position) {\n this._setOption('validationMessagePosition', value);\n }\n\n\n /**\n * Indicates or specifies the current validation status.\n \n */\n @Input()\n get validationStatus(): ValidationStatus {\n return this._getOption('validationStatus');\n }\n set validationStatus(value: ValidationStatus) {\n this._setOption('validationStatus', value);\n }\n\n\n /**\n * Specifies the currently selected value. May be an object if dataSource contains objects, the store key is specified, and valueExpr is not set.\n \n */\n @Input()\n get value(): any {\n return this._getOption('value');\n }\n set value(value: any) {\n this._setOption('value', value);\n }\n\n\n /**\n * Specifies the DOM events after which the UI component's value should be updated.\n \n */\n @Input()\n get valueChangeEvent(): string {\n return this._getOption('valueChangeEvent');\n }\n set valueChangeEvent(value: string) {\n this._setOption('valueChangeEvent', value);\n }\n\n\n /**\n * Specifies which data field provides unique values to the UI component's value.\n \n */\n @Input()\n get valueExpr(): ((item: any) => string | number | boolean) | string {\n return this._getOption('valueExpr');\n }\n set valueExpr(value: ((item: any) => string | number | boolean) | string) {\n this._setOption('valueExpr', value);\n }\n\n\n /**\n * Specifies whether the UI component is visible.\n \n */\n @Input()\n get visible(): boolean {\n return this._getOption('visible');\n }\n set visible(value: boolean) {\n this._setOption('visible', value);\n }\n\n\n /**\n * Specifies the UI component's width.\n \n */\n @Input()\n get width(): number | string | undefined {\n return this._getOption('width');\n }\n set width(value: number | string | undefined) {\n this._setOption('width', value);\n }\n\n\n /**\n * Specifies whether text that exceeds the drop-down list width should be wrapped.\n \n */\n @Input()\n get wrapItemText(): boolean {\n return this._getOption('wrapItemText');\n }\n set wrapItemText(value: boolean) {\n this._setOption('wrapItemText', value);\n }\n\n /**\n \n * A function that is executed when the UI component loses focus after the text field's content was changed using the keyboard.\n \n \n */\n @Output() onChange: EventEmitter<ChangeEvent>;\n\n /**\n \n * A function that is executed once the drop-down editor is closed.\n \n \n */\n @Output() onClosed: EventEmitter<ClosedEvent>;\n\n /**\n \n * A function that is executed when the UI component is rendered and each time the component is repainted.\n \n \n */\n @Output() onContentReady: EventEmitter<ContentReadyEvent>;\n\n /**\n \n * A function that is executed when the UI component's input has been copied.\n \n \n */\n @Output() onCopy: EventEmitter<CopyEvent>;\n\n /**\n \n * A function that is executed when a user adds a custom item. Requires acceptCustomValue to be set to true.\n \n \n */\n @Output() onCustomItemCreating: EventEmitter<CustomItemCreatingEvent>;\n\n /**\n \n * A function that is executed when the UI component's input has been cut.\n \n \n */\n @Output() onCut: EventEmitter<CutEvent>;\n\n /**\n \n * A function that is executed before the UI component is disposed of.\n \n \n */\n @Output() onDisposing: EventEmitter<DisposingEvent>;\n\n /**\n \n * A function that is executed when the Enter key has been pressed while the UI component is focused.\n \n \n */\n @Output() onEnterKey: EventEmitter<EnterKeyEvent>;\n\n /**\n \n * A function that is executed when the UI component gets focus.\n \n \n */\n @Output() onFocusIn: EventEmitter<FocusInEvent>;\n\n /**\n \n * A function that is executed when the UI component loses focus.\n \n \n */\n @Output() onFocusOut: EventEmitter<FocusOutEvent>;\n\n /**\n \n * A function used in JavaScript frameworks to save the UI component instance.\n \n \n */\n @Output() onInitialized: EventEmitter<InitializedEvent>;\n\n /**\n \n * A function that is executed each time the UI component's input is changed while the UI component is focused.\n \n \n */\n @Output() onInput: EventEmitter<InputEvent>;\n\n /**\n \n * A function that is executed when a list item is clicked or tapped.\n \n \n */\n @Output() onItemClick: EventEmitter<ItemClickEvent>;\n\n /**\n \n * A function that is executed when a user is pressing a key on the keyboard.\n \n \n */\n @Output() onKeyDown: EventEmitter<KeyDownEvent>;\n\n /**\n \n * A function that is executed when a user releases a key on the keyboard.\n \n \n */\n @Output() onKeyUp: EventEmitter<KeyUpEvent>;\n\n /**\n \n * A function that is executed once the drop-down editor is opened.\n \n \n */\n @Output() onOpened: EventEmitter<OpenedEvent>;\n\n /**\n \n * A function that is executed after a UI component property is changed.\n \n \n */\n @Output() onOptionChanged: EventEmitter<OptionChangedEvent>;\n\n /**\n \n * A function that is executed when the UI component's input has been pasted.\n \n \n */\n @Output() onPaste: EventEmitter<PasteEvent>;\n\n /**\n \n * A function that is executed when a list item is selected or selection is canceled.\n \n \n */\n @Output() onSelectionChanged: EventEmitter<SelectionChangedEvent>;\n\n /**\n \n * A function that is executed after the UI component's value is changed.\n \n \n */\n @Output() onValueChanged: EventEmitter<ValueChangedEvent>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() acceptCustomValueChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() accessKeyChange: EventEmitter<string | undefined>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() activeStateEnabledChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() buttonsChange: EventEmitter<Array<DropDownPredefinedButton | TextEditorButton>>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() customItemCreateEventChange: EventEmitter<string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() dataSourceChange: EventEmitter<Array<any | CollectionWidgetItem> | DataSource | DataSourceOptions | null | Store | string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() deferRenderingChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() disabledChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() displayExprChange: EventEmitter<((item: any) => string) | string | undefined>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() displayValueChange: EventEmitter<string | undefined>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() dropDownButtonTemplateChange: EventEmitter<any>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() dropDownOptionsChange: EventEmitter<dxPopupOptions<any>>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() elementAttrChange: EventEmitter<Record<string, any>>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() fieldAddonsChange: EventEmitter<FieldAddons | null>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() fieldTemplateChange: EventEmitter<any>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() focusStateEnabledChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() groupedChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() groupTemplateChange: EventEmitter<any>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() heightChange: EventEmitter<number | string | undefined>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() hintChange: EventEmitter<string | undefined>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() hoverStateEnabledChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() inputAttrChange: EventEmitter<any>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() isDirtyChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() isValidChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() itemsChange: EventEmitter<Array<any | CollectionWidgetItem>>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() itemTemplateChange: EventEmitter<any>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() labelChange: EventEmitter<string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() labelModeChange: EventEmitter<LabelMode>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() maxLengthChange: EventEmitter<number | string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() minSearchLengthChange: EventEmitter<number>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() nameChange: EventEmitter<string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() noDataTextChange: EventEmitter<string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() openedChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() openOnFieldClickChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() placeholderChange: EventEmitter<string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() readOnlyChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() rtlEnabledChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() searchEnabledChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() searchExprChange: EventEmitter<Array<Function | string> | Function | string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() searchModeChange: EventEmitter<SimplifiedSearchMode>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() searchTimeoutChange: EventEmitter<number>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() selectedItemChange: EventEmitter<any>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() showClearButtonChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() showDataBeforeSearchChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() showDropDownButtonChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() showSelectionControlsChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() spellcheckChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() stylingModeChange: EventEmitter<EditorStyle>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() tabIndexChange: EventEmitter<number>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() textChange: EventEmitter<string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() useItemTextAsTitleChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() validationErrorChange: EventEmitter<any>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() validationErrorsChange: EventEmitter<Array<any>>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() validationMessageModeChange: EventEmitter<ValidationMessageMode>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() validationMessagePositionChange: EventEmitter<Mode | Position>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() validationStatusChange: EventEmitter<ValidationStatus>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() valueChange: EventEmitter<any>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() valueChangeEventChange: EventEmitter<string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() valueExprChange: EventEmitter<((item: any) => string | number | boolean) | string>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() visibleChange: EventEmitter<boolean>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() widthChange: EventEmitter<number | string | undefined>;\n\n /**\n \n * This member supports the internal infrastructure and is not intended to be used directly from your code.\n \n */\n @Output() wrapItemTextChange: EventEmitter<boolean>;\n\n /**\n \n * \n \n \n */\n @Output() onBlur: EventEmitter<any>;\n\n\n @HostListener('valueChange', ['$event']) change(_) { }\n @HostListener('onBlur', ['$event']) touched = (_) => {};\n\n\n constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost,\n private _watcherHelper: WatcherHelper,\n private _idh: IterableDifferHelper,\n optionHost: NestedOptionHost,\n transferState: TransferState,\n @Inject(PLATFORM_ID) platformId: any) {\n\n super(elementRef, ngZone, templateHost, _watcherHelper, transferState, platformId);\n\n this._createEventEmitters([\n { subscribe: 'change', emit: 'onChange' },\n { subscribe: 'closed', emit: 'onClosed' },\n { subscribe: 'contentReady', emit: 'onContentReady' },\n { subscribe: 'copy', emit: 'onCopy' },\n { subscribe: 'customItemCreating', emit: 'onCustomItemCreating' },\n { subscribe: 'cut', emit: 'onCut' },\n { subscribe: 'disposing', emit: 'onDisposing' },\n { subscribe: 'enterKey', emit: 'onEnterKey' },\n { subscribe: 'focusIn', emit: 'onFocusIn' },\n { subscribe: 'focusOut', emit: 'onFocusOut' },\n { subscribe: 'initialized', emit: 'onInitialized' },\n { subscribe: 'input', emit: 'onInput' },\n { subscribe: 'itemClick', emit: 'onItemClick' },\n { subscribe: 'keyDown', emit: 'onKeyDown' },\n { subscribe: 'keyUp', emit: 'onKeyUp' },\n { subscribe: 'opened', emit: 'onOpened' },\n { subscribe: 'optionChanged', emit: 'onOptionChanged' },\n { subscribe: 'paste', emit: 'onPaste' },\n { subscribe: 'selectionChanged', emit: 'onSelectionChanged' },\n { subscribe: 'valueChanged', emit: 'onValueChanged' },\n { emit: 'acceptCustomValueChange' },\n { emit: 'accessKeyChange' },\n { emit: 'activeStateEnabledChange' },\n { emit: 'buttonsChange' },\n { emit: 'customItemCreateEventChange' },\n { emit: 'dataSourceChange' },\n { emit: 'deferRenderingChange' },\n { emit: 'disabledChange' },\n { emit: 'displayExprChange' },\n { emit: 'displayValueChange' },\n { emit: 'dropDownButtonTemplateChange' },\n { emit: 'dropDownOptionsChange' },\n { emit: 'elementAttrChange' },\n { emit: 'fieldAddonsChange' },\n { emit: 'fieldTemplateChange' },\n { emit: 'focusStateEnabledChange' },\n { emit: 'groupedChange' },\n { emit: 'groupTemplateChange' },\n { emit: 'heightChange' },\n { emit: 'hintChange' },\n { emit: 'hoverStateEnabledChange' },\n { emit: 'inputAttrChange' },\n { emit: 'isDirtyChange' },\n { emit: 'isValidChange' },\n { emit: 'itemsChange' },\n { emit: 'itemTemplateChange' },\n { emit: 'labelChange' },\n { emit: 'labelModeChange' },\n { emit: 'maxLengthChange' },\n { emit: 'minSearchLengthChange' },\n { emit: 'nameChange' },\n { emit: 'noDataTextChange' },\n { emit: 'openedChange' },\n { emit: 'openOnFieldClickChange' },\n { emit: 'placeholderChange' },\n { emit: 'readOnlyChange' },\n { emit: 'rtlEnabledChange' },\n { emit: 'searchEnabledChange' },\n { emit: 'searchExprChange' },\n { emit: 'searchModeChange' },\n { emit: 'searchTimeoutChange' },\n { emit: 'selectedItemChange' },\n { emit: 'showClearButtonChange' },\n { emit: 'showDataBeforeSearchChange' },\n { emit: 'showDropDownButtonChange' },\n { emit: 'showSelectionControlsChange' },\n { emit: 'spellcheckChange' },\n { emit: 'stylingModeChange' },\n { emit: 'tabIndexChange' },\n { emit: 'textChange' },\n { emit: 'useItemTextAsTitleChange' },\n { emit: 'validationErrorChange' },\n { emit: 'validationErrorsChange' },\n { emit: 'validationMessageModeChange' },\n { emit: 'validationMessagePositionChange' },\n { emit: 'validationStatusChange' },\n { emit: 'valueChange' },\n { emit: 'valueChangeEventChange' },\n { emit: 'valueExprChange' },\n { emit: 'visibleChange' },\n { emit: 'widthChange' },\n { emit: 'wrapItemTextChange' },\n { emit: 'onBlur' }\n ]);\n\n this._idh.setHost(this);\n optionHost.setHost(this);\n }\n\n protected _createInstance(element, options) {\n\n return new DxSelectBox(element, options);\n }\n\n\n writeValue(value: any): void {\n this.eventHelper.lockedValueChangeEvent = true;\n this.value = value;\n this.eventHelper.lockedValueChangeEvent = false;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n registerOnChange(fn: (_: any) => void): void { this.change = fn; }\n registerOnTouched(fn: () => void): void { this.touched = fn; }\n\n _createWidget(element: any) {\n super._createWidget(element);\n this.instance.on('focusOut', (e) => {\n this.eventHelper.fireNgEvent('onBlur', [e]);\n });\n }\n\n ngOnDestroy() {\n this._destroyWidget();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n super.ngOnChanges(changes);\n this.setupChanges('buttons', changes);\n this.setupChanges('dataSource', changes);\n this.setupChanges('items', changes);\n this.setupChanges('searchExpr', changes);\n this.setupChanges('validationErrors', changes);\n }\n\n setupChanges(prop: string, changes: SimpleChanges) {\n if (!(prop in this._optionsToUpdate)) {\n this._idh.setup(prop, changes);\n }\n }\n\n ngDoCheck() {\n this._idh.doCheck('buttons');\n this._idh.doCheck('dataSource');\n this._idh.doCheck('items');\n this._idh.doCheck('searchExpr');\n this._idh.doCheck('validationErrors');\n this._watcherHelper.checkWatchers();\n super.ngDoCheck();\n super.clearChangedOptions();\n }\n\n _setOption(name: string, value: any) {\n let isSetup = this._idh.setupSingle(name, value);\n let isChanged = this._idh.getChanges(name, value) !== null;\n\n if (isSetup || isChanged) {\n super._setOption(name, value);\n }\n }\n}\n\n@NgModule({\n imports: [\n DxSelectBoxComponent,\n DxiButtonModule,\n DxoOptionsModule,\n DxoDropDownOptionsModule,\n DxoAnimationModule,\n DxoHideModule,\n DxoFromModule,\n DxoPositionModule,\n