keevo-components 1.8.231 → 1.8.232
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.
|
@@ -11,7 +11,11 @@ export class KvFileViewerComponent {
|
|
|
11
11
|
ngOnInit() {
|
|
12
12
|
if (this.type == 'text/xml' || this.type == 'application/xml')
|
|
13
13
|
this.visualizarXml();
|
|
14
|
-
|
|
14
|
+
}
|
|
15
|
+
ngOnChanges(changes) {
|
|
16
|
+
if (changes['arquivo'] && this.arquivo) {
|
|
17
|
+
this.sanitizedPdfSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.arquivo);
|
|
18
|
+
}
|
|
15
19
|
}
|
|
16
20
|
getSanitizer(url) {
|
|
17
21
|
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
@@ -21,7 +25,7 @@ export class KvFileViewerComponent {
|
|
|
21
25
|
this.xmlFormat = vkbeautify.xml(text);
|
|
22
26
|
}
|
|
23
27
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvFileViewerComponent, selector: "kv-file-viewer", inputs: { arquivo: "arquivo", type: "type", blob: "blob" }, ngImport: i0, template: "<img class=\"img\" *ngIf=\"type.match('image')\" [src]=\"sanitizedPdfSrc\" />\r\n\r\n<iframe\r\n class=\"txt-pdf\"\r\n *ngIf=\"type == 'text/plain' || type == 'application/pdf'\"\r\n [src]=\"sanitizedPdfSrc\"\r\n width=\"100%\"\r\n height=\"700px\"\r\n>\r\n</iframe>\r\n\r\n<div *ngIf=\"xmlFormat\" class=\"txt-pdf xml-viewer\">\r\n <pre lang=\"xml\">\r\n {{ xmlFormat }}\r\n </pre>\r\n</div>\r\n", styles: [".img{width:100%;height:100%;overflow:auto}.txt-pdf{width:100%;height:600px}.xml-viewer{overflow:auto;font-size:13px}.xml-viewer .tag{color:#6f517e}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvFileViewerComponent, selector: "kv-file-viewer", inputs: { arquivo: "arquivo", type: "type", blob: "blob" }, usesOnChanges: true, ngImport: i0, template: "<img class=\"img\" *ngIf=\"type.match('image')\" [src]=\"sanitizedPdfSrc\" />\r\n\r\n<iframe\r\n class=\"txt-pdf\"\r\n *ngIf=\"type == 'text/plain' || type == 'application/pdf'\"\r\n [src]=\"sanitizedPdfSrc\"\r\n width=\"100%\"\r\n height=\"700px\"\r\n>\r\n</iframe>\r\n\r\n<div *ngIf=\"xmlFormat\" class=\"txt-pdf xml-viewer\">\r\n <pre lang=\"xml\">\r\n {{ xmlFormat }}\r\n </pre>\r\n</div>\r\n", styles: [".img{width:100%;height:100%;overflow:auto}.txt-pdf{width:100%;height:600px}.xml-viewer{overflow:auto;font-size:13px}.xml-viewer .tag{color:#6f517e}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
25
29
|
}
|
|
26
30
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, decorators: [{
|
|
27
31
|
type: Component,
|
|
@@ -33,4 +37,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
33
37
|
}], blob: [{
|
|
34
38
|
type: Input
|
|
35
39
|
}] } });
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia3YtZmlsZS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LmJsb2IpLnRleHQoKTtcclxuICAgIHRoaXMueG1sRm9ybWF0ID0gdmtiZWF1dGlmeS54bWwodGV4dCk7XHJcbiAgfVxyXG59XHJcbiIsIjxpbWcgY2xhc3M9XCJpbWdcIiAqbmdJZj1cInR5cGUubWF0Y2goJ2ltYWdlJylcIiBbc3JjXT1cInNhbml0aXplZFBkZlNyY1wiIC8+XHJcblxyXG48aWZyYW1lXHJcbiAgY2xhc3M9XCJ0eHQtcGRmXCJcclxuICAqbmdJZj1cInR5cGUgPT0gJ3RleHQvcGxhaW4nIHx8IHR5cGUgPT0gJ2FwcGxpY2F0aW9uL3BkZidcIlxyXG4gIFtzcmNdPVwic2FuaXRpemVkUGRmU3JjXCJcclxuICB3aWR0aD1cIjEwMCVcIlxyXG4gIGhlaWdodD1cIjcwMHB4XCJcclxuPlxyXG48L2lmcmFtZT5cclxuXHJcbjxkaXYgKm5nSWY9XCJ4bWxGb3JtYXRcIiBjbGFzcz1cInR4dC1wZGYgeG1sLXZpZXdlclwiPlxyXG4gIDxwcmUgbGFuZz1cInhtbFwiPlxyXG4gICAge3sgeG1sRm9ybWF0IH19XHJcbiAgPC9wcmU+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -7132,7 +7132,11 @@ class KvFileViewerComponent {
|
|
|
7132
7132
|
ngOnInit() {
|
|
7133
7133
|
if (this.type == 'text/xml' || this.type == 'application/xml')
|
|
7134
7134
|
this.visualizarXml();
|
|
7135
|
-
|
|
7135
|
+
}
|
|
7136
|
+
ngOnChanges(changes) {
|
|
7137
|
+
if (changes['arquivo'] && this.arquivo) {
|
|
7138
|
+
this.sanitizedPdfSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.arquivo);
|
|
7139
|
+
}
|
|
7136
7140
|
}
|
|
7137
7141
|
getSanitizer(url) {
|
|
7138
7142
|
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
@@ -7142,7 +7146,7 @@ class KvFileViewerComponent {
|
|
|
7142
7146
|
this.xmlFormat = vkbeautify.xml(text);
|
|
7143
7147
|
}
|
|
7144
7148
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, deps: [{ token: i1$7.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7145
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvFileViewerComponent, selector: "kv-file-viewer", inputs: { arquivo: "arquivo", type: "type", blob: "blob" }, ngImport: i0, template: "<img class=\"img\" *ngIf=\"type.match('image')\" [src]=\"sanitizedPdfSrc\" />\r\n\r\n<iframe\r\n class=\"txt-pdf\"\r\n *ngIf=\"type == 'text/plain' || type == 'application/pdf'\"\r\n [src]=\"sanitizedPdfSrc\"\r\n width=\"100%\"\r\n height=\"700px\"\r\n>\r\n</iframe>\r\n\r\n<div *ngIf=\"xmlFormat\" class=\"txt-pdf xml-viewer\">\r\n <pre lang=\"xml\">\r\n {{ xmlFormat }}\r\n </pre>\r\n</div>\r\n", styles: [".img{width:100%;height:100%;overflow:auto}.txt-pdf{width:100%;height:600px}.xml-viewer{overflow:auto;font-size:13px}.xml-viewer .tag{color:#6f517e}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
7149
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: KvFileViewerComponent, selector: "kv-file-viewer", inputs: { arquivo: "arquivo", type: "type", blob: "blob" }, usesOnChanges: true, ngImport: i0, template: "<img class=\"img\" *ngIf=\"type.match('image')\" [src]=\"sanitizedPdfSrc\" />\r\n\r\n<iframe\r\n class=\"txt-pdf\"\r\n *ngIf=\"type == 'text/plain' || type == 'application/pdf'\"\r\n [src]=\"sanitizedPdfSrc\"\r\n width=\"100%\"\r\n height=\"700px\"\r\n>\r\n</iframe>\r\n\r\n<div *ngIf=\"xmlFormat\" class=\"txt-pdf xml-viewer\">\r\n <pre lang=\"xml\">\r\n {{ xmlFormat }}\r\n </pre>\r\n</div>\r\n", styles: [".img{width:100%;height:100%;overflow:auto}.txt-pdf{width:100%;height:600px}.xml-viewer{overflow:auto;font-size:13px}.xml-viewer .tag{color:#6f517e}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
7146
7150
|
}
|
|
7147
7151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFileViewerComponent, decorators: [{
|
|
7148
7152
|
type: Component,
|