UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

16 lines (14 loc) 3.61 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core")):"function"==typeof define&&define.amd?define("ng-zorro-antd/core/outlet",["exports","@angular/common","@angular/core"],t):t(((e=e||self)["ng-zorro-antd"]=e["ng-zorro-antd"]||{},e["ng-zorro-antd"].core=e["ng-zorro-antd"].core||{},e["ng-zorro-antd"].core.outlet={}),e.ng.common,e.ng.core)}(this,(function(e,t,n){"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 r(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var o=function(){function e(e,t){this.viewContainer=e,this.templateRef=t,this.embeddedViewRef=null,this.nzStringTemplateOutletContext=null,this.nzStringTemplateOutlet=null}return e.prototype.recreateView=function(){this.viewContainer.clear();var e=this.nzStringTemplateOutlet instanceof n.TemplateRef?this.nzStringTemplateOutlet:this.templateRef;this.embeddedViewRef=this.viewContainer.createEmbeddedView(e,this.nzStringTemplateOutletContext)},e.prototype.updateContext=function(){var e,t,n=this.nzStringTemplateOutletContext,o=this.embeddedViewRef.context;if(n)try{for(var i=r(Object.keys(n)),a=i.next();!a.done;a=i.next()){var l=a.value;o[l]=n[l]}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.ngOnChanges=function(e){(function(e){var t=e.nzStringTemplateOutletContext,o=e.nzStringTemplateOutlet,i=!1;if(o)if(o.firstChange)i=!0;else{var a=o.previousValue instanceof n.TemplateRef,l=o.currentValue instanceof n.TemplateRef;i=a||l}return t&&function(e){var t,n,o=Object.keys(e.previousValue||{}),i=Object.keys(e.currentValue||{});if(o.length===i.length){try{for(var a=r(i),l=a.next();!l.done;l=a.next()){var u=l.value;if(-1===o.indexOf(u))return!0}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return!1}return!0}(t)||i})(e)?this.recreateView():this.updateContext()},e.decorators=[{type:n.Directive,args:[{selector:"[nzStringTemplateOutlet]",exportAs:"nzStringTemplateOutlet"}]}],e.ctorParameters=function(){return[{type:n.ViewContainerRef},{type:n.TemplateRef}]},e.propDecorators={nzStringTemplateOutletContext:[{type:n.Input}],nzStringTemplateOutlet:[{type:n.Input}]},e}();var i=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule],exports:[o],declarations:[o]}]}],e}();e.NzOutletModule=i,e.NzStringTemplateOutletDirective=o,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=ng-zorro-antd-core-outlet.umd.min.js.map