ngx-render-material-forms 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Component, Input, ViewChild, ViewContainerRef, ViewChildren, EventEmitter, Output, forwardRef, Directive, Optional, NgModule } from '@angular/core';
3
+ import * as i1$1 from '@angular/common/http';
4
+ import { HttpHeaders, HttpClientModule } from '@angular/common/http';
3
5
  import * as i1 from '@angular/common';
4
6
  import { CommonModule } from '@angular/common';
5
7
  import * as i2 from '@angular/forms';
@@ -35,7 +37,7 @@ import * as i4$1 from '@angular/material/icon';
35
37
  import { MatIconModule } from '@angular/material/icon';
36
38
  import * as i5$1 from '@angular/material/core';
37
39
  import { MatNativeDateModule } from '@angular/material/core';
38
- import * as i1$1 from '@angular/material/dialog';
40
+ import * as i1$2 from '@angular/material/dialog';
39
41
  import { MatDialogModule } from '@angular/material/dialog';
40
42
  import Webform from 'formiojs/Webform.js';
41
43
  import FormioComponent$2 from 'formiojs/components/_classes/component/Component.js';
@@ -79,9 +81,9 @@ import RadioComponent from 'formiojs/components/radio/Radio.js';
79
81
  import SelectBoxesComponent from 'formiojs/components/selectboxes/SelectBoxes.js';
80
82
  import SelectComponent from 'formiojs/components/select/Select.js';
81
83
  import { Subject } from 'rxjs';
82
- import { takeUntil } from 'rxjs/operators';
83
- import * as i7 from '@angular/cdk/scrolling';
84
- import { ScrollingModule } from '@angular/cdk/scrolling';
84
+ import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';
85
+ import * as CryptoJS from 'crypto-js';
86
+ import { isNullOrUndefined } from 'util';
85
87
  import * as i8 from 'ngx-mat-select-search';
86
88
  import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
87
89
  import WellComponent from 'formiojs/components/well/Well.js';
@@ -96,9 +98,10 @@ import Wizard from 'formiojs/Wizard';
96
98
  import Displays from 'formiojs/displays/Displays';
97
99
  import * as i3$2 from '@angular/material/stepper';
98
100
  import { MatStepperModule } from '@angular/material/stepper';
99
- import * as i1$2 from '@formio/angular';
101
+ import * as i1$3 from '@formio/angular';
100
102
  import { FormioBaseComponent } from '@formio/angular';
101
103
  import { FlexLayoutModule } from '@angular/flex-layout';
104
+ import { ScrollingModule } from '@angular/cdk/scrolling';
102
105
 
