UNPKG

ng-zorro-antd

Version:

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

23 lines (21 loc) 21.9 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/keycodes"),require("@angular/cdk/platform"),require("@angular/core"),require("@angular/forms"),require("ng-zorro-antd/core/util"),require("rxjs"),require("rxjs/operators"),require("ng-zorro-antd/tooltip"),require("@angular/common")):"function"==typeof define&&define.amd?define("ng-zorro-antd/slider",["exports","@angular/cdk/keycodes","@angular/cdk/platform","@angular/core","@angular/forms","ng-zorro-antd/core/util","rxjs","rxjs/operators","ng-zorro-antd/tooltip","@angular/common"],e):e(((t=t||self)["ng-zorro-antd"]=t["ng-zorro-antd"]||{},t["ng-zorro-antd"].slider={}),t.ng.cdk.keycodes,t.ng.cdk.platform,t.ng.core,t.ng.forms,t["ng-zorro-antd"].core.util,t.rxjs,t.rxjs.operators,t["ng-zorro-antd"].tooltip,t.ng.common)}(this,(function(t,e,n,i,r,o,a,s,l,u){"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 p=function(){return(p=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function c(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function d(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(h(arguments[e]));return t}var f=function(){function t(){this.isDragging=!1}return t.decorators=[{type:i.Injectable}],t}();var v=function(){function t(t,e){var n=this;this.sliderService=t,this.cdr=e,this.tooltipVisible="default",this.active=!1,this.style={},this.enterHandle=function(){n.sliderService.isDragging||(n.toggleTooltip(!0),n.updateTooltipPosition(),n.cdr.detectChanges())},this.leaveHandle=function(){n.sliderService.isDragging||(n.toggleTooltip(!1),n.cdr.detectChanges())}}return t.prototype.ngOnChanges=function(t){var e=this,n=t.offset,i=t.value,r=t.active,o=t.tooltipVisible;n&&this.updateStyle(),i&&(this.updateTooltipTitle(),this.updateTooltipPosition()),r&&(r.currentValue?this.toggleTooltip(!0):this.toggleTooltip(!1)),"always"===(null==o?void 0:o.currentValue)&&Promise.resolve().then((function(){return e.toggleTooltip(!0,!0)}))},t.prototype.focus=function(){this.handleEl.nativeElement.focus()},t.prototype.toggleTooltip=function(t,e){void 0===e&&(e=!1),(e||"default"===this.tooltipVisible&&this.tooltip)&&(t?this.tooltip.show():this.tooltip.hide())},t.prototype.updateTooltipTitle=function(){this.tooltipTitle=this.tooltipFormatter?this.tooltipFormatter(this.value):""+this.value},t.prototype.updateTooltipPosition=function(){var t=this;this.tooltip&&Promise.resolve().then((function(){return t.tooltip.updatePosition()}))},t.prototype.updateStyle=function(){var t;this.style=((t={})[this.vertical?"bottom":"left"]=this.offset+"%",t.transform=this.vertical?"translateY(50%)":"translateX(-50%)",t),this.cdr.markForCheck()},t.decorators=[{type:i.Component,args:[{changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,selector:"nz-slider-handle",exportAs:"nzSliderHandle",preserveWhitespaces:!1,template:'\n <div\n #handle\n class="ant-slider-handle"\n tabindex="0"\n nz-tooltip\n [ngStyle]="style"\n [nzTooltipTitle]="tooltipFormatter === null || tooltipVisible === \'never\' ? null : tooltipTitle"\n [nzTooltipTrigger]="null"\n [nzTooltipPlacement]="tooltipPlacement"\n ></div>\n ',host:{"(mouseenter)":"enterHandle()","(mouseleave)":"leaveHandle()"}}]}],t.ctorParameters=function(){return[{type:f},{type:i.ChangeDetectorRef}]},t.propDecorators={handleEl:[{type:i.ViewChild,args:["handle",{static:!1}]}],tooltip:[{type:i.ViewChild,args:[l.NzTooltipDirective,{static:!1}]}],vertical:[{type:i.Input}],offset:[{type:i.Input}],value:[{type:i.Input}],tooltipVisible:[{type:i.Input}],tooltipPlacement:[{type:i.Input}],tooltipFormatter:[{type:i.Input}],active:[{type:i.Input}]},c([o.InputBoolean(),d("design:type",Object)],t.prototype,"active",void 0),t}();var y=function(){function t(t,e,n){this.sliderService=t,this.cdr=e,this.platform=n,this.nzDisabled=!1,this.nzDots=!1,this.nzIncluded=!0,this.nzRange=!1,this.nzVertical=!1,this.nzMarks=null,this.nzMax=100,this.nzMin=0,this.nzStep=1,this.nzTooltipVisible="default",this.nzTooltipPlacement="top",this.nzOnAfterChange=new i.EventEmitter,this.value=null,this.cacheSliderStart=null,this.cacheSliderLength=null,this.activeValueIndex=void 0,this.track={offset:null,length:null},this.bounds={lower:null,upper:null}}return t.prototype.ngOnInit=function(){var t;this.handles=(t=this.nzRange?2:1,Array(t).fill(0).map((function(){return{offset:null,value:null,active:!1}}))),this.marksArray=this.nzMarks?this.generateMarkItems(this.nzMarks):null,this.bindDraggingHandlers(),this.toggleDragDisabled(this.nzDisabled),null===this.getValue()&&this.setValue(this.formatValue(null))},t.prototype.ngOnChanges=function(t){var e=t.nzDisabled,n=t.nzMarks,i=t.nzRange;e&&!e.firstChange?this.toggleDragDisabled(e.currentValue):n&&!n.firstChange?this.marksArray=this.nzMarks?this.generateMarkItems(this.nzMarks):null:i&&!i.firstChange&&this.setValue(this.formatValue(null))},t.prototype.ngOnDestroy=function(){this.unsubscribeDrag()},t.prototype.writeValue=function(t){this.setValue(t,!0)},t.prototype.onValueChange=function(t){},t.prototype.onTouched=function(){},t.prototype.registerOnChange=function(t){this.onValueChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this.nzDisabled=t,this.toggleDragDisabled(t)},t.prototype.onKeyDown=function(t){var n=t.keyCode,i=n===e.RIGHT_ARROW||n===e.UP_ARROW,r=n===e.LEFT_ARROW||n===e.DOWN_ARROW;if(i||r){t.preventDefault();var a=r?-this.nzStep:this.nzStep,s=this.nzRange?this.value[this.activeValueIndex]+a:this.value+a;this.setActiveValue(o.ensureNumberInRange(s,this.nzMin,this.nzMax))}},t.prototype.setValue=function(t,e){void 0===e&&(e=!1),e?(this.value=this.formatValue(t),this.updateTrackAndHandles()):function(t,e){if(typeof t!=typeof e)return!1;return m(t)&&m(e)?o.arraysEqual(t,e):t===e}(this.value,t)||(this.value=t,this.updateTrackAndHandles(),this.onValueChange(this.getValue(!0)))},t.prototype.getValue=function(t){return void 0===t&&(t=!1),t&&this.value&&m(this.value)?g(this.value).sort((function(t,e){return t-e})):this.value},t.prototype.getValueToOffset=function(t){var e=this,n=t;return void 0===n&&(n=this.getValue(!0)),m(n)?n.map((function(t){return e.valueToOffset(t)})):this.valueToOffset(n)},t.prototype.setActiveValueIndex=function(t){var e=this.getValue();if(m(e)){var n,i=null,r=-1;e.forEach((function(e,o){n=Math.abs(t-e),(null===i||n<i)&&(i=n,r=o)})),this.activeValueIndex=r,this.handlerComponents.toArray()[r].focus()}else this.handlerComponents.toArray()[0].focus()},t.prototype.setActiveValue=function(t){if(m(this.value)){var e=g(this.value);e[this.activeValueIndex]=t,this.setValue(e)}else this.setValue(t)},t.prototype.updateTrackAndHandles=function(){var t,e,n=this.getValue(),i=this.getValueToOffset(n),r=this.getValue(!0),o=this.getValueToOffset(r),a=m(r)?r:[0,r],s=m(o)?[o[0],o[1]-o[0]]:[0,o];this.handles.forEach((function(t,e){t.offset=m(i)?i[e]:i,t.value=m(n)?n[e]:n||0})),t=h(a,2),this.bounds.lower=t[0],this.bounds.upper=t[1],e=h(s,2),this.track.offset=e[0],this.track.length=e[1],this.cdr.markForCheck()},t.prototype.onDragStart=function(t){this.toggleDragMoving(!0),this.cacheSliderProperty(),this.setActiveValueIndex(t),this.setActiveValue(t),this.showHandleTooltip(this.nzRange?this.activeValueIndex:0)},t.prototype.onDragMove=function(t){this.setActiveValue(t),this.cdr.markForCheck()},t.prototype.onDragEnd=function(){this.nzOnAfterChange.emit(this.getValue(!0)),this.toggleDragMoving(!1),this.cacheSliderProperty(!0),this.hideAllHandleTooltip(),this.cdr.markForCheck()},t.prototype.bindDraggingHandlers=function(){var t=this;if(this.platform.isBrowser){var e=this.slider.nativeElement,n=this.nzVertical?"pageY":"pageX",i={start:"mousedown",move:"mousemove",end:"mouseup",pluckKey:[n]},r={start:"touchstart",move:"touchmove",end:"touchend",pluckKey:["touches","0",n],filter:function(t){return t instanceof TouchEvent}};[i,r].forEach((function(n){var i=n.start,r=n.move,l=n.end,u=n.pluckKey,p=n.filter,c=void 0===p?function(){return!0}:p;n.startPlucked$=a.fromEvent(e,i).pipe(s.filter(c),s.tap(o.silentEvent),s.pluck.apply(void 0,g(u)),s.map((function(e){return t.findClosestValue(e)}))),n.end$=a.fromEvent(document,l),n.moveResolved$=a.fromEvent(document,r).pipe(s.filter(c),s.tap(o.silentEvent),s.pluck.apply(void 0,g(u)),s.distinctUntilChanged(),s.map((function(e){return t.findClosestValue(e)})),s.distinctUntilChanged(),s.takeUntil(n.end$))})),this.dragStart$=a.merge(i.startPlucked$,r.startPlucked$),this.dragMove$=a.merge(i.moveResolved$,r.moveResolved$),this.dragEnd$=a.merge(i.end$,r.end$)}},t.prototype.subscribeDrag=function(t){void 0===t&&(t=["start","move","end"]),-1!==t.indexOf("start")&&this.dragStart$&&!this.dragStart_&&(this.dragStart_=this.dragStart$.subscribe(this.onDragStart.bind(this))),-1!==t.indexOf("move")&&this.dragMove$&&!this.dragMove_&&(this.dragMove_=this.dragMove$.subscribe(this.onDragMove.bind(this))),-1!==t.indexOf("end")&&this.dragEnd$&&!this.dragEnd_&&(this.dragEnd_=this.dragEnd$.subscribe(this.onDragEnd.bind(this)))},t.prototype.unsubscribeDrag=function(t){void 0===t&&(t=["start","move","end"]),-1!==t.indexOf("start")&&this.dragStart_&&(this.dragStart_.unsubscribe(),this.dragStart_=null),-1!==t.indexOf("move")&&this.dragMove_&&(this.dragMove_.unsubscribe(),this.dragMove_=null),-1!==t.indexOf("end")&&this.dragEnd_&&(this.dragEnd_.unsubscribe(),this.dragEnd_=null)},t.prototype.toggleDragMoving=function(t){var e=["move","end"];t?(this.sliderService.isDragging=!0,this.subscribeDrag(e)):(this.sliderService.isDragging=!1,this.unsubscribeDrag(e))},t.prototype.toggleDragDisabled=function(t){t?this.unsubscribeDrag():this.subscribeDrag(["start"])},t.prototype.findClosestValue=function(t){var e=this.getSliderStartPosition(),n=this.getSliderLength(),i=o.ensureNumberInRange((t-e)/n,0,1),r=(this.nzMax-this.nzMin)*(this.nzVertical?1-i:i)+this.nzMin,a=null===this.nzMarks?[]:Object.keys(this.nzMarks).map(parseFloat);if(0!==this.nzStep&&!this.nzDots){var s=Math.round(r/this.nzStep)*this.nzStep;a.push(s)}var l=a.map((function(t){return Math.abs(r-t)})),u=a[l.indexOf(Math.min.apply(Math,g(l)))];return null===this.nzStep?u:parseFloat(u.toFixed(o.getPrecision(this.nzStep)))},t.prototype.valueToOffset=function(t){return o.getPercent(this.nzMin,this.nzMax,t)},t.prototype.getSliderStartPosition=function(){if(null!==this.cacheSliderStart)return this.cacheSliderStart;var t=o.getElementOffset(this.slider.nativeElement);return this.nzVertical?t.top:t.left},t.prototype.getSliderLength=function(){if(null!==this.cacheSliderLength)return this.cacheSliderLength;var t=this.slider.nativeElement;return this.nzVertical?t.clientHeight:t.clientWidth},t.prototype.cacheSliderProperty=function(t){void 0===t&&(t=!1),this.cacheSliderStart=t?null:this.getSliderStartPosition(),this.cacheSliderLength=t?null:this.getSliderLength()},t.prototype.formatValue=function(t){var e=this;return t?function(t,e){if(!m(t)&&isNaN(t)||m(t)&&t.some((function(t){return isNaN(t)})))return!1;return function(t,e){void 0===e&&(e=!1);if(m(t)!==e)throw new Error('The "nzRange" can\'t match the "ngModel"\'s type, please check these properties: "nzRange", "ngModel", "nzDefaultValue".');return!0}(t,e)}(t,this.nzRange)?m(t)?t.map((function(t){return o.ensureNumberInRange(t,e.nzMin,e.nzMax)})):o.ensureNumberInRange(t,this.nzMin,this.nzMax):this.nzDefaultValue?this.nzDefaultValue:this.nzRange?[this.nzMin,this.nzMax]:this.nzMin:this.nzRange?[this.nzMin,this.nzMax]:this.nzMin},t.prototype.showHandleTooltip=function(t){void 0===t&&(t=0),this.handles.forEach((function(e,n){e.active=n===t}))},t.prototype.hideAllHandleTooltip=function(){this.handles.forEach((function(t){return t.active=!1}))},t.prototype.generateMarkItems=function(t){var e=[];for(var n in t){var i=t[n],r="number"==typeof n?n:parseFloat(n);r>=this.nzMin&&r<=this.nzMax&&e.push({value:r,offset:this.valueToOffset(r),config:i})}return e.length?e:null},t.decorators=[{type:i.Component,args:[{changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,selector:"nz-slider",exportAs:"nzSlider",preserveWhitespaces:!1,providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:i.forwardRef((function(){return t})),multi:!0},f],host:{"(keydown)":"onKeyDown($event)"},template:'\n <div\n #slider\n class="ant-slider"\n [class.ant-slider-disabled]="nzDisabled"\n [class.ant-slider-vertical]="nzVertical"\n [class.ant-slider-with-marks]="marksArray"\n >\n <div class="ant-slider-rail"></div>\n <nz-slider-track [vertical]="nzVertical" [included]="nzIncluded" [offset]="track.offset" [length]="track.length"></nz-slider-track>\n <nz-slider-step\n *ngIf="marksArray"\n [vertical]="nzVertical"\n [lowerBound]="bounds.lower"\n [upperBound]="bounds.upper"\n [marksArray]="marksArray"\n [included]="nzIncluded"\n ></nz-slider-step>\n <nz-slider-handle\n *ngFor="let handle of handles"\n [vertical]="nzVertical"\n [offset]="handle.offset"\n [value]="handle.value"\n [active]="handle.active"\n [tooltipFormatter]="nzTipFormatter"\n [tooltipVisible]="nzTooltipVisible"\n [tooltipPlacement]="nzTooltipPlacement"\n ></nz-slider-handle>\n <nz-slider-marks\n *ngIf="marksArray"\n [vertical]="nzVertical"\n [min]="nzMin"\n [max]="nzMax"\n [lowerBound]="bounds.lower"\n [upperBound]="bounds.upper"\n [marksArray]="marksArray"\n [included]="nzIncluded"\n ></nz-slider-marks>\n </div>\n '}]}],t.ctorParameters=function(){return[{type:f},{type:i.ChangeDetectorRef},{type:n.Platform}]},t.propDecorators={slider:[{type:i.ViewChild,args:["slider",{static:!0}]}],handlerComponents:[{type:i.ViewChildren,args:[v]}],nzDisabled:[{type:i.Input}],nzDots:[{type:i.Input}],nzIncluded:[{type:i.Input}],nzRange:[{type:i.Input}],nzVertical:[{type:i.Input}],nzDefaultValue:[{type:i.Input}],nzMarks:[{type:i.Input}],nzMax:[{type:i.Input}],nzMin:[{type:i.Input}],nzStep:[{type:i.Input}],nzTooltipVisible:[{type:i.Input}],nzTooltipPlacement:[{type:i.Input}],nzTipFormatter:[{type:i.Input}],nzOnAfterChange:[{type:i.Output}]},c([o.InputBoolean(),d("design:type",Object)],t.prototype,"nzDisabled",void 0),c([o.InputBoolean(),d("design:type",Boolean)],t.prototype,"nzDots",void 0),c([o.InputBoolean(),d("design:type",Boolean)],t.prototype,"nzIncluded",void 0),c([o.InputBoolean(),d("design:type",Boolean)],t.prototype,"nzRange",void 0),c([o.InputBoolean(),d("design:type",Boolean)],t.prototype,"nzVertical",void 0),c([o.InputNumber(),d("design:type",Object)],t.prototype,"nzMax",void 0),c([o.InputNumber(),d("design:type",Object)],t.prototype,"nzMin",void 0),c([o.InputNumber(),d("design:type",Object)],t.prototype,"nzStep",void 0),t}();function m(t){return t instanceof Array&&2===t.length}var z=function(){function t(){this.lowerBound=null,this.upperBound=null,this.vertical=!1,this.included=!1}return t.prototype.ngOnChanges=function(t){var e=t.marksArray,n=t.lowerBound,i=t.upperBound;e&&this.buildMarks(),(e||n||i)&&this.togglePointActive()},t.prototype.trackById=function(t,e){return e.value},t.prototype.buildMarks=function(){var t=this,e=this.max-this.min;this.marks=this.marksArray.map((function(n){var i=n.value,r=n.offset,o=n.config,a=t.getMarkStyles(i,e,o);return{label:b(o)?o.label:o,offset:r,style:a,value:i,config:o,active:!1}}))},t.prototype.getMarkStyles=function(t,e,n){var i;return i=this.vertical?{marginBottom:"-50%",bottom:(t-this.min)/e*100+"%"}:{transform:"translate3d(-50%, 0, 0)",left:(t-this.min)/e*100+"%"},b(n)&&n.style&&(i=p(p({},i),n.style)),i},t.prototype.togglePointActive=function(){var t=this;this.marks&&null!==this.lowerBound&&null!==this.upperBound&&this.marks.forEach((function(e){var n=e.value,i=!t.included&&n===t.upperBound||t.included&&n<=t.upperBound&&n>=t.lowerBound;e.active=i}))},t.decorators=[{type:i.Component,args:[{changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,preserveWhitespaces:!1,selector:"nz-slider-marks",exportAs:"nzSliderMarks",template:'\n <div class="ant-slider-mark">\n <span\n class="ant-slider-mark-text"\n *ngFor="let attr of marks; trackBy: trackById"\n [class.ant-slider-mark-active]="attr.active"\n [ngStyle]="attr.style"\n [innerHTML]="attr.label"\n >\n </span>\n </div>\n '}]}],t.propDecorators={lowerBound:[{type:i.Input}],upperBound:[{type:i.Input}],marksArray:[{type:i.Input}],min:[{type:i.Input}],max:[{type:i.Input}],vertical:[{type:i.Input}],included:[{type:i.Input}]},c([o.InputBoolean(),d("design:type",Object)],t.prototype,"vertical",void 0),c([o.InputBoolean(),d("design:type",Object)],t.prototype,"included",void 0),t}();function b(t){return"string"!=typeof t}var k=function(){function t(){this.lowerBound=null,this.upperBound=null,this.vertical=!1,this.included=!1}return t.prototype.ngOnChanges=function(t){t.marksArray&&this.buildSteps(),(t.marksArray||t.lowerBound||t.upperBound)&&this.togglePointActive()},t.prototype.trackById=function(t,e){return e.value},t.prototype.buildSteps=function(){var t=this.vertical?"bottom":"left";this.steps=this.marksArray.map((function(e){var n,i=e.value,r=e.offset;return{value:i,offset:r,config:e.config,active:!1,style:(n={},n[t]=r+"%",n)}}))},t.prototype.togglePointActive=function(){var t=this;this.steps&&null!==this.lowerBound&&null!==this.upperBound&&this.steps.forEach((function(e){var n=e.value,i=!t.included&&n===t.upperBound||t.included&&n<=t.upperBound&&n>=t.lowerBound;e.active=i}))},t.decorators=[{type:i.Component,args:[{changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,selector:"nz-slider-step",exportAs:"nzSliderStep",preserveWhitespaces:!1,template:'\n <div class="ant-slider-step">\n <span\n class="ant-slider-dot"\n *ngFor="let mark of steps; trackBy: trackById"\n [class.ant-slider-dot-active]="mark.active"\n [ngStyle]="mark.style"\n >\n </span>\n </div>\n '}]}],t.propDecorators={lowerBound:[{type:i.Input}],upperBound:[{type:i.Input}],marksArray:[{type:i.Input}],vertical:[{type:i.Input}],included:[{type:i.Input}]},c([o.InputBoolean(),d("design:type",Object)],t.prototype,"vertical",void 0),c([o.InputBoolean(),d("design:type",Object)],t.prototype,"included",void 0),t}();var S=function(){function t(){this.vertical=!1,this.included=!1,this.style={}}return t.prototype.ngOnChanges=function(t){t.included&&(this.style.visibility=this.included?"visible":"hidden"),(t.vertical||t.offset||t.length)&&(this.vertical?(this.style.bottom=this.offset+"%",this.style.height=this.length+"%",this.style.left=null,this.style.width=null):(this.style.left=this.offset+"%",this.style.width=this.length+"%",this.style.bottom=null,this.style.height=null))},t.decorators=[{type:i.Component,args:[{changeDetection:i.ChangeDetectionStrategy.OnPush,encapsulation:i.ViewEncapsulation.None,selector:"nz-slider-track",exportAs:"nzSliderTrack",preserveWhitespaces:!1,template:' <div class="ant-slider-track" [ngStyle]="style"></div> '}]}],t.propDecorators={offset:[{type:i.Input}],length:[{type:i.Input}],vertical:[{type:i.Input}],included:[{type:i.Input}]},c([o.InputNumber(),d("design:type",Number)],t.prototype,"offset",void 0),c([o.InputNumber(),d("design:type",Number)],t.prototype,"length",void 0),c([o.InputBoolean(),d("design:type",Object)],t.prototype,"vertical",void 0),c([o.InputBoolean(),d("design:type",Object)],t.prototype,"included",void 0),t}();var I=function(){function t(){}return t.decorators=[{type:i.NgModule,args:[{exports:[y,S,v,k,z],declarations:[y,S,v,k,z],imports:[u.CommonModule,n.PlatformModule,l.NzToolTipModule]}]}],t}(); /** * @license * Copyright Alibaba.com All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */var V=function(){};t.NzMarks=V,t.NzSliderComponent=y,t.NzSliderModule=I,t.ɵNzSliderHandleComponent=v,t.ɵNzSliderMarksComponent=z,t.ɵNzSliderService=f,t.ɵNzSliderStepComponent=k,t.ɵNzSliderTrackComponent=S,Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=ng-zorro-antd-slider.umd.min.js.map