ngx-render-material-forms 1.7.0 → 1.7.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.
- package/esm2020/lib/components/add-on-products/add-on-products.component.mjs +451 -0
- package/esm2020/lib/components/button/button.component.mjs +15 -11
- package/esm2020/lib/components/common.service.mjs +62 -3
- package/esm2020/lib/components/datagrid/datagrid.component.mjs +254 -8
- package/esm2020/lib/components/select/select.component.mjs +19 -68
- package/esm2020/lib/ngx-render-material-forms.module.mjs +16 -6
- package/fesm2015/ngx-render-material-forms.js +811 -109
- package/fesm2015/ngx-render-material-forms.mjs.map +1 -1
- package/fesm2020/ngx-render-material-forms.js +800 -106
- package/fesm2020/ngx-render-material-forms.mjs.map +1 -1
- package/lib/components/add-on-products/add-on-products.component.d.ts +102 -0
- package/lib/components/button/button.component.d.ts +6 -0
- package/lib/components/common.service.d.ts +10 -0
- package/lib/components/datagrid/datagrid.component.d.ts +32 -0
- package/lib/ngx-render-material-forms.module.d.ts +29 -27
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Component, Input, ViewChild, ViewContainerRef, ViewChildren, EventEmitter, Output, forwardRef, Directive, Inject, Optional, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1$
|
|
3
|
+
import * as i1$2 from '@angular/common/http';
|
|
4
4
|
import { HttpHeaders, HttpClientModule } from '@angular/common/http';
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import * as i2 from '@angular/forms';
|
|
8
|
-
import { FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import { FormControl, NG_VALUE_ACCESSOR, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import * as i4$2 from '@angular/material/input';
|
|
10
10
|
import { MAT_INPUT_VALUE_ACCESSOR, MatInputModule } from '@angular/material/input';
|
|
11
11
|
import * as i3$2 from '@angular/material/button';
|
|
@@ -27,18 +27,20 @@ import * as i4 from '@angular/material/card';
|
|
|
27
27
|
import { MatCardModule } from '@angular/material/card';
|
|
28
28
|
import * as i2$2 from '@angular/material/tabs';
|
|
29
29
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
30
|
-
import * as
|
|
30
|
+
import * as i10$1 from '@angular/material/table';
|
|
31
31
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
32
32
|
import * as i5$2 from '@angular/material/datepicker';
|
|
33
33
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
34
|
-
import * as
|
|
34
|
+
import * as i11 from '@angular/material/progress-spinner';
|
|
35
35
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
36
36
|
import * as i4$1 from '@angular/material/icon';
|
|
37
37
|
import { MatIconModule } from '@angular/material/icon';
|
|
38
38
|
import * as i5$1 from '@angular/material/core';
|
|
39
39
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
40
|
-
import * as i1$
|
|
40
|
+
import * as i1$1 from '@angular/material/dialog';
|
|
41
41
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
42
|
+
import * as i16 from '@angular/material/autocomplete';
|
|
43
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
42
44
|
import Webform from 'formiojs/Webform.js';
|
|
43
45
|
import FormioComponent$2 from 'formiojs/components/_classes/component/Component.js';
|
|
44
46
|
import TextFieldComponent from 'formiojs/components/textfield/TextField.js';
|
|
@@ -82,7 +84,7 @@ import SelectBoxesComponent from 'formiojs/components/selectboxes/SelectBoxes.js
|
|
|
82
84
|
import { __awaiter } from 'tslib';
|
|
83
85
|
import SelectComponent from 'formiojs/components/select/Select.js';
|
|
84
86
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
85
|
-
import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';
|
|
87
|
+
import { debounceTime, distinctUntilChanged, takeUntil, startWith, map } from 'rxjs/operators';
|
|
86
88
|
import * as CryptoJS from 'crypto-js';
|
|
87
89
|
import { isNullOrUndefined } from 'util';
|
|
88
90
|
import * as i10 from 'ngx-mat-select-search';
|
|
@@ -91,14 +93,15 @@ import WellComponent from 'formiojs/components/well/Well.js';
|
|
|
91
93
|
import DataGridComponent from 'formiojs/components/datagrid/DataGrid.js';
|
|
92
94
|
import * as i9 from '@angular/cdk/drag-drop';
|
|
93
95
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
96
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
97
|
+
import * as i15 from '@angular/material/stepper';
|
|
98
|
+
import { MatStepperModule } from '@angular/material/stepper';
|
|
94
99
|
import EditGridComponent from 'formiojs/components/editgrid/EditGrid.js';
|
|
95
100
|
import Components$2 from 'formiojs/components/Components';
|
|
96
101
|
import isString from 'lodash/isString';
|
|
97
102
|
import TableComponent from 'formiojs/components/table/Table.js';
|
|
98
103
|
import Wizard from 'formiojs/Wizard';
|
|
99
104
|
import Displays from 'formiojs/displays/Displays';
|
|
100
|
-
import * as i3$3 from '@angular/material/stepper';
|
|
101
|
-
import { MatStepperModule } from '@angular/material/stepper';
|
|
102
105
|
import * as i1$3 from '@formio/angular';
|
|
103
106
|
import { FormioBaseComponent } from '@formio/angular';
|
|
104
107
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
@@ -984,8 +987,11 @@ var AngularButtonsThemes;
|
|
|
984
987
|
})(AngularButtonsThemes || (AngularButtonsThemes = {}));
|
|
985
988
|
|
|
986
989
|
class MaterialButtonComponent extends MaterialComponent {
|
|
987
|
-
constructor() {
|
|
988
|
-
super(
|
|
990
|
+
constructor(element, ref, dialog) {
|
|
991
|
+
super(element, ref);
|
|
992
|
+
this.element = element;
|
|
993
|
+
this.ref = ref;
|
|
994
|
+
this.dialog = dialog;
|
|
989
995
|
this.loading = false;
|
|
990
996
|
this.done = false;
|
|
991
997
|
this.error = false;
|
|
@@ -1056,12 +1062,12 @@ class MaterialButtonComponent extends MaterialComponent {
|
|
|
1056
1062
|
return retVal;
|
|
1057
1063
|
}
|
|
1058
1064
|
}
|
|
1059
|
-
MaterialButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialButtonComponent, deps:
|
|
1060
|
-
MaterialButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialButtonComponent, selector: "mat-formio-button", usesInheritance: true, ngImport: i0, template: "<button *ngIf=\"instance\"\r\n [ngClass]=\"buttonClass\"\r\n type=\"{{ instance.component.action }}\"\r\n mat-raised-button [color]=\"color\"\r\n [disabled]=\"disabled\"\r\n (click)=\"instance.onClick($event)\"\r\n>\r\n <mat-icon *ngIf=\"instance.component.leftIcon\">{{instance.component.leftIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"done\">done</mat-icon>\r\n <mat-icon *ngIf=\"error\">close</mat-icon>\r\n <mat-icon class=\"mat-icon-spin\" *ngIf=\"loading\">autorenew</mat-icon>\r\n {{ instance.component.label }}\r\n <mat-icon *ngIf=\"instance.component.rightIcon\">{{instance.component.rightIcon}}</mat-icon>\r\n</button>\r\n", styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .mat-icon-spin{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.mat-formio-theme-success{background-color:#63d644!important}.mat-formio-theme-info{background-color:#49d9f4!important}.mat-formio-button-sm{font-size:14px;padding:8px 12px}.mat-formio-button-xs{font-size:14px;padding:4px 6px}.mat-formio-button-md{font-size:15px;padding:8px 12px}.mat-formio-button-lg{font-size:19px;padding:16px 20px}.mat-formio-button-block{display:block;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.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$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }] });
|
|
1065
|
+
MaterialButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
1066
|
+
MaterialButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialButtonComponent, selector: "mat-formio-button", usesInheritance: true, ngImport: i0, template: "<button *ngIf=\"instance && instance.component.label != 'Click to add Products'\"\r\n [ngClass]=\"buttonClass\"\r\n type=\"{{ instance.component.action }}\"\r\n mat-raised-button [color]=\"color\"\r\n [disabled]=\"disabled\"\r\n (click)=\"instance.onClick($event)\"\r\n>\r\n\r\n\r\n <mat-icon *ngIf=\"instance.component.leftIcon\">{{instance.component.leftIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"done\">done</mat-icon>\r\n <mat-icon *ngIf=\"error\">close</mat-icon>\r\n <mat-icon class=\"mat-icon-spin\" *ngIf=\"loading\">autorenew</mat-icon>\r\n {{ instance.component.label }}\r\n <mat-icon *ngIf=\"instance.component.rightIcon\">{{instance.component.rightIcon}}</mat-icon>\r\n</button>\r\n", styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .mat-icon-spin{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.mat-formio-theme-success{background-color:#63d644!important}.mat-formio-theme-info{background-color:#49d9f4!important}.mat-formio-button-sm{font-size:14px;padding:8px 12px}.mat-formio-button-xs{font-size:14px;padding:4px 6px}.mat-formio-button-md{font-size:15px;padding:8px 12px}.mat-formio-button-lg{font-size:19px;padding:16px 20px}.mat-formio-button-block{display:block;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.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$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }] });
|
|
1061
1067
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialButtonComponent, decorators: [{
|
|
1062
1068
|
type: Component,
|
|
1063
|
-
args: [{ selector: 'mat-formio-button', template: "<button *ngIf=\"instance\"\r\n [ngClass]=\"buttonClass\"\r\n type=\"{{ instance.component.action }}\"\r\n mat-raised-button [color]=\"color\"\r\n [disabled]=\"disabled\"\r\n (click)=\"instance.onClick($event)\"\r\n>\r\n <mat-icon *ngIf=\"instance.component.leftIcon\">{{instance.component.leftIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"done\">done</mat-icon>\r\n <mat-icon *ngIf=\"error\">close</mat-icon>\r\n <mat-icon class=\"mat-icon-spin\" *ngIf=\"loading\">autorenew</mat-icon>\r\n {{ instance.component.label }}\r\n <mat-icon *ngIf=\"instance.component.rightIcon\">{{instance.component.rightIcon}}</mat-icon>\r\n</button>\r\n", styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .mat-icon-spin{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.mat-formio-theme-success{background-color:#63d644!important}.mat-formio-theme-info{background-color:#49d9f4!important}.mat-formio-button-sm{font-size:14px;padding:8px 12px}.mat-formio-button-xs{font-size:14px;padding:4px 6px}.mat-formio-button-md{font-size:15px;padding:8px 12px}.mat-formio-button-lg{font-size:19px;padding:16px 20px}.mat-formio-button-block{display:block;width:100%}\n"] }]
|
|
1064
|
-
}] });
|
|
1069
|
+
args: [{ selector: 'mat-formio-button', template: "<button *ngIf=\"instance && instance.component.label != 'Click to add Products'\"\r\n [ngClass]=\"buttonClass\"\r\n type=\"{{ instance.component.action }}\"\r\n mat-raised-button [color]=\"color\"\r\n [disabled]=\"disabled\"\r\n (click)=\"instance.onClick($event)\"\r\n>\r\n\r\n\r\n <mat-icon *ngIf=\"instance.component.leftIcon\">{{instance.component.leftIcon}}</mat-icon>\r\n <mat-icon *ngIf=\"done\">done</mat-icon>\r\n <mat-icon *ngIf=\"error\">close</mat-icon>\r\n <mat-icon class=\"mat-icon-spin\" *ngIf=\"loading\">autorenew</mat-icon>\r\n {{ instance.component.label }}\r\n <mat-icon *ngIf=\"instance.component.rightIcon\">{{instance.component.rightIcon}}</mat-icon>\r\n</button>\r\n", styles: ["@-webkit-keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .mat-icon-spin{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.mat-formio-theme-success{background-color:#63d644!important}.mat-formio-theme-info{background-color:#49d9f4!important}.mat-formio-button-sm{font-size:14px;padding:8px 12px}.mat-formio-button-xs{font-size:14px;padding:4px 6px}.mat-formio-button-md{font-size:15px;padding:8px 12px}.mat-formio-button-lg{font-size:19px;padding:16px 20px}.mat-formio-button-block{display:block;width:100%}\n"] }]
|
|
1070
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.MatDialog }]; } });
|
|
1065
1071
|
ButtonComponent.MaterialComponent = MaterialButtonComponent;
|
|
1066
1072
|
|
|
1067
1073
|
class MaterialTextareaComponent extends MaterialComponent {
|
|
@@ -2551,8 +2557,12 @@ class CommonService {
|
|
|
2551
2557
|
this.dropdownItems$ = this.dropdownItemsSubject.asObservable();
|
|
2552
2558
|
this.setFlag = new BehaviorSubject(false); // Initialize with false
|
|
2553
2559
|
this.dropdownflag$ = this.setFlag.asObservable(); // Observable that emits the boolean value
|
|
2554
|
-
this.
|
|
2560
|
+
this.holy = '';
|
|
2561
|
+
this.grail = '';
|
|
2555
2562
|
this.currentUser = JSON.parse(localStorage.getItem('currentUser'));
|
|
2563
|
+
this.holy = CryptoJS.enc.Base64.parse('8F/2+T2NXqUBQERR12R4sw==');
|
|
2564
|
+
this.grail = CryptoJS.enc.Base64.parse('yE0CgQbYzK5wqeoKTVzhOQ==');
|
|
2565
|
+
this.paramsData = JSON.parse(localStorage.getItem('productPickerParams'));
|
|
2556
2566
|
}
|
|
2557
2567
|
getBaseApiUrl() {
|
|
2558
2568
|
const baseUrlMapping = {
|
|
@@ -2566,6 +2576,28 @@ class CommonService {
|
|
|
2566
2576
|
const hostname = window.location.hostname;
|
|
2567
2577
|
return baseUrlMapping[hostname] || null;
|
|
2568
2578
|
}
|
|
2579
|
+
scrumble(msg) {
|
|
2580
|
+
if (!isNullOrUndefined(msg)) {
|
|
2581
|
+
var conceal = this.getcampaign(msg, this.holy, this.grail);
|
|
2582
|
+
var sha256 = CryptoJS.HmacSHA256(CryptoJS.enc.Base64.stringify(this.grail) + conceal.toString(), CryptoJS.enc.Base64.stringify(this.holy));
|
|
2583
|
+
var hashInBase64 = CryptoJS.enc.Base64.stringify(sha256);
|
|
2584
|
+
let keyValue = {
|
|
2585
|
+
"value": conceal.toString(),
|
|
2586
|
+
"mac": hashInBase64
|
|
2587
|
+
};
|
|
2588
|
+
var result = JSON.stringify(keyValue);
|
|
2589
|
+
var jumbled = CryptoJS.enc.Utf8.parse(result);
|
|
2590
|
+
return CryptoJS.enc.Base64.stringify(jumbled);
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
getcampaign(data, holy, grail) {
|
|
2594
|
+
return CryptoJS.AES.encrypt(data.toString(), holy, {
|
|
2595
|
+
blockSize: 128,
|
|
2596
|
+
iv: grail,
|
|
2597
|
+
mode: CryptoJS.mode.CBC,
|
|
2598
|
+
padding: CryptoJS.pad.Pkcs7
|
|
2599
|
+
});
|
|
2600
|
+
}
|
|
2569
2601
|
/* Intialization of api path and queryparams */
|
|
2570
2602
|
initializeApiPath(getUrl, queryParams) {
|
|
2571
2603
|
if (queryParams === null || queryParams === void 0 ? void 0 : queryParams.length) {
|
|
@@ -2589,6 +2621,16 @@ class CommonService {
|
|
|
2589
2621
|
return obj;
|
|
2590
2622
|
}
|
|
2591
2623
|
}
|
|
2624
|
+
loadProducts(pageNumber, pazeSize, search = '', onlyActive = true, description = false, levelOneId, levelTwoId, levelThreeId, levelFourId) {
|
|
2625
|
+
const baseApiUrl = this.getBaseApiUrl();
|
|
2626
|
+
const vendorId = this.getValueByKey(this.paramsData, 'vendorId');
|
|
2627
|
+
return this.http.get(`${baseApiUrl}/api/VendorFormBuilder/GetVendorProductsV2?vendorId=${vendorId}&pageNumber=${pageNumber}&pageSize=${pazeSize}&search=${search}&onlyActive=${onlyActive}&includeDescription=${description}&levelOne=${levelOneId}&levelTwo=${levelTwoId}&levelThree=${levelThreeId}&levelFour=${levelFourId}`);
|
|
2628
|
+
}
|
|
2629
|
+
listSubCategory(category) {
|
|
2630
|
+
const vendorId = this.getValueByKey(this.paramsData, 'vendorId');
|
|
2631
|
+
const baseApiUrl = this.getBaseApiUrl();
|
|
2632
|
+
return this.http.get(`${baseApiUrl}/api/VendorFormBuilder/GetProductsSubCategory?vendorId=${vendorId}&categoryName=${category}`);
|
|
2633
|
+
}
|
|
2592
2634
|
/* Append key and value to query string */
|
|
2593
2635
|
convertToQueryString(queryParams) {
|
|
2594
2636
|
const queryString = Object.keys(queryParams)
|
|
@@ -2610,10 +2652,30 @@ class CommonService {
|
|
|
2610
2652
|
const baseApiUrl = this.getBaseApiUrl();
|
|
2611
2653
|
return this.http.get(`${baseApiUrl}/api/VendorFormBuilder/GetProductsCategory?vendorId=${vendorId}`);
|
|
2612
2654
|
}
|
|
2655
|
+
productLevelOne() {
|
|
2656
|
+
const baseApiUrl = this.getBaseApiUrl();
|
|
2657
|
+
const vendorId = this.getValueByKey(this.paramsData, 'vendorId');
|
|
2658
|
+
return this.http.get(`${baseApiUrl}/api/VendorFormBuilder/GetProductLevelOne?vendorId=${vendorId}`);
|
|
2659
|
+
}
|
|
2660
|
+
productLevelTwo(levelOneId) {
|
|
2661
|
+
const baseApiUrl = this.getBaseApiUrl();
|
|
2662
|
+
const vendorId = this.getValueByKey(this.paramsData, 'vendorId');
|
|
2663
|
+
return this.http.get(`${baseApiUrl}/api/VendorFormBuilder/GetProductLevelTwo?levelOneId=${levelOneId}&vendorId=${vendorId}`);
|
|
2664
|
+
}
|
|
2665
|
+
productLevelThree(levelOneId, levelTwoId) {
|
|
2666
|
+
const baseApiUrl = this.getBaseApiUrl();
|
|
2667
|
+
const vendorId = this.getValueByKey(this.paramsData, 'vendorId');
|
|
2668
|
+
return this.http.get(`${baseApiUrl}/api/VendorFormBuilder/GetProductLevelThree?levelOneId=${levelOneId}&levelTwoId=${levelTwoId}&vendorId=${vendorId}`);
|
|
2669
|
+
}
|
|
2670
|
+
productLevelFour(levelOneId, levelTwoId, levelThreeId) {
|
|
2671
|
+
const baseApiUrl = this.getBaseApiUrl();
|
|
2672
|
+
const vendorId = this.getValueByKey(this.paramsData, 'vendorId');
|
|
2673
|
+
return this.http.get(`${baseApiUrl}/api/VendorFormBuilder/GetProductLevelFour?levelOneId=${levelOneId}&levelTwoId=${levelTwoId}&levelThreeId=${levelThreeId}&vendorId=${vendorId}`);
|
|
2674
|
+
}
|
|
2613
2675
|
// Function to get value by key from the array
|
|
2614
2676
|
getValueByKey(data, key) {
|
|
2615
2677
|
if (!data || data.length === 0) {
|
|
2616
|
-
return null;
|
|
2678
|
+
return null;
|
|
2617
2679
|
}
|
|
2618
2680
|
const item = data.find(kv => kv.key.toLowerCase() === key.toLowerCase());
|
|
2619
2681
|
return item ? item.value : null;
|
|
@@ -2637,19 +2699,20 @@ class CommonService {
|
|
|
2637
2699
|
getDropDownFlag() {
|
|
2638
2700
|
return this.setFlag.getValue();
|
|
2639
2701
|
}
|
|
2702
|
+
/*Funtion to check if property is matched with given attributes in formBuilder or not */
|
|
2640
2703
|
checkIsAttributeTrue(newProductPickerFlag, attributeName) {
|
|
2641
2704
|
return newProductPickerFlag && Object.keys(newProductPickerFlag).some(key => key.toLocaleLowerCase() === attributeName.toLowerCase() &&
|
|
2642
2705
|
newProductPickerFlag[key].toLowerCase() === "true");
|
|
2643
2706
|
}
|
|
2644
2707
|
}
|
|
2645
|
-
CommonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CommonService, deps: [{ token: i1$
|
|
2708
|
+
CommonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CommonService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2646
2709
|
CommonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CommonService, providedIn: 'root' });
|
|
2647
2710
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CommonService, decorators: [{
|
|
2648
2711
|
type: Injectable,
|
|
2649
2712
|
args: [{
|
|
2650
2713
|
providedIn: 'root'
|
|
2651
2714
|
}]
|
|
2652
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
2715
|
+
}], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
|
|
2653
2716
|
|
|
2654
2717
|
class MaterialSelectComponent extends MaterialComponent {
|
|
2655
2718
|
constructor(element, ref, http, commonService) {
|
|
@@ -2890,76 +2953,25 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
2890
2953
|
}
|
|
2891
2954
|
}
|
|
2892
2955
|
updateSecondDropdown(value) {
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
var _a, _b, _c, _d;
|
|
2901
|
-
if (this.checkVendorRefItems(items)) {
|
|
2902
|
-
const apiEndPoint = (_a = items === null || items === void 0 ? void 0 : items.component) === null || _a === void 0 ? void 0 : _a.selectValues;
|
|
2903
|
-
if (apiEndPoint != '') {
|
|
2904
|
-
var parameters = [
|
|
2905
|
-
{
|
|
2906
|
-
"key": "userId",
|
|
2907
|
-
"value": JSON.parse(localStorage.getItem('currentUser')).UserId
|
|
2908
|
-
},
|
|
2909
|
-
{
|
|
2910
|
-
"key": "vendorId",
|
|
2911
|
-
"value": vendorId
|
|
2912
|
-
},
|
|
2913
|
-
{
|
|
2914
|
-
"key": "loginUserId",
|
|
2915
|
-
"value": JSON.parse(localStorage.getItem('currentUser')).UserId
|
|
2916
|
-
},
|
|
2917
|
-
{
|
|
2918
|
-
"key": "country",
|
|
2919
|
-
"value": typeof value === 'string' ? value.trim() : ''
|
|
2920
|
-
},
|
|
2921
|
-
{
|
|
2922
|
-
"key": "dataValue",
|
|
2923
|
-
"value": typeof value === 'string' ? value.trim() : ''
|
|
2924
|
-
},
|
|
2925
|
-
{
|
|
2926
|
-
"key": "dealId",
|
|
2927
|
-
"value": dealId
|
|
2928
|
-
},
|
|
2929
|
-
{
|
|
2930
|
-
"key": "isEdit",
|
|
2931
|
-
"value": isEdit
|
|
2932
|
-
},
|
|
2933
|
-
{
|
|
2934
|
-
"key": "referenceListName",
|
|
2935
|
-
"value": (_b = items === null || items === void 0 ? void 0 : items.component) === null || _b === void 0 ? void 0 : _b.key
|
|
2936
|
-
},
|
|
2937
|
-
{
|
|
2938
|
-
"key": "referenceListFieldName",
|
|
2939
|
-
"value": (_d = (_c = this.instance) === null || _c === void 0 ? void 0 : _c.component) === null || _d === void 0 ? void 0 : _d.key
|
|
2940
|
-
}
|
|
2941
|
-
];
|
|
2942
|
-
finalParams = parameters === null || parameters === void 0 ? void 0 : parameters.filter(f1 => { var _a, _b; return (_b = (_a = items === null || items === void 0 ? void 0 : items.component) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.headers.some(f2 => f1.key === f2.key); });
|
|
2943
|
-
if (Array.isArray(finalParams)) {
|
|
2944
|
-
const index = finalParams.findIndex(param => param.key === 'dataValue');
|
|
2945
|
-
if (index !== -1) {
|
|
2946
|
-
// If the object exists, update its value
|
|
2947
|
-
finalParams[index].value = value;
|
|
2948
|
-
}
|
|
2949
|
-
else {
|
|
2950
|
-
// If the object doesn't exist, add it to the array
|
|
2951
|
-
finalParams.push({ key: 'dataValue', value: value });
|
|
2952
|
-
}
|
|
2953
|
-
this.commonService.initializeApiPath(apiEndPoint, finalParams).subscribe(response => {
|
|
2954
|
-
if (response && response.code === 200) {
|
|
2955
|
-
this.secondDropdownItems = response.data;
|
|
2956
|
-
this.commonService.setDropdownItems(this.secondDropdownItems);
|
|
2957
|
-
}
|
|
2958
|
-
});
|
|
2959
|
-
}
|
|
2960
|
-
}
|
|
2956
|
+
const apiEndPoint = 'ManageVendors/GetReferenceDataItemsByVendorIdAndDataValue';
|
|
2957
|
+
let finalParams = JSON.parse(localStorage.getItem('cascadingDropdownsParams'));
|
|
2958
|
+
if (Array.isArray(finalParams)) {
|
|
2959
|
+
const index = finalParams.findIndex(param => param.key === 'dataValue');
|
|
2960
|
+
if (index !== -1) {
|
|
2961
|
+
// If the object exists, update its value
|
|
2962
|
+
finalParams[index].value = value;
|
|
2961
2963
|
}
|
|
2962
|
-
|
|
2964
|
+
else {
|
|
2965
|
+
// If the object doesn't exist, add it to the array
|
|
2966
|
+
finalParams.push({ key: 'dataValue', value: value });
|
|
2967
|
+
}
|
|
2968
|
+
this.commonService.initializeApiPath(apiEndPoint, finalParams).subscribe(response => {
|
|
2969
|
+
if (response && response.code === 200) {
|
|
2970
|
+
this.secondDropdownItems = response.data;
|
|
2971
|
+
this.commonService.setDropdownItems(this.secondDropdownItems);
|
|
2972
|
+
}
|
|
2973
|
+
});
|
|
2974
|
+
}
|
|
2963
2975
|
}
|
|
2964
2976
|
ngAfterViewInit() {
|
|
2965
2977
|
this.selectElem.openedChange.subscribe((isOpen) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -3117,7 +3129,7 @@ class MaterialSelectComponent extends MaterialComponent {
|
|
|
3117
3129
|
return _.isEqual(o1, o2);
|
|
3118
3130
|
}
|
|
3119
3131
|
}
|
|
3120
|
-
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$
|
|
3132
|
+
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$2.HttpClient }, { token: CommonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3121
3133
|
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: `
|
|
3122
3134
|
<mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
|
|
3123
3135
|
<ng-template #componentTemplate let-hasLabel>
|
|
@@ -3202,7 +3214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
3202
3214
|
</mat-form-field>
|
|
3203
3215
|
</ng-template>
|
|
3204
3216
|
`, 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"] }]
|
|
3205
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$
|
|
3217
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$2.HttpClient }, { type: CommonService }]; }, propDecorators: { multiSelect: [{
|
|
3206
3218
|
type: ViewChild,
|
|
3207
3219
|
args: ['multiSelect', { static: true }]
|
|
3208
3220
|
}], selectElem: [{
|
|
@@ -3261,18 +3273,455 @@ class ConfirmationDialogComponent {
|
|
|
3261
3273
|
ngOnInit() {
|
|
3262
3274
|
}
|
|
3263
3275
|
}
|
|
3264
|
-
ConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: i1$
|
|
3265
|
-
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\">\r\n<h2 mat-dialog-title class=\"data-grid-alert\">Alert</h2>\r\n<mat-dialog-content class=\"data-grid-popup-body\">\r\n {{data.message}}\r\n</mat-dialog-content>\r\n<mat-dialog-actions class=\"data-grid-popup-footer\">\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"warn\" *ngIf=\"data.buttonStatus\">Delete</button>\r\n <button mat-button [mat-dialog-close]=\"false\" [ngClass]=\"{'data-grid-closed-btn': !data.buttonStatus}\">{{data.buttonStatus ? 'Cancel': 'Close'}}</button>\r\n</mat-dialog-actions>\r\n</div>", styles: ["::ng-deep .data-grid-closed-btn .mat-button-focus-overlay{background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.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: i6.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i1$
|
|
3276
|
+
ConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
3277
|
+
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\">\r\n<h2 mat-dialog-title class=\"data-grid-alert\">Alert</h2>\r\n<mat-dialog-content class=\"data-grid-popup-body\">\r\n {{data.message}}\r\n</mat-dialog-content>\r\n<mat-dialog-actions class=\"data-grid-popup-footer\">\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"warn\" *ngIf=\"data.buttonStatus\">Delete</button>\r\n <button mat-button [mat-dialog-close]=\"false\" [ngClass]=\"{'data-grid-closed-btn': !data.buttonStatus}\">{{data.buttonStatus ? 'Cancel': 'Close'}}</button>\r\n</mat-dialog-actions>\r\n</div>", styles: ["::ng-deep .data-grid-closed-btn .mat-button-focus-overlay{background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.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: i6.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { 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"] }] });
|
|
3266
3278
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
3267
3279
|
type: Component,
|
|
3268
3280
|
args: [{ selector: 'NgxMat-confirmation-dialog', template: "<div class=\"dialog-container\">\r\n<h2 mat-dialog-title class=\"data-grid-alert\">Alert</h2>\r\n<mat-dialog-content class=\"data-grid-popup-body\">\r\n {{data.message}}\r\n</mat-dialog-content>\r\n<mat-dialog-actions class=\"data-grid-popup-footer\">\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"warn\" *ngIf=\"data.buttonStatus\">Delete</button>\r\n <button mat-button [mat-dialog-close]=\"false\" [ngClass]=\"{'data-grid-closed-btn': !data.buttonStatus}\">{{data.buttonStatus ? 'Cancel': 'Close'}}</button>\r\n</mat-dialog-actions>\r\n</div>", styles: ["::ng-deep .data-grid-closed-btn .mat-button-focus-overlay{background-color:transparent}\n"] }]
|
|
3269
3281
|
}], ctorParameters: function () {
|
|
3270
|
-
return [{ type: i1$
|
|
3282
|
+
return [{ type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
|
|
3271
3283
|
type: Inject,
|
|
3272
3284
|
args: [MAT_DIALOG_DATA]
|
|
3273
3285
|
}] }];
|
|
3274
3286
|
} });
|
|
3275
3287
|
|
|
3288
|
+
class AddOnProductsComponent {
|
|
3289
|
+
constructor(matDialogRef, data, fb, dialog, commonSevice) {
|
|
3290
|
+
this.matDialogRef = matDialogRef;
|
|
3291
|
+
this.fb = fb;
|
|
3292
|
+
this.dialog = dialog;
|
|
3293
|
+
this.commonSevice = commonSevice;
|
|
3294
|
+
this.dropdownOne = [];
|
|
3295
|
+
this.dropdownTwo = [];
|
|
3296
|
+
this.dropdownThree = [];
|
|
3297
|
+
this.dropdownFour = [];
|
|
3298
|
+
this.filteredDropdownOne = [];
|
|
3299
|
+
this.filteredDropdownTwo = [];
|
|
3300
|
+
this.filteredDropdownThree = [];
|
|
3301
|
+
this.filteredDropdownFour = [];
|
|
3302
|
+
this.addProductsColumns = ['select', 'productName', 'skuNumber'];
|
|
3303
|
+
this.showAllproductsColumns = ['delete', 'productName', 'categoryName', 'subCategory', 'Quantity', 'price', 'skuNumber'];
|
|
3304
|
+
this.quantityList = [5, 10, 15, 20, 25];
|
|
3305
|
+
this.ELEMENT_DATA = [];
|
|
3306
|
+
this.dataSource = new MatTableDataSource();
|
|
3307
|
+
this.selection = new SelectionModel(true, []);
|
|
3308
|
+
this.selectedDataSource = new MatTableDataSource([]);
|
|
3309
|
+
this.selectedCategory = null;
|
|
3310
|
+
this.selectedSubCategory = null;
|
|
3311
|
+
this.showCategory = false;
|
|
3312
|
+
this.showSubcategory = false;
|
|
3313
|
+
this.showPrice = true;
|
|
3314
|
+
this.showQuantity = true;
|
|
3315
|
+
this.showSkuNumber = false;
|
|
3316
|
+
this.showNewProductPicker = true;
|
|
3317
|
+
this.setCategory = '';
|
|
3318
|
+
this.setSubCategory = '';
|
|
3319
|
+
this.loadingFlag = false;
|
|
3320
|
+
this.pageNumber = 1;
|
|
3321
|
+
this.pageSize = 20;
|
|
3322
|
+
this.totalPages = 0;
|
|
3323
|
+
this.searchQuery = '';
|
|
3324
|
+
this.itemList = [];
|
|
3325
|
+
this.prevScrollPosition = 0; // Track the previous scroll position
|
|
3326
|
+
this.spinnerFlag = false;
|
|
3327
|
+
this.dropdownL1 = false;
|
|
3328
|
+
this.dropdownL2 = false;
|
|
3329
|
+
this.dropdownL3 = false;
|
|
3330
|
+
this.dropdownL4 = false;
|
|
3331
|
+
this.dropdownL1Label = '';
|
|
3332
|
+
this.dropdownL2Label = '';
|
|
3333
|
+
this.dropdownL3Label = '';
|
|
3334
|
+
this.dropdownL4Label = '';
|
|
3335
|
+
this.dropDownCount = 0;
|
|
3336
|
+
this.disablePrice = true;
|
|
3337
|
+
this.showCategory = data.dropdownsFlag.showDialogCategory;
|
|
3338
|
+
this.showSubcategory = data.dropdownsFlag.showDialogSubCategory;
|
|
3339
|
+
this.showPrice = data.dropdownsFlag.showDialogPrice;
|
|
3340
|
+
this.showQuantity = data.dropdownsFlag.showDialogQuantity;
|
|
3341
|
+
this.showSkuNumber = data.dropdownsFlag.showDialogSkuNumber;
|
|
3342
|
+
this.showNewProductPicker = data.dropdownsFlag.showNewProductPicker;
|
|
3343
|
+
this.dropdownL1 = data.dropdownsFlag.dropdownL1;
|
|
3344
|
+
this.dropdownL2 = data.dropdownsFlag.dropdownL2;
|
|
3345
|
+
this.dropdownL3 = data.dropdownsFlag.dropdownL3;
|
|
3346
|
+
this.dropdownL4 = data.dropdownsFlag.dropdownL4;
|
|
3347
|
+
this.dropdownL1Label = data.dropdownsFlag.dropdownL1Label;
|
|
3348
|
+
this.dropdownL2Label = data.dropdownsFlag.dropdownL2Label;
|
|
3349
|
+
this.dropdownL3Label = data.dropdownsFlag.dropdownL3Label;
|
|
3350
|
+
this.dropdownL4Label = data.dropdownsFlag.dropdownL4Label;
|
|
3351
|
+
this.dropDownCount = this.countTrueDropdowns(data.dropdownsFlag);
|
|
3352
|
+
this.selection = new SelectionModel(true, data.selectedProducts || []);
|
|
3353
|
+
this.form = this.fb.group({
|
|
3354
|
+
dropdownLevel1: [''],
|
|
3355
|
+
dropdownLevel2: [''],
|
|
3356
|
+
dropdownLevel3: [''],
|
|
3357
|
+
dropdownLevel4: [''],
|
|
3358
|
+
searchProductName: [''],
|
|
3359
|
+
selectedProducts: this.fb.array([])
|
|
3360
|
+
});
|
|
3361
|
+
this.initializeFormArray();
|
|
3362
|
+
if (!this.showCategory) {
|
|
3363
|
+
this.removeColumn('categoryName');
|
|
3364
|
+
}
|
|
3365
|
+
if (!this.showPrice) {
|
|
3366
|
+
this.removeColumn('price');
|
|
3367
|
+
}
|
|
3368
|
+
if (!this.showSubcategory) {
|
|
3369
|
+
this.removeColumn('subCategory');
|
|
3370
|
+
}
|
|
3371
|
+
if (!this.showQuantity) {
|
|
3372
|
+
this.removeColumn('Quantity');
|
|
3373
|
+
}
|
|
3374
|
+
if (!this.showSkuNumber) {
|
|
3375
|
+
this.removeColumn('skuNumber');
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
removeColumn(columnName) {
|
|
3379
|
+
this.showAllproductsColumns = this.showAllproductsColumns.filter(column => column !== columnName);
|
|
3380
|
+
this.addProductsColumns = this.addProductsColumns.filter(column => column !== columnName);
|
|
3381
|
+
}
|
|
3382
|
+
initializeFormArray() {
|
|
3383
|
+
const selectedProductsArray = this.form.get('selectedProducts');
|
|
3384
|
+
this.selection.selected.forEach(product => {
|
|
3385
|
+
selectedProductsArray.push(this.fb.group({
|
|
3386
|
+
price: [product.price || '', Validators.required],
|
|
3387
|
+
text: [product.text || ''],
|
|
3388
|
+
quantity: [product.quantity || '', Validators.required],
|
|
3389
|
+
category: [(product === null || product === void 0 ? void 0 : product.category) || ''],
|
|
3390
|
+
subCategory: [(product === null || product === void 0 ? void 0 : product.subCategory) || ''],
|
|
3391
|
+
value: [(product === null || product === void 0 ? void 0 : product.value) || ''],
|
|
3392
|
+
skuNumber: [(product === null || product === void 0 ? void 0 : product.value) || '']
|
|
3393
|
+
}));
|
|
3394
|
+
});
|
|
3395
|
+
selectedProductsArray.controls.forEach(control => {
|
|
3396
|
+
var _a;
|
|
3397
|
+
(_a = control.get('price')) === null || _a === void 0 ? void 0 : _a.disable();
|
|
3398
|
+
});
|
|
3399
|
+
this.selectedDataSource.data = [...this.selection.selected];
|
|
3400
|
+
}
|
|
3401
|
+
initializeDataSources() {
|
|
3402
|
+
var _a, _b, _c, _d;
|
|
3403
|
+
// Ensure selected items are marked in the main data source
|
|
3404
|
+
if ((_b = (_a = this.selection) === null || _a === void 0 ? void 0 : _a.selected) === null || _b === void 0 ? void 0 : _b.length) {
|
|
3405
|
+
(_d = (_c = this.selection) === null || _c === void 0 ? void 0 : _c.selected) === null || _d === void 0 ? void 0 : _d.forEach(selectedProduct => {
|
|
3406
|
+
const index = this.dataSource.data.findIndex(product => product.value === selectedProduct.value);
|
|
3407
|
+
if (index >= 0) {
|
|
3408
|
+
this.dataSource.data[index] = selectedProduct;
|
|
3409
|
+
}
|
|
3410
|
+
});
|
|
3411
|
+
this.selectedDataSource.data = [...this.selection.selected];
|
|
3412
|
+
}
|
|
3413
|
+
else {
|
|
3414
|
+
console.warn('No selected products found.');
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
ngAfterViewInit() {
|
|
3418
|
+
}
|
|
3419
|
+
ngOnInit() {
|
|
3420
|
+
// this.loadProductCategory();
|
|
3421
|
+
this.loadDropdownL1();
|
|
3422
|
+
this.form.get('dropdownLevel1').valueChanges
|
|
3423
|
+
.pipe(startWith(''), map(value => this.filterProducts(value, 'category1'))).subscribe(l1 => {
|
|
3424
|
+
this.filteredDropdownOne = l1;
|
|
3425
|
+
});
|
|
3426
|
+
this.form.get('dropdownLevel2').valueChanges
|
|
3427
|
+
.pipe(startWith(''), map(value => this.filterProducts(value, 'category2'))).subscribe(l2 => {
|
|
3428
|
+
this.filteredDropdownTwo = l2;
|
|
3429
|
+
});
|
|
3430
|
+
this.form.get('dropdownLevel3').valueChanges
|
|
3431
|
+
.pipe(startWith(''), map(value => this.filterProducts(value, 'category3'))).subscribe(l3 => {
|
|
3432
|
+
this.filteredDropdownThree = l3;
|
|
3433
|
+
});
|
|
3434
|
+
this.form.get('dropdownLevel4').valueChanges
|
|
3435
|
+
.pipe(startWith(''), map(value => this.filterProducts(value, 'category4'))).subscribe(l4 => {
|
|
3436
|
+
this.filteredDropdownFour = l4;
|
|
3437
|
+
});
|
|
3438
|
+
}
|
|
3439
|
+
handleDropdownFilter() {
|
|
3440
|
+
var _a, _b, _c, _d, _e;
|
|
3441
|
+
if (this.form.controls.dropdownLevel1.value !== '' || this.form.controls.searchProductName.value !== '') {
|
|
3442
|
+
this.searchQuery = (_a = this.form.controls.searchProductName) === null || _a === void 0 ? void 0 : _a.value;
|
|
3443
|
+
this.levelOneId = (_b = this.form.controls.dropdownLevel1.value) === null || _b === void 0 ? void 0 : _b.id;
|
|
3444
|
+
this.levelTwoId = (_c = this.form.controls.dropdownLevel2.value) === null || _c === void 0 ? void 0 : _c.id;
|
|
3445
|
+
this.levelThreeId = (_d = this.form.controls.dropdownLevel3.value) === null || _d === void 0 ? void 0 : _d.id;
|
|
3446
|
+
this.levelFourId = (_e = this.form.controls.dropdownLevel4.value) === null || _e === void 0 ? void 0 : _e.id;
|
|
3447
|
+
this.getProducts(false);
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
loadDropdownL1() {
|
|
3451
|
+
this.spinnerFlag = true;
|
|
3452
|
+
this.commonSevice.productLevelOne().subscribe(response => {
|
|
3453
|
+
this.spinnerFlag = false;
|
|
3454
|
+
if (response && response.code === 200) {
|
|
3455
|
+
this.dropdownOne = response.data;
|
|
3456
|
+
this.filteredDropdownOne = this.filterProducts('', 'category1');
|
|
3457
|
+
}
|
|
3458
|
+
});
|
|
3459
|
+
}
|
|
3460
|
+
loadDropdownL2(levelOneId) {
|
|
3461
|
+
this.spinnerFlag = true;
|
|
3462
|
+
this.commonSevice.productLevelTwo(levelOneId).subscribe(response => {
|
|
3463
|
+
this.spinnerFlag = false;
|
|
3464
|
+
if (response && response.code === 200) {
|
|
3465
|
+
this.dropdownTwo = response.data;
|
|
3466
|
+
this.filteredDropdownTwo = this.filterProducts('', 'category2');
|
|
3467
|
+
}
|
|
3468
|
+
});
|
|
3469
|
+
}
|
|
3470
|
+
loadDropdownL3(levelOneId, levelTwoId) {
|
|
3471
|
+
this.spinnerFlag = true;
|
|
3472
|
+
this.commonSevice.productLevelThree(levelOneId, levelTwoId).subscribe(response => {
|
|
3473
|
+
this.spinnerFlag = false;
|
|
3474
|
+
if (response && response.code === 200) {
|
|
3475
|
+
this.dropdownThree = response.data;
|
|
3476
|
+
this.filteredDropdownThree = this.filterProducts('', 'category3');
|
|
3477
|
+
}
|
|
3478
|
+
});
|
|
3479
|
+
}
|
|
3480
|
+
loadDropdownL4(levelOneId, levelTwoId, levelThreeId) {
|
|
3481
|
+
this.spinnerFlag = true;
|
|
3482
|
+
this.commonSevice.productLevelFour(levelOneId, levelTwoId, levelThreeId).subscribe(response => {
|
|
3483
|
+
this.spinnerFlag = false;
|
|
3484
|
+
if (response && response.code === 200) {
|
|
3485
|
+
this.dropdownFour = response.data;
|
|
3486
|
+
this.filteredDropdownFour = this.filterProducts('', 'category4');
|
|
3487
|
+
}
|
|
3488
|
+
});
|
|
3489
|
+
}
|
|
3490
|
+
filterProducts(value, cat) {
|
|
3491
|
+
const filterValue = typeof value === 'string' ? value === null || value === void 0 ? void 0 : value.toLowerCase() : value;
|
|
3492
|
+
let data;
|
|
3493
|
+
// Dynamically assign the data array based on the category
|
|
3494
|
+
switch (cat) {
|
|
3495
|
+
case 'category1':
|
|
3496
|
+
data = this.dropdownOne;
|
|
3497
|
+
break;
|
|
3498
|
+
case 'category2':
|
|
3499
|
+
data = this.dropdownTwo;
|
|
3500
|
+
break;
|
|
3501
|
+
case 'category3':
|
|
3502
|
+
data = this.dropdownThree;
|
|
3503
|
+
break;
|
|
3504
|
+
case 'category4':
|
|
3505
|
+
data = this.dropdownFour;
|
|
3506
|
+
break;
|
|
3507
|
+
default:
|
|
3508
|
+
data = [];
|
|
3509
|
+
}
|
|
3510
|
+
if (!filterValue) {
|
|
3511
|
+
return data;
|
|
3512
|
+
}
|
|
3513
|
+
else {
|
|
3514
|
+
return data === null || data === void 0 ? void 0 : data.filter(option => { var _a; return (_a = option['name']) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(filterValue); });
|
|
3515
|
+
}
|
|
3516
|
+
}
|
|
3517
|
+
onSubmit() {
|
|
3518
|
+
if (this.form.valid) {
|
|
3519
|
+
this.matDialogRef.close({
|
|
3520
|
+
data: {
|
|
3521
|
+
status: true,
|
|
3522
|
+
items: this.form.getRawValue()
|
|
3523
|
+
}
|
|
3524
|
+
});
|
|
3525
|
+
}
|
|
3526
|
+
}
|
|
3527
|
+
isAllSelected() {
|
|
3528
|
+
const numSelected = this.selection.selected.length;
|
|
3529
|
+
const numRows = this.dataSource.data.length;
|
|
3530
|
+
return numSelected === numRows;
|
|
3531
|
+
}
|
|
3532
|
+
isIndeterminate() {
|
|
3533
|
+
const numSelected = this.selection.selected.length;
|
|
3534
|
+
const numRows = this.dataSource.data.length;
|
|
3535
|
+
return numSelected > 0 && numSelected < numRows;
|
|
3536
|
+
}
|
|
3537
|
+
masterToggle() {
|
|
3538
|
+
this.isAllSelected()
|
|
3539
|
+
? this.selection.clear()
|
|
3540
|
+
: this.dataSource.data.forEach(row => this.selection.select(row));
|
|
3541
|
+
this.updateSelectedProducts();
|
|
3542
|
+
}
|
|
3543
|
+
toggleSelection(row) {
|
|
3544
|
+
this.selection.toggle(row);
|
|
3545
|
+
this.updateSelectedProducts();
|
|
3546
|
+
}
|
|
3547
|
+
// Getter for the FormArray
|
|
3548
|
+
get selectedProducts() {
|
|
3549
|
+
return this.form.get('selectedProducts');
|
|
3550
|
+
}
|
|
3551
|
+
updateSelectedProducts() {
|
|
3552
|
+
var _a, _b;
|
|
3553
|
+
if (Array.isArray(this.selection.selected)) {
|
|
3554
|
+
this.selectedDataSource.data = [...this.selection.selected];
|
|
3555
|
+
const selectedProductsArray = this.selectedProducts;
|
|
3556
|
+
selectedProductsArray.clear();
|
|
3557
|
+
(_b = (_a = this.selection) === null || _a === void 0 ? void 0 : _a.selected) === null || _b === void 0 ? void 0 : _b.forEach(product => {
|
|
3558
|
+
var _a, _b;
|
|
3559
|
+
selectedProductsArray === null || selectedProductsArray === void 0 ? void 0 : selectedProductsArray.push(this.fb.group({
|
|
3560
|
+
price: [(_a = product === null || product === void 0 ? void 0 : product.price) !== null && _a !== void 0 ? _a : '', this.showPrice ? Validators.required : []],
|
|
3561
|
+
text: [(product === null || product === void 0 ? void 0 : product.text) || ''],
|
|
3562
|
+
quantity: [(_b = product === null || product === void 0 ? void 0 : product.quantity) !== null && _b !== void 0 ? _b : '', this.showQuantity ? Validators.required : []],
|
|
3563
|
+
category: [(product === null || product === void 0 ? void 0 : product.category) || ''],
|
|
3564
|
+
subCategory: [(product === null || product === void 0 ? void 0 : product.subCategory) || ''],
|
|
3565
|
+
value: [(product === null || product === void 0 ? void 0 : product.value) || ''],
|
|
3566
|
+
skuNumber: [(product === null || product === void 0 ? void 0 : product.value) || '']
|
|
3567
|
+
}));
|
|
3568
|
+
});
|
|
3569
|
+
selectedProductsArray.controls.forEach(control => {
|
|
3570
|
+
var _a;
|
|
3571
|
+
(_a = control.get('price')) === null || _a === void 0 ? void 0 : _a.disable();
|
|
3572
|
+
});
|
|
3573
|
+
}
|
|
3574
|
+
else {
|
|
3575
|
+
console.error('Selection.selected is not an array:', this.selection.selected);
|
|
3576
|
+
}
|
|
3577
|
+
}
|
|
3578
|
+
getTotalRows() {
|
|
3579
|
+
return this.dataSource.data.length;
|
|
3580
|
+
}
|
|
3581
|
+
getSelectedRowsCount() {
|
|
3582
|
+
return this.selection.selected.length;
|
|
3583
|
+
}
|
|
3584
|
+
onOptionSelected(event, category) {
|
|
3585
|
+
let selectedValue;
|
|
3586
|
+
if (event && event.option && event.option.value !== undefined) {
|
|
3587
|
+
selectedValue = event.option.value.id;
|
|
3588
|
+
}
|
|
3589
|
+
else {
|
|
3590
|
+
selectedValue = event;
|
|
3591
|
+
}
|
|
3592
|
+
if (category === 'category1') {
|
|
3593
|
+
this.levelOneId = selectedValue;
|
|
3594
|
+
this.form.get('dropdownLevel2').setValue(null);
|
|
3595
|
+
this.form.get('dropdownLevel3').setValue(null);
|
|
3596
|
+
this.form.get('dropdownLevel4').setValue(null);
|
|
3597
|
+
this.filteredDropdownTwo = [];
|
|
3598
|
+
this.filteredDropdownThree = [];
|
|
3599
|
+
this.filteredDropdownFour = [];
|
|
3600
|
+
if (this.dropdownL2) {
|
|
3601
|
+
this.loadDropdownL2(this.levelOneId);
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
if (category === 'category2') {
|
|
3605
|
+
this.levelTwoId = selectedValue;
|
|
3606
|
+
this.form.get('dropdownLevel3').setValue(null);
|
|
3607
|
+
this.form.get('dropdownLevel4').setValue(null);
|
|
3608
|
+
this.filteredDropdownThree = [];
|
|
3609
|
+
this.filteredDropdownFour = [];
|
|
3610
|
+
if (this.dropdownL3) {
|
|
3611
|
+
this.loadDropdownL3(this.levelOneId, this.levelTwoId);
|
|
3612
|
+
}
|
|
3613
|
+
}
|
|
3614
|
+
if (category === 'category3') {
|
|
3615
|
+
this.levelThreeId = selectedValue;
|
|
3616
|
+
this.form.get('dropdownLevel4').setValue(null);
|
|
3617
|
+
this.filteredDropdownFour = [];
|
|
3618
|
+
if (this.dropdownL4) {
|
|
3619
|
+
this.loadDropdownL4(this.levelOneId, this.levelTwoId, this.levelThreeId);
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3622
|
+
if (category === 'category4') {
|
|
3623
|
+
this.levelFourId = selectedValue;
|
|
3624
|
+
}
|
|
3625
|
+
}
|
|
3626
|
+
getProducts(flag) {
|
|
3627
|
+
this.spinnerFlag = true;
|
|
3628
|
+
const search = this.searchQuery;
|
|
3629
|
+
this.commonSevice.loadProducts(this.pageNumber, this.pageSize, search, true, false, this.levelOneId, this.levelTwoId, this.levelThreeId, this.levelFourId).subscribe(response => {
|
|
3630
|
+
var _a;
|
|
3631
|
+
this.spinnerFlag = false;
|
|
3632
|
+
if (response && response.code === 200) {
|
|
3633
|
+
this.totalPages = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.totalPages;
|
|
3634
|
+
const data = response.data.dataSource;
|
|
3635
|
+
if (this.dataSource.data.length > 0 && flag) {
|
|
3636
|
+
data.forEach(item => this.dataSource.data.push(item));
|
|
3637
|
+
this.dataSource.data = [...this.dataSource.data, ...data];
|
|
3638
|
+
}
|
|
3639
|
+
else {
|
|
3640
|
+
this.dataSource.data = data;
|
|
3641
|
+
}
|
|
3642
|
+
this.loadingFlag = true;
|
|
3643
|
+
setTimeout(() => {
|
|
3644
|
+
const middlePosition = this.trackHeight / 2 - 50;
|
|
3645
|
+
if (this.firstscrollableDiv && this.firstscrollableDiv.nativeElement) {
|
|
3646
|
+
this.firstscrollableDiv.nativeElement.scrollTo({ top: middlePosition, behavior: 'auto' });
|
|
3647
|
+
}
|
|
3648
|
+
}, 250);
|
|
3649
|
+
this.initializeDataSources();
|
|
3650
|
+
}
|
|
3651
|
+
});
|
|
3652
|
+
}
|
|
3653
|
+
removeRow(event, element) {
|
|
3654
|
+
event.stopPropagation();
|
|
3655
|
+
event.preventDefault();
|
|
3656
|
+
let message = 'Are you sure you want to delete this product?';
|
|
3657
|
+
let showButton = true;
|
|
3658
|
+
const index = this.selectedDataSource.data.indexOf(element);
|
|
3659
|
+
if (index >= 0) {
|
|
3660
|
+
if (this.selectedDataSource.data.length === 1) {
|
|
3661
|
+
message = 'Please select at least one product.';
|
|
3662
|
+
showButton = false;
|
|
3663
|
+
}
|
|
3664
|
+
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
|
3665
|
+
disableClose: true,
|
|
3666
|
+
width: '90%',
|
|
3667
|
+
maxWidth: '400px',
|
|
3668
|
+
data: { message: message, buttonStatus: showButton }
|
|
3669
|
+
});
|
|
3670
|
+
dialogRef.afterClosed().subscribe(result => {
|
|
3671
|
+
if (result) {
|
|
3672
|
+
this.selectedDataSource.data.splice(index, 1);
|
|
3673
|
+
this.selectedDataSource._updateChangeSubscription();
|
|
3674
|
+
this.selection.deselect(element);
|
|
3675
|
+
const selectedProductsArray = this.form.get('selectedProducts');
|
|
3676
|
+
const productIndex = selectedProductsArray.controls.findIndex(control => control.value.productName === element.productName);
|
|
3677
|
+
if (productIndex >= 0) {
|
|
3678
|
+
selectedProductsArray.removeAt(productIndex);
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
});
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
3684
|
+
onScroll(event) {
|
|
3685
|
+
this.trackHeight = event.target.scrollHeight - event.target.offsetHeight;
|
|
3686
|
+
if (this.loadingFlag && (Math.floor(event.target.scrollTop / this.trackHeight * 100) > 50)) {
|
|
3687
|
+
this.loadingFlag = false;
|
|
3688
|
+
if (this.pageNumber < this.totalPages) {
|
|
3689
|
+
this.pageNumber = this.pageNumber + 1;
|
|
3690
|
+
this.getProducts(true);
|
|
3691
|
+
}
|
|
3692
|
+
else {
|
|
3693
|
+
this.loadingFlag = true;
|
|
3694
|
+
}
|
|
3695
|
+
}
|
|
3696
|
+
this.prevScrollPosition = event.target.scrollTop;
|
|
3697
|
+
}
|
|
3698
|
+
countTrueDropdowns(obj) {
|
|
3699
|
+
// Dynamically find all keys that start with 'dropdownL' and are boolean (true/false)
|
|
3700
|
+
return Object.keys(obj)
|
|
3701
|
+
.filter(key => key.startsWith('dropdownL') && typeof obj[key] === 'boolean' && obj[key] === true)
|
|
3702
|
+
.length;
|
|
3703
|
+
}
|
|
3704
|
+
/* Use the property that should display in the input field */
|
|
3705
|
+
displayFn(option) {
|
|
3706
|
+
return option ? option.name : '';
|
|
3707
|
+
}
|
|
3708
|
+
}
|
|
3709
|
+
AddOnProductsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AddOnProductsComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i2.FormBuilder }, { token: i1$1.MatDialog }, { token: CommonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3710
|
+
AddOnProductsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: AddOnProductsComponent, selector: "ngx-mat-add-on-products", viewQueries: [{ propertyName: "firstscrollableDiv", first: true, predicate: ["firstscrollableDiv"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"spinnerFlag\" class=\"OverlayDiv\">\r\n <div class=\"OverlayDivContent\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n</div>\r\n<div class=\"product-selector\" mat-dialog-content>\r\n <mat-stepper labelPosition=\"bottom\" #stepper>\r\n <mat-step [stepControl]=\"form\">\r\n <form [formGroup]=\"form\">\r\n <ng-template matStepLabel>Select Products</ng-template>\r\n <div class=\"product-selection-container\">\r\n <!-- <h3>Select Products</h3> -->\r\n <p class=\"product-selection-desc\">Your ideal match is just a few preferences away. Start discovering now!</p>\r\n <mat-form-field class=\"global-search\" appearance=\"outline\">\r\n <mat-icon matPrefix class=\"material-symbols-outlined product-picker-icon\">search</mat-icon>\r\n <input matInput placeholder=\"Search Product Name\" formControlName=\"searchProductName\" />\r\n </mat-form-field>\r\n <div class=\"dropdown-selection\">\r\n <div [ngClass]=\"dropDownCount === 1 ? 'no-child': 'child'\">\r\n <div class=\"row\">\r\n <mat-form-field *ngIf=\"dropdownL1\">\r\n <mat-label>{{dropdownL1Label}}</mat-label>\r\n <input type=\"text\" matInput formControlName=\"dropdownLevel1\"\r\n [matAutocomplete]=\"auto3\">\r\n <mat-autocomplete [displayWith]=\"displayFn\" #auto3=\"matAutocomplete\"\r\n (optionSelected)=\"onOptionSelected($event, 'category1')\">\r\n <mat-option *ngFor=\"let option of filteredDropdownOne\"\r\n [value]=\"option\">{{option.name}}</mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n\r\n <mat-form-field *ngIf=\"dropdownL2\">\r\n <mat-label>{{dropdownL2Label}}</mat-label>\r\n <input type=\"text\" matInput formControlName=\"dropdownLevel2\"\r\n [matAutocomplete]=\"auto4\">\r\n <mat-autocomplete [displayWith]=\"displayFn\" #auto4=\"matAutocomplete\"\r\n (optionSelected)=\"onOptionSelected($event, 'category2')\">\r\n <mat-option *ngFor=\"let option of filteredDropdownTwo\"\r\n [value]=\"option\">{{option.name}}</mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n\r\n <mat-form-field *ngIf=\"dropdownL3\">\r\n <mat-label>{{dropdownL3Label}}</mat-label>\r\n <input type=\"text\" matInput formControlName=\"dropdownLevel3\"\r\n [matAutocomplete]=\"auto3\">\r\n <mat-autocomplete [displayWith]=\"displayFn\" #auto3=\"matAutocomplete\"\r\n (optionSelected)=\"onOptionSelected($event, 'category3')\">\r\n <mat-option *ngFor=\"let option of filteredDropdownThree\"\r\n [value]=\"option\">{{option.name}}</mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n\r\n <mat-form-field *ngIf=\"dropdownL4\">\r\n <mat-label>{{dropdownL4Label}}</mat-label>\r\n <input type=\"text\" matInput formControlName=\"dropdownLevel4\"\r\n [matAutocomplete]=\"auto4\">\r\n <mat-autocomplete [displayWith]=\"displayFn\" #auto4=\"matAutocomplete\"\r\n (optionSelected)=\"onOptionSelected($event, 'category4')\">\r\n <mat-option *ngFor=\"let option of filteredDropdownFour\"\r\n [value]=\"option\">{{option.name}}</mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Search Button -->\r\n <div fxLayout=\"row\" fxLayoutAlign=\"left\" class=\"margin-top search-btn-wrp\">\r\n <button mat-button color=\"primary\" mat-raised-button\r\n (click)=\"handleDropdownFilter();$event.stopPropagation();\">Search</button>\r\n </div>\r\n </div>\r\n <div #firstscrollableDiv id=\"firstscrollableDiv\" class=\"new-class first-div\"\r\n (scroll)=\"onScroll($event)\">\r\n <table mat-table [dataSource]=\"dataSource\" class=\"mat-table abc\"\r\n *ngIf=\"dataSource && dataSource.data.length > 0; else noData\">\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox color=\"primary\" (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? toggleSelection(row) : null\"\r\n [checked]=\"selection.isSelected(row)\"></mat-checkbox>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"productName\">\r\n <th mat-header-cell *matHeaderCellDef> Product Name </th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element?.text}} </td>\r\n </ng-container>\r\n <!-- <ng-container matColumnDef=\"price\" *ngIf=\"showPrice\">\r\n <th mat-header-cell *matHeaderCellDef> Price </th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element?.price}} </td>\r\n </ng-container> -->\r\n <ng-container matColumnDef=\"skuNumber\" *ngIf=\"showSkuNumber\">\r\n <th mat-header-cell *matHeaderCellDef> SKU Number </th>\r\n <td mat-cell *matCellDef=\"let element\"> #SkuNumber-{{element?.value}} </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"addProductsColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: addProductsColumns;\"></tr>\r\n </table>\r\n <ng-template #noData>\r\n <div class=\"no-data-message\">\r\n No data found.\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div class=\"row-summary\">\r\n <p>Rows: {{ getTotalRows() }} Selected: {{ getSelectedRowsCount() }}</p>\r\n </div>\r\n <div class=\"tabs-action-step-one\">\r\n <button mat-button matStepperNext\r\n [disabled]=\"selection.selected.length ? false : true\" color=\"primary\" mat-raised-button>Next</button>\r\n <button mat-button [mat-dialog-close]=\"false\">Cancel</button>\r\n </div>\r\n </form>\r\n </mat-step>\r\n <mat-step [stepControl]=\"form\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\r\n <ng-template matStepLabel>Edit/Save</ng-template>\r\n <div class=\"new-class\">\r\n <table mat-table [dataSource]=\"selectedDataSource\"\r\n *ngIf=\"selectedDataSource && selectedDataSource.data.length > 0; else showBlank\">\r\n <ng-container matColumnDef=\"delete\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button class=\"delete-btn-picker\" mat-button (click)=\"$event.stopPropagation();removeRow($event, element)\">\r\n <mat-icon aria-hidden=\"false\" aria-label=\"Remove row\">delete</mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"productName\">\r\n <th mat-header-cell *matHeaderCellDef> Product Name </th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element.text}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"categoryName\" *ngIf=\"showCategory\">\r\n <th mat-header-cell *matHeaderCellDef> Category Name </th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element.category}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"subCategory\" *ngIf=\"showSubcategory\">\r\n <th mat-header-cell *matHeaderCellDef>Sub Category </th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element.subCategory}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"price\" *ngIf=\"showPrice\">\r\n <th mat-header-cell *matHeaderCellDef>Price</th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\">\r\n <mat-form-field class=\"example-full-width select-price\">\r\n <mat-label>Price</mat-label>\r\n <input matInput [formControl]=\"selectedProducts.at(i).get('price')\"\r\n placeholder=\"Please enter price\">\r\n <mat-error *ngIf=\"selectedProducts.at(i).get('price').hasError('required')\">\r\n Price is required\r\n </mat-error>\r\n </mat-form-field>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"Quantity\" *ngIf=\"showQuantity\">\r\n <th mat-header-cell *matHeaderCellDef> Quantity </th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\">\r\n <mat-form-field class=\"example-full-width select-qunatity\">\r\n <mat-label>Select quantity</mat-label>\r\n <input matInput [formControl]=\"selectedProducts.at(i).get('quantity')\"\r\n placeholder=\"Please enter quantity\">\r\n <mat-error *ngIf=\"selectedProducts.at(i).get('quantity').hasError('required')\">\r\n Quantity is required\r\n </mat-error>\r\n </mat-form-field>\r\n </td>\r\n </ng-container>\r\n showSkuNumber={{showSkuNumber}}\r\n <ng-container matColumnDef=\"skuNumber\" *ngIf=\"showSkuNumber\">\r\n <th mat-header-cell *matHeaderCellDef> SKU Number </th>\r\n <td mat-cell *matCellDef=\"let element\">#SkuNumber-{{element?.value}} </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"showAllproductsColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: showAllproductsColumns;\"></tr>\r\n </table>\r\n <ng-template #showBlank>\r\n <div class=\"no-data-message\">\r\n No data found.\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div class=\"tabs-action\">\r\n <div class=\"tab-action-wrp\">\r\n <button mat-button matStepperPrevious>Back</button>\r\n </div>\r\n \r\n <div class=\"tab-action-wrp\">\r\n <button mat-button matStepperNext type=\"submit\" color=\"primary\" mat-raised-button>Add products</button>\r\n </div>\r\n </div>\r\n </form>\r\n </mat-step>\r\n </mat-stepper>\r\n</div>", styles: [".dropdown-section{display:flex;flex-direction:column;gap:16px}.form-row{display:flex;gap:16px}mat-form-field{flex:1}.new-class{margin:20px 0;border:1px solid #ddd;border-radius:5px}.mat-column-select{width:50px;text-align:center}.mat-header-cell,.mat-cell{text-align:center}button{align-self:flex-end;margin-top:20px}.row-summary{margin-top:20px;font-weight:700}.new-class td{border:1px solid #ddd;padding:10px}.new-class th{background-color:#f2f2f2;position:-webkit-sticky;position:sticky;top:0;transform:none;z-index:99;padding:10px}table{width:100%;border-collapse:collapse}.select-qunatity,.select-price{width:110px}.no-data-message{text-align:center;margin:20px 0;font-size:18px;color:#888}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused,.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:transparent}.OverlayDiv{position:fixed;display:block;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:#00000080;z-index:500;cursor:pointer}.OverlayDivContent{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)}.product-selection-container{max-width:800px;margin:0 auto;text-align:center}.global-search{width:100%;margin-bottom:20px}.dropdown-selection{display:flex;flex-direction:column;width:100%}.row{display:flex;justify-content:space-between;width:100%;margin-bottom:20px;flex-wrap:wrap}.dropdown-item{flex:1;margin-right:10px}.dropdown-item:last-child{margin-right:0}.scrollable-div{max-height:350px;overflow-y:auto;margin-top:20px;margin-bottom:20px}.mat-table{width:100%;border-collapse:collapse}.dropdown-selection>div{display:flex;justify-content:space-between;border:1px solid #ddd;border-radius:5px;padding:20px;flex-wrap:wrap}.mat-form-field:last-child{margin-right:0}.search-btn-wrp{justify-content:flex-start}.no-child .mat-form-field{width:100%}.child .mat-form-field{flex:0 0 calc(50% - 20px)}.delete-btn-picker .mat-icon{color:#e53935!important;font-size:24px;width:auto;height:auto}.delete-btn-picker{margin:0}.product-selection-desc{text-align:left}.tabs-action{display:flex;justify-content:space-between}.tabs-action-step-one{justify-content:flex-end;display:flex}::ng-deep .product-selection-container .mat-form-field-infix{padding:10px 4px 17px!important}::ng-deep .product-selection-container .mat-form-field-flex{align-items:center}::ng-deep .product-selection-container .product-picker-icon{font-size:18px;width:auto;height:auto;color:#0000004d}::ng-deep .product-selection-container .mat-form-field-appearance-outline .mat-form-field-outline-thick,::ng-deep .product-selection-container .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:#0000001f}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.ɵ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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: i4$2.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: i3$2.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$5.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i10$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i10$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i10$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i10$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i10$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i10$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i10$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i10$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i10$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i10$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i11.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i6.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i15.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i15.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i15.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["selectedIndex", "disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i15.MatStepperNext, selector: "button[matStepperNext]", inputs: ["type"] }, { kind: "directive", type: i15.MatStepperPrevious, selector: "button[matStepperPrevious]", inputs: ["type"] }, { 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.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i16.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i16.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }] });
|
|
3711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AddOnProductsComponent, decorators: [{
|
|
3712
|
+
type: Component,
|
|
3713
|
+
args: [{ selector: 'ngx-mat-add-on-products', template: "<div *ngIf=\"spinnerFlag\" class=\"OverlayDiv\">\r\n <div class=\"OverlayDivContent\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n</div>\r\n<div class=\"product-selector\" mat-dialog-content>\r\n <mat-stepper labelPosition=\"bottom\" #stepper>\r\n <mat-step [stepControl]=\"form\">\r\n <form [formGroup]=\"form\">\r\n <ng-template matStepLabel>Select Products</ng-template>\r\n <div class=\"product-selection-container\">\r\n <!-- <h3>Select Products</h3> -->\r\n <p class=\"product-selection-desc\">Your ideal match is just a few preferences away. Start discovering now!</p>\r\n <mat-form-field class=\"global-search\" appearance=\"outline\">\r\n <mat-icon matPrefix class=\"material-symbols-outlined product-picker-icon\">search</mat-icon>\r\n <input matInput placeholder=\"Search Product Name\" formControlName=\"searchProductName\" />\r\n </mat-form-field>\r\n <div class=\"dropdown-selection\">\r\n <div [ngClass]=\"dropDownCount === 1 ? 'no-child': 'child'\">\r\n <div class=\"row\">\r\n <mat-form-field *ngIf=\"dropdownL1\">\r\n <mat-label>{{dropdownL1Label}}</mat-label>\r\n <input type=\"text\" matInput formControlName=\"dropdownLevel1\"\r\n [matAutocomplete]=\"auto3\">\r\n <mat-autocomplete [displayWith]=\"displayFn\" #auto3=\"matAutocomplete\"\r\n (optionSelected)=\"onOptionSelected($event, 'category1')\">\r\n <mat-option *ngFor=\"let option of filteredDropdownOne\"\r\n [value]=\"option\">{{option.name}}</mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n\r\n <mat-form-field *ngIf=\"dropdownL2\">\r\n <mat-label>{{dropdownL2Label}}</mat-label>\r\n <input type=\"text\" matInput formControlName=\"dropdownLevel2\"\r\n [matAutocomplete]=\"auto4\">\r\n <mat-autocomplete [displayWith]=\"displayFn\" #auto4=\"matAutocomplete\"\r\n (optionSelected)=\"onOptionSelected($event, 'category2')\">\r\n <mat-option *ngFor=\"let option of filteredDropdownTwo\"\r\n [value]=\"option\">{{option.name}}</mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n\r\n <mat-form-field *ngIf=\"dropdownL3\">\r\n <mat-label>{{dropdownL3Label}}</mat-label>\r\n <input type=\"text\" matInput formControlName=\"dropdownLevel3\"\r\n [matAutocomplete]=\"auto3\">\r\n <mat-autocomplete [displayWith]=\"displayFn\" #auto3=\"matAutocomplete\"\r\n (optionSelected)=\"onOptionSelected($event, 'category3')\">\r\n <mat-option *ngFor=\"let option of filteredDropdownThree\"\r\n [value]=\"option\">{{option.name}}</mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n\r\n <mat-form-field *ngIf=\"dropdownL4\">\r\n <mat-label>{{dropdownL4Label}}</mat-label>\r\n <input type=\"text\" matInput formControlName=\"dropdownLevel4\"\r\n [matAutocomplete]=\"auto4\">\r\n <mat-autocomplete [displayWith]=\"displayFn\" #auto4=\"matAutocomplete\"\r\n (optionSelected)=\"onOptionSelected($event, 'category4')\">\r\n <mat-option *ngFor=\"let option of filteredDropdownFour\"\r\n [value]=\"option\">{{option.name}}</mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Search Button -->\r\n <div fxLayout=\"row\" fxLayoutAlign=\"left\" class=\"margin-top search-btn-wrp\">\r\n <button mat-button color=\"primary\" mat-raised-button\r\n (click)=\"handleDropdownFilter();$event.stopPropagation();\">Search</button>\r\n </div>\r\n </div>\r\n <div #firstscrollableDiv id=\"firstscrollableDiv\" class=\"new-class first-div\"\r\n (scroll)=\"onScroll($event)\">\r\n <table mat-table [dataSource]=\"dataSource\" class=\"mat-table abc\"\r\n *ngIf=\"dataSource && dataSource.data.length > 0; else noData\">\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox color=\"primary\" (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? toggleSelection(row) : null\"\r\n [checked]=\"selection.isSelected(row)\"></mat-checkbox>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"productName\">\r\n <th mat-header-cell *matHeaderCellDef> Product Name </th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element?.text}} </td>\r\n </ng-container>\r\n <!-- <ng-container matColumnDef=\"price\" *ngIf=\"showPrice\">\r\n <th mat-header-cell *matHeaderCellDef> Price </th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element?.price}} </td>\r\n </ng-container> -->\r\n <ng-container matColumnDef=\"skuNumber\" *ngIf=\"showSkuNumber\">\r\n <th mat-header-cell *matHeaderCellDef> SKU Number </th>\r\n <td mat-cell *matCellDef=\"let element\"> #SkuNumber-{{element?.value}} </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"addProductsColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: addProductsColumns;\"></tr>\r\n </table>\r\n <ng-template #noData>\r\n <div class=\"no-data-message\">\r\n No data found.\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div class=\"row-summary\">\r\n <p>Rows: {{ getTotalRows() }} Selected: {{ getSelectedRowsCount() }}</p>\r\n </div>\r\n <div class=\"tabs-action-step-one\">\r\n <button mat-button matStepperNext\r\n [disabled]=\"selection.selected.length ? false : true\" color=\"primary\" mat-raised-button>Next</button>\r\n <button mat-button [mat-dialog-close]=\"false\">Cancel</button>\r\n </div>\r\n </form>\r\n </mat-step>\r\n <mat-step [stepControl]=\"form\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\r\n <ng-template matStepLabel>Edit/Save</ng-template>\r\n <div class=\"new-class\">\r\n <table mat-table [dataSource]=\"selectedDataSource\"\r\n *ngIf=\"selectedDataSource && selectedDataSource.data.length > 0; else showBlank\">\r\n <ng-container matColumnDef=\"delete\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button class=\"delete-btn-picker\" mat-button (click)=\"$event.stopPropagation();removeRow($event, element)\">\r\n <mat-icon aria-hidden=\"false\" aria-label=\"Remove row\">delete</mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"productName\">\r\n <th mat-header-cell *matHeaderCellDef> Product Name </th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element.text}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"categoryName\" *ngIf=\"showCategory\">\r\n <th mat-header-cell *matHeaderCellDef> Category Name </th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element.category}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"subCategory\" *ngIf=\"showSubcategory\">\r\n <th mat-header-cell *matHeaderCellDef>Sub Category </th>\r\n <td mat-cell *matCellDef=\"let element\"> {{element.subCategory}} </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"price\" *ngIf=\"showPrice\">\r\n <th mat-header-cell *matHeaderCellDef>Price</th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\">\r\n <mat-form-field class=\"example-full-width select-price\">\r\n <mat-label>Price</mat-label>\r\n <input matInput [formControl]=\"selectedProducts.at(i).get('price')\"\r\n placeholder=\"Please enter price\">\r\n <mat-error *ngIf=\"selectedProducts.at(i).get('price').hasError('required')\">\r\n Price is required\r\n </mat-error>\r\n </mat-form-field>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"Quantity\" *ngIf=\"showQuantity\">\r\n <th mat-header-cell *matHeaderCellDef> Quantity </th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\">\r\n <mat-form-field class=\"example-full-width select-qunatity\">\r\n <mat-label>Select quantity</mat-label>\r\n <input matInput [formControl]=\"selectedProducts.at(i).get('quantity')\"\r\n placeholder=\"Please enter quantity\">\r\n <mat-error *ngIf=\"selectedProducts.at(i).get('quantity').hasError('required')\">\r\n Quantity is required\r\n </mat-error>\r\n </mat-form-field>\r\n </td>\r\n </ng-container>\r\n showSkuNumber={{showSkuNumber}}\r\n <ng-container matColumnDef=\"skuNumber\" *ngIf=\"showSkuNumber\">\r\n <th mat-header-cell *matHeaderCellDef> SKU Number </th>\r\n <td mat-cell *matCellDef=\"let element\">#SkuNumber-{{element?.value}} </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"showAllproductsColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: showAllproductsColumns;\"></tr>\r\n </table>\r\n <ng-template #showBlank>\r\n <div class=\"no-data-message\">\r\n No data found.\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div class=\"tabs-action\">\r\n <div class=\"tab-action-wrp\">\r\n <button mat-button matStepperPrevious>Back</button>\r\n </div>\r\n \r\n <div class=\"tab-action-wrp\">\r\n <button mat-button matStepperNext type=\"submit\" color=\"primary\" mat-raised-button>Add products</button>\r\n </div>\r\n </div>\r\n </form>\r\n </mat-step>\r\n </mat-stepper>\r\n</div>", styles: [".dropdown-section{display:flex;flex-direction:column;gap:16px}.form-row{display:flex;gap:16px}mat-form-field{flex:1}.new-class{margin:20px 0;border:1px solid #ddd;border-radius:5px}.mat-column-select{width:50px;text-align:center}.mat-header-cell,.mat-cell{text-align:center}button{align-self:flex-end;margin-top:20px}.row-summary{margin-top:20px;font-weight:700}.new-class td{border:1px solid #ddd;padding:10px}.new-class th{background-color:#f2f2f2;position:-webkit-sticky;position:sticky;top:0;transform:none;z-index:99;padding:10px}table{width:100%;border-collapse:collapse}.select-qunatity,.select-price{width:110px}.no-data-message{text-align:center;margin:20px 0;font-size:18px;color:#888}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused,.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:transparent}.OverlayDiv{position:fixed;display:block;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:#00000080;z-index:500;cursor:pointer}.OverlayDivContent{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)}.product-selection-container{max-width:800px;margin:0 auto;text-align:center}.global-search{width:100%;margin-bottom:20px}.dropdown-selection{display:flex;flex-direction:column;width:100%}.row{display:flex;justify-content:space-between;width:100%;margin-bottom:20px;flex-wrap:wrap}.dropdown-item{flex:1;margin-right:10px}.dropdown-item:last-child{margin-right:0}.scrollable-div{max-height:350px;overflow-y:auto;margin-top:20px;margin-bottom:20px}.mat-table{width:100%;border-collapse:collapse}.dropdown-selection>div{display:flex;justify-content:space-between;border:1px solid #ddd;border-radius:5px;padding:20px;flex-wrap:wrap}.mat-form-field:last-child{margin-right:0}.search-btn-wrp{justify-content:flex-start}.no-child .mat-form-field{width:100%}.child .mat-form-field{flex:0 0 calc(50% - 20px)}.delete-btn-picker .mat-icon{color:#e53935!important;font-size:24px;width:auto;height:auto}.delete-btn-picker{margin:0}.product-selection-desc{text-align:left}.tabs-action{display:flex;justify-content:space-between}.tabs-action-step-one{justify-content:flex-end;display:flex}::ng-deep .product-selection-container .mat-form-field-infix{padding:10px 4px 17px!important}::ng-deep .product-selection-container .mat-form-field-flex{align-items:center}::ng-deep .product-selection-container .product-picker-icon{font-size:18px;width:auto;height:auto;color:#0000004d}::ng-deep .product-selection-container .mat-form-field-appearance-outline .mat-form-field-outline-thick,::ng-deep .product-selection-container .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{color:#0000001f}\n"] }]
|
|
3714
|
+
}], ctorParameters: function () {
|
|
3715
|
+
return [{ type: i1$1.MatDialogRef }, { type: undefined, decorators: [{
|
|
3716
|
+
type: Inject,
|
|
3717
|
+
args: [MAT_DIALOG_DATA]
|
|
3718
|
+
}] }, { type: i2.FormBuilder }, { type: i1$1.MatDialog }, { type: CommonService }];
|
|
3719
|
+
}, propDecorators: { firstscrollableDiv: [{
|
|
3720
|
+
type: ViewChild,
|
|
3721
|
+
args: ['firstscrollableDiv']
|
|
3722
|
+
}] } });
|
|
3723
|
+
|
|
3724
|
+
const ELEMENT_DATA = [];
|
|
3276
3725
|
class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
3277
3726
|
constructor(element, ref, dialog, commonService) {
|
|
3278
3727
|
super(element, ref);
|
|
@@ -3281,20 +3730,115 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
|
3281
3730
|
this.dialog = dialog;
|
|
3282
3731
|
this.commonService = commonService;
|
|
3283
3732
|
this.dataSource = new MatTableDataSource();
|
|
3733
|
+
this.dataSourceNew = ELEMENT_DATA;
|
|
3734
|
+
this.displayedColumnsNew = ['productName', 'category', 'subCategory', 'quantity', 'price', 'skuNumber'];
|
|
3735
|
+
this.showNewProductPicker = false;
|
|
3736
|
+
this.showCategory = false;
|
|
3737
|
+
this.showSubcategory = false;
|
|
3738
|
+
this.showPrice = true;
|
|
3739
|
+
this.showQuantity = true;
|
|
3740
|
+
this.showSkuNumber = false;
|
|
3741
|
+
this.hasInitialized = false;
|
|
3284
3742
|
this.checkSubmissionStatus = false;
|
|
3285
3743
|
this.showDataGrid = true;
|
|
3286
3744
|
this.hasValueAndEditMode = false;
|
|
3745
|
+
this.dropdownL1 = false;
|
|
3746
|
+
this.dropdownL2 = false;
|
|
3747
|
+
this.dropdownL3 = false;
|
|
3748
|
+
this.dropdownL4 = false;
|
|
3749
|
+
this.showDialogQuantity = false;
|
|
3750
|
+
this.showDialogPrice = false;
|
|
3751
|
+
this.showDialogCategory = false;
|
|
3752
|
+
this.showDialogSkuNumber = false;
|
|
3753
|
+
this.showDialogSubCategory = false;
|
|
3754
|
+
this.dropdownL1Label = '';
|
|
3755
|
+
this.dropdownL2Label = '';
|
|
3756
|
+
this.dropdownL3Label = '';
|
|
3757
|
+
this.dropdownL4Label = '';
|
|
3287
3758
|
}
|
|
3288
3759
|
getColumnLabel(column) {
|
|
3289
3760
|
return column.label || column.key;
|
|
3290
3761
|
}
|
|
3762
|
+
checkIsAttributeTrue(newProductPickerFlag, attributeName) {
|
|
3763
|
+
return newProductPickerFlag && Object.keys(newProductPickerFlag).some(key => key.toLocaleLowerCase() === attributeName.toLowerCase() &&
|
|
3764
|
+
newProductPickerFlag[key].toLowerCase() === "true");
|
|
3765
|
+
}
|
|
3766
|
+
getLabelName(newProductPickerFlag, attributeName) {
|
|
3767
|
+
if (newProductPickerFlag && Object.keys(newProductPickerFlag).some(key => key.toLocaleLowerCase() === attributeName.toLowerCase())) {
|
|
3768
|
+
// Find the key that matches attributeName case-insensitively
|
|
3769
|
+
const matchingKey = Object.keys(newProductPickerFlag).find(key => key.toLocaleLowerCase() === attributeName.toLowerCase());
|
|
3770
|
+
// Return the value of the matching key
|
|
3771
|
+
return newProductPickerFlag[matchingKey];
|
|
3772
|
+
}
|
|
3773
|
+
return '';
|
|
3774
|
+
}
|
|
3775
|
+
// ngOnInit(): void {
|
|
3776
|
+
// }
|
|
3291
3777
|
setInstance(instance) {
|
|
3292
|
-
var _a
|
|
3778
|
+
var _a;
|
|
3779
|
+
//const newProductPickerFlag = instance?.component?.attributes;
|
|
3293
3780
|
const checkAttribute = (_a = instance === null || instance === void 0 ? void 0 : instance.component) === null || _a === void 0 ? void 0 : _a.attributes;
|
|
3781
|
+
this.showNewProductPicker = this.checkIsAttributeTrue(checkAttribute, "newproductpicker");
|
|
3782
|
+
this.showCategory = this.checkIsAttributeTrue(checkAttribute, "showCategory");
|
|
3783
|
+
this.showSubcategory = this.checkIsAttributeTrue(checkAttribute, "showSubcategory");
|
|
3784
|
+
this.showPrice = this.checkIsAttributeTrue(checkAttribute, "showPrice");
|
|
3785
|
+
this.showQuantity = this.checkIsAttributeTrue(checkAttribute, "showQuantity");
|
|
3786
|
+
this.showSkuNumber = this.checkIsAttributeTrue(checkAttribute, "showSkuNumber");
|
|
3787
|
+
this.showDialogQuantity = this.checkIsAttributeTrue(checkAttribute, "showDialogQuantity");
|
|
3788
|
+
this.showDialogPrice = this.checkIsAttributeTrue(checkAttribute, "showDialogPrice");
|
|
3789
|
+
this.showDialogCategory = this.checkIsAttributeTrue(checkAttribute, "showDialogCategory");
|
|
3790
|
+
this.showDialogSkuNumber = this.checkIsAttributeTrue(checkAttribute, "showDialogSkuNumber");
|
|
3791
|
+
this.showDialogSubCategory = this.checkIsAttributeTrue(checkAttribute, "showDialogSubCategory");
|
|
3792
|
+
const l1 = this.getLabelName(checkAttribute, "dropdownL1");
|
|
3793
|
+
const l2 = this.getLabelName(checkAttribute, "dropdownL2");
|
|
3794
|
+
const l3 = this.getLabelName(checkAttribute, "dropdownL3");
|
|
3795
|
+
const l4 = this.getLabelName(checkAttribute, "dropdownL4");
|
|
3796
|
+
this.dropdownL1 = l1 !== null && l1 !== undefined && (typeof l1 === 'string' ? l1.trim() !== "" : l1 !== "") ? true : false;
|
|
3797
|
+
this.dropdownL2 = l2 !== null && l2 !== undefined && (typeof l2 === 'string' ? l2.trim() !== "" : l2 !== "") ? true : false;
|
|
3798
|
+
this.dropdownL3 = l3 !== null && l3 !== undefined && (typeof l3 === 'string' ? l3.trim() !== "" : l3 !== "") ? true : false;
|
|
3799
|
+
this.dropdownL4 = l4 !== null && l4 !== undefined && (typeof l4 === 'string' ? l4.trim() !== "" : l4 !== "") ? true : false;
|
|
3800
|
+
if (this.dropdownL1) {
|
|
3801
|
+
this.dropdownL1Label = l1;
|
|
3802
|
+
}
|
|
3803
|
+
if (this.dropdownL2) {
|
|
3804
|
+
this.dropdownL2Label = l2;
|
|
3805
|
+
}
|
|
3806
|
+
if (this.dropdownL3) {
|
|
3807
|
+
this.dropdownL3Label = l3;
|
|
3808
|
+
}
|
|
3809
|
+
if (this.dropdownL4) {
|
|
3810
|
+
this.dropdownL4Label = l4;
|
|
3811
|
+
}
|
|
3294
3812
|
this.checkSubmissionStatus = this.commonService.checkIsAttributeTrue(checkAttribute, 'isProductOptional');
|
|
3295
|
-
this.hasValueAndEditMode = ((
|
|
3813
|
+
this.hasValueAndEditMode = ((checkAttribute === null || checkAttribute === void 0 ? void 0 : checkAttribute.hasValue) === 'yes') && ((checkAttribute === null || checkAttribute === void 0 ? void 0 : checkAttribute.editMode) === 'true');
|
|
3296
3814
|
super.setInstance(instance);
|
|
3297
|
-
if (this.
|
|
3815
|
+
if (this.showNewProductPicker && !this.hasInitialized) {
|
|
3816
|
+
if (!this.showCategory) {
|
|
3817
|
+
this.removeColumn('category');
|
|
3818
|
+
}
|
|
3819
|
+
if (!this.showQuantity) {
|
|
3820
|
+
this.removeColumn('quantity');
|
|
3821
|
+
}
|
|
3822
|
+
if (!this.showPrice) {
|
|
3823
|
+
this.removeColumn('price');
|
|
3824
|
+
}
|
|
3825
|
+
if (!this.showSubcategory) {
|
|
3826
|
+
this.removeColumn('subCategory');
|
|
3827
|
+
}
|
|
3828
|
+
if (!this.showSkuNumber) {
|
|
3829
|
+
this.removeColumn('skuNumber');
|
|
3830
|
+
}
|
|
3831
|
+
this.dealId = this.getLabelName(checkAttribute, "dealId");
|
|
3832
|
+
const storedData = localStorage.getItem(`showGridPickerProducts-${this.dealId}`) || '';
|
|
3833
|
+
const parsedData = JSON.parse(storedData || 'null');
|
|
3834
|
+
this.dataSourceNew = Array.isArray(parsedData) ? parsedData : [];
|
|
3835
|
+
// Set flag to true to prevent further execution
|
|
3836
|
+
this.hasInitialized = true;
|
|
3837
|
+
}
|
|
3838
|
+
else {
|
|
3839
|
+
this.dataSource.data = instance.dataValue;
|
|
3840
|
+
}
|
|
3841
|
+
if (this.checkSubmissionStatus && !this.hasValueAndEditMode && !this.showNewProductPicker) {
|
|
3298
3842
|
this.showDataGrid = false;
|
|
3299
3843
|
this.dataSource.data = [];
|
|
3300
3844
|
}
|
|
@@ -3329,7 +3873,10 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
|
3329
3873
|
return viewContainer ? viewContainer : null;
|
|
3330
3874
|
};
|
|
3331
3875
|
}
|
|
3332
|
-
|
|
3876
|
+
removeColumn(columnName) {
|
|
3877
|
+
this.displayedColumnsNew = this.displayedColumnsNew.filter(column => column !== columnName);
|
|
3878
|
+
}
|
|
3879
|
+
addAnotherOld() {
|
|
3333
3880
|
this.showDataGrid = true;
|
|
3334
3881
|
this.checkRowsNumber();
|
|
3335
3882
|
this.instance.addRow();
|
|
@@ -3338,6 +3885,45 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
|
3338
3885
|
}
|
|
3339
3886
|
this.dataSource.data = [...this.dataSource.data];
|
|
3340
3887
|
}
|
|
3888
|
+
addAnother() {
|
|
3889
|
+
if (this.showNewProductPicker) {
|
|
3890
|
+
const diologeRef = this.dialog.open(AddOnProductsComponent, {
|
|
3891
|
+
disableClose: true,
|
|
3892
|
+
width: '90%',
|
|
3893
|
+
maxWidth: '900px',
|
|
3894
|
+
autoFocus: false,
|
|
3895
|
+
data: { dropdownsFlag: { showNewProductPicker: this.showNewProductPicker, showDialogSubCategory: this.showDialogSubCategory, showDialogSkuNumber: this.showDialogSkuNumber, showDialogCategory: this.showDialogCategory, showDialogPrice: this.showDialogPrice, showDialogQuantity: this.showDialogQuantity, dropdownL1: this.dropdownL1, dropdownL2: this.dropdownL2, dropdownL3: this.dropdownL3, dropdownL4: this.dropdownL4, dropdownL1Label: this.dropdownL1Label, dropdownL2Label: this.dropdownL2Label, dropdownL3Label: this.dropdownL3Label, dropdownL4Label: this.dropdownL4Label }, selectedProducts: this.dataSourceNew }
|
|
3896
|
+
})
|
|
3897
|
+
.afterClosed().subscribe(response => {
|
|
3898
|
+
var _a;
|
|
3899
|
+
if ((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.status) {
|
|
3900
|
+
if (!this.showCategory) {
|
|
3901
|
+
this.removeColumn('category');
|
|
3902
|
+
}
|
|
3903
|
+
if (!this.showQuantity) {
|
|
3904
|
+
this.removeColumn('quantity');
|
|
3905
|
+
}
|
|
3906
|
+
if (!this.showPrice) {
|
|
3907
|
+
this.removeColumn('price');
|
|
3908
|
+
}
|
|
3909
|
+
if (!this.showSubcategory) {
|
|
3910
|
+
this.removeColumn('subCategory');
|
|
3911
|
+
}
|
|
3912
|
+
localStorage.setItem(`selectedProducts-${this.dealId}`, JSON.stringify(response.data.items.selectedProducts));
|
|
3913
|
+
this.dataSourceNew = response.data.items.selectedProducts;
|
|
3914
|
+
this.instance.component.defaultValue = response.data.items.selectedProducts;
|
|
3915
|
+
}
|
|
3916
|
+
});
|
|
3917
|
+
}
|
|
3918
|
+
else {
|
|
3919
|
+
this.checkRowsNumber();
|
|
3920
|
+
this.instance.addRow();
|
|
3921
|
+
if (this.dataSource.data.length < this.instance.rows.length) {
|
|
3922
|
+
this.dataSource.data.push({});
|
|
3923
|
+
}
|
|
3924
|
+
this.dataSource.data = [...this.dataSource.data];
|
|
3925
|
+
}
|
|
3926
|
+
}
|
|
3341
3927
|
checkRowsNumber() {
|
|
3342
3928
|
while (this.instance.rows.length < this.dataSource.data.length) {
|
|
3343
3929
|
this.instance.addRow();
|
|
@@ -3392,7 +3978,7 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
|
|
|
3392
3978
|
super.setValue(value);
|
|
3393
3979
|
}
|
|
3394
3980
|
}
|
|
3395
|
-
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$
|
|
3981
|
+
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 }, { token: CommonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3396
3982
|
MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialDataGridComponent, selector: "mat-formio-datagrid", usesInheritance: true, ngImport: i0, template: `
|
|
3397
3983
|
<mat-formio-form-field [instance]="instance"
|
|
3398
3984
|
[componentTemplate]="componentTemplate"
|
|
@@ -3411,6 +3997,8 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
|
3411
3997
|
{{instance.component.addAnother || 'Add Another'}}
|
|
3412
3998
|
</button>
|
|
3413
3999
|
</mat-card-actions>
|
|
4000
|
+
<ng-container *ngIf="!showNewProductPicker">
|
|
4001
|
+
<div class="mat-elevation-z8">
|
|
3414
4002
|
<table
|
|
3415
4003
|
mat-table
|
|
3416
4004
|
[dataSource]="dataSource"
|
|
@@ -3419,7 +4007,8 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
|
3419
4007
|
cdkDropList
|
|
3420
4008
|
[cdkDropListData]="dataSource"
|
|
3421
4009
|
(cdkDropListDropped)="dropTable($event)">
|
|
3422
|
-
|
|
4010
|
+
|
|
4011
|
+
|
|
3423
4012
|
<ng-container *ngFor="let column of formColumns" [matColumnDef]="column">
|
|
3424
4013
|
<th mat-header-cell *matHeaderCellDef>{{ getColumnLabel(columns[column]) }}</th>
|
|
3425
4014
|
<td mat-cell *matCellDef="let i = index;" [attr.rowIndex]="i" [attr.component]="column">
|
|
@@ -3449,6 +4038,57 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
|
3449
4038
|
<tr class="datagrid-row" mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
3450
4039
|
</div>
|
|
3451
4040
|
</table>
|
|
4041
|
+
</div>
|
|
4042
|
+
</ng-container>
|
|
4043
|
+
|
|
4044
|
+
<table mat-table [dataSource]="dataSourceNew" class="mat-table" *ngIf="dataSourceNew.length > 0 && showNewProductPicker; else noData" >
|
|
4045
|
+
<!-- Product Name Column -->
|
|
4046
|
+
<ng-container matColumnDef="productName">
|
|
4047
|
+
<th mat-header-cell *matHeaderCellDef> Product Name </th>
|
|
4048
|
+
<td mat-cell *matCellDef="let element"> {{element.text}} </td>
|
|
4049
|
+
</ng-container>
|
|
4050
|
+
|
|
4051
|
+
<!-- Quantity Column -->
|
|
4052
|
+
<ng-container matColumnDef="quantity" *ngIf="showQuantity">
|
|
4053
|
+
<th mat-header-cell *matHeaderCellDef> Quantity </th>
|
|
4054
|
+
<td mat-cell *matCellDef="let element"> {{element.quantity}} </td>
|
|
4055
|
+
</ng-container>
|
|
4056
|
+
|
|
4057
|
+
<!-- Price Column -->
|
|
4058
|
+
<ng-container matColumnDef="price" *ngIf="showPrice">
|
|
4059
|
+
<th mat-header-cell *matHeaderCellDef> Price </th>
|
|
4060
|
+
<td mat-cell *matCellDef="let element"> {{element.price}} </td>
|
|
4061
|
+
</ng-container>
|
|
4062
|
+
|
|
4063
|
+
<!-- Category Column -->
|
|
4064
|
+
<ng-container matColumnDef="category" *ngIf="showCategory">
|
|
4065
|
+
<th mat-header-cell *matHeaderCellDef> Category </th>
|
|
4066
|
+
<td mat-cell *matCellDef="let element"> {{element.category}} </td>
|
|
4067
|
+
</ng-container>
|
|
4068
|
+
|
|
4069
|
+
<!-- Category Column -->
|
|
4070
|
+
<ng-container matColumnDef="subCategory" *ngIf="showSubcategory">
|
|
4071
|
+
<th mat-header-cell *matHeaderCellDef> Sub Category </th>
|
|
4072
|
+
<td mat-cell *matCellDef="let element"> {{element.subCategory}} </td>
|
|
4073
|
+
</ng-container>
|
|
4074
|
+
|
|
4075
|
+
<!-- SKU Column -->
|
|
4076
|
+
<ng-container matColumnDef="skuNumber" *ngIf="showSkuNumber">
|
|
4077
|
+
<th mat-header-cell *matHeaderCellDef> SKU Number </th>
|
|
4078
|
+
<td mat-cell *matCellDef="let element"> #SkuNumber-{{element.value}} </td>
|
|
4079
|
+
</ng-container>
|
|
4080
|
+
|
|
4081
|
+
<tr mat-header-row *matHeaderRowDef="displayedColumnsNew"></tr>
|
|
4082
|
+
<tr mat-row *matRowDef="let row; columns: displayedColumnsNew;"></tr>
|
|
4083
|
+
</table>
|
|
4084
|
+
<ng-template #noData>
|
|
4085
|
+
<div class="no-data-message" *ngIf="showNewProductPicker">
|
|
4086
|
+
No products found. Please add some products.
|
|
4087
|
+
</div>
|
|
4088
|
+
</ng-template>
|
|
4089
|
+
|
|
4090
|
+
|
|
4091
|
+
|
|
3452
4092
|
</mat-card-content>
|
|
3453
4093
|
<mat-card-actions *ngIf="instance.hasAddButton() && instance.component.addAnotherPosition !== 'top'">
|
|
3454
4094
|
<button mat-raised-button color="primary" (click)="addAnother()">
|
|
@@ -3464,7 +4104,7 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
|
3464
4104
|
<span [instance]="instance" matFormioLabel></span>
|
|
3465
4105
|
</mat-card-title>
|
|
3466
4106
|
</ng-template>
|
|
3467
|
-
`, 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: i3$2.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:
|
|
4107
|
+
`, isInline: true, styles: [".datagrid-row{height:auto}.mat-table{width:100%}.mat-header-cell,.mat-cell{padding:8px}.no-data-message{display:flex;justify-content:center;align-items:center;text-align:center;padding:20px;margin:0 20px;font-size:18px;color:#888;height:100%}\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: i3$2.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: i10$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i10$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i10$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i10$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i10$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i10$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i10$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i10$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i10$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i10$1.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: i9.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: i9.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: i9.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"] }] });
|
|
3468
4108
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialDataGridComponent, decorators: [{
|
|
3469
4109
|
type: Component,
|
|
3470
4110
|
args: [{ selector: 'mat-formio-datagrid', template: `
|
|
@@ -3485,6 +4125,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
3485
4125
|
{{instance.component.addAnother || 'Add Another'}}
|
|
3486
4126
|
</button>
|
|
3487
4127
|
</mat-card-actions>
|
|
4128
|
+
<ng-container *ngIf="!showNewProductPicker">
|
|
4129
|
+
<div class="mat-elevation-z8">
|
|
3488
4130
|
<table
|
|
3489
4131
|
mat-table
|
|
3490
4132
|
[dataSource]="dataSource"
|
|
@@ -3493,7 +4135,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
3493
4135
|
cdkDropList
|
|
3494
4136
|
[cdkDropListData]="dataSource"
|
|
3495
4137
|
(cdkDropListDropped)="dropTable($event)">
|
|
3496
|
-
|
|
4138
|
+
|
|
4139
|
+
|
|
3497
4140
|
<ng-container *ngFor="let column of formColumns" [matColumnDef]="column">
|
|
3498
4141
|
<th mat-header-cell *matHeaderCellDef>{{ getColumnLabel(columns[column]) }}</th>
|
|
3499
4142
|
<td mat-cell *matCellDef="let i = index;" [attr.rowIndex]="i" [attr.component]="column">
|
|
@@ -3523,6 +4166,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
3523
4166
|
<tr class="datagrid-row" mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
3524
4167
|
</div>
|
|
3525
4168
|
</table>
|
|
4169
|
+
</div>
|
|
4170
|
+
</ng-container>
|
|
4171
|
+
|
|
4172
|
+
<table mat-table [dataSource]="dataSourceNew" class="mat-table" *ngIf="dataSourceNew.length > 0 && showNewProductPicker; else noData" >
|
|
4173
|
+
<!-- Product Name Column -->
|
|
4174
|
+
<ng-container matColumnDef="productName">
|
|
4175
|
+
<th mat-header-cell *matHeaderCellDef> Product Name </th>
|
|
4176
|
+
<td mat-cell *matCellDef="let element"> {{element.text}} </td>
|
|
4177
|
+
</ng-container>
|
|
4178
|
+
|
|
4179
|
+
<!-- Quantity Column -->
|
|
4180
|
+
<ng-container matColumnDef="quantity" *ngIf="showQuantity">
|
|
4181
|
+
<th mat-header-cell *matHeaderCellDef> Quantity </th>
|
|
4182
|
+
<td mat-cell *matCellDef="let element"> {{element.quantity}} </td>
|
|
4183
|
+
</ng-container>
|
|
4184
|
+
|
|
4185
|
+
<!-- Price Column -->
|
|
4186
|
+
<ng-container matColumnDef="price" *ngIf="showPrice">
|
|
4187
|
+
<th mat-header-cell *matHeaderCellDef> Price </th>
|
|
4188
|
+
<td mat-cell *matCellDef="let element"> {{element.price}} </td>
|
|
4189
|
+
</ng-container>
|
|
4190
|
+
|
|
4191
|
+
<!-- Category Column -->
|
|
4192
|
+
<ng-container matColumnDef="category" *ngIf="showCategory">
|
|
4193
|
+
<th mat-header-cell *matHeaderCellDef> Category </th>
|
|
4194
|
+
<td mat-cell *matCellDef="let element"> {{element.category}} </td>
|
|
4195
|
+
</ng-container>
|
|
4196
|
+
|
|
4197
|
+
<!-- Category Column -->
|
|
4198
|
+
<ng-container matColumnDef="subCategory" *ngIf="showSubcategory">
|
|
4199
|
+
<th mat-header-cell *matHeaderCellDef> Sub Category </th>
|
|
4200
|
+
<td mat-cell *matCellDef="let element"> {{element.subCategory}} </td>
|
|
4201
|
+
</ng-container>
|
|
4202
|
+
|
|
4203
|
+
<!-- SKU Column -->
|
|
4204
|
+
<ng-container matColumnDef="skuNumber" *ngIf="showSkuNumber">
|
|
4205
|
+
<th mat-header-cell *matHeaderCellDef> SKU Number </th>
|
|
4206
|
+
<td mat-cell *matCellDef="let element"> #SkuNumber-{{element.value}} </td>
|
|
4207
|
+
</ng-container>
|
|
4208
|
+
|
|
4209
|
+
<tr mat-header-row *matHeaderRowDef="displayedColumnsNew"></tr>
|
|
4210
|
+
<tr mat-row *matRowDef="let row; columns: displayedColumnsNew;"></tr>
|
|
4211
|
+
</table>
|
|
4212
|
+
<ng-template #noData>
|
|
4213
|
+
<div class="no-data-message" *ngIf="showNewProductPicker">
|
|
4214
|
+
No products found. Please add some products.
|
|
4215
|
+
</div>
|
|
4216
|
+
</ng-template>
|
|
4217
|
+
|
|
4218
|
+
|
|
4219
|
+
|
|
3526
4220
|
</mat-card-content>
|
|
3527
4221
|
<mat-card-actions *ngIf="instance.hasAddButton() && instance.component.addAnotherPosition !== 'top'">
|
|
3528
4222
|
<button mat-raised-button color="primary" (click)="addAnother()">
|
|
@@ -3538,8 +4232,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
3538
4232
|
<span [instance]="instance" matFormioLabel></span>
|
|
3539
4233
|
</mat-card-title>
|
|
3540
4234
|
</ng-template>
|
|
3541
|
-
`, styles: [".datagrid-row{height:auto}\n"] }]
|
|
3542
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$
|
|
4235
|
+
`, styles: [".datagrid-row{height:auto}.mat-table{width:100%}.mat-header-cell,.mat-cell{padding:8px}.no-data-message{display:flex;justify-content:center;align-items:center;text-align:center;padding:20px;margin:0 20px;font-size:18px;color:#888;height:100%}\n"] }]
|
|
4236
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.MatDialog }, { type: CommonService }]; } });
|
|
3543
4237
|
DataGridComponent.MaterialComponent = MaterialDataGridComponent;
|
|
3544
4238
|
|
|
3545
4239
|
var EditRowState;
|
|
@@ -3922,7 +4616,7 @@ MaterialWizardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
3922
4616
|
<button *ngIf="instance.hasButton('submit')" mat-raised-button color="primary" (click)="submit()">Submit</button>
|
|
3923
4617
|
</div>
|
|
3924
4618
|
</mat-step>
|
|
3925
|
-
</mat-horizontal-stepper>`, isInline: true, styles: [":host .navigation-button-row{margin-top:8px}\n", ":host .navigation-button-row button{margin-right:8px}\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: "component", type: i3$2.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:
|
|
4619
|
+
</mat-horizontal-stepper>`, isInline: true, styles: [":host .navigation-button-row{margin-top:8px}\n", ":host .navigation-button-row button{margin-right:8px}\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: "component", type: i3$2.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: i15.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "component", type: i15.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["selectedIndex", "disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }] });
|
|
3926
4620
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialWizardComponent, decorators: [{
|
|
3927
4621
|
type: Component,
|
|
3928
4622
|
args: [{ selector: 'mat-formio-wizard', template: `
|
|
@@ -4092,7 +4786,7 @@ FormioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
|
|
|
4092
4786
|
<div fxLayout="column" fxLayoutGap="1em">
|
|
4093
4787
|
<ng-template #formio></ng-template>
|
|
4094
4788
|
</div>
|
|
4095
|
-
`, isInline: true, 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"], 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: "component", type:
|
|
4789
|
+
`, isInline: true, 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"], 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: "component", type: i11.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }] });
|
|
4096
4790
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: FormioComponent, decorators: [{
|
|
4097
4791
|
type: Component,
|
|
4098
4792
|
args: [{ selector: 'mat-formio', template: `
|
|
@@ -4164,7 +4858,8 @@ NgxRenderMaterialFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.
|
|
|
4164
4858
|
FormioFormFieldComponent,
|
|
4165
4859
|
LabelComponent,
|
|
4166
4860
|
MaskDirective,
|
|
4167
|
-
ConfirmationDialogComponent
|
|
4861
|
+
ConfirmationDialogComponent,
|
|
4862
|
+
AddOnProductsComponent], imports: [CommonModule,
|
|
4168
4863
|
FormsModule,
|
|
4169
4864
|
ReactiveFormsModule,
|
|
4170
4865
|
MatInputModule,
|
|
@@ -4192,7 +4887,9 @@ NgxRenderMaterialFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.
|
|
|
4192
4887
|
ScrollingModule,
|
|
4193
4888
|
NgxMatSelectSearchModule,
|
|
4194
4889
|
MatDialogModule,
|
|
4195
|
-
HttpClientModule
|
|
4890
|
+
HttpClientModule,
|
|
4891
|
+
MatAutocompleteModule], exports: [MatAutocompleteModule,
|
|
4892
|
+
NgxRenderMaterialFormsComponent,
|
|
4196
4893
|
FormioComponent,
|
|
4197
4894
|
MatInputModule,
|
|
4198
4895
|
MatFormFieldModule,
|
|
@@ -4246,7 +4943,9 @@ NgxRenderMaterialFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.
|
|
|
4246
4943
|
ScrollingModule,
|
|
4247
4944
|
NgxMatSelectSearchModule,
|
|
4248
4945
|
MatDialogModule,
|
|
4249
|
-
HttpClientModule,
|
|
4946
|
+
HttpClientModule,
|
|
4947
|
+
MatAutocompleteModule, MatAutocompleteModule,
|
|
4948
|
+
MatInputModule,
|
|
4250
4949
|
MatFormFieldModule,
|
|
4251
4950
|
MatCheckboxModule,
|
|
4252
4951
|
MatRadioModule,
|
|
@@ -4314,7 +5013,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
4314
5013
|
FormioFormFieldComponent,
|
|
4315
5014
|
LabelComponent,
|
|
4316
5015
|
MaskDirective,
|
|
4317
|
-
ConfirmationDialogComponent
|
|
5016
|
+
ConfirmationDialogComponent,
|
|
5017
|
+
AddOnProductsComponent
|
|
4318
5018
|
],
|
|
4319
5019
|
imports: [
|
|
4320
5020
|
CommonModule,
|
|
@@ -4345,9 +5045,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
|
|
|
4345
5045
|
ScrollingModule,
|
|
4346
5046
|
NgxMatSelectSearchModule,
|
|
4347
5047
|
MatDialogModule,
|
|
4348
|
-
HttpClientModule
|
|
5048
|
+
HttpClientModule,
|
|
5049
|
+
MatAutocompleteModule
|
|
4349
5050
|
],
|
|
4350
5051
|
exports: [
|
|
5052
|
+
MatAutocompleteModule,
|
|
4351
5053
|
NgxRenderMaterialFormsComponent,
|
|
4352
5054
|
FormioComponent,
|
|
4353
5055
|
MatInputModule,
|