ngx-render-material-forms 1.6.2 → 1.6.4

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.
@@ -27,7 +27,7 @@ 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 i4$7 from '@angular/material/table';
30
+ import * as i5$3 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';
@@ -88,7 +88,7 @@ import * as i10 from 'ngx-mat-select-search';
88
88
  import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
89
89
  import WellComponent from 'formiojs/components/well/Well.js';
90
90
  import DataGridComponent from 'formiojs/components/datagrid/DataGrid.js';
91
- import * as i8 from '@angular/cdk/drag-drop';
91
+ import * as i9 from '@angular/cdk/drag-drop';
92
92
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
93
93
  import EditGridComponent from 'formiojs/components/editgrid/EditGrid.js';
94
94
  import Components$2 from 'formiojs/components/Components';
@@ -2636,6 +2636,10 @@ class CommonService {
2636
2636
  getDropDownFlag() {
2637
2637
  return this.setFlag.getValue();
2638
2638
  }
2639
+ checkIsAttributeTrue(newProductPickerFlag, attributeName) {
2640
+ return newProductPickerFlag && Object.keys(newProductPickerFlag).some(key => key.toLocaleLowerCase() === attributeName.toLowerCase() &&
2641
+ newProductPickerFlag[key].toLowerCase() === "true");
2642
+ }
2639
2643
  }
2640
2644
  CommonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CommonService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2641
2645
  CommonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CommonService, providedIn: 'root' });
