keevo-components 1.8.93 → 1.8.94
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.
|
@@ -9,6 +9,7 @@ export class KvImageUploadComponent {
|
|
|
9
9
|
this.file = null;
|
|
10
10
|
this.fileSrc = null;
|
|
11
11
|
this.widthComponent = '400px';
|
|
12
|
+
this.heightComponent = 'auto';
|
|
12
13
|
this.maxHeightImage = '400px';
|
|
13
14
|
this.fileEmit = new EventEmitter();
|
|
14
15
|
}
|
|
@@ -63,13 +64,15 @@ export class KvImageUploadComponent {
|
|
|
63
64
|
this.fileSrc = null;
|
|
64
65
|
}
|
|
65
66
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvImageUploadComponent, deps: [{ token: i1.NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
66
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvImageUploadComponent, selector: "kv-image-upload", inputs: { widthComponent: "widthComponent", maxHeightImage: "maxHeightImage", description: "description" }, outputs: { fileEmit: "fileEmit" }, ngImport: i0, template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!file\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
67
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvImageUploadComponent, selector: "kv-image-upload", inputs: { widthComponent: "widthComponent", heightComponent: "heightComponent", maxHeightImage: "maxHeightImage", description: "description" }, outputs: { fileEmit: "fileEmit" }, ngImport: i0, template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heightComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!file\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
67
68
|
}
|
|
68
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvImageUploadComponent, decorators: [{
|
|
69
70
|
type: Component,
|
|
70
|
-
args: [{ selector: 'kv-image-upload', template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!file\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>" }]
|
|
71
|
+
args: [{ selector: 'kv-image-upload', template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heightComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!file\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>" }]
|
|
71
72
|
}], ctorParameters: () => [{ type: i1.NotificationService }], propDecorators: { widthComponent: [{
|
|
72
73
|
type: Input
|
|
74
|
+
}], heightComponent: [{
|
|
75
|
+
type: Input
|
|
73
76
|
}], maxHeightImage: [{
|
|
74
77
|
type: Input
|
|
75
78
|
}], description: [{
|
|
@@ -77,4 +80,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
77
80
|
}], fileEmit: [{
|
|
78
81
|
type: Output
|
|
79
82
|
}] } });
|
|
80
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
83
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia3YtaW1hZ2UtdXBsb2FkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tlZXZvLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnR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AgICAgI2ZpbGVJbnB1dFxyXG4gICAgICAgICAgICBoaWRkZW5cclxuICAgICAgICAgICAgYWNjZXB0PVwiaW1hZ2UvKlwiXHJcbiAgICAgICAgPlxyXG4gICAgICAgIDxkaXZcclxuICAgICAgICAgICAgKm5nSWY9XCIhZmlsZVwiXHJcbiAgICAgICAgICAgIGNsYXNzPVwiZmxleCBmbGV4LWNvbHVtbiBhbGlnbi1pdGVtcy1jZW50ZXIganVzdGlmeS1jb250ZW50LWNlbnRlclwiXHJcbiAgICAgICAgPlxyXG4gICAgICAgICAgICA8c3BhblxyXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJtYXRlcmlhbC1zeW1ib2xzLW91dGxpbmVkIG10LTJcIlxyXG4gICAgICAgICAgICAgICAgc3R5bGU9XCJmb250LXNpemU6IDNyZW07XCJcclxuICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgY2xvdWRfdXBsb2FkXHJcbiAgICAgICAgICAgIDwvc3Bhbj5cclxuXHJcbiAgICAgICAgICAgIEBpZihkZXNjcmlwdGlvbikge1xyXG4gICAgICAgICAgICA8cCBjbGFzcz1cImZvbnQtc2VtaWJvbGRcIj57e2Rlc2NyaXB0aW9ufX08L3A+XHJcbiAgICAgICAgICAgIH0gQGVsc2Uge1xyXG4gICAgICAgICAgICA8cCBjbGFzcz1cImZvbnQtc2VtaWJvbGRcIj5BcnJhc3RlIGUgc29sdGUgdW1hIGltYWdlbSBhcXVpLCBvdTwvcD5cclxuICAgICAgICAgICAgPHAgY2xhc3M9XCJmb250LXNlbWlib2xkXCI+Y2xpcXVlIHBhcmEgc2VsZWNpb27DoS1sYTwvcD5cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICA8L2Rpdj5cclxuICAgICAgICA8ZGl2ICpuZ0lmPVwiZmlsZVwiPlxyXG4gICAgICAgICAgICA8aW1nXHJcbiAgICAgICAgICAgICAgICBbc3JjXT1cImZpbGVTcmNcIlxyXG4gICAgICAgICAgICAgICAgW2FsdF09XCJmaWxlLm5hbWVcIlxyXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJ3LWZ1bGxcIlxyXG4gICAgICAgICAgICAgICAgW3N0eWxlLm1heEhlaWdodF09XCJtYXhIZWlnaHRJbWFnZVwiXHJcbiAgICAgICAgICAgID5cclxuICAgICAgICA8L2Rpdj5cclxuICAgIDwvZGl2PlxyXG5cclxuPC9kaXY+Il19
|
|
@@ -6005,6 +6005,7 @@ class KvImageUploadComponent {
|
|
|
6005
6005
|
this.file = null;
|
|
6006
6006
|
this.fileSrc = null;
|
|
6007
6007
|
this.widthComponent = '400px';
|
|
6008
|
+
this.heightComponent = 'auto';
|
|
6008
6009
|
this.maxHeightImage = '400px';
|
|
6009
6010
|
this.fileEmit = new EventEmitter();
|
|
6010
6011
|
}
|
|
@@ -6059,13 +6060,15 @@ class KvImageUploadComponent {
|
|
|
6059
6060
|
this.fileSrc = null;
|
|
6060
6061
|
}
|
|
6061
6062
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvImageUploadComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6062
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvImageUploadComponent, selector: "kv-image-upload", inputs: { widthComponent: "widthComponent", maxHeightImage: "maxHeightImage", description: "description" }, outputs: { fileEmit: "fileEmit" }, ngImport: i0, template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!file\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
6063
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvImageUploadComponent, selector: "kv-image-upload", inputs: { widthComponent: "widthComponent", heightComponent: "heightComponent", maxHeightImage: "maxHeightImage", description: "description" }, outputs: { fileEmit: "fileEmit" }, ngImport: i0, template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heightComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!file\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
6063
6064
|
}
|
|
6064
6065
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvImageUploadComponent, decorators: [{
|
|
6065
6066
|
type: Component,
|
|
6066
|
-
args: [{ selector: 'kv-image-upload', template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!file\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>" }]
|
|
6067
|
+
args: [{ selector: 'kv-image-upload', template: "<div\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n class=\"border-dashed border-2 border-round-lg border-gray-400 flex justify-content-end\"\r\n [style.width]=\"widthComponent\"\r\n [style.height]=\"heightComponent\"\r\n>\r\n @if(file) {\r\n <button\r\n pButton\r\n (click)=\"deleteImage()\"\r\n class=\"fixed transition-colors transition-duration-500 text-red-700 hover:text-red-500 w-2rem h-2rem\"\r\n [text]=\"true\"\r\n [icon]=\"'pi pi-trash'\"\r\n >\r\n </button>\r\n }\r\n\r\n\r\n <div\r\n class=\"w-full flex align-items-center justify-content-center\"\r\n style=\"cursor: pointer;\"\r\n (click)=\"fileInput.click()\"\r\n >\r\n <input\r\n type=\"file\"\r\n (change)=\"onFileSelected($event)\"\r\n #fileInput\r\n hidden\r\n accept=\"image/*\"\r\n >\r\n <div\r\n *ngIf=\"!file\"\r\n class=\"flex flex-column align-items-center justify-content-center\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined mt-2\"\r\n style=\"font-size: 3rem;\"\r\n >\r\n cloud_upload\r\n </span>\r\n\r\n @if(description) {\r\n <p class=\"font-semibold\">{{description}}</p>\r\n } @else {\r\n <p class=\"font-semibold\">Arraste e solte uma imagem aqui, ou</p>\r\n <p class=\"font-semibold\">clique para selecion\u00E1-la</p>\r\n }\r\n\r\n </div>\r\n <div *ngIf=\"file\">\r\n <img\r\n [src]=\"fileSrc\"\r\n [alt]=\"file.name\"\r\n class=\"w-full\"\r\n [style.maxHeight]=\"maxHeightImage\"\r\n >\r\n </div>\r\n </div>\r\n\r\n</div>" }]
|
|
6067
6068
|
}], ctorParameters: () => [{ type: NotificationService }], propDecorators: { widthComponent: [{
|
|
6068
6069
|
type: Input
|
|
6070
|
+
}], heightComponent: [{
|
|
6071
|
+
type: Input
|
|
6069
6072
|
}], maxHeightImage: [{
|
|
6070
6073
|
type: Input
|
|
6071
6074
|
}], description: [{
|