UNPKG

18.8 kBSource Map (JSON)View Raw
1{"version":3,"sources":["ng://primeng/spinner/spinner.ts"],"names":["SPINNER_VALUE_ACCESSOR","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","Spinner","multi","el","cd","this","onChange","EventEmitter","onFocus","onBlur","_step","onModelChange","onModelTouched","keyPattern","negativeSeparator","Object","defineProperty","prototype","val","tokens","step","toString","split","calculatedPrecision","length","undefined","ngOnInit","formatInput","localeDecimalSeparator","toLocaleString","substring","localeThousandSeparator","thousandRegExp","RegExp","thousandSeparator","decimalSeparator","console","warn","repeat","event","interval","dir","_this","i","clearTimer","timer","setTimeout","spin","currentValue","precision","getPrecision","value","parseValue","parseFloat","toFixed","maxlength","min","max","formatValue","emit","power","Math","pow","String","round","onUpButtonMousedown","disabled","inputfieldViewChild","nativeElement","focus","updateFilledState","preventDefault","onUpButtonMouseup","onUpButtonMouseleave","onDownButtonMousedown","onDownButtonMouseup","onDownButtonMouseleave","onInputKeydown","which","onInputChange","onInput","target","onInputBlur","onInputFocus","trim","replace","parseInt","isNaN","maximumFractionDigits","join","formattedValue","clearInterval","writeValue","markForCheck","registerOnChange","fn","registerOnTouched","setDisabledState","filled","ElementRef","ChangeDetectorRef","__decorate","Output","Input","ViewChild","Component","selector","template","host","[class.ui-inputwrapper-filled]","[class.ui-inputwrapper-focus]","providers","changeDetection","ChangeDetectionStrategy","Default","SpinnerModule","NgModule","imports","CommonModule","InputTextModule","exports","declarations"],"mappings":"y0BAKaA,EAA8B,CACvCC,QAASC,EAAAA,kBACTC,YAAaC,EAAAA,YAAW,WAAM,OAAAC,KAC9BC,OAAO,GA4BXD,EAAA,WAsFI,SAAAA,EAAmBE,EAAuBC,GAAvBC,KAAAF,GAAAA,EAAuBE,KAAAD,GAAAA,EApFhCC,KAAAC,SAA8B,IAAIC,EAAAA,aAElCF,KAAAG,QAA6B,IAAID,EAAAA,aAEjCF,KAAAI,OAA4B,IAAIF,EAAAA,aAwC1CF,KAAAK,MAAgB,EAIhB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AA,mCAEQF,EAAA,CAARE,EAAAA,mCAEQF,EAAA,CAARE,EAAAA,yCAEQF,EAAA,CAARE,EAAAA,oCAEQF,EAAA,CAARE,EAAAA,2CAEQF,EAAA,CAARE,EAAAA,uCAEQF,EAAA,CAARE,EAAAA,wCAEQF,EAAA,CAARE,EAAAA,wCAEQF,EAAA,CAARE,EAAAA,wCAEQF,EAAA,CAARE,EAAAA,wCAEQF,EAAA,CAARE,EAAAA,oCAEQF,EAAA,CAARE,EAAAA,8CAEQF,EAAA,CAARE,EAAAA,0CAEQF,EAAA,CAARE,EAAAA,+CAEQF,EAAA,CAARE,EAAAA,2CAEQF,EAAA,CAARE,EAAAA,gDAEQF,EAAA,CAARE,EAAAA,iDAEQF,EAAA,CAARE,EAAAA,yCA8BwBF,EAAA,CAAxBG,EAAAA,UAAU,yDAEFH,EAAA,CAARE,EAAAA,kCA1EQtG,EAAOoG,EAAA,CAzBnBI,EAAAA,UAAU,CACPC,SAAU,YACVC,SAAU,8yDAgBVC,KAAM,CACFC,iCAAkC,SAClCC,gCAAiC,SAErCC,UAAW,CAACnH,GACZoH,gBAAiBC,EAAAA,wBAAwBC,WAEhCjH,GAAb,gBA8UA,SAAAkH,KAA6B,OAAhBA,EAAad,EAAA,CALzBe,EAAAA,SAAS,CACNC,QAAS,CAACC,EAAAA,aAAaC,EAAAA,iBACvBC,QAAS,CAACvH,GACVwH,aAAc,CAACxH,MAENkH","sourcesContent":["import {NgModule,Component,ElementRef,OnInit,Input,Output,EventEmitter,forwardRef,ViewChild,ChangeDetectorRef,ChangeDetectionStrategy} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {InputTextModule} from 'primeng/inputtext';\nimport {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';\n\nexport const SPINNER_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Spinner),\n multi: true\n};\n\n@Component({\n selector: 'p-spinner',\n template: `\n <span class=\"ui-spinner ui-widget ui-corner-all\">\n <input #inputfield type=\"text\" [attr.id]=\"inputId\" [value]=\"formattedValue||null\" [attr.name]=\"name\" [attr.aria-valumin]=\"min\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"value\" [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.size]=\"size\" [attr.maxlength]=\"maxlength\" [attr.tabindex]=\"tabindex\" [attr.placeholder]=\"placeholder\" [disabled]=\"disabled\" [readonly]=\"readonly\" [attr.required]=\"required\"\n (keydown)=\"onInputKeydown($event)\" (blur)=\"onInputBlur($event)\" (input)=\"onInput($event)\" (change)=\"onInputChange($event)\" (focus)=\"onInputFocus($event)\"\n [ngStyle]=\"inputStyle\" [class]=\"inputStyleClass\" [ngClass]=\"'ui-spinner-input ui-inputtext ui-widget ui-state-default ui-corner-all'\">\n <button type=\"button\" [ngClass]=\"{'ui-spinner-button ui-spinner-up ui-corner-tr ui-button ui-widget ui-state-default':true,'ui-state-disabled':disabled}\" [disabled]=\"disabled||readonly\" tabindex=\"-1\" [attr.readonly]=\"readonly\"\n (mouseleave)=\"onUpButtonMouseleave($event)\" (mousedown)=\"onUpButtonMousedown($event)\" (mouseup)=\"onUpButtonMouseup($event)\">\n <span class=\"ui-spinner-button-icon pi pi-caret-up ui-clickable\"></span>\n </button>\n <button type=\"button\" [ngClass]=\"{'ui-spinner-button ui-spinner-down ui-corner-br ui-button ui-widget ui-state-default':true,'ui-state-disabled':disabled}\" [disabled]=\"disabled||readonly\" tabindex=\"-1\" [attr.readonly]=\"readonly\"\n (mouseleave)=\"onDownButtonMouseleave($event)\" (mousedown)=\"onDownButtonMousedown($event)\" (mouseup)=\"onDownButtonMouseup($event)\">\n <span class=\"ui-spinner-button-icon pi pi-caret-down ui-clickable\"></span>\n </button>\n </span>\n `,\n host: {\n '[class.ui-inputwrapper-filled]': 'filled',\n '[class.ui-inputwrapper-focus]': 'focus'\n },\n providers: [SPINNER_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class Spinner implements OnInit,ControlValueAccessor {\n \n @Output() onChange: EventEmitter<any> = new EventEmitter();\n \n @Output() onFocus: EventEmitter<any> = new EventEmitter();\n\n @Output() onBlur: EventEmitter<any> = new EventEmitter();\n\n @Input() min: number;\n\n @Input() max: number;\n \n @Input() maxlength: number;\n \n @Input() size: number;\n\n @Input() placeholder: string;\n\n @Input() inputId: string;\n\n @Input() disabled: boolean;\n \n @Input() readonly: boolean;\n\n @Input() tabindex: number;\n \n @Input() required: boolean;\n\n @Input() name: string;\n\n @Input() ariaLabelledBy: string;\n\n @Input() inputStyle: any;\n\n @Input() inputStyleClass: string;\n\n @Input() formatInput: boolean;\n\n @Input() decimalSeparator: string;\n\n @Input() thousandSeparator: string;\n\n @Input() precision: number;\n \n value: any;\n\n _step: number = 1;\n\n formattedValue: string;\n \n onModelChange: Function = () => {};\n \n onModelTouched: Function = () => {};\n \n keyPattern: RegExp = /[0-9\\+\\-]/;\n \n public timer: any;\n \n public focus: boolean;\n \n public filled: boolean;\n \n public negativeSeparator = '-';\n\n localeDecimalSeparator: string;\n\n localeThousandSeparator: string;\n\n thousandRegExp: RegExp;\n\n calculatedPrecision: number;\n \n @ViewChild('inputfield') inputfieldViewChild: ElementRef;\n\n @Input() get step(): number {\n return this._step;\n }\n set step(val:number) {\n this._step = val;\n\n if (this._step != null) {\n let tokens = this.step.toString().split(/[,]|[.]/);\n this.calculatedPrecision = tokens[1] ? tokens[1].length : undefined;\n }\n }\n \n constructor(public el: ElementRef, public cd: ChangeDetectorRef) {}\n\n ngOnInit() {\n if (this.formatInput) {\n this.localeDecimalSeparator = (1.1).toLocaleString().substring(1, 2);\n this.localeThousandSeparator = (1000).toLocaleString().substring(1, 2);\n this.thousandRegExp = new RegExp(`[${this.thousandSeparator || this.localeThousandSeparator}]`, 'gim');\n\n if (this.decimalSeparator && this.thousandSeparator && this.decimalSeparator === this.thousandSeparator) {\n console.warn(\"thousandSeparator and decimalSeparator cannot have the same value.\");\n }\n }\n }\n\n repeat(event: Event, interval: number, dir: number) {\n let i = interval||500;\n\n this.clearTimer();\n this.timer = setTimeout(() => {\n this.repeat(event, 40, dir);\n }, i);\n\n this.spin(event, dir);\n }\n \n spin(event: Event, dir: number) {\n let step = this.step * dir;\n let currentValue: number;\n let precision = this.getPrecision();\n\n if (this.value)\n currentValue = (typeof this.value === 'string') ? this.parseValue(this.value) : this.value;\n else\n currentValue = 0;\n \n if (precision)\n this.value = parseFloat(this.toFixed(currentValue + step, precision));\n else\n this.value = currentValue + step;\n \n if (this.maxlength !== undefined && this.value.toString().length > this.maxlength) {\n this.value = currentValue;\n }\n \n if (this.min !== undefined && this.value < this.min) {\n this.value = this.min;\n }\n\n if (this.max !== undefined && this.value > this.max) {\n this.value = this.max;\n }\n \n this.formatValue();\n this.onModelChange(this.value);\n this.onChange.emit(event);\n }\n\n getPrecision() {\n return this.precision === undefined ? this.calculatedPrecision : this.precision;\n }\n \n toFixed(value: number, precision: number) {\n let power = Math.pow(10, precision||0);\n return String(Math.round(value * power) / power);\n }\n \n onUpButtonMousedown(event: Event) {\n if (!this.disabled) {\n this.inputfieldViewChild.nativeElement.focus();\n this.repeat(event, null, 1);\n this.updateFilledState();\n event.preventDefault();\n }\n }\n \n onUpButtonMouseup(event: Event) {\n if (!this.disabled) {\n this.clearTimer();\n }\n }\n \n onUpButtonMouseleave(event: Event) {\n if (!this.disabled) {\n this.clearTimer();\n }\n }\n \n onDownButtonMousedown(event: Event) {\n if (!this.disabled) {\n this.inputfieldViewChild.nativeElement.focus();\n this.repeat(event, null, -1);\n this.updateFilledState();\n event.preventDefault();\n }\n }\n \n onDownButtonMouseup(event: Event) {\n if (!this.disabled) {\n this.clearTimer();\n }\n }\n \n onDownButtonMouseleave(event: Event) {\n if (!this.disabled) {\n this.clearTimer();\n }\n }\n \n onInputKeydown(event: KeyboardEvent) {\n if (event.which == 38) {\n this.spin(event, 1);\n event.preventDefault();\n }\n else if (event.which == 40) {\n this.spin(event, -1);\n event.preventDefault();\n }\n }\n\n onInputChange(event: Event) {\n this.onChange.emit(event);\n }\n\n onInput(event: KeyboardEvent) {\n this.value = this.parseValue((<HTMLInputElement> event.target).value);\n this.onModelChange(this.value);\n this.updateFilledState();\n }\n \n onInputBlur(event) {\n this.focus = false;\n this.formatValue();\n this.onModelTouched();\n this.onBlur.emit(event);\n }\n \n onInputFocus(event) {\n this.focus = true;\n this.onFocus.emit(event);\n }\n \n parseValue(val: string): number {\n let value: number;\n let precision = this.getPrecision();\n \n if (val.trim() === '') {\n value = null;\n }\n else {\n if (this.formatInput) {\n val = val.replace(this.thousandRegExp, '');\n }\n\n if (precision) {\n val = this.formatInput ? val.replace(this.decimalSeparator || this.localeDecimalSeparator, '.') : val.replace(',', '.');\n value = parseFloat(val);\n }\n else {\n value = parseInt(val, 10);\n }\n \n if (!isNaN(value)) {\n if (this.max !== null && value > this.max) {\n value = this.max;\n }\n\n if (this.min !== null && value < this.min) {\n value = this.min;\n }\n }\n else {\n value = null;\n }\n }\n \n return value;\n }\n\n formatValue() {\n let value = this.value;\n let precision = this.getPrecision();\n\n if (value != null) {\n if (this.formatInput) {\n value = value.toLocaleString(undefined, {maximumFractionDigits: 20});\n \n if (this.decimalSeparator && this.thousandSeparator) {\n value = value.split(this.localeDecimalSeparator);\n \n if (precision && value[1]) {\n value[1] = (this.decimalSeparator || this.localeDecimalSeparator) + value[1];\n }\n \n if (this.thousandSeparator && value[0].length > 3) {\n value[0] = value[0].replace(new RegExp(`[${this.localeThousandSeparator}]`, 'gim'), this.thousandSeparator);\n }\n \n value = value.join('');\n }\n }\n \n this.formattedValue = value.toString();\n }\n else {\n this.formattedValue = null;\n }\n\n if (this.inputfieldViewChild && this.inputfieldViewChild.nativeElement) {\n this.inputfieldViewChild.nativeElement.value = this.formattedValue;\n }\n }\n \n clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n }\n \n writeValue(value: any) : void {\n this.value = value;\n this.formatValue();\n this.updateFilledState();\n this.cd.markForCheck();\n }\n \n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n \n setDisabledState(val: boolean): void {\n this.disabled = val;\n }\n \n updateFilledState() {\n this.filled = (this.value !== undefined && this.value != null);\n }\n}\n\n\n@NgModule({\n imports: [CommonModule,InputTextModule],\n exports: [Spinner],\n declarations: [Spinner]\n})\nexport class SpinnerModule { }\n"]}
\No newline at end of file