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.
@@ -1073,6 +1073,12 @@ ButtonComponent.MaterialComponent = MaterialButtonComponent;
1073
1073
 
1074
1074
  class MaterialTextareaComponent extends MaterialComponent {
1075
1075
  ngAfterViewInit() {
1076
+ if (this.element && this.element.nativeElement && this.instance) {
1077
+ // Add custom classes to elements.
1078
+ if (this.instance.component.customClass) {
1079
+ this.element.nativeElement.classList.add(this.instance.component.customClass);
1080
+ }
1081
+ }
1076
1082
  // Attach the element so the wysiwyg will work.
1077
1083
  this.instance.attachElement(this.textarea.nativeElement);
1078
1084
  }
@@ -3078,6 +3084,12 @@ class MaterialSelectComponent extends MaterialComponent {
3078
3084
  });
3079
3085
  }
3080
3086
  ngAfterViewInit() {
3087
+ if (this.element && this.element.nativeElement && this.instance) {
3088
+ // Add custom classes to elements.
3089
+ if (this.instance.component.customClass) {
3090
+ this.element.nativeElement.classList.add(this.instance.component.customClass);
3091
+ }
3092
+ }
3081
3093
  this.selectElem.openedChange.subscribe((isOpen) => __awaiter(this, void 0, void 0, function* () {
3082
3094
  var _a, _b, _c;
3083
3095
  let i = 0;
@@ -3836,7 +3848,11 @@ class AddOnProductsComponent {
3836
3848
  getProducts(flag) {
3837
3849
  this.spinnerFlag = true;
3838
3850
  const search = this.searchQuery;
3839
- this.commonSevice.loadProducts(this.pageNumber, this.pageSize, search, true, false, this.levelOneId, this.levelTwoId, this.levelThreeId, this.levelFourId).subscribe(response => {
3851
+ const levelOneId = this.levelOneId ? this.levelOneId : 0;
3852
+ const levelTwoId = this.levelTwoId ? this.levelTwoId : 0;
3853
+ const levelThreeId = this.levelThreeId ? this.levelThreeId : 0;
3854
+ const levelFourId = this.levelFourId ? this.levelFourId : 0;
3855
+ this.commonSevice.loadProducts(this.pageNumber, this.pageSize, search, true, false, levelOneId, levelTwoId, levelThreeId, levelFourId).subscribe(response => {
3840
3856
  var _a;
3841
3857
  this.spinnerFlag = false;
3842
3858
  if (response && response.code === 200) {
@@ -4075,6 +4091,12 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
4075
4091
  this.isCustomerCountryFiltered = false;
4076
4092
  this.emptyArray = false;
4077
4093
  this.isPriceDisable = true;
4094
+ if (this.element && this.element.nativeElement && this.instance) {
4095
+ // Add custom classes to elements.
4096
+ if (this.instance.component.customClass) {
4097
+ this.element.nativeElement.classList.add(this.instance.component.customClass);
4098
+ }
4099
+ }
4078
4100
  }
4079
4101
  getColumnLabel(column) {
4080
4102
  return column.label || column.key;
@@ -4092,7 +4114,6 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
4092
4114
  // }
4093
4115
  setInstance(instance) {
4094
4116
  var _a, _b;
4095
- //const newProductPickerFlag = instance?.component?.attributes;
4096
4117
  const checkAttribute = (_a = instance === null || instance === void 0 ? void 0 : instance.component) === null || _a === void 0 ? void 0 : _a.attributes;
4097
4118
  this.showNewProductPicker = this.commonService.checkIsAttributeTrue(checkAttribute, "newproductpicker");
4098
4119
  this.showCategory = this.commonService.checkIsAttributeTrue(checkAttribute, "showCategory");
@@ -4192,6 +4213,12 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
4192
4213
  });
4193
4214
  return viewContainer ? viewContainer : null;
4194
4215
  };
4216
+ if (this.element && this.element.nativeElement && this.instance) {
4217
+ // Add custom classes to elements.
4218
+ if (this.instance.component.customClass) {
4219
+ this.element.nativeElement.classList.add(this.instance.component.customClass);
4220
+ }
4221
+ }
4195
4222
  }
4196
4223
  removeColumn(columnName) {
4197
4224
  this.displayedColumnsNew = this.displayedColumnsNew.filter(column => column !== columnName);