@hmcts/ccd-case-ui-toolkit 7.0.31 → 7.0.32-add-present-button-to-case--viewer-file
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/esm2020/lib/app.config.mjs +2 -1
- package/esm2020/lib/shared/components/palette/case-file-view/case-file-view-field.component.mjs +21 -8
- package/esm2020/lib/shared/components/palette/yes-no/read-yes-no-field.component.mjs +3 -3
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +20 -9
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +19 -9
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/app.config.d.ts +4 -0
- package/lib/app.config.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts +8 -1
- package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1182,6 +1182,7 @@ var DisplayMode;
|
|
|
1182
1182
|
DisplayMode[DisplayMode["ICON"] = 1] = "ICON";
|
|
1183
1183
|
})(DisplayMode || (DisplayMode = {}));
|
|
1184
1184
|
|
|
1185
|
+
/* istanbul ignore file */
|
|
1185
1186
|
class AbstractAppConfig {
|
|
1186
1187
|
/**
|
|
1187
1188
|
* Dummy version replacing deprecated `getRemotePrintServiceUrl()`, to be removed in next major release
|
|
@@ -11287,7 +11288,7 @@ function CaseFileViewFieldComponent_div_2_ng_container_8_Template(rf, ctx) { if
|
|
|
11287
11288
|
} if (rf & 2) {
|
|
11288
11289
|
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
11289
11290
|
i0.ɵɵadvance(1);
|
|
11290
|
-
i0.ɵɵproperty("url", ctx_r5.currentDocument.document_binary_url)("downloadFileName", ctx_r5.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r5.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh");
|
|
11291
|
+
i0.ɵɵproperty("url", ctx_r5.currentDocument.document_binary_url)("downloadFileName", ctx_r5.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r5.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh")("enableICP", ctx_r5.isIcpEnabled());
|
|
11291
11292
|
} }
|
|
11292
11293
|
function CaseFileViewFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
11293
11294
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
@@ -11299,7 +11300,7 @@ function CaseFileViewFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
11299
11300
|
i0.ɵɵelementEnd()();
|
|
11300
11301
|
i0.ɵɵelement(6, "div", 16);
|
|
11301
11302
|
i0.ɵɵelementStart(7, "div", 17);
|
|
11302
|
-
i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_2_ng_container_8_Template, 2,
|
|
11303
|
+
i0.ɵɵtemplate(8, CaseFileViewFieldComponent_div_2_ng_container_8_Template, 2, 8, "ng-container", 0);
|
|
11303
11304
|
i0.ɵɵelementEnd()()();
|
|
11304
11305
|
} if (rf & 2) {
|
|
11305
11306
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
@@ -11309,16 +11310,20 @@ function CaseFileViewFieldComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
11309
11310
|
i0.ɵɵproperty("ngIf", ctx_r2.currentDocument);
|
|
11310
11311
|
} }
|
|
11311
11312
|
class CaseFileViewFieldComponent {
|
|
11312
|
-
constructor(elementRef, route, caseFileViewService, documentManagementService, loadingService, sessionStorageService) {
|
|
11313
|
+
constructor(elementRef, route, caseFileViewService, documentManagementService, loadingService, sessionStorageService, caseNotifier, abstractConfig) {
|
|
11313
11314
|
this.elementRef = elementRef;
|
|
11314
11315
|
this.route = route;
|
|
11315
11316
|
this.caseFileViewService = caseFileViewService;
|
|
11316
11317
|
this.documentManagementService = documentManagementService;
|
|
11317
11318
|
this.loadingService = loadingService;
|
|
11318
11319
|
this.sessionStorageService = sessionStorageService;
|
|
11320
|
+
this.caseNotifier = caseNotifier;
|
|
11321
|
+
this.abstractConfig = abstractConfig;
|
|
11319
11322
|
this.allowMoving = true;
|
|
11320
11323
|
this.getCategoriesAndDocumentsError = false;
|
|
11321
11324
|
this.errorMessages = [];
|
|
11325
|
+
this.icp_jurisdictions = [];
|
|
11326
|
+
this.icpEnabled = false;
|
|
11322
11327
|
}
|
|
11323
11328
|
ngOnInit() {
|
|
11324
11329
|
const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
|
|
@@ -11335,6 +11340,8 @@ class CaseFileViewFieldComponent {
|
|
|
11335
11340
|
const acls = this.caseField.acls.filter(acl => userInfo.roles.includes(acl.role));
|
|
11336
11341
|
// As there can be more than one intersecting role, if any acls are update: true
|
|
11337
11342
|
this.allowMoving = acls.some(acl => acl.update);
|
|
11343
|
+
this.icp_jurisdictions = this.abstractConfig.getIcpJurisdictions();
|
|
11344
|
+
this.icpEnabled = this.abstractConfig.getIcpEnable();
|
|
11338
11345
|
}
|
|
11339
11346
|
ngAfterViewInit() {
|
|
11340
11347
|
const slider = this.elementRef.nativeElement.querySelector('.slider');
|
|
@@ -11393,10 +11400,13 @@ class CaseFileViewFieldComponent {
|
|
|
11393
11400
|
this.categoriesAndDocumentsSubscription.unsubscribe();
|
|
11394
11401
|
}
|
|
11395
11402
|
}
|
|
11403
|
+
isIcpEnabled() {
|
|
11404
|
+
return this.icpEnabled && ((this.icp_jurisdictions?.length < 1) || this.icp_jurisdictions.includes(this.caseNotifier?.cachedCaseView?.case_type?.jurisdiction.id));
|
|
11405
|
+
}
|
|
11396
11406
|
}
|
|
11397
11407
|
CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
|
|
11398
|
-
CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseFileViewService), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(SessionStorageService)); };
|
|
11399
|
-
CaseFileViewFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 3, vars: 3, consts: [[4, "ngIf"], ["class", "govuk-grid-column-two-thirds", 4, "ngIf"], ["id", "case-file-view-field-errors", "data-module", "govuk-error-summary", 1, "govuk-error-summary", "govuk-!-margin-bottom-4"], ["role", "alert"], [1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0);"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
11408
|
+
CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseFileViewService), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
11409
|
+
CaseFileViewFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 3, vars: 3, consts: [[4, "ngIf"], ["class", "govuk-grid-column-two-thirds", 4, "ngIf"], ["id", "case-file-view-field-errors", "data-module", "govuk-error-summary", 1, "govuk-error-summary", "govuk-!-margin-bottom-4"], ["role", "alert"], [1, "govuk-error-summary__title"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [4, "ngFor", "ngForOf"], ["href", "javascript:void(0);"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height", "enableICP"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
11400
11410
|
i0.ɵɵtemplate(0, CaseFileViewFieldComponent_ng_container_0_Template, 8, 1, "ng-container", 0);
|
|
11401
11411
|
i0.ɵɵtemplate(1, CaseFileViewFieldComponent_div_1_Template, 5, 0, "div", 1);
|
|
11402
11412
|
i0.ɵɵtemplate(2, CaseFileViewFieldComponent_div_2_Template, 9, 3, "div", 0);
|
|
@@ -11409,8 +11419,8 @@ CaseFileViewFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
11409
11419
|
} }, styles: ["#case-file-view[_ngcontent-%COMP%]{display:flex;border:2px solid #C9C9C9;height:100vh;position:relative}#case-file-view[_ngcontent-%COMP%] .document-tree-container[_ngcontent-%COMP%]{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{width:.2%;background-color:#6b6b6b}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:hover, #case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:focus{cursor:col-resize}#case-file-view[_ngcontent-%COMP%] .media-viewer-container[_ngcontent-%COMP%]{background-color:#dee0e2;flex:1 1 0;overflow:hidden}"] });
|
|
11410
11420
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFieldComponent, [{
|
|
11411
11421
|
type: Component,
|
|
11412
|
-
args: [{ selector: 'ccd-case-file-view-field', template: "<ng-container *ngIf=\"errorMessages?.length\">\n <div\n id=\"case-file-view-field-errors\"\n class=\"govuk-error-summary govuk-!-margin-bottom-4\" data-module=\"govuk-error-summary\">\n <div role=\"alert\">\n <h2 class=\"govuk-error-summary__title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li *ngFor=\"let errorMessage of errorMessages\">\n <a href=\"javascript:void(0);\">{{ errorMessage }}</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</ng-container>\n\n<div *ngIf=\"getCategoriesAndDocumentsError\" class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Sorry, there is a problem with the service</h1>\n <p class=\"govuk-body\">Try again later.</p>\n</div>\n<div *ngIf=\"!getCategoriesAndDocumentsError\">\n <h2 class=\"govuk-heading-l\">Case file</h2>\n <div class=\"govuk-form-group\" id=\"case-file-view\">\n <!-- Document tree -->\n <div class=\"document-tree-container\">\n <ccd-case-file-view-folder\n class=\"document-tree-container__tree\"\n [categoriesAndDocuments]=\"categoriesAndDocuments$\"\n (clickedDocument)=\"setMediaViewerFile($event); resetErrorMessages()\"\n (moveDocument)=\"moveDocument($event)\"\n [allowMoving]=\"allowMoving\"\n ></ccd-case-file-view-folder>\n </div>\n <!-- Slider -->\n <div class=\"slider\"></div>\n <!-- Media viewer -->\n <div class=\"media-viewer-container\">\n <ng-container *ngIf=\"currentDocument\">\n <mv-media-viewer [url]=\"currentDocument.document_binary_url\"\n [downloadFileName]=\"currentDocument.document_filename\"\n [showToolbar]=\"true\"\n [contentType]=\"currentDocument.content_type\"\n [enableAnnotations]=\"true\"\n [enableRedactions]=\"true\"\n [height]=\"'94.5vh'\">\n </mv-media-viewer>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["#case-file-view{display:flex;border:2px solid #C9C9C9;height:100vh;position:relative}#case-file-view .document-tree-container{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view .slider{width:.2%;background-color:#6b6b6b}#case-file-view .slider:hover,#case-file-view .slider:focus{cursor:col-resize}#case-file-view .media-viewer-container{background-color:#dee0e2;flex:1 1 0;overflow:hidden}\n"] }]
|
|
11413
|
-
}], function () { return [{ type: i0.ElementRef }, { type: i1$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }, { type: SessionStorageService }]; }, null); })();
|
|
11422
|
+
args: [{ selector: 'ccd-case-file-view-field', template: "<ng-container *ngIf=\"errorMessages?.length\">\n <div\n id=\"case-file-view-field-errors\"\n class=\"govuk-error-summary govuk-!-margin-bottom-4\" data-module=\"govuk-error-summary\">\n <div role=\"alert\">\n <h2 class=\"govuk-error-summary__title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li *ngFor=\"let errorMessage of errorMessages\">\n <a href=\"javascript:void(0);\">{{ errorMessage }}</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</ng-container>\n\n<div *ngIf=\"getCategoriesAndDocumentsError\" class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Sorry, there is a problem with the service</h1>\n <p class=\"govuk-body\">Try again later.</p>\n</div>\n<div *ngIf=\"!getCategoriesAndDocumentsError\">\n <h2 class=\"govuk-heading-l\">Case file</h2>\n <div class=\"govuk-form-group\" id=\"case-file-view\">\n <!-- Document tree -->\n <div class=\"document-tree-container\">\n <ccd-case-file-view-folder\n class=\"document-tree-container__tree\"\n [categoriesAndDocuments]=\"categoriesAndDocuments$\"\n (clickedDocument)=\"setMediaViewerFile($event); resetErrorMessages()\"\n (moveDocument)=\"moveDocument($event)\"\n [allowMoving]=\"allowMoving\"\n ></ccd-case-file-view-folder>\n </div>\n <!-- Slider -->\n <div class=\"slider\"></div>\n <!-- Media viewer -->\n <div class=\"media-viewer-container\">\n <ng-container *ngIf=\"currentDocument\">\n <mv-media-viewer [url]=\"currentDocument.document_binary_url\"\n [downloadFileName]=\"currentDocument.document_filename\"\n [showToolbar]=\"true\"\n [contentType]=\"currentDocument.content_type\"\n [enableAnnotations]=\"true\"\n [enableRedactions]=\"true\"\n [height]=\"'94.5vh'\"\n [enableICP]=\"isIcpEnabled()\">\n </mv-media-viewer>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["#case-file-view{display:flex;border:2px solid #C9C9C9;height:100vh;position:relative}#case-file-view .document-tree-container{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view .slider{width:.2%;background-color:#6b6b6b}#case-file-view .slider:hover,#case-file-view .slider:focus{cursor:col-resize}#case-file-view .media-viewer-container{background-color:#dee0e2;flex:1 1 0;overflow:hidden}\n"] }]
|
|
11423
|
+
}], function () { return [{ type: i0.ElementRef }, { type: i1$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }]; }, null); })();
|
|
11414
11424
|
|
|
11415
11425
|
class CaseFlagStateService {
|
|
11416
11426
|
constructor() {
|
|
@@ -20439,13 +20449,13 @@ ReadYesNoFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Rea
|
|
|
20439
20449
|
i0.ɵɵelementEnd();
|
|
20440
20450
|
} if (rf & 2) {
|
|
20441
20451
|
i0.ɵɵadvance(1);
|
|
20442
|
-
i0.ɵɵtextInterpolate(ctx.formattedValue ? i0.ɵɵpipeBind3(2, 1, ctx.
|
|
20452
|
+
i0.ɵɵtextInterpolate(ctx.formattedValue ? i0.ɵɵpipeBind3(2, 1, ctx.formattedValue, null, ctx.formattedValue) : null);
|
|
20443
20453
|
} }, dependencies: [i1.RpxTranslatePipe], encapsulation: 2 });
|
|
20444
20454
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadYesNoFieldComponent, [{
|
|
20445
20455
|
type: Component,
|
|
20446
20456
|
args: [{
|
|
20447
20457
|
selector: 'ccd-read-yes-no-field',
|
|
20448
|
-
template: `<span class="text-16">{{formattedValue ? (
|
|
20458
|
+
template: `<span class="text-16">{{formattedValue ? (formattedValue | rpxTranslate : null : formattedValue) : null}}</span>`
|
|
20449
20459
|
}]
|
|
20450
20460
|
}], function () { return [{ type: YesNoService }]; }, null); })();
|
|
20451
20461
|
|