ngx-render-material-forms 2.5.0 → 2.5.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.
@@ -998,6 +998,7 @@ class MaterialButtonComponent extends MaterialComponent {
998
998
  this.error = false;
999
999
  this.disabled = false;
1000
1000
  this.clicked = false;
1001
+ this.walkmeClass = '';
1001
1002
  }
1002
1003
  get color() {
1003
1004
  if (this.error) {
@@ -1021,9 +1022,16 @@ class MaterialButtonComponent extends MaterialComponent {
1021
1022
  }
1022
1023
  }
1023
1024
  get buttonClass() {
1025
+ var _a, _b;
1024
1026
  let className = this.instance.component.block ? 'mat-formio-button-block' : '';
1025
1027
  className += this.instance.component.size ? ` mat-formio-button-${this.instance.component.size}` : '';
1026
1028
  className += !this.angularButtonTheme ? ` mat-formio-theme-${this.instance.component.theme}` : '';
1029
+ const attributes = (_b = (_a = this.instance) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.attributes;
1030
+ if (attributes) {
1031
+ const buttonType = attributes.buttonType || '';
1032
+ const programName = attributes.programName || '';
1033
+ this.walkmeClass = `walkme-${buttonType}-${programName}`.toLowerCase();
1034
+ }
1027
1035
  return className;
1028
1036
  }
1029
1037
  onClick(event) {
@@ -1064,10 +1072,10 @@ class MaterialButtonComponent extends MaterialComponent {
1064
1072
  }
1065
1073
  }
1066
1074
  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 });
1067
- 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"] }] });
1075
+ 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, walkmeClass]\"\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"] }] });
1068
1076
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialButtonComponent, decorators: [{
1069
1077
  type: Component,
1070
- 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"] }]
1078
+ args: [{ selector: 'mat-formio-button', template: "<button *ngIf=\"instance && instance.component.label != 'Click to add Products'\"\r\n [ngClass]=\"[buttonClass, walkmeClass]\"\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"] }]
1071
1079
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.MatDialog }]; } });
1072
1080
  ButtonComponent.MaterialComponent = MaterialButtonComponent;
1073
1081
 
@@ -2763,8 +2771,12 @@ class CommonService {
2763
2771
  }
2764
2772
  /*Funtion to check if property is matched with given attributes in formBuilder or not */
2765
2773
  checkIsAttributeTrue(newProductPickerFlag, attributeName) {
2766
- return newProductPickerFlag && Object.keys(newProductPickerFlag).some(key => key.toLocaleLowerCase() === attributeName.toLowerCase() &&
2767
- newProductPickerFlag[key].toLowerCase() === "true");
2774
+ // return newProductPickerFlag && Object.keys(newProductPickerFlag).some(key =>
2775
+ // key.toLocaleLowerCase() === attributeName.toLowerCase() &&
2776
+ // newProductPickerFlag[key].toLowerCase() === "true"
2777
+ // );
2778
+ return newProductPickerFlag && Object.keys(newProductPickerFlag).some(key => key.trim().toLowerCase() === attributeName.trim().toLowerCase() &&
2779
+ String(newProductPickerFlag[key]).trim().toLowerCase() === "true");
2768
2780
  }
2769
2781
  getglobedata() {
2770
2782
  const hostMappings = {
@@ -3089,6 +3101,8 @@ class MaterialSelectComponent extends MaterialComponent {
3089
3101
  // If the object doesn't exist, add it to the array
3090
3102
  finalParams.push({ key: 'dataValue', value: value });
3091
3103
  }
3104
+ this.secondDropdownItems = [];
3105
+ this.commonService.setDropdownItems(this.secondDropdownItems);
3092
3106
  this.commonService.initializeApiPath(apiEndPoint, finalParams).subscribe(response => {
3093
3107
  if (response && response.code === 200) {
3094
3108
  this.secondDropdownItems = response.data;
@@ -3224,6 +3238,7 @@ class MaterialSelectComponent extends MaterialComponent {
3224
3238
  const dataUrl = (_a = instance.component['data']) === null || _a === void 0 ? void 0 : _a.url;
3225
3239
  const isSelectValuesValid = selectValues != null && selectValues !== '' && selectValues !== undefined;
3226
3240
  const isDataUrlInvalid = dataUrl == null || dataUrl === '' || dataUrl === undefined;
3241
+ instance.component.defaultValue = "";
3227
3242
  return isSelectValuesValid && isDataUrlInvalid;
3228
3243
  }
3229
3244
  getVendorRefList(instance) {