ngx-render-material-forms 1.3.1 → 1.3.3

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.
@@ -2588,8 +2588,6 @@ class MaterialSelectComponent extends MaterialComponent {
2588
2588
  const trackHeight = scrollElement.scrollHeight - scrollElement.offsetHeight;
2589
2589
  if (this.openCounter < 2) {
2590
2590
  const retrievedObject = JSON.parse(localStorage.getItem('storageObject'));
2591
- console.log('165', Number(retrievedObject?.totalPages));
2592
- console.log('166', retrievedObject?.dataSource);
2593
2591
  this.totalPages = Number(retrievedObject?.totalPages);
2594
2592
  this.productsloadingFlag = true;
2595
2593
  this.productList = retrievedObject?.dataSource;
@@ -2623,11 +2621,17 @@ class MaterialSelectComponent extends MaterialComponent {
2623
2621
  const vendorId = this.getValueByKey(paramsData, 'vendorId');
2624
2622
  const onlyActive = this.getValueByKey(paramsData, 'onlyActive');
2625
2623
  var currentUser = JSON.parse(localStorage.getItem('currentUser'));
2626
- var accessToken = currentUser.Tokens.AccessToken;
2627
- const headers = new HttpHeaders({
2628
- 'Content-Type': 'application/json',
2629
- 'Authorization': 'Bearer ' + accessToken
2630
- });
2624
+ let headers;
2625
+ if (currentUser && currentUser.Tokens && currentUser.Tokens.AccessToken) {
2626
+ var accessToken = currentUser.Tokens.AccessToken;
2627
+ headers = new HttpHeaders({
2628
+ 'Content-Type': 'application/json',
2629
+ 'Authorization': 'Bearer ' + accessToken
2630
+ });
2631
+ }
2632
+ else {
2633
+ console.error('User not authenticated or tokens missing.');
2634
+ }
2631
2635
  const envendorId = this.scrumble(vendorId);
2632
2636
  const enpageNumber = this.scrumble(pageNumber);
2633
2637
  const enpageSize = this.scrumble(pageSize);
@@ -2933,10 +2937,10 @@ class ConfirmationDialogComponent {
2933
2937
  }
2934
2938
  }
2935
2939
  ConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: i1$2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
2936
- 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\">\n<h2 mat-dialog-title class=\"data-grid-alert\">Alert</h2>\n<mat-dialog-content class=\"data-grid-popup-body\">\n Are you sure you want to delete this Product?\n</mat-dialog-content>\n<mat-dialog-actions class=\"data-grid-popup-footer\">\n <button mat-button [mat-dialog-close]=\"true\" color=\"warn\">Delete</button>\n <button mat-button [mat-dialog-close]=\"false\">Cancel</button>\n</mat-dialog-actions>\n</div>", styles: [""], dependencies: [{ kind: "component", type: i2$1.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: i1$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
2940
+ 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\">\n<h2 mat-dialog-title class=\"data-grid-alert\">Alert</h2>\n<mat-dialog-content class=\"data-grid-popup-body\">\n Are you sure you want to delete this product?\n</mat-dialog-content>\n<mat-dialog-actions class=\"data-grid-popup-footer\">\n <button mat-button [mat-dialog-close]=\"true\" color=\"warn\">Delete</button>\n <button mat-button [mat-dialog-close]=\"false\">Cancel</button>\n</mat-dialog-actions>\n</div>", styles: [""], dependencies: [{ kind: "component", type: i2$1.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: i1$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
2937
2941
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
2938
2942
  type: Component,
2939
- args: [{ selector: 'NgxMat-confirmation-dialog', template: "<div class=\"dialog-container\">\n<h2 mat-dialog-title class=\"data-grid-alert\">Alert</h2>\n<mat-dialog-content class=\"data-grid-popup-body\">\n Are you sure you want to delete this Product?\n</mat-dialog-content>\n<mat-dialog-actions class=\"data-grid-popup-footer\">\n <button mat-button [mat-dialog-close]=\"true\" color=\"warn\">Delete</button>\n <button mat-button [mat-dialog-close]=\"false\">Cancel</button>\n</mat-dialog-actions>\n</div>" }]
2943
+ args: [{ selector: 'NgxMat-confirmation-dialog', template: "<div class=\"dialog-container\">\n<h2 mat-dialog-title class=\"data-grid-alert\">Alert</h2>\n<mat-dialog-content class=\"data-grid-popup-body\">\n Are you sure you want to delete this product?\n</mat-dialog-content>\n<mat-dialog-actions class=\"data-grid-popup-footer\">\n <button mat-button [mat-dialog-close]=\"true\" color=\"warn\">Delete</button>\n <button mat-button [mat-dialog-close]=\"false\">Cancel</button>\n</mat-dialog-actions>\n</div>" }]
2940
2944
  }], ctorParameters: function () { return [{ type: i1$2.MatDialogRef }]; } });
2941
2945
 
2942
2946
  class MaterialDataGridComponent extends MaterialNestedComponent {
@@ -2994,7 +2998,9 @@ class MaterialDataGridComponent extends MaterialNestedComponent {
2994
2998
  }
2995
2999
  }
2996
3000
  removeRow(index) {
2997
- const dialogRef = this.dialog.open(ConfirmationDialogComponent);
3001
+ const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
3002
+ disableClose: true
3003
+ });
2998
3004
  dialogRef.afterClosed().subscribe(result => {
2999
3005
  if (result) {
3000
3006
  // User confirmed, proceed with deletion