@ng-simplicity/forms-material 1.0.0 → 1.1.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @ng-simplicity/forms-material
2
2
 
3
- An integration package containing pre-styled Angular Material inputs, form fields, and error templates for the **NG-Simplicity Forms** dynamic engine.
3
+ An integration package containing pre-styled Angular Material inputs, form fields, and error templates. It serves as a visual UI extension of the reactive [@ng-simplicity/forms-core](https://www.npmjs.com/package/@ng-simplicity/forms-core) engine, inheriting its powerful dynamic capabilities. This allows you to construct highly dynamic, complex forms where control properties (such as visibility, enabled/disabled state, select options, and validation rules) reactively adapt in real-time based on the current values inside the form. The package is highly customizable; because it utilizes the core registry system, you can develop and add your own custom form controls to the registry to be used in the form rendering alongside the Material presets.
4
4
 
5
5
  ---
6
6
 
@@ -21,64 +21,286 @@ Make sure your application has active Material theming configured (either via an
21
21
 
22
22
  ## Quick Start & Registration
23
23
 
24
- To allow the dynamic compiler to render Material fields, register them using `NgsFormsMaterialModule` inside your page component:
24
+ To render Material fields dynamically, follow these steps:
25
+ 1. Provide the `NgsFormsService` at the component level to isolate the form state.
26
+ 2. Register the Material components in your component constructor using `NgsFormsMaterialModule.registerAllMaterialComponents(registry)`.
27
+ 3. Construct the layout schema (`NgsFormsFormConfig`) using Material controls.
28
+ 4. Pass the schema to `this.ngsFormsService.setFormConfig(formConfig)`.
29
+ 5. Add `<ngs-form></ngs-form>` to your component's template.
30
+
31
+ Here is a complete usage example:
25
32
 
26
33
  ```typescript
27
- import { Component } from '@angular/core';
28
- import { NgsFormsComponentRegistryService } from '@ng-simplicity/forms-core';
29
- import { NgsFormsMaterialModule } from '@ng-simplicity/forms-material';
34
+ import { Component, OnInit, inject } from '@angular/core';
35
+ import { Validators } from '@angular/forms';
36
+ import {
37
+ NgsFormComponent,
38
+ NgsFormsComponentRegistryService,
39
+ NgsFormsService,
40
+ NgsFormsFormConfig,
41
+ NgsFormsFormGroupComponent,
42
+ NgsFormsRowComponent
43
+ } from '@ng-simplicity/forms-core';
44
+ import {
45
+ NgsFormsMaterialModule,
46
+ NgsFormsMaterialFormItemInputComponent,
47
+ NgsFormsMaterialFormItemTextAreaComponent
48
+ } from '@ng-simplicity/forms-material';
30
49
 
31
50
  @Component({
32
51
  selector: 'app-material-form-page',
33
- templateUrl: './material-form-page.component.html'
52
+ standalone: true,
53
+ imports: [NgsFormComponent],
54
+ providers: [NgsFormsService],
55
+ template: `
56
+ <div class="material-form-container">
57
+ <h2>Contact Us</h2>
58
+ <ngs-form></ngs-form>
59
+ <button (click)="onSubmit()">Submit</button>
60
+ </div>
61
+ `
34
62
  })
35
- export class MaterialFormPageComponent {
63
+ export class MaterialFormPageComponent implements OnInit {
64
+ private ngsFormsService = inject(NgsFormsService);
65
+
36
66
  constructor(registry: NgsFormsComponentRegistryService) {
37
- // Registers Material inputs, textareas, layouts, and helpers
67
+ // Registers Material inputs, textareas, checkbox, select, and layouts
38
68
  NgsFormsMaterialModule.registerAllMaterialComponents(registry);
39
69
  }
70
+
71
+ ngOnInit() {
72
+ // Construct the form configuration
73
+ const formConfig: NgsFormsFormConfig = {
74
+ inputUpdateDebounce: 150,
75
+ root: NgsFormsFormGroupComponent.create({
76
+ name: 'contactForm',
77
+ items: [
78
+ NgsFormsRowComponent.create({
79
+ items: [
80
+ NgsFormsMaterialFormItemInputComponent.create({
81
+ name: 'email',
82
+ label: 'Email Address',
83
+ placeholder: 'Enter your email...',
84
+ type: 'email',
85
+ validators: [Validators.required, Validators.email],
86
+ errorMessageMap: {
87
+ required: 'Email address is required.',
88
+ email: 'Please enter a valid email address.'
89
+ }
90
+ }),
91
+ NgsFormsMaterialFormItemTextAreaComponent.create({
92
+ name: 'message',
93
+ label: 'Your Message',
94
+ placeholder: 'Write your message...',
95
+ rows: 4
96
+ })
97
+ ]
98
+ })
99
+ ]
100
+ })
101
+ };
102
+
103
+ // Initialize the dynamic form controls
104
+ this.ngsFormsService.setFormConfig(formConfig);
105
+ }
106
+
107
+ onSubmit() {
108
+ if (this.ngsFormsService.isValid) {
109
+ console.log('Form data submitted:', this.ngsFormsService.formValue);
110
+ } else {
111
+ this.ngsFormsService.setIsSubmitted(true); // Highlights form validation errors
112
+ }
113
+ }
40
114
  }
41
115
  ```
42
116
 
43
117
  ---
44
118
 
119
+ ## Common Properties & Core Integration
120
+
121
+ This package relies on the main core engine: [@ng-simplicity/forms-core](https://www.npmjs.com/package/@ng-simplicity/forms-core). The core package provides all standard layout structures and non-styling-specific form components, including:
122
+ - **Form Groups**: `NgsFormsFormGroupComponent` (Key: `'form-group'`)
123
+ - **Sections**: `NgsFormsFormSectionComponent` (Key: `'section'`)
124
+ - **Row Containers**: `NgsFormsRowComponent` (Key: `'form-row'`)
125
+ - **Columns**: `NgsFormsColumnComponent` (Key: `'column'`)
126
+ - **Form Arrays & Support**: `NgsFormsFormArrayContainerComponent` (Key: `'form-array'`), `NgsFormsFormArrayAddItemComponent` (Key: `'form-array-add-item'`), and `NgsFormsFormArrayRemoveItemComponent` (Key: `'form-array-remove-item'`)
127
+ - **Static Content**: `NgsFormsHtmlContentComponent` (Key: `'content-html'`) and `NgsFormsTextDivComponent` (Key: `'text-div'`)
128
+
129
+ Please refer to the [@ng-simplicity/forms-core README](file:///home/bryan/git/bryan-projects/angular-open-source/ng-simplicity/forms/libs/forms-core/README.md) for full details on constructing layouts and managing core form structures.
130
+
131
+ ### Common Control Properties
132
+
133
+ Most controls in this styling library support a standard set of core properties that are managed by the dynamic forms engine. These properties allow passing either a static/basic value or an asynchronous stream (Observable):
134
+
135
+ 1. **Visibility**:
136
+ - `visible` (boolean): Controls whether the item is mounted in the DOM.
137
+ - `visible$` (`Observable<boolean>`): Stream version to dynamically show/hide components.
138
+ - *Note: Visibility is configured at the inner config level (`NgsFormsFormItemConfigBase`).*
139
+
140
+ 2. **Disabled Status**:
141
+ - `disabled` (boolean): Sets the initial disabled state of the form control.
142
+ - `disabled$` (`Observable<boolean>`): Stream to toggle disabled state.
143
+ - *Configured at the inner `config` level.*
144
+
145
+ 3. **Validators**:
146
+ - `validators` (`Array<ValidatorFn>`): Array of standard/custom Angular Validator functions.
147
+ - `validators$` (`Observable<Array<ValidatorFn>>`): Stream of validator functions to change validators dynamically.
148
+ - *Configured at the inner `config` level.*
149
+
150
+ 4. **Options** (Only for components with choice selection like `select` and `radio`):
151
+ - `options` (`Array<NgsFormsFormInputOption>`): Static array of choices `{ id: string | number, label: string, disabled?: boolean }`.
152
+ - `options$` (`Observable<Array<NgsFormsFormInputOption>>`): Stream to dynamically populate choices.
153
+ - *Configured at the inner `config` level.*
154
+
155
+ > [!TIP]
156
+ > By supplying **Observable** streams (such as `visible$`, `disabled$`, `validators$`, or `options$`), you can build highly dynamic and reactive forms. Because these observables can be piped directly from the form service's value change stream (`this.ngsFormsService.formValue$`), fields can dynamically enable/disable, appear/disappear, change options, or update validation rules in real-time based on user input in other fields.
157
+
158
+ ---
159
+
45
160
  ## Available Components & Schemas
46
161
 
47
- ### 1. Material Text Input (`input-text`)
48
- Uses `NgsFormsMaterialFormItemInputComponent`.
162
+ Here is the full list of available Material components along with code examples showing their required and optional configuration parameters:
49
163
 
50
- - **Selector/Key**: `input-text`
51
- - **Config Type**: Object containing `name`, `label`, `placeholder`, `type`.
52
- - **Features**: Leverages `<mat-form-field>` appearance="outline", supports `<mat-error>` validation hooks, and custom HTML input types (`email`, `password`, `text`).
164
+ ### 1. Text Input (`input-text`)
165
+ Uses `NgsFormsMaterialFormItemInputComponent`.
166
+ - **Key**: `input-text`
167
+ - **Config Type**: `NgsFormsFormItemConfigBaseTextInput`
53
168
 
54
169
  ```typescript
55
170
  import { NgsFormsMaterialFormItemInputComponent } from '@ng-simplicity/forms-material';
56
171
  import { Validators } from '@angular/forms';
57
172
 
58
- const passwordField = NgsFormsMaterialFormItemInputComponent.create({
59
- name: 'password',
60
- label: 'Password',
61
- placeholder: 'Type password...',
62
- type: 'password',
63
- validators: [Validators.required, Validators.minLength(8)]
173
+ const emailField = NgsFormsMaterialFormItemInputComponent.create({
174
+ // Required Parameters
175
+ name: 'email',
176
+ label: 'Email Address',
177
+
178
+ // Optional Parameters
179
+ id: 'custom-email-id',
180
+ placeholder: 'Enter your email address...',
181
+ type: 'email', // 'text' | 'email' | 'password'
182
+ value: 'default@domain.com', // Initial value
183
+ disabled: false,
184
+ validators: [Validators.required, Validators.email],
185
+ errorMessageMap: {
186
+ required: 'Email is required.',
187
+ email: 'Must be a valid email format.'
188
+ }
64
189
  });
65
190
  ```
66
191
 
67
- ### 2. Material Text Area (`input-textarea`)
192
+ ### 2. Text Area (`input-textarea`)
68
193
  Uses `NgsFormsMaterialFormItemTextAreaComponent`.
69
-
70
- - **Selector/Key**: `input-textarea`
71
- - **Config Type**: Object containing `name`, `label`, `placeholder`, `rows`.
72
- - **Features**: Outlined MatFormField container housing a multi-line auto-resizing text area.
194
+ - **Key**: `input-textarea`
195
+ - **Config Type**: `any`
73
196
 
74
197
  ```typescript
75
198
  import { NgsFormsMaterialFormItemTextAreaComponent } from '@ng-simplicity/forms-material';
199
+ import { Validators } from '@angular/forms';
76
200
 
77
- const messageField = NgsFormsMaterialFormItemTextAreaComponent.create({
201
+ const commentsField = NgsFormsMaterialFormItemTextAreaComponent.create({
202
+ // Required Parameters
78
203
  name: 'comments',
79
- label: 'Additional Comments',
80
- placeholder: 'Leave a note...',
81
- rows: 4
204
+ label: 'Comments',
205
+
206
+ // Optional Parameters
207
+ id: 'custom-comments-id',
208
+ placeholder: 'Leave us feedback...',
209
+ value: '',
210
+ rows: 5, // Custom number of visible rows (default is 3)
211
+ disabled: false,
212
+ validators: [Validators.required],
213
+ errorMessageMap: {
214
+ required: 'Comments cannot be blank.'
215
+ }
216
+ });
217
+ ```
218
+
219
+ ### 3. Checkbox (`checkbox`)
220
+ Uses `NgsFormsMaterialFormItemCheckboxComponent`.
221
+ - **Key**: `checkbox`
222
+ - **Config Type**: `NgsFormsFormItemConfigBaseInput`
223
+
224
+ ```typescript
225
+ import { NgsFormsMaterialFormItemCheckboxComponent } from '@ng-simplicity/forms-material';
226
+ import { Validators } from '@angular/forms';
227
+
228
+ const acceptTermsField = NgsFormsMaterialFormItemCheckboxComponent.create({
229
+ // Required Parameters
230
+ name: 'agreeTerms',
231
+ label: 'I accept the Terms and Conditions',
232
+
233
+ // Optional Parameters
234
+ id: 'terms-checkbox-id',
235
+ value: false, // Initial checked state
236
+ disabled: false,
237
+ validators: [Validators.requiredTrue],
238
+ errorMessageMap: {
239
+ required: 'You must agree to the terms to proceed.'
240
+ }
241
+ });
242
+ ```
243
+
244
+ ### 4. Select Dropdown (`select`)
245
+ Uses `NgsFormsMaterialFormItemSelectInputComponent`.
246
+ - **Key**: `select`
247
+ - **Config Type**: `NgsFormsFormItemConfigMaterialSelectInput`
248
+
249
+ ```typescript
250
+ import { NgsFormsMaterialFormItemSelectInputComponent } from '@ng-simplicity/forms-material';
251
+ import { Validators } from '@angular/forms';
252
+
253
+ const roleSelectField = NgsFormsMaterialFormItemSelectInputComponent.create({
254
+ // Required Parameters
255
+ name: 'role',
256
+ label: 'User Role',
257
+
258
+ // Optional Parameters
259
+ id: 'role-select-id',
260
+ placeholder: 'Choose a role...', // Disabled placeholder text
261
+ placeHolderValue: '', // Custom value for placeholder selection
262
+ value: 'member', // Initial selected option ID
263
+ disabled: false,
264
+ options: [
265
+ { id: 'admin', label: 'Administrator' },
266
+ { id: 'member', label: 'Regular Member', disabled: false },
267
+ { id: 'guest', label: 'Guest User', disabled: true }
268
+ ],
269
+ validators: [Validators.required],
270
+ errorMessageMap: {
271
+ required: 'Please select a role.'
272
+ }
273
+ });
274
+ ```
275
+
276
+ ### 5. Radio Buttons (`radio`)
277
+ Uses `NgsFormsMaterialRadioInputComponent`.
278
+ - **Key**: `radio`
279
+ - **Config Type**: `NgsFormsFormItemConfigMaterialRadio`
280
+
281
+ ```typescript
282
+ import { NgsFormsMaterialRadioInputComponent } from '@ng-simplicity/forms-material';
283
+ import { Validators } from '@angular/forms';
284
+
285
+ const genderField = NgsFormsMaterialRadioInputComponent.create({
286
+ // Required Parameters
287
+ name: 'gender',
288
+ label: 'Gender Identity',
289
+
290
+ // Optional Parameters
291
+ id: 'gender-radio-id',
292
+ value: 'other', // Initial selected radio option ID
293
+ alignment: 'horizontal', // 'horizontal' | 'vertical' (default is 'vertical')
294
+ disabled: false,
295
+ options: [
296
+ { id: 'female', label: 'Female' },
297
+ { id: 'male', label: 'Male' },
298
+ { id: 'other', label: 'Other/Prefer not to say' }
299
+ ],
300
+ validators: [Validators.required],
301
+ errorMessageMap: {
302
+ required: 'Please choose one option.'
303
+ }
82
304
  });
83
305
  ```
84
306
 
@@ -96,3 +318,17 @@ To run with coverage enabled:
96
318
  ```bash
97
319
  nx test forms-material --codeCoverage
98
320
  ```
321
+
322
+ ---
323
+
324
+ ## Example Applications
325
+
326
+ Fully functional example applications demonstrating the form engine functionality are located in the [`apps/`](../../apps) folder of this monorepo:
327
+ - **`forms-bootstrap-demo`**: Integrates and showcases the `@ng-simplicity/forms-bootstrap` package.
328
+ - **`forms-material-demo`**: Integrates and showcases the `@ng-simplicity/forms-material` package.
329
+
330
+ ---
331
+
332
+ ## Support & Contributions
333
+
334
+ If you have feature suggestions, need a feature to make `@ng-simplicity/forms-material` work for your project, or encounter any bugs, please log an issue in the GitHub issue tracker.
@@ -19,34 +19,39 @@ class NgsFormsMaterialFormItemCheckboxComponent extends NgsFormsBaseClassFormInp
19
19
  static key = 'checkbox';
20
20
  static create(config) {
21
21
  return {
22
- uuid: v4(),
22
+ uuid: config.uuid || v4(),
23
23
  type: NgsFormsMaterialFormItemCheckboxComponent.key,
24
24
  config,
25
25
  };
26
26
  }
27
27
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
28
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsMaterialFormItemCheckboxComponent, isStandalone: true, selector: "ngs-forms-mat-checkbox", usesInheritance: true, ngImport: i0, template: "@if (control) {\n <div class=\"mb-3\">\n <mat-checkbox [formControl]=\"control\">\n {{ config.label }}\n </mat-checkbox>\n @if (errorMessage) {\n <div class=\"mt-1 ms-4\" style=\"font-size: 0.75rem; color: #f44336;\">{{ errorMessage }}</div>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
28
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsMaterialFormItemCheckboxComponent, isStandalone: true, selector: "ngs-forms-mat-checkbox", usesInheritance: true, ngImport: i0, template: "@if (control) {\n <div class=\"mb-3\">\n <mat-checkbox [formControl]=\"control\" [aria-describedby]=\"errorMessage ? id + '-error' : ''\">\n {{ config.label }}\n </mat-checkbox>\n @if (errorMessage) {\n <div class=\"mt-1 ms-4\" id=\"{{id}}-error\" style=\"font-size: 0.75rem; color: #f44336;\">{{ errorMessage }}</div>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
29
29
  }
30
30
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemCheckboxComponent, decorators: [{
31
31
  type: Component,
32
- args: [{ selector: 'ngs-forms-mat-checkbox', imports: [ReactiveFormsModule, MatCheckboxModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control) {\n <div class=\"mb-3\">\n <mat-checkbox [formControl]=\"control\">\n {{ config.label }}\n </mat-checkbox>\n @if (errorMessage) {\n <div class=\"mt-1 ms-4\" style=\"font-size: 0.75rem; color: #f44336;\">{{ errorMessage }}</div>\n }\n </div>\n}\n" }]
32
+ args: [{ selector: 'ngs-forms-mat-checkbox', imports: [ReactiveFormsModule, MatCheckboxModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control) {\n <div class=\"mb-3\">\n <mat-checkbox [formControl]=\"control\" [aria-describedby]=\"errorMessage ? id + '-error' : ''\">\n {{ config.label }}\n </mat-checkbox>\n @if (errorMessage) {\n <div class=\"mt-1 ms-4\" id=\"{{id}}-error\" style=\"font-size: 0.75rem; color: #f44336;\">{{ errorMessage }}</div>\n }\n </div>\n}\n" }]
33
33
  }] });
34
34
 
35
35
  class NgsFormsMaterialFormItemInputComponent extends NgsFormsBaseClassFormInputComponent {
36
36
  static key = 'input-text';
37
+ matcher = {
38
+ isErrorState: (control) => {
39
+ return !!(control && control.invalid && (control.touched || control.dirty || this.submitted()));
40
+ }
41
+ };
37
42
  static create(config) {
38
43
  return {
39
- uuid: v4(),
44
+ uuid: config.uuid || v4(),
40
45
  type: NgsFormsMaterialFormItemInputComponent.key,
41
46
  config,
42
47
  };
43
48
  }
44
49
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
45
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsMaterialFormItemInputComponent, isStandalone: true, selector: "ngs-forms-mat-input", usesInheritance: true, ngImport: i0, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <input matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [type]=\"config.type || 'text'\" />\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatFormFieldModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
50
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsMaterialFormItemInputComponent, isStandalone: true, selector: "ngs-forms-mat-input", usesInheritance: true, ngImport: i0, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <input matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [type]=\"config.type || 'text'\" [errorStateMatcher]=\"matcher\" />\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatFormFieldModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
46
51
  }
47
52
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemInputComponent, decorators: [{
48
53
  type: Component,
49
- args: [{ selector: 'ngs-forms-mat-input', imports: [ReactiveFormsModule, MatInputModule, MatFormFieldModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <input matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [type]=\"config.type || 'text'\" />\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n" }]
54
+ args: [{ selector: 'ngs-forms-mat-input', imports: [ReactiveFormsModule, MatInputModule, MatFormFieldModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <input matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [type]=\"config.type || 'text'\" [errorStateMatcher]=\"matcher\" />\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n" }]
50
55
  }] });
51
56
 
52
57
  class NgsFormsMaterialRadioInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent {
@@ -54,52 +59,62 @@ class NgsFormsMaterialRadioInputComponent extends NgsFormsBaseClassFormItemInput
54
59
  radioConfig = this.config;
55
60
  static create(config) {
56
61
  return {
57
- uuid: v4(),
62
+ uuid: config.uuid || v4(),
58
63
  type: NgsFormsMaterialRadioInputComponent.key,
59
64
  config,
60
65
  };
61
66
  }
62
67
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialRadioInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
63
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsMaterialRadioInputComponent, isStandalone: true, selector: "ngs-forms-material-radio-group-input", usesInheritance: true, ngImport: i0, template: "@if (control) {\n <div class=\"ngs-material-radio-field mb-3\">\n @if (radioConfig.label) {\n <div class=\"ngs-material-radio-label\" [class.text-danger]=\"!!errorMessage\">\n {{ radioConfig.label }}\n </div>\n }\n <mat-radio-group\n [formControl]=\"control\"\n [class.ngs-material-radio-group-horizontal]=\"radioConfig.alignment === 'horizontal'\"\n [class.ngs-material-radio-group-vertical]=\"radioConfig.alignment !== 'horizontal'\"\n >\n @for (option of options(); track option.id) {\n <mat-radio-button [disabled]=\"option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-radio-button>\n }\n </mat-radio-group>\n @if (errorMessage) {\n <div class=\"ngs-material-control-error\">{{ errorMessage }}</div>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i2$2.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$2.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsMaterialRadioInputComponent, isStandalone: true, selector: "ngs-forms-material-radio-group-input", usesInheritance: true, ngImport: i0, template: "@if (control) {\n <div class=\"ngs-material-radio-field mb-3\">\n @if (radioConfig.label) {\n <div class=\"ngs-material-radio-label\" [class.text-danger]=\"!!errorMessage\" id=\"{{id}}-label\">\n {{ radioConfig.label }}\n </div>\n }\n <mat-radio-group\n [formControl]=\"control\"\n [class.ngs-material-radio-group-horizontal]=\"radioConfig.alignment === 'horizontal'\"\n [class.ngs-material-radio-group-vertical]=\"radioConfig.alignment !== 'horizontal'\"\n [attr.aria-labelledby]=\"radioConfig.label ? id + '-label' : null\"\n [attr.aria-describedby]=\"errorMessage ? id + '-error' : null\"\n >\n @for (option of options(); track option.id) {\n <mat-radio-button [disabled]=\"!!option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-radio-button>\n }\n </mat-radio-group>\n @if (errorMessage) {\n <div class=\"ngs-material-control-error\" id=\"{{id}}-error\">{{ errorMessage }}</div>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i2$2.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$2.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
64
69
  }
65
70
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialRadioInputComponent, decorators: [{
66
71
  type: Component,
67
- args: [{ selector: 'ngs-forms-material-radio-group-input', imports: [ReactiveFormsModule, MatRadioModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control) {\n <div class=\"ngs-material-radio-field mb-3\">\n @if (radioConfig.label) {\n <div class=\"ngs-material-radio-label\" [class.text-danger]=\"!!errorMessage\">\n {{ radioConfig.label }}\n </div>\n }\n <mat-radio-group\n [formControl]=\"control\"\n [class.ngs-material-radio-group-horizontal]=\"radioConfig.alignment === 'horizontal'\"\n [class.ngs-material-radio-group-vertical]=\"radioConfig.alignment !== 'horizontal'\"\n >\n @for (option of options(); track option.id) {\n <mat-radio-button [disabled]=\"option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-radio-button>\n }\n </mat-radio-group>\n @if (errorMessage) {\n <div class=\"ngs-material-control-error\">{{ errorMessage }}</div>\n }\n </div>\n}\n" }]
72
+ args: [{ selector: 'ngs-forms-material-radio-group-input', imports: [ReactiveFormsModule, MatRadioModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control) {\n <div class=\"ngs-material-radio-field mb-3\">\n @if (radioConfig.label) {\n <div class=\"ngs-material-radio-label\" [class.text-danger]=\"!!errorMessage\" id=\"{{id}}-label\">\n {{ radioConfig.label }}\n </div>\n }\n <mat-radio-group\n [formControl]=\"control\"\n [class.ngs-material-radio-group-horizontal]=\"radioConfig.alignment === 'horizontal'\"\n [class.ngs-material-radio-group-vertical]=\"radioConfig.alignment !== 'horizontal'\"\n [attr.aria-labelledby]=\"radioConfig.label ? id + '-label' : null\"\n [attr.aria-describedby]=\"errorMessage ? id + '-error' : null\"\n >\n @for (option of options(); track option.id) {\n <mat-radio-button [disabled]=\"!!option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-radio-button>\n }\n </mat-radio-group>\n @if (errorMessage) {\n <div class=\"ngs-material-control-error\" id=\"{{id}}-error\">{{ errorMessage }}</div>\n }\n </div>\n}\n" }]
68
73
  }] });
69
74
 
70
75
  class NgsFormsMaterialFormItemSelectInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent {
71
76
  static key = 'select';
72
77
  selectConfig = this.config;
78
+ matcher = {
79
+ isErrorState: (control) => {
80
+ return !!(control && control.invalid && (control.touched || control.dirty || this.submitted()));
81
+ }
82
+ };
73
83
  static create(config) {
74
84
  return {
75
- uuid: v4(),
85
+ uuid: config.uuid || v4(),
76
86
  type: NgsFormsMaterialFormItemSelectInputComponent.key,
77
87
  config,
78
88
  };
79
89
  }
80
90
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemSelectInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
81
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsMaterialFormItemSelectInputComponent, isStandalone: true, selector: "ngs-forms-material-select-input", usesInheritance: true, ngImport: i0, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (selectConfig.label) {\n <mat-label>{{ selectConfig.label }}</mat-label>\n }\n <mat-select [formControl]=\"control\" [attr.aria-label]=\"selectConfig.label\">\n @if (selectConfig.placeholder) {\n <mat-option [disabled]=\"true\" [value]=\"selectConfig.placeHolderValue || ''\">\n {{ selectConfig.placeholder }}\n </mat-option>\n }\n @for (option of options(); track option.id) {\n <mat-option [disabled]=\"option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-option>\n }\n </mat-select>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
91
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsMaterialFormItemSelectInputComponent, isStandalone: true, selector: "ngs-forms-material-select-input", usesInheritance: true, ngImport: i0, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (selectConfig.label) {\n <mat-label>{{ selectConfig.label }}</mat-label>\n }\n <mat-select [formControl]=\"control\" [attr.aria-label]=\"selectConfig.label\" [errorStateMatcher]=\"matcher\">\n @if (selectConfig.placeholder) {\n <mat-option [disabled]=\"true\" [value]=\"selectConfig.placeHolderValue || ''\">\n {{ selectConfig.placeholder }}\n </mat-option>\n }\n @for (option of options(); track option.id) {\n <mat-option [disabled]=\"!!option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-option>\n }\n </mat-select>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
82
92
  }
83
93
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemSelectInputComponent, decorators: [{
84
94
  type: Component,
85
- args: [{ selector: 'ngs-forms-material-select-input', imports: [ReactiveFormsModule, MatFormFieldModule, MatSelectModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (selectConfig.label) {\n <mat-label>{{ selectConfig.label }}</mat-label>\n }\n <mat-select [formControl]=\"control\" [attr.aria-label]=\"selectConfig.label\">\n @if (selectConfig.placeholder) {\n <mat-option [disabled]=\"true\" [value]=\"selectConfig.placeHolderValue || ''\">\n {{ selectConfig.placeholder }}\n </mat-option>\n }\n @for (option of options(); track option.id) {\n <mat-option [disabled]=\"option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-option>\n }\n </mat-select>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n" }]
95
+ args: [{ selector: 'ngs-forms-material-select-input', imports: [ReactiveFormsModule, MatFormFieldModule, MatSelectModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (selectConfig.label) {\n <mat-label>{{ selectConfig.label }}</mat-label>\n }\n <mat-select [formControl]=\"control\" [attr.aria-label]=\"selectConfig.label\" [errorStateMatcher]=\"matcher\">\n @if (selectConfig.placeholder) {\n <mat-option [disabled]=\"true\" [value]=\"selectConfig.placeHolderValue || ''\">\n {{ selectConfig.placeholder }}\n </mat-option>\n }\n @for (option of options(); track option.id) {\n <mat-option [disabled]=\"!!option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-option>\n }\n </mat-select>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n" }]
86
96
  }] });
87
97
 
88
98
  class NgsFormsMaterialFormItemTextAreaComponent extends NgsFormsBaseClassFormInputComponent {
89
99
  static key = 'input-textarea';
100
+ matcher = {
101
+ isErrorState: (control) => {
102
+ return !!(control && control.invalid && (control.touched || control.dirty || this.submitted()));
103
+ }
104
+ };
90
105
  static create(config) {
91
106
  return {
92
- uuid: v4(),
107
+ uuid: config.uuid || v4(),
93
108
  type: NgsFormsMaterialFormItemTextAreaComponent.key,
94
109
  config,
95
110
  };
96
111
  }
97
112
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemTextAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
98
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsMaterialFormItemTextAreaComponent, isStandalone: true, selector: "ngs-forms-mat-textarea", usesInheritance: true, ngImport: i0, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <textarea matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [rows]=\"config.rows || 3\"></textarea>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatFormFieldModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
113
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: NgsFormsMaterialFormItemTextAreaComponent, isStandalone: true, selector: "ngs-forms-mat-textarea", usesInheritance: true, ngImport: i0, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <textarea matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [rows]=\"config.rows || 3\" [errorStateMatcher]=\"matcher\"></textarea>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatFormFieldModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
99
114
  }
100
115
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemTextAreaComponent, decorators: [{
101
116
  type: Component,
102
- args: [{ selector: 'ngs-forms-mat-textarea', imports: [ReactiveFormsModule, MatInputModule, MatFormFieldModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <textarea matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [rows]=\"config.rows || 3\"></textarea>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n" }]
117
+ args: [{ selector: 'ngs-forms-mat-textarea', imports: [ReactiveFormsModule, MatInputModule, MatFormFieldModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <textarea matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [rows]=\"config.rows || 3\" [errorStateMatcher]=\"matcher\"></textarea>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n" }]
103
118
  }] });
104
119
 
105
120
  class NgsFormsMaterialModule {
@@ -1 +1 @@
1
- {"version":3,"file":"ng-simplicity-forms-material.mjs","sources":["../../../../libs/forms-material/src/lib/form-components/checkbox/checkbox.component.ts","../../../../libs/forms-material/src/lib/form-components/checkbox/checkbox.component.html","../../../../libs/forms-material/src/lib/form-components/input/input.component.ts","../../../../libs/forms-material/src/lib/form-components/input/input.component.html","../../../../libs/forms-material/src/lib/form-components/radio/radio.component.ts","../../../../libs/forms-material/src/lib/form-components/radio/radio.component.html","../../../../libs/forms-material/src/lib/form-components/select/select.component.ts","../../../../libs/forms-material/src/lib/form-components/select/select.component.html","../../../../libs/forms-material/src/lib/form-components/text-area/text-area.component.ts","../../../../libs/forms-material/src/lib/form-components/text-area/text-area.component.html","../../../../libs/forms-material/src/lib/forms-material.module.ts","../../../../libs/forms-material/src/ng-simplicity-forms-material.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport {\n NgsFormsBaseClassFormInputComponent,\n NgsFormsFormItem,\n NgsFormsFormItemConfigBaseInput,\n} from '@ng-simplicity/forms-core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-mat-checkbox',\n imports: [ReactiveFormsModule, MatCheckboxModule],\n templateUrl: './checkbox.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsMaterialFormItemCheckboxComponent extends NgsFormsBaseClassFormInputComponent<NgsFormsFormItemConfigBaseInput> {\n static override key = 'checkbox';\n\n static create(config: NgsFormsFormItemConfigBaseInput): NgsFormsFormItem<NgsFormsFormItemConfigBaseInput> {\n return {\n uuid: v4(),\n type: NgsFormsMaterialFormItemCheckboxComponent.key,\n config,\n };\n }\n}\n","@if (control) {\n <div class=\"mb-3\">\n <mat-checkbox [formControl]=\"control\">\n {{ config.label }}\n </mat-checkbox>\n @if (errorMessage) {\n <div class=\"mt-1 ms-4\" style=\"font-size: 0.75rem; color: #f44336;\">{{ errorMessage }}</div>\n }\n </div>\n}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsBaseClassFormInputComponent, NgsFormsFormItem } from '@ng-simplicity/forms-core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-mat-input',\n imports: [ReactiveFormsModule, MatInputModule, MatFormFieldModule],\n templateUrl: './input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsMaterialFormItemInputComponent extends NgsFormsBaseClassFormInputComponent<any> {\n static override key = 'input-text';\n\n static create(config: any): NgsFormsFormItem<any> {\n return {\n uuid: v4(),\n type: NgsFormsMaterialFormItemInputComponent.key,\n config,\n };\n }\n}\n","@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <input matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [type]=\"config.type || 'text'\" />\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatRadioModule } from '@angular/material/radio';\nimport {\n NgsFormsBaseClassFormItemInputWithOptionsComponent,\n NgsFormsFormItem,\n NgsFormsFormItemConfigBaseInputWithOptions,\n} from '@ng-simplicity/forms-core';\nimport { v4 } from 'uuid';\n\nexport interface NgsFormsFormItemConfigMaterialRadio extends NgsFormsFormItemConfigBaseInputWithOptions {\n alignment?: 'horizontal' | 'vertical';\n}\n\n@Component({\n selector: 'ngs-forms-material-radio-group-input',\n imports: [ReactiveFormsModule, MatRadioModule],\n templateUrl: './radio.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsMaterialRadioInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent<NgsFormsFormItemConfigMaterialRadio> {\n static override key = 'radio';\n radioConfig = this.config as NgsFormsFormItemConfigMaterialRadio;\n\n static create(config: NgsFormsFormItemConfigMaterialRadio): NgsFormsFormItem<NgsFormsFormItemConfigMaterialRadio> {\n return {\n uuid: v4(),\n type: NgsFormsMaterialRadioInputComponent.key,\n config,\n };\n }\n}\n","@if (control) {\n <div class=\"ngs-material-radio-field mb-3\">\n @if (radioConfig.label) {\n <div class=\"ngs-material-radio-label\" [class.text-danger]=\"!!errorMessage\">\n {{ radioConfig.label }}\n </div>\n }\n <mat-radio-group\n [formControl]=\"control\"\n [class.ngs-material-radio-group-horizontal]=\"radioConfig.alignment === 'horizontal'\"\n [class.ngs-material-radio-group-vertical]=\"radioConfig.alignment !== 'horizontal'\"\n >\n @for (option of options(); track option.id) {\n <mat-radio-button [disabled]=\"option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-radio-button>\n }\n </mat-radio-group>\n @if (errorMessage) {\n <div class=\"ngs-material-control-error\">{{ errorMessage }}</div>\n }\n </div>\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport {\n NgsFormsBaseClassFormItemInputWithOptionsComponent,\n NgsFormsFormItem,\n NgsFormsFormItemConfigBaseInputWithOptions,\n} from '@ng-simplicity/forms-core';\nimport { v4 } from 'uuid';\n\nexport interface NgsFormsFormItemConfigMaterialSelectInput extends NgsFormsFormItemConfigBaseInputWithOptions {\n placeholder?: string;\n placeHolderValue?: string;\n}\n\n@Component({\n selector: 'ngs-forms-material-select-input',\n imports: [ReactiveFormsModule, MatFormFieldModule, MatSelectModule],\n templateUrl: './select.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsMaterialFormItemSelectInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent<NgsFormsFormItemConfigMaterialSelectInput> {\n static override key = 'select';\n selectConfig = this.config as NgsFormsFormItemConfigMaterialSelectInput;\n\n static create(\n config: NgsFormsFormItemConfigMaterialSelectInput\n ): NgsFormsFormItem<NgsFormsFormItemConfigMaterialSelectInput> {\n return {\n uuid: v4(),\n type: NgsFormsMaterialFormItemSelectInputComponent.key,\n config,\n };\n }\n}\n","@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (selectConfig.label) {\n <mat-label>{{ selectConfig.label }}</mat-label>\n }\n <mat-select [formControl]=\"control\" [attr.aria-label]=\"selectConfig.label\">\n @if (selectConfig.placeholder) {\n <mat-option [disabled]=\"true\" [value]=\"selectConfig.placeHolderValue || ''\">\n {{ selectConfig.placeholder }}\n </mat-option>\n }\n @for (option of options(); track option.id) {\n <mat-option [disabled]=\"option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-option>\n }\n </mat-select>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsBaseClassFormInputComponent, NgsFormsFormItem } from '@ng-simplicity/forms-core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-mat-textarea',\n imports: [ReactiveFormsModule, MatInputModule, MatFormFieldModule],\n templateUrl: './text-area.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsMaterialFormItemTextAreaComponent extends NgsFormsBaseClassFormInputComponent<any> {\n static override key = 'input-textarea';\n\n static create(config: any): NgsFormsFormItem<any> {\n return {\n uuid: v4(),\n type: NgsFormsMaterialFormItemTextAreaComponent.key,\n config,\n };\n }\n}\n","@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <textarea matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [rows]=\"config.rows || 3\"></textarea>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n","import { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { NgsFormsComponentRegistryService, NgsFormsCoreModule } from '@ng-simplicity/forms-core';\nimport {\n NgsFormsMaterialFormItemCheckboxComponent,\n NgsFormsMaterialFormItemInputComponent,\n NgsFormsMaterialFormItemSelectInputComponent,\n NgsFormsMaterialRadioInputComponent,\n NgsFormsMaterialFormItemTextAreaComponent\n} from './form-components';\n\n@NgModule({\n imports: [CommonModule, FormsModule, ReactiveFormsModule, NgsFormsCoreModule],\n})\nexport class NgsFormsMaterialModule {\n static registerAllMaterialComponents(registryService: NgsFormsComponentRegistryService) {\n NgsFormsCoreModule.registerCoreNgsFormComponents(registryService);\n registryService.register(NgsFormsMaterialFormItemCheckboxComponent.key, NgsFormsMaterialFormItemCheckboxComponent);\n registryService.register(NgsFormsMaterialFormItemInputComponent.key, NgsFormsMaterialFormItemInputComponent);\n registryService.register(NgsFormsMaterialRadioInputComponent.key, NgsFormsMaterialRadioInputComponent);\n registryService.register(NgsFormsMaterialFormItemSelectInputComponent.key, NgsFormsMaterialFormItemSelectInputComponent);\n registryService.register(NgsFormsMaterialFormItemTextAreaComponent.key, NgsFormsMaterialFormItemTextAreaComponent);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;;;;;AAgBM,MAAO,yCAA0C,SAAQ,mCAAoE,CAAA;AACjI,IAAA,OAAgB,GAAG,GAAG,UAAU;IAEhC,OAAO,MAAM,CAAC,MAAuC,EAAA;QACnD,OAAO;YACL,IAAI,EAAE,EAAE,EAAE;YACV,IAAI,EAAE,yCAAyC,CAAC,GAAG;YACnD,MAAM;SACP;IACH;wGATW,yCAAyC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAzC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yCAAyC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,eAAA,EAAA,IAAA,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C,QAAQ,CAAC,mCAAmC,CAAC,GAAG,EAAE,mCAAmC,CAAC;QACtG,eAAe,CAAC,QAAQ,CAAC,4CAA4C,CAAC,GAAG,EAAE,4CAA4C,CAAC;QACxH,eAAe,CAAC,QAAQ,CAAC,yCAAyC,CAAC,GAAG,EAAE,yCAAyC,CAAC;IACpH;wGARW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAFvB,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,CAAA,EAAA,CAAA;AAEjE,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAFvB,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,CAAA,EAAA,CAAA;;4FAEjE,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,kBAAkB,CAAC;AAC9E,iBAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-simplicity-forms-material.mjs","sources":["../../../../libs/forms-material/src/lib/form-components/checkbox/checkbox.component.ts","../../../../libs/forms-material/src/lib/form-components/checkbox/checkbox.component.html","../../../../libs/forms-material/src/lib/form-components/input/input.component.ts","../../../../libs/forms-material/src/lib/form-components/input/input.component.html","../../../../libs/forms-material/src/lib/form-components/radio/radio.component.ts","../../../../libs/forms-material/src/lib/form-components/radio/radio.component.html","../../../../libs/forms-material/src/lib/form-components/select/select.component.ts","../../../../libs/forms-material/src/lib/form-components/select/select.component.html","../../../../libs/forms-material/src/lib/form-components/text-area/text-area.component.ts","../../../../libs/forms-material/src/lib/form-components/text-area/text-area.component.html","../../../../libs/forms-material/src/lib/forms-material.module.ts","../../../../libs/forms-material/src/ng-simplicity-forms-material.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport {\n NgsFormsBaseClassFormInputComponent,\n NgsFormsFormItem,\n NgsFormsFormItemConfigBaseInput,\n} from '@ng-simplicity/forms-core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-mat-checkbox',\n imports: [ReactiveFormsModule, MatCheckboxModule],\n templateUrl: './checkbox.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsMaterialFormItemCheckboxComponent extends NgsFormsBaseClassFormInputComponent<NgsFormsFormItemConfigBaseInput> {\n static override key = 'checkbox';\n\n static create(config: NgsFormsFormItemConfigBaseInput): NgsFormsFormItem<NgsFormsFormItemConfigBaseInput> {\n return {\n uuid: config.uuid || v4(),\n type: NgsFormsMaterialFormItemCheckboxComponent.key,\n config,\n };\n }\n}\n","@if (control) {\n <div class=\"mb-3\">\n <mat-checkbox [formControl]=\"control\" [aria-describedby]=\"errorMessage ? id + '-error' : ''\">\n {{ config.label }}\n </mat-checkbox>\n @if (errorMessage) {\n <div class=\"mt-1 ms-4\" id=\"{{id}}-error\" style=\"font-size: 0.75rem; color: #f44336;\">{{ errorMessage }}</div>\n }\n </div>\n}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsBaseClassFormInputComponent, NgsFormsFormItem } from '@ng-simplicity/forms-core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-mat-input',\n imports: [ReactiveFormsModule, MatInputModule, MatFormFieldModule],\n templateUrl: './input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsMaterialFormItemInputComponent extends NgsFormsBaseClassFormInputComponent<any> {\n static override key = 'input-text';\n\n matcher = {\n isErrorState: (control: FormControl | null): boolean => {\n return !!(control && control.invalid && (control.touched || control.dirty || this.submitted()));\n }\n };\n\n static create(config: any): NgsFormsFormItem<any> {\n return {\n uuid: config.uuid || v4(),\n type: NgsFormsMaterialFormItemInputComponent.key,\n config,\n };\n }\n}\n","@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <input matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [type]=\"config.type || 'text'\" [errorStateMatcher]=\"matcher\" />\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatRadioModule } from '@angular/material/radio';\nimport {\n NgsFormsBaseClassFormItemInputWithOptionsComponent,\n NgsFormsFormItem,\n NgsFormsFormItemConfigBaseInputWithOptions,\n} from '@ng-simplicity/forms-core';\nimport { v4 } from 'uuid';\n\nexport interface NgsFormsFormItemConfigMaterialRadio extends NgsFormsFormItemConfigBaseInputWithOptions {\n alignment?: 'horizontal' | 'vertical';\n}\n\n@Component({\n selector: 'ngs-forms-material-radio-group-input',\n imports: [ReactiveFormsModule, MatRadioModule],\n templateUrl: './radio.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsMaterialRadioInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent<NgsFormsFormItemConfigMaterialRadio> {\n static override key = 'radio';\n radioConfig = this.config as NgsFormsFormItemConfigMaterialRadio;\n\n static create(config: NgsFormsFormItemConfigMaterialRadio): NgsFormsFormItem<NgsFormsFormItemConfigMaterialRadio> {\n return {\n uuid: config.uuid || v4(),\n type: NgsFormsMaterialRadioInputComponent.key,\n config,\n };\n }\n}\n","@if (control) {\n <div class=\"ngs-material-radio-field mb-3\">\n @if (radioConfig.label) {\n <div class=\"ngs-material-radio-label\" [class.text-danger]=\"!!errorMessage\" id=\"{{id}}-label\">\n {{ radioConfig.label }}\n </div>\n }\n <mat-radio-group\n [formControl]=\"control\"\n [class.ngs-material-radio-group-horizontal]=\"radioConfig.alignment === 'horizontal'\"\n [class.ngs-material-radio-group-vertical]=\"radioConfig.alignment !== 'horizontal'\"\n [attr.aria-labelledby]=\"radioConfig.label ? id + '-label' : null\"\n [attr.aria-describedby]=\"errorMessage ? id + '-error' : null\"\n >\n @for (option of options(); track option.id) {\n <mat-radio-button [disabled]=\"!!option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-radio-button>\n }\n </mat-radio-group>\n @if (errorMessage) {\n <div class=\"ngs-material-control-error\" id=\"{{id}}-error\">{{ errorMessage }}</div>\n }\n </div>\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport {\n NgsFormsBaseClassFormItemInputWithOptionsComponent,\n NgsFormsFormItem,\n NgsFormsFormItemConfigBaseInputWithOptions,\n} from '@ng-simplicity/forms-core';\nimport { v4 } from 'uuid';\n\nexport interface NgsFormsFormItemConfigMaterialSelectInput extends NgsFormsFormItemConfigBaseInputWithOptions {\n placeholder?: string;\n placeHolderValue?: string;\n}\n\n@Component({\n selector: 'ngs-forms-material-select-input',\n imports: [ReactiveFormsModule, MatFormFieldModule, MatSelectModule],\n templateUrl: './select.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsMaterialFormItemSelectInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent<NgsFormsFormItemConfigMaterialSelectInput> {\n static override key = 'select';\n selectConfig = this.config as NgsFormsFormItemConfigMaterialSelectInput;\n\n matcher = {\n isErrorState: (control: FormControl | null): boolean => {\n return !!(control && control.invalid && (control.touched || control.dirty || this.submitted()));\n }\n };\n\n static create(\n config: NgsFormsFormItemConfigMaterialSelectInput\n ): NgsFormsFormItem<NgsFormsFormItemConfigMaterialSelectInput> {\n return {\n uuid: config.uuid || v4(),\n type: NgsFormsMaterialFormItemSelectInputComponent.key,\n config,\n };\n }\n}\n","@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (selectConfig.label) {\n <mat-label>{{ selectConfig.label }}</mat-label>\n }\n <mat-select [formControl]=\"control\" [attr.aria-label]=\"selectConfig.label\" [errorStateMatcher]=\"matcher\">\n @if (selectConfig.placeholder) {\n <mat-option [disabled]=\"true\" [value]=\"selectConfig.placeHolderValue || ''\">\n {{ selectConfig.placeholder }}\n </mat-option>\n }\n @for (option of options(); track option.id) {\n <mat-option [disabled]=\"!!option.disabled\" [value]=\"option.id\">\n {{ option.label }}\n </mat-option>\n }\n </mat-select>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { NgsFormsBaseClassFormInputComponent, NgsFormsFormItem } from '@ng-simplicity/forms-core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { v4 } from 'uuid';\n\n@Component({\n selector: 'ngs-forms-mat-textarea',\n imports: [ReactiveFormsModule, MatInputModule, MatFormFieldModule],\n templateUrl: './text-area.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgsFormsMaterialFormItemTextAreaComponent extends NgsFormsBaseClassFormInputComponent<any> {\n static override key = 'input-textarea';\n\n matcher = {\n isErrorState: (control: FormControl | null): boolean => {\n return !!(control && control.invalid && (control.touched || control.dirty || this.submitted()));\n }\n };\n\n static create(config: any): NgsFormsFormItem<any> {\n return {\n uuid: config.uuid || v4(),\n type: NgsFormsMaterialFormItemTextAreaComponent.key,\n config,\n };\n }\n}\n","@if (control) {\n <mat-form-field class=\"w-100 mb-2\" appearance=\"outline\">\n @if (config.label) {\n <mat-label>{{ config.label }}</mat-label>\n }\n <textarea matInput [formControl]=\"control\" [placeholder]=\"config.placeholder || ''\" [rows]=\"config.rows || 3\" [errorStateMatcher]=\"matcher\"></textarea>\n @if (errorMessage) {\n <mat-error>{{ errorMessage }}</mat-error>\n }\n </mat-form-field>\n}\n","import { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { NgsFormsComponentRegistryService, NgsFormsCoreModule } from '@ng-simplicity/forms-core';\nimport {\n NgsFormsMaterialFormItemCheckboxComponent,\n NgsFormsMaterialFormItemInputComponent,\n NgsFormsMaterialFormItemSelectInputComponent,\n NgsFormsMaterialRadioInputComponent,\n NgsFormsMaterialFormItemTextAreaComponent\n} from './form-components';\n\n@NgModule({\n imports: [CommonModule, FormsModule, ReactiveFormsModule, NgsFormsCoreModule],\n})\nexport class NgsFormsMaterialModule {\n static registerAllMaterialComponents(registryService: NgsFormsComponentRegistryService) {\n NgsFormsCoreModule.registerCoreNgsFormComponents(registryService);\n registryService.register(NgsFormsMaterialFormItemCheckboxComponent.key, NgsFormsMaterialFormItemCheckboxComponent);\n registryService.register(NgsFormsMaterialFormItemInputComponent.key, NgsFormsMaterialFormItemInputComponent);\n registryService.register(NgsFormsMaterialRadioInputComponent.key, NgsFormsMaterialRadioInputComponent);\n registryService.register(NgsFormsMaterialFormItemSelectInputComponent.key, NgsFormsMaterialFormItemSelectInputComponent);\n registryService.register(NgsFormsMaterialFormItemTextAreaComponent.key, NgsFormsMaterialFormItemTextAreaComponent);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\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ormsFormItemConfigBaseInput, NgsFormsFormItem, NgsFormsFormItemConfigBaseInputWithOptions, NgsFormsBaseClassFormItemInputWithOptionsComponent, NgsFormsComponentRegistryService } from '@ng-simplicity/forms-core';
3
3
  import * as i0 from '@angular/core';
4
- import * as i1 from '@angular/common';
5
4
  import * as i2 from '@angular/forms';
5
+ import { FormControl } from '@angular/forms';
6
+ import * as i1 from '@angular/common';
6
7
 
7
8
  declare class NgsFormsMaterialFormItemCheckboxComponent extends NgsFormsBaseClassFormInputComponent<NgsFormsFormItemConfigBaseInput> {
8
9
  static key: string;
@@ -13,6 +14,9 @@ declare class NgsFormsMaterialFormItemCheckboxComponent extends NgsFormsBaseClas
13
14
 
14
15
  declare class NgsFormsMaterialFormItemInputComponent extends NgsFormsBaseClassFormInputComponent<any> {
15
16
  static key: string;
17
+ matcher: {
18
+ isErrorState: (control: FormControl | null) => boolean;
19
+ };
16
20
  static create(config: any): NgsFormsFormItem<any>;
17
21
  static ɵfac: i0.ɵɵFactoryDeclaration<NgsFormsMaterialFormItemInputComponent, never>;
18
22
  static ɵcmp: i0.ɵɵComponentDeclaration<NgsFormsMaterialFormItemInputComponent, "ngs-forms-mat-input", never, {}, {}, never, never, true, never>;
@@ -36,6 +40,9 @@ interface NgsFormsFormItemConfigMaterialSelectInput extends NgsFormsFormItemConf
36
40
  declare class NgsFormsMaterialFormItemSelectInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent<NgsFormsFormItemConfigMaterialSelectInput> {
37
41
  static key: string;
38
42
  selectConfig: NgsFormsFormItemConfigMaterialSelectInput;
43
+ matcher: {
44
+ isErrorState: (control: FormControl | null) => boolean;
45
+ };
39
46
  static create(config: NgsFormsFormItemConfigMaterialSelectInput): NgsFormsFormItem<NgsFormsFormItemConfigMaterialSelectInput>;
40
47
  static ɵfac: i0.ɵɵFactoryDeclaration<NgsFormsMaterialFormItemSelectInputComponent, never>;
41
48
  static ɵcmp: i0.ɵɵComponentDeclaration<NgsFormsMaterialFormItemSelectInputComponent, "ngs-forms-material-select-input", never, {}, {}, never, never, true, never>;
@@ -43,6 +50,9 @@ declare class NgsFormsMaterialFormItemSelectInputComponent extends NgsFormsBaseC
43
50
 
44
51
  declare class NgsFormsMaterialFormItemTextAreaComponent extends NgsFormsBaseClassFormInputComponent<any> {
45
52
  static key: string;
53
+ matcher: {
54
+ isErrorState: (control: FormControl | null) => boolean;
55
+ };
46
56
  static create(config: any): NgsFormsFormItem<any>;
47
57
  static ɵfac: i0.ɵɵFactoryDeclaration<NgsFormsMaterialFormItemTextAreaComponent, never>;
48
58
  static ɵcmp: i0.ɵɵComponentDeclaration<NgsFormsMaterialFormItemTextAreaComponent, "ngs-forms-mat-textarea", never, {}, {}, never, never, true, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-simplicity/forms-material",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  "@angular/core": "^19.0.0 || ^20.0.0",
13
13
  "@angular/forms": "^19.0.0 || ^20.0.0",
14
14
  "@angular/material": "^19.0.0 || ^20.0.0",
15
- "@ng-simplicity/forms-core": "^1.0.0"
15
+ "@ng-simplicity/forms-core": "^1.1.0"
16
16
  },
17
17
  "sideEffects": false,
18
18
  "module": "fesm2022/ng-simplicity-forms-material.mjs",