@ng-modular-forms/material 0.9.0 → 0.9.2

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, Directive, ChangeDetectionStrategy, Component, computed, effect } from '@angular/core';
2
+ import { InjectionToken, inject, input, computed, Directive, ChangeDetectionStrategy, Component, effect } from '@angular/core';
3
3
  import * as i3 from '@angular/forms';
4
4
  import { FormControl, ReactiveFormsModule } from '@angular/forms';
5
5
  import { FormControlBase, NumberBehavior, parseNumber, formatNumber, LookupBehavior, PasswordBehavior } from '@ng-modular-forms/core';
@@ -26,12 +26,48 @@ import { MatSelectModule } from '@angular/material/select';
26
26
  import * as i4$2 from '@angular/material/timepicker';
27
27
  import { MatTimepickerModule } from '@angular/material/timepicker';
28
28
 
29
+ // @ng-modular-forms/material
30
+ const MATERIAL_DEFAULTS = {
31
+ appearance: 'outline',
32
+ floatLabel: 'auto',
33
+ detatchLabels: false,
34
+ hideRequiredMarker: false,
35
+ };
36
+ const NMF_MATERIAL_CONFIG = new InjectionToken('NMF_MATERIAL_CONFIG', {
37
+ factory: () => {
38
+ return {
39
+ ...MATERIAL_DEFAULTS,
40
+ };
41
+ },
42
+ });
43
+ function provideNmfMaterialConfig(config) {
44
+ return [
45
+ {
46
+ provide: NMF_MATERIAL_CONFIG,
47
+ useFactory: () => {
48
+ return {
49
+ ...MATERIAL_DEFAULTS,
50
+ ...config,
51
+ };
52
+ },
53
+ },
54
+ ];
55
+ }
56
+
29
57
  class MatFormControlBase extends FormControlBase {
30
- detachLabel = input(false);
31
- appearance = input('outline');
32
- shouldLabelFloat = input('auto');
33
- hint = input();
34
- hintClassList = input('');
58
+ materialConfig = inject(NMF_MATERIAL_CONFIG);
59
+ _detachLabel = input(this.materialConfig.detatchLabels ?? false, {
60
+ alias: 'detatchLabel',
61
+ });
62
+ _appearance = input(this.materialConfig.appearance ?? 'outline', {
63
+ alias: 'appearance',
64
+ });
65
+ _shouldLabelFloat = input(this.materialConfig.floatLabel ?? 'auto', {
66
+ alias: 'shouldLabelFloat',
67
+ });
68
+ detachLabel = computed(() => this.materialConfig.detatchLabels ?? this._detachLabel());
69
+ appearance = computed(() => this.materialConfig.appearance ?? this._appearance());
70
+ shouldLabelFloat = computed(() => this.materialConfig.floatLabel ?? this._shouldLabelFloat());
35
71
  // Purely a state carrier for mat-form-field, never drives value or internal state
36
72
  displayControl = new FormControl({
37
73
  value: null,
@@ -67,7 +103,7 @@ class MatFormControlBase extends FormControlBase {
67
103
  this.displayControl.setErrors(control.errors);
68
104
  }
69
105
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatFormControlBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
70
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: MatFormControlBase, isStandalone: true, inputs: { detachLabel: { classPropertyName: "detachLabel", publicName: "detachLabel", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, shouldLabelFloat: { classPropertyName: "shouldLabelFloat", publicName: "shouldLabelFloat", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, hintClassList: { classPropertyName: "hintClassList", publicName: "hintClassList", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
106
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: MatFormControlBase, isStandalone: true, inputs: { _detachLabel: { classPropertyName: "_detachLabel", publicName: "detatchLabel", isSignal: true, isRequired: false, transformFunction: null }, _appearance: { classPropertyName: "_appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, _shouldLabelFloat: { classPropertyName: "_shouldLabelFloat", publicName: "shouldLabelFloat", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
71
107
  }
72
108
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatFormControlBase, decorators: [{
73
109
  type: Directive
@@ -90,8 +126,8 @@ class MatInputDatepickerComponent extends MatFormControlBase {
90
126
  }
91
127
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputDatepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
92
128
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputDatepickerComponent, isStandalone: true, selector: "nmf-mat-datepicker", inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, dateClass: { classPropertyName: "dateClass", publicName: "dateClass", isSignal: true, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, startView: { classPropertyName: "startView", publicName: "startView", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, touchUi: { classPropertyName: "touchUi", publicName: "touchUi", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
93
- @if (label() && detachLabel()) {
94
- <label class="font-medium text-base">{{ label() }}</label>
129
+ @if (translatedLabel() && detachLabel()) {
130
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
95
131
  }
96
132
 
97
133
  <mat-form-field
@@ -99,8 +135,8 @@ class MatInputDatepickerComponent extends MatFormControlBase {
99
135
  [appearance]="appearance()"
100
136
  [floatLabel]="shouldLabelFloat()"
101
137
  >
102
- @if (label() && !detachLabel()) {
103
- <mat-label>{{ label() }}</mat-label>
138
+ @if (translatedLabel() && !detachLabel()) {
139
+ <mat-label>{{ translatedLabel() }}</mat-label>
104
140
  }
105
141
 
106
142
  <input
@@ -147,11 +183,11 @@ class MatInputDatepickerComponent extends MatFormControlBase {
147
183
  ></mat-spinner>
148
184
  }
149
185
 
150
- @if (hint()) {
151
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
186
+ @if (translatedHint()) {
187
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
152
188
  }
153
189
 
154
- <mat-error>{{ errorMessage() }}</mat-error>
190
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
155
191
  </mat-form-field>
156
192
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
157
193
  }
@@ -170,8 +206,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
170
206
  ],
171
207
  changeDetection: ChangeDetectionStrategy.OnPush,
172
208
  template: `
173
- @if (label() && detachLabel()) {
174
- <label class="font-medium text-base">{{ label() }}</label>
209
+ @if (translatedLabel() && detachLabel()) {
210
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
175
211
  }
176
212
 
177
213
  <mat-form-field
@@ -179,8 +215,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
179
215
  [appearance]="appearance()"
180
216
  [floatLabel]="shouldLabelFloat()"
181
217
  >
182
- @if (label() && !detachLabel()) {
183
- <mat-label>{{ label() }}</mat-label>
218
+ @if (translatedLabel() && !detachLabel()) {
219
+ <mat-label>{{ translatedLabel() }}</mat-label>
184
220
  }
185
221
 
186
222
  <input
@@ -227,11 +263,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
227
263
  ></mat-spinner>
228
264
  }
229
265
 
230
- @if (hint()) {
231
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
266
+ @if (translatedHint()) {
267
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
232
268
  }
233
269
 
234
- <mat-error>{{ errorMessage() }}</mat-error>
270
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
235
271
  </mat-form-field>
236
272
  `,
237
273
  }]
@@ -283,8 +319,8 @@ class MatInputNumberComponent extends MatFormControlBase {
283
319
  }
284
320
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
285
321
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputNumberComponent, isStandalone: true, selector: "nmf-mat-number", inputs: { formatValue: { classPropertyName: "formatValue", publicName: "formatValue", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, allowNegative: { classPropertyName: "allowNegative", publicName: "allowNegative", isSignal: true, isRequired: false, transformFunction: null }, negativeColor: { classPropertyName: "negativeColor", publicName: "negativeColor", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
286
- @if (label() && detachLabel()) {
287
- <label class="font-medium text-base">{{ label() }}</label>
322
+ @if (translatedLabel() && detachLabel()) {
323
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
288
324
  }
289
325
 
290
326
  <mat-form-field
@@ -292,8 +328,8 @@ class MatInputNumberComponent extends MatFormControlBase {
292
328
  [appearance]="appearance()"
293
329
  [floatLabel]="shouldLabelFloat()"
294
330
  >
295
- @if (label() && !detachLabel()) {
296
- <mat-label>{{ label() }}</mat-label>
331
+ @if (translatedLabel() && !detachLabel()) {
332
+ <mat-label>{{ translatedLabel() }}</mat-label>
297
333
  }
298
334
 
299
335
  <div class="nmf-mat-prefix-slot">
@@ -313,7 +349,7 @@ class MatInputNumberComponent extends MatFormControlBase {
313
349
  [id]="id()"
314
350
  [name]="name()"
315
351
  [required]="isRequired()"
316
- [placeholder]="placeholder()"
352
+ [placeholder]="translatedPlaceholder()"
317
353
  [autocomplete]="autocompleteAttr()"
318
354
  [formControl]="displayControl"
319
355
  (blur)="onTouched()"
@@ -337,10 +373,10 @@ class MatInputNumberComponent extends MatFormControlBase {
337
373
  }
338
374
 
339
375
  @if (hint()) {
340
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
376
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
341
377
  }
342
378
 
343
- <mat-error>{{ errorMessage() }}</mat-error>
379
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
344
380
  </mat-form-field>
345
381
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.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: ReactiveFormsModule }, { 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: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
346
382
  }
@@ -359,8 +395,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
359
395
  ],
360
396
  changeDetection: ChangeDetectionStrategy.OnPush,
361
397
  template: `
362
- @if (label() && detachLabel()) {
363
- <label class="font-medium text-base">{{ label() }}</label>
398
+ @if (translatedLabel() && detachLabel()) {
399
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
364
400
  }
365
401
 
366
402
  <mat-form-field
@@ -368,8 +404,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
368
404
  [appearance]="appearance()"
369
405
  [floatLabel]="shouldLabelFloat()"
370
406
  >
371
- @if (label() && !detachLabel()) {
372
- <mat-label>{{ label() }}</mat-label>
407
+ @if (translatedLabel() && !detachLabel()) {
408
+ <mat-label>{{ translatedLabel() }}</mat-label>
373
409
  }
374
410
 
375
411
  <div class="nmf-mat-prefix-slot">
@@ -389,7 +425,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
389
425
  [id]="id()"
390
426
  [name]="name()"
391
427
  [required]="isRequired()"
392
- [placeholder]="placeholder()"
428
+ [placeholder]="translatedPlaceholder()"
393
429
  [autocomplete]="autocompleteAttr()"
394
430
  [formControl]="displayControl"
395
431
  (blur)="onTouched()"
@@ -413,10 +449,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
413
449
  }
414
450
 
415
451
  @if (hint()) {
416
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
452
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
417
453
  }
418
454
 
419
- <mat-error>{{ errorMessage() }}</mat-error>
455
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
420
456
  </mat-form-field>
421
457
  `,
422
458
  }]
@@ -458,6 +494,7 @@ class MatInputLookupComponent extends MatFormControlBase {
458
494
  */
459
495
  searchThreshold = input(2);
460
496
  searchQuery = toSignal(this.displayControl.valueChanges.pipe(startWith(this.displayControl.value)));
497
+ translatedEmptyOptionsLabel = computed(() => this.translate(this.emptyOptionsLabel()));
461
498
  behavior;
462
499
  constructor() {
463
500
  super();
@@ -504,8 +541,8 @@ class MatInputLookupComponent extends MatFormControlBase {
504
541
  }
505
542
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputLookupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
506
543
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputLookupComponent, isStandalone: true, selector: "nmf-mat-lookup", inputs: { autocompleteAttr: { classPropertyName: "autocompleteAttr", publicName: "autocompleteAttr", isSignal: true, isRequired: false, transformFunction: null }, optionsSource: { classPropertyName: "optionsSource", publicName: "optionsSource", isSignal: true, isRequired: false, transformFunction: null }, optionsProvider: { classPropertyName: "optionsProvider", publicName: "optionsProvider", isSignal: true, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null }, displayProvider: { classPropertyName: "displayProvider", publicName: "displayProvider", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, emptyOptionsLabel: { classPropertyName: "emptyOptionsLabel", publicName: "emptyOptionsLabel", isSignal: true, isRequired: false, transformFunction: null }, debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null }, searchThreshold: { classPropertyName: "searchThreshold", publicName: "searchThreshold", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["nmfMatLookup"], usesInheritance: true, ngImport: i0, template: `
507
- @if (label() && detachLabel()) {
508
- <label class="font-medium text-base">{{ label() }}</label>
544
+ @if (translatedLabel() && detachLabel()) {
545
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
509
546
  }
510
547
 
511
548
  <div class="relative">
@@ -514,8 +551,8 @@ class MatInputLookupComponent extends MatFormControlBase {
514
551
  [appearance]="appearance()"
515
552
  [floatLabel]="shouldLabelFloat()"
516
553
  >
517
- @if (label() && !detachLabel()) {
518
- <mat-label>{{ label() }}</mat-label>
554
+ @if (translatedLabel() && !detachLabel()) {
555
+ <mat-label>{{ translatedLabel() }}</mat-label>
519
556
  }
520
557
 
521
558
  <input
@@ -523,13 +560,13 @@ class MatInputLookupComponent extends MatFormControlBase {
523
560
  matInput
524
561
  type="text"
525
562
  [class.cursor-not-allowed]="behavior.selectedOption() != null"
526
- [attr.aria-label]="detachLabel() ? label() : null"
563
+ [attr.aria-label]="detachLabel() ? translatedLabel() : null"
527
564
  [ngClass]="classList"
528
565
  [id]="id()"
529
566
  [name]="name()"
530
567
  [required]="isRequired()"
531
568
  [readonly]="behavior.selectedOption() != null"
532
- [placeholder]="placeholder()"
569
+ [placeholder]="translatedPlaceholder()"
533
570
  [formControl]="displayControl"
534
571
  [matAutocomplete]="auto"
535
572
  (blur)="onTouched()"
@@ -546,12 +583,14 @@ class MatInputLookupComponent extends MatFormControlBase {
546
583
  </mat-autocomplete>
547
584
 
548
585
  @if (behavior.status() === 'empty') {
549
- <mat-hint>{{ emptyOptionsLabel() }}</mat-hint>
586
+ <mat-hint>{{ translatedEmptyOptionsLabel() }}</mat-hint>
550
587
  } @else if (hint()) {
551
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
588
+ <mat-hint [ngClass]="hintClassList()">{{
589
+ translatedHint()
590
+ }}</mat-hint>
552
591
  }
553
592
 
554
- <mat-error>{{ errorMessage() }}</mat-error>
593
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
555
594
 
556
595
  <!-- Loading status is for lookups and async options, and loading() is for the form control itself -->
557
596
  @if (behavior.status() === 'loading' || loading()) {
@@ -595,8 +634,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
595
634
  ],
596
635
  changeDetection: ChangeDetectionStrategy.OnPush,
597
636
  template: `
598
- @if (label() && detachLabel()) {
599
- <label class="font-medium text-base">{{ label() }}</label>
637
+ @if (translatedLabel() && detachLabel()) {
638
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
600
639
  }
601
640
 
602
641
  <div class="relative">
@@ -605,8 +644,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
605
644
  [appearance]="appearance()"
606
645
  [floatLabel]="shouldLabelFloat()"
607
646
  >
608
- @if (label() && !detachLabel()) {
609
- <mat-label>{{ label() }}</mat-label>
647
+ @if (translatedLabel() && !detachLabel()) {
648
+ <mat-label>{{ translatedLabel() }}</mat-label>
610
649
  }
611
650
 
612
651
  <input
@@ -614,13 +653,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
614
653
  matInput
615
654
  type="text"
616
655
  [class.cursor-not-allowed]="behavior.selectedOption() != null"
617
- [attr.aria-label]="detachLabel() ? label() : null"
656
+ [attr.aria-label]="detachLabel() ? translatedLabel() : null"
618
657
  [ngClass]="classList"
619
658
  [id]="id()"
620
659
  [name]="name()"
621
660
  [required]="isRequired()"
622
661
  [readonly]="behavior.selectedOption() != null"
623
- [placeholder]="placeholder()"
662
+ [placeholder]="translatedPlaceholder()"
624
663
  [formControl]="displayControl"
625
664
  [matAutocomplete]="auto"
626
665
  (blur)="onTouched()"
@@ -637,12 +676,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
637
676
  </mat-autocomplete>
638
677
 
639
678
  @if (behavior.status() === 'empty') {
640
- <mat-hint>{{ emptyOptionsLabel() }}</mat-hint>
679
+ <mat-hint>{{ translatedEmptyOptionsLabel() }}</mat-hint>
641
680
  } @else if (hint()) {
642
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
681
+ <mat-hint [ngClass]="hintClassList()">{{
682
+ translatedHint()
683
+ }}</mat-hint>
643
684
  }
644
685
 
645
- <mat-error>{{ errorMessage() }}</mat-error>
686
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
646
687
 
647
688
  <!-- Loading status is for lookups and async options, and loading() is for the form control itself -->
648
689
  @if (behavior.status() === 'loading' || loading()) {
@@ -675,6 +716,7 @@ class MatInputSelectComponent extends MatFormControlBase {
675
716
  emptyOptionLabel = input('Select an option');
676
717
  allowEmptyOptionSelection = input(false);
677
718
  panelWidth = input('auto');
719
+ translatedEmptyOptionLabel = computed(() => this.translate(this.emptyOptionLabel()));
678
720
  onSelectionChange(event) {
679
721
  if (this.disabled()) {
680
722
  return;
@@ -684,8 +726,8 @@ class MatInputSelectComponent extends MatFormControlBase {
684
726
  }
685
727
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
686
728
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputSelectComponent, isStandalone: true, selector: "nmf-mat-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, emptyOptionLabel: { classPropertyName: "emptyOptionLabel", publicName: "emptyOptionLabel", isSignal: true, isRequired: false, transformFunction: null }, allowEmptyOptionSelection: { classPropertyName: "allowEmptyOptionSelection", publicName: "allowEmptyOptionSelection", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
687
- @if (label() && detachLabel()) {
688
- <label class="font-medium text-base">{{ label() }}</label>
729
+ @if (translatedLabel() && detachLabel()) {
730
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
689
731
  }
690
732
 
691
733
  <mat-form-field
@@ -693,8 +735,8 @@ class MatInputSelectComponent extends MatFormControlBase {
693
735
  [appearance]="appearance()"
694
736
  [floatLabel]="shouldLabelFloat()"
695
737
  >
696
- @if (label() && !detachLabel()) {
697
- <mat-label>{{ label() }}</mat-label>
738
+ @if (translatedLabel() && !detachLabel()) {
739
+ <mat-label>{{ translatedLabel() }}</mat-label>
698
740
  }
699
741
 
700
742
  <mat-select
@@ -703,13 +745,13 @@ class MatInputSelectComponent extends MatFormControlBase {
703
745
  [id]="id()"
704
746
  [panelWidth]="panelWidth()"
705
747
  [required]="isRequired()"
706
- [placeholder]="emptyOptionLabel()"
748
+ [placeholder]="translatedEmptyOptionLabel()"
707
749
  [formControl]="displayControl"
708
750
  (blur)="onTouched()"
709
751
  (selectionChange)="onSelectionChange($event)"
710
752
  >
711
753
  <mat-option [value]="''" [disabled]="!allowEmptyOptionSelection()">
712
- {{ emptyOptionLabel() }}
754
+ {{ translatedEmptyOptionLabel() }}
713
755
  </mat-option>
714
756
 
715
757
  <!-- All Options -->
@@ -730,10 +772,10 @@ class MatInputSelectComponent extends MatFormControlBase {
730
772
  }
731
773
 
732
774
  @if (hint()) {
733
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
775
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
734
776
  }
735
777
 
736
- <mat-error>{{ errorMessage() }}</mat-error>
778
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
737
779
  </mat-form-field>
738
780
  `, isInline: true, styles: [".nmf-mat-field{position:relative;width:100%}.mat-mdc-select-placeholder{transition:none!important}.mat-mdc-form-field-infix{display:flex;align-items:center;gap:.5rem}.nmf-mat-prefix-slot,.nmf-mat-suffix-slot{display:flex;align-items:center;gap:.5rem;flex-wrap:nowrap;white-space:nowrap;background:transparent}.nmf-mat-prefix-slot{order:-1}.nmf-mat-suffix-slot{order:2}.nmf-mat-field:has(.nmf-mat-prefix-slot>:not(:empty)) .mdc-floating-label:not(.mdc-floating-label--float-above){padding-left:1rem;transform:translateY(-.65rem)}.hide-select-arrow .mat-mdc-select-arrow-wrapper{display:none!important}.nmf-mat-loader{margin-right:.5rem!important}.nmf-disabled{color:color-mix(in srgb,var(--mat-sys-on-surface) 38%,transparent)}.nmf-password-toggle{color:var(--mat-sys-on-surface-variant);padding-right:.5rem;background-color:transparent;border:none;white-space:nowrap;&:disabled{color:color-mix(in srgb,var(--mat-sys-on-surface) 38%,transparent);cursor:default}}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{appearance:textfield;-moz-appearance:textfield}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { 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: MatSelectModule }, { kind: "component", type: i5$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
739
781
  }
@@ -746,8 +788,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
746
788
  ReactiveFormsModule,
747
789
  MatSelectModule,
748
790
  ], changeDetection: ChangeDetectionStrategy.OnPush, template: `
749
- @if (label() && detachLabel()) {
750
- <label class="font-medium text-base">{{ label() }}</label>
791
+ @if (translatedLabel() && detachLabel()) {
792
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
751
793
  }
752
794
 
753
795
  <mat-form-field
@@ -755,8 +797,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
755
797
  [appearance]="appearance()"
756
798
  [floatLabel]="shouldLabelFloat()"
757
799
  >
758
- @if (label() && !detachLabel()) {
759
- <mat-label>{{ label() }}</mat-label>
800
+ @if (translatedLabel() && !detachLabel()) {
801
+ <mat-label>{{ translatedLabel() }}</mat-label>
760
802
  }
761
803
 
762
804
  <mat-select
@@ -765,13 +807,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
765
807
  [id]="id()"
766
808
  [panelWidth]="panelWidth()"
767
809
  [required]="isRequired()"
768
- [placeholder]="emptyOptionLabel()"
810
+ [placeholder]="translatedEmptyOptionLabel()"
769
811
  [formControl]="displayControl"
770
812
  (blur)="onTouched()"
771
813
  (selectionChange)="onSelectionChange($event)"
772
814
  >
773
815
  <mat-option [value]="''" [disabled]="!allowEmptyOptionSelection()">
774
- {{ emptyOptionLabel() }}
816
+ {{ translatedEmptyOptionLabel() }}
775
817
  </mat-option>
776
818
 
777
819
  <!-- All Options -->
@@ -792,10 +834,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
792
834
  }
793
835
 
794
836
  @if (hint()) {
795
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
837
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
796
838
  }
797
839
 
798
- <mat-error>{{ errorMessage() }}</mat-error>
840
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
799
841
  </mat-form-field>
800
842
  `, styles: [".nmf-mat-field{position:relative;width:100%}.mat-mdc-select-placeholder{transition:none!important}.mat-mdc-form-field-infix{display:flex;align-items:center;gap:.5rem}.nmf-mat-prefix-slot,.nmf-mat-suffix-slot{display:flex;align-items:center;gap:.5rem;flex-wrap:nowrap;white-space:nowrap;background:transparent}.nmf-mat-prefix-slot{order:-1}.nmf-mat-suffix-slot{order:2}.nmf-mat-field:has(.nmf-mat-prefix-slot>:not(:empty)) .mdc-floating-label:not(.mdc-floating-label--float-above){padding-left:1rem;transform:translateY(-.65rem)}.hide-select-arrow .mat-mdc-select-arrow-wrapper{display:none!important}.nmf-mat-loader{margin-right:.5rem!important}.nmf-disabled{color:color-mix(in srgb,var(--mat-sys-on-surface) 38%,transparent)}.nmf-password-toggle{color:var(--mat-sys-on-surface-variant);padding-right:.5rem;background-color:transparent;border:none;white-space:nowrap;&:disabled{color:color-mix(in srgb,var(--mat-sys-on-surface) 38%,transparent);cursor:default}}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{appearance:textfield;-moz-appearance:textfield}\n"] }]
801
843
  }] });
@@ -815,8 +857,8 @@ class MatInputTextComponent extends MatFormControlBase {
815
857
  }
816
858
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
817
859
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputTextComponent, isStandalone: true, selector: "nmf-mat-text", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
818
- @if (label() && detachLabel()) {
819
- <label class="font-medium text-base">{{ label() }}</label>
860
+ @if (translatedLabel() && detachLabel()) {
861
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
820
862
  }
821
863
 
822
864
  <mat-form-field
@@ -824,8 +866,8 @@ class MatInputTextComponent extends MatFormControlBase {
824
866
  [appearance]="appearance()"
825
867
  [floatLabel]="shouldLabelFloat()"
826
868
  >
827
- @if (label() && !detachLabel()) {
828
- <mat-label>{{ label() }}</mat-label>
869
+ @if (translatedLabel() && !detachLabel()) {
870
+ <mat-label>{{ translatedLabel() }}</mat-label>
829
871
  }
830
872
 
831
873
  <div class="nmf-mat-prefix-slot">
@@ -843,7 +885,7 @@ class MatInputTextComponent extends MatFormControlBase {
843
885
  [name]="name()"
844
886
  [type]="computedType()"
845
887
  [required]="isRequired()"
846
- [placeholder]="placeholder()"
888
+ [placeholder]="translatedPlaceholder()"
847
889
  [autocomplete]="autocompleteAttr()"
848
890
  [formControl]="displayControl"
849
891
  (blur)="onTouched()"
@@ -867,7 +909,7 @@ class MatInputTextComponent extends MatFormControlBase {
867
909
  }
868
910
 
869
911
  @if (hint()) {
870
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
912
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
871
913
  }
872
914
 
873
915
  @if (type() === 'password' && !loading()) {
@@ -885,7 +927,7 @@ class MatInputTextComponent extends MatFormControlBase {
885
927
  </button>
886
928
  }
887
929
 
888
- <mat-error>{{ errorMessage() }}</mat-error>
930
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
889
931
  </mat-form-field>
890
932
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.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: ReactiveFormsModule }, { 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: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
891
933
  }
@@ -904,8 +946,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
904
946
  ],
905
947
  changeDetection: ChangeDetectionStrategy.OnPush,
906
948
  template: `
907
- @if (label() && detachLabel()) {
908
- <label class="font-medium text-base">{{ label() }}</label>
949
+ @if (translatedLabel() && detachLabel()) {
950
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
909
951
  }
910
952
 
911
953
  <mat-form-field
@@ -913,8 +955,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
913
955
  [appearance]="appearance()"
914
956
  [floatLabel]="shouldLabelFloat()"
915
957
  >
916
- @if (label() && !detachLabel()) {
917
- <mat-label>{{ label() }}</mat-label>
958
+ @if (translatedLabel() && !detachLabel()) {
959
+ <mat-label>{{ translatedLabel() }}</mat-label>
918
960
  }
919
961
 
920
962
  <div class="nmf-mat-prefix-slot">
@@ -932,7 +974,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
932
974
  [name]="name()"
933
975
  [type]="computedType()"
934
976
  [required]="isRequired()"
935
- [placeholder]="placeholder()"
977
+ [placeholder]="translatedPlaceholder()"
936
978
  [autocomplete]="autocompleteAttr()"
937
979
  [formControl]="displayControl"
938
980
  (blur)="onTouched()"
@@ -956,7 +998,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
956
998
  }
957
999
 
958
1000
  @if (hint()) {
959
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
1001
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
960
1002
  }
961
1003
 
962
1004
  @if (type() === 'password' && !loading()) {
@@ -974,7 +1016,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
974
1016
  </button>
975
1017
  }
976
1018
 
977
- <mat-error>{{ errorMessage() }}</mat-error>
1019
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
978
1020
  </mat-form-field>
979
1021
  `,
980
1022
  }]
@@ -990,8 +1032,8 @@ class MatInputTextareaComponent extends MatFormControlBase {
990
1032
  }
991
1033
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
992
1034
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputTextareaComponent, isStandalone: true, selector: "nmf-mat-textarea", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, cols: { classPropertyName: "cols", publicName: "cols", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
993
- @if (label() && detachLabel()) {
994
- <label class="font-medium text-base">{{ label() }}</label>
1035
+ @if (translatedLabel() && detachLabel()) {
1036
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
995
1037
  }
996
1038
 
997
1039
  <mat-form-field
@@ -999,8 +1041,8 @@ class MatInputTextareaComponent extends MatFormControlBase {
999
1041
  [appearance]="appearance()"
1000
1042
  [floatLabel]="shouldLabelFloat()"
1001
1043
  >
1002
- @if (label() && !detachLabel()) {
1003
- <mat-label>{{ label() }}</mat-label>
1044
+ @if (translatedLabel() && !detachLabel()) {
1045
+ <mat-label>{{ translatedLabel() }}</mat-label>
1004
1046
  }
1005
1047
 
1006
1048
  <textarea
@@ -1010,7 +1052,7 @@ class MatInputTextareaComponent extends MatFormControlBase {
1010
1052
  [rows]="rows()"
1011
1053
  [cols]="cols()"
1012
1054
  [required]="isRequired()"
1013
- [placeholder]="placeholder()"
1055
+ [placeholder]="translatedPlaceholder()"
1014
1056
  [autocomplete]="autocompleteAttr()"
1015
1057
  [formControl]="displayControl"
1016
1058
  (blur)="onTouched()"
@@ -1027,11 +1069,11 @@ class MatInputTextareaComponent extends MatFormControlBase {
1027
1069
  }
1028
1070
 
1029
1071
  @if (hint()) {
1030
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
1072
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
1031
1073
  }
1032
1074
 
1033
1075
  <mat-error>
1034
- {{ errorMessage() }}
1076
+ {{ translatedErrorMessage() }}
1035
1077
  </mat-error>
1036
1078
  </mat-form-field>
1037
1079
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
@@ -1049,8 +1091,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1049
1091
  ],
1050
1092
  changeDetection: ChangeDetectionStrategy.OnPush,
1051
1093
  template: `
1052
- @if (label() && detachLabel()) {
1053
- <label class="font-medium text-base">{{ label() }}</label>
1094
+ @if (translatedLabel() && detachLabel()) {
1095
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
1054
1096
  }
1055
1097
 
1056
1098
  <mat-form-field
@@ -1058,8 +1100,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1058
1100
  [appearance]="appearance()"
1059
1101
  [floatLabel]="shouldLabelFloat()"
1060
1102
  >
1061
- @if (label() && !detachLabel()) {
1062
- <mat-label>{{ label() }}</mat-label>
1103
+ @if (translatedLabel() && !detachLabel()) {
1104
+ <mat-label>{{ translatedLabel() }}</mat-label>
1063
1105
  }
1064
1106
 
1065
1107
  <textarea
@@ -1069,7 +1111,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1069
1111
  [rows]="rows()"
1070
1112
  [cols]="cols()"
1071
1113
  [required]="isRequired()"
1072
- [placeholder]="placeholder()"
1114
+ [placeholder]="translatedPlaceholder()"
1073
1115
  [autocomplete]="autocompleteAttr()"
1074
1116
  [formControl]="displayControl"
1075
1117
  (blur)="onTouched()"
@@ -1086,11 +1128,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1086
1128
  }
1087
1129
 
1088
1130
  @if (hint()) {
1089
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
1131
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
1090
1132
  }
1091
1133
 
1092
1134
  <mat-error>
1093
- {{ errorMessage() }}
1135
+ {{ translatedErrorMessage() }}
1094
1136
  </mat-error>
1095
1137
  </mat-form-field>
1096
1138
  `,
@@ -1113,8 +1155,8 @@ class MatInputTimepickerComponent extends MatFormControlBase {
1113
1155
  }
1114
1156
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputTimepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1115
1157
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputTimepickerComponent, isStandalone: true, selector: "nmf-mat-timepicker", inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
1116
- @if (label() && detachLabel()) {
1117
- <label class="font-medium text-base">{{ label() }}</label>
1158
+ @if (translatedLabel() && detachLabel()) {
1159
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
1118
1160
  }
1119
1161
 
1120
1162
  <mat-form-field
@@ -1122,8 +1164,8 @@ class MatInputTimepickerComponent extends MatFormControlBase {
1122
1164
  [appearance]="appearance()"
1123
1165
  [floatLabel]="shouldLabelFloat()"
1124
1166
  >
1125
- @if (label() && !detachLabel()) {
1126
- <mat-label>{{ label() }}</mat-label>
1167
+ @if (translatedLabel() && !detachLabel()) {
1168
+ <mat-label>{{ translatedLabel() }}</mat-label>
1127
1169
  }
1128
1170
 
1129
1171
  <input
@@ -1135,7 +1177,7 @@ class MatInputTimepickerComponent extends MatFormControlBase {
1135
1177
  [matTimepickerMin]="minDate()"
1136
1178
  [matTimepickerMax]="maxDate()"
1137
1179
  [required]="isRequired()"
1138
- [placeholder]="placeholder()"
1180
+ [placeholder]="translatedPlaceholder()"
1139
1181
  [autocomplete]="autocompleteAttr()"
1140
1182
  [formControl]="displayControl"
1141
1183
  (blur)="onTouched()"
@@ -1166,11 +1208,11 @@ class MatInputTimepickerComponent extends MatFormControlBase {
1166
1208
  ></mat-spinner>
1167
1209
  }
1168
1210
 
1169
- @if (hint()) {
1170
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
1211
+ @if (translatedHint()) {
1212
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
1171
1213
  }
1172
1214
 
1173
- <mat-error>{{ errorMessage() }}</mat-error>
1215
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
1174
1216
  </mat-form-field>
1175
1217
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: i4$2.MatTimepicker, selector: "mat-timepicker", inputs: ["interval", "options", "disableRipple", "aria-label", "aria-labelledby"], outputs: ["selected", "opened", "closed"], exportAs: ["matTimepicker"] }, { kind: "directive", type: i4$2.MatTimepickerInput, selector: "input[matTimepicker]", inputs: ["value", "matTimepicker", "matTimepickerMin", "matTimepickerMax", "disabled"], outputs: ["valueChange"], exportAs: ["matTimepickerInput"] }, { kind: "component", type: i4$2.MatTimepickerToggle, selector: "mat-timepicker-toggle", inputs: ["for", "aria-label", "aria-labelledby", "disabled", "tabIndex", "disableRipple"], exportAs: ["matTimepickerToggle"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1176
1218
  }
@@ -1189,8 +1231,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1189
1231
  ],
1190
1232
  changeDetection: ChangeDetectionStrategy.OnPush,
1191
1233
  template: `
1192
- @if (label() && detachLabel()) {
1193
- <label class="font-medium text-base">{{ label() }}</label>
1234
+ @if (translatedLabel() && detachLabel()) {
1235
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
1194
1236
  }
1195
1237
 
1196
1238
  <mat-form-field
@@ -1198,8 +1240,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1198
1240
  [appearance]="appearance()"
1199
1241
  [floatLabel]="shouldLabelFloat()"
1200
1242
  >
1201
- @if (label() && !detachLabel()) {
1202
- <mat-label>{{ label() }}</mat-label>
1243
+ @if (translatedLabel() && !detachLabel()) {
1244
+ <mat-label>{{ translatedLabel() }}</mat-label>
1203
1245
  }
1204
1246
 
1205
1247
  <input
@@ -1211,7 +1253,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1211
1253
  [matTimepickerMin]="minDate()"
1212
1254
  [matTimepickerMax]="maxDate()"
1213
1255
  [required]="isRequired()"
1214
- [placeholder]="placeholder()"
1256
+ [placeholder]="translatedPlaceholder()"
1215
1257
  [autocomplete]="autocompleteAttr()"
1216
1258
  [formControl]="displayControl"
1217
1259
  (blur)="onTouched()"
@@ -1242,11 +1284,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1242
1284
  ></mat-spinner>
1243
1285
  }
1244
1286
 
1245
- @if (hint()) {
1246
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
1287
+ @if (translatedHint()) {
1288
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
1247
1289
  }
1248
1290
 
1249
- <mat-error>{{ errorMessage() }}</mat-error>
1291
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
1250
1292
  </mat-form-field>
1251
1293
  `,
1252
1294
  }]
@@ -1260,5 +1302,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1260
1302
  * Generated bundle index. Do not edit.
1261
1303
  */
1262
1304
 
1263
- export { MatFormControlBase, MatInputDatepickerComponent, MatInputLookupComponent, MatInputNumberComponent, MatInputSelectComponent, MatInputTextComponent, MatInputTextareaComponent, MatInputTimepickerComponent };
1305
+ export { MatFormControlBase, MatInputDatepickerComponent, MatInputLookupComponent, MatInputNumberComponent, MatInputSelectComponent, MatInputTextComponent, MatInputTextareaComponent, MatInputTimepickerComponent, NMF_MATERIAL_CONFIG, provideNmfMaterialConfig };
1264
1306
  //# sourceMappingURL=ng-modular-forms-material.mjs.map