ngx-render-material-forms 1.0.5 → 1.0.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.
@@ -128,6 +128,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
128
128
  ` }]
129
129
  }], ctorParameters: function () { return []; } });
130
130
 
131
+ console.log('Webform=>', Webform);
131
132
  Webform.prototype.redraw = function () {
132
133
  return this.render();
133
134
  };
@@ -495,9 +496,18 @@ class MaterialTextfieldComponent extends MaterialComponent {
495
496
  getErrorMessage() {
496
497
  if (this.instance.error && this.instance.error.messages) {
497
498
  const { messages } = this.instance.error;
498
- for (const msg of messages) {
499
- if (msg.context && this.control.hasError(msg.context.validator)) {
500
- return this.instance.error.message;
499
+ if (messages.length) {
500
+ for (const msg of messages) {
501
+ //this.control.hasError(msg.context.validator)
502
+ if (this.instance.type == 'phoneNumber' || this.instance.type == 'email') {
503
+ this.phoneNumberAndEmail = true;
504
+ }
505
+ else {
506
+ this.phoneNumberAndEmail = this.control.hasError(msg.context.validator);
507
+ }
508
+ if (msg.context && this.phoneNumberAndEmail) {
509
+ return this.instance.error.message;
510
+ }
501
511
  }
502
512
  }
503
513
  }
@@ -1838,20 +1848,8 @@ class MaterialDateComponent extends MaterialComponent {
1838
1848
  return !formattedDates.includes(momentDate(d).format('YYYY-MM-DD'));
1839
1849
  }
1840
1850
  clickOutside(event) {
1841
- if (this.isPickerOpened && (event.target.classList.value == "mat-calendar-body-cell-content mat-focus-indicator mat-calendar-body-today" || event.target.classList.value == "mat-calendar-body" || event.target.classList.value == "mat-calendar-body-cell mat-calendar-body-active" || event.target.classList.value == '' || event.target.classList.value == "mat-calendar-body-label" || event.target.classList.value == "mat-calendar-table-header-divider" || event.target.classList.value == "mat-calendar-controls" || event.target.classList.value == "mat-button-wrapper" || event.target.classList.value == "mat-calendar-header" || event.target.classList.value == "mat-calendar-arrow mat-calendar-invert" || event.target.classList.value == "mat-calendar-content cdk-focused cdk-mouse-focused" || event.target.classList.value == "mat-calendar calendar ng-star-inserted" || event.target.classList.value == "mat-focus-indicator mat-calendar-period-button mat-button mat-button-base cdk-focused cdk-mouse-focused" || event.target.classList.value == 'mat-calendar-body-cell-content mat-focus-indicator' || event.target.classList.value == "mat-focus-indicator mat-calendar-next-button mat-icon-button mat-button-base cdk-focused cdk-mouse-focused" || event.target.classList.value == "mat-focus-indicator mat-calendar-previous-button mat-icon-button mat-button-base cdk-focused cdk-mouse-focused")) {
1842
- this.isPickerOpened = true;
1843
- }
1844
- else {
1845
- if (event.target.classList.value == 'mat-calendar-body-cell-content mat-focus-indicator mat-calendar-body-selected' && this.isPickerOpened) {
1846
- this.toggleCalendar(event);
1847
- }
1848
- else {
1849
- this.isPickerOpened = false;
1850
- }
1851
- }
1852
- // if (event.target.classList.contains('mat-calendar-body-selected') && this.isPickerOpened) {
1853
- // this.toggleCalendar(event);
1854
- // }
1851
+ if (event.target.classList.contains('mat-calendar-body-selected') && this.isPickerOpened)
1852
+ this.toggleCalendar(event);
1855
1853
  }
1856
1854
  improveMinMaxDate(minDate, maxDate) {
1857
1855
  if (minDate && minDate.length === 4) {
@@ -1864,63 +1862,63 @@ class MaterialDateComponent extends MaterialComponent {
1864
1862
  }
1865
1863
  }
1866
1864
  MaterialDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialDateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1867
- MaterialDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialDateComponent, selector: "mat-formio-date", host: { listeners: { "document:click": "clickOutside($event)" } }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
1868
- <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
1869
- <ng-template #componentTemplate let-hasLabel>
1870
- <mat-label *ngIf="hasLabel" fxFill>
1871
- <span [instance]="instance" matFormioLabel></span>
1872
- </mat-label>
1873
-
1874
- <form class="example-form">
1875
- <mat-datepicker-toggle [disabled]="isDisabled()" (click)="toggleCalendar($event)">
1876
- <mat-icon matDatepickerToggleIcon *ngIf="enableTime && !enableDate">schedule</mat-icon>
1877
- </mat-datepicker-toggle>
1878
- <mat-form-field class="example-full-width">
1879
- <input
1880
- *ngIf="enableTime && enableDate"
1881
- matInput
1882
- type="datetime-local"
1883
- [placeholder]="instance.component.placeholder"
1884
- [formControl]="displayControl"
1885
- (input)="onChangeInput()"
1886
- [readonly]="!allowManualInput"
1887
- >
1888
- <input
1889
- *ngIf="enableTime && !enableDate"
1890
- matInput
1891
- [placeholder]="instance.component.placeholder"
1892
- [formControl]="displayControl"
1893
- [matMask]="formatTime"
1894
- (input)="onChangeInput()"
1895
- [readonly]="!allowManualInput"
1896
- >
1897
- <input
1898
- *ngIf="!enableTime && enableDate"
1899
- matInput
1900
- [placeholder]="instance.component.placeholder"
1901
- [formControl]="displayControl"
1902
- (input)="onChangeInput()"
1903
- [readonly]="!allowManualInput"
1904
- >
1905
- </mat-form-field>
1906
-
1907
- <mat-formio-calendar
1908
- #calendar
1909
- [minDate]="instance.component.datePicker.minDate || ''"
1910
- [maxDate]="instance.component.datePicker.maxDate || ''"
1911
- [dateFilter]="dateFilter"
1912
- [hidden]="!isPickerOpened"
1913
- (dateSelectEvent)="onChangeDate($event)"
1914
- (timeSelectEvent)="onChangeTime($event)"
1915
- [enableDate]="enableDate"
1916
- [enableTime]="enableTime"
1917
- [hourStep]="instance.component.timePicker.hourStep"
1918
- [minuteStep]="instance.component.timePicker.minuteStep"
1919
- [instance]="instance"
1920
- ></mat-formio-calendar>
1921
- <mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
1922
- </form>
1923
- </ng-template>
1865
+ MaterialDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialDateComponent, selector: "mat-formio-date", host: { listeners: { "document:click": "clickOutside($event)" } }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
1866
+ <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
1867
+ <ng-template #componentTemplate let-hasLabel>
1868
+ <mat-label *ngIf="hasLabel" fxFill>
1869
+ <span [instance]="instance" matFormioLabel></span>
1870
+ </mat-label>
1871
+
1872
+ <form class="example-form">
1873
+ <mat-datepicker-toggle [disabled]="isDisabled()" (click)="toggleCalendar($event)">
1874
+ <mat-icon matDatepickerToggleIcon *ngIf="enableTime && !enableDate">schedule</mat-icon>
1875
+ </mat-datepicker-toggle>
1876
+ <mat-form-field class="example-full-width">
1877
+ <input
1878
+ *ngIf="enableTime && enableDate"
1879
+ matInput
1880
+ type="datetime-local"
1881
+ [placeholder]="instance.component.placeholder"
1882
+ [formControl]="displayControl"
1883
+ (input)="onChangeInput()"
1884
+ [readonly]="!allowManualInput"
1885
+ >
1886
+ <input
1887
+ *ngIf="enableTime && !enableDate"
1888
+ matInput
1889
+ [placeholder]="instance.component.placeholder"
1890
+ [formControl]="displayControl"
1891
+ [matMask]="formatTime"
1892
+ (input)="onChangeInput()"
1893
+ [readonly]="!allowManualInput"
1894
+ >
1895
+ <input
1896
+ *ngIf="!enableTime && enableDate"
1897
+ matInput
1898
+ [placeholder]="instance.component.placeholder"
1899
+ [formControl]="displayControl"
1900
+ (input)="onChangeInput()"
1901
+ [readonly]="!allowManualInput"
1902
+ >
1903
+ </mat-form-field>
1904
+
1905
+ <mat-formio-calendar
1906
+ #calendar
1907
+ [minDate]="instance.component.datePicker.minDate || ''"
1908
+ [maxDate]="instance.component.datePicker.maxDate || ''"
1909
+ [dateFilter]="dateFilter"
1910
+ [hidden]="!isPickerOpened"
1911
+ (dateSelectEvent)="onChangeDate($event)"
1912
+ (timeSelectEvent)="onChangeTime($event)"
1913
+ [enableDate]="enableDate"
1914
+ [enableTime]="enableTime"
1915
+ [hourStep]="instance.component.timePicker.hourStep"
1916
+ [minuteStep]="instance.component.timePicker.minuteStep"
1917
+ [instance]="instance"
1918
+ ></mat-formio-calendar>
1919
+ <mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
1920
+ </form>
1921
+ </ng-template>
1924
1922
  `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$3.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: "component", type: i5$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i5$2.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: MaterialCalendarComponent, selector: "mat-formio-calendar", inputs: ["enableDate", "enableTime", "minDate", "maxDate", "dateFilter", "hourStep", "minuteStep"], outputs: ["timeSelectEvent", "dateSelectEvent"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }, { kind: "directive", type: MaskDirective, selector: "input[matMask]", inputs: ["matMask", "value"] }] });
