@hmcts/media-viewer 3.0.2 → 3.0.3-RC.1

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.
Files changed (50) hide show
  1. package/esm2020/lib/annotations/annotation-set/annotation-create/highlight-create/highlight-create.service.mjs +26 -1
  2. package/esm2020/lib/annotations/services/annotation-api/annotation-api.service.mjs +1 -1
  3. package/esm2020/lib/media-viewer.component.mjs +13 -12
  4. package/esm2020/lib/print.service.mjs +5 -1
  5. package/esm2020/lib/store/actions/annotation.actions.mjs +22 -1
  6. package/esm2020/lib/store/effects/annotation.effects.mjs +11 -4
  7. package/esm2020/lib/store/reducers/annotations.reducer.mjs +26 -1
  8. package/esm2020/lib/toolbar/highlight-toolbar/highlight-toolbar.component.mjs +44 -0
  9. package/esm2020/lib/toolbar/main-toolbar/main-toolbar.component.mjs +4 -4
  10. package/esm2020/lib/toolbar/redaction-search-bar/redaction-search-bar.component.mjs +43 -7
  11. package/esm2020/lib/toolbar/redaction-toolbar/redaction-toolbar.component.mjs +3 -2
  12. package/esm2020/lib/toolbar/search-bar/search-bar.component.mjs +2 -2
  13. package/esm2020/lib/toolbar/toolbar-event.service.mjs +13 -3
  14. package/esm2020/lib/toolbar/toolbar.module.mjs +10 -5
  15. package/esm2020/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.mjs +21 -5
  16. package/esm2020/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.provider.mjs +1 -1
  17. package/esm2020/lib/viewers/pdf-viewer/pdf-viewer.component.mjs +1 -1
  18. package/esm2020/lib/viewers/pdf-viewer/side-bar/outline-item/outline.model.mjs +1 -1
  19. package/esm2020/public_api.mjs +2 -1
  20. package/fesm2015/hmcts-media-viewer.mjs +192 -32
  21. package/fesm2015/hmcts-media-viewer.mjs.map +1 -1
  22. package/fesm2020/hmcts-media-viewer.mjs +213 -28
  23. package/fesm2020/hmcts-media-viewer.mjs.map +1 -1
  24. package/lib/annotations/annotation-set/annotation-create/highlight-create/highlight-create.service.d.ts +2 -0
  25. package/lib/annotations/annotation-set/annotation-create/highlight-create/highlight-create.service.d.ts.map +1 -1
  26. package/lib/print.service.d.ts.map +1 -1
  27. package/lib/store/actions/annotation.actions.d.ts +25 -1
  28. package/lib/store/actions/annotation.actions.d.ts.map +1 -1
  29. package/lib/store/effects/annotation.effects.d.ts +1 -0
  30. package/lib/store/effects/annotation.effects.d.ts.map +1 -1
  31. package/lib/store/reducers/annotations.reducer.d.ts.map +1 -1
  32. package/lib/toolbar/highlight-toolbar/highlight-toolbar.component.d.ts +20 -0
  33. package/lib/toolbar/highlight-toolbar/highlight-toolbar.component.d.ts.map +1 -0
  34. package/lib/toolbar/redaction-search-bar/redaction-search-bar.component.d.ts +6 -0
  35. package/lib/toolbar/redaction-search-bar/redaction-search-bar.component.d.ts.map +1 -1
  36. package/lib/toolbar/redaction-toolbar/redaction-toolbar.component.d.ts.map +1 -1
  37. package/lib/toolbar/toolbar-event.service.d.ts +12 -1
  38. package/lib/toolbar/toolbar-event.service.d.ts.map +1 -1
  39. package/lib/toolbar/toolbar.module.d.ts +7 -6
  40. package/lib/toolbar/toolbar.module.d.ts.map +1 -1
  41. package/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.d.ts +3 -3
  42. package/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.d.ts.map +1 -1
  43. package/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.provider.d.ts.map +1 -1
  44. package/lib/viewers/pdf-viewer/pdf-viewer.component.d.ts +1 -1
  45. package/lib/viewers/pdf-viewer/pdf-viewer.component.d.ts.map +1 -1
  46. package/lib/viewers/pdf-viewer/side-bar/outline-item/outline.model.d.ts +7 -7
  47. package/lib/viewers/pdf-viewer/side-bar/outline-item/outline.model.d.ts.map +1 -1
  48. package/package.json +1 -1
  49. package/public_api.d.ts +1 -0
  50. package/public_api.d.ts.map +1 -1
@@ -10,7 +10,7 @@ import * as i1$1 from '@angular/common/http';
10
10
  import { HttpClientModule } from '@angular/common/http';
11
11
  import { __awaiter } from 'tslib';
12
12
  import { BehaviorSubject, Subject, of, combineLatest, asyncScheduler } from 'rxjs';
13
- import { take, filter, distinctUntilChanged, auditTime, tap, throttleTime, map, catchError, switchMap, exhaustMap, withLatestFrom } from 'rxjs/operators';
13
+ import { take, filter, distinctUntilChanged, auditTime, tap, throttleTime, map, catchError, switchMap, concatMap, exhaustMap, withLatestFrom } from 'rxjs/operators';
14
14
  import * as i1 from '@ngrx/store';
15
15
  import { createFeatureSelector, createSelector, select, StoreModule } from '@ngrx/store';
16
16
  import uuid from 'uuid/v4';
@@ -19,6 +19,7 @@ import * as pdfjsViewer from 'pdfjs-dist/web/pdf_viewer';
19
19
  import * as pdfjsLib from 'pdfjs-dist';
20
20
  import 'pdfjs-dist/build/pdf.worker';
21
21
  import uuid$1, { v4 } from 'uuid';
22
+ import { some } from 'lodash';
22
23
  import * as i4$1 from 'ngx-chips';
23
24
  import { TagInputModule } from 'ngx-chips';
24
25
  import * as i5$1 from '@angular/router';
@@ -320,6 +321,9 @@ const getConvertedDocument$1 = (state) => state.convertedDocument;
320
321
  const LOAD_ANNOTATION_SET = '[Annotations] Load Annotation Set';
321
322
  const LOAD_ANNOTATION_SET_SUCCESS = '[Annotations] Load Annotation Set Success';
322
323
  const LOAD_ANNOTATION_SET_FAIL = '[Annotations] Load Annotation Set Fail';
324
+ const SAVE_ANNOTATION_SET = '[Annotations] Save Annotation Set';
325
+ const SAVE_ANNOTATION_SET_SUCCESS = '[Annotations] Save Annotation Set Success';
326
+ const SAVE_ANNOTATION_SET_FAIL = '[Annotations] Save Annotation Set Fail';
323
327
  const SAVE_ANNOTATION = '[Annotations] Save Annotation';
324
328
  const SAVE_ANNOTATION_SUCCESS = '[Annotations] Save Annotation Success';
325
329
  const SAVE_ANNOTATION_FAIL = '[Annotations] Save Annotation Fail';
@@ -337,18 +341,36 @@ class LoadAnnotationSet {
337
341
  this.type = LOAD_ANNOTATION_SET;
338
342
  }
339
343
  }
344
+ class SaveAnnotationSet {
345
+ constructor(payload) {
346
+ this.payload = payload;
347
+ this.type = SAVE_ANNOTATION_SET;
348
+ }
349
+ }
340
350
  class LoadAnnotationSetSucess {
341
351
  constructor(payload) {
342
352
  this.payload = payload;
343
353
  this.type = LOAD_ANNOTATION_SET_SUCCESS;
344
354
  }
345
355
  }
356
+ class SaveAnnotationSetSuccess {
357
+ constructor(payload) {
358
+ this.payload = payload;
359
+ this.type = SAVE_ANNOTATION_SET_SUCCESS;
360
+ }
361
+ }
346
362
  class LoadAnnotationSetFail {
347
363
  constructor(payload) {
348
364
  this.payload = payload;
349
365
  this.type = LOAD_ANNOTATION_SET_FAIL;
350
366
  }
351
367
  }
368
+ class SaveAnnotationSetFail {
369
+ constructor(payload) {
370
+ this.payload = payload;
371
+ this.type = SAVE_ANNOTATION_SET_FAIL;
372
+ }
373
+ }
352
374
  class SaveAnnotation {
353
375
  constructor(payload) {
354
376
  this.payload = payload;
@@ -547,6 +569,19 @@ function reducer(state = initialState, action) {
547
569
  annotationPageEntities,
548
570
  commentEntities, loading: false, loaded: true });
549
571
  }
572
+ case SAVE_ANNOTATION_SET_SUCCESS: {
573
+ const anno = action.payload.annotations;
574
+ const annEntities = Object.assign(Object.assign({}, state.annotationEntities), anno);
575
+ const annotArray = Object.keys(annEntities).map(key => annEntities[key]);
576
+ const annotationEntities = StoreUtils.generateAnnotationEntities(annotArray);
577
+ const annotationPageEntities = StoreUtils.groupByKeyEntities(annotArray, 'page');
578
+ const commentEntities = StoreUtils.generateCommentsEntities(annotArray);
579
+ const selectedAnnotation = Object.assign(Object.assign(Object.assign({}, state.selectedAnnotation), anno), { editable: false });
580
+ return Object.assign(Object.assign({}, state), { annotationEntities,
581
+ annotationPageEntities,
582
+ commentEntities,
583
+ selectedAnnotation, loading: false, loaded: true });
584
+ }
550
585
  case SAVE_ANNOTATION_SUCCESS: {
551
586
  const anno = action.payload;
552
587
  const annEntities = Object.assign(Object.assign({}, state.annotationEntities), { [anno.id]: anno });
@@ -1223,18 +1258,21 @@ class PdfJsWrapper {
1223
1258
  this.sendSearchDetails(event);
1224
1259
  });
1225
1260
  this.pdfViewer.eventBus.on('updatefindmatchescount', event => {
1226
- this.toolbarEvents.searchResultsCountSubject.next(event.matchesCount);
1261
+ var _a, _b;
1262
+ const result = Object.assign(Object.assign({}, event.matchesCount), { isPrevious: (_b = (_a = event === null || event === void 0 ? void 0 : event.source) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.findPrevious });
1263
+ this.toolbarEvents.searchResultsCountSubject.next(result);
1227
1264
  });
1228
1265
  this.zoomValue = 1;
1229
1266
  }
