@igo2/common 21.0.0-next.32 → 21.0.0-next.33

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.
@@ -1,35 +1,69 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, viewChild, ChangeDetectionStrategy, Component, NgModule, Injectable, signal, inject, ChangeDetectorRef } from '@angular/core';
2
+ import { input, output, viewChild, ChangeDetectionStrategy, Component, NgModule, Injectable, inject, signal, ChangeDetectorRef, computed } from '@angular/core';
3
3
  import * as i3 from '@angular/forms';
4
- import { FormsModule, ReactiveFormsModule, FormGroup, FormControl, UntypedFormBuilder, Validators } from '@angular/forms';
4
+ import { FormsModule, ReactiveFormsModule, NgForm, FormGroupDirective, FormGroup, FormControl, UntypedFormBuilder, Validators } from '@angular/forms';
5
5
  import { t } from 'typy';
6
6
  import { __decorate } from 'tslib';
7
+ import * as i4 from '@angular/material/checkbox';
8
+ import { MatCheckboxModule } from '@angular/material/checkbox';
9
+ import { ErrorStateMatcher, provideNativeDateAdapter, MatOptionModule } from '@angular/material/core';
10
+ import * as i1 from '@angular/material/form-field';
11
+ import { MatFormFieldModule } from '@angular/material/form-field';
12
+ import { IgoLanguageModule, LanguageService } from '@igo2/core/language';
13
+ import { Subject, BehaviorSubject } from 'rxjs';
14
+ import { takeUntil } from 'rxjs/operators';
15
+ import * as i5 from '@ngx-translate/core';
7
16
  import * as i8 from '@angular/material/button';
8
17
  import { MatButtonModule } from '@angular/material/button';
9
- import * as i4$1 from '@angular/material/checkbox';
10
- import { MatCheckboxModule } from '@angular/material/checkbox';
11
- import { provideNativeDateAdapter, MatOptionModule } from '@angular/material/core';
12
18
  import * as i3$1 from '@angular/material/datepicker';
13
19
  import { MatDatepickerModule } from '@angular/material/datepicker';
14
- import * as i1 from '@angular/material/form-field';
15
- import { MatFormFieldModule } from '@angular/material/form-field';
16
20
  import * as i7 from '@angular/material/icon';
17
21
  import { MatIconModule } from '@angular/material/icon';
18
22
  import * as i2 from '@angular/material/input';
19
23
  import { MatInputModule } from '@angular/material/input';
20
- import * as i4 from '@angular/material/timepicker';
24
+ import * as i4$1 from '@angular/material/timepicker';
21
25
  import { MatTimepickerModule } from '@angular/material/timepicker';
22
- import { IgoLanguageModule, LanguageService } from '@igo2/core/language';
23
- import { Subject, BehaviorSubject } from 'rxjs';
24
- import { takeUntil } from 'rxjs/operators';
25
- import * as i5 from '@ngx-translate/core';
26
+ import * as i4$2 from '@angular/material/radio';
27
+ import { MatRadioModule } from '@angular/material/radio';
26
28
  import * as i2$1 from '@angular/material/select';
27
29
  import { MatSelectModule } from '@angular/material/select';
28
30
  import { DynamicOutletComponent } from '@igo2/common/dynamic-component';
29
31
  import { NgClass, AsyncPipe } from '@angular/common';
30
- import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogActions, MatDialog, MatDialogModule } from '@angular/material/dialog';
31
- import { CustomHtmlComponent } from '@igo2/common/custom-html';
32
+ import { toSignal } from '@angular/core/rxjs-interop';
33
+ import * as i1$1 from '@angular/material/stepper';
34
+ import { MatStepperModule } from '@angular/material/stepper';
35
+ import * as i6 from '@igo2/common/custom-html';
36
+ import { IgoCustomHtmlModule, CustomHtmlComponent } from '@igo2/common/custom-html';
37
+ import * as i1$2 from '@angular/material/dialog';
38
+ import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogActions, MatDialogModule, MatDialog } from '@angular/material/dialog';
32
39
 
