@hmcts/ccd-case-ui-toolkit 7.1.35-upper-case-file-ext → 7.1.36-docstore-v2-exclusion
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/esm2022/lib/app.config.mjs +2 -1
- package/esm2022/lib/shared/components/pagination/pagination.component.mjs +3 -3
- package/esm2022/lib/shared/components/palette/document/write-document-field.component.mjs +2 -2
- package/esm2022/lib/shared/services/document-management/document-management.service.mjs +17 -5
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +64 -53
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/app.config.d.ts +2 -0
- package/lib/app.config.d.ts.map +1 -1
- package/lib/shared/services/document-management/document-management.service.d.ts +3 -1
- package/lib/shared/services/document-management/document-management.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1274,6 +1274,7 @@ class CaseEditorConfig {
|
|
|
1274
1274
|
document_management_url_v2;
|
|
1275
1275
|
hrs_url;
|
|
1276
1276
|
document_management_secure_enabled;
|
|
1277
|
+
documentSecureModeCaseTypeExclusions;
|
|
1277
1278
|
login_url;
|
|
1278
1279
|
oauth2_client_id;
|
|
1279
1280
|
postcode_lookup_url;
|
|
@@ -6926,9 +6927,55 @@ class ReadCookieService {
|
|
|
6926
6927
|
args: [DOCUMENT]
|
|
6927
6928
|
}] }], null); })();
|
|
6928
6929
|
|
|
6930
|
+
class CaseNotifier {
|
|
6931
|
+
casesService;
|
|
6932
|
+
static CASE_NAME = 'caseNameHmctsInternal';
|
|
6933
|
+
static CASE_LOCATION = 'caseManagementLocation';
|
|
6934
|
+
caseViewSource = new BehaviorSubject(new CaseView());
|
|
6935
|
+
caseView = this.caseViewSource.asObservable();
|
|
6936
|
+
cachedCaseView;
|
|
6937
|
+
constructor(casesService) {
|
|
6938
|
+
this.casesService = casesService;
|
|
6939
|
+
}
|
|
6940
|
+
removeCachedCase() {
|
|
6941
|
+
this.cachedCaseView = null;
|
|
6942
|
+
}
|
|
6943
|
+
announceCase(c) {
|
|
6944
|
+
this.caseViewSource.next(c);
|
|
6945
|
+
}
|
|
6946
|
+
fetchAndRefresh(cid) {
|
|
6947
|
+
return this.casesService
|
|
6948
|
+
.getCaseViewV2(cid)
|
|
6949
|
+
.pipe(map(caseView => {
|
|
6950
|
+
this.cachedCaseView = plainToClassFromExist(new CaseView(), caseView);
|
|
6951
|
+
this.setBasicFields(this.cachedCaseView.tabs);
|
|
6952
|
+
this.announceCase(this.cachedCaseView);
|
|
6953
|
+
return this.cachedCaseView;
|
|
6954
|
+
}));
|
|
6955
|
+
}
|
|
6956
|
+
setBasicFields(tabs) {
|
|
6957
|
+
tabs.forEach((t) => {
|
|
6958
|
+
const caseName = t.fields.find(f => f.id === CaseNotifier.CASE_NAME);
|
|
6959
|
+
const caseLocation = t.fields.find(f => f.id === CaseNotifier.CASE_LOCATION);
|
|
6960
|
+
if (caseName || caseLocation) {
|
|
6961
|
+
this.cachedCaseView.basicFields = {
|
|
6962
|
+
caseNameHmctsInternal: caseName ? caseName.value : null,
|
|
6963
|
+
caseManagementLocation: caseLocation ? caseLocation.value : null
|
|
6964
|
+
};
|
|
6965
|
+
}
|
|
6966
|
+
});
|
|
6967
|
+
}
|
|
6968
|
+
static ɵfac = function CaseNotifier_Factory(t) { return new (t || CaseNotifier)(i0.ɵɵinject(CasesService)); };
|
|
6969
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseNotifier, factory: CaseNotifier.ɵfac });
|
|
6970
|
+
}
|
|
6971
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseNotifier, [{
|
|
6972
|
+
type: Injectable
|
|
6973
|
+
}], () => [{ type: CasesService }], null); })();
|
|
6974
|
+
|
|
6929
6975
|
class DocumentManagementService {
|
|
6930
6976
|
http;
|
|
6931
6977
|
appConfig;
|
|
6978
|
+
caseNotifierService;
|
|
6932
6979
|
static PDF = 'pdf';
|
|
6933
6980
|
static IMAGE = 'image';
|
|
6934
6981
|
static WORD = 'word';
|
|
@@ -6943,9 +6990,10 @@ class DocumentManagementService {
|
|
|
6943
6990
|
static wordList = ['DOC', 'DOCX', 'doc', 'docx'];
|
|
6944
6991
|
static excelList = ['XLS', 'XLSX', 'xls', 'xlsx'];
|
|
6945
6992
|
static powerpointList = ['PPT', 'PPTX', 'ppt', 'pptx'];
|
|
6946
|
-
constructor(http, appConfig) {
|
|
6993
|
+
constructor(http, appConfig, caseNotifierService) {
|
|
6947
6994
|
this.http = http;
|
|
6948
6995
|
this.appConfig = appConfig;
|
|
6996
|
+
this.caseNotifierService = caseNotifierService;
|
|
6949
6997
|
}
|
|
6950
6998
|
uploadFile(formData) {
|
|
6951
6999
|
const url = this.getDocStoreUrl();
|
|
@@ -7023,14 +7071,22 @@ class DocumentManagementService {
|
|
|
7023
7071
|
return documentBinaryUrl.replace(remoteDocumentManagementPattern, this.getDocStoreUrl());
|
|
7024
7072
|
}
|
|
7025
7073
|
getDocStoreUrl() {
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7074
|
+
let docStoreUrl = '';
|
|
7075
|
+
this.caseNotifierService.caseView.subscribe((caseDetails) => {
|
|
7076
|
+
const caseType = caseDetails.case_type.id;
|
|
7077
|
+
const documentSecureModeCaseTypeExclusions = this.appConfig.getDocumentSecureModeCaseTypeExclusions().split(',');
|
|
7078
|
+
const isDocumentOnExclusionList = documentSecureModeCaseTypeExclusions.includes(caseType);
|
|
7079
|
+
const documentSecureModeEnabled = this.appConfig.getDocumentSecureMode();
|
|
7080
|
+
docStoreUrl = (documentSecureModeEnabled && !isDocumentOnExclusionList) ? this.appConfig.getDocumentManagementUrlV2() : this.appConfig.getDocumentManagementUrl();
|
|
7081
|
+
}).unsubscribe();
|
|
7082
|
+
return docStoreUrl;
|
|
7083
|
+
}
|
|
7084
|
+
static ɵfac = function DocumentManagementService_Factory(t) { return new (t || DocumentManagementService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(CaseNotifier)); };
|
|
7029
7085
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: DocumentManagementService, factory: DocumentManagementService.ɵfac });
|
|
7030
7086
|
}
|
|
7031
7087
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DocumentManagementService, [{
|
|
7032
7088
|
type: Injectable
|
|
7033
|
-
}], () => [{ type: HttpService }, { type: AbstractAppConfig }], null); })();
|
|
7089
|
+
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: CaseNotifier }], null); })();
|
|
7034
7090
|
|
|
7035
7091
|
class ErrorNotifierService {
|
|
7036
7092
|
errorSource = new BehaviorSubject(null);
|
|
@@ -8736,51 +8792,6 @@ class CaseworkerService {
|
|
|
8736
8792
|
type: Injectable
|
|
8737
8793
|
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }], null); })();
|
|
8738
8794
|
|
|
8739
|
-
class CaseNotifier {
|
|
8740
|
-
casesService;
|
|
8741
|
-
static CASE_NAME = 'caseNameHmctsInternal';
|
|
8742
|
-
static CASE_LOCATION = 'caseManagementLocation';
|
|
8743
|
-
caseViewSource = new BehaviorSubject(new CaseView());
|
|
8744
|
-
caseView = this.caseViewSource.asObservable();
|
|
8745
|
-
cachedCaseView;
|
|
8746
|
-
constructor(casesService) {
|
|
8747
|
-
this.casesService = casesService;
|
|
8748
|
-
}
|
|
8749
|
-
removeCachedCase() {
|
|
8750
|
-
this.cachedCaseView = null;
|
|
8751
|
-
}
|
|
8752
|
-
announceCase(c) {
|
|
8753
|
-
this.caseViewSource.next(c);
|
|
8754
|
-
}
|
|
8755
|
-
fetchAndRefresh(cid) {
|
|
8756
|
-
return this.casesService
|
|
8757
|
-
.getCaseViewV2(cid)
|
|
8758
|
-
.pipe(map(caseView => {
|
|
8759
|
-
this.cachedCaseView = plainToClassFromExist(new CaseView(), caseView);
|
|
8760
|
-
this.setBasicFields(this.cachedCaseView.tabs);
|
|
8761
|
-
this.announceCase(this.cachedCaseView);
|
|
8762
|
-
return this.cachedCaseView;
|
|
8763
|
-
}));
|
|
8764
|
-
}
|
|
8765
|
-
setBasicFields(tabs) {
|
|
8766
|
-
tabs.forEach((t) => {
|
|
8767
|
-
const caseName = t.fields.find(f => f.id === CaseNotifier.CASE_NAME);
|
|
8768
|
-
const caseLocation = t.fields.find(f => f.id === CaseNotifier.CASE_LOCATION);
|
|
8769
|
-
if (caseName || caseLocation) {
|
|
8770
|
-
this.cachedCaseView.basicFields = {
|
|
8771
|
-
caseNameHmctsInternal: caseName ? caseName.value : null,
|
|
8772
|
-
caseManagementLocation: caseLocation ? caseLocation.value : null
|
|
8773
|
-
};
|
|
8774
|
-
}
|
|
8775
|
-
});
|
|
8776
|
-
}
|
|
8777
|
-
static ɵfac = function CaseNotifier_Factory(t) { return new (t || CaseNotifier)(i0.ɵɵinject(CasesService)); };
|
|
8778
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseNotifier, factory: CaseNotifier.ɵfac });
|
|
8779
|
-
}
|
|
8780
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseNotifier, [{
|
|
8781
|
-
type: Injectable
|
|
8782
|
-
}], () => [{ type: CasesService }], null); })();
|
|
8783
|
-
|
|
8784
8795
|
var Permissions;
|
|
8785
8796
|
(function (Permissions) {
|
|
8786
8797
|
Permissions["Own"] = "OWN";
|
|
@@ -14344,7 +14355,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14344
14355
|
fileChangeEvent(fileInput, allowedRegex) {
|
|
14345
14356
|
let fileTypeRegex;
|
|
14346
14357
|
if (allowedRegex) {
|
|
14347
|
-
fileTypeRegex = new RegExp(`(${allowedRegex.replace(/,/g, '|')})
|
|
14358
|
+
fileTypeRegex = new RegExp(`(${allowedRegex.replace(/,/g, '|')})`);
|
|
14348
14359
|
}
|
|
14349
14360
|
if (fileInput.target?.files[0] && !fileInput.target?.files[0]?.name?.match(fileTypeRegex)) {
|
|
14350
14361
|
this.invalidFileFormat();
|
|
@@ -30692,7 +30703,7 @@ class PaginationComponent {
|
|
|
30692
30703
|
this.pResponsive = coerceToBoolean(value);
|
|
30693
30704
|
}
|
|
30694
30705
|
static ɵfac = function PaginationComponent_Factory(t) { return new (t || PaginationComponent)(); };
|
|
30695
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["ccd-pagination"]], inputs: { visibilityLabel: "visibilityLabel", id: "id", maxSize: "maxSize", previousLabel: "previousLabel", nextLabel: "nextLabel", screenReaderPaginationLabel: "screenReaderPaginationLabel", screenReaderPageLabel: "screenReaderPageLabel", screenReaderCurrentLabel: "screenReaderCurrentLabel", directionLinks: "directionLinks", autoHide: "autoHide", responsive: "responsive" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection" }, decls: 5, vars: 6, consts: [["p", "paginationApi"], [3, "pageChange", "pageBoundsCorrection", "id", "maxSize"], ["role", "navigation"], ["class", "ngx-pagination",
|
|
30706
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["ccd-pagination"]], inputs: { visibilityLabel: "visibilityLabel", id: "id", maxSize: "maxSize", previousLabel: "previousLabel", nextLabel: "nextLabel", screenReaderPaginationLabel: "screenReaderPaginationLabel", screenReaderPageLabel: "screenReaderPageLabel", screenReaderCurrentLabel: "screenReaderCurrentLabel", directionLinks: "directionLinks", autoHide: "autoHide", responsive: "responsive" }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection" }, decls: 5, vars: 6, consts: [["p", "paginationApi"], [3, "pageChange", "pageBoundsCorrection", "id", "maxSize"], ["role", "navigation"], ["class", "ngx-pagination", 3, "responsive", 4, "ngIf"], [1, "ngx-pagination"], ["class", "pagination-previous", 3, "disabled", 4, "ngIf"], [1, "small-screen"], [3, "current", "ellipsis", 4, "ngFor", "ngForOf"], ["class", "pagination-next", 3, "disabled", 4, "ngIf"], [1, "pagination-previous"], ["tabindex", "0", 3, "keyup.enter", "click", 4, "ngIf"], [4, "ngIf"], ["tabindex", "0", 3, "keyup.enter", "click"], [1, "show-for-sr"], [1, "pagination-next"]], template: function PaginationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
30696
30707
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
30697
30708
|
i0.ɵɵelementStart(0, "pagination-template", 1, 0);
|
|
30698
30709
|
i0.ɵɵlistener("pageChange", function PaginationComponent_Template_pagination_template_pageChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.pageChange.emit($event)); })("pageBoundsCorrection", function PaginationComponent_Template_pagination_template_pageBoundsCorrection_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.pageBoundsCorrection.emit($event)); });
|
|
@@ -30711,7 +30722,7 @@ class PaginationComponent {
|
|
|
30711
30722
|
}
|
|
30712
30723
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationComponent, [{
|
|
30713
30724
|
type: Component,
|
|
30714
|
-
args: [{ selector: 'ccd-pagination', template: "<pagination-template #p=\"paginationApi\" [id]=\"id\" [maxSize]=\"maxSize\" (pageChange)=\"pageChange.emit($event)\"\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\">\n <nav role=\"navigation\" [attr.aria-label]=\"'Pagination' | rpxTranslate\">\n <ul class=\"ngx-pagination\"
|
|
30725
|
+
args: [{ selector: 'ccd-pagination', template: "<pagination-template #p=\"paginationApi\" [id]=\"id\" [maxSize]=\"maxSize\" (pageChange)=\"pageChange.emit($event)\"\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\">\n <nav role=\"navigation\" [attr.aria-label]=\"'Pagination' | rpxTranslate\">\n <ul class=\"ngx-pagination\" [attr.aria-label]=\"screenReaderPaginationLabel | rpxTranslate\"\n [class.responsive]=\"responsive\" *ngIf=\"!(autoHide && p.pages.length <= 1)\">\n <li class=\"pagination-previous\" [class.disabled]=\"p.isFirstPage()\" *ngIf=\"directionLinks\">\n <a tabindex=\"0\" *ngIf=\"1 < p.getCurrent()\" (keyup.enter)=\"p.previous()\" (click)=\"p.previous()\"\n [attr.aria-label]=\"previousLabel + ' ' + screenReaderPageLabel | rpxTranslate\">\n {{ previousLabel | rpxTranslate }} <span class=\"show-for-sr\">{{ screenReaderPageLabel | rpxTranslate }}</span>\n </a>\n <span *ngIf=\"p.isFirstPage()\">\n {{ previousLabel | rpxTranslate }} <span class=\"show-for-sr\">{{ screenReaderPageLabel | rpxTranslate }}</span>\n </span>\n </li>\n <li class=\"small-screen\">\n {{ p.getCurrent() }} / {{ p.getLastPage() }}\n </li>\n <li [class.current]=\"p.getCurrent() === page.value\" [class.ellipsis]=\"page.label === '...'\"\n *ngFor=\"let page of p.pages\">\n <a tabindex=\"0\" (keyup.enter)=\"p.setCurrent(page.value)\" (click)=\"p.setCurrent(page.value)\"\n *ngIf=\"p.getCurrent() !== page.value\">\n <span class=\"show-for-sr\">{{ screenReaderPageLabel | rpxTranslate }} </span>\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\n </a>\n <ng-container *ngIf=\"p.getCurrent() === page.value\">\n <span class=\"show-for-sr\">{{ screenReaderCurrentLabel | rpxTranslate }} </span>\n <span>{{ (page.label === '...') ? page.label : (page.label | number:'') }}</span>\n </ng-container>\n </li>\n <li class=\"pagination-next\" [class.disabled]=\"p.isLastPage()\" *ngIf=\"directionLinks\">\n <a tabindex=\"0\" *ngIf=\"!p.isLastPage()\" (keyup.enter)=\"p.next()\" (click)=\"p.next()\"\n [attr.aria-label]=\"nextLabel + ' ' + screenReaderPageLabel | rpxTranslate\">\n {{ nextLabel | rpxTranslate }} <span class=\"show-for-sr\">{{ screenReaderPageLabel | rpxTranslate }}</span>\n </a>\n <span *ngIf=\"p.isLastPage()\">\n {{ nextLabel | rpxTranslate }} <span class=\"show-for-sr\">{{ screenReaderPageLabel | rpxTranslate }}</span>\n </span>\n </li>\n </ul>\n </nav>\n</pagination-template>\n", styles: [".ngx-pagination{margin-left:0;margin-bottom:1rem;padding-top:25px;text-decoration:none;text-align:left;font-size:16px}.ngx-pagination:before,.ngx-pagination:after{content:\" \";display:table}.ngx-pagination:after{clear:both}.ngx-pagination li{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;margin-right:.0625rem;border-radius:0}.ngx-pagination li{display:inline-block}.ngx-pagination a,.ngx-pagination button{display:block;padding:.1875rem .625rem;border-radius:0;color:#005da6}.ngx-pagination a:hover,.ngx-pagination button:hover{background:#e6e6e6}.ngx-pagination .current{padding:.1875rem .625rem;background:#fff;color:#4c2c92;cursor:default;font-weight:900}.ngx-pagination .disabled{display:none}.ngx-pagination .disabled:hover{background:transparent}.ngx-pagination a,.ngx-pagination button{cursor:pointer}.ngx-pagination .pagination-previous a:before,.ngx-pagination .pagination-previous.disabled:before{margin-right:.5rem;display:inline-block;height:10px;width:10px;border-style:solid;color:#0a0a0a;background:transparent;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);content:\"\";border-width:3px 0 0 3px}.ngx-pagination .pagination-next a:after,.ngx-pagination .pagination-next.disabled:after{margin-left:.5rem;display:inline-block;height:10px;width:10px;border-style:solid;color:#0a0a0a;background:transparent;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);content:\"\";border-width:0 3px 3px 0}.ngx-pagination .show-for-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.ngx-pagination .small-screen{display:none}@media screen and (max-width: 601px){.ngx-pagination.responsive .small-screen{display:inline-block}.ngx-pagination.responsive li:not(.small-screen):not(.pagination-previous):not(.pagination-next){display:none}}\n"] }]
|
|
30715
30726
|
}], null, { visibilityLabel: [{
|
|
30716
30727
|
type: Input
|
|
30717
30728
|
}], id: [{
|