@experteam-mx/ngx-input-number 0.0.0-watch
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.
- package/README.md +24 -0
- package/esm2020/experteam-mx-ngx-input-number.mjs +5 -0
- package/esm2020/lib/ngx-input-number.component.mjs +76 -0
- package/esm2020/lib/ngx-input-number.module.mjs +33 -0
- package/esm2020/lib/ngx-input-number.service.mjs +14 -0
- package/esm2020/public-api.mjs +7 -0
- package/experteam-mx-ngx-input-number.d.ts +5 -0
- package/fesm2015/experteam-mx-ngx-input-number.mjs +128 -0
- package/fesm2015/experteam-mx-ngx-input-number.mjs.map +1 -0
- package/fesm2020/experteam-mx-ngx-input-number.mjs +128 -0
- package/fesm2020/experteam-mx-ngx-input-number.mjs.map +1 -0
- package/lib/ngx-input-number.component.d.ts +20 -0
- package/lib/ngx-input-number.module.d.ts +9 -0
- package/lib/ngx-input-number.service.d.ts +6 -0
- package/package.json +34 -0
- package/public-api.d.ts +3 -0
|
@@ -0,0 +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,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;KA5BA;IA8BjB,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,GAAG,CAAC,EAAE;gBACrB,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;aACtD;YACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAI,CAAC,WAAW,IAAI,GAAG,CAAA;aACxB;SACF;QACD,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE;YAC1B,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;SAC9B;KACF;;oHA3DU,uBAAuB;wGAAvB,uBAAuB,gTCTpC,4SAUA;2FDDa,uBAAuB;kBALnC,SAAS;+BACE,kBAAkB;0EAQD,YAAY;sBAAtC,SAAS;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;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnInit, ElementRef } from '@angular/core';
|
|
2
|
+
import { FormControl } from "@angular/forms";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgxInputNumberComponent implements OnInit {
|
|
5
|
+
constructor();
|
|
6
|
+
inputElement: ElementRef;
|
|
7
|
+
control: FormControl;
|
|
8
|
+
negative: any;
|
|
9
|
+
autofocus: any;
|
|
10
|
+
decimals: any;
|
|
11
|
+
max: any;
|
|
12
|
+
idForLabel: any;
|
|
13
|
+
inputMask: import("@ngneat/input-mask").InputmaskOptions<unknown>;
|
|
14
|
+
placeholder: string;
|
|
15
|
+
ngAfterViewInit(): void;
|
|
16
|
+
ngAfterContentInit(): void;
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputNumberComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxInputNumberComponent, "app-input-number", never, { "control": "control"; "negative": "negative"; "autofocus": "autofocus"; "decimals": "decimals"; "max": "max"; "idForLabel": "idForLabel"; }, {}, never, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./ngx-input-number.component";
|
|
3
|
+
import * as i2 from "@ngneat/input-mask";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
export declare class NgxInputNumberModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputNumberModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxInputNumberModule, [typeof i1.NgxInputNumberComponent], [typeof i2.InputMaskModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule], [typeof i1.NgxInputNumberComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgxInputNumberModule>;
|
|
9
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@experteam-mx/ngx-input-number",
|
|
3
|
+
"version": "0.0.0-watch+1644508569847",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"peerDependencies": {},
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@angular/common": "^12.0.2",
|
|
8
|
+
"@angular/core": "^12.0.2",
|
|
9
|
+
"@ngneat/input-mask": "^5.1.0",
|
|
10
|
+
"bootstrap": "^5.1.3",
|
|
11
|
+
"inputmask": "^5.0.7",
|
|
12
|
+
"tslib": "^2.1.0"
|
|
13
|
+
},
|
|
14
|
+
"module": "fesm2015/experteam-mx-ngx-input-number.mjs",
|
|
15
|
+
"es2020": "fesm2020/experteam-mx-ngx-input-number.mjs",
|
|
16
|
+
"esm2020": "esm2020/experteam-mx-ngx-input-number.mjs",
|
|
17
|
+
"fesm2020": "fesm2020/experteam-mx-ngx-input-number.mjs",
|
|
18
|
+
"fesm2015": "fesm2015/experteam-mx-ngx-input-number.mjs",
|
|
19
|
+
"typings": "experteam-mx-ngx-input-number.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
"./package.json": {
|
|
22
|
+
"default": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./experteam-mx-ngx-input-number.d.ts",
|
|
26
|
+
"esm2020": "./esm2020/experteam-mx-ngx-input-number.mjs",
|
|
27
|
+
"es2020": "./fesm2020/experteam-mx-ngx-input-number.mjs",
|
|
28
|
+
"es2015": "./fesm2015/experteam-mx-ngx-input-number.mjs",
|
|
29
|
+
"node": "./fesm2015/experteam-mx-ngx-input-number.mjs",
|
|
30
|
+
"default": "./fesm2020/experteam-mx-ngx-input-number.mjs"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": false
|
|
34
|
+
}
|
package/public-api.d.ts
ADDED