@sd-angular/core 1.1.49 → 1.1.50

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.
@@ -2212,7 +2212,7 @@
2212
2212
  if (item[column.field]) {
2213
2213
  obj[column.field] = ((_q = column.option) === null || _q === void 0 ? void 0 : _q.displayOnTrue) || 'True';
2214
2214
  }
2215
- else {
2215
+ else if (obj[column.field] !== undefined && obj[column.field] !== null) {
2216
2216
  obj[column.field] = ((_r = column.option) === null || _r === void 0 ? void 0 : _r.displayOnFalse) || 'False';
2217
2217
  }
2218
2218
  return [3 /*break*/, 10];
@@ -3082,7 +3082,7 @@
3082
3082
  SdDesktopCellView.decorators = [
3083
3083
  { type: core.Component, args: [{
3084
3084
  selector: 'sd-desktop-cell-view',
3085
- template: "<ng-container *ngIf=\"item[column.field] | cellView:item:column:gridOption:key | async as view\">\r\n <ng-container *ngIf=\"view.display.hasHtml;else useValue\">\r\n <div *ngIf=\"view.click\" (click)=\"view.click()\" class=\"text-break cursor-pointer\" [matTooltip]=\"view.tooltip\"\r\n [class.text-center]=\"view.display.align === 'center'\" [class.text-right]=\"view.display.align === 'right'\"\r\n [innerHTML]=\"view.display.html | safeHtml\">\r\n </div>\r\n <div *ngIf=\"!view.click\" class=\"text-break\" [matTooltip]=\"view.tooltip\"\r\n [class.text-center]=\"view.display.align === 'center'\" [class.text-right]=\"view.display.align === 'right'\"\r\n [innerHTML]=\"view.display.html | safeHtml\">\r\n </div>\r\n </ng-container>\r\n <ng-template #useValue>\r\n <ng-container *ngIf=\"!!view.badge; else noBadge\">\r\n <sd-badge [type]=\"view.badge.type\" [title]=\"view.display.value\" [color]=\"view.badge.color\"\r\n [icon]=\"view.badge.icon\" [tooltip]=\"view.tooltip\" (sdClick)=\"!!view.click && view.click()\"></sd-badge>\r\n </ng-container>\r\n <ng-template #noBadge>\r\n <ng-container *ngIf=\"column.type !== 'children'; else childrenView\">\r\n <div *ngIf=\"column.type !== 'image'\" class=\"text-break\" [class.text-center]=\"view.display.align === 'center'\"\r\n [class.text-right]=\"view.display.align === 'right'\" [matTooltip]=\"view.tooltip\">\r\n <a *ngIf=\"!!view.click\" href=\"javascript:;\" (click)=\"view.click()\">{{view.display.value}}</a>\r\n <ng-container *ngIf=\"!view.click\">{{view.display.value}}\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"column.type === 'image'\" class=\"align-middle text-center\">\r\n <img *ngIf=\"view.display.value\" [src]=\"view.display.value\" [width]=\"column.option?.width\"\r\n [height]=\"column.option?.height\" class=\"c-image\" (click)=\"!!view.click && view.click()\"\r\n [class.cursor-pointer]=\"!!view.click\">\r\n <mat-icon *ngIf=\"!view.display.value\" class=\"c-img\" [class.cursor-pointer]=\"!!view.click\"\r\n (click)=\"!!view.click && view.click()\">\r\n image</mat-icon>\r\n </div>\r\n </ng-container>\r\n <ng-template #childrenView>\r\n <sd-desktop-cell-children-view [key]=\"key\" [item]=\"item\" [column]=\"column\">\r\n </sd-desktop-cell-children-view>\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n</ng-container>",
3085
+ template: "<ng-container *ngIf=\"item[column.field] | cellView:item:column:gridOption:key | async as view\">\r\n <ng-container *ngIf=\"view.display.hasHtml;else useValue\">\r\n <div *ngIf=\"view.click\" (click)=\"view.click()\" class=\"text-break cursor-pointer\" [matTooltip]=\"view.tooltip\"\r\n [class.text-center]=\"view.display.align === 'center'\" [class.text-right]=\"view.display.align === 'right'\"\r\n [innerHTML]=\"view.display.html | safeHtml\">\r\n </div>\r\n <div *ngIf=\"!view.click\" class=\"text-break\" [matTooltip]=\"view.tooltip\"\r\n [class.text-center]=\"view.display.align === 'center'\" [class.text-right]=\"view.display.align === 'right'\"\r\n [innerHTML]=\"view.display.html | safeHtml\">\r\n </div>\r\n </ng-container>\r\n <ng-template #useValue>\r\n <ng-container *ngIf=\"!!view.badge; else noBadge\">\r\n <sd-badge *ngIf=\"view.display.value\" [type]=\"view.badge.type\" [title]=\"view.display.value\" [color]=\"view.badge.color\"\r\n [icon]=\"view.badge.icon\" [tooltip]=\"view.tooltip\" (sdClick)=\"!!view.click && view.click()\"></sd-badge>\r\n </ng-container>\r\n <ng-template #noBadge>\r\n <ng-container *ngIf=\"column.type !== 'children'; else childrenView\">\r\n <div *ngIf=\"column.type !== 'image'\" class=\"text-break\" [class.text-center]=\"view.display.align === 'center'\"\r\n [class.text-right]=\"view.display.align === 'right'\" [matTooltip]=\"view.tooltip\">\r\n <a *ngIf=\"!!view.click\" href=\"javascript:;\" (click)=\"view.click()\">{{view.display.value}}</a>\r\n <ng-container *ngIf=\"!view.click\">{{view.display.value}}\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"column.type === 'image'\" class=\"align-middle text-center\">\r\n <img *ngIf=\"view.display.value\" [src]=\"view.display.value\" [width]=\"column.option?.width\"\r\n [height]=\"column.option?.height\" class=\"c-image\" (click)=\"!!view.click && view.click()\"\r\n [class.cursor-pointer]=\"!!view.click\">\r\n <mat-icon *ngIf=\"!view.display.value\" class=\"c-img\" [class.cursor-pointer]=\"!!view.click\"\r\n (click)=\"!!view.click && view.click()\">\r\n image</mat-icon>\r\n </div>\r\n </ng-container>\r\n <ng-template #childrenView>\r\n <sd-desktop-cell-children-view [key]=\"key\" [item]=\"item\" [column]=\"column\">\r\n </sd-desktop-cell-children-view>\r\n </ng-template>\r\n </ng-template>\r\n </ng-template>\r\n</ng-container>",
3086
3086
  changeDetection: core.ChangeDetectionStrategy.OnPush,
3087
3087
  styles: [".text-black400{color:#757575}.c-color-success{color:#4caf50}.c-color-danger{color:#f82c13}.c-image{-o-object-fit:contain;margin:5px 0;object-fit:contain}.c-img{font-size:30px;opacity:.5}.c-img.pointer:hover{opacity:.9}"]
3088
3088
  },] }
@@ -4502,7 +4502,12 @@
4502
4502
  case 8:
4503
4503
  if (column.type === 'bool') {
4504
4504
  option = column.option;
4505
- result.display.value = value === true ? ((option === null || option === void 0 ? void 0 : option.displayOnTrue) || 'True') : ((option === null || option === void 0 ? void 0 : option.displayOnFalse) || 'False');
4505
+ if (value !== undefined && value !== null && value !== '') {
4506
+ result.display.value = value === true ? ((option === null || option === void 0 ? void 0 : option.displayOnTrue) || 'True') : ((option === null || option === void 0 ? void 0 : option.displayOnFalse) || 'False');
4507
+ }
4508
+ else {
4509
+ result.display.value = null;
4510
+ }
4506
4511
  }
4507
4512
  _d.label = 9;
4508
4513
  case 9: