@lxlib/seed
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.
16 lines (14 loc) • 4.39 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@lxlib/util"),require("@angular/common"),require("ng-zorro-antd/core/outlet"),require("ng-zorro-antd/icon")):"function"==typeof define&&define.amd?define("@lxlib/seed/quick-menu",["exports","@angular/core","@lxlib/util","@angular/common","ng-zorro-antd/core/outlet","ng-zorro-antd/icon"],e):e(((t=t||self).lxlib=t.lxlib||{},t.lxlib.seed=t.lxlib.seed||{},t.lxlib.seed["quick-menu"]={}),t.ng.core,t.lxlib.util,t.ng.common,t["ng-zorro-antd/core/outlet"],t["ng-zorro-antd/icon"])}(this,(function(t,e,o,n,r,i){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */function c(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function u(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),c=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return c}function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t}var a=function(){function t(t,e,o){this.cdr=t,this.el=e,this.render=o,this.ctrlStyle={},this.icon="question-circle",this.top=120,this.width=200,this.bgColor="#fff",this.borderColor="#ddd",this.show=!1,this.initFlag=!1}return t.prototype._click=function(){this.show=!this.show,this.setStyle()},t.prototype.setStyle=function(){this.ctrlStyle={"background-color":this.bgColor,"border-color":this.borderColor};var t=["top:"+this.top+"px","width:"+this.width+"px","background-color:"+this.bgColor,"border-color:"+this.borderColor,"margin-right:-"+(this.show?0:this.width)+"px"];this.render.setAttribute(this.el.nativeElement,"style",t.join(";")),this.cdr.detectChanges()},t.prototype.ngOnInit=function(){this.initFlag=!0,this.setStyle()},t.prototype.ngOnChanges=function(){this.initFlag&&this.setStyle()},t.decorators=[{type:e.Component,args:[{selector:"quick-menu",exportAs:"quickMenu",template:'<div class="quick-menu__inner">\n <div class="quick-menu__ctrl" [ngStyle]="ctrlStyle">\n <div class="quick-menu__ctrl-icon">\n <ng-container *nzStringTemplateOutlet="icon">\n <i nz-icon [nzType]="icon"></i>\n </ng-container>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n',host:{"[class.quick-menu]":"true","(click)":"_click()"},preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:e.Renderer2}]},t.propDecorators={icon:[{type:e.Input}],top:[{type:e.Input}],width:[{type:e.Input}],bgColor:[{type:e.Input}],borderColor:[{type:e.Input}]},c([o.InputNumber(),l("design:type",Object)],t.prototype,"top",void 0),c([o.InputNumber(),l("design:type",Object)],t.prototype,"width",void 0),t}();var d=[a],p=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,i.NzIconModule,o.LxlibUtilModule,r.NzOutletModule],declarations:s(d),exports:s(d)}]}],t}();t.QuickMenuComponent=a,t.QuickMenuModule=p,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=quickMenu.umd.min.js.map