@experteam-mx/ngx-input-number 1.6.4 → 1.6.5

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.
Files changed (37) hide show
  1. package/.browserslistrc +16 -0
  2. package/karma.conf.js +44 -0
  3. package/ng-package.json +11 -0
  4. package/package.json +5 -22
  5. package/{lib/di.d.ts → src/lib/di.ts} +2 -1
  6. package/src/lib/ngx-input-number.component.html +14 -0
  7. package/src/lib/ngx-input-number.component.sass +11 -0
  8. package/src/lib/ngx-input-number.component.spec.ts +25 -0
  9. package/src/lib/ngx-input-number.component.ts +160 -0
  10. package/src/lib/ngx-input-number.module.ts +38 -0
  11. package/src/lib/ngx-input-number.service.spec.ts +16 -0
  12. package/src/lib/ngx-input-number.service.ts +59 -0
  13. package/src/lib/types.ts +14 -0
  14. package/src/lib/typesProvider.ts +26 -0
  15. package/{public-api.d.ts → src/public-api.ts} +9 -5
  16. package/src/test.ts +27 -0
  17. package/tsconfig.lib.json +27 -0
  18. package/tsconfig.lib.prod.json +10 -0
  19. package/tsconfig.spec.json +17 -0
  20. package/esm2020/experteam-mx-ngx-input-number.mjs +0 -5
  21. package/esm2020/lib/di.mjs +0 -3
  22. package/esm2020/lib/ngx-input-number.component.mjs +0 -146
  23. package/esm2020/lib/ngx-input-number.module.mjs +0 -49
  24. package/esm2020/lib/ngx-input-number.service.mjs +0 -63
  25. package/esm2020/lib/types.mjs +0 -5
  26. package/esm2020/lib/typesProvider.mjs +0 -30
  27. package/esm2020/public-api.mjs +0 -9
  28. package/experteam-mx-ngx-input-number.d.ts +0 -5
  29. package/fesm2015/experteam-mx-ngx-input-number.mjs +0 -295
  30. package/fesm2015/experteam-mx-ngx-input-number.mjs.map +0 -1
  31. package/fesm2020/experteam-mx-ngx-input-number.mjs +0 -293
  32. package/fesm2020/experteam-mx-ngx-input-number.mjs.map +0 -1
  33. package/lib/ngx-input-number.component.d.ts +0 -35
  34. package/lib/ngx-input-number.module.d.ts +0 -13
  35. package/lib/ngx-input-number.service.d.ts +0 -18
  36. package/lib/types.d.ts +0 -12
  37. package/lib/typesProvider.d.ts +0 -19
