From caa80877b4469c382efcdf071a08bfda129f2134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Mendon=C3=A7a?= Date: Fri, 20 Aug 2021 14:12:20 -0300 Subject: [PATCH] Upgrade to Angular 12. --- angular.json | 14 +++++++------- .../bundles/ng2-currency-mask.umd.js | 2 +- .../bundles/ng2-currency-mask.umd.js.map | 2 +- .../esm2015/lib/currency-mask.config.js | 2 +- .../esm2015/lib/currency-mask.directive.js | 2 +- .../esm2015/lib/currency-mask.module.js | 2 +- .../ng2-currency-mask/esm2015/lib/input.handler.js | 2 +- .../ng2-currency-mask/esm2015/lib/input.manager.js | 2 +- .../ng2-currency-mask/esm2015/lib/input.service.js | 2 +- .../ng2-currency-mask/esm2015/ng2-currency-mask.js | 2 +- dist/ng2-currency-mask/esm2015/public-api.js | 4 ++-- .../fesm2015/ng2-currency-mask.js | 2 +- .../fesm2015/ng2-currency-mask.js.map | 2 +- dist/ng2-currency-mask/package.json | 2 +- package-lock.json | 2 +- package.json | 2 +- .../ng-package.json | 0 .../package.json | 2 +- .../src/lib/currency-mask.config.ts | 0 .../src/lib/currency-mask.directive.ts | 0 .../src/lib/currency-mask.module.ts | 0 .../src/lib/input.handler.ts | 0 .../src/lib/input.manager.ts | 0 .../src/lib/input.service.ts | 0 .../src/public-api.ts | 3 ++- .../tsconfig.lib.json | 0 .../tsconfig.lib.prod.json | 0 27 files changed, 26 insertions(+), 25 deletions(-) rename projects/{currency-mask => ng2-currency-mask}/ng-package.json (100%) rename projects/{currency-mask => ng2-currency-mask}/package.json (96%) rename projects/{currency-mask => ng2-currency-mask}/src/lib/currency-mask.config.ts (100%) rename projects/{currency-mask => ng2-currency-mask}/src/lib/currency-mask.directive.ts (100%) rename projects/{currency-mask => ng2-currency-mask}/src/lib/currency-mask.module.ts (100%) rename projects/{currency-mask => ng2-currency-mask}/src/lib/input.handler.ts (100%) rename projects/{currency-mask => ng2-currency-mask}/src/lib/input.manager.ts (100%) rename projects/{currency-mask => ng2-currency-mask}/src/lib/input.service.ts (100%) rename projects/{currency-mask => ng2-currency-mask}/src/public-api.ts (76%) rename projects/{currency-mask => ng2-currency-mask}/tsconfig.lib.json (100%) rename projects/{currency-mask => ng2-currency-mask}/tsconfig.lib.prod.json (100%) diff --git a/angular.json b/angular.json index d17f7a3..fb1c0ca 100644 --- a/angular.json +++ b/angular.json @@ -3,23 +3,23 @@ "version": 1, "newProjectRoot": "projects", "projects": { - "currency-mask": { + "ng2-currency-mask": { "projectType": "library", - "root": "projects/currency-mask", - "sourceRoot": "projects/currency-mask/src", + "root": "projects/ng2-currency-mask", + "sourceRoot": "projects/ng2-currency-mask/src", "prefix": "lib", "architect": { "build": { "builder": "@angular-devkit/build-angular:ng-packagr", "options": { - "project": "projects/currency-mask/ng-package.json" + "project": "projects/ng2-currency-mask/ng-package.json" }, "configurations": { "production": { - "tsConfig": "projects/currency-mask/tsconfig.lib.prod.json" + "tsConfig": "projects/ng2-currency-mask/tsconfig.lib.prod.json" }, "development": { - "tsConfig": "projects/currency-mask/tsconfig.lib.json" + "tsConfig": "projects/ng2-currency-mask/tsconfig.lib.json" } }, "defaultConfiguration": "production" @@ -27,5 +27,5 @@ } } }, - "defaultProject": "currency-mask" + "defaultProject": "ng2-currency-mask" } \ No newline at end of file diff --git a/dist/ng2-currency-mask/bundles/ng2-currency-mask.umd.js b/dist/ng2-currency-mask/bundles/ng2-currency-mask.umd.js index 3f3e37a..627e0e6 100644 --- a/dist/ng2-currency-mask/bundles/ng2-currency-mask.umd.js +++ b/dist/ng2-currency-mask/bundles/ng2-currency-mask.umd.js @@ -642,7 +642,7 @@ }] }); /* - * Public API Surface of currency-mask + * Public API Surface of ng2-currency-mask */ /** diff --git a/dist/ng2-currency-mask/bundles/ng2-currency-mask.umd.js.map b/dist/ng2-currency-mask/bundles/ng2-currency-mask.umd.js.map index 6e2b1a9..a7e3c09 100644 --- a/dist/ng2-currency-mask/bundles/ng2-currency-mask.umd.js.map +++ b/dist/ng2-currency-mask/bundles/ng2-currency-mask.umd.js.map @@ -1 +1 @@ -{"version":3,"file":"ng2-currency-mask.umd.js","sources":["../../../projects/currency-mask/src/lib/currency-mask.config.ts","../../../projects/currency-mask/src/lib/input.manager.ts","../../../projects/currency-mask/src/lib/input.service.ts","../../../projects/currency-mask/src/lib/input.handler.ts","../../../projects/currency-mask/src/lib/currency-mask.directive.ts","../../../projects/currency-mask/src/lib/currency-mask.module.ts","../../../projects/currency-mask/src/public-api.ts","../../../projects/currency-mask/src/ng2-currency-mask.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport interface CurrencyMaskConfig {\n\n align: string;\n allowNegative: boolean;\n decimal: string;\n precision: number;\n prefix: string;\n suffix: string;\n thousands: string;\n}\n\nexport let CURRENCY_MASK_CONFIG = new InjectionToken(\"currency.mask.config\");","export class InputManager {\n\n private _storedRawValue: string;\n\n constructor(private htmlInputElement: any) {\n }\n\n setCursorAt(position: number): void {\n if (this.htmlInputElement.setSelectionRange) {\n this.htmlInputElement.focus();\n this.htmlInputElement.setSelectionRange(position, position);\n } else if (this.htmlInputElement.createTextRange) {\n let textRange = this.htmlInputElement.createTextRange();\n textRange.collapse(true);\n textRange.moveEnd(\"character\", position);\n textRange.moveStart(\"character\", position);\n textRange.select();\n }\n }\n\n updateValueAndCursor(newRawValue: string, oldLength: number, selectionStart: number): void {\n this.rawValue = newRawValue;\n let newLength = newRawValue.length;\n selectionStart = selectionStart - (oldLength - newLength);\n this.setCursorAt(selectionStart);\n }\n\n get canInputMoreNumbers(): boolean {\n let haventReachedMaxLength = !(this.rawValue.length >= this.htmlInputElement.maxLength && this.htmlInputElement.maxLength >= 0);\n let selectionStart = this.inputSelection.selectionStart;\n let selectionEnd = this.inputSelection.selectionEnd;\n let haveNumberSelected = (selectionStart != selectionEnd && this.htmlInputElement.value.substring(selectionStart, selectionEnd).match(/\\d/)) ? true : false;\n let startWithZero = (this.htmlInputElement.value.substring(0, 1) == \"0\");\n return haventReachedMaxLength || haveNumberSelected || startWithZero;\n }\n\n get inputSelection(): any {\n let selectionStart = 0;\n let selectionEnd = 0;\n\n if (typeof this.htmlInputElement.selectionStart == \"number\" && typeof this.htmlInputElement.selectionEnd == \"number\") {\n selectionStart = this.htmlInputElement.selectionStart;\n selectionEnd = this.htmlInputElement.selectionEnd;\n } else {\n let range = document.getSelection().anchorNode;\n\n if (range && range.firstChild == this.htmlInputElement) {\n let lenght = this.htmlInputElement.value.length;\n let normalizedValue = this.htmlInputElement.value.replace(/\\r\\n/g, \"\\n\");\n let startRange = this.htmlInputElement.createTextRange();\n let endRange = this.htmlInputElement.createTextRange();\n endRange.collapse(false);\n\n if (startRange.compareEndPoints(\"StartToEnd\", endRange) > -1) {\n selectionStart = selectionEnd = lenght;\n } else {\n selectionStart = -startRange.moveStart(\"character\", -lenght);\n selectionStart += normalizedValue.slice(0, selectionStart).split(\"\\n\").length - 1;\n\n if (startRange.compareEndPoints(\"EndToEnd\", endRange) > -1) {\n selectionEnd = lenght;\n } else {\n selectionEnd = -startRange.moveEnd(\"character\", -lenght);\n selectionEnd += normalizedValue.slice(0, selectionEnd).split(\"\\n\").length - 1;\n }\n }\n }\n }\n\n return {\n selectionStart: selectionStart,\n selectionEnd: selectionEnd\n };\n }\n\n get rawValue(): string {\n return this.htmlInputElement && this.htmlInputElement.value;\n }\n\n set rawValue(value: string) {\n this._storedRawValue = value;\n\n if (this.htmlInputElement) {\n this.htmlInputElement.value = value;\n }\n }\n\n get storedRawValue(): string {\n return this._storedRawValue;\n }\n}","import { InputManager } from \"./input.manager\";\n\nexport class InputService {\n\n private inputManager: InputManager;\n\n constructor(private htmlInputElement: any, private options: any) {\n this.inputManager = new InputManager(htmlInputElement);\n }\n\n addNumber(keyCode: number): void {\n if (!this.rawValue) {\n this.rawValue = this.applyMask(false, \"0\");\n }\n\n let keyChar = String.fromCharCode(keyCode);\n let selectionStart = this.inputSelection.selectionStart;\n let selectionEnd = this.inputSelection.selectionEnd;\n this.rawValue = this.rawValue.substring(0, selectionStart) + keyChar + this.rawValue.substring(selectionEnd, this.rawValue.length);\n this.updateFieldValue(selectionStart + 1);\n }\n\n applyMask(isNumber: boolean, rawValue: string): string {\n let { allowNegative, decimal, precision, prefix, suffix, thousands } = this.options;\n rawValue = isNumber ? new Number(rawValue).toFixed(precision) : rawValue;\n let onlyNumbers = rawValue.replace(/[^0-9]/g, \"\");\n\n if (!onlyNumbers) {\n return \"\";\n }\n\n let integerPart = onlyNumbers.slice(0, onlyNumbers.length - precision).replace(/^0*/g, \"\").replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousands);\n\n if (integerPart == \"\") {\n integerPart = \"0\";\n }\n\n let newRawValue = integerPart;\n let decimalPart = onlyNumbers.slice(onlyNumbers.length - precision);\n\n if (precision > 0) {\n decimalPart = \"0\".repeat(precision - decimalPart.length) + decimalPart;\n newRawValue += decimal + decimalPart;\n }\n\n let isZero = parseInt(integerPart) == 0 && (parseInt(decimalPart) == 0 || decimalPart == \"\");\n let operator = (rawValue.indexOf(\"-\") > -1 && allowNegative && !isZero) ? \"-\" : \"\";\n return operator + prefix + newRawValue + suffix;\n }\n\n clearMask(rawValue: string): number {\n if (rawValue == null || rawValue == \"\") {\n return null;\n }\n\n let value = rawValue.replace(this.options.prefix, \"\").replace(this.options.suffix, \"\");\n\n if (this.options.thousands) {\n value = value.replace(new RegExp(\"\\\\\" + this.options.thousands, \"g\"), \"\");\n }\n\n if (this.options.decimal) {\n value = value.replace(this.options.decimal, \".\");\n }\n\n return parseFloat(value);\n }\n\n changeToNegative(): void {\n if (this.options.allowNegative && this.rawValue != \"\" && this.rawValue.charAt(0) != \"-\" && this.value != 0) {\n let selectionStart = this.inputSelection.selectionStart;\n this.rawValue = \"-\" + this.rawValue;\n this.updateFieldValue(selectionStart + 1);\n }\n }\n\n changeToPositive(): void {\n let selectionStart = this.inputSelection.selectionStart;\n this.rawValue = this.rawValue.replace(\"-\", \"\");\n this.updateFieldValue(selectionStart - 1);\n }\n\n fixCursorPosition(forceToEndPosition?: boolean): void {\n let currentCursorPosition = this.inputSelection.selectionStart;\n\n //if the current cursor position is after the number end position, it is moved to the end of the number, ignoring the prefix or suffix. this behavior can be forced with forceToEndPosition flag\n if (currentCursorPosition > this.getRawValueWithoutSuffixEndPosition() || forceToEndPosition) {\n this.inputManager.setCursorAt(this.getRawValueWithoutSuffixEndPosition());\n //if the current cursor position is before the number start position, it is moved to the start of the number, ignoring the prefix or suffix\n } else if (currentCursorPosition < this.getRawValueWithoutPrefixStartPosition()) {\n this.inputManager.setCursorAt(this.getRawValueWithoutPrefixStartPosition());\n }\n }\n\n getRawValueWithoutSuffixEndPosition(): number {\n return this.rawValue.length - this.options.suffix.length;\n }\n\n getRawValueWithoutPrefixStartPosition(): number {\n return this.value != null && this.value < 0 ? this.options.prefix.length + 1 : this.options.prefix.length;\n }\n\n removeNumber(keyCode: number): void {\n let { decimal, thousands } = this.options;\n let selectionEnd = this.inputSelection.selectionEnd;\n let selectionStart = this.inputSelection.selectionStart;\n\n if (selectionStart > this.rawValue.length - this.options.suffix.length) {\n selectionEnd = this.rawValue.length - this.options.suffix.length;\n selectionStart = this.rawValue.length - this.options.suffix.length;\n }\n\n //there is no selection\n if (selectionEnd == selectionStart) {\n //delete key and the target digit is a number\n if ((keyCode == 46 || keyCode == 63272) && /^\\d+$/.test(this.rawValue.substring(selectionStart, selectionEnd + 1))) {\n selectionEnd = selectionEnd + 1;\n }\n\n //delete key and the target digit is the decimal or thousands divider\n if ((keyCode == 46 || keyCode == 63272) && (this.rawValue.substring(selectionStart, selectionEnd + 1) == decimal || this.rawValue.substring(selectionStart, selectionEnd + 1) == thousands)) {\n selectionEnd = selectionEnd + 2;\n selectionStart = selectionStart + 1;\n }\n\n //backspace key and the target digit is a number\n if (keyCode == 8 && /^\\d+$/.test(this.rawValue.substring(selectionStart - 1, selectionEnd))) {\n selectionStart = selectionStart - 1;\n }\n\n //backspace key and the target digit is the decimal or thousands divider\n if (keyCode == 8 && (this.rawValue.substring(selectionStart - 1, selectionEnd) == decimal || this.rawValue.substring(selectionStart - 1, selectionEnd) == thousands)) {\n selectionStart = selectionStart - 2;\n selectionEnd = selectionEnd - 1;\n }\n }\n\n this.rawValue = this.rawValue.substring(0, selectionStart) + this.rawValue.substring(selectionEnd, this.rawValue.length);\n this.updateFieldValue(selectionStart);\n }\n\n updateFieldValue(selectionStart?: number): void {\n let newRawValue = this.applyMask(false, this.rawValue || \"\");\n selectionStart = selectionStart == undefined ? this.rawValue.length : selectionStart;\n this.inputManager.updateValueAndCursor(newRawValue, this.rawValue.length, selectionStart);\n }\n\n updateOptions(options: any): void {\n let value: number = this.value;\n this.options = options;\n this.value = value;\n }\n\n get canInputMoreNumbers(): boolean {\n return this.inputManager.canInputMoreNumbers;\n }\n\n get inputSelection(): any {\n return this.inputManager.inputSelection;\n }\n\n get rawValue(): string {\n return this.inputManager.rawValue;\n }\n\n set rawValue(value: string) {\n this.inputManager.rawValue = value;\n }\n\n get storedRawValue(): string {\n return this.inputManager.storedRawValue;\n }\n\n get value(): number {\n return this.clearMask(this.rawValue);\n }\n\n set value(value: number) {\n this.rawValue = this.applyMask(true, \"\" + value);\n }\n}","import { InputService } from \"./input.service\";\n\nexport class InputHandler {\n\n private inputService: InputService;\n private onModelChange: Function;\n private onModelTouched: Function;\n private htmlInputElement: HTMLInputElement;\n\n constructor(htmlInputElement: HTMLInputElement, options: any) {\n this.inputService = new InputService(htmlInputElement, options);\n this.htmlInputElement = htmlInputElement;\n }\n\n handleClick(event: any, chromeAndroid: boolean): void {\n let selectionRangeLength = Math.abs(this.inputService.inputSelection.selectionEnd - this.inputService.inputSelection.selectionStart);\n\n //if there is no selection and the value is not null, the cursor position will be fixed. if the browser is chrome on android, the cursor will go to the end of the number.\n if (selectionRangeLength == 0 && !isNaN(this.inputService.value)) {\n this.inputService.fixCursorPosition(chromeAndroid);\n }\n }\n\n handleCut(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n setTimeout(() => {\n this.inputService.updateFieldValue();\n this.setValue(this.inputService.value);\n this.onModelChange(this.inputService.value);\n }, 0);\n }\n\n handleInput(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = this.getNewKeyCode(this.inputService.storedRawValue, this.inputService.rawValue);\n let rawValueLength = this.inputService.rawValue.length;\n let rawValueSelectionEnd = this.inputService.inputSelection.selectionEnd;\n let rawValueWithoutSuffixEndPosition = this.inputService.getRawValueWithoutSuffixEndPosition();\n let storedRawValueLength = this.inputService.storedRawValue.length;\n this.inputService.rawValue = this.inputService.storedRawValue;\n\n if ((rawValueSelectionEnd != rawValueWithoutSuffixEndPosition || Math.abs(rawValueLength - storedRawValueLength) != 1) && storedRawValueLength != 0) {\n this.setCursorPosition(event);\n return;\n }\n\n if (rawValueLength < storedRawValueLength) {\n if (this.inputService.value != 0) {\n this.inputService.removeNumber(8);\n } else {\n this.setValue(null);\n }\n }\n\n if (rawValueLength > storedRawValueLength) {\n switch (keyCode) {\n case 43:\n this.inputService.changeToPositive();\n break;\n case 45:\n this.inputService.changeToNegative();\n break;\n default:\n if (!this.inputService.canInputMoreNumbers || (isNaN(this.inputService.value) && String.fromCharCode(keyCode).match(/\\d/) == null)) {\n return;\n }\n\n this.inputService.addNumber(keyCode);\n }\n }\n\n this.setCursorPosition(event);\n this.onModelChange(this.inputService.value);\n }\n\n handleKeydown(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = event.which || event.charCode || event.keyCode;\n\n if (keyCode == 8 || keyCode == 46 || keyCode == 63272) {\n event.preventDefault();\n let selectionRangeLength = Math.abs(this.inputService.inputSelection.selectionEnd - this.inputService.inputSelection.selectionStart);\n\n if (selectionRangeLength == this.inputService.rawValue.length || this.inputService.value == 0) {\n this.setValue(null);\n this.onModelChange(this.inputService.value);\n }\n\n if (selectionRangeLength == 0 && !isNaN(this.inputService.value)) {\n this.inputService.removeNumber(keyCode);\n this.onModelChange(this.inputService.value);\n }\n\n if ((keyCode === 8 || keyCode === 46) && selectionRangeLength != 0 && !isNaN(this.inputService.value)) {\n this.inputService.removeNumber(keyCode);\n this.onModelChange(this.inputService.value);\n }\n }\n }\n\n handleKeypress(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = event.which || event.charCode || event.keyCode;\n\n if (keyCode == undefined || [9, 13].indexOf(keyCode) != -1 || this.isArrowEndHomeKeyInFirefox(event)) {\n return;\n }\n\n switch (keyCode) {\n case 43:\n this.inputService.changeToPositive();\n break;\n case 45:\n this.inputService.changeToNegative();\n break;\n default:\n if (this.inputService.canInputMoreNumbers && (!isNaN(this.inputService.value) || String.fromCharCode(keyCode).match(/\\d/) != null)) {\n this.inputService.addNumber(keyCode);\n }\n }\n\n event.preventDefault();\n this.onModelChange(this.inputService.value);\n }\n\n handleKeyup(event: any): void {\n this.inputService.fixCursorPosition();\n }\n\n handlePaste(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n setTimeout(() => {\n this.inputService.updateFieldValue();\n this.setValue(this.inputService.value);\n this.onModelChange(this.inputService.value);\n }, 1);\n }\n\n updateOptions(options: any): void {\n this.inputService.updateOptions(options);\n }\n\n getOnModelChange(): Function {\n return this.onModelChange;\n }\n\n setOnModelChange(callbackFunction: Function): void {\n this.onModelChange = callbackFunction;\n }\n\n getOnModelTouched(): Function {\n return this.onModelTouched;\n }\n\n setOnModelTouched(callbackFunction: Function) {\n this.onModelTouched = callbackFunction;\n }\n\n setValue(value: number): void {\n this.inputService.value = value;\n }\n\n private getNewKeyCode(oldString: string, newString: string): number {\n if (oldString.length > newString.length) {\n return null;\n }\n\n for (let x = 0; x < newString.length; x++) {\n if (oldString.length == x || oldString[x] != newString[x]) {\n return newString.charCodeAt(x);\n }\n }\n\n return null;\n }\n\n private isArrowEndHomeKeyInFirefox(event: any) {\n if ([35, 36, 37, 38, 39, 40].indexOf(event.keyCode) != -1 && (event.charCode == undefined || event.charCode == 0)) {\n return true;\n }\n\n return false;\n }\n\n private isReadOnly() {\n return this.htmlInputElement && this.htmlInputElement.readOnly;\n }\n\n private setCursorPosition(event: any): void {\n let rawValueWithoutSuffixEndPosition = this.inputService.getRawValueWithoutSuffixEndPosition();\n\n setTimeout(function () {\n event.target.setSelectionRange(rawValueWithoutSuffixEndPosition, rawValueWithoutSuffixEndPosition);\n }, 0);\n }\n}","import { AfterViewInit, Directive, DoCheck, ElementRef, forwardRef, HostListener, Inject, Input, KeyValueDiffer, KeyValueDiffers, OnInit, Optional } from \"@angular/core\";\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, Validator } from \"@angular/forms\";\nimport { CurrencyMaskConfig, CURRENCY_MASK_CONFIG } from \"./currency-mask.config\";\nimport { InputHandler } from \"./input.handler\";\n\nexport const CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CurrencyMaskDirective),\n multi: true\n};\n\n@Directive({\n selector: \"[currencyMask]\",\n providers: [\n CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR,\n { provide: NG_VALIDATORS, useExisting: CurrencyMaskDirective, multi: true }\n ]\n})\nexport class CurrencyMaskDirective implements AfterViewInit, ControlValueAccessor, DoCheck, OnInit, Validator {\n\n @Input() max: number;\n @Input() min: number;\n @Input() options: any = {};\n\n inputHandler: InputHandler;\n keyValueDiffer: KeyValueDiffer;\n\n optionsTemplate = {\n align: \"right\",\n allowNegative: true,\n decimal: \".\",\n precision: 2,\n prefix: \"$ \",\n suffix: \"\",\n thousands: \",\"\n };\n\n constructor(@Optional() @Inject(CURRENCY_MASK_CONFIG) private currencyMaskConfig: CurrencyMaskConfig, private elementRef: ElementRef, private keyValueDiffers: KeyValueDiffers) {\n if (currencyMaskConfig) {\n this.optionsTemplate = currencyMaskConfig;\n }\n\n this.keyValueDiffer = keyValueDiffers.find({}).create();\n }\n\n ngAfterViewInit() {\n this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;\n }\n\n ngDoCheck() {\n if (this.keyValueDiffer.diff(this.options)) {\n this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;\n this.inputHandler.updateOptions((Object).assign({}, this.optionsTemplate, this.options));\n }\n }\n\n ngOnInit() {\n this.inputHandler = new InputHandler(this.elementRef.nativeElement, (Object).assign({}, this.optionsTemplate, this.options));\n }\n\n @HostListener(\"blur\", [\"$event\"])\n handleBlur(event: any) {\n this.inputHandler.getOnModelTouched().apply(event);\n }\n\n @HostListener(\"click\", [\"$event\"])\n handleClick(event: any) {\n this.inputHandler.handleClick(event, this.isChromeAndroid());\n }\n\n @HostListener(\"cut\", [\"$event\"])\n handleCut(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleCut(event);\n }\n }\n\n @HostListener(\"input\", [\"$event\"])\n handleInput(event: any) {\n if (this.isChromeAndroid()) {\n this.inputHandler.handleInput(event);\n }\n }\n\n @HostListener(\"keydown\", [\"$event\"])\n handleKeydown(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeydown(event);\n }\n }\n\n @HostListener(\"keypress\", [\"$event\"])\n handleKeypress(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeypress(event);\n }\n }\n\n @HostListener(\"keyup\", [\"$event\"])\n handleKeyup(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeyup(event);\n }\n }\n\n @HostListener(\"paste\", [\"$event\"])\n handlePaste(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handlePaste(event);\n }\n }\n\n isChromeAndroid(): boolean {\n return /chrome/i.test(navigator.userAgent) && /android/i.test(navigator.userAgent);\n }\n\n registerOnChange(callbackFunction: Function): void {\n this.inputHandler.setOnModelChange(callbackFunction);\n }\n\n registerOnTouched(callbackFunction: Function): void {\n this.inputHandler.setOnModelTouched(callbackFunction);\n }\n\n setDisabledState(value: boolean): void {\n this.elementRef.nativeElement.disabled = value;\n }\n\n validate(abstractControl: AbstractControl): { [key: string]: any; } {\n let result: any = {};\n\n if (abstractControl.value > this.max) {\n result.max = true;\n }\n\n if (abstractControl.value < this.min) {\n result.min = true;\n }\n\n return result != {} ? result : null;\n }\n\n writeValue(value: number): void {\n this.inputHandler.setValue(value);\n }\n}","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { CurrencyMaskDirective } from \"./currency-mask.directive\";\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule\n ],\n declarations: [\n CurrencyMaskDirective\n ],\n exports: [\n CurrencyMaskDirective\n ]\n})\nexport class CurrencyMaskModule {\n}\n","/*\n * Public API Surface of currency-mask\n */\n\nexport * from './lib/currency-mask.config';\nexport * from './lib/currency-mask.directive';\nexport * from './lib/currency-mask.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["InjectionToken","NG_VALUE_ACCESSOR","forwardRef","NG_VALIDATORS","Directive","Optional","Inject","Input","HostListener","CommonModule","FormsModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;QAaW,oBAAoB,GAAG,IAAIA,iBAAc,CAAqB,sBAAsB;;ICb/F;QAII,sBAAoB,gBAAqB;YAArB,qBAAgB,GAAhB,gBAAgB,CAAK;SACxC;QAED,kCAAW,GAAX,UAAY,QAAgB;YACxB,IAAI,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE;gBACzC,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;gBAC9B,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;aAC/D;iBAAM,IAAI,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE;gBAC9C,IAAI,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC;gBACxD,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBACzB,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE,QAA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AO,EAAE,CAAC,QAAQ,CAAC;;;;QCxFrC;;;;yIAAa,kBAAkB;0IAAlB,kBAAkB,iBANvB,qBAAqB,aAJrBC,mBAAY;YACZC,iBAAW,aAMX,qBAAqB;0IAGhB,kBAAkB,YAXlB;gBACLD,mBAAY;gBACZC,iBAAW;aACd;qHAQQ,kBAAkB;sBAZ9BC,WAAQ;uBAAC;wBACN,OAAO,EAAE;4BACLF,mBAAY;4BACZC,iBAAW;yBACd;wBACD,YAAY,EAAE;4BACV,qBAAqB;yBACxB;wBACD,OAAO,EAAE;4BACL,qBAAqB;yBACxB;qBACJ;;;IChBD;;;;ICAA;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"ng2-currency-mask.umd.js","sources":["../../../projects/ng2-currency-mask/src/lib/currency-mask.config.ts","../../../projects/ng2-currency-mask/src/lib/input.manager.ts","../../../projects/ng2-currency-mask/src/lib/input.service.ts","../../../projects/ng2-currency-mask/src/lib/input.handler.ts","../../../projects/ng2-currency-mask/src/lib/currency-mask.directive.ts","../../../projects/ng2-currency-mask/src/lib/currency-mask.module.ts","../../../projects/ng2-currency-mask/src/public-api.ts","../../../projects/ng2-currency-mask/src/ng2-currency-mask.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport interface CurrencyMaskConfig {\n\n align: string;\n allowNegative: boolean;\n decimal: string;\n precision: number;\n prefix: string;\n suffix: string;\n thousands: string;\n}\n\nexport let CURRENCY_MASK_CONFIG = new InjectionToken(\"currency.mask.config\");","export class InputManager {\n\n private _storedRawValue: string;\n\n constructor(private htmlInputElement: any) {\n }\n\n setCursorAt(position: number): void {\n if (this.htmlInputElement.setSelectionRange) {\n this.htmlInputElement.focus();\n this.htmlInputElement.setSelectionRange(position, position);\n } else if (this.htmlInputElement.createTextRange) {\n let textRange = this.htmlInputElement.createTextRange();\n textRange.collapse(true);\n textRange.moveEnd(\"character\", position);\n textRange.moveStart(\"character\", position);\n textRange.select();\n }\n }\n\n updateValueAndCursor(newRawValue: string, oldLength: number, selectionStart: number): void {\n this.rawValue = newRawValue;\n let newLength = newRawValue.length;\n selectionStart = selectionStart - (oldLength - newLength);\n this.setCursorAt(selectionStart);\n }\n\n get canInputMoreNumbers(): boolean {\n let haventReachedMaxLength = !(this.rawValue.length >= this.htmlInputElement.maxLength && this.htmlInputElement.maxLength >= 0);\n let selectionStart = this.inputSelection.selectionStart;\n let selectionEnd = this.inputSelection.selectionEnd;\n let haveNumberSelected = (selectionStart != selectionEnd && this.htmlInputElement.value.substring(selectionStart, selectionEnd).match(/\\d/)) ? true : false;\n let startWithZero = (this.htmlInputElement.value.substring(0, 1) == \"0\");\n return haventReachedMaxLength || haveNumberSelected || startWithZero;\n }\n\n get inputSelection(): any {\n let selectionStart = 0;\n let selectionEnd = 0;\n\n if (typeof this.htmlInputElement.selectionStart == \"number\" && typeof this.htmlInputElement.selectionEnd == \"number\") {\n selectionStart = this.htmlInputElement.selectionStart;\n selectionEnd = this.htmlInputElement.selectionEnd;\n } else {\n let range = document.getSelection().anchorNode;\n\n if (range && range.firstChild == this.htmlInputElement) {\n let lenght = this.htmlInputElement.value.length;\n let normalizedValue = this.htmlInputElement.value.replace(/\\r\\n/g, \"\\n\");\n let startRange = this.htmlInputElement.createTextRange();\n let endRange = this.htmlInputElement.createTextRange();\n endRange.collapse(false);\n\n if (startRange.compareEndPoints(\"StartToEnd\", endRange) > -1) {\n selectionStart = selectionEnd = lenght;\n } else {\n selectionStart = -startRange.moveStart(\"character\", -lenght);\n selectionStart += normalizedValue.slice(0, selectionStart).split(\"\\n\").length - 1;\n\n if (startRange.compareEndPoints(\"EndToEnd\", endRange) > -1) {\n selectionEnd = lenght;\n } else {\n selectionEnd = -startRange.moveEnd(\"character\", -lenght);\n selectionEnd += normalizedValue.slice(0, selectionEnd).split(\"\\n\").length - 1;\n }\n }\n }\n }\n\n return {\n selectionStart: selectionStart,\n selectionEnd: selectionEnd\n };\n }\n\n get rawValue(): string {\n return this.htmlInputElement && this.htmlInputElement.value;\n }\n\n set rawValue(value: string) {\n this._storedRawValue = value;\n\n if (this.htmlInputElement) {\n this.htmlInputElement.value = value;\n }\n }\n\n get storedRawValue(): string {\n return this._storedRawValue;\n }\n}","import { InputManager } from \"./input.manager\";\n\nexport class InputService {\n\n private inputManager: InputManager;\n\n constructor(private htmlInputElement: any, private options: any) {\n this.inputManager = new InputManager(htmlInputElement);\n }\n\n addNumber(keyCode: number): void {\n if (!this.rawValue) {\n this.rawValue = this.applyMask(false, \"0\");\n }\n\n let keyChar = String.fromCharCode(keyCode);\n let selectionStart = this.inputSelection.selectionStart;\n let selectionEnd = this.inputSelection.selectionEnd;\n this.rawValue = this.rawValue.substring(0, selectionStart) + keyChar + this.rawValue.substring(selectionEnd, this.rawValue.length);\n this.updateFieldValue(selectionStart + 1);\n }\n\n applyMask(isNumber: boolean, rawValue: string): string {\n let { allowNegative, decimal, precision, prefix, suffix, thousands } = this.options;\n rawValue = isNumber ? new Number(rawValue).toFixed(precision) : rawValue;\n let onlyNumbers = rawValue.replace(/[^0-9]/g, \"\");\n\n if (!onlyNumbers) {\n return \"\";\n }\n\n let integerPart = onlyNumbers.slice(0, onlyNumbers.length - precision).replace(/^0*/g, \"\").replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousands);\n\n if (integerPart == \"\") {\n integerPart = \"0\";\n }\n\n let newRawValue = integerPart;\n let decimalPart = onlyNumbers.slice(onlyNumbers.length - precision);\n\n if (precision > 0) {\n decimalPart = \"0\".repeat(precision - decimalPart.length) + decimalPart;\n newRawValue += decimal + decimalPart;\n }\n\n let isZero = parseInt(integerPart) == 0 && (parseInt(decimalPart) == 0 || decimalPart == \"\");\n let operator = (rawValue.indexOf(\"-\") > -1 && allowNegative && !isZero) ? \"-\" : \"\";\n return operator + prefix + newRawValue + suffix;\n }\n\n clearMask(rawValue: string): number {\n if (rawValue == null || rawValue == \"\") {\n return null;\n }\n\n let value = rawValue.replace(this.options.prefix, \"\").replace(this.options.suffix, \"\");\n\n if (this.options.thousands) {\n value = value.replace(new RegExp(\"\\\\\" + this.options.thousands, \"g\"), \"\");\n }\n\n if (this.options.decimal) {\n value = value.replace(this.options.decimal, \".\");\n }\n\n return parseFloat(value);\n }\n\n changeToNegative(): void {\n if (this.options.allowNegative && this.rawValue != \"\" && this.rawValue.charAt(0) != \"-\" && this.value != 0) {\n let selectionStart = this.inputSelection.selectionStart;\n this.rawValue = \"-\" + this.rawValue;\n this.updateFieldValue(selectionStart + 1);\n }\n }\n\n changeToPositive(): void {\n let selectionStart = this.inputSelection.selectionStart;\n this.rawValue = this.rawValue.replace(\"-\", \"\");\n this.updateFieldValue(selectionStart - 1);\n }\n\n fixCursorPosition(forceToEndPosition?: boolean): void {\n let currentCursorPosition = this.inputSelection.selectionStart;\n\n //if the current cursor position is after the number end position, it is moved to the end of the number, ignoring the prefix or suffix. this behavior can be forced with forceToEndPosition flag\n if (currentCursorPosition > this.getRawValueWithoutSuffixEndPosition() || forceToEndPosition) {\n this.inputManager.setCursorAt(this.getRawValueWithoutSuffixEndPosition());\n //if the current cursor position is before the number start position, it is moved to the start of the number, ignoring the prefix or suffix\n } else if (currentCursorPosition < this.getRawValueWithoutPrefixStartPosition()) {\n this.inputManager.setCursorAt(this.getRawValueWithoutPrefixStartPosition());\n }\n }\n\n getRawValueWithoutSuffixEndPosition(): number {\n return this.rawValue.length - this.options.suffix.length;\n }\n\n getRawValueWithoutPrefixStartPosition(): number {\n return this.value != null && this.value < 0 ? this.options.prefix.length + 1 : this.options.prefix.length;\n }\n\n removeNumber(keyCode: number): void {\n let { decimal, thousands } = this.options;\n let selectionEnd = this.inputSelection.selectionEnd;\n let selectionStart = this.inputSelection.selectionStart;\n\n if (selectionStart > this.rawValue.length - this.options.suffix.length) {\n selectionEnd = this.rawValue.length - this.options.suffix.length;\n selectionStart = this.rawValue.length - this.options.suffix.length;\n }\n\n //there is no selection\n if (selectionEnd == selectionStart) {\n //delete key and the target digit is a number\n if ((keyCode == 46 || keyCode == 63272) && /^\\d+$/.test(this.rawValue.substring(selectionStart, selectionEnd + 1))) {\n selectionEnd = selectionEnd + 1;\n }\n\n //delete key and the target digit is the decimal or thousands divider\n if ((keyCode == 46 || keyCode == 63272) && (this.rawValue.substring(selectionStart, selectionEnd + 1) == decimal || this.rawValue.substring(selectionStart, selectionEnd + 1) == thousands)) {\n selectionEnd = selectionEnd + 2;\n selectionStart = selectionStart + 1;\n }\n\n //backspace key and the target digit is a number\n if (keyCode == 8 && /^\\d+$/.test(this.rawValue.substring(selectionStart - 1, selectionEnd))) {\n selectionStart = selectionStart - 1;\n }\n\n //backspace key and the target digit is the decimal or thousands divider\n if (keyCode == 8 && (this.rawValue.substring(selectionStart - 1, selectionEnd) == decimal || this.rawValue.substring(selectionStart - 1, selectionEnd) == thousands)) {\n selectionStart = selectionStart - 2;\n selectionEnd = selectionEnd - 1;\n }\n }\n\n this.rawValue = this.rawValue.substring(0, selectionStart) + this.rawValue.substring(selectionEnd, this.rawValue.length);\n this.updateFieldValue(selectionStart);\n }\n\n updateFieldValue(selectionStart?: number): void {\n let newRawValue = this.applyMask(false, this.rawValue || \"\");\n selectionStart = selectionStart == undefined ? this.rawValue.length : selectionStart;\n this.inputManager.updateValueAndCursor(newRawValue, this.rawValue.length, selectionStart);\n }\n\n updateOptions(options: any): void {\n let value: number = this.value;\n this.options = options;\n this.value = value;\n }\n\n get canInputMoreNumbers(): boolean {\n return this.inputManager.canInputMoreNumbers;\n }\n\n get inputSelection(): any {\n return this.inputManager.inputSelection;\n }\n\n get rawValue(): string {\n return this.inputManager.rawValue;\n }\n\n set rawValue(value: string) {\n this.inputManager.rawValue = value;\n }\n\n get storedRawValue(): string {\n return this.inputManager.storedRawValue;\n }\n\n get value(): number {\n return this.clearMask(this.rawValue);\n }\n\n set value(value: number) {\n this.rawValue = this.applyMask(true, \"\" + value);\n }\n}","import { InputService } from \"./input.service\";\n\nexport class InputHandler {\n\n private inputService: InputService;\n private onModelChange: Function;\n private onModelTouched: Function;\n private htmlInputElement: HTMLInputElement;\n\n constructor(htmlInputElement: HTMLInputElement, options: any) {\n this.inputService = new InputService(htmlInputElement, options);\n this.htmlInputElement = htmlInputElement;\n }\n\n handleClick(event: any, chromeAndroid: boolean): void {\n let selectionRangeLength = Math.abs(this.inputService.inputSelection.selectionEnd - this.inputService.inputSelection.selectionStart);\n\n //if there is no selection and the value is not null, the cursor position will be fixed. if the browser is chrome on android, the cursor will go to the end of the number.\n if (selectionRangeLength == 0 && !isNaN(this.inputService.value)) {\n this.inputService.fixCursorPosition(chromeAndroid);\n }\n }\n\n handleCut(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n setTimeout(() => {\n this.inputService.updateFieldValue();\n this.setValue(this.inputService.value);\n this.onModelChange(this.inputService.value);\n }, 0);\n }\n\n handleInput(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = this.getNewKeyCode(this.inputService.storedRawValue, this.inputService.rawValue);\n let rawValueLength = this.inputService.rawValue.length;\n let rawValueSelectionEnd = this.inputService.inputSelection.selectionEnd;\n let rawValueWithoutSuffixEndPosition = this.inputService.getRawValueWithoutSuffixEndPosition();\n let storedRawValueLength = this.inputService.storedRawValue.length;\n this.inputService.rawValue = this.inputService.storedRawValue;\n\n if ((rawValueSelectionEnd != rawValueWithoutSuffixEndPosition || Math.abs(rawValueLength - storedRawValueLength) != 1) && storedRawValueLength != 0) {\n this.setCursorPosition(event);\n return;\n }\n\n if (rawValueLength < storedRawValueLength) {\n if (this.inputService.value != 0) {\n this.inputService.removeNumber(8);\n } else {\n this.setValue(null);\n }\n }\n\n if (rawValueLength > storedRawValueLength) {\n switch (keyCode) {\n case 43:\n this.inputService.changeToPositive();\n break;\n case 45:\n this.inputService.changeToNegative();\n break;\n default:\n if (!this.inputService.canInputMoreNumbers || (isNaN(this.inputService.value) && String.fromCharCode(keyCode).match(/\\d/) == null)) {\n return;\n }\n\n this.inputService.addNumber(keyCode);\n }\n }\n\n this.setCursorPosition(event);\n this.onModelChange(this.inputService.value);\n }\n\n handleKeydown(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = event.which || event.charCode || event.keyCode;\n\n if (keyCode == 8 || keyCode == 46 || keyCode == 63272) {\n event.preventDefault();\n let selectionRangeLength = Math.abs(this.inputService.inputSelection.selectionEnd - this.inputService.inputSelection.selectionStart);\n\n if (selectionRangeLength == this.inputService.rawValue.length || this.inputService.value == 0) {\n this.setValue(null);\n this.onModelChange(this.inputService.value);\n }\n\n if (selectionRangeLength == 0 && !isNaN(this.inputService.value)) {\n this.inputService.removeNumber(keyCode);\n this.onModelChange(this.inputService.value);\n }\n\n if ((keyCode === 8 || keyCode === 46) && selectionRangeLength != 0 && !isNaN(this.inputService.value)) {\n this.inputService.removeNumber(keyCode);\n this.onModelChange(this.inputService.value);\n }\n }\n }\n\n handleKeypress(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = event.which || event.charCode || event.keyCode;\n\n if (keyCode == undefined || [9, 13].indexOf(keyCode) != -1 || this.isArrowEndHomeKeyInFirefox(event)) {\n return;\n }\n\n switch (keyCode) {\n case 43:\n this.inputService.changeToPositive();\n break;\n case 45:\n this.inputService.changeToNegative();\n break;\n default:\n if (this.inputService.canInputMoreNumbers && (!isNaN(this.inputService.value) || String.fromCharCode(keyCode).match(/\\d/) != null)) {\n this.inputService.addNumber(keyCode);\n }\n }\n\n event.preventDefault();\n this.onModelChange(this.inputService.value);\n }\n\n handleKeyup(event: any): void {\n this.inputService.fixCursorPosition();\n }\n\n handlePaste(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n setTimeout(() => {\n this.inputService.updateFieldValue();\n this.setValue(this.inputService.value);\n this.onModelChange(this.inputService.value);\n }, 1);\n }\n\n updateOptions(options: any): void {\n this.inputService.updateOptions(options);\n }\n\n getOnModelChange(): Function {\n return this.onModelChange;\n }\n\n setOnModelChange(callbackFunction: Function): void {\n this.onModelChange = callbackFunction;\n }\n\n getOnModelTouched(): Function {\n return this.onModelTouched;\n }\n\n setOnModelTouched(callbackFunction: Function) {\n this.onModelTouched = callbackFunction;\n }\n\n setValue(value: number): void {\n this.inputService.value = value;\n }\n\n private getNewKeyCode(oldString: string, newString: string): number {\n if (oldString.length > newString.length) {\n return null;\n }\n\n for (let x = 0; x < newString.length; x++) {\n if (oldString.length == x || oldString[x] != newString[x]) {\n return newString.charCodeAt(x);\n }\n }\n\n return null;\n }\n\n private isArrowEndHomeKeyInFirefox(event: any) {\n if ([35, 36, 37, 38, 39, 40].indexOf(event.keyCode) != -1 && (event.charCode == undefined || event.charCode == 0)) {\n return true;\n }\n\n return false;\n }\n\n private isReadOnly() {\n return this.htmlInputElement && this.htmlInputElement.readOnly;\n }\n\n private setCursorPosition(event: any): void {\n let rawValueWithoutSuffixEndPosition = this.inputService.getRawValueWithoutSuffixEndPosition();\n\n setTimeout(function () {\n event.target.setSelectionRange(rawValueWithoutSuffixEndPosition, rawValueWithoutSuffixEndPosition);\n }, 0);\n }\n}","import { AfterViewInit, Directive, DoCheck, ElementRef, forwardRef, HostListener, Inject, Input, KeyValueDiffer, KeyValueDiffers, OnInit, Optional } from \"@angular/core\";\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, Validator } from \"@angular/forms\";\nimport { CurrencyMaskConfig, CURRENCY_MASK_CONFIG } from \"./currency-mask.config\";\nimport { InputHandler } from \"./input.handler\";\n\nexport const CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CurrencyMaskDirective),\n multi: true\n};\n\n@Directive({\n selector: \"[currencyMask]\",\n providers: [\n CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR,\n { provide: NG_VALIDATORS, useExisting: CurrencyMaskDirective, multi: true }\n ]\n})\nexport class CurrencyMaskDirective implements AfterViewInit, ControlValueAccessor, DoCheck, OnInit, Validator {\n\n @Input() max: number;\n @Input() min: number;\n @Input() options: any = {};\n\n inputHandler: InputHandler;\n keyValueDiffer: KeyValueDiffer;\n\n optionsTemplate = {\n align: \"right\",\n allowNegative: true,\n decimal: \".\",\n precision: 2,\n prefix: \"$ \",\n suffix: \"\",\n thousands: \",\"\n };\n\n constructor(@Optional() @Inject(CURRENCY_MASK_CONFIG) private currencyMaskConfig: CurrencyMaskConfig, private elementRef: ElementRef, private keyValueDiffers: KeyValueDiffers) {\n if (currencyMaskConfig) {\n this.optionsTemplate = currencyMaskConfig;\n }\n\n this.keyValueDiffer = keyValueDiffers.find({}).create();\n }\n\n ngAfterViewInit() {\n this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;\n }\n\n ngDoCheck() {\n if (this.keyValueDiffer.diff(this.options)) {\n this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;\n this.inputHandler.updateOptions((Object).assign({}, this.optionsTemplate, this.options));\n }\n }\n\n ngOnInit() {\n this.inputHandler = new InputHandler(this.elementRef.nativeElement, (Object).assign({}, this.optionsTemplate, this.options));\n }\n\n @HostListener(\"blur\", [\"$event\"])\n handleBlur(event: any) {\n this.inputHandler.getOnModelTouched().apply(event);\n }\n\n @HostListener(\"click\", [\"$event\"])\n handleClick(event: any) {\n this.inputHandler.handleClick(event, this.isChromeAndroid());\n }\n\n @HostListener(\"cut\", [\"$event\"])\n handleCut(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleCut(event);\n }\n }\n\n @HostListener(\"input\", [\"$event\"])\n handleInput(event: any) {\n if (this.isChromeAndroid()) {\n this.inputHandler.handleInput(event);\n }\n }\n\n @HostListener(\"keydown\", [\"$event\"])\n handleKeydown(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeydown(event);\n }\n }\n\n @HostListener(\"keypress\", [\"$event\"])\n handleKeypress(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeypress(event);\n }\n }\n\n @HostListener(\"keyup\", [\"$event\"])\n handleKeyup(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeyup(event);\n }\n }\n\n @HostListener(\"paste\", [\"$event\"])\n handlePaste(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handlePaste(event);\n }\n }\n\n isChromeAndroid(): boolean {\n return /chrome/i.test(navigator.userAgent) && /android/i.test(navigator.userAgent);\n }\n\n registerOnChange(callbackFunction: Function): void {\n this.inputHandler.setOnModelChange(callbackFunction);\n }\n\n registerOnTouched(callbackFunction: Function): void {\n this.inputHandler.setOnModelTouched(callbackFunction);\n }\n\n setDisabledState(value: boolean): void {\n this.elementRef.nativeElement.disabled = value;\n }\n\n validate(abstractControl: AbstractControl): { [key: string]: any; } {\n let result: any = {};\n\n if (abstractControl.value > this.max) {\n result.max = true;\n }\n\n if (abstractControl.value < this.min) {\n result.min = true;\n }\n\n return result != {} ? result : null;\n }\n\n writeValue(value: number): void {\n this.inputHandler.setValue(value);\n }\n}","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { CurrencyMaskDirective } from \"./currency-mask.directive\";\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule\n ],\n declarations: [\n CurrencyMaskDirective\n ],\n exports: [\n CurrencyMaskDirective\n ]\n})\nexport class CurrencyMaskModule {\n}\n","/*\n * Public API Surface of ng2-currency-mask\n */\n\nexport * from './lib/currency-mask.config';\nexport * from './lib/currency-mask.directive';\nexport * from './lib/currency-mask.module';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["InjectionToken","NG_VALUE_ACCESSOR","forwardRef","NG_VALIDATORS","Directive","Optional","Inject","Input","HostListener","CommonModule","FormsModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;QAaW,oBAAoB,GAAG,IAAIA,iBAAc,CAAqB,sBAAsB;;ICb/F;QAII,sBAAoB,gBAAqB;YAArB,qBAAgB,GAAhB,gBAAgB,CAAK;SACxC;QAED,kCAAW,GAAX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,WAAW;0BADVA,eAAY;2BAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;oBAMjC,SAAS;0BADRA,eAAY;2BAAC,KAAK,EAAE,CAAC,QAAQ,CAAC;oBAQ/B,WAAW;0BADVA,eAAY;2BAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;oBAQjC,aAAa;0BADZA,eAAY;2BAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;oBAQnC,cAAc;0BADbA,eAAY;2BAAC,UAAU,EAAE,CAAC,QAAQ,CAAC;oBAQpC,WAAW;0BADVA,eAAY;2BAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;oBAQjC,WAAW;0BADVA,eAAY;2BAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;;QCxFrC;;;;yIAAa,kBAAkB;0IAAlB,kBAAkB,iBANvB,qBAAqB,aAJrBC,mBAAY;YACZC,iBAAW,aAMX,qBAAqB;0IAGhB,kBAAkB,YAXlB;gBACLD,mBAAY;gBACZC,iBAAW;aACd;qHAQQ,kBAAkB;sBAZ9BC,WAAQ;uBAAC;wBACN,OAAO,EAAE;4BACLF,mBAAY;4BACZC,iBAAW;yBACd;wBACD,YAAY,EAAE;4BACV,qBAAqB;yBACxB;wBACD,OAAO,EAAE;4BACL,qBAAqB;yBACxB;qBACJ;;;IChBD;;;;ICAA;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/ng2-currency-mask/esm2015/lib/currency-mask.config.js b/dist/ng2-currency-mask/esm2015/lib/currency-mask.config.js index 0586712..b620fa2 100644 --- a/dist/ng2-currency-mask/esm2015/lib/currency-mask.config.js +++ b/dist/ng2-currency-mask/esm2015/lib/currency-mask.config.js @@ -1,3 +1,3 @@ import { InjectionToken } from "@angular/core"; export let CURRENCY_MASK_CONFIG = new InjectionToken("currency.mask.config"); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3ktbWFzay5jb25maWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jdXJyZW5jeS1tYXNrL3NyYy9saWIvY3VycmVuY3ktbWFzay5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQWEvQyxNQUFNLENBQUMsSUFBSSxvQkFBb0IsR0FBRyxJQUFJLGNBQWMsQ0FBcUIsc0JBQXNCLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGlvblRva2VuIH0gZnJvbSBcIkBhbmd1bGFyL2NvcmVcIjtcblxuZXhwb3J0IGludGVyZmFjZSBDdXJyZW5jeU1hc2tDb25maWcge1xuXG4gICAgYWxpZ246IHN0cmluZztcbiAgICBhbGxvd05lZ2F0aXZlOiBib29sZWFuO1xuICAgIGRlY2ltYWw6IHN0cmluZztcbiAgICBwcmVjaXNpb246IG51bWJlcjtcbiAgICBwcmVmaXg6IHN0cmluZztcbiAgICBzdWZmaXg6IHN0cmluZztcbiAgICB0aG91c2FuZHM6IHN0cmluZztcbn1cblxuZXhwb3J0IGxldCBDVVJSRU5DWV9NQVNLX0NPTkZJRyA9IG5ldyBJbmplY3Rpb25Ub2tlbjxDdXJyZW5jeU1hc2tDb25maWc+KFwiY3VycmVuY3kubWFzay5jb25maWdcIik7Il19 \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3ktbWFzay5jb25maWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZzItY3VycmVuY3ktbWFzay9zcmMvbGliL2N1cnJlbmN5LW1hc2suY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFhL0MsTUFBTSxDQUFDLElBQUksb0JBQW9CLEdBQUcsSUFBSSxjQUFjLENBQXFCLHNCQUFzQixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3Rpb25Ub2tlbiB9IGZyb20gXCJAYW5ndWxhci9jb3JlXCI7XG5cbmV4cG9ydCBpbnRlcmZhY2UgQ3VycmVuY3lNYXNrQ29uZmlnIHtcblxuICAgIGFsaWduOiBzdHJpbmc7XG4gICAgYWxsb3dOZWdhdGl2ZTogYm9vbGVhbjtcbiAgICBkZWNpbWFsOiBzdHJpbmc7XG4gICAgcHJlY2lzaW9uOiBudW1iZXI7XG4gICAgcHJlZml4OiBzdHJpbmc7XG4gICAgc3VmZml4OiBzdHJpbmc7XG4gICAgdGhvdXNhbmRzOiBzdHJpbmc7XG59XG5cbmV4cG9ydCBsZXQgQ1VSUkVOQ1lfTUFTS19DT05GSUcgPSBuZXcgSW5qZWN0aW9uVG9rZW48Q3VycmVuY3lNYXNrQ29uZmlnPihcImN1cnJlbmN5Lm1hc2suY29uZmlnXCIpOyJdfQ== \ No newline at end of file diff --git a/dist/ng2-currency-mask/esm2015/lib/currency-mask.directive.js b/dist/ng2-currency-mask/esm2015/lib/currency-mask.directive.js index 90550e1..9ddb5ec 100644 --- a/dist/ng2-currency-mask/esm2015/lib/currency-mask.directive.js +++ b/dist/ng2-currency-mask/esm2015/lib/currency-mask.directive.js @@ -152,4 +152,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.2", ngImpor type: HostListener, args: ["paste", ["$event"]] }] } }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3ktbWFzay5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jdXJyZW5jeS1tYXNrL3NyYy9saWIvY3VycmVuY3ktbWFzay5k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mVsZW1lbnRSZWYubmF0aXZlRWxlbWVudC5kaXNhYmxlZCA9IHZhbHVlO1xuICAgIH1cblxuICAgIHZhbGlkYXRlKGFic3RyYWN0Q29udHJvbDogQWJzdHJhY3RDb250cm9sKTogeyBba2V5OiBzdHJpbmddOiBhbnk7IH0ge1xuICAgICAgICBsZXQgcmVzdWx0OiBhbnkgPSB7fTtcblxuICAgICAgICBpZiAoYWJzdHJhY3RDb250cm9sLnZhbHVlID4gdGhpcy5tYXgpIHtcbiAgICAgICAgICAgIHJlc3VsdC5tYXggPSB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGFic3RyYWN0Q29udHJvbC52YWx1ZSA8IHRoaXMubWluKSB7XG4gICAgICAgICAgICByZXN1bHQubWluID0gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZXN1bHQgIT0ge30gPyByZXN1bHQgOiBudWxsO1xuICAgIH1cblxuICAgIHdyaXRlVmFsdWUodmFsdWU6IG51bWJlcik6IHZvaWQge1xuICAgICAgICB0aGlzLmlucHV0SGFuZGxlci5zZXRWYWx1ZSh2YWx1ZSk7XG4gICAgfVxufSJdfQ== \ No newline at end of file diff --git a/dist/ng2-currency-mask/esm2015/lib/currency-mask.module.js b/dist/ng2-currency-mask/esm2015/lib/currency-mask.module.js index 0ba0928..c0edbc9 100644 --- a/dist/ng2-currency-mask/esm2015/lib/currency-mask.module.js +++ b/dist/ng2-currency-mask/esm2015/lib/currency-mask.module.js @@ -27,4 +27,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.2", ngImpor ] }] }] }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3ktbWFzay5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jdXJyZW5jeS1tYXNrL3NyYy9saWIvY3VycmVuY3ktbWFzay5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dCQUNWLHFCQUFxQjtxQkFDeEI7b0JBQ0QsT0FBTyxFQUFFO3dCQUNMLHFCQUFxQjtxQkFDeEI7aUJBQ0oiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tIFwiQGFuZ3VsYXIvY29tbW9uXCI7XG5pbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gXCJAYW5ndWxhci9jb3JlXCI7XG5pbXBvcnQgeyBGb3Jtc01vZHVsZSB9IGZyb20gXCJAYW5ndWxhci9mb3Jtc1wiO1xuaW1wb3J0IHsgQ3VycmVuY3lNYXNrRGlyZWN0aXZlIH0gZnJvbSBcIi4vY3VycmVuY3ktbWFzay5kaXJlY3RpdmVcIjtcblxuQE5nTW9kdWxlKHtcbiAgICBpbXBvcnRzOiBbXG4gICAgICAgIENvbW1vbk1vZHVsZSxcbiAgICAgICAgRm9ybXNNb2R1bGVcbiAgICBdLFxuICAgIGRlY2xhcmF0aW9uczogW1xuICAgICAgICBDdXJyZW5jeU1hc2tEaXJlY3RpdmVcbiAgICBdLFxuICAgIGV4cG9ydHM6IFtcbiAgICAgICAgQ3VycmVuY3lNYXNrRGlyZWN0aXZlXG4gICAgXVxufSlcbmV4cG9ydCBjbGFzcyBDdXJyZW5jeU1hc2tNb2R1bGUge1xufVxuIl19 \ No newline at end of file diff --git a/dist/ng2-currency-mask/esm2015/lib/input.handler.js b/dist/ng2-currency-mask/esm2015/lib/input.handler.js index 649a7bf..16ee703 100644 --- a/dist/ng2-currency-mask/esm2015/lib/input.handler.js +++ b/dist/ng2-currency-mask/esm2015/lib/input.handler.js @@ -164,4 +164,4 @@ export class InputHandler { }, 0); } } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuaGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2N1cnJlbmN5LW1hc2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VmFsdWUubGVuZ3RoIHx8IHRoaXMuaW5wdXRTZXJ2aWNlLnZhbHVlID09IDApIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNldFZhbHVlKG51bGwpO1xuICAgICAgICAgICAgICAgIHRoaXMub25Nb2RlbENoYW5nZSh0aGlzLmlucHV0U2VydmljZS52YWx1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChzZWxlY3Rpb25SYW5nZUxlbmd0aCA9PSAwICYmICFpc05hTih0aGlzLmlucHV0U2VydmljZS52YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmlucHV0U2VydmljZS5yZW1vdmVOdW1iZXIoa2V5Q29kZSk7XG4gICAgICAgICAgICAgICAgdGhpcy5vbk1vZGVsQ2hhbmdlKHRoaXMuaW5wdXRTZXJ2aWNlLnZhbHVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKChrZXlDb2RlID09PSA4IHx8IGtleUNvZGUgPT09IDQ2KSAmJiBzZWxlY3Rpb25SYW5nZUxlbmd0aCAhPSAwICYmICFpc05hTih0aGlzLmlucHV0U2VydmljZS52YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmlucHV0U2VydmljZS5yZW1vdmVOdW1iZXIoa2V5Q29kZSk7XG4gICAgICAgICAgICAgICAgdGhpcy5vbk1vZGVsQ2hhbmdlKHRoaXMuaW5wdXRTZXJ2aWNlLnZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGhhbmRsZUtleXByZXNzKGV2ZW50OiBhbnkpOiB2b2lkIHtcbiAgICAgICAgaWYgKHRoaXMuaXNSZWFkT25seSgpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBsZXQga2V5Q29kZSA9IGV2ZW50LndoaWNoIHx8IGV2ZW50LmNoYXJDb2RlIHx8IGV2ZW50LmtleUNvZGU7XG5cbiAgICAgICAgaW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bWJlcig4KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRWYWx1ZShudWxsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyYXdWYWx1ZUxlbmd0aCA+IHN0b3JlZFJhd1ZhbHVlTGVuZ3RoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKGtleUNvZGUpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDQzOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmlucHV0U2VydmljZS5jaGFuZ2VUb1Bvc2l0aXZlKCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgNDU6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaW5wdXRTZXJ2aWNlLmNoYW5nZVRvTmVnYXRpdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLmlucHV0U2VydmljZS5jYW5JbnB1dE1vcmVOdW1iZXJzIHx8IChpc05hTih0aGlzLmlucHV0U2VydmljZS52YWx1ZSkgJiYgU3RyaW5nLmZyb21DaGFyQ29kZShrZXlDb2RlKS5tYXRjaCgvXFxkLykgPT0gbnVsbCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaW5wdXRTZXJ2aWNlLmFkZE51bWJlcihrZXlDb2RlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuc2V0Q3Vyc29yUG9zaXRpb24oZXZlbnQpO1xuICAgICAgICB0aGlzLm9uTW9kZWxDaGFuZ2UodGhpcy5pbnB1dFNlcnZpY2UudmFsdWUpO1xuICAgIH1cblxuICAgIGhhbmRsZUtleW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VydmljZS52YWx1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICgoa2V5Q29kZSA9PT0gOCB8fCBrZXlDb2RlID09PSA0NikgJiYgc2VsZWN0aW9uUmFuZ2VMZW5ndGggIT0gMCAmJiAhaXNOYU4odGhpcy5pbnB1dFNlcnZpY2UudmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5pbnB1dFNlcnZpY2UucmVtb3ZlTnVtYmVyKGtleUNvZGUpO1xuICAgICAgICAgICAgICAgIHRoaXMub25Nb2RlbENoYW5nZSh0aGlzLmlucHV0U2VydmljZS52YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBoYW5kbGVLZXlwcmVzcyhldmVudDogYW55KTogdm9pZCB7XG4gICAgICAgIGlmICh0aGlzLmlzUmVhZE9ubHkoKSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IGtleUNvZGUgPSBldmVudC53aGljaCB8fCBldmVudC5jaGFyQ29kZSB8fCBldmVudC5rZXlDb2RlO1xuXG4gICAgICAgIGlmIChrZXlDb2RlID09IHVuZGVmaW5lZCB8fCBbOSwgMTNdLmluZGV4T2Yoa2V5Q29kZSkgIT0gLTEgfHwgdGhpcy5pc0Fycm93RW5kSG9tZUtleUluRmlyZWZveChldmVudCkpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHN3aXRjaCAoa2V5Q29kZSkge1xuICAgICAgICAgICAgY2FzZSA0MzpcbiAgICAgICAgICAgICAgICB0aGlzLmlucHV0U2VydmljZS5jaGFuZ2VUb1Bvc2l0aXZlKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIDQ1OlxuICAgICAgICAgICAgICAgIHRoaXMuaW5wdXRTZXJ2aWNlLmNoYW5nZVRvTmVnYXRpdmUoKTtcbiAgICAgICAgICAgICAg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SB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ld1N0cmluZy5jaGFyQ29kZUF0KHgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBpc0Fycm93RW5kSG9tZUtleUluRmlyZWZveChldmVudDogYW55KSB7XG4gICAgICAgIGlmIChbMzUsIDM2LCAzNywgMzgsIDM5LCA0MF0uaW5kZXhPZihldmVudC5rZXlDb2RlKSAhPSAtMSAmJiAoZXZlbnQuY2hhckNvZGUgPT0gdW5kZWZpbmVkIHx8IGV2ZW50LmNoYXJDb2RlID09IDApKSB7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGlzUmVhZE9ubHkoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmh0bWxJbnB1dEVsZW1lbnQgJiYgdGhpcy5odG1sSW5wdXRFbGVtZW50LnJlYWRPbmx5O1xuICAgIH1cblxuICAgIHByaXZhdGUgc2V0Q3Vyc29yUG9zaXRpb24oZXZlbnQ6IGFueSk6IHZvaWQge1xuICAgICAgICBsZXQgcmF3VmFsdWVXaXRob3V0U3VmZml4RW5kUG9zaXRpb24gPSB0aGlzLmlucHV0U2VydmljZS5nZXRSYXdWYWx1ZVdpdGhvdXRTdWZmaXhFbmRQb3NpdGlvbigpO1xuXG4gICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgZXZlbnQudGFyZ2V0LnNldFNlbGVjdGlvblJhbmdlKHJhd1ZhbHVlV2l0aG91dFN1ZmZpeEVuZFBvc2l0aW9uLCByYXdWYWx1ZVdpdGhvdXRTdWZmaXhFbmRQb3NpdGlvbik7XG4gICAgICAgIH0sIDApO1xuICAgIH1cbn0iXX0= \ No newline at end of file diff --git a/dist/ng2-currency-mask/esm2015/lib/input.manager.js b/dist/ng2-currency-mask/esm2015/lib/input.manager.js index 0a09021..5a0cddf 100644 --- a/dist/ng2-currency-mask/esm2015/lib/input.manager.js +++ b/dist/ng2-currency-mask/esm2015/lib/input.manager.js @@ -78,4 +78,4 @@ export class InputManager { return this._storedRawValue; } } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQubWFuYWdlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2N1cnJlbmN5LW1hc2svc3JjL2xpYi9pbnB1dC5tYW5hZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sT0FBTyxZQUFZO0lBSXJCLFlBQW9CLGdCQUFxQjtRQUFyQixxQkFBZ0IsR0FBaEIsZ0JBQWdCLENBQUs7SUFDekMsQ0FBQztJQUVELFdBQVcsQ0FBQyxRQUFnQjtRQUN4QixJQUFJLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxpQkFBaUIsRUFBRTtZQUN6QyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsS0FBSyxFQUFFLENBQUM7WUFDOUIsSUFBSSxDQUFDLGdCQUFnQixDQUFDLGlCQUFpQixDQUFDLFFBQVEsRUFBRSxRQUFRLENBQUMsQ0FBQztTQUMvRDthQUFNLElBQUksSUFBSSxDQUFDLGdCQUFnQixDQUFDLGVBQWUsRUFBRTtZQUM5QyxJQUFJLFNBQVMsR0FBRyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsZUFBZSxFQUFFLENBQUM7WUFDeEQsU0FBUyxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztZQUN6QixTQUFTLENBQUMsT0FBTyxDQUFDLFdBQVcsRUFBRSxRQUFRLENBQUMsQ0FBQztZQUN6QyxTQUFTLENBQUMsU0FBUyxDQUFDLFdBQVcsRUFBRSxRQUFRLENBQUMsQ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kVuZCA9IGxlbmdodDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbkVuZCA9IC1zdGFydFJhbmdlLm1vdmVFbmQoXCJjaGFyYWN0ZXJcIiwgLWxlbmdodCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb25FbmQgKz0gbm9ybWFsaXplZFZhbHVlLnNsaWNlKDAsIHNlbGVjdGlvbkVuZCkuc3BsaXQoXCJcXG5cIikubGVuZ3RoIC0gMTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBzZWxlY3Rpb25TdGFydDogc2VsZWN0aW9uU3RhcnQsXG4gICAgICAgICAgICBzZWxlY3Rpb25FbmQ6IHNlbGVjdGlvbkVuZFxuICAgICAgICB9O1xuICAgIH1cblxuICAgIGdldCByYXdWYWx1ZSgpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5odG1sSW5wdXRFbGVtZW50ICYmIHRoaXMuaHRtbElucHV0RWxlbWVudC52YWx1ZTtcbiAgICB9XG5cbiAgICBzZXQgcmF3VmFsdWUodmFsdWU6IHN0cmluZykge1xuICAgICAgICB0aGlzLl9zdG9yZWRSYXdWYWx1ZSA9IHZhbHVlO1xuXG4gICAgICAgIGlmICh0aGlzLmh0bWxJbnB1dEVsZW1lbnQpIHtcbiAgICAgICAgICAgIHRoaXMuaHRtbElucHV0RWxlbWVudC52YWx1ZSA9IHZhbHVlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZ2V0IHN0b3JlZFJhd1ZhbHVlKCk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiB0aGlzLl9zdG9yZWRSYXdWYWx1ZTtcbiAgICB9XG59Il19 \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW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ICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uRW5kICs9IG5vcm1hbGl6ZWRWYWx1ZS5zbGljZSgwLCBzZWxlY3Rpb25FbmQpLnNwbGl0KFwiXFxuXCIpLmxlbmd0aCAtIDE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgc2VsZWN0aW9uU3RhcnQ6IHNlbGVjdGlvblN0YXJ0LFxuICAgICAgICAgICAgc2VsZWN0aW9uRW5kOiBzZWxlY3Rpb25FbmRcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBnZXQgcmF3VmFsdWUoKTogc3RyaW5nIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuaHRtbElucHV0RWxlbWVudCAmJiB0aGlzLmh0bWxJbnB1dEVsZW1lbnQudmFsdWU7XG4gICAgfVxuXG4gICAgc2V0IHJhd1ZhbHVlKHZhbHVlOiBzdHJpbmcpIHtcbiAgICAgICAgdGhpcy5fc3RvcmVkUmF3VmFsdWUgPSB2YWx1ZTtcblxuICAgICAgICBpZiAodGhpcy5odG1sSW5wdXRFbGVtZW50KSB7XG4gICAgICAgICAgICB0aGlzLmh0bWxJbnB1dEVsZW1lbnQudmFsdWUgPSB2YWx1ZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGdldCBzdG9yZWRSYXdWYWx1ZSgpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5fc3RvcmVkUmF3VmFsdWU7XG4gICAgfVxufSJdfQ== \ No newline at end of file diff --git a/dist/ng2-currency-mask/esm2015/lib/input.service.js b/dist/ng2-currency-mask/esm2015/lib/input.service.js index 0bf0d66..dbcd6e1 100644 --- a/dist/ng2-currency-mask/esm2015/lib/input.service.js +++ b/dist/ng2-currency-mask/esm2015/lib/input.service.js @@ -142,4 +142,4 @@ export class InputService { this.rawValue = this.applyMask(true, "" + value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XRTZWxlY3Rpb247XG4gICAgfVxuXG4gICAgZ2V0IHJhd1ZhbHVlKCk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiB0aGlzLmlucHV0TWFuYWdlci5yYXdWYWx1ZTtcbiAgICB9XG5cbiAgICBzZXQgcmF3VmFsdWUodmFsdWU6IHN0cmluZykge1xuICAgICAgICB0aGlzLmlucHV0TWFuYWdlci5yYXdWYWx1ZSA9IHZhbHVlO1xuICAgIH1cblxuICAgIGdldCBzdG9yZWRSYXdWYWx1ZSgpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5pbnB1dE1hbmFnZXIuc3RvcmVkUmF3VmFsdWU7XG4gICAgfVxuXG4gICAgZ2V0IHZhbHVlKCk6IG51bWJlciB7XG4gICAgICAgIHJldHVybiB0aGlzLmNsZWFyTWFzayh0aGlzLnJhd1ZhbHVlKTtcbiAgICB9XG5cbiAgICBzZXQgdmFsdWUodmFsdWU6IG51bWJlcikge1xuICAgICAgICB0aGlzLnJhd1ZhbHVlID0gdGhpcy5hcHBseU1hc2sodHJ1ZSwgXCJcIiArIHZhbHVlKTtcbiAgICB9XG59Il19 \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25nMi1jdXJyZW5jeS1tYXNrL3NyYy9saWIvaW5wdXQuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFL0MsTUFBTSxPQUFPLFlBQVk7SUFJckIsWUFBb0IsZ0JBQXFCLEVBQVUsT0FBWTtRQUEzQyxxQkFBZ0IsR0FBaEIsZ0JBQWdCLENBQUs7UUFBVSxZQUFPLEdBQVAsT0FBTyxDQUFLO1FBQzNELEl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ge1xuICAgICAgICByZXR1cm4gdGhpcy5jbGVhck1hc2sodGhpcy5yYXdWYWx1ZSk7XG4gICAgfVxuXG4gICAgc2V0IHZhbHVlKHZhbHVlOiBudW1iZXIpIHtcbiAgICAgICAgdGhpcy5yYXdWYWx1ZSA9IHRoaXMuYXBwbHlNYXNrKHRydWUsIFwiXCIgKyB2YWx1ZSk7XG4gICAgfVxufSJdfQ== \ No newline at end of file diff --git a/dist/ng2-currency-mask/esm2015/ng2-currency-mask.js b/dist/ng2-currency-mask/esm2015/ng2-currency-mask.js index 355c8c8..3cfd382 100644 --- a/dist/ng2-currency-mask/esm2015/ng2-currency-mask.js +++ b/dist/ng2-currency-mask/esm2015/ng2-currency-mask.js @@ -2,4 +2,4 @@ * Generated bundle index. Do not edit. */ export * from './public-api'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmcyLWN1cnJlbmN5LW1hc2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9jdXJyZW5jeS1tYXNrL3NyYy9uZzItY3VycmVuY3ktbWFzay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmcyLWN1cnJlbmN5LW1hc2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9uZzItY3VycmVuY3ktbWFzay9zcmMvbmcyLWN1cnJlbmN5LW1hc2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ== \ No newline at end of file diff --git a/dist/ng2-currency-mask/esm2015/public-api.js b/dist/ng2-currency-mask/esm2015/public-api.js index 682973d..32e3813 100644 --- a/dist/ng2-currency-mask/esm2015/public-api.js +++ b/dist/ng2-currency-mask/esm2015/public-api.js @@ -1,7 +1,7 @@ /* - * Public API Surface of currency-mask + * Public API Surface of ng2-currency-mask */ export * from './lib/currency-mask.config'; export * from './lib/currency-mask.directive'; export * from './lib/currency-mask.module'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2N1cnJlbmN5LW1hc2svc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYyw0QkFBNEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgY3VycmVuY3ktbWFza1xuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2N1cnJlbmN5LW1hc2suY29uZmlnJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2N1cnJlbmN5LW1hc2suZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2N1cnJlbmN5LW1hc2subW9kdWxlJztcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25nMi1jdXJyZW5jeS1tYXNrL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsNEJBQTRCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIG5nMi1jdXJyZW5jeS1tYXNrXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvY3VycmVuY3ktbWFzay5jb25maWcnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY3VycmVuY3ktbWFzay5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY3VycmVuY3ktbWFzay5tb2R1bGUnO1xuXG4iXX0= \ No newline at end of file diff --git a/dist/ng2-currency-mask/fesm2015/ng2-currency-mask.js b/dist/ng2-currency-mask/fesm2015/ng2-currency-mask.js index d72225f..3ff04a9 100644 --- a/dist/ng2-currency-mask/fesm2015/ng2-currency-mask.js +++ b/dist/ng2-currency-mask/fesm2015/ng2-currency-mask.js @@ -572,7 +572,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.2", ngImpor }] }); /* - * Public API Surface of currency-mask + * Public API Surface of ng2-currency-mask */ /** diff --git a/dist/ng2-currency-mask/fesm2015/ng2-currency-mask.js.map b/dist/ng2-currency-mask/fesm2015/ng2-currency-mask.js.map index dfe35c6..deea77d 100644 --- a/dist/ng2-currency-mask/fesm2015/ng2-currency-mask.js.map +++ b/dist/ng2-currency-mask/fesm2015/ng2-currency-mask.js.map @@ -1 +1 @@ -{"version":3,"file":"ng2-currency-mask.js","sources":["../../../projects/currency-mask/src/lib/currency-mask.config.ts","../../../projects/currency-mask/src/lib/input.manager.ts","../../../projects/currency-mask/src/lib/input.service.ts","../../../projects/currency-mask/src/lib/input.handler.ts","../../../projects/currency-mask/src/lib/currency-mask.directive.ts","../../../projects/currency-mask/src/lib/currency-mask.module.ts","../../../projects/currency-mask/src/public-api.ts","../../../projects/currency-mask/src/ng2-currency-mask.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport interface CurrencyMaskConfig {\n\n align: string;\n allowNegative: boolean;\n decimal: string;\n precision: number;\n prefix: string;\n suffix: string;\n thousands: string;\n}\n\nexport let CURRENCY_MASK_CONFIG = new InjectionToken(\"currency.mask.config\");","export class InputManager {\n\n private _storedRawValue: string;\n\n constructor(private htmlInputElement: any) {\n }\n\n setCursorAt(position: number): void {\n if (this.htmlInputElement.setSelectionRange) {\n this.htmlInputElement.focus();\n this.htmlInputElement.setSelectionRange(position, position);\n } else if (this.htmlInputElement.createTextRange) {\n let textRange = this.htmlInputElement.createTextRange();\n textRange.collapse(true);\n textRange.moveEnd(\"character\", position);\n textRange.moveStart(\"character\", position);\n textRange.select();\n }\n }\n\n updateValueAndCursor(newRawValue: string, oldLength: number, selectionStart: number): void {\n this.rawValue = newRawValue;\n let newLength = newRawValue.length;\n selectionStart = selectionStart - (oldLength - newLength);\n this.setCursorAt(selectionStart);\n }\n\n get canInputMoreNumbers(): boolean {\n let haventReachedMaxLength = !(this.rawValue.length >= this.htmlInputElement.maxLength && this.htmlInputElement.maxLength >= 0);\n let selectionStart = this.inputSelection.selectionStart;\n let selectionEnd = this.inputSelection.selectionEnd;\n let haveNumberSelected = (selectionStart != selectionEnd && this.htmlInputElement.value.substring(selectionStart, selectionEnd).match(/\\d/)) ? true : false;\n let startWithZero = (this.htmlInputElement.value.substring(0, 1) == \"0\");\n return haventReachedMaxLength || haveNumberSelected || startWithZero;\n }\n\n get inputSelection(): any {\n let selectionStart = 0;\n let selectionEnd = 0;\n\n if (typeof this.htmlInputElement.selectionStart == \"number\" && typeof this.htmlInputElement.selectionEnd == \"number\") {\n selectionStart = this.htmlInputElement.selectionStart;\n selectionEnd = this.htmlInputElement.selectionEnd;\n } else {\n let range = document.getSelection().anchorNode;\n\n if (range && range.firstChild == this.htmlInputElement) {\n let lenght = this.htmlInputElement.value.length;\n let normalizedValue = this.htmlInputElement.value.replace(/\\r\\n/g, \"\\n\");\n let startRange = this.htmlInputElement.createTextRange();\n let endRange = this.htmlInputElement.createTextRange();\n endRange.collapse(false);\n\n if (startRange.compareEndPoints(\"StartToEnd\", endRange) > -1) {\n selectionStart = selectionEnd = lenght;\n } else {\n selectionStart = -startRange.moveStart(\"character\", -lenght);\n selectionStart += normalizedValue.slice(0, selectionStart).split(\"\\n\").length - 1;\n\n if (startRange.compareEndPoints(\"EndToEnd\", endRange) > -1) {\n selectionEnd = lenght;\n } else {\n selectionEnd = -startRange.moveEnd(\"character\", -lenght);\n selectionEnd += normalizedValue.slice(0, selectionEnd).split(\"\\n\").length - 1;\n }\n }\n }\n }\n\n return {\n selectionStart: selectionStart,\n selectionEnd: selectionEnd\n };\n }\n\n get rawValue(): string {\n return this.htmlInputElement && this.htmlInputElement.value;\n }\n\n set rawValue(value: string) {\n this._storedRawValue = value;\n\n if (this.htmlInputElement) {\n this.htmlInputElement.value = value;\n }\n }\n\n get storedRawValue(): string {\n return this._storedRawValue;\n }\n}","import { InputManager } from \"./input.manager\";\n\nexport class InputService {\n\n private inputManager: InputManager;\n\n constructor(private htmlInputElement: any, private options: any) {\n this.inputManager = new InputManager(htmlInputElement);\n }\n\n addNumber(keyCode: number): void {\n if (!this.rawValue) {\n this.rawValue = this.applyMask(false, \"0\");\n }\n\n let keyChar = String.fromCharCode(keyCode);\n let selectionStart = this.inputSelection.selectionStart;\n let selectionEnd = this.inputSelection.selectionEnd;\n this.rawValue = this.rawValue.substring(0, selectionStart) + keyChar + this.rawValue.substring(selectionEnd, this.rawValue.length);\n this.updateFieldValue(selectionStart + 1);\n }\n\n applyMask(isNumber: boolean, rawValue: string): string {\n let { allowNegative, decimal, precision, prefix, suffix, thousands } = this.options;\n rawValue = isNumber ? new Number(rawValue).toFixed(precision) : rawValue;\n let onlyNumbers = rawValue.replace(/[^0-9]/g, \"\");\n\n if (!onlyNumbers) {\n return \"\";\n }\n\n let integerPart = onlyNumbers.slice(0, onlyNumbers.length - precision).replace(/^0*/g, \"\").replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousands);\n\n if (integerPart == \"\") {\n integerPart = \"0\";\n }\n\n let newRawValue = integerPart;\n let decimalPart = onlyNumbers.slice(onlyNumbers.length - precision);\n\n if (precision > 0) {\n decimalPart = \"0\".repeat(precision - decimalPart.length) + decimalPart;\n newRawValue += decimal + decimalPart;\n }\n\n let isZero = parseInt(integerPart) == 0 && (parseInt(decimalPart) == 0 || decimalPart == \"\");\n let operator = (rawValue.indexOf(\"-\") > -1 && allowNegative && !isZero) ? \"-\" : \"\";\n return operator + prefix + newRawValue + suffix;\n }\n\n clearMask(rawValue: string): number {\n if (rawValue == null || rawValue == \"\") {\n return null;\n }\n\n let value = rawValue.replace(this.options.prefix, \"\").replace(this.options.suffix, \"\");\n\n if (this.options.thousands) {\n value = value.replace(new RegExp(\"\\\\\" + this.options.thousands, \"g\"), \"\");\n }\n\n if (this.options.decimal) {\n value = value.replace(this.options.decimal, \".\");\n }\n\n return parseFloat(value);\n }\n\n changeToNegative(): void {\n if (this.options.allowNegative && this.rawValue != \"\" && this.rawValue.charAt(0) != \"-\" && this.value != 0) {\n let selectionStart = this.inputSelection.selectionStart;\n this.rawValue = \"-\" + this.rawValue;\n this.updateFieldValue(selectionStart + 1);\n }\n }\n\n changeToPositive(): void {\n let selectionStart = this.inputSelection.selectionStart;\n this.rawValue = this.rawValue.replace(\"-\", \"\");\n this.updateFieldValue(selectionStart - 1);\n }\n\n fixCursorPosition(forceToEndPosition?: boolean): void {\n let currentCursorPosition = this.inputSelection.selectionStart;\n\n //if the current cursor position is after the number end position, it is moved to the end of the number, ignoring the prefix or suffix. this behavior can be forced with forceToEndPosition flag\n if (currentCursorPosition > this.getRawValueWithoutSuffixEndPosition() || forceToEndPosition) {\n this.inputManager.setCursorAt(this.getRawValueWithoutSuffixEndPosition());\n //if the current cursor position is before the number start position, it is moved to the start of the number, ignoring the prefix or suffix\n } else if (currentCursorPosition < this.getRawValueWithoutPrefixStartPosition()) {\n this.inputManager.setCursorAt(this.getRawValueWithoutPrefixStartPosition());\n }\n }\n\n getRawValueWithoutSuffixEndPosition(): number {\n return this.rawValue.length - this.options.suffix.length;\n }\n\n getRawValueWithoutPrefixStartPosition(): number {\n return this.value != null && this.value < 0 ? this.options.prefix.length + 1 : this.options.prefix.length;\n }\n\n removeNumber(keyCode: number): void {\n let { decimal, thousands } = this.options;\n let selectionEnd = this.inputSelection.selectionEnd;\n let selectionStart = this.inputSelection.selectionStart;\n\n if (selectionStart > this.rawValue.length - this.options.suffix.length) {\n selectionEnd = this.rawValue.length - this.options.suffix.length;\n selectionStart = this.rawValue.length - this.options.suffix.length;\n }\n\n //there is no selection\n if (selectionEnd == selectionStart) {\n //delete key and the target digit is a number\n if ((keyCode == 46 || keyCode == 63272) && /^\\d+$/.test(this.rawValue.substring(selectionStart, selectionEnd + 1))) {\n selectionEnd = selectionEnd + 1;\n }\n\n //delete key and the target digit is the decimal or thousands divider\n if ((keyCode == 46 || keyCode == 63272) && (this.rawValue.substring(selectionStart, selectionEnd + 1) == decimal || this.rawValue.substring(selectionStart, selectionEnd + 1) == thousands)) {\n selectionEnd = selectionEnd + 2;\n selectionStart = selectionStart + 1;\n }\n\n //backspace key and the target digit is a number\n if (keyCode == 8 && /^\\d+$/.test(this.rawValue.substring(selectionStart - 1, selectionEnd))) {\n selectionStart = selectionStart - 1;\n }\n\n //backspace key and the target digit is the decimal or thousands divider\n if (keyCode == 8 && (this.rawValue.substring(selectionStart - 1, selectionEnd) == decimal || this.rawValue.substring(selectionStart - 1, selectionEnd) == thousands)) {\n selectionStart = selectionStart - 2;\n selectionEnd = selectionEnd - 1;\n }\n }\n\n this.rawValue = this.rawValue.substring(0, selectionStart) + this.rawValue.substring(selectionEnd, this.rawValue.length);\n this.updateFieldValue(selectionStart);\n }\n\n updateFieldValue(selectionStart?: number): void {\n let newRawValue = this.applyMask(false, this.rawValue || \"\");\n selectionStart = selectionStart == undefined ? this.rawValue.length : selectionStart;\n this.inputManager.updateValueAndCursor(newRawValue, this.rawValue.length, selectionStart);\n }\n\n updateOptions(options: any): void {\n let value: number = this.value;\n this.options = options;\n this.value = value;\n }\n\n get canInputMoreNumbers(): boolean {\n return this.inputManager.canInputMoreNumbers;\n }\n\n get inputSelection(): any {\n return this.inputManager.inputSelection;\n }\n\n get rawValue(): string {\n return this.inputManager.rawValue;\n }\n\n set rawValue(value: string) {\n this.inputManager.rawValue = value;\n }\n\n get storedRawValue(): string {\n return this.inputManager.storedRawValue;\n }\n\n get value(): number {\n return this.clearMask(this.rawValue);\n }\n\n set value(value: number) {\n this.rawValue = this.applyMask(true, \"\" + value);\n }\n}","import { InputService } from \"./input.service\";\n\nexport class InputHandler {\n\n private inputService: InputService;\n private onModelChange: Function;\n private onModelTouched: Function;\n private htmlInputElement: HTMLInputElement;\n\n constructor(htmlInputElement: HTMLInputElement, options: any) {\n this.inputService = new InputService(htmlInputElement, options);\n this.htmlInputElement = htmlInputElement;\n }\n\n handleClick(event: any, chromeAndroid: boolean): void {\n let selectionRangeLength = Math.abs(this.inputService.inputSelection.selectionEnd - this.inputService.inputSelection.selectionStart);\n\n //if there is no selection and the value is not null, the cursor position will be fixed. if the browser is chrome on android, the cursor will go to the end of the number.\n if (selectionRangeLength == 0 && !isNaN(this.inputService.value)) {\n this.inputService.fixCursorPosition(chromeAndroid);\n }\n }\n\n handleCut(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n setTimeout(() => {\n this.inputService.updateFieldValue();\n this.setValue(this.inputService.value);\n this.onModelChange(this.inputService.value);\n }, 0);\n }\n\n handleInput(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = this.getNewKeyCode(this.inputService.storedRawValue, this.inputService.rawValue);\n let rawValueLength = this.inputService.rawValue.length;\n let rawValueSelectionEnd = this.inputService.inputSelection.selectionEnd;\n let rawValueWithoutSuffixEndPosition = this.inputService.getRawValueWithoutSuffixEndPosition();\n let storedRawValueLength = this.inputService.storedRawValue.length;\n this.inputService.rawValue = this.inputService.storedRawValue;\n\n if ((rawValueSelectionEnd != rawValueWithoutSuffixEndPosition || Math.abs(rawValueLength - storedRawValueLength) != 1) && storedRawValueLength != 0) {\n this.setCursorPosition(event);\n return;\n }\n\n if (rawValueLength < storedRawValueLength) {\n if (this.inputService.value != 0) {\n this.inputService.removeNumber(8);\n } else {\n this.setValue(null);\n }\n }\n\n if (rawValueLength > storedRawValueLength) {\n switch (keyCode) {\n case 43:\n this.inputService.changeToPositive();\n break;\n case 45:\n this.inputService.changeToNegative();\n break;\n default:\n if (!this.inputService.canInputMoreNumbers || (isNaN(this.inputService.value) && String.fromCharCode(keyCode).match(/\\d/) == null)) {\n return;\n }\n\n this.inputService.addNumber(keyCode);\n }\n }\n\n this.setCursorPosition(event);\n this.onModelChange(this.inputService.value);\n }\n\n handleKeydown(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = event.which || event.charCode || event.keyCode;\n\n if (keyCode == 8 || keyCode == 46 || keyCode == 63272) {\n event.preventDefault();\n let selectionRangeLength = Math.abs(this.inputService.inputSelection.selectionEnd - this.inputService.inputSelection.selectionStart);\n\n if (selectionRangeLength == this.inputService.rawValue.length || this.inputService.value == 0) {\n this.setValue(null);\n this.onModelChange(this.inputService.value);\n }\n\n if (selectionRangeLength == 0 && !isNaN(this.inputService.value)) {\n this.inputService.removeNumber(keyCode);\n this.onModelChange(this.inputService.value);\n }\n\n if ((keyCode === 8 || keyCode === 46) && selectionRangeLength != 0 && !isNaN(this.inputService.value)) {\n this.inputService.removeNumber(keyCode);\n this.onModelChange(this.inputService.value);\n }\n }\n }\n\n handleKeypress(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = event.which || event.charCode || event.keyCode;\n\n if (keyCode == undefined || [9, 13].indexOf(keyCode) != -1 || this.isArrowEndHomeKeyInFirefox(event)) {\n return;\n }\n\n switch (keyCode) {\n case 43:\n this.inputService.changeToPositive();\n break;\n case 45:\n this.inputService.changeToNegative();\n break;\n default:\n if (this.inputService.canInputMoreNumbers && (!isNaN(this.inputService.value) || String.fromCharCode(keyCode).match(/\\d/) != null)) {\n this.inputService.addNumber(keyCode);\n }\n }\n\n event.preventDefault();\n this.onModelChange(this.inputService.value);\n }\n\n handleKeyup(event: any): void {\n this.inputService.fixCursorPosition();\n }\n\n handlePaste(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n setTimeout(() => {\n this.inputService.updateFieldValue();\n this.setValue(this.inputService.value);\n this.onModelChange(this.inputService.value);\n }, 1);\n }\n\n updateOptions(options: any): void {\n this.inputService.updateOptions(options);\n }\n\n getOnModelChange(): Function {\n return this.onModelChange;\n }\n\n setOnModelChange(callbackFunction: Function): void {\n this.onModelChange = callbackFunction;\n }\n\n getOnModelTouched(): Function {\n return this.onModelTouched;\n }\n\n setOnModelTouched(callbackFunction: Function) {\n this.onModelTouched = callbackFunction;\n }\n\n setValue(value: number): void {\n this.inputService.value = value;\n }\n\n private getNewKeyCode(oldString: string, newString: string): number {\n if (oldString.length > newString.length) {\n return null;\n }\n\n for (let x = 0; x < newString.length; x++) {\n if (oldString.length == x || oldString[x] != newString[x]) {\n return newString.charCodeAt(x);\n }\n }\n\n return null;\n }\n\n private isArrowEndHomeKeyInFirefox(event: any) {\n if ([35, 36, 37, 38, 39, 40].indexOf(event.keyCode) != -1 && (event.charCode == undefined || event.charCode == 0)) {\n return true;\n }\n\n return false;\n }\n\n private isReadOnly() {\n return this.htmlInputElement && this.htmlInputElement.readOnly;\n }\n\n private setCursorPosition(event: any): void {\n let rawValueWithoutSuffixEndPosition = this.inputService.getRawValueWithoutSuffixEndPosition();\n\n setTimeout(function () {\n event.target.setSelectionRange(rawValueWithoutSuffixEndPosition, rawValueWithoutSuffixEndPosition);\n }, 0);\n }\n}","import { AfterViewInit, Directive, DoCheck, ElementRef, forwardRef, HostListener, Inject, Input, KeyValueDiffer, KeyValueDiffers, OnInit, Optional } from \"@angular/core\";\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, Validator } from \"@angular/forms\";\nimport { CurrencyMaskConfig, CURRENCY_MASK_CONFIG } from \"./currency-mask.config\";\nimport { InputHandler } from \"./input.handler\";\n\nexport const CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CurrencyMaskDirective),\n multi: true\n};\n\n@Directive({\n selector: \"[currencyMask]\",\n providers: [\n CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR,\n { provide: NG_VALIDATORS, useExisting: CurrencyMaskDirective, multi: true }\n ]\n})\nexport class CurrencyMaskDirective implements AfterViewInit, ControlValueAccessor, DoCheck, OnInit, Validator {\n\n @Input() max: number;\n @Input() min: number;\n @Input() options: any = {};\n\n inputHandler: InputHandler;\n keyValueDiffer: KeyValueDiffer;\n\n optionsTemplate = {\n align: \"right\",\n allowNegative: true,\n decimal: \".\",\n precision: 2,\n prefix: \"$ \",\n suffix: \"\",\n thousands: \",\"\n };\n\n constructor(@Optional() @Inject(CURRENCY_MASK_CONFIG) private currencyMaskConfig: CurrencyMaskConfig, private elementRef: ElementRef, private keyValueDiffers: KeyValueDiffers) {\n if (currencyMaskConfig) {\n this.optionsTemplate = currencyMaskConfig;\n }\n\n this.keyValueDiffer = keyValueDiffers.find({}).create();\n }\n\n ngAfterViewInit() {\n this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;\n }\n\n ngDoCheck() {\n if (this.keyValueDiffer.diff(this.options)) {\n this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;\n this.inputHandler.updateOptions((Object).assign({}, this.optionsTemplate, this.options));\n }\n }\n\n ngOnInit() {\n this.inputHandler = new InputHandler(this.elementRef.nativeElement, (Object).assign({}, this.optionsTemplate, this.options));\n }\n\n @HostListener(\"blur\", [\"$event\"])\n handleBlur(event: any) {\n this.inputHandler.getOnModelTouched().apply(event);\n }\n\n @HostListener(\"click\", [\"$event\"])\n handleClick(event: any) {\n this.inputHandler.handleClick(event, this.isChromeAndroid());\n }\n\n @HostListener(\"cut\", [\"$event\"])\n handleCut(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleCut(event);\n }\n }\n\n @HostListener(\"input\", [\"$event\"])\n handleInput(event: any) {\n if (this.isChromeAndroid()) {\n this.inputHandler.handleInput(event);\n }\n }\n\n @HostListener(\"keydown\", [\"$event\"])\n handleKeydown(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeydown(event);\n }\n }\n\n @HostListener(\"keypress\", [\"$event\"])\n handleKeypress(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeypress(event);\n }\n }\n\n @HostListener(\"keyup\", [\"$event\"])\n handleKeyup(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeyup(event);\n }\n }\n\n @HostListener(\"paste\", [\"$event\"])\n handlePaste(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handlePaste(event);\n }\n }\n\n isChromeAndroid(): boolean {\n return /chrome/i.test(navigator.userAgent) && /android/i.test(navigator.userAgent);\n }\n\n registerOnChange(callbackFunction: Function): void {\n this.inputHandler.setOnModelChange(callbackFunction);\n }\n\n registerOnTouched(callbackFunction: Function): void {\n this.inputHandler.setOnModelTouched(callbackFunction);\n }\n\n setDisabledState(value: boolean): void {\n this.elementRef.nativeElement.disabled = value;\n }\n\n validate(abstractControl: AbstractControl): { [key: string]: any; } {\n let result: any = {};\n\n if (abstractControl.value > this.max) {\n result.max = true;\n }\n\n if (abstractControl.value < this.min) {\n result.min = true;\n }\n\n return result != {} ? result : null;\n }\n\n writeValue(value: number): void {\n this.inputHandler.setValue(value);\n }\n}","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { CurrencyMaskDirective } from \"./currency-mask.directive\";\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule\n ],\n declarations: [\n CurrencyMaskDirective\n ],\n exports: [\n CurrencyMaskDirective\n ]\n})\nexport class CurrencyMaskModule {\n}\n","/*\n * Public API Surface of currency-mask\n */\n\nexport * from './lib/currency-mask.config';\nexport * from './lib/currency-mask.directive';\nexport * from './lib/currency-mask.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;IAaW,oBAAoB,GAAG,IAAI,cAAc,CAAqB,sBAAsB;;MCblF,YAAY;IAIrB,YAAoB,gBAAqB;QAArB,qBAAgB,GAAhB,gBAAgB,CAAK;KACxC;IAED,WAAW,CAAC,QAAgB;QACxB,IAAI,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE;YACzC,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;YAC9B,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;SAC/D;aAAM,IAAI,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE;YAC9C,IAAI,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC;YACxD,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACzB,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;YACzC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;YAC3C,SAAS,CAAC,MAAM,EAAE,CAAC;SACtB;KACJ;IAED,oBAAoB,CAAC,WAAmB,EAAE,SAAiB,EAAE,cAAsB;QAC/E,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC;QA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W;sBADV,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;gBAQjC,aAAa;sBADZ,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;gBAQnC,cAAc;sBADb,YAAY;uBAAC,UAAU,EAAE,CAAC,QAAQ,CAAC;gBAQpC,WAAW;sBADV,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;gBAQjC,WAAW;sBADV,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;MCxFxB,kBAAkB;;+GAAlB,kBAAkB;gHAAlB,kBAAkB,iBANvB,qBAAqB,aAJrB,YAAY;QACZ,WAAW,aAMX,qBAAqB;gHAGhB,kBAAkB,YAXlB;YACL,YAAY;YACZ,WAAW;SACd;2FAQQ,kBAAkB;kBAZ9B,QAAQ;mBAAC;oBACN,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;qBACd;oBACD,YAAY,EAAE;wBACV,qBAAqB;qBACxB;oBACD,OAAO,EAAE;wBACL,qBAAqB;qBACxB;iBACJ;;;AChBD;;;;ACAA;;;;;;"} \ No newline at end of file +{"version":3,"file":"ng2-currency-mask.js","sources":["../../../projects/ng2-currency-mask/src/lib/currency-mask.config.ts","../../../projects/ng2-currency-mask/src/lib/input.manager.ts","../../../projects/ng2-currency-mask/src/lib/input.service.ts","../../../projects/ng2-currency-mask/src/lib/input.handler.ts","../../../projects/ng2-currency-mask/src/lib/currency-mask.directive.ts","../../../projects/ng2-currency-mask/src/lib/currency-mask.module.ts","../../../projects/ng2-currency-mask/src/public-api.ts","../../../projects/ng2-currency-mask/src/ng2-currency-mask.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport interface CurrencyMaskConfig {\n\n align: string;\n allowNegative: boolean;\n decimal: string;\n precision: number;\n prefix: string;\n suffix: string;\n thousands: string;\n}\n\nexport let CURRENCY_MASK_CONFIG = new InjectionToken(\"currency.mask.config\");","export class InputManager {\n\n private _storedRawValue: string;\n\n constructor(private htmlInputElement: any) {\n }\n\n setCursorAt(position: number): void {\n if (this.htmlInputElement.setSelectionRange) {\n this.htmlInputElement.focus();\n this.htmlInputElement.setSelectionRange(position, position);\n } else if (this.htmlInputElement.createTextRange) {\n let textRange = this.htmlInputElement.createTextRange();\n textRange.collapse(true);\n textRange.moveEnd(\"character\", position);\n textRange.moveStart(\"character\", position);\n textRange.select();\n }\n }\n\n updateValueAndCursor(newRawValue: string, oldLength: number, selectionStart: number): void {\n this.rawValue = newRawValue;\n let newLength = newRawValue.length;\n selectionStart = selectionStart - (oldLength - newLength);\n this.setCursorAt(selectionStart);\n }\n\n get canInputMoreNumbers(): boolean {\n let haventReachedMaxLength = !(this.rawValue.length >= this.htmlInputElement.maxLength && this.htmlInputElement.maxLength >= 0);\n let selectionStart = this.inputSelection.selectionStart;\n let selectionEnd = this.inputSelection.selectionEnd;\n let haveNumberSelected = (selectionStart != selectionEnd && this.htmlInputElement.value.substring(selectionStart, selectionEnd).match(/\\d/)) ? true : false;\n let startWithZero = (this.htmlInputElement.value.substring(0, 1) == \"0\");\n return haventReachedMaxLength || haveNumberSelected || startWithZero;\n }\n\n get inputSelection(): any {\n let selectionStart = 0;\n let selectionEnd = 0;\n\n if (typeof this.htmlInputElement.selectionStart == \"number\" && typeof this.htmlInputElement.selectionEnd == \"number\") {\n selectionStart = this.htmlInputElement.selectionStart;\n selectionEnd = this.htmlInputElement.selectionEnd;\n } else {\n let range = document.getSelection().anchorNode;\n\n if (range && range.firstChild == this.htmlInputElement) {\n let lenght = this.htmlInputElement.value.length;\n let normalizedValue = this.htmlInputElement.value.replace(/\\r\\n/g, \"\\n\");\n let startRange = this.htmlInputElement.createTextRange();\n let endRange = this.htmlInputElement.createTextRange();\n endRange.collapse(false);\n\n if (startRange.compareEndPoints(\"StartToEnd\", endRange) > -1) {\n selectionStart = selectionEnd = lenght;\n } else {\n selectionStart = -startRange.moveStart(\"character\", -lenght);\n selectionStart += normalizedValue.slice(0, selectionStart).split(\"\\n\").length - 1;\n\n if (startRange.compareEndPoints(\"EndToEnd\", endRange) > -1) {\n selectionEnd = lenght;\n } else {\n selectionEnd = -startRange.moveEnd(\"character\", -lenght);\n selectionEnd += normalizedValue.slice(0, selectionEnd).split(\"\\n\").length - 1;\n }\n }\n }\n }\n\n return {\n selectionStart: selectionStart,\n selectionEnd: selectionEnd\n };\n }\n\n get rawValue(): string {\n return this.htmlInputElement && this.htmlInputElement.value;\n }\n\n set rawValue(value: string) {\n this._storedRawValue = value;\n\n if (this.htmlInputElement) {\n this.htmlInputElement.value = value;\n }\n }\n\n get storedRawValue(): string {\n return this._storedRawValue;\n }\n}","import { InputManager } from \"./input.manager\";\n\nexport class InputService {\n\n private inputManager: InputManager;\n\n constructor(private htmlInputElement: any, private options: any) {\n this.inputManager = new InputManager(htmlInputElement);\n }\n\n addNumber(keyCode: number): void {\n if (!this.rawValue) {\n this.rawValue = this.applyMask(false, \"0\");\n }\n\n let keyChar = String.fromCharCode(keyCode);\n let selectionStart = this.inputSelection.selectionStart;\n let selectionEnd = this.inputSelection.selectionEnd;\n this.rawValue = this.rawValue.substring(0, selectionStart) + keyChar + this.rawValue.substring(selectionEnd, this.rawValue.length);\n this.updateFieldValue(selectionStart + 1);\n }\n\n applyMask(isNumber: boolean, rawValue: string): string {\n let { allowNegative, decimal, precision, prefix, suffix, thousands } = this.options;\n rawValue = isNumber ? new Number(rawValue).toFixed(precision) : rawValue;\n let onlyNumbers = rawValue.replace(/[^0-9]/g, \"\");\n\n if (!onlyNumbers) {\n return \"\";\n }\n\n let integerPart = onlyNumbers.slice(0, onlyNumbers.length - precision).replace(/^0*/g, \"\").replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousands);\n\n if (integerPart == \"\") {\n integerPart = \"0\";\n }\n\n let newRawValue = integerPart;\n let decimalPart = onlyNumbers.slice(onlyNumbers.length - precision);\n\n if (precision > 0) {\n decimalPart = \"0\".repeat(precision - decimalPart.length) + decimalPart;\n newRawValue += decimal + decimalPart;\n }\n\n let isZero = parseInt(integerPart) == 0 && (parseInt(decimalPart) == 0 || decimalPart == \"\");\n let operator = (rawValue.indexOf(\"-\") > -1 && allowNegative && !isZero) ? \"-\" : \"\";\n return operator + prefix + newRawValue + suffix;\n }\n\n clearMask(rawValue: string): number {\n if (rawValue == null || rawValue == \"\") {\n return null;\n }\n\n let value = rawValue.replace(this.options.prefix, \"\").replace(this.options.suffix, \"\");\n\n if (this.options.thousands) {\n value = value.replace(new RegExp(\"\\\\\" + this.options.thousands, \"g\"), \"\");\n }\n\n if (this.options.decimal) {\n value = value.replace(this.options.decimal, \".\");\n }\n\n return parseFloat(value);\n }\n\n changeToNegative(): void {\n if (this.options.allowNegative && this.rawValue != \"\" && this.rawValue.charAt(0) != \"-\" && this.value != 0) {\n let selectionStart = this.inputSelection.selectionStart;\n this.rawValue = \"-\" + this.rawValue;\n this.updateFieldValue(selectionStart + 1);\n }\n }\n\n changeToPositive(): void {\n let selectionStart = this.inputSelection.selectionStart;\n this.rawValue = this.rawValue.replace(\"-\", \"\");\n this.updateFieldValue(selectionStart - 1);\n }\n\n fixCursorPosition(forceToEndPosition?: boolean): void {\n let currentCursorPosition = this.inputSelection.selectionStart;\n\n //if the current cursor position is after the number end position, it is moved to the end of the number, ignoring the prefix or suffix. this behavior can be forced with forceToEndPosition flag\n if (currentCursorPosition > this.getRawValueWithoutSuffixEndPosition() || forceToEndPosition) {\n this.inputManager.setCursorAt(this.getRawValueWithoutSuffixEndPosition());\n //if the current cursor position is before the number start position, it is moved to the start of the number, ignoring the prefix or suffix\n } else if (currentCursorPosition < this.getRawValueWithoutPrefixStartPosition()) {\n this.inputManager.setCursorAt(this.getRawValueWithoutPrefixStartPosition());\n }\n }\n\n getRawValueWithoutSuffixEndPosition(): number {\n return this.rawValue.length - this.options.suffix.length;\n }\n\n getRawValueWithoutPrefixStartPosition(): number {\n return this.value != null && this.value < 0 ? this.options.prefix.length + 1 : this.options.prefix.length;\n }\n\n removeNumber(keyCode: number): void {\n let { decimal, thousands } = this.options;\n let selectionEnd = this.inputSelection.selectionEnd;\n let selectionStart = this.inputSelection.selectionStart;\n\n if (selectionStart > this.rawValue.length - this.options.suffix.length) {\n selectionEnd = this.rawValue.length - this.options.suffix.length;\n selectionStart = this.rawValue.length - this.options.suffix.length;\n }\n\n //there is no selection\n if (selectionEnd == selectionStart) {\n //delete key and the target digit is a number\n if ((keyCode == 46 || keyCode == 63272) && /^\\d+$/.test(this.rawValue.substring(selectionStart, selectionEnd + 1))) {\n selectionEnd = selectionEnd + 1;\n }\n\n //delete key and the target digit is the decimal or thousands divider\n if ((keyCode == 46 || keyCode == 63272) && (this.rawValue.substring(selectionStart, selectionEnd + 1) == decimal || this.rawValue.substring(selectionStart, selectionEnd + 1) == thousands)) {\n selectionEnd = selectionEnd + 2;\n selectionStart = selectionStart + 1;\n }\n\n //backspace key and the target digit is a number\n if (keyCode == 8 && /^\\d+$/.test(this.rawValue.substring(selectionStart - 1, selectionEnd))) {\n selectionStart = selectionStart - 1;\n }\n\n //backspace key and the target digit is the decimal or thousands divider\n if (keyCode == 8 && (this.rawValue.substring(selectionStart - 1, selectionEnd) == decimal || this.rawValue.substring(selectionStart - 1, selectionEnd) == thousands)) {\n selectionStart = selectionStart - 2;\n selectionEnd = selectionEnd - 1;\n }\n }\n\n this.rawValue = this.rawValue.substring(0, selectionStart) + this.rawValue.substring(selectionEnd, this.rawValue.length);\n this.updateFieldValue(selectionStart);\n }\n\n updateFieldValue(selectionStart?: number): void {\n let newRawValue = this.applyMask(false, this.rawValue || \"\");\n selectionStart = selectionStart == undefined ? this.rawValue.length : selectionStart;\n this.inputManager.updateValueAndCursor(newRawValue, this.rawValue.length, selectionStart);\n }\n\n updateOptions(options: any): void {\n let value: number = this.value;\n this.options = options;\n this.value = value;\n }\n\n get canInputMoreNumbers(): boolean {\n return this.inputManager.canInputMoreNumbers;\n }\n\n get inputSelection(): any {\n return this.inputManager.inputSelection;\n }\n\n get rawValue(): string {\n return this.inputManager.rawValue;\n }\n\n set rawValue(value: string) {\n this.inputManager.rawValue = value;\n }\n\n get storedRawValue(): string {\n return this.inputManager.storedRawValue;\n }\n\n get value(): number {\n return this.clearMask(this.rawValue);\n }\n\n set value(value: number) {\n this.rawValue = this.applyMask(true, \"\" + value);\n }\n}","import { InputService } from \"./input.service\";\n\nexport class InputHandler {\n\n private inputService: InputService;\n private onModelChange: Function;\n private onModelTouched: Function;\n private htmlInputElement: HTMLInputElement;\n\n constructor(htmlInputElement: HTMLInputElement, options: any) {\n this.inputService = new InputService(htmlInputElement, options);\n this.htmlInputElement = htmlInputElement;\n }\n\n handleClick(event: any, chromeAndroid: boolean): void {\n let selectionRangeLength = Math.abs(this.inputService.inputSelection.selectionEnd - this.inputService.inputSelection.selectionStart);\n\n //if there is no selection and the value is not null, the cursor position will be fixed. if the browser is chrome on android, the cursor will go to the end of the number.\n if (selectionRangeLength == 0 && !isNaN(this.inputService.value)) {\n this.inputService.fixCursorPosition(chromeAndroid);\n }\n }\n\n handleCut(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n setTimeout(() => {\n this.inputService.updateFieldValue();\n this.setValue(this.inputService.value);\n this.onModelChange(this.inputService.value);\n }, 0);\n }\n\n handleInput(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = this.getNewKeyCode(this.inputService.storedRawValue, this.inputService.rawValue);\n let rawValueLength = this.inputService.rawValue.length;\n let rawValueSelectionEnd = this.inputService.inputSelection.selectionEnd;\n let rawValueWithoutSuffixEndPosition = this.inputService.getRawValueWithoutSuffixEndPosition();\n let storedRawValueLength = this.inputService.storedRawValue.length;\n this.inputService.rawValue = this.inputService.storedRawValue;\n\n if ((rawValueSelectionEnd != rawValueWithoutSuffixEndPosition || Math.abs(rawValueLength - storedRawValueLength) != 1) && storedRawValueLength != 0) {\n this.setCursorPosition(event);\n return;\n }\n\n if (rawValueLength < storedRawValueLength) {\n if (this.inputService.value != 0) {\n this.inputService.removeNumber(8);\n } else {\n this.setValue(null);\n }\n }\n\n if (rawValueLength > storedRawValueLength) {\n switch (keyCode) {\n case 43:\n this.inputService.changeToPositive();\n break;\n case 45:\n this.inputService.changeToNegative();\n break;\n default:\n if (!this.inputService.canInputMoreNumbers || (isNaN(this.inputService.value) && String.fromCharCode(keyCode).match(/\\d/) == null)) {\n return;\n }\n\n this.inputService.addNumber(keyCode);\n }\n }\n\n this.setCursorPosition(event);\n this.onModelChange(this.inputService.value);\n }\n\n handleKeydown(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = event.which || event.charCode || event.keyCode;\n\n if (keyCode == 8 || keyCode == 46 || keyCode == 63272) {\n event.preventDefault();\n let selectionRangeLength = Math.abs(this.inputService.inputSelection.selectionEnd - this.inputService.inputSelection.selectionStart);\n\n if (selectionRangeLength == this.inputService.rawValue.length || this.inputService.value == 0) {\n this.setValue(null);\n this.onModelChange(this.inputService.value);\n }\n\n if (selectionRangeLength == 0 && !isNaN(this.inputService.value)) {\n this.inputService.removeNumber(keyCode);\n this.onModelChange(this.inputService.value);\n }\n\n if ((keyCode === 8 || keyCode === 46) && selectionRangeLength != 0 && !isNaN(this.inputService.value)) {\n this.inputService.removeNumber(keyCode);\n this.onModelChange(this.inputService.value);\n }\n }\n }\n\n handleKeypress(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n let keyCode = event.which || event.charCode || event.keyCode;\n\n if (keyCode == undefined || [9, 13].indexOf(keyCode) != -1 || this.isArrowEndHomeKeyInFirefox(event)) {\n return;\n }\n\n switch (keyCode) {\n case 43:\n this.inputService.changeToPositive();\n break;\n case 45:\n this.inputService.changeToNegative();\n break;\n default:\n if (this.inputService.canInputMoreNumbers && (!isNaN(this.inputService.value) || String.fromCharCode(keyCode).match(/\\d/) != null)) {\n this.inputService.addNumber(keyCode);\n }\n }\n\n event.preventDefault();\n this.onModelChange(this.inputService.value);\n }\n\n handleKeyup(event: any): void {\n this.inputService.fixCursorPosition();\n }\n\n handlePaste(event: any): void {\n if (this.isReadOnly()) {\n return;\n }\n\n setTimeout(() => {\n this.inputService.updateFieldValue();\n this.setValue(this.inputService.value);\n this.onModelChange(this.inputService.value);\n }, 1);\n }\n\n updateOptions(options: any): void {\n this.inputService.updateOptions(options);\n }\n\n getOnModelChange(): Function {\n return this.onModelChange;\n }\n\n setOnModelChange(callbackFunction: Function): void {\n this.onModelChange = callbackFunction;\n }\n\n getOnModelTouched(): Function {\n return this.onModelTouched;\n }\n\n setOnModelTouched(callbackFunction: Function) {\n this.onModelTouched = callbackFunction;\n }\n\n setValue(value: number): void {\n this.inputService.value = value;\n }\n\n private getNewKeyCode(oldString: string, newString: string): number {\n if (oldString.length > newString.length) {\n return null;\n }\n\n for (let x = 0; x < newString.length; x++) {\n if (oldString.length == x || oldString[x] != newString[x]) {\n return newString.charCodeAt(x);\n }\n }\n\n return null;\n }\n\n private isArrowEndHomeKeyInFirefox(event: any) {\n if ([35, 36, 37, 38, 39, 40].indexOf(event.keyCode) != -1 && (event.charCode == undefined || event.charCode == 0)) {\n return true;\n }\n\n return false;\n }\n\n private isReadOnly() {\n return this.htmlInputElement && this.htmlInputElement.readOnly;\n }\n\n private setCursorPosition(event: any): void {\n let rawValueWithoutSuffixEndPosition = this.inputService.getRawValueWithoutSuffixEndPosition();\n\n setTimeout(function () {\n event.target.setSelectionRange(rawValueWithoutSuffixEndPosition, rawValueWithoutSuffixEndPosition);\n }, 0);\n }\n}","import { AfterViewInit, Directive, DoCheck, ElementRef, forwardRef, HostListener, Inject, Input, KeyValueDiffer, KeyValueDiffers, OnInit, Optional } from \"@angular/core\";\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, Validator } from \"@angular/forms\";\nimport { CurrencyMaskConfig, CURRENCY_MASK_CONFIG } from \"./currency-mask.config\";\nimport { InputHandler } from \"./input.handler\";\n\nexport const CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CurrencyMaskDirective),\n multi: true\n};\n\n@Directive({\n selector: \"[currencyMask]\",\n providers: [\n CURRENCYMASKDIRECTIVE_VALUE_ACCESSOR,\n { provide: NG_VALIDATORS, useExisting: CurrencyMaskDirective, multi: true }\n ]\n})\nexport class CurrencyMaskDirective implements AfterViewInit, ControlValueAccessor, DoCheck, OnInit, Validator {\n\n @Input() max: number;\n @Input() min: number;\n @Input() options: any = {};\n\n inputHandler: InputHandler;\n keyValueDiffer: KeyValueDiffer;\n\n optionsTemplate = {\n align: \"right\",\n allowNegative: true,\n decimal: \".\",\n precision: 2,\n prefix: \"$ \",\n suffix: \"\",\n thousands: \",\"\n };\n\n constructor(@Optional() @Inject(CURRENCY_MASK_CONFIG) private currencyMaskConfig: CurrencyMaskConfig, private elementRef: ElementRef, private keyValueDiffers: KeyValueDiffers) {\n if (currencyMaskConfig) {\n this.optionsTemplate = currencyMaskConfig;\n }\n\n this.keyValueDiffer = keyValueDiffers.find({}).create();\n }\n\n ngAfterViewInit() {\n this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;\n }\n\n ngDoCheck() {\n if (this.keyValueDiffer.diff(this.options)) {\n this.elementRef.nativeElement.style.textAlign = this.options.align ? this.options.align : this.optionsTemplate.align;\n this.inputHandler.updateOptions((Object).assign({}, this.optionsTemplate, this.options));\n }\n }\n\n ngOnInit() {\n this.inputHandler = new InputHandler(this.elementRef.nativeElement, (Object).assign({}, this.optionsTemplate, this.options));\n }\n\n @HostListener(\"blur\", [\"$event\"])\n handleBlur(event: any) {\n this.inputHandler.getOnModelTouched().apply(event);\n }\n\n @HostListener(\"click\", [\"$event\"])\n handleClick(event: any) {\n this.inputHandler.handleClick(event, this.isChromeAndroid());\n }\n\n @HostListener(\"cut\", [\"$event\"])\n handleCut(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleCut(event);\n }\n }\n\n @HostListener(\"input\", [\"$event\"])\n handleInput(event: any) {\n if (this.isChromeAndroid()) {\n this.inputHandler.handleInput(event);\n }\n }\n\n @HostListener(\"keydown\", [\"$event\"])\n handleKeydown(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeydown(event);\n }\n }\n\n @HostListener(\"keypress\", [\"$event\"])\n handleKeypress(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeypress(event);\n }\n }\n\n @HostListener(\"keyup\", [\"$event\"])\n handleKeyup(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handleKeyup(event);\n }\n }\n\n @HostListener(\"paste\", [\"$event\"])\n handlePaste(event: any) {\n if (!this.isChromeAndroid()) {\n this.inputHandler.handlePaste(event);\n }\n }\n\n isChromeAndroid(): boolean {\n return /chrome/i.test(navigator.userAgent) && /android/i.test(navigator.userAgent);\n }\n\n registerOnChange(callbackFunction: Function): void {\n this.inputHandler.setOnModelChange(callbackFunction);\n }\n\n registerOnTouched(callbackFunction: Function): void {\n this.inputHandler.setOnModelTouched(callbackFunction);\n }\n\n setDisabledState(value: boolean): void {\n this.elementRef.nativeElement.disabled = value;\n }\n\n validate(abstractControl: AbstractControl): { [key: string]: any; } {\n let result: any = {};\n\n if (abstractControl.value > this.max) {\n result.max = true;\n }\n\n if (abstractControl.value < this.min) {\n result.min = true;\n }\n\n return result != {} ? result : null;\n }\n\n writeValue(value: number): void {\n this.inputHandler.setValue(value);\n }\n}","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { CurrencyMaskDirective } from \"./currency-mask.directive\";\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule\n ],\n declarations: [\n CurrencyMaskDirective\n ],\n exports: [\n CurrencyMaskDirective\n ]\n})\nexport class CurrencyMaskModule {\n}\n","/*\n * Public API Surface of ng2-currency-mask\n */\n\nexport * from './lib/currency-mask.config';\nexport * from './lib/currency-mask.directive';\nexport * from './lib/currency-mask.module';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;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;YACL,YAAY;YACZ,WAAW;SACd;2FAQQ,kBAAkB;kBAZ9B,QAAQ;mBAAC;oBACN,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;qBACd;oBACD,YAAY,EAAE;wBACV,qBAAqB;qBACxB;oBACD,OAAO,EAAE;wBACL,qBAAqB;qBACxB;iBACJ;;;AChBD;;;;ACAA;;;;;;"} \ No newline at end of file diff --git a/dist/ng2-currency-mask/package.json b/dist/ng2-currency-mask/package.json index 5697577..fc80151 100644 --- a/dist/ng2-currency-mask/package.json +++ b/dist/ng2-currency-mask/package.json @@ -1,6 +1,6 @@ { "name": "ng2-currency-mask", - "version": "12.0.2", + "version": "12.0.3", "description": "A very simple currency mask directive that allows using a number attribute with the ngModel.", "repository": { "type": "git", diff --git a/package-lock.json b/package-lock.json index 458f675..781677f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ng2-currency-mask", - "version": "12.0.2", + "version": "12.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 11ae27f..074dc52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng2-currency-mask", - "version": "12.0.2", + "version": "12.0.3", "description": "A very simple currency mask directive that allows using a number attribute with the ngModel.", "repository": { "type": "git", diff --git a/projects/currency-mask/ng-package.json b/projects/ng2-currency-mask/ng-package.json similarity index 100% rename from projects/currency-mask/ng-package.json rename to projects/ng2-currency-mask/ng-package.json diff --git a/projects/currency-mask/package.json b/projects/ng2-currency-mask/package.json similarity index 96% rename from projects/currency-mask/package.json rename to projects/ng2-currency-mask/package.json index 7a08047..a0a5278 100644 --- a/projects/currency-mask/package.json +++ b/projects/ng2-currency-mask/package.json @@ -1,6 +1,6 @@ { "name": "ng2-currency-mask", - "version": "12.0.2", + "version": "12.0.3", "description": "A very simple currency mask directive that allows using a number attribute with the ngModel.", "repository": { "type": "git", diff --git a/projects/currency-mask/src/lib/currency-mask.config.ts b/projects/ng2-currency-mask/src/lib/currency-mask.config.ts similarity index 100% rename from projects/currency-mask/src/lib/currency-mask.config.ts rename to projects/ng2-currency-mask/src/lib/currency-mask.config.ts diff --git a/projects/currency-mask/src/lib/currency-mask.directive.ts b/projects/ng2-currency-mask/src/lib/currency-mask.directive.ts similarity index 100% rename from projects/currency-mask/src/lib/currency-mask.directive.ts rename to projects/ng2-currency-mask/src/lib/currency-mask.directive.ts diff --git a/projects/currency-mask/src/lib/currency-mask.module.ts b/projects/ng2-currency-mask/src/lib/currency-mask.module.ts similarity index 100% rename from projects/currency-mask/src/lib/currency-mask.module.ts rename to projects/ng2-currency-mask/src/lib/currency-mask.module.ts diff --git a/projects/currency-mask/src/lib/input.handler.ts b/projects/ng2-currency-mask/src/lib/input.handler.ts similarity index 100% rename from projects/currency-mask/src/lib/input.handler.ts rename to projects/ng2-currency-mask/src/lib/input.handler.ts diff --git a/projects/currency-mask/src/lib/input.manager.ts b/projects/ng2-currency-mask/src/lib/input.manager.ts similarity index 100% rename from projects/currency-mask/src/lib/input.manager.ts rename to projects/ng2-currency-mask/src/lib/input.manager.ts diff --git a/projects/currency-mask/src/lib/input.service.ts b/projects/ng2-currency-mask/src/lib/input.service.ts similarity index 100% rename from projects/currency-mask/src/lib/input.service.ts rename to projects/ng2-currency-mask/src/lib/input.service.ts diff --git a/projects/currency-mask/src/public-api.ts b/projects/ng2-currency-mask/src/public-api.ts similarity index 76% rename from projects/currency-mask/src/public-api.ts rename to projects/ng2-currency-mask/src/public-api.ts index 85097a4..6f1b4ec 100644 --- a/projects/currency-mask/src/public-api.ts +++ b/projects/ng2-currency-mask/src/public-api.ts @@ -1,7 +1,8 @@ /* - * Public API Surface of currency-mask + * Public API Surface of ng2-currency-mask */ export * from './lib/currency-mask.config'; export * from './lib/currency-mask.directive'; export * from './lib/currency-mask.module'; + diff --git a/projects/currency-mask/tsconfig.lib.json b/projects/ng2-currency-mask/tsconfig.lib.json similarity index 100% rename from projects/currency-mask/tsconfig.lib.json rename to projects/ng2-currency-mask/tsconfig.lib.json diff --git a/projects/currency-mask/tsconfig.lib.prod.json b/projects/ng2-currency-mask/tsconfig.lib.prod.json similarity index 100% rename from projects/currency-mask/tsconfig.lib.prod.json rename to projects/ng2-currency-mask/tsconfig.lib.prod.json