@igo2/common 20.0.1 → 20.1.0-next.10
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/action/index.d.ts +22 -22
- package/clickout/index.d.ts +2 -2
- package/collapsible/index.d.ts +6 -10
- package/color/index.d.ts +3 -4
- package/context-menu/index.d.ts +9 -9
- package/datepicker/index.d.ts +65 -0
- package/drag-drop/index.d.ts +21 -23
- package/dynamic-component/index.d.ts +7 -7
- package/entity/index.d.ts +135 -72
- package/fesm2022/igo2-common-action.mjs +60 -97
- package/fesm2022/igo2-common-action.mjs.map +1 -1
- package/fesm2022/igo2-common-backdrop.mjs +7 -7
- package/fesm2022/igo2-common-badge.mjs +7 -7
- package/fesm2022/igo2-common-clickout.mjs +10 -12
- package/fesm2022/igo2-common-clickout.mjs.map +1 -1
- package/fesm2022/igo2-common-clone.mjs +7 -7
- package/fesm2022/igo2-common-collapsible.mjs +18 -39
- package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
- package/fesm2022/igo2-common-color.mjs +14 -18
- package/fesm2022/igo2-common-color.mjs.map +1 -1
- package/fesm2022/igo2-common-confirm-dialog.mjs +10 -10
- package/fesm2022/igo2-common-context-menu.mjs +22 -31
- package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
- package/fesm2022/igo2-common-custom-html.mjs +10 -10
- package/fesm2022/igo2-common-datepicker.mjs +316 -0
- package/fesm2022/igo2-common-datepicker.mjs.map +1 -0
- package/fesm2022/igo2-common-dom.mjs +7 -7
- package/fesm2022/igo2-common-drag-drop.mjs +59 -75
- package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
- package/fesm2022/igo2-common-dynamic-component.mjs +34 -52
- package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
- package/fesm2022/igo2-common-entity.mjs +284 -220
- package/fesm2022/igo2-common-entity.mjs.map +1 -1
- package/fesm2022/igo2-common-flexible.mjs +13 -16
- package/fesm2022/igo2-common-flexible.mjs.map +1 -1
- package/fesm2022/igo2-common-form.mjs +120 -174
- package/fesm2022/igo2-common-form.mjs.map +1 -1
- package/fesm2022/igo2-common-home-button.mjs +11 -12
- package/fesm2022/igo2-common-home-button.mjs.map +1 -1
- package/fesm2022/igo2-common-icon.mjs +18 -24
- package/fesm2022/igo2-common-icon.mjs.map +1 -1
- package/fesm2022/igo2-common-image.mjs +16 -20
- package/fesm2022/igo2-common-image.mjs.map +1 -1
- package/fesm2022/igo2-common-interactive-tour.mjs +28 -33
- package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
- package/fesm2022/igo2-common-json-dialog.mjs +11 -11
- package/fesm2022/igo2-common-json-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-keyvalue.mjs +7 -7
- package/fesm2022/igo2-common-list.mjs +49 -66
- package/fesm2022/igo2-common-list.mjs.map +1 -1
- package/fesm2022/igo2-common-panel.mjs +15 -28
- package/fesm2022/igo2-common-panel.mjs.map +1 -1
- package/fesm2022/igo2-common-resizable-bar.mjs +25 -32
- package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
- package/fesm2022/igo2-common-select-value-dialog.mjs +10 -10
- package/fesm2022/igo2-common-sidenav.mjs +7 -7
- package/fesm2022/igo2-common-spinner.mjs +11 -11
- package/fesm2022/igo2-common-spinner.mjs.map +1 -1
- package/fesm2022/igo2-common-stop-propagation.mjs +10 -10
- package/fesm2022/igo2-common-table.mjs +57 -87
- package/fesm2022/igo2-common-table.mjs.map +1 -1
- package/fesm2022/igo2-common-timepicker.mjs +105 -0
- package/fesm2022/igo2-common-timepicker.mjs.map +1 -0
- package/fesm2022/igo2-common-tool.mjs +29 -35
- package/fesm2022/igo2-common-tool.mjs.map +1 -1
- package/fesm2022/igo2-common-widget.mjs +27 -36
- package/fesm2022/igo2-common-widget.mjs.map +1 -1
- package/fesm2022/igo2-common-workspace.mjs +34 -44
- package/fesm2022/igo2-common-workspace.mjs.map +1 -1
- package/flexible/index.d.ts +2 -2
- package/form/index.d.ts +31 -33
- package/home-button/index.d.ts +1 -2
- package/icon/index.d.ts +4 -5
- package/image/index.d.ts +3 -3
- package/interactive-tour/index.d.ts +5 -5
- package/list/index.d.ts +23 -23
- package/package.json +13 -4
- package/panel/index.d.ts +4 -6
- package/resizable-bar/index.d.ts +11 -13
- package/table/index.d.ts +13 -19
- package/timepicker/index.d.ts +33 -0
- package/tool/index.d.ts +5 -5
- package/widget/index.d.ts +9 -9
- package/workspace/index.d.ts +13 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, output, viewChild, ChangeDetectionStrategy, Component, NgModule, Injectable, signal, inject, ChangeDetectorRef } from '@angular/core';
|
|
3
3
|
import { NgClass, AsyncPipe } from '@angular/common';
|
|
4
4
|
import * as i3 from '@angular/forms';
|
|
5
5
|
import { FormsModule, ReactiveFormsModule, UntypedFormBuilder, Validators } from '@angular/forms';
|
|
@@ -13,12 +13,12 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
13
13
|
import * as i2 from '@angular/material/select';
|
|
14
14
|
import { MatSelectModule } from '@angular/material/select';
|
|
15
15
|
import { IgoLanguageModule, LanguageService } from '@igo2/core/language';
|
|
16
|
-
import { BehaviorSubject } from 'rxjs';
|
|
17
16
|
import * as i5 from '@ngx-translate/core';
|
|
18
17
|
import * as i5$1 from '@angular/material/button';
|
|
19
18
|
import { MatButtonModule } from '@angular/material/button';
|
|
20
19
|
import * as i2$1 from '@angular/material/input';
|
|
21
20
|
import { MatInputModule } from '@angular/material/input';
|
|
21
|
+
import { BehaviorSubject } from 'rxjs';
|
|
22
22
|
import { DynamicOutletComponent } from '@igo2/common/dynamic-component';
|
|
23
23
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogActions, MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
24
24
|
import { CustomHtmlComponent } from '@igo2/common/custom-html';
|
|
@@ -71,22 +71,22 @@ class FormComponent {
|
|
|
71
71
|
/**
|
|
72
72
|
* Form
|
|
73
73
|
*/
|
|
74
|
-
form;
|
|
74
|
+
form = input(undefined, ...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
75
75
|
/**
|
|
76
76
|
* Input data
|
|
77
77
|
*/
|
|
78
|
-
formData;
|
|
78
|
+
formData = input(undefined, ...(ngDevMode ? [{ debugName: "formData" }] : []));
|
|
79
79
|
/**
|
|
80
80
|
* Form autocomplete
|
|
81
81
|
*/
|
|
82
|
-
autocomplete = 'off';
|
|
82
|
+
autocomplete = input('off', ...(ngDevMode ? [{ debugName: "autocomplete" }] : []));
|
|
83
83
|
/**
|
|
84
84
|
* Event emitted when the form is submitted
|
|
85
85
|
*/
|
|
86
|
-
submitForm =
|
|
87
|
-
buttons;
|
|
86
|
+
submitForm = output();
|
|
87
|
+
buttons = viewChild('buttons', ...(ngDevMode ? [{ debugName: "buttons" }] : []));
|
|
88
88
|
get hasButtons() {
|
|
89
|
-
return this.buttons.nativeElement.children.length !== 0;
|
|
89
|
+
return this.buttons().nativeElement.children.length !== 0;
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* Is the entity or the template change, recreate the form or repopulate it.
|
|
@@ -116,16 +116,16 @@ class FormComponent {
|
|
|
116
116
|
}
|
|
117
117
|
getData() {
|
|
118
118
|
const data = {};
|
|
119
|
-
getAllFormFields(this.form).forEach((field) => {
|
|
119
|
+
getAllFormFields(this.form()).forEach((field) => {
|
|
120
120
|
this.updateDataWithFormField(data, field);
|
|
121
121
|
});
|
|
122
122
|
return data;
|
|
123
123
|
}
|
|
124
124
|
setData(data) {
|
|
125
|
-
this.form.fields.forEach((field) => {
|
|
125
|
+
this.form().fields.forEach((field) => {
|
|
126
126
|
field.control.setValue(t(data, field.name).safeObject);
|
|
127
127
|
});
|
|
128
|
-
this.form.groups.forEach((group) => {
|
|
128
|
+
this.form().groups.forEach((group) => {
|
|
129
129
|
group.fields.forEach((field) => {
|
|
130
130
|
field.control.setValue(t(data, field.name).safeObject);
|
|
131
131
|
});
|
|
@@ -141,36 +141,25 @@ class FormComponent {
|
|
|
141
141
|
* Clear form
|
|
142
142
|
*/
|
|
143
143
|
clear() {
|
|
144
|
-
this.form.control.reset();
|
|
144
|
+
this.form().control.reset();
|
|
145
145
|
}
|
|
146
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
147
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
146
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
147
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.16", type: FormComponent, isStandalone: true, selector: "igo-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, formData: { classPropertyName: "formData", publicName: "formData", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitForm: "submitForm" }, viewQueries: [{ propertyName: "buttons", first: true, predicate: ["buttons"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<form\n [autocomplete]=\"autocomplete()\"\n [formGroup]=\"form().control\"\n (ngSubmit)=\"onSubmit()\"\n>\n <div\n class=\"igo-form-body\"\n [ngClass]=\"{ 'igo-form-body-with-buttons': hasButtons }\"\n >\n <div class=\"igo-form-content\">\n <ng-content />\n </div>\n <div #buttons class=\"igo-form-buttons\">\n <ng-content select=\"[formButtons]\" />\n </div>\n </div>\n</form>\n", styles: [":host{display:block}form{width:100%;height:100%}.igo-form-body,.igo-form-content{height:100%}.igo-form-body-with-buttons .igo-form-content{height:calc(100% - 56px)}.igo-form-content{display:flex}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
148
148
|
}
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormComponent, decorators: [{
|
|
150
150
|
type: Component,
|
|
151
|
-
args: [{ selector: 'igo-form', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, ReactiveFormsModule, NgClass], template: "<form\n [autocomplete]=\"autocomplete\"\n [formGroup]=\"form.control\"\n (ngSubmit)=\"onSubmit()\"\n>\n <div\n class=\"igo-form-body\"\n [ngClass]=\"{ 'igo-form-body-with-buttons': hasButtons }\"\n >\n <div class=\"igo-form-content\">\n <ng-content
|
|
152
|
-
}], propDecorators: { form: [{
|
|
153
|
-
type: Input
|
|
154
|
-
}], formData: [{
|
|
155
|
-
type: Input
|
|
156
|
-
}], autocomplete: [{
|
|
157
|
-
type: Input
|
|
158
|
-
}], submitForm: [{
|
|
159
|
-
type: Output
|
|
160
|
-
}], buttons: [{
|
|
161
|
-
type: ViewChild,
|
|
162
|
-
args: ['buttons', { static: true }]
|
|
163
|
-
}] } });
|
|
151
|
+
args: [{ selector: 'igo-form', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, ReactiveFormsModule, NgClass], template: "<form\n [autocomplete]=\"autocomplete()\"\n [formGroup]=\"form().control\"\n (ngSubmit)=\"onSubmit()\"\n>\n <div\n class=\"igo-form-body\"\n [ngClass]=\"{ 'igo-form-body-with-buttons': hasButtons }\"\n >\n <div class=\"igo-form-content\">\n <ng-content />\n </div>\n <div #buttons class=\"igo-form-buttons\">\n <ng-content select=\"[formButtons]\" />\n </div>\n </div>\n</form>\n", styles: [":host{display:block}form{width:100%;height:100%}.igo-form-body,.igo-form-content{height:100%}.igo-form-body-with-buttons .igo-form-content{height:calc(100% - 56px)}.igo-form-content{display:flex}\n"] }]
|
|
152
|
+
}], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], formData: [{ type: i0.Input, args: [{ isSignal: true, alias: "formData", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], submitForm: [{ type: i0.Output, args: ["submitForm"] }], buttons: [{ type: i0.ViewChild, args: ['buttons', { isSignal: true }] }] } });
|
|
164
153
|
|
|
165
154
|
/**
|
|
166
155
|
* @deprecated import the FormComponent directly
|
|
167
156
|
*/
|
|
168
157
|
class IgoFormFormModule {
|
|
169
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
170
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
171
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
159
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoFormFormModule, imports: [FormComponent], exports: [FormComponent] });
|
|
160
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormFormModule, imports: [FormComponent] });
|
|
172
161
|
}
|
|
173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormFormModule, decorators: [{
|
|
174
163
|
type: NgModule,
|
|
175
164
|
args: [{
|
|
176
165
|
imports: [FormComponent],
|
|
@@ -194,10 +183,10 @@ class FormFieldService {
|
|
|
194
183
|
getFieldByType(type) {
|
|
195
184
|
return FormFieldService.fields[type];
|
|
196
185
|
}
|
|
197
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
198
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
186
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
187
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldService, providedIn: 'root' });
|
|
199
188
|
}
|
|
200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldService, decorators: [{
|
|
201
190
|
type: Injectable,
|
|
202
191
|
args: [{
|
|
203
192
|
providedIn: 'root'
|
|
@@ -214,72 +203,66 @@ function IgoFormFieldComponent(type) {
|
|
|
214
203
|
* This component renders a select field
|
|
215
204
|
*/
|
|
216
205
|
let FormFieldSelectComponent = class FormFieldSelectComponent {
|
|
217
|
-
disabled
|
|
206
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
218
207
|
/**
|
|
219
208
|
* Select input choices
|
|
220
209
|
*/
|
|
221
|
-
|
|
222
|
-
this.choices$.next(value);
|
|
223
|
-
}
|
|
224
|
-
get choices() {
|
|
225
|
-
return this.choices$.value;
|
|
226
|
-
}
|
|
227
|
-
choices$ = new BehaviorSubject([]);
|
|
210
|
+
choices = input.required(...(ngDevMode ? [{ debugName: "choices" }] : []));
|
|
228
211
|
/**
|
|
229
212
|
* If the select allow multiple selections
|
|
230
213
|
*/
|
|
231
|
-
multiple = false;
|
|
214
|
+
multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
|
|
232
215
|
/**
|
|
233
216
|
* The field's form control
|
|
234
217
|
*/
|
|
235
|
-
formControl;
|
|
218
|
+
formControl = input(undefined, ...(ngDevMode ? [{ debugName: "formControl" }] : []));
|
|
236
219
|
/**
|
|
237
220
|
* Field placeholder
|
|
238
221
|
*/
|
|
239
|
-
placeholder;
|
|
222
|
+
placeholder = input(undefined, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
240
223
|
/**
|
|
241
224
|
* Field placeholder
|
|
242
225
|
*/
|
|
243
|
-
errors;
|
|
226
|
+
errors = input(undefined, ...(ngDevMode ? [{ debugName: "errors" }] : []));
|
|
244
227
|
/**
|
|
245
228
|
* Wheter a disable switch should be available
|
|
246
229
|
*/
|
|
247
|
-
disableSwitch = false;
|
|
230
|
+
disableSwitch = input(false, ...(ngDevMode ? [{ debugName: "disableSwitch" }] : []));
|
|
248
231
|
/**
|
|
249
232
|
* Whether the field is required
|
|
250
233
|
*/
|
|
251
234
|
get required() {
|
|
252
|
-
return formControlIsRequired(this.formControl);
|
|
235
|
+
return formControlIsRequired(this.formControl());
|
|
253
236
|
}
|
|
254
237
|
ngOnInit() {
|
|
255
|
-
this.disabled
|
|
238
|
+
this.disabled.set(this.formControl().disabled);
|
|
256
239
|
}
|
|
257
240
|
/**
|
|
258
241
|
* Get error message
|
|
259
242
|
*/
|
|
260
243
|
getErrorMessage() {
|
|
261
|
-
return getControlErrorMessage(this.formControl, this.errors);
|
|
244
|
+
return getControlErrorMessage(this.formControl(), this.errors());
|
|
262
245
|
}
|
|
263
246
|
onDisableSwitchClick() {
|
|
264
247
|
this.toggleDisabled();
|
|
265
248
|
}
|
|
266
249
|
toggleDisabled() {
|
|
267
|
-
const disabled = !this.disabled
|
|
250
|
+
const disabled = !this.disabled();
|
|
268
251
|
if (disabled === true) {
|
|
269
|
-
this.formControl.disable();
|
|
252
|
+
this.formControl().disable();
|
|
270
253
|
}
|
|
271
254
|
else {
|
|
272
|
-
this.formControl.enable();
|
|
255
|
+
this.formControl().enable();
|
|
273
256
|
}
|
|
274
|
-
this.disabled
|
|
257
|
+
this.disabled.set(disabled);
|
|
275
258
|
}
|
|
276
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
277
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
259
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
260
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FormFieldSelectComponent, isStandalone: true, selector: "igo-form-field-select", inputs: { choices: { classPropertyName: "choices", publicName: "choices", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, disableSwitch: { classPropertyName: "disableSwitch", publicName: "disableSwitch", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mat-form-field>\n <mat-select\n [multiple]=\"multiple()\"\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n >\n @for (choice of choices(); track choice) {\n <mat-option [value]=\"choice.value\">\n {{ choice.title }}\n </mat-option>\n }\n </mat-select>\n @if (disableSwitch() === true) {\n <mat-icon\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n matPrefix\n >{{ disabled() === true ? 'check_box_outline_blank' : 'check_box' }}\n </mat-icon>\n }\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n</mat-form-field>\n", dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.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: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
278
261
|
};
|
|
279
262
|
FormFieldSelectComponent = __decorate([
|
|
280
263
|
IgoFormFieldComponent('select')
|
|
281
264
|
], FormFieldSelectComponent);
|
|
282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldSelectComponent, decorators: [{
|
|
283
266
|
type: Component,
|
|
284
267
|
args: [{ selector: 'igo-form-field-select', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
285
268
|
MatFormFieldModule,
|
|
@@ -288,22 +271,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
288
271
|
ReactiveFormsModule,
|
|
289
272
|
MatOptionModule,
|
|
290
273
|
MatIconModule,
|
|
291
|
-
AsyncPipe,
|
|
292
274
|
IgoLanguageModule
|
|
293
|
-
], template: "<mat-form-field>\n <mat-select\n [multiple]=\"multiple\"\n [required]=\"required\"\n [placeholder]=\"placeholder | translate\"\n [formControl]=\"formControl\"\n >\n @for (choice of choices
|
|
294
|
-
}], propDecorators: { choices: [{
|
|
295
|
-
type: Input
|
|
296
|
-
}], multiple: [{
|
|
297
|
-
type: Input
|
|
298
|
-
}], formControl: [{
|
|
299
|
-
type: Input
|
|
300
|
-
}], placeholder: [{
|
|
301
|
-
type: Input
|
|
302
|
-
}], errors: [{
|
|
303
|
-
type: Input
|
|
304
|
-
}], disableSwitch: [{
|
|
305
|
-
type: Input
|
|
306
|
-
}] } });
|
|
275
|
+
], template: "<mat-form-field>\n <mat-select\n [multiple]=\"multiple()\"\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n >\n @for (choice of choices(); track choice) {\n <mat-option [value]=\"choice.value\">\n {{ choice.title }}\n </mat-option>\n }\n </mat-select>\n @if (disableSwitch() === true) {\n <mat-icon\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n matPrefix\n >{{ disabled() === true ? 'check_box_outline_blank' : 'check_box' }}\n </mat-icon>\n }\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n</mat-form-field>\n" }]
|
|
276
|
+
}], propDecorators: { choices: [{ type: i0.Input, args: [{ isSignal: true, alias: "choices", required: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], disableSwitch: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSwitch", required: false }] }] } });
|
|
307
277
|
|
|
308
278
|
/**
|
|
309
279
|
* This component renders a text field
|
|
@@ -316,37 +286,37 @@ let FormFieldTextComponent = class FormFieldTextComponent {
|
|
|
316
286
|
/**
|
|
317
287
|
* The field's form control
|
|
318
288
|
*/
|
|
319
|
-
formControl;
|
|
289
|
+
formControl = input(undefined, ...(ngDevMode ? [{ debugName: "formControl" }] : []));
|
|
320
290
|
/**
|
|
321
291
|
* Field placeholder
|
|
322
292
|
*/
|
|
323
|
-
placeholder;
|
|
293
|
+
placeholder = input(undefined, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
324
294
|
/**
|
|
325
295
|
* if the input is a password
|
|
326
296
|
*/
|
|
327
|
-
isPassword;
|
|
297
|
+
isPassword = input(undefined, ...(ngDevMode ? [{ debugName: "isPassword" }] : []));
|
|
328
298
|
/**
|
|
329
299
|
* Field placeholder
|
|
330
300
|
*/
|
|
331
|
-
errors;
|
|
301
|
+
errors = input(undefined, ...(ngDevMode ? [{ debugName: "errors" }] : []));
|
|
332
302
|
/**
|
|
333
303
|
* Wheter a disable switch should be available
|
|
334
304
|
*/
|
|
335
|
-
disableSwitch = false;
|
|
305
|
+
disableSwitch = input(false, ...(ngDevMode ? [{ debugName: "disableSwitch" }] : []));
|
|
336
306
|
/**
|
|
337
307
|
* Whether the field is required
|
|
338
308
|
*/
|
|
339
309
|
get required() {
|
|
340
|
-
return formControlIsRequired(this.formControl);
|
|
310
|
+
return formControlIsRequired(this.formControl());
|
|
341
311
|
}
|
|
342
312
|
ngOnInit() {
|
|
343
|
-
this.disabled$.next(this.formControl.disabled);
|
|
313
|
+
this.disabled$.next(this.formControl().disabled);
|
|
344
314
|
}
|
|
345
315
|
/**
|
|
346
316
|
* Get error message
|
|
347
317
|
*/
|
|
348
318
|
getErrorMessage() {
|
|
349
|
-
return getControlErrorMessage(this.formControl, this.errors);
|
|
319
|
+
return getControlErrorMessage(this.formControl(), this.errors());
|
|
350
320
|
}
|
|
351
321
|
onDisableSwitchClick() {
|
|
352
322
|
this.toggleDisabled();
|
|
@@ -354,10 +324,10 @@ let FormFieldTextComponent = class FormFieldTextComponent {
|
|
|
354
324
|
toggleDisabled() {
|
|
355
325
|
const disabled = !this.disabled$.value;
|
|
356
326
|
if (disabled === true) {
|
|
357
|
-
this.formControl.disable();
|
|
327
|
+
this.formControl().disable();
|
|
358
328
|
}
|
|
359
329
|
else {
|
|
360
|
-
this.formControl.enable();
|
|
330
|
+
this.formControl().enable();
|
|
361
331
|
}
|
|
362
332
|
this.disabled$.next(disabled);
|
|
363
333
|
}
|
|
@@ -366,7 +336,7 @@ let FormFieldTextComponent = class FormFieldTextComponent {
|
|
|
366
336
|
this.delayedHide();
|
|
367
337
|
}
|
|
368
338
|
delayedHide(delayMS = 10000) {
|
|
369
|
-
if (this.isPassword && !this.hide) {
|
|
339
|
+
if (this.isPassword() && !this.hide) {
|
|
370
340
|
if (this.lastTimeoutRequest) {
|
|
371
341
|
clearTimeout(this.lastTimeoutRequest);
|
|
372
342
|
}
|
|
@@ -376,13 +346,13 @@ let FormFieldTextComponent = class FormFieldTextComponent {
|
|
|
376
346
|
}, delayMS);
|
|
377
347
|
}
|
|
378
348
|
}
|
|
379
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
380
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
349
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
350
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FormFieldTextComponent, isStandalone: true, selector: "igo-form-field-text", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, isPassword: { classPropertyName: "isPassword", publicName: "isPassword", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, disableSwitch: { classPropertyName: "disableSwitch", publicName: "disableSwitch", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mat-form-field>\n <input\n matInput\n (blur)=\"delayedHide(0)\"\n [type]=\"isPassword() ? (hide ? 'password' : 'text') : 'text'\"\n [required]=\"isPassword() ? 'true' : required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n (change)=\"delayedHide()\"\n />\n @if (disableSwitch() === true) {\n <mat-icon\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n matPrefix\n >{{\n (disabled$ | async) === true ? 'check_box_outline_blank' : 'check_box'\n }}\n </mat-icon>\n }\n\n @if (isPassword()) {\n <button type=\"button\" matSuffix mat-icon-button (click)=\"togglePassword()\">\n <mat-icon color=\"primary\">{{\n hide ? 'visibility_off' : 'visibility'\n }}</mat-icon>\n </button>\n }\n\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n</mat-form-field>\n", dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
381
351
|
};
|
|
382
352
|
FormFieldTextComponent = __decorate([
|
|
383
353
|
IgoFormFieldComponent('text')
|
|
384
354
|
], FormFieldTextComponent);
|
|
385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldTextComponent, decorators: [{
|
|
386
356
|
type: Component,
|
|
387
357
|
args: [{ selector: 'igo-form-field-text', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
388
358
|
MatFormFieldModule,
|
|
@@ -393,18 +363,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
393
363
|
MatButtonModule,
|
|
394
364
|
AsyncPipe,
|
|
395
365
|
IgoLanguageModule
|
|
396
|
-
], template: "<mat-form-field>\n <input\n matInput\n (blur)=\"delayedHide(0)\"\n [type]=\"isPassword ? (hide ? 'password' : 'text') : 'text'\"\n [required]=\"isPassword ? 'true' : required\"\n [placeholder]=\"placeholder | translate\"\n [formControl]=\"formControl\"\n (change)=\"delayedHide()\"\n />\n @if (disableSwitch === true) {\n <mat-icon\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n matPrefix\n >{{\n (disabled$ | async) === true ? 'check_box_outline_blank' : 'check_box'\n }}\n </mat-icon>\n }\n\n @if (isPassword) {\n <button type=\"button\" matSuffix mat-icon-button (click)=\"togglePassword()\">\n <mat-icon color=\"primary\">{{\n hide ? 'visibility_off' : 'visibility'\n }}</mat-icon>\n </button>\n }\n\n @if (formControl.errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n</mat-form-field>\n" }]
|
|
397
|
-
}], propDecorators: { formControl: [{
|
|
398
|
-
type: Input
|
|
399
|
-
}], placeholder: [{
|
|
400
|
-
type: Input
|
|
401
|
-
}], isPassword: [{
|
|
402
|
-
type: Input
|
|
403
|
-
}], errors: [{
|
|
404
|
-
type: Input
|
|
405
|
-
}], disableSwitch: [{
|
|
406
|
-
type: Input
|
|
407
|
-
}] } });
|
|
366
|
+
], template: "<mat-form-field>\n <input\n matInput\n (blur)=\"delayedHide(0)\"\n [type]=\"isPassword() ? (hide ? 'password' : 'text') : 'text'\"\n [required]=\"isPassword() ? 'true' : required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n (change)=\"delayedHide()\"\n />\n @if (disableSwitch() === true) {\n <mat-icon\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n matPrefix\n >{{\n (disabled$ | async) === true ? 'check_box_outline_blank' : 'check_box'\n }}\n </mat-icon>\n }\n\n @if (isPassword()) {\n <button type=\"button\" matSuffix mat-icon-button (click)=\"togglePassword()\">\n <mat-icon color=\"primary\">{{\n hide ? 'visibility_off' : 'visibility'\n }}</mat-icon>\n </button>\n }\n\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n</mat-form-field>\n" }]
|
|
367
|
+
}], propDecorators: { formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], isPassword: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPassword", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], disableSwitch: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSwitch", required: false }] }] } });
|
|
408
368
|
|
|
409
369
|
/**
|
|
410
370
|
* This component renders a textarea field
|
|
@@ -414,33 +374,33 @@ let FormFieldTextareaComponent = class FormFieldTextareaComponent {
|
|
|
414
374
|
/**
|
|
415
375
|
* The field's form control
|
|
416
376
|
*/
|
|
417
|
-
formControl;
|
|
377
|
+
formControl = input(undefined, ...(ngDevMode ? [{ debugName: "formControl" }] : []));
|
|
418
378
|
/**
|
|
419
379
|
* Field placeholder
|
|
420
380
|
*/
|
|
421
|
-
placeholder;
|
|
381
|
+
placeholder = input(undefined, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
422
382
|
/**
|
|
423
383
|
* Field placeholder
|
|
424
384
|
*/
|
|
425
|
-
errors;
|
|
385
|
+
errors = input(undefined, ...(ngDevMode ? [{ debugName: "errors" }] : []));
|
|
426
386
|
/**
|
|
427
387
|
* Wheter a disable switch should be available
|
|
428
388
|
*/
|
|
429
|
-
disableSwitch = false;
|
|
389
|
+
disableSwitch = input(false, ...(ngDevMode ? [{ debugName: "disableSwitch" }] : []));
|
|
430
390
|
/**
|
|
431
391
|
* Whether the field is required
|
|
432
392
|
*/
|
|
433
393
|
get required() {
|
|
434
|
-
return formControlIsRequired(this.formControl);
|
|
394
|
+
return formControlIsRequired(this.formControl());
|
|
435
395
|
}
|
|
436
396
|
ngOnInit() {
|
|
437
|
-
this.disabled$.next(this.formControl.disabled);
|
|
397
|
+
this.disabled$.next(this.formControl().disabled);
|
|
438
398
|
}
|
|
439
399
|
/**
|
|
440
400
|
* Get error message
|
|
441
401
|
*/
|
|
442
402
|
getErrorMessage() {
|
|
443
|
-
return getControlErrorMessage(this.formControl, this.errors);
|
|
403
|
+
return getControlErrorMessage(this.formControl(), this.errors());
|
|
444
404
|
}
|
|
445
405
|
onDisableSwitchClick() {
|
|
446
406
|
this.toggleDisabled();
|
|
@@ -448,20 +408,20 @@ let FormFieldTextareaComponent = class FormFieldTextareaComponent {
|
|
|
448
408
|
toggleDisabled() {
|
|
449
409
|
const disabled = !this.disabled$.value;
|
|
450
410
|
if (disabled === true) {
|
|
451
|
-
this.formControl.disable();
|
|
411
|
+
this.formControl().disable();
|
|
452
412
|
}
|
|
453
413
|
else {
|
|
454
|
-
this.formControl.enable();
|
|
414
|
+
this.formControl().enable();
|
|
455
415
|
}
|
|
456
416
|
this.disabled$.next(disabled);
|
|
457
417
|
}
|
|
458
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
459
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
418
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
419
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FormFieldTextareaComponent, isStandalone: true, selector: "igo-form-field-textarea", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, disableSwitch: { classPropertyName: "disableSwitch", publicName: "disableSwitch", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mat-form-field>\n <textarea\n matInput\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n >\n </textarea>\n @if (disableSwitch() === true) {\n <mat-icon\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n matPrefix\n >{{\n (disabled$ | async) === true ? 'check_box_outline_blank' : 'check_box'\n }}\n </mat-icon>\n }\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n</mat-form-field>\n", dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
460
420
|
};
|
|
461
421
|
FormFieldTextareaComponent = __decorate([
|
|
462
422
|
IgoFormFieldComponent('textarea')
|
|
463
423
|
], FormFieldTextareaComponent);
|
|
464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
424
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldTextareaComponent, decorators: [{
|
|
465
425
|
type: Component,
|
|
466
426
|
args: [{ selector: 'igo-form-field-textarea', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
467
427
|
MatFormFieldModule,
|
|
@@ -471,16 +431,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
471
431
|
MatIconModule,
|
|
472
432
|
AsyncPipe,
|
|
473
433
|
IgoLanguageModule
|
|
474
|
-
], template: "<mat-form-field>\n <textarea\n matInput\n [required]=\"required\"\n [placeholder]=\"placeholder | translate\"\n [formControl]=\"formControl\"\n >\n </textarea>\n @if (disableSwitch === true) {\n <mat-icon\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n matPrefix\n >{{\n (disabled$ | async) === true ? 'check_box_outline_blank' : 'check_box'\n }}\n </mat-icon>\n }\n @if (formControl.errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n</mat-form-field>\n" }]
|
|
475
|
-
}], propDecorators: { formControl: [{
|
|
476
|
-
type: Input
|
|
477
|
-
}], placeholder: [{
|
|
478
|
-
type: Input
|
|
479
|
-
}], errors: [{
|
|
480
|
-
type: Input
|
|
481
|
-
}], disableSwitch: [{
|
|
482
|
-
type: Input
|
|
483
|
-
}] } });
|
|
434
|
+
], template: "<mat-form-field>\n <textarea\n matInput\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n >\n </textarea>\n @if (disableSwitch() === true) {\n <mat-icon\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n matPrefix\n >{{\n (disabled$ | async) === true ? 'check_box_outline_blank' : 'check_box'\n }}\n </mat-icon>\n }\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n</mat-form-field>\n" }]
|
|
435
|
+
}], propDecorators: { formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], disableSwitch: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSwitch", required: false }] }] } });
|
|
484
436
|
|
|
485
437
|
class FormService {
|
|
486
438
|
formBuilder = inject(UntypedFormBuilder);
|
|
@@ -547,10 +499,10 @@ class FormService {
|
|
|
547
499
|
const args = match[2];
|
|
548
500
|
return Validators[name](args);
|
|
549
501
|
}
|
|
550
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
551
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
502
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
503
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormService, providedIn: 'root' });
|
|
552
504
|
}
|
|
553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormService, decorators: [{
|
|
554
506
|
type: Injectable,
|
|
555
507
|
args: [{
|
|
556
508
|
providedIn: 'root'
|
|
@@ -566,7 +518,7 @@ class FormFieldComponent {
|
|
|
566
518
|
/**
|
|
567
519
|
* Field configuration
|
|
568
520
|
*/
|
|
569
|
-
field;
|
|
521
|
+
field = input(undefined, ...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
570
522
|
/**
|
|
571
523
|
* Field inputs cache
|
|
572
524
|
*/
|
|
@@ -576,10 +528,10 @@ class FormFieldComponent {
|
|
|
576
528
|
*/
|
|
577
529
|
fieldSubscribers = undefined;
|
|
578
530
|
get fieldOptions() {
|
|
579
|
-
return this.field.options || {};
|
|
531
|
+
return this.field().options || {};
|
|
580
532
|
}
|
|
581
533
|
getFieldComponent() {
|
|
582
|
-
return this.formFieldService.getFieldByType(this.field.type || 'text');
|
|
534
|
+
return this.formFieldService.getFieldByType(this.field().type || 'text');
|
|
583
535
|
}
|
|
584
536
|
getFieldInputs() {
|
|
585
537
|
if (this.fieldInputs !== undefined) {
|
|
@@ -587,10 +539,10 @@ class FormFieldComponent {
|
|
|
587
539
|
}
|
|
588
540
|
const errors = this.fieldOptions.errors || {};
|
|
589
541
|
this.fieldInputs = Object.assign({
|
|
590
|
-
placeholder: this.field.title,
|
|
542
|
+
placeholder: this.field().title,
|
|
591
543
|
disableSwitch: this.fieldOptions.disableSwitch || false
|
|
592
|
-
}, Object.assign({}, this.field.inputs || {}), {
|
|
593
|
-
formControl: this.field.control,
|
|
544
|
+
}, Object.assign({}, this.field().inputs || {}), {
|
|
545
|
+
formControl: this.field().control,
|
|
594
546
|
errors: Object.assign({}, getDefaultErrorMessages(), errors)
|
|
595
547
|
});
|
|
596
548
|
return this.fieldInputs;
|
|
@@ -599,18 +551,16 @@ class FormFieldComponent {
|
|
|
599
551
|
if (this.fieldSubscribers !== undefined) {
|
|
600
552
|
return this.fieldSubscribers;
|
|
601
553
|
}
|
|
602
|
-
this.fieldSubscribers = Object.assign({}, this.field.subscribers || {});
|
|
554
|
+
this.fieldSubscribers = Object.assign({}, this.field().subscribers || {});
|
|
603
555
|
return this.fieldSubscribers;
|
|
604
556
|
}
|
|
605
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
606
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
557
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
558
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FormFieldComponent, isStandalone: true, selector: "igo-form-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (field() !== undefined) {\n <igo-dynamic-outlet\n [component]=\"getFieldComponent()\"\n [inputs]=\"getFieldInputs()\"\n [subscribers]=\"getFieldSubscribers()\"\n />\n}\n", styles: ["::ng-deep mat-form-field{width:100%}::ng-deep .igo-form-disable-switch{margin-right:8px}\n"], dependencies: [{ kind: "component", type: DynamicOutletComponent, selector: "igo-dynamic-outlet", inputs: ["component", "inputs", "subscribers"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
607
559
|
}
|
|
608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
609
561
|
type: Component,
|
|
610
|
-
args: [{ selector: 'igo-form-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DynamicOutletComponent], template: "@if (field !== undefined) {\n <igo-dynamic-outlet\n [component]=\"getFieldComponent()\"\n [inputs]=\"getFieldInputs()\"\n [subscribers]=\"getFieldSubscribers()\"\n
|
|
611
|
-
}], propDecorators: { field: [{
|
|
612
|
-
type: Input
|
|
613
|
-
}] } });
|
|
562
|
+
args: [{ selector: 'igo-form-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DynamicOutletComponent], template: "@if (field() !== undefined) {\n <igo-dynamic-outlet\n [component]=\"getFieldComponent()\"\n [inputs]=\"getFieldInputs()\"\n [subscribers]=\"getFieldSubscribers()\"\n />\n}\n", styles: ["::ng-deep mat-form-field{width:100%}::ng-deep .igo-form-disable-switch{margin-right:8px}\n"] }]
|
|
563
|
+
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }] } });
|
|
614
564
|
|
|
615
565
|
const FORM_FIELD_DIRECTIVES = [
|
|
616
566
|
FormFieldComponent,
|
|
@@ -623,11 +573,11 @@ const FORM_FIELD_DIRECTIVES = [
|
|
|
623
573
|
* @deprecated import the components directly or FORM_FIELD_DIRECTIVES for every components/directives
|
|
624
574
|
*/
|
|
625
575
|
class IgoFormFieldModule {
|
|
626
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
627
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
628
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
576
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
577
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoFormFieldModule, imports: [FormFieldComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent], exports: [FormFieldComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent] });
|
|
578
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormFieldModule, imports: [FORM_FIELD_DIRECTIVES] });
|
|
629
579
|
}
|
|
630
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormFieldModule, decorators: [{
|
|
631
581
|
type: NgModule,
|
|
632
582
|
args: [{
|
|
633
583
|
imports: [...FORM_FIELD_DIRECTIVES],
|
|
@@ -644,16 +594,16 @@ class FormGroupComponent {
|
|
|
644
594
|
/**
|
|
645
595
|
* Form field group
|
|
646
596
|
*/
|
|
647
|
-
group;
|
|
597
|
+
group = input(undefined, ...(ngDevMode ? [{ debugName: "group" }] : []));
|
|
648
598
|
/**
|
|
649
599
|
* Field placeholder
|
|
650
600
|
*/
|
|
651
|
-
errors;
|
|
601
|
+
errors = input(undefined, ...(ngDevMode ? [{ debugName: "errors" }] : []));
|
|
652
602
|
/**
|
|
653
603
|
* Form group control
|
|
654
604
|
*/
|
|
655
605
|
get formControl() {
|
|
656
|
-
return this.group.control;
|
|
606
|
+
return this.group().control;
|
|
657
607
|
}
|
|
658
608
|
/**
|
|
659
609
|
* Return the number of columns a field should occupy.
|
|
@@ -685,30 +635,26 @@ class FormGroupComponent {
|
|
|
685
635
|
* Get error message
|
|
686
636
|
*/
|
|
687
637
|
getErrorMessage() {
|
|
688
|
-
const options = this.group.options || {};
|
|
638
|
+
const options = this.group().options || {};
|
|
689
639
|
return getControlErrorMessage(this.formControl, options.errors || {});
|
|
690
640
|
}
|
|
691
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
692
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
641
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
642
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FormGroupComponent, isStandalone: true, selector: "igo-form-group", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (group() && group().fields.length > 0) {\n <div class=\"igo-form-group-fields\">\n @for (field of group().fields; track field) {\n <div class=\"igo-form-field-wrapper\" [ngClass]=\"getFieldNgClass(field)\">\n <igo-form-field [field]=\"field\" />\n </div>\n }\n </div>\n}\n\n<div class=\"igo-form-group-extra-content\">\n <ng-content />\n</div>\n\n@if (formControl.errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n}\n", styles: [":host{width:100%;height:100%;display:block;overflow:auto;padding:10px 5px;box-sizing:border-box}:host .igo-form-field-colspan-2{width:100%}:host .igo-form-field-colspan-1{width:50%}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FormFieldComponent, selector: "igo-form-field", inputs: ["field"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
693
643
|
}
|
|
694
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormGroupComponent, decorators: [{
|
|
695
645
|
type: Component,
|
|
696
|
-
args: [{ selector: 'igo-form-group', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, FormFieldComponent, MatFormFieldModule, IgoLanguageModule], template: "@if (group && group.fields.length > 0) {\n <div class=\"igo-form-group-fields\">\n @for (field of group.fields; track field) {\n <div class=\"igo-form-field-wrapper\" [ngClass]=\"getFieldNgClass(field)\">\n <igo-form-field [field]=\"field\"
|
|
697
|
-
}], propDecorators: { group: [{
|
|
698
|
-
type: Input
|
|
699
|
-
}], errors: [{
|
|
700
|
-
type: Input
|
|
701
|
-
}] } });
|
|
646
|
+
args: [{ selector: 'igo-form-group', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, FormFieldComponent, MatFormFieldModule, IgoLanguageModule], template: "@if (group() && group().fields.length > 0) {\n <div class=\"igo-form-group-fields\">\n @for (field of group().fields; track field) {\n <div class=\"igo-form-field-wrapper\" [ngClass]=\"getFieldNgClass(field)\">\n <igo-form-field [field]=\"field\" />\n </div>\n }\n </div>\n}\n\n<div class=\"igo-form-group-extra-content\">\n <ng-content />\n</div>\n\n@if (formControl.errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n}\n", styles: [":host{width:100%;height:100%;display:block;overflow:auto;padding:10px 5px;box-sizing:border-box}:host .igo-form-field-colspan-2{width:100%}:host .igo-form-field-colspan-1{width:50%}\n"] }]
|
|
647
|
+
}], propDecorators: { group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }] } });
|
|
702
648
|
|
|
703
649
|
/**
|
|
704
650
|
* @deprecated import the FormGroupComponent directly
|
|
705
651
|
*/
|
|
706
652
|
class IgoFormGroupModule {
|
|
707
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
708
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
709
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
653
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
654
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoFormGroupModule, imports: [FormGroupComponent], exports: [FormGroupComponent] });
|
|
655
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormGroupModule, imports: [FormGroupComponent] });
|
|
710
656
|
}
|
|
711
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormGroupModule, decorators: [{
|
|
712
658
|
type: NgModule,
|
|
713
659
|
args: [{
|
|
714
660
|
imports: [FormGroupComponent],
|
|
@@ -725,13 +671,13 @@ const FORM_DIRECTIVES = [
|
|
|
725
671
|
* @deprecated import the components directly or FORM_DIRECTIVES for every components/directives
|
|
726
672
|
*/
|
|
727
673
|
class IgoFormModule {
|
|
728
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
729
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
674
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
675
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoFormModule, imports: [FormFieldComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent,
|
|
730
676
|
FormComponent], exports: [FormFieldComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent,
|
|
731
677
|
FormComponent] });
|
|
732
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
678
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormModule, imports: [FORM_DIRECTIVES] });
|
|
733
679
|
}
|
|
734
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormModule, decorators: [{
|
|
735
681
|
type: NgModule,
|
|
736
682
|
args: [{
|
|
737
683
|
imports: [...FORM_DIRECTIVES],
|
|
@@ -788,10 +734,10 @@ class FormDialogComponent {
|
|
|
788
734
|
cancel() {
|
|
789
735
|
this.dialogRef.close();
|
|
790
736
|
}
|
|
791
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
792
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
737
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
738
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: FormDialogComponent, isStandalone: true, selector: "igo-form-dialog", ngImport: i0, template: "<h1 mat-dialog-title>{{ data.title | translate }}</h1>\n\n@if (form$ | async; as form) {\n <igo-form\n [form]=\"form\"\n [formData]=\"data$ | async\"\n (submitForm)=\"onSubmit($event)\"\n >\n @if (form.fields.length) {\n <div class=\"form-dialog-container\">\n @for (field of form.fields; track field) {\n <igo-form-field [field]=\"field\" />\n }\n @for (group of form.groups; track group) {\n <igo-form-group [group]=\"group\" />\n }\n </div>\n }\n <div formButtons mat-dialog-actions>\n <button\n mat-stroked-button\n type=\"button\"\n color=\"primary\"\n (click)=\"cancel()\"\n >\n {{ data.cancelButtonText | translate }}\n </button>\n <button matButton=\"filled\" type=\"submit\" color=\"primary\">\n {{ data.processButtonText | translate }}\n </button>\n </div>\n </igo-form>\n}\n<div>\n @if (data.notice && data.notice !== '') {\n <igo-custom-html [html]=\"data.notice\" />\n }\n</div>\n", styles: [":host div[mat-dialog-actions]{margin:10px 0 0}:host .form-dialog-container{width:100%;padding:10px}:host .form-dialog-container igo-form-field,:host .form-dialog-container igo-form-group{display:block;height:auto}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: FormComponent, selector: "igo-form", inputs: ["form", "formData", "autocomplete"], outputs: ["submitForm"] }, { kind: "component", type: FormFieldComponent, selector: "igo-form-field", inputs: ["field"] }, { kind: "component", type: FormGroupComponent, selector: "igo-form-group", inputs: ["group", "errors"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: CustomHtmlComponent, selector: "igo-custom-html", inputs: ["html"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
|
|
793
739
|
}
|
|
794
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormDialogComponent, decorators: [{
|
|
795
741
|
type: Component,
|
|
796
742
|
args: [{ selector: 'igo-form-dialog', imports: [
|
|
797
743
|
MatDialogTitle,
|
|
@@ -803,7 +749,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
803
749
|
CustomHtmlComponent,
|
|
804
750
|
AsyncPipe,
|
|
805
751
|
IgoLanguageModule
|
|
806
|
-
], template: "<h1 mat-dialog-title>{{ data.title | translate }}</h1>\n\n@if (form$ | async; as form) {\n <igo-form\n [form]=\"form\"\n [formData]=\"data$ | async\"\n (submitForm)=\"onSubmit($event)\"\n >\n @if (form.fields.length) {\n <div class=\"form-dialog-container\">\n @for (field of form.fields; track field) {\n <igo-form-field [field]=\"field\"
|
|
752
|
+
], template: "<h1 mat-dialog-title>{{ data.title | translate }}</h1>\n\n@if (form$ | async; as form) {\n <igo-form\n [form]=\"form\"\n [formData]=\"data$ | async\"\n (submitForm)=\"onSubmit($event)\"\n >\n @if (form.fields.length) {\n <div class=\"form-dialog-container\">\n @for (field of form.fields; track field) {\n <igo-form-field [field]=\"field\" />\n }\n @for (group of form.groups; track group) {\n <igo-form-group [group]=\"group\" />\n }\n </div>\n }\n <div formButtons mat-dialog-actions>\n <button\n mat-stroked-button\n type=\"button\"\n color=\"primary\"\n (click)=\"cancel()\"\n >\n {{ data.cancelButtonText | translate }}\n </button>\n <button matButton=\"filled\" type=\"submit\" color=\"primary\">\n {{ data.processButtonText | translate }}\n </button>\n </div>\n </igo-form>\n}\n<div>\n @if (data.notice && data.notice !== '') {\n <igo-custom-html [html]=\"data.notice\" />\n }\n</div>\n", styles: [":host div[mat-dialog-actions]{margin:10px 0 0}:host .form-dialog-container{width:100%;padding:10px}:host .form-dialog-container igo-form-field,:host .form-dialog-container igo-form-group{display:block;height:auto}\n"] }]
|
|
807
753
|
}], ctorParameters: () => [] });
|
|
808
754
|
|
|
809
755
|
class FormDialogService {
|
|
@@ -821,10 +767,10 @@ class FormDialogService {
|
|
|
821
767
|
});
|
|
822
768
|
return dialogRef.afterClosed();
|
|
823
769
|
}
|
|
824
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
825
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
770
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
771
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormDialogService });
|
|
826
772
|
}
|
|
827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
773
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FormDialogService, decorators: [{
|
|
828
774
|
type: Injectable
|
|
829
775
|
}] });
|
|
830
776
|
|
|
@@ -841,11 +787,11 @@ class IgoFormDialogModule {
|
|
|
841
787
|
providers: []
|
|
842
788
|
};
|
|
843
789
|
}
|
|
844
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
845
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
846
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
790
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
791
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoFormDialogModule, imports: [MatDialogModule, FormDialogComponent], exports: [FormDialogComponent] });
|
|
792
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormDialogModule, providers: [FormDialogService], imports: [MatDialogModule, FormDialogComponent] });
|
|
847
793
|
}
|
|
848
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
794
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoFormDialogModule, decorators: [{
|
|
849
795
|
type: NgModule,
|
|
850
796
|
args: [{
|
|
851
797
|
imports: [MatDialogModule, FormDialogComponent],
|