@@ -1 +0,0 @@
1
- {"version":3,"file":"experteam-mx-ngx-input-number.mjs","sources":["../../../projects/ngx-input-number/src/lib/typesProvider.ts","../../../projects/ngx-input-number/src/lib/di.ts","../../../projects/ngx-input-number/src/lib/types.ts","../../../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, Provider } from '@angular/core';\r\n\r\nexport class inputConfigs {\r\n groupSeparator?: string;\r\n radixPoint?: string;\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport abstract class typesProvider {\r\n abstract get config(): inputConfigs;\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class defaultTypesProvider extends typesProvider {\r\n get config(): inputConfigs {\r\n // return default config\r\n return {\r\n groupSeparator: \",\",\r\n radixPoint: \".\"\r\n };\r\n }\r\n}\r\n\r\nexport class inputConfigsHelp {\r\n config?: Provider;\r\n}","import { InjectionToken } from '@angular/core';\r\nimport { inputConfigs } from './types';\r\n\r\nexport const INPUT_CONFIG_TOKEN = new InjectionToken<inputConfigs>('INPUT_CONFIG');","import { Provider } from '@angular/core';\r\n\r\nexport class inputConfigs {\r\n groupSeparator?: string;\r\n radixPoint?: string;\r\n lblKeyInvalid?: string;\r\n max?: number;\r\n decimals?: number;\r\n negative?: boolean;\r\n}\r\n\r\nexport class inputConfigsHelp {\r\n config?: Provider;\r\n}","import { Injectable, Optional, Inject, EventEmitter, Output } from '@angular/core';\nimport { INPUT_CONFIG_TOKEN } from './di';\nimport { inputConfigs } from './types';\nimport { BehaviorSubject, Subject } from \"rxjs\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxInputNumberService {\n\n changeEvent = new BehaviorSubject<boolean>(false);\n groupSeparator = ','\n radixPoint = '.'\n lblKeyInvalid = 'Please enter a valid amount'\n negative: any = true\n max: any = undefined\n decimals = 2\n\n constructor(\n @Optional() @Inject(INPUT_CONFIG_TOKEN)\n private readonly config: inputConfigs | null,\n ) {\n if( config != null ){\n this.groupSeparator = config.groupSeparator!\n this.radixPoint = config.radixPoint!\n this.lblKeyInvalid = config.lblKeyInvalid!\n this.negative = config.negative!\n this.max = config.max!\n this.decimals = config.decimals!\n }\n }\n\n onChangeParams( config: inputConfigs ){\n if( config.groupSeparator ){\n this.groupSeparator = config.groupSeparator\n }\n if( config.radixPoint ){\n this.radixPoint = config.radixPoint\n }\n if( config.lblKeyInvalid ){\n this.lblKeyInvalid = config.lblKeyInvalid\n }\n if( config.negative !== undefined ){\n this.negative = config.negative\n }\n if( config.max ){\n this.max = config.max!\n }\n if( config.decimals ){\n this.decimals = config.decimals\n }\n\n this.changeEvent.next( true )\n }\n\n getChangeEvent(){\n return this.changeEvent\n }\n}\n","import { Component, OnInit, Input, OnChanges, AfterViewInit, AfterContentInit, ElementRef, ViewChild, SimpleChanges, ChangeDetectorRef } from '@angular/core';\nimport { FormBuilder, Validators, FormArray, FormGroup, FormControl } from \"@angular/forms\";\nimport { createMask, InputmaskOptions } from '@ngneat/input-mask';\n\nimport { inputConfigs, typesProvider } from './typesProvider';\nimport { NgxInputNumberService } from './ngx-input-number.service';\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, OnChanges {\n\n constructor(\n private _ChangeDetectorRef: ChangeDetectorRef,\n private readonly _typesProvider: typesProvider,\n private _NgxInputNumberService: NgxInputNumberService,\n ) { }\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 @Input() groupSeparator: any\n @Input() radixPoint: any\n @Input() lblKeyInvalid: any\n lblKeyInvalidRender: any\n\n inputMask: InputmaskOptions<any> = {}\n\n placeholder = \"0\"\n\n loading = false\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 render(){\n this._ChangeDetectorRef.detectChanges()\n\n this.lblKeyInvalidRender = this._NgxInputNumberService.lblKeyInvalid\n\n this.inputMask = createMask({\n allowMinus: this._NgxInputNumberService.negative,\n alias: 'numeric',\n numericInput: false,\n inputType: \"number\",\n inputmode: \"numeric\",\n groupSeparator: this._NgxInputNumberService.groupSeparator,\n radixPoint : this._NgxInputNumberService.radixPoint,\n max : this._NgxInputNumberService.max,\n digits: this._NgxInputNumberService.decimals,\n digitsOptional: false,\n placeholder: '0',\n unmaskAsNumber: true,\n autoUnmask: true,\n showMaskOnFocus: false,\n showMaskOnHover: false,\n onBeforePaste: ( pastedValue: any, opts ) =>{\n return pastedValue.replaceAll( opts.groupSeparator!, \"\" )\n },\n onKeyValidation: ( key, result ) => {\n if( !result ){\n this.inputElement.nativeElement.classList.add(\"key-invalid\")\n setTimeout(\n ()=>{\n this.inputElement.nativeElement.classList.remove(\"key-invalid\")\n },\n 1000\n )\n }\n }\n })\n \n if( this.negative !== undefined ){\n this.inputMask.allowMinus = this.negative\n }\n if( this.max !== undefined ){\n this.inputMask.max = this.max\n }\n \n if( this.groupSeparator !== undefined ){\n this.inputMask.groupSeparator = this.groupSeparator\n }\n if( this.radixPoint !== undefined ){\n this.inputMask.radixPoint = this.radixPoint\n }\n if( this.lblKeyInvalid !== undefined ){\n this.lblKeyInvalidRender = this.lblKeyInvalid\n }\n\n if( this.decimals !== undefined ){\n this.inputMask.digits = this.decimals\n }\n\n\n\n if( this.inputMask.digits! > 0 ){\n this.placeholder = '0' + String(this.inputMask.radixPoint)\n }\n for( let x = 0; x < this.inputMask.digits!; x++ ){\n this.placeholder += \"0\"\n }\n\n this.loading = false\n\n }\n\n onBlur(value: any){\n // if( value != '' && Number( this.inputMask.digits ) > 0 ){\n // let valueBlurSplit = String(value).split(\".\")\n // let valueString = \"\"\n // if( valueBlurSplit.length == 1 ){\n // valueString = valueBlurSplit[0] + \".\" + String(\"\").padEnd(Number(this.inputMask.digits), \"0\")\n // }else{\n // valueString = valueBlurSplit[0] + \".\" + String(valueBlurSplit[1]).padEnd(Number(this.inputMask.digits), \"0\")\n // }\n // this.control.setValue( parseFloat( valueString ) )\n // }\n this.control.setValue( value )\n }\n\n ngOnInit(): void {\n this._NgxInputNumberService.getChangeEvent().subscribe(\n ( configs )=>{\n if( configs ){\n this.loading = true\n\n setTimeout(() => {\n this.render()\n }, 0);\n }\n }\n )\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.loading = true\n\n setTimeout(() => {\n this.render()\n }, 0);\n }\n\n}\n","<div class=\"position-relative\">\r\n <input\r\n *ngIf=\"!loading\"\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 [id]=\"idForLabel\"\r\n >\r\n <label class=\"lbl-key-invalid position-absolute top-100 end-0 p-2 d-none\" [innerHTML]=\"lblKeyInvalidRender\"></label>\r\n</div>\r\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common'; \nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { NgxInputNumberComponent } from './ngx-input-number.component';\nimport { InputMaskModule } from '@ngneat/input-mask';\n\nimport { inputConfigsHelp, typesProvider, defaultTypesProvider } from './typesProvider';\n\n@NgModule({\n declarations: [\n NgxInputNumberComponent\n ],\n imports: [\n CommonModule,\n InputMaskModule.forRoot({ inputSelector: 'input', isAsync: true }),\n FormsModule,\n ReactiveFormsModule,\n ],\n exports: [\n NgxInputNumberComponent\n ],\n providers:[\n ]\n})\nexport class NgxInputNumberModule {\n static forRoot(config: inputConfigsHelp = {} ): ModuleWithProviders<NgxInputNumberModule> {\n return {\n ngModule: NgxInputNumberModule,\n providers: [\n config.config || {\n provide: typesProvider,\n useClass: defaultTypesProvider\n }\n ],\n }\n }\n}\n","/*\n * Public API Surface of ngx-input-number\n */\n\nexport * from './lib/typesProvider';\nexport * from './lib/ngx-input-number.service';\nexport * from './lib/ngx-input-number.component';\nexport * from './lib/ngx-input-number.module';\nexport * from '@ngneat/input-mask';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["inputConfigs","inputConfigsHelp"],"mappings":";;;;;;;;;;;MAEaA,cAAY;CAGxB;MAGqB,aAAa;;0GAAb,aAAa;8GAAb,aAAa,cADT,MAAM;2FACV,aAAa;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;MAMrB,oBAAqB,SAAQ,aAAa;IACrD,IAAI,MAAM;;QAER,OAAO;YACH,cAAc,EAAE,GAAG;YACnB,UAAU,EAAE,GAAG;SAClB,CAAC;KACH;;iHAPU,oBAAoB;qHAApB,oBAAoB,cADP,MAAM;2FACnB,oBAAoB;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;MAWrBC,kBAAgB;;;ACpBtB,MAAM,kBAAkB,GAAG,IAAI,cAAc,CAAe,cAAc,CAAC;;MCDrE,YAAY;CAOxB;MAEY,gBAAgB;;;MCHhB,qBAAqB;IAUhC,YAEmB,MAA2B;QAA3B,WAAM,GAAN,MAAM,CAAqB;QAV9C,gBAAW,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;QAClD,mBAAc,GAAG,GAAG,CAAA;QACpB,eAAU,GAAG,GAAG,CAAA;QAChB,kBAAa,GAAG,6BAA6B,CAAA;QAC7C,aAAQ,GAAQ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sBAAlB,KAAK;gBACG,QAAQ;sBAAhB,KAAK;gBACG,cAAc;sBAAtB,KAAK;gBACG,UAAU;sBAAlB,KAAK;gBACG,aAAa;sBAArB,KAAK;;;MENK,oBAAoB;IAC/B,OAAO,OAAO,CAAC,SAA2B,EAAE;QAC1C,OAAO;YACL,QAAQ,EAAE,oBAAoB;YAC9B,SAAS,EAAE;gBACT,MAAM,CAAC,MAAM,IAAI;oBACf,OAAO,EAAE,aAAa;oBACtB,QAAQ,EAAE,oBAAoB;iBAC/B;aACF;SACF,CAAA;KACF;;iHAXU,oBAAoB;kHAApB,oBAAoB,iBAd7B,uBAAuB,aAGvB,YAAY,sBAEZ,WAAW;QACX,mBAAmB,aAGnB,uBAAuB;kHAKd,oBAAoB,aAHrB,EACT,YAVQ;YACP,YAAY;YACZ,eAAe,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YAClE,WAAW;YACX,mBAAmB;SACpB;2FAOU,oBAAoB;kBAhBhC,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,uBAAuB;qBACxB;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wBAClE,WAAW;wBACX,mBAAmB;qBACpB;oBACD,OAAO,EAAE;wBACP,uBAAuB;qBACxB;oBACD,SAAS,EAAC,EACT;iBACF;;;ACxBD;;;;ACAA;;;;;;"}
@@ -1,35 +0,0 @@
1
- import { OnInit, OnChanges, ElementRef, SimpleChanges, ChangeDetectorRef } from '@angular/core';
2
- import { FormControl } from "@angular/forms";
3
- import { InputmaskOptions } from '@ngneat/input-mask';
4
- import { typesProvider } from './typesProvider';
5
- import { NgxInputNumberService } from './ngx-input-number.service';
6
- import * as i0 from "@angular/core";
7
- export declare class NgxInputNumberComponent implements OnInit, OnChanges {
8
- private _ChangeDetectorRef;
9
- private readonly _typesProvider;
10
- private _NgxInputNumberService;
11
- constructor(_ChangeDetectorRef: ChangeDetectorRef, _typesProvider: typesProvider, _NgxInputNumberService: NgxInputNumberService);
12
- inputElement: ElementRef;
13
- control: FormControl;
14
- negative: any;
15
- autofocus: any;
16
- decimals: any;
17
- max: any;
18
- idForLabel: any;
19
- addClass: any;
20
- groupSeparator: any;
21
- radixPoint: any;
22
- lblKeyInvalid: any;
23
- lblKeyInvalidRender: any;
24
- inputMask: InputmaskOptions<any>;
25
- placeholder: string;
26
- loading: boolean;
27
- ngAfterViewInit(): void;
28
- ngAfterContentInit(): void;
29
- render(): void;
30
- onBlur(value: any): void;
31
- ngOnInit(): void;
32
- ngOnChanges(changes: SimpleChanges): void;
33
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputNumberComponent, never>;
34
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxInputNumberComponent, "app-input-number", never, { "control": "control"; "negative": "negative"; "autofocus": "autofocus"; "decimals": "decimals"; "max": "max"; "idForLabel": "idForLabel"; "addClass": "addClass"; "groupSeparator": "groupSeparator"; "radixPoint": "radixPoint"; "lblKeyInvalid": "lblKeyInvalid"; }, {}, never, never>;
35
- }
@@ -1,13 +0,0 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import { inputConfigsHelp } from './typesProvider';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "./ngx-input-number.component";
5
- import * as i2 from "@angular/common";
6
- import * as i3 from "@ngneat/input-mask";
7
- import * as i4 from "@angular/forms";
8
- export declare class NgxInputNumberModule {
9
- static forRoot(config?: inputConfigsHelp): ModuleWithProviders<NgxInputNumberModule>;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputNumberModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxInputNumberModule, [typeof i1.NgxInputNumberComponent], [typeof i2.CommonModule, typeof i3.InputMaskModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule], [typeof i1.NgxInputNumberComponent]>;
12
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxInputNumberModule>;
13
- }
@@ -1,18 +0,0 @@
1
- import { inputConfigs } from './types';
2
- import { BehaviorSubject } from "rxjs";
3
- import * as i0 from "@angular/core";
4
- export declare class NgxInputNumberService {
5
- private readonly config;
6
- changeEvent: BehaviorSubject<boolean>;
7
- groupSeparator: string;
8
- radixPoint: string;
9
- lblKeyInvalid: string;
10
- negative: any;
11
- max: any;
12
- decimals: number;
13
- constructor(config: inputConfigs | null);
14
- onChangeParams(config: inputConfigs): void;
15
- getChangeEvent(): BehaviorSubject<boolean>;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputNumberService, [{ optional: true; }]>;
17
- static ɵprov: i0.ɵɵInjectableDeclaration<NgxInputNumberService>;
18
- }
package/lib/types.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import { Provider } from '@angular/core';
2
- export declare class inputConfigs {
3
- groupSeparator?: string;
4
- radixPoint?: string;
5
- lblKeyInvalid?: string;
6
- max?: number;
7
- decimals?: number;
8
- negative?: boolean;
9
- }
10
- export declare class inputConfigsHelp {
11
- config?: Provider;
12
- }
@@ -1,19 +0,0 @@
1
- import { Provider } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class inputConfigs {
4
- groupSeparator?: string;
5
- radixPoint?: string;
6
- }
7
- export declare abstract class typesProvider {
8
- abstract get config(): inputConfigs;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<typesProvider, never>;
10
- static ɵprov: i0.ɵɵInjectableDeclaration<typesProvider>;
11
- }
12
- export declare class defaultTypesProvider extends typesProvider {
13
- get config(): inputConfigs;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<defaultTypesProvider, never>;
15
- static ɵprov: i0.ɵɵInjectableDeclaration<defaultTypesProvider>;
16
- }
17
- export declare class inputConfigsHelp {
18
- config?: Provider;
19
- }