1925
1923
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialDateComponent, decorators: [{
1926
1924
  type: Component,
@@ -1929,63 +1927,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1929
1927
  host: {
1930
1928
  '(document:click)': 'clickOutside($event)',
1931
1929
  },
1932
- template: `
1933
- <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
1934
- <ng-template #componentTemplate let-hasLabel>
1935
- <mat-label *ngIf="hasLabel" fxFill>
1936
- <span [instance]="instance" matFormioLabel></span>
1937
- </mat-label>
1938
-
1939
- <form class="example-form">
1940
- <mat-datepicker-toggle [disabled]="isDisabled()" (click)="toggleCalendar($event)">
1941
- <mat-icon matDatepickerToggleIcon *ngIf="enableTime && !enableDate">schedule</mat-icon>
1942
- </mat-datepicker-toggle>
1943
- <mat-form-field class="example-full-width">
1944
- <input
1945
- *ngIf="enableTime && enableDate"
1946
- matInput
1947
- type="datetime-local"
1948
- [placeholder]="instance.component.placeholder"
1949
- [formControl]="displayControl"
1950
- (input)="onChangeInput()"
1951
- [readonly]="!allowManualInput"
1952
- >
1953
- <input
1954
- *ngIf="enableTime && !enableDate"
1955
- matInput
1956
- [placeholder]="instance.component.placeholder"
1957
- [formControl]="displayControl"
1958
- [matMask]="formatTime"
1959
- (input)="onChangeInput()"
1960
- [readonly]="!allowManualInput"
1961
- >
1962
- <input
1963
- *ngIf="!enableTime && enableDate"
1964
- matInput
1965
- [placeholder]="instance.component.placeholder"
1966
- [formControl]="displayControl"
1967
- (input)="onChangeInput()"
1968
- [readonly]="!allowManualInput"
1969
- >
1970
- </mat-form-field>
1971
-
1972
- <mat-formio-calendar
1973
- #calendar
1974
- [minDate]="instance.component.datePicker.minDate || ''"
1975
- [maxDate]="instance.component.datePicker.maxDate || ''"
1976
- [dateFilter]="dateFilter"
1977
- [hidden]="!isPickerOpened"
1978
- (dateSelectEvent)="onChangeDate($event)"
1979
- (timeSelectEvent)="onChangeTime($event)"
1980
- [enableDate]="enableDate"
1981
- [enableTime]="enableTime"
1982
- [hourStep]="instance.component.timePicker.hourStep"
1983
- [minuteStep]="instance.component.timePicker.minuteStep"
1984
- [instance]="instance"
1985
- ></mat-formio-calendar>
1986
- <mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
1987
- </form>
1988
- </ng-template>
1930
+ template: `
1931
+ <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
1932
+ <ng-template #componentTemplate let-hasLabel>
1933
+ <mat-label *ngIf="hasLabel" fxFill>
1934
+ <span [instance]="instance" matFormioLabel></span>
1935
+ </mat-label>
1936
+
1937
+ <form class="example-form">
1938
+ <mat-datepicker-toggle [disabled]="isDisabled()" (click)="toggleCalendar($event)">
1939
+ <mat-icon matDatepickerToggleIcon *ngIf="enableTime && !enableDate">schedule</mat-icon>
1940
+ </mat-datepicker-toggle>
1941
+ <mat-form-field class="example-full-width">
1942
+ <input
1943
+ *ngIf="enableTime && enableDate"
1944
+ matInput
1945
+ type="datetime-local"
1946
+ [placeholder]="instance.component.placeholder"
1947
+ [formControl]="displayControl"
1948
+ (input)="onChangeInput()"
1949
+ [readonly]="!allowManualInput"
1950
+ >
1951
+ <input
1952
+ *ngIf="enableTime && !enableDate"
1953
+ matInput
1954
+ [placeholder]="instance.component.placeholder"
1955
+ [formControl]="displayControl"
1956
+ [matMask]="formatTime"
1957
+ (input)="onChangeInput()"
1958
+ [readonly]="!allowManualInput"
1959
+ >
1960
+ <input
1961
+ *ngIf="!enableTime && enableDate"
1962
+ matInput
1963
+ [placeholder]="instance.component.placeholder"
1964
+ [formControl]="displayControl"
1965
+ (input)="onChangeInput()"
1966
+ [readonly]="!allowManualInput"
1967
+ >
1968
+ </mat-form-field>
1969
+
1970
+ <mat-formio-calendar
1971
+ #calendar
1972
+ [minDate]="instance.component.datePicker.minDate || ''"
1973
+ [maxDate]="instance.component.datePicker.maxDate || ''"
1974
+ [dateFilter]="dateFilter"
1975
+ [hidden]="!isPickerOpened"
1976
+ (dateSelectEvent)="onChangeDate($event)"
1977
+ (timeSelectEvent)="onChangeTime($event)"
1978
+ [enableDate]="enableDate"
1979
+ [enableTime]="enableTime"
1980
+ [hourStep]="instance.component.timePicker.hourStep"
1981
+ [minuteStep]="instance.component.timePicker.minuteStep"
1982
+ [instance]="instance"
1983
+ ></mat-formio-calendar>
1984
+ <mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
1985
+ </form>
1986
+ </ng-template>
1989
1987
  `
1990
1988
  }]
1991
1989
  }], propDecorators: { calendar: [{
@@ -2518,7 +2516,7 @@ class MaterialSelectComponent extends MaterialComponent {
2518
2516
  let search = this.websiteMultiFilterCtrl.value;
2519
2517
  search = search.toLowerCase();
2520
2518
  this.filteredOptions = this.selectOptions.then((options) => {
2521
- const filtered = options.filter((option) => option.label.replace(/<\/?span[^>]*>/g, "").toLowerCase().indexOf(search) !== -1);
2519
+ const filtered = options.filter((option) => option.label.toLowerCase().indexOf(search) !== -1);
2522
2520
  this.filteredOptionsLength = filtered.length;
2523
2521
  return filtered;
2524
2522
  });
@@ -2562,101 +2560,101 @@ class MaterialSelectComponent extends MaterialComponent {
2562
2560
  }
2563
2561
  }
2564
2562
  MaterialSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2565
- MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialSelectComponent, selector: "mat-formio-select", viewQueries: [{ propertyName: "multiSelect", first: true, predicate: ["multiSelect"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
2566
- <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
2567
- <ng-template #componentTemplate let-hasLabel>
2568
- <mat-form-field fxFill>
2569
-
2570
- <mat-label *ngIf="hasLabel">
2571
- <span [instance]="instance" matFormioLabel></span>
2572
- </mat-label>
2573
-
2574
- <span *ngIf="instance.component.prefix" matPrefix>
2575
- {{ instance.component.prefix }}&nbsp;
2576
- </span>
2577
- <mat-select
2578
- [multiple]="instance.component.multiple"
2579
- [formControl]="control"
2580
- [placeholder]="instance.component.placeholder"
2581
- (selectionChange)="onChange()"
2582
- [compareWith]="compareObjects"
2583
- >
2584
-
2585
- <mat-option>
2586
- <ngx-mat-select-search placeholderLabel="Type to search" [formControl]="websiteMultiFilterCtrl"></ngx-mat-select-search>
2587
- </mat-option>
2588
-
2589
- <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
2590
- <span [innerHTML]="option.label"></span>
2591
- </mat-option>
2592
-
2593
- <!-- <div class="mat-option">
2594
- <input class="mat-input-element" placeholder="Type to search the risk" (input)="onFilter($event.target.value)">
2595
- </div> -->
2596
- <mat-option *ngIf="!filteredOptionsLength" disabled>
2597
- <span>Nothing was found</span>
2598
- </mat-option>
2599
- <!-- <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
2600
- <span [innerHTML]="option.label"></span>
2601
- </mat-option> -->
2602
- </mat-select>
2603
-
2604
- <span *ngIf="instance.component.suffix" matSuffix>
2605
- {{ instance.component.suffix }}
2606
- </span>
2607
- <mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
2608
- </mat-form-field>
2609
- </ng-template>
2563
+ MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialSelectComponent, selector: "mat-formio-select", viewQueries: [{ propertyName: "multiSelect", first: true, predicate: ["multiSelect"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
2564
+ <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
2565
+ <ng-template #componentTemplate let-hasLabel>
2566
+ <mat-form-field fxFill>
2567
+
2568
+ <mat-label *ngIf="hasLabel">
2569
+ <span [instance]="instance" matFormioLabel></span>
2570
+ </mat-label>
2571
+
2572
+ <span *ngIf="instance.component.prefix" matPrefix>
2573
+ {{ instance.component.prefix }}&nbsp;
2574
+ </span>
2575
+ <mat-select
2576
+ [multiple]="instance.component.multiple"
2577
+ [formControl]="control"
2578
+ [placeholder]="instance.component.placeholder"
2579
+ (selectionChange)="onChange()"
2580
+ [compareWith]="compareObjects"
2581
+ >
2582
+
2583
+ <mat-option>
2584
+ <ngx-mat-select-search placeholderLabel="Type to search" [formControl]="websiteMultiFilterCtrl"></ngx-mat-select-search>
2585
+ </mat-option>
2586
+
2587
+ <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
2588
+ <span [innerHTML]="option.label"></span>
2589
+ </mat-option>
2590
+
2591
+ <!-- <div class="mat-option">
2592
+ <input class="mat-input-element" placeholder="Type to search the risk" (input)="onFilter($event.target.value)">
2593
+ </div> -->
2594
+ <mat-option *ngIf="!filteredOptionsLength" disabled>
2595
+ <span>Nothing was found</span>
2596
+ </mat-option>
2597
+ <!-- <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
2598
+ <span [innerHTML]="option.label"></span>
2599
+ </mat-option> -->
2600
+ </mat-select>
2601
+
2602
+ <span *ngIf="instance.component.suffix" matSuffix>
2603
+ {{ instance.component.suffix }}
2604
+ </span>
2605
+ <mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
2606
+ </mat-form-field>
2607
+ </ng-template>
2610
2608
  `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i4$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: i7.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "indexAndLengthScreenReaderText", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toogleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
2611
2609
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialSelectComponent, decorators: [{
2612
2610
  type: Component,
2613
2611
  args: [{
2614
2612
  selector: 'mat-formio-select',
2615
- template: `
2616
- <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
2617
- <ng-template #componentTemplate let-hasLabel>
2618
- <mat-form-field fxFill>
2619
-
2620
- <mat-label *ngIf="hasLabel">
2621
- <span [instance]="instance" matFormioLabel></span>
2622
- </mat-label>
2623
-
2624
- <span *ngIf="instance.component.prefix" matPrefix>
2625
- {{ instance.component.prefix }}&nbsp;
2626
- </span>
2627
- <mat-select
2628
- [multiple]="instance.component.multiple"
2629
- [formControl]="control"
2630
- [placeholder]="instance.component.placeholder"
2631
- (selectionChange)="onChange()"
2632
- [compareWith]="compareObjects"
2633
- >
2634
-
2635
- <mat-option>
2636
- <ngx-mat-select-search placeholderLabel="Type to search" [formControl]="websiteMultiFilterCtrl"></ngx-mat-select-search>
2637
- </mat-option>
2638
-
2639
- <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
2640
- <span [innerHTML]="option.label"></span>
2641
- </mat-option>
2642
-
2643
- <!-- <div class="mat-option">
2644
- <input class="mat-input-element" placeholder="Type to search the risk" (input)="onFilter($event.target.value)">
2645
- </div> -->
2646
- <mat-option *ngIf="!filteredOptionsLength" disabled>
2647
- <span>Nothing was found</span>
2648
- </mat-option>
2649
- <!-- <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
2650
- <span [innerHTML]="option.label"></span>
2651
- </mat-option> -->
2652
- </mat-select>
2653
-
2654
- <span *ngIf="instance.component.suffix" matSuffix>
2655
- {{ instance.component.suffix }}
2656
- </span>
2657
- <mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
2658
- </mat-form-field>
2659
- </ng-template>
2613
+ template: `
2614
+ <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
2615
+ <ng-template #componentTemplate let-hasLabel>
2616
+ <mat-form-field fxFill>
2617
+
2618
+ <mat-label *ngIf="hasLabel">
2619
+ <span [instance]="instance" matFormioLabel></span>
2620
+ </mat-label>
2621
+
2622
+ <span *ngIf="instance.component.prefix" matPrefix>
2623
+ {{ instance.component.prefix }}&nbsp;
2624
+ </span>
2625
+ <mat-select
2626
+ [multiple]="instance.component.multiple"
2627
+ [formControl]="control"
2628
+ [placeholder]="instance.component.placeholder"
2629
+ (selectionChange)="onChange()"
2630
+ [compareWith]="compareObjects"
2631
+ >
2632
+
2633
+ <mat-option>
2634
+ <ngx-mat-select-search placeholderLabel="Type to search" [formControl]="websiteMultiFilterCtrl"></ngx-mat-select-search>
2635
+ </mat-option>
2636
+
2637
+ <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
2638
+ <span [innerHTML]="option.label"></span>
2639
+ </mat-option>
2640
+
2641
+ <!-- <div class="mat-option">
2642
+ <input class="mat-input-element" placeholder="Type to search the risk" (input)="onFilter($event.target.value)">
2643
+ </div> -->
2644
+ <mat-option *ngIf="!filteredOptionsLength" disabled>
2645
+ <span>Nothing was found</span>
2646
+ </mat-option>
2647
+ <!-- <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
2648
+ <span [innerHTML]="option.label"></span>
2649
+ </mat-option> -->
2650
+ </mat-select>
2651
+
2652
+ <span *ngIf="instance.component.suffix" matSuffix>
2653
+ {{ instance.component.suffix }}
2654
+ </span>
2655
+ <mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
2656
+ </mat-form-field>
2657
+ </ng-template>
2660
2658
  `
2661
2659
  }]
2662
2660
  }], propDecorators: { multiSelect: [{