40
+ function buildFormFromConfig(formService, formConfig) {
41
+ const fields = [];
42
+ const groups = [];
43
+ formConfig?.formFieldConfigs?.forEach((config) => {
44
+ fields.push(formService.field(config));
45
+ });
46
+ formConfig?.formGroupsConfigs?.forEach((formGroupsConfig) => {
47
+ const groupFields = formGroupsConfig.formFieldConfigs?.map((config) => formService.field(config));
48
+ groups.push(formService.group({ name: formGroupsConfig.name }, groupFields));
49
+ });
50
+ return formService.form(fields, groups);
51
+ }
52
+ function markFormAsTouched(form) {
53
+ if (form.groups?.length) {
54
+ form.groups.forEach((group) => {
55
+ Object.keys(group.control.controls).forEach((key) => {
56
+ group.control.controls[key].markAsTouched();
57
+ group.control.controls[key].updateValueAndValidity();
58
+ });
59
+ });
60
+ return;
61
+ }
62
+ form.fields.forEach((field) => {
63
+ field.control.markAsTouched();
64
+ field.control.updateValueAndValidity();
65
+ });
66
+ }
33
67
  function formControlIsRequired(control) {
34
68
  if (control.validator) {
35
69
  const validator = control.validator({});
@@ -205,6 +239,126 @@ function IgoFormFieldComponent(type) {
205
239
  };
206
240
  }
207
241
 
242
+ let FormFieldCheckboxComponent = class FormFieldCheckboxComponent {
243
+ errorStateMatcher = inject(ErrorStateMatcher);
244
+ parentForm = inject(NgForm, { optional: true });
245
+ parentFormGroup = inject(FormGroupDirective, { optional: true });
246
+ disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
247
+ showErrorState = signal(false, ...(ngDevMode ? [{ debugName: "showErrorState" }] : /* istanbul ignore next */ []));
248
+ selectedValues = signal([], ...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
249
+ destroy$ = new Subject();
250
+ choices = input.required(...(ngDevMode ? [{ debugName: "choices" }] : /* istanbul ignore next */ []));
251
+ formControl = input.required(...(ngDevMode ? [{ debugName: "formControl" }] : /* istanbul ignore next */ []));
252
+ showLabel = input(false, ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
253
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
254
+ errors = input(...(ngDevMode ? [undefined, { debugName: "errors" }] : /* istanbul ignore next */ []));
255
+ maxSelected = input(...(ngDevMode ? [undefined, { debugName: "maxSelected" }] : /* istanbul ignore next */ []));
256
+ disableSwitch = input(false, ...(ngDevMode ? [{ debugName: "disableSwitch" }] : /* istanbul ignore next */ []));
257
+ get required() {
258
+ return formControlIsRequired(this.formControl());
259
+ }
260
+ ngOnInit() {
261
+ const control = this.formControl();
262
+ const maxSelected = this.maxSelected();
263
+ if (typeof maxSelected === 'number' && Number.isFinite(maxSelected)) {
264
+ control.addValidators(this.maxSelectedValidator(maxSelected));
265
+ }
266
+ const normalizedValue = this.normalizeValue(control.value);
267
+ control.setValue(normalizedValue, {
268
+ emitEvent: false
269
+ });
270
+ control.updateValueAndValidity({ emitEvent: false });
271
+ this.syncState(control);
272
+ control.events.pipe(takeUntil(this.destroy$)).subscribe(() => {
273
+ this.syncState(control);
274
+ });
275
+ }
276
+ ngOnDestroy() {
277
+ this.destroy$.next();
278
+ this.destroy$.complete();
279
+ }
280
+ getErrorMessage() {
281
+ const maxSelectedError = this.formControl().errors?.['maxSelected'];
282
+ if (maxSelectedError) {
283
+ return (this.errors()?.['maxSelected'] ||
284
+ `Select at most ${maxSelectedError.max} options.`);
285
+ }
286
+ return getControlErrorMessage(this.formControl(), this.errors() || {});
287
+ }
288
+ showError() {
289
+ return this.showErrorState();
290
+ }
291
+ isChecked(value) {
292
+ return this.selectedValues().some((selectedValue) => selectedValue === value);
293
+ }
294
+ onChoiceChange(value, event) {
295
+ const selectedValues = this.selectedValues();
296
+ const nextValues = event.checked
297
+ ? selectedValues.some((selectedValue) => selectedValue === value)
298
+ ? selectedValues
299
+ : [...selectedValues, value]
300
+ : selectedValues.filter((selectedValue) => selectedValue !== value);
301
+ this.formControl().setValue(nextValues);
302
+ this.formControl().markAsDirty();
303
+ this.formControl().markAsTouched();
304
+ }
305
+ onDisableSwitchClick() {
306
+ this.toggleDisabled();
307
+ }
308
+ normalizeValue(value) {
309
+ if (Array.isArray(value)) {
310
+ return value;
311
+ }
312
+ if (value === undefined || value === null || value === '') {
313
+ return [];
314
+ }
315
+ return [value];
316
+ }
317
+ syncState(control) {
318
+ this.disabled.set(control.disabled);
319
+ this.selectedValues.set(this.normalizeValue(control.value));
320
+ this.showErrorState.set(this.errorStateMatcher.isErrorState(control, this.parentFormGroup ?? this.parentForm));
321
+ }
322
+ toggleDisabled() {
323
+ const disabled = !this.disabled();
324
+ if (disabled === true) {
325
+ this.formControl().disable();
326
+ }
327
+ else {
328
+ this.formControl().enable();
329
+ }
330
+ this.disabled.set(disabled);
331
+ }
332
+ maxSelectedValidator(maxSelected) {
333
+ return (control) => {
334
+ const selectedValues = this.normalizeValue(control.value);
335
+ if (selectedValues.length <= maxSelected) {
336
+ return null;
337
+ }
338
+ return {
339
+ maxSelected: {
340
+ max: maxSelected,
341
+ actual: selectedValues.length
342
+ }
343
+ };
344
+ };
345
+ }
346
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
347
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldCheckboxComponent, isStandalone: true, selector: "igo-form-field-checkbox", inputs: { choices: { classPropertyName: "choices", publicName: "choices", isSignal: true, isRequired: true, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", 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 }, maxSelected: { classPropertyName: "maxSelected", publicName: "maxSelected", isSignal: true, isRequired: false, transformFunction: null }, disableSwitch: { classPropertyName: "disableSwitch", publicName: "disableSwitch", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"igo-form-field-choice-list\">\n @if (placeholder()) {\n <div class=\"igo-form-field-choice-label\">\n {{ placeholder() | translate }}\n </div>\n }\n\n <div class=\"igo-form-field-choice-options\">\n @for (choice of choices(); track choice.value) {\n <mat-checkbox\n [checked]=\"isChecked(choice.value)\"\n [disabled]=\"disabled()\"\n [required]=\"required\"\n (change)=\"onChoiceChange(choice.value, $event)\"\n >\n {{ choice.title }}\n </mat-checkbox>\n }\n </div>\n\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n [attr.aria-label]=\"'Toggle field availability'\"\n />\n }\n\n <mat-error [hidden]=\"!showError()\">\n {{ getErrorMessage() | translate }}\n </mat-error>\n</div>\n", styles: [":host{display:block;width:100%}.igo-form-field-choice-list{width:100%}.igo-form-field-choice-label{margin-bottom:8px;color:#000000de;font-size:1rem;line-height:1.25rem}::ng-deep .igo-form-field-choice-list mat-error{display:block;margin-top:6px;font-family:var(--mat-form-field-subscript-text-font, inherit);font-size:var(--mat-form-field-subscript-text-size, 12px);font-weight:var(--mat-form-field-subscript-text-weight, 400);line-height:var(--mat-form-field-subscript-text-line-height, 20px);letter-spacing:var(--mat-form-field-subscript-text-tracking, normal)}::ng-deep .igo-form-field-choice-list mat-error[hidden]{display:none}::ng-deep .igo-form-field-choice-list mat-radio-group,::ng-deep .igo-form-field-choice-list mat-checkbox{display:block}::ng-deep .igo-form-field-choice-list mat-radio-button{margin-right:16px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i4.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"] }, { 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" }] });
348
+ };
349
+ FormFieldCheckboxComponent = __decorate([
350
+ IgoFormFieldComponent('checkbox')
351
+ ], FormFieldCheckboxComponent);
352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldCheckboxComponent, decorators: [{
353
+ type: Component,
354
+ args: [{ selector: 'igo-form-field-checkbox', imports: [
355
+ ReactiveFormsModule,
356
+ MatCheckboxModule,
357
+ MatFormFieldModule,
358
+ IgoLanguageModule
359
+ ], template: "<div class=\"igo-form-field-choice-list\">\n @if (placeholder()) {\n <div class=\"igo-form-field-choice-label\">\n {{ placeholder() | translate }}\n </div>\n }\n\n <div class=\"igo-form-field-choice-options\">\n @for (choice of choices(); track choice.value) {\n <mat-checkbox\n [checked]=\"isChecked(choice.value)\"\n [disabled]=\"disabled()\"\n [required]=\"required\"\n (change)=\"onChoiceChange(choice.value, $event)\"\n >\n {{ choice.title }}\n </mat-checkbox>\n }\n </div>\n\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n [attr.aria-label]=\"'Toggle field availability'\"\n />\n }\n\n <mat-error [hidden]=\"!showError()\">\n {{ getErrorMessage() | translate }}\n </mat-error>\n</div>\n", styles: [":host{display:block;width:100%}.igo-form-field-choice-list{width:100%}.igo-form-field-choice-label{margin-bottom:8px;color:#000000de;font-size:1rem;line-height:1.25rem}::ng-deep .igo-form-field-choice-list mat-error{display:block;margin-top:6px;font-family:var(--mat-form-field-subscript-text-font, inherit);font-size:var(--mat-form-field-subscript-text-size, 12px);font-weight:var(--mat-form-field-subscript-text-weight, 400);line-height:var(--mat-form-field-subscript-text-line-height, 20px);letter-spacing:var(--mat-form-field-subscript-text-tracking, normal)}::ng-deep .igo-form-field-choice-list mat-error[hidden]{display:none}::ng-deep .igo-form-field-choice-list mat-radio-group,::ng-deep .igo-form-field-choice-list mat-checkbox{display:block}::ng-deep .igo-form-field-choice-list mat-radio-button{margin-right:16px}\n"] }]
360
+ }], propDecorators: { choices: [{ type: i0.Input, args: [{ isSignal: true, alias: "choices", required: true }] }], formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: true }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], maxSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelected", required: false }] }], disableSwitch: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSwitch", required: false }] }] } });
361
+
208
362
  let FormFieldDatetimeComponent = class FormFieldDatetimeComponent {
209
363
  disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
210
364
  dateTimeGroup = new FormGroup({
@@ -389,7 +543,7 @@ let FormFieldDatetimeComponent = class FormFieldDatetimeComponent {
389
543
  return null;
390
544
  }
391
545
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldDatetimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
392
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldDatetimeComponent, isStandalone: true, selector: "igo-form-field-datetime", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, timePlaceholder: { classPropertyName: "timePlaceholder", publicName: "timePlaceholder", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, minTime: { classPropertyName: "minTime", publicName: "minTime", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "maxTime", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null }, openOnClick: { classPropertyName: "openOnClick", publicName: "openOnClick", isSignal: true, isRequired: false, transformFunction: null }, disableSwitch: { classPropertyName: "disableSwitch", publicName: "disableSwitch", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideNativeDateAdapter()], ngImport: i0, template: "<div class=\"igo-form-field-datetime-row\">\n <mat-form-field class=\"igo-form-field-datetime-part\">\n @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\n\n <input\n matInput\n readonly=\"true\"\n [matDatepicker]=\"datePicker\"\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"dateControl\"\n [min]=\"minDate() ?? null\"\n [max]=\"maxDate() ?? null\"\n />\n @if (dateControl.value && !disabled()) {\n <button matIconSuffix mat-icon-button type=\"button\" (click)=\"clearDate()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n <mat-datepicker-toggle matIconSuffix [for]=\"datePicker\" />\n <mat-datepicker #datePicker />\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\n />\n }\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field class=\"igo-form-field-datetime-part\">\n <mat-label>{{ timePlaceholder() | translate }}</mat-label>\n\n <input\n matInput\n readonly=\"true\"\n [matTimepicker]=\"timePicker\"\n [required]=\"required\"\n [placeholder]=\"timePlaceholder() | translate\"\n [formControl]=\"timeControl\"\n [matTimepickerMin]=\"minTime()\"\n [matTimepickerMax]=\"maxTime()\"\n [matTimepickerOpenOnClick]=\"openOnClick()\"\n />\n\n @if (timeControl.value && !disabled() && !timeControl.disabled) {\n <button\n matIconSuffix\n mat-icon-button\n type=\"button\"\n (click)=\"$event.stopPropagation(); clearTime()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n <mat-timepicker-toggle matIconSuffix [for]=\"timePicker\" />\n <mat-timepicker #timePicker [interval]=\"interval()\" [options]=\"options()\" />\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n </mat-form-field>\n</div>\n", styles: [":host{display:block}.igo-form-field-datetime-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}.igo-form-field-datetime-part{width:100%;min-width:0}:host ::ng-deep .igo-form-field-datetime-part .mat-mdc-form-field-icon-suffix{display:inline-flex;align-items:center;white-space:nowrap;line-height:1}:host ::ng-deep .igo-form-field-datetime-part .mat-mdc-form-field-icon-suffix .mat-mdc-icon-button,:host ::ng-deep .igo-form-field-datetime-part .mat-mdc-form-field-icon-suffix .mat-mdc-icon-button.mat-mdc-button-base{margin:0}@media(max-width:767px){.igo-form-field-datetime-row{grid-template-columns:1fr}}\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.MatLabel, selector: "mat-label" }, { 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.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: MatDatepickerModule }, { kind: "component", type: i3$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: i4.MatTimepicker, selector: "mat-timepicker", inputs: ["interval", "options", "disableRipple", "aria-label", "aria-labelledby", "panelClass"], outputs: ["selected", "opened", "closed"], exportAs: ["matTimepicker"] }, { kind: "directive", type: i4.MatTimepickerInput, selector: "input[matTimepicker]", inputs: ["value", "matTimepicker", "matTimepickerMin", "matTimepickerMax", "matTimepickerOpenOnClick", "disabled"], outputs: ["valueChange"], exportAs: ["matTimepickerInput"] }, { kind: "component", type: i4.MatTimepickerToggle, selector: "mat-timepicker-toggle", inputs: ["for", "aria-label", "aria-labelledby", "disabled", "tabIndex", "disableRipple"], exportAs: ["matTimepickerToggle"] }, { 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: MatCheckboxModule }, { kind: "component", type: i4$1.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"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
546
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldDatetimeComponent, isStandalone: true, selector: "igo-form-field-datetime", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, timePlaceholder: { classPropertyName: "timePlaceholder", publicName: "timePlaceholder", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, minTime: { classPropertyName: "minTime", publicName: "minTime", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "maxTime", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null }, openOnClick: { classPropertyName: "openOnClick", publicName: "openOnClick", isSignal: true, isRequired: false, transformFunction: null }, disableSwitch: { classPropertyName: "disableSwitch", publicName: "disableSwitch", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideNativeDateAdapter()], ngImport: i0, template: "<div class=\"igo-form-field-datetime-row\">\n <mat-form-field class=\"igo-form-field-datetime-part\">\n @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\n\n <input\n matInput\n readonly=\"true\"\n [matDatepicker]=\"datePicker\"\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"dateControl\"\n [min]=\"minDate() ?? null\"\n [max]=\"maxDate() ?? null\"\n />\n @if (dateControl.value && !disabled()) {\n <button matIconSuffix mat-icon-button type=\"button\" (click)=\"clearDate()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n <mat-datepicker-toggle matIconSuffix [for]=\"datePicker\" />\n <mat-datepicker #datePicker />\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\n />\n }\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field class=\"igo-form-field-datetime-part\">\n <mat-label>{{ timePlaceholder() | translate }}</mat-label>\n\n <input\n matInput\n readonly=\"true\"\n [matTimepicker]=\"timePicker\"\n [required]=\"required\"\n [placeholder]=\"timePlaceholder() | translate\"\n [formControl]=\"timeControl\"\n [matTimepickerMin]=\"minTime()\"\n [matTimepickerMax]=\"maxTime()\"\n [matTimepickerOpenOnClick]=\"openOnClick()\"\n />\n\n @if (timeControl.value && !disabled() && !timeControl.disabled) {\n <button\n matIconSuffix\n mat-icon-button\n type=\"button\"\n (click)=\"$event.stopPropagation(); clearTime()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n <mat-timepicker-toggle matIconSuffix [for]=\"timePicker\" />\n <mat-timepicker #timePicker [interval]=\"interval()\" [options]=\"options()\" />\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n </mat-form-field>\n</div>\n", styles: [":host{display:block}.igo-form-field-datetime-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}.igo-form-field-datetime-part{width:100%;min-width:0}:host ::ng-deep .igo-form-field-datetime-part .mat-mdc-form-field-icon-suffix{display:inline-flex;align-items:center;white-space:nowrap;line-height:1}:host ::ng-deep .igo-form-field-datetime-part .mat-mdc-form-field-icon-suffix .mat-mdc-icon-button,:host ::ng-deep .igo-form-field-datetime-part .mat-mdc-form-field-icon-suffix .mat-mdc-icon-button.mat-mdc-button-base{margin:0}@media(max-width:767px){.igo-form-field-datetime-row{grid-template-columns:1fr}}\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.MatLabel, selector: "mat-label" }, { 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.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: MatDatepickerModule }, { kind: "component", type: i3$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: i4$1.MatTimepicker, selector: "mat-timepicker", inputs: ["interval", "options", "disableRipple", "aria-label", "aria-labelledby", "panelClass"], outputs: ["selected", "opened", "closed"], exportAs: ["matTimepicker"] }, { kind: "directive", type: i4$1.MatTimepickerInput, selector: "input[matTimepicker]", inputs: ["value", "matTimepicker", "matTimepickerMin", "matTimepickerMax", "matTimepickerOpenOnClick", "disabled"], outputs: ["valueChange"], exportAs: ["matTimepickerInput"] }, { kind: "component", type: i4$1.MatTimepickerToggle, selector: "mat-timepicker-toggle", inputs: ["for", "aria-label", "aria-labelledby", "disabled", "tabIndex", "disableRipple"], exportAs: ["matTimepickerToggle"] }, { 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: MatCheckboxModule }, { kind: "component", type: i4.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"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
393
547
  };
394
548
  FormFieldDatetimeComponent = __decorate([
395
549
  IgoFormFieldComponent('datetime')
@@ -465,7 +619,7 @@ let FormFieldNumberComponent = class FormFieldNumberComponent {
465
619
  this.disabled.set(disabled);
466
620
  }
467
621
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
468
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldNumberComponent, isStandalone: true, selector: "igo-form-field-number", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", 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 @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\n <input\n matInput\n type=\"number\"\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n />\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\n />\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.MatLabel, selector: "mat-label" }, { 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.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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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: MatCheckboxModule }, { kind: "component", type: i4$1.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"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
622
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldNumberComponent, isStandalone: true, selector: "igo-form-field-number", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", 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 @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\n <input\n matInput\n type=\"number\"\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n />\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\n />\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.MatLabel, selector: "mat-label" }, { 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.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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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: MatCheckboxModule }, { kind: "component", type: i4.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"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
469
623
  };
470
624
  FormFieldNumberComponent = __decorate([
471
625
  IgoFormFieldComponent('number')
@@ -483,6 +637,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
483
637
  ], template: "<mat-form-field>\n @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\n <input\n matInput\n type=\"number\"\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n />\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\n />\n }\n\n @if (formControl().errors) {\n <mat-error>{{ getErrorMessage() | translate }}</mat-error>\n }\n</mat-form-field>\n" }]
484
638
  }], propDecorators: { formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: true }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", 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 }] }] } });
485
639
 
640
+ let FormFieldRadiobuttonComponent = class FormFieldRadiobuttonComponent {
641
+ errorStateMatcher = inject(ErrorStateMatcher);
642
+ parentForm = inject(NgForm, { optional: true });
643
+ parentFormGroup = inject(FormGroupDirective, { optional: true });
644
+ disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
645
+ showErrorState = signal(false, ...(ngDevMode ? [{ debugName: "showErrorState" }] : /* istanbul ignore next */ []));
646
+ destroy$ = new Subject();
647
+ choices = input.required(...(ngDevMode ? [{ debugName: "choices" }] : /* istanbul ignore next */ []));
648
+ formControl = input.required(...(ngDevMode ? [{ debugName: "formControl" }] : /* istanbul ignore next */ []));
649
+ showLabel = input(false, ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
650
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
651
+ errors = input(...(ngDevMode ? [undefined, { debugName: "errors" }] : /* istanbul ignore next */ []));
652
+ disableSwitch = input(false, ...(ngDevMode ? [{ debugName: "disableSwitch" }] : /* istanbul ignore next */ []));
653
+ get required() {
654
+ return formControlIsRequired(this.formControl());
655
+ }
656
+ ngOnInit() {
657
+ const control = this.formControl();
658
+ this.syncState(control);
659
+ control.events.pipe(takeUntil(this.destroy$)).subscribe(() => {
660
+ this.syncState(control);
661
+ });
662
+ }
663
+ ngOnDestroy() {
664
+ this.destroy$.next();
665
+ this.destroy$.complete();
666
+ }
667
+ getErrorMessage() {
668
+ return getControlErrorMessage(this.formControl(), this.errors() || {});
669
+ }
670
+ showError() {
671
+ return this.showErrorState();
672
+ }
673
+ onDisableSwitchClick() {
674
+ this.toggleDisabled();
675
+ }
676
+ syncState(control) {
677
+ this.disabled.set(control.disabled);
678
+ this.showErrorState.set(this.errorStateMatcher.isErrorState(control, this.parentFormGroup ?? this.parentForm));
679
+ }
680
+ toggleDisabled() {
681
+ const disabled = !this.disabled();
682
+ if (disabled === true) {
683
+ this.formControl().disable();
684
+ }
685
+ else {
686
+ this.formControl().enable();
687
+ }
688
+ this.disabled.set(disabled);
689
+ }
690
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldRadiobuttonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
691
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldRadiobuttonComponent, isStandalone: true, selector: "igo-form-field-radiobutton", inputs: { choices: { classPropertyName: "choices", publicName: "choices", isSignal: true, isRequired: true, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", 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: "<div class=\"igo-form-field-choice-list\">\n @if (placeholder()) {\n <div class=\"igo-form-field-choice-label\">\n {{ placeholder() | translate }}\n </div>\n }\n\n <mat-radio-group\n class=\"igo-form-field-choice-options\"\n [formControl]=\"formControl()\"\n [required]=\"required\"\n >\n @for (choice of choices(); track choice.value) {\n <mat-radio-button [value]=\"choice.value\" [disabled]=\"disabled()\">\n {{ choice.title }}\n </mat-radio-button>\n }\n </mat-radio-group>\n\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n [attr.aria-label]=\"'Toggle field availability'\"\n />\n }\n\n <mat-error [hidden]=\"!showError()\">\n {{ getErrorMessage() | translate }}\n </mat-error>\n</div>\n", styles: [":host{display:block;width:100%}.igo-form-field-choice-list{width:100%}.igo-form-field-choice-label{margin-bottom:8px;color:#000000de;font-size:1rem;line-height:1.25rem}::ng-deep .igo-form-field-choice-list mat-error{display:block;margin-top:6px;font-family:var(--mat-form-field-subscript-text-font, inherit);font-size:var(--mat-form-field-subscript-text-size, 12px);font-weight:var(--mat-form-field-subscript-text-weight, 400);line-height:var(--mat-form-field-subscript-text-line-height, 20px);letter-spacing:var(--mat-form-field-subscript-text-tracking, normal)}::ng-deep .igo-form-field-choice-list mat-error[hidden]{display:none}::ng-deep .igo-form-field-choice-list mat-radio-group,::ng-deep .igo-form-field-choice-list mat-checkbox{display:block}::ng-deep .igo-form-field-choice-list mat-radio-button{margin-right:16px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i4.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"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i4$2.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i4$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"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
692
+ };
693
+ FormFieldRadiobuttonComponent = __decorate([
694
+ IgoFormFieldComponent('radiobuttons'),
695
+ IgoFormFieldComponent('radiobutton')
696
+ ], FormFieldRadiobuttonComponent);
697
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldRadiobuttonComponent, decorators: [{
698
+ type: Component,
699
+ args: [{ selector: 'igo-form-field-radiobutton', imports: [
700
+ ReactiveFormsModule,
701
+ MatCheckboxModule,
702
+ MatFormFieldModule,
703
+ MatRadioModule,
704
+ IgoLanguageModule
705
+ ], template: "<div class=\"igo-form-field-choice-list\">\n @if (placeholder()) {\n <div class=\"igo-form-field-choice-label\">\n {{ placeholder() | translate }}\n </div>\n }\n\n <mat-radio-group\n class=\"igo-form-field-choice-options\"\n [formControl]=\"formControl()\"\n [required]=\"required\"\n >\n @for (choice of choices(); track choice.value) {\n <mat-radio-button [value]=\"choice.value\" [disabled]=\"disabled()\">\n {{ choice.title }}\n </mat-radio-button>\n }\n </mat-radio-group>\n\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n [attr.aria-label]=\"'Toggle field availability'\"\n />\n }\n\n <mat-error [hidden]=\"!showError()\">\n {{ getErrorMessage() | translate }}\n </mat-error>\n</div>\n", styles: [":host{display:block;width:100%}.igo-form-field-choice-list{width:100%}.igo-form-field-choice-label{margin-bottom:8px;color:#000000de;font-size:1rem;line-height:1.25rem}::ng-deep .igo-form-field-choice-list mat-error{display:block;margin-top:6px;font-family:var(--mat-form-field-subscript-text-font, inherit);font-size:var(--mat-form-field-subscript-text-size, 12px);font-weight:var(--mat-form-field-subscript-text-weight, 400);line-height:var(--mat-form-field-subscript-text-line-height, 20px);letter-spacing:var(--mat-form-field-subscript-text-tracking, normal)}::ng-deep .igo-form-field-choice-list mat-error[hidden]{display:none}::ng-deep .igo-form-field-choice-list mat-radio-group,::ng-deep .igo-form-field-choice-list mat-checkbox{display:block}::ng-deep .igo-form-field-choice-list mat-radio-button{margin-right:16px}\n"] }]
706
+ }], propDecorators: { choices: [{ type: i0.Input, args: [{ isSignal: true, alias: "choices", required: true }] }], formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: true }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", 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 }] }] } });
707
+
486
708
  /**
487
709
  * This component renders a select field
488
710
  */
@@ -545,7 +767,7 @@ let FormFieldSelectComponent = class FormFieldSelectComponent {
545
767
  this.disabled.set(disabled);
546
768
  }
547
769
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
548
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", 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: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", 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 @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\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-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\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.MatLabel, selector: "mat-label" }, { 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$1.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$1.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: MatCheckboxModule }, { kind: "component", type: i4$1.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"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
770
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", 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: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", 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 @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\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-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\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.MatLabel, selector: "mat-label" }, { 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$1.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$1.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: MatCheckboxModule }, { kind: "component", type: i4.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"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
549
771
  };
550
772
  FormFieldSelectComponent = __decorate([
551
773
  IgoFormFieldComponent('select')
@@ -639,7 +861,7 @@ let FormFieldTextComponent = class FormFieldTextComponent {
639
861
  }
640
862
  }
641
863
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
642
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldTextComponent, isStandalone: true, selector: "igo-form-field-text", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", 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 @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\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-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\n />\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.MatLabel, selector: "mat-label" }, { 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.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: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i4$1.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"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
864
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldTextComponent, isStandalone: true, selector: "igo-form-field-text", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", 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 @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\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-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\n />\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.MatLabel, selector: "mat-label" }, { 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.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: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i4.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"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
643
865
  };
644
866
  FormFieldTextComponent = __decorate([
645
867
  IgoFormFieldComponent('text')
@@ -712,7 +934,7 @@ let FormFieldTextareaComponent = class FormFieldTextareaComponent {
712
934
  this.disabled.set(disabled);
713
935
  }
714
936
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
715
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldTextareaComponent, isStandalone: true, selector: "igo-form-field-textarea", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", 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 @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\n <textarea\n matInput\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n >\n </textarea>\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\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.MatLabel, selector: "mat-label" }, { 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.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: MatCheckboxModule }, { kind: "component", type: i4$1.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"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
937
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldTextareaComponent, isStandalone: true, selector: "igo-form-field-textarea", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", 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 @if (showLabel() === true) {\n <mat-label>{{ placeholder() | translate }}</mat-label>\n }\n <textarea\n matInput\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n >\n </textarea>\n @if (disableSwitch() === true) {\n <mat-checkbox\n class=\"igo-form-disable-switch\"\n (click)=\"onDisableSwitchClick()\"\n [checked]=\"!disabled()\"\n matPrefix\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.MatLabel, selector: "mat-label" }, { 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.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: MatCheckboxModule }, { kind: "component", type: i4.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"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
716
938
  };
717
939
  FormFieldTextareaComponent = __decorate([
718
940
  IgoFormFieldComponent('textarea')
@@ -859,8 +1081,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
859
1081
 
860
1082
  const FORM_FIELD_DIRECTIVES = [
861
1083
  FormFieldComponent,
1084
+ FormFieldCheckboxComponent,
862
1085
  FormFieldDatetimeComponent,
863
1086
  FormFieldNumberComponent,
1087
+ FormFieldRadiobuttonComponent,
864
1088
  FormFieldSelectComponent,
865
1089
  FormFieldTextComponent,
866
1090
  FormFieldTextareaComponent
@@ -871,7 +1095,7 @@ const FORM_FIELD_DIRECTIVES = [
871
1095
  */
872
1096
  class IgoFormFieldModule {
873
1097
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
874
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFieldModule, imports: [FormFieldComponent, FormFieldDatetimeComponent, FormFieldNumberComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent], exports: [FormFieldComponent, FormFieldDatetimeComponent, FormFieldNumberComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent] });
1098
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFieldModule, imports: [FormFieldComponent, FormFieldCheckboxComponent, FormFieldDatetimeComponent, FormFieldNumberComponent, FormFieldRadiobuttonComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent], exports: [FormFieldComponent, FormFieldCheckboxComponent, FormFieldDatetimeComponent, FormFieldNumberComponent, FormFieldRadiobuttonComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent] });
875
1099
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFieldModule, imports: [FORM_FIELD_DIRECTIVES] });
876
1100
  }
877
1101
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFieldModule, decorators: [{
@@ -936,11 +1160,11 @@ class FormGroupComponent {
936
1160
  return getControlErrorMessage(this.formControl, options.errors || {});
937
1161
  }
938
1162
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
939
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormGroupComponent, isStandalone: true, selector: "igo-form-group", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, 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 });
1163
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormGroupComponent, isStandalone: true, selector: "igo-form-group", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, 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-group-fields{display:flex;flex-direction:column;gap:12px}: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 });
940
1164
  }
941
1165
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormGroupComponent, decorators: [{
942
1166
  type: Component,
943
- 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"] }]
1167
+ 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-group-fields{display:flex;flex-direction:column;gap:12px}:host .igo-form-field-colspan-2{width:100%}:host .igo-form-field-colspan-1{width:50%}\n"] }]
944
1168
  }], propDecorators: { group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: true }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }] } });
