ngx-render-material-forms 1.2.1 → 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,12 +81,14 @@ 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 'ngx-mat-select-search';
84
+ import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';
85
+ import * as CryptoJS from 'crypto-js';
86
+ import { isNullOrUndefined } from 'util';
87
+ import * as i8 from 'ngx-mat-select-search';
84
88
  import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
85
89
  import WellComponent from 'formiojs/components/well/Well.js';
86
90
  import DataGridComponent from 'formiojs/components/datagrid/DataGrid.js';
87
- import * as i8 from '@angular/cdk/drag-drop';
91
+ import * as i8$1 from '@angular/cdk/drag-drop';
88
92
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
89
93
  import EditGridComponent from 'formiojs/components/editgrid/EditGrid.js';
90
94
  import Components$2 from 'formiojs/components/Components';
@@ -94,7 +98,7 @@ import Wizard from 'formiojs/Wizard';
94
98
  import Displays from 'formiojs/displays/Displays';
95
99
  import * as i3$2 from '@angular/material/stepper';
96
100
  import { MatStepperModule } from '@angular/material/stepper';
97
- import * as i1$2 from '@formio/angular';
101
+ import * as i1$3 from '@formio/angular';
98
102
  import { FormioBaseComponent } from '@formio/angular';
99
103
  import { FlexLayoutModule } from '@angular/flex-layout';
100
104
  import { ScrollingModule } from '@angular/cdk/scrolling';
@@ -2518,11 +2522,146 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2518
2522
  SelectBoxesComponent.MaterialComponent = MaterialSelectBoxesComponent;
2519
2523
 
2520
2524
  class MaterialSelectComponent extends MaterialComponent {
2521
- constructor() {
2522
- super(...arguments);
2525
+ constructor(element, ref, http) {
2526
+ super(element, ref);
2527
+ this.element = element;
2528
+ this.ref = ref;
2529
+ this.http = http;
2523
2530
  this.websiteMultiCtrl = new FormControl();
2524
2531
  this.websiteMultiFilterCtrl = new FormControl();
2525
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
+ }
2526
2665
  }
2527
2666
  filterWebsiteMulti() {
2528
2667
  if (!this.selectOptions) {
@@ -2545,13 +2684,42 @@ class MaterialSelectComponent extends MaterialComponent {
2545
2684
  super.setInstance(instance);
2546
2685
  this.instance.triggerUpdate();
2547
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
+ }
2548
2703
  ngOnInit() {
2549
2704
  /*new logic */
2550
- this.websiteMultiFilterCtrl.valueChanges
2551
- .pipe(takeUntil(this._onDestroy))
2552
- .subscribe(() => {
2553
- this.filterWebsiteMulti();
2554
- });
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
+ }
2555
2723
  /*End */
2556
2724
  this.selectOptions = new Promise((resolve) => {
2557
2725
  this.selectOptionsResolve = resolve;
@@ -2565,8 +2733,8 @@ class MaterialSelectComponent extends MaterialComponent {
2565
2733
  return _.isEqual(o1, o2);
2566
2734
  }
2567
2735
  }
2568
- MaterialSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2569
- 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: `
2570
2738
  <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
2571
2739
  <ng-template #componentTemplate let-hasLabel>
2572
2740
  <mat-form-field fxFill>
@@ -2582,12 +2750,14 @@ MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
2582
2750
  [multiple]="instance.component.multiple"
2583
2751
  [formControl]="control"
2584
2752
  [placeholder]="instance.component.placeholder"
2585
- (selectionChange)="onChange()"
2753
+ (selectionChange)="onChange($event)"
2586
2754
  [compareWith]="compareObjects"
2755
+ #productSelect
2756
+ (openedChange)="onMatSelectOpen($event ? selectElem : null)"
2587
2757
  >
2588
2758
 
2589
2759
  <mat-option>
2590
- <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>
2591
2761
  </mat-option>
2592
2762
 
2593
2763
  <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value" class="virtual-full-view">
@@ -2605,7 +2775,7 @@ MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
2605
2775
  <mat-error *ngIf="instance.error">{{ instance.error.message }}</mat-error>
2606
2776
  </mat-form-field>
2607
2777
  </ng-template>
2608
- `, 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: 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" }] });
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" }] });
2609
2779
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialSelectComponent, decorators: [{
2610
2780
  type: Component,
2611
2781
  args: [{ selector: 'mat-formio-select', template: `
@@ -2624,12 +2794,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2624
2794
  [multiple]="instance.component.multiple"
2625
2795
  [formControl]="control"
2626
2796
  [placeholder]="instance.component.placeholder"
2627
- (selectionChange)="onChange()"
2797
+ (selectionChange)="onChange($event)"
2628
2798
  [compareWith]="compareObjects"
2799
+ #productSelect
2800
+ (openedChange)="onMatSelectOpen($event ? selectElem : null)"
2629
2801
  >
2630
2802
 
2631
2803
  <mat-option>
2632
- <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>
2633
2805
  </mat-option>
2634
2806
 
2635
2807
  <mat-option *ngFor="let option of filteredOptions | async" [value]="option.value" class="virtual-full-view">
@@ -2648,9 +2820,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2648
2820
  </mat-form-field>
2649
2821
  </ng-template>
2650
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"] }]
2651
- }], propDecorators: { multiSelect: [{
2823
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.HttpClient }]; }, propDecorators: { multiSelect: [{
2652
2824
  type: ViewChild,
2653
2825
  args: ['multiSelect', { static: true }]
2826
+ }], selectElem: [{
2827
+ type: ViewChild,
2828
+ args: ['productSelect']
2654
2829
  }] } });
2655
2830
  SelectComponent.MaterialComponent = MaterialSelectComponent;
2656
2831
  // Make sure we detect changes when new items make their way into the select dropdown.
@@ -2703,12 +2878,12 @@ class ConfirmationDialogComponent {
2703
2878
  ngOnInit() {
2704
2879
  }
2705
2880
  }
2706
- 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 });
2707
- 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"] }] });
2708
2883
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
2709
2884
  type: Component,
2710
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>" }]
2711
- }], ctorParameters: function () { return [{ type: i1$1.MatDialogRef }]; } });
2886
+ }], ctorParameters: function () { return [{ type: i1$2.MatDialogRef }]; } });
2712
2887
 
2713
2888
  class MaterialDataGridComponent extends MaterialNestedComponent {
2714
2889
  constructor(element, ref, dialog) {
@@ -2797,7 +2972,7 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
2797
2972
  super.setValue(value);
2798
2973
  }
2799
2974
  }
2800
- 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 });
2801
2976
  MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialDataGridComponent, selector: "mat-formio-datagrid", usesInheritance: true, ngImport: i0, template: `
2802
2977
  <mat-formio-form-field [instance]="instance"
2803
2978
  [componentTemplate]="componentTemplate"
@@ -2869,7 +3044,7 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
2869
3044
  <span [instance]="instance" matFormioLabel></span>
2870
3045
  </mat-card-title>
2871
3046
  </ng-template>
2872
- `, isInline: true, styles: [".datagrid-row{height:auto}\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: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "component", type: i4$7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$7.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i4$7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { 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: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i8.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i8.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i8.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { 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"] }] });
3047
+ `, isInline: true, styles: [".datagrid-row{height:auto}\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: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "component", type: i4$7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$7.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i4$7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { 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: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i8$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i8$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i8$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { 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"] }] });
2873
3048
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialDataGridComponent, decorators: [{
2874
3049
  type: Component,
2875
3050
  args: [{ selector: 'mat-formio-datagrid', template: `
@@ -2944,7 +3119,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2944
3119
  </mat-card-title>
2945
3120
  </ng-template>
2946
3121
  `, styles: [".datagrid-row{height:auto}\n"] }]
2947
- }], 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 }]; } });
2948
3123
  DataGridComponent.MaterialComponent = MaterialDataGridComponent;
