@ng-modular-forms/material 0.11.2 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/fesm2022/ng-modular-forms-material.mjs +530 -113
- package/fesm2022/ng-modular-forms-material.mjs.map +1 -1
- package/lib/controls/file-selector/file-selector.component.d.ts +12 -0
- package/lib/controls/lookup/lookup.component.d.ts +2 -2
- package/lib/controls/number/number.component.d.ts +4 -1
- package/lib/controls/range/range.component.d.ts +21 -0
- package/lib/controls/text/text.component.d.ts +7 -5
- package/package.json +2 -2
- package/public-api.d.ts +3 -1
- package/styles/form-controls.css +16 -15
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
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
|
-
import { FormControlBase, NumberBehavior, parseNumber, formatNumber,
|
|
5
|
+
import { FormControlBase, LookupBehavior, NumberBehavior, parseNumber, formatNumber, FormFieldComponent, PasswordBehavior } from '@ng-modular-forms/core';
|
|
6
6
|
import { MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule } from '@angular/material/form-field';
|
|
7
7
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
8
8
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
@@ -16,11 +16,13 @@ import * as i2 from '@angular/material/input';
|
|
|
16
16
|
import { MatInputModule } from '@angular/material/input';
|
|
17
17
|
import * as i4$1 from '@angular/material/icon';
|
|
18
18
|
import { MatIconModule } from '@angular/material/icon';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i6 from '@angular/material/button';
|
|
20
20
|
import { MatButtonModule } from '@angular/material/button';
|
|
21
21
|
import * as i3$1 from '@angular/material/autocomplete';
|
|
22
22
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
23
|
-
import * as
|
|
23
|
+
import * as i1$1 from '@angular/material/slider';
|
|
24
|
+
import { MatSliderModule } from '@angular/material/slider';
|
|
25
|
+
import * as i5$1 from '@angular/material/select';
|
|
24
26
|
import { MatSelectModule } from '@angular/material/select';
|
|
25
27
|
import * as i4$2 from '@angular/material/timepicker';
|
|
26
28
|
import { MatTimepickerModule } from '@angular/material/timepicker';
|
|
@@ -124,11 +126,15 @@ class MatFormControlBase extends FormControlBase {
|
|
|
124
126
|
this.displayControl.setErrors(control.errors);
|
|
125
127
|
}
|
|
126
128
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatFormControlBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
127
|
-
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 }, _hideRequiredMarker: { classPropertyName: "_hideRequiredMarker", publicName: "hideRequiredMarker", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
129
|
+
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 }, _hideRequiredMarker: { classPropertyName: "_hideRequiredMarker", publicName: "hideRequiredMarker", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "nmf-material" }, usesInheritance: true, ngImport: i0 });
|
|
128
130
|
}
|
|
129
131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatFormControlBase, decorators: [{
|
|
130
132
|
type: Directive,
|
|
131
|
-
args: [{
|
|
133
|
+
args: [{
|
|
134
|
+
host: {
|
|
135
|
+
class: 'nmf-material',
|
|
136
|
+
},
|
|
137
|
+
}]
|
|
132
138
|
}] });
|
|
133
139
|
|
|
134
140
|
class MatInputDatepickerComponent extends MatFormControlBase {
|
|
@@ -171,9 +177,13 @@ class MatInputDatepickerComponent extends MatFormControlBase {
|
|
|
171
177
|
[max]="maxDate()"
|
|
172
178
|
[matDatepicker]="picker"
|
|
173
179
|
[matDatepickerFilter]="dateFilter()"
|
|
180
|
+
[readonly]="readonly()"
|
|
174
181
|
[required]="isRequired()"
|
|
175
182
|
[placeholder]="placeholder()"
|
|
176
|
-
[
|
|
183
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
184
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
185
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
186
|
+
[attr.autocomplete]="autocomplete()"
|
|
177
187
|
[formControl]="displayControl"
|
|
178
188
|
(blur)="onFocusOut()"
|
|
179
189
|
(focus)="onFocusIn()"
|
|
@@ -255,9 +265,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
255
265
|
[max]="maxDate()"
|
|
256
266
|
[matDatepicker]="picker"
|
|
257
267
|
[matDatepickerFilter]="dateFilter()"
|
|
268
|
+
[readonly]="readonly()"
|
|
258
269
|
[required]="isRequired()"
|
|
259
270
|
[placeholder]="placeholder()"
|
|
260
|
-
[
|
|
271
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
272
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
273
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
274
|
+
[attr.autocomplete]="autocomplete()"
|
|
261
275
|
[formControl]="displayControl"
|
|
262
276
|
(blur)="onFocusOut()"
|
|
263
277
|
(focus)="onFocusIn()"
|
|
@@ -303,49 +317,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
303
317
|
}]
|
|
304
318
|
}] });
|
|
305
319
|
|
|
306
|
-
class
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
const value = this.displayValue();
|
|
315
|
-
if (value == null ||
|
|
316
|
-
value === '' ||
|
|
317
|
-
this.negativeColor() == null ||
|
|
318
|
-
this._disabledByInput()) {
|
|
319
|
-
return 'inherit';
|
|
320
|
+
class MatInputFileSelectorComponent extends MatFormControlBase {
|
|
321
|
+
multiple = input(true);
|
|
322
|
+
accept = input(null);
|
|
323
|
+
capture = input(null);
|
|
324
|
+
acceptAsString = computed(() => {
|
|
325
|
+
const accept = this.accept();
|
|
326
|
+
if (Array.isArray(accept)) {
|
|
327
|
+
return accept.join(',');
|
|
320
328
|
}
|
|
321
|
-
|
|
322
|
-
const valid = parsedValue != null && parsedValue >= 0;
|
|
323
|
-
return valid ? 'inherit' : this.negativeColor();
|
|
329
|
+
return accept;
|
|
324
330
|
});
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
emitEvent: false,
|
|
345
|
-
});
|
|
331
|
+
fileName = computed(() => {
|
|
332
|
+
const value = this.value();
|
|
333
|
+
if (Array.isArray(value)) {
|
|
334
|
+
return value.length === 1
|
|
335
|
+
? (value[0]?.name ?? '')
|
|
336
|
+
: this.translate('fileSelector.filesSelected', {
|
|
337
|
+
count: value.length,
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
return value?.name ?? '';
|
|
341
|
+
});
|
|
342
|
+
onFileSelected(event) {
|
|
343
|
+
const files = event.target.files ?? null;
|
|
344
|
+
if (this.multiple()) {
|
|
345
|
+
this.onChange(Array.from(files ?? []));
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
this.onChange(files ? files[0] : null);
|
|
349
|
+
}
|
|
346
350
|
}
|
|
347
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type:
|
|
348
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type:
|
|
351
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputFileSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
352
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputFileSelectorComponent, isStandalone: true, selector: "nmf-mat-file-selector", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, capture: { classPropertyName: "capture", publicName: "capture", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
349
353
|
@if (translatedLabel() && detachLabel()) {
|
|
350
354
|
<label class="nmf-mat-label-detached">{{ translatedLabel() }}</label>
|
|
351
355
|
}
|
|
@@ -360,41 +364,44 @@ class MatInputNumberComponent extends MatFormControlBase {
|
|
|
360
364
|
<mat-label>{{ translatedLabel() }}</mat-label>
|
|
361
365
|
}
|
|
362
366
|
|
|
363
|
-
@if (showSlots()) {
|
|
364
|
-
<div class="nmf-mat-prefix-slot">
|
|
365
|
-
@if (prefix() != null) {
|
|
366
|
-
<span>{{ prefix() }}</span>
|
|
367
|
-
}
|
|
368
|
-
<ng-content select="[nmfPrefix]"></ng-content>
|
|
369
|
-
</div>
|
|
370
|
-
}
|
|
371
|
-
|
|
372
367
|
<input
|
|
373
|
-
#focusable
|
|
374
368
|
matInput
|
|
375
|
-
|
|
369
|
+
readonly
|
|
370
|
+
[value]="fileName()"
|
|
376
371
|
[ngClass]="classList"
|
|
377
|
-
[style.color]="textColor()"
|
|
378
|
-
[style.opacity]="disabled() ? 0.6 : 1"
|
|
379
372
|
[id]="id()"
|
|
380
373
|
[name]="name()"
|
|
374
|
+
[readonly]="readonly()"
|
|
381
375
|
[required]="isRequired()"
|
|
382
376
|
[placeholder]="translatedPlaceholder()"
|
|
383
|
-
[
|
|
377
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
378
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
379
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
380
|
+
[attr.autocomplete]="autocomplete()"
|
|
384
381
|
[formControl]="displayControl"
|
|
385
382
|
(blur)="onFocusOut()"
|
|
386
383
|
(focus)="onFocusIn()"
|
|
387
|
-
(
|
|
384
|
+
(click)="fileInput.click()"
|
|
388
385
|
/>
|
|
389
386
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
</
|
|
397
|
-
|
|
387
|
+
<button
|
|
388
|
+
matSuffix
|
|
389
|
+
mat-icon-button
|
|
390
|
+
type="button"
|
|
391
|
+
(click)="fileInput.click()"
|
|
392
|
+
>
|
|
393
|
+
<mat-icon>attach_file</mat-icon>
|
|
394
|
+
</button>
|
|
395
|
+
|
|
396
|
+
<input
|
|
397
|
+
#fileInput
|
|
398
|
+
hidden
|
|
399
|
+
type="file"
|
|
400
|
+
[attr.accept]="acceptAsString()"
|
|
401
|
+
[attr.capture]="capture()"
|
|
402
|
+
[multiple]="multiple()"
|
|
403
|
+
(change)="onFileSelected($event)"
|
|
404
|
+
/>
|
|
398
405
|
|
|
399
406
|
@if (loading()) {
|
|
400
407
|
<mat-spinner
|
|
@@ -413,12 +420,12 @@ class MatInputNumberComponent extends MatFormControlBase {
|
|
|
413
420
|
|
|
414
421
|
<mat-error>{{ translatedErrorMessage() }}</mat-error>
|
|
415
422
|
</mat-form-field>
|
|
416
|
-
`, 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 });
|
|
423
|
+
`, 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: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
417
424
|
}
|
|
418
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type:
|
|
425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputFileSelectorComponent, decorators: [{
|
|
419
426
|
type: Component,
|
|
420
427
|
args: [{
|
|
421
|
-
selector: 'nmf-mat-
|
|
428
|
+
selector: 'nmf-mat-file-selector',
|
|
422
429
|
imports: [
|
|
423
430
|
CommonModule,
|
|
424
431
|
MatFormFieldModule,
|
|
@@ -444,41 +451,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
444
451
|
<mat-label>{{ translatedLabel() }}</mat-label>
|
|
445
452
|
}
|
|
446
453
|
|
|
447
|
-
@if (showSlots()) {
|
|
448
|
-
<div class="nmf-mat-prefix-slot">
|
|
449
|
-
@if (prefix() != null) {
|
|
450
|
-
<span>{{ prefix() }}</span>
|
|
451
|
-
}
|
|
452
|
-
<ng-content select="[nmfPrefix]"></ng-content>
|
|
453
|
-
</div>
|
|
454
|
-
}
|
|
455
|
-
|
|
456
454
|
<input
|
|
457
|
-
#focusable
|
|
458
455
|
matInput
|
|
459
|
-
|
|
456
|
+
readonly
|
|
457
|
+
[value]="fileName()"
|
|
460
458
|
[ngClass]="classList"
|
|
461
|
-
[style.color]="textColor()"
|
|
462
|
-
[style.opacity]="disabled() ? 0.6 : 1"
|
|
463
459
|
[id]="id()"
|
|
464
460
|
[name]="name()"
|
|
461
|
+
[readonly]="readonly()"
|
|
465
462
|
[required]="isRequired()"
|
|
466
463
|
[placeholder]="translatedPlaceholder()"
|
|
467
|
-
[
|
|
464
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
465
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
466
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
467
|
+
[attr.autocomplete]="autocomplete()"
|
|
468
468
|
[formControl]="displayControl"
|
|
469
469
|
(blur)="onFocusOut()"
|
|
470
470
|
(focus)="onFocusIn()"
|
|
471
|
-
(
|
|
471
|
+
(click)="fileInput.click()"
|
|
472
472
|
/>
|
|
473
473
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
</
|
|
481
|
-
|
|
474
|
+
<button
|
|
475
|
+
matSuffix
|
|
476
|
+
mat-icon-button
|
|
477
|
+
type="button"
|
|
478
|
+
(click)="fileInput.click()"
|
|
479
|
+
>
|
|
480
|
+
<mat-icon>attach_file</mat-icon>
|
|
481
|
+
</button>
|
|
482
|
+
|
|
483
|
+
<input
|
|
484
|
+
#fileInput
|
|
485
|
+
hidden
|
|
486
|
+
type="file"
|
|
487
|
+
[attr.accept]="acceptAsString()"
|
|
488
|
+
[attr.capture]="capture()"
|
|
489
|
+
[multiple]="multiple()"
|
|
490
|
+
(change)="onFileSelected($event)"
|
|
491
|
+
/>
|
|
482
492
|
|
|
483
493
|
@if (loading()) {
|
|
484
494
|
<mat-spinner
|
|
@@ -502,7 +512,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
502
512
|
}] });
|
|
503
513
|
|
|
504
514
|
class MatInputLookupComponent extends MatFormControlBase {
|
|
505
|
-
|
|
515
|
+
autocomplete = input('off');
|
|
506
516
|
/*
|
|
507
517
|
* Static options to display in the dropdown. This is for synchronous sources.
|
|
508
518
|
*/
|
|
@@ -586,7 +596,7 @@ class MatInputLookupComponent extends MatFormControlBase {
|
|
|
586
596
|
return this.behavior.isOptionSelected(value);
|
|
587
597
|
}
|
|
588
598
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputLookupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
589
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputLookupComponent, isStandalone: true, selector: "nmf-mat-lookup", inputs: {
|
|
599
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputLookupComponent, isStandalone: true, selector: "nmf-mat-lookup", inputs: { autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", 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: `
|
|
590
600
|
@if (translatedLabel() && detachLabel()) {
|
|
591
601
|
<label class="nmf-mat-label-detached">{{ translatedLabel() }}</label>
|
|
592
602
|
}
|
|
@@ -607,13 +617,16 @@ class MatInputLookupComponent extends MatFormControlBase {
|
|
|
607
617
|
matInput
|
|
608
618
|
type="text"
|
|
609
619
|
[class.cursor-not-allowed]="!isOptionSelected(null)"
|
|
610
|
-
[attr.aria-label]="detachLabel() ? translatedLabel() : null"
|
|
611
620
|
[ngClass]="classList"
|
|
612
621
|
[id]="id()"
|
|
613
622
|
[name]="name()"
|
|
614
623
|
[required]="isRequired()"
|
|
615
|
-
[readonly]="!isOptionSelected(null)"
|
|
624
|
+
[readonly]="readonly() || !isOptionSelected(null)"
|
|
616
625
|
[placeholder]="translatedPlaceholder()"
|
|
626
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
627
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
628
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
629
|
+
[attr.autocomplete]="autocomplete()"
|
|
617
630
|
[formControl]="displayControl"
|
|
618
631
|
[matAutocomplete]="auto"
|
|
619
632
|
(blur)="onFocusOut()"
|
|
@@ -662,7 +675,7 @@ class MatInputLookupComponent extends MatFormControlBase {
|
|
|
662
675
|
}
|
|
663
676
|
</mat-form-field>
|
|
664
677
|
</div>
|
|
665
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { 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: MatAutocompleteModule }, { kind: "component", type: i3$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i3$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type:
|
|
678
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { 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: MatAutocompleteModule }, { kind: "component", type: i3$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i3$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { 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 });
|
|
666
679
|
}
|
|
667
680
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputLookupComponent, decorators: [{
|
|
668
681
|
type: Component,
|
|
@@ -702,13 +715,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
702
715
|
matInput
|
|
703
716
|
type="text"
|
|
704
717
|
[class.cursor-not-allowed]="!isOptionSelected(null)"
|
|
705
|
-
[attr.aria-label]="detachLabel() ? translatedLabel() : null"
|
|
706
718
|
[ngClass]="classList"
|
|
707
719
|
[id]="id()"
|
|
708
720
|
[name]="name()"
|
|
709
721
|
[required]="isRequired()"
|
|
710
|
-
[readonly]="!isOptionSelected(null)"
|
|
722
|
+
[readonly]="readonly() || !isOptionSelected(null)"
|
|
711
723
|
[placeholder]="translatedPlaceholder()"
|
|
724
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
725
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
726
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
727
|
+
[attr.autocomplete]="autocomplete()"
|
|
712
728
|
[formControl]="displayControl"
|
|
713
729
|
[matAutocomplete]="auto"
|
|
714
730
|
(blur)="onFocusOut()"
|
|
@@ -761,6 +777,363 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
761
777
|
}]
|
|
762
778
|
}], ctorParameters: () => [] });
|
|
763
779
|
|
|
780
|
+
class MatInputNumberComponent extends MatFormControlBase {
|
|
781
|
+
formatValue = input(false);
|
|
782
|
+
prefix = input(null);
|
|
783
|
+
suffix = input(null);
|
|
784
|
+
allowNegative = input(true);
|
|
785
|
+
negativeColor = input('var(--mat-sys-error)');
|
|
786
|
+
min = input(null);
|
|
787
|
+
max = input(null);
|
|
788
|
+
step = input(null);
|
|
789
|
+
numberBehavior = new NumberBehavior();
|
|
790
|
+
textColor = computed(() => {
|
|
791
|
+
const value = this.displayValue();
|
|
792
|
+
if (value == null ||
|
|
793
|
+
value === '' ||
|
|
794
|
+
this.negativeColor() == null ||
|
|
795
|
+
this._disabledByInput()) {
|
|
796
|
+
return 'inherit';
|
|
797
|
+
}
|
|
798
|
+
const parsedValue = parseNumber(value ?? 0);
|
|
799
|
+
const valid = parsedValue != null && parsedValue >= 0;
|
|
800
|
+
return valid ? 'inherit' : this.negativeColor();
|
|
801
|
+
});
|
|
802
|
+
writeValue(value) {
|
|
803
|
+
super.writeValue(value);
|
|
804
|
+
this.updateDisplayValue(value);
|
|
805
|
+
}
|
|
806
|
+
onInput(_) {
|
|
807
|
+
const raw = this.displayControl.value ?? '';
|
|
808
|
+
const cleaned = this.numberBehavior.sanitize(raw, this.allowNegative());
|
|
809
|
+
const parsed = parseNumber(cleaned);
|
|
810
|
+
this.updateDisplayValue(cleaned);
|
|
811
|
+
this.onChange(parsed);
|
|
812
|
+
}
|
|
813
|
+
updateDisplayValue(value) {
|
|
814
|
+
const normalized = value == null
|
|
815
|
+
? null
|
|
816
|
+
: typeof value === 'number'
|
|
817
|
+
? value
|
|
818
|
+
: parseNumber(value);
|
|
819
|
+
const displayValue = this.formatValue() && normalized != null
|
|
820
|
+
? (formatNumber(normalized) ?? '')
|
|
821
|
+
: value != null
|
|
822
|
+
? String(value)
|
|
823
|
+
: '';
|
|
824
|
+
this.displayControl.setValue(displayValue, {
|
|
825
|
+
emitEvent: false,
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
829
|
+
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 }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
830
|
+
@if (translatedLabel() && detachLabel()) {
|
|
831
|
+
<label class="nmf-mat-label-detached">{{ translatedLabel() }}</label>
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
<mat-form-field
|
|
835
|
+
class="nmf-mat-field"
|
|
836
|
+
[appearance]="appearance()"
|
|
837
|
+
[floatLabel]="shouldLabelFloat()"
|
|
838
|
+
[hideRequiredMarker]="hideRequiredMarker()"
|
|
839
|
+
>
|
|
840
|
+
@if (translatedLabel() && !detachLabel()) {
|
|
841
|
+
<mat-label>{{ translatedLabel() }}</mat-label>
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
@if (showSlots()) {
|
|
845
|
+
<div class="nmf-mat-prefix-slot">
|
|
846
|
+
@if (prefix() != null) {
|
|
847
|
+
<span>{{ prefix() }}</span>
|
|
848
|
+
}
|
|
849
|
+
<ng-content select="[nmfPrefix]"></ng-content>
|
|
850
|
+
</div>
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
<input
|
|
854
|
+
#focusable
|
|
855
|
+
matInput
|
|
856
|
+
type="text"
|
|
857
|
+
[ngClass]="classList"
|
|
858
|
+
[style.color]="textColor()"
|
|
859
|
+
[style.opacity]="disabled() ? 0.6 : 1"
|
|
860
|
+
[id]="id()"
|
|
861
|
+
[name]="name()"
|
|
862
|
+
[min]="min()"
|
|
863
|
+
[max]="max()"
|
|
864
|
+
[step]="step()"
|
|
865
|
+
[readonly]="readonly()"
|
|
866
|
+
[required]="isRequired()"
|
|
867
|
+
[placeholder]="translatedPlaceholder()"
|
|
868
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
869
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
870
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
871
|
+
[attr.autocomplete]="autocomplete()"
|
|
872
|
+
[formControl]="displayControl"
|
|
873
|
+
(blur)="onFocusOut()"
|
|
874
|
+
(focus)="onFocusIn()"
|
|
875
|
+
(input)="onInput($event)"
|
|
876
|
+
/>
|
|
877
|
+
|
|
878
|
+
@if (showSlots()) {
|
|
879
|
+
<div class="nmf-mat-suffix-slot">
|
|
880
|
+
@if (suffix() != null) {
|
|
881
|
+
<span>{{ suffix() }}</span>
|
|
882
|
+
}
|
|
883
|
+
<ng-content select="[nmfSuffix]"></ng-content>
|
|
884
|
+
</div>
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
@if (loading()) {
|
|
888
|
+
<mat-spinner
|
|
889
|
+
matSuffix
|
|
890
|
+
class="nmf-mat-loader"
|
|
891
|
+
diameter="22"
|
|
892
|
+
strokeWidth="3"
|
|
893
|
+
></mat-spinner>
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
@if (translatedHintLabel()) {
|
|
897
|
+
<mat-hint [ngClass]="hintClassList()">{{
|
|
898
|
+
translatedHintLabel()
|
|
899
|
+
}}</mat-hint>
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
<mat-error>{{ translatedErrorMessage() }}</mat-error>
|
|
903
|
+
</mat-form-field>
|
|
904
|
+
`, 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 });
|
|
905
|
+
}
|
|
906
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputNumberComponent, decorators: [{
|
|
907
|
+
type: Component,
|
|
908
|
+
args: [{
|
|
909
|
+
selector: 'nmf-mat-number',
|
|
910
|
+
imports: [
|
|
911
|
+
CommonModule,
|
|
912
|
+
MatFormFieldModule,
|
|
913
|
+
MatInputModule,
|
|
914
|
+
ReactiveFormsModule,
|
|
915
|
+
MatIconModule,
|
|
916
|
+
MatProgressSpinnerModule,
|
|
917
|
+
MatButtonModule,
|
|
918
|
+
],
|
|
919
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
920
|
+
template: `
|
|
921
|
+
@if (translatedLabel() && detachLabel()) {
|
|
922
|
+
<label class="nmf-mat-label-detached">{{ translatedLabel() }}</label>
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
<mat-form-field
|
|
926
|
+
class="nmf-mat-field"
|
|
927
|
+
[appearance]="appearance()"
|
|
928
|
+
[floatLabel]="shouldLabelFloat()"
|
|
929
|
+
[hideRequiredMarker]="hideRequiredMarker()"
|
|
930
|
+
>
|
|
931
|
+
@if (translatedLabel() && !detachLabel()) {
|
|
932
|
+
<mat-label>{{ translatedLabel() }}</mat-label>
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
@if (showSlots()) {
|
|
936
|
+
<div class="nmf-mat-prefix-slot">
|
|
937
|
+
@if (prefix() != null) {
|
|
938
|
+
<span>{{ prefix() }}</span>
|
|
939
|
+
}
|
|
940
|
+
<ng-content select="[nmfPrefix]"></ng-content>
|
|
941
|
+
</div>
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
<input
|
|
945
|
+
#focusable
|
|
946
|
+
matInput
|
|
947
|
+
type="text"
|
|
948
|
+
[ngClass]="classList"
|
|
949
|
+
[style.color]="textColor()"
|
|
950
|
+
[style.opacity]="disabled() ? 0.6 : 1"
|
|
951
|
+
[id]="id()"
|
|
952
|
+
[name]="name()"
|
|
953
|
+
[min]="min()"
|
|
954
|
+
[max]="max()"
|
|
955
|
+
[step]="step()"
|
|
956
|
+
[readonly]="readonly()"
|
|
957
|
+
[required]="isRequired()"
|
|
958
|
+
[placeholder]="translatedPlaceholder()"
|
|
959
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
960
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
961
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
962
|
+
[attr.autocomplete]="autocomplete()"
|
|
963
|
+
[formControl]="displayControl"
|
|
964
|
+
(blur)="onFocusOut()"
|
|
965
|
+
(focus)="onFocusIn()"
|
|
966
|
+
(input)="onInput($event)"
|
|
967
|
+
/>
|
|
968
|
+
|
|
969
|
+
@if (showSlots()) {
|
|
970
|
+
<div class="nmf-mat-suffix-slot">
|
|
971
|
+
@if (suffix() != null) {
|
|
972
|
+
<span>{{ suffix() }}</span>
|
|
973
|
+
}
|
|
974
|
+
<ng-content select="[nmfSuffix]"></ng-content>
|
|
975
|
+
</div>
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
@if (loading()) {
|
|
979
|
+
<mat-spinner
|
|
980
|
+
matSuffix
|
|
981
|
+
class="nmf-mat-loader"
|
|
982
|
+
diameter="22"
|
|
983
|
+
strokeWidth="3"
|
|
984
|
+
></mat-spinner>
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
@if (translatedHintLabel()) {
|
|
988
|
+
<mat-hint [ngClass]="hintClassList()">{{
|
|
989
|
+
translatedHintLabel()
|
|
990
|
+
}}</mat-hint>
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
<mat-error>{{ translatedErrorMessage() }}</mat-error>
|
|
994
|
+
</mat-form-field>
|
|
995
|
+
`,
|
|
996
|
+
}]
|
|
997
|
+
}] });
|
|
998
|
+
|
|
999
|
+
class MatInputRangeComponent extends MatFormControlBase {
|
|
1000
|
+
min = input(null);
|
|
1001
|
+
max = input(null);
|
|
1002
|
+
step = input(null);
|
|
1003
|
+
rangeSelection = input(false);
|
|
1004
|
+
showTickMarks = input(false);
|
|
1005
|
+
discrete = input(true);
|
|
1006
|
+
startValue = null;
|
|
1007
|
+
endValue = null;
|
|
1008
|
+
onSingleChange(value) {
|
|
1009
|
+
this.onChange(value);
|
|
1010
|
+
this.onTouched();
|
|
1011
|
+
}
|
|
1012
|
+
onRangeStartChange(value) {
|
|
1013
|
+
this.startValue = value;
|
|
1014
|
+
this.emitRangeIfReady();
|
|
1015
|
+
}
|
|
1016
|
+
onRangeEndChange(value) {
|
|
1017
|
+
this.endValue = value;
|
|
1018
|
+
this.emitRangeIfReady();
|
|
1019
|
+
}
|
|
1020
|
+
emitRangeIfReady() {
|
|
1021
|
+
if (this.startValue == null || this.endValue == null)
|
|
1022
|
+
return;
|
|
1023
|
+
const start = Math.min(this.startValue, this.endValue);
|
|
1024
|
+
const end = Math.max(this.startValue, this.endValue);
|
|
1025
|
+
this.onChange([start, end]);
|
|
1026
|
+
this.onTouched();
|
|
1027
|
+
}
|
|
1028
|
+
writeValue(value) {
|
|
1029
|
+
super.writeValue(value);
|
|
1030
|
+
if (Array.isArray(value)) {
|
|
1031
|
+
this.startValue = value[0];
|
|
1032
|
+
this.endValue = value[1];
|
|
1033
|
+
}
|
|
1034
|
+
else if (typeof value === 'number') {
|
|
1035
|
+
this.startValue = value;
|
|
1036
|
+
this.endValue = null;
|
|
1037
|
+
}
|
|
1038
|
+
else {
|
|
1039
|
+
this.startValue = null;
|
|
1040
|
+
this.endValue = null;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputRangeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1044
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MatInputRangeComponent, isStandalone: true, selector: "nmf-mat-range", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, rangeSelection: { classPropertyName: "rangeSelection", publicName: "rangeSelection", isSignal: true, isRequired: false, transformFunction: null }, showTickMarks: { classPropertyName: "showTickMarks", publicName: "showTickMarks", isSignal: true, isRequired: false, transformFunction: null }, discrete: { classPropertyName: "discrete", publicName: "discrete", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
1045
|
+
<nmf-form-field
|
|
1046
|
+
[label]="translatedLabel()"
|
|
1047
|
+
[isRequired]="isRequired()"
|
|
1048
|
+
[loading]="loading()"
|
|
1049
|
+
[errorMessage]="translatedErrorMessage()"
|
|
1050
|
+
[hintLabel]="translatedHintLabel()"
|
|
1051
|
+
[hintClassList]="hintClassList()"
|
|
1052
|
+
>
|
|
1053
|
+
<mat-slider
|
|
1054
|
+
[min]="min() ?? 0"
|
|
1055
|
+
[max]="max() ?? 100"
|
|
1056
|
+
[step]="step() ?? 1"
|
|
1057
|
+
[discrete]="discrete()"
|
|
1058
|
+
[showTickMarks]="showTickMarks()"
|
|
1059
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
1060
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1061
|
+
>
|
|
1062
|
+
@if (rangeSelection()) {
|
|
1063
|
+
<input
|
|
1064
|
+
matSliderStartThumb
|
|
1065
|
+
[value]="startValue ?? min() ?? 0"
|
|
1066
|
+
(valueChange)="onRangeStartChange($event)"
|
|
1067
|
+
/>
|
|
1068
|
+
<input
|
|
1069
|
+
matSliderEndThumb
|
|
1070
|
+
[value]="endValue ?? max() ?? 100"
|
|
1071
|
+
(valueChange)="onRangeEndChange($event)"
|
|
1072
|
+
/>
|
|
1073
|
+
} @else {
|
|
1074
|
+
<input
|
|
1075
|
+
matSliderThumb
|
|
1076
|
+
[value]="value()"
|
|
1077
|
+
(valueChange)="onSingleChange($event)"
|
|
1078
|
+
/>
|
|
1079
|
+
}
|
|
1080
|
+
</mat-slider>
|
|
1081
|
+
</nmf-form-field>
|
|
1082
|
+
`, isInline: true, styles: ["mat-slider{width:100%}.error{--nmf-input-error-color: var(--mat-sys-error)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FormFieldComponent, selector: "nmf-form-field", inputs: ["label", "loading", "hintLabel", "hintClassList", "isRequired", "errorMessage"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatSliderModule }, { kind: "component", type: i1$1.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i1$1.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "directive", type: i1$1.MatSliderRangeThumb, selector: "input[matSliderStartThumb], input[matSliderEndThumb]", exportAs: ["matSliderRangeThumb"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1083
|
+
}
|
|
1084
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputRangeComponent, decorators: [{
|
|
1085
|
+
type: Component,
|
|
1086
|
+
args: [{ selector: 'nmf-mat-range', imports: [
|
|
1087
|
+
CommonModule,
|
|
1088
|
+
FormFieldComponent,
|
|
1089
|
+
MatFormFieldModule,
|
|
1090
|
+
MatInputModule,
|
|
1091
|
+
ReactiveFormsModule,
|
|
1092
|
+
MatIconModule,
|
|
1093
|
+
MatProgressSpinnerModule,
|
|
1094
|
+
MatButtonModule,
|
|
1095
|
+
MatSliderModule,
|
|
1096
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1097
|
+
<nmf-form-field
|
|
1098
|
+
[label]="translatedLabel()"
|
|
1099
|
+
[isRequired]="isRequired()"
|
|
1100
|
+
[loading]="loading()"
|
|
1101
|
+
[errorMessage]="translatedErrorMessage()"
|
|
1102
|
+
[hintLabel]="translatedHintLabel()"
|
|
1103
|
+
[hintClassList]="hintClassList()"
|
|
1104
|
+
>
|
|
1105
|
+
<mat-slider
|
|
1106
|
+
[min]="min() ?? 0"
|
|
1107
|
+
[max]="max() ?? 100"
|
|
1108
|
+
[step]="step() ?? 1"
|
|
1109
|
+
[discrete]="discrete()"
|
|
1110
|
+
[showTickMarks]="showTickMarks()"
|
|
1111
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
1112
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1113
|
+
>
|
|
1114
|
+
@if (rangeSelection()) {
|
|
1115
|
+
<input
|
|
1116
|
+
matSliderStartThumb
|
|
1117
|
+
[value]="startValue ?? min() ?? 0"
|
|
1118
|
+
(valueChange)="onRangeStartChange($event)"
|
|
1119
|
+
/>
|
|
1120
|
+
<input
|
|
1121
|
+
matSliderEndThumb
|
|
1122
|
+
[value]="endValue ?? max() ?? 100"
|
|
1123
|
+
(valueChange)="onRangeEndChange($event)"
|
|
1124
|
+
/>
|
|
1125
|
+
} @else {
|
|
1126
|
+
<input
|
|
1127
|
+
matSliderThumb
|
|
1128
|
+
[value]="value()"
|
|
1129
|
+
(valueChange)="onSingleChange($event)"
|
|
1130
|
+
/>
|
|
1131
|
+
}
|
|
1132
|
+
</mat-slider>
|
|
1133
|
+
</nmf-form-field>
|
|
1134
|
+
`, styles: ["mat-slider{width:100%}.error{--nmf-input-error-color: var(--mat-sys-error)}\n"] }]
|
|
1135
|
+
}] });
|
|
1136
|
+
|
|
764
1137
|
class MatInputSelectComponent extends MatFormControlBase {
|
|
765
1138
|
options = input([]);
|
|
766
1139
|
emptyOptionLabel = input('Select an option');
|
|
@@ -801,6 +1174,10 @@ class MatInputSelectComponent extends MatFormControlBase {
|
|
|
801
1174
|
[panelWidth]="panelWidth()"
|
|
802
1175
|
[required]="isRequired()"
|
|
803
1176
|
[placeholder]="translatedEmptyOptionLabel()"
|
|
1177
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
1178
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1179
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1180
|
+
[attr.autocomplete]="autocomplete()"
|
|
804
1181
|
[formControl]="displayControl"
|
|
805
1182
|
(blur)="onFocusOut()"
|
|
806
1183
|
(focus)="onFocusIn()"
|
|
@@ -835,7 +1212,7 @@ class MatInputSelectComponent extends MatFormControlBase {
|
|
|
835
1212
|
|
|
836
1213
|
<mat-error>{{ translatedErrorMessage() }}</mat-error>
|
|
837
1214
|
</mat-form-field>
|
|
838
|
-
`, isInline: true, styles: [":host{display:block;flex-basis:160px;flex-shrink:1}\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$
|
|
1215
|
+
`, isInline: true, styles: [":host{display:block;flex-basis:160px;flex-shrink:1}\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$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
839
1216
|
}
|
|
840
1217
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputSelectComponent, decorators: [{
|
|
841
1218
|
type: Component,
|
|
@@ -867,6 +1244,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
867
1244
|
[panelWidth]="panelWidth()"
|
|
868
1245
|
[required]="isRequired()"
|
|
869
1246
|
[placeholder]="translatedEmptyOptionLabel()"
|
|
1247
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
1248
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1249
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1250
|
+
[attr.autocomplete]="autocomplete()"
|
|
870
1251
|
[formControl]="displayControl"
|
|
871
1252
|
(blur)="onFocusOut()"
|
|
872
1253
|
(focus)="onFocusIn()"
|
|
@@ -906,6 +1287,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
906
1287
|
|
|
907
1288
|
class MatInputTextComponent extends MatFormControlBase {
|
|
908
1289
|
type = input('text');
|
|
1290
|
+
autocapitalize = input('off');
|
|
1291
|
+
minlength = input(null);
|
|
1292
|
+
maxlength = input(null);
|
|
1293
|
+
pattern = input(null);
|
|
909
1294
|
prefix = input(null);
|
|
910
1295
|
suffix = input(null);
|
|
911
1296
|
behavior = new PasswordBehavior();
|
|
@@ -918,7 +1303,7 @@ class MatInputTextComponent extends MatFormControlBase {
|
|
|
918
1303
|
this.onChange(value);
|
|
919
1304
|
}
|
|
920
1305
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
921
|
-
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: `
|
|
1306
|
+
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 }, autocapitalize: { classPropertyName: "autocapitalize", publicName: "autocapitalize", isSignal: true, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "minlength", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", 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: `
|
|
922
1307
|
@if (translatedLabel() && detachLabel()) {
|
|
923
1308
|
<label class="nmf-mat-label-detached">{{ translatedLabel() }}</label>
|
|
924
1309
|
}
|
|
@@ -949,9 +1334,17 @@ class MatInputTextComponent extends MatFormControlBase {
|
|
|
949
1334
|
[id]="id()"
|
|
950
1335
|
[name]="name()"
|
|
951
1336
|
[type]="computedType()"
|
|
1337
|
+
[readonly]="readonly()"
|
|
952
1338
|
[required]="isRequired()"
|
|
953
1339
|
[placeholder]="translatedPlaceholder()"
|
|
954
|
-
[
|
|
1340
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
1341
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1342
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1343
|
+
[attr.autocomplete]="autocomplete()"
|
|
1344
|
+
[attr.autocapitalize]="autocapitalize()"
|
|
1345
|
+
[attr.minlength]="minlength()"
|
|
1346
|
+
[attr.maxlength]="maxlength()"
|
|
1347
|
+
[attr.pattern]="pattern()"
|
|
955
1348
|
[formControl]="displayControl"
|
|
956
1349
|
(blur)="onFocusOut()"
|
|
957
1350
|
(focus)="onFocusIn()"
|
|
@@ -999,7 +1392,7 @@ class MatInputTextComponent extends MatFormControlBase {
|
|
|
999
1392
|
|
|
1000
1393
|
<mat-error>{{ translatedErrorMessage() }}</mat-error>
|
|
1001
1394
|
</mat-form-field>
|
|
1002
|
-
`, 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:
|
|
1395
|
+
`, 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: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1003
1396
|
}
|
|
1004
1397
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MatInputTextComponent, decorators: [{
|
|
1005
1398
|
type: Component,
|
|
@@ -1046,9 +1439,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1046
1439
|
[id]="id()"
|
|
1047
1440
|
[name]="name()"
|
|
1048
1441
|
[type]="computedType()"
|
|
1442
|
+
[readonly]="readonly()"
|
|
1049
1443
|
[required]="isRequired()"
|
|
1050
1444
|
[placeholder]="translatedPlaceholder()"
|
|
1051
|
-
[
|
|
1445
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
1446
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1447
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1448
|
+
[attr.autocomplete]="autocomplete()"
|
|
1449
|
+
[attr.autocapitalize]="autocapitalize()"
|
|
1450
|
+
[attr.minlength]="minlength()"
|
|
1451
|
+
[attr.maxlength]="maxlength()"
|
|
1452
|
+
[attr.pattern]="pattern()"
|
|
1052
1453
|
[formControl]="displayControl"
|
|
1053
1454
|
(blur)="onFocusOut()"
|
|
1054
1455
|
(focus)="onFocusIn()"
|
|
@@ -1130,9 +1531,13 @@ class MatInputTextareaComponent extends MatFormControlBase {
|
|
|
1130
1531
|
[id]="id()"
|
|
1131
1532
|
[rows]="rows()"
|
|
1132
1533
|
[cols]="cols()"
|
|
1534
|
+
[readonly]="readonly()"
|
|
1133
1535
|
[required]="isRequired()"
|
|
1134
1536
|
[placeholder]="translatedPlaceholder()"
|
|
1135
|
-
[
|
|
1537
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
1538
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1539
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1540
|
+
[attr.autocomplete]="autocomplete()"
|
|
1136
1541
|
[formControl]="displayControl"
|
|
1137
1542
|
(blur)="onFocusOut()"
|
|
1138
1543
|
(focus)="onFocusIn()"
|
|
@@ -1193,9 +1598,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1193
1598
|
[id]="id()"
|
|
1194
1599
|
[rows]="rows()"
|
|
1195
1600
|
[cols]="cols()"
|
|
1601
|
+
[readonly]="readonly()"
|
|
1196
1602
|
[required]="isRequired()"
|
|
1197
1603
|
[placeholder]="translatedPlaceholder()"
|
|
1198
|
-
[
|
|
1604
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
1605
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1606
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1607
|
+
[attr.autocomplete]="autocomplete()"
|
|
1199
1608
|
[formControl]="displayControl"
|
|
1200
1609
|
(blur)="onFocusOut()"
|
|
1201
1610
|
(focus)="onFocusIn()"
|
|
@@ -1263,9 +1672,13 @@ class MatInputTimepickerComponent extends MatFormControlBase {
|
|
|
1263
1672
|
[matTimepicker]="picker"
|
|
1264
1673
|
[matTimepickerMin]="minDate()"
|
|
1265
1674
|
[matTimepickerMax]="maxDate()"
|
|
1675
|
+
[readonly]="readonly()"
|
|
1266
1676
|
[required]="isRequired()"
|
|
1267
1677
|
[placeholder]="translatedPlaceholder()"
|
|
1268
|
-
[
|
|
1678
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
1679
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1680
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1681
|
+
[attr.autocomplete]="autocomplete()"
|
|
1269
1682
|
[formControl]="displayControl"
|
|
1270
1683
|
(blur)="onFocusOut()"
|
|
1271
1684
|
(focus)="onFocusIn()"
|
|
@@ -1343,9 +1756,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1343
1756
|
[matTimepicker]="picker"
|
|
1344
1757
|
[matTimepickerMin]="minDate()"
|
|
1345
1758
|
[matTimepickerMax]="maxDate()"
|
|
1759
|
+
[readonly]="readonly()"
|
|
1346
1760
|
[required]="isRequired()"
|
|
1347
1761
|
[placeholder]="translatedPlaceholder()"
|
|
1348
|
-
[
|
|
1762
|
+
[attr.aria-label]="ariaLabel() ?? translatedLabel()"
|
|
1763
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
1764
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1765
|
+
[attr.autocomplete]="autocomplete()"
|
|
1349
1766
|
[formControl]="displayControl"
|
|
1350
1767
|
(blur)="onFocusOut()"
|
|
1351
1768
|
(focus)="onFocusIn()"
|
|
@@ -1396,5 +1813,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1396
1813
|
* Generated bundle index. Do not edit.
|
|
1397
1814
|
*/
|
|
1398
1815
|
|
|
1399
|
-
export { MatFormControlBase, MatInputDatepickerComponent, MatInputLookupComponent, MatInputNumberComponent, MatInputSelectComponent, MatInputTextComponent, MatInputTextareaComponent, MatInputTimepickerComponent, NMF_MATERIAL_CONFIG, provideNmfMaterialConfig };
|
|
1816
|
+
export { MatFormControlBase, MatInputDatepickerComponent, MatInputFileSelectorComponent, MatInputLookupComponent, MatInputNumberComponent, MatInputRangeComponent, MatInputSelectComponent, MatInputTextComponent, MatInputTextareaComponent, MatInputTimepickerComponent, NMF_MATERIAL_CONFIG, provideNmfMaterialConfig };
|
|
1400
1817
|
//# sourceMappingURL=ng-modular-forms-material.mjs.map
|