@hmcts/media-viewer 4.0.4 → 4.0.5
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/icp/icp-session-api.service.mjs +3 -3
- package/esm2022/lib/icp/icp-update.service.mjs +4 -12
- package/esm2022/lib/icp/icp.interfaces.mjs +1 -1
- package/esm2022/lib/icp/icp.service.mjs +3 -5
- package/esm2022/lib/print.service.mjs +4 -2
- package/esm2022/lib/store/actions/icp.actions.mjs +1 -1
- package/esm2022/lib/store/effects/icp.effects.mjs +2 -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 +90 -54
- 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/icp/icp-session-api.service.d.ts +1 -4
- package/lib/icp/icp-session-api.service.d.ts.map +1 -1
- package/lib/icp/icp-update.service.d.ts.map +1 -1
- package/lib/icp/icp.interfaces.d.ts +0 -1
- package/lib/icp/icp.interfaces.d.ts.map +1 -1
- package/lib/icp/icp.service.d.ts +0 -1
- package/lib/icp/icp.service.d.ts.map +1 -1
- package/lib/print.service.d.ts.map +1 -1
- package/lib/store/actions/icp.actions.d.ts +2 -8
- package/lib/store/actions/icp.actions.d.ts.map +1 -1
- package/lib/store/effects/icp.effects.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
|
}
|
|
@@ -2166,9 +2183,7 @@ class IcpUpdateService {
|
|
|
2166
2183
|
}
|
|
2167
2184
|
removeParticipant(participantId) {
|
|
2168
2185
|
this.socket.emit(IcpEvents.REMOVE_PARTICIPANT, {
|
|
2169
|
-
participantId: participantId,
|
|
2170
|
-
caseId: this.session.caseId,
|
|
2171
|
-
documentId: this.session.documentId
|
|
2186
|
+
participantId: participantId, caseId: this.session.caseId
|
|
2172
2187
|
});
|
|
2173
2188
|
}
|
|
2174
2189
|
participantListUpdated() {
|
|
@@ -2176,20 +2191,14 @@ class IcpUpdateService {
|
|
|
2176
2191
|
}
|
|
2177
2192
|
updatePresenter(presenter) {
|
|
2178
2193
|
this.socket.emit(IcpEvents.UPDATE_PRESENTER, {
|
|
2179
|
-
...this.session,
|
|
2180
|
-
presenterId: presenter.id,
|
|
2181
|
-
presenterName: presenter.username
|
|
2194
|
+
...this.session, presenterId: presenter.id, presenterName: presenter.username
|
|
2182
2195
|
});
|
|
2183
2196
|
}
|
|
2184
2197
|
presenterUpdated() {
|
|
2185
2198
|
return this.socket.listen(IcpEvents.PRESENTER_UPDATED);
|
|
2186
2199
|
}
|
|
2187
2200
|
updateScreen(screen) {
|
|
2188
|
-
const update = {
|
|
2189
|
-
body: screen,
|
|
2190
|
-
caseId: this.session.caseId,
|
|
2191
|
-
documentId: this.session.documentId
|
|
2192
|
-
};
|
|
2201
|
+
const update = { body: screen, caseId: this.session.caseId };
|
|
2193
2202
|
this.socket.emit(IcpEvents.UPDATE_SCREEN, update);
|
|
2194
2203
|
}
|
|
2195
2204
|
screenUpdated() {
|
|
@@ -2278,7 +2287,7 @@ class IcpFollowerService {
|
|
|
2278
2287
|
}
|
|
2279
2288
|
followScreenUpdate({ pdfPosition }) {
|
|
2280
2289
|
if (pdfPosition) {
|
|
2281
|
-
this.viewerEvents.
|
|
2290
|
+
this.viewerEvents.goToDestinationICP([
|
|
2282
2291
|
pdfPosition.pageNumber - 1,
|
|
2283
2292
|
{ 'name': 'XYZ' },
|
|
2284
2293
|
pdfPosition.left,
|
|
@@ -2311,9 +2320,8 @@ class IcpService {
|
|
|
2311
2320
|
this.subscription = this.store.pipe(select(getCaseId), filter(value => !!value)).subscribe(caseId => {
|
|
2312
2321
|
this.caseId = caseId;
|
|
2313
2322
|
});
|
|
2314
|
-
this.subscription.add(this.store.pipe(select(getDocumentId)).subscribe(docId => this.documentId = docId));
|
|
2315
2323
|
this.subscription.add(this.toolbarEvents.icp.sessionLaunch.subscribe(() => {
|
|
2316
|
-
if (this.caseId
|
|
2324
|
+
if (this.caseId) {
|
|
2317
2325
|
this.launchSession();
|
|
2318
2326
|
}
|
|
2319
2327
|
}));
|
|
@@ -2323,7 +2331,7 @@ class IcpService {
|
|
|
2323
2331
|
this.subscription.unsubscribe();
|
|
2324
2332
|
}
|
|
2325
2333
|
launchSession() {
|
|
2326
|
-
this.store.dispatch(new LoadIcpSession(
|
|
2334
|
+
this.store.dispatch(new LoadIcpSession(this.caseId));
|
|
2327
2335
|
this.subscription.add(this.store.pipe(select(getIcpSession), filter(value => !!value && Object.keys(value).length > 1), take(1)).subscribe(() => { this.setUpSessionSubscriptions(); }));
|
|
2328
2336
|
}
|
|
2329
2337
|
setUpSessionSubscriptions() {
|
|
@@ -4429,10 +4437,10 @@ class RectangleComponent {
|
|
|
4429
4437
|
}
|
|
4430
4438
|
}
|
|
4431
4439
|
hasRectangleChanged(viewRect) {
|
|
4432
|
-
return this.left !== viewRect.offsetLeft ||
|
|
4433
|
-
this.top !== viewRect.offsetTop ||
|
|
4434
|
-
this.width !== viewRect.offsetWidth ||
|
|
4435
|
-
this.height !== viewRect.offsetHeight;
|
|
4440
|
+
return Math.round(this.left) !== viewRect.offsetLeft ||
|
|
4441
|
+
Math.round(this.top) !== viewRect.offsetTop ||
|
|
4442
|
+
Math.round(this.width) !== viewRect.offsetWidth ||
|
|
4443
|
+
Math.round(this.height) !== viewRect.offsetHeight;
|
|
4436
4444
|
}
|
|
4437
4445
|
/** @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
4446
|
/** @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 +5032,29 @@ class BookmarksComponent {
|
|
|
5024
5032
|
}
|
|
5025
5033
|
dragEnd() {
|
|
5026
5034
|
this.isUserdragging = false;
|
|
5035
|
+
if (this.hoverHtmlElement?.style) {
|
|
5036
|
+
this.hoverHtmlElement.style.borderRight = '';
|
|
5037
|
+
}
|
|
5027
5038
|
}
|
|
5028
5039
|
dragHover(event, node) {
|
|
5029
5040
|
if (this.isUserdragging) {
|
|
5030
5041
|
const newEvent = event;
|
|
5031
5042
|
const percentageX = newEvent.offsetX / newEvent.target.clientWidth;
|
|
5043
|
+
debugger;
|
|
5032
5044
|
if (percentageX > .55) {
|
|
5033
5045
|
this.hoveredNode = node;
|
|
5046
|
+
if (this.hoverHtmlElement?.style) {
|
|
5047
|
+
this.hoverHtmlElement.style.borderRight = '';
|
|
5048
|
+
}
|
|
5049
|
+
this.hoverHtmlElement = event.currentTarget;
|
|
5050
|
+
this.hoverHtmlElement.style.borderRight = '5px solid #007bff';
|
|
5034
5051
|
this.dragNodeInsertToParent = true;
|
|
5035
5052
|
}
|
|
5036
5053
|
else {
|
|
5037
5054
|
this.hoveredNode = null;
|
|
5055
|
+
if (this.hoverHtmlElement?.style) {
|
|
5056
|
+
this.hoverHtmlElement.style.borderRight = '';
|
|
5057
|
+
}
|
|
5038
5058
|
this.dragNodeInsertToParent = false;
|
|
5039
5059
|
}
|
|
5040
5060
|
}
|
|
@@ -5043,6 +5063,9 @@ class BookmarksComponent {
|
|
|
5043
5063
|
if (this.isUserdragging) {
|
|
5044
5064
|
if (!node || this.hoveredNode?.id !== node.id) {
|
|
5045
5065
|
this.dragNodeInsertToParent = false;
|
|
5066
|
+
if (this.hoverHtmlElement?.style) {
|
|
5067
|
+
this.hoverHtmlElement.style.borderRight = '';
|
|
5068
|
+
}
|
|
5046
5069
|
this.hoveredNode = null;
|
|
5047
5070
|
}
|
|
5048
5071
|
}
|
|
@@ -5096,11 +5119,11 @@ class BookmarksComponent {
|
|
|
5096
5119
|
return result ? true : false;
|
|
5097
5120
|
}
|
|
5098
5121
|
/** @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
|
|
5122
|
+
/** @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
5123
|
}
|
|
5101
5124
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: BookmarksComponent, decorators: [{
|
|
5102
5125
|
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
|
|
5126
|
+
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
5127
|
}], ctorParameters: () => [{ type: i1.Store }], propDecorators: { bookmarkNodes: [{
|
|
5105
5128
|
type: Input
|
|
5106
5129
|
}], zoom: [{
|
|
@@ -5298,8 +5321,17 @@ class HighlightCreateDirective {
|
|
|
5298
5321
|
}
|
|
5299
5322
|
}
|
|
5300
5323
|
onMouseUp(mouseEvent) {
|
|
5301
|
-
|
|
5302
|
-
|
|
5324
|
+
let page;
|
|
5325
|
+
let currentElement = mouseEvent.target;
|
|
5326
|
+
while (currentElement.offsetParent) {
|
|
5327
|
+
currentElement = currentElement.offsetParent;
|
|
5328
|
+
if (currentElement.getAttribute) {
|
|
5329
|
+
page = parseInt(currentElement.getAttribute('data-page-number'), 10);
|
|
5330
|
+
if (page) {
|
|
5331
|
+
break;
|
|
5332
|
+
}
|
|
5333
|
+
}
|
|
5334
|
+
}
|
|
5303
5335
|
if (this.toolbarEvents.highlightModeSubject.getValue()) {
|
|
5304
5336
|
const rectangles = this.getRectangles(mouseEvent, page);
|
|
5305
5337
|
this.viewerEvents.textSelected({ page, rectangles });
|
|
@@ -5326,7 +5358,7 @@ class HighlightCreateDirective {
|
|
|
5326
5358
|
const range = selection.getRangeAt(0).cloneRange();
|
|
5327
5359
|
const clientRects = range.getClientRects();
|
|
5328
5360
|
if (clientRects) {
|
|
5329
|
-
const parentRect = localElement.
|
|
5361
|
+
const parentRect = localElement.closest(".textLayer").getBoundingClientRect();
|
|
5330
5362
|
const selectionRectangles = [];
|
|
5331
5363
|
for (let i = 0; i < clientRects.length; i++) {
|
|
5332
5364
|
const selectionRectangle = this.createTextRectangle(clientRects[i], parentRect);
|
|
@@ -5537,6 +5569,7 @@ class PdfViewerComponent {
|
|
|
5537
5569
|
this.showCommentsPanel = toggle;
|
|
5538
5570
|
}));
|
|
5539
5571
|
this.$subscription.add(this.viewerEvents.navigationEvent.subscribe(dest => this.goToDestination(dest)));
|
|
5572
|
+
this.$subscription.add(this.viewerEvents.navigationEventICP.subscribe(destination => this.goToDestinationICP(destination)));
|
|
5540
5573
|
this.$subscription.add(this.toolbarEvents.icp.participantsListVisible.subscribe(toggle => this.showIcpParticipantsList = toggle));
|
|
5541
5574
|
this.$subscription.add(this.pdfWrapper.positionUpdated.asObservable()
|
|
5542
5575
|
.pipe(throttleTime(500, asyncScheduler, { leading: true, trailing: true }))
|
|
@@ -5654,15 +5687,18 @@ class PdfViewerComponent {
|
|
|
5654
5687
|
this.rotateDocument(currentRotation);
|
|
5655
5688
|
}, 10);
|
|
5656
5689
|
}
|
|
5690
|
+
goToDestinationICP(destination) {
|
|
5691
|
+
this.pdfWrapper.nativeNavigate(destination);
|
|
5692
|
+
}
|
|
5657
5693
|
getCurrentPageNumber() {
|
|
5658
5694
|
return this.pdfWrapper.getPageNumber();
|
|
5659
5695
|
}
|
|
5660
5696
|
/** @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:
|
|
5697
|
+
/** @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
5698
|
}
|
|
5663
5699
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PdfViewerComponent, decorators: [{
|
|
5664
5700
|
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:
|
|
5701
|
+
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
5702
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i1.Store }, { type: PdfJsWrapperFactory }, { type: PrintService }, { type: ToolbarEventService }, { type: ViewerEventService }, { type: IcpService }, { type: ToolbarButtonVisibilityService }], propDecorators: { mediaLoadStatus: [{
|
|
5667
5703
|
type: Output
|
|
5668
5704
|
}], pdfViewerException: [{
|
|
@@ -6859,9 +6895,9 @@ class IcpSessionApiService {
|
|
|
6859
6895
|
this.httpClient = httpClient;
|
|
6860
6896
|
this.ICP_SESSION_API = '/icp/sessions';
|
|
6861
6897
|
}
|
|
6862
|
-
loadSession(
|
|
6898
|
+
loadSession(caseId) {
|
|
6863
6899
|
return this.httpClient
|
|
6864
|
-
.get(`${this.ICP_SESSION_API}/${
|
|
6900
|
+
.get(`${this.ICP_SESSION_API}/${caseId}`, { observe: 'response', withCredentials: true })
|
|
6865
6901
|
.pipe(map(response => response.body));
|
|
6866
6902
|
}
|
|
6867
6903
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: IcpSessionApiService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -7131,7 +7167,7 @@ class IcpEffects {
|
|
|
7131
7167
|
this.actions$ = actions$;
|
|
7132
7168
|
this.icpApiService = icpApiService;
|
|
7133
7169
|
this.icpUpdateService = icpUpdateService;
|
|
7134
|
-
this.loadIcpSession$ = createEffect(() => this.actions$.pipe(ofType(LOAD_ICP_SESSION), map((action) => action.payload), exhaustMap((
|
|
7170
|
+
this.loadIcpSession$ = createEffect(() => this.actions$.pipe(ofType(LOAD_ICP_SESSION), map((action) => action.payload), exhaustMap((caseId) => this.icpApiService.loadSession(caseId)
|
|
7135
7171
|
.pipe(map(res => new JoinIcpSocketSession(res)), catchError(error => of(new LoadIcpSessionFailure(error)))))));
|
|
7136
7172
|
this.joinIcpSocketSession$ = createEffect(() => this.actions$.pipe(ofType(JOIN_ICP_SOCKET_SESSION), map((action) => action.payload), switchMap((res) => this.icpUpdateService.joinSession(res.username, res.session)
|
|
7137
7173
|
.pipe(map(participants => new IcpSocketSessionJoined({ session: res.session, participantInfo: participants }))))));
|