@hmcts/media-viewer 4.0.4 → 4.0.6
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/assets/build/pdf.min.mjs +21 -0
- package/assets/build/pdf.mjs +19421 -0
- package/assets/build/pdf.mjs.map +1 -0
- package/assets/build/pdf.sandbox.min.mjs +21 -0
- package/assets/build/pdf.sandbox.mjs +239 -0
- package/assets/build/pdf.sandbox.mjs.map +1 -0
- package/assets/build/pdf.worker.min.mjs +21 -0
- package/assets/build/pdf.worker.mjs +56109 -0
- package/assets/build/pdf.worker.mjs.map +1 -0
- package/assets/sass/angular-tree-component.scss +5 -0
- package/assets/sass/pdf-viewer.scss +34 -1
- package/esm2022/lib/annotations/annotation-set/annotation-create/highlight-create/highlight-create.directive.mjs +13 -4
- package/esm2022/lib/annotations/annotation-set/annotation-view/rectangle/rectangle.component.mjs +5 -5
- package/esm2022/lib/icp/icp-follower.service.mjs +2 -2
- package/esm2022/lib/print.service.mjs +4 -2
- package/esm2022/lib/store/reducers/document.reducer.mjs +6 -6
- package/esm2022/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.mjs +29 -18
- package/esm2022/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.provider.mjs +4 -3
- package/esm2022/lib/viewers/pdf-viewer/pdf-viewer.component.mjs +7 -3
- package/esm2022/lib/viewers/pdf-viewer/side-bar/bookmarks/bookmarks.component.mjs +18 -3
- package/esm2022/lib/viewers/viewer-event.service.mjs +5 -1
- package/fesm2022/hmcts-media-viewer.mjs +82 -37
- package/fesm2022/hmcts-media-viewer.mjs.map +1 -1
- package/lib/annotations/annotation-set/annotation-create/highlight-create/highlight-create.directive.d.ts.map +1 -1
- package/lib/icp/icp-follower.service.d.ts.map +1 -1
- package/lib/print.service.d.ts.map +1 -1
- package/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.d.ts +4 -2
- package/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.d.ts.map +1 -1
- package/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.provider.d.ts +1 -0
- package/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.provider.d.ts.map +1 -1
- package/lib/viewers/pdf-viewer/pdf-viewer.component.d.ts +1 -0
- package/lib/viewers/pdf-viewer/pdf-viewer.component.d.ts.map +1 -1
- package/lib/viewers/pdf-viewer/side-bar/bookmarks/bookmarks.component.d.ts +1 -0
- package/lib/viewers/pdf-viewer/side-bar/bookmarks/bookmarks.component.d.ts.map +1 -1
- package/lib/viewers/viewer-event.service.d.ts +2 -0
- package/lib/viewers/viewer-event.service.d.ts.map +1 -1
- package/package.json +3 -3
- package/assets/build/pdf.js +0 -13489
- package/assets/build/pdf.js.map +0 -1
- package/assets/build/pdf.min.js +0 -22
- package/assets/build/pdf.worker.entry.js +0 -19
- package/assets/build/pdf.worker.js +0 -45971
- package/assets/build/pdf.worker.js.map +0 -1
- package/assets/build/pdf.worker.min.js +0 -22
|
@@ -14,8 +14,10 @@ import * as i1 from '@ngrx/store';
|
|
|
14
14
|
import { createFeatureSelector, createSelector, select, StoreModule } from '@ngrx/store';
|
|
15
15
|
import uuid from 'uuid/v4';
|
|
16
16
|
import moment from 'moment-timezone';
|
|
17
|
-
import
|
|
18
|
-
import * as
|
|
17
|
+
import 'pdfjs-dist/build/pdf.mjs';
|
|
18
|
+
import * as pdfjsViewer from 'pdfjs-dist/web/pdf_viewer.mjs';
|
|
19
|
+
import { PDFLinkService } from 'pdfjs-dist/web/pdf_viewer.mjs';
|
|
20
|
+
import * as pdfjs from 'pdfjs-dist';
|
|
19
21
|
import 'pdfjs-dist/build/pdf.worker';
|
|
20
22
|
import uuid$1, { v4 } from 'uuid';
|
|
21
23
|
import { some } from 'lodash';
|
|
@@ -304,17 +306,17 @@ function docReducer(state = initialDocumentState, action) {
|
|
|
304
306
|
let hasDifferentPageSize = state.hasDifferentPageSize;
|
|
305
307
|
payload.forEach(page => {
|
|
306
308
|
if (!hasDifferentPageSize && pageHeight && pageWidth &&
|
|
307
|
-
(pageHeight !== page.div['
|
|
309
|
+
(pageHeight !== page.div['clientHeight'] || pageWidth !== page.div['clientWidth'])) {
|
|
308
310
|
hasDifferentPageSize = true;
|
|
309
311
|
}
|
|
310
312
|
else {
|
|
311
|
-
pageHeight = page.div['
|
|
312
|
-
pageWidth = page.div['
|
|
313
|
+
pageHeight = page.div['clientHeight'];
|
|
314
|
+
pageWidth = page.div['clientWidth'];
|
|
313
315
|
}
|
|
314
316
|
const styles = {
|
|
315
317
|
left: page.div['offsetLeft'],
|
|
316
|
-
height: page.div['
|
|
317
|
-
width: page.div['
|
|
318
|
+
height: page.div['clientHeight'],
|
|
319
|
+
width: page.div['clientWidth']
|
|
318
320
|
};
|
|
319
321
|
const scaleRotation = {
|
|
320
322
|
scale: page.scale,
|
|
@@ -1485,7 +1487,7 @@ const getConvertedDocument = createSelector(getDocumentState, getConvertedDocume
|
|
|
1485
1487
|
const getRotation = createSelector(getDocumentState, getRotation$1);
|
|
1486
1488
|
const rotationLoaded = createSelector(getDocumentState, rotationLoaded$1);
|
|
1487
1489
|
|
|
1488
|
-
|
|
1490
|
+
pdfjs.GlobalWorkerOptions.workerSrc = '/assets/build/pdf.worker.min.js';
|
|
1489
1491
|
/**
|
|
1490
1492
|
* Values of the state field returned by the find events
|
|
1491
1493
|
*/
|
|
@@ -1560,7 +1562,10 @@ class PdfJsWrapper {
|
|
|
1560
1562
|
this.documentLoaded.next(pdfDocument);
|
|
1561
1563
|
this.toolbarEvents.pageCountSubject.next(pdfDocument.numPages);
|
|
1562
1564
|
this.pdfViewer.setDocument(pdfDocument);
|
|
1563
|
-
this.pdfViewer.linkService
|
|
1565
|
+
if (this.pdfViewer.linkService instanceof PDFLinkService) {
|
|
1566
|
+
const linkservice = this.pdfViewer.linkService;
|
|
1567
|
+
linkservice.setDocument(pdfDocument, null);
|
|
1568
|
+
}
|
|
1564
1569
|
const outlineNode = await pdfDocument.getOutline();
|
|
1565
1570
|
const outline = outlineNode ? outlineNode.map(x => {
|
|
1566
1571
|
return {
|
|
@@ -1589,7 +1594,7 @@ class PdfJsWrapper {
|
|
|
1589
1594
|
}
|
|
1590
1595
|
}
|
|
1591
1596
|
createLoadingTask(documentUrl) {
|
|
1592
|
-
return
|
|
1597
|
+
return pdfjs.getDocument({
|
|
1593
1598
|
url: documentUrl,
|
|
1594
1599
|
cMapUrl: 'assets/minified/cmaps',
|
|
1595
1600
|
cMapPacked: true,
|
|
@@ -1615,7 +1620,7 @@ class PdfJsWrapper {
|
|
|
1615
1620
|
return Number(pageIndex) + 1;
|
|
1616
1621
|
}
|
|
1617
1622
|
downloadFile(url, filename) {
|
|
1618
|
-
this.downloadManager.downloadUrl(url, filename);
|
|
1623
|
+
this.downloadManager.downloadUrl(url, filename, {});
|
|
1619
1624
|
}
|
|
1620
1625
|
setPageNumber(pageNumber) {
|
|
1621
1626
|
this.pdfViewer.currentPageNumber = pageNumber;
|
|
@@ -1627,18 +1632,21 @@ class PdfJsWrapper {
|
|
|
1627
1632
|
this.pdfViewer.currentPageNumber += numPages;
|
|
1628
1633
|
}
|
|
1629
1634
|
search(operation) {
|
|
1630
|
-
const command = operation.reset ? '
|
|
1631
|
-
|
|
1635
|
+
const command = operation.reset ? '' : 'again';
|
|
1636
|
+
const data = {
|
|
1637
|
+
source: this.pdfViewer,
|
|
1638
|
+
type: command,
|
|
1632
1639
|
query: operation.searchTerm,
|
|
1633
1640
|
phraseSearch: true,
|
|
1634
1641
|
caseSensitive: operation.matchCase,
|
|
1635
1642
|
entireWord: operation.wholeWord,
|
|
1636
1643
|
highlightAll: operation.highlightAll,
|
|
1637
1644
|
findPrevious: operation.previous,
|
|
1638
|
-
}
|
|
1645
|
+
};
|
|
1646
|
+
this.pdfViewer.eventBus.dispatch('find', data);
|
|
1639
1647
|
}
|
|
1640
1648
|
clearSearch() {
|
|
1641
|
-
this.pdfViewer.eventBus.dispatch('findbarclose');
|
|
1649
|
+
this.pdfViewer.eventBus.dispatch('findbarclose', {});
|
|
1642
1650
|
}
|
|
1643
1651
|
navigateTo(destination) {
|
|
1644
1652
|
if (destination instanceof Object) {
|
|
@@ -1649,17 +1657,20 @@ class PdfJsWrapper {
|
|
|
1649
1657
|
}
|
|
1650
1658
|
destination[4] = this.zoomValue;
|
|
1651
1659
|
}
|
|
1652
|
-
this.
|
|
1660
|
+
this.nativeNavigate(destination);
|
|
1661
|
+
}
|
|
1662
|
+
nativeNavigate(destination) {
|
|
1663
|
+
this.pdfViewer.linkService.goToDestination(destination);
|
|
1653
1664
|
}
|
|
1654
1665
|
setZoom(zoomValue) {
|
|
1655
|
-
this.pdfViewer.currentScaleValue = this.getZoomValue(zoomValue);
|
|
1656
|
-
this.zoomValue = this.pdfViewer.currentScaleValue;
|
|
1657
|
-
this.toolbarEvents.zoomValueSubject.next(this.
|
|
1666
|
+
this.pdfViewer.currentScaleValue = this.getZoomValue(zoomValue).toString();
|
|
1667
|
+
this.zoomValue = +this.pdfViewer.currentScaleValue;
|
|
1668
|
+
this.toolbarEvents.zoomValueSubject.next(this.zoomValue);
|
|
1658
1669
|
}
|
|
1659
1670
|
stepZoom(zoomValue) {
|
|
1660
|
-
this.pdfViewer.currentScaleValue =
|
|
1661
|
-
this.zoomValue = this.pdfViewer.currentScaleValue;
|
|
1662
|
-
this.toolbarEvents.zoomValueSubject.next(this.
|
|
1671
|
+
this.pdfViewer.currentScaleValue = this.getZoomValue((+this.pdfViewer.currentScaleValue) + zoomValue).toString();
|
|
1672
|
+
this.zoomValue = +this.pdfViewer.currentScaleValue;
|
|
1673
|
+
this.toolbarEvents.zoomValueSubject.next(this.zoomValue);
|
|
1663
1674
|
}
|
|
1664
1675
|
getZoomValue(zoomValue) {
|
|
1665
1676
|
if (isNaN(zoomValue)) {
|
|
@@ -1683,7 +1694,7 @@ class PdfJsWrapper {
|
|
|
1683
1694
|
return this.pdfViewer.pagesRotation;
|
|
1684
1695
|
}
|
|
1685
1696
|
getCurrentPDFZoomValue() {
|
|
1686
|
-
return this.pdfViewer.currentScaleValue;
|
|
1697
|
+
return +this.pdfViewer.currentScaleValue;
|
|
1687
1698
|
}
|
|
1688
1699
|
setCurrentPDFTitle(title) {
|
|
1689
1700
|
this.documentTitle = title;
|
|
@@ -1933,7 +1944,7 @@ class PdfJsWrapperFactory {
|
|
|
1933
1944
|
textLayerMode: 2
|
|
1934
1945
|
});
|
|
1935
1946
|
this.linkService.setViewer(pdfViewer);
|
|
1936
|
-
this.pdfJsWrapper = new PdfJsWrapper(pdfViewer, new pdfjsViewer.DownloadManager(
|
|
1947
|
+
this.pdfJsWrapper = new PdfJsWrapper(pdfViewer, new pdfjsViewer.DownloadManager(), this.toolbarEvents, new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject());
|
|
1937
1948
|
return this.pdfJsWrapper;
|
|
1938
1949
|
}
|
|
1939
1950
|
pdfWrapper() {
|
|
@@ -1963,7 +1974,9 @@ class PrintService {
|
|
|
1963
1974
|
printWindow.document.close();
|
|
1964
1975
|
printWindow.focus();
|
|
1965
1976
|
printWindow.print();
|
|
1966
|
-
|
|
1977
|
+
setTimeout((printer) => {
|
|
1978
|
+
printer.close();
|
|
1979
|
+
}, 1000, printWindow);
|
|
1967
1980
|
}
|
|
1968
1981
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PrintService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1969
1982
|
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PrintService, providedIn: 'root' }); }
|
|
@@ -1981,6 +1994,7 @@ class ViewerEventService {
|
|
|
1981
1994
|
this.boxHighlight = new Subject();
|
|
1982
1995
|
this.ctxToolbarCleared = new Subject();
|
|
1983
1996
|
this.navigationEvent = new Subject();
|
|
1997
|
+
this.navigationEventICP = new Subject();
|
|
1984
1998
|
}
|
|
1985
1999
|
textSelected(selectionData) {
|
|
1986
2000
|
this.textHighlight.next(selectionData);
|
|
@@ -1994,6 +2008,9 @@ class ViewerEventService {
|
|
|
1994
2008
|
goToDestination(destination) {
|
|
1995
2009
|
this.navigationEvent.next(destination);
|
|
1996
2010
|
}
|
|
2011
|
+
goToDestinationICP(destination) {
|
|
2012
|
+
this.navigationEventICP.next(destination);
|
|
2013
|
+
}
|
|
1997
2014
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ViewerEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1998
2015
|
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ViewerEventService, providedIn: 'root' }); }
|
|
1999
2016
|
}
|
|
@@ -2278,7 +2295,7 @@ class IcpFollowerService {
|
|
|
2278
2295
|
}
|
|
2279
2296
|
followScreenUpdate({ pdfPosition }) {
|
|
2280
2297
|
if (pdfPosition) {
|
|
2281
|
-
this.viewerEvents.
|
|
2298
|
+
this.viewerEvents.goToDestinationICP([
|
|
2282
2299
|
pdfPosition.pageNumber - 1,
|
|
2283
2300
|
{ 'name': 'XYZ' },
|
|
2284
2301
|
pdfPosition.left,
|
|
@@ -4429,10 +4446,10 @@ class RectangleComponent {
|
|
|
4429
4446
|
}
|
|
4430
4447
|
}
|
|
4431
4448
|
hasRectangleChanged(viewRect) {
|
|
4432
|
-
return this.left !== viewRect.offsetLeft ||
|
|
4433
|
-
this.top !== viewRect.offsetTop ||
|
|
4434
|
-
this.width !== viewRect.offsetWidth ||
|
|
4435
|
-
this.height !== viewRect.offsetHeight;
|
|
4449
|
+
return Math.round(this.left) !== viewRect.offsetLeft ||
|
|
4450
|
+
Math.round(this.top) !== viewRect.offsetTop ||
|
|
4451
|
+
Math.round(this.width) !== viewRect.offsetWidth ||
|
|
4452
|
+
Math.round(this.height) !== viewRect.offsetHeight;
|
|
4436
4453
|
}
|
|
4437
4454
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: RectangleComponent, deps: [{ token: ToolbarEventService }, { token: HighlightCreateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4438
4455
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: RectangleComponent, selector: "mv-anno-rectangle", inputs: { color: "color", zoom: "zoom", rotate: "rotate", editable: "editable", pageHeight: "pageHeight", pageWidth: "pageWidth", annoRect: "annoRect", selected: "selected" }, outputs: { selectEvent: "selectEvent", updateEvent: "updateEvent" }, viewQueries: [{ propertyName: "viewRect", first: true, predicate: ["rectElement"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"editable; else nonEditable\">\n <div #rectElement\n class=\"rectangle\"\n draggable\n resizable\n [tabindex]=\"annoRect.id\"\n [ngClass]=\"{ 'selected': selected, 'grabNDrag': enableGrabNDrag }\"\n [style.backgroundColor]=\"'#' + color\"\n [style.width]=\"width + 'px'\"\n [style.height]=\"height + 'px'\"\n [style.left]=\"left + 'px'\"\n [style.top]=\"top + 'px'\"\n [rotate]=\"0\"\n [selected]=\"selected\"\n (click)=\"onClick()\"\n (stopped)=\"onUpdate(rectElement)\">\n </div>\n</div>\n<ng-template #nonEditable>\n <div #rectElement\n class=\"rectangle\"\n [tabindex]=\"annoRect.id\"\n [ngClass]=\"{ 'selected': selected }\"\n [style.backgroundColor]=\"'#' + color\"\n [style.width]=\"width + 'px'\"\n [style.height]=\"height+ 'px'\"\n [style.left]=\"left + 'px'\"\n [style.top]=\"top + 'px'\"\n (click)=\"onClick()\">\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$2.DraggableElementDirective, selector: "[draggable]", inputs: ["rotate"], outputs: ["coordinates", "stopped"] }, { kind: "directive", type: i4$2.ResizableElementDirective, selector: "[resizable]", inputs: ["rotate", "selected"], outputs: ["stopped"] }] }); }
|
|
@@ -5024,17 +5041,29 @@ class BookmarksComponent {
|
|
|
5024
5041
|
}
|
|
5025
5042
|
dragEnd() {
|
|
5026
5043
|
this.isUserdragging = false;
|
|
5044
|
+
if (this.hoverHtmlElement?.style) {
|
|
5045
|
+
this.hoverHtmlElement.style.borderRight = '';
|
|
5046
|
+
}
|
|
5027
5047
|
}
|
|
5028
5048
|
dragHover(event, node) {
|
|
5029
5049
|
if (this.isUserdragging) {
|
|
5030
5050
|
const newEvent = event;
|
|
5031
5051
|
const percentageX = newEvent.offsetX / newEvent.target.clientWidth;
|
|
5052
|
+
debugger;
|
|
5032
5053
|
if (percentageX > .55) {
|
|
5033
5054
|
this.hoveredNode = node;
|
|
5055
|
+
if (this.hoverHtmlElement?.style) {
|
|
5056
|
+
this.hoverHtmlElement.style.borderRight = '';
|
|
5057
|
+
}
|
|
5058
|
+
this.hoverHtmlElement = event.currentTarget;
|
|
5059
|
+
this.hoverHtmlElement.style.borderRight = '5px solid #007bff';
|
|
5034
5060
|
this.dragNodeInsertToParent = true;
|
|
5035
5061
|
}
|
|
5036
5062
|
else {
|
|
5037
5063
|
this.hoveredNode = null;
|
|
5064
|
+
if (this.hoverHtmlElement?.style) {
|
|
5065
|
+
this.hoverHtmlElement.style.borderRight = '';
|
|
5066
|
+
}
|
|
5038
5067
|
this.dragNodeInsertToParent = false;
|
|
5039
5068
|
}
|
|
5040
5069
|
}
|
|
@@ -5043,6 +5072,9 @@ class BookmarksComponent {
|
|
|
5043
5072
|
if (this.isUserdragging) {
|
|
5044
5073
|
if (!node || this.hoveredNode?.id !== node.id) {
|
|
5045
5074
|
this.dragNodeInsertToParent = false;
|
|
5075
|
+
if (this.hoverHtmlElement?.style) {
|
|
5076
|
+
this.hoverHtmlElement.style.borderRight = '';
|
|
5077
|
+
}
|
|
5046
5078
|
this.hoveredNode = null;
|
|
5047
5079
|
}
|
|
5048
5080
|
}
|
|
@@ -5096,11 +5128,11 @@ class BookmarksComponent {
|
|
|
5096
5128
|
return result ? true : false;
|
|
5097
5129
|
}
|
|
5098
5130
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: BookmarksComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5099
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: BookmarksComponent, selector: "mv-bookmarks", inputs: { bookmarkNodes: "bookmarkNodes", zoom: "zoom", rotate: "rotate" }, outputs: { goToDestination: "goToDestination" }, ngImport: i0, template: "<a *ngIf=\"bookmarkNodes?.length === 0\" class=\"highlightedOutlineItem\"\n >No bookmarks created yet</a\n>\n<cdk-tree\n cdkDropList\n [cdkDropListDisabled]=\"!isDraggingOn\"\n class=\"bookmarks-tree\"\n *ngIf=\"datasource\"\n [dataSource]=\"datasource\"\n [treeControl]=\"treeControl\"\n (cdkDropListDropped)=\"drop($event)\"\n>\n <!-- This is the tree node template for leaf nodes -->\n <cdk-nested-tree-node class=\"node-wrapper\" *cdkTreeNodeDef=\"let node\">\n <div *ngIf=\"node.id !== editableBookmark; else inputBookmark\">\n <div\n class=\"node-content-wrapper nested-tree-node\"\n cdkDrag\n [cdkDragData]=\"node\"\n (mouseenter)=\"dragHover($event, node)\"\n (mouseleave)=\"dragHoverEnd($event, node)\"\n (cdkDragStarted)=\"dragStart()\"\n (cdkDragReleased)=\"dragEnd()\"\n >\n <div class=\"outlineItem\">\n <a (click)=\"goToBookmark(node)\">\n {{ node.name }}\n </a>\n </div>\n <button\n class=\"bookmark__rename\"\n (click)=\"editBookmark(node.id)\"\n ></button>\n <button\n class=\"bookmark__delete\"\n (click)=\"deleteBookmark2(node)\"\n ></button>\n </div>\n <div class=\"node-drop-slot\"></div
|
|
5131
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: BookmarksComponent, selector: "mv-bookmarks", inputs: { bookmarkNodes: "bookmarkNodes", zoom: "zoom", rotate: "rotate" }, outputs: { goToDestination: "goToDestination" }, ngImport: i0, template: "<a *ngIf=\"bookmarkNodes?.length === 0\" class=\"highlightedOutlineItem\"\n >No bookmarks created yet</a\n>\n<cdk-tree\n cdkDropList\n [cdkDropListDisabled]=\"!isDraggingOn\"\n class=\"bookmarks-tree\"\n *ngIf=\"datasource\"\n [dataSource]=\"datasource\"\n [treeControl]=\"treeControl\"\n (cdkDropListDropped)=\"drop($event)\"\n>\n <!-- This is the tree node template for leaf nodes -->\n <cdk-nested-tree-node class=\"node-wrapper\" *cdkTreeNodeDef=\"let node\">\n <div *ngIf=\"node.id !== editableBookmark; else inputBookmark\">\n <div\n class=\"node-content-wrapper nested-tree-node nest-tree-node-padding\"\n cdkDrag\n [cdkDragData]=\"node\"\n (mouseenter)=\"dragHover($event, node)\"\n (mouseleave)=\"dragHoverEnd($event, node)\"\n (cdkDragStarted)=\"dragStart()\"\n (cdkDragReleased)=\"dragEnd()\"\n >\n <div class=\"outlineItem\">\n <a (click)=\"goToBookmark(node)\">\n {{ node.name }}\n </a>\n </div>\n <button\n class=\"bookmark__rename\"\n (click)=\"editBookmark(node.id)\"\n ></button>\n <button\n class=\"bookmark__delete\"\n (click)=\"deleteBookmark2(node)\"\n ></button>\n </div>\n <!-- <div class=\"node-drop-slot\"></div> -->\n </div>\n <ng-template #inputBookmark>\n <input\n #bookmarkName\n class=\"bookmark__input\"\n [value]=\"node.name\"\n [maxLength]=\"BOOKMARK_CHAR_LIMIT\"\n />\n <button\n class=\"bookmark__save\"\n (click)=\"updateBookmark(node, bookmarkName.value)\"\n ></button>\n </ng-template>\n </cdk-nested-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <cdk-nested-tree-node\n class=\"node-wrapper\"\n *cdkTreeNodeDef=\"let node; when: hasChild\"\n >\n <div *ngIf=\"node.id !== editableBookmark; else inputBookmark2\">\n <div\n class=\"node-content-wrapper nested-tree-node\"\n cdkDrag\n [cdkDragData]=\"node\"\n (mouseenter)=\"dragHover($event, node)\"\n (mouseleave)=\"dragHoverEnd($event, node)\"\n (cdkDragStarted)=\"dragStart()\"\n (cdkDragReleased)=\"dragEnd()\"\n >\n <div class=\"outlineItem\">\n <span\n cdkTreeNodeToggle\n class=\"toggle-children-wrapper\"\n [ngClass]=\"onNodeExpand(node)\"\n ><span class=\"toggle-children\"></span\n ></span>\n <a (click)=\"goToBookmark(node)\">\n {{ node.name }}\n </a>\n </div>\n <button\n class=\"bookmark__rename\"\n (click)=\"editBookmark(node.id)\"\n ></button>\n <button\n class=\"bookmark__delete\"\n (click)=\"deleteBookmark2(node)\"\n ></button>\n </div>\n <!-- <div class=\"node-drop-slot\"></div> -->\n </div>\n <ng-template #inputBookmark2>\n <input\n #bookmarkName\n class=\"bookmark__input\"\n [value]=\"node.name\"\n [maxLength]=\"BOOKMARK_CHAR_LIMIT\"\n />\n <button\n class=\"bookmark__save\"\n (click)=\"updateBookmark(node, bookmarkName.value)\"\n ></button>\n </ng-template>\n <div class=\"nested-tree-node-children\" *ngIf=\"treeControl.isExpanded(node)\">\n <ng-container cdkTreeNodeOutlet></ng-container>\n </div>\n </cdk-nested-tree-node>\n</cdk-tree>\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.CdkNestedTreeNode, selector: "cdk-nested-tree-node", exportAs: ["cdkNestedTreeNode"] }, { kind: "directive", type: i3.CdkTreeNodeDef, selector: "[cdkTreeNodeDef]", inputs: ["cdkTreeNodeDefWhen"] }, { kind: "directive", type: i3.CdkTreeNodeToggle, selector: "[cdkTreeNodeToggle]", inputs: ["cdkTreeNodeToggleRecursive"] }, { kind: "component", type: i3.CdkTree, selector: "cdk-tree", inputs: ["dataSource", "treeControl", "trackBy"], exportAs: ["cdkTree"] }, { kind: "directive", type: i3.CdkTreeNodeOutlet, selector: "[cdkTreeNodeOutlet]" }, { kind: "directive", type: i4$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }] }); }
|
|
5100
5132
|
}
|
|
5101
5133
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: BookmarksComponent, decorators: [{
|
|
5102
5134
|
type: Component,
|
|
5103
|
-
args: [{ selector: 'mv-bookmarks', template: "<a *ngIf=\"bookmarkNodes?.length === 0\" class=\"highlightedOutlineItem\"\n >No bookmarks created yet</a\n>\n<cdk-tree\n cdkDropList\n [cdkDropListDisabled]=\"!isDraggingOn\"\n class=\"bookmarks-tree\"\n *ngIf=\"datasource\"\n [dataSource]=\"datasource\"\n [treeControl]=\"treeControl\"\n (cdkDropListDropped)=\"drop($event)\"\n>\n <!-- This is the tree node template for leaf nodes -->\n <cdk-nested-tree-node class=\"node-wrapper\" *cdkTreeNodeDef=\"let node\">\n <div *ngIf=\"node.id !== editableBookmark; else inputBookmark\">\n <div\n class=\"node-content-wrapper nested-tree-node\"\n cdkDrag\n [cdkDragData]=\"node\"\n (mouseenter)=\"dragHover($event, node)\"\n (mouseleave)=\"dragHoverEnd($event, node)\"\n (cdkDragStarted)=\"dragStart()\"\n (cdkDragReleased)=\"dragEnd()\"\n >\n <div class=\"outlineItem\">\n <a (click)=\"goToBookmark(node)\">\n {{ node.name }}\n </a>\n </div>\n <button\n class=\"bookmark__rename\"\n (click)=\"editBookmark(node.id)\"\n ></button>\n <button\n class=\"bookmark__delete\"\n (click)=\"deleteBookmark2(node)\"\n ></button>\n </div>\n <div class=\"node-drop-slot\"></div
|
|
5135
|
+
args: [{ selector: 'mv-bookmarks', template: "<a *ngIf=\"bookmarkNodes?.length === 0\" class=\"highlightedOutlineItem\"\n >No bookmarks created yet</a\n>\n<cdk-tree\n cdkDropList\n [cdkDropListDisabled]=\"!isDraggingOn\"\n class=\"bookmarks-tree\"\n *ngIf=\"datasource\"\n [dataSource]=\"datasource\"\n [treeControl]=\"treeControl\"\n (cdkDropListDropped)=\"drop($event)\"\n>\n <!-- This is the tree node template for leaf nodes -->\n <cdk-nested-tree-node class=\"node-wrapper\" *cdkTreeNodeDef=\"let node\">\n <div *ngIf=\"node.id !== editableBookmark; else inputBookmark\">\n <div\n class=\"node-content-wrapper nested-tree-node nest-tree-node-padding\"\n cdkDrag\n [cdkDragData]=\"node\"\n (mouseenter)=\"dragHover($event, node)\"\n (mouseleave)=\"dragHoverEnd($event, node)\"\n (cdkDragStarted)=\"dragStart()\"\n (cdkDragReleased)=\"dragEnd()\"\n >\n <div class=\"outlineItem\">\n <a (click)=\"goToBookmark(node)\">\n {{ node.name }}\n </a>\n </div>\n <button\n class=\"bookmark__rename\"\n (click)=\"editBookmark(node.id)\"\n ></button>\n <button\n class=\"bookmark__delete\"\n (click)=\"deleteBookmark2(node)\"\n ></button>\n </div>\n <!-- <div class=\"node-drop-slot\"></div> -->\n </div>\n <ng-template #inputBookmark>\n <input\n #bookmarkName\n class=\"bookmark__input\"\n [value]=\"node.name\"\n [maxLength]=\"BOOKMARK_CHAR_LIMIT\"\n />\n <button\n class=\"bookmark__save\"\n (click)=\"updateBookmark(node, bookmarkName.value)\"\n ></button>\n </ng-template>\n </cdk-nested-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <cdk-nested-tree-node\n class=\"node-wrapper\"\n *cdkTreeNodeDef=\"let node; when: hasChild\"\n >\n <div *ngIf=\"node.id !== editableBookmark; else inputBookmark2\">\n <div\n class=\"node-content-wrapper nested-tree-node\"\n cdkDrag\n [cdkDragData]=\"node\"\n (mouseenter)=\"dragHover($event, node)\"\n (mouseleave)=\"dragHoverEnd($event, node)\"\n (cdkDragStarted)=\"dragStart()\"\n (cdkDragReleased)=\"dragEnd()\"\n >\n <div class=\"outlineItem\">\n <span\n cdkTreeNodeToggle\n class=\"toggle-children-wrapper\"\n [ngClass]=\"onNodeExpand(node)\"\n ><span class=\"toggle-children\"></span\n ></span>\n <a (click)=\"goToBookmark(node)\">\n {{ node.name }}\n </a>\n </div>\n <button\n class=\"bookmark__rename\"\n (click)=\"editBookmark(node.id)\"\n ></button>\n <button\n class=\"bookmark__delete\"\n (click)=\"deleteBookmark2(node)\"\n ></button>\n </div>\n <!-- <div class=\"node-drop-slot\"></div> -->\n </div>\n <ng-template #inputBookmark2>\n <input\n #bookmarkName\n class=\"bookmark__input\"\n [value]=\"node.name\"\n [maxLength]=\"BOOKMARK_CHAR_LIMIT\"\n />\n <button\n class=\"bookmark__save\"\n (click)=\"updateBookmark(node, bookmarkName.value)\"\n ></button>\n </ng-template>\n <div class=\"nested-tree-node-children\" *ngIf=\"treeControl.isExpanded(node)\">\n <ng-container cdkTreeNodeOutlet></ng-container>\n </div>\n </cdk-nested-tree-node>\n</cdk-tree>\n" }]
|
|
5104
5136
|
}], ctorParameters: () => [{ type: i1.Store }], propDecorators: { bookmarkNodes: [{
|
|
5105
5137
|
type: Input
|
|
5106
5138
|
}], zoom: [{
|
|
@@ -5298,8 +5330,17 @@ class HighlightCreateDirective {
|
|
|
5298
5330
|
}
|
|
5299
5331
|
}
|
|
5300
5332
|
onMouseUp(mouseEvent) {
|
|
5301
|
-
|
|
5302
|
-
|
|
5333
|
+
let page;
|
|
5334
|
+
let currentElement = mouseEvent.target;
|
|
5335
|
+
while (currentElement.offsetParent) {
|
|
5336
|
+
currentElement = currentElement.offsetParent;
|
|
5337
|
+
if (currentElement.getAttribute) {
|
|
5338
|
+
page = parseInt(currentElement.getAttribute('data-page-number'), 10);
|
|
5339
|
+
if (page) {
|
|
5340
|
+
break;
|
|
5341
|
+
}
|
|
5342
|
+
}
|
|
5343
|
+
}
|
|
5303
5344
|
if (this.toolbarEvents.highlightModeSubject.getValue()) {
|
|
5304
5345
|
const rectangles = this.getRectangles(mouseEvent, page);
|
|
5305
5346
|
this.viewerEvents.textSelected({ page, rectangles });
|
|
@@ -5326,7 +5367,7 @@ class HighlightCreateDirective {
|
|
|
5326
5367
|
const range = selection.getRangeAt(0).cloneRange();
|
|
5327
5368
|
const clientRects = range.getClientRects();
|
|
5328
5369
|
if (clientRects) {
|
|
5329
|
-
const parentRect = localElement.
|
|
5370
|
+
const parentRect = localElement.closest(".textLayer").getBoundingClientRect();
|
|
5330
5371
|
const selectionRectangles = [];
|
|
5331
5372
|
for (let i = 0; i < clientRects.length; i++) {
|
|
5332
5373
|
const selectionRectangle = this.createTextRectangle(clientRects[i], parentRect);
|
|
@@ -5537,6 +5578,7 @@ class PdfViewerComponent {
|
|
|
5537
5578
|
this.showCommentsPanel = toggle;
|
|
5538
5579
|
}));
|
|
5539
5580
|
this.$subscription.add(this.viewerEvents.navigationEvent.subscribe(dest => this.goToDestination(dest)));
|
|
5581
|
+
this.$subscription.add(this.viewerEvents.navigationEventICP.subscribe(destination => this.goToDestinationICP(destination)));
|
|
5540
5582
|
this.$subscription.add(this.toolbarEvents.icp.participantsListVisible.subscribe(toggle => this.showIcpParticipantsList = toggle));
|
|
5541
5583
|
this.$subscription.add(this.pdfWrapper.positionUpdated.asObservable()
|
|
5542
5584
|
.pipe(throttleTime(500, asyncScheduler, { leading: true, trailing: true }))
|
|
@@ -5654,15 +5696,18 @@ class PdfViewerComponent {
|
|
|
5654
5696
|
this.rotateDocument(currentRotation);
|
|
5655
5697
|
}, 10);
|
|
5656
5698
|
}
|
|
5699
|
+
goToDestinationICP(destination) {
|
|
5700
|
+
this.pdfWrapper.nativeNavigate(destination);
|
|
5701
|
+
}
|
|
5657
5702
|
getCurrentPageNumber() {
|
|
5658
5703
|
return this.pdfWrapper.getPageNumber();
|
|
5659
5704
|
}
|
|
5660
5705
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PdfViewerComponent, deps: [{ token: i1.Store }, { token: i1.Store }, { token: PdfJsWrapperFactory }, { token: PrintService }, { token: ToolbarEventService }, { token: ViewerEventService }, { token: IcpService }, { token: ToolbarButtonVisibilityService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5661
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PdfViewerComponent, selector: "mv-pdf-viewer", inputs: { downloadUrl: "downloadUrl", url: "url", downloadFileName: "downloadFileName", enableAnnotations: "enableAnnotations", enableRedactions: "enableRedactions", enableICP: "enableICP", annotationSet: "annotationSet", enableRedactSearch: "enableRedactSearch", height: "height", caseId: "caseId", searchBarHidden: "searchBarHidden" }, outputs: { mediaLoadStatus: "mediaLoadStatus", pdfViewerException: "pdfViewerException", documentTitle: "documentTitle" }, viewQueries: [{ propertyName: "viewerContainer", first: true, predicate: ["viewerContainer"], descendants: true, static: true }, { propertyName: "pdfViewer", first: true, predicate: ["pdfViewer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mv-side-bar\n *ngIf=\"toolbarEvents.sidebarOpen\"\n id=\"sidebarContainer\"\n [url]=\"url\"\n [zoom]=\"zoom\"\n [rotate]=\"rotation\"\n [outline]=\"documentOutline\"\n [annotationsEnabled]=\"enableAnnotations\"\n [currentPageNumber]=\"getCurrentPageNumber()\"\n>\n</mv-side-bar>\n<mv-comment-set-header\n *ngIf=\"enableAnnotations\"\n [ngClass]=\"{ 'show-comments-panel': showCommentsPanel }\"\n [showCommentSummary]=\"toolbarButtons.showCommentSummary\"\n (showCommentSummaryDialog)=\"toggleCommentsSummary()\"\n>\n</mv-comment-set-header>\n<mv-participants-list></mv-participants-list>\n<div\n class=\"pdfContainer\"\n [ngStyle]=\"{ height: height }\"\n [ngClass]=\"{ pdfContainer: true, hidden: errorMessage }\"\n>\n <mv-redaction-search-bar></mv-redaction-search-bar>\n <div\n #viewerContainer\n mvGrabNDrag\n [dragX]=\"viewerContainer\"\n [dragEnabled]=\"enableGrabNDrag\"\n id=\"viewerContainer\"\n class=\"viewer-container\"\n [class.annotations]=\"enableAnnotations\"\n [class.show-comments-panel]=\"\n (showCommentsPanel || showIcpParticipantsList) &&\n (toolbarEvents.redactionMode | async) !== true\n \"\n [class.grabNDrag]=\"enableGrabNDrag\"\n >\n <div\n #pdfViewer\n class=\"pdfViewer\"\n mvCreateTextHighlight\n [ngClass]=\"{\n hidden:
|
|
5706
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PdfViewerComponent, selector: "mv-pdf-viewer", inputs: { downloadUrl: "downloadUrl", url: "url", downloadFileName: "downloadFileName", enableAnnotations: "enableAnnotations", enableRedactions: "enableRedactions", enableICP: "enableICP", annotationSet: "annotationSet", enableRedactSearch: "enableRedactSearch", height: "height", caseId: "caseId", searchBarHidden: "searchBarHidden" }, outputs: { mediaLoadStatus: "mediaLoadStatus", pdfViewerException: "pdfViewerException", documentTitle: "documentTitle" }, viewQueries: [{ propertyName: "viewerContainer", first: true, predicate: ["viewerContainer"], descendants: true, static: true }, { propertyName: "pdfViewer", first: true, predicate: ["pdfViewer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mv-side-bar\n *ngIf=\"toolbarEvents.sidebarOpen\"\n id=\"sidebarContainer\"\n [url]=\"url\"\n [zoom]=\"zoom\"\n [rotate]=\"rotation\"\n [outline]=\"documentOutline\"\n [annotationsEnabled]=\"enableAnnotations\"\n [currentPageNumber]=\"getCurrentPageNumber()\"\n>\n</mv-side-bar>\n<mv-comment-set-header\n *ngIf=\"enableAnnotations\"\n [ngClass]=\"{ 'show-comments-panel': showCommentsPanel }\"\n [showCommentSummary]=\"toolbarButtons.showCommentSummary\"\n (showCommentSummaryDialog)=\"toggleCommentsSummary()\"\n>\n</mv-comment-set-header>\n<mv-participants-list></mv-participants-list>\n<div\n class=\"pdfContainer\"\n [ngStyle]=\"{ height: height }\"\n [ngClass]=\"{ pdfContainer: true, hidden: errorMessage }\"\n>\n <mv-redaction-search-bar></mv-redaction-search-bar>\n <div\n #viewerContainer\n mvGrabNDrag\n [dragX]=\"viewerContainer\"\n [dragEnabled]=\"enableGrabNDrag\"\n id=\"viewerContainer\"\n class=\"viewer-container\"\n [class.annotations]=\"enableAnnotations\"\n [class.show-comments-panel]=\"\n (showCommentsPanel || showIcpParticipantsList) &&\n (toolbarEvents.redactionMode | async) !== true\n \"\n [class.grabNDrag]=\"enableGrabNDrag\"\n >\n <div\n #pdfViewer\n class=\"pdfViewer\"\n mvCreateTextHighlight\n [ngClass]=\"{\n hidden: false,\n highlightMode: highlightMode | async,\n drawMode: drawMode | async\n }\"\n ></div>\n <mv-redactions\n *ngIf=\"toolbarEvents.redactionMode | async; else annotationTemplate\"\n [zoom]=\"zoom\"\n [rotate]=\"rotation\"\n ></mv-redactions>\n <ng-template #annotationTemplate>\n <mv-metadata-layer\n *ngIf=\"enableAnnotations && annotationSet\"\n [zoom]=\"zoom\"\n [rotate]=\"rotation\"\n >\n </mv-metadata-layer>\n <mv-bookmark-icons [zoom]=\"zoom\" [rotate]=\"rotation\"> </mv-bookmark-icons>\n </ng-template>\n </div>\n <mv-comment-set\n [contentScrollTop]=\"viewerContainer.scrollTop\"\n *ngIf=\"\n enableAnnotations &&\n annotationSet &&\n (toolbarEvents.redactionMode | async) !== true\n \"\n [annotationSet]=\"annotationSet\"\n [zoom]=\"zoom\"\n [rotate]=\"rotation\"\n [height]=\"pdfViewer.offsetHeight\"\n [pageHeights]=\"pageHeights\"\n >\n </mv-comment-set>\n <div class=\"loadingMessage\" *ngIf=\"loadingDocument\">\n <h3 class=\"govuk-heading-m\">\n {{ \"Loading...\" | rpxTranslate}}{{\n loadingDocumentProgress ? loadingDocumentProgress + \"%\" : \"\"\n }}\n </h3>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: RedactionSearchBarComponent, selector: "mv-redaction-search-bar" }, { kind: "component", type: CommentSetComponent, selector: "mv-comment-set", inputs: ["annotationSet", "zoom", "rotate", "height", "pageHeights", "contentScrollTop"] }, { kind: "component", type: CommentSetHeaderComponent, selector: "mv-comment-set-header", inputs: ["showCommentSummary"], outputs: ["showCommentSummaryDialog"] }, { kind: "component", type: MetadataLayerComponent, selector: "mv-metadata-layer", inputs: ["zoom", "rotate"] }, { kind: "component", type: SideBarComponent, selector: "mv-side-bar", inputs: ["annotationsEnabled", "outline", "url", "zoom", "rotate", "currentPageNumber"] }, { kind: "directive", type: GrabNDragDirective, selector: "[mvGrabNDrag]", inputs: ["dragEnabled", "dragX"] }, { kind: "directive", type: HighlightCreateDirective, selector: "[mvCreateTextHighlight]" }, { kind: "component", type: RedactionComponent, selector: "mv-redactions", inputs: ["zoom", "rotate"] }, { kind: "component", type: BookmarkIconsComponent, selector: "mv-bookmark-icons", inputs: ["zoom", "rotate"] }, { kind: "component", type: ParticipantsListComponent, selector: "mv-participants-list" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.RpxTranslatePipe, name: "rpxTranslate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
5662
5707
|
}
|
|
5663
5708
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PdfViewerComponent, decorators: [{
|
|
5664
5709
|
type: Component,
|
|
5665
|
-
args: [{ selector: 'mv-pdf-viewer', encapsulation: ViewEncapsulation.None, template: "<mv-side-bar\n *ngIf=\"toolbarEvents.sidebarOpen\"\n id=\"sidebarContainer\"\n [url]=\"url\"\n [zoom]=\"zoom\"\n [rotate]=\"rotation\"\n [outline]=\"documentOutline\"\n [annotationsEnabled]=\"enableAnnotations\"\n [currentPageNumber]=\"getCurrentPageNumber()\"\n>\n</mv-side-bar>\n<mv-comment-set-header\n *ngIf=\"enableAnnotations\"\n [ngClass]=\"{ 'show-comments-panel': showCommentsPanel }\"\n [showCommentSummary]=\"toolbarButtons.showCommentSummary\"\n (showCommentSummaryDialog)=\"toggleCommentsSummary()\"\n>\n</mv-comment-set-header>\n<mv-participants-list></mv-participants-list>\n<div\n class=\"pdfContainer\"\n [ngStyle]=\"{ height: height }\"\n [ngClass]=\"{ pdfContainer: true, hidden: errorMessage }\"\n>\n <mv-redaction-search-bar></mv-redaction-search-bar>\n <div\n #viewerContainer\n mvGrabNDrag\n [dragX]=\"viewerContainer\"\n [dragEnabled]=\"enableGrabNDrag\"\n id=\"viewerContainer\"\n class=\"viewer-container\"\n [class.annotations]=\"enableAnnotations\"\n [class.show-comments-panel]=\"\n (showCommentsPanel || showIcpParticipantsList) &&\n (toolbarEvents.redactionMode | async) !== true\n \"\n [class.grabNDrag]=\"enableGrabNDrag\"\n >\n <div\n #pdfViewer\n class=\"pdfViewer\"\n mvCreateTextHighlight\n [ngClass]=\"{\n hidden:
|
|
5710
|
+
args: [{ selector: 'mv-pdf-viewer', encapsulation: ViewEncapsulation.None, template: "<mv-side-bar\n *ngIf=\"toolbarEvents.sidebarOpen\"\n id=\"sidebarContainer\"\n [url]=\"url\"\n [zoom]=\"zoom\"\n [rotate]=\"rotation\"\n [outline]=\"documentOutline\"\n [annotationsEnabled]=\"enableAnnotations\"\n [currentPageNumber]=\"getCurrentPageNumber()\"\n>\n</mv-side-bar>\n<mv-comment-set-header\n *ngIf=\"enableAnnotations\"\n [ngClass]=\"{ 'show-comments-panel': showCommentsPanel }\"\n [showCommentSummary]=\"toolbarButtons.showCommentSummary\"\n (showCommentSummaryDialog)=\"toggleCommentsSummary()\"\n>\n</mv-comment-set-header>\n<mv-participants-list></mv-participants-list>\n<div\n class=\"pdfContainer\"\n [ngStyle]=\"{ height: height }\"\n [ngClass]=\"{ pdfContainer: true, hidden: errorMessage }\"\n>\n <mv-redaction-search-bar></mv-redaction-search-bar>\n <div\n #viewerContainer\n mvGrabNDrag\n [dragX]=\"viewerContainer\"\n [dragEnabled]=\"enableGrabNDrag\"\n id=\"viewerContainer\"\n class=\"viewer-container\"\n [class.annotations]=\"enableAnnotations\"\n [class.show-comments-panel]=\"\n (showCommentsPanel || showIcpParticipantsList) &&\n (toolbarEvents.redactionMode | async) !== true\n \"\n [class.grabNDrag]=\"enableGrabNDrag\"\n >\n <div\n #pdfViewer\n class=\"pdfViewer\"\n mvCreateTextHighlight\n [ngClass]=\"{\n hidden: false,\n highlightMode: highlightMode | async,\n drawMode: drawMode | async\n }\"\n ></div>\n <mv-redactions\n *ngIf=\"toolbarEvents.redactionMode | async; else annotationTemplate\"\n [zoom]=\"zoom\"\n [rotate]=\"rotation\"\n ></mv-redactions>\n <ng-template #annotationTemplate>\n <mv-metadata-layer\n *ngIf=\"enableAnnotations && annotationSet\"\n [zoom]=\"zoom\"\n [rotate]=\"rotation\"\n >\n </mv-metadata-layer>\n <mv-bookmark-icons [zoom]=\"zoom\" [rotate]=\"rotation\"> </mv-bookmark-icons>\n </ng-template>\n </div>\n <mv-comment-set\n [contentScrollTop]=\"viewerContainer.scrollTop\"\n *ngIf=\"\n enableAnnotations &&\n annotationSet &&\n (toolbarEvents.redactionMode | async) !== true\n \"\n [annotationSet]=\"annotationSet\"\n [zoom]=\"zoom\"\n [rotate]=\"rotation\"\n [height]=\"pdfViewer.offsetHeight\"\n [pageHeights]=\"pageHeights\"\n >\n </mv-comment-set>\n <div class=\"loadingMessage\" *ngIf=\"loadingDocument\">\n <h3 class=\"govuk-heading-m\">\n {{ \"Loading...\" | rpxTranslate}}{{\n loadingDocumentProgress ? loadingDocumentProgress + \"%\" : \"\"\n }}\n </h3>\n </div>\n</div>\n" }]
|
|
5666
5711
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i1.Store }, { type: PdfJsWrapperFactory }, { type: PrintService }, { type: ToolbarEventService }, { type: ViewerEventService }, { type: IcpService }, { type: ToolbarButtonVisibilityService }], propDecorators: { mediaLoadStatus: [{
|
|
5667
5712
|
type: Output
|
|
5668
5713
|
}], pdfViewerException: [{
|