945
1169
 
946
1170
  /**
@@ -969,8 +1193,8 @@ const FORM_DIRECTIVES = [
969
1193
  */
970
1194
  class IgoFormModule {
971
1195
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
972
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: IgoFormModule, imports: [FormFieldComponent, FormFieldDatetimeComponent, FormFieldNumberComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent,
973
- FormComponent], exports: [FormFieldComponent, FormFieldDatetimeComponent, FormFieldNumberComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent,
1196
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: IgoFormModule, imports: [FormFieldComponent, FormFieldCheckboxComponent, FormFieldDatetimeComponent, FormFieldNumberComponent, FormFieldRadiobuttonComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent,
1197
+ FormComponent], exports: [FormFieldComponent, FormFieldCheckboxComponent, FormFieldDatetimeComponent, FormFieldNumberComponent, FormFieldRadiobuttonComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent,
974
1198
  FormComponent] });
975
1199
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormModule, imports: [FORM_DIRECTIVES] });
976
1200
  }
@@ -982,6 +1206,148 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
982
1206
  }]
983
1207
  }] });
984
1208
 
1209
+ function resolveFormStepperStepFormConfig(step, context) {
1210
+ return typeof step.form === 'function' ? step.form(context) : step.form;
1211
+ }
1212
+
1213
+ class FormStepperComponent {
1214
+ formService = inject(FormService);
1215
+ languageService = inject(LanguageService);
1216
+ activeLanguage = toSignal(this.languageService.language$, {
1217
+ initialValue: this.languageService.getLanguage()
1218
+ });
1219
+ steps = input.required(...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
1220
+ initialData = input({}, ...(ngDevMode ? [{ debugName: "initialData" }] : /* istanbul ignore next */ []));
1221
+ notice = input(...(ngDevMode ? [undefined, { debugName: "notice" }] : /* istanbul ignore next */ []));
1222
+ nextButtonText = input('igo.common.formStepper.nextButtonText', ...(ngDevMode ? [{ debugName: "nextButtonText" }] : /* istanbul ignore next */ []));
1223
+ previousButtonText = input('igo.common.formStepper.previousButtonText', ...(ngDevMode ? [{ debugName: "previousButtonText" }] : /* istanbul ignore next */ []));
1224
+ processButtonText = input('igo.common.formStepper.processButtonText', ...(ngDevMode ? [{ debugName: "processButtonText" }] : /* istanbul ignore next */ []));
1225
+ cancelButtonText = input('igo.common.formStepper.cancelButtonText', ...(ngDevMode ? [{ debugName: "cancelButtonText" }] : /* istanbul ignore next */ []));
1226
+ showCancelButton = input(true, ...(ngDevMode ? [{ debugName: "showCancelButton" }] : /* istanbul ignore next */ []));
1227
+ completed = output();
1228
+ cancelled = output();
1229
+ dataChange = output();
1230
+ stepIndex = signal(0, ...(ngDevMode ? [{ debugName: "stepIndex" }] : /* istanbul ignore next */ []));
1231
+ stepResults = signal({}, ...(ngDevMode ? [{ debugName: "stepResults" }] : /* istanbul ignore next */ []));
1232
+ activeStep = computed(() => {
1233
+ const steps = this.steps();
1234
+ if (!steps.length) {
1235
+ throw new Error('Form stepper requires at least one step.');
1236
+ }
1237
+ return steps[this.stepIndex()];
1238
+ }, ...(ngDevMode ? [{ debugName: "activeStep" }] : /* istanbul ignore next */ []));
1239
+ activeContextData = computed(() => this.buildAggregateData(this.stepIndex() - 1), ...(ngDevMode ? [{ debugName: "activeContextData" }] : /* istanbul ignore next */ []));
1240
+ activeFormData = computed(() => this.buildAggregateData(this.stepIndex()), ...(ngDevMode ? [{ debugName: "activeFormData" }] : /* istanbul ignore next */ []));
1241
+ activeForm = computed(() => buildFormFromConfig(this.formService, resolveFormStepperStepFormConfig(this.activeStep(), {
1242
+ data: this.activeContextData(),
1243
+ stepIndex: this.stepIndex(),
1244
+ steps: this.steps()
1245
+ })), ...(ngDevMode ? [{ debugName: "activeForm" }] : /* istanbul ignore next */ []));
1246
+ activeNotice = computed(() => this.activeStep().notice ?? this.notice(), ...(ngDevMode ? [{ debugName: "activeNotice" }] : /* istanbul ignore next */ []));
1247
+ stepCount = computed(() => this.steps().length, ...(ngDevMode ? [{ debugName: "stepCount" }] : /* istanbul ignore next */ []));
1248
+ stepNumber = computed(() => this.stepIndex() + 1, ...(ngDevMode ? [{ debugName: "stepNumber" }] : /* istanbul ignore next */ []));
1249
+ stepCounterLabel = computed(() => {
1250
+ this.activeLanguage();
1251
+ return this.languageService.translate.instant('igo.common.formStepper.stepCounter', {
1252
+ current: this.stepNumber(),
1253
+ total: this.stepCount()
1254
+ });
1255
+ }, ...(ngDevMode ? [{ debugName: "stepCounterLabel" }] : /* istanbul ignore next */ []));
1256
+ progressWidth = computed(() => `${(this.stepNumber() / this.stepCount()) * 100}%`, ...(ngDevMode ? [{ debugName: "progressWidth" }] : /* istanbul ignore next */ []));
1257
+ maxNavigableStepIndex = computed(() => {
1258
+ const completedStepIndexes = Object.keys(this.stepResults())
1259
+ .map((index) => Number(index))
1260
+ .filter((index) => !Number.isNaN(index));
1261
+ if (!completedStepIndexes.length) {
1262
+ return 0;
1263
+ }
1264
+ return Math.min(Math.max(...completedStepIndexes) + 1, this.steps().length - 1);
1265
+ }, ...(ngDevMode ? [{ debugName: "maxNavigableStepIndex" }] : /* istanbul ignore next */ []));
1266
+ isLastStep = computed(() => this.stepIndex() === this.steps().length - 1, ...(ngDevMode ? [{ debugName: "isLastStep" }] : /* istanbul ignore next */ []));
1267
+ submitButtonText = computed(() => this.isLastStep() ? this.processButtonText() : this.nextButtonText(), ...(ngDevMode ? [{ debugName: "submitButtonText" }] : /* istanbul ignore next */ []));
1268
+ onSubmitStep(stepData) {
1269
+ const form = this.activeForm();
1270
+ if (!form.control.valid) {
1271
+ markFormAsTouched(form);
1272
+ return;
1273
+ }
1274
+ const currentStepIndex = this.stepIndex();
1275
+ const nextStepResults = {
1276
+ ...this.stepResults(),
1277
+ [currentStepIndex]: stepData
1278
+ };
1279
+ Object.keys(nextStepResults)
1280
+ .map((index) => Number(index))
1281
+ .filter((index) => index > currentStepIndex)
1282
+ .forEach((index) => {
1283
+ delete nextStepResults[index];
1284
+ });
1285
+ this.stepResults.set(nextStepResults);
1286
+ const aggregateData = this.buildAggregateDataFrom(nextStepResults, currentStepIndex);
1287
+ this.dataChange.emit(aggregateData);
1288
+ if (this.isLastStep()) {
1289
+ this.completed.emit(aggregateData);
1290
+ return;
1291
+ }
1292
+ queueMicrotask(() => {
1293
+ this.stepIndex.set(currentStepIndex + 1);
1294
+ });
1295
+ }
1296
+ previous() {
1297
+ if (this.stepIndex() === 0) {
1298
+ return;
1299
+ }
1300
+ this.stepIndex.update((index) => index - 1);
1301
+ this.dataChange.emit(this.activeFormData());
1302
+ }
1303
+ cancel() {
1304
+ this.cancelled.emit();
1305
+ }
1306
+ reset() {
1307
+ this.stepResults.set({});
1308
+ this.stepIndex.set(0);
1309
+ this.dataChange.emit({ ...this.initialData() });
1310
+ }
1311
+ onSelectedIndexChange(index) {
1312
+ if (index <= this.maxNavigableStepIndex()) {
1313
+ this.stepIndex.set(index);
1314
+ this.dataChange.emit(this.activeFormData());
1315
+ return;
1316
+ }
1317
+ queueMicrotask(() => {
1318
+ this.stepIndex.set(this.stepIndex());
1319
+ });
1320
+ }
1321
+ isCompletedStep(index) {
1322
+ return this.stepResults()[index] !== undefined;
1323
+ }
1324
+ isEditableStep(index) {
1325
+ return index <= this.maxNavigableStepIndex();
1326
+ }
1327
+ buildAggregateData(lastStepIndex) {
1328
+ return this.buildAggregateDataFrom(this.stepResults(), lastStepIndex);
1329
+ }
1330
+ buildAggregateDataFrom(stepResults, lastStepIndex) {
1331
+ const aggregateData = { ...this.initialData() };
1332
+ for (let index = 0; index <= lastStepIndex; index += 1) {
1333
+ Object.assign(aggregateData, stepResults[index] ?? {});
1334
+ }
1335
+ return aggregateData;
1336
+ }
1337
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1338
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormStepperComponent, isStandalone: true, selector: "igo-form-stepper", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: true, transformFunction: null }, initialData: { classPropertyName: "initialData", publicName: "initialData", isSignal: true, isRequired: false, transformFunction: null }, notice: { classPropertyName: "notice", publicName: "notice", isSignal: true, isRequired: false, transformFunction: null }, nextButtonText: { classPropertyName: "nextButtonText", publicName: "nextButtonText", isSignal: true, isRequired: false, transformFunction: null }, previousButtonText: { classPropertyName: "previousButtonText", publicName: "previousButtonText", isSignal: true, isRequired: false, transformFunction: null }, processButtonText: { classPropertyName: "processButtonText", publicName: "processButtonText", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonText: { classPropertyName: "cancelButtonText", publicName: "cancelButtonText", isSignal: true, isRequired: false, transformFunction: null }, showCancelButton: { classPropertyName: "showCancelButton", publicName: "showCancelButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completed: "completed", cancelled: "cancelled", dataChange: "dataChange" }, ngImport: i0, template: "<mat-stepper\n class=\"form-stepper\"\n [selectedIndex]=\"stepIndex()\"\n (selectedIndexChange)=\"onSelectedIndexChange($event)\"\n>\n @for (step of steps(); track step.label) {\n <mat-step\n [completed]=\"isCompletedStep($index)\"\n [editable]=\"isEditableStep($index)\"\n >\n <ng-template matStepLabel>{{ step.label | translate }}</ng-template>\n </mat-step>\n }\n</mat-stepper>\n\n<section class=\"form-stepper-content\">\n <header class=\"form-stepper-header\">\n <div class=\"form-stepper-header-main\">\n <div class=\"form-stepper-meta\">\n <p class=\"form-stepper-counter\">\n {{ stepCounterLabel() }}\n </p>\n <span class=\"form-stepper-badge\">{{\n activeStep().label | translate\n }}</span>\n </div>\n\n @if (activeStep().title) {\n <h2 class=\"form-stepper-title\">{{ activeStep().title | translate }}</h2>\n } @else {\n <h2 class=\"form-stepper-title\">{{ activeStep().label | translate }}</h2>\n }\n </div>\n\n <div class=\"form-stepper-progress\" aria-hidden=\"true\">\n <span\n class=\"form-stepper-progress-bar\"\n [style.width]=\"progressWidth()\"\n ></span>\n </div>\n </header>\n\n <igo-form\n [form]=\"activeForm()\"\n [formData]=\"activeFormData()\"\n (submitForm)=\"onSubmitStep($event)\"\n >\n @if (activeForm().fields.length || activeForm().groups.length) {\n <div class=\"form-dialog-container\">\n @for (field of activeForm().fields; track field.name) {\n <igo-form-field [field]=\"field\" />\n }\n @for (group of activeForm().groups; track group.name) {\n <igo-form-group [group]=\"group\" />\n }\n </div>\n }\n\n <div formButtons class=\"form-stepper-actions\">\n @if (showCancelButton()) {\n <button\n mat-stroked-button\n type=\"button\"\n color=\"primary\"\n (click)=\"cancel()\"\n >\n {{ cancelButtonText() | translate }}\n </button>\n }\n\n @if (stepIndex() > 0) {\n <button\n mat-stroked-button\n type=\"button\"\n color=\"primary\"\n (click)=\"previous()\"\n >\n {{ previousButtonText() | translate }}\n </button>\n }\n\n <button matButton=\"filled\" type=\"submit\" color=\"primary\">\n {{ submitButtonText() | translate }}\n </button>\n </div>\n </igo-form>\n</section>\n\n@if (activeNotice()) {\n <div class=\"form-stepper-notice\" role=\"note\">\n <igo-custom-html [html]=\"activeNotice()!\" />\n </div>\n}\n", styles: [":host{display:block}:host .form-stepper{width:100%;min-width:0}:host .form-stepper-content{padding-top:12px}:host .form-stepper-header{display:grid;gap:12px;margin-bottom:12px;padding:14px;border:1px solid #d6e1ef;border-radius:16px;background:linear-gradient(180deg,#fbfdff,#f4f8fc);box-shadow:0 10px 24px #135d9b14}:host .form-stepper-header-main{display:grid;gap:8px}:host .form-stepper-meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}:host .form-stepper-counter{margin:0;color:#5d6a7a;font-size:.8rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase}:host .form-stepper-badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;background:#d9ebf9;color:#135d9b;font-size:.8rem;font-weight:700;letter-spacing:.02em}:host .form-stepper-progress{overflow:hidden;height:6px;border-radius:999px;background:#dbe3ef}:host .form-stepper-progress-bar{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#135d9b,#3f8cc7);transition:width .16s ease}:host .form-stepper-title{margin:0;font-weight:600;font-size:1.25rem;line-height:1.3}:host .form-stepper-notice{margin-top:12px;padding:12px 14px;border-left:4px solid #3f8cc7;border-radius:10px;background:#f4f8fc}:host .form-stepper-actions{margin:10px 0 0;gap:8px;justify-content:flex-end}:host .form-dialog-container{width:100%;padding:8px 0}:host .form-dialog-container igo-form-field,:host .form-dialog-container igo-form-group{display:block;height:auto}@media(max-width:640px){:host .form-stepper-content{padding-top:8px}:host .form-stepper-header{gap:10px;margin-bottom:10px;padding:12px;border-radius:14px}:host .form-stepper-meta{align-items:flex-start;justify-content:flex-start}:host .form-stepper-title{font-size:1.1rem;line-height:1.35}:host .form-stepper-badge{font-size:.75rem}:host .form-stepper-actions{flex-direction:column-reverse;align-items:stretch}:host .form-stepper-actions button{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i1$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i1$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i1$1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "aria-label", "headerPrefix", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "ngmodule", type: IgoFormModule }, { kind: "component", type: FormFieldComponent, selector: "igo-form-field", inputs: ["field"] }, { kind: "component", type: FormGroupComponent, selector: "igo-form-group", inputs: ["group", "errors"] }, { kind: "component", type: FormComponent, selector: "igo-form", inputs: ["form", "formData", "autocomplete"], outputs: ["submitForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i8.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: "ngmodule", type: IgoCustomHtmlModule }, { kind: "component", type: i6.CustomHtmlComponent, selector: "igo-custom-html", inputs: ["html"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
1339
+ }
1340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormStepperComponent, decorators: [{
1341
+ type: Component,
1342
+ args: [{ selector: 'igo-form-stepper', imports: [
1343
+ MatStepperModule,
1344
+ IgoFormModule,
1345
+ MatButtonModule,
1346
+ IgoCustomHtmlModule,
1347
+ IgoLanguageModule
1348
+ ], template: "<mat-stepper\n class=\"form-stepper\"\n [selectedIndex]=\"stepIndex()\"\n (selectedIndexChange)=\"onSelectedIndexChange($event)\"\n>\n @for (step of steps(); track step.label) {\n <mat-step\n [completed]=\"isCompletedStep($index)\"\n [editable]=\"isEditableStep($index)\"\n >\n <ng-template matStepLabel>{{ step.label | translate }}</ng-template>\n </mat-step>\n }\n</mat-stepper>\n\n<section class=\"form-stepper-content\">\n <header class=\"form-stepper-header\">\n <div class=\"form-stepper-header-main\">\n <div class=\"form-stepper-meta\">\n <p class=\"form-stepper-counter\">\n {{ stepCounterLabel() }}\n </p>\n <span class=\"form-stepper-badge\">{{\n activeStep().label | translate\n }}</span>\n </div>\n\n @if (activeStep().title) {\n <h2 class=\"form-stepper-title\">{{ activeStep().title | translate }}</h2>\n } @else {\n <h2 class=\"form-stepper-title\">{{ activeStep().label | translate }}</h2>\n }\n </div>\n\n <div class=\"form-stepper-progress\" aria-hidden=\"true\">\n <span\n class=\"form-stepper-progress-bar\"\n [style.width]=\"progressWidth()\"\n ></span>\n </div>\n </header>\n\n <igo-form\n [form]=\"activeForm()\"\n [formData]=\"activeFormData()\"\n (submitForm)=\"onSubmitStep($event)\"\n >\n @if (activeForm().fields.length || activeForm().groups.length) {\n <div class=\"form-dialog-container\">\n @for (field of activeForm().fields; track field.name) {\n <igo-form-field [field]=\"field\" />\n }\n @for (group of activeForm().groups; track group.name) {\n <igo-form-group [group]=\"group\" />\n }\n </div>\n }\n\n <div formButtons class=\"form-stepper-actions\">\n @if (showCancelButton()) {\n <button\n mat-stroked-button\n type=\"button\"\n color=\"primary\"\n (click)=\"cancel()\"\n >\n {{ cancelButtonText() | translate }}\n </button>\n }\n\n @if (stepIndex() > 0) {\n <button\n mat-stroked-button\n type=\"button\"\n color=\"primary\"\n (click)=\"previous()\"\n >\n {{ previousButtonText() | translate }}\n </button>\n }\n\n <button matButton=\"filled\" type=\"submit\" color=\"primary\">\n {{ submitButtonText() | translate }}\n </button>\n </div>\n </igo-form>\n</section>\n\n@if (activeNotice()) {\n <div class=\"form-stepper-notice\" role=\"note\">\n <igo-custom-html [html]=\"activeNotice()!\" />\n </div>\n}\n", styles: [":host{display:block}:host .form-stepper{width:100%;min-width:0}:host .form-stepper-content{padding-top:12px}:host .form-stepper-header{display:grid;gap:12px;margin-bottom:12px;padding:14px;border:1px solid #d6e1ef;border-radius:16px;background:linear-gradient(180deg,#fbfdff,#f4f8fc);box-shadow:0 10px 24px #135d9b14}:host .form-stepper-header-main{display:grid;gap:8px}:host .form-stepper-meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}:host .form-stepper-counter{margin:0;color:#5d6a7a;font-size:.8rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase}:host .form-stepper-badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;background:#d9ebf9;color:#135d9b;font-size:.8rem;font-weight:700;letter-spacing:.02em}:host .form-stepper-progress{overflow:hidden;height:6px;border-radius:999px;background:#dbe3ef}:host .form-stepper-progress-bar{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#135d9b,#3f8cc7);transition:width .16s ease}:host .form-stepper-title{margin:0;font-weight:600;font-size:1.25rem;line-height:1.3}:host .form-stepper-notice{margin-top:12px;padding:12px 14px;border-left:4px solid #3f8cc7;border-radius:10px;background:#f4f8fc}:host .form-stepper-actions{margin:10px 0 0;gap:8px;justify-content:flex-end}:host .form-dialog-container{width:100%;padding:8px 0}:host .form-dialog-container igo-form-field,:host .form-dialog-container igo-form-group{display:block;height:auto}@media(max-width:640px){:host .form-stepper-content{padding-top:8px}:host .form-stepper-header{gap:10px;margin-bottom:10px;padding:12px;border-radius:14px}:host .form-stepper-meta{align-items:flex-start;justify-content:flex-start}:host .form-stepper-title{font-size:1.1rem;line-height:1.35}:host .form-stepper-badge{font-size:.75rem}:host .form-stepper-actions{flex-direction:column-reverse;align-items:stretch}:host .form-stepper-actions button{width:100%}}\n"] }]
1349
+ }], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: true }] }], initialData: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialData", required: false }] }], notice: [{ type: i0.Input, args: [{ isSignal: true, alias: "notice", required: false }] }], nextButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextButtonText", required: false }] }], previousButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousButtonText", required: false }] }], processButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "processButtonText", required: false }] }], cancelButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelButtonText", required: false }] }], showCancelButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCancelButton", required: false }] }], completed: [{ type: i0.Output, args: ["completed"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }], dataChange: [{ type: i0.Output, args: ["dataChange"] }] } });
1350
+
985
1351
  class FormDialogComponent {
986
1352
  languageService = inject(LanguageService);
987
1353
  dialogRef = inject(MatDialogRef);
@@ -996,14 +1362,7 @@ class FormDialogComponent {
996
1362
  this.data.cancelButtonText ?? 'igo.common.formDialog.cancelButtonText';
997
1363
  this.data.title = this.data.title ?? 'igo.common.formDialog.title';
998
1364
  this.data$ = this.data.data$ ?? new BehaviorSubject({});
999
- const fields = [];
1000
- const groups = [];
1001
- this.data.formFieldConfigs?.map((config) => fields.push(this.formService.field(config)));
1002
- this.data.formGroupsConfigs?.map((formGroupsConfig) => {
1003
- const fields = formGroupsConfig.formFieldConfigs?.map((config) => this.formService.field(config));
1004
- groups.push(this.formService.group({ name: formGroupsConfig.name }, fields));
1005
- });
1006
- const form = this.formService.form(fields, groups);
1365
+ const form = buildFormFromConfig(this.formService, this.data);
1007
1366
  this.form$.next(form);
1008
1367
  }
1009
1368
  onSubmit(data) {
@@ -1014,27 +1373,14 @@ class FormDialogComponent {
1014
1373
  this.dialogRef.close(data);
1015
1374
  }
1016
1375
  else {
1017
- if (form.groups?.length) {
1018
- form.groups.map((group) => {
1019
- Object.keys(group.control.controls).map((k) => {
1020
- group.control.controls[k].markAsTouched();
1021
- group.control.controls[k].updateValueAndValidity();
1022
- });
1023
- });
1024
- }
1025
- else {
1026
- form.fields.map((f) => {
1027
- f.control.markAsTouched();
1028
- f.control.updateValueAndValidity();
1029
- });
1030
- }
1376
+ markFormAsTouched(form);
1031
1377
  }
1032
1378
  }
1033
1379
  cancel() {
1034
1380
  this.dialogRef.close();
1035
1381
  }
1036
1382
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1037
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", 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: i8.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" }] });
1383
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", 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 || form.groups.length) {\n <div class=\"form-dialog-container\">\n @for (field of form.fields; track field.name) {\n <igo-form-field [field]=\"field\" />\n }\n @for (group of form.groups; track group.name) {\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: i8.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" }] });
1038
1384
  }
