@hmcts/media-viewer 2.9.3 → 2.9.4-RC.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/images/icon-bookmarks-custom.png +0 -0
- package/assets/images/icon-bookmarks-position.png +0 -0
- package/assets/images/toolbarButton-bookmarkDark.png +0 -0
- package/assets/sass/comment-set-panel.scss +1 -0
- package/assets/sass/comment.scss +4 -6
- package/assets/sass/image-viewer.scss +2 -1
- package/assets/sass/pdf-viewer.scss +4 -0
- package/assets/sass/toolbar/buttons.scss +24 -0
- package/assets/sass/toolbar/main-toolbar.scss +20 -7
- package/assets/sass/toolbar/side-bar.scss +17 -17
- package/bundles/hmcts-media-viewer.umd.js +744 -324
- package/bundles/hmcts-media-viewer.umd.js.map +1 -1
- package/bundles/hmcts-media-viewer.umd.min.js +1 -1
- package/bundles/hmcts-media-viewer.umd.min.js.map +1 -1
- package/esm2015/hmcts-media-viewer.js +53 -52
- package/esm2015/lib/annotations/annotation-set/annotation-create/box-highlight-create/box-highlight-create.component.js +2 -2
- package/esm2015/lib/annotations/annotation-set/annotation-create/highlight-create/highlight-create.directive.js +2 -2
- package/esm2015/lib/annotations/annotation-set/annotation-create/highlight-create/highlight-create.service.js +2 -2
- package/esm2015/lib/annotations/annotation-set/annotation-view/annotation-view.component.js +1 -1
- package/esm2015/lib/annotations/annotation-set/metadata-layer/metadata-layer.component.js +3 -2
- package/esm2015/lib/annotations/annotations.module.js +3 -1
- package/esm2015/lib/annotations/comment-set/comment/comment.component.js +3 -2
- package/esm2015/lib/annotations/comment-set/comment/comment.service.js +6 -2
- package/esm2015/lib/annotations/comment-set/comment-set-header/comment-set-header.component.js +13 -2
- package/esm2015/lib/media-viewer.component.js +4 -2
- package/esm2015/lib/print.service.js +4 -2
- package/esm2015/lib/redaction/components/redaction.component.js +2 -2
- package/esm2015/lib/redaction/services/redaction-api.service.js +7 -1
- package/esm2015/lib/redaction/services/redaction.model.js +1 -1
- package/esm2015/lib/store/actions/redaction.actions.js +22 -1
- package/esm2015/lib/store/effects/redaction.effects.js +18 -4
- package/esm2015/lib/store/reducers/bookmarks.reducer.js +3 -2
- package/esm2015/lib/store/reducers/redaction.reducer.js +9 -1
- package/esm2015/lib/store/selectors/bookmark.selectors.js +2 -2
- package/esm2015/lib/toolbar/main-toolbar/main-toolbar.component.js +19 -4
- package/esm2015/lib/toolbar/redaction-search-bar/redaction-search-bar.component.js +201 -0
- package/esm2015/lib/toolbar/redaction-search-bar/redaction-search.model.js +2 -0
- package/esm2015/lib/toolbar/redaction-toolbar/redaction-toolbar.component.js +18 -6
- package/esm2015/lib/toolbar/toolbar-event.service.js +9 -1
- package/esm2015/lib/toolbar/toolbar.module.js +6 -3
- package/esm2015/lib/viewers/image-viewer/image-viewer.component.js +2 -2
- package/esm2015/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.js +15 -4
- package/esm2015/lib/viewers/pdf-viewer/pdf-viewer.component.js +3 -2
- package/esm2015/lib/viewers/pdf-viewer/side-bar/bookmarks/bookmarks.component.js +70 -5
- package/esm2015/lib/viewers/pdf-viewer/side-bar/outline-item/outline-item.component.js +4 -1
- package/esm2015/lib/viewers/pdf-viewer/side-bar/side-bar.component.js +24 -19
- package/fesm2015/hmcts-media-viewer.js +586 -204
- package/fesm2015/hmcts-media-viewer.js.map +1 -1
- package/hmcts-media-viewer.d.ts +56 -55
- package/hmcts-media-viewer.d.ts.map +1 -1
- package/hmcts-media-viewer.metadata.json +1 -1
- package/lib/annotations/annotation-set/annotation-create/box-highlight-create/box-highlight-create.component.d.ts.map +1 -1
- package/lib/annotations/annotation-set/annotation-create/highlight-create/highlight-create.service.d.ts.map +1 -1
- package/lib/annotations/annotation-set/annotation-view/annotation-view.component.d.ts.map +1 -1
- package/lib/annotations/annotation-set/metadata-layer/metadata-layer.component.d.ts.map +1 -1
- package/lib/annotations/annotations.module.d.ts.map +1 -1
- package/lib/annotations/comment-set/comment/comment.component.d.ts +2 -0
- package/lib/annotations/comment-set/comment/comment.component.d.ts.map +1 -1
- package/lib/annotations/comment-set/comment/comment.service.d.ts +3 -1
- package/lib/annotations/comment-set/comment/comment.service.d.ts.map +1 -1
- package/lib/annotations/comment-set/comment-set-header/comment-set-header.component.d.ts +4 -1
- package/lib/annotations/comment-set/comment-set-header/comment-set-header.component.d.ts.map +1 -1
- package/lib/media-viewer.component.d.ts +1 -0
- package/lib/media-viewer.component.d.ts.map +1 -1
- package/lib/media-viewer.module.ngfactory.d.ts.map +1 -1
- package/lib/print.service.d.ts.map +1 -1
- package/lib/redaction/components/redaction.component.d.ts.map +1 -1
- package/lib/redaction/services/redaction-api.service.d.ts +3 -1
- package/lib/redaction/services/redaction-api.service.d.ts.map +1 -1
- package/lib/redaction/services/redaction.model.d.ts +3 -0
- package/lib/redaction/services/redaction.model.d.ts.map +1 -1
- package/lib/store/actions/redaction.actions.d.ts +20 -2
- package/lib/store/actions/redaction.actions.d.ts.map +1 -1
- package/lib/store/effects/redaction.effects.d.ts +4 -1
- package/lib/store/effects/redaction.effects.d.ts.map +1 -1
- package/lib/store/reducers/bookmarks.reducer.d.ts.map +1 -1
- package/lib/store/reducers/redaction.reducer.d.ts.map +1 -1
- package/lib/store/selectors/annotation.selectors.d.ts +5 -5
- package/lib/store/selectors/redaction.selectors.d.ts +1 -1
- package/lib/store/selectors/tag.selectors.d.ts +2 -2
- package/lib/toolbar/main-toolbar/main-toolbar.component.d.ts +3 -1
- package/lib/toolbar/main-toolbar/main-toolbar.component.d.ts.map +1 -1
- package/lib/toolbar/redaction-search-bar/redaction-search-bar.component.d.ts +51 -0
- package/lib/toolbar/redaction-search-bar/redaction-search-bar.component.d.ts.map +1 -0
- package/lib/toolbar/redaction-search-bar/redaction-search-bar.component.ngfactory.d.ts.map +1 -0
- package/lib/toolbar/redaction-search-bar/redaction-search-bar.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/lib/toolbar/redaction-search-bar/redaction-search.model.d.ts +12 -0
- package/lib/toolbar/redaction-search-bar/redaction-search.model.d.ts.map +1 -0
- package/lib/toolbar/redaction-toolbar/redaction-toolbar.component.d.ts +4 -2
- package/lib/toolbar/redaction-toolbar/redaction-toolbar.component.d.ts.map +1 -1
- package/lib/toolbar/toolbar-event.service.d.ts +6 -0
- package/lib/toolbar/toolbar-event.service.d.ts.map +1 -1
- package/lib/toolbar/toolbar.module.d.ts.map +1 -1
- package/lib/toolbar/toolbar.module.ngfactory.d.ts.map +1 -1
- package/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.d.ts +1 -0
- package/lib/viewers/pdf-viewer/pdf-js/pdf-js-wrapper.d.ts.map +1 -1
- package/lib/viewers/pdf-viewer/pdf-viewer.component.d.ts +1 -0
- package/lib/viewers/pdf-viewer/pdf-viewer.component.d.ts.map +1 -1
- package/lib/viewers/pdf-viewer/side-bar/bookmarks/bookmarks.component.d.ts +17 -4
- package/lib/viewers/pdf-viewer/side-bar/bookmarks/bookmarks.component.d.ts.map +1 -1
- package/lib/viewers/pdf-viewer/side-bar/outline-item/outline-item.component.d.ts.map +1 -1
- package/lib/viewers/pdf-viewer/side-bar/side-bar.component.d.ts +7 -4
- package/lib/viewers/pdf-viewer/side-bar/side-bar.component.d.ts.map +1 -1
- package/package.json +5 -4
- package/hmcts-media-viewer-v2.9.3.tgz +0 -0
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
1
|
+
import { Component, Input, ViewChild } from '@angular/core';
|
|
2
2
|
import { select, Store } from '@ngrx/store';
|
|
3
3
|
import * as bookmarksSelectors from '../../../store/selectors/bookmark.selectors';
|
|
4
|
-
import {
|
|
5
|
-
import { take } from 'rxjs/operators';
|
|
6
|
-
import uuid from 'uuid';
|
|
4
|
+
import { LoadBookmarks } from '../../../store/actions/bookmark.actions';
|
|
7
5
|
import { ViewerEventService } from '../../viewer-event.service';
|
|
6
|
+
import { ToolbarEventService } from '../../../toolbar/toolbar-event.service';
|
|
7
|
+
import { BookmarksComponent } from './bookmarks/bookmarks.component';
|
|
8
8
|
export class SideBarComponent {
|
|
9
|
-
constructor(viewerEvents, store) {
|
|
9
|
+
constructor(viewerEvents, store, toolbarEvents) {
|
|
10
10
|
this.viewerEvents = viewerEvents;
|
|
11
11
|
this.store = store;
|
|
12
|
+
this.toolbarEvents = toolbarEvents;
|
|
12
13
|
this.selectedView = 'outline';
|
|
14
|
+
this.subscriptions = [];
|
|
13
15
|
}
|
|
14
16
|
ngOnInit() {
|
|
15
17
|
this.bookmarkNodes$ = this.store.pipe(select(bookmarksSelectors.getBookmarkNodes));
|
|
16
|
-
this
|
|
17
|
-
.subscribe(editable => this.selectedView = editable ? 'bookmarks' : this.selectedView);
|
|
18
|
+
this.subscriptions.push(this.store.pipe(select(bookmarksSelectors.getEditableBookmark))
|
|
19
|
+
.subscribe(editable => this.selectedView = editable ? 'bookmarks' : this.selectedView));
|
|
20
|
+
this.subscriptions.push(this.toolbarEvents.sidebarOutlineView.subscribe(toggle => {
|
|
21
|
+
this.selectedView = toggle ? 'outline' : 'bookmarks';
|
|
22
|
+
}));
|
|
18
23
|
}
|
|
19
24
|
ngOnChanges(changes) {
|
|
20
25
|
if (changes.url && this.url) {
|
|
@@ -22,7 +27,9 @@ export class SideBarComponent {
|
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
ngOnDestroy() {
|
|
25
|
-
this
|
|
30
|
+
if (this.subscriptions.length > 0) {
|
|
31
|
+
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
32
|
+
}
|
|
26
33
|
}
|
|
27
34
|
goToDestination(destination) {
|
|
28
35
|
this.viewerEvents.goToDestination(destination);
|
|
@@ -30,14 +37,10 @@ export class SideBarComponent {
|
|
|
30
37
|
toggleSidebarView(sidebarView) {
|
|
31
38
|
this.selectedView = sidebarView;
|
|
32
39
|
}
|
|
33
|
-
onAddBookmarkClick() {
|
|
34
|
-
this.toggleSidebarView('bookmarks');
|
|
35
|
-
this.store.pipe(select(bookmarksSelectors.getBookmarkInfo), take(1))
|
|
36
|
-
.subscribe((bookmarkInfo) => {
|
|
37
|
-
this.store.dispatch(new CreateBookmark(Object.assign(Object.assign({}, bookmarkInfo), { name: '', id: uuid() })));
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
40
|
isViewedItem(current, next) {
|
|
41
|
+
if (current.pageNumber === this.currentPageNumber) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
41
44
|
return next === undefined ? current.pageNumber <= this.currentPageNumber :
|
|
42
45
|
current.pageNumber <= this.currentPageNumber && (next.pageNumber > this.currentPageNumber);
|
|
43
46
|
}
|
|
@@ -48,13 +51,14 @@ export class SideBarComponent {
|
|
|
48
51
|
SideBarComponent.decorators = [
|
|
49
52
|
{ type: Component, args: [{
|
|
50
53
|
selector: 'mv-side-bar',
|
|
51
|
-
template: "<div id=\"toolbarSidebar\">\n <div class=\"splitToolbarButton toggled\">\n
|
|
54
|
+
template: "<div id=\"toolbarSidebar\">\n <div *ngIf=\"annotationsEnabled && selectedView == 'bookmarks'\"\n class=\"splitToolbarButton toggled\">\n <button id=\"sortBookmarkPosition\" class=\"splitToolbarButton left bookmark__sort__position\"\n (click)=\"bookmarks.sort(bookmarks.positionSort)\" title=\"Order by place in document\"></button>\n <button id=\"sortBookmarkCustom\" class=\"splitToolbarButton left bookmark__sort__custom\"\n (click)=\"bookmarks.sort(bookmarks.customSort)\" title=\"Order manually\"></button></div>\n <div class=\"splitToolbarButtonSeparator\"></div>\n <div *ngIf=\"annotationsEnabled && selectedView == 'bookmarks'\"\n class=\"splitToolbarButton right\">\n <button id=\"addBookmark\"\n class=\"toolbarButton addBookmark\"\n (click)=\"bookmarks.onAddBookmarkClick()\"\n title=\"Add bookmark\" tabindex=\"3\" data-l10n-id=\"addBookmark\">\n <span data-l10n-id=\"addBookmark_label\">Add bookmark</span>\n </button>\n </div>\n</div>\n<div id=\"sidebarContent\">\n <div id=\"outlineView\" class=\"outlineWithDeepNesting\">\n <div class=\"outlineItem\" *ngIf=\"selectedView === 'outline'\">\n <mv-outline-item *ngFor=\"let outlineItem of outline; index as i\"\n [outline]=\"outlineItem\"\n [currentPageNumber]=\"currentPageNumber\"\n [isCurrentSection]= \"isViewedItem(outlineItem, outline[i+1])\"\n [endPage]=\"findEndPage(outline[i+1])\"\n (navigationEvent)=\"goToDestination($event)\"></mv-outline-item>\n </div>\n <div *ngIf=\"annotationsEnabled && selectedView === 'bookmarks'\"\n id=\"bookmarkContainer\">\n <mv-bookmarks [bookmarkNodes]=\"bookmarkNodes$ | async\"\n [zoom]=\"zoom\" [rotate]=\"rotate\"\n (goToDestination)=\"goToDestination($event)\"></mv-bookmarks>\n </div>\n </div>\n</div>\n"
|
|
52
55
|
},] }
|
|
53
56
|
];
|
|
54
57
|
/** @nocollapse */
|
|
55
58
|
SideBarComponent.ctorParameters = () => [
|
|
56
59
|
{ type: ViewerEventService },
|
|
57
|
-
{ type: Store }
|
|
60
|
+
{ type: Store },
|
|
61
|
+
{ type: ToolbarEventService }
|
|
58
62
|
];
|
|
59
63
|
SideBarComponent.propDecorators = {
|
|
60
64
|
annotationsEnabled: [{ type: Input }],
|
|
@@ -62,6 +66,7 @@ SideBarComponent.propDecorators = {
|
|
|
62
66
|
url: [{ type: Input }],
|
|
63
67
|
zoom: [{ type: Input }],
|
|
64
68
|
rotate: [{ type: Input }],
|
|
65
|
-
currentPageNumber: [{ type: Input }]
|
|
69
|
+
currentPageNumber: [{ type: Input }],
|
|
70
|
+
bookmarks: [{ type: ViewChild, args: [BookmarksComponent,] }]
|
|
66
71
|
};
|
|
67
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
72
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2lkZS1iYXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbWVkaWEtdmlld2VyL3NyYy9saWIvdmlld2Vycy9wZGYt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