@igo2/common 21.0.0-next.3 → 21.0.0-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/igo2-common-action.mjs +14 -14
- package/fesm2022/igo2-common-action.mjs.map +1 -1
- package/fesm2022/igo2-common-backdrop.mjs +7 -7
- package/fesm2022/igo2-common-backdrop.mjs.map +1 -1
- package/fesm2022/igo2-common-badge.mjs +7 -7
- package/fesm2022/igo2-common-badge.mjs.map +1 -1
- package/fesm2022/igo2-common-clickout.mjs +7 -7
- package/fesm2022/igo2-common-clickout.mjs.map +1 -1
- package/fesm2022/igo2-common-clone.mjs +7 -7
- package/fesm2022/igo2-common-clone.mjs.map +1 -1
- package/fesm2022/igo2-common-collapsible.mjs +10 -10
- package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
- package/fesm2022/igo2-common-color.mjs +8 -8
- package/fesm2022/igo2-common-color.mjs.map +1 -1
- package/fesm2022/igo2-common-confirm-dialog.mjs +10 -10
- package/fesm2022/igo2-common-confirm-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-context-menu.mjs +10 -10
- package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
- package/fesm2022/igo2-common-custom-html.mjs +10 -10
- package/fesm2022/igo2-common-custom-html.mjs.map +1 -1
- package/fesm2022/igo2-common-datepicker.mjs +3 -3
- package/fesm2022/igo2-common-datepicker.mjs.map +1 -1
- package/fesm2022/igo2-common-dom.mjs +7 -7
- package/fesm2022/igo2-common-dom.mjs.map +1 -1
- package/fesm2022/igo2-common-drag-drop.mjs +10 -10
- package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
- package/fesm2022/igo2-common-dynamic-component.mjs +14 -14
- package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
- package/fesm2022/igo2-common-entity.mjs +31 -31
- package/fesm2022/igo2-common-entity.mjs.map +1 -1
- package/fesm2022/igo2-common-flexible.mjs +17 -14
- package/fesm2022/igo2-common-flexible.mjs.map +1 -1
- package/fesm2022/igo2-common-form.mjs +379 -81
- package/fesm2022/igo2-common-form.mjs.map +1 -1
- package/fesm2022/igo2-common-home-button.mjs +7 -7
- package/fesm2022/igo2-common-home-button.mjs.map +1 -1
- package/fesm2022/igo2-common-icon.mjs +6 -6
- package/fesm2022/igo2-common-icon.mjs.map +1 -1
- package/fesm2022/igo2-common-image.mjs +10 -10
- package/fesm2022/igo2-common-image.mjs.map +1 -1
- package/fesm2022/igo2-common-interactive-tour.mjs +13 -13
- package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
- package/fesm2022/igo2-common-json-dialog.mjs +10 -10
- package/fesm2022/igo2-common-json-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-keyvalue.mjs +7 -7
- package/fesm2022/igo2-common-keyvalue.mjs.map +1 -1
- package/fesm2022/igo2-common-list.mjs +10 -10
- package/fesm2022/igo2-common-list.mjs.map +1 -1
- package/fesm2022/igo2-common-panel.mjs +7 -7
- package/fesm2022/igo2-common-panel.mjs.map +1 -1
- package/fesm2022/igo2-common-resizable-bar.mjs +6 -6
- package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
- package/fesm2022/igo2-common-select-value-dialog.mjs +10 -10
- package/fesm2022/igo2-common-select-value-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-sidenav.mjs +7 -7
- package/fesm2022/igo2-common-sidenav.mjs.map +1 -1
- package/fesm2022/igo2-common-spinner.mjs +10 -10
- package/fesm2022/igo2-common-spinner.mjs.map +1 -1
- package/fesm2022/igo2-common-stop-propagation.mjs +10 -10
- package/fesm2022/igo2-common-stop-propagation.mjs.map +1 -1
- package/fesm2022/igo2-common-table.mjs +7 -7
- package/fesm2022/igo2-common-table.mjs.map +1 -1
- package/fesm2022/igo2-common-timepicker.mjs +3 -3
- package/fesm2022/igo2-common-timepicker.mjs.map +1 -1
- package/fesm2022/igo2-common-tool.mjs +14 -14
- package/fesm2022/igo2-common-tool.mjs.map +1 -1
- package/fesm2022/igo2-common-widget.mjs +14 -14
- package/fesm2022/igo2-common-widget.mjs.map +1 -1
- package/fesm2022/igo2-common-workspace.mjs +18 -18
- package/fesm2022/igo2-common-workspace.mjs.map +1 -1
- package/package.json +3 -3
- package/style/style.css +1 -1
- package/types/igo2-common-entity.d.ts +2 -2
- package/types/igo2-common-flexible.d.ts +3 -2
- package/types/igo2-common-form.d.ts +204 -67
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, output, viewChild, ChangeDetectionStrategy, Component, NgModule, Injectable, signal, inject, ChangeDetectorRef } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/forms';
|
|
4
|
-
import { FormsModule, ReactiveFormsModule, UntypedFormBuilder, Validators } from '@angular/forms';
|
|
4
|
+
import { FormsModule, ReactiveFormsModule, FormGroup, FormControl, UntypedFormBuilder, Validators } from '@angular/forms';
|
|
5
5
|
import { t } from 'typy';
|
|
6
6
|
import { __decorate } from 'tslib';
|
|
7
|
-
import
|
|
7
|
+
import * as i8 from '@angular/material/button';
|
|
8
|
+
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
|
+
import * as i3$1 from '@angular/material/datepicker';
|
|
13
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
8
14
|
import * as i1 from '@angular/material/form-field';
|
|
9
15
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
10
|
-
import * as
|
|
16
|
+
import * as i7 from '@angular/material/icon';
|
|
11
17
|
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
-
import * as i2 from '@angular/material/
|
|
13
|
-
import {
|
|
18
|
+
import * as i2 from '@angular/material/input';
|
|
19
|
+
import { MatInputModule } from '@angular/material/input';
|
|
20
|
+
import * as i4 from '@angular/material/timepicker';
|
|
21
|
+
import { MatTimepickerModule } from '@angular/material/timepicker';
|
|
14
22
|
import { IgoLanguageModule, LanguageService } from '@igo2/core/language';
|
|
23
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
24
|
+
import { takeUntil } from 'rxjs/operators';
|
|
15
25
|
import * as i5 from '@ngx-translate/core';
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
19
|
-
import * as i2$1 from '@angular/material/input';
|
|
20
|
-
import { MatInputModule } from '@angular/material/input';
|
|
21
|
-
import { BehaviorSubject } from 'rxjs';
|
|
26
|
+
import * as i2$1 from '@angular/material/select';
|
|
27
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
22
28
|
import { DynamicOutletComponent } from '@igo2/common/dynamic-component';
|
|
29
|
+
import { NgClass, AsyncPipe } from '@angular/common';
|
|
23
30
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogActions, MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
24
31
|
import { CustomHtmlComponent } from '@igo2/common/custom-html';
|
|
25
32
|
|
|
@@ -142,10 +149,10 @@ class FormComponent {
|
|
|
142
149
|
clear() {
|
|
143
150
|
this.form()?.control.reset();
|
|
144
151
|
}
|
|
145
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
146
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
152
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
153
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.23", type: FormComponent, isStandalone: true, selector: "igo-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, formData: { classPropertyName: "formData", publicName: "formData", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitForm: "submitForm" }, viewQueries: [{ propertyName: "buttons", first: true, predicate: ["buttons"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<form\n [autocomplete]=\"autocomplete()\"\n [formGroup]=\"form().control\"\n (ngSubmit)=\"onSubmit()\"\n>\n <div class=\"igo-form-body\" [class.igo-form-body-with-buttons]=\"hasButtons\">\n <div class=\"igo-form-content\">\n <ng-content />\n </div>\n <div #buttons class=\"igo-form-buttons\">\n <ng-content select=\"[formButtons]\" />\n </div>\n </div>\n</form>\n", styles: [":host{display:block}form{width:100%;height:100%}.igo-form-body,.igo-form-content{height:100%}.igo-form-body-with-buttons .igo-form-content{height:calc(100% - 56px)}.igo-form-content{display:flex}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
147
154
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormComponent, decorators: [{
|
|
149
156
|
type: Component,
|
|
150
157
|
args: [{ selector: 'igo-form', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, ReactiveFormsModule], template: "<form\n [autocomplete]=\"autocomplete()\"\n [formGroup]=\"form().control\"\n (ngSubmit)=\"onSubmit()\"\n>\n <div class=\"igo-form-body\" [class.igo-form-body-with-buttons]=\"hasButtons\">\n <div class=\"igo-form-content\">\n <ng-content />\n </div>\n <div #buttons class=\"igo-form-buttons\">\n <ng-content select=\"[formButtons]\" />\n </div>\n </div>\n</form>\n", styles: [":host{display:block}form{width:100%;height:100%}.igo-form-body,.igo-form-content{height:100%}.igo-form-body-with-buttons .igo-form-content{height:calc(100% - 56px)}.igo-form-content{display:flex}\n"] }]
|
|
151
158
|
}], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }], formData: [{ type: i0.Input, args: [{ isSignal: true, alias: "formData", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], submitForm: [{ type: i0.Output, args: ["submitForm"] }], buttons: [{ type: i0.ViewChild, args: ['buttons', { isSignal: true }] }] } });
|
|
@@ -154,11 +161,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
154
161
|
* @deprecated import the FormComponent directly
|
|
155
162
|
*/
|
|
156
163
|
class IgoFormFormModule {
|
|
157
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
158
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
159
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
165
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFormModule, imports: [FormComponent], exports: [FormComponent] });
|
|
166
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFormModule, imports: [FormComponent] });
|
|
160
167
|
}
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFormModule, decorators: [{
|
|
162
169
|
type: NgModule,
|
|
163
170
|
args: [{
|
|
164
171
|
imports: [FormComponent],
|
|
@@ -182,10 +189,10 @@ class FormFieldService {
|
|
|
182
189
|
getFieldByType(type) {
|
|
183
190
|
return FormFieldService.fields[type];
|
|
184
191
|
}
|
|
185
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
186
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
193
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldService, providedIn: 'root' });
|
|
187
194
|
}
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldService, decorators: [{
|
|
189
196
|
type: Injectable,
|
|
190
197
|
args: [{
|
|
191
198
|
providedIn: 'root'
|
|
@@ -198,6 +205,284 @@ function IgoFormFieldComponent(type) {
|
|
|
198
205
|
};
|
|
199
206
|
}
|
|
200
207
|
|
|
208
|
+
let FormFieldDatetimeComponent = class FormFieldDatetimeComponent {
|
|
209
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
210
|
+
dateTimeGroup = new FormGroup({
|
|
211
|
+
date: new FormControl(null),
|
|
212
|
+
time: new FormControl(null)
|
|
213
|
+
});
|
|
214
|
+
get dateControl() {
|
|
215
|
+
return this.dateTimeGroup.controls.date;
|
|
216
|
+
}
|
|
217
|
+
get timeControl() {
|
|
218
|
+
return this.dateTimeGroup.controls.time;
|
|
219
|
+
}
|
|
220
|
+
destroy$ = new Subject();
|
|
221
|
+
syncingExternalToInternal = false;
|
|
222
|
+
syncingInternalToExternal = false;
|
|
223
|
+
/**
|
|
224
|
+
* The field's form control
|
|
225
|
+
*/
|
|
226
|
+
formControl = input.required(...(ngDevMode ? [{ debugName: "formControl" }] : /* istanbul ignore next */ []));
|
|
227
|
+
/**
|
|
228
|
+
* Field showLabel
|
|
229
|
+
*/
|
|
230
|
+
showLabel = input(false, ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
|
|
231
|
+
/**
|
|
232
|
+
* Field placeholder used for date input
|
|
233
|
+
*/
|
|
234
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
235
|
+
/**
|
|
236
|
+
* Placeholder used for time input
|
|
237
|
+
*/
|
|
238
|
+
timePlaceholder = input(...(ngDevMode ? [undefined, { debugName: "timePlaceholder" }] : /* istanbul ignore next */ []));
|
|
239
|
+
/**
|
|
240
|
+
* Minimum selectable date
|
|
241
|
+
*/
|
|
242
|
+
minDate = input(...(ngDevMode ? [undefined, { debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
243
|
+
/**
|
|
244
|
+
* Maximum selectable date
|
|
245
|
+
*/
|
|
246
|
+
maxDate = input(...(ngDevMode ? [undefined, { debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
247
|
+
/**
|
|
248
|
+
* Minimum selectable time
|
|
249
|
+
*/
|
|
250
|
+
minTime = input(null, ...(ngDevMode ? [{ debugName: "minTime" }] : /* istanbul ignore next */ []));
|
|
251
|
+
/**
|
|
252
|
+
* Maximum selectable time
|
|
253
|
+
*/
|
|
254
|
+
maxTime = input(null, ...(ngDevMode ? [{ debugName: "maxTime" }] : /* istanbul ignore next */ []));
|
|
255
|
+
/**
|
|
256
|
+
* Optional explicit options rendered in the timepicker panel.
|
|
257
|
+
*/
|
|
258
|
+
options = input(null, ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
259
|
+
/**
|
|
260
|
+
* Time option interval for the panel.
|
|
261
|
+
*/
|
|
262
|
+
interval = input(null, ...(ngDevMode ? [{ debugName: "interval" }] : /* istanbul ignore next */ []));
|
|
263
|
+
/**
|
|
264
|
+
* Whether clicking the input should open the timepicker.
|
|
265
|
+
*/
|
|
266
|
+
openOnClick = input(true, ...(ngDevMode ? [{ debugName: "openOnClick" }] : /* istanbul ignore next */ []));
|
|
267
|
+
/**
|
|
268
|
+
* Whether a disable switch should be available
|
|
269
|
+
*/
|
|
270
|
+
disableSwitch = input(false, ...(ngDevMode ? [{ debugName: "disableSwitch" }] : /* istanbul ignore next */ []));
|
|
271
|
+
/**
|
|
272
|
+
* Error messages mapping
|
|
273
|
+
*/
|
|
274
|
+
errors = input(...(ngDevMode ? [undefined, { debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
275
|
+
/**
|
|
276
|
+
* Whether the field is required
|
|
277
|
+
*/
|
|
278
|
+
get required() {
|
|
279
|
+
return formControlIsRequired(this.formControl());
|
|
280
|
+
}
|
|
281
|
+
ngOnInit() {
|
|
282
|
+
this.disabled.set(this.formControl().disabled);
|
|
283
|
+
this.syncInternalFromExternal(this.formControl().value);
|
|
284
|
+
this.formControl()
|
|
285
|
+
.valueChanges.pipe(takeUntil(this.destroy$))
|
|
286
|
+
.subscribe((value) => {
|
|
287
|
+
if (this.syncingInternalToExternal) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
this.syncInternalFromExternal(value);
|
|
291
|
+
});
|
|
292
|
+
this.formControl()
|
|
293
|
+
.statusChanges.pipe(takeUntil(this.destroy$))
|
|
294
|
+
.subscribe(() => {
|
|
295
|
+
const isDisabled = this.formControl().disabled;
|
|
296
|
+
this.disabled.set(isDisabled);
|
|
297
|
+
if (isDisabled) {
|
|
298
|
+
this.dateTimeGroup.disable({ emitEvent: false });
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
this.dateTimeGroup.enable({ emitEvent: false });
|
|
302
|
+
this.updateTimeControlState();
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
this.dateTimeGroup.valueChanges
|
|
306
|
+
.pipe(takeUntil(this.destroy$))
|
|
307
|
+
.subscribe(() => {
|
|
308
|
+
this.updateTimeControlState();
|
|
309
|
+
this.pushInternalToExternal();
|
|
310
|
+
});
|
|
311
|
+
if (this.formControl().disabled) {
|
|
312
|
+
this.dateTimeGroup.disable({ emitEvent: false });
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
ngOnDestroy() {
|
|
316
|
+
this.destroy$.next();
|
|
317
|
+
this.destroy$.complete();
|
|
318
|
+
}
|
|
319
|
+
getErrorMessage() {
|
|
320
|
+
return getControlErrorMessage(this.formControl(), this.errors() || {});
|
|
321
|
+
}
|
|
322
|
+
clearDate() {
|
|
323
|
+
this.dateControl.setValue(null);
|
|
324
|
+
}
|
|
325
|
+
clearTime() {
|
|
326
|
+
this.timeControl.setValue(null);
|
|
327
|
+
}
|
|
328
|
+
onDisableSwitchClick() {
|
|
329
|
+
const disabled = !this.disabled();
|
|
330
|
+
if (disabled) {
|
|
331
|
+
this.formControl().disable();
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
this.formControl().enable();
|
|
335
|
+
}
|
|
336
|
+
this.disabled.set(disabled);
|
|
337
|
+
}
|
|
338
|
+
syncInternalFromExternal(value) {
|
|
339
|
+
const externalDate = this.toDateValue(value);
|
|
340
|
+
this.syncingExternalToInternal = true;
|
|
341
|
+
this.dateTimeGroup.patchValue({
|
|
342
|
+
date: externalDate ? new Date(externalDate) : null,
|
|
343
|
+
time: externalDate ? new Date(externalDate) : null
|
|
344
|
+
}, { emitEvent: false });
|
|
345
|
+
this.syncingExternalToInternal = false;
|
|
346
|
+
this.updateTimeControlState();
|
|
347
|
+
}
|
|
348
|
+
pushInternalToExternal() {
|
|
349
|
+
if (this.syncingExternalToInternal) {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
const { date: datePart, time: timeValue } = this.dateTimeGroup.getRawValue();
|
|
353
|
+
if (!datePart) {
|
|
354
|
+
if (this.formControl().value !== null) {
|
|
355
|
+
this.syncingInternalToExternal = true;
|
|
356
|
+
this.formControl().setValue(null);
|
|
357
|
+
this.syncingInternalToExternal = false;
|
|
358
|
+
}
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
const sourceTime = timeValue;
|
|
362
|
+
const next = new Date(datePart);
|
|
363
|
+
next.setHours(sourceTime?.getHours() ?? 0, sourceTime?.getMinutes() ?? 0, sourceTime?.getSeconds() ?? 0, 0);
|
|
364
|
+
this.syncingInternalToExternal = true;
|
|
365
|
+
this.formControl().setValue(next);
|
|
366
|
+
this.syncingInternalToExternal = false;
|
|
367
|
+
}
|
|
368
|
+
updateTimeControlState() {
|
|
369
|
+
const hasDate = !!this.dateControl.value;
|
|
370
|
+
if (!hasDate && this.timeControl.enabled) {
|
|
371
|
+
this.timeControl.disable({ emitEvent: false });
|
|
372
|
+
}
|
|
373
|
+
else if (hasDate && this.timeControl.disabled && !this.disabled()) {
|
|
374
|
+
this.timeControl.enable({ emitEvent: false });
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
toDateValue(value) {
|
|
378
|
+
if (value instanceof Date) {
|
|
379
|
+
return Number.isNaN(value.getTime()) ? null : value;
|
|
380
|
+
}
|
|
381
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
382
|
+
const date = new Date(value);
|
|
383
|
+
return Number.isNaN(date.getTime()) ? null : date;
|
|
384
|
+
}
|
|
385
|
+
if (typeof value === 'string' && value.trim().length > 0) {
|
|
386
|
+
const date = new Date(value);
|
|
387
|
+
return Number.isNaN(date.getTime()) ? null : date;
|
|
388
|
+
}
|
|
389
|
+
return null;
|
|
390
|
+
}
|
|
391
|
+
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 });
|
|
393
|
+
};
|
|
394
|
+
FormFieldDatetimeComponent = __decorate([
|
|
395
|
+
IgoFormFieldComponent('datetime')
|
|
396
|
+
], FormFieldDatetimeComponent);
|
|
397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldDatetimeComponent, decorators: [{
|
|
398
|
+
type: Component,
|
|
399
|
+
args: [{ selector: 'igo-form-field-datetime', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
400
|
+
MatFormFieldModule,
|
|
401
|
+
MatInputModule,
|
|
402
|
+
MatDatepickerModule,
|
|
403
|
+
MatTimepickerModule,
|
|
404
|
+
FormsModule,
|
|
405
|
+
ReactiveFormsModule,
|
|
406
|
+
MatCheckboxModule,
|
|
407
|
+
MatIconModule,
|
|
408
|
+
MatButtonModule,
|
|
409
|
+
IgoLanguageModule
|
|
410
|
+
], providers: [provideNativeDateAdapter()], 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"] }]
|
|
411
|
+
}], 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 }] }], timePlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePlaceholder", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], minTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "minTime", required: false }] }], maxTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxTime", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], interval: [{ type: i0.Input, args: [{ isSignal: true, alias: "interval", required: false }] }], openOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "openOnClick", required: false }] }], disableSwitch: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSwitch", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }] } });
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* This component renders a number field
|
|
415
|
+
*/
|
|
416
|
+
let FormFieldNumberComponent = class FormFieldNumberComponent {
|
|
417
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
418
|
+
hide = true;
|
|
419
|
+
/**
|
|
420
|
+
* The field's form control
|
|
421
|
+
*/
|
|
422
|
+
formControl = input.required(...(ngDevMode ? [{ debugName: "formControl" }] : /* istanbul ignore next */ []));
|
|
423
|
+
/**
|
|
424
|
+
* Field showLabel
|
|
425
|
+
*/
|
|
426
|
+
showLabel = input(false, ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
|
|
427
|
+
/**
|
|
428
|
+
* Field placeholder
|
|
429
|
+
*/
|
|
430
|
+
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
431
|
+
/**
|
|
432
|
+
* Field placeholder
|
|
433
|
+
*/
|
|
434
|
+
errors = input(...(ngDevMode ? [undefined, { debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
435
|
+
/**
|
|
436
|
+
* Wheter a disable switch should be available
|
|
437
|
+
*/
|
|
438
|
+
disableSwitch = input(false, ...(ngDevMode ? [{ debugName: "disableSwitch" }] : /* istanbul ignore next */ []));
|
|
439
|
+
/**
|
|
440
|
+
* Whether the field is required
|
|
441
|
+
*/
|
|
442
|
+
get required() {
|
|
443
|
+
return formControlIsRequired(this.formControl());
|
|
444
|
+
}
|
|
445
|
+
ngOnInit() {
|
|
446
|
+
this.disabled.set(this.formControl().disabled);
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Get error message
|
|
450
|
+
*/
|
|
451
|
+
getErrorMessage() {
|
|
452
|
+
return getControlErrorMessage(this.formControl(), this.errors() || {});
|
|
453
|
+
}
|
|
454
|
+
onDisableSwitchClick() {
|
|
455
|
+
this.toggleDisabled();
|
|
456
|
+
}
|
|
457
|
+
toggleDisabled() {
|
|
458
|
+
const disabled = !this.disabled();
|
|
459
|
+
if (disabled === true) {
|
|
460
|
+
this.formControl().disable();
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
this.formControl().enable();
|
|
464
|
+
}
|
|
465
|
+
this.disabled.set(disabled);
|
|
466
|
+
}
|
|
467
|
+
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 });
|
|
469
|
+
};
|
|
470
|
+
FormFieldNumberComponent = __decorate([
|
|
471
|
+
IgoFormFieldComponent('number')
|
|
472
|
+
], FormFieldNumberComponent);
|
|
473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldNumberComponent, decorators: [{
|
|
474
|
+
type: Component,
|
|
475
|
+
args: [{ selector: 'igo-form-field-number', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
476
|
+
MatFormFieldModule,
|
|
477
|
+
MatInputModule,
|
|
478
|
+
FormsModule,
|
|
479
|
+
ReactiveFormsModule,
|
|
480
|
+
MatCheckboxModule,
|
|
481
|
+
MatButtonModule,
|
|
482
|
+
IgoLanguageModule
|
|
483
|
+
], 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
|
+
}], 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
|
+
|
|
201
486
|
/**
|
|
202
487
|
* This component renders a select field
|
|
203
488
|
*/
|
|
@@ -215,6 +500,10 @@ let FormFieldSelectComponent = class FormFieldSelectComponent {
|
|
|
215
500
|
* The field's form control
|
|
216
501
|
*/
|
|
217
502
|
formControl = input.required(...(ngDevMode ? [{ debugName: "formControl" }] : /* istanbul ignore next */ []));
|
|
503
|
+
/**
|
|
504
|
+
* Field showLabel
|
|
505
|
+
*/
|
|
506
|
+
showLabel = input(false, ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
|
|
218
507
|
/**
|
|
219
508
|
* Field placeholder
|
|
220
509
|
*/
|
|
@@ -255,13 +544,13 @@ let FormFieldSelectComponent = class FormFieldSelectComponent {
|
|
|
255
544
|
}
|
|
256
545
|
this.disabled.set(disabled);
|
|
257
546
|
}
|
|
258
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
259
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
547
|
+
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 });
|
|
260
549
|
};
|
|
261
550
|
FormFieldSelectComponent = __decorate([
|
|
262
551
|
IgoFormFieldComponent('select')
|
|
263
552
|
], FormFieldSelectComponent);
|
|
264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldSelectComponent, decorators: [{
|
|
265
554
|
type: Component,
|
|
266
555
|
args: [{ selector: 'igo-form-field-select', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
267
556
|
MatFormFieldModule,
|
|
@@ -269,23 +558,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
269
558
|
FormsModule,
|
|
270
559
|
ReactiveFormsModule,
|
|
271
560
|
MatOptionModule,
|
|
272
|
-
|
|
561
|
+
MatCheckboxModule,
|
|
273
562
|
IgoLanguageModule
|
|
274
|
-
], template: "<mat-form-field>\n <mat-select\n [multiple]=\"multiple()\"\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n >\n @for (choice of choices(); track choice) {\n <mat-option [value]=\"choice.value\">\n {{ choice.title }}\n </mat-option>\n }\n </mat-select>\n @if (disableSwitch() === true) {\n <mat-
|
|
275
|
-
}], propDecorators: { choices: [{ type: i0.Input, args: [{ isSignal: true, alias: "choices", required: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: true }] }], 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 }] }] } });
|
|
563
|
+
], 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" }]
|
|
564
|
+
}], propDecorators: { choices: [{ type: i0.Input, args: [{ isSignal: true, alias: "choices", required: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: 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 }] }] } });
|
|
276
565
|
|
|
277
566
|
/**
|
|
278
567
|
* This component renders a text field
|
|
279
568
|
*/
|
|
280
569
|
let FormFieldTextComponent = class FormFieldTextComponent {
|
|
281
570
|
cdRef = inject(ChangeDetectorRef);
|
|
282
|
-
disabled
|
|
571
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
283
572
|
hide = true;
|
|
284
573
|
lastTimeoutRequest;
|
|
285
574
|
/**
|
|
286
575
|
* The field's form control
|
|
287
576
|
*/
|
|
288
577
|
formControl = input.required(...(ngDevMode ? [{ debugName: "formControl" }] : /* istanbul ignore next */ []));
|
|
578
|
+
/**
|
|
579
|
+
* Field showLabel
|
|
580
|
+
*/
|
|
581
|
+
showLabel = input(false, ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
|
|
289
582
|
/**
|
|
290
583
|
* Field placeholder
|
|
291
584
|
*/
|
|
@@ -309,7 +602,7 @@ let FormFieldTextComponent = class FormFieldTextComponent {
|
|
|
309
602
|
return formControlIsRequired(this.formControl());
|
|
310
603
|
}
|
|
311
604
|
ngOnInit() {
|
|
312
|
-
this.disabled
|
|
605
|
+
this.disabled.set(this.formControl().disabled);
|
|
313
606
|
}
|
|
314
607
|
/**
|
|
315
608
|
* Get error message
|
|
@@ -321,14 +614,14 @@ let FormFieldTextComponent = class FormFieldTextComponent {
|
|
|
321
614
|
this.toggleDisabled();
|
|
322
615
|
}
|
|
323
616
|
toggleDisabled() {
|
|
324
|
-
const disabled = !this.disabled
|
|
617
|
+
const disabled = !this.disabled();
|
|
325
618
|
if (disabled === true) {
|
|
326
619
|
this.formControl().disable();
|
|
327
620
|
}
|
|
328
621
|
else {
|
|
329
622
|
this.formControl().enable();
|
|
330
623
|
}
|
|
331
|
-
this.disabled
|
|
624
|
+
this.disabled.set(disabled);
|
|
332
625
|
}
|
|
333
626
|
togglePassword() {
|
|
334
627
|
this.hide = !this.hide;
|
|
@@ -345,13 +638,13 @@ let FormFieldTextComponent = class FormFieldTextComponent {
|
|
|
345
638
|
}, delayMS);
|
|
346
639
|
}
|
|
347
640
|
}
|
|
348
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
349
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
641
|
+
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 });
|
|
350
643
|
};
|
|
351
644
|
FormFieldTextComponent = __decorate([
|
|
352
645
|
IgoFormFieldComponent('text')
|
|
353
646
|
], FormFieldTextComponent);
|
|
354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldTextComponent, decorators: [{
|
|
355
648
|
type: Component,
|
|
356
649
|
args: [{ selector: 'igo-form-field-text', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
357
650
|
MatFormFieldModule,
|
|
@@ -359,21 +652,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
359
652
|
FormsModule,
|
|
360
653
|
ReactiveFormsModule,
|
|
361
654
|
MatIconModule,
|
|
655
|
+
MatCheckboxModule,
|
|
362
656
|
MatButtonModule,
|
|
363
|
-
AsyncPipe,
|
|
364
657
|
IgoLanguageModule
|
|
365
|
-
], template: "<mat-form-field>\n <input\n matInput\n (blur)=\"delayedHide(0)\"\n [type]=\"isPassword() ? (hide ? 'password' : 'text') : 'text'\"\n [required]=\"isPassword() ? 'true' : required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n (change)=\"delayedHide()\"\n />\n @if (disableSwitch() === true) {\n <mat-
|
|
366
|
-
}], propDecorators: { formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], isPassword: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPassword", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], disableSwitch: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSwitch", required: false }] }] } });
|
|
658
|
+
], 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" }]
|
|
659
|
+
}], 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 }] }], isPassword: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPassword", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], disableSwitch: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSwitch", required: false }] }] } });
|
|
367
660
|
|
|
368
661
|
/**
|
|
369
662
|
* This component renders a textarea field
|
|
370
663
|
*/
|
|
371
664
|
let FormFieldTextareaComponent = class FormFieldTextareaComponent {
|
|
372
|
-
disabled
|
|
665
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
373
666
|
/**
|
|
374
667
|
* The field's form control
|
|
375
668
|
*/
|
|
376
669
|
formControl = input.required(...(ngDevMode ? [{ debugName: "formControl" }] : /* istanbul ignore next */ []));
|
|
670
|
+
/**
|
|
671
|
+
* Field showLabel
|
|
672
|
+
*/
|
|
673
|
+
showLabel = input(false, ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
|
|
377
674
|
/**
|
|
378
675
|
* Field placeholder
|
|
379
676
|
*/
|
|
@@ -393,7 +690,7 @@ let FormFieldTextareaComponent = class FormFieldTextareaComponent {
|
|
|
393
690
|
return formControlIsRequired(this.formControl());
|
|
394
691
|
}
|
|
395
692
|
ngOnInit() {
|
|
396
|
-
this.disabled
|
|
693
|
+
this.disabled.set(this.formControl().disabled);
|
|
397
694
|
}
|
|
398
695
|
/**
|
|
399
696
|
* Get error message
|
|
@@ -405,33 +702,32 @@ let FormFieldTextareaComponent = class FormFieldTextareaComponent {
|
|
|
405
702
|
this.toggleDisabled();
|
|
406
703
|
}
|
|
407
704
|
toggleDisabled() {
|
|
408
|
-
const disabled = !this.disabled
|
|
705
|
+
const disabled = !this.disabled();
|
|
409
706
|
if (disabled === true) {
|
|
410
707
|
this.formControl().disable();
|
|
411
708
|
}
|
|
412
709
|
else {
|
|
413
710
|
this.formControl().enable();
|
|
414
711
|
}
|
|
415
|
-
this.disabled
|
|
712
|
+
this.disabled.set(disabled);
|
|
416
713
|
}
|
|
417
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
418
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
714
|
+
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 });
|
|
419
716
|
};
|
|
420
717
|
FormFieldTextareaComponent = __decorate([
|
|
421
718
|
IgoFormFieldComponent('textarea')
|
|
422
719
|
], FormFieldTextareaComponent);
|
|
423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldTextareaComponent, decorators: [{
|
|
424
721
|
type: Component,
|
|
425
722
|
args: [{ selector: 'igo-form-field-textarea', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
426
723
|
MatFormFieldModule,
|
|
427
724
|
MatInputModule,
|
|
428
725
|
FormsModule,
|
|
429
726
|
ReactiveFormsModule,
|
|
430
|
-
|
|
431
|
-
AsyncPipe,
|
|
727
|
+
MatCheckboxModule,
|
|
432
728
|
IgoLanguageModule
|
|
433
|
-
], template: "<mat-form-field>\n <textarea\n matInput\n [required]=\"required\"\n [placeholder]=\"placeholder() | translate\"\n [formControl]=\"formControl()\"\n >\n </textarea>\n @if (disableSwitch() === true) {\n <mat-
|
|
434
|
-
}], propDecorators: { formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: true }] }], 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 }] }] } });
|
|
729
|
+
], 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" }]
|
|
730
|
+
}], 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 }] }] } });
|
|
435
731
|
|
|
436
732
|
class FormService {
|
|
437
733
|
formBuilder = inject(UntypedFormBuilder);
|
|
@@ -498,10 +794,10 @@ class FormService {
|
|
|
498
794
|
const args = match[2];
|
|
499
795
|
return Validators[name](args);
|
|
500
796
|
}
|
|
501
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
502
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
797
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
798
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormService, providedIn: 'root' });
|
|
503
799
|
}
|
|
504
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormService, decorators: [{
|
|
505
801
|
type: Injectable,
|
|
506
802
|
args: [{
|
|
507
803
|
providedIn: 'root'
|
|
@@ -553,16 +849,18 @@ class FormFieldComponent {
|
|
|
553
849
|
this.fieldSubscribers = Object.assign({}, this.field().subscribers || {});
|
|
554
850
|
return this.fieldSubscribers;
|
|
555
851
|
}
|
|
556
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
557
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
852
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
853
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: FormFieldComponent, isStandalone: true, selector: "igo-form-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (field() !== undefined) {\n <igo-dynamic-outlet\n [component]=\"getFieldComponent()\"\n [inputs]=\"getFieldInputs()\"\n [subscribers]=\"getFieldSubscribers()\"\n />\n}\n", styles: ["::ng-deep mat-form-field{width:100%}::ng-deep .igo-form-disable-switch{margin-right:8px}\n"], dependencies: [{ kind: "component", type: DynamicOutletComponent, selector: "igo-dynamic-outlet", inputs: ["component", "inputs", "subscribers"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
558
854
|
}
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
560
856
|
type: Component,
|
|
561
857
|
args: [{ selector: 'igo-form-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DynamicOutletComponent], template: "@if (field() !== undefined) {\n <igo-dynamic-outlet\n [component]=\"getFieldComponent()\"\n [inputs]=\"getFieldInputs()\"\n [subscribers]=\"getFieldSubscribers()\"\n />\n}\n", styles: ["::ng-deep mat-form-field{width:100%}::ng-deep .igo-form-disable-switch{margin-right:8px}\n"] }]
|
|
562
858
|
}], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }] } });
|
|
563
859
|
|
|
564
860
|
const FORM_FIELD_DIRECTIVES = [
|
|
565
861
|
FormFieldComponent,
|
|
862
|
+
FormFieldDatetimeComponent,
|
|
863
|
+
FormFieldNumberComponent,
|
|
566
864
|
FormFieldSelectComponent,
|
|
567
865
|
FormFieldTextComponent,
|
|
568
866
|
FormFieldTextareaComponent
|
|
@@ -572,11 +870,11 @@ const FORM_FIELD_DIRECTIVES = [
|
|
|
572
870
|
* @deprecated import the components directly or FORM_FIELD_DIRECTIVES for every components/directives
|
|
573
871
|
*/
|
|
574
872
|
class IgoFormFieldModule {
|
|
575
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
576
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
577
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
873
|
+
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] });
|
|
875
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFieldModule, imports: [FORM_FIELD_DIRECTIVES] });
|
|
578
876
|
}
|
|
579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormFieldModule, decorators: [{
|
|
580
878
|
type: NgModule,
|
|
581
879
|
args: [{
|
|
582
880
|
imports: [...FORM_FIELD_DIRECTIVES],
|
|
@@ -637,10 +935,10 @@ class FormGroupComponent {
|
|
|
637
935
|
const options = this.group().options || {};
|
|
638
936
|
return getControlErrorMessage(this.formControl, options.errors || {});
|
|
639
937
|
}
|
|
640
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
641
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
938
|
+
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 });
|
|
642
940
|
}
|
|
643
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
941
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormGroupComponent, decorators: [{
|
|
644
942
|
type: Component,
|
|
645
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"] }]
|
|
646
944
|
}], propDecorators: { group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: true }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }] } });
|
|
@@ -649,11 +947,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
649
947
|
* @deprecated import the FormGroupComponent directly
|
|
650
948
|
*/
|
|
651
949
|
class IgoFormGroupModule {
|
|
652
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
653
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
654
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
950
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
951
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: IgoFormGroupModule, imports: [FormGroupComponent], exports: [FormGroupComponent] });
|
|
952
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormGroupModule, imports: [FormGroupComponent] });
|
|
655
953
|
}
|
|
656
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormGroupModule, decorators: [{
|
|
657
955
|
type: NgModule,
|
|
658
956
|
args: [{
|
|
659
957
|
imports: [FormGroupComponent],
|
|
@@ -670,13 +968,13 @@ const FORM_DIRECTIVES = [
|
|
|
670
968
|
* @deprecated import the components directly or FORM_DIRECTIVES for every components/directives
|
|
671
969
|
*/
|
|
672
970
|
class IgoFormModule {
|
|
673
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
674
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
675
|
-
FormComponent], exports: [FormFieldComponent, FormFieldSelectComponent, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent,
|
|
971
|
+
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,
|
|
676
974
|
FormComponent] });
|
|
677
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
975
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormModule, imports: [FORM_DIRECTIVES] });
|
|
678
976
|
}
|
|
679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormModule, decorators: [{
|
|
680
978
|
type: NgModule,
|
|
681
979
|
args: [{
|
|
682
980
|
imports: [...FORM_DIRECTIVES],
|
|
@@ -735,10 +1033,10 @@ class FormDialogComponent {
|
|
|
735
1033
|
cancel() {
|
|
736
1034
|
this.dialogRef.close();
|
|
737
1035
|
}
|
|
738
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
739
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1036
|
+
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" }] });
|
|
740
1038
|
}
|
|
741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1039
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormDialogComponent, decorators: [{
|
|
742
1040
|
type: Component,
|
|
743
1041
|
args: [{ selector: 'igo-form-dialog', imports: [
|
|
744
1042
|
MatDialogTitle,
|
|
@@ -768,10 +1066,10 @@ class FormDialogService {
|
|
|
768
1066
|
});
|
|
769
1067
|
return dialogRef.afterClosed();
|
|
770
1068
|
}
|
|
771
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
772
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1069
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1070
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormDialogService });
|
|
773
1071
|
}
|
|
774
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FormDialogService, decorators: [{
|
|
775
1073
|
type: Injectable
|
|
776
1074
|
}] });
|
|
777
1075
|
|
|
@@ -788,11 +1086,11 @@ class IgoFormDialogModule {
|
|
|
788
1086
|
providers: []
|
|
789
1087
|
};
|
|
790
1088
|
}
|
|
791
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
792
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
793
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
1089
|
+
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] });
|
|
794
1092
|
}
|
|
795
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: IgoFormDialogModule, decorators: [{
|
|
796
1094
|
type: NgModule,
|
|
797
1095
|
args: [{
|
|
798
1096
|
imports: [MatDialogModule, FormDialogComponent],
|
|
@@ -805,5 +1103,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
805
1103
|
* Generated bundle index. Do not edit.
|
|
806
1104
|
*/
|
|
807
1105
|
|
|
808
|
-
export { FORM_DIRECTIVES, FORM_FIELD_DIRECTIVES, FormComponent, FormDialogComponent, FormDialogService, FormFieldComponent, FormFieldSelectComponent, FormFieldService, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent, FormService, IgoFormDialogModule, IgoFormFieldComponent, IgoFormFieldModule, IgoFormFormModule, IgoFormGroupModule, IgoFormModule, formControlIsRequired, getAllFormFields, getControlErrorMessage, getDefaultErrorMessages, getFormFieldByName };
|
|
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 };
|
|
809
1107
|
//# sourceMappingURL=igo2-common-form.mjs.map
|