UNPKG

@lxlib/seed

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.

16 lines (14 loc) 3.84 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@lxlib/theme"),require("@lxlib/util"),require("@angular/common"),require("ng-zorro-antd/icon")):"function"==typeof define&&define.amd?define("@lxlib/seed/tag-select",["exports","@angular/core","@lxlib/theme","@lxlib/util","@angular/common","ng-zorro-antd/icon"],t):t(((e=e||self).lxlib=e.lxlib||{},e.lxlib.seed=e.lxlib.seed||{},e.lxlib.seed["tag-select"]={}),e.ng.core,e.lxlib.theme,e.lxlib.util,e.ng.common,e["ng-zorro-antd/icon"])}(this,(function(e,t,n,o,r,a){"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 l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)l.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return l}function c(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}var s=function(){function e(e,n){this.i18n=e,this.cdr=n,this.locale={},this.expand=!1,this.expandable=!0,this.change=new t.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.i18n$=this.i18n.change.subscribe((function(){e.locale=e.i18n.getData("tagSelect"),e.cdr.detectChanges()}))},e.prototype.trigger=function(){this.expand=!this.expand,this.change.emit(this.expand)},e.prototype.ngOnDestroy=function(){this.i18n$.unsubscribe()},e.decorators=[{type:t.Component,args:[{selector:"tag-select",exportAs:"tagSelect",template:'<ng-content></ng-content>\n<a *ngIf="expandable" class="tag-select__trigger" (click)="trigger()">\n {{expand ? locale.collapse : locale.expand}}<i nz-icon [nzType]="expand ? \'up\' : \'down\'" class="tag-select__trigger-icon"></i>\n</a>\n',host:{"[class.tag-select]":"true","[class.tag-select__has-expand]":"expandable","[class.tag-select__expanded]":"expand"},preserveWhitespaces:!1,changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],e.ctorParameters=function(){return[{type:n.LxlibLocaleService},{type:t.ChangeDetectorRef}]},e.propDecorators={expandable:[{type:t.Input}],change:[{type:t.Output}]},function(e,t,n,o){var r,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,o);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(l=(a<3?r(l):a>3?r(t,n,l):r(t,n))||l);a>3&&l&&Object.defineProperty(t,n,l)}([o.InputBoolean(),l("design:type",Object)],e.prototype,"expandable",void 0),e}();var u=[s],p=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,a.NzIconModule,n.LxlibLocaleModule,o.LxlibUtilModule],declarations:c(u),exports:c(u)}]}],e}();e.TagSelectComponent=s,e.TagSelectModule=p,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=tagSelect.umd.min.js.map