@ng-formworks/material 15.5.1 → 15.5.6

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.
@@ -1287,6 +1287,10 @@ class MaterialInputComponent {
1287
1287
  this.boundControl = false;
1288
1288
  this.autoCompleteList = [];
1289
1289
  }
1290
+ //needed as templates don't accept something like [attributes]="options?.['x-inputAttributes']"
1291
+ get inputAttributes() {
1292
+ return this.options?.['x-inputAttributes'];
1293
+ }
1290
1294
  ngOnInit() {
1291
1295
  this.options = this.layoutNode.options || {};
1292
1296
  this.jsf.initializeControl(this);
@@ -1320,10 +1324,10 @@ MaterialInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
1320
1324
  [name]="controlName"
1321
1325
  [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1322
1326
  [required]="options?.required"
1323
- [style.width]="'100%'"
1324
1327
  [type]="layoutNode?.type"
1325
- (blur)="options.showErrors = true">
1326
- <input matInput *ngIf="!boundControl"
1328
+ (blur)="options.showErrors = true"
1329
+ [attributes]="inputAttributes">
1330
+ <input #input matInput *ngIf="!boundControl"
1327
1331
  [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1328
1332
  [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1329
1333
  [attr.maxlength]="options?.maxLength"
@@ -1339,7 +1343,9 @@ MaterialInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
1339
1343
  [type]="layoutNode?.type"
1340
1344
  [value]="controlValue"
1341
1345
  (input)="updateValue($event)"
1342
- (blur)="options.showErrors = true">
1346
+ (blur)="options.showErrors = true"
1347
+ [attributes]="inputAttributes"
1348
+ >
1343
1349
  <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1344
1350
  [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1345
1351
  <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"
@@ -1353,7 +1359,7 @@ MaterialInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
1353
1359
  </button>
1354
1360
  </mat-form-field>
1355
1361
  <mat-error *ngIf="options?.showErrors && options?.errorMessage"
1356
- [innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-mdc-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:initial}input{width:100%}input[type=datetime-local]{width:120%}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$3.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i3$3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$3.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] });
1362
+ [innerHTML]="options?.errorMessage"></mat-error>`, isInline: true, styles: ["mat-error{font-size:75%;margin-top:-1rem;margin-bottom:.5rem}::ng-deep json-schema-form mat-form-field .mat-mdc-form-field-wrapper .mat-form-field-flex .mat-form-field-infix{width:initial}input{width:100%}input[type=datetime-local]{width:120%}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$3.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i3$3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$3.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i3$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i1.ElementAttributeDirective, selector: "[attributes]", inputs: ["attributes"] }] });
1357
1363
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialInputComponent, decorators: [{
1358
1364
  type: Component,
1359
1365
  args: [{ selector: 'material-input-widget', template: `
@@ -1377,10 +1383,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1377
1383
  [name]="controlName"
1378
1384
  [placeholder]="options?.notitle ? options?.placeholder : options?.title"
1379
1385
  [required]="options?.required"
1380
- [style.width]="'100%'"
1381
1386
  [type]="layoutNode?.type"
1382
- (blur)="options.showErrors = true">
1383
- <input matInput *ngIf="!boundControl"
1387
+ (blur)="options.showErrors = true"
1388
+ [attributes]="inputAttributes">
1389
+ <input #input matInput *ngIf="!boundControl"
1384
1390
  [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
1385
1391
  [attr.list]="'control' + layoutNode?._id + 'Autocomplete'"
1386
1392
  [attr.maxlength]="options?.maxLength"
@@ -1396,7 +1402,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1396
1402
  [type]="layoutNode?.type"
1397
1403
  [value]="controlValue"
1398
1404
  (input)="updateValue($event)"
1399
- (blur)="options.showErrors = true">
1405
+ (blur)="options.showErrors = true"
1406
+ [attributes]="inputAttributes"
1407
+ >
1400
1408
  <span matSuffix *ngIf="options?.suffix || options?.fieldAddonRight"
1401
1409
  [innerHTML]="options?.suffix || options?.fieldAddonRight"></span>
1402
1410
  <mat-hint *ngIf="options?.description && (!options?.showErrors || !options?.errorMessage)"