@ng-simplicity/forms-material 1.0.0 → 1.0.1
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
|
|
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,283 @@ Make sure your application has active Material theming configured (either via an
|
|
|
21
21
|
|
|
22
22
|
## Quick Start & Registration
|
|
23
23
|
|
|
24
|
-
To
|
|
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 {
|
|
29
|
-
import {
|
|
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
|
-
|
|
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,
|
|
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({ name: 'contactForm' }, [
|
|
76
|
+
NgsFormsRowComponent.create({
|
|
77
|
+
items: [
|
|
78
|
+
NgsFormsMaterialFormItemInputComponent.create({
|
|
79
|
+
name: 'email',
|
|
80
|
+
label: 'Email Address',
|
|
81
|
+
placeholder: 'Enter your email...',
|
|
82
|
+
type: 'email',
|
|
83
|
+
validators: [Validators.required, Validators.email],
|
|
84
|
+
errorMessageMap: {
|
|
85
|
+
required: 'Email address is required.',
|
|
86
|
+
email: 'Please enter a valid email address.'
|
|
87
|
+
}
|
|
88
|
+
}),
|
|
89
|
+
NgsFormsMaterialFormItemTextAreaComponent.create({
|
|
90
|
+
name: 'message',
|
|
91
|
+
label: 'Your Message',
|
|
92
|
+
placeholder: 'Write your message...',
|
|
93
|
+
rows: 4
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
})
|
|
97
|
+
])
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// Initialize the dynamic form controls
|
|
101
|
+
this.ngsFormsService.setFormConfig(formConfig);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
onSubmit() {
|
|
105
|
+
if (this.ngsFormsService.isValid) {
|
|
106
|
+
console.log('Form data submitted:', this.ngsFormsService.formValue);
|
|
107
|
+
} else {
|
|
108
|
+
this.ngsFormsService.setIsSubmitted(true); // Highlights form validation errors
|
|
109
|
+
}
|
|
110
|
+
}
|
|
40
111
|
}
|
|
41
112
|
```
|
|
42
113
|
|
|
43
114
|
---
|
|
44
115
|
|
|
116
|
+
## Common Properties & Core Integration
|
|
117
|
+
|
|
118
|
+
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:
|
|
119
|
+
- **Form Groups**: `NgsFormsFormGroupComponent` (Key: `'form-group'`)
|
|
120
|
+
- **Sections**: `NgsFormsFormSectionComponent` (Key: `'section'`)
|
|
121
|
+
- **Row Containers**: `NgsFormsRowComponent` (Key: `'form-row'`)
|
|
122
|
+
- **Columns**: `NgsFormsColumnComponent` (Key: `'column'`)
|
|
123
|
+
- **Form Arrays & Support**: `NgsFormsFormArrayContainerComponent` (Key: `'form-array'`), `NgsFormsFormArrayAddItemComponent` (Key: `'form-array-add-item'`), and `NgsFormsFormArrayRemoveItemComponent` (Key: `'form-array-remove-item'`)
|
|
124
|
+
- **Static Content**: `NgsFormsHtmlContentComponent` (Key: `'content-html'`) and `NgsFormsTextDivComponent` (Key: `'text-div'`)
|
|
125
|
+
|
|
126
|
+
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.
|
|
127
|
+
|
|
128
|
+
### Common Control Properties
|
|
129
|
+
|
|
130
|
+
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):
|
|
131
|
+
|
|
132
|
+
1. **Visibility**:
|
|
133
|
+
- `visible` (boolean): Controls whether the item is mounted in the DOM.
|
|
134
|
+
- `visible$` (`Observable<boolean>`): Stream version to dynamically show/hide components.
|
|
135
|
+
- *Note: Visibility is configured at the wrapper component layer (`NgsFormsFormItem`).*
|
|
136
|
+
|
|
137
|
+
2. **Disabled Status**:
|
|
138
|
+
- `disabled` (boolean): Sets the initial disabled state of the form control.
|
|
139
|
+
- `disabled$` (`Observable<boolean>`): Stream to toggle disabled state.
|
|
140
|
+
- *Configured at the inner `config` level.*
|
|
141
|
+
|
|
142
|
+
3. **Validators**:
|
|
143
|
+
- `validators` (`Array<ValidatorFn>`): Array of standard/custom Angular Validator functions.
|
|
144
|
+
- `validators$` (`Observable<Array<ValidatorFn>>`): Stream of validator functions to change validators dynamically.
|
|
145
|
+
- *Configured at the inner `config` level.*
|
|
146
|
+
|
|
147
|
+
4. **Options** (Only for components with choice selection like `select` and `radio`):
|
|
148
|
+
- `options` (`Array<NgsFormsFormInputOption>`): Static array of choices `{ id: string | number, label: string, disabled?: boolean }`.
|
|
149
|
+
- `options$` (`Observable<Array<NgsFormsFormInputOption>>`): Stream to dynamically populate choices.
|
|
150
|
+
- *Configured at the inner `config` level.*
|
|
151
|
+
|
|
152
|
+
> [!TIP]
|
|
153
|
+
> 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.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
45
157
|
## Available Components & Schemas
|
|
46
158
|
|
|
47
|
-
|
|
48
|
-
Uses `NgsFormsMaterialFormItemInputComponent`.
|
|
159
|
+
Here is the full list of available Material components along with code examples showing their required and optional configuration parameters:
|
|
49
160
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- **
|
|
161
|
+
### 1. Text Input (`input-text`)
|
|
162
|
+
Uses `NgsFormsMaterialFormItemInputComponent`.
|
|
163
|
+
- **Key**: `input-text`
|
|
164
|
+
- **Config Type**: `NgsFormsFormItemConfigBaseTextInput`
|
|
53
165
|
|
|
54
166
|
```typescript
|
|
55
167
|
import { NgsFormsMaterialFormItemInputComponent } from '@ng-simplicity/forms-material';
|
|
56
168
|
import { Validators } from '@angular/forms';
|
|
57
169
|
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
170
|
+
const emailField = NgsFormsMaterialFormItemInputComponent.create({
|
|
171
|
+
// Required Parameters
|
|
172
|
+
name: 'email',
|
|
173
|
+
label: 'Email Address',
|
|
174
|
+
|
|
175
|
+
// Optional Parameters
|
|
176
|
+
id: 'custom-email-id',
|
|
177
|
+
placeholder: 'Enter your email address...',
|
|
178
|
+
type: 'email', // 'text' | 'email' | 'password'
|
|
179
|
+
value: 'default@domain.com', // Initial value
|
|
180
|
+
disabled: false,
|
|
181
|
+
validators: [Validators.required, Validators.email],
|
|
182
|
+
errorMessageMap: {
|
|
183
|
+
required: 'Email is required.',
|
|
184
|
+
email: 'Must be a valid email format.'
|
|
185
|
+
}
|
|
64
186
|
});
|
|
65
187
|
```
|
|
66
188
|
|
|
67
|
-
### 2.
|
|
189
|
+
### 2. Text Area (`input-textarea`)
|
|
68
190
|
Uses `NgsFormsMaterialFormItemTextAreaComponent`.
|
|
69
|
-
|
|
70
|
-
- **
|
|
71
|
-
- **Config Type**: Object containing `name`, `label`, `placeholder`, `rows`.
|
|
72
|
-
- **Features**: Outlined MatFormField container housing a multi-line auto-resizing text area.
|
|
191
|
+
- **Key**: `input-textarea`
|
|
192
|
+
- **Config Type**: `any`
|
|
73
193
|
|
|
74
194
|
```typescript
|
|
75
195
|
import { NgsFormsMaterialFormItemTextAreaComponent } from '@ng-simplicity/forms-material';
|
|
196
|
+
import { Validators } from '@angular/forms';
|
|
76
197
|
|
|
77
|
-
const
|
|
198
|
+
const commentsField = NgsFormsMaterialFormItemTextAreaComponent.create({
|
|
199
|
+
// Required Parameters
|
|
78
200
|
name: 'comments',
|
|
79
|
-
label: '
|
|
80
|
-
|
|
81
|
-
|
|
201
|
+
label: 'Comments',
|
|
202
|
+
|
|
203
|
+
// Optional Parameters
|
|
204
|
+
id: 'custom-comments-id',
|
|
205
|
+
placeholder: 'Leave us feedback...',
|
|
206
|
+
value: '',
|
|
207
|
+
rows: 5, // Custom number of visible rows (default is 3)
|
|
208
|
+
disabled: false,
|
|
209
|
+
validators: [Validators.required],
|
|
210
|
+
errorMessageMap: {
|
|
211
|
+
required: 'Comments cannot be blank.'
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### 3. Checkbox (`checkbox`)
|
|
217
|
+
Uses `NgsFormsMaterialFormItemCheckboxComponent`.
|
|
218
|
+
- **Key**: `checkbox`
|
|
219
|
+
- **Config Type**: `NgsFormsFormItemConfigBaseInput`
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
import { NgsFormsMaterialFormItemCheckboxComponent } from '@ng-simplicity/forms-material';
|
|
223
|
+
import { Validators } from '@angular/forms';
|
|
224
|
+
|
|
225
|
+
const acceptTermsField = NgsFormsMaterialFormItemCheckboxComponent.create({
|
|
226
|
+
// Required Parameters
|
|
227
|
+
name: 'agreeTerms',
|
|
228
|
+
label: 'I accept the Terms and Conditions',
|
|
229
|
+
|
|
230
|
+
// Optional Parameters
|
|
231
|
+
id: 'terms-checkbox-id',
|
|
232
|
+
value: false, // Initial checked state
|
|
233
|
+
disabled: false,
|
|
234
|
+
validators: [Validators.requiredTrue],
|
|
235
|
+
errorMessageMap: {
|
|
236
|
+
required: 'You must agree to the terms to proceed.'
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### 4. Select Dropdown (`select`)
|
|
242
|
+
Uses `NgsFormsMaterialFormItemSelectInputComponent`.
|
|
243
|
+
- **Key**: `select`
|
|
244
|
+
- **Config Type**: `NgsFormsFormItemConfigMaterialSelectInput`
|
|
245
|
+
|
|
246
|
+
```typescript
|
|
247
|
+
import { NgsFormsMaterialFormItemSelectInputComponent } from '@ng-simplicity/forms-material';
|
|
248
|
+
import { Validators } from '@angular/forms';
|
|
249
|
+
|
|
250
|
+
const roleSelectField = NgsFormsMaterialFormItemSelectInputComponent.create({
|
|
251
|
+
// Required Parameters
|
|
252
|
+
name: 'role',
|
|
253
|
+
label: 'User Role',
|
|
254
|
+
|
|
255
|
+
// Optional Parameters
|
|
256
|
+
id: 'role-select-id',
|
|
257
|
+
placeholder: 'Choose a role...', // Disabled placeholder text
|
|
258
|
+
placeHolderValue: '', // Custom value for placeholder selection
|
|
259
|
+
value: 'member', // Initial selected option ID
|
|
260
|
+
disabled: false,
|
|
261
|
+
options: [
|
|
262
|
+
{ id: 'admin', label: 'Administrator' },
|
|
263
|
+
{ id: 'member', label: 'Regular Member', disabled: false },
|
|
264
|
+
{ id: 'guest', label: 'Guest User', disabled: true }
|
|
265
|
+
],
|
|
266
|
+
validators: [Validators.required],
|
|
267
|
+
errorMessageMap: {
|
|
268
|
+
required: 'Please select a role.'
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### 5. Radio Buttons (`radio`)
|
|
274
|
+
Uses `NgsFormsMaterialRadioInputComponent`.
|
|
275
|
+
- **Key**: `radio`
|
|
276
|
+
- **Config Type**: `NgsFormsFormItemConfigMaterialRadio`
|
|
277
|
+
|
|
278
|
+
```typescript
|
|
279
|
+
import { NgsFormsMaterialRadioInputComponent } from '@ng-simplicity/forms-material';
|
|
280
|
+
import { Validators } from '@angular/forms';
|
|
281
|
+
|
|
282
|
+
const genderField = NgsFormsMaterialRadioInputComponent.create({
|
|
283
|
+
// Required Parameters
|
|
284
|
+
name: 'gender',
|
|
285
|
+
label: 'Gender Identity',
|
|
286
|
+
|
|
287
|
+
// Optional Parameters
|
|
288
|
+
id: 'gender-radio-id',
|
|
289
|
+
value: 'other', // Initial selected radio option ID
|
|
290
|
+
alignment: 'horizontal', // 'horizontal' | 'vertical' (default is 'vertical')
|
|
291
|
+
disabled: false,
|
|
292
|
+
options: [
|
|
293
|
+
{ id: 'female', label: 'Female' },
|
|
294
|
+
{ id: 'male', label: 'Male' },
|
|
295
|
+
{ id: 'other', label: 'Other/Prefer not to say' }
|
|
296
|
+
],
|
|
297
|
+
validators: [Validators.required],
|
|
298
|
+
errorMessageMap: {
|
|
299
|
+
required: 'Please choose one option.'
|
|
300
|
+
}
|
|
82
301
|
});
|
|
83
302
|
```
|
|
84
303
|
|
|
@@ -96,3 +315,17 @@ To run with coverage enabled:
|
|
|
96
315
|
```bash
|
|
97
316
|
nx test forms-material --codeCoverage
|
|
98
317
|
```
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Example Applications
|
|
322
|
+
|
|
323
|
+
Fully functional example applications demonstrating the form engine functionality are located in the [`apps/`](../../apps) folder of this monorepo:
|
|
324
|
+
- **`forms-bootstrap-demo`**: Integrates and showcases the `@ng-simplicity/forms-bootstrap` package.
|
|
325
|
+
- **`forms-material-demo`**: Integrates and showcases the `@ng-simplicity/forms-material` package.
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## Support & Contributions
|
|
330
|
+
|
|
331
|
+
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.
|
|
@@ -25,11 +25,11 @@ class NgsFormsMaterialFormItemCheckboxComponent extends NgsFormsBaseClassFormInp
|
|
|
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 {
|
|
@@ -60,11 +60,11 @@ class NgsFormsMaterialRadioInputComponent extends NgsFormsBaseClassFormItemInput
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
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 });
|
|
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\" 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
64
|
}
|
|
65
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialRadioInputComponent, decorators: [{
|
|
66
66
|
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" }]
|
|
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\" 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
68
|
}] });
|
|
69
69
|
|
|
70
70
|
class NgsFormsMaterialFormItemSelectInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent {
|
|
@@ -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,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChBtD,6RAUA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,U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C,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: 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 { 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\" 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 { 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,E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