ngx-render-material-forms 2.0.7 → 2.0.8

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.
@@ -1072,6 +1072,12 @@ ButtonComponent.MaterialComponent = MaterialButtonComponent;
1072
1072
 
1073
1073
  class MaterialTextareaComponent extends MaterialComponent {
1074
1074
  ngAfterViewInit() {
1075
+ if (this.element && this.element.nativeElement && this.instance) {
1076
+ // Add custom classes to elements.
1077
+ if (this.instance.component.customClass) {
1078
+ this.element.nativeElement.classList.add(this.instance.component.customClass);
1079
+ }
1080
+ }
1075
1081
  // Attach the element so the wysiwyg will work.
1076
1082
  this.instance.attachElement(this.textarea.nativeElement);
1077
1083
  }
@@ -3073,6 +3079,12 @@ class MaterialSelectComponent extends MaterialComponent {
3073
3079
  });
3074
3080
  }
3075
3081
  ngAfterViewInit() {
3082
+ if (this.element && this.element.nativeElement && this.instance) {
3083
+ // Add custom classes to elements.
3084
+ if (this.instance.component.customClass) {
3085
+ this.element.nativeElement.classList.add(this.instance.component.customClass);
3086
+ }
3087
+ }
3076
3088
  this.selectElem.openedChange.subscribe(async (isOpen) => {
3077
3089
  let i = 0;
3078
3090
  if (isOpen) {
@@ -3819,7 +3831,11 @@ class AddOnProductsComponent {
3819
3831
  getProducts(flag) {
3820
3832
  this.spinnerFlag = true;
3821
3833
  const search = this.searchQuery;
3822
- this.commonSevice.loadProducts(this.pageNumber, this.pageSize, search, true, false, this.levelOneId, this.levelTwoId, this.levelThreeId, this.levelFourId).subscribe(response => {
3834
+ const levelOneId = this.levelOneId ? this.levelOneId : 0;
3835
+ const levelTwoId = this.levelTwoId ? this.levelTwoId : 0;
3836
+ const levelThreeId = this.levelThreeId ? this.levelThreeId : 0;
3837
+ const levelFourId = this.levelFourId ? this.levelFourId : 0;
3838
+ this.commonSevice.loadProducts(this.pageNumber, this.pageSize, search, true, false, levelOneId, levelTwoId, levelThreeId, levelFourId).subscribe(response => {
3823
3839
  this.spinnerFlag = false;
3824
3840
  if (response && response.code === 200) {
3825
3841
  this.totalPages = response?.data?.totalPages;
@@ -4054,6 +4070,12 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
4054
4070
  this.isCustomerCountryFiltered = false;
4055
4071
  this.emptyArray = false;
4056
4072
  this.isPriceDisable = true;
4073
+ if (this.element && this.element.nativeElement && this.instance) {
4074
+ // Add custom classes to elements.
4075
+ if (this.instance.component.customClass) {
4076
+ this.element.nativeElement.classList.add(this.instance.component.customClass);
4077
+ }
4078
+ }
4057
4079
  }
4058
4080
  getColumnLabel(column) {
4059
4081
  return column.label || column.key;
@@ -4070,7 +4092,6 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
4070
4092
  // ngOnInit(): void {
4071
4093
  // }
4072
4094
  setInstance(instance) {
4073
- //const newProductPickerFlag = instance?.component?.attributes;
4074
4095
  const checkAttribute = instance?.component?.attributes;
4075
4096
  this.showNewProductPicker = this.commonService.checkIsAttributeTrue(checkAttribute, "newproductpicker");
4076
4097
  this.showCategory = this.commonService.checkIsAttributeTrue(checkAttribute, "showCategory");
@@ -4170,6 +4191,12 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
4170
4191
  });
4171
4192
  return viewContainer ? viewContainer : null;
4172
4193
  };
4194
+ if (this.element && this.element.nativeElement && this.instance) {
4195
+ // Add custom classes to elements.
4196
+ if (this.instance.component.customClass) {
4197
+ this.element.nativeElement.classList.add(this.instance.component.customClass);
4198
+ }
4199
+ }
4173
4200
  }
4174
4201
  removeColumn(columnName) {
4175
4202
  this.displayedColumnsNew = this.displayedColumnsNew.filter(column => column !== columnName);