@sd-angular/core 1.0.63 → 1.0.66
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.
- package/autocomplete/sd-angular-core-autocomplete.metadata.json +1 -1
- package/autocomplete/src/lib/autocomplete.component.d.ts +1 -0
- package/bundles/sd-angular-core-autocomplete.umd.js +9 -0
- package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.min.js +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.js +28 -9
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +2 -2
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/esm2015/autocomplete/src/lib/autocomplete.component.js +6 -1
- package/esm2015/grid-material/src/lib/components/desktop-cell-editor/desktop-cell-editor.component.js +2 -2
- package/esm2015/grid-material/src/lib/components/desktop-cell-view/desktop-cell-view.component.js +2 -2
- package/esm2015/grid-material/src/lib/models/grid-column.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid-option.model.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/cell-view.pipe.js +26 -7
- package/fesm2015/sd-angular-core-autocomplete.js +6 -1
- package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
- package/fesm2015/sd-angular-core-grid-material.js +27 -8
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/grid-material/src/lib/models/grid-column.model.d.ts +1 -0
- package/grid-material/src/lib/models/grid-option.model.d.ts +4 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.0.63.tgz → sd-angular-core-1.0.66.tgz} +0 -0
|
@@ -2179,7 +2179,7 @@ class SdDesktopCellView {
|
|
|
2179
2179
|
SdDesktopCellView.decorators = [
|
|
2180
2180
|
{ type: Component, args: [{
|
|
2181
2181
|
selector: 'sd-desktop-cell-view',
|
|
2182
|
-
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 [innerHTML]=\"view.display.html | safeHtml\">\r\n </div>\r\n <div *ngIf=\"!view.click\" class=\"text-break\" [matTooltip]=\"view.tooltip\" [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)=\"column.click(item[column.field], item)\"></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>",
|
|
2182
|
+
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)=\"column.click(item[column.field], item)\"></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>",
|
|
2183
2183
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2184
2184
|
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}"]
|
|
2185
2185
|
},] }
|
|
@@ -2869,7 +2869,7 @@ class SdDesktopCellEditor {
|
|
|
2869
2869
|
SdDesktopCellEditor.decorators = [
|
|
2870
2870
|
{ type: Component, args: [{
|
|
2871
2871
|
selector: 'sd-desktop-cell-editor',
|
|
2872
|
-
template: "<sd-input *ngIf=\"column.type === 'string'\" size=\"sm\" type=\"text\" [(model)]=\"item[column.field]\" (sdChange)=\"onChange()\" disableErrorMessage>\r\n</sd-input>\r\n<sd-input-currency *ngIf=\"column.type === 'number'\" size=\"sm\"
|
|
2872
|
+
template: "<sd-input *ngIf=\"column.type === 'string'\" size=\"sm\" type=\"text\" [(model)]=\"item[column.field]\" (sdChange)=\"onChange()\" disableErrorMessage>\r\n</sd-input>\r\n<sd-input-currency *ngIf=\"column.type === 'number'\" size=\"sm\" [(model)]=\"item[column.field]\"\r\n (sdChange)=\"onChange()\" [precision]=\"column.editor?.precision\" [min]=\"column?.editor?.minValue\" [max]=\"column?.editor?.maxValue\" disableErrorMessage>\r\n</sd-input-currency>\r\n<sd-select *ngIf=\"column.type === 'bool'\" size=\"sm\" [items]=\"[\r\n { value: true, display: column.option?.displayOnTrue || 'True' },\r\n { value: false, display: column.option?.displayOnFalse || 'False' }\r\n ]\" valueField=\"value\" displayField=\"display\" [(model)]=\"item[column.field]\" (sdChange)=\"onChange()\" disableErrorMessage>\r\n</sd-select>\r\n<sd-select *ngIf=\"\r\n column.type === 'values' && column?.option?.selection !== 'AUTOCOMPLETE'\r\n \" size=\"sm\" [items]=\"column.option.items\" [valueField]=\"column.option.valueField\"\r\n [displayField]=\"column.option.displayField\" [(model)]=\"item[column.field]\" (sdChange)=\"onChange()\" [multiple]=\"\r\n column?.option?.selection === 'MULTIPLE' ||\r\n column?.option?.selection === 'MULTIPLEAUTOCOMPLETE'\r\n \" [filtered]=\"column?.option?.selection === 'MULTIPLEAUTOCOMPLETE'\" disableErrorMessage>\r\n</sd-select>\r\n<sd-autocomplete *ngIf=\"\r\n column.type === 'values' && column?.option?.selection === 'AUTOCOMPLETE'\r\n \" size=\"sm\" [items]=\"column.option.items\" [valueField]=\"column.option.valueField\"\r\n [displayField]=\"column.option.displayField\" [(model)]=\"item[column.field]\" (sdChange)=\"onChange()\" disableErrorMessage>\r\n</sd-autocomplete>\r\n<sd-date-time *ngIf=\"\r\n column.type === 'date' ||\r\n column.type === 'datetime' ||\r\n column.type === 'time'\r\n \" size=\"sm\" [(model)]=\"item[column.field]\" [type]=\"column.type\" (sdChange)=\"onChange()\" disableErrorMessage>\r\n</sd-date-time>",
|
|
2873
2873
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2874
2874
|
},] }
|
|
2875
2875
|
];
|
|
@@ -3259,14 +3259,33 @@ class SdCellViewPipe {
|
|
|
3259
3259
|
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');
|
|
3260
3260
|
}
|
|
3261
3261
|
}
|
|
3262
|
-
if (displayOnEmpty
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3262
|
+
if (displayOnEmpty) {
|
|
3263
|
+
let values = [null, undefined, ''];
|
|
3264
|
+
if (typeof (displayOnEmpty) === 'object') {
|
|
3265
|
+
const { display, emptyValues } = displayOnEmpty;
|
|
3266
|
+
values = [null, undefined, '', ...emptyValues];
|
|
3267
|
+
if (values.includes(result.display.value)) {
|
|
3268
|
+
if (typeof (display) === 'function') {
|
|
3269
|
+
result.display.hasHtml = true;
|
|
3270
|
+
result.display.html = display(rowData, column);
|
|
3271
|
+
}
|
|
3272
|
+
else {
|
|
3273
|
+
result.display.hasHtml = true;
|
|
3274
|
+
result.display.html = `<div class="T16R text-black400">--</div>`;
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3266
3277
|
}
|
|
3267
3278
|
else {
|
|
3268
|
-
result.display.
|
|
3269
|
-
|
|
3279
|
+
if (values.includes(result.display.value)) {
|
|
3280
|
+
if (typeof (displayOnEmpty) === 'function') {
|
|
3281
|
+
result.display.hasHtml = true;
|
|
3282
|
+
result.display.html = displayOnEmpty(rowData, column);
|
|
3283
|
+
}
|
|
3284
|
+
else {
|
|
3285
|
+
result.display.hasHtml = true;
|
|
3286
|
+
result.display.html = `<div class="T16R text-black400">--</div>`;
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3270
3289
|
}
|
|
3271
3290
|
}
|
|
3272
3291
|
}
|