@ng-modular-forms/material 0.9.1 → 0.9.3

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,24 +772,28 @@ 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
- `, 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 });
780
+ `, 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: 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
  }
740
782
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputSelectComponent, decorators: [{
741
783
  type: Component,
742
- args: [{ selector: 'nmf-mat-select', imports: [
784
+ args: [{
785
+ selector: 'nmf-mat-select',
786
+ imports: [
743
787
  CommonModule,
744
788
  MatFormFieldModule,
745
789
  MatProgressSpinnerModule,
746
790
  ReactiveFormsModule,
747
791
  MatSelectModule,
748
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: `
749
- @if (label() && detachLabel()) {
750
- <label class="font-medium text-base">{{ label() }}</label>
792
+ ],
793
+ changeDetection: ChangeDetectionStrategy.OnPush,
794
+ template: `
795
+ @if (translatedLabel() && detachLabel()) {
796
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
751
797
  }
752
798
 
753
799
  <mat-form-field
@@ -755,8 +801,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
755
801
  [appearance]="appearance()"
756
802
  [floatLabel]="shouldLabelFloat()"
757
803
  >
758
- @if (label() && !detachLabel()) {
759
- <mat-label>{{ label() }}</mat-label>
804
+ @if (translatedLabel() && !detachLabel()) {
805
+ <mat-label>{{ translatedLabel() }}</mat-label>
760
806
  }
761
807
 
762
808
  <mat-select
@@ -765,13 +811,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
765
811
  [id]="id()"
766
812
  [panelWidth]="panelWidth()"
767
813
  [required]="isRequired()"
768
- [placeholder]="emptyOptionLabel()"
814
+ [placeholder]="translatedEmptyOptionLabel()"
769
815
  [formControl]="displayControl"
770
816
  (blur)="onTouched()"
771
817
  (selectionChange)="onSelectionChange($event)"
772
818
  >
773
819
  <mat-option [value]="''" [disabled]="!allowEmptyOptionSelection()">
774
- {{ emptyOptionLabel() }}
820
+ {{ translatedEmptyOptionLabel() }}
775
821
  </mat-option>
776
822
 
777
823
  <!-- All Options -->
@@ -792,12 +838,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
792
838
  }
793
839
 
794
840
  @if (hint()) {
795
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
841
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
796
842
  }
797
843
 
798
- <mat-error>{{ errorMessage() }}</mat-error>
844
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
799
845
  </mat-form-field>
800
- `, 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"] }]
846
+ `,
847
+ }]
801
848
  }] });
802
849
 
803
850
  class MatInputTextComponent extends MatFormControlBase {
@@ -815,8 +862,8 @@ class MatInputTextComponent extends MatFormControlBase {
815
862
  }
816
863
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
817
864
  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>
865
+ @if (translatedLabel() && detachLabel()) {
866
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
820
867
  }
821
868
 
822
869
  <mat-form-field
@@ -824,8 +871,8 @@ class MatInputTextComponent extends MatFormControlBase {
824
871
  [appearance]="appearance()"
825
872
  [floatLabel]="shouldLabelFloat()"
826
873
  >
827
- @if (label() && !detachLabel()) {
828
- <mat-label>{{ label() }}</mat-label>
874
+ @if (translatedLabel() && !detachLabel()) {
875
+ <mat-label>{{ translatedLabel() }}</mat-label>
829
876
  }
830
877
 
831
878
  <div class="nmf-mat-prefix-slot">
@@ -843,7 +890,7 @@ class MatInputTextComponent extends MatFormControlBase {
843
890
  [name]="name()"
844
891
  [type]="computedType()"
845
892
  [required]="isRequired()"
846
- [placeholder]="placeholder()"
893
+ [placeholder]="translatedPlaceholder()"
847
894
  [autocomplete]="autocompleteAttr()"
848
895
  [formControl]="displayControl"
849
896
  (blur)="onTouched()"
@@ -867,7 +914,7 @@ class MatInputTextComponent extends MatFormControlBase {
867
914
  }
868
915
 
869
916
  @if (hint()) {
870
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
917
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
871
918
  }
872
919
 
873
920
  @if (type() === 'password' && !loading()) {
@@ -885,7 +932,7 @@ class MatInputTextComponent extends MatFormControlBase {
885
932
  </button>
886
933
  }
887
934
 
888
- <mat-error>{{ errorMessage() }}</mat-error>
935
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
889
936
  </mat-form-field>
890
937
  `, 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
938
  }
@@ -904,8 +951,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
904
951
  ],
905
952
  changeDetection: ChangeDetectionStrategy.OnPush,
906
953
  template: `
907
- @if (label() && detachLabel()) {
908
- <label class="font-medium text-base">{{ label() }}</label>
954
+ @if (translatedLabel() && detachLabel()) {
955
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
909
956
  }
910
957
 
911
958
  <mat-form-field
@@ -913,8 +960,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
913
960
  [appearance]="appearance()"
914
961
  [floatLabel]="shouldLabelFloat()"
915
962
  >
916
- @if (label() && !detachLabel()) {
917
- <mat-label>{{ label() }}</mat-label>
963
+ @if (translatedLabel() && !detachLabel()) {
964
+ <mat-label>{{ translatedLabel() }}</mat-label>
918
965
  }
919
966
 
920
967
  <div class="nmf-mat-prefix-slot">
@@ -932,7 +979,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
932
979
  [name]="name()"
933
980
  [type]="computedType()"
934
981
  [required]="isRequired()"
935
- [placeholder]="placeholder()"
982
+ [placeholder]="translatedPlaceholder()"
936
983
  [autocomplete]="autocompleteAttr()"
937
984
  [formControl]="displayControl"
938
985
  (blur)="onTouched()"
@@ -956,7 +1003,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
956
1003
  }
957
1004
 
958
1005
  @if (hint()) {
959
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
1006
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
960
1007
  }
961
1008
 
962
1009
  @if (type() === 'password' && !loading()) {
@@ -974,7 +1021,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
974
1021
  </button>
975
1022
  }
976
1023
 
977
- <mat-error>{{ errorMessage() }}</mat-error>
1024
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
978
1025
  </mat-form-field>
979
1026
  `,
980
1027
  }]
@@ -990,8 +1037,8 @@ class MatInputTextareaComponent extends MatFormControlBase {
990
1037
  }
991
1038
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
992
1039
  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>
1040
+ @if (translatedLabel() && detachLabel()) {
1041
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
995
1042
  }
996
1043
 
997
1044
  <mat-form-field
@@ -999,8 +1046,8 @@ class MatInputTextareaComponent extends MatFormControlBase {
999
1046
  [appearance]="appearance()"
1000
1047
  [floatLabel]="shouldLabelFloat()"
1001
1048
  >
1002
- @if (label() && !detachLabel()) {
1003
- <mat-label>{{ label() }}</mat-label>
1049
+ @if (translatedLabel() && !detachLabel()) {
1050
+ <mat-label>{{ translatedLabel() }}</mat-label>
1004
1051
  }
1005
1052
 
1006
1053
  <textarea
@@ -1010,7 +1057,7 @@ class MatInputTextareaComponent extends MatFormControlBase {
1010
1057
  [rows]="rows()"
1011
1058
  [cols]="cols()"
1012
1059
  [required]="isRequired()"
1013
- [placeholder]="placeholder()"
1060
+ [placeholder]="translatedPlaceholder()"
1014
1061
  [autocomplete]="autocompleteAttr()"
1015
1062
  [formControl]="displayControl"
1016
1063
  (blur)="onTouched()"
@@ -1027,11 +1074,11 @@ class MatInputTextareaComponent extends MatFormControlBase {
1027
1074
  }
1028
1075
 
1029
1076
  @if (hint()) {
1030
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
1077
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
1031
1078
  }
1032
1079
 
1033
1080
  <mat-error>
1034
- {{ errorMessage() }}
1081
+ {{ translatedErrorMessage() }}
1035
1082
  </mat-error>
1036
1083
  </mat-form-field>
1037
1084
  `, 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 +1096,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1049
1096
  ],
1050
1097
  changeDetection: ChangeDetectionStrategy.OnPush,
1051
1098
  template: `
1052
- @if (label() && detachLabel()) {
1053
- <label class="font-medium text-base">{{ label() }}</label>
1099
+ @if (translatedLabel() && detachLabel()) {
1100
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
1054
1101
  }
1055
1102
 
1056
1103
  <mat-form-field
@@ -1058,8 +1105,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1058
1105
  [appearance]="appearance()"
1059
1106
  [floatLabel]="shouldLabelFloat()"
1060
1107
  >
1061
- @if (label() && !detachLabel()) {
1062
- <mat-label>{{ label() }}</mat-label>
1108
+ @if (translatedLabel() && !detachLabel()) {
1109
+ <mat-label>{{ translatedLabel() }}</mat-label>
1063
1110
  }
1064
1111
 
1065
1112
  <textarea
@@ -1069,7 +1116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1069
1116
  [rows]="rows()"
1070
1117
  [cols]="cols()"
1071
1118
  [required]="isRequired()"
1072
- [placeholder]="placeholder()"
1119
+ [placeholder]="translatedPlaceholder()"
1073
1120
  [autocomplete]="autocompleteAttr()"
1074
1121
  [formControl]="displayControl"
1075
1122
  (blur)="onTouched()"
@@ -1086,11 +1133,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1086
1133
  }
1087
1134
 
1088
1135
  @if (hint()) {
1089
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
1136
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
1090
1137
  }
1091
1138
 
1092
1139
  <mat-error>
1093
- {{ errorMessage() }}
1140
+ {{ translatedErrorMessage() }}
1094
1141
  </mat-error>
1095
1142
  </mat-form-field>
1096
1143
  `,
@@ -1113,8 +1160,8 @@ class MatInputTimepickerComponent extends MatFormControlBase {
1113
1160
  }
1114
1161
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputTimepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1115
1162
  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>
1163
+ @if (translatedLabel() && detachLabel()) {
1164
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
1118
1165
  }
1119
1166
 
1120
1167
  <mat-form-field
@@ -1122,8 +1169,8 @@ class MatInputTimepickerComponent extends MatFormControlBase {
1122
1169
  [appearance]="appearance()"
1123
1170
  [floatLabel]="shouldLabelFloat()"
1124
1171
  >
1125
- @if (label() && !detachLabel()) {
1126
- <mat-label>{{ label() }}</mat-label>
1172
+ @if (translatedLabel() && !detachLabel()) {
1173
+ <mat-label>{{ translatedLabel() }}</mat-label>
1127
1174
  }
1128
1175
 
1129
1176
  <input
@@ -1135,7 +1182,7 @@ class MatInputTimepickerComponent extends MatFormControlBase {
1135
1182
  [matTimepickerMin]="minDate()"
1136
1183
  [matTimepickerMax]="maxDate()"
1137
1184
  [required]="isRequired()"
1138
- [placeholder]="placeholder()"
1185
+ [placeholder]="translatedPlaceholder()"
1139
1186
  [autocomplete]="autocompleteAttr()"
1140
1187
  [formControl]="displayControl"
1141
1188
  (blur)="onTouched()"
@@ -1166,11 +1213,11 @@ class MatInputTimepickerComponent extends MatFormControlBase {
1166
1213
  ></mat-spinner>
1167
1214
  }
1168
1215
 
1169
- @if (hint()) {
1170
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
1216
+ @if (translatedHint()) {
1217
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
1171
1218
  }
1172
1219
 
1173
- <mat-error>{{ errorMessage() }}</mat-error>
1220
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
1174
1221
  </mat-form-field>
1175
1222
  `, 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
1223
  }
@@ -1189,8 +1236,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1189
1236
  ],
1190
1237
  changeDetection: ChangeDetectionStrategy.OnPush,
1191
1238
  template: `
1192
- @if (label() && detachLabel()) {
1193
- <label class="font-medium text-base">{{ label() }}</label>
1239
+ @if (translatedLabel() && detachLabel()) {
1240
+ <label class="font-medium text-base">{{ translatedLabel() }}</label>
1194
1241
  }
1195
1242
 
1196
1243
  <mat-form-field
@@ -1198,8 +1245,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1198
1245
  [appearance]="appearance()"
1199
1246
  [floatLabel]="shouldLabelFloat()"
1200
1247
  >
1201
- @if (label() && !detachLabel()) {
1202
- <mat-label>{{ label() }}</mat-label>
1248
+ @if (translatedLabel() && !detachLabel()) {
1249
+ <mat-label>{{ translatedLabel() }}</mat-label>
1203
1250
  }
1204
1251
 
1205
1252
  <input
@@ -1211,7 +1258,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1211
1258
  [matTimepickerMin]="minDate()"
1212
1259
  [matTimepickerMax]="maxDate()"
1213
1260
  [required]="isRequired()"
1214
- [placeholder]="placeholder()"
1261
+ [placeholder]="translatedPlaceholder()"
1215
1262
  [autocomplete]="autocompleteAttr()"
1216
1263
  [formControl]="displayControl"
1217
1264
  (blur)="onTouched()"
@@ -1242,11 +1289,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1242
1289
  ></mat-spinner>
1243
1290
  }
1244
1291
 
1245
- @if (hint()) {
1246
- <mat-hint [ngClass]="hintClassList()">{{ hint() }}</mat-hint>
1292
+ @if (translatedHint()) {
1293
+ <mat-hint [ngClass]="hintClassList()">{{ translatedHint() }}</mat-hint>
1247
1294
  }
1248
1295
 
1249
- <mat-error>{{ errorMessage() }}</mat-error>
1296
+ <mat-error>{{ translatedErrorMessage() }}</mat-error>
1250
1297
  </mat-form-field>
1251
1298
  `,
1252
1299
  }]
@@ -1260,5 +1307,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1260
1307
  * Generated bundle index. Do not edit.
1261
1308
  */
1262
1309
 
1263
- export { MatFormControlBase, MatInputDatepickerComponent, MatInputLookupComponent, MatInputNumberComponent, MatInputSelectComponent, MatInputTextComponent, MatInputTextareaComponent, MatInputTimepickerComponent };
1310
+ export { MatFormControlBase, MatInputDatepickerComponent, MatInputLookupComponent, MatInputNumberComponent, MatInputSelectComponent, MatInputTextComponent, MatInputTextareaComponent, MatInputTimepickerComponent, NMF_MATERIAL_CONFIG, provideNmfMaterialConfig };
1264
1311
  //# sourceMappingURL=ng-modular-forms-material.mjs.map