103
106
  class NgxRenderMaterialFormsService {
104
107
  constructor() { }
@@ -2519,11 +2522,146 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2519
2522
  SelectBoxesComponent.MaterialComponent = MaterialSelectBoxesComponent;
2520
2523
 
2521
2524
  class MaterialSelectComponent extends MaterialComponent {
2522
- constructor() {
2523
- super(...arguments);
2525
+ constructor(element, ref, http) {
2526
+ super(element, ref);
2527
+ this.element = element;
2528
+ this.ref = ref;
2529
+ this.http = http;
2524
2530
  this.websiteMultiCtrl = new FormControl();
2525
2531
  this.websiteMultiFilterCtrl = new FormControl();
2526
2532
  this._onDestroy = new Subject();
2533
+ // Variables to track pagination
2534
+ this.pageNumber = 1;
2535
+ this.pageSize = 3;
2536
+ this.totalPages = 3;
2537
+ this.searchQuery = '';
2538
+ this.holy = '';
2539
+ this.grail = '';
2540
+ this.productsloadingFlag = false;
2541
+ this.searchFlag = true;
2542
+ this.holy = CryptoJS.enc.Base64.parse('8F/2+T2NXqUBQERR12R4sw==');
2543
+ this.grail = CryptoJS.enc.Base64.parse('yE0CgQbYzK5wqeoKTVzhOQ==');
2544
+ }
2545
+ onSearchInputChange(value) {
2546
+ if (value === '') {
2547
+ this.onClearAll();
2548
+ }
2549
+ }
2550
+ onChange(event) {
2551
+ if (event) {
2552
+ this.searchFlag = false;
2553
+ }
2554
+ }
2555
+ scrumble(msg) {
2556
+ if (!isNullOrUndefined(msg)) {
2557
+ var conceal = this.getcampaign(msg, this.holy, this.grail);
2558
+ var sha256 = CryptoJS.HmacSHA256(CryptoJS.enc.Base64.stringify(this.grail) + conceal.toString(), CryptoJS.enc.Base64.stringify(this.holy));
2559
+ var hashInBase64 = CryptoJS.enc.Base64.stringify(sha256);
2560
+ let keyValue = {
2561
+ "value": conceal.toString(),
2562
+ "mac": hashInBase64
2563
+ };
2564
+ var result = JSON.stringify(keyValue);
2565
+ var jumbled = CryptoJS.enc.Utf8.parse(result);
2566
+ return CryptoJS.enc.Base64.stringify(jumbled);
2567
+ }
2568
+ }
2569
+ getcampaign(data, holy, grail) {
2570
+ return CryptoJS.AES.encrypt(data.toString(), holy, {
2571
+ blockSize: 128,
2572
+ iv: grail,
2573
+ mode: CryptoJS.mode.CBC,
2574
+ padding: CryptoJS.pad.Pkcs7
2575
+ });
2576
+ }
2577
+ // Method to handle when the mat-select is opened
2578
+ onMatSelectOpen(select) {
2579
+ this.selectElem = select;
2580
+ this.registerPanelScrollEvent();
2581
+ }
2582
+ registerPanelScrollEvent() {
2583
+ if (this.selectElem) {
2584
+ this.selectElem.panel.nativeElement.addEventListener('scroll', this.onScroll.bind(this));
2585
+ }
2586
+ }
2587
+ onScroll(event) {
2588
+ if (this.instance.component.key.toLowerCase() === 'vendorproductid') {
2589
+ const scrollElement = event.target;
2590
+ const trackHeight = scrollElement.scrollHeight - scrollElement.offsetHeight;
2591
+ if (this.productsloadingFlag && Math.floor(scrollElement.scrollTop / trackHeight * 100) > 50) {
2592
+ this.productsloadingFlag = false;
2593
+ if (this.pageNumber < this.totalPages && this.totalPages > 1) {
2594
+ this.pageNumber = this.pageNumber + 1;
2595
+ this.loadData(this.pageNumber, this.pageSize, this.searchQuery);
2596
+ }
2597
+ }
2598
+ }
2599
+ }
2600
+ // Function to get value by key from the array
2601
+ getValueByKey(data, key) {
2602
+ if (!data || data.length === 0) {
2603
+ return null; // Return null if data is empty or undefined
2604
+ }
2605
+ const item = data.find(kv => kv.key.toLowerCase() === key.toLowerCase());
2606
+ return item ? item.value : null;
2607
+ }
2608
+ loadData(pageNumber, pageSize, searchQuery) {
2609
+ const paramsData = JSON.parse(localStorage.getItem('productPicker'));
2610
+ const includeDescription = this.getValueByKey(paramsData, 'includeDescription');
2611
+ const vendorId = this.getValueByKey(paramsData, 'vendorId');
2612
+ const onlyActive = this.getValueByKey(paramsData, 'onlyActive');
2613
+ var currentUser = JSON.parse(localStorage.getItem('currentUser'));
2614
+ var accessToken = currentUser.Tokens.AccessToken;
2615
+ const headers = new HttpHeaders({
2616
+ 'Content-Type': 'application/json',
2617
+ 'Authorization': 'Bearer ' + accessToken
2618
+ });
2619
+ const envendorId = this.scrumble(vendorId);
2620
+ const enpageNumber = this.scrumble(pageNumber);
2621
+ const enpageSize = this.scrumble(pageSize);
2622
+ const ensearchQuery = this.scrumble(searchQuery);
2623
+ const enactive = this.scrumble(onlyActive);
2624
+ const endescription = this.scrumble(includeDescription);
2625
+ const baseUrlMapping = {
2626
+ 'localhost': 'http://localhost:58504',
2627
+ 'lincoln.vartopia.com': 'https://lincoln-api.vartopia.com',
2628
+ 'stage.vartopia.com': 'https://stage-api.vartopia.com',
2629
+ 'my.vartopia.com': 'https://reagan-api.vartopia.com',
2630
+ 'jackson.vartopia.com': 'https://jackson-api.vartopia.com'
2631
+ };
2632
+ // Get the current hostname
2633
+ const hostname = window.location.hostname;
2634
+ const baseApiUrl = baseUrlMapping[hostname] || null;
2635
+ this.http.get(`${baseApiUrl}/api/VendorFormBuilder/GetVendorProducts?vendorId=${envendorId}&pageNumber=${enpageNumber}&pageSize=${enpageSize}&search=${ensearchQuery}&onlyActive=${enactive}&includeDescription=${endescription}`, { headers }).subscribe(response => {
2636
+ if (response && response.code === 200) {
2637
+ this.totalPages = response.data.dataSource;
2638
+ const transformedData = this.transformResponseData(response.data.dataSource);
2639
+ // Process the transformed data
2640
+ this.filteredOptions = Promise.resolve(transformedData.map(item => ({
2641
+ label: item.label,
2642
+ value: item.value,
2643
+ date: item.date
2644
+ })));
2645
+ setTimeout(() => {
2646
+ this.productsloadingFlag = true;
2647
+ }, 1000);
2648
+ }
2649
+ });
2650
+ }
2651
+ // Utility function to transform response data
2652
+ transformResponseData(data) {
2653
+ // Check if data is not null, undefined, and is an array with elements
2654
+ if (data && Array.isArray(data) && data.length > 0) {
2655
+ return data.map(item => ({
2656
+ label: item.text,
2657
+ value: item.value,
2658
+ date: item.date
2659
+ }));
2660
+ }
2661
+ else {
2662
+ // Return an empty array if data is null, undefined, or empty
2663
+ return [];
2664
+ }
2527
2665
  }
2528
2666
  filterWebsiteMulti() {
2529
2667
  if (!this.selectOptions) {
@@ -2546,13 +2684,42 @@ class MaterialSelectComponent extends MaterialComponent {
2546
2684
  super.setInstance(instance);
2547
2685
  this.instance.triggerUpdate();
2548
2686
  }
2687
+ onClearAll() {
2688
+ if (this.searchFlag) {
2689
+ this.loadData(1, 20, '');
2690
+ }
2691
+ }
2692
+ ngAfterViewInit() {
2693
+ this.selectElem.openedChange.subscribe((isOpen) => {
2694
+ if (isOpen) {
2695
+ this.searchFlag = false;
2696
+ this.loadData(1, 20, '');
2697
+ }
2698
+ else {
2699
+ this.searchFlag = false;
2700
+ }
2701
+ });
2702
+ }
2549
2703
  ngOnInit() {
2550
2704
  /*new logic */
2551
- this.websiteMultiFilterCtrl.valueChanges
2552
- .pipe(takeUntil(this._onDestroy))
2553
- .subscribe(() => {
2554
- this.filterWebsiteMulti();
2555
- });
2705
+ if (this.instance.component.key.toLowerCase() === 'vendorproductid') {
2706
+ this.websiteMultiFilterCtrl.valueChanges
2707
+ .pipe(debounceTime(1000), // Time in milliseconds between key events
2708
+ distinctUntilChanged(), takeUntil(this._onDestroy))
2709
+ .subscribe((searchQuery) => {
2710
+ if (searchQuery != '') {
2711
+ this.searchFlag = true;
2712
+ this.loadData(1, 20, searchQuery);
2713
+ }
2714
+ });
2715
+ }
2716
+ else {
2717
+ this.websiteMultiFilterCtrl.valueChanges
2718
+ .pipe(takeUntil(this._onDestroy))
2719
+ .subscribe(() => {
2720
+ this.filterWebsiteMulti();
2721
+ });
2722
+ }
2556
2723
  /*End */
2557
2724
  this.selectOptions = new Promise((resolve) => {
2558
2725
  this.selectOptionsResolve = resolve;
@@ -2566,8 +2733,8 @@ class MaterialSelectComponent extends MaterialComponent {
2566
2733
  return _.isEqual(o1, o2);
2567
2734
  }
2568
2735
  }
2569
- MaterialSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2570
- 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: `
2736
+ MaterialSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialSelectComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
2737
+ 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 }, { propertyName: "selectElem", first: true, predicate: ["productSelect"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
2571
2738
  <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
2572
2739
  <ng-template #componentTemplate let-hasLabel>
2573
2740
  <mat-form-field fxFill>
@@ -2583,27 +2750,19 @@ MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
2583
2750
  [multiple]="instance.component.multiple"
2584
2751
  [formControl]="control"
2585
2752
  [placeholder]="instance.component.placeholder"
2586
- (selectionChange)="onChange()"
2753
+ (selectionChange)="onChange($event)"
2587
2754
  [compareWith]="compareObjects"
2755
+ #productSelect
2756
+ (openedChange)="onMatSelectOpen($event ? selectElem : null)"
2588
2757
  >
2589
2758
 
2590
2759
  <mat-option>
2591
- <ngx-mat-select-search placeholderLabel="Type to search" [formControl]="websiteMultiFilterCtrl"></ngx-mat-select-search>
2760
+ <ngx-mat-select-search (ngModelChange)="onSearchInputChange($event)" placeholderLabel="Type to search" [formControl]="websiteMultiFilterCtrl"></ngx-mat-select-search>
2592
2761
  </mat-option>
2593
2762
 
2594
- <ng-container *ngIf="(filteredOptions | async)?.length > 4; else regularOptions">
2595
- <cdk-virtual-scroll-viewport itemSize="5" [minBufferPx]="500" [maxBufferPx]="70000" class="example-viewport product-picker">
2596
- <mat-option *cdkVirtualFor="let option of filteredOptions | async" [value]="option.value" class="virtual-full-view">
2763
+ <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value" class="virtual-full-view">
2597
2764
  <span [innerHTML]="option.label"></span>
2598
- </mat-option>
2599
- </cdk-virtual-scroll-viewport>
2600
- </ng-container>
2601
-
2602
- <ng-template #regularOptions>
2603
- <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
2604
- <span [innerHTML]="option.label"></span>
2605
- </mat-option>
2606
- </ng-template>
2765
+ </mat-option>
2607
2766
 
2608
2767
  <mat-option *ngIf="!filteredOptionsLength" disabled>
2609
2768
  <span>Nothing was found</span>
@@ -2616,7 +2775,7 @@ MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
2616
2775
  <mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
2617
2776
  </mat-form-field>
2618
2777
  </ng-template>
2619
- `, isInline: true, styles: [".example-viewport{height:200px}.product-picker{overflow-x:hidden}.virtual-full-view{height:auto!important;white-space:normal!important;line-height:1.4!important;text-overflow:initial!important;min-height:48px!important;overflow:visible!important;overflow:initial!important;padding-top:10px!important;padding-bottom:10px!important}::ng-deep .product-picker .cdk-virtual-scroll-content-wrapper{width:100%!important}.virtual-full-view .mat-pseudo-checkbox{align-self:top!important}\n"], 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$3.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: "directive", type: i7.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i7.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i7.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: i8.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" }] });
2778
+ `, isInline: true, styles: [".example-viewport{height:200px}.product-picker{overflow-x:hidden}.virtual-full-view{height:auto!important;white-space:normal!important;line-height:1.4!important;text-overflow:initial!important;min-height:48px!important;overflow:visible!important;overflow:initial!important;padding-top:10px!important;padding-bottom:10px!important}::ng-deep .product-picker .cdk-virtual-scroll-content-wrapper{width:100%!important}.virtual-full-view .mat-pseudo-checkbox{align-self:top!important}\n"], 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$3.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: i8.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" }] });
2620
2779
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialSelectComponent, decorators: [{
2621
2780
  type: Component,
2622
2781
  args: [{ selector: 'mat-formio-select', template: `
@@ -2635,27 +2794,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2635
2794
  [multiple]="instance.component.multiple"
2636
2795
  [formControl]="control"
2637
2796
  [placeholder]="instance.component.placeholder"
2638
- (selectionChange)="onChange()"
2797
+ (selectionChange)="onChange($event)"
2639
2798
  [compareWith]="compareObjects"
2799
+ #productSelect
2800
+ (openedChange)="onMatSelectOpen($event ? selectElem : null)"
2640
2801
  >
2641
2802
 
2642
2803
  <mat-option>
2643
- <ngx-mat-select-search placeholderLabel="Type to search" [formControl]="websiteMultiFilterCtrl"></ngx-mat-select-search>
2804
+ <ngx-mat-select-search (ngModelChange)="onSearchInputChange($event)" placeholderLabel="Type to search" [formControl]="websiteMultiFilterCtrl"></ngx-mat-select-search>
2644
2805
  </mat-option>
2645
2806
 
2646
- <ng-container *ngIf="(filteredOptions | async)?.length > 4; else regularOptions">
2647
- <cdk-virtual-scroll-viewport itemSize="5" [minBufferPx]="500" [maxBufferPx]="70000" class="example-viewport product-picker">
2648
- <mat-option *cdkVirtualFor="let option of filteredOptions | async" [value]="option.value" class="virtual-full-view">
2807
+ <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value" class="virtual-full-view">
2649
2808
  <span [innerHTML]="option.label"></span>
2650
- </mat-option>
2651
- </cdk-virtual-scroll-viewport>
2652
- </ng-container>
2653
-
2654
- <ng-template #regularOptions>
2655
- <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value">
2656
- <span [innerHTML]="option.label"></span>
2657
- </mat-option>
2658
- </ng-template>
2809
+ </mat-option>
2659
2810
 
2660
2811
  <mat-option *ngIf="!filteredOptionsLength" disabled>
2661
2812
  <span>Nothing was found</span>
@@ -2669,9 +2820,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2669
2820
  </mat-form-field>
2670
2821
  </ng-template>
2671
2822
  `, styles: [".example-viewport{height:200px}.product-picker{overflow-x:hidden}.virtual-full-view{height:auto!important;white-space:normal!important;line-height:1.4!important;text-overflow:initial!important;min-height:48px!important;overflow:visible!important;overflow:initial!important;padding-top:10px!important;padding-bottom:10px!important}::ng-deep .product-picker .cdk-virtual-scroll-content-wrapper{width:100%!important}.virtual-full-view .mat-pseudo-checkbox{align-self:top!important}\n"] }]
2672
- }], propDecorators: { multiSelect: [{
2823
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.HttpClient }]; }, propDecorators: { multiSelect: [{
2673
2824
  type: ViewChild,
2674
2825
  args: ['multiSelect', { static: true }]
2826
+ }], selectElem: [{
2827
+ type: ViewChild,
2828
+ args: ['productSelect']
2675
2829
  }] } });
2676
2830
  SelectComponent.MaterialComponent = MaterialSelectComponent;
2677
2831
  // Make sure we detect changes when new items make their way into the select dropdown.
@@ -2724,12 +2878,12 @@ class ConfirmationDialogComponent {
2724
2878
  ngOnInit() {
2725
2879
  }
2726
2880
  }
2727
- ConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
2728
- ConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: ConfirmationDialogComponent, selector: "NgxMat-confirmation-dialog", ngImport: i0, template: "<div class=\"dialog-container\">\n<h2 mat-dialog-title class=\"data-grid-alert\">Alert</h2>\n<mat-dialog-content class=\"data-grid-popup-body\">\n Are you sure you want to delete this Product?\n</mat-dialog-content>\n<mat-dialog-actions class=\"data-grid-popup-footer\">\n <button mat-button [mat-dialog-close]=\"true\" color=\"warn\">Delete</button>\n <button mat-button [mat-dialog-close]=\"false\">Cancel</button>\n</mat-dialog-actions>\n</div>", styles: [""], dependencies: [{ kind: "component", type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
2881
+ ConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: i1$2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
2882
+ ConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: ConfirmationDialogComponent, selector: "NgxMat-confirmation-dialog", ngImport: i0, template: "<div class=\"dialog-container\">\n<h2 mat-dialog-title class=\"data-grid-alert\">Alert</h2>\n<mat-dialog-content class=\"data-grid-popup-body\">\n Are you sure you want to delete this Product?\n</mat-dialog-content>\n<mat-dialog-actions class=\"data-grid-popup-footer\">\n <button mat-button [mat-dialog-close]=\"true\" color=\"warn\">Delete</button>\n <button mat-button [mat-dialog-close]=\"false\">Cancel</button>\n</mat-dialog-actions>\n</div>", styles: [""], dependencies: [{ kind: "component", type: i2$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
2729
2883
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
2730
2884
  type: Component,
2731
2885
  args: [{ selector: 'NgxMat-confirmation-dialog', template: "<div class=\"dialog-container\">\n<h2 mat-dialog-title class=\"data-grid-alert\">Alert</h2>\n<mat-dialog-content class=\"data-grid-popup-body\">\n Are you sure you want to delete this Product?\n</mat-dialog-content>\n<mat-dialog-actions class=\"data-grid-popup-footer\">\n <button mat-button [mat-dialog-close]=\"true\" color=\"warn\">Delete</button>\n <button mat-button [mat-dialog-close]=\"false\">Cancel</button>\n</mat-dialog-actions>\n</div>" }]
2732
- }], ctorParameters: function () { return [{ type: i1$1.MatDialogRef }]; } });
2886
+ }], ctorParameters: function () { return [{ type: i1$2.MatDialogRef }]; } });
2733
2887
 
2734
2888
  class MaterialDataGridComponent extends MaterialNestedComponent {
2735
2889
  constructor(element, ref, dialog) {
@@ -2818,7 +2972,7 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
2818
2972
  super.setValue(value);
2819
2973
  }
2820
2974
  }
2821
- MaterialDataGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialDataGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
2975
+ MaterialDataGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialDataGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
2822
2976
  MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialDataGridComponent, selector: "mat-formio-datagrid", usesInheritance: true, ngImport: i0, template: `
2823
2977
  <mat-formio-form-field [instance]="instance"
2824
2978
  [componentTemplate]="componentTemplate"
@@ -2965,7 +3119,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2965
3119
  </mat-card-title>
2966
3120
  </ng-template>
2967
3121
  `, styles: [".datagrid-row{height:auto}\n"] }]
2968
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.MatDialog }]; } });
3122
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$2.MatDialog }]; } });
2969
3123
  DataGridComponent.MaterialComponent = MaterialDataGridComponent;
2970
3124
 
2971
3125
  var EditRowState;
@@ -3504,7 +3658,7 @@ class FormioComponent extends FormioBaseComponent {
3504
3658
  return form.instance;
3505
3659
  }
3506
3660
  }
3507
- FormioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: FormioComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$2.FormioAppConfig, optional: true }], target: i0.ɵɵFactoryTarget.Component });
3661
+ FormioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: FormioComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$3.FormioAppConfig, optional: true }], target: i0.ɵɵFactoryTarget.Component });
3508
3662
  FormioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: FormioComponent, selector: "mat-formio", viewQueries: [{ propertyName: "formioViewContainer", first: true, predicate: ["formio"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: `
3509
3663
  <mat-spinner *ngIf="isLoading"></mat-spinner>
3510
3664
  <div *ngIf="!this.options?.disableAlerts">
@@ -3536,7 +3690,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
3536
3690
  </div>
3537
3691
  `, styles: [".alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:.5rem;border:1px solid transparent;border-radius:.25rem}::ng-deep mat-card{box-sizing:border-box;-moz-box-sizing:border-box}\n"] }]
3538
3692
  }], ctorParameters: function () {
3539
- return [{ type: i0.ComponentFactoryResolver }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$2.FormioAppConfig, decorators: [{
3693
+ return [{ type: i0.ComponentFactoryResolver }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$3.FormioAppConfig, decorators: [{
3540
3694
  type: Optional
3541
3695
  }] }];
3542
3696
  }, propDecorators: { formioViewContainer: [{
@@ -3617,7 +3771,8 @@ NgxRenderMaterialFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.
3617
3771
  DragDropModule,
3618
3772
  ScrollingModule,
3619
3773
  NgxMatSelectSearchModule,
3620
- MatDialogModule], exports: [NgxRenderMaterialFormsComponent,
3774
+ MatDialogModule,
3775
+ HttpClientModule], exports: [NgxRenderMaterialFormsComponent,
3621
3776
  FormioComponent,
3622
3777
  MatInputModule,
3623
3778
  MatFormFieldModule,
@@ -3641,7 +3796,8 @@ NgxRenderMaterialFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.
3641
3796
  FlexLayoutModule,
3642
3797
  ScrollingModule,
3643
3798
  NgxMatSelectSearchModule,
3644
- MatDialogModule] });
3799
+ MatDialogModule,
3800
+ HttpClientModule] });
3645
3801
  NgxRenderMaterialFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgxRenderMaterialFormsModule, imports: [CommonModule,
3646
3802
  FormsModule,
3647
3803
  ReactiveFormsModule,
@@ -3669,7 +3825,8 @@ NgxRenderMaterialFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.
3669
3825
  DragDropModule,
3670
3826
  ScrollingModule,
3671
3827
  NgxMatSelectSearchModule,
3672
- MatDialogModule, MatInputModule,
3828
+ MatDialogModule,
3829
+ HttpClientModule, MatInputModule,
3673
3830
  MatFormFieldModule,
3674
3831
  MatCheckboxModule,
3675
3832
  MatRadioModule,
@@ -3691,7 +3848,8 @@ NgxRenderMaterialFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.
3691
3848
  FlexLayoutModule,
3692
3849
  ScrollingModule,
3693
3850
  NgxMatSelectSearchModule,
3694
- MatDialogModule] });
3851
+ MatDialogModule,
3852
+ HttpClientModule] });
3695
3853
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgxRenderMaterialFormsModule, decorators: [{
3696
3854
  type: NgModule,
3697
3855
  args: [{
@@ -3766,7 +3924,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
3766
3924
  DragDropModule,
3767
3925
  ScrollingModule,
3768
3926
  NgxMatSelectSearchModule,
3769
- MatDialogModule
3927
+ MatDialogModule,
3928
+ HttpClientModule
3770
3929
  ],
3771
3930
  exports: [
3772
3931
  NgxRenderMaterialFormsComponent,
@@ -3793,7 +3952,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
3793
3952
  FlexLayoutModule,
3794
3953
  ScrollingModule,
3795
3954
  NgxMatSelectSearchModule,
3796
- MatDialogModule
3955
+ MatDialogModule,
3956
+ HttpClientModule
3797
3957
  ],
3798
3958
  entryComponents: [
3799
3959
  MaterialButtonComponent,