1039
1385
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormDialogComponent, decorators: [{
1040
1386
  type: Component,
@@ -1048,9 +1394,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
1048
1394
  CustomHtmlComponent,
1049
1395
  AsyncPipe,
1050
1396
  IgoLanguageModule
1051
- ], 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"] }]
1397
+ ], 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 || form.groups.length) {\n <div class=\"form-dialog-container\">\n @for (field of form.fields; track field.name) {\n <igo-form-field [field]=\"field\" />\n }\n @for (group of form.groups; track group.name) {\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"] }]
1052
1398
  }], ctorParameters: () => [] });
1053
1399
 
1400
+ class FormStepperDialogComponent {
1401
+ formStepper = viewChild(FormStepperComponent, ...(ngDevMode ? [{ debugName: "formStepper" }] : /* istanbul ignore next */ []));
1402
+ dialogRef = inject(MatDialogRef);
1403
+ data = inject(MAT_DIALOG_DATA);
1404
+ initialData;
1405
+ constructor() {
1406
+ if (!this.data.steps?.length) {
1407
+ throw new Error('Form stepper dialog requires at least one step.');
1408
+ }
1409
+ this.data.processButtonText =
1410
+ this.data.processButtonText ?? 'igo.common.formStepper.processButtonText';
1411
+ this.data.cancelButtonText =
1412
+ this.data.cancelButtonText ?? 'igo.common.formStepper.cancelButtonText';
1413
+ this.data.title = this.data.title ?? 'igo.common.formDialog.title';
1414
+ this.data.nextButtonText =
1415
+ this.data.nextButtonText ?? 'igo.common.formStepper.nextButtonText';
1416
+ this.data.previousButtonText =
1417
+ this.data.previousButtonText ??
1418
+ 'igo.common.formStepper.previousButtonText';
1419
+ this.initialData = { ...(this.data.data$?.value ?? {}) };
1420
+ }
1421
+ onDataChange(data) {
1422
+ this.data.data$?.next(data);
1423
+ }
1424
+ cancel() {
1425
+ this.dialogRef.close();
1426
+ }
1427
+ onCompleted(data) {
1428
+ this.data.data$?.next(data);
1429
+ this.dialogRef.close(data);
1430
+ }
1431
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormStepperDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1432
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.23", type: FormStepperDialogComponent, isStandalone: true, selector: "igo-form-stepper-dialog", viewQueries: [{ propertyName: "formStepper", first: true, predicate: FormStepperComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<h1 mat-dialog-title>{{ data.title | translate }}</h1>\n\n<igo-form-stepper\n [steps]=\"data.steps\"\n [initialData]=\"initialData\"\n [notice]=\"data.notice\"\n [nextButtonText]=\"data.nextButtonText!\"\n [previousButtonText]=\"data.previousButtonText!\"\n [processButtonText]=\"data.processButtonText!\"\n [cancelButtonText]=\"data.cancelButtonText!\"\n (dataChange)=\"onDataChange($event)\"\n (completed)=\"onCompleted($event)\"\n (cancelled)=\"cancel()\"\n/>\n", styles: [":host{display:block}:host ::ng-deep igo-form-stepper{display:block;padding:14px;border:1px solid #d6e1ef;border-radius:18px;background:#fff}:host ::ng-deep igo-form-stepper .form-stepper-content{padding-top:10px}:host ::ng-deep igo-form-stepper .form-stepper-header{margin-bottom:10px;padding:0 0 12px;border:0;border-bottom:1px solid #d6e1ef;border-radius:0;background:transparent;box-shadow:none}:host ::ng-deep igo-form-stepper .form-stepper-notice{margin-top:10px;border-radius:12px}@media(max-width:640px){:host ::ng-deep igo-form-stepper{padding:12px;border-radius:16px}:host ::ng-deep igo-form-stepper .form-stepper-content{padding-top:8px}:host ::ng-deep igo-form-stepper .form-stepper-header{margin-bottom:8px;padding-bottom:10px}}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "component", type: FormStepperComponent, selector: "igo-form-stepper", inputs: ["steps", "initialData", "notice", "nextButtonText", "previousButtonText", "processButtonText", "cancelButtonText", "showCancelButton"], outputs: ["completed", "cancelled", "dataChange"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
1433
+ }
1434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormStepperDialogComponent, decorators: [{
1435
+ type: Component,
1436
+ args: [{ selector: 'igo-form-stepper-dialog', imports: [MatDialogModule, IgoLanguageModule, FormStepperComponent], template: "<h1 mat-dialog-title>{{ data.title | translate }}</h1>\n\n<igo-form-stepper\n [steps]=\"data.steps\"\n [initialData]=\"initialData\"\n [notice]=\"data.notice\"\n [nextButtonText]=\"data.nextButtonText!\"\n [previousButtonText]=\"data.previousButtonText!\"\n [processButtonText]=\"data.processButtonText!\"\n [cancelButtonText]=\"data.cancelButtonText!\"\n (dataChange)=\"onDataChange($event)\"\n (completed)=\"onCompleted($event)\"\n (cancelled)=\"cancel()\"\n/>\n", styles: [":host{display:block}:host ::ng-deep igo-form-stepper{display:block;padding:14px;border:1px solid #d6e1ef;border-radius:18px;background:#fff}:host ::ng-deep igo-form-stepper .form-stepper-content{padding-top:10px}:host ::ng-deep igo-form-stepper .form-stepper-header{margin-bottom:10px;padding:0 0 12px;border:0;border-bottom:1px solid #d6e1ef;border-radius:0;background:transparent;box-shadow:none}:host ::ng-deep igo-form-stepper .form-stepper-notice{margin-top:10px;border-radius:12px}@media(max-width:640px){:host ::ng-deep igo-form-stepper{padding:12px;border-radius:16px}:host ::ng-deep igo-form-stepper .form-stepper-content{padding-top:8px}:host ::ng-deep igo-form-stepper .form-stepper-header{margin-bottom:8px;padding-bottom:10px}}\n"] }]
1437
+ }], ctorParameters: () => [], propDecorators: { formStepper: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FormStepperComponent), { isSignal: true }] }] } });
1438
+
1054
1439
  class FormDialogService {
1055
1440
  dialog = inject(MatDialog);
1056
1441
  open(formDialogConfig, options) {
@@ -1066,6 +1451,20 @@ class FormDialogService {
1066
1451
  });
1067
1452
  return dialogRef.afterClosed();
1068
1453
  }
