@bsachref/ng-form 1.0.2
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/LICENSE +21 -0
- package/README.md +143 -0
- package/app/default-forms/default-forms.component.d.ts +22 -0
- package/app/file-upload-accessor.directive.d.ts +13 -0
- package/app/formControlConfig.d.ts +203 -0
- package/app/material-form/material-form.component.d.ts +19 -0
- package/app/prime-form/prime-form.component.d.ts +23 -0
- package/app/validation-messages/validation-messages.component.d.ts +12 -0
- package/esm2022/app/default-forms/default-forms.component.mjs +163 -0
- package/esm2022/app/file-upload-accessor.directive.mjs +52 -0
- package/esm2022/app/formControlConfig.mjs +2 -0
- package/esm2022/app/material-form/material-form.component.mjs +176 -0
- package/esm2022/app/prime-form/prime-form.component.mjs +210 -0
- package/esm2022/app/validation-messages/validation-messages.component.mjs +29 -0
- package/esm2022/bsachref-ng-form.mjs +5 -0
- package/esm2022/public-api.mjs +5 -0
- package/fesm2022/bsachref-ng-form.mjs +615 -0
- package/fesm2022/bsachref-ng-form.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/package.json +62 -0
- package/public-api.d.ts +4 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) [2025] [BOUSNINA ACHRAF]
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
```md
|
2
|
+
A powerful **dynamic form builder** for **Angular** using **default** **PrimeNG** or **Angular Material**, designed to create and manage forms dynamically from JSON without writing extra HTML.
|
3
|
+
|
4
|
+
---
|
5
|
+
|
6
|
+
## 🌟 Features
|
7
|
+
✅ **Dynamic Form Rendering** – Create forms from JSON schema.
|
8
|
+
✅ **PrimeNG and Angular Material Integration** – Works seamlessly with both PrimeNG and Angular Material components.
|
9
|
+
✅ **Validation Support** – Built-in Angular validators.
|
10
|
+
✅ **Custom Event Handling** – Easily handle form submissions.
|
11
|
+
✅ **Customization** – Extendable to fit your needs.
|
12
|
+
|
13
|
+
---
|
14
|
+
|
15
|
+
## 📦 Installation
|
16
|
+
|
17
|
+
### 1️⃣ Install via NPM
|
18
|
+
```sh
|
19
|
+
npm install @bsachref/ng-forms --save
|
20
|
+
```
|
21
|
+
|
22
|
+
### 2️⃣ Install Peer Dependencies
|
23
|
+
Since this package relies on Angular and PrimeNG or Angular material, ensure they are installed:
|
24
|
+
|
25
|
+
---
|
26
|
+
|
27
|
+
## 🚀 Quick Start
|
28
|
+
|
29
|
+
### 2️⃣ Use in Component
|
30
|
+
template
|
31
|
+
|
32
|
+
|
33
|
+
Modify `app.component.ts`:
|
34
|
+
```ts
|
35
|
+
import { Component } from '@angular/core';
|
36
|
+
|
37
|
+
@Component({
|
38
|
+
selector: 'app-root',
|
39
|
+
template: `<your-dynamic-form [config]="formConfig" (formSubmit)="onSubmit($event)"></your-dynamic-form>`,
|
40
|
+
})
|
41
|
+
export class AppComponent {
|
42
|
+
formControls: FormControlConfig[] = [
|
43
|
+
{
|
44
|
+
name: 'firstName',
|
45
|
+
type: 'text',
|
46
|
+
label: 'First Name',
|
47
|
+
uiFramework: 'primeng',
|
48
|
+
validators: [
|
49
|
+
{ required: true },
|
50
|
+
{ minlength: 2 },
|
51
|
+
{ maxlength: 50 },
|
52
|
+
],
|
53
|
+
class: 'firstname mb-3',
|
54
|
+
style: { 'background-color': 'lightgray' },
|
55
|
+
value: '',
|
56
|
+
},
|
57
|
+
{
|
58
|
+
name: 'email',
|
59
|
+
type: 'email',
|
60
|
+
label: 'Email Address',
|
61
|
+
uiFramework: 'primeng',
|
62
|
+
class: 'input-class mt-2',
|
63
|
+
validators: [
|
64
|
+
{ required: true },
|
65
|
+
{ email: true },
|
66
|
+
],
|
67
|
+
value: '',
|
68
|
+
}
|
69
|
+
];
|
70
|
+
|
71
|
+
onSubmit(formData: any) {
|
72
|
+
console.log('Form Submitted:', formData);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
```
|
76
|
+
|
77
|
+
---
|
78
|
+
|
79
|
+
## 🛠 Available Form Controls
|
80
|
+
| Type | Description |
|
81
|
+
|----------------|---------------------------------------------------------------------------|
|
82
|
+
| `input` | Basic text input (work with default and angular material) |
|
83
|
+
| `email` | Email input (work with default and primeng) |
|
84
|
+
| `password` | Password input (work with default and primeng) |
|
85
|
+
| `select` | Dropdown selection (work with default, angular material and primeng) |
|
86
|
+
| `checkbox` | Toggle checkbox (work with default, angular material and primeng) |
|
87
|
+
| `radio` | Radio button group (work with default, angular material and primeng) |
|
88
|
+
| `textarea` | Multi-line text area (work with default, angular material and primeng) |
|
89
|
+
| `datepicker` | Angular material datepicker input |
|
90
|
+
| `text` | Primeng text input |
|
91
|
+
| `number` | Primeng number input |
|
92
|
+
| `multi-select` | Primeng multi select input |
|
93
|
+
| `date` | Primeng date select |
|
94
|
+
| `toggle` | Primeng toggle |
|
95
|
+
| `slider` | Primeng slider |
|
96
|
+
|
97
|
+
> **Note:** The `primeng file` input is not currently supported in this version. It might be added in upcoming versions.
|
98
|
+
---
|
99
|
+
|
100
|
+
## 🔥 Full Example with Validations
|
101
|
+
|
102
|
+
```md
|
103
|
+
For a full example with validations, check out this [CodeSandbox](https://codesandbox.io/p/devbox/g8jy7t).
|
104
|
+
```
|
105
|
+
```
|
106
|
+
|
107
|
+
---
|
108
|
+
|
109
|
+
## 📖 Documentation
|
110
|
+
For full documentation, visit [GitHub](https://github.com/bsachref/ngForm).
|
111
|
+
|
112
|
+
---
|
113
|
+
|
114
|
+
## 🏆 Support & Contributions
|
115
|
+
If you love this project, consider supporting me:
|
116
|
+
- ☕ [Buy Me a Coffee](https://buymeacoffee.com/bsachref)
|
117
|
+
- 💖 [Sponsor on GitHub](https://github.com/sponsors/bsachref)
|
118
|
+
- ⭐ [Star this repo](https://github.com/bsachref/ngForm)
|
119
|
+
|
120
|
+
---
|
121
|
+
|
122
|
+
## 🚀 Contributing
|
123
|
+
1. Fork the repository.
|
124
|
+
2. Clone your fork:
|
125
|
+
```sh
|
126
|
+
git clone https://github.com/bsachref/ngForm.git
|
127
|
+
```
|
128
|
+
3. Create a feature branch:
|
129
|
+
```sh
|
130
|
+
git checkout -b feature-new-component
|
131
|
+
```
|
132
|
+
4. Commit your changes and push:
|
133
|
+
```sh
|
134
|
+
git commit -m "Added new component"
|
135
|
+
git push origin feature-new-component
|
136
|
+
```
|
137
|
+
5. Submit a Pull Request.
|
138
|
+
|
139
|
+
---
|
140
|
+
|
141
|
+
## 📝 License
|
142
|
+
MIT © 2025 BOUSNINA Achraf
|
143
|
+
```
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
2
|
+
import { FormGroup, FormBuilder } from '@angular/forms';
|
3
|
+
import { FormControlConfig } from '../formControlConfig';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class DefaultFormsComponent {
|
6
|
+
private fb;
|
7
|
+
private cdr;
|
8
|
+
formName: import("@angular/core").InputSignal<string>;
|
9
|
+
controls: import("@angular/core").InputSignal<FormControlConfig[]>;
|
10
|
+
formSubmit: import("@angular/core").OutputEmitterRef<Record<string, any>>;
|
11
|
+
form: FormGroup;
|
12
|
+
private formChanges$;
|
13
|
+
constructor(fb: FormBuilder, cdr: ChangeDetectorRef);
|
14
|
+
ngOnInit(): void;
|
15
|
+
private initializeForm;
|
16
|
+
private getValidators;
|
17
|
+
private updateValidators;
|
18
|
+
private shouldRequireValidation;
|
19
|
+
onSubmit(): void;
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultFormsComponent, never>;
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DefaultFormsComponent, "default-forms", never, { "formName": { "alias": "formName"; "required": true; "isSignal": true; }; "controls": { "alias": "controls"; "required": true; "isSignal": true; }; }, { "formSubmit": "formSubmit"; }, never, never, true, never>;
|
22
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
2
|
+
import { FileUpload } from 'primeng/fileupload';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class FileUploadValueAccessor implements ControlValueAccessor {
|
5
|
+
private host;
|
6
|
+
constructor(host: FileUpload);
|
7
|
+
writeValue(value: any): void;
|
8
|
+
registerOnChange(fn: any): void;
|
9
|
+
registerOnTouched(fn: any): void;
|
10
|
+
setDisabledState(isDisabled: boolean): void;
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadValueAccessor, never>;
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileUploadValueAccessor, "p-fileUpload[formControlName], p-fileUpload[formControl], p-fileUpload[ngModel]", never, {}, {}, never, never, true, never>;
|
13
|
+
}
|
@@ -0,0 +1,203 @@
|
|
1
|
+
import { ValidatorFn } from "@angular/forms";
|
2
|
+
/**
|
3
|
+
* Interface representing the configuration for a form control.
|
4
|
+
*/
|
5
|
+
export interface FormControlConfig {
|
6
|
+
/**
|
7
|
+
* The name of the form control.
|
8
|
+
*/
|
9
|
+
name: string;
|
10
|
+
/**
|
11
|
+
* The type of the form control. Possible values include 'input', 'select', 'textarea', 'checkbox', 'radio', 'file', 'calendar', etc.
|
12
|
+
*/
|
13
|
+
type: string;
|
14
|
+
/**
|
15
|
+
* Options for 'select', 'radio', 'dropdown' controls. Each option can be an object with a label and value or a string.
|
16
|
+
*/
|
17
|
+
options?: Array<{
|
18
|
+
label: string;
|
19
|
+
value: any;
|
20
|
+
} | string>;
|
21
|
+
/**
|
22
|
+
* Validators for the form control. Includes standard validators like required, minlength, maxlength, pattern, email, and custom validators.
|
23
|
+
*/
|
24
|
+
validators?: {
|
25
|
+
required?: boolean;
|
26
|
+
minlength?: number;
|
27
|
+
maxlength?: number;
|
28
|
+
pattern?: string;
|
29
|
+
email?: boolean;
|
30
|
+
custom?: ValidatorFn;
|
31
|
+
}[];
|
32
|
+
/**
|
33
|
+
* CSS classes to be applied to the form control.
|
34
|
+
*/
|
35
|
+
class?: string;
|
36
|
+
/**
|
37
|
+
* Inline styles to be applied to the form control.
|
38
|
+
*/
|
39
|
+
style?: any;
|
40
|
+
/**
|
41
|
+
* Default value for the form control.
|
42
|
+
*/
|
43
|
+
value?: any;
|
44
|
+
/**
|
45
|
+
* UI framework to be used for the form control. Possible values are 'material', 'primeng', 'default'.
|
46
|
+
*/
|
47
|
+
uiFramework?: 'material' | 'primeng' | 'default';
|
48
|
+
/**
|
49
|
+
* Label for the form control.
|
50
|
+
*/
|
51
|
+
label?: string;
|
52
|
+
/**
|
53
|
+
* CSS classes to be applied to the label of the form control.
|
54
|
+
*/
|
55
|
+
labelClass?: string;
|
56
|
+
/**
|
57
|
+
* Inline styles to be applied to the label of the form control.
|
58
|
+
*/
|
59
|
+
labelStyle?: any;
|
60
|
+
/**
|
61
|
+
* Mode for date picker controls. Possible values are 'single' and 'range'.
|
62
|
+
*/
|
63
|
+
datePickerMode?: 'single' | 'range';
|
64
|
+
/**
|
65
|
+
* PrimeNG-specific properties for the form control.
|
66
|
+
*/
|
67
|
+
primeng?: {
|
68
|
+
icon?: string;
|
69
|
+
showClear?: boolean;
|
70
|
+
multiple?: boolean;
|
71
|
+
maxFileSize?: number;
|
72
|
+
accept?: string;
|
73
|
+
showWeek?: boolean;
|
74
|
+
minDate?: Date;
|
75
|
+
maxDate?: Date;
|
76
|
+
mode?: 'basic' | 'advanced';
|
77
|
+
currency?: string;
|
78
|
+
decimalSeparator?: string;
|
79
|
+
step?: number;
|
80
|
+
range?: boolean;
|
81
|
+
scrollHeight?: string;
|
82
|
+
showToggleAll?: boolean;
|
83
|
+
showButtons?: boolean;
|
84
|
+
panelClass?: string;
|
85
|
+
chooseLabel?: string;
|
86
|
+
clearLabel?: string;
|
87
|
+
todayLabel?: string;
|
88
|
+
timeOnly?: boolean;
|
89
|
+
hourFormat?: string;
|
90
|
+
minuteFormat?: string;
|
91
|
+
secondsFormat?: string;
|
92
|
+
showSeconds?: boolean;
|
93
|
+
showMillisec?: boolean;
|
94
|
+
timeSeparator?: string;
|
95
|
+
showOnFocus?: boolean;
|
96
|
+
appendTo?: string;
|
97
|
+
inputStyle?: any;
|
98
|
+
inputStyleClass?: string;
|
99
|
+
uploadLabel?: string;
|
100
|
+
cancelLabel?: string;
|
101
|
+
auto?: boolean;
|
102
|
+
url?: string;
|
103
|
+
withCredentials?: boolean;
|
104
|
+
customUpload?: string;
|
105
|
+
showUploadButton?: boolean;
|
106
|
+
showCancelButton?: boolean;
|
107
|
+
showUploadIcon?: boolean;
|
108
|
+
showRemoveIcon?: boolean;
|
109
|
+
showPreview?: boolean;
|
110
|
+
previewWidth?: number;
|
111
|
+
chooseOptions?: any;
|
112
|
+
showTime?: boolean;
|
113
|
+
showDate?: boolean;
|
114
|
+
showIcon?: boolean;
|
115
|
+
iconPos?: 'left' | 'right';
|
116
|
+
};
|
117
|
+
/**
|
118
|
+
* Angular-specific properties for the form control.
|
119
|
+
*/
|
120
|
+
angular?: {
|
121
|
+
readonly?: boolean;
|
122
|
+
autocomplete?: 'on' | 'off';
|
123
|
+
autofocus?: boolean;
|
124
|
+
placeholder?: string;
|
125
|
+
mask?: string;
|
126
|
+
tooltip?: string;
|
127
|
+
icon?: string;
|
128
|
+
prefix?: string;
|
129
|
+
suffix?: string;
|
130
|
+
hint?: string;
|
131
|
+
tabIndex?: number;
|
132
|
+
color?: string;
|
133
|
+
theme?: 'dark' | 'light' | string;
|
134
|
+
};
|
135
|
+
/**
|
136
|
+
* Configuration for dependent fields. Specifies fields that depend on the value of this field and the condition for their dependency.
|
137
|
+
*/
|
138
|
+
dependentFields?: {
|
139
|
+
dependsOn: string;
|
140
|
+
condition: (value: any) => boolean;
|
141
|
+
}[];
|
142
|
+
/**
|
143
|
+
* Indicates if the form control is repeatable.
|
144
|
+
*/
|
145
|
+
repeatable?: boolean;
|
146
|
+
/**
|
147
|
+
* Function to conditionally render the form control based on the values of other controls.
|
148
|
+
*/
|
149
|
+
conditionalRender?: (values: any) => boolean;
|
150
|
+
/**
|
151
|
+
* Group to which the form control belongs.
|
152
|
+
*/
|
153
|
+
group?: string;
|
154
|
+
/**
|
155
|
+
* Event handlers for various events related to the form control.
|
156
|
+
*/
|
157
|
+
events?: {
|
158
|
+
onChange?: (event: any) => void;
|
159
|
+
onFocus?: (event: any) => void;
|
160
|
+
onBlur?: (event: any) => void;
|
161
|
+
onSelect?: (event: any) => void;
|
162
|
+
onUpload?: (event: any) => void;
|
163
|
+
onKeyUp?: (event: any) => void;
|
164
|
+
onKeyDown?: (event: any) => void;
|
165
|
+
onPaste?: (event: any) => void;
|
166
|
+
onDownload?: (event: any) => void;
|
167
|
+
onClear?: (event: any) => void;
|
168
|
+
onReset?: (event: any) => void;
|
169
|
+
onToggle?: (event: any) => void;
|
170
|
+
onShow?: (event: any) => void;
|
171
|
+
onHide?: (event: any) => void;
|
172
|
+
onOpen?: (event: any) => void;
|
173
|
+
onClose?: (event: any) => void;
|
174
|
+
onPanelClick?: (event: any) => void;
|
175
|
+
onPanelShow?: (event: any) => void;
|
176
|
+
onPanelHide?: (event: any) => void;
|
177
|
+
onPanelOpen?: (event: any) => void;
|
178
|
+
onPanelClose?: (event: any) => void;
|
179
|
+
onPanelToggle?: (event: any) => void;
|
180
|
+
onPanelSelect?: (event: any) => void;
|
181
|
+
onPanelUnselect?: (event: any) => void;
|
182
|
+
onPanelUnselectAll?: (event: any) => void;
|
183
|
+
onPanelReorder?: (event: any) => void;
|
184
|
+
onPanelResize?: (event: any) => void;
|
185
|
+
onPanelDragStart?: (event: any) => void;
|
186
|
+
onPanelDragEnd?: (event: any) => void;
|
187
|
+
onPanelDragOver?: (event: any) => void;
|
188
|
+
onPanelDragLeave?: (event: any) => void;
|
189
|
+
onPanelDrop?: (event: any) => void;
|
190
|
+
onPanelScroll?: (event: any) => void;
|
191
|
+
onPanelFilter?: (event: any) => void;
|
192
|
+
onPanelToggleAll?: (event: any) => void;
|
193
|
+
onPanelShowAll?: (event: any) => void;
|
194
|
+
onPanelHideAll?: (event: any) => void;
|
195
|
+
onPanelOpenAll?: (event: any) => void;
|
196
|
+
onPanelCloseAll?: (event: any) => void;
|
197
|
+
onRemove?: (event: any) => void;
|
198
|
+
onError?: (event: any) => void;
|
199
|
+
onBeforeUpload?: (event: any) => void;
|
200
|
+
onProgress?: (event: any) => void;
|
201
|
+
onSlideEnd?: (event: any) => void;
|
202
|
+
};
|
203
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
2
|
+
import { FormGroup, FormBuilder } from '@angular/forms';
|
3
|
+
import { FormControlConfig } from '../formControlConfig';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class MaterialFormsComponent {
|
6
|
+
private fb;
|
7
|
+
private cdr;
|
8
|
+
formName: import("@angular/core").InputSignal<string>;
|
9
|
+
controls: import("@angular/core").InputSignal<FormControlConfig[]>;
|
10
|
+
formSubmit: import("@angular/core").OutputEmitterRef<Record<string, any>>;
|
11
|
+
form: FormGroup;
|
12
|
+
constructor(fb: FormBuilder, cdr: ChangeDetectorRef);
|
13
|
+
ngOnInit(): void;
|
14
|
+
private initializeForm;
|
15
|
+
private getValidators;
|
16
|
+
onSubmit(): void;
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MaterialFormsComponent, never>;
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MaterialFormsComponent, "material-forms", never, { "formName": { "alias": "formName"; "required": true; "isSignal": true; }; "controls": { "alias": "controls"; "required": true; "isSignal": true; }; }, { "formSubmit": "formSubmit"; }, never, never, true, never>;
|
19
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
2
|
+
import { FormGroup, FormBuilder } from '@angular/forms';
|
3
|
+
import { FormControlConfig } from '../formControlConfig';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class PrimeNgFormsComponent {
|
6
|
+
private fb;
|
7
|
+
private cdr;
|
8
|
+
formName: import("@angular/core").InputSignal<string>;
|
9
|
+
controls: import("@angular/core").InputSignal<FormControlConfig[]>;
|
10
|
+
formSubmit: import("@angular/core").OutputEmitterRef<Record<string, any>>;
|
11
|
+
form: FormGroup;
|
12
|
+
private formChanges$;
|
13
|
+
constructor(fb: FormBuilder, cdr: ChangeDetectorRef);
|
14
|
+
ngOnInit(): void;
|
15
|
+
private initializeForm;
|
16
|
+
private getValidators;
|
17
|
+
private updateValidators;
|
18
|
+
private shouldRequireValidation;
|
19
|
+
onFileSelect(event: any, controlName: string): void;
|
20
|
+
onSubmit(): void;
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PrimeNgFormsComponent, never>;
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PrimeNgFormsComponent, "primeng-forms", never, { "formName": { "alias": "formName"; "required": true; "isSignal": true; }; "controls": { "alias": "controls"; "required": true; "isSignal": true; }; }, { "formSubmit": "formSubmit"; }, never, never, true, never>;
|
23
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
2
|
+
import { FormControlConfig } from '../formControlConfig';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class ValidationMessagesComponent {
|
5
|
+
control: AbstractControl | null;
|
6
|
+
controlName: string;
|
7
|
+
config: FormControlConfig;
|
8
|
+
getValidatorValue(validatorName: keyof ValidationErrors, key: string): any;
|
9
|
+
getCustomErrorMessage(): string | null;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationMessagesComponent, never>;
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ValidationMessagesComponent, "validation-messages", never, { "control": { "alias": "control"; "required": false; }; "controlName": { "alias": "controlName"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
12
|
+
}
|