mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* upgrade to HttpClient * upgrade to Renderer2 * upgrade Document reference * remove useless test with deprecated ReflectiveInjector * upgrade to latest typescript * upgrade libs * upgrade package scripts * remove rxjs blacklists and duplicate rules * add rxjs compat to help with migration * fix breaking changes * fix breaking changes in material * fix breaking changes (material 6) * upgrade rxjs, ngx-translate and flex layout * update unit tests * restore providers * upgrade deprecated Observable.error * rebase fix first configuration problems * fix style issues commented * fix core build * fix lib template errors * move lib test execution in angular.json * ignore * karma conf files * fix import statement test * single run option * update packages reporter * restore report * increase timeout * improve karma conf test configuration * fix test issues about lint * fix test analytics * fix process service test * content service fix test * fix logout directive test * fix core test * fix build * update node-sass to latest * update angular cli dependencies * improve build script create directorites and move files only if previous command succeded * upgrade individual libs to 6.0 * remove old webpack files * revert sass change * fix type issues fix style issues * fix tslint demo shell issue * fix peerdependencies * fix test e2e BC * package upate * fix style import issue * extract-text-webpack-plugin beta * fix test dist build command * remove alpha js-api * fix tslint issue add banner tslint rule * upload service fix * change BC script * fix test dist script * increase demo shell timeout test * verbose copy * path absolute * fix script bc * fix copy part * fix path warning fix monaco editor * remove duplicate header * remove unused import * fix align and check ago tests * add missing import * fix notification button selector * [ANGULAR6] fixed core tests * fix CS test * fix cs test step 2 * increase travis_wait for dist * fix attachment PS * fix checklist test * use pdf min
197 lines
9.5 KiB
HTML
197 lines
9.5 KiB
HTML
<div *ngIf="showViewer"
|
|
class="adf-viewer-container"
|
|
[class.adf-viewer-overlay-container]="overlayMode"
|
|
[class.adf-viewer-inline-container]="!overlayMode">
|
|
|
|
<div class="adf-viewer-content" fxLayout="column">
|
|
<ng-content select="adf-viewer-toolbar"></ng-content>
|
|
<ng-container *ngIf="showToolbar && !toolbar">
|
|
<adf-toolbar color="default" class="adf-viewer-toolbar">
|
|
|
|
<adf-toolbar-title>
|
|
<button *ngIf="allowGoBack"
|
|
class="adf-viewer-close-button"
|
|
data-automation-id="adf-toolbar-back"
|
|
mat-icon-button
|
|
title="{{ 'ADF_VIEWER.ACTIONS.CLOSE' | translate }}"
|
|
(click)="onBackButtonClick()">
|
|
<mat-icon>close</mat-icon>
|
|
</button>
|
|
</adf-toolbar-title>
|
|
|
|
<div fxFlex="1 1 auto" class="adf-viewer__file-title">
|
|
<button
|
|
*ngIf="allowNavigate && canNavigateBefore"
|
|
data-automation-id="adf-toolbar-pref-file"
|
|
mat-icon-button
|
|
title="{{ 'ADF_VIEWER.ACTIONS.PREV_FILE' | translate }}"
|
|
(click)="onNavigateBeforeClick()">
|
|
<mat-icon>navigate_before</mat-icon>
|
|
</button>
|
|
<img class="adf-viewer__mimeicon" [src]="mimeType | adfMimeTypeIcon" data-automation-id="adf-file-thumbnail">
|
|
<span class="adf-viewer__display-name" id="adf-viewer-display-name">{{ displayName }}</span>
|
|
<button
|
|
*ngIf="allowNavigate && canNavigateNext"
|
|
data-automation-id="adf-toolbar-next-file"
|
|
mat-icon-button
|
|
title="{{ 'ADF_VIEWER.ACTIONS.NEXT_FILE' | translate }}"
|
|
(click)="onNavigateNextClick()">
|
|
<mat-icon>navigate_next</mat-icon>
|
|
</button>
|
|
</div>
|
|
|
|
<ng-content select="adf-viewer-toolbar-actions"></ng-content>
|
|
|
|
<ng-container *ngIf="mnuOpenWith" data-automation-id='adf-toolbar-custom-btn'>
|
|
<button
|
|
mat-button
|
|
[matMenuTriggerFor]="mnuOpenWith"
|
|
data-automation-id="adf-toolbar-open-with">
|
|
<span>{{ 'ADF_VIEWER.ACTIONS.OPEN_WITH' | translate }}</span>
|
|
<mat-icon>arrow_drop_down</mat-icon>
|
|
</button>
|
|
<mat-menu #mnuOpenWith="matMenu" [overlapTrigger]="false">
|
|
<ng-content select="adf-viewer-open-with"></ng-content>
|
|
</mat-menu>
|
|
</ng-container>
|
|
|
|
<adf-toolbar-divider></adf-toolbar-divider>
|
|
|
|
<button
|
|
*ngIf="allowDownload"
|
|
mat-icon-button
|
|
title="{{ 'ADF_VIEWER.ACTIONS.DOWNLOAD' | translate }}"
|
|
data-automation-id="adf-toolbar-download"
|
|
(click)="downloadContent()">
|
|
<mat-icon>file_download</mat-icon>
|
|
</button>
|
|
|
|
<button
|
|
*ngIf="allowPrint"
|
|
mat-icon-button
|
|
title="{{ 'ADF_VIEWER.ACTIONS.PRINT' | translate }}"
|
|
data-automation-id="adf-toolbar-print"
|
|
(click)="printContent()">
|
|
<mat-icon>print</mat-icon>
|
|
</button>
|
|
|
|
<button
|
|
*ngIf="allowShare"
|
|
mat-icon-button
|
|
title="{{ 'ADF_VIEWER.ACTIONS.SHARE' | translate }}"
|
|
data-automation-id="adf-toolbar-share"
|
|
(click)="shareContent()">
|
|
<mat-icon>share</mat-icon>
|
|
</button>
|
|
|
|
<button
|
|
*ngIf="viewerType !== 'media' && allowFullScreen"
|
|
mat-icon-button
|
|
title="{{ 'ADF_VIEWER.ACTIONS.FULLSCREEN' | translate }}"
|
|
data-automation-id="adf-toolbar-fullscreen"
|
|
(click)="enterFullScreen()">
|
|
<mat-icon>fullscreen</mat-icon>
|
|
</button>
|
|
|
|
<ng-container *ngIf="mnuMoreActions">
|
|
<button
|
|
mat-icon-button
|
|
[matMenuTriggerFor]="mnuMoreActions"
|
|
title="{{ 'ADF_VIEWER.ACTIONS.MORE_ACTIONS' | translate }}"
|
|
data-automation-id="adf-toolbar-more-actions">
|
|
<mat-icon>more_vert</mat-icon>
|
|
</button>
|
|
<mat-menu #mnuMoreActions="matMenu" [overlapTrigger]="false">
|
|
<ng-content select="adf-viewer-more-actions"></ng-content>
|
|
</mat-menu>
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="allowSidebar">
|
|
<adf-toolbar-divider></adf-toolbar-divider>
|
|
|
|
<button
|
|
mat-icon-button
|
|
title="{{ 'ADF_VIEWER.ACTIONS.INFO' | translate }}"
|
|
data-automation-id="adf-toolbar-sidebar"
|
|
[color]="showSidebar ? 'accent' : 'default'"
|
|
(click)="toggleSidebar()">
|
|
<mat-icon>info_outline</mat-icon>
|
|
</button>
|
|
</ng-container>
|
|
|
|
</adf-toolbar>
|
|
</ng-container>
|
|
|
|
<div fxLayout="row" fxFlex="1 1 auto">
|
|
|
|
<ng-container *ngIf="allowSidebar && showSidebar">
|
|
<div class="adf-viewer__sidebar" [ngClass]="getSideBarStyle()" fxFlexOrder="{{sidebarPosition === 'left'? 1 : 4 }}">
|
|
<ng-container *ngIf="sidebarTemplate">
|
|
<ng-container *ngTemplateOutlet="sidebarTemplate;context:sidebarTemplateContext"></ng-container>
|
|
</ng-container>
|
|
<ng-content *ngIf="!sidebarTemplate" select="adf-viewer-sidebar"></ng-content>
|
|
</div>
|
|
</ng-container>
|
|
|
|
<div *ngIf="isLoading" class="adf-viewer-main" fxFlexOrder="{{sidebarPosition !== 'left'? 1 : 4}}" fxFlex="1 1 auto">
|
|
<div class="adf-viewer-layout-content adf-viewer__fullscreen-container">
|
|
<div class="adf-viewer-content-container">
|
|
<ng-container *ngIf="isLoading">
|
|
<div class="adf-viewer__loading-screen" fxFlex="1 1 auto">
|
|
<h2>{{ 'ADF_VIEWER.LOADING' | translate }}</h2>
|
|
<div>
|
|
<mat-spinner></mat-spinner>
|
|
</div>
|
|
</div>
|
|
</ng-container>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div *ngIf="!isLoading" class="adf-viewer-main" fxFlexOrder="{{sidebarPosition !== 'left'? 1 : 4}}" fxFlex="1 1 auto">
|
|
<div class="adf-viewer-layout-content adf-viewer__fullscreen-container">
|
|
<div class="adf-viewer-content-container" [ngSwitch]="viewerType">
|
|
<ng-container *ngSwitchCase="'pdf'">
|
|
<adf-pdf-viewer [thumbnailsTemplate]="thumbnailsTemplate" [allowThumbnails]="allowThumbnails" [blobFile]="blobFile" [urlFile]="urlFileContent" [nameFile]="displayName"></adf-pdf-viewer>
|
|
</ng-container>
|
|
|
|
<ng-container *ngSwitchCase="'image'">
|
|
<adf-img-viewer [urlFile]="urlFileContent" [nameFile]="displayName" [blobFile]="blobFile"></adf-img-viewer>
|
|
</ng-container>
|
|
|
|
<ng-container *ngSwitchCase="'media'">
|
|
<adf-media-player id="adf-mdedia-player" [urlFile]="urlFileContent" [mimeType]="mimeType" [blobFile]="blobFile" [nameFile]="displayName"></adf-media-player>
|
|
</ng-container>
|
|
|
|
<ng-container *ngSwitchCase="'text'">
|
|
<adf-txt-viewer [urlFile]="urlFileContent" [blobFile]="blobFile"></adf-txt-viewer>
|
|
</ng-container>
|
|
|
|
<ng-container *ngSwitchCase="'in_creation'">
|
|
<div class="adf-viewer__loading-screen" fxFlex="1 1 auto">
|
|
<h2>{{ 'ADF_VIEWER.LOADING' | translate }}</h2>
|
|
<div>
|
|
<mat-spinner></mat-spinner>
|
|
</div>
|
|
</div>
|
|
</ng-container>
|
|
|
|
<ng-container *ngSwitchCase="'custom'">
|
|
<span class="adf-viewer-custom-content" *ngFor="let extensionTemplate of extensionTemplates">
|
|
<ng-template *ngIf="extensionTemplate.isVisible" [ngTemplateOutlet]="extensionTemplate.template" [ngTemplateOutletContext]="{ urlFileContent: urlFileContent, extension:extension }">
|
|
</ng-template>
|
|
</span>
|
|
</ng-container>
|
|
|
|
<ng-container *ngSwitchDefault>
|
|
<adf-viewer-unknown-format></adf-viewer-unknown-format>
|
|
</ng-container>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|