1454
+ openStepper(formDialogStepperConfig, options) {
1455
+ const data = {
1456
+ steps: formDialogStepperConfig.steps,
1457
+ ...options
1458
+ };
1459
+ const dialogRef = this.dialog.open(FormStepperDialogComponent, {
1460
+ disableClose: false,
1461
+ width: 'min(92vw, 44rem)',
1462
+ maxWidth: '95vw',
1463
+ data,
1464
+ ...options
1465
+ });
1466
+ return dialogRef.afterClosed();
1467
+ }
1069
1468
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1070
1469
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormDialogService });
1071
1470
  }
@@ -1087,14 +1486,31 @@ class IgoFormDialogModule {
1087
1486
  };
1088
1487
  }
1089
1488
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1090
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: IgoFormDialogModule, imports: [MatDialogModule, FormDialogComponent], exports: [FormDialogComponent] });
1091
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormDialogModule, providers: [FormDialogService], imports: [MatDialogModule, FormDialogComponent] });
1489
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: IgoFormDialogModule, imports: [MatDialogModule,
1490
+ FormDialogComponent,
1491
+ FormStepperComponent,
1492
+ FormStepperDialogComponent], exports: [FormDialogComponent,
1493
+ FormStepperComponent,
1494
+ FormStepperDialogComponent] });
1495
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormDialogModule, providers: [FormDialogService], imports: [MatDialogModule,
1496
+ FormDialogComponent,
1497
+ FormStepperComponent,
1498
+ FormStepperDialogComponent] });
1092
1499
  }
