@webilix/ngx-form-m3 0.0.10 → 0.0.12
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 +77 -1
- package/fesm2022/webilix-ngx-form-m3.mjs.map +1 -1
- package/lib/inputs/checkbox/input-checkbox.component.d.ts +15 -0
- package/lib/inputs/checkbox/input-checkbox.interface.d.ts +11 -0
- package/lib/inputs/index.d.ts +4 -0
- package/lib/inputs/input.component.d.ts +10 -0
- package/lib/inputs/ip/input-ip.component.d.ts +14 -0
- package/lib/inputs/ip/input-ip.interface.d.ts +10 -0
- package/lib/ngx-form.interface.d.ts +2 -2
- package/ngx-form-m3.css +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
|
2
|
+
import { INgxFormValues } from '../../ngx-form.interface';
|
|
3
|
+
import { IInputConfig } from '../input.interface';
|
|
4
|
+
import { IInputCheckbox } from './input-checkbox.interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class InputCheckboxComponent {
|
|
7
|
+
formControl: FormControl;
|
|
8
|
+
input: IInputCheckbox;
|
|
9
|
+
config: IInputConfig;
|
|
10
|
+
values: INgxFormValues;
|
|
11
|
+
isButtonDisabled: boolean;
|
|
12
|
+
toggleValue(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputCheckboxComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputCheckboxComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ValidatorFn, FormControl } from '@angular/forms';
|
|
2
|
+
import { InputMethods, IInput } from '../input.interface';
|
|
3
|
+
export interface IInputCheckbox extends Omit<IInput, 'title' | 'value' | 'autoFocus'> {
|
|
4
|
+
readonly type: 'CHECKBOX';
|
|
5
|
+
readonly message: string;
|
|
6
|
+
readonly value?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class InputCheckboxMethods extends InputMethods<IInputCheckbox, boolean | null> {
|
|
9
|
+
control(input: IInputCheckbox, validators: ValidatorFn[]): FormControl<boolean | null>;
|
|
10
|
+
value(value: any, input: IInputCheckbox): boolean | null;
|
|
11
|
+
}
|
package/lib/inputs/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './checkbox/input-checkbox.component';
|
|
2
|
+
export * from './checkbox/input-checkbox.interface';
|
|
1
3
|
export * from './color/input-color.component';
|
|
2
4
|
export * from './color/input-color.interface';
|
|
3
5
|
export * from './component/input-component.component';
|
|
@@ -8,6 +10,8 @@ export * from './email/input-email.component';
|
|
|
8
10
|
export * from './email/input-email.interface';
|
|
9
11
|
export * from './file/input-file.component';
|
|
10
12
|
export * from './file/input-file.interface';
|
|
13
|
+
export * from './ip/input-ip.component';
|
|
14
|
+
export * from './ip/input-ip.interface';
|
|
11
15
|
export * from './mobile/input-mobile.component';
|
|
12
16
|
export * from './mobile/input-mobile.interface';
|
|
13
17
|
export * from './moment/input-moment.component';
|
|
@@ -29,6 +29,11 @@ export declare class InputComponent implements OnInit, OnChanges {
|
|
|
29
29
|
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
30
30
|
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
31
31
|
};
|
|
32
|
+
CHECKBOX: {
|
|
33
|
+
readonly title: string;
|
|
34
|
+
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
35
|
+
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
36
|
+
};
|
|
32
37
|
COLOR: {
|
|
33
38
|
readonly title: string;
|
|
34
39
|
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
@@ -49,6 +54,11 @@ export declare class InputComponent implements OnInit, OnChanges {
|
|
|
49
54
|
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
50
55
|
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
51
56
|
};
|
|
57
|
+
IP: {
|
|
58
|
+
readonly title: string;
|
|
59
|
+
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
60
|
+
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
61
|
+
};
|
|
52
62
|
MOMENT: {
|
|
53
63
|
readonly title: string;
|
|
54
64
|
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
|
2
|
+
import { INgxFormValues } from '../../ngx-form.interface';
|
|
3
|
+
import { IInputConfig } from '../input.interface';
|
|
4
|
+
import { IInputIp } from './input-ip.interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class InputIpComponent {
|
|
7
|
+
formControl: FormControl;
|
|
8
|
+
input: IInputIp;
|
|
9
|
+
config: IInputConfig;
|
|
10
|
+
values: INgxFormValues;
|
|
11
|
+
isButtonDisabled: boolean;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputIpComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputIpComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ValidatorFn, FormControl } from '@angular/forms';
|
|
2
|
+
import { InputMethods, IInput } from '../input.interface';
|
|
3
|
+
export interface IInputIp extends Omit<IInput, 'english'> {
|
|
4
|
+
readonly type: 'IP';
|
|
5
|
+
readonly showIcon?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class InputIpMethods extends InputMethods<IInputIp, string | null> {
|
|
8
|
+
control(input: IInputIp, validators: ValidatorFn[]): FormControl<string | null>;
|
|
9
|
+
value(value: any, input: IInputIp): string | null;
|
|
10
|
+
}
|
|
@@ -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 { IInputColor, IInputComponent, IInputDate, IInputEmail, IInputFile, IInputMobile, IInputMoment, IInputName, IInputNumber, IInputPassword, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
|
|
5
|
-
export type NgxFormInputs = IInputColor | IInputComponent | IInputDate | IInputEmail | IInputFile | IInputMobile | IInputMoment | IInputName | IInputNumber | IInputPassword | IInputSelect | IInputText | IInputTextarea | IInputUrl;
|
|
4
|
+
import { IInputCheckbox, IInputColor, IInputComponent, IInputDate, IInputEmail, IInputFile, IInputIp, IInputMobile, IInputMoment, IInputName, IInputNumber, IInputPassword, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
|
|
5
|
+
export type NgxFormInputs = IInputCheckbox | IInputColor | IInputComponent | IInputDate | IInputEmail | IInputFile | IInputIp | IInputMobile | IInputMoment | IInputName | IInputNumber | IInputPassword | IInputSelect | IInputText | IInputTextarea | IInputUrl;
|
|
6
6
|
type Inputs = NgxFormInputs | {
|
|
7
7
|
readonly header: string;
|
|
8
8
|
readonly input: NgxFormInputs;
|
package/ngx-form-m3.css
CHANGED
|
@@ -59,6 +59,20 @@
|
|
|
59
59
|
cursor: default;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/* INPUTS: CHECKBOX */
|
|
63
|
+
.ngx-helper-form-m3-checkbox-input {
|
|
64
|
+
display: inline-flex;
|
|
65
|
+
align-items: flex-start;
|
|
66
|
+
column-gap: 0.5rem;
|
|
67
|
+
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
|
|
70
|
+
.message {
|
|
71
|
+
flex: 1;
|
|
72
|
+
text-align: right;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
62
76
|
/* INPUTS: COLOR */
|
|
63
77
|
.ngx-helper-form-m3-color-input {
|
|
64
78
|
display: flex;
|