@webilix/ngx-form-m3 0.0.23 → 0.0.25

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.
@@ -0,0 +1,19 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import { INgxFormValues } from '../../ngx-form.interface';
4
+ import { IInputConfig } from '../input.interface';
5
+ import { IInputBankCard } from './input-bank-card.interface';
6
+ import * as i0 from "@angular/core";
7
+ export declare class InputBankCardComponent implements OnInit {
8
+ formControl: FormControl;
9
+ input: IInputBankCard;
10
+ config: IInputConfig;
11
+ values: INgxFormValues;
12
+ isButtonDisabled: boolean;
13
+ bank: string;
14
+ inputTransformFn: (value: any) => string;
15
+ ngOnInit(): void;
16
+ setBank(card: string): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputBankCardComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputBankCardComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
19
+ }
@@ -0,0 +1,10 @@
1
+ import { ValidatorFn, FormControl } from '@angular/forms';
2
+ import { InputMethods, IInput } from '../input.interface';
3
+ export interface IInputBankCard extends Omit<IInput, 'english'> {
4
+ readonly type: 'BANK-CARD';
5
+ readonly hideBank?: boolean;
6
+ }
7
+ export declare class InputBankCardMethods extends InputMethods<IInputBankCard, string | null> {
8
+ control(input: IInputBankCard, validators: ValidatorFn[]): FormControl<string | null>;
9
+ value(value: any, input: IInputBankCard): string | null;
10
+ }
@@ -0,0 +1,16 @@
1
+ import { FormControl } from '@angular/forms';
2
+ import { INgxFormValues } from '../../ngx-form.interface';
3
+ import { IInputConfig } from '../input.interface';
4
+ import { IInputBankSheba } from './input-bank-sheba.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class InputBankShebaComponent {
7
+ formControl: FormControl;
8
+ input: IInputBankSheba;
9
+ config: IInputConfig;
10
+ values: INgxFormValues;
11
+ isButtonDisabled: boolean;
12
+ bank: string;
13
+ inputTransformFn: (value: any) => string;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputBankShebaComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputBankShebaComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
16
+ }
@@ -0,0 +1,10 @@
1
+ import { ValidatorFn, FormControl } from '@angular/forms';
2
+ import { InputMethods, IInput } from '../input.interface';
3
+ export interface IInputBankSheba extends Omit<IInput, 'english'> {
4
+ readonly type: 'BANK-SHEBA';
5
+ readonly hideBank?: boolean;
6
+ }
7
+ export declare class InputBankShebaMethods extends InputMethods<IInputBankSheba, string | null> {
8
+ control(input: IInputBankSheba, validators: ValidatorFn[]): FormControl<string | null>;
9
+ value(value: any, input: IInputBankSheba): string | null;
10
+ }
@@ -1,5 +1,9 @@
1
1
  export * from './auto-complete/input-auto-complete.component';
2
2
  export * from './auto-complete/input-auto-complete.interface';
3
+ export * from './bank-card/input-bank-card.component';
4
+ export * from './bank-card/input-bank-card.interface';
5
+ export * from './bank-sheba/input-bank-sheba.component';
6
+ export * from './bank-sheba/input-bank-sheba.interface';
3
7
  export * from './checkbox/input-checkbox.component';
4
8
  export * from './checkbox/input-checkbox.interface';
5
9
  export * from './color/input-color.component';
@@ -30,6 +34,8 @@ export * from './number/input-number.component';
30
34
  export * from './number/input-number.interface';
31
35
  export * from './password/input-password.component';
32
36
  export * from './password/input-password.interface';
37
+ export * from './price/input-price.component';
38
+ export * from './price/input-price.interface';
33
39
  export * from './select/input-select.component';
34
40
  export * from './select/input-select.interface';
35
41
  export * from './text/input-text.component';
@@ -24,6 +24,16 @@ export declare class InputComponent implements OnInit, OnChanges {
24
24
  readonly methods: import("./input.interface").InputMethods<any, any>;
25
25
  readonly component: import("@angular/cdk/overlay").ComponentType<any>;
26
26
  };
