UNPKG

ng-zorro-antd

Version:

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

16 lines (14 loc) 2.89 kB
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("ng-zorro-antd/core/config",["exports","@angular/core","rxjs","rxjs/operators"],n):n(((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.config={}),e.ng.core,e.rxjs,e.rxjs.operators)}(this,(function(e,n,t,o){"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. ***************************************************************************** */var r=function(){return(r=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)};var i=new n.InjectionToken("nz-config"),c=function(e){return void 0!==e},f=function(){function e(e){this.configUpdated$=new t.Subject,this.config=e||{}}return e.prototype.getConfigForComponent=function(e){return this.config[e]},e.prototype.getConfigChangeEventForComponent=function(e){return this.configUpdated$.pipe(o.filter((function(n){return n===e})),o.mapTo(void 0))},e.prototype.set=function(e,n){this.config[e]=r(r({},this.config[e]),n),this.configUpdated$.next(e)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[i]}]}]},e.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(i,8))},token:e,providedIn:"root"}),e}();e.NZ_CONFIG=i,e.NzConfigService=f,e.WithConfig=function(e,n){return function(t,o,r){var i="$$__assignedValue__"+o;return Object.defineProperty(t,i,{configurable:!0,writable:!0,enumerable:!1}),{get:function(){var t=(null==r?void 0:r.get)?r.get.bind(this)():this[i];if(c(t))return t;var f=(this.nzConfigService.getConfigForComponent(e)||{})[o];return c(f)?f:n},set:function(e){(null==r?void 0:r.set)?r.set.bind(this)(e):this[i]=e},configurable:!0,enumerable:!0}}},Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=ng-zorro-antd-core-config.umd.min.js.map