1093
1500
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormDialogModule, decorators: [{
1094
1501
  type: NgModule,
1095
1502
  args: [{
1096
- imports: [MatDialogModule, FormDialogComponent],
1097
- exports: [FormDialogComponent],
1503
+ imports: [
1504
+ MatDialogModule,
1505
+ FormDialogComponent,
1506
+ FormStepperComponent,
1507
+ FormStepperDialogComponent
1508
+ ],
1509
+ exports: [
1510
+ FormDialogComponent,
1511
+ FormStepperComponent,
1512
+ FormStepperDialogComponent
1513
+ ],
1098
1514
  providers: [FormDialogService]
1099
1515
  }]
1100
1516
  }] });
@@ -1103,5 +1519,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
1103
1519
  * Generated bundle index. Do not edit.
1104
1520
  */
1105
1521
 
1106
- export { FORM_DIRECTIVES, FORM_FIELD_DIRECTIVES, FormComponent, FormDialogComponent, FormDialogService, FormFieldComponent, FormFieldDatetimeComponent, FormFieldNumberComponent, FormFieldSelectComponent, FormFieldService, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent, FormService, IgoFormDialogModule, IgoFormFieldComponent, IgoFormFieldModule, IgoFormFormModule, IgoFormGroupModule, IgoFormModule, formControlIsRequired, getAllFormFields, getControlErrorMessage, getDefaultErrorMessages, getFormFieldByName };
1522
+ export { FORM_DIRECTIVES, FORM_FIELD_DIRECTIVES, FormComponent, FormDialogComponent, FormDialogService, FormFieldCheckboxComponent, FormFieldComponent, FormFieldDatetimeComponent, FormFieldNumberComponent, FormFieldRadiobuttonComponent, FormFieldSelectComponent, FormFieldService, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent, FormService, FormStepperComponent, FormStepperDialogComponent, IgoFormDialogModule, IgoFormFieldComponent, IgoFormFieldModule, IgoFormFormModule, IgoFormGroupModule, IgoFormModule, buildFormFromConfig, formControlIsRequired, getAllFormFields, getControlErrorMessage, getDefaultErrorMessages, getFormFieldByName, markFormAsTouched };
1107
1523
  //# sourceMappingURL=igo2-common-form.mjs.map