UNPKG

devextreme-angular

Version:

Angular UI and visualization components based on DevExtreme widgets

30 lines (28 loc) • 19.1 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/platform-browser"),require("@angular/core"),require("devextreme/ui/menu"),require("devextreme-angular/core"),require("devextreme-angular/ui/nested")):"function"==typeof define&&define.amd?define("devextreme-angular/ui/menu",["exports","@angular/platform-browser","@angular/core","devextreme/ui/menu","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.menu={}),e.ng.platformBrowser,e.ng.core,e.DxMenu,e["devextreme-angular"].core,e["devextreme-angular"].ui.nested)}(this,(function(e,t,n,i,o,p){"use strict";i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i; /*! ***************************************************************************** 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 u(e,t,n,i){var o,p=arguments.length,r=p<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(r=(p<3?o(r):p>3?o(t,n,r):o(t,n))||r);return p>3&&r&&Object.defineProperty(t,n,r),r}function s(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 a=function(e){function a(t,n,i,o,p,r,u,s){var a=e.call(this,t,n,i,o,u,s)||this;return a._watcherHelper=o,a._idh=p,a._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemContextMenu",emit:"onItemContextMenu"},{subscribe:"itemRendered",emit:"onItemRendered"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{subscribe:"submenuHidden",emit:"onSubmenuHidden"},{subscribe:"submenuHiding",emit:"onSubmenuHiding"},{subscribe:"submenuShowing",emit:"onSubmenuShowing"},{subscribe:"submenuShown",emit:"onSubmenuShown"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"adaptivityEnabledChange"},{emit:"animationChange"},{emit:"cssClassChange"},{emit:"dataSourceChange"},{emit:"disabledChange"},{emit:"disabledExprChange"},{emit:"displayExprChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hideSubmenuOnMouseLeaveChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"itemsChange"},{emit:"itemsExprChange"},{emit:"itemTemplateChange"},{emit:"orientationChange"},{emit:"rtlEnabledChange"},{emit:"selectByClickChange"},{emit:"selectedExprChange"},{emit:"selectedItemChange"},{emit:"selectionModeChange"},{emit:"showFirstSubmenuModeChange"},{emit:"showSubmenuModeChange"},{emit:"submenuDirectionChange"},{emit:"tabIndexChange"},{emit:"visibleChange"},{emit:"widthChange"}]),a._idh.setHost(a),r.setHost(a),a}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)}(a,e),Object.defineProperty(a.prototype,"accessKey",{get:function(){return this._getOption("accessKey")},set:function(e){this._setOption("accessKey",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"activeStateEnabled",{get:function(){return this._getOption("activeStateEnabled")},set:function(e){this._setOption("activeStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"adaptivityEnabled",{get:function(){return this._getOption("adaptivityEnabled")},set:function(e){this._setOption("adaptivityEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"animation",{get:function(){return this._getOption("animation")},set:function(e){this._setOption("animation",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"cssClass",{get:function(){return this._getOption("cssClass")},set:function(e){this._setOption("cssClass",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"dataSource",{get:function(){return this._getOption("dataSource")},set:function(e){this._setOption("dataSource",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"disabled",{get:function(){return this._getOption("disabled")},set:function(e){this._setOption("disabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"disabledExpr",{get:function(){return this._getOption("disabledExpr")},set:function(e){this._setOption("disabledExpr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"displayExpr",{get:function(){return this._getOption("displayExpr")},set:function(e){this._setOption("displayExpr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"elementAttr",{get:function(){return this._getOption("elementAttr")},set:function(e){this._setOption("elementAttr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"focusStateEnabled",{get:function(){return this._getOption("focusStateEnabled")},set:function(e){this._setOption("focusStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"height",{get:function(){return this._getOption("height")},set:function(e){this._setOption("height",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"hideSubmenuOnMouseLeave",{get:function(){return this._getOption("hideSubmenuOnMouseLeave")},set:function(e){this._setOption("hideSubmenuOnMouseLeave",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"hint",{get:function(){return this._getOption("hint")},set:function(e){this._setOption("hint",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"hoverStateEnabled",{get:function(){return this._getOption("hoverStateEnabled")},set:function(e){this._setOption("hoverStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"items",{get:function(){return this._getOption("items")},set:function(e){this._setOption("items",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"itemsExpr",{get:function(){return this._getOption("itemsExpr")},set:function(e){this._setOption("itemsExpr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"itemTemplate",{get:function(){return this._getOption("itemTemplate")},set:function(e){this._setOption("itemTemplate",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"orientation",{get:function(){return this._getOption("orientation")},set:function(e){this._setOption("orientation",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rtlEnabled",{get:function(){return this._getOption("rtlEnabled")},set:function(e){this._setOption("rtlEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"selectByClick",{get:function(){return this._getOption("selectByClick")},set:function(e){this._setOption("selectByClick",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"selectedExpr",{get:function(){return this._getOption("selectedExpr")},set:function(e){this._setOption("selectedExpr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"selectedItem",{get:function(){return this._getOption("selectedItem")},set:function(e){this._setOption("selectedItem",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"selectionMode",{get:function(){return this._getOption("selectionMode")},set:function(e){this._setOption("selectionMode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"showFirstSubmenuMode",{get:function(){return this._getOption("showFirstSubmenuMode")},set:function(e){this._setOption("showFirstSubmenuMode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"showSubmenuMode",{get:function(){return this._getOption("showSubmenuMode")},set:function(e){this._setOption("showSubmenuMode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"submenuDirection",{get:function(){return this._getOption("submenuDirection")},set:function(e){this._setOption("submenuDirection",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"tabIndex",{get:function(){return this._getOption("tabIndex")},set:function(e){this._setOption("tabIndex",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"visible",{get:function(){return this._getOption("visible")},set:function(e){this._setOption("visible",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"width",{get:function(){return this._getOption("width")},set:function(e){this._setOption("width",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"itemsChildren",{get:function(){return this._getOption("items")},set:function(e){this.setChildren("items",e)},enumerable:!0,configurable:!0}),a.prototype._createInstance=function(e,t){return new i(e,t)},a.prototype.ngOnDestroy=function(){this._destroyWidget()},a.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t),this.setupChanges("dataSource",t),this.setupChanges("items",t)},a.prototype.setupChanges=function(e,t){e in this._optionsToUpdate||this._idh.setup(e,t)},a.prototype.ngDoCheck=function(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._watcherHelper.checkWatchers(),e.prototype.ngDoCheck.call(this),e.prototype.clearChangedOptions.call(this)},a.prototype._setOption=function(t,n){var i=this._idh.setupSingle(t,n),o=null!==this._idh.getChanges(t,n);(i||o)&&e.prototype._setOption.call(this,t,n)},a.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone},{type:o.DxTemplateHost},{type:o.WatcherHelper},{type:o.IterableDifferHelper},{type:o.NestedOptionHost},{type:t.TransferState},{type:void 0,decorators:[{type:n.Inject,args:[n.PLATFORM_ID]}]}]},u([n.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"accessKey",null),u([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"activeStateEnabled",null),u([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"adaptivityEnabled",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"animation",null),u([n.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"cssClass",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"dataSource",null),u([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"disabled",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"disabledExpr",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"displayExpr",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"elementAttr",null),u([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"focusStateEnabled",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"height",null),u([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"hideSubmenuOnMouseLeave",null),u([n.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"hint",null),u([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"hoverStateEnabled",null),u([n.Input(),s("design:type",Array),s("design:paramtypes",[Array])],a.prototype,"items",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"itemsExpr",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"itemTemplate",null),u([n.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"orientation",null),u([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"rtlEnabled",null),u([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"selectByClick",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"selectedExpr",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"selectedItem",null),u([n.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"selectionMode",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"showFirstSubmenuMode",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"showSubmenuMode",null),u([n.Input(),s("design:type",String),s("design:paramtypes",[String])],a.prototype,"submenuDirection",null),u([n.Input(),s("design:type",Number),s("design:paramtypes",[Number])],a.prototype,"tabIndex",null),u([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],a.prototype,"visible",null),u([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],a.prototype,"width",null),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onContentReady",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onDisposing",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onInitialized",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onItemClick",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onItemContextMenu",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onItemRendered",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onOptionChanged",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onSelectionChanged",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onSubmenuHidden",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onSubmenuHiding",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onSubmenuShowing",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"onSubmenuShown",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"accessKeyChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"activeStateEnabledChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"adaptivityEnabledChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"animationChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"cssClassChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"dataSourceChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"disabledChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"disabledExprChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"displayExprChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"elementAttrChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"focusStateEnabledChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"heightChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"hideSubmenuOnMouseLeaveChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"hintChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"hoverStateEnabledChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"itemsChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"itemsExprChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"itemTemplateChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"orientationChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"rtlEnabledChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"selectByClickChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"selectedExprChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"selectedItemChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"selectionModeChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"showFirstSubmenuModeChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"showSubmenuModeChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"submenuDirectionChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"tabIndexChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"visibleChange",void 0),u([n.Output(),s("design:type",n.EventEmitter)],a.prototype,"widthChange",void 0),u([n.ContentChildren(p.DxiItemComponent),s("design:type",n.QueryList),s("design:paramtypes",[Object])],a.prototype,"itemsChildren",null),a=u([n.Component({selector:"dx-menu",template:"",providers:[o.DxTemplateHost,o.WatcherHelper,o.NestedOptionHost,o.IterableDifferHelper]}),(d=7,l=n.Inject(n.PLATFORM_ID),function(e,t){l(e,t,d)}),s("design:paramtypes",[n.ElementRef,n.NgZone,o.DxTemplateHost,o.WatcherHelper,o.IterableDifferHelper,o.NestedOptionHost,t.TransferState,Object])],a)}(o.DxComponent),d=function(){function e(){}return e=u([n.NgModule({imports:[p.DxoAnimationModule,p.DxoHideModule,p.DxoShowModule,p.DxiItemModule,p.DxoShowFirstSubmenuModeModule,p.DxoDelayModule,p.DxoShowSubmenuModeModule,o.DxIntegrationModule,o.DxTemplateModule,t.BrowserTransferStateModule],declarations:[a],exports:[a,p.DxoAnimationModule,p.DxoHideModule,p.DxoShowModule,p.DxiItemModule,p.DxoShowFirstSubmenuModeModule,p.DxoDelayModule,p.DxoShowSubmenuModeModule,o.DxTemplateModule]})],e)}();e.DxMenuComponent=a,e.DxMenuModule=d,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=devextreme-angular-ui-menu.umd.min.js.map