@webilix/ngx-form-m3 0.0.2 → 0.0.4
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/fesm2022/webilix-ngx-form-m3.mjs +123 -214
- package/fesm2022/webilix-ngx-form-m3.mjs.map +1 -1
- package/lib/inputs/color/input-color.component.d.ts +11 -0
- package/lib/inputs/color/input-color.interface.d.ts +9 -0
- package/lib/inputs/email/input-email.component.d.ts +3 -5
- package/lib/inputs/index.d.ts +2 -0
- package/lib/inputs/input.component.d.ts +5 -0
- package/lib/inputs/input.interface.d.ts +4 -2
- package/lib/inputs/mobile/input-mobile.component.d.ts +3 -5
- package/lib/inputs/name/input-name.component.d.ts +3 -4
- package/lib/inputs/password/input-password.component.d.ts +3 -5
- package/lib/inputs/select/input-select.component.d.ts +3 -5
- package/lib/inputs/text/input-text.component.d.ts +3 -5
- package/lib/inputs/textarea/input-textarea.component.d.ts +3 -4
- package/lib/ngx-form.component.d.ts +0 -1
- package/lib/ngx-form.config.d.ts +0 -3
- package/lib/ngx-form.interface.d.ts +2 -2
- package/ngx-form-m3.css +60 -0
- package/package.json +6 -6
|
@@ -3,12 +3,10 @@ import { IInputConfig } from '../input.interface';
|
|
|
3
3
|
import { IInputMobile } from './input-mobile.interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class InputMobileComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
focused: boolean;
|
|
6
|
+
formControl: FormControl;
|
|
7
|
+
input: IInputMobile;
|
|
8
|
+
config: IInputConfig;
|
|
10
9
|
inputTransformFn: (value: any) => string;
|
|
11
|
-
constructor(formControl: FormControl, input: IInputMobile, config: IInputConfig);
|
|
12
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputMobileComponent, never>;
|
|
13
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputMobileComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
14
12
|
}
|
|
@@ -4,12 +4,11 @@ import { IInputConfig } from '../input.interface';
|
|
|
4
4
|
import { IInputName } from './input-name.interface';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class InputNameComponent implements OnInit {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
formControl: FormControl;
|
|
8
|
+
input: IInputName;
|
|
9
|
+
config: IInputConfig;
|
|
10
10
|
firstFormControl: FormControl;
|
|
11
11
|
lastFormControl: FormControl;
|
|
12
|
-
constructor(formControl: FormControl, input: IInputName, config: IInputConfig);
|
|
13
12
|
ngOnInit(): void;
|
|
14
13
|
setName(): void;
|
|
15
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputNameComponent, never>;
|
|
@@ -3,12 +3,10 @@ import { IInputConfig } from '../input.interface';
|
|
|
3
3
|
import { IInputPassword } from './input-password.interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class InputPasswordComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
focused: boolean;
|
|
6
|
+
formControl: FormControl;
|
|
7
|
+
input: IInputPassword;
|
|
8
|
+
config: IInputConfig;
|
|
10
9
|
showPassword: boolean;
|
|
11
|
-
constructor(formControl: FormControl, input: IInputPassword, config: IInputConfig);
|
|
12
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputPasswordComponent, never>;
|
|
13
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputPasswordComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
14
12
|
}
|
|
@@ -3,11 +3,9 @@ import { IInputConfig } from '../input.interface';
|
|
|
3
3
|
import { IInputSelect } from './input-select.interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class InputSelectComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
focused: boolean;
|
|
10
|
-
constructor(formControl: FormControl, input: IInputSelect, config: IInputConfig);
|
|
6
|
+
formControl: FormControl;
|
|
7
|
+
input: IInputSelect;
|
|
8
|
+
config: IInputConfig;
|
|
11
9
|
getTitle(): string;
|
|
12
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputSelectComponent, never>;
|
|
13
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputSelectComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
@@ -3,11 +3,9 @@ import { IInputConfig } from '../input.interface';
|
|
|
3
3
|
import { IInputText } from './input-text.interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class InputTextComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
focused: boolean;
|
|
10
|
-
constructor(formControl: FormControl, input: IInputText, config: IInputConfig);
|
|
6
|
+
formControl: FormControl;
|
|
7
|
+
input: IInputText;
|
|
8
|
+
config: IInputConfig;
|
|
11
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputTextComponent, never>;
|
|
12
10
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputTextComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
13
11
|
}
|
|
@@ -3,11 +3,10 @@ import { IInputConfig } from '../input.interface';
|
|
|
3
3
|
import { IInputTextarea } from './input-textarea.interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class InputTextareaComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
formControl: FormControl;
|
|
7
|
+
input: IInputTextarea;
|
|
8
|
+
config: IInputConfig;
|
|
9
9
|
focused: boolean;
|
|
10
|
-
constructor(formControl: FormControl, input: IInputTextarea, config: IInputConfig);
|
|
11
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputTextareaComponent, never>;
|
|
12
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputTextareaComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
13
12
|
}
|
|
@@ -34,7 +34,6 @@ export declare class NgxFormComponent implements OnInit, OnChanges, AfterViewIni
|
|
|
34
34
|
protected lastValues: INgxFormValues;
|
|
35
35
|
protected lastSubmit?: Date;
|
|
36
36
|
protected isMobile: boolean;
|
|
37
|
-
protected headerClass: string;
|
|
38
37
|
protected inputConfig: IInputConfig;
|
|
39
38
|
constructor(router: Router, config?: Partial<INgxFormConfig> | undefined);
|
|
40
39
|
ngOnInit(): void;
|
package/lib/ngx-form.config.d.ts
CHANGED
|
@@ -2,9 +2,6 @@ import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
|
2
2
|
export interface INgxFormConfig {
|
|
3
3
|
readonly mobileWidth: number;
|
|
4
4
|
readonly submitTimeout: number;
|
|
5
|
-
readonly headerClass: string;
|
|
6
|
-
readonly enClass: string;
|
|
7
|
-
readonly descriptionClass: string;
|
|
8
5
|
}
|
|
9
6
|
export declare const NGX_FORM_CONFIG: InjectionToken<Partial<INgxFormConfig>>;
|
|
10
7
|
export declare const provideNgxFormConfig: (config: Partial<INgxFormConfig>) => EnvironmentProviders;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormGroup, NgForm } from '@angular/forms';
|
|
2
2
|
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
3
|
-
import { IInputEmail, IInputMobile, IInputName, IInputPassword, IInputSelect, IInputText, IInputTextarea } from './inputs';
|
|
4
|
-
export type NgxFormInputs = IInputEmail | IInputMobile | IInputName | IInputPassword | IInputSelect | IInputText | IInputTextarea;
|
|
3
|
+
import { IInputColor, IInputEmail, IInputMobile, IInputName, IInputPassword, IInputSelect, IInputText, IInputTextarea } from './inputs';
|
|
4
|
+
export type NgxFormInputs = IInputColor | IInputEmail | IInputMobile | IInputName | IInputPassword | IInputSelect | IInputText | IInputTextarea;
|
|
5
5
|
type Inputs = NgxFormInputs | {
|
|
6
6
|
readonly header: string;
|
|
7
7
|
readonly input: NgxFormInputs;
|
package/ngx-form-m3.css
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* COLUMN AND SECTION HEADER */
|
|
2
|
+
.ngx-form-m3-header {
|
|
3
|
+
font-size: 15px;
|
|
4
|
+
background-color: var(--mdc-filled-text-field-container-color);
|
|
5
|
+
border-width: 0;
|
|
6
|
+
border-radius: 0;
|
|
7
|
+
border-right: 2px solid var(--secondary-fixed);
|
|
8
|
+
color: var(--secondary);
|
|
9
|
+
padding: 1rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* FORM BUTOTNS */
|
|
13
|
+
.ngx-form-m3-form-buttons {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: flex-end;
|
|
17
|
+
column-gap: 1rem;
|
|
18
|
+
|
|
19
|
+
margin-top: 1rem;
|
|
20
|
+
}
|
|
21
|
+
.ngx-form-m3-form-buttons.mobile-view {
|
|
22
|
+
button[type='submit'] {
|
|
23
|
+
flex: 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* ENGLISH VALUES */
|
|
28
|
+
.ngx-form-m3-en {
|
|
29
|
+
direction: ltr;
|
|
30
|
+
font-family: Roboto, 'Helvetica Neue', sans-serif !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* INPUT SUFFIX */
|
|
34
|
+
.ngx-form-m3-input-suffix {
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
|
|
37
|
+
mat-icon {
|
|
38
|
+
padding-right: 0.5rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.ngx-form-m3-input-suffix.click {
|
|
42
|
+
mat-icon {
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* INPUT DESCRIPTION */
|
|
48
|
+
.ngx-form-m3-input-description {
|
|
49
|
+
font-size: 12px;
|
|
50
|
+
line-height: 18px;
|
|
51
|
+
color: var(--outline);
|
|
52
|
+
text-align: justify;
|
|
53
|
+
margin-top: 0.5rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* DISABLED INPUTS */
|
|
57
|
+
.ngx-form-m3-disabled-input {
|
|
58
|
+
opacity: 0.4;
|
|
59
|
+
cursor: default;
|
|
60
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webilix/ngx-form-m3",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"author": "Ali Amirnezhad",
|
|
5
5
|
"description": "Persian form library for Angular and Material 3",
|
|
6
6
|
"repository": {
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://github.com/webilix/ngx-form-m3#readme",
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@angular/common": ">=19.0.
|
|
24
|
-
"@angular/core": ">=19.0.
|
|
25
|
-
"@angular/forms": ">=19.0.
|
|
26
|
-
"@angular/material": ">=19.0.
|
|
23
|
+
"@angular/common": ">=19.0.4",
|
|
24
|
+
"@angular/core": ">=19.0.4",
|
|
25
|
+
"@angular/forms": ">=19.0.4",
|
|
26
|
+
"@angular/material": ">=19.0.3",
|
|
27
27
|
"@webilix/helper-library": ">=6.0.2",
|
|
28
|
-
"ngx-mask": ">=19.0.
|
|
28
|
+
"ngx-mask": ">=19.0.4"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"tslib": "^2.3.0"
|