1230
1267
  sendSearchDetails(event) {
1231
- var _a, _b, _c, _d, _e, _f;
1268
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1232
1269
  if (event.state !== FindState.PENDING) {
1233
- this.toolbarEvents.searchResultsCountSubject.next(event.matchesCount);
1234
- if (((_b = (_a = event === null || event === void 0 ? void 0 : event.source) === null || _a === void 0 ? void 0 : _a.selected) === null || _b === void 0 ? void 0 : _b.pageIdx) !== -1 && event.matchesCount.total > 0) {
1270
+ const result = Object.assign(Object.assign({}, event.matchesCount), { isPrevious: (_b = (_a = event === null || event === void 0 ? void 0 : event.source) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.findPrevious });
1271
+ this.toolbarEvents.searchResultsCountSubject.next(result);
1272
+ if (((_d = (_c = event === null || event === void 0 ? void 0 : event.source) === null || _c === void 0 ? void 0 : _c.selected) === null || _d === void 0 ? void 0 : _d.pageIdx) !== -1 && event.matchesCount.total > 0) {
1235
1273
  this.toolbarEvents.redactionSerachSubject.next({
1236
- page: (_d = (_c = event === null || event === void 0 ? void 0 : event.source) === null || _c === void 0 ? void 0 : _c.selected) === null || _d === void 0 ? void 0 : _d.pageIdx,
1237
- matchedIndex: (_f = (_e = event === null || event === void 0 ? void 0 : event.source) === null || _e === void 0 ? void 0 : _e.selected) === null || _f === void 0 ? void 0 : _f.matchIdx,
1274
+ page: (_f = (_e = event === null || event === void 0 ? void 0 : event.source) === null || _e === void 0 ? void 0 : _e.selected) === null || _f === void 0 ? void 0 : _f.pageIdx,
1275
+ matchedIndex: (_h = (_g = event === null || event === void 0 ? void 0 : event.source) === null || _g === void 0 ? void 0 : _g.selected) === null || _h === void 0 ? void 0 : _h.matchIdx,
1238
1276
  matchesCount: event.matchesCount.total
1239
1277
  });
1240
1278
  }
@@ -1253,6 +1291,7 @@ class PdfJsWrapper {
1253
1291
  this.pageRendered.next(allPages);
1254
1292
  }
1255
1293
  loadDocument(documentUrl) {
1294
+ var _a;
1256
1295
  return __awaiter(this, void 0, void 0, function* () {
1257
1296
  const loadingTask = this.createLoadingTask(documentUrl);
1258
1297
  loadingTask.onProgress = ({ loaded, total }) => {
@@ -1265,14 +1304,28 @@ class PdfJsWrapper {
1265
1304
  this.toolbarEvents.pageCountSubject.next(pdfDocument.numPages);
1266
1305
  this.pdfViewer.setDocument(pdfDocument);
1267
1306
  this.pdfViewer.linkService.setDocument(pdfDocument, null);
1268
- const outline = yield pdfDocument.getOutline();
1307
+ const outlineNode = yield pdfDocument.getOutline();
1308
+ const outline = outlineNode.map(x => {
1309
+ return {
1310
+ bold: x.bold,
1311
+ color: x.color,
1312
+ count: x.count,
1313
+ dest: x.dest,
1314
+ italic: x.italic,
1315
+ items: x.items,
1316
+ newWindow: x.newWindow,
1317
+ title: x.title,
1318
+ unsafeUrl: x.unsafeUrl,
1319
+ url: x.url
1320
+ };
1321
+ });
1269
1322
  if (outline) {
1270
1323
  yield this.setOutlinePageNumbers(pdfDocument, outline);
1271
1324
  }
1272
1325
  this.documentOutline = outline;
1273
1326
  this.outlineLoaded.next(this.documentOutline);
1274
1327
  const pdfMetaData = yield pdfDocument.getMetadata();
1275
- this.setCurrentPDFTitle(pdfMetaData.info.Title);
1328
+ this.setCurrentPDFTitle((_a = pdfMetaData.info) === null || _a === void 0 ? void 0 : _a.Title);
1276
1329
  }
1277
1330
  catch (e) {
1278
1331
  this.documentLoadFailed.next(e);
@@ -1435,9 +1488,15 @@ var icpEvents = /*#__PURE__*/Object.freeze({
1435
1488
  stoppingPresenting: stoppingPresenting
1436
1489
  });
1437
1490
 
1491
+ var SearchType;
1492
+ (function (SearchType) {
1493
+ SearchType["Redact"] = "Redact";
1494
+ SearchType["Highlight"] = "Highlight";
1495
+ })(SearchType || (SearchType = {}));
1438
1496
  class ToolbarEventService {
1439
1497
  constructor() {
1440
1498
  this.highlightModeSubject = new BehaviorSubject(false);
1499
+ this.highlightToolbarSubject = new BehaviorSubject(false);
1441
1500
  this.drawModeSubject = new BehaviorSubject(false);
1442
1501
  this.rotateSubject = new Subject();
1443
1502
  this.searchSubject = new Subject();
@@ -1461,7 +1520,7 @@ class ToolbarEventService {
1461
1520
  this.redactWholePage = new Subject();
1462
1521
  this.redactionSerachSubject = new Subject();
1463
1522
  this.redactAllInProgressSubject = new BehaviorSubject(false);
1464
- this.openRedactionSearch = new Subject();
1523
+ this.openRedactionSearch = new BehaviorSubject(null);
1465
1524
  this.sidebarOpen = new BehaviorSubject(false);
1466
1525
  this.sidebarOutlineView = new BehaviorSubject(true);
1467
1526
  this.searchBarHidden = new BehaviorSubject(true);
@@ -1475,6 +1534,7 @@ class ToolbarEventService {
1475
1534
  this.setCurrentPageSubject.next(1);
1476
1535
  this.zoomValueSubject.next(1);
1477
1536
  this.highlightModeSubject.next(false);
1537
+ this.highlightToolbarSubject.next(false);
1478
1538
  this.drawModeSubject.next(false);
1479
1539
  this.showCommentSummary.next(false);
1480
1540
  this.grabNDrag.next(false);
@@ -1502,6 +1562,9 @@ class ToolbarEventService {
1502
1562
  this.drawModeSubject.next(false);
1503
1563
  }
1504
1564
  }
1565
+ toggleHighlightToolbar() {
1566
+ this.highlightToolbarSubject.next(!this.highlightToolbarSubject.getValue());
1567
+ }
1505
1568
  rotate(angle) {
1506
1569
  this.rotateSubject.next(angle);
1507
1570
  }
@@ -1565,7 +1628,7 @@ class ToolbarEventService {
1565
1628
  else {
1566
1629
  this.redactionMode.next(false);
1567
1630
  }
1568
- this.openRedactionSearch.next(false);
1631
+ this.openRedactionSearch.next({ modeType: SearchType.Redact, isOpen: false });
1569
1632
  }
1570
1633
  toggleRedactionPreview(viewMode) {
1571
1634
  this.redactionPreview.next(viewMode);
@@ -1639,6 +1702,10 @@ class PrintService {
1639
1702
  printWindow.focus();
1640
1703
  setTimeout((printer) => {
1641
1704
  printer.print();
1705
+ printer.onafterprint = () => {
1706
+ printer.close();
1707
+ window.close();
1708
+ };
1642
1709
  }, 3000, printWindow);
1643
1710
  }
1644
1711
  printElementNatively(element, width, height) {
@@ -2240,6 +2307,16 @@ class HighlightCreateService {
2240
2307
  this.store.dispatch(new SaveAnnotation(anno));
2241
2308
  });
2242
2309
  }
2310
+ saveAnnotationSet(searchRectangles) {
2311
+ this.store.pipe(select(getDocumentIdSetId), take(1)).subscribe(anoSetDocId => {
2312
+ const annoSet = searchRectangles.map(x => {
2313
+ return Object.assign(Object.assign({ id: v4(), color: 'FFFF00', comments: [], page: x.page, rectangles: x.rectangles, type: 'highlight' }, anoSetDocId), { createdBy: '', createdByDetails: undefined, createdDate: moment.utc().tz('Europe/London').toISOString(), lastModifiedBy: '', lastModifiedByDetails: undefined, lastModifiedDate: '', tags: [] });
2314
+ });
2315
+ this.store.dispatch(new SaveAnnotationSet({
2316
+ id: anoSetDocId.annotationSetId, annotations: annoSet, documentId: anoSetDocId.documentId
2317
+ }));
2318
+ });
2319
+ }
2243
2320
  applyRotation(pageHeight, pageWidth, offsetHeight, offsetWidth, offsetTop, offsetLeft, rotate, zoom) {
2244
2321
  const { x, y, width, height } = {
2245
2322
  x: +(offsetLeft / zoom).toFixed(2),
@@ -2303,7 +2380,13 @@ class RedactionSearchBarComponent {
2303
2380
  }
2304
2381
  }));
2305
2382
  this.subscription.add(this.toolbarEvents.searchResultsCountSubject.subscribe(results => this.setSearchResultsCount(results)));
2306
- this.subscription.add(this.toolbarEvents.openRedactionSearch.subscribe(isOpen => this.openSearchModal = isOpen));
2383
+ this.subscription.add(this.toolbarEvents.openRedactionSearch.subscribe((searchMode) => {
2384
+ if (searchMode) {
2385
+ this.openSearchModal = searchMode.isOpen;
2386
+ this.searchType = searchMode.modeType;
2387
+ this.modeText();
2388
+ }
2389
+ }));
2307
2390
  this.subscription.add(this.toolbarEvents.redactAllInProgressSubject
2308
2391
  .subscribe(inProgress => this.redactAllInProgress = inProgress));
2309
2392
  }
@@ -2334,6 +2417,16 @@ class RedactionSearchBarComponent {
2334
2417
  reset
2335
2418
  });
2336
2419
  }
2420
+ modeText() {
2421
+ if (this.searchType === SearchType.Highlight) {
2422
+ this.inProgressText = 'Highlighting';
2423
+ this.titleText = 'Highlight';
2424
+ }
2425
+ else if (this.searchType === SearchType.Redact) {
2426
+ this.inProgressText = 'Redacting';
2427
+ this.titleText = 'Redact';
2428
+ }
2429
+ }
2337
2430
  saveRedaction(redactRectangle) {
2338
2431
  const redaction = redactRectangle.map(ele => {
2339
2432
  return { page: ele.page, rectangles: ele.rectangles, redactionId: uuid$1(), documentId: this.documentId };
@@ -2361,7 +2454,7 @@ class RedactionSearchBarComponent {
2361
2454
  return false;
2362
2455
  }
2363
2456
  onCloseSearchModal() {
2364
- this.toolbarEvents.openRedactionSearch.next(false);
2457
+ this.toolbarEvents.openRedactionSearch.next({ isOpen: false, modeType: this.searchType });
2365
2458
  }
2366
2459
  setSearchResultsCount(results) {
2367
2460
  this.resultCount = results.total;
@@ -2397,10 +2490,21 @@ class RedactionSearchBarComponent {
2397
2490
  if (this.redactAll && this.resultCount && this.redactElements.length === this.resultCount) {
2398
2491
  this.redactAll = false;
2399
2492
  this.redactAllText = null;
2400
- this.saveRedaction(this.redactElements);
2493
+ if (this.searchType === SearchType.Redact) {
2494
+ this.saveRedaction(this.redactElements);
2495
+ }
2496
+ else if (this.searchType === SearchType.Highlight) {
2497
+ this.highlightService.saveAnnotationSet(this.redactElements);
2498
+ this.cleanUpPostSave();
2499
+ }
2401
2500
  }
2402
2501
  }
2403
2502
  }
2503
+ cleanUpPostSave() {
2504
+ this.toolbarEvents.redactAllInProgressSubject.next(false);
2505
+ this.searchText = '';
2506
+ this.search();
2507
+ }
2404
2508
  CreateRedactAllText() {
2405
2509
  this.redactAllText = `${this.redactElements.length} of ${this.resultCount}`;
2406
2510
  }
@@ -2421,7 +2525,14 @@ class RedactionSearchBarComponent {
2421
2525
  const selectedHighLightedElements = document.getElementsByClassName('highlight selected');
2422
2526
  if (selectedHighLightedElements && selectedHighLightedElements.length > 0) {
2423
2527
  const docRange = document.createRange();
2424
- docRange.selectNodeContents(selectedHighLightedElements[0]);
2528
+ if (some(selectedHighLightedElements, element => element.className === 'highlight begin selected' || element.className === 'highlight end selected')) {
2529
+ docRange.setStart(selectedHighLightedElements[0], 0);
2530
+ const endNode = selectedHighLightedElements[selectedHighLightedElements.length - 1];
2531
+ docRange.setEnd(endNode, endNode.childNodes.length);
2532
+ }
2533
+ else {
2534
+ docRange.selectNodeContents(selectedHighLightedElements[0]);
2535
+ }
2425
2536
  const selection = window.getSelection();
2426
2537
  selection === null || selection === void 0 ? void 0 : selection.removeAllRanges();
2427
2538
  selection === null || selection === void 0 ? void 0 : selection.addRange(docRange);
@@ -2454,10 +2565,10 @@ class RedactionSearchBarComponent {
2454
2565
  }
2455
2566
  }
2456
2567
  /** @nocollapse */ RedactionSearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RedactionSearchBarComponent, deps: [{ token: i1.Store }, { token: ToolbarButtonVisibilityService }, { token: ToolbarEventService }, { token: HighlightCreateService }], target: i0.ɵɵFactoryTarget.Component });
2457
- /** @nocollapse */ RedactionSearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RedactionSearchBarComponent, selector: "mv-redaction-search-bar", host: { listeners: { "window:keydown": "onWindowKeyDown($event)" } }, viewQueries: [{ propertyName: "findInput", first: true, predicate: ["findInput"], descendants: true, static: true }], ngImport: i0, template: "<div\n *ngIf=\"openSearchModal\"\n class=\"searchbar redaction-search-bar govuk-!-padding-3\"\n>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full govuk-!-padding-right-0\">\n <div class=\"redaction-search-buttons-area\">\n <button\n id=\"mvCloseBtn\"\n #mvCloseBtn\n class=\"mv-button searchbar-button--close\"\n title=\"Close Search\"\n data-l10n-id=\"mvRedactBtn\"\n (click)=\"onCloseSearchModal()\"\n ></button>\n </div>\n <input\n id=\"search_input\"\n class=\"govuk-input govuk-!-width-three-quarters govuk-!-display-inline-block govuk-!-margin-top-5\"\n type=\"text\"\n aria-label=\"Redact from search\"\n #findInput\n title=\"Redact from search\"\n placeholder=\"{{ 'Redact from search...' | rpxTranslate }}\"\n data-l10n-id=\"search_input\"\n [(ngModel)]=\"searchText\"\n (keydown.escape)=\"onEscapeKeyPress($event)\"\n (keydown.enter)=\"onEnterKeyPress($event)\"\n />\n <div class=\"redaction-search-buttons-area\">\n <button\n id=\"mvSearchAllBtn\"\n class=\"govuk-button govuk-!-margin-bottom-0\"\n data-module=\"govuk-button\"\n (click)=\"search()\"\n [disabled]=\"redactAllInProgress\"\n >\n {{ \"Search\" | rpxTranslate }}\n </button>\n <button\n id=\"mvRedactAllBtn\"\n class=\"govuk-button govuk-!-margin-left-2 govuk-!-margin-bottom-0\"\n data-module=\"govuk-button\"\n (click)=\"search(false)\"\n [disabled]=\"redactAllInProgress\"\n >\n {{ \"Redact all\" | rpxTranslate }}\n </button>\n </div>\n <div\n class=\"govuk-grid-column-three-quarters govuk-!-padding-left-0 govuk-!-padding-top-2 redaction-status-text\"\n >\n <span\n id=\"findRedactResultsCount\"\n class=\"govuk-grid-column-full govuk-!-margin-right-4 govuk-!-margin-left-0 govuk-!-padding-left-0\"\n ><h4\n class=\"govuk-!-display-inline-block govuk-!-margin-top-0 govuk-!-margin-bottom-1\"\n *ngIf=\"redactAllInProgress\"\n >\n {{ \"Redacting in progress\" | rpxTranslate }}\n </h4>\n {{ redactAllInProgress ? \"\" : resultsText }}</span\n >\n <span>\n <h5\n id=\"redactAllInProgressCount\"\n class=\"govuk-!-display-inline-block govuk-!-margin-top-0 govuk-!-margin-bottom-1\"\n >\n {{ redactAllInProgress ? redactAllText : \"\" }}\n </h5>\n </span>\n </div>\n </div>\n </div>\n</div>\n", styles: [".redaction-search-buttons-area{display:flex;flex-direction:row;padding-top:.5rem}.redaction-search-bar{width:20rem;left:73%;top:2%}.redaction-status-text{height:2.6rem}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i5.RpxTranslatePipe, name: "rpxTranslate" }] });
2568
+ /** @nocollapse */ RedactionSearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RedactionSearchBarComponent, selector: "mv-redaction-search-bar", host: { listeners: { "window:keydown": "onWindowKeyDown($event)" } }, viewQueries: [{ propertyName: "findInput", first: true, predicate: ["findInput"], descendants: true, static: true }], ngImport: i0, template: "<div\n *ngIf=\"openSearchModal\"\n class=\"searchbar redaction-search-bar govuk-!-padding-3\"\n>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full govuk-!-padding-right-0\">\n <div class=\"redaction-search-buttons-area\">\n <button\n id=\"mvCloseBtn\"\n #mvCloseBtn\n class=\"mv-button searchbar-button--close\"\n title=\"Close Search\"\n data-l10n-id=\"mvRedactBtn\"\n (click)=\"onCloseSearchModal()\"\n ></button>\n </div>\n <input\n id=\"search_input\"\n class=\"govuk-input govuk-!-width-three-quarters govuk-!-display-inline-block govuk-!-margin-top-5\"\n type=\"text\"\n aria-label=\"Redact from search\"\n #findInput\n title=\"Redact from search\"\n placeholder=\"{{ titleText + ' from search...' | rpxTranslate }}\"\n data-l10n-id=\"search_input\"\n [(ngModel)]=\"searchText\"\n (keydown.escape)=\"onEscapeKeyPress($event)\"\n (keydown.enter)=\"onEnterKeyPress($event)\"\n />\n <div class=\"redaction-search-buttons-area\">\n <button\n id=\"mvSearchAllBtn\"\n class=\"govuk-button govuk-!-margin-bottom-0\"\n data-module=\"govuk-button\"\n (click)=\"search()\"\n [disabled]=\"redactAllInProgress\"\n >\n {{ \"Search\" | rpxTranslate }}\n </button>\n <button\n id=\"mvRedactAllBtn\"\n class=\"govuk-button govuk-!-margin-left-2 govuk-!-margin-bottom-0\"\n data-module=\"govuk-button\"\n (click)=\"search(false)\"\n [disabled]=\"redactAllInProgress || resultCount <= 0\"\n >\n {{ titleText + \" all\" | rpxTranslate }}\n </button>\n </div>\n <div\n class=\"govuk-grid-column-three-quarters govuk-!-padding-left-0 govuk-!-padding-top-2 redaction-status-text\"\n >\n <span\n id=\"findRedactResultsCount\"\n class=\"govuk-grid-column-full govuk-!-margin-right-4 govuk-!-margin-left-0 govuk-!-padding-left-0\"\n ><h4\n class=\"govuk-!-display-inline-block govuk-!-margin-top-0 govuk-!-margin-bottom-1\"\n *ngIf=\"redactAllInProgress\"\n >\n {{ inProgressText + \" in progress\" | rpxTranslate }}\n </h4>\n {{ redactAllInProgress ? \"\" : resultsText }}</span\n >\n <span>\n <h5\n id=\"redactAllInProgressCount\"\n class=\"govuk-!-display-inline-block govuk-!-margin-top-0 govuk-!-margin-bottom-1\"\n >\n {{ redactAllInProgress ? redactAllText : \"\" }}\n </h5>\n </span>\n </div>\n </div>\n </div>\n</div>\n", styles: [".redaction-search-buttons-area{display:flex;flex-direction:row;padding-top:.5rem}.redaction-search-bar{width:20rem;left:73%;top:2%}.redaction-status-text{height:2.6rem}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i5.RpxTranslatePipe, name: "rpxTranslate" }] });
2458
2569
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RedactionSearchBarComponent, decorators: [{
2459
2570
  type: Component,
2460
- args: [{ selector: 'mv-redaction-search-bar', template: "<div\n *ngIf=\"openSearchModal\"\n class=\"searchbar redaction-search-bar govuk-!-padding-3\"\n>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full govuk-!-padding-right-0\">\n <div class=\"redaction-search-buttons-area\">\n <button\n id=\"mvCloseBtn\"\n #mvCloseBtn\n class=\"mv-button searchbar-button--close\"\n title=\"Close Search\"\n data-l10n-id=\"mvRedactBtn\"\n (click)=\"onCloseSearchModal()\"\n ></button>\n </div>\n <input\n id=\"search_input\"\n class=\"govuk-input govuk-!-width-three-quarters govuk-!-display-inline-block govuk-!-margin-top-5\"\n type=\"text\"\n aria-label=\"Redact from search\"\n #findInput\n title=\"Redact from search\"\n placeholder=\"{{ 'Redact from search...' | rpxTranslate }}\"\n data-l10n-id=\"search_input\"\n [(ngModel)]=\"searchText\"\n (keydown.escape)=\"onEscapeKeyPress($event)\"\n (keydown.enter)=\"onEnterKeyPress($event)\"\n />\n <div class=\"redaction-search-buttons-area\">\n <button\n id=\"mvSearchAllBtn\"\n class=\"govuk-button govuk-!-margin-bottom-0\"\n data-module=\"govuk-button\"\n (click)=\"search()\"\n [disabled]=\"redactAllInProgress\"\n >\n {{ \"Search\" | rpxTranslate }}\n </button>\n <button\n id=\"mvRedactAllBtn\"\n class=\"govuk-button govuk-!-margin-left-2 govuk-!-margin-bottom-0\"\n data-module=\"govuk-button\"\n (click)=\"search(false)\"\n [disabled]=\"redactAllInProgress\"\n >\n {{ \"Redact all\" | rpxTranslate }}\n </button>\n </div>\n <div\n class=\"govuk-grid-column-three-quarters govuk-!-padding-left-0 govuk-!-padding-top-2 redaction-status-text\"\n >\n <span\n id=\"findRedactResultsCount\"\n class=\"govuk-grid-column-full govuk-!-margin-right-4 govuk-!-margin-left-0 govuk-!-padding-left-0\"\n ><h4\n class=\"govuk-!-display-inline-block govuk-!-margin-top-0 govuk-!-margin-bottom-1\"\n *ngIf=\"redactAllInProgress\"\n >\n {{ \"Redacting in progress\" | rpxTranslate }}\n </h4>\n {{ redactAllInProgress ? \"\" : resultsText }}</span\n >\n <span>\n <h5\n id=\"redactAllInProgressCount\"\n class=\"govuk-!-display-inline-block govuk-!-margin-top-0 govuk-!-margin-bottom-1\"\n >\n {{ redactAllInProgress ? redactAllText : \"\" }}\n </h5>\n </span>\n </div>\n </div>\n </div>\n</div>\n", styles: [".redaction-search-buttons-area{display:flex;flex-direction:row;padding-top:.5rem}.redaction-search-bar{width:20rem;left:73%;top:2%}.redaction-status-text{height:2.6rem}\n"] }]
2571
+ args: [{ selector: 'mv-redaction-search-bar', template: "<div\n *ngIf=\"openSearchModal\"\n class=\"searchbar redaction-search-bar govuk-!-padding-3\"\n>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full govuk-!-padding-right-0\">\n <div class=\"redaction-search-buttons-area\">\n <button\n id=\"mvCloseBtn\"\n #mvCloseBtn\n class=\"mv-button searchbar-button--close\"\n title=\"Close Search\"\n data-l10n-id=\"mvRedactBtn\"\n (click)=\"onCloseSearchModal()\"\n ></button>\n </div>\n <input\n id=\"search_input\"\n class=\"govuk-input govuk-!-width-three-quarters govuk-!-display-inline-block govuk-!-margin-top-5\"\n type=\"text\"\n aria-label=\"Redact from search\"\n #findInput\n title=\"Redact from search\"\n placeholder=\"{{ titleText + ' from search...' | rpxTranslate }}\"\n data-l10n-id=\"search_input\"\n [(ngModel)]=\"searchText\"\n (keydown.escape)=\"onEscapeKeyPress($event)\"\n (keydown.enter)=\"onEnterKeyPress($event)\"\n />\n <div class=\"redaction-search-buttons-area\">\n <button\n id=\"mvSearchAllBtn\"\n class=\"govuk-button govuk-!-margin-bottom-0\"\n data-module=\"govuk-button\"\n (click)=\"search()\"\n [disabled]=\"redactAllInProgress\"\n >\n {{ \"Search\" | rpxTranslate }}\n </button>\n <button\n id=\"mvRedactAllBtn\"\n class=\"govuk-button govuk-!-margin-left-2 govuk-!-margin-bottom-0\"\n data-module=\"govuk-button\"\n (click)=\"search(false)\"\n [disabled]=\"redactAllInProgress || resultCount <= 0\"\n >\n {{ titleText + \" all\" | rpxTranslate }}\n </button>\n </div>\n <div\n class=\"govuk-grid-column-three-quarters govuk-!-padding-left-0 govuk-!-padding-top-2 redaction-status-text\"\n >\n <span\n id=\"findRedactResultsCount\"\n class=\"govuk-grid-column-full govuk-!-margin-right-4 govuk-!-margin-left-0 govuk-!-padding-left-0\"\n ><h4\n class=\"govuk-!-display-inline-block govuk-!-margin-top-0 govuk-!-margin-bottom-1\"\n *ngIf=\"redactAllInProgress\"\n >\n {{ inProgressText + \" in progress\" | rpxTranslate }}\n </h4>\n {{ redactAllInProgress ? \"\" : resultsText }}</span\n >\n <span>\n <h5\n id=\"redactAllInProgressCount\"\n class=\"govuk-!-display-inline-block govuk-!-margin-top-0 govuk-!-margin-bottom-1\"\n >\n {{ redactAllInProgress ? redactAllText : \"\" }}\n </h5>\n </span>\n </div>\n </div>\n </div>\n</div>\n", styles: [".redaction-search-buttons-area{display:flex;flex-direction:row;padding-top:.5rem}.redaction-search-bar{width:20rem;left:73%;top:2%}.redaction-status-text{height:2.6rem}\n"] }]
2461
2572
  }], ctorParameters: function () { return [{ type: i1.Store }, { type: ToolbarButtonVisibilityService }, { type: ToolbarEventService }, { type: HighlightCreateService }]; }, propDecorators: { findInput: [{
2462
2573
  type: ViewChild,
2463
2574
  args: ['findInput', { static: true }]
@@ -3404,7 +3515,7 @@ class SearchBarComponent {
3404
3515
  this.resultsText = this.resultCount > 0
3405
3516
  ? `Found ${results.current} of ${results.total}`
3406
3517
  : 'No results found';
3407
- if (this.resultCount && this.resultCount > 0) {
3518
+ if (this.resultCount && this.resultCount > 0 && !results.isPrevious) {
3408
3519
  setTimeout(() => {
3409
3520
  this.findNext.nativeElement.focus();
3410
3521
  }, 1000);
@@ -3501,7 +3612,7 @@ class MainToolbarComponent {
3501
3612
  this.printFile();
3502
3613
  }
3503
3614
  onClickHighlightToggle() {
3504
- this.toolbarEvents.toggleHighlightMode();
3615
+ this.toolbarEvents.toggleHighlightToolbar();
3505
3616
  }
3506
3617
  onClickDrawToggle() {
3507
3618
  this.toolbarEvents.toggleDrawMode();
@@ -3585,10 +3696,10 @@ class MainToolbarComponent {
3585
3696
  }
3586
3697
  }
3587
3698
  /** @nocollapse */ MainToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MainToolbarComponent, deps: [{ token: ToolbarEventService }, { token: ToolbarButtonVisibilityService }, { token: i0.ChangeDetectorRef }, { token: NumberHelperService }], target: i0.ɵɵFactoryTarget.Component });
3588
- /** @nocollapse */ MainToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MainToolbarComponent, selector: "mv-main-toolbar", inputs: { enableAnnotations: "enableAnnotations", enableRedactions: "enableRedactions", enableICP: "enableICP", contentType: "contentType" }, host: { listeners: { "window:resize": "onResize()", "document:keydown.control.p": "onControlPrint($event)", "document:keydown.meta.p": "onControlPrint($event)" } }, viewQueries: [{ propertyName: "zoomSelect", first: true, predicate: ["zoomSelect"], descendants: true }, { propertyName: "mvToolbarMain", first: true, predicate: ["mvToolbarMain"], descendants: true }, { propertyName: "mvMenuItems", first: true, predicate: ["dropdownMenu"], descendants: true }], ngImport: i0, template: "<div class=\"toolbar\">\n <div id=\"toolbarContainer\">\n <div class=\"mv-toolbar__container\">\n <div #mvToolbar class=\"mv-toolbar\" [class.notSupported]=\"!contentType\">\n <!-- The mvToolbarMain div contains all toolbar buttons except the \"More options\" button. This allows for calculation of the available space to display buttons -->\n <div id=\"mvToolbarMain\" class=\"mv-toolbar-main\" #mvToolbarMain>\n <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n </div>\n <!-- The mvToolbarMoreOptions div contains the \"More options\" toolbar button (and the overlay template for the dropdown menu).\n The space occupied by the button (if visible) is excluded from the toolbar space available calculation -->\n <div id=\"mvToolbarMoreOptions\" class=\"mv-toolbar-more-options\">\n <button\n id=\"mvMoreOptionsBtn\"\n class=\"mv-button mv-toolbar__menu-button--more-options\"\n [class.mv-toolbar__menu-button--more-options__hidden]=\"\n mvToolbar.offsetWidth >= allButtonsWidth\n \"\n aria-pressed=\"false\"\n (click)=\"toggleMoreOptions()\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n [disabled]=\"redactAllInProgress\"\n >\n <span>{{ \"More options\" | rpxTranslate }}</span>\n </button>\n <!-- This template displays the overlay content for the dropdown menu and is connected to the \"More options\" button -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDropdownMenuOpen\"\n [cdkConnectedOverlayPositions]=\"dropdownMenuPositions\"\n >\n <div class=\"dropdown-menu\" #dropdownMenu tabindex=\"0\">\n <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n </div>\n </ng-template>\n </div>\n </div>\n\n <div id=\"mvMenuItems\" #mvMenuItems>\n <ng-template #menuItems>\n <button\n *ngIf=\"toolbarButtons.showSidebar\"\n id=\"mvIndexBtn\"\n title=\"Index\"\n data-l10n-id=\"index\"\n #mvIndexBtn\n class=\"mv-button mv-toolbar__menu-button--index\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvIndexBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvIndexBtn']\n \"\n aria-pressed=\"false\"\n [disabled]=\"redactAllInProgress\"\n (click)=\"toggleIndexSideBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Index\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showSidebar\"\n id=\"mvBookmarksBtn\"\n title=\"Bookmarks\"\n data-l10n-id=\"bookmarks\"\n #mvBookmarksBtn\n [ngClass]=\"{\n 'mv-button mv-toolbar__menu-button--bookmarks': true,\n 'button-hidden-on-toolbar':\n mvToolbarMain.offsetWidth <\n widthRequiredForBtn['mvBookmarksBtn'],\n 'button-hidden-on-dropdown':\n mvToolbarMain.offsetWidth >=\n widthRequiredForBtn['mvBookmarksBtn']\n }\"\n aria-pressed=\"false\"\n [disabled]=\"redactAllInProgress\"\n (click)=\"toggleBookmarksSideBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Bookmarks\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showDrawButton\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvDrawBtn\"\n #mvDrawBtn\n class=\"mv-button mv-toolbar__menu-button--draw\"\n title=\"Draw a box\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvDrawBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvDrawBtn']\n \"\n [class.toggled]=\"toolbarEvents.drawModeSubject | async\"\n aria-pressed=\"false\"\n data-l10n-id=\"toggleDrawButton\"\n (click)=\"onClickDrawToggle(); isDropdownMenuOpen = false\"\n >\n <span data-l10n-id=\"draw_label\">{{\n \"Draw a box\" | rpxTranslate\n }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showHighlightButton\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvHighlightBtn\"\n #mvHighlightBtn\n class=\"mv-button mv-toolbar__menu-button--highlight\"\n title=\"Highlight\"\n aria-label=\"Highlight\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvHighlightBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvHighlightBtn']\n \"\n [class.toggled]=\"toolbarEvents.highlightModeSubject | async\"\n aria-pressed=\"false\"\n (click)=\"onClickHighlightToggle(); isDropdownMenuOpen = false\"\n data-l10n-id=\"toggleHighlightButton\"\n >\n <span data-l10n-id=\"highlight_label\">{{\n \"Highlight\" | rpxTranslate\n }}</span>\n </button>\n\n <ng-container *ngIf=\"toolbarButtons.showNavigation\">\n <div\n id=\"mvPageBtn\"\n #mvPageBtn\n class=\"mv-toolbar__menu-button--page\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPageBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPageBtn']\n \"\n >\n <span>{{ \"Page\" | rpxTranslate }}</span>\n\n <button\n id=\"mvUpBtn\"\n [disabled]=\"pageNumber === 1 || redactAllInProgress\"\n title=\"Previous Page\"\n class=\"mv-toolbar__menu-button--up button-image\"\n data-l10n-id=\"previous\"\n (click)=\"decreasePageNumber()\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <button\n id=\"mvDownBtn\"\n [disabled]=\"pageNumber === pageCount || redactAllInProgress\"\n title=\"Next Page\"\n class=\"mv-toolbar__menu-button--down button-image\"\n data-l10n-id=\"next\"\n (click)=\"increasePageNumber()\"\n >\n <span></span>\n </button>\n\n <input\n type=\"number\"\n id=\"pageNumber\"\n class=\"hmcts-toolbar-input govuk-input--width-2\"\n title=\"Page Number\"\n value=\"1\"\n size=\"4\"\n min=\"1\"\n [value]=\"pageNumber\"\n aria-label=\"page number\"\n tabindex=\"0\"\n data-l10n-id=\"page\"\n (change)=\"onPageNumberInputChange(pageNumberInput.value)\"\n [disabled]=\"redactAllInProgress\"\n #pageNumberInput\n />\n <span id=\"numPages\" class=\"toolbarLabel\">/ {{ pageCount }}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"toolbarButtons.showZoom\">\n <div\n id=\"mvZoomBtn\"\n #mvZoomBtn\n class=\"mv-toolbar__menu-button--zoom\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvZoomBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvZoomBtn']\n \"\n >\n <button\n [disabled]=\"\n toolbarEvents.zoomValueSubject.value === 0.1 ||\n redactAllInProgress\n \"\n id=\"mvMinusBtn\"\n class=\"mv-toolbar__menu-button--zoom-out button-image\"\n title=\"Zoom Out\"\n data-l10n-id=\"zoom_out\"\n (click)=\"stepZoom(-0.1)\"\n >\n <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n \"Zoom Out\" | rpxTranslate\n }}</span>\n </button>\n <select\n id=\"scaleSelect\"\n class=\"hmcts-toolbar-select\"\n title=\"Zoom\"\n tabindex=\"0\"\n data-l10n-id=\"zoom\"\n (change)=\"zoom($event.target.value)\"\n aria-label=\"zoom\"\n [disabled]=\"redactAllInProgress\"\n >\n <option\n #zoomSelect\n id=\"customScaleOption\"\n title=\"\"\n [value]=\"toolbarEvents.zoomValueSubject.value\"\n >\n {{\n toolbarEvents.zoomValueSubject.value * 100\n | number : \"1.0-0\"\n }}%\n </option>\n <option\n *ngFor=\"let zoomScale of zoomScales\"\n title=\"\"\n [value]=\"zoomScale\"\n [attr.data-l10n-id]=\"'page_scale_percent_' + zoomScale * 100\"\n >\n {{ zoomScale * 100 }}%\n </option>\n </select>\n\n <button\n [disabled]=\"\n toolbarEvents.zoomValueSubject.value === 5 ||\n redactAllInProgress\n \"\n id=\"mvPlusBtn\"\n class=\"mv-toolbar__menu-button--zoom-in button-image\"\n (click)=\"stepZoom(0.1)\"\n title=\"Zoom In\"\n data-l10n-id=\"zoom_in\"\n >\n <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n \"Zoom In\" | rpxTranslate\n }}</span>\n </button>\n </div>\n </ng-container>\n\n <div\n *ngIf=\"toolbarButtons.showRotate\"\n id=\"mvRotateBtn\"\n #mvRotateBtn\n class=\"mv-toolbar__menu-button--rotate\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvRotateBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvRotateBtn']\n \"\n >\n <button\n id=\"mvRotateLeftBtn\"\n class=\"mv-toolbar__menu-button--rotate_left button-image\"\n title=\"Rotate Counterclockwise\"\n data-l10n-id=\"page_rotate_ccw\"\n (click)=\"rotate(270)\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <button\n id=\"mvRotateRightBtn\"\n class=\"mv-toolbar__menu-button--rotate_right button-image\"\n title=\"Rotate Clockwise\"\n data-l10n-id=\"page_rotate_cw\"\n (click)=\"rotate(90)\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <span>{{ \"Rotate\" | rpxTranslate }}</span>\n </div>\n\n <button\n *ngIf=\"toolbarButtons.showSearchBar\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvSearchBtn\"\n #mvSearchBtn\n title=\"Search\"\n data-l10n-id=\"searchbar\"\n class=\"mv-button mv-toolbar__menu-button--search\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvSearchBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvSearchBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleSearchBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Search\" | rpxTranslate }}</span>\n </button>\n <mv-search-bar\n *ngIf=\"!toolbarEvents.searchBarHidden.getValue()\"\n ></mv-search-bar>\n\n <button\n *ngIf=\"enableICP && toolbarButtons.showPresentationMode && isPdf()\"\n [disabled]=\"icpEnabled || !contentType || redactionEnabled\"\n id=\"mvPresentBtn\"\n #mvPresentBtn\n class=\"mv-button mv-toolbar__menu-button--present\"\n title=\"In-Court Presentation Mode\"\n data-l10n-id=\"icpMode_label\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPresentBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPresentBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"togglePresentBar(); isDropdownMenuOpen = false\"\n >\n <span data-l10n-id=\"icpMode_label\">{{\n \"Present\" | rpxTranslate\n }}</span>\n </button>\n\n <button\n *ngIf=\"enableRedactions && toolbarButtons.showRedact\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvRedactBtn\"\n #mvRedactBtn\n title=\"Redact\"\n data-l10n-id=\"redact\"\n class=\"mv-button mv-toolbar__menu-button--redact\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvRedactBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvRedactBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleRedactBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Redact\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showGrabNDragButton\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvGrabBtn\"\n #mvGrabBtn\n class=\"mv-button mv-toolbar__menu-button--grab\"\n title=\"Grab and drag\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvGrabBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvGrabBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleGrabNDrag(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Grab and drag\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showDownload\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvDownloadBtn\"\n #mvDownloadBtn\n class=\"mv-button mv-toolbar__menu-button--download\"\n title=\"Download\"\n data-l10n-id=\"download\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvDownloadBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvDownloadBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"downloadFile(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Download\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showPrint\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvPrintBtn\"\n #mvPrintBtn\n title=\"Print\"\n data-l10n-id=\"print\"\n class=\"mv-button mv-toolbar__menu-button--print\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPrintBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPrintBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"printFile(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Print\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"enableAnnotations && toolbarButtons.showCommentSummary\"\n [disabled]=\"redactionEnabled\"\n id=\"mvCommentsBtn\"\n #mvCommentsBtn\n class=\"mv-button mv-toolbar__menu-button--comments\"\n title=\"Comments\"\n data-l10n-id=\"comments\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvCommentsBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvCommentsBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleCommentsPanel(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Comments\" | rpxTranslate }}</span>\n </button>\n </ng-template>\n </div>\n </div>\n\n <div id=\"loadingBar\">\n <div class=\"progress\">\n <div class=\"glimmer\"></div>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i6.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: SearchBarComponent, selector: "mv-search-bar" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.DecimalPipe, name: "number" }, { kind: "pipe", type: i5.RpxTranslatePipe, name: "rpxTranslate" }] });
3699
+ /** @nocollapse */ MainToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MainToolbarComponent, selector: "mv-main-toolbar", inputs: { enableAnnotations: "enableAnnotations", enableRedactions: "enableRedactions", enableICP: "enableICP", contentType: "contentType" }, host: { listeners: { "window:resize": "onResize()", "document:keydown.control.p": "onControlPrint($event)", "document:keydown.meta.p": "onControlPrint($event)" } }, viewQueries: [{ propertyName: "zoomSelect", first: true, predicate: ["zoomSelect"], descendants: true }, { propertyName: "mvToolbarMain", first: true, predicate: ["mvToolbarMain"], descendants: true }, { propertyName: "mvMenuItems", first: true, predicate: ["dropdownMenu"], descendants: true }], ngImport: i0, template: "<div class=\"toolbar\">\n <div id=\"toolbarContainer\">\n <div class=\"mv-toolbar__container\">\n <div #mvToolbar class=\"mv-toolbar\" [class.notSupported]=\"!contentType\">\n <!-- The mvToolbarMain div contains all toolbar buttons except the \"More options\" button. This allows for calculation of the available space to display buttons -->\n <div id=\"mvToolbarMain\" class=\"mv-toolbar-main\" #mvToolbarMain>\n <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n </div>\n <!-- The mvToolbarMoreOptions div contains the \"More options\" toolbar button (and the overlay template for the dropdown menu).\n The space occupied by the button (if visible) is excluded from the toolbar space available calculation -->\n <div id=\"mvToolbarMoreOptions\" class=\"mv-toolbar-more-options\">\n <button\n id=\"mvMoreOptionsBtn\"\n class=\"mv-button mv-toolbar__menu-button--more-options\"\n [class.mv-toolbar__menu-button--more-options__hidden]=\"\n mvToolbar.offsetWidth >= allButtonsWidth\n \"\n aria-pressed=\"false\"\n (click)=\"toggleMoreOptions()\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n [disabled]=\"redactAllInProgress\"\n >\n <span>{{ \"More options\" | rpxTranslate }}</span>\n </button>\n <!-- This template displays the overlay content for the dropdown menu and is connected to the \"More options\" button -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDropdownMenuOpen\"\n [cdkConnectedOverlayPositions]=\"dropdownMenuPositions\"\n >\n <div class=\"dropdown-menu\" #dropdownMenu tabindex=\"0\">\n <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n </div>\n </ng-template>\n </div>\n </div>\n\n <div id=\"mvMenuItems\" #mvMenuItems>\n <ng-template #menuItems>\n <button\n *ngIf=\"toolbarButtons.showSidebar\"\n id=\"mvIndexBtn\"\n title=\"Index\"\n data-l10n-id=\"index\"\n #mvIndexBtn\n class=\"mv-button mv-toolbar__menu-button--index\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvIndexBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvIndexBtn']\n \"\n aria-pressed=\"false\"\n [disabled]=\"redactAllInProgress\"\n (click)=\"toggleIndexSideBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Index\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showSidebar\"\n id=\"mvBookmarksBtn\"\n title=\"Bookmarks\"\n data-l10n-id=\"bookmarks\"\n #mvBookmarksBtn\n [ngClass]=\"{\n 'mv-button mv-toolbar__menu-button--bookmarks': true,\n 'button-hidden-on-toolbar':\n mvToolbarMain.offsetWidth <\n widthRequiredForBtn['mvBookmarksBtn'],\n 'button-hidden-on-dropdown':\n mvToolbarMain.offsetWidth >=\n widthRequiredForBtn['mvBookmarksBtn']\n }\"\n aria-pressed=\"false\"\n [disabled]=\"redactAllInProgress\"\n (click)=\"toggleBookmarksSideBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Bookmarks\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showDrawButton\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvDrawBtn\"\n #mvDrawBtn\n class=\"mv-button mv-toolbar__menu-button--draw\"\n title=\"Draw a box\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvDrawBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvDrawBtn']\n \"\n [class.toggled]=\"toolbarEvents.drawModeSubject | async\"\n aria-pressed=\"false\"\n data-l10n-id=\"toggleDrawButton\"\n (click)=\"onClickDrawToggle(); isDropdownMenuOpen = false\"\n >\n <span data-l10n-id=\"draw_label\">{{\n \"Draw a box\" | rpxTranslate\n }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showHighlightButton\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvHighlightBtn\"\n #mvHighlightBtn\n class=\"mv-button mv-toolbar__menu-button--highlight\"\n title=\"Highlight\"\n aria-label=\"Highlight\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvHighlightBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvHighlightBtn']\n \"\n [class.toggled]=\"toolbarEvents.highlightToolbarSubject | async\"\n aria-pressed=\"false\"\n (click)=\"onClickHighlightToggle(); isDropdownMenuOpen = false\"\n data-l10n-id=\"toggleHighlightButton\"\n >\n <span data-l10n-id=\"highlight_label\">{{\n \"Highlight\" | rpxTranslate\n }}</span>\n </button>\n\n <ng-container *ngIf=\"toolbarButtons.showNavigation\">\n <div\n id=\"mvPageBtn\"\n #mvPageBtn\n class=\"mv-toolbar__menu-button--page\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPageBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPageBtn']\n \"\n >\n <span>{{ \"Page\" | rpxTranslate }}</span>\n\n <button\n id=\"mvUpBtn\"\n [disabled]=\"pageNumber === 1 || redactAllInProgress\"\n title=\"Previous Page\"\n class=\"mv-toolbar__menu-button--up button-image\"\n data-l10n-id=\"previous\"\n (click)=\"decreasePageNumber()\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <button\n id=\"mvDownBtn\"\n [disabled]=\"pageNumber === pageCount || redactAllInProgress\"\n title=\"Next Page\"\n class=\"mv-toolbar__menu-button--down button-image\"\n data-l10n-id=\"next\"\n (click)=\"increasePageNumber()\"\n >\n <span></span>\n </button>\n\n <input\n type=\"number\"\n id=\"pageNumber\"\n class=\"hmcts-toolbar-input govuk-input--width-2\"\n title=\"Page Number\"\n value=\"1\"\n size=\"4\"\n min=\"1\"\n [value]=\"pageNumber\"\n aria-label=\"page number\"\n tabindex=\"0\"\n data-l10n-id=\"page\"\n (change)=\"onPageNumberInputChange(pageNumberInput.value)\"\n [disabled]=\"redactAllInProgress\"\n #pageNumberInput\n />\n <span id=\"numPages\" class=\"toolbarLabel\">/ {{ pageCount }}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"toolbarButtons.showZoom\">\n <div\n id=\"mvZoomBtn\"\n #mvZoomBtn\n class=\"mv-toolbar__menu-button--zoom\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvZoomBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvZoomBtn']\n \"\n >\n <button\n [disabled]=\"\n toolbarEvents.zoomValueSubject.value === 0.1 ||\n redactAllInProgress\n \"\n id=\"mvMinusBtn\"\n class=\"mv-toolbar__menu-button--zoom-out button-image\"\n title=\"Zoom Out\"\n data-l10n-id=\"zoom_out\"\n (click)=\"stepZoom(-0.1)\"\n >\n <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n \"Zoom Out\" | rpxTranslate\n }}</span>\n </button>\n <select\n id=\"scaleSelect\"\n class=\"hmcts-toolbar-select\"\n title=\"Zoom\"\n tabindex=\"0\"\n data-l10n-id=\"zoom\"\n (change)=\"zoom($event.target.value)\"\n aria-label=\"zoom\"\n [disabled]=\"redactAllInProgress\"\n >\n <option\n #zoomSelect\n id=\"customScaleOption\"\n title=\"\"\n [value]=\"toolbarEvents.zoomValueSubject.value\"\n >\n {{\n toolbarEvents.zoomValueSubject.value * 100\n | number : \"1.0-0\"\n }}%\n </option>\n <option\n *ngFor=\"let zoomScale of zoomScales\"\n title=\"\"\n [value]=\"zoomScale\"\n [attr.data-l10n-id]=\"'page_scale_percent_' + zoomScale * 100\"\n >\n {{ zoomScale * 100 }}%\n </option>\n </select>\n\n <button\n [disabled]=\"\n toolbarEvents.zoomValueSubject.value === 5 ||\n redactAllInProgress\n \"\n id=\"mvPlusBtn\"\n class=\"mv-toolbar__menu-button--zoom-in button-image\"\n (click)=\"stepZoom(0.1)\"\n title=\"Zoom In\"\n data-l10n-id=\"zoom_in\"\n >\n <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n \"Zoom In\" | rpxTranslate\n }}</span>\n </button>\n </div>\n </ng-container>\n\n <div\n *ngIf=\"toolbarButtons.showRotate\"\n id=\"mvRotateBtn\"\n #mvRotateBtn\n class=\"mv-toolbar__menu-button--rotate\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvRotateBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvRotateBtn']\n \"\n >\n <button\n id=\"mvRotateLeftBtn\"\n class=\"mv-toolbar__menu-button--rotate_left button-image\"\n title=\"Rotate Counterclockwise\"\n data-l10n-id=\"page_rotate_ccw\"\n (click)=\"rotate(270)\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <button\n id=\"mvRotateRightBtn\"\n class=\"mv-toolbar__menu-button--rotate_right button-image\"\n title=\"Rotate Clockwise\"\n data-l10n-id=\"page_rotate_cw\"\n (click)=\"rotate(90)\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <span>{{ \"Rotate\" | rpxTranslate }}</span>\n </div>\n\n <button\n *ngIf=\"toolbarButtons.showSearchBar\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvSearchBtn\"\n #mvSearchBtn\n title=\"Search\"\n data-l10n-id=\"searchbar\"\n class=\"mv-button mv-toolbar__menu-button--search\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvSearchBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvSearchBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleSearchBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Search\" | rpxTranslate }}</span>\n </button>\n <mv-search-bar\n *ngIf=\"!toolbarEvents.searchBarHidden.getValue()\"\n ></mv-search-bar>\n\n <button\n *ngIf=\"enableICP && toolbarButtons.showPresentationMode && isPdf()\"\n [disabled]=\"icpEnabled || !contentType || redactionEnabled\"\n id=\"mvPresentBtn\"\n #mvPresentBtn\n class=\"mv-button mv-toolbar__menu-button--present\"\n title=\"In-Court Presentation Mode\"\n data-l10n-id=\"icpMode_label\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPresentBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPresentBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"togglePresentBar(); isDropdownMenuOpen = false\"\n >\n <span data-l10n-id=\"icpMode_label\">{{\n \"Present\" | rpxTranslate\n }}</span>\n </button>\n\n <button\n *ngIf=\"enableRedactions && toolbarButtons.showRedact\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvRedactBtn\"\n #mvRedactBtn\n title=\"Redact\"\n data-l10n-id=\"redact\"\n class=\"mv-button mv-toolbar__menu-button--redact\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvRedactBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvRedactBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleRedactBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Redact\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showGrabNDragButton\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvGrabBtn\"\n #mvGrabBtn\n class=\"mv-button mv-toolbar__menu-button--grab\"\n title=\"Grab and drag\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvGrabBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvGrabBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleGrabNDrag(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Grab and drag\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showDownload\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvDownloadBtn\"\n #mvDownloadBtn\n class=\"mv-button mv-toolbar__menu-button--download\"\n title=\"Download\"\n data-l10n-id=\"download\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvDownloadBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvDownloadBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"downloadFile(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Download\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showPrint\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvPrintBtn\"\n #mvPrintBtn\n title=\"Print\"\n data-l10n-id=\"print\"\n class=\"mv-button mv-toolbar__menu-button--print\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPrintBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPrintBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"printFile(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Print\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"enableAnnotations && toolbarButtons.showCommentSummary\"\n [disabled]=\"redactionEnabled\"\n id=\"mvCommentsBtn\"\n #mvCommentsBtn\n class=\"mv-button mv-toolbar__menu-button--comments\"\n title=\"Comments\"\n data-l10n-id=\"comments\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvCommentsBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvCommentsBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleCommentsPanel(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Comments\" | rpxTranslate }}</span>\n </button>\n </ng-template>\n </div>\n </div>\n\n <div id=\"loadingBar\">\n <div class=\"progress\">\n <div class=\"glimmer\"></div>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i6.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: SearchBarComponent, selector: "mv-search-bar" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.DecimalPipe, name: "number" }, { kind: "pipe", type: i5.RpxTranslatePipe, name: "rpxTranslate" }] });
3589
3700
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MainToolbarComponent, decorators: [{
3590
3701
  type: Component,
3591
- args: [{ selector: 'mv-main-toolbar', template: "<div class=\"toolbar\">\n <div id=\"toolbarContainer\">\n <div class=\"mv-toolbar__container\">\n <div #mvToolbar class=\"mv-toolbar\" [class.notSupported]=\"!contentType\">\n <!-- The mvToolbarMain div contains all toolbar buttons except the \"More options\" button. This allows for calculation of the available space to display buttons -->\n <div id=\"mvToolbarMain\" class=\"mv-toolbar-main\" #mvToolbarMain>\n <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n </div>\n <!-- The mvToolbarMoreOptions div contains the \"More options\" toolbar button (and the overlay template for the dropdown menu).\n The space occupied by the button (if visible) is excluded from the toolbar space available calculation -->\n <div id=\"mvToolbarMoreOptions\" class=\"mv-toolbar-more-options\">\n <button\n id=\"mvMoreOptionsBtn\"\n class=\"mv-button mv-toolbar__menu-button--more-options\"\n [class.mv-toolbar__menu-button--more-options__hidden]=\"\n mvToolbar.offsetWidth >= allButtonsWidth\n \"\n aria-pressed=\"false\"\n (click)=\"toggleMoreOptions()\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n [disabled]=\"redactAllInProgress\"\n >\n <span>{{ \"More options\" | rpxTranslate }}</span>\n </button>\n <!-- This template displays the overlay content for the dropdown menu and is connected to the \"More options\" button -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDropdownMenuOpen\"\n [cdkConnectedOverlayPositions]=\"dropdownMenuPositions\"\n >\n <div class=\"dropdown-menu\" #dropdownMenu tabindex=\"0\">\n <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n </div>\n </ng-template>\n </div>\n </div>\n\n <div id=\"mvMenuItems\" #mvMenuItems>\n <ng-template #menuItems>\n <button\n *ngIf=\"toolbarButtons.showSidebar\"\n id=\"mvIndexBtn\"\n title=\"Index\"\n data-l10n-id=\"index\"\n #mvIndexBtn\n class=\"mv-button mv-toolbar__menu-button--index\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvIndexBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvIndexBtn']\n \"\n aria-pressed=\"false\"\n [disabled]=\"redactAllInProgress\"\n (click)=\"toggleIndexSideBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Index\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showSidebar\"\n id=\"mvBookmarksBtn\"\n title=\"Bookmarks\"\n data-l10n-id=\"bookmarks\"\n #mvBookmarksBtn\n [ngClass]=\"{\n 'mv-button mv-toolbar__menu-button--bookmarks': true,\n 'button-hidden-on-toolbar':\n mvToolbarMain.offsetWidth <\n widthRequiredForBtn['mvBookmarksBtn'],\n 'button-hidden-on-dropdown':\n mvToolbarMain.offsetWidth >=\n widthRequiredForBtn['mvBookmarksBtn']\n }\"\n aria-pressed=\"false\"\n [disabled]=\"redactAllInProgress\"\n (click)=\"toggleBookmarksSideBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Bookmarks\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showDrawButton\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvDrawBtn\"\n #mvDrawBtn\n class=\"mv-button mv-toolbar__menu-button--draw\"\n title=\"Draw a box\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvDrawBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvDrawBtn']\n \"\n [class.toggled]=\"toolbarEvents.drawModeSubject | async\"\n aria-pressed=\"false\"\n data-l10n-id=\"toggleDrawButton\"\n (click)=\"onClickDrawToggle(); isDropdownMenuOpen = false\"\n >\n <span data-l10n-id=\"draw_label\">{{\n \"Draw a box\" | rpxTranslate\n }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showHighlightButton\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvHighlightBtn\"\n #mvHighlightBtn\n class=\"mv-button mv-toolbar__menu-button--highlight\"\n title=\"Highlight\"\n aria-label=\"Highlight\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvHighlightBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvHighlightBtn']\n \"\n [class.toggled]=\"toolbarEvents.highlightModeSubject | async\"\n aria-pressed=\"false\"\n (click)=\"onClickHighlightToggle(); isDropdownMenuOpen = false\"\n data-l10n-id=\"toggleHighlightButton\"\n >\n <span data-l10n-id=\"highlight_label\">{{\n \"Highlight\" | rpxTranslate\n }}</span>\n </button>\n\n <ng-container *ngIf=\"toolbarButtons.showNavigation\">\n <div\n id=\"mvPageBtn\"\n #mvPageBtn\n class=\"mv-toolbar__menu-button--page\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPageBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPageBtn']\n \"\n >\n <span>{{ \"Page\" | rpxTranslate }}</span>\n\n <button\n id=\"mvUpBtn\"\n [disabled]=\"pageNumber === 1 || redactAllInProgress\"\n title=\"Previous Page\"\n class=\"mv-toolbar__menu-button--up button-image\"\n data-l10n-id=\"previous\"\n (click)=\"decreasePageNumber()\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <button\n id=\"mvDownBtn\"\n [disabled]=\"pageNumber === pageCount || redactAllInProgress\"\n title=\"Next Page\"\n class=\"mv-toolbar__menu-button--down button-image\"\n data-l10n-id=\"next\"\n (click)=\"increasePageNumber()\"\n >\n <span></span>\n </button>\n\n <input\n type=\"number\"\n id=\"pageNumber\"\n class=\"hmcts-toolbar-input govuk-input--width-2\"\n title=\"Page Number\"\n value=\"1\"\n size=\"4\"\n min=\"1\"\n [value]=\"pageNumber\"\n aria-label=\"page number\"\n tabindex=\"0\"\n data-l10n-id=\"page\"\n (change)=\"onPageNumberInputChange(pageNumberInput.value)\"\n [disabled]=\"redactAllInProgress\"\n #pageNumberInput\n />\n <span id=\"numPages\" class=\"toolbarLabel\">/ {{ pageCount }}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"toolbarButtons.showZoom\">\n <div\n id=\"mvZoomBtn\"\n #mvZoomBtn\n class=\"mv-toolbar__menu-button--zoom\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvZoomBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvZoomBtn']\n \"\n >\n <button\n [disabled]=\"\n toolbarEvents.zoomValueSubject.value === 0.1 ||\n redactAllInProgress\n \"\n id=\"mvMinusBtn\"\n class=\"mv-toolbar__menu-button--zoom-out button-image\"\n title=\"Zoom Out\"\n data-l10n-id=\"zoom_out\"\n (click)=\"stepZoom(-0.1)\"\n >\n <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n \"Zoom Out\" | rpxTranslate\n }}</span>\n </button>\n <select\n id=\"scaleSelect\"\n class=\"hmcts-toolbar-select\"\n title=\"Zoom\"\n tabindex=\"0\"\n data-l10n-id=\"zoom\"\n (change)=\"zoom($event.target.value)\"\n aria-label=\"zoom\"\n [disabled]=\"redactAllInProgress\"\n >\n <option\n #zoomSelect\n id=\"customScaleOption\"\n title=\"\"\n [value]=\"toolbarEvents.zoomValueSubject.value\"\n >\n {{\n toolbarEvents.zoomValueSubject.value * 100\n | number : \"1.0-0\"\n }}%\n </option>\n <option\n *ngFor=\"let zoomScale of zoomScales\"\n title=\"\"\n [value]=\"zoomScale\"\n [attr.data-l10n-id]=\"'page_scale_percent_' + zoomScale * 100\"\n >\n {{ zoomScale * 100 }}%\n </option>\n </select>\n\n <button\n [disabled]=\"\n toolbarEvents.zoomValueSubject.value === 5 ||\n redactAllInProgress\n \"\n id=\"mvPlusBtn\"\n class=\"mv-toolbar__menu-button--zoom-in button-image\"\n (click)=\"stepZoom(0.1)\"\n title=\"Zoom In\"\n data-l10n-id=\"zoom_in\"\n >\n <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n \"Zoom In\" | rpxTranslate\n }}</span>\n </button>\n </div>\n </ng-container>\n\n <div\n *ngIf=\"toolbarButtons.showRotate\"\n id=\"mvRotateBtn\"\n #mvRotateBtn\n class=\"mv-toolbar__menu-button--rotate\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvRotateBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvRotateBtn']\n \"\n >\n <button\n id=\"mvRotateLeftBtn\"\n class=\"mv-toolbar__menu-button--rotate_left button-image\"\n title=\"Rotate Counterclockwise\"\n data-l10n-id=\"page_rotate_ccw\"\n (click)=\"rotate(270)\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <button\n id=\"mvRotateRightBtn\"\n class=\"mv-toolbar__menu-button--rotate_right button-image\"\n title=\"Rotate Clockwise\"\n data-l10n-id=\"page_rotate_cw\"\n (click)=\"rotate(90)\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <span>{{ \"Rotate\" | rpxTranslate }}</span>\n </div>\n\n <button\n *ngIf=\"toolbarButtons.showSearchBar\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvSearchBtn\"\n #mvSearchBtn\n title=\"Search\"\n data-l10n-id=\"searchbar\"\n class=\"mv-button mv-toolbar__menu-button--search\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvSearchBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvSearchBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleSearchBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Search\" | rpxTranslate }}</span>\n </button>\n <mv-search-bar\n *ngIf=\"!toolbarEvents.searchBarHidden.getValue()\"\n ></mv-search-bar>\n\n <button\n *ngIf=\"enableICP && toolbarButtons.showPresentationMode && isPdf()\"\n [disabled]=\"icpEnabled || !contentType || redactionEnabled\"\n id=\"mvPresentBtn\"\n #mvPresentBtn\n class=\"mv-button mv-toolbar__menu-button--present\"\n title=\"In-Court Presentation Mode\"\n data-l10n-id=\"icpMode_label\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPresentBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPresentBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"togglePresentBar(); isDropdownMenuOpen = false\"\n >\n <span data-l10n-id=\"icpMode_label\">{{\n \"Present\" | rpxTranslate\n }}</span>\n </button>\n\n <button\n *ngIf=\"enableRedactions && toolbarButtons.showRedact\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvRedactBtn\"\n #mvRedactBtn\n title=\"Redact\"\n data-l10n-id=\"redact\"\n class=\"mv-button mv-toolbar__menu-button--redact\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvRedactBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvRedactBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleRedactBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Redact\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showGrabNDragButton\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvGrabBtn\"\n #mvGrabBtn\n class=\"mv-button mv-toolbar__menu-button--grab\"\n title=\"Grab and drag\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvGrabBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvGrabBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleGrabNDrag(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Grab and drag\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showDownload\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvDownloadBtn\"\n #mvDownloadBtn\n class=\"mv-button mv-toolbar__menu-button--download\"\n title=\"Download\"\n data-l10n-id=\"download\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvDownloadBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvDownloadBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"downloadFile(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Download\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showPrint\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvPrintBtn\"\n #mvPrintBtn\n title=\"Print\"\n data-l10n-id=\"print\"\n class=\"mv-button mv-toolbar__menu-button--print\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPrintBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPrintBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"printFile(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Print\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"enableAnnotations && toolbarButtons.showCommentSummary\"\n [disabled]=\"redactionEnabled\"\n id=\"mvCommentsBtn\"\n #mvCommentsBtn\n class=\"mv-button mv-toolbar__menu-button--comments\"\n title=\"Comments\"\n data-l10n-id=\"comments\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvCommentsBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvCommentsBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleCommentsPanel(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Comments\" | rpxTranslate }}</span>\n </button>\n </ng-template>\n </div>\n </div>\n\n <div id=\"loadingBar\">\n <div class=\"progress\">\n <div class=\"glimmer\"></div>\n </div>\n </div>\n </div>\n</div>\n" }]
3702
+ args: [{ selector: 'mv-main-toolbar', template: "<div class=\"toolbar\">\n <div id=\"toolbarContainer\">\n <div class=\"mv-toolbar__container\">\n <div #mvToolbar class=\"mv-toolbar\" [class.notSupported]=\"!contentType\">\n <!-- The mvToolbarMain div contains all toolbar buttons except the \"More options\" button. This allows for calculation of the available space to display buttons -->\n <div id=\"mvToolbarMain\" class=\"mv-toolbar-main\" #mvToolbarMain>\n <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n </div>\n <!-- The mvToolbarMoreOptions div contains the \"More options\" toolbar button (and the overlay template for the dropdown menu).\n The space occupied by the button (if visible) is excluded from the toolbar space available calculation -->\n <div id=\"mvToolbarMoreOptions\" class=\"mv-toolbar-more-options\">\n <button\n id=\"mvMoreOptionsBtn\"\n class=\"mv-button mv-toolbar__menu-button--more-options\"\n [class.mv-toolbar__menu-button--more-options__hidden]=\"\n mvToolbar.offsetWidth >= allButtonsWidth\n \"\n aria-pressed=\"false\"\n (click)=\"toggleMoreOptions()\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n [disabled]=\"redactAllInProgress\"\n >\n <span>{{ \"More options\" | rpxTranslate }}</span>\n </button>\n <!-- This template displays the overlay content for the dropdown menu and is connected to the \"More options\" button -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDropdownMenuOpen\"\n [cdkConnectedOverlayPositions]=\"dropdownMenuPositions\"\n >\n <div class=\"dropdown-menu\" #dropdownMenu tabindex=\"0\">\n <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n </div>\n </ng-template>\n </div>\n </div>\n\n <div id=\"mvMenuItems\" #mvMenuItems>\n <ng-template #menuItems>\n <button\n *ngIf=\"toolbarButtons.showSidebar\"\n id=\"mvIndexBtn\"\n title=\"Index\"\n data-l10n-id=\"index\"\n #mvIndexBtn\n class=\"mv-button mv-toolbar__menu-button--index\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvIndexBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvIndexBtn']\n \"\n aria-pressed=\"false\"\n [disabled]=\"redactAllInProgress\"\n (click)=\"toggleIndexSideBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Index\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showSidebar\"\n id=\"mvBookmarksBtn\"\n title=\"Bookmarks\"\n data-l10n-id=\"bookmarks\"\n #mvBookmarksBtn\n [ngClass]=\"{\n 'mv-button mv-toolbar__menu-button--bookmarks': true,\n 'button-hidden-on-toolbar':\n mvToolbarMain.offsetWidth <\n widthRequiredForBtn['mvBookmarksBtn'],\n 'button-hidden-on-dropdown':\n mvToolbarMain.offsetWidth >=\n widthRequiredForBtn['mvBookmarksBtn']\n }\"\n aria-pressed=\"false\"\n [disabled]=\"redactAllInProgress\"\n (click)=\"toggleBookmarksSideBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Bookmarks\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showDrawButton\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvDrawBtn\"\n #mvDrawBtn\n class=\"mv-button mv-toolbar__menu-button--draw\"\n title=\"Draw a box\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvDrawBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvDrawBtn']\n \"\n [class.toggled]=\"toolbarEvents.drawModeSubject | async\"\n aria-pressed=\"false\"\n data-l10n-id=\"toggleDrawButton\"\n (click)=\"onClickDrawToggle(); isDropdownMenuOpen = false\"\n >\n <span data-l10n-id=\"draw_label\">{{\n \"Draw a box\" | rpxTranslate\n }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showHighlightButton\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvHighlightBtn\"\n #mvHighlightBtn\n class=\"mv-button mv-toolbar__menu-button--highlight\"\n title=\"Highlight\"\n aria-label=\"Highlight\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvHighlightBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvHighlightBtn']\n \"\n [class.toggled]=\"toolbarEvents.highlightToolbarSubject | async\"\n aria-pressed=\"false\"\n (click)=\"onClickHighlightToggle(); isDropdownMenuOpen = false\"\n data-l10n-id=\"toggleHighlightButton\"\n >\n <span data-l10n-id=\"highlight_label\">{{\n \"Highlight\" | rpxTranslate\n }}</span>\n </button>\n\n <ng-container *ngIf=\"toolbarButtons.showNavigation\">\n <div\n id=\"mvPageBtn\"\n #mvPageBtn\n class=\"mv-toolbar__menu-button--page\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPageBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPageBtn']\n \"\n >\n <span>{{ \"Page\" | rpxTranslate }}</span>\n\n <button\n id=\"mvUpBtn\"\n [disabled]=\"pageNumber === 1 || redactAllInProgress\"\n title=\"Previous Page\"\n class=\"mv-toolbar__menu-button--up button-image\"\n data-l10n-id=\"previous\"\n (click)=\"decreasePageNumber()\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <button\n id=\"mvDownBtn\"\n [disabled]=\"pageNumber === pageCount || redactAllInProgress\"\n title=\"Next Page\"\n class=\"mv-toolbar__menu-button--down button-image\"\n data-l10n-id=\"next\"\n (click)=\"increasePageNumber()\"\n >\n <span></span>\n </button>\n\n <input\n type=\"number\"\n id=\"pageNumber\"\n class=\"hmcts-toolbar-input govuk-input--width-2\"\n title=\"Page Number\"\n value=\"1\"\n size=\"4\"\n min=\"1\"\n [value]=\"pageNumber\"\n aria-label=\"page number\"\n tabindex=\"0\"\n data-l10n-id=\"page\"\n (change)=\"onPageNumberInputChange(pageNumberInput.value)\"\n [disabled]=\"redactAllInProgress\"\n #pageNumberInput\n />\n <span id=\"numPages\" class=\"toolbarLabel\">/ {{ pageCount }}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"toolbarButtons.showZoom\">\n <div\n id=\"mvZoomBtn\"\n #mvZoomBtn\n class=\"mv-toolbar__menu-button--zoom\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvZoomBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvZoomBtn']\n \"\n >\n <button\n [disabled]=\"\n toolbarEvents.zoomValueSubject.value === 0.1 ||\n redactAllInProgress\n \"\n id=\"mvMinusBtn\"\n class=\"mv-toolbar__menu-button--zoom-out button-image\"\n title=\"Zoom Out\"\n data-l10n-id=\"zoom_out\"\n (click)=\"stepZoom(-0.1)\"\n >\n <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n \"Zoom Out\" | rpxTranslate\n }}</span>\n </button>\n <select\n id=\"scaleSelect\"\n class=\"hmcts-toolbar-select\"\n title=\"Zoom\"\n tabindex=\"0\"\n data-l10n-id=\"zoom\"\n (change)=\"zoom($event.target.value)\"\n aria-label=\"zoom\"\n [disabled]=\"redactAllInProgress\"\n >\n <option\n #zoomSelect\n id=\"customScaleOption\"\n title=\"\"\n [value]=\"toolbarEvents.zoomValueSubject.value\"\n >\n {{\n toolbarEvents.zoomValueSubject.value * 100\n | number : \"1.0-0\"\n }}%\n </option>\n <option\n *ngFor=\"let zoomScale of zoomScales\"\n title=\"\"\n [value]=\"zoomScale\"\n [attr.data-l10n-id]=\"'page_scale_percent_' + zoomScale * 100\"\n >\n {{ zoomScale * 100 }}%\n </option>\n </select>\n\n <button\n [disabled]=\"\n toolbarEvents.zoomValueSubject.value === 5 ||\n redactAllInProgress\n \"\n id=\"mvPlusBtn\"\n class=\"mv-toolbar__menu-button--zoom-in button-image\"\n (click)=\"stepZoom(0.1)\"\n title=\"Zoom In\"\n data-l10n-id=\"zoom_in\"\n >\n <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n \"Zoom In\" | rpxTranslate\n }}</span>\n </button>\n </div>\n </ng-container>\n\n <div\n *ngIf=\"toolbarButtons.showRotate\"\n id=\"mvRotateBtn\"\n #mvRotateBtn\n class=\"mv-toolbar__menu-button--rotate\"\n aria-pressed=\"false\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvRotateBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvRotateBtn']\n \"\n >\n <button\n id=\"mvRotateLeftBtn\"\n class=\"mv-toolbar__menu-button--rotate_left button-image\"\n title=\"Rotate Counterclockwise\"\n data-l10n-id=\"page_rotate_ccw\"\n (click)=\"rotate(270)\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <button\n id=\"mvRotateRightBtn\"\n class=\"mv-toolbar__menu-button--rotate_right button-image\"\n title=\"Rotate Clockwise\"\n data-l10n-id=\"page_rotate_cw\"\n (click)=\"rotate(90)\"\n [disabled]=\"redactAllInProgress\"\n >\n <span></span>\n </button>\n <span>{{ \"Rotate\" | rpxTranslate }}</span>\n </div>\n\n <button\n *ngIf=\"toolbarButtons.showSearchBar\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvSearchBtn\"\n #mvSearchBtn\n title=\"Search\"\n data-l10n-id=\"searchbar\"\n class=\"mv-button mv-toolbar__menu-button--search\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvSearchBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvSearchBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleSearchBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Search\" | rpxTranslate }}</span>\n </button>\n <mv-search-bar\n *ngIf=\"!toolbarEvents.searchBarHidden.getValue()\"\n ></mv-search-bar>\n\n <button\n *ngIf=\"enableICP && toolbarButtons.showPresentationMode && isPdf()\"\n [disabled]=\"icpEnabled || !contentType || redactionEnabled\"\n id=\"mvPresentBtn\"\n #mvPresentBtn\n class=\"mv-button mv-toolbar__menu-button--present\"\n title=\"In-Court Presentation Mode\"\n data-l10n-id=\"icpMode_label\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPresentBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPresentBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"togglePresentBar(); isDropdownMenuOpen = false\"\n >\n <span data-l10n-id=\"icpMode_label\">{{\n \"Present\" | rpxTranslate\n }}</span>\n </button>\n\n <button\n *ngIf=\"enableRedactions && toolbarButtons.showRedact\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvRedactBtn\"\n #mvRedactBtn\n title=\"Redact\"\n data-l10n-id=\"redact\"\n class=\"mv-button mv-toolbar__menu-button--redact\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvRedactBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvRedactBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleRedactBar(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Redact\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showGrabNDragButton\"\n [disabled]=\"icpEnabled || redactAllInProgress\"\n id=\"mvGrabBtn\"\n #mvGrabBtn\n class=\"mv-button mv-toolbar__menu-button--grab\"\n title=\"Grab and drag\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvGrabBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvGrabBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleGrabNDrag(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Grab and drag\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showDownload\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvDownloadBtn\"\n #mvDownloadBtn\n class=\"mv-button mv-toolbar__menu-button--download\"\n title=\"Download\"\n data-l10n-id=\"download\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvDownloadBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvDownloadBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"downloadFile(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Download\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"toolbarButtons.showPrint\"\n [disabled]=\"icpEnabled || redactionEnabled\"\n id=\"mvPrintBtn\"\n #mvPrintBtn\n title=\"Print\"\n data-l10n-id=\"print\"\n class=\"mv-button mv-toolbar__menu-button--print\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPrintBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPrintBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"printFile(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Print\" | rpxTranslate }}</span>\n </button>\n\n <button\n *ngIf=\"enableAnnotations && toolbarButtons.showCommentSummary\"\n [disabled]=\"redactionEnabled\"\n id=\"mvCommentsBtn\"\n #mvCommentsBtn\n class=\"mv-button mv-toolbar__menu-button--comments\"\n title=\"Comments\"\n data-l10n-id=\"comments\"\n [class.button-hidden-on-toolbar]=\"\n mvToolbarMain.offsetWidth < widthRequiredForBtn['mvCommentsBtn']\n \"\n [class.button-hidden-on-dropdown]=\"\n mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvCommentsBtn']\n \"\n aria-pressed=\"false\"\n (click)=\"toggleCommentsPanel(); isDropdownMenuOpen = false\"\n >\n <span>{{ \"Comments\" | rpxTranslate }}</span>\n </button>\n </ng-template>\n </div>\n </div>\n\n <div id=\"loadingBar\">\n <div class=\"progress\">\n <div class=\"glimmer\"></div>\n </div>\n </div>\n </div>\n</div>\n" }]
3592
3703
  }], ctorParameters: function () { return [{ type: ToolbarEventService }, { type: ToolbarButtonVisibilityService }, { type: i0.ChangeDetectorRef }, { type: NumberHelperService }]; }, propDecorators: { enableAnnotations: [{
3593
3704
  type: Input
3594
3705
  }], enableRedactions: [{
@@ -3657,7 +3768,7 @@ class RedactionToolbarComponent {
3657
3768
  }));
3658
3769
  }
3659
3770
  onRedactAllSearch() {
3660
- this.toolbarEventService.openRedactionSearch.next(true);
3771
+ this.toolbarEventService.openRedactionSearch.next({ modeType: SearchType.Redact, isOpen: true });
3661
3772
  }
3662
3773
  toggleTextRedactionMode() {
3663
3774
  this.toolbarEventService.highlightModeSubject.next(true);
@@ -3731,6 +3842,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3731
3842
  args: [{ selector: 'mv-icp-toolbar', template: "<div id=\"icp-toolbar\" class=\"icpMode\">\n <div id=\"toolbar-title\">\n <label class=\"govuk-label\" data-l10n-id=\"digitalEvidence_label\">Digital evidence presentation</label>\n </div>\n\n <div id=\"presentation-mode\">\n <div class=\"item-label\">\n <label class=\"govuk-label\" data-l10n-id=\"icpInfo_label\">You are in presentation mode</label>\n </div>\n <div class=\"item-button\">\n <button class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\" tabindex=\"0\"\n title=\"Leave presentation\" (click)=\"leaveIcpSession()\">\n <span data-l10n-id=\"icp-leave-presentation_label\">Leave presentation</span>\n </button>\n </div>\n </div>\n\n <div id=\"presenter-info\">\n <div class=\"item-label\">\n <label class=\"govuk-label\" *ngIf=\"!presenterName\" data-l10n-id=\"noPresenter_label\">Waiting for presenter</label>\n <label class=\"govuk-label\" *ngIf=\"presenterName && isPresenter\" data-l10n-id=\"isPresenter_label\">You are\n presenting</label>\n <label class=\"govuk-label\" *ngIf=\"presenterName && !isPresenter\"\n data-l10n-id=\"otherPresenter_label\">{{ presenterName | titlecase }}\n is presenting</label>\n </div>\n <div class=\"item-button\">\n <button *ngIf=\"!presenterName\" class=\"govuk-button\" id=\"icp-present\" tabindex=\"0\" title=\"Present\"\n (click)=\"present()\">\n <span data-l10n-id=\"icp-present_label\">Start presenting</span>\n </button>\n <button *ngIf=\"isPresenter\" class=\"govuk-button govuk-button--warning\" id=\"icp-stop-presenting\" tabindex=\"0\"\n title=\"Stop presenting\" (click)=\"stopPresenting()\">\n <span data-l10n-id=\"icp-stop-presenting_label\">Stop Presenting</span>\n </button>\n </div>\n </div>\n\n <div id=\"participant-list\">\n <button class=\"govuk-button govuk-button--secondary\" id=\"icp-participants-list\" tabindex=\"0\"\n title=\"Participants list\" (click)=\"showParticipantsList()\">\n <span\n data-l10n-id=\"icp-stop-presenting_label\">{{(toolbarEventService.icp.participantsListVisible | async) ? 'Hide': 'Show'}}\n participants</span>\n </button>\n </div>\n</div>" }]
3732
3843
  }], ctorParameters: function () { return [{ type: ToolbarEventService }, { type: i1.Store }]; } });
3733
3844
 
3845
+ class HighlightToolbarComponent {
3846
+ constructor(toolbarEventService, toolbarButtons) {
3847
+ this.toolbarEventService = toolbarEventService;
3848
+ this.toolbarButtons = toolbarButtons;
3849
+ this.subscriptions = [];
3850
+ }
3851
+ ngOnInit() {
3852
+ this.subscriptions.push(this.toolbarEventService.redactAllInProgressSubject.subscribe(inprogress => {
3853
+ this.redactionAllInProgress = inprogress;
3854
+ }));
3855
+ }
3856
+ onAllSearch() {
3857
+ this.toolbarEventService.openRedactionSearch.next({ modeType: SearchType.Highlight, isOpen: true });
3858
+ }
3859
+ onHighlight() {
3860
+ this.toolbarEventService.toggleHighlightMode();
3861
+ }
3862
+ onClickDrawToggle() {
3863
+ this.toolbarEventService.toggleDrawMode();
3864
+ }
3865
+ onClose() {
3866
+ this.toolbarEventService.highlightToolbarSubject.next(false);
3867
+ this.toolbarEventService.highlightModeSubject.next(false);
3868
+ this.toolbarEventService.openRedactionSearch.next({ modeType: SearchType.Highlight, isOpen: false });
3869
+ }
3870
+ ngOnDestroy() {
3871
+ for (const subscription of this.subscriptions) {
3872
+ subscription.unsubscribe();
3873
+ }
3874
+ }
3875
+ }
3876
+ /** @nocollapse */ HighlightToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HighlightToolbarComponent, deps: [{ token: ToolbarEventService }, { token: ToolbarButtonVisibilityService }], target: i0.ɵɵFactoryTarget.Component });
3877
+ /** @nocollapse */ HighlightToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: HighlightToolbarComponent, selector: "mv-highlight-toolbar", ngImport: i0, template: "<div class=\"redaction\">\n <label class=\"govuk-label redaction-title\" data-l10n-id=\"redaction_options\"\n >Highlight options</label\n >\n\n <button\n id=\"mvDrawBtn\"\n #mvDrawBtn\n class=\"mv-button mv-toolbar__menu-button--draw\"\n title=\"Draw a box\"\n [class.toggled]=\"toolbarEventService.drawModeSubject | async\"\n aria-pressed=\"false\"\n data-l10n-id=\"mvDrawBtn\"\n (click)=\"onClickDrawToggle()\"\n [disabled]=\"redactionAllInProgress\"\n >\n <span data-l10n-id=\"draw_label\">Draw a box</span>\n </button>\n\n <button\n id=\"highlightTextBtn\"\n class=\"mv-button mv-toolbar__menu-button--highlight\"\n title=\"Highlight text\"\n data-l10n-id=\"highlightTextBtn\"\n (click)=\"onHighlight()\"\n [class.toggled]=\"toolbarEventService.highlightModeSubject | async\"\n [disabled]=\"redactionAllInProgress\"\n >\n <span data-l10n-id=\"highlightTextBtn_label\">Highlight text</span>\n </button>\n\n <button\n id=\"mvHighlightFromSearchBtn\"\n title=\"From search\"\n data-l10n-id=\"fromSearchButton\"\n class=\"mv-button redaction-button--search\"\n (click)=\"onAllSearch()\"\n [disabled]=\"redactionAllInProgress\"\n >\n <span style=\"width: 5rem\" data-l10n-id=\"fromSearchButton_label\"\n >From search</span\n >\n </button>\n\n <button\n id=\"mvCloseBtn\"\n #mvCloseBtn\n class=\"mv-button redaction-button--close\"\n title=\"Close Redaction\"\n data-l10n-id=\"mvRedactBtn\"\n (click)=\"onClose()\"\n [disabled]=\"redactionAllInProgress\"\n >\n <span data-l10n-id=\"Close Redaction\">Close Highlight</span>\n </button>\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
3878
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HighlightToolbarComponent, decorators: [{
3879
+ type: Component,
3880
+ args: [{ selector: 'mv-highlight-toolbar', template: "<div class=\"redaction\">\n <label class=\"govuk-label redaction-title\" data-l10n-id=\"redaction_options\"\n >Highlight options</label\n >\n\n <button\n id=\"mvDrawBtn\"\n #mvDrawBtn\n class=\"mv-button mv-toolbar__menu-button--draw\"\n title=\"Draw a box\"\n [class.toggled]=\"toolbarEventService.drawModeSubject | async\"\n aria-pressed=\"false\"\n data-l10n-id=\"mvDrawBtn\"\n (click)=\"onClickDrawToggle()\"\n [disabled]=\"redactionAllInProgress\"\n >\n <span data-l10n-id=\"draw_label\">Draw a box</span>\n </button>\n\n <button\n id=\"highlightTextBtn\"\n class=\"mv-button mv-toolbar__menu-button--highlight\"\n title=\"Highlight text\"\n data-l10n-id=\"highlightTextBtn\"\n (click)=\"onHighlight()\"\n [class.toggled]=\"toolbarEventService.highlightModeSubject | async\"\n [disabled]=\"redactionAllInProgress\"\n >\n <span data-l10n-id=\"highlightTextBtn_label\">Highlight text</span>\n </button>\n\n <button\n id=\"mvHighlightFromSearchBtn\"\n title=\"From search\"\n data-l10n-id=\"fromSearchButton\"\n class=\"mv-button redaction-button--search\"\n (click)=\"onAllSearch()\"\n [disabled]=\"redactionAllInProgress\"\n >\n <span style=\"width: 5rem\" data-l10n-id=\"fromSearchButton_label\"\n >From search</span\n >\n </button>\n\n <button\n id=\"mvCloseBtn\"\n #mvCloseBtn\n class=\"mv-button redaction-button--close\"\n title=\"Close Redaction\"\n data-l10n-id=\"mvRedactBtn\"\n (click)=\"onClose()\"\n [disabled]=\"redactionAllInProgress\"\n >\n <span data-l10n-id=\"Close Redaction\">Close Highlight</span>\n </button>\n</div>\n" }]
3881
+ }], ctorParameters: function () { return [{ type: ToolbarEventService }, { type: ToolbarButtonVisibilityService }]; } });
3882
+
3734
3883
  class ToolbarModule {
3735
3884
  }
3736
3885
  /** @nocollapse */ ToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -3738,14 +3887,16 @@ class ToolbarModule {
3738
3887
  MainToolbarComponent,
3739
3888
  RedactionToolbarComponent,
3740
3889
  IcpToolbarComponent,
3741
- RedactionSearchBarComponent], imports: [CommonModule,
3890
+ RedactionSearchBarComponent,
3891
+ HighlightToolbarComponent], imports: [CommonModule,
3742
3892
  FormsModule,
3743
3893
  OverlayModule,
3744
3894
  RouterModule, i5.RpxTranslationModule], exports: [MainToolbarComponent,
3745
3895
  SearchBarComponent,
3746
3896
  RedactionToolbarComponent,
3747
3897
  IcpToolbarComponent,
3748
- RedactionSearchBarComponent] });
3898
+ RedactionSearchBarComponent,
3899
+ HighlightToolbarComponent] });
3749
3900
  /** @nocollapse */ ToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarModule, providers: [
3750
3901
  ToolbarButtonVisibilityService,
3751
3902
  ToolbarEventService
@@ -3762,7 +3913,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3762
3913
  MainToolbarComponent,
3763
3914
  RedactionToolbarComponent,
3764
3915
  IcpToolbarComponent,
3765
- RedactionSearchBarComponent
3916
+ RedactionSearchBarComponent,
3917
+ HighlightToolbarComponent
3766
3918
  ],
3767
3919
  providers: [
3768
3920
  ToolbarButtonVisibilityService,
@@ -3773,7 +3925,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3773
3925
  SearchBarComponent,
3774
3926
  RedactionToolbarComponent,
3775
3927
  IcpToolbarComponent,
3776
- RedactionSearchBarComponent
3928
+ RedactionSearchBarComponent,
3929
+ HighlightToolbarComponent
3777
3930
  ],
3778
3931
  imports: [
3779
3932
  CommonModule,
@@ -5921,7 +6074,7 @@ class MediaViewerComponent {
5921
6074
  }
5922
6075
  setToolbarButtons() {
5923
6076
  if (this.contentType === CoreContentTypes.PDF || this.needsConverting()) {
5924
- this.toolbarButtons.setup(Object.assign(Object.assign(Object.assign({}, defaultPdfOptions), { showHighlightButton: this.enableAnnotations, showDrawButton: this.enableAnnotations }), this.toolbarButtonOverrides));
6077
+ this.toolbarButtons.setup(Object.assign(Object.assign(Object.assign({}, defaultPdfOptions), { showHighlightButton: this.enableAnnotations, showDrawButton: false }), this.toolbarButtonOverrides));
5925
6078
  }
5926
6079
  else if (this.contentType === CoreContentTypes.IMAGE) {
5927
6080
  this.toolbarButtons.setup(Object.assign(Object.assign(Object.assign({}, defaultImageOptions), { showDrawButton: this.enableAnnotations }), this.toolbarButtonOverrides));
@@ -5961,10 +6114,10 @@ class MediaViewerComponent {
5961
6114
  }
5962
6115
  }
5963
6116
  /** @nocollapse */ MediaViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MediaViewerComponent, deps: [{ token: i1.Store }, { token: ToolbarButtonVisibilityService }, { token: ToolbarEventService }, { token: AnnotationApiService }, { token: CommentService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5964
- /** @nocollapse */ MediaViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MediaViewerComponent, selector: "mv-media-viewer", inputs: { url: "url", downloadFileName: "downloadFileName", contentType: "contentType", showToolbar: "showToolbar", toolbarButtonOverrides: "toolbarButtonOverrides", height: "height", width: "width", enableAnnotations: "enableAnnotations", annotationApiUrl: "annotationApiUrl", enableRedactions: "enableRedactions", enableICP: "enableICP", multimediaPlayerEnabled: "multimediaPlayerEnabled", enableRedactSearch: "enableRedactSearch", caseId: "caseId" }, outputs: { mediaLoadStatus: "mediaLoadStatus", viewerException: "viewerException", toolbarEventsOutput: "toolbarEventsOutput", unsavedChanges: "unsavedChanges" }, viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["viewerRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n id=\"outerContainer\"\n [ngClass]=\"{\n 'has-redact-bar': toolbarEvents.redactionMode | async,\n 'icp-mode': toolbarEvents.icp.enabled | async,\n 'is-redaction-preview': toolbarEvents.redactionPreview | async,\n sidebarOpen: toolbarEvents.sidebarOpen | async,\n 'has-scroll-bar': hasScrollBar,\n 'has-different-page-size': hasDifferentPageSize$ | async\n }\"\n [ngStyle]=\"{ width: width }\"\n>\n <mv-comments-summary\n *ngIf=\"showCommentSummary\"\n [title]=\"documentTitle || 'Comment Summary'\"\n [contentType]=\"contentType\"\n >\n </mv-comments-summary>\n\n <mv-confirm-action\n *ngIf=\"toolbarEvents.icp.leavingSession | async\"\n ></mv-confirm-action>\n\n <div id=\"mainContainer\">\n <mv-main-toolbar\n *ngIf=\"showToolbar\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableICP]=\"enableICP\"\n [enableRedactions]=\"enableRedactions\"\n [contentType]=\"contentType\"\n >\n </mv-main-toolbar>\n <mv-redaction-toolbar\n [showRedactSearch]=\"enableRedactSearch\"\n *ngIf=\"toolbarEvents.redactionMode | async\"\n ></mv-redaction-toolbar>\n <mv-icp-toolbar *ngIf=\"toolbarEvents.icp.enabled | async\"></mv-icp-toolbar>\n\n <div #viewerRef>\n <mv-conversion-viewer\n *ngIf=\"convertibleContent\"\n (documentTitle)=\"onDocumentTitleChange($event)\"\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (viewerException)=\"onLoadException($event)\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableRedactions]=\"enableRedactions\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [originalUrl]=\"url\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n mvRotationPersist\n >\n </mv-conversion-viewer>\n <mv-pdf-viewer\n *ngIf=\"contentType === 'pdf'\"\n #pdfViewer\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (pdfViewerException)=\"onLoadException($event)\"\n (documentTitle)=\"onDocumentTitleChange($event)\"\n [url]=\"url\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableRedactions]=\"enableRedactions\"\n [enableICP]=\"enableICP\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n [caseId]=\"caseId\"\n mvRotationPersist\n >\n </mv-pdf-viewer>\n <mv-image-viewer\n *ngIf=\"contentType === 'image'\"\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (imageViewerException)=\"onLoadException($event)\"\n [url]=\"url\"\n [enableAnnotations]=\"enableAnnotations\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n mvRotationPersist\n >\n </mv-image-viewer>\n <mv-multimedia-player\n *ngIf=\"multimediaContent\"\n [multimediaOn]=\"multimediaPlayerEnabled\"\n [url]=\"url\"\n [downloadFileName]=\"downloadFileName\"\n (loadStatus)=\"onMediaLoad($event)\"\n >\n </mv-multimedia-player>\n <mv-unsupported-viewer\n *ngIf=\"unsupportedContent\"\n [url]=\"url\"\n [typeException]=\"typeException\"\n [downloadFileName]=\"downloadFileName\"\n (loadStatus)=\"onMediaLoad($event)\"\n (unsupportedViewerException)=\"onLoadException($event)\"\n >\n </mv-unsupported-viewer>\n </div>\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: MainToolbarComponent, selector: "mv-main-toolbar", inputs: ["enableAnnotations", "enableRedactions", "enableICP", "contentType"] }, { kind: "component", type: RedactionToolbarComponent, selector: "mv-redaction-toolbar", inputs: ["showRedactSearch"] }, { kind: "component", type: IcpToolbarComponent, selector: "mv-icp-toolbar" }, { kind: "component", type: CommentsSummaryComponent, selector: "mv-comments-summary", inputs: ["title", "contentType"] }, { kind: "component", type: PdfViewerComponent, selector: "mv-pdf-viewer", inputs: ["downloadUrl", "url", "downloadFileName", "enableAnnotations", "enableRedactions", "enableICP", "annotationSet", "enableRedactSearch", "height", "caseId", "searchBarHidden"], outputs: ["mediaLoadStatus", "pdfViewerException", "documentTitle"] }, { kind: "component", type: ImageViewerComponent, selector: "mv-image-viewer", inputs: ["url", "downloadFileName", "enableAnnotations", "annotationSet", "height"], outputs: ["mediaLoadStatus", "imageViewerException"] }, { kind: "component", type: UnsupportedViewerComponent, selector: "mv-unsupported-viewer", inputs: ["url", "downloadFileName", "typeException"], outputs: ["loadStatus", "unsupportedViewerException"] }, { kind: "component", type: MultimediaPlayerComponent, selector: "mv-multimedia-player", inputs: ["url", "downloadFileName", "multimediaOn"], outputs: ["loadStatus"] }, { kind: "component", type: ConvertibleContentViewerComponent, selector: "mv-conversion-viewer", inputs: ["originalUrl", "downloadFileName", "height", "enableAnnotations", "enableRedactions", "annotationSet"], outputs: ["mediaLoadStatus", "viewerException", "documentTitle"] }, { kind: "directive", type: RotationPersistDirective, selector: "[mvRotationPersist]" }, { kind: "component", type: ConfirmActionDialogComponent, selector: "mv-confirm-action" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
6117
+ /** @nocollapse */ MediaViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MediaViewerComponent, selector: "mv-media-viewer", inputs: { url: "url", downloadFileName: "downloadFileName", contentType: "contentType", showToolbar: "showToolbar", toolbarButtonOverrides: "toolbarButtonOverrides", height: "height", width: "width", enableAnnotations: "enableAnnotations", annotationApiUrl: "annotationApiUrl", enableRedactions: "enableRedactions", enableICP: "enableICP", multimediaPlayerEnabled: "multimediaPlayerEnabled", enableRedactSearch: "enableRedactSearch", caseId: "caseId" }, outputs: { mediaLoadStatus: "mediaLoadStatus", viewerException: "viewerException", toolbarEventsOutput: "toolbarEventsOutput", unsavedChanges: "unsavedChanges" }, viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["viewerRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n id=\"outerContainer\"\n [ngClass]=\"{\n 'has-redact-bar': toolbarEvents.redactionMode | async,\n 'icp-mode': toolbarEvents.icp.enabled | async,\n 'is-redaction-preview': toolbarEvents.redactionPreview | async,\n sidebarOpen: toolbarEvents.sidebarOpen | async,\n 'has-scroll-bar': hasScrollBar,\n 'has-different-page-size': hasDifferentPageSize$ | async\n }\"\n [ngStyle]=\"{ width: width }\"\n>\n <mv-comments-summary\n *ngIf=\"showCommentSummary\"\n [title]=\"documentTitle || 'Comment Summary'\"\n [contentType]=\"contentType\"\n >\n </mv-comments-summary>\n\n <mv-confirm-action\n *ngIf=\"toolbarEvents.icp.leavingSession | async\"\n ></mv-confirm-action>\n\n <div id=\"mainContainer\">\n <mv-main-toolbar\n *ngIf=\"showToolbar\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableICP]=\"enableICP\"\n [enableRedactions]=\"enableRedactions\"\n [contentType]=\"contentType\"\n >\n </mv-main-toolbar>\n <mv-redaction-toolbar\n [showRedactSearch]=\"enableRedactSearch\"\n *ngIf=\"toolbarEvents.redactionMode | async\"\n ></mv-redaction-toolbar>\n <mv-highlight-toolbar\n *ngIf=\"toolbarEvents.highlightToolbarSubject | async\"\n ></mv-highlight-toolbar>\n <mv-icp-toolbar *ngIf=\"toolbarEvents.icp.enabled | async\"></mv-icp-toolbar>\n\n <div #viewerRef>\n <mv-conversion-viewer\n *ngIf=\"convertibleContent\"\n (documentTitle)=\"onDocumentTitleChange($event)\"\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (viewerException)=\"onLoadException($event)\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableRedactions]=\"enableRedactions\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [originalUrl]=\"url\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n mvRotationPersist\n >\n </mv-conversion-viewer>\n <mv-pdf-viewer\n *ngIf=\"contentType === 'pdf'\"\n #pdfViewer\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (pdfViewerException)=\"onLoadException($event)\"\n (documentTitle)=\"onDocumentTitleChange($event)\"\n [url]=\"url\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableRedactions]=\"enableRedactions\"\n [enableICP]=\"enableICP\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n [caseId]=\"caseId\"\n mvRotationPersist\n >\n </mv-pdf-viewer>\n <mv-image-viewer\n *ngIf=\"contentType === 'image'\"\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (imageViewerException)=\"onLoadException($event)\"\n [url]=\"url\"\n [enableAnnotations]=\"enableAnnotations\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n mvRotationPersist\n >\n </mv-image-viewer>\n <mv-multimedia-player\n *ngIf=\"multimediaContent\"\n [multimediaOn]=\"multimediaPlayerEnabled\"\n [url]=\"url\"\n [downloadFileName]=\"downloadFileName\"\n (loadStatus)=\"onMediaLoad($event)\"\n >\n </mv-multimedia-player>\n <mv-unsupported-viewer\n *ngIf=\"unsupportedContent\"\n [url]=\"url\"\n [typeException]=\"typeException\"\n [downloadFileName]=\"downloadFileName\"\n (loadStatus)=\"onMediaLoad($event)\"\n (unsupportedViewerException)=\"onLoadException($event)\"\n >\n </mv-unsupported-viewer>\n </div>\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: MainToolbarComponent, selector: "mv-main-toolbar", inputs: ["enableAnnotations", "enableRedactions", "enableICP", "contentType"] }, { kind: "component", type: RedactionToolbarComponent, selector: "mv-redaction-toolbar", inputs: ["showRedactSearch"] }, { kind: "component", type: IcpToolbarComponent, selector: "mv-icp-toolbar" }, { kind: "component", type: HighlightToolbarComponent, selector: "mv-highlight-toolbar" }, { kind: "component", type: CommentsSummaryComponent, selector: "mv-comments-summary", inputs: ["title", "contentType"] }, { kind: "component", type: PdfViewerComponent, selector: "mv-pdf-viewer", inputs: ["downloadUrl", "url", "downloadFileName", "enableAnnotations", "enableRedactions", "enableICP", "annotationSet", "enableRedactSearch", "height", "caseId", "searchBarHidden"], outputs: ["mediaLoadStatus", "pdfViewerException", "documentTitle"] }, { kind: "component", type: ImageViewerComponent, selector: "mv-image-viewer", inputs: ["url", "downloadFileName", "enableAnnotations", "annotationSet", "height"], outputs: ["mediaLoadStatus", "imageViewerException"] }, { kind: "component", type: UnsupportedViewerComponent, selector: "mv-unsupported-viewer", inputs: ["url", "downloadFileName", "typeException"], outputs: ["loadStatus", "unsupportedViewerException"] }, { kind: "component", type: MultimediaPlayerComponent, selector: "mv-multimedia-player", inputs: ["url", "downloadFileName", "multimediaOn"], outputs: ["loadStatus"] }, { kind: "component", type: ConvertibleContentViewerComponent, selector: "mv-conversion-viewer", inputs: ["originalUrl", "downloadFileName", "height", "enableAnnotations", "enableRedactions", "annotationSet"], outputs: ["mediaLoadStatus", "viewerException", "documentTitle"] }, { kind: "directive", type: RotationPersistDirective, selector: "[mvRotationPersist]" }, { kind: "component", type: ConfirmActionDialogComponent, selector: "mv-confirm-action" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
5965
6118
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MediaViewerComponent, decorators: [{
5966
6119
  type: Component,
5967
- args: [{ selector: 'mv-media-viewer', encapsulation: ViewEncapsulation.None, template: "<div\n id=\"outerContainer\"\n [ngClass]=\"{\n 'has-redact-bar': toolbarEvents.redactionMode | async,\n 'icp-mode': toolbarEvents.icp.enabled | async,\n 'is-redaction-preview': toolbarEvents.redactionPreview | async,\n sidebarOpen: toolbarEvents.sidebarOpen | async,\n 'has-scroll-bar': hasScrollBar,\n 'has-different-page-size': hasDifferentPageSize$ | async\n }\"\n [ngStyle]=\"{ width: width }\"\n>\n <mv-comments-summary\n *ngIf=\"showCommentSummary\"\n [title]=\"documentTitle || 'Comment Summary'\"\n [contentType]=\"contentType\"\n >\n </mv-comments-summary>\n\n <mv-confirm-action\n *ngIf=\"toolbarEvents.icp.leavingSession | async\"\n ></mv-confirm-action>\n\n <div id=\"mainContainer\">\n <mv-main-toolbar\n *ngIf=\"showToolbar\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableICP]=\"enableICP\"\n [enableRedactions]=\"enableRedactions\"\n [contentType]=\"contentType\"\n >\n </mv-main-toolbar>\n <mv-redaction-toolbar\n [showRedactSearch]=\"enableRedactSearch\"\n *ngIf=\"toolbarEvents.redactionMode | async\"\n ></mv-redaction-toolbar>\n <mv-icp-toolbar *ngIf=\"toolbarEvents.icp.enabled | async\"></mv-icp-toolbar>\n\n <div #viewerRef>\n <mv-conversion-viewer\n *ngIf=\"convertibleContent\"\n (documentTitle)=\"onDocumentTitleChange($event)\"\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (viewerException)=\"onLoadException($event)\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableRedactions]=\"enableRedactions\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [originalUrl]=\"url\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n mvRotationPersist\n >\n </mv-conversion-viewer>\n <mv-pdf-viewer\n *ngIf=\"contentType === 'pdf'\"\n #pdfViewer\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (pdfViewerException)=\"onLoadException($event)\"\n (documentTitle)=\"onDocumentTitleChange($event)\"\n [url]=\"url\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableRedactions]=\"enableRedactions\"\n [enableICP]=\"enableICP\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n [caseId]=\"caseId\"\n mvRotationPersist\n >\n </mv-pdf-viewer>\n <mv-image-viewer\n *ngIf=\"contentType === 'image'\"\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (imageViewerException)=\"onLoadException($event)\"\n [url]=\"url\"\n [enableAnnotations]=\"enableAnnotations\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n mvRotationPersist\n >\n </mv-image-viewer>\n <mv-multimedia-player\n *ngIf=\"multimediaContent\"\n [multimediaOn]=\"multimediaPlayerEnabled\"\n [url]=\"url\"\n [downloadFileName]=\"downloadFileName\"\n (loadStatus)=\"onMediaLoad($event)\"\n >\n </mv-multimedia-player>\n <mv-unsupported-viewer\n *ngIf=\"unsupportedContent\"\n [url]=\"url\"\n [typeException]=\"typeException\"\n [downloadFileName]=\"downloadFileName\"\n (loadStatus)=\"onMediaLoad($event)\"\n (unsupportedViewerException)=\"onLoadException($event)\"\n >\n </mv-unsupported-viewer>\n </div>\n </div>\n</div>\n" }]
6120
+ args: [{ selector: 'mv-media-viewer', encapsulation: ViewEncapsulation.None, template: "<div\n id=\"outerContainer\"\n [ngClass]=\"{\n 'has-redact-bar': toolbarEvents.redactionMode | async,\n 'icp-mode': toolbarEvents.icp.enabled | async,\n 'is-redaction-preview': toolbarEvents.redactionPreview | async,\n sidebarOpen: toolbarEvents.sidebarOpen | async,\n 'has-scroll-bar': hasScrollBar,\n 'has-different-page-size': hasDifferentPageSize$ | async\n }\"\n [ngStyle]=\"{ width: width }\"\n>\n <mv-comments-summary\n *ngIf=\"showCommentSummary\"\n [title]=\"documentTitle || 'Comment Summary'\"\n [contentType]=\"contentType\"\n >\n </mv-comments-summary>\n\n <mv-confirm-action\n *ngIf=\"toolbarEvents.icp.leavingSession | async\"\n ></mv-confirm-action>\n\n <div id=\"mainContainer\">\n <mv-main-toolbar\n *ngIf=\"showToolbar\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableICP]=\"enableICP\"\n [enableRedactions]=\"enableRedactions\"\n [contentType]=\"contentType\"\n >\n </mv-main-toolbar>\n <mv-redaction-toolbar\n [showRedactSearch]=\"enableRedactSearch\"\n *ngIf=\"toolbarEvents.redactionMode | async\"\n ></mv-redaction-toolbar>\n <mv-highlight-toolbar\n *ngIf=\"toolbarEvents.highlightToolbarSubject | async\"\n ></mv-highlight-toolbar>\n <mv-icp-toolbar *ngIf=\"toolbarEvents.icp.enabled | async\"></mv-icp-toolbar>\n\n <div #viewerRef>\n <mv-conversion-viewer\n *ngIf=\"convertibleContent\"\n (documentTitle)=\"onDocumentTitleChange($event)\"\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (viewerException)=\"onLoadException($event)\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableRedactions]=\"enableRedactions\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [originalUrl]=\"url\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n mvRotationPersist\n >\n </mv-conversion-viewer>\n <mv-pdf-viewer\n *ngIf=\"contentType === 'pdf'\"\n #pdfViewer\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (pdfViewerException)=\"onLoadException($event)\"\n (documentTitle)=\"onDocumentTitleChange($event)\"\n [url]=\"url\"\n [enableAnnotations]=\"enableAnnotations\"\n [enableRedactions]=\"enableRedactions\"\n [enableICP]=\"enableICP\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n [caseId]=\"caseId\"\n mvRotationPersist\n >\n </mv-pdf-viewer>\n <mv-image-viewer\n *ngIf=\"contentType === 'image'\"\n (mediaLoadStatus)=\"onMediaLoad($event)\"\n (imageViewerException)=\"onLoadException($event)\"\n [url]=\"url\"\n [enableAnnotations]=\"enableAnnotations\"\n [annotationSet]=\"enableAnnotations ? (annotationSet$ | async) : null\"\n [downloadFileName]=\"downloadFileName\"\n [height]=\"viewerHeight\"\n mvRotationPersist\n >\n </mv-image-viewer>\n <mv-multimedia-player\n *ngIf=\"multimediaContent\"\n [multimediaOn]=\"multimediaPlayerEnabled\"\n [url]=\"url\"\n [downloadFileName]=\"downloadFileName\"\n (loadStatus)=\"onMediaLoad($event)\"\n >\n </mv-multimedia-player>\n <mv-unsupported-viewer\n *ngIf=\"unsupportedContent\"\n [url]=\"url\"\n [typeException]=\"typeException\"\n [downloadFileName]=\"downloadFileName\"\n (loadStatus)=\"onMediaLoad($event)\"\n (unsupportedViewerException)=\"onLoadException($event)\"\n >\n </mv-unsupported-viewer>\n </div>\n </div>\n</div>\n" }]
5968
6121
  }], ctorParameters: function () { return [{ type: i1.Store }, { type: ToolbarButtonVisibilityService }, { type: ToolbarEventService }, { type: AnnotationApiService }, { type: CommentService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { viewerRef: [{
5969
6122
  type: ViewChild,
5970
6123
  args: ['viewerRef', { static: false }]
@@ -6246,8 +6399,8 @@ class AnnotationEffects {
6246
6399
  return of(new LoadAnnotationSetFail(error));
6247
6400
  }));
6248
6401
  })));
6249
- this.postAnnotation$ = createEffect(() => this.actions$.pipe(ofType(SAVE_ANNOTATION), map((action) => action.payload), exhaustMap((annotation) => {
6250
- return this.annotationApiService.postAnnotation(annotation).pipe(map(annotations => {
6402
+ this.postAnnotation$ = createEffect(() => this.actions$.pipe(ofType(SAVE_ANNOTATION), concatMap((action) => {
6403
+ return this.annotationApiService.postAnnotation(action.payload).pipe(map(annotations => {
6251
6404
  return new SaveAnnotationSuccess(annotations);
6252
6405
  }), catchError(error => {
6253
6406
  return of(new LoadAnnotationSetFail(error));
@@ -6260,6 +6413,13 @@ class AnnotationEffects {
6260
6413
  return of(new DeleteAnnotationFail(error));
6261
6414
  }));
6262
6415
  })));
6416
+ this.saveAnnotationSet$ = createEffect(() => this.actions$.pipe(ofType(SAVE_ANNOTATION_SET), map((action) => action.payload), switchMap((annotationSet) => {
6417
+ return this.annotationApiService.postAnnotationSet(annotationSet).pipe(map(res => {
6418
+ return new SaveAnnotationSetSuccess(res);
6419
+ }), catchError(error => {
6420
+ return of(new SaveAnnotationSetFail(error));
6421
+ }));
6422
+ })));
6263
6423
  }
6264
6424
  }
6265
6425
  /** @nocollapse */ AnnotationEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AnnotationEffects, deps: [{ token: i1$2.Actions }, { token: AnnotationApiService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -6616,5 +6776,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
6616
6776
  * Generated bundle index. Do not edit.
6617
6777
  */
6618
6778
 
6619
- export { ADD_OR_EDIT_COMMENT, APPLY_COMMENT_SUMMARY_FILTER, AddOrEditComment, AnnotationApiService, AnnotationEffects, AnnotationSetComponent, AnnotationViewComponent, AnnotationsModule, ApplyCommentSymmaryFilter, BoxHighlightCreateComponent, CLEAR_COMMENT_SUMMARY_FILTER, ClearCommentSummaryFilters, CommentFilterComponent, CommentSearchComponent, CommentSetComponent, CommentSetHeaderComponent, CommentsSummaryComponent, DELETE_ANNOTATION, DELETE_ANNOTATION_FAIL, DELETE_ANNOTATION_SUCCESS, DeleteAnnotation, DeleteAnnotationFail, DeleteAnnotationSuccess, FilterPipe, IcpToolbarComponent, LOAD_ANNOTATION_SET, LOAD_ANNOTATION_SET_FAIL, LOAD_ANNOTATION_SET_SUCCESS, LoadAnnotationSet, LoadAnnotationSetFail, LoadAnnotationSetSucess, MainToolbarComponent, MediaViewerComponent, MediaViewerModule, MetadataLayerComponent, MomentDatePipe, RedactionSearchBarComponent, RedactionToolbarComponent, ResponseType, SAVE_ANNOTATION, SAVE_ANNOTATION_FAIL, SAVE_ANNOTATION_SUCCESS, SEARCH_COMMENT, SELECT_ANNOTATION, SaveAnnotation, SaveAnnotationFail, SaveAnnotationSuccess, SearchBarComponent, SearchComment, SelectedAnnotation, TagsComponent, ToolbarButtonVisibilityService, ToolbarEventService, ToolbarModule, UnsnakePipe, ViewerException, commentSearchQ, getAnnoEnt, getAnnoPageEnt, getAnnoPerPage, getAnnoSet, getAnnotationEntities, getAnnotationSet, getAnnotationsSetState, getCommentEntities, getCommentEnts, getCommentSummary, getCommentSummaryFilters, getCommentsArray, getComponentSearchQueries, getComponentSearchText, getDocumentIdSetId, getFilteredAnnotations, getPageEntities, getSelectedAnno, getSelectedAnnotation, getSet, getSummaryFilters, initialState, reducer };
6779
+ export { ADD_OR_EDIT_COMMENT, APPLY_COMMENT_SUMMARY_FILTER, AddOrEditComment, AnnotationApiService, AnnotationEffects, AnnotationSetComponent, AnnotationViewComponent, AnnotationsModule, ApplyCommentSymmaryFilter, BoxHighlightCreateComponent, CLEAR_COMMENT_SUMMARY_FILTER, ClearCommentSummaryFilters, CommentFilterComponent, CommentSearchComponent, CommentSetComponent, CommentSetHeaderComponent, CommentsSummaryComponent, DELETE_ANNOTATION, DELETE_ANNOTATION_FAIL, DELETE_ANNOTATION_SUCCESS, DeleteAnnotation, DeleteAnnotationFail, DeleteAnnotationSuccess, FilterPipe, HighlightToolbarComponent, IcpToolbarComponent, LOAD_ANNOTATION_SET, LOAD_ANNOTATION_SET_FAIL, LOAD_ANNOTATION_SET_SUCCESS, LoadAnnotationSet, LoadAnnotationSetFail, LoadAnnotationSetSucess, MainToolbarComponent, MediaViewerComponent, MediaViewerModule, MetadataLayerComponent, MomentDatePipe, RedactionSearchBarComponent, RedactionToolbarComponent, ResponseType, SAVE_ANNOTATION, SAVE_ANNOTATION_FAIL, SAVE_ANNOTATION_SET, SAVE_ANNOTATION_SET_FAIL, SAVE_ANNOTATION_SET_SUCCESS, SAVE_ANNOTATION_SUCCESS, SEARCH_COMMENT, SELECT_ANNOTATION, SaveAnnotation, SaveAnnotationFail, SaveAnnotationSet, SaveAnnotationSetFail, SaveAnnotationSetSuccess, SaveAnnotationSuccess, SearchBarComponent, SearchComment, SelectedAnnotation, TagsComponent, ToolbarButtonVisibilityService, ToolbarEventService, ToolbarModule, UnsnakePipe, ViewerException, commentSearchQ, getAnnoEnt, getAnnoPageEnt, getAnnoPerPage, getAnnoSet, getAnnotationEntities, getAnnotationSet, getAnnotationsSetState, getCommentEntities, getCommentEnts, getCommentSummary, getCommentSummaryFilters, getCommentsArray, getComponentSearchQueries, getComponentSearchText, getDocumentIdSetId, getFilteredAnnotations, getPageEntities, getSelectedAnno, getSelectedAnnotation, getSet, getSummaryFilters, initialState, reducer };
6620
6780
  //# sourceMappingURL=hmcts-media-viewer.mjs.map