27
+ "BANK-CARD": {
28
+ readonly title: string;
29
+ readonly methods: import("./input.interface").InputMethods<any, any>;
30
+ readonly component: import("@angular/cdk/overlay").ComponentType<any>;
31
+ };
32
+ "BANK-SHEBA": {
33
+ readonly title: string;
34
+ readonly methods: import("./input.interface").InputMethods<any, any>;
35
+ readonly component: import("@angular/cdk/overlay").ComponentType<any>;
36
+ };
27
37
  MOBILE: {
28
38
  readonly title: string;
29
39
  readonly methods: import("./input.interface").InputMethods<any, any>;
@@ -94,6 +104,11 @@ export declare class InputComponent implements OnInit, OnChanges {
94
104
  readonly methods: import("./input.interface").InputMethods<any, any>;
95
105
  readonly component: import("@angular/cdk/overlay").ComponentType<any>;
96
106
  };
107
+ PRICE: {
108
+ readonly title: string;
109
+ readonly methods: import("./input.interface").InputMethods<any, any>;
110
+ readonly component: import("@angular/cdk/overlay").ComponentType<any>;
111
+ };
97
112
  SELECT: {
98
113
  readonly title: string;
99
114
  readonly methods: import("./input.interface").InputMethods<any, any>;
@@ -0,0 +1,22 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import { INgxFormValues } from '../../ngx-form.interface';
4
+ import { IInputConfig } from '../input.interface';
5
+ import { IInputPrice } from './input-price.interface';
6
+ import * as i0 from "@angular/core";
7
+ export declare class InputPriceComponent implements OnInit {
8
+ formControl: FormControl;
9
+ input: IInputPrice;
10
+ config: IInputConfig;
11
+ values: INgxFormValues;
12
+ isButtonDisabled: boolean;
13
+ maxLength: number;
14
+ hintText?: string;
15
+ isFocused: boolean;
16
+ inputTransformFn: (value: any) => string;
17
+ ngOnInit(): void;
18
+ setValue(input: string): void;
19
+ updateHint(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputPriceComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputPriceComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
22
+ }
@@ -0,0 +1,16 @@
1
+ import { ValidatorFn, FormControl } from '@angular/forms';
2
+ import { InputMethods, IInput } from '../input.interface';
3
+ export interface IInputPrice extends Omit<IInput, 'value' | 'english'> {
4
+ readonly type: 'PRICE';
5
+ readonly value?: number | null;
6
+ readonly minimum?: number;
7
+ readonly maximum?: number;
8
+ readonly multiplyOf?: number;
9
+ readonly fractionDigits?: boolean | number;
10
+ readonly currency?: string;
11
+ readonly hideText?: boolean;
12
+ }
13
+ export declare class InputPriceMethods extends InputMethods<IInputPrice, number | null> {
14
+ control(input: IInputPrice, validators: ValidatorFn[]): FormControl<number | null>;
15
+ value(value: any, input: IInputPrice): number | null;
16
+ }
@@ -1,8 +1,8 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import { FormControl, FormGroup, NgForm } from '@angular/forms';
3
3
  import { MatFormFieldAppearance } from '@angular/material/form-field';
4
- import { IInputAutoComplete, IInputCheckbox, IInputColor, IInputComponent, IInputCoordinates, IInputDate, IInputEmail, IInputFile, IInputIcon, IInputIp, IInputMobile, IInputMoment, IInputMultiSelect, IInputName, IInputNumber, IInputPassword, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
5
- export type NgxFormInputs = IInputAutoComplete | IInputCheckbox | IInputColor | IInputComponent | IInputCoordinates | IInputDate | IInputEmail | IInputFile | IInputIcon | IInputIp | IInputMobile | IInputMoment | IInputMultiSelect | IInputName | IInputNumber | IInputPassword | IInputSelect | IInputText | IInputTextarea | IInputUrl;
4
+ import { IInputAutoComplete, IInputBankCard, IInputBankSheba, IInputCheckbox, IInputColor, IInputComponent, IInputCoordinates, IInputDate, IInputEmail, IInputFile, IInputIcon, IInputIp, IInputMobile, IInputMoment, IInputMultiSelect, IInputName, IInputNumber, IInputPassword, IInputPrice, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
5
+ export type NgxFormInputs = IInputAutoComplete | IInputBankCard | IInputBankSheba | IInputCheckbox | IInputColor | IInputComponent | IInputCoordinates | IInputDate | IInputEmail | IInputFile | IInputIcon | IInputIp | IInputMobile | IInputMoment | IInputMultiSelect | IInputName | IInputNumber | IInputPassword | IInputPrice | IInputSelect | IInputText | IInputTextarea | IInputUrl;
6
6
  type Inputs = NgxFormInputs | {
7
7
  readonly header: string;
8
8
  readonly input: NgxFormInputs;
@@ -0,0 +1,2 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ export declare const BankCardValidator: () => ValidatorFn;
@@ -0,0 +1,2 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ export declare const BankShebaValidator: () => ValidatorFn;
@@ -1,3 +1,5 @@
1
+ export * from './bank/card.validator';
2
+ export * from './bank/sheba.validator';
1
3
  export * from './count/max-count.validator';
2
4
  export * from './count/min-count.validator';
3
5
  export * from './date/max-date.validator';
package/ngx-form-m3.css CHANGED
@@ -59,6 +59,21 @@
59
59
  cursor: default;
60
60
  }
61
61
 
62
+ /* INPUTS: BANK-CARD */
63
+ .ngx-helper-form-m3-bank-card-input {
64
+ display: flex;
65
+ align-items: center;
66
+ width: 100%;
67
+
68
+ .bank {
69
+ font-size: 80%;
70
+ }
71
+
72
+ input {
73
+ flex: 1;
74
+ }
75
+ }
76
+
62
77
  /* INPUTS: CHECKBOX */
63
78
  .ngx-helper-form-m3-checkbox-input {
64
79
  display: inline-flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webilix/ngx-form-m3",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "author": "Ali Amirnezhad",
5
5
  "description": "Persian form library for Angular and Material 3",
6
6
  "repository": {
@@ -24,7 +24,7 @@
24
24
  "@angular/core": ">=19.2.4",
25
25
  "@angular/forms": ">=19.2.4",
26
26
  "@angular/material": ">=19.2.7",
27
- "@webilix/helper-library": ">=6.0.2",
27
+ "@webilix/helper-library": ">=6.1.1",
28
28
  "@webilix/jalali-date-time": ">=2.0.5",
29
29
  "@webilix/ngx-calendar-m3": ">=0.0.11",
30
30
  "@webilix/ngx-helper-m3": ">=0.0.24",