@experteam-mx/ngx-input-number 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"experteam-mx-ngx-input-number.mjs","sources":["../../../projects/ngx-input-number/src/lib/ngx-input-number.service.ts","../../../projects/ngx-input-number/src/lib/ngx-input-number.component.ts","../../../projects/ngx-input-number/src/lib/ngx-input-number.component.html","../../../projects/ngx-input-number/src/lib/ngx-input-number.module.ts","../../../projects/ngx-input-number/src/public-api.ts","../../../projects/ngx-input-number/src/experteam-mx-ngx-input-number.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxInputNumberService {\n\n constructor() { }\n}\n","import { Component, OnInit, Input, AfterViewInit, AfterContentInit, ElementRef, ViewChild } from '@angular/core';\nimport { FormBuilder, Validators, FormArray, FormGroup, FormControl } from \"@angular/forms\";\nimport { createMask } from '@ngneat/input-mask';\n\n@Component({\n selector: 'app-input-number',\n templateUrl: './ngx-input-number.component.html',\n styleUrls: ['./ngx-input-number.component.sass']\n})\nexport class NgxInputNumberComponent implements OnInit {\n\n constructor() { }\n\n @ViewChild('inputElement') inputElement!: ElementRef;\n\n @Input() control!: FormControl\n @Input() negative!: any\n @Input() autofocus: any = false\n @Input() decimals: any\n @Input() max: any\n @Input() idForLabel: any = \"\"\n\n inputMask = createMask({\n allowMinus: true,\n alias: 'numeric',\n numericInput: false,\n inputType: \"number\",\n inputmode: \"numeric\",\n groupSeparator: ',',\n radixPoint : '.',\n digits: 2,\n digitsOptional: false,\n placeholder: '0',\n unmaskAsNumber: true,\n autoUnmask: true,\n showMaskOnFocus: false,\n showMaskOnHover: false,\n })\n\n placeholder = \"0\"\n\n ngAfterViewInit(): void {\n if( this.autofocus ){\n setTimeout(()=>{\n this.inputElement.nativeElement.focus();\n })\n }\n }\n\n ngAfterContentInit(): void {\n }\n\n ngOnInit(): void {\n if( this.negative === false ){\n this.inputMask.allowMinus = false\n }\n if( this.decimals !== undefined ){\n this.inputMask.digits = this.decimals\n if( this.decimals > 0 ){\n this.placeholder += String(this.inputMask.radixPoint)\n }\n for( let x = 0; x < this.decimals; x++ ){\n this.placeholder += \"0\"\n }\n }\n if( this.max !== undefined ){\n this.inputMask.max = this.max\n }\n }\n\n}\n","<input\r\n #inputElement\r\n type=\"text\"\r\n class=\"form-control form-control-sm\"\r\n [class.is-invalid]=\"control.touched && control.invalid\"\r\n [formControl]=\"control\"\r\n [inputMask]=\"inputMask\"\r\n [placeholder]=\"placeholder\"\r\n [id]=\"idForLabel\"\r\n>\r\n","import { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { NgxInputNumberComponent } from './ngx-input-number.component';\nimport { InputMaskModule } from '@ngneat/input-mask';\n\n\n\n@NgModule({\n declarations: [\n NgxInputNumberComponent\n ],\n imports: [\n InputMaskModule,\n FormsModule,\n ReactiveFormsModule,\n ],\n exports: [\n NgxInputNumberComponent\n ]\n})\nexport class NgxInputNumberModule { }\n","/*\n * Public API Surface of ngx-input-number\n */\n\nexport * from './lib/ngx-input-number.service';\nexport * from './lib/ngx-input-number.component';\nexport * from './lib/ngx-input-number.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAKa,qBAAqB;IAEhC,iBAAiB;;kHAFN,qBAAqB;sHAArB,qBAAqB,cAFpB,MAAM;2FAEP,qBAAqB;kBAHjC,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;MCKY,uBAAuB;IAElC;QAMS,cAAS,GAAQ,KAAK,CAAA;QAGtB,eAAU,GAAQ,EAAE,CAAA;QAE7B,cAAS,GAAG,UAAU,CAAC;YACrB,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,SAAS;YAChB,YAAY,EAAE,KAAK;YACnB,SAAS,EAAE,QAAQ;YACnB,SAAS,EA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;uBAAC,cAAc;gBAEhB,OAAO;sBAAf,KAAK;gBACG,QAAQ;sBAAhB,KAAK;gBACG,SAAS;sBAAjB,KAAK;gBACG,QAAQ;sBAAhB,KAAK;gBACG,GAAG;sBAAX,KAAK;gBACG,UAAU;sBAAlB,KAAK;;;MECK,oBAAoB;;iHAApB,oBAAoB;kHAApB,oBAAoB,iBAX7B,uBAAuB,aAGvB,eAAe;QACf,WAAW;QACX,mBAAmB,aAGnB,uBAAuB;kHAGd,oBAAoB,YATtB;YACP,eAAe;YACf,WAAW;YACX,mBAAmB;SACpB;2FAKU,oBAAoB;kBAbhC,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,uBAAuB;qBACxB;oBACD,OAAO,EAAE;wBACP,eAAe;wBACf,WAAW;wBACX,mBAAmB;qBACpB;oBACD,OAAO,EAAE;wBACP,uBAAuB;qBACxB;iBACF;;;ACpBD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"experteam-mx-ngx-input-number.mjs","sources":["../../../projects/ngx-input-number/src/lib/ngx-input-number.service.ts","../../../projects/ngx-input-number/src/lib/ngx-input-number.component.ts","../../../projects/ngx-input-number/src/lib/ngx-input-number.component.html","../../../projects/ngx-input-number/src/lib/ngx-input-number.module.ts","../../../projects/ngx-input-number/src/public-api.ts","../../../projects/ngx-input-number/src/experteam-mx-ngx-input-number.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxInputNumberService {\n\n constructor() { }\n}\n","import { Component, OnInit, Input, AfterViewInit, AfterContentInit, ElementRef, ViewChild } from '@angular/core';\nimport { FormBuilder, Validators, FormArray, FormGroup, FormControl } from \"@angular/forms\";\nimport { createMask } from '@ngneat/input-mask';\n\n@Component({\n selector: 'app-input-number',\n templateUrl: './ngx-input-number.component.html',\n styleUrls: ['./ngx-input-number.component.sass']\n})\nexport class NgxInputNumberComponent implements OnInit {\n\n constructor() { }\n\n @ViewChild('inputElement') inputElement!: ElementRef;\n\n @Input() control!: FormControl\n @Input() negative!: any\n @Input() autofocus: any = false\n @Input() decimals: any\n @Input() max: any\n @Input() idForLabel: any = \"\"\n @Input() addClass: any = \"form-control-sm\"\n\n inputMask = createMask({\n allowMinus: true,\n alias: 'numeric',\n numericInput: false,\n inputType: \"number\",\n inputmode: \"numeric\",\n groupSeparator: ',',\n radixPoint : '.',\n digits: 2,\n digitsOptional: false,\n placeholder: '0',\n unmaskAsNumber: true,\n autoUnmask: true,\n showMaskOnFocus: false,\n showMaskOnHover: false,\n })\n\n placeholder = \"0\"\n\n ngAfterViewInit(): void {\n if( this.autofocus ){\n setTimeout(()=>{\n this.inputElement.nativeElement.focus();\n })\n }\n }\n\n ngAfterContentInit(): void {\n }\n\n ngOnInit(): void {\n if( this.negative === false ){\n this.inputMask.allowMinus = false\n }\n if( this.decimals !== undefined ){\n this.inputMask.digits = this.decimals\n if( this.decimals > 0 ){\n this.placeholder += String(this.inputMask.radixPoint)\n }\n for( let x = 0; x < this.decimals; x++ ){\n this.placeholder += \"0\"\n }\n }\n if( this.max !== undefined ){\n this.inputMask.max = this.max\n }\n }\n\n}\n","<input\r\n #inputElement\r\n type=\"text\"\r\n class=\"form-control {{ addClass }}\"\r\n [class.is-invalid]=\"control.touched && control.invalid\"\r\n [formControl]=\"control\"\r\n [inputMask]=\"inputMask\"\r\n [placeholder]=\"placeholder\"\r\n [id]=\"idForLabel\"\r\n>\r\n","import { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { NgxInputNumberComponent } from './ngx-input-number.component';\nimport { InputMaskModule } from '@ngneat/input-mask';\n\n\n\n@NgModule({\n declarations: [\n NgxInputNumberComponent\n ],\n imports: [\n InputMaskModule,\n FormsModule,\n ReactiveFormsModule,\n ],\n exports: [\n NgxInputNumberComponent\n ]\n})\nexport class NgxInputNumberModule { }\n","/*\n * Public API Surface of ngx-input-number\n */\n\nexport * from './lib/ngx-input-number.service';\nexport * from './lib/ngx-input-number.component';\nexport * from './lib/ngx-input-number.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAKa,qBAAqB;IAEhC,iBAAiB;;kHAFN,qBAAqB;sHAArB,qBAAqB,cAFpB,MAAM;2FAEP,qBAAqB;kBAHjC,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;MCKY,uBAAuB;IAElC;QAMS,cAAS,GAAQ,KAAK,CAAA;QAGtB,eAAU,GAAQ,EAAE,CAAA;QACpB,aAAQ,GAAQ,iBAAiB,CAAA;QAE1C,cAAS,GAAG,UAAU,CAAC;YACrB,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,SAAS;YAChB,YAAY,EAAE,KAAK;YACnB,SAAS,EAAE,QAAQ;YACnB,SAAS,EAAE,SAAS;YACpB,cAAc,EAAE,GAAG;YACnB,UAAU,EAAG,GAAG;YAChB,MAAM,EAAE,CAAC;YACT,cAAc,EAAE,KAAK;YACrB,WAAW,EAAE,GAAG;YAChB,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,KAAK;YACtB,eAAe,EAAE,KAAK;SACvB,CAAC,CAAA;QAEF,gBAAW,GAAG,GAAG,CAAA;KA7BA;IA+BjB,eAAe;QACb,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,UAAU,CAAC;gBACT,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;aACzC,CAAC,CAAA;SACH;KACF;IAED,kBAAkB;KACjB;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,EAAE;YAC3B,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,KAAK,CAAA;SAClC;QACD,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC/B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAA;YACrC,IAAI,IAAI,CAAC,QAAQ,G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