@ng-simplicity/forms-material 1.0.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/LICENSE +21 -0
- package/README.md +98 -0
- package/fesm2022/ng-simplicity-forms-material.mjs +130 -0
- package/fesm2022/ng-simplicity-forms-material.mjs.map +1 -0
- package/index.d.ts +59 -0
- package/package.json +32 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 NG-Simplicity
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# @ng-simplicity/forms-material
|
|
2
|
+
|
|
3
|
+
An integration package containing pre-styled Angular Material inputs, form fields, and error templates for the **NG-Simplicity Forms** dynamic engine.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Ensure you have `@angular/material` and the core forms package installed:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @ng-simplicity/forms-core @ng-simplicity/forms-material @angular/material @angular/cdk
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Make sure your application has active Material theming configured (either via an custom theme file or prebuilt stylesheets in `angular.json` / `styles.scss`):
|
|
16
|
+
```scss
|
|
17
|
+
@import "@angular/material/prebuilt-themes/indigo-pink.css";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Quick Start & Registration
|
|
23
|
+
|
|
24
|
+
To allow the dynamic compiler to render Material fields, register them using `NgsFormsMaterialModule` inside your page component:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { Component } from '@angular/core';
|
|
28
|
+
import { NgsFormsComponentRegistryService } from '@ng-simplicity/forms-core';
|
|
29
|
+
import { NgsFormsMaterialModule } from '@ng-simplicity/forms-material';
|
|
30
|
+
|
|
31
|
+
@Component({
|
|
32
|
+
selector: 'app-material-form-page',
|
|
33
|
+
templateUrl: './material-form-page.component.html'
|
|
34
|
+
})
|
|
35
|
+
export class MaterialFormPageComponent {
|
|
36
|
+
constructor(registry: NgsFormsComponentRegistryService) {
|
|
37
|
+
// Registers Material inputs, textareas, layouts, and helpers
|
|
38
|
+
NgsFormsMaterialModule.registerAllMaterialComponents(registry);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Available Components & Schemas
|
|
46
|
+
|
|
47
|
+
### 1. Material Text Input (`input-text`)
|
|
48
|
+
Uses `NgsFormsMaterialFormItemInputComponent`.
|
|
49
|
+
|
|
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`).
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { NgsFormsMaterialFormItemInputComponent } from '@ng-simplicity/forms-material';
|
|
56
|
+
import { Validators } from '@angular/forms';
|
|
57
|
+
|
|
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)]
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 2. Material Text Area (`input-textarea`)
|
|
68
|
+
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.
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { NgsFormsMaterialFormItemTextAreaComponent } from '@ng-simplicity/forms-material';
|
|
76
|
+
|
|
77
|
+
const messageField = NgsFormsMaterialFormItemTextAreaComponent.create({
|
|
78
|
+
name: 'comments',
|
|
79
|
+
label: 'Additional Comments',
|
|
80
|
+
placeholder: 'Leave a note...',
|
|
81
|
+
rows: 4
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Unit Testing
|
|
88
|
+
|
|
89
|
+
Run unit tests for this Material integration package using:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
nx test forms-material
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
To run with coverage enabled:
|
|
96
|
+
```bash
|
|
97
|
+
nx test forms-material --codeCoverage
|
|
98
|
+
```
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
+
import { NgsFormsBaseClassFormInputComponent, NgsFormsBaseClassFormItemInputWithOptionsComponent, NgsFormsCoreModule } from '@ng-simplicity/forms-core';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
6
|
+
import * as i2 from '@angular/material/checkbox';
|
|
7
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
8
|
+
import { v4 } from 'uuid';
|
|
9
|
+
import * as i2$1 from '@angular/material/input';
|
|
10
|
+
import { MatInputModule } from '@angular/material/input';
|
|
11
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
12
|
+
import * as i2$2 from '@angular/material/radio';
|
|
13
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
14
|
+
import * as i3 from '@angular/material/select';
|
|
15
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
16
|
+
import { CommonModule } from '@angular/common';
|
|
17
|
+
|
|
18
|
+
class NgsFormsMaterialFormItemCheckboxComponent extends NgsFormsBaseClassFormInputComponent {
|
|
19
|
+
static key = 'checkbox';
|
|
20
|
+
static create(config) {
|
|
21
|
+
return {
|
|
22
|
+
uuid: v4(),
|
|
23
|
+
type: NgsFormsMaterialFormItemCheckboxComponent.key,
|
|
24
|
+
config,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
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 });
|
|
29
|
+
}
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemCheckboxComponent, decorators: [{
|
|
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" }]
|
|
33
|
+
}] });
|
|
34
|
+
|
|
35
|
+
class NgsFormsMaterialFormItemInputComponent extends NgsFormsBaseClassFormInputComponent {
|
|
36
|
+
static key = 'input-text';
|
|
37
|
+
static create(config) {
|
|
38
|
+
return {
|
|
39
|
+
uuid: v4(),
|
|
40
|
+
type: NgsFormsMaterialFormItemInputComponent.key,
|
|
41
|
+
config,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
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 });
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemInputComponent, decorators: [{
|
|
48
|
+
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" }]
|
|
50
|
+
}] });
|
|
51
|
+
|
|
52
|
+
class NgsFormsMaterialRadioInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent {
|
|
53
|
+
static key = 'radio';
|
|
54
|
+
radioConfig = this.config;
|
|
55
|
+
static create(config) {
|
|
56
|
+
return {
|
|
57
|
+
uuid: v4(),
|
|
58
|
+
type: NgsFormsMaterialRadioInputComponent.key,
|
|
59
|
+
config,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
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 });
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialRadioInputComponent, decorators: [{
|
|
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" }]
|
|
68
|
+
}] });
|
|
69
|
+
|
|
70
|
+
class NgsFormsMaterialFormItemSelectInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent {
|
|
71
|
+
static key = 'select';
|
|
72
|
+
selectConfig = this.config;
|
|
73
|
+
static create(config) {
|
|
74
|
+
return {
|
|
75
|
+
uuid: v4(),
|
|
76
|
+
type: NgsFormsMaterialFormItemSelectInputComponent.key,
|
|
77
|
+
config,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
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 });
|
|
82
|
+
}
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemSelectInputComponent, decorators: [{
|
|
84
|
+
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" }]
|
|
86
|
+
}] });
|
|
87
|
+
|
|
88
|
+
class NgsFormsMaterialFormItemTextAreaComponent extends NgsFormsBaseClassFormInputComponent {
|
|
89
|
+
static key = 'input-textarea';
|
|
90
|
+
static create(config) {
|
|
91
|
+
return {
|
|
92
|
+
uuid: v4(),
|
|
93
|
+
type: NgsFormsMaterialFormItemTextAreaComponent.key,
|
|
94
|
+
config,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
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 });
|
|
99
|
+
}
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialFormItemTextAreaComponent, decorators: [{
|
|
101
|
+
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" }]
|
|
103
|
+
}] });
|
|
104
|
+
|
|
105
|
+
class NgsFormsMaterialModule {
|
|
106
|
+
static registerAllMaterialComponents(registryService) {
|
|
107
|
+
NgsFormsCoreModule.registerCoreNgsFormComponents(registryService);
|
|
108
|
+
registryService.register(NgsFormsMaterialFormItemCheckboxComponent.key, NgsFormsMaterialFormItemCheckboxComponent);
|
|
109
|
+
registryService.register(NgsFormsMaterialFormItemInputComponent.key, NgsFormsMaterialFormItemInputComponent);
|
|
110
|
+
registryService.register(NgsFormsMaterialRadioInputComponent.key, NgsFormsMaterialRadioInputComponent);
|
|
111
|
+
registryService.register(NgsFormsMaterialFormItemSelectInputComponent.key, NgsFormsMaterialFormItemSelectInputComponent);
|
|
112
|
+
registryService.register(NgsFormsMaterialFormItemTextAreaComponent.key, NgsFormsMaterialFormItemTextAreaComponent);
|
|
113
|
+
}
|
|
114
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
115
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, NgsFormsCoreModule] });
|
|
116
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, NgsFormsCoreModule] });
|
|
117
|
+
}
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NgsFormsMaterialModule, decorators: [{
|
|
119
|
+
type: NgModule,
|
|
120
|
+
args: [{
|
|
121
|
+
imports: [CommonModule, FormsModule, ReactiveFormsModule, NgsFormsCoreModule],
|
|
122
|
+
}]
|
|
123
|
+
}] });
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Generated bundle index. Do not edit.
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
export { NgsFormsMaterialFormItemCheckboxComponent, NgsFormsMaterialFormItemInputComponent, NgsFormsMaterialFormItemSelectInputComponent, NgsFormsMaterialFormItemTextAreaComponent, NgsFormsMaterialModule, NgsFormsMaterialRadioInputComponent };
|
|
130
|
+
//# sourceMappingURL=ng-simplicity-forms-material.mjs.map
|
|
@@ -0,0 +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,UAAA,EAAA,IAAA,EDEY,mBAAmB,yTAAE,iBAAiB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,WAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,eAAA,EAAA,eAAA,EAAA,WAAA,EAAA,IAAA,EAAA,UAAA,EAAA,eAAA,EAAA,MAAA,EAAA,OAAA,EAAA,eAAA,EAAA,UAAA,EAAA,OAAA,EAAA,qBAAA,EAAA,SAAA,EAAA,UAAA,E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vB,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;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as i3 from '@ng-simplicity/forms-core';
|
|
2
|
+
import { NgsFormsBaseClassFormInputComponent, NgsFormsFormItemConfigBaseInput, NgsFormsFormItem, NgsFormsFormItemConfigBaseInputWithOptions, NgsFormsBaseClassFormItemInputWithOptionsComponent, NgsFormsComponentRegistryService } from '@ng-simplicity/forms-core';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import * as i1 from '@angular/common';
|
|
5
|
+
import * as i2 from '@angular/forms';
|
|
6
|
+
|
|
7
|
+
declare class NgsFormsMaterialFormItemCheckboxComponent extends NgsFormsBaseClassFormInputComponent<NgsFormsFormItemConfigBaseInput> {
|
|
8
|
+
static key: string;
|
|
9
|
+
static create(config: NgsFormsFormItemConfigBaseInput): NgsFormsFormItem<NgsFormsFormItemConfigBaseInput>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgsFormsMaterialFormItemCheckboxComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgsFormsMaterialFormItemCheckboxComponent, "ngs-forms-mat-checkbox", never, {}, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare class NgsFormsMaterialFormItemInputComponent extends NgsFormsBaseClassFormInputComponent<any> {
|
|
15
|
+
static key: string;
|
|
16
|
+
static create(config: any): NgsFormsFormItem<any>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgsFormsMaterialFormItemInputComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgsFormsMaterialFormItemInputComponent, "ngs-forms-mat-input", never, {}, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface NgsFormsFormItemConfigMaterialRadio extends NgsFormsFormItemConfigBaseInputWithOptions {
|
|
22
|
+
alignment?: 'horizontal' | 'vertical';
|
|
23
|
+
}
|
|
24
|
+
declare class NgsFormsMaterialRadioInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent<NgsFormsFormItemConfigMaterialRadio> {
|
|
25
|
+
static key: string;
|
|
26
|
+
radioConfig: NgsFormsFormItemConfigMaterialRadio;
|
|
27
|
+
static create(config: NgsFormsFormItemConfigMaterialRadio): NgsFormsFormItem<NgsFormsFormItemConfigMaterialRadio>;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgsFormsMaterialRadioInputComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgsFormsMaterialRadioInputComponent, "ngs-forms-material-radio-group-input", never, {}, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface NgsFormsFormItemConfigMaterialSelectInput extends NgsFormsFormItemConfigBaseInputWithOptions {
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
placeHolderValue?: string;
|
|
35
|
+
}
|
|
36
|
+
declare class NgsFormsMaterialFormItemSelectInputComponent extends NgsFormsBaseClassFormItemInputWithOptionsComponent<NgsFormsFormItemConfigMaterialSelectInput> {
|
|
37
|
+
static key: string;
|
|
38
|
+
selectConfig: NgsFormsFormItemConfigMaterialSelectInput;
|
|
39
|
+
static create(config: NgsFormsFormItemConfigMaterialSelectInput): NgsFormsFormItem<NgsFormsFormItemConfigMaterialSelectInput>;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgsFormsMaterialFormItemSelectInputComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgsFormsMaterialFormItemSelectInputComponent, "ngs-forms-material-select-input", never, {}, {}, never, never, true, never>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare class NgsFormsMaterialFormItemTextAreaComponent extends NgsFormsBaseClassFormInputComponent<any> {
|
|
45
|
+
static key: string;
|
|
46
|
+
static create(config: any): NgsFormsFormItem<any>;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgsFormsMaterialFormItemTextAreaComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgsFormsMaterialFormItemTextAreaComponent, "ngs-forms-mat-textarea", never, {}, {}, never, never, true, never>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare class NgsFormsMaterialModule {
|
|
52
|
+
static registerAllMaterialComponents(registryService: NgsFormsComponentRegistryService): void;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgsFormsMaterialModule, never>;
|
|
54
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgsFormsMaterialModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.NgsFormsCoreModule], never>;
|
|
55
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgsFormsMaterialModule>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { NgsFormsMaterialFormItemCheckboxComponent, NgsFormsMaterialFormItemInputComponent, NgsFormsMaterialFormItemSelectInputComponent, NgsFormsMaterialFormItemTextAreaComponent, NgsFormsMaterialModule, NgsFormsMaterialRadioInputComponent };
|
|
59
|
+
export type { NgsFormsFormItemConfigMaterialRadio, NgsFormsFormItemConfigMaterialSelectInput };
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ng-simplicity/forms-material",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/BryanGWalsh/NgSimplicityForms.git",
|
|
8
|
+
"directory": "libs/forms-material"
|
|
9
|
+
},
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"@angular/common": "^19.0.0 || ^20.0.0",
|
|
12
|
+
"@angular/core": "^19.0.0 || ^20.0.0",
|
|
13
|
+
"@angular/forms": "^19.0.0 || ^20.0.0",
|
|
14
|
+
"@angular/material": "^19.0.0 || ^20.0.0",
|
|
15
|
+
"@ng-simplicity/forms-core": "^1.0.0"
|
|
16
|
+
},
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"module": "fesm2022/ng-simplicity-forms-material.mjs",
|
|
19
|
+
"typings": "index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
"./package.json": {
|
|
22
|
+
"default": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./index.d.ts",
|
|
26
|
+
"default": "./fesm2022/ng-simplicity-forms-material.mjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"tslib": "^2.3.0"
|
|
31
|
+
}
|
|
32
|
+
}
|