UNPKG

devextreme-angular

Version:

Angular UI and visualization components based on DevExtreme widgets

30 lines (28 loc) • 18.9 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/platform-browser"),require("@angular/core"),require("devextreme/ui/drop_down_button"),require("devextreme-angular/core"),require("devextreme-angular/ui/nested")):"function"==typeof define&&define.amd?define("devextreme-angular/ui/drop-down-button",["exports","@angular/platform-browser","@angular/core","devextreme/ui/drop_down_button","devextreme-angular/core","devextreme-angular/ui/nested"],t):t(((e=e||self)["devextreme-angular"]=e["devextreme-angular"]||{},e["devextreme-angular"].ui=e["devextreme-angular"].ui||{},e["devextreme-angular"].ui["drop-down-button"]={}),e.ng.platformBrowser,e.ng.core,e.DxDropDownButton,e["devextreme-angular"].core,e["devextreme-angular"].ui.nested)}(this,(function(e,t,n,o,i,p){"use strict";o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function s(e,t,n,o){var i,p=arguments.length,r=p<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(r=(p<3?i(r):p>3?i(t,n,r):i(t,n))||r);return p>3&&r&&Object.defineProperty(t,n,r),r}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)} /*! * devextreme-angular * Version: 20.2.5 * Build date: Fri Jan 15 2021 * * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-angular */ var u=function(e){function u(t,n,o,i,p,r,s,a){var u=e.call(this,t,n,o,i,s,a)||this;return u._watcherHelper=i,u._idh=p,u._createEventEmitters([{subscribe:"buttonClick",emit:"onButtonClick"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"dataSourceChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"displayExprChange"},{emit:"dropDownContentTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"iconChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"keyExprChange"},{emit:"noDataTextChange"},{emit:"openedChange"},{emit:"rtlEnabledChange"},{emit:"selectedItemChange"},{emit:"selectedItemKeyChange"},{emit:"showArrowIconChange"},{emit:"splitButtonChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"useSelectModeChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapItemTextChange"}]),u._idh.setHost(u),r.setHost(u),u}var d,l;return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(u,e),Object.defineProperty(u.prototype,"accessKey",{get:function(){return this._getOption("accessKey")},set:function(e){this._setOption("accessKey",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"activeStateEnabled",{get:function(){return this._getOption("activeStateEnabled")},set:function(e){this._setOption("activeStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"dataSource",{get:function(){return this._getOption("dataSource")},set:function(e){this._setOption("dataSource",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"deferRendering",{get:function(){return this._getOption("deferRendering")},set:function(e){this._setOption("deferRendering",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"disabled",{get:function(){return this._getOption("disabled")},set:function(e){this._setOption("disabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"displayExpr",{get:function(){return this._getOption("displayExpr")},set:function(e){this._setOption("displayExpr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"dropDownContentTemplate",{get:function(){return this._getOption("dropDownContentTemplate")},set:function(e){this._setOption("dropDownContentTemplate",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"dropDownOptions",{get:function(){return this._getOption("dropDownOptions")},set:function(e){this._setOption("dropDownOptions",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"elementAttr",{get:function(){return this._getOption("elementAttr")},set:function(e){this._setOption("elementAttr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"focusStateEnabled",{get:function(){return this._getOption("focusStateEnabled")},set:function(e){this._setOption("focusStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"height",{get:function(){return this._getOption("height")},set:function(e){this._setOption("height",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"hint",{get:function(){return this._getOption("hint")},set:function(e){this._setOption("hint",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"hoverStateEnabled",{get:function(){return this._getOption("hoverStateEnabled")},set:function(e){this._setOption("hoverStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"icon",{get:function(){return this._getOption("icon")},set:function(e){this._setOption("icon",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return this._getOption("items")},set:function(e){this._setOption("items",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"itemTemplate",{get:function(){return this._getOption("itemTemplate")},set:function(e){this._setOption("itemTemplate",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"keyExpr",{get:function(){return this._getOption("keyExpr")},set:function(e){this._setOption("keyExpr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"noDataText",{get:function(){return this._getOption("noDataText")},set:function(e){this._setOption("noDataText",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"opened",{get:function(){return this._getOption("opened")},set:function(e){this._setOption("opened",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"rtlEnabled",{get:function(){return this._getOption("rtlEnabled")},set:function(e){this._setOption("rtlEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"selectedItem",{get:function(){return this._getOption("selectedItem")},set:function(e){this._setOption("selectedItem",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"selectedItemKey",{get:function(){return this._getOption("selectedItemKey")},set:function(e){this._setOption("selectedItemKey",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"showArrowIcon",{get:function(){return this._getOption("showArrowIcon")},set:function(e){this._setOption("showArrowIcon",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"splitButton",{get:function(){return this._getOption("splitButton")},set:function(e){this._setOption("splitButton",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"stylingMode",{get:function(){return this._getOption("stylingMode")},set:function(e){this._setOption("stylingMode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"tabIndex",{get:function(){return this._getOption("tabIndex")},set:function(e){this._setOption("tabIndex",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"text",{get:function(){return this._getOption("text")},set:function(e){this._setOption("text",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"useSelectMode",{get:function(){return this._getOption("useSelectMode")},set:function(e){this._setOption("useSelectMode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"visible",{get:function(){return this._getOption("visible")},set:function(e){this._setOption("visible",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"width",{get:function(){return this._getOption("width")},set:function(e){this._setOption("width",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"wrapItemText",{get:function(){return this._getOption("wrapItemText")},set:function(e){this._setOption("wrapItemText",e)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"itemsChildren",{get:function(){return this._getOption("items")},set:function(e){this.setChildren("items",e)},enumerable:!0,configurable:!0}),u.prototype._createInstance=function(e,t){return new o(e,t)},u.prototype.ngOnDestroy=function(){this._destroyWidget()},u.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t),this.setupChanges("dataSource",t),this.setupChanges("items",t)},u.prototype.setupChanges=function(e,t){e in this._optionsToUpdate||this._idh.setup(e,t)},u.prototype.ngDoCheck=function(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._watcherHelper.checkWatchers(),e.prototype.ngDoCheck.call(this),e.prototype.clearChangedOptions.call(this)},u.prototype._setOption=function(t,n){var o=this._idh.setupSingle(t,n),i=null!==this._idh.getChanges(t,n);(o||i)&&e.prototype._setOption.call(this,t,n)},u.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone},{type:i.DxTemplateHost},{type:i.WatcherHelper},{type:i.IterableDifferHelper},{type:i.NestedOptionHost},{type:t.TransferState},{type:void 0,decorators:[{type:n.Inject,args:[n.PLATFORM_ID]}]}]},s([n.Input(),a("design:type",String),a("design:paramtypes",[String])],u.prototype,"accessKey",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"activeStateEnabled",null),s([n.Input(),a("design:type",Object),a("design:paramtypes",[Object])],u.prototype,"dataSource",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"deferRendering",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"disabled",null),s([n.Input(),a("design:type",Object),a("design:paramtypes",[Object])],u.prototype,"displayExpr",null),s([n.Input(),a("design:type",Object),a("design:paramtypes",[Object])],u.prototype,"dropDownContentTemplate",null),s([n.Input(),a("design:type",Object),a("design:paramtypes",[Object])],u.prototype,"dropDownOptions",null),s([n.Input(),a("design:type",Object),a("design:paramtypes",[Object])],u.prototype,"elementAttr",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"focusStateEnabled",null),s([n.Input(),a("design:type",Object),a("design:paramtypes",[Object])],u.prototype,"height",null),s([n.Input(),a("design:type",String),a("design:paramtypes",[String])],u.prototype,"hint",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"hoverStateEnabled",null),s([n.Input(),a("design:type",String),a("design:paramtypes",[String])],u.prototype,"icon",null),s([n.Input(),a("design:type",Array),a("design:paramtypes",[Array])],u.prototype,"items",null),s([n.Input(),a("design:type",Object),a("design:paramtypes",[Object])],u.prototype,"itemTemplate",null),s([n.Input(),a("design:type",String),a("design:paramtypes",[String])],u.prototype,"keyExpr",null),s([n.Input(),a("design:type",String),a("design:paramtypes",[String])],u.prototype,"noDataText",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"opened",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"rtlEnabled",null),s([n.Input(),a("design:type",Object),a("design:paramtypes",[Object])],u.prototype,"selectedItem",null),s([n.Input(),a("design:type",Object),a("design:paramtypes",[Object])],u.prototype,"selectedItemKey",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"showArrowIcon",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"splitButton",null),s([n.Input(),a("design:type",String),a("design:paramtypes",[String])],u.prototype,"stylingMode",null),s([n.Input(),a("design:type",Number),a("design:paramtypes",[Number])],u.prototype,"tabIndex",null),s([n.Input(),a("design:type",String),a("design:paramtypes",[String])],u.prototype,"text",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"useSelectMode",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"visible",null),s([n.Input(),a("design:type",Object),a("design:paramtypes",[Object])],u.prototype,"width",null),s([n.Input(),a("design:type",Boolean),a("design:paramtypes",[Boolean])],u.prototype,"wrapItemText",null),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"onButtonClick",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"onContentReady",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"onDisposing",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"onInitialized",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"onItemClick",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"onOptionChanged",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"onSelectionChanged",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"accessKeyChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"activeStateEnabledChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"dataSourceChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"deferRenderingChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"disabledChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"displayExprChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"dropDownContentTemplateChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"dropDownOptionsChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"elementAttrChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"focusStateEnabledChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"heightChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"hintChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"hoverStateEnabledChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"iconChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"itemsChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"itemTemplateChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"keyExprChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"noDataTextChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"openedChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"rtlEnabledChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"selectedItemChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"selectedItemKeyChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"showArrowIconChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"splitButtonChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"stylingModeChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"tabIndexChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"textChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"useSelectModeChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"visibleChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"widthChange",void 0),s([n.Output(),a("design:type",n.EventEmitter)],u.prototype,"wrapItemTextChange",void 0),s([n.ContentChildren(p.DxiItemComponent),a("design:type",n.QueryList),a("design:paramtypes",[Object])],u.prototype,"itemsChildren",null),u=s([n.Component({selector:"dx-drop-down-button",template:"",providers:[i.DxTemplateHost,i.WatcherHelper,i.NestedOptionHost,i.IterableDifferHelper]}),(d=7,l=n.Inject(n.PLATFORM_ID),function(e,t){l(e,t,d)}),a("design:paramtypes",[n.ElementRef,n.NgZone,i.DxTemplateHost,i.WatcherHelper,i.IterableDifferHelper,i.NestedOptionHost,t.TransferState,Object])],u)}(i.DxComponent),d=function(){function e(){}return e=s([n.NgModule({imports:[p.DxoDropDownOptionsModule,p.DxoAnimationModule,p.DxoHideModule,p.DxoShowModule,p.DxoPositionModule,p.DxoAtModule,p.DxoBoundaryOffsetModule,p.DxoCollisionModule,p.DxoMyModule,p.DxoOffsetModule,p.DxiToolbarItemModule,p.DxiItemModule,i.DxIntegrationModule,i.DxTemplateModule,t.BrowserTransferStateModule],declarations:[u],exports:[u,p.DxoDropDownOptionsModule,p.DxoAnimationModule,p.DxoHideModule,p.DxoShowModule,p.DxoPositionModule,p.DxoAtModule,p.DxoBoundaryOffsetModule,p.DxoCollisionModule,p.DxoMyModule,p.DxoOffsetModule,p.DxiToolbarItemModule,p.DxiItemModule,i.DxTemplateModule]})],e)}();e.DxDropDownButtonComponent=u,e.DxDropDownButtonModule=d,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=devextreme-angular-ui-drop-down-button.umd.min.js.map