@arsedizioni/ars-utils 19.4.95 → 19.4.97
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.
|
@@ -1716,6 +1716,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
1716
1716
|
|
|
1717
1717
|
class FilePreviewComponent {
|
|
1718
1718
|
constructor() {
|
|
1719
|
+
this.iframe = viewChild('iframe');
|
|
1719
1720
|
this.unsubscribe = new Subject();
|
|
1720
1721
|
this.httpClient = inject(HttpClient);
|
|
1721
1722
|
this.dialogService = inject(DialogService);
|
|
@@ -1737,9 +1738,6 @@ class FilePreviewComponent {
|
|
|
1737
1738
|
},
|
|
1738
1739
|
error: () => {
|
|
1739
1740
|
this.dialogService.clearBusy();
|
|
1740
|
-
},
|
|
1741
|
-
complete: () => {
|
|
1742
|
-
this.dialogService.clearBusy();
|
|
1743
1741
|
}
|
|
1744
1742
|
});
|
|
1745
1743
|
}
|
|
@@ -1753,6 +1751,13 @@ class FilePreviewComponent {
|
|
|
1753
1751
|
this.unsubscribe.complete();
|
|
1754
1752
|
this.url.set(null);
|
|
1755
1753
|
}
|
|
1754
|
+
/**
|
|
1755
|
+
* Load completed
|
|
1756
|
+
*/
|
|
1757
|
+
loaded() {
|
|
1758
|
+
this.dialogService.clearBusy();
|
|
1759
|
+
this.iframe()?.nativeElement.contentWindow.scrollTo(0, 0);
|
|
1760
|
+
}
|
|
1756
1761
|
/**
|
|
1757
1762
|
* Download manually
|
|
1758
1763
|
*/
|
|
@@ -1774,12 +1779,12 @@ class FilePreviewComponent {
|
|
|
1774
1779
|
"<p class='small' style='padding-left:10px'>Fate riferimento alla documentazione specifica del vostro browser.</p>", "Problemi con lee anteprime dei file PDF?");
|
|
1775
1780
|
}
|
|
1776
1781
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: FilePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1777
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: FilePreviewComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<mat-dialog-content class=\"file-preview\" id=\"file-preview-scrollable\">\r\n <div class=\"content\">\r\n @if (!url()) {\r\n <div class=\"loading\">Caricamento in corso...</div>\r\n } @else {\r\n <iframe class=\"iframe\"
|
|
1782
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: FilePreviewComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-dialog-content class=\"file-preview\" id=\"file-preview-scrollable\">\r\n <div class=\"content\">\r\n @if (!url()) {\r\n <div class=\"loading\">Caricamento in corso...</div>\r\n } @else {\r\n <iframe #iframe class=\"iframe\" (load)=\"loaded()\" [src]=\"url() | safeUrl\"></iframe>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions id=\"file-preview-fixed\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"50\">\r\n <button mat-stroked-button color=\"primary\" (click)=\"troubles()\"\r\n matTooltip=\"Fai click se non riesci a visualizzare l'anteprima dei file PDF\">Problemi con i PDF?</button>\r\n </div>\r\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\r\n <button mat-stroked-button color=\"primary\" (click)=\"download()\">Scarica</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" color=\"primary\">Chiudi</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>", styles: [".file-preview{padding:0}.file-preview .content{height:100%;width:100%;overflow:hidden;background-color:var(--ars-filepreview-content-background-color, #f7faf8)}.file-preview .content .loading{font-size:x-large;font-weight:700;color:var(--ars-text-color, #191c1b);width:100%;height:100%;padding:20px}.file-preview .content .iframe{width:100%;height:100%;border:0}.mat-mdc-dialog-content{max-height:unset!important;padding:0!important}\n"], dependencies: [{ kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "pipe", type: SafeUrlPipe, name: "safeUrl" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1778
1783
|
}
|
|
1779
1784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: FilePreviewComponent, decorators: [{
|
|
1780
1785
|
type: Component,
|
|
1781
1786
|
args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatDialogContent, NgStyle, FlexLayoutModule, MatDialogActions, MatButtonModule, MatTooltipModule,
|
|
1782
|
-
MatDialogClose, SafeUrlPipe], template: "<mat-dialog-content class=\"file-preview\" id=\"file-preview-scrollable\">\r\n <div class=\"content\">\r\n @if (!url()) {\r\n <div class=\"loading\">Caricamento in corso...</div>\r\n } @else {\r\n <iframe class=\"iframe\"
|
|
1787
|
+
MatDialogClose, SafeUrlPipe], template: "<mat-dialog-content class=\"file-preview\" id=\"file-preview-scrollable\">\r\n <div class=\"content\">\r\n @if (!url()) {\r\n <div class=\"loading\">Caricamento in corso...</div>\r\n } @else {\r\n <iframe #iframe class=\"iframe\" (load)=\"loaded()\" [src]=\"url() | safeUrl\"></iframe>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions id=\"file-preview-fixed\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"50\">\r\n <button mat-stroked-button color=\"primary\" (click)=\"troubles()\"\r\n matTooltip=\"Fai click se non riesci a visualizzare l'anteprima dei file PDF\">Problemi con i PDF?</button>\r\n </div>\r\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\r\n <button mat-stroked-button color=\"primary\" (click)=\"download()\">Scarica</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" color=\"primary\">Chiudi</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>", styles: [".file-preview{padding:0}.file-preview .content{height:100%;width:100%;overflow:hidden;background-color:var(--ars-filepreview-content-background-color, #f7faf8)}.file-preview .content .loading{font-size:x-large;font-weight:700;color:var(--ars-text-color, #191c1b);width:100%;height:100%;padding:20px}.file-preview .content .iframe{width:100%;height:100%;border:0}.mat-mdc-dialog-content{max-height:unset!important;padding:0!important}\n"] }]
|
|
1783
1788
|
}] });
|
|
1784
1789
|
|
|
1785
1790
|
class FilterBarComponent {
|