@experteam-mx/ngx-input-number 1.3.1 → 1.4.1

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, 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\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 ) { }\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: 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.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 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 = '0' + 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 this.loading = false\n\n }\n\n ngOnInit(): void {\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.loading = true\n\n setTimeout(() => {\n this.render()\n }, 0);\n }\n\n}\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 [placeholder]=\"placeholder\"\r\n [id]=\"idForLabel\"\r\n>\r\n","import { NgModule } 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\n\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})\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';\nexport * from '@ngneat/input-mask';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names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aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YAClE,WAAW;YACX,mBAAmB;SACpB;2FAKU,oBAAoB;kBAdhC,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;iBACF;;;ACtBD;;;;ACAA;;;;;;"}
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}\r\n\r\nexport class inputConfigsHelp {\r\n config?: Provider;\r\n}","import { Injectable, Optional, Inject } from '@angular/core';\nimport { INPUT_CONFIG_TOKEN } from './di';\nimport { inputConfigs } from './types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxInputNumberService {\n\n groupSeparator = ','\n radixPoint = '.'\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 }\n }\n\n changeParams( config: inputConfigs ){\n if( config.groupSeparator ){\n this.groupSeparator = config.groupSeparator!\n }\n if( config.radixPoint ){\n this.radixPoint = config.radixPoint!\n }\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';\nimport { inputConfigs, typesProvider } from './typesProvider';\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 ) { }\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 = this._typesProvider.config.groupSeparator\n @Input() radixPoint: any = this._typesProvider.config.radixPoint\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.inputMask = createMask({\n allowMinus: true,\n alias: 'numeric',\n numericInput: false,\n inputType: \"number\",\n inputmode: \"numeric\",\n groupSeparator: this.groupSeparator,\n radixPoint : this.radixPoint,\n digits: 2,\n digitsOptional: false,\n placeholder: '0',\n unmaskAsNumber: true,\n autoUnmask: true,\n showMaskOnFocus: true,\n showMaskOnHover: false,\n onBeforePaste: ( pastedValue: any, opts ) =>{\n return pastedValue.replaceAll( opts.groupSeparator!, \"\" )\n }\n })\n \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 = '0' + 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 this.loading = false\n\n }\n\n ngOnInit(): void {\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.loading = true\n\n setTimeout(() => {\n this.render()\n }, 0);\n }\n\n}\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 [placeholder]=\"placeholder\"\r\n [id]=\"idForLabel\"\r\n>\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;CAGxB;MAEY,gBAAgB;;;MCAhB,qBAAqB;IAKhC,YAEmB,MAA2B;QAA3B,WAAM,GAAN,MAAM,CAAqB;QAL9C,mBAAc,GAAG,GAAG,CAAA;QACpB,eAAU,GAAG,GAAG,CAAA;QAMd,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAe,CAAA;YA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oBACD,OAAO,EAAE;wBACP,uBAAuB;qBACxB;oBACD,SAAS,EAAC,EACT;iBACF;;;ACxBD;;;;ACAA;;;;;;"}
package/lib/di.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { inputConfigs } from './types';
3
+ export declare const INPUT_CONFIG_TOKEN: InjectionToken<inputConfigs>;
@@ -1,10 +1,12 @@
1
1
  import { OnInit, OnChanges, ElementRef, SimpleChanges, ChangeDetectorRef } from '@angular/core';
2
2
  import { FormControl } from "@angular/forms";
3
3
  import { InputmaskOptions } from '@ngneat/input-mask';
4
+ import { typesProvider } from './typesProvider';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class NgxInputNumberComponent implements OnInit, OnChanges {
6
7
  private _ChangeDetectorRef;
7
- constructor(_ChangeDetectorRef: ChangeDetectorRef);
8
+ private readonly _typesProvider;
9
+ constructor(_ChangeDetectorRef: ChangeDetectorRef, _typesProvider: typesProvider);
8
10
  inputElement: ElementRef;
9
11
  control: FormControl;
10
12
  negative: any;
@@ -13,6 +15,8 @@ export declare class NgxInputNumberComponent implements OnInit, OnChanges {
13
15
  max: any;
14
16
  idForLabel: any;
15
17
  addClass: any;
18
+ groupSeparator: any;
19
+ radixPoint: any;
16
20
  inputMask: InputmaskOptions<any>;
17
21
  placeholder: string;
18
22
  loading: boolean;
@@ -22,5 +26,5 @@ export declare class NgxInputNumberComponent implements OnInit, OnChanges {
22
26
  ngOnInit(): void;
23
27
  ngOnChanges(changes: SimpleChanges): void;
24
28
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputNumberComponent, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxInputNumberComponent, "app-input-number", never, { "control": "control"; "negative": "negative"; "autofocus": "autofocus"; "decimals": "decimals"; "max": "max"; "idForLabel": "idForLabel"; "addClass": "addClass"; }, {}, never, never>;
29
+ 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"; }, {}, never, never>;
26
30
  }
@@ -1,9 +1,12 @@
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { inputConfigsHelp } from './typesProvider';
1
3
  import * as i0 from "@angular/core";
2
4
  import * as i1 from "./ngx-input-number.component";
3
5
  import * as i2 from "@angular/common";
4
6
  import * as i3 from "@ngneat/input-mask";
5
7
  import * as i4 from "@angular/forms";
6
8
  export declare class NgxInputNumberModule {
9
+ static forRoot(config?: inputConfigsHelp): ModuleWithProviders<NgxInputNumberModule>;
7
10
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputNumberModule, never>;
8
11
  static ɵmod: i0.ɵɵNgModuleDeclaration<NgxInputNumberModule, [typeof i1.NgxInputNumberComponent], [typeof i2.CommonModule, typeof i3.InputMaskModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule], [typeof i1.NgxInputNumberComponent]>;
9
12
  static ɵinj: i0.ɵɵInjectorDeclaration<NgxInputNumberModule>;
@@ -1,6 +1,11 @@
1
+ import { inputConfigs } from './types';
1
2
  import * as i0 from "@angular/core";
2
3
  export declare class NgxInputNumberService {
3
- constructor();
4
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputNumberService, never>;
4
+ private readonly config;
5
+ groupSeparator: string;
6
+ radixPoint: string;
7
+ constructor(config: inputConfigs | null);
8
+ changeParams(config: inputConfigs): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputNumberService, [{ optional: true; }]>;
5
10
  static ɵprov: i0.ɵɵInjectableDeclaration<NgxInputNumberService>;
6
11
  }
package/lib/types.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { Provider } from '@angular/core';
2
+ export declare class inputConfigs {
3
+ groupSeparator?: string;
4
+ radixPoint?: string;
5
+ }
6
+ export declare class inputConfigsHelp {
7
+ config?: Provider;
8
+ }
@@ -0,0 +1,19 @@
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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experteam-mx/ngx-input-number",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {},
6
6
  "dependencies": {
package/public-api.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './lib/typesProvider';
1
2
  export * from './lib/ngx-input-number.service';
2
3
  export * from './lib/ngx-input-number.component';
3
4
  export * from './lib/ngx-input-number.module';