UNPKG

ng-zorro-antd

Version:

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

16 lines (14 loc) 2.69 kB
!function(r,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/common"),require("@angular/core"),require("ng-zorro-antd/core/time"),require("ng-zorro-antd/core/util")):"function"==typeof define&&define.amd?define("ng-zorro-antd/core/pipe",["exports","@angular/common","@angular/core","ng-zorro-antd/core/time","ng-zorro-antd/core/util"],o):o(((r=r||self)["ng-zorro-antd"]=r["ng-zorro-antd"]||{},r["ng-zorro-antd"].core=r["ng-zorro-antd"].core||{},r["ng-zorro-antd"].core.pipe={}),r.ng.common,r.ng.core,r["ng-zorro-antd"].core.time,r["ng-zorro-antd"].core.util)}(this,(function(r,o,e,n,t){"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 i(r,o){var e="function"==typeof Symbol&&r[Symbol.iterator];if(!e)return r;var n,t,i=e.call(r),a=[];try{for(;(void 0===o||o-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(r){t={error:r}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return a}var a=function(){function r(){}return r.prototype.transform=function(r,o){void 0===o&&(o="px");var e=+r;return isNaN(e)?""+r:""+e+o},r.decorators=[{type:e.Pipe,args:[{name:"nzToCssUnit"}]}],r}(),u=function(){function r(){}return r.prototype.transform=function(r,o){void 0===o&&(o="HH:mm:ss");var e=Number(r||0);return n.timeUnits.reduce((function(r,o){var n=i(o,2),a=n[0],u=n[1];if(-1!==r.indexOf(a)){var c=Math.floor(e/u);return e-=c*u,r.replace(new RegExp(a+"+","g"),(function(r){return t.padStart(c.toString(),r.length,"0")}))}return r}),o)},r.decorators=[{type:e.Pipe,args:[{name:"nzTimeRange",pure:!0}]}],r}(),c=function(){function r(){}return r.decorators=[{type:e.NgModule,args:[{imports:[o.CommonModule],exports:[u,a],declarations:[u,a]}]}],r}();r.NzPipesModule=c,r.NzTimeRangePipe=u,r.NzToCssUnitPipe=a,Object.defineProperty(r,"__esModule",{value:!0})})); //# sourceMappingURL=ng-zorro-antd-core-pipe.umd.min.js.map