2949
3124
 
2950
3125
  var EditRowState;
@@ -3483,7 +3658,7 @@ class FormioComponent extends FormioBaseComponent {
3483
3658
  return form.instance;
3484
3659
  }
3485
3660
  }
3486
- 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 });
3487
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: `
3488
3663
  <mat-spinner *ngIf="isLoading"></mat-spinner>
3489
3664
  <div *ngIf="!this.options?.disableAlerts">
@@ -3515,7 +3690,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
3515
3690
  </div>
3516
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"] }]
3517
3692
  }], ctorParameters: function () {
3518
- 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: [{
3519
3694
  type: Optional
3520
3695
  }] }];
3521
3696
  }, propDecorators: { formioViewContainer: [{
@@ -3596,7 +3771,8 @@ NgxRenderMaterialFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.
3596
3771
  DragDropModule,
3597
3772
  ScrollingModule,
3598
3773
  NgxMatSelectSearchModule,
3599
- MatDialogModule], exports: [NgxRenderMaterialFormsComponent,
3774
+ MatDialogModule,
3775
+ HttpClientModule], exports: [NgxRenderMaterialFormsComponent,
3600
3776
  FormioComponent,
3601
3777
  MatInputModule,
3602
3778
  MatFormFieldModule,
@@ -3620,7 +3796,8 @@ NgxRenderMaterialFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.
3620
3796
  FlexLayoutModule,
3621
3797
  ScrollingModule,
3622
3798
  NgxMatSelectSearchModule,
3623
- MatDialogModule] });
3799
+ MatDialogModule,
3800
+ HttpClientModule] });
3624
3801
  NgxRenderMaterialFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgxRenderMaterialFormsModule, imports: [CommonModule,
3625
3802
  FormsModule,
3626
3803
  ReactiveFormsModule,
@@ -3648,7 +3825,8 @@ NgxRenderMaterialFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.
3648
3825
  DragDropModule,
3649
3826
  ScrollingModule,
3650
3827
  NgxMatSelectSearchModule,
3651
- MatDialogModule, MatInputModule,
3828
+ MatDialogModule,
3829
+ HttpClientModule, MatInputModule,
3652
3830
  MatFormFieldModule,
3653
3831
  MatCheckboxModule,
3654
3832
  MatRadioModule,
@@ -3670,7 +3848,8 @@ NgxRenderMaterialFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.
3670
3848
  FlexLayoutModule,
3671
3849
  ScrollingModule,
3672
3850
  NgxMatSelectSearchModule,
3673
- MatDialogModule] });
3851
+ MatDialogModule,
3852
+ HttpClientModule] });
3674
3853
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgxRenderMaterialFormsModule, decorators: [{
3675
3854
  type: NgModule,
3676
3855
  args: [{
@@ -3745,7 +3924,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
3745
3924
  DragDropModule,
3746
3925
  ScrollingModule,
3747
3926
  NgxMatSelectSearchModule,
3748
- MatDialogModule
3927
+ MatDialogModule,
3928
+ HttpClientModule
3749
3929
  ],
3750
3930
  exports: [
3751
3931
  NgxRenderMaterialFormsComponent,
@@ -3772,7 +3952,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
3772
3952
  FlexLayoutModule,
3773
3953
  ScrollingModule,
3774
3954
  NgxMatSelectSearchModule,
3775
- MatDialogModule
3955
+ MatDialogModule,
3956
+ HttpClientModule
3776
3957
  ],
3777
3958
  entryComponents: [
3778
3959
  MaterialButtonComponent,