@@ -2667,6 +2671,7 @@ class MaterialSelectComponent extends MaterialComponent {
2667
2671
  this.searching = false;
2668
2672
  this.productList = [];
2669
2673
  this.selectedValue = '';
2674
+ this.searchItem = "";
2670
2675
  // Variable to hold the reference to the current panel element
2671
2676
  this.currentPanelElement = null;
2672
2677
  this.openCounter = 1;
@@ -2687,6 +2692,7 @@ class MaterialSelectComponent extends MaterialComponent {
2687
2692
  clearProducts() {
2688
2693
  if (this.instance.component.key.toLowerCase() === 'vendorproductid') {
2689
2694
  this.onClearAll();
2695
+ this.searchItem = "";
2690
2696
  }
2691
2697
  }
2692
2698
  scrumble(msg) {
@@ -2893,9 +2899,7 @@ class MaterialSelectComponent extends MaterialComponent {
2893
2899
  // If the object doesn't exist, add it to the array
2894
2900
  finalParams.push({ key: 'dataValue', value: value });
2895
2901
  }
2896
- console.log('360=>', apiEndPoint, finalParams);
2897
2902
  this.commonService.initializeApiPath(apiEndPoint, finalParams).subscribe(response => {
2898
- console.log('response361=>', response);
2899
2903
  if (response && response.code === 200) {
2900
2904
  this.secondDropdownItems = response.data;
2901
2905
  this.commonService.setDropdownItems(this.secondDropdownItems);
@@ -2904,29 +2908,18 @@ class MaterialSelectComponent extends MaterialComponent {
2904
2908
  }
2905
2909
  }
2906
2910
  ngAfterViewInit() {
2907
- let i = 0;
2908
- // console.log('this.instance=>', this.instance)
2909
- // const newProductPickerFlag = this.instance?.component?.attributes;
2910
- // let checkInvokeFromLibrary = this.checkIsAttributeTrue(newProductPickerFlag, "invokeFromLibrary")
2911
- // const firstLevel = (this.getVendorRefList(this.instance) && checkInvokeFromLibrary);
2912
- // if (firstLevel) {
2913
- // this.selectElem.valueChange.subscribe(res => {
2914
- // this.commonService.setDropDownFlag(true);
2915
- // console.log('376=>', res)
2916
- // this.updateSecondDropdown(res);
2917
- // });
2918
- // }
2919
2911
  this.selectElem.openedChange.subscribe(async (isOpen) => {
2912
+ let i = 0;
2920
2913
  if (isOpen) {
2921
- console.log('this.instance=>', this.instance);
2922
2914
  const newProductPickerFlag = this.instance?.component?.attributes;
2923
- let checkInvokeFromLibrary = this.checkIsAttributeTrue(newProductPickerFlag, "invokeFromLibrary");
2915
+ let checkInvokeFromLibrary = this.commonService.checkIsAttributeTrue(newProductPickerFlag, "invokeFromLibrary");
2924
2916
  const firstLevel = (this.getVendorRefList(this.instance) && checkInvokeFromLibrary);
2925
2917
  if (firstLevel) {
2926
2918
  this.selectElem.valueChange.subscribe(res => {
2927
2919
  this.commonService.setDropDownFlag(true);
2928
- console.log('376=>', res, i);
2929
- this.updateSecondDropdown(res);
2920
+ if (i === 0) {
2921
+ this.updateSecondDropdown(res);
2922
+ }
2930
2923
  i++;
2931
2924
  });
2932
2925
  }
@@ -2938,12 +2931,9 @@ class MaterialSelectComponent extends MaterialComponent {
2938
2931
  this.storeDependentItems.push({ label: renderElement['text'], value: this.commonService.onlyNumbers(renderElement['value']) ? renderElement['value'] + ' ' : renderElement['value'] });
2939
2932
  });
2940
2933
  }
2941
- console.log('410=>', this.commonService.getDropDownFlag(), this.instance);
2942
2934
  if (!this.commonService.getDropDownFlag()) {
2943
2935
  this.storeDependentItems = this.instance.component.data.values;
2944
- console.log('396=>', this.storeDependentItems);
2945
2936
  }
2946
- console.log('this.storeDependentItems=>', this.storeDependentItems);
2947
2937
  this.filteredOptions = Promise.resolve(this.storeDependentItems);
2948
2938
  this.selectOptions = Promise.resolve(this.storeDependentItems);
2949
2939
  this.selectOptions.then(result => {
@@ -2957,7 +2947,13 @@ class MaterialSelectComponent extends MaterialComponent {
2957
2947
  if (isOpen) {
2958
2948
  this.pageNumber = 1;
2959
2949
  this.pageSize = 20;
2960
- this.searchQuery = '';
2950
+ if (this.searchQuery?.length > 0) {
2951
+ if (this.searchItem?.length > 0) {
2952
+ this.websiteMultiFilterCtrl.setValue(this.searchItem);
2953
+ this.ref.detectChanges();
2954
+ }
2955
+ }
2956
+ // this.searchQuery = '';
2961
2957
  this.searching = false;
2962
2958
  //this.loadData(this.pageNumber, this.pageSize, this.searchQuery);
2963
2959
  this.registerPanelScrollEvent(this.selectElem);
@@ -2965,14 +2961,14 @@ class MaterialSelectComponent extends MaterialComponent {
2965
2961
  else {
2966
2962
  this.removePanelScrollEvent();
2967
2963
  this.searching = false;
2968
- this.selectedValue = this.getValue();
2969
- if (this.selectedValue?.toString().length == 0) {
2970
- this.productList = [];
2971
- this.pageNumber = 1;
2972
- this.pageSize = 20;
2973
- this.searchQuery = '';
2974
- this.loadData(this.pageNumber, this.pageSize, this.searchQuery);
2975
- }
2964
+ // this.selectedValue = this.getValue();
2965
+ // if (this.selectedValue?.toString().length == 0) {
2966
+ // this.productList = [];
2967
+ // this.pageNumber = 1;
2968
+ // this.pageSize = 20;
2969
+ // this.searchQuery = '';
2970
+ // this.loadData(this.pageNumber, this.pageSize, this.searchQuery);
2971
+ // }
2976
2972
  }
2977
2973
  });
2978
2974
  }
@@ -2998,6 +2994,7 @@ class MaterialSelectComponent extends MaterialComponent {
2998
2994
  this.productList = [];
2999
2995
  this.searching = true;
3000
2996
  this.searchQuery = searchQuery;
2997
+ this.searchItem = searchQuery;
3001
2998
  this.loadData(this.pageNumber, this.pageSize, searchQuery);
3002
2999
  }
3003
3000
  });
@@ -3061,10 +3058,6 @@ class MaterialSelectComponent extends MaterialComponent {
3061
3058
  compareObjects(o1, o2) {
3062
3059
  return _.isEqual(o1, o2);
3063
3060
  }
3064
- checkIsAttributeTrue(newProductPickerFlag, attributeName) {
3065
- return newProductPickerFlag && Object.keys(newProductPickerFlag).some(key => key.toLocaleLowerCase() === attributeName.toLowerCase() &&
3066
- newProductPickerFlag[key].toLowerCase() === "true");
3067
- }
3068
3061
  }
3069
3062
  MaterialSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialSelectComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.HttpClient }, { token: CommonService }], target: i0.ɵɵFactoryTarget.Component });
3070
3063
  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: `
@@ -3221,19 +3214,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
3221
3214
  }] }]; } });
3222
3215
 
3223
3216
  class MaterialDataGridComponent extends MaterialNestedComponent {
3224
- constructor(element, ref, dialog) {
3217
+ constructor(element, ref, dialog, commonService) {
3225
3218
  super(element, ref);
3226
3219
  this.element = element;
3227
3220
  this.ref = ref;
3228
3221
  this.dialog = dialog;
3222
+ this.commonService = commonService;
3229
3223
  this.dataSource = new MatTableDataSource();
3224
+ this.checkSubmissionStatus = false;
3225
+ this.showDataGrid = true;
3230
3226
  }
3231
3227
  getColumnLabel(column) {
3232
3228
  return column.label || column.key;
3233
3229
  }
3234
3230
  setInstance(instance) {
3231
+ const checkAttribute = instance?.component?.attributes;
3232
+ this.checkSubmissionStatus = this.commonService.checkIsAttributeTrue(checkAttribute, 'isProductSubmitAllowed');
3235
3233
  super.setInstance(instance);
3236
- this.dataSource.data = instance.dataValue;
3234
+ if (this.checkSubmissionStatus) {
3235
+ this.showDataGrid = false;
3236
+ this.dataSource.data = [];
3237
+ }
3238
+ else {
3239
+ this.showDataGrid = true;
3240
+ this.dataSource.data = instance.dataValue;
3241
+ }
3237
3242
  this.columns = {};
3238
3243
  this.displayedColumns = [];
3239
3244
  this.formColumns = [];
@@ -3262,6 +3267,7 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
3262
3267
  };
3263
3268
  }
3264
3269
  addAnother() {
3270
+ this.showDataGrid = true;
3265
3271
  this.checkRowsNumber();
3266
3272
  this.instance.addRow();
3267
3273
  if (this.dataSource.data.length < this.instance.rows.length) {
@@ -3277,7 +3283,7 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
3277
3283
  removeRow(index) {
3278
3284
  let message = 'Are you sure you want to delete this product?';
3279
3285
  let showButton = true;
3280
- if (this.dataSource?.data?.length === 1) {
3286
+ if (this.dataSource?.data?.length === 1 && !this.checkSubmissionStatus) {
3281
3287
  message = 'Please select at least one product.';
3282
3288
  showButton = false;
3283
3289
  }
@@ -3289,6 +3295,9 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
3289
3295
  });
3290
3296
  dialogRef.afterClosed().subscribe(result => {
3291
3297
  if (result) {
3298
+ if (this.dataSource?.data?.length === 1 && this.checkSubmissionStatus) {
3299
+ this.showDataGrid = false;
3300
+ }
3292
3301
  // User confirmed, proceed with deletion
3293
3302
  this.instance.removeRow(index);
3294
3303
  this.dataSource.data.splice(index, 1);
@@ -3318,7 +3327,7 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
3318
3327
  super.setValue(value);
3319
3328
  }
3320
3329
  }
3321
- MaterialDataGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialDataGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
3330
+ MaterialDataGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialDataGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$2.MatDialog }, { token: CommonService }], target: i0.ɵɵFactoryTarget.Component });
3322
3331
  MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialDataGridComponent, selector: "mat-formio-datagrid", usesInheritance: true, ngImport: i0, template: `
3323
3332
  <mat-formio-form-field [instance]="instance"
3324
3333
  [componentTemplate]="componentTemplate"
@@ -3329,7 +3338,7 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
3329
3338
  <ng-container *ngIf="hasLabel">
3330
3339
  <ng-container *ngTemplateOutlet="labelTemplate"></ng-container>
3331
3340
  </ng-container>
3332
- <mat-card-content>
3341
+ <mat-card-content *ngIf="showDataGrid">
3333
3342
  <mat-card-actions
3334
3343
  *ngIf="instance.hasAddButton() && (instance.component.addAnotherPosition === 'both' || instance.component.addAnotherPosition === 'top')">
3335
3344
  <button mat-raised-button color="primary" (click)="addAnother()">
@@ -3390,7 +3399,7 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
3390
3399
  <span [instance]="instance" matFormioLabel></span>
3391
3400
  </mat-card-title>
3392
3401
  </ng-template>
3393
- `, 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: i4$7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$7.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i4$7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "component", type: i4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i8.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i8.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i8.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: FormioFormFieldComponent, selector: "mat-formio-form-field", inputs: ["labelTemplate", "renderTopLabel", "showDescription", "renderElementOnly", "instance", "componentTemplate"] }, { kind: "component", type: LabelComponent, selector: "span[matFormioLabel]", inputs: ["instance"] }] });
3402
+ `, 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: i5$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i5$3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5$3.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"] }] });
3394
3403
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialDataGridComponent, decorators: [{
3395
3404
  type: Component,
3396
3405
  args: [{ selector: 'mat-formio-datagrid', template: `
@@ -3403,7 +3412,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
3403
3412
  <ng-container *ngIf="hasLabel">
3404
3413
  <ng-container *ngTemplateOutlet="labelTemplate"></ng-container>
3405
3414
  </ng-container>
3406
- <mat-card-content>
3415
+ <mat-card-content *ngIf="showDataGrid">
3407
3416
  <mat-card-actions
3408
3417
  *ngIf="instance.hasAddButton() && (instance.component.addAnotherPosition === 'both' || instance.component.addAnotherPosition === 'top')">
3409
3418
  <button mat-raised-button color="primary" (click)="addAnother()">
@@ -3465,7 +3474,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
3465
3474
  </mat-card-title>
3466
3475
  </ng-template>
3467
3476
  `, styles: [".datagrid-row{height:auto}\n"] }]
3468
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$2.MatDialog }]; } });
3477
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$2.MatDialog }, { type: CommonService }]; } });
3469
3478
  DataGridComponent.MaterialComponent = MaterialDataGridComponent;
3470
3479
 
3471